@unbrained/pm-cli 2026.11.23 → 2026.11.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/dist/cli/error-guidance.js +5 -5
- package/dist/cli/main.js +5 -5
- package/dist/cli/register-annotations.js +1 -1
- package/dist/cli/runtime/invocation-options.js +1 -1
- package/dist/cli-bundle/bundle-manifest.json +1 -1
- package/dist/cli-bundle/chunks/chunk-4FZH5BTV.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-YYT3MIRF.js → chunk-6OIHST4I.js} +1 -1
- package/dist/cli-bundle/chunks/chunk-7EPYCU7U.js +9 -0
- package/dist/cli-bundle/chunks/{chunk-AEOHUSUI.js → chunk-BVJMVU4Z.js} +68 -68
- package/dist/cli-bundle/chunks/{chunk-2UQU7HRR.js → chunk-C4KIZQHW.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-CNUFU454.js +113 -0
- package/dist/cli-bundle/chunks/chunk-CONBVY2O.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-BSRIVYTM.js → chunk-CZEMEPPQ.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-DF6A7C32.js +2 -0
- package/dist/cli-bundle/chunks/chunk-FHLOGAGA.js +8 -0
- package/dist/cli-bundle/chunks/chunk-FVY7U3SU.js +125 -0
- package/dist/cli-bundle/chunks/{chunk-F2Z6XLZB.js → chunk-GBVF2ZB3.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-GZI7ZAB7.js +2 -0
- package/dist/cli-bundle/chunks/chunk-HZZLSBIJ.js +2 -0
- package/dist/cli-bundle/chunks/chunk-K34FR5CO.js +3 -0
- package/dist/cli-bundle/chunks/{chunk-D6PDUKUG.js → chunk-KHFUHGL3.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-L6VS7F3R.js +2 -0
- package/dist/cli-bundle/chunks/chunk-LOX3VY4T.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-H7JEXRIN.js → chunk-LPW7S5KA.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-5DUP4AZA.js → chunk-MGJMQSN4.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-OS5W4ZG2.js +31 -0
- package/dist/cli-bundle/chunks/{chunk-O7JHS64G.js → chunk-OWK2JL4I.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-SCIPT7WF.js +2 -0
- package/dist/cli-bundle/chunks/chunk-SX76UGEY.js +3 -0
- package/dist/cli-bundle/chunks/{chunk-CFWLQFJM.js → chunk-VA4T37Q4.js} +50 -51
- package/dist/cli-bundle/chunks/chunk-WQOEVGLQ.js +2 -0
- package/dist/cli-bundle/chunks/chunk-XHCIOLJP.js +3 -0
- package/dist/cli-bundle/chunks/{chunk-J2PDAVBC.js → chunk-XKWJONAO.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-YIGBEY7K.js +2 -0
- package/dist/cli-bundle/chunks/chunk-ZBOQEZ2H.js +33 -0
- package/dist/cli-bundle/chunks/chunk-ZLICQPRG.js +3 -0
- package/dist/cli-bundle/chunks/field-option-collisions-QE65APSD.js +2 -0
- package/dist/cli-bundle/chunks/{indexed-receipt-blobs-BPYKN5Q7.js → indexed-receipt-blobs-H3MMNXXG.js} +2 -2
- package/dist/cli-bundle/{focused-chunks/item-revision-YDACCDVY.js → chunks/item-revision-INDHJV6X.js} +2 -2
- package/dist/cli-bundle/chunks/item-transaction-LCKK4XXB.js +2 -0
- package/dist/cli-bundle/chunks/mutation-actor-KU7BMLUN.js +2 -0
- package/dist/cli-bundle/chunks/mutation-admission-3OMCTQD4.js +2 -0
- package/dist/cli-bundle/chunks/{register-list-query-L4IBU64P.js → register-list-query-3GV3LBOT.js} +2 -2
- package/dist/cli-bundle/chunks/register-mutation-GZLF47SX.js +21 -0
- package/dist/cli-bundle/chunks/register-operations-PBJZGCAL.js +2 -0
- package/dist/cli-bundle/chunks/register-setup-ZLJEF6NZ.js +2 -0
- package/dist/cli-bundle/chunks/runtime-schema-Y4SHTEXL.js +2 -0
- package/dist/cli-bundle/chunks/{settlement-hook-6MR32OOC.js → settlement-hook-ESAAEBRM.js} +2 -2
- package/dist/cli-bundle/chunks/stage-3WIZBD4N.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-3Y5PTQ2F.js +27 -0
- package/dist/cli-bundle/focused-chunks/{chunk-Y2ESLKCF.js → chunk-4LQL4EO6.js} +3 -3
- package/dist/cli-bundle/focused-chunks/{chunk-RIE3SJSE.js → chunk-4SX2BN4V.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-ZHWPCVQL.js → chunk-5RBC4WSE.js} +39 -39
- package/dist/cli-bundle/focused-chunks/chunk-7SSGTGZO.js +91 -0
- package/dist/cli-bundle/focused-chunks/chunk-A4R57E4K.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-BOIMP2AR.js +5 -0
- package/dist/cli-bundle/focused-chunks/chunk-BYQK5DGH.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-C3FEDTSD.js +44 -0
- package/dist/cli-bundle/focused-chunks/chunk-IAOKVKWW.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-JOKRDFMQ.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-MB56Y4M6.js +8 -0
- package/dist/cli-bundle/focused-chunks/{chunk-A6VEMCRR.js → chunk-NGFDPEP7.js} +1 -1
- package/dist/cli-bundle/focused-chunks/chunk-OCKKIECS.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-PKX2EHE3.js +26 -0
- package/dist/cli-bundle/focused-chunks/chunk-SXC2EO3E.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-TQIKDFOD.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-TRL4JDWX.js +8 -0
- package/dist/cli-bundle/focused-chunks/{chunk-IROZDIDX.js → chunk-UWWAVXG4.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-VMYVN36N.js +13 -0
- package/dist/cli-bundle/focused-chunks/chunk-VU2PH4PF.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-WL2R7T5G.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-WVA5KOXF.js +3 -0
- package/dist/cli-bundle/focused-chunks/{chunk-QQIIMMFU.js → chunk-X4EWD6TL.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-XKLBTDJ7.js +100 -0
- package/dist/cli-bundle/focused-chunks/chunk-YYEWIKNI.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-ZLRRII55.js +2 -0
- package/dist/cli-bundle/focused-chunks/field-option-collisions-5ROXGUME.js +2 -0
- package/dist/cli-bundle/focused-chunks/{indexed-receipt-blobs-EGEJMG3G.js → indexed-receipt-blobs-PG2VJ3MB.js} +2 -2
- package/dist/cli-bundle/focused-chunks/item-revision-KYMSQVZE.js +2 -0
- package/dist/cli-bundle/focused-chunks/item-transaction-I4HLVHEJ.js +2 -0
- package/dist/cli-bundle/focused-chunks/mutation-actor-GGOQKAE6.js +2 -0
- package/dist/cli-bundle/focused-chunks/mutation-admission-OS36ZCMH.js +2 -0
- package/dist/cli-bundle/focused-chunks/runtime-schema-YXPYDD2C.js +2 -0
- package/dist/cli-bundle/focused-chunks/{settlement-hook-FMLGKG7J.js → settlement-hook-4MGRERCT.js} +2 -2
- package/dist/cli-bundle/focused-chunks/stage-4ZFWJUKO.js +2 -0
- 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 +63 -63
- 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 +12 -12
- package/dist/core/profile/profile-lint.d.ts +1 -1
- package/dist/core/profile/profile-lint.js +1 -1
- package/dist/core/schema/fields-file.js +2 -2
- package/dist/core/schema/runtime-field-values.js +1 -1
- package/dist/core/schema/runtime-schema.d.ts +2 -0
- package/dist/core/schema/runtime-schema.js +1 -1
- package/dist/core/shared/command-line.d.ts +54 -4
- package/dist/core/shared/command-line.js +1 -1
- package/dist/core/shared/errors.d.ts +9 -0
- package/dist/core/shared/secret-rules.js +5 -5
- package/dist/core/shared/url-credentials.d.ts +16 -3
- package/dist/core/shared/url-credentials.js +1 -1
- package/dist/core/store/item-store.d.ts +26 -4
- package/dist/core/store/item-store.js +1 -1
- package/dist/sdk/command-line.d.ts +1 -1
- package/dist/sdk/command-line.js +1 -1
- package/dist/sdk/context-intent-contracts.js +1 -1
- package/dist/sdk/extension/command-options.d.ts +26 -1
- package/dist/sdk/extension/command-options.js +1 -1
- package/dist/sdk/extension-command-context.js +2 -2
- 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/governance/tracked-runtime-cache.js +1 -1
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/lifecycle/claim.d.ts +21 -1
- package/dist/sdk/lifecycle/claim.js +1 -1
- package/dist/sdk/lifecycle/task-composition.js +1 -1
- package/dist/sdk/ownership-source.d.ts +15 -1
- package/dist/sdk/ownership-source.js +1 -1
- package/dist/sdk/public-surface.json +1 -1
- package/dist/sdk/read-output-contracts.d.ts +11 -0
- package/dist/sdk/read-output-contracts.js +1 -1
- package/dist/sdk/runtime-primitives.d.ts +1 -1
- package/dist/sdk/schema/field-flag-spelling.d.ts +22 -0
- package/dist/sdk/schema/field-flag-spelling.js +2 -0
- package/dist/sdk/schema/field-option-collisions.js +1 -1
- package/docs/AGENT_GUIDE.md +2 -2
- package/docs/COMMANDS.md +1 -1
- package/docs/CONFIGURATION.md +1 -0
- package/docs/EXTENSIONS.md +1 -1
- package/docs/MUTATION_INTEGRITY.md +97 -8
- package/docs/READ_OUTPUT_CONTRACTS.md +2 -0
- package/docs/SDK.md +60 -4
- package/docs/SDK_AUDITED_MUTATIONS.md +11 -0
- package/docs/WORKSPACE_POSITION_AND_LIFECYCLE.md +17 -4
- 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-5WZZ5XEN.js +0 -3
- package/dist/cli-bundle/chunks/chunk-6MYJLOSG.js +0 -2
- package/dist/cli-bundle/chunks/chunk-ENKXRSFZ.js +0 -31
- package/dist/cli-bundle/chunks/chunk-FJOEL75F.js +0 -2
- package/dist/cli-bundle/chunks/chunk-GDXCAC52.js +0 -2
- package/dist/cli-bundle/chunks/chunk-KE7HMBEW.js +0 -2
- package/dist/cli-bundle/chunks/chunk-KZHIBEJL.js +0 -33
- package/dist/cli-bundle/chunks/chunk-NGJ5ERBF.js +0 -115
- package/dist/cli-bundle/chunks/chunk-NQ54T7T2.js +0 -2
- package/dist/cli-bundle/chunks/chunk-OKEZF7HU.js +0 -2
- package/dist/cli-bundle/chunks/chunk-OKIKF4FD.js +0 -2
- package/dist/cli-bundle/chunks/chunk-OPJF254V.js +0 -9
- package/dist/cli-bundle/chunks/chunk-RWA5YZ5X.js +0 -2
- package/dist/cli-bundle/chunks/chunk-S32NGRQM.js +0 -2
- package/dist/cli-bundle/chunks/chunk-TZY5MVJF.js +0 -125
- package/dist/cli-bundle/chunks/chunk-ZPS4B6SI.js +0 -8
- package/dist/cli-bundle/chunks/item-revision-FMD4KWBB.js +0 -2
- package/dist/cli-bundle/chunks/item-transaction-SEHTH7N2.js +0 -2
- package/dist/cli-bundle/chunks/mutation-actor-SFGYIRPW.js +0 -2
- package/dist/cli-bundle/chunks/mutation-admission-57LBSKQI.js +0 -2
- package/dist/cli-bundle/chunks/register-mutation-6NUOPHZ3.js +0 -21
- package/dist/cli-bundle/chunks/register-operations-JGYVORNN.js +0 -2
- package/dist/cli-bundle/chunks/register-setup-C44SIXEH.js +0 -2
- package/dist/cli-bundle/chunks/stage-PQ7AB63N.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-6LKTEKHS.js +0 -6
- package/dist/cli-bundle/focused-chunks/chunk-6LPXMFLM.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-HMDQDRV2.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-I66IKYKP.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-IR2J3NOT.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-ITKDHSBR.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-LQYYPXUK.js +0 -26
- package/dist/cli-bundle/focused-chunks/chunk-NQTEE66P.js +0 -13
- package/dist/cli-bundle/focused-chunks/chunk-O7Z73ALG.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-OTMMOKPM.js +0 -91
- package/dist/cli-bundle/focused-chunks/chunk-OXOCZJC6.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-QLAHEDT6.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-TD544C74.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-UFTUNBMY.js +0 -27
- package/dist/cli-bundle/focused-chunks/chunk-XRS3VNC6.js +0 -44
- package/dist/cli-bundle/focused-chunks/chunk-XYPEZGTR.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-YSJKQLFR.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-Z2X7HH3C.js +0 -102
- package/dist/cli-bundle/focused-chunks/item-transaction-UKEQCTKB.js +0 -2
- package/dist/cli-bundle/focused-chunks/mutation-actor-AS465LRX.js +0 -2
- package/dist/cli-bundle/focused-chunks/mutation-admission-E5UHJZFE.js +0 -2
- package/dist/cli-bundle/focused-chunks/stage-36J7YLGI.js +0 -2
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Ab as Q,Bb as ee,Hb as O,Jb as k,Kc as te,Lb as v,Lc as ne,Nc as re,jc as T,oc as R,wb as x,xb as J,yb as Z,zb as C}from"./chunk-OPJF254V.js";import{L as I,b as S,ba as D,c as L,s as H,t as q,ta as X,v as A,w as W}from"./chunk-TZY5MVJF.js";import{Sb as _}from"./chunk-NGJ5ERBF.js";import{A as f,C as d}from"./chunk-YYT3MIRF.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"],package:["dryRun","offline"],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-FJOEL75F.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{l as _,m as R,n as T}from"./chunk-AEOHUSUI.js";import{m as F,n as O}from"./chunk-ENKXRSFZ.js";import{Cc as x,Gc as s,Hc as m,Xc as h}from"./chunk-OPJF254V.js";import{lb as p,lh as v,mh as S}from"./chunk-NGJ5ERBF.js";import{A as l,C as u}from"./chunk-YYT3MIRF.js";function g(t,n,e,i){if(n.trim().toLowerCase()!=="add"||!e?.trim())return;let d=s(i,"add")??s(i,"text")??s(i,"note")??s(i,"body")??s(i,"comment"),r=s(i,"file"),o=[t,e.trim()];d!==void 0?o.push("--add",d):i.stdin===!0?o.push("--stdin"):r!==void 0?o.push("--file",r):o.push("--add","-");let a=p(o),f=p([t,e.trim(),"--add","-"]);throw new u(`The positional token "add" was parsed as the item id, while "${e.trim()}" was parsed as annotation text. ${t} does not use an add subcommand.`,l.USAGE,{code:"annotation_transposed_subcommand",reason:"noun_verb_object_transposition",required:`Place the item id immediately after ${t}, then use --add for annotation text.`,examples:[...new Set([a,f])],recovery:{attempted_command:`pm ${t} add ${e.trim()}`,normalized_args:[t,"add",e.trim()],parsed_positionals:[{role:"transposed_subcommand",value:"add"},{role:"item_id",value:e.trim()}],suggested_retry:a}})}var N={comments:["add","text","body","comment"],notes:["add","text","note"],learnings:["add","text"]};function E(t,n,e,i,d){let r=N[t].some(a=>`--${a}`!==n&&s(d,a)!==void 0),o=d.delete!==void 0||d.edit!==void 0&&d.ifAbsent===!0;if(!(r||o||d.stdin===!0||s(d,"file")!==void 0||s(d,"addJson")!==void 0)){if(e==="--file")return i===void 0?void 0:["--file",i];if(e==="--stdin"||e.startsWith("--file="))return i===void 0?[e]:void 0}}function y(t,n,e,i){let d=N[t].map(a=>({flag:`--${a}`,value:s(i,a)?.trim()})).find(a=>a.value!==void 0&&F(a.value));if(d===void 0)return;let r=[t,n,...typeof i.edit=="number"?["--edit",String(i.edit)]:[]],o=E(t,d.flag,d.value,e,i);throw O({collectionKey:t,textFlag:d.flag,value:d.value,commandPrefix:p(r),...o===void 0?{}:{retryArgs:[...r,...o]},...o===void 0&&e!==void 0&&d.value!=="--file"?{conflictingOperand:e}:{}})}function M(t,n,e){let i=e.flatMap(r=>{let o=s(n,r);return o===void 0?[]:[{alias:r,value:o}]});if([...new Set(i.map(({value:r})=>r))].length>1)throw new u(`Specify ${t} text with one alias or the same value across aliases: ${i.map(({alias:r})=>`--${r}`).join(", ")}`,l.USAGE,{code:"annotation_alias_conflict"});return i[0]?.value}function $(t,n){let e=typeof n.edit=="number"?n.edit:void 0,i=typeof n.delete=="number"?n.delete:void 0,d=M("comment",n,["add","text","body","comment"]),r=typeof t=="string"?t:void 0,o=n.stdin===!0,a=s(n,"file");if(+(d!==void 0)+ +(r!==void 0)+Number(o)+ +(a!==void 0)>1)throw d!==void 0&&r!==void 0&&!o&&a===void 0?new u("Specify comment text either as positional [text] or with --add, not both",l.USAGE):new u("Specify comment text with exactly one source: positional [text], --add, --stdin, or --file",l.USAGE);let c=d??r;return{add:c,readFromStdin:o,readFromFile:a,editIndex:e,deleteIndex:i,isMutation:typeof c=="string"||o||a!==void 0||e!==void 0||i!==void 0}}function C(t,n,e){let i=M(t,e,t==="note"?["add","text","note"]:["add","text"]),d=typeof n=="string"?n:void 0;if(i!==void 0&&d!==void 0)throw new u(`Specify ${t} text either as positional [text] or with --add, not both`,l.USAGE);let r=i??d,o=t==="note"?s(e,"addJson"):void 0,a=e.stdin===!0,f=s(e,"file"),c=typeof e.edit=="number"?e.edit:void 0,b=typeof e.delete=="number"?e.delete:void 0;return{add:r,addJson:o,readFromStdin:a,readFromFile:f,editIndex:c,deleteIndex:b,isMutation:typeof r=="string"||o!==void 0||a||f!==void 0||c!==void 0||b!==void 0}}var D=new Set(["comments","notes","learnings"]);function Y(t,n){let e=n[1];return D.has(t)&&typeof e=="string"?{add:e}:{}}function A(t){return{fullHistory:t.fullHistory===!0,ifAbsent:t.ifAbsent===!0,expectAt:s(t,"expectAt"),author:s(t,"author"),message:s(t,"message"),ownershipAppendBypass:t.ownershipAppendBypass===!0,force:!!t.force}}async function H(t,n,e,i){let d=x(i),r=Date.now();g("comments",t,n,e),y("comments",t,n,e);let o=$(n,e),a=await _(t,{add:o.add,stdin:o.readFromStdin,file:o.readFromFile,edit:o.editIndex,delete:o.deleteIndex,limit:s(e,"limit"),...A(e)},d);o.isMutation&&a.changed!==!1&&await h(d,a),w("comments",a,d,r)}async function J(t,n,e,i){let d=x(i),r=Date.now();g("notes",t,n,e),y("notes",t,n,e);let o=C("note",n,e),a=await T(t,{add:o.add,addJson:o.addJson,stdin:o.readFromStdin,file:o.readFromFile,edit:o.editIndex,delete:o.deleteIndex,limit:s(e,"limit"),since:s(e,"since"),eventType:s(e,"eventType"),includeMeta:e.includeMeta===!0,...A(e)},d);o.isMutation&&a.changed!==!1&&await h(d,a),w("notes",a,d,r)}async function L(t,n,e,i){let d=x(i),r=Date.now();g("learnings",t,n,e),y("learnings",t,n,e);let o=C("learning",n,e),a=await R(t,{add:o.add,stdin:o.readFromStdin,file:o.readFromFile,edit:o.editIndex,delete:o.deleteIndex,limit:s(e,"limit"),...A(e)},d);o.isMutation&&a.changed!==!1&&await h(d,a),w("learnings",a,d,r)}function w(t,n,e,i){v(n,e),e.profile&&S(`profile:command=${t} took_ms=${Date.now()-i}`)}function Z(t,n){let e=t.command("comments").argument("<id>","Item id").argument("[text]","Optional comment text shorthand (equivalent to --add)").option("--add <text>","Append comment text; use text=<value> for structured input or - for stdin").option("--stdin","Read comment text from stdin (supports multiline markdown)").option("--file <path>","Read comment text from a file or stdin (-)").option("--edit <index>","Replace one comment using positional text, --add, --stdin, or --file",n("--edit")).option("--delete <index>","Delete the comment at 1-based <index>",n("--delete")).option("--expect-at <ts>","Edit/delete only if the entry's created_at is <ts>").option("--limit <n>","Return only latest n comments").option("--full-history","Return complete comment history instead of a bounded mutation receipt").option("--if-absent","Append only when resolved author and text are absent").option("--author [value]","Comment author; defaults to PM_AUTHOR or settings").option("--message <value>","History message").option("--force","Force ownership override").description("List, add, edit, or delete comments for an item.").action(H);m(e,"--body <text>","Alias for --add",!1),m(e,"--text <text>","Alias for --add",!1),m(e,"--comment <text>","Alias for --add",!1);let i=t.command("notes").argument("<id>","Item id").argument("[text]","Optional note text shorthand for --add").option("--add <text>","Add a text note (- reads stdin)").option("--note <text>","Alias for --add").option("--add-json <json>","Append a JSON event").option("--stdin","Read note text from stdin").option("--file <path>","Read note from file or stdin (-)").option("--edit <index>","Replace a 1-based note using the selected text input",n("--edit")).option("--delete <index>","Delete the note at 1-based <index>",n("--delete")).option("--expect-at <ts>","Edit/delete only if the entry's created_at is <ts>").option("--limit <n>","Return only latest n notes").option("--since <timestamp>","Filter JSON events from this ISO time").option("--event-type <value>","Filter JSON events by top-level type").option("--include-meta","Include count and truncation metadata").option("--full-history","Return complete note history instead of a bounded receipt").option("--if-absent","Append only when resolved author and text are absent").option("--author [value]","Author; defaults to PM_AUTHOR/settings").option("--message <value>","History message").option("--force","Force ownership override").description("Manage merge-safe text notes and JSON context events.").action(J);m(i,"--text <text>","Alias for --add",!1);let d=t.command("learnings").argument("<id>","Item id").argument("[text]","Optional learning text shorthand for --add").option("--add <text>","Append learning text; use text=<value> or - for stdin").option("--stdin","Read learning text from stdin").option("--file <path>","Read learning text from a file or stdin (-)").option("--edit <index>","Replace one learning using positional text, --add, --stdin, or --file",n("--edit")).option("--delete <index>","Delete the learning at 1-based <index>",n("--delete")).option("--expect-at <ts>","Edit/delete only if the entry's created_at is <ts>").option("--limit <n>","Return only latest n learnings").option("--full-history","Return complete learning history instead of a bounded receipt").option("--if-absent","Append only when resolved author and text are absent").option("--author [value]","Learning author (optional; falls back to PM_AUTHOR/settings)").option("--message <value>","History message").option("--force","Force ownership override").description("List, add, edit, or delete learnings for an item.").action(L);m(d,"--text <text>","Alias for --add",!1)}var I=[];function te(t){I=t.flatMap(n=>n.reason==="bare_key_value"&&typeof n.from=="string"&&Array.isArray(n.to)&&typeof n.to[0]=="string"?[{from:n.from,flag:n.to[0].split("=")[0]}]:[])}function ne(){return I}export{Y as a,Z as b,te as c,ne as d};
|
|
2
|
-
//# sourceMappingURL=chunk-GDXCAC52.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as T,b as M,f,i as _,j as R,l as E}from"./chunk-OKIKF4FD.js";import{v as g}from"./chunk-2UQU7HRR.js";import{Fc as l,Gc as I}from"./chunk-NGJ5ERBF.js";import{A as u,C as p}from"./chunk-YYT3MIRF.js";async function pe(e){let{plan:t}=e,i=await E({pmRoot:e.pmRoot,author:e.author,transactionId:t.transaction_id,mutations:t.mutations}),a=new Map(i.warnings.map(r=>[r.index,r.warnings])),o=t.rows.map(r=>{let n={...r};delete n.warnings;let c=a.get(r.index);return c!==void 0&&(n.warnings=c),n});return{validation:i,rows:o}}async function le(e){let t=e.upsertKey?.trim();if(t!==void 0&&t.length===0)throw new p("Upsert key must be a non-empty field name.",u.USAGE);let i=e.settings??await g(e.pmRoot),a=e.transactionId?.trim()??"",o=a.length>0?a:M(e.input),r=await _(e.pmRoot,i),n=l(r.schema).definitions,d=(n.find(m=>m.metadata_key===t)??n.find(m=>m.key===t||I(m)===t))?.metadata_key??T(t),s=d===void 0?void 0:{key:d,existing:await R(e.pmRoot,i,r,d)};return{...f(e.input,{transactionId:o,idPrefix:i.id_prefix,runtimeFields:n,...s===void 0?{}:{upsert:s}}),transaction_id:o,transaction_id_source:a.length>0?"explicit":"derived",...s===void 0?{}:{upsert_key:s.key}}}export{pe as a,le as b};
|
|
2
|
-
//# sourceMappingURL=chunk-KE7HMBEW.js.map
|