import { $a as AgentHarnessTaskRuntimeScope, Cs as TaskRecord, Io as DetachedTaskFinalizeParams, Lo as DetachedTaskLifecycleRuntime, rc as AgentInternalEvent } from "./types-BftTUA7h.js"; import { t as DeliveryContext } from "./delivery-context.types-DyNhFIjW.js"; import { t as SubagentAnnounceDeliveryResult } from "./subagent-announce-dispatch-CmcEql9d.js"; //#region src/agents/subagent-announce-delivery.d.ts declare function deliverSubagentAnnouncement(params: { requesterSessionKey: string; announceId?: string; triggerMessage: string; steerMessage: string; internalEvents?: AgentInternalEvent[]; summaryLine?: string; requesterSessionOrigin?: DeliveryContext; requesterOrigin?: DeliveryContext; completionDirectOrigin?: DeliveryContext; directOrigin?: DeliveryContext; sourceSessionKey?: string; sourceChannel?: string; sourceTool?: string; targetRequesterSessionKey: string; requesterIsSubagent: boolean; expectsCompletionMessage: boolean; bestEffortDeliver?: boolean; directIdempotencyKey: string; signal?: AbortSignal; }): Promise; //#endregion //#region src/tasks/detached-task-runtime.d.ts declare function createRunningTaskRun(...args: Parameters): ReturnType; declare function recordTaskRunProgressByRunId(...args: Parameters): ReturnType; declare function finalizeTaskRunByRunId(params: DetachedTaskFinalizeParams): TaskRecord[]; declare function setDetachedTaskDeliveryStatusByRunId(...args: Parameters): ReturnType; //#endregion //#region src/plugin-sdk/agent-harness-task-runtime.d.ts type AgentHarnessTaskRuntimeId = Parameters[0]["runtime"]; type CreateRunningTaskRunParams = Parameters[0]; type RecordTaskRunProgressParams = Parameters[0]; type FinalizeTaskRunParams = Parameters[0]; type SetDeliveryStatusParams = Parameters[0]; /** Scope and naming options used to bind task operations to one requester session. */ type AgentHarnessTaskRuntimeScopeParams = { runtime: AgentHarnessTaskRuntimeId; scope: AgentHarnessTaskRuntimeScope; taskKind?: string; runIdPrefix?: string; }; /** Create-task params with runtime and requester scope supplied by the scoped task runtime. */ type AgentHarnessScopedCreateRunningTaskRunParams = Omit & { runId: string; }; /** Progress params scoped to the requester session owned by the harness runtime. */ type AgentHarnessScopedRecordTaskRunProgressParams = Omit; /** Finalization params scoped to the requester session owned by the harness runtime. */ type AgentHarnessScopedFinalizeTaskRunParams = Omit; /** Delivery-status params scoped to the requester session owned by the harness runtime. */ type AgentHarnessScopedSetDeliveryStatusParams = Omit; /** Scoped task runtime that prevents callers from mutating tasks outside their harness scope. */ type AgentHarnessTaskRuntime = { createRunningTaskRun(params: AgentHarnessScopedCreateRunningTaskRunParams): TaskRecord; tryCreateRunningTaskRun(params: AgentHarnessScopedCreateRunningTaskRunParams): TaskRecord | null; recordTaskRunProgressByRunId(params: AgentHarnessScopedRecordTaskRunProgressParams): TaskRecord[]; finalizeTaskRunByRunId(params: AgentHarnessScopedFinalizeTaskRunParams): TaskRecord[]; setDetachedTaskDeliveryStatusByRunId(params: AgentHarnessScopedSetDeliveryStatusParams): TaskRecord[]; listTaskRecords(): TaskRecord[]; }; /** Completion states a harness task can report to its requester. */ type AgentHarnessCompletionStatus = "succeeded" | "failed" | "cancelled"; /** Delivery result returned after routing a harness task completion announcement. */ type AgentHarnessCompletionDelivery = Awaited>; /** Creates a task runtime whose run ids and task records are constrained to one scope. */ declare function createAgentHarnessTaskRuntime(params: AgentHarnessTaskRuntimeScopeParams): AgentHarnessTaskRuntime; /** Delivers a completed harness task result back to the requester or parent session. */ declare function deliverAgentHarnessTaskCompletion(params: { scope: AgentHarnessTaskRuntimeScope; childSessionKey: string; childSessionId: string; announceId: string; status: AgentHarnessCompletionStatus; statusLabel?: string; result: string; taskLabel?: string; announceType?: string; replyInstruction?: string; signal?: AbortSignal; }): Promise; /** Returns true when completion delivery reached a persistent direct or steered path. */ declare function isDurableAgentHarnessCompletionDelivery(delivery: AgentHarnessCompletionDelivery): boolean; //#endregion export { AgentHarnessCompletionDelivery, AgentHarnessCompletionStatus, AgentHarnessScopedCreateRunningTaskRunParams, AgentHarnessScopedFinalizeTaskRunParams, AgentHarnessScopedRecordTaskRunProgressParams, AgentHarnessScopedSetDeliveryStatusParams, type TaskRecord as AgentHarnessTaskRecord, AgentHarnessTaskRuntime, type AgentHarnessTaskRuntimeScope, AgentHarnessTaskRuntimeScopeParams, createAgentHarnessTaskRuntime, deliverAgentHarnessTaskCompletion, isDurableAgentHarnessCompletionDelivery };