import type { Clock, ConductorRecoveryBinding, KernelPaths } from "../../kernel/types.js"; import { type RolePolicyConfig } from "../../domain/role-policy.js"; import type { CampaignLoop } from "../campaign-loop.js"; import type { StopAdapter } from "../../kernel/result-service.js"; import { CONDUCTOR_V2_ALLOWED_TOOLS, CONDUCTOR_V2_DISALLOWED_TOOLS } from "../conductor-def.js"; export { CONDUCTOR_V2_ALLOWED_TOOLS, CONDUCTOR_V2_DISALLOWED_TOOLS }; declare const TOOL_NAMES: readonly ["accept_goal", "read_status", "request_stop", "advance_campaign"]; type ToolName = (typeof TOOL_NAMES)[number]; export declare const CONDUCTOR_MCP_INPUT_SCHEMAS: Readonly<{ readonly accept_goal: Readonly<{ type: "object"; additionalProperties: false; required: string[]; properties: Readonly<{ goal_text: Readonly<{ type: "string"; minLength: 1; maxLength: number; }>; work_source: Readonly<{ type: "string"; enum: readonly string[]; }>; repository: Readonly<{ type: "string"; minLength: 3; maxLength: 200; pattern: "^[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"; }>; ready_label: Readonly<{ type: "string"; minLength: 1; maxLength: 128; }>; }>; }>; readonly read_status: Readonly<{ type: "object"; additionalProperties: false; properties: Readonly<{ cursor: Readonly<{ type: "string"; minLength: 1; maxLength: 32; pattern: "^[0-9]+$"; }>; }>; }>; readonly request_stop: Readonly<{ type: "object"; additionalProperties: false; required: string[]; properties: Readonly<{ reason: Readonly<{ type: "string"; minLength: 1; maxLength: 2000; }>; }>; }>; readonly advance_campaign: Readonly<{ type: "object"; additionalProperties: false; maxProperties: 0; properties: Readonly<{}>; }>; }>; export interface ConductorMcpToolDescriptor { readonly name: ToolName; readonly description: string; readonly inputSchema: Readonly>; } export interface ConductorMcpCallResult { readonly ok: boolean; readonly error?: string; readonly result?: Readonly>; } export interface ConductorMcpServer { readonly conductorSessionId: string; callTool(name: string, input: Readonly>): ConductorMcpCallResult; } export declare function listConductorMcpTools(_server?: ConductorMcpServer): ConductorMcpToolDescriptor[]; export declare function createConductorMcpServer(options: { readonly paths: KernelPaths; readonly clock: Clock; readonly conductorSessionId: string; /** * Factory-bound immutable recovery binding from human-start composition. * Required for accept_goal to journal recovery authority before returning success. * Tool input never supplies binding/model/config/tmux/binary fields. */ readonly recoveryBinding?: ConductorRecoveryBinding; readonly rolePolicy?: RolePolicyConfig; /** Factory-bound campaign owner. Tool input cannot select tasks, lanes, or models. */ readonly campaignLoop?: CampaignLoop; /** Production exact physical worker-stop boundary. */ readonly stopAdapter?: StopAdapter; }): ConductorMcpServer; export declare function normalizeRepository(raw: string): string; export declare function normalizeReadyLabel(raw: string): string; export declare function hasUnsafeControl(value: string): boolean; export declare function hasAnyControlCharacter(value: string): boolean;