@unbrained/pm-cli 2026.11.17 → 2026.11.19

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 (124) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/dist/cli-bundle/bundle-manifest.json +1 -1
  3. package/dist/cli-bundle/chunks/chunk-2UTJ5QIE.js +71 -0
  4. package/dist/cli-bundle/chunks/{chunk-VLKCFZY6.js → chunk-4FNMPZ7Y.js} +2 -2
  5. package/dist/cli-bundle/chunks/chunk-723PMYNX.js +125 -0
  6. package/dist/cli-bundle/chunks/{chunk-77MGDTK4.js → chunk-AGPFANRX.js} +3 -3
  7. package/dist/cli-bundle/chunks/{chunk-RXNBNF6O.js → chunk-AMHD7WIV.js} +2 -2
  8. package/dist/cli-bundle/chunks/{chunk-7K2RUKMK.js → chunk-AOV5HG3Y.js} +2 -2
  9. package/dist/cli-bundle/chunks/{chunk-36R3JTAD.js → chunk-CNMGGAZO.js} +2 -2
  10. package/dist/cli-bundle/chunks/{chunk-XPBADEUK.js → chunk-CTOE26W4.js} +2 -2
  11. package/dist/cli-bundle/chunks/{chunk-FXSLODOK.js → chunk-GQCMICAL.js} +2 -2
  12. package/dist/cli-bundle/chunks/{chunk-ABFHWRLE.js → chunk-IQKCRLQP.js} +2 -2
  13. package/dist/cli-bundle/chunks/{chunk-QANUQMDL.js → chunk-IUTN67EB.js} +2 -2
  14. package/dist/cli-bundle/chunks/chunk-M76BEWTT.js +31 -0
  15. package/dist/cli-bundle/chunks/{chunk-ADKDFCVT.js → chunk-N2CPCFSN.js} +2 -2
  16. package/dist/cli-bundle/chunks/{chunk-KIQNEOKJ.js → chunk-NMVPQTZI.js} +2 -2
  17. package/dist/cli-bundle/chunks/{chunk-XP35IEHT.js → chunk-O7IFAJ76.js} +2 -2
  18. package/dist/cli-bundle/chunks/{chunk-X5TFNFTS.js → chunk-OESI2ETD.js} +2 -2
  19. package/dist/cli-bundle/chunks/{chunk-ACLBUVQG.js → chunk-P4A5RFLX.js} +2 -2
  20. package/dist/cli-bundle/chunks/{chunk-QZNL5XDT.js → chunk-PRVT7ITI.js} +2 -2
  21. package/dist/cli-bundle/chunks/{chunk-O4ZSIMNC.js → chunk-Q32Q3LRH.js} +2 -2
  22. package/dist/cli-bundle/chunks/{chunk-DXSZL3T6.js → chunk-XPBPGDFW.js} +2 -2
  23. package/dist/cli-bundle/chunks/{chunk-4FIN2XWC.js → chunk-Z5LHCEXG.js} +2 -2
  24. package/dist/cli-bundle/chunks/{item-revision-7RVMVXTE.js → item-revision-YJKGOYBR.js} +2 -2
  25. package/dist/cli-bundle/chunks/item-transaction-K4YZ7GWR.js +2 -0
  26. package/dist/cli-bundle/chunks/{mutation-admission-3PKQOAYK.js → mutation-admission-JLMQJ2M5.js} +2 -2
  27. package/dist/cli-bundle/chunks/{register-list-query-TPZLHFHQ.js → register-list-query-4AXLLXK7.js} +2 -2
  28. package/dist/cli-bundle/chunks/{register-mutation-JG5AEBRJ.js → register-mutation-FJIXGGF4.js} +2 -2
  29. package/dist/cli-bundle/chunks/{register-operations-3CNXP46P.js → register-operations-W4E2KEMA.js} +2 -2
  30. package/dist/cli-bundle/chunks/{register-setup-4N56VL2P.js → register-setup-RYRIBNSN.js} +2 -2
  31. package/dist/cli-bundle/focused-chunks/{chunk-VBA4BIHN.js → chunk-2XULTI5B.js} +2 -2
  32. package/dist/cli-bundle/focused-chunks/{chunk-2MQNIDKG.js → chunk-4S7I342K.js} +2 -2
  33. package/dist/cli-bundle/focused-chunks/{chunk-GD2YWUAD.js → chunk-77CDWGBW.js} +55 -54
  34. package/dist/cli-bundle/focused-chunks/{chunk-BNLLST32.js → chunk-7A4VIRIU.js} +2 -2
  35. package/dist/cli-bundle/focused-chunks/{chunk-SESMRMEE.js → chunk-D72EQN7Z.js} +2 -2
  36. package/dist/cli-bundle/focused-chunks/{chunk-YWPLBFPC.js → chunk-GAOWBALE.js} +23 -23
  37. package/dist/cli-bundle/focused-chunks/chunk-N64BUB63.js +27 -0
  38. package/dist/cli-bundle/focused-chunks/{chunk-XJS4COL2.js → chunk-OF4UM5B6.js} +2 -2
  39. package/dist/cli-bundle/focused-chunks/{chunk-6JQXDGHM.js → chunk-P4TG4VMJ.js} +2 -2
  40. package/dist/cli-bundle/focused-chunks/{item-revision-U7GDVAH7.js → item-revision-32HFGFYG.js} +2 -2
  41. package/dist/cli-bundle/focused-chunks/{item-transaction-7C4BH47O.js → item-transaction-C4VW3SHX.js} +2 -2
  42. package/dist/cli-bundle/focused-chunks/{mutation-admission-SKXVITP5.js → mutation-admission-PNK6ORZR.js} +2 -2
  43. package/dist/cli-bundle/main.js +2 -2
  44. package/dist/cli-bundle/sdk-authoring.js +1 -1
  45. package/dist/cli-bundle/sdk-core.js +1 -1
  46. package/dist/cli-bundle/sdk-governance.js +1 -1
  47. package/dist/cli-bundle/sdk-merge.js +58 -58
  48. package/dist/cli-bundle/sdk-query.js +1 -1
  49. package/dist/cli-bundle/sdk-runtime.js +1 -1
  50. package/dist/cli-bundle/sdk-testing.js +1 -1
  51. package/dist/cli-bundle/sdk.js +11 -11
  52. package/dist/core/fs/file-glob.js +2 -0
  53. package/dist/core/shared/process-tree.js +3 -0
  54. package/dist/core/shared/secret-rules.d.ts +94 -4
  55. package/dist/core/shared/secret-rules.js +5 -4
  56. package/dist/sdk/extension/managed-state.d.ts +3 -1
  57. package/dist/sdk/extension/managed-state.js +1 -1
  58. package/dist/sdk/extension/managed-update-status.js +1 -1
  59. package/dist/sdk/extension/update-check.d.ts +42 -6
  60. package/dist/sdk/extension/update-check.js +1 -1
  61. package/dist/sdk/extension.d.ts +3 -1
  62. package/dist/sdk/extension.js +1 -1
  63. package/dist/sdk/index.d.ts +1 -1
  64. package/dist/sdk/index.js +1 -1
  65. package/dist/sdk/linked-artifacts.js +2 -2
  66. package/dist/sdk/mutation-guard.d.ts +146 -5
  67. package/dist/sdk/mutation-guard.js +1 -1
  68. package/dist/sdk/public-surface.json +1 -1
  69. package/dist/sdk/test/execution.js +2 -2
  70. package/docs/COMMANDS.md +33 -0
  71. package/docs/CONFIGURATION.md +1 -0
  72. package/docs/DEFECT_RECURRENCE.md +3 -2
  73. package/docs/MUTATION_INTEGRITY.md +259 -7
  74. package/docs/PACKAGE_EVIDENCE.md +66 -0
  75. package/marketplace.json +1 -1
  76. package/package.json +1 -3
  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/package.json +1 -1
  92. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  93. package/plugins/pm-codex/package.json +1 -1
  94. package/plugins/pm-codex/plugin.json +1 -1
  95. package/runtime-dependencies.json +1 -1
  96. package/dist/cli-bundle/chunks/chunk-2WHXFKMY.js +0 -31
  97. package/dist/cli-bundle/chunks/chunk-3IU2S5UQ.js +0 -70
  98. package/dist/cli-bundle/chunks/chunk-AM26RAG7.js +0 -124
  99. package/dist/cli-bundle/chunks/item-transaction-NVX6P3FK.js +0 -2
  100. package/dist/cli-bundle/focused-chunks/chunk-ZDY5L2C2.js +0 -26
  101. package/node_modules/fdir/LICENSE +0 -7
  102. package/node_modules/fdir/README.md +0 -91
  103. package/node_modules/fdir/dist/index.cjs +0 -588
  104. package/node_modules/fdir/dist/index.d.cts +0 -155
  105. package/node_modules/fdir/dist/index.d.mts +0 -155
  106. package/node_modules/fdir/dist/index.mjs +0 -570
  107. package/node_modules/fdir/package.json +0 -106
  108. package/node_modules/picomatch/LICENSE +0 -21
  109. package/node_modules/picomatch/README.md +0 -743
  110. package/node_modules/picomatch/index.js +0 -17
  111. package/node_modules/picomatch/lib/constants.js +0 -184
  112. package/node_modules/picomatch/lib/parse.js +0 -1425
  113. package/node_modules/picomatch/lib/picomatch.js +0 -361
  114. package/node_modules/picomatch/lib/scan.js +0 -403
  115. package/node_modules/picomatch/lib/utils.js +0 -72
  116. package/node_modules/picomatch/package.json +0 -83
  117. package/node_modules/picomatch/posix.js +0 -3
  118. package/node_modules/tinyglobby/LICENSE +0 -21
  119. package/node_modules/tinyglobby/README.md +0 -25
  120. package/node_modules/tinyglobby/dist/index.cjs +0 -335
  121. package/node_modules/tinyglobby/dist/index.d.cts +0 -148
  122. package/node_modules/tinyglobby/dist/index.d.mts +0 -148
  123. package/node_modules/tinyglobby/dist/index.mjs +0 -307
  124. package/node_modules/tinyglobby/package.json +0 -70
@@ -1,2 +1,2 @@
1
- import{_c as o}from"./chunk-2WHXFKMY.js";import{sa as d}from"./chunk-AM26RAG7.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="41b0b451-a696-5d06-a19d-df1d6b28963c")}catch{}})();function i(e,t,n){return o(e,d(t),n)}export{i as a};
2
- //# sourceMappingURL=chunk-ADKDFCVT.js.map
1
+ import{_c as o}from"./chunk-M76BEWTT.js";import{sa as d}from"./chunk-723PMYNX.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="41b0b451-a696-5d06-a19d-df1d6b28963c")}catch{}})();function i(e,t,n){return o(e,d(t),n)}export{i as a};
2
+ //# sourceMappingURL=chunk-N2CPCFSN.js.map
@@ -1,2 +1,2 @@
1
- import{ha as p,ia as i,ja as v,ka as _}from"./chunk-3IU2S5UQ.js";import{Ua as h}from"./chunk-7UUPLMCU.js";import u from"node:fs/promises";import c from"node:path";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="846100a9-4314-5f7c-b892-fa16e09bee5b")}catch{}})();function f(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="ENOENT"}function y(e){return e!=="invalid"&&e!=="unreadable"}function j(e){let t=JSON.parse(e);if(typeof t!="object"||t===null||Array.isArray(t))throw new SyntaxError("Invalid settings object");let r=t.extensions;if(r===void 0)return{enabled:[],disabled:[]};if(typeof r!="object"||r===null||Array.isArray(r))throw new SyntaxError("Invalid extensions settings");let n=r;if(n.enabled!==void 0&&(!Array.isArray(n.enabled)||!n.enabled.every(a=>typeof a=="string"))||n.disabled!==void 0&&(!Array.isArray(n.disabled)||!n.disabled.every(a=>typeof a=="string")))throw new SyntaxError("Invalid extension enablement lists");return{enabled:n.enabled??[],disabled:n.disabled??[]}}async function S(e){let t;try{t=await u.readFile(e,"utf8")}catch(r){return f(r)?{status:"absent",enabled:[],disabled:[]}:{status:"unreadable",enabled:[],disabled:[],error:{code:"settings_unreadable",path:e}}}try{return{status:"ok",...j(t)}}catch{return{status:"invalid",enabled:[],disabled:[],error:{code:"settings_invalid",path:e}}}}async function A(e){let t;try{t=await u.readFile(e,"utf8")}catch(r){if(f(r))try{if((await u.stat(c.dirname(e))).isDirectory())return{status:"absent",entries:[]}}catch(n){if(f(n))return{status:"absent",entries:[]}}return{status:"unreadable",entries:[],error:{code:"managed_state_unreadable",path:e}}}try{let r=JSON.parse(t),n=_(r);if(!n||typeof r!="object"||r===null||!Array.isArray(r.entries)||n.entries.length!==r.entries.length)throw new SyntaxError("Invalid managed extension state");return{status:"ok",entries:n.entries}}catch{return{status:"invalid",entries:[],error:{code:"managed_state_invalid",path:e}}}}async function I(e){try{return{directories:(await u.readdir(e,{withFileTypes:!0})).filter(t=>t.isDirectory()).map(t=>t.name).sort((t,r)=>t.localeCompare(r))}}catch(t){return f(t)?{directories:[]}:{directories:[],error:{code:"extensions_unreadable",path:e}}}}async function D(e){let t;try{t=await u.readFile(e,"utf8")}catch(r){return f(r)?{manifest:null,error:{code:"manifest_invalid",path:e}}:{manifest:null,error:{code:"manifest_unreadable",path:e}}}try{let r=v(JSON.parse(t));return r?{manifest:r}:{manifest:null,error:{code:"manifest_invalid",path:e}}}catch{return{manifest:null,error:{code:"manifest_invalid",path:e}}}}function M(e){let t=e.manifest?.name??e.directory,r=new Set(p(e.settings.enabled)),n=new Set(p(e.settings.disabled)),a=!y(e.settings.status)||!e.manifest?null:!n.has(t)&&(r.size===0||r.has(t)),o=y(e.managed.status)?e.managed.entries.some(d=>i(d.name)===i(t)||i(d.directory)===i(e.directory)):null;return{name:t,directory:e.directory,scope:e.scope,installed:!0,status:e.manifest?a===!1?"inactive":"installed":"malformed_manifest",configured_enabled:a,managed:o,runtime_active:null,...e.manifest?{version:e.manifest.version}:{}}}async function R(e){let t=e.scope??"project",r=t==="global"?h(e.cwd??process.cwd()):e.pmRoot,n=c.join(r,"extensions"),a=await S(c.join(r,"settings.json")),o=await A(c.join(n,".managed-extensions.json")),d=await I(n),l=[];for(let s of[a,o,d])s.error&&l.push(s.error);let m=e.name?.trim(),b=[];for(let s of d.directories){let x=c.join(n,s,"manifest.json"),g=await D(x);g.error&&l.push(g.error);let w=M({directory:s,scope:t,manifest:g.manifest,settings:a,managed:o});m&&![w.name,s].some(E=>i(E)===i(m))||b.push(w)}return m&&b.length===0&&l.every(s=>s.code!=="extensions_unreadable")&&b.push({name:m,directory:null,scope:t,installed:!1,status:"absent",configured_enabled:y(a.status)?!1:null,managed:y(o.status)?!1:null,runtime_active:null}),{scope:t,complete:l.length===0,settings_status:a.status,managed_state_status:o.status,extensions:b,errors:l}}export{R as a};
2
- //# sourceMappingURL=chunk-KIQNEOKJ.js.map
1
+ import{ha as p,ia as i,ja as v,ka as _}from"./chunk-2UTJ5QIE.js";import{Ua as h}from"./chunk-7UUPLMCU.js";import u from"node:fs/promises";import c from"node:path";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="846100a9-4314-5f7c-b892-fa16e09bee5b")}catch{}})();function f(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="ENOENT"}function y(e){return e!=="invalid"&&e!=="unreadable"}function j(e){let t=JSON.parse(e);if(typeof t!="object"||t===null||Array.isArray(t))throw new SyntaxError("Invalid settings object");let r=t.extensions;if(r===void 0)return{enabled:[],disabled:[]};if(typeof r!="object"||r===null||Array.isArray(r))throw new SyntaxError("Invalid extensions settings");let n=r;if(n.enabled!==void 0&&(!Array.isArray(n.enabled)||!n.enabled.every(a=>typeof a=="string"))||n.disabled!==void 0&&(!Array.isArray(n.disabled)||!n.disabled.every(a=>typeof a=="string")))throw new SyntaxError("Invalid extension enablement lists");return{enabled:n.enabled??[],disabled:n.disabled??[]}}async function S(e){let t;try{t=await u.readFile(e,"utf8")}catch(r){return f(r)?{status:"absent",enabled:[],disabled:[]}:{status:"unreadable",enabled:[],disabled:[],error:{code:"settings_unreadable",path:e}}}try{return{status:"ok",...j(t)}}catch{return{status:"invalid",enabled:[],disabled:[],error:{code:"settings_invalid",path:e}}}}async function A(e){let t;try{t=await u.readFile(e,"utf8")}catch(r){if(f(r))try{if((await u.stat(c.dirname(e))).isDirectory())return{status:"absent",entries:[]}}catch(n){if(f(n))return{status:"absent",entries:[]}}return{status:"unreadable",entries:[],error:{code:"managed_state_unreadable",path:e}}}try{let r=JSON.parse(t),n=_(r);if(!n||typeof r!="object"||r===null||!Array.isArray(r.entries)||n.entries.length!==r.entries.length)throw new SyntaxError("Invalid managed extension state");return{status:"ok",entries:n.entries}}catch{return{status:"invalid",entries:[],error:{code:"managed_state_invalid",path:e}}}}async function I(e){try{return{directories:(await u.readdir(e,{withFileTypes:!0})).filter(t=>t.isDirectory()).map(t=>t.name).sort((t,r)=>t.localeCompare(r))}}catch(t){return f(t)?{directories:[]}:{directories:[],error:{code:"extensions_unreadable",path:e}}}}async function D(e){let t;try{t=await u.readFile(e,"utf8")}catch(r){return f(r)?{manifest:null,error:{code:"manifest_invalid",path:e}}:{manifest:null,error:{code:"manifest_unreadable",path:e}}}try{let r=v(JSON.parse(t));return r?{manifest:r}:{manifest:null,error:{code:"manifest_invalid",path:e}}}catch{return{manifest:null,error:{code:"manifest_invalid",path:e}}}}function M(e){let t=e.manifest?.name??e.directory,r=new Set(p(e.settings.enabled)),n=new Set(p(e.settings.disabled)),a=!y(e.settings.status)||!e.manifest?null:!n.has(t)&&(r.size===0||r.has(t)),o=y(e.managed.status)?e.managed.entries.some(d=>i(d.name)===i(t)||i(d.directory)===i(e.directory)):null;return{name:t,directory:e.directory,scope:e.scope,installed:!0,status:e.manifest?a===!1?"inactive":"installed":"malformed_manifest",configured_enabled:a,managed:o,runtime_active:null,...e.manifest?{version:e.manifest.version}:{}}}async function R(e){let t=e.scope??"project",r=t==="global"?h(e.cwd??process.cwd()):e.pmRoot,n=c.join(r,"extensions"),a=await S(c.join(r,"settings.json")),o=await A(c.join(n,".managed-extensions.json")),d=await I(n),l=[];for(let s of[a,o,d])s.error&&l.push(s.error);let m=e.name?.trim(),b=[];for(let s of d.directories){let x=c.join(n,s,"manifest.json"),g=await D(x);g.error&&l.push(g.error);let w=M({directory:s,scope:t,manifest:g.manifest,settings:a,managed:o});m&&![w.name,s].some(E=>i(E)===i(m))||b.push(w)}return m&&b.length===0&&l.every(s=>s.code!=="extensions_unreadable")&&b.push({name:m,directory:null,scope:t,installed:!1,status:"absent",configured_enabled:y(a.status)?!1:null,managed:y(o.status)?!1:null,runtime_active:null}),{scope:t,complete:l.length===0,settings_status:a.status,managed_state_status:o.status,extensions:b,errors:l}}export{R as a};
2
+ //# sourceMappingURL=chunk-NMVPQTZI.js.map
@@ -1,2 +1,2 @@
1
- import{l as T,m as F,n as O}from"./chunk-77MGDTK4.js";import{m as S,n as I}from"./chunk-2WHXFKMY.js";import{Cc as p,Gc as s,Hc as u,Xc as y}from"./chunk-7K2RUKMK.js";import{$g as A,ah as _,lb as c}from"./chunk-7UUPLMCU.js";import{A as f,C as m}from"./chunk-5OFMWP3Q.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e2514244-d31d-5ee4-b037-b9101f9a24e1")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="10a4ed4d-39d3-5b7b-87b1-4a6f95f0f2ab")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="796e71dc-4693-50da-bbb8-57b19ff0af95")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f9aa4d7a-f8f4-5c1a-a372-83ccb55c5668")}catch{}})();function g(e,n,t,i){if(n.trim().toLowerCase()!=="add"||!t?.trim())return;let o=s(i,"add")??s(i,"text")??s(i,"note")??s(i,"body")??s(i,"comment"),r=s(i,"file"),d=[e,t.trim()];o!==void 0?d.push("--add",o):i.stdin===!0?d.push("--stdin"):r!==void 0?d.push("--file",r):d.push("--add","-");let a=c(d),l=c([e,t.trim(),"--add","-"]);throw new m(`The positional token "add" was parsed as the item id, while "${t.trim()}" was parsed as annotation text. ${e} does not use an add subcommand.`,f.USAGE,{code:"annotation_transposed_subcommand",reason:"noun_verb_object_transposition",required:`Place the item id immediately after ${e}, then use --add for annotation text.`,examples:[...new Set([a,l])],recovery:{attempted_command:`pm ${e} add ${t.trim()}`,normalized_args:[e,"add",t.trim()],parsed_positionals:[{role:"transposed_subcommand",value:"add"},{role:"item_id",value:t.trim()}],suggested_retry:a}})}var D={comments:["add","text","body","comment"],notes:["add","text","note"],learnings:["add","text"]};function N(e,n,t,i,o){let r=D[e].some(a=>`--${a}`!==n&&s(o,a)!==void 0),d=o.delete!==void 0||o.edit!==void 0&&o.ifAbsent===!0;if(!(r||d||o.stdin===!0||s(o,"file")!==void 0||s(o,"addJson")!==void 0)){if(t==="--file")return i===void 0?void 0:["--file",i];if(t==="--stdin"||t.startsWith("--file="))return i===void 0?[t]:void 0}}function h(e,n,t,i){let o=D[e].map(a=>({flag:`--${a}`,value:s(i,a)?.trim()})).find(a=>a.value!==void 0&&S(a.value));if(o===void 0)return;let r=[e,n,...typeof i.edit=="number"?["--edit",String(i.edit)]:[]],d=N(e,o.flag,o.value,t,i);throw I({collectionKey:e,textFlag:o.flag,value:o.value,commandPrefix:c(r),...d===void 0?{}:{retryArgs:[...r,...d]},...d===void 0&&t!==void 0&&o.value!=="--file"?{conflictingOperand:t}:{}})}function R(e,n,t){let i=t.flatMap(o=>{let r=s(n,o);return r===void 0?[]:[{alias:o,value:r}]});if([...new Set(i.map(({value:o})=>o))].length>1)throw new m(`Specify ${e} text with one alias or the same value across aliases: ${i.map(({alias:o})=>`--${o}`).join(", ")}`,f.USAGE,{code:"annotation_alias_conflict"});return i[0]?.value}function C(e,n){let t=typeof n.edit=="number"?n.edit:void 0,i=typeof n.delete=="number"?n.delete:void 0,o=R("comment",n,["add","text","body","comment"]),r=typeof e=="string"?e:void 0,d=n.stdin===!0,a=s(n,"file");if(+(o!==void 0)+ +(r!==void 0)+Number(d)+ +(a!==void 0)>1)throw o!==void 0&&r!==void 0&&!d&&a===void 0?new m("Specify comment text either as positional [text] or with --add, not both",f.USAGE):new m("Specify comment text with exactly one source: positional [text], --add, --stdin, or --file",f.USAGE);let l=o??r;return{add:l,readFromStdin:d,readFromFile:a,editIndex:t,deleteIndex:i,isMutation:typeof l=="string"||d||a!==void 0||t!==void 0||i!==void 0}}function E(e,n,t){let i=R(e,t,e==="note"?["add","text","note"]:["add","text"]),o=typeof n=="string"?n:void 0;if(i!==void 0&&o!==void 0)throw new m(`Specify ${e} text either as positional [text] or with --add, not both`,f.USAGE);let r=i??o,d=e==="note"?s(t,"addJson"):void 0,a=t.stdin===!0,l=s(t,"file"),x=typeof t.edit=="number"?t.edit:void 0,w=typeof t.delete=="number"?t.delete:void 0;return{add:r,addJson:d,readFromStdin:a,readFromFile:l,editIndex:x,deleteIndex:w,isMutation:typeof r=="string"||d!==void 0||a||l!==void 0||x!==void 0||w!==void 0}}var $=new Set(["comments","notes","learnings"]);function Y(e,n){let t=n[1];return $.has(e)&&typeof t=="string"?{add:t}:{}}function b(e){return{fullHistory:e.fullHistory===!0,ifAbsent:e.ifAbsent===!0,expectAt:s(e,"expectAt"),author:s(e,"author"),message:s(e,"message"),ownershipAppendBypass:e.ownershipAppendBypass===!0,force:!!e.force}}async function k(e,n,t,i){let o=p(i),r=Date.now();g("comments",e,n,t),h("comments",e,n,t);let d=C(n,t),a=await T(e,{add:d.add,stdin:d.readFromStdin,file:d.readFromFile,edit:d.editIndex,delete:d.deleteIndex,limit:s(t,"limit"),...b(t)},o);d.isMutation&&a.changed!==!1&&await y(o,a),v("comments",a,o,r)}async function H(e,n,t,i){let o=p(i),r=Date.now();g("notes",e,n,t),h("notes",e,n,t);let d=E("note",n,t),a=await O(e,{add:d.add,addJson:d.addJson,stdin:d.readFromStdin,file:d.readFromFile,edit:d.editIndex,delete:d.deleteIndex,limit:s(t,"limit"),since:s(t,"since"),eventType:s(t,"eventType"),includeMeta:t.includeMeta===!0,...b(t)},o);d.isMutation&&a.changed!==!1&&await y(o,a),v("notes",a,o,r)}async function J(e,n,t,i){let o=p(i),r=Date.now();g("learnings",e,n,t),h("learnings",e,n,t);let d=E("learning",n,t),a=await F(e,{add:d.add,stdin:d.readFromStdin,file:d.readFromFile,edit:d.editIndex,delete:d.deleteIndex,limit:s(t,"limit"),...b(t)},o);d.isMutation&&a.changed!==!1&&await y(o,a),v("learnings",a,o,r)}function v(e,n,t,i){A(n,t),t.profile&&_(`profile:command=${e} took_ms=${Date.now()-i}`)}function Z(e,n){let t=e.command("comments").argument("<id>","Item id").argument("[text]","Optional comment text shorthand (equivalent to --add)").option("--add <text>","Append comment text; use text=<value> for structured input or - for stdin").option("--stdin","Read comment text from stdin (supports multiline markdown)").option("--file <path>","Read comment text from a file or stdin (-)").option("--edit <index>","Replace one comment using positional text, --add, --stdin, or --file",n("--edit")).option("--delete <index>","Delete the comment at 1-based <index>",n("--delete")).option("--expect-at <ts>","Edit/delete only if the entry's created_at is <ts>").option("--limit <n>","Return only latest n comments").option("--full-history","Return complete comment history instead of a bounded mutation receipt").option("--if-absent","Append only when resolved author and text are absent").option("--author [value]","Comment author; defaults to PM_AUTHOR or settings").option("--message <value>","History message").option("--force","Force ownership override").description("List, add, edit, or delete comments for an item.").action(k);u(t,"--body <text>","Alias for --add",!1),u(t,"--text <text>","Alias for --add",!1),u(t,"--comment <text>","Alias for --add",!1);let i=e.command("notes").argument("<id>","Item id").argument("[text]","Optional note text shorthand for --add").option("--add <text>","Add a text note (- reads stdin)").option("--note <text>","Alias for --add").option("--add-json <json>","Append a JSON event").option("--stdin","Read note text from stdin").option("--file <path>","Read note from file or stdin (-)").option("--edit <index>","Replace a 1-based note using the selected text input",n("--edit")).option("--delete <index>","Delete the note at 1-based <index>",n("--delete")).option("--expect-at <ts>","Edit/delete only if the entry's created_at is <ts>").option("--limit <n>","Return only latest n notes").option("--since <timestamp>","Filter JSON events from this ISO time").option("--event-type <value>","Filter JSON events by top-level type").option("--include-meta","Include count and truncation metadata").option("--full-history","Return complete note history instead of a bounded receipt").option("--if-absent","Append only when resolved author and text are absent").option("--author [value]","Author; defaults to PM_AUTHOR/settings").option("--message <value>","History message").option("--force","Force ownership override").description("Manage merge-safe text notes and JSON context events.").action(H);u(i,"--text <text>","Alias for --add",!1);let o=e.command("learnings").argument("<id>","Item id").argument("[text]","Optional learning text shorthand for --add").option("--add <text>","Append learning text; use text=<value> or - for stdin").option("--stdin","Read learning text from stdin").option("--file <path>","Read learning text from a file or stdin (-)").option("--edit <index>","Replace one learning using positional text, --add, --stdin, or --file",n("--edit")).option("--delete <index>","Delete the learning at 1-based <index>",n("--delete")).option("--expect-at <ts>","Edit/delete only if the entry's created_at is <ts>").option("--limit <n>","Return only latest n learnings").option("--full-history","Return complete learning history instead of a bounded receipt").option("--if-absent","Append only when resolved author and text are absent").option("--author [value]","Learning author (optional; falls back to PM_AUTHOR/settings)").option("--message <value>","History message").option("--force","Force ownership override").description("List, add, edit, or delete learnings for an item.").action(J);u(o,"--text <text>","Alias for --add",!1)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="be983589-7a52-5022-b7b8-62d31572c012")}catch{}})();var M=[];function te(e){M=e.flatMap(n=>n.reason==="bare_key_value"&&typeof n.from=="string"&&Array.isArray(n.to)&&typeof n.to[0]=="string"?[{from:n.from,flag:n.to[0].split("=")[0]}]:[])}function ne(){return M}export{Y as a,Z as b,te as c,ne as d};
2
- //# sourceMappingURL=chunk-XP35IEHT.js.map
1
+ import{l as T,m as F,n as O}from"./chunk-AGPFANRX.js";import{m as S,n as I}from"./chunk-M76BEWTT.js";import{Cc as p,Gc as s,Hc as u,Xc as y}from"./chunk-AOV5HG3Y.js";import{$g as A,ah as _,lb as c}from"./chunk-7UUPLMCU.js";import{A as f,C as m}from"./chunk-5OFMWP3Q.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e2514244-d31d-5ee4-b037-b9101f9a24e1")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="10a4ed4d-39d3-5b7b-87b1-4a6f95f0f2ab")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="796e71dc-4693-50da-bbb8-57b19ff0af95")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f9aa4d7a-f8f4-5c1a-a372-83ccb55c5668")}catch{}})();function g(e,n,t,i){if(n.trim().toLowerCase()!=="add"||!t?.trim())return;let o=s(i,"add")??s(i,"text")??s(i,"note")??s(i,"body")??s(i,"comment"),r=s(i,"file"),d=[e,t.trim()];o!==void 0?d.push("--add",o):i.stdin===!0?d.push("--stdin"):r!==void 0?d.push("--file",r):d.push("--add","-");let a=c(d),l=c([e,t.trim(),"--add","-"]);throw new m(`The positional token "add" was parsed as the item id, while "${t.trim()}" was parsed as annotation text. ${e} does not use an add subcommand.`,f.USAGE,{code:"annotation_transposed_subcommand",reason:"noun_verb_object_transposition",required:`Place the item id immediately after ${e}, then use --add for annotation text.`,examples:[...new Set([a,l])],recovery:{attempted_command:`pm ${e} add ${t.trim()}`,normalized_args:[e,"add",t.trim()],parsed_positionals:[{role:"transposed_subcommand",value:"add"},{role:"item_id",value:t.trim()}],suggested_retry:a}})}var D={comments:["add","text","body","comment"],notes:["add","text","note"],learnings:["add","text"]};function N(e,n,t,i,o){let r=D[e].some(a=>`--${a}`!==n&&s(o,a)!==void 0),d=o.delete!==void 0||o.edit!==void 0&&o.ifAbsent===!0;if(!(r||d||o.stdin===!0||s(o,"file")!==void 0||s(o,"addJson")!==void 0)){if(t==="--file")return i===void 0?void 0:["--file",i];if(t==="--stdin"||t.startsWith("--file="))return i===void 0?[t]:void 0}}function h(e,n,t,i){let o=D[e].map(a=>({flag:`--${a}`,value:s(i,a)?.trim()})).find(a=>a.value!==void 0&&S(a.value));if(o===void 0)return;let r=[e,n,...typeof i.edit=="number"?["--edit",String(i.edit)]:[]],d=N(e,o.flag,o.value,t,i);throw I({collectionKey:e,textFlag:o.flag,value:o.value,commandPrefix:c(r),...d===void 0?{}:{retryArgs:[...r,...d]},...d===void 0&&t!==void 0&&o.value!=="--file"?{conflictingOperand:t}:{}})}function R(e,n,t){let i=t.flatMap(o=>{let r=s(n,o);return r===void 0?[]:[{alias:o,value:r}]});if([...new Set(i.map(({value:o})=>o))].length>1)throw new m(`Specify ${e} text with one alias or the same value across aliases: ${i.map(({alias:o})=>`--${o}`).join(", ")}`,f.USAGE,{code:"annotation_alias_conflict"});return i[0]?.value}function C(e,n){let t=typeof n.edit=="number"?n.edit:void 0,i=typeof n.delete=="number"?n.delete:void 0,o=R("comment",n,["add","text","body","comment"]),r=typeof e=="string"?e:void 0,d=n.stdin===!0,a=s(n,"file");if(+(o!==void 0)+ +(r!==void 0)+Number(d)+ +(a!==void 0)>1)throw o!==void 0&&r!==void 0&&!d&&a===void 0?new m("Specify comment text either as positional [text] or with --add, not both",f.USAGE):new m("Specify comment text with exactly one source: positional [text], --add, --stdin, or --file",f.USAGE);let l=o??r;return{add:l,readFromStdin:d,readFromFile:a,editIndex:t,deleteIndex:i,isMutation:typeof l=="string"||d||a!==void 0||t!==void 0||i!==void 0}}function E(e,n,t){let i=R(e,t,e==="note"?["add","text","note"]:["add","text"]),o=typeof n=="string"?n:void 0;if(i!==void 0&&o!==void 0)throw new m(`Specify ${e} text either as positional [text] or with --add, not both`,f.USAGE);let r=i??o,d=e==="note"?s(t,"addJson"):void 0,a=t.stdin===!0,l=s(t,"file"),x=typeof t.edit=="number"?t.edit:void 0,w=typeof t.delete=="number"?t.delete:void 0;return{add:r,addJson:d,readFromStdin:a,readFromFile:l,editIndex:x,deleteIndex:w,isMutation:typeof r=="string"||d!==void 0||a||l!==void 0||x!==void 0||w!==void 0}}var $=new Set(["comments","notes","learnings"]);function Y(e,n){let t=n[1];return $.has(e)&&typeof t=="string"?{add:t}:{}}function b(e){return{fullHistory:e.fullHistory===!0,ifAbsent:e.ifAbsent===!0,expectAt:s(e,"expectAt"),author:s(e,"author"),message:s(e,"message"),ownershipAppendBypass:e.ownershipAppendBypass===!0,force:!!e.force}}async function k(e,n,t,i){let o=p(i),r=Date.now();g("comments",e,n,t),h("comments",e,n,t);let d=C(n,t),a=await T(e,{add:d.add,stdin:d.readFromStdin,file:d.readFromFile,edit:d.editIndex,delete:d.deleteIndex,limit:s(t,"limit"),...b(t)},o);d.isMutation&&a.changed!==!1&&await y(o,a),v("comments",a,o,r)}async function H(e,n,t,i){let o=p(i),r=Date.now();g("notes",e,n,t),h("notes",e,n,t);let d=E("note",n,t),a=await O(e,{add:d.add,addJson:d.addJson,stdin:d.readFromStdin,file:d.readFromFile,edit:d.editIndex,delete:d.deleteIndex,limit:s(t,"limit"),since:s(t,"since"),eventType:s(t,"eventType"),includeMeta:t.includeMeta===!0,...b(t)},o);d.isMutation&&a.changed!==!1&&await y(o,a),v("notes",a,o,r)}async function J(e,n,t,i){let o=p(i),r=Date.now();g("learnings",e,n,t),h("learnings",e,n,t);let d=E("learning",n,t),a=await F(e,{add:d.add,stdin:d.readFromStdin,file:d.readFromFile,edit:d.editIndex,delete:d.deleteIndex,limit:s(t,"limit"),...b(t)},o);d.isMutation&&a.changed!==!1&&await y(o,a),v("learnings",a,o,r)}function v(e,n,t,i){A(n,t),t.profile&&_(`profile:command=${e} took_ms=${Date.now()-i}`)}function Z(e,n){let t=e.command("comments").argument("<id>","Item id").argument("[text]","Optional comment text shorthand (equivalent to --add)").option("--add <text>","Append comment text; use text=<value> for structured input or - for stdin").option("--stdin","Read comment text from stdin (supports multiline markdown)").option("--file <path>","Read comment text from a file or stdin (-)").option("--edit <index>","Replace one comment using positional text, --add, --stdin, or --file",n("--edit")).option("--delete <index>","Delete the comment at 1-based <index>",n("--delete")).option("--expect-at <ts>","Edit/delete only if the entry's created_at is <ts>").option("--limit <n>","Return only latest n comments").option("--full-history","Return complete comment history instead of a bounded mutation receipt").option("--if-absent","Append only when resolved author and text are absent").option("--author [value]","Comment author; defaults to PM_AUTHOR or settings").option("--message <value>","History message").option("--force","Force ownership override").description("List, add, edit, or delete comments for an item.").action(k);u(t,"--body <text>","Alias for --add",!1),u(t,"--text <text>","Alias for --add",!1),u(t,"--comment <text>","Alias for --add",!1);let i=e.command("notes").argument("<id>","Item id").argument("[text]","Optional note text shorthand for --add").option("--add <text>","Add a text note (- reads stdin)").option("--note <text>","Alias for --add").option("--add-json <json>","Append a JSON event").option("--stdin","Read note text from stdin").option("--file <path>","Read note from file or stdin (-)").option("--edit <index>","Replace a 1-based note using the selected text input",n("--edit")).option("--delete <index>","Delete the note at 1-based <index>",n("--delete")).option("--expect-at <ts>","Edit/delete only if the entry's created_at is <ts>").option("--limit <n>","Return only latest n notes").option("--since <timestamp>","Filter JSON events from this ISO time").option("--event-type <value>","Filter JSON events by top-level type").option("--include-meta","Include count and truncation metadata").option("--full-history","Return complete note history instead of a bounded receipt").option("--if-absent","Append only when resolved author and text are absent").option("--author [value]","Author; defaults to PM_AUTHOR/settings").option("--message <value>","History message").option("--force","Force ownership override").description("Manage merge-safe text notes and JSON context events.").action(H);u(i,"--text <text>","Alias for --add",!1);let o=e.command("learnings").argument("<id>","Item id").argument("[text]","Optional learning text shorthand for --add").option("--add <text>","Append learning text; use text=<value> or - for stdin").option("--stdin","Read learning text from stdin").option("--file <path>","Read learning text from a file or stdin (-)").option("--edit <index>","Replace one learning using positional text, --add, --stdin, or --file",n("--edit")).option("--delete <index>","Delete the learning at 1-based <index>",n("--delete")).option("--expect-at <ts>","Edit/delete only if the entry's created_at is <ts>").option("--limit <n>","Return only latest n learnings").option("--full-history","Return complete learning history instead of a bounded receipt").option("--if-absent","Append only when resolved author and text are absent").option("--author [value]","Learning author (optional; falls back to PM_AUTHOR/settings)").option("--message <value>","History message").option("--force","Force ownership override").description("List, add, edit, or delete learnings for an item.").action(J);u(o,"--text <text>","Alias for --add",!1)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="be983589-7a52-5022-b7b8-62d31572c012")}catch{}})();var M=[];function te(e){M=e.flatMap(n=>n.reason==="bare_key_value"&&typeof n.from=="string"&&Array.isArray(n.to)&&typeof n.to[0]=="string"?[{from:n.from,flag:n.to[0].split("=")[0]}]:[])}function ne(){return M}export{Y as a,Z as b,te as c,ne as d};
2
+ //# sourceMappingURL=chunk-O7IFAJ76.js.map