import { z } from "zod"; import { type AgentRemovalInventory } from "./team-agent-removal.js"; import { type ChannelRemovalInventory } from "./team-channel-removal.js"; declare const Attempt: z.ZodObject<{ schemaVersion: z.ZodLiteral<1>; kind: z.ZodLiteral<"additive-team-attempt">; deploymentId: z.ZodString; root: z.ZodString; space: z.ZodString; server: z.ZodString; manifestPath: z.ZodString; manifestHash: z.ZodString; authMode: z.ZodEnum<{ open: "open"; auth: "auth"; user: "user"; }>; tlsRequired: z.ZodBoolean; declaredChannels: z.ZodArray; requestedAgents: z.ZodArray; agentHashes: z.ZodOptional>>; managerInstanceId: z.ZodOptional; createdAt: z.ZodISODateTime; }, z.core.$strict>; export type AdditiveTeamAttempt = z.infer; declare const Step: z.ZodDiscriminatedUnion<[z.ZodObject<{ schemaVersion: z.ZodLiteral<1>; kind: z.ZodLiteral<"additive-channel-step">; deploymentId: z.ZodString; ordinal: z.ZodNumber; name: z.ZodString; phase: z.ZodLiteral<"submitted">; recordedAt: z.ZodISODateTime; }, z.core.$strict>, z.ZodObject<{ schemaVersion: z.ZodLiteral<1>; kind: z.ZodLiteral<"additive-channel-step">; deploymentId: z.ZodString; ordinal: z.ZodNumber; name: z.ZodString; phase: z.ZodLiteral<"accepted">; revision: z.ZodNumber; recordedAt: z.ZodISODateTime; }, z.core.$strict>], "phase">; export type AdditiveChannelStep = z.infer; declare const ChannelReceipt: z.ZodObject<{ schemaVersion: z.ZodLiteral<1>; kind: z.ZodLiteral<"additive-channel-receipt">; deploymentId: z.ZodString; root: z.ZodString; space: z.ZodString; server: z.ZodString; manifestPath: z.ZodString; manifestHash: z.ZodString; authMode: z.ZodEnum<{ open: "open"; auth: "auth"; user: "user"; }>; tlsRequired: z.ZodBoolean; createdChannels: z.ZodArray>; recordedAt: z.ZodISODateTime; }, z.core.$strict>; export type AdditiveChannelReceipt = z.infer; declare const AgentReceipt: z.ZodObject<{ schemaVersion: z.ZodLiteral<1>; deploymentId: z.ZodString; root: z.ZodString; space: z.ZodString; server: z.ZodString; manifestPath: z.ZodString; manifestHash: z.ZodString; authMode: z.ZodEnum<{ open: "open"; auth: "auth"; user: "user"; }>; tlsRequired: z.ZodBoolean; createdChannels: z.ZodArray>; recordedAt: z.ZodISODateTime; kind: z.ZodEnum<{ "additive-agent-receipt": "additive-agent-receipt"; "additive-team-receipt": "additive-team-receipt"; }>; createdAgents: z.ZodArray; }, z.core.$strict>; }, z.core.$strict>>; }, z.core.$strict>; declare const Receipt: z.ZodDiscriminatedUnion<[z.ZodObject<{ schemaVersion: z.ZodLiteral<1>; kind: z.ZodLiteral<"additive-channel-receipt">; deploymentId: z.ZodString; root: z.ZodString; space: z.ZodString; server: z.ZodString; manifestPath: z.ZodString; manifestHash: z.ZodString; authMode: z.ZodEnum<{ open: "open"; auth: "auth"; user: "user"; }>; tlsRequired: z.ZodBoolean; createdChannels: z.ZodArray>; recordedAt: z.ZodISODateTime; }, z.core.$strict>, z.ZodObject<{ schemaVersion: z.ZodLiteral<1>; deploymentId: z.ZodString; root: z.ZodString; space: z.ZodString; server: z.ZodString; manifestPath: z.ZodString; manifestHash: z.ZodString; authMode: z.ZodEnum<{ open: "open"; auth: "auth"; user: "user"; }>; tlsRequired: z.ZodBoolean; createdChannels: z.ZodArray>; recordedAt: z.ZodISODateTime; kind: z.ZodEnum<{ "additive-agent-receipt": "additive-agent-receipt"; "additive-team-receipt": "additive-team-receipt"; }>; createdAgents: z.ZodArray; }, z.core.$strict>; }, z.core.$strict>>; }, z.core.$strict>], "kind">; export type AdditiveAgentReceipt = z.infer; export declare const additiveAgentRequestReceipt: (value: unknown) => { requestId: string; managerInstanceId: string; managerEpoch: number; goalId: string; fingerprint: string; allocation: { name: string; owner: string; actor: string; lifecycleUid: string; }; }; export type AdditiveTeamReceipt = z.infer; declare const AgentStep: z.ZodObject<{ schemaVersion: z.ZodLiteral<1>; kind: z.ZodLiteral<"additive-agent-step">; deploymentId: z.ZodString; ordinal: z.ZodNumber; name: z.ZodString; hash: z.ZodString; phase: z.ZodEnum<{ submitted: "submitted"; accepted: "accepted"; joined: "joined"; }>; requestId: z.ZodUUID; managerInstanceId: z.ZodString; request: z.ZodOptional; }, z.core.$strict>>; joined: z.ZodOptional; }, z.core.$strict>; }, z.core.$strict>>; recordedAt: z.ZodISODateTime; }, z.core.$strict>; export type AdditiveAgentStep = z.infer; /** An immutable root-local intent before any additive native effect. It is not an ownership ledger * or permission to resume an uncertain operation. */ export declare function writeAdditiveTeamAttempt(root: string, attempt: AdditiveTeamAttempt): void; /** Persist each channel submission before its native request and its acknowledged revision * immediately after a returned create. A missing acceptance remains unknown, never retryable. */ export declare function writeAdditiveChannelStep(root: string, attempt: AdditiveTeamAttempt, ordinal: number, phase: "submitted" | "accepted", revision?: number): void; /** Settlement records the returned create revisions, never current channel state. The full * submission/acceptance sequence must match one channel-only intent in original order. */ export declare function additiveChannelAttemptSettled(attempt: AdditiveTeamAttempt, receipt: AdditiveTeamReceipt | undefined, steps: readonly AdditiveChannelStep[]): boolean; export declare function writeAdditiveChannelReceipt(root: string, attempt: AdditiveTeamAttempt, createdChannels: AdditiveChannelReceipt["createdChannels"]): void; /** Immutable native request/allocation/join observations. A missing phase never authorizes replay. */ export declare function writeAdditiveAgentStep(root: string, attempt: AdditiveTeamAttempt, ordinal: number, value: Omit): void; export declare function additiveAgentAttemptSettled(attempt: AdditiveTeamAttempt, receipt: AdditiveTeamReceipt | undefined, steps: readonly AdditiveAgentStep[], channelSteps?: readonly AdditiveChannelStep[]): boolean; export declare function writeAdditiveAgentReceipt(root: string, attempt: AdditiveTeamAttempt, createdAgents: AdditiveAgentReceipt["createdAgents"], createdChannels?: AdditiveChannelReceipt["createdChannels"]): void; /** All root-local attempts. Bad records remain visible rather than becoming absence. */ export declare function listAdditiveTeamAttempts(root: string): { valid: AdditiveTeamAttempt[]; steps: AdditiveChannelStep[]; agentSteps: AdditiveAgentStep[]; returned: AdditiveTeamReceipt[]; removal?: AgentRemovalInventory; channelRemoval?: ChannelRemovalInventory; refused: { path: string; why: string; }[]; }; /** Deployments whose complete scoped removal matched their original returned receipt: the agent * receipt for agent-only, the card receipt for channel-only, and both for a mixed team. */ export declare function removedAdditiveDeploymentIds(inventory: ReturnType): Set; /** Completed scoped removals release only their own known blocker: agent-only native retirements or * channel-only card deletes. The creation records stay in history; unreadable or incomplete removal * never releases custody. */ export declare function retainedAdditiveTeamAttempts(inventory: ReturnType): AdditiveTeamAttempt[]; export declare function additiveTeamRecordedState(attempt: AdditiveTeamAttempt, inventory: ReturnType): "removal-returned" | "channels-and-agents-returned" | "agent-joins-returned" | "channel-create-returned" | "unsettled"; export declare function findAdditiveTeamAttempt(root: string, id: string): AdditiveTeamAttempt | undefined; export {}; //# sourceMappingURL=team-additive-attempt.d.ts.map