import { c as TaskAction, d as TaskDetails, f as TaskDocument, m as TaskMutationParams, t as AssignmentSummary } from "./task-hLh4BOO7.mjs"; import { r as Op } from "./index-DIpc6_uJ.mjs"; //#region src/services/taskResult/index.d.ts declare const MSG_ALL_COMPLETE_CLEAR = "All tasks are completed. Review the full task list once more, then close it with task {\"action\":\"clear\"}."; /** * Steering for a mixed batch. Unlike a batch of spawned subagents, a failed * entry here had no side effect at all, so retrying the failures is the safe * move and the model must be told so or it will do nothing. The hazard is the * other half: resending an applied create would make a second task. */ declare const MSG_UPSERT_PARTIAL = "The applied entries are committed. Resend only the failed entries, corrected — a failed entry changed nothing, so a corrected retry is safe. Do not resend an entry that already applied: an entry without an id creates a second task."; declare const MSG_UPSERT_NONE_APPLIED = "No task changed, so the whole call can be resent once corrected."; declare const MSG_ASSIGN_PARTIAL = "Successful assignments are already running. Retry only the failed entries after correcting their task state or arguments; do not resend successful entries."; interface AssignmentItemResult { index: number; id: number; agent: string; ok: boolean; message: string; } /** LLM-facing report for a native assignment batch. */ declare function formatAssignmentResults(items: readonly AssignmentItemResult[]): string; /** * The thrown message when an upsert applied nothing. Kept separate from * `formatContent` because the caller wraps it in the actionable Options block * rather than returning it as a successful result. */ declare function formatUpsertFailureText(op: Extract): string; /** * Pure formatter: `(op, document) -> string`. The switch is closed over `Op`, * so a new reducer variant fails to compile until it is handled here. */ declare function formatContent(op: Op, document: TaskDocument): string; interface ToolResult { content: Array<{ type: 'text'; text: string; }>; details: TaskDetails; } /** Build the LLM-facing envelope. `details` carries the post-mutation snapshot. */ declare function buildToolResult(action: TaskAction, params: TaskMutationParams, document: TaskDocument, op: Op): ToolResult; /** Envelope for a native assignment batch, including ids used by the consolidated TUI result. */ declare function buildAssignmentResult(params: TaskMutationParams, document: TaskDocument, text: string, assignment: AssignmentSummary): ToolResult; /** Envelope for delegation actions, which do not flow through the reducer. */ declare function buildTextResult(action: TaskAction, params: TaskMutationParams, document: TaskDocument, text: string, error?: string): ToolResult; //#endregion export { MSG_UPSERT_PARTIAL as a, buildTextResult as c, formatContent as d, formatUpsertFailureText as f, MSG_UPSERT_NONE_APPLIED as i, buildToolResult as l, MSG_ALL_COMPLETE_CLEAR as n, ToolResult as o, MSG_ASSIGN_PARTIAL as r, buildAssignmentResult as s, AssignmentItemResult as t, formatAssignmentResults as u }; //# sourceMappingURL=index-C3DgOhEm.d.mts.map