Documentation
¶
Overview ¶
Package agentout renders machine-readable envelopes for AI agents.
Every command that supports --json emits exactly one Envelope on stdout. The envelope is the stable contract between the CLI and any agentic consumer (Claude Code, Codex, gemini-cli, …): the schema field is versioned independently of the CLI version, and fields are only ever added, never renamed or removed, within the same schema version.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Envelope ¶
type Envelope struct {
Schema string `json:"schema"` // "multiversa.<command>/v1"
Command string `json:"command"` // command that produced this
CLIVersion string `json:"cli_version"` // CLI semver at emit time
OK bool `json:"ok"`
Data any `json:"data,omitempty"`
Error *Error `json:"error,omitempty"`
}
Envelope is the single top-level JSON shape emitted by --json commands.
type Error ¶
type Error struct {
Code string `json:"code"`
Message string `json:"message"`
Hint string `json:"hint,omitempty"`
}
Error carries a machine-matchable code plus human context. Hint tells the agent what to try next — it is advisory, never an instruction to execute without user approval ("La IA propone, tú decides").