import { TaskAction } from "../models/task.cjs"; import { COMMAND_NAME } from "../constants/task.cjs"; import { Static, Type } from "typebox"; //#region src/schemas/task.d.ts export declare const TASK_ACTIONS: readonly ['upsert', 'list', 'get', 'delete', 'clear', 'assign', 'cancel']; export declare const TASK_STATUSES: readonly ['pending', 'in_progress', 'completed', 'failed', 'deleted']; export declare const TASK_CONTEXTS: readonly ['fresh', 'fork']; export declare const TOOL_NAME = "task"; export declare const TOOL_LABEL = "Task"; export declare const ERR_REQUIRES_INTERACTIVE = "/tasks requires interactive mode"; export declare const MSG_NO_TASKS = "No tasks yet. Ask the agent to add some!"; /** * Which top-level fields each action accepts. * * The params object is flat and shared across every action, so the schema alone * cannot express "upsert has no top-level id". That gap matters: a call like * `{"action":"upsert","id":3,"tasks":[{"status":"completed"}]}` would otherwise * silently create a duplicate task, because the entry itself carries no id. */ export declare const TASK_ACTION_FIELDS: { readonly upsert: readonly ["action", "tasks"]; readonly list: readonly ["action", "status", "includeDeleted"]; readonly get: readonly ["action", "id"]; readonly delete: readonly ["action", "id"]; readonly clear: readonly ["action"]; readonly assign: readonly ["action", "assignments"]; readonly cancel: readonly ["action", "id"]; }; export declare function taskActionAcceptsField(action: TaskAction, field: string): boolean; /** Correction hint appended when a per-task field lands at the top level. */ export declare const MSG_UPSERT_FIELD_MISPLACED = "Per-task fields belong inside each tasks[] entry, not at the top level: {\"action\":\"upsert\",\"tasks\":[{\"id\":3,\"status\":\"completed\"}]}."; /** * One entry of an upsert. `additionalProperties: false` is load-bearing: pi * validates tool arguments against this schema before `execute` runs, so a * stray `{"action":"update"}` inside an entry is rejected at the boundary. */ export declare const TaskItemSchema: Type.TObject<{ id: Type.TOptional; ref: Type.TOptional; subject: Type.TOptional; description: Type.TOptional; activeForm: Type.TOptional; status: Type.TOptional; blockedBy: Type.TOptional>>; addBlockedBy: Type.TOptional>>; removeBlockedBy: Type.TOptional>>; owner: Type.TOptional; metadata: Type.TOptional>; }>; /** One task-to-agent handoff in a native assignment batch. */ export declare const TaskAssignmentSchema: Type.TObject<{ id: Type.TInteger; agent: Type.TString; inlineAgent: Type.TOptional>; instructions: Type.TOptional; relevantFiles: Type.TOptional>; priorFindings: Type.TOptional; model: Type.TOptional; context: Type.TOptional; }>; /** * Tool parameters. Every `description` doubles as LLM-facing prompt copy, so * wording changes here change model behaviour. */ export declare const TaskParamsSchema: Type.TObject<{ action: Type.TString; tasks: Type.TOptional; ref: Type.TOptional; subject: Type.TOptional; description: Type.TOptional; activeForm: Type.TOptional; status: Type.TOptional; blockedBy: Type.TOptional>>; addBlockedBy: Type.TOptional>>; removeBlockedBy: Type.TOptional>>; owner: Type.TOptional; metadata: Type.TOptional>; }>>>; assignments: Type.TOptional>; instructions: Type.TOptional; relevantFiles: Type.TOptional>; priorFindings: Type.TOptional; model: Type.TOptional; context: Type.TOptional; }>>>; id: Type.TOptional; status: Type.TOptional; includeDeleted: Type.TOptional; }>; export type TaskItemParams = Static; export type TaskAssignmentParams = Static; export type TaskParams = Static; //#endregion export { COMMAND_NAME }; //# sourceMappingURL=task.d.cts.map