@cleocode/contracts 2026.5.96 → 2026.5.98

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 (116) hide show
  1. package/dist/__tests__/enums.test.d.ts +14 -0
  2. package/dist/__tests__/enums.test.d.ts.map +1 -0
  3. package/dist/__tests__/enums.test.js +75 -0
  4. package/dist/__tests__/enums.test.js.map +1 -0
  5. package/dist/__tests__/jobs.test.d.ts +11 -0
  6. package/dist/__tests__/jobs.test.d.ts.map +1 -0
  7. package/dist/__tests__/jobs.test.js +48 -0
  8. package/dist/__tests__/jobs.test.js.map +1 -0
  9. package/dist/__tests__/memory-wire-shapes.test.d.ts +19 -0
  10. package/dist/__tests__/memory-wire-shapes.test.d.ts.map +1 -0
  11. package/dist/__tests__/memory-wire-shapes.test.js +119 -0
  12. package/dist/__tests__/memory-wire-shapes.test.js.map +1 -0
  13. package/dist/__tests__/operation-def.test.d.ts +20 -0
  14. package/dist/__tests__/operation-def.test.d.ts.map +1 -0
  15. package/dist/__tests__/operation-def.test.js +111 -0
  16. package/dist/__tests__/operation-def.test.js.map +1 -0
  17. package/dist/__tests__/provenance.test.d.ts +18 -0
  18. package/dist/__tests__/provenance.test.d.ts.map +1 -0
  19. package/dist/__tests__/provenance.test.js +142 -0
  20. package/dist/__tests__/provenance.test.js.map +1 -0
  21. package/dist/__tests__/scaffold-diagnostics.test.d.ts +19 -0
  22. package/dist/__tests__/scaffold-diagnostics.test.d.ts.map +1 -0
  23. package/dist/__tests__/scaffold-diagnostics.test.js +70 -0
  24. package/dist/__tests__/scaffold-diagnostics.test.js.map +1 -0
  25. package/dist/dispatch/identity.d.ts +72 -0
  26. package/dist/dispatch/identity.d.ts.map +1 -0
  27. package/dist/dispatch/identity.js +72 -0
  28. package/dist/dispatch/identity.js.map +1 -0
  29. package/dist/dispatch/operation-def.d.ts +92 -0
  30. package/dist/dispatch/operation-def.d.ts.map +1 -0
  31. package/dist/dispatch/operation-def.js +31 -0
  32. package/dist/dispatch/operation-def.js.map +1 -0
  33. package/dist/doctor.d.ts +43 -0
  34. package/dist/doctor.d.ts.map +1 -1
  35. package/dist/enums.d.ts +123 -0
  36. package/dist/enums.d.ts.map +1 -0
  37. package/dist/enums.js +139 -0
  38. package/dist/enums.js.map +1 -0
  39. package/dist/index.d.ts +15 -2
  40. package/dist/index.d.ts.map +1 -1
  41. package/dist/index.js +4 -0
  42. package/dist/index.js.map +1 -1
  43. package/dist/jobs.d.ts +39 -0
  44. package/dist/jobs.d.ts.map +1 -0
  45. package/dist/jobs.js +19 -0
  46. package/dist/jobs.js.map +1 -0
  47. package/dist/memory/budgeted.d.ts +67 -0
  48. package/dist/memory/budgeted.d.ts.map +1 -0
  49. package/dist/memory/budgeted.js +17 -0
  50. package/dist/memory/budgeted.js.map +1 -0
  51. package/dist/memory/fetch.d.ts +58 -0
  52. package/dist/memory/fetch.d.ts.map +1 -0
  53. package/dist/memory/fetch.js +19 -0
  54. package/dist/memory/fetch.js.map +1 -0
  55. package/dist/memory/observe.d.ts +158 -0
  56. package/dist/memory/observe.d.ts.map +1 -0
  57. package/dist/memory/observe.js +46 -0
  58. package/dist/memory/observe.js.map +1 -0
  59. package/dist/memory/search.d.ts +137 -0
  60. package/dist/memory/search.d.ts.map +1 -0
  61. package/dist/memory/search.js +22 -0
  62. package/dist/memory/search.js.map +1 -0
  63. package/dist/memory/timeline.d.ts +89 -0
  64. package/dist/memory/timeline.d.ts.map +1 -0
  65. package/dist/memory/timeline.js +22 -0
  66. package/dist/memory/timeline.js.map +1 -0
  67. package/dist/operations/focus.d.ts +199 -0
  68. package/dist/operations/focus.d.ts.map +1 -0
  69. package/dist/operations/focus.js +15 -0
  70. package/dist/operations/focus.js.map +1 -0
  71. package/dist/operations/index.d.ts +1 -0
  72. package/dist/operations/index.d.ts.map +1 -1
  73. package/dist/operations/index.js +1 -0
  74. package/dist/operations/index.js.map +1 -1
  75. package/dist/operations/session.d.ts +65 -0
  76. package/dist/operations/session.d.ts.map +1 -1
  77. package/dist/operations/tasks.d.ts +38 -0
  78. package/dist/operations/tasks.d.ts.map +1 -1
  79. package/dist/provenance.d.ts +257 -0
  80. package/dist/provenance.d.ts.map +1 -0
  81. package/dist/provenance.js +42 -0
  82. package/dist/provenance.js.map +1 -0
  83. package/dist/release/plan.d.ts +7 -7
  84. package/dist/scaffold-diagnostics.d.ts +110 -0
  85. package/dist/scaffold-diagnostics.d.ts.map +1 -0
  86. package/dist/scaffold-diagnostics.js +28 -0
  87. package/dist/scaffold-diagnostics.js.map +1 -0
  88. package/dist/session.d.ts +37 -0
  89. package/dist/session.d.ts.map +1 -1
  90. package/dist/session.js.map +1 -1
  91. package/dist/tasks/archive.d.ts +3 -3
  92. package/package.json +42 -2
  93. package/src/__tests__/enums.test.ts +114 -0
  94. package/src/__tests__/jobs.test.ts +76 -0
  95. package/src/__tests__/memory-wire-shapes.test.ts +371 -0
  96. package/src/__tests__/operation-def.test.ts +185 -0
  97. package/src/__tests__/provenance.test.ts +259 -0
  98. package/src/__tests__/scaffold-diagnostics.test.ts +137 -0
  99. package/src/dispatch/identity.ts +109 -0
  100. package/src/dispatch/operation-def.ts +102 -0
  101. package/src/doctor.ts +44 -0
  102. package/src/enums.ts +144 -0
  103. package/src/index.ts +79 -1
  104. package/src/jobs.ts +45 -0
  105. package/src/memory/budgeted.ts +75 -0
  106. package/src/memory/fetch.ts +66 -0
  107. package/src/memory/observe.ts +176 -0
  108. package/src/memory/search.ts +145 -0
  109. package/src/memory/timeline.ts +100 -0
  110. package/src/operations/focus.ts +226 -0
  111. package/src/operations/index.ts +1 -0
  112. package/src/operations/session.ts +67 -0
  113. package/src/operations/tasks.ts +40 -0
  114. package/src/provenance.ts +335 -0
  115. package/src/scaffold-diagnostics.ts +119 -0
  116. package/src/session.ts +37 -0
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Structural-equivalence tests for the scaffold-diagnostics contracts.
3
+ *
4
+ * These tests pin the field shapes of {@link ScaffoldResult},
5
+ * {@link CheckStatus}, {@link CheckResult}, and {@link HookCheckResult}
6
+ * so accidental narrowing or widening triggers a compile-time failure
7
+ * during `tsc -b` in the CI gate.
8
+ *
9
+ * The compile-time assertions use the conditional-equality trick
10
+ * (`Equals<A, B>`) so any structural drift produces a TS2322 or TS2344
11
+ * at build time. The runtime `expect` shape sanity check below is a
12
+ * thin smoke verification that constructible literals satisfy each
13
+ * interface — it does NOT exercise behavior (these are pure type
14
+ * contracts with no runtime).
15
+ *
16
+ * @since SG-ARCH-SOLID Saga T9831 · E-CONTRACTS-FOUNDATION T9832 (Phase 0a)
17
+ */
18
+ export {};
19
+ //# sourceMappingURL=scaffold-diagnostics.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scaffold-diagnostics.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/scaffold-diagnostics.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Structural-equivalence tests for the scaffold-diagnostics contracts.
3
+ *
4
+ * These tests pin the field shapes of {@link ScaffoldResult},
5
+ * {@link CheckStatus}, {@link CheckResult}, and {@link HookCheckResult}
6
+ * so accidental narrowing or widening triggers a compile-time failure
7
+ * during `tsc -b` in the CI gate.
8
+ *
9
+ * The compile-time assertions use the conditional-equality trick
10
+ * (`Equals<A, B>`) so any structural drift produces a TS2322 or TS2344
11
+ * at build time. The runtime `expect` shape sanity check below is a
12
+ * thin smoke verification that constructible literals satisfy each
13
+ * interface — it does NOT exercise behavior (these are pure type
14
+ * contracts with no runtime).
15
+ *
16
+ * @since SG-ARCH-SOLID Saga T9831 · E-CONTRACTS-FOUNDATION T9832 (Phase 0a)
17
+ */
18
+ import { describe, expect, it } from 'vitest';
19
+ // ─── Runtime constructibility smoke ─────────────────────────────────
20
+ describe('scaffold-diagnostics contracts', () => {
21
+ it('ScaffoldResult is constructible with the canonical shape', () => {
22
+ const r = { action: 'created', path: '/tmp/x' };
23
+ expect(r.action).toBe('created');
24
+ expect(r.path).toBe('/tmp/x');
25
+ expect(r.details).toBeUndefined();
26
+ });
27
+ it('ScaffoldResult accepts the optional details field', () => {
28
+ const r = {
29
+ action: 'repaired',
30
+ path: '/tmp/y',
31
+ details: 'rewrote stale entry',
32
+ };
33
+ expect(r.details).toBe('rewrote stale entry');
34
+ });
35
+ it('CheckResult is constructible with the canonical shape', () => {
36
+ const r = {
37
+ id: 'cleo_structure',
38
+ category: 'scaffold',
39
+ status: 'passed',
40
+ message: 'All subdirs present',
41
+ details: { missing: [] },
42
+ fix: null,
43
+ };
44
+ expect(r.status).toBe('passed');
45
+ expect(r.fix).toBeNull();
46
+ });
47
+ it('CheckStatus union covers exactly the 4 documented values', () => {
48
+ const statuses = ['passed', 'failed', 'warning', 'info'];
49
+ expect(statuses).toHaveLength(4);
50
+ });
51
+ it('HookCheckResult is constructible with the canonical shape', () => {
52
+ const r = {
53
+ hook: 'pre-commit',
54
+ installed: true,
55
+ current: false,
56
+ sourcePath: '/pkg/templates/git-hooks/pre-commit',
57
+ installedPath: '/proj/.git/hooks/pre-commit',
58
+ };
59
+ expect(r.installed).toBe(true);
60
+ expect(r.current).toBe(false);
61
+ });
62
+ // The four `_Assert…Pinned` aliases above will fail compilation if
63
+ // any shape drifts. The following references prevent unused-locals
64
+ // diagnostics from removing them.
65
+ it('compile-time pins are wired (no-op at runtime)', () => {
66
+ const pinned = [1, 1, 1, 1];
67
+ expect(pinned).toEqual([1, 1, 1, 1]);
68
+ });
69
+ });
70
+ //# sourceMappingURL=scaffold-diagnostics.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scaffold-diagnostics.test.js","sourceRoot":"","sources":["../../src/__tests__/scaffold-diagnostics.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAyD9C,uEAAuE;AAEvE,QAAQ,CAAC,gCA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xE,MAAM,CAAC,QAAQ,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,2DAA2D,EAAE,GAAG,EAAE;QACnE,MAAM,CAAC,GAAoB;YACzB,IAAI,EAAE,YAAY;YAClB,SAAS,EAAE,IAAI;YACf,OAAO,EAAE,KAAK;YACd,UAAU,EAAE,qCAAqC;YACjD,aAAa,EAAE,6BAA6B;SAC7C,CAAC;QACF,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/B,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;IAEH,mEAAmE;IACnE,mEAAmE;IACnE,kCAAkC;IAClC,EAAE,CAAC,gDAAgD,EAAE,GAAG,EAAE;QACxD,MAAM,MAAM,GAKR,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QACjB,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Dispatch identity contracts.
3
+ *
4
+ * Canonical home for the three primitive identity types every dispatch
5
+ * operation is keyed on:
6
+ *
7
+ * - {@link Gateway} — CQRS read vs write classification
8
+ * - {@link Tier} — progressive-disclosure tier (0/1/2)
9
+ * - {@link CanonicalDomain} — the closed set of dispatch domains
10
+ *
11
+ * Promoted to `@cleocode/contracts` in Phase 0b of the SG-ARCH-SOLID
12
+ * Saga (T9831 · E-CONTRACTS-FOUNDATION T9832 · T9954) alongside
13
+ * {@link OperationDef} / {@link Resolution}. Originally defined in
14
+ * `packages/cleo/src/dispatch/types.ts` (lines 16, 27, 58, 86). The
15
+ * `packages/cleo` definition is now a re-export shim — every consumer
16
+ * continues to compile unchanged.
17
+ *
18
+ * `CANONICAL_DOMAINS` remains the runtime SSoT — adding/removing a
19
+ * domain still requires editing the array here exactly as before.
20
+ *
21
+ * @since SG-ARCH-SOLID Saga T9831 · E-CONTRACTS-FOUNDATION T9832 · T9954 (Phase 0b)
22
+ */
23
+ /**
24
+ * CQRS gateway: read-only queries vs state-modifying mutations.
25
+ *
26
+ * Originally defined in `packages/cleo/src/dispatch/types.ts:16`.
27
+ *
28
+ * @since SG-ARCH-SOLID Saga T9831 · E-CONTRACTS-FOUNDATION T9832 · T9954 (Phase 0b)
29
+ */
30
+ export type Gateway = 'query' | 'mutate';
31
+ /**
32
+ * Progressive disclosure tier.
33
+ *
34
+ * - `0` — tasks + session (~80% of agents)
35
+ * - `1` — + memory + check (~15% of agents)
36
+ * - `2` — + pipeline + orchestrate + tools + admin + nexus (~5%)
37
+ *
38
+ * Originally defined in `packages/cleo/src/dispatch/types.ts:27`.
39
+ *
40
+ * @since SG-ARCH-SOLID Saga T9831 · E-CONTRACTS-FOUNDATION T9832 · T9954 (Phase 0b)
41
+ */
42
+ export type Tier = 0 | 1 | 2;
43
+ /**
44
+ * The closed set of dispatch canonical-domain names.
45
+ *
46
+ * T964: `conduit` promoted to first-class domain (supersedes ADR-042 Decision 1).
47
+ * CONDUIT is agent-to-agent messaging and is semantically disjoint from
48
+ * ORCHESTRATE (wave planning + spawn-prompt generation). The original
49
+ * "exactly 10 canonical domains" invariant that justified folding CONDUIT
50
+ * under ORCHESTRATE has been broken multiple times (intelligence, diagnostics,
51
+ * docs, playbook); promoting CONDUIT aligns registry with wire-format, CLI,
52
+ * and core module structure at zero behavior cost.
53
+ *
54
+ * T1726: `sentient` and `release` promoted to first-class domains. Both were
55
+ * reachable via the CLI and had registered DomainHandlers but were absent from
56
+ * CANONICAL_DOMAINS, making them invisible to SDK consumers via OPERATIONS.
57
+ *
58
+ * Originally defined in `packages/cleo/src/dispatch/types.ts:58`.
59
+ *
60
+ * @since SG-ARCH-SOLID Saga T9831 · E-CONTRACTS-FOUNDATION T9832 · T9954 (Phase 0b)
61
+ */
62
+ export declare const CANONICAL_DOMAINS: readonly ["tasks", "session", "memory", "check", "pipeline", "orchestrate", "tools", "admin", "nexus", "sticky", "intelligence", "diagnostics", "docs", "playbook", "conduit", "sentient", "release", "llm", "provenance", "upgrade", "worktree", "focus"];
63
+ /**
64
+ * One of the canonical dispatch domain names.
65
+ *
66
+ * Derived as a string-literal union from {@link CANONICAL_DOMAINS} so
67
+ * adding/removing a domain in the array automatically updates the type.
68
+ *
69
+ * @since SG-ARCH-SOLID Saga T9831 · E-CONTRACTS-FOUNDATION T9832 · T9954 (Phase 0b)
70
+ */
71
+ export type CanonicalDomain = (typeof CANONICAL_DOMAINS)[number];
72
+ //# sourceMappingURL=identity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../src/dispatch/identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH;;;;;;GAMG;AACH,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC;AAIzC;;;;;;;;;;GAUG;AACH,MAAM,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAI7B;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,iBAAiB,4PA4BpB,CAAC;AAEX;;;;;;;GAOG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Dispatch identity contracts.
3
+ *
4
+ * Canonical home for the three primitive identity types every dispatch
5
+ * operation is keyed on:
6
+ *
7
+ * - {@link Gateway} — CQRS read vs write classification
8
+ * - {@link Tier} — progressive-disclosure tier (0/1/2)
9
+ * - {@link CanonicalDomain} — the closed set of dispatch domains
10
+ *
11
+ * Promoted to `@cleocode/contracts` in Phase 0b of the SG-ARCH-SOLID
12
+ * Saga (T9831 · E-CONTRACTS-FOUNDATION T9832 · T9954) alongside
13
+ * {@link OperationDef} / {@link Resolution}. Originally defined in
14
+ * `packages/cleo/src/dispatch/types.ts` (lines 16, 27, 58, 86). The
15
+ * `packages/cleo` definition is now a re-export shim — every consumer
16
+ * continues to compile unchanged.
17
+ *
18
+ * `CANONICAL_DOMAINS` remains the runtime SSoT — adding/removing a
19
+ * domain still requires editing the array here exactly as before.
20
+ *
21
+ * @since SG-ARCH-SOLID Saga T9831 · E-CONTRACTS-FOUNDATION T9832 · T9954 (Phase 0b)
22
+ */
23
+ // ── CanonicalDomain ──────────────────────────────────────────────────
24
+ /**
25
+ * The closed set of dispatch canonical-domain names.
26
+ *
27
+ * T964: `conduit` promoted to first-class domain (supersedes ADR-042 Decision 1).
28
+ * CONDUIT is agent-to-agent messaging and is semantically disjoint from
29
+ * ORCHESTRATE (wave planning + spawn-prompt generation). The original
30
+ * "exactly 10 canonical domains" invariant that justified folding CONDUIT
31
+ * under ORCHESTRATE has been broken multiple times (intelligence, diagnostics,
32
+ * docs, playbook); promoting CONDUIT aligns registry with wire-format, CLI,
33
+ * and core module structure at zero behavior cost.
34
+ *
35
+ * T1726: `sentient` and `release` promoted to first-class domains. Both were
36
+ * reachable via the CLI and had registered DomainHandlers but were absent from
37
+ * CANONICAL_DOMAINS, making them invisible to SDK consumers via OPERATIONS.
38
+ *
39
+ * Originally defined in `packages/cleo/src/dispatch/types.ts:58`.
40
+ *
41
+ * @since SG-ARCH-SOLID Saga T9831 · E-CONTRACTS-FOUNDATION T9832 · T9954 (Phase 0b)
42
+ */
43
+ export const CANONICAL_DOMAINS = [
44
+ 'tasks',
45
+ 'session',
46
+ 'memory',
47
+ 'check',
48
+ 'pipeline',
49
+ 'orchestrate',
50
+ 'tools',
51
+ 'admin',
52
+ 'nexus',
53
+ 'sticky',
54
+ 'intelligence',
55
+ 'diagnostics',
56
+ 'docs',
57
+ 'playbook',
58
+ 'conduit',
59
+ 'sentient',
60
+ 'release',
61
+ 'llm',
62
+ // T9528: provenance-graph maintenance verbs (backfill, verify, repair).
63
+ 'provenance',
64
+ // T9536: `cleo upgrade workflows` — re-render release-pipeline workflow
65
+ // templates + 3-way merge with `.workflow-overrides.yml`.
66
+ 'upgrade',
67
+ // T9546/T9547: 'cleo worktree list/prune/force-unlock' — worktree lifecycle.
68
+ 'worktree',
69
+ // T9973: 'cleo focus <id>' — single-envelope task orientation (8 calls → 1).
70
+ 'focus',
71
+ ];
72
+ //# sourceMappingURL=identity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity.js","sourceRoot":"","sources":["../../src/dispatch/identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AA4BH,wEAAwE;AAExE;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,OAAO;IACP,SAAS;IACT,QAAQ;IACR,OAAO;IACP,UAAU;IACV,aAAa;IACb,OAAO;IACP,OAAO;IACP,OAAO;IACP,QAAQ;IACR,cAAc;IACd,aAAa;IACb,MAAM;IACN,UAAU;IACV,SAAS;IACT,UAAU;IACV,SAAS;IACT,KAAK;IACL,wEAAwE;IACxE,YAAY;IACZ,wEAAwE;IACxE,0DAA0D;IAC1D,SAAS;IACT,6EAA6E;IAC7E,UAAU;IACV,6EAA6E;IAC7E,OAAO;CACC,CAAC"}
@@ -0,0 +1,92 @@
1
+ /**
2
+ * Dispatch operation-def contracts.
3
+ *
4
+ * Canonical home for the {@link OperationDef} and {@link Resolution}
5
+ * interfaces that describe a single dispatchable CQRS operation and the
6
+ * result of resolving one from the operation registry.
7
+ *
8
+ * Promoted to `@cleocode/contracts` in Phase 0b of the SG-ARCH-SOLID Saga
9
+ * (T9831 · E-CONTRACTS-FOUNDATION T9832 · T9954). Originally defined in
10
+ * `packages/cleo/src/dispatch/registry.ts` (lines 14-41 / 43-53). The
11
+ * `packages/cleo` definition is now a re-export shim — every consumer of
12
+ * `OperationDef` / `Resolution` continues to compile unchanged.
13
+ *
14
+ * This promotion unblocks E-CLI-BOUNDARY (T9833) — the registry data
15
+ * relocation can now move {@link OPERATIONS} into `@cleocode/contracts`
16
+ * (or split it without changing the type's canonical home) without
17
+ * crossing a circular dependency.
18
+ *
19
+ * NOT promoted (intentional — different concern):
20
+ * - `OPERATIONS: OperationDef[]` — the registry data itself remains in
21
+ * `packages/cleo/src/dispatch/registry.ts` and is the subject of the
22
+ * follow-up E-CLI-BOUNDARY epic.
23
+ * - The helper functions (`resolve`, `validateRequiredParams`,
24
+ * `getByDomain`, `getByGateway`, `getByTier`, `getActiveDomains`,
25
+ * `getCounts`, `deriveGatewayMatrix`, `getGatewayDomains`) — they
26
+ * operate on the data and remain colocated with it.
27
+ *
28
+ * @since SG-ARCH-SOLID Saga T9831 · E-CONTRACTS-FOUNDATION T9832 · T9954 (Phase 0b)
29
+ */
30
+ import type { ParamDef } from '../operations/params.js';
31
+ import type { CanonicalDomain, Gateway, Tier } from './identity.js';
32
+ export type { CanonicalDomain, Gateway, ParamDef, Tier };
33
+ /**
34
+ * Definition of a single dispatchable operation.
35
+ *
36
+ * Each entry in the operation registry (currently in
37
+ * `packages/cleo/src/dispatch/registry.ts`'s `OPERATIONS` array)
38
+ * conforms to this interface. The dispatcher uses these definitions to
39
+ * (1) route a {@link CanonicalDomain} + operation-name + {@link Gateway}
40
+ * triple to its handler, (2) validate that all required parameters are
41
+ * present, and (3) emit dispatch-validation telemetry.
42
+ *
43
+ * Originally defined in `packages/cleo/src/dispatch/registry.ts:14-41`.
44
+ *
45
+ * @since SG-ARCH-SOLID Saga T9831 · E-CONTRACTS-FOUNDATION T9832 · T9954 (Phase 0b)
46
+ */
47
+ export interface OperationDef {
48
+ /** The CQRS gateway ('query' or 'mutate'). */
49
+ gateway: Gateway;
50
+ /** The canonical domain this operation belongs to. */
51
+ domain: CanonicalDomain;
52
+ /** The specific operation name (e.g. 'show', 'skill.list'). */
53
+ operation: string;
54
+ /** Brief description of what the operation does. */
55
+ description: string;
56
+ /** Agent progressive-disclosure tier (0=basic, 1=memory/check, 2=full). */
57
+ tier: Tier;
58
+ /** Whether the operation is safe to retry. */
59
+ idempotent: boolean;
60
+ /** Whether this operation requires an active session. */
61
+ sessionRequired: boolean;
62
+ /** List of parameter keys that MUST be present in the request. */
63
+ requiredParams: string[];
64
+ /**
65
+ * Fully-described parameter list. Replaces `requiredParams` when populated.
66
+ * Empty array = "no declared params" (not "no params accepted").
67
+ * Optional during T4897 migration — defaults to [] when absent.
68
+ * @see T4897 for progressive migration
69
+ */
70
+ params?: ParamDef[];
71
+ }
72
+ /**
73
+ * Resolution output for a dispatch request.
74
+ *
75
+ * Returned by the `resolve(gateway, domain, operation)` helper in the
76
+ * operation registry. Bundles the resolved {@link OperationDef} with the
77
+ * already-typed `domain` + `operation` strings so downstream consumers
78
+ * don't have to re-narrow them.
79
+ *
80
+ * Originally defined in `packages/cleo/src/dispatch/registry.ts:43-53`.
81
+ *
82
+ * @since SG-ARCH-SOLID Saga T9831 · E-CONTRACTS-FOUNDATION T9832 · T9954 (Phase 0b)
83
+ */
84
+ export interface Resolution {
85
+ /** The canonical domain. */
86
+ domain: CanonicalDomain;
87
+ /** The operation name. */
88
+ operation: string;
89
+ /** The definition of the matched operation. */
90
+ def: OperationDef;
91
+ }
92
+ //# sourceMappingURL=operation-def.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operation-def.d.ts","sourceRoot":"","sources":["../../src/dispatch/operation-def.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAKpE,YAAY,EAAE,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAIzD;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,YAAY;IAC3B,8CAA8C;IAC9C,OAAO,EAAE,OAAO,CAAC;IACjB,sDAAsD;IACtD,MAAM,EAAE,eAAe,CAAC;IACxB,+DAA+D;IAC/D,SAAS,EAAE,MAAM,CAAC;IAClB,oDAAoD;IACpD,WAAW,EAAE,MAAM,CAAC;IACpB,2EAA2E;IAC3E,IAAI,EAAE,IAAI,CAAC;IACX,8CAA8C;IAC9C,UAAU,EAAE,OAAO,CAAC;IACpB,yDAAyD;IACzD,eAAe,EAAE,OAAO,CAAC;IACzB,kEAAkE;IAClE,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC;CACrB;AAID;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,UAAU;IACzB,4BAA4B;IAC5B,MAAM,EAAE,eAAe,CAAC;IACxB,0BAA0B;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,GAAG,EAAE,YAAY,CAAC;CACnB"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Dispatch operation-def contracts.
3
+ *
4
+ * Canonical home for the {@link OperationDef} and {@link Resolution}
5
+ * interfaces that describe a single dispatchable CQRS operation and the
6
+ * result of resolving one from the operation registry.
7
+ *
8
+ * Promoted to `@cleocode/contracts` in Phase 0b of the SG-ARCH-SOLID Saga
9
+ * (T9831 · E-CONTRACTS-FOUNDATION T9832 · T9954). Originally defined in
10
+ * `packages/cleo/src/dispatch/registry.ts` (lines 14-41 / 43-53). The
11
+ * `packages/cleo` definition is now a re-export shim — every consumer of
12
+ * `OperationDef` / `Resolution` continues to compile unchanged.
13
+ *
14
+ * This promotion unblocks E-CLI-BOUNDARY (T9833) — the registry data
15
+ * relocation can now move {@link OPERATIONS} into `@cleocode/contracts`
16
+ * (or split it without changing the type's canonical home) without
17
+ * crossing a circular dependency.
18
+ *
19
+ * NOT promoted (intentional — different concern):
20
+ * - `OPERATIONS: OperationDef[]` — the registry data itself remains in
21
+ * `packages/cleo/src/dispatch/registry.ts` and is the subject of the
22
+ * follow-up E-CLI-BOUNDARY epic.
23
+ * - The helper functions (`resolve`, `validateRequiredParams`,
24
+ * `getByDomain`, `getByGateway`, `getByTier`, `getActiveDomains`,
25
+ * `getCounts`, `deriveGatewayMatrix`, `getGatewayDomains`) — they
26
+ * operate on the data and remain colocated with it.
27
+ *
28
+ * @since SG-ARCH-SOLID Saga T9831 · E-CONTRACTS-FOUNDATION T9832 · T9954 (Phase 0b)
29
+ */
30
+ export {};
31
+ //# sourceMappingURL=operation-def.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operation-def.js","sourceRoot":"","sources":["../../src/dispatch/operation-def.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG"}
package/dist/doctor.d.ts CHANGED
@@ -136,6 +136,49 @@ export interface ComprehensiveAuditResult {
136
136
  anomalies: WorktreeAnomaly[];
137
137
  /** Total anomaly count. Non-zero triggers exit code 2. */
138
138
  count: number;
139
+ /**
140
+ * `true` when the audit was aborted early due to a width budget overflow
141
+ * or a timeout. The `anomalies` list reflects only the entries scanned
142
+ * before the abort — results may be incomplete.
143
+ */
144
+ isPartial?: boolean;
145
+ /**
146
+ * Machine-readable reason the scan was cut short.
147
+ * - `'timeout'`: the configured `timeoutMs` was exceeded.
148
+ * - `'overflow'`: a per-level entry count exceeded `maxEntriesPerLevel`.
149
+ */
150
+ partialReason?: 'timeout' | 'overflow';
151
+ }
152
+ /**
153
+ * Result shape returned by the budgeted orphan scanner
154
+ * ({@link scanWorktreeOrphansBudgeted}).
155
+ *
156
+ * Wraps the bare `OrphanEntry[]` from `scanWorktreeOrphans` with optional
157
+ * partial-result metadata so callers can surface incomplete scans to the
158
+ * operator without changing the existing `OrphanEntry[]` return type.
159
+ */
160
+ export interface OrphanScanResult {
161
+ /** Discovered orphan entries (may be incomplete when `isPartial` is `true`). */
162
+ orphans: OrphanEntry[];
163
+ /**
164
+ * `true` when the scan was aborted before completion due to a budget
165
+ * overflow or timeout. The `orphans` list reflects only entries found
166
+ * before the abort.
167
+ */
168
+ isPartial: boolean;
169
+ /**
170
+ * Machine-readable reason the scan was cut short.
171
+ * - `'timeout'`: the configured `timeoutMs` was exceeded.
172
+ * - `'overflow'`: a per-level entry count exceeded `maxEntriesPerLevel`.
173
+ * `undefined` when `isPartial` is `false`.
174
+ */
175
+ partialReason?: 'timeout' | 'overflow';
176
+ /**
177
+ * Human-readable warning message produced when the soft-warn threshold
178
+ * was crossed (entries per level exceeded `softWarnEntriesPerLevel` but
179
+ * stayed under the hard stop). `undefined` when no warning was triggered.
180
+ */
181
+ softWarnMessage?: string;
139
182
  }
140
183
  /**
141
184
  * One line appended to `.cleo/audit/worktree-prune.jsonl` per prune
@@ -1 +1 @@
1
- {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;;;;;;;GAUG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;IAElB,sEAAsE;IACtE,SAAS,EAAE,MAAM,CAAC;IAElB,gFAAgF;IAChF,cAAc,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B;;;OAGG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B,yEAAyE;IACzE,MAAM,EAAE,OAAO,CAAC;IAEhB,2EAA2E;IAC3E,MAAM,EAAE,WAAW,EAAE,CAAC;IAEtB;;;;OAIG;IAC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I,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,0DAA0D;IAC1D,WAAW,EAAE,MAAM,CAAC;IACpB,yEAAyE;IACzE,sBAAsB,EAAE,MAAM,CAAC;IAC/B,4DAA4D;IAC5D,SAAS,EAAE,eAAe,EAAE,CAAC;IAC7B,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,aAAa,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;CACxC;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B,gFAAgF;IAChF,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB;;;;OAIG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;IACvC;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,eAAe;IAC9B,0BAA0B;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,YAAY,EAAE,MAAM,CAAC;IACrB,8DAA8D;IAC9D,UAAU,EAAE,MAAM,CAAC;IACnB,sEAAsE;IACtE,MAAM,EAAE,uBAAuB,CAAC;IAChC,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,8DAA8D;IAC9D,WAAW,EAAE,MAAM,CAAC;IACpB,kEAAkE;IAClE,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,wEAAwE;IACxE,MAAM,EAAE,OAAO,CAAC;CACjB"}
@@ -0,0 +1,123 @@
1
+ /**
2
+ * Canonical task-axis enum constants.
3
+ *
4
+ * Single source of truth for the runtime const arrays that back the
5
+ * task-axis discriminators (kind, scope, severity, size, archive reason,
6
+ * relation type). Promoted from `packages/core/src/store/tasks-schema.ts`
7
+ * in Phase 0c of the SG-ARCH-SOLID Saga so that downstream packages can
8
+ * import the values without pulling in the Drizzle schema runtime.
9
+ *
10
+ * `tasks-schema.ts` imports these arrays back for Drizzle's
11
+ * `text({ enum: ... })` column declarations, which preserves byte-identical
12
+ * row-type narrowing and produces zero schema DDL change. `tasks-schema.ts`
13
+ * also re-exports each constant under its original name to preserve the
14
+ * existing public surface for every internal `import * as schema` consumer.
15
+ *
16
+ * The corresponding union types (`TaskKind`, `TaskScope`, `TaskSeverity`,
17
+ * `TaskSize`, `ArchiveReasonValue`, etc.) already live in their respective
18
+ * domain modules (`./task.ts`, `./tasks/archive.ts`) and are re-exported
19
+ * from the package root.
20
+ *
21
+ * @since SG-ARCH-SOLID Saga T9831 · E-CONTRACTS-FOUNDATION T9832 · T9955 (Phase 0c)
22
+ */
23
+ /**
24
+ * Task kind axis — describes the intent of the work rather than its
25
+ * position in the hierarchy. Defaults to `'work'` to preserve semantics
26
+ * for tasks created before T944.
27
+ *
28
+ * Note: the DB column is named `role`; the TypeScript field is `kind`
29
+ * (T9067 deferral).
30
+ *
31
+ * @task T944
32
+ * @task T9072
33
+ */
34
+ export declare const TASK_KINDS: readonly ["work", "research", "experiment", "bug", "spike", "release"];
35
+ /**
36
+ * Task scope axis — describes the granularity of the work (project-wide
37
+ * vs. feature-scoped vs. unit-scoped). Orthogonal to type and kind.
38
+ *
39
+ * Backfill mapping from legacy `type` during migration:
40
+ * - `type='epic'` → `scope='project'`
41
+ * - `type='task'` → `scope='feature'` (also used for NULL legacy rows)
42
+ * - `type='subtask'` → `scope='unit'`
43
+ *
44
+ * @task T944
45
+ */
46
+ export declare const TASK_SCOPES: readonly ["project", "feature", "unit"];
47
+ /**
48
+ * Task severity axis — applies to ANY task kind (not just `kind='bug'`).
49
+ *
50
+ * Enforced by a CHECK constraint:
51
+ * `severity IS NULL OR severity IN ('P0','P1','P2','P3')`
52
+ *
53
+ * The original T944 constraint coupled severity to `role='bug'`. T9073
54
+ * widened the constraint so that spikes, incidents, research tasks, and
55
+ * any other kind can carry a severity level. Priority and severity are
56
+ * fully orthogonal axes — setting severity does NOT auto-map to priority
57
+ * (no SEVERITY_MAP on add/update).
58
+ *
59
+ * OWNER-WRITE-ONLY (T944 / T9073 / owner mandate): severity is set
60
+ * through owner-authenticated paths only (signed attestation via
61
+ * `appendSignedSeverityAttestation`). This prevents a prompt-injection
62
+ * exploit where a compromised agent could mark a P0 task as P3 to
63
+ * force-ship.
64
+ *
65
+ * @task T944
66
+ * @task T9073
67
+ */
68
+ export declare const TASK_SEVERITIES: readonly ["P0", "P1", "P2", "P3"];
69
+ /**
70
+ * Task size sentinel values matching the DB CHECK constraint on
71
+ * `tasks.size`. CLEO favors qualitative sizing over time estimates
72
+ * (see `cleo memory` rule "No time estimates").
73
+ *
74
+ * @task T944
75
+ */
76
+ export declare const TASK_SIZES: readonly ["small", "medium", "large"];
77
+ /**
78
+ * Truth-grade archive reason values enforced by a SQLite CHECK
79
+ * constraint on `tasks.archive_reason` (see migration
80
+ * `20260424000000_t1408-archive-reason-enum`).
81
+ *
82
+ * Council 2026-04-24 (FINDING #28 + T1407 follow-through) replaced the
83
+ * legacy unconstrained TEXT column with this 6-value enum. Rows that
84
+ * pre-dated the migration with non-conforming values (`completed`,
85
+ * `deleted`, etc.) were normalized to `'completed-unverified'` before
86
+ * the CHECK was applied, so EVERY existing row satisfies one of these
87
+ * literals (or is `NULL`).
88
+ *
89
+ * Semantics:
90
+ * - `verified` — closure passed all gates with audit-grade evidence.
91
+ * - `reconciled` — closure derived by reconciliation against an
92
+ * external source of truth (e.g. external task tracker).
93
+ * - `superseded` — closure because another task subsumes the work.
94
+ * - `shadowed` — closure because the task was experiment- or
95
+ * proposal-shadowed by a newer plan.
96
+ * - `cancelled` — closure via explicit cancellation
97
+ * (`status='cancelled'`).
98
+ * - `completed-unverified` — closure happened but verification was skipped,
99
+ * incomplete, or failed; metrics MUST NOT count
100
+ * these as quality completions without opt-in.
101
+ *
102
+ * @task T1408
103
+ * @epic T1407
104
+ */
105
+ export declare const ARCHIVE_REASONS: readonly ["verified", "reconciled", "superseded", "shadowed", "cancelled", "completed-unverified"];
106
+ /**
107
+ * Task relation types matching the DB CHECK constraint on
108
+ * `task_relations.relation_type`.
109
+ *
110
+ * - `related` — generic non-blocking association
111
+ * - `blocks` — source MUST complete before target can proceed
112
+ * - `duplicates` — source is a duplicate of target (target is canonical)
113
+ * - `absorbs` — source's work was absorbed into target
114
+ * - `fixes` — source fixes target (bug→fix linkage)
115
+ * - `extends` — source extends or refines target
116
+ * - `supersedes` — source replaces target (target is retired)
117
+ * - `groups` — source groups target (Saga→Epic per ADR-073)
118
+ *
119
+ * @task T944
120
+ * @task ADR-073 (`groups` relation for Saga membership)
121
+ */
122
+ export declare const TASK_RELATION_TYPES: readonly ["related", "blocks", "duplicates", "absorbs", "fixes", "extends", "supersedes", "groups"];
123
+ //# sourceMappingURL=enums.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../src/enums.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU,wEAAyE,CAAC;AAEjG;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,yCAA0C,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,eAAe,mCAAoC,CAAC;AAEjE;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,uCAAwC,CAAC;AAEhE;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,eAAe,oGAOlB,CAAC;AAEX;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,mBAAmB,qGAStB,CAAC"}