@unbrained/pm-cli 2026.8.19 → 2026.8.21

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 (229) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +41 -0
  3. package/dist/cli/error-guidance.d.ts +20 -0
  4. package/dist/cli/error-guidance.js +29 -30
  5. package/dist/cli/register-list-query.js +12 -10
  6. package/dist/cli/register-structured-mutation.d.ts +2 -0
  7. package/dist/cli/register-structured-mutation.js +29 -6
  8. package/dist/cli-bundle/bundle-manifest.json +156 -148
  9. package/dist/cli-bundle/chunks/chunk-2MA6ZQVZ.js +197 -0
  10. package/dist/cli-bundle/chunks/{chunk-4NRRH7AM.js → chunk-3AFAUHUE.js} +2 -2
  11. package/dist/cli-bundle/chunks/chunk-7VHZS727.js +5 -0
  12. package/dist/cli-bundle/chunks/chunk-BKYB45NQ.js +2092 -0
  13. package/dist/cli-bundle/chunks/{chunk-BHYMXLAE.js → chunk-BUNIEJNE.js} +2 -2
  14. package/dist/cli-bundle/chunks/{chunk-QXSH7BLM.js → chunk-JSLOFXGA.js} +3 -3
  15. package/dist/cli-bundle/chunks/chunk-LARJJ3RK.js +3 -0
  16. package/dist/cli-bundle/chunks/{chunk-TOXJM4WA.js → chunk-LOVTQ52Z.js} +2 -2
  17. package/dist/cli-bundle/chunks/chunk-N3DSV4CH.js +77 -0
  18. package/dist/cli-bundle/chunks/chunk-OCLPLFAY.js +35 -0
  19. package/dist/cli-bundle/chunks/chunk-S4IRYKBU.js +13 -0
  20. package/dist/cli-bundle/chunks/register-list-query-F57EWDEF.js +11 -0
  21. package/dist/cli-bundle/chunks/{register-mutation-AUWVCW4M.js → register-mutation-7IY2D5KO.js} +20 -20
  22. package/dist/cli-bundle/chunks/{register-operations-PZQPHXW5.js → register-operations-FALL3YTU.js} +2 -2
  23. package/dist/cli-bundle/chunks/{register-setup-I4LUHGVW.js → register-setup-HXU7IZZD.js} +2 -2
  24. package/dist/cli-bundle/focused-chunks/chunk-2NIY5NKG.js +18 -0
  25. package/dist/cli-bundle/focused-chunks/{chunk-US7VEYZG.js → chunk-4ERLO7QD.js} +2 -2
  26. package/dist/cli-bundle/focused-chunks/chunk-7WZRLCYF.js +50 -0
  27. package/dist/cli-bundle/focused-chunks/{chunk-MCZXYZAF.js → chunk-CKKQSJNN.js} +2 -2
  28. package/dist/cli-bundle/focused-chunks/chunk-EEFKYMDR.js +16 -0
  29. package/dist/cli-bundle/focused-chunks/{chunk-ZBIQQYMI.js → chunk-F2A56DHV.js} +2 -2
  30. package/dist/cli-bundle/focused-chunks/{chunk-ESISGDAY.js → chunk-F4YEW5I2.js} +2 -2
  31. package/dist/cli-bundle/focused-chunks/{chunk-ODHQEECS.js → chunk-FH6DYED3.js} +2 -2
  32. package/dist/cli-bundle/focused-chunks/chunk-FJ22HNRP.js +2 -0
  33. package/dist/cli-bundle/focused-chunks/chunk-FV5ACOK7.js +2 -0
  34. package/dist/cli-bundle/focused-chunks/chunk-JEAVFOWM.js +2 -0
  35. package/dist/cli-bundle/focused-chunks/{chunk-EXBCLIBU.js → chunk-KDNG7TKQ.js} +2 -2
  36. package/dist/cli-bundle/focused-chunks/chunk-NJ63LOP6.js +155 -0
  37. package/dist/cli-bundle/focused-chunks/chunk-NXRTQ7HI.js +2 -0
  38. package/dist/cli-bundle/focused-chunks/{chunk-JDOMQ7VQ.js → chunk-TJ7EMJ46.js} +3 -3
  39. package/dist/cli-bundle/focused-chunks/chunk-UZE7XUZK.js +2 -0
  40. package/dist/cli-bundle/focused-chunks/{chunk-DKPLYW3L.js → chunk-YKBKIEAJ.js} +2 -2
  41. package/dist/cli-bundle/focused-chunks/{chunk-VXDSU5MC.js → chunk-ZOSEELYJ.js} +2 -2
  42. package/dist/cli-bundle/main.js +12 -12
  43. package/dist/cli-bundle/sdk-authoring.js +1 -1
  44. package/dist/cli-bundle/sdk-contracts.js +2 -2
  45. package/dist/cli-bundle/sdk-core.js +41 -41
  46. package/dist/cli-bundle/sdk-governance.js +1 -1
  47. package/dist/cli-bundle/sdk-graph.js +1 -1
  48. package/dist/cli-bundle/sdk-merge.js +32 -32
  49. package/dist/cli-bundle/sdk-query.js +1 -1
  50. package/dist/cli-bundle/sdk-runtime.js +1 -1
  51. package/dist/cli-bundle/sdk-testing.js +1 -1
  52. package/dist/cli-bundle/sdk.js +5 -5
  53. package/dist/core/output/mutation-projection.js +26 -2
  54. package/dist/core/shared/constants.d.ts +1 -5
  55. package/dist/core/shared/constants.js +3 -81
  56. package/dist/core/shared/errors.d.ts +16 -0
  57. package/dist/core/shared/errors.js +2 -2
  58. package/dist/core/shared/item-metadata-contract.d.ts +14 -0
  59. package/dist/core/shared/item-metadata-contract.js +90 -0
  60. package/dist/core/store/item-store.d.ts +60 -0
  61. package/dist/core/store/item-store.js +26 -94
  62. package/dist/core/store/tracker-preflight.d.ts +7 -0
  63. package/dist/core/store/tracker-preflight.js +142 -0
  64. package/dist/sdk/agent/closed-domain-contracts.d.ts +25 -0
  65. package/dist/sdk/agent/closed-domain-contracts.js +140 -0
  66. package/dist/sdk/agent/refusal-closure.d.ts +13 -1
  67. package/dist/sdk/agent/refusal-closure.js +45 -3
  68. package/dist/sdk/agent/refusal-reachability.d.ts +26 -0
  69. package/dist/sdk/agent/refusal-reachability.js +26 -2
  70. package/dist/sdk/agent/tracker-preflight-contracts.d.ts +63 -0
  71. package/dist/sdk/agent/tracker-preflight-contracts.js +127 -0
  72. package/dist/sdk/agent-capability-contracts.js +6 -11
  73. package/dist/sdk/annotations.js +6 -7
  74. package/dist/sdk/cli-contracts/completeness.js +8 -2
  75. package/dist/sdk/cli-contracts/enum-contracts.d.ts +4 -2
  76. package/dist/sdk/cli-contracts/enum-contracts.js +16 -6
  77. package/dist/sdk/cli-contracts/flag-contracts.d.ts +2 -0
  78. package/dist/sdk/cli-contracts/flag-contracts.js +11 -2
  79. package/dist/sdk/cli-contracts/flag-lexicon-contracts.d.ts +19 -2
  80. package/dist/sdk/cli-contracts/flag-lexicon-contracts.js +105 -5
  81. package/dist/sdk/cli-contracts/grammar-contracts.d.ts +2 -2
  82. package/dist/sdk/cli-contracts/grammar-contracts.js +5 -2
  83. package/dist/sdk/cli-contracts/runtime-contracts.js +7 -3
  84. package/dist/sdk/cli-contracts/tool-schema.js +7 -2
  85. package/dist/sdk/cli-contracts.d.ts +2 -2
  86. package/dist/sdk/cli-contracts.js +4 -4
  87. package/dist/sdk/config.d.ts +5 -0
  88. package/dist/sdk/config.js +5 -5
  89. package/dist/sdk/context-intent-runtime.js +7 -4
  90. package/dist/sdk/contracts.d.ts +2 -0
  91. package/dist/sdk/contracts.js +4 -2
  92. package/dist/sdk/core.d.ts +1 -1
  93. package/dist/sdk/core.js +3 -3
  94. package/dist/sdk/dependencies.js +5 -7
  95. package/dist/sdk/dependency-flag-validation.d.ts +1 -1
  96. package/dist/sdk/dependency-flag-validation.js +10 -4
  97. package/dist/sdk/environment/tracker-preflight.d.ts +6 -0
  98. package/dist/sdk/environment/tracker-preflight.js +10 -0
  99. package/dist/sdk/eval.js +5 -7
  100. package/dist/sdk/files.js +6 -10
  101. package/dist/sdk/generated/generated-error-code-catalog-part-1.js +110 -2
  102. package/dist/sdk/generated/generated-error-code-catalog-part-2.js +179 -46
  103. package/dist/sdk/governance/assurance.d.ts +36 -2
  104. package/dist/sdk/governance/assurance.js +184 -10
  105. package/dist/sdk/governance/gc.js +5 -6
  106. package/dist/sdk/governance/health.js +5 -6
  107. package/dist/sdk/governance/reindex.js +5 -6
  108. package/dist/sdk/governance/validate.d.ts +1 -2
  109. package/dist/sdk/governance/validate.js +6 -12
  110. package/dist/sdk/graph/governance.d.ts +7 -5
  111. package/dist/sdk/graph/governance.js +32 -16
  112. package/dist/sdk/graph/run.js +5 -7
  113. package/dist/sdk/graph/traversal.js +14 -5
  114. package/dist/sdk/history-compact.js +6 -9
  115. package/dist/sdk/history-read.js +5 -7
  116. package/dist/sdk/history-redact.js +5 -6
  117. package/dist/sdk/history-repair.js +6 -9
  118. package/dist/sdk/improvement-ledger.js +7 -10
  119. package/dist/sdk/index.d.ts +7 -3
  120. package/dist/sdk/index.js +8 -4
  121. package/dist/sdk/init-agent-guidance.d.ts +5 -3
  122. package/dist/sdk/init-agent-guidance.js +69 -9
  123. package/dist/sdk/lifecycle/append.d.ts +0 -5
  124. package/dist/sdk/lifecycle/append.js +5 -6
  125. package/dist/sdk/lifecycle/claim.d.ts +0 -5
  126. package/dist/sdk/lifecycle/claim.js +6 -9
  127. package/dist/sdk/lifecycle/close-many.d.ts +0 -5
  128. package/dist/sdk/lifecycle/close-many.js +5 -6
  129. package/dist/sdk/lifecycle/close.d.ts +0 -5
  130. package/dist/sdk/lifecycle/close.js +5 -6
  131. package/dist/sdk/lifecycle/copy.d.ts +0 -5
  132. package/dist/sdk/lifecycle/copy.js +5 -6
  133. package/dist/sdk/lifecycle/create.d.ts +0 -5
  134. package/dist/sdk/lifecycle/create.js +5 -9
  135. package/dist/sdk/lifecycle/delete.js +5 -6
  136. package/dist/sdk/lifecycle/focus.d.ts +0 -5
  137. package/dist/sdk/lifecycle/focus.js +5 -6
  138. package/dist/sdk/lifecycle/mcp-actions.d.ts +18 -0
  139. package/dist/sdk/lifecycle/mcp-actions.js +52 -0
  140. package/dist/sdk/lifecycle/plan.d.ts +0 -5
  141. package/dist/sdk/lifecycle/plan.js +5 -6
  142. package/dist/sdk/lifecycle/reopen.d.ts +44 -0
  143. package/dist/sdk/lifecycle/reopen.js +69 -0
  144. package/dist/sdk/lifecycle/restore.js +5 -6
  145. package/dist/sdk/lifecycle/update-many.d.ts +0 -5
  146. package/dist/sdk/lifecycle/update-many.js +5 -6
  147. package/dist/sdk/lifecycle/update.d.ts +31 -5
  148. package/dist/sdk/lifecycle/update.js +140 -19
  149. package/dist/sdk/linked-artifacts.js +6 -7
  150. package/dist/sdk/merge/install.js +5 -6
  151. package/dist/sdk/mutation-events.js +5 -7
  152. package/dist/sdk/package-import-adapters.js +6 -8
  153. package/dist/sdk/profile.js +6 -7
  154. package/dist/sdk/query/activity.js +5 -6
  155. package/dist/sdk/query/calendar.js +5 -6
  156. package/dist/sdk/query/get.d.ts +1 -6
  157. package/dist/sdk/query/get.js +20 -55
  158. package/dist/sdk/query/history.d.ts +0 -5
  159. package/dist/sdk/query/history.js +5 -6
  160. package/dist/sdk/query/list.d.ts +7 -21
  161. package/dist/sdk/query/list.js +38 -54
  162. package/dist/sdk/query/projection-contracts.d.ts +33 -0
  163. package/dist/sdk/query/projection-contracts.js +185 -0
  164. package/dist/sdk/query/search-contracts.d.ts +2 -1
  165. package/dist/sdk/query/search-contracts.js +18 -87
  166. package/dist/sdk/query/search.d.ts +15 -0
  167. package/dist/sdk/query/search.js +34 -10
  168. package/dist/sdk/relationship-kinds/contract.d.ts +8 -0
  169. package/dist/sdk/relationship-kinds/contract.js +13 -13
  170. package/dist/sdk/relationships.d.ts +1 -1
  171. package/dist/sdk/relationships.js +20 -2
  172. package/dist/sdk/runtime-primitives.d.ts +1 -1
  173. package/dist/sdk/runtime-primitives.js +3 -3
  174. package/dist/sdk/runtime.d.ts +6 -0
  175. package/dist/sdk/runtime.js +18 -14
  176. package/dist/sdk/schema-migration.js +6 -7
  177. package/dist/sdk/schema.js +5 -6
  178. package/dist/sdk/similarity.d.ts +13 -0
  179. package/dist/sdk/similarity.js +32 -6
  180. package/dist/sdk/stats.js +5 -8
  181. package/dist/sdk/templates.js +5 -6
  182. package/dist/sdk/test/batch.js +5 -7
  183. package/dist/sdk/test/execution.js +4 -5
  184. package/dist/sdk/test/runs.js +5 -7
  185. package/docs/AGENT_UX_CONTRACTS.md +8 -1
  186. package/docs/COMMANDS.md +13 -1
  187. package/docs/DEPENDENCY_KIND_CONTRACT.md +12 -1
  188. package/docs/README.md +1 -0
  189. package/docs/RECURRENCE_RECOVERY_CONTRACTS.md +151 -0
  190. package/docs/RELATIONSHIP_GRAPH.md +92 -10
  191. package/docs/SDK.md +10 -2
  192. package/docs/SDK_CONTEXT_INTEGRITY.md +45 -0
  193. package/docs/SDK_PRIMITIVE_INVENTORY.md +15 -1
  194. package/docs/generated/AGENT_COMMAND_SURFACE.md +1 -1
  195. package/docs/performance/sdk-entrypoint-import-costs.md +14 -21
  196. package/marketplace.json +2 -2
  197. package/package.json +5 -5
  198. package/packages/pm-beads/package.json +1 -1
  199. package/packages/pm-calendar/package.json +1 -1
  200. package/packages/pm-command-kit/package.json +1 -1
  201. package/packages/pm-digital-twin/package.json +1 -1
  202. package/packages/pm-governance-audit/package.json +1 -1
  203. package/packages/pm-guide-shell/package.json +1 -1
  204. package/packages/pm-kanban/package.json +1 -1
  205. package/packages/pm-lifecycle-hooks/package.json +1 -1
  206. package/packages/pm-linked-test-adapters/package.json +1 -1
  207. package/packages/pm-search-advanced/package.json +1 -1
  208. package/packages/pm-templates/package.json +1 -1
  209. package/packages/pm-todos/package.json +1 -1
  210. package/packages/pm-vcs/package.json +1 -1
  211. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  212. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  213. package/sdk/public-surface.json +640 -44
  214. package/dist/cli-bundle/chunks/chunk-4THEB6PD.js +0 -13
  215. package/dist/cli-bundle/chunks/chunk-GWMXAQOD.js +0 -197
  216. package/dist/cli-bundle/chunks/chunk-HVFQTLYM.js +0 -35
  217. package/dist/cli-bundle/chunks/chunk-OI4XI562.js +0 -5
  218. package/dist/cli-bundle/chunks/chunk-OIOKV6NO.js +0 -2092
  219. package/dist/cli-bundle/chunks/chunk-SARFF5H5.js +0 -3
  220. package/dist/cli-bundle/chunks/chunk-YBMRWW4E.js +0 -77
  221. package/dist/cli-bundle/chunks/register-list-query-Y56KINDU.js +0 -11
  222. package/dist/cli-bundle/focused-chunks/chunk-34QBIYZI.js +0 -155
  223. package/dist/cli-bundle/focused-chunks/chunk-BJRYFVSH.js +0 -2
  224. package/dist/cli-bundle/focused-chunks/chunk-EF6ZS5GH.js +0 -50
  225. package/dist/cli-bundle/focused-chunks/chunk-L623ZPNK.js +0 -2
  226. package/dist/cli-bundle/focused-chunks/chunk-PRHY2IMX.js +0 -18
  227. package/dist/cli-bundle/focused-chunks/chunk-RZU5U6Q7.js +0 -2
  228. package/dist/cli-bundle/focused-chunks/chunk-YBMGXBFV.js +0 -16
  229. package/dist/cli-bundle/focused-chunks/chunk-YLVBJ6GF.js +0 -2
@@ -1,6 +1,6 @@
1
1
  /** Generated partition 1 of the exhaustive error-code catalog. */
2
2
 
3
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ed64096a-fd80-52e9-926e-fb2d4d2030e7")}catch(e){}}();
3
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4959a1ef-29e6-50ae-aaf8-fe078001bff6")}catch(e){}}();
4
4
  export const PM_ERROR_CODE_CATALOG_PART_1 = [
5
5
  {
6
6
  code: "acceptance_criteria_mutation_conflict",
@@ -494,6 +494,30 @@ export const PM_ERROR_CODE_CATALOG_PART_1 = [
494
494
  canonical_code: "dependency_edge_not_allowed",
495
495
  aliases: [],
496
496
  },
497
+ {
498
+ code: "dependency_flag_value_invalid",
499
+ meaning: "Dependency flag value invalid condition.",
500
+ stability: "provisional",
501
+ exit_code: 2,
502
+ class: "usage",
503
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
504
+ sources: ["sdk/dependency-flag-validation.ts"],
505
+ emitting_commands: ["*"],
506
+ canonical_code: "dependency_flag_value_invalid",
507
+ aliases: [],
508
+ },
509
+ {
510
+ code: "dependency_remove_no_match",
511
+ meaning: "Dependency remove no match condition.",
512
+ stability: "provisional",
513
+ exit_code: 3,
514
+ class: "not_found",
515
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
516
+ sources: ["sdk/lifecycle/update.ts"],
517
+ emitting_commands: ["update"],
518
+ canonical_code: "dependency_remove_no_match",
519
+ aliases: [],
520
+ },
497
521
  {
498
522
  code: "dependency_target_not_found",
499
523
  meaning: "Dependency target not found condition.",
@@ -674,6 +698,18 @@ export const PM_ERROR_CODE_CATALOG_PART_1 = [
674
698
  canonical_code: "empty_surface",
675
699
  aliases: [],
676
700
  },
701
+ {
702
+ code: "error_code_mismatch",
703
+ meaning: "Error code mismatch condition.",
704
+ stability: "provisional",
705
+ exit_code: 1,
706
+ class: "generic_failure",
707
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
708
+ sources: ["sdk/agent/refusal-closure.ts", "sdk/agent/tracker-preflight-contracts.ts"],
709
+ emitting_commands: ["*"],
710
+ canonical_code: "error_code_mismatch",
711
+ aliases: [],
712
+ },
677
713
  {
678
714
  code: "event_cursor_query_mismatch",
679
715
  meaning: "Event cursor query mismatch condition.",
@@ -698,6 +734,18 @@ export const PM_ERROR_CODE_CATALOG_PART_1 = [
698
734
  canonical_code: "event_index_unavailable",
699
735
  aliases: [],
700
736
  },
737
+ {
738
+ code: "exit_code_mismatch",
739
+ meaning: "Exit code mismatch condition.",
740
+ stability: "provisional",
741
+ exit_code: 1,
742
+ class: "generic_failure",
743
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
744
+ sources: ["sdk/agent/tracker-preflight-contracts.ts"],
745
+ emitting_commands: ["*"],
746
+ canonical_code: "exit_code_mismatch",
747
+ aliases: [],
748
+ },
701
749
  {
702
750
  code: "extension_command_activation_failed",
703
751
  meaning: "Extension command activation failed condition.",
@@ -1178,6 +1226,18 @@ export const PM_ERROR_CODE_CATALOG_PART_1 = [
1178
1226
  canonical_code: "improvement_observation_conflict",
1179
1227
  aliases: [],
1180
1228
  },
1229
+ {
1230
+ code: "incomplete_allowed_values",
1231
+ meaning: "Incomplete allowed values condition.",
1232
+ stability: "provisional",
1233
+ exit_code: 1,
1234
+ class: "generic_failure",
1235
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
1236
+ sources: ["sdk/agent/refusal-closure.ts"],
1237
+ emitting_commands: ["*"],
1238
+ canonical_code: "incomplete_allowed_values",
1239
+ aliases: [],
1240
+ },
1181
1241
  {
1182
1242
  code: "inconsistent_concept_kind",
1183
1243
  meaning: "Inconsistent concept kind condition.",
@@ -1572,6 +1632,18 @@ export const PM_ERROR_CODE_CATALOG_PART_1 = [
1572
1632
  canonical_code: "invalid_workspace_snapshot_target",
1573
1633
  aliases: [],
1574
1634
  },
1635
+ {
1636
+ code: "item_already_active",
1637
+ meaning: "Item already active condition.",
1638
+ stability: "provisional",
1639
+ exit_code: 4,
1640
+ class: "conflict",
1641
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
1642
+ sources: ["sdk/lifecycle/update.ts"],
1643
+ emitting_commands: ["update"],
1644
+ canonical_code: "item_already_active",
1645
+ aliases: [],
1646
+ },
1575
1647
  {
1576
1648
  code: "item_document_invalid",
1577
1649
  meaning: "Item document invalid condition.",
@@ -1836,6 +1908,42 @@ export const PM_ERROR_CODE_CATALOG_PART_1 = [
1836
1908
  canonical_code: "merge_root_not_found",
1837
1909
  aliases: [],
1838
1910
  },
1911
+ {
1912
+ code: "missing_allowed_values",
1913
+ meaning: "Missing allowed values condition.",
1914
+ stability: "provisional",
1915
+ exit_code: 1,
1916
+ class: "generic_failure",
1917
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
1918
+ sources: ["sdk/agent/refusal-closure.ts"],
1919
+ emitting_commands: ["*"],
1920
+ canonical_code: "missing_allowed_values",
1921
+ aliases: [],
1922
+ },
1923
+ {
1924
+ code: "missing_budget",
1925
+ meaning: "Missing budget condition.",
1926
+ stability: "provisional",
1927
+ exit_code: 1,
1928
+ class: "generic_failure",
1929
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
1930
+ sources: ["sdk/cli-contracts/flag-lexicon-contracts.ts"],
1931
+ emitting_commands: ["*"],
1932
+ canonical_code: "missing_budget",
1933
+ aliases: [],
1934
+ },
1935
+ {
1936
+ code: "missing_cli_flag",
1937
+ meaning: "Missing cli flag condition.",
1938
+ stability: "provisional",
1939
+ exit_code: 1,
1940
+ class: "generic_failure",
1941
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
1942
+ sources: ["sdk/cli-contracts/tool-option-contracts.ts"],
1943
+ emitting_commands: ["*"],
1944
+ canonical_code: "missing_cli_flag",
1945
+ aliases: [],
1946
+ },
1839
1947
  ];
1840
1948
  //# sourceMappingURL=generated-error-code-catalog-part-1.js.map
1841
- //# debugId=ed64096a-fd80-52e9-926e-fb2d4d2030e7
1949
+ //# debugId=4959a1ef-29e6-50ae-aaf8-fe078001bff6
@@ -1,43 +1,7 @@
1
1
  /** Generated partition 2 of the exhaustive error-code catalog. */
2
2
 
3
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="03d69aef-eebb-50bf-a6b5-56b794e1b316")}catch(e){}}();
3
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d7f4f4f0-d044-5216-b2c4-d76b4d8854a9")}catch(e){}}();
4
4
  export const PM_ERROR_CODE_CATALOG_PART_2 = [
5
- {
6
- code: "missing_allowed_values",
7
- meaning: "Missing allowed values condition.",
8
- stability: "provisional",
9
- exit_code: 1,
10
- class: "generic_failure",
11
- recovery: "Inspect the structured error guidance and retry the suggested command.",
12
- sources: ["sdk/agent/refusal-closure.ts"],
13
- emitting_commands: ["*"],
14
- canonical_code: "missing_allowed_values",
15
- aliases: [],
16
- },
17
- {
18
- code: "missing_budget",
19
- meaning: "Missing budget condition.",
20
- stability: "provisional",
21
- exit_code: 1,
22
- class: "generic_failure",
23
- recovery: "Inspect the structured error guidance and retry the suggested command.",
24
- sources: ["sdk/cli-contracts/flag-lexicon-contracts.ts"],
25
- emitting_commands: ["*"],
26
- canonical_code: "missing_budget",
27
- aliases: [],
28
- },
29
- {
30
- code: "missing_cli_flag",
31
- meaning: "Missing cli flag condition.",
32
- stability: "provisional",
33
- exit_code: 1,
34
- class: "generic_failure",
35
- recovery: "Inspect the structured error guidance and retry the suggested command.",
36
- sources: ["sdk/cli-contracts/tool-option-contracts.ts"],
37
- emitting_commands: ["*"],
38
- canonical_code: "missing_cli_flag",
39
- aliases: [],
40
- },
41
5
  {
42
6
  code: "missing_destination",
43
7
  meaning: "Missing destination condition.",
@@ -62,6 +26,18 @@ export const PM_ERROR_CODE_CATALOG_PART_2 = [
62
26
  canonical_code: "missing_directory",
63
27
  aliases: [],
64
28
  },
29
+ {
30
+ code: "missing_init_recovery",
31
+ meaning: "Missing init recovery condition.",
32
+ stability: "provisional",
33
+ exit_code: 1,
34
+ class: "generic_failure",
35
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
36
+ sources: ["sdk/agent/tracker-preflight-contracts.ts"],
37
+ emitting_commands: ["*"],
38
+ canonical_code: "missing_init_recovery",
39
+ aliases: [],
40
+ },
65
41
  {
66
42
  code: "missing_lifecycle_target",
67
43
  meaning: "Missing lifecycle target condition.",
@@ -110,6 +86,18 @@ export const PM_ERROR_CODE_CATALOG_PART_2 = [
110
86
  canonical_code: "missing_parameter_alias",
111
87
  aliases: [],
112
88
  },
89
+ {
90
+ code: "missing_probe",
91
+ meaning: "Missing probe condition.",
92
+ stability: "provisional",
93
+ exit_code: 1,
94
+ class: "generic_failure",
95
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
96
+ sources: ["sdk/agent/tracker-preflight-contracts.ts"],
97
+ emitting_commands: ["*"],
98
+ canonical_code: "missing_probe",
99
+ aliases: [],
100
+ },
113
101
  {
114
102
  code: "missing_required_argument",
115
103
  meaning: "Missing required argument condition.",
@@ -159,6 +147,18 @@ export const PM_ERROR_CODE_CATALOG_PART_2 = [
159
147
  canonical_code: "missing_suggested_retry",
160
148
  aliases: [],
161
149
  },
150
+ {
151
+ code: "missing_suggested_retry_args",
152
+ meaning: "Missing suggested retry args condition.",
153
+ stability: "provisional",
154
+ exit_code: 1,
155
+ class: "generic_failure",
156
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
157
+ sources: ["sdk/agent/refusal-closure.ts"],
158
+ emitting_commands: ["*"],
159
+ canonical_code: "missing_suggested_retry_args",
160
+ aliases: [],
161
+ },
162
162
  {
163
163
  code: "module_import_failed",
164
164
  meaning: "Module import failed condition.",
@@ -447,6 +447,18 @@ export const PM_ERROR_CODE_CATALOG_PART_2 = [
447
447
  canonical_code: "project_runtime_stale_read",
448
448
  aliases: [],
449
449
  },
450
+ {
451
+ code: "projection_options_mutually_exclusive",
452
+ meaning: "Projection options mutually exclusive condition.",
453
+ stability: "provisional",
454
+ exit_code: 2,
455
+ class: "usage",
456
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
457
+ sources: ["sdk/query/get.ts", "sdk/query/list.ts", "sdk/query/search-contracts.ts"],
458
+ emitting_commands: ["get", "list", "search"],
459
+ canonical_code: "projection_options_mutually_exclusive",
460
+ aliases: [],
461
+ },
450
462
  {
451
463
  code: "provenance_value_domain_invalid",
452
464
  meaning: "Provenance value domain invalid condition.",
@@ -495,6 +507,18 @@ export const PM_ERROR_CODE_CATALOG_PART_2 = [
495
507
  canonical_code: "read_output_cursor_stale",
496
508
  aliases: [],
497
509
  },
510
+ {
511
+ code: "recovery_kind_mismatch",
512
+ meaning: "Recovery kind mismatch condition.",
513
+ stability: "provisional",
514
+ exit_code: 1,
515
+ class: "generic_failure",
516
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
517
+ sources: ["sdk/agent/tracker-preflight-contracts.ts"],
518
+ emitting_commands: ["*"],
519
+ canonical_code: "recovery_kind_mismatch",
520
+ aliases: [],
521
+ },
498
522
  {
499
523
  code: "redundant_edge",
500
524
  meaning: "Redundant edge condition.",
@@ -519,6 +543,66 @@ export const PM_ERROR_CODE_CATALOG_PART_2 = [
519
543
  canonical_code: "reindex_already_running",
520
544
  aliases: [],
521
545
  },
546
+ {
547
+ code: "removed_canonical_spelling",
548
+ meaning: "Removed canonical spelling condition.",
549
+ stability: "provisional",
550
+ exit_code: 1,
551
+ class: "generic_failure",
552
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
553
+ sources: ["sdk/cli-contracts/flag-lexicon-contracts.ts"],
554
+ emitting_commands: ["*"],
555
+ canonical_code: "removed_canonical_spelling",
556
+ aliases: [],
557
+ },
558
+ {
559
+ code: "removed_compatibility_spelling",
560
+ meaning: "Removed compatibility spelling condition.",
561
+ stability: "provisional",
562
+ exit_code: 1,
563
+ class: "generic_failure",
564
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
565
+ sources: ["sdk/cli-contracts/flag-lexicon-contracts.ts"],
566
+ emitting_commands: ["*"],
567
+ canonical_code: "removed_compatibility_spelling",
568
+ aliases: [],
569
+ },
570
+ {
571
+ code: "reopen_reason_required",
572
+ meaning: "Reopen reason required condition.",
573
+ stability: "provisional",
574
+ exit_code: 2,
575
+ class: "usage",
576
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
577
+ sources: ["sdk/lifecycle/reopen.ts"],
578
+ emitting_commands: ["item reopen"],
579
+ canonical_code: "reopen_reason_required",
580
+ aliases: [],
581
+ },
582
+ {
583
+ code: "reopen_receipt_missing",
584
+ meaning: "Reopen receipt missing condition.",
585
+ stability: "provisional",
586
+ exit_code: 1,
587
+ class: "generic_failure",
588
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
589
+ sources: ["sdk/lifecycle/update.ts"],
590
+ emitting_commands: ["update"],
591
+ canonical_code: "reopen_receipt_missing",
592
+ aliases: [],
593
+ },
594
+ {
595
+ code: "reopen_target_status_invalid",
596
+ meaning: "Reopen target status invalid condition.",
597
+ stability: "provisional",
598
+ exit_code: 2,
599
+ class: "usage",
600
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
601
+ sources: ["sdk/lifecycle/reopen.ts"],
602
+ emitting_commands: ["item reopen"],
603
+ canonical_code: "reopen_target_status_invalid",
604
+ aliases: [],
605
+ },
522
606
  {
523
607
  code: "reserved_item_field",
524
608
  meaning: "Reserved item field condition.",
@@ -538,7 +622,7 @@ export const PM_ERROR_CODE_CATALOG_PART_2 = [
538
622
  exit_code: 1,
539
623
  class: "generic_failure",
540
624
  recovery: "Inspect the structured error guidance and retry the suggested command.",
541
- sources: ["sdk/agent/refusal-closure.ts"],
625
+ sources: ["sdk/agent/refusal-closure.ts", "sdk/agent/tracker-preflight-contracts.ts"],
542
626
  emitting_commands: ["*"],
543
627
  canonical_code: "retry_failed",
544
628
  aliases: [],
@@ -555,6 +639,18 @@ export const PM_ERROR_CODE_CATALOG_PART_2 = [
555
639
  canonical_code: "schema_migration_input_required",
556
640
  aliases: [],
557
641
  },
642
+ {
643
+ code: "semantic_spelling_collision",
644
+ meaning: "Semantic spelling collision condition.",
645
+ stability: "provisional",
646
+ exit_code: 1,
647
+ class: "generic_failure",
648
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
649
+ sources: ["sdk/cli-contracts/flag-lexicon-contracts.ts"],
650
+ emitting_commands: ["*"],
651
+ canonical_code: "semantic_spelling_collision",
652
+ aliases: [],
653
+ },
558
654
  {
559
655
  code: "settings_read_fs_error",
560
656
  meaning: "Settings read fs error condition.",
@@ -747,6 +843,18 @@ export const PM_ERROR_CODE_CATALOG_PART_2 = [
747
843
  canonical_code: "structured_event_since_invalid",
748
844
  aliases: [],
749
845
  },
846
+ {
847
+ code: "suggested_retry_args_mismatch",
848
+ meaning: "Suggested retry args mismatch condition.",
849
+ stability: "provisional",
850
+ exit_code: 1,
851
+ class: "generic_failure",
852
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
853
+ sources: ["sdk/agent/refusal-closure.ts"],
854
+ emitting_commands: ["*"],
855
+ canonical_code: "suggested_retry_args_mismatch",
856
+ aliases: [],
857
+ },
750
858
  {
751
859
  code: "telemetry_endpoint_probe_failed",
752
860
  meaning: "Telemetry endpoint probe failed condition.",
@@ -898,12 +1006,16 @@ export const PM_ERROR_CODE_CATALOG_PART_2 = [
898
1006
  exit_code: 3,
899
1007
  class: "not_found",
900
1008
  recovery: "Inspect the structured error guidance and retry the suggested command.",
901
- sources: ["cli/error-guidance.ts", "core/telemetry/observability.ts"],
1009
+ sources: [
1010
+ "cli/error-guidance.ts",
1011
+ "core/store/tracker-preflight.ts",
1012
+ "core/telemetry/observability.ts",
1013
+ ],
902
1014
  emitting_commands: ["*"],
903
1015
  canonical_code: "tracker_not_initialized",
904
1016
  aliases: [],
905
1017
  owned_states: [
906
- { state: "selected_tracker_root_is_a_regular_file", probe_id: "tracker-root-regular-file", entrypoints: ["list"], expected_exit_class: "not_found" },
1018
+ { state: "selected_tracker_root_exists_without_settings", probe_id: "tracker-root-settings-missing", entrypoints: ["list"], expected_exit_class: "not_found" },
907
1019
  ],
908
1020
  },
909
1021
  {
@@ -913,10 +1025,13 @@ export const PM_ERROR_CODE_CATALOG_PART_2 = [
913
1025
  exit_code: 3,
914
1026
  class: "not_found",
915
1027
  recovery: "Inspect the structured error guidance and retry the suggested command.",
916
- sources: ["core/store/item-store.ts"],
1028
+ sources: ["core/store/tracker-preflight.ts"],
917
1029
  emitting_commands: ["*"],
918
1030
  canonical_code: "tracker_root_missing",
919
1031
  aliases: [],
1032
+ owned_states: [
1033
+ { state: "selected_tracker_root_does_not_exist", probe_id: "tracker-root-missing", entrypoints: ["list"], expected_exit_class: "not_found" },
1034
+ ],
920
1035
  },
921
1036
  {
922
1037
  code: "tracker_root_not_directory",
@@ -925,10 +1040,13 @@ export const PM_ERROR_CODE_CATALOG_PART_2 = [
925
1040
  exit_code: 2,
926
1041
  class: "usage",
927
1042
  recovery: "Inspect the structured error guidance and retry the suggested command.",
928
- sources: ["core/store/item-store.ts"],
1043
+ sources: ["core/store/tracker-preflight.ts"],
929
1044
  emitting_commands: ["*"],
930
1045
  canonical_code: "tracker_root_not_directory",
931
1046
  aliases: [],
1047
+ owned_states: [
1048
+ { state: "selected_tracker_root_is_a_regular_file", probe_id: "tracker-root-not-directory", entrypoints: ["list"], expected_exit_class: "usage" },
1049
+ ],
932
1050
  },
933
1051
  {
934
1052
  code: "tracker_root_unreadable",
@@ -937,10 +1055,13 @@ export const PM_ERROR_CODE_CATALOG_PART_2 = [
937
1055
  exit_code: 1,
938
1056
  class: "generic_failure",
939
1057
  recovery: "Inspect the structured error guidance and retry the suggested command.",
940
- sources: ["core/store/item-store.ts"],
1058
+ sources: ["core/store/tracker-preflight.ts"],
941
1059
  emitting_commands: ["*"],
942
1060
  canonical_code: "tracker_root_unreadable",
943
1061
  aliases: [],
1062
+ owned_states: [
1063
+ { state: "selected_tracker_root_is_not_readable", probe_id: "tracker-root-unreadable", entrypoints: ["list"], expected_exit_class: "generic_failure" },
1064
+ ],
944
1065
  },
945
1066
  {
946
1067
  code: "type_duplicate",
@@ -1037,8 +1158,8 @@ export const PM_ERROR_CODE_CATALOG_PART_2 = [
1037
1158
  exit_code: 2,
1038
1159
  class: "usage",
1039
1160
  recovery: "Inspect the structured error guidance and retry the suggested command.",
1040
- sources: ["sdk/query/get.ts", "sdk/query/list.ts"],
1041
- emitting_commands: ["get", "list"],
1161
+ sources: ["sdk/query/get.ts", "sdk/query/list.ts", "sdk/query/search-contracts.ts"],
1162
+ emitting_commands: ["get", "list", "search"],
1042
1163
  canonical_code: "unknown_field_projection",
1043
1164
  aliases: [],
1044
1165
  },
@@ -1147,6 +1268,18 @@ export const PM_ERROR_CODE_CATALOG_PART_2 = [
1147
1268
  { state: "package_lifecycle_token_is_not_declared", probe_id: "package-unknown-action", entrypoints: ["package"], expected_exit_class: "usage" },
1148
1269
  ],
1149
1270
  },
1271
+ {
1272
+ code: "unsafe_init_recovery",
1273
+ meaning: "Unsafe init recovery condition.",
1274
+ stability: "provisional",
1275
+ exit_code: 1,
1276
+ class: "generic_failure",
1277
+ recovery: "Inspect the structured error guidance and retry the suggested command.",
1278
+ sources: ["sdk/agent/tracker-preflight-contracts.ts"],
1279
+ emitting_commands: ["*"],
1280
+ canonical_code: "unsafe_init_recovery",
1281
+ aliases: [],
1282
+ },
1150
1283
  {
1151
1284
  code: "unsupported_update_option",
1152
1285
  meaning: "Unsupported update option condition.",
@@ -1845,4 +1978,4 @@ export const PM_ERROR_CODE_CATALOG_PART_2 = [
1845
1978
  },
1846
1979
  ];
1847
1980
  //# sourceMappingURL=generated-error-code-catalog-part-2.js.map
1848
- //# debugId=03d69aef-eebb-50bf-a6b5-56b794e1b316
1981
+ //# debugId=d7f4f4f0-d044-5216-b2c4-d76b4d8854a9
@@ -3,7 +3,7 @@ export declare const ASSURANCE_DOCUMENT_VERSION: 1;
3
3
  /** Supported lifecycle points that can evaluate a gate. */
4
4
  export declare const ASSURANCE_GATE_TRIGGERS: readonly ["pre-commit", "pre-push", "pre-merge", "ci", "pre-release", "post-release", "scheduled", "on-claim", "on-close"];
5
5
  /** Supported discriminants for built-in, delegated, and derived measurements. */
6
- export declare const ASSURANCE_MEASUREMENT_SOURCE_KINDS: readonly ["items", "dependency_kind", "graph", "validate", "health", "history", "links", "provider", "derived"];
6
+ export declare const ASSURANCE_MEASUREMENT_SOURCE_KINDS: readonly ["items", "dependency_kind", "prose_edge_gap", "graph", "validate", "health", "history", "links", "provider", "derived"];
7
7
  /** Gate lifecycle trigger. */
8
8
  export type AssuranceGateTrigger = (typeof ASSURANCE_GATE_TRIGGERS)[number];
9
9
  /** Assertion enforcement strength. */
@@ -20,6 +20,8 @@ export interface AssuranceDependencyRecord {
20
20
  id: string;
21
21
  /** Typed relationship kind. */
22
22
  kind: string;
23
+ /** Provenance channel that created or justified the edge. */
24
+ source_kind?: string;
23
25
  }
24
26
  /** Minimal item projection consumed by built-in measurement sources. */
25
27
  export interface AssuranceItemRecord {
@@ -80,6 +82,32 @@ export interface AssuranceDependencyKindSource {
80
82
  kind: "dependency_kind";
81
83
  /** Relationship kind to count. */
82
84
  dependency_kind: string;
85
+ /** Require an exact dependency provenance channel. */
86
+ source_kind?: string;
87
+ /** Require a dependency provenance channel with this prefix. */
88
+ source_kind_prefix?: string;
89
+ /** Require dependency provenance to be present or missing. */
90
+ source_kind_state?: "present" | "missing";
91
+ }
92
+ /** Evidence-backed exemption from prose-to-edge parity. */
93
+ export interface AssuranceProseEdgeExemption {
94
+ /** Holder whose prose contains the reference. */
95
+ holder_id: string;
96
+ /** Optional referenced item; omission exempts every matching pair on the holder. */
97
+ target_id?: string;
98
+ /** Optional literal that must occur in the same prose segment as the reference. */
99
+ text_contains?: string;
100
+ /** Reviewable explanation for why no typed edge should exist. */
101
+ reason: string;
102
+ }
103
+ /** Prose-reference parity source evaluated directly over authoritative item rows. */
104
+ export interface AssuranceProseEdgeGapSource {
105
+ /** Source discriminant. */
106
+ kind: "prose_edge_gap";
107
+ /** Explicit false-positive ledger; every row requires a reason. */
108
+ exemptions?: AssuranceProseEdgeExemption[];
109
+ /** Maximum diagnostic contributors retained after the counts are computed. */
110
+ sample_limit?: number;
83
111
  }
84
112
  /** Graph-analytics source delegated to a host adapter. */
85
113
  export interface AssuranceGraphSource {
@@ -170,7 +198,7 @@ export interface AssuranceDerivedSource {
170
198
  expression: AssuranceDerivedExpression;
171
199
  }
172
200
  /** Complete measurement source vocabulary. */
173
- export type AssuranceMeasurementSource = AssuranceItemsSource | AssuranceDependencyKindSource | AssuranceGraphSource | AssuranceValidateSource | AssuranceHealthSource | AssuranceHistorySource | AssuranceLinksSource | AssuranceProviderSource | AssuranceDerivedSource;
201
+ export type AssuranceMeasurementSource = AssuranceItemsSource | AssuranceDependencyKindSource | AssuranceProseEdgeGapSource | AssuranceGraphSource | AssuranceValidateSource | AssuranceHealthSource | AssuranceHistorySource | AssuranceLinksSource | AssuranceProviderSource | AssuranceDerivedSource;
174
202
  /** Persisted measurement declaration. */
175
203
  export interface AssuranceMeasurementDefinition {
176
204
  /** Stable registry id. */
@@ -302,6 +330,8 @@ export interface AssuranceExternalMeasurementResult {
302
330
  cost: number;
303
331
  /** Optional contributors that moved the value. */
304
332
  contributors?: string[];
333
+ /** Optional exact named sub-populations within the observed value. */
334
+ partitions?: Readonly<Record<string, number>>;
305
335
  }
306
336
  /** SDK evaluation inputs supplied by a host. */
307
337
  export interface AssuranceEvaluationContext {
@@ -348,6 +378,8 @@ export interface AssuranceMeasurementResult {
348
378
  cost: AssuranceMeasurementCost;
349
379
  /** Optional contributors. */
350
380
  contributors: string[];
381
+ /** Optional exact named sub-populations within the observed value. */
382
+ partitions?: Readonly<Record<string, number>>;
351
383
  }
352
384
  /** Structured assertion bound. */
353
385
  export interface AssuranceBound {
@@ -384,6 +416,8 @@ export interface AssuranceAssertionVerdict {
384
416
  cost: AssuranceMeasurementCost;
385
417
  /** Optional contributors. */
386
418
  contributors: string[];
419
+ /** Optional exact named sub-populations within the observed value. */
420
+ partitions?: Readonly<Record<string, number>>;
387
421
  }
388
422
  /** Complete gate verdict shared by every presentation and execution surface. */
389
423
  export interface AssuranceGateVerdict {