Documentation
Table of Contents

Class TargetDescription

Namespace
IntentSharp.Targets
Assembly
IntentSharp.dll

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.

public sealed class TargetDescription
Inheritance
object
TargetDescription
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Extension Methods

Remarks

Never put connection data in a description: the entities, fields, language, command schema and instructions reach the model. Properties, and the properties of each entity and field, reach it only for the keys listed in PromptProperties. Treat a description as read-only once it is returned: the runtime keeps it and shares it between operations.

Constructors

TargetDescription()

Creates a description; set at least Language.

Properties

CommandSchema

The JSON Schema of one command: by default {"type":"string"}, a command written as text. A target whose commands are JSON values declares their shape, such as an object of layer, where and outFields. The model is sent this schema for its command. The runtime refuses a command whose JSON kind is not the schema's top-level type; the target's InspectAsync(TargetCommand, TargetContext, CancellationToken) checks the rest and refuses a command that does not fit.

Entities

The entities the target holds: tables, collections, layers, endpoints.

Fingerprint

The description's fingerprint, set by the library when it compares descriptions; null until then. A value the target sets is not used.

FingerprintProperties

The property keys that count towards the description's fingerprint, wherever they appear, so a change to them counts as a change of the target's schema. Empty by default.

Instructions

Guidance for the model from the target, such as "named parameters, no literal values"; null for none.

Language

The command language, in free text, such as "a REST filter expression" or "a JSON command". The model writes commands in it.

PromptProperties

The property keys that reach the model, wherever they appear: in Properties and in the properties of each entity and field. Empty by default: no property reaches the model.

Properties

Values the target keeps for itself. They never reach the model unless a key is listed in PromptProperties, and never count towards the description's fingerprint unless a key is listed in FingerprintProperties.

SensedAt

When the runtime received the description; set by the runtime, which replaces a value the target sets.