@unbrained/pm-cli 2026.8.17 → 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 (204) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/AGENTS.md +4 -3
  3. package/CHANGELOG.md +51 -5
  4. package/README.md +3 -3
  5. package/dist/cli/error-guidance.js +8 -4
  6. package/dist/cli/help-content.js +32 -13
  7. package/dist/cli/help-json-payload.d.ts +15 -0
  8. package/dist/cli/help-json-payload.js +101 -23
  9. package/dist/cli/main.js +6 -2
  10. package/dist/cli/register-list-query.js +138 -54
  11. package/dist/cli/register-mutation.js +8 -8
  12. package/dist/cli/register-operations.js +6 -6
  13. package/dist/cli-bundle/bundle-manifest.json +149 -149
  14. package/dist/cli-bundle/chunks/chunk-4NRRH7AM.js +2 -0
  15. package/dist/cli-bundle/chunks/chunk-4THEB6PD.js +13 -0
  16. package/dist/cli-bundle/chunks/{chunk-HBJAS566.js → chunk-BHYMXLAE.js} +2 -2
  17. package/dist/cli-bundle/chunks/chunk-GWMXAQOD.js +197 -0
  18. package/dist/cli-bundle/chunks/chunk-HVFQTLYM.js +35 -0
  19. package/dist/cli-bundle/chunks/chunk-OI4XI562.js +5 -0
  20. package/dist/cli-bundle/chunks/{chunk-3UEGXBMR.js → chunk-OIOKV6NO.js} +58 -54
  21. package/dist/cli-bundle/chunks/chunk-QXSH7BLM.js +3 -0
  22. package/dist/cli-bundle/chunks/chunk-SARFF5H5.js +3 -0
  23. package/dist/cli-bundle/chunks/{chunk-7IBRGCHX.js → chunk-TOXJM4WA.js} +2 -2
  24. package/dist/cli-bundle/chunks/{chunk-JOKATURE.js → chunk-YBMRWW4E.js} +44 -44
  25. package/dist/cli-bundle/chunks/register-list-query-Y56KINDU.js +11 -0
  26. package/dist/cli-bundle/chunks/register-mutation-AUWVCW4M.js +20 -0
  27. package/dist/cli-bundle/chunks/register-operations-PZQPHXW5.js +2 -0
  28. package/dist/cli-bundle/chunks/{register-setup-DOSFBGKE.js → register-setup-I4LUHGVW.js} +2 -2
  29. package/dist/cli-bundle/focused-chunks/chunk-34QBIYZI.js +155 -0
  30. package/dist/cli-bundle/focused-chunks/{chunk-MHPIL773.js → chunk-BJRYFVSH.js} +2 -2
  31. package/dist/cli-bundle/focused-chunks/chunk-DKPLYW3L.js +2 -0
  32. package/dist/cli-bundle/focused-chunks/{chunk-SALH6B6K.js → chunk-EF6ZS5GH.js} +44 -44
  33. package/dist/cli-bundle/focused-chunks/{chunk-XKAMP5OU.js → chunk-ESISGDAY.js} +2 -2
  34. package/dist/cli-bundle/focused-chunks/{chunk-SYZENPIT.js → chunk-EXBCLIBU.js} +2 -2
  35. package/dist/cli-bundle/focused-chunks/chunk-JDOMQ7VQ.js +4 -0
  36. package/dist/cli-bundle/focused-chunks/chunk-L623ZPNK.js +2 -0
  37. package/dist/cli-bundle/focused-chunks/chunk-MCZXYZAF.js +2 -0
  38. package/dist/cli-bundle/focused-chunks/chunk-ODHQEECS.js +2 -0
  39. package/dist/cli-bundle/focused-chunks/{chunk-ZQPGZZWQ.js → chunk-PRHY2IMX.js} +3 -3
  40. package/dist/cli-bundle/focused-chunks/chunk-RZU5U6Q7.js +2 -0
  41. package/dist/cli-bundle/focused-chunks/{chunk-ATEY76SX.js → chunk-US7VEYZG.js} +2 -2
  42. package/dist/cli-bundle/focused-chunks/chunk-VXDSU5MC.js +26 -0
  43. package/dist/cli-bundle/focused-chunks/chunk-YBMGXBFV.js +16 -0
  44. package/dist/cli-bundle/focused-chunks/chunk-YLVBJ6GF.js +2 -0
  45. package/dist/cli-bundle/focused-chunks/{chunk-CYFK5UPB.js → chunk-ZBIQQYMI.js} +2 -2
  46. package/dist/cli-bundle/main.js +13 -13
  47. package/dist/cli-bundle/sdk-authoring.js +1 -1
  48. package/dist/cli-bundle/sdk-contracts.js +2 -1
  49. package/dist/cli-bundle/sdk-core.js +28 -28
  50. package/dist/cli-bundle/sdk-governance.js +1 -1
  51. package/dist/cli-bundle/sdk-graph.js +1 -1
  52. package/dist/cli-bundle/sdk-merge.js +32 -32
  53. package/dist/cli-bundle/sdk-query.js +1 -1
  54. package/dist/cli-bundle/sdk-runtime.js +1 -1
  55. package/dist/cli-bundle/sdk-testing.js +1 -1
  56. package/dist/cli-bundle/sdk.js +5 -4
  57. package/dist/core/config/nested-settings.js +8 -2
  58. package/dist/core/extensions/exporter-output-contract.d.ts +12 -0
  59. package/dist/core/extensions/exporter-output-contract.js +67 -0
  60. package/dist/core/extensions/extension-types.d.ts +36 -1
  61. package/dist/core/extensions/extension-types.js +2 -2
  62. package/dist/core/extensions/loader.js +35 -44
  63. package/dist/core/history/event-index.d.ts +5 -0
  64. package/dist/core/history/event-index.js +133 -27
  65. package/dist/core/sentry/helpers.js +3 -3
  66. package/dist/core/shared/constants.js +5 -2
  67. package/dist/core/shared/errors.d.ts +2 -0
  68. package/dist/core/shared/errors.js +2 -2
  69. package/dist/core/store/settings-validator.d.ts +4 -0
  70. package/dist/core/store/settings-validator.js +3 -2
  71. package/dist/core/store/settings.js +8 -2
  72. package/dist/mcp/tool-definitions.js +12 -7
  73. package/dist/sdk/agent/refusal-closure.d.ts +41 -0
  74. package/dist/sdk/agent/refusal-closure.js +92 -0
  75. package/dist/sdk/agent/refusal-reachability.d.ts +1 -1
  76. package/dist/sdk/agent/refusal-reachability.js +4 -4
  77. package/dist/sdk/agent-capability-contracts.d.ts +13 -0
  78. package/dist/sdk/agent-capability-contracts.js +104 -7
  79. package/dist/sdk/authoring.d.ts +1 -1
  80. package/dist/sdk/authoring.js +2 -2
  81. package/dist/sdk/cli-bootstrap.d.ts +2 -2
  82. package/dist/sdk/cli-bootstrap.js +4 -4
  83. package/dist/sdk/cli-contracts/command-aliases.d.ts +34 -2
  84. package/dist/sdk/cli-contracts/command-aliases.js +80 -13
  85. package/dist/sdk/cli-contracts/commander-mutation-options.js +30 -6
  86. package/dist/sdk/cli-contracts/commander-types.js +5 -4
  87. package/dist/sdk/cli-contracts/enum-contracts.d.ts +4 -0
  88. package/dist/sdk/cli-contracts/enum-contracts.js +9 -2
  89. package/dist/sdk/cli-contracts/flag-contracts.d.ts +5 -0
  90. package/dist/sdk/cli-contracts/flag-contracts.js +84 -13
  91. package/dist/sdk/cli-contracts/flag-lexicon-contracts.d.ts +55 -0
  92. package/dist/sdk/cli-contracts/flag-lexicon-contracts.js +240 -0
  93. package/dist/sdk/cli-contracts/grammar-contracts.d.ts +151 -0
  94. package/dist/sdk/cli-contracts/grammar-contracts.js +958 -0
  95. package/dist/sdk/cli-contracts/runtime-contracts.d.ts +33 -5
  96. package/dist/sdk/cli-contracts/runtime-contracts.js +100 -23
  97. package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +28 -1
  98. package/dist/sdk/cli-contracts/tool-option-contracts.js +38 -3
  99. package/dist/sdk/cli-contracts/tool-parameter-tables.js +7 -2
  100. package/dist/sdk/cli-contracts/tool-schema.d.ts +2 -2
  101. package/dist/sdk/cli-contracts/tool-schema.js +20 -11
  102. package/dist/sdk/cli-contracts.d.ts +5 -4
  103. package/dist/sdk/cli-contracts.js +7 -6
  104. package/dist/sdk/completion.js +13 -15
  105. package/dist/sdk/compose.d.ts +3 -3
  106. package/dist/sdk/compose.js +2 -2
  107. package/dist/sdk/context-intent-contracts.d.ts +2 -2
  108. package/dist/sdk/context-intent-contracts.js +22 -7
  109. package/dist/sdk/contracts.d.ts +3 -0
  110. package/dist/sdk/contracts.js +5 -2
  111. package/dist/sdk/core.d.ts +1 -1
  112. package/dist/sdk/core.js +3 -3
  113. package/dist/sdk/environment/host-environment-errors.js +3 -3
  114. package/dist/sdk/flag-invocation-contracts.d.ts +37 -0
  115. package/dist/sdk/flag-invocation-contracts.js +218 -9
  116. package/dist/sdk/generated/generated-error-code-catalog-part-1.js +186 -14
  117. package/dist/sdk/generated/generated-error-code-catalog-part-2.js +194 -26
  118. package/dist/sdk/guide-topics.js +5 -5
  119. package/dist/sdk/index.d.ts +10 -7
  120. package/dist/sdk/index.js +10 -7
  121. package/dist/sdk/init-agent-guidance.js +3 -3
  122. package/dist/sdk/mutation-events.d.ts +18 -2
  123. package/dist/sdk/mutation-events.js +59 -16
  124. package/dist/sdk/output-projection.d.ts +2 -0
  125. package/dist/sdk/output-projection.js +11 -5
  126. package/dist/sdk/output.d.ts +44 -0
  127. package/dist/sdk/output.js +28 -2
  128. package/dist/sdk/query/complete-list.d.ts +94 -0
  129. package/dist/sdk/query/complete-list.js +173 -0
  130. package/dist/sdk/query/get.js +25 -6
  131. package/dist/sdk/query/list.js +19 -2
  132. package/dist/sdk/query/search-contracts.d.ts +1 -1
  133. package/dist/sdk/query/search-contracts.js +23 -9
  134. package/dist/sdk/query/search.js +3 -3
  135. package/dist/sdk/query.d.ts +1 -0
  136. package/dist/sdk/query.js +3 -2
  137. package/dist/sdk/read-output/continuation.d.ts +1 -1
  138. package/dist/sdk/read-output/continuation.js +7 -24
  139. package/dist/sdk/read-output-contracts.d.ts +2 -2
  140. package/dist/sdk/read-output-contracts.js +89 -13
  141. package/dist/sdk/read-output-rows.d.ts +4 -0
  142. package/dist/sdk/read-output-rows.js +47 -18
  143. package/dist/sdk/runtime-extended-actions.js +10 -2
  144. package/dist/sdk/runtime.d.ts +8 -2
  145. package/dist/sdk/runtime.js +18 -11
  146. package/dist/sdk/workspace-snapshot.d.ts +2 -0
  147. package/dist/sdk/workspace-snapshot.js +10 -2
  148. package/dist/types.d.ts +5 -0
  149. package/dist/types.js +2 -2
  150. package/docs/AGENT_GUIDE.md +25 -9
  151. package/docs/CLI_GRAMMAR.md +106 -0
  152. package/docs/COMMANDS.md +39 -27
  153. package/docs/ONBOARDING.md +4 -4
  154. package/docs/OUTPUT_PROJECTION_CONTRACTS.md +11 -2
  155. package/docs/QUICKSTART.md +1 -1
  156. package/docs/README.md +2 -0
  157. package/docs/READ_OUTPUT_CONTRACTS.md +10 -6
  158. package/docs/RELEASING.md +30 -6
  159. package/docs/SDK.md +42 -2
  160. package/docs/SDK_ARTIFACT_OUTPUT.md +72 -0
  161. package/docs/SDK_CONTEXT_COORDINATION.md +46 -12
  162. package/docs/TESTING.md +14 -1
  163. package/docs/agent-task-token-baseline.json +5 -5
  164. package/docs/generated/AGENT_COMMAND_SURFACE.md +78 -78
  165. package/docs/generated/FLAG_LEXICON_BUDGETS.md +76 -0
  166. package/marketplace.json +2 -2
  167. package/package.json +5 -2
  168. package/packages/pm-beads/package.json +1 -1
  169. package/packages/pm-calendar/package.json +1 -1
  170. package/packages/pm-command-kit/package.json +1 -1
  171. package/packages/pm-digital-twin/package.json +1 -1
  172. package/packages/pm-governance-audit/package.json +1 -1
  173. package/packages/pm-guide-shell/package.json +1 -1
  174. package/packages/pm-kanban/package.json +1 -1
  175. package/packages/pm-lifecycle-hooks/package.json +1 -1
  176. package/packages/pm-linked-test-adapters/package.json +1 -1
  177. package/packages/pm-search-advanced/package.json +1 -1
  178. package/packages/pm-templates/package.json +1 -1
  179. package/packages/pm-todos/package.json +1 -1
  180. package/packages/pm-vcs/package.json +1 -1
  181. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  182. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  183. package/scripts/generate-agent-capability-surfaces.mjs +20 -14
  184. package/sdk/public-surface.json +1245 -60
  185. package/dist/cli-bundle/chunks/chunk-2QLOXC3V.js +0 -3
  186. package/dist/cli-bundle/chunks/chunk-4JPYF536.js +0 -35
  187. package/dist/cli-bundle/chunks/chunk-6VDLG2FC.js +0 -13
  188. package/dist/cli-bundle/chunks/chunk-ION3E43Q.js +0 -197
  189. package/dist/cli-bundle/chunks/chunk-OAC5NIV4.js +0 -3
  190. package/dist/cli-bundle/chunks/chunk-TPXZIBIV.js +0 -5
  191. package/dist/cli-bundle/chunks/chunk-YM2YAMF7.js +0 -2
  192. package/dist/cli-bundle/chunks/register-list-query-Q7KII4G5.js +0 -10
  193. package/dist/cli-bundle/chunks/register-mutation-4WBRPXLV.js +0 -20
  194. package/dist/cli-bundle/chunks/register-operations-SSENDH5B.js +0 -2
  195. package/dist/cli-bundle/focused-chunks/chunk-267MUUS6.js +0 -16
  196. package/dist/cli-bundle/focused-chunks/chunk-2NNFLLNG.js +0 -2
  197. package/dist/cli-bundle/focused-chunks/chunk-2QSAKMIH.js +0 -2
  198. package/dist/cli-bundle/focused-chunks/chunk-BUCG4ZI2.js +0 -2
  199. package/dist/cli-bundle/focused-chunks/chunk-EHXIKD6K.js +0 -2
  200. package/dist/cli-bundle/focused-chunks/chunk-KGEXTMPG.js +0 -2
  201. package/dist/cli-bundle/focused-chunks/chunk-KP2VQQVQ.js +0 -2
  202. package/dist/cli-bundle/focused-chunks/chunk-POEEAD2V.js +0 -4
  203. package/dist/cli-bundle/focused-chunks/chunk-XPIC53VA.js +0 -26
  204. package/dist/cli-bundle/focused-chunks/chunk-ZT2DJS27.js +0 -155
@@ -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-XPIC53VA.js";import{a as T,b as M,c as B,d as N,u as J}from"./focused-chunks/chunk-SYZENPIT.js";import"./focused-chunks/chunk-2NNFLLNG.js";import"./focused-chunks/chunk-XKAMP5OU.js";import"./focused-chunks/chunk-2QSAKMIH.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-POEEAD2V.js";import{b as Ce,c as we,d as Ie}from"./focused-chunks/chunk-EHXIKD6K.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]="705476d3-74b8-540d-b646-956e24f703d4")}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]="99a9b24a-4bc7-50da-8333-e76086f0e303")}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 wr,b as hr,c as Dr,d as Ir,e as _r,f as Tr,g as kr,h as vr,i as Jr,j as Kr,k as Lr,l as Mr,m as Nr,n as Or,o as Pr,p as Rr,q as Sr,r as Ur,s as Vr,t as Wr,u as Xr}from"./focused-chunks/chunk-BUCG4ZI2.js";import{a as ir,b as mr,c as xr,d as ar,e as ur,f as yr,g as gr,h as cr}from"./focused-chunks/chunk-KGEXTMPG.js";import{A as $e,B as or,C as er,D as rr,E as fr,G as tr,H as dr,I as nr,J as pr,K as sr,L as lr,M as br,a as f,b as t,c as d,d as n,e as p,f as s,g as l,h as b,i,j as ie,k as me,l as xe,m as ae,n as ue,o as ye,p as ge,q as ce,r as we,s as he,t as De,u as Ie,v as _e,w as Te,x as ke,y as ve,z as Ee}from"./focused-chunks/chunk-2NNFLLNG.js";import{$ as io,A as J,Aa as Ko,B as K,Ba as Lo,C as L,Ca as Mo,D as M,Da as No,E as N,Ea as Oo,F as O,Fa as Po,G as P,Ga as Qo,H as Q,Ha as Ro,I as R,J as S,Ja as So,K as U,Ka as Uo,L as V,La as Vo,M as W,N as X,O as Y,P as Z,Q as $,R as oo,S as eo,T as ro,U as fo,V as to,W as no,X as po,Y as so,Z as lo,_ as bo,aa as mo,b as m,ba as xo,c as x,ca as ao,d as a,da as uo,e as u,ea as yo,f as y,fa as go,g,ga as co,h as c,ha as wo,i as w,ia as ho,j as h,ja as Do,k as D,ka as Io,l as I,la as _o,m as _,ma as To,n as T,na as ko,o as k,oa as vo,p as v,pa as Eo,q as E,qa as jo,r as j,ra as qo,s as q,sa as zo,t as z,ta as Ao,u as A,ua as Bo,v as B,va as Co,w as C,wa as Fo,x as F,xa as Go,y as G,ya as Ho,z as H,za as Jo}from"./focused-chunks/chunk-2QSAKMIH.js";import{e as Er,f as jr,g as qr,h as zr,i as Ar,j as Br,k as Cr,l as Fr,m as Gr,n as Hr,o as Qr}from"./focused-chunks/chunk-KP2VQQVQ.js";import{$a as Se,Aa as je,Ba as qe,Ca as ze,Da as Ae,Ea as Be,Fa as Ce,Ga as Fe,Ha as Ge,Ia as He,Ja as Je,Ta as Ke,Ua as Le,Va as Me,Wa as Ne,Xa as Oe,Ya as Pe,Za as Qe,_a as Re,ab as Ue,bb as Ve,cb as We,db as Xe,ea as Wo,eb as Ye,fa as Xo,fb as Ze,ga as Yo,ha as Zo,ia as $o,ja as oe,ka as ee,ma as re,na as fe,oa as te,pa as de,qa as ne,ra as pe,sa as se,ta as le,ua as be}from"./focused-chunks/chunk-EHXIKD6K.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new o.Error().stack;e&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[e]="65e53d90-6fff-59df-bdfc-0d2387b5a28d")}catch{}})();export{s as ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,Co as ACTIVITY_FLAG_CONTRACTS,g as AGGREGATE_FLAG_CONTRACTS,fo as APPEND_FLAG_CONTRACTS,To as ASSURANCE_FLAG_CONTRACTS,d as CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS,Bo as CALENDAR_FLAG_CONTRACTS,to as CLAIM_FLAG_CONTRACTS,rr as CLOSE_ACTION_OPTION_KEYS,eo as CLOSE_FLAG_CONTRACTS,ro as CLOSE_MANY_FLAG_CONTRACTS,io as CLOSE_TASK_FLAG_CONTRACTS,c as COMMENTS_FLAG_CONTRACTS,Ro as COMPLETION_FLAG_CONTRACTS,C as CONFIG_FLAG_CONTRACTS,n as CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS,Go as CONTEXT_FLAG_CONTRACTS,Qo as CONTRACTS_FLAG_CONTRACTS,jo as COPY_FLAG_CONTRACTS,mr as CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,ar as CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,xr as CREATE_COMMANDER_STRING_OPTION_CONTRACTS,ko as CREATE_FLAG_CONTRACTS,po as DELETE_FLAG_CONTRACTS,Ko as DEPS_FLAG_CONTRACTS,I as DOCS_FLAG_CONTRACTS,Do as DUPLICATES_FLAG_CONTRACTS,Mo as EVAL_FLAG_CONTRACTS,Fo as EVENTS_FLAG_CONTRACTS,xo as EVENT_FLAG_CONTRACTS,ir 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,qo as FOCUS_FLAG_CONTRACTS,wo as GC_FLAG_CONTRACTS,Ho as GET_FLAG_CONTRACTS,u as GLOBAL_FLAG_CONTRACTS,Lo as GRAPH_FLAG_CONTRACTS,Jo as GUIDE_FLAG_CONTRACTS,Io 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,Eo as ITEM_COMPLETE_FLAG_CONTRACTS,vo as ITEM_MUTATE_FLAG_CONTRACTS,h as LEARNINGS_FLAG_CONTRACTS,f as LIST_COMMANDER_STRING_OPTION_CONTRACTS,y as LIST_FILTER_FLAG_CONTRACTS,mo as MEET_FLAG_CONTRACTS,T as MERGE_FLAG_CONTRACTS,p as NEXT_COMMANDER_STRING_OPTION_CONTRACTS,Oo as NEXT_FLAG_CONTRACTS,w as NOTES_FLAG_CONTRACTS,J as PACKAGE_FLAG_CONTRACTS,K as PACKAGE_INIT_FLAG_CONTRACTS,bo as PAUSE_TASK_FLAG_CONTRACTS,er as PLAN_CREATE_METADATA_PARAMETER_KEYS,A as PLAN_FLAG_CONTRACTS,fe as PM_CLI_ONLY_TOOL_ACTION_WAIVERS,hr as PM_COMMAND_EXIT_CONTRACTS,wr as PM_COMMAND_EXIT_OUTCOME_CONTRACTS,Ce as PM_COMMAND_OUTPUT_BUDGET_CONTRACTS,Ur as PM_COMMAND_OUTPUT_ENVELOPE_CONTRACTS,Er as PM_CONTEXT_INTENT_CONTRACTS,ee as PM_CORE_COMMAND_NAMES,Nr as PM_ERROR_CODE_CATALOG,Jr as PM_ERROR_CODE_EXIT_CLASS_CONTRACTS,Wo as PM_EXTENSION_CAPABILITY_CONTRACTS,re as PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS,Yo as PM_EXTENSION_POLICY_MODE_CONTRACTS,oe as PM_EXTENSION_POLICY_SURFACE_CONTRACTS,$o as PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS,Xo as PM_EXTENSION_SERVICE_NAME_CONTRACTS,Zo as PM_EXTENSION_TRUST_MODE_CONTRACTS,qe as PM_OUTPUT_BUDGET_CLASSES,je as PM_OUTPUT_DEGRADATION_STEPS,Rr as PM_OUTPUT_ENVELOPE_KINDS,lr as PM_PROVIDER_TOOL_PARAMETERS_SCHEMA,pr as PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION,Ne as PM_READ_OUTPUT_COMPOSITION_OPTION_FLAGS,Ke as PM_READ_OUTPUT_DIMENSIONS,Me as PM_READ_OUTPUT_OPTION_FLAGS,Le as PM_READ_OUTPUT_SURFACES,Oe as PM_READ_OUTPUT_SURFACE_CONTRACTS,Dr as PM_SUCCESS_EXIT_CODES,te as PM_TOOL_ACTIONS,fr as PM_TOOL_ACTION_PARAMETER_CONTRACTS,sr as PM_TOOL_PARAMETERS_SCHEMA,nr as PM_TOOL_PARAMETERS_SCHEMA_MAJOR,dr as PM_TOOL_PARAMETERS_SCHEMA_VERSION,$e as PM_TOOL_RESERVED_CUSTOM_FIELD_PROPERTIES,z as PROFILE_FLAG_CONTRACTS,oo as REINDEX_FLAG_CONTRACTS,so as RELEASE_FLAG_CONTRACTS,ao as REMIND_FLAG_CONTRACTS,no as RESTORE_FLAG_CONTRACTS,q as SCHEMA_FLAG_CONTRACTS,t as SEARCH_COMMANDER_STRING_OPTION_CONTRACTS,Po as SEARCH_FLAG_CONTRACTS,lo as START_TASK_FLAG_CONTRACTS,ho as STATS_FLAG_CONTRACTS,a as SUBCOMMAND_GLOBAL_FLAG_CONTRACTS,go as TELEMETRY_FLAG_CONTRACTS,yo as TEST_ALL_FLAG_CONTRACTS,uo as TEST_FLAG_CONTRACTS,co as TEST_RUNS_FLAG_CONTRACTS,Te as TOOL_ACTIVITY_OPTION_CONTRACTS,me as TOOL_AGGREGATE_OPTION_CONTRACTS,he as TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACT_SOURCE,_e as TOOL_CALENDAR_OPTION_CONTRACTS,Ie as TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS,ke as TOOL_CONTEXT_OPTION_CONTRACTS,ge as TOOL_CREATE_OPTION_CONTRACTS,ye as TOOL_CREATE_OPTION_CONTRACT_SOURCE,ve as TOOL_DEPS_OPTION_CONTRACTS,Ee as TOOL_GRAPH_OPTION_CONTRACTS,ie as TOOL_LIST_FILTER_OPTION_CONTRACTS,xe as TOOL_SEARCH_FILTER_OPTION_CONTRACTS,ue as TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS,ae as TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACT_SOURCE,De as TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS,we as TOOL_UPDATE_OPTION_CONTRACTS,ce as TOOL_UPDATE_OPTION_CONTRACT_SOURCE,ur as UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,gr as UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,yr as UPDATE_COMMANDER_STRING_OPTION_CONTRACTS,zo as UPDATE_FLAG_CONTRACTS,Ao as UPDATE_MANY_FLAG_CONTRACTS,$ as UPGRADE_FLAG_CONTRACTS,_o as VALIDATE_FLAG_CONTRACTS,No as WORKSPACE_FLAG_CONTRACTS,br as _testOnlyCliContracts,kr as analyzePmCommandExitConformance,de as analyzePmToolActionParity,cr as analyzeSdkCliParameterCompleteness,Br as applyContextIntentProjection,Xe as applyReadOutputDimensions,Se as applyReadOutputIncludeModes,Gr as attachContextIntentReceipt,Qr as attachOutputTokenAccounting,Hr as attachReadOutputContracts,tr as buildPmActionToolInputSchema,x as compactFlagAliasContracts,zr as composeContextIntentContracts,Fr as contextIntentRowId,Ae as createPmCommandOutputBudget,Cr as decodeContextIntentCursor,Je as decodeReadOutputContinuationCursor,Be as definePmCommandOutputBudget,Sr as definePmCommandOutputEnvelope,Kr as definePmErrorCodeCatalog,vr as derivePmBulkMutationEffect,He as encodeReadOutputContinuationCursor,Or as enrichCliFlagInvocationContract,Pr as enrichCliFlagInvocationContracts,Ge as estimatePmOutputTokens,jr as getActiveContextIntentContracts,So as hasSubcommandFlagContractsForCommand,ze as inferPmOutputBudgetClass,pe as isPmExtensionCapabilityContract,le as isPmExtensionPolicyModeContract,be as isPmExtensionPolicySurfaceContract,se as isPmExtensionServiceNameContract,_r as isPmKnownExitCode,Wr as isPmMutationReceipt,Ir as isPmSuccessfulExitCode,ne as isPmToolAction,Ye as isReadOutputBudgetExceeded,Ue as normalizeReadOutputIncludeModeOptions,Xr as parseMutationReceipt,l as readFirstStringFromCommanderOptions,b as readFirstValueFromCommanderOptions,Re as readOutputIncludeModeOptions,i as readStringArrayFromCommanderOptions,Lr as resolveCanonicalPmErrorCodeContract,Ar as resolveContextIntentContract,Tr as resolvePmCommandExitContract,Fe as resolvePmCommandOutputBudget,Vr as resolvePmCommandOutputEnvelope,Mr as resolvePmErrorCodeContract,or as resolvePmToolCustomFieldCollision,Ve as resolveReadOutputDimensions,Ze as resolveReadOutputEncoding,Pe as resolveReadOutputSurface,Uo as resolveSubcommandFlagContractsForCommand,qr as runWithContextIntentContracts,We as stabilizeReadOutputReceiptEstimates,Vo as toCompletionFlagString,Qe as validateReadOutputOptions,m 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