import * as z from "zod/v4"; import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; /** * Command states in the Commands protocol lifecycle */ export declare const CommandState: { readonly PendingUpload: "PENDING_UPLOAD"; readonly Pending: "PENDING"; readonly Dispatched: "DISPATCHED"; readonly Succeeded: "SUCCEEDED"; readonly Failed: "FAILED"; readonly Expired: "EXPIRED"; }; /** * Command states in the Commands protocol lifecycle */ export type CommandState = ClosedEnum; /** * Delivery mode for this command (push/pull), derived from the target at creation time */ export declare const CommandDeploymentModel: { readonly Push: "push"; readonly Pull: "pull"; }; /** * Delivery mode for this command (push/pull), derived from the target at creation time */ export type CommandDeploymentModel = ClosedEnum; /** * The kind of command-capable resource a command targets. */ export declare const CommandResourceType: { readonly Worker: "worker"; readonly Container: "container"; readonly Daemon: "daemon"; }; /** * The kind of command-capable resource a command targets. */ export type CommandResourceType = ClosedEnum; /** * Resource the command is addressed to; null on commands created before target routing */ export type CommandTarget = { /** * The resource ID within the deployment's stack (e.g. a Worker/Container/Daemon id). */ resourceId: string; /** * The kind of command-capable resource a command targets. */ resourceType: CommandResourceType; }; /** * Whether a successful operation result is included or withheld pending explicit confirmation */ export declare const CommandResultAvailability: { readonly Available: "available"; readonly Protected: "protected"; }; /** * Whether a successful operation result is included or withheld pending explicit confirmation */ export type CommandResultAvailability = ClosedEnum; export type Command = { /** * Unique identifier for the command. */ id: string; /** * Unique identifier for the deployment. */ deploymentId: string; /** * Unique identifier for the project. */ projectId: string; /** * Unique identifier for the workspace. */ workspaceId: string; /** * Command name (e.g., 'analyze-repository', 'sync-data') */ name: string; /** * Command states in the Commands protocol lifecycle */ state: CommandState; /** * Delivery mode for this command (push/pull), derived from the target at creation time */ deploymentModel: CommandDeploymentModel; /** * Resource the command is addressed to; null on commands created before target routing */ target: CommandTarget | null; /** * Current attempt number */ attempt: number | null; /** * Optional deadline for command execution */ deadline: Date | null; /** * Size of command params in bytes */ requestSizeBytes: number | null; /** * Size of command response in bytes */ responseSizeBytes: number | null; /** * When the command was created */ createdAt: Date; /** * When the command was dispatched to the deployment */ dispatchedAt: Date | null; /** * When the command completed */ completedAt: Date | null; /** * Error details if command failed */ error: { [k: string]: any | null; } | null; /** * Decoded command result when available */ result?: any | null | undefined; /** * Whether a successful operation result is included or withheld pending explicit confirmation */ resultAvailability?: CommandResultAvailability | undefined; }; /** @internal */ export declare const CommandState$inboundSchema: z.ZodEnum; /** @internal */ export declare const CommandDeploymentModel$inboundSchema: z.ZodEnum; /** @internal */ export declare const CommandResourceType$inboundSchema: z.ZodEnum; /** @internal */ export declare const CommandTarget$inboundSchema: z.ZodType; export declare function commandTargetFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const CommandResultAvailability$inboundSchema: z.ZodEnum; /** @internal */ export declare const Command$inboundSchema: z.ZodType; export declare function commandFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=command.d.ts.map