import { CommandFailure } from "@cotal-ai/workspace"; import { type AdditiveAgentReceipt, type AdditiveTeamAttempt } from "../lib/team-additive-attempt.js"; import { type AgentRemovalAttempt, type AgentRetirementObservation } from "../lib/team-agent-removal.js"; import { type AgentSettlement } from "../lib/team-removal-reconcile.js"; import type { TeamValues } from "./team.js"; export interface AgentStop { name: string; id: string; lifecycleUid: string; requestId: string; acknowledged: boolean; notExecuted?: boolean; } export interface AgentRetirementRun { intentAttempted: boolean; returned: boolean; retired: AgentRetirementObservation[]; stops: AgentStop[]; failure?: CommandFailure; } /** The native retirement phase for an original static deployment, agent-only or mixed. Preparing it * reads the pinned original manager's slots; `execute` runs only under the caller's maintenance lock. * A stop acknowledgement never settles removal: every original UID must reach a native retired * slot/head with confirmed cleanup, and an unconfirmed outcome stops the sequence without replay. */ export declare function prepareAgentRetirement(input: { root: string; space: string; deploymentId: string; original: AdditiveTeamAttempt; receipt: AdditiveAgentReceipt; }): Promise<{ manager: string; agents: { name: string; id: string; lifecycleUid: string; slotPhase: string; cleanupComplete: boolean | null; observedState: string; }[]; execute(signal: AbortSignal): Promise; }>; /** One row per original incarnation: its native retirement, stop or unattempted state. */ export declare function agentOutcomeRows(receipt: AdditiveAgentReceipt, run: Pick): { name: string; uid: string; state: string; }[]; export interface AgentReconcileRun { recorded: AgentSettlement[]; settlements: AgentSettlement[]; returned: boolean; failure?: CommandFailure; } /** Reconcile the retirement phase of an unsettled static intent from the original manager's durable * slot and head only. The read uses the privileged control instrument, which holds no stop or * attach rows, and calls only `slots`: no stop, retry or name-based * target. An unconfirmed stop settles only when the original UID's slot and head are retired with * cleanup complete. A live original, a successor under the alias, or an in-flight terminal stays * open. Never-submitted incarnations are reported unattempted and are not continued. */ export declare function prepareAgentReconcile(input: { root: string; space: string; deploymentId: string; original: AdditiveTeamAttempt; receipt: AdditiveAgentReceipt; intent: AgentRemovalAttempt; }): Promise<{ manager: string; settlements: AgentSettlement[]; execute(): Promise; }>; /** One row per original incarnation for a reconciliation preview or result. */ export declare function agentSettlementRows(settlements: readonly AgentSettlement[]): { name: string; uid: string; state: string; }[]; export declare const AGENT_RECONCILE_NOTE = "Reconciliation records only the original manager's durable retired slot and head for the original lifecycle UID, with cleanup complete. Process absence settles nothing. No stop was sent or retried, and never-submitted incarnations stay unattempted. An unsettled intent stays blocking."; /** Run under an interrupt guard that only stops later steps; no observed effect is reversed. */ export declare function withInterruptGuard(fn: (signal: AbortSignal) => Promise): Promise<{ value: T; signal: "SIGINT" | "SIGTERM" | undefined; }>; /** Remove only a returned static agent-only deployment. */ export declare function removeAgentTeam(deploymentId: string, values: TeamValues): Promise; //# sourceMappingURL=team-agent-remove.d.ts.map