@unbrained/pm-cli 2026.11.10 → 2026.11.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +12 -0
  3. package/dist/cli/commander-usage.js +2 -2
  4. package/dist/cli/error-guidance.js +3 -3
  5. package/dist/cli/help-json-payload.js +1 -1
  6. package/dist/cli/main.js +4 -4
  7. package/dist/cli/runtime/refusal-credential-redaction.js +2 -0
  8. package/dist/cli-bundle/bundle-manifest.json +1 -1
  9. package/dist/cli-bundle/chunks/{chunk-NNE63MSM.js → chunk-4RHXGQMK.js} +2 -2
  10. package/dist/cli-bundle/chunks/{chunk-YSWD2NXB.js → chunk-5N3JMGXU.js} +2 -2
  11. package/dist/cli-bundle/chunks/{chunk-TBBWPEF5.js → chunk-DIWTFDU7.js} +2 -2
  12. package/dist/cli-bundle/chunks/{chunk-OJ2KEDUX.js → chunk-DV7WBAKQ.js} +2 -2
  13. package/dist/cli-bundle/chunks/{chunk-F6FBGLR7.js → chunk-EBAHNZJT.js} +2 -2
  14. package/dist/cli-bundle/chunks/{chunk-BSJSGDA3.js → chunk-FM375BHH.js} +2 -2
  15. package/dist/cli-bundle/chunks/{chunk-F7P2NZEG.js → chunk-GOLQYO6M.js} +4 -4
  16. package/dist/cli-bundle/chunks/chunk-GZ52WAY2.js +124 -0
  17. package/dist/cli-bundle/chunks/{chunk-EHDGHFMJ.js → chunk-JESMEJTD.js} +2 -2
  18. package/dist/cli-bundle/chunks/{chunk-CZETQYKO.js → chunk-JLQ7O6UV.js} +2 -2
  19. package/dist/cli-bundle/chunks/{chunk-FYD6LSJA.js → chunk-L3SA3354.js} +2 -2
  20. package/dist/cli-bundle/chunks/{chunk-U7LILCUN.js → chunk-NIOOJ3AG.js} +2 -2
  21. package/dist/cli-bundle/chunks/{chunk-WNEUWDUE.js → chunk-PZI6CR24.js} +46 -46
  22. package/dist/cli-bundle/chunks/{chunk-NZAFLDSH.js → chunk-QCTA2UFR.js} +2 -2
  23. package/dist/cli-bundle/chunks/{chunk-4FLAKTZW.js → chunk-SPERPX27.js} +2 -2
  24. package/dist/cli-bundle/chunks/{chunk-T2MNRM3S.js → chunk-SVVFJPNW.js} +2 -2
  25. package/dist/cli-bundle/chunks/{chunk-5CAMQHEW.js → chunk-WEAF3OY4.js} +2 -2
  26. package/dist/cli-bundle/chunks/{chunk-UL64P6MR.js → chunk-WWW5WHHJ.js} +2 -2
  27. package/dist/cli-bundle/chunks/{chunk-X7NM5HVQ.js → chunk-XJUYJXHZ.js} +2 -2
  28. package/dist/cli-bundle/chunks/{chunk-L4WWG2H6.js → chunk-XN2BRWDD.js} +2 -2
  29. package/dist/cli-bundle/chunks/chunk-Z4YEH7VQ.js +2 -0
  30. package/dist/cli-bundle/chunks/{chunk-7NAAW5EX.js → chunk-ZJDYBXMC.js} +2 -2
  31. package/dist/cli-bundle/chunks/{chunk-4AASUCHO.js → chunk-ZSL6U53K.js} +2 -2
  32. package/dist/cli-bundle/chunks/{item-revision-M7KXLQXF.js → item-revision-LNIHK36Q.js} +2 -2
  33. package/dist/cli-bundle/chunks/item-transaction-TMUYPSMR.js +2 -0
  34. package/dist/cli-bundle/chunks/{mutation-admission-374UR7NI.js → mutation-admission-WZY22LVH.js} +2 -2
  35. package/dist/cli-bundle/chunks/{register-list-query-GSB7PP5P.js → register-list-query-DYGPLVRL.js} +2 -2
  36. package/dist/cli-bundle/chunks/{register-mutation-ZBF6ITYK.js → register-mutation-MP5JCBAJ.js} +2 -2
  37. package/dist/cli-bundle/chunks/{register-operations-PWF6GOHE.js → register-operations-QEASK3EF.js} +2 -2
  38. package/dist/cli-bundle/chunks/{register-setup-QDZ2Y3CI.js → register-setup-G66U2WFV.js} +2 -2
  39. package/dist/cli-bundle/chunks/{stage-67WGPKPH.js → stage-VIDXGF3T.js} +2 -2
  40. package/dist/cli-bundle/focused-chunks/{chunk-WK773UVA.js → chunk-2ZS3I5ZP.js} +2 -2
  41. package/dist/cli-bundle/focused-chunks/chunk-33EK522E.js +26 -0
  42. package/dist/cli-bundle/focused-chunks/{chunk-BE2GK2G7.js → chunk-3A6XMQZJ.js} +2 -2
  43. package/dist/cli-bundle/focused-chunks/{chunk-PAGW6A2X.js → chunk-3FN4ON2Z.js} +2 -2
  44. package/dist/cli-bundle/focused-chunks/{chunk-3DWNH72D.js → chunk-3SH3L3DB.js} +2 -2
  45. package/dist/cli-bundle/focused-chunks/{chunk-ALLOWZSH.js → chunk-6ICHSVEY.js} +2 -2
  46. package/dist/cli-bundle/focused-chunks/{chunk-QK7FX4O5.js → chunk-6TJXTKZD.js} +4 -4
  47. package/dist/cli-bundle/focused-chunks/{chunk-QHGGO7SY.js → chunk-AXPRCCYM.js} +2 -2
  48. package/dist/cli-bundle/focused-chunks/{chunk-UIZVD36C.js → chunk-DW5S67LO.js} +2 -2
  49. package/dist/cli-bundle/focused-chunks/{chunk-HTMQDNVC.js → chunk-GBW2EAAG.js} +2 -2
  50. package/dist/cli-bundle/focused-chunks/{chunk-ZBOCYFBE.js → chunk-HIKZYZ26.js} +2 -2
  51. package/dist/cli-bundle/focused-chunks/{chunk-QCHCEFTO.js → chunk-JYWVRXLD.js} +2 -2
  52. package/dist/cli-bundle/focused-chunks/chunk-M5FZTPFA.js +2 -0
  53. package/dist/cli-bundle/focused-chunks/{chunk-2SQUWQP3.js → chunk-MK7UQEE5.js} +18 -18
  54. package/dist/cli-bundle/focused-chunks/{chunk-2Y4H4LIX.js → chunk-NMU3QFAU.js} +2 -2
  55. package/dist/cli-bundle/focused-chunks/{chunk-LY3JXL25.js → chunk-NP5C2TQM.js} +2 -2
  56. package/dist/cli-bundle/focused-chunks/{chunk-RFMKS7VD.js → chunk-NSOXVVQX.js} +2 -2
  57. package/dist/cli-bundle/focused-chunks/{chunk-WJHDUON5.js → chunk-NY65XTX7.js} +2 -2
  58. package/dist/cli-bundle/focused-chunks/{chunk-67M7E2Z3.js → chunk-P6KYUJD4.js} +2 -2
  59. package/dist/cli-bundle/focused-chunks/{chunk-LWMPQRJT.js → chunk-UCUESVFW.js} +2 -2
  60. package/dist/cli-bundle/focused-chunks/{chunk-NZQYHPUN.js → chunk-V27M5UQH.js} +2 -2
  61. package/dist/cli-bundle/focused-chunks/{chunk-3K2MYE7R.js → chunk-VVGXPF4W.js} +2 -2
  62. package/dist/cli-bundle/focused-chunks/{item-revision-XC4ZJ7MY.js → item-revision-B3BIG66B.js} +2 -2
  63. package/dist/cli-bundle/focused-chunks/{item-transaction-CVGK4RJP.js → item-transaction-4JDWOXNB.js} +2 -2
  64. package/dist/cli-bundle/focused-chunks/{mutation-admission-N27D5H64.js → mutation-admission-577MXOGD.js} +2 -2
  65. package/dist/cli-bundle/focused-chunks/{stage-KPK2UHVO.js → stage-EKYWEU2Y.js} +2 -2
  66. package/dist/cli-bundle/main.js +32 -32
  67. package/dist/cli-bundle/sdk-authoring.js +1 -1
  68. package/dist/cli-bundle/sdk-contracts.js +1 -1
  69. package/dist/cli-bundle/sdk-core.js +1 -1
  70. package/dist/cli-bundle/sdk-governance.js +1 -1
  71. package/dist/cli-bundle/sdk-graph.js +1 -1
  72. package/dist/cli-bundle/sdk-merge.js +57 -57
  73. package/dist/cli-bundle/sdk-query.js +1 -1
  74. package/dist/cli-bundle/sdk-runtime.js +1 -1
  75. package/dist/cli-bundle/sdk-testing.js +1 -1
  76. package/dist/cli-bundle/sdk.js +11 -11
  77. package/dist/core/sentry/instrument.js +1 -1
  78. package/dist/core/shared/secret-rules.d.ts +18 -2
  79. package/dist/core/shared/secret-rules.js +4 -2
  80. package/dist/core/shared/url-credentials.d.ts +37 -0
  81. package/dist/core/shared/url-credentials.js +2 -0
  82. package/dist/core/telemetry/runtime.js +2 -2
  83. package/dist/sdk/command-line.d.ts +1 -1
  84. package/dist/sdk/command-line.js +1 -1
  85. package/dist/sdk/index.d.ts +1 -1
  86. package/dist/sdk/index.js +1 -1
  87. package/dist/sdk/lifecycle/item-revision.js +1 -1
  88. package/dist/sdk/public-surface.json +1 -1
  89. package/docs/CODEX_PLUGIN.md +2 -1
  90. package/docs/CONFIGURATION.md +16 -0
  91. package/docs/MUTATION_INTEGRITY.md +65 -0
  92. package/docs/README.md +2 -2
  93. package/docs/SDK.md +16 -0
  94. package/marketplace.json +1 -1
  95. package/package.json +2 -1
  96. package/packages/pm-beads/package.json +1 -1
  97. package/packages/pm-calendar/package.json +1 -1
  98. package/packages/pm-command-kit/package.json +1 -1
  99. package/packages/pm-digital-twin/package.json +1 -1
  100. package/packages/pm-governance-audit/package.json +1 -1
  101. package/packages/pm-guide-shell/package.json +1 -1
  102. package/packages/pm-kanban/package.json +1 -1
  103. package/packages/pm-lifecycle-hooks/package.json +1 -1
  104. package/packages/pm-linked-test-adapters/package.json +1 -1
  105. package/packages/pm-search-advanced/package.json +1 -1
  106. package/packages/pm-templates/package.json +1 -1
  107. package/packages/pm-todos/package.json +1 -1
  108. package/packages/pm-vcs/package.json +1 -1
  109. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  110. package/plugins/pm-claude/package.json +1 -1
  111. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  112. package/plugins/pm-codex/package.json +1 -1
  113. package/plugins/pm-codex/plugin.json +1 -1
  114. package/runtime-dependencies.json +1 -1
  115. package/dist/cli-bundle/chunks/chunk-D727C4RO.js +0 -122
  116. package/dist/cli-bundle/chunks/chunk-UFPLZ6LZ.js +0 -2
  117. package/dist/cli-bundle/chunks/item-transaction-4N5P34GO.js +0 -2
  118. package/dist/cli-bundle/focused-chunks/chunk-56MIAFEN.js +0 -24
  119. package/dist/cli-bundle/focused-chunks/chunk-U7HWWEJ2.js +0 -2
  120. package/docs/CHATGPT_CODEX_PLUGIN_IMPLEMENTATION.md +0 -776
@@ -1,2 +1,2 @@
1
- import{Ab as Z,Dc as Q,Ec as ee,Gb as _,Gc as te,Ib as I,Kb as w,cc as A,hc as b,vb as R,wb as W,xb as X,yb as K,zb as J}from"./chunk-T2MNRM3S.js";import{K as S,aa as x,b as v,c as L,r as z,s as H,sa as q,u as E,v as Y}from"./chunk-D727C4RO.js";import{Ab as m}from"./chunk-WNEUWDUE.js";import{A as u,C as f}from"./chunk-O4ZLEN4T.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 Ae=new Set(["none","null"]);function nt(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 O(e){return e===void 0?!1:Ae.has(e.trim().toLowerCase())}function at(e,t,n){if(!O(e))return;let a=n?` ${n}`:"";throw new f(`${t} no longer accepts "none" or "null".${a}`.trim(),u.USAGE)}function ot(e,t,n){if(!e||e.length===0||L(e)||!e.some(i=>O(i)))return;let a=n?` ${n}`:"";throw new f(`${t} no longer accepts "none" or "null".${a}`.trim(),u.USAGE)}function rt(e,t){for(let n of t){let a=e[n.optionKey];if(!Array.isArray(a)||a.length===0)continue;if(!a.every(r=>typeof r=="string"))throw new f(`${n.valueFlag} entries must be strings.`,u.USAGE);if(L(a))continue;let i=a;if(i.some(r=>O(r))){if(i.filter(r=>!O(r)).length>0)throw new f(`Cannot mix legacy clear token "none"/"null" with concrete ${n.valueFlag} entries. Use ${n.clearFlag} to clear or provide explicit entries.`,u.USAGE);e[n.optionKey]=void 0,e[n.clearFlagKey]=!0,n.disableFlagKey&&(e[n.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 Oe=["close_reason","close-reason"],ne=[{canonical:"tags",aliases:["tags"],optionKey:"tags",metadataKey:"tags"}],ae=[{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"}],ge=[...ne,...ae],oe=[{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"}],Te=[...ge,{canonical:"author",aliases:["author"],optionKey:"author",metadataKey:"author"},...oe],he=[...ne,{canonical:"close-reason",aliases:Oe,optionKey:"closeReason",metadataKey:"close_reason"},...ae,...oe],ve=new Set(["none","null","-"]);function re(e){return e==="create"?Te:he}function k(e,t){let n=t.unset;if(n!==void 0&&typeof n!="string"&&!Array.isArray(n))return;let a=[];for(let i of re(e))i.optionKey==="author"||!Object.hasOwn(t,i.optionKey)||t[i.optionKey]!==null||(Reflect.deleteProperty(t,i.optionKey),a.push(i.canonical));a.length!==0&&(t.unset=[...n===void 0?[]:typeof n=="string"?[n]:n,...a])}function U(e){return typeof e=="string"&&ve.has(e.trim().toLowerCase())}function ct(e,t,n,a){return n?re(e).flatMap(i=>{let r=t[i.optionKey],o=a[i.metadataKey];return U(r)&&(U(o)||Array.isArray(o)&&o.some(U))?[`literal_sentinel_stored:${i.canonical}:${r.trim()}`]:[]}):[]}function Ee(e,t){return e.flatMap(n=>n.includes(",")&&t(n)?[n]:n.split(","))}function dt(e){let t=new Set,n=new Set;if(!e.raw||e.raw.length===0)return{metadataKeys:t,optionKeys:n};let a=Ee(e.raw,i=>e.resolveDefinition(i.trim().toLowerCase())!==void 0);for(let i of a){let r=i.trim().toLowerCase();if(!r)throw new f("--unset values must not be empty; name each field once, for example --unset parent,release",u.USAGE);if(O(r))throw new f('--unset no longer accepts "none" or "null". Specify concrete field names such as --unset deadline',u.USAGE);let o=e.resolveDefinition(r);if(!o)throw new f(`Unsupported --unset field "${i}". Supported fields: ${e.supportedFields}`,u.USAGE);t.add(o.metadataKey),n.add(o.optionKey)}return{metadataKeys:t,optionKeys:n}}function ut(e,t,n){let a=e.trim().toLowerCase();if(!n)return;let i=n.command_to_fields?.get(t)??[];for(let r of i){if(r.allow_unset===!1)continue;let o=new Set;if(typeof r.key=="string"&&r.key.length>0&&o.add(r.key.toLowerCase()),typeof r.metadata_key=="string"&&r.metadata_key.length>0&&o.add(r.metadata_key.toLowerCase()),typeof r.cli_flag=="string"&&r.cli_flag.length>0&&(o.add(r.cli_flag.replaceAll("-","_").toLowerCase()),o.add(r.cli_flag.toLowerCase())),Array.isArray(r.cli_aliases))for(let s of r.cli_aliases)typeof s!="string"||s.length===0||(o.add(s.replaceAll("-","_").toLowerCase()),o.add(s.toLowerCase()));if(o.has(a))return{optionKey:r.key,metadataKey:r.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 be={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 g(e,t,n){let a=`${e} ${t} must be ${n}.`;throw new f(a,u.USAGE,{code:"invalid_argument_value",reason:"invalid_mutation_option_value",field:t,changed:!1,required:a,examples:[be[e]]})}function C(e,t,n){typeof e!="string"&&g(t,n,"a string")}function B(e,t){(e===null||typeof e!="object"||Array.isArray(e))&&g(t,"options","an object")}function ie(e,t){(e==="append"||e==="update")&&t.id!==void 0&&C(t.id,e,"id"),e==="item-reopen"&&(t.id!==void 0&&C(t.id,"reopen","id"),t.reason!==void 0&&C(t.reason,"reopen","reason"),t.options!==void 0&&Ce(t.options))}function Et(e){B(e,"append");for(let t of["body","author","message"])e[t]!==void 0&&C(e[t],"append",t);e.force!==void 0&&typeof e.force!="boolean"&&g("append","force","a boolean")}function Ce(e){B(e,"reopen");for(let t of b["item-reopen"].optional){let n=e[t];n!==void 0&&(m(Reflect.get(A,t)).type==="boolean"?typeof n!="boolean"&&g("reopen",t,"a boolean"):C(n,"reopen",t))}}function Ne(e,t){return e?t?"a string or string array":"a string array":"a string"}function Se(e,t,n,a,i,r){n===void 0||typeof n=="string"&&(!i||r)||a==="priority"&&typeof n=="number"&&Number.isFinite(n)||i&&Array.isArray(n)&&Array.from(n).every(o=>typeof o=="string")||g(e,t,Ne(i,r))}function Re(e,t,n){let a=e==="create"?I:w;for(let{param:i}of[...a,..._,{param:"force"}]){if(m(Reflect.get(A,i)).type!=="boolean")continue;let r=n.find(o=>o.keys.includes(i))?.keys??[i];for(let o of r)t[o]!==void 0&&typeof t[o]!="boolean"&&g(e,o,"a boolean")}}function $(e,t,n=!0,a=!1){let i=e==="create"?R:K;for(let{target:r,keys:o,repeatable:s}of i)if(m(Reflect.get(A,r)).type!=="boolean")for(let d of o){let p=a&&d!==r,P=s===!0&&(r!=="acceptanceCriteria"||p);Se(e,d,t[d],r,P,n||p)}Re(e,t,i)}function bt(e,t){B(t,e);let n=z(t),a=v(n);return a||k(e,n),$(e,n,!1,a),n}(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 Ke=Symbol("pm.mcp-mutation-transport"),Ie=new Set(["create","update","append"]),D={create:{parameters:I,aliases:R,strings:W,repeatables:X},update:{parameters:w,aliases:K,strings:J,repeatables:Z}},we=new Set(["activity","aggregate","context","contracts","deps","files-discover","files-lookup","get","graph","health","history","history-attest","list","next","search","stats","telemetry","validate"]);function N(e){return Ke in e}function M(e,t){return N(e)?H(t):E(e,t)}function $t(e,t,n=[]){let a=E(e,{...e,...t});for(let i of n)Reflect.deleteProperty(a,i);return a}function l(e,t){let n=e[t];return typeof n=="string"&&n.trim().length>0?n:void 0}function c(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 Gt(e,t){let n=e[t];return typeof n=="string"?n:typeof n=="number"&&Number.isFinite(n)?String(n):void 0}function y(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function jt(e,t){if(typeof e=="number"){if(!Number.isInteger(e))throw new f(`${t} must be a finite integer.`,u.USAGE);return e}if(typeof e=="string"&&e.trim().length>0){let n=Number(e);if(!Number.isInteger(n))throw new f(`${t} must be a finite integer.`,u.USAGE);return n}}function Vt(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 zt(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:c(e,"outputLimit"),outputBudget:c(e,"outputBudget"),outputSession:l(e,"outputSession"),outputCursor:l(e,"outputCursor"),outputFormat:t==="json"||t==="toon"?t:void 0}}var ce=new Set(["tags","blockedBy","blocked_by","skills","fields"]),de=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"]),ke=new Set([...de].filter(e=>e!=="file")),Fe=new Set(["files","files-discover","docs","test","test-all"]),V=new Set(["comments","notes","learnings"]);function Me(e,t){if(!(!V.has(e)||!Object.prototype.hasOwnProperty.call(t,"file")))throw new f(`MCP ${e} does not accept options.file. Pass annotation text in options.add instead.`,u.USAGE,{code:"mcp_annotation_file_unavailable",required:"Pass annotation text as JSON data; MCP annotation actions cannot read server-local files."})}var De=new Set(["claim","release","start-task","pause-task","close-task"]),ue={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"]},Pe=new Set(["context","get","list","next","search","comments","notes","learnings","files","docs","test"]),Le=new Set(["query","keywords","id","text"]);function xe(e){return Pe.has(e)?b[e].optional.filter(t=>!Le.has(t)):[]}var Ue=new Set(["comments","notes","learnings","files","docs","test"]);function Be(e,t){if(!Ue.has(e??""))return t;let n={...t};for(let a of b[e].optional){let i=a.replace(/[A-Z]/gu,r=>`_${r.toLowerCase()}`);i===a||n[i]===void 0||(n[a]??=n[i],delete n[i])}return n}function $e(e,t,n){if(!V.has(e??""))return n;let a=n,i=a.text??t.text;if(i===void 0)return a;if(a.add!==void 0&&a.add!==i){let o=e.replace(/s$/u,"");throw new f(`Specify ${o} text either as text or with add, not both.`,u.USAGE,{code:"annotation_text_source_conflict",field:"text",required:`Pass the ${o} text once: text and add are the same source.`})}let r={...a,add:i};return delete r.text,r}function Ge(e,t){let n=t.replace(/[A-Z]/gu,a=>`_${a.toLowerCase()}`);return e[t]!==void 0||e[n]!==void 0}function je(e){return[...ue[e]??[],...xe(e),...fe]}var fe=["outputInclude","outputLimit","outputBudget","outputFormat","outputSession","outputCursor"];function pe(e,t=""){let n={},a=Fe.has(t),i=t==="files"||t==="files-discover"||t==="docs",r=V.has(t)?ke:de;for(let[o,s]of Object.entries(e)){if(Array.isArray(s)&&ce.has(o)){n[o]=s.join(",");continue}if(o==="note"&&i){n[o]=s;continue}if(typeof s=="string"&&r.has(o)){n[o]=[s];continue}if(typeof s=="string"&&a&&(o==="add"||o==="remove")){n[o]=[s];continue}n[o]=s}return Object.assign(n,Object.fromEntries(Object.getOwnPropertySymbols(e).map(o=>[o,Reflect.get(e,o)]))),n}function Ve(e,t,n){let a=l(e,"author");return a!==void 0?a:n!==void 0&&De.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 He(e,t,n){let a={},i=D[e],r=new Set([...i.parameters.map(({param:o})=>o),..._.map(({param:o})=>o),...ue[e],...fe,"force"]);for(let o of r){let s=i.aliases.find(d=>d.keys.includes(o))?.keys??[o];t[o]===void 0||s.some(d=>n[d]!==void 0)||(a[o]=t[o])}return a}function T(e,t){throw new f(`Invalid MCP ${e} value for "${t}". No changes were made.`,u.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 Ye(e,t,n){let a=D[e],i=[...a.parameters,..._,{param:"force"}];for(let{param:r}of i){if(m(A[r]).type!=="boolean")continue;let o=(a.aliases.find(s=>s.keys.includes(r))?.keys??[r]).find(s=>n[s]!==void 0&&typeof n[s]!="boolean");o!==void 0&&T(e,o)}for(let r of["idOnly","fullChangedFields"])t[r]!==void 0&&typeof t[r]!="boolean"&&T(e,r)}function qe(e,t,n){t.options!==void 0&&!y(t.options)&&T(e,"options"),Ye(e,t,n);for(let o of ce){let s=n[o];Array.isArray(s)&&s.some(d=>typeof d!="string")&&T(e,o)}let a=_e(n,e),i=D[e];for(let{keys:o,target:s}of i.strings)o.some(d=>n[d]!==void 0)&&a[s]===void 0&&T(e,s);let r=i.repeatables.flatMap(({keys:o})=>o).find(o=>{let s=n[o];return s!==void 0&&typeof s!="string"&&(!Array.isArray(s)||s.some(d=>typeof d!="string"))});return r!==void 0&&T(e,r),a}function We(e,t,n,a){let i=(t==="create"||t==="update")&&N(e),r={...i?He(t,e,a):n,...a};if((t==="create"||t==="update")&&!i){let o=y(e.options)&&v(e.options);o||k(t,r),$(t,r,!0,o)}return i?qe(t,e,r):pe(r,t)}function Xe(e,t){return!Ie.has(e??"")||v(t)?t:q(t)}function Ht(e,t){ie(t,e);let n=y(e.options)?e.options:void 0,a=m(e.options),i={},r=p=>{Ge(a,p)||e[p]===void 0||(i[p]=e[p])};for(let p of je(t??""))r(p);t!==void 0&&N(e)&&Me(t,a);let o=$e(t,e,Be(t,We(e,t,i,a)));if(t==="history-attest"&&N(e)&&(o.output!==void 0||typeof o.verify=="string"))throw new f("MCP history attest does not accept server-local proof paths. Export the returned JSON bundle and pass that JSON object as verify.",u.USAGE);let s=N(e)?e:n??e,d=M(s,ze(o,Ve(e,o,t)));return Xe(t,d)}function Yt(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 qt(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 Je(e){let t=[],n=!0;for(let a of e.trim().toLowerCase()){if(a>="a"&&a<="z"||a>="0"&&a<="9"){t.push(a),n=!1;continue}n||(t.push("-"),n=!0)}return t.at(-1)==="-"&&t.pop(),t.join("")}function Wt(e){return!we.has(Je(e))}function Xt(e){return e.trim().toLowerCase().split(/\s+/).filter(Boolean).join(" ")}function Ze(e){return Array.isArray(e)?e.map(t=>String(t)).filter(t=>t.length>0):[]}function Jt(e,t){let n=new Set(["action","args","author","cwd","fullChangedFields","id","options","path","query","reason","target"]),a={};for(let[r,o]of Object.entries(e))n.has(r)||(a[r]=o);let i={...a,...t};return delete i.args,delete i.author,i}function Zt(e,t){let n=M(t??{},{...t});return{changedFields:e.fullChangedFields===!0?"full":"compact",idOnly:e.idOnly===!0,runnerOptions:n}}function j(e){return{type:c(e,"filterType"),tag:c(e,"filterTag"),priority:c(e,"filterPriority"),deadlineBefore:c(e,"filterDeadlineBefore"),deadlineAfter:c(e,"filterDeadlineAfter"),updatedAfter:c(e,"filterUpdatedAfter"),updatedBefore:c(e,"filterUpdatedBefore"),createdAfter:c(e,"filterCreatedAfter"),createdBefore:c(e,"filterCreatedBefore"),ids:x(e.ids),assignee:c(e,"filterAssignee"),assigneeFilter:c(e,"filterAssigneeFilter")??c(e,"filterAssignee_filter"),parent:c(e,"filterParent"),sprint:c(e,"filterSprint"),release:c(e,"filterRelease"),limit:c(e,"limit"),offset:c(e,"offset")}}function G(e){if(typeof e=="string"&&e.trim().length>0)return e;if(Array.isArray(e))return Ze(e)}function F(e){if(typeof e=="number"&&Number.isFinite(e)||typeof e=="string"&&e.trim().length>0)return e}function Qt(e){let t=G(e.kind),n=G(e.exemptIsolate),a=G(e.exemptIsolateType);return{...t===void 0?{}:{kind:t},maxDepth:F(e.maxDepth),limit:F(e.limit),after:l(e,"after"),direction:l(e,"direction"),maxPaths:F(e.maxPaths),sample:F(e.sample),...n===void 0?{}:{exemptIsolate:n},...a===void 0?{}:{exemptIsolateType:a},saveBaseline:e.saveBaseline===!0,rebuild:e.rebuild===!0,clear:e.clear===!0,summary:e.summary===!0,...e.full===!0?{full:!0}:{}}}function ye(e){let t=te(e);return e.ids!==void 0&&(t.ids=x(e.ids)),t}function en(e){return{status:l(e,"filterStatus"),list:y(e.list)?ye(e.list):j(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:S(e.rollback),checkpoint:e.checkpoint===!1||e.noCheckpoint===!0||e.no_checkpoint===!0?!1:void 0}}var Qe=new Set(["filterStatus","filterType","filterTag","filterPriority","filterDeadlineBefore","filterDeadlineAfter","filterUpdatedAfter","filterUpdatedBefore","filterCreatedAfter","filterCreatedBefore","filterAssignee","filterAssigneeFilter","filterAssignee_filter","filterParent","filterSprint","filterRelease","ids","list","update","limit","offset","dryRun","dry_run","rollback","checkpoint","noCheckpoint","no_checkpoint"]);function se(e){let t={};for(let[n,a]of Object.entries(e))Qe.has(n)||(t[n]=a);return me(t)}function me(e){return _e(e,"update")}function _e(e,t){let n=pe(e,t),a=D[t],i=new Set([...a.parameters,..._].filter(({booleanish:r})=>r===!0).map(({param:r})=>r));for(let{keys:r}of a.repeatables)for(let o of r)typeof n[o]=="string"&&(n[o]=[n[o]]);for(let r of a.strings)for(let o of r.keys){let s=n[o];(typeof s=="number"&&Number.isFinite(s)||s===!1&&i.has(o))&&(n[o]=String(s))}return t==="create"?{...Q(n,{requireType:!1})}:ee(n)}function tn(e){if(y(e.list)||y(e.update)){let t=y(e.update)?e.update:se(e),n=M(e,me(t));return{status:c(e,"filterStatus"),list:y(e.list)?ye(e.list):j(e),update:Y(t,n),dryRun:e.dryRun===!0||e.dry_run===!0?!0:void 0,rollback:S(e.rollback),checkpoint:e.checkpoint===!1||e.noCheckpoint===!0||e.no_checkpoint===!0?!1:void 0}}return{status:c(e,"filterStatus"),list:j(e),update:M(e,se(e)),dryRun:e.dryRun===!0||e.dry_run===!0?!0:void 0,rollback:S(e.rollback),checkpoint:e.checkpoint===!1||e.noCheckpoint===!0||e.no_checkpoint===!0?!1:void 0}}function le(e){return"expectHash"in e||"expect_hash"in e}function nn(e){if(!le(e)&&!(y(e.options)&&le(e.options)))return{expectHash:void 0,dispatchArgs:e};let{expectHash:t,expect_hash:n,...a}=e,i=y(a.options)?a.options:{},{expectHash:r,expect_hash:o,...s}=i,d=[t,n,r,o].filter(h=>h!==void 0),p=d.length>1?d.flatMap(h=>Array.isArray(h)?h:[h]):d[0],P=E(e,"options"in a?{...a,options:y(a.options)?E(a.options,s):a.options}:a);return{expectHash:p,dispatchArgs:P}}export{nt as a,O as b,at as c,ot as d,rt as e,Oe as f,Te as g,he as h,ct as i,Ee as j,dt as k,ut as l,C as m,B as n,Et as o,Ce as p,bt as q,N as r,$t as s,l as t,c as u,Gt as v,y as w,jt as x,Vt as y,zt as z,ue as A,pe as B,Ht as C,Yt as D,qt as E,Je as F,Wt as G,Xt as H,Ze as I,Jt as J,Zt as K,j as L,Qt as M,en as N,me as O,tn as P,nn as Q};
2
- //# sourceMappingURL=chunk-TBBWPEF5.js.map
1
+ import{Ab as Z,Dc as Q,Ec as ee,Gb as _,Gc as te,Ib as I,Kb as w,cc as A,hc as b,vb as R,wb as W,xb as X,yb as K,zb as J}from"./chunk-SVVFJPNW.js";import{K as S,aa as x,b as v,c as L,r as z,s as H,sa as q,u as E,v as Y}from"./chunk-GZ52WAY2.js";import{Fb as m}from"./chunk-PZI6CR24.js";import{A as u,C as f}from"./chunk-O4ZLEN4T.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 Ae=new Set(["none","null"]);function nt(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 O(e){return e===void 0?!1:Ae.has(e.trim().toLowerCase())}function at(e,t,n){if(!O(e))return;let a=n?` ${n}`:"";throw new f(`${t} no longer accepts "none" or "null".${a}`.trim(),u.USAGE)}function ot(e,t,n){if(!e||e.length===0||L(e)||!e.some(i=>O(i)))return;let a=n?` ${n}`:"";throw new f(`${t} no longer accepts "none" or "null".${a}`.trim(),u.USAGE)}function rt(e,t){for(let n of t){let a=e[n.optionKey];if(!Array.isArray(a)||a.length===0)continue;if(!a.every(r=>typeof r=="string"))throw new f(`${n.valueFlag} entries must be strings.`,u.USAGE);if(L(a))continue;let i=a;if(i.some(r=>O(r))){if(i.filter(r=>!O(r)).length>0)throw new f(`Cannot mix legacy clear token "none"/"null" with concrete ${n.valueFlag} entries. Use ${n.clearFlag} to clear or provide explicit entries.`,u.USAGE);e[n.optionKey]=void 0,e[n.clearFlagKey]=!0,n.disableFlagKey&&(e[n.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 Oe=["close_reason","close-reason"],ne=[{canonical:"tags",aliases:["tags"],optionKey:"tags",metadataKey:"tags"}],ae=[{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"}],ge=[...ne,...ae],oe=[{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"}],Te=[...ge,{canonical:"author",aliases:["author"],optionKey:"author",metadataKey:"author"},...oe],he=[...ne,{canonical:"close-reason",aliases:Oe,optionKey:"closeReason",metadataKey:"close_reason"},...ae,...oe],ve=new Set(["none","null","-"]);function re(e){return e==="create"?Te:he}function k(e,t){let n=t.unset;if(n!==void 0&&typeof n!="string"&&!Array.isArray(n))return;let a=[];for(let i of re(e))i.optionKey==="author"||!Object.hasOwn(t,i.optionKey)||t[i.optionKey]!==null||(Reflect.deleteProperty(t,i.optionKey),a.push(i.canonical));a.length!==0&&(t.unset=[...n===void 0?[]:typeof n=="string"?[n]:n,...a])}function U(e){return typeof e=="string"&&ve.has(e.trim().toLowerCase())}function ct(e,t,n,a){return n?re(e).flatMap(i=>{let r=t[i.optionKey],o=a[i.metadataKey];return U(r)&&(U(o)||Array.isArray(o)&&o.some(U))?[`literal_sentinel_stored:${i.canonical}:${r.trim()}`]:[]}):[]}function Ee(e,t){return e.flatMap(n=>n.includes(",")&&t(n)?[n]:n.split(","))}function dt(e){let t=new Set,n=new Set;if(!e.raw||e.raw.length===0)return{metadataKeys:t,optionKeys:n};let a=Ee(e.raw,i=>e.resolveDefinition(i.trim().toLowerCase())!==void 0);for(let i of a){let r=i.trim().toLowerCase();if(!r)throw new f("--unset values must not be empty; name each field once, for example --unset parent,release",u.USAGE);if(O(r))throw new f('--unset no longer accepts "none" or "null". Specify concrete field names such as --unset deadline',u.USAGE);let o=e.resolveDefinition(r);if(!o)throw new f(`Unsupported --unset field "${i}". Supported fields: ${e.supportedFields}`,u.USAGE);t.add(o.metadataKey),n.add(o.optionKey)}return{metadataKeys:t,optionKeys:n}}function ut(e,t,n){let a=e.trim().toLowerCase();if(!n)return;let i=n.command_to_fields?.get(t)??[];for(let r of i){if(r.allow_unset===!1)continue;let o=new Set;if(typeof r.key=="string"&&r.key.length>0&&o.add(r.key.toLowerCase()),typeof r.metadata_key=="string"&&r.metadata_key.length>0&&o.add(r.metadata_key.toLowerCase()),typeof r.cli_flag=="string"&&r.cli_flag.length>0&&(o.add(r.cli_flag.replaceAll("-","_").toLowerCase()),o.add(r.cli_flag.toLowerCase())),Array.isArray(r.cli_aliases))for(let s of r.cli_aliases)typeof s!="string"||s.length===0||(o.add(s.replaceAll("-","_").toLowerCase()),o.add(s.toLowerCase()));if(o.has(a))return{optionKey:r.key,metadataKey:r.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 be={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 g(e,t,n){let a=`${e} ${t} must be ${n}.`;throw new f(a,u.USAGE,{code:"invalid_argument_value",reason:"invalid_mutation_option_value",field:t,changed:!1,required:a,examples:[be[e]]})}function C(e,t,n){typeof e!="string"&&g(t,n,"a string")}function B(e,t){(e===null||typeof e!="object"||Array.isArray(e))&&g(t,"options","an object")}function ie(e,t){(e==="append"||e==="update")&&t.id!==void 0&&C(t.id,e,"id"),e==="item-reopen"&&(t.id!==void 0&&C(t.id,"reopen","id"),t.reason!==void 0&&C(t.reason,"reopen","reason"),t.options!==void 0&&Ce(t.options))}function Et(e){B(e,"append");for(let t of["body","author","message"])e[t]!==void 0&&C(e[t],"append",t);e.force!==void 0&&typeof e.force!="boolean"&&g("append","force","a boolean")}function Ce(e){B(e,"reopen");for(let t of b["item-reopen"].optional){let n=e[t];n!==void 0&&(m(Reflect.get(A,t)).type==="boolean"?typeof n!="boolean"&&g("reopen",t,"a boolean"):C(n,"reopen",t))}}function Ne(e,t){return e?t?"a string or string array":"a string array":"a string"}function Se(e,t,n,a,i,r){n===void 0||typeof n=="string"&&(!i||r)||a==="priority"&&typeof n=="number"&&Number.isFinite(n)||i&&Array.isArray(n)&&Array.from(n).every(o=>typeof o=="string")||g(e,t,Ne(i,r))}function Re(e,t,n){let a=e==="create"?I:w;for(let{param:i}of[...a,..._,{param:"force"}]){if(m(Reflect.get(A,i)).type!=="boolean")continue;let r=n.find(o=>o.keys.includes(i))?.keys??[i];for(let o of r)t[o]!==void 0&&typeof t[o]!="boolean"&&g(e,o,"a boolean")}}function $(e,t,n=!0,a=!1){let i=e==="create"?R:K;for(let{target:r,keys:o,repeatable:s}of i)if(m(Reflect.get(A,r)).type!=="boolean")for(let d of o){let p=a&&d!==r,P=s===!0&&(r!=="acceptanceCriteria"||p);Se(e,d,t[d],r,P,n||p)}Re(e,t,i)}function bt(e,t){B(t,e);let n=z(t),a=v(n);return a||k(e,n),$(e,n,!1,a),n}(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 Ke=Symbol("pm.mcp-mutation-transport"),Ie=new Set(["create","update","append"]),D={create:{parameters:I,aliases:R,strings:W,repeatables:X},update:{parameters:w,aliases:K,strings:J,repeatables:Z}},we=new Set(["activity","aggregate","context","contracts","deps","files-discover","files-lookup","get","graph","health","history","history-attest","list","next","search","stats","telemetry","validate"]);function N(e){return Ke in e}function M(e,t){return N(e)?H(t):E(e,t)}function $t(e,t,n=[]){let a=E(e,{...e,...t});for(let i of n)Reflect.deleteProperty(a,i);return a}function l(e,t){let n=e[t];return typeof n=="string"&&n.trim().length>0?n:void 0}function c(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 Gt(e,t){let n=e[t];return typeof n=="string"?n:typeof n=="number"&&Number.isFinite(n)?String(n):void 0}function y(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function jt(e,t){if(typeof e=="number"){if(!Number.isInteger(e))throw new f(`${t} must be a finite integer.`,u.USAGE);return e}if(typeof e=="string"&&e.trim().length>0){let n=Number(e);if(!Number.isInteger(n))throw new f(`${t} must be a finite integer.`,u.USAGE);return n}}function Vt(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 zt(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:c(e,"outputLimit"),outputBudget:c(e,"outputBudget"),outputSession:l(e,"outputSession"),outputCursor:l(e,"outputCursor"),outputFormat:t==="json"||t==="toon"?t:void 0}}var ce=new Set(["tags","blockedBy","blocked_by","skills","fields"]),de=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"]),ke=new Set([...de].filter(e=>e!=="file")),Fe=new Set(["files","files-discover","docs","test","test-all"]),V=new Set(["comments","notes","learnings"]);function Me(e,t){if(!(!V.has(e)||!Object.prototype.hasOwnProperty.call(t,"file")))throw new f(`MCP ${e} does not accept options.file. Pass annotation text in options.add instead.`,u.USAGE,{code:"mcp_annotation_file_unavailable",required:"Pass annotation text as JSON data; MCP annotation actions cannot read server-local files."})}var De=new Set(["claim","release","start-task","pause-task","close-task"]),ue={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"]},Pe=new Set(["context","get","list","next","search","comments","notes","learnings","files","docs","test"]),Le=new Set(["query","keywords","id","text"]);function xe(e){return Pe.has(e)?b[e].optional.filter(t=>!Le.has(t)):[]}var Ue=new Set(["comments","notes","learnings","files","docs","test"]);function Be(e,t){if(!Ue.has(e??""))return t;let n={...t};for(let a of b[e].optional){let i=a.replace(/[A-Z]/gu,r=>`_${r.toLowerCase()}`);i===a||n[i]===void 0||(n[a]??=n[i],delete n[i])}return n}function $e(e,t,n){if(!V.has(e??""))return n;let a=n,i=a.text??t.text;if(i===void 0)return a;if(a.add!==void 0&&a.add!==i){let o=e.replace(/s$/u,"");throw new f(`Specify ${o} text either as text or with add, not both.`,u.USAGE,{code:"annotation_text_source_conflict",field:"text",required:`Pass the ${o} text once: text and add are the same source.`})}let r={...a,add:i};return delete r.text,r}function Ge(e,t){let n=t.replace(/[A-Z]/gu,a=>`_${a.toLowerCase()}`);return e[t]!==void 0||e[n]!==void 0}function je(e){return[...ue[e]??[],...xe(e),...fe]}var fe=["outputInclude","outputLimit","outputBudget","outputFormat","outputSession","outputCursor"];function pe(e,t=""){let n={},a=Fe.has(t),i=t==="files"||t==="files-discover"||t==="docs",r=V.has(t)?ke:de;for(let[o,s]of Object.entries(e)){if(Array.isArray(s)&&ce.has(o)){n[o]=s.join(",");continue}if(o==="note"&&i){n[o]=s;continue}if(typeof s=="string"&&r.has(o)){n[o]=[s];continue}if(typeof s=="string"&&a&&(o==="add"||o==="remove")){n[o]=[s];continue}n[o]=s}return Object.assign(n,Object.fromEntries(Object.getOwnPropertySymbols(e).map(o=>[o,Reflect.get(e,o)]))),n}function Ve(e,t,n){let a=l(e,"author");return a!==void 0?a:n!==void 0&&De.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 He(e,t,n){let a={},i=D[e],r=new Set([...i.parameters.map(({param:o})=>o),..._.map(({param:o})=>o),...ue[e],...fe,"force"]);for(let o of r){let s=i.aliases.find(d=>d.keys.includes(o))?.keys??[o];t[o]===void 0||s.some(d=>n[d]!==void 0)||(a[o]=t[o])}return a}function T(e,t){throw new f(`Invalid MCP ${e} value for "${t}". No changes were made.`,u.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 Ye(e,t,n){let a=D[e],i=[...a.parameters,..._,{param:"force"}];for(let{param:r}of i){if(m(A[r]).type!=="boolean")continue;let o=(a.aliases.find(s=>s.keys.includes(r))?.keys??[r]).find(s=>n[s]!==void 0&&typeof n[s]!="boolean");o!==void 0&&T(e,o)}for(let r of["idOnly","fullChangedFields"])t[r]!==void 0&&typeof t[r]!="boolean"&&T(e,r)}function qe(e,t,n){t.options!==void 0&&!y(t.options)&&T(e,"options"),Ye(e,t,n);for(let o of ce){let s=n[o];Array.isArray(s)&&s.some(d=>typeof d!="string")&&T(e,o)}let a=_e(n,e),i=D[e];for(let{keys:o,target:s}of i.strings)o.some(d=>n[d]!==void 0)&&a[s]===void 0&&T(e,s);let r=i.repeatables.flatMap(({keys:o})=>o).find(o=>{let s=n[o];return s!==void 0&&typeof s!="string"&&(!Array.isArray(s)||s.some(d=>typeof d!="string"))});return r!==void 0&&T(e,r),a}function We(e,t,n,a){let i=(t==="create"||t==="update")&&N(e),r={...i?He(t,e,a):n,...a};if((t==="create"||t==="update")&&!i){let o=y(e.options)&&v(e.options);o||k(t,r),$(t,r,!0,o)}return i?qe(t,e,r):pe(r,t)}function Xe(e,t){return!Ie.has(e??"")||v(t)?t:q(t)}function Ht(e,t){ie(t,e);let n=y(e.options)?e.options:void 0,a=m(e.options),i={},r=p=>{Ge(a,p)||e[p]===void 0||(i[p]=e[p])};for(let p of je(t??""))r(p);t!==void 0&&N(e)&&Me(t,a);let o=$e(t,e,Be(t,We(e,t,i,a)));if(t==="history-attest"&&N(e)&&(o.output!==void 0||typeof o.verify=="string"))throw new f("MCP history attest does not accept server-local proof paths. Export the returned JSON bundle and pass that JSON object as verify.",u.USAGE);let s=N(e)?e:n??e,d=M(s,ze(o,Ve(e,o,t)));return Xe(t,d)}function Yt(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 qt(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 Je(e){let t=[],n=!0;for(let a of e.trim().toLowerCase()){if(a>="a"&&a<="z"||a>="0"&&a<="9"){t.push(a),n=!1;continue}n||(t.push("-"),n=!0)}return t.at(-1)==="-"&&t.pop(),t.join("")}function Wt(e){return!we.has(Je(e))}function Xt(e){return e.trim().toLowerCase().split(/\s+/).filter(Boolean).join(" ")}function Ze(e){return Array.isArray(e)?e.map(t=>String(t)).filter(t=>t.length>0):[]}function Jt(e,t){let n=new Set(["action","args","author","cwd","fullChangedFields","id","options","path","query","reason","target"]),a={};for(let[r,o]of Object.entries(e))n.has(r)||(a[r]=o);let i={...a,...t};return delete i.args,delete i.author,i}function Zt(e,t){let n=M(t??{},{...t});return{changedFields:e.fullChangedFields===!0?"full":"compact",idOnly:e.idOnly===!0,runnerOptions:n}}function j(e){return{type:c(e,"filterType"),tag:c(e,"filterTag"),priority:c(e,"filterPriority"),deadlineBefore:c(e,"filterDeadlineBefore"),deadlineAfter:c(e,"filterDeadlineAfter"),updatedAfter:c(e,"filterUpdatedAfter"),updatedBefore:c(e,"filterUpdatedBefore"),createdAfter:c(e,"filterCreatedAfter"),createdBefore:c(e,"filterCreatedBefore"),ids:x(e.ids),assignee:c(e,"filterAssignee"),assigneeFilter:c(e,"filterAssigneeFilter")??c(e,"filterAssignee_filter"),parent:c(e,"filterParent"),sprint:c(e,"filterSprint"),release:c(e,"filterRelease"),limit:c(e,"limit"),offset:c(e,"offset")}}function G(e){if(typeof e=="string"&&e.trim().length>0)return e;if(Array.isArray(e))return Ze(e)}function F(e){if(typeof e=="number"&&Number.isFinite(e)||typeof e=="string"&&e.trim().length>0)return e}function Qt(e){let t=G(e.kind),n=G(e.exemptIsolate),a=G(e.exemptIsolateType);return{...t===void 0?{}:{kind:t},maxDepth:F(e.maxDepth),limit:F(e.limit),after:l(e,"after"),direction:l(e,"direction"),maxPaths:F(e.maxPaths),sample:F(e.sample),...n===void 0?{}:{exemptIsolate:n},...a===void 0?{}:{exemptIsolateType:a},saveBaseline:e.saveBaseline===!0,rebuild:e.rebuild===!0,clear:e.clear===!0,summary:e.summary===!0,...e.full===!0?{full:!0}:{}}}function ye(e){let t=te(e);return e.ids!==void 0&&(t.ids=x(e.ids)),t}function en(e){return{status:l(e,"filterStatus"),list:y(e.list)?ye(e.list):j(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:S(e.rollback),checkpoint:e.checkpoint===!1||e.noCheckpoint===!0||e.no_checkpoint===!0?!1:void 0}}var Qe=new Set(["filterStatus","filterType","filterTag","filterPriority","filterDeadlineBefore","filterDeadlineAfter","filterUpdatedAfter","filterUpdatedBefore","filterCreatedAfter","filterCreatedBefore","filterAssignee","filterAssigneeFilter","filterAssignee_filter","filterParent","filterSprint","filterRelease","ids","list","update","limit","offset","dryRun","dry_run","rollback","checkpoint","noCheckpoint","no_checkpoint"]);function se(e){let t={};for(let[n,a]of Object.entries(e))Qe.has(n)||(t[n]=a);return me(t)}function me(e){return _e(e,"update")}function _e(e,t){let n=pe(e,t),a=D[t],i=new Set([...a.parameters,..._].filter(({booleanish:r})=>r===!0).map(({param:r})=>r));for(let{keys:r}of a.repeatables)for(let o of r)typeof n[o]=="string"&&(n[o]=[n[o]]);for(let r of a.strings)for(let o of r.keys){let s=n[o];(typeof s=="number"&&Number.isFinite(s)||s===!1&&i.has(o))&&(n[o]=String(s))}return t==="create"?{...Q(n,{requireType:!1})}:ee(n)}function tn(e){if(y(e.list)||y(e.update)){let t=y(e.update)?e.update:se(e),n=M(e,me(t));return{status:c(e,"filterStatus"),list:y(e.list)?ye(e.list):j(e),update:Y(t,n),dryRun:e.dryRun===!0||e.dry_run===!0?!0:void 0,rollback:S(e.rollback),checkpoint:e.checkpoint===!1||e.noCheckpoint===!0||e.no_checkpoint===!0?!1:void 0}}return{status:c(e,"filterStatus"),list:j(e),update:M(e,se(e)),dryRun:e.dryRun===!0||e.dry_run===!0?!0:void 0,rollback:S(e.rollback),checkpoint:e.checkpoint===!1||e.noCheckpoint===!0||e.no_checkpoint===!0?!1:void 0}}function le(e){return"expectHash"in e||"expect_hash"in e}function nn(e){if(!le(e)&&!(y(e.options)&&le(e.options)))return{expectHash:void 0,dispatchArgs:e};let{expectHash:t,expect_hash:n,...a}=e,i=y(a.options)?a.options:{},{expectHash:r,expect_hash:o,...s}=i,d=[t,n,r,o].filter(h=>h!==void 0),p=d.length>1?d.flatMap(h=>Array.isArray(h)?h:[h]):d[0],P=E(e,"options"in a?{...a,options:y(a.options)?E(a.options,s):a.options}:a);return{expectHash:p,dispatchArgs:P}}export{nt as a,O as b,at as c,ot as d,rt as e,Oe as f,Te as g,he as h,ct as i,Ee as j,dt as k,ut as l,C as m,B as n,Et as o,Ce as p,bt as q,N as r,$t as s,l as t,c as u,Gt as v,y as w,jt as x,Vt as y,zt as z,ue as A,pe as B,Ht as C,Yt as D,qt as E,Je as F,Wt as G,Xt as H,Ze as I,Jt as J,Zt as K,j as L,Qt as M,en as N,me as O,tn as P,nn as Q};
2
+ //# sourceMappingURL=chunk-DIWTFDU7.js.map
@@ -1,2 +1,2 @@
1
- import{a as f,b as I,f as T,i as _,j as M,l as y}from"./chunk-U7LILCUN.js";import{Ui as g,Zd as l,_d as p}from"./chunk-WNEUWDUE.js";import{A as c,C as u}from"./chunk-O4ZLEN4T.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]="4175f7f5-a689-5d05-982a-f92e21bc83e7")}catch{}})();(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]="3041c268-69c8-58e5-8a68-eaaa3c0dbd3b")}catch{}})();async function ce(e){let{plan:t}=e,r=await y({pmRoot:e.pmRoot,author:e.author,transactionId:t.transaction_id,mutations:t.mutations}),o=new Map(r.warnings.map(i=>[i.index,i.warnings])),s=t.rows.map(i=>{let n={...i};delete n.warnings;let a=o.get(i.index);return a!==void 0&&(n.warnings=a),n});return{validation:r,rows:s}}async function ue(e){let t=e.upsertKey?.trim();if(t!==void 0&&t.length===0)throw new u("Upsert key must be a non-empty field name.",c.USAGE);let r=e.settings??await g(e.pmRoot),o=e.transactionId?.trim()??"",s=o.length>0?o:I(e.input),i=await _(e.pmRoot,r),n=l(i.schema).definitions,a=(n.find(m=>m.metadata_key===t)??n.find(m=>m.key===t||p(m)===t))?.metadata_key??f(t),d=a===void 0?void 0:{key:a,existing:await M(e.pmRoot,r,i,a)};return{...T(e.input,{transactionId:s,idPrefix:r.id_prefix,runtimeFields:n,...d===void 0?{}:{upsert:d}}),transaction_id:s,transaction_id_source:o.length>0?"explicit":"derived",...d===void 0?{}:{upsert_key:d.key}}}export{ce as a,ue as b};
2
- //# sourceMappingURL=chunk-OJ2KEDUX.js.map
1
+ import{a as f,b as I,f as T,i as _,j as M,l as y}from"./chunk-NIOOJ3AG.js";import{Zi as g,ce as l,de as p}from"./chunk-PZI6CR24.js";import{A as c,C as u}from"./chunk-O4ZLEN4T.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]="4175f7f5-a689-5d05-982a-f92e21bc83e7")}catch{}})();(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]="3041c268-69c8-58e5-8a68-eaaa3c0dbd3b")}catch{}})();async function ce(e){let{plan:t}=e,r=await y({pmRoot:e.pmRoot,author:e.author,transactionId:t.transaction_id,mutations:t.mutations}),o=new Map(r.warnings.map(i=>[i.index,i.warnings])),s=t.rows.map(i=>{let n={...i};delete n.warnings;let a=o.get(i.index);return a!==void 0&&(n.warnings=a),n});return{validation:r,rows:s}}async function ue(e){let t=e.upsertKey?.trim();if(t!==void 0&&t.length===0)throw new u("Upsert key must be a non-empty field name.",c.USAGE);let r=e.settings??await g(e.pmRoot),o=e.transactionId?.trim()??"",s=o.length>0?o:I(e.input),i=await _(e.pmRoot,r),n=l(i.schema).definitions,a=(n.find(m=>m.metadata_key===t)??n.find(m=>m.key===t||p(m)===t))?.metadata_key??f(t),d=a===void 0?void 0:{key:a,existing:await M(e.pmRoot,r,i,a)};return{...T(e.input,{transactionId:s,idPrefix:r.id_prefix,runtimeFields:n,...d===void 0?{}:{upsert:d}}),transaction_id:s,transaction_id_source:o.length>0?"explicit":"derived",...d===void 0?{}:{upsert_key:d.key}}}export{ce as a,ue as b};
2
+ //# sourceMappingURL=chunk-DV7WBAKQ.js.map
@@ -1,2 +1,2 @@
1
- import{ga as p,ha as i,ia as v,ja as _}from"./chunk-NZAFLDSH.js";import{Pa as h}from"./chunk-WNEUWDUE.js";import u from"node:fs/promises";import c from"node:path";(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]="846100a9-4314-5f7c-b892-fa16e09bee5b")}catch{}})();function f(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="ENOENT"}function y(e){return e!=="invalid"&&e!=="unreadable"}function j(e){let t=JSON.parse(e);if(typeof t!="object"||t===null||Array.isArray(t))throw new SyntaxError("Invalid settings object");let r=t.extensions;if(r===void 0)return{enabled:[],disabled:[]};if(typeof r!="object"||r===null||Array.isArray(r))throw new SyntaxError("Invalid extensions settings");let n=r;if(n.enabled!==void 0&&(!Array.isArray(n.enabled)||!n.enabled.every(a=>typeof a=="string"))||n.disabled!==void 0&&(!Array.isArray(n.disabled)||!n.disabled.every(a=>typeof a=="string")))throw new SyntaxError("Invalid extension enablement lists");return{enabled:n.enabled??[],disabled:n.disabled??[]}}async function S(e){let t;try{t=await u.readFile(e,"utf8")}catch(r){return f(r)?{status:"absent",enabled:[],disabled:[]}:{status:"unreadable",enabled:[],disabled:[],error:{code:"settings_unreadable",path:e}}}try{return{status:"ok",...j(t)}}catch{return{status:"invalid",enabled:[],disabled:[],error:{code:"settings_invalid",path:e}}}}async function A(e){let t;try{t=await u.readFile(e,"utf8")}catch(r){if(f(r))try{if((await u.stat(c.dirname(e))).isDirectory())return{status:"absent",entries:[]}}catch(n){if(f(n))return{status:"absent",entries:[]}}return{status:"unreadable",entries:[],error:{code:"managed_state_unreadable",path:e}}}try{let r=JSON.parse(t),n=_(r);if(!n||typeof r!="object"||r===null||!Array.isArray(r.entries)||n.entries.length!==r.entries.length)throw new SyntaxError("Invalid managed extension state");return{status:"ok",entries:n.entries}}catch{return{status:"invalid",entries:[],error:{code:"managed_state_invalid",path:e}}}}async function I(e){try{return{directories:(await u.readdir(e,{withFileTypes:!0})).filter(t=>t.isDirectory()).map(t=>t.name).sort((t,r)=>t.localeCompare(r))}}catch(t){return f(t)?{directories:[]}:{directories:[],error:{code:"extensions_unreadable",path:e}}}}async function D(e){let t;try{t=await u.readFile(e,"utf8")}catch(r){return f(r)?{manifest:null,error:{code:"manifest_invalid",path:e}}:{manifest:null,error:{code:"manifest_unreadable",path:e}}}try{let r=v(JSON.parse(t));return r?{manifest:r}:{manifest:null,error:{code:"manifest_invalid",path:e}}}catch{return{manifest:null,error:{code:"manifest_invalid",path:e}}}}function M(e){let t=e.manifest?.name??e.directory,r=new Set(p(e.settings.enabled)),n=new Set(p(e.settings.disabled)),a=!y(e.settings.status)||!e.manifest?null:!n.has(t)&&(r.size===0||r.has(t)),o=y(e.managed.status)?e.managed.entries.some(d=>i(d.name)===i(t)||i(d.directory)===i(e.directory)):null;return{name:t,directory:e.directory,scope:e.scope,installed:!0,status:e.manifest?a===!1?"inactive":"installed":"malformed_manifest",configured_enabled:a,managed:o,runtime_active:null,...e.manifest?{version:e.manifest.version}:{}}}async function R(e){let t=e.scope??"project",r=t==="global"?h(e.cwd??process.cwd()):e.pmRoot,n=c.join(r,"extensions"),a=await S(c.join(r,"settings.json")),o=await A(c.join(n,".managed-extensions.json")),d=await I(n),l=[];for(let s of[a,o,d])s.error&&l.push(s.error);let m=e.name?.trim(),b=[];for(let s of d.directories){let x=c.join(n,s,"manifest.json"),g=await D(x);g.error&&l.push(g.error);let w=M({directory:s,scope:t,manifest:g.manifest,settings:a,managed:o});m&&![w.name,s].some(E=>i(E)===i(m))||b.push(w)}return m&&b.length===0&&l.every(s=>s.code!=="extensions_unreadable")&&b.push({name:m,directory:null,scope:t,installed:!1,status:"absent",configured_enabled:y(a.status)?!1:null,managed:y(o.status)?!1:null,runtime_active:null}),{scope:t,complete:l.length===0,settings_status:a.status,managed_state_status:o.status,extensions:b,errors:l}}export{R as a};
2
- //# sourceMappingURL=chunk-F6FBGLR7.js.map
1
+ import{ga as p,ha as i,ia as v,ja as _}from"./chunk-QCTA2UFR.js";import{Pa as h}from"./chunk-PZI6CR24.js";import u from"node:fs/promises";import c from"node:path";(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]="846100a9-4314-5f7c-b892-fa16e09bee5b")}catch{}})();function f(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="ENOENT"}function y(e){return e!=="invalid"&&e!=="unreadable"}function j(e){let t=JSON.parse(e);if(typeof t!="object"||t===null||Array.isArray(t))throw new SyntaxError("Invalid settings object");let r=t.extensions;if(r===void 0)return{enabled:[],disabled:[]};if(typeof r!="object"||r===null||Array.isArray(r))throw new SyntaxError("Invalid extensions settings");let n=r;if(n.enabled!==void 0&&(!Array.isArray(n.enabled)||!n.enabled.every(a=>typeof a=="string"))||n.disabled!==void 0&&(!Array.isArray(n.disabled)||!n.disabled.every(a=>typeof a=="string")))throw new SyntaxError("Invalid extension enablement lists");return{enabled:n.enabled??[],disabled:n.disabled??[]}}async function S(e){let t;try{t=await u.readFile(e,"utf8")}catch(r){return f(r)?{status:"absent",enabled:[],disabled:[]}:{status:"unreadable",enabled:[],disabled:[],error:{code:"settings_unreadable",path:e}}}try{return{status:"ok",...j(t)}}catch{return{status:"invalid",enabled:[],disabled:[],error:{code:"settings_invalid",path:e}}}}async function A(e){let t;try{t=await u.readFile(e,"utf8")}catch(r){if(f(r))try{if((await u.stat(c.dirname(e))).isDirectory())return{status:"absent",entries:[]}}catch(n){if(f(n))return{status:"absent",entries:[]}}return{status:"unreadable",entries:[],error:{code:"managed_state_unreadable",path:e}}}try{let r=JSON.parse(t),n=_(r);if(!n||typeof r!="object"||r===null||!Array.isArray(r.entries)||n.entries.length!==r.entries.length)throw new SyntaxError("Invalid managed extension state");return{status:"ok",entries:n.entries}}catch{return{status:"invalid",entries:[],error:{code:"managed_state_invalid",path:e}}}}async function I(e){try{return{directories:(await u.readdir(e,{withFileTypes:!0})).filter(t=>t.isDirectory()).map(t=>t.name).sort((t,r)=>t.localeCompare(r))}}catch(t){return f(t)?{directories:[]}:{directories:[],error:{code:"extensions_unreadable",path:e}}}}async function D(e){let t;try{t=await u.readFile(e,"utf8")}catch(r){return f(r)?{manifest:null,error:{code:"manifest_invalid",path:e}}:{manifest:null,error:{code:"manifest_unreadable",path:e}}}try{let r=v(JSON.parse(t));return r?{manifest:r}:{manifest:null,error:{code:"manifest_invalid",path:e}}}catch{return{manifest:null,error:{code:"manifest_invalid",path:e}}}}function M(e){let t=e.manifest?.name??e.directory,r=new Set(p(e.settings.enabled)),n=new Set(p(e.settings.disabled)),a=!y(e.settings.status)||!e.manifest?null:!n.has(t)&&(r.size===0||r.has(t)),o=y(e.managed.status)?e.managed.entries.some(d=>i(d.name)===i(t)||i(d.directory)===i(e.directory)):null;return{name:t,directory:e.directory,scope:e.scope,installed:!0,status:e.manifest?a===!1?"inactive":"installed":"malformed_manifest",configured_enabled:a,managed:o,runtime_active:null,...e.manifest?{version:e.manifest.version}:{}}}async function R(e){let t=e.scope??"project",r=t==="global"?h(e.cwd??process.cwd()):e.pmRoot,n=c.join(r,"extensions"),a=await S(c.join(r,"settings.json")),o=await A(c.join(n,".managed-extensions.json")),d=await I(n),l=[];for(let s of[a,o,d])s.error&&l.push(s.error);let m=e.name?.trim(),b=[];for(let s of d.directories){let x=c.join(n,s,"manifest.json"),g=await D(x);g.error&&l.push(g.error);let w=M({directory:s,scope:t,manifest:g.manifest,settings:a,managed:o});m&&![w.name,s].some(E=>i(E)===i(m))||b.push(w)}return m&&b.length===0&&l.every(s=>s.code!=="extensions_unreadable")&&b.push({name:m,directory:null,scope:t,installed:!1,status:"absent",configured_enabled:y(a.status)?!1:null,managed:y(o.status)?!1:null,runtime_active:null}),{scope:t,complete:l.length===0,settings_status:a.status,managed_state_status:o.status,extensions:b,errors:l}}export{R as a};
2
+ //# sourceMappingURL=chunk-EBAHNZJT.js.map
@@ -1,3 +1,3 @@
1
- import{a as k,c as I,d as A,e as E,k as T,m as _}from"./chunk-L4WWG2H6.js";import{lb as b,mb as v,nb as R}from"./chunk-CZETQYKO.js";import{Qc as w,vc as f,yc as g,zc as a}from"./chunk-T2MNRM3S.js";import{ba as D,md as H}from"./chunk-D727C4RO.js";import{Ph as x,Sh as m,Th as y,ud as C}from"./chunk-WNEUWDUE.js";import{A as c,C as p}from"./chunk-O4ZLEN4T.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="631e56aa-4d7e-58b6-bbea-a0d320716b82")}catch{}})();(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="0bcdd63c-5fd3-585d-a6c5-9393029ef864")}catch{}})();(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="4dce4f19-071c-54a8-be0d-5975d9e3b34b")}catch{}})();(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="f330a0c5-a967-5383-9c27-efa4a39e0f0d")}catch{}})();(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="f910b36e-c3ed-532e-a679-12547d249443")}catch{}})();function O(t,e){if(typeof t!="string")return;let o=Number.parseInt(t,10);if(!/^\d+$/.test(t.trim())||!Number.isSafeInteger(o))throw new p(`history-compact ${e} must be a non-negative integer.`,c.USAGE);return o}async function S(t,e,o){let r=f(o),n=Date.now(),i=await D(a(e,"ids")),l=i===void 0?void 0:H(i),d=O(e.allOver,"--all-over"),u=O(e.minEntries,"--min-entries");if(e.closed===!0&&e.allStreams===!0)throw new p("history-compact: --closed and --all-streams are mutually exclusive; pick one lifecycle scope.",c.USAGE);let s=e.closed===!0?"closed":e.allStreams===!0?"all-streams":void 0;if((l!==void 0||d!==void 0||s!==void 0)&&typeof e.before=="string")throw new p("history-compact: --before applies only in single-id mode (bulk mode always compacts full streams).",c.USAGE);if(I(t,{ids:l,allOver:d,scope:s}),t!==void 0&&u!==void 0)throw new p("history-compact: --min-entries applies only in bulk mode (single-id mode compacts the named stream).",c.USAGE);if(t===void 0){let h=await A({ids:l,scope:s,allOver:d,minEntries:u,dryRun:e.dryRun===!0,author:a(e,"author"),message:a(e,"message"),force:!!e.force},r);m(h,r),h.totals.items_errored>0&&(process.exitCode=c.GENERIC_FAILURE)}else{let h=await k(t,{before:a(e,"before"),dryRun:e.dryRun===!0,author:a(e,"author"),message:a(e,"message"),force:!!e.force},r);m(h,r)}r.profile&&y(`profile:command=history-compact took_ms=${Date.now()-n}`)}async function N(t,e,o,r){let n=f(r),i=Date.now(),l=await _(t,e,{author:a(o,"author"),message:a(o,"message"),force:!!o.force},n);await w(n,l),m(l,n),n.profile&&y(`profile:command=restore took_ms=${Date.now()-i}`)}async function B(t,e){let o=f(e),r=await T({verify:a(t,"verify"),output:a(t,"output"),hashAlgorithm:a(t,"hashAlgorithm")},o);"format"in r?(C(r),o.quiet||x(`${JSON.stringify(r,null,2)}
1
+ import{a as k,c as I,d as A,e as E,k as T,m as _}from"./chunk-XN2BRWDD.js";import{lb as b,mb as v,nb as R}from"./chunk-JLQ7O6UV.js";import{Qc as w,vc as f,yc as g,zc as a}from"./chunk-SVVFJPNW.js";import{ba as D,md as H}from"./chunk-GZ52WAY2.js";import{Uh as x,Xh as m,Yh as y,zd as C}from"./chunk-PZI6CR24.js";import{A as c,C as p}from"./chunk-O4ZLEN4T.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="631e56aa-4d7e-58b6-bbea-a0d320716b82")}catch{}})();(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="0bcdd63c-5fd3-585d-a6c5-9393029ef864")}catch{}})();(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="4dce4f19-071c-54a8-be0d-5975d9e3b34b")}catch{}})();(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="f330a0c5-a967-5383-9c27-efa4a39e0f0d")}catch{}})();(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="f910b36e-c3ed-532e-a679-12547d249443")}catch{}})();function O(t,e){if(typeof t!="string")return;let o=Number.parseInt(t,10);if(!/^\d+$/.test(t.trim())||!Number.isSafeInteger(o))throw new p(`history-compact ${e} must be a non-negative integer.`,c.USAGE);return o}async function S(t,e,o){let r=f(o),n=Date.now(),i=await D(a(e,"ids")),l=i===void 0?void 0:H(i),d=O(e.allOver,"--all-over"),u=O(e.minEntries,"--min-entries");if(e.closed===!0&&e.allStreams===!0)throw new p("history-compact: --closed and --all-streams are mutually exclusive; pick one lifecycle scope.",c.USAGE);let s=e.closed===!0?"closed":e.allStreams===!0?"all-streams":void 0;if((l!==void 0||d!==void 0||s!==void 0)&&typeof e.before=="string")throw new p("history-compact: --before applies only in single-id mode (bulk mode always compacts full streams).",c.USAGE);if(I(t,{ids:l,allOver:d,scope:s}),t!==void 0&&u!==void 0)throw new p("history-compact: --min-entries applies only in bulk mode (single-id mode compacts the named stream).",c.USAGE);if(t===void 0){let h=await A({ids:l,scope:s,allOver:d,minEntries:u,dryRun:e.dryRun===!0,author:a(e,"author"),message:a(e,"message"),force:!!e.force},r);m(h,r),h.totals.items_errored>0&&(process.exitCode=c.GENERIC_FAILURE)}else{let h=await k(t,{before:a(e,"before"),dryRun:e.dryRun===!0,author:a(e,"author"),message:a(e,"message"),force:!!e.force},r);m(h,r)}r.profile&&y(`profile:command=history-compact took_ms=${Date.now()-n}`)}async function N(t,e,o,r){let n=f(r),i=Date.now(),l=await _(t,e,{author:a(o,"author"),message:a(o,"message"),force:!!o.force},n);await w(n,l),m(l,n),n.profile&&y(`profile:command=restore took_ms=${Date.now()-i}`)}async function B(t,e){let o=f(e),r=await T({verify:a(t,"verify"),output:a(t,"output"),hashAlgorithm:a(t,"hashAlgorithm")},o);"format"in r?(C(r),o.quiet||x(`${JSON.stringify(r,null,2)}
2
2
  `)):m(r,o),"ok"in r&&!r.ok&&(process.exitCode=c.GENERIC_FAILURE)}function Z(t,e){t.command(e?"attest":"history-attest",{hidden:!e}).summary("Export or verify history proof.").option("--verify <file>","Compare retained streams with a detached JSON proof").option("--output <file>","Create a proof file and return a compact receipt").option("--hash-algorithm <name>","Bundle digest algorithm: sha256 (default) or sha512").description("Export exact-byte history commitments, or verify an independently retained proof without tracker writes.").action(B),t.command("restore",{hidden:!e}).summary("Restore a version.").argument("<id>","Item id").argument("<target>","Restore target timestamp or version number").option("--author <value>","Mutation author").option("--message <value>","History message").option("--force","Force ownership/lock override").description("Restore an item to an earlier timestamp or version.").action(N),t.command(e?"redact":"history-redact",{hidden:!e}).summary("Redact sensitive values.").argument("<id>","Item id").option("--literal <value>","Literal; repeatable",g).option("--regex <value>","Raw RegExp source (repeatable; e.g. /var/[a-z]+) or /pattern/flags. Leading-slash input is a literal only when the final unescaped slash is followed by supported JavaScript flag letters or nothing.",g).option("--replacement <value>",'Default: "[redacted]"').option("--dry-run","Preview; no item/history edits").option("--author <value>","Author").option("--message <value>","Audit marker message").option("--force","Override owner/lock").description("Redact and reseal item history.").action(async(o,r,n)=>{let i=f(n),l=Date.now(),d=Array.isArray(r.literal)?r.literal:void 0,u=Array.isArray(r.regex)?r.regex:void 0,s=await E(o,{literal:d,regex:u,replacement:a(r,"replacement"),dryRun:r.dryRun===!0,author:a(r,"author"),message:a(r,"message"),force:!!r.force},i);s.changed&&!s.dry_run&&await w(i,s),m(s,i),i.profile&&y(`profile:command=history-redact took_ms=${Date.now()-l}`)}),t.command(e?"repair":"history-repair",{hidden:!e}).summary("Repair drift.").argument("[id]","Item id (omit with --all)").option("--salvage-tail","Recover invalid tail; requires verified prefix").option("--all","Scan every stream for drift and repair each drifted stream in one audited pass").option("--dry-run","Preview the re-anchor impact without writing the history file").option("--normalize-provenance","Remove invalid provenance; return aggregate-only evidence").option("--author <value>","Mutation author").option("--message <value>","Audit history message for the repair marker entry").option("--force","Force ownership/lock override").description("Re-anchor a drifted item history chain (recompute hashes, reconcile with the on-disk item) and record an audit marker. Use --all to repair every drifted stream.").action(async(o,r,n)=>{let i=f(n),l=Date.now(),d=r.all===!0;v(o,d);let u={dryRun:r.dryRun===!0,author:a(r,"author"),message:a(r,"message"),force:!!r.force,normalizeProvenance:r.normalizeProvenance===!0,salvageTail:r.salvageTail===!0};if(d){let s=await R(u,i);m(s,i),s.totals.failed>0&&(process.exitCode=c.GENERIC_FAILURE)}else{let s=await b(o,u,i);m(s,i)}i.profile&&y(`profile:command=history-repair took_ms=${Date.now()-l}`)}),t.command(e?"compact":"history-compact",{hidden:!e}).summary("Compact streams.").argument("[id]","Item id (omit when using a bulk selector)").option("--before <value>","Compact entries strictly before this version number or ISO timestamp (single-id mode only)").option("--ids <value>","Bulk IDs: comma/newline text, - stdin, or @path file").option("--all-over <n>","Bulk: compact every stream with more than N entries").option("--closed","Bulk: compact only closed (terminal) items' streams").option("--all-streams","Bulk: compact every history stream regardless of lifecycle state").option("--min-entries <n>","Bulk: skip streams with at most N entries (already compact; default 3)").option("--dry-run","Preview compaction impact without writing the history file").option("--author <value>","Mutation author").option("--message <value>","Audit history message for the compaction marker entry").option("--force","Force ownership/lock override").description("Compact item history streams into a synthetic baseline plus retained tail entries. Pass an item id for one stream, or a bulk selector (--ids/--all-over/--closed/--all-streams) to compact many.").action(S)}export{Z as a};
3
- //# sourceMappingURL=chunk-BSJSGDA3.js.map
3
+ //# sourceMappingURL=chunk-FM375BHH.js.map