@didim365/agent-cli-core 0.2.25 → 0.2.26
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.
- package/dist/src/config/config.d.ts +8 -3
- package/dist/src/config/config.js +66 -15
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/confirmation-bus/types.d.ts +4 -0
- package/dist/src/confirmation-bus/types.js.map +1 -1
- package/dist/src/core/prompts.js +29 -27
- package/dist/src/core/prompts.js.map +1 -1
- package/dist/src/generated/git-commit.d.ts +1 -1
- package/dist/src/generated/git-commit.js +1 -1
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.js +0 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/tools/ask-user.d.ts +2 -0
- package/dist/src/tools/ask-user.js +36 -0
- package/dist/src/tools/ask-user.js.map +1 -1
- package/dist/src/tools/task-create.d.ts +21 -0
- package/dist/src/tools/task-create.js +92 -0
- package/dist/src/tools/task-create.js.map +1 -0
- package/dist/src/tools/task-get.d.ts +18 -0
- package/dist/src/tools/task-get.js +66 -0
- package/dist/src/tools/task-get.js.map +1 -0
- package/dist/src/tools/task-list.d.ts +16 -0
- package/dist/src/tools/task-list.js +53 -0
- package/dist/src/tools/task-list.js.map +1 -0
- package/dist/src/tools/task-store.d.ts +78 -0
- package/dist/src/tools/task-store.js +267 -0
- package/dist/src/tools/task-store.js.map +1 -0
- package/dist/src/tools/task-update.d.ts +26 -0
- package/dist/src/tools/task-update.js +217 -0
- package/dist/src/tools/task-update.js.map +1 -0
- package/dist/src/tools/tool-names.d.ts +5 -2
- package/dist/src/tools/tool-names.js +8 -2
- package/dist/src/tools/tool-names.js.map +1 -1
- package/package.json +1 -1
- package/dist/src/tools/write-todos.d.ts +0 -50
- package/dist/src/tools/write-todos.js +0 -194
- package/dist/src/tools/write-todos.js.map +0 -1
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
// --- Status transition rules ---
|
|
7
|
+
const VALID_TRANSITIONS = {
|
|
8
|
+
pending: ['in_progress', 'completed'],
|
|
9
|
+
in_progress: ['pending', 'completed'],
|
|
10
|
+
completed: [], // completed is terminal
|
|
11
|
+
};
|
|
12
|
+
// --- TaskStore class ---
|
|
13
|
+
export class TaskStore {
|
|
14
|
+
tasks = new Map();
|
|
15
|
+
nextId = 1;
|
|
16
|
+
/** Creates a new task with auto-incrementing string ID and 'pending' status. */
|
|
17
|
+
create(params) {
|
|
18
|
+
if (typeof params.subject !== 'string' || !params.subject.trim()) {
|
|
19
|
+
throw new Error('subject must be a non-empty string');
|
|
20
|
+
}
|
|
21
|
+
if (typeof params.description !== 'string' || !params.description.trim()) {
|
|
22
|
+
throw new Error('description must be a non-empty string');
|
|
23
|
+
}
|
|
24
|
+
if (params.activeForm !== undefined &&
|
|
25
|
+
typeof params.activeForm !== 'string') {
|
|
26
|
+
throw new Error('activeForm must be a string');
|
|
27
|
+
}
|
|
28
|
+
if (params.metadata !== undefined) {
|
|
29
|
+
if (params.metadata === null || typeof params.metadata !== 'object') {
|
|
30
|
+
throw new Error('metadata must be a non-null object');
|
|
31
|
+
}
|
|
32
|
+
try {
|
|
33
|
+
structuredClone(params.metadata);
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
throw new Error('metadata contains non-cloneable values');
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
const now = Date.now();
|
|
40
|
+
const task = {
|
|
41
|
+
id: String(this.nextId++),
|
|
42
|
+
subject: params.subject,
|
|
43
|
+
description: params.description,
|
|
44
|
+
status: 'pending',
|
|
45
|
+
activeForm: params.activeForm,
|
|
46
|
+
metadata: params.metadata ? structuredClone(params.metadata) : undefined,
|
|
47
|
+
blocks: [],
|
|
48
|
+
blockedBy: [],
|
|
49
|
+
createdAt: now,
|
|
50
|
+
updatedAt: now,
|
|
51
|
+
};
|
|
52
|
+
this.tasks.set(task.id, task);
|
|
53
|
+
return structuredClone(task);
|
|
54
|
+
}
|
|
55
|
+
/** Returns the task with the given ID, or null if not found. */
|
|
56
|
+
get(id) {
|
|
57
|
+
const task = this.tasks.get(id);
|
|
58
|
+
return task ? structuredClone(task) : null;
|
|
59
|
+
}
|
|
60
|
+
/** Updates task fields. Returns null if task not found, completed, or invalid. */
|
|
61
|
+
update(id, params) {
|
|
62
|
+
const task = this.tasks.get(id);
|
|
63
|
+
if (!task)
|
|
64
|
+
return null;
|
|
65
|
+
// Completed terminal guard: block ALL writes
|
|
66
|
+
if (task.status === 'completed')
|
|
67
|
+
return null;
|
|
68
|
+
// Input validation: reject empty strings and non-string types
|
|
69
|
+
if (params.subject !== undefined &&
|
|
70
|
+
(typeof params.subject !== 'string' || !params.subject.trim()))
|
|
71
|
+
return null;
|
|
72
|
+
if (params.description !== undefined &&
|
|
73
|
+
(typeof params.description !== 'string' || !params.description.trim()))
|
|
74
|
+
return null;
|
|
75
|
+
if (params.activeForm !== undefined &&
|
|
76
|
+
typeof params.activeForm !== 'string')
|
|
77
|
+
return null;
|
|
78
|
+
if (params.owner !== undefined && typeof params.owner !== 'string')
|
|
79
|
+
return null;
|
|
80
|
+
// Status transition: same-status = no-op, otherwise validate
|
|
81
|
+
if (params.status !== undefined && params.status !== task.status) {
|
|
82
|
+
if (!VALID_TRANSITIONS[task.status].includes(params.status)) {
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
task.status = params.status;
|
|
86
|
+
}
|
|
87
|
+
if (params.subject !== undefined)
|
|
88
|
+
task.subject = params.subject;
|
|
89
|
+
if (params.description !== undefined)
|
|
90
|
+
task.description = params.description;
|
|
91
|
+
if (params.activeForm !== undefined)
|
|
92
|
+
task.activeForm = params.activeForm;
|
|
93
|
+
if (params.owner !== undefined)
|
|
94
|
+
task.owner = params.owner;
|
|
95
|
+
// Merge metadata: pre-validate cloneability, then merge (null deletes keys)
|
|
96
|
+
if (params.metadata !== undefined) {
|
|
97
|
+
if (params.metadata === null || typeof params.metadata !== 'object') {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
try {
|
|
101
|
+
structuredClone(params.metadata);
|
|
102
|
+
}
|
|
103
|
+
catch {
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
if (!task.metadata)
|
|
107
|
+
task.metadata = {};
|
|
108
|
+
const clonedMetadata = structuredClone(params.metadata);
|
|
109
|
+
for (const [key, value] of Object.entries(clonedMetadata)) {
|
|
110
|
+
if (value === null) {
|
|
111
|
+
delete task.metadata[key];
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
task.metadata[key] = value;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
task.updatedAt = Date.now();
|
|
119
|
+
return structuredClone(task);
|
|
120
|
+
}
|
|
121
|
+
/** Deletes the task and cleans up all dependency references. */
|
|
122
|
+
delete(id) {
|
|
123
|
+
const task = this.tasks.get(id);
|
|
124
|
+
if (!task)
|
|
125
|
+
return false;
|
|
126
|
+
const now = Date.now();
|
|
127
|
+
// Clean up dependency references and update timestamps
|
|
128
|
+
for (const blockedId of task.blocks) {
|
|
129
|
+
const blocked = this.tasks.get(blockedId);
|
|
130
|
+
if (blocked) {
|
|
131
|
+
blocked.blockedBy = blocked.blockedBy.filter((bid) => bid !== id);
|
|
132
|
+
blocked.updatedAt = now;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
for (const blockerId of task.blockedBy) {
|
|
136
|
+
const blocker = this.tasks.get(blockerId);
|
|
137
|
+
if (blocker) {
|
|
138
|
+
blocker.blocks = blocker.blocks.filter((bid) => bid !== id);
|
|
139
|
+
blocker.updatedAt = now;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
this.tasks.delete(id);
|
|
143
|
+
return true;
|
|
144
|
+
}
|
|
145
|
+
/** Marks taskId as blocking each of the given blockedIds. Returns skipped targets with reasons. */
|
|
146
|
+
addBlocks(taskId, blockedIds) {
|
|
147
|
+
return this.addDependency(taskId, blockedIds, 'blocks');
|
|
148
|
+
}
|
|
149
|
+
/** Marks taskId as blocked by each of the given blockingIds. Returns skipped targets with reasons. */
|
|
150
|
+
addBlockedBy(taskId, blockingIds) {
|
|
151
|
+
return this.addDependency(taskId, blockingIds, 'blockedBy');
|
|
152
|
+
}
|
|
153
|
+
/** Returns IDs of non-completed tasks that block the given task. */
|
|
154
|
+
getOpenBlockers(taskId) {
|
|
155
|
+
const task = this.tasks.get(taskId);
|
|
156
|
+
if (!task)
|
|
157
|
+
return [];
|
|
158
|
+
return task.blockedBy.filter((blockerId) => {
|
|
159
|
+
const blocker = this.tasks.get(blockerId);
|
|
160
|
+
return blocker && blocker.status !== 'completed';
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
/** Returns summary of all tasks with only open (non-completed) blockers. */
|
|
164
|
+
list() {
|
|
165
|
+
const summaries = [];
|
|
166
|
+
for (const task of this.tasks.values()) {
|
|
167
|
+
summaries.push({
|
|
168
|
+
id: task.id,
|
|
169
|
+
subject: task.subject,
|
|
170
|
+
status: task.status,
|
|
171
|
+
owner: task.owner,
|
|
172
|
+
blockedBy: this.getOpenBlockers(task.id),
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
return summaries;
|
|
176
|
+
}
|
|
177
|
+
/** Converts all tasks to the existing Todo[] format for CLI TodoTray compatibility. */
|
|
178
|
+
toTodoList() {
|
|
179
|
+
const todos = [];
|
|
180
|
+
for (const task of this.tasks.values()) {
|
|
181
|
+
let description = task.subject;
|
|
182
|
+
if (task.status === 'in_progress' && task.activeForm) {
|
|
183
|
+
description = `${task.subject} — ${task.activeForm}`;
|
|
184
|
+
}
|
|
185
|
+
todos.push({ description, status: task.status });
|
|
186
|
+
}
|
|
187
|
+
return todos;
|
|
188
|
+
}
|
|
189
|
+
// --- Private helpers ---
|
|
190
|
+
/**
|
|
191
|
+
* Issue 5: Checks if adding taskId → targetId dependency in the given direction
|
|
192
|
+
* would create a cycle. Uses BFS traversal along the *forward* direction
|
|
193
|
+
* from targetId to see if it can reach taskId.
|
|
194
|
+
*
|
|
195
|
+
* Example: if direction='blocks' and we want to add "A blocks B",
|
|
196
|
+
* we check if B already (transitively) blocks A. If so, adding it creates a cycle.
|
|
197
|
+
*/
|
|
198
|
+
wouldCreateCycle(taskId, targetId, direction) {
|
|
199
|
+
// If we're adding "taskId blocks targetId", then the forward link on target
|
|
200
|
+
// goes from targetId → its own 'blocks' list. We check if targetId can reach
|
|
201
|
+
// taskId by traversing 'blocks' (the same direction).
|
|
202
|
+
const visited = new Set();
|
|
203
|
+
const queue = [targetId];
|
|
204
|
+
while (queue.length > 0) {
|
|
205
|
+
const current = queue.shift();
|
|
206
|
+
if (current === taskId)
|
|
207
|
+
return true; // Cycle detected
|
|
208
|
+
if (visited.has(current))
|
|
209
|
+
continue;
|
|
210
|
+
visited.add(current);
|
|
211
|
+
const currentTask = this.tasks.get(current);
|
|
212
|
+
if (!currentTask)
|
|
213
|
+
continue;
|
|
214
|
+
for (const next of currentTask[direction]) {
|
|
215
|
+
if (!visited.has(next)) {
|
|
216
|
+
queue.push(next);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
return false;
|
|
221
|
+
}
|
|
222
|
+
addDependency(taskId, targetIds, direction) {
|
|
223
|
+
const skipped = [];
|
|
224
|
+
const task = this.tasks.get(taskId);
|
|
225
|
+
if (!task)
|
|
226
|
+
return skipped;
|
|
227
|
+
if (task.status === 'completed')
|
|
228
|
+
return skipped;
|
|
229
|
+
const forward = direction; // e.g. 'blocks'
|
|
230
|
+
const reverse = direction === 'blocks' ? 'blockedBy' : 'blocks';
|
|
231
|
+
const now = Date.now();
|
|
232
|
+
for (const targetId of targetIds) {
|
|
233
|
+
if (targetId === taskId) {
|
|
234
|
+
skipped.push({ targetId, reason: 'self' });
|
|
235
|
+
continue;
|
|
236
|
+
}
|
|
237
|
+
const target = this.tasks.get(targetId);
|
|
238
|
+
if (!target) {
|
|
239
|
+
skipped.push({ targetId, reason: 'not_found' });
|
|
240
|
+
continue;
|
|
241
|
+
}
|
|
242
|
+
if (target.status === 'completed') {
|
|
243
|
+
skipped.push({ targetId, reason: 'completed_target' });
|
|
244
|
+
continue;
|
|
245
|
+
}
|
|
246
|
+
if (this.wouldCreateCycle(taskId, targetId, direction)) {
|
|
247
|
+
skipped.push({ targetId, reason: 'cycle' });
|
|
248
|
+
continue;
|
|
249
|
+
}
|
|
250
|
+
let changed = false;
|
|
251
|
+
if (!task[forward].includes(targetId)) {
|
|
252
|
+
task[forward].push(targetId);
|
|
253
|
+
changed = true;
|
|
254
|
+
}
|
|
255
|
+
if (!target[reverse].includes(taskId)) {
|
|
256
|
+
target[reverse].push(taskId);
|
|
257
|
+
changed = true;
|
|
258
|
+
}
|
|
259
|
+
if (changed) {
|
|
260
|
+
task.updatedAt = now;
|
|
261
|
+
target.updatedAt = now;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
return skipped;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
//# sourceMappingURL=task-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-store.js","sourceRoot":"","sources":["../../../src/tools/task-store.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAoDH,kCAAkC;AAElC,MAAM,iBAAiB,GAAqC;IAC1D,OAAO,EAAE,CAAC,aAAa,EAAE,WAAW,CAAC;IACrC,WAAW,EAAE,CAAC,SAAS,EAAE,WAAW,CAAC;IACrC,SAAS,EAAE,EAAE,EAAE,wBAAwB;CACxC,CAAC;AAEF,0BAA0B;AAE1B,MAAM,OAAO,SAAS;IACZ,KAAK,GAAG,IAAI,GAAG,EAAgB,CAAC;IAChC,MAAM,GAAG,CAAC,CAAC;IAEnB,gFAAgF;IAChF,MAAM,CAAC,MAAwB;QAC7B,IAAI,OAAO,MAAM,CAAC,OAAO,KAAK,QAAQ,IAAI,CAAC,MA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EAAE,CAAC,CAAC;gBAChD,SAAS;YACX,CAAC;YACD,IAAI,MAAM,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;gBAClC,OAAO,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC,CAAC;gBACvD,SAAS;YACX,CAAC;YACD,IAAI,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAC,EAAE,CAAC;gBACvD,OAAO,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;gBAC5C,SAAS;YACX,CAAC;YACD,IAAI,OAAO,GAAG,KAAK,CAAC;YACpB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;gBACtC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBAC7B,OAAO,GAAG,IAAI,CAAC;YACjB,CAAC;YACD,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;gBACtC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBAC7B,OAAO,GAAG,IAAI,CAAC;YACjB,CAAC;YACD,IAAI,OAAO,EAAE,CAAC;gBACZ,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC;gBACrB,MAAM,CAAC,SAAS,GAAG,GAAG,CAAC;YACzB,CAAC;QACH,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;CACF"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { ToolInvocation } from './tools.js';
|
|
7
|
+
import { BaseDeclarativeTool, type ToolResult } from './tools.js';
|
|
8
|
+
import type { MessageBus } from '../confirmation-bus/message-bus.js';
|
|
9
|
+
import type { TaskStore } from './task-store.js';
|
|
10
|
+
export interface TaskUpdateToolParams {
|
|
11
|
+
taskId: string;
|
|
12
|
+
status?: 'pending' | 'in_progress' | 'completed' | 'deleted';
|
|
13
|
+
subject?: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
activeForm?: string;
|
|
16
|
+
owner?: string;
|
|
17
|
+
metadata?: Record<string, unknown | null>;
|
|
18
|
+
addBlocks?: string[];
|
|
19
|
+
addBlockedBy?: string[];
|
|
20
|
+
}
|
|
21
|
+
export declare class TaskUpdateTool extends BaseDeclarativeTool<TaskUpdateToolParams, ToolResult> {
|
|
22
|
+
private readonly taskStore;
|
|
23
|
+
static readonly Name = "task_update";
|
|
24
|
+
constructor(taskStore: TaskStore, messageBus: MessageBus);
|
|
25
|
+
protected createInvocation(params: TaskUpdateToolParams, messageBus: MessageBus, _toolName?: string, _displayName?: string): ToolInvocation<TaskUpdateToolParams, ToolResult>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { BaseDeclarativeTool, BaseToolInvocation, Kind, } from './tools.js';
|
|
7
|
+
import { ToolErrorType } from './tool-error.js';
|
|
8
|
+
// --- Tool description ---
|
|
9
|
+
const TASK_UPDATE_DESCRIPTION = `Update an existing task's fields, status, dependencies, or delete it.
|
|
10
|
+
|
|
11
|
+
Use this tool to:
|
|
12
|
+
- Change task status: pending → in_progress → completed (completed is terminal)
|
|
13
|
+
- Update task fields: subject, description, activeForm, owner, metadata
|
|
14
|
+
- Manage dependencies: addBlocks (this task blocks others), addBlockedBy (this task is blocked by others)
|
|
15
|
+
- Delete a task: set status to "deleted" for physical removal
|
|
16
|
+
|
|
17
|
+
Parameters:
|
|
18
|
+
- taskId (required): The ID of the task to update
|
|
19
|
+
- status (optional): New status — 'pending', 'in_progress', 'completed', or 'deleted'
|
|
20
|
+
- subject (optional): Updated task title
|
|
21
|
+
- description (optional): Updated task description
|
|
22
|
+
- activeForm (optional): Updated spinner text for in_progress state
|
|
23
|
+
- owner (optional): Assign task to a sub-agent
|
|
24
|
+
- metadata (optional): Key-value data to merge (set key to null to delete it)
|
|
25
|
+
- addBlocks (optional): Array of task IDs that this task blocks
|
|
26
|
+
- addBlockedBy (optional): Array of task IDs that block this task`;
|
|
27
|
+
// --- Invocation ---
|
|
28
|
+
class TaskUpdateToolInvocation extends BaseToolInvocation {
|
|
29
|
+
taskStore;
|
|
30
|
+
constructor(params, taskStore, messageBus, _toolName, _toolDisplayName) {
|
|
31
|
+
super(params, messageBus, _toolName, _toolDisplayName);
|
|
32
|
+
this.taskStore = taskStore;
|
|
33
|
+
}
|
|
34
|
+
getDescription() {
|
|
35
|
+
if (this.params.status === 'deleted') {
|
|
36
|
+
return `Delete task ${this.params.taskId}`;
|
|
37
|
+
}
|
|
38
|
+
return `Update task ${this.params.taskId}`;
|
|
39
|
+
}
|
|
40
|
+
async execute(_signal, _updateOutput) {
|
|
41
|
+
const { taskId } = this.params;
|
|
42
|
+
// Handle delete
|
|
43
|
+
if (this.params.status === 'deleted') {
|
|
44
|
+
const deleted = this.taskStore.delete(taskId);
|
|
45
|
+
if (!deleted) {
|
|
46
|
+
const message = `Task ${taskId} not found.`;
|
|
47
|
+
return {
|
|
48
|
+
llmContent: message,
|
|
49
|
+
returnDisplay: message,
|
|
50
|
+
error: {
|
|
51
|
+
message,
|
|
52
|
+
type: ToolErrorType.INVALID_TOOL_PARAMS,
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
llmContent: JSON.stringify({
|
|
58
|
+
taskId,
|
|
59
|
+
status: 'deleted',
|
|
60
|
+
}),
|
|
61
|
+
returnDisplay: { todos: this.taskStore.toTodoList() },
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
// Build update params (exclude taskId, addBlocks, addBlockedBy)
|
|
65
|
+
const updateParams = {};
|
|
66
|
+
if (this.params.status !== undefined)
|
|
67
|
+
updateParams['status'] = this.params.status;
|
|
68
|
+
if (this.params.subject !== undefined)
|
|
69
|
+
updateParams['subject'] = this.params.subject;
|
|
70
|
+
if (this.params.description !== undefined)
|
|
71
|
+
updateParams['description'] = this.params.description;
|
|
72
|
+
if (this.params.activeForm !== undefined)
|
|
73
|
+
updateParams['activeForm'] = this.params.activeForm;
|
|
74
|
+
if (this.params.owner !== undefined)
|
|
75
|
+
updateParams['owner'] = this.params.owner;
|
|
76
|
+
if (this.params.metadata !== undefined)
|
|
77
|
+
updateParams['metadata'] = this.params.metadata;
|
|
78
|
+
// Apply field/status updates
|
|
79
|
+
const hasFieldUpdates = Object.keys(updateParams).length > 0;
|
|
80
|
+
if (hasFieldUpdates) {
|
|
81
|
+
const updated = this.taskStore.update(taskId, updateParams);
|
|
82
|
+
if (!updated) {
|
|
83
|
+
const message = `Failed to update task ${taskId}. Task may not exist or update may be invalid.`;
|
|
84
|
+
return {
|
|
85
|
+
llmContent: message,
|
|
86
|
+
returnDisplay: message,
|
|
87
|
+
error: {
|
|
88
|
+
message,
|
|
89
|
+
type: ToolErrorType.INVALID_TOOL_PARAMS,
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
// No field updates — verify task exists and is not completed
|
|
96
|
+
const task = this.taskStore.get(taskId);
|
|
97
|
+
if (!task) {
|
|
98
|
+
const message = `Task ${taskId} not found.`;
|
|
99
|
+
return {
|
|
100
|
+
llmContent: message,
|
|
101
|
+
returnDisplay: message,
|
|
102
|
+
error: {
|
|
103
|
+
message,
|
|
104
|
+
type: ToolErrorType.INVALID_TOOL_PARAMS,
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
if (task.status === 'completed') {
|
|
109
|
+
const message = `Task ${taskId} is completed and cannot be modified.`;
|
|
110
|
+
return {
|
|
111
|
+
llmContent: message,
|
|
112
|
+
returnDisplay: message,
|
|
113
|
+
error: {
|
|
114
|
+
message,
|
|
115
|
+
type: ToolErrorType.INVALID_TOOL_PARAMS,
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
// Apply dependency updates (skip if task is now completed)
|
|
121
|
+
const hasDeps = (this.params.addBlocks && this.params.addBlocks.length > 0) ||
|
|
122
|
+
(this.params.addBlockedBy && this.params.addBlockedBy.length > 0);
|
|
123
|
+
const currentTask = this.taskStore.get(taskId);
|
|
124
|
+
let warning;
|
|
125
|
+
const allSkipped = [];
|
|
126
|
+
if (hasDeps && currentTask.status === 'completed') {
|
|
127
|
+
warning =
|
|
128
|
+
'Dependencies were skipped because the task is completed. A completed task cannot have new dependencies.';
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
if (this.params.addBlocks) {
|
|
132
|
+
allSkipped.push(...this.taskStore.addBlocks(taskId, this.params.addBlocks));
|
|
133
|
+
}
|
|
134
|
+
if (this.params.addBlockedBy) {
|
|
135
|
+
allSkipped.push(...this.taskStore.addBlockedBy(taskId, this.params.addBlockedBy));
|
|
136
|
+
}
|
|
137
|
+
if (allSkipped.length > 0) {
|
|
138
|
+
const details = allSkipped
|
|
139
|
+
.map((s) => `${s.targetId}(${s.reason})`)
|
|
140
|
+
.join(', ');
|
|
141
|
+
warning = `Some dependency targets were skipped: ${details}`;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
// Return updated task state
|
|
145
|
+
const task = this.taskStore.get(taskId);
|
|
146
|
+
const response = {
|
|
147
|
+
taskId: task.id,
|
|
148
|
+
status: task.status,
|
|
149
|
+
subject: task.subject,
|
|
150
|
+
};
|
|
151
|
+
if (warning) {
|
|
152
|
+
response['warning'] = warning;
|
|
153
|
+
}
|
|
154
|
+
return {
|
|
155
|
+
llmContent: JSON.stringify(response),
|
|
156
|
+
returnDisplay: { todos: this.taskStore.toTodoList() },
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
// --- Tool class ---
|
|
161
|
+
export class TaskUpdateTool extends BaseDeclarativeTool {
|
|
162
|
+
taskStore;
|
|
163
|
+
static Name = 'task_update';
|
|
164
|
+
constructor(taskStore, messageBus) {
|
|
165
|
+
super(TaskUpdateTool.Name, 'TaskUpdate', TASK_UPDATE_DESCRIPTION, Kind.Other, {
|
|
166
|
+
type: 'object',
|
|
167
|
+
properties: {
|
|
168
|
+
taskId: {
|
|
169
|
+
type: 'string',
|
|
170
|
+
description: 'The ID of the task to update',
|
|
171
|
+
},
|
|
172
|
+
status: {
|
|
173
|
+
type: 'string',
|
|
174
|
+
description: 'New status for the task',
|
|
175
|
+
enum: ['pending', 'in_progress', 'completed', 'deleted'],
|
|
176
|
+
},
|
|
177
|
+
subject: {
|
|
178
|
+
type: 'string',
|
|
179
|
+
description: 'Updated task title',
|
|
180
|
+
},
|
|
181
|
+
description: {
|
|
182
|
+
type: 'string',
|
|
183
|
+
description: 'Updated task description',
|
|
184
|
+
},
|
|
185
|
+
activeForm: {
|
|
186
|
+
type: 'string',
|
|
187
|
+
description: 'Present continuous form shown in spinner when task is in_progress',
|
|
188
|
+
},
|
|
189
|
+
owner: {
|
|
190
|
+
type: 'string',
|
|
191
|
+
description: 'Assign task to a sub-agent',
|
|
192
|
+
},
|
|
193
|
+
metadata: {
|
|
194
|
+
type: 'object',
|
|
195
|
+
description: 'Key-value data to merge into task metadata. Set a key to null to delete it.',
|
|
196
|
+
},
|
|
197
|
+
addBlocks: {
|
|
198
|
+
type: 'array',
|
|
199
|
+
description: 'Array of task IDs that this task blocks (cannot start until this one completes)',
|
|
200
|
+
items: { type: 'string' },
|
|
201
|
+
},
|
|
202
|
+
addBlockedBy: {
|
|
203
|
+
type: 'array',
|
|
204
|
+
description: 'Array of task IDs that block this task (must complete before this one can start)',
|
|
205
|
+
items: { type: 'string' },
|
|
206
|
+
},
|
|
207
|
+
},
|
|
208
|
+
required: ['taskId'],
|
|
209
|
+
additionalProperties: false,
|
|
210
|
+
}, messageBus);
|
|
211
|
+
this.taskStore = taskStore;
|
|
212
|
+
}
|
|
213
|
+
createInvocation(params, messageBus, _toolName, _displayName) {
|
|
214
|
+
return new TaskUpdateToolInvocation(params, this.taskStore, messageBus, _toolName, _displayName);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
//# sourceMappingURL=task-update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-update.js","sourceRoot":"","sources":["../../../src/tools/task-update.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,IAAI,GAEL,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIhD,2BAA2B;AAE3B,MAAM,uBAAuB,GAAG;;;;;;;;;;;;;;;;;kEAiBkC,CAAC;AAgBnE,qBAAqB;AAErB,MAAM,wBAAyB,SAAQ,kBAGtC;IAGoB;IAFnB,YACE,MAA4B,EACX,SAAoB,EACrC,UAAsB,EACtB,SAAkB,EAClB,gBAAyB;QAEzB,KAAK,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,gBAAgB,CAAC,CAAC;QALtC,cAAS,GAAT,SAAS,CAAW;IAMvC,CAAC;IAED,cAAc;QACZ,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;YACrC,OAAO,eAAe,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QAC7C,CAAC;QACD,OAAO,eAAe,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;IAC7C,CAAC;IAED,KAAK,CAAC,OAAO,CACX,OAAoB,EACpB,aAAwC;QAExC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM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0B;iBACxC;gBACD,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,mEAAmE;iBACtE;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,4BAA4B;iBAC1C;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,6EAA6E;iBAChF;gBACD,SAAS,EAAE;oBACT,IAAI,EAAE,OAAO;oBACb,WAAW,EACT,iFAAiF;oBACnF,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;iBAC1B;gBACD,YAAY,EAAE;oBACZ,IAAI,EAAE,OAAO;oBACb,WAAW,EACT,kFAAkF;oBACpF,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;iBAC1B;aACF;YACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;YACpB,oBAAoB,EAAE,KAAK;SAC5B,EACD,UAAU,CACX,CAAC;QA3De,cAAS,GAAT,SAAS,CAAW;IA4DvC,CAAC;IAES,gBAAgB,CACxB,MAA4B,EAC5B,UAAsB,EACtB,SAAkB,EAClB,YAAqB;QAErB,OAAO,IAAI,wBAAwB,CACjC,MAAM,EACN,IAAI,CAAC,SAAS,EACd,UAAU,EACV,SAAS,EACT,YAAY,CACb,CAAC;IACJ,CAAC"}
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
export declare const GLOB_TOOL_NAME = "glob";
|
|
7
|
-
export declare const WRITE_TODOS_TOOL_NAME = "write_todos";
|
|
8
7
|
export declare const WRITE_FILE_TOOL_NAME = "write_file";
|
|
9
8
|
export declare const WEB_SEARCH_TOOL_NAME = "google_web_search";
|
|
10
9
|
export declare const WEB_FETCH_TOOL_NAME = "web_fetch";
|
|
@@ -19,12 +18,16 @@ export declare const GET_INTERNAL_DOCS_TOOL_NAME = "get_internal_docs";
|
|
|
19
18
|
export declare const ACTIVATE_SKILL_TOOL_NAME = "activate_skill";
|
|
20
19
|
export declare const EDIT_TOOL_NAMES: Set<string>;
|
|
21
20
|
export declare const ASK_USER_TOOL_NAME = "ask_user";
|
|
21
|
+
export declare const TASK_CREATE_TOOL_NAME = "task_create";
|
|
22
|
+
export declare const TASK_GET_TOOL_NAME = "task_get";
|
|
23
|
+
export declare const TASK_UPDATE_TOOL_NAME = "task_update";
|
|
24
|
+
export declare const TASK_LIST_TOOL_NAME = "task_list";
|
|
22
25
|
/** Prefix used for tools discovered via the toolDiscoveryCommand. */
|
|
23
26
|
export declare const DISCOVERED_TOOL_PREFIX = "discovered_tool_";
|
|
24
27
|
/**
|
|
25
28
|
* List of all built-in tool names.
|
|
26
29
|
*/
|
|
27
|
-
export declare const ALL_BUILTIN_TOOL_NAMES: readonly ["glob", "
|
|
30
|
+
export declare const ALL_BUILTIN_TOOL_NAMES: readonly ["glob", "write_file", "google_web_search", "web_fetch", "replace", "run_shell_command", "search_file_content", "read_many_files", "read_file", "list_directory", "save_memory", "activate_skill", "ask_user", "task_create", "task_get", "task_update", "task_list"];
|
|
28
31
|
/**
|
|
29
32
|
* Read-only tools available in Plan Mode.
|
|
30
33
|
* This list is used to dynamically generate the Plan Mode prompt,
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
// This prevents circular dependencies that can occur when other modules (like agents)
|
|
8
8
|
// need to reference a tool's name without importing the tool's implementation.
|
|
9
9
|
export const GLOB_TOOL_NAME = 'glob';
|
|
10
|
-
export const WRITE_TODOS_TOOL_NAME = 'write_todos';
|
|
11
10
|
export const WRITE_FILE_TOOL_NAME = 'write_file';
|
|
12
11
|
export const WEB_SEARCH_TOOL_NAME = 'google_web_search';
|
|
13
12
|
export const WEB_FETCH_TOOL_NAME = 'web_fetch';
|
|
@@ -22,6 +21,10 @@ export const GET_INTERNAL_DOCS_TOOL_NAME = 'get_internal_docs';
|
|
|
22
21
|
export const ACTIVATE_SKILL_TOOL_NAME = 'activate_skill';
|
|
23
22
|
export const EDIT_TOOL_NAMES = new Set([EDIT_TOOL_NAME, WRITE_FILE_TOOL_NAME]);
|
|
24
23
|
export const ASK_USER_TOOL_NAME = 'ask_user';
|
|
24
|
+
export const TASK_CREATE_TOOL_NAME = 'task_create';
|
|
25
|
+
export const TASK_GET_TOOL_NAME = 'task_get';
|
|
26
|
+
export const TASK_UPDATE_TOOL_NAME = 'task_update';
|
|
27
|
+
export const TASK_LIST_TOOL_NAME = 'task_list';
|
|
25
28
|
/** Prefix used for tools discovered via the toolDiscoveryCommand. */
|
|
26
29
|
export const DISCOVERED_TOOL_PREFIX = 'discovered_tool_';
|
|
27
30
|
/**
|
|
@@ -29,7 +32,6 @@ export const DISCOVERED_TOOL_PREFIX = 'discovered_tool_';
|
|
|
29
32
|
*/
|
|
30
33
|
export const ALL_BUILTIN_TOOL_NAMES = [
|
|
31
34
|
GLOB_TOOL_NAME,
|
|
32
|
-
WRITE_TODOS_TOOL_NAME,
|
|
33
35
|
WRITE_FILE_TOOL_NAME,
|
|
34
36
|
WEB_SEARCH_TOOL_NAME,
|
|
35
37
|
WEB_FETCH_TOOL_NAME,
|
|
@@ -42,6 +44,10 @@ export const ALL_BUILTIN_TOOL_NAMES = [
|
|
|
42
44
|
MEMORY_TOOL_NAME,
|
|
43
45
|
ACTIVATE_SKILL_TOOL_NAME,
|
|
44
46
|
ASK_USER_TOOL_NAME,
|
|
47
|
+
TASK_CREATE_TOOL_NAME,
|
|
48
|
+
TASK_GET_TOOL_NAME,
|
|
49
|
+
TASK_UPDATE_TOOL_NAME,
|
|
50
|
+
TASK_LIST_TOOL_NAME,
|
|
45
51
|
];
|
|
46
52
|
/**
|
|
47
53
|
* Read-only tools available in Plan Mode.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-names.js","sourceRoot":"","sources":["../../../src/tools/tool-names.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,wCAAwC;AACxC,sFAAsF;AACtF,+EAA+E;AAE/E,MAAM,CAAC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