import type { AgentResponse, Language, PermissionMode } from '../../core/models/types.js'; import type { StepProviderOptions } from '../../core/models/workflow-types.js'; import type { ProviderType } from '../../shared/types/provider.js'; import type { RunAgentOptions } from '../runner.js'; export type StructuredAgentControlSource = 'explicit' | 'synthetic'; export interface StructuredAgentResolution { readonly provider: ProviderType; readonly model?: string; readonly providerOptions?: StepProviderOptions; readonly permissionMode?: PermissionMode; /** Omitted means an explicit caller constraint; synthetic defaults are marked explicitly. */ readonly permissionModeSource?: StructuredAgentControlSource; } export interface StructuredAgentCallOptions { readonly name: string; readonly cwd: string; readonly projectCwd?: string; readonly persona?: string; readonly personaPath?: string; readonly workflowBundleResourceRoot?: string; readonly systemPrompt?: string; readonly resolution: StructuredAgentResolution; readonly maxTurns?: number; readonly language?: Language; readonly abortSignal?: AbortSignal; readonly sessionId?: string; readonly childProcessEnv?: Readonly>; readonly failureDir?: RunAgentOptions['failureDir']; readonly onStream?: RunAgentOptions['onStream']; readonly onActivity?: RunAgentOptions['onActivity']; readonly onPromptResolved?: RunAgentOptions['onPromptResolved']; readonly onDispatch?: RunAgentOptions['onDispatch']; readonly workflowMeta?: RunAgentOptions['workflowMeta']; readonly allowedTools?: RunAgentOptions['allowedTools']; /** Omitted means explicit caller tools; synthetic defaults are marked explicitly. */ readonly allowedToolsSource?: StructuredAgentControlSource; readonly mcpServers?: RunAgentOptions['mcpServers']; readonly mcpAssignment?: RunAgentOptions['mcpAssignment']; readonly mcpServerIdentity?: RunAgentOptions['mcpServerIdentity']; readonly outputSchema?: RunAgentOptions['outputSchema']; } export interface StructuredAgentResponse> extends AgentResponse { structuredOutput: T; } export declare class StructuredAgentResponseError extends Error { readonly response: AgentResponse; constructor(message: string, response: AgentResponse, options?: ErrorOptions); } export declare class StructuredAgentContractError extends StructuredAgentResponseError { constructor(message: string, response: AgentResponse, options?: ErrorOptions); } export declare function requireStructuredAgentProvider(provider: ProviderType | undefined, name: string): ProviderType; /** Typed text-result adapter for synthetic agents whose domain output remains natural language. */ export declare function executeStructuredTextAgent(instruction: string, options: StructuredAgentCallOptions): Promise; /** * Provider-neutral transport for TAKT-owned structured agents. * * The transport owns only fresh-session execution and the structured response contract. Explicit * permission and allowed-tool constraints remain visible to providers so unsupported controls can * fail at the provider boundary. Only controls marked as synthetic are omitted for unsupported * providers. */ export declare function executeStructuredAgent>(instruction: string, schema: Record, options: StructuredAgentCallOptions): Promise>; //# sourceMappingURL=transport.d.ts.map