@unbrained/pm-cli 2026.10.24 → 2026.10.25

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 (156) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +20 -0
  3. package/dist/cli/error-guidance.js +2 -2
  4. package/dist/cli/extension-command-help.js +2 -2
  5. package/dist/cli/register-history-activity.js +1 -1
  6. package/dist/cli-bundle/bundle-manifest.json +1 -1
  7. package/dist/cli-bundle/chunks/{chunk-R7KWBFM2.js → chunk-3CYXE6BV.js} +2 -2
  8. package/dist/cli-bundle/chunks/chunk-444VPGQT.js +20 -0
  9. package/dist/cli-bundle/chunks/{chunk-YEI4N4A6.js → chunk-4GD6QOP6.js} +21 -21
  10. package/dist/cli-bundle/chunks/{chunk-HZNFNETE.js → chunk-5ZPT67NJ.js} +6 -6
  11. package/dist/cli-bundle/chunks/{chunk-KGZGXC7T.js → chunk-7C3GCLOO.js} +29 -29
  12. package/dist/cli-bundle/chunks/{chunk-3VI4XDP2.js → chunk-7T3H24HN.js} +2 -2
  13. package/dist/cli-bundle/chunks/{chunk-MA7SNKYK.js → chunk-EYCVAAIP.js} +2 -2
  14. package/dist/cli-bundle/chunks/{chunk-CDR5ES7Q.js → chunk-FNZT4BTE.js} +38 -34
  15. package/dist/cli-bundle/chunks/{chunk-CNEUJHA4.js → chunk-HMJSFWHK.js} +2 -2
  16. package/dist/cli-bundle/chunks/{chunk-ZDVTXLA6.js → chunk-LNKPH2DD.js} +2 -2
  17. package/dist/cli-bundle/chunks/{chunk-Z62RXNHW.js → chunk-MVJGGCGQ.js} +2 -2
  18. package/dist/cli-bundle/chunks/{chunk-3S5FLCG7.js → chunk-O3ZTGRIH.js} +2 -2
  19. package/dist/cli-bundle/chunks/{chunk-FASDGYQC.js → chunk-RD6UW3MW.js} +3 -3
  20. package/dist/cli-bundle/chunks/{chunk-UY5UHI4I.js → chunk-RLXK2S7P.js} +2 -2
  21. package/dist/cli-bundle/chunks/{chunk-URZB3USE.js → chunk-RQKDANP7.js} +42 -42
  22. package/dist/cli-bundle/chunks/chunk-TLMXSYJA.js +2 -0
  23. package/dist/cli-bundle/chunks/{chunk-4PNAUT2E.js → chunk-UI3FD3DW.js} +2 -2
  24. package/dist/cli-bundle/chunks/{chunk-VSSHB6XI.js → chunk-VAEB6IUQ.js} +2 -2
  25. package/dist/cli-bundle/chunks/{chunk-TZYQ4JDZ.js → chunk-XYLBOXSH.js} +6 -6
  26. package/dist/cli-bundle/chunks/{chunk-CSE47ZAN.js → chunk-YCCGZHOR.js} +2 -2
  27. package/dist/cli-bundle/chunks/{indexed-receipt-blobs-XANVELIV.js → indexed-receipt-blobs-47I6KKDO.js} +2 -2
  28. package/dist/cli-bundle/chunks/{mutation-admission-NVTBZ7DH.js → mutation-admission-747C6IUR.js} +2 -2
  29. package/dist/cli-bundle/chunks/{register-list-query-2FE6K7FQ.js → register-list-query-COST6KRV.js} +3 -3
  30. package/dist/cli-bundle/chunks/{register-mutation-KZXQUZUH.js → register-mutation-JZVVJUHY.js} +2 -2
  31. package/dist/cli-bundle/chunks/register-operations-S4LKLUBJ.js +2 -0
  32. package/dist/cli-bundle/chunks/{register-setup-P3VLCTDY.js → register-setup-3ITZXPOL.js} +2 -2
  33. package/dist/cli-bundle/chunks/{settlement-hook-YUVCO65H.js → settlement-hook-5IVCF6ZY.js} +2 -2
  34. package/dist/cli-bundle/chunks/stage-3UUIYROS.js +2 -0
  35. package/dist/cli-bundle/focused-chunks/{chunk-JYXA4JIP.js → chunk-22727JYL.js} +2 -2
  36. package/dist/cli-bundle/focused-chunks/{chunk-RVUGTIIU.js → chunk-3FM75SBJ.js} +2 -2
  37. package/dist/cli-bundle/focused-chunks/{chunk-RSEGFZTY.js → chunk-3M5FZCMC.js} +54 -54
  38. package/dist/cli-bundle/focused-chunks/{chunk-BUZ2Z4P3.js → chunk-46KDJH3K.js} +2 -2
  39. package/dist/cli-bundle/focused-chunks/chunk-5LBZR6YW.js +2 -0
  40. package/dist/cli-bundle/focused-chunks/{chunk-SHUPX6G2.js → chunk-74KC7FUQ.js} +2 -2
  41. package/dist/cli-bundle/focused-chunks/chunk-77NU7NPN.js +2 -0
  42. package/dist/cli-bundle/focused-chunks/{chunk-NX7TVNUM.js → chunk-7DEZT4JN.js} +2 -2
  43. package/dist/cli-bundle/focused-chunks/{chunk-ES2NGVHZ.js → chunk-B5JOVH5F.js} +2 -2
  44. package/dist/cli-bundle/focused-chunks/chunk-HMYDUEQK.js +8 -0
  45. package/dist/cli-bundle/focused-chunks/chunk-IVLIUPVV.js +12 -0
  46. package/dist/cli-bundle/focused-chunks/{chunk-X5YRJMAY.js → chunk-KIIGME23.js} +2 -2
  47. package/dist/cli-bundle/focused-chunks/{chunk-IUAYTD2S.js → chunk-LWJ2X75I.js} +24 -24
  48. package/dist/cli-bundle/focused-chunks/{chunk-SBJ2IKTH.js → chunk-MT5TYMEU.js} +2 -2
  49. package/dist/cli-bundle/focused-chunks/{chunk-7RQOFHMH.js → chunk-NC5HUGHU.js} +3 -3
  50. package/dist/cli-bundle/focused-chunks/chunk-NI5SG2M2.js +2 -0
  51. package/dist/cli-bundle/focused-chunks/{chunk-ZMWLV2CE.js → chunk-QH5KMIYZ.js} +2 -2
  52. package/dist/cli-bundle/focused-chunks/{chunk-POLMFGPQ.js → chunk-U6HXIF6G.js} +2 -2
  53. package/dist/cli-bundle/focused-chunks/{chunk-6HJCSHBG.js → chunk-URWYYJ7K.js} +2 -2
  54. package/dist/cli-bundle/focused-chunks/{chunk-5MKNVJCM.js → chunk-W7MCCFYV.js} +2 -2
  55. package/dist/cli-bundle/focused-chunks/{chunk-AGCEWJ27.js → chunk-WMPDY5ZU.js} +2 -2
  56. package/dist/cli-bundle/focused-chunks/{chunk-R536272H.js → chunk-Y4JHHY24.js} +2 -2
  57. package/dist/cli-bundle/focused-chunks/{chunk-TAHSXKAT.js → chunk-ZYCOMRFT.js} +2 -2
  58. package/dist/cli-bundle/focused-chunks/{indexed-receipt-blobs-FVOA3XMI.js → indexed-receipt-blobs-YCLN2ZZG.js} +2 -2
  59. package/dist/cli-bundle/focused-chunks/{mutation-admission-PB6YFY7S.js → mutation-admission-BQBQXILV.js} +2 -2
  60. package/dist/cli-bundle/focused-chunks/{settlement-hook-2VXEB6PP.js → settlement-hook-XVS6P2XI.js} +2 -2
  61. package/dist/cli-bundle/focused-chunks/stage-VSIL4MTZ.js +2 -0
  62. package/dist/cli-bundle/main.js +19 -19
  63. package/dist/cli-bundle/sdk-authoring.js +1 -1
  64. package/dist/cli-bundle/sdk-contracts.js +2 -2
  65. package/dist/cli-bundle/sdk-core.js +15 -15
  66. package/dist/cli-bundle/sdk-governance.js +1 -1
  67. package/dist/cli-bundle/sdk-graph.js +1 -1
  68. package/dist/cli-bundle/sdk-merge.js +55 -56
  69. package/dist/cli-bundle/sdk-query.js +1 -1
  70. package/dist/cli-bundle/sdk-runtime.js +1 -1
  71. package/dist/cli-bundle/sdk-testing.js +1 -1
  72. package/dist/cli-bundle/sdk.js +3 -3
  73. package/dist/core/diagnostics/remediation.js +1 -1
  74. package/dist/core/shared/errors.d.ts +13 -0
  75. package/dist/core/shared/errors.js +1 -1
  76. package/dist/core/store/settings.js +2 -2
  77. package/dist/sdk/agent/command-recovery.js +1 -1
  78. package/dist/sdk/cli-contracts/commander-types.js +1 -1
  79. package/dist/sdk/cli-contracts/flag-contracts.d.ts +2 -0
  80. package/dist/sdk/cli-contracts/flag-contracts.js +1 -1
  81. package/dist/sdk/cli-contracts/flag-lexicon-contracts.js +1 -1
  82. package/dist/sdk/cli-contracts/grammar-contracts.js +1 -1
  83. package/dist/sdk/cli-contracts/registration-helpers.d.ts +2 -0
  84. package/dist/sdk/cli-contracts/registration-helpers.js +2 -2
  85. package/dist/sdk/cli-contracts/runtime-contracts.js +1 -1
  86. package/dist/sdk/cli-contracts/tool-option-contracts.js +1 -1
  87. package/dist/sdk/completion/fish.js +3 -1
  88. package/dist/sdk/completion/zsh.js +3 -1
  89. package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
  90. package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1 -1
  91. package/dist/sdk/governance/health-merge-evidence.d.ts +5 -0
  92. package/dist/sdk/governance/health-merge-evidence.js +1 -1
  93. package/dist/sdk/governance/health.js +1 -1
  94. package/dist/sdk/index.d.ts +1 -1
  95. package/dist/sdk/index.js +1 -1
  96. package/dist/sdk/merge/history-scalar-rebase.d.ts +9 -0
  97. package/dist/sdk/merge/history-scalar-rebase.js +2 -0
  98. package/dist/sdk/merge/ignored-artifacts.d.ts +13 -0
  99. package/dist/sdk/merge/ignored-artifacts.js +2 -0
  100. package/dist/sdk/merge/stage.js +1 -1
  101. package/dist/sdk/merge/three-way.js +1 -1
  102. package/dist/sdk/public-surface.json +1 -1
  103. package/dist/sdk/query/activity.d.ts +14 -2
  104. package/dist/sdk/query/activity.js +1 -1
  105. package/dist/sdk/query/calendar.d.ts +16 -0
  106. package/dist/sdk/query/calendar.js +3 -3
  107. package/dist/sdk/query/context.js +2 -2
  108. package/dist/sdk/query/get.js +1 -1
  109. package/dist/sdk/query/list.js +1 -1
  110. package/dist/sdk/query/search-contracts.js +1 -1
  111. package/dist/sdk/query/window-pagination.d.ts +20 -0
  112. package/dist/sdk/query/window-pagination.js +2 -0
  113. package/dist/sdk/read-output-contracts.js +1 -1
  114. package/dist/sdk/runtime.d.ts +1 -1
  115. package/dist/sdk/runtime.js +1 -1
  116. package/dist/sdk/schema-migration.js +2 -2
  117. package/dist/sdk/templates.d.ts +7 -1
  118. package/dist/sdk/templates.js +2 -2
  119. package/docs/COMMANDS.md +19 -1
  120. package/docs/EXTENSIONS.md +1 -1
  121. package/docs/MERGE_SAFETY.md +28 -0
  122. package/docs/SDK.md +85 -6
  123. package/docs/generated/FLAG_LEXICON_BUDGETS.md +2 -2
  124. package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +5 -3
  125. package/marketplace.json +1 -1
  126. package/package.json +1 -1
  127. package/packages/pm-beads/package.json +1 -1
  128. package/packages/pm-calendar/extensions/calendar/index.ts +6 -0
  129. package/packages/pm-calendar/package.json +1 -1
  130. package/packages/pm-command-kit/package.json +1 -1
  131. package/packages/pm-digital-twin/package.json +1 -1
  132. package/packages/pm-governance-audit/package.json +1 -1
  133. package/packages/pm-guide-shell/package.json +1 -1
  134. package/packages/pm-kanban/package.json +1 -1
  135. package/packages/pm-lifecycle-hooks/package.json +1 -1
  136. package/packages/pm-linked-test-adapters/package.json +1 -1
  137. package/packages/pm-search-advanced/package.json +1 -1
  138. package/packages/pm-templates/extensions/templates/runtime.ts +3 -1
  139. package/packages/pm-templates/package.json +1 -1
  140. package/packages/pm-todos/package.json +1 -1
  141. package/packages/pm-vcs/package.json +1 -1
  142. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  143. package/plugins/pm-claude/package.json +1 -1
  144. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  145. package/plugins/pm-codex/package.json +1 -1
  146. package/plugins/pm-codex/plugin.json +1 -1
  147. package/runtime-dependencies.json +1 -1
  148. package/dist/cli-bundle/chunks/chunk-VPMQEVU6.js +0 -20
  149. package/dist/cli-bundle/chunks/register-operations-BOCBWNKJ.js +0 -2
  150. package/dist/cli-bundle/chunks/stage-WRDTMCCF.js +0 -2
  151. package/dist/cli-bundle/focused-chunks/chunk-3QYTS4OY.js +0 -12
  152. package/dist/cli-bundle/focused-chunks/chunk-CEEOWDB7.js +0 -8
  153. package/dist/cli-bundle/focused-chunks/chunk-GXAXDPD4.js +0 -2
  154. package/dist/cli-bundle/focused-chunks/chunk-NFFPNMTH.js +0 -2
  155. package/dist/cli-bundle/focused-chunks/chunk-XTYEASIY.js +0 -2
  156. package/dist/cli-bundle/focused-chunks/stage-MQE4PFWT.js +0 -2
@@ -1,2 +1,2 @@
1
- import{Ec as A,Le as E,Me as k,Ne as I,Oe as M,Pe as P,Qc as S,Qe as w,Vf as U,We as O,Wf as x,Ye as F,Yf as B,_e as D,nc as b,pc as R,qc as g,uf as L}from"./chunk-HZNFNETE.js";import{M as v}from"./chunk-URZB3USE.js";import{A as f,C as p}from"./chunk-R7KWBFM2.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7a4ac40e-5794-5f50-81b5-8e30b87c02c0")}catch{}})();var J=Symbol("pm.mcp-mutation-transport"),T={create:{parameters:F,aliases:E,strings:k,repeatables:I},update:{parameters:D,aliases:M,strings:P,repeatables:w}},X=new Set(["activity","aggregate","context","contracts","deps","files-discover","files-lookup","get","graph","health","history","history-attest","list","next","search","stats","telemetry","validate"]);function y(e){return J in e}function h(e,t){return y(e)?b(t):R(e,t)}function ve(e,t,r=[]){let i=R(e,{...e,...t});for(let l of r)Reflect.deleteProperty(i,l);return i}function s(e,t){let r=e[t];return typeof r=="string"&&r.trim().length>0?r:void 0}function u(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 Re(e,t){let r=e[t];return typeof r=="string"?r:typeof r=="number"&&Number.isFinite(r)?String(r):void 0}function c(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Se(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 Ce(e,t){return typeof e.limit=="number"&&Number.isFinite(e.limit)?e.limit:typeof t.limit=="number"&&Number.isFinite(t.limit)?t.limit:s(e,"limit")??s(t,"limit")}function Ne(e){let t=s(e,"outputFormat");return{json:!0,quiet:!0,author:s(e,"author"),path:s(e,"path"),noExtensions:e.noExtensions===!0||e.no_extensions===!0,noPager:!0,outputInclude:s(e,"outputInclude"),outputLimit:u(e,"outputLimit"),outputBudget:u(e,"outputBudget"),outputSession:s(e,"outputSession"),outputCursor:s(e,"outputCursor"),outputFormat:t==="json"||t==="toon"?t:void 0}}var j=new Set(["tags","blockedBy","blocked_by","skills","fields"]),G=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"]),Q=new Set([...G].filter(e=>e!=="file")),Z=new Set(["files","files-discover","docs","test","test-all"]),Y=new Set(["comments","notes","learnings"]);function ee(e,t){if(!(!Y.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 te=new Set(["claim","release","start-task","pause-task","close-task"]),$={"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"],update:["parent","allowMissingParent","completedAt"],copy:["allowDuplicate"],close:["duplicateOf","completedAt","releaseAssignment"],claim:["start","next","ifAvailable"],release:["pause","handoff"],comments:["ifAbsent"],notes:["ifAbsent"],learnings:["ifAbsent"],extension:["dryRun","offline"],package:["dryRun","offline"],install:["dryRun"],upgrade:["scope","dryRun","cliOnly","packagesOnly","repair","tag","packageName"],append:["body"]},K=["outputInclude","outputLimit","outputBudget","outputFormat","outputSession","outputCursor"];function V(e,t=""){let r={},i=Z.has(t),l=t==="files"||t==="files-discover"||t==="docs",a=Y.has(t)?Q:G;for(let[n,o]of Object.entries(e)){if(Array.isArray(o)&&j.has(n)){r[n]=o.join(",");continue}if(n==="note"&&l){r[n]=o;continue}if(typeof o=="string"&&a.has(n)){r[n]=[o];continue}if(typeof o=="string"&&i&&(n==="add"||n==="remove")){r[n]=[o];continue}r[n]=o}return Object.assign(r,Object.fromEntries(Object.getOwnPropertySymbols(e).map(n=>[n,Reflect.get(e,n)]))),r}function re(e,t,r){let i=s(e,"author");return i!==void 0?i:r!==void 0&&te.has(r)?s(e,"assignee")??s(t,"assignee"):void 0}function ne(e,t){return t!==void 0&&e.author===void 0?{...e,author:t}:e}function ie(e,t,r){let i={},l=T[e],a=new Set([...l.parameters.map(({param:n})=>n),...O.map(({param:n})=>n),...$[e],...K,"force"]);for(let n of a){let o=l.aliases.find(d=>d.keys.includes(n))?.keys??[n];t[n]===void 0||o.some(d=>r[d]!==void 0)||(i[n]=t[n])}return i}function m(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 oe(e,t,r){let i=T[e],l=[...i.parameters,...O,{param:"force"}];for(let{param:a}of l){if(v(L[a]).type!=="boolean")continue;let n=(i.aliases.find(o=>o.keys.includes(a))?.keys??[a]).find(o=>r[o]!==void 0&&typeof r[o]!="boolean");n!==void 0&&m(e,n)}for(let a of["idOnly","fullChangedFields"])t[a]!==void 0&&typeof t[a]!="boolean"&&m(e,a)}function ae(e,t,r){t.options!==void 0&&!c(t.options)&&m(e,"options"),oe(e,t,r);for(let n of j){let o=r[n];Array.isArray(o)&&o.some(d=>typeof d!="string")&&m(e,n)}let i=H(r,e),l=T[e];for(let{keys:n,target:o}of l.strings)n.some(d=>r[d]!==void 0)&&i[o]===void 0&&m(e,o);let a=l.repeatables.flatMap(({keys:n})=>n).find(n=>{let o=r[n];return o!==void 0&&typeof o!="string"&&(!Array.isArray(o)||o.some(d=>typeof d!="string"))});return a!==void 0&&m(e,a),i}function se(e,t,r,i){let l=(t==="create"||t==="update")&&y(e),a={...l?ie(t,e,i):r,...i};return l?ae(t,e,a):V(a,t)}function be(e,t){let r=c(e.options)?e.options:void 0,i=v(e.options),l={},a=d=>{i[d]!==void 0||e[d]===void 0||(l[d]=e[d])};for(let d of $[t??""]??[])a(d);for(let d of K)a(d);t!==void 0&&y(e)&&ee(t,i);let n=se(e,t,l,i);if(t==="history-attest"&&y(e)&&(n.output!==void 0||typeof n.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 o=y(e)?e:r??e;return h(o,ne(n,re(e,n,t)))}function ge(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 Ee(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 le(e){let t=[],r=!0;for(let i of e.trim().toLowerCase()){if(i>="a"&&i<="z"||i>="0"&&i<="9"){t.push(i),r=!1;continue}r||(t.push("-"),r=!0)}return t.at(-1)==="-"&&t.pop(),t.join("")}function ke(e){return!X.has(le(e))}function Ie(e){return e.trim().toLowerCase().split(/\s+/).filter(Boolean).join(" ")}function ue(e){return Array.isArray(e)?e.map(t=>String(t)).filter(t=>t.length>0):[]}function Me(e,t){let r=new Set(["action","args","author","cwd","fullChangedFields","id","options","path","query","reason","target"]),i={};for(let[a,n]of Object.entries(e))r.has(a)||(i[a]=n);let l={...i,...t};return delete l.args,delete l.author,l}function Pe(e,t){let r=h(t??{},{...t});return{changedFields:e.fullChangedFields===!0?"full":"compact",idOnly:e.idOnly===!0,runnerOptions:r}}function N(e){return{type:u(e,"filterType"),tag:u(e,"filterTag"),priority:u(e,"filterPriority"),deadlineBefore:u(e,"filterDeadlineBefore"),deadlineAfter:u(e,"filterDeadlineAfter"),updatedAfter:u(e,"filterUpdatedAfter"),updatedBefore:u(e,"filterUpdatedBefore"),createdAfter:u(e,"filterCreatedAfter"),createdBefore:u(e,"filterCreatedBefore"),ids:S(e.ids),assignee:u(e,"filterAssignee"),assigneeFilter:u(e,"filterAssigneeFilter")??u(e,"filterAssignee_filter"),parent:u(e,"filterParent"),sprint:u(e,"filterSprint"),release:u(e,"filterRelease"),limit:u(e,"limit"),offset:u(e,"offset")}}function C(e){if(typeof e=="string"&&e.trim().length>0)return e;if(Array.isArray(e))return ue(e)}function _(e){if(typeof e=="number"&&Number.isFinite(e)||typeof e=="string"&&e.trim().length>0)return e}function we(e){let t=C(e.kind),r=C(e.exemptIsolate),i=C(e.exemptIsolateType);return{...t===void 0?{}:{kind:t},maxDepth:_(e.maxDepth),limit:_(e.limit),after:s(e,"after"),direction:s(e,"direction"),maxPaths:_(e.maxPaths),sample:_(e.sample),...r===void 0?{}:{exemptIsolate:r},...i===void 0?{}:{exemptIsolateType:i},saveBaseline:e.saveBaseline===!0,rebuild:e.rebuild===!0,clear:e.clear===!0,summary:e.summary===!0,...e.full===!0?{full:!0}:{}}}function q(e){let t=B(e);return e.ids!==void 0&&(t.ids=S(e.ids)),t}function Fe(e){return{status:s(e,"filterStatus"),list:c(e.list)?q(e.list):N(e),reason:s(e,"reason"),resolution:s(e,"resolution"),expectedResult:s(e,"expectedResult")??s(e,"expected_result")??s(e,"expected"),actualResult:s(e,"actualResult")??s(e,"actual_result")??s(e,"actual"),validateClose:s(e,"validateClose")??s(e,"validate_close"),author:s(e,"author"),message:s(e,"message"),force:e.force===!0?!0:void 0,dryRun:e.dryRun===!0||e.dry_run===!0?!0:void 0,rollback:A(e.rollback),checkpoint:e.checkpoint===!1||e.noCheckpoint===!0||e.no_checkpoint===!0?!1:void 0}}var de=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 z(e){let t={};for(let[r,i]of Object.entries(e))de.has(r)||(t[r]=i);return W(t)}function W(e){return H(e,"update")}function H(e,t){let r=V(e,t),i=T[t],l=new Set([...i.parameters,...O].filter(({booleanish:a})=>a===!0).map(({param:a})=>a));for(let{keys:a}of i.repeatables)for(let n of a)typeof r[n]=="string"&&(r[n]=[r[n]]);for(let a of i.strings)for(let n of a.keys){let o=r[n];(typeof o=="number"&&Number.isFinite(o)||o===!1&&l.has(n))&&(r[n]=String(o))}return t==="create"?{...U(r,{requireType:!1})}:x(r)}function De(e){if(c(e.list)||c(e.update)){let t=c(e.update)?e.update:z(e),r=h(e,W(t));return{status:u(e,"filterStatus"),list:c(e.list)?q(e.list):N(e),update:g(t,r),dryRun:e.dryRun===!0||e.dry_run===!0?!0:void 0,rollback:A(e.rollback),checkpoint:e.checkpoint===!1||e.noCheckpoint===!0||e.no_checkpoint===!0?!1:void 0}}return{status:u(e,"filterStatus"),list:N(e),update:h(e,z(e)),dryRun:e.dryRun===!0||e.dry_run===!0?!0:void 0,rollback:A(e.rollback),checkpoint:e.checkpoint===!1||e.noCheckpoint===!0||e.no_checkpoint===!0?!1:void 0}}export{y as a,ve as b,s as c,u as d,Re as e,c as f,Se as g,Ce as h,Ne as i,$ as j,V as k,be as l,ge as m,Ee as n,le as o,ke as p,Ie as q,ue as r,Me as s,Pe as t,N as u,we as v,Fe as w,W as x,De as y};
2
- //# sourceMappingURL=chunk-UY5UHI4I.js.map
1
+ import{Ec as A,Le as E,Me as k,Ne as I,Oe as M,Pe as P,Qc as S,Qe as w,Vf as U,We as O,Wf as x,Ye as F,Yf as B,_e as D,nc as b,pc as R,qc as g,uf as L}from"./chunk-5ZPT67NJ.js";import{M as v}from"./chunk-RQKDANP7.js";import{A as f,C as p}from"./chunk-3CYXE6BV.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7a4ac40e-5794-5f50-81b5-8e30b87c02c0")}catch{}})();var J=Symbol("pm.mcp-mutation-transport"),T={create:{parameters:F,aliases:E,strings:k,repeatables:I},update:{parameters:D,aliases:M,strings:P,repeatables:w}},X=new Set(["activity","aggregate","context","contracts","deps","files-discover","files-lookup","get","graph","health","history","history-attest","list","next","search","stats","telemetry","validate"]);function y(e){return J in e}function h(e,t){return y(e)?b(t):R(e,t)}function ve(e,t,r=[]){let i=R(e,{...e,...t});for(let l of r)Reflect.deleteProperty(i,l);return i}function s(e,t){let r=e[t];return typeof r=="string"&&r.trim().length>0?r:void 0}function u(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 Re(e,t){let r=e[t];return typeof r=="string"?r:typeof r=="number"&&Number.isFinite(r)?String(r):void 0}function c(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Se(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 Ce(e,t){return typeof e.limit=="number"&&Number.isFinite(e.limit)?e.limit:typeof t.limit=="number"&&Number.isFinite(t.limit)?t.limit:s(e,"limit")??s(t,"limit")}function Ne(e){let t=s(e,"outputFormat");return{json:!0,quiet:!0,author:s(e,"author"),path:s(e,"path"),noExtensions:e.noExtensions===!0||e.no_extensions===!0,noPager:!0,outputInclude:s(e,"outputInclude"),outputLimit:u(e,"outputLimit"),outputBudget:u(e,"outputBudget"),outputSession:s(e,"outputSession"),outputCursor:s(e,"outputCursor"),outputFormat:t==="json"||t==="toon"?t:void 0}}var j=new Set(["tags","blockedBy","blocked_by","skills","fields"]),G=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"]),Q=new Set([...G].filter(e=>e!=="file")),Z=new Set(["files","files-discover","docs","test","test-all"]),Y=new Set(["comments","notes","learnings"]);function ee(e,t){if(!(!Y.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 te=new Set(["claim","release","start-task","pause-task","close-task"]),$={"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"],update:["parent","allowMissingParent","completedAt"],copy:["allowDuplicate"],close:["duplicateOf","completedAt","releaseAssignment"],claim:["start","next","ifAvailable"],release:["pause","handoff"],comments:["ifAbsent"],notes:["ifAbsent"],learnings:["ifAbsent"],extension:["dryRun","offline"],package:["dryRun","offline"],install:["dryRun"],upgrade:["scope","dryRun","cliOnly","packagesOnly","repair","tag","packageName"],append:["body"]},K=["outputInclude","outputLimit","outputBudget","outputFormat","outputSession","outputCursor"];function V(e,t=""){let r={},i=Z.has(t),l=t==="files"||t==="files-discover"||t==="docs",a=Y.has(t)?Q:G;for(let[n,o]of Object.entries(e)){if(Array.isArray(o)&&j.has(n)){r[n]=o.join(",");continue}if(n==="note"&&l){r[n]=o;continue}if(typeof o=="string"&&a.has(n)){r[n]=[o];continue}if(typeof o=="string"&&i&&(n==="add"||n==="remove")){r[n]=[o];continue}r[n]=o}return Object.assign(r,Object.fromEntries(Object.getOwnPropertySymbols(e).map(n=>[n,Reflect.get(e,n)]))),r}function re(e,t,r){let i=s(e,"author");return i!==void 0?i:r!==void 0&&te.has(r)?s(e,"assignee")??s(t,"assignee"):void 0}function ne(e,t){return t!==void 0&&e.author===void 0?{...e,author:t}:e}function ie(e,t,r){let i={},l=T[e],a=new Set([...l.parameters.map(({param:n})=>n),...O.map(({param:n})=>n),...$[e],...K,"force"]);for(let n of a){let o=l.aliases.find(d=>d.keys.includes(n))?.keys??[n];t[n]===void 0||o.some(d=>r[d]!==void 0)||(i[n]=t[n])}return i}function m(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 oe(e,t,r){let i=T[e],l=[...i.parameters,...O,{param:"force"}];for(let{param:a}of l){if(v(L[a]).type!=="boolean")continue;let n=(i.aliases.find(o=>o.keys.includes(a))?.keys??[a]).find(o=>r[o]!==void 0&&typeof r[o]!="boolean");n!==void 0&&m(e,n)}for(let a of["idOnly","fullChangedFields"])t[a]!==void 0&&typeof t[a]!="boolean"&&m(e,a)}function ae(e,t,r){t.options!==void 0&&!c(t.options)&&m(e,"options"),oe(e,t,r);for(let n of j){let o=r[n];Array.isArray(o)&&o.some(d=>typeof d!="string")&&m(e,n)}let i=H(r,e),l=T[e];for(let{keys:n,target:o}of l.strings)n.some(d=>r[d]!==void 0)&&i[o]===void 0&&m(e,o);let a=l.repeatables.flatMap(({keys:n})=>n).find(n=>{let o=r[n];return o!==void 0&&typeof o!="string"&&(!Array.isArray(o)||o.some(d=>typeof d!="string"))});return a!==void 0&&m(e,a),i}function se(e,t,r,i){let l=(t==="create"||t==="update")&&y(e),a={...l?ie(t,e,i):r,...i};return l?ae(t,e,a):V(a,t)}function be(e,t){let r=c(e.options)?e.options:void 0,i=v(e.options),l={},a=d=>{i[d]!==void 0||e[d]===void 0||(l[d]=e[d])};for(let d of $[t??""]??[])a(d);for(let d of K)a(d);t!==void 0&&y(e)&&ee(t,i);let n=se(e,t,l,i);if(t==="history-attest"&&y(e)&&(n.output!==void 0||typeof n.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 o=y(e)?e:r??e;return h(o,ne(n,re(e,n,t)))}function ge(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 Ee(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 le(e){let t=[],r=!0;for(let i of e.trim().toLowerCase()){if(i>="a"&&i<="z"||i>="0"&&i<="9"){t.push(i),r=!1;continue}r||(t.push("-"),r=!0)}return t.at(-1)==="-"&&t.pop(),t.join("")}function ke(e){return!X.has(le(e))}function Ie(e){return e.trim().toLowerCase().split(/\s+/).filter(Boolean).join(" ")}function ue(e){return Array.isArray(e)?e.map(t=>String(t)).filter(t=>t.length>0):[]}function Me(e,t){let r=new Set(["action","args","author","cwd","fullChangedFields","id","options","path","query","reason","target"]),i={};for(let[a,n]of Object.entries(e))r.has(a)||(i[a]=n);let l={...i,...t};return delete l.args,delete l.author,l}function Pe(e,t){let r=h(t??{},{...t});return{changedFields:e.fullChangedFields===!0?"full":"compact",idOnly:e.idOnly===!0,runnerOptions:r}}function N(e){return{type:u(e,"filterType"),tag:u(e,"filterTag"),priority:u(e,"filterPriority"),deadlineBefore:u(e,"filterDeadlineBefore"),deadlineAfter:u(e,"filterDeadlineAfter"),updatedAfter:u(e,"filterUpdatedAfter"),updatedBefore:u(e,"filterUpdatedBefore"),createdAfter:u(e,"filterCreatedAfter"),createdBefore:u(e,"filterCreatedBefore"),ids:S(e.ids),assignee:u(e,"filterAssignee"),assigneeFilter:u(e,"filterAssigneeFilter")??u(e,"filterAssignee_filter"),parent:u(e,"filterParent"),sprint:u(e,"filterSprint"),release:u(e,"filterRelease"),limit:u(e,"limit"),offset:u(e,"offset")}}function C(e){if(typeof e=="string"&&e.trim().length>0)return e;if(Array.isArray(e))return ue(e)}function _(e){if(typeof e=="number"&&Number.isFinite(e)||typeof e=="string"&&e.trim().length>0)return e}function we(e){let t=C(e.kind),r=C(e.exemptIsolate),i=C(e.exemptIsolateType);return{...t===void 0?{}:{kind:t},maxDepth:_(e.maxDepth),limit:_(e.limit),after:s(e,"after"),direction:s(e,"direction"),maxPaths:_(e.maxPaths),sample:_(e.sample),...r===void 0?{}:{exemptIsolate:r},...i===void 0?{}:{exemptIsolateType:i},saveBaseline:e.saveBaseline===!0,rebuild:e.rebuild===!0,clear:e.clear===!0,summary:e.summary===!0,...e.full===!0?{full:!0}:{}}}function q(e){let t=B(e);return e.ids!==void 0&&(t.ids=S(e.ids)),t}function Fe(e){return{status:s(e,"filterStatus"),list:c(e.list)?q(e.list):N(e),reason:s(e,"reason"),resolution:s(e,"resolution"),expectedResult:s(e,"expectedResult")??s(e,"expected_result")??s(e,"expected"),actualResult:s(e,"actualResult")??s(e,"actual_result")??s(e,"actual"),validateClose:s(e,"validateClose")??s(e,"validate_close"),author:s(e,"author"),message:s(e,"message"),force:e.force===!0?!0:void 0,dryRun:e.dryRun===!0||e.dry_run===!0?!0:void 0,rollback:A(e.rollback),checkpoint:e.checkpoint===!1||e.noCheckpoint===!0||e.no_checkpoint===!0?!1:void 0}}var de=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 z(e){let t={};for(let[r,i]of Object.entries(e))de.has(r)||(t[r]=i);return W(t)}function W(e){return H(e,"update")}function H(e,t){let r=V(e,t),i=T[t],l=new Set([...i.parameters,...O].filter(({booleanish:a})=>a===!0).map(({param:a})=>a));for(let{keys:a}of i.repeatables)for(let n of a)typeof r[n]=="string"&&(r[n]=[r[n]]);for(let a of i.strings)for(let n of a.keys){let o=r[n];(typeof o=="number"&&Number.isFinite(o)||o===!1&&l.has(n))&&(r[n]=String(o))}return t==="create"?{...U(r,{requireType:!1})}:x(r)}function De(e){if(c(e.list)||c(e.update)){let t=c(e.update)?e.update:z(e),r=h(e,W(t));return{status:u(e,"filterStatus"),list:c(e.list)?q(e.list):N(e),update:g(t,r),dryRun:e.dryRun===!0||e.dry_run===!0?!0:void 0,rollback:A(e.rollback),checkpoint:e.checkpoint===!1||e.noCheckpoint===!0||e.no_checkpoint===!0?!1:void 0}}return{status:u(e,"filterStatus"),list:N(e),update:h(e,z(e)),dryRun:e.dryRun===!0||e.dry_run===!0?!0:void 0,rollback:A(e.rollback),checkpoint:e.checkpoint===!1||e.noCheckpoint===!0||e.no_checkpoint===!0?!1:void 0}}export{y as a,ve as b,s as c,u as d,Re as e,c as f,Se as g,Ce as h,Ne as i,$ as j,V as k,be as l,ge as m,Ee as n,le as o,ke as p,Ie as q,ue as r,Me as s,Pe as t,N as u,we as v,Fe as w,W as x,De as y};
2
+ //# sourceMappingURL=chunk-RLXK2S7P.js.map