import type { Context } from '@deepseek-ai/cordis'; import type { AgentDefaultModelConfig } from '@deepseek-ai/dsh-agent-default-model'; import type { AgentPresetRegistry as AgentPresets } from '@deepseek-ai/dsh-agent-preset-registry'; import type { ToolRuntime, ToolDefinition } from '@deepseek-ai/dsh-tools'; import type { WorkspaceRegistry } from '@deepseek-ai/dsh-workspace'; import type { Companion } from '../domain.js'; import type { PartnerStore } from '../store.js'; import type { ExecutionKind, ExecutionRun } from './domain.js'; type ExecutionContext = Context & { agents: Context['agents']; agentDefaultModel: AgentDefaultModelConfig; agentPresets: AgentPresets; tools: ToolRuntime; workspaceRegistry: WorkspaceRegistry; }; export interface EphemeralExecutionRequest { signal?: AbortSignal; kind: ExecutionKind; sourceId: string; companion: Companion; prompt: string; cwd?: string; parentSessionId?: string; allowedTools?: string[]; systemInstruction?: string; timeoutMinutes?: number; destroyAfterRun?: boolean; /** Explicit source-bound bridge; native preset tools remain inaccessible. */ bridgeTools?: ToolDefinition[]; collectOutput?: () => string; /** Presentation only; callback failure cannot change execution. */ onStarted?: () => void; } export interface EphemeralExecutionResult { run: ExecutionRun; output: string; } export declare class EphemeralExecutionService { private readonly ctx; private readonly store; private readonly defaultCwd; private mcpTools?; setMcpTools(factory: (companionId: string) => ToolDefinition[]): void; private readonly semaphore; private readonly retained; private readonly active; private closed; constructor(ctx: ExecutionContext, store: PartnerStore, defaultCwd: string); execute(request: EphemeralExecutionRequest): Promise; reconcileInterruptedRuns(): Promise; close(): Promise; private run; private saveRun; } export declare class ExecutionFailedError extends Error { readonly run: ExecutionRun; constructor(run: ExecutionRun); } export {}; //# sourceMappingURL=service.d.ts.map