Expand description
Shared Agentty protocol models, schema helpers, and prompt payloads.
This crate contains the transport-neutral wire contracts used between
Agentty frontends, session workflows, and provider adapters. It
intentionally avoids depending on the main agentty crate so future
frontends can reuse protocol parsing and turn-prompt serialization without
pulling in TUI state.
Structs§
- Agent
Response - Wire-format protocol payload used for schema-driven provider output.
- Focused
Review - Structured result returned by a focused-review utility prompt.
- Focused
Review Decision - Auditable disposition of one input suggestion during consolidation.
- Focused
Review Evidence - Source citation and actionable rationale for one focused-review finding.
- Focused
Review Suggestion - One actionable focused-review finding.
- Graph
Proposal - Complete logical graph, without runtime identities or acceptance evidence.
- Graph
Proposal Dependency - Logical prerequisite; evidence satisfying it must come from the host.
- Graph
Proposal Execution - Execution requirements that contain no model, Env, task, or budget IDs.
- Graph
Proposal Input - Named input referencing a producer’s output, without an execution identity.
- Graph
Proposal Node - One proposed invocation of an available agent definition.
- Graph
Proposal Output - Named complete response; it does not assert validation or acceptance.
- Graph
Proposal Response - Direct structured response to an initial graph-generation request.
- Question
Item - One extracted question with predefined answer choices.
- Review
Comment Outcome - Structured outcome for one forge review thread targeted by the turn.
- Review
Metadata - Direct wire response for review-request metadata reconciliation.
- Turn
Prompt - Structured prompt payload for one agent turn.
- Turn
Prompt Attachment - One local image attachment referenced from a prompt placeholder.
- Utility
Response - Minimal wire response for isolated text generation tasks.
Enums§
- Agent
Response Parse Error - Structured response parsing failure details.
- Focused
Review Severity - Supported severity levels for actionable focused-review findings.
- Focused
Review Side - Version of a changed file cited by a focused-review finding.
- Graph
Proposal Context - Context lifetime requested without a host-owned task identity.
- Graph
Proposal Gate - Host-established condition needed before a dependent node runs.
- Graph
Proposal Outcome - Mutually exclusive outcomes of proposal generation.
- Graph
Proposal Post Processing - Requested host post-processing, independent of model tools.
- Graph
Proposal Workspace Access - Resource requirements within the session Env, never a permission grant.
- Protocol
Request Profile - Protocol-owned request family preserved across prompt submission and repair retries.
- Protocol
Schema Instruction Mode - Controls whether bootstrap prompt instructions include the full protocol JSON Schema text.
- Review
Comment Resolution - Agent-reported disposition for one forge review thread.
- Schema
Required Policy - Selects how a provider transport lists
requiredschema properties. - Turn
Prompt Content Part - Ordered content piece produced when serializing one turn prompt.
- Turn
Prompt Text Source - Source classification for one turn prompt text payload.
Functions§
- agent_
response_ output_ schema - Returns the JSON Schema used for structured assistant output.
- build_
protocol_ repair_ prompt - Builds the protocol repair prompt text for one failed parse attempt.
- diff_
fence - Builds a Markdown code-fence delimiter long enough to safely wrap an arbitrary prompt payload.
- format_
protocol_ parse_ debug_ details - Builds one multi-line debug report for a protocol parsing failure.
- parse_
agent_ response_ strict - Parses one raw assistant message strictly as protocol payload.
- parse_
protocol_ response_ strict - Parses one response against the schema selected for its request profile.
- prepend_
protocol_ instructions - Prepends structured response protocol instructions to a prompt.
- prepend_
protocol_ refresh_ reminder - Prepends a compact refresh reminder for providers that already received the full instruction contract in the active context.
- protocol_
output_ schema - Returns the output schema selected for one protocol request profile.
- render_
prompt_ text_ for_ agent - Rewrites user-entered
@lookups into quoted agent-facing path tokens. - split_
turn_ prompt_ content - Splits prompt text into ordered text and attachment parts for transport serialization.
- workspace_
instructions - Renders durable application policy for native developer/system instruction channels without replacing the provider’s built-in coding instructions.