@unbrained/pm-cli 2026.9.23 → 2026.9.25

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 (103) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/AGENTS.md +6 -20
  3. package/CHANGELOG.md +37 -0
  4. package/dist/cli/error-guidance.d.ts +9 -0
  5. package/dist/cli/error-guidance.js +1 -1
  6. package/dist/cli/help-content.js +1 -1
  7. package/dist/cli-bundle/bundle-manifest.json +153 -153
  8. package/dist/cli-bundle/chunks/{chunk-KOUT5SAA.js → chunk-25KTCTBL.js} +2 -2
  9. package/dist/cli-bundle/chunks/{chunk-E6ZES2X7.js → chunk-3IB4THWX.js} +2 -2
  10. package/dist/cli-bundle/chunks/{chunk-PFWCAI4X.js → chunk-445ARBKY.js} +2 -2
  11. package/dist/cli-bundle/chunks/{chunk-VO7DHENB.js → chunk-5AP67ZXH.js} +3 -3
  12. package/dist/cli-bundle/chunks/{chunk-SXRMM72R.js → chunk-COFQCKF4.js} +2 -2
  13. package/dist/cli-bundle/chunks/{chunk-WBB5B7G5.js → chunk-CZ3VJJEA.js} +2 -2
  14. package/dist/cli-bundle/chunks/{chunk-OBTHQ6UX.js → chunk-GAU55CWI.js} +28 -28
  15. package/dist/cli-bundle/chunks/{chunk-ZSVINTXT.js → chunk-GOWZEBTH.js} +2 -2
  16. package/dist/cli-bundle/chunks/{chunk-7IABMUB6.js → chunk-JDHWZYZU.js} +73 -73
  17. package/dist/cli-bundle/chunks/{chunk-ZWSWR2GX.js → chunk-P7ZSJOWH.js} +2 -2
  18. package/dist/cli-bundle/chunks/{chunk-6WBR6GMW.js → chunk-YABJDOOX.js} +63 -62
  19. package/dist/cli-bundle/chunks/{chunk-NBGSRFZE.js → chunk-YDIGMRLZ.js} +2 -2
  20. package/dist/cli-bundle/chunks/{register-list-query-IFPQ4YRD.js → register-list-query-IZ7ZVTDE.js} +2 -2
  21. package/dist/cli-bundle/chunks/{register-mutation-C3O7OSXW.js → register-mutation-IPAZTFDZ.js} +2 -2
  22. package/dist/cli-bundle/chunks/{register-operations-LGO7DBZ7.js → register-operations-APN33LNI.js} +2 -2
  23. package/dist/cli-bundle/chunks/{register-setup-4EW2PPZD.js → register-setup-HPHIKG5U.js} +2 -2
  24. package/dist/cli-bundle/focused-chunks/{chunk-YE6F5HGF.js → chunk-ABA3KRPY.js} +2 -2
  25. package/dist/cli-bundle/focused-chunks/{chunk-S5JYIFFS.js → chunk-HQPTDJLF.js} +2 -2
  26. package/dist/cli-bundle/focused-chunks/{chunk-FIQYVDLL.js → chunk-IXNNMP2R.js} +2 -2
  27. package/dist/cli-bundle/focused-chunks/chunk-KRIHJH5U.js +75 -0
  28. package/dist/cli-bundle/focused-chunks/{chunk-LZOEUNHR.js → chunk-MK5AKKHK.js} +2 -2
  29. package/dist/cli-bundle/focused-chunks/{chunk-6CWR2QFM.js → chunk-NRHTXBTI.js} +2 -2
  30. package/dist/cli-bundle/focused-chunks/{chunk-L554BKFH.js → chunk-NVVB2HJC.js} +2 -2
  31. package/dist/cli-bundle/focused-chunks/{chunk-PIHQNL32.js → chunk-O7MIBEMK.js} +2 -2
  32. package/dist/cli-bundle/focused-chunks/{chunk-BKXYQQDT.js → chunk-OY3VHCTX.js} +2 -2
  33. package/dist/cli-bundle/focused-chunks/{chunk-N2JYYEHM.js → chunk-PMPFLA6X.js} +2 -2
  34. package/dist/cli-bundle/focused-chunks/{chunk-HJA6OHWT.js → chunk-Q355NPLH.js} +28 -28
  35. package/dist/cli-bundle/focused-chunks/{chunk-BQSKFRL2.js → chunk-TLF6N56J.js} +2 -2
  36. package/dist/cli-bundle/focused-chunks/{chunk-QREDJ77O.js → chunk-UIFVIE5F.js} +2 -2
  37. package/dist/cli-bundle/focused-chunks/{chunk-KMNH4G6Y.js → chunk-V2X37U6J.js} +2 -2
  38. package/dist/cli-bundle/focused-chunks/{chunk-E5AOEXF5.js → chunk-XKH2FC5D.js} +2 -2
  39. package/dist/cli-bundle/focused-chunks/{chunk-BULUJEOL.js → chunk-Y2M4QLAA.js} +2 -2
  40. package/dist/cli-bundle/main.js +22 -22
  41. package/dist/cli-bundle/sdk-authoring.js +1 -1
  42. package/dist/cli-bundle/sdk-contracts.js +1 -1
  43. package/dist/cli-bundle/sdk-core.js +30 -45
  44. package/dist/cli-bundle/sdk-governance.js +1 -1
  45. package/dist/cli-bundle/sdk-graph.js +1 -1
  46. package/dist/cli-bundle/sdk-merge.js +58 -42
  47. package/dist/cli-bundle/sdk-query.js +1 -1
  48. package/dist/cli-bundle/sdk-runtime.js +1 -1
  49. package/dist/cli-bundle/sdk-testing.js +1 -1
  50. package/dist/cli-bundle/sdk.js +9 -10
  51. package/dist/core/policy/workflow-policy-store.js +1 -1
  52. package/dist/core/shared/errors.d.ts +13 -0
  53. package/dist/core/shared/errors.js +1 -1
  54. package/dist/sdk/completion/bash.js +1 -1
  55. package/dist/sdk/governance/health.d.ts +1 -1
  56. package/dist/sdk/governance/health.js +1 -1
  57. package/dist/sdk/init-agent-guidance.d.ts +2 -1
  58. package/dist/sdk/init-agent-guidance.js +2 -2
  59. package/dist/sdk/merge/install.js +2 -2
  60. package/dist/sdk/merge/worktree-config.d.ts +9 -0
  61. package/dist/sdk/merge/worktree-config.js +2 -0
  62. package/dist/sdk/public-surface.json +1 -1
  63. package/docs/AGENT_RECOVERY_AND_GUIDANCE.md +49 -0
  64. package/docs/CHATGPT_CODEX_PLUGIN_IMPLEMENTATION.md +2 -0
  65. package/docs/CLAUDE_CODE_PLUGIN.md +18 -7
  66. package/docs/CODEX_PLUGIN.md +5 -12
  67. package/docs/DEFECT_RECURRENCE.md +8 -1
  68. package/docs/DEPENDENCY_KIND_CONTRACT.md +27 -0
  69. package/docs/MERGE_SAFETY.md +28 -5
  70. package/docs/README.md +1 -0
  71. package/docs/RELEASE_RELIABILITY.md +70 -0
  72. package/docs/RELEASING.md +4 -0
  73. package/docs/TESTING.md +17 -0
  74. package/docs/VALIDATION_PORTABILITY.md +20 -11
  75. package/marketplace.json +2 -2
  76. package/package.json +6 -5
  77. package/packages/pm-beads/package.json +1 -1
  78. package/packages/pm-calendar/package.json +1 -1
  79. package/packages/pm-command-kit/package.json +1 -1
  80. package/packages/pm-digital-twin/package.json +1 -1
  81. package/packages/pm-governance-audit/package.json +1 -1
  82. package/packages/pm-guide-shell/package.json +1 -1
  83. package/packages/pm-kanban/package.json +1 -1
  84. package/packages/pm-lifecycle-hooks/package.json +1 -1
  85. package/packages/pm-linked-test-adapters/package.json +1 -1
  86. package/packages/pm-search-advanced/package.json +1 -1
  87. package/packages/pm-templates/package.json +1 -1
  88. package/packages/pm-todos/package.json +1 -1
  89. package/packages/pm-vcs/package.json +1 -1
  90. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  91. package/plugins/pm-claude/README.md +6 -5
  92. package/plugins/pm-claude/hooks/hooks.json +1 -1
  93. package/plugins/pm-claude/hooks/session-start.mjs +9 -6
  94. package/plugins/pm-claude/package.json +9 -0
  95. package/plugins/pm-claude/scripts/plugin-runtime.mjs +84 -0
  96. package/plugins/pm-claude/scripts/pm-mcp-server.mjs +39 -96
  97. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  98. package/plugins/pm-codex/.mcp.json +0 -3
  99. package/plugins/pm-codex/README.md +1 -1
  100. package/plugins/pm-codex/package.json +9 -0
  101. package/plugins/pm-codex/scripts/plugin-runtime.mjs +84 -0
  102. package/plugins/pm-codex/scripts/pm-mcp-server.mjs +38 -99
  103. package/dist/cli-bundle/focused-chunks/chunk-3JAEZ7WI.js +0 -59
@@ -1,3 +1,3 @@
1
- import{a as k,c as I,d as A,e as _,k as T,m as C}from"./chunk-E6ZES2X7.js";import{Db as b,Eb as v,Fb as R}from"./chunk-PFWCAI4X.js";import{$o as w,Cj as x,Ec as E,Ef as D,Eo as f,Hf as m,Ho as g,If as y,Io as a,kl as H,la as c,na as p}from"./chunk-7IABMUB6.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="631e56aa-4d7e-58b6-bbea-a0d320716b82")}catch{}})();(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="0bcdd63c-5fd3-585d-a6c5-9393029ef864")}catch{}})();(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="4dce4f19-071c-54a8-be0d-5975d9e3b34b")}catch{}})();(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="f330a0c5-a967-5383-9c27-efa4a39e0f0d")}catch{}})();(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="420952ed-9a04-55dd-bcb8-804d81582002")}catch{}})();function B(t,e){if(typeof t!="string")return;let o=Number.parseInt(t,10);if(!/^\d+$/.test(t.trim())||!Number.isSafeInteger(o))throw new p(`history-compact ${e} must be a non-negative integer.`,c.USAGE);return o}async function O(t,e,o){let r=f(o),n=Date.now(),i=await x(a(e,"ids")),l=i===void 0?void 0:H(i),d=B(e.allOver,"--all-over"),u=B(e.minEntries,"--min-entries");if(e.closed===!0&&e.allStreams===!0)throw new p("history-compact: --closed and --all-streams are mutually exclusive; pick one lifecycle scope.",c.USAGE);let s=e.closed===!0?"closed":e.allStreams===!0?"all-streams":void 0;if((l!==void 0||d!==void 0||s!==void 0)&&typeof e.before=="string")throw new p("history-compact: --before applies only in single-id mode (bulk mode always compacts full streams).",c.USAGE);if(I(t,{ids:l,allOver:d,scope:s}),t!==void 0&&u!==void 0)throw new p("history-compact: --min-entries applies only in bulk mode (single-id mode compacts the named stream).",c.USAGE);if(t===void 0){let h=await A({ids:l,scope:s,allOver:d,minEntries:u,dryRun:e.dryRun===!0,author:a(e,"author"),message:a(e,"message"),force:!!e.force},r);m(h,r),h.totals.items_errored>0&&(process.exitCode=c.GENERIC_FAILURE)}else{let h=await k(t,{before:a(e,"before"),dryRun:e.dryRun===!0,author:a(e,"author"),message:a(e,"message"),force:!!e.force},r);m(h,r)}r.profile&&y(`profile:command=history-compact took_ms=${Date.now()-n}`)}async function S(t,e,o,r){let n=f(r),i=Date.now(),l=await C(t,e,{author:a(o,"author"),message:a(o,"message"),force:!!o.force},n);await w(n,l),m(l,n),n.profile&&y(`profile:command=restore took_ms=${Date.now()-i}`)}async function N(t,e){let o=f(e),r=await T({verify:a(t,"verify"),output:a(t,"output"),hashAlgorithm:a(t,"hashAlgorithm")},o);"format"in r?(E(r),o.quiet||D(`${JSON.stringify(r,null,2)}
1
+ import{a as k,c as I,d as A,e as _,k as T,m as C}from"./chunk-3IB4THWX.js";import{Db as b,Eb as v,Fb as R}from"./chunk-445ARBKY.js";import{$o as w,Cj as x,Ec as E,Ef as D,Eo as f,Hf as m,Ho as g,If as y,Io as a,kl as H,la as c,na as p}from"./chunk-JDHWZYZU.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="631e56aa-4d7e-58b6-bbea-a0d320716b82")}catch{}})();(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="0bcdd63c-5fd3-585d-a6c5-9393029ef864")}catch{}})();(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="4dce4f19-071c-54a8-be0d-5975d9e3b34b")}catch{}})();(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="f330a0c5-a967-5383-9c27-efa4a39e0f0d")}catch{}})();(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="420952ed-9a04-55dd-bcb8-804d81582002")}catch{}})();function B(t,e){if(typeof t!="string")return;let o=Number.parseInt(t,10);if(!/^\d+$/.test(t.trim())||!Number.isSafeInteger(o))throw new p(`history-compact ${e} must be a non-negative integer.`,c.USAGE);return o}async function O(t,e,o){let r=f(o),n=Date.now(),i=await x(a(e,"ids")),l=i===void 0?void 0:H(i),d=B(e.allOver,"--all-over"),u=B(e.minEntries,"--min-entries");if(e.closed===!0&&e.allStreams===!0)throw new p("history-compact: --closed and --all-streams are mutually exclusive; pick one lifecycle scope.",c.USAGE);let s=e.closed===!0?"closed":e.allStreams===!0?"all-streams":void 0;if((l!==void 0||d!==void 0||s!==void 0)&&typeof e.before=="string")throw new p("history-compact: --before applies only in single-id mode (bulk mode always compacts full streams).",c.USAGE);if(I(t,{ids:l,allOver:d,scope:s}),t!==void 0&&u!==void 0)throw new p("history-compact: --min-entries applies only in bulk mode (single-id mode compacts the named stream).",c.USAGE);if(t===void 0){let h=await A({ids:l,scope:s,allOver:d,minEntries:u,dryRun:e.dryRun===!0,author:a(e,"author"),message:a(e,"message"),force:!!e.force},r);m(h,r),h.totals.items_errored>0&&(process.exitCode=c.GENERIC_FAILURE)}else{let h=await k(t,{before:a(e,"before"),dryRun:e.dryRun===!0,author:a(e,"author"),message:a(e,"message"),force:!!e.force},r);m(h,r)}r.profile&&y(`profile:command=history-compact took_ms=${Date.now()-n}`)}async function S(t,e,o,r){let n=f(r),i=Date.now(),l=await C(t,e,{author:a(o,"author"),message:a(o,"message"),force:!!o.force},n);await w(n,l),m(l,n),n.profile&&y(`profile:command=restore took_ms=${Date.now()-i}`)}async function N(t,e){let o=f(e),r=await T({verify:a(t,"verify"),output:a(t,"output"),hashAlgorithm:a(t,"hashAlgorithm")},o);"format"in r?(E(r),o.quiet||D(`${JSON.stringify(r,null,2)}
2
2
  `)):m(r,o),"ok"in r&&!r.ok&&(process.exitCode=c.GENERIC_FAILURE)}function ee(t,e){t.command(e?"attest":"history-attest",{hidden:!e}).summary("Export or verify history proof.").option("--verify <file>","Compare retained streams with a detached JSON proof").option("--output <file>","Create a proof file and return a compact receipt").option("--hash-algorithm <name>","Bundle digest algorithm: sha256 (default) or sha512").description("Export exact-byte history commitments, or verify an independently retained proof without tracker writes.").action(N),t.command("restore",{hidden:!e}).summary("Restore a version.").argument("<id>","Item id").argument("<target>","Restore target timestamp or version number").option("--author <value>","Mutation author").option("--message <value>","History message").option("--force","Force ownership/lock override").description("Restore an item to an earlier timestamp or version.").action(S),t.command(e?"redact":"history-redact",{hidden:!e}).summary("Redact sensitive values.").argument("<id>","Item id").option("--literal <value>","Literal string to redact (repeatable)",g).option("--regex <value>","Regex pattern to redact (repeatable; accepts /pattern/flags or raw pattern)",g).option("--replacement <value>",'Replacement string (default: "[redacted]")').option("--dry-run","Preview redaction impact without writing item/history files").option("--author <value>","Mutation author").option("--message <value>","Audit history message for the redaction marker entry").option("--force","Force ownership/lock override").description("Redact sensitive literals/patterns from an item history stream and recompute hashes.").action(async(o,r,n)=>{let i=f(n),l=Date.now(),d=Array.isArray(r.literal)?r.literal:void 0,u=Array.isArray(r.regex)?r.regex:void 0,s=await _(o,{literal:d,regex:u,replacement:a(r,"replacement"),dryRun:r.dryRun===!0,author:a(r,"author"),message:a(r,"message"),force:!!r.force},i);s.changed&&!s.dry_run&&await w(i,s),m(s,i),i.profile&&y(`profile:command=history-redact took_ms=${Date.now()-l}`)}),t.command(e?"repair":"history-repair",{hidden:!e}).summary("Repair drift.").argument("[id]","Item id (omit with --all)").option("--salvage-tail","Recover invalid tail; requires verified prefix").option("--all","Scan every stream for drift and repair each drifted stream in one audited pass").option("--dry-run","Preview the re-anchor impact without writing the history file").option("--normalize-provenance","Remove invalid provenance; return aggregate-only evidence").option("--author <value>","Mutation author").option("--message <value>","Audit history message for the repair marker entry").option("--force","Force ownership/lock override").description("Re-anchor a drifted item history chain (recompute hashes, reconcile with the on-disk item) and record an audit marker. Use --all to repair every drifted stream.").action(async(o,r,n)=>{let i=f(n),l=Date.now(),d=r.all===!0;v(o,d);let u={dryRun:r.dryRun===!0,author:a(r,"author"),message:a(r,"message"),force:!!r.force,normalizeProvenance:r.normalizeProvenance===!0,salvageTail:r.salvageTail===!0};if(d){let s=await R(u,i);m(s,i),s.totals.failed>0&&(process.exitCode=c.GENERIC_FAILURE)}else{let s=await b(o,u,i);m(s,i)}i.profile&&y(`profile:command=history-repair took_ms=${Date.now()-l}`)}),t.command(e?"compact":"history-compact",{hidden:!e}).summary("Compact streams.").argument("[id]","Item id (omit when using a bulk selector)").option("--before <value>","Compact entries strictly before this version number or ISO timestamp (single-id mode only)").option("--ids <value>","Bulk IDs: comma/newline text, - stdin, or @path file").option("--all-over <n>","Bulk: compact every stream with more than N entries").option("--closed","Bulk: compact only closed (terminal) items' streams").option("--all-streams","Bulk: compact every history stream regardless of lifecycle state").option("--min-entries <n>","Bulk: skip streams with at most N entries (already compact; default 3)").option("--dry-run","Preview compaction impact without writing the history file").option("--author <value>","Mutation author").option("--message <value>","Audit history message for the compaction marker entry").option("--force","Force ownership/lock override").description("Compact item history streams into a synthetic baseline plus retained tail entries. Pass an item id for one stream, or a bulk selector (--ids/--all-over/--closed/--all-streams) to compact many.").action(O)}export{ee as a};
3
- //# sourceMappingURL=chunk-ZSVINTXT.js.map
3
+ //# sourceMappingURL=chunk-GOWZEBTH.js.map