@unbrained/pm-cli 2026.11.28 → 2026.11.30

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 (196) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/dist/cli/commander-usage.js +4 -4
  3. package/dist/cli/error-guidance.js +5 -5
  4. package/dist/cli/linked-resource-value-list.js +2 -0
  5. package/dist/cli-bundle/bundle-manifest.json +1 -1
  6. package/dist/cli-bundle/chunks/{chunk-O2WNNIKK.js → chunk-2SBTXR6C.js} +2 -2
  7. package/dist/cli-bundle/chunks/{chunk-YEMFOKFG.js → chunk-3AZOATC2.js} +2 -2
  8. package/dist/cli-bundle/chunks/{chunk-CATRDGAB.js → chunk-3TXEWHQX.js} +2 -2
  9. package/dist/cli-bundle/chunks/chunk-47ZS6RPL.js +2 -0
  10. package/dist/cli-bundle/chunks/{chunk-MGJMQSN4.js → chunk-4QA5O64H.js} +2 -2
  11. package/dist/cli-bundle/chunks/chunk-5EFS7K7Y.js +1 -0
  12. package/dist/cli-bundle/chunks/{chunk-E2LQ6LCJ.js → chunk-5PNOVDVO.js} +2 -2
  13. package/dist/cli-bundle/chunks/{chunk-OFIYA3PI.js → chunk-AOTI76Q6.js} +3 -3
  14. package/dist/cli-bundle/chunks/{chunk-TWRUA2NH.js → chunk-CCKM5YQM.js} +2 -2
  15. package/dist/cli-bundle/chunks/{chunk-CTM26LUE.js → chunk-DCWGM7CY.js} +2 -2
  16. package/dist/cli-bundle/chunks/chunk-FECZV72T.js +2 -0
  17. package/dist/cli-bundle/chunks/{chunk-O2SWNEBW.js → chunk-FR7ULTM4.js} +2 -2
  18. package/dist/cli-bundle/chunks/chunk-GSLOAEY2.js +2 -0
  19. package/dist/cli-bundle/chunks/{chunk-ZXERHBMA.js → chunk-HXQ3OHQR.js} +2 -2
  20. package/dist/cli-bundle/chunks/{chunk-T7RZPIOB.js → chunk-IGEFPHV7.js} +2 -2
  21. package/dist/cli-bundle/chunks/{chunk-FG4TNQQM.js → chunk-JPJNJHQW.js} +2 -2
  22. package/dist/cli-bundle/chunks/{chunk-6OIHST4I.js → chunk-K672XXGQ.js} +3 -3
  23. package/dist/cli-bundle/chunks/{chunk-CDUV7DFD.js → chunk-KCVSSONY.js} +2 -2
  24. package/dist/cli-bundle/chunks/{chunk-LMDIKSDZ.js → chunk-KXTKLDKD.js} +8 -8
  25. package/dist/cli-bundle/chunks/chunk-NHBG5ET3.js +2 -0
  26. package/dist/cli-bundle/chunks/chunk-NVYDPNQP.js +2 -0
  27. package/dist/cli-bundle/chunks/{chunk-C4O5TZY3.js → chunk-NZSXWIX7.js} +60 -60
  28. package/dist/cli-bundle/chunks/{chunk-KHFUHGL3.js → chunk-OGVSGXQX.js} +2 -2
  29. package/dist/cli-bundle/chunks/{chunk-LRGYV6QQ.js → chunk-Q4VZSMUL.js} +2 -2
  30. package/dist/cli-bundle/chunks/chunk-SJWIPGZW.js +113 -0
  31. package/dist/cli-bundle/chunks/chunk-TE6FBDHP.js +4 -0
  32. package/dist/cli-bundle/chunks/{chunk-Q6BGQRCB.js → chunk-TX74QJ4W.js} +2 -2
  33. package/dist/cli-bundle/chunks/chunk-TY55UX6M.js +10 -0
  34. package/dist/cli-bundle/chunks/chunk-USBTXMKS.js +2 -0
  35. package/dist/cli-bundle/chunks/chunk-VCXQ6A35.js +3 -0
  36. package/dist/cli-bundle/chunks/chunk-WFYE34TO.js +23 -0
  37. package/dist/cli-bundle/chunks/chunk-X5D5YUHR.js +2 -0
  38. package/dist/cli-bundle/chunks/chunk-YPMNXG2C.js +2 -0
  39. package/dist/cli-bundle/chunks/chunk-YVTALIN3.js +2 -0
  40. package/dist/cli-bundle/chunks/{chunk-JQYPSABI.js → chunk-Z7YL2SUM.js} +2 -2
  41. package/dist/cli-bundle/chunks/{chunk-T7UTG56V.js → chunk-ZA5NS3PL.js} +3 -3
  42. package/dist/cli-bundle/chunks/field-definition-losses-XKE4DRUA.js +2 -0
  43. package/dist/cli-bundle/chunks/{field-option-collisions-G4LQ2646.js → field-option-collisions-2F2Z7R7B.js} +2 -2
  44. package/dist/cli-bundle/chunks/{indexed-receipt-blobs-H3MMNXXG.js → indexed-receipt-blobs-DR3FDHND.js} +2 -2
  45. package/dist/cli-bundle/chunks/{item-revision-O7L3AA2W.js → item-revision-UAF6L47R.js} +2 -2
  46. package/dist/cli-bundle/chunks/item-transaction-RJECL53Y.js +2 -0
  47. package/dist/cli-bundle/chunks/linked-resource-value-list-WXPPYUVQ.js +2 -0
  48. package/dist/cli-bundle/chunks/{mutation-actor-A45DFDEO.js → mutation-actor-UK3QNEEB.js} +2 -2
  49. package/dist/cli-bundle/chunks/mutation-admission-UTDYPFWP.js +2 -0
  50. package/dist/cli-bundle/chunks/{register-list-query-FCPGG2UT.js → register-list-query-DRA3CWHI.js} +2 -2
  51. package/dist/cli-bundle/chunks/{register-mutation-VD3JX23I.js → register-mutation-WO74VLEQ.js} +2 -2
  52. package/dist/cli-bundle/chunks/register-operations-CRBKH7WN.js +2 -0
  53. package/dist/cli-bundle/chunks/{register-setup-EWAZZWPL.js → register-setup-6V6NQB5C.js} +2 -2
  54. package/dist/cli-bundle/chunks/runtime-schema-OAIUNQRL.js +2 -0
  55. package/dist/cli-bundle/chunks/{settlement-hook-KWBOSRDZ.js → settlement-hook-BIVNGBZF.js} +2 -2
  56. package/dist/cli-bundle/chunks/{stage-UIDZMTE5.js → stage-DYEHGASU.js} +2 -2
  57. package/dist/cli-bundle/focused-chunks/chunk-26P6C6OO.js +2 -0
  58. package/dist/cli-bundle/focused-chunks/chunk-2UUBS4BG.js +2 -0
  59. package/dist/cli-bundle/focused-chunks/{chunk-J4V3J5MC.js → chunk-4ER3VMST.js} +2 -2
  60. package/dist/cli-bundle/focused-chunks/chunk-4YBMHMBJ.js +2 -0
  61. package/dist/cli-bundle/focused-chunks/{chunk-Y7EC2L2G.js → chunk-62AMZMR4.js} +2 -2
  62. package/dist/cli-bundle/focused-chunks/{chunk-OEMI52ZS.js → chunk-7G7JIXLL.js} +2 -2
  63. package/dist/cli-bundle/focused-chunks/{chunk-YC3PFFDE.js → chunk-A3DORTXS.js} +57 -57
  64. package/dist/cli-bundle/focused-chunks/{chunk-AHCOSTL7.js → chunk-CWQLW4ZO.js} +2 -2
  65. package/dist/cli-bundle/focused-chunks/{chunk-CQLOYNJY.js → chunk-FM5WQ6ZU.js} +2 -2
  66. package/dist/cli-bundle/focused-chunks/chunk-HXM7K6VH.js +100 -0
  67. package/dist/cli-bundle/focused-chunks/{chunk-7EKKUYN5.js → chunk-IIVDBAJM.js} +3 -3
  68. package/dist/cli-bundle/focused-chunks/{chunk-ZYHGQIQ7.js → chunk-IJ3T3W4U.js} +2 -2
  69. package/dist/cli-bundle/focused-chunks/{chunk-NGFDPEP7.js → chunk-IRYNVGKH.js} +3 -3
  70. package/dist/cli-bundle/focused-chunks/chunk-JFICNN4T.js +4 -0
  71. package/dist/cli-bundle/focused-chunks/chunk-KPASZGBL.js +2 -0
  72. package/dist/cli-bundle/focused-chunks/{chunk-YX75PQFO.js → chunk-L357ZAES.js} +2 -2
  73. package/dist/cli-bundle/focused-chunks/{chunk-HCWDMFWA.js → chunk-LWBZ7UGG.js} +2 -2
  74. package/dist/cli-bundle/focused-chunks/{chunk-JD45Y2BR.js → chunk-M57KDG7I.js} +2 -2
  75. package/dist/cli-bundle/focused-chunks/chunk-MZNV26XE.js +8 -0
  76. package/dist/cli-bundle/focused-chunks/chunk-NGHT2LNG.js +3 -0
  77. package/dist/cli-bundle/focused-chunks/chunk-NJTKGBSK.js +2 -0
  78. package/dist/cli-bundle/focused-chunks/{chunk-7P6OGPEG.js → chunk-P55AZPFN.js} +2 -2
  79. package/dist/cli-bundle/focused-chunks/chunk-RQYVX2T6.js +2 -0
  80. package/dist/cli-bundle/focused-chunks/{chunk-Q6JCMFGU.js → chunk-SXC3NVZI.js} +2 -2
  81. package/dist/cli-bundle/focused-chunks/chunk-TQQO42C2.js +44 -0
  82. package/dist/cli-bundle/focused-chunks/{chunk-VNU3IFBL.js → chunk-U35K7FSE.js} +2 -2
  83. package/dist/cli-bundle/focused-chunks/chunk-UQJ4PY2Y.js +2 -0
  84. package/dist/cli-bundle/focused-chunks/{chunk-XVCMYFQU.js → chunk-WAP3DF4B.js} +2 -2
  85. package/dist/cli-bundle/focused-chunks/{chunk-4SX2BN4V.js → chunk-XR6MLUVW.js} +2 -2
  86. package/dist/cli-bundle/focused-chunks/chunk-XR745UGE.js +4 -0
  87. package/dist/cli-bundle/focused-chunks/field-definition-losses-GGA6FUHD.js +2 -0
  88. package/dist/cli-bundle/focused-chunks/{field-option-collisions-63YQ2J3N.js → field-option-collisions-7TG7STO7.js} +2 -2
  89. package/dist/cli-bundle/focused-chunks/{indexed-receipt-blobs-PG2VJ3MB.js → indexed-receipt-blobs-EUYZJR5R.js} +2 -2
  90. package/dist/cli-bundle/focused-chunks/{item-revision-PV5O6F5Y.js → item-revision-J7EUGCHR.js} +2 -2
  91. package/dist/cli-bundle/focused-chunks/item-transaction-2IC2MLML.js +2 -0
  92. package/dist/cli-bundle/focused-chunks/{mutation-actor-2AAUJG2Z.js → mutation-actor-LJVF2HVD.js} +2 -2
  93. package/dist/cli-bundle/focused-chunks/mutation-admission-SLFAUONA.js +2 -0
  94. package/dist/cli-bundle/focused-chunks/runtime-schema-IDRXWCC4.js +2 -0
  95. package/dist/cli-bundle/focused-chunks/{settlement-hook-4MGRERCT.js → settlement-hook-Q6MJQKIE.js} +2 -2
  96. package/dist/cli-bundle/focused-chunks/{stage-56RYPMBK.js → stage-MWR73LTZ.js} +2 -2
  97. package/dist/cli-bundle/main.js +26 -26
  98. package/dist/cli-bundle/sdk-authoring.js +1 -1
  99. package/dist/cli-bundle/sdk-contracts.js +1 -1
  100. package/dist/cli-bundle/sdk-core.js +1 -1
  101. package/dist/cli-bundle/sdk-governance.js +1 -1
  102. package/dist/cli-bundle/sdk-graph.js +1 -1
  103. package/dist/cli-bundle/sdk-merge.js +63 -63
  104. package/dist/cli-bundle/sdk-query.js +1 -1
  105. package/dist/cli-bundle/sdk-runtime.js +1 -1
  106. package/dist/cli-bundle/sdk-testing.js +1 -1
  107. package/dist/cli-bundle/sdk.js +1 -1
  108. package/dist/core/extensions/item-fields.d.ts +18 -1
  109. package/dist/core/extensions/item-fields.js +1 -1
  110. package/dist/core/extensions/loader.js +1 -1
  111. package/dist/core/fs/fs-utils.d.ts +8 -0
  112. package/dist/core/fs/fs-utils.js +2 -2
  113. package/dist/core/item/item-type-inspection.js +2 -0
  114. package/dist/core/item/type-registry.js +1 -1
  115. package/dist/core/schema/runtime-schema.d.ts +19 -0
  116. package/dist/core/schema/runtime-schema.js +2 -2
  117. package/dist/core/shared/url-credentials.d.ts +4 -2
  118. package/dist/core/shared/url-credentials.js +1 -1
  119. package/dist/core/store/settings.d.ts +7 -0
  120. package/dist/core/store/settings.js +5 -5
  121. package/dist/sdk/context-intent-contracts.js +1 -1
  122. package/dist/sdk/extension-command-context.js +2 -2
  123. package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
  124. package/dist/sdk/governance/validate.js +1 -1
  125. package/dist/sdk/public-surface.json +1 -1
  126. package/dist/sdk/runtime/schema.js +1 -1
  127. package/dist/sdk/schema/field-definition-losses.js +1 -1
  128. package/dist/sdk/schema/schema-file-entry-losses.js +2 -0
  129. package/dist/sdk/test/execution.d.ts +9 -1
  130. package/dist/sdk/test/execution.js +4 -4
  131. package/docs/COMMANDS.md +3 -1
  132. package/docs/CONFIGURATION.md +23 -4
  133. package/docs/EXTENSIONS.md +1 -1
  134. package/docs/READ_OUTPUT_CONTRACTS.md +5 -0
  135. package/docs/SDK.md +19 -3
  136. package/docs/SDK_AUDITED_MUTATIONS.md +9 -0
  137. package/marketplace.json +1 -1
  138. package/node_modules/fast-json-patch/README.md +2 -2
  139. package/node_modules/fast-json-patch/dist/fast-json-patch.js +604 -818
  140. package/node_modules/fast-json-patch/dist/fast-json-patch.min.js +4 -8
  141. package/node_modules/fast-json-patch/package.json +14 -17
  142. package/package.json +2 -2
  143. package/packages/pm-beads/package.json +1 -1
  144. package/packages/pm-calendar/package.json +1 -1
  145. package/packages/pm-command-kit/package.json +1 -1
  146. package/packages/pm-digital-twin/package.json +1 -1
  147. package/packages/pm-governance-audit/package.json +1 -1
  148. package/packages/pm-guide-shell/package.json +1 -1
  149. package/packages/pm-kanban/package.json +1 -1
  150. package/packages/pm-lifecycle-hooks/package.json +1 -1
  151. package/packages/pm-linked-test-adapters/package.json +1 -1
  152. package/packages/pm-search-advanced/package.json +1 -1
  153. package/packages/pm-templates/package.json +1 -1
  154. package/packages/pm-todos/package.json +1 -1
  155. package/packages/pm-vcs/package.json +1 -1
  156. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  157. package/plugins/pm-claude/package.json +1 -1
  158. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  159. package/plugins/pm-codex/package.json +1 -1
  160. package/plugins/pm-codex/plugin.json +1 -1
  161. package/runtime-dependencies.json +1 -1
  162. package/dist/cli-bundle/chunks/chunk-2YD2AERA.js +0 -2
  163. package/dist/cli-bundle/chunks/chunk-54AQJTUH.js +0 -3
  164. package/dist/cli-bundle/chunks/chunk-56DKWGHE.js +0 -2
  165. package/dist/cli-bundle/chunks/chunk-56GUDMXN.js +0 -113
  166. package/dist/cli-bundle/chunks/chunk-5ECCMDSU.js +0 -2
  167. package/dist/cli-bundle/chunks/chunk-6RBD2AKU.js +0 -2
  168. package/dist/cli-bundle/chunks/chunk-D3I5AHNN.js +0 -2
  169. package/dist/cli-bundle/chunks/chunk-MO6PPUI6.js +0 -2
  170. package/dist/cli-bundle/chunks/chunk-RGE3XW3A.js +0 -2
  171. package/dist/cli-bundle/chunks/chunk-SP6CDM6B.js +0 -31
  172. package/dist/cli-bundle/chunks/chunk-WKDKBS4P.js +0 -4
  173. package/dist/cli-bundle/chunks/chunk-YLS2N4SN.js +0 -2
  174. package/dist/cli-bundle/chunks/field-definition-losses-JFMMMVTV.js +0 -2
  175. package/dist/cli-bundle/chunks/item-transaction-4XC74ULD.js +0 -2
  176. package/dist/cli-bundle/chunks/mutation-admission-SIUIMAEO.js +0 -2
  177. package/dist/cli-bundle/chunks/register-operations-KHJD4GFZ.js +0 -2
  178. package/dist/cli-bundle/chunks/runtime-schema-3RAXYNG5.js +0 -2
  179. package/dist/cli-bundle/focused-chunks/chunk-5MZXU6HB.js +0 -2
  180. package/dist/cli-bundle/focused-chunks/chunk-64DSKZJN.js +0 -100
  181. package/dist/cli-bundle/focused-chunks/chunk-A5B43EWU.js +0 -2
  182. package/dist/cli-bundle/focused-chunks/chunk-E4C6T3NL.js +0 -2
  183. package/dist/cli-bundle/focused-chunks/chunk-KMGI5GZP.js +0 -2
  184. package/dist/cli-bundle/focused-chunks/chunk-MSLRDKWL.js +0 -4
  185. package/dist/cli-bundle/focused-chunks/chunk-O33WUEAF.js +0 -3
  186. package/dist/cli-bundle/focused-chunks/chunk-RBOWKXFV.js +0 -8
  187. package/dist/cli-bundle/focused-chunks/chunk-TF57RHS2.js +0 -2
  188. package/dist/cli-bundle/focused-chunks/chunk-X5ZVPFK7.js +0 -4
  189. package/dist/cli-bundle/focused-chunks/chunk-Z4FWJGQG.js +0 -2
  190. package/dist/cli-bundle/focused-chunks/chunk-ZHHFOQSL.js +0 -44
  191. package/dist/cli-bundle/focused-chunks/chunk-ZUAPUBJK.js +0 -2
  192. package/dist/cli-bundle/focused-chunks/field-definition-losses-NUZO3JCP.js +0 -2
  193. package/dist/cli-bundle/focused-chunks/item-transaction-S5QXBGAT.js +0 -2
  194. package/dist/cli-bundle/focused-chunks/mutation-admission-X7HHNERR.js +0 -2
  195. package/dist/cli-bundle/focused-chunks/runtime-schema-5J2ONRNV.js +0 -2
  196. package/node_modules/fast-json-patch/webpack.config.js +0 -63
@@ -1,2 +1,2 @@
1
- import{S as E,T as j,U as G,V as k,W as w,X as $,Y as I,a as le,ba as F,g as P,i as J,o as N,q as U,s as B}from"./chunk-VNU3IFBL.js";import{E as ce,F as ue,H as _,I as de,W as V,fa as Z,o as K,oa as fe,p as X}from"./chunk-XVCMYFQU.js";import{L as S}from"./chunk-64DSKZJN.js";import{A as p,z as f}from"./chunk-NGFDPEP7.js";var Fe=new Set(["none","null"]);function bt(e={}){return[{optionKey:"dep",clearFlagKey:"clearDeps",valueFlag:"--dep",clearFlag:"--clear-deps",...e.depDisableFlagKey===void 0?{}:{disableFlagKey:e.depDisableFlagKey}},{optionKey:"comment",clearFlagKey:"clearComments",valueFlag:"--comment",clearFlag:"--clear-comments"},{optionKey:"note",clearFlagKey:"clearNotes",valueFlag:"--note",clearFlag:"--clear-notes"},{optionKey:"learning",clearFlagKey:"clearLearnings",valueFlag:"--learning",clearFlag:"--clear-learnings"},{optionKey:"file",clearFlagKey:"clearFiles",valueFlag:"--file",clearFlag:"--clear-files",...e.fileDisableFlagKey===void 0?{}:{disableFlagKey:e.fileDisableFlagKey}},{optionKey:"test",clearFlagKey:"clearTests",valueFlag:"--test",clearFlag:"--clear-tests",...e.testDisableFlagKey===void 0?{}:{disableFlagKey:e.testDisableFlagKey}},{optionKey:"doc",clearFlagKey:"clearDocs",valueFlag:"--doc",clearFlag:"--clear-docs",...e.docDisableFlagKey===void 0?{}:{disableFlagKey:e.docDisableFlagKey}},{optionKey:"reminder",clearFlagKey:"clearReminders",valueFlag:"--reminder",clearFlag:"--clear-reminders"},{optionKey:"event",clearFlagKey:"clearEvents",valueFlag:"--event",clearFlag:"--clear-events"},{optionKey:"typeOption",clearFlagKey:"clearTypeOptions",valueFlag:"--type-option",clearFlag:"--clear-type-options"}]}function v(e){return e===void 0?!1:Fe.has(e.trim().toLowerCase())}function Mt(e,t,r){if(!v(e))return;let n=r?` ${r}`:"";throw new p(`${t} no longer accepts "none" or "null".${n}`.trim(),f.USAGE)}function kt(e,t,r){if(!e||e.length===0||X(e)||!e.some(i=>v(i)))return;let o=r?` ${r}`:"";throw new p(`${t} no longer accepts "none" or "null".${o}`.trim(),f.USAGE)}function wt(e,t){for(let r of t){let n=e[r.optionKey];if(!Array.isArray(n)||n.length===0)continue;if(!n.every(s=>typeof s=="string"))throw new p(`${r.valueFlag} entries must be strings.`,f.USAGE);if(X(n))continue;let o=n;if(!o.some(s=>v(s)))continue;if(o.filter(s=>!v(s)).length>0)throw new p(`Cannot mix legacy clear token "none"/"null" with concrete ${r.valueFlag} entries. Use ${r.clearFlag} to clear or provide explicit entries.`,f.USAGE);e[r.optionKey]=void 0,e[r.clearFlagKey]=!0,r.disableFlagKey&&(e[r.disableFlagKey]=!1)}return e}var Ke=["close_reason","close-reason"],pe=[{canonical:"tags",aliases:["tags"],optionKey:"tags",metadataKey:"tags"}],me=[{canonical:"deadline",aliases:["deadline"],optionKey:"deadline",metadataKey:"deadline"},{canonical:"estimate",aliases:["estimate","estimated_minutes","estimated-minutes"],optionKey:"estimatedMinutes",metadataKey:"estimated_minutes"},{canonical:"acceptance-criteria",aliases:["acceptance_criteria","acceptance-criteria","ac"],optionKey:"acceptanceCriteria",metadataKey:"acceptance_criteria"},{canonical:"definition-of-ready",aliases:["definition_of_ready","definition-of-ready"],optionKey:"definitionOfReady",metadataKey:"definition_of_ready"},{canonical:"order",aliases:["order","rank"],optionKey:"order",metadataKey:"order"},{canonical:"goal",aliases:["goal"],optionKey:"goal",metadataKey:"goal"},{canonical:"objective",aliases:["objective"],optionKey:"objective",metadataKey:"objective"},{canonical:"value",aliases:["value"],optionKey:"value",metadataKey:"value"},{canonical:"impact",aliases:["impact"],optionKey:"impact",metadataKey:"impact"},{canonical:"outcome",aliases:["outcome"],optionKey:"outcome",metadataKey:"outcome"},{canonical:"why-now",aliases:["why_now","why-now"],optionKey:"whyNow",metadataKey:"why_now"}],De=[...pe,...me],ye=[{canonical:"assignee",aliases:["assignee"],optionKey:"assignee",metadataKey:"assignee"},{canonical:"parent",aliases:["parent"],optionKey:"parent",metadataKey:"parent"},{canonical:"reviewer",aliases:["reviewer"],optionKey:"reviewer",metadataKey:"reviewer"},{canonical:"risk",aliases:["risk"],optionKey:"risk",metadataKey:"risk"},{canonical:"confidence",aliases:["confidence"],optionKey:"confidence",metadataKey:"confidence"},{canonical:"sprint",aliases:["sprint"],optionKey:"sprint",metadataKey:"sprint"},{canonical:"release",aliases:["release"],optionKey:"release",metadataKey:"release"},{canonical:"blocked-by",aliases:["blocked_by","blocked-by"],optionKey:"blockedBy",metadataKey:"blocked_by"},{canonical:"blocked-reason",aliases:["blocked_reason","blocked-reason"],optionKey:"blockedReason",metadataKey:"blocked_reason"},{canonical:"unblock-note",aliases:["unblock_note","unblock-note"],optionKey:"unblockNote",metadataKey:"unblock_note"},{canonical:"reporter",aliases:["reporter"],optionKey:"reporter",metadataKey:"reporter"},{canonical:"severity",aliases:["severity"],optionKey:"severity",metadataKey:"severity"},{canonical:"environment",aliases:["environment"],optionKey:"environment",metadataKey:"environment"},{canonical:"repro-steps",aliases:["repro_steps","repro-steps"],optionKey:"reproSteps",metadataKey:"repro_steps"},{canonical:"resolution",aliases:["resolution"],optionKey:"resolution",metadataKey:"resolution"},{canonical:"expected-result",aliases:["expected_result","expected-result"],optionKey:"expectedResult",metadataKey:"expected_result"},{canonical:"actual-result",aliases:["actual_result","actual-result"],optionKey:"actualResult",metadataKey:"actual_result"},{canonical:"affected-version",aliases:["affected_version","affected-version"],optionKey:"affectedVersion",metadataKey:"affected_version"},{canonical:"fixed-version",aliases:["fixed_version","fixed-version"],optionKey:"fixedVersion",metadataKey:"fixed_version"},{canonical:"component",aliases:["component"],optionKey:"component",metadataKey:"component"},{canonical:"regression",aliases:["regression"],optionKey:"regression",metadataKey:"regression"},{canonical:"customer-impact",aliases:["customer_impact","customer-impact"],optionKey:"customerImpact",metadataKey:"customer_impact"}],ee=[...De,{canonical:"author",aliases:["author"],optionKey:"author",metadataKey:"author"},...ye],Le=[...pe,{canonical:"close-reason",aliases:Ke,optionKey:"closeReason",metadataKey:"close_reason"},...me,...ye],Pe=new Set(["none","null","-"]);function ge(e){return e==="create"?ee:Le}function H(e,t){let r=t.unset;if(r!==void 0&&typeof r!="string"&&!Array.isArray(r))return;let n=[];for(let o of ge(e))o.optionKey==="author"||!Object.hasOwn(t,o.optionKey)||t[o.optionKey]!==null||(Reflect.deleteProperty(t,o.optionKey),n.push(o.canonical));n.length!==0&&(t.unset=[...r===void 0?[]:typeof r=="string"?[r]:r,...n])}function Q(e){return typeof e=="string"&&Pe.has(e.trim().toLowerCase())}function Dt(e,t,r,n){return r?ge(e).flatMap(o=>{let i=t[o.optionKey],a=n[o.metadataKey];return Q(i)&&(Q(a)||Array.isArray(a)&&a.some(Q))?[`literal_sentinel_stored:${o.canonical}:${i.trim()}`]:[]}):[]}function Ue(e,t){return e.flatMap(r=>r.includes(",")&&t(r)?[r]:r.split(","))}function Be(e){let t=new Set,r=new Set;if(!e.raw||e.raw.length===0)return{metadataKeys:t,optionKeys:r};let n=Ue(e.raw,o=>e.resolveDefinition(o.trim().toLowerCase())!==void 0);for(let o of n){let i=o.trim().toLowerCase();if(!i)throw new p("--unset values must not be empty; name each field once, for example --unset parent,release",f.USAGE);if(v(i))throw new p('--unset no longer accepts "none" or "null". Specify concrete field names such as --unset deadline',f.USAGE);let a=e.resolveDefinition(i);if(!a)throw new p(`Unsupported --unset field "${o}". Supported fields: ${e.supportedFields}`,f.USAGE);t.add(a.metadataKey),r.add(a.optionKey)}return{metadataKeys:t,optionKeys:r}}function je(e,t,r){let n=e.trim().toLowerCase();if(!r)return;let o=r.command_to_fields?.get(t)??[];for(let i of o){if(i.allow_unset===!1)continue;let a=new Set;if(typeof i.key=="string"&&i.key.length>0&&a.add(i.key.toLowerCase()),typeof i.metadata_key=="string"&&i.metadata_key.length>0&&a.add(i.metadata_key.toLowerCase()),typeof i.cli_flag=="string"&&i.cli_flag.length>0&&(a.add(i.cli_flag.replaceAll("-","_").toLowerCase()),a.add(i.cli_flag.toLowerCase())),Array.isArray(i.cli_aliases))for(let s of i.cli_aliases)typeof s!="string"||s.length===0||(a.add(s.replaceAll("-","_").toLowerCase()),a.add(s.toLowerCase()));if(a.has(n))return{optionKey:i.key,metadataKey:i.metadata_key}}}var Ge=(()=>{let e=new Map;for(let t of ee)for(let r of t.aliases)e.set(r,{optionKey:t.optionKey,metadataKey:t.metadataKey});return e})(),$e=ee.map(e=>e.canonical).sort((e,t)=>e.localeCompare(t)).join(", ");function Lt(e,t){return Be({raw:e,supportedFields:$e,resolveDefinition:r=>Ge.get(r)??je(r,"create",t)})}var Ve={create:'client.create({ type: "Task", title: "Example", createMode: "progressive" })',update:'client.update(id, { estimatedMinutes: "45", force: false })',append:'client.append(id, "Body text")',reopen:'client.reopen(id, "The work recurred", { expectedResult: "Verified recovery" })'};function x(e,t,r){let n=`${e} ${t} must be ${r}.`;throw new p(n,f.USAGE,{code:"invalid_argument_value",reason:"invalid_mutation_option_value",field:t,changed:!1,required:n,examples:[Ve[e]]})}function D(e,t,r){typeof e!="string"&&x(t,r,"a string")}function te(e,t){(e===null||typeof e!="object"||Array.isArray(e))&&x(t,"options","an object")}function Ae(e,t){(e==="append"||e==="update")&&t.id!==void 0&&D(t.id,e,"id"),e==="item-reopen"&&(t.id!==void 0&&D(t.id,"reopen","id"),t.reason!==void 0&&D(t.reason,"reopen","reason"),t.options!==void 0&&He(t.options))}function Wt(e){te(e,"append");for(let t of["body","author","message"])e[t]!==void 0&&D(e[t],"append",t);e.force!==void 0&&typeof e.force!="boolean"&&x("append","force","a boolean")}function He(e){te(e,"reopen");for(let t of F["item-reopen"].optional){let r=e[t];r!==void 0&&(S(Reflect.get(E,t)).type==="boolean"?typeof r!="boolean"&&x("reopen",t,"a boolean"):D(r,"reopen",t))}}function ze(e,t){return e?t?"a string or string array":"a string array":"a string"}function qe(e,t,r,n,o,i){r===void 0||typeof r=="string"&&(!o||i)||n==="priority"&&typeof r=="number"&&Number.isFinite(r)||o&&Array.isArray(r)&&Array.from(r).every(a=>typeof a=="string")||x(e,t,ze(o,i))}function Ye(e,t,r){let n=e==="create"?U:B;for(let{param:o}of[...n,...N,{param:"force"}]){if(S(Reflect.get(E,o)).type!=="boolean")continue;let i=r.find(a=>a.keys.includes(o))?.keys??[o];for(let a of i)t[a]!==void 0&&typeof t[a]!="boolean"&&x(e,a,"a boolean")}}function re(e,t,r=!0,n=!1){let o=e==="create"?j:w;for(let{target:i,keys:a,repeatable:s}of o)if(S(Reflect.get(E,i)).type!=="boolean")for(let u of a){let h=n&&u!==i,A=s===!0&&(i!=="acceptanceCriteria"||h);qe(e,u,t[u],i,A,r||h)}Ye(e,t,o)}function Jt(e,t){te(t,e);let r=ce(t),n=K(r);return n||H(e,r),re(e,r,!1,n),r}import{Option as hr}from"commander";function O(e,t,r){if(typeof r!="string")return;let n=r.trim();n.length!==0&&e.push(t,n)}function y(e,t,r){r===!0&&e.push(t)}function C(e,t,r){if(Array.isArray(r))for(let n of r){if(typeof n!="string")continue;let o=n.trim();o.length!==0&&e.push(t,o)}}function We(e,t){let r=["test",e,"--run","--json","--progress"];return C(r,"--add",t.add),C(r,"--add-json",t.addJson),C(r,"--remove",t.remove),C(r,"--remove-index",Array.isArray(t.removeIndex)?t.removeIndex.map(n=>typeof n=="number"?String(n):n):t.removeIndex),O(r,"--match",t.match),O(r,"--only-index",typeof t.onlyIndex=="number"?String(t.onlyIndex):t.onlyIndex),y(r,"--only-last",t.onlyLast),y(r,"--full-history",t.fullHistory),C(r,"--measure",t.measure),O(r,"--metric-below",t.metricBelow),O(r,"--metric-diff",t.metricDiff),Je(r,t),O(r,"--author",t.author),O(r,"--message",t.message),y(r,"--force",t.force),r}function Je(e,t){O(e,"--timeout",t.timeout),C(e,"--env-set",t.envSet),C(e,"--env-clear",t.envClear),y(e,"--shared-host-safe",t.sharedHostSafe),O(e,"--pm-context",t.pmContext),y(e,"--override-linked-pm-context",t.overrideLinkedPmContext),O(e,"--workspace-context",t.workspaceContext),y(e,"--override-linked-workspace-context",t.overrideLinkedWorkspaceContext),y(e,"--allow-untrusted-linked-tests",t.allowUntrustedLinkedTests),y(e,"--fail-on-context-mismatch",t.failOnContextMismatch),y(e,"--fail-on-skipped",t.failOnSkipped),y(e,"--fail-on-empty-test-run",t.failOnEmptyTestRun),y(e,"--require-assertions-for-pm",t.requireAssertionsForPm),y(e,"--check-context",t.checkContext),y(e,"--full-output",t.fullOutput),y(e,"--auto-pm-context",t.autoPmContext)}function he(e,t){let r=[],n=new Set;for(let o of t.keys){if(!Object.hasOwn(e,o))continue;let i=e[o];if(i!=null){if(typeof i=="string"){r.push(i);continue}if(!Array.isArray(i)||!i.every(a=>typeof a=="string"))return;n.has(i)||(n.add(i),r.push(...i))}}return r.length>0?r.join("; "):void 0}function R(e,t){return e.find(n=>n.target===t)??{target:t,keys:[t]}}function l(e,t){return e[t]===!0?!0:void 0}function T(e,t){return e[t]===!1?!0:void 0}function z(e,t){return t.some(r=>e[r]===!0)?!0:void 0}function ne(e,t){for(let[r,n]of Object.entries(t))r==="__proto__"||r==="constructor"||r==="prototype"||Object.hasOwn(e,r)||(e[r]=n)}function _e(e,t={}){let r=a=>P(e,R(G,a)),n=a=>J(e,R(k,a)),o=r("type");if(t.requireType!==!1&&o===void 0)throw new p("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).",f.USAGE);let i={title:r("title"),description:r("description"),type:o,template:r("template"),createMode:r("createMode"),defer:n("defer"),deferReason:r("deferReason"),schedulePreset:r("schedulePreset"),status:r("status"),closeReason:r("closeReason"),completedAt:r("completedAt"),priority:r("priority"),tags:r("tags"),addTags:n("addTags"),body:r("body"),deadline:r("deadline"),estimatedMinutes:r("estimatedMinutes"),acceptanceCriteria:he(e,R(k,"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"),inheritFocus:e.inheritFocus,allowMissingParent:z(e,["allowMissingParent","allow_missing_parent"])===!0,allowUnresolvedDeps:z(e,["allowUnresolvedDeps","allow_unresolved_deps"])===!0,allowDuplicate:l(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:l(e,"clearDeps"),clearComments:l(e,"clearComments"),clearNotes:l(e,"clearNotes"),clearLearnings:l(e,"clearLearnings"),clearFiles:l(e,"clearFiles"),clearTests:l(e,"clearTests"),clearDocs:l(e,"clearDocs"),clearReminders:l(e,"clearReminders"),clearEvents:l(e,"clearEvents"),clearTypeOptions:l(e,"clearTypeOptions")};return ne(i,e),_(e,i)}function Oe(e){let t=o=>P(e,R($,o)),r=o=>J(e,R(I,o)),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:he(e,R(I,"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"),allowUnresolvedDeps:z(e,["allowUnresolvedDeps","allow_unresolved_deps"])===!0,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:l(e,"replaceDeps"),replaceTests:l(e,"replaceTests"),replaceFiles:l(e,"replaceFiles"),replaceDocs:l(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:l(e,"clearDeps"),clearComments:l(e,"clearComments"),clearNotes:l(e,"clearNotes"),clearLearnings:l(e,"clearLearnings"),clearFiles:l(e,"clearFiles"),clearTests:l(e,"clearTests"),clearDocs:l(e,"clearDocs"),clearReminders:l(e,"clearReminders"),clearEvents:l(e,"clearEvents"),clearTypeOptions:l(e,"clearTypeOptions")};return ne(n,e),_(e,n)}function d(e,t){let r=R(le,t),n=P(e,r);if(n!==void 0)return n;for(let o of r.keys){let i=e[o];if(Array.isArray(i)){let a=i.filter(s=>typeof s=="string");if(a.length>0)return a.join(",")}if(t==="ids"&&typeof i=="string")return i;if(typeof i=="number"&&Number.isFinite(i))return String(i)}}function Xe(e){let t=l(e,"filterFilesMissing"),r=l(e,"filterDocsMissing");return{filterReviewerMissing:l(e,"filterReviewerMissing"),filterRiskMissing:l(e,"filterRiskMissing"),filterConfidenceMissing:l(e,"filterConfidenceMissing"),filterSprintMissing:l(e,"filterSprintMissing"),filterReleaseMissing:l(e,"filterReleaseMissing"),hasNotes:l(e,"hasNotes"),hasLearnings:l(e,"hasLearnings"),hasFiles:l(e,"hasFiles"),hasDocs:l(e,"hasDocs"),hasTests:l(e,"hasTests"),hasComments:l(e,"hasComments"),hasDeps:l(e,"hasDeps"),hasBody:l(e,"hasBody"),hasLinkedCommand:l(e,"hasLinkedCommand"),noNotes:T(e,"notes"),noLearnings:T(e,"learnings"),noFiles:T(e,"files")??t,filterFilesMissing:t,noDocs:T(e,"docs")??r,filterDocsMissing:r,noTests:T(e,"tests"),noComments:T(e,"comments"),noDeps:T(e,"deps"),emptyBody:l(e,"emptyBody"),noLinkedCommand:T(e,"linkedCommand")}}function Te(e){let t={status:d(e,"status"),type:d(e,"type"),tag:d(e,"tag"),priority:d(e,"priority"),deadlineBefore:d(e,"deadlineBefore"),deadlineAfter:d(e,"deadlineAfter"),updatedAfter:d(e,"updatedAfter"),updatedBefore:d(e,"updatedBefore"),createdAfter:d(e,"createdAfter"),createdBefore:d(e,"createdBefore"),today:l(e,"today"),recent:l(e,"recent"),ids:d(e,"ids"),assignee:d(e,"assignee"),assigneeFilter:d(e,"assigneeFilter"),parent:d(e,"parent"),sprint:d(e,"sprint"),release:d(e,"release"),limit:d(e,"limit"),offset:d(e,"offset"),noTruncate:T(e,"truncate"),includeBody:l(e,"includeBody"),strictRead:l(e,"strictRead"),compact:l(e,"compact"),brief:l(e,"brief"),full:l(e,"full"),fields:d(e,"fields"),sort:d(e,"sort"),order:d(e,"order"),tree:l(e,"tree"),treeDepth:d(e,"treeDepth"),filterAcMissing:l(e,"filterAcMissing"),filterEstimatesMissing:z(e,["filterEstimatesMissing","filterEstimateMissing"]),filterResolutionMissing:l(e,"filterResolutionMissing"),filterMetadataMissing:l(e,"filterMetadataMissing"),...Xe(e)};return ne(t,e),t}var Ze=Symbol("pm.mcp-mutation-transport"),Qe=new Set(["create","update","append"]),W={create:{parameters:U,aliases:j,strings:G,repeatables:k},update:{parameters:B,aliases:w,strings:$,repeatables:I}},et=new Set(["activity","aggregate","context","contracts","deps","files-discover","files-lookup","get","graph","health","history","history-attest","list","next","search","stats","telemetry","validate"]);function L(e){return Ze in e}function Y(e,t){return L(e)?ue(t):_(e,t)}function Ur(e,t,r=[]){let n=_(e,{...e,...t});for(let o of r)Reflect.deleteProperty(n,o);return n}function c(e,t){let r=e[t];return typeof r=="string"&&r.trim().length>0?r:void 0}function m(e,t){let r=e[t];return typeof r=="string"?r.trim().length>0?r:void 0:typeof r=="number"&&Number.isFinite(r)?String(r):void 0}function Br(e,t){let r=e[t];return typeof r=="string"?r:typeof r=="number"&&Number.isFinite(r)?String(r):void 0}function g(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function jr(e,t){if(typeof e=="number"){if(!Number.isInteger(e))throw new p(`${t} must be a finite integer.`,f.USAGE);return e}if(typeof e=="string"&&e.trim().length>0){let r=Number(e);if(!Number.isInteger(r))throw new p(`${t} must be a finite integer.`,f.USAGE);return r}}function Gr(e,t){return typeof e.limit=="number"&&Number.isFinite(e.limit)?e.limit:typeof t.limit=="number"&&Number.isFinite(t.limit)?t.limit:c(e,"limit")??c(t,"limit")}function $r(e){let t=c(e,"outputFormat");return{json:!0,quiet:!0,author:c(e,"author"),path:c(e,"path"),noExtensions:e.noExtensions===!0||e.no_extensions===!0,noPager:!0,outputInclude:c(e,"outputInclude"),outputLimit:m(e,"outputLimit"),outputBudget:m(e,"outputBudget"),outputSession:c(e,"outputSession"),outputCursor:c(e,"outputCursor"),outputFormat:t==="json"||t==="toon"?t:void 0}}var Ee=new Set(["tags","blockedBy","blocked_by","skills","fields"]),ve=new Set(["comment","note","learning","reminder","event","dep","depRemove","dep_remove","file","doc","test","unset","addGlob","add_glob","migrate","envSet","env_set","envClear","env_clear"]),tt=new Set([...ve].filter(e=>e!=="file")),rt=new Set(["files","files-discover","docs","test","test-all"]),oe=new Set(["comments","notes","learnings"]);function nt(e,t){if(!(!oe.has(e)||!Object.prototype.hasOwnProperty.call(t,"file")))throw new p(`MCP ${e} does not accept options.file. Pass annotation text in options.add instead.`,f.USAGE,{code:"mcp_annotation_file_unavailable",required:"Pass annotation text as JSON data; MCP annotation actions cannot read server-local files."})}var it=new Set(["claim","release","start-task","pause-task","close-task"]),xe={history:["order"],"history-attest":["verify","output","hashAlgorithm"],list:["status","type","tag","priority","limit","offset"],search:["mode","status","type","tag","priority","limit"],create:["title","type","status","description","body","priority","tags","parent","createMode","create_mode","allowMissingParent","allowDuplicate","inheritFocus"],update:["parent","allowMissingParent","completedAt"],copy:["allowDuplicate"],close:["duplicateOf","completedAt","releaseAssignment"],claim:["start","next","ifAvailable","takeoverStale"],"start-task":["takeoverStale"],release:["pause","handoff"],comments:["ifAbsent"],notes:["ifAbsent"],learnings:["ifAbsent"],extension:["dryRun","offline","fields","scope"],package:["dryRun","offline","fields","scope"],install:["dryRun"],upgrade:["scope","dryRun","cliOnly","packagesOnly","repair","tag","packageName"],append:["body"]},at=new Set(["context","get","list","next","search","comments","notes","learnings","files","docs","test"]),ot=new Set(["query","keywords","id","text"]);function st(e){return at.has(e)?F[e].optional.filter(t=>!ot.has(t)):[]}var lt=new Set(["claim","start-task","comments","notes","learnings","files","docs","test"]);function ct(e,t){if(!lt.has(e??""))return t;let r={...t};for(let n of F[e].optional){let o=n.replace(/[A-Z]/gu,i=>`_${i.toLowerCase()}`);o===n||r[o]===void 0||(r[n]??=r[o],delete r[o])}return r}function ut(e,t,r){if(!oe.has(e??""))return r;let n=r,o=n.text??t.text;if(o===void 0)return n;if(n.add!==void 0&&n.add!==o){let a=e.replace(/s$/u,"");throw new p(`Specify ${a} text either as text or with add, not both.`,f.USAGE,{code:"annotation_text_source_conflict",field:"text",required:`Pass the ${a} text once: text and add are the same source.`})}let i={...n,add:o};return delete i.text,i}function dt(e,t){let r=t.replace(/[A-Z]/gu,n=>`_${n.toLowerCase()}`);return e[t]!==void 0||e[r]!==void 0}function ft(e){return[...xe[e]??[],...st(e),...be]}var be=["outputInclude","outputLimit","outputBudget","outputFormat","outputSession","outputCursor"];function Me(e,t=""){let r={},n=rt.has(t),o=t==="files"||t==="files-discover"||t==="docs",i=oe.has(t)?tt:ve;for(let[a,s]of Object.entries(e)){if(Array.isArray(s)&&Ee.has(a)){r[a]=s.join(",");continue}if(a==="note"&&o){r[a]=s;continue}if(typeof s=="string"&&i.has(a)){r[a]=[s];continue}if(typeof s=="string"&&n&&(a==="add"||a==="remove")){r[a]=[s];continue}r[a]=s}return Object.assign(r,Object.fromEntries(Object.getOwnPropertySymbols(e).map(a=>[a,Reflect.get(e,a)]))),r}function pt(e,t,r){let n=c(e,"author");return n!==void 0?n:r!==void 0&&it.has(r)?c(e,"assignee")??c(t,"assignee"):void 0}function mt(e,t){return t!==void 0&&e.author===void 0?{...e,author:t}:e}function yt(e,t,r){let n={},o=W[e],i=new Set([...o.parameters.map(({param:a})=>a),...N.map(({param:a})=>a),...xe[e],...be,"force"]);for(let a of i){let s=o.aliases.find(u=>u.keys.includes(a))?.keys??[a];t[a]===void 0||s.some(u=>r[u]!==void 0)||(n[a]=t[a])}return n}function b(e,t){throw new p(`Invalid MCP ${e} value for "${t}". No changes were made.`,f.USAGE,{code:"invalid_argument_value",reason:"invalid_mutation_option_value",changed:!1,field:t,required:`Provide valid ${e} field values and an options object; inspect the pm_${e} input schema for supported types.`})}function gt(e,t,r){let n=W[e],o=[...n.parameters,...N,{param:"force"}];for(let{param:i}of o){if(S(E[i]).type!=="boolean")continue;let s=(n.aliases.find(u=>u.keys.includes(i))?.keys??[i]).find(u=>r[u]!==void 0&&typeof r[u]!="boolean");s!==void 0&&b(e,s)}for(let i of["idOnly","fullChangedFields"])t[i]!==void 0&&typeof t[i]!="boolean"&&b(e,i)}function At(e,t,r){t.options!==void 0&&!g(t.options)&&b(e,"options"),gt(e,t,r);for(let a of Ee){let s=r[a];Array.isArray(s)&&s.some(u=>typeof u!="string")&&b(e,a)}let n=Ie(r,e),o=W[e];for(let{keys:a,target:s}of o.strings)a.some(u=>r[u]!==void 0)&&n[s]===void 0&&b(e,s);let i=o.repeatables.flatMap(({keys:a})=>a).find(a=>{let s=r[a];return s!==void 0&&typeof s!="string"&&(!Array.isArray(s)||s.some(u=>typeof u!="string"))});return i!==void 0&&b(e,i),n}function ht(e,t,r,n,o){let i=(t==="create"||t==="update")&&L(e),a={...i?yt(t,e,n):r,...n};if((t==="create"||t==="update")&&!i){let s=g(e.options)&&K(e.options);s||H(t,a),re(t,a,!0,s)}return i?At(t,e,a):o?Me(a,t):a}function _t(e,t){return!Qe.has(e??"")||K(t)?t:fe(t)}function Vr(e,t,{nativeAction:r=!0}={}){Ae(t,e);let n=g(e.options)?e.options:void 0,o=S(e.options),i={},a=A=>{dt(o,A)||e[A]===void 0||(i[A]=e[A])};for(let A of ft(t??""))a(A);t!==void 0&&L(e)&&nt(t,o);let s=ut(t,e,ct(t,ht(e,t,i,o,r)));if(t==="history-attest"&&L(e)&&(s.output!==void 0||typeof s.verify=="string"))throw new p("MCP history attest does not accept server-local proof paths. Export the returned JSON bundle and pass that JSON object as verify.",f.USAGE);let u=L(e)?e:n??e,h=Y(u,mt(s,pt(e,s,t)));return _t(t,h)}function Hr(e){if(e.addNote===void 0)return e;let t={...e};return t.note===void 0&&typeof t.addNote=="string"&&(t.note=t.addNote),delete t.addNote,t}function zr(e){let t={...e};return t.discoveryNote!==void 0&&t.note===void 0&&typeof t.discoveryNote=="string"&&(t.note=t.discoveryNote),delete t.discover,delete t.discoveryNote,t}function Ot(e){let t=[],r=!0;for(let n of e.trim().toLowerCase()){if(n>="a"&&n<="z"||n>="0"&&n<="9"){t.push(n),r=!1;continue}r||(t.push("-"),r=!0)}return t.at(-1)==="-"&&t.pop(),t.join("")}function qr(e){return!et.has(Ot(e))}function Yr(e){return e.trim().toLowerCase().split(/\s+/).filter(Boolean).join(" ")}function Tt(e){return Array.isArray(e)?e.map(t=>String(t)).filter(t=>t.length>0):[]}function Wr(e,t){let r=new Set(["action","args","author","cwd","fullChangedFields","id","options","path","query","reason","target"]),n={};for(let[i,a]of Object.entries(e))r.has(i)||(n[i]=a);let o={...n,...t};return delete o.args,delete o.author,o}function Jr(e,t){let r=Y(t??{},{...t});return{changedFields:e.fullChangedFields===!0?"full":"compact",idOnly:e.idOnly===!0,runnerOptions:r}}function ae(e){return{type:m(e,"filterType"),tag:m(e,"filterTag"),priority:m(e,"filterPriority"),deadlineBefore:m(e,"filterDeadlineBefore"),deadlineAfter:m(e,"filterDeadlineAfter"),updatedAfter:m(e,"filterUpdatedAfter"),updatedBefore:m(e,"filterUpdatedBefore"),createdAfter:m(e,"filterCreatedAfter"),createdBefore:m(e,"filterCreatedBefore"),ids:Z(e.ids),assignee:m(e,"filterAssignee"),assigneeFilter:m(e,"filterAssigneeFilter")??m(e,"filterAssignee_filter"),parent:m(e,"filterParent"),sprint:m(e,"filterSprint"),release:m(e,"filterRelease"),limit:m(e,"limit"),offset:m(e,"offset")}}function ie(e){if(typeof e=="string"&&e.trim().length>0)return e;if(Array.isArray(e))return Tt(e)}function q(e){if(typeof e=="number"&&Number.isFinite(e)||typeof e=="string"&&e.trim().length>0)return e}function Xr(e){let t=ie(e.kind),r=ie(e.exemptIsolate),n=ie(e.exemptIsolateType);return{...t===void 0?{}:{kind:t},maxDepth:q(e.maxDepth),limit:q(e.limit),after:c(e,"after"),direction:c(e,"direction"),maxPaths:q(e.maxPaths),sample:q(e.sample),...r===void 0?{}:{exemptIsolate:r},...n===void 0?{}:{exemptIsolateType:n},saveBaseline:e.saveBaseline===!0,rebuild:e.rebuild===!0,clear:e.clear===!0,summary:e.summary===!0,...e.full===!0?{full:!0}:{}}}function ke(e){let t=Te(e);return e.ids!==void 0&&(t.ids=Z(e.ids)),t}function Zr(e){return{status:c(e,"filterStatus"),list:g(e.list)?ke(e.list):ae(e),reason:c(e,"reason"),completedAt:c(e,"completedAt")??c(e,"completed_at"),resolution:c(e,"resolution"),expectedResult:c(e,"expectedResult")??c(e,"expected_result")??c(e,"expected"),actualResult:c(e,"actualResult")??c(e,"actual_result")??c(e,"actual"),validateClose:c(e,"validateClose")??c(e,"validate_close"),author:c(e,"author"),message:c(e,"message"),force:e.force===!0?!0:void 0,dryRun:e.dryRun===!0||e.dry_run===!0?!0:void 0,rollback:V(e.rollback),checkpoint:e.checkpoint===!1||e.noCheckpoint===!0||e.no_checkpoint===!0?!1:void 0}}var se=new Set(["filterStatus","filterType","filterTag","filterPriority","filterDeadlineBefore","filterDeadlineAfter","filterUpdatedAfter","filterUpdatedBefore","filterCreatedAfter","filterCreatedBefore","filterAssignee","filterAssigneeFilter","filterAssignee_filter","filterParent","filterSprint","filterRelease","ids","list","update","limit","offset","dryRun","dry_run","rollback","checkpoint","noCheckpoint","no_checkpoint"]);function Se(e){let t={};for(let[r,n]of Object.entries(e))se.has(r)||(t[r]=n);return we(t)}function we(e){return Ie(e,"update")}function Ie(e,t){let r=Me(e,t),n=W[t],o=new Set([...n.parameters,...N].filter(({booleanish:i})=>i===!0).map(({param:i})=>i));for(let{keys:i}of n.repeatables)for(let a of i)typeof r[a]=="string"&&(r[a]=[r[a]]);for(let i of n.strings)for(let a of i.keys){let s=r[a];(typeof s=="number"&&Number.isFinite(s)||s===!1&&o.has(a))&&(r[a]=String(s))}return t==="create"?{..._e(r,{requireType:!1})}:Oe(r)}var St=new Map(w.flatMap(({target:e,keys:t})=>t.map(r=>[r,e])));function Ct(e){return e.startsWith("filter")||e==="ids"||e==="limit"||e==="offset"}function Ce(e,t){throw new p(`update-many "${e}" cannot be null. No changes were made.`,f.USAGE,{code:"invalid_argument_value",reason:"invalid_mutation_option_value",changed:!1,field:e,required:t})}function Rt(e){return Object.fromEntries(Object.entries(e).filter(([t])=>!se.has(t)))}function Re(e,t,r){if(!e)return;let n=g(t.list)?t.list:{},o=g(t.update)?t.update:void 0,i=Object.keys(t).find(s=>t[s]===null&&(o!==void 0||se.has(s)||Ct(s)))??Object.keys(n).filter(s=>n[s]===null).map(s=>`list.${s}`)[0];i!==void 0&&Ce(i,`"${i}" selects rows or controls the run: omit it or pass a value. To clear an item field, pass null on the field itself${o===void 0?"":" inside update"}.`);let a=o??Rt(t);for(let[s,u]of Object.entries(a)){if(u!==null)continue;let h=St.get(s);h===void 0&&Ce(s,`Pass unset: ["${s}"] to clear a field, or omit "${s}".`),r[h]=null}}var Nt=["author","message"];function Et(e,t){let r=Object.fromEntries(Nt.filter(n=>typeof e[n]=="string"&&t[n]===void 0).map(n=>[n,e[n]]));return e.force===!0&&t.force===void 0&&(r.force=!0),Object.keys(r).length===0?t:_(t,{...t,...r})}function Qr(e,t=!1){if(g(e.list)||g(e.update)){let n=g(e.update)?Et(e,e.update):Se(e),o=Y(e,we(n));return Re(t,e,o),{status:m(e,"filterStatus"),list:g(e.list)?ke(e.list):ae(e),update:de(n,o),dryRun:e.dryRun===!0||e.dry_run===!0?!0:void 0,rollback:V(e.rollback),checkpoint:e.checkpoint===!1||e.noCheckpoint===!0||e.no_checkpoint===!0?!1:void 0}}let r=Y(e,Se(e));return Re(t,e,r),{status:m(e,"filterStatus"),list:ae(e),update:r,dryRun:e.dryRun===!0||e.dry_run===!0?!0:void 0,rollback:V(e.rollback),checkpoint:e.checkpoint===!1||e.noCheckpoint===!0||e.no_checkpoint===!0?!1:void 0}}function Ne(e){return"expectHash"in e||"expect_hash"in e}function en(e){if(!Ne(e)&&!(g(e.options)&&Ne(e.options)))return{expectHash:void 0,dispatchArgs:e};let{expectHash:t,expect_hash:r,...n}=e,o=g(n.options)?n.options:{},{expectHash:i,expect_hash:a,...s}=o,u=[t,r,i,a].filter(M=>M!==void 0),h=u.length>1?u.flatMap(M=>Array.isArray(M)?M:[M]):u[0],A=_(e,"options"in n?{...n,options:g(n.options)?_(n.options,s):n.options}:n);return{expectHash:h,dispatchArgs:A}}export{bt as a,v as b,Mt as c,kt as d,wt as e,Ke as f,ee as g,Le as h,Dt as i,Ue as j,Be as k,je as l,Lt as m,D as n,te as o,Wt as p,He as q,Jt as r,We as s,L as t,Ur as u,c as v,m as w,Br as x,g as y,jr as z,Gr as A,$r as B,xe as C,Me as D,Vr as E,Hr as F,zr as G,Ot as H,qr as I,Yr as J,Tt as K,Wr as L,Jr as M,ae as N,Xr as O,Zr as P,se as Q,we as R,Qr as S,en as T};
2
- //# sourceMappingURL=chunk-OEMI52ZS.js.map
1
+ import{S as E,T as j,U as G,V as k,W as w,X as $,Y as I,a as le,ba as F,g as P,i as J,o as N,q as U,s as B}from"./chunk-U35K7FSE.js";import{E as ce,F as ue,H as _,I as de,W as V,fa as Z,o as K,oa as fe,p as X}from"./chunk-WAP3DF4B.js";import{L as S}from"./chunk-HXM7K6VH.js";import{A as p,z as f}from"./chunk-IRYNVGKH.js";var Fe=new Set(["none","null"]);function bt(e={}){return[{optionKey:"dep",clearFlagKey:"clearDeps",valueFlag:"--dep",clearFlag:"--clear-deps",...e.depDisableFlagKey===void 0?{}:{disableFlagKey:e.depDisableFlagKey}},{optionKey:"comment",clearFlagKey:"clearComments",valueFlag:"--comment",clearFlag:"--clear-comments"},{optionKey:"note",clearFlagKey:"clearNotes",valueFlag:"--note",clearFlag:"--clear-notes"},{optionKey:"learning",clearFlagKey:"clearLearnings",valueFlag:"--learning",clearFlag:"--clear-learnings"},{optionKey:"file",clearFlagKey:"clearFiles",valueFlag:"--file",clearFlag:"--clear-files",...e.fileDisableFlagKey===void 0?{}:{disableFlagKey:e.fileDisableFlagKey}},{optionKey:"test",clearFlagKey:"clearTests",valueFlag:"--test",clearFlag:"--clear-tests",...e.testDisableFlagKey===void 0?{}:{disableFlagKey:e.testDisableFlagKey}},{optionKey:"doc",clearFlagKey:"clearDocs",valueFlag:"--doc",clearFlag:"--clear-docs",...e.docDisableFlagKey===void 0?{}:{disableFlagKey:e.docDisableFlagKey}},{optionKey:"reminder",clearFlagKey:"clearReminders",valueFlag:"--reminder",clearFlag:"--clear-reminders"},{optionKey:"event",clearFlagKey:"clearEvents",valueFlag:"--event",clearFlag:"--clear-events"},{optionKey:"typeOption",clearFlagKey:"clearTypeOptions",valueFlag:"--type-option",clearFlag:"--clear-type-options"}]}function v(e){return e===void 0?!1:Fe.has(e.trim().toLowerCase())}function Mt(e,t,r){if(!v(e))return;let n=r?` ${r}`:"";throw new p(`${t} no longer accepts "none" or "null".${n}`.trim(),f.USAGE)}function kt(e,t,r){if(!e||e.length===0||X(e)||!e.some(i=>v(i)))return;let o=r?` ${r}`:"";throw new p(`${t} no longer accepts "none" or "null".${o}`.trim(),f.USAGE)}function wt(e,t){for(let r of t){let n=e[r.optionKey];if(!Array.isArray(n)||n.length===0)continue;if(!n.every(s=>typeof s=="string"))throw new p(`${r.valueFlag} entries must be strings.`,f.USAGE);if(X(n))continue;let o=n;if(!o.some(s=>v(s)))continue;if(o.filter(s=>!v(s)).length>0)throw new p(`Cannot mix legacy clear token "none"/"null" with concrete ${r.valueFlag} entries. Use ${r.clearFlag} to clear or provide explicit entries.`,f.USAGE);e[r.optionKey]=void 0,e[r.clearFlagKey]=!0,r.disableFlagKey&&(e[r.disableFlagKey]=!1)}return e}var Ke=["close_reason","close-reason"],pe=[{canonical:"tags",aliases:["tags"],optionKey:"tags",metadataKey:"tags"}],me=[{canonical:"deadline",aliases:["deadline"],optionKey:"deadline",metadataKey:"deadline"},{canonical:"estimate",aliases:["estimate","estimated_minutes","estimated-minutes"],optionKey:"estimatedMinutes",metadataKey:"estimated_minutes"},{canonical:"acceptance-criteria",aliases:["acceptance_criteria","acceptance-criteria","ac"],optionKey:"acceptanceCriteria",metadataKey:"acceptance_criteria"},{canonical:"definition-of-ready",aliases:["definition_of_ready","definition-of-ready"],optionKey:"definitionOfReady",metadataKey:"definition_of_ready"},{canonical:"order",aliases:["order","rank"],optionKey:"order",metadataKey:"order"},{canonical:"goal",aliases:["goal"],optionKey:"goal",metadataKey:"goal"},{canonical:"objective",aliases:["objective"],optionKey:"objective",metadataKey:"objective"},{canonical:"value",aliases:["value"],optionKey:"value",metadataKey:"value"},{canonical:"impact",aliases:["impact"],optionKey:"impact",metadataKey:"impact"},{canonical:"outcome",aliases:["outcome"],optionKey:"outcome",metadataKey:"outcome"},{canonical:"why-now",aliases:["why_now","why-now"],optionKey:"whyNow",metadataKey:"why_now"}],De=[...pe,...me],ye=[{canonical:"assignee",aliases:["assignee"],optionKey:"assignee",metadataKey:"assignee"},{canonical:"parent",aliases:["parent"],optionKey:"parent",metadataKey:"parent"},{canonical:"reviewer",aliases:["reviewer"],optionKey:"reviewer",metadataKey:"reviewer"},{canonical:"risk",aliases:["risk"],optionKey:"risk",metadataKey:"risk"},{canonical:"confidence",aliases:["confidence"],optionKey:"confidence",metadataKey:"confidence"},{canonical:"sprint",aliases:["sprint"],optionKey:"sprint",metadataKey:"sprint"},{canonical:"release",aliases:["release"],optionKey:"release",metadataKey:"release"},{canonical:"blocked-by",aliases:["blocked_by","blocked-by"],optionKey:"blockedBy",metadataKey:"blocked_by"},{canonical:"blocked-reason",aliases:["blocked_reason","blocked-reason"],optionKey:"blockedReason",metadataKey:"blocked_reason"},{canonical:"unblock-note",aliases:["unblock_note","unblock-note"],optionKey:"unblockNote",metadataKey:"unblock_note"},{canonical:"reporter",aliases:["reporter"],optionKey:"reporter",metadataKey:"reporter"},{canonical:"severity",aliases:["severity"],optionKey:"severity",metadataKey:"severity"},{canonical:"environment",aliases:["environment"],optionKey:"environment",metadataKey:"environment"},{canonical:"repro-steps",aliases:["repro_steps","repro-steps"],optionKey:"reproSteps",metadataKey:"repro_steps"},{canonical:"resolution",aliases:["resolution"],optionKey:"resolution",metadataKey:"resolution"},{canonical:"expected-result",aliases:["expected_result","expected-result"],optionKey:"expectedResult",metadataKey:"expected_result"},{canonical:"actual-result",aliases:["actual_result","actual-result"],optionKey:"actualResult",metadataKey:"actual_result"},{canonical:"affected-version",aliases:["affected_version","affected-version"],optionKey:"affectedVersion",metadataKey:"affected_version"},{canonical:"fixed-version",aliases:["fixed_version","fixed-version"],optionKey:"fixedVersion",metadataKey:"fixed_version"},{canonical:"component",aliases:["component"],optionKey:"component",metadataKey:"component"},{canonical:"regression",aliases:["regression"],optionKey:"regression",metadataKey:"regression"},{canonical:"customer-impact",aliases:["customer_impact","customer-impact"],optionKey:"customerImpact",metadataKey:"customer_impact"}],ee=[...De,{canonical:"author",aliases:["author"],optionKey:"author",metadataKey:"author"},...ye],Le=[...pe,{canonical:"close-reason",aliases:Ke,optionKey:"closeReason",metadataKey:"close_reason"},...me,...ye],Pe=new Set(["none","null","-"]);function ge(e){return e==="create"?ee:Le}function H(e,t){let r=t.unset;if(r!==void 0&&typeof r!="string"&&!Array.isArray(r))return;let n=[];for(let o of ge(e))o.optionKey==="author"||!Object.hasOwn(t,o.optionKey)||t[o.optionKey]!==null||(Reflect.deleteProperty(t,o.optionKey),n.push(o.canonical));n.length!==0&&(t.unset=[...r===void 0?[]:typeof r=="string"?[r]:r,...n])}function Q(e){return typeof e=="string"&&Pe.has(e.trim().toLowerCase())}function Dt(e,t,r,n){return r?ge(e).flatMap(o=>{let i=t[o.optionKey],a=n[o.metadataKey];return Q(i)&&(Q(a)||Array.isArray(a)&&a.some(Q))?[`literal_sentinel_stored:${o.canonical}:${i.trim()}`]:[]}):[]}function Ue(e,t){return e.flatMap(r=>r.includes(",")&&t(r)?[r]:r.split(","))}function Be(e){let t=new Set,r=new Set;if(!e.raw||e.raw.length===0)return{metadataKeys:t,optionKeys:r};let n=Ue(e.raw,o=>e.resolveDefinition(o.trim().toLowerCase())!==void 0);for(let o of n){let i=o.trim().toLowerCase();if(!i)throw new p("--unset values must not be empty; name each field once, for example --unset parent,release",f.USAGE);if(v(i))throw new p('--unset no longer accepts "none" or "null". Specify concrete field names such as --unset deadline',f.USAGE);let a=e.resolveDefinition(i);if(!a)throw new p(`Unsupported --unset field "${o}". Supported fields: ${e.supportedFields}`,f.USAGE);t.add(a.metadataKey),r.add(a.optionKey)}return{metadataKeys:t,optionKeys:r}}function je(e,t,r){let n=e.trim().toLowerCase();if(!r)return;let o=r.command_to_fields?.get(t)??[];for(let i of o){if(i.allow_unset===!1)continue;let a=new Set;if(typeof i.key=="string"&&i.key.length>0&&a.add(i.key.toLowerCase()),typeof i.metadata_key=="string"&&i.metadata_key.length>0&&a.add(i.metadata_key.toLowerCase()),typeof i.cli_flag=="string"&&i.cli_flag.length>0&&(a.add(i.cli_flag.replaceAll("-","_").toLowerCase()),a.add(i.cli_flag.toLowerCase())),Array.isArray(i.cli_aliases))for(let s of i.cli_aliases)typeof s!="string"||s.length===0||(a.add(s.replaceAll("-","_").toLowerCase()),a.add(s.toLowerCase()));if(a.has(n))return{optionKey:i.key,metadataKey:i.metadata_key}}}var Ge=(()=>{let e=new Map;for(let t of ee)for(let r of t.aliases)e.set(r,{optionKey:t.optionKey,metadataKey:t.metadataKey});return e})(),$e=ee.map(e=>e.canonical).sort((e,t)=>e.localeCompare(t)).join(", ");function Lt(e,t){return Be({raw:e,supportedFields:$e,resolveDefinition:r=>Ge.get(r)??je(r,"create",t)})}var Ve={create:'client.create({ type: "Task", title: "Example", createMode: "progressive" })',update:'client.update(id, { estimatedMinutes: "45", force: false })',append:'client.append(id, "Body text")',reopen:'client.reopen(id, "The work recurred", { expectedResult: "Verified recovery" })'};function x(e,t,r){let n=`${e} ${t} must be ${r}.`;throw new p(n,f.USAGE,{code:"invalid_argument_value",reason:"invalid_mutation_option_value",field:t,changed:!1,required:n,examples:[Ve[e]]})}function D(e,t,r){typeof e!="string"&&x(t,r,"a string")}function te(e,t){(e===null||typeof e!="object"||Array.isArray(e))&&x(t,"options","an object")}function Ae(e,t){(e==="append"||e==="update")&&t.id!==void 0&&D(t.id,e,"id"),e==="item-reopen"&&(t.id!==void 0&&D(t.id,"reopen","id"),t.reason!==void 0&&D(t.reason,"reopen","reason"),t.options!==void 0&&He(t.options))}function Wt(e){te(e,"append");for(let t of["body","author","message"])e[t]!==void 0&&D(e[t],"append",t);e.force!==void 0&&typeof e.force!="boolean"&&x("append","force","a boolean")}function He(e){te(e,"reopen");for(let t of F["item-reopen"].optional){let r=e[t];r!==void 0&&(S(Reflect.get(E,t)).type==="boolean"?typeof r!="boolean"&&x("reopen",t,"a boolean"):D(r,"reopen",t))}}function ze(e,t){return e?t?"a string or string array":"a string array":"a string"}function qe(e,t,r,n,o,i){r===void 0||typeof r=="string"&&(!o||i)||n==="priority"&&typeof r=="number"&&Number.isFinite(r)||o&&Array.isArray(r)&&Array.from(r).every(a=>typeof a=="string")||x(e,t,ze(o,i))}function Ye(e,t,r){let n=e==="create"?U:B;for(let{param:o}of[...n,...N,{param:"force"}]){if(S(Reflect.get(E,o)).type!=="boolean")continue;let i=r.find(a=>a.keys.includes(o))?.keys??[o];for(let a of i)t[a]!==void 0&&typeof t[a]!="boolean"&&x(e,a,"a boolean")}}function re(e,t,r=!0,n=!1){let o=e==="create"?j:w;for(let{target:i,keys:a,repeatable:s}of o)if(S(Reflect.get(E,i)).type!=="boolean")for(let u of a){let h=n&&u!==i,A=s===!0&&(i!=="acceptanceCriteria"||h);qe(e,u,t[u],i,A,r||h)}Ye(e,t,o)}function Jt(e,t){te(t,e);let r=ce(t),n=K(r);return n||H(e,r),re(e,r,!1,n),r}import{Option as hr}from"commander";function O(e,t,r){if(typeof r!="string")return;let n=r.trim();n.length!==0&&e.push(t,n)}function y(e,t,r){r===!0&&e.push(t)}function C(e,t,r){if(Array.isArray(r))for(let n of r){if(typeof n!="string")continue;let o=n.trim();o.length!==0&&e.push(t,o)}}function We(e,t){let r=["test",e,"--run","--json","--progress"];return C(r,"--add",t.add),C(r,"--add-json",t.addJson),C(r,"--remove",t.remove),C(r,"--remove-index",Array.isArray(t.removeIndex)?t.removeIndex.map(n=>typeof n=="number"?String(n):n):t.removeIndex),O(r,"--match",t.match),O(r,"--only-index",typeof t.onlyIndex=="number"?String(t.onlyIndex):t.onlyIndex),y(r,"--only-last",t.onlyLast),y(r,"--full-history",t.fullHistory),C(r,"--measure",t.measure),O(r,"--metric-below",t.metricBelow),O(r,"--metric-diff",t.metricDiff),Je(r,t),O(r,"--author",t.author),O(r,"--message",t.message),y(r,"--force",t.force),r}function Je(e,t){O(e,"--timeout",t.timeout),C(e,"--env-set",t.envSet),C(e,"--env-clear",t.envClear),y(e,"--shared-host-safe",t.sharedHostSafe),O(e,"--pm-context",t.pmContext),y(e,"--override-linked-pm-context",t.overrideLinkedPmContext),O(e,"--workspace-context",t.workspaceContext),y(e,"--override-linked-workspace-context",t.overrideLinkedWorkspaceContext),y(e,"--allow-untrusted-linked-tests",t.allowUntrustedLinkedTests),y(e,"--fail-on-context-mismatch",t.failOnContextMismatch),y(e,"--fail-on-skipped",t.failOnSkipped),y(e,"--fail-on-empty-test-run",t.failOnEmptyTestRun),y(e,"--require-assertions-for-pm",t.requireAssertionsForPm),y(e,"--check-context",t.checkContext),y(e,"--full-output",t.fullOutput),y(e,"--auto-pm-context",t.autoPmContext)}function he(e,t){let r=[],n=new Set;for(let o of t.keys){if(!Object.hasOwn(e,o))continue;let i=e[o];if(i!=null){if(typeof i=="string"){r.push(i);continue}if(!Array.isArray(i)||!i.every(a=>typeof a=="string"))return;n.has(i)||(n.add(i),r.push(...i))}}return r.length>0?r.join("; "):void 0}function R(e,t){return e.find(n=>n.target===t)??{target:t,keys:[t]}}function l(e,t){return e[t]===!0?!0:void 0}function T(e,t){return e[t]===!1?!0:void 0}function z(e,t){return t.some(r=>e[r]===!0)?!0:void 0}function ne(e,t){for(let[r,n]of Object.entries(t))r==="__proto__"||r==="constructor"||r==="prototype"||Object.hasOwn(e,r)||(e[r]=n)}function _e(e,t={}){let r=a=>P(e,R(G,a)),n=a=>J(e,R(k,a)),o=r("type");if(t.requireType!==!1&&o===void 0)throw new p("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).",f.USAGE);let i={title:r("title"),description:r("description"),type:o,template:r("template"),createMode:r("createMode"),defer:n("defer"),deferReason:r("deferReason"),schedulePreset:r("schedulePreset"),status:r("status"),closeReason:r("closeReason"),completedAt:r("completedAt"),priority:r("priority"),tags:r("tags"),addTags:n("addTags"),body:r("body"),deadline:r("deadline"),estimatedMinutes:r("estimatedMinutes"),acceptanceCriteria:he(e,R(k,"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"),inheritFocus:e.inheritFocus,allowMissingParent:z(e,["allowMissingParent","allow_missing_parent"])===!0,allowUnresolvedDeps:z(e,["allowUnresolvedDeps","allow_unresolved_deps"])===!0,allowDuplicate:l(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:l(e,"clearDeps"),clearComments:l(e,"clearComments"),clearNotes:l(e,"clearNotes"),clearLearnings:l(e,"clearLearnings"),clearFiles:l(e,"clearFiles"),clearTests:l(e,"clearTests"),clearDocs:l(e,"clearDocs"),clearReminders:l(e,"clearReminders"),clearEvents:l(e,"clearEvents"),clearTypeOptions:l(e,"clearTypeOptions")};return ne(i,e),_(e,i)}function Oe(e){let t=o=>P(e,R($,o)),r=o=>J(e,R(I,o)),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:he(e,R(I,"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"),allowUnresolvedDeps:z(e,["allowUnresolvedDeps","allow_unresolved_deps"])===!0,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:l(e,"replaceDeps"),replaceTests:l(e,"replaceTests"),replaceFiles:l(e,"replaceFiles"),replaceDocs:l(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:l(e,"clearDeps"),clearComments:l(e,"clearComments"),clearNotes:l(e,"clearNotes"),clearLearnings:l(e,"clearLearnings"),clearFiles:l(e,"clearFiles"),clearTests:l(e,"clearTests"),clearDocs:l(e,"clearDocs"),clearReminders:l(e,"clearReminders"),clearEvents:l(e,"clearEvents"),clearTypeOptions:l(e,"clearTypeOptions")};return ne(n,e),_(e,n)}function d(e,t){let r=R(le,t),n=P(e,r);if(n!==void 0)return n;for(let o of r.keys){let i=e[o];if(Array.isArray(i)){let a=i.filter(s=>typeof s=="string");if(a.length>0)return a.join(",")}if(t==="ids"&&typeof i=="string")return i;if(typeof i=="number"&&Number.isFinite(i))return String(i)}}function Xe(e){let t=l(e,"filterFilesMissing"),r=l(e,"filterDocsMissing");return{filterReviewerMissing:l(e,"filterReviewerMissing"),filterRiskMissing:l(e,"filterRiskMissing"),filterConfidenceMissing:l(e,"filterConfidenceMissing"),filterSprintMissing:l(e,"filterSprintMissing"),filterReleaseMissing:l(e,"filterReleaseMissing"),hasNotes:l(e,"hasNotes"),hasLearnings:l(e,"hasLearnings"),hasFiles:l(e,"hasFiles"),hasDocs:l(e,"hasDocs"),hasTests:l(e,"hasTests"),hasComments:l(e,"hasComments"),hasDeps:l(e,"hasDeps"),hasBody:l(e,"hasBody"),hasLinkedCommand:l(e,"hasLinkedCommand"),noNotes:T(e,"notes"),noLearnings:T(e,"learnings"),noFiles:T(e,"files")??t,filterFilesMissing:t,noDocs:T(e,"docs")??r,filterDocsMissing:r,noTests:T(e,"tests"),noComments:T(e,"comments"),noDeps:T(e,"deps"),emptyBody:l(e,"emptyBody"),noLinkedCommand:T(e,"linkedCommand")}}function Te(e){let t={status:d(e,"status"),type:d(e,"type"),tag:d(e,"tag"),priority:d(e,"priority"),deadlineBefore:d(e,"deadlineBefore"),deadlineAfter:d(e,"deadlineAfter"),updatedAfter:d(e,"updatedAfter"),updatedBefore:d(e,"updatedBefore"),createdAfter:d(e,"createdAfter"),createdBefore:d(e,"createdBefore"),today:l(e,"today"),recent:l(e,"recent"),ids:d(e,"ids"),assignee:d(e,"assignee"),assigneeFilter:d(e,"assigneeFilter"),parent:d(e,"parent"),sprint:d(e,"sprint"),release:d(e,"release"),limit:d(e,"limit"),offset:d(e,"offset"),noTruncate:T(e,"truncate"),includeBody:l(e,"includeBody"),strictRead:l(e,"strictRead"),compact:l(e,"compact"),brief:l(e,"brief"),full:l(e,"full"),fields:d(e,"fields"),sort:d(e,"sort"),order:d(e,"order"),tree:l(e,"tree"),treeDepth:d(e,"treeDepth"),filterAcMissing:l(e,"filterAcMissing"),filterEstimatesMissing:z(e,["filterEstimatesMissing","filterEstimateMissing"]),filterResolutionMissing:l(e,"filterResolutionMissing"),filterMetadataMissing:l(e,"filterMetadataMissing"),...Xe(e)};return ne(t,e),t}var Ze=Symbol("pm.mcp-mutation-transport"),Qe=new Set(["create","update","append"]),W={create:{parameters:U,aliases:j,strings:G,repeatables:k},update:{parameters:B,aliases:w,strings:$,repeatables:I}},et=new Set(["activity","aggregate","context","contracts","deps","files-discover","files-lookup","get","graph","health","history","history-attest","list","next","search","stats","telemetry","validate"]);function L(e){return Ze in e}function Y(e,t){return L(e)?ue(t):_(e,t)}function Ur(e,t,r=[]){let n=_(e,{...e,...t});for(let o of r)Reflect.deleteProperty(n,o);return n}function c(e,t){let r=e[t];return typeof r=="string"&&r.trim().length>0?r:void 0}function m(e,t){let r=e[t];return typeof r=="string"?r.trim().length>0?r:void 0:typeof r=="number"&&Number.isFinite(r)?String(r):void 0}function Br(e,t){let r=e[t];return typeof r=="string"?r:typeof r=="number"&&Number.isFinite(r)?String(r):void 0}function g(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function jr(e,t){if(typeof e=="number"){if(!Number.isInteger(e))throw new p(`${t} must be a finite integer.`,f.USAGE);return e}if(typeof e=="string"&&e.trim().length>0){let r=Number(e);if(!Number.isInteger(r))throw new p(`${t} must be a finite integer.`,f.USAGE);return r}}function Gr(e,t){return typeof e.limit=="number"&&Number.isFinite(e.limit)?e.limit:typeof t.limit=="number"&&Number.isFinite(t.limit)?t.limit:c(e,"limit")??c(t,"limit")}function $r(e){let t=c(e,"outputFormat");return{json:!0,quiet:!0,author:c(e,"author"),path:c(e,"path"),noExtensions:e.noExtensions===!0||e.no_extensions===!0,noPager:!0,outputInclude:c(e,"outputInclude"),outputLimit:m(e,"outputLimit"),outputBudget:m(e,"outputBudget"),outputSession:c(e,"outputSession"),outputCursor:c(e,"outputCursor"),outputFormat:t==="json"||t==="toon"?t:void 0}}var Ee=new Set(["tags","blockedBy","blocked_by","skills","fields"]),ve=new Set(["comment","note","learning","reminder","event","dep","depRemove","dep_remove","file","doc","test","unset","addGlob","add_glob","migrate","envSet","env_set","envClear","env_clear"]),tt=new Set([...ve].filter(e=>e!=="file")),rt=new Set(["files","files-discover","docs","test","test-all"]),oe=new Set(["comments","notes","learnings"]);function nt(e,t){if(!(!oe.has(e)||!Object.prototype.hasOwnProperty.call(t,"file")))throw new p(`MCP ${e} does not accept options.file. Pass annotation text in options.add instead.`,f.USAGE,{code:"mcp_annotation_file_unavailable",required:"Pass annotation text as JSON data; MCP annotation actions cannot read server-local files."})}var it=new Set(["claim","release","start-task","pause-task","close-task"]),xe={history:["order"],"history-attest":["verify","output","hashAlgorithm"],list:["status","type","tag","priority","limit","offset"],search:["mode","status","type","tag","priority","limit"],create:["title","type","status","description","body","priority","tags","parent","createMode","create_mode","allowMissingParent","allowDuplicate","inheritFocus"],update:["parent","allowMissingParent","completedAt"],copy:["allowDuplicate"],close:["duplicateOf","completedAt","releaseAssignment"],claim:["start","next","ifAvailable","takeoverStale"],"start-task":["takeoverStale"],release:["pause","handoff"],comments:["ifAbsent"],notes:["ifAbsent"],learnings:["ifAbsent"],extension:["dryRun","offline","fields","scope"],package:["dryRun","offline","fields","scope"],install:["dryRun"],upgrade:["scope","dryRun","cliOnly","packagesOnly","repair","tag","packageName"],append:["body"]},at=new Set(["context","get","list","next","search","comments","notes","learnings","files","docs","test"]),ot=new Set(["query","keywords","id","text"]);function st(e){return at.has(e)?F[e].optional.filter(t=>!ot.has(t)):[]}var lt=new Set(["claim","start-task","comments","notes","learnings","files","docs","test"]);function ct(e,t){if(!lt.has(e??""))return t;let r={...t};for(let n of F[e].optional){let o=n.replace(/[A-Z]/gu,i=>`_${i.toLowerCase()}`);o===n||r[o]===void 0||(r[n]??=r[o],delete r[o])}return r}function ut(e,t,r){if(!oe.has(e??""))return r;let n=r,o=n.text??t.text;if(o===void 0)return n;if(n.add!==void 0&&n.add!==o){let a=e.replace(/s$/u,"");throw new p(`Specify ${a} text either as text or with add, not both.`,f.USAGE,{code:"annotation_text_source_conflict",field:"text",required:`Pass the ${a} text once: text and add are the same source.`})}let i={...n,add:o};return delete i.text,i}function dt(e,t){let r=t.replace(/[A-Z]/gu,n=>`_${n.toLowerCase()}`);return e[t]!==void 0||e[r]!==void 0}function ft(e){return[...xe[e]??[],...st(e),...be]}var be=["outputInclude","outputLimit","outputBudget","outputFormat","outputSession","outputCursor"];function Me(e,t=""){let r={},n=rt.has(t),o=t==="files"||t==="files-discover"||t==="docs",i=oe.has(t)?tt:ve;for(let[a,s]of Object.entries(e)){if(Array.isArray(s)&&Ee.has(a)){r[a]=s.join(",");continue}if(a==="note"&&o){r[a]=s;continue}if(typeof s=="string"&&i.has(a)){r[a]=[s];continue}if(typeof s=="string"&&n&&(a==="add"||a==="remove")){r[a]=[s];continue}r[a]=s}return Object.assign(r,Object.fromEntries(Object.getOwnPropertySymbols(e).map(a=>[a,Reflect.get(e,a)]))),r}function pt(e,t,r){let n=c(e,"author");return n!==void 0?n:r!==void 0&&it.has(r)?c(e,"assignee")??c(t,"assignee"):void 0}function mt(e,t){return t!==void 0&&e.author===void 0?{...e,author:t}:e}function yt(e,t,r){let n={},o=W[e],i=new Set([...o.parameters.map(({param:a})=>a),...N.map(({param:a})=>a),...xe[e],...be,"force"]);for(let a of i){let s=o.aliases.find(u=>u.keys.includes(a))?.keys??[a];t[a]===void 0||s.some(u=>r[u]!==void 0)||(n[a]=t[a])}return n}function b(e,t){throw new p(`Invalid MCP ${e} value for "${t}". No changes were made.`,f.USAGE,{code:"invalid_argument_value",reason:"invalid_mutation_option_value",changed:!1,field:t,required:`Provide valid ${e} field values and an options object; inspect the pm_${e} input schema for supported types.`})}function gt(e,t,r){let n=W[e],o=[...n.parameters,...N,{param:"force"}];for(let{param:i}of o){if(S(E[i]).type!=="boolean")continue;let s=(n.aliases.find(u=>u.keys.includes(i))?.keys??[i]).find(u=>r[u]!==void 0&&typeof r[u]!="boolean");s!==void 0&&b(e,s)}for(let i of["idOnly","fullChangedFields"])t[i]!==void 0&&typeof t[i]!="boolean"&&b(e,i)}function At(e,t,r){t.options!==void 0&&!g(t.options)&&b(e,"options"),gt(e,t,r);for(let a of Ee){let s=r[a];Array.isArray(s)&&s.some(u=>typeof u!="string")&&b(e,a)}let n=Ie(r,e),o=W[e];for(let{keys:a,target:s}of o.strings)a.some(u=>r[u]!==void 0)&&n[s]===void 0&&b(e,s);let i=o.repeatables.flatMap(({keys:a})=>a).find(a=>{let s=r[a];return s!==void 0&&typeof s!="string"&&(!Array.isArray(s)||s.some(u=>typeof u!="string"))});return i!==void 0&&b(e,i),n}function ht(e,t,r,n,o){let i=(t==="create"||t==="update")&&L(e),a={...i?yt(t,e,n):r,...n};if((t==="create"||t==="update")&&!i){let s=g(e.options)&&K(e.options);s||H(t,a),re(t,a,!0,s)}return i?At(t,e,a):o?Me(a,t):a}function _t(e,t){return!Qe.has(e??"")||K(t)?t:fe(t)}function Vr(e,t,{nativeAction:r=!0}={}){Ae(t,e);let n=g(e.options)?e.options:void 0,o=S(e.options),i={},a=A=>{dt(o,A)||e[A]===void 0||(i[A]=e[A])};for(let A of ft(t??""))a(A);t!==void 0&&L(e)&&nt(t,o);let s=ut(t,e,ct(t,ht(e,t,i,o,r)));if(t==="history-attest"&&L(e)&&(s.output!==void 0||typeof s.verify=="string"))throw new p("MCP history attest does not accept server-local proof paths. Export the returned JSON bundle and pass that JSON object as verify.",f.USAGE);let u=L(e)?e:n??e,h=Y(u,mt(s,pt(e,s,t)));return _t(t,h)}function Hr(e){if(e.addNote===void 0)return e;let t={...e};return t.note===void 0&&typeof t.addNote=="string"&&(t.note=t.addNote),delete t.addNote,t}function zr(e){let t={...e};return t.discoveryNote!==void 0&&t.note===void 0&&typeof t.discoveryNote=="string"&&(t.note=t.discoveryNote),delete t.discover,delete t.discoveryNote,t}function Ot(e){let t=[],r=!0;for(let n of e.trim().toLowerCase()){if(n>="a"&&n<="z"||n>="0"&&n<="9"){t.push(n),r=!1;continue}r||(t.push("-"),r=!0)}return t.at(-1)==="-"&&t.pop(),t.join("")}function qr(e){return!et.has(Ot(e))}function Yr(e){return e.trim().toLowerCase().split(/\s+/).filter(Boolean).join(" ")}function Tt(e){return Array.isArray(e)?e.map(t=>String(t)).filter(t=>t.length>0):[]}function Wr(e,t){let r=new Set(["action","args","author","cwd","fullChangedFields","id","options","path","query","reason","target"]),n={};for(let[i,a]of Object.entries(e))r.has(i)||(n[i]=a);let o={...n,...t};return delete o.args,delete o.author,o}function Jr(e,t){let r=Y(t??{},{...t});return{changedFields:e.fullChangedFields===!0?"full":"compact",idOnly:e.idOnly===!0,runnerOptions:r}}function ae(e){return{type:m(e,"filterType"),tag:m(e,"filterTag"),priority:m(e,"filterPriority"),deadlineBefore:m(e,"filterDeadlineBefore"),deadlineAfter:m(e,"filterDeadlineAfter"),updatedAfter:m(e,"filterUpdatedAfter"),updatedBefore:m(e,"filterUpdatedBefore"),createdAfter:m(e,"filterCreatedAfter"),createdBefore:m(e,"filterCreatedBefore"),ids:Z(e.ids),assignee:m(e,"filterAssignee"),assigneeFilter:m(e,"filterAssigneeFilter")??m(e,"filterAssignee_filter"),parent:m(e,"filterParent"),sprint:m(e,"filterSprint"),release:m(e,"filterRelease"),limit:m(e,"limit"),offset:m(e,"offset")}}function ie(e){if(typeof e=="string"&&e.trim().length>0)return e;if(Array.isArray(e))return Tt(e)}function q(e){if(typeof e=="number"&&Number.isFinite(e)||typeof e=="string"&&e.trim().length>0)return e}function Xr(e){let t=ie(e.kind),r=ie(e.exemptIsolate),n=ie(e.exemptIsolateType);return{...t===void 0?{}:{kind:t},maxDepth:q(e.maxDepth),limit:q(e.limit),after:c(e,"after"),direction:c(e,"direction"),maxPaths:q(e.maxPaths),sample:q(e.sample),...r===void 0?{}:{exemptIsolate:r},...n===void 0?{}:{exemptIsolateType:n},saveBaseline:e.saveBaseline===!0,rebuild:e.rebuild===!0,clear:e.clear===!0,summary:e.summary===!0,...e.full===!0?{full:!0}:{}}}function ke(e){let t=Te(e);return e.ids!==void 0&&(t.ids=Z(e.ids)),t}function Zr(e){return{status:c(e,"filterStatus"),list:g(e.list)?ke(e.list):ae(e),reason:c(e,"reason"),completedAt:c(e,"completedAt")??c(e,"completed_at"),resolution:c(e,"resolution"),expectedResult:c(e,"expectedResult")??c(e,"expected_result")??c(e,"expected"),actualResult:c(e,"actualResult")??c(e,"actual_result")??c(e,"actual"),validateClose:c(e,"validateClose")??c(e,"validate_close"),author:c(e,"author"),message:c(e,"message"),force:e.force===!0?!0:void 0,dryRun:e.dryRun===!0||e.dry_run===!0?!0:void 0,rollback:V(e.rollback),checkpoint:e.checkpoint===!1||e.noCheckpoint===!0||e.no_checkpoint===!0?!1:void 0}}var se=new Set(["filterStatus","filterType","filterTag","filterPriority","filterDeadlineBefore","filterDeadlineAfter","filterUpdatedAfter","filterUpdatedBefore","filterCreatedAfter","filterCreatedBefore","filterAssignee","filterAssigneeFilter","filterAssignee_filter","filterParent","filterSprint","filterRelease","ids","list","update","limit","offset","dryRun","dry_run","rollback","checkpoint","noCheckpoint","no_checkpoint"]);function Se(e){let t={};for(let[r,n]of Object.entries(e))se.has(r)||(t[r]=n);return we(t)}function we(e){return Ie(e,"update")}function Ie(e,t){let r=Me(e,t),n=W[t],o=new Set([...n.parameters,...N].filter(({booleanish:i})=>i===!0).map(({param:i})=>i));for(let{keys:i}of n.repeatables)for(let a of i)typeof r[a]=="string"&&(r[a]=[r[a]]);for(let i of n.strings)for(let a of i.keys){let s=r[a];(typeof s=="number"&&Number.isFinite(s)||s===!1&&o.has(a))&&(r[a]=String(s))}return t==="create"?{..._e(r,{requireType:!1})}:Oe(r)}var St=new Map(w.flatMap(({target:e,keys:t})=>t.map(r=>[r,e])));function Ct(e){return e.startsWith("filter")||e==="ids"||e==="limit"||e==="offset"}function Ce(e,t){throw new p(`update-many "${e}" cannot be null. No changes were made.`,f.USAGE,{code:"invalid_argument_value",reason:"invalid_mutation_option_value",changed:!1,field:e,required:t})}function Rt(e){return Object.fromEntries(Object.entries(e).filter(([t])=>!se.has(t)))}function Re(e,t,r){if(!e)return;let n=g(t.list)?t.list:{},o=g(t.update)?t.update:void 0,i=Object.keys(t).find(s=>t[s]===null&&(o!==void 0||se.has(s)||Ct(s)))??Object.keys(n).filter(s=>n[s]===null).map(s=>`list.${s}`)[0];i!==void 0&&Ce(i,`"${i}" selects rows or controls the run: omit it or pass a value. To clear an item field, pass null on the field itself${o===void 0?"":" inside update"}.`);let a=o??Rt(t);for(let[s,u]of Object.entries(a)){if(u!==null)continue;let h=St.get(s);h===void 0&&Ce(s,`Pass unset: ["${s}"] to clear a field, or omit "${s}".`),r[h]=null}}var Nt=["author","message"];function Et(e,t){let r=Object.fromEntries(Nt.filter(n=>typeof e[n]=="string"&&t[n]===void 0).map(n=>[n,e[n]]));return e.force===!0&&t.force===void 0&&(r.force=!0),Object.keys(r).length===0?t:_(t,{...t,...r})}function Qr(e,t=!1){if(g(e.list)||g(e.update)){let n=g(e.update)?Et(e,e.update):Se(e),o=Y(e,we(n));return Re(t,e,o),{status:m(e,"filterStatus"),list:g(e.list)?ke(e.list):ae(e),update:de(n,o),dryRun:e.dryRun===!0||e.dry_run===!0?!0:void 0,rollback:V(e.rollback),checkpoint:e.checkpoint===!1||e.noCheckpoint===!0||e.no_checkpoint===!0?!1:void 0}}let r=Y(e,Se(e));return Re(t,e,r),{status:m(e,"filterStatus"),list:ae(e),update:r,dryRun:e.dryRun===!0||e.dry_run===!0?!0:void 0,rollback:V(e.rollback),checkpoint:e.checkpoint===!1||e.noCheckpoint===!0||e.no_checkpoint===!0?!1:void 0}}function Ne(e){return"expectHash"in e||"expect_hash"in e}function en(e){if(!Ne(e)&&!(g(e.options)&&Ne(e.options)))return{expectHash:void 0,dispatchArgs:e};let{expectHash:t,expect_hash:r,...n}=e,o=g(n.options)?n.options:{},{expectHash:i,expect_hash:a,...s}=o,u=[t,r,i,a].filter(M=>M!==void 0),h=u.length>1?u.flatMap(M=>Array.isArray(M)?M:[M]):u[0],A=_(e,"options"in n?{...n,options:g(n.options)?_(n.options,s):n.options}:n);return{expectHash:h,dispatchArgs:A}}export{bt as a,v as b,Mt as c,kt as d,wt as e,Ke as f,ee as g,Le as h,Dt as i,Ue as j,Be as k,je as l,Lt as m,D as n,te as o,Wt as p,He as q,Jt as r,We as s,L as t,Ur as u,c as v,m as w,Br as x,g as y,jr as z,Gr as A,$r as B,xe as C,Me as D,Vr as E,Hr as F,zr as G,Ot as H,qr as I,Yr as J,Tt as K,Wr as L,Jr as M,ae as N,Xr as O,Zr as P,se as Q,we as R,Qr as S,en as T};
2
+ //# sourceMappingURL=chunk-7G7JIXLL.js.map