@unbrained/pm-cli 2026.9.26 → 2026.9.28

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 (181) hide show
  1. package/.claude-plugin/marketplace.json +4 -6
  2. package/CHANGELOG.md +42 -0
  3. package/dist/cli/commander-usage.js +2 -2
  4. package/dist/cli/error-guidance.js +1 -1
  5. package/dist/cli/help-json-payload.js +1 -1
  6. package/dist/cli/main.js +2 -2
  7. package/dist/cli/register-operations.js +1 -1
  8. package/dist/cli/register-setup.js +1 -1
  9. package/dist/cli/runtime/selection.d.ts +3 -1
  10. package/dist/cli/runtime/selection.js +1 -1
  11. package/dist/cli-bundle/bundle-manifest.json +156 -148
  12. package/dist/cli-bundle/chunks/{chunk-TC74K7SS.js → chunk-35DME35A.js} +2 -2
  13. package/dist/cli-bundle/chunks/{chunk-QQD3VRMZ.js → chunk-A2G5OG6W.js} +2 -2
  14. package/dist/cli-bundle/chunks/chunk-CPOWTIIS.js +2 -0
  15. package/dist/cli-bundle/chunks/{chunk-TYJXMT3Q.js → chunk-GLH2LNRH.js} +2 -2
  16. package/dist/cli-bundle/chunks/{chunk-IYN4MJ2C.js → chunk-NBDB3SRC.js} +57 -57
  17. package/dist/cli-bundle/chunks/{chunk-HTHTX6E6.js → chunk-NEUIVBFO.js} +2 -2
  18. package/dist/cli-bundle/chunks/{chunk-U55RYT3I.js → chunk-OYCCWPBM.js} +2 -2
  19. package/dist/cli-bundle/chunks/{chunk-VMO4P5MX.js → chunk-PLNNUAFZ.js} +2 -2
  20. package/dist/cli-bundle/chunks/{chunk-FOTXRNY6.js → chunk-PR4UAMI5.js} +44 -44
  21. package/dist/cli-bundle/chunks/{chunk-SZQCHJI4.js → chunk-UT7GRGHY.js} +2 -2
  22. package/dist/cli-bundle/chunks/{chunk-MJWKR7YA.js → chunk-VMJLM7P2.js} +62 -62
  23. package/dist/cli-bundle/chunks/{chunk-4ODHIX7N.js → chunk-YERBAGQD.js} +2 -2
  24. package/dist/cli-bundle/chunks/chunk-ZFHJP7YD.js +29 -0
  25. package/dist/cli-bundle/chunks/{register-list-query-426QTRET.js → register-list-query-N6RP6PSP.js} +2 -2
  26. package/dist/cli-bundle/chunks/{register-mutation-FLI3HHMP.js → register-mutation-CY7JGQE6.js} +2 -2
  27. package/dist/cli-bundle/chunks/{register-operations-TP7ZG4MK.js → register-operations-53HAD3QP.js} +2 -2
  28. package/dist/cli-bundle/chunks/register-setup-NVX6374E.js +2 -0
  29. package/dist/cli-bundle/focused-chunks/chunk-5KJXX2TZ.js +2 -0
  30. package/dist/cli-bundle/focused-chunks/{chunk-UIFVIE5F.js → chunk-6IVQPNYN.js} +2 -2
  31. package/dist/cli-bundle/focused-chunks/{chunk-MK5AKKHK.js → chunk-A5O3VYWV.js} +2 -2
  32. package/dist/cli-bundle/focused-chunks/chunk-AZA4AEOR.js +75 -0
  33. package/dist/cli-bundle/focused-chunks/chunk-BGWF6CMP.js +2 -0
  34. package/dist/cli-bundle/focused-chunks/{chunk-NVVB2HJC.js → chunk-BRLXKRI2.js} +17 -17
  35. package/dist/cli-bundle/focused-chunks/{chunk-ABA3KRPY.js → chunk-DTLRXY77.js} +2 -2
  36. package/dist/cli-bundle/focused-chunks/{chunk-XKH2FC5D.js → chunk-IJXZQE3D.js} +2 -2
  37. package/dist/cli-bundle/focused-chunks/{chunk-Q355NPLH.js → chunk-IWLMQLBO.js} +6 -6
  38. package/dist/cli-bundle/focused-chunks/chunk-K7GSZ7YZ.js +2 -0
  39. package/dist/cli-bundle/focused-chunks/{chunk-OY3VHCTX.js → chunk-ONDNR3VU.js} +2 -2
  40. package/dist/cli-bundle/focused-chunks/{chunk-XVBWZTU2.js → chunk-OVVCXTIE.js} +12 -12
  41. package/dist/cli-bundle/focused-chunks/{chunk-25BBHWMH.js → chunk-V7OPZRL6.js} +2 -2
  42. package/dist/cli-bundle/focused-chunks/{chunk-TLF6N56J.js → chunk-Y5Z3XNGY.js} +2 -2
  43. package/dist/cli-bundle/focused-chunks/{chunk-O7MIBEMK.js → chunk-YZB7IPR6.js} +2 -2
  44. package/dist/cli-bundle/focused-chunks/{chunk-NRHTXBTI.js → chunk-ZMQTIS3L.js} +2 -2
  45. package/dist/cli-bundle/main.js +22 -22
  46. package/dist/cli-bundle/sdk-authoring.js +1 -1
  47. package/dist/cli-bundle/sdk-contracts.js +1 -1
  48. package/dist/cli-bundle/sdk-core.js +18 -18
  49. package/dist/cli-bundle/sdk-governance.js +1 -1
  50. package/dist/cli-bundle/sdk-graph.js +1 -1
  51. package/dist/cli-bundle/sdk-merge.js +51 -51
  52. package/dist/cli-bundle/sdk-query.js +1 -1
  53. package/dist/cli-bundle/sdk-runtime.js +1 -1
  54. package/dist/cli-bundle/sdk-testing.js +1 -1
  55. package/dist/cli-bundle/sdk.js +8 -8
  56. package/dist/core/diagnostics/remediation.js +1 -1
  57. package/dist/core/item/item-format.js +1 -1
  58. package/dist/core/store/settings.js +3 -3
  59. package/dist/sdk/agent-capability-contracts.js +1 -1
  60. package/dist/sdk/cli-contracts/command-aliases.js +1 -1
  61. package/dist/sdk/cli-contracts/commander-mutation-options.js +1 -1
  62. package/dist/sdk/cli-contracts/grammar-contracts.js +1 -1
  63. package/dist/sdk/cli-contracts/tool-parameter-tables.js +1 -1
  64. package/dist/sdk/completion/fish.js +3 -3
  65. package/dist/sdk/completion/shared.d.ts +1 -1
  66. package/dist/sdk/completion/shared.js +1 -1
  67. package/dist/sdk/completion/zsh.js +3 -3
  68. package/dist/sdk/extension/copy-scope.d.ts +2 -2
  69. package/dist/sdk/extension/copy-scope.js +1 -1
  70. package/dist/sdk/extension/install-plan.js +1 -1
  71. package/dist/sdk/extension/install-runtime.js +2 -2
  72. package/dist/sdk/extension/static-inventory.d.ts +54 -0
  73. package/dist/sdk/extension/static-inventory.js +2 -0
  74. package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
  75. package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1 -1
  76. package/dist/sdk/governance/health-merge-evidence.d.ts +18 -0
  77. package/dist/sdk/governance/health-merge-evidence.js +2 -0
  78. package/dist/sdk/governance/health.js +1 -1
  79. package/dist/sdk/guide-topics.js +1 -1
  80. package/dist/sdk/index.d.ts +1 -0
  81. package/dist/sdk/index.js +1 -1
  82. package/dist/sdk/merge/install.js +2 -2
  83. package/dist/sdk/output-projection.d.ts +1 -1
  84. package/dist/sdk/output-projection.js +1 -1
  85. package/dist/sdk/public-surface.json +1 -1
  86. package/dist/sdk/query/complete-list.js +1 -1
  87. package/dist/sdk/read-output/provenance.d.ts +20 -0
  88. package/dist/sdk/read-output/provenance.js +2 -0
  89. package/dist/sdk/read-output-budget.d.ts +1 -1
  90. package/dist/sdk/read-output-budget.js +1 -1
  91. package/dist/sdk/read-output-contracts.js +1 -1
  92. package/dist/sdk/runtime-input.js +1 -1
  93. package/dist/sdk/test/execution.d.ts +11 -0
  94. package/dist/sdk/test/execution.js +2 -2
  95. package/dist/sdk/test/parsers.d.ts +1 -1
  96. package/dist/sdk/test/parsers.js +1 -1
  97. package/dist/types.d.ts +3 -3
  98. package/dist/types.js +1 -1
  99. package/docs/AGENT_READ_AND_TEST_RECEIPTS.md +21 -0
  100. package/docs/CLAUDE_CODE_PLUGIN.md +12 -7
  101. package/docs/CLI_GRAMMAR.md +31 -0
  102. package/docs/CODEX_PLUGIN.md +8 -0
  103. package/docs/CONFIGURATION.md +2 -0
  104. package/docs/EXTENSION_LIFECYCLE.md +18 -0
  105. package/docs/PACKAGE_EVIDENCE.md +18 -7
  106. package/docs/README.md +1 -0
  107. package/docs/RELEASING.md +46 -1
  108. package/docs/TESTING.md +14 -3
  109. package/docs/agent-task-token-baseline.json +4 -4
  110. package/docs/generated/AGENT_CAPABILITY_ROUTING.md +1 -1
  111. package/docs/generated/AGENT_COMMAND_SURFACE.md +5 -1
  112. package/docs/generated/FLAG_LEXICON_BUDGETS.md +4 -0
  113. package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +18 -7
  114. package/marketplace.json +4 -6
  115. package/package.json +6 -6
  116. package/packages/pm-beads/package.json +1 -1
  117. package/packages/pm-calendar/package.json +1 -1
  118. package/packages/pm-command-kit/package.json +1 -1
  119. package/packages/pm-digital-twin/package.json +1 -1
  120. package/packages/pm-governance-audit/package.json +1 -1
  121. package/packages/pm-guide-shell/package.json +1 -1
  122. package/packages/pm-kanban/package.json +1 -1
  123. package/packages/pm-lifecycle-hooks/package.json +1 -1
  124. package/packages/pm-linked-test-adapters/package.json +1 -1
  125. package/packages/pm-search-advanced/package.json +1 -1
  126. package/packages/pm-templates/package.json +1 -1
  127. package/packages/pm-todos/package.json +1 -1
  128. package/packages/pm-vcs/package.json +1 -1
  129. package/plugins/pm-claude/.claude-plugin/plugin.json +4 -2
  130. package/plugins/pm-claude/.mcp.json +1 -2
  131. package/plugins/pm-claude/README.md +11 -7
  132. package/plugins/pm-claude/package.json +2 -2
  133. package/plugins/pm-claude/skills/pm-audit/SKILL.md +14 -103
  134. package/plugins/pm-claude/skills/pm-audit/agents/openai.yaml +4 -0
  135. package/plugins/pm-claude/{commands/pm-calendar.md → skills/pm-calendar/SKILL.md} +1 -0
  136. package/plugins/pm-claude/{commands/pm-close-task.md → skills/pm-close-task/SKILL.md} +1 -0
  137. package/plugins/pm-claude/skills/pm-developer/SKILL.md +20 -143
  138. package/plugins/pm-claude/skills/pm-developer/agents/openai.yaml +4 -0
  139. package/plugins/pm-claude/{commands/pm-init.md → skills/pm-init/SKILL.md} +2 -1
  140. package/plugins/pm-claude/{commands/pm-list.md → skills/pm-list/SKILL.md} +2 -1
  141. package/plugins/pm-claude/{commands/pm-new.md → skills/pm-new/SKILL.md} +1 -0
  142. package/plugins/pm-claude/skills/pm-planner/SKILL.md +16 -167
  143. package/plugins/pm-claude/skills/pm-planner/agents/openai.yaml +4 -0
  144. package/plugins/pm-claude/skills/pm-release/SKILL.md +18 -102
  145. package/plugins/pm-claude/skills/pm-release/agents/openai.yaml +4 -0
  146. package/plugins/pm-claude/{commands/pm-search.md → skills/pm-search/SKILL.md} +1 -0
  147. package/plugins/pm-claude/{commands/pm-start-task.md → skills/pm-start-task/SKILL.md} +1 -0
  148. package/plugins/pm-claude/{commands/pm-status.md → skills/pm-status/SKILL.md} +1 -0
  149. package/plugins/pm-claude/{commands/pm-triage.md → skills/pm-triage/SKILL.md} +1 -0
  150. package/plugins/pm-claude/skills/pm-workflow/SKILL.md +25 -156
  151. package/plugins/pm-claude/skills/pm-workflow/agents/openai.yaml +4 -0
  152. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  153. package/plugins/pm-codex/README.md +10 -2
  154. package/plugins/pm-codex/mcp.json +11 -0
  155. package/plugins/pm-codex/package.json +2 -2
  156. package/plugins/pm-codex/plugin.json +45 -0
  157. package/plugins/pm-codex/skills/pm-audit/SKILL.md +21 -0
  158. package/plugins/pm-codex/skills/pm-audit/agents/openai.yaml +4 -0
  159. package/plugins/pm-codex/skills/pm-auditor/SKILL.md +5 -40
  160. package/plugins/pm-codex/skills/pm-auditor/agents/openai.yaml +3 -5
  161. package/plugins/pm-codex/skills/pm-developer/SKILL.md +26 -0
  162. package/plugins/pm-codex/skills/pm-developer/agents/openai.yaml +4 -0
  163. package/plugins/pm-codex/skills/pm-native/SKILL.md +7 -87
  164. package/plugins/pm-codex/skills/pm-native/agents/openai.yaml +3 -5
  165. package/plugins/pm-codex/skills/pm-planner/SKILL.md +22 -0
  166. package/plugins/pm-codex/skills/pm-planner/agents/openai.yaml +4 -0
  167. package/plugins/pm-codex/skills/pm-release/SKILL.md +17 -38
  168. package/plugins/pm-codex/skills/pm-release/agents/openai.yaml +2 -4
  169. package/plugins/pm-codex/skills/pm-workflow/SKILL.md +39 -0
  170. package/plugins/pm-codex/skills/pm-workflow/agents/openai.yaml +4 -0
  171. package/dist/cli-bundle/chunks/chunk-GRWPZR7F.js +0 -29
  172. package/dist/cli-bundle/chunks/register-setup-574SIVQZ.js +0 -2
  173. package/dist/cli-bundle/focused-chunks/chunk-H3BI4EDO.js +0 -75
  174. package/dist/cli-bundle/focused-chunks/chunk-HNHMK5JI.js +0 -2
  175. package/dist/cli-bundle/focused-chunks/chunk-HQPTDJLF.js +0 -2
  176. package/dist/cli-bundle/focused-chunks/chunk-PMPFLA6X.js +0 -2
  177. package/plugins/pm-claude/commands/pm-audit.md +0 -38
  178. package/plugins/pm-claude/commands/pm-developer.md +0 -38
  179. package/plugins/pm-claude/commands/pm-planner.md +0 -54
  180. package/plugins/pm-claude/commands/pm-release.md +0 -41
  181. package/plugins/pm-claude/commands/pm-workflow.md +0 -49
@@ -1,2 +1,2 @@
1
- import"./chunk-SGFQQXFD.js";import{$c as W,Fd as ee,Hd as te,Ob as M,Od as ne,Pd as oe,Qd as C,Tc as U,Wd as ae,Xc as q,Yc as $,Zc as G,_c as H,ad as J,cd as I,dd as j,ec as F,ed as z,fd as Y,ga as E,gd as K,hd as X,jd as Q,kc as V,kd as Z,nc as N,sb as L}from"./chunk-GRWPZR7F.js";import"./chunk-MJWKR7YA.js";import"./chunk-TYJXMT3Q.js";import"./chunk-DEZPZOQ7.js";import{Bo as R,Ec as x,Fo as c,Hf as l,If as u,Io as f,Jo as i,Ko as g,Mo as O,No as P,_a as v,ap as y,cj as _,dh as T,ki as A,l as S,la as d,m as B,na as m}from"./chunk-IYN4MJ2C.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]="3ae42f02-fdd3-5ca6-8c0b-e01e5f6bd95d")}catch{}})();var re=new Map([["measurements","boolean"],["metric","string"],["measurementLimit","number"],["observe","string_array"],["direction","direction"],["measurementSource","string"],["measurementItem","string"],["measurementRevision","string"],["author","string"],["message","string"],["provenanceCoverage","boolean"],["fleetAttribution","boolean"],["since","string"],["eventLimit","number"],["minimumSample","number"]]),be=new Set(["higher","lower","target"]),we=[...re.keys()].sort((e,t)=>e.localeCompare(t)).join(", ");function ve(e,t){return e==="boolean"?typeof t=="boolean":e==="string"?typeof t=="string":e==="number"?typeof t=="number":e==="string_array"?Array.isArray(t)&&t.every(n=>typeof n=="string"):e==="direction"&&be.has(t)}function ie(e){if(e===void 0)return{};let t;try{t=JSON.parse(e)}catch(n){throw new m(`--analytics must be valid JSON: ${String(n)}`,d.USAGE)}if(t===null||typeof t!="object"||Array.isArray(t))throw new m("--analytics must be a JSON object.",d.USAGE);for(let[n,o]of Object.entries(t)){let a=re.get(n);if(!ve(a,o))throw new m(a===void 0?`Unknown --analytics field "${n}". Accepted fields: ${we}.`:`--analytics field "${n}" must be ${a.replace("_"," ")}.`,d.USAGE)}return t}(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]="dcd8c925-34ee-5faa-9132-1be43961c749")}catch{}})();(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]="29db968f-30ad-5f3c-bf95-e33be18614c6")}catch{}})();(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]="524ade8e-33d6-5353-b01d-c7baddc956e8")}catch{}})();(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]="02e10fe1-c111-5c09-8dbe-a67f2b97f0d0")}catch{}})();(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]="3d4a8db3-8a53-50b4-a96c-1affff2207a3")}catch{}})();(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]="d008ca8f-41bf-54fb-9b56-bc1d4af9f226")}catch{}})();(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]="de197522-9007-5e21-8f9c-06cbf63707d1")}catch{}})();(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]="a5e0162a-bbf1-50fe-8912-a820de155e90")}catch{}})();(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]="9ee008b9-3751-5794-8d01-1f6d3123d6cd")}catch{}})();(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]="b6fa277d-ccf2-5413-95d5-0790283203d5")}catch{}})();(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]="2d59e10e-c85b-542a-8859-b20a08e809fa")}catch{}})();var se=(e,t)=>F(e,t,{runUpdate:(n,o,a)=>U(n,o,a)});(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]="70a8a9b3-0fe4-5903-8e9c-85db1f0ca522")}catch{}})();async function xe(e,t,n,o,a){let r=c(a),s=e==="run",p=e==="verdicts",b=e==="presets"||e==="apply",w=e==="promote",h=await V({action:e,...s||p||b||w?{}:{kind:t},id:s||p||w?n??t:n,preset:b?n??t:void 0,definition:i(o,"definition"),trigger:i(o,"trigger"),tree:i(o,"tree"),gate:i(o,"gate"),limit:i(o,"limit"),dry_run:o.dryRun===!0,fullChangedFields:r.fullChangedFields,idOnly:r.idOnly,author:i(o,"author"),message:i(o,"message"),owner:i(o,"owner"),apply:o.apply===!0,enforcement:i(o,"enforcement")},r);l(h,r),typeof h=="object"&&h!==null&&"exit_code"in h&&h.exit_code===1&&(process.exitCode=1)}function le(e){e.command("assurance").argument("<action>","Action; inspect `pm contracts --command assurance`").argument("[kind]","Declaration kind or run gate id").argument("[id]","Declaration/gate id").description("Manage SDK-owned assurance contracts.").option("--definition <json>","Put declaration JSON").option("--trigger <value>","Gate trigger").option("--tree <value>","Revision identity").option("--gate <id>","Verdict gate filter").option("--limit <number>","Verdict limit").option("--dry-run","Evaluate without recording").option("--author <value>","Mutation author").option("--message <value>","Mutation rationale").option("--owner <item-id>","Preset/derivation owner").option("--apply","Persist derived proposals").option("--enforcement <level>","Promote to warn or block").action(xe)}(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]="af2cd676-7ace-5b65-aaf0-0a167a72df95")}catch{}})();function Ae(e,t){let n=e?.trim().toLowerCase(),o=t?.trim().toLowerCase();if(n===void 0||n.length===0)return o;if(n==="local-analytics")return o&&o.length>0?o:"status";if(o!==void 0&&o.length>0)throw _({command_path:"telemetry",token:`${e} ${t}`,allowed:["status","flush","stats","clear","local-analytics"],token_kind:"path",examples:["pm telemetry stats --limit 10","pm telemetry local-analytics status --json"]});return n}function _e(e){return{addValues:Array.isArray(e.add)?e.add:[],addJsonValues:Array.isArray(e.addJson)?e.addJson:[],removeValues:Array.isArray(e.remove)?e.remove:[],removeIndexValues:Array.isArray(e.removeIndex)?e.removeIndex:[]}}function ue(e,t){if(e.background===!0){if(e.run!==!0)throw new m("--background requires --run",d.USAGE);if(e.acknowledgeLinkedTests===!0)throw new m("--background cannot be combined with --acknowledge-linked-tests; acknowledgement is a non-executing foreground operation",d.USAGE);if(t.addValues.length>0||t.addJsonValues.length>0||t.removeValues.length>0||t.removeIndexValues.length>0)throw new m("--background does not support --add/--add-json/--remove/--remove-index; update linked tests first, then run in background",d.USAGE)}}async function Ie(e,t,n,o){let a=await C({kind:"test",commandArgs:O(e,{...t,add:o.addValues,addJson:o.addJsonValues,remove:o.removeValues,removeIndex:o.removeIndexValues}),targetId:e,author:typeof t.author=="string"?t.author:void 0,noExtensions:n.noExtensions===!0},n);l(a,n)}function me(e,t){return{add:t.addValues,addJson:t.addJsonValues,remove:t.removeValues,removeIndex:t.removeIndexValues,list:!!e.list,run:!!e.run,match:typeof e.match=="string"?e.match:void 0,onlyIndex:typeof e.onlyIndex=="string"||typeof e.onlyIndex=="number"?e.onlyIndex:void 0,onlyLast:!!e.onlyLast,timeout:typeof e.timeout=="string"?e.timeout:void 0,progress:!!e.progress,envSet:Array.isArray(e.envSet)?e.envSet:[],envClear:Array.isArray(e.envClear)?e.envClear:[],sharedHostSafe:!!e.sharedHostSafe,pmContext:typeof e.pmContext=="string"?e.pmContext:void 0,overrideLinkedPmContext:!!e.overrideLinkedPmContext,workspaceContext:typeof e.workspaceContext=="string"?e.workspaceContext:void 0,overrideLinkedWorkspaceContext:!!e.overrideLinkedWorkspaceContext,allowUntrustedLinkedTests:!!e.allowUntrustedLinkedTests,acknowledgeLinkedTests:!!e.acknowledgeLinkedTests,failOnContextMismatch:!!e.failOnContextMismatch,failOnSkipped:!!e.failOnSkipped,failOnEmptyTestRun:!!e.failOnEmptyTestRun,requireAssertionsForPm:!!e.requireAssertionsForPm,checkContext:!!e.checkContext,autoPmContext:!!e.autoPmContext,author:typeof e.author=="string"?e.author:void 0,message:typeof e.message=="string"?e.message:void 0,force:!!e.force,measure:Array.isArray(e.measure)?e.measure:[],metricBelow:typeof e.metricBelow=="string"?e.metricBelow:void 0,metricDiff:typeof e.metricDiff=="string"?e.metricDiff:void 0}}var Lt={buildRunTestOptions:me,buildRunTestAllOptions:fe,runWorkspacePositionAction:pe,validateBackgroundTestOptions:ue};async function Ce(e,t,n,o){let a=await ne(e,me(t,o),n);(o.addValues.length>0||o.addJsonValues.length>0||o.removeValues.length>0||t.run===!0||o.removeIndexValues.length>0)&&await y(n,a),l(a,n),(a.run_results.some(r=>r.status==="failed")||a.fail_on_skipped_triggered===!0)&&(process.exitCode=d.DEPENDENCY_FAILED)}async function De(e,t,n){let o=c(n),a=Date.now(),r=_e(t);ue(t,r),t.background===!0?await Ie(e,t,o,r):await Ce(e,t,o,r),o.profile&&u(`profile:command=test took_ms=${Date.now()-a}`)}function k(e){let t=i(e,"author"),n=i(e,"assignee");if(t!==void 0&&n!==void 0&&t!==n)throw new m("Lifecycle ownership received conflicting --author and --assignee values; use one actor value for both aliases.",d.USAGE,{code:"conflicting_lifecycle_owner",examples:["pm claim pm-123","pm claim pm-123 --start","pm release pm-123"]});return{author:t??n,message:i(e,"message")}}async function Se(e,t){let n=c(t),o=Date.now();if(e.background===!0){let s=await C({kind:"test-all",commandArgs:P(e),statusFilter:i(e,"status"),noExtensions:n.noExtensions===!0},n);l(s,n),n.profile&&u(`profile:command=test-all took_ms=${Date.now()-o}`);return}let r=await oe(fe(e),n);await y(n,{ids:r.results.map(s=>s.id)}),l(r,n),(r.failed>0||r.fail_on_skipped_triggered===!0)&&(process.exitCode=d.DEPENDENCY_FAILED),n.profile&&u(`profile:command=test-all took_ms=${Date.now()-o}`)}function fe(e){return{status:i(e,"status"),limit:i(e,"limit"),offset:i(e,"offset"),timeout:i(e,"timeout"),progress:!!e.progress,envSet:Array.isArray(e.envSet)?e.envSet:[],envClear:Array.isArray(e.envClear)?e.envClear:[],sharedHostSafe:!!e.sharedHostSafe,pmContext:i(e,"pmContext"),overrideLinkedPmContext:!!e.overrideLinkedPmContext,workspaceContext:i(e,"workspaceContext"),overrideLinkedWorkspaceContext:!!e.overrideLinkedWorkspaceContext,allowUntrustedLinkedTests:!!e.allowUntrustedLinkedTests,failOnContextMismatch:!!e.failOnContextMismatch,failOnSkipped:!!e.failOnSkipped,failOnEmptyTestRun:!!e.failOnEmptyTestRun,requireAssertionsForPm:!!e.requireAssertionsForPm,checkContext:!!e.checkContext,autoPmContext:!!e.autoPmContext}}async function Be(e,t,n,o){let a=c(o),r=Date.now(),s=await te({subcommand:Ae(e,t),limit:i(n,"limit")},a);l(s,a),a.profile&&u(`profile:command=telemetry took_ms=${Date.now()-r}`)}async function Te(e,t){let n=c(t),o=Date.now(),a=ie(i(e,"analytics")),r=await ee(n,{includeEmpty:e.includeEmpty===!0,storage:e.storage===!0,metadataCoverage:e.metadataCoverage===!0,byAssignee:e.byAssignee===!0,byTag:e.byTag===!0,byPriority:e.byPriority===!0,tagPrefix:i(e,"tagPrefix"),fieldUtilization:e.fieldUtilization===!0,...a});r.recorded_observations?.some(s=>s.changed)===!0&&await y(n,{ids:r.recorded_observations?.flatMap(s=>s.observation.item_id?[s.observation.item_id]:[])}),l(r,n),n.profile&&u(`profile:command=stats took_ms=${Date.now()-o}`)}async function Ee(e,t){let n=c(t),o=Date.now(),a=i(e,"threshold"),r=i(e,"limit"),s=await L(n,{...e.exhaustive===!0?{exhaustive:!0}:{},status:Array.isArray(e.status)&&e.status.length>0?e.status:void 0,since:i(e,"since"),...a===void 0?{}:{threshold:Number(a)},...r===void 0?{}:{limit:Number(r)}});l(s,n),n.profile&&u(`profile:command=duplicates took_ms=${Date.now()-o}`)}async function Re(e,t){let n=c(t),o=Date.now(),a=!!e.strictExit||!!e.failOnWarn,r=await M(n,{strictExit:a,strictDirectories:!!e.strictDirectories,requireMergeDrivers:!!e.requireMergeDrivers,checkOnly:!!e.checkOnly,checkTelemetry:!!e.checkTelemetry,noRefresh:!!e.noRefresh,refreshVectors:!!e.refreshVectors,verboseStaleItems:!!e.verboseStaleItems,verboseAuthorEvents:!!e.verboseAuthorEvents,brief:!!e.brief,summary:!!e.summary||a,skipVectors:!!e.skipVectors,skipIntegrity:!!e.skipIntegrity,skipDrift:!!e.skipDrift,full:!!e.full});l(r,n),a&&!r.ok&&(x({...r,exit_code:d.GENERIC_FAILURE,error_code:"health_findings",error_category:"validation",command_resolution:"health_findings",resolution_stage:"execute"}),process.exitCode=d.GENERIC_FAILURE),n.profile&&u(`profile:command=health took_ms=${Date.now()-o}`)}async function Oe(e,t){let n=c(t),o=Date.now(),a=await se({checkMetadata:!!e.checkMetadata,metadataProfile:i(e,"metadataProfile"),checkResolution:!!e.checkResolution,checkCompleteness:!!e.checkCompleteness,checkLifecycle:!!e.checkLifecycle,checkStaleBlockers:!!e.checkStaleBlockers,dependencyCycleSeverity:i(e,"dependencyCycleSeverity"),parentCycleSeverity:i(e,"parentCycleSeverity"),checkFiles:!!e.checkFiles,checkCommandReferences:!!e.checkCommandReferences,scanMode:i(e,"scanMode"),includePmInternals:!!e.includePmInternals,verboseFileLists:!!e.verboseFileLists,verboseDiagnostics:!!e.verboseDiagnostics,allAffectedIds:!!e.allAffectedIds,checkHistoryDrift:!!e.checkHistoryDrift,checkStorageIntegrity:!!e.checkStorageIntegrity,fixHints:!!e.fixHints,autoFix:!!e.autoFix,dryRun:!!e.dryRun,fixScope:Array.isArray(e.fixScope)?e.fixScope:void 0,pruneMissing:!!e.pruneMissing,counts:!!e.counts,full:!!e.full},n);l(a,n),(e.strictExit||e.failOnWarn)&&(a.has_warnings||!a.ok)&&(x({...a,exit_code:d.GENERIC_FAILURE,error_code:"validation_findings",error_category:"validation",command_resolution:"validation_findings",resolution_stage:"execute"}),process.exitCode=d.GENERIC_FAILURE),n.profile&&u(`profile:command=validate took_ms=${Date.now()-o}`)}async function Pe(e,t){let n=c(t),o=Date.now(),a=await N(n,{dryRun:e.dryRun===!0,scope:Array.isArray(e.scope)?e.scope:[]});l(a,n),n.profile&&u(`profile:command=gc took_ms=${Date.now()-o}`)}async function Le(e,t,n,o){let a=c(o),r=v(process.cwd(),a.path),s=e.trim().toLowerCase();if(!I.some(p=>p===s))throw _({command_path:"workspace snapshot",token:e,allowed:I,display_name:"workspace snapshot",token_kind:"action",examples:["pm workspace snapshot create before-migration","pm workspace snapshot restore before-migration"]});if(s==="list"){l(await Y(r),a);return}if(s==="create"){l(await j(r,t===void 0?{}:{name:t}),a);return}if(t===void 0)throw new m(`pm workspace snapshot ${s} requires a snapshot name or fingerprint`,d.USAGE);if(s==="inspect"){l(await z(r,t),a);return}if(s==="restore"){if(n.dryRun===!0){l(await K(r,t),a);return}let p=await A(r);l(await X(r,t,{force:n.force===!0,author:T(i(n,"author"),p.author_default),message:i(n,"message"),lockTtlSeconds:p.locks.ttl_seconds,lockWaitMs:p.locks.wait_ms}),a);return}l(await Q(r,t),a)}async function pe(e,t){let n=c(t);l(await Z(n),n)}async function Me(e,t){let n=c(t),o=Date.now(),a=await E({action:i(e,"action"),command:i(e,"command"),summary:!!e.summary,schemaOnly:!!e.schemaOnly,flagsOnly:!!e.flagsOnly,availabilityOnly:!!e.availabilityOnly,runtimeOnly:!!e.runtimeOnly||!!e.activeOnly,full:!!e.full},n);l(a,n),n.profile&&u(`profile:command=contracts took_ms=${Date.now()-o}`)}async function Fe(e,t,n){if(t.start===!0){ce(e,!1),await ye(e,t,n);return}let o=c(n),a=Date.now(),r={...k(t),ifAvailable:t.ifAvailable===!0,maxAttempts:t.maxAttempts};ce(e,t.next===!0);let s=t.next===!0?await $(!!t.force,o,r,{type:typeof t.type=="string"?t.type:void 0,tag:typeof t.tag=="string"?t.tag:void 0,priority:t.priority,assigneeFilter:typeof t.assigneeFilter=="string"?t.assigneeFilter:void 0,parent:typeof t.parent=="string"?t.parent:void 0,sprint:typeof t.sprint=="string"?t.sprint:void 0,release:typeof t.release=="string"?t.release:void 0,includeDecisions:t.includeDecisions===!0,includeGates:t.includeGates===!0,includeContainers:t.includeContainers===!0,tokenBudget:t.tokenBudget??t.token_budget,explainRanking:t.explainRanking===!0||t.explain_ranking===!0}):await q(e,!!t.force,o,r);await y(o,s),l(s,o),o.profile&&u(`profile:command=claim took_ms=${Date.now()-a}`)}function ce(e,t){if(!t&&!e)throw new m("Specify an item id or pass --next",d.USAGE);if(t&&e)throw new m("Specify either an item id or --next, not both",d.USAGE)}async function Ve(e,t,n){if(t.pause===!0){await ge(e,t,n);return}let o=c(n),a=Date.now(),r=await G(e,!!t.force,o,{...k(t),ownershipReleaseBypass:t.ownershipReleaseBypass===!0});await y(o,r),l(await R("release",[e],t,o,r),o),o.profile&&u(`profile:command=release took_ms=${Date.now()-a}`)}async function D(e){let t=c(e),n=S(e.name());if(!n||t.json||t.quiet)return;(await A(v(process.cwd(),t.path))).ux?.deprecation_hints&&u(B(n))}async function ye(e,t,n){await D(n);let o=c(n),a=Date.now(),r=await H(e,{...k(t),force:!!t.force,next:t.next===!0,ifAvailable:t.ifAvailable===!0},o);await y(o,r.update),l(r,o),o.profile&&u(`profile:command=start-task took_ms=${Date.now()-a}`)}async function ge(e,t,n){await D(n);let o=c(n),a=Date.now(),r=await W(e,{...k(t),force:!!t.force},o);await y(o,r.release),l(r,o),o.profile&&u(`profile:command=pause-task took_ms=${Date.now()-a}`)}async function Ne(e,t,n,o){await D(o);let a=c(o),r=Date.now(),s=await J(e,t,{...k(n),validateClose:i(n,"validateClose"),force:!!n.force},a);await y(a,s.release),l(s,a),a.profile&&u(`profile:command=close-task took_ms=${Date.now()-r}`)}function de(e){return e.option("--background","Run linked tests in managed background mode").option("--timeout <seconds>","Default run timeout in seconds").option("--progress","Emit linked-test progress to stderr (always shown in TTY, opt-in for non-TTY)").option("--env-set <value>","Set environment variable(s) for linked-test runs (KEY=VALUE, repeatable)",f).option("--env-clear <value>","Clear environment variable(s) for linked-test runs (NAME, repeatable)",f).option("--shared-host-safe","Apply additive shared-host-safe runtime defaults for linked-test runs").option("--pm-context <mode>","PM linked-test context mode: schema|tracker|auto (default: schema)").option("--override-linked-pm-context","Force run-level --pm-context to override per-linked-test pm_context_mode metadata").option("--workspace-context <mode>","Source-workspace mode: source|isolated|snapshot (default: source)").option("--override-linked-workspace-context","Force run-level --workspace-context over per-linked-test metadata").option("--allow-untrusted-linked-tests","Execute untrusted linked commands when project policy also permits it").option("--fail-on-context-mismatch","Fail linked PM commands when context item counts differ").option("--fail-on-skipped","Treat skipped linked tests as dependency failures").option("--fail-on-empty-test-run","Treat successful linked-test commands that report zero executed tests as failures").option("--require-assertions-for-pm","Require assertion metadata for linked PM command tests").option("--check-context","Preflight linked PM command context diagnostics before executing commands").option("--auto-pm-context","Auto-remediate PM tracker-read context mismatches by routing those linked commands through tracker context")}function Mt(e){le(e);let t=e.command("test").argument("<id>","Item id").option("--add <value>","Add verified isolated test (CSV/markdown or stdin)",f).option("--add-json <value>","Add verified isolated test (JSON object/array or stdin)",f).option("--remove <value>","Remove linked test entry by exact command/path (command=<value> and path=<value> preserve commas and equals signs; or - for stdin)",f).option("--remove-index <n>","Remove the 1-based linked-test index from --list order (repeatable)",f).option("--list","List linked tests without mutating").option("--run","Run linked test commands").option("--match <value>","Run only linked tests whose command/path contains this substring").option("--only-index <n>","Run only the 1-based linked-test index from --list order").option("--only-last","Run only the most recently added linked test");t.option("--acknowledge-linked-tests","Trust the item's current linked commands in this clone without executing them"),de(t).option("--measure <value>","Record name=value[,unit=...][,threshold=...] evidence; repeatable",f).option("--metric-below <value>","Return evidence below name=value").option("--metric-diff <name>","Diff the latest two values").option("--author <value>","Mutation author").option("--message <value>","History message").option("--force","Force ownership override").description("Manage tests linked to an item and optionally run them.").action(De);let n=e.command("test-all").description("Run linked tests across matching items.").option("--status <value>","Filter items by status before running tests").option("--limit <n>","Limit matching items before running linked tests").option("--offset <n>","Skip matching items before running linked tests");de(n).action(Se),e.command("test-runs-worker",{hidden:!0}).argument("<runId>","Background run id").description("Internal background worker command.").action(async(w,h,he)=>{let ke=c(he);await ae(w,ke)}),e.command("telemetry").argument("[namespace-or-subcommand]","Telemetry subcommand: status, flush, stats, clear (default: status)").argument("[subcommand]","Compatibility alias target for local-analytics: status, flush, stats, clear").option("--limit <n>","Maximum command groups returned by telemetry stats").description("Inspect and manage local telemetry queue/runtime state.").action(Be),e.command("duplicates").description("Find duplicate clusters across all statuses.").option("--status <value>","Statuses (repeatable or comma-separated)",f,[]).option("--since <value>","Created at or after this time").option("--threshold <value>","Minimum similarity (0-1)").option("--limit <n>","Maximum clusters").option("--exhaustive","Score all pairs within the safety bound").action(Ee),e.command("stats").description("Show project tracker statistics.").option("--include-empty","Restore zero-count registered item-type and lifecycle-status buckets").option("--storage","Include aggregate history-stream storage metrics (total streams/lines/bytes, largest + deepest streams, oldest/newest entries)").option("--metadata-coverage","Include metadata coverage % (acceptance_criteria, estimated_minutes, resolution, tags, parent) overall and by type").option("--by-assignee","Include a lifecycle-bucketed item breakdown grouped by assignee").option("--by-tag","Include a lifecycle-bucketed item breakdown grouped by tag").option("--by-priority","Include a lifecycle-bucketed item breakdown grouped by priority").option("--tag-prefix <value>","With --by-tag: only count tags starting with this prefix (e.g. domain:)").option("--field-utilization","Report content-field utilization rates (notes/learnings/files/docs/tests/comments/deps/body) for governance analysis").option("--analytics <json>","Improvement ledger/history analytics JSON").action(Te),e.command("health").description("Show project tracker health checks.").option("--strict-directories","Treat optional item-type directories as required failures").option("--require-merge-drivers","Treat absent clone-local merge drivers as a required health failure").option("--check-only","Run read-only health diagnostics without refreshing vectors").option("--check-telemetry","Probe telemetry endpoint health and include network diagnostics").option("--no-refresh","Disable automatic vector refresh attempts during health checks").option("--refresh-vectors","Explicitly enable vector refresh attempts during health checks").option("--verbose-stale-items","Include full stale vectorization ID lists in health output").option("--verbose-author-events","Include every actionable unknown-author event coordinate for review or disposition").option("--brief","Emit compact health details for low-token agent checks").option("--summary","Emit one-line-style health status with check names and warning count").option("--skip-vectors","Skip vectorization check for a faster run").option("--skip-integrity","Skip item/history file integrity check for a faster run").option("--skip-drift","Skip history drift hash check for a faster run").option("--full","Run all checks including slow integrity, drift, and vectorization checks").option("--strict-exit","Return non-zero exit when health is not ok and default to actionable summary output; use --full for complete details").option("--fail-on-warn","Alias for --strict-exit").action(Re),e.command("validate").description("Validate metadata, lifecycle policies, files, command references, and history.").option("--check-metadata","Run metadata completeness checks").option("--metadata-profile <value>","Metadata profile (core|strict|custom)").option("--check-resolution","Run closed-item resolution metadata checks").option("--check-completeness","Check declarative lifecycle field requirements").option("--check-lifecycle","Run active-item lifecycle governance drift checks").option("--check-stale-blockers","Include stale blocker-pattern diagnostics in lifecycle checks").option("--dependency-cycle-severity <value>","Set dependency-cycle warning policy for lifecycle checks (off|warn|error)").option("--parent-cycle-severity <value>","Set parent-hierarchy cycle warning policy for lifecycle checks (off|warn|error)").option("--check-files","Run linked-file and orphaned-file checks").option("--check-command-references","Run linked-command PM-ID reference checks").option("--scan-mode <value>","Select file candidate scan mode for --check-files (default|tracked-all|tracked-all-strict)").option("--include-pm-internals","Include PM storage internals in tracked-all candidate scans").option("--verbose-file-lists","Include full file-path lists for validate --check-files details").option("--verbose-diagnostics","Include full diagnostic ID lists").option("--all-affected-ids","Emit complete missing_* affected-ID lists with no truncation (implied by --json)").option("--strict-exit","Return non-zero exit when validation warnings are present").option("--fail-on-warn","Alias for --strict-exit").option("--fix-hints","Add a machine-executable fix_hints[] of pm commands to each failing check's details").option("--auto-fix","Apply safe, deterministic field backfills").option("--dry-run","Preview planned --auto-fix/--prune-missing fixes without applying them").option("--fix-scope <scope>","Grant --auto-fix scopes (metadata, resolution, estimates, timestamps, lifecycle; comma-separated or repeatable). Default: metadata, resolution; other scopes require explicit opt-in",f).option("--prune-missing","Remove deleted-path file/doc links; preserves real files").option("--check-history-drift","Run item/history hash drift checks").option("--check-storage-integrity","Run the post-merge storage-integrity check (unreadable items, history conflict markers, resurrected deletes, unparseable config/schema)").option("--counts","Keep validation counts and totals while omitting per-item diagnostic arrays").option("--full","Return the complete validation diagnostic projection").action(Oe),e.command("gc").option("--dry-run","Preview cleanup targets without deleting files; without this flag, pm gc deletes matched artifacts").option("--scope <value>","Limit cleanup to one or more scopes (comma-separated or repeatable): index, embeddings, runtime, locks, checkpoints, transactions",f).description("Delete optional cache artifacts by default (including expired lock debris) and show a summary.").action(Pe);let o=e.command("workspace").description("Inspect workspace state and snapshots.");o.command("position").description("Show merge and history readiness.").action(pe),o.command("snapshot").argument("<action>","Action: create, list, inspect, restore, delete").argument("[target]","Optional name for create; name or fingerprint otherwise").description("Manage content-addressed tracker snapshots.").option("--dry-run","Preview restore file, item, stream, and history-entry impact without mutating state").option("--force","Explicitly confirm a whole-workspace snapshot restore").option("--author <value>","Actor recorded on the restore audit event").option("--message <value>","Human-readable restore rationale").action(Le),e.command("contracts").description("Show machine-readable command and schema contracts for agents.").option("--action <value>","Filter tool schema branches to a specific action").option("--command <value>","Scope contracts output to one CLI command (narrow-by-default)").option("--summary","Return one command+intent row per top-level command for cheap agent bootstrap").option("--schema-only","Return schema-focused output only").option("--flags-only","Return command flag contracts only").option("--availability-only","Return action availability surface only").option("--runtime-only","Include only actions invocable in the current runtime").option("--active-only","Alias for --runtime-only").option("--full","Include full schema and command-flag surfaces (large; default brief output omits heavy sections for unfiltered queries)").action(Me);let a=e.command("claim").option("--start","Claim and start an explicit item").argument("[id]","Item id (omit with --next)").option("--author <value>","Mutation author").option("--message <value>","History message").option("--force","Force claim override").option("--if-available","Skip another author's claim (skipped=true)").option("--next","Atomically claim the next caller-available actionable item").option("--type <value>","Filter --next candidates by type").option("--tag <value>","Filter --next candidates by tag").option("--priority <value>","Filter --next candidates by priority").option("--assignee-filter <value>","Filter --next candidates: assigned|unassigned").option("--parent <id>","Scope --next candidates to a subtree").option("--sprint <value>","Filter --next candidates by sprint").option("--release <value>","Filter --next candidates by release").option("--max-attempts <n>","Bound the --next candidate walk (default 10; maximum 100)").option("--include-decisions","Allow --next to claim human-gated Decision items").option("--include-gates","Allow --next to claim outcome gates").option("--include-containers","Allow --next to claim containers with unfinished descendants").option("--token-budget <n>","Bound the estimated tokens used to rank --next candidates").option("--explain-ranking","Include ranking provenance for --next selection").description("Claim an item for active work.").action(Fe);g(a,"--assignee <value>","Alias for --author on lifecycle ownership commands"),g(a,"--token_budget <n>","Alias for --token-budget"),g(a,"--explain_ranking","Alias for --explain-ranking");let r=e.command("release").option("--pause","Use open status").argument("<id>","Item id").option("--author <value>","Author").option("--message <value>","Message").option("--force","Override ownership").description("Release ownership.").action(Ve);g(r,"--assignee <value>","Alias for --author on lifecycle ownership commands");let s=e.command("start-task",{hidden:!0}).argument("<id>","Item id").option("--author <value>","Mutation author").option("--message <value>","History message").option("--force","Force ownership or terminal override when required").description("Lifecycle alias: claim an item and move it to in_progress.").action(ye);g(s,"--assignee <value>","Alias for --author on lifecycle ownership commands");let p=e.command("pause-task",{hidden:!0}).argument("<id>","Item id").option("--author <value>","Mutation author").option("--message <value>","History message").option("--force","Force ownership override when required").description("Lifecycle alias: move an item to open and release its claim.").action(ge);g(p,"--assignee <value>","Alias for --author on lifecycle ownership commands");let b=e.command("close-task",{hidden:!0}).argument("<id>","Item id").argument("[reason]","Close reason text").option("--author <value>","Mutation author").option("--message <value>","History message").option("--validate-close <value>","Close-time validation mode: off|warn|strict").option("--force","Force ownership or terminal override when required").description("Lifecycle alias: close an item and release assignment metadata.").action(Ne);g(b,"--assignee <value>","Alias for --author on lifecycle ownership commands")}export{Lt as _testOnlyRegisterOperations,Mt as registerOperationCommands,ce as requireClaimTarget};
2
- //# sourceMappingURL=register-operations-TP7ZG4MK.js.map
1
+ import"./chunk-SGFQQXFD.js";import{$c as W,Fd as ee,Hd as te,Ob as M,Od as ne,Pd as oe,Qd as C,Tc as U,Wd as ae,Xc as q,Yc as $,Zc as G,_c as H,ad as J,cd as I,dd as j,ec as F,ed as z,fd as Y,ga as E,gd as K,hd as X,jd as Q,kc as V,kd as Z,nc as N,sb as L}from"./chunk-ZFHJP7YD.js";import"./chunk-VMJLM7P2.js";import"./chunk-GLH2LNRH.js";import"./chunk-DEZPZOQ7.js";import{Co as R,Ec as x,Go as c,If as l,Jf as u,Jo as f,Ko as i,Lo as g,No as O,Oo as P,_a as v,bp as y,dj as _,eh as T,l as S,la as d,li as A,m as B,na as m}from"./chunk-NBDB3SRC.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]="3ae42f02-fdd3-5ca6-8c0b-e01e5f6bd95d")}catch{}})();var re=new Map([["measurements","boolean"],["metric","string"],["measurementLimit","number"],["observe","string_array"],["direction","direction"],["measurementSource","string"],["measurementItem","string"],["measurementRevision","string"],["author","string"],["message","string"],["provenanceCoverage","boolean"],["fleetAttribution","boolean"],["since","string"],["eventLimit","number"],["minimumSample","number"]]),be=new Set(["higher","lower","target"]),we=[...re.keys()].sort((e,t)=>e.localeCompare(t)).join(", ");function ve(e,t){return e==="boolean"?typeof t=="boolean":e==="string"?typeof t=="string":e==="number"?typeof t=="number":e==="string_array"?Array.isArray(t)&&t.every(n=>typeof n=="string"):e==="direction"&&be.has(t)}function ie(e){if(e===void 0)return{};let t;try{t=JSON.parse(e)}catch(n){throw new m(`--analytics must be valid JSON: ${String(n)}`,d.USAGE)}if(t===null||typeof t!="object"||Array.isArray(t))throw new m("--analytics must be a JSON object.",d.USAGE);for(let[n,o]of Object.entries(t)){let a=re.get(n);if(!ve(a,o))throw new m(a===void 0?`Unknown --analytics field "${n}". Accepted fields: ${we}.`:`--analytics field "${n}" must be ${a.replace("_"," ")}.`,d.USAGE)}return t}(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]="dcd8c925-34ee-5faa-9132-1be43961c749")}catch{}})();(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]="29db968f-30ad-5f3c-bf95-e33be18614c6")}catch{}})();(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]="524ade8e-33d6-5353-b01d-c7baddc956e8")}catch{}})();(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]="02e10fe1-c111-5c09-8dbe-a67f2b97f0d0")}catch{}})();(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]="3d4a8db3-8a53-50b4-a96c-1affff2207a3")}catch{}})();(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]="d008ca8f-41bf-54fb-9b56-bc1d4af9f226")}catch{}})();(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]="de197522-9007-5e21-8f9c-06cbf63707d1")}catch{}})();(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]="a5e0162a-bbf1-50fe-8912-a820de155e90")}catch{}})();(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]="9ee008b9-3751-5794-8d01-1f6d3123d6cd")}catch{}})();(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]="b6fa277d-ccf2-5413-95d5-0790283203d5")}catch{}})();(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]="2d59e10e-c85b-542a-8859-b20a08e809fa")}catch{}})();var se=(e,t)=>F(e,t,{runUpdate:(n,o,a)=>U(n,o,a)});(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]="70a8a9b3-0fe4-5903-8e9c-85db1f0ca522")}catch{}})();async function xe(e,t,n,o,a){let r=c(a),s=e==="run",p=e==="verdicts",b=e==="presets"||e==="apply",w=e==="promote",h=await V({action:e,...s||p||b||w?{}:{kind:t},id:s||p||w?n??t:n,preset:b?n??t:void 0,definition:i(o,"definition"),trigger:i(o,"trigger"),tree:i(o,"tree"),gate:i(o,"gate"),limit:i(o,"limit"),dry_run:o.dryRun===!0,fullChangedFields:r.fullChangedFields,idOnly:r.idOnly,author:i(o,"author"),message:i(o,"message"),owner:i(o,"owner"),apply:o.apply===!0,enforcement:i(o,"enforcement")},r);l(h,r),typeof h=="object"&&h!==null&&"exit_code"in h&&h.exit_code===1&&(process.exitCode=1)}function le(e){e.command("assurance").argument("<action>","Action; inspect `pm contracts --command assurance`").argument("[kind]","Declaration kind or run gate id").argument("[id]","Declaration/gate id").description("Manage SDK-owned assurance contracts.").option("--definition <json>","Put declaration JSON").option("--trigger <value>","Gate trigger").option("--tree <value>","Revision identity").option("--gate <id>","Verdict gate filter").option("--limit <number>","Verdict limit").option("--dry-run","Evaluate without recording").option("--author <value>","Mutation author").option("--message <value>","Mutation rationale").option("--owner <item-id>","Preset/derivation owner").option("--apply","Persist derived proposals").option("--enforcement <level>","Promote to warn or block").action(xe)}(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]="2d28905b-e311-589e-88b7-051c2626aeae")}catch{}})();function Ae(e,t){let n=e?.trim().toLowerCase(),o=t?.trim().toLowerCase();if(n===void 0||n.length===0)return o;if(n==="local-analytics")return o&&o.length>0?o:"status";if(o!==void 0&&o.length>0)throw _({command_path:"telemetry",token:`${e} ${t}`,allowed:["status","flush","stats","clear","local-analytics"],token_kind:"path",examples:["pm telemetry stats --limit 10","pm telemetry local-analytics status --json"]});return n}function _e(e){return{addValues:Array.isArray(e.add)?e.add:[],addJsonValues:Array.isArray(e.addJson)?e.addJson:[],removeValues:Array.isArray(e.remove)?e.remove:[],removeIndexValues:Array.isArray(e.removeIndex)?e.removeIndex:[]}}function ue(e,t){if(e.background===!0){if(e.run!==!0)throw new m("--background requires --run",d.USAGE);if(e.acknowledgeLinkedTests===!0)throw new m("--background cannot be combined with --acknowledge-linked-tests; acknowledgement is a non-executing foreground operation",d.USAGE);if(t.addValues.length>0||t.addJsonValues.length>0||t.removeValues.length>0||t.removeIndexValues.length>0)throw new m("--background does not support --add/--add-json/--remove/--remove-index; update linked tests first, then run in background",d.USAGE)}}async function Ie(e,t,n,o){let a=await C({kind:"test",commandArgs:O(e,{...t,add:o.addValues,addJson:o.addJsonValues,remove:o.removeValues,removeIndex:o.removeIndexValues}),targetId:e,author:typeof t.author=="string"?t.author:void 0,noExtensions:n.noExtensions===!0},n);l(a,n)}function me(e,t){return{add:t.addValues,addJson:t.addJsonValues,remove:t.removeValues,removeIndex:t.removeIndexValues,list:!!e.list,run:!!e.run,match:typeof e.match=="string"?e.match:void 0,onlyIndex:typeof e.onlyIndex=="string"||typeof e.onlyIndex=="number"?e.onlyIndex:void 0,onlyLast:!!e.onlyLast,timeout:typeof e.timeout=="string"?e.timeout:void 0,progress:!!e.progress,envSet:Array.isArray(e.envSet)?e.envSet:[],envClear:Array.isArray(e.envClear)?e.envClear:[],sharedHostSafe:!!e.sharedHostSafe,pmContext:typeof e.pmContext=="string"?e.pmContext:void 0,overrideLinkedPmContext:!!e.overrideLinkedPmContext,workspaceContext:typeof e.workspaceContext=="string"?e.workspaceContext:void 0,overrideLinkedWorkspaceContext:!!e.overrideLinkedWorkspaceContext,allowUntrustedLinkedTests:!!e.allowUntrustedLinkedTests,acknowledgeLinkedTests:!!e.acknowledgeLinkedTests,failOnContextMismatch:!!e.failOnContextMismatch,failOnSkipped:!!e.failOnSkipped,failOnEmptyTestRun:!!e.failOnEmptyTestRun,requireAssertionsForPm:!!e.requireAssertionsForPm,checkContext:!!e.checkContext,autoPmContext:!!e.autoPmContext,author:typeof e.author=="string"?e.author:void 0,message:typeof e.message=="string"?e.message:void 0,force:!!e.force,measure:Array.isArray(e.measure)?e.measure:[],metricBelow:typeof e.metricBelow=="string"?e.metricBelow:void 0,metricDiff:typeof e.metricDiff=="string"?e.metricDiff:void 0}}var Lt={buildRunTestOptions:me,buildRunTestAllOptions:fe,runWorkspacePositionAction:pe,validateBackgroundTestOptions:ue};async function Ce(e,t,n,o){let a=await ne(e,me(t,o),n);(o.addValues.length>0||o.addJsonValues.length>0||o.removeValues.length>0||t.run===!0||o.removeIndexValues.length>0)&&await y(n,a),l(a,n),(a.run_results.some(r=>r.status==="failed")||a.fail_on_skipped_triggered===!0)&&(process.exitCode=d.DEPENDENCY_FAILED)}async function De(e,t,n){let o=c(n),a=Date.now(),r=_e(t);ue(t,r),t.background===!0?await Ie(e,t,o,r):await Ce(e,t,o,r),o.profile&&u(`profile:command=test took_ms=${Date.now()-a}`)}function k(e){let t=i(e,"author"),n=i(e,"assignee");if(t!==void 0&&n!==void 0&&t!==n)throw new m("Lifecycle ownership received conflicting --author and --assignee values; use one actor value for both aliases.",d.USAGE,{code:"conflicting_lifecycle_owner",examples:["pm claim pm-123","pm claim pm-123 --start","pm release pm-123"]});return{author:t??n,message:i(e,"message")}}async function Se(e,t){let n=c(t),o=Date.now();if(e.background===!0){let s=await C({kind:"test-all",commandArgs:P(e),statusFilter:i(e,"status"),noExtensions:n.noExtensions===!0},n);l(s,n),n.profile&&u(`profile:command=test-all took_ms=${Date.now()-o}`);return}let r=await oe(fe(e),n);await y(n,{ids:r.results.map(s=>s.id)}),l(r,n),(r.failed>0||r.fail_on_skipped_triggered===!0)&&(process.exitCode=d.DEPENDENCY_FAILED),n.profile&&u(`profile:command=test-all took_ms=${Date.now()-o}`)}function fe(e){return{status:i(e,"status"),limit:i(e,"limit"),offset:i(e,"offset"),timeout:i(e,"timeout"),progress:!!e.progress,envSet:Array.isArray(e.envSet)?e.envSet:[],envClear:Array.isArray(e.envClear)?e.envClear:[],sharedHostSafe:!!e.sharedHostSafe,pmContext:i(e,"pmContext"),overrideLinkedPmContext:!!e.overrideLinkedPmContext,workspaceContext:i(e,"workspaceContext"),overrideLinkedWorkspaceContext:!!e.overrideLinkedWorkspaceContext,allowUntrustedLinkedTests:!!e.allowUntrustedLinkedTests,failOnContextMismatch:!!e.failOnContextMismatch,failOnSkipped:!!e.failOnSkipped,failOnEmptyTestRun:!!e.failOnEmptyTestRun,requireAssertionsForPm:!!e.requireAssertionsForPm,checkContext:!!e.checkContext,autoPmContext:!!e.autoPmContext}}async function Be(e,t,n,o){let a=c(o),r=Date.now(),s=await te({subcommand:Ae(e,t),limit:i(n,"limit")},a);l(s,a),a.profile&&u(`profile:command=telemetry took_ms=${Date.now()-r}`)}async function Te(e,t){let n=c(t),o=Date.now(),a=ie(i(e,"analytics")),r=await ee(n,{includeEmpty:e.includeEmpty===!0,storage:e.storage===!0,metadataCoverage:e.metadataCoverage===!0,byAssignee:e.byAssignee===!0,byTag:e.byTag===!0,byPriority:e.byPriority===!0,tagPrefix:i(e,"tagPrefix"),fieldUtilization:e.fieldUtilization===!0,...a});r.recorded_observations?.some(s=>s.changed)===!0&&await y(n,{ids:r.recorded_observations?.flatMap(s=>s.observation.item_id?[s.observation.item_id]:[])}),l(r,n),n.profile&&u(`profile:command=stats took_ms=${Date.now()-o}`)}async function Ee(e,t){let n=c(t),o=Date.now(),a=i(e,"threshold"),r=i(e,"limit"),s=await L(n,{...e.exhaustive===!0?{exhaustive:!0}:{},status:Array.isArray(e.status)&&e.status.length>0?e.status:void 0,since:i(e,"since"),...a===void 0?{}:{threshold:Number(a)},...r===void 0?{}:{limit:Number(r)}});l(s,n),n.profile&&u(`profile:command=duplicates took_ms=${Date.now()-o}`)}async function Re(e,t){let n=c(t),o=Date.now(),a=!!e.strictExit||!!e.failOnWarn,r=await M(n,{strictExit:a,strictDirectories:!!e.strictDirectories,requireMergeDrivers:!!e.requireMergeDrivers,checkOnly:!!e.checkOnly,checkTelemetry:!!e.checkTelemetry,noRefresh:!!e.noRefresh,refreshVectors:!!e.refreshVectors,verboseStaleItems:!!e.verboseStaleItems,verboseAuthorEvents:!!e.verboseAuthorEvents,brief:!!e.brief,summary:!!e.summary||a,skipVectors:!!e.skipVectors,skipIntegrity:!!e.skipIntegrity,skipDrift:!!e.skipDrift,full:!!e.full});l(r,n),a&&!r.ok&&(x({...r,exit_code:d.GENERIC_FAILURE,error_code:"health_findings",error_category:"validation",command_resolution:"health_findings",resolution_stage:"execute"}),process.exitCode=d.GENERIC_FAILURE),n.profile&&u(`profile:command=health took_ms=${Date.now()-o}`)}async function Oe(e,t){let n=c(t),o=Date.now(),a=await se({checkMetadata:!!e.checkMetadata,metadataProfile:i(e,"metadataProfile"),checkResolution:!!e.checkResolution,checkCompleteness:!!e.checkCompleteness,checkLifecycle:!!e.checkLifecycle,checkStaleBlockers:!!e.checkStaleBlockers,dependencyCycleSeverity:i(e,"dependencyCycleSeverity"),parentCycleSeverity:i(e,"parentCycleSeverity"),checkFiles:!!e.checkFiles,checkCommandReferences:!!e.checkCommandReferences,scanMode:i(e,"scanMode"),includePmInternals:!!e.includePmInternals,verboseFileLists:!!e.verboseFileLists,verboseDiagnostics:!!e.verboseDiagnostics,allAffectedIds:!!e.allAffectedIds,checkHistoryDrift:!!e.checkHistoryDrift,checkStorageIntegrity:!!e.checkStorageIntegrity,fixHints:!!e.fixHints,autoFix:!!e.autoFix,dryRun:!!e.dryRun,fixScope:Array.isArray(e.fixScope)?e.fixScope:void 0,pruneMissing:!!e.pruneMissing,counts:!!e.counts,full:!!e.full},n);l(a,n),(e.strictExit||e.failOnWarn)&&(a.has_warnings||!a.ok)&&(x({...a,exit_code:d.GENERIC_FAILURE,error_code:"validation_findings",error_category:"validation",command_resolution:"validation_findings",resolution_stage:"execute"}),process.exitCode=d.GENERIC_FAILURE),n.profile&&u(`profile:command=validate took_ms=${Date.now()-o}`)}async function Pe(e,t){let n=c(t),o=Date.now(),a=await N(n,{dryRun:e.dryRun===!0,scope:Array.isArray(e.scope)?e.scope:[]});l(a,n),n.profile&&u(`profile:command=gc took_ms=${Date.now()-o}`)}async function Le(e,t,n,o){let a=c(o),r=v(process.cwd(),a.path),s=e.trim().toLowerCase();if(!I.some(p=>p===s))throw _({command_path:"workspace snapshot",token:e,allowed:I,display_name:"workspace snapshot",token_kind:"action",examples:["pm workspace snapshot create before-migration","pm workspace snapshot restore before-migration"]});if(s==="list"){l(await Y(r),a);return}if(s==="create"){l(await j(r,t===void 0?{}:{name:t}),a);return}if(t===void 0)throw new m(`pm workspace snapshot ${s} requires a snapshot name or fingerprint`,d.USAGE);if(s==="inspect"){l(await z(r,t),a);return}if(s==="restore"){if(n.dryRun===!0){l(await K(r,t),a);return}let p=await A(r);l(await X(r,t,{force:n.force===!0,author:T(i(n,"author"),p.author_default),message:i(n,"message"),lockTtlSeconds:p.locks.ttl_seconds,lockWaitMs:p.locks.wait_ms}),a);return}l(await Q(r,t),a)}async function pe(e,t){let n=c(t);l(await Z(n),n)}async function Me(e,t){let n=c(t),o=Date.now(),a=await E({action:i(e,"action"),command:i(e,"command"),summary:!!e.summary,schemaOnly:!!e.schemaOnly,flagsOnly:!!e.flagsOnly,availabilityOnly:!!e.availabilityOnly,runtimeOnly:!!e.runtimeOnly||!!e.activeOnly,full:!!e.full},n);l(a,n),n.profile&&u(`profile:command=contracts took_ms=${Date.now()-o}`)}async function Fe(e,t,n){if(t.start===!0){ce(e,!1),await ye(e,t,n);return}let o=c(n),a=Date.now(),r={...k(t),ifAvailable:t.ifAvailable===!0,maxAttempts:t.maxAttempts};ce(e,t.next===!0);let s=t.next===!0?await $(!!t.force,o,r,{type:typeof t.type=="string"?t.type:void 0,tag:typeof t.tag=="string"?t.tag:void 0,priority:t.priority,assigneeFilter:typeof t.assigneeFilter=="string"?t.assigneeFilter:void 0,parent:typeof t.parent=="string"?t.parent:void 0,sprint:typeof t.sprint=="string"?t.sprint:void 0,release:typeof t.release=="string"?t.release:void 0,includeDecisions:t.includeDecisions===!0,includeGates:t.includeGates===!0,includeContainers:t.includeContainers===!0,tokenBudget:t.tokenBudget??t.token_budget,explainRanking:t.explainRanking===!0||t.explain_ranking===!0}):await q(e,!!t.force,o,r);await y(o,s),l(s,o),o.profile&&u(`profile:command=claim took_ms=${Date.now()-a}`)}function ce(e,t){if(!t&&!e)throw new m("Specify an item id or pass --next",d.USAGE);if(t&&e)throw new m("Specify either an item id or --next, not both",d.USAGE)}async function Ve(e,t,n){if(t.pause===!0){await ge(e,t,n);return}let o=c(n),a=Date.now(),r=await G(e,!!t.force,o,{...k(t),ownershipReleaseBypass:t.ownershipReleaseBypass===!0});await y(o,r),l(await R("release",[e],t,o,r),o),o.profile&&u(`profile:command=release took_ms=${Date.now()-a}`)}async function D(e){let t=c(e),n=S(e.name());if(!n||t.json||t.quiet)return;(await A(v(process.cwd(),t.path))).ux?.deprecation_hints&&u(B(n))}async function ye(e,t,n){await D(n);let o=c(n),a=Date.now(),r=await H(e,{...k(t),force:!!t.force,next:t.next===!0,ifAvailable:t.ifAvailable===!0},o);await y(o,r.update),l(r,o),o.profile&&u(`profile:command=start-task took_ms=${Date.now()-a}`)}async function ge(e,t,n){await D(n);let o=c(n),a=Date.now(),r=await W(e,{...k(t),force:!!t.force},o);await y(o,r.release),l(r,o),o.profile&&u(`profile:command=pause-task took_ms=${Date.now()-a}`)}async function Ne(e,t,n,o){await D(o);let a=c(o),r=Date.now(),s=await J(e,t,{...k(n),validateClose:i(n,"validateClose"),force:!!n.force},a);await y(a,s.release),l(s,a),a.profile&&u(`profile:command=close-task took_ms=${Date.now()-r}`)}function de(e){return e.option("--background","Run linked tests in managed background mode").option("--timeout <seconds>","Default run timeout in seconds").option("--progress","Emit linked-test progress to stderr (always shown in TTY, opt-in for non-TTY)").option("--env-set <value>","Set environment variable(s) for linked-test runs (KEY=VALUE, repeatable)",f).option("--env-clear <value>","Clear environment variable(s) for linked-test runs (NAME, repeatable)",f).option("--shared-host-safe","Apply additive shared-host-safe runtime defaults for linked-test runs").option("--pm-context <mode>","PM test context: schema|tracker|auto|none (default: schema)").option("--override-linked-pm-context","Force run-level --pm-context to override per-linked-test pm_context_mode metadata").option("--workspace-context <mode>","Source-workspace mode: source|isolated|snapshot (default: source)").option("--override-linked-workspace-context","Force run-level --workspace-context over per-linked-test metadata").option("--allow-untrusted-linked-tests","Execute untrusted linked commands when project policy also permits it").option("--fail-on-context-mismatch","Fail linked PM commands when context item counts differ").option("--fail-on-skipped","Treat skipped linked tests as dependency failures").option("--fail-on-empty-test-run","Treat successful linked-test commands that report zero executed tests as failures").option("--require-assertions-for-pm","Require assertion metadata for linked PM command tests").option("--check-context","Preflight linked PM command context diagnostics before executing commands").option("--auto-pm-context","Auto-remediate PM tracker-read context mismatches by routing those linked commands through tracker context")}function Mt(e){le(e);let t=e.command("test").argument("<id>","Item id").option("--add <value>","Add verified isolated test (CSV/markdown or stdin)",f).option("--add-json <value>","Add verified isolated test (JSON object/array or stdin)",f).option("--remove <value>","Remove linked test entry by exact command/path (command=<value> and path=<value> preserve commas and equals signs; or - for stdin)",f).option("--remove-index <n>","Remove the 1-based linked-test index from --list order (repeatable)",f).option("--list","List linked tests without mutating").option("--run","Run linked test commands").option("--match <value>","Run only linked tests whose command/path contains this substring").option("--only-index <n>","Run only the 1-based linked-test index from --list order").option("--only-last","Run only the most recently added linked test");t.option("--acknowledge-linked-tests","Trust the item's current linked commands in this clone without executing them"),de(t).option("--measure <value>","Record name=value[,unit=...][,threshold=...] evidence; repeatable",f).option("--metric-below <value>","Return evidence below name=value").option("--metric-diff <name>","Diff the latest two values").option("--author <value>","Mutation author").option("--message <value>","History message").option("--force","Force ownership override").description("Manage tests linked to an item and optionally run them.").action(De);let n=e.command("test-all").description("Run linked tests across matching items.").option("--status <value>","Filter items by status before running tests").option("--limit <n>","Limit matching items before running linked tests").option("--offset <n>","Skip matching items before running linked tests");de(n).action(Se),e.command("test-runs-worker",{hidden:!0}).argument("<runId>","Background run id").description("Internal background worker command.").action(async(w,h,he)=>{let ke=c(he);await ae(w,ke)}),e.command("telemetry").argument("[namespace-or-subcommand]","Telemetry subcommand: status, flush, stats, clear (default: status)").argument("[subcommand]","Compatibility alias target for local-analytics: status, flush, stats, clear").option("--limit <n>","Maximum command groups returned by telemetry stats").description("Inspect and manage local telemetry queue/runtime state.").action(Be),e.command("duplicates").description("Find duplicate clusters across all statuses.").option("--status <value>","Statuses (repeatable or comma-separated)",f,[]).option("--since <value>","Created at or after this time").option("--threshold <value>","Minimum similarity (0-1)").option("--limit <n>","Maximum clusters").option("--exhaustive","Score all pairs within the safety bound").action(Ee),e.command("stats").description("Show project tracker statistics.").option("--include-empty","Restore zero-count registered item-type and lifecycle-status buckets").option("--storage","Include aggregate history-stream storage metrics (total streams/lines/bytes, largest + deepest streams, oldest/newest entries)").option("--metadata-coverage","Include metadata coverage % (acceptance_criteria, estimated_minutes, resolution, tags, parent) overall and by type").option("--by-assignee","Include a lifecycle-bucketed item breakdown grouped by assignee").option("--by-tag","Include a lifecycle-bucketed item breakdown grouped by tag").option("--by-priority","Include a lifecycle-bucketed item breakdown grouped by priority").option("--tag-prefix <value>","With --by-tag: only count tags starting with this prefix (e.g. domain:)").option("--field-utilization","Report content-field utilization rates (notes/learnings/files/docs/tests/comments/deps/body) for governance analysis").option("--analytics <json>","Improvement ledger/history analytics JSON").action(Te),e.command("health").description("Show project tracker health checks.").option("--strict-directories","Treat optional item-type directories as required failures").option("--require-merge-drivers","Treat absent clone-local merge drivers as a required health failure").option("--check-only","Run read-only health diagnostics without refreshing vectors").option("--check-telemetry","Probe telemetry endpoint health and include network diagnostics").option("--no-refresh","Disable automatic vector refresh attempts during health checks").option("--refresh-vectors","Explicitly enable vector refresh attempts during health checks").option("--verbose-stale-items","Include full stale vectorization ID lists in health output").option("--verbose-author-events","Include every actionable unknown-author event coordinate for review or disposition").option("--brief","Emit compact health details for low-token agent checks").option("--summary","Emit one-line-style health status with check names and warning count").option("--skip-vectors","Skip vectorization check for a faster run").option("--skip-integrity","Skip item/history file integrity check for a faster run").option("--skip-drift","Skip history drift hash check for a faster run").option("--full","Run all checks including slow integrity, drift, and vectorization checks").option("--strict-exit","Return non-zero exit when health is not ok and default to actionable summary output; use --full for complete details").option("--fail-on-warn","Alias for --strict-exit").action(Re),e.command("validate").description("Validate metadata, lifecycle policies, files, command references, and history.").option("--check-metadata","Run metadata completeness checks").option("--metadata-profile <value>","Metadata profile (core|strict|custom)").option("--check-resolution","Run closed-item resolution metadata checks").option("--check-completeness","Check declarative lifecycle field requirements").option("--check-lifecycle","Run active-item lifecycle governance drift checks").option("--check-stale-blockers","Include stale blocker-pattern diagnostics in lifecycle checks").option("--dependency-cycle-severity <value>","Set dependency-cycle warning policy for lifecycle checks (off|warn|error)").option("--parent-cycle-severity <value>","Set parent-hierarchy cycle warning policy for lifecycle checks (off|warn|error)").option("--check-files","Run linked-file and orphaned-file checks").option("--check-command-references","Run linked-command PM-ID reference checks").option("--scan-mode <value>","Select file candidate scan mode for --check-files (default|tracked-all|tracked-all-strict)").option("--include-pm-internals","Include PM storage internals in tracked-all candidate scans").option("--verbose-file-lists","Include full file-path lists for validate --check-files details").option("--verbose-diagnostics","Include full diagnostic ID lists").option("--all-affected-ids","Emit complete missing_* affected-ID lists with no truncation (implied by --json)").option("--strict-exit","Return non-zero exit when validation warnings are present").option("--fail-on-warn","Alias for --strict-exit").option("--fix-hints","Add a machine-executable fix_hints[] of pm commands to each failing check's details").option("--auto-fix","Apply safe, deterministic field backfills").option("--dry-run","Preview planned --auto-fix/--prune-missing fixes without applying them").option("--fix-scope <scope>","Grant --auto-fix scopes (metadata, resolution, estimates, timestamps, lifecycle; comma-separated or repeatable). Default: metadata, resolution; other scopes require explicit opt-in",f).option("--prune-missing","Remove deleted-path file/doc links; preserves real files").option("--check-history-drift","Run item/history hash drift checks").option("--check-storage-integrity","Run the post-merge storage-integrity check (unreadable items, history conflict markers, resurrected deletes, unparseable config/schema)").option("--counts","Keep validation counts and totals while omitting per-item diagnostic arrays").option("--full","Return the complete validation diagnostic projection").action(Oe),e.command("gc").option("--dry-run","Preview cleanup targets without deleting files; without this flag, pm gc deletes matched artifacts").option("--scope <value>","Limit cleanup to one or more scopes (comma-separated or repeatable): index, embeddings, runtime, locks, checkpoints, transactions",f).description("Delete optional cache artifacts by default (including expired lock debris) and show a summary.").action(Pe);let o=e.command("workspace").description("Inspect workspace state and snapshots.");o.command("position").description("Show merge and history readiness.").action(pe),o.command("snapshot").argument("<action>","Action: create, list, inspect, restore, delete").argument("[target]","Optional name for create; name or fingerprint otherwise").description("Manage content-addressed tracker snapshots.").option("--dry-run","Preview restore file, item, stream, and history-entry impact without mutating state").option("--force","Explicitly confirm a whole-workspace snapshot restore").option("--author <value>","Actor recorded on the restore audit event").option("--message <value>","Human-readable restore rationale").action(Le),e.command("contracts").description("Show machine-readable command and schema contracts for agents.").option("--action <value>","Filter tool schema branches to a specific action").option("--command <value>","Scope contracts output to one CLI command (narrow-by-default)").option("--summary","Return one command+intent row per top-level command for cheap agent bootstrap").option("--schema-only","Return schema-focused output only").option("--flags-only","Return command flag contracts only").option("--availability-only","Return action availability surface only").option("--runtime-only","Include only actions invocable in the current runtime").option("--active-only","Alias for --runtime-only").option("--full","Include full schema and command-flag surfaces (large; default brief output omits heavy sections for unfiltered queries)").action(Me);let a=e.command("claim").option("--start","Claim and start an explicit item").argument("[id]","Item id (omit with --next)").option("--author <value>","Mutation author").option("--message <value>","History message").option("--force","Force claim override").option("--if-available","Skip another author's claim (skipped=true)").option("--next","Atomically claim the next caller-available actionable item").option("--type <value>","Filter --next candidates by type").option("--tag <value>","Filter --next candidates by tag").option("--priority <value>","Filter --next candidates by priority").option("--assignee-filter <value>","Filter --next candidates: assigned|unassigned").option("--parent <id>","Scope --next candidates to a subtree").option("--sprint <value>","Filter --next candidates by sprint").option("--release <value>","Filter --next candidates by release").option("--max-attempts <n>","Bound the --next candidate walk (default 10; maximum 100)").option("--include-decisions","Allow --next to claim human-gated Decision items").option("--include-gates","Allow --next to claim outcome gates").option("--include-containers","Allow --next to claim containers with unfinished descendants").option("--token-budget <n>","Bound the estimated tokens used to rank --next candidates").option("--explain-ranking","Include ranking provenance for --next selection").description("Claim an item for active work.").action(Fe);g(a,"--assignee <value>","Alias for --author on lifecycle ownership commands"),g(a,"--token_budget <n>","Alias for --token-budget"),g(a,"--explain_ranking","Alias for --explain-ranking");let r=e.command("release").option("--pause","Use open status").argument("<id>","Item id").option("--author <value>","Author").option("--message <value>","Message").option("--force","Override ownership").description("Release ownership.").action(Ve);g(r,"--assignee <value>","Alias for --author on lifecycle ownership commands");let s=e.command("start-task",{hidden:!0}).argument("<id>","Item id").option("--author <value>","Mutation author").option("--message <value>","History message").option("--force","Force ownership or terminal override when required").description("Lifecycle alias: claim an item and move it to in_progress.").action(ye);g(s,"--assignee <value>","Alias for --author on lifecycle ownership commands");let p=e.command("pause-task",{hidden:!0}).argument("<id>","Item id").option("--author <value>","Mutation author").option("--message <value>","History message").option("--force","Force ownership override when required").description("Lifecycle alias: move an item to open and release its claim.").action(ge);g(p,"--assignee <value>","Alias for --author on lifecycle ownership commands");let b=e.command("close-task",{hidden:!0}).argument("<id>","Item id").argument("[reason]","Close reason text").option("--author <value>","Mutation author").option("--message <value>","History message").option("--validate-close <value>","Close-time validation mode: off|warn|strict").option("--force","Force ownership or terminal override when required").description("Lifecycle alias: close an item and release assignment metadata.").action(Ne);g(b,"--assignee <value>","Alias for --author on lifecycle ownership commands")}export{Lt as _testOnlyRegisterOperations,Mt as registerOperationCommands,ce as requireClaimTarget};
2
+ //# sourceMappingURL=register-operations-53HAD3QP.js.map
@@ -0,0 +1,2 @@
1
+ import{a as W}from"./chunk-CPOWTIIS.js";import{g as T,i as P}from"./chunk-UT7GRGHY.js";import{Oa as U,Ra as O,_a as C,db as L,fb as j}from"./chunk-VMJLM7P2.js";import"./chunk-DEZPZOQ7.js";import{Ff as D,Go as y,If as b,Jf as h,Jo as x,_a as I,l as $,la as d,li as R,m as S,na as m}from"./chunk-NBDB3SRC.js";import A from"node:fs/promises";import F from"node:path";(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]="26ea7f42-d5f7-5ada-afd9-389dadc4d138")}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]="0b0e08e0-f6e7-59c4-ac96-9f47b172727a")}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]="d975120a-964e-5b19-ae10-8ba011ba9bf8")}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]="108609fa-51fc-5bd0-ac54-de2ad14a66c6")}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]="b36466e6-5574-5509-909a-e8599f11664c")}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]="e5e1e242-6864-5a72-adb9-0eda4c65a0c3")}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]="1261f2a8-b56d-5108-a130-abb46bbab3ac")}catch{}})();var M={extension:"extension",package:void 0};async function E(t,e){if(!t)return;let o=$(t),a=y(e);await R(I(process.cwd(),a.path)).then(r=>r.ux.deprecation_hints)&&h(S(o))}var X={init:"init",install:"install",uninstall:"uninstall",explore:"explore",manage:"manage",describe:"describe",reload:"reload",doctor:"doctor",catalog:"catalog",adopt:"adopt","adopt-all":"adoptAll",activate:"activate",deactivate:"deactivate",migrate:"migrate"};function Y(t){let e=t.capability,o=typeof e=="string"?[e]:Array.isArray(e)?e.filter(i=>typeof i=="string"):[],a=[...new Set(o.map(i=>i.trim().toLowerCase()).filter(i=>i.length>0))];if(a.length>1)throw new m(`Multiple scaffold capabilities cannot be combined yet: ${a.join(", ")}. Choose one capability per scaffold.`,d.USAGE);return a[0]}function G(t,e,o="extension"){let a={...t};e!==void 0&&(a[X[e]]=!0);let i=(...c)=>c.some(s=>a[s]===!0),r=(...c)=>{for(let s of c)if(typeof a[s]=="string")return a[s]};return{init:i("init"),scaffold:i("scaffold"),install:i("install"),uninstall:i("uninstall"),explore:i("explore","list"),manage:i("manage"),describe:i("describe"),markdown:i("markdown"),reload:i("reload"),doctor:i("doctor"),catalog:i("catalog"),adopt:i("adopt"),adoptAll:i("adoptAll","adopt_all","adopt-all"),activate:i("activate"),deactivate:i("deactivate"),migrate:i("migrate"),project:i("project"),local:i("local"),global:i("global"),gh:r("gh"),github:r("github"),ref:r("ref"),capability:Y(t),declarative:i("declarative"),fields:r("fields"),detail:r("detail"),output:r("output"),trace:i("trace"),watch:i("watch"),runtimeProbe:i("runtimeProbe","runtime_probe","runtime-probe"),fixManagedState:i("fixManagedState","fix_managed_state","fix-managed-state"),isolated:i("isolated"),ignoreGlobal:i("ignoreGlobal","ignore_global","ignore-global"),strictExit:i("strictExit","strict_exit","strict-exit"),failOnWarn:i("failOnWarn","fail_on_warn","fail-on-warn"),dryRun:i("dryRun","dry_run","dry-run"),vocabulary:o}}async function J(t){let e=(await A.readdir(process.cwd())).filter(a=>!a.startsWith(".")).sort((a,i)=>a.localeCompare(i)),o=[...t].sort((a,i)=>a.localeCompare(i));return e.length===o.length&&e.every((a,i)=>a===o[i])}async function Q(t){let e=(t??[]).map(o=>o.trim()).filter(o=>o.length>0);return e.length<=1?e.length===0?void 0:e:await J(e)?["*"]:e}function z(t,e,o){let a=t.markdown===!0;if(o!==void 0&&o==="")throw new m("--output requires a non-empty file path.",d.USAGE);if(o!==void 0&&!a)throw new m("--output is only supported with --markdown describe output.",d.USAGE);if(a){if(e.json)throw new m("Cannot combine --json with --markdown.",d.USAGE);if(t.describe!==!0)throw new m("--markdown is only supported by the describe action.",d.USAGE)}}async function Z(t){let e=O(t.result.details,t.vocabulary);if(t.outputPath!==void 0){let o=F.resolve(t.outputPath);await A.mkdir(F.dirname(o),{recursive:!0}),await A.writeFile(o,e,"utf8")}if(!t.globalOptions.quiet){for(let o of t.result.warnings)h(`warning: ${o}`);t.outputPath===void 0&&D(e)}}function tt(t,e){let o=!!e.strictExit||!!e.failOnWarn;if(t.action!=="doctor"||!o)return;let a=t.details!==null&&typeof t.details=="object"?t.details:{},i=a.summary!==null&&typeof a.summary=="object"?a.summary:null,r=i&&typeof i.status=="string"?i.status:void 0;(t.warnings.length>0||r!==void 0&&r!=="ok")&&(process.exitCode=d.GENERIC_FAILURE)}async function f(t,e,o,a,i="extension"){let r=y(o),c=Date.now(),s=i==="extension"?"package":i;await E(M[i],o);let n=G(e,a,s),p=(typeof n.output=="string"?n.output:void 0)?.trim();z(n,r,p);let g=await C(t,n,r);n.markdown===!0?await Z({result:g,vocabulary:s,outputPath:p,globalOptions:r}):b(g,r),tt(g,n),g.ok===!1&&(process.exitCode=d.GENERIC_FAILURE),r.profile&&h(`profile:command=extension took_ms=${Date.now()-c}`)}function et(t){return t.details!==null&&typeof t.details=="object"?t.details:{}}function ot(t){return t instanceof m?{message:t.message,exit_code:t.exitCode,...t.context}:{message:t instanceof Error?t.message:String(t),exit_code:d.GENERIC_FAILURE}}async function at(t,e,o){let a=[],i=[],r=d.GENERIC_FAILURE;for(let c of t)try{let s=await C(c,e,o),n=et(s),l=Array.isArray(s.warnings)?s.warnings:[];i.push(...l);let p=s.ok===!0;a.push({target:c,ok:p,extension:n.extension,source:n.source,install_plan:n.install_plan,dry_run:n.dry_run,destination_path:n.destination_path,activated:n.activated,settings_changed:n.settings_changed,command_paths:n.command_paths,action_paths:n.action_paths,runtime_activation_status:n.runtime_activation_status,activation_diagnostics:n.activation_diagnostics,command_discovery:n.command_discovery,verification:n.verification,warnings:l,...p?{}:{error:{message:"Extension install returned ok=false without throwing an error.",exit_code:d.GENERIC_FAILURE,code:"extension_install_soft_failed"}}})}catch(s){let n=ot(s),l=n.exit_code;typeof l=="number"&&r===d.GENERIC_FAILURE&&l!==d.GENERIC_FAILURE&&(r=l),a.push({target:c,ok:!1,error:n})}return{rows:a,warnings:i,failureExitCode:r}}async function N(t,e,o,a){let i=a==="extension"?"package":a;await E(M[a],o);let r=await Q(t);if(r===void 0||r.length<=1){await f(r?.[0],e,o,"install",i);return}let c=y(o),s=Date.now(),n=G(e,"install",i);if(z(n,c,void 0),[n.gh,n.github].some(v=>typeof v=="string"&&v.trim().length>0))throw new m("Multiple install targets cannot be combined with --gh/--github. Install one GitHub source per command, or pass multiple explicit local, bundled, or npm: targets.",d.USAGE,{code:"multi_target_github_install_ambiguous",required:"Use exactly one positional target with --gh/--github, or omit --gh/--github when installing multiple targets.",examples:["pm install --gh owner/repo","pm install npm:pm-guide-shell pm-todos"]});let{rows:p,warnings:g,failureExitCode:w}=await at(r,n,c),k=p.filter(v=>v.ok!==!0).length,B={ok:k===0,action:"install",scope:n.global===!0?"global":"project",installed_count:n.dryRun===!0?0:p.length-k,...n.dryRun===!0?{dry_run:!0,planned_count:p.length-k}:{},failed_count:k,targets:p,warnings:[...new Set(g)].sort((v,V)=>v.localeCompare(V))};b(B,c),k>0&&(process.exitCode=w),c.profile&&h(`profile:command=extension took_ms=${Date.now()-s}`)}function it(t){return t.option("--project","Use project extension scope (default)").option("--local","Alias for --project").option("--global","Use global extension scope")}function _(t){return t.option("--project","Use project package scope (default)").option("--local","Alias for --project").option("--global","Use global package scope")}function u(t,e){return e==="package"?_(t):it(t)}function q(t){return t.option("--dry-run","Plan CLI/package upgrades without running npm or reinstalling packages").option("--cli-only","Upgrade only the pm CLI/SDK npm package").option("--packages-only","Upgrade only managed pm packages").option("--repair","Force npm global reinstall when upgrading the pm CLI/SDK").option("--tag <value>","npm dist-tag/version for CLI and registry package upgrades").option("--package-name <value>","Override the CLI package name for self-upgrade testing")}async function K(t,e,o){let a=y(e),i=Date.now();o&&await E("upgrade",e);let r=await P(t,e.optsWithGlobals(),a);b(r,a),r.ok||(process.exitCode=d.GENERIC_FAILURE),a.profile&&h(`profile:command=package-upgrade took_ms=${Date.now()-i}`)}function H(t,e){let o=e==="package"?"package":"extension",a=e==="package"?"packages":"extensions",i=e,r=t.command(i,{hidden:e==="extension"}).argument("[target]",`${o[0].toUpperCase()}${o.slice(1)} source, name, or scaffold path`).option("--init",`Generate a starter ${o} scaffold at target path`).option("--scaffold","Alias for --init").option("--capability <kind>","Starter capability for --init (default: commands)",x).option("--install",`Install a ${o} source`).option("--dry-run","Preview install without writes or activation").option("--uninstall",`Uninstall an installed ${o}`).option("--explore",`List discovered ${a} in selected scope`).option("--list","Alias for --explore").option("--manage",`List managed ${a} and updates`).option("--describe",`Show surfaces registered by a loaded ${o}`).option("--markdown","Render describe as Markdown").option("--output <path>","Write Markdown to a file").option("--reload",`Reload ${a} without import cache`).option("--watch","Use watch mode with --reload").option("--doctor",`Run ${o} diagnostics`).option("--catalog",`List bundled first-party ${o} catalog metadata`).option("--adopt",`Adopt unmanaged ${o}`).option("--adopt-all",`Adopt all unmanaged ${a}`).option("--activate",`Activate a ${o} in selected scope settings`).option("--deactivate",`Deactivate a ${o} in selected scope settings`).option("--project",`Use project ${o} scope (default)`).option("--local","Alias for --project").option("--global",`Use global ${o} scope`).option("--gh <github-source>","Install from GitHub shorthand source (owner/repo[/path])").option("--github <github-source>","Alias for --gh").option("--ref <ref>","Git ref/branch/tag for GitHub install sources").option("--detail <mode>",`${o[0].toUpperCase()}${o.slice(1)} diagnostics detail mode (summary|deep)`).option("--trace","Include actionable registration traces in doctor deep diagnostics").option("--runtime-probe","Opt-in runtime activation probe for manage output parity").option("--fix-managed-state",`Adopt unmanaged ${a} before diagnostics/update checks`).option("--isolated",`Run doctor against project-scope ${a} only, ignoring global registrations`).option("--ignore-global","Alias for --isolated").option("--strict-exit","Return non-zero exit when doctor warnings are present (ok=false)").option("--fail-on-warn","Alias for --strict-exit (doctor)").description(e==="package"?"Manage package lifecycle in project or global scope.":"Manage extension lifecycle in project or global scope.").action(async(s,n,l)=>{await f(s,l.optsWithGlobals(),l,void 0,e)});e==="package"&&(r.alias("packages"),r.option("--declarative","Scaffold the composeExtension blueprint starter (any capability)"));let c=r.command("init").alias("scaffold").argument("<target>","Scaffold target directory path").option("--capability <kind>",`Capability the starter targets (${U.join("|")}; default commands)`,x).description(e==="package"?"Generate a starter package scaffold with package metadata, manifest, and entrypoint.":"Generate a starter extension scaffold with manifest and entrypoint.");e==="package"&&c.option("--declarative","Scaffold the composeExtension blueprint starter (any capability)"),u(c,e).action(async(s,n,l)=>{await f(s,l.optsWithGlobals(),l,"init",e)}),u(r.command("install").option("--dry-run","Resolve sources and estimate copying without destination writes or activation").argument("[targets...]",`${o[0].toUpperCase()}${o.slice(1)} source (local path, bundled alias, npm: source, wildcard, or GitHub source)`).option("--gh <github-source>","Install from GitHub shorthand source (owner/repo[/path])").option("--github <github-source>","Alias for --gh").option("--ref <ref>","Git ref/branch/tag for GitHub install sources").description(`Install ${o} from local path, bundled alias, npm: source, wildcard, or GitHub source.`),e).action(async(s,n,l)=>{await N(s,l.optsWithGlobals(),l,e)}),u(r.command("uninstall").argument("<target>",`${o[0].toUpperCase()}${o.slice(1)} name`).description(`Uninstall an installed ${o}.`),e).action(async(s,n,l)=>{await f(s,l.optsWithGlobals(),l,"uninstall",e)}),u(r.command("explore").description(`List discovered ${a} in selected scope.`),e).action(async(s,n)=>{await f(void 0,n.optsWithGlobals(),n,"explore",e)}),u(r.command("inventory").argument("[name]",`${o[0].toUpperCase()}${o.slice(1)} name or directory to inspect`).description(`Read configured ${o} install and enablement state without activating extension code.`),e).action(async(s,n,l)=>{let p=y(l),g=l.optsWithGlobals();if(g.global===!0&&(g.project===!0||g.local===!0))throw new m("--global and --project/--local are mutually exclusive.",d.USAGE);let w=await W({pmRoot:I(process.cwd(),p.path),scope:g.global===!0?"global":"project",name:s});b(w,p),w.complete||(process.exitCode=d.GENERIC_FAILURE)}),u(r.command("manage").option("--runtime-probe","Opt-in runtime activation probe for manage output parity").option("--fix-managed-state",`Adopt unmanaged ${a} before diagnostics/update checks`).description(`List managed ${a} with update-check metadata.`),e).action(async(s,n)=>{await f(void 0,n.optsWithGlobals(),n,"manage",e)}),u(r.command("describe").argument("[target]",`${o[0].toUpperCase()}${o.slice(1)} name to describe (omit for every loaded ${o})`).option("--markdown","Render the surface map as a Markdown reference document instead of toon/json").option("--output <path>","Write Markdown output to a file (requires --markdown)").description(`Map every surface a loaded ${o} registers (commands, hooks, item types, providers, overrides, ...).`),e).action(async(s,n,l)=>{await f(s,l.optsWithGlobals(),l,"describe",e)}),u(r.command("reload").option("--watch","Use watch mode for repeated reload checks").description(`Reload ${a} with cache-busted module imports.`),e).action(async(s,n)=>{await f(void 0,n.optsWithGlobals(),n,"reload",e)}),u(r.command("doctor").option("--detail <mode>",`Detail mode for ${o} diagnostics (summary|deep)`).option("--trace","Include actionable registration traces in doctor deep diagnostics").option("--fix-managed-state",`Adopt unmanaged ${a} before diagnostics/update checks`).option("--isolated",`Run doctor against project-scope ${a} only, ignoring global registrations`).option("--ignore-global","Alias for --isolated").option("--strict-exit","Return non-zero exit when doctor warnings are present (ok=false)").option("--fail-on-warn","Alias for --strict-exit (doctor)").description(`Run consolidated ${o} diagnostics (summary/deep modes).`),e).action(async(s,n)=>{await f(void 0,n.optsWithGlobals(),n,"doctor",e)}),u(r.command("catalog").alias("list").option("--fields <value>","Render compact comma-separated catalog fields, for example: alias,installed,install_command").description(`List bundled first-party ${o} catalog metadata.`),e).action(async(s,n)=>{await f(void 0,n.optsWithGlobals(),n,"catalog",e)}),u(r.command("adopt").argument("<target>",`${o[0].toUpperCase()}${o.slice(1)} name`).option("--gh <owner/repo[/path]>",`GitHub provenance shorthand for adopted ${o}`).option("--github <owner/repo[/path]>","Alias for --gh").option("--ref <ref>","Git ref/branch/tag for GitHub shorthand source").description(`Adopt an existing unmanaged ${o} into managed metadata.`),e).action(async(s,n,l)=>{await f(s,l.optsWithGlobals(),l,"adopt",e)}),u(r.command("adopt-all").description(`Adopt all unmanaged ${a} into managed metadata.`),e).action(async(s,n)=>{await f(void 0,n.optsWithGlobals(),n,"adopt-all",e)}),u(r.command("migrate").option("--dry-run","Plan active migrations without invoking extension code").description(`Plan or apply active ${o} migrations with durable receipts.`),e).action(async(s,n)=>{await f(void 0,n.optsWithGlobals(),n,"migrate",e)}),u(r.command("activate").argument("<target>",`${o[0].toUpperCase()}${o.slice(1)} name`).description(`Activate a ${o} in selected scope settings.`),e).action(async(s,n,l)=>{await f(s,l.optsWithGlobals(),l,"activate",e)}),u(r.command("deactivate").argument("<target>",`${o[0].toUpperCase()}${o.slice(1)} name`).description(`Deactivate a ${o} in selected scope settings.`),e).action(async(s,n,l)=>{await f(s,l.optsWithGlobals(),l,"deactivate",e)}),e==="package"&&q(_(r.command("upgrade").argument("[target]","Optional managed package name/source to upgrade; omit to upgrade pm CLI and all managed packages").description("Upgrade the pm CLI/SDK and refresh managed installable pm packages."))).action(async(s,n,l)=>{await K(s,l,!1)})}async function nt(t,e,o){let a=y(o),i=Date.now(),r=await j(t,a,{idPrefix:typeof e.idPrefix=="string"?e.idPrefix:void 0,preset:typeof e.preset=="string"?e.preset:void 0,defaults:e.defaults===!0||e.yes===!0,author:typeof e.author=="string"?e.author:void 0,agentGuidance:typeof e.agentGuidance=="string"?e.agentGuidance:void 0,typePreset:typeof e.typePreset=="string"?e.typePreset:void 0,withPackages:e.withPackages===!0,mergeFence:e.mergeFence!==!1,force:e.force===!0,workspace:typeof e.workspace=="string"?e.workspace:void 0}),s=e.verbose===!0||a.json===!0;b(s?r:L(r,!0),a),a.profile&&h(`profile:command=init took_ms=${Date.now()-i}`)}function rt(t,e,o,a){let r=t!==void 0&&new Set(["get","set","list","export"]).has(t);return{resolvedScope:r?"project":t??"project",resolvedAction:r?t:e??"list",resolvedKey:r?e:o,resolvedValue:r?o:a}}function st(t){return{criterion:Array.isArray(t.criterion)?t.criterion:[],format:typeof t.format=="string"?t.format:void 0,policy:typeof t.policy=="string"?t.policy:void 0,value:typeof t.value=="string"?t.value:void 0,clearCriteria:t.clearCriteria===!0,defaultDepth:typeof t.defaultDepth=="string"?t.defaultDepth:void 0,activityLimit:typeof t.activityLimit=="string"?t.activityLimit:void 0,staleThresholdDays:typeof t.staleThresholdDays=="string"?t.staleThresholdDays:void 0,sectionHierarchy:typeof t.sectionHierarchy=="string"?t.sectionHierarchy:void 0,sectionActivity:typeof t.sectionActivity=="string"?t.sectionActivity:void 0,sectionProgress:typeof t.sectionProgress=="string"?t.sectionProgress:void 0,sectionBlockers:typeof t.sectionBlockers=="string"?t.sectionBlockers:void 0,sectionFiles:typeof t.sectionFiles=="string"?t.sectionFiles:void 0,sectionWorkload:typeof t.sectionWorkload=="string"?t.sectionWorkload:void 0,sectionStaleness:typeof t.sectionStaleness=="string"?t.sectionStaleness:void 0,sectionTests:typeof t.sectionTests=="string"?t.sectionTests:void 0}}async function lt(t,e,o,a,i,r){let c=y(r),s=Date.now(),{resolvedScope:n,resolvedAction:l,resolvedKey:p,resolvedValue:g}=rt(t,e,o,a),w=await T(n,l,p,st(i),c,typeof g=="string"?g:void 0);b(w,c),c.profile&&h(`profile:command=config took_ms=${Date.now()-s}`)}var Ut={normalizeExtensionOptions:G};function Ot(t){t.command("init").argument("[prefix-or-path]","Optional id prefix, or path-like tracker target such as ./pm-sandbox").option("--prefix, --id-prefix <value>","Set the item ID prefix (alias for the positional prefix)").option("--preset <value>","Governance preset for new setups: minimal|default|strict").option("--defaults","Use non-interactive setup defaults without opening the wizard").option("-y, --yes","Alias for --defaults (non-interactive setup)").option("--author <value>","Set the default mutation author for this project").option("--agent-guidance <mode>","Agent guidance mode: ask|add|skip|status").option("--type-preset <name>","Register domain item types during init: agile|ops|research").option("--with-packages","Install all bundled first-party packages during initialization").option("--no-merge-fence","Skip automatic merge-driver installation for a fresh Git-backed tracker").option("--workspace <dir>","Initialize repository-local tracker storage at <dir>/.agents/pm").option("--force","Allow initializing tracker files directly in a directory that looks like a workspace root").option("--verbose","Include the full resolved settings tree in the output (default output is a concise summary)").description("Initialize pm storage and defaults for the current workspace or a path-like tracker target.").action(async(e,o,a)=>{await nt(e,o,a)}),t.command("config").argument("[scope]","Config scope: project|global, or action shorthand list|export|get|set for project scope").argument("[action]","Config action: get|set|list|export").argument("[key]","Config key for get|set; use `pm config project list` for the complete typed inventory, including mutation-guard-* policies").argument("[value]",'Optional value for set: routed to the right typed flag by key (e.g. config set telemetry-tracking off, config set item-format toon, config set definition-of-done "Tests pass"). Equivalent to --policy/--format/--criterion. context keys still require --default-depth/--section-* flags.').option("--criterion <text>","Criteria value for definition-of-done, metadata-required-fields, or lifecycle pattern keys (repeatable for set)",x).option("--clear-criteria","Clear criteria-list keys for config set operations").option("--format <value>","Item format for item-format key: toon").option("--policy <value>","Policy key values: history-missing-stream-policy=auto_create|strict_error; sprint-release-format-policy=warn|strict_error; parent-reference-policy=warn|strict_error; governance-preset=minimal|default|strict|custom; governance-ownership-enforcement=none|warn|strict; governance-create-mode-default=progressive|strict; governance-close-validation-default=off|warn|strict; governance-require-close-reason=enabled|disabled; governance-parent-reference-policy=warn|strict_error; governance-metadata-validation-profile=core|strict|custom; governance-force-required-for-stale-lock=enabled|disabled; governance-duplicate-detection-mode=off|advisory|strict; test-result-tracking=enabled|disabled; untrusted-linked-test-execution=enabled|disabled; telemetry-tracking=enabled|disabled").option("--value <value>","Typed nested setting value. Mutation guards: require-attributed-author=true|false, secret-guard=off|advise|block, stale-in-progress-hours=integer>=1. Kebab-case is preferred; underscore aliases remain accepted.").option("--default-depth <value>","Context default depth: brief|standard|deep").option("--activity-limit <n>","Context default activity limit").option("--stale-threshold-days <n>","Context staleness cutoff in days").option("--section-hierarchy <value>","Enable/disable context hierarchy section (true|false)").option("--section-activity <value>","Enable/disable context activity section (true|false)").option("--section-progress <value>","Enable/disable context progress section (true|false)").option("--section-blockers <value>","Enable/disable context blockers section (true|false)").option("--section-files <value>","Enable/disable context files section (true|false)").option("--section-workload <value>","Enable/disable context workload section (true|false)").option("--section-staleness <value>","Enable/disable context staleness section (true|false)").option("--section-tests <value>","Enable/disable context tests section (true|false)").description("Read or update pm settings for the current workspace or global profile.").action(async(e,o,a,i,r,c)=>{await lt(e,o,a,i,r,c)}),H(t,"extension"),H(t,"package"),_(t.command("install",{hidden:!0}).option("--dry-run","Resolve sources and estimate copying without destination writes or activation").argument("[targets...]","Package source (local path, bundled alias, npm: source, wildcard, or GitHub source)").option("--gh <github-source>","Install from GitHub shorthand source (owner/repo[/path])").option("--github <github-source>","Alias for --gh").option("--ref <ref>","Git ref/branch/tag for GitHub install sources").description("Install a pm package into the project package scope by default.")).action(async(e,o,a)=>{await E("install",a),await N(e,a.optsWithGlobals(),a,"package")}),q(_(t.command("upgrade",{hidden:!0}).argument("[target]","Optional managed package name/source to upgrade; omit to upgrade pm CLI and all managed packages").description("Upgrade the pm CLI/SDK and refresh managed installable pm packages."))).action(async(e,o,a)=>{await K(e,a,!0)})}export{Ut as _testOnlyRegisterSetup,Ot as registerSetupCommands};
2
+ //# sourceMappingURL=register-setup-NVX6374E.js.map
@@ -0,0 +1,2 @@
1
+ import{Bb as $,Eb as U,Ib as b,Lb as z,Nb as T,ba as D}from"./chunk-BRLXKRI2.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="d78f489d-2ce1-5806-a17e-0c6c049ad0f0")}catch{}})();var F=["item","list","context","search","graph","history","workspace","package","ops","plan","contracts","help"],me=["acknowledge","activate","add","adopt","adopt-all","catalog","compact","complete","create","deactivate","delete","describe","doctor","edit","explore","import","init","inspect","install","list","manage","migrate","mutate","read","redact","reload","remove","reopen","repair","restore","run","show","uninstall","upgrade","verify"];function s(e,a,t,l={}){return{name:e,required:t,variadic:l.variadic===!0,value_kind:a,polymorphic:l.polymorphic===!0}}function X(e){let a=e.replaceAll("-"," ");return`${a.charAt(0).toUpperCase()}${a.slice(1)}`}var f=s("id","item_id",!0),A=s("id","item_id",!1),y=s("text","string",!1),k=s("plan-id","item_id",!0),j=s("step","string",!0),ue=["--acceptance-criteria","--actual-result","--affected-version","--assignee","--blocked-by","--blocked-reason","--blocks","--body","--claim","--comment","--component","--confidence","--create-mode","--customer-impact","--deadline","--definition-of-ready","--description","--doc","--environment","--estimate","--event","--expected-result","--fixed-version","--file","--from-search","--goal","--harness","--impact","--learning","--message","--mode","--note","--objective","--order","--outcome","--parent","--priority","--rank","--related","--release","--reminder","--reporter","--repro-steps","--resolution","--resume-context","--reviewer","--risk","--scope","--severity","--sprint","--status","--step","--step-blocked-reason","--step-body","--step-evidence","--step-owner","--step-replacement","--step-status","--step-title","--tags","--template","--test","--title","--type-option","--unblock-note","--value","--why-now"],E=["--allow-multiple-active","--depends-on","--file","--force","--message","--step-blocked-reason","--step-body","--step-evidence","--step-owner","--step-status","--step-title","--test"],_e={"update-step":"Update one declared Plan step.","complete-step":"Complete one declared Plan step.","block-step":"Block one declared Plan step.","remove-step":"Remove one declared Plan step.",link:"Link one dependency to a declared Plan step.",unlink:"Unlink one dependency from a declared Plan step."},h=[{command:"plan create",parent:"plan",action:"create",slots:[s("title","string",!1,{polymorphic:!0})],accepted_flags:ue,description:"Create a Plan item and optionally seed its ordered steps.",example:'pm plan create --title "Refactor lock retry"'},{command:"plan show",parent:"plan",action:"show",slots:[k],accepted_flags:["--depth","--fields"],description:"Read one Plan item with a bounded plan projection.",example:"pm plan show pm-a1b2 --depth standard"},{command:"plan add-step",parent:"plan",action:"add-step",slots:[k],accepted_flags:E,description:"Append one ordered step to a Plan item.",example:'pm plan add-step pm-a1b2 --step-title "Run tests"'},...Object.entries(_e).map(([e,a])=>({command:`plan ${e}`,parent:"plan",action:e,slots:[k,j],accepted_flags:E,description:a,example:`pm plan ${e} pm-a1b2 plan-step-001`})),{command:"plan reorder-step",parent:"plan",action:"reorder-step",slots:[k,j,s("new-order","integer",!0)],accepted_flags:["--force","--message"],description:"Move one Plan step to a declared integer order.",example:"pm plan reorder-step pm-a1b2 plan-step-001 2"},...["decision","discovery","validation","resume","approve","materialize"].map(e=>({command:`plan ${e}`,parent:"plan",action:e,slots:[k],accepted_flags:E,description:`${X(e)} for one Plan item.`,example:`pm plan ${e} pm-a1b2`})),...["list","show","put","remove"].map(e=>({command:`assurance ${e}`,parent:"assurance",action:e,slots:[s("kind","string",!0),...e==="list"?[]:[s("id","string",!0)]],accepted_flags:e==="put"?["--author","--definition","--message"]:e==="remove"?["--author","--message"]:[],description:`${X(e)} assurance declarations by kind.`,example:e==="list"?"pm assurance list measurement":`pm assurance ${e} measurement example-id`})),{command:"assurance run",parent:"assurance",action:"run",slots:[s("gate-id","string",!0)],accepted_flags:["--dry-run","--trigger","--tree"],description:"Evaluate one assurance gate for a lifecycle trigger.",example:"pm assurance run tracker-context-quality --trigger ci --dry-run"},{command:"assurance verdicts",parent:"assurance",action:"verdicts",slots:[s("gate-id","string",!1)],accepted_flags:["--gate","--limit"],description:"List bounded assurance verdict history.",example:"pm assurance verdicts --limit 20"},...["presets","apply"].map(e=>({command:`assurance ${e}`,parent:"assurance",action:e,slots:[s("preset","string",e==="apply")],accepted_flags:["--author","--message","--owner"],description:e==="apply"?"Apply one assurance adoption preset.":"List available assurance adoption presets.",example:e==="apply"?"pm assurance apply software-delivery --owner <pm-item-id>":"pm assurance presets"})),{command:"assurance derive",parent:"assurance",action:"derive",slots:[],accepted_flags:["--apply","--author","--message","--owner"],description:"Derive assurance proposals from current project context.",example:"pm assurance derive --owner pm-a1b2"},{command:"assurance promote",parent:"assurance",action:"promote",slots:[s("assertion-id","string",!0)],accepted_flags:["--author","--enforcement","--message"],description:"Promote one assertion into a warning or blocking gate.",example:"pm assurance promote assertion-id --enforcement warn"},{command:"assurance risk",parent:"assurance",action:"risk",slots:[],accepted_flags:["--definition"],description:"Analyze bounded defect-recurrence risk for a proposed change.",example:`pm assurance risk --definition '{"change":{"files":[]}}'`},{command:"assurance lineages",parent:"assurance",action:"lineages",slots:[],accepted_flags:["--definition"],description:"Measure all recorded recurrence lineages with bounded evidence rows.",example:`pm assurance lineages --definition '{"policy":{"version":1,"evidence_epoch":"2026-01-01T00:00:00.000Z","families":[]}}'`},{command:"workspace position",parent:"workspace",action:"position",slots:[],accepted_flags:[],description:"Read bounded merge-fence, receipt, history-drift, and next-action readiness.",example:"pm workspace position"},{command:"workspace snapshot create",parent:"workspace snapshot",action:"create",slots:[s("name","string",!1)],accepted_flags:[],description:"Capture authoritative tracker state as an immutable snapshot.",example:"pm workspace snapshot create before-migration"},{command:"workspace snapshot list",parent:"workspace snapshot",action:"list",slots:[],accepted_flags:[],description:"List immutable workspace snapshots and named references.",example:"pm workspace snapshot list"},{command:"workspace snapshot inspect",parent:"workspace snapshot",action:"inspect",slots:[s("target","string",!0)],accepted_flags:[],description:"Inspect one workspace snapshot target.",example:"pm workspace snapshot inspect before-migration"},{command:"workspace snapshot restore",parent:"workspace snapshot",action:"restore",slots:[s("target","string",!0)],accepted_flags:["--author","--dry-run","--force","--message"],description:"Restore an immutable workspace snapshot with explicit recovery controls.",example:"pm workspace snapshot restore before-migration --dry-run"},{command:"workspace snapshot delete",parent:"workspace snapshot",action:"delete",slots:[s("target","string",!0)],accepted_flags:[],description:"Delete one workspace snapshot target.",example:"pm workspace snapshot delete before-migration"}],ve=[...h].sort((e,a)=>a.command.length-e.command.length),B=new Map([["append",[f,y]],["assurance",[s("action","action",!0),s("kind","string",!1),s("id","string",!1)]],["beads import",[s("file","string",!1)]],["changelog export",[s("file","string",!1)]],["claim",[A]],["close",[f,y]],["close-task",[f,s("reason","string",!1)]],["comments",[f,y]],["completion",[s("shell","string",!1)]],["config",[s("scope","string",!1,{polymorphic:!0}),s("action","action",!1),s("key","string",!1),s("value","string",!1,{polymorphic:!0})]],["copy",[f]],["create",[s("type-or-title","string",!1,{polymorphic:!0}),s("title","string",!1)]],["delete",[f]],["deps",[f]],["docs",[f]],["event",[s("title","string",!0)]],["files",[f]],["files discover",[f]],["files lookup",[s("paths","string",!0,{variadic:!0})]],["focus",[A]],["get",[f]],["graph",[s("subcommand","action",!0),A,s("target","item_id",!1)]],["guide",[s("topic","string",!1)]],["history",[f]],["history-compact",[A]],["history-redact",[f]],["history-repair",[A]],["init",[s("prefix-or-path","string",!1,{polymorphic:!0})]],["item complete",[f,s("reason","string",!1)]],["item reopen",[f,s("reason","string",!0)]],["learnings",[f,y]],["meet",[s("title","string",!0)]],["merge",[s("subcommand","action",!0),s("artifact","string",!1),s("base","string",!1),s("ours","string",!1),s("theirs","string",!1)]],["notes",[f,y]],["package",[s("target","string",!1,{polymorphic:!0})]],["package list",[]],["package inventory",[s("name","string",!1)]],["package scaffold",[s("target","string",!0)]],["package upgrade",[s("target","string",!1)]],["packages",[s("target","string",!1,{polymorphic:!0})]],["packages list",[]],["packages inventory",[s("name","string",!1)]],["packages scaffold",[s("target","string",!0)]],["packages upgrade",[s("target","string",!1)]],["pause-task",[f]],["plan",[s("subcommand","action",!0),s("id","item_id",!1,{polymorphic:!0}),s("step","string",!1),s("new-order","integer",!1)]],["profile",[s("subcommand","action",!0),s("name","string",!1)]],["release",[f]],["remind",[s("title","string",!0)]],["restore",[f,s("target","string",!0)]],["schema",[s("subcommand","action",!0),s("name","string",!1)]],["search-advanced",[s("keywords","string",!0,{variadic:!0})]],["search",[s("keywords","string",!0,{variadic:!0})]],["start-task",[f]],["templates save",[s("name","string",!0)]],["templates show",[s("name","string",!0)]],["telemetry",[s("namespace-or-subcommand","action",!1,{polymorphic:!0}),s("subcommand","action",!1)]],["test",[f]],["test-runs-worker",[s("runId","string",!0)]],["update",[f]],["workspace snapshot",[s("action","action",!0),s("target","string",!1)]],...["activate","adopt","deactivate","init","uninstall"].flatMap(e=>["extension","package","packages"].map(a=>[`${a} ${e}`,[s("target","string",!0)]])),...["describe"].flatMap(e=>["extension","package","packages"].map(a=>[`${a} ${e}`,[s("target","string",!1)]])),...["install"].flatMap(e=>["extension","package","packages"].map(a=>[`${a} ${e}`,[s("targets","string",!1,{variadic:!0})]])),["vcs abandon",[f]],["vcs create",[s("title","string",!0)]],["vcs merge",[f]],["vcs propose",[f]],["vcs ref-create",[s("name","string",!0)]],["vcs show",[f]]]);function v(e){return e.trim().toLowerCase().replace(/\s+/gu," ")}function Ya(e){let a=v(e),t=R.find(n=>n.command===a);if(t)return t;let l=z(a)?.canonical;if(l)return R.find(n=>n.command===l)}function he(e){let a=v(e);return ve.find(t=>t.command===a||a.startsWith(`${t.command} `))}function Ka(e){return`Applicable flags: ${e.length>0?e.join(", "):"none"}.`}function i(e,a,t,l,n){return n.map(o=>({command:o,noun:e,target:a,disposition:t,owner:l}))}var N=[...i("item","item","target_noun","pm-pbyu",["item","item complete","item mutate","item reopen"]),...i("item","item","consolidation","pm-yql1",["append","close-many","close-task","comments","copy","delete","deps","docs","files","learnings","notes","pause-task","start-task","test","update-many"]),...["claim","close","create","get","release","update"].map(e=>({command:e,noun:"item",target:e,disposition:"keep_as_is",owner:"pm-pbyu",reason:"Permanent high-frequency item operations retain concise root spellings under the accepted hot-path grammar policy."})),...i("item","item files","target_noun","pm-yql1",["files discover","files lookup","item files discover","item files lookup"]),...i("item","item test worker","consolidation","pm-lp4j",["test-runs-worker"]),...i("list","list","target_noun","pm-pfqi",["list"]),...i("list","list --group-by","consolidation","pm-xkgq",["aggregate"]),...i("context","context","target_noun","pm-pbyu",["context"]),...i("context","context","consolidation","pm-kcs4",["ctx","focus","next"]),...i("context","context next","consolidation","pm-kcs4",["ctx next"]),...i("context","context focus","consolidation","pm-kcs4",["ctx focus"]),...i("search","search","target_noun","pm-pbyu",["search"]),...i("search","search","package_owned","package:search-advanced",["reindex","search-advanced"]),...i("item","item duplicates","consolidation","pm-fmy9ih",["duplicates"]),...i("item","item duplicates","package_owned","pm-fmy9ih",["dedupe-audit","dedupe-merge","comments-audit"]),...i("graph","graph","target_noun","pm-pbyu",["graph"]),...i("history","history","target_noun","pm-pbyu",["history"]),...i("history","history attest","target_noun","pm-3z0k",["history attest"]),...i("history","history attest","consolidation","pm-3z0k",["history-attest"]),...$.flatMap(({alias:e,canonical:a})=>[...i("history",a,"target_noun","pm-tqel",[a]),...i("history",a,"consolidation","pm-tqel",[e])]),...i("history","history","consolidation","pm-tqel",["events","merge"]),...i("history","history acknowledge","consolidation","pm-djyvbk",["history-author-acknowledge"]),...i("history","history","package_owned","package:builtin-vcs-exemplar",["vcs abandon","vcs create","vcs log","vcs merge","vcs propose","vcs ref-create","vcs show"]),...i("workspace","workspace","target_noun","pm-pbyu",["workspace","workspace position","workspace snapshot","workspace snapshot create","workspace snapshot delete","workspace snapshot inspect","workspace snapshot list","workspace snapshot restore"]),...i("workspace","workspace init","consolidation","pm-npr3",["init"]),...i("package","package","target_noun","pm-pbyu",["package","package activate","package adopt","package adopt-all","package catalog","package deactivate","package describe","package doctor","package explore","package init","package install","package inventory","package list","package manage","package migrate","package reload","package scaffold","package uninstall","package upgrade"]),...i("package","package","consolidation","pm-tnud",["extension activate","extension adopt","extension adopt-all","extension catalog","extension deactivate","extension describe","extension doctor","extension explore","extension init","extension install","extension manage","extension migrate","extension reload","extension uninstall","packages","packages activate","packages adopt","packages adopt-all","packages catalog","packages deactivate","packages describe","packages doctor","packages explore","packages init","packages install","packages inventory","packages list","packages manage","packages migrate","packages reload","packages scaffold","packages uninstall","packages upgrade"]),...i("package","package","package_owned","package:beads",["beads import"]),...i("package","package","package_owned","package:pm-changelog",["changelog export","changelog generate"]),...i("package","package calendar","package_owned","pm-o3fh",["event","meet","remind"]),...i("ops","ops","target_noun","pm-6apl",["ops"]),...i("ops","ops normalize","package_owned","package:pm-governance-audit",["normalize"]),...i("ops","ops","consolidation","pm-6apl",["eval","gc","health","stats","telemetry","test-all","validate"]),...i("workspace","workspace","consolidation","pm-npr3",["config","profile","schema"]),...["assurance",...h.filter(({parent:e})=>e==="assurance").map(({command:e})=>e)].map(e=>({command:e,noun:"ops",target:e,disposition:"keep_as_is",owner:"pm-djyvbk",reason:"Assurance manages durable measurement, assertion, gate, and verdict data; retain its established domain surface independently of operational diagnostics."})),...i("plan","plan","target_noun","pm-pbyu",["plan"]),...i("plan","plan","target_noun","pm-2tan",h.filter(({parent:e})=>e==="plan").map(({command:e})=>e)),...i("contracts","contracts","target_noun","pm-pbyu",["contracts"]),...i("help","help","target_noun","pm-pbyu",["help"]),...i("workspace","templates","package_owned","package:builtin-templates",["templates","templates list","templates save","templates show"]),...i("help","help","package_owned","package:builtin-guide-shell",["completion","completion-statuses","completion-tags","completion-types","guide"])].flatMap(e=>{let a=U.find(l=>l.alias===e.command);if(!a)return[e];let t=F.find(l=>l===a.canonical_argv[0])??e.noun;return[{...e,noun:t,target:a.canonical,owner:a.owner},{...e,command:a.canonical,noun:t,target:a.canonical,owner:a.owner,disposition:e.disposition==="package_owned"?"package_owned":"target_noun"}]}),R=[...new Set(N.map(({command:e})=>e))].map(e=>({command:e,slots:he(e)?.slots??B.get(b(e))??[]})),w={nouns:F,shared_verbs:me,scope_before_verb:!0,visible_top_level_ceiling:69,ceiling_raise_requires_pm_item:!0,positional_shape_budget:21};function q(e,a){let t=new Set(a);return[...new Set(e)].filter(l=>!t.has(l)).map(l=>({code:"positional_signature_mismatch",command:l,detail:`Positional signature ${l} has no destination declaration.`}))}function Te(e){return e.map(({required:a,variadic:t,value_kind:l,polymorphic:n})=>`${a?"r":"o"}:${t?"v":"s"}:${l}:${n?"p":"m"}`).join("|")}function S(e){return e.map(({name:a,required:t,variadic:l,value_kind:n,polymorphic:o})=>`${a}:${t?"r":"o"}:${l?"v":"s"}:${n}:${o?"p":"m"}`).join("|")}function H(e,a){let t=new Map;for(let{command:l}of e){let n=v(l);t.set(n,(t.get(n)??0)+1)}return[...t.entries()].filter(([,l])=>l>1).map(([l,n])=>({code:"positional_signature_mismatch",command:l,detail:`${n} ${a} positional signatures exist for ${l}; exactly one is required.`}))}function Va(e,a={}){let t=a.declared??R,l=a.positionalShapeBudget??w.positional_shape_budget,n=new Map(t.map(r=>[v(r.command),r])),o=new Map(e.map(r=>[v(r.command),r])),c=[...H(t,"declared"),...H(e,"observed"),...a.declared===void 0?[...q(B.keys(),N.map(({command:r})=>r)),...q(h.map(({command:r})=>r),N.map(({command:r})=>r))]:[]];for(let r of n.values()){let d=v(r.command),g=o.get(d);g?S(g.slots)!==S(r.slots)&&c.push({code:"positional_signature_mismatch",command:r.command,detail:`Observed positional signature for ${r.command} differs from its declared SDK contract: observed=${S(g.slots)||"<none>"}; declared=${S(r.slots)||"<none>"}.`}):c.push({code:"missing_observed_signature",command:r.command,detail:`No observed positional signature exists for ${r.command}.`})}for(let r of o.values())n.has(v(r.command))||c.push({code:"stale_observed_signature",command:r.command,detail:`Observed positional signature ${r.command} has no declaration.`});let p=new Set(t.map(({slots:r})=>Te(r))).size;return p>l&&c.push({code:"positional_shape_budget_exceeded",command:"*",detail:`Distinct positional shape count ${p} exceeds budget ${l}.`}),c.sort((r,d)=>r.command!==d.command?r.command.localeCompare(d.command):r.code.localeCompare(d.code)),{ok:c.length===0,declared_command_count:t.length,observed_command_count:e.length,positional_shape_count:p,positional_shape_budget:l,findings:c}}function Ae(e,a,t){return e.flatMap(l=>{let n=a.get(l)??[];if(n.length===0){let c=l.indexOf(" "),p=c===-1?l:l.slice(0,c);return[{code:"missing_destination",spelling:l,message:`Command \`${l}\` has no destination census row.`,nearest_target:t.has(p)?p:`ops ${l}`}]}let o=n.length>1?[{code:"duplicate_destination",spelling:l,message:`Command \`${l}\` has ${n.length} destination rows.`,nearest_target:n[0].target}]:[];return n.reduce((c,p)=>(p.disposition==="keep_as_is"&&(p.reason?.trim().length??0)===0&&c.push({code:"missing_destination",spelling:l,message:`Command \`${l}\` is kept as-is without a documented reason.`,nearest_target:p.target}),t.has(p.noun)||c.push({code:"unknown_noun",spelling:l,message:`Command \`${l}\` names undeclared noun \`${p.noun}\`.`,nearest_target:p.target}),c),o)})}function ye(e,a){return a.filter(t=>t.disposition!=="package_owned"&&!e.has(t.command)).map(t=>({code:"stale_destination",spelling:t.command,message:`Destination row \`${t.command}\` is absent from live contracts.`,nearest_target:t.target}))}function ke(e,a){return e.filter(t=>!a.has(t.canonical)).map(t=>({code:"alias_target_missing",spelling:t.alias,message:`Alias \`${t.alias}\` targets missing canonical command \`${t.canonical}\`.`,nearest_target:t.canonical_argv.join(" ")}))}function Wa(e,a=[],t=N){let l=[...new Set(e.map(g=>g.trim()))].filter(g=>g.length>0).sort((g,u)=>g.localeCompare(u)),n=new Set(l),o=new Set(F),c=new Map;for(let g of t){let u=c.get(g.command)??[];u.push(g),c.set(g.command,u)}let p=[...Ae(l,c,o),...ye(n,t),...ke(a.filter(g=>n.has(g.alias)||!(c.get(g.canonical)??[]).some(u=>u.disposition==="package_owned")),n)],r=new Set(a.filter(g=>g.hidden).map(g=>g.alias)),d=new Set(l.filter(g=>!g.includes(" ")&&!r.has(g)&&!(c.get(g)??[]).some(u=>u.disposition==="package_owned"))).size;return d>w.visible_top_level_ceiling&&p.push({code:"visible_surface_ceiling_exceeded",spelling:String(d),message:`Visible non-package top-level command count ${d} exceeds ceiling ${w.visible_top_level_ceiling}.`,nearest_target:"Declare the noun placement and tracked waiver before raising the ceiling."}),{ok:p.length===0,command_count:l.length,destination_count:t.length,hidden_alias_count:a.filter(g=>g.hidden).length,visible_top_level_count:d,visible_top_level_ceiling:w.visible_top_level_ceiling,findings:p}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="4e1e3ef4-cdf3-5d4c-88fe-d23f6fc171d1")}catch{}})();function C(e){return[...new Set(Array.from(e,a=>a.trim()).filter(a=>a.length>0))]}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="4c3fb594-00bc-5625-aeaa-692e7ac01437")}catch{}})();function x(e){return e.startsWith("--")?`--${e.slice(2).replaceAll("_","-")}`:e}function G(e){let a=new Map;for(let t of e){let l=x(t.flag),n=a.get(l)??new Set;t.flag!==l&&n.add(t.flag);for(let o of t.aliases??[])o!==l&&n.add(o);a.set(l,n)}return e.map(t=>{let l=x(t.flag);if(t.flag!==l)return t;let n=C([...t.aliases??[],...a.get(l)]).filter(o=>o!==l);return n.length===0?t:{...t,aliases:n}})}function st(e){let a=G(e),t=new Set(a.map(l=>l.flag));return a.filter(l=>{let n=x(l.flag);return l.flag===n||!t.has(n)})}var P=D.map(e=>({flag:e.flag,reservation_scope:"inherited",...e.aliases?{aliases:[...e.aliases]}:{},...e.value_name?{value_name:e.value_name}:{}})),nt=[...P,{flag:"--version",value_type:"boolean",reservation_scope:"root_only"},{flag:"--all",value_type:"boolean",reservation_scope:"root_only",description:"Expand root help to every command."},{flag:"--explain",value_type:"boolean",reservation_scope:"root_only",description:"Expand root help with command guidance."}],Z=[{flag:"--filter-reviewer-missing"},{flag:"--filter-risk-missing"},{flag:"--filter-confidence-missing"},{flag:"--filter-sprint-missing"},{flag:"--filter-release-missing"},{flag:"--has-notes"},{flag:"--no-notes"},{flag:"--has-learnings"},{flag:"--no-learnings"},{flag:"--has-files"},{flag:"--no-files"},{flag:"--filter-files-missing"},{flag:"--has-docs"},{flag:"--no-docs"},{flag:"--filter-docs-missing"},{flag:"--has-tests"},{flag:"--no-tests"},{flag:"--has-comments"},{flag:"--no-comments"},{flag:"--has-deps"},{flag:"--no-deps"},{flag:"--has-body"},{flag:"--empty-body"},{flag:"--has-linked-command"},{flag:"--no-linked-command"}],J=[{flag:"--filter-reviewer-missing"},{flag:"--filter-risk-missing"},{flag:"--filter-confidence-missing"},{flag:"--filter-sprint-missing"},{flag:"--filter-release-missing"},{flag:"--filter-has-notes"},{flag:"--filter-no-notes"},{flag:"--filter-has-learnings"},{flag:"--filter-no-learnings"},{flag:"--filter-has-files"},{flag:"--filter-no-files"},{flag:"--filter-has-docs"},{flag:"--filter-no-docs"},{flag:"--filter-has-tests"},{flag:"--filter-no-tests"},{flag:"--filter-has-comments"},{flag:"--filter-no-comments"},{flag:"--filter-has-deps"},{flag:"--filter-no-deps"},{flag:"--filter-has-body"},{flag:"--filter-empty-body"},{flag:"--filter-has-linked-command"},{flag:"--filter-no-linked-command"},{flag:"--ids",list:!0},{flag:"--limit"},{flag:"--offset"}],I=M([{flag:"--for",value_name:"intent"},{flag:"--token-budget",aliases:["--token_budget"]},{flag:"--status",list:!0},{flag:"--all",value_type:"boolean"},{flag:"--type",list:!0},{flag:"--tag",aliases:["--tags"],list:!0},{flag:"--priority",list:!0},{flag:"--deadline-before"},{flag:"--deadline-after"},{flag:"--today"},{flag:"--recent"},{flag:"--updated-after"},{flag:"--updated-before"},{flag:"--created-after"},{flag:"--created-before"},{flag:"--ids",list:!0},{flag:"--assignee",list:!0},{flag:"--assignee-filter"},{flag:"--assignee_filter"},{flag:"--parent"},{flag:"--sprint",list:!0},{flag:"--release",list:!0},{flag:"--filter-ac-missing"},{flag:"--filter-estimates-missing",aliases:["--filter-estimate-missing"]},{flag:"--filter-resolution-missing"},{flag:"--filter-metadata-missing"},...Z,{flag:"--limit"},{flag:"--offset"},{flag:"--after"},{flag:"--no-truncate"},{flag:"--compact"},{flag:"--brief"},{flag:"--full"},{flag:"--fields",list:!0},{flag:"--sort"},{flag:"--order"},{flag:"--tree"},{flag:"--tree-depth"},{flag:"--tree_depth"},{flag:"--include-body"},{flag:"--strict-read"},{flag:"--format"},{flag:"--stream"}],new Set(["--limit","--token-budget","--offset","--after","--no-truncate","--compact","--brief","--full","--fields","--include-body","--strict-read"])),Ce=[{flag:"--group-by",list:!0},{flag:"--set-mode"},{flag:"--limit"},{flag:"--after"},{flag:"--count"},{flag:"--completion"},{flag:"--sum"},{flag:"--avg"},{flag:"--include-unparented"},{flag:"--include_unparented"},{flag:"--status",list:!0},{flag:"--type",list:!0},{flag:"--tag",list:!0},{flag:"--priority",list:!0},{flag:"--deadline-before"},{flag:"--deadline-after"},{flag:"--assignee",list:!0},{flag:"--assignee-filter"},{flag:"--assignee_filter"},{flag:"--parent"},{flag:"--sprint",list:!0},{flag:"--release",list:!0}],be=[{flag:"--id",value_name:"item-id"},{flag:"--add",aliases:["--comment","--body","--text"]},{flag:"--stdin"},{flag:"--file"},{flag:"--edit"},{flag:"--delete"},{flag:"--limit"},{flag:"--full-history"},{flag:"--if-absent",value_type:"boolean"},{flag:"--author"},{flag:"--message"},{flag:"--force"}];function M(e,a){return e.map(t=>a.has(t.flag)?{...t,cursor_semantics:"presentation"}:t)}var Se=[{flag:"--id",value_name:"item-id"},{flag:"--add",aliases:["--note","--text"]},{flag:"--add-json"},{flag:"--stdin"},{flag:"--file"},{flag:"--edit"},{flag:"--delete"},{flag:"--limit"},{flag:"--since"},{flag:"--event-type"},{flag:"--include-meta"},{flag:"--full-history"},{flag:"--if-absent",value_type:"boolean"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],we=[{flag:"--id",value_name:"item-id"},{flag:"--add",aliases:["--learning","--text"]},{flag:"--stdin"},{flag:"--file"},{flag:"--edit"},{flag:"--delete"},{flag:"--limit"},{flag:"--full-history"},{flag:"--if-absent",value_type:"boolean"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],Ne=[{flag:"--id",value_name:"item-id"},{flag:"--add"},{flag:"--add-glob"},{flag:"--remove"},{flag:"--migrate"},{flag:"--note"},{flag:"--list"},{flag:"--append-stable"},{flag:"--validate-paths"},{flag:"--scope"},{flag:"--limit"},{flag:"--offset"},{flag:"--no-truncate"},{flag:"--strict-read"},{flag:"--explain"},{flag:"--lines",value_name:"start:end"},{flag:"--decision-depth",value_name:"n",value_type:"number"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],Oe=[{flag:"--id",value_name:"item-id"},{flag:"--add"},{flag:"--add-glob"},{flag:"--remove"},{flag:"--migrate"},{flag:"--note"},{flag:"--list"},{flag:"--validate-paths"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],xe=[{flag:"--id",value_name:"item-id"},{flag:"--limit"},{flag:"--compact"},{flag:"--full"},{flag:"--provenance"},{flag:"--provenance-summary"},{flag:"--harness",repeatable:!0},{flag:"--agent-instance",repeatable:!0},{flag:"--provenance-filter",repeatable:!0},{flag:"--diff"},{flag:"--field"},{flag:"--verify"},{flag:"--strict-exit"},{flag:"--fail-on-warn"},{flag:"--format"}],Le=[{flag:"--dry-run"},{flag:"--message"},{flag:"--force"},{flag:"--include-reconciled"},{flag:"--output"},{flag:"--item-path"},{flag:"--prefer"}],Ee=[{flag:"--id",value_name:"item-id"},{flag:"--literal"},{flag:"--regex"},{flag:"--replacement"},{flag:"--dry-run"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],Re=[{flag:"--id",value_name:"item-id"},{flag:"--all"},{flag:"--dry-run"},{flag:"--normalize-provenance"},{flag:"--salvage-tail",value_type:"boolean"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],Fe=[{flag:"--event",repeatable:!0},{flag:"--all-actionable"},{flag:"--dry-run"},{flag:"--plan-fingerprint"},{flag:"--limit",value_type:"number"},{flag:"--attributed-author",aliases:["--attributed_author"]},{flag:"--reviewer"},{flag:"--reason"}],Ie=[{flag:"--id",value_name:"item-id"},{flag:"--before"},{flag:"--ids",list:!0},{flag:"--all-over",value_type:"number"},{flag:"--closed"},{flag:"--all-streams"},{flag:"--min-entries",value_type:"number"},{flag:"--dry-run"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],Ge=[{flag:"--verify",value_name:"file",value_type:"string"},{flag:"--output",value_name:"file",value_type:"string"},{flag:"--hash-algorithm",value_name:"name",value_type:"string"}],Pe=[{flag:"--definition",value_name:"json"},{flag:"--policy",value_name:"id"},{flag:"--message",value_name:"value"},{flag:"--description"},{flag:"--default-status",aliases:["--default_status"]},{flag:"--folder"},{flag:"--alias"},{flag:"--role"},{flag:"--order"},{flag:"--type"},{flag:"--commands"},{flag:"--cli-flag"},{flag:"--required"},{flag:"--required-on-create"},{flag:"--no-allow-unset"},{flag:"--required-types"},{flag:"--infer"},{flag:"--min-count"},{flag:"--apply",value_type:"boolean"},{flag:"--to"},{flag:"--migration-id",aliases:["--migration_id"]},{flag:"--dry-run"},{flag:"--author"},{flag:"--force"}],Me=[{flag:"--dry-run"},{flag:"--author"},{flag:"--force"}],ee=[{flag:"--title"},{flag:"--description"},{flag:"--scope"},{flag:"--parent"},{flag:"--related"},{flag:"--blocks"},{flag:"--blocked-by",aliases:["--blocked_by"]},{flag:"--harness"},{flag:"--mode"},{flag:"--resume-context",aliases:["--resume_context"]},{flag:"--tags",aliases:["--tag"],list:!0},{flag:"--priority"},{flag:"--status",short:"-s"},{flag:"--create-mode",aliases:["--create_mode"]},{flag:"--deadline"},{flag:"--estimate",aliases:["--estimated-minutes","--estimated_minutes"]},{flag:"--acceptance-criteria",aliases:["--acceptance_criteria","--ac"],repeatable:!0},{flag:"--definition-of-ready",aliases:["--definition_of_ready"]},{flag:"--order"},{flag:"--rank"},{flag:"--goal"},{flag:"--objective"},{flag:"--value"},{flag:"--impact"},{flag:"--outcome"},{flag:"--why-now",aliases:["--why_now"]},{flag:"--assignee"},{flag:"--reviewer"},{flag:"--risk"},{flag:"--confidence"},{flag:"--sprint"},{flag:"--release"},{flag:"--blocked-reason",aliases:["--blocked_reason"]},{flag:"--unblock-note",aliases:["--unblock_note"]},{flag:"--reporter"},{flag:"--severity"},{flag:"--environment"},{flag:"--repro-steps",aliases:["--repro_steps"]},{flag:"--resolution"},{flag:"--expected-result",aliases:["--expected_result","--expected"]},{flag:"--actual-result",aliases:["--actual_result","--actual"]},{flag:"--affected-version",aliases:["--affected_version"]},{flag:"--fixed-version",aliases:["--fixed_version"]},{flag:"--component"},{flag:"--regression"},{flag:"--customer-impact",aliases:["--customer_impact"]},{flag:"--comment",repeatable:!0},{flag:"--note",repeatable:!0},{flag:"--learning",repeatable:!0},{flag:"--reminder",repeatable:!0},{flag:"--event",repeatable:!0},{flag:"--type-option",aliases:["--type_option"],repeatable:!0},{flag:"--body"},{flag:"--claim"},{flag:"--from-search",aliases:["--from_search"]},{flag:"--template"},{flag:"--step-title",aliases:["--step_title"]},{flag:"--step"},{flag:"--step-body",aliases:["--step_body"]},{flag:"--step-owner",aliases:["--step_owner"]},{flag:"--step-status",aliases:["--step_status"]},{flag:"--step-evidence",aliases:["--step_evidence"]},{flag:"--step-blocked-reason",aliases:["--step_blocked_reason"]},{flag:"--step-replacement",aliases:["--step_replacement"]},{flag:"--depends-on",aliases:["--depends_on"]},{flag:"--link"},{flag:"--link-kind",aliases:["--link_kind"]},{flag:"--link-note",aliases:["--link_note"]},{flag:"--promote-to-item-dep",aliases:["--promote_to_item_dep"]},{flag:"--allow-multiple-active",aliases:["--allow_multiple_active"]},{flag:"--file"},{flag:"--test"},{flag:"--doc"},{flag:"--decision-text",aliases:["--decision_text","--decision"]},{flag:"--decision-rationale",aliases:["--decision_rationale"]},{flag:"--decision-evidence",aliases:["--decision_evidence"]},{flag:"--discovery-text",aliases:["--discovery_text","--discovery"]},{flag:"--validation-text",aliases:["--validation_text","--validation"]},{flag:"--validation-command",aliases:["--validation_command"]},{flag:"--validation-expected",aliases:["--validation_expected"]},{flag:"--depth"},{flag:"--field"},{flag:"--fields",list:!0},{flag:"--steps"},{flag:"--materialize-type",aliases:["--materialize_type"]},{flag:"--materialize-parent",aliases:["--materialize_parent"]},{flag:"--materialize-tags",aliases:["--materialize_tags"]},{flag:"--author"},{flag:"--message"},{flag:"--force"}],De=[{flag:"--id-prefix",aliases:["--prefix"]},{flag:"--preset"},{flag:"--type-preset"},{flag:"--defaults",short:"-y",aliases:["--yes"]},{flag:"--author"},{flag:"--agent-guidance"},{flag:"--with-packages"},{flag:"--no-merge-fence"},{flag:"--workspace"},{flag:"--force"},{flag:"--verbose"}],$e=[{flag:"--value",value_name:"value"},{flag:"--criterion"},{flag:"--clear-criteria"},{flag:"--format"},{flag:"--policy"},{flag:"--default-depth"},{flag:"--activity-limit"},{flag:"--stale-threshold-days"},{flag:"--section-hierarchy"},{flag:"--section-activity"},{flag:"--section-progress"},{flag:"--section-blockers"},{flag:"--section-files"},{flag:"--section-workload"},{flag:"--section-staleness"},{flag:"--section-tests"}],ae=[{flag:"--dry-run"},{flag:"--init"},{flag:"--scaffold"},{flag:"--capability"},{flag:"--install"},{flag:"--uninstall"},{flag:"--explore"},{flag:"--list"},{flag:"--manage"},{flag:"--describe"},{flag:"--markdown"},{flag:"--output"},{flag:"--reload"},{flag:"--watch"},{flag:"--doctor"},{flag:"--catalog"},{flag:"--adopt"},{flag:"--adopt-all"},{flag:"--activate"},{flag:"--deactivate"},{flag:"--project"},{flag:"--local"},{flag:"--global"},{flag:"--gh"},{flag:"--github"},{flag:"--ref"},{flag:"--detail"},{flag:"--trace"},{flag:"--runtime-probe"},{flag:"--fix-managed-state"},{flag:"--isolated"},{flag:"--ignore-global"},{flag:"--strict-exit"},{flag:"--fail-on-warn"}],m=[{flag:"--project"},{flag:"--local"},{flag:"--global"}],te=[...m,{flag:"--capability"}],Y=[...ae,{flag:"--declarative"}],Ue=[...te,{flag:"--declarative"}],ze=[{flag:"--dry-run"},{flag:"--project"},{flag:"--local"},{flag:"--global"},{flag:"--gh"},{flag:"--github"},{flag:"--ref"}],Xe=m,je=m,qe=[...m,{flag:"--markdown"},{flag:"--output"}],He=m,Be=m,Ye=m,Ke=[...m,{flag:"--dry-run"}],Ve=[...m,{flag:"--runtime-probe"},{flag:"--fix-managed-state"}],We=[...m,{flag:"--watch"}],Qe=[...m,{flag:"--detail"},{flag:"--trace"},{flag:"--fix-managed-state"},{flag:"--isolated"},{flag:"--ignore-global"},{flag:"--strict-exit"},{flag:"--fail-on-warn"}],K=[...m,{flag:"--fields",list:!0}],Ze=[...m,{flag:"--gh"},{flag:"--github"},{flag:"--ref"}],Je=[{flag:"--dry-run"},{flag:"--project"},{flag:"--local"},{flag:"--global"},{flag:"--gh"},{flag:"--github"},{flag:"--ref"}],le=[{flag:"--dry-run"},{flag:"--cli-only"},{flag:"--packages-only"},{flag:"--project"},{flag:"--local"},{flag:"--global"},{flag:"--repair"},{flag:"--tag"},{flag:"--package-name"}],it=[{flag:"--mode"},{flag:"--progress"}],ea=[{flag:"--release-assignment",value_type:"boolean"},{flag:"--id",value_name:"item-id"},{flag:"--reason",value_name:"value"},{flag:"--close-reason",value_name:"value"},{flag:"--completed-at",value_name:"value"},{flag:"--duplicate-of",value_name:"value"},{flag:"--author",value_name:"value"},{flag:"--message",value_name:"value"},{flag:"--validate-close",value_name:"off|warn|strict"},{flag:"--resolution",value_name:"value"},{flag:"--expected-result",aliases:["--expected_result","--expected"],value_name:"value"},{flag:"--actual-result",aliases:["--actual_result","--actual"],value_name:"value"},{flag:"--force",value_type:"boolean"}],aa=[{flag:"--filter-status",list:!0},{flag:"--filter-type"},{flag:"--filter-tag"},{flag:"--filter-priority"},{flag:"--filter-deadline-before"},{flag:"--filter-deadline-after"},{flag:"--filter-updated-after"},{flag:"--filter-updated-before"},{flag:"--filter-created-after"},{flag:"--filter-created-before"},{flag:"--filter-assignee"},{flag:"--filter-assignee-filter"},{flag:"--filter-assignee_filter"},{flag:"--filter-parent"},{flag:"--filter-sprint"},{flag:"--filter-release"},...J,{flag:"--reason"},{flag:"--completed-at"},{flag:"--resolution"},{flag:"--expected-result",aliases:["--expected_result","--expected"]},{flag:"--actual-result",aliases:["--actual_result","--actual"]},{flag:"--validate-close"},{flag:"--author"},{flag:"--message"},{flag:"--force"},{flag:"--dry-run"},{flag:"--rollback"},{flag:"--no-checkpoint"}],ta=[{flag:"--id",value_name:"item-id"},{flag:"--body",short:"-b"},{flag:"--text"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],la=[{flag:"--start",value_type:"boolean"},{flag:"--id",value_name:"item-id"},{flag:"--author",aliases:["--assignee"]},{flag:"--message"},{flag:"--force"},{flag:"--if-available"},{flag:"--next"},{flag:"--type"},{flag:"--tag"},{flag:"--priority"},{flag:"--assignee-filter"},{flag:"--parent"},{flag:"--sprint"},{flag:"--release"},{flag:"--max-attempts"},{flag:"--include-decisions"},{flag:"--include-gates"},{flag:"--include-containers"},{flag:"--token-budget",aliases:["--token_budget"]},{flag:"--explain-ranking",aliases:["--explain_ranking"]}],sa=[{flag:"--id",value_name:"item-id"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],na=[{flag:"--id",value_name:"item-id"},{flag:"--dry-run"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],ia=[{flag:"--pause",value_type:"boolean"},{flag:"--id",value_name:"item-id"},{flag:"--author",aliases:["--assignee"]},{flag:"--message"},{flag:"--force"}],oa=[{flag:"--id",value_name:"item-id"},{flag:"--author",aliases:["--assignee"]},{flag:"--message"},{flag:"--force"}],ra=[{flag:"--id",value_name:"item-id"},{flag:"--author",aliases:["--assignee"]},{flag:"--message"},{flag:"--force"}],ga=[{flag:"--id",value_name:"item-id"},{flag:"--author",aliases:["--assignee"]},{flag:"--message"},{flag:"--validate-close",value_name:"off|warn|strict"},{flag:"--force"}],se=[{flag:"--parent"},{flag:"--allow-missing-parent"},{flag:"--tags"},{flag:"--priority"},{flag:"--body"},{flag:"--description"},{flag:"--author"},{flag:"--message"}],ne=[{flag:"--start"},{flag:"--duration"},{flag:"--end"},{flag:"--location"},{flag:"--timezone"},{flag:"--all-day"},...se],fa=ne,ca=[{flag:"--at"},{flag:"--text"},...se],pa=[{flag:"--list"},{flag:"--id",value_name:"item-id"},{flag:"--add"},{flag:"--add-json"},{flag:"--remove"},{flag:"--remove-index",repeatable:!0},{flag:"--run"},{flag:"--match"},{flag:"--only-index"},{flag:"--only-last"},{flag:"--background"},{flag:"--timeout"},{flag:"--progress"},{flag:"--env-set"},{flag:"--env-clear"},{flag:"--shared-host-safe"},{flag:"--pm-context"},{flag:"--override-linked-pm-context"},{flag:"--workspace-context"},{flag:"--override-linked-workspace-context"},{flag:"--allow-untrusted-linked-tests"},{flag:"--acknowledge-linked-tests"},{flag:"--fail-on-context-mismatch"},{flag:"--fail-on-skipped"},{flag:"--fail-on-empty-test-run"},{flag:"--require-assertions-for-pm"},{flag:"--check-context"},{flag:"--auto-pm-context"},{flag:"--measure",list:!0},{flag:"--metric-below"},{flag:"--metric-diff"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],da=[{flag:"--status"},{flag:"--limit"},{flag:"--offset"},{flag:"--background"},{flag:"--timeout"},{flag:"--progress"},{flag:"--env-set"},{flag:"--env-clear"},{flag:"--shared-host-safe"},{flag:"--pm-context"},{flag:"--override-linked-pm-context"},{flag:"--workspace-context"},{flag:"--override-linked-workspace-context"},{flag:"--allow-untrusted-linked-tests"},{flag:"--fail-on-context-mismatch"},{flag:"--fail-on-skipped"},{flag:"--fail-on-empty-test-run"},{flag:"--require-assertions-for-pm"},{flag:"--check-context"},{flag:"--auto-pm-context"}],ma=[{flag:"--limit"}],ot=[{flag:"--status"},{flag:"--limit"},{flag:"--stream"},{flag:"--tail"},{flag:"--force"},{flag:"--author"}],ua=[{flag:"--dry-run"},{flag:"--scope"}],_a=[{flag:"--include-empty"},{flag:"--storage"},{flag:"--metadata-coverage"},{flag:"--field-utilization"},{flag:"--by-assignee"},{flag:"--by-tag"},{flag:"--by-priority"},{flag:"--tag-prefix"},{flag:"--analytics"}],va=[{flag:"--exhaustive",value_type:"boolean"},{flag:"--status",repeatable:!0,list:!0},{flag:"--since"},{flag:"--threshold"},{flag:"--limit"}],ha=[{flag:"--strict-directories"},{flag:"--require-merge-drivers"},{flag:"--strict-exit"},{flag:"--fail-on-warn"},{flag:"--check-only"},{flag:"--check-telemetry"},{flag:"--no-refresh"},{flag:"--refresh-vectors"},{flag:"--verbose-stale-items"},{flag:"--verbose-author-events"},{flag:"--brief"},{flag:"--summary"},{flag:"--skip-vectors"},{flag:"--skip-integrity"},{flag:"--skip-drift"},{flag:"--full"}],Ta=[{flag:"--check-completeness",value_type:"boolean"},{flag:"--check-metadata"},{flag:"--metadata-profile"},{flag:"--check-resolution"},{flag:"--check-lifecycle"},{flag:"--check-stale-blockers"},{flag:"--dependency-cycle-severity"},{flag:"--parent-cycle-severity"},{flag:"--check-files"},{flag:"--scan-mode"},{flag:"--include-pm-internals"},{flag:"--verbose-file-lists"},{flag:"--verbose-diagnostics"},{flag:"--all-affected-ids"},{flag:"--strict-exit"},{flag:"--fail-on-warn"},{flag:"--fix-hints"},{flag:"--auto-fix"},{flag:"--dry-run"},{flag:"--fix-scope"},{flag:"--prune-missing"},{flag:"--check-history-drift"},{flag:"--check-command-references"},{flag:"--check-storage-integrity"},{flag:"--counts"},{flag:"--full"}],ie=[{flag:"--definition",value_name:"json"},{flag:"--trigger",value_name:"value"},{flag:"--tree",value_name:"value"},{flag:"--gate",value_name:"id"},{flag:"--limit",value_name:"number"},{flag:"--dry-run"},{flag:"--author",value_name:"value"},{flag:"--message",value_name:"value"},{flag:"--owner",value_name:"item-id"},{flag:"--apply",value_type:"boolean"},{flag:"--enforcement",value_name:"level"}],oe=[{flag:"--assignee"},{flag:"--parent"},{flag:"--allow-missing-parent"},{flag:"--allow-unresolved-deps"},{flag:"--reviewer"},{flag:"--risk"},{flag:"--confidence"},{flag:"--sprint"},{flag:"--release"},{flag:"--blocked-by"},{flag:"--blocked-reason"},{flag:"--unblock-note"},{flag:"--reporter"},{flag:"--severity"},{flag:"--environment"},{flag:"--repro-steps"},{flag:"--resolution"},{flag:"--expected-result"},{flag:"--actual-result"},{flag:"--affected-version"},{flag:"--fixed-version"}],re=[{flag:"--component"},{flag:"--regression"},{flag:"--customer-impact"},{flag:"--customer_impact"},{flag:"--definition-of-ready"},{flag:"--definition_of_ready"},{flag:"--order"},{flag:"--rank"},{flag:"--goal"},{flag:"--objective"},{flag:"--value"},{flag:"--impact"},{flag:"--outcome"},{flag:"--why-now"},{flag:"--why_now"}],ge=[{short:"-p",flag:"--priority"},{flag:"--type"},{flag:"--tags",aliases:["--tag"],list:!0},{flag:"--add-tags",aliases:["--add_tags"]},{flag:"--remove-tags",aliases:["--remove_tags"]},{flag:"--deadline"},{flag:"--estimate"},{flag:"--estimated-minutes"},{flag:"--estimated_minutes"},{flag:"--acceptance-criteria"},{flag:"--acceptance_criteria"},{flag:"--ac"},{flag:"--add-ac",aliases:["--add_ac"]},{flag:"--remove-ac",aliases:["--remove_ac"]}],V=[{flag:"--stdin-json"},{short:"-t",flag:"--title"},{flag:"--id"},{short:"-d",flag:"--description"},{flag:"--type"},{flag:"--template"},{flag:"--create-mode"},{flag:"--create_mode"},{flag:"--schedule-preset"},{flag:"--schedule_preset"},{short:"-s",flag:"--status"},{flag:"--close-reason"},{flag:"--close_reason"},{flag:"--completed-at"},{flag:"--completed_at"},{short:"-p",flag:"--priority"},{flag:"--tags",aliases:["--tag"],list:!0},{flag:"--add-tags",aliases:["--add_tags"]},{short:"-b",flag:"--body"},{flag:"--body-file"},{flag:"--deadline"},{flag:"--estimate"},{flag:"--estimated-minutes"},{flag:"--estimated_minutes"},{flag:"--acceptance-criteria"},{flag:"--acceptance_criteria"},{flag:"--ac"},{flag:"--author"},{flag:"--message"},...oe,...re,{flag:"--blocked_by"},{flag:"--blocked_reason"},{flag:"--unblock_note"},{flag:"--repro_steps"},{flag:"--expected_result"},{flag:"--actual_result"},{flag:"--expected"},{flag:"--actual"},{flag:"--affected_version"},{flag:"--fixed_version"},{flag:"--dep"},{flag:"--type-option"},{flag:"--type_option"},{flag:"--field"},{flag:"--reminder"},{flag:"--event"},{flag:"--comment"},{flag:"--note"},{flag:"--learning"},{flag:"--file",aliases:["--linked-file"]},{flag:"--test",aliases:["--linked-test"]},{flag:"--doc"},{flag:"--unset"},{flag:"--clear-deps"},{flag:"--clear-comments"},{flag:"--clear-notes"},{flag:"--clear-learnings"},{flag:"--clear-files"},{flag:"--clear-tests"},{flag:"--clear-docs"},{flag:"--clear-reminders"},{flag:"--clear-events"},{flag:"--clear-type-options"},{flag:"--allow-duplicate",value_type:"boolean"}],Aa=[{flag:"--transaction-id",value_name:"value"},{flag:"--stdin-json"},{flag:"--dry-run"},{flag:"--create-compensation",value_name:"mode"},{flag:"--lock-ttl-seconds",value_name:"n"},{flag:"--lock-wait-ms",value_name:"n"},{flag:"--author",value_name:"value"}],ya=[{flag:"--id",value_name:"item-id"},{flag:"--transaction-id",value_name:"value",required:!0},{flag:"--reason",value_name:"value"},{flag:"--file",value_name:"value",repeatable:!0},{flag:"--doc",value_name:"value",repeatable:!0},{flag:"--test",value_name:"value",repeatable:!0},{flag:"--comment",value_name:"value",repeatable:!0},{flag:"--note",value_name:"value",repeatable:!0},{flag:"--learning",value_name:"value",repeatable:!0},{flag:"--resolution",value_name:"value"},{flag:"--expected-result",value_name:"value"},{flag:"--actual-result",value_name:"value"},{flag:"--completed-at",value_name:"value"},{flag:"--validate-close",value_name:"off|warn|strict"},{flag:"--lock-ttl-seconds",value_name:"n"},{flag:"--lock-wait-ms",value_name:"n"},{flag:"--dry-run"},{flag:"--force"},{flag:"--author",value_name:"value"}],ka=[{flag:"--id",value_name:"item-id"},{flag:"--status",value_name:"open|in_progress"},{flag:"--message",value_name:"value"},{flag:"--force"},{flag:"--author",value_name:"value"}],Ca=[{flag:"--id",value_name:"item-id"},{flag:"--title",value_name:"value"},{flag:"--author",value_name:"value"},{flag:"--message",value_name:"value"},{flag:"--allow-duplicate",value_type:"boolean"}],ba=[{flag:"--id",value_name:"item-id"},{flag:"--clear"}],Sa=[{flag:"--id",value_name:"item-id"},{flag:"--stdin-json"},{short:"-t",flag:"--title"},{short:"-d",flag:"--description"},{short:"-b",flag:"--body"},{flag:"--body-file"},{short:"-s",flag:"--status"},{flag:"--close-reason"},{flag:"--close_reason"},{flag:"--completed-at"},...ge,...oe,{flag:"--fixed_version"},...re,{flag:"--author"},{flag:"--message"},{flag:"--blocked_by"},{flag:"--blocked_reason"},{flag:"--unblock_note"},{flag:"--repro_steps"},{flag:"--expected_result"},{flag:"--actual_result"},{flag:"--expected"},{flag:"--actual"},{flag:"--affected_version"},{flag:"--dep"},{flag:"--dep-remove"},{flag:"--dep_remove"},{flag:"--replace-deps"},{flag:"--replace-tests"},{flag:"--replace-files"},{flag:"--replace-docs"},{flag:"--comment"},{flag:"--note"},{flag:"--learning"},{flag:"--file",aliases:["--linked-file"]},{flag:"--test",aliases:["--linked-test"]},{flag:"--doc"},{flag:"--reminder"},{flag:"--event"},{flag:"--type-option"},{flag:"--type_option"},{flag:"--field"},{flag:"--unset"},{flag:"--clear-deps"},{flag:"--clear-comments"},{flag:"--clear-notes"},{flag:"--clear-learnings"},{flag:"--clear-files"},{flag:"--clear-tests"},{flag:"--clear-docs"},{flag:"--clear-reminders"},{flag:"--clear-events"},{flag:"--clear-type-options"},{flag:"--force"}],wa=[{flag:"--status",short:"-s"},{flag:"--assignee"},{flag:"--parent"},{flag:"--blocked-by",aliases:["--blocked_by"]},{flag:"--blocked-reason",aliases:["--blocked_reason"]},{flag:"--unblock-note",aliases:["--unblock_note"]},{flag:"--filter-status",list:!0},{flag:"--filter-type",list:!0},{flag:"--filter-tag",list:!0},{flag:"--filter-priority",list:!0},{flag:"--filter-deadline-before"},{flag:"--filter-deadline-after"},{flag:"--filter-updated-after"},{flag:"--filter-updated-before"},{flag:"--filter-created-after"},{flag:"--filter-created-before"},{flag:"--filter-assignee",list:!0},{flag:"--filter-assignee-filter"},{flag:"--filter-assignee_filter"},{flag:"--filter-parent"},{flag:"--filter-sprint",list:!0},{flag:"--filter-release",list:!0},{flag:"--filter-ac-missing"},{flag:"--filter-estimates-missing",aliases:["--filter-estimate-missing"]},{flag:"--filter-resolution-missing"},{flag:"--filter-metadata-missing"},...J,{flag:"--dry-run"},{flag:"--rollback"},{flag:"--no-checkpoint"},{short:"-t",flag:"--title"},{short:"-d",flag:"--description"},{short:"-b",flag:"--body"},...ge,{flag:"--definition-of-ready"},{flag:"--definition_of_ready"},{flag:"--order"},{flag:"--rank"},{flag:"--goal"},{flag:"--objective"},{flag:"--value"},{flag:"--impact"},{flag:"--outcome"},{flag:"--why-now"},{flag:"--why_now"},{flag:"--reviewer"},{flag:"--risk"},{flag:"--confidence"},{flag:"--sprint"},{flag:"--release"},{flag:"--reporter"},{flag:"--severity"},{flag:"--environment"},{flag:"--repro-steps"},{flag:"--repro_steps"},{flag:"--resolution"},{flag:"--expected-result"},{flag:"--expected_result"},{flag:"--expected"},{flag:"--actual-result"},{flag:"--actual_result"},{flag:"--actual"},{flag:"--affected-version"},{flag:"--affected_version"},{flag:"--fixed-version"},{flag:"--fixed_version"},{flag:"--component"},{flag:"--regression"},{flag:"--customer-impact"},{flag:"--customer_impact"},{flag:"--allow-unresolved-deps"},{flag:"--dep"},{flag:"--dep-remove"},{flag:"--dep_remove"},{flag:"--replace-deps"},{flag:"--replace-tests"},{flag:"--replace-files"},{flag:"--replace-docs"},{flag:"--comment"},{flag:"--note"},{flag:"--learning"},{flag:"--file"},{flag:"--test"},{flag:"--doc"},{flag:"--reminder"},{flag:"--event"},{flag:"--type-option"},{flag:"--type_option"},{flag:"--unset"},{flag:"--clear-deps"},{flag:"--clear-comments"},{flag:"--clear-notes"},{flag:"--clear-learnings"},{flag:"--clear-files"},{flag:"--clear-tests"},{flag:"--clear-docs"},{flag:"--clear-reminders"},{flag:"--clear-events"},{flag:"--clear-type-options"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],W=[{flag:"--view"},{flag:"--date"},{flag:"--from"},{flag:"--to"},{flag:"--past"},{flag:"--full-period"},{flag:"--full_period"},{flag:"--type"},{flag:"--tag"},{flag:"--priority"},{flag:"--status"},{flag:"--assignee"},{flag:"--assignee-filter"},{flag:"--assignee_filter"},{flag:"--sprint"},{flag:"--release"},{flag:"--include"},{flag:"--recurrence-lookahead-days"},{flag:"--recurrence-lookback-days"},{flag:"--occurrence-limit"},{flag:"--limit"},{flag:"--format"}],Na=[{flag:"--id"},{flag:"--op"},{flag:"--author"},{flag:"--from"},{flag:"--to"},{flag:"--limit"},{flag:"--unbounded"},{flag:"--compact"},{flag:"--raw"},{flag:"--full"},{flag:"--provenance"},{flag:"--provenance-summary"},{flag:"--harness",repeatable:!0},{flag:"--agent-instance",repeatable:!0},{flag:"--provenance-filter",repeatable:!0},{flag:"--stream"}],Oa=[{flag:"--since"},{flag:"--type",repeatable:!0},{flag:"--author",repeatable:!0},{flag:"--item",repeatable:!0},{flag:"--limit",value_type:"number"},{flag:"--cursor-mode",value_name:"batch|row"},{flag:"--full"},{flag:"--provenance"},{flag:"--provenance-summary"},{flag:"--harness",repeatable:!0},{flag:"--agent-instance",repeatable:!0},{flag:"--provenance-filter",repeatable:!0},{flag:"--follow"},{flag:"--interval-ms",value_type:"number"}],Q=M([{flag:"--for",value_name:"intent"},{flag:"--date"},{flag:"--from"},{flag:"--to"},{flag:"--past"},{flag:"--type"},{flag:"--tag"},{flag:"--priority"},{flag:"--assignee"},{flag:"--assignee-filter"},{flag:"--assignee_filter"},{flag:"--sprint"},{flag:"--release"},{flag:"--parent"},{flag:"--limit",aliases:["--max-items"]},{flag:"--after"},{flag:"--format"},{flag:"--depth"},{flag:"--fields",list:!0},{flag:"--section"},{flag:"--activity-limit"},{flag:"--stale-threshold"},{flag:"--explain-ranking"},{flag:"--explain_ranking"},{flag:"--token-budget",aliases:["--token_budget"]},{flag:"--no-extension-health"},{flag:"--no-tags"}],new Set(["--limit","--after","--format","--fields","--section","--activity-limit","--stale-threshold","--explain-ranking","--explain_ranking","--no-extension-health","--no-tags"])),xa=[{flag:"--id",value_name:"item-id"},{flag:"--for",value_name:"intent"},{flag:"--token-budget",aliases:["--token_budget"]},{flag:"--depth"},{flag:"--full",value_type:"boolean"},{flag:"--fields",list:!0},{flag:"--at"},{flag:"--tree"},{flag:"--tree-depth"},{flag:"--tree_depth"},{flag:"--format"}],La=[{flag:"--list"},{flag:"--format"},{flag:"--depth"}],Ea=[{flag:"--id",value_name:"item-id"},{flag:"--format"},{flag:"--max-depth"},{flag:"--collapse"},{flag:"--summary"},{flag:"--full"},{flag:"--node-limit"},{flag:"--edge-limit"},{flag:"--token-budget"},{flag:"--cursor"},{flag:"--direction"},{flag:"--kind",list:!0}],Ra=[{flag:"--kind",list:!0},{flag:"--max-depth",description:`Maximum traversal depth; paths default to ${T.path_depth}.`},{flag:"--limit",description:`Maximum rows per collection; default ${T.rows}. Use --full to remove the row cap.`},{flag:"--after"},{flag:"--direction"},{flag:"--max-paths",description:`Maximum enumerated paths; default ${T.paths}.`},{flag:"--sample",description:`Maximum evidence examples per audit finding; default ${T.samples}.`},{flag:"--exempt-isolate",list:!0},{flag:"--exempt-isolate-type",list:!0},{flag:"--save-baseline"},{flag:"--rebuild"},{flag:"--clear"},{flag:"--summary"},{flag:"--full"}],Fa=[{flag:"--mode"},{flag:"--k"},{flag:"--fail-under"},{flag:"--queries"},{flag:"--format"}],_=[{flag:"--dry-run"},{flag:"--force"},{flag:"--author"},{flag:"--message"}],fe=[],Ia=[{flag:"--include-decisions"},{flag:"--include-gates"},{flag:"--include-containers"},{flag:"--for",value_name:"intent"},{flag:"--type"},{flag:"--tag"},{flag:"--priority"},{flag:"--assignee"},{flag:"--assignee-filter"},{flag:"--assignee_filter"},{flag:"--sprint"},{flag:"--release"},{flag:"--parent"},{flag:"--limit"},{flag:"--blocked-limit"},{flag:"--blocked_limit"},{flag:"--ready-only"},{flag:"--ready_only"},{flag:"--format"},{flag:"--explain-ranking"},{flag:"--explain_ranking"},{flag:"--token-budget",aliases:["--token_budget"]}],Ga=M([{flag:"--for",value_name:"intent"},{flag:"--token-budget",aliases:["--token_budget"]},{flag:"--mode"},{flag:"--semantic"},{flag:"--hybrid"},{flag:"--match-mode"},{flag:"--min-score"},{flag:"--count"},{flag:"--semantic-weight"},{flag:"--include-linked"},{flag:"--title-exact"},{flag:"--phrase-exact"},{flag:"--highlight"},{flag:"--compact"},{flag:"--full"},{flag:"--fields",list:!0},{flag:"--format"},{flag:"--limit"},{flag:"--after"},{flag:"--status",list:!0},{flag:"--type",list:!0},{flag:"--tag",aliases:["--tags"],list:!0},{flag:"--priority",list:!0},{flag:"--deadline-before"},{flag:"--deadline-after"},{flag:"--updated-after"},{flag:"--updated-before"},{flag:"--created-after"},{flag:"--created-before"},{flag:"--assignee",list:!0},{flag:"--sprint",list:!0},{flag:"--release",list:!0},{flag:"--parent"},...Z],new Set(["--highlight","--compact","--full","--fields","--format","--limit","--token-budget","--after"])),Pa=[{flag:"--action"},{flag:"--command"},{flag:"--summary"},{flag:"--schema-only"},{flag:"--flags-only"},{flag:"--availability-only"},{flag:"--runtime-only"},{flag:"--active-only"},{flag:"--full"}],Ma=[{flag:"--eager-tags"}];function rt(e){let a=new Set,t=[];for(let l of e){let n=(l.aliases??[]).join(","),o=`${l.flag}|${l.short??""}|${n}`;a.has(o)||(a.add(o),t.push(l))}return t}function O(e){let a=new Map;for(let t of[...P,...e]){let l=x(t.flag),n=a.get(l),{aliases:o,...c}=t,p=C([...o??[],...t.flag===l?[]:[t.flag]]).filter(g=>g!==l),r={...c,flag:l,...p.length>0?{aliases:p}:{}},d=C([...n?.aliases??[],...r.aliases??[]]);a.set(l,n===void 0?r:{...n,...r,...d.length>0?{aliases:d}:{}})}return G([...a.values()])}var Da=["list-draft","list-open","list-in-progress","list-blocked","list-closed","list-canceled"],$a=I.filter(e=>e.flag!=="--status"&&e.flag!=="--all");function L(e){let a=new Map;for(let t of e)for(let l of[t.flag,...t.aliases??[]]){let n=a.get(l)??[];n.push(t),a.set(l,n)}return a}var Ua=L(ee),za=L(ie),Xa=new Map([["assurance",za],["plan",Ua],["workspace",L(fe)],["workspace snapshot",L(_)]]);function ja(e=h){return e.map(({command:a,parent:t,accepted_flags:l})=>{let n=Xa.get(t);if(!n)throw new Error(`Positional action ${a} has no flag-contract index for ${t}.`);let o=l.map(c=>{let p=n.get(c)??[];if(p.length!==1)throw new Error(`Positional action ${a} accepted flag ${c} does not resolve to exactly one ${t} flag contract.`);return p[0]});return[a,o]})}var qa=ja(),ce=new Map([["list",I],["list-all",I],...Da.map(e=>[e,$a]),["templates",V],["cal",W],["ctx",Q],["test-runs-worker",[]],["init",De],["config",$e],["extension",ae],["package",Y],["packages",Y],["install",Je],["upgrade",le],["create",V],["item",[]],["item mutate",Aa],["item complete",ya],["item reopen",ka],["copy",Ca],["focus",ba],["aggregate",Ce],["calendar",W],["context",Q],["get",xa],["guide",La],["search",Ga],["next",Ia],["eval",Fa],["workspace",_],["workspace position",fe],["workspace snapshot",_],["workspace snapshot create",_],["workspace snapshot list",_],["workspace snapshot inspect",_],["workspace snapshot restore",_],["workspace snapshot delete",_],["history",xe],["history-redact",Ee],["history-repair",Re],["history-author-acknowledge",Fe],["history-compact",Ie],["history-attest",Ge],["merge",Le],["schema",Pe],["profile",Me],["plan",ee],["activity",Na],["events",Oa],["restore",sa],["update",Sa],["update-many",wa],["close",ea],["close-many",aa],["delete",na],["append",ta],["comments",be],["notes",Se],["learnings",we],["files",Ne],["docs",Oe],["deps",Ea],["graph",Ra],["test",pa],["test-all",da],["telemetry",ma],["health",ha],["assurance",ie],...qa,["validate",Ta],["gc",ua],["stats",_a],["duplicates",va],["contracts",Pa],["completion",Ma],["claim",la],["release",ia],["start-task",oa],["pause-task",ra],["close-task",ga],["meet",ne],["event",fa],["remind",ca]]),pe=new Map([["install",ze],["uninstall",Xe],["explore",je],["manage",Ve],["describe",qe],["reload",We],["doctor",Qe],["catalog",K],["list",K],["adopt",Ze],["adopt-all",He],["activate",Be],["deactivate",Ye],["migrate",Ke]]);function de(e){return typeof e!="string"?"":b(e.trim().toLowerCase())}function gt(e){let a=de(e);if(ce.has(a))return!0;let[t,l,...n]=a.split(/\s+/);return(t==="extension"||t==="package"||t==="packages")&&l!==void 0&&n.length===0&&(l==="init"||l==="scaffold"||pe.has(l))}function Ha(e,a){return a==="init"||a==="scaffold"?e==="extension"?te:Ue:pe.get(a)??[]}function ft(e){let a=de(e);if(a.length===0)return O([]);let[t,l,...n]=a.split(/\s+/);if((t==="extension"||t==="package"||t==="packages")&&l!==void 0&&n.length===0)return O((t==="package"||t==="packages")&&l==="upgrade"?le:Ha(t,l));let o=ce.get(a)??[];return O(o)}function ct(e,a=!0){let l=G(e).flatMap(o=>[o.short,o.flag,...o.aliases??[]]).filter(o=>!!o),n=a?[...l,...P.flatMap(o=>[o.short,o.flag,...o.aliases??[]]).filter(o=>!!o)]:l;return C(n).join(" ")}export{C as a,F as b,me as c,h as d,Ya as e,he as f,Ka as g,N as h,R as i,w as j,q as k,Te as l,S as m,Va as n,Wa as o,G as p,st as q,P as r,nt as s,I as t,Ce as u,be as v,Se as w,we as x,Ne as y,Oe as z,xe as A,Le as B,Ee as C,Re as D,Fe as E,Ie as F,Ge as G,Pe as H,Me as I,ee as J,De as K,$e as L,ae as M,m as N,te as O,Y as P,Ue as Q,ze as R,Xe as S,je as T,qe as U,He as V,Be as W,Ye as X,Ke as Y,Ve as Z,We as _,Qe as $,K as aa,Ze as ba,Je as ca,le as da,it as ea,ea as fa,aa as ga,ta as ha,la as ia,sa as ja,na as ka,ia as la,oa as ma,ra as na,ga as oa,ne as pa,fa as qa,ca as ra,pa as sa,da as ta,ma as ua,ot as va,ua as wa,_a as xa,va as ya,ha as za,Ta as Aa,ie as Ba,V as Ca,Aa as Da,ya as Ea,ka as Fa,Ca as Ga,ba as Ha,Sa as Ia,wa as Ja,W as Ka,Na as La,Oa as Ma,Q as Na,xa as Oa,La as Pa,Ea as Qa,Ra,Fa as Sa,_ as Ta,Ia as Ua,Ga as Va,Pa as Wa,Ma as Xa,rt as Ya,ja as Za,qa as _a,gt as $a,ft as ab,ct as bb};
2
+ //# sourceMappingURL=chunk-5KJXX2TZ.js.map
@@ -1,2 +1,2 @@
1
- import{P as i}from"./chunk-NVVB2HJC.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]="261c726f-338d-5618-8f6b-051b41a38c99")}catch{}})();var u=["id","title","status","type","priority","parent","updated_at"],E=["id","status","type","title"],p={list:"brief","list-all":"full","list-draft":"full","list-open":"brief","list-in-progress":"brief","list-blocked":"brief","list-closed":"brief","list-canceled":"full"},o=["tree_depth","tree_parent","tree_children","tree_title"];function f(e=[]){return[...new Set([...i,"body",...o,...e])].flatMap(t=>[t,`item.${t}`]).sort()}var m=["brief","standard","deep"],r=["body","linked","claim_state","children","schedule"],l=["linked.files","linked.tests","linked.docs"],c=["claim_state.claimed","claim_state.assignee","claim_state.last_claim","claim_state.last_release"],a=["schedule.deadline","schedule.start_at","schedule.end_at","schedule.location","schedule.reminders","schedule.events"];function T(e=[]){return[...[...new Set([...i,...e,"notes_count","tests_count","collection_counts"])].flatMap(s=>[s,`item.${s}`]),...r,...l,...c,...a].sort()}var I=["id","title","status","type","priority","updated_at","score","matched_fields"],d=["score","matched_fields","highlights"],n=["id","title","description","type","status","priority","tags","created_at","updated_at","deadline","assignee","author","estimated_minutes","acceptance_criteria","dependencies","comments","notes","learnings","reminders","events","files","tests","docs","close_reason","parent","reviewer","risk","confidence","sprint","release","blocked_by","blocked_reason","reporter","severity","environment","repro_steps","resolution","expected_result","actual_result","affected_version","fixed_version","component","regression","customer_impact","definition_of_ready","order","rank","goal","objective","value","impact","outcome","why_now","plan"];function S(e=[]){let t=[...new Set(e)];return[...d,...n,...n.map(s=>`item.${s}`),...t,...t.map(s=>`item.${s}`)].sort()}export{u as a,E as b,p as c,f as d,m as e,T as f,I as g,S as h};
2
- //# sourceMappingURL=chunk-UIFVIE5F.js.map
1
+ import{P as i}from"./chunk-BRLXKRI2.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]="261c726f-338d-5618-8f6b-051b41a38c99")}catch{}})();var u=["id","title","status","type","priority","parent","updated_at"],E=["id","status","type","title"],p={list:"brief","list-all":"full","list-draft":"full","list-open":"brief","list-in-progress":"brief","list-blocked":"brief","list-closed":"brief","list-canceled":"full"},o=["tree_depth","tree_parent","tree_children","tree_title"];function f(e=[]){return[...new Set([...i,"body",...o,...e])].flatMap(t=>[t,`item.${t}`]).sort()}var m=["brief","standard","deep"],r=["body","linked","claim_state","children","schedule"],l=["linked.files","linked.tests","linked.docs"],c=["claim_state.claimed","claim_state.assignee","claim_state.last_claim","claim_state.last_release"],a=["schedule.deadline","schedule.start_at","schedule.end_at","schedule.location","schedule.reminders","schedule.events"];function T(e=[]){return[...[...new Set([...i,...e,"notes_count","tests_count","collection_counts"])].flatMap(s=>[s,`item.${s}`]),...r,...l,...c,...a].sort()}var I=["id","title","status","type","priority","updated_at","score","matched_fields"],d=["score","matched_fields","highlights"],n=["id","title","description","type","status","priority","tags","created_at","updated_at","deadline","assignee","author","estimated_minutes","acceptance_criteria","dependencies","comments","notes","learnings","reminders","events","files","tests","docs","close_reason","parent","reviewer","risk","confidence","sprint","release","blocked_by","blocked_reason","reporter","severity","environment","repro_steps","resolution","expected_result","actual_result","affected_version","fixed_version","component","regression","customer_impact","definition_of_ready","order","rank","goal","objective","value","impact","outcome","why_now","plan"];function S(e=[]){let t=[...new Set(e)];return[...d,...n,...n.map(s=>`item.${s}`),...t,...t.map(s=>`item.${s}`)].sort()}export{u as a,E as b,p as c,f as d,m as e,T as f,I as g,S as h};
2
+ //# sourceMappingURL=chunk-6IVQPNYN.js.map
@@ -1,6 +1,6 @@
1
- import{c as w}from"./chunk-O7MIBEMK.js";import{e as a,h as I}from"./chunk-TLF6N56J.js";import{$ as f,P as k,aa as u,r as h,s as _,sa as m,t as b,za as T}from"./chunk-NVVB2HJC.js";import C from"node:fs/promises";import p 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]="8269d712-f438-5f18-8137-ed9a0358e23b")}catch{}})();var U=["extensions","docs","examples","assets","prompts"],R=Object.freeze({extensions:Object.freeze([".agents/pm/extensions","extensions",".custom/pm-extensions",".custom/pm-extension"]),docs:Object.freeze(["docs","documentation"]),examples:Object.freeze(["examples","docs/examples"]),assets:Object.freeze(["assets",".agents/pm/assets"]),prompts:Object.freeze(["prompts",".agents/pm/prompts"])});function q(e){return U.includes(e)}function G(e,t){if(t==null)return[];let n=Array.isArray(t)?t:[t],o=[];for(let r of n){if(typeof r!="string"||r.trim().length===0)throw new u(`Package manifest field pm.${e} must contain string paths.`,f.USAGE);o.push(r.trim())}return[...new Set(o)].sort((r,i)=>r.localeCompare(i))}function J(e){if(e==null)return{};if(typeof e!="object"||Array.isArray(e))throw new u("Package manifest field pm must be an object.",f.USAGE);let t={},n=e;for(let[o,r]of Object.entries(n)){if(!q(o))continue;let i=G(o,r);i.length>0&&(t[o]=i)}return t}function d(e,t){let n=e[t];return typeof n=="string"&&n.trim().length>0?n.trim():void 0}function E(e){if(!Array.isArray(e))return;let t=e.map(n=>typeof n=="string"?n.trim():"").filter(n=>n.length>0);return t.length>0?[...new Set(t)].sort((n,o)=>n.localeCompare(o)):void 0}function x(e){if(typeof e=="string"&&e.trim().length>0)return e.trim();if(typeof e=="object"&&e!==null&&!Array.isArray(e)){let t=e.url;return typeof t=="string"&&t.trim().length>0?t.trim():void 0}}function K(e){if(typeof e!="object"||e===null||Array.isArray(e))return;let t=e,n={docs:d(t,"docs"),npm:d(t,"npm"),repository:d(t,"repository"),report:d(t,"report")};return Object.values(n).some(o=>typeof o=="string")?n:void 0}function V(e){if(typeof e!="object"||e===null||Array.isArray(e))return;let t=e,n={image:d(t,"image"),video:d(t,"video")};return Object.values(n).some(o=>typeof o=="string")?n:void 0}function Y(e){if(typeof e!="object"||e===null||Array.isArray(e))return;let t=e,n={display_name:d(t,"display_name")??d(t,"displayName"),category:d(t,"category"),summary:d(t,"summary"),links:K(t.links),media:V(t.media),tags:E(t.tags)};return Object.values(n).some(o=>o!==void 0)?n:void 0}async function B(e){let t=p.join(e,"package.json");if(!await m(t))return{source:"convention",resources:{}};let n;try{n=JSON.parse(await C.readFile(t,"utf8"))}catch(l){throw new u(`Failed to parse package manifest at "${t}": ${String(l)}`,f.USAGE)}if(typeof n!="object"||n===null||Array.isArray(n))throw new u(`Package manifest at "${t}" must be a JSON object.`,f.USAGE);let o=n,r=o.pm,i=r!=null,s=typeof r=="object"&&r!==null&&!Array.isArray(r)?r:{};return{source:i?"pm":"convention",package_json_path:t,package_name:typeof o.name=="string"?o.name:void 0,package_version:typeof o.version=="string"?o.version:void 0,package_private:o.private===!0,package_description:typeof o.description=="string"?o.description:void 0,package_keywords:E(o.keywords),package_homepage:typeof o.homepage=="string"?o.homepage:void 0,package_repository_url:x(o.repository),package_bugs_url:x(o.bugs),aliases:E(s.aliases),resources:J(r),catalog:Y(s.catalog)}}async function j(e){if(!await m(e))return[];let t=await C.readdir(e,{withFileTypes:!0}),n=[];for(let o of t){if(!o.isDirectory())continue;let r=p.join(e,o.name);await m(p.join(r,"manifest.json"))&&n.push(r)}return n.sort((o,r)=>o.localeCompare(r))}async function ve(e){if(await m(p.join(e,"manifest.json")))return[e];let n=(await B(e)).resources.extensions??[],o=new Set;for(let r of n){if(r.includes("*")||r.startsWith("!"))throw new u(`Package extension entry "${r}" uses a glob/exclusion pattern. pm package installs currently require concrete extension paths or directories.`,f.USAGE);let i=p.resolve(e,r);if(!T(e,i))throw new u(`Package extension entry "${r}" resolves outside package root.`,f.USAGE);if(await m(p.join(i,"manifest.json"))){o.add(i);continue}for(let s of await j(i))o.add(s)}if(n.length===0)for(let r of R.extensions)for(let i of await j(p.join(e,r)))o.add(i);return[...o].sort((r,i)=>r.localeCompare(i))}(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]="2bc00b8e-0d9f-5af8-9667-d46136ff52b0")}catch{}})();var D=1,S=6,$=[["commands","Commands"],["command_overrides","Command overrides"],["flag_commands","Flag commands"],["item_types","Item types"],["item_fields","Item fields"],["migrations","Migrations"],["profiles","Profiles"],["importers","Importers"],["exporters","Exporters"],["search_providers","Search providers"],["vector_store_adapters","Vector store adapters"],["assurance_providers","Assurance measurement providers"],["hooks","Lifecycle hooks"],["parser_overrides","Parser overrides"],["service_overrides","Service overrides"],["renderer_overrides","Renderer overrides"]];function A(e){return"#".repeat(e)}function F(e){if(!e.includes("`"))return`\`${e}\``;let t=0,n=0;for(let i of e)n=i==="`"?n+1:0,t=Math.max(t,n);let o="`".repeat(t+1),r=e.startsWith("`")||e.endsWith("`")?" ":"";return`${o}${r}${e}${r}${o}`}function W(e){return e.length===0?"Capabilities: _none registered_":`Capabilities: ${e.map(F).join(", ")}`}function H(e,t,n){let o=[`${A(t)} ${e}`,""];return n.length===0?(o.push("_None._",""),o):(o.push(...n.map(r=>`- ${F(r)}`),""),o)}function X(e,t,n){return e===0&&!n?[]:[`${A(t)} Preflight overrides`,"",e>0?`- ${e} registered (this surface carries no per-entry identifier)`:"_None._",""]}function be(e,t={}){let n=t.headingLevel??2;if(!Number.isInteger(n)||n<D||n>S)throw new RangeError(`headingLevel must be an integer in [${D}, ${S}], received ${String(t.headingLevel)}`);let o=Math.min(n+1,S),r=t.includeEmpty===!0,i=t.title??"Extension surfaces",s=[`${A(n)} ${i}`,""];(r||e.capabilities.length>0)&&s.push(W(e.capabilities),"");for(let[c,y]of $){let g=e[c]??[];g.length===0&&!r||s.push(...H(y,o,g))}return s.push(...X(e.preflight_overrides,o,r)),!(e.preflight_overrides>0||$.some(([c])=>(e[c]?.length??0)>0))&&!r&&s.push("_This extension registers no surfaces._",""),`${s.join(`
1
+ import{c as w}from"./chunk-YZB7IPR6.js";import{e as a,h as I}from"./chunk-Y5Z3XNGY.js";import{$ as f,P as k,aa as u,r as h,s as _,sa as m,t as b,za as T}from"./chunk-BRLXKRI2.js";import C from"node:fs/promises";import p 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]="8269d712-f438-5f18-8137-ed9a0358e23b")}catch{}})();var U=["extensions","docs","examples","assets","prompts"],R=Object.freeze({extensions:Object.freeze([".agents/pm/extensions","extensions",".custom/pm-extensions",".custom/pm-extension"]),docs:Object.freeze(["docs","documentation"]),examples:Object.freeze(["examples","docs/examples"]),assets:Object.freeze(["assets",".agents/pm/assets"]),prompts:Object.freeze(["prompts",".agents/pm/prompts"])});function q(e){return U.includes(e)}function G(e,t){if(t==null)return[];let n=Array.isArray(t)?t:[t],o=[];for(let r of n){if(typeof r!="string"||r.trim().length===0)throw new u(`Package manifest field pm.${e} must contain string paths.`,f.USAGE);o.push(r.trim())}return[...new Set(o)].sort((r,i)=>r.localeCompare(i))}function J(e){if(e==null)return{};if(typeof e!="object"||Array.isArray(e))throw new u("Package manifest field pm must be an object.",f.USAGE);let t={},n=e;for(let[o,r]of Object.entries(n)){if(!q(o))continue;let i=G(o,r);i.length>0&&(t[o]=i)}return t}function d(e,t){let n=e[t];return typeof n=="string"&&n.trim().length>0?n.trim():void 0}function E(e){if(!Array.isArray(e))return;let t=e.map(n=>typeof n=="string"?n.trim():"").filter(n=>n.length>0);return t.length>0?[...new Set(t)].sort((n,o)=>n.localeCompare(o)):void 0}function x(e){if(typeof e=="string"&&e.trim().length>0)return e.trim();if(typeof e=="object"&&e!==null&&!Array.isArray(e)){let t=e.url;return typeof t=="string"&&t.trim().length>0?t.trim():void 0}}function K(e){if(typeof e!="object"||e===null||Array.isArray(e))return;let t=e,n={docs:d(t,"docs"),npm:d(t,"npm"),repository:d(t,"repository"),report:d(t,"report")};return Object.values(n).some(o=>typeof o=="string")?n:void 0}function V(e){if(typeof e!="object"||e===null||Array.isArray(e))return;let t=e,n={image:d(t,"image"),video:d(t,"video")};return Object.values(n).some(o=>typeof o=="string")?n:void 0}function Y(e){if(typeof e!="object"||e===null||Array.isArray(e))return;let t=e,n={display_name:d(t,"display_name")??d(t,"displayName"),category:d(t,"category"),summary:d(t,"summary"),links:K(t.links),media:V(t.media),tags:E(t.tags)};return Object.values(n).some(o=>o!==void 0)?n:void 0}async function B(e){let t=p.join(e,"package.json");if(!await m(t))return{source:"convention",resources:{}};let n;try{n=JSON.parse(await C.readFile(t,"utf8"))}catch(l){throw new u(`Failed to parse package manifest at "${t}": ${String(l)}`,f.USAGE)}if(typeof n!="object"||n===null||Array.isArray(n))throw new u(`Package manifest at "${t}" must be a JSON object.`,f.USAGE);let o=n,r=o.pm,i=r!=null,s=typeof r=="object"&&r!==null&&!Array.isArray(r)?r:{};return{source:i?"pm":"convention",package_json_path:t,package_name:typeof o.name=="string"?o.name:void 0,package_version:typeof o.version=="string"?o.version:void 0,package_private:o.private===!0,package_description:typeof o.description=="string"?o.description:void 0,package_keywords:E(o.keywords),package_homepage:typeof o.homepage=="string"?o.homepage:void 0,package_repository_url:x(o.repository),package_bugs_url:x(o.bugs),aliases:E(s.aliases),resources:J(r),catalog:Y(s.catalog)}}async function j(e){if(!await m(e))return[];let t=await C.readdir(e,{withFileTypes:!0}),n=[];for(let o of t){if(!o.isDirectory())continue;let r=p.join(e,o.name);await m(p.join(r,"manifest.json"))&&n.push(r)}return n.sort((o,r)=>o.localeCompare(r))}async function ve(e){if(await m(p.join(e,"manifest.json")))return[e];let n=(await B(e)).resources.extensions??[],o=new Set;for(let r of n){if(r.includes("*")||r.startsWith("!"))throw new u(`Package extension entry "${r}" uses a glob/exclusion pattern. pm package installs currently require concrete extension paths or directories.`,f.USAGE);let i=p.resolve(e,r);if(!T(e,i))throw new u(`Package extension entry "${r}" resolves outside package root.`,f.USAGE);if(await m(p.join(i,"manifest.json"))){o.add(i);continue}for(let s of await j(i))o.add(s)}if(n.length===0)for(let r of R.extensions)for(let i of await j(p.join(e,r)))o.add(i);return[...o].sort((r,i)=>r.localeCompare(i))}(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]="2bc00b8e-0d9f-5af8-9667-d46136ff52b0")}catch{}})();var D=1,S=6,$=[["commands","Commands"],["command_overrides","Command overrides"],["flag_commands","Flag commands"],["item_types","Item types"],["item_fields","Item fields"],["migrations","Migrations"],["profiles","Profiles"],["importers","Importers"],["exporters","Exporters"],["search_providers","Search providers"],["vector_store_adapters","Vector store adapters"],["assurance_providers","Assurance measurement providers"],["hooks","Lifecycle hooks"],["parser_overrides","Parser overrides"],["service_overrides","Service overrides"],["renderer_overrides","Renderer overrides"]];function A(e){return"#".repeat(e)}function F(e){if(!e.includes("`"))return`\`${e}\``;let t=0,n=0;for(let i of e)n=i==="`"?n+1:0,t=Math.max(t,n);let o="`".repeat(t+1),r=e.startsWith("`")||e.endsWith("`")?" ":"";return`${o}${r}${e}${r}${o}`}function W(e){return e.length===0?"Capabilities: _none registered_":`Capabilities: ${e.map(F).join(", ")}`}function H(e,t,n){let o=[`${A(t)} ${e}`,""];return n.length===0?(o.push("_None._",""),o):(o.push(...n.map(r=>`- ${F(r)}`),""),o)}function X(e,t,n){return e===0&&!n?[]:[`${A(t)} Preflight overrides`,"",e>0?`- ${e} registered (this surface carries no per-entry identifier)`:"_None._",""]}function be(e,t={}){let n=t.headingLevel??2;if(!Number.isInteger(n)||n<D||n>S)throw new RangeError(`headingLevel must be an integer in [${D}, ${S}], received ${String(t.headingLevel)}`);let o=Math.min(n+1,S),r=t.includeEmpty===!0,i=t.title??"Extension surfaces",s=[`${A(n)} ${i}`,""];(r||e.capabilities.length>0)&&s.push(W(e.capabilities),"");for(let[c,y]of $){let g=e[c]??[];g.length===0&&!r||s.push(...H(y,o,g))}return s.push(...X(e.preflight_overrides,o,r)),!(e.preflight_overrides>0||$.some(([c])=>(e[c]?.length??0)>0))&&!r&&s.push("_This extension registers no surfaces._",""),`${s.join(`
2
2
  `).trimEnd()}
3
3
  `}(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]="ebcb45a2-996a-5194-8086-efe882dbcacc")}catch{}})();var Q=["agile","ops","research"],Z={agile:[{name:"Story",description:"User-facing outcome or capability slice expressed from a stakeholder perspective.",defaultStatus:"open",folder:"stories",aliases:["user-story"]},{name:"Spike",description:"Time-boxed investigation used to reduce uncertainty before implementation.",defaultStatus:"open",folder:"spikes",aliases:["research-spike"]}],ops:[{name:"Incident",description:"Operational disruption, degradation, or support escalation with recovery tracking.",defaultStatus:"open",folder:"incidents",aliases:["outage"]},{name:"Runbook",description:"Repeatable operational procedure, diagnostic path, or response playbook.",defaultStatus:"open",folder:"runbooks",aliases:["playbook"]}],research:[{name:"Experiment",description:"Validated-learning activity with hypothesis, method, and outcome tracking.",defaultStatus:"open",folder:"experiments",aliases:["study"]},{name:"Hypothesis",description:"Testable claim or assumption that should be supported, rejected, or refined.",defaultStatus:"open",folder:"hypotheses",aliases:["assumption"]}]};function Ae(e){if(e===void 0)return;let t=e.trim().toLowerCase().replaceAll("-","_");if(t.length===0)throw new Error("Type preset name must not be empty.");if(t==="agile"||t==="ops"||t==="research")return t;throw new Error(`Invalid type preset "${e}". Allowed: ${Q.join(", ")}.`)}function ke(e){return Z[e].map(t=>w(t))}(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]="f9535c02-9214-5d5e-bac0-2dabbe5d395e")}catch{}})();var ee=new Set(_),te=new Set(b),N=new Set([...k.filter(e=>e!=="severity"),"id","title","type","status","priority","tags","assignee","parent","description","body","created_at","updated_at","closed_at","completed_at","author","deadline","estimate","sprint","release","risk","confidence","reviewer","resolution","expected","actual"]),ne=["create","update"];function M(e){if(typeof e!="string")return"";let t=e.trim().toLowerCase().replaceAll(/[\s_]+/g,"-");return t.startsWith("--")?t.slice(2):t}function O(e){return e.replaceAll("_","-")}function oe(e,t){let n=new Set;for(let o of e){let r=M(o);r.length>0&&r!==t&&n.add(r)}return[...n].sort((o,r)=>o.localeCompare(r))}function re(e){let t=new Set;for(let n of e??[]){let o=n.trim();o.length>0&&t.add(o)}return[...t].sort((n,o)=>n.localeCompare(o))}function ie(e){let t=new Set,n=[];for(let o of e??[]){let r=o.trim().toLowerCase();if(r.length!==0){if(!te.has(r))throw new Error(`Invalid field command "${o}". Allowed: ${b.join(", ")}.`);t.has(r)||(t.add(r),n.push(r))}}return e===void 0||n.length===0?[...ne]:n}function Ce(e){let t=a(e.key);if(t.length===0)throw new Error("Field key must not be empty.");if(N.has(t))throw new Error(`Cannot define custom field "${t}": custom schema field "${t}" collides with built-in item metadata "${t}". Rename the custom field with a project-specific prefix. Reserved fields: ${[...N].sort((g,P)=>g.localeCompare(P)).join(", ")}.`);let n=typeof e.type=="string"&&e.type.trim().length>0?e.type.trim().toLowerCase():"string";if(!ee.has(n))throw new Error(`Invalid field type "${e.type}". Allowed: ${_.join(", ")}.`);let o=n,r=ie(e.commands),i=M(e.cliFlag),s=i.length>0&&i!==O(t)?i:void 0,l=s??O(t),c=oe(e.aliases??[],l),y=e.description?.trim();return{key:t,type:o,commands:r,description:y&&y.length>0?y:void 0,cliFlag:s,cliAliases:c,required:e.required===!0,requiredOnCreate:e.requiredOnCreate===!0,allowUnset:e.allowUnset!==!1,requiredTypes:re(e.requiredTypes)}}function se(e){if(Array.isArray(e))return e;if(typeof e!="object"||e===null)return;let t=e;if(Array.isArray(t.fields))return t.fields;if(Array.isArray(t.definitions))return t.definitions}function ae(e){let t=se(e);if(!t)return[];let n=[];for(let o of t){if(typeof o!="object"||o===null||Array.isArray(o))continue;let r=o;typeof r.key!="string"||r.key.trim().length===0||n.push(r)}return n}function De(e){if(e==null||e.trim().length===0)return{fields:[]};let t;try{t=JSON.parse(e)}catch{throw new Error("schema/fields.json contains invalid JSON.")}return{fields:ae(t)}}function $e(e){return`${JSON.stringify({fields:e.fields},null,2)}
4
4
  `}function Fe(e,t){let n=e.fields.find(s=>a(s.key)===t.key),o=n!==void 0,r=e.fields.filter(s=>a(s.key)!==t.key),i={...n,key:t.key,type:t.type,commands:[...t.commands]};return L(i,"description",t.description),L(i,"cli_flag",t.cliFlag),t.cliAliases.length>0?i.cli_aliases=[...t.cliAliases]:delete i.cli_aliases,z(i,"required",t.required),z(i,"required_on_create",t.requiredOnCreate),t.allowUnset===!1?i.allow_unset=!1:delete i.allow_unset,t.requiredTypes.length>0?i.required_types=[...t.requiredTypes]:delete i.required_types,r.push(i),r.sort((s,l)=>a(s.key).localeCompare(a(l.key))),{file:{fields:r},definition:i,replaced:o}}function Ne(e,t){let n=a(t);if(n.length===0)throw new Error("Field key must not be empty.");let o=[],r=e.fields.filter(i=>a(i.key)===n?(o.push(i),!1):!0);return o.length===0?{file:{fields:r},removed:!1}:{file:{fields:r},removed:!0,definition:o[0]}}function L(e,t,n){let o=e;n!==void 0&&n.length>0?o[t]=n:delete o[t]}function z(e,t,n){let o=e;n?o[t]=!0:delete o[t]}(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]="e3a1e65b-55d7-5206-b3e7-cac3ac29745c")}catch{}})();var le=new Set(h),v=new Set(I.map(e=>a(e.id)).filter(e=>e.length>0));function ce(e){let t=new Set;for(let n of e){let o=a(n);o.length>0&&t.add(o)}return[...t].sort((n,o)=>n.localeCompare(o))}function Ue(e){let t=a(e.id);if(t.length===0)throw new Error("Status id must not be empty.");if(v.has(t))throw new Error(`Cannot add-status the built-in status "${t}". Built-in statuses are reserved: ${[...v].join(", ")}.`);let n;if(e.roles!==void 0){n=[];let s=new Set;for(let l of e.roles){let c=typeof l=="string"?l.trim().toLowerCase():"";if(c.length!==0){if(!le.has(c))throw new Error(`Invalid status role "${l}". Allowed roles: ${h.join(", ")}.`);s.has(c)||(s.add(c),n.push(c))}}if(n.length===0)throw new Error(`Status role must include at least one lifecycle role. Allowed roles: ${h.join(", ")}.`)}let o=e.aliases===void 0?void 0:ce(e.aliases).filter(s=>s!==t),r=e.description?.trim(),i=typeof e.order=="number"&&Number.isFinite(e.order)?Math.trunc(e.order):void 0;return{id:t,roles:n,aliases:o,description:r&&r.length>0?r:void 0,order:i}}function de(e){if(Array.isArray(e))return e;if(typeof e!="object"||e===null)return;let t=e;if(Array.isArray(t.statuses))return t.statuses;if(Array.isArray(t.definitions))return t.definitions}function fe(e){let t=de(e);if(!t)return[];let n=[];for(let o of t){if(typeof o!="object"||o===null||Array.isArray(o))continue;let r=o;typeof r.id!="string"||r.id.trim().length===0||n.push(r)}return n}function Re(e){if(e==null||e.trim().length===0)return{statuses:[]};let t;try{t=JSON.parse(e)}catch{throw new Error("schema/statuses.json contains invalid JSON.")}return{statuses:fe(t)}}function qe(e){return`${JSON.stringify({statuses:e.statuses},null,2)}
5
5
  `}function Ge(e,t,n){let o=e.statuses.slice(),r=o.findIndex(l=>a(l.id)===t.id),i=r>=0?o[r]:n,s={...i,id:t.id};return t.roles!==void 0&&(t.roles.length>0?s.roles=[...t.roles]:s.roles!==void 0&&delete s.roles),t.aliases!==void 0&&(t.aliases.length>0?s.aliases=[...t.aliases]:s.aliases!==void 0&&delete s.aliases),t.description!==void 0&&(s.description=t.description),t.order!==void 0&&(s.order=t.order),r>=0?o[r]=s:o.push(s),{file:{statuses:o},definition:s,replaced:i!==void 0}}function Je(e,t){let n=a(t);if(n.length===0)throw new Error("Status id must not be empty.");if(v.has(n))throw new Error(`Cannot remove built-in status "${n}". Built-in statuses are reserved: ${[...v].join(", ")}.`);let o=e.statuses.slice(),r=o.findIndex(s=>a(s.id)===n);if(r<0)return{file:{statuses:o},removed:!1};let[i]=o.splice(r,1);return{file:{statuses:o},removed:!0,definition:i}}function Ke(e,t){let n=[e.id,...e.aliases??[]];for(let o of n){let r=a(o);if(r.length===0)continue;let i=t.get(r);if(i!==void 0&&i!==e.id)throw new Error(`Status token "${r}" already belongs to status "${i}". Choose a different id/alias to avoid shadowing it.`)}}export{U as a,R as b,B as c,ve as d,Q as e,Z as f,Ae as g,ke as h,Ce as i,De as j,$e as k,Fe as l,Ne as m,v as n,Ue as o,Re as p,qe as q,Ge as r,Je as s,Ke as t,be as u};
6
- //# sourceMappingURL=chunk-MK5AKKHK.js.map
6
+ //# sourceMappingURL=chunk-A5O3VYWV.js.map