@cleocode/contracts 2026.10.27 → 2026.11.1-canary.10

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 (289) hide show
  1. package/README.md +2 -1
  2. package/dist/.source-stamp.json +4 -0
  3. package/dist/__tests__/acceptance-gate.test.js +15 -3
  4. package/dist/__tests__/acceptance-gate.test.js.map +1 -1
  5. package/dist/__tests__/completion-operation-contracts.test.js +1 -1
  6. package/dist/__tests__/completion-operation-contracts.test.js.map +1 -1
  7. package/dist/__tests__/evidence-atom-schema.test.js +3 -1
  8. package/dist/__tests__/evidence-atom-schema.test.js.map +1 -1
  9. package/dist/__tests__/gateway-contract.test.js +1 -1
  10. package/dist/__tests__/gateway-contract.test.js.map +1 -1
  11. package/dist/__tests__/memory-wire-shapes.test.js.map +1 -1
  12. package/dist/__tests__/operation-def.test.js +4 -3
  13. package/dist/__tests__/operation-def.test.js.map +1 -1
  14. package/dist/acceptance-gate-schema.d.ts +25 -0
  15. package/dist/acceptance-gate-schema.d.ts.map +1 -1
  16. package/dist/acceptance-gate-schema.js +5 -0
  17. package/dist/acceptance-gate-schema.js.map +1 -1
  18. package/dist/acceptance-gate.d.ts +8 -0
  19. package/dist/acceptance-gate.d.ts.map +1 -1
  20. package/dist/brain-graph.d.ts +1 -1
  21. package/dist/brain-graph.js +1 -1
  22. package/dist/caamp-markers.d.ts +11 -0
  23. package/dist/caamp-markers.d.ts.map +1 -1
  24. package/dist/config/manifest.d.ts.map +1 -1
  25. package/dist/config/manifest.js +13 -0
  26. package/dist/config/manifest.js.map +1 -1
  27. package/dist/{config.d.ts → config/types.d.ts} +130 -6
  28. package/dist/config/types.d.ts.map +1 -0
  29. package/dist/{config.js → config/types.js} +1 -1
  30. package/dist/config/types.js.map +1 -0
  31. package/dist/config/worker-policy.d.ts +42 -0
  32. package/dist/config/worker-policy.d.ts.map +1 -0
  33. package/dist/config/worker-policy.js +35 -0
  34. package/dist/config/worker-policy.js.map +1 -0
  35. package/dist/data-accessor.d.ts +15 -0
  36. package/dist/data-accessor.d.ts.map +1 -1
  37. package/dist/data-accessor.js.map +1 -1
  38. package/dist/dependency.d.ts +2 -0
  39. package/dist/dependency.d.ts.map +1 -1
  40. package/dist/dispatch/__tests__/operation-envelope-snapshots.test.js +0 -6
  41. package/dist/dispatch/__tests__/operation-envelope-snapshots.test.js.map +1 -1
  42. package/dist/dispatch/identity.d.ts +3 -8
  43. package/dist/dispatch/identity.d.ts.map +1 -1
  44. package/dist/dispatch/identity.js +2 -8
  45. package/dist/dispatch/identity.js.map +1 -1
  46. package/dist/dispatch/operations-registry.d.ts.map +1 -1
  47. package/dist/dispatch/operations-registry.js +360 -513
  48. package/dist/dispatch/operations-registry.js.map +1 -1
  49. package/dist/docs/modernize.d.ts +468 -0
  50. package/dist/docs/modernize.d.ts.map +1 -0
  51. package/dist/docs/modernize.js +145 -0
  52. package/dist/docs/modernize.js.map +1 -0
  53. package/dist/docs/provenance.d.ts +6 -6
  54. package/dist/docs-taxonomy.d.ts +6 -0
  55. package/dist/docs-taxonomy.d.ts.map +1 -1
  56. package/dist/docs-taxonomy.js +38 -1
  57. package/dist/docs-taxonomy.js.map +1 -1
  58. package/dist/done-plan.d.ts +34 -3
  59. package/dist/done-plan.d.ts.map +1 -1
  60. package/dist/evidence-atom-schema.d.ts +78 -4
  61. package/dist/evidence-atom-schema.d.ts.map +1 -1
  62. package/dist/evidence-atom-schema.js +136 -11
  63. package/dist/evidence-atom-schema.js.map +1 -1
  64. package/dist/evidence-record-schema.d.ts +2 -2
  65. package/dist/exit-codes.d.ts +93 -0
  66. package/dist/exit-codes.d.ts.map +1 -1
  67. package/dist/exit-codes.js +93 -0
  68. package/dist/exit-codes.js.map +1 -1
  69. package/dist/{gateway.d.ts → gateway/index.d.ts} +4 -4
  70. package/dist/gateway/index.d.ts.map +1 -0
  71. package/dist/{gateway.js → gateway/index.js} +2 -2
  72. package/dist/gateway/index.js.map +1 -0
  73. package/dist/gateway/rpc/messages.d.ts +4 -4
  74. package/dist/gateway/rpc/messages.js +1 -1
  75. package/dist/gateway/rpc/messages.js.map +1 -1
  76. package/dist/git-hooks.d.ts +29 -3
  77. package/dist/git-hooks.d.ts.map +1 -1
  78. package/dist/git-hooks.js +34 -3
  79. package/dist/git-hooks.js.map +1 -1
  80. package/dist/heavy-command-hook.d.ts +5 -0
  81. package/dist/heavy-command-hook.d.ts.map +1 -1
  82. package/dist/index.d.ts +23 -19
  83. package/dist/index.d.ts.map +1 -1
  84. package/dist/index.js +10 -6
  85. package/dist/index.js.map +1 -1
  86. package/dist/invariants/sync-write-invariants.d.ts.map +1 -1
  87. package/dist/invariants/sync-write-invariants.js +29 -1
  88. package/dist/invariants/sync-write-invariants.js.map +1 -1
  89. package/dist/jobs.d.ts +5 -0
  90. package/dist/jobs.d.ts.map +1 -1
  91. package/dist/lease-ipc/messages.d.ts +5 -5
  92. package/dist/llm/onboarding.d.ts +1 -1
  93. package/dist/llm/system-of-use.d.ts +1 -1
  94. package/dist/llm/system-of-use.d.ts.map +1 -1
  95. package/dist/llm/system-resolver.d.ts +1 -1
  96. package/dist/llm/system-resolver.d.ts.map +1 -1
  97. package/dist/{memory.d.ts → memory/index.d.ts} +1 -1
  98. package/dist/memory/index.d.ts.map +1 -0
  99. package/dist/{memory.js → memory/index.js} +1 -1
  100. package/dist/memory/index.js.map +1 -0
  101. package/dist/memory/search.d.ts +20 -2
  102. package/dist/memory/search.d.ts.map +1 -1
  103. package/dist/merge-close.d.ts +277 -0
  104. package/dist/merge-close.d.ts.map +1 -0
  105. package/dist/merge-close.js +16 -0
  106. package/dist/merge-close.js.map +1 -0
  107. package/dist/nexus-cloud.d.ts +1 -1
  108. package/dist/operations/admin.d.ts +6 -0
  109. package/dist/operations/admin.d.ts.map +1 -1
  110. package/dist/operations/docs.d.ts +233 -9
  111. package/dist/operations/docs.d.ts.map +1 -1
  112. package/dist/operations/docs.js.map +1 -1
  113. package/dist/operations/index.d.ts +0 -1
  114. package/dist/operations/index.d.ts.map +1 -1
  115. package/dist/operations/index.js +0 -1
  116. package/dist/operations/index.js.map +1 -1
  117. package/dist/operations/memory.d.ts +7 -4
  118. package/dist/operations/memory.d.ts.map +1 -1
  119. package/dist/operations/nexus-scope-map.d.ts +0 -8
  120. package/dist/operations/nexus-scope-map.d.ts.map +1 -1
  121. package/dist/operations/nexus-scope-map.js +0 -8
  122. package/dist/operations/nexus-scope-map.js.map +1 -1
  123. package/dist/operations/nexus.d.ts +2 -10
  124. package/dist/operations/nexus.d.ts.map +1 -1
  125. package/dist/operations/nexus.js.map +1 -1
  126. package/dist/operations/orchestrate.d.ts +219 -6
  127. package/dist/operations/orchestrate.d.ts.map +1 -1
  128. package/dist/operations/orchestrate.js +329 -1
  129. package/dist/operations/orchestrate.js.map +1 -1
  130. package/dist/operations/output-contracts-data.js +1 -1
  131. package/dist/operations/output-contracts-data.js.map +1 -1
  132. package/dist/operations/release.d.ts +0 -79
  133. package/dist/operations/release.d.ts.map +1 -1
  134. package/dist/operations/session.d.ts +1 -1
  135. package/dist/operations/session.d.ts.map +1 -1
  136. package/dist/operations/tasks.d.ts +18 -6
  137. package/dist/operations/tasks.d.ts.map +1 -1
  138. package/dist/operations/tasks.js.map +1 -1
  139. package/dist/operations/validate.d.ts +6 -0
  140. package/dist/operations/validate.d.ts.map +1 -1
  141. package/dist/operations/worktree.d.ts +209 -19
  142. package/dist/operations/worktree.d.ts.map +1 -1
  143. package/dist/orca-execution.d.ts +489 -0
  144. package/dist/orca-execution.d.ts.map +1 -0
  145. package/dist/orca-execution.js +362 -0
  146. package/dist/orca-execution.js.map +1 -0
  147. package/dist/project-context.d.ts +31 -0
  148. package/dist/project-context.d.ts.map +1 -1
  149. package/dist/project-hooks.d.ts +8 -8
  150. package/dist/release/authorization.d.ts +46 -0
  151. package/dist/release/authorization.d.ts.map +1 -0
  152. package/dist/release/authorization.js +10 -0
  153. package/dist/release/authorization.js.map +1 -0
  154. package/dist/release/hook-pilot.d.ts +1 -1
  155. package/dist/resource-governor.d.ts +44 -0
  156. package/dist/resource-governor.d.ts.map +1 -1
  157. package/dist/resource-governor.js +10 -0
  158. package/dist/resource-governor.js.map +1 -1
  159. package/dist/review-verdict.d.ts +253 -0
  160. package/dist/review-verdict.d.ts.map +1 -0
  161. package/dist/review-verdict.js +20 -0
  162. package/dist/review-verdict.js.map +1 -0
  163. package/dist/row-identity.d.ts +11 -0
  164. package/dist/row-identity.d.ts.map +1 -1
  165. package/dist/session-journal.d.ts.map +1 -1
  166. package/dist/session-journal.js +7 -1
  167. package/dist/session-journal.js.map +1 -1
  168. package/dist/session.d.ts +11 -0
  169. package/dist/session.d.ts.map +1 -1
  170. package/dist/session.js.map +1 -1
  171. package/dist/skills/migrate.d.ts +1 -1
  172. package/dist/skills/migrate.js +1 -1
  173. package/dist/skills/stats.d.ts +1 -1
  174. package/dist/skills/stats.js +1 -1
  175. package/dist/spawn-types.d.ts +57 -0
  176. package/dist/spawn-types.d.ts.map +1 -1
  177. package/dist/spawn.d.ts +43 -0
  178. package/dist/spawn.d.ts.map +1 -1
  179. package/dist/spawn.js +1 -0
  180. package/dist/spawn.js.map +1 -1
  181. package/dist/status-registry.d.ts +27 -0
  182. package/dist/status-registry.d.ts.map +1 -1
  183. package/dist/status-registry.js +28 -0
  184. package/dist/status-registry.js.map +1 -1
  185. package/dist/table-classification.d.ts +22 -0
  186. package/dist/table-classification.d.ts.map +1 -1
  187. package/dist/task-id.d.ts +8 -10
  188. package/dist/task-id.d.ts.map +1 -1
  189. package/dist/task-id.js +9 -48
  190. package/dist/task-id.js.map +1 -1
  191. package/dist/task-record.d.ts +10 -1
  192. package/dist/task-record.d.ts.map +1 -1
  193. package/dist/task.d.ts +177 -4
  194. package/dist/task.d.ts.map +1 -1
  195. package/dist/task.js.map +1 -1
  196. package/dist/{tasks.d.ts → tasks/index.d.ts} +3 -3
  197. package/dist/tasks/index.d.ts.map +1 -0
  198. package/dist/{tasks.js → tasks/index.js} +2 -2
  199. package/dist/tasks/index.js.map +1 -0
  200. package/dist/templates/manifest.d.ts +1 -1
  201. package/dist/tools/build-task-tree.d.ts +1 -1
  202. package/dist/tools/build-task-tree.d.ts.map +1 -1
  203. package/dist/workgraph.d.ts +56 -56
  204. package/package.json +22 -6
  205. package/schemas/acceptance-gate.schema.json +24 -0
  206. package/schemas/task.schema.json +24 -0
  207. package/src/__tests__/__snapshots__/operations-registry.test.ts.snap +1 -1
  208. package/src/__tests__/acceptance-gate.test.ts +16 -3
  209. package/src/__tests__/completion-operation-contracts.test.ts +1 -1
  210. package/src/__tests__/evidence-atom-schema.test.ts +3 -1
  211. package/src/__tests__/gateway-contract.test.ts +1 -1
  212. package/src/__tests__/llm-config-schema.test.ts +1 -1
  213. package/src/__tests__/memory-wire-shapes.test.ts +4 -1
  214. package/src/__tests__/operation-def.test.ts +4 -3
  215. package/src/acceptance-gate-schema.ts +5 -0
  216. package/src/acceptance-gate.ts +9 -0
  217. package/src/brain-graph.ts +1 -1
  218. package/src/caamp-markers.ts +11 -0
  219. package/src/config/manifest.ts +13 -0
  220. package/src/{config.ts → config/types.ts} +134 -5
  221. package/src/config/worker-policy.ts +55 -0
  222. package/src/data-accessor.ts +16 -0
  223. package/src/dependency.ts +2 -0
  224. package/src/dispatch/__tests__/operation-envelope-snapshots.test.ts +0 -6
  225. package/src/dispatch/identity.ts +2 -8
  226. package/src/dispatch/operations-registry.ts +377 -525
  227. package/src/docs/modernize.ts +442 -0
  228. package/src/docs-taxonomy.ts +44 -1
  229. package/src/done-plan.ts +33 -2
  230. package/src/evidence-atom-schema.ts +167 -14
  231. package/src/exit-codes.ts +95 -0
  232. package/src/{gateway.ts → gateway/index.ts} +3 -3
  233. package/src/gateway/rpc/messages.ts +1 -1
  234. package/src/git-hooks.ts +43 -3
  235. package/src/heavy-command-hook.ts +5 -0
  236. package/src/index.ts +132 -48
  237. package/src/invariants/sync-write-invariants.ts +30 -0
  238. package/src/jobs.ts +5 -0
  239. package/src/llm/onboarding.ts +1 -1
  240. package/src/llm/system-of-use.ts +1 -1
  241. package/src/llm/system-resolver.ts +1 -1
  242. package/src/memory/search.ts +17 -2
  243. package/src/merge-close.ts +291 -0
  244. package/src/operations/admin.ts +6 -0
  245. package/src/operations/docs.ts +242 -10
  246. package/src/operations/index.ts +0 -1
  247. package/src/operations/memory.ts +7 -4
  248. package/src/operations/nexus-scope-map.ts +0 -8
  249. package/src/operations/nexus.ts +2 -11
  250. package/src/operations/orchestrate.ts +490 -6
  251. package/src/operations/output-contracts-data.ts +1 -1
  252. package/src/operations/release.ts +0 -87
  253. package/src/operations/session.ts +1 -1
  254. package/src/operations/tasks.ts +20 -7
  255. package/src/operations/validate.ts +6 -0
  256. package/src/operations/worktree.ts +216 -19
  257. package/src/orca-execution.ts +493 -0
  258. package/src/project-context.ts +33 -0
  259. package/src/release/authorization.ts +48 -0
  260. package/src/resource-governor.ts +47 -0
  261. package/src/review-verdict.ts +265 -0
  262. package/src/row-identity.ts +11 -0
  263. package/src/session-journal.ts +7 -1
  264. package/src/session.ts +11 -0
  265. package/src/skills/migrate.ts +1 -1
  266. package/src/skills/stats.ts +1 -1
  267. package/src/spawn-types.ts +75 -0
  268. package/src/spawn.ts +48 -0
  269. package/src/status-registry.ts +37 -0
  270. package/src/table-classification.ts +23 -0
  271. package/src/task-id.ts +9 -47
  272. package/src/task-record.ts +10 -1
  273. package/src/task.ts +171 -4
  274. package/src/{tasks.ts → tasks/index.ts} +3 -3
  275. package/src/tools/build-task-tree.ts +1 -1
  276. package/dist/config.d.ts.map +0 -1
  277. package/dist/config.js.map +0 -1
  278. package/dist/gateway.d.ts.map +0 -1
  279. package/dist/gateway.js.map +0 -1
  280. package/dist/memory.d.ts.map +0 -1
  281. package/dist/memory.js.map +0 -1
  282. package/dist/operations/conduit.d.ts +0 -285
  283. package/dist/operations/conduit.d.ts.map +0 -1
  284. package/dist/operations/conduit.js +0 -39
  285. package/dist/operations/conduit.js.map +0 -1
  286. package/dist/tasks.d.ts.map +0 -1
  287. package/dist/tasks.js.map +0 -1
  288. package/src/operations/conduit.ts +0 -348
  289. /package/src/{memory.ts → memory/index.ts} +0 -0
package/src/index.ts CHANGED
@@ -288,6 +288,7 @@ export type {
288
288
  DepsRequiredAt,
289
289
  EnforcementProfile,
290
290
  HierarchyConfig,
291
+ LeadMailbox,
291
292
  LeadRollupConfig,
292
293
  LeadRollupMode,
293
294
  LifecycleConfig,
@@ -307,6 +308,9 @@ export type {
307
308
  NexusConfig,
308
309
  NexusFreshnessConfig,
309
310
  NexusReindexOnMergeConfig,
311
+ OrchestrateConfig,
312
+ OrchestrateContextThresholds,
313
+ OrchestrateLeadWorkerConfig,
310
314
  OutputConfig,
311
315
  OutputFormat,
312
316
  ProviderConfig,
@@ -321,7 +325,7 @@ export type {
321
325
  SignalDockConfig,
322
326
  SignalDockMode,
323
327
  SystemBinding,
324
- } from './config.js';
328
+ } from './config/types.js';
325
329
  export type { AdapterContextMonitorProvider } from './context-monitor.js';
326
330
  // === Credential Transfer Types (T12326 — portable credentials) ===
327
331
  export type {
@@ -422,6 +426,32 @@ export { CANONICAL_DOMAINS } from './dispatch/identity.js';
422
426
  export type { OperationDef, Resolution } from './dispatch/operation-def.js';
423
427
  // === Dispatch OPERATIONS data + builder helpers (T10061 — T9833b / E-CLI-BOUNDARY / SG-ARCH-SOLID) ===
424
428
  export { defineDomain, defineOp, OPERATIONS } from './dispatch/operations-registry.js';
429
+ // === docs modernize plan + receipt (T14113) ===
430
+ export type {
431
+ DocsModernizeDisposition,
432
+ DocsModernizeJudgment,
433
+ DocsModernizeJudgmentQuestion,
434
+ DocsModernizeJudgmentSource,
435
+ DocsModernizeLinkFix,
436
+ DocsModernizeOpKind,
437
+ DocsModernizeOpPrior,
438
+ DocsModernizeOpState,
439
+ DocsModernizeOverride,
440
+ DocsModernizeOverrides,
441
+ DocsModernizePlan,
442
+ DocsModernizePlanRow,
443
+ DocsModernizeReceipt,
444
+ DocsModernizeReceiptOp,
445
+ DocsModernizeStoreRow,
446
+ } from './docs/modernize.js';
447
+ export {
448
+ DOCS_MODERNIZE_DISPOSITIONS,
449
+ DOCS_MODERNIZE_OPS,
450
+ docsModernizeJournalLineSchema,
451
+ docsModernizeOverridesSchema,
452
+ docsModernizePlanSchema,
453
+ docsModernizeReceiptSchema,
454
+ } from './docs/modernize.js';
425
455
  // === Docs Provenance Graph (T10166 / Saga T9855 / E12) ===
426
456
  export type {
427
457
  DocLifecycleStatus,
@@ -613,6 +643,7 @@ export type {
613
643
  EvidenceValidationFailure,
614
644
  EvidenceValidationResult,
615
645
  GateEvidenceRequirement,
646
+ GateProfileName,
616
647
  } from './evidence-atom-schema.js';
617
648
  export {
618
649
  AC_ALIAS_REGEX,
@@ -627,8 +658,10 @@ export {
627
658
  formatGateRequirement,
628
659
  formatGateRequirementHint,
629
660
  GATE_EVIDENCE_REQUIREMENTS,
661
+ GATE_PROFILE_NAMES,
630
662
  locDropAtomSchema,
631
663
  noteAtomSchema,
664
+ PROFILE_GATE_EVIDENCE,
632
665
  parseEvidenceString,
633
666
  prAtomSchema,
634
667
  qaRunAtomSchema,
@@ -688,8 +721,11 @@ export {
688
721
  E_INVALID_PIPELINE_STAGE,
689
722
  E_INVALID_SEVERITY_VALUE,
690
723
  E_INVALID_STATE,
724
+ // T14356 / epic T14351 — lead/worker split
725
+ E_LEAD_TOOLS_UNSTRIPPED,
691
726
  E_PLAN_NOT_FOUND,
692
727
  E_RELEASE_PLAN_INVALID,
728
+ E_WORKER_REPORT_PROOF,
693
729
  E_WORKFLOW_NOT_FOUND,
694
730
  // gh#391 — application-level SQLITE_BUSY retry exhaustion (T9839)
695
731
  E_WRITE_CONTENTION,
@@ -1187,6 +1223,22 @@ export type {
1187
1223
  FetchBrainEntriesResult,
1188
1224
  FetchedBrainEntry,
1189
1225
  } from './memory/fetch.js';
1226
+ export type {
1227
+ BridgeDecision,
1228
+ BridgeLearning,
1229
+ BridgeObservation,
1230
+ BridgePattern,
1231
+ DispatchTrace,
1232
+ // T9766 — BRAIN public-API records (centralized from @cleocode/core)
1233
+ LearningRecord,
1234
+ MemoryBridgeConfig,
1235
+ MemoryBridgeContent,
1236
+ MemoryDecisionRecord,
1237
+ MemoryGraphStats,
1238
+ MemorySearchHit,
1239
+ PatternRecord,
1240
+ SessionSummary,
1241
+ } from './memory/index.js';
1190
1242
  export type {
1191
1243
  BrainObservationSourceType,
1192
1244
  DocAttachmentObservationPayload,
@@ -1207,21 +1259,21 @@ export type {
1207
1259
  TimelineNeighbor,
1208
1260
  } from './memory/timeline.js';
1209
1261
  export type {
1210
- BridgeDecision,
1211
- BridgeLearning,
1212
- BridgeObservation,
1213
- BridgePattern,
1214
- DispatchTrace,
1215
- // T9766 — BRAIN public-API records (centralized from @cleocode/core)
1216
- LearningRecord,
1217
- MemoryBridgeConfig,
1218
- MemoryBridgeContent,
1219
- MemoryDecisionRecord,
1220
- MemoryGraphStats,
1221
- MemorySearchHit,
1222
- PatternRecord,
1223
- SessionSummary,
1224
- } from './memory.js';
1262
+ MacosRegressionSync,
1263
+ MergeAttributionFailure,
1264
+ MergeAttributionReceipt,
1265
+ MergeAttributionResolution,
1266
+ MergeAttributionRunPin,
1267
+ MergeAttributionVerdict,
1268
+ MergeDirective,
1269
+ MergePrOutcome,
1270
+ MergeReceipt,
1271
+ MergeSweepHooks,
1272
+ MergeSweepOptions,
1273
+ MergeSweepReconcile,
1274
+ MergeSweepResult,
1275
+ MergeTaskOutcome,
1276
+ } from './merge-close.js';
1225
1277
  export type {
1226
1278
  MigrationEnumDrift,
1227
1279
  MigrationForeignKeyViolation,
@@ -1381,34 +1433,6 @@ export type {
1381
1433
  AdminTokenQueryParams,
1382
1434
  AdminVersionParams,
1383
1435
  } from './operations/admin.js';
1384
- // === Conduit Operation Types (T1422 — typed-dispatch migration) ===
1385
- // Re-exported at top level so CLI dispatch can import without the `ops.` namespace hop.
1386
- // Note: The transport-layer ConduitSendResult (in ./conduit.ts) carries { messageId, deliveredAt }
1387
- // and is the canonical type for the Conduit interface (ConduitClient / publishToTopic).
1388
- // ConduitSendOperationResult (below) is the wire-format type for the conduit.send CLI/HTTP
1389
- // dispatch operation and carries { messageId, from, to, transport, sentAt }.
1390
- // The two types serve different layers and are intentionally distinct.
1391
- export type {
1392
- ConduitInboxMessage,
1393
- ConduitListenParams,
1394
- ConduitListenResult,
1395
- ConduitOps,
1396
- ConduitPeekParams,
1397
- ConduitPeekResult,
1398
- ConduitPublishParams,
1399
- ConduitPublishResult,
1400
- ConduitSendOperationResult,
1401
- ConduitSendParams,
1402
- ConduitStartParams,
1403
- ConduitStartResult,
1404
- ConduitStatusParams,
1405
- ConduitStatusResult,
1406
- ConduitStopParams,
1407
- ConduitStopResult,
1408
- ConduitSubscribeParams,
1409
- ConduitSubscribeResult,
1410
- ConduitTransportKind,
1411
- } from './operations/conduit.js';
1412
1436
  // Dialectic Evaluator operation types (T1087 Wave 3)
1413
1437
  export type {
1414
1438
  ApplyInsightsParams,
@@ -1584,8 +1608,6 @@ export type {
1584
1608
  NexusColdSymbolsParams,
1585
1609
  NexusColdSymbolsResult,
1586
1610
  NexusCommunityEntry,
1587
- NexusConduitScanParams,
1588
- NexusConduitScanResult,
1589
1611
  NexusContextNode,
1590
1612
  NexusContextParams,
1591
1613
  NexusContextProcess,
@@ -1789,9 +1811,31 @@ export { USER_PROFILE_SCOPES } from './operations/nexus-user-profile.js';
1789
1811
  // Commonly used ops types re-exported at top level for convenience
1790
1812
  export type {
1791
1813
  BrainState,
1814
+ LeadCommandBinary,
1815
+ LeadCommandRule,
1816
+ LeadDeniedTool,
1817
+ LeadFlagArity,
1818
+ LeadMcpReport,
1819
+ LeadMode,
1820
+ LeadToolPolicy,
1821
+ LeadToolStripSupport,
1792
1822
  OrchestrateReportEntry,
1793
1823
  OrchestrateReportGroup,
1794
1824
  OrchestrateReportParams,
1825
+ WorkerProof,
1826
+ WorkerReport,
1827
+ } from './operations/orchestrate.js';
1828
+ export {
1829
+ E_LEAD_NO_OWNER_CHANNEL,
1830
+ LEAD_ASK_TOOL,
1831
+ LEAD_CLEO_GLOBAL_FLAGS,
1832
+ LEAD_COMMAND_ALLOWLIST,
1833
+ LEAD_DENIED_TOOLS,
1834
+ LEAD_MAILBOX_MCP_SERVER,
1835
+ LEAD_OWNER_MAILBOX,
1836
+ LEAD_RUNNER_MCP_SERVER,
1837
+ LEAD_RUNNER_TOOL,
1838
+ LEAD_RUNNER_TOOL_NAME,
1795
1839
  } from './operations/orchestrate.js';
1796
1840
  // === Operation Output Contracts (T11692 / DHQ-057 — per-op result shape SSoT) ===
1797
1841
  // OUTPUT-side mirror of the input contracts. Surfaces the LAFS envelope `data`
@@ -1894,6 +1938,7 @@ export type {
1894
1938
  } from './operations/session.js';
1895
1939
  // === Task Operation Types (T1425 — typed-dispatch migration) ===
1896
1940
  export type {
1941
+ ChildStrategy,
1897
1942
  DepGraphIssue,
1898
1943
  DepsTreeEdge,
1899
1944
  DepsTreeNode,
@@ -2085,20 +2130,27 @@ export type {
2085
2130
  export type {
2086
2131
  AdoptWorktreeOpts,
2087
2132
  AdoptWorktreeResult,
2133
+ CreateWorktreeFailure,
2088
2134
  CreateWorktreeOptions,
2089
2135
  CreateWorktreeResult,
2090
2136
  DestroyWorktreeOptions,
2091
2137
  DestroyWorktreeResult,
2138
+ DisposeWorktreeOptions,
2139
+ DisposeWorktreeResult,
2092
2140
  ForceUnlockWorktreeOpts,
2093
2141
  ForceUnlockWorktreeResult,
2094
2142
  ListWorktreesOptions,
2095
2143
  ListWorktreesOpts,
2096
2144
  ListWorktreesResult,
2145
+ MergedCleanupItem,
2146
+ MergedCleanupOpts,
2147
+ MergedCleanupResult,
2097
2148
  PrunedWorktreeOutcome,
2098
2149
  PruneOrphanedWorktreesOpts,
2099
2150
  PruneOrphanedWorktreesResult,
2100
2151
  PruneWorktreesOptions,
2101
2152
  PruneWorktreesResult,
2153
+ WorktreeArchiveReceipt,
2102
2154
  WorktreeDisposalBlockers,
2103
2155
  WorktreeHook,
2104
2156
  WorktreeHookResult,
@@ -2199,6 +2251,7 @@ export { PS_STABLE_ENV } from './process-probe.js';
2199
2251
  // === Project Context (ecosystem detection types) ===
2200
2252
  export type {
2201
2253
  EcosystemHint,
2254
+ EvidenceRepositoryDeclaration,
2202
2255
  FileNamingConvention,
2203
2256
  ImportStyle,
2204
2257
  ProjectContext,
@@ -2366,6 +2419,8 @@ export type {
2366
2419
  export * from './render/index.js';
2367
2420
  export type {
2368
2421
  AdmissionResult,
2422
+ ExternalPressureDetails,
2423
+ ExternalPressureProcess,
2369
2424
  GovernorMode,
2370
2425
  HeavyHeapSource,
2371
2426
  HeavyLeverChange,
@@ -2385,6 +2440,7 @@ export {
2385
2440
  RESOURCE_BACKPRESSURE_CODE,
2386
2441
  RESOURCE_CLASSES,
2387
2442
  RESOURCE_DEFERRED_CODE,
2443
+ RESOURCE_EXTERNAL_PRESSURE_CODE,
2388
2444
  RUN_COMMAND_FAILED_CODE,
2389
2445
  RUN_DEFERRED_EXIT_CODE,
2390
2446
  } from './resource-governor.js';
@@ -2525,17 +2581,23 @@ export type {
2525
2581
  CLEOSpawnContext,
2526
2582
  CLEOSpawnResult,
2527
2583
  Provider,
2584
+ SpawnProtocolResolution,
2585
+ SpawnProtocolSource,
2528
2586
  SpawnStatus,
2587
+ SpawnWorkerSession,
2529
2588
  TokenResolution,
2530
2589
  } from './spawn-types.js';
2531
2590
  // === Status Registry (MUST be first — everything depends on this) ===
2532
2591
  export {
2533
2592
  ADR_STATUSES,
2534
2593
  type AdrStatus,
2594
+ CANCELLATION_KINDS,
2595
+ type CancellationKind,
2535
2596
  // Registry
2536
2597
  type EntityType,
2537
2598
  GATE_STATUSES,
2538
2599
  type GateStatus,
2600
+ isSettledChild,
2539
2601
  isValidStatus,
2540
2602
  LIFECYCLE_PIPELINE_STATUSES,
2541
2603
  LIFECYCLE_STAGE_STATUSES,
@@ -2544,8 +2606,10 @@ export {
2544
2606
  // Display icons
2545
2607
  PIPELINE_STATUS_ICONS,
2546
2608
  type PipelineStatus,
2609
+ REPLACED_CANCELLATION_KINDS,
2547
2610
  SESSION_STATUSES,
2548
2611
  type SessionStatus,
2612
+ type SettledTaskStatus,
2549
2613
  STAGE_STATUS_ICONS,
2550
2614
  STATUS_REGISTRY,
2551
2615
  type StageStatus,
@@ -2632,6 +2696,7 @@ export type {
2632
2696
  ColumnClass,
2633
2697
  ColumnOverride,
2634
2698
  PendingTableClassification,
2699
+ RetiredSyncColumn,
2635
2700
  RowRouting,
2636
2701
  TableClass,
2637
2702
  TableClassification,
@@ -2653,6 +2718,7 @@ export type {
2653
2718
  EvidenceValidationContext,
2654
2719
  FileMeta,
2655
2720
  GateEvidence,
2721
+ GateStandIn,
2656
2722
  Phase,
2657
2723
  PhaseStatus,
2658
2724
  PhaseTransition,
@@ -2669,6 +2735,7 @@ export type {
2669
2735
  // T944 new axes (T9072: renamed TaskRole → TaskKind)
2670
2736
  TaskKind,
2671
2737
  TaskOrigin,
2738
+ TaskPipelineStageSource,
2672
2739
  TaskPriority,
2673
2740
  TaskProvenance,
2674
2741
  TaskRelation,
@@ -2787,7 +2854,7 @@ export type {
2787
2854
  TaskViewLifecycleProgress,
2788
2855
  TaskViewNextAction,
2789
2856
  TaskViewPipelineStage,
2790
- } from './tasks.js';
2857
+ } from './tasks/index.js';
2791
2858
  export {
2792
2859
  completionCriterionEvaluationSchema,
2793
2860
  completionEvaluateParamsSchema,
@@ -2800,7 +2867,7 @@ export {
2800
2867
  completionProjectionRepairParamsSchema,
2801
2868
  completionProjectionRepairResultSchema,
2802
2869
  unsatisfiedCompletionCriterionSchema,
2803
- } from './tasks.js';
2870
+ } from './tasks/index.js';
2804
2871
  // === Canonical Taxonomy Registry (T11186) ===
2805
2872
  export type {
2806
2873
  CanonicalTagMetadata,
@@ -3275,6 +3342,23 @@ export {
3275
3342
  nexusStreamHeadSchema,
3276
3343
  nexusUserKeysSchema,
3277
3344
  } from './nexus-vault.js';
3345
+ // === Independent per-AC PR review (T14122) ===
3346
+ export type {
3347
+ ReviewAnswer,
3348
+ ReviewAuthors,
3349
+ ReviewDispatch,
3350
+ ReviewDispatchDecision,
3351
+ ReviewDispatchResult,
3352
+ ReviewGap,
3353
+ ReviewJudgement,
3354
+ ReviewPacket,
3355
+ ReviewPacketCriterion,
3356
+ ReviewRoute,
3357
+ ReviewRouteReason,
3358
+ ReviewRouting,
3359
+ ReviewShadowComparison,
3360
+ ReviewVerdict,
3361
+ } from './review-verdict.js';
3278
3362
  // === Sync schema version, shared by the change journal and the cloud vault (T13034) ===
3279
3363
  export { SYNC_SCHEMA_VERSION } from './sync-schema.js';
3280
3364
  export { isStorableTaskId, isTaskId, TASK_ID_REGEX, type TaskId } from './task-id.js';
@@ -500,6 +500,8 @@ export const SYNC_WRITE_INVARIANTS: readonly SyncWriteInvariant[] = Object.freez
500
500
  ['lifecycle_status'],
501
501
  ['D04', 'D05', 'D31', 'D32', 'D39', 'D50'],
502
502
  'superseded is sticky; lifecycle transitions follow a matrix',
503
+ // T14288: the doc's identity row mirrors the metadata under the same rule.
504
+ ['docs_attachments', 'conduit_attachments'],
503
505
  ),
504
506
  ),
505
507
  // T13354 (D11165) — CleoDocs re-keyed history family; the typed merge rules
@@ -558,6 +560,34 @@ export const SYNC_WRITE_INVARIANTS: readonly SyncWriteInvariant[] = Object.freez
558
560
  reason:
559
561
  'two devices adopting one legacy doc must mint one uid: the shell takes the legacy birth and sentinel facts, so (uid, birth_fp) converge and receive places the peer copy as a duplicate; a lost local write is refused loudly at the writer',
560
562
  },
563
+ // T13360 — the legacy docs import mints natural uids (the doc over its
564
+ // slug, the receipt over its slug), so a re-run or a second device's import
565
+ // is an ON CONFLICT no-op. Tagged at the accessors since T13360; registered
566
+ // by T14288, which touched the import.
567
+ {
568
+ id: 'docs.docs-migration.idempotent-import',
569
+ class: 'identity-layer',
570
+ tables: ['conduit_attachments', 'conduit_doc_migration_ledger'],
571
+ sites: [],
572
+ reason:
573
+ 'the docs migration imports each legacy doc once: natural uids over the slug make a re-run a verified no-op, and receipts are never updated or deleted',
574
+ },
575
+ // T14118 — a slug is an alias, not an identity: renaming one moves the
576
+ // live slug on the registry row and the conduit identity row together and
577
+ // records the old slug in the append-only alias table.
578
+ {
579
+ id: 'docs.slug.rename-keeps-alias',
580
+ class: 'identity-layer',
581
+ tables: [
582
+ 'docs_attachments',
583
+ 'conduit_attachments',
584
+ 'docs_wikilinks',
585
+ 'conduit_doc_slug_aliases',
586
+ ],
587
+ sites: [],
588
+ reason:
589
+ 'a rename moves the live slug on docs_attachments and conduit_attachments in one transaction and records the old slug as an alias of the immutable doc uid, so every replica resolves the old and the new slug to one doc',
590
+ },
561
591
  // T13359 (D11165) — decisions-vs-ADRs link table; the natural composite key
562
592
  // makes identical links merge to one row, and the revoke is a one-way latch.
563
593
  // T13597: enforced at merge, not just by the local accessor — 'revoked' is an
package/src/jobs.ts CHANGED
@@ -428,4 +428,9 @@ export interface ShutdownStepOutcome {
428
428
  * @defaultValue undefined — the registry was not counted for this receipt.
429
429
  */
430
430
  readonly pendingOperations?: number;
431
+ /** Best-effort producers (a presence ping, hook dispatch) still pending at
432
+ * their grace and aborted instead of awaited (T14284). Not a failure.
433
+ * @defaultValue undefined — no best-effort work was abandoned.
434
+ */
435
+ readonly abandonedBestEffort?: number;
431
436
  }
@@ -119,7 +119,7 @@ export interface OnboardingResult {
119
119
  readonly modelId: string | null;
120
120
  /**
121
121
  * The profile/role name the bind step wrote (e.g. `'default'` for the global
122
- * binding or a {@link import('../config.js').RoleName} for a per-role
122
+ * binding or a {@link import('../config/types.js').RoleName} for a per-role
123
123
  * binding), or `null` when bind failed.
124
124
  */
125
125
  readonly profileName: string | null;
@@ -46,7 +46,7 @@
46
46
  * @epic T11745
47
47
  */
48
48
 
49
- import type { LlmProviderTransport, RoleName } from '../config.js';
49
+ import type { LlmProviderTransport, RoleName } from '../config/types.js';
50
50
  import type { ProviderTier } from './provider-profile.js';
51
51
 
52
52
  /**
@@ -22,7 +22,7 @@
22
22
  * @epic T11745
23
23
  */
24
24
 
25
- import type { RoleName } from '../config.js';
25
+ import type { RoleName } from '../config/types.js';
26
26
  import type { RoleSystem } from './system-of-use.js';
27
27
 
28
28
  /**
@@ -44,8 +44,8 @@ export interface BrainCompactHit {
44
44
  matchedHistoricalIds?: string[];
45
45
  /** Entry identifier (e.g. `D-arch-001`, `P-feat-042`). */
46
46
  id: string;
47
- /** Source BRAIN table that produced the hit. */
48
- type: 'decision' | 'pattern' | 'learning' | 'observation';
47
+ /** Source that produced the hit: a BRAIN table, or `doc` for the docs store (T14152). */
48
+ type: 'decision' | 'pattern' | 'learning' | 'observation' | 'doc';
49
49
  /** Display title for the entry. */
50
50
  title: string;
51
51
  /** ISO 8601 creation date. */
@@ -74,6 +74,16 @@ export interface BrainCompactHit {
74
74
  _next?: Record<string, string>;
75
75
  /** Store the hit came from; absent means the project store (T13720). */
76
76
  scope?: MemoryScope;
77
+ /**
78
+ * Current docs linked to this decision (`docs link-decision`), each resolved
79
+ * past any supersession; never a superseded doc (T14110).
80
+ */
81
+ docs?: string[];
82
+ /**
83
+ * On a `doc` hit: slug of the superseded doc the query matched, which this
84
+ * current doc replaces (T14152).
85
+ */
86
+ replaces?: string;
77
87
  }
78
88
 
79
89
  // ── SearchBrainCompactParams ────────────────────────────────────────
@@ -158,4 +168,9 @@ export interface SearchBrainCompactResult {
158
168
  total: number;
159
169
  /** Approximate token cost of the returned payload (~chars/4). */
160
170
  tokensEstimated: number;
171
+ /**
172
+ * For each task the query names (or a decision hit's task), the task's
173
+ * current docs; superseded docs are replaced by their current doc (T14110).
174
+ */
175
+ taskDocs?: Array<{ taskId: string; docs: string[] }>;
161
176
  }