@unbrained/pm-cli 2026.8.7 → 2026.8.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +35 -0
  3. package/dist/cli/main.js +4 -3
  4. package/dist/cli/register-annotations.d.ts +11 -0
  5. package/dist/cli/register-annotations.js +195 -0
  6. package/dist/cli/register-history-author.js +7 -30
  7. package/dist/cli/register-mutation.js +25 -206
  8. package/dist/cli/runtime-compatibility-boundary.d.ts +17 -0
  9. package/dist/cli/runtime-compatibility-boundary.js +43 -0
  10. package/dist/cli-bundle/bundle-manifest.json +155 -691
  11. package/dist/cli-bundle/chunks/chunk-2ZMXX3Q6.js +2068 -0
  12. package/dist/cli-bundle/chunks/chunk-ALDHXLPS.js +3 -0
  13. package/dist/cli-bundle/chunks/chunk-CBLA33YK.js +8 -0
  14. package/dist/cli-bundle/chunks/chunk-GKA54IJM.js +5 -0
  15. package/dist/cli-bundle/chunks/chunk-KRY7SRUO.js +2 -0
  16. package/dist/cli-bundle/chunks/chunk-MNJ4NNSY.js +26 -0
  17. package/dist/cli-bundle/chunks/chunk-NUXRRNAB.js +77 -0
  18. package/dist/cli-bundle/chunks/chunk-OJPCFDDY.js +13 -0
  19. package/dist/cli-bundle/chunks/chunk-PFSD3DAN.js +194 -0
  20. package/dist/cli-bundle/chunks/chunk-QWRRFYK3.js +2 -0
  21. package/dist/cli-bundle/chunks/chunk-SQ7QZFQ6.js +2 -0
  22. package/dist/cli-bundle/chunks/{register-list-query-FJZCJ67O.js → register-list-query-WFZAMJHZ.js} +8 -8
  23. package/dist/cli-bundle/chunks/register-mutation-SOKKOTHQ.js +20 -0
  24. package/dist/cli-bundle/chunks/register-operations-5XQETS6E.js +2 -0
  25. package/dist/cli-bundle/chunks/register-setup-2HL5ZHMK.js +2 -0
  26. package/dist/cli-bundle/focused-chunks/chunk-54EU2UVO.js +2 -0
  27. package/dist/cli-bundle/focused-chunks/{chunk-VZFU2R4M.js → chunk-5FLBTZJQ.js} +2 -2
  28. package/dist/cli-bundle/focused-chunks/chunk-5GJ57YKN.js +2 -0
  29. package/dist/cli-bundle/focused-chunks/{chunk-HNL6IFGS.js → chunk-ANTMGYLI.js} +2 -2
  30. package/dist/cli-bundle/focused-chunks/chunk-CMDS3KYT.js +14 -0
  31. package/dist/cli-bundle/focused-chunks/{chunk-NBJKQP4S.js → chunk-DMKOMTTY.js} +2 -2
  32. package/dist/cli-bundle/focused-chunks/{chunk-CIXVQPB7.js → chunk-F5B3HBEZ.js} +2 -2
  33. package/dist/cli-bundle/focused-chunks/{chunk-R2LEMEV5.js → chunk-FI6DWU2M.js} +2 -2
  34. package/dist/cli-bundle/focused-chunks/{chunk-3K4XV2BF.js → chunk-FNOKJG6N.js} +2 -2
  35. package/dist/cli-bundle/focused-chunks/{chunk-RW5IYD4J.js → chunk-FPDYXZBK.js} +2 -2
  36. package/dist/cli-bundle/focused-chunks/{chunk-QHRTT7WT.js → chunk-GWI6YIKJ.js} +2 -2
  37. package/dist/cli-bundle/focused-chunks/{chunk-MHMTKV5V.js → chunk-HCUC62AB.js} +2 -2
  38. package/dist/cli-bundle/focused-chunks/{chunk-MOTJFQ3F.js → chunk-HGNKPSCB.js} +12 -12
  39. package/dist/cli-bundle/focused-chunks/{chunk-4VJQTS3P.js → chunk-IAS7PMLG.js} +2 -2
  40. package/dist/cli-bundle/focused-chunks/{chunk-TIKDBG4D.js → chunk-PL2EYDJK.js} +27 -27
  41. package/dist/cli-bundle/focused-chunks/chunk-SM2PJGP3.js +2 -0
  42. package/dist/cli-bundle/focused-chunks/{chunk-RPNYG5MO.js → chunk-TCSAPH33.js} +2 -2
  43. package/dist/cli-bundle/focused-chunks/chunk-U646T7Z6.js +18 -0
  44. package/dist/cli-bundle/focused-chunks/chunk-YKPE4PPY.js +2 -0
  45. package/dist/cli-bundle/focused-chunks/{chunk-YZEZAPJK.js → chunk-YSAHYUXX.js} +2 -2
  46. package/dist/cli-bundle/focused-chunks/{chunk-73JUDYXT.js → chunk-ZOLDTUU7.js} +2 -2
  47. package/dist/cli-bundle/main.js +13 -13
  48. package/dist/cli-bundle/sdk-authoring.js +1 -1
  49. package/dist/cli-bundle/sdk-contracts.js +1 -1
  50. package/dist/cli-bundle/sdk-core.js +38 -38
  51. package/dist/cli-bundle/sdk-governance.js +1 -1
  52. package/dist/cli-bundle/sdk-graph.js +1 -1
  53. package/dist/cli-bundle/sdk-merge.js +1 -1
  54. package/dist/cli-bundle/sdk-query.js +1 -1
  55. package/dist/cli-bundle/sdk-runtime.js +1 -1
  56. package/dist/cli-bundle/sdk-testing.js +1 -1
  57. package/dist/cli-bundle/sdk.js +2 -1
  58. package/dist/cli.js +14 -4
  59. package/dist/core/output/output.js +9 -2
  60. package/dist/core/sentry/helpers.d.ts +10 -0
  61. package/dist/core/sentry/helpers.js +59 -4
  62. package/dist/core/shared/constants.d.ts +2 -0
  63. package/dist/core/shared/constants.js +4 -2
  64. package/dist/sdk/annotations.d.ts +40 -0
  65. package/dist/sdk/annotations.js +61 -9
  66. package/dist/sdk/author-attribution.d.ts +12 -0
  67. package/dist/sdk/author-attribution.js +73 -11
  68. package/dist/sdk/cli-contracts/command-exit-contracts.d.ts +118 -0
  69. package/dist/sdk/cli-contracts/command-exit-contracts.js +152 -0
  70. package/dist/sdk/cli-contracts/completeness.js +5 -3
  71. package/dist/sdk/cli-contracts/flag-contracts.js +5 -2
  72. package/dist/sdk/cli-contracts/runtime-contracts.d.ts +11 -0
  73. package/dist/sdk/cli-contracts/runtime-contracts.js +29 -2
  74. package/dist/sdk/cli-contracts/tool-parameter-tables.js +15 -2
  75. package/dist/sdk/cli-contracts/tool-schema.d.ts +1 -1
  76. package/dist/sdk/cli-contracts/tool-schema.js +6 -3
  77. package/dist/sdk/comments.d.ts +7 -0
  78. package/dist/sdk/comments.js +2 -2
  79. package/dist/sdk/completion.js +9 -5
  80. package/dist/sdk/contracts.d.ts +1 -0
  81. package/dist/sdk/contracts.js +3 -2
  82. package/dist/sdk/environment/host-environment-errors.d.ts +27 -0
  83. package/dist/sdk/environment/host-environment-errors.js +124 -0
  84. package/dist/sdk/environment/project-runtime-compatibility.d.ts +65 -0
  85. package/dist/sdk/environment/project-runtime-compatibility.js +385 -0
  86. package/dist/sdk/environment/source-context.d.ts +23 -0
  87. package/dist/sdk/environment/source-context.js +29 -0
  88. package/dist/sdk/error-code-catalog.d.ts +6 -0
  89. package/dist/sdk/error-code-catalog.js +62 -8
  90. package/dist/sdk/generated-error-code-catalog.js +629 -3
  91. package/dist/sdk/governance/health.d.ts +11 -3
  92. package/dist/sdk/governance/health.js +5 -5
  93. package/dist/sdk/index.d.ts +7 -3
  94. package/dist/sdk/index.js +9 -5
  95. package/dist/sdk/learnings.d.ts +15 -0
  96. package/dist/sdk/learnings.js +2 -2
  97. package/dist/sdk/lifecycle/close-many.d.ts +6 -1
  98. package/dist/sdk/lifecycle/close-many.js +43 -5
  99. package/dist/sdk/lifecycle/update-many.d.ts +2 -1
  100. package/dist/sdk/lifecycle/update-many.js +29 -5
  101. package/dist/sdk/merge/index.d.ts +1 -1
  102. package/dist/sdk/merge/index.js +3 -3
  103. package/dist/sdk/merge/install.d.ts +21 -0
  104. package/dist/sdk/merge/install.js +50 -20
  105. package/dist/sdk/notes.d.ts +7 -0
  106. package/dist/sdk/notes.js +2 -2
  107. package/dist/sdk/read-output-contracts.js +83 -4
  108. package/dist/sdk/runtime.d.ts +1 -1
  109. package/dist/sdk/runtime.js +9 -25
  110. package/dist/sdk/test/execution.js +4 -2
  111. package/dist/sdk/test/parsers.js +5 -2
  112. package/dist/sdk/workspace-snapshot.d.ts +9 -0
  113. package/dist/sdk/workspace-snapshot.js +48 -16
  114. package/docs/AGENT_RUNTIME_PRIMITIVES.md +11 -4
  115. package/docs/README.md +1 -0
  116. package/docs/RELEASING.md +27 -2
  117. package/docs/SCRIPTING.md +27 -1
  118. package/docs/SDK_CONTEXT_INTEGRITY.md +66 -0
  119. package/docs/SDK_RUNTIME_BOUNDARIES.md +58 -0
  120. package/docs/SELF_DESCRIBING_CONTEXT_CONTRACTS.md +13 -0
  121. package/docs/TESTING.md +17 -0
  122. package/marketplace.json +2 -2
  123. package/package.json +5 -3
  124. package/packages/pm-beads/package.json +1 -1
  125. package/packages/pm-calendar/package.json +1 -1
  126. package/packages/pm-command-kit/package.json +1 -1
  127. package/packages/pm-digital-twin/package.json +1 -1
  128. package/packages/pm-governance-audit/package.json +1 -1
  129. package/packages/pm-guide-shell/package.json +1 -1
  130. package/packages/pm-kanban/package.json +1 -1
  131. package/packages/pm-lifecycle-hooks/package.json +1 -1
  132. package/packages/pm-linked-test-adapters/package.json +1 -1
  133. package/packages/pm-search-advanced/package.json +1 -1
  134. package/packages/pm-templates/package.json +1 -1
  135. package/packages/pm-todos/package.json +1 -1
  136. package/packages/pm-vcs/package.json +1 -1
  137. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  138. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  139. package/sdk/public-surface.json +529 -34
  140. package/dist/cli-bundle/chunks/append-7BXBFDGD.js +0 -2
  141. package/dist/cli-bundle/chunks/chunk-2AXF3VSK.js +0 -2
  142. package/dist/cli-bundle/chunks/chunk-2XS43CCV.js +0 -2
  143. package/dist/cli-bundle/chunks/chunk-3A6KWB72.js +0 -8
  144. package/dist/cli-bundle/chunks/chunk-3ISTDB42.js +0 -8
  145. package/dist/cli-bundle/chunks/chunk-4MTI7XOV.js +0 -5
  146. package/dist/cli-bundle/chunks/chunk-6BX5UDCN.js +0 -3
  147. package/dist/cli-bundle/chunks/chunk-6QPO7KLR.js +0 -2
  148. package/dist/cli-bundle/chunks/chunk-7MXHZHSQ.js +0 -5
  149. package/dist/cli-bundle/chunks/chunk-7ZPMJW4U.js +0 -2
  150. package/dist/cli-bundle/chunks/chunk-A6KGKEWT.js +0 -2
  151. package/dist/cli-bundle/chunks/chunk-AGYNSNCI.js +0 -2
  152. package/dist/cli-bundle/chunks/chunk-B4H7FEFH.js +0 -5
  153. package/dist/cli-bundle/chunks/chunk-B4KLBBMN.js +0 -2
  154. package/dist/cli-bundle/chunks/chunk-BXCSXK4J.js +0 -2
  155. package/dist/cli-bundle/chunks/chunk-CALJHNBL.js +0 -23
  156. package/dist/cli-bundle/chunks/chunk-CFIGP5LY.js +0 -2
  157. package/dist/cli-bundle/chunks/chunk-CHOQ2VAW.js +0 -2
  158. package/dist/cli-bundle/chunks/chunk-CS6MRHG7.js +0 -2
  159. package/dist/cli-bundle/chunks/chunk-CUGNQQKH.js +0 -2
  160. package/dist/cli-bundle/chunks/chunk-D4FPS43D.js +0 -164
  161. package/dist/cli-bundle/chunks/chunk-E2ZSLTOP.js +0 -2
  162. package/dist/cli-bundle/chunks/chunk-FB7G2HY2.js +0 -2
  163. package/dist/cli-bundle/chunks/chunk-H5Y5YE6A.js +0 -2
  164. package/dist/cli-bundle/chunks/chunk-H5Y6UV6E.js +0 -2
  165. package/dist/cli-bundle/chunks/chunk-H7KGWPDF.js +0 -2
  166. package/dist/cli-bundle/chunks/chunk-HFSD77TQ.js +0 -2
  167. package/dist/cli-bundle/chunks/chunk-HX2GTA6L.js +0 -2
  168. package/dist/cli-bundle/chunks/chunk-J2IEKAVR.js +0 -2
  169. package/dist/cli-bundle/chunks/chunk-JC6FKIFM.js +0 -2
  170. package/dist/cli-bundle/chunks/chunk-K44PYFXH.js +0 -2
  171. package/dist/cli-bundle/chunks/chunk-K4KGEEBT.js +0 -2
  172. package/dist/cli-bundle/chunks/chunk-KFLK5TRH.js +0 -21
  173. package/dist/cli-bundle/chunks/chunk-KL6IEBV2.js +0 -2
  174. package/dist/cli-bundle/chunks/chunk-KWQZDZSS.js +0 -2
  175. package/dist/cli-bundle/chunks/chunk-KZ4X3DGU.js +0 -3
  176. package/dist/cli-bundle/chunks/chunk-LD77HJMQ.js +0 -13
  177. package/dist/cli-bundle/chunks/chunk-LEPJJ6QC.js +0 -2
  178. package/dist/cli-bundle/chunks/chunk-ME2JJ4LA.js +0 -3
  179. package/dist/cli-bundle/chunks/chunk-NE5VRDAI.js +0 -2
  180. package/dist/cli-bundle/chunks/chunk-NFLJ3FHD.js +0 -2
  181. package/dist/cli-bundle/chunks/chunk-NG6OXIBR.js +0 -19
  182. package/dist/cli-bundle/chunks/chunk-NYIGHWQY.js +0 -8
  183. package/dist/cli-bundle/chunks/chunk-NZ75GNSA.js +0 -2
  184. package/dist/cli-bundle/chunks/chunk-PCJWJNC2.js +0 -2
  185. package/dist/cli-bundle/chunks/chunk-PD3225AM.js +0 -2
  186. package/dist/cli-bundle/chunks/chunk-PDEGKG7P.js +0 -2
  187. package/dist/cli-bundle/chunks/chunk-PIE5HBNA.js +0 -2
  188. package/dist/cli-bundle/chunks/chunk-PW2H7YJR.js +0 -56
  189. package/dist/cli-bundle/chunks/chunk-RSIC5OPE.js +0 -2
  190. package/dist/cli-bundle/chunks/chunk-TPKN3S7S.js +0 -2
  191. package/dist/cli-bundle/chunks/chunk-TPXAXTCO.js +0 -2
  192. package/dist/cli-bundle/chunks/chunk-UFWUJO4V.js +0 -2
  193. package/dist/cli-bundle/chunks/chunk-UQLZQVFW.js +0 -55
  194. package/dist/cli-bundle/chunks/chunk-VT3Z5G7D.js +0 -2
  195. package/dist/cli-bundle/chunks/chunk-WOD3WWUN.js +0 -2
  196. package/dist/cli-bundle/chunks/chunk-WSJEIGJF.js +0 -3
  197. package/dist/cli-bundle/chunks/chunk-WYNUU7ZW.js +0 -2008
  198. package/dist/cli-bundle/chunks/chunk-YGPNCCXZ.js +0 -2
  199. package/dist/cli-bundle/chunks/close-CMY3BAUG.js +0 -2
  200. package/dist/cli-bundle/chunks/close-many-SA4XZCTK.js +0 -2
  201. package/dist/cli-bundle/chunks/comments-EZ556ZD3.js +0 -2
  202. package/dist/cli-bundle/chunks/copy-ZSGPA52X.js +0 -2
  203. package/dist/cli-bundle/chunks/create-I5DVV4YG.js +0 -2
  204. package/dist/cli-bundle/chunks/delete-RL3JACSW.js +0 -2
  205. package/dist/cli-bundle/chunks/deps-S7UBCECS.js +0 -2
  206. package/dist/cli-bundle/chunks/docs-ZZNVBBYO.js +0 -2
  207. package/dist/cli-bundle/chunks/files-27C337VT.js +0 -2
  208. package/dist/cli-bundle/chunks/focus-5Z2SG7LU.js +0 -2
  209. package/dist/cli-bundle/chunks/history-compact-HJQK67CZ.js +0 -2
  210. package/dist/cli-bundle/chunks/history-redact-PWC6PDWA.js +0 -2
  211. package/dist/cli-bundle/chunks/history-repair-N3CY4WBF.js +0 -2
  212. package/dist/cli-bundle/chunks/learnings-4FH23XDT.js +0 -2
  213. package/dist/cli-bundle/chunks/profile-5Y5XXH5N.js +0 -2
  214. package/dist/cli-bundle/chunks/register-mutation-YGYPW3BL.js +0 -20
  215. package/dist/cli-bundle/chunks/register-operations-WMDSUMQF.js +0 -2
  216. package/dist/cli-bundle/chunks/register-setup-DL7FFABC.js +0 -2
  217. package/dist/cli-bundle/chunks/restore-6KYBV5BY.js +0 -2
  218. package/dist/cli-bundle/chunks/schema-EQGKBYXJ.js +0 -2
  219. package/dist/cli-bundle/chunks/update-QVTYOD6I.js +0 -2
  220. package/dist/cli-bundle/chunks/update-many-DJSBU525.js +0 -2
  221. package/dist/cli-bundle/focused-chunks/chunk-2ECLECMK.js +0 -12
  222. package/dist/cli-bundle/focused-chunks/chunk-4EX25PXM.js +0 -8
  223. package/dist/cli-bundle/focused-chunks/chunk-DLTS3IHM.js +0 -2
  224. package/dist/cli-bundle/focused-chunks/chunk-DQ6FKGL3.js +0 -14
  225. package/dist/cli-bundle/focused-chunks/chunk-JLG2C4EQ.js +0 -2
  226. package/dist/cli-bundle/focused-chunks/chunk-ZJIMJHDB.js +0 -2
@@ -1,2 +0,0 @@
1
- (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]="50ad61f1-6719-541c-b4e0-4a88468725cf")}catch{}})();var T=["commands","renderers","hooks","schema","importers","search","parser","preflight","services"],de=2,ue=Object.freeze({migration:"schema",validation:"schema"}),mt=Object.freeze({version:de,capabilities:[...T],legacy_aliases:{...ue}}),U=["off","warn","enforce"],P=["off","warn","enforce"],j=["none","restricted","strict"],gt=["block","warn"],V=["commands.override","commands.handler","hooks.beforecommand","hooks.beforemutation","hooks.aftercommand","hooks.onwrite","hooks.onread","hooks.onindex","schema.flags","schema.itemfields","schema.itemtypes","schema.relationshipkinds","schema.migrations","schema.profiles","parser.override","preflight.override","services.override","renderers.override","importers.importer","importers.exporter","search.provider","search.vectorstore"],F=["output_format","error_format","help_format","lock_acquire","lock_release","history_append","item_store_write","item_store_delete","context_relevance","command_result"];function K(){return{mode:"off",trust_mode:"off",require_provenance:!1,trusted_extensions:[],default_sandbox_profile:"none",allowed_extensions:[],blocked_extensions:[],allowed_capabilities:[],blocked_capabilities:[],allowed_surfaces:[],blocked_surfaces:[],allowed_commands:[],blocked_commands:[],allowed_actions:[],blocked_actions:[],allowed_services:[],blocked_services:[],extension_overrides:[]}}(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]="2a2072c1-f4a7-579e-ac11-4c75758d76d3")}catch{}})();var le=["Epic","Feature","Task","Chore","Issue","Decision","Event","Reminder","Milestone","Meeting","Plan"],bt=le,yt=["draft","open","in_progress","blocked","closed","canceled"],ht=["draft","active","blocked","terminal","terminal_done","terminal_canceled","default_open","default_close","default_cancel"],Ot=["string","number","boolean","string_array","array","object"],St=["create","update","update_many","list","search","calendar","context"],At=["allow","warn","reject"],Tt=["blocks","parent","child","parent_child","child_of","related","related_to","discovered_from","blocked_by","incident_from","epic","implements","supersedes","task","verifies"],Nt=["project","global"],It=["low","medium","high","critical"],kt=["low","medium","high","critical"],wt=["low","medium","high"];var Rt=["minimal","default","strict","custom"],xt=["none","warn","strict"],vt=["progressive","strict"],Ct=["off","warn","strict"],Dt=["off","warn","strict"];var Lt=["daily","weekly","monthly","yearly"],_e=["mon","tue","wed","thu","fri","sat","sun"];function Mt(e){return _e.indexOf(e)}var Ut=["draft","research","review","approved","executing","paused","completed","superseded"],Pt=["pending","in_progress","completed","blocked","skipped","superseded"],jt=["codex","claude-code","cursor","generic"],Vt=["related","blocks","blocked_by","depends_on","discovered_from","implements","verifies","supersedes"],Ft=["brief","standard","deep","full"],Kt=["hierarchy","activity","progress","recently_created","unparented","blockers","files","workload","staleness","tests"];(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]="46d7e58b-d1b6-5f9d-86cb-76ca671ed127")}catch{}})();var fe=Object.freeze([{id:"draft",roles:["draft"]},{id:"open",roles:["active","default_open"]},{id:"in_progress",aliases:["in-progress"],roles:["active"]},{id:"blocked",roles:["blocked"]},{id:"closed",roles:["terminal","terminal_done","default_close"]},{id:"canceled",aliases:["cancelled"],roles:["terminal","terminal_canceled","default_cancel"]}]),pe=Object.freeze({draft_status:"draft",open_status:"open",in_progress_status:"in_progress",blocked_status:"blocked",close_status:"closed",canceled_status:"canceled"}),Yt=".agents/pm",zt="settings.json";var me=["","epics","features","tasks","chores","issues","schema","history","search","extensions","locks"],ge=["decisions","events","reminders","milestones","meetings","plans"],Gt=[...me,...ge],qt={Epic:"epics",Feature:"features",Task:"tasks",Chore:"chores",Issue:"issues",Decision:"decisions",Event:"events",Reminder:"reminders",Milestone:"milestones",Meeting:"meetings",Plan:"plans"},Ee=["goal","objective","value","impact","outcome","why_now","parent","reviewer","risk","confidence","sprint","release","blocked_by","blocked_reason","unblock_note","reporter","severity","environment","repro_steps","resolution","expected_result","actual_result"],Wt=["id","title","description","type","pm_format_version","source_type","type_options","status","priority","tags","created_at","updated_at","deadline","reminders","events","closed_at","completed_at","assignee","claim_principal","source_owner","author","estimated_minutes","acceptance_criteria","design","external_ref","definition_of_ready","order",...Ee,"affected_version","fixed_version","component","regression","customer_impact","dependencies","comments","notes","learnings","files","tests","test_runs","docs","close_reason","duplicate_of","plan_mode","plan_scope","plan_harness","plan_resume_context","plan_validation","plan_decisions","plan_discoveries","plan_steps"],be={minimal:{ownership_enforcement:"none",create_mode_default:"progressive",close_validation_default:"off",require_close_reason:!0,parent_reference:"strict_error",metadata_profile:"core",force_required_for_stale_lock:!1,duplicate_detection_mode:"off",duplicate_detection_threshold:.8,duplicate_detection_limit:3},default:{ownership_enforcement:"warn",create_mode_default:"progressive",close_validation_default:"warn",require_close_reason:!0,parent_reference:"strict_error",metadata_profile:"core",force_required_for_stale_lock:!0,duplicate_detection_mode:"strict",duplicate_detection_threshold:.8,duplicate_detection_limit:3},strict:{ownership_enforcement:"strict",create_mode_default:"strict",close_validation_default:"strict",require_close_reason:!0,parent_reference:"strict_error",metadata_profile:"strict",force_required_for_stale_lock:!0,duplicate_detection_mode:"strict",duplicate_detection_threshold:.8,duplicate_detection_limit:3}},ye=["no active blocker","ready for planned execution sequencing","work completed","work is closed"],N={blocked_reason:["no active blocker because work is closed","work is closed"],resolution:["closed with implementation evidence","closed with verification evidence","work completed and recorded","work is closed"],actual_result:["closed and recorded","work completed","work completed and recorded"]};function B(e){return e?[...e]:void 0}var $t={version:1,id_prefix:"pm-",ids:{token_length:4},author_default:"",agent_identity:{probes_enabled:!0,identity_vocabulary:{version:1,aliases:{}},harness_signals:[]},mutation_guard:{require_attributed_author:!1,secret_guard:"advise",stale_in_progress_hours:72},item_format:"toon",locks:{ttl_seconds:1800,wait_ms:3e3},checkpoints:{retention_days:14},output:{default_format:"toon"},history:{missing_stream:"auto_create",compact_policy:{enabled:!1,max_entries:500,trigger:"health_warn"}},validation:{sprint_release_format:"warn",parent_reference:"warn",metadata_profile:"core",metadata_required_fields:[],lifecycle_stale_blocker_reason_patterns:[...ye],lifecycle_closure_like_blocked_reason_patterns:[...N.blocked_reason],lifecycle_closure_like_resolution_patterns:[...N.resolution],lifecycle_closure_like_actual_result_patterns:[...N.actual_result],estimate_defaults_by_type:{}},governance:{preset:"minimal",...be.minimal},workflow:{definition_of_done:[]},testing:{record_results_to_items:!1},telemetry:{enabled:!0,first_run_prompt_completed:!1,capture_level:"redacted",endpoint:"https://pm-cli.unbrained.dev/v1/events",installation_id:"",retention_days:365},agent_guidance:{prompt_completed:!1,declined:!1,declined_at:"",template_version:1,last_checked_files:[]},item_types:{definitions:[]},schema:{version:1,files:{types:"schema/types.json",statuses:"schema/statuses.json",fields:"schema/fields.json",workflows:"schema/workflows.json"},statuses:fe.map(e=>({...e,aliases:B(e.aliases),roles:B(e.roles)})),fields:[],workflow:{...pe},unknown_field_policy:"allow"},extensions:{enabled:[],disabled:[],policy:K()},search:{score_threshold:0,hybrid_semantic_weight:.7,max_results:50,embedding_model:"",embedding_batch_size:32,embedding_timeout_ms:3e4,scanner_max_batch_retries:3,provider:"",mutation_refresh_policy:"semantic_configured",query_expansion:{enabled:!1,provider:""},rerank:{enabled:!1,model:"",top_k:20}},providers:{openai:{base_url:"",api_key:"",model:""},ollama:{base_url:"",model:""}},context:{default_depth:"brief",activity_limit:10,stale_threshold_days:7,sections:{hierarchy:!0,activity:!0,progress:!0,recently_created:!0,unparented:!0,blockers:!0,files:!0,workload:!0,staleness:!0,tests:!0}},vector_store:{adapter:"",collection_name:"pm_items",qdrant:{url:"",api_key:""},lancedb:{path:""}}},Ht={metadata:{},body:""},_={SUCCESS:0,GENERIC_FAILURE:1,USAGE:2,NOT_FOUND:3,CONFLICT:4,DEPENDENCY_FAILED:5},Jt=Object.freeze({unknown_command:"usage",unknown_option:"usage",missing_required_option:"usage",missing_required_argument:"usage",invalid_command_usage:"usage",linked_test_value_not_quoted:"usage",invalid_argument_value:"validation",health_findings:"validation",validation_findings:"validation",close_through_update:"validation",no_update_fields:"validation",unsupported_update_option:"validation",tracker_not_initialized:"validation",item_not_found:"validation",ownership_conflict:"conflict",lock_conflict:"conflict",terminal_state_conflict:"conflict",dependency_failed:"runtime",init_gitignore_unwritable:"runtime",merge_git_config_unwritable:"runtime",command_failed:"runtime",unknown_error:"runtime"});(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]="c2c9251e-86bf-5a92-acdb-581e59d269d8")}catch{}})();var l=class extends Error{exitCode;code;context;constructor(t,n,o={}){super(t),this.name="PmCliError",this.exitCode=n,this.context=o,this.code=o.code}};(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]="15daa637-4d30-5794-bdb5-87585d443cd3")}catch{}})();var he=[...T],Oe=[...F],Se=[...U],tn=[...P],nn=[...j],Ae=[...V],X=["init","config","extension","package","packages","install","upgrade","create","item","copy","focus","list","list-all","list-draft","list-open","list-in-progress","list-blocked","list-closed","list-canceled","aggregate","context","ctx","get","graph","search","duplicates","eval","next","history","events","history-redact","history-repair","history-compact","history-author-acknowledge","merge","schema","profile","activity","restore","update","update-many","close","close-many","delete","append","comments","notes","learnings","files","docs","deps","plan","test","test-all","telemetry","stats","health","validate","gc","workspace","contracts","claim","release","start-task","pause-task","close-task","meet","event","remind","help"],on=["ancestors","descendants","predecessors","successors","paths","impact","analyze","audit","communities","redundancy","dominators","slack","centrality","articulation","plan","index"],Te=["init","install","uninstall","explore","manage","describe","reload","doctor","catalog","adopt","adopt-all","activate","deactivate"],Y={help:"Commander help rendering has no SDK operation result.",item:"The item namespace only groups lifecycle subcommands already exposed as actions.",packages:"The plural package alias only renders package-oriented help."},z=Object.freeze(X.flatMap(e=>e in Y?[]:e==="extension"||e==="package"?[...Te.map(t=>`${e}-${t}`),e]:[e]));function rn(e=X,t=z,n=Y){let o=new Set(t),s=new Set(e);return{missing_cli_actions:e.filter(r=>!o.has(r)&&n[r]===void 0),waived_cli_actions:e.filter(r=>!o.has(r)&&n[r]!==void 0),stale_waivers:Object.keys(n).filter(r=>!s.has(r)||o.has(r))}}function sn(e){return z.includes(e)}function an(e){return he.includes(e)}function cn(e){return Oe.includes(e)}function dn(e){return Se.includes(e)}function un(e){return Ae.includes(e)}(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]="ae6fbd4a-6c4e-5639-93ac-f107a336e95b")}catch{}})();function I(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Ne(e,t){let n=e;for(let o of t.split(".")){if(!I(n))return;n=n[o]}return n}function G(e,t,n){let o=t.split("."),s={...e},r=e,i=s;for(let c of o.slice(0,-1)){let a=r[c],d={...a};i[c]=d,r=a,i=d}return i[o.at(-1)]=n,s}function k(e){let t=e.row_contract;return I(t)&&Array.isArray(t.row_keys)?t.row_keys.filter(n=>typeof n=="string"&&n.trim().length>0):Object.entries(e).filter(([,n])=>Array.isArray(n)).map(([n])=>n)}function f(e){return k(e).flatMap(t=>{let n=Ne(e,t);return Array.isArray(n)||I(n)?[{path:t,value:n}]:[]})}function y(e){return f(e).reduce((t,n)=>t+(Array.isArray(n.value)?n.value.length:Object.keys(n.value).length),0)}function h(e,t){let n=e;for(let o of f(n)){let s=Array.isArray(o.value)?o.value.map((r,i)=>t(r,o.path,i)):Object.fromEntries(Object.entries(o.value).map(([r,i],c)=>[r,t(i,o.path,c)]));n=G(n,o.path,s)}return n}function q(e,t){let n=e,o=!1;for(let s of f(n)){let r=Array.isArray(s.value)?s.value:Object.entries(s.value);if(r.length<=t)continue;o=!0;let i=Array.isArray(s.value)?r.slice(0,t):Object.fromEntries(r.slice(0,t));n=G(n,s.path,i)}return{result:n,truncated:o}}(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]="04ad0d11-1fb7-5eb4-8ff0-d81a7090c4ff")}catch{}})();var w=256,W=1e4,Ie=/^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}$/u,ke=/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/u,we=new Set(["version","id","token_budget","spent_tokens","seen_item_ids"]),Re=[{valid:e=>e.version===1,reason:"version must equal 1."},{valid:e=>typeof e.id=="string"&&Ie.test(e.id),reason:"id must be 1-64 portable identifier characters."},{valid:e=>Number.isSafeInteger(e.token_budget)&&e.token_budget>=w,reason:`token_budget must be a safe integer of at least ${w}.`},{valid:e=>Number.isSafeInteger(e.spent_tokens)&&e.spent_tokens>=0&&e.spent_tokens<=e.token_budget,reason:"spent_tokens must be a non-negative safe integer no larger than token_budget."},{valid:e=>Array.isArray(e.seen_item_ids)&&e.seen_item_ids.length<=W&&e.seen_item_ids.every(t=>typeof t=="string"&&ke.test(t)),reason:`seen_item_ids must contain at most ${W} portable item identifiers.`}];function S(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function O(e){throw new l(`--output-session ${e}`,_.USAGE,{code:"invalid_read_output_session",field:"outputSession"})}function R(e){if(e===void 0)return;let t=e;if(typeof e=="string")try{t=JSON.parse(e)}catch{O("must be a valid JSON object.")}S(t)||O("must be a JSON object.");let n=Object.keys(t).filter(r=>!we.has(r));n.length>0&&O(`contains unknown field "${n.sort()[0]}".`);let o=Re.find(r=>!r.valid(t));o!==void 0&&O(o.reason);let s=[...new Set(t.seen_item_ids)].sort();return{version:1,id:t.id,token_budget:t.token_budget,spent_tokens:t.spent_tokens,seen_item_ids:s}}function $(e){if(S(e))return typeof e.id=="string"?e.id:typeof e.item_id=="string"?e.item_id:S(e.item)&&typeof e.item.id=="string"?e.item.id:void 0}function xe(e){let t=new Set,n=0;for(let o of f(e)){let s=Array.isArray(o.value)?o.value:Object.values(o.value);for(let r of s){if(!S(r))continue;if(typeof r.context_ref=="string"){n+=1;continue}let i=$(r);i!==void 0&&t.add(i)}}return{deliveredIds:t,suppressedRepeatCount:n}}function H(e,t){let n=new Set(t.seen_item_ids);return h(e,o=>{let s=$(o);return s!==void 0&&n.has(s)?{id:s,context_ref:`session:${t.id}:${s}`}:o})}function x(e,t){let{deliveredIds:n,suppressedRepeatCount:o}=xe(e),s=[...new Set([...t.seen_item_ids,...n])].sort(),r={contract_version:1,id:t.id,measurement_scope:"complete_read_envelope",estimator:"ceil(utf8_bytes / 4)",token_budget:t.token_budget,spent_before_tokens:t.spent_tokens,spent_this_call_tokens:0,charged_this_call_tokens:0,spent_total_tokens:t.spent_tokens,remaining_tokens:t.token_budget-t.spent_tokens,exhausted:!1,seen_before_count:t.seen_item_ids.length,new_item_count:n.size,suppressed_repeat_count:o,reference_format:"session:<session-id>:<item-id>",restore_reference_with:"pm get <item-id> --brief",next_state:{version:1,id:t.id,token_budget:t.token_budget,spent_tokens:t.spent_tokens,seen_item_ids:s}},i={...e,read_session:r},c=u=>{r.spent_this_call_tokens=u,r.charged_this_call_tokens=Math.min(t.token_budget-t.spent_tokens,u),r.spent_total_tokens=Math.min(t.token_budget,t.spent_tokens+r.charged_this_call_tokens),r.remaining_tokens=Math.max(0,t.token_budget-r.spent_total_tokens),r.exhausted=r.remaining_tokens<w,r.next_state.spent_tokens=r.spent_total_tokens},a=0,d=0;for(let u=0;u<8;u+=1){c(a);let E=Math.ceil(Buffer.byteLength(JSON.stringify(i),"utf8")/4);if(E===a)return i;d=Math.max(d,E),a=E}return c(d),i}function J(e){return Math.max(0,e.token_budget-e.spent_tokens)}(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]="1726fdce-dc71-5707-ae75-b588691e813d")}catch{}})();var ve=8,Ce=64;function De(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function v(e,t){return typeof e=="string"?e.length<=240?e:(t.compacted=!0,`${e.slice(0,240)}\u2026`):Array.isArray(e)?e.map(n=>v(n,t)):De(e)?Object.fromEntries(Object.entries(e).map(([n,o])=>[n,v(o,t)])):e}function p(e,t){let n=t.estimated_tokens;for(let o=0;o<ve;o+=1){t.estimated_tokens=n;let s=Math.ceil(Buffer.byteLength(JSON.stringify(e),"utf8")/4);if(s===n)return;n=s}t.estimated_tokens=n}function Le(e,t,n){for(let o=0;o<Ce;o+=1){if(p(e,t),t.estimated_tokens<=n)return;let s=f(e).filter(r=>(Array.isArray(r.value)?r.value.length:Object.keys(r.value).length)>1).map(r=>({collection:r,length:Array.isArray(r.value)?r.value.length:Object.keys(r.value).length})).sort((r,i)=>i.length-r.length||r.collection.path.localeCompare(i.collection.path))[0]?.collection;if(!s)return;if(Array.isArray(s.value))s.value.splice(-Math.max(1,Math.ceil(s.value.length/2)));else{let r=Object.keys(s.value);for(let i of r.slice(-Math.max(1,Math.ceil(r.length/2))))delete s.value[i]}t.rows_compacted=!0,e.has_more=!0,e.truncated=!0,typeof e.count=="number"&&(e.count=y(e))}}function Z(e,t,n){let o={compacted:!1},s=v(e,o);return t.strings_compacted=o.compacted,s.read_output=t,Le(s,t,n),p(s,t),s}(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]="0bccb953-bd78-5eee-a78d-8af3e250fa55")}catch{}})();var m=["include","amount","cost","encoding"],oe=["list","context","search","get","next","health","deps","graph","history","activity","validate","events","contracts","comments","notes","files","docs","stats","aggregate"],re=["canonical","legacy","intent","default"],M={include:"--output-include",amount:"--output-limit",cost:"--output-budget",encoding:"--output-format"},Tn=Object.freeze(m.map(e=>M[e])),Nn=Object.freeze(["--output-session"]),Me={list:{include:["--brief","--compact","--fields","--full"],amount:["--after","--limit","--no-truncate"],cost:["--token-budget"],encoding:["--format","--stream"]},context:{include:["--fields","--section"],amount:["--after","--depth","--limit"],cost:["--token-budget"],encoding:["--format"]},search:{include:["--compact","--fields","--full"],amount:["--after","--limit"],cost:["--token-budget"],encoding:["--format"]},get:{include:["--fields","--full"],amount:["--depth"],cost:["--token-budget"],encoding:["--format"]},next:{amount:["--blocked-limit","--limit"],cost:["--token-budget"],encoding:["--format"]},health:{include:["--brief","--check-only","--full","--summary","--verbose"]},deps:{include:["--collapse","--full","--summary"],amount:["--edge-limit","--max-depth","--node-limit"],cost:["--token-budget"],encoding:["--format"]},graph:{include:["--full","--summary"],amount:["--after","--limit","--max-depth","--max-paths"]},history:{include:["--compact","--full"],amount:["--limit"],encoding:["--format"]},activity:{include:["--compact","--full"],amount:["--limit","--unbounded"],encoding:["--stream"]},validate:{include:["--counts","--full","--verbose"]},events:{include:["--full"],amount:["--limit"],encoding:["--follow"]},contracts:{include:["--full","--summary"]},comments:{amount:["--limit"]},notes:{amount:["--limit"]},files:{amount:["--limit","--no-truncate","--offset"]},docs:{},stats:{},aggregate:{}},Ue=new Set(["--fields","--section"]),Pe=Object.freeze({"--after":"--after retains cursor-position semantics; use --output-limit <n> separately to bound returned rows.","--check-only":"--check-only retains health side-effect semantics; --output-include does not suppress vector refresh.","--depth":"--depth retains traversal or detail-depth semantics; --output-limit does not replace it.","--follow":"--follow retains event-tail semantics; --output-format does not enable following.","--max-depth":"--max-depth retains graph traversal-depth semantics; --output-limit does not replace it.","--max-paths":"--max-paths retains graph path-search semantics; use --output-limit separately to bound returned rows.","--offset":"--offset retains positional pagination semantics; use --output-limit separately to bound returned rows.","--stream":"--stream retains command streaming semantics; --output-format selects only static result encoding."});function se(e){return e.slice(2).replaceAll("-","_")}function je(e,t){let n=Pe[e];if(n!==void 0)return n;let o=t==="include"?Ue.has(e)?"<csv>":se(e):t==="amount"?"<n>":t==="cost"?"<tokens>":"<toon|json>";return`${e} is a compatibility alias; prefer ${M[t]} ${o}.`}function Ve(e){let t=Me[e],n=Object.freeze(Object.fromEntries(m.map(o=>[o,Object.freeze({dimension:o,canonical_option:M[o],applicable:!0,inapplicable_reason:null,legacy_aliases:Object.freeze((t[o]??[]).map(s=>Object.freeze({flag:s,migration_hint:je(s,o),visibility:"hidden_alias"})))})])));return Object.freeze({command:e,dimensions:n,precedence:re})}var Fe=Object.freeze(oe.map(Ve)),Ke=new Map(Fe.map(e=>[e.command,e]));function ie(e){let t=e.trim().toLowerCase().split(/\s+/u)[0],n=t.startsWith("list-")?"list":t==="ctx"?"context":t;return oe.includes(n)?n:void 0}var Be=["outputInclude","output_include","outputLimit","output_limit","outputBudget","output_budget","outputFormat","output_format","outputSession","output_session"],Xe={comments:["add","body","stdin","file","edit","delete"],notes:["add","addJson","stdin","file","edit","delete"],files:["add","addGlob","remove","migrate","apply","note"],docs:["add","addGlob","remove","migrate","note"]};function Ye(e){return Be.some(t=>e[t]!==void 0)}var ze=[{keys:["outputInclude","output_include"],valid:e=>C(e)!==void 0,message:"--output-include requires at least one comma-separated field or section."},{keys:["outputLimit","output_limit"],valid:e=>e==="unbounded"||g(e)!==void 0,message:"--output-limit must be a positive integer or unbounded."},{keys:["outputBudget","output_budget"],valid:e=>g(e)!==void 0,message:"--output-budget must be a positive integer."},{keys:["outputFormat","output_format"],valid:e=>e==="toon"||e==="json",message:"--output-format must be toon or json."},{keys:["outputSession","output_session"],valid:e=>(R(e),!0),message:"--output-session must be a valid session-state object."}];function In(e,t){if(!Ye(t))return;let n=ie(e);if(!n)throw new l(`Universal output controls apply only to read commands; ${e||"this command"} is not a read surface.`,_.USAGE);if((Xe[n]??[]).some(o=>t[o]!==void 0&&t[o]!==!1))throw new l(`Universal output controls cannot be combined with a ${n} mutation.`,_.USAGE);for(let o of ze){let s=o.keys.map(r=>t[r]).find(r=>r!==void 0);if(s!==void 0&&!o.valid(s))throw new l(o.message,_.USAGE)}}function Ge(e){return e.slice(2).replace(/-([a-z])/gu,(t,n)=>n.toUpperCase())}function qe(e,t){let n=Ge(t);if(Object.hasOwn(e,n))return e[n];let o=t.slice(2).replaceAll("-","_");if(Object.hasOwn(e,o))return e[o];if(t==="--no-truncate"&&e.truncate===!1)return!0}function We(e){return e!==void 0&&e!==!1&&e!==null}function C(e){let n=(Array.isArray(e)?e:[e]).flatMap(o=>typeof o=="string"?o.split(","):[]).map(o=>o.trim()).filter(Boolean);return n.length>0?[...new Set(n)]:void 0}function g(e){let t=typeof e=="number"?e:typeof e=="string"&&/^\d+$/u.test(e.trim())?Number(e):Number.NaN;return Number.isSafeInteger(t)&&t>0?t:void 0}function $e(e,t,n){for(let o of e.legacy_aliases){let s=qe(t,o.flag),r={value:s,flag:o.flag};if(We(s)&&n(r))return r}}function Q(e,t){let n=C(e);if(n)return{source:"canonical",value:n};if(t)return{source:"legacy",value:C(t.value)??[se(t.flag)]}}function ee(e,t){if(e==="unbounded")return{source:"canonical",value:"unbounded"};let n=g(e);if(n!==void 0)return{source:"canonical",value:n};if(!t)return;if(t.flag==="--no-truncate"||t.flag==="--unbounded")return{source:"legacy",value:"unbounded"};let o=g(t.value);return o===void 0?void 0:{source:"legacy",value:o}}function te(e,t){let n=g(e);if(n!==void 0)return{source:"canonical",value:n};if(!t)return;let o=g(t.value);return o===void 0?void 0:{source:"legacy",value:o}}function ne(e,t){if(e==="json"||e==="toon")return{source:"canonical",value:e};if(t)return t.flag==="--stream"||t.flag==="--follow"?{source:"legacy",value:"stream"}:t.value==="json"||t.value==="toon"?{source:"legacy",value:t.value}:void 0}function ae(e,t){let n=ie(e);if(!n)return;let o=Ke.get(n),s={include:a=>Q(void 0,a),amount:a=>ee(void 0,a),cost:a=>te(void 0,a),encoding:a=>ne(void 0,a)},r=Object.fromEntries(m.map(a=>[a,$e(o.dimensions[a],t,d=>s[a](d)!==void 0)])),i=m.flatMap(a=>{let d=r[a];return d?[d.flag]:[]}),c=m.flatMap(a=>{let d=r[a];return d?[o.dimensions[a].legacy_aliases.find(E=>E.flag===d.flag).migration_hint]:[]});return{command:n,include:Q(t.outputInclude??t.output_include,r.include),amount:ee(t.outputLimit??t.output_limit,r.amount),cost:te(t.outputBudget??t.output_budget,r.cost),encoding:ne(t.outputFormat??t.output_format,r.encoding),legacy_aliases_used:i,migration_hints:c,precedence:re}}function D(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var He=new Set(["applied_bound","applied_limit","completeness","continuation_contract","count","filters","has_more","next_cursor","now","omission_receipt","projection","row_contract","sorting","total","truncated"]);function Je(e,t){let n=new Set(t.map(o=>o.split(".")[0]));return Object.fromEntries(Object.entries(e).filter(([o])=>n.has(o)))}function Ze(e,t){let n=k(e),o=t.flatMap(r=>n.flatMap(i=>r.startsWith(`${i}.`)?[r.slice(i.length+1)]:[])),s=t.some(r=>Object.hasOwn(e,r.split(".")[0])&&!n.some(i=>r.startsWith(`${i}.`)));if(n.length>0&&(!s||o.length>0)){let r={...e};return h(r,i=>D(i)?Je(i,o.length>0?o:t):i)}return Object.fromEntries(Object.entries(e).filter(([r])=>t.some(i=>i.split(".")[0]===r)||He.has(r)))}function Qe(e,t){if(t==="unbounded")return e;let{result:n,truncated:o}=q(e,t);return o&&(n.has_more=!0,n.truncated=!0,typeof n.count=="number"&&(n.count=y(n)),n.applied_bound={kind:"output_limit",source:"explicit",value:t}),n}function et(e){return m.filter(t=>e[t]!==void 0)}function L(e,t,n){let o=x(e,t);for(let s=0;s<8;s+=1){let r=n.estimated_tokens,i=o.read_session.spent_this_call_tokens;p(o,n),o=x(o,t);let c=o.read_session.spent_this_call_tokens;if(n.estimated_tokens===r&&c===i)return o}return o}function tt(e,t,n){let o={...e};return t.include?.source==="canonical"&&(o=Ze(o,t.include.value)),t.amount?.source==="canonical"&&(o=Qe(o,t.amount.value)),n===void 0?o:H(o,n)}function nt(e,t){let n=[...e.cost?.source==="canonical"?[e.cost.value]:[],...t===void 0?[]:[J(t)]];return n.length===0?void 0:Math.min(...n)}function ot(e,t,n,o){let s={contract_version:1,command:e.command,requested_dimensions:t,precedence:e.precedence,legacy_aliases_used:[],migration_hints:[],estimated_tokens:0,within_budget:!1,strings_compacted:!1,rows_compacted:!1,result_omitted:!0},r={output_budget_exceeded:{omitted_result:!0,reason:"requested_budget_infeasible",restore_with:"Increase --output-budget or narrow the read."},read_output:s},i=n===void 0?r:L(r,n,s);if(n===void 0&&p(i,s),n!==void 0&&s.estimated_tokens>o)throw new l("The remaining output-session budget cannot fit its mandatory receipts; start a new session with a larger token_budget.",_.USAGE);return i}function kn(e,t,n){let o=ae(e,t);if(!o)return n;let s=R(t.outputSession??t.output_session),r=et(o);if(r.filter(u=>o[u]?.source==="canonical").length===0&&s===void 0)return n;let c=tt(n,o,s),a={contract_version:1,command:o.command,requested_dimensions:r,precedence:o.precedence,legacy_aliases_used:o.legacy_aliases_used,migration_hints:o.migration_hints,estimated_tokens:0,within_budget:!0,strings_compacted:!1,rows_compacted:!1,result_omitted:!1};c.read_output=a,c=s===void 0?c:L(c,s,a),p(c,a);let d=nt(o,s);return d!==void 0&&a.estimated_tokens>d&&(c=Z(c,a,d),s!==void 0&&(c=L(c,s,a))),d!==void 0&&a.estimated_tokens>d?ot(o,r,s,d):c}function wn(e){return D(e)&&D(e.output_budget_exceeded)&&e.output_budget_exceeded.omitted_result===!0&&e.output_budget_exceeded.reason==="requested_budget_infeasible"}function Rn(e,t){let n=ae(e,t)?.encoding;return n?.value==="json"||n?.value==="toon"?n.value:void 0}(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]="f6e82c93-54e8-53a7-94df-10a573aae933")}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]="47bfb287-bdd9-5984-9db4-cb996845d98c")}catch{}})();var rt=Object.freeze([{flag:"--json"},{flag:"--lean"},{flag:"--token-accounting"},{flag:"--output-include",value_name:"fields"},{flag:"--output-limit",value_name:"count"},{flag:"--output-budget",value_name:"tokens"},{flag:"--output-format",value_name:"toon|json"},{flag:"--output-session",value_name:"state"},{flag:"--quiet"},{flag:"--no-changed-fields"},{flag:"--full-changed-fields"},{flag:"--id-only"},{flag:"--pm-path",aliases:["--path"]},{flag:"--no-extensions"},{flag:"--no-pager"},{flag:"--profile"},{flag:"--help"},{flag:"--author",value_name:"id"}]),Dn=new Set(rt.flatMap(e=>[e.flag,...e.aliases??[]]));import st from"node:crypto";(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]="83232698-197a-5aef-be7c-aa37f3c56822")}catch{}})();function it(e){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return e.toString();if(e===void 0)return"undefined";if(typeof e=="symbol")return e.toString();if(typeof e=="function")return`[function:${e.name||"anonymous"}]`}function at(e){let t=Object.keys(e).sort(),n={};for(let o of t){let s=e[o];s!==void 0&&(n[o]=A(s))}return n}function A(e){let t=it(e);if(t!==void 0)return t;if(Array.isArray(e))return e.map(o=>A(o));if(e instanceof Date)return e.toISOString();let n=e;if(typeof n.toJSON=="function"){let o=n.toJSON();if(o!==e)return A(o)}return at(e)}function Un(e){return JSON.stringify(A(e))}function ce(e,t,n,o){for(let s=0;s<t.length;s+=1)if(!n.has(s)&&o(e,t[s]))return n.add(s),!0;return!1}function ct(e,t){if(e instanceof RegExp||t instanceof RegExp)return e instanceof RegExp&&t instanceof RegExp&&e.toString()===t.toString()}function dt(e,t){if(e instanceof Date||t instanceof Date)return e instanceof Date&&t instanceof Date&&e.getTime()===t.getTime()}function ut(e,t){if(!(e instanceof Set||t instanceof Set))return;if(!(e instanceof Set&&t instanceof Set)||e.size!==t.size)return!1;let n=[...t],o=new Set;for(let s of e)if(!ce(s,n,o,b))return!1;return!0}function lt(e,t){if(!(e instanceof Map||t instanceof Map))return;if(!(e instanceof Map&&t instanceof Map)||e.size!==t.size)return!1;let n=[...t.entries()],o=new Set;for(let[s,r]of e.entries())if(!ce([s,r],n,o,([c,a],[d,u])=>b(c,d)&&b(a,u)))return!1;return!0}function _t(e,t){if(Array.isArray(e)||Array.isArray(t))return!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length?!1:e.every((n,o)=>b(n,t[o]))}function ft(e,t){let n=Object.keys(e).sort((s,r)=>s.localeCompare(r)),o=Object.keys(t).sort((s,r)=>s.localeCompare(r));if(n.length!==o.length)return!1;for(let s=0;s<n.length;s+=1){let r=n[s];if(r!==o[s]||!b(e[r],t[r]))return!1}return!0}var pt=[ct,dt,ut,lt,_t];function b(e,t){if(Object.is(e,t))return!0;if(e===null||t===null||typeof e!="object"||typeof t!="object")return!1;for(let n of pt){let o=n(e,t);if(o!==void 0)return o}return ft(e,t)}function Pn(e){return st.createHash("sha256").update(e,"utf8").digest("hex")}function jn(e,t){let n={};for(let s of t){let r=e[s];r!==void 0&&(n[s]=r)}let o=Object.keys(e).filter(s=>!t.includes(s)).sort((s,r)=>s.localeCompare(r));for(let s of o){let r=e[s];r!==void 0&&(n[s]=r)}return n}export{T as a,de as b,ue as c,mt as d,U as e,P as f,j as g,gt as h,V as i,F as j,K as k,le as l,bt as m,yt as n,ht as o,Ot as p,St as q,At as r,Tt as s,Nt as t,It as u,kt as v,wt as w,Rt as x,xt as y,vt as z,Ct as A,Dt as B,Lt as C,_e as D,Mt as E,Ut as F,Pt as G,jt as H,Vt as I,Ft as J,Kt as K,fe as L,pe as M,Yt as N,zt as O,me as P,Gt as Q,qt as R,Wt as S,be as T,ye as U,N as V,$t as W,Ht as X,_ as Y,l as Z,rt as _,Dn as $,Un as aa,b as ba,Pn as ca,jn as da,he as ea,Oe as fa,Se as ga,tn as ha,nn as ia,Ae as ja,X as ka,on as la,Te as ma,Y as na,z as oa,rn as pa,sn as qa,an as ra,cn as sa,dn as ta,un as ua,W as va,R as wa,H as xa,x as ya,J as za,m as Aa,oe as Ba,Tn as Ca,Nn as Da,Fe as Ea,ie as Fa,In as Ga,ae as Ha,kn as Ia,wn as Ja,Rn as Ka};
2
- //# sourceMappingURL=chunk-ZJIMJHDB.js.map