import { type H2AActorRegistration, type H2AEnvelope, type H2AJournalPayload, type H2ANegotiationRecord, type H2ARole, type H2ASessionInterests, type H2ASessionState, type H2AWorkspaceRef } from "@sentropic/h2a"; import type { LocalStore } from "../local-files/store.js"; import type { SessionRegistry } from "./sessions.js"; export interface McpToolResult { [key: string]: unknown; } export interface McpErrorResult { error: string; } export declare function handleRegisterInstance(store: LocalStore, args: { registration?: H2AActorRegistration; } | undefined): McpToolResult | McpErrorResult; export declare function handleDiscoverInstances(store: LocalStore, args: { role?: H2ARole; scope?: string; } | undefined): McpToolResult | McpErrorResult; export declare function handleInbox(store: LocalStore, args: { action?: "read" | "put" | "pop"; instance?: string; envelope?: H2AEnvelope; envelopeId?: string; } | undefined): McpToolResult | McpErrorResult; export declare function handleAppendJournal(store: LocalStore, args: { negotiationId?: string; payload?: H2AJournalPayload; } | undefined): McpToolResult | McpErrorResult; export declare function handleOpenNegotiation(store: LocalStore, args: { record?: H2ANegotiationRecord; } | undefined): McpToolResult | McpErrorResult; interface OfferLikeArgs { negotiationId?: string; instance?: string; artifact?: unknown; eventId?: string; causationId?: string; correlationId?: string; } export declare function handleOffer(store: LocalStore, args: OfferLikeArgs | undefined): McpToolResult | McpErrorResult; export declare function handleCounteroffer(store: LocalStore, args: OfferLikeArgs | undefined): McpToolResult | McpErrorResult; export declare function handleSign(store: LocalStore, args: { negotiationId?: string; instance?: string; artifact?: unknown; privateKeyPem?: string; eventId?: string; causationId?: string; correlationId?: string; } | undefined): McpToolResult | McpErrorResult; export declare function handleStabilize(store: LocalStore, args: { negotiationId?: string; eventId?: string; } | undefined): McpToolResult | McpErrorResult; export declare function handleAttestComprehension(store: LocalStore, args: { negotiationId?: string; instance?: string; dossier?: unknown; dossierHash?: string; privateKeyPem?: string; role?: string; scope?: string; eventId?: string; at?: string; causationId?: string; correlationId?: string; } | undefined): McpToolResult | McpErrorResult; export declare function handleDeclareConflitInteret(store: LocalStore, args: { negotiationId?: string; instance?: string; interets?: unknown; bindings?: unknown; masqueImpactCollectif?: boolean; eventId?: string; at?: string; } | undefined): McpToolResult | McpErrorResult; export declare function handleConflictPosture(store: LocalStore, args: { negotiationId?: string; } | undefined): McpToolResult | McpErrorResult; export declare function handleEscalate(store: LocalStore, args: { negotiationId?: string; instance?: string; channel?: string; payload?: unknown; causationId?: string; correlationId?: string; } | undefined): McpToolResult | McpErrorResult; export declare function handleSessionOpen(sessions: SessionRegistry, args: { instance?: string; host?: string; workspace?: H2AWorkspaceRef; name?: string; pid?: number; interests?: Partial; subscribedTopics?: readonly string[]; sessionId?: string; } | undefined): McpToolResult | McpErrorResult; export declare function handleSessionClose(sessions: SessionRegistry, args: { sessionId?: string; state?: H2ASessionState; } | undefined): McpToolResult | McpErrorResult; export declare function handleDiscoverSessions(sessions: SessionRegistry, args: { scope?: string; instance?: string; name?: string; } | undefined, nativeInstances?: readonly Pick[]): McpToolResult | McpErrorResult; export declare function handleNhiReport(store: LocalStore, args: { longLivedKeyMaxDays?: number; } | undefined): McpToolResult | McpErrorResult; export declare function handleNhiInventory(store: LocalStore, args: { longLivedKeyMaxDays?: number; } | undefined): McpToolResult | McpErrorResult; export declare function handleNhiAttest(store: LocalStore, args: { instance?: string; privateKeyPem?: string; role?: string; scope?: string; longLivedKeyMaxDays?: number; } | undefined): McpToolResult | McpErrorResult; export declare function handleNhiOffboard(store: LocalStore, args: { instance?: string; reason?: string; } | undefined): McpToolResult | McpErrorResult; export declare function handleNhiExport(store: LocalStore, args: { instance?: string; trustDomain?: string; } | undefined): McpToolResult | McpErrorResult; export declare function handleBlockageRaise(store: LocalStore, args: { instance?: string; reason?: string; scope?: string; needs?: string; } | undefined): McpToolResult | McpErrorResult; export declare function handleBlockageList(store: LocalStore, args: { scope?: string; active?: boolean; } | undefined): McpToolResult | McpErrorResult; export declare function handleBlockageResolve(store: LocalStore, args: { instance?: string; by?: string; } | undefined): McpToolResult | McpErrorResult; /** * h2a_conductor — resolve the live conductor/owner of a workspace (WP-G1). * Mirrors `h2a conductor` CLI. Read-only. */ export declare function handleConductor(root: string, args: { workspaceId?: string; workspacePath?: string; } | undefined): McpToolResult | McpErrorResult; /** * h2a_conductor_claim — append a conductor claim for (workspaceId, instance) * and return the post-claim conductorFor resolution (WP-G1b). */ export declare function handleConductorClaim(root: string, args: { instance?: string; workspaceId?: string; workspacePath?: string; } | undefined): McpToolResult | McpErrorResult; /** * h2a_conductor_release — append a conductor release for (workspaceId, instance) * and return the post-release conductorFor resolution (WP-G1b). */ export declare function handleConductorRelease(root: string, args: { instance?: string; workspaceId?: string; workspacePath?: string; } | undefined): McpToolResult | McpErrorResult; /** * h2a_conductor_launch_check — DRY-RUN conductor launch recommendation (D3). * * Polls `track workspace-activity` and returns a recommendation to launch a * conductor if work is durably stalled and no conductor is live. * h2a does NOT spawn anything. This is advisory only; the launch is parked * pending a spawn policy and remote-trigger support. */ export declare function handleConductorLaunchCheck(root: string, args: { workspaceId?: string; workspacePath?: string; idleMs?: number; } | undefined): McpToolResult | McpErrorResult; /** * h2a_conductor_launch — D3 EMISSION: emit a conductor-launch-request envelope * to a live remote agent when work is stalled and no conductor is live. * * Gated by --confirm (boolean) and a 1/30min/workspace cap. * h2a NEVER spawns a process — it only puts a request envelope to remote. */ export declare function handleConductorLaunch(root: string, args: { workspaceId?: string; workspacePath?: string; idleMs?: number; confirm?: boolean; remote?: string; instance?: string; } | undefined): McpToolResult | McpErrorResult; export declare function notImplemented(toolName: string): McpErrorResult; export declare function handleLoopCreate(root: string, args: { id?: string; name?: string; goal?: string; instance?: string; agentId?: string; role?: string; required?: boolean; allowEmpty?: boolean; autoTick?: boolean; launch?: unknown; } | undefined): McpToolResult | McpErrorResult; export declare function handleLoopJoin(root: string, args: { loopId?: string; instance?: string; agentId?: string; role?: string; required?: boolean; launch?: unknown; } | undefined): McpToolResult | McpErrorResult; export declare function handleLoopReport(root: string, args: { loopId?: string; instance?: string; agentId?: string; note?: string; autoJoin?: boolean; } | undefined): McpToolResult | McpErrorResult; export declare function handleLoopDone(root: string, args: { loopId?: string; instance?: string; agentId?: string; note?: string; overrideRefs?: boolean; } | undefined): McpToolResult | McpErrorResult; export declare function handleLoopStop(root: string, args: { loopId?: string; reason?: string; } | undefined): McpToolResult | McpErrorResult; /** * h2a_loop_list — read-only projection of the objective loops in the local store. */ export declare function handleLoopList(root: string): McpToolResult; /** * h2a_loop_status — one loop's full state + its LAST recorded tick observation * (from the journal) + recent events. Read-only; a fresh live plan needs the * async `h2a loop tick` CLI (agents/refs/inbox gathering). */ export declare function handleLoopStatus(root: string, args: { loopId?: string; } | undefined): McpToolResult | McpErrorResult; export {}; //# sourceMappingURL=handlers.d.ts.map