@unbrained/pm-cli 2026.8.18 → 2026.8.19

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 (139) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +16 -2
  3. package/dist/cli/error-guidance.js +3 -2
  4. package/dist/cli/help-content.js +32 -13
  5. package/dist/cli/help-json-payload.d.ts +15 -0
  6. package/dist/cli/help-json-payload.js +101 -23
  7. package/dist/cli/main.js +6 -2
  8. package/dist/cli/register-list-query.js +8 -5
  9. package/dist/cli/register-mutation.js +8 -8
  10. package/dist/cli/register-operations.js +6 -6
  11. package/dist/cli-bundle/bundle-manifest.json +139 -139
  12. package/dist/cli-bundle/chunks/chunk-4NRRH7AM.js +2 -0
  13. package/dist/cli-bundle/chunks/{chunk-UYCLQVL2.js → chunk-4THEB6PD.js} +2 -2
  14. package/dist/cli-bundle/chunks/{chunk-BSK2IN3C.js → chunk-BHYMXLAE.js} +2 -2
  15. package/dist/cli-bundle/chunks/chunk-GWMXAQOD.js +197 -0
  16. package/dist/cli-bundle/chunks/chunk-HVFQTLYM.js +35 -0
  17. package/dist/cli-bundle/chunks/chunk-OI4XI562.js +5 -0
  18. package/dist/cli-bundle/chunks/{chunk-YRGOLZA7.js → chunk-OIOKV6NO.js} +3 -3
  19. package/dist/cli-bundle/chunks/{chunk-5UZZAJKR.js → chunk-QXSH7BLM.js} +2 -2
  20. package/dist/cli-bundle/chunks/{chunk-RZQTVMRQ.js → chunk-TOXJM4WA.js} +2 -2
  21. package/dist/cli-bundle/chunks/{chunk-GNFAFIJI.js → chunk-YBMRWW4E.js} +44 -44
  22. package/dist/cli-bundle/chunks/{register-list-query-I23LALEE.js → register-list-query-Y56KINDU.js} +11 -11
  23. package/dist/cli-bundle/chunks/register-mutation-AUWVCW4M.js +20 -0
  24. package/dist/cli-bundle/chunks/register-operations-PZQPHXW5.js +2 -0
  25. package/dist/cli-bundle/chunks/{register-setup-PPPEF3SN.js → register-setup-I4LUHGVW.js} +2 -2
  26. package/dist/cli-bundle/focused-chunks/{chunk-5AF3ZBNB.js → chunk-34QBIYZI.js} +2 -2
  27. package/dist/cli-bundle/focused-chunks/{chunk-V5XTGLK7.js → chunk-BJRYFVSH.js} +2 -2
  28. package/dist/cli-bundle/focused-chunks/chunk-DKPLYW3L.js +2 -0
  29. package/dist/cli-bundle/focused-chunks/{chunk-ODOVCP45.js → chunk-EF6ZS5GH.js} +44 -44
  30. package/dist/cli-bundle/focused-chunks/{chunk-EX6MKP2X.js → chunk-ESISGDAY.js} +2 -2
  31. package/dist/cli-bundle/focused-chunks/{chunk-EUEGXZ2A.js → chunk-EXBCLIBU.js} +2 -2
  32. package/dist/cli-bundle/focused-chunks/{chunk-UI6AJ5TD.js → chunk-JDOMQ7VQ.js} +2 -2
  33. package/dist/cli-bundle/focused-chunks/chunk-L623ZPNK.js +2 -0
  34. package/dist/cli-bundle/focused-chunks/chunk-MCZXYZAF.js +2 -0
  35. package/dist/cli-bundle/focused-chunks/chunk-ODHQEECS.js +2 -0
  36. package/dist/cli-bundle/focused-chunks/{chunk-3TKWMNKF.js → chunk-PRHY2IMX.js} +2 -2
  37. package/dist/cli-bundle/focused-chunks/chunk-RZU5U6Q7.js +2 -0
  38. package/dist/cli-bundle/focused-chunks/{chunk-M62NO7EI.js → chunk-US7VEYZG.js} +2 -2
  39. package/dist/cli-bundle/focused-chunks/{chunk-TN4AE665.js → chunk-VXDSU5MC.js} +2 -2
  40. package/dist/cli-bundle/focused-chunks/chunk-YBMGXBFV.js +16 -0
  41. package/dist/cli-bundle/focused-chunks/chunk-YLVBJ6GF.js +2 -0
  42. package/dist/cli-bundle/focused-chunks/{chunk-K43KKAFS.js → chunk-ZBIQQYMI.js} +2 -2
  43. package/dist/cli-bundle/main.js +13 -13
  44. package/dist/cli-bundle/sdk-authoring.js +1 -1
  45. package/dist/cli-bundle/sdk-contracts.js +2 -1
  46. package/dist/cli-bundle/sdk-core.js +31 -31
  47. package/dist/cli-bundle/sdk-governance.js +1 -1
  48. package/dist/cli-bundle/sdk-graph.js +1 -1
  49. package/dist/cli-bundle/sdk-merge.js +32 -32
  50. package/dist/cli-bundle/sdk-query.js +1 -1
  51. package/dist/cli-bundle/sdk-runtime.js +1 -1
  52. package/dist/cli-bundle/sdk-testing.js +1 -1
  53. package/dist/cli-bundle/sdk.js +5 -4
  54. package/dist/core/shared/errors.d.ts +2 -0
  55. package/dist/core/shared/errors.js +2 -2
  56. package/dist/sdk/agent/refusal-closure.d.ts +41 -0
  57. package/dist/sdk/agent/refusal-closure.js +92 -0
  58. package/dist/sdk/agent/refusal-reachability.d.ts +1 -1
  59. package/dist/sdk/agent-capability-contracts.d.ts +13 -0
  60. package/dist/sdk/agent-capability-contracts.js +104 -7
  61. package/dist/sdk/cli-contracts/command-aliases.js +18 -2
  62. package/dist/sdk/cli-contracts/commander-mutation-options.js +30 -6
  63. package/dist/sdk/cli-contracts/commander-types.js +5 -4
  64. package/dist/sdk/cli-contracts/flag-contracts.d.ts +5 -0
  65. package/dist/sdk/cli-contracts/flag-contracts.js +75 -8
  66. package/dist/sdk/cli-contracts/flag-lexicon-contracts.d.ts +55 -0
  67. package/dist/sdk/cli-contracts/flag-lexicon-contracts.js +240 -0
  68. package/dist/sdk/cli-contracts/grammar-contracts.d.ts +81 -0
  69. package/dist/sdk/cli-contracts/grammar-contracts.js +615 -2
  70. package/dist/sdk/cli-contracts/runtime-contracts.d.ts +15 -4
  71. package/dist/sdk/cli-contracts/runtime-contracts.js +42 -12
  72. package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +28 -1
  73. package/dist/sdk/cli-contracts/tool-option-contracts.js +38 -3
  74. package/dist/sdk/cli-contracts.d.ts +3 -2
  75. package/dist/sdk/cli-contracts.js +5 -4
  76. package/dist/sdk/context-intent-contracts.d.ts +2 -2
  77. package/dist/sdk/context-intent-contracts.js +22 -7
  78. package/dist/sdk/contracts.d.ts +2 -0
  79. package/dist/sdk/contracts.js +4 -2
  80. package/dist/sdk/flag-invocation-contracts.d.ts +37 -0
  81. package/dist/sdk/flag-invocation-contracts.js +218 -9
  82. package/dist/sdk/generated/generated-error-code-catalog-part-1.js +134 -2
  83. package/dist/sdk/generated/generated-error-code-catalog-part-2.js +154 -22
  84. package/dist/sdk/index.d.ts +7 -5
  85. package/dist/sdk/index.js +7 -5
  86. package/dist/sdk/output-projection.d.ts +2 -0
  87. package/dist/sdk/output-projection.js +11 -5
  88. package/dist/sdk/query/get.js +25 -6
  89. package/dist/sdk/query/list.js +16 -2
  90. package/dist/sdk/query/search-contracts.d.ts +1 -1
  91. package/dist/sdk/query/search-contracts.js +23 -9
  92. package/dist/sdk/query/search.js +3 -3
  93. package/dist/sdk/read-output/continuation.d.ts +1 -1
  94. package/dist/sdk/read-output/continuation.js +7 -24
  95. package/dist/sdk/read-output-contracts.js +55 -6
  96. package/dist/sdk/read-output-rows.d.ts +4 -0
  97. package/dist/sdk/read-output-rows.js +47 -18
  98. package/dist/sdk/runtime.js +9 -5
  99. package/dist/sdk/workspace-snapshot.d.ts +2 -0
  100. package/dist/sdk/workspace-snapshot.js +10 -2
  101. package/docs/COMMANDS.md +16 -4
  102. package/docs/OUTPUT_PROJECTION_CONTRACTS.md +11 -2
  103. package/docs/READ_OUTPUT_CONTRACTS.md +10 -6
  104. package/docs/SDK.md +6 -0
  105. package/docs/TESTING.md +14 -1
  106. package/docs/generated/AGENT_COMMAND_SURFACE.md +78 -78
  107. package/docs/generated/FLAG_LEXICON_BUDGETS.md +76 -0
  108. package/marketplace.json +2 -2
  109. package/package.json +5 -3
  110. package/packages/pm-beads/package.json +1 -1
  111. package/packages/pm-calendar/package.json +1 -1
  112. package/packages/pm-command-kit/package.json +1 -1
  113. package/packages/pm-digital-twin/package.json +1 -1
  114. package/packages/pm-governance-audit/package.json +1 -1
  115. package/packages/pm-guide-shell/package.json +1 -1
  116. package/packages/pm-kanban/package.json +1 -1
  117. package/packages/pm-lifecycle-hooks/package.json +1 -1
  118. package/packages/pm-linked-test-adapters/package.json +1 -1
  119. package/packages/pm-search-advanced/package.json +1 -1
  120. package/packages/pm-templates/package.json +1 -1
  121. package/packages/pm-todos/package.json +1 -1
  122. package/packages/pm-vcs/package.json +1 -1
  123. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  124. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  125. package/scripts/generate-agent-capability-surfaces.mjs +20 -14
  126. package/sdk/public-surface.json +576 -12
  127. package/dist/cli-bundle/chunks/chunk-ALDJGKAK.js +0 -2
  128. package/dist/cli-bundle/chunks/chunk-DY4DMUMC.js +0 -197
  129. package/dist/cli-bundle/chunks/chunk-L5Q2CLPE.js +0 -35
  130. package/dist/cli-bundle/chunks/chunk-PVRUN5ZS.js +0 -5
  131. package/dist/cli-bundle/chunks/register-mutation-6YGU3GPH.js +0 -20
  132. package/dist/cli-bundle/chunks/register-operations-4HTFC6J7.js +0 -2
  133. package/dist/cli-bundle/focused-chunks/chunk-2PN4TJXH.js +0 -2
  134. package/dist/cli-bundle/focused-chunks/chunk-C5IW2NDA.js +0 -2
  135. package/dist/cli-bundle/focused-chunks/chunk-RNDNMARJ.js +0 -16
  136. package/dist/cli-bundle/focused-chunks/chunk-TVV2DONO.js +0 -2
  137. package/dist/cli-bundle/focused-chunks/chunk-WGHQVU6P.js +0 -2
  138. package/dist/cli-bundle/focused-chunks/chunk-XYNBXTDQ.js +0 -2
  139. package/dist/cli-bundle/focused-chunks/chunk-Z56ECT7I.js +0 -2
@@ -1,2 +1,2 @@
1
- import{a as Pe,b as Se,c as Oe,d as Ae,e as Fe,f as Re,g as Te,h as Me,i as $,j as D,k as L,l as j,m as K,p as H,q,w as U,x as V,y as z,z as W}from"./focused-chunks/chunk-TN4AE665.js";import{a as T,b as M,c as B,d as N,u as J}from"./focused-chunks/chunk-EUEGXZ2A.js";import"./focused-chunks/chunk-C5IW2NDA.js";import"./focused-chunks/chunk-EX6MKP2X.js";import"./focused-chunks/chunk-TVV2DONO.js";import{Xa as G,Za as Y,_a as X,b as y,c as x,f as m,g,k,l as E,m as b,n as C,o as w,sa as F,ta as R}from"./focused-chunks/chunk-UI6AJ5TD.js";import{b as Ce,c as we,d as Ie}from"./focused-chunks/chunk-2PN4TJXH.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="bbc8dcd1-7dde-54f5-bebf-6d95ea0aaa1e")}catch{}})();function Ke(e){return e}function He(e){return e}function Q(e,o){for(let r of o.commands??[])e.registerCommand(r);for(let[r,n]of Object.entries(o.commandOverrides??{}))e.registerCommand(r,n);for(let[r,n]of Object.entries(o.flags??{}))e.registerFlags(r,n);for(let[r,n]of Object.entries(o.parsers??{}))e.registerParser(r,n);for(let[r,n]of Object.entries(o.renderers??{}))if(typeof n=="function")e.registerRenderer(r,n);else{let{run:t,...s}=n;e.registerRenderer(r,t,s)}for(let[r,n]of Object.entries(o.services??{}))e.registerService(r,n)}function Z(e,o){for(let s of o.preflights??[])e.registerPreflight(s);let r=o.itemTypes??[];r.length>0&&e.registerItemTypes(r);let n=o.itemFields??[];n.length>0&&e.registerItemFields(n);let t=o.relationshipKinds??[];t.length>0&&e.registerRelationshipKinds(t);for(let s of o.migrations??[])e.registerMigration(s);for(let s of o.profiles??[])e.registerProfile(s)}function ee(e,o){for(let r of o.searchProviders??[])e.registerSearchProvider(r);for(let r of o.vectorStoreAdapters??[])e.registerVectorStoreAdapter(r);for(let r of o.assuranceProviders??[])e.registerAssuranceMeasurementProvider(r);for(let r of o.importers??[])e.registerImporter(r.name,r.importer,r.options);for(let r of o.exporters??[])e.registerExporter(r.name,r.exporter,r.options)}function re(e,o){for(let r of o.beforeCommand??[])e.hooks.beforeCommand(r);for(let r of o.beforeMutation??[])e.hooks.beforeMutation(r);for(let r of o.afterCommand??[])e.hooks.afterCommand(r);for(let r of o.onWrite??[])e.hooks.onWrite(r);for(let r of o.onRead??[])e.hooks.onRead(r);for(let r of o.onIndex??[])e.hooks.onIndex(r)}function oe(e){let r={activate:async n=>{Q(n,e),Z(n,e),ee(n,e),re(n,e.hooks??{}),await e.activate?.(n)}};return e.manifest&&(r.manifest=e.manifest),e.deactivate&&(r.deactivate=e.deactivate),r}function f(e){let o=e.flatMap(r=>r??[]);return o.length>0?o:void 0}function l(e){let o=Object.assign({},...e.map(r=>r??{}));return Object.keys(o).length>0?o:void 0}function ne(e){let o={};for(let r of e)for(let[n,t]of Object.entries(r??{}))o[n]=[...o[n]??[],...t];return Object.keys(o).length>0?o:void 0}var te=["beforeCommand","beforeMutation","afterCommand","onWrite","onRead","onIndex"];function ie(e,o,r){let n=o.map(s=>s?.[r]),t=f(n);if(t!==void 0){let s=e;s[r]=t}}function se(e){let o={};for(let r of te)ie(o,e,r);return Object.keys(o).length>0?o:void 0}function qe(...e){let o={},r=(i,c)=>{c!==void 0&&(o[i]=c)};r("commands",f(e.map(i=>i.commands))),r("commandOverrides",l(e.map(i=>i.commandOverrides))),r("flags",ne(e.map(i=>i.flags))),r("parsers",l(e.map(i=>i.parsers))),r("renderers",l(e.map(i=>i.renderers))),r("services",l(e.map(i=>i.services))),r("preflights",f(e.map(i=>i.preflights))),r("itemTypes",f(e.map(i=>i.itemTypes))),r("itemFields",f(e.map(i=>i.itemFields))),r("relationshipKinds",f(e.map(i=>i.relationshipKinds))),r("migrations",f(e.map(i=>i.migrations))),r("profiles",f(e.map(i=>i.profiles))),r("searchProviders",f(e.map(i=>i.searchProviders))),r("vectorStoreAdapters",f(e.map(i=>i.vectorStoreAdapters))),r("assuranceProviders",f(e.map(i=>i.assuranceProviders))),r("importers",f(e.map(i=>i.importers))),r("exporters",f(e.map(i=>i.exporters))),r("hooks",se(e.map(i=>i.hooks)));let n;for(let i of e)i.manifest&&(n=i.manifest);r("manifest",n);let t=e.some(i=>i.activate);r("activate",t?async i=>{for(let c of e)c.activate&&await c.activate(i)}:void 0);let s=e.some(i=>i.deactivate);return r("deactivate",s?async()=>{let i=[];for(let c of[...e].reverse())if(c.deactivate)try{await c.deactivate()}catch(a){i.push(a)}if(i.length>0)throw i.length>1?new AggregateError(i,"Multiple extension blueprint deactivate hooks failed."):i[0]}:void 0),o}var ae=[["commands","commands"],["commandOverrides","commands"],["flags","schema"],["itemTypes","schema"],["itemFields","schema"],["relationshipKinds","schema"],["migrations","schema"],["profiles","schema"],["parsers","parser"],["renderers","renderers"],["services","services"],["preflights","preflight"],["searchProviders","search"],["vectorStoreAdapters","search"],["assuranceProviders","services"],["importers","importers"],["exporters","importers"]];function u(e){return e?Array.isArray(e)?e.length>0:Object.keys(e).length>0:!1}function h(e){let o=new Set;for(let[t,s]of ae)u(e[t])&&o.add(s);(e.commands??[]).filter(p).some(t=>t.flags!==void 0)&&o.add("schema");let r=[...e.importers??[],...e.exporters??[]].filter(p);r.some(t=>t?.options?.flags!==void 0)&&o.add("schema"),r.some(t=>typeof t=="object")&&o.add("commands");let n=e.hooks??{};return[n.beforeCommand,n.beforeMutation,n.afterCommand,n.onWrite,n.onRead,n.onIndex].some(u)&&o.add("hooks"),[...o].sort((t,s)=>t.localeCompare(s))}var ce=[["beforeCommand","before_command"],["beforeMutation","before_mutation"],["afterCommand","after_command"],["onWrite","on_write"],["onRead","on_read"],["onIndex","on_index"]];function d(e){return[...new Set(e)].sort((o,r)=>o.localeCompare(r))}function p(e){return e!=null}function _(e){return m(`${e.name} import`)}function v(e){return m(`${e.name} export`)}function de(e,o,r){return[...e.map(n=>m(n.name)),...o.filter(n=>n.options!==void 0).map(_),...r.filter(n=>n.options!==void 0).map(v)]}function me(e,o,r,n){return[...Object.keys(e.flags??{}).map(t=>m(t)),...o.filter(t=>t.flags!==void 0).map(t=>m(t.name)),...r.filter(t=>t.options?.flags!==void 0).map(_),...n.filter(t=>t.options?.flags!==void 0).map(v)]}function fe(e){return ce.filter(([o])=>(e[o]?.length??0)>0).map(([,o])=>o)}function pe(e){let o=Object.entries(e??{}).filter(([,r])=>typeof r!="function"&&((r.commands?.length??0)>0||r.resultDiscriminator!==void 0)).map(([r,n])=>{let t=n;return{format:r,commands:d((t.commands??[]).map(s=>m(s))),result_discriminator:t.resultDiscriminator!==void 0}}).sort((r,n)=>r.format.localeCompare(n.format));return o.length>0?{renderer_ownership:o}:{}}function le(e){return!e||e.length===0?{}:{assurance_providers:d(e.map(o=>o.id))}}function ue(e,o,r){return{item_types:d((e.itemTypes??[]).map(n=>n.name)),item_fields:d((e.itemFields??[]).map(n=>n.name)),...(e.relationshipKinds?.length??0)>0?{relationship_kinds:d(e.relationshipKinds.map(n=>n.kind))}:{},migrations:d((e.migrations??[]).flatMap(n=>typeof n.id=="string"?[n.id]:[])),profiles:d((e.profiles??[]).map(n=>n.name)),importers:d(o.map(n=>m(n.name))),exporters:d(r.map(n=>m(n.name))),search_providers:d((e.searchProviders??[]).map(n=>n.name)),vector_store_adapters:d((e.vectorStoreAdapters??[]).map(n=>n.name)),...le(e.assuranceProviders),parser_overrides:d(Object.keys(e.parsers??{}).map(n=>m(n))),service_overrides:d(Object.keys(e.services??{}).map(n=>String(n).trim().toLowerCase())),renderer_overrides:d(Object.keys(e.renderers??{}).map(n=>String(n).trim().toLowerCase())),...pe(e.renderers),preflight_overrides:(e.preflights??[]).length,preflight_ownership:(e.preflights??[]).map(n=>({commands:[...n.commands??[]]}))}}function Ue(e){let o=(e.commands??[]).filter(p),r=(e.importers??[]).filter(p),n=(e.exporters??[]).filter(p),t=r.map(_),s=n.map(v),i=de(o,r,n),c=me(e,o,r,n),a=e.hooks??{},O=ue(e,r,n);return{capabilities:h(e),commands:d(i),command_overrides:d(Object.keys(e.commandOverrides??{}).map(A=>m(A))),command_handlers:d([...i,...t,...s]),hooks:fe(a),flag_commands:d(c),...O}}var ge=["commands","commandOverrides","flags","parsers","renderers","services","preflights","itemTypes","itemFields","relationshipKinds","migrations","profiles","searchProviders","vectorStoreAdapters","assuranceProviders","importers","exporters"];function he(e){return(e.itemFields??[]).filter(o=>typeof o?.name=="string"&&g.has(o.name.trim())).map(o=>({code:"reserved_item_field",severity:"error",message:`Item field "${o.name}" collides with reserved item metadata; rename it with an extension-specific prefix before publishing.`,field:o.name}))}function _e(e){return[...Object.values(e.flags??{}).flat(),...(e.commands??[]).flatMap(r=>r.flags??[]),...(e.importers??[]).flatMap(r=>r.options?.flags??[]),...(e.exporters??[]).flatMap(r=>r.options?.flags??[])].flatMap(r=>{if(typeof r?.long!="string"&&typeof r?.short!="string")return[];let n=k(r.long,r.short);if(n===null)return[];let{token:t,failure:s}=n;return[{code:s,severity:"error",message:`Flag "${t}" ${E(t,s)}.`,field:t}]})}function P(e){let o=new Set;for(let r of e){let n=x(r)??y(r);n!==null&&o.add(n)}return[...o].sort((r,n)=>r.localeCompare(n))}function ve(e,o){let r=[];if(o===null)return e.length>0&&r.push({code:"manifest_capabilities_absent",severity:"warning",message:`Blueprint exercises ${e.length===1?"capability":"capabilities"} [${e.join(", ")}] but declares none; set capabilities to deriveExtensionCapabilities(blueprint) so the manifest grant matches.`}),r;let n=new Set(o),t=new Set(e);for(let s of e)n.has(s)||r.push({code:"capability_undeclared",severity:"error",message:`Blueprint exercises capability "${s}" but it is absent from the declared capabilities; activation throws extension_capability_missing \u2014 add "${s}" to the manifest capabilities.`,capability:s});for(let s of o)t.has(s)||r.push({code:"capability_unused",severity:"warning",message:`Capability "${s}" is declared but no blueprint surface exercises it; drop it to keep the manifest least-privilege (pm package doctor reports this as extension_capability_unused).`,capability:s});return r}function ye(e){let o=[],r=new Map;for(let t of e.commands??[]){let s=m(t.name);r.set(s,(r.get(s)??0)+1)}for(let[t,s]of r)s>1&&o.push({code:"duplicate_command",severity:"warning",message:`Command "${t}" is declared ${s} times in commands; the later registration shadows the earlier one at dispatch.`,command:t});let n=new Set(Object.keys(e.commandOverrides??{}).map(t=>m(t)));for(let t of r.keys())n.has(t)&&o.push({code:"command_override_conflict",severity:"warning",message:`Command "${t}" is declared both as a new command definition and as a command override; register one or the other.`,command:t});return o}function xe(e){let o=[];for(let r of ge)r in e&&!u(e[r])&&o.push({code:"empty_surface",severity:"warning",message:`Blueprint field "${r}" is present but empty; remove it or populate it.`,field:r});if("hooks"in e){let r=e.hooks??{};[r.beforeCommand,r.beforeMutation,r.afterCommand,r.onWrite,r.onRead,r.onIndex].some(u)||o.push({code:"empty_surface",severity:"warning",message:'Blueprint field "hooks" is present but registers no lifecycle hooks; remove it or populate it.',field:"hooks"})}return o}function ke(e,o={}){let r=h(e),n=o.declaredCapabilities??e.manifest?.capabilities,t=Array.isArray(n)?P(n):null,s=[...ve(r,t),...ye(e),..._e(e),...he(e),...xe(e)];return{ok:s.every(i=>i.severity!=="error"),findings:s,used:r,declared:t}}function S(e,o){let{additionalCapabilities:r,...n}=o,t=Array.isArray(r)?P(r):[],s=[...new Set([...h(e),...t])].sort((i,c)=>i.localeCompare(c));return{...n,capabilities:s}}function Ve(e,o){let r=S(e,o);return{module:oe({...e,manifest:r}),manifest:r}}function I(e,o){if(e.status==="absent"||e.status==="ok")return null;let r=`${e.kind}_${e.status}`,n="";switch(r){case"pm_min_version_invalid":n=`pm_min_version "${e.required}" is not a valid version; the extension is treated as incompatible and the loader skips it.`;break;case"pm_min_version_unchecked":n=`pm_min_version "${e.required}" could not be compared against pm ${o}; compatibility is unverified.`;break;case"pm_min_version_unmet":n=`Requires pm >= ${e.required} but the target is pm ${o}; the loader skips the extension.`;break;case"pm_max_version_invalid":n=`pm_max_version "${e.required}" is not a valid inclusive upper bound (version ranges are not allowed); the extension is treated as incompatible and the loader skips it.`;break;case"pm_max_version_unchecked":n=`pm_max_version "${e.required}" could not be compared against pm ${o}; compatibility is unverified.`;break;case"pm_max_version_exceeded":n=`Allows pm <= ${e.required} but the target is pm ${o}; the loader skips the extension.`;break;case"pm_max_version_exceeded_warn":n=`Target pm ${o} is newer than pm_max_version ${e.required}, but the "warn" exceeded mode lets it load with a warning.`;break}return{code:r,severity:e.allowed?"warning":"error",constraint:e.kind,required:e.required,current:o,message:n}}function Ee(e,o){let r=b(e.pm_min_version,o.pmVersion),n=C(e.pm_max_version,o.pmVersion,o.pmMaxVersionExceededMode??"block"),t=[],s=w(e);for(let a of s.unknownKeys)t.push({code:"manifest_unknown_key",severity:"warning",constraint:"manifest",required:a,current:o.pmVersion,path:a,...a==="compatibility"?{suggested_key:"pm_min_version"}:{},message:a==="compatibility"?'Manifest key "compatibility" is ignored; declare the canonical pm_min_version and optional pm_max_version fields instead.':`Manifest key "${a}" is not part of the extension manifest contract and will be ignored.`});s.missingVersionBounds&&t.push({code:"no_version_bounds_declared",severity:"warning",constraint:"manifest",required:"pm_min_version",current:o.pmVersion,path:"$",suggested_key:"pm_min_version",message:"No canonical pm version bounds are declared; add pm_min_version so compatibility intent is explicit."});let i=I(r,o.pmVersion);i!==null&&t.push(i);let c=I(n,o.pmVersion);return c!==null&&t.push(c),{compatible:r.allowed&&n.allowed,findings:t,pmVersion:o.pmVersion}}var be=new Set(["capability_undeclared","capability_unused","manifest_capabilities_absent"]);function ze(e,o={}){let r=ke(e,{declaredCapabilities:o.declaredCapabilities}),n=o.identity?S(e,o.identity):null,t=o.target?Ee(n??e.manifest??{},o.target):null,c=[...(n!==null&&o.declaredCapabilities===void 0?r.findings.filter(a=>!be.has(a.code)):r.findings).map(a=>({source:"blueprint",severity:a.severity,code:a.code,message:a.message})),...(t?.findings??[]).map(a=>({source:"compatibility",severity:a.severity,code:a.code,message:a.message}))];return{ok:c.every(a=>a.severity!=="error"),capabilities:r.used,blueprint:r,manifest:n,compatibility:t,findings:c}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="7fc669d4-1db2-5636-8304-2c111a684726")}catch{}})();function Ge(e){return e}function Ye(e){return e}function Xe(e){return e}function Je(e){return e}function Qe(e){return e}function Ze(e){return e}function er(e){return e}function rr(e){return e}function or(e){return e}function nr(e){return e}function tr(e){return e}function ir(e){return e}function sr(e){return e}function ar(e){return{handled:!0,result:e}}function cr(){return{handled:!1}}function dr(e){return e}function mr(e){return e}function fr(e){return e}function pr(e){return e}function lr(e){return e}function ur(e){return e}function gr(e){return e}function hr(e){return e}function _r(e){return e}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="6260572c-1496-58ef-9377-0825f4183bc6")}catch{}})();export{D as BUILTIN_PROFILES,Pe as EXTENSION_CAPABILITIES,Ie as EXTENSION_CAPABILITY_CONTRACT,Ce as EXTENSION_CAPABILITY_CONTRACT_VERSION,we as EXTENSION_CAPABILITY_LEGACY_ALIASES,G as EXTENSION_CAPABILITY_REGISTRATION_SURFACES,Se as EXTENSION_POLICY_MODES,Oe as EXTENSION_POLICY_SURFACES,Fe as EXTENSION_SANDBOX_PROFILES,Ae as EXTENSION_TRUST_MODES,Te as LIST_FILTER_EXTENSION_FLAG_DEFINITIONS,M as PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS,T as PM_PACKAGE_RESOURCE_KINDS,V as PROFILE_LINT_CODES,U as PROFILE_LINT_DIMENSIONS,$ as PROFILE_NAMES,g as RESERVED_ITEM_FIELD_NAMES,Me as SEARCH_EXTENSION_FLAG_DEFINITIONS,Ee as checkExtensionManifestCompatibility,N as collectPackageExtensionDirectories,Y as collectUsedExtensionCapabilities,oe as composeExtension,Ve as composeExtensionPackage,R as createExtensionContributionInventory,cr as declineServiceOverride,ur as defineAfterCommandHook,pr as defineBeforeCommandHook,lr as defineBeforeMutationHook,Xe as defineCommand,nr as defineCommandOverride,fr as defineExporter,Ke as defineExtension,He as defineExtensionBlueprint,Ge as defineExtensionManifest,Je as defineFlag,mr as defineImporter,Ze as defineItemField,Qe as defineItemType,er as defineMigration,_r as defineOnIndexHook,hr as defineOnReadHook,gr as defineOnWriteHook,tr as defineParserOverride,ir as definePreflightOverride,Ye as defineProjectProfile,dr as defineRendererOverride,rr as defineSearchProvider,sr as defineServiceOverride,or as defineVectorStoreAdapter,h as deriveExtensionCapabilities,Ue as describeExtensionBlueprint,H as describeProfileComposition,q as describeProjectProfile,ar as handleServiceOverride,ke as lintExtensionBlueprint,z as lintProjectProfile,K as listProfiles,qe as mergeExtensionBlueprints,F as normalizeExtensionContributionInventory,L as normalizeProfileName,W as planProfileApplication,ze as preflightExtension,B as readPmPackageManifest,X as reconcileExtensionCapabilityUsage,J as renderExtensionSurfaceMarkdown,j as resolveProfile,S as synthesizeExtensionManifest,Re as toExtensionFlagDefinitions};
1
+ import{a as Pe,b as Se,c as Oe,d as Ae,e as Fe,f as Re,g as Te,h as Me,i as $,j as D,k as L,l as j,m as K,p as H,q,w as U,x as V,y as z,z as W}from"./focused-chunks/chunk-VXDSU5MC.js";import{a as T,b as M,c as B,d as N,u as J}from"./focused-chunks/chunk-EXBCLIBU.js";import"./focused-chunks/chunk-MCZXYZAF.js";import"./focused-chunks/chunk-ESISGDAY.js";import"./focused-chunks/chunk-L623ZPNK.js";import{Xa as G,Za as Y,_a as X,b as y,c as x,f as m,g,k,l as E,m as b,n as C,o as w,sa as F,ta as R}from"./focused-chunks/chunk-JDOMQ7VQ.js";import{b as Ce,c as we,d as Ie}from"./focused-chunks/chunk-RZU5U6Q7.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="bbc8dcd1-7dde-54f5-bebf-6d95ea0aaa1e")}catch{}})();function Ke(e){return e}function He(e){return e}function Q(e,o){for(let r of o.commands??[])e.registerCommand(r);for(let[r,n]of Object.entries(o.commandOverrides??{}))e.registerCommand(r,n);for(let[r,n]of Object.entries(o.flags??{}))e.registerFlags(r,n);for(let[r,n]of Object.entries(o.parsers??{}))e.registerParser(r,n);for(let[r,n]of Object.entries(o.renderers??{}))if(typeof n=="function")e.registerRenderer(r,n);else{let{run:t,...s}=n;e.registerRenderer(r,t,s)}for(let[r,n]of Object.entries(o.services??{}))e.registerService(r,n)}function Z(e,o){for(let s of o.preflights??[])e.registerPreflight(s);let r=o.itemTypes??[];r.length>0&&e.registerItemTypes(r);let n=o.itemFields??[];n.length>0&&e.registerItemFields(n);let t=o.relationshipKinds??[];t.length>0&&e.registerRelationshipKinds(t);for(let s of o.migrations??[])e.registerMigration(s);for(let s of o.profiles??[])e.registerProfile(s)}function ee(e,o){for(let r of o.searchProviders??[])e.registerSearchProvider(r);for(let r of o.vectorStoreAdapters??[])e.registerVectorStoreAdapter(r);for(let r of o.assuranceProviders??[])e.registerAssuranceMeasurementProvider(r);for(let r of o.importers??[])e.registerImporter(r.name,r.importer,r.options);for(let r of o.exporters??[])e.registerExporter(r.name,r.exporter,r.options)}function re(e,o){for(let r of o.beforeCommand??[])e.hooks.beforeCommand(r);for(let r of o.beforeMutation??[])e.hooks.beforeMutation(r);for(let r of o.afterCommand??[])e.hooks.afterCommand(r);for(let r of o.onWrite??[])e.hooks.onWrite(r);for(let r of o.onRead??[])e.hooks.onRead(r);for(let r of o.onIndex??[])e.hooks.onIndex(r)}function oe(e){let r={activate:async n=>{Q(n,e),Z(n,e),ee(n,e),re(n,e.hooks??{}),await e.activate?.(n)}};return e.manifest&&(r.manifest=e.manifest),e.deactivate&&(r.deactivate=e.deactivate),r}function f(e){let o=e.flatMap(r=>r??[]);return o.length>0?o:void 0}function l(e){let o=Object.assign({},...e.map(r=>r??{}));return Object.keys(o).length>0?o:void 0}function ne(e){let o={};for(let r of e)for(let[n,t]of Object.entries(r??{}))o[n]=[...o[n]??[],...t];return Object.keys(o).length>0?o:void 0}var te=["beforeCommand","beforeMutation","afterCommand","onWrite","onRead","onIndex"];function ie(e,o,r){let n=o.map(s=>s?.[r]),t=f(n);if(t!==void 0){let s=e;s[r]=t}}function se(e){let o={};for(let r of te)ie(o,e,r);return Object.keys(o).length>0?o:void 0}function qe(...e){let o={},r=(i,c)=>{c!==void 0&&(o[i]=c)};r("commands",f(e.map(i=>i.commands))),r("commandOverrides",l(e.map(i=>i.commandOverrides))),r("flags",ne(e.map(i=>i.flags))),r("parsers",l(e.map(i=>i.parsers))),r("renderers",l(e.map(i=>i.renderers))),r("services",l(e.map(i=>i.services))),r("preflights",f(e.map(i=>i.preflights))),r("itemTypes",f(e.map(i=>i.itemTypes))),r("itemFields",f(e.map(i=>i.itemFields))),r("relationshipKinds",f(e.map(i=>i.relationshipKinds))),r("migrations",f(e.map(i=>i.migrations))),r("profiles",f(e.map(i=>i.profiles))),r("searchProviders",f(e.map(i=>i.searchProviders))),r("vectorStoreAdapters",f(e.map(i=>i.vectorStoreAdapters))),r("assuranceProviders",f(e.map(i=>i.assuranceProviders))),r("importers",f(e.map(i=>i.importers))),r("exporters",f(e.map(i=>i.exporters))),r("hooks",se(e.map(i=>i.hooks)));let n;for(let i of e)i.manifest&&(n=i.manifest);r("manifest",n);let t=e.some(i=>i.activate);r("activate",t?async i=>{for(let c of e)c.activate&&await c.activate(i)}:void 0);let s=e.some(i=>i.deactivate);return r("deactivate",s?async()=>{let i=[];for(let c of[...e].reverse())if(c.deactivate)try{await c.deactivate()}catch(a){i.push(a)}if(i.length>0)throw i.length>1?new AggregateError(i,"Multiple extension blueprint deactivate hooks failed."):i[0]}:void 0),o}var ae=[["commands","commands"],["commandOverrides","commands"],["flags","schema"],["itemTypes","schema"],["itemFields","schema"],["relationshipKinds","schema"],["migrations","schema"],["profiles","schema"],["parsers","parser"],["renderers","renderers"],["services","services"],["preflights","preflight"],["searchProviders","search"],["vectorStoreAdapters","search"],["assuranceProviders","services"],["importers","importers"],["exporters","importers"]];function u(e){return e?Array.isArray(e)?e.length>0:Object.keys(e).length>0:!1}function h(e){let o=new Set;for(let[t,s]of ae)u(e[t])&&o.add(s);(e.commands??[]).filter(p).some(t=>t.flags!==void 0)&&o.add("schema");let r=[...e.importers??[],...e.exporters??[]].filter(p);r.some(t=>t?.options?.flags!==void 0)&&o.add("schema"),r.some(t=>typeof t=="object")&&o.add("commands");let n=e.hooks??{};return[n.beforeCommand,n.beforeMutation,n.afterCommand,n.onWrite,n.onRead,n.onIndex].some(u)&&o.add("hooks"),[...o].sort((t,s)=>t.localeCompare(s))}var ce=[["beforeCommand","before_command"],["beforeMutation","before_mutation"],["afterCommand","after_command"],["onWrite","on_write"],["onRead","on_read"],["onIndex","on_index"]];function d(e){return[...new Set(e)].sort((o,r)=>o.localeCompare(r))}function p(e){return e!=null}function _(e){return m(`${e.name} import`)}function v(e){return m(`${e.name} export`)}function de(e,o,r){return[...e.map(n=>m(n.name)),...o.filter(n=>n.options!==void 0).map(_),...r.filter(n=>n.options!==void 0).map(v)]}function me(e,o,r,n){return[...Object.keys(e.flags??{}).map(t=>m(t)),...o.filter(t=>t.flags!==void 0).map(t=>m(t.name)),...r.filter(t=>t.options?.flags!==void 0).map(_),...n.filter(t=>t.options?.flags!==void 0).map(v)]}function fe(e){return ce.filter(([o])=>(e[o]?.length??0)>0).map(([,o])=>o)}function pe(e){let o=Object.entries(e??{}).filter(([,r])=>typeof r!="function"&&((r.commands?.length??0)>0||r.resultDiscriminator!==void 0)).map(([r,n])=>{let t=n;return{format:r,commands:d((t.commands??[]).map(s=>m(s))),result_discriminator:t.resultDiscriminator!==void 0}}).sort((r,n)=>r.format.localeCompare(n.format));return o.length>0?{renderer_ownership:o}:{}}function le(e){return!e||e.length===0?{}:{assurance_providers:d(e.map(o=>o.id))}}function ue(e,o,r){return{item_types:d((e.itemTypes??[]).map(n=>n.name)),item_fields:d((e.itemFields??[]).map(n=>n.name)),...(e.relationshipKinds?.length??0)>0?{relationship_kinds:d(e.relationshipKinds.map(n=>n.kind))}:{},migrations:d((e.migrations??[]).flatMap(n=>typeof n.id=="string"?[n.id]:[])),profiles:d((e.profiles??[]).map(n=>n.name)),importers:d(o.map(n=>m(n.name))),exporters:d(r.map(n=>m(n.name))),search_providers:d((e.searchProviders??[]).map(n=>n.name)),vector_store_adapters:d((e.vectorStoreAdapters??[]).map(n=>n.name)),...le(e.assuranceProviders),parser_overrides:d(Object.keys(e.parsers??{}).map(n=>m(n))),service_overrides:d(Object.keys(e.services??{}).map(n=>String(n).trim().toLowerCase())),renderer_overrides:d(Object.keys(e.renderers??{}).map(n=>String(n).trim().toLowerCase())),...pe(e.renderers),preflight_overrides:(e.preflights??[]).length,preflight_ownership:(e.preflights??[]).map(n=>({commands:[...n.commands??[]]}))}}function Ue(e){let o=(e.commands??[]).filter(p),r=(e.importers??[]).filter(p),n=(e.exporters??[]).filter(p),t=r.map(_),s=n.map(v),i=de(o,r,n),c=me(e,o,r,n),a=e.hooks??{},O=ue(e,r,n);return{capabilities:h(e),commands:d(i),command_overrides:d(Object.keys(e.commandOverrides??{}).map(A=>m(A))),command_handlers:d([...i,...t,...s]),hooks:fe(a),flag_commands:d(c),...O}}var ge=["commands","commandOverrides","flags","parsers","renderers","services","preflights","itemTypes","itemFields","relationshipKinds","migrations","profiles","searchProviders","vectorStoreAdapters","assuranceProviders","importers","exporters"];function he(e){return(e.itemFields??[]).filter(o=>typeof o?.name=="string"&&g.has(o.name.trim())).map(o=>({code:"reserved_item_field",severity:"error",message:`Item field "${o.name}" collides with reserved item metadata; rename it with an extension-specific prefix before publishing.`,field:o.name}))}function _e(e){return[...Object.values(e.flags??{}).flat(),...(e.commands??[]).flatMap(r=>r.flags??[]),...(e.importers??[]).flatMap(r=>r.options?.flags??[]),...(e.exporters??[]).flatMap(r=>r.options?.flags??[])].flatMap(r=>{if(typeof r?.long!="string"&&typeof r?.short!="string")return[];let n=k(r.long,r.short);if(n===null)return[];let{token:t,failure:s}=n;return[{code:s,severity:"error",message:`Flag "${t}" ${E(t,s)}.`,field:t}]})}function P(e){let o=new Set;for(let r of e){let n=x(r)??y(r);n!==null&&o.add(n)}return[...o].sort((r,n)=>r.localeCompare(n))}function ve(e,o){let r=[];if(o===null)return e.length>0&&r.push({code:"manifest_capabilities_absent",severity:"warning",message:`Blueprint exercises ${e.length===1?"capability":"capabilities"} [${e.join(", ")}] but declares none; set capabilities to deriveExtensionCapabilities(blueprint) so the manifest grant matches.`}),r;let n=new Set(o),t=new Set(e);for(let s of e)n.has(s)||r.push({code:"capability_undeclared",severity:"error",message:`Blueprint exercises capability "${s}" but it is absent from the declared capabilities; activation throws extension_capability_missing \u2014 add "${s}" to the manifest capabilities.`,capability:s});for(let s of o)t.has(s)||r.push({code:"capability_unused",severity:"warning",message:`Capability "${s}" is declared but no blueprint surface exercises it; drop it to keep the manifest least-privilege (pm package doctor reports this as extension_capability_unused).`,capability:s});return r}function ye(e){let o=[],r=new Map;for(let t of e.commands??[]){let s=m(t.name);r.set(s,(r.get(s)??0)+1)}for(let[t,s]of r)s>1&&o.push({code:"duplicate_command",severity:"warning",message:`Command "${t}" is declared ${s} times in commands; the later registration shadows the earlier one at dispatch.`,command:t});let n=new Set(Object.keys(e.commandOverrides??{}).map(t=>m(t)));for(let t of r.keys())n.has(t)&&o.push({code:"command_override_conflict",severity:"warning",message:`Command "${t}" is declared both as a new command definition and as a command override; register one or the other.`,command:t});return o}function xe(e){let o=[];for(let r of ge)r in e&&!u(e[r])&&o.push({code:"empty_surface",severity:"warning",message:`Blueprint field "${r}" is present but empty; remove it or populate it.`,field:r});if("hooks"in e){let r=e.hooks??{};[r.beforeCommand,r.beforeMutation,r.afterCommand,r.onWrite,r.onRead,r.onIndex].some(u)||o.push({code:"empty_surface",severity:"warning",message:'Blueprint field "hooks" is present but registers no lifecycle hooks; remove it or populate it.',field:"hooks"})}return o}function ke(e,o={}){let r=h(e),n=o.declaredCapabilities??e.manifest?.capabilities,t=Array.isArray(n)?P(n):null,s=[...ve(r,t),...ye(e),..._e(e),...he(e),...xe(e)];return{ok:s.every(i=>i.severity!=="error"),findings:s,used:r,declared:t}}function S(e,o){let{additionalCapabilities:r,...n}=o,t=Array.isArray(r)?P(r):[],s=[...new Set([...h(e),...t])].sort((i,c)=>i.localeCompare(c));return{...n,capabilities:s}}function Ve(e,o){let r=S(e,o);return{module:oe({...e,manifest:r}),manifest:r}}function I(e,o){if(e.status==="absent"||e.status==="ok")return null;let r=`${e.kind}_${e.status}`,n="";switch(r){case"pm_min_version_invalid":n=`pm_min_version "${e.required}" is not a valid version; the extension is treated as incompatible and the loader skips it.`;break;case"pm_min_version_unchecked":n=`pm_min_version "${e.required}" could not be compared against pm ${o}; compatibility is unverified.`;break;case"pm_min_version_unmet":n=`Requires pm >= ${e.required} but the target is pm ${o}; the loader skips the extension.`;break;case"pm_max_version_invalid":n=`pm_max_version "${e.required}" is not a valid inclusive upper bound (version ranges are not allowed); the extension is treated as incompatible and the loader skips it.`;break;case"pm_max_version_unchecked":n=`pm_max_version "${e.required}" could not be compared against pm ${o}; compatibility is unverified.`;break;case"pm_max_version_exceeded":n=`Allows pm <= ${e.required} but the target is pm ${o}; the loader skips the extension.`;break;case"pm_max_version_exceeded_warn":n=`Target pm ${o} is newer than pm_max_version ${e.required}, but the "warn" exceeded mode lets it load with a warning.`;break}return{code:r,severity:e.allowed?"warning":"error",constraint:e.kind,required:e.required,current:o,message:n}}function Ee(e,o){let r=b(e.pm_min_version,o.pmVersion),n=C(e.pm_max_version,o.pmVersion,o.pmMaxVersionExceededMode??"block"),t=[],s=w(e);for(let a of s.unknownKeys)t.push({code:"manifest_unknown_key",severity:"warning",constraint:"manifest",required:a,current:o.pmVersion,path:a,...a==="compatibility"?{suggested_key:"pm_min_version"}:{},message:a==="compatibility"?'Manifest key "compatibility" is ignored; declare the canonical pm_min_version and optional pm_max_version fields instead.':`Manifest key "${a}" is not part of the extension manifest contract and will be ignored.`});s.missingVersionBounds&&t.push({code:"no_version_bounds_declared",severity:"warning",constraint:"manifest",required:"pm_min_version",current:o.pmVersion,path:"$",suggested_key:"pm_min_version",message:"No canonical pm version bounds are declared; add pm_min_version so compatibility intent is explicit."});let i=I(r,o.pmVersion);i!==null&&t.push(i);let c=I(n,o.pmVersion);return c!==null&&t.push(c),{compatible:r.allowed&&n.allowed,findings:t,pmVersion:o.pmVersion}}var be=new Set(["capability_undeclared","capability_unused","manifest_capabilities_absent"]);function ze(e,o={}){let r=ke(e,{declaredCapabilities:o.declaredCapabilities}),n=o.identity?S(e,o.identity):null,t=o.target?Ee(n??e.manifest??{},o.target):null,c=[...(n!==null&&o.declaredCapabilities===void 0?r.findings.filter(a=>!be.has(a.code)):r.findings).map(a=>({source:"blueprint",severity:a.severity,code:a.code,message:a.message})),...(t?.findings??[]).map(a=>({source:"compatibility",severity:a.severity,code:a.code,message:a.message}))];return{ok:c.every(a=>a.severity!=="error"),capabilities:r.used,blueprint:r,manifest:n,compatibility:t,findings:c}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="7fc669d4-1db2-5636-8304-2c111a684726")}catch{}})();function Ge(e){return e}function Ye(e){return e}function Xe(e){return e}function Je(e){return e}function Qe(e){return e}function Ze(e){return e}function er(e){return e}function rr(e){return e}function or(e){return e}function nr(e){return e}function tr(e){return e}function ir(e){return e}function sr(e){return e}function ar(e){return{handled:!0,result:e}}function cr(){return{handled:!1}}function dr(e){return e}function mr(e){return e}function fr(e){return e}function pr(e){return e}function lr(e){return e}function ur(e){return e}function gr(e){return e}function hr(e){return e}function _r(e){return e}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="6260572c-1496-58ef-9377-0825f4183bc6")}catch{}})();export{D as BUILTIN_PROFILES,Pe as EXTENSION_CAPABILITIES,Ie as EXTENSION_CAPABILITY_CONTRACT,Ce as EXTENSION_CAPABILITY_CONTRACT_VERSION,we as EXTENSION_CAPABILITY_LEGACY_ALIASES,G as EXTENSION_CAPABILITY_REGISTRATION_SURFACES,Se as EXTENSION_POLICY_MODES,Oe as EXTENSION_POLICY_SURFACES,Fe as EXTENSION_SANDBOX_PROFILES,Ae as EXTENSION_TRUST_MODES,Te as LIST_FILTER_EXTENSION_FLAG_DEFINITIONS,M as PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS,T as PM_PACKAGE_RESOURCE_KINDS,V as PROFILE_LINT_CODES,U as PROFILE_LINT_DIMENSIONS,$ as PROFILE_NAMES,g as RESERVED_ITEM_FIELD_NAMES,Me as SEARCH_EXTENSION_FLAG_DEFINITIONS,Ee as checkExtensionManifestCompatibility,N as collectPackageExtensionDirectories,Y as collectUsedExtensionCapabilities,oe as composeExtension,Ve as composeExtensionPackage,R as createExtensionContributionInventory,cr as declineServiceOverride,ur as defineAfterCommandHook,pr as defineBeforeCommandHook,lr as defineBeforeMutationHook,Xe as defineCommand,nr as defineCommandOverride,fr as defineExporter,Ke as defineExtension,He as defineExtensionBlueprint,Ge as defineExtensionManifest,Je as defineFlag,mr as defineImporter,Ze as defineItemField,Qe as defineItemType,er as defineMigration,_r as defineOnIndexHook,hr as defineOnReadHook,gr as defineOnWriteHook,tr as defineParserOverride,ir as definePreflightOverride,Ye as defineProjectProfile,dr as defineRendererOverride,rr as defineSearchProvider,sr as defineServiceOverride,or as defineVectorStoreAdapter,h as deriveExtensionCapabilities,Ue as describeExtensionBlueprint,H as describeProfileComposition,q as describeProjectProfile,ar as handleServiceOverride,ke as lintExtensionBlueprint,z as lintProjectProfile,K as listProfiles,qe as mergeExtensionBlueprints,F as normalizeExtensionContributionInventory,L as normalizeProfileName,W as planProfileApplication,ze as preflightExtension,B as readPmPackageManifest,X as reconcileExtensionCapabilityUsage,J as renderExtensionSurfaceMarkdown,j as resolveProfile,S as synthesizeExtensionManifest,Re as toExtensionFlagDefinitions};
2
2
  //# sourceMappingURL=sdk-authoring.js.map
@@ -1,2 +1,3 @@
1
- import{a as Tr,b as kr,c as vr,d as Er,e as jr,f as qr,g as zr,h as Ar,i as Br,j as Cr,k as Fr,l as Gr,m as Hr,n as Ur,o as Vr,p as Wr,q as Xr,r as Yr,s as Zr,t as $r,u as of,v as rf,w as ff,x as tf,y as df,z as nf}from"./focused-chunks/chunk-Z56ECT7I.js";import{a as gr,b as cr,c as wr,d as hr,e as Dr,f as Ir,g as _r}from"./focused-chunks/chunk-XYNBXTDQ.js";import{A as dr,B as nr,C as pr,D as sr,E as lr,G as mr,H as xr,I as br,J as ir,K as ar,L as ur,M as yr,a as f,b as t,c as d,d as n,e as p,f as s,g as l,h as m,i as x,j as go,k as co,l as wo,m as ho,n as Do,o as Io,p as _o,q as To,r as ko,s as vo,t as Eo,u as jo,v as qo,w as zo,x as Ao,y as Bo,z as Co}from"./focused-chunks/chunk-C5IW2NDA.js";import{$ as me,A as J,Aa as Je,B as K,Ba as Ke,C as L,Ca as Le,D as M,Da as Me,E as N,Ea as Ne,F as O,Fa as Oe,G as P,Ga as Pe,H as Q,Ha as Qe,I as R,J as S,Ja as Re,K as U,Ka as Se,L as V,La as Ue,M as W,N as X,O as Y,P as Z,Q as $,R as ee,S as oe,T as re,U as fe,V as te,W as de,X as ne,Y as pe,Z as se,_ as le,aa as xe,b,ba as be,c as i,ca as ie,d as a,da as ae,e as u,ea as ue,f as y,fa as ye,g,ga as ge,h as c,ha as ce,i as w,ia as we,j as h,ja as he,k as D,ka as De,l as I,la as Ie,m as _,ma as _e,n as T,na as Te,o as k,oa as ke,p as v,pa as ve,q as E,qa as Ee,r as j,ra as je,s as q,sa as qe,t as z,ta as ze,u as A,ua as Ae,v as B,va as Be,w as C,wa as Ce,x as F,xa as Fe,y as G,ya as Ge,z as H,za as He}from"./focused-chunks/chunk-TVV2DONO.js";import{e as Jr,f as Kr,g as Lr,h as Mr,i as Nr,j as Or,k as Pr,l as Qr,m as Rr,n as Sr,o as ef}from"./focused-chunks/chunk-WGHQVU6P.js";import{$a as So,Aa as yo,Ga as Fo,Ha as Go,Ia as Ho,Ja as Jo,Ka as Ko,La as Lo,Ma as Mo,Na as No,Oa as Oo,Pa as Po,Za as Qo,_a as Ro,ab as Uo,bb as Vo,cb as Wo,db as Xo,ea as Ve,eb as Yo,fa as We,fb as Zo,ga as Xe,gb as $o,ha as Ye,hb as er,ia as Ze,ib as or,ja as $e,jb as rr,ka as eo,kb as fr,la as oo,lb as tr,ma as ro,na as fo,oa as to,qa as no,ra as po,sa as so,ta as lo,ua as mo,va as xo,wa as bo,xa as io,ya as ao,za as uo}from"./focused-chunks/chunk-2PN4TJXH.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="df504de1-de3b-55fe-baef-08c0d1dcf97f")}catch{}})();export{s as ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,Be as ACTIVITY_FLAG_CONTRACTS,g as AGGREGATE_FLAG_CONTRACTS,fe as APPEND_FLAG_CONTRACTS,_e as ASSURANCE_FLAG_CONTRACTS,d as CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS,Ae as CALENDAR_FLAG_CONTRACTS,te as CLAIM_FLAG_CONTRACTS,sr as CLOSE_ACTION_OPTION_KEYS,oe as CLOSE_FLAG_CONTRACTS,re as CLOSE_MANY_FLAG_CONTRACTS,me as CLOSE_TASK_FLAG_CONTRACTS,c as COMMENTS_FLAG_CONTRACTS,Qe as COMPLETION_FLAG_CONTRACTS,C as CONFIG_FLAG_CONTRACTS,n as CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS,Fe as CONTEXT_FLAG_CONTRACTS,Pe as CONTRACTS_FLAG_CONTRACTS,Ee as COPY_FLAG_CONTRACTS,gr as CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,wr as CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,cr as CREATE_COMMANDER_STRING_OPTION_CONTRACTS,Te as CREATE_FLAG_CONTRACTS,ne as DELETE_FLAG_CONTRACTS,Je as DEPS_FLAG_CONTRACTS,I as DOCS_FLAG_CONTRACTS,he as DUPLICATES_FLAG_CONTRACTS,Le as EVAL_FLAG_CONTRACTS,Ce as EVENTS_FLAG_CONTRACTS,be as EVENT_FLAG_CONTRACTS,We as EXECUTABLE_COMMAND_ALIASES,Q as EXTENSION_ACTIVATE_FLAG_CONTRACTS,P as EXTENSION_ADOPT_ALL_FLAG_CONTRACTS,Y as EXTENSION_ADOPT_FLAG_CONTRACTS,X as EXTENSION_CATALOG_FLAG_CONTRACTS,R as EXTENSION_DEACTIVATE_FLAG_CONTRACTS,O as EXTENSION_DESCRIBE_FLAG_CONTRACTS,W as EXTENSION_DOCTOR_FLAG_CONTRACTS,N as EXTENSION_EXPLORE_FLAG_CONTRACTS,F as EXTENSION_FLAG_CONTRACTS,H as EXTENSION_INIT_FLAG_CONTRACTS,L as EXTENSION_INSTALL_FLAG_CONTRACTS,U as EXTENSION_MANAGE_FLAG_CONTRACTS,S as EXTENSION_MIGRATE_FLAG_CONTRACTS,V as EXTENSION_RELOAD_FLAG_CONTRACTS,G as EXTENSION_SCOPE_FLAG_CONTRACTS,M as EXTENSION_UNINSTALL_FLAG_CONTRACTS,D as FILES_FLAG_CONTRACTS,je as FOCUS_FLAG_CONTRACTS,ce as GC_FLAG_CONTRACTS,Ge as GET_FLAG_CONTRACTS,u as GLOBAL_FLAG_CONTRACTS,Ke as GRAPH_FLAG_CONTRACTS,He as GUIDE_FLAG_CONTRACTS,De as HEALTH_FLAG_CONTRACTS,E as HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS,j as HISTORY_COMPACT_FLAG_CONTRACTS,_ as HISTORY_FLAG_CONTRACTS,k as HISTORY_REDACT_FLAG_CONTRACTS,v as HISTORY_REPAIR_FLAG_CONTRACTS,B as INIT_FLAG_CONTRACTS,Z as INSTALL_FLAG_CONTRACTS,ve as ITEM_COMPLETE_FLAG_CONTRACTS,ke as ITEM_MUTATE_FLAG_CONTRACTS,h as LEARNINGS_FLAG_CONTRACTS,f as LIST_COMMANDER_STRING_OPTION_CONTRACTS,y as LIST_FILTER_FLAG_CONTRACTS,xe as MEET_FLAG_CONTRACTS,T as MERGE_FLAG_CONTRACTS,p as NEXT_COMMANDER_STRING_OPTION_CONTRACTS,Ne as NEXT_FLAG_CONTRACTS,w as NOTES_FLAG_CONTRACTS,J as PACKAGE_FLAG_CONTRACTS,K as PACKAGE_INIT_FLAG_CONTRACTS,le as PAUSE_TASK_FLAG_CONTRACTS,pr as PLAN_CREATE_METADATA_PARAMETER_KEYS,A as PLAN_FLAG_CONTRACTS,Er as PM_CLI_GRAMMAR_CONTRACT,Tr as PM_CLI_GRAMMAR_NOUNS,po as PM_CLI_ONLY_TOOL_ACTION_WAIVERS,kr as PM_CLI_SHARED_VERBS,Ve as PM_COMMAND_ALIAS_CONTRACTS,vr as PM_COMMAND_DESTINATION_CONTRACTS,zr as PM_COMMAND_EXIT_CONTRACTS,qr as PM_COMMAND_EXIT_OUTCOME_CONTRACTS,Lo as PM_COMMAND_OUTPUT_BUDGET_CONTRACTS,ff as PM_COMMAND_OUTPUT_ENVELOPE_CONTRACTS,Jr as PM_CONTEXT_INTENT_CONTRACTS,to as PM_CORE_COMMAND_NAMES,lo as PM_DEPRECATED_TOOL_ACTIONS,mo as PM_DISCOVERABLE_TOOL_ACTIONS,Yr as PM_ERROR_CODE_CATALOG,Ur as PM_ERROR_CODE_EXIT_CLASS_CONTRACTS,Ze as PM_EXTENSION_CAPABILITY_CONTRACTS,no as PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS,eo as PM_EXTENSION_POLICY_MODE_CONTRACTS,fo as PM_EXTENSION_POLICY_SURFACE_CONTRACTS,ro as PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS,$e as PM_EXTENSION_SERVICE_NAME_CONTRACTS,oo as PM_EXTENSION_TRUST_MODE_CONTRACTS,Go as PM_OUTPUT_BUDGET_CLASSES,Fo as PM_OUTPUT_DEGRADATION_STEPS,of as PM_OUTPUT_ENVELOPE_KINDS,ur as PM_PROVIDER_TOOL_PARAMETERS_SCHEMA,ir as PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION,Uo as PM_READ_OUTPUT_COMPOSITION_OPTION_FLAGS,Qo as PM_READ_OUTPUT_DIMENSIONS,So as PM_READ_OUTPUT_OPTION_FLAGS,Ro as PM_READ_OUTPUT_SURFACES,Vo as PM_READ_OUTPUT_SURFACE_CONTRACTS,Ar as PM_SUCCESS_EXIT_CODES,so as PM_TOOL_ACTIONS,lr as PM_TOOL_ACTION_PARAMETER_CONTRACTS,ar as PM_TOOL_PARAMETERS_SCHEMA,br as PM_TOOL_PARAMETERS_SCHEMA_MAJOR,xr as PM_TOOL_PARAMETERS_SCHEMA_VERSION,dr as PM_TOOL_RESERVED_CUSTOM_FIELD_PROPERTIES,z as PROFILE_FLAG_CONTRACTS,ee as REINDEX_FLAG_CONTRACTS,pe as RELEASE_FLAG_CONTRACTS,ie as REMIND_FLAG_CONTRACTS,de as RESTORE_FLAG_CONTRACTS,q as SCHEMA_FLAG_CONTRACTS,t as SEARCH_COMMANDER_STRING_OPTION_CONTRACTS,Oe as SEARCH_FLAG_CONTRACTS,se as START_TASK_FLAG_CONTRACTS,we as STATS_FLAG_CONTRACTS,a as SUBCOMMAND_GLOBAL_FLAG_CONTRACTS,ye as TELEMETRY_FLAG_CONTRACTS,ue as TEST_ALL_FLAG_CONTRACTS,ae as TEST_FLAG_CONTRACTS,ge as TEST_RUNS_FLAG_CONTRACTS,zo as TOOL_ACTIVITY_OPTION_CONTRACTS,co as TOOL_AGGREGATE_OPTION_CONTRACTS,vo as TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACT_SOURCE,qo as TOOL_CALENDAR_OPTION_CONTRACTS,jo as TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS,Ao as TOOL_CONTEXT_OPTION_CONTRACTS,_o as TOOL_CREATE_OPTION_CONTRACTS,Io as TOOL_CREATE_OPTION_CONTRACT_SOURCE,Bo as TOOL_DEPS_OPTION_CONTRACTS,Co as TOOL_GRAPH_OPTION_CONTRACTS,go as TOOL_LIST_FILTER_OPTION_CONTRACTS,wo as TOOL_SEARCH_FILTER_OPTION_CONTRACTS,Do as TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS,ho as TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACT_SOURCE,Eo as TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS,ko as TOOL_UPDATE_OPTION_CONTRACTS,To as TOOL_UPDATE_OPTION_CONTRACT_SOURCE,hr as UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,Ir as UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,Dr as UPDATE_COMMANDER_STRING_OPTION_CONTRACTS,qe as UPDATE_FLAG_CONTRACTS,ze as UPDATE_MANY_FLAG_CONTRACTS,$ as UPGRADE_FLAG_CONTRACTS,Ie as VALIDATE_FLAG_CONTRACTS,Me as WORKSPACE_FLAG_CONTRACTS,yr as _testOnlyCliContracts,Gr as analyzePmCommandExitConformance,xo as analyzePmToolActionParity,_r as analyzeSdkCliParameterCompleteness,Or as applyContextIntentProjection,rr as applyReadOutputDimensions,Zo as applyReadOutputIncludeModes,Rr as attachContextIntentReceipt,ef as attachOutputTokenAccounting,Sr as attachReadOutputContracts,mr as buildPmActionToolInputSchema,i as compactFlagAliasContracts,Mr as composeContextIntentContracts,Qr as contextIntentRowId,Jo as createPmCommandOutputBudget,Pr as decodeContextIntentCursor,Po as decodeReadOutputContinuationCursor,Ko as definePmCommandOutputBudget,rf as definePmCommandOutputEnvelope,Vr as definePmErrorCodeCatalog,Hr as derivePmBulkMutationEffect,Oo as encodeReadOutputContinuationCursor,Zr as enrichCliFlagInvocationContract,$r as enrichCliFlagInvocationContracts,No as estimatePmOutputTokens,Kr as getActiveContextIntentContracts,Re as hasSubcommandFlagContractsForCommand,Ho as inferPmOutputBudgetClass,io as isPmExtensionCapabilityContract,uo as isPmExtensionPolicyModeContract,yo as isPmExtensionPolicySurfaceContract,ao as isPmExtensionServiceNameContract,Cr as isPmKnownExitCode,df as isPmMutationReceipt,Br as isPmSuccessfulExitCode,bo as isPmToolAction,fr as isReadOutputBudgetExceeded,$o as normalizeReadOutputIncludeModeOptions,nf as parseMutationReceipt,l as readFirstStringFromCommanderOptions,m as readFirstValueFromCommanderOptions,Yo as readOutputIncludeModeOptions,x as readStringArrayFromCommanderOptions,Ye as renderPmCommandAliasMigrationHint,Wr as resolveCanonicalPmErrorCodeContract,Nr as resolveContextIntentContract,Xe as resolvePmCommandAlias,Fr as resolvePmCommandExitContract,Mo as resolvePmCommandOutputBudget,tf as resolvePmCommandOutputEnvelope,Xr as resolvePmErrorCodeContract,nr as resolvePmToolCustomFieldCollision,er as resolveReadOutputDimensions,tr as resolveReadOutputEncoding,Wo as resolveReadOutputSurface,Se as resolveSubcommandFlagContractsForCommand,Lr as runWithContextIntentContracts,or as stabilizeReadOutputReceiptEstimates,Ue as toCompletionFlagString,Xo as validateReadOutputOptions,jr as verifyPmCliGrammar,b as withFlagAliasMetadata};
1
+ import{a as tn,b as nn,c as an,d as cn,e as dn,f as sn,g as ln,h as rn,i as xn,j as Cn,k as $n,l as kn,m as Mn,n as Fn,o as p,p as vn,q as g,t as In,u as On,v as jn,w as Dn,x as An,y as Pn}from"./focused-chunks/chunk-YLVBJ6GF.js";import{a as Jt,b as Qt,c as Vt,d as Wt,e as Zt,f as en,g as on}from"./focused-chunks/chunk-DKPLYW3L.js";import{A as ft,B as St,C as Bt,D as Lt,E as Gt,F as Nt,H as Ut,I as Kt,J as Rt,K as Xt,L as qt,M as Yt,N as Ht,a as x,b as C,c as $,d as k,e as M,f as F,g as v,h as T,i as I,j as Ho,k as Jo,l as Qo,m as Vo,n as Wo,o as Zo,p as et,q as ot,r as tt,s as nt,t as at,u as ct,v as dt,w as st,x as it,y as lt,z as rt}from"./focused-chunks/chunk-MCZXYZAF.js";import{$ as Te,$a as Mo,A as oe,Aa as oo,B as te,Ba as to,C as ne,Ca as no,D as ae,Da as ao,E as ce,Ea as co,F as de,Fa as so,G as se,Ga as io,H as ie,Ha as lo,I as le,Ia as ro,J as re,Ja as fo,K as fe,Ka as mo,L as me,La as uo,M as ue,Ma as po,N as pe,Na as go,O as ge,Oa as _o,P as _e,Pa as bo,Q as be,Qa as yo,R as ye,Ra as ho,S as he,Sa as wo,T as we,Ta as xo,U as xe,Ua as Co,V as Ce,Va as $o,W as $e,X as ke,Xa as ko,Y as Me,Z as Fe,Za as m,_ as ve,_a as u,aa as Ie,b as O,ba as Oe,c as j,ca as je,d as D,da as De,e as A,ea as Ae,f as P,fa as Pe,g as z,ga as ze,h as E,ha as Ee,i as S,ia as Se,j as B,ja as Be,k as L,ka as Le,l as G,la as Ge,m as N,ma as Ne,n as U,na as Ue,o as K,oa as Ke,p as R,pa as Re,q as X,qa as Xe,r as q,ra as qe,s as Y,sa as Ye,t as H,ta as He,u as J,ua as Je,v as Q,va as Qe,w as V,wa as Ve,x as W,xa as We,y as Z,ya as Ze,z as ee,za as eo}from"./focused-chunks/chunk-L623ZPNK.js";import{g as fn,h as mn,i as un,j as pn,k as gn,l as _n,m as bn,n as yn,o as hn,p as wn,q as Tn}from"./focused-chunks/chunk-ODHQEECS.js";import{$a as kt,Aa as Yo,Ga as mt,Ha as ut,Ia as pt,Ja as gt,Ka as _t,La as bt,Ma as yt,Na as ht,Oa as wt,Pa as xt,Y as r,Za as Ct,_a as $t,ab as Mt,bb as Ft,cb as vt,db as Tt,ea as Fo,eb as It,fa as vo,fb as Ot,ga as To,gb as jt,ha as Io,hb as Dt,ia as Oo,ib as At,ja as jo,jb as Pt,ka as Do,kb as zt,la as Ao,lb as Et,ma as Po,na as zo,oa as Eo,qa as So,ra as Bo,sa as Lo,ta as Go,ua as No,va as Uo,wa as Ko,xa as Ro,ya as Xo,za as qo}from"./focused-chunks/chunk-RZU5U6Q7.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]="19215662-5a8c-5b91-bc97-8dbdc1daff02")}catch{}})();var i;function f(){if(i!==void 0)return i;let t=g.filter(({command:o})=>m(o)).flatMap(({command:o,family:a})=>p(o,u(o)).map(s=>({command:o,family:a,concept:s.flag.slice(2),flag:s.flag,aliases:Object.freeze([...s.aliases??[]]),value_kind:s.repeatable?"list":s.value_type}))),c=new Set(t.flatMap(o=>o.aliases.map(a=>`${o.command}:${a}`))),d=t.filter(o=>!c.has(`${o.command}:${o.flag}`)),n=new Map;for(let o of d){let a=n.get(o.concept)??new Set;a.add(o.value_kind),n.set(o.concept,a)}return i=Object.freeze(d.map(o=>Object.freeze({...o,concept:n.get(o.concept)?.size===1?o.concept:`${o.concept}@${o.command}`}))),i}var _=Object.freeze({init:30,config:35,extension:53,package:54,packages:54,install:26,upgrade:29,create:100,copy:24,focus:22,list:86,"list-all":85,"list-draft":84,"list-open":84,"list-in-progress":84,"list-blocked":84,"list-closed":84,"list-canceled":84,aggregate:37,context:45,ctx:45,get:30,graph:34,search:78,duplicates:24,eval:25,next:35,history:35,events:33,"history-redact":27,"history-repair":26,"history-compact":30,"history-author-acknowledge":28,merge:24,schema:40,profile:22,activity:35,restore:23,update:105,"update-many":140,close:31,"close-many":72,delete:24,append:24,comments:30,notes:34,learnings:26,files:39,docs:30,deps:32,plan:109,test:48,"test-all":37,telemetry:21,stats:29,health:36,validate:45,assurance:30,gc:22,workspace:23,contracts:29,claim:36,release:23,"start-task":23,"pause-task":23,"close-task":24,meet:33,event:33,remind:29,"test-runs-worker":25});function b(){let e=new Map(Object.keys(_).map(t=>[t,0]));for(let{command:t}of f())e.set(t,Number(e.get(t))+1);return Object.freeze(Object.entries(_).map(([t,c])=>Object.freeze({command:t,current:Number(e.get(t)),maximum:c})))}function y(e,t,c){for(let d of e)for(let n of d.aliases){let o=t.get(`${d.command}:${n}`);o===void 0||o.flag===d.flag||c.push({code:"alias_collision",command:d.command,detail:`${n} aliases ${d.flag} but is canonical for ${o.flag}.`})}}function h(e,t,c){let d=new Set(t.map(({command:n})=>n));for(let n of e.keys())d.has(n)||c.push({code:"missing_budget",command:n,detail:`${n} has canonical flags but no persisted budget.`});for(let n of t){let o=e.get(n.command)??0;o===0&&c.push({code:"stale_budget",command:n.command,detail:`${n.command} has a persisted budget but no canonical flags.`}),!(o<=n.maximum)&&c.push({code:"budget_exceeded",command:n.command,detail:`${o} canonical flags exceed the ratcheted maximum ${n.maximum}.`})}}function Bn(e=f(),t=b()){let c=[],d=new Map,n=new Map,o=new Map;for(let a of e){let s=`${a.command}:${a.flag}`;d.has(s)?c.push({code:"duplicate_canonical_flag",command:a.command,detail:`${a.flag} has more than one canonical row.`}):d.set(s,a),o.set(a.command,(o.get(a.command)??0)+1);let l=n.get(a.concept);l!==void 0&&l!==a.value_kind?c.push({code:"inconsistent_concept_kind",command:a.command,detail:`${a.concept} uses both ${l} and ${a.value_kind}.`}):n.set(a.concept,a.value_kind)}return y(e,d,c),h(o,t,c),c.sort((a,s)=>a.command.localeCompare(s.command)||a.code.localeCompare(s.code)||a.detail.localeCompare(s.detail)),{ok:c.length===0,entry_count:e.length,budget_count:t.length,findings:c}}function Ln(){let e=f(),t=b(),c=new Map(t.map(({command:n})=>[n,"unknown"]));for(let{command:n,family:o}of e)c.set(n,o);return["# Generated flag lexicon budgets","","This file is generated by `listPmFlagLexicon()`. Compatibility aliases do not consume canonical budget.","","| Command | Capability family | Canonical flags | Maximum |","| --- | --- | ---: | ---: |",...t.map(({command:n,current:o,maximum:a})=>{let s=c.get(n);return`| \`${n}\` | ${s} | ${o} | ${a} |`}),""].join(`
2
+ `)}(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]="65cfaa41-6f53-5339-8b55-c1a4d3660c5d")}catch{}})();function w(e){return[e.exit_code!==r.USAGE?{code:"non_refusal_exit",probe_id:e.probe_id,detail:`${e.entrypoint} returned exit code ${e.exit_code}; a structured usage refusal must return ${r.USAGE}.`}:void 0,e.allowed_values.length===0?{code:"missing_allowed_values",probe_id:e.probe_id,detail:"The refusal omitted its complete accepted value domain."}:void 0,e.allowed_values.includes(e.rejected_value)?{code:"accepted_rejected_value",probe_id:e.probe_id,detail:`${e.rejected_value} is both rejected and advertised as allowed.`}:void 0,e.suggested_retry.trim().length===0?{code:"missing_suggested_retry",probe_id:e.probe_id,detail:"The refusal omitted an executable suggested retry."}:void 0,e.retry_succeeded?void 0:{code:"retry_failed",probe_id:e.probe_id,detail:"The advertised suggested retry did not succeed."}]}function Un(e){let t=[],c=new Set,d=0;e.length===0&&t.push({code:"empty_corpus",probe_id:"corpus",detail:"At least one real refusal observation is required."});for(let n of e){if(c.has(n.probe_id)){t.push({code:"duplicate_probe",probe_id:n.probe_id,detail:`${n.probe_id} was supplied more than once.`});continue}c.add(n.probe_id);let o=t.length;for(let a of w(n))a!==void 0&&t.push(a);t.length===o&&(d+=1)}return t.sort((n,o)=>n.probe_id!==o.probe_id?n.probe_id.localeCompare(o.probe_id):n.code.localeCompare(o.code)),{ok:t.length===0,probe_count:c.size,closed_probe_count:d,closure_fraction:c.size===0?0:d/c.size,findings:t}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="c3e3b1f2-1898-5773-8b3f-55fa39f6c4e7")}catch{}})();export{F as ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,fo as ACTIVITY_FLAG_CONTRACTS,J as AGGREGATE_FLAG_CONTRACTS,ze as APPEND_FLAG_CONTRACTS,oo as ASSURANCE_FLAG_CONTRACTS,$ as CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS,ro as CALENDAR_FLAG_CONTRACTS,Ee as CLAIM_FLAG_CONTRACTS,Gt as CLOSE_ACTION_OPTION_KEYS,Ae as CLOSE_FLAG_CONTRACTS,Pe as CLOSE_MANY_FLAG_CONTRACTS,Ue as CLOSE_TASK_FLAG_CONTRACTS,Q as COMMENTS_FLAG_CONTRACTS,$o as COMPLETION_FLAG_CONTRACTS,fe as CONFIG_FLAG_CONTRACTS,k as CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS,uo as CONTEXT_FLAG_CONTRACTS,Co as CONTRACTS_FLAG_CONTRACTS,co as COPY_FLAG_CONTRACTS,Jt as CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,Vt as CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,Qt as CREATE_COMMANDER_STRING_OPTION_CONTRACTS,to as CREATE_FLAG_CONTRACTS,Be as DELETE_FLAG_CONTRACTS,_o as DEPS_FLAG_CONTRACTS,ee as DOCS_FLAG_CONTRACTS,We as DUPLICATES_FLAG_CONTRACTS,yo as EVAL_FLAG_CONTRACTS,mo as EVENTS_FLAG_CONTRACTS,Re as EVENT_FLAG_CONTRACTS,vo as EXECUTABLE_COMMAND_ALIASES,Ce as EXTENSION_ACTIVATE_FLAG_CONTRACTS,xe as EXTENSION_ADOPT_ALL_FLAG_CONTRACTS,Ie as EXTENSION_ADOPT_FLAG_CONTRACTS,Te as EXTENSION_CATALOG_FLAG_CONTRACTS,$e as EXTENSION_DEACTIVATE_FLAG_CONTRACTS,we as EXTENSION_DESCRIBE_FLAG_CONTRACTS,ve as EXTENSION_DOCTOR_FLAG_CONTRACTS,he as EXTENSION_EXPLORE_FLAG_CONTRACTS,me as EXTENSION_FLAG_CONTRACTS,pe as EXTENSION_INIT_FLAG_CONTRACTS,be as EXTENSION_INSTALL_FLAG_CONTRACTS,Me as EXTENSION_MANAGE_FLAG_CONTRACTS,ke as EXTENSION_MIGRATE_FLAG_CONTRACTS,Fe as EXTENSION_RELOAD_FLAG_CONTRACTS,ue as EXTENSION_SCOPE_FLAG_CONTRACTS,ye as EXTENSION_UNINSTALL_FLAG_CONTRACTS,Z as FILES_FLAG_CONTRACTS,so as FOCUS_FLAG_CONTRACTS,Qe as GC_FLAG_CONTRACTS,po as GET_FLAG_CONTRACTS,Y as GLOBAL_FLAG_CONTRACTS,bo as GRAPH_FLAG_CONTRACTS,go as GUIDE_FLAG_CONTRACTS,Ze as HEALTH_FLAG_CONTRACTS,ce as HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS,de as HISTORY_COMPACT_FLAG_CONTRACTS,oe as HISTORY_FLAG_CONTRACTS,ne as HISTORY_REDACT_FLAG_CONTRACTS,ae as HISTORY_REPAIR_FLAG_CONTRACTS,re as INIT_FLAG_CONTRACTS,Oe as INSTALL_FLAG_CONTRACTS,ao as ITEM_COMPLETE_FLAG_CONTRACTS,no as ITEM_MUTATE_FLAG_CONTRACTS,W as LEARNINGS_FLAG_CONTRACTS,x as LIST_COMMANDER_STRING_OPTION_CONTRACTS,H as LIST_FILTER_FLAG_CONTRACTS,Ke as MEET_FLAG_CONTRACTS,te as MERGE_FLAG_CONTRACTS,M as NEXT_COMMANDER_STRING_OPTION_CONTRACTS,wo as NEXT_FLAG_CONTRACTS,V as NOTES_FLAG_CONTRACTS,ge as PACKAGE_FLAG_CONTRACTS,_e as PACKAGE_INIT_FLAG_CONTRACTS,Ne as PAUSE_TASK_FLAG_CONTRACTS,Lt as PLAN_CREATE_METADATA_PARAMETER_KEYS,le as PLAN_FLAG_CONTRACTS,B as PM_CLI_GRAMMAR_CONTRACT,O as PM_CLI_GRAMMAR_NOUNS,Bo as PM_CLI_ONLY_TOOL_ACTION_WAIVERS,j as PM_CLI_SHARED_VERBS,Fo as PM_COMMAND_ALIAS_CONTRACTS,E as PM_COMMAND_DESTINATION_CONTRACTS,nn as PM_COMMAND_EXIT_CONTRACTS,tn as PM_COMMAND_EXIT_OUTCOME_CONTRACTS,bt as PM_COMMAND_OUTPUT_BUDGET_CONTRACTS,jn as PM_COMMAND_OUTPUT_ENVELOPE_CONTRACTS,S as PM_COMMAND_POSITIONAL_CONTRACTS,fn as PM_CONTEXT_INTENT_CONTRACTS,Eo as PM_CORE_COMMAND_NAMES,Go as PM_DEPRECATED_TOOL_ACTIONS,No as PM_DISCOVERABLE_TOOL_ACTIONS,Mn as PM_ERROR_CODE_CATALOG,xn as PM_ERROR_CODE_EXIT_CLASS_CONTRACTS,Oo as PM_EXTENSION_CAPABILITY_CONTRACTS,So as PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS,Do as PM_EXTENSION_POLICY_MODE_CONTRACTS,zo as PM_EXTENSION_POLICY_SURFACE_CONTRACTS,Po as PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS,jo as PM_EXTENSION_SERVICE_NAME_CONTRACTS,Ao as PM_EXTENSION_TRUST_MODE_CONTRACTS,ut as PM_OUTPUT_BUDGET_CLASSES,mt as PM_OUTPUT_DEGRADATION_STEPS,In as PM_OUTPUT_ENVELOPE_KINDS,D as PM_POSITIONAL_ACTION_CONTRACTS,Yt as PM_PROVIDER_TOOL_PARAMETERS_SCHEMA,Xt as PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION,Mt as PM_READ_OUTPUT_COMPOSITION_OPTION_FLAGS,Ct as PM_READ_OUTPUT_DIMENSIONS,kt as PM_READ_OUTPUT_OPTION_FLAGS,$t as PM_READ_OUTPUT_SURFACES,Ft as PM_READ_OUTPUT_SURFACE_CONTRACTS,an as PM_SUCCESS_EXIT_CODES,Lo as PM_TOOL_ACTIONS,Nt as PM_TOOL_ACTION_PARAMETER_CONTRACTS,qt as PM_TOOL_PARAMETERS_SCHEMA,Rt as PM_TOOL_PARAMETERS_SCHEMA_MAJOR,Kt as PM_TOOL_PARAMETERS_SCHEMA_VERSION,St as PM_TOOL_RESERVED_CUSTOM_FIELD_PROPERTIES,ie as PROFILE_FLAG_CONTRACTS,De as REINDEX_FLAG_CONTRACTS,Le as RELEASE_FLAG_CONTRACTS,Xe as REMIND_FLAG_CONTRACTS,Se as RESTORE_FLAG_CONTRACTS,se as SCHEMA_FLAG_CONTRACTS,C as SEARCH_COMMANDER_STRING_OPTION_CONTRACTS,xo as SEARCH_FLAG_CONTRACTS,Ge as START_TASK_FLAG_CONTRACTS,Ve as STATS_FLAG_CONTRACTS,q as SUBCOMMAND_GLOBAL_FLAG_CONTRACTS,He as TELEMETRY_FLAG_CONTRACTS,Ye as TEST_ALL_FLAG_CONTRACTS,qe as TEST_FLAG_CONTRACTS,Je as TEST_RUNS_FLAG_CONTRACTS,it as TOOL_ACTIVITY_OPTION_CONTRACTS,Qo as TOOL_AGGREGATE_OPTION_CONTRACTS,at as TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACT_SOURCE,st as TOOL_CALENDAR_OPTION_CONTRACTS,dt as TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS,lt as TOOL_CONTEXT_OPTION_CONTRACTS,ot as TOOL_CREATE_OPTION_CONTRACTS,et as TOOL_CREATE_OPTION_CONTRACT_SOURCE,rt as TOOL_DEPS_OPTION_CONTRACTS,ft as TOOL_GRAPH_OPTION_CONTRACTS,Jo as TOOL_LIST_FILTER_OPTION_CONTRACTS,Vo as TOOL_SEARCH_FILTER_OPTION_CONTRACTS,Zo as TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS,Wo as TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACT_SOURCE,ct as TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS,nt as TOOL_UPDATE_OPTION_CONTRACTS,tt as TOOL_UPDATE_OPTION_CONTRACT_SOURCE,Wt as UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,en as UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,Zt as UPDATE_COMMANDER_STRING_OPTION_CONTRACTS,io as UPDATE_FLAG_CONTRACTS,lo as UPDATE_MANY_FLAG_CONTRACTS,je as UPGRADE_FLAG_CONTRACTS,eo as VALIDATE_FLAG_CONTRACTS,ho as WORKSPACE_FLAG_CONTRACTS,Ht as _testOnlyCliContracts,ln as analyzePmCommandExitConformance,Uo as analyzePmToolActionParity,on as analyzeSdkCliParameterCompleteness,_n as applyContextIntentProjection,Pt as applyReadOutputDimensions,Ot as applyReadOutputIncludeModes,hn as attachContextIntentReceipt,Tn as attachOutputTokenAccounting,wn as attachReadOutputContracts,Ut as buildPmActionToolInputSchema,X as compactFlagAliasContracts,pn as composeContextIntentContracts,yn as contextIntentRowId,gt as createPmCommandOutputBudget,bn as decodeContextIntentCursor,xt as decodeReadOutputContinuationCursor,_t as definePmCommandOutputBudget,On as definePmCommandOutputEnvelope,Cn as definePmErrorCodeCatalog,rn as derivePmBulkMutationEffect,wt as encodeReadOutputContinuationCursor,Fn as enrichCliFlagInvocationContract,p as enrichCliFlagInvocationContracts,ht as estimatePmOutputTokens,z as formatPmPositionalActionFlagTip,mn as getActiveContextIntentContracts,m as hasSubcommandFlagContractsForCommand,pt as inferPmOutputBudgetClass,Ro as isPmExtensionCapabilityContract,qo as isPmExtensionPolicyModeContract,Yo as isPmExtensionPolicySurfaceContract,Xo as isPmExtensionServiceNameContract,dn as isPmKnownExitCode,An as isPmMutationReceipt,cn as isPmSuccessfulExitCode,Ko as isPmToolAction,zt as isReadOutputBudgetExceeded,b as listPmCommandFlagBudgets,f as listPmFlagLexicon,jt as normalizeReadOutputIncludeModeOptions,Pn as parseMutationReceipt,G as positionalShapeKey,N as positionalSignatureKey,v as readFirstStringFromCommanderOptions,T as readFirstValueFromCommanderOptions,It as readOutputIncludeModeOptions,I as readStringArrayFromCommanderOptions,Io as renderPmCommandAliasMigrationHint,Ln as renderPmFlagLexiconMarkdown,$n as resolveCanonicalPmErrorCodeContract,gn as resolveContextIntentContract,To as resolvePmCommandAlias,sn as resolvePmCommandExitContract,yt as resolvePmCommandOutputBudget,Dn as resolvePmCommandOutputEnvelope,A as resolvePmCommandPositionalContract,kn as resolvePmErrorCodeContract,P as resolvePmPositionalActionContract,ko as resolvePmPositionalActionFlagContracts,Bt as resolvePmToolCustomFieldCollision,Dt as resolveReadOutputDimensions,Et as resolveReadOutputEncoding,vt as resolveReadOutputSurface,u as resolveSubcommandFlagContractsForCommand,un as runWithContextIntentContracts,Un as scorePmRefusalClosure,At as stabilizeReadOutputReceiptEstimates,Mo as toCompletionFlagString,Tt as validateReadOutputOptions,vn as verifyCliFlagInvocationParity,L as verifyExplicitPositionalSlotCensus,K as verifyPmCliGrammar,U as verifyPmCommandPositionalContracts,Bn as verifyPmFlagLexicon,Ho as verifyToolOptionCliParity,R as withFlagAliasMetadata};
2
3
  //# sourceMappingURL=sdk-contracts.js.map