@unbrained/pm-cli 2026.11.29 → 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.
- package/.claude-plugin/marketplace.json +1 -1
- package/dist/cli-bundle/bundle-manifest.json +1 -1
- package/dist/cli-bundle/chunks/{chunk-Q6GIFUCW.js → chunk-2SBTXR6C.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-PY6A7ULK.js → chunk-3TXEWHQX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-K3MVVDLN.js → chunk-47ZS6RPL.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WLZ5KVM2.js → chunk-5PNOVDVO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3TK2YOVB.js → chunk-AOTI76Q6.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CV2B4JUB.js → chunk-CCKM5YQM.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JQHLOSSS.js → chunk-DCWGM7CY.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-LQEB6GSY.js → chunk-FECZV72T.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-FRYNDVLN.js → chunk-FR7ULTM4.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NLHNB2L3.js → chunk-HXQ3OHQR.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JFPCL45G.js → chunk-IGEFPHV7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NRCGGNOE.js → chunk-JPJNJHQW.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-R6M5OGJH.js → chunk-KCVSSONY.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3E53F7QY.js → chunk-KXTKLDKD.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DBASKWBO.js → chunk-NHBG5ET3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CNZOC6JD.js → chunk-NVYDPNQP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3US5T6B2.js → chunk-NZSXWIX7.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-VI3A7UZ2.js → chunk-Q4VZSMUL.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RWHS77ME.js → chunk-SJWIPGZW.js} +39 -39
- package/dist/cli-bundle/chunks/{chunk-EYEQC3L2.js → chunk-TX74QJ4W.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WNB62BGK.js → chunk-TY55UX6M.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4EBHZBM2.js → chunk-USBTXMKS.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-VCXQ6A35.js +3 -0
- package/dist/cli-bundle/chunks/{chunk-L7HON3BE.js → chunk-WFYE34TO.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-YPMNXG2C.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-ZK4CY24V.js → chunk-YVTALIN3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ZSBPE36C.js → chunk-Z7YL2SUM.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KCR4NF2A.js → chunk-ZA5NS3PL.js} +2 -2
- package/dist/cli-bundle/chunks/{field-option-collisions-OZE43TOH.js → field-option-collisions-2F2Z7R7B.js} +2 -2
- package/dist/cli-bundle/chunks/{item-revision-3WXNNFLP.js → item-revision-UAF6L47R.js} +2 -2
- package/dist/cli-bundle/chunks/item-transaction-RJECL53Y.js +2 -0
- package/dist/cli-bundle/chunks/{linked-resource-value-list-2655COY2.js → linked-resource-value-list-WXPPYUVQ.js} +2 -2
- package/dist/cli-bundle/chunks/{mutation-actor-QOKPDYM4.js → mutation-actor-UK3QNEEB.js} +2 -2
- package/dist/cli-bundle/chunks/{mutation-admission-JNJHB3E6.js → mutation-admission-UTDYPFWP.js} +2 -2
- package/dist/cli-bundle/chunks/{register-list-query-YGVUE4YZ.js → register-list-query-DRA3CWHI.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-3JVZQDHH.js → register-mutation-WO74VLEQ.js} +2 -2
- package/dist/cli-bundle/chunks/{register-operations-LCHUHKRA.js → register-operations-CRBKH7WN.js} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-IJ7M3VUK.js → register-setup-6V6NQB5C.js} +2 -2
- package/dist/cli-bundle/chunks/{stage-7BD7U2BX.js → stage-DYEHGASU.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-WJAUHPXD.js → chunk-2UUBS4BG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-KLOHZNJ4.js → chunk-4ER3VMST.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-BZ3PUUPG.js → chunk-4YBMHMBJ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-ACTBMSCH.js → chunk-62AMZMR4.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-LSVRZ4KQ.js → chunk-7G7JIXLL.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-BPOU2S44.js → chunk-A3DORTXS.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-NNLENKU7.js → chunk-FM5WQ6ZU.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-BPBKHY6H.js → chunk-HXM7K6VH.js} +35 -35
- package/dist/cli-bundle/focused-chunks/{chunk-EUDAUT6T.js → chunk-IIVDBAJM.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-LKTRICZR.js → chunk-IJ3T3W4U.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-S5VG7RFY.js → chunk-L357ZAES.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-PPCBCPIZ.js → chunk-LWBZ7UGG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-TSZVCALS.js → chunk-M57KDG7I.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-2CQFGJQ6.js → chunk-MZNV26XE.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-NGHT2LNG.js +3 -0
- package/dist/cli-bundle/focused-chunks/{chunk-GTUPHXKR.js → chunk-NJTKGBSK.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-5NSWNLFE.js → chunk-P55AZPFN.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-NO5MUY4I.js → chunk-RQYVX2T6.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-KWKPX36T.js → chunk-SXC3NVZI.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-QTV6UE2Q.js → chunk-TQQO42C2.js} +5 -5
- package/dist/cli-bundle/focused-chunks/{chunk-S4AC7OMI.js → chunk-U35K7FSE.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-42SU4LK3.js → chunk-UQJ4PY2Y.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-NZA2LP4Y.js → chunk-WAP3DF4B.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-MYWUMVCZ.js → chunk-XR745UGE.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{field-option-collisions-HABQYZMQ.js → field-option-collisions-7TG7STO7.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{item-revision-YH5R7YPW.js → item-revision-J7EUGCHR.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{item-transaction-YZ2PUPGM.js → item-transaction-2IC2MLML.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{mutation-actor-DJ2VRLKG.js → mutation-actor-LJVF2HVD.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{mutation-admission-3SECKVKY.js → mutation-admission-SLFAUONA.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{stage-FEJT2UCG.js → stage-MWR73LTZ.js} +2 -2
- package/dist/cli-bundle/main.js +3 -3
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +1 -1
- package/dist/cli-bundle/sdk-core.js +1 -1
- package/dist/cli-bundle/sdk-governance.js +1 -1
- package/dist/cli-bundle/sdk-graph.js +1 -1
- package/dist/cli-bundle/sdk-merge.js +61 -61
- package/dist/cli-bundle/sdk-query.js +1 -1
- package/dist/cli-bundle/sdk-runtime.js +1 -1
- package/dist/cli-bundle/sdk-testing.js +1 -1
- package/dist/cli-bundle/sdk.js +1 -1
- package/dist/core/shared/url-credentials.d.ts +4 -2
- package/dist/core/shared/url-credentials.js +1 -1
- package/dist/sdk/context-intent-contracts.js +1 -1
- package/docs/CONFIGURATION.md +22 -3
- package/docs/READ_OUTPUT_CONTRACTS.md +5 -0
- package/docs/SDK.md +19 -3
- package/marketplace.json +1 -1
- package/package.json +1 -1
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-claude/package.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/pm-codex/package.json +1 -1
- package/plugins/pm-codex/plugin.json +1 -1
- package/runtime-dependencies.json +1 -1
- package/dist/cli-bundle/chunks/chunk-JV7LREUF.js +0 -3
- package/dist/cli-bundle/chunks/chunk-SV27NNXQ.js +0 -2
- package/dist/cli-bundle/chunks/item-transaction-DJ5GAITL.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-TX24L7RQ.js +0 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Aa as re,Y as T,ba as R,j as x,k as J,l as Z,m as C,n as Q,o as ee,u as O,w as k,xa as te,y as v,ya as ne}from"./chunk-R6M5OGJH.js";import{L as I,Z as D,b as S,c as L,pa as X,s as H,t as q,v as A,w as W}from"./chunk-PY6A7ULK.js";import{ea as _}from"./chunk-RWHS77ME.js";import{A as f,C as d}from"./chunk-K672XXGQ.js";var he=new Set(["none","null"]);function pt(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 g(e){return e===void 0?!1:he.has(e.trim().toLowerCase())}function mt(e,t,n){if(!g(e))return;let r=n?` ${n}`:"";throw new d(`${t} no longer accepts "none" or "null".${r}`.trim(),f.USAGE)}function yt(e,t,n){if(!e||e.length===0||L(e)||!e.some(o=>g(o)))return;let i=n?` ${n}`:"";throw new d(`${t} no longer accepts "none" or "null".${i}`.trim(),f.USAGE)}function _t(e,t){for(let n of t){let r=e[n.optionKey];if(!Array.isArray(r)||r.length===0)continue;if(!r.every(s=>typeof s=="string"))throw new d(`${n.valueFlag} entries must be strings.`,f.USAGE);if(L(r))continue;let i=r;if(!i.some(s=>g(s)))continue;if(i.filter(s=>!g(s)).length>0)throw new d(`Cannot mix legacy clear token "none"/"null" with concrete ${n.valueFlag} entries. Use ${n.clearFlag} to clear or provide explicit entries.`,f.USAGE);e[n.optionKey]=void 0,e[n.clearFlagKey]=!0,n.disableFlagKey&&(e[n.disableFlagKey]=!1)}return e}var Ee=["close_reason","close-reason"],ae=[{canonical:"tags",aliases:["tags"],optionKey:"tags",metadataKey:"tags"}],oe=[{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"}],Ne=[...ae,...oe],ie=[{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"}],$=[...Ne,{canonical:"author",aliases:["author"],optionKey:"author",metadataKey:"author"},...ie],Se=[...ae,{canonical:"close-reason",aliases:Ee,optionKey:"closeReason",metadataKey:"close_reason"},...oe,...ie],Ce=new Set(["none","null","-"]);function se(e){return e==="create"?$:Se}function F(e,t){let n=t.unset;if(n!==void 0&&typeof n!="string"&&!Array.isArray(n))return;let r=[];for(let i of se(e))i.optionKey==="author"||!Object.hasOwn(t,i.optionKey)||t[i.optionKey]!==null||(Reflect.deleteProperty(t,i.optionKey),r.push(i.canonical));r.length!==0&&(t.unset=[...n===void 0?[]:typeof n=="string"?[n]:n,...r])}function U(e){return typeof e=="string"&&Ce.has(e.trim().toLowerCase())}function gt(e,t,n,r){return n?se(e).flatMap(i=>{let o=t[i.optionKey],a=r[i.metadataKey];return U(o)&&(U(a)||Array.isArray(a)&&a.some(U))?[`literal_sentinel_stored:${i.canonical}:${o.trim()}`]:[]}):[]}function Re(e,t){return e.flatMap(n=>n.includes(",")&&t(n)?[n]:n.split(","))}function Ke(e){let t=new Set,n=new Set;if(!e.raw||e.raw.length===0)return{metadataKeys:t,optionKeys:n};let r=Re(e.raw,i=>e.resolveDefinition(i.trim().toLowerCase())!==void 0);for(let i of r){let o=i.trim().toLowerCase();if(!o)throw new d("--unset values must not be empty; name each field once, for example --unset parent,release",f.USAGE);if(g(o))throw new d('--unset no longer accepts "none" or "null". Specify concrete field names such as --unset deadline',f.USAGE);let a=e.resolveDefinition(o);if(!a)throw new d(`Unsupported --unset field "${i}". Supported fields: ${e.supportedFields}`,f.USAGE);t.add(a.metadataKey),n.add(a.optionKey)}return{metadataKeys:t,optionKeys:n}}function be(e,t,n){let r=e.trim().toLowerCase();if(!n)return;let i=n.command_to_fields?.get(t)??[];for(let o of i){if(o.allow_unset===!1)continue;let a=new Set;if(typeof o.key=="string"&&o.key.length>0&&a.add(o.key.toLowerCase()),typeof o.metadata_key=="string"&&o.metadata_key.length>0&&a.add(o.metadata_key.toLowerCase()),typeof o.cli_flag=="string"&&o.cli_flag.length>0&&(a.add(o.cli_flag.replaceAll("-","_").toLowerCase()),a.add(o.cli_flag.toLowerCase())),Array.isArray(o.cli_aliases))for(let s of o.cli_aliases)typeof s!="string"||s.length===0||(a.add(s.replaceAll("-","_").toLowerCase()),a.add(s.toLowerCase()));if(a.has(r))return{optionKey:o.key,metadataKey:o.metadata_key}}}var Ie=(()=>{let e=new Map;for(let t of $)for(let n of t.aliases)e.set(n,{optionKey:t.optionKey,metadataKey:t.metadataKey});return e})(),xe=$.map(e=>e.canonical).sort((e,t)=>e.localeCompare(t)).join(", ");function ht(e,t){return Ke({raw:e,supportedFields:xe,resolveDefinition:n=>Ie.get(n)??be(n,"create",t)})}var ke={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 h(e,t,n){let r=`${e} ${t} must be ${n}.`;throw new d(r,f.USAGE,{code:"invalid_argument_value",reason:"invalid_mutation_option_value",field:t,changed:!1,required:r,examples:[ke[e]]})}function K(e,t,n){typeof e!="string"&&h(t,n,"a string")}function B(e,t){(e===null||typeof e!="object"||Array.isArray(e))&&h(t,"options","an object")}function le(e,t){(e==="append"||e==="update")&&t.id!==void 0&&K(t.id,e,"id"),e==="item-reopen"&&(t.id!==void 0&&K(t.id,"reopen","id"),t.reason!==void 0&&K(t.reason,"reopen","reason"),t.options!==void 0&&ve(t.options))}function Ft(e){B(e,"append");for(let t of["body","author","message"])e[t]!==void 0&&K(e[t],"append",t);e.force!==void 0&&typeof e.force!="boolean"&&h("append","force","a boolean")}function ve(e){B(e,"reopen");for(let t of R["item-reopen"].optional){let n=e[t];n!==void 0&&(_(Reflect.get(T,t)).type==="boolean"?typeof n!="boolean"&&h("reopen",t,"a boolean"):K(n,"reopen",t))}}function Fe(e,t){return e?t?"a string or string array":"a string array":"a string"}function Me(e,t,n,r,i,o){n===void 0||typeof n=="string"&&(!i||o)||r==="priority"&&typeof n=="number"&&Number.isFinite(n)||i&&Array.isArray(n)&&Array.from(n).every(a=>typeof a=="string")||h(e,t,Fe(i,o))}function we(e,t,n){let r=e==="create"?k:v;for(let{param:i}of[...r,...O,{param:"force"}]){if(_(Reflect.get(T,i)).type!=="boolean")continue;let o=n.find(a=>a.keys.includes(i))?.keys??[i];for(let a of o)t[a]!==void 0&&typeof t[a]!="boolean"&&h(e,a,"a boolean")}}function j(e,t,n=!0,r=!1){let i=e==="create"?x:C;for(let{target:o,keys:a,repeatable:s}of i)if(_(Reflect.get(T,o)).type!=="boolean")for(let c of a){let y=r&&c!==o,m=s===!0&&(o!=="acceptanceCriteria"||y);Me(e,c,t[c],o,m,n||y)}we(e,t,i)}function Mt(e,t){B(t,e);let n=H(t),r=S(n);return r||F(e,n),j(e,n,!1,r),n}var Pe=Symbol("pm.mcp-mutation-transport"),Le=new Set(["create","update","append"]),P={create:{parameters:k,aliases:x,strings:J,repeatables:Z},update:{parameters:v,aliases:C,strings:Q,repeatables:ee}},De=new Set(["activity","aggregate","context","contracts","deps","files-discover","files-lookup","get","graph","health","history","history-attest","list","next","search","stats","telemetry","validate"]);function b(e){return Pe in e}function w(e,t){return b(e)?q(t):A(e,t)}function Jt(e,t,n=[]){let r=A(e,{...e,...t});for(let i of n)Reflect.deleteProperty(r,i);return r}function l(e,t){let n=e[t];return typeof n=="string"&&n.trim().length>0?n:void 0}function u(e,t){let n=e[t];return typeof n=="string"?n.trim().length>0?n:void 0:typeof n=="number"&&Number.isFinite(n)?String(n):void 0}function Zt(e,t){let n=e[t];return typeof n=="string"?n:typeof n=="number"&&Number.isFinite(n)?String(n):void 0}function p(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Qt(e,t){if(typeof e=="number"){if(!Number.isInteger(e))throw new d(`${t} must be a finite integer.`,f.USAGE);return e}if(typeof e=="string"&&e.trim().length>0){let n=Number(e);if(!Number.isInteger(n))throw new d(`${t} must be a finite integer.`,f.USAGE);return n}}function en(e,t){return typeof e.limit=="number"&&Number.isFinite(e.limit)?e.limit:typeof t.limit=="number"&&Number.isFinite(t.limit)?t.limit:l(e,"limit")??l(t,"limit")}function tn(e){let t=l(e,"outputFormat");return{json:!0,quiet:!0,author:l(e,"author"),path:l(e,"path"),noExtensions:e.noExtensions===!0||e.no_extensions===!0,noPager:!0,outputInclude:l(e,"outputInclude"),outputLimit:u(e,"outputLimit"),outputBudget:u(e,"outputBudget"),outputSession:l(e,"outputSession"),outputCursor:l(e,"outputCursor"),outputFormat:t==="json"||t==="toon"?t:void 0}}var pe=new Set(["tags","blockedBy","blocked_by","skills","fields"]),me=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"]),Ue=new Set([...me].filter(e=>e!=="file")),$e=new Set(["files","files-discover","docs","test","test-all"]),z=new Set(["comments","notes","learnings"]);function Be(e,t){if(!(!z.has(e)||!Object.prototype.hasOwnProperty.call(t,"file")))throw new d(`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 je=new Set(["claim","release","start-task","pause-task","close-task"]),ye={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"]},Ge=new Set(["context","get","list","next","search","comments","notes","learnings","files","docs","test"]),Ve=new Set(["query","keywords","id","text"]);function ze(e){return Ge.has(e)?R[e].optional.filter(t=>!Ve.has(t)):[]}var Ye=new Set(["claim","start-task","comments","notes","learnings","files","docs","test"]);function He(e,t){if(!Ye.has(e??""))return t;let n={...t};for(let r of R[e].optional){let i=r.replace(/[A-Z]/gu,o=>`_${o.toLowerCase()}`);i===r||n[i]===void 0||(n[r]??=n[i],delete n[i])}return n}function qe(e,t,n){if(!z.has(e??""))return n;let r=n,i=r.text??t.text;if(i===void 0)return r;if(r.add!==void 0&&r.add!==i){let a=e.replace(/s$/u,"");throw new d(`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 o={...r,add:i};return delete o.text,o}function We(e,t){let n=t.replace(/[A-Z]/gu,r=>`_${r.toLowerCase()}`);return e[t]!==void 0||e[n]!==void 0}function Xe(e){return[...ye[e]??[],...ze(e),..._e]}var _e=["outputInclude","outputLimit","outputBudget","outputFormat","outputSession","outputCursor"];function Ae(e,t=""){let n={},r=$e.has(t),i=t==="files"||t==="files-discover"||t==="docs",o=z.has(t)?Ue:me;for(let[a,s]of Object.entries(e)){if(Array.isArray(s)&&pe.has(a)){n[a]=s.join(",");continue}if(a==="note"&&i){n[a]=s;continue}if(typeof s=="string"&&o.has(a)){n[a]=[s];continue}if(typeof s=="string"&&r&&(a==="add"||a==="remove")){n[a]=[s];continue}n[a]=s}return Object.assign(n,Object.fromEntries(Object.getOwnPropertySymbols(e).map(a=>[a,Reflect.get(e,a)]))),n}function Je(e,t,n){let r=l(e,"author");return r!==void 0?r:n!==void 0&&je.has(n)?l(e,"assignee")??l(t,"assignee"):void 0}function Ze(e,t){return t!==void 0&&e.author===void 0?{...e,author:t}:e}function Qe(e,t,n){let r={},i=P[e],o=new Set([...i.parameters.map(({param:a})=>a),...O.map(({param:a})=>a),...ye[e],..._e,"force"]);for(let a of o){let s=i.aliases.find(c=>c.keys.includes(a))?.keys??[a];t[a]===void 0||s.some(c=>n[c]!==void 0)||(r[a]=t[a])}return r}function E(e,t){throw new d(`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 et(e,t,n){let r=P[e],i=[...r.parameters,...O,{param:"force"}];for(let{param:o}of i){if(_(T[o]).type!=="boolean")continue;let s=(r.aliases.find(c=>c.keys.includes(o))?.keys??[o]).find(c=>n[c]!==void 0&&typeof n[c]!="boolean");s!==void 0&&E(e,s)}for(let o of["idOnly","fullChangedFields"])t[o]!==void 0&&typeof t[o]!="boolean"&&E(e,o)}function tt(e,t,n){t.options!==void 0&&!p(t.options)&&E(e,"options"),et(e,t,n);for(let a of pe){let s=n[a];Array.isArray(s)&&s.some(c=>typeof c!="string")&&E(e,a)}let r=ge(n,e),i=P[e];for(let{keys:a,target:s}of i.strings)a.some(c=>n[c]!==void 0)&&r[s]===void 0&&E(e,s);let o=i.repeatables.flatMap(({keys:a})=>a).find(a=>{let s=n[a];return s!==void 0&&typeof s!="string"&&(!Array.isArray(s)||s.some(c=>typeof c!="string"))});return o!==void 0&&E(e,o),r}function nt(e,t,n,r,i){let o=(t==="create"||t==="update")&&b(e),a={...o?Qe(t,e,r):n,...r};if((t==="create"||t==="update")&&!o){let s=p(e.options)&&S(e.options);s||F(t,a),j(t,a,!0,s)}return o?tt(t,e,a):i?Ae(a,t):a}function rt(e,t){return!Le.has(e??"")||S(t)?t:X(t)}function nn(e,t,{nativeAction:n=!0}={}){le(t,e);let r=p(e.options)?e.options:void 0,i=_(e.options),o={},a=m=>{We(i,m)||e[m]===void 0||(o[m]=e[m])};for(let m of Xe(t??""))a(m);t!==void 0&&b(e)&&Be(t,i);let s=qe(t,e,He(t,nt(e,t,o,i,n)));if(t==="history-attest"&&b(e)&&(s.output!==void 0||typeof s.verify=="string"))throw new d("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 c=b(e)?e:r??e,y=w(c,Ze(s,Je(e,s,t)));return rt(t,y)}function rn(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 an(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 at(e){let t=[],n=!0;for(let r of e.trim().toLowerCase()){if(r>="a"&&r<="z"||r>="0"&&r<="9"){t.push(r),n=!1;continue}n||(t.push("-"),n=!0)}return t.at(-1)==="-"&&t.pop(),t.join("")}function on(e){return!De.has(at(e))}function sn(e){return e.trim().toLowerCase().split(/\s+/).filter(Boolean).join(" ")}function ot(e){return Array.isArray(e)?e.map(t=>String(t)).filter(t=>t.length>0):[]}function ln(e,t){let n=new Set(["action","args","author","cwd","fullChangedFields","id","options","path","query","reason","target"]),r={};for(let[o,a]of Object.entries(e))n.has(o)||(r[o]=a);let i={...r,...t};return delete i.args,delete i.author,i}function cn(e,t){let n=w(t??{},{...t});return{changedFields:e.fullChangedFields===!0?"full":"compact",idOnly:e.idOnly===!0,runnerOptions:n}}function V(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:D(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 G(e){if(typeof e=="string"&&e.trim().length>0)return e;if(Array.isArray(e))return ot(e)}function M(e){if(typeof e=="number"&&Number.isFinite(e)||typeof e=="string"&&e.trim().length>0)return e}function un(e){let t=G(e.kind),n=G(e.exemptIsolate),r=G(e.exemptIsolateType);return{...t===void 0?{}:{kind:t},maxDepth:M(e.maxDepth),limit:M(e.limit),after:l(e,"after"),direction:l(e,"direction"),maxPaths:M(e.maxPaths),sample:M(e.sample),...n===void 0?{}:{exemptIsolate:n},...r===void 0?{}:{exemptIsolateType:r},saveBaseline:e.saveBaseline===!0,rebuild:e.rebuild===!0,clear:e.clear===!0,summary:e.summary===!0,...e.full===!0?{full:!0}:{}}}function Oe(e){let t=re(e);return e.ids!==void 0&&(t.ids=D(e.ids)),t}function fn(e){return{status:l(e,"filterStatus"),list:p(e.list)?Oe(e.list):V(e),reason:l(e,"reason"),completedAt:l(e,"completedAt")??l(e,"completed_at"),resolution:l(e,"resolution"),expectedResult:l(e,"expectedResult")??l(e,"expected_result")??l(e,"expected"),actualResult:l(e,"actualResult")??l(e,"actual_result")??l(e,"actual"),validateClose:l(e,"validateClose")??l(e,"validate_close"),author:l(e,"author"),message:l(e,"message"),force:e.force===!0?!0:void 0,dryRun:e.dryRun===!0||e.dry_run===!0?!0:void 0,rollback:I(e.rollback),checkpoint:e.checkpoint===!1||e.noCheckpoint===!0||e.no_checkpoint===!0?!1:void 0}}var Y=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 ce(e){let t={};for(let[n,r]of Object.entries(e))Y.has(n)||(t[n]=r);return Te(t)}function Te(e){return ge(e,"update")}function ge(e,t){let n=Ae(e,t),r=P[t],i=new Set([...r.parameters,...O].filter(({booleanish:o})=>o===!0).map(({param:o})=>o));for(let{keys:o}of r.repeatables)for(let a of o)typeof n[a]=="string"&&(n[a]=[n[a]]);for(let o of r.strings)for(let a of o.keys){let s=n[a];(typeof s=="number"&&Number.isFinite(s)||s===!1&&i.has(a))&&(n[a]=String(s))}return t==="create"?{...te(n,{requireType:!1})}:ne(n)}var it=new Map(C.flatMap(({target:e,keys:t})=>t.map(n=>[n,e])));function st(e){return e.startsWith("filter")||e==="ids"||e==="limit"||e==="offset"}function ue(e,t){throw new d(`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 lt(e){return Object.fromEntries(Object.entries(e).filter(([t])=>!Y.has(t)))}function fe(e,t,n){if(!e)return;let r=p(t.list)?t.list:{},i=p(t.update)?t.update:void 0,o=Object.keys(t).find(s=>t[s]===null&&(i!==void 0||Y.has(s)||st(s)))??Object.keys(r).filter(s=>r[s]===null).map(s=>`list.${s}`)[0];o!==void 0&&ue(o,`"${o}" selects rows or controls the run: omit it or pass a value. To clear an item field, pass null on the field itself${i===void 0?"":" inside update"}.`);let a=i??lt(t);for(let[s,c]of Object.entries(a)){if(c!==null)continue;let y=it.get(s);y===void 0&&ue(s,`Pass unset: ["${s}"] to clear a field, or omit "${s}".`),n[y]=null}}var ct=["author","message"];function ut(e,t){let n=Object.fromEntries(ct.filter(r=>typeof e[r]=="string"&&t[r]===void 0).map(r=>[r,e[r]]));return e.force===!0&&t.force===void 0&&(n.force=!0),Object.keys(n).length===0?t:A(t,{...t,...n})}function dn(e,t=!1){if(p(e.list)||p(e.update)){let r=p(e.update)?ut(e,e.update):ce(e),i=w(e,Te(r));return fe(t,e,i),{status:u(e,"filterStatus"),list:p(e.list)?Oe(e.list):V(e),update:W(r,i),dryRun:e.dryRun===!0||e.dry_run===!0?!0:void 0,rollback:I(e.rollback),checkpoint:e.checkpoint===!1||e.noCheckpoint===!0||e.no_checkpoint===!0?!1:void 0}}let n=w(e,ce(e));return fe(t,e,n),{status:u(e,"filterStatus"),list:V(e),update:n,dryRun:e.dryRun===!0||e.dry_run===!0?!0:void 0,rollback:I(e.rollback),checkpoint:e.checkpoint===!1||e.noCheckpoint===!0||e.no_checkpoint===!0?!1:void 0}}function de(e){return"expectHash"in e||"expect_hash"in e}function pn(e){if(!de(e)&&!(p(e.options)&&de(e.options)))return{expectHash:void 0,dispatchArgs:e};let{expectHash:t,expect_hash:n,...r}=e,i=p(r.options)?r.options:{},{expectHash:o,expect_hash:a,...s}=i,c=[t,n,o,a].filter(N=>N!==void 0),y=c.length>1?c.flatMap(N=>Array.isArray(N)?N:[N]):c[0],m=A(e,"options"in r?{...r,options:p(r.options)?A(r.options,s):r.options}:r);return{expectHash:y,dispatchArgs:m}}export{pt as a,g as b,mt as c,yt as d,_t as e,Ee as f,$ as g,Se as h,gt as i,Re as j,Ke as k,be as l,ht as m,K as n,B as o,Ft as p,ve as q,Mt as r,b as s,Jt as t,l as u,u as v,Zt as w,p as x,Qt as y,en as z,tn as A,ye as B,Ae as C,nn as D,rn as E,an as F,at as G,on as H,sn as I,ot as J,ln as K,cn as L,V as M,un as N,fn as O,Y as P,Te as Q,dn as R,pn as S};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{Aa as re,Y as T,ba as R,j as x,k as J,l as Z,m as C,n as Q,o as ee,u as O,w as k,xa as te,y as v,ya as ne}from"./chunk-KCVSSONY.js";import{L as I,Z as D,b as S,c as L,pa as X,s as H,t as q,v as A,w as W}from"./chunk-3TXEWHQX.js";import{ea as _}from"./chunk-SJWIPGZW.js";import{A as f,C as d}from"./chunk-K672XXGQ.js";var he=new Set(["none","null"]);function pt(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 g(e){return e===void 0?!1:he.has(e.trim().toLowerCase())}function mt(e,t,n){if(!g(e))return;let r=n?` ${n}`:"";throw new d(`${t} no longer accepts "none" or "null".${r}`.trim(),f.USAGE)}function yt(e,t,n){if(!e||e.length===0||L(e)||!e.some(o=>g(o)))return;let i=n?` ${n}`:"";throw new d(`${t} no longer accepts "none" or "null".${i}`.trim(),f.USAGE)}function _t(e,t){for(let n of t){let r=e[n.optionKey];if(!Array.isArray(r)||r.length===0)continue;if(!r.every(s=>typeof s=="string"))throw new d(`${n.valueFlag} entries must be strings.`,f.USAGE);if(L(r))continue;let i=r;if(!i.some(s=>g(s)))continue;if(i.filter(s=>!g(s)).length>0)throw new d(`Cannot mix legacy clear token "none"/"null" with concrete ${n.valueFlag} entries. Use ${n.clearFlag} to clear or provide explicit entries.`,f.USAGE);e[n.optionKey]=void 0,e[n.clearFlagKey]=!0,n.disableFlagKey&&(e[n.disableFlagKey]=!1)}return e}var Ee=["close_reason","close-reason"],ae=[{canonical:"tags",aliases:["tags"],optionKey:"tags",metadataKey:"tags"}],oe=[{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"}],Ne=[...ae,...oe],ie=[{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"}],$=[...Ne,{canonical:"author",aliases:["author"],optionKey:"author",metadataKey:"author"},...ie],Se=[...ae,{canonical:"close-reason",aliases:Ee,optionKey:"closeReason",metadataKey:"close_reason"},...oe,...ie],Ce=new Set(["none","null","-"]);function se(e){return e==="create"?$:Se}function F(e,t){let n=t.unset;if(n!==void 0&&typeof n!="string"&&!Array.isArray(n))return;let r=[];for(let i of se(e))i.optionKey==="author"||!Object.hasOwn(t,i.optionKey)||t[i.optionKey]!==null||(Reflect.deleteProperty(t,i.optionKey),r.push(i.canonical));r.length!==0&&(t.unset=[...n===void 0?[]:typeof n=="string"?[n]:n,...r])}function U(e){return typeof e=="string"&&Ce.has(e.trim().toLowerCase())}function gt(e,t,n,r){return n?se(e).flatMap(i=>{let o=t[i.optionKey],a=r[i.metadataKey];return U(o)&&(U(a)||Array.isArray(a)&&a.some(U))?[`literal_sentinel_stored:${i.canonical}:${o.trim()}`]:[]}):[]}function Re(e,t){return e.flatMap(n=>n.includes(",")&&t(n)?[n]:n.split(","))}function Ke(e){let t=new Set,n=new Set;if(!e.raw||e.raw.length===0)return{metadataKeys:t,optionKeys:n};let r=Re(e.raw,i=>e.resolveDefinition(i.trim().toLowerCase())!==void 0);for(let i of r){let o=i.trim().toLowerCase();if(!o)throw new d("--unset values must not be empty; name each field once, for example --unset parent,release",f.USAGE);if(g(o))throw new d('--unset no longer accepts "none" or "null". Specify concrete field names such as --unset deadline',f.USAGE);let a=e.resolveDefinition(o);if(!a)throw new d(`Unsupported --unset field "${i}". Supported fields: ${e.supportedFields}`,f.USAGE);t.add(a.metadataKey),n.add(a.optionKey)}return{metadataKeys:t,optionKeys:n}}function be(e,t,n){let r=e.trim().toLowerCase();if(!n)return;let i=n.command_to_fields?.get(t)??[];for(let o of i){if(o.allow_unset===!1)continue;let a=new Set;if(typeof o.key=="string"&&o.key.length>0&&a.add(o.key.toLowerCase()),typeof o.metadata_key=="string"&&o.metadata_key.length>0&&a.add(o.metadata_key.toLowerCase()),typeof o.cli_flag=="string"&&o.cli_flag.length>0&&(a.add(o.cli_flag.replaceAll("-","_").toLowerCase()),a.add(o.cli_flag.toLowerCase())),Array.isArray(o.cli_aliases))for(let s of o.cli_aliases)typeof s!="string"||s.length===0||(a.add(s.replaceAll("-","_").toLowerCase()),a.add(s.toLowerCase()));if(a.has(r))return{optionKey:o.key,metadataKey:o.metadata_key}}}var Ie=(()=>{let e=new Map;for(let t of $)for(let n of t.aliases)e.set(n,{optionKey:t.optionKey,metadataKey:t.metadataKey});return e})(),xe=$.map(e=>e.canonical).sort((e,t)=>e.localeCompare(t)).join(", ");function ht(e,t){return Ke({raw:e,supportedFields:xe,resolveDefinition:n=>Ie.get(n)??be(n,"create",t)})}var ke={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 h(e,t,n){let r=`${e} ${t} must be ${n}.`;throw new d(r,f.USAGE,{code:"invalid_argument_value",reason:"invalid_mutation_option_value",field:t,changed:!1,required:r,examples:[ke[e]]})}function K(e,t,n){typeof e!="string"&&h(t,n,"a string")}function B(e,t){(e===null||typeof e!="object"||Array.isArray(e))&&h(t,"options","an object")}function le(e,t){(e==="append"||e==="update")&&t.id!==void 0&&K(t.id,e,"id"),e==="item-reopen"&&(t.id!==void 0&&K(t.id,"reopen","id"),t.reason!==void 0&&K(t.reason,"reopen","reason"),t.options!==void 0&&ve(t.options))}function Ft(e){B(e,"append");for(let t of["body","author","message"])e[t]!==void 0&&K(e[t],"append",t);e.force!==void 0&&typeof e.force!="boolean"&&h("append","force","a boolean")}function ve(e){B(e,"reopen");for(let t of R["item-reopen"].optional){let n=e[t];n!==void 0&&(_(Reflect.get(T,t)).type==="boolean"?typeof n!="boolean"&&h("reopen",t,"a boolean"):K(n,"reopen",t))}}function Fe(e,t){return e?t?"a string or string array":"a string array":"a string"}function Me(e,t,n,r,i,o){n===void 0||typeof n=="string"&&(!i||o)||r==="priority"&&typeof n=="number"&&Number.isFinite(n)||i&&Array.isArray(n)&&Array.from(n).every(a=>typeof a=="string")||h(e,t,Fe(i,o))}function we(e,t,n){let r=e==="create"?k:v;for(let{param:i}of[...r,...O,{param:"force"}]){if(_(Reflect.get(T,i)).type!=="boolean")continue;let o=n.find(a=>a.keys.includes(i))?.keys??[i];for(let a of o)t[a]!==void 0&&typeof t[a]!="boolean"&&h(e,a,"a boolean")}}function j(e,t,n=!0,r=!1){let i=e==="create"?x:C;for(let{target:o,keys:a,repeatable:s}of i)if(_(Reflect.get(T,o)).type!=="boolean")for(let c of a){let y=r&&c!==o,m=s===!0&&(o!=="acceptanceCriteria"||y);Me(e,c,t[c],o,m,n||y)}we(e,t,i)}function Mt(e,t){B(t,e);let n=H(t),r=S(n);return r||F(e,n),j(e,n,!1,r),n}var Pe=Symbol("pm.mcp-mutation-transport"),Le=new Set(["create","update","append"]),P={create:{parameters:k,aliases:x,strings:J,repeatables:Z},update:{parameters:v,aliases:C,strings:Q,repeatables:ee}},De=new Set(["activity","aggregate","context","contracts","deps","files-discover","files-lookup","get","graph","health","history","history-attest","list","next","search","stats","telemetry","validate"]);function b(e){return Pe in e}function w(e,t){return b(e)?q(t):A(e,t)}function Jt(e,t,n=[]){let r=A(e,{...e,...t});for(let i of n)Reflect.deleteProperty(r,i);return r}function l(e,t){let n=e[t];return typeof n=="string"&&n.trim().length>0?n:void 0}function u(e,t){let n=e[t];return typeof n=="string"?n.trim().length>0?n:void 0:typeof n=="number"&&Number.isFinite(n)?String(n):void 0}function Zt(e,t){let n=e[t];return typeof n=="string"?n:typeof n=="number"&&Number.isFinite(n)?String(n):void 0}function p(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Qt(e,t){if(typeof e=="number"){if(!Number.isInteger(e))throw new d(`${t} must be a finite integer.`,f.USAGE);return e}if(typeof e=="string"&&e.trim().length>0){let n=Number(e);if(!Number.isInteger(n))throw new d(`${t} must be a finite integer.`,f.USAGE);return n}}function en(e,t){return typeof e.limit=="number"&&Number.isFinite(e.limit)?e.limit:typeof t.limit=="number"&&Number.isFinite(t.limit)?t.limit:l(e,"limit")??l(t,"limit")}function tn(e){let t=l(e,"outputFormat");return{json:!0,quiet:!0,author:l(e,"author"),path:l(e,"path"),noExtensions:e.noExtensions===!0||e.no_extensions===!0,noPager:!0,outputInclude:l(e,"outputInclude"),outputLimit:u(e,"outputLimit"),outputBudget:u(e,"outputBudget"),outputSession:l(e,"outputSession"),outputCursor:l(e,"outputCursor"),outputFormat:t==="json"||t==="toon"?t:void 0}}var pe=new Set(["tags","blockedBy","blocked_by","skills","fields"]),me=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"]),Ue=new Set([...me].filter(e=>e!=="file")),$e=new Set(["files","files-discover","docs","test","test-all"]),z=new Set(["comments","notes","learnings"]);function Be(e,t){if(!(!z.has(e)||!Object.prototype.hasOwnProperty.call(t,"file")))throw new d(`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 je=new Set(["claim","release","start-task","pause-task","close-task"]),ye={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"]},Ge=new Set(["context","get","list","next","search","comments","notes","learnings","files","docs","test"]),Ve=new Set(["query","keywords","id","text"]);function ze(e){return Ge.has(e)?R[e].optional.filter(t=>!Ve.has(t)):[]}var Ye=new Set(["claim","start-task","comments","notes","learnings","files","docs","test"]);function He(e,t){if(!Ye.has(e??""))return t;let n={...t};for(let r of R[e].optional){let i=r.replace(/[A-Z]/gu,o=>`_${o.toLowerCase()}`);i===r||n[i]===void 0||(n[r]??=n[i],delete n[i])}return n}function qe(e,t,n){if(!z.has(e??""))return n;let r=n,i=r.text??t.text;if(i===void 0)return r;if(r.add!==void 0&&r.add!==i){let a=e.replace(/s$/u,"");throw new d(`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 o={...r,add:i};return delete o.text,o}function We(e,t){let n=t.replace(/[A-Z]/gu,r=>`_${r.toLowerCase()}`);return e[t]!==void 0||e[n]!==void 0}function Xe(e){return[...ye[e]??[],...ze(e),..._e]}var _e=["outputInclude","outputLimit","outputBudget","outputFormat","outputSession","outputCursor"];function Ae(e,t=""){let n={},r=$e.has(t),i=t==="files"||t==="files-discover"||t==="docs",o=z.has(t)?Ue:me;for(let[a,s]of Object.entries(e)){if(Array.isArray(s)&&pe.has(a)){n[a]=s.join(",");continue}if(a==="note"&&i){n[a]=s;continue}if(typeof s=="string"&&o.has(a)){n[a]=[s];continue}if(typeof s=="string"&&r&&(a==="add"||a==="remove")){n[a]=[s];continue}n[a]=s}return Object.assign(n,Object.fromEntries(Object.getOwnPropertySymbols(e).map(a=>[a,Reflect.get(e,a)]))),n}function Je(e,t,n){let r=l(e,"author");return r!==void 0?r:n!==void 0&&je.has(n)?l(e,"assignee")??l(t,"assignee"):void 0}function Ze(e,t){return t!==void 0&&e.author===void 0?{...e,author:t}:e}function Qe(e,t,n){let r={},i=P[e],o=new Set([...i.parameters.map(({param:a})=>a),...O.map(({param:a})=>a),...ye[e],..._e,"force"]);for(let a of o){let s=i.aliases.find(c=>c.keys.includes(a))?.keys??[a];t[a]===void 0||s.some(c=>n[c]!==void 0)||(r[a]=t[a])}return r}function E(e,t){throw new d(`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 et(e,t,n){let r=P[e],i=[...r.parameters,...O,{param:"force"}];for(let{param:o}of i){if(_(T[o]).type!=="boolean")continue;let s=(r.aliases.find(c=>c.keys.includes(o))?.keys??[o]).find(c=>n[c]!==void 0&&typeof n[c]!="boolean");s!==void 0&&E(e,s)}for(let o of["idOnly","fullChangedFields"])t[o]!==void 0&&typeof t[o]!="boolean"&&E(e,o)}function tt(e,t,n){t.options!==void 0&&!p(t.options)&&E(e,"options"),et(e,t,n);for(let a of pe){let s=n[a];Array.isArray(s)&&s.some(c=>typeof c!="string")&&E(e,a)}let r=ge(n,e),i=P[e];for(let{keys:a,target:s}of i.strings)a.some(c=>n[c]!==void 0)&&r[s]===void 0&&E(e,s);let o=i.repeatables.flatMap(({keys:a})=>a).find(a=>{let s=n[a];return s!==void 0&&typeof s!="string"&&(!Array.isArray(s)||s.some(c=>typeof c!="string"))});return o!==void 0&&E(e,o),r}function nt(e,t,n,r,i){let o=(t==="create"||t==="update")&&b(e),a={...o?Qe(t,e,r):n,...r};if((t==="create"||t==="update")&&!o){let s=p(e.options)&&S(e.options);s||F(t,a),j(t,a,!0,s)}return o?tt(t,e,a):i?Ae(a,t):a}function rt(e,t){return!Le.has(e??"")||S(t)?t:X(t)}function nn(e,t,{nativeAction:n=!0}={}){le(t,e);let r=p(e.options)?e.options:void 0,i=_(e.options),o={},a=m=>{We(i,m)||e[m]===void 0||(o[m]=e[m])};for(let m of Xe(t??""))a(m);t!==void 0&&b(e)&&Be(t,i);let s=qe(t,e,He(t,nt(e,t,o,i,n)));if(t==="history-attest"&&b(e)&&(s.output!==void 0||typeof s.verify=="string"))throw new d("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 c=b(e)?e:r??e,y=w(c,Ze(s,Je(e,s,t)));return rt(t,y)}function rn(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 an(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 at(e){let t=[],n=!0;for(let r of e.trim().toLowerCase()){if(r>="a"&&r<="z"||r>="0"&&r<="9"){t.push(r),n=!1;continue}n||(t.push("-"),n=!0)}return t.at(-1)==="-"&&t.pop(),t.join("")}function on(e){return!De.has(at(e))}function sn(e){return e.trim().toLowerCase().split(/\s+/).filter(Boolean).join(" ")}function ot(e){return Array.isArray(e)?e.map(t=>String(t)).filter(t=>t.length>0):[]}function ln(e,t){let n=new Set(["action","args","author","cwd","fullChangedFields","id","options","path","query","reason","target"]),r={};for(let[o,a]of Object.entries(e))n.has(o)||(r[o]=a);let i={...r,...t};return delete i.args,delete i.author,i}function cn(e,t){let n=w(t??{},{...t});return{changedFields:e.fullChangedFields===!0?"full":"compact",idOnly:e.idOnly===!0,runnerOptions:n}}function V(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:D(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 G(e){if(typeof e=="string"&&e.trim().length>0)return e;if(Array.isArray(e))return ot(e)}function M(e){if(typeof e=="number"&&Number.isFinite(e)||typeof e=="string"&&e.trim().length>0)return e}function un(e){let t=G(e.kind),n=G(e.exemptIsolate),r=G(e.exemptIsolateType);return{...t===void 0?{}:{kind:t},maxDepth:M(e.maxDepth),limit:M(e.limit),after:l(e,"after"),direction:l(e,"direction"),maxPaths:M(e.maxPaths),sample:M(e.sample),...n===void 0?{}:{exemptIsolate:n},...r===void 0?{}:{exemptIsolateType:r},saveBaseline:e.saveBaseline===!0,rebuild:e.rebuild===!0,clear:e.clear===!0,summary:e.summary===!0,...e.full===!0?{full:!0}:{}}}function Oe(e){let t=re(e);return e.ids!==void 0&&(t.ids=D(e.ids)),t}function fn(e){return{status:l(e,"filterStatus"),list:p(e.list)?Oe(e.list):V(e),reason:l(e,"reason"),completedAt:l(e,"completedAt")??l(e,"completed_at"),resolution:l(e,"resolution"),expectedResult:l(e,"expectedResult")??l(e,"expected_result")??l(e,"expected"),actualResult:l(e,"actualResult")??l(e,"actual_result")??l(e,"actual"),validateClose:l(e,"validateClose")??l(e,"validate_close"),author:l(e,"author"),message:l(e,"message"),force:e.force===!0?!0:void 0,dryRun:e.dryRun===!0||e.dry_run===!0?!0:void 0,rollback:I(e.rollback),checkpoint:e.checkpoint===!1||e.noCheckpoint===!0||e.no_checkpoint===!0?!1:void 0}}var Y=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 ce(e){let t={};for(let[n,r]of Object.entries(e))Y.has(n)||(t[n]=r);return Te(t)}function Te(e){return ge(e,"update")}function ge(e,t){let n=Ae(e,t),r=P[t],i=new Set([...r.parameters,...O].filter(({booleanish:o})=>o===!0).map(({param:o})=>o));for(let{keys:o}of r.repeatables)for(let a of o)typeof n[a]=="string"&&(n[a]=[n[a]]);for(let o of r.strings)for(let a of o.keys){let s=n[a];(typeof s=="number"&&Number.isFinite(s)||s===!1&&i.has(a))&&(n[a]=String(s))}return t==="create"?{...te(n,{requireType:!1})}:ne(n)}var it=new Map(C.flatMap(({target:e,keys:t})=>t.map(n=>[n,e])));function st(e){return e.startsWith("filter")||e==="ids"||e==="limit"||e==="offset"}function ue(e,t){throw new d(`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 lt(e){return Object.fromEntries(Object.entries(e).filter(([t])=>!Y.has(t)))}function fe(e,t,n){if(!e)return;let r=p(t.list)?t.list:{},i=p(t.update)?t.update:void 0,o=Object.keys(t).find(s=>t[s]===null&&(i!==void 0||Y.has(s)||st(s)))??Object.keys(r).filter(s=>r[s]===null).map(s=>`list.${s}`)[0];o!==void 0&&ue(o,`"${o}" selects rows or controls the run: omit it or pass a value. To clear an item field, pass null on the field itself${i===void 0?"":" inside update"}.`);let a=i??lt(t);for(let[s,c]of Object.entries(a)){if(c!==null)continue;let y=it.get(s);y===void 0&&ue(s,`Pass unset: ["${s}"] to clear a field, or omit "${s}".`),n[y]=null}}var ct=["author","message"];function ut(e,t){let n=Object.fromEntries(ct.filter(r=>typeof e[r]=="string"&&t[r]===void 0).map(r=>[r,e[r]]));return e.force===!0&&t.force===void 0&&(n.force=!0),Object.keys(n).length===0?t:A(t,{...t,...n})}function dn(e,t=!1){if(p(e.list)||p(e.update)){let r=p(e.update)?ut(e,e.update):ce(e),i=w(e,Te(r));return fe(t,e,i),{status:u(e,"filterStatus"),list:p(e.list)?Oe(e.list):V(e),update:W(r,i),dryRun:e.dryRun===!0||e.dry_run===!0?!0:void 0,rollback:I(e.rollback),checkpoint:e.checkpoint===!1||e.noCheckpoint===!0||e.no_checkpoint===!0?!1:void 0}}let n=w(e,ce(e));return fe(t,e,n),{status:u(e,"filterStatus"),list:V(e),update:n,dryRun:e.dryRun===!0||e.dry_run===!0?!0:void 0,rollback:I(e.rollback),checkpoint:e.checkpoint===!1||e.noCheckpoint===!0||e.no_checkpoint===!0?!1:void 0}}function de(e){return"expectHash"in e||"expect_hash"in e}function pn(e){if(!de(e)&&!(p(e.options)&&de(e.options)))return{expectHash:void 0,dispatchArgs:e};let{expectHash:t,expect_hash:n,...r}=e,i=p(r.options)?r.options:{},{expectHash:o,expect_hash:a,...s}=i,c=[t,n,o,a].filter(N=>N!==void 0),y=c.length>1?c.flatMap(N=>Array.isArray(N)?N:[N]):c[0],m=A(e,"options"in r?{...r,options:p(r.options)?A(r.options,s):r.options}:r);return{expectHash:y,dispatchArgs:m}}export{pt as a,g as b,mt as c,yt as d,_t as e,Ee as f,$ as g,Se as h,gt as i,Re as j,Ke as k,be as l,ht as m,K as n,B as o,Ft as p,ve as q,Mt as r,b as s,Jt as t,l as u,u as v,Zt as w,p as x,Qt as y,en as z,tn as A,ye as B,Ae as C,nn as D,rn as E,an as F,at as G,on as H,sn as I,ot as J,ln as K,cn as L,V as M,un as N,fn as O,Y as P,Te as Q,dn as R,pn as S};
|
|
2
|
+
//# sourceMappingURL=chunk-Q4VZSMUL.js.map
|