ToolResultEnvelope

Interface: ToolResultEnvelope

Defined in: src/semantics/toolEffects.ts:111

What a tool handler returns to opt into the channel: { content, effects, status? }. content is what the model reads (any value — strings pass through, objects stringify exactly as a bare return would). Returning anything else keeps today's path, byte for byte.

effects is REQUIRED — it is the envelope marker itself. The recognizer refuses to treat a value without an effects array as an envelope (that strictness IS the zero-cost guarantee: { content, status: 'success' } is a shape a domain object could already have), so the type says exactly what the recognizer accepts. Status-only is spelled effects: [] — the explicit marker when only status matters.

Properties

content

readonly content: unknown

Defined in: src/semantics/toolEffects.ts:112


effects

readonly effects: readonly ProposedEffect[]

Defined in: src/semantics/toolEffects.ts:113


status?

readonly optional status?: ToolResultStatus

Defined in: src/semantics/toolEffects.ts:114

On this page