qlogicagent 2.1.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/agent.js +10 -9
  2. package/dist/cli.js +227 -209
  3. package/dist/contracts.js +1 -1
  4. package/dist/index.js +226 -208
  5. package/dist/orchestration.js +13 -12
  6. package/dist/types/agent/constants.d.ts +4 -53
  7. package/dist/types/agent/tunable-defaults.d.ts +221 -0
  8. package/dist/types/agent/types.d.ts +3 -1
  9. package/dist/types/cli/stdio-server.d.ts +52 -1
  10. package/dist/types/cli/tool-bootstrap.d.ts +8 -0
  11. package/dist/types/contracts/index.d.ts +0 -1
  12. package/dist/types/contracts/todo.d.ts +8 -21
  13. package/dist/types/llm/adapters/aliyun-oss-file-upload-adapter.d.ts +44 -0
  14. package/dist/types/llm/adapters/gemini-file-upload-adapter.d.ts +26 -0
  15. package/dist/types/llm/adapters/hub-oss-file-upload-adapter.d.ts +29 -0
  16. package/dist/types/llm/adapters/index.d.ts +10 -0
  17. package/dist/types/llm/adapters/openai-file-upload-adapter.d.ts +38 -0
  18. package/dist/types/llm/adapters/volcengine-file-upload-adapter.d.ts +24 -0
  19. package/dist/types/llm/file-upload-service.d.ts +68 -0
  20. package/dist/types/llm/transports/anthropic-messages.d.ts +4 -0
  21. package/dist/types/llm/transports/gemini-generatecontent.d.ts +4 -0
  22. package/dist/types/llm/transports/media-resolve.d.ts +37 -12
  23. package/dist/types/llm/transports/openai-chat.d.ts +4 -0
  24. package/dist/types/llm/transports/openai-responses.d.ts +3 -0
  25. package/dist/types/llm/transports/volcengine-responses.d.ts +4 -0
  26. package/dist/types/orchestration/skill-improvement.d.ts +39 -8
  27. package/dist/types/orchestration/subagent/fork-subagent.d.ts +2 -2
  28. package/dist/types/orchestration/tool-loop/tool-schema.d.ts +1 -0
  29. package/dist/types/protocol/methods.d.ts +70 -0
  30. package/dist/types/protocol/notifications.d.ts +61 -0
  31. package/dist/types/runtime/execution/dream-category-context.d.ts +1 -1
  32. package/dist/types/runtime/hooks/memory-hooks.d.ts +0 -3
  33. package/dist/types/runtime/hooks/skill-recall-hooks.d.ts +2 -4
  34. package/dist/types/runtime/infra/agent-paths.d.ts +6 -0
  35. package/dist/types/runtime/infra/index.d.ts +3 -1
  36. package/dist/types/runtime/infra/media-persistence.d.ts +71 -0
  37. package/dist/types/runtime/infra/project-instructions-store.d.ts +30 -0
  38. package/dist/types/runtime/infra/project-plan-store.d.ts +27 -0
  39. package/dist/types/runtime/infra/project-store.d.ts +36 -0
  40. package/dist/types/runtime/infra/skill-injector.d.ts +9 -2
  41. package/dist/types/skills/index.d.ts +2 -4
  42. package/dist/types/skills/memory/categories.d.ts +5 -0
  43. package/dist/types/skills/memory/memdir.d.ts +6 -1
  44. package/dist/types/skills/memory/recall-category-filter.d.ts +1 -1
  45. package/dist/types/skills/permissions/group-security-policy.d.ts +15 -0
  46. package/dist/types/skills/permissions/index.d.ts +1 -0
  47. package/dist/types/skills/plugins/plugin-loader.d.ts +5 -0
  48. package/dist/types/skills/portable-tool.d.ts +13 -2
  49. package/dist/types/skills/skill-system/skill-source.d.ts +65 -0
  50. package/dist/types/skills/tools/plan-mode-tool.d.ts +1 -1
  51. package/dist/types/skills/tools/read-tool.d.ts +2 -2
  52. package/dist/types/skills/tools/task-tool.d.ts +64 -75
  53. package/dist/types/transport/acp-server.d.ts +2 -0
  54. package/package.json +1 -1
  55. package/dist/types/contracts/planner.d.ts +0 -35
  56. package/dist/types/orchestration/error-handling/failover-error.d.ts +0 -33
  57. package/dist/types/skills/memory/memory-write-gate.d.ts +0 -46
  58. package/dist/types/skills/memory/memory-write-hook.d.ts +0 -44
  59. package/dist/types/skills/todo-tool.d.ts +0 -72
@@ -60,6 +60,33 @@ export interface SkillStorageDeps {
60
60
  /** Write the registry lock file. */
61
61
  writeLockfile(lockfile: SkillLockfile): Promise<void>;
62
62
  }
63
+ /**
64
+ * A single version history entry for a skill.
65
+ */
66
+ export interface SkillVersionEntry {
67
+ version: string;
68
+ updatedAt: string;
69
+ changelog?: string;
70
+ /** Integrity hash of the SKILL.md content at this version (sha256). */
71
+ integrity?: string;
72
+ }
73
+ /**
74
+ * Usage statistics for a skill.
75
+ */
76
+ export interface SkillUsageStats {
77
+ /** Total number of times this skill has been invoked/applied. */
78
+ invokeCount: number;
79
+ /** Number of turns where the skill was active and contributed. */
80
+ activeCount: number;
81
+ /** Number of times the skill received positive feedback. */
82
+ positiveCount: number;
83
+ /** Number of times the skill received negative feedback. */
84
+ negativeCount: number;
85
+ /** ISO 8601 timestamp of last use. */
86
+ lastUsedAt?: string;
87
+ /** Derived success rate = (invokeCount - negativeCount) / invokeCount */
88
+ successRate?: number;
89
+ }
63
90
  /**
64
91
  * Single entry in the skill lockfile.
65
92
  */
@@ -71,6 +98,12 @@ export interface SkillLockEntry {
71
98
  scanSummary?: SkillScanSummary;
72
99
  /** Integrity hash of the SKILL.md content (sha256). */
73
100
  integrity?: string;
101
+ /** Current version (from frontmatter or auto-incremented). */
102
+ currentVersion?: string;
103
+ /** Version history — newest first. */
104
+ versionHistory?: SkillVersionEntry[];
105
+ /** Usage statistics. */
106
+ usage?: SkillUsageStats;
74
107
  }
75
108
  /**
76
109
  * Complete lockfile for all installed skills.
@@ -79,6 +112,38 @@ export interface SkillLockfile {
79
112
  version: 1;
80
113
  entries: Record<string, SkillLockEntry>;
81
114
  }
115
+ /**
116
+ * Record a skill usage event. Mutates the lockfile entry in-place.
117
+ */
118
+ export declare function recordSkillUsage(lockfile: SkillLockfile, skillName: string, feedback?: "positive" | "negative" | null): void;
119
+ /**
120
+ * Record a skill version update. Pushes current version to history.
121
+ */
122
+ export declare function recordSkillVersionUpdate(lockfile: SkillLockfile, skillName: string, newVersion: string, changelog?: string, integrity?: string): void;
123
+ /**
124
+ * Lightweight per-skill stats stored in `~/.qlogicagent/skill-stats.json`.
125
+ * This is independent of the lockfile — covers learned, promoted, and installed skills.
126
+ */
127
+ export interface SkillStatsFile {
128
+ [skillName: string]: SkillUsageStats;
129
+ }
130
+ /**
131
+ * Record a skill invocation. Fire-and-forget — never throws.
132
+ * @param agentHome - path to `~/.qlogicagent/`
133
+ * @param skillName - the skill that was invoked
134
+ * @param success - whether the invocation completed without error
135
+ */
136
+ export declare function trackSkillInvocation(agentHome: string, skillName: string, success: boolean): void;
137
+ /**
138
+ * Read stats for a skill. Returns undefined if no stats recorded.
139
+ */
140
+ export declare function getSkillStats(agentHome: string, skillName: string): SkillUsageStats | undefined;
141
+ /**
142
+ * Get all skill stats. Useful for UI display.
143
+ */
144
+ export declare function getAllSkillStats(agentHome: string): SkillStatsFile;
145
+ /** Reset cache (for testing). */
146
+ export declare function resetStatsCache(): void;
82
147
  /**
83
148
  * Result of a skill install operation.
84
149
  */
@@ -54,7 +54,7 @@ export declare const PLAN_MODE_TOOL_SCHEMA: {
54
54
  };
55
55
  readonly required: readonly ["action"];
56
56
  };
57
- /** Tools allowed during plan mode (read-only + reasoning) */
57
+ /** Tools allowed during plan mode (read-only + reasoning + task tracking) */
58
58
  export declare const PLAN_MODE_ALLOWED_TOOLS: readonly string[];
59
59
  export interface PlanModeState {
60
60
  active: boolean;
@@ -26,13 +26,13 @@ export declare const READ_TOOL_SCHEMA: {
26
26
  export type ReadResultType = "text" | "image" | "binary_rejected";
27
27
  /** Deps injected by the host runtime for file reading. */
28
28
  export interface ReadToolDeps {
29
- /** Read file content. Return string for text, base64 for images, or rejection. */
29
+ /** Read file content. Return string for text, image path for images, or rejection. */
30
30
  readFile(path: string): Promise<{
31
31
  type: "text";
32
32
  text: string;
33
33
  } | {
34
34
  type: "image";
35
- base64: string;
35
+ localPath: string;
36
36
  mimeType: string;
37
37
  } | {
38
38
  type: "binary";
@@ -1,104 +1,93 @@
1
1
  import type { PortableTool } from "../portable-tool.js";
2
2
  export declare const TASK_TOOL_NAME: "task";
3
- export type TaskAction = "create" | "get" | "list" | "output" | "stop";
4
- export type TaskStatus = "pending" | "running" | "completed" | "failed" | "stopped";
3
+ export declare const TASK_ACTIONS: readonly ["create", "update", "delete", "list", "get"];
4
+ export type TaskAction = (typeof TASK_ACTIONS)[number];
5
+ export type TaskStatus = "not-started" | "in-progress" | "completed";
6
+ export declare const TASK_STATUS_VALUES: readonly TaskStatus[];
7
+ export interface TaskItem {
8
+ id: number;
9
+ title: string;
10
+ status: TaskStatus;
11
+ description?: string;
12
+ owner?: string;
13
+ blockedBy?: number[];
14
+ blocks?: number[];
15
+ }
16
+ export interface TaskListSummary {
17
+ total: number;
18
+ completed: number;
19
+ inProgress: number;
20
+ notStarted: number;
21
+ blocked: number;
22
+ }
5
23
  export interface TaskToolParams {
6
24
  action: TaskAction;
7
- /** Task ID (required for get/output/stop) */
8
- taskId?: string;
9
- /** Task prompt (required for create) */
10
- prompt?: string;
11
- /** Short description (3-7 words, for create) */
25
+ id?: number;
26
+ title?: string;
12
27
  description?: string;
13
- /** Allowed tools for the background agent */
14
- allowedTools?: string[];
15
- /** Working directory for the task */
16
- cwd?: string;
17
- /** Model override for the task agent */
18
- model?: string;
19
- /** Max output lines to return (for output action, default 100) */
20
- maxLines?: number;
28
+ status?: TaskStatus;
29
+ owner?: string;
30
+ addBlocks?: number[];
31
+ addBlockedBy?: number[];
21
32
  }
22
33
  export declare const TASK_TOOL_SCHEMA: {
23
34
  readonly type: "object";
24
35
  readonly properties: {
25
36
  readonly action: {
26
37
  readonly type: "string";
27
- readonly enum: readonly ["create", "get", "list", "output", "stop"];
38
+ readonly enum: readonly ["create", "update", "delete", "list", "get"];
28
39
  readonly description: string;
29
40
  };
30
- readonly taskId: {
31
- readonly type: "string";
32
- readonly description: "Task ID. Required for get/output/stop.";
41
+ readonly id: {
42
+ readonly type: "number";
43
+ readonly description: "[update|delete|get] Task id to operate on.";
33
44
  };
34
- readonly prompt: {
45
+ readonly title: {
35
46
  readonly type: "string";
36
- readonly description: string;
47
+ readonly description: "[create|update] Task title (3-7 words, imperative form).";
37
48
  };
38
49
  readonly description: {
39
50
  readonly type: "string";
40
- readonly description: "Short (3-7 word) description of the task. Used for tracking and display.";
41
- };
42
- readonly allowedTools: {
43
- readonly type: "array";
44
- readonly items: {
45
- readonly type: "string";
46
- };
47
- readonly description: "Restrict background agent to only these tools. If omitted, inherits parent's tools.";
51
+ readonly description: "[create|update] Detailed task description.";
48
52
  };
49
- readonly cwd: {
53
+ readonly status: {
50
54
  readonly type: "string";
51
- readonly description: "Working directory for the background task (absolute path).";
55
+ readonly enum: readonly ["not-started", "in-progress", "completed"];
56
+ readonly description: "[create|update] Task status. create defaults to not-started.";
52
57
  };
53
- readonly model: {
58
+ readonly owner: {
54
59
  readonly type: "string";
55
- readonly description: "Model override for the task agent (e.g. 'sonnet', 'opus').";
60
+ readonly description: "[create|update] Owner agent/subagent identifier.";
56
61
  };
57
- readonly maxLines: {
58
- readonly type: "number";
59
- readonly description: "Max output lines to return for the 'output' action (default: 100).";
60
- readonly minimum: 1;
61
- readonly maximum: 2000;
62
+ readonly addBlocks: {
63
+ readonly type: "array";
64
+ readonly items: {
65
+ readonly type: "number";
66
+ };
67
+ readonly description: "[update] Task IDs that this task should block (they depend on this task).";
68
+ };
69
+ readonly addBlockedBy: {
70
+ readonly type: "array";
71
+ readonly items: {
72
+ readonly type: "number";
73
+ };
74
+ readonly description: "[update] Task IDs that should block this task (this task depends on them).";
62
75
  };
63
76
  };
64
77
  readonly required: readonly ["action"];
65
78
  };
66
- export interface TaskInfo {
67
- taskId: string;
68
- status: TaskStatus;
69
- description?: string;
70
- prompt?: string;
71
- createdAt: number;
72
- completedAt?: number;
73
- result?: string;
74
- error?: string;
75
- }
76
- export interface TaskResult {
77
- success: boolean;
78
- task?: TaskInfo;
79
- tasks?: TaskInfo[];
80
- output?: string;
81
- error?: string;
79
+ export interface TaskToolOptions {
80
+ /** Unique agent/session identifier for per-agent task isolation. */
81
+ agentId?: string;
82
+ /** Enable verification nudge (default: true). */
83
+ verificationNudge?: boolean;
82
84
  }
83
- /** Host-provided task management backend. */
84
- export interface TaskToolDeps {
85
- /** Create a new background agent task. Returns the created task info. */
86
- createTask(params: {
87
- prompt: string;
88
- description?: string;
89
- allowedTools?: string[];
90
- cwd?: string;
91
- model?: string;
92
- }): Promise<TaskInfo>;
93
- /** Get a task by ID. Returns null if not found. */
94
- getTask(taskId: string): Promise<TaskInfo | null>;
95
- /** List all tasks (optionally filtered by status). */
96
- listTasks(filter?: {
97
- status?: TaskStatus;
98
- }): Promise<TaskInfo[]>;
99
- /** Get output/logs from a task. */
100
- getTaskOutput(taskId: string, maxLines?: number): Promise<string>;
101
- /** Stop a running task. Returns true if stopped successfully. */
102
- stopTask(taskId: string): Promise<boolean>;
85
+ export interface TaskToolHooks {
86
+ onTaskCreated?: (task: TaskItem) => void;
87
+ onTaskCompleted?: (task: TaskItem) => void;
103
88
  }
104
- export declare function createTaskTool(deps: TaskToolDeps): PortableTool<TaskToolParams>;
89
+ export declare function summarizeTaskList(items: readonly TaskItem[]): TaskListSummary;
90
+ /**
91
+ * Create a stateful task tool instance (V2 — CC TaskCreate/Update/List/Get aligned).
92
+ */
93
+ export declare function createTaskTool(options?: TaskToolOptions, hooks?: TaskToolHooks): PortableTool<TaskToolParams>;
@@ -89,6 +89,8 @@ export declare class AcpServer {
89
89
  private activeSessionId;
90
90
  /** Pending permission requests (agent → host) waiting for response */
91
91
  private pendingPermissions;
92
+ /** Map from outbound JSON-RPC request id → permissionId for response matching */
93
+ private outboundRequestMap;
92
94
  constructor(transport: Transport, handler: AcpRequestHandler, config?: AcpServerConfig);
93
95
  /**
94
96
  * Route an incoming raw message through ACP protocol handling.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qlogicagent",
3
- "version": "2.1.0",
3
+ "version": "2.3.0",
4
4
  "description": "XiaozhiClaw Agent CLI — subprocess architecture (JSON-RPC over stdio)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,35 +0,0 @@
1
- export declare const TASK_STEP_STATUS_VALUES: readonly ["pending", "in-progress", "completed", "skipped"];
2
- export type TaskStepStatus = (typeof TASK_STEP_STATUS_VALUES)[number];
3
- export declare const TASK_PLAN_STATUS_VALUES: readonly ["active", "completed", "abandoned"];
4
- export type TaskPlanStatus = (typeof TASK_PLAN_STATUS_VALUES)[number];
5
- export interface TaskStep {
6
- index: number;
7
- description: string;
8
- status: TaskStepStatus;
9
- result?: string;
10
- }
11
- export interface TaskPlan {
12
- id: string;
13
- sessionId: string;
14
- userId: string;
15
- goal: string;
16
- steps: TaskStep[];
17
- status: TaskPlanStatus;
18
- createdAt: string;
19
- updatedAt: string;
20
- constraints?: string[];
21
- keyIdentifiers?: string[];
22
- }
23
- export interface TaskPlanContextSnippet {
24
- text: string;
25
- tokens: number;
26
- planId: string;
27
- }
28
- export interface TaskPlanProgressSnapshot {
29
- goal: string;
30
- steps: Array<{
31
- description: string;
32
- status: TaskStepStatus | string;
33
- result?: string;
34
- }>;
35
- }
@@ -1,33 +0,0 @@
1
- import { type FailoverReason } from "./failover-classification.js";
2
- export declare class FailoverError extends Error {
3
- readonly reason: FailoverReason;
4
- readonly provider?: string;
5
- readonly model?: string;
6
- readonly profileId?: string;
7
- readonly status?: number;
8
- readonly code?: string;
9
- constructor(message: string, params: {
10
- reason: FailoverReason;
11
- provider?: string;
12
- model?: string;
13
- profileId?: string;
14
- status?: number;
15
- code?: string;
16
- cause?: unknown;
17
- });
18
- }
19
- export declare function isFailoverError(err: unknown): err is FailoverError;
20
- export declare function resolveFailoverStatus(reason: FailoverReason): number | undefined;
21
- export declare function isTimeoutError(err: unknown): boolean;
22
- export declare function resolveFailoverReasonFromError(err: unknown): FailoverReason | null;
23
- export declare function describeFailoverError(err: unknown): {
24
- message: string;
25
- reason?: FailoverReason;
26
- status?: number;
27
- code?: string;
28
- };
29
- export declare function coerceToFailoverError(err: unknown, context?: {
30
- provider?: string;
31
- model?: string;
32
- profileId?: string;
33
- }): FailoverError | null;
@@ -1,46 +0,0 @@
1
- import type { MemorySearchResult } from "qlogicagent-runtime-contracts";
2
- /**
3
- * Memory categories for QMemory writes.
4
- * Each has different value thresholds and retention policies.
5
- */
6
- export type QMemoryCategory = "lesson" | "preference" | "pattern" | "fact" | "decision" | "skill-learning";
7
- /**
8
- * A candidate memory extracted from a turn.
9
- */
10
- export interface MemoryCandidate {
11
- text: string;
12
- category: QMemoryCategory;
13
- importance: number;
14
- tags: string[];
15
- }
16
- /**
17
- * Extract memory candidates from a completed turn.
18
- *
19
- * Strategy: scan assistant response for category signal patterns.
20
- * This is a fast pattern-based approach (no LLM call needed).
21
- * Only extracts segments that match high-value patterns.
22
- */
23
- export declare function extractCandidates(userPrompt: string, assistantResponse: string): MemoryCandidate[];
24
- /**
25
- * Quality gate: filter candidates by minimum importance threshold.
26
- */
27
- export declare function applyQualityGate(candidates: MemoryCandidate[], minImportance?: number): MemoryCandidate[];
28
- /**
29
- * Result of supersedes check for a single candidate.
30
- */
31
- export interface SupersedesCheckResult {
32
- candidate: MemoryCandidate;
33
- supersedes: string[];
34
- }
35
- /**
36
- * Check if candidates supersede existing memories.
37
- *
38
- * Strategy: for each candidate, search QMemory for semantically similar
39
- * existing entries. If similarity is high (>0.80) and the candidate is
40
- * newer/more specific, mark the old one for supersede.
41
- *
42
- * @param candidates - Memory candidates to check
43
- * @param existingSearch - Function to search existing memories
44
- * @returns Candidates with supersedes info
45
- */
46
- export declare function checkSupersedes(candidates: MemoryCandidate[], existingSearch: (query: string) => Promise<MemorySearchResult[]>): Promise<SupersedesCheckResult[]>;
@@ -1,44 +0,0 @@
1
- import type { MemorySearchResult } from "qlogicagent-runtime-contracts";
2
- import type { ExtractedMemoryItem } from "./qmemory-adapter.js";
3
- export declare const WRITE_HOOK_CONFIG: {
4
- /** Minimum importance to pass the quality gate. */
5
- readonly MIN_IMPORTANCE: 0.4;
6
- /** Max candidates to write per turn (prevent flood). */
7
- readonly MAX_PER_TURN: 3;
8
- /** Cooldown between writes (ms) — prevents rapid duplicate writes. */
9
- readonly COOLDOWN_MS: 5000;
10
- };
11
- export interface MemoryWriteHookDeps {
12
- /** Write extracted items to QMemory. */
13
- ingestExtracted: (items: ExtractedMemoryItem[], userId: string) => Promise<{
14
- memoriesAdded: number;
15
- }>;
16
- /** Search existing memories (for supersedes check). */
17
- searchMemories: (query: string, userId: string) => Promise<MemorySearchResult[]>;
18
- /** Remove a superseded memory by ID. */
19
- removeMemory?: (memoryId: string) => Promise<boolean>;
20
- /** User ID for QMemory writes. */
21
- userId: string;
22
- /** Logger. */
23
- log: {
24
- debug(msg: string): void;
25
- warn(msg: string): void;
26
- };
27
- }
28
- /** Per-session state for the write hook. */
29
- export interface MemoryWriteState {
30
- /** Timestamp of last write (for cooldown). */
31
- lastWriteAt: number;
32
- /** Total memories written this session (for budget). */
33
- sessionWrites: number;
34
- /** Recent write texts (for intra-session dedup). */
35
- recentTexts: Set<string>;
36
- }
37
- export declare function createMemoryWriteState(): MemoryWriteState;
38
- /**
39
- * Process a completed turn for memory-worthy content.
40
- * Called directly from stdio-server after turn.end (fire-and-forget).
41
- *
42
- * Pipeline: extract → gate → dedup → supersedes check → write.
43
- */
44
- export declare function processMemoryWriteGate(userPrompt: string, assistantResponse: string, deps: MemoryWriteHookDeps, state: MemoryWriteState): Promise<void>;
@@ -1,72 +0,0 @@
1
- import type { TodoItemStatus } from "../contracts/todo.js";
2
- import type { PortableTool } from "./portable-tool.js";
3
- export declare const TODO_TOOL_NAME: "todo";
4
- export declare const TODO_ACTIONS: readonly ["create", "update", "delete", "list"];
5
- export type TodoAction = (typeof TODO_ACTIONS)[number];
6
- export interface TodoToolParams {
7
- action: TodoAction;
8
- id?: number;
9
- title?: string;
10
- description?: string;
11
- status?: TodoItemStatus;
12
- owner?: string;
13
- addBlocks?: number[];
14
- addBlockedBy?: number[];
15
- }
16
- export declare const TODO_TOOL_SCHEMA: {
17
- readonly type: "object";
18
- readonly properties: {
19
- readonly action: {
20
- readonly type: "string";
21
- readonly enum: readonly ["create", "update", "delete", "list"];
22
- readonly description: string;
23
- };
24
- readonly id: {
25
- readonly type: "number";
26
- readonly description: "[update|delete] Task id to operate on.";
27
- };
28
- readonly title: {
29
- readonly type: "string";
30
- readonly description: "[create|update] Task title (3-7 words).";
31
- };
32
- readonly description: {
33
- readonly type: "string";
34
- readonly description: "[create|update] Detailed task description.";
35
- };
36
- readonly status: {
37
- readonly type: "string";
38
- readonly enum: readonly ["not-started", "in-progress", "completed"];
39
- readonly description: "[create|update] Task status. create defaults to not-started.";
40
- };
41
- readonly owner: {
42
- readonly type: "string";
43
- readonly description: "[create|update] Owner agent/subagent identifier.";
44
- };
45
- readonly addBlocks: {
46
- readonly type: "array";
47
- readonly items: {
48
- readonly type: "number";
49
- };
50
- readonly description: "[update] Task IDs that this task should block.";
51
- };
52
- readonly addBlockedBy: {
53
- readonly type: "array";
54
- readonly items: {
55
- readonly type: "number";
56
- };
57
- readonly description: "[update] Task IDs that should block this task.";
58
- };
59
- };
60
- readonly required: readonly ["action"];
61
- };
62
- /**
63
- * Configuration for todo tool behavior.
64
- */
65
- export interface TodoToolOptions {
66
- /** Unique agent/session identifier for per-agent todo isolation. */
67
- agentId?: string;
68
- }
69
- /**
70
- * Create a stateful todo tool instance (V2 — incremental CRUD).
71
- */
72
- export declare function createTodoTool(options?: TodoToolOptions): PortableTool<TodoToolParams>;