@unbrained/pm-cli 2026.10.27 → 2026.10.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +23 -0
- package/dist/cli/commander-usage.js +2 -2
- package/dist/cli/error-guidance.js +2 -2
- package/dist/cli-bundle/bundle-manifest.json +1 -1
- package/dist/cli-bundle/chunks/chunk-2J7I54MQ.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-25MTQAHX.js → chunk-3KMYHYJV.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UHKN6TJM.js → chunk-7V37RC2L.js} +44 -44
- package/dist/cli-bundle/chunks/{chunk-5PTMQBKJ.js → chunk-AHVN4GHF.js} +30 -29
- package/dist/cli-bundle/chunks/{chunk-QQYLNHZK.js → chunk-CS7QDSUX.js} +28 -28
- package/dist/cli-bundle/chunks/{chunk-34OQP43K.js → chunk-CXUQEZDX.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-X5TMR7KC.js → chunk-D3AIQZXF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NNIYQHYT.js → chunk-D6P6IBPN.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HIX2OMEZ.js → chunk-DKLEDWVW.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-2XUDAQK5.js → chunk-DM3PICGU.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-32QK43XG.js → chunk-E5QBZ4HI.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-H434DKYU.js → chunk-JESLOJD7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-57YPOOED.js → chunk-LWW4F4G2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-O3LPT34G.js → chunk-PQLRKFPZ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-ONC4BBQP.js → chunk-RZQNFHXO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ER7RLJW5.js → chunk-TH5KPAN4.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-F26MRQZY.js → chunk-XHONSCLJ.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-EKV5GP6P.js → chunk-YUBUNECD.js} +42 -42
- package/dist/cli-bundle/chunks/{chunk-OQOEBWHU.js → chunk-YYD5MNAV.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-Q55KZDNF.js → chunk-ZX3XMTZG.js} +2 -2
- package/dist/cli-bundle/chunks/{indexed-receipt-blobs-63WYG2PY.js → indexed-receipt-blobs-LHLE7PSG.js} +2 -2
- package/dist/cli-bundle/chunks/{mutation-admission-L3A6FSZ7.js → mutation-admission-GKDKHRTZ.js} +2 -2
- package/dist/cli-bundle/chunks/{register-list-query-YSQ7UTFI.js → register-list-query-MHJJUM6M.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-6HRXYASW.js → register-mutation-SN425O3R.js} +2 -2
- package/dist/cli-bundle/chunks/{register-operations-4O3YOYXF.js → register-operations-EYUIUGPW.js} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-3WAXNDMY.js → register-setup-WUZ2ZSMY.js} +2 -2
- package/dist/cli-bundle/chunks/{settlement-hook-CRW6PVQK.js → settlement-hook-MN3Y7LVX.js} +2 -2
- package/dist/cli-bundle/chunks/{stage-I46WD4EN.js → stage-2FYJGGG3.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-3EHVI673.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-ZA6AEYIM.js → chunk-46WLWK73.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-E5C24MCV.js → chunk-4GN2ZPT5.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-NLZUI234.js → chunk-6L4KKRK7.js} +18 -18
- package/dist/cli-bundle/focused-chunks/{chunk-WDKZB3V6.js → chunk-6VDRAJYX.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-KTXU5WU6.js → chunk-7SZPZOIC.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-YQKLKRMW.js → chunk-B4ZQJEMT.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-J67PFM3O.js → chunk-BZSACRVX.js} +3 -3
- package/dist/cli-bundle/focused-chunks/{chunk-Y57A4ZDI.js → chunk-C2GLO7HU.js} +3 -3
- package/dist/cli-bundle/focused-chunks/{chunk-R2MTHS2H.js → chunk-DRN4W3YJ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-TAFMNTA5.js → chunk-F6UQJJYB.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-TGUOEOKP.js → chunk-I4X6AKOO.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-SM2KGD4J.js → chunk-IQKLJFJE.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-XK3XMZM4.js → chunk-JTCGDODH.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-HWD63G54.js → chunk-L5GX2FGZ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-MVY6JDIH.js → chunk-LPWZERVD.js} +11 -11
- package/dist/cli-bundle/focused-chunks/{chunk-YW5GHQN2.js → chunk-ML5JIUM6.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-YC6NCPLK.js → chunk-OASYSUOH.js} +16 -16
- package/dist/cli-bundle/focused-chunks/{chunk-BH7RE2ZY.js → chunk-ON5WFDCG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-4TXZBGOR.js → chunk-QUPGBO2L.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-SYL73MEI.js → chunk-R3EA3SDW.js} +3 -3
- package/dist/cli-bundle/focused-chunks/{chunk-B266DDBJ.js → chunk-TUN4M757.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-ZH7GTEWL.js → chunk-Z26ZPQH6.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{indexed-receipt-blobs-GAFC52LQ.js → indexed-receipt-blobs-5H6RMRTK.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{mutation-admission-ENBFMV2X.js → mutation-admission-TM3SVU2O.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{settlement-hook-PUYJJDFL.js → settlement-hook-LBVWWSCF.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{stage-MAWZTM2H.js → stage-7ZBRX2Q2.js} +2 -2
- package/dist/cli-bundle/main.js +21 -21
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +1 -1
- package/dist/cli-bundle/sdk-core.js +25 -24
- package/dist/cli-bundle/sdk-governance.js +1 -1
- package/dist/cli-bundle/sdk-graph.js +1 -1
- package/dist/cli-bundle/sdk-merge.js +46 -46
- package/dist/cli-bundle/sdk-query.js +1 -1
- package/dist/cli-bundle/sdk-runtime.js +1 -1
- package/dist/cli-bundle/sdk-testing.js +1 -1
- package/dist/cli-bundle/sdk.js +11 -11
- package/dist/core/item/priority.js +1 -1
- package/dist/core/shared/errors.d.ts +2 -0
- package/dist/core/shared/errors.js +1 -1
- package/dist/core/store/item-store.js +1 -1
- package/dist/sdk/agent/command-recovery.d.ts +5 -0
- package/dist/sdk/agent/command-recovery.js +1 -1
- package/dist/sdk/command-line.d.ts +6 -0
- package/dist/sdk/command-line.js +1 -1
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/lifecycle/close.js +1 -1
- package/dist/sdk/lifecycle/create.js +1 -1
- package/dist/sdk/lifecycle/update-many.js +1 -1
- package/dist/sdk/lifecycle/update.js +1 -1
- package/dist/sdk/public-surface.json +1 -1
- package/dist/sdk/query/history.d.ts +4 -0
- package/dist/sdk/query/history.js +1 -1
- package/dist/sdk/runtime/actions.js +1 -1
- package/dist/sdk/runtime.js +1 -1
- package/dist/sdk/test/command-resolution.d.ts +5 -0
- package/dist/sdk/test/command-resolution.js +3 -0
- package/dist/sdk/test/execution.js +2 -2
- package/docs/COMMANDS.md +28 -1
- package/docs/SDK.md +40 -0
- package/docs/TESTING.md +28 -2
- package/marketplace.json +1 -1
- package/package.json +1 -1
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-claude/package.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/pm-codex/package.json +1 -1
- package/plugins/pm-codex/plugin.json +1 -1
- package/runtime-dependencies.json +1 -1
- package/dist/cli-bundle/chunks/chunk-XERBUA6A.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-U4UBQBS7.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as Pe,b as Oe,c as Ae,d as Fe,e as Re,f as Te,g as Me,h as Be,i as $,j as D,k as j,l as K,m as H,p as U,q,w as G,x as Y,y as X,z as J}from"./focused-chunks/chunk-4TXZBGOR.js";import{a as M,b as B,c as N,d as L,u as Q}from"./focused-chunks/chunk-YQKLKRMW.js";import"./focused-chunks/chunk-ZH7GTEWL.js";import"./focused-chunks/chunk-E5C24MCV.js";import"./focused-chunks/chunk-ZA6AEYIM.js";import{a as g}from"./focused-chunks/chunk-YW5GHQN2.js";import"./focused-chunks/chunk-B266DDBJ.js";import"./focused-chunks/chunk-AK2CI2GI.js";import{Bb as R,Cb as T,J as x,K as k,L as C,M as I,N as F,O as w,Xb as V,Zb as z,_b as W,b as y,c as E,f as m}from"./focused-chunks/chunk-NLZUI234.js";import{b as we,c as Se,d as be}from"./focused-chunks/chunk-KTXU5WU6.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]="52f6eff3-e226-56d9-893a-f16997d11c50")}catch{}})();function He(e){return e}function Ue(e){return e}function Z(e,o){for(let r of o.commands??[])e.registerCommand(r);for(let[r,t]of Object.entries(o.commandOverrides??{}))e.registerCommand(r,t);for(let[r,t]of Object.entries(o.flags??{}))e.registerFlags(r,t);for(let[r,t]of Object.entries(o.parsers??{}))e.registerParser(r,t);for(let[r,t]of Object.entries(o.renderers??{}))if(typeof t=="function")e.registerRenderer(r,t);else{let{run:i,...s}=t;e.registerRenderer(r,i,s)}for(let[r,t]of Object.entries(o.services??{}))e.registerService(r,t)}function ee(e,o){for(let s of o.preflights??[])e.registerPreflight(s);let r=o.itemTypes??[];r.length>0&&e.registerItemTypes(r);let t=o.itemFields??[];t.length>0&&e.registerItemFields(t);let i=o.relationshipKinds??[];i.length>0&&e.registerRelationshipKinds(i);for(let s of o.migrations??[])e.registerMigration(s);for(let s of o.profiles??[])e.registerProfile(s)}function re(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 oe(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 te(e){let o={activate:async r=>{Z(r,e),ee(r,e),re(r,e),oe(r,e.hooks??{}),await e.activate?.(r)}};return e.manifest&&(o.manifest=e.manifest),e.deactivate&&(o.deactivate=e.deactivate),o}function d(e){let o=e.flatMap(r=>r??[]);return o.length>0?o:void 0}function p(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[t,i]of Object.entries(r??{}))o[t]=[...o[t]??[],...i];return Object.keys(o).length>0?o:void 0}var ie=["beforeCommand","beforeMutation","afterCommand","onWrite","onRead","onIndex"];function se(e,o,r){let t=o.map(s=>s?.[r]),i=d(t);if(i!==void 0){let s=e;s[r]=i}}function ae(e){let o={};for(let r of ie)se(o,e,r);return Object.keys(o).length>0?o:void 0}function qe(...e){let o={},r=(n,c)=>{c!==void 0&&(o[n]=c)};r("commands",d(e.map(n=>n.commands))),r("commandOverrides",p(e.map(n=>n.commandOverrides))),r("flags",ne(e.map(n=>n.flags))),r("parsers",p(e.map(n=>n.parsers))),r("renderers",p(e.map(n=>n.renderers))),r("services",p(e.map(n=>n.services))),r("preflights",d(e.map(n=>n.preflights))),r("itemTypes",d(e.map(n=>n.itemTypes))),r("itemFields",d(e.map(n=>n.itemFields))),r("relationshipKinds",d(e.map(n=>n.relationshipKinds))),r("migrations",d(e.map(n=>n.migrations))),r("profiles",d(e.map(n=>n.profiles))),r("searchProviders",d(e.map(n=>n.searchProviders))),r("vectorStoreAdapters",d(e.map(n=>n.vectorStoreAdapters))),r("assuranceProviders",d(e.map(n=>n.assuranceProviders))),r("importers",d(e.map(n=>n.importers))),r("exporters",d(e.map(n=>n.exporters))),r("hooks",ae(e.map(n=>n.hooks)));let t;for(let n of e)n.manifest&&(t=n.manifest);r("manifest",t);let i=e.some(n=>n.activate);r("activate",i?async n=>{for(let c of e)c.activate&&await c.activate(n)}:void 0);let s=e.some(n=>n.deactivate);return r("deactivate",s?async()=>{let n=[];for(let c of[...e].reverse())if(c.deactivate)try{await c.deactivate()}catch(f){n.push(f)}if(n.length>0)throw n.length>1?new AggregateError(n,"Multiple extension blueprint deactivate hooks failed."):n[0]}:void 0),o}var ce=[["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[i,s]of ce)u(e[i])&&o.add(s);(e.commands??[]).filter(l).some(i=>i.flags!==void 0)&&o.add("schema");let r=[...e.importers??[],...e.exporters??[]].filter(l);r.some(i=>i?.options?.flags!==void 0)&&o.add("schema"),r.some(i=>typeof i=="object")&&o.add("commands");let t=e.hooks??{};return[t.beforeCommand,t.beforeMutation,t.afterCommand,t.onWrite,t.onRead,t.onIndex].some(u)&&o.add("hooks"),[...o].sort((i,s)=>i.localeCompare(s))}var me=[["beforeCommand","before_command"],["beforeMutation","before_mutation"],["afterCommand","after_command"],["onWrite","on_write"],["onRead","on_read"],["onIndex","on_index"]];function a(e){return[...new Set(e)].sort((o,r)=>o.localeCompare(r))}function l(e){return e!=null}function v(e){return m(`${e.name} import`)}function _(e){return m(`${e.name} export`)}function de(e,o,r){return[...e.map(t=>m(t.name)),...o.filter(t=>t.options!==void 0).map(v),...r.filter(t=>t.options!==void 0).map(_)]}function fe(e,o,r,t){return[...Object.keys(e.flags??{}).map(i=>m(i)),...o.filter(i=>i.flags!==void 0).map(i=>m(i.name)),...r.filter(i=>i.options?.flags!==void 0).map(v),...t.filter(i=>i.options?.flags!==void 0).map(_)]}function le(e){return me.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,t])=>{let i=t;return{format:r,commands:a((i.commands??[]).map(s=>m(s))),result_discriminator:i.resultDiscriminator!==void 0}}).sort((r,t)=>r.format.localeCompare(t.format));return o.length>0?{renderer_ownership:o}:{}}function ue(e){return!e||e.length===0?{}:{assurance_providers:a(e.map(o=>o.id))}}function ge(e,o,r){return{item_types:a((e.itemTypes??[]).map(t=>t.name)),item_fields:a((e.itemFields??[]).map(t=>t.name)),...(e.relationshipKinds?.length??0)>0?{relationship_kinds:a(e.relationshipKinds.map(t=>t.kind))}:{},migrations:a((e.migrations??[]).flatMap(t=>typeof t.id=="string"?[t.id]:[])),profiles:a((e.profiles??[]).map(t=>t.name)),importers:a(o.map(t=>m(t.name))),exporters:a(r.map(t=>m(t.name))),search_providers:a((e.searchProviders??[]).map(t=>t.name)),vector_store_adapters:a((e.vectorStoreAdapters??[]).map(t=>t.name)),...ue(e.assuranceProviders),parser_overrides:a(Object.keys(e.parsers??{}).map(t=>m(t))),service_overrides:a(Object.keys(e.services??{}).map(t=>String(t).trim().toLowerCase())),renderer_overrides:a(Object.keys(e.renderers??{}).map(t=>String(t).trim().toLowerCase())),...pe(e.renderers),preflight_overrides:(e.preflights??[]).length,preflight_ownership:(e.preflights??[]).map(t=>({commands:[...t.commands??[]]}))}}function Ve(e){let o=(e.commands??[]).filter(l),r=(e.importers??[]).filter(l),t=(e.exporters??[]).filter(l),i=r.map(v),s=t.map(_),n=de(o,r,t),c=fe(e,o,r,t),f=e.hooks??{},O=ge(e,r,t);return{capabilities:h(e),commands:a(n),command_overrides:a(Object.keys(e.commandOverrides??{}).map(A=>m(A))),command_handlers:a([...n,...i,...s]),hooks:le(f),flag_commands:a(c),...O}}var he=["commands","commandOverrides","flags","parsers","renderers","services","preflights","itemTypes","itemFields","relationshipKinds","migrations","profiles","searchProviders","vectorStoreAdapters","assuranceProviders","importers","exporters"];function ve(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(o=>o.flags??[]),...(e.importers??[]).flatMap(o=>o.options?.flags??[]),...(e.exporters??[]).flatMap(o=>o.options?.flags??[])].flatMap(o=>{if(typeof o?.long!="string"&&typeof o?.short!="string")return[];let r=x(o.long,o.short);if(r===null)return[];let{token:t,failure:i}=r;return[{code:i,severity:"error",message:`Flag "${t}" ${k(t,i)}.`,field:t}]})}function b(e){let o=new Set;for(let r of e){let t=E(r)??y(r);t!==null&&o.add(t)}return[...o].sort((r,t)=>r.localeCompare(t))}function ye(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 t=new Set(o),i=new Set(e);for(let s of e)t.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)i.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 Ee(e){let o=[],r=new Map;for(let i of e.commands??[]){let s=m(i.name);r.set(s,(r.get(s)??0)+1)}for(let[i,s]of r)s>1&&o.push({code:"duplicate_command",severity:"warning",message:`Command "${i}" is declared ${s} times in commands; the later registration shadows the earlier one at dispatch.`,command:i});let t=new Set(Object.keys(e.commandOverrides??{}).map(i=>m(i)));for(let i of r.keys())t.has(i)&&o.push({code:"command_override_conflict",severity:"warning",message:`Command "${i}" is declared both as a new command definition and as a command override; register one or the other.`,command:i});return o}function xe(e){let o=[];for(let r of he)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),t=o.declaredCapabilities??e.manifest?.capabilities,i=Array.isArray(t)?b(t):null,s=[...ye(r,i),...Ee(e),..._e(e),...ve(e),...xe(e)];return{ok:s.every(n=>n.severity!=="error"),findings:s,used:r,declared:i}}function P(e,o){let{additionalCapabilities:r,...t}=o,i=Array.isArray(r)?b(r):[],s=[...new Set([...h(e),...i])].sort((n,c)=>n.localeCompare(c));return{...t,capabilities:s}}function ze(e,o){let r=P(e,o);return{module:te({...e,manifest:r}),manifest:r}}function S(e,o){if(e.status==="absent"||e.status==="ok")return null;let r=`${e.kind}_${e.status}`,t="";switch(r){case"pm_min_version_invalid":t=`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":t=`pm_min_version "${e.required}" could not be compared against pm ${o}; compatibility is unverified.`;break;case"pm_min_version_unmet":t=`Requires pm >= ${e.required} but the target is pm ${o}; the loader skips the extension.`;break;case"pm_max_version_invalid":t=`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":t=`pm_max_version "${e.required}" could not be compared against pm ${o}; compatibility is unverified.`;break;case"pm_max_version_exceeded":t=`Allows pm <= ${e.required} but the target is pm ${o}; the loader skips the extension.`;break;case"pm_max_version_exceeded_warn":t=`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:t}}function Ce(e,o){let r=C(e.pm_min_version,o.pmVersion),t=I(e.pm_max_version,o.pmVersion,o.pmMaxVersionExceededMode??"block"),i=w(e).findings.map(f=>({code:f.code,severity:"warning",constraint:"manifest",required:f.code==="manifest_unknown_key"?f.path:"pm_min_version",current:o.pmVersion,path:f.path,...f.suggested_key?{suggested_key:f.suggested_key}:{},message:f.message})),s=[],n=S(r,o.pmVersion);n!==null&&s.push(n);let c=S(t,o.pmVersion);return c!==null&&s.push(c),{compatible:r.allowed&&t.allowed,findings:[...i,...s],pmVersion:o.pmVersion}}var Ie=new Set(["capability_undeclared","capability_unused","manifest_capabilities_absent"]);function We(e,o={}){let r=ke(e,{declaredCapabilities:o.declaredCapabilities}),t=o.identity?P(e,o.identity):null,i=o.target?Ce(t??e.manifest??{},o.target):null,s=[...(t!==null&&o.declaredCapabilities===void 0?r.findings.filter(n=>!Ie.has(n.code)):r.findings).map(n=>({source:"blueprint",severity:n.severity,code:n.code,message:n.message})),...(i?.findings??[]).map(n=>({source:"compatibility",severity:n.severity,code:n.code,message:n.message}))];return{ok:s.every(n=>n.severity!=="error"),capabilities:r.used,blueprint:r,manifest:t,compatibility:i,findings:s}}(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]="4c9a1aa8-05b6-53da-a8b1-f1a7289d39cf")}catch{}})();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 tr(e){return e}function nr(e){return e}function ir(e){return e}function sr(e){return e}function ar(e){return e}function cr(e){return{handled:!0,result:e}}function mr(){return{handled:!1}}function dr(e){return e}function fr(e){return e}function lr(e){return e}function pr(e){return e}function ur(e){return e}function gr(e){return e}function hr(e){return e}function vr(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]="d0b86c6a-67f0-52f2-90b8-d1058e8f2284")}catch{}})();export{D as BUILTIN_PROFILES,Pe as EXTENSION_CAPABILITIES,be as EXTENSION_CAPABILITY_CONTRACT,we as EXTENSION_CAPABILITY_CONTRACT_VERSION,Se as EXTENSION_CAPABILITY_LEGACY_ALIASES,V as EXTENSION_CAPABILITY_REGISTRATION_SURFACES,Oe as EXTENSION_POLICY_MODES,Ae as EXTENSION_POLICY_SURFACES,Re as EXTENSION_SANDBOX_PROFILES,Fe as EXTENSION_TRUST_MODES,Me as LIST_FILTER_EXTENSION_FLAG_DEFINITIONS,B as PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS,M as PM_PACKAGE_RESOURCE_KINDS,Y as PROFILE_LINT_CODES,G as PROFILE_LINT_DIMENSIONS,$ as PROFILE_NAMES,g as RESERVED_ITEM_FIELD_NAMES,Be as SEARCH_EXTENSION_FLAG_DEFINITIONS,Ce as checkExtensionManifestCompatibility,L as collectPackageExtensionDirectories,z as collectUsedExtensionCapabilities,te as composeExtension,ze as composeExtensionPackage,T as createExtensionContributionInventory,mr as declineServiceOverride,gr as defineAfterCommandHook,pr as defineBeforeCommandHook,ur as defineBeforeMutationHook,Je as defineCommand,nr as defineCommandOverride,lr as defineExporter,He as defineExtension,Ue as defineExtensionBlueprint,Ye as defineExtensionManifest,Qe as defineFlag,fr as defineImporter,er as defineItemField,Ze as defineItemType,rr as defineMigration,_r as defineOnIndexHook,vr as defineOnReadHook,hr as defineOnWriteHook,ir as defineParserOverride,sr as definePreflightOverride,Xe as defineProjectProfile,dr as defineRendererOverride,or as defineSearchProvider,ar as defineServiceOverride,tr as defineVectorStoreAdapter,h as deriveExtensionCapabilities,Ve as describeExtensionBlueprint,U as describeProfileComposition,q as describeProjectProfile,cr as handleServiceOverride,F as inspectExtensionManifestSchema,ke as lintExtensionBlueprint,w as lintExtensionManifestSchema,X as lintProjectProfile,H as listProfiles,qe as mergeExtensionBlueprints,R as normalizeExtensionContributionInventory,j as normalizeProfileName,J as planProfileApplication,We as preflightExtension,N as readPmPackageManifest,W as reconcileExtensionCapabilityUsage,Q as renderExtensionSurfaceMarkdown,K as resolveProfile,P as synthesizeExtensionManifest,Te as toExtensionFlagDefinitions};
|
|
1
|
+
import{a as Pe,b as Oe,c as Ae,d as Fe,e as Re,f as Te,g as Me,h as Be,i as $,j as D,k as j,l as K,m as H,p as U,q,w as G,x as Y,y as X,z as J}from"./focused-chunks/chunk-QUPGBO2L.js";import{a as M,b as B,c as N,d as L,u as Q}from"./focused-chunks/chunk-B4ZQJEMT.js";import"./focused-chunks/chunk-Z26ZPQH6.js";import"./focused-chunks/chunk-4GN2ZPT5.js";import"./focused-chunks/chunk-46WLWK73.js";import{a as g}from"./focused-chunks/chunk-ML5JIUM6.js";import"./focused-chunks/chunk-TUN4M757.js";import"./focused-chunks/chunk-AK2CI2GI.js";import{Bb as R,Cb as T,J as x,K as k,L as C,M as I,N as F,O as w,Xb as V,Zb as z,_b as W,b as y,c as E,f as m}from"./focused-chunks/chunk-6L4KKRK7.js";import{b as we,c as Se,d as be}from"./focused-chunks/chunk-7SZPZOIC.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]="52f6eff3-e226-56d9-893a-f16997d11c50")}catch{}})();function He(e){return e}function Ue(e){return e}function Z(e,o){for(let r of o.commands??[])e.registerCommand(r);for(let[r,t]of Object.entries(o.commandOverrides??{}))e.registerCommand(r,t);for(let[r,t]of Object.entries(o.flags??{}))e.registerFlags(r,t);for(let[r,t]of Object.entries(o.parsers??{}))e.registerParser(r,t);for(let[r,t]of Object.entries(o.renderers??{}))if(typeof t=="function")e.registerRenderer(r,t);else{let{run:i,...s}=t;e.registerRenderer(r,i,s)}for(let[r,t]of Object.entries(o.services??{}))e.registerService(r,t)}function ee(e,o){for(let s of o.preflights??[])e.registerPreflight(s);let r=o.itemTypes??[];r.length>0&&e.registerItemTypes(r);let t=o.itemFields??[];t.length>0&&e.registerItemFields(t);let i=o.relationshipKinds??[];i.length>0&&e.registerRelationshipKinds(i);for(let s of o.migrations??[])e.registerMigration(s);for(let s of o.profiles??[])e.registerProfile(s)}function re(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 oe(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 te(e){let o={activate:async r=>{Z(r,e),ee(r,e),re(r,e),oe(r,e.hooks??{}),await e.activate?.(r)}};return e.manifest&&(o.manifest=e.manifest),e.deactivate&&(o.deactivate=e.deactivate),o}function d(e){let o=e.flatMap(r=>r??[]);return o.length>0?o:void 0}function p(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[t,i]of Object.entries(r??{}))o[t]=[...o[t]??[],...i];return Object.keys(o).length>0?o:void 0}var ie=["beforeCommand","beforeMutation","afterCommand","onWrite","onRead","onIndex"];function se(e,o,r){let t=o.map(s=>s?.[r]),i=d(t);if(i!==void 0){let s=e;s[r]=i}}function ae(e){let o={};for(let r of ie)se(o,e,r);return Object.keys(o).length>0?o:void 0}function qe(...e){let o={},r=(n,c)=>{c!==void 0&&(o[n]=c)};r("commands",d(e.map(n=>n.commands))),r("commandOverrides",p(e.map(n=>n.commandOverrides))),r("flags",ne(e.map(n=>n.flags))),r("parsers",p(e.map(n=>n.parsers))),r("renderers",p(e.map(n=>n.renderers))),r("services",p(e.map(n=>n.services))),r("preflights",d(e.map(n=>n.preflights))),r("itemTypes",d(e.map(n=>n.itemTypes))),r("itemFields",d(e.map(n=>n.itemFields))),r("relationshipKinds",d(e.map(n=>n.relationshipKinds))),r("migrations",d(e.map(n=>n.migrations))),r("profiles",d(e.map(n=>n.profiles))),r("searchProviders",d(e.map(n=>n.searchProviders))),r("vectorStoreAdapters",d(e.map(n=>n.vectorStoreAdapters))),r("assuranceProviders",d(e.map(n=>n.assuranceProviders))),r("importers",d(e.map(n=>n.importers))),r("exporters",d(e.map(n=>n.exporters))),r("hooks",ae(e.map(n=>n.hooks)));let t;for(let n of e)n.manifest&&(t=n.manifest);r("manifest",t);let i=e.some(n=>n.activate);r("activate",i?async n=>{for(let c of e)c.activate&&await c.activate(n)}:void 0);let s=e.some(n=>n.deactivate);return r("deactivate",s?async()=>{let n=[];for(let c of[...e].reverse())if(c.deactivate)try{await c.deactivate()}catch(f){n.push(f)}if(n.length>0)throw n.length>1?new AggregateError(n,"Multiple extension blueprint deactivate hooks failed."):n[0]}:void 0),o}var ce=[["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[i,s]of ce)u(e[i])&&o.add(s);(e.commands??[]).filter(l).some(i=>i.flags!==void 0)&&o.add("schema");let r=[...e.importers??[],...e.exporters??[]].filter(l);r.some(i=>i?.options?.flags!==void 0)&&o.add("schema"),r.some(i=>typeof i=="object")&&o.add("commands");let t=e.hooks??{};return[t.beforeCommand,t.beforeMutation,t.afterCommand,t.onWrite,t.onRead,t.onIndex].some(u)&&o.add("hooks"),[...o].sort((i,s)=>i.localeCompare(s))}var me=[["beforeCommand","before_command"],["beforeMutation","before_mutation"],["afterCommand","after_command"],["onWrite","on_write"],["onRead","on_read"],["onIndex","on_index"]];function a(e){return[...new Set(e)].sort((o,r)=>o.localeCompare(r))}function l(e){return e!=null}function v(e){return m(`${e.name} import`)}function _(e){return m(`${e.name} export`)}function de(e,o,r){return[...e.map(t=>m(t.name)),...o.filter(t=>t.options!==void 0).map(v),...r.filter(t=>t.options!==void 0).map(_)]}function fe(e,o,r,t){return[...Object.keys(e.flags??{}).map(i=>m(i)),...o.filter(i=>i.flags!==void 0).map(i=>m(i.name)),...r.filter(i=>i.options?.flags!==void 0).map(v),...t.filter(i=>i.options?.flags!==void 0).map(_)]}function le(e){return me.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,t])=>{let i=t;return{format:r,commands:a((i.commands??[]).map(s=>m(s))),result_discriminator:i.resultDiscriminator!==void 0}}).sort((r,t)=>r.format.localeCompare(t.format));return o.length>0?{renderer_ownership:o}:{}}function ue(e){return!e||e.length===0?{}:{assurance_providers:a(e.map(o=>o.id))}}function ge(e,o,r){return{item_types:a((e.itemTypes??[]).map(t=>t.name)),item_fields:a((e.itemFields??[]).map(t=>t.name)),...(e.relationshipKinds?.length??0)>0?{relationship_kinds:a(e.relationshipKinds.map(t=>t.kind))}:{},migrations:a((e.migrations??[]).flatMap(t=>typeof t.id=="string"?[t.id]:[])),profiles:a((e.profiles??[]).map(t=>t.name)),importers:a(o.map(t=>m(t.name))),exporters:a(r.map(t=>m(t.name))),search_providers:a((e.searchProviders??[]).map(t=>t.name)),vector_store_adapters:a((e.vectorStoreAdapters??[]).map(t=>t.name)),...ue(e.assuranceProviders),parser_overrides:a(Object.keys(e.parsers??{}).map(t=>m(t))),service_overrides:a(Object.keys(e.services??{}).map(t=>String(t).trim().toLowerCase())),renderer_overrides:a(Object.keys(e.renderers??{}).map(t=>String(t).trim().toLowerCase())),...pe(e.renderers),preflight_overrides:(e.preflights??[]).length,preflight_ownership:(e.preflights??[]).map(t=>({commands:[...t.commands??[]]}))}}function Ve(e){let o=(e.commands??[]).filter(l),r=(e.importers??[]).filter(l),t=(e.exporters??[]).filter(l),i=r.map(v),s=t.map(_),n=de(o,r,t),c=fe(e,o,r,t),f=e.hooks??{},O=ge(e,r,t);return{capabilities:h(e),commands:a(n),command_overrides:a(Object.keys(e.commandOverrides??{}).map(A=>m(A))),command_handlers:a([...n,...i,...s]),hooks:le(f),flag_commands:a(c),...O}}var he=["commands","commandOverrides","flags","parsers","renderers","services","preflights","itemTypes","itemFields","relationshipKinds","migrations","profiles","searchProviders","vectorStoreAdapters","assuranceProviders","importers","exporters"];function ve(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(o=>o.flags??[]),...(e.importers??[]).flatMap(o=>o.options?.flags??[]),...(e.exporters??[]).flatMap(o=>o.options?.flags??[])].flatMap(o=>{if(typeof o?.long!="string"&&typeof o?.short!="string")return[];let r=x(o.long,o.short);if(r===null)return[];let{token:t,failure:i}=r;return[{code:i,severity:"error",message:`Flag "${t}" ${k(t,i)}.`,field:t}]})}function b(e){let o=new Set;for(let r of e){let t=E(r)??y(r);t!==null&&o.add(t)}return[...o].sort((r,t)=>r.localeCompare(t))}function ye(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 t=new Set(o),i=new Set(e);for(let s of e)t.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)i.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 Ee(e){let o=[],r=new Map;for(let i of e.commands??[]){let s=m(i.name);r.set(s,(r.get(s)??0)+1)}for(let[i,s]of r)s>1&&o.push({code:"duplicate_command",severity:"warning",message:`Command "${i}" is declared ${s} times in commands; the later registration shadows the earlier one at dispatch.`,command:i});let t=new Set(Object.keys(e.commandOverrides??{}).map(i=>m(i)));for(let i of r.keys())t.has(i)&&o.push({code:"command_override_conflict",severity:"warning",message:`Command "${i}" is declared both as a new command definition and as a command override; register one or the other.`,command:i});return o}function xe(e){let o=[];for(let r of he)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),t=o.declaredCapabilities??e.manifest?.capabilities,i=Array.isArray(t)?b(t):null,s=[...ye(r,i),...Ee(e),..._e(e),...ve(e),...xe(e)];return{ok:s.every(n=>n.severity!=="error"),findings:s,used:r,declared:i}}function P(e,o){let{additionalCapabilities:r,...t}=o,i=Array.isArray(r)?b(r):[],s=[...new Set([...h(e),...i])].sort((n,c)=>n.localeCompare(c));return{...t,capabilities:s}}function ze(e,o){let r=P(e,o);return{module:te({...e,manifest:r}),manifest:r}}function S(e,o){if(e.status==="absent"||e.status==="ok")return null;let r=`${e.kind}_${e.status}`,t="";switch(r){case"pm_min_version_invalid":t=`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":t=`pm_min_version "${e.required}" could not be compared against pm ${o}; compatibility is unverified.`;break;case"pm_min_version_unmet":t=`Requires pm >= ${e.required} but the target is pm ${o}; the loader skips the extension.`;break;case"pm_max_version_invalid":t=`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":t=`pm_max_version "${e.required}" could not be compared against pm ${o}; compatibility is unverified.`;break;case"pm_max_version_exceeded":t=`Allows pm <= ${e.required} but the target is pm ${o}; the loader skips the extension.`;break;case"pm_max_version_exceeded_warn":t=`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:t}}function Ce(e,o){let r=C(e.pm_min_version,o.pmVersion),t=I(e.pm_max_version,o.pmVersion,o.pmMaxVersionExceededMode??"block"),i=w(e).findings.map(f=>({code:f.code,severity:"warning",constraint:"manifest",required:f.code==="manifest_unknown_key"?f.path:"pm_min_version",current:o.pmVersion,path:f.path,...f.suggested_key?{suggested_key:f.suggested_key}:{},message:f.message})),s=[],n=S(r,o.pmVersion);n!==null&&s.push(n);let c=S(t,o.pmVersion);return c!==null&&s.push(c),{compatible:r.allowed&&t.allowed,findings:[...i,...s],pmVersion:o.pmVersion}}var Ie=new Set(["capability_undeclared","capability_unused","manifest_capabilities_absent"]);function We(e,o={}){let r=ke(e,{declaredCapabilities:o.declaredCapabilities}),t=o.identity?P(e,o.identity):null,i=o.target?Ce(t??e.manifest??{},o.target):null,s=[...(t!==null&&o.declaredCapabilities===void 0?r.findings.filter(n=>!Ie.has(n.code)):r.findings).map(n=>({source:"blueprint",severity:n.severity,code:n.code,message:n.message})),...(i?.findings??[]).map(n=>({source:"compatibility",severity:n.severity,code:n.code,message:n.message}))];return{ok:s.every(n=>n.severity!=="error"),capabilities:r.used,blueprint:r,manifest:t,compatibility:i,findings:s}}(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]="4c9a1aa8-05b6-53da-a8b1-f1a7289d39cf")}catch{}})();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 tr(e){return e}function nr(e){return e}function ir(e){return e}function sr(e){return e}function ar(e){return e}function cr(e){return{handled:!0,result:e}}function mr(){return{handled:!1}}function dr(e){return e}function fr(e){return e}function lr(e){return e}function pr(e){return e}function ur(e){return e}function gr(e){return e}function hr(e){return e}function vr(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]="d0b86c6a-67f0-52f2-90b8-d1058e8f2284")}catch{}})();export{D as BUILTIN_PROFILES,Pe as EXTENSION_CAPABILITIES,be as EXTENSION_CAPABILITY_CONTRACT,we as EXTENSION_CAPABILITY_CONTRACT_VERSION,Se as EXTENSION_CAPABILITY_LEGACY_ALIASES,V as EXTENSION_CAPABILITY_REGISTRATION_SURFACES,Oe as EXTENSION_POLICY_MODES,Ae as EXTENSION_POLICY_SURFACES,Re as EXTENSION_SANDBOX_PROFILES,Fe as EXTENSION_TRUST_MODES,Me as LIST_FILTER_EXTENSION_FLAG_DEFINITIONS,B as PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS,M as PM_PACKAGE_RESOURCE_KINDS,Y as PROFILE_LINT_CODES,G as PROFILE_LINT_DIMENSIONS,$ as PROFILE_NAMES,g as RESERVED_ITEM_FIELD_NAMES,Be as SEARCH_EXTENSION_FLAG_DEFINITIONS,Ce as checkExtensionManifestCompatibility,L as collectPackageExtensionDirectories,z as collectUsedExtensionCapabilities,te as composeExtension,ze as composeExtensionPackage,T as createExtensionContributionInventory,mr as declineServiceOverride,gr as defineAfterCommandHook,pr as defineBeforeCommandHook,ur as defineBeforeMutationHook,Je as defineCommand,nr as defineCommandOverride,lr as defineExporter,He as defineExtension,Ue as defineExtensionBlueprint,Ye as defineExtensionManifest,Qe as defineFlag,fr as defineImporter,er as defineItemField,Ze as defineItemType,rr as defineMigration,_r as defineOnIndexHook,vr as defineOnReadHook,hr as defineOnWriteHook,ir as defineParserOverride,sr as definePreflightOverride,Xe as defineProjectProfile,dr as defineRendererOverride,or as defineSearchProvider,ar as defineServiceOverride,tr as defineVectorStoreAdapter,h as deriveExtensionCapabilities,Ve as describeExtensionBlueprint,U as describeProfileComposition,q as describeProjectProfile,cr as handleServiceOverride,F as inspectExtensionManifestSchema,ke as lintExtensionBlueprint,w as lintExtensionManifestSchema,X as lintProjectProfile,H as listProfiles,qe as mergeExtensionBlueprints,R as normalizeExtensionContributionInventory,j as normalizeProfileName,J as planProfileApplication,We as preflightExtension,N as readPmPackageManifest,W as reconcileExtensionCapabilityUsage,Q as renderExtensionSurfaceMarkdown,K as resolveProfile,P as synthesizeExtensionManifest,Te as toExtensionFlagDefinitions};
|
|
2
2
|
//# sourceMappingURL=sdk-authoring.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ki,b as Ei,c as Mi,d as T,e as Oi,f as L,g as $i,h as Si,i as Ii,j as ji,k as Ai,l as Ri,m as Di,n as Ni,o as F,p as Li,q,u as z,v as Fi,w as qi,x as U,y as zi,z as Ui}from"./focused-chunks/chunk-
|
|
1
|
+
import{a as ki,b as Ei,c as Mi,d as T,e as Oi,f as L,g as $i,h as Si,i as Ii,j as ji,k as Ai,l as Ri,m as Di,n as Ni,o as F,p as Li,q,u as z,v as Fi,w as qi,x as U,y as zi,z as Ui}from"./focused-chunks/chunk-3EHVI673.js";import{a as Gi}from"./focused-chunks/chunk-SVOOGGAK.js";import{a as vi}from"./focused-chunks/chunk-JTCGDODH.js";import{$ as wi,A as yo,N as ai,O as di,P as ci,Q as li,R as pi,S as ui,T as _i,U as fi,V as mi,W as gi,X as yi,Z as bi,_ as hi,a as Je,aa as xi,b as Ke,ba as Ti,c as Ye,ca as Ci,d as We,da as Pi,e as Xe,f as Qe,g as Ze,h as et,i as tt,j as Zr,k as eo,l as to,m as ro,n as oo,o as io,p as no,q as so,r as ao,s as co,t as lo,u as po,v as uo,w as _o,x as fo,y as mo,z as go}from"./focused-chunks/chunk-Z26ZPQH6.js";import{$ as er,$a as $,A as Mt,Aa as Er,B as Ot,Ba as Mr,C as $t,Ca as Or,D as St,Da as $r,E as It,Ea as Sr,F as jt,Fa as Ir,Ga as jr,H as At,Ha as Ar,I as Rt,Ia as Rr,J as Dt,Ja as Dr,K as Nt,Ka as Nr,L as Lt,La as Lr,M as Ft,Ma as Fr,N as qt,Na as qr,O as zt,Oa as zr,P as Ut,Pa as Ur,Q as Gt,Qa as Gr,R as Ht,Ra as Hr,S as Vt,Sa as Vr,T as Bt,Ta as Br,U as Jt,Ua as Jr,V as Kt,Va as Kr,W as Yt,Wa as Yr,X as Wt,Xa as Wr,Y as Xt,Z as Qt,Za as Xr,_ as Zt,aa as tr,ab as S,b as ot,ba as rr,bb as Qr,c as it,ca as or,d as nt,da as ir,e as st,ea as nr,f as at,fa as sr,g as dt,ga as ar,h as ct,ha as dr,i as lt,ia as cr,j as pt,ja as lr,k as ut,ka as pr,l as _t,la as ur,m as ft,ma as _r,n as mt,na as fr,o as gt,oa as mr,p as yt,pa as gr,q as bt,qa as yr,r as ht,ra as br,s as wt,sa as hr,t as xt,ta as wr,u as Tt,ua as xr,v as Ct,va as Tr,w as Pt,wa as Cr,x as vt,xa as Pr,y as kt,ya as vr,z as Et,za as kr}from"./focused-chunks/chunk-46WLWK73.js";import{a as Hi,b as Vi,c as Bi,d as Ji,e as Ki,f as Yi,g as Wi,h as Xi}from"./focused-chunks/chunk-YLVHHWHN.js";import{a as rt}from"./focused-chunks/chunk-AK2CI2GI.js";import{$a as O,$c as Ro,$d as Xo,Ab as Be,Ac as I,Bc as j,Gc as bo,Hc as ho,Ic as wo,Jc as xo,Kc as To,Lc as Co,Mb as Q,Mc as Po,Nc as vo,Oc as ko,Pc as Eo,Qc as Mo,Rc as Oo,Sc as $o,Tc as So,Ua as ge,Va as ye,Wa as be,Xa as he,Ya as M,Yc as Io,Za as we,Zc as jo,Zd as x,_a as f,_c as Ao,_d as Wo,ab as xe,ad as Do,ae as Qo,bb as Te,bd as No,be as Zo,cb as Ce,cd as Lo,ce as ei,db as Pe,dd as Fo,de as ti,eb as ve,ed as qo,ee as ri,fb as ke,fd as zo,fe as oi,gb as Ee,gd as Uo,ge as ii,hb as Me,hd as Go,he as ni,ib as Oe,id as Ho,jb as $e,jd as Vo,kb as Se,kd as Bo,ke as A,ld as Jo,le as R,mb as Ie,md as Ko,nb as je,nd as Yo,ne as D,ob as Ae,pb as Re,pe as N,qb as De,rb as Ne,sb as Le,tb as Fe,te as si,ub as qe,vb as ze,wb as Ue,xb as Ge,yb as He,zb as Ve}from"./focused-chunks/chunk-6L4KKRK7.js";import{y as w}from"./focused-chunks/chunk-7SZPZOIC.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="8f11e0bf-4115-55a8-bd39-c360f43cdc09")}catch{}})();var Z="2026-07-28",G=["2025-11-25","2025-06-18"],H=[Z];(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="d4a56906-c542-567e-9265-15184a5c330b")}catch{}})();var ee=new Set(["--help","-h","--version","-V"]);function te(e,r){let o=[`Usage: ${e==="stdio"?"pm-mcp":"pm-mcp-http"} [--help | --version]`,"",e==="stdio"?"JSON-RPC over stdin/stdout. With no arguments, starts the stdio server.":"Streamable HTTP POST /mcp. With no arguments, starts the HTTP server.","","Options:"," -h, --help Print help and exit before transport startup."," -V, --version Print the package version and exit.","","Environment:"," PM_PATH Tracker root (otherwise discovered from cwd)."," PM_GLOBAL_PATH Global settings root."," PM_MCP_PROFILE core (default), standard, full, or custom."," PM_MCP_TOOLS Comma-separated tool allowlist for custom profile."," PM_MCP_DISCOVERY_CURSOR_KEY Shared discovery cursor secret, at least 32 UTF-8 bytes."," PM_MCP_BAGGAGE_ALLOWLIST Comma-separated permitted trace baggage keys."];return e==="http"&&o.push(" PM_MCP_HTTP_HOST Bind host (default 127.0.0.1)."," PM_MCP_HTTP_PORT Bind port, 0..65535 (default 3000)."," PM_MCP_HTTP_ALLOWED_ORIGINS Comma-separated exact browser origins (default none)."," PM_MCP_HTTP_BEARER_TOKEN Deployment token for the bundled verifier."," PM_MCP_HTTP_AUTH_ISSUER Exact HTTPS authorization-server issuer."," PM_MCP_HTTP_RESOURCE Canonical resource/audience URI."," PM_MCP_HTTP_SCOPES Space-separated scopes (default pm:read pm:write).","","Non-loopback HTTP requires bearer token, issuer, and resource together."),o.push("",`MCP protocol: ${H.join(", ")}.`,e==="stdio"?`Legacy initialize compatibility: ${G.join(", ")}.`:"HTTP requires modern per-request metadata; legacy initialize is stdio-only.","",e==="stdio"?"Client configuration:":"Example loopback server:",e==="stdio"?JSON.stringify({mcpServers:{pm:{command:"npx",args:["--yes","--package",`@unbrained/pm-cli@${r}`,"pm-mcp"]}}}):`PM_MCP_HTTP_PORT=3000 npx --yes --package @unbrained/pm-cli@${r} pm-mcp-http`,...e==="http"?["HTTP client configuration:",JSON.stringify({mcpServers:{pm:{url:"http://127.0.0.1:3000/mcp"}}})]:[],"","Configuration: https://github.com/unbraind/pm-cli/blob/main/docs/MCP_REMOTE_TRANSPORT_SECURITY.md",""),o.join(`
|
|
2
2
|
`)}function en(e,r,o){if(e.length===0)return{kind:"serve"};let i=e.find(t=>!ee.has(t));if(i!==void 0){let t=r==="stdio"?"pm-mcp":"pm-mcp-http";return{kind:"exit",exitCode:64,stdout:"",stderr:`Unsupported argument ${JSON.stringify(i)}. Run ${t} --help.
|
|
3
3
|
`}}return{kind:"exit",exitCode:0,stdout:e.includes("--help")||e.includes("-h")?te(r,o):`${o}
|
|
4
4
|
`,stderr:""}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="32070e26-7a40-50ff-84d7-73e50ff5f01f")}catch{}})();var m,re=Object.freeze({list:"list-item-projection","list-all":"list-item-projection","list-draft":"list-item-projection","list-open":"list-item-projection","list-in-progress":"list-item-projection","list-blocked":"list-item-projection","list-closed":"list-item-projection","list-canceled":"list-item-projection",get:"get-item-projection",graph:"graph-detail-projection",search:"search-result-projection",history:"history-entry-projection",events:"mutation-event-projection",activity:"activity-entry-projection",deps:"dependency-graph-projection",health:"health-diagnostic-projection",validate:"validation-diagnostic-projection",contracts:"contract-catalog-projection"});function oe(e,r){if(r==="--limit")return"result-row-limit";if(r==="--node-limit")return"graph-node-limit";if(r==="--edge-limit")return"graph-edge-limit";if(r==="--output-limit")return"rendered-output-row-limit";if(r==="--output-budget")return"rendered-output-byte-budget";if(r==="--token-budget")return"context-intent-token-budget";if(r==="--full"){let o=re[f(e)];if(o===void 0)throw new Error(`Command ${e} exposes --full without a registered projection concept.`);return o}return r!=="--file"?r.slice(2):["create","update","update-many"].includes(f(e))?"linked-file-path":["comments","notes","learnings"].includes(f(e))?"entry-file-input":"plan-definition-file"}function g(){if(m!==void 0)return m;let e=q.filter(({command:t})=>$(t)).flatMap(({command:t,family:n})=>F(t,S(t)).map(s=>({command:t,family:n,concept:oe(t,s.flag),flag:s.flag,aliases:Object.freeze([...s.aliases??[]]),value_kind:s.repeatable?"list":s.flag==="--limit"?"number":s.value_type}))),r=new Set(e.flatMap(t=>t.aliases.map(n=>`${t.command}:${n}`))),o=e.filter(t=>!r.has(`${t.command}:${t.flag}`)),i=new Map;for(let t of o){let n=i.get(t.concept)??new Set;n.add(t.value_kind),i.set(t.concept,n)}return m=Object.freeze(o.map(t=>Object.freeze({...t,concept:i.get(t.concept)?.size===1?t.concept:`${t.concept}@${t.command}`}))),m}function an(){return Object.freeze(g().map(e=>Object.freeze({command:e.command,canonical_flag:e.flag,accepted_spellings:Object.freeze([...new Set([e.flag,...e.aliases])].sort())})))}var V=Object.freeze({init:30,item:20,config:36,extension:55,package:56,packages:56,install:27,upgrade:29,create:102,copy:24,focus:22,list:86,"list-all":86,"list-draft":84,"list-open":84,"list-in-progress":84,"list-blocked":84,"list-closed":84,"list-canceled":84,aggregate:40,context:45,ctx:45,get:30,graph:34,search:78,duplicates:25,eval:25,next:38,history:35,events:34,"history-attest":23,"history-redact":27,"history-repair":27,"history-compact":30,"history-author-acknowledge":28,merge:29,schema:43,profile:22,activity:36,restore:23,update:105,"update-many":146,close:32,"close-many":72,delete:24,append:25,comments:31,notes:35,learnings:31,files:39,docs:30,deps:32,plan:111,test:56,"test-all":40,telemetry:21,stats:29,health:36,validate:46,assurance:30,gc:22,workspace:23,contracts:29,claim:39,release:25,"start-task":23,"pause-task":23,"close-task":24,meet:33,event:33,remind:29,"test-runs-worker":20}),B=Object.freeze({...V,...Object.fromEntries(M.flatMap(({alias:e,canonical:r})=>{let o=V[e];return o===void 0?[]:[[r,o]]}))});function J(){let e=new Map(Object.keys(B).map(r=>[r,0]));for(let{command:r}of g())e.set(r,Number(e.get(r))+1);return Object.freeze(Object.entries(B).map(([r,o])=>Object.freeze({command:r,current:Number(e.get(r)),maximum:o})))}function ie(e,r,o){for(let i of e)for(let t of i.aliases){let n=r.get(`${i.command}:${t}`);n===void 0||n.flag===i.flag||o.push({code:"alias_collision",command:i.command,detail:`${t} aliases ${i.flag} but is canonical for ${n.flag}.`})}}function ne(e,r,o){let i=new Set(r.map(({command:t})=>t));for(let t of e.keys())i.has(t)||o.push({code:"missing_budget",command:t,detail:`${t} has canonical flags but no persisted budget.`});for(let t of r){let n=e.get(t.command)??0;n===0&&o.push({code:"stale_budget",command:t.command,detail:`${t.command} has a persisted budget but no canonical flags.`}),!(n<=t.maximum)&&o.push({code:"budget_exceeded",command:t.command,detail:`${n} canonical flags exceed the ratcheted maximum ${t.maximum}.`})}}function se(e,r,o){let i=new Map(e.map(t=>[`${t.command}:${t.flag}`,t]));for(let t of r){let n=`${t.command}:${t.canonical_flag}`,s=i.get(n);if(!s){o.push({code:"removed_canonical_spelling",command:t.command,detail:`${t.canonical_flag} disappeared from the executable spelling inventory.`});continue}let d=new Set([s.flag,...s.aliases]);for(let a of t.accepted_spellings)d.has(a)||o.push({code:"removed_compatibility_spelling",command:t.command,detail:`${a} no longer resolves to ${t.canonical_flag}.`})}}function dn(e=g(),r=J(),o=[]){let i=[],t=new Map,n=new Map,s=new Map,d=new Map;for(let a of e){let c=`${a.command}:${a.flag}`;t.has(c)?i.push({code:"duplicate_canonical_flag",command:a.command,detail:`${a.flag} has more than one canonical row.`}):t.set(c,a),d.set(a.command,(d.get(a.command)??0)+1);let l=n.get(a.concept);l!==void 0&&l!==a.value_kind?i.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);let p=s.get(a.concept);p!==void 0&&p!==a.flag?i.push({code:"semantic_spelling_collision",command:a.command,detail:`${a.concept} is canonicalized by both ${p} and ${a.flag}.`}):s.set(a.concept,a.flag)}return ie(e,t,i),ne(d,r,i),se(e,o,i),i.sort((a,c)=>a.command.localeCompare(c.command)||a.code.localeCompare(c.code)||a.detail.localeCompare(c.detail)),{ok:i.length===0,entry_count:e.length,budget_count:r.length,concept_count:new Set(e.map(({concept:a})=>a)).size,baseline_entry_count:o.length,findings:i}}function cn(){let e=g(),r=J(),o=new Map(r.map(({command:i})=>[i,"unknown"]));for(let{command:i,family:t}of e)o.set(i,t);return["# Generated flag lexicon budgets","","This file is generated by `listPmFlagLexicon()`. Compatibility aliases do not consume canonical budget.","","| Command | Capability family | Canonical flags | Maximum |","| --- | --- | ---: | ---: |",...r.map(({command:i,current:t,maximum:n})=>{let s=o.get(i);return`| \`${i}\` | ${s} | ${t} | ${n} |`}),""].join(`
|