pnpm add @kestrel-agents/protocol@0.8.5Runtime, SDK, adapters, and clients must follow their declared exact dependency contracts. Compatible first-party packages do not need equal semantic versions.
Exported modules
The package exports execution, durable conversations, approvals/effects, recovery, Mission Control, public events, and health contracts from its supported entrypoints. Import only public exports rather than internal source paths.
Exported constants
| Export | Purpose |
|---|---|
RUNNER_HEALTH_VERSION | Version of the runner health response |
RUNNER_COMMAND_CONTRACT_VERSION | Command contract reported by health checks |
RUNNER_EVENT_CONTRACT_VERSION | Event contract reported by health checks |
RUNNER_RUN_STREAM_EVENT_TYPES | Allowed public request-stream event names |
RUNNER_CAPABILITIES | Capabilities a compatible runner may advertise |
Parse a terminal result
assistantText is required and must be null or a non-empty string. output is also required. Validate unknown data before your application uses it.
import { parseRunnerResultV2 } from "@kestrel-agents/protocol";
const result = parseRunnerResultV2(input);
console.log(result.output, result.assistantText);Parse a terminal event payload
import { parseRunnerTerminalPayloadV2 } from "@kestrel-agents/protocol";
const payload = parseRunnerTerminalPayloadV2(event.type, event.payload);The payload parser validates the nested result for run.completed, run.failed, and run.cancelled. It also validates a result attached to an operator-controlled outcome.
Validate runner health
Use parseRunnerHealthV1() on an unknown health response. It verifies the service name, contract versions, capability list, and non-empty service version before returning typed data.
Validation and unknown fields
Parse network, persisted, and plugin-provided data before use. Canonical contracts reject malformed required values and unexpected shapes where closed objects own the boundary. Consumers must preserve or safely ignore unknown future event names rather than coercing them.
Removed 0.7 APIs
The current project-control contract is Mission Control. Legacy Board/Task writes and project snapshot updates are migration/history concepts only; 0.8 clients do not receive a compatibility shim.