@unbrained/pm-cli 2026.8.4 → 2026.8.5

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 (214) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +39 -13
  3. package/dist/cli/error-guidance.js +4 -4
  4. package/dist/cli/register-structured-mutation.d.ts +2 -0
  5. package/dist/cli/register-structured-mutation.js +124 -12
  6. package/dist/cli-bundle/bundle-manifest.json +407 -407
  7. package/dist/cli-bundle/chunks/append-VXXGOXSG.js +2 -0
  8. package/dist/cli-bundle/chunks/{chunk-QVO3VTA4.js → chunk-2WFXWAYX.js} +2 -2
  9. package/dist/cli-bundle/chunks/{chunk-NM5G7RLU.js → chunk-3FTILRJ2.js} +2 -2
  10. package/dist/cli-bundle/chunks/{chunk-VH2EAGUG.js → chunk-42E7YPLG.js} +2 -2
  11. package/dist/cli-bundle/chunks/{chunk-RB65T4RX.js → chunk-43HQQI6S.js} +2 -2
  12. package/dist/cli-bundle/chunks/{chunk-J4EPW4GT.js → chunk-45G53IU4.js} +2 -2
  13. package/dist/cli-bundle/chunks/{chunk-PQXEB7W4.js → chunk-4VN6GS4U.js} +2 -2
  14. package/dist/cli-bundle/chunks/chunk-4YUBDMQM.js +2 -0
  15. package/dist/cli-bundle/chunks/{chunk-D2MBVMVE.js → chunk-54FNT7U2.js} +2 -2
  16. package/dist/cli-bundle/chunks/{chunk-NRDKVOUE.js → chunk-5ZBOIPGP.js} +2 -2
  17. package/dist/cli-bundle/chunks/{chunk-3XZYTRPC.js → chunk-6MSQJOTG.js} +2 -2
  18. package/dist/cli-bundle/chunks/{chunk-GOICHIX4.js → chunk-7A5OT5J2.js} +2 -2
  19. package/dist/cli-bundle/chunks/{chunk-HTYC76A4.js → chunk-7C4PTJG6.js} +2 -2
  20. package/dist/cli-bundle/chunks/{chunk-BKMZTZYL.js → chunk-A62CYISG.js} +2 -2
  21. package/dist/cli-bundle/chunks/{chunk-5H47J5FG.js → chunk-BPELKUQD.js} +2 -2
  22. package/dist/cli-bundle/chunks/{chunk-HE3DZFN4.js → chunk-BXQLRKWF.js} +2 -2
  23. package/dist/cli-bundle/chunks/{chunk-BLINBTMX.js → chunk-CSI3WS5I.js} +2 -2
  24. package/dist/cli-bundle/chunks/{chunk-KH4GVBMC.js → chunk-DXDREUXT.js} +2 -2
  25. package/dist/cli-bundle/chunks/{chunk-KIKLF2W4.js → chunk-E2RKBKWB.js} +2 -2
  26. package/dist/cli-bundle/chunks/{chunk-377OOXUF.js → chunk-EGJ4JTUG.js} +2 -2
  27. package/dist/cli-bundle/chunks/{chunk-SULWTPQO.js → chunk-FPBQHMFT.js} +2 -2
  28. package/dist/cli-bundle/chunks/{chunk-V5K52PYW.js → chunk-GE4KCSZP.js} +35 -35
  29. package/dist/cli-bundle/chunks/{chunk-NPUJ7OLK.js → chunk-HNFD72UK.js} +2 -2
  30. package/dist/cli-bundle/chunks/{chunk-QMWUL66F.js → chunk-HWRRMBJO.js} +5 -5
  31. package/dist/cli-bundle/chunks/chunk-L3AZOELJ.js +2 -0
  32. package/dist/cli-bundle/chunks/{chunk-CGY5I2GO.js → chunk-LKDGK44W.js} +2 -2
  33. package/dist/cli-bundle/chunks/chunk-LN2WFEU4.js +2 -0
  34. package/dist/cli-bundle/chunks/{chunk-ZSH4GNBH.js → chunk-M72BKL5Q.js} +2 -2
  35. package/dist/cli-bundle/chunks/{chunk-HQ2WU7OY.js → chunk-MHK6LIWE.js} +2 -2
  36. package/dist/cli-bundle/chunks/{chunk-H6FITE7D.js → chunk-NE5VRDAI.js} +2 -2
  37. package/dist/cli-bundle/chunks/chunk-NY4T3JWN.js +2 -0
  38. package/dist/cli-bundle/chunks/{chunk-DCJ6CM6F.js → chunk-OMXVBQ2N.js} +2 -2
  39. package/dist/cli-bundle/chunks/chunk-OPVH7SKD.js +8 -0
  40. package/dist/cli-bundle/chunks/{chunk-CU5ENFNP.js → chunk-OTHLDSFP.js} +2 -2
  41. package/dist/cli-bundle/chunks/{chunk-NH35JNK5.js → chunk-PMXJEU3F.js} +2 -2
  42. package/dist/cli-bundle/chunks/{chunk-SVDH5CHC.js → chunk-Q35VBGOQ.js} +4 -4
  43. package/dist/cli-bundle/chunks/{chunk-5PZGZMPG.js → chunk-R546TPDE.js} +2 -2
  44. package/dist/cli-bundle/chunks/{chunk-Q5F6OI7C.js → chunk-RKAVWO3O.js} +2 -2
  45. package/dist/cli-bundle/chunks/{chunk-JMKVCQSE.js → chunk-SSF4PIUR.js} +2 -2
  46. package/dist/cli-bundle/chunks/{chunk-PA5XRN2A.js → chunk-UN66FZRO.js} +3 -3
  47. package/dist/cli-bundle/chunks/{chunk-FQ4EFFDU.js → chunk-UP7DTVMD.js} +2 -2
  48. package/dist/cli-bundle/chunks/{chunk-NFF3JAQR.js → chunk-UZBWIUYD.js} +2 -2
  49. package/dist/cli-bundle/chunks/{chunk-2POYGY53.js → chunk-V3774P7D.js} +2 -2
  50. package/dist/cli-bundle/chunks/{chunk-B5ZLCD5Z.js → chunk-V3EUXXOF.js} +2 -2
  51. package/dist/cli-bundle/chunks/{chunk-6S7I3UKV.js → chunk-VCKLFEUN.js} +19 -19
  52. package/dist/cli-bundle/chunks/{chunk-PYYPQLHC.js → chunk-VN5VITU3.js} +2 -2
  53. package/dist/cli-bundle/chunks/chunk-WRL4KNDL.js +20 -0
  54. package/dist/cli-bundle/chunks/{chunk-UJHUR3LZ.js → chunk-XCEZYMNI.js} +2 -2
  55. package/dist/cli-bundle/chunks/{chunk-JDPKBV5P.js → chunk-YEWNL576.js} +2 -2
  56. package/dist/cli-bundle/chunks/{chunk-OB7TRZ2G.js → chunk-YSO3YFZ4.js} +2 -2
  57. package/dist/cli-bundle/chunks/{chunk-UVZREFZU.js → chunk-ZYHOB3SN.js} +2 -2
  58. package/dist/cli-bundle/chunks/close-VZ3OQPN5.js +2 -0
  59. package/dist/cli-bundle/chunks/close-many-SB4TI27P.js +2 -0
  60. package/dist/cli-bundle/chunks/comments-BIF3Q4KY.js +2 -0
  61. package/dist/cli-bundle/chunks/copy-6AI5Z57X.js +2 -0
  62. package/dist/cli-bundle/chunks/{create-RLLCBCXM.js → create-XLKTXTUF.js} +2 -2
  63. package/dist/cli-bundle/chunks/delete-ZY2VHQTP.js +2 -0
  64. package/dist/cli-bundle/chunks/{deps-J4ONTF4X.js → deps-ITTY3GIC.js} +2 -2
  65. package/dist/cli-bundle/chunks/{docs-YL2DJ4WD.js → docs-W4OSRTYR.js} +2 -2
  66. package/dist/cli-bundle/chunks/{files-NGNAIYKK.js → files-EOK4AZI4.js} +2 -2
  67. package/dist/cli-bundle/chunks/focus-DLBNWL7L.js +2 -0
  68. package/dist/cli-bundle/chunks/{history-compact-HW62K5XP.js → history-compact-7UGTMLL3.js} +2 -2
  69. package/dist/cli-bundle/chunks/{history-redact-HVBKUJOW.js → history-redact-4DZRMD6Z.js} +2 -2
  70. package/dist/cli-bundle/chunks/{history-repair-OPNBH5JJ.js → history-repair-UPOSZW5R.js} +2 -2
  71. package/dist/cli-bundle/chunks/{learnings-F36PZXT6.js → learnings-GMRNCBS3.js} +2 -2
  72. package/dist/cli-bundle/chunks/{profile-N3XMWBM7.js → profile-2MUUMHRE.js} +2 -2
  73. package/dist/cli-bundle/chunks/{register-list-query-BKGHBI7Y.js → register-list-query-LR3SQ5ZF.js} +2 -2
  74. package/dist/cli-bundle/chunks/register-mutation-SUOHFVWM.js +20 -0
  75. package/dist/cli-bundle/chunks/register-operations-ARRRKOVN.js +2 -0
  76. package/dist/cli-bundle/chunks/{register-setup-KWV6UD77.js → register-setup-O6AYP6NP.js} +2 -2
  77. package/dist/cli-bundle/chunks/restore-ZVCVHTB5.js +2 -0
  78. package/dist/cli-bundle/chunks/{schema-4PJQMGUY.js → schema-FJ4EA3XF.js} +2 -2
  79. package/dist/cli-bundle/chunks/update-YHV52CSS.js +2 -0
  80. package/dist/cli-bundle/chunks/update-many-M6YHVNXM.js +2 -0
  81. package/dist/cli-bundle/focused-chunks/chunk-7J5TUBUJ.js +153 -0
  82. package/dist/cli-bundle/focused-chunks/{chunk-ONIX2KKW.js → chunk-A7BJ5SS6.js} +2 -2
  83. package/dist/cli-bundle/focused-chunks/chunk-B7LJWAZE.js +2 -0
  84. package/dist/cli-bundle/focused-chunks/{chunk-QM2BIVK7.js → chunk-BIMTMOS7.js} +3 -3
  85. package/dist/cli-bundle/focused-chunks/{chunk-BOGRY7M6.js → chunk-FGKY4MBE.js} +10 -10
  86. package/dist/cli-bundle/focused-chunks/chunk-G6ETT4QK.js +2 -0
  87. package/dist/cli-bundle/focused-chunks/{chunk-C2QSL62X.js → chunk-GJ2TG2CW.js} +2 -2
  88. package/dist/cli-bundle/focused-chunks/{chunk-RO5BQFG3.js → chunk-IPWSFADF.js} +2 -2
  89. package/dist/cli-bundle/focused-chunks/{chunk-UFCPSWIL.js → chunk-MJ7HWSFK.js} +2 -2
  90. package/dist/cli-bundle/focused-chunks/{chunk-2VIIXOAD.js → chunk-N5XU5UVK.js} +2 -2
  91. package/dist/cli-bundle/focused-chunks/chunk-PG2RIZBX.js +2 -0
  92. package/dist/cli-bundle/focused-chunks/{chunk-OYTK4VNH.js → chunk-PIMMYG7Q.js} +2 -2
  93. package/dist/cli-bundle/focused-chunks/{chunk-K37BB4JL.js → chunk-QVHKCI4T.js} +2 -2
  94. package/dist/cli-bundle/focused-chunks/{chunk-SQXVGHMH.js → chunk-RUR5I3TK.js} +2 -2
  95. package/dist/cli-bundle/focused-chunks/chunk-SV3O7TSH.js +8 -0
  96. package/dist/cli-bundle/focused-chunks/{chunk-L6A4NVQC.js → chunk-UIL2M2NA.js} +2 -2
  97. package/dist/cli-bundle/focused-chunks/{chunk-WVGJAD7L.js → chunk-VLYOEYML.js} +2 -2
  98. package/dist/cli-bundle/focused-chunks/chunk-W7BJEWHX.js +2 -0
  99. package/dist/cli-bundle/focused-chunks/{chunk-DQ4PLKEE.js → chunk-WEM2E2PE.js} +2 -2
  100. package/dist/cli-bundle/focused-chunks/chunk-WVIVUWVL.js +5 -0
  101. package/dist/cli-bundle/focused-chunks/chunk-Y4LDYLLT.js +2 -0
  102. package/dist/cli-bundle/main.js +4 -4
  103. package/dist/cli-bundle/sdk-authoring.js +1 -1
  104. package/dist/cli-bundle/sdk-contracts.js +1 -1
  105. package/dist/cli-bundle/sdk-core.js +28 -28
  106. package/dist/cli-bundle/sdk-governance.js +1 -1
  107. package/dist/cli-bundle/sdk-graph.js +1 -1
  108. package/dist/cli-bundle/sdk-merge.js +1 -1
  109. package/dist/cli-bundle/sdk-query.js +1 -1
  110. package/dist/cli-bundle/sdk-runtime.js +1 -1
  111. package/dist/cli-bundle/sdk-testing.js +1 -1
  112. package/dist/cli-bundle/sdk.js +1 -1
  113. package/dist/core/extensions/loader.js +5 -2
  114. package/dist/core/item/item-format.js +14 -20
  115. package/dist/core/shared/constants.js +3 -2
  116. package/dist/core/store/item-store.js +2 -2
  117. package/dist/core/store/settings.js +2 -2
  118. package/dist/mcp/server.js +12 -6
  119. package/dist/mcp/tool-definitions.js +14 -7
  120. package/dist/sdk/cli-contracts/agent-output-contracts.d.ts +18 -18
  121. package/dist/sdk/cli-contracts/agent-output-contracts.js +51 -23
  122. package/dist/sdk/cli-contracts/commander-mutation-options.js +26 -2
  123. package/dist/sdk/cli-contracts/flag-contracts.d.ts +2 -0
  124. package/dist/sdk/cli-contracts/flag-contracts.js +28 -2
  125. package/dist/sdk/cli-contracts/registration-helpers.js +4 -2
  126. package/dist/sdk/cli-contracts/runtime-contracts.d.ts +10 -2
  127. package/dist/sdk/cli-contracts/runtime-contracts.js +20 -5
  128. package/dist/sdk/cli-contracts/tool-schema.js +4 -2
  129. package/dist/sdk/cli-contracts.d.ts +2 -2
  130. package/dist/sdk/cli-contracts.js +4 -4
  131. package/dist/sdk/cli-program.js +3 -3
  132. package/dist/sdk/contracts.d.ts +1 -0
  133. package/dist/sdk/contracts.js +3 -2
  134. package/dist/sdk/dependency-provenance.d.ts +2 -0
  135. package/dist/sdk/dependency-provenance.js +7 -3
  136. package/dist/sdk/error-code-catalog.d.ts +23 -0
  137. package/dist/sdk/error-code-catalog.js +25 -5
  138. package/dist/sdk/generated-error-code-catalog.js +499 -3
  139. package/dist/sdk/graph/governance.js +3 -3
  140. package/dist/sdk/graph/remediation.js +3 -3
  141. package/dist/sdk/graph/run.js +4 -8
  142. package/dist/sdk/index.d.ts +2 -1
  143. package/dist/sdk/index.js +4 -3
  144. package/dist/sdk/item-transaction.d.ts +51 -6
  145. package/dist/sdk/item-transaction.js +132 -22
  146. package/dist/sdk/lifecycle/create.d.ts +4 -0
  147. package/dist/sdk/lifecycle/create.js +26 -10
  148. package/dist/sdk/lifecycle-policy.d.ts +9 -0
  149. package/dist/sdk/lifecycle-policy.js +22 -9
  150. package/dist/sdk/merge/driver.js +6 -3
  151. package/dist/sdk/output-contracts.d.ts +67 -0
  152. package/dist/sdk/output-contracts.js +173 -0
  153. package/dist/sdk/package-import-adapters.js +2 -2
  154. package/dist/sdk/structured-mutations.d.ts +23 -0
  155. package/dist/sdk/structured-mutations.js +219 -10
  156. package/dist/sdk/workspace-snapshot.js +58 -12
  157. package/dist/sdk/workspace.js +30 -4
  158. package/docs/COMMANDS.md +40 -10
  159. package/docs/EXTENSIONS.md +1 -1
  160. package/docs/MERGE_SAFETY.md +2 -0
  161. package/docs/PR_REVIEW_LOOP.md +10 -4
  162. package/docs/README.md +22 -22
  163. package/docs/RELEASING.md +3 -3
  164. package/docs/SCRIPTING.md +32 -9
  165. package/docs/SDK.md +91 -11
  166. package/docs/SELF_DESCRIBING_CONTEXT_CONTRACTS.md +13 -0
  167. package/docs/TESTING.md +25 -0
  168. package/docs/examples/sdk-contract-consumer/README.md +11 -1
  169. package/docs/examples/sdk-contract-consumer/package.json +2 -1
  170. package/docs/examples/sdk-contract-consumer/parse-receipt.mjs +22 -0
  171. package/marketplace.json +2 -2
  172. package/package.json +3 -2
  173. package/packages/pm-beads/package.json +1 -1
  174. package/packages/pm-calendar/package.json +1 -1
  175. package/packages/pm-command-kit/package.json +1 -1
  176. package/packages/pm-digital-twin/package.json +1 -1
  177. package/packages/pm-governance-audit/package.json +1 -1
  178. package/packages/pm-guide-shell/package.json +1 -1
  179. package/packages/pm-kanban/package.json +1 -1
  180. package/packages/pm-lifecycle-hooks/package.json +1 -1
  181. package/packages/pm-linked-test-adapters/package.json +1 -1
  182. package/packages/pm-search-advanced/package.json +1 -1
  183. package/packages/pm-templates/package.json +1 -1
  184. package/packages/pm-todos/package.json +1 -1
  185. package/packages/pm-vcs/package.json +1 -1
  186. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  187. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  188. package/sdk/public-surface.json +292 -14
  189. package/dist/cli-bundle/chunks/append-DHBRLHHS.js +0 -2
  190. package/dist/cli-bundle/chunks/chunk-2INN52SU.js +0 -8
  191. package/dist/cli-bundle/chunks/chunk-6RSK4IFN.js +0 -20
  192. package/dist/cli-bundle/chunks/chunk-ASJJKA57.js +0 -2
  193. package/dist/cli-bundle/chunks/chunk-IYAVULRN.js +0 -2
  194. package/dist/cli-bundle/chunks/chunk-RRQBHQOV.js +0 -2
  195. package/dist/cli-bundle/chunks/chunk-XBLOD5TZ.js +0 -2
  196. package/dist/cli-bundle/chunks/close-VLHNN6YB.js +0 -2
  197. package/dist/cli-bundle/chunks/close-many-LSJNZKU6.js +0 -2
  198. package/dist/cli-bundle/chunks/comments-AAIA6A6X.js +0 -2
  199. package/dist/cli-bundle/chunks/copy-Z7YMLEHN.js +0 -2
  200. package/dist/cli-bundle/chunks/delete-KNOHHQJM.js +0 -2
  201. package/dist/cli-bundle/chunks/focus-LFRCGALV.js +0 -2
  202. package/dist/cli-bundle/chunks/register-mutation-GU3DCECN.js +0 -20
  203. package/dist/cli-bundle/chunks/register-operations-PTWH727R.js +0 -2
  204. package/dist/cli-bundle/chunks/restore-4HZSLILR.js +0 -2
  205. package/dist/cli-bundle/chunks/update-E6LPS5IV.js +0 -2
  206. package/dist/cli-bundle/chunks/update-many-OSIC6KRO.js +0 -2
  207. package/dist/cli-bundle/focused-chunks/chunk-5MTKO7TV.js +0 -153
  208. package/dist/cli-bundle/focused-chunks/chunk-6GIZK7VQ.js +0 -2
  209. package/dist/cli-bundle/focused-chunks/chunk-AOP2WIZZ.js +0 -2
  210. package/dist/cli-bundle/focused-chunks/chunk-CL75YW32.js +0 -2
  211. package/dist/cli-bundle/focused-chunks/chunk-E7OFMWGT.js +0 -8
  212. package/dist/cli-bundle/focused-chunks/chunk-I5F5UK3Q.js +0 -2
  213. package/dist/cli-bundle/focused-chunks/chunk-T5TSY36R.js +0 -5
  214. package/dist/cli-bundle/focused-chunks/chunk-VT6BF2IX.js +0 -2
@@ -1,2 +0,0 @@
1
- import{a as o}from"./chunk-J4EPW4GT.js";import"./chunk-BKMZTZYL.js";import"./chunk-5H47J5FG.js";import"./chunk-RSIC5OPE.js";import"./chunk-NRDKVOUE.js";import"./chunk-A6KGKEWT.js";import"./chunk-VH2EAGUG.js";import"./chunk-ZSH4GNBH.js";import"./chunk-V5K52PYW.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="d79c73c8-07a5-5a39-aca5-4058264684d6")}catch{}})();export{o as runAppend};
2
- //# sourceMappingURL=append-DHBRLHHS.js.map
@@ -1,8 +0,0 @@
1
- import{b as z,c as N,e as M,f as x,g as G,h as g,i as b,j as _,l as H,m as w,o as U,p as k}from"./chunk-ASJJKA57.js";import{Z as V,z as j}from"./chunk-BKMZTZYL.js";import{A as v,C,Cc as I,La as R,Oa as D,Pe as y,Se as L,b as F,oc as O,yf as P}from"./chunk-V5K52PYW.js";import{Option as X}from"commander";(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]="b10305d7-7272-56a5-9178-3083e7cead7d")}catch{}})();async function ue(e,t,r,n,i){let s=R(process.cwd(),n.path),l=await I("command_result",{command:e,args:t,options:r,global:n,pm_root:s,result:i});return l.handled?l.result:i}function de(e,t){for(let[r,n]of Object.entries(t))e.setOptionValueWithSource(r,n,"cli")}function q(e,t){let r=[],n=new Set;for(let i of t.keys){if(!Object.hasOwn(e,i))continue;let s=e[i];if(s!=null){if(typeof s=="string"){r.push(s);continue}if(!Array.isArray(s)||!s.every(l=>typeof l=="string"))return;n.has(s)||(n.add(s),r.push(...s))}}return r.length>0?r.join("; "):void 0}var B=Symbol("pm.resolvedGlobalOptions");function K(e){return typeof e=="object"&&e!==null?e:{}}function u(e,t){return e.find(n=>n.target===t)??{target:t,keys:[t]}}function fe(e,t){e[B]={...t}}function me(e){delete e[B]}function E(e,t){return typeof e[t]=="string"?e[t]:void 0}function ge(e){let t=Q(e),r=e[B];if(r)return{...r,...t.length>0?{command:t}:{}};let n=K(e),i=typeof n.optsWithGlobals=="function"?n.optsWithGlobals():typeof n.opts=="function"?n.opts():{};return{json:i.json===!0?!0:void 0,quiet:!!i.quiet,noChangedFields:i.changedFields===!1,...i.fullChangedFields===!0?{fullChangedFields:!0}:{},idOnly:i.idOnly===!0,...i.lean===!0?{lean:!0}:{},...i.tokenAccounting===!0?{tokenAccounting:!0}:{},outputInclude:E(i,"outputInclude"),outputLimit:E(i,"outputLimit"),outputBudget:E(i,"outputBudget"),...i.outputFormat==="toon"||i.outputFormat==="json"?{outputFormat:i.outputFormat}:{},path:typeof i.pmPath=="string"?i.pmPath:typeof i.path=="string"?i.path:void 0,noExtensions:i.extensions===!1,noPager:!!i.noPager,profile:!!i.profile,...t.length>0?{command:t}:{},...typeof i.author=="string"?{author:i.author}:{}}}function Q(e){let t=[],r=e;for(;r?.parent;)t.unshift(r.name()),r=r.parent;return t.join(" ")}async function pe(e){if(e.json===!0)return e;let t=R(process.cwd(),e.path);if(!await F(D(t)))return e;let r=await P(t);return{...e,defaultOutputFormat:r.output.default_format}}function Z(e,t){let r=t??[];return r.push(e),r}function d(e,t,r){if(typeof r!="string")return;let n=r.trim();n.length!==0&&e.push(t,n)}function f(e,t,r){r===!0&&e.push(t)}function h(e,t,r){if(Array.isArray(r))for(let n of r){if(typeof n!="string")continue;let i=n.trim();i.length!==0&&e.push(t,i)}}function a(e,t){return e[t]===!0?!0:void 0}function m(e,t){return e[t]===!1?!0:void 0}function ye(e,t){return typeof e[t]=="string"?e[t]:void 0}function ee(e,t,r,n=!1,i=void 0){let s=new X(t,r).hideHelp();n&&s.argParser(i??Z),e.addOption(s)}function he(e,t,r){for(let[n,i]of t)ee(e,n,i,r)}function J(e,t){return t.some(r=>e[r]===!0)?!0:void 0}function W(e,t){let r=b(e,t);return typeof r=="string"||typeof r=="number"&&Number.isFinite(r)?r:void 0}function T(e,t){for(let[r,n]of Object.entries(t))r==="__proto__"||r==="constructor"||r==="prototype"||Object.hasOwn(e,r)||(e[r]=n)}function Ae(e,t){let r=["test",e,"--run","--json","--progress"];return h(r,"--add",t.add),h(r,"--add-json",t.addJson),h(r,"--remove",t.remove),d(r,"--match",t.match),d(r,"--only-index",t.onlyIndex),f(r,"--only-last",t.onlyLast),h(r,"--measure",t.measure),d(r,"--metric-below",t.metricBelow),d(r,"--metric-diff",t.metricDiff),$(r,t),d(r,"--author",t.author),d(r,"--message",t.message),f(r,"--force",t.force),r}function $(e,t){d(e,"--timeout",t.timeout),h(e,"--env-set",t.envSet),h(e,"--env-clear",t.envClear),f(e,"--shared-host-safe",t.sharedHostSafe),d(e,"--pm-context",t.pmContext),f(e,"--override-linked-pm-context",t.overrideLinkedPmContext),f(e,"--fail-on-context-mismatch",t.failOnContextMismatch),f(e,"--fail-on-skipped",t.failOnSkipped),f(e,"--fail-on-empty-test-run",t.failOnEmptyTestRun),f(e,"--require-assertions-for-pm",t.requireAssertionsForPm),f(e,"--check-context",t.checkContext),f(e,"--auto-pm-context",t.autoPmContext)}function ve(e){let t=["test-all","--json","--progress"];return d(t,"--status",e.status),d(t,"--limit",e.limit),d(t,"--offset",e.offset),$(t,e),t}function te(e){return e.join(",")}function Ce(e,t={}){let r=l=>g(e,u(H,l)),n=l=>_(e,u(w,l)),i=r("type");if(t.requireType!==!1&&i===void 0)throw new C("Missing required option --type <value>. Why required: create resolves runtime schema fields/workflow from item type. Retry: add --type <built-in or configured custom type> (example: --type Task).",v.USAGE);let s={title:r("title"),description:r("description"),type:i,template:r("template"),createMode:r("createMode"),schedulePreset:r("schedulePreset"),status:r("status"),priority:r("priority"),tags:r("tags"),addTags:n("addTags"),body:r("body"),deadline:r("deadline"),estimatedMinutes:r("estimatedMinutes"),acceptanceCriteria:q(e,u(w,"acceptanceCriteria")),definitionOfReady:r("definitionOfReady"),order:r("order"),rank:r("rank"),goal:r("goal"),objective:r("objective"),value:r("value"),impact:r("impact"),outcome:r("outcome"),whyNow:r("whyNow"),author:r("author"),message:r("message"),assignee:r("assignee"),parent:r("parent"),allowMissingParent:J(e,["allowMissingParent","allow_missing_parent"])===!0,allowDuplicate:a(e,"allowDuplicate")===!0,reviewer:r("reviewer"),risk:r("risk"),confidence:r("confidence"),sprint:r("sprint"),release:r("release"),blockedBy:r("blockedBy"),blockedReason:r("blockedReason"),unblockNote:r("unblockNote"),reporter:r("reporter"),severity:r("severity"),environment:r("environment"),reproSteps:r("reproSteps"),resolution:r("resolution"),expectedResult:r("expectedResult"),actualResult:r("actualResult"),affectedVersion:r("affectedVersion"),fixedVersion:r("fixedVersion"),component:r("component"),regression:e.regression===!0?"true":r("regression"),customerImpact:r("customerImpact"),dep:n("dep"),comment:n("comment"),note:n("note"),learning:n("learning"),file:n("file"),test:n("test"),doc:n("doc"),reminder:n("reminder"),event:n("event"),typeOption:n("typeOption"),field:n("field"),unset:n("unset"),clearDeps:a(e,"clearDeps"),clearComments:a(e,"clearComments"),clearNotes:a(e,"clearNotes"),clearLearnings:a(e,"clearLearnings"),clearFiles:a(e,"clearFiles"),clearTests:a(e,"clearTests"),clearDocs:a(e,"clearDocs"),clearReminders:a(e,"clearReminders"),clearEvents:a(e,"clearEvents"),clearTypeOptions:a(e,"clearTypeOptions")};return T(s,e),s}function Re(e){let t=i=>g(e,u(U,i)),r=i=>_(e,u(k,i)),n={title:t("title"),description:t("description"),body:t("body"),status:t("status"),closeReason:t("closeReason"),priority:t("priority"),type:t("type"),tags:t("tags"),addTags:r("addTags"),removeTags:r("removeTags"),deadline:t("deadline"),estimatedMinutes:t("estimatedMinutes"),acceptanceCriteria:q(e,u(k,"acceptanceCriteria")),addAc:r("addAc"),removeAc:r("removeAc"),definitionOfReady:t("definitionOfReady"),order:t("order"),rank:t("rank"),goal:t("goal"),objective:t("objective"),value:t("value"),impact:t("impact"),outcome:t("outcome"),whyNow:t("whyNow"),author:t("author"),message:t("message"),force:!!e.force,ownershipMetadataBypass:e.ownershipMetadataBypass===!0?!0:void 0,ownershipDependencyBypass:e.ownershipDependencyBypass===!0?!0:void 0,assignee:t("assignee"),parent:t("parent"),reviewer:t("reviewer"),risk:t("risk"),confidence:t("confidence"),sprint:t("sprint"),release:t("release"),blockedBy:t("blockedBy"),blockedReason:t("blockedReason"),unblockNote:t("unblockNote"),reporter:t("reporter"),severity:t("severity"),environment:t("environment"),reproSteps:t("reproSteps"),resolution:t("resolution"),expectedResult:t("expectedResult"),actualResult:t("actualResult"),affectedVersion:t("affectedVersion"),fixedVersion:t("fixedVersion"),component:t("component"),regression:e.regression===!0?"true":t("regression"),customerImpact:t("customerImpact"),dep:r("dep"),depRemove:r("depRemove"),replaceDeps:a(e,"replaceDeps"),replaceTests:a(e,"replaceTests"),replaceFiles:a(e,"replaceFiles"),replaceDocs:a(e,"replaceDocs"),comment:r("comment"),note:r("note"),learning:r("learning"),file:r("file"),test:r("test"),doc:r("doc"),reminder:r("reminder"),event:r("event"),typeOption:r("typeOption"),field:r("field"),unset:r("unset"),clearDeps:a(e,"clearDeps"),clearComments:a(e,"clearComments"),clearNotes:a(e,"clearNotes"),clearLearnings:a(e,"clearLearnings"),clearFiles:a(e,"clearFiles"),clearTests:a(e,"clearTests"),clearDocs:a(e,"clearDocs"),clearReminders:a(e,"clearReminders"),clearEvents:a(e,"clearEvents"),clearTypeOptions:a(e,"clearTypeOptions")};return T(n,e),n}var re=new Set(["filterStatus","filterType","filterTag","filterPriority","filterDeadlineBefore","filterDeadlineAfter","filterUpdatedAfter","filterUpdatedBefore","filterCreatedAfter","filterCreatedBefore","filterAssignee","filterAssigneeFilter","filterAssignee_filter","filterParent","filterSprint","filterRelease","filterAcMissing","filterEstimatesMissing","filterEstimateMissing","filterResolutionMissing","filterMetadataMissing","filterReviewerMissing","filterRiskMissing","filterConfidenceMissing","filterSprintMissing","filterReleaseMissing","filterHasNotes","filterNoNotes","filterHasLearnings","filterNoLearnings","filterHasFiles","filterNoFiles","filterHasDocs","filterNoDocs","filterHasTests","filterNoTests","filterHasComments","filterNoComments","filterHasDeps","filterNoDeps","filterHasBody","filterEmptyBody","filterHasLinkedCommand","filterNoLinkedCommand","ids","limit","offset","dryRun","rollback","checkpoint"]);function Te(e){let t={};for(let[r,n]of Object.entries(e))re.has(r)||(t[r]=n);return t}function o(e,t){let r=u(z,t),n=g(e,r);if(n!==void 0)return n;for(let i of r.keys){let s=e[i];if(Array.isArray(s)){let l=s.filter(c=>typeof c=="string");if(l.length>0)return l.join(",")}if(t==="ids"&&typeof s=="string")return s;if(typeof s=="number"&&Number.isFinite(s))return String(s)}}function Y(e){let t=a(e,"filterFilesMissing"),r=a(e,"filterDocsMissing");return{filterReviewerMissing:a(e,"filterReviewerMissing"),filterRiskMissing:a(e,"filterRiskMissing"),filterConfidenceMissing:a(e,"filterConfidenceMissing"),filterSprintMissing:a(e,"filterSprintMissing"),filterReleaseMissing:a(e,"filterReleaseMissing"),hasNotes:a(e,"hasNotes"),hasLearnings:a(e,"hasLearnings"),hasFiles:a(e,"hasFiles"),hasDocs:a(e,"hasDocs"),hasTests:a(e,"hasTests"),hasComments:a(e,"hasComments"),hasDeps:a(e,"hasDeps"),hasBody:a(e,"hasBody"),hasLinkedCommand:a(e,"hasLinkedCommand"),noNotes:m(e,"notes"),noLearnings:m(e,"learnings"),noFiles:m(e,"files")??t,filterFilesMissing:t,noDocs:m(e,"docs")??r,filterDocsMissing:r,noTests:m(e,"tests"),noComments:m(e,"comments"),noDeps:m(e,"deps"),emptyBody:a(e,"emptyBody"),noLinkedCommand:m(e,"linkedCommand")}}function Se(e){let t={status:o(e,"status"),type:o(e,"type"),tag:o(e,"tag"),priority:o(e,"priority"),deadlineBefore:o(e,"deadlineBefore"),deadlineAfter:o(e,"deadlineAfter"),updatedAfter:o(e,"updatedAfter"),updatedBefore:o(e,"updatedBefore"),createdAfter:o(e,"createdAfter"),createdBefore:o(e,"createdBefore"),today:a(e,"today"),recent:a(e,"recent"),ids:o(e,"ids"),assignee:o(e,"assignee"),assigneeFilter:o(e,"assigneeFilter"),parent:o(e,"parent"),sprint:o(e,"sprint"),release:o(e,"release"),limit:o(e,"limit"),offset:o(e,"offset"),noTruncate:m(e,"truncate"),includeBody:a(e,"includeBody"),strictRead:a(e,"strictRead"),compact:a(e,"compact"),brief:a(e,"brief"),full:a(e,"full"),fields:o(e,"fields"),sort:o(e,"sort"),order:o(e,"order"),tree:a(e,"tree"),treeDepth:o(e,"treeDepth"),filterAcMissing:a(e,"filterAcMissing"),filterEstimatesMissing:J(e,["filterEstimatesMissing","filterEstimateMissing"]),filterResolutionMissing:a(e,"filterResolutionMissing"),filterMetadataMissing:a(e,"filterMetadataMissing"),...Y(e)};return T(t,e),t}function Oe(e){return{groupBy:typeof e.groupBy=="string"?e.groupBy:void 0,count:e.count===!0?!0:void 0,completion:e.completion===!0?!0:void 0,sum:typeof e.sum=="string"?e.sum:void 0,avg:typeof e.avg=="string"?e.avg:void 0,includeUnparented:e.includeUnparented===!0||e.include_unparented===!0,status:typeof e.status=="string"?e.status:void 0,type:o(e,"type"),tag:o(e,"tag"),priority:o(e,"priority"),deadlineBefore:o(e,"deadlineBefore"),deadlineAfter:o(e,"deadlineAfter"),assignee:o(e,"assignee"),assigneeFilter:o(e,"assigneeFilter"),parent:o(e,"parent"),sprint:o(e,"sprint"),release:o(e,"release")}}function Ne(e,t,r){if(O(t),r.quiet)return;let n=Array.isArray(t.warnings)?t.warnings:[],i={type:"meta",command:e,count:t.count,now:t.now,filters:t.filters};if(n.length>0&&(i.warnings=n),!!y(`${JSON.stringify(i)}
2
- `)){for(let s of t.items)if(!y(`${JSON.stringify({type:"item",command:e,item:s})}
3
- `))return;y(`${JSON.stringify({type:"end",command:e,count:t.count})}
4
- `)}}function Me(e,t,r){if(O(e),r.quiet)return;let n={type:"meta",command:"activity",count:e.count,filters:{id:t.id??null,op:t.op??null,author:t.author??null,from:t.from??null,to:t.to??null,limit:t.limit??null}};if(!y(`${JSON.stringify(n)}
5
- `))return;let i=e.compact&&e.compact_activity?e.compact_activity:e.activity??[];for(let s of i)if(!y(`${JSON.stringify({type:"entry",command:"activity",entry:s})}
6
- `))return;y(`${JSON.stringify({type:"end",command:"activity",count:e.count})}
7
- `)}function xe(e){let t=S=>g(e,u(N,S)),r=S=>{let A=b(e,u(N,S));if(typeof A=="string"||typeof A=="number"&&Number.isFinite(A))return A},n=t("fields"),i=e.compact===!0,s=e.full===!0,l=!i&&!s&&n===void 0,p={mode:e.semantic===!0?"semantic":e.hybrid===!0?"hybrid":t("mode"),matchMode:t("matchMode"),minScore:r("minScore"),count:a(e,"count"),semanticWeight:r("semanticWeight"),includeLinked:a(e,"includeLinked"),titleExact:a(e,"titleExact"),phraseExact:a(e,"phraseExact"),highlight:a(e,"highlight"),status:t("status"),type:t("type"),tag:t("tag"),priority:t("priority"),deadlineBefore:t("deadlineBefore"),deadlineAfter:t("deadlineAfter"),updatedAfter:t("updatedAfter"),updatedBefore:t("updatedBefore"),createdAfter:t("createdAfter"),createdBefore:t("createdBefore"),assignee:t("assignee"),sprint:t("sprint"),release:t("release"),parent:t("parent"),limit:t("limit"),fields:n,compact:i||l?!0:void 0,full:a(e,"full"),...Y(e)};return T(p,e),p}function be(e){let t=e.map(r=>r.trim()).filter(r=>r.length>0).join(" ");if(t.length===0)throw new C("Search query must not be empty",v.USAGE);return t}function _e(e){let t=r=>g(e,u(G,r));return{id:t("id"),op:t("op"),author:t("author"),from:t("from"),to:t("to"),limit:t("limit"),compact:e.full===!0||e.provenance===!0?!1:e.compact!==!1,unbounded:a(e,"unbounded"),provenance:a(e,"provenance"),provenanceSummary:a(e,"provenanceSummary"),harness:Array.isArray(e.harness)?e.harness:void 0,agentInstance:Array.isArray(e.agentInstance)?e.agentInstance:void 0,provenanceFilter:Array.isArray(e.provenanceFilter)?e.provenanceFilter:void 0}}var ne=new Set(["","rows","ndjson","jsonl","true","1","yes","on"]),ie=new Set(["false","off","none","0"]);function we(e){if(e===!0)return!0;if(e===!1||e===void 0||e===null)return!1;if(typeof e=="string"){let t=e.trim().toLowerCase();if(ne.has(t))return!0;if(ie.has(t))return!1}throw new C("Activity --stream accepts rows|ndjson|jsonl (or no value)",v.USAGE)}function ke(e){let t=l=>g(e,u(M,l)),r=l=>W(e,u(M,l)),n=e.section,i=Array.isArray(n)?n.filter(l=>typeof l=="string"&&l.trim().length>0):typeof n=="string"&&n.trim().length>0?[n]:void 0,s={date:t("date"),from:t("from"),to:t("to"),past:e.past===!0?!0:void 0,type:t("type"),tag:t("tag"),priority:t("priority"),assignee:t("assignee"),assigneeFilter:t("assigneeFilter"),sprint:t("sprint"),release:t("release"),parent:t("parent"),limit:t("limit"),format:t("format"),depth:t("depth"),fields:t("fields"),section:i&&i.length>0?i:void 0,activityLimit:t("activityLimit"),staleThreshold:t("staleThreshold"),tokenBudget:r("tokenBudget"),noExtensionHealth:e.extensionHealth===!1?!0:void 0,noTags:e.tags===!1?!0:void 0};for(let[l,c]of Object.entries(e))Object.hasOwn(s,l)||(s[l]=c);return s}function Ee(e){let t=i=>g(e,u(x,i)),r=i=>W(e,u(x,i)),n={type:t("type"),tag:t("tag"),priority:r("priority"),assignee:t("assignee"),assigneeFilter:t("assigneeFilter"),sprint:t("sprint"),release:t("release"),parent:t("parent"),limit:t("limit"),blockedLimit:t("blockedLimit"),readyOnly:e.readyOnly===!0||e.ready_only===!0?!0:void 0,format:t("format"),tokenBudget:r("tokenBudget")};for(let[i,s]of Object.entries(e))Object.hasOwn(n,i)||(n[i]=s);return n}function ae(e){if(!e||typeof e!="object")return[];let t=e,r=new Set,n=c=>{if(typeof c!="string")return;let p=c.trim();p.length!==0&&r.add(p)};n(t.id);let i=t.item;i&&typeof i=="object"&&n(i.id);let s=t.ids;if(Array.isArray(s))for(let c of s)n(c);let l=t.items;if(Array.isArray(l))for(let c of l)!c||typeof c!="object"||n(c.id);return[...r].sort((c,p)=>c.localeCompare(p))}async function Be(e,t){let r=R(process.cwd(),e.path),n=await V(r,ae(t),{background:!j()});e.profile&&n.warnings.length>0&&L(`profile:search_refresh_warnings=${te(n.warnings)}`)}export{ue as a,de as b,fe as c,me as d,ge as e,Q as f,pe as g,Z as h,ye as i,ee as j,he as k,Ae as l,ve as m,te as n,Ce as o,Re as p,Te as q,Se as r,Oe as s,Ne as t,Me as u,xe as v,be as w,_e as x,we as y,ke as z,Ee as A,Be as B};
8
- //# sourceMappingURL=chunk-2INN52SU.js.map