@unbrained/pm-cli 2026.8.6 → 2026.8.8

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 (269) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +65 -0
  3. package/dist/cli/main.js +6 -3
  4. package/dist/cli/register-annotations.d.ts +11 -0
  5. package/dist/cli/register-annotations.js +195 -0
  6. package/dist/cli/register-history-author.js +7 -30
  7. package/dist/cli/register-mutation.js +25 -206
  8. package/dist/cli/register-operations.js +11 -2
  9. package/dist/cli/runtime-compatibility-boundary.d.ts +17 -0
  10. package/dist/cli/runtime-compatibility-boundary.js +43 -0
  11. package/dist/cli/stats-analytics-json.d.ts +9 -0
  12. package/dist/cli/stats-analytics-json.js +69 -0
  13. package/dist/cli-bundle/bundle-manifest.json +156 -692
  14. package/dist/cli-bundle/chunks/chunk-2ZMXX3Q6.js +2068 -0
  15. package/dist/cli-bundle/chunks/chunk-ALDHXLPS.js +3 -0
  16. package/dist/cli-bundle/chunks/chunk-CBLA33YK.js +8 -0
  17. package/dist/cli-bundle/chunks/chunk-GKA54IJM.js +5 -0
  18. package/dist/cli-bundle/chunks/chunk-KRY7SRUO.js +2 -0
  19. package/dist/cli-bundle/chunks/chunk-MNJ4NNSY.js +26 -0
  20. package/dist/cli-bundle/chunks/chunk-NUXRRNAB.js +77 -0
  21. package/dist/cli-bundle/chunks/chunk-OJPCFDDY.js +13 -0
  22. package/dist/cli-bundle/chunks/chunk-PFSD3DAN.js +194 -0
  23. package/dist/cli-bundle/chunks/chunk-QWRRFYK3.js +2 -0
  24. package/dist/cli-bundle/chunks/chunk-SQ7QZFQ6.js +2 -0
  25. package/dist/cli-bundle/chunks/{register-list-query-QH7ONPKU.js → register-list-query-WFZAMJHZ.js} +8 -8
  26. package/dist/cli-bundle/chunks/register-mutation-SOKKOTHQ.js +20 -0
  27. package/dist/cli-bundle/chunks/register-operations-5XQETS6E.js +2 -0
  28. package/dist/cli-bundle/chunks/register-setup-2HL5ZHMK.js +2 -0
  29. package/dist/cli-bundle/focused-chunks/chunk-54EU2UVO.js +2 -0
  30. package/dist/cli-bundle/focused-chunks/{chunk-N7QN3NE6.js → chunk-5FLBTZJQ.js} +2 -2
  31. package/dist/cli-bundle/focused-chunks/chunk-5GJ57YKN.js +2 -0
  32. package/dist/cli-bundle/focused-chunks/{chunk-YLPZHWX7.js → chunk-ANTMGYLI.js} +2 -2
  33. package/dist/cli-bundle/focused-chunks/chunk-CMDS3KYT.js +14 -0
  34. package/dist/cli-bundle/focused-chunks/{chunk-EYO4F74Z.js → chunk-DMKOMTTY.js} +2 -2
  35. package/dist/cli-bundle/focused-chunks/{chunk-GSW2Y7VZ.js → chunk-F5B3HBEZ.js} +2 -2
  36. package/dist/cli-bundle/focused-chunks/{chunk-27DK4A5O.js → chunk-FI6DWU2M.js} +2 -2
  37. package/dist/cli-bundle/focused-chunks/{chunk-CL3NB7VW.js → chunk-FNOKJG6N.js} +2 -2
  38. package/dist/cli-bundle/focused-chunks/{chunk-EAXXF2HW.js → chunk-FPDYXZBK.js} +2 -2
  39. package/dist/cli-bundle/focused-chunks/{chunk-XNVXIQ4B.js → chunk-GWI6YIKJ.js} +2 -2
  40. package/dist/cli-bundle/focused-chunks/{chunk-6KDHXURF.js → chunk-HCUC62AB.js} +2 -2
  41. package/dist/cli-bundle/focused-chunks/{chunk-GEYU23YS.js → chunk-HGNKPSCB.js} +22 -22
  42. package/dist/cli-bundle/focused-chunks/chunk-IAS7PMLG.js +2 -0
  43. package/dist/cli-bundle/focused-chunks/{chunk-TQMFQYXR.js → chunk-PL2EYDJK.js} +29 -29
  44. package/dist/cli-bundle/focused-chunks/chunk-SM2PJGP3.js +2 -0
  45. package/dist/cli-bundle/focused-chunks/{chunk-4JC3AOGS.js → chunk-TCSAPH33.js} +2 -2
  46. package/dist/cli-bundle/focused-chunks/chunk-U646T7Z6.js +18 -0
  47. package/dist/cli-bundle/focused-chunks/chunk-YKPE4PPY.js +2 -0
  48. package/dist/cli-bundle/focused-chunks/{chunk-GIERI4YU.js → chunk-YSAHYUXX.js} +2 -2
  49. package/dist/cli-bundle/focused-chunks/chunk-ZOLDTUU7.js +2 -0
  50. package/dist/cli-bundle/main.js +13 -13
  51. package/dist/cli-bundle/sdk-authoring.js +1 -1
  52. package/dist/cli-bundle/sdk-contracts.js +1 -1
  53. package/dist/cli-bundle/sdk-core.js +38 -37
  54. package/dist/cli-bundle/sdk-governance.js +1 -1
  55. package/dist/cli-bundle/sdk-graph.js +1 -1
  56. package/dist/cli-bundle/sdk-merge.js +1 -1
  57. package/dist/cli-bundle/sdk-query.js +1 -1
  58. package/dist/cli-bundle/sdk-runtime.js +1 -1
  59. package/dist/cli-bundle/sdk-testing.js +1 -1
  60. package/dist/cli-bundle/sdk.js +2 -1
  61. package/dist/cli.js +14 -4
  62. package/dist/core/extensions/reserved-host-flags.js +3 -2
  63. package/dist/core/history/workspace-history.d.ts +22 -2
  64. package/dist/core/history/workspace-history.js +60 -36
  65. package/dist/core/output/output.d.ts +2 -0
  66. package/dist/core/output/output.js +10 -2
  67. package/dist/core/sentry/helpers.d.ts +10 -0
  68. package/dist/core/sentry/helpers.js +59 -4
  69. package/dist/core/shared/command-types.d.ts +2 -0
  70. package/dist/core/shared/command-types.js +2 -2
  71. package/dist/core/shared/constants.d.ts +2 -0
  72. package/dist/core/shared/constants.js +4 -2
  73. package/dist/mcp/tool-definitions.js +6 -2
  74. package/dist/sdk/annotations.d.ts +40 -0
  75. package/dist/sdk/annotations.js +61 -9
  76. package/dist/sdk/author-attribution.d.ts +12 -0
  77. package/dist/sdk/author-attribution.js +87 -9
  78. package/dist/sdk/cli-bootstrap.d.ts +2 -0
  79. package/dist/sdk/cli-bootstrap.js +7 -2
  80. package/dist/sdk/cli-contracts/command-exit-contracts.d.ts +118 -0
  81. package/dist/sdk/cli-contracts/command-exit-contracts.js +152 -0
  82. package/dist/sdk/cli-contracts/completeness.js +54 -5
  83. package/dist/sdk/cli-contracts/flag-contracts.js +6 -2
  84. package/dist/sdk/cli-contracts/registration-helpers.js +3 -2
  85. package/dist/sdk/cli-contracts/runtime-contracts.d.ts +11 -0
  86. package/dist/sdk/cli-contracts/runtime-contracts.js +41 -8
  87. package/dist/sdk/cli-contracts/tool-parameter-tables.js +129 -10
  88. package/dist/sdk/cli-contracts/tool-schema.d.ts +1 -1
  89. package/dist/sdk/cli-contracts/tool-schema.js +22 -3
  90. package/dist/sdk/cli-program.js +3 -2
  91. package/dist/sdk/comments.d.ts +7 -0
  92. package/dist/sdk/comments.js +2 -2
  93. package/dist/sdk/completion.js +12 -5
  94. package/dist/sdk/contracts.d.ts +2 -0
  95. package/dist/sdk/contracts.js +3 -2
  96. package/dist/sdk/core.d.ts +3 -1
  97. package/dist/sdk/core.js +4 -3
  98. package/dist/sdk/environment/host-environment-errors.d.ts +27 -0
  99. package/dist/sdk/environment/host-environment-errors.js +124 -0
  100. package/dist/sdk/environment/project-runtime-compatibility.d.ts +65 -0
  101. package/dist/sdk/environment/project-runtime-compatibility.js +385 -0
  102. package/dist/sdk/environment/source-context.d.ts +23 -0
  103. package/dist/sdk/environment/source-context.js +29 -0
  104. package/dist/sdk/error-code-catalog.d.ts +6 -0
  105. package/dist/sdk/error-code-catalog.js +62 -8
  106. package/dist/sdk/extension.js +9 -11
  107. package/dist/sdk/generated-error-code-catalog.js +739 -3
  108. package/dist/sdk/governance/health.d.ts +11 -3
  109. package/dist/sdk/governance/health.js +5 -5
  110. package/dist/sdk/history-analytics.d.ts +141 -0
  111. package/dist/sdk/history-analytics.js +283 -0
  112. package/dist/sdk/improvement-ledger-validation.d.ts +3 -0
  113. package/dist/sdk/improvement-ledger-validation.js +63 -0
  114. package/dist/sdk/improvement-ledger.d.ts +139 -0
  115. package/dist/sdk/improvement-ledger.js +261 -0
  116. package/dist/sdk/index.d.ts +13 -5
  117. package/dist/sdk/index.js +15 -7
  118. package/dist/sdk/learnings.d.ts +15 -0
  119. package/dist/sdk/learnings.js +2 -2
  120. package/dist/sdk/lifecycle/close-many.d.ts +6 -1
  121. package/dist/sdk/lifecycle/close-many.js +43 -5
  122. package/dist/sdk/lifecycle/plan.js +6 -3
  123. package/dist/sdk/lifecycle/update-many.d.ts +2 -1
  124. package/dist/sdk/lifecycle/update-many.js +29 -5
  125. package/dist/sdk/merge/index.d.ts +1 -1
  126. package/dist/sdk/merge/index.js +3 -3
  127. package/dist/sdk/merge/install.d.ts +21 -0
  128. package/dist/sdk/merge/install.js +58 -20
  129. package/dist/sdk/notes.d.ts +7 -0
  130. package/dist/sdk/notes.js +2 -2
  131. package/dist/sdk/read-output-budget.js +24 -22
  132. package/dist/sdk/read-output-contracts.d.ts +10 -2
  133. package/dist/sdk/read-output-contracts.js +204 -66
  134. package/dist/sdk/read-output-rows.d.ts +29 -0
  135. package/dist/sdk/read-output-rows.js +100 -0
  136. package/dist/sdk/read-output-session.d.ts +69 -0
  137. package/dist/sdk/read-output-session.js +200 -0
  138. package/dist/sdk/runtime-input.d.ts +2 -0
  139. package/dist/sdk/runtime-input.js +14 -2
  140. package/dist/sdk/runtime-primitives.d.ts +1 -1
  141. package/dist/sdk/runtime-primitives.js +3 -3
  142. package/dist/sdk/runtime-stats-options.d.ts +9 -0
  143. package/dist/sdk/runtime-stats-options.js +38 -0
  144. package/dist/sdk/runtime.d.ts +1 -0
  145. package/dist/sdk/runtime.js +13 -50
  146. package/dist/sdk/stats.d.ts +40 -0
  147. package/dist/sdk/stats.js +112 -29
  148. package/dist/sdk/test/execution.js +4 -2
  149. package/dist/sdk/test/parsers.js +5 -2
  150. package/dist/sdk/workspace-snapshot.d.ts +9 -0
  151. package/dist/sdk/workspace-snapshot.js +48 -16
  152. package/docs/AGENT_RUNTIME_PRIMITIVES.md +11 -4
  153. package/docs/IMPROVEMENT_ANALYTICS.md +103 -0
  154. package/docs/OUTPUT_PROJECTION_CONTRACTS.md +5 -5
  155. package/docs/README.md +2 -0
  156. package/docs/READ_OUTPUT_CONTRACTS.md +60 -1
  157. package/docs/RELEASING.md +27 -2
  158. package/docs/SCRIPTING.md +27 -1
  159. package/docs/SDK_CONTEXT_INTEGRITY.md +66 -0
  160. package/docs/SDK_RUNTIME_BOUNDARIES.md +58 -0
  161. package/docs/SELF_DESCRIBING_CONTEXT_CONTRACTS.md +13 -0
  162. package/docs/TESTING.md +17 -0
  163. package/marketplace.json +2 -2
  164. package/package.json +6 -4
  165. package/packages/pm-beads/package.json +1 -1
  166. package/packages/pm-calendar/package.json +1 -1
  167. package/packages/pm-command-kit/package.json +1 -1
  168. package/packages/pm-digital-twin/package.json +1 -1
  169. package/packages/pm-governance-audit/package.json +1 -1
  170. package/packages/pm-guide-shell/package.json +1 -1
  171. package/packages/pm-kanban/package.json +1 -1
  172. package/packages/pm-lifecycle-hooks/package.json +1 -1
  173. package/packages/pm-linked-test-adapters/package.json +1 -1
  174. package/packages/pm-search-advanced/package.json +1 -1
  175. package/packages/pm-templates/package.json +1 -1
  176. package/packages/pm-todos/package.json +1 -1
  177. package/packages/pm-vcs/package.json +1 -1
  178. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  179. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  180. package/sdk/public-surface.json +875 -827
  181. package/dist/cli-bundle/chunks/append-XAJ5Z4XS.js +0 -2
  182. package/dist/cli-bundle/chunks/chunk-343QETLI.js +0 -2
  183. package/dist/cli-bundle/chunks/chunk-3KFVGGRE.js +0 -2
  184. package/dist/cli-bundle/chunks/chunk-3ZJRFYY2.js +0 -23
  185. package/dist/cli-bundle/chunks/chunk-4AVFKHHC.js +0 -2
  186. package/dist/cli-bundle/chunks/chunk-4OVGQW22.js +0 -2
  187. package/dist/cli-bundle/chunks/chunk-5PBP2ZP3.js +0 -2
  188. package/dist/cli-bundle/chunks/chunk-5ZKQPA44.js +0 -2
  189. package/dist/cli-bundle/chunks/chunk-A3XQ7VPU.js +0 -2
  190. package/dist/cli-bundle/chunks/chunk-A6KGKEWT.js +0 -2
  191. package/dist/cli-bundle/chunks/chunk-AJE3AHPD.js +0 -8
  192. package/dist/cli-bundle/chunks/chunk-AOBDLU4T.js +0 -2
  193. package/dist/cli-bundle/chunks/chunk-AYRUGRNS.js +0 -3
  194. package/dist/cli-bundle/chunks/chunk-BP6EMEDP.js +0 -5
  195. package/dist/cli-bundle/chunks/chunk-BXCSXK4J.js +0 -2
  196. package/dist/cli-bundle/chunks/chunk-C3YABSJK.js +0 -2
  197. package/dist/cli-bundle/chunks/chunk-CA3BURYF.js +0 -2
  198. package/dist/cli-bundle/chunks/chunk-CHOQ2VAW.js +0 -2
  199. package/dist/cli-bundle/chunks/chunk-D7I3TUGV.js +0 -2
  200. package/dist/cli-bundle/chunks/chunk-DQGJ2RWT.js +0 -3
  201. package/dist/cli-bundle/chunks/chunk-DWOAOZHZ.js +0 -2
  202. package/dist/cli-bundle/chunks/chunk-E2ZSLTOP.js +0 -2
  203. package/dist/cli-bundle/chunks/chunk-E7BFPLUZ.js +0 -5
  204. package/dist/cli-bundle/chunks/chunk-F4NREH3G.js +0 -2
  205. package/dist/cli-bundle/chunks/chunk-FB7G2HY2.js +0 -2
  206. package/dist/cli-bundle/chunks/chunk-FDBRXV25.js +0 -2
  207. package/dist/cli-bundle/chunks/chunk-GU3TSEHD.js +0 -2
  208. package/dist/cli-bundle/chunks/chunk-HS7OVAUN.js +0 -164
  209. package/dist/cli-bundle/chunks/chunk-JC6FKIFM.js +0 -2
  210. package/dist/cli-bundle/chunks/chunk-JFZIS6JF.js +0 -2
  211. package/dist/cli-bundle/chunks/chunk-JQ4NZ5EB.js +0 -2
  212. package/dist/cli-bundle/chunks/chunk-L6LGKJX3.js +0 -2
  213. package/dist/cli-bundle/chunks/chunk-LEPJJ6QC.js +0 -2
  214. package/dist/cli-bundle/chunks/chunk-M357ZCOR.js +0 -2
  215. package/dist/cli-bundle/chunks/chunk-M4VEE3FK.js +0 -2
  216. package/dist/cli-bundle/chunks/chunk-MCS73BKB.js +0 -3
  217. package/dist/cli-bundle/chunks/chunk-MDTH7SAE.js +0 -19
  218. package/dist/cli-bundle/chunks/chunk-NE5VRDAI.js +0 -2
  219. package/dist/cli-bundle/chunks/chunk-OXY3SJ3N.js +0 -2
  220. package/dist/cli-bundle/chunks/chunk-PECV7L5T.js +0 -2
  221. package/dist/cli-bundle/chunks/chunk-Q3VOP62W.js +0 -2
  222. package/dist/cli-bundle/chunks/chunk-QJ7C3JIW.js +0 -2
  223. package/dist/cli-bundle/chunks/chunk-R6LSRGPS.js +0 -8
  224. package/dist/cli-bundle/chunks/chunk-R6RKEYYW.js +0 -2
  225. package/dist/cli-bundle/chunks/chunk-RAFUN7IX.js +0 -2005
  226. package/dist/cli-bundle/chunks/chunk-RSIC5OPE.js +0 -2
  227. package/dist/cli-bundle/chunks/chunk-RUAU5OSH.js +0 -2
  228. package/dist/cli-bundle/chunks/chunk-SD3YXU2U.js +0 -56
  229. package/dist/cli-bundle/chunks/chunk-SV3YQ4RY.js +0 -2
  230. package/dist/cli-bundle/chunks/chunk-SVV3DQES.js +0 -2
  231. package/dist/cli-bundle/chunks/chunk-SXECIECW.js +0 -5
  232. package/dist/cli-bundle/chunks/chunk-T45OHXDW.js +0 -8
  233. package/dist/cli-bundle/chunks/chunk-TPKDJ5WL.js +0 -2
  234. package/dist/cli-bundle/chunks/chunk-UVVXHGYS.js +0 -3
  235. package/dist/cli-bundle/chunks/chunk-V663653R.js +0 -20
  236. package/dist/cli-bundle/chunks/chunk-WSI5KZQJ.js +0 -55
  237. package/dist/cli-bundle/chunks/chunk-XPOQQJTX.js +0 -13
  238. package/dist/cli-bundle/chunks/chunk-YCCDXBNU.js +0 -2
  239. package/dist/cli-bundle/chunks/chunk-ZFBWCKYF.js +0 -2
  240. package/dist/cli-bundle/chunks/close-DI66JMSB.js +0 -2
  241. package/dist/cli-bundle/chunks/close-many-VFKT6U3O.js +0 -2
  242. package/dist/cli-bundle/chunks/comments-E73HIEZJ.js +0 -2
  243. package/dist/cli-bundle/chunks/copy-WBYVLCPC.js +0 -2
  244. package/dist/cli-bundle/chunks/create-TG67IVFI.js +0 -2
  245. package/dist/cli-bundle/chunks/delete-6XKUVVQN.js +0 -2
  246. package/dist/cli-bundle/chunks/deps-AJUGP2OH.js +0 -2
  247. package/dist/cli-bundle/chunks/docs-QOCLDRKJ.js +0 -2
  248. package/dist/cli-bundle/chunks/files-3ST5TY64.js +0 -2
  249. package/dist/cli-bundle/chunks/focus-R2AWS63Y.js +0 -2
  250. package/dist/cli-bundle/chunks/history-compact-7BJFML4S.js +0 -2
  251. package/dist/cli-bundle/chunks/history-redact-WJN3HYXR.js +0 -2
  252. package/dist/cli-bundle/chunks/history-repair-XDNZUB7F.js +0 -2
  253. package/dist/cli-bundle/chunks/learnings-SZMUPVNA.js +0 -2
  254. package/dist/cli-bundle/chunks/profile-KL53JIAC.js +0 -2
  255. package/dist/cli-bundle/chunks/register-mutation-OCRQNZK4.js +0 -20
  256. package/dist/cli-bundle/chunks/register-operations-HIBJXRGB.js +0 -2
  257. package/dist/cli-bundle/chunks/register-setup-QWBQ6HBS.js +0 -2
  258. package/dist/cli-bundle/chunks/restore-FXA5QPM7.js +0 -2
  259. package/dist/cli-bundle/chunks/schema-QJ27OTRV.js +0 -2
  260. package/dist/cli-bundle/chunks/update-7GBO4SXG.js +0 -2
  261. package/dist/cli-bundle/chunks/update-many-VF6ZKQUO.js +0 -2
  262. package/dist/cli-bundle/focused-chunks/chunk-74CWP3A4.js +0 -2
  263. package/dist/cli-bundle/focused-chunks/chunk-7AZDTGPA.js +0 -2
  264. package/dist/cli-bundle/focused-chunks/chunk-7YTZ7A4E.js +0 -2
  265. package/dist/cli-bundle/focused-chunks/chunk-LKQXXO62.js +0 -2
  266. package/dist/cli-bundle/focused-chunks/chunk-MBBMTDD3.js +0 -12
  267. package/dist/cli-bundle/focused-chunks/chunk-ME4XVOBJ.js +0 -8
  268. package/dist/cli-bundle/focused-chunks/chunk-QL5H3AQH.js +0 -2
  269. package/dist/cli-bundle/focused-chunks/chunk-YHDCGUIW.js +0 -14
@@ -6,14 +6,14 @@
6
6
  },
7
7
  "metadata": {
8
8
  "description": "Official marketplace for pm CLI — native git-based project management for Claude Code and AI coding agents.",
9
- "version": "2026.8.6"
9
+ "version": "2026.8.8"
10
10
  },
11
11
  "plugins": [
12
12
  {
13
13
  "name": "pm-claude",
14
14
  "source": "./plugins/pm-claude",
15
15
  "description": "Native pm CLI integration for Claude Code — 28 MCP tools, 5 workflow skills, 14 slash commands, 4 subagents, hybrid TUI task tracking, session context injection, and coordination subagents for git-based project management without leaving Claude Code.",
16
- "version": "2026.8.6",
16
+ "version": "2026.8.8",
17
17
  "author": {
18
18
  "name": "unbrained",
19
19
  "url": "https://github.com/unbraind/pm-cli"
package/CHANGELOG.md CHANGED
@@ -1,5 +1,70 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026.8.8 - 2026-08-08
4
+
5
+ ### Added
6
+
7
+ - The CLI has 195 error codes and contracts none of them: the surface agents read when they are wrong is the only one with no enumeration, no stability promise, and no gate ([pm-x4nn3z](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/features/pm-x4nn3z.toon))
8
+
9
+ ### Fixed
10
+
11
+ - PR \#935 review remediation: executable gate registry and fail-closed runtime context parsing ([pm-n41vay](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-n41vay.toon))
12
+ - GH-926: warn before a stale pm binary mutates a project pinned to a newer CLI/SDK ([pm-1eted6](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-1eted6.toon))
13
+ - PR \#935 CI: preserve dependency-free fast-version startup and regenerate runtime contracts ([pm-dskxwf](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-dskxwf.toon))
14
+ - Make stale-runtime compatibility classification action-aware across mixed CLI commands ([pm-zjelve](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-zjelve.toon))
15
+ - CLI and SDK refusal contracts now preserve consistent codes and recovery semantics ([pm-0xmajx](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-0xmajx.toon))
16
+ - Sentry exception capture never writes the pm.error_code and pm.exit_code tags the release gate reads, so every unexpected runtime error is unclassifiable by construction and blocks the daily cut for the full rolling window ([pm-qxo5iu](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-qxo5iu.toon))
17
+ - Sentry PM-CLI-2S: resource-exhausted copy reports a high handled error without actionable storage guidance ([pm-4odf0c](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-4odf0c.toon))
18
+ - Sentry PM-CLI-2Q: expected snapshot-name validation is captured as a high production error ([pm-qyg51h](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-qyg51h.toon))
19
+ - The release gate classifies production errors by message prose and reads none of the 236 error codes the product declares, so every waiver is a latent re-block and a broad substring is a silent waiver ([pm-dqtzva](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-dqtzva.toon))
20
+ - The mandatory command-wiring replication set is enforced only by a prose checklist, and the census shows partial application is the single largest recurring defect class in the record ([pm-7rrqsk](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-7rrqsk.toon))
21
+ - pm get silently discards --output-include field names because entity reads bind the flag to sections while collection reads bind it to fields, and the omission receipt reports no omissions either way ([pm-0k19l7](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-0k19l7.toon))
22
+ - GH-919: \_workspace author-attribution coordinates cannot be acknowledged ([pm-ety1qc](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-ety1qc.toon))
23
+ - pm comments write response replays the entire accumulated history, so one append can emit hundreds of comments ([pm-9stazf](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-9stazf.toon))
24
+ - GH-457: pm health hangs during vectorization check with no output (never-block violation) ([pm-tu71](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-tu71.toon))
25
+
26
+ ### Security
27
+
28
+ - GHSA-2v37-7h3g-55p8: pin patched nanoid in the Vite/PostCSS development graph ([pm-5dwz1a](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-5dwz1a.toon))
29
+ - GH-933: nested PM writes in non-PM linked tests can mutate the source project ([pm-alhqbz](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-alhqbz.toon))
30
+
31
+ ### Other
32
+
33
+ - One governed verification plan now drives local preflight and maps hosted release gates ([pm-ei6x66](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-ei6x66.toon))
34
+ - Every command declares its exit-code set, and the code distinguishes applied from applied-to-nothing ([pm-hqa8g1](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-hqa8g1.toon))
35
+ - Floor polarity for the tracker measurement ratchet, with graph edge and node floors declared ([pm-z0cfor](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-z0cfor.toon))
36
+ - Refresh tsx to 4.23.11 with full release-gate proof ([pm-nw1y14](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-nw1y14.toon))
37
+
38
+ ## 2026.8.7 - 2026-08-07
39
+
40
+ ### Added
41
+
42
+ - Caller-carried output sessions compose token budgets across reads and suppress repeated item facts ([pm-hid9g1](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/features/pm-hid9g1.toon))
43
+ - Fleet attribution analytics: per-harness and per-model throughput, rework, and defect-escape rates derived from immutable history alone ([pm-gw6uyq](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/features/pm-gw6uyq.toon))
44
+ - Improvement ledger: measured properties of pm carry a recorded time series, because a ceiling proves a number did not grow and can never prove a change made it smaller ([pm-chahyq](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/features/pm-chahyq.toon))
45
+
46
+ ### Changed
47
+
48
+ - Update @toon-format/toon to 4.1.1 and verify codec compatibility ([pm-ko35zx](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-ko35zx.toon))
49
+
50
+ ### Fixed
51
+
52
+ - Nested pm test coverage changes repository-root fixtures because outer PM_PATH sandboxing leaks into package-owned run-tests ([pm-ay3l0p](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-ay3l0p.toon))
53
+ - Read surfaces have no common row contract: field projection reaches 4 of 11 commands and the row collection sits under a different key on each, so no single shell or jq expression works across pm ([pm-sb0tns](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-sb0tns.toon))
54
+ - Sentry PM-CLI-2W: rejected unknown-author acknowledgments are emitted as high production errors ([pm-c3uru0](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-c3uru0.toon))
55
+ - Expose live bounded provenance coverage over immutable history ([pm-1wiugq](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-1wiugq.toon))
56
+ - GH-915: Windows nightly Vite import portability and shared contract-fixture isolation regressions ([pm-ssd7vv](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-ssd7vv.toon))
57
+ - GH-914: macOS extension source identity compares non-canonical /var and /private/var paths ([pm-eu46an](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-eu46an.toon))
58
+ - The coverage gate every contributor is told to run is not a gate: run-tests.mjs coverage prints the shortfall and exits 0, so only CI can fail on coverage ([pm-2qqcgl](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-2qqcgl.toon))
59
+ - The one projection that promises completeness is the one that loses data: pm contracts --full drops all 76 structured command summaries, returns 160 bare name strings, and reports has_omissions false ([pm-x0iv17](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-x0iv17.toon))
60
+ - GH-910: keep extension assets outside item merge-driver patterns ([pm-t9qbmp](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-t9qbmp.toon))
61
+ - GH-911: preserve runtime dependency resolution in post-install activation probes ([pm-pg9599](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-pg9599.toon))
62
+ - GH-912 regression: restore atomic cross-owner seeded Plan creation ([pm-hxuqsa](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-hxuqsa.toon))
63
+
64
+ ### Other
65
+
66
+ - Refresh compatible tooling dependencies: tsx 4.23.8 and pm-changelog 2026.8.6 ([pm-l9fv1e](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-l9fv1e.toon))
67
+
3
68
  ## 2026.8.6 - 2026-08-06
4
69
 
5
70
  ### Fixed
package/dist/cli/main.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * @module cli/main
4
4
  */
5
5
 
6
- !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]="a16a4e5c-eaa5-59fd-a1ba-b5752e29ec47")}catch(e){}}();
6
+ !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]="52c705ab-a5c4-5b94-b806-4eaac31b6e9c")}catch(e){}}();
7
7
  import { Command } from "commander";
8
8
  import { activateExtensions, clearActiveExtensionHooks, createCoreCommandHookContext, resetActiveExtensionRuntimeState, createEmptyExtensionRegistrationRegistry, discoverExtensions, getActiveCommandResult, getActiveExtensionRegistrations, loadExtensions, consumeAfterCommandAffectedItems, runActiveCommandHandler, runActiveParserOverride, runActivePreflightOverride, runAfterCommandHooks, runBeforeCommandHooks, setActiveCommandResult, setActiveCommandContext, setActiveExtensionCommands, setActiveExtensionHooks, setActiveExtensionParsers, setActiveExtensionPreflight, setActiveExtensionRegistrations, setActiveExtensionRenderers, setActiveExtensionServices, pathExists, resolvePmCliVersion, resolvePmPackageRootFromModule, resolveItemTypeRegistry, resolveRuntimeFieldRegistry, EXIT_CODE, resolveTelemetryErrorCategory, PmCliError, asRecordOrNull, printError, printResult, maybeRunFirstUseTelemetryPrompt, emitTelemetryErrorEvent, startTelemetryCommand, deriveTelemetryCommandResolution, sentryCaptureCliError, sentryFinishCommandSpan, sentryFlush, sentryLogCliUsageError, sentrySetCommandContext, sentryStartCommandSpan, ensureSentryInit, getSettingsPath, resolvePmRoot, readSettings, readSettingsWithMetadata, runWithWorkspaceHarnessSignalDescriptors, createLazyModule, } from "../sdk/runtime-primitives.js";
9
9
  import { resolveSubcommandFlagContractsForCommand } from "../sdk/cli-contracts.js";
@@ -29,6 +29,7 @@ import { attachOutputTokenAccounting } from "../sdk/output-token-accounting.js";
29
29
  import { runWithDiscoveredContextIntentContracts } from "../sdk/context-intent-runtime.js";
30
30
  import { validateReadOutputOptions } from "../sdk/read-output-contracts.js";
31
31
  import { loadContextIntentSnapshotForInvocation } from "./context-intent-invocation.js";
32
+ import { isPmSuccessfulExitCode } from "../sdk/cli-contracts/command-exit-contracts.js";
32
33
  const PM_PACKAGE_ROOT_ENV = "PM_CLI_PACKAGE_ROOT";
33
34
  function resolvePmPackageRoot() {
34
35
  return resolvePmPackageRootFromModule(import.meta.url, ["../.."]);
@@ -332,7 +333,7 @@ function buildPostActionTelemetryOutcome() {
332
333
  const processExitCode = typeof process.exitCode === "number" && Number.isFinite(process.exitCode) ? Math.max(0, Math.trunc(process.exitCode)) : undefined;
333
334
  const resultExitCode = readRecordNumber(result, "exit_code", "exitCode");
334
335
  const exitCode = processExitCode ?? resultExitCode ?? EXIT_CODE.SUCCESS;
335
- const ok = exitCode === EXIT_CODE.SUCCESS;
336
+ const ok = isPmSuccessfulExitCode(exitCode);
336
337
  const errorCode = readRecordString(result, "error_code", "errorCode") ?? inferPostActionErrorCode(ok, exitCode);
337
338
  const errorCategory = normalizeTelemetryErrorCategory(readRecordString(result, "error_category", "errorCategory")) ??
338
339
  (!ok ? resolveTelemetryErrorCategory(errorCode) : undefined);
@@ -515,6 +516,7 @@ function extractCommandScopedOptions(command, commandArgs, extensionFlagDefiniti
515
516
  delete scoped.outputLimit;
516
517
  delete scoped.outputBudget;
517
518
  delete scoped.outputFormat;
519
+ delete scoped.outputSession;
518
520
  const looseOptions = parseLooseCommandOptions(commandArgs);
519
521
  for (const [key, value] of Object.entries(looseOptions)) {
520
522
  /* c8 ignore next */
@@ -1541,6 +1543,7 @@ function attachProgramLifecycleHooks(rootProgram) {
1541
1543
  outputLimit: rawGlobalOptions.outputLimit,
1542
1544
  outputBudget: rawGlobalOptions.outputBudget,
1543
1545
  outputFormat: rawGlobalOptions.outputFormat,
1546
+ outputSession: rawGlobalOptions.outputSession,
1544
1547
  });
1545
1548
  await maybeRunFirstUseTelemetryPrompt(commandPath, globalOptions);
1546
1549
  const fallbackPmRoot = resolvePmRoot(process.cwd(), bootstrapGlobalOptions.path);
@@ -2451,4 +2454,4 @@ export const _testOnly = {
2451
2454
  wrapThrownErrorForSentry,
2452
2455
  };
2453
2456
  //# sourceMappingURL=main.js.map
2454
- //# debugId=a16a4e5c-eaa5-59fd-a1ba-b5752e29ec47
2457
+ //# debugId=52c705ab-a5c4-5b94-b806-4eaac31b6e9c
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @module cli/register-annotations
3
+ *
4
+ * Registers comment, note, and learning adapters around the shared bounded
5
+ * annotation SDK contract.
6
+ */
7
+ import type { Command } from "commander";
8
+ /** Converts a Commander token into a positive annotation index. */
9
+ export type PositiveIntegerOptionParser = (value: string, previous: number | undefined) => number;
10
+ /** Register bounded annotation commands on the root Commander program. */
11
+ export declare function registerAnnotationCommands(program: Command, parsePositiveInteger: (flag: string) => PositiveIntegerOptionParser): void;
@@ -0,0 +1,195 @@
1
+
2
+ !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]="0977d72e-6e4d-5ece-bfaf-eb24a4e9982c")}catch(e){}}();
3
+ import { EXIT_CODE, PmCliError, } from "../sdk/runtime-primitives.js";
4
+ import { runComments } from "./commands/comments.js";
5
+ import { runLearnings } from "./commands/learnings.js";
6
+ import { runNotes } from "./commands/notes.js";
7
+ import { addHiddenOption, getGlobalOptions, invalidateSearchCachesForMutation, printError, printResult, readOptionString, } from "./registration-helpers.js";
8
+ function resolveCommentSources(text, options) {
9
+ const editIndex = typeof options.edit === "number" ? options.edit : undefined;
10
+ const deleteIndex = typeof options.delete === "number" ? options.delete : undefined;
11
+ const addFromOption = readOptionString(options, "add") ??
12
+ readOptionString(options, "body") ??
13
+ readOptionString(options, "comment");
14
+ const addFromPositional = typeof text === "string" ? text : undefined;
15
+ const readFromStdin = options.stdin === true;
16
+ const readFromFile = readOptionString(options, "file");
17
+ const sourceCount = Number(addFromOption !== undefined) +
18
+ Number(addFromPositional !== undefined) +
19
+ Number(readFromStdin) +
20
+ Number(readFromFile !== undefined);
21
+ if (sourceCount > 1) {
22
+ if (addFromOption !== undefined &&
23
+ addFromPositional !== undefined &&
24
+ !readFromStdin &&
25
+ readFromFile === undefined) {
26
+ throw new PmCliError("Specify comment text either as positional [text] or with --add, not both", EXIT_CODE.USAGE);
27
+ }
28
+ throw new PmCliError("Specify comment text with exactly one source: positional [text], --add, --stdin, or --file", EXIT_CODE.USAGE);
29
+ }
30
+ const add = addFromOption ?? addFromPositional;
31
+ return {
32
+ add,
33
+ readFromStdin,
34
+ readFromFile,
35
+ editIndex,
36
+ deleteIndex,
37
+ isMutation: typeof add === "string" ||
38
+ readFromStdin ||
39
+ readFromFile !== undefined ||
40
+ editIndex !== undefined ||
41
+ deleteIndex !== undefined,
42
+ };
43
+ }
44
+ function resolveSingleTextSource(label, positional, options) {
45
+ const addFromOption = readOptionString(options, "add");
46
+ const addFromPositional = typeof positional === "string" ? positional : undefined;
47
+ if (addFromOption !== undefined && addFromPositional !== undefined) {
48
+ throw new PmCliError(`Specify ${label} text either as positional [text] or with --add, not both`, EXIT_CODE.USAGE);
49
+ }
50
+ return addFromOption ?? addFromPositional;
51
+ }
52
+ async function runCommentsAction(id, text, options, command) {
53
+ const globalOptions = getGlobalOptions(command);
54
+ const startedAt = Date.now();
55
+ const sources = resolveCommentSources(text, options);
56
+ const result = await runComments(id, {
57
+ add: sources.add,
58
+ stdin: sources.readFromStdin,
59
+ file: sources.readFromFile,
60
+ edit: sources.editIndex,
61
+ delete: sources.deleteIndex,
62
+ limit: readOptionString(options, "limit"),
63
+ fullHistory: options.fullHistory === true,
64
+ author: readOptionString(options, "author"),
65
+ message: readOptionString(options, "message"),
66
+ ownershipAppendBypass: options.ownershipAppendBypass === true,
67
+ force: Boolean(options.force),
68
+ }, globalOptions);
69
+ if (sources.isMutation) {
70
+ await invalidateSearchCachesForMutation(globalOptions, result);
71
+ }
72
+ printAnnotationResult("comments", result, globalOptions, startedAt);
73
+ }
74
+ async function runNotesAction(id, text, options, command) {
75
+ const globalOptions = getGlobalOptions(command);
76
+ const startedAt = Date.now();
77
+ const add = resolveSingleTextSource("note", text, options);
78
+ const result = await runNotes(id, {
79
+ add,
80
+ addJson: readOptionString(options, "addJson"),
81
+ stdin: options.stdin === true,
82
+ file: readOptionString(options, "file"),
83
+ edit: typeof options.edit === "number" ? options.edit : undefined,
84
+ delete: typeof options.delete === "number" ? options.delete : undefined,
85
+ limit: readOptionString(options, "limit"),
86
+ since: readOptionString(options, "since"),
87
+ eventType: readOptionString(options, "eventType"),
88
+ includeMeta: options.includeMeta === true,
89
+ fullHistory: options.fullHistory === true,
90
+ author: readOptionString(options, "author"),
91
+ message: readOptionString(options, "message"),
92
+ ownershipAppendBypass: options.ownershipAppendBypass === true,
93
+ force: Boolean(options.force),
94
+ }, globalOptions);
95
+ if (typeof add === "string" ||
96
+ typeof options.addJson === "string" ||
97
+ options.stdin === true ||
98
+ typeof options.file === "string" ||
99
+ typeof options.edit === "number" ||
100
+ typeof options.delete === "number") {
101
+ await invalidateSearchCachesForMutation(globalOptions, result);
102
+ }
103
+ printAnnotationResult("notes", result, globalOptions, startedAt);
104
+ }
105
+ async function runLearningsAction(id, text, options, command) {
106
+ const globalOptions = getGlobalOptions(command);
107
+ const startedAt = Date.now();
108
+ const add = resolveSingleTextSource("learning", text, options);
109
+ const result = await runLearnings(id, {
110
+ add,
111
+ stdin: options.stdin === true,
112
+ file: readOptionString(options, "file"),
113
+ edit: typeof options.edit === "number" ? options.edit : undefined,
114
+ delete: typeof options.delete === "number" ? options.delete : undefined,
115
+ limit: readOptionString(options, "limit"),
116
+ fullHistory: options.fullHistory === true,
117
+ author: readOptionString(options, "author"),
118
+ message: readOptionString(options, "message"),
119
+ ownershipAppendBypass: options.ownershipAppendBypass === true,
120
+ force: Boolean(options.force),
121
+ }, globalOptions);
122
+ if (typeof add === "string" ||
123
+ options.stdin === true ||
124
+ typeof options.file === "string" ||
125
+ typeof options.edit === "number" ||
126
+ typeof options.delete === "number") {
127
+ await invalidateSearchCachesForMutation(globalOptions, result);
128
+ }
129
+ printAnnotationResult("learnings", result, globalOptions, startedAt);
130
+ }
131
+ function printAnnotationResult(command, result, globalOptions, startedAt) {
132
+ printResult(result, globalOptions);
133
+ if (globalOptions.profile) {
134
+ printError(`profile:command=${command} took_ms=${Date.now() - startedAt}`);
135
+ }
136
+ }
137
+ /** Register bounded annotation commands on the root Commander program. */
138
+ export function registerAnnotationCommands(program, parsePositiveInteger) {
139
+ const commentsCommand = program
140
+ .command("comments")
141
+ .argument("<id>", "Item id")
142
+ .argument("[text]", "Optional comment text shorthand (equivalent to --add)")
143
+ .option("--add <text>", "Add one comment entry (plain text fallback, text=<value>, markdown pairs, or - for stdin; CSV-like key fragments are preserved as plain text unless text is explicit)")
144
+ .option("--stdin", "Read comment text from stdin (supports multiline markdown)")
145
+ .option("--file <path>", "Read comment text from file (supports multiline markdown)")
146
+ .option("--edit <index>", "Replace the comment at 1-based <index> (replacement text from positional [text], --add, --stdin, or --file)", parsePositiveInteger("--edit"))
147
+ .option("--delete <index>", "Delete the comment at 1-based <index>", parsePositiveInteger("--delete"))
148
+ .option("--limit <n>", "Return only latest n comments")
149
+ .option("--full-history", "Return the complete post-mutation comment history instead of a bounded receipt")
150
+ .option("--author [value]", "Comment author (optional; falls back to PM_AUTHOR/settings)")
151
+ .option("--message <value>", "History message")
152
+ .option("--force", "Force ownership override")
153
+ .description("List, add, edit, or delete comments for an item.")
154
+ .action(runCommentsAction);
155
+ addHiddenOption(commentsCommand, "--body <text>", "Alias for --add", false);
156
+ addHiddenOption(commentsCommand, "--comment <text>", "Alias for --add", false);
157
+ program
158
+ .command("notes")
159
+ .argument("<id>", "Item id")
160
+ .argument("[text]", "Optional note text shorthand (equivalent to --add; use - for stdin)")
161
+ .option("--add <text>", "Add a text note (- reads stdin)")
162
+ .option("--add-json <json>", "Append a merge-safe JSON event")
163
+ .option("--stdin", "Read note text from stdin")
164
+ .option("--file <path>", "Read note text from a UTF-8 file")
165
+ .option("--edit <index>", "Replace a 1-based note using the selected text input", parsePositiveInteger("--edit"))
166
+ .option("--delete <index>", "Delete the note at 1-based <index>", parsePositiveInteger("--delete"))
167
+ .option("--limit <n>", "Return only latest n notes")
168
+ .option("--since <timestamp>", "Filter JSON events from this ISO time")
169
+ .option("--event-type <value>", "Filter JSON events by top-level type")
170
+ .option("--include-meta", "Include count and truncation metadata")
171
+ .option("--full-history", "Return the complete post-mutation note history instead of a bounded receipt")
172
+ .option("--author [value]", "Author; defaults to PM_AUTHOR/settings")
173
+ .option("--message <value>", "History message")
174
+ .option("--force", "Force ownership override")
175
+ .description("Manage merge-safe text notes and JSON context events.")
176
+ .action(runNotesAction);
177
+ program
178
+ .command("learnings")
179
+ .argument("<id>", "Item id")
180
+ .argument("[text]", "Optional learning text shorthand (equivalent to --add; use - for stdin)")
181
+ .option("--add <text>", "Add one learning entry (plain text fallback, text=<value>, markdown pairs, or - for stdin; CSV-like key fragments are preserved as plain text unless text is explicit)")
182
+ .option("--stdin", "Read learning text from stdin (supports multiline markdown)")
183
+ .option("--file <path>", "Read learning text from file (supports multiline markdown)")
184
+ .option("--edit <index>", "Replace the learning at 1-based <index> (replacement text from positional [text], --add, --stdin, or --file)", parsePositiveInteger("--edit"))
185
+ .option("--delete <index>", "Delete the learning at 1-based <index>", parsePositiveInteger("--delete"))
186
+ .option("--limit <n>", "Return only latest n learnings")
187
+ .option("--full-history", "Return the complete post-mutation learning history instead of a bounded receipt")
188
+ .option("--author [value]", "Learning author (optional; falls back to PM_AUTHOR/settings)")
189
+ .option("--message <value>", "History message")
190
+ .option("--force", "Force ownership override")
191
+ .description("List, add, edit, or delete learnings for an item.")
192
+ .action(runLearningsAction);
193
+ }
194
+ //# sourceMappingURL=register-annotations.js.map
195
+ //# debugId=0977d72e-6e4d-5ece-bfaf-eb24a4e9982c
@@ -1,40 +1,17 @@
1
1
 
2
- !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]="d04ac41f-796d-5ccb-9e8e-cfa82c845f25")}catch(e){}}();
3
- import { EXIT_CODE, PmCliError, resolvePmRoot, } from "../sdk/runtime-primitives.js";
4
- import { acknowledgeUnknownAuthorHistoryEvents } from "../sdk/author-attribution.js";
2
+ !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]="50a7ce23-2abf-5240-b426-b73cb704e329")}catch(e){}}();
3
+ import { resolvePmRoot } from "../sdk/runtime-primitives.js";
4
+ import { acknowledgeUnknownAuthorHistoryEvents, resolveUnknownAuthorAcknowledgmentSelector, } from "../sdk/author-attribution.js";
5
5
  import { collect, getGlobalOptions, printResult, readOptionString, } from "./registration-helpers.js";
6
6
  async function runHistoryAuthorAcknowledgeAction(options, command) {
7
7
  const globalOptions = getGlobalOptions(command);
8
8
  const rawEvents = Array.isArray(options.event)
9
9
  ? options.event
10
10
  : [];
11
- const allActionable = options.allActionable === true;
12
- const hasExplicitEvents = rawEvents.length > 0;
13
- if (hasExplicitEvents === allActionable) {
14
- throw new PmCliError("Specify exactly one selector: repeat --event or pass --all-actionable.", EXIT_CODE.USAGE, {
15
- code: "history_author_acknowledge_selector_required",
16
- required: "Exactly one of --event or --all-actionable",
17
- examples: [
18
- 'pm history-author-acknowledge --event pm-a1b2:4 --attributed-author agent --reviewer maintainer --reason "Verified provenance"',
19
- 'pm history-author-acknowledge --all-actionable --attributed-author import-agent --reviewer maintainer --reason "Reviewed the complete actionable set"',
20
- ],
21
- });
22
- }
23
- const events = rawEvents.map((value) => {
24
- const separator = value.lastIndexOf(":");
25
- const itemId = value.slice(0, separator).trim();
26
- const line = Number(value.slice(separator + 1));
27
- if (separator < 1 ||
28
- !/^[a-z0-9][a-z0-9-]*$/iu.test(itemId) ||
29
- !Number.isSafeInteger(line) ||
30
- line < 1) {
31
- throw new PmCliError(`history-author-acknowledge --event expects <item-id>:<one-based-line>, received "${value}".`, EXIT_CODE.USAGE);
32
- }
33
- return { item_id: itemId, line };
34
- });
11
+ const selector = resolveUnknownAuthorAcknowledgmentSelector(rawEvents, options.allActionable === true);
35
12
  const result = await acknowledgeUnknownAuthorHistoryEvents(resolvePmRoot(process.cwd(), globalOptions.path), {
36
- events,
37
- all_actionable: allActionable,
13
+ events: selector.events,
14
+ all_actionable: selector.all_actionable,
38
15
  attributed_author: readOptionString(options, "attributedAuthor"),
39
16
  reviewer: readOptionString(options, "reviewer"),
40
17
  reason: readOptionString(options, "reason"),
@@ -54,4 +31,4 @@ export function registerHistoryAuthorAcknowledgeCommand(program) {
54
31
  .action(runHistoryAuthorAcknowledgeAction);
55
32
  }
56
33
  //# sourceMappingURL=register-history-author.js.map
57
- //# debugId=d04ac41f-796d-5ccb-9e8e-cfa82c845f25
34
+ //# debugId=50a7ce23-2abf-5240-b426-b73cb704e329