@cleocode/contracts 2026.5.3 → 2026.5.5
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/index.d.ts +5 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lafs.d.ts +16 -143
- package/dist/lafs.d.ts.map +1 -1
- package/dist/lafs.js +11 -4
- package/dist/lafs.js.map +1 -1
- package/dist/operations/conduit.d.ts +15 -3
- package/dist/operations/conduit.d.ts.map +1 -1
- package/dist/operations/docs.d.ts +18 -15
- package/dist/operations/docs.d.ts.map +1 -1
- package/dist/operations/index.d.ts +5 -0
- package/dist/operations/index.d.ts.map +1 -1
- package/dist/operations/index.js +5 -0
- package/dist/operations/index.js.map +1 -1
- package/dist/operations/lifecycle.d.ts +3 -4
- package/dist/operations/lifecycle.d.ts.map +1 -1
- package/dist/operations/nexus.d.ts +341 -34
- package/dist/operations/nexus.d.ts.map +1 -1
- package/dist/operations/session.d.ts +201 -9
- package/dist/operations/session.d.ts.map +1 -1
- package/dist/operations/tasks.d.ts +381 -35
- package/dist/operations/tasks.d.ts.map +1 -1
- package/dist/operations/tasks.js +4 -3
- package/dist/operations/tasks.js.map +1 -1
- package/dist/tasks.d.ts +357 -0
- package/dist/tasks.d.ts.map +1 -0
- package/dist/tasks.js +18 -0
- package/dist/tasks.js.map +1 -0
- package/package.json +4 -2
- package/schemas/acceptance-gate.schema.json +484 -5
- package/schemas/attachment.schema.json +210 -5
- package/schemas/gate-result-details.schema.json +174 -5
- package/schemas/gate-result.schema.json +236 -5
- package/schemas/task-evidence.schema.json +199 -5
- package/schemas/task.schema.json +568 -5
- package/src/index.ts +37 -7
- package/src/lafs.ts +34 -162
- package/src/operations/conduit.ts +16 -3
- package/src/operations/docs.ts +22 -16
- package/src/operations/index.ts +5 -0
- package/src/operations/lifecycle.ts +3 -5
- package/src/operations/nexus.ts +355 -34
- package/src/operations/session.ts +213 -10
- package/src/operations/tasks.ts +377 -36
- package/src/tasks.ts +413 -0
package/src/operations/tasks.ts
CHANGED
|
@@ -9,21 +9,34 @@
|
|
|
9
9
|
* were removed in T1446 (T1435-W2). Use the dispatch-level types
|
|
10
10
|
* (`TasksAddParams`, `TasksUpdateQueryParams`, etc.) that appear in `TasksOps`.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
* src/
|
|
12
|
+
* Canonical type definitions live in the contracts package at:
|
|
13
|
+
* packages/contracts/src/task.ts (TaskStatus, TaskPriority, Task, etc.)
|
|
14
14
|
* These operation types are the API contract (wire format).
|
|
15
|
-
* Internal domain types
|
|
15
|
+
* Internal domain types import from the canonical location above.
|
|
16
16
|
*
|
|
17
17
|
* @task T1446 — strip redundant Params/Result aliases (T1435-W2)
|
|
18
|
+
* @task T1703 — Fill Result=unknown stubs with canonical typed shapes
|
|
18
19
|
*/
|
|
19
20
|
|
|
21
|
+
import type { ImpactReport } from '../facade.js';
|
|
22
|
+
import type { TaskAnalysisResult, TaskRef } from '../results.js';
|
|
20
23
|
/**
|
|
21
24
|
* Common task types (API contract — matches CLI src/types/task.ts)
|
|
22
25
|
*/
|
|
23
26
|
import type { TaskStatus } from '../status-registry.js';
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
import type { TaskPriority } from '../task.js';
|
|
28
|
+
import type { TaskRecord } from '../task-record.js';
|
|
29
|
+
import type { ExternalTask, ExternalTaskLink, ReconcileResult } from '../task-sync.js';
|
|
30
|
+
import type {
|
|
31
|
+
TaskComplexityFactor,
|
|
32
|
+
TaskDependsResult,
|
|
33
|
+
TaskLabelInfo,
|
|
34
|
+
TaskPlanResult,
|
|
35
|
+
TaskTreeNode,
|
|
36
|
+
TaskView,
|
|
37
|
+
} from '../tasks.js';
|
|
38
|
+
|
|
39
|
+
export type { TaskPriority, TaskStatus };
|
|
27
40
|
|
|
28
41
|
export interface TaskOp {
|
|
29
42
|
id: string;
|
|
@@ -132,21 +145,64 @@ export interface TasksShowParams {
|
|
|
132
145
|
/** When true, include IVTR phase history. */
|
|
133
146
|
ivtrHistory?: boolean;
|
|
134
147
|
}
|
|
135
|
-
|
|
148
|
+
/**
|
|
149
|
+
* Result of `tasks.show` — the full task record plus its canonical view
|
|
150
|
+
* projection. `view` is null when the task has no lifecycle pipeline.
|
|
151
|
+
*
|
|
152
|
+
* @task T1703
|
|
153
|
+
*/
|
|
154
|
+
export interface TasksShowResult {
|
|
155
|
+
/** Full task record (string-widened for dispatch layer serialization). */
|
|
156
|
+
task: TaskRecord;
|
|
157
|
+
/** Canonical task view projection produced by `computeTaskView`. Null when unavailable. */
|
|
158
|
+
view: TaskView | null;
|
|
159
|
+
}
|
|
136
160
|
|
|
137
161
|
// tasks.tree dispatch params (with optional withBlockers flag — dispatch alias)
|
|
138
162
|
export interface TasksTreeDispatchParams {
|
|
139
163
|
taskId?: string;
|
|
140
164
|
withBlockers?: boolean;
|
|
141
165
|
}
|
|
142
|
-
|
|
166
|
+
/**
|
|
167
|
+
* Result of `tasks.tree` — the hierarchical task tree.
|
|
168
|
+
*
|
|
169
|
+
* @task T1703
|
|
170
|
+
*/
|
|
171
|
+
export interface TasksTreeDispatchResult {
|
|
172
|
+
/** Hierarchical tree of task nodes. */
|
|
173
|
+
tree: TaskTreeNode[];
|
|
174
|
+
/** Total number of nodes (tasks) in the tree. */
|
|
175
|
+
totalNodes: number;
|
|
176
|
+
}
|
|
143
177
|
|
|
144
178
|
// tasks.blockers dispatch params (with optional analyze/limit)
|
|
145
179
|
export interface TasksBlockersQueryParams {
|
|
146
180
|
analyze?: boolean;
|
|
147
181
|
limit?: number;
|
|
148
182
|
}
|
|
149
|
-
|
|
183
|
+
/**
|
|
184
|
+
* Result of `tasks.blockers` — blocked tasks with blocking chain analysis.
|
|
185
|
+
*
|
|
186
|
+
* @task T1703
|
|
187
|
+
*/
|
|
188
|
+
export interface TasksBlockersQueryResult {
|
|
189
|
+
/** Tasks that are currently blocked. */
|
|
190
|
+
blockedTasks: Array<{
|
|
191
|
+
id: string;
|
|
192
|
+
title: string;
|
|
193
|
+
status: string;
|
|
194
|
+
depends?: string[];
|
|
195
|
+
blockingChain: string[];
|
|
196
|
+
}>;
|
|
197
|
+
/** Tasks that block the most other tasks (critical path). */
|
|
198
|
+
criticalBlockers: Array<{ id: string; title: string; blocksCount: number }>;
|
|
199
|
+
/** Human-readable summary of the blocking situation. */
|
|
200
|
+
summary: string;
|
|
201
|
+
/** Total number of blocked tasks. */
|
|
202
|
+
total: number;
|
|
203
|
+
/** Maximum number of blocked tasks returned. */
|
|
204
|
+
limit: number;
|
|
205
|
+
}
|
|
150
206
|
|
|
151
207
|
// tasks.depends (with action routing for overview/cycles)
|
|
152
208
|
export interface TasksDependsParams {
|
|
@@ -155,32 +211,77 @@ export interface TasksDependsParams {
|
|
|
155
211
|
tree?: boolean;
|
|
156
212
|
action?: 'overview' | 'cycles';
|
|
157
213
|
}
|
|
158
|
-
|
|
214
|
+
/**
|
|
215
|
+
* Result of `tasks.depends` — dependency analysis for a task or the full project.
|
|
216
|
+
*
|
|
217
|
+
* When `action='overview'` or `action='cycles'` is used, returns a different
|
|
218
|
+
* shape (overview or cycle-detection result). The base shape covers the
|
|
219
|
+
* per-task dependency analysis case.
|
|
220
|
+
*
|
|
221
|
+
* @task T1703
|
|
222
|
+
*/
|
|
223
|
+
export type TasksDependsResult = TaskDependsResult;
|
|
159
224
|
|
|
160
225
|
// tasks.analyze dispatch params (with optional taskId and tierLimit)
|
|
161
226
|
export interface TasksAnalyzeQueryParams {
|
|
162
227
|
taskId?: string;
|
|
163
228
|
tierLimit?: number;
|
|
164
229
|
}
|
|
165
|
-
|
|
230
|
+
/**
|
|
231
|
+
* Result of `tasks.analyze` — task quality analysis with tier breakdown.
|
|
232
|
+
*
|
|
233
|
+
* Extends `TaskAnalysisResult` (from contracts/results.ts) with the
|
|
234
|
+
* `tierLimit` used for the analysis.
|
|
235
|
+
*
|
|
236
|
+
* @task T1703
|
|
237
|
+
*/
|
|
238
|
+
export type TasksAnalyzeQueryResult = TaskAnalysisResult & { tierLimit: number };
|
|
166
239
|
|
|
167
240
|
// tasks.impact
|
|
168
241
|
export interface TasksImpactParams {
|
|
169
242
|
change: string;
|
|
170
243
|
matchLimit?: number;
|
|
171
244
|
}
|
|
172
|
-
|
|
245
|
+
/**
|
|
246
|
+
* Result of `tasks.impact` — impact prediction report for a free-text change.
|
|
247
|
+
*
|
|
248
|
+
* @task T1703
|
|
249
|
+
*/
|
|
250
|
+
export type TasksImpactResult = ImpactReport;
|
|
173
251
|
|
|
174
252
|
// tasks.next dispatch params (with count and explain)
|
|
175
253
|
export interface TasksNextQueryParams {
|
|
176
254
|
count?: number;
|
|
177
255
|
explain?: boolean;
|
|
178
256
|
}
|
|
179
|
-
|
|
257
|
+
/**
|
|
258
|
+
* Result of `tasks.next` — suggested tasks to work on next.
|
|
259
|
+
*
|
|
260
|
+
* @task T1703
|
|
261
|
+
*/
|
|
262
|
+
export interface TasksNextQueryResult {
|
|
263
|
+
/** Ranked list of suggested tasks. */
|
|
264
|
+
suggestions: Array<{
|
|
265
|
+
id: string;
|
|
266
|
+
title: string;
|
|
267
|
+
priority: string;
|
|
268
|
+
phase: string | null;
|
|
269
|
+
score: number;
|
|
270
|
+
/** Reasons this task is recommended. Only present when `explain: true`. */
|
|
271
|
+
reasons?: string[];
|
|
272
|
+
}>;
|
|
273
|
+
/** Total number of candidate tasks considered before ranking. */
|
|
274
|
+
totalCandidates: number;
|
|
275
|
+
}
|
|
180
276
|
|
|
181
277
|
// tasks.plan
|
|
182
278
|
export type TasksPlanParams = Record<string, never>;
|
|
183
|
-
|
|
279
|
+
/**
|
|
280
|
+
* Result of `tasks.plan` — composite planning view.
|
|
281
|
+
*
|
|
282
|
+
* @task T1703
|
|
283
|
+
*/
|
|
284
|
+
export type TasksPlanResult = TaskPlanResult;
|
|
184
285
|
|
|
185
286
|
// tasks.relates (with mode routing for suggest/discover)
|
|
186
287
|
export interface TasksRelatesParams {
|
|
@@ -188,55 +289,143 @@ export interface TasksRelatesParams {
|
|
|
188
289
|
mode?: 'suggest' | 'discover';
|
|
189
290
|
threshold?: number;
|
|
190
291
|
}
|
|
191
|
-
|
|
292
|
+
/**
|
|
293
|
+
* Result of `tasks.relates` — task relations list.
|
|
294
|
+
*
|
|
295
|
+
* @task T1703
|
|
296
|
+
*/
|
|
297
|
+
export interface TasksRelatesResult {
|
|
298
|
+
/** The task ID whose relations were loaded. */
|
|
299
|
+
taskId: string;
|
|
300
|
+
/** All relations for this task. */
|
|
301
|
+
relations: Array<{ taskId: string; type: string; reason?: string }>;
|
|
302
|
+
/** Total number of relations. */
|
|
303
|
+
count: number;
|
|
304
|
+
}
|
|
192
305
|
|
|
193
306
|
// tasks.complexity.estimate
|
|
194
307
|
export interface TasksComplexityEstimateParams {
|
|
195
308
|
taskId: string;
|
|
196
309
|
}
|
|
197
|
-
|
|
310
|
+
/**
|
|
311
|
+
* Result of `tasks.complexity.estimate` — complexity score breakdown.
|
|
312
|
+
*
|
|
313
|
+
* @task T1703
|
|
314
|
+
*/
|
|
315
|
+
export interface TasksComplexityEstimateResult {
|
|
316
|
+
/** Normalized size category. */
|
|
317
|
+
size: 'small' | 'medium' | 'large';
|
|
318
|
+
/** Raw numeric complexity score. */
|
|
319
|
+
score: number;
|
|
320
|
+
/** Individual factors contributing to the score. */
|
|
321
|
+
factors: TaskComplexityFactor[];
|
|
322
|
+
/** Maximum depth of the dependency graph. */
|
|
323
|
+
dependencyDepth: number;
|
|
324
|
+
/** Number of direct subtasks. */
|
|
325
|
+
subtaskCount: number;
|
|
326
|
+
/** Number of associated files. */
|
|
327
|
+
fileCount: number;
|
|
328
|
+
}
|
|
198
329
|
|
|
199
330
|
// tasks.history
|
|
200
331
|
export interface TasksHistoryParams {
|
|
201
332
|
taskId?: string;
|
|
202
333
|
limit?: number;
|
|
203
334
|
}
|
|
204
|
-
|
|
335
|
+
/**
|
|
336
|
+
* Result of `tasks.history` — audit log entries for a task.
|
|
337
|
+
*
|
|
338
|
+
* Each entry is a structured audit record; fields are consistent across
|
|
339
|
+
* entries but the `details`, `before`, and `after` sub-objects are
|
|
340
|
+
* operation-specific.
|
|
341
|
+
*
|
|
342
|
+
* @task T1703
|
|
343
|
+
*/
|
|
344
|
+
export type TasksHistoryResult = Array<Record<string, unknown>>;
|
|
205
345
|
|
|
206
346
|
// tasks.label.list
|
|
207
347
|
export type TasksLabelListParams = Record<string, never>;
|
|
208
|
-
|
|
348
|
+
/**
|
|
349
|
+
* Result of `tasks.label.list` — all labels with task counts.
|
|
350
|
+
*
|
|
351
|
+
* @task T1703
|
|
352
|
+
*/
|
|
353
|
+
export interface TasksLabelListResult {
|
|
354
|
+
/** All labels used in active tasks, sorted by count descending. */
|
|
355
|
+
labels: TaskLabelInfo[];
|
|
356
|
+
/** Total number of distinct labels. */
|
|
357
|
+
count: number;
|
|
358
|
+
}
|
|
209
359
|
|
|
210
360
|
// tasks.sync.links
|
|
211
361
|
export interface TasksSyncLinksParams {
|
|
212
362
|
providerId?: string;
|
|
213
363
|
taskId?: string;
|
|
214
364
|
}
|
|
215
|
-
|
|
365
|
+
/**
|
|
366
|
+
* Result of `tasks.sync.links` — external task links for a provider or task.
|
|
367
|
+
*
|
|
368
|
+
* @task T1703
|
|
369
|
+
*/
|
|
370
|
+
export interface TasksSyncLinksResult {
|
|
371
|
+
/** All matching external task links. */
|
|
372
|
+
links: ExternalTaskLink[];
|
|
373
|
+
/** Total number of links returned. */
|
|
374
|
+
count: number;
|
|
375
|
+
}
|
|
216
376
|
|
|
217
377
|
// tasks.sync.reconcile
|
|
218
378
|
export interface TasksSyncReconcileParams {
|
|
219
379
|
providerId: string;
|
|
220
|
-
externalTasks:
|
|
380
|
+
externalTasks: ExternalTask[];
|
|
221
381
|
dryRun?: boolean;
|
|
222
382
|
conflictPolicy?: string;
|
|
223
383
|
defaultPhase?: string;
|
|
224
384
|
defaultLabels?: string[];
|
|
225
385
|
}
|
|
226
|
-
|
|
386
|
+
/**
|
|
387
|
+
* Result of `tasks.sync.reconcile` — reconciliation summary.
|
|
388
|
+
*
|
|
389
|
+
* @task T1703
|
|
390
|
+
*/
|
|
391
|
+
export type TasksSyncReconcileResult = ReconcileResult;
|
|
227
392
|
|
|
228
393
|
// tasks.sync.links.remove
|
|
229
394
|
export interface TasksSyncLinksRemoveParams {
|
|
230
395
|
providerId: string;
|
|
231
396
|
}
|
|
232
|
-
|
|
397
|
+
/**
|
|
398
|
+
* Result of `tasks.sync.links.remove` — count of removed links.
|
|
399
|
+
*
|
|
400
|
+
* @task T1703
|
|
401
|
+
*/
|
|
402
|
+
export interface TasksSyncLinksRemoveResult {
|
|
403
|
+
/** The provider whose links were removed. */
|
|
404
|
+
providerId: string;
|
|
405
|
+
/** Number of links removed. */
|
|
406
|
+
removed: number;
|
|
407
|
+
}
|
|
233
408
|
|
|
234
409
|
// tasks.cancel
|
|
235
410
|
export interface TasksCancelParams {
|
|
236
411
|
taskId: string;
|
|
237
412
|
reason?: string;
|
|
238
413
|
}
|
|
239
|
-
|
|
414
|
+
/**
|
|
415
|
+
* Result of `tasks.cancel` — cancellation confirmation.
|
|
416
|
+
*
|
|
417
|
+
* @task T1703
|
|
418
|
+
*/
|
|
419
|
+
export interface TasksCancelResult {
|
|
420
|
+
/** The task ID that was cancelled. */
|
|
421
|
+
task: string;
|
|
422
|
+
/** Whether the cancellation succeeded. */
|
|
423
|
+
cancelled: boolean;
|
|
424
|
+
/** The reason for cancellation, if provided. @defaultValue undefined */
|
|
425
|
+
reason?: string;
|
|
426
|
+
/** ISO 8601 timestamp of cancellation. */
|
|
427
|
+
cancelledAt: string;
|
|
428
|
+
}
|
|
240
429
|
|
|
241
430
|
// tasks.restore (with from routing: done → reopen, archived → unarchive)
|
|
242
431
|
export interface TasksRestoreParams {
|
|
@@ -248,7 +437,19 @@ export interface TasksRestoreParams {
|
|
|
248
437
|
cascade?: boolean;
|
|
249
438
|
notes?: string;
|
|
250
439
|
}
|
|
251
|
-
|
|
440
|
+
/**
|
|
441
|
+
* Result of `tasks.restore` — restore confirmation with cascade details.
|
|
442
|
+
*
|
|
443
|
+
* @task T1703
|
|
444
|
+
*/
|
|
445
|
+
export interface TasksRestoreResult {
|
|
446
|
+
/** The primary task ID that was restored. */
|
|
447
|
+
task: string;
|
|
448
|
+
/** All task IDs that were restored (includes cascade). */
|
|
449
|
+
restored: string[];
|
|
450
|
+
/** Number of tasks restored. */
|
|
451
|
+
count: number;
|
|
452
|
+
}
|
|
252
453
|
|
|
253
454
|
// tasks.reparent (dispatch-level params include newParentId)
|
|
254
455
|
export interface TasksReparentQueryParams {
|
|
@@ -256,14 +457,44 @@ export interface TasksReparentQueryParams {
|
|
|
256
457
|
/** New parent ID, or null/undefined to promote to root. */
|
|
257
458
|
newParentId: string | null | undefined;
|
|
258
459
|
}
|
|
259
|
-
|
|
460
|
+
/**
|
|
461
|
+
* Result of `tasks.reparent` — reparent confirmation.
|
|
462
|
+
*
|
|
463
|
+
* @task T1703
|
|
464
|
+
*/
|
|
465
|
+
export interface TasksReparentDispatchResult {
|
|
466
|
+
/** The task ID that was reparented. */
|
|
467
|
+
task: string;
|
|
468
|
+
/** Whether the reparent succeeded. */
|
|
469
|
+
reparented: boolean;
|
|
470
|
+
/** Previous parent ID, or null if was root. */
|
|
471
|
+
oldParent: string | null;
|
|
472
|
+
/** New parent ID, or null if promoted to root. */
|
|
473
|
+
newParent: string | null;
|
|
474
|
+
/** New task type if it changed during reparent. @defaultValue undefined */
|
|
475
|
+
newType?: string;
|
|
476
|
+
}
|
|
260
477
|
|
|
261
478
|
// tasks.reorder (dispatch-level params)
|
|
262
479
|
export interface TasksReorderQueryParams {
|
|
263
480
|
taskId: string;
|
|
264
481
|
position: number;
|
|
265
482
|
}
|
|
266
|
-
|
|
483
|
+
/**
|
|
484
|
+
* Result of `tasks.reorder` — reorder confirmation.
|
|
485
|
+
*
|
|
486
|
+
* @task T1703
|
|
487
|
+
*/
|
|
488
|
+
export interface TasksReorderDispatchResult {
|
|
489
|
+
/** The task ID that was reordered. */
|
|
490
|
+
task: string;
|
|
491
|
+
/** Whether the reorder succeeded. */
|
|
492
|
+
reordered: boolean;
|
|
493
|
+
/** The new position within sibling scope. */
|
|
494
|
+
newPosition: number;
|
|
495
|
+
/** Total number of siblings after reorder. */
|
|
496
|
+
totalSiblings: number;
|
|
497
|
+
}
|
|
267
498
|
|
|
268
499
|
// tasks.relates.add — relatedId is canonical; targetId kept for backward compat (T5149)
|
|
269
500
|
export interface TasksRelatesAddParams {
|
|
@@ -274,7 +505,21 @@ export interface TasksRelatesAddParams {
|
|
|
274
505
|
type: string;
|
|
275
506
|
reason?: string;
|
|
276
507
|
}
|
|
277
|
-
|
|
508
|
+
/**
|
|
509
|
+
* Result of `tasks.relates.add` — relation creation confirmation.
|
|
510
|
+
*
|
|
511
|
+
* @task T1703
|
|
512
|
+
*/
|
|
513
|
+
export interface TasksRelatesAddResult {
|
|
514
|
+
/** Source task ID. */
|
|
515
|
+
from: string;
|
|
516
|
+
/** Target (related) task ID. */
|
|
517
|
+
to: string;
|
|
518
|
+
/** Relation type (e.g. "blocks", "related-to"). */
|
|
519
|
+
type: string;
|
|
520
|
+
/** Whether the relation was newly created (false if it already existed). */
|
|
521
|
+
added: boolean;
|
|
522
|
+
}
|
|
278
523
|
|
|
279
524
|
// tasks.add (dispatch-level params — extends TasksCreateParams)
|
|
280
525
|
export interface TasksAddParams {
|
|
@@ -308,7 +553,21 @@ export interface TasksAddParams {
|
|
|
308
553
|
*/
|
|
309
554
|
forceDuplicate?: boolean;
|
|
310
555
|
}
|
|
311
|
-
|
|
556
|
+
/**
|
|
557
|
+
* Result of `tasks.add` — the newly created task.
|
|
558
|
+
*
|
|
559
|
+
* @task T1703
|
|
560
|
+
*/
|
|
561
|
+
export interface TasksAddResult {
|
|
562
|
+
/** The created task record. */
|
|
563
|
+
task: TaskRecord;
|
|
564
|
+
/** Whether a duplicate was detected (but bypassed via forceDuplicate). */
|
|
565
|
+
duplicate: boolean;
|
|
566
|
+
/** Whether this was a dry run (task not actually saved). @defaultValue undefined */
|
|
567
|
+
dryRun?: boolean;
|
|
568
|
+
/** Non-blocking validation warnings. @defaultValue undefined */
|
|
569
|
+
warnings?: string[];
|
|
570
|
+
}
|
|
312
571
|
|
|
313
572
|
// tasks.update (dispatch-level params — extends TasksUpdateParams)
|
|
314
573
|
export interface TasksUpdateQueryParams {
|
|
@@ -332,7 +591,17 @@ export interface TasksUpdateQueryParams {
|
|
|
332
591
|
files?: string[];
|
|
333
592
|
pipelineStage?: string;
|
|
334
593
|
}
|
|
335
|
-
|
|
594
|
+
/**
|
|
595
|
+
* Result of `tasks.update` — the updated task record with change list.
|
|
596
|
+
*
|
|
597
|
+
* @task T1703
|
|
598
|
+
*/
|
|
599
|
+
export interface TasksUpdateQueryResult {
|
|
600
|
+
/** Updated task record. */
|
|
601
|
+
task: TaskRecord;
|
|
602
|
+
/** Human-readable list of fields that were changed. @defaultValue undefined */
|
|
603
|
+
changes?: string[];
|
|
604
|
+
}
|
|
336
605
|
|
|
337
606
|
// tasks.complete (dispatch-level params)
|
|
338
607
|
export interface TasksCompleteQueryParams {
|
|
@@ -352,14 +621,38 @@ export interface TasksCompleteQueryParams {
|
|
|
352
621
|
/** Reason for acknowledging CRITICAL nexus impact risk (bypasses nexusImpact gate). */
|
|
353
622
|
acknowledgeRisk?: string;
|
|
354
623
|
}
|
|
355
|
-
|
|
624
|
+
/**
|
|
625
|
+
* Result of `tasks.complete` — completion confirmation with unblocked tasks.
|
|
626
|
+
*
|
|
627
|
+
* @task T1703
|
|
628
|
+
*/
|
|
629
|
+
export interface TasksCompleteQueryResult {
|
|
630
|
+
/** The completed task record. */
|
|
631
|
+
task: TaskRecord;
|
|
632
|
+
/** IDs of parent epics that were automatically completed. @defaultValue undefined */
|
|
633
|
+
autoCompleted?: string[];
|
|
634
|
+
/** Tasks that became unblocked by this completion. @defaultValue undefined */
|
|
635
|
+
unblockedTasks?: Array<Pick<TaskRef, 'id' | 'title'>>;
|
|
636
|
+
}
|
|
356
637
|
|
|
357
638
|
// tasks.delete (dispatch-level params)
|
|
358
639
|
export interface TasksDeleteQueryParams {
|
|
359
640
|
taskId: string;
|
|
360
641
|
force?: boolean;
|
|
361
642
|
}
|
|
362
|
-
|
|
643
|
+
/**
|
|
644
|
+
* Result of `tasks.delete` — deletion confirmation with cascade details.
|
|
645
|
+
*
|
|
646
|
+
* @task T1703
|
|
647
|
+
*/
|
|
648
|
+
export interface TasksDeleteQueryResult {
|
|
649
|
+
/** The deleted task record. */
|
|
650
|
+
deletedTask: TaskRecord;
|
|
651
|
+
/** Whether the deletion was applied (always true on success). */
|
|
652
|
+
deleted: boolean;
|
|
653
|
+
/** IDs of child tasks cascade-deleted along with the parent. @defaultValue undefined */
|
|
654
|
+
cascadeDeleted?: string[];
|
|
655
|
+
}
|
|
363
656
|
|
|
364
657
|
// tasks.archive (dispatch-level params)
|
|
365
658
|
export interface TasksArchiveQueryParams {
|
|
@@ -369,30 +662,78 @@ export interface TasksArchiveQueryParams {
|
|
|
369
662
|
includeCancelled?: boolean;
|
|
370
663
|
dryRun?: boolean;
|
|
371
664
|
}
|
|
372
|
-
|
|
665
|
+
/**
|
|
666
|
+
* Result of `tasks.archive` — archive operation summary.
|
|
667
|
+
*
|
|
668
|
+
* @task T1703
|
|
669
|
+
*/
|
|
670
|
+
export interface TasksArchiveQueryResult {
|
|
671
|
+
/** Number of tasks archived. */
|
|
672
|
+
archivedCount: number;
|
|
673
|
+
/** IDs of tasks that were archived. */
|
|
674
|
+
archivedTasks: Array<{ id: string }>;
|
|
675
|
+
}
|
|
373
676
|
|
|
374
677
|
// tasks.claim
|
|
375
678
|
export interface TasksClaimParams {
|
|
376
679
|
taskId: string;
|
|
377
680
|
agentId: string;
|
|
378
681
|
}
|
|
379
|
-
|
|
682
|
+
/**
|
|
683
|
+
* Result of `tasks.claim` — agent claim confirmation.
|
|
684
|
+
*
|
|
685
|
+
* @task T1703
|
|
686
|
+
*/
|
|
687
|
+
export interface TasksClaimResult {
|
|
688
|
+
/** The task ID that was claimed. */
|
|
689
|
+
taskId: string;
|
|
690
|
+
/** The agent ID that now holds the claim. */
|
|
691
|
+
agentId: string;
|
|
692
|
+
}
|
|
380
693
|
|
|
381
694
|
// tasks.unclaim
|
|
382
695
|
export interface TasksUnclaimParams {
|
|
383
696
|
taskId: string;
|
|
384
697
|
}
|
|
385
|
-
|
|
698
|
+
/**
|
|
699
|
+
* Result of `tasks.unclaim` — agent release confirmation.
|
|
700
|
+
*
|
|
701
|
+
* @task T1703
|
|
702
|
+
*/
|
|
703
|
+
export interface TasksUnclaimResult {
|
|
704
|
+
/** The task ID whose claim was released. */
|
|
705
|
+
taskId: string;
|
|
706
|
+
}
|
|
386
707
|
|
|
387
708
|
// tasks.start (dispatch-level)
|
|
388
709
|
export interface TasksStartQueryParams {
|
|
389
710
|
taskId: string;
|
|
390
711
|
}
|
|
391
|
-
|
|
712
|
+
/**
|
|
713
|
+
* Result of `tasks.start` — work-start confirmation.
|
|
714
|
+
*
|
|
715
|
+
* @task T1703
|
|
716
|
+
*/
|
|
717
|
+
export interface TasksStartQueryResult {
|
|
718
|
+
/** The task ID that is now active. */
|
|
719
|
+
taskId: string;
|
|
720
|
+
/** The task ID that was previously active (auto-stopped), or null. */
|
|
721
|
+
previousTask: string | null;
|
|
722
|
+
}
|
|
392
723
|
|
|
393
724
|
// tasks.stop (dispatch-level)
|
|
394
725
|
export type TasksStopQueryParams = Record<string, never>;
|
|
395
|
-
|
|
726
|
+
/**
|
|
727
|
+
* Result of `tasks.stop` — work-stop confirmation.
|
|
728
|
+
*
|
|
729
|
+
* @task T1703
|
|
730
|
+
*/
|
|
731
|
+
export interface TasksStopQueryResult {
|
|
732
|
+
/** Whether the active task was successfully cleared. */
|
|
733
|
+
cleared: boolean;
|
|
734
|
+
/** The task ID that was active before stopping, or null if none. */
|
|
735
|
+
previousTask: string | null;
|
|
736
|
+
}
|
|
396
737
|
|
|
397
738
|
// ---------------------------------------------------------------------------
|
|
398
739
|
// Typed operation record (Wave D adapter — T1425)
|