Skip to content
Tracon

DocumentChannelMessageBuilder

Namespace Tracon · Assembly Tracon.Core.dll

Builds the AI.ChatMessage a document is carried in and lets the recording path tell such a message apart from ordinary instructions text.

public static class DocumentChannelMessageBuilder

objectDocumentChannelMessageBuilder

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Not a security guarantee. No provider gives a hard guarantee that content wrapped this way is never treated as an instruction; a capable-enough model can still be steered by content inside a document. This is a convention and an audit trail: it keeps the data channel visibly separate in the message list and in the run record.

A literal occurrence of either delimiter inside the document’s own content is defanged so it cannot be mistaken for a real boundary - the document’s content can never forge the end of the document.

The AIContent.AdditionalProperties key carrying the document’s name.

public const string DocumentNameProperty = "tracon.documentName"

string

The AIContent.AdditionalProperties key carrying the document’s SHA-256 hash (lowercase hex).

public const string DocumentSha256Property = "tracon.documentSha256"

string

The AIContent.AdditionalProperties key carrying the document’s UTF-8 byte size.

public const string DocumentSizeBytesProperty = "tracon.documentSizeBytes"

string

Builds the AI.ChatMessage that carries a single document.

public static ChatMessage Build(AgentRunDocument document)

document AgentRunDocument

The document to wrap.

ChatMessage

A user-role message with a single AI.TextContent, wrapped in a delimiter and marked through AIContent.AdditionalProperties.

ArgumentNullException

document is null.

TryGetSummary(AIContent, out DocumentAttachmentSummary)

Section titled “ TryGetSummary(AIContent, out DocumentAttachmentSummary)”

Reports whether an AI.AIContent was produced by DocumentChannelMessageBuilder.Build.

public static bool TryGetSummary(AIContent content, out DocumentAttachmentSummary summary)

content AIContent

The content to inspect.

summary DocumentAttachmentSummary

The document’s name, size, and hash when this returns true.

bool