import { COORDINATOR_MCP_PROTOCOL_VERSION, COORDINATOR_MCP_SERVER_NAME } from "../coordinator/contract"; export type HermesMutationClass = "sessions" | "questions" | "reports"; export type HermesSetupMode = "render" | "install" | "check" | "smoke"; export interface HermesSetupFlags { json?: boolean; check?: boolean; smoke?: boolean; install?: boolean; force?: boolean; root?: string[]; repo?: string; profile?: string; sessionCommand?: string; noWorktree?: boolean; worktreeName?: string; requireWorktree?: boolean; stateRoot?: string; codingAgentDir?: string; mutation?: string[]; artifactByteCap?: string; serverKey?: string; gjcCommand?: string; target?: string; profileDir?: string; timeout?: string; connectTimeout?: string; } export interface CoordinatorSetupSpec { schemaVersion: 1; coordinator: "hermes"; serverKey: string; serverName: typeof COORDINATOR_MCP_SERVER_NAME; protocolVersion: typeof COORDINATOR_MCP_PROTOCOL_VERSION; gjcCommand: string; args: string[]; roots: string[]; namespace: { profile?: string; repo?: string; }; sessionCommand?: string; sessionCommandSource: "default" | "explicit"; worktree: { enabled: boolean; name?: string; /** Refuse a session creation that did not name its own worktree. */ required: boolean; }; stateRoot?: string; /** Agent-directory override (GJC_CODING_AGENT_DIR). Distinct from the coordinator state root. */ codingAgentDir?: string; mutationPolicy: { classes: HermesMutationClass[]; perCallConsentRequired: true; }; artifactByteCap?: number; /** * Explicit Hermes MCP client call timeout override in whole seconds. * Undefined means "no explicit flag": keep the default, or preserve the * installed value on `--install` (#4878). */ timeout?: number; /** Explicit Hermes MCP connect timeout override in whole seconds. */ connectTimeout?: number; installTarget?: { kind: "profile-dir" | "config-file"; path: string; }; operatorTemplateVersion: 1; contractDocVersion: 1; } export interface HermesSetupResult { ok: boolean; mode: HermesSetupMode; files_written: string[]; previews: Array<{ path: string; content: string; }>; warnings: string[]; smoke: null | { ok: boolean; protocolVersion: string; serverName: string; requiredTools: string[]; missingTools: string[]; }; check: null | { ok: boolean; mismatches: Array<{ path: string; kind: "missing" | "invalid" | "signature" | "operator_digest"; }>; }; } interface HermesTimeouts { timeout: number; connectTimeout: number; } export declare function buildHermesSetupSpec(flags: HermesSetupFlags): CoordinatorSetupSpec; export declare function computeHermesSetupSignature(spec: CoordinatorSetupSpec): string; export declare function renderHermesServerBlock(spec: CoordinatorSetupSpec, timeouts?: HermesTimeouts): Record; export declare function runHermesSetup(flags: HermesSetupFlags): Promise; export declare function formatHermesSetupResult(result: HermesSetupResult): string; export declare function hermesSetupExitCode(error: unknown): number; export {};