@unbrained/pm-cli 2026.11.8 → 2026.11.9
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/CHANGELOG.md +15 -0
- package/dist/cli/main.js +1 -1
- package/dist/cli/runtime/projection-retry.js +1 -1
- package/dist/cli/runtime/read-output-mutation-retry.js +2 -0
- package/dist/cli-bundle/bundle-manifest.json +1 -1
- package/dist/cli-bundle/chunks/{chunk-NH7QX2M2.js → chunk-3BMIAI4P.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RC6SSFOF.js → chunk-5VRJPPUC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-XBUZENP4.js → chunk-6V4PGJBZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-YUTFMHSG.js → chunk-ASJZMYKM.js} +33 -33
- package/dist/cli-bundle/chunks/chunk-BLUCQ4T4.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-4BMPGUTG.js → chunk-ELNWRSGZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-7GC6WIDR.js → chunk-EZRLW4R6.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NKO42JMT.js → chunk-G6Q4VQSI.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3A5DJZCC.js → chunk-GCPP37N6.js} +48 -48
- package/dist/cli-bundle/chunks/{chunk-C4MQFWCM.js → chunk-GDQ2T2OR.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-L5BU5FYN.js → chunk-GZVOOHTO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-LI2HP5OX.js → chunk-IGT252ES.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CP43BHX3.js → chunk-JK7O7MFO.js} +29 -29
- package/dist/cli-bundle/chunks/{chunk-AFZS6WFV.js → chunk-JYQXIC6C.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-PE6CZ3PE.js → chunk-LVDFPGD7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-Z3LWNF7C.js → chunk-MSJ7IHMJ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MKW5LGVQ.js → chunk-O2M3TNFY.js} +6 -6
- package/dist/cli-bundle/chunks/chunk-UFIM5ZC5.js +6 -0
- package/dist/cli-bundle/chunks/{chunk-YGUUJHSR.js → chunk-VATZTJE3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DOHZKPPC.js → chunk-XKY4LUXN.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-7V6I6X4G.js → chunk-YK5GAWOT.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-S4IZIMAO.js → chunk-YV5ALMG2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HESIRIVX.js → chunk-Z3QEEOAM.js} +2 -2
- package/dist/cli-bundle/chunks/item-revision-Y5CE3EIN.js +2 -0
- package/dist/cli-bundle/chunks/item-transaction-XBIN4KYM.js +2 -0
- package/dist/cli-bundle/chunks/{mutation-admission-FJ3D66PV.js → mutation-admission-TAQN2AKK.js} +2 -2
- package/dist/cli-bundle/chunks/{register-list-query-GXP77CX7.js → register-list-query-XMQYFUFI.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-XJ2DROUM.js → register-mutation-OBVCFLDK.js} +2 -2
- package/dist/cli-bundle/chunks/{register-operations-O5LERXM7.js → register-operations-CGNFZ6DR.js} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-4VOTYLL2.js → register-setup-LFB5ERXH.js} +2 -2
- package/dist/cli-bundle/chunks/{stage-ZDJL3FGL.js → stage-NQHF6JPC.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-Z2QWZRSL.js → chunk-2SQUWQP3.js} +18 -18
- package/dist/cli-bundle/focused-chunks/chunk-4FWMXQN3.js +12 -0
- package/dist/cli-bundle/focused-chunks/{chunk-4UOXVFJZ.js → chunk-AH5IST3V.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-6U5HP6L3.js → chunk-ALLOWZSH.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-KNF2QTEZ.js → chunk-C3DO4ZGZ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-LTPT5TE7.js → chunk-CUGJ2DY2.js} +20 -20
- package/dist/cli-bundle/focused-chunks/{chunk-2A3QZELL.js → chunk-HLQOGAWG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-P4EHEH4C.js → chunk-HNFY3XLC.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-IB6TCE7N.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-5YPX3QKU.js → chunk-IS5FLEZW.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-ULTSMJYF.js → chunk-J7PWHKZK.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-P6TG33FV.js → chunk-JU62TKJP.js} +26 -26
- package/dist/cli-bundle/focused-chunks/{chunk-TSHRBPTI.js → chunk-LDMBNTOG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-UUVRYIKA.js → chunk-LWMPQRJT.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-MYBKRV5R.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-KBRSA4OK.js → chunk-NUFO3OR6.js} +25 -25
- package/dist/cli-bundle/focused-chunks/{chunk-DIEBSC76.js → chunk-NZQYHPUN.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-3HFENALW.js → chunk-Q45LDP7P.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-O7K3X4LH.js → chunk-QWUWNFQO.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-SZ2BKK3M.js → chunk-RNZUORGI.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-WPXMPGTY.js → chunk-UIKLNSW3.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-I4YUZW3J.js → chunk-XLSTFUXM.js} +2 -2
- package/dist/cli-bundle/focused-chunks/item-revision-M6FOLME2.js +2 -0
- package/dist/cli-bundle/focused-chunks/{item-transaction-Q2Z7DDCR.js → item-transaction-H6VA5JGB.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{mutation-admission-QWC6MLTZ.js → mutation-admission-PRTQWQK6.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{stage-NKH5SKSZ.js → stage-7T77PSJD.js} +2 -2
- package/dist/cli-bundle/main.js +26 -26
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +4 -4
- 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 +57 -57
- 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 +9 -9
- package/dist/core/item/item-format.d.ts +9 -1
- package/dist/core/item/item-format.js +1 -1
- package/dist/core/output/output.d.ts +9 -2
- package/dist/core/output/output.js +4 -4
- package/dist/core/search/corpus.js +1 -1
- package/dist/mcp/tool-definitions.js +1 -1
- package/dist/sdk/annotations.js +1 -1
- package/dist/sdk/generated/error-code-catalog-rows.js +1 -1
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1 -1
- package/dist/sdk/lifecycle/item-revision.d.ts +6 -0
- package/dist/sdk/lifecycle/item-revision.js +1 -1
- package/dist/sdk/public-surface.json +1 -1
- package/dist/sdk/query/get-facet-roots.js +2 -0
- package/dist/sdk/query/get.js +1 -1
- package/dist/sdk/read-output/positional-rows.js +2 -0
- package/dist/sdk/read-output-contracts.d.ts +4 -0
- package/dist/sdk/read-output-contracts.js +1 -1
- package/dist/sdk/runtime/actions.js +1 -1
- package/docs/AGENT_OUTPUT_ENCODINGS.md +16 -0
- package/docs/README.md +1 -1
- package/docs/READ_OUTPUT_CONTRACTS.md +21 -0
- package/docs/RELEASING.md +27 -5
- package/marketplace.json +1 -1
- package/package.json +2 -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-JAE5MWLX.js +0 -2
- package/dist/cli-bundle/chunks/chunk-LLTRUVKK.js +0 -6
- package/dist/cli-bundle/chunks/item-revision-TUGZYYXX.js +0 -2
- package/dist/cli-bundle/chunks/item-transaction-2RRBAQN3.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-PL6EO4GJ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-PSLDGAEY.js +0 -12
- package/dist/cli-bundle/focused-chunks/chunk-UNNLBJRI.js +0 -2
- package/dist/cli-bundle/focused-chunks/item-revision-XNSRDTFB.js +0 -2
- package/docs/ECOSYSTEM_PLANNING_REVIEW.md +0 -274
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{M as b,N as B,O as U,P as k,Q as j,R as G,S as I,X as M,a as oe,g as x,i as W,o as S,q as L,s as P}from"./chunk-DIEBSC76.js";import{D as se,E as le,G as v,H as ce,V,ea as Z,na as de,o as F,p as X}from"./chunk-LTPT5TE7.js";import{ja as O}from"./chunk-Z2QWZRSL.js";import{A as p,z as f}from"./chunk-G6ERMFJ5.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]="202cbe4e-7d36-5b12-be9d-d35608a6b36d")}catch{}})();var ke=new Set(["none","null"]);function At(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 R(e){return e===void 0?!1:ke.has(e.trim().toLowerCase())}function _t(e,t,r){if(!R(e))return;let n=r?` ${r}`:"";throw new p(`${t} no longer accepts "none" or "null".${n}`.trim(),f.USAGE)}function vt(e,t,r){if(!e||e.length===0||X(e)||!e.some(o=>R(o)))return;let n=r?` ${r}`:"";throw new p(`${t} no longer accepts "none" or "null".${n}`.trim(),f.USAGE)}function Ot(e,t){for(let r of t){let n=e[r.optionKey];if(!Array.isArray(n)||n.length===0)continue;if(!n.every(a=>typeof a=="string"))throw new p(`${r.valueFlag} entries must be strings.`,f.USAGE);if(X(n))continue;let o=n;if(o.some(a=>R(a))){if(o.filter(a=>!R(a)).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}(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]="cfab194a-06fd-5536-9572-d33a34b94065")}catch{}})();var Ie=["close_reason","close-reason"],ue=[{canonical:"tags",aliases:["tags"],optionKey:"tags",metadataKey:"tags"}],fe=[{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"}],Me=[...ue,...fe],pe=[{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"}],Fe=[...Me,{canonical:"author",aliases:["author"],optionKey:"author",metadataKey:"author"},...pe],De=[...ue,{canonical:"close-reason",aliases:Ie,optionKey:"closeReason",metadataKey:"close_reason"},...fe,...pe],Ke=new Set(["none","null","-"]);function ye(e){return e==="create"?Fe:De}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 ye(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"&&Ke.has(e.trim().toLowerCase())}function bt(e,t,r,n){return r?ye(e).flatMap(o=>{let a=t[o.optionKey],i=n[o.metadataKey];return Q(a)&&(Q(i)||Array.isArray(i)&&i.some(Q))?[`literal_sentinel_stored:${o.canonical}:${a.trim()}`]:[]}):[]}function xe(e,t){return e.flatMap(r=>r.includes(",")&&t(r)?[r]:r.split(","))}function Rt(e){let t=new Set,r=new Set;if(!e.raw||e.raw.length===0)return{metadataKeys:t,optionKeys:r};let n=xe(e.raw,o=>e.resolveDefinition(o.trim().toLowerCase())!==void 0);for(let o of n){let a=o.trim().toLowerCase();if(!a)throw new p("--unset values must not be empty; name each field once, for example --unset parent,release",f.USAGE);if(R(a))throw new p('--unset no longer accepts "none" or "null". Specify concrete field names such as --unset deadline',f.USAGE);let i=e.resolveDefinition(a);if(!i)throw new p(`Unsupported --unset field "${o}". Supported fields: ${e.supportedFields}`,f.USAGE);t.add(i.metadataKey),r.add(i.optionKey)}return{metadataKeys:t,optionKeys:r}}function Nt(e,t,r){let n=e.trim().toLowerCase();if(!r)return;let o=r.command_to_fields?.get(t)??[];for(let a of o){if(a.allow_unset===!1)continue;let i=new Set;if(typeof a.key=="string"&&a.key.length>0&&i.add(a.key.toLowerCase()),typeof a.metadata_key=="string"&&a.metadata_key.length>0&&i.add(a.metadata_key.toLowerCase()),typeof a.cli_flag=="string"&&a.cli_flag.length>0&&(i.add(a.cli_flag.replaceAll("-","_").toLowerCase()),i.add(a.cli_flag.toLowerCase())),Array.isArray(a.cli_aliases))for(let l of a.cli_aliases)typeof l!="string"||l.length===0||(i.add(l.replaceAll("-","_").toLowerCase()),i.add(l.toLowerCase()));if(i.has(n))return{optionKey:a.key,metadataKey:a.metadata_key}}}(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]="837a5c2d-6447-5696-b0de-32641cde14cd")}catch{}})();var Le={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 N(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:[Le[e]]})}function D(e,t,r){typeof e!="string"&&N(t,r,"a string")}function ee(e,t){(e===null||typeof e!="object"||Array.isArray(e))&&N(t,"options","an object")}function me(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&&Pe(t.options))}function Bt(e){ee(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"&&N("append","force","a boolean")}function Pe(e){ee(e,"reopen");for(let t of M["item-reopen"].optional){let r=e[t];r!==void 0&&(O(Reflect.get(b,t)).type==="boolean"?typeof r!="boolean"&&N("reopen",t,"a boolean"):D(r,"reopen",t))}}function Be(e,t){return e?t?"a string or string array":"a string array":"a string"}function Ue(e,t,r,n,o,a){r===void 0||typeof r=="string"&&(!o||a)||n==="priority"&&typeof r=="number"&&Number.isFinite(r)||o&&Array.isArray(r)&&Array.from(r).every(i=>typeof i=="string")||N(e,t,Be(o,a))}function je(e,t,r){let n=e==="create"?L:P;for(let{param:o}of[...n,...S,{param:"force"}]){if(O(Reflect.get(b,o)).type!=="boolean")continue;let a=r.find(i=>i.keys.includes(o))?.keys??[o];for(let i of a)t[i]!==void 0&&typeof t[i]!="boolean"&&N(e,i,"a boolean")}}function te(e,t,r=!0,n=!1){let o=e==="create"?B:j;for(let{target:a,keys:i,repeatable:l}of o)if(O(Reflect.get(b,a)).type!=="boolean")for(let y of i){let g=n&&y!==a,J=l===!0&&(a!=="acceptanceCriteria"||g);Ue(e,y,t[y],a,J,r||g)}je(e,t,o)}function Ut(e,t){ee(t,e);let r=se(t),n=F(r);return n||H(e,r),te(e,r,!1,n),r}import{Option as lr}from"commander";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="201134b5-01e8-55ae-a099-137b9b6fae92")}catch{}})();function A(e,t,r){if(typeof r!="string")return;let n=r.trim();n.length!==0&&e.push(t,n)}function m(e,t,r){r===!0&&e.push(t)}function T(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 Ge(e,t){let r=["test",e,"--run","--json","--progress"];return T(r,"--add",t.add),T(r,"--add-json",t.addJson),T(r,"--remove",t.remove),T(r,"--remove-index",Array.isArray(t.removeIndex)?t.removeIndex.map(n=>typeof n=="number"?String(n):n):t.removeIndex),A(r,"--match",t.match),A(r,"--only-index",typeof t.onlyIndex=="number"?String(t.onlyIndex):t.onlyIndex),m(r,"--only-last",t.onlyLast),T(r,"--measure",t.measure),A(r,"--metric-below",t.metricBelow),A(r,"--metric-diff",t.metricDiff),Ve(r,t),A(r,"--author",t.author),A(r,"--message",t.message),m(r,"--force",t.force),r}function Ve(e,t){A(e,"--timeout",t.timeout),T(e,"--env-set",t.envSet),T(e,"--env-clear",t.envClear),m(e,"--shared-host-safe",t.sharedHostSafe),A(e,"--pm-context",t.pmContext),m(e,"--override-linked-pm-context",t.overrideLinkedPmContext),A(e,"--workspace-context",t.workspaceContext),m(e,"--override-linked-workspace-context",t.overrideLinkedWorkspaceContext),m(e,"--allow-untrusted-linked-tests",t.allowUntrustedLinkedTests),m(e,"--fail-on-context-mismatch",t.failOnContextMismatch),m(e,"--fail-on-skipped",t.failOnSkipped),m(e,"--fail-on-empty-test-run",t.failOnEmptyTestRun),m(e,"--require-assertions-for-pm",t.requireAssertionsForPm),m(e,"--check-context",t.checkContext),m(e,"--auto-pm-context",t.autoPmContext)}(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]="131c6816-18f9-5c50-ab4d-0ff380b513bc")}catch{}})();function ge(e,t){let r=[],n=new Set;for(let o of t.keys){if(!Object.hasOwn(e,o))continue;let a=e[o];if(a!=null){if(typeof a=="string"){r.push(a);continue}if(!Array.isArray(a)||!a.every(i=>typeof i=="string"))return;n.has(a)||(n.add(a),r.push(...a))}}return r.length>0?r.join("; "):void 0}function C(e,t){return e.find(r=>r.target===t)??{target:t,keys:[t]}}function s(e,t){return e[t]===!0?!0:void 0}function _(e,t){return e[t]===!1?!0:void 0}function $(e,t){return t.some(r=>e[r]===!0)?!0:void 0}function re(e,t){for(let[r,n]of Object.entries(t))r==="__proto__"||r==="constructor"||r==="prototype"||Object.hasOwn(e,r)||(e[r]=n)}function he(e,t={}){let r=i=>x(e,C(U,i)),n=i=>W(e,C(k,i)),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 a={title:r("title"),description:r("description"),type:o,template:r("template"),createMode:r("createMode"),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:ge(e,C(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:$(e,["allowMissingParent","allow_missing_parent"])===!0,allowUnresolvedDeps:$(e,["allowUnresolvedDeps","allow_unresolved_deps"])===!0,allowDuplicate:s(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:s(e,"clearDeps"),clearComments:s(e,"clearComments"),clearNotes:s(e,"clearNotes"),clearLearnings:s(e,"clearLearnings"),clearFiles:s(e,"clearFiles"),clearTests:s(e,"clearTests"),clearDocs:s(e,"clearDocs"),clearReminders:s(e,"clearReminders"),clearEvents:s(e,"clearEvents"),clearTypeOptions:s(e,"clearTypeOptions")};return re(a,e),v(e,a)}function Ae(e){let t=o=>x(e,C(G,o)),r=o=>W(e,C(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:ge(e,C(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:$(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:s(e,"replaceDeps"),replaceTests:s(e,"replaceTests"),replaceFiles:s(e,"replaceFiles"),replaceDocs:s(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:s(e,"clearDeps"),clearComments:s(e,"clearComments"),clearNotes:s(e,"clearNotes"),clearLearnings:s(e,"clearLearnings"),clearFiles:s(e,"clearFiles"),clearTests:s(e,"clearTests"),clearDocs:s(e,"clearDocs"),clearReminders:s(e,"clearReminders"),clearEvents:s(e,"clearEvents"),clearTypeOptions:s(e,"clearTypeOptions")};return re(n,e),v(e,n)}function d(e,t){let r=C(oe,t),n=x(e,r);if(n!==void 0)return n;for(let o of r.keys){let a=e[o];if(Array.isArray(a)){let i=a.filter(l=>typeof l=="string");if(i.length>0)return i.join(",")}if(t==="ids"&&typeof a=="string")return a;if(typeof a=="number"&&Number.isFinite(a))return String(a)}}function He(e){let t=s(e,"filterFilesMissing"),r=s(e,"filterDocsMissing");return{filterReviewerMissing:s(e,"filterReviewerMissing"),filterRiskMissing:s(e,"filterRiskMissing"),filterConfidenceMissing:s(e,"filterConfidenceMissing"),filterSprintMissing:s(e,"filterSprintMissing"),filterReleaseMissing:s(e,"filterReleaseMissing"),hasNotes:s(e,"hasNotes"),hasLearnings:s(e,"hasLearnings"),hasFiles:s(e,"hasFiles"),hasDocs:s(e,"hasDocs"),hasTests:s(e,"hasTests"),hasComments:s(e,"hasComments"),hasDeps:s(e,"hasDeps"),hasBody:s(e,"hasBody"),hasLinkedCommand:s(e,"hasLinkedCommand"),noNotes:_(e,"notes"),noLearnings:_(e,"learnings"),noFiles:_(e,"files")??t,filterFilesMissing:t,noDocs:_(e,"docs")??r,filterDocsMissing:r,noTests:_(e,"tests"),noComments:_(e,"comments"),noDeps:_(e,"deps"),emptyBody:s(e,"emptyBody"),noLinkedCommand:_(e,"linkedCommand")}}function _e(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:s(e,"today"),recent:s(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:_(e,"truncate"),includeBody:s(e,"includeBody"),strictRead:s(e,"strictRead"),compact:s(e,"compact"),brief:s(e,"brief"),full:s(e,"full"),fields:d(e,"fields"),sort:d(e,"sort"),order:d(e,"order"),tree:s(e,"tree"),treeDepth:d(e,"treeDepth"),filterAcMissing:s(e,"filterAcMissing"),filterEstimatesMissing:$(e,["filterEstimatesMissing","filterEstimateMissing"]),filterResolutionMissing:s(e,"filterResolutionMissing"),filterMetadataMissing:s(e,"filterMetadataMissing"),...He(e)};return re(t,e),t}(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]="70052a03-cde5-5d5c-822b-11f50378a9a1")}catch{}})();var $e=Symbol("pm.mcp-mutation-transport"),ze=new Set(["create","update","append"]),Y={create:{parameters:L,aliases:B,strings:U,repeatables:k},update:{parameters:P,aliases:j,strings:G,repeatables:I}},qe=new Set(["activity","aggregate","context","contracts","deps","files-discover","files-lookup","get","graph","health","history","history-attest","list","next","search","stats","telemetry","validate"]);function K(e){return $e in e}function q(e,t){return K(e)?le(t):v(e,t)}function wr(e,t,r=[]){let n=v(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 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 kr(e,t){let r=e[t];return typeof r=="string"?r:typeof r=="number"&&Number.isFinite(r)?String(r):void 0}function h(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Ir(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 Mr(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 Fr(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:u(e,"outputLimit"),outputBudget:u(e,"outputBudget"),outputSession:c(e,"outputSession"),outputCursor:c(e,"outputCursor"),outputFormat:t==="json"||t==="toon"?t:void 0}}var Te=new Set(["tags","blockedBy","blocked_by","skills","fields"]),Ce=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"]),Ye=new Set([...Ce].filter(e=>e!=="file")),Je=new Set(["files","files-discover","docs","test","test-all"]),ie=new Set(["comments","notes","learnings"]);function We(e,t){if(!(!ie.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 Xe=new Set(["claim","release","start-task","pause-task","close-task"]),Se={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"],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"]},Ze=new Set(["context","get","list","next","search","comments","notes","learnings","files","docs","test"]),Qe=new Set(["query","keywords","id","text"]);function et(e){return Ze.has(e)?M[e].optional.filter(t=>!Qe.has(t)):[]}var tt=new Set(["comments","notes","learnings","files","docs","test"]);function rt(e,t){if(!tt.has(e??""))return t;let r={...t};for(let n of M[e].optional){let o=n.replace(/[A-Z]/gu,a=>`_${a.toLowerCase()}`);o===n||r[o]===void 0||(r[n]??=r[o],delete r[o])}return r}function nt(e,t,r){if(!ie.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 i=e.replace(/s$/u,"");throw new p(`Specify ${i} text either as text or with add, not both.`,f.USAGE,{code:"annotation_text_source_conflict",field:"text",required:`Pass the ${i} text once: text and add are the same source.`})}let a={...n,add:o};return delete a.text,a}function at(e,t){let r=t.replace(/[A-Z]/gu,n=>`_${n.toLowerCase()}`);return e[t]!==void 0||e[r]!==void 0}function it(e){return[...Se[e]??[],...et(e),...be]}var be=["outputInclude","outputLimit","outputBudget","outputFormat","outputSession","outputCursor"];function Re(e,t=""){let r={},n=Je.has(t),o=t==="files"||t==="files-discover"||t==="docs",a=ie.has(t)?Ye:Ce;for(let[i,l]of Object.entries(e)){if(Array.isArray(l)&&Te.has(i)){r[i]=l.join(",");continue}if(i==="note"&&o){r[i]=l;continue}if(typeof l=="string"&&a.has(i)){r[i]=[l];continue}if(typeof l=="string"&&n&&(i==="add"||i==="remove")){r[i]=[l];continue}r[i]=l}return Object.assign(r,Object.fromEntries(Object.getOwnPropertySymbols(e).map(i=>[i,Reflect.get(e,i)]))),r}function ot(e,t,r){let n=c(e,"author");return n!==void 0?n:r!==void 0&&Xe.has(r)?c(e,"assignee")??c(t,"assignee"):void 0}function st(e,t){return t!==void 0&&e.author===void 0?{...e,author:t}:e}function lt(e,t,r){let n={},o=Y[e],a=new Set([...o.parameters.map(({param:i})=>i),...S.map(({param:i})=>i),...Se[e],...be,"force"]);for(let i of a){let l=o.aliases.find(y=>y.keys.includes(i))?.keys??[i];t[i]===void 0||l.some(y=>r[y]!==void 0)||(n[i]=t[i])}return n}function E(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 ct(e,t,r){let n=Y[e],o=[...n.parameters,...S,{param:"force"}];for(let{param:a}of o){if(O(b[a]).type!=="boolean")continue;let i=(n.aliases.find(l=>l.keys.includes(a))?.keys??[a]).find(l=>r[l]!==void 0&&typeof r[l]!="boolean");i!==void 0&&E(e,i)}for(let a of["idOnly","fullChangedFields"])t[a]!==void 0&&typeof t[a]!="boolean"&&E(e,a)}function dt(e,t,r){t.options!==void 0&&!h(t.options)&&E(e,"options"),ct(e,t,r);for(let i of Te){let l=r[i];Array.isArray(l)&&l.some(y=>typeof y!="string")&&E(e,i)}let n=we(r,e),o=Y[e];for(let{keys:i,target:l}of o.strings)i.some(y=>r[y]!==void 0)&&n[l]===void 0&&E(e,l);let a=o.repeatables.flatMap(({keys:i})=>i).find(i=>{let l=r[i];return l!==void 0&&typeof l!="string"&&(!Array.isArray(l)||l.some(y=>typeof y!="string"))});return a!==void 0&&E(e,a),n}function ut(e,t,r,n){let o=(t==="create"||t==="update")&&K(e),a={...o?lt(t,e,n):r,...n};if((t==="create"||t==="update")&&!o){let i=h(e.options)&&F(e.options);i||H(t,a),te(t,a,!0,i)}return o?dt(t,e,a):Re(a,t)}function ft(e,t){return!ze.has(e??"")||F(t)?t:de(t)}function Dr(e,t){me(t,e);let r=h(e.options)?e.options:void 0,n=O(e.options),o={},a=g=>{at(n,g)||e[g]===void 0||(o[g]=e[g])};for(let g of it(t??""))a(g);t!==void 0&&K(e)&&We(t,n);let i=nt(t,e,rt(t,ut(e,t,o,n)));if(t==="history-attest"&&K(e)&&(i.output!==void 0||typeof i.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 l=K(e)?e:r??e,y=q(l,st(i,ot(e,i,t)));return ft(t,y)}function Kr(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 xr(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 pt(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 Lr(e){return!qe.has(pt(e))}function Pr(e){return e.trim().toLowerCase().split(/\s+/).filter(Boolean).join(" ")}function yt(e){return Array.isArray(e)?e.map(t=>String(t)).filter(t=>t.length>0):[]}function Br(e,t){let r=new Set(["action","args","author","cwd","fullChangedFields","id","options","path","query","reason","target"]),n={};for(let[a,i]of Object.entries(e))r.has(a)||(n[a]=i);let o={...n,...t};return delete o.args,delete o.author,o}function Ur(e,t){let r=q(t??{},{...t});return{changedFields:e.fullChangedFields===!0?"full":"compact",idOnly:e.idOnly===!0,runnerOptions:r}}function ae(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:Z(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 ne(e){if(typeof e=="string"&&e.trim().length>0)return e;if(Array.isArray(e))return yt(e)}function z(e){if(typeof e=="number"&&Number.isFinite(e)||typeof e=="string"&&e.trim().length>0)return e}function jr(e){let t=ne(e.kind),r=ne(e.exemptIsolate),n=ne(e.exemptIsolateType);return{...t===void 0?{}:{kind:t},maxDepth:z(e.maxDepth),limit:z(e.limit),after:c(e,"after"),direction:c(e,"direction"),maxPaths:z(e.maxPaths),sample:z(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 Ne(e){let t=_e(e);return e.ids!==void 0&&(t.ids=Z(e.ids)),t}function Gr(e){return{status:c(e,"filterStatus"),list:h(e.list)?Ne(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 mt=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 ve(e){let t={};for(let[r,n]of Object.entries(e))mt.has(r)||(t[r]=n);return Ee(t)}function Ee(e){return we(e,"update")}function we(e,t){let r=Re(e,t),n=Y[t],o=new Set([...n.parameters,...S].filter(({booleanish:a})=>a===!0).map(({param:a})=>a));for(let{keys:a}of n.repeatables)for(let i of a)typeof r[i]=="string"&&(r[i]=[r[i]]);for(let a of n.strings)for(let i of a.keys){let l=r[i];(typeof l=="number"&&Number.isFinite(l)||l===!1&&o.has(i))&&(r[i]=String(l))}return t==="create"?{...he(r,{requireType:!1})}:Ae(r)}function Vr(e){if(h(e.list)||h(e.update)){let t=h(e.update)?e.update:ve(e),r=q(e,Ee(t));return{status:u(e,"filterStatus"),list:h(e.list)?Ne(e.list):ae(e),update:ce(t,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}}return{status:u(e,"filterStatus"),list:ae(e),update:q(e,ve(e)),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 Oe(e){return"expectHash"in e||"expect_hash"in e}function Hr(e){if(!Oe(e)&&!(h(e.options)&&Oe(e.options)))return{expectHash:void 0,dispatchArgs:e};let{expectHash:t,expect_hash:r,...n}=e,o=h(n.options)?n.options:{},{expectHash:a,expect_hash:i,...l}=o,y=[t,r,a,i].filter(w=>w!==void 0),g=y.length>1?y.flatMap(w=>Array.isArray(w)?w:[w]):y[0],J=v(e,"options"in n?{...n,options:h(n.options)?v(n.options,l):n.options}:n);return{expectHash:g,dispatchArgs:J}}export{At as a,R as b,_t as c,vt as d,Ot as e,Ie as f,Fe as g,De as h,bt as i,xe as j,Rt as k,Nt as l,D as m,ee as n,Bt as o,Pe as p,Ut as q,Ge as r,K as s,wr as t,c as u,u as v,kr as w,h as x,Ir as y,Mr as z,Fr as A,Se as B,Re as C,Dr as D,Kr as E,xr as F,pt as G,Lr as H,Pr as I,yt as J,Br as K,Ur as L,ae as M,jr as N,Gr as O,Ee as P,Vr as Q,Hr as R};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{M as b,N as B,O as U,P as k,Q as j,R as G,S as I,X as M,a as oe,g as x,i as W,o as S,q as L,s as P}from"./chunk-NZQYHPUN.js";import{D as se,E as le,G as v,H as ce,V,ea as Z,na as de,o as F,p as X}from"./chunk-CUGJ2DY2.js";import{ja as O}from"./chunk-2SQUWQP3.js";import{A as p,z as f}from"./chunk-G6ERMFJ5.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]="202cbe4e-7d36-5b12-be9d-d35608a6b36d")}catch{}})();var ke=new Set(["none","null"]);function At(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 R(e){return e===void 0?!1:ke.has(e.trim().toLowerCase())}function _t(e,t,r){if(!R(e))return;let n=r?` ${r}`:"";throw new p(`${t} no longer accepts "none" or "null".${n}`.trim(),f.USAGE)}function vt(e,t,r){if(!e||e.length===0||X(e)||!e.some(o=>R(o)))return;let n=r?` ${r}`:"";throw new p(`${t} no longer accepts "none" or "null".${n}`.trim(),f.USAGE)}function Ot(e,t){for(let r of t){let n=e[r.optionKey];if(!Array.isArray(n)||n.length===0)continue;if(!n.every(a=>typeof a=="string"))throw new p(`${r.valueFlag} entries must be strings.`,f.USAGE);if(X(n))continue;let o=n;if(o.some(a=>R(a))){if(o.filter(a=>!R(a)).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}(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]="cfab194a-06fd-5536-9572-d33a34b94065")}catch{}})();var Ie=["close_reason","close-reason"],ue=[{canonical:"tags",aliases:["tags"],optionKey:"tags",metadataKey:"tags"}],fe=[{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"}],Me=[...ue,...fe],pe=[{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"}],Fe=[...Me,{canonical:"author",aliases:["author"],optionKey:"author",metadataKey:"author"},...pe],De=[...ue,{canonical:"close-reason",aliases:Ie,optionKey:"closeReason",metadataKey:"close_reason"},...fe,...pe],Ke=new Set(["none","null","-"]);function ye(e){return e==="create"?Fe:De}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 ye(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"&&Ke.has(e.trim().toLowerCase())}function bt(e,t,r,n){return r?ye(e).flatMap(o=>{let a=t[o.optionKey],i=n[o.metadataKey];return Q(a)&&(Q(i)||Array.isArray(i)&&i.some(Q))?[`literal_sentinel_stored:${o.canonical}:${a.trim()}`]:[]}):[]}function xe(e,t){return e.flatMap(r=>r.includes(",")&&t(r)?[r]:r.split(","))}function Rt(e){let t=new Set,r=new Set;if(!e.raw||e.raw.length===0)return{metadataKeys:t,optionKeys:r};let n=xe(e.raw,o=>e.resolveDefinition(o.trim().toLowerCase())!==void 0);for(let o of n){let a=o.trim().toLowerCase();if(!a)throw new p("--unset values must not be empty; name each field once, for example --unset parent,release",f.USAGE);if(R(a))throw new p('--unset no longer accepts "none" or "null". Specify concrete field names such as --unset deadline',f.USAGE);let i=e.resolveDefinition(a);if(!i)throw new p(`Unsupported --unset field "${o}". Supported fields: ${e.supportedFields}`,f.USAGE);t.add(i.metadataKey),r.add(i.optionKey)}return{metadataKeys:t,optionKeys:r}}function Nt(e,t,r){let n=e.trim().toLowerCase();if(!r)return;let o=r.command_to_fields?.get(t)??[];for(let a of o){if(a.allow_unset===!1)continue;let i=new Set;if(typeof a.key=="string"&&a.key.length>0&&i.add(a.key.toLowerCase()),typeof a.metadata_key=="string"&&a.metadata_key.length>0&&i.add(a.metadata_key.toLowerCase()),typeof a.cli_flag=="string"&&a.cli_flag.length>0&&(i.add(a.cli_flag.replaceAll("-","_").toLowerCase()),i.add(a.cli_flag.toLowerCase())),Array.isArray(a.cli_aliases))for(let l of a.cli_aliases)typeof l!="string"||l.length===0||(i.add(l.replaceAll("-","_").toLowerCase()),i.add(l.toLowerCase()));if(i.has(n))return{optionKey:a.key,metadataKey:a.metadata_key}}}(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]="837a5c2d-6447-5696-b0de-32641cde14cd")}catch{}})();var Le={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 N(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:[Le[e]]})}function D(e,t,r){typeof e!="string"&&N(t,r,"a string")}function ee(e,t){(e===null||typeof e!="object"||Array.isArray(e))&&N(t,"options","an object")}function me(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&&Pe(t.options))}function Bt(e){ee(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"&&N("append","force","a boolean")}function Pe(e){ee(e,"reopen");for(let t of M["item-reopen"].optional){let r=e[t];r!==void 0&&(O(Reflect.get(b,t)).type==="boolean"?typeof r!="boolean"&&N("reopen",t,"a boolean"):D(r,"reopen",t))}}function Be(e,t){return e?t?"a string or string array":"a string array":"a string"}function Ue(e,t,r,n,o,a){r===void 0||typeof r=="string"&&(!o||a)||n==="priority"&&typeof r=="number"&&Number.isFinite(r)||o&&Array.isArray(r)&&Array.from(r).every(i=>typeof i=="string")||N(e,t,Be(o,a))}function je(e,t,r){let n=e==="create"?L:P;for(let{param:o}of[...n,...S,{param:"force"}]){if(O(Reflect.get(b,o)).type!=="boolean")continue;let a=r.find(i=>i.keys.includes(o))?.keys??[o];for(let i of a)t[i]!==void 0&&typeof t[i]!="boolean"&&N(e,i,"a boolean")}}function te(e,t,r=!0,n=!1){let o=e==="create"?B:j;for(let{target:a,keys:i,repeatable:l}of o)if(O(Reflect.get(b,a)).type!=="boolean")for(let y of i){let g=n&&y!==a,J=l===!0&&(a!=="acceptanceCriteria"||g);Ue(e,y,t[y],a,J,r||g)}je(e,t,o)}function Ut(e,t){ee(t,e);let r=se(t),n=F(r);return n||H(e,r),te(e,r,!1,n),r}import{Option as lr}from"commander";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="201134b5-01e8-55ae-a099-137b9b6fae92")}catch{}})();function A(e,t,r){if(typeof r!="string")return;let n=r.trim();n.length!==0&&e.push(t,n)}function m(e,t,r){r===!0&&e.push(t)}function T(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 Ge(e,t){let r=["test",e,"--run","--json","--progress"];return T(r,"--add",t.add),T(r,"--add-json",t.addJson),T(r,"--remove",t.remove),T(r,"--remove-index",Array.isArray(t.removeIndex)?t.removeIndex.map(n=>typeof n=="number"?String(n):n):t.removeIndex),A(r,"--match",t.match),A(r,"--only-index",typeof t.onlyIndex=="number"?String(t.onlyIndex):t.onlyIndex),m(r,"--only-last",t.onlyLast),T(r,"--measure",t.measure),A(r,"--metric-below",t.metricBelow),A(r,"--metric-diff",t.metricDiff),Ve(r,t),A(r,"--author",t.author),A(r,"--message",t.message),m(r,"--force",t.force),r}function Ve(e,t){A(e,"--timeout",t.timeout),T(e,"--env-set",t.envSet),T(e,"--env-clear",t.envClear),m(e,"--shared-host-safe",t.sharedHostSafe),A(e,"--pm-context",t.pmContext),m(e,"--override-linked-pm-context",t.overrideLinkedPmContext),A(e,"--workspace-context",t.workspaceContext),m(e,"--override-linked-workspace-context",t.overrideLinkedWorkspaceContext),m(e,"--allow-untrusted-linked-tests",t.allowUntrustedLinkedTests),m(e,"--fail-on-context-mismatch",t.failOnContextMismatch),m(e,"--fail-on-skipped",t.failOnSkipped),m(e,"--fail-on-empty-test-run",t.failOnEmptyTestRun),m(e,"--require-assertions-for-pm",t.requireAssertionsForPm),m(e,"--check-context",t.checkContext),m(e,"--auto-pm-context",t.autoPmContext)}(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]="131c6816-18f9-5c50-ab4d-0ff380b513bc")}catch{}})();function ge(e,t){let r=[],n=new Set;for(let o of t.keys){if(!Object.hasOwn(e,o))continue;let a=e[o];if(a!=null){if(typeof a=="string"){r.push(a);continue}if(!Array.isArray(a)||!a.every(i=>typeof i=="string"))return;n.has(a)||(n.add(a),r.push(...a))}}return r.length>0?r.join("; "):void 0}function C(e,t){return e.find(r=>r.target===t)??{target:t,keys:[t]}}function s(e,t){return e[t]===!0?!0:void 0}function _(e,t){return e[t]===!1?!0:void 0}function $(e,t){return t.some(r=>e[r]===!0)?!0:void 0}function re(e,t){for(let[r,n]of Object.entries(t))r==="__proto__"||r==="constructor"||r==="prototype"||Object.hasOwn(e,r)||(e[r]=n)}function he(e,t={}){let r=i=>x(e,C(U,i)),n=i=>W(e,C(k,i)),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 a={title:r("title"),description:r("description"),type:o,template:r("template"),createMode:r("createMode"),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:ge(e,C(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:$(e,["allowMissingParent","allow_missing_parent"])===!0,allowUnresolvedDeps:$(e,["allowUnresolvedDeps","allow_unresolved_deps"])===!0,allowDuplicate:s(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:s(e,"clearDeps"),clearComments:s(e,"clearComments"),clearNotes:s(e,"clearNotes"),clearLearnings:s(e,"clearLearnings"),clearFiles:s(e,"clearFiles"),clearTests:s(e,"clearTests"),clearDocs:s(e,"clearDocs"),clearReminders:s(e,"clearReminders"),clearEvents:s(e,"clearEvents"),clearTypeOptions:s(e,"clearTypeOptions")};return re(a,e),v(e,a)}function Ae(e){let t=o=>x(e,C(G,o)),r=o=>W(e,C(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:ge(e,C(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:$(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:s(e,"replaceDeps"),replaceTests:s(e,"replaceTests"),replaceFiles:s(e,"replaceFiles"),replaceDocs:s(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:s(e,"clearDeps"),clearComments:s(e,"clearComments"),clearNotes:s(e,"clearNotes"),clearLearnings:s(e,"clearLearnings"),clearFiles:s(e,"clearFiles"),clearTests:s(e,"clearTests"),clearDocs:s(e,"clearDocs"),clearReminders:s(e,"clearReminders"),clearEvents:s(e,"clearEvents"),clearTypeOptions:s(e,"clearTypeOptions")};return re(n,e),v(e,n)}function d(e,t){let r=C(oe,t),n=x(e,r);if(n!==void 0)return n;for(let o of r.keys){let a=e[o];if(Array.isArray(a)){let i=a.filter(l=>typeof l=="string");if(i.length>0)return i.join(",")}if(t==="ids"&&typeof a=="string")return a;if(typeof a=="number"&&Number.isFinite(a))return String(a)}}function He(e){let t=s(e,"filterFilesMissing"),r=s(e,"filterDocsMissing");return{filterReviewerMissing:s(e,"filterReviewerMissing"),filterRiskMissing:s(e,"filterRiskMissing"),filterConfidenceMissing:s(e,"filterConfidenceMissing"),filterSprintMissing:s(e,"filterSprintMissing"),filterReleaseMissing:s(e,"filterReleaseMissing"),hasNotes:s(e,"hasNotes"),hasLearnings:s(e,"hasLearnings"),hasFiles:s(e,"hasFiles"),hasDocs:s(e,"hasDocs"),hasTests:s(e,"hasTests"),hasComments:s(e,"hasComments"),hasDeps:s(e,"hasDeps"),hasBody:s(e,"hasBody"),hasLinkedCommand:s(e,"hasLinkedCommand"),noNotes:_(e,"notes"),noLearnings:_(e,"learnings"),noFiles:_(e,"files")??t,filterFilesMissing:t,noDocs:_(e,"docs")??r,filterDocsMissing:r,noTests:_(e,"tests"),noComments:_(e,"comments"),noDeps:_(e,"deps"),emptyBody:s(e,"emptyBody"),noLinkedCommand:_(e,"linkedCommand")}}function _e(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:s(e,"today"),recent:s(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:_(e,"truncate"),includeBody:s(e,"includeBody"),strictRead:s(e,"strictRead"),compact:s(e,"compact"),brief:s(e,"brief"),full:s(e,"full"),fields:d(e,"fields"),sort:d(e,"sort"),order:d(e,"order"),tree:s(e,"tree"),treeDepth:d(e,"treeDepth"),filterAcMissing:s(e,"filterAcMissing"),filterEstimatesMissing:$(e,["filterEstimatesMissing","filterEstimateMissing"]),filterResolutionMissing:s(e,"filterResolutionMissing"),filterMetadataMissing:s(e,"filterMetadataMissing"),...He(e)};return re(t,e),t}(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]="70052a03-cde5-5d5c-822b-11f50378a9a1")}catch{}})();var $e=Symbol("pm.mcp-mutation-transport"),ze=new Set(["create","update","append"]),Y={create:{parameters:L,aliases:B,strings:U,repeatables:k},update:{parameters:P,aliases:j,strings:G,repeatables:I}},qe=new Set(["activity","aggregate","context","contracts","deps","files-discover","files-lookup","get","graph","health","history","history-attest","list","next","search","stats","telemetry","validate"]);function K(e){return $e in e}function q(e,t){return K(e)?le(t):v(e,t)}function wr(e,t,r=[]){let n=v(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 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 kr(e,t){let r=e[t];return typeof r=="string"?r:typeof r=="number"&&Number.isFinite(r)?String(r):void 0}function h(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Ir(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 Mr(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 Fr(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:u(e,"outputLimit"),outputBudget:u(e,"outputBudget"),outputSession:c(e,"outputSession"),outputCursor:c(e,"outputCursor"),outputFormat:t==="json"||t==="toon"?t:void 0}}var Te=new Set(["tags","blockedBy","blocked_by","skills","fields"]),Ce=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"]),Ye=new Set([...Ce].filter(e=>e!=="file")),Je=new Set(["files","files-discover","docs","test","test-all"]),ie=new Set(["comments","notes","learnings"]);function We(e,t){if(!(!ie.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 Xe=new Set(["claim","release","start-task","pause-task","close-task"]),Se={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"],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"]},Ze=new Set(["context","get","list","next","search","comments","notes","learnings","files","docs","test"]),Qe=new Set(["query","keywords","id","text"]);function et(e){return Ze.has(e)?M[e].optional.filter(t=>!Qe.has(t)):[]}var tt=new Set(["comments","notes","learnings","files","docs","test"]);function rt(e,t){if(!tt.has(e??""))return t;let r={...t};for(let n of M[e].optional){let o=n.replace(/[A-Z]/gu,a=>`_${a.toLowerCase()}`);o===n||r[o]===void 0||(r[n]??=r[o],delete r[o])}return r}function nt(e,t,r){if(!ie.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 i=e.replace(/s$/u,"");throw new p(`Specify ${i} text either as text or with add, not both.`,f.USAGE,{code:"annotation_text_source_conflict",field:"text",required:`Pass the ${i} text once: text and add are the same source.`})}let a={...n,add:o};return delete a.text,a}function at(e,t){let r=t.replace(/[A-Z]/gu,n=>`_${n.toLowerCase()}`);return e[t]!==void 0||e[r]!==void 0}function it(e){return[...Se[e]??[],...et(e),...be]}var be=["outputInclude","outputLimit","outputBudget","outputFormat","outputSession","outputCursor"];function Re(e,t=""){let r={},n=Je.has(t),o=t==="files"||t==="files-discover"||t==="docs",a=ie.has(t)?Ye:Ce;for(let[i,l]of Object.entries(e)){if(Array.isArray(l)&&Te.has(i)){r[i]=l.join(",");continue}if(i==="note"&&o){r[i]=l;continue}if(typeof l=="string"&&a.has(i)){r[i]=[l];continue}if(typeof l=="string"&&n&&(i==="add"||i==="remove")){r[i]=[l];continue}r[i]=l}return Object.assign(r,Object.fromEntries(Object.getOwnPropertySymbols(e).map(i=>[i,Reflect.get(e,i)]))),r}function ot(e,t,r){let n=c(e,"author");return n!==void 0?n:r!==void 0&&Xe.has(r)?c(e,"assignee")??c(t,"assignee"):void 0}function st(e,t){return t!==void 0&&e.author===void 0?{...e,author:t}:e}function lt(e,t,r){let n={},o=Y[e],a=new Set([...o.parameters.map(({param:i})=>i),...S.map(({param:i})=>i),...Se[e],...be,"force"]);for(let i of a){let l=o.aliases.find(y=>y.keys.includes(i))?.keys??[i];t[i]===void 0||l.some(y=>r[y]!==void 0)||(n[i]=t[i])}return n}function E(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 ct(e,t,r){let n=Y[e],o=[...n.parameters,...S,{param:"force"}];for(let{param:a}of o){if(O(b[a]).type!=="boolean")continue;let i=(n.aliases.find(l=>l.keys.includes(a))?.keys??[a]).find(l=>r[l]!==void 0&&typeof r[l]!="boolean");i!==void 0&&E(e,i)}for(let a of["idOnly","fullChangedFields"])t[a]!==void 0&&typeof t[a]!="boolean"&&E(e,a)}function dt(e,t,r){t.options!==void 0&&!h(t.options)&&E(e,"options"),ct(e,t,r);for(let i of Te){let l=r[i];Array.isArray(l)&&l.some(y=>typeof y!="string")&&E(e,i)}let n=we(r,e),o=Y[e];for(let{keys:i,target:l}of o.strings)i.some(y=>r[y]!==void 0)&&n[l]===void 0&&E(e,l);let a=o.repeatables.flatMap(({keys:i})=>i).find(i=>{let l=r[i];return l!==void 0&&typeof l!="string"&&(!Array.isArray(l)||l.some(y=>typeof y!="string"))});return a!==void 0&&E(e,a),n}function ut(e,t,r,n){let o=(t==="create"||t==="update")&&K(e),a={...o?lt(t,e,n):r,...n};if((t==="create"||t==="update")&&!o){let i=h(e.options)&&F(e.options);i||H(t,a),te(t,a,!0,i)}return o?dt(t,e,a):Re(a,t)}function ft(e,t){return!ze.has(e??"")||F(t)?t:de(t)}function Dr(e,t){me(t,e);let r=h(e.options)?e.options:void 0,n=O(e.options),o={},a=g=>{at(n,g)||e[g]===void 0||(o[g]=e[g])};for(let g of it(t??""))a(g);t!==void 0&&K(e)&&We(t,n);let i=nt(t,e,rt(t,ut(e,t,o,n)));if(t==="history-attest"&&K(e)&&(i.output!==void 0||typeof i.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 l=K(e)?e:r??e,y=q(l,st(i,ot(e,i,t)));return ft(t,y)}function Kr(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 xr(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 pt(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 Lr(e){return!qe.has(pt(e))}function Pr(e){return e.trim().toLowerCase().split(/\s+/).filter(Boolean).join(" ")}function yt(e){return Array.isArray(e)?e.map(t=>String(t)).filter(t=>t.length>0):[]}function Br(e,t){let r=new Set(["action","args","author","cwd","fullChangedFields","id","options","path","query","reason","target"]),n={};for(let[a,i]of Object.entries(e))r.has(a)||(n[a]=i);let o={...n,...t};return delete o.args,delete o.author,o}function Ur(e,t){let r=q(t??{},{...t});return{changedFields:e.fullChangedFields===!0?"full":"compact",idOnly:e.idOnly===!0,runnerOptions:r}}function ae(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:Z(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 ne(e){if(typeof e=="string"&&e.trim().length>0)return e;if(Array.isArray(e))return yt(e)}function z(e){if(typeof e=="number"&&Number.isFinite(e)||typeof e=="string"&&e.trim().length>0)return e}function jr(e){let t=ne(e.kind),r=ne(e.exemptIsolate),n=ne(e.exemptIsolateType);return{...t===void 0?{}:{kind:t},maxDepth:z(e.maxDepth),limit:z(e.limit),after:c(e,"after"),direction:c(e,"direction"),maxPaths:z(e.maxPaths),sample:z(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 Ne(e){let t=_e(e);return e.ids!==void 0&&(t.ids=Z(e.ids)),t}function Gr(e){return{status:c(e,"filterStatus"),list:h(e.list)?Ne(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 mt=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 ve(e){let t={};for(let[r,n]of Object.entries(e))mt.has(r)||(t[r]=n);return Ee(t)}function Ee(e){return we(e,"update")}function we(e,t){let r=Re(e,t),n=Y[t],o=new Set([...n.parameters,...S].filter(({booleanish:a})=>a===!0).map(({param:a})=>a));for(let{keys:a}of n.repeatables)for(let i of a)typeof r[i]=="string"&&(r[i]=[r[i]]);for(let a of n.strings)for(let i of a.keys){let l=r[i];(typeof l=="number"&&Number.isFinite(l)||l===!1&&o.has(i))&&(r[i]=String(l))}return t==="create"?{...he(r,{requireType:!1})}:Ae(r)}function Vr(e){if(h(e.list)||h(e.update)){let t=h(e.update)?e.update:ve(e),r=q(e,Ee(t));return{status:u(e,"filterStatus"),list:h(e.list)?Ne(e.list):ae(e),update:ce(t,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}}return{status:u(e,"filterStatus"),list:ae(e),update:q(e,ve(e)),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 Oe(e){return"expectHash"in e||"expect_hash"in e}function Hr(e){if(!Oe(e)&&!(h(e.options)&&Oe(e.options)))return{expectHash:void 0,dispatchArgs:e};let{expectHash:t,expect_hash:r,...n}=e,o=h(n.options)?n.options:{},{expectHash:a,expect_hash:i,...l}=o,y=[t,r,a,i].filter(w=>w!==void 0),g=y.length>1?y.flatMap(w=>Array.isArray(w)?w:[w]):y[0],J=v(e,"options"in n?{...n,options:h(n.options)?v(n.options,l):n.options}:n);return{expectHash:g,dispatchArgs:J}}export{At as a,R as b,_t as c,vt as d,Ot as e,Ie as f,Fe as g,De as h,bt as i,xe as j,Rt as k,Nt as l,D as m,ee as n,Bt as o,Pe as p,Ut as q,Ge as r,K as s,wr as t,c as u,u as v,kr as w,h as x,Ir as y,Mr as z,Fr as A,Se as B,Re as C,Dr as D,Kr as E,xr as F,pt as G,Lr as H,Pr as I,yt as J,Br as K,Ur as L,ae as M,jr as N,Gr as O,Ee as P,Vr as Q,Hr as R};
|
|
2
|
+
//# sourceMappingURL=chunk-LDMBNTOG.js.map
|