import { Static, Type } from "typebox"; import { Context } from "@deepseek-ai/cordis"; //#region src/schemas/delegation.d.ts /** Team-owned Cordis service for one session's delegated runs. */ export declare const DOOM_DELEGATION_SERVICE = "doom/delegation"; export declare const DOOM_DELEGATION_REQUESTED_EVENT = "doom/delegation/requested"; export declare const DOOM_DELEGATION_ACCEPTED_EVENT = "doom/delegation/accepted"; export declare const DOOM_DELEGATION_STARTED_EVENT = "doom/delegation/started"; export declare const DOOM_DELEGATION_UPDATED_EVENT = "doom/delegation/updated"; export declare const DOOM_DELEGATION_FINISHED_EVENT = "doom/delegation/finished"; export declare const DOOM_DELEGATION_CANCELLED_EVENT = "doom/delegation/cancelled"; export declare const DelegationRequestSchema: Type.TObject<{ requestId: Type.TString; taskId: Type.TUnion<[Type.TString, Type.TNumber]>; agent: Type.TString; inlineAgent: Type.TOptional>; prompt: Type.TString; cwd: Type.TString; model: Type.TOptional; context: Type.TOptional, Type.TLiteral<"fork">]>>; timeoutMs: Type.TOptional; artifacts: Type.TOptional; runMode: Type.TOptional, Type.TLiteral<"detached">]>>; teamTask: Type.TOptional>; }>; export type DelegationRequest = Static; export declare const DelegationAcceptedSchema: Type.TObject<{ requestId: Type.TString; }>; export type DelegationAccepted = Static; export declare const DelegationStartedSchema: Type.TObject<{ requestId: Type.TString; runId: Type.TString; }>; export type DelegationStarted = Static; export declare const DelegationUpdateSchema: Type.TObject<{ requestId: Type.TString; runId: Type.TString; status: Type.TOptional; currentTool: Type.TOptional; toolCount: Type.TOptional; durationMs: Type.TOptional; tokens: Type.TOptional; }>; export type DelegationUpdate = Static; export declare const DelegationStatusSchema: Type.TUnion<[Type.TLiteral<"completed">, Type.TLiteral<"failed">, Type.TLiteral<"timed_out">, Type.TLiteral<"cancelled">, Type.TLiteral<"interrupted">, Type.TLiteral<"turn_budget_exhausted">, Type.TLiteral<"tool_budget_exhausted">, Type.TLiteral<"acceptance_failed">, Type.TLiteral<"invalid_request">, Type.TLiteral<"unavailable_context">]>; export type DelegationStatus = Static; export declare const DelegationResultSchema: Type.TObject<{ requestId: Type.TString; runId: Type.TString; status: Type.TUnion<[Type.TLiteral<"completed">, Type.TLiteral<"failed">, Type.TLiteral<"timed_out">, Type.TLiteral<"cancelled">, Type.TLiteral<"interrupted">, Type.TLiteral<"turn_budget_exhausted">, Type.TLiteral<"tool_budget_exhausted">, Type.TLiteral<"acceptance_failed">, Type.TLiteral<"invalid_request">, Type.TLiteral<"unavailable_context">]>; output: Type.TOptional; error: Type.TOptional; outputPath: Type.TOptional; sessionFile: Type.TOptional; durationMs: Type.TOptional; toolCount: Type.TOptional; }>; export type DelegationResult = Static; export declare const DelegationCancelSchema: Type.TObject<{ requestId: Type.TString; reason: Type.TOptional; }>; export type DelegationCancel = Static; export interface DoomDelegationService { readonly sessionId: string; readonly generation: string; request(request: DelegationRequest): Promise; cancel(request: DelegationCancel): void; } declare module '@deepseek-ai/cordis' { interface Context { 'doom/delegation': DoomDelegationService; } interface Events { 'doom/delegation/requested'(event: DelegationRequest): void; 'doom/delegation/accepted'(event: DelegationAccepted): void; 'doom/delegation/started'(event: DelegationStarted): void; 'doom/delegation/updated'(event: DelegationUpdate): void; 'doom/delegation/finished'(event: DelegationResult): void; 'doom/delegation/cancelled'(event: DelegationCancel): void; } } export declare function readDoomDelegationService(ctx: Context): DoomDelegationService | undefined; //#endregion //# sourceMappingURL=delegation.d.mts.map