Documentation
Table of Contents

Namespace IntentSharp.Targets

Classes

CommandCheck

The verdict on a planned command: whether it may run, the rules it broke, the refusals that are not rules, what the target's inspection found, the guardrail decision and the settings it would run under.

CommandOutcome

Everything that came back from one operation on a target: the plan, the check it passed or failed, the target's result when it ran, the model call that planned it and the time it took. A refused or failed operation returns an outcome too, with Executed false and Check saying why.

CommandPlan

A command the model planned for a target: the command, its parameters and the model's explanation, plus what the runtime found when it inspected the command. Check it with CheckAsync(CommandPlan, CancellationToken) and run it with ExecuteAsync(CommandPlan, CancellationToken); a plan you build yourself is checked the same way.

TargetCommand

A command the model planned, as the runtime hands it to InspectAsync(TargetCommand, TargetContext, CancellationToken): the command itself, its parameters and the model's explanation.

TargetContext

What the runtime hands a target with each call: the current description, a logger and the stage of the operation.

TargetDescription

What a target holds, as DescribeAsync(TargetContext, CancellationToken) reports it: the command language, the schema of a command, guidance for the model, the entities with their fields and operations, and properties the target keeps for itself. The model plans against it, and rule files name its entities.

TargetEntity

One thing a target holds that a command can touch: a table, a collection, a layer, an endpoint. Rule files name it by Name, its path segments joined with dots.

TargetExecution

A command that passed the guardrail check, with the decision it passed and the limits it runs under: what ExecuteAsync(TargetExecution, CancellationToken) receives. Only TargetRuntime can create one, and only from a passing check, so a target is never handed a command that was not checked.

TargetField

One field of a TargetEntity: a column, a document property, a GIS attribute, with nested fields where the technology has them.

TargetInspection

What a planned command would do, as InspectAsync(TargetCommand, TargetContext, CancellationToken) reads it without running it. The runtime hands it to the guardrail check at the Data checkpoint: the entities as data.entities, the operations as data.operations and each entry of Extra as the subject it names.

TargetLimits

The limits one execution runs under, resolved from the data.* settings: the file's value, else the code value, else the fail-closed value. A target honors them while it runs; the runtime also cancels an execution that outlasts Timeout and cuts the records to MaxResults, so a target that ignores them still cannot run without a limit.

TargetOperationException

A target operation failed. A target throws it to classify a rejection (Kind); the runtime throws it with Timeout when it cancels an execution at data.timeout.

TargetResult

What ExecuteAsync(TargetExecution, CancellationToken) returns: the records a read returned, or the count of what a write changed.

TargetRuntime

Runs AI operations against one ITarget: it senses the target, plans a command with the model, checks the command against the rule files at the Data checkpoint and executes it only when the check passes. The same runtime serves any technology; the target supplies everything the technology needs.

TargetRuntimeOptions

How a TargetRuntime runs: the rule sets it checks, the plan intent it runs, the code layer of its settings and its logger.

TargetSettings

The code layer of the data.* settings for one TargetRuntime: what a setting takes when no file sets it. A file's value always wins (a rule set's settings: block or the settings document), and a setting left null here falls back to the library default, or to its fail-closed value for a security setting: no writes, a 30-second time limit, at most 1000 results.

TargetSubjects

The subjects every target hands to the Data checkpoint, which rule files write rules on: data.stage (sense, plan or execute), data.entities (the entities a command touches, as a list of entity names), data.operations (what it does, such as read or write), data.results (the most results it may return) and data.timeout (its time limit, in whole seconds). data.entities and data.operations are required security subjects: every check must cover them with an enforced rule, and a value no enforced allow rule allows is denied.

Interfaces

ITarget

Connects one technology to IntentSharp: a database, a document store, a GIS service, a REST API or anything else a model may plan commands for. A target describes what it holds, inspects a command the model planned, and executes a command that passed the guardrail check. TargetRuntime runs the rest: it senses the target, plans a command with the model, checks it against the rule files and executes it. The library never builds a command, binds a parameter, opens a transaction or converts a value; the target does.

Enums

TargetOperationExceptionKind

Why a target operation failed, as the target classifies its own failures and the runtime its own.