import { type ToolDefinition } from "@earendil-works/pi-coding-agent"; import type { TSchema } from "typebox"; export interface StructuredOutputCapture { value: T | undefined; called: boolean; count: number; duplicateCall: boolean; } export declare const STRUCTURED_OUTPUT_CONTRACT: string; /** * Appended to a schema-less workflow subagent's task so it knows its final text * is the script's verbatim return value, not a message to a person. */ export declare const WORKFLOW_PLAIN_TEXT_OUTPUT_NOTE: string; /** * A terminating output tool: pi validates the model's call against `schema`, and * the first validated arguments become the subagent's structured result * (captured into `capture`). `terminate: true` lets pi end on the tool call; * the count guard remains for runtimes/providers that somehow produce duplicates. */ export declare function createStructuredOutputTool(schema: unknown, capture: StructuredOutputCapture): ToolDefinition;