import type { ExtensionAPI } from "@earendil-works/pi-coding-agent"; import { Type } from "typebox"; import type { TaskDetail, TaskFilter, TaskId, TaskPriority, TaskSortDirection, TaskSortField, TaskStatus, TaskSummary } from "../domain/task"; import type { TaskService } from "../services/task-service"; interface TaskListToolParams { statuses?: TaskStatus[]; priorities?: TaskPriority[]; projectId?: string; query?: string; from?: string; to?: string; updatedFrom?: string; updatedTo?: string; label?: string; overdue?: boolean; today?: boolean; sort?: TaskSortField; sortDirection?: TaskSortDirection; timezone?: string; } interface TaskShowToolParams { taskId: TaskId; } interface TaskListToolDetails { kind: "task_list"; filter: TaskFilter; tasks: TaskSummary[]; total: number; empty: boolean; } interface TaskShowToolDetails { kind: "task_show"; taskId: TaskId; found: boolean; task?: TaskDetail; } interface TaskReadToolDependencies { getTaskService: () => Promise; } declare const createTaskListToolDefinition: ({ getTaskService }: TaskReadToolDependencies) => { name: string; label: string; description: string; promptSnippet: string; promptGuidelines: string[]; parameters: Type.TObject<{ statuses: Type.TOptional>>; priorities: Type.TOptional>>; projectId: Type.TOptional; query: Type.TOptional; from: Type.TOptional; to: Type.TOptional; updatedFrom: Type.TOptional; updatedTo: Type.TOptional; label: Type.TOptional; overdue: Type.TOptional; today: Type.TOptional; sort: Type.TOptional>; sortDirection: Type.TOptional>; timezone: Type.TOptional; }>; execute(_toolCallId: string, params: TaskListToolParams): Promise<{ content: { type: "text"; text: string; }[]; details: TaskListToolDetails; }>; }; declare const createTaskShowToolDefinition: ({ getTaskService }: TaskReadToolDependencies) => { name: string; label: string; description: string; promptSnippet: string; promptGuidelines: string[]; parameters: Type.TObject<{ taskId: Type.TString; }>; execute(_toolCallId: string, params: TaskShowToolParams): Promise<{ content: { type: "text"; text: string; }[]; details: TaskShowToolDetails; }>; }; declare const registerTaskReadTools: (pi: Pick, dependencies: TaskReadToolDependencies) => void; declare const normalizeTaskListFilter: (params: TaskListToolParams) => TaskFilter; declare const formatTaskListContent: (details: TaskListToolDetails) => string; declare const formatTaskShowContent: (task: TaskDetail) => string; export type { TaskListToolDetails, TaskShowToolDetails, TaskReadToolDependencies }; export { createTaskListToolDefinition, createTaskShowToolDefinition, formatTaskListContent, formatTaskShowContent, normalizeTaskListFilter, registerTaskReadTools, };