import { AssignmentSummary, TaskAction, TaskDetails, TaskDocument, TaskMutationParams } from "../../models/task.mjs"; import { Op } from "../reducer/index.mjs"; //#region src/services/taskResult/index.d.ts export 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. */ export 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."; export declare const MSG_UPSERT_NONE_APPLIED = "No task changed, so the whole call can be resent once corrected."; export 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."; export interface AssignmentItemResult { index: number; id: number; agent: string; ok: boolean; message: string; } /** LLM-facing report for a native assignment batch. */ export 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. */ export 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. */ export declare function formatContent(op: Op, document: TaskDocument): string; export interface ToolResult { content: Array<{ type: 'text'; text: string; }>; details: TaskDetails; } /** Build the LLM-facing envelope. `details` carries the post-mutation snapshot. */ export 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. */ export declare function buildAssignmentResult(params: TaskMutationParams, document: TaskDocument, text: string, assignment: AssignmentSummary): ToolResult; /** Envelope for delegation actions, which do not flow through the reducer. */ export declare function buildTextResult(action: TaskAction, params: TaskMutationParams, document: TaskDocument, text: string, error?: string): ToolResult; //#endregion //# sourceMappingURL=index.d.mts.map