import { z } from "zod"; import type { AskForApproval, SandboxMode, UserInput } from "../codex-app-server"; /** * Core → Worker dispatch for Work sessions. * * Core decides everything that is authorization: model, upstream key, MCP * servers, Skill revisions. The Worker decides only what depends on its local * state (start vs. resume, process restart) and maps the command onto the * App Server's own thread/turn methods. */ export declare const AGENT_WORK_CONTRACT_VERSION: "agent-work/1"; /** Immutable Skill revision. The Worker fetches the archive by its hash once and caches it. */ export declare const AgentWorkSkillRefSchema: z.ZodObject<{ id: z.ZodString; name: z.ZodString; description: z.ZodString; sha256: z.ZodString; requiredMcpServers: z.ZodDefault>; }, z.core.$strip>; export declare const AgentWorkCliPackageSchema: z.ZodObject<{ id: z.ZodString; name: z.ZodString; package: z.ZodRecord; authentication: z.ZodOptional; }, z.core.$loose>; export declare const AgentWorkInputFileSchema: z.ZodObject<{ path: z.ZodString; contentBase64: z.ZodString; }, z.core.$strip>; export declare const AgentWorkCheckpointRefSchema: z.ZodObject<{ uri: z.ZodString; checksum: z.ZodString; size: z.ZodNumber; cliVersion: z.ZodString; nativeThreadId: z.ZodOptional; lastSequence: z.ZodNumber; }, z.core.$loose>; /** * Where a session reports its lease, events and checkpoint. A Worker serves any * number of tenants and is never configured with one, so the owning Core states * its control plane per session. */ export declare const AgentWorkControlPlaneSchema: z.ZodObject<{ url: z.ZodString; headers: z.ZodDefault>; }, z.core.$strip>; export declare const AgentWorkSessionSchema: z.ZodObject<{ sessionId: z.ZodString; teamId: z.ZodString; epoch: z.ZodNumber; token: z.ZodString; modelKey: z.ZodString; skills: z.ZodDefault>; }, z.core.$strip>>>; files: z.ZodDefault>>; cliPackages: z.ZodDefault; authentication: z.ZodOptional; }, z.core.$loose>>>; cliAuthorization: z.ZodOptional; fileCapability: z.ZodOptional; fileControlPlaneUrl: z.ZodOptional; controlPlane: z.ZodOptional>; }, z.core.$strip>>; nativeThreadId: z.ZodOptional>; checkpoint: z.ZodOptional; lastSequence: z.ZodNumber; }, z.core.$loose>>>; requireExisting: z.ZodOptional; }, z.core.$strip>; export declare const AgentWorkTurnCommandSchema: z.ZodObject<{ sessionId: z.ZodString; teamId: z.ZodString; epoch: z.ZodNumber; commandId: z.ZodString; runId: z.ZodString; sourceMessageId: z.ZodString; initialSessionSequence: z.ZodNumber; userMessage: z.ZodOptional>; historyReconstruction: z.ZodOptional; replaySourceMessageId: z.ZodOptional; input: z.ZodArray>; model: z.ZodString; effort: z.ZodOptional; developerInstructions: z.ZodString; approvalPolicy: z.ZodCustom; sandbox: z.ZodCustom; config: z.ZodRecord; configRevision: z.ZodString; }, z.core.$strip>; export declare const AgentWorkDispatchSchema: z.ZodObject<{ contractVersion: z.ZodLiteral<"agent-work/1">; session: z.ZodObject<{ sessionId: z.ZodString; teamId: z.ZodString; epoch: z.ZodNumber; token: z.ZodString; modelKey: z.ZodString; skills: z.ZodDefault>; }, z.core.$strip>>>; files: z.ZodDefault>>; cliPackages: z.ZodDefault; authentication: z.ZodOptional; }, z.core.$loose>>>; cliAuthorization: z.ZodOptional; fileCapability: z.ZodOptional; fileControlPlaneUrl: z.ZodOptional; controlPlane: z.ZodOptional>; }, z.core.$strip>>; nativeThreadId: z.ZodOptional>; checkpoint: z.ZodOptional; lastSequence: z.ZodNumber; }, z.core.$loose>>>; requireExisting: z.ZodOptional; }, z.core.$strip>; command: z.ZodObject<{ sessionId: z.ZodString; teamId: z.ZodString; epoch: z.ZodNumber; commandId: z.ZodString; runId: z.ZodString; sourceMessageId: z.ZodString; initialSessionSequence: z.ZodNumber; userMessage: z.ZodOptional>; historyReconstruction: z.ZodOptional; replaySourceMessageId: z.ZodOptional; input: z.ZodArray>; model: z.ZodString; effort: z.ZodOptional; developerInstructions: z.ZodString; approvalPolicy: z.ZodCustom; sandbox: z.ZodCustom; config: z.ZodRecord; configRevision: z.ZodString; }, z.core.$strip>; }, z.core.$strip>; /** Errors the Worker returns when it refuses a dispatch. */ export declare const AgentWorkErrorCodeSchema: z.ZodEnum<{ CONTRACT_UNSUPPORTED: "CONTRACT_UNSUPPORTED"; EPOCH_FENCED: "EPOCH_FENCED"; CAPACITY_QUEUED: "CAPACITY_QUEUED"; RUN_UNCERTAIN: "RUN_UNCERTAIN"; }>; export type AgentWorkSkillRef = z.infer; export type AgentWorkCliPackage = z.infer; export type AgentWorkInputFile = z.infer; export type AgentWorkCheckpointRef = z.infer; export type AgentWorkControlPlane = z.infer; export type AgentWorkSession = z.infer; export type AgentWorkTurnCommand = z.infer; export type AgentWorkDispatch = z.infer; export type AgentWorkErrorCode = z.infer; //# sourceMappingURL=agent-work.d.ts.map