import type { CodexToolHandler } from '@dharma-ai-labs/agent-fabric-provider-adapters/experimental/codex-session'; export interface CodexSetupIntent { schema: 'dharma.codex-setup-intent/v1'; operationId: string; setupReference: string; organizationId: string; recipientMembershipId: string; origin: string; repositoryFingerprint: string; policyRevision: string; scopeDigest: string; contractDigest: string; hostContextId: string; issuedAt: string; expiresAt: string; } type PublicDisposition = { state: 'completed'; readinessReceiptId: string; } | { state: 'unconfirmed'; code: 'setup_execution_unconfirmed'; }; export interface CodexSetupJournal { /** Atomically deny changed payload/context; do not recycle an interrupted lease. */ claim(operationId: string, digest: string): Promise<{ state: 'acquired'; leaseId: string; intentDigest: string; } | { state: 'running'; intentDigest: string; } | { state: 'terminal'; result: unknown; intentDigest: string; }>; /** Same bound context, no writes or replacement lease on an absent row. */ read(operationId: string, digest: string): Promise; finish(leaseId: string, digest: string, result: PublicDisposition): Promise; } export interface CodexSetupExecutionLease { readonly leaseId: string; /** Includes the original connection/thread/turn, not just the public intent. */ readonly intentDigest: string; } /** Original in-process admission only; serialized lease fields are not authority. */ export declare function assertCodexSetupExecutionLease(lease: Readonly, intent: Readonly): Promise; type Binding = { connectionId: string; threadId: string; turnId: string; hostContextId: string; }; interface Input extends Binding { intent: CodexSetupIntent; now?: () => number; /** Trusted host response budget, not the operation or approval deadline. */ responseWaitMs?: number; current(): Promise; /** Independently qualify the owning host/package and still-applicable signed scope. */ qualifyHost(intent: Readonly, signal: AbortSignal): Promise; journal: CodexSetupJournal; /** Host owns all child handles and must check current scope at every protected * effect. Settlement means its owned execution has actually stopped. */ execute(intent: Readonly, signal: AbortSignal, current: () => Promise, lease: Readonly): Promise; verifyReadiness(receiptId: string, intent: Readonly, intentDigest: string): Promise; } export declare const CODEX_SETUP_TOOL: { type: string; name: string; description: string; inputSchema: { type: string; additionalProperties: boolean; properties: { operationId: { type: string; format: string; }; setupReference: { type: string; format: string; }; }; required: string[]; }; }; /** Admission component only. It is deliberately not registered on peer/work * sessions and supplies neither a bootstrap executor nor a journal backend. */ export declare function createCodexSetupAdmission(input: Input): { handler: CodexToolHandler; close: () => void; readonly pending: boolean; readonly settled: Promise; intentDigest: string; }; export {}; //# sourceMappingURL=codexSetupAdmission.d.ts.map