@cleocode/contracts 2026.4.141 → 2026.4.142
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 +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/operations/admin.d.ts +70 -0
- package/dist/operations/admin.d.ts.map +1 -1
- package/dist/operations/conduit.d.ts +37 -6
- package/dist/operations/conduit.d.ts.map +1 -1
- package/dist/operations/conduit.js +16 -6
- package/dist/operations/conduit.js.map +1 -1
- package/dist/operations/index.d.ts +1 -0
- package/dist/operations/index.d.ts.map +1 -1
- package/dist/operations/index.js +1 -0
- package/dist/operations/index.js.map +1 -1
- package/dist/operations/nexus.d.ts +214 -0
- package/dist/operations/nexus.d.ts.map +1 -1
- package/dist/operations/release.d.ts +79 -0
- package/dist/operations/release.d.ts.map +1 -1
- package/dist/operations/sentient.d.ts +166 -0
- package/dist/operations/sentient.d.ts.map +1 -0
- package/dist/operations/sentient.js +15 -0
- package/dist/operations/sentient.js.map +1 -0
- package/dist/operations/tasks.d.ts +242 -0
- package/dist/operations/tasks.d.ts.map +1 -1
- package/dist/operations/validate.d.ts +41 -0
- package/dist/operations/validate.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +114 -0
- package/src/operations/admin.ts +88 -0
- package/src/operations/conduit.ts +42 -6
- package/src/operations/index.ts +1 -0
- package/src/operations/nexus.ts +258 -0
- package/src/operations/release.ts +87 -0
- package/src/operations/sentient.ts +208 -0
- package/src/operations/tasks.ts +307 -0
- package/src/operations/validate.ts +46 -0
package/src/operations/tasks.ts
CHANGED
|
@@ -103,6 +103,12 @@ export interface TasksFindParams {
|
|
|
103
103
|
fields?: string;
|
|
104
104
|
/** When true, emit verbose per-match diagnostic fields. @task T963 */
|
|
105
105
|
verbose?: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Filter by role axis (T944 — orthogonal axes).
|
|
108
|
+
* Accepts the same values as the `role` field on TasksCreateParams.
|
|
109
|
+
* @task T963 / T944
|
|
110
|
+
*/
|
|
111
|
+
role?: string;
|
|
106
112
|
}
|
|
107
113
|
export type TasksFindResult = MinimalTask[];
|
|
108
114
|
|
|
@@ -416,3 +422,304 @@ export interface TasksCurrentResult {
|
|
|
416
422
|
since?: string;
|
|
417
423
|
sessionId?: string;
|
|
418
424
|
}
|
|
425
|
+
|
|
426
|
+
// tasks.show (with optional history/ivtrHistory flags)
|
|
427
|
+
export interface TasksShowParams {
|
|
428
|
+
taskId: string;
|
|
429
|
+
/** When true, include task change history. */
|
|
430
|
+
history?: boolean;
|
|
431
|
+
/** When true, include IVTR phase history. */
|
|
432
|
+
ivtrHistory?: boolean;
|
|
433
|
+
}
|
|
434
|
+
export type TasksShowResult = unknown;
|
|
435
|
+
|
|
436
|
+
// tasks.tree dispatch params (with optional withBlockers flag — dispatch alias)
|
|
437
|
+
export interface TasksTreeDispatchParams {
|
|
438
|
+
taskId?: string;
|
|
439
|
+
withBlockers?: boolean;
|
|
440
|
+
}
|
|
441
|
+
export type TasksTreeDispatchResult = unknown;
|
|
442
|
+
|
|
443
|
+
// tasks.blockers dispatch params (with optional analyze/limit)
|
|
444
|
+
export interface TasksBlockersQueryParams {
|
|
445
|
+
analyze?: boolean;
|
|
446
|
+
limit?: number;
|
|
447
|
+
}
|
|
448
|
+
export type TasksBlockersQueryResult = unknown;
|
|
449
|
+
|
|
450
|
+
// tasks.depends (with action routing for overview/cycles)
|
|
451
|
+
export interface TasksDependsParams {
|
|
452
|
+
taskId?: string;
|
|
453
|
+
direction?: 'upstream' | 'downstream' | 'both';
|
|
454
|
+
tree?: boolean;
|
|
455
|
+
action?: 'overview' | 'cycles';
|
|
456
|
+
}
|
|
457
|
+
export type TasksDependsResult = unknown;
|
|
458
|
+
|
|
459
|
+
// tasks.analyze dispatch params (with optional taskId and tierLimit)
|
|
460
|
+
export interface TasksAnalyzeQueryParams {
|
|
461
|
+
taskId?: string;
|
|
462
|
+
tierLimit?: number;
|
|
463
|
+
}
|
|
464
|
+
export type TasksAnalyzeQueryResult = unknown;
|
|
465
|
+
|
|
466
|
+
// tasks.impact
|
|
467
|
+
export interface TasksImpactParams {
|
|
468
|
+
change: string;
|
|
469
|
+
matchLimit?: number;
|
|
470
|
+
}
|
|
471
|
+
export type TasksImpactResult = unknown;
|
|
472
|
+
|
|
473
|
+
// tasks.next dispatch params (with count and explain)
|
|
474
|
+
export interface TasksNextQueryParams {
|
|
475
|
+
count?: number;
|
|
476
|
+
explain?: boolean;
|
|
477
|
+
}
|
|
478
|
+
export type TasksNextQueryResult = unknown;
|
|
479
|
+
|
|
480
|
+
// tasks.plan
|
|
481
|
+
export type TasksPlanParams = Record<string, never>;
|
|
482
|
+
export type TasksPlanResult = unknown;
|
|
483
|
+
|
|
484
|
+
// tasks.relates (with mode routing for suggest/discover)
|
|
485
|
+
export interface TasksRelatesParams {
|
|
486
|
+
taskId: string;
|
|
487
|
+
mode?: 'suggest' | 'discover';
|
|
488
|
+
threshold?: number;
|
|
489
|
+
}
|
|
490
|
+
export type TasksRelatesResult = unknown;
|
|
491
|
+
|
|
492
|
+
// tasks.complexity.estimate
|
|
493
|
+
export interface TasksComplexityEstimateParams {
|
|
494
|
+
taskId: string;
|
|
495
|
+
}
|
|
496
|
+
export type TasksComplexityEstimateResult = unknown;
|
|
497
|
+
|
|
498
|
+
// tasks.history
|
|
499
|
+
export interface TasksHistoryParams {
|
|
500
|
+
taskId?: string;
|
|
501
|
+
limit?: number;
|
|
502
|
+
}
|
|
503
|
+
export type TasksHistoryResult = unknown;
|
|
504
|
+
|
|
505
|
+
// tasks.label.list
|
|
506
|
+
export type TasksLabelListParams = Record<string, never>;
|
|
507
|
+
export type TasksLabelListResult = unknown;
|
|
508
|
+
|
|
509
|
+
// tasks.sync.links
|
|
510
|
+
export interface TasksSyncLinksParams {
|
|
511
|
+
providerId?: string;
|
|
512
|
+
taskId?: string;
|
|
513
|
+
}
|
|
514
|
+
export type TasksSyncLinksResult = unknown;
|
|
515
|
+
|
|
516
|
+
// tasks.sync.reconcile
|
|
517
|
+
export interface TasksSyncReconcileParams {
|
|
518
|
+
providerId: string;
|
|
519
|
+
externalTasks: import('../task-sync.js').ExternalTask[];
|
|
520
|
+
dryRun?: boolean;
|
|
521
|
+
conflictPolicy?: string;
|
|
522
|
+
defaultPhase?: string;
|
|
523
|
+
defaultLabels?: string[];
|
|
524
|
+
}
|
|
525
|
+
export type TasksSyncReconcileResult = unknown;
|
|
526
|
+
|
|
527
|
+
// tasks.sync.links.remove
|
|
528
|
+
export interface TasksSyncLinksRemoveParams {
|
|
529
|
+
providerId: string;
|
|
530
|
+
}
|
|
531
|
+
export type TasksSyncLinksRemoveResult = unknown;
|
|
532
|
+
|
|
533
|
+
// tasks.cancel
|
|
534
|
+
export interface TasksCancelParams {
|
|
535
|
+
taskId: string;
|
|
536
|
+
reason?: string;
|
|
537
|
+
}
|
|
538
|
+
export type TasksCancelResult = unknown;
|
|
539
|
+
|
|
540
|
+
// tasks.restore (with from routing: done → reopen, archived → unarchive)
|
|
541
|
+
export interface TasksRestoreParams {
|
|
542
|
+
taskId: string;
|
|
543
|
+
from?: 'done' | 'archived';
|
|
544
|
+
status?: string;
|
|
545
|
+
reason?: string;
|
|
546
|
+
preserveStatus?: boolean;
|
|
547
|
+
cascade?: boolean;
|
|
548
|
+
notes?: string;
|
|
549
|
+
}
|
|
550
|
+
export type TasksRestoreResult = unknown;
|
|
551
|
+
|
|
552
|
+
// tasks.reparent (dispatch-level params include newParentId)
|
|
553
|
+
export interface TasksReparentQueryParams {
|
|
554
|
+
taskId: string;
|
|
555
|
+
/** New parent ID, or null/undefined to promote to root. */
|
|
556
|
+
newParentId: string | null | undefined;
|
|
557
|
+
}
|
|
558
|
+
export type TasksReparentDispatchResult = unknown;
|
|
559
|
+
|
|
560
|
+
// tasks.reorder (dispatch-level params)
|
|
561
|
+
export interface TasksReorderQueryParams {
|
|
562
|
+
taskId: string;
|
|
563
|
+
position: number;
|
|
564
|
+
}
|
|
565
|
+
export type TasksReorderDispatchResult = unknown;
|
|
566
|
+
|
|
567
|
+
// tasks.relates.add (accepts both relatedId and targetId aliases)
|
|
568
|
+
export interface TasksRelatesAddParams {
|
|
569
|
+
taskId: string;
|
|
570
|
+
relatedId?: string;
|
|
571
|
+
targetId?: string;
|
|
572
|
+
type: string;
|
|
573
|
+
reason?: string;
|
|
574
|
+
}
|
|
575
|
+
export type TasksRelatesAddResult = unknown;
|
|
576
|
+
|
|
577
|
+
// tasks.add (dispatch-level alias params — extends TasksCreateParams)
|
|
578
|
+
export interface TasksAddParams {
|
|
579
|
+
title: string;
|
|
580
|
+
description?: string;
|
|
581
|
+
parent?: string;
|
|
582
|
+
parentId?: string;
|
|
583
|
+
depends?: string[];
|
|
584
|
+
priority?: string;
|
|
585
|
+
labels?: string[];
|
|
586
|
+
type?: string;
|
|
587
|
+
acceptance?: string[];
|
|
588
|
+
phase?: string;
|
|
589
|
+
size?: string;
|
|
590
|
+
notes?: string;
|
|
591
|
+
files?: string[];
|
|
592
|
+
dryRun?: boolean;
|
|
593
|
+
parentSearch?: string;
|
|
594
|
+
role?: string;
|
|
595
|
+
kind?: string;
|
|
596
|
+
scope?: string;
|
|
597
|
+
severity?: string;
|
|
598
|
+
}
|
|
599
|
+
export type TasksAddResult = unknown;
|
|
600
|
+
|
|
601
|
+
// tasks.update (dispatch-level alias params — extends TasksUpdateParams)
|
|
602
|
+
export interface TasksUpdateQueryParams {
|
|
603
|
+
taskId: string;
|
|
604
|
+
title?: string;
|
|
605
|
+
description?: string;
|
|
606
|
+
status?: string;
|
|
607
|
+
priority?: string;
|
|
608
|
+
notes?: string;
|
|
609
|
+
note?: string;
|
|
610
|
+
labels?: string[];
|
|
611
|
+
addLabels?: string[];
|
|
612
|
+
removeLabels?: string[];
|
|
613
|
+
depends?: string[];
|
|
614
|
+
addDepends?: string[];
|
|
615
|
+
removeDepends?: string[];
|
|
616
|
+
acceptance?: string[];
|
|
617
|
+
parent?: string | null;
|
|
618
|
+
parentId?: string | null;
|
|
619
|
+
type?: string;
|
|
620
|
+
size?: string;
|
|
621
|
+
files?: string[];
|
|
622
|
+
pipelineStage?: string;
|
|
623
|
+
}
|
|
624
|
+
export type TasksUpdateQueryResult = unknown;
|
|
625
|
+
|
|
626
|
+
// tasks.complete (dispatch-level params)
|
|
627
|
+
export interface TasksCompleteQueryParams {
|
|
628
|
+
taskId: string;
|
|
629
|
+
notes?: string;
|
|
630
|
+
force?: unknown;
|
|
631
|
+
}
|
|
632
|
+
export type TasksCompleteQueryResult = unknown;
|
|
633
|
+
|
|
634
|
+
// tasks.delete (dispatch-level params)
|
|
635
|
+
export interface TasksDeleteQueryParams {
|
|
636
|
+
taskId: string;
|
|
637
|
+
force?: boolean;
|
|
638
|
+
}
|
|
639
|
+
export type TasksDeleteQueryResult = unknown;
|
|
640
|
+
|
|
641
|
+
// tasks.archive (dispatch-level params)
|
|
642
|
+
export interface TasksArchiveQueryParams {
|
|
643
|
+
taskId?: string;
|
|
644
|
+
before?: string;
|
|
645
|
+
taskIds?: string[];
|
|
646
|
+
includeCancelled?: boolean;
|
|
647
|
+
dryRun?: boolean;
|
|
648
|
+
}
|
|
649
|
+
export type TasksArchiveQueryResult = unknown;
|
|
650
|
+
|
|
651
|
+
// tasks.claim
|
|
652
|
+
export interface TasksClaimParams {
|
|
653
|
+
taskId: string;
|
|
654
|
+
agentId: string;
|
|
655
|
+
}
|
|
656
|
+
export type TasksClaimResult = unknown;
|
|
657
|
+
|
|
658
|
+
// tasks.unclaim
|
|
659
|
+
export interface TasksUnclaimParams {
|
|
660
|
+
taskId: string;
|
|
661
|
+
}
|
|
662
|
+
export type TasksUnclaimResult = unknown;
|
|
663
|
+
|
|
664
|
+
// tasks.start (dispatch-level)
|
|
665
|
+
export interface TasksStartQueryParams {
|
|
666
|
+
taskId: string;
|
|
667
|
+
}
|
|
668
|
+
export type TasksStartQueryResult = unknown;
|
|
669
|
+
|
|
670
|
+
// tasks.stop (dispatch-level)
|
|
671
|
+
export type TasksStopQueryParams = Record<string, never>;
|
|
672
|
+
export type TasksStopQueryResult = unknown;
|
|
673
|
+
|
|
674
|
+
// ---------------------------------------------------------------------------
|
|
675
|
+
// Typed operation record (Wave D adapter — T1425)
|
|
676
|
+
// ---------------------------------------------------------------------------
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* Typed operation record for the tasks domain.
|
|
680
|
+
*
|
|
681
|
+
* Maps each operation name (as dispatched by the registry — no domain prefix)
|
|
682
|
+
* to its `[Params, Result]` tuple. Used by `TypedDomainHandler<TasksOps>`
|
|
683
|
+
* in the dispatch layer to provide compile-time narrowing of params.
|
|
684
|
+
*
|
|
685
|
+
* @task T1425 — tasks typed-dispatch migration
|
|
686
|
+
*/
|
|
687
|
+
export type TasksOps = {
|
|
688
|
+
// Query ops
|
|
689
|
+
readonly show: readonly [TasksShowParams, TasksShowResult];
|
|
690
|
+
readonly list: readonly [TasksListParams, TasksListResult];
|
|
691
|
+
readonly find: readonly [TasksFindParams, TasksFindResult];
|
|
692
|
+
readonly tree: readonly [TasksTreeDispatchParams, TasksTreeDispatchResult];
|
|
693
|
+
readonly blockers: readonly [TasksBlockersQueryParams, TasksBlockersQueryResult];
|
|
694
|
+
readonly depends: readonly [TasksDependsParams, TasksDependsResult];
|
|
695
|
+
readonly analyze: readonly [TasksAnalyzeQueryParams, TasksAnalyzeQueryResult];
|
|
696
|
+
readonly impact: readonly [TasksImpactParams, TasksImpactResult];
|
|
697
|
+
readonly next: readonly [TasksNextQueryParams, TasksNextQueryResult];
|
|
698
|
+
readonly plan: readonly [TasksPlanParams, TasksPlanResult];
|
|
699
|
+
readonly relates: readonly [TasksRelatesParams, TasksRelatesResult];
|
|
700
|
+
readonly 'complexity.estimate': readonly [
|
|
701
|
+
TasksComplexityEstimateParams,
|
|
702
|
+
TasksComplexityEstimateResult,
|
|
703
|
+
];
|
|
704
|
+
readonly history: readonly [TasksHistoryParams, TasksHistoryResult];
|
|
705
|
+
readonly current: readonly [TasksCurrentParams, TasksCurrentResult];
|
|
706
|
+
readonly 'label.list': readonly [TasksLabelListParams, TasksLabelListResult];
|
|
707
|
+
readonly 'sync.links': readonly [TasksSyncLinksParams, TasksSyncLinksResult];
|
|
708
|
+
// Mutate ops
|
|
709
|
+
readonly add: readonly [TasksAddParams, TasksAddResult];
|
|
710
|
+
readonly update: readonly [TasksUpdateQueryParams, TasksUpdateQueryResult];
|
|
711
|
+
readonly complete: readonly [TasksCompleteQueryParams, TasksCompleteQueryResult];
|
|
712
|
+
readonly cancel: readonly [TasksCancelParams, TasksCancelResult];
|
|
713
|
+
readonly delete: readonly [TasksDeleteQueryParams, TasksDeleteQueryResult];
|
|
714
|
+
readonly archive: readonly [TasksArchiveQueryParams, TasksArchiveQueryResult];
|
|
715
|
+
readonly restore: readonly [TasksRestoreParams, TasksRestoreResult];
|
|
716
|
+
readonly reparent: readonly [TasksReparentQueryParams, TasksReparentDispatchResult];
|
|
717
|
+
readonly reorder: readonly [TasksReorderQueryParams, TasksReorderDispatchResult];
|
|
718
|
+
readonly 'relates.add': readonly [TasksRelatesAddParams, TasksRelatesAddResult];
|
|
719
|
+
readonly start: readonly [TasksStartQueryParams, TasksStartQueryResult];
|
|
720
|
+
readonly stop: readonly [TasksStopQueryParams, TasksStopQueryResult];
|
|
721
|
+
readonly 'sync.reconcile': readonly [TasksSyncReconcileParams, TasksSyncReconcileResult];
|
|
722
|
+
readonly 'sync.links.remove': readonly [TasksSyncLinksRemoveParams, TasksSyncLinksRemoveResult];
|
|
723
|
+
readonly claim: readonly [TasksClaimParams, TasksClaimResult];
|
|
724
|
+
readonly unclaim: readonly [TasksUnclaimParams, TasksUnclaimResult];
|
|
725
|
+
};
|
|
@@ -303,3 +303,49 @@ export interface ValidateComplianceSyncParams {
|
|
|
303
303
|
force?: boolean;
|
|
304
304
|
}
|
|
305
305
|
export type ValidateComplianceSyncResult = Record<string, unknown>;
|
|
306
|
+
|
|
307
|
+
// ---------------------------------------------------------------------------
|
|
308
|
+
// Typed operation record (Wave D adapter — T975)
|
|
309
|
+
// ---------------------------------------------------------------------------
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Typed operation record for the check domain.
|
|
313
|
+
*
|
|
314
|
+
* Maps each operation name (as dispatched by the registry — no domain prefix)
|
|
315
|
+
* to its `[Params, Result]` tuple. Used by `TypedDomainHandler<CheckOps>`
|
|
316
|
+
* in the dispatch layer to provide compile-time narrowing of params.
|
|
317
|
+
*
|
|
318
|
+
* @task T1423 — check typed narrowing (T975 follow-on)
|
|
319
|
+
*/
|
|
320
|
+
export type CheckOps = {
|
|
321
|
+
readonly schema: readonly [ValidateSchemaParams, ValidateSchemaResult];
|
|
322
|
+
readonly task: readonly [ValidateTaskParams, ValidateTaskResult];
|
|
323
|
+
readonly manifest: readonly [ValidateManifestParams, ValidateManifestResult];
|
|
324
|
+
readonly output: readonly [ValidateOutputParams, ValidateOutputResult];
|
|
325
|
+
readonly 'compliance.summary': readonly [
|
|
326
|
+
ValidateComplianceSummaryParams,
|
|
327
|
+
ValidateComplianceSummaryResult,
|
|
328
|
+
];
|
|
329
|
+
readonly 'compliance.record': readonly [
|
|
330
|
+
ValidateComplianceRecordParams,
|
|
331
|
+
ValidateComplianceRecordResult,
|
|
332
|
+
];
|
|
333
|
+
readonly 'compliance.sync': readonly [ValidateComplianceSyncParams, ValidateComplianceSyncResult];
|
|
334
|
+
readonly test: readonly [ValidateTestStatusParams, ValidateTestStatusResult];
|
|
335
|
+
readonly 'test.run': readonly [ValidateTestRunParams, ValidateTestRunResult];
|
|
336
|
+
readonly 'test.coverage': readonly [ValidateTestCoverageParams, ValidateTestCoverageResult];
|
|
337
|
+
readonly coherence: readonly [ValidateCoherenceParams, ValidateCoherenceResult];
|
|
338
|
+
readonly 'gate.status': readonly [ValidateGateParams, ValidateGateResult];
|
|
339
|
+
readonly 'gate.set': readonly [ValidateGateParams, ValidateGateResult];
|
|
340
|
+
readonly 'verify.explain': readonly [ValidateVerifyExplainParams, ValidateVerifyExplainResult];
|
|
341
|
+
readonly 'archive.stats': readonly [ValidateArchiveStatsParams, ValidateArchiveStatsResult];
|
|
342
|
+
readonly 'chain.validate': readonly [ValidateChainParams, ValidateChainResult];
|
|
343
|
+
readonly grade: readonly [ValidateGradeParams, ValidateGradeResult];
|
|
344
|
+
readonly 'grade.list': readonly [ValidateGradeListParams, ValidateGradeListResult];
|
|
345
|
+
readonly canon: readonly [ValidateCanonParams, ValidateCanonResult];
|
|
346
|
+
readonly 'workflow.compliance': readonly [
|
|
347
|
+
ValidateWorkflowComplianceParams,
|
|
348
|
+
ValidateWorkflowComplianceResult,
|
|
349
|
+
];
|
|
350
|
+
readonly protocol: readonly [ValidateProtocolParams, ValidateProtocolResult];
|
|
351
|
+
};
|