@unbrained/pm-cli 2026.11.23 → 2026.11.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/dist/cli/main.js +5 -5
- package/dist/cli/register-annotations.js +1 -1
- package/dist/cli/runtime/invocation-options.js +1 -1
- package/dist/cli-bundle/bundle-manifest.json +1 -1
- package/dist/cli-bundle/chunks/{chunk-2UQU7HRR.js → chunk-23K6DQQY.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-O7JHS64G.js → chunk-37UDIJ2K.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-7IROAPWI.js +3 -0
- package/dist/cli-bundle/chunks/{chunk-KZHIBEJL.js → chunk-7VRFEURZ.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-7X253M6Z.js +3 -0
- package/dist/cli-bundle/chunks/chunk-AWB5KBJS.js +2 -0
- package/dist/cli-bundle/chunks/chunk-DQDRA3SW.js +2 -0
- package/dist/cli-bundle/chunks/chunk-FXJYZBWV.js +113 -0
- package/dist/cli-bundle/chunks/{chunk-BSRIVYTM.js → chunk-HNKK2UG6.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-HZZLSBIJ.js +2 -0
- package/dist/cli-bundle/chunks/chunk-I2OJ5B4A.js +2 -0
- package/dist/cli-bundle/chunks/chunk-I3BFCKZR.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-ENKXRSFZ.js → chunk-MXUSC5RS.js} +31 -31
- package/dist/cli-bundle/chunks/chunk-PLIUU37C.js +3 -0
- package/dist/cli-bundle/chunks/chunk-PQUBVRV5.js +2 -0
- package/dist/cli-bundle/chunks/chunk-PW7U7WCE.js +3 -0
- package/dist/cli-bundle/chunks/chunk-SSALO4DB.js +2 -0
- package/dist/cli-bundle/chunks/chunk-STOOTHZZ.js +2 -0
- package/dist/cli-bundle/chunks/chunk-TKRY22SO.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-AEOHUSUI.js → chunk-TVIJ2VCU.js} +68 -68
- package/dist/cli-bundle/chunks/{chunk-F2Z6XLZB.js → chunk-VJSGUXGU.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-H7JEXRIN.js → chunk-WWTPNIC2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-J2PDAVBC.js → chunk-XFADNMGD.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TZY5MVJF.js → chunk-YOPTAIBD.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CFWLQFJM.js → chunk-YW2HBHRO.js} +50 -51
- package/dist/cli-bundle/chunks/chunk-Z7MFVRDV.js +2 -0
- package/dist/cli-bundle/chunks/chunk-ZOX4SWRL.js +8 -0
- package/dist/cli-bundle/chunks/chunk-ZYCOM4MS.js +9 -0
- package/dist/cli-bundle/chunks/field-option-collisions-W66HSWMK.js +2 -0
- package/dist/cli-bundle/{focused-chunks/item-revision-YDACCDVY.js → chunks/item-revision-D3LSBNIR.js} +2 -2
- package/dist/cli-bundle/chunks/item-transaction-M6NTBYH3.js +2 -0
- package/dist/cli-bundle/chunks/mutation-actor-OKL3CQVX.js +2 -0
- package/dist/cli-bundle/chunks/mutation-admission-EKPEOZMF.js +2 -0
- package/dist/cli-bundle/chunks/{register-list-query-L4IBU64P.js → register-list-query-3LBV6CS2.js} +2 -2
- package/dist/cli-bundle/chunks/register-mutation-72AGTMNE.js +21 -0
- package/dist/cli-bundle/chunks/register-operations-XERFG2SH.js +2 -0
- package/dist/cli-bundle/chunks/register-setup-W22L34Z4.js +2 -0
- package/dist/cli-bundle/chunks/runtime-schema-JP2KBHBY.js +2 -0
- package/dist/cli-bundle/chunks/stage-T2LKWN7C.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-24VRBNKE.js +26 -0
- package/dist/cli-bundle/focused-chunks/chunk-3ELVASVA.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-XRS3VNC6.js → chunk-3GT4A3ZN.js} +23 -23
- package/dist/cli-bundle/focused-chunks/{chunk-IROZDIDX.js → chunk-3OCDKITJ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-3Z7MCUJM.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-46MP7IZN.js +5 -0
- package/dist/cli-bundle/focused-chunks/{chunk-OTMMOKPM.js → chunk-5LDBS6MS.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-ZHWPCVQL.js → chunk-B6BNHKUW.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-C7WHWI7K.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-EUQGZPGO.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-UFTUNBMY.js → chunk-FDZPRJXJ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-GXP7Q4XM.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-HL47UQZJ.js +8 -0
- package/dist/cli-bundle/focused-chunks/chunk-LMFIAQ2V.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-LMU7DDOA.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-OZOCEB2Q.js +8 -0
- package/dist/cli-bundle/focused-chunks/{chunk-NQTEE66P.js → chunk-Q2HY44LV.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-REFMQY47.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-RIQUIHYU.js +3 -0
- package/dist/cli-bundle/focused-chunks/{chunk-QQIIMMFU.js → chunk-RLO2HCZT.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-SMMOZ3H3.js +100 -0
- package/dist/cli-bundle/focused-chunks/chunk-UVTUX54T.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-Y2ESLKCF.js → chunk-XDBHD4CY.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-YD66IRSL.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-Z7W2RQIB.js +2 -0
- package/dist/cli-bundle/focused-chunks/field-option-collisions-UODPSV6W.js +2 -0
- package/dist/cli-bundle/focused-chunks/item-revision-QH7RNBX4.js +2 -0
- package/dist/cli-bundle/focused-chunks/item-transaction-ZO72OINF.js +2 -0
- package/dist/cli-bundle/focused-chunks/mutation-actor-PHVLKG4I.js +2 -0
- package/dist/cli-bundle/focused-chunks/mutation-admission-ZSG5OECH.js +2 -0
- package/dist/cli-bundle/focused-chunks/runtime-schema-6RQMIDTN.js +2 -0
- package/dist/cli-bundle/focused-chunks/stage-AQMKRVX4.js +2 -0
- package/dist/cli-bundle/main.js +26 -26
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +4 -4
- package/dist/cli-bundle/sdk-core.js +1 -1
- package/dist/cli-bundle/sdk-governance.js +1 -1
- package/dist/cli-bundle/sdk-graph.js +1 -1
- package/dist/cli-bundle/sdk-merge.js +63 -63
- package/dist/cli-bundle/sdk-query.js +1 -1
- package/dist/cli-bundle/sdk-runtime.js +1 -1
- package/dist/cli-bundle/sdk-testing.js +1 -1
- package/dist/cli-bundle/sdk.js +11 -11
- package/dist/core/profile/profile-lint.d.ts +1 -1
- package/dist/core/profile/profile-lint.js +1 -1
- package/dist/core/schema/fields-file.js +2 -2
- package/dist/core/schema/runtime-field-values.js +1 -1
- package/dist/core/schema/runtime-schema.d.ts +2 -0
- package/dist/core/schema/runtime-schema.js +1 -1
- package/dist/sdk/extension/command-options.d.ts +26 -1
- package/dist/sdk/extension/command-options.js +1 -1
- package/dist/sdk/extension-command-context.js +2 -2
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1 -1
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/public-surface.json +1 -1
- package/dist/sdk/read-output-contracts.d.ts +11 -0
- package/dist/sdk/read-output-contracts.js +1 -1
- package/dist/sdk/schema/field-flag-spelling.d.ts +22 -0
- package/dist/sdk/schema/field-flag-spelling.js +2 -0
- package/dist/sdk/schema/field-option-collisions.js +1 -1
- package/docs/COMMANDS.md +1 -1
- package/docs/EXTENSIONS.md +1 -1
- package/docs/READ_OUTPUT_CONTRACTS.md +2 -0
- package/docs/SDK.md +20 -1
- package/docs/SDK_AUDITED_MUTATIONS.md +11 -0
- package/marketplace.json +1 -1
- package/package.json +1 -1
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-claude/package.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/pm-codex/package.json +1 -1
- package/plugins/pm-codex/plugin.json +1 -1
- package/runtime-dependencies.json +1 -1
- package/dist/cli-bundle/chunks/chunk-5WZZ5XEN.js +0 -3
- package/dist/cli-bundle/chunks/chunk-6MYJLOSG.js +0 -2
- package/dist/cli-bundle/chunks/chunk-FJOEL75F.js +0 -2
- package/dist/cli-bundle/chunks/chunk-GDXCAC52.js +0 -2
- package/dist/cli-bundle/chunks/chunk-KE7HMBEW.js +0 -2
- package/dist/cli-bundle/chunks/chunk-NGJ5ERBF.js +0 -115
- package/dist/cli-bundle/chunks/chunk-NQ54T7T2.js +0 -2
- package/dist/cli-bundle/chunks/chunk-OKEZF7HU.js +0 -2
- package/dist/cli-bundle/chunks/chunk-OKIKF4FD.js +0 -2
- package/dist/cli-bundle/chunks/chunk-OPJF254V.js +0 -9
- package/dist/cli-bundle/chunks/chunk-RWA5YZ5X.js +0 -2
- package/dist/cli-bundle/chunks/chunk-S32NGRQM.js +0 -2
- package/dist/cli-bundle/chunks/chunk-ZPS4B6SI.js +0 -8
- package/dist/cli-bundle/chunks/item-revision-FMD4KWBB.js +0 -2
- package/dist/cli-bundle/chunks/item-transaction-SEHTH7N2.js +0 -2
- package/dist/cli-bundle/chunks/mutation-actor-SFGYIRPW.js +0 -2
- package/dist/cli-bundle/chunks/mutation-admission-57LBSKQI.js +0 -2
- package/dist/cli-bundle/chunks/register-mutation-6NUOPHZ3.js +0 -21
- package/dist/cli-bundle/chunks/register-operations-JGYVORNN.js +0 -2
- package/dist/cli-bundle/chunks/register-setup-C44SIXEH.js +0 -2
- package/dist/cli-bundle/chunks/stage-PQ7AB63N.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-6LKTEKHS.js +0 -6
- package/dist/cli-bundle/focused-chunks/chunk-6LPXMFLM.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-HMDQDRV2.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-I66IKYKP.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-IR2J3NOT.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-ITKDHSBR.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-LQYYPXUK.js +0 -26
- package/dist/cli-bundle/focused-chunks/chunk-O7Z73ALG.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-OXOCZJC6.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-QLAHEDT6.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-TD544C74.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-XYPEZGTR.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-YSJKQLFR.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-Z2X7HH3C.js +0 -102
- package/dist/cli-bundle/focused-chunks/item-transaction-UKEQCTKB.js +0 -2
- package/dist/cli-bundle/focused-chunks/mutation-actor-AS465LRX.js +0 -2
- package/dist/cli-bundle/focused-chunks/mutation-admission-E5UHJZFE.js +0 -2
- package/dist/cli-bundle/focused-chunks/stage-36J7YLGI.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{A as Z,C as ee,a as Ae,b as be,c as Re,d as Me,e as Be,f as Te,g as Ne,h as Le,i as $,j,k as D,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-LQYYPXUK.js";import{a as B,b as T,c as N,d as L,z as Q}from"./focused-chunks/chunk-6LKTEKHS.js";import"./focused-chunks/chunk-IROZDIDX.js";import"./focused-chunks/chunk-UFTUNBMY.js";import"./focused-chunks/chunk-IR2J3NOT.js";import{a as h}from"./focused-chunks/chunk-OTMMOKPM.js";import"./focused-chunks/chunk-HMDQDRV2.js";import"./focused-chunks/chunk-BWOVFE5B.js";import"./focused-chunks/chunk-X6CXWWNB.js";import{Db as R,Eb as M,Gf as V,If as z,Jf as W,L as k,M as C,N as O,O as S,P as b,Q as P,b as y,c as E,f as d}from"./focused-chunks/chunk-Z2X7HH3C.js";import{b as Ie,c as we,d as Fe}from"./focused-chunks/chunk-A6VEMCRR.js";function qe(e){return e}function Ve(e){return e}function re(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 oe(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 te(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 ne(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 ie(e){let r={activate:async t=>{re(t,e),oe(t,e),te(t,e),ne(t,e.hooks??{}),await e.activate?.(t)}};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 u(e){let o=Object.assign({},...e.map(r=>r??{}));return Object.keys(o).length>0?o:void 0}function se(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 ae=["beforeCommand","beforeMutation","afterCommand","onWrite","onRead","onIndex"];function ce(e,o,r){let t=o.map(s=>s?.[r]),i=f(t);if(i!==void 0){let s=e;s[r]=i}}function me(e){let o={};for(let r of ae)ce(o,e,r);return Object.keys(o).length>0?o:void 0}function ze(...e){let o={},r=(n,a)=>{a!==void 0&&(o[n]=a)};r("commands",f(e.map(n=>n.commands))),r("commandOverrides",u(e.map(n=>n.commandOverrides))),r("flags",se(e.map(n=>n.flags))),r("parsers",u(e.map(n=>n.parsers))),r("renderers",u(e.map(n=>n.renderers))),r("services",u(e.map(n=>n.services))),r("preflights",f(e.map(n=>n.preflights))),r("itemTypes",f(e.map(n=>n.itemTypes))),r("itemFields",f(e.map(n=>n.itemFields))),r("relationshipKinds",f(e.map(n=>n.relationshipKinds))),r("migrations",f(e.map(n=>n.migrations))),r("profiles",f(e.map(n=>n.profiles))),r("searchProviders",f(e.map(n=>n.searchProviders))),r("vectorStoreAdapters",f(e.map(n=>n.vectorStoreAdapters))),r("assuranceProviders",f(e.map(n=>n.assuranceProviders))),r("importers",f(e.map(n=>n.importers))),r("exporters",f(e.map(n=>n.exporters))),r("hooks",me(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 a of e)a.activate&&await a.activate(n)}:void 0);let s=e.some(n=>n.deactivate);return r("deactivate",s?async()=>{let n=[];for(let a of[...e].reverse())if(a.deactivate)try{await a.deactivate()}catch(c){n.push(c)}if(n.length>0)throw n.length>1?new AggregateError(n,"Multiple extension blueprint deactivate hooks failed."):n[0]}:void 0),o}var de=[["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 g(e){return e?Array.isArray(e)?e.length>0:Object.keys(e).length>0:!1}function v(e){let o=new Set;for(let[i,s]of de)g(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(g)&&o.add("hooks"),[...o].sort((i,s)=>i.localeCompare(s))}var fe=[["beforeCommand","before_command"],["beforeMutation","before_mutation"],["afterCommand","after_command"],["onWrite","on_write"],["onRead","on_read"],["onIndex","on_index"]];function m(e){return[...new Set(e)].sort((o,r)=>o.localeCompare(r))}function l(e){return e!=null}function x(e){return d(`${e.name} import`)}function _(e){return d(`${e.name} export`)}function pe(e,o,r){return[...e.map(t=>d(t.name)),...o.filter(t=>t.options!==void 0).map(x),...r.filter(t=>t.options!==void 0).map(_)]}function le(e,o,r,t){return[...Object.keys(e.flags??{}).map(i=>d(i)),...o.filter(i=>i.flags!==void 0).map(i=>d(i.name)),...r.filter(i=>i.options?.flags!==void 0).map(x),...t.filter(i=>i.options?.flags!==void 0).map(_)]}function ue(e){return fe.filter(([o])=>(e[o]?.length??0)>0).map(([,o])=>o)}function ge(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:m((i.commands??[]).map(s=>d(s))),result_discriminator:i.resultDiscriminator!==void 0}}).sort((r,t)=>r.format.localeCompare(t.format));return o.length>0?{renderer_ownership:o}:{}}function he(e){return!e||e.length===0?{}:{assurance_providers:m(e.map(o=>o.id))}}function ve(e,o,r){return{item_types:m((e.itemTypes??[]).map(t=>t.name)),item_fields:m((e.itemFields??[]).map(t=>t.name)),...(e.relationshipKinds?.length??0)>0?{relationship_kinds:m(e.relationshipKinds.map(t=>t.kind))}:{},migrations:m((e.migrations??[]).flatMap(t=>typeof t.id=="string"?[t.id]:[])),profiles:m((e.profiles??[]).map(t=>t.name)),importers:m(o.map(t=>d(t.name))),exporters:m(r.map(t=>d(t.name))),search_providers:m((e.searchProviders??[]).map(t=>t.name)),vector_store_adapters:m((e.vectorStoreAdapters??[]).map(t=>t.name)),...he(e.assuranceProviders),parser_overrides:m(Object.keys(e.parsers??{}).map(t=>d(t))),service_overrides:m(Object.keys(e.services??{}).map(t=>String(t).trim().toLowerCase())),renderer_overrides:m(Object.keys(e.renderers??{}).map(t=>String(t).trim().toLowerCase())),...ge(e.renderers),preflight_overrides:(e.preflights??[]).length,preflight_ownership:(e.preflights??[]).map(t=>({commands:[...t.commands??[]]}))}}function We(e){let o=(e.commands??[]).filter(l),r=(e.importers??[]).filter(l),t=(e.exporters??[]).filter(l),i=r.map(x),s=t.map(_),n=pe(o,r,t),a=le(e,o,r,t),c=e.hooks??{},p=ve(e,r,t);return{capabilities:v(e),commands:m(n),command_overrides:m(Object.keys(e.commandOverrides??{}).map(A=>d(A))),command_handlers:m([...n,...i,...s]),hooks:ue(c),flag_commands:m(a),...p}}var xe=["commands","commandOverrides","flags","parsers","renderers","services","preflights","itemTypes","itemFields","relationshipKinds","migrations","profiles","searchProviders","vectorStoreAdapters","assuranceProviders","importers","exporters"];function _e(e){return(e.itemFields??[]).filter(o=>typeof o?.name=="string"&&h.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 ye(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 t=k(r.long,r.short);if(t===null)return[];let{token:i,failure:s}=t;return[{code:s,severity:"error",message:`Flag "${i}" ${C(i,s)}.`,field:i}]})}function w(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 Ee(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 ke(e){let o=[],r=new Map;for(let i of e.commands??[]){let s=d(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=>d(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 Ce(e){let o=[];for(let r of xe)r in e&&!g(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(g)||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 Oe(e,o={}){let r=v(e),t=o.declaredCapabilities??e.manifest?.capabilities,i=Array.isArray(t)?w(t):null,s=[...Ee(r,i),...ke(e),...ye(e),..._e(e),...Ce(e)];return{ok:s.every(n=>n.severity!=="error"),findings:s,used:r,declared:i}}function F(e,o){let{additionalCapabilities:r,...t}=o,i=Array.isArray(r)?w(r):[],s=[...new Set([...v(e),...i])].sort((n,a)=>n.localeCompare(a));return{...t,capabilities:s}}function Ge(e,o){let r=F(e,o);return{module:ie({...e,manifest:r}),manifest:r}}function I(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 Se(e,o){let r=O(e.pm_min_version,o.pmVersion),t=S(e.pm_max_version,o.pmVersion,o.pmMaxVersionExceededMode??"block"),s=P(e).findings.map(p=>({code:p.code,severity:"warning",constraint:"manifest",required:p.code==="manifest_unknown_key"?p.path:"pm_min_version",current:o.pmVersion,path:p.path,...p.suggested_key?{suggested_key:p.suggested_key}:{},message:p.message})),n=[],a=I(r,o.pmVersion);a!==null&&n.push(a);let c=I(t,o.pmVersion);return c!==null&&n.push(c),{compatible:r.allowed&&t.allowed,findings:[...s,...n],pmVersion:o.pmVersion}}var Pe=new Set(["capability_undeclared","capability_unused","manifest_capabilities_absent"]);function Ye(e,o={}){let r=Oe(e,{declaredCapabilities:o.declaredCapabilities}),t=o.identity?F(e,o.identity):null,i=o.target?Se(t??e.manifest??{},o.target):null,a=[...(t!==null&&o.declaredCapabilities===void 0?r.findings.filter(c=>!Pe.has(c.code)):r.findings).map(c=>({source:"blueprint",severity:c.severity,code:c.code,message:c.message})),...(i?.findings??[]).map(c=>({source:"compatibility",severity:c.severity,code:c.code,message:c.message}))];return{ok:a.every(c=>c.severity!=="error"),capabilities:r.used,blueprint:r,manifest:t,compatibility:i,findings:a}}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 e}function mr(e){return e}function dr(e){return{handled:!0,result:e}}function fr(){return{handled:!1}}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 vr(e){return e}function xr(e){return e}function _r(e){return e}function yr(e){return e}export{j as BUILTIN_PROFILES,Ae as EXTENSION_CAPABILITIES,Fe as EXTENSION_CAPABILITY_CONTRACT,Ie as EXTENSION_CAPABILITY_CONTRACT_VERSION,we as EXTENSION_CAPABILITY_LEGACY_ALIASES,V as EXTENSION_CAPABILITY_REGISTRATION_SURFACES,be as EXTENSION_POLICY_MODES,Re as EXTENSION_POLICY_SURFACES,Be as EXTENSION_SANDBOX_PROFILES,Me as EXTENSION_TRUST_MODES,Ne as LIST_FILTER_EXTENSION_FLAG_DEFINITIONS,T as PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS,B as PM_PACKAGE_RESOURCE_KINDS,Y as PROFILE_LINT_CODES,G as PROFILE_LINT_DIMENSIONS,$ as PROFILE_NAMES,h as RESERVED_ITEM_FIELD_NAMES,Le as SEARCH_EXTENSION_FLAG_DEFINITIONS,Se as checkExtensionManifestCompatibility,L as collectPackageExtensionDirectories,z as collectUsedExtensionCapabilities,ie as composeExtension,Ge as composeExtensionPackage,M as createExtensionContributionInventory,fr as declineServiceOverride,vr as defineAfterCommandHook,gr as defineBeforeCommandHook,hr as defineBeforeMutationHook,Ze as defineCommand,sr as defineCommandOverride,ur as defineExporter,qe as defineExtension,Ve as defineExtensionBlueprint,Je as defineExtensionManifest,er as defineFlag,lr as defineImporter,or as defineItemField,rr as defineItemType,tr as defineMigration,yr as defineOnIndexHook,_r as defineOnReadHook,xr as defineOnWriteHook,ar as defineParserOverride,cr as definePreflightOverride,Qe as defineProjectProfile,pr as defineRendererOverride,nr as defineSearchProvider,mr as defineServiceOverride,ir as defineVectorStoreAdapter,v as deriveExtensionCapabilities,We as describeExtensionBlueprint,U as describeProfileComposition,q as describeProjectProfile,dr as handleServiceOverride,b as inspectExtensionManifestSchema,Oe as lintExtensionBlueprint,P as lintExtensionManifestSchema,X as lintProjectProfile,H as listProfiles,ze as mergeExtensionBlueprints,ee as normalizeDirectExtensionCommandOptions,R as normalizeExtensionContributionInventory,D as normalizeProfileName,J as planProfileApplication,Ye as preflightExtension,N as readPmPackageManifest,W as reconcileExtensionCapabilityUsage,Q as renderExtensionSurfaceMarkdown,Z as resolveExtensionFlagOptionKey,K as resolveProfile,F as synthesizeExtensionManifest,Te as toExtensionFlagDefinitions};
|
|
1
|
+
import{A as Z,C as ee,a as Ae,b as be,c as Re,d as Me,e as Be,f as Te,g as Ne,h as Le,i as $,j,k as D,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-24VRBNKE.js";import{a as B,b as T,c as N,d as L,p as Q}from"./focused-chunks/chunk-46MP7IZN.js";import"./focused-chunks/chunk-C7WHWI7K.js";import"./focused-chunks/chunk-3OCDKITJ.js";import"./focused-chunks/chunk-FDZPRJXJ.js";import"./focused-chunks/chunk-LMFIAQ2V.js";import{a as h}from"./focused-chunks/chunk-5LDBS6MS.js";import"./focused-chunks/chunk-HL47UQZJ.js";import"./focused-chunks/chunk-BWOVFE5B.js";import"./focused-chunks/chunk-X6CXWWNB.js";import{$d as W,Ma as R,Na as M,Yd as V,_d as z,b as y,c as E,f as d,i as k,j as C,k as O,l as S,m as b,n as P}from"./focused-chunks/chunk-SMMOZ3H3.js";import"./focused-chunks/chunk-3Z7MCUJM.js";import"./focused-chunks/chunk-RIQUIHYU.js";import{b as Ie,c as we,d as Fe}from"./focused-chunks/chunk-A6VEMCRR.js";function qe(e){return e}function Ve(e){return e}function re(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 oe(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 te(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 ne(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 ie(e){let r={activate:async t=>{re(t,e),oe(t,e),te(t,e),ne(t,e.hooks??{}),await e.activate?.(t)}};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 u(e){let o=Object.assign({},...e.map(r=>r??{}));return Object.keys(o).length>0?o:void 0}function se(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 ae=["beforeCommand","beforeMutation","afterCommand","onWrite","onRead","onIndex"];function ce(e,o,r){let t=o.map(s=>s?.[r]),i=f(t);if(i!==void 0){let s=e;s[r]=i}}function me(e){let o={};for(let r of ae)ce(o,e,r);return Object.keys(o).length>0?o:void 0}function ze(...e){let o={},r=(n,a)=>{a!==void 0&&(o[n]=a)};r("commands",f(e.map(n=>n.commands))),r("commandOverrides",u(e.map(n=>n.commandOverrides))),r("flags",se(e.map(n=>n.flags))),r("parsers",u(e.map(n=>n.parsers))),r("renderers",u(e.map(n=>n.renderers))),r("services",u(e.map(n=>n.services))),r("preflights",f(e.map(n=>n.preflights))),r("itemTypes",f(e.map(n=>n.itemTypes))),r("itemFields",f(e.map(n=>n.itemFields))),r("relationshipKinds",f(e.map(n=>n.relationshipKinds))),r("migrations",f(e.map(n=>n.migrations))),r("profiles",f(e.map(n=>n.profiles))),r("searchProviders",f(e.map(n=>n.searchProviders))),r("vectorStoreAdapters",f(e.map(n=>n.vectorStoreAdapters))),r("assuranceProviders",f(e.map(n=>n.assuranceProviders))),r("importers",f(e.map(n=>n.importers))),r("exporters",f(e.map(n=>n.exporters))),r("hooks",me(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 a of e)a.activate&&await a.activate(n)}:void 0);let s=e.some(n=>n.deactivate);return r("deactivate",s?async()=>{let n=[];for(let a of[...e].reverse())if(a.deactivate)try{await a.deactivate()}catch(c){n.push(c)}if(n.length>0)throw n.length>1?new AggregateError(n,"Multiple extension blueprint deactivate hooks failed."):n[0]}:void 0),o}var de=[["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 g(e){return e?Array.isArray(e)?e.length>0:Object.keys(e).length>0:!1}function v(e){let o=new Set;for(let[i,s]of de)g(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(g)&&o.add("hooks"),[...o].sort((i,s)=>i.localeCompare(s))}var fe=[["beforeCommand","before_command"],["beforeMutation","before_mutation"],["afterCommand","after_command"],["onWrite","on_write"],["onRead","on_read"],["onIndex","on_index"]];function m(e){return[...new Set(e)].sort((o,r)=>o.localeCompare(r))}function l(e){return e!=null}function x(e){return d(`${e.name} import`)}function _(e){return d(`${e.name} export`)}function pe(e,o,r){return[...e.map(t=>d(t.name)),...o.filter(t=>t.options!==void 0).map(x),...r.filter(t=>t.options!==void 0).map(_)]}function le(e,o,r,t){return[...Object.keys(e.flags??{}).map(i=>d(i)),...o.filter(i=>i.flags!==void 0).map(i=>d(i.name)),...r.filter(i=>i.options?.flags!==void 0).map(x),...t.filter(i=>i.options?.flags!==void 0).map(_)]}function ue(e){return fe.filter(([o])=>(e[o]?.length??0)>0).map(([,o])=>o)}function ge(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:m((i.commands??[]).map(s=>d(s))),result_discriminator:i.resultDiscriminator!==void 0}}).sort((r,t)=>r.format.localeCompare(t.format));return o.length>0?{renderer_ownership:o}:{}}function he(e){return!e||e.length===0?{}:{assurance_providers:m(e.map(o=>o.id))}}function ve(e,o,r){return{item_types:m((e.itemTypes??[]).map(t=>t.name)),item_fields:m((e.itemFields??[]).map(t=>t.name)),...(e.relationshipKinds?.length??0)>0?{relationship_kinds:m(e.relationshipKinds.map(t=>t.kind))}:{},migrations:m((e.migrations??[]).flatMap(t=>typeof t.id=="string"?[t.id]:[])),profiles:m((e.profiles??[]).map(t=>t.name)),importers:m(o.map(t=>d(t.name))),exporters:m(r.map(t=>d(t.name))),search_providers:m((e.searchProviders??[]).map(t=>t.name)),vector_store_adapters:m((e.vectorStoreAdapters??[]).map(t=>t.name)),...he(e.assuranceProviders),parser_overrides:m(Object.keys(e.parsers??{}).map(t=>d(t))),service_overrides:m(Object.keys(e.services??{}).map(t=>String(t).trim().toLowerCase())),renderer_overrides:m(Object.keys(e.renderers??{}).map(t=>String(t).trim().toLowerCase())),...ge(e.renderers),preflight_overrides:(e.preflights??[]).length,preflight_ownership:(e.preflights??[]).map(t=>({commands:[...t.commands??[]]}))}}function We(e){let o=(e.commands??[]).filter(l),r=(e.importers??[]).filter(l),t=(e.exporters??[]).filter(l),i=r.map(x),s=t.map(_),n=pe(o,r,t),a=le(e,o,r,t),c=e.hooks??{},p=ve(e,r,t);return{capabilities:v(e),commands:m(n),command_overrides:m(Object.keys(e.commandOverrides??{}).map(A=>d(A))),command_handlers:m([...n,...i,...s]),hooks:ue(c),flag_commands:m(a),...p}}var xe=["commands","commandOverrides","flags","parsers","renderers","services","preflights","itemTypes","itemFields","relationshipKinds","migrations","profiles","searchProviders","vectorStoreAdapters","assuranceProviders","importers","exporters"];function _e(e){return(e.itemFields??[]).filter(o=>typeof o?.name=="string"&&h.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 ye(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 t=k(r.long,r.short);if(t===null)return[];let{token:i,failure:s}=t;return[{code:s,severity:"error",message:`Flag "${i}" ${C(i,s)}.`,field:i}]})}function w(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 Ee(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 ke(e){let o=[],r=new Map;for(let i of e.commands??[]){let s=d(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=>d(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 Ce(e){let o=[];for(let r of xe)r in e&&!g(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(g)||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 Oe(e,o={}){let r=v(e),t=o.declaredCapabilities??e.manifest?.capabilities,i=Array.isArray(t)?w(t):null,s=[...Ee(r,i),...ke(e),...ye(e),..._e(e),...Ce(e)];return{ok:s.every(n=>n.severity!=="error"),findings:s,used:r,declared:i}}function F(e,o){let{additionalCapabilities:r,...t}=o,i=Array.isArray(r)?w(r):[],s=[...new Set([...v(e),...i])].sort((n,a)=>n.localeCompare(a));return{...t,capabilities:s}}function Ge(e,o){let r=F(e,o);return{module:ie({...e,manifest:r}),manifest:r}}function I(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 Se(e,o){let r=O(e.pm_min_version,o.pmVersion),t=S(e.pm_max_version,o.pmVersion,o.pmMaxVersionExceededMode??"block"),s=P(e).findings.map(p=>({code:p.code,severity:"warning",constraint:"manifest",required:p.code==="manifest_unknown_key"?p.path:"pm_min_version",current:o.pmVersion,path:p.path,...p.suggested_key?{suggested_key:p.suggested_key}:{},message:p.message})),n=[],a=I(r,o.pmVersion);a!==null&&n.push(a);let c=I(t,o.pmVersion);return c!==null&&n.push(c),{compatible:r.allowed&&t.allowed,findings:[...s,...n],pmVersion:o.pmVersion}}var Pe=new Set(["capability_undeclared","capability_unused","manifest_capabilities_absent"]);function Ye(e,o={}){let r=Oe(e,{declaredCapabilities:o.declaredCapabilities}),t=o.identity?F(e,o.identity):null,i=o.target?Se(t??e.manifest??{},o.target):null,a=[...(t!==null&&o.declaredCapabilities===void 0?r.findings.filter(c=>!Pe.has(c.code)):r.findings).map(c=>({source:"blueprint",severity:c.severity,code:c.code,message:c.message})),...(i?.findings??[]).map(c=>({source:"compatibility",severity:c.severity,code:c.code,message:c.message}))];return{ok:a.every(c=>c.severity!=="error"),capabilities:r.used,blueprint:r,manifest:t,compatibility:i,findings:a}}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 e}function mr(e){return e}function dr(e){return{handled:!0,result:e}}function fr(){return{handled:!1}}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 vr(e){return e}function xr(e){return e}function _r(e){return e}function yr(e){return e}export{j as BUILTIN_PROFILES,Ae as EXTENSION_CAPABILITIES,Fe as EXTENSION_CAPABILITY_CONTRACT,Ie as EXTENSION_CAPABILITY_CONTRACT_VERSION,we as EXTENSION_CAPABILITY_LEGACY_ALIASES,V as EXTENSION_CAPABILITY_REGISTRATION_SURFACES,be as EXTENSION_POLICY_MODES,Re as EXTENSION_POLICY_SURFACES,Be as EXTENSION_SANDBOX_PROFILES,Me as EXTENSION_TRUST_MODES,Ne as LIST_FILTER_EXTENSION_FLAG_DEFINITIONS,T as PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS,B as PM_PACKAGE_RESOURCE_KINDS,Y as PROFILE_LINT_CODES,G as PROFILE_LINT_DIMENSIONS,$ as PROFILE_NAMES,h as RESERVED_ITEM_FIELD_NAMES,Le as SEARCH_EXTENSION_FLAG_DEFINITIONS,Se as checkExtensionManifestCompatibility,L as collectPackageExtensionDirectories,z as collectUsedExtensionCapabilities,ie as composeExtension,Ge as composeExtensionPackage,M as createExtensionContributionInventory,fr as declineServiceOverride,vr as defineAfterCommandHook,gr as defineBeforeCommandHook,hr as defineBeforeMutationHook,Ze as defineCommand,sr as defineCommandOverride,ur as defineExporter,qe as defineExtension,Ve as defineExtensionBlueprint,Je as defineExtensionManifest,er as defineFlag,lr as defineImporter,or as defineItemField,rr as defineItemType,tr as defineMigration,yr as defineOnIndexHook,_r as defineOnReadHook,xr as defineOnWriteHook,ar as defineParserOverride,cr as definePreflightOverride,Qe as defineProjectProfile,pr as defineRendererOverride,nr as defineSearchProvider,mr as defineServiceOverride,ir as defineVectorStoreAdapter,v as deriveExtensionCapabilities,We as describeExtensionBlueprint,U as describeProfileComposition,q as describeProjectProfile,dr as handleServiceOverride,b as inspectExtensionManifestSchema,Oe as lintExtensionBlueprint,P as lintExtensionManifestSchema,X as lintProjectProfile,H as listProfiles,ze as mergeExtensionBlueprints,ee as normalizeDirectExtensionCommandOptions,R as normalizeExtensionContributionInventory,D as normalizeProfileName,J as planProfileApplication,Ye as preflightExtension,N as readPmPackageManifest,W as reconcileExtensionCapabilityUsage,Q as renderExtensionSurfaceMarkdown,Z as resolveExtensionFlagOptionKey,K as resolveProfile,F as synthesizeExtensionManifest,Te as toExtensionFlagDefinitions};
|
|
2
2
|
//# sourceMappingURL=sdk-authoring.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
`)}function
|
|
1
|
+
import{a as Yi,b as Wi,c as Xi,d as C,e as Qi,f as F,g as Zi,h as en,i as tn,j as rn,k as on,l as nn,m as sn,n as cn,o as D,p as an,q,u as z,v as dn,w as ln,x as U,y as pn,z as un}from"./focused-chunks/chunk-REFMQY47.js";import{a as mn}from"./focused-chunks/chunk-K53OIT5J.js";import{a as Ki}from"./focused-chunks/chunk-RLO2HCZT.js";import{$ as Fi,A as ho,T as Si,U as vi,V as ji,W as Ai,X as Ri,Y as Ii,Z as Ni,_ as Li,a as Ke,aa as Di,b as Ye,ba as qi,c as We,d as Xe,da as zi,e as Qe,ea as Ui,f as Ze,fa as Hi,g as et,ga as Gi,h as tt,ha as Vi,i as rt,ia as Bi,j as eo,ja as Ji,k as to,l as ro,m as oo,n as io,o as no,p as so,q as co,r as ao,s as lo,t as po,u as uo,v as mo,w as _o,x as fo,y as go,z as yo}from"./focused-chunks/chunk-3OCDKITJ.js";import{$ as Ht,$a as Hr,A as ht,Aa as gr,B as xt,Ba as yr,C as bt,Ca as hr,Da as xr,E as wt,Ea as br,F as Ct,Fa as wr,G as Tt,Ga as Cr,H as Pt,Ha as Tr,I as kt,Ia as Pr,J as Mt,Ja as kr,K as Et,Ka as Mr,L as Ot,La as Er,M as $t,Ma as Or,N as St,Na as $r,O as vt,Oa as Sr,P as jt,Pa as vr,Q as At,Qa as jr,R as Rt,Ra as Ar,Sa as Rr,T as It,Ta as Ir,U as Nt,Ua as Nr,V as Lt,Va as Lr,W as Ft,Wa as Fr,X as Dt,Xa as Dr,Y as qt,Ya as qr,Z as zt,Za as zr,_ as Ut,_a as Ur,aa as Gt,ab as Gr,ba as Vt,bb as Vr,ca as Bt,cb as Br,d as S,da as Jt,db as Jr,ea as Kt,eb as Kr,f as v,fa as Yt,fb as Yr,ga as Wt,gb as Wr,ha as Xt,hb as Xr,ia as Qt,j,ja as Zt,jb as Qr,ka as er,l as A,la as tr,lb as R,m as it,ma as rr,mb as I,n as nt,na as or,nb as Zr,o as st,oa as ir,p as ct,pa as nr,q as at,qa as sr,r as dt,ra as cr,s as lt,sa as ar,t as pt,ta as dr,u as ut,ua as lr,v as mt,va as pr,w as _t,wa as ur,x as ft,xa as mr,y as gt,ya as _r,z as yt,za as fr}from"./focused-chunks/chunk-LMFIAQ2V.js";import{a as ot}from"./focused-chunks/chunk-BWOVFE5B.js";import"./focused-chunks/chunk-X6CXWWNB.js";import{$f as Ti,Aa as Le,Af as yi,Ba as Fe,Ca as De,Ce as N,Da as qe,De as L,Ea as ze,Fa as Ue,Ga as He,Ge as Eo,Ha as Ge,He as Oo,Ia as Ve,Ie as $o,Ja as Be,Je as So,Ke as vo,La as Je,Le as jo,Me as Ao,Ne as Ro,Oe as Io,Pe as No,Qe as Lo,Re as Fo,Se as Do,Te as qo,Ue as zo,Ve as Uo,Vf as hi,We as Ho,Wf as w,Xe as Go,Xf as xi,Ya as Q,Ye as Vo,Yf as bi,Ze as Bo,Zf as wi,_f as Ci,af as Jo,ag as Pi,bf as Ko,bg as ki,cg as Mi,dg as Ei,ef as Yo,eg as Oi,ff as Wo,gf as Xo,hf as Qo,if as Zo,jf as ei,kb as xo,kf as ti,lb as bo,lf as ri,lg as $i,mb as wo,mf as oi,nb as Co,nf as ii,oa as Me,ob as To,of as ni,pa as Ee,pb as Po,pf as si,qa as Oe,qb as ko,qf as ci,ra as $e,rb as Mo,rf as ai,sa as Se,sf as di,ta as ve,tf as li,ua as je,uf as pi,vf as ui,wa as Ae,wf as mi,xa as Re,xf as _i,ya as Ie,yf as fi,za as Ne,zf as gi}from"./focused-chunks/chunk-SMMOZ3H3.js";import{g as ye,h as he,i as xe,j as be,k as O,l as we,m as _,n as $,o as Ce,p as Te,q as Pe,r as ke}from"./focused-chunks/chunk-3Z7MCUJM.js";import"./focused-chunks/chunk-RIQUIHYU.js";import{z as b}from"./focused-chunks/chunk-A6VEMCRR.js";var Z="2026-07-28",H=["2025-11-25","2025-06-18"],G=[Z];var ee=new Set(["--help","-h","--version","-V"]);function te(e,t){let n=[`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"&&n.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."),n.push("",`MCP protocol: ${G.join(", ")}.`,e==="stdio"?`Legacy initialize compatibility: ${H.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@${t}`,"pm-mcp"]}}}):`PM_MCP_HTTP_PORT=3000 npx --yes --package @unbrained/pm-cli@${t} 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",""),n.join(`
|
|
2
|
+
`)}function gn(e,t,i){if(e.length===0)return{kind:"serve"};let n=e.find(o=>!ee.has(o));if(n!==void 0){let o=t==="stdio"?"pm-mcp":"pm-mcp-http";return{kind:"exit",exitCode:64,stdout:"",stderr:`Unsupported argument ${JSON.stringify(n)}. Run ${o} --help.
|
|
3
3
|
`}}return{kind:"exit",exitCode:0,stdout:e.includes("--help")||e.includes("-h")?te(t,i):`${i}
|
|
4
|
-
`,stderr:""}}var f,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,t){if(t==="--limit")return"result-row-limit";if(t==="--node-limit")return"graph-node-limit";if(t==="--edge-limit")return"graph-edge-limit";if(t==="--output-limit")return"rendered-output-row-limit";if(t==="--output-budget")return"rendered-output-byte-budget";if(t==="--token-budget")return"context-intent-token-budget";if(t==="--full"){let i=re[_(e)];if(i===void 0)throw new Error(`Command ${e} exposes --full without a registered projection concept.`);return i}return t!=="--file"?t.slice(2):["create","update","update-many"].includes(_(e))?"linked-file-path":["comments","notes","learnings"].includes(_(e))?"entry-file-input":"plan-definition-file"}function g(){if(f!==void 0)return f;let t=q.filter(({command:o})=>R(o)).flatMap(({command:o,family:s})=>D(o,I(o)).map(a=>({command:o,family:s,concept:oe(o,a.flag),flag:a.flag,aliases:Object.freeze([...a.aliases??[]]),value_kind:a.repeatable?"list":a.flag==="--limit"?"number":a.value_type}))),i=new Set(t.flatMap(o=>o.aliases.map(s=>`${o.command}:${s}`))),n=t.filter(o=>!i.has(`${o.command}:${o.flag}`)),r=new Map;for(let o of n){let s=r.get(o.concept)??new Set;s.add(o.value_kind),r.set(o.concept,s)}return f=Object.freeze(n.map(o=>Object.freeze({...o,concept:r.get(o.concept)?.size===1?o.concept:`${o.concept}@${o.command}`}))),f}function
|
|
5
|
-
`)}var T=2,ae=["self_reported","independent_transport"];function y(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function m(e,t){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`${t} must be a non-empty string`);return e.trim()}function K(e,t,i=!1){if(!Array.isArray(e)||e.length===0)throw new TypeError(`${t} must be a non-empty string array`);return e.map((n,r)=>{let o=m(n,`${t}[${String(r)}]`);return i?n:o})}function P(e,t){return e===void 0?void 0:m(e,t)}function de(e,t){if(e===void 0)return;if(!y(e)||Object.keys(e).length===0)throw new TypeError(`${t} must be a non-empty object`);let i=Object.entries(e).map(([n,r])=>{if(n.length===0||n.split(".").some(o=>o.length===0))throw new TypeError(`${t} must use dot-separated own-property paths`);if(r!==null&&typeof r!="string"&&typeof r!="boolean"&&(typeof r!="number"||!Number.isFinite(r)))throw new TypeError(`${t} values must be JSON primitives`);return[n,r]});return Object.fromEntries(i)}function le(e,t,i,n,r,o){if(n==="refusal"){if(C(i)||r===void 0||o===void 0)throw new TypeError(`${e} refusal steps require a non-success exit, error code, and refusal surface`);return}if(r!==void 0||o!==void 0)throw new TypeError(`${e} only refusal steps may declare expected_error_code or expected_refusal_surface`);let s=N(t);if(s===void 0)throw new TypeError(`${e}.args must identify a command after global flags`);let a=t[s].trim().toLowerCase();if(a==="history"){let l=L(t.slice(s+1));l!==void 0&&(a=$(`history ${l}`))}let c=F(a);if(!C(i)||i!==0&&!c?.exit_codes.some(l=>l===i))throw new TypeError(`${e} successful output must use exit code 0 or a command-declared successful effect exit`);let d=U(a).kind;if(n!==d)throw new TypeError(`${e} expected ${n}, but ${a} declares ${d}`)}function pe(e,t,i){if(!y(e))throw new TypeError(`tasks.${t}.steps[${String(i)}] must be an object`);let n=`tasks.${t}.steps[${String(i)}]`,r=m(e.id,`${n}.id`),o=K(e.args,`${n}.args`,!0),s=e.expected_exit_code;if(typeof s!="number"||!Number.isSafeInteger(s))throw new TypeError(`${n}.expected_exit_code must be a safe integer`);let a=e.expected_output_kind;if(a!=="refusal"&&!z.includes(a))throw new TypeError(`${n}.expected_output_kind is unsupported`);let c=a,d=e.expected_accounting_mode;if(!ae.includes(d))throw new TypeError(`${n}.expected_accounting_mode is unsupported`);let l=d;if(l==="independent_transport"&&c!=="refusal")throw new TypeError(`${n} independent_transport accounting is supported only for refusal steps`);let p=K(e.required_fields,`${n}.required_fields`);if(p.some(W=>W.split(".").some(X=>X.length===0)))throw new TypeError(`${n}.required_fields must contain dot-separated own-property paths`);let M=de(e.expected_field_values,`${n}.expected_field_values`),h=P(e.expected_error_code,`${n}.expected_error_code`),x=P(e.expected_refusal_surface,`${n}.expected_refusal_surface`),E=P(e.recovery_for,`${n}.recovery_for`);return le(n,o,s,c,h,x),{id:r,args:o,expected_exit_code:s,expected_output_kind:c,expected_accounting_mode:l,required_fields:p,...M?{expected_field_values:M}:{},...h?{expected_error_code:h}:{},...x?{expected_refusal_surface:x}:{},...E?{recovery_for:E}:{}}}function ue(e,t){if(!y(e))throw new TypeError(`tasks[${String(t)}] must be an object`);let i=m(e.id,`tasks[${String(t)}].id`),n=m(e.description,`tasks.${i}.description`);if(!Array.isArray(e.steps)||e.steps.length===0)throw new TypeError(`tasks.${i}.steps must be a non-empty array`);let r=e.steps.map((s,a)=>pe(s,i,a)),o=new Map;for(let s of r){if(o.has(s.id))throw new TypeError(`tasks.${i} contains duplicate step id ${s.id}`);if(s.recovery_for!==void 0&&(o.get(s.recovery_for)?.expected_output_kind!=="refusal"||s.expected_output_kind==="refusal"))throw new TypeError(`tasks.${i}.${s.id} recovery_for must reference an earlier refusal and declare successful output`);o.set(s.id,s)}if(r.at(-1)?.expected_output_kind==="refusal")throw new TypeError(`tasks.${i} completed task must terminate with successful output`);for(let s of r)if(s.expected_output_kind==="refusal"&&!r.some(a=>a.recovery_for===s.id))throw new TypeError(`tasks.${i}.${s.id} refusal must have a later successful recovery_for step`);return{id:i,description:n,steps:r}}function On(e){if(!y(e))throw new TypeError("agent-task transcript corpus must be an object");if(e.version!==T)throw new TypeError(`agent-task transcript corpus version must be ${String(T)}`);if(!Array.isArray(e.tasks)||e.tasks.length===0)throw new TypeError("agent-task transcript corpus tasks must be non-empty");let t=e.tasks.map((n,r)=>ue(n,r)),i=new Set;for(let n of t){if(i.has(n.id))throw new TypeError(`duplicate agent-task transcript id ${n.id}`);i.add(n.id)}return{version:T,tasks:t}}function me(e){return[e.expected_error_code!==void 0&&e.error_code!==e.expected_error_code?{code:"error_code_mismatch",probe_id:e.probe_id,detail:`Expected error code ${e.expected_error_code}, received ${e.error_code??"<missing>"}.`}:void 0,e.expected_allowed_values!==void 0&&JSON.stringify([...e.allowed_values].sort())!==JSON.stringify([...e.expected_allowed_values].sort())?{code:"incomplete_allowed_values",probe_id:e.probe_id,detail:"The refusal's accepted domain differs from the SDK-owned domain contract."}:void 0,e.expected_suggested_retry_args!==void 0&&(e.suggested_retry_args?.length??0)===0?{code:"missing_suggested_retry_args",probe_id:e.probe_id,detail:"The refusal omitted shell-free suggested retry arguments."}:void 0,e.expected_suggested_retry_args!==void 0&&(e.suggested_retry_args?.length??0)>0&&JSON.stringify(e.suggested_retry_args)!==JSON.stringify(e.expected_suggested_retry_args)?{code:"suggested_retry_args_mismatch",probe_id:e.probe_id,detail:"The refusal's suggested retry arguments differ from the SDK-owned contract."}:void 0]}function _e(e){return[e.exit_code!==b.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 ${b.USAGE}.`}:void 0,e.allowed_values_required!==!1&&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."},...me(e)]}function vn(e){let t=[],i=new Set,n=0;e.length===0&&t.push({code:"empty_corpus",probe_id:"corpus",detail:"At least one real refusal observation is required."});for(let r of e){if(i.has(r.probe_id)){t.push({code:"duplicate_probe",probe_id:r.probe_id,detail:`${r.probe_id} was supplied more than once.`});continue}i.add(r.probe_id);let o=t.length;for(let s of _e(r))s!==void 0&&t.push(s);t.length===o&&(n+=1)}return t.sort((r,o)=>r.probe_id!==o.probe_id?r.probe_id.localeCompare(o.probe_id):r.code.localeCompare(o.code)),{ok:t.length===0,probe_count:i.size,closed_probe_count:n,closure_fraction:i.size===0?0:n/i.size,findings:t}}var Y="not-a-declared-intent",u="not-a-declared-field";function fe(){let e={get:["pm-domain"],search:["Domain query"]},t=[...new Set(w.map(({command:o})=>o))].map(o=>{let s=w.filter(d=>d.command===o),a=s[0],c=e[a.command]??[];return{probe_id:`${a.command}-invalid-intent`,command:a.command,flag:"--for",rejected_value:Y,refusal_args:[a.command,...c,"--for",Y],allowed_values:s.map(({intent:d})=>d).sort(),suggested_retry_args:[a.command,...c,"--for",a.intent],error_code:"unknown_context_intent"}}),i=v(),n=Object.keys(S).map(o=>({probe_id:`${o}-invalid-field`,command:o,flag:"--fields",rejected_value:u,refusal_args:[o,"--fields",u],allowed_values:i,suggested_retry_args:[o,"--fields","id,title,status"],error_code:"unknown_field_projection"}));return[...t,...n,{probe_id:"get-invalid-field",command:"get",flag:"--fields",rejected_value:u,refusal_args:["get","pm-domain","--fields",u],allowed_values:j(),suggested_retry_args:["get","pm-domain","--fields","id,title,status"],error_code:"unknown_field_projection"},{probe_id:"list-mutually-exclusive-projection",command:"list",flag:"--projection",rejected_value:"--brief+--full",refusal_args:["list","--brief","--full"],allowed_values:[],suggested_retry_args:["list","--brief"],error_code:"projection_options_mutually_exclusive",allowed_values_required:!1},{probe_id:"get-mutually-exclusive-projection",command:"get",flag:"--projection",rejected_value:"--full+--fields",refusal_args:["get","pm-domain","--full","--fields","id"],allowed_values:[],suggested_retry_args:["get","pm-domain","--full"],error_code:"projection_options_mutually_exclusive",allowed_values_required:!1},{probe_id:"search-mutually-exclusive-projection",command:"search",flag:"--projection",rejected_value:"--full+--fields",refusal_args:["search","Domain query","--full","--fields","id"],allowed_values:[],suggested_retry_args:["search","Domain query","--full"],error_code:"projection_options_mutually_exclusive",allowed_values_required:!1},{probe_id:"package-upgrade-mutually-exclusive-modes",command:"package upgrade",flag:"--cli-only/--packages-only",rejected_value:"--cli-only+--packages-only",refusal_args:["package","upgrade","--cli-only","--packages-only","--dry-run"],allowed_values:[],suggested_retry_args:["package","upgrade","--packages-only","--dry-run"],error_code:"package_upgrade_modes_mutually_exclusive",allowed_values_required:!1},{probe_id:"search-invalid-field",command:"search",flag:"--fields",rejected_value:u,refusal_args:["search","Domain query","--fields",u],allowed_values:A(),suggested_retry_args:["search","Domain query","--fields","id,title,status,score"],error_code:"unknown_field_projection"}].sort((o,s)=>o.probe_id.localeCompare(s.probe_id))}function In(e,t){let i=fe().find(o=>o.command===e&&o.flag===t);if(!i)return"No stable core values are declared.";let n=i.allowed_values.filter(o=>!o.startsWith("item.")),r=t==="--fields"?" item.<field> aliases and configured runtime metadata fields are also accepted.":" Configured package and workspace intents may extend this domain.";return`Allowed core values: ${n.join("|")}.${r}`}var k=[{probe_id:"tracker-root-missing",failure_kind:"missing_root",expected_error_code:"tracker_root_missing",expected_exit_code:3,recovery_kind:"initialize"},{probe_id:"tracker-root-settings-missing",failure_kind:"settings_missing",expected_error_code:"tracker_not_initialized",expected_exit_code:3,recovery_kind:"initialize"},{probe_id:"tracker-root-not-directory",failure_kind:"not_directory",expected_error_code:"tracker_root_not_directory",expected_exit_code:2,recovery_kind:"select_directory"},{probe_id:"tracker-root-unreadable",failure_kind:"unreadable_root",expected_error_code:"tracker_root_unreadable",expected_exit_code:1,recovery_kind:"repair_permissions"}];function Ln(){return k.map(e=>({...e}))}function ge(e,t){let i=[];t.error_code!==e.expected_error_code&&i.push({code:"error_code_mismatch",probe_id:e.probe_id,detail:`Expected ${e.expected_error_code}, received ${t.error_code}.`}),t.exit_code!==e.expected_exit_code&&i.push({code:"exit_code_mismatch",probe_id:e.probe_id,detail:`Expected exit ${e.expected_exit_code}, received ${t.exit_code}.`}),t.recovery_kind!==e.recovery_kind&&i.push({code:"recovery_kind_mismatch",probe_id:e.probe_id,detail:`Expected ${e.recovery_kind}, received ${t.recovery_kind}.`});let n=t.suggested_retry_args.indexOf("init"),r=n===0||n===2&&t.suggested_retry_args[0]==="--pm-path"&&t.suggested_retry_args[1]?.length>0;return e.recovery_kind==="initialize"&&!r&&i.push({code:"missing_init_recovery",probe_id:e.probe_id,detail:"Missing and uninitialized roots must emit a tokenized init retry."}),(t.unsafe_init_recommended||e.recovery_kind!=="initialize"&&t.suggested_retry_args.includes("init"))&&i.push({code:"unsafe_init_recovery",probe_id:e.probe_id,detail:"A tracker root that cannot be initialized safely must not recommend initialization."}),t.retry_succeeded||i.push({code:"retry_failed",probe_id:e.probe_id,detail:"The emitted retry or safe alternate-root recovery did not execute successfully."}),i}function Fn(e){let t=new Map(e.map(r=>[r.probe_id,r])),i=[],n=0;for(let r of k){let o=t.get(r.probe_id);if(o===void 0){i.push({code:"missing_probe",probe_id:r.probe_id,detail:"No runtime observation was supplied for this contract."});continue}let s=ge(r,o);i.push(...s),s.length===0&&(n+=1)}return i.sort((r,o)=>r.probe_id.localeCompare(o.probe_id)||r.code.localeCompare(o.code)),{ok:i.length===0,probe_count:k.length,closed_probe_count:n,findings:i}}export{Ze as ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,Dr as ACTIVITY_FLAG_CONTRACTS,Tt as AGGREGATE_FLAG_CONTRACTS,dr as APPEND_FLAG_CONTRACTS,$r as ASSURANCE_FLAG_CONTRACTS,We as CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS,Fr as CALENDAR_FLAG_CONTRACTS,lr as CLAIM_FLAG_CONTRACTS,Li as CLOSE_ACTION_OPTION_KEYS,cr as CLOSE_FLAG_CONTRACTS,ar as CLOSE_MANY_FLAG_CONTRACTS,gr as CLOSE_TASK_FLAG_CONTRACTS,Pt as COMMENTS_FLAG_CONTRACTS,Xr as COMPLETION_FLAG_CONTRACTS,Dt as CONFIG_FLAG_CONTRACTS,Xe as CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS,zr as CONTEXT_FLAG_CONTRACTS,gi as CONTEXT_INTENT_LIMIT_OVERRIDE_WARNING,Wr as CONTRACTS_FLAG_CONTRACTS,Rr as COPY_FLAG_CONTRACTS,Oi as CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,Si as CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,$i as CREATE_COMMANDER_STRING_OPTION_CONTRACTS,Sr as CREATE_FLAG_CONTRACTS,ur as DELETE_FLAG_CONTRACTS,Gr as DEPS_FLAG_CONTRACTS,Ot as DOCS_FLAG_CONTRACTS,Mr as DUPLICATES_FLAG_CONTRACTS,Br as EVAL_FLAG_CONTRACTS,qr as EVENTS_FLAG_CONTRACTS,hr as EVENT_FLAG_CONTRACTS,Te as EXECUTABLE_COMMAND_ALIASES,Wt as EXTENSION_ACTIVATE_FLAG_CONTRACTS,Yt as EXTENSION_ADOPT_ALL_FLAG_CONTRACTS,or as EXTENSION_ADOPT_FLAG_CONTRACTS,rr as EXTENSION_CATALOG_FLAG_CONTRACTS,Xt as EXTENSION_DEACTIVATE_FLAG_CONTRACTS,Kt as EXTENSION_DESCRIBE_FLAG_CONTRACTS,tr as EXTENSION_DOCTOR_FLAG_CONTRACTS,Jt as EXTENSION_EXPLORE_FLAG_CONTRACTS,qt as EXTENSION_FLAG_CONTRACTS,Ut as EXTENSION_INIT_FLAG_CONTRACTS,Vt as EXTENSION_INSTALL_FLAG_CONTRACTS,Zt as EXTENSION_MANAGE_FLAG_CONTRACTS,Qt as EXTENSION_MIGRATE_FLAG_CONTRACTS,er as EXTENSION_RELOAD_FLAG_CONTRACTS,zt as EXTENSION_SCOPE_FLAG_CONTRACTS,Bt as EXTENSION_UNINSTALL_FLAG_CONTRACTS,Et as FILES_FLAG_CONTRACTS,Ir as FOCUS_FLAG_CONTRACTS,Pr as GC_FLAG_CONTRACTS,Ur as GET_FLAG_CONTRACTS,wt as GLOBAL_FLAG_CONTRACTS,Vr as GRAPH_FLAG_CONTRACTS,ot as GRAPH_QUERY_DEFAULTS,Hr as GUIDE_FLAG_CONTRACTS,Er as HEALTH_FLAG_CONTRACTS,At as HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS,Rt as HISTORY_COMPACT_FLAG_CONTRACTS,$t as HISTORY_FLAG_CONTRACTS,vt as HISTORY_REDACT_FLAG_CONTRACTS,jt as HISTORY_REPAIR_FLAG_CONTRACTS,Ft as INIT_FLAG_CONTRACTS,ir as INSTALL_FLAG_CONTRACTS,jr as ITEM_COMPLETE_FLAG_CONTRACTS,vr as ITEM_MUTATE_FLAG_CONTRACTS,Ar as ITEM_REOPEN_FLAG_CONTRACTS,Mt as LEARNINGS_FLAG_CONTRACTS,Ke as LIST_COMMANDER_STRING_OPTION_CONTRACTS,Ct as LIST_FILTER_FLAG_CONTRACTS,yr as MEET_FLAG_CONTRACTS,St as MERGE_FLAG_CONTRACTS,Ae as MERGE_SUBCOMMAND_VALUES,Qe as NEXT_COMMANDER_STRING_OPTION_CONTRACTS,Kr as NEXT_FLAG_CONTRACTS,kt as NOTES_FLAG_CONTRACTS,Ht as PACKAGE_FLAG_CONTRACTS,Gt as PACKAGE_INIT_FLAG_CONTRACTS,fr as PAUSE_TASK_FLAG_CONTRACTS,Ni as PLAN_CREATE_METADATA_PARAMETER_KEYS,Lt as PLAN_FLAG_CONTRACTS,ae as PM_AGENT_TASK_ACCOUNTING_MODES,T as PM_AGENT_TASK_TRANSCRIPT_VERSION,xe as PM_BULK_LIFECYCLE_COMMAND_ALIASES,ut as PM_CLI_GRAMMAR_CONTRACT,it as PM_CLI_GRAMMAR_NOUNS,Le as PM_CLI_ONLY_TOOL_ACTION_WAIVERS,nt as PM_CLI_SHARED_VERBS,Ce as PM_COMMAND_ALIAS_CONTRACTS,lt as PM_COMMAND_DESTINATION_CONTRACTS,Ki as PM_COMMAND_EXIT_CONTRACTS,Ji as PM_COMMAND_EXIT_OUTCOME_CONTRACTS,Io as PM_COMMAND_OUTPUT_BUDGET_CONTRACTS,an as PM_COMMAND_OUTPUT_ENVELOPE_CONTRACTS,pt as PM_COMMAND_POSITIONAL_CONTRACTS,w as PM_CONTEXT_INTENT_CONTRACTS,he as PM_CONTEXT_OPS_COMMAND_ALIASES,je as PM_CORE_COMMAND_NAMES,De as PM_DEPRECATED_TOOL_ACTIONS,So as PM_DIAGNOSTIC_DEGRADATION_STEPS,vo as PM_DIAGNOSTIC_OUTPUT_BUDGET_CONTRACTS,$o as PM_DIAGNOSTIC_OUTPUT_CLASSES,qe as PM_DISCOVERABLE_TOOL_ACTIONS,on as PM_ERROR_CODE_CATALOG,Zi as PM_ERROR_CODE_EXIT_CLASS_CONTRACTS,Me as PM_EXTENSION_CAPABILITY_CONTRACTS,Re as PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS,Oe as PM_EXTENSION_POLICY_MODE_CONTRACTS,ve as PM_EXTENSION_POLICY_SURFACE_CONTRACTS,Se as PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS,Ee as PM_EXTENSION_SERVICE_NAME_CONTRACTS,$e as PM_EXTENSION_TRUST_MODE_CONTRACTS,zo as PM_GENERIC_REFUSAL_GUIDANCE,pn as PM_HISTORY_ATTESTATION_CONTRACT,ye as PM_HISTORY_COMMAND_ALIASES,wo as PM_HISTORY_OPERATION_ALIASES,To as PM_HISTORY_OPERATION_CONTRACT,Co as PM_HISTORY_OPERATION_PATTERNS,Ne as PM_ITEM_ACTION_SUBCOMMANDS,xo as PM_ITEM_HISTORY_OPERATIONS,O as PM_NAMESPACED_COMMAND_ALIASES,Oo as PM_OUTPUT_BUDGET_CLASSES,Eo as PM_OUTPUT_DEGRADATION_STEPS,z as PM_OUTPUT_ENVELOPE_KINDS,Ie as PM_PACKAGE_ONLY_ACTION_SUBCOMMANDS,st as PM_POSITIONAL_ACTION_CONTRACTS,Gi as PM_PROVIDER_TOOL_PARAMETERS_SCHEMA,Ui as PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION,Xo as PM_READ_OUTPUT_COMPOSITION_OPTION_FLAGS,ui as PM_READ_OUTPUT_CONTINUATION_FINGERPRINT_POLICIES,Yo as PM_READ_OUTPUT_DIMENSIONS,Wo as PM_READ_OUTPUT_OPTION_FLAGS,Je as PM_READ_OUTPUT_SURFACES,Qo as PM_READ_OUTPUT_SURFACE_CONTRACTS,Jo as PM_READ_OUTPUT_TAIL_RETENTION_POLICIES,Vo as PM_RECOVERY_ECHO_FIELDS,be as PM_RELOCATED_COMMAND_ALIASES,Yi as PM_SUCCESS_EXIT_CODES,Fe as PM_TOOL_ACTIONS,Fi as PM_TOOL_ACTION_PARAMETER_CONTRACTS,Hi as PM_TOOL_PARAMETERS_SCHEMA,zi as PM_TOOL_PARAMETERS_SCHEMA_MAJOR,qi as PM_TOOL_PARAMETERS_SCHEMA_VERSION,Ri as PM_TOOL_RESERVED_CUSTOM_FIELD_PROPERTIES,bo as PM_WORKSPACE_HISTORY_OPERATIONS,Nt as PROFILE_FLAG_CONTRACTS,ei as READ_OUTPUT_MUTATION_CONFLICT_CODE,ti as READ_OUTPUT_SHAPING_CONTROL_FLAGS,sr as REINDEX_FLAG_CONTRACTS,mr as RELEASE_FLAG_CONTRACTS,xr as REMIND_FLAG_CONTRACTS,pr as RESTORE_FLAG_CONTRACTS,It as SCHEMA_FLAG_CONTRACTS,Ye as SEARCH_COMMANDER_STRING_OPTION_CONTRACTS,Yr as SEARCH_FLAG_CONTRACTS,_r as START_TASK_FLAG_CONTRACTS,kr as STATS_FLAG_CONTRACTS,bt as SUBCOMMAND_GLOBAL_FLAG_CONTRACTS,Cr as TELEMETRY_FLAG_CONTRACTS,wr as TEST_ALL_FLAG_CONTRACTS,br as TEST_FLAG_CONTRACTS,Tr as TEST_RUNS_FLAG_CONTRACTS,fo as TOOL_ACTIVITY_OPTION_CONTRACTS,ro as TOOL_AGGREGATE_OPTION_CONTRACTS,po as TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACT_SOURCE,_o as TOOL_CALENDAR_OPTION_CONTRACTS,mo as TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS,go as TOOL_CONTEXT_OPTION_CONTRACTS,co as TOOL_CREATE_OPTION_CONTRACTS,so as TOOL_CREATE_OPTION_CONTRACT_SOURCE,yo as TOOL_DEPS_OPTION_CONTRACTS,ho as TOOL_GRAPH_OPTION_CONTRACTS,to as TOOL_LIST_FILTER_OPTION_CONTRACTS,oo as TOOL_SEARCH_FILTER_OPTION_CONTRACTS,no as TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS,io as TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACT_SOURCE,uo as TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS,lo as TOOL_UPDATE_OPTION_CONTRACTS,ao as TOOL_UPDATE_OPTION_CONTRACT_SOURCE,vi as UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,Ai as UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,ji as UPDATE_COMMANDER_STRING_OPTION_CONTRACTS,Nr as UPDATE_FLAG_CONTRACTS,Lr as UPDATE_MANY_FLAG_CONTRACTS,nr as UPGRADE_FLAG_CONTRACTS,Or as VALIDATE_FLAG_CONTRACTS,Jr as WORKSPACE_FLAG_CONTRACTS,Vi as _testOnlyCliContracts,Xi as analyzePmCommandExitConformance,ze as analyzePmToolActionParity,Bi as analyzeSdkCliParameterCompleteness,wi as applyContextIntentProjection,ai as applyReadOutputDimensions,ii as applyReadOutputIncludeModes,Pi as attachContextIntentReceipt,Mi as attachOutputTokenAccounting,ki as attachReadOutputContracts,Di as buildPmActionToolInputSchema,xt as compactFlagAliasContracts,xi as composeContextIntentContracts,Ti as contextIntentRowId,Ao as createPmCommandOutputBudget,Ci as decodeContextIntentCursor,fi as decodeReadOutputContinuationCursor,Ro as definePmCommandOutputBudget,cn as definePmCommandOutputEnvelope,en as definePmErrorCodeCatalog,Qi as derivePmBulkMutationEffect,_i as encodeReadOutputContinuationCursor,nn as enrichCliFlagInvocationContract,D as enrichCliFlagInvocationContracts,Lo as estimatePmOutputTokens,we as findPmNamespacedCommand,dt as formatPmPositionalActionFlagTip,yi as getActiveContextIntentContracts,R as hasSubcommandFlagContractsForCommand,jo as inferPmOutputBudgetClass,Uo as isGenericRefusalRequired,Ho as isGenericRefusalWhy,He as isPmExtensionCapabilityContract,Ve as isPmExtensionPolicyModeContract,Be as isPmExtensionPolicySurfaceContract,Ge as isPmExtensionServiceNameContract,Wi as isPmKnownExitCode,dn as isPmMutationReceipt,C as isPmSuccessfulExitCode,Ue as isPmToolAction,li as isReadOutputBudgetExceeded,di as isReadResultOmittedForBudget,fe as listCoreClosedDomainContracts,J as listPmCommandFlagBudgets,g as listPmFlagLexicon,bn as listPmFlagSpellingInventory,Ln as listTrackerPreflightRecoveryContracts,Mo as normalizeHistoryOperationForWrite,ni as normalizeReadOutputIncludeModeOptions,ln as parseMutationReceipt,On as parsePmAgentTaskTranscriptCorpus,_t as positionalShapeKey,ft as positionalSignatureKey,Bo as projectLeanRecoveryPayload,Do as projectPmDiagnosticOutput,qo as projectPmDiagnosticText,et as readFirstStringFromCommanderOptions,tt as readFirstValueFromCommanderOptions,mi as readOutputCollectionFingerprint,oi as readOutputIncludeModeOptions,Ko as readOutputRetainsTail,rt as readStringArrayFromCommanderOptions,In as renderPmClosedDomainHelp,ke as renderPmCommandAliasMigrationHint,Cn as renderPmFlagLexiconMarkdown,ko as requireHistoryOperation,tn as resolveCanonicalPmErrorCodeContract,bi as resolveContextIntentContract,Q as resolveExtensionFlagValueContract,Po as resolveHistoryOperation,Pe as resolvePmCommandAlias,F as resolvePmCommandExitContract,_ as resolvePmCommandOperation,No as resolvePmCommandOutputBudget,U as resolvePmCommandOutputEnvelope,ct as resolvePmCommandPositionalContract,Fo as resolvePmDiagnosticOutputBudget,rn as resolvePmErrorCodeContract,oe as resolvePmFlagSemanticConcept,$ as resolvePmHistoryOperation,_n as resolvePmMcpExecutableInvocation,at as resolvePmPositionalActionContract,Qr as resolvePmPositionalActionFlagContracts,Ii as resolvePmToolCustomFieldCollision,si as resolveReadOutputDimensions,pi as resolveReadOutputEncoding,Ei as resolveReadOutputRecoveryBudget,Zo as resolveReadOutputSurface,I as resolveSubcommandFlagContractsForCommand,hi as runWithContextIntentContracts,vn as scorePmRefusalClosure,Fn as scoreTrackerPreflightRecoveryClosure,ci as stabilizeReadOutputReceiptEstimates,Zr as toCompletionFlagString,ri as validateReadOutputOptions,sn as verifyCliFlagInvocationParity,mt as verifyExplicitPositionalSlotCensus,yt as verifyPmCliGrammar,gt as verifyPmCommandPositionalContracts,wn as verifyPmFlagLexicon,eo as verifyToolOptionCliParity,ht as withFlagAliasMetadata,Go as withoutGenericRefusalExamples};
|
|
4
|
+
`,stderr:""}}var f,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,t){if(t==="--limit")return"result-row-limit";if(t==="--node-limit")return"graph-node-limit";if(t==="--edge-limit")return"graph-edge-limit";if(t==="--output-limit")return"rendered-output-row-limit";if(t==="--output-budget")return"rendered-output-byte-budget";if(t==="--token-budget")return"context-intent-token-budget";if(t==="--full"){let i=re[_(e)];if(i===void 0)throw new Error(`Command ${e} exposes --full without a registered projection concept.`);return i}return t!=="--file"?t.slice(2):["create","update","update-many"].includes(_(e))?"linked-file-path":["comments","notes","learnings"].includes(_(e))?"entry-file-input":"plan-definition-file"}function g(){if(f!==void 0)return f;let t=q.filter(({command:o})=>R(o)).flatMap(({command:o,family:s})=>D(o,I(o)).map(a=>({command:o,family:s,concept:oe(o,a.flag),flag:a.flag,aliases:Object.freeze([...a.aliases??[]]),value_kind:a.repeatable?"list":a.flag==="--limit"?"number":a.value_type}))),i=new Set(t.flatMap(o=>o.aliases.map(s=>`${o.command}:${s}`))),n=t.filter(o=>!i.has(`${o.command}:${o.flag}`)),r=new Map;for(let o of n){let s=r.get(o.concept)??new Set;s.add(o.value_kind),r.set(o.concept,s)}return f=Object.freeze(n.map(o=>Object.freeze({...o,concept:r.get(o.concept)?.size===1?o.concept:`${o.concept}@${o.command}`}))),f}function Cn(){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:104,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:36,events:34,"history-attest":23,"history-redact":27,"history-repair":28,"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:32,notes:36,learnings:32,files:41,docs:32,deps:32,plan:111,test:58,"test-all":41,telemetry:21,stats:29,health:36,validate:46,assurance:30,gc:22,workspace:23,contracts:29,claim:40,release:25,"start-task":24,"pause-task":23,"close-task":24,meet:33,event:33,remind:29,"test-runs-worker":20}),ie=1,B=Object.freeze(Object.fromEntries(Object.entries({...V,...Object.fromEntries(O.flatMap(({alias:e,canonical:t})=>{let i=V[e];return i===void 0?[]:[[t,i]]}))}).map(([e,t])=>[e,t+ie])));function J(){let e=new Map(Object.keys(B).map(t=>[t,0]));for(let{command:t}of g())e.set(t,Number(e.get(t))+1);return Object.freeze(Object.entries(B).map(([t,i])=>Object.freeze({command:t,current:Number(e.get(t)),maximum:i})))}function ne(e,t,i){for(let n of e)for(let r of n.aliases){let o=t.get(`${n.command}:${r}`);o===void 0||o.flag===n.flag||i.push({code:"alias_collision",command:n.command,detail:`${r} aliases ${n.flag} but is canonical for ${o.flag}.`})}}function se(e,t,i){let n=new Set(t.map(({command:r})=>r));for(let r of e.keys())n.has(r)||i.push({code:"missing_budget",command:r,detail:`${r} has canonical flags but no persisted budget.`});for(let r of t){let o=e.get(r.command)??0;o===0&&i.push({code:"stale_budget",command:r.command,detail:`${r.command} has a persisted budget but no canonical flags.`}),!(o<=r.maximum)&&i.push({code:"budget_exceeded",command:r.command,detail:`${o} canonical flags exceed the ratcheted maximum ${r.maximum}.`})}}function ce(e,t,i){let n=new Map(e.map(r=>[`${r.command}:${r.flag}`,r]));for(let r of t){let o=`${r.command}:${r.canonical_flag}`,s=n.get(o);if(!s){i.push({code:"removed_canonical_spelling",command:r.command,detail:`${r.canonical_flag} disappeared from the executable spelling inventory.`});continue}let a=new Set([s.flag,...s.aliases]);for(let c of r.accepted_spellings)a.has(c)||i.push({code:"removed_compatibility_spelling",command:r.command,detail:`${c} no longer resolves to ${r.canonical_flag}.`})}}function Tn(e=g(),t=J(),i=[]){let n=[],r=new Map,o=new Map,s=new Map,a=new Map;for(let c of e){let d=`${c.command}:${c.flag}`;r.has(d)?n.push({code:"duplicate_canonical_flag",command:c.command,detail:`${c.flag} has more than one canonical row.`}):r.set(d,c),a.set(c.command,(a.get(c.command)??0)+1);let l=o.get(c.concept);l!==void 0&&l!==c.value_kind?n.push({code:"inconsistent_concept_kind",command:c.command,detail:`${c.concept} uses both ${l} and ${c.value_kind}.`}):o.set(c.concept,c.value_kind);let p=s.get(c.concept);p!==void 0&&p!==c.flag?n.push({code:"semantic_spelling_collision",command:c.command,detail:`${c.concept} is canonicalized by both ${p} and ${c.flag}.`}):s.set(c.concept,c.flag)}return ne(e,r,n),se(a,t,n),ce(e,i,n),n.sort((c,d)=>c.command.localeCompare(d.command)||c.code.localeCompare(d.code)||c.detail.localeCompare(d.detail)),{ok:n.length===0,entry_count:e.length,budget_count:t.length,concept_count:new Set(e.map(({concept:c})=>c)).size,baseline_entry_count:i.length,findings:n}}function Pn(){let e=g(),t=J(),i=new Map(t.map(({command:r})=>[r,"unknown"]));for(let{command:r,family:o}of e)i.set(r,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:r,current:o,maximum:s})=>{let a=i.get(r);return`| \`${r}\` | ${a} | ${o} | ${s} |`}),""].join(`
|
|
5
|
+
`)}var T=2,ae=["self_reported","independent_transport"];function y(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function m(e,t){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`${t} must be a non-empty string`);return e.trim()}function K(e,t,i=!1){if(!Array.isArray(e)||e.length===0)throw new TypeError(`${t} must be a non-empty string array`);return e.map((n,r)=>{let o=m(n,`${t}[${String(r)}]`);return i?n:o})}function P(e,t){return e===void 0?void 0:m(e,t)}function de(e,t){if(e===void 0)return;if(!y(e)||Object.keys(e).length===0)throw new TypeError(`${t} must be a non-empty object`);let i=Object.entries(e).map(([n,r])=>{if(n.length===0||n.split(".").some(o=>o.length===0))throw new TypeError(`${t} must use dot-separated own-property paths`);if(r!==null&&typeof r!="string"&&typeof r!="boolean"&&(typeof r!="number"||!Number.isFinite(r)))throw new TypeError(`${t} values must be JSON primitives`);return[n,r]});return Object.fromEntries(i)}function le(e,t,i,n,r,o){if(n==="refusal"){if(C(i)||r===void 0||o===void 0)throw new TypeError(`${e} refusal steps require a non-success exit, error code, and refusal surface`);return}if(r!==void 0||o!==void 0)throw new TypeError(`${e} only refusal steps may declare expected_error_code or expected_refusal_surface`);let s=N(t);if(s===void 0)throw new TypeError(`${e}.args must identify a command after global flags`);let a=t[s].trim().toLowerCase();if(a==="history"){let l=L(t.slice(s+1));l!==void 0&&(a=$(`history ${l}`))}let c=F(a);if(!C(i)||i!==0&&!c?.exit_codes.some(l=>l===i))throw new TypeError(`${e} successful output must use exit code 0 or a command-declared successful effect exit`);let d=U(a).kind;if(n!==d)throw new TypeError(`${e} expected ${n}, but ${a} declares ${d}`)}function pe(e,t,i){if(!y(e))throw new TypeError(`tasks.${t}.steps[${String(i)}] must be an object`);let n=`tasks.${t}.steps[${String(i)}]`,r=m(e.id,`${n}.id`),o=K(e.args,`${n}.args`,!0),s=e.expected_exit_code;if(typeof s!="number"||!Number.isSafeInteger(s))throw new TypeError(`${n}.expected_exit_code must be a safe integer`);let a=e.expected_output_kind;if(a!=="refusal"&&!z.includes(a))throw new TypeError(`${n}.expected_output_kind is unsupported`);let c=a,d=e.expected_accounting_mode;if(!ae.includes(d))throw new TypeError(`${n}.expected_accounting_mode is unsupported`);let l=d;if(l==="independent_transport"&&c!=="refusal")throw new TypeError(`${n} independent_transport accounting is supported only for refusal steps`);let p=K(e.required_fields,`${n}.required_fields`);if(p.some(W=>W.split(".").some(X=>X.length===0)))throw new TypeError(`${n}.required_fields must contain dot-separated own-property paths`);let M=de(e.expected_field_values,`${n}.expected_field_values`),h=P(e.expected_error_code,`${n}.expected_error_code`),x=P(e.expected_refusal_surface,`${n}.expected_refusal_surface`),E=P(e.recovery_for,`${n}.recovery_for`);return le(n,o,s,c,h,x),{id:r,args:o,expected_exit_code:s,expected_output_kind:c,expected_accounting_mode:l,required_fields:p,...M?{expected_field_values:M}:{},...h?{expected_error_code:h}:{},...x?{expected_refusal_surface:x}:{},...E?{recovery_for:E}:{}}}function ue(e,t){if(!y(e))throw new TypeError(`tasks[${String(t)}] must be an object`);let i=m(e.id,`tasks[${String(t)}].id`),n=m(e.description,`tasks.${i}.description`);if(!Array.isArray(e.steps)||e.steps.length===0)throw new TypeError(`tasks.${i}.steps must be a non-empty array`);let r=e.steps.map((s,a)=>pe(s,i,a)),o=new Map;for(let s of r){if(o.has(s.id))throw new TypeError(`tasks.${i} contains duplicate step id ${s.id}`);if(s.recovery_for!==void 0&&(o.get(s.recovery_for)?.expected_output_kind!=="refusal"||s.expected_output_kind==="refusal"))throw new TypeError(`tasks.${i}.${s.id} recovery_for must reference an earlier refusal and declare successful output`);o.set(s.id,s)}if(r.at(-1)?.expected_output_kind==="refusal")throw new TypeError(`tasks.${i} completed task must terminate with successful output`);for(let s of r)if(s.expected_output_kind==="refusal"&&!r.some(a=>a.recovery_for===s.id))throw new TypeError(`tasks.${i}.${s.id} refusal must have a later successful recovery_for step`);return{id:i,description:n,steps:r}}function Sn(e){if(!y(e))throw new TypeError("agent-task transcript corpus must be an object");if(e.version!==T)throw new TypeError(`agent-task transcript corpus version must be ${String(T)}`);if(!Array.isArray(e.tasks)||e.tasks.length===0)throw new TypeError("agent-task transcript corpus tasks must be non-empty");let t=e.tasks.map((n,r)=>ue(n,r)),i=new Set;for(let n of t){if(i.has(n.id))throw new TypeError(`duplicate agent-task transcript id ${n.id}`);i.add(n.id)}return{version:T,tasks:t}}function me(e){return[e.expected_error_code!==void 0&&e.error_code!==e.expected_error_code?{code:"error_code_mismatch",probe_id:e.probe_id,detail:`Expected error code ${e.expected_error_code}, received ${e.error_code??"<missing>"}.`}:void 0,e.expected_allowed_values!==void 0&&JSON.stringify([...e.allowed_values].sort())!==JSON.stringify([...e.expected_allowed_values].sort())?{code:"incomplete_allowed_values",probe_id:e.probe_id,detail:"The refusal's accepted domain differs from the SDK-owned domain contract."}:void 0,e.expected_suggested_retry_args!==void 0&&(e.suggested_retry_args?.length??0)===0?{code:"missing_suggested_retry_args",probe_id:e.probe_id,detail:"The refusal omitted shell-free suggested retry arguments."}:void 0,e.expected_suggested_retry_args!==void 0&&(e.suggested_retry_args?.length??0)>0&&JSON.stringify(e.suggested_retry_args)!==JSON.stringify(e.expected_suggested_retry_args)?{code:"suggested_retry_args_mismatch",probe_id:e.probe_id,detail:"The refusal's suggested retry arguments differ from the SDK-owned contract."}:void 0]}function _e(e){return[e.exit_code!==b.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 ${b.USAGE}.`}:void 0,e.allowed_values_required!==!1&&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."},...me(e)]}function An(e){let t=[],i=new Set,n=0;e.length===0&&t.push({code:"empty_corpus",probe_id:"corpus",detail:"At least one real refusal observation is required."});for(let r of e){if(i.has(r.probe_id)){t.push({code:"duplicate_probe",probe_id:r.probe_id,detail:`${r.probe_id} was supplied more than once.`});continue}i.add(r.probe_id);let o=t.length;for(let s of _e(r))s!==void 0&&t.push(s);t.length===o&&(n+=1)}return t.sort((r,o)=>r.probe_id!==o.probe_id?r.probe_id.localeCompare(o.probe_id):r.code.localeCompare(o.code)),{ok:t.length===0,probe_count:i.size,closed_probe_count:n,closure_fraction:i.size===0?0:n/i.size,findings:t}}var Y="not-a-declared-intent",u="not-a-declared-field";function fe(){let e={get:["pm-domain"],search:["Domain query"]},t=[...new Set(w.map(({command:o})=>o))].map(o=>{let s=w.filter(d=>d.command===o),a=s[0],c=e[a.command]??[];return{probe_id:`${a.command}-invalid-intent`,command:a.command,flag:"--for",rejected_value:Y,refusal_args:[a.command,...c,"--for",Y],allowed_values:s.map(({intent:d})=>d).sort(),suggested_retry_args:[a.command,...c,"--for",a.intent],error_code:"unknown_context_intent"}}),i=v(),n=Object.keys(S).map(o=>({probe_id:`${o}-invalid-field`,command:o,flag:"--fields",rejected_value:u,refusal_args:[o,"--fields",u],allowed_values:i,suggested_retry_args:[o,"--fields","id,title,status"],error_code:"unknown_field_projection"}));return[...t,...n,{probe_id:"get-invalid-field",command:"get",flag:"--fields",rejected_value:u,refusal_args:["get","pm-domain","--fields",u],allowed_values:j(),suggested_retry_args:["get","pm-domain","--fields","id,title,status"],error_code:"unknown_field_projection"},{probe_id:"list-mutually-exclusive-projection",command:"list",flag:"--projection",rejected_value:"--brief+--full",refusal_args:["list","--brief","--full"],allowed_values:[],suggested_retry_args:["list","--brief"],error_code:"projection_options_mutually_exclusive",allowed_values_required:!1},{probe_id:"get-mutually-exclusive-projection",command:"get",flag:"--projection",rejected_value:"--full+--fields",refusal_args:["get","pm-domain","--full","--fields","id"],allowed_values:[],suggested_retry_args:["get","pm-domain","--full"],error_code:"projection_options_mutually_exclusive",allowed_values_required:!1},{probe_id:"search-mutually-exclusive-projection",command:"search",flag:"--projection",rejected_value:"--full+--fields",refusal_args:["search","Domain query","--full","--fields","id"],allowed_values:[],suggested_retry_args:["search","Domain query","--full"],error_code:"projection_options_mutually_exclusive",allowed_values_required:!1},{probe_id:"package-upgrade-mutually-exclusive-modes",command:"package upgrade",flag:"--cli-only/--packages-only",rejected_value:"--cli-only+--packages-only",refusal_args:["package","upgrade","--cli-only","--packages-only","--dry-run"],allowed_values:[],suggested_retry_args:["package","upgrade","--packages-only","--dry-run"],error_code:"package_upgrade_modes_mutually_exclusive",allowed_values_required:!1},{probe_id:"search-invalid-field",command:"search",flag:"--fields",rejected_value:u,refusal_args:["search","Domain query","--fields",u],allowed_values:A(),suggested_retry_args:["search","Domain query","--fields","id,title,status,score"],error_code:"unknown_field_projection"}].sort((o,s)=>o.probe_id.localeCompare(s.probe_id))}function Ln(e,t){let i=fe().find(o=>o.command===e&&o.flag===t);if(!i)return"No stable core values are declared.";let n=i.allowed_values.filter(o=>!o.startsWith("item.")),r=t==="--fields"?" item.<field> aliases and configured runtime metadata fields are also accepted.":" Configured package and workspace intents may extend this domain.";return`Allowed core values: ${n.join("|")}.${r}`}var k=[{probe_id:"tracker-root-missing",failure_kind:"missing_root",expected_error_code:"tracker_root_missing",expected_exit_code:3,recovery_kind:"initialize"},{probe_id:"tracker-root-settings-missing",failure_kind:"settings_missing",expected_error_code:"tracker_not_initialized",expected_exit_code:3,recovery_kind:"initialize"},{probe_id:"tracker-root-not-directory",failure_kind:"not_directory",expected_error_code:"tracker_root_not_directory",expected_exit_code:2,recovery_kind:"select_directory"},{probe_id:"tracker-root-unreadable",failure_kind:"unreadable_root",expected_error_code:"tracker_root_unreadable",expected_exit_code:1,recovery_kind:"repair_permissions"}];function Dn(){return k.map(e=>({...e}))}function ge(e,t){let i=[];t.error_code!==e.expected_error_code&&i.push({code:"error_code_mismatch",probe_id:e.probe_id,detail:`Expected ${e.expected_error_code}, received ${t.error_code}.`}),t.exit_code!==e.expected_exit_code&&i.push({code:"exit_code_mismatch",probe_id:e.probe_id,detail:`Expected exit ${e.expected_exit_code}, received ${t.exit_code}.`}),t.recovery_kind!==e.recovery_kind&&i.push({code:"recovery_kind_mismatch",probe_id:e.probe_id,detail:`Expected ${e.recovery_kind}, received ${t.recovery_kind}.`});let n=t.suggested_retry_args.indexOf("init"),r=n===0||n===2&&t.suggested_retry_args[0]==="--pm-path"&&t.suggested_retry_args[1]?.length>0;return e.recovery_kind==="initialize"&&!r&&i.push({code:"missing_init_recovery",probe_id:e.probe_id,detail:"Missing and uninitialized roots must emit a tokenized init retry."}),(t.unsafe_init_recommended||e.recovery_kind!=="initialize"&&t.suggested_retry_args.includes("init"))&&i.push({code:"unsafe_init_recovery",probe_id:e.probe_id,detail:"A tracker root that cannot be initialized safely must not recommend initialization."}),t.retry_succeeded||i.push({code:"retry_failed",probe_id:e.probe_id,detail:"The emitted retry or safe alternate-root recovery did not execute successfully."}),i}function qn(e){let t=new Map(e.map(r=>[r.probe_id,r])),i=[],n=0;for(let r of k){let o=t.get(r.probe_id);if(o===void 0){i.push({code:"missing_probe",probe_id:r.probe_id,detail:"No runtime observation was supplied for this contract."});continue}let s=ge(r,o);i.push(...s),s.length===0&&(n+=1)}return i.sort((r,o)=>r.probe_id.localeCompare(o.probe_id)||r.code.localeCompare(o.code)),{ok:i.length===0,probe_count:k.length,closed_probe_count:n,findings:i}}export{Ze as ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,Dr as ACTIVITY_FLAG_CONTRACTS,Tt as AGGREGATE_FLAG_CONTRACTS,dr as APPEND_FLAG_CONTRACTS,$r as ASSURANCE_FLAG_CONTRACTS,We as CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS,Fr as CALENDAR_FLAG_CONTRACTS,lr as CLAIM_FLAG_CONTRACTS,Di as CLOSE_ACTION_OPTION_KEYS,cr as CLOSE_FLAG_CONTRACTS,ar as CLOSE_MANY_FLAG_CONTRACTS,gr as CLOSE_TASK_FLAG_CONTRACTS,Pt as COMMENTS_FLAG_CONTRACTS,Xr as COMPLETION_FLAG_CONTRACTS,Dt as CONFIG_FLAG_CONTRACTS,Xe as CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS,zr as CONTEXT_FLAG_CONTRACTS,hi as CONTEXT_INTENT_LIMIT_OVERRIDE_WARNING,Wr as CONTRACTS_FLAG_CONTRACTS,Rr as COPY_FLAG_CONTRACTS,Si as CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,ji as CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,vi as CREATE_COMMANDER_STRING_OPTION_CONTRACTS,Sr as CREATE_FLAG_CONTRACTS,ur as DELETE_FLAG_CONTRACTS,Gr as DEPS_FLAG_CONTRACTS,Ot as DOCS_FLAG_CONTRACTS,Mr as DUPLICATES_FLAG_CONTRACTS,Br as EVAL_FLAG_CONTRACTS,qr as EVENTS_FLAG_CONTRACTS,hr as EVENT_FLAG_CONTRACTS,Te as EXECUTABLE_COMMAND_ALIASES,Wt as EXTENSION_ACTIVATE_FLAG_CONTRACTS,Yt as EXTENSION_ADOPT_ALL_FLAG_CONTRACTS,or as EXTENSION_ADOPT_FLAG_CONTRACTS,rr as EXTENSION_CATALOG_FLAG_CONTRACTS,Xt as EXTENSION_DEACTIVATE_FLAG_CONTRACTS,Kt as EXTENSION_DESCRIBE_FLAG_CONTRACTS,tr as EXTENSION_DOCTOR_FLAG_CONTRACTS,Jt as EXTENSION_EXPLORE_FLAG_CONTRACTS,qt as EXTENSION_FLAG_CONTRACTS,Ut as EXTENSION_INIT_FLAG_CONTRACTS,Vt as EXTENSION_INSTALL_FLAG_CONTRACTS,Zt as EXTENSION_MANAGE_FLAG_CONTRACTS,Qt as EXTENSION_MIGRATE_FLAG_CONTRACTS,er as EXTENSION_RELOAD_FLAG_CONTRACTS,zt as EXTENSION_SCOPE_FLAG_CONTRACTS,Bt as EXTENSION_UNINSTALL_FLAG_CONTRACTS,Et as FILES_FLAG_CONTRACTS,Ir as FOCUS_FLAG_CONTRACTS,Pr as GC_FLAG_CONTRACTS,Ur as GET_FLAG_CONTRACTS,wt as GLOBAL_FLAG_CONTRACTS,Vr as GRAPH_FLAG_CONTRACTS,ot as GRAPH_QUERY_DEFAULTS,Hr as GUIDE_FLAG_CONTRACTS,Er as HEALTH_FLAG_CONTRACTS,At as HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS,Rt as HISTORY_COMPACT_FLAG_CONTRACTS,$t as HISTORY_FLAG_CONTRACTS,vt as HISTORY_REDACT_FLAG_CONTRACTS,jt as HISTORY_REPAIR_FLAG_CONTRACTS,Ft as INIT_FLAG_CONTRACTS,ir as INSTALL_FLAG_CONTRACTS,jr as ITEM_COMPLETE_FLAG_CONTRACTS,vr as ITEM_MUTATE_FLAG_CONTRACTS,Ar as ITEM_REOPEN_FLAG_CONTRACTS,Mt as LEARNINGS_FLAG_CONTRACTS,Ke as LIST_COMMANDER_STRING_OPTION_CONTRACTS,Ct as LIST_FILTER_FLAG_CONTRACTS,yr as MEET_FLAG_CONTRACTS,St as MERGE_FLAG_CONTRACTS,Ae as MERGE_SUBCOMMAND_VALUES,Qe as NEXT_COMMANDER_STRING_OPTION_CONTRACTS,Kr as NEXT_FLAG_CONTRACTS,kt as NOTES_FLAG_CONTRACTS,Ht as PACKAGE_FLAG_CONTRACTS,Gt as PACKAGE_INIT_FLAG_CONTRACTS,fr as PAUSE_TASK_FLAG_CONTRACTS,Fi as PLAN_CREATE_METADATA_PARAMETER_KEYS,Lt as PLAN_FLAG_CONTRACTS,ae as PM_AGENT_TASK_ACCOUNTING_MODES,T as PM_AGENT_TASK_TRANSCRIPT_VERSION,xe as PM_BULK_LIFECYCLE_COMMAND_ALIASES,ut as PM_CLI_GRAMMAR_CONTRACT,it as PM_CLI_GRAMMAR_NOUNS,Le as PM_CLI_ONLY_TOOL_ACTION_WAIVERS,nt as PM_CLI_SHARED_VERBS,Ce as PM_COMMAND_ALIAS_CONTRACTS,lt as PM_COMMAND_DESTINATION_CONTRACTS,Wi as PM_COMMAND_EXIT_CONTRACTS,Yi as PM_COMMAND_EXIT_OUTCOME_CONTRACTS,Io as PM_COMMAND_OUTPUT_BUDGET_CONTRACTS,ln as PM_COMMAND_OUTPUT_ENVELOPE_CONTRACTS,pt as PM_COMMAND_POSITIONAL_CONTRACTS,w as PM_CONTEXT_INTENT_CONTRACTS,he as PM_CONTEXT_OPS_COMMAND_ALIASES,je as PM_CORE_COMMAND_NAMES,De as PM_DEPRECATED_TOOL_ACTIONS,So as PM_DIAGNOSTIC_DEGRADATION_STEPS,vo as PM_DIAGNOSTIC_OUTPUT_BUDGET_CONTRACTS,$o as PM_DIAGNOSTIC_OUTPUT_CLASSES,qe as PM_DISCOVERABLE_TOOL_ACTIONS,sn as PM_ERROR_CODE_CATALOG,tn as PM_ERROR_CODE_EXIT_CLASS_CONTRACTS,Me as PM_EXTENSION_CAPABILITY_CONTRACTS,Re as PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS,Oe as PM_EXTENSION_POLICY_MODE_CONTRACTS,ve as PM_EXTENSION_POLICY_SURFACE_CONTRACTS,Se as PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS,Ee as PM_EXTENSION_SERVICE_NAME_CONTRACTS,$e as PM_EXTENSION_TRUST_MODE_CONTRACTS,zo as PM_GENERIC_REFUSAL_GUIDANCE,mn as PM_HISTORY_ATTESTATION_CONTRACT,ye as PM_HISTORY_COMMAND_ALIASES,wo as PM_HISTORY_OPERATION_ALIASES,To as PM_HISTORY_OPERATION_CONTRACT,Co as PM_HISTORY_OPERATION_PATTERNS,Ne as PM_ITEM_ACTION_SUBCOMMANDS,xo as PM_ITEM_HISTORY_OPERATIONS,O as PM_NAMESPACED_COMMAND_ALIASES,Oo as PM_OUTPUT_BUDGET_CLASSES,Eo as PM_OUTPUT_DEGRADATION_STEPS,z as PM_OUTPUT_ENVELOPE_KINDS,Ie as PM_PACKAGE_ONLY_ACTION_SUBCOMMANDS,st as PM_POSITIONAL_ACTION_CONTRACTS,Bi as PM_PROVIDER_TOOL_PARAMETERS_SCHEMA,Gi as PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION,Xo as PM_READ_OUTPUT_COMPOSITION_OPTION_FLAGS,_i as PM_READ_OUTPUT_CONTINUATION_FINGERPRINT_POLICIES,Yo as PM_READ_OUTPUT_DIMENSIONS,Wo as PM_READ_OUTPUT_OPTION_FLAGS,Je as PM_READ_OUTPUT_SURFACES,Qo as PM_READ_OUTPUT_SURFACE_CONTRACTS,Jo as PM_READ_OUTPUT_TAIL_RETENTION_POLICIES,Vo as PM_RECOVERY_ECHO_FIELDS,be as PM_RELOCATED_COMMAND_ALIASES,Xi as PM_SUCCESS_EXIT_CODES,Fe as PM_TOOL_ACTIONS,qi as PM_TOOL_ACTION_PARAMETER_CONTRACTS,Vi as PM_TOOL_PARAMETERS_SCHEMA,Hi as PM_TOOL_PARAMETERS_SCHEMA_MAJOR,Ui as PM_TOOL_PARAMETERS_SCHEMA_VERSION,Ni as PM_TOOL_RESERVED_CUSTOM_FIELD_PROPERTIES,bo as PM_WORKSPACE_HISTORY_OPERATIONS,Nt as PROFILE_FLAG_CONTRACTS,ti as READ_OUTPUT_MUTATION_CONFLICT_CODE,ri as READ_OUTPUT_SHAPING_CONTROL_FLAGS,ei as READ_OUTPUT_SURFACE_UNSUPPORTED_CODE,sr as REINDEX_FLAG_CONTRACTS,mr as RELEASE_FLAG_CONTRACTS,xr as REMIND_FLAG_CONTRACTS,pr as RESTORE_FLAG_CONTRACTS,It as SCHEMA_FLAG_CONTRACTS,Ye as SEARCH_COMMANDER_STRING_OPTION_CONTRACTS,Yr as SEARCH_FLAG_CONTRACTS,_r as START_TASK_FLAG_CONTRACTS,kr as STATS_FLAG_CONTRACTS,bt as SUBCOMMAND_GLOBAL_FLAG_CONTRACTS,Cr as TELEMETRY_FLAG_CONTRACTS,wr as TEST_ALL_FLAG_CONTRACTS,br as TEST_FLAG_CONTRACTS,Tr as TEST_RUNS_FLAG_CONTRACTS,fo as TOOL_ACTIVITY_OPTION_CONTRACTS,ro as TOOL_AGGREGATE_OPTION_CONTRACTS,po as TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACT_SOURCE,_o as TOOL_CALENDAR_OPTION_CONTRACTS,mo as TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS,go as TOOL_CONTEXT_OPTION_CONTRACTS,co as TOOL_CREATE_OPTION_CONTRACTS,so as TOOL_CREATE_OPTION_CONTRACT_SOURCE,yo as TOOL_DEPS_OPTION_CONTRACTS,ho as TOOL_GRAPH_OPTION_CONTRACTS,to as TOOL_LIST_FILTER_OPTION_CONTRACTS,oo as TOOL_SEARCH_FILTER_OPTION_CONTRACTS,no as TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS,io as TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACT_SOURCE,uo as TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS,lo as TOOL_UPDATE_OPTION_CONTRACTS,ao as TOOL_UPDATE_OPTION_CONTRACT_SOURCE,Ai as UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,Ii as UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,Ri as UPDATE_COMMANDER_STRING_OPTION_CONTRACTS,Nr as UPDATE_FLAG_CONTRACTS,Lr as UPDATE_MANY_FLAG_CONTRACTS,nr as UPGRADE_FLAG_CONTRACTS,Or as VALIDATE_FLAG_CONTRACTS,Jr as WORKSPACE_FLAG_CONTRACTS,Ji as _testOnlyCliContracts,Zi as analyzePmCommandExitConformance,ze as analyzePmToolActionParity,Ki as analyzeSdkCliParameterCompleteness,oi as annotationPositionalMutationOptions,Ti as applyContextIntentProjection,li as applyReadOutputDimensions,si as applyReadOutputIncludeModes,Mi as attachContextIntentReceipt,Oi as attachOutputTokenAccounting,Ei as attachReadOutputContracts,zi as buildPmActionToolInputSchema,xt as compactFlagAliasContracts,wi as composeContextIntentContracts,ki as contextIntentRowId,Ao as createPmCommandOutputBudget,Pi as decodeContextIntentCursor,yi as decodeReadOutputContinuationCursor,Ro as definePmCommandOutputBudget,dn as definePmCommandOutputEnvelope,rn as definePmErrorCodeCatalog,en as derivePmBulkMutationEffect,gi as encodeReadOutputContinuationCursor,cn as enrichCliFlagInvocationContract,D as enrichCliFlagInvocationContracts,Lo as estimatePmOutputTokens,we as findPmNamespacedCommand,dt as formatPmPositionalActionFlagTip,xi as getActiveContextIntentContracts,R as hasSubcommandFlagContractsForCommand,jo as inferPmOutputBudgetClass,Uo as isGenericRefusalRequired,Ho as isGenericRefusalWhy,He as isPmExtensionCapabilityContract,Ve as isPmExtensionPolicyModeContract,Be as isPmExtensionPolicySurfaceContract,Ge as isPmExtensionServiceNameContract,Qi as isPmKnownExitCode,pn as isPmMutationReceipt,C as isPmSuccessfulExitCode,Ue as isPmToolAction,ui as isReadOutputBudgetExceeded,pi as isReadResultOmittedForBudget,fe as listCoreClosedDomainContracts,J as listPmCommandFlagBudgets,g as listPmFlagLexicon,Cn as listPmFlagSpellingInventory,Dn as listTrackerPreflightRecoveryContracts,Mo as normalizeHistoryOperationForWrite,ci as normalizeReadOutputIncludeModeOptions,un as parseMutationReceipt,Sn as parsePmAgentTaskTranscriptCorpus,_t as positionalShapeKey,ft as positionalSignatureKey,Bo as projectLeanRecoveryPayload,Do as projectPmDiagnosticOutput,qo as projectPmDiagnosticText,et as readFirstStringFromCommanderOptions,tt as readFirstValueFromCommanderOptions,fi as readOutputCollectionFingerprint,ni as readOutputIncludeModeOptions,Ko as readOutputRetainsTail,rt as readStringArrayFromCommanderOptions,Ln as renderPmClosedDomainHelp,ke as renderPmCommandAliasMigrationHint,Pn as renderPmFlagLexiconMarkdown,ko as requireHistoryOperation,on as resolveCanonicalPmErrorCodeContract,Ci as resolveContextIntentContract,Q as resolveExtensionFlagValueContract,Po as resolveHistoryOperation,Pe as resolvePmCommandAlias,F as resolvePmCommandExitContract,_ as resolvePmCommandOperation,No as resolvePmCommandOutputBudget,U as resolvePmCommandOutputEnvelope,ct as resolvePmCommandPositionalContract,Fo as resolvePmDiagnosticOutputBudget,nn as resolvePmErrorCodeContract,oe as resolvePmFlagSemanticConcept,$ as resolvePmHistoryOperation,gn as resolvePmMcpExecutableInvocation,at as resolvePmPositionalActionContract,Qr as resolvePmPositionalActionFlagContracts,Li as resolvePmToolCustomFieldCollision,ai as resolveReadOutputDimensions,mi as resolveReadOutputEncoding,$i as resolveReadOutputRecoveryBudget,Zo as resolveReadOutputSurface,I as resolveSubcommandFlagContractsForCommand,bi as runWithContextIntentContracts,An as scorePmRefusalClosure,qn as scoreTrackerPreflightRecoveryClosure,di as stabilizeReadOutputReceiptEstimates,Zr as toCompletionFlagString,ii as validateReadOutputOptions,an as verifyCliFlagInvocationParity,mt as verifyExplicitPositionalSlotCensus,yt as verifyPmCliGrammar,gt as verifyPmCommandPositionalContracts,Tn as verifyPmFlagLexicon,eo as verifyToolOptionCliParity,ht as withFlagAliasMetadata,Go as withoutGenericRefusalExamples};
|
|
6
6
|
//# sourceMappingURL=sdk-contracts.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{A as We,B as ke,C as Ye,D as Xe,E as we,F as Ke,G as je,H as qe,I as Je,J as Qe,K as Ze,L as $e,O as et,b as Ie,c as _e,d as Te,e as Re,f as Oe,g as ge,h as Ce,i as Ne,j as Pe,k as xe,l as fe,m as De,n as ve,o as Ue,p as ye,q as Le,r as Me,s as Ve,t as Fe,u as he,v as ze,w as Be,x as be,y as He,z as Ge}from"./focused-chunks/chunk-
|
|
1
|
+
import{A as We,B as ke,C as Ye,D as Xe,E as we,F as Ke,G as je,H as qe,I as Je,J as Qe,K as Ze,L as $e,O as et,b as Ie,c as _e,d as Te,e as Re,f as Oe,g as ge,h as Ce,i as Ne,j as Pe,k as xe,l as fe,m as De,n as ve,o as Ue,p as ye,q as Le,r as Me,s as Ve,t as Fe,u as he,v as ze,w as Be,x as be,y as He,z as Ge}from"./focused-chunks/chunk-3GT4A3ZN.js";import"./focused-chunks/chunk-24VRBNKE.js";import"./focused-chunks/chunk-REFMQY47.js";import{oa as Ee,pa as pe}from"./focused-chunks/chunk-B6BNHKUW.js";import"./focused-chunks/chunk-IIP6LZ5E.js";import"./focused-chunks/chunk-3ELVASVA.js";import"./focused-chunks/chunk-XDBHD4CY.js";import"./focused-chunks/chunk-RIE3SJSE.js";import"./focused-chunks/chunk-AIDL2ZNT.js";import"./focused-chunks/chunk-UVTUX54T.js";import"./focused-chunks/chunk-46MP7IZN.js";import"./focused-chunks/chunk-C7WHWI7K.js";import"./focused-chunks/chunk-K53OIT5J.js";import{a as me}from"./focused-chunks/chunk-RLO2HCZT.js";import"./focused-chunks/chunk-3OCDKITJ.js";import"./focused-chunks/chunk-OZOCEB2Q.js";import"./focused-chunks/chunk-Z7W2RQIB.js";import{k as ue,l as de,m as ce,n as le,o as Ae,p as Se}from"./focused-chunks/chunk-Q2HY44LV.js";import"./focused-chunks/chunk-EUQGZPGO.js";import"./focused-chunks/chunk-GXP7Q4XM.js";import"./focused-chunks/chunk-FDZPRJXJ.js";import"./focused-chunks/chunk-LMFIAQ2V.js";import"./focused-chunks/chunk-YD66IRSL.js";import"./focused-chunks/chunk-LMU7DDOA.js";import"./focused-chunks/chunk-BKPUUW5O.js";import{U as oe,V as ne,W as ie,X as se,Y as ae,j as re}from"./focused-chunks/chunk-5LDBS6MS.js";import"./focused-chunks/chunk-HL47UQZJ.js";import"./focused-chunks/chunk-BWOVFE5B.js";import"./focused-chunks/chunk-X6CXWWNB.js";import{Ab as d,Ac as V,Af as j,Bb as c,Bc as F,Cb as l,Cc as h,Eb as A,Ub as S,Vb as I,Wb as _,Xb as T,Yb as R,Zb as O,ef as z,ff as B,gf as b,hf as H,hg as q,if as G,ig as J,nf as W,ng as Q,oc as g,pc as C,pg as Z,qc as N,qg as $,rc as P,rf as k,rg as ee,sc as x,sg as te,tc as f,tf as Y,uc as D,vc as v,vf as X,wc as U,wf as w,xb as p,xc as y,yb as u,yc as L,zc as M,zf as K}from"./focused-chunks/chunk-SMMOZ3H3.js";import{t as E}from"./focused-chunks/chunk-3Z7MCUJM.js";import{a as e,b as t,c as r,h as o,j as n,k as i,l as s}from"./focused-chunks/chunk-RIQUIHYU.js";import{A as m,z as a}from"./focused-chunks/chunk-A6VEMCRR.js";export{g as AGENT_PROVENANCE_DIMENSIONS,p as BASELINE_ITEM_FORMAT_VERSION,N as BUILTIN_AGENT_PROVENANCE_ADAPTERS,C as BUILTIN_HARNESS_SIGNAL_DESCRIPTORS,e as BUILTIN_ITEM_TYPE_VALUES,s as CONFIDENCE_TEXT_VALUES,u as CURRENT_ITEM_FORMAT_VERSION,o as DEPENDENCY_KIND_VALUES,a as EXIT_CODE,i as ISSUE_SEVERITY_VALUES,t as ITEM_TYPE_VALUES,ne as PM_CLI_EXPECTED_ERROR_NAME,b as PM_READ_OUTPUT_COMPOSITION_OPTION_FLAGS,z as PM_READ_OUTPUT_DIMENSIONS,B as PM_READ_OUTPUT_OPTION_FLAGS,H as PM_READ_OUTPUT_SURFACE_CONTRACTS,m as PmCliError,xe as PmClient,n as RISK_VALUES,Ae as SEMANTIC_ATTRIBUTION_LIMITS,r as STATUS_VALUES,O as agentSessionEnvironment,Me as aggregate,Te as analyzeAgentProvenanceDescriptorCoverage,me as analyzeSdkCliParameterCompleteness,We as append,Y as applyReadOutputDimensions,$ as applyReadOutputSessionReferences,J as assertWellFormedOutputText,ee as attachReadOutputSessionReceipt,_ as boundAgentEpisodeIdentity,I as canonicalDocument,Ke as claim,je as claimNext,l as classifyItemFormatVersion,we as close,Ve as comments,fe as context,Je as copy,ke as create,se as createPmCliExpectedError,j as decodeReadOutputContinuationCursor,Qe as deleteItem,He as deps,y as detectAgentIdentity,F as detectHarnessIdentity,L as diagnoseAgentIdentity,be as docs,d as effectiveItemFormatVersion,Pe as emptyImportedDocument,K as encodeReadOutputContinuationCursor,ge as evaluateSemanticAttributionCoverage,pe as explainSourceTraceability,ze as files,Be as filesDiscover,$e as focus,ye as get,Ge as graph,Ce as groupHistoryByEpisode,Ie as isAlreadyClaimedError,ie as isItemAlreadyExistsError,ae as isPmCliExpectedError,oe as isPmTokenBudgetRecovery,X as isReadOutputBudgetExceeded,Q as isReadOutputSessionReference,he as learnings,De as list,x as listAgentProvenanceAdapters,ve as listAllComplete,Le as next,D as normalizeAgentProvenanceAdapterValue,c as normalizeItemFormatVersion,re as normalizeItemId,A as normalizeStatusInput,Fe as notes,E as nowIso,Z as parseReadOutputSession,Ee as parseSourceLineRange,M as readAuthorEnvironment,te as readOutputSessionRemainingTokens,de as recordClaimSemanticAttribution,le as recordFocusSemanticAttribution,ce as recordReleaseSemanticAttribution,f as registerAgentProvenanceAdapters,P as registerHarnessSignalDescriptors,qe as release,Xe as reopen,T as resolveAgentSessionContextFromSignals,h as resolveAuthorIdentity,_e as resolveHistoryEpisodeGroupIdentity,k as resolveReadOutputDimensions,w as resolveReadOutputEncoding,G as resolveReadOutputSurface,ue as resolveSemanticLineageIds,Ze as restore,et as runAction,R as runWithAgentSessionContext,v as runWithHarnessDetectionSignals,U as runWithWorkspaceHarnessSignalDescriptors,Ue as search,Se as semanticAttributionAffinity,S as serializeItemDocument,Re as summarizeAgentModelProvenance,Oe as summarizeAgentProvenance,q as toWellFormedText,Ye as update,Ne as updateLinkedTest,W as validateReadOutputOptions,V as writeAuthorEnvironment};
|
|
2
2
|
//# sourceMappingURL=sdk-core.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{$a as Lt,Aa as qt,Ba as Mt,Ca as Nt,Da as jt,E as ot,Ea as Rt,F as at,Fa as Jt,Fb as Qt,G as st,Gb as Vt,H as ft,Hb as Xt,I as pt,Ib as Yt,Jb as Zt,Kb as $t,Lb as er,Mb as tr,Nb as rr,Ob as ir,Pb as nr,Qb as y,Rb as or,Sb as ar,Tb as sr,Ub as fr,Vb as pr,Wb as cr,Xa as Ft,Xb as dr,Yb as _,a as je,ab as Pt,b as Re,ba as ct,bb as Ut,c as Je,ca as dt,cb as Wt,d as Fe,da as mt,db as Bt,e as Le,ea as lt,eb as Ct,f as Pe,fa as ut,fb as Gt,g as Ue,ga as gt,gb as Ht,h as We,ha as wt,hb as Kt,i as Be,ia as ht,j as Ce,ja as xt,k as Ge,l as He,m as Ke,n as Qe,o as Ve,p as Xe,q as Ye,r as Ze,s as $e,t as et,ta as Tt,u as tt,ua as It,v as rt,va as kt,w as it,wa as At,x as nt,xa as Ot,ya as zt,za as Dt}from"./focused-chunks/chunk-ZHWPCVQL.js";import"./focused-chunks/chunk-O7Z73ALG.js";import"./focused-chunks/chunk-Y2ESLKCF.js";import"./focused-chunks/chunk-RIE3SJSE.js";import"./focused-chunks/chunk-XYPEZGTR.js";import"./focused-chunks/chunk-6LKTEKHS.js";import{a as Ne}from"./focused-chunks/chunk-K53OIT5J.js";import"./focused-chunks/chunk-QQIIMMFU.js";import{B as W,C as B,D as C,E as G,F as H,G as K,K as Q,L as V,M as X,N as Y,O as Z,P as $,Q as ee,R as te}from"./focused-chunks/chunk-IROZDIDX.js";import"./focused-chunks/chunk-I66IKYKP.js";import{A as yt,B as _t,C as Et,D as vt,E as bt,F as St}from"./focused-chunks/chunk-OXOCZJC6.js";import"./focused-chunks/chunk-6LPXMFLM.js";import{Ab as Te,Bb as Ie,Cb as ke,Db as Ae,Eb as Oe,Fb as ze,Gb as De,Hb as qe,Ib as Me,db as ie,eb as ne,fb as oe,gb as ae,hb as se,ib as fe,jb as pe,kb as ce,lb as de,mb as me,nb as le,ob as ue,pb as ge,qb as we,sb as he,tb as xe,ub as ye,vb as _e,wb as Ee,xb as ve,yb as be,zb as Se}from"./focused-chunks/chunk-UFTUNBMY.js";import"./focused-chunks/chunk-IR2J3NOT.js";import"./focused-chunks/chunk-ITKDHSBR.js";import"./focused-chunks/chunk-QLAHEDT6.js";import"./focused-chunks/chunk-BKPUUW5O.js";import{s as re}from"./focused-chunks/chunk-OTMMOKPM.js";import"./focused-chunks/chunk-HMDQDRV2.js";import"./focused-chunks/chunk-BWOVFE5B.js";import"./focused-chunks/chunk-X6CXWWNB.js";import{Ac as F,Bc as L,Cc as P,Dc as U,Hc as h,Ka as T,La as I,Ma as k,Na as A,Oa as O,Pa as z,Qa as D,Ra as q,Sa as M,Ta as N,Ua as j,Vb as R,zc as J}from"./focused-chunks/chunk-Z2X7HH3C.js";import"./focused-chunks/chunk-IIP6LZ5E.js";import"./focused-chunks/chunk-AIDL2ZNT.js";import"./focused-chunks/chunk-A6VEMCRR.js";function m(e){if(typeof e!="string"||!h(e))throw new TypeError("Invalid reliability timestamp.");return Date.parse(e)}function E(e){let o=m(e.window_start),t=m(e.window_end);if(o>=t||!Number.isFinite(e.max_failure_rate)||e.max_failure_rate<0||e.max_failure_rate>=1||!Number.isSafeInteger(e.min_completed_attempts)||e.min_completed_attempts<1)throw new TypeError("Invalid reliability window policy.");if(e.families.length===0||e.families.some(r=>typeof r!="string"||r.trim().length===0)||new Set(e.families).size!==e.families.length)throw new TypeError("Expected unique, nonempty reliability families.");return{start:o,end:t}}function v(e,o,t,r){let a=new Map(o.map(i=>[i,[]])),c=new Set;for(let i of e){if(typeof i.id!="string"||i.id.trim().length===0||c.has(i.id))throw new TypeError("Invalid or duplicate reliability attempt identity.");c.add(i.id);let p=a.get(i.family);if(!p||!["success","failure","pending"].includes(i.outcome)||i.cause!==void 0&&(!["product","infrastructure","unknown"].includes(i.cause)||i.outcome!=="failure"))throw new TypeError("Invalid reliability attempt family, outcome or cause.");let f=m(i.started_at);if(i.repaired_at!==void 0&&(m(i.repaired_at)<f||i.outcome!=="failure"))throw new TypeError("Invalid reliability repair chronology.");f>=t&&f<r&&p.push(i)}return a}function lr(e,o){let{start:t,end:r}=E(o),c=[...v(e,o.families,t,r)].map(([i,p])=>{let f=p.filter(s=>s.outcome==="failure"),n=p.filter(s=>s.outcome!=="pending").length,l=n===0?null:f.length/n,u=f.filter(s=>s.repaired_at!==void 0&&m(s.repaired_at)<r),g={product:0,infrastructure:0,unknown:0};for(let s of f)g[s.cause??"unknown"]+=1;let d=[];return n<o.min_completed_attempts&&d.push("insufficient_completed_attempts"),l!==null&&l>o.max_failure_rate&&d.push("failure_rate"),{family:i,attempts:p.length,completed:n,failed:f.length,pending:p.length-n,failure_rate:l,affected_days:[...new Set(f.map(s=>new Date(m(s.started_at)).toISOString().slice(0,10)))].sort(),repair_minutes:u.map(s=>(m(s.repaired_at)-m(s.started_at))/6e4).sort((s,x)=>s-x),unresolved:f.length-u.length,causes:g,violations:d,ok:d.length===0}});return{schema:"pm-reliability-window/1",window_start:new Date(t).toISOString(),window_end:new Date(r).toISOString(),ok:c.every(i=>i.ok),families:c}}function w(e){return typeof e=="string"&&e.length>0&&e.trim()===e}function b(e){if(!Array.isArray(e)||e.length<2)throw new TypeError("Expected at least two artifact ledgers.");let o=new Map;for(let t of e){if(t===null||typeof t!="object"||!w(t.name)||o.has(t.name)||t.complete!==!0)throw new TypeError("Expected unique complete artifact ledgers.");if(!Array.isArray(t.identities))throw new TypeError("Invalid or duplicate artifact identity.");let r=new Set(t.identities);if(r.size!==t.identities.length||[...r].some(a=>!w(a)))throw new TypeError("Invalid or duplicate artifact identity.");o.set(t.name,r)}if([...o.values()].every(t=>t.size===0))throw new TypeError("Empty inventories cannot establish artifact reconciliation.");return o}function S(e,o){if(!Array.isArray(e))throw new TypeError("Expected unique evidence-backed artifact exceptions.");let t=new Map;for(let r of e){if(r===null||typeof r!="object"||!w(r.identity)||t.has(r.identity)||!w(r.reason)||!w(r.evidence))throw new TypeError("Expected unique evidence-backed artifact exceptions.");let a=r.missing_from;if(!Array.isArray(a)||a.length===0||a.length>=o.length||new Set(a).size!==a.length||[...a].some(c=>!o.includes(c)))throw new TypeError("Invalid artifact exception ledger signature.");t.set(r.identity,r)}return t}function gr(e,o=[]){let t=b(e),r=[...t.keys()].sort(),a=S(o,r),c=[...new Set([...t.values()].flatMap(n=>[...n]))].sort(),i=[],p=new Set;for(let n of c){let l=r.filter(d=>!t.get(d).has(n));if(l.length===0)continue;let u=a.get(n),g=u!==void 0&&JSON.stringify([...u.missing_from].sort())===JSON.stringify(l);g&&p.add(n),i.push({identity:n,present_in:r.filter(d=>t.get(d).has(n)),missing_from:l,disposition:g?{reason:u.reason,evidence:u.evidence}:null})}let f=[...a.keys()].filter(n=>!p.has(n)).sort();return{schema:"pm-artifact-ledgers/1",ok:i.every(n=>n.disposition!==null)&&f.length===0,counts:Object.fromEntries(r.map(n=>[n,t.get(n).size])),findings:i,stale_exceptions:f}}export{er as ASSURANCE_ACTIONS,tr as ASSURANCE_DECLARATION_KINDS,Pe as ASSURANCE_DOCUMENT_VERSION,Ue as ASSURANCE_GATE_TRIGGERS,We as ASSURANCE_MEASUREMENT_SOURCE_KINDS,Tt as ASSURANCE_PRESET_IDS,Re as AssuranceEvaluationRefusalError,je as AssuranceMutationRefusalError,Je as AssuranceSourceResolutionError,W as BOUNDARY_FIXTURE_CAPTURE_SOURCES,L as CURRENT_HISTORY_HASH_ALGORITHM,Q as DEFECT_ESCAPE_CLASSES,V as DEFECT_GATE_EVIDENCE_DISPOSITIONS,$ as DefectRecurrencePolicyParseError,ct as HISTORY_AUTHOR_ATTRIBUTION_BASELINE,J as HISTORY_HASH_ALGORITHMS,jt as IN_PROGRESS_WORK_DETAIL_LIMIT,F as LEGACY_HISTORY_HASH_ALGORITHM,B as MAX_WAIVER_NOTICE_DAYS,I as MAX_WORKFLOW_POLICIES,k as MAX_WORKFLOW_POLICY_TERMS,Ne as PM_HISTORY_ATTESTATION_CONTRACT,ie as PM_MUTATION_ACTION_CONTRACTS,ae as SECRET_GUARD_RULE_CATEGORIES,he as STALE_WORK_THRESHOLD_SETTING,xe as UNPROVEN_ACTIVITY_REASONS,T as WORKFLOW_POLICY_ACTIONS,at as WORKFLOW_POLICY_DOCUMENT_SCHEMA,ot as WORKFLOW_POLICY_SCHEMA,Wt as _testOnlyHealthCommand,_t as _testOnlySimilarity,Vt as _testOnlyValidateCommand,dr as _testOnlyWorkspacePosition,Ot as acceptAssuranceProposals,xt as acknowledgeUnknownAuthorHistoryEvents,ht as acknowledgeUnknownAuthorHistoryEventsFromTransport,Y as analyzeDefectChangeRisk,$t as analyzeDefectRecurrenceCoverage,vt as analyzeDuplicateItems,kt as applyAssurancePreset,Gt as applyClosureTimestampFix,Be as assuranceAssertionUpdateIsLoosening,X as buildDefectRecurrenceIndex,Rt as buildInProgressSweepCommands,Jt as buildInProgressWorkHealthSummary,Ht as buildLinkedFileRepairReport,Pt as buildStatusRoleWarnings,st as buildWorkflowCompletenessCheck,dt as classifyHistoryAuthorEvent,It as createAssurancePreset,Yt as createAssuranceWorkspaceContext,Qe as createEmptyAssuranceDocument,ft as createLifecycleCompletenessPolicies,j as createWorkflowPolicyEvaluator,fe as decideSecretGuardFinding,At as deriveAssuranceProposals,Bt as deriveClosureTimestamp,Xe as evaluateAssuranceAssertion,Ye as evaluateAssuranceGate,K as evaluateBoundaryFixtures,Z as evaluateDefectGateEvidence,Ve as evaluateMeasurement,oe as evaluateMutationGuard,lr as evaluateReliabilityWindow,St as evaluateSimilarityGovernance,N as evaluateWorkflowPolicies,ar as exportAttestation,bt as findDuplicateClusters,Et as findSimilarItems,cr as formatWorkspacePositionHuman,$e as getAssuranceDeclaration,de as getMutationActionContract,U as historyDigest,mt as inspectHistoryAuthorStream,be as inspectInProgressWork,Se as inspectStaleInProgressItems,Lt as inspectStatusRoleAssignments,Ie as isJudgeableHistoryRecord,pe as isMutationAction,C as isWaiverNoticeDays,Te as isWellFormedHistoryRecord,R as jaccardSimilarity,Oe as latestHistoryTimestamp,Ze as listAssuranceDeclarations,nt as listAssuranceVerdicts,Mt as listInvalidProvenanceHistoryStreamIds,ce as listMutationActions,Le as normalizeAssuranceEvaluation,Fe as normalizeAssuranceMutation,qt as normalizeInvalidHistoryProvenance,me as normalizeSimilarityText,ye as normalizeStaleWorkThresholdHours,te as parseDefectChangeRiskRequest,Zt as parseDefectRecurrenceCoverageRequest,ee as parseDefectRecurrencePolicy,or as parseHistoryAttestation,wt as parseUnknownAuthorHistoryEventCoordinates,A as parseWorkflowPolicy,O as parseWorkflowPolicyDocument,ut as planUnknownAuthorHistoryAcknowledgment,ue as prepareSimilarityText,Qt as projectValidateCounts,zt as promoteAssuranceAssertion,et as putAssuranceDeclaration,tt as putAssuranceDeclarationBundle,De as readLatestHistoryActivity,re as readWorkflowPolicies,z as readWorkflowPolicyField,pr as readWorkspacePosition,gr as reconcileArtifactLedgers,it as recordAssuranceVerdict,Ae as recordedBaselineActivity,ze as recordedPrefixActivity,rt as removeAssuranceDeclaration,P as resolveHistoryHashAlgorithm,_e as resolveLastActivityAt,gt as resolveUnknownAuthorAcknowledgmentSelector,rr as runAssuranceAction,ir as runAssuranceDispatch,nr as runGc,Ut as runHealth,fr as runHistoryAttest,Ft as runHistoryMaintenance,_ as runReindex,y as runUpgrade,Xt as runValidate,pt as runWorkflowPolicyAction,Ct as scanClosureTimestamps,Dt as scanExtensionHostVersions,lt as scanHistoryAuthorAttribution,qe as scanInProgressWork,ne as scanMutationSecrets,Nt as scanProvenanceResolverHealth,Me as scanStaleInProgressItems,Kt as scanStorageIntegrity,ge as scoreItemSimilarity,we as scorePreparedItemSimilarity,se as secretGuardRuleCategory,yt as similarityAdvisoryWarnings,H as sortWaiverNotices,ve as staleEligibleAt,le as tokenizeSimilarityText,ke as unprovenClaimActivity,Ge as validateAssertionDefinition,Ke as validateAssuranceDocument,He as validateGateDefinition,Ce as validateMeasurementDefinition,sr as verifyAttestation,G as waiverNoticeFor,Ee as wholeHoursSince,q as workflowApprovalFingerprint,M as workflowPolicyApplies,D as workflowPolicyFingerprint};
|
|
1
|
+
import{$a as Lt,Aa as qt,Ba as Mt,Ca as Nt,Da as jt,E as ot,Ea as Rt,F as at,Fa as Jt,Fb as Qt,G as st,Gb as Vt,H as ft,Hb as Xt,I as pt,Ib as Yt,Jb as Zt,Kb as $t,Lb as er,Mb as tr,Nb as rr,Ob as ir,Pb as nr,Qb as y,Rb as or,Sb as ar,Tb as sr,Ub as fr,Vb as pr,Wb as cr,Xa as Ft,Xb as dr,Yb as _,a as je,ab as Pt,b as Re,ba as ct,bb as Ut,c as Je,ca as dt,cb as Wt,d as Fe,da as mt,db as Bt,e as Le,ea as lt,eb as Ct,f as Pe,fa as ut,fb as Gt,g as Ue,ga as gt,gb as Ht,h as We,ha as wt,hb as Kt,i as Be,ia as ht,j as Ce,ja as xt,k as Ge,l as He,m as Ke,n as Qe,o as Ve,p as Xe,q as Ye,r as Ze,s as $e,t as et,ta as Tt,u as tt,ua as It,v as rt,va as kt,w as it,wa as At,x as nt,xa as Ot,ya as zt,za as Dt}from"./focused-chunks/chunk-B6BNHKUW.js";import"./focused-chunks/chunk-IIP6LZ5E.js";import"./focused-chunks/chunk-3ELVASVA.js";import"./focused-chunks/chunk-XDBHD4CY.js";import"./focused-chunks/chunk-RIE3SJSE.js";import"./focused-chunks/chunk-AIDL2ZNT.js";import"./focused-chunks/chunk-UVTUX54T.js";import"./focused-chunks/chunk-46MP7IZN.js";import"./focused-chunks/chunk-C7WHWI7K.js";import{a as Ne}from"./focused-chunks/chunk-K53OIT5J.js";import"./focused-chunks/chunk-RLO2HCZT.js";import{B as W,C as B,D as C,E as G,F as H,G as K,K as Q,L as V,M as X,N as Y,O as Z,P as $,Q as ee,R as te}from"./focused-chunks/chunk-3OCDKITJ.js";import"./focused-chunks/chunk-Z7W2RQIB.js";import{A as yt,B as _t,C as Et,D as vt,E as bt,F as St}from"./focused-chunks/chunk-EUQGZPGO.js";import"./focused-chunks/chunk-GXP7Q4XM.js";import{Ab as Te,Bb as Ie,Cb as ke,Db as Ae,Eb as Oe,Fb as ze,Gb as De,Hb as qe,Ib as Me,db as ie,eb as ne,fb as oe,gb as ae,hb as se,ib as fe,jb as pe,kb as ce,lb as de,mb as me,nb as le,ob as ue,pb as ge,qb as we,sb as he,tb as xe,ub as ye,vb as _e,wb as Ee,xb as ve,yb as be,zb as Se}from"./focused-chunks/chunk-FDZPRJXJ.js";import"./focused-chunks/chunk-LMFIAQ2V.js";import"./focused-chunks/chunk-YD66IRSL.js";import"./focused-chunks/chunk-LMU7DDOA.js";import"./focused-chunks/chunk-BKPUUW5O.js";import{s as re}from"./focused-chunks/chunk-5LDBS6MS.js";import"./focused-chunks/chunk-HL47UQZJ.js";import"./focused-chunks/chunk-BWOVFE5B.js";import"./focused-chunks/chunk-X6CXWWNB.js";import{cb as R,da as T,ea as I,fa as k,ga as A,ha as O,ia as z,ja as D,ka as q,la as M,ma as N,na as j,sb as J,tb as F,ub as L,vb as P,wb as U}from"./focused-chunks/chunk-SMMOZ3H3.js";import{v as h}from"./focused-chunks/chunk-3Z7MCUJM.js";import"./focused-chunks/chunk-RIQUIHYU.js";import"./focused-chunks/chunk-A6VEMCRR.js";function m(e){if(typeof e!="string"||!h(e))throw new TypeError("Invalid reliability timestamp.");return Date.parse(e)}function E(e){let o=m(e.window_start),t=m(e.window_end);if(o>=t||!Number.isFinite(e.max_failure_rate)||e.max_failure_rate<0||e.max_failure_rate>=1||!Number.isSafeInteger(e.min_completed_attempts)||e.min_completed_attempts<1)throw new TypeError("Invalid reliability window policy.");if(e.families.length===0||e.families.some(r=>typeof r!="string"||r.trim().length===0)||new Set(e.families).size!==e.families.length)throw new TypeError("Expected unique, nonempty reliability families.");return{start:o,end:t}}function v(e,o,t,r){let a=new Map(o.map(i=>[i,[]])),c=new Set;for(let i of e){if(typeof i.id!="string"||i.id.trim().length===0||c.has(i.id))throw new TypeError("Invalid or duplicate reliability attempt identity.");c.add(i.id);let p=a.get(i.family);if(!p||!["success","failure","pending"].includes(i.outcome)||i.cause!==void 0&&(!["product","infrastructure","unknown"].includes(i.cause)||i.outcome!=="failure"))throw new TypeError("Invalid reliability attempt family, outcome or cause.");let f=m(i.started_at);if(i.repaired_at!==void 0&&(m(i.repaired_at)<f||i.outcome!=="failure"))throw new TypeError("Invalid reliability repair chronology.");f>=t&&f<r&&p.push(i)}return a}function lr(e,o){let{start:t,end:r}=E(o),c=[...v(e,o.families,t,r)].map(([i,p])=>{let f=p.filter(s=>s.outcome==="failure"),n=p.filter(s=>s.outcome!=="pending").length,l=n===0?null:f.length/n,u=f.filter(s=>s.repaired_at!==void 0&&m(s.repaired_at)<r),g={product:0,infrastructure:0,unknown:0};for(let s of f)g[s.cause??"unknown"]+=1;let d=[];return n<o.min_completed_attempts&&d.push("insufficient_completed_attempts"),l!==null&&l>o.max_failure_rate&&d.push("failure_rate"),{family:i,attempts:p.length,completed:n,failed:f.length,pending:p.length-n,failure_rate:l,affected_days:[...new Set(f.map(s=>new Date(m(s.started_at)).toISOString().slice(0,10)))].sort(),repair_minutes:u.map(s=>(m(s.repaired_at)-m(s.started_at))/6e4).sort((s,x)=>s-x),unresolved:f.length-u.length,causes:g,violations:d,ok:d.length===0}});return{schema:"pm-reliability-window/1",window_start:new Date(t).toISOString(),window_end:new Date(r).toISOString(),ok:c.every(i=>i.ok),families:c}}function w(e){return typeof e=="string"&&e.length>0&&e.trim()===e}function b(e){if(!Array.isArray(e)||e.length<2)throw new TypeError("Expected at least two artifact ledgers.");let o=new Map;for(let t of e){if(t===null||typeof t!="object"||!w(t.name)||o.has(t.name)||t.complete!==!0)throw new TypeError("Expected unique complete artifact ledgers.");if(!Array.isArray(t.identities))throw new TypeError("Invalid or duplicate artifact identity.");let r=new Set(t.identities);if(r.size!==t.identities.length||[...r].some(a=>!w(a)))throw new TypeError("Invalid or duplicate artifact identity.");o.set(t.name,r)}if([...o.values()].every(t=>t.size===0))throw new TypeError("Empty inventories cannot establish artifact reconciliation.");return o}function S(e,o){if(!Array.isArray(e))throw new TypeError("Expected unique evidence-backed artifact exceptions.");let t=new Map;for(let r of e){if(r===null||typeof r!="object"||!w(r.identity)||t.has(r.identity)||!w(r.reason)||!w(r.evidence))throw new TypeError("Expected unique evidence-backed artifact exceptions.");let a=r.missing_from;if(!Array.isArray(a)||a.length===0||a.length>=o.length||new Set(a).size!==a.length||[...a].some(c=>!o.includes(c)))throw new TypeError("Invalid artifact exception ledger signature.");t.set(r.identity,r)}return t}function gr(e,o=[]){let t=b(e),r=[...t.keys()].sort(),a=S(o,r),c=[...new Set([...t.values()].flatMap(n=>[...n]))].sort(),i=[],p=new Set;for(let n of c){let l=r.filter(d=>!t.get(d).has(n));if(l.length===0)continue;let u=a.get(n),g=u!==void 0&&JSON.stringify([...u.missing_from].sort())===JSON.stringify(l);g&&p.add(n),i.push({identity:n,present_in:r.filter(d=>t.get(d).has(n)),missing_from:l,disposition:g?{reason:u.reason,evidence:u.evidence}:null})}let f=[...a.keys()].filter(n=>!p.has(n)).sort();return{schema:"pm-artifact-ledgers/1",ok:i.every(n=>n.disposition!==null)&&f.length===0,counts:Object.fromEntries(r.map(n=>[n,t.get(n).size])),findings:i,stale_exceptions:f}}export{er as ASSURANCE_ACTIONS,tr as ASSURANCE_DECLARATION_KINDS,Pe as ASSURANCE_DOCUMENT_VERSION,Ue as ASSURANCE_GATE_TRIGGERS,We as ASSURANCE_MEASUREMENT_SOURCE_KINDS,Tt as ASSURANCE_PRESET_IDS,Re as AssuranceEvaluationRefusalError,je as AssuranceMutationRefusalError,Je as AssuranceSourceResolutionError,W as BOUNDARY_FIXTURE_CAPTURE_SOURCES,L as CURRENT_HISTORY_HASH_ALGORITHM,Q as DEFECT_ESCAPE_CLASSES,V as DEFECT_GATE_EVIDENCE_DISPOSITIONS,$ as DefectRecurrencePolicyParseError,ct as HISTORY_AUTHOR_ATTRIBUTION_BASELINE,J as HISTORY_HASH_ALGORITHMS,jt as IN_PROGRESS_WORK_DETAIL_LIMIT,F as LEGACY_HISTORY_HASH_ALGORITHM,B as MAX_WAIVER_NOTICE_DAYS,I as MAX_WORKFLOW_POLICIES,k as MAX_WORKFLOW_POLICY_TERMS,Ne as PM_HISTORY_ATTESTATION_CONTRACT,ie as PM_MUTATION_ACTION_CONTRACTS,ae as SECRET_GUARD_RULE_CATEGORIES,he as STALE_WORK_THRESHOLD_SETTING,xe as UNPROVEN_ACTIVITY_REASONS,T as WORKFLOW_POLICY_ACTIONS,at as WORKFLOW_POLICY_DOCUMENT_SCHEMA,ot as WORKFLOW_POLICY_SCHEMA,Wt as _testOnlyHealthCommand,_t as _testOnlySimilarity,Vt as _testOnlyValidateCommand,dr as _testOnlyWorkspacePosition,Ot as acceptAssuranceProposals,xt as acknowledgeUnknownAuthorHistoryEvents,ht as acknowledgeUnknownAuthorHistoryEventsFromTransport,Y as analyzeDefectChangeRisk,$t as analyzeDefectRecurrenceCoverage,vt as analyzeDuplicateItems,kt as applyAssurancePreset,Gt as applyClosureTimestampFix,Be as assuranceAssertionUpdateIsLoosening,X as buildDefectRecurrenceIndex,Rt as buildInProgressSweepCommands,Jt as buildInProgressWorkHealthSummary,Ht as buildLinkedFileRepairReport,Pt as buildStatusRoleWarnings,st as buildWorkflowCompletenessCheck,dt as classifyHistoryAuthorEvent,It as createAssurancePreset,Yt as createAssuranceWorkspaceContext,Qe as createEmptyAssuranceDocument,ft as createLifecycleCompletenessPolicies,j as createWorkflowPolicyEvaluator,fe as decideSecretGuardFinding,At as deriveAssuranceProposals,Bt as deriveClosureTimestamp,Xe as evaluateAssuranceAssertion,Ye as evaluateAssuranceGate,K as evaluateBoundaryFixtures,Z as evaluateDefectGateEvidence,Ve as evaluateMeasurement,oe as evaluateMutationGuard,lr as evaluateReliabilityWindow,St as evaluateSimilarityGovernance,N as evaluateWorkflowPolicies,ar as exportAttestation,bt as findDuplicateClusters,Et as findSimilarItems,cr as formatWorkspacePositionHuman,$e as getAssuranceDeclaration,de as getMutationActionContract,U as historyDigest,mt as inspectHistoryAuthorStream,be as inspectInProgressWork,Se as inspectStaleInProgressItems,Lt as inspectStatusRoleAssignments,Ie as isJudgeableHistoryRecord,pe as isMutationAction,C as isWaiverNoticeDays,Te as isWellFormedHistoryRecord,R as jaccardSimilarity,Oe as latestHistoryTimestamp,Ze as listAssuranceDeclarations,nt as listAssuranceVerdicts,Mt as listInvalidProvenanceHistoryStreamIds,ce as listMutationActions,Le as normalizeAssuranceEvaluation,Fe as normalizeAssuranceMutation,qt as normalizeInvalidHistoryProvenance,me as normalizeSimilarityText,ye as normalizeStaleWorkThresholdHours,te as parseDefectChangeRiskRequest,Zt as parseDefectRecurrenceCoverageRequest,ee as parseDefectRecurrencePolicy,or as parseHistoryAttestation,wt as parseUnknownAuthorHistoryEventCoordinates,A as parseWorkflowPolicy,O as parseWorkflowPolicyDocument,ut as planUnknownAuthorHistoryAcknowledgment,ue as prepareSimilarityText,Qt as projectValidateCounts,zt as promoteAssuranceAssertion,et as putAssuranceDeclaration,tt as putAssuranceDeclarationBundle,De as readLatestHistoryActivity,re as readWorkflowPolicies,z as readWorkflowPolicyField,pr as readWorkspacePosition,gr as reconcileArtifactLedgers,it as recordAssuranceVerdict,Ae as recordedBaselineActivity,ze as recordedPrefixActivity,rt as removeAssuranceDeclaration,P as resolveHistoryHashAlgorithm,_e as resolveLastActivityAt,gt as resolveUnknownAuthorAcknowledgmentSelector,rr as runAssuranceAction,ir as runAssuranceDispatch,nr as runGc,Ut as runHealth,fr as runHistoryAttest,Ft as runHistoryMaintenance,_ as runReindex,y as runUpgrade,Xt as runValidate,pt as runWorkflowPolicyAction,Ct as scanClosureTimestamps,Dt as scanExtensionHostVersions,lt as scanHistoryAuthorAttribution,qe as scanInProgressWork,ne as scanMutationSecrets,Nt as scanProvenanceResolverHealth,Me as scanStaleInProgressItems,Kt as scanStorageIntegrity,ge as scoreItemSimilarity,we as scorePreparedItemSimilarity,se as secretGuardRuleCategory,yt as similarityAdvisoryWarnings,H as sortWaiverNotices,ve as staleEligibleAt,le as tokenizeSimilarityText,ke as unprovenClaimActivity,Ge as validateAssertionDefinition,Ke as validateAssuranceDocument,He as validateGateDefinition,Ce as validateMeasurementDefinition,sr as verifyAttestation,G as waiverNoticeFor,Ee as wholeHoursSince,q as workflowApprovalFingerprint,M as workflowPolicyApplies,D as workflowPolicyFingerprint};
|
|
2
2
|
//# sourceMappingURL=sdk-governance.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as Ze,b as Qe,c as Ee,e as Ce}from"./focused-chunks/chunk-TD544C74.js";import{A as ue,B as ye,C as we,D as Re,E as be,F as ke,G as Ae,H as _e,I as Ge,J as Se,K as xe,a as Xe,b as Ye,c as er,d as rr,e as q,f as J,g as Z,h as Q,i as X,j as Y,k as ee,l as re,m as te,n as ne,o as ie,p as ae,q as oe,r as se,s as pe,t as ce,u as he,v as de,w as le,x as fe,y as ge,z as me}from"./focused-chunks/chunk-I66IKYKP.js";import{d as $,e as H,f as M,g as N,h as P,i as v,j as B,k as z,l as W,m as j,n as F,p as A,q as U,r as L,s as V,t as K,u as tr,v as nr}from"./focused-chunks/chunk-ITKDHSBR.js";import{a as We,b as je,c as Fe,d as Ue,e as Le,f as Ve,g as Ke,h as qe,i as Je}from"./focused-chunks/chunk-QLAHEDT6.js";import"./focused-chunks/chunk-BKPUUW5O.js";import"./focused-chunks/chunk-OTMMOKPM.js";import"./focused-chunks/chunk-HMDQDRV2.js";import{a as ze}from"./focused-chunks/chunk-BWOVFE5B.js";import"./focused-chunks/chunk-X6CXWWNB.js";import{Ga as R,R as He,S as k,T as x,U as Me,V as Ne,W as Pe,X as ve,Y as f,Z as Be,mb as O}from"./focused-chunks/chunk-Z2X7HH3C.js";import"./focused-chunks/chunk-A6VEMCRR.js";import{createHash as Te}from"node:crypto";var _=1;function g(e){e?.throwIfAborted()}function d(e,r){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`Relationship graph ${r} must be non-empty`);return e.trim()}function m(e,r,t={}){let n=Date.parse(t.createdAt??new Date().toISOString());if(!Number.isFinite(n))throw new TypeError("Relationship graph createdAt must be a valid timestamp");let i=e.nodes(),s=e.edges(),a=r.list();return Object.freeze({version:_,fingerprint:Te("sha256").update(R({nodes:i,edges:s,kinds:a})).digest("hex"),created_at:new Date(n).toISOString(),nodes:i,edges:s,kinds:a})}function Ie(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function y(e){if(!Ie(e))throw new TypeError("Relationship graph snapshot must be an object");if(e.version!==_)throw new TypeError(`Unsupported relationship graph snapshot version: ${String(e.version)}`);if(!Array.isArray(e.nodes)||e.nodes.some(i=>typeof i!="string"))throw new TypeError("Relationship graph snapshot nodes must be strings");if(!Array.isArray(e.edges)||!Array.isArray(e.kinds))throw new TypeError("Relationship graph snapshot edges and kinds must be arrays");if(typeof e.created_at!="string"||!Number.isFinite(Date.parse(e.created_at)))throw new TypeError("Relationship graph snapshot created_at must be valid");if(typeof e.fingerprint!="string")throw new TypeError("Relationship graph snapshot fingerprint must be a string");let r=new k([]);for(let i of e.kinds)r.register(i);let t=new f(e.nodes,e.edges,r),n=m(t,r,{createdAt:e.created_at});if(n.fingerprint!==e.fingerprint)throw new TypeError("Relationship graph snapshot fingerprint mismatch");return{snapshot:n,registry:r,graph:t}}async function h(e,r){d(e.name,"adapter name");let t=d(r.workspace,"workspace");g(r.signal);let n=await e.read({...r,workspace:t});return g(r.signal),n===null?null:y(n)}async function b(e,r){let t=d(r.workspace,"workspace"),n=y(r.snapshot).snapshot,i=await h(e,{workspace:t,signal:r.signal});if(i?.snapshot.fingerprint===n.fingerprint)return{adapter:e.name,workspace:t,disposition:"current",fingerprint:n.fingerprint,previous_fingerprint:i.snapshot.fingerprint,node_count:n.nodes.length,edge_count:n.edges.length};if(g(r.signal),await e.replace({workspace:t,signal:r.signal,snapshot:n,expected_fingerprint:i?.snapshot.fingerprint??null}),(await h(e,{workspace:t,signal:r.signal}))?.snapshot.fingerprint!==n.fingerprint)throw new Error(`Relationship graph adapter "${e.name}" did not expose the replaced snapshot`);return{adapter:e.name,workspace:t,disposition:"written",fingerprint:n.fingerprint,...i?{previous_fingerprint:i.snapshot.fingerprint}:{},node_count:n.nodes.length,edge_count:n.edges.length}}function De(e,r={}){let t=e.map(y),n=new Map;for(let a of t)for(let o of a.snapshot.kinds){let c=n.get(o.kind);if(c&&R(c)!==R(o))throw new TypeError(`Conflicting federated relationship kind: ${o.kind}`);n.set(o.kind,o)}let i=new k([...n.values()].sort((a,o)=>a.kind.localeCompare(o.kind))),s=new f(new Set(t.flatMap(a=>[...a.snapshot.nodes])),t.flatMap(a=>[...a.snapshot.edges]),i);return m(s,i,r)}var u=class{name;#e=new Map;constructor(r="memory"){this.name=d(r,"adapter name")}async read(r){g(r.signal);let t=this.#e.get(d(r.workspace,"workspace"));return t?structuredClone(t):null}async replace(r){g(r.signal);let t=d(r.workspace,"workspace"),n=this.#e.get(t);if(r.expected_fingerprint!==void 0&&(n?.fingerprint??null)!==r.expected_fingerprint)throw new Error(`Relationship graph adapter conflict for ${t}`);this.#e.set(t,structuredClone(y(r.snapshot).snapshot))}async clear(r){g(r.signal);let t=d(r.workspace,"workspace"),n=this.#e.get(t);if(r.expected_fingerprint!==void 0&&(n?.fingerprint??null)!==r.expected_fingerprint)throw new Error(`Relationship graph adapter conflict for ${t}`);this.#e.delete(t)}};function E(e,r){if(!Number.isInteger(e)||e<1)throw new TypeError(`Relationship graph ${r} must be a positive integer`);return e}function Oe(e){let r=E(e.nodeCount,"nodeCount"),t=E(e.edgeStride??1,"edgeStride"),n=e.topology??"chain";if(!["chain","star","disconnected"].includes(n))throw new TypeError(`Unsupported relationship graph topology: ${n}`);let i=(e.kind??"related").trim(),s=(e.idPrefix??"node").trim();if(!i||!s)throw new TypeError("Relationship graph kind and idPrefix must be non-empty");let a=n==="disconnected"?0:Math.floor((r-1)/t);return{node_count:r,edge_count:a,edge_basis:"fixture_generated",nodes:{*[Symbol.iterator](){for(let o=0;o<r;o+=1)yield`${s}-${o}`}},edges:{*[Symbol.iterator](){if(n!=="disconnected")for(let o=t;o<r;o+=t)yield{source:`${s}-${n==="star"?0:o-t}`,target:`${s}-${o}`,kind:i}}}}}function l(e,r){if(!e)throw new Error(`Relationship graph adapter conformance: ${r}`)}async function C(e,r={}){let t=r.workspace?.trim()||"pm-graph-conformance",n=x(),i=m(new f(["a","b"],[{source:"a",target:"b",kind:"related"}],n),n,{createdAt:"2026-01-01T00:00:00.000Z"}),s=m(new f(["a","b","c"],[{source:"a",target:"b",kind:"related"},{source:"b",target:"c",kind:"blocked_by"}],n),n,{createdAt:"2026-01-02T00:00:00.000Z"}),a=[];l(await h(e,{workspace:t})===null,"workspace must start empty"),a.push({name:"empty-read",passed:!0});let o=await b(e,{workspace:t,snapshot:i});l(o.disposition==="written","first sync must write"),a.push({name:"atomic-replace",passed:!0}),(await e.read({workspace:t})).nodes.push("mutated-reader-copy"),l((await h(e,{workspace:t}))?.snapshot.nodes.length===2,"reads must not mutate stored state"),a.push({name:"read-isolation",passed:!0}),l((await b(e,{workspace:t,snapshot:i})).disposition==="current","identical sync must be idempotent"),a.push({name:"idempotent-sync",passed:!0}),await e.replace({workspace:t,snapshot:s,expected_fingerprint:i.fingerprint}),l((await h(e,{workspace:t}))?.snapshot.fingerprint===s.fingerprint,"replacement must become visible"),a.push({name:"replacement-visibility",passed:!0});let w=!1;try{await e.replace({workspace:t,snapshot:i,expected_fingerprint:i.fingerprint})}catch{w=!0}return l(w,"stale compare-and-swap must fail"),a.push({name:"stale-cas",passed:!0}),e.clear&&(await e.clear({workspace:t,expected_fingerprint:s.fingerprint}),l(await h(e,{workspace:t})===null,"clear must remove the workspace"),a.push({name:"clear",passed:!0})),{adapter:e.name,workspace:t,cases:Object.freeze(a),clear_supported:e.clear!==void 0}}function $e(e){return C(new u,e?{workspace:e}:{})}import{createHash as T}from"node:crypto";function I(e,r){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`Relationship backfill ${r} must be non-empty`);return e.trim()}function Dr(e,r){let t=I(r.migrationId,"migrationId"),n=I(r.author,"author"),i=Date.parse(r.timestamp);if(!Number.isFinite(i))throw new TypeError("Relationship backfill timestamp must be valid");let s=new Date(i).toISOString(),a=A(e,void 0,r.registry),o=a.graph.nodes(),c=a.graph.edges().map(p=>{let S=T("sha256").update(JSON.stringify([t,p.kind,p.source,p.target,p.createdAt??null,p.author??null,p.payload??null])).digest("hex").slice(0,24);return Object.freeze({eventId:`backfill:${t}:${S}`,relationshipId:`migration:${t}:${S}`,action:"add",edge:p,author:n,timestamp:s,reason:`Backfill ${t} from legacy item metadata`})}),w=T("sha256").update(JSON.stringify({migrationId:t,nodes:o,events:c})).digest("hex"),D=new Set([...r.existingEventIds??[]].filter(p=>typeof p=="string").map(p=>p.trim()).filter(Boolean)),G=c.filter(p=>!D.has(p.eventId));return Object.freeze({migration_id:t,fingerprint:w,nodes:o,events:Object.freeze(G),edge_count:c.length,skipped_existing_count:c.length-G.length,duplicate_dependency_rows:a.duplicateRows.length,dangling_reference_count:a.dangling.active.length+a.dangling.legacy_terminal.length})}export{je as ACTIONABILITY_ORDERING_KINDS,He as BUILTIN_RELATIONSHIP_KINDS,tr as DEFAULT_RELATIONSHIP_CONTEXT_TOKEN_BUDGET,ge as GRAPH_DURABLE_CACHE_MIN_ITEMS,fe as GRAPH_DURABLE_CACHE_VERSION,ze as GRAPH_QUERY_DEFAULTS,O as GRAPH_SUBCOMMAND_VALUES,u as MemoryRelationshipGraphAdapter,_ as RELATIONSHIP_GRAPH_SNAPSHOT_VERSION,Ze as RelationshipEventLog,Qe as RelationshipEventStore,f as RelationshipGraph,k as RelationshipKindRegistry,L as WorkspaceGraphCache,Ye as analyzeGraphImpact,M as analyzeHierarchyIntegrity,er as analyzeKnowledgeGraph,Xe as analyzeRelationshipExecution,ae as analyzeRelationshipSchedule,A as assembleWorkspaceRelationshipGraph,v as assertHierarchyMutationAllowed,$e as assertMemoryRelationshipGraphAdapterConformance,Ce as assertNonHierarchyCardinalityMutationAllowed,ve as assertRelationshipEdgeAllowed,C as assertRelationshipGraphAdapterConformance,de as auditWorkspaceRelationshipGraph,nr as buildRelationshipContext,Me as canonicalizeRelationshipKind,Re as clearDurableGraphCache,Fe as collectBlockedByIds,Le as collectBlockedByIdsFromCorpus,j as collectDanglingDependencyReferences,Ke as collectDependencyBlockedIds,z as collectDuplicateDependencyRows,he as collectDuplicateRelationshipEdgeGroups,H as collectHierarchyRelations,F as collectMissingDependencyTargetIds,Ee as collectNewOrderingCycleWarnings,se as collectOrderingCycles,W as collectOrderingStorageContradictions,rr as compareRelationshipSnapshots,Je as computeActionabilityReport,ne as computeRelationshipCentrality,te as computeRelationshipDominators,U as computeWorkspaceGraphFingerprint,Oe as createRelationshipGraphScaleFixture,m as createRelationshipGraphSnapshot,x as createRelationshipKindRegistry,Be as dependencyToRelationship,oe as deriveRelationshipDeadlines,ee as detectRelationshipCommunities,le as diffRelationshipAuditSnapshots,me as durableGraphCachePath,be as durableGraphCacheStatus,X as enumerateRelationshipPaths,De as federateRelationshipGraphSnapshots,re as findRedundantRelationshipEdges,ie as findRelationshipCutStructure,Y as forEachMatchedRelationshipEdge,ce as formatDuplicateEdgeGroup,N as formatHierarchyRelation,pe as formatOrderingStorageContradiction,ue as graphAuditBaselinePath,q as hierarchyAncestors,J as hierarchyDescendants,Ue as indexBlockedByIds,P as indexHierarchyRelations,Pe as isOrderingRelationshipKind,Ae as loadGraphAuditBaseline,h as loadRelationshipGraphAdapter,B as normalizeDependencyGraphTarget,ye as openDurableGraphCache,Z as orderingPredecessors,Q as orderingSuccessors,Se as parseGraphSubcommand,y as parseRelationshipGraphSnapshot,we as persistDurableGraphResult,Dr as planRelationshipEventBackfill,Ge as planRelationshipRemediation,K as resetWorkspaceGraphCache,Ne as resolveCanonicalRelationshipKind,Ve as resolveItemBlockers,We as resolveItemExecutionRole,$ as resolveWorkspaceRelationshipKindRegistry,xe as runGraph,_e as saveGraphAuditBaseline,qe as selectActionableEntries,ke as shouldPersistDurableGraphCache,b as syncRelationshipGraphAdapter,V as workspaceGraphCache};
|
|
1
|
+
import{a as Ze,b as Qe,c as Ee,e as Ce}from"./focused-chunks/chunk-OZOCEB2Q.js";import{A as ue,B as ye,C as we,D as Re,E as be,F as ke,G as Ae,H as _e,I as Ge,J as Se,K as xe,a as Xe,b as Ye,c as er,d as rr,e as q,f as J,g as Z,h as Q,i as X,j as Y,k as ee,l as re,m as te,n as ne,o as ie,p as ae,q as oe,r as se,s as pe,t as ce,u as he,v as de,w as le,x as fe,y as ge,z as me}from"./focused-chunks/chunk-Z7W2RQIB.js";import{d as $,e as H,f as M,g as N,h as P,i as v,j as B,k as z,l as W,m as j,n as F,p as A,q as U,r as L,s as V,t as K,u as tr,v as nr}from"./focused-chunks/chunk-YD66IRSL.js";import{a as We,b as je,c as Fe,d as Ue,e as Le,f as Ve,g as Ke,h as qe,i as Je}from"./focused-chunks/chunk-LMU7DDOA.js";import"./focused-chunks/chunk-BKPUUW5O.js";import"./focused-chunks/chunk-5LDBS6MS.js";import"./focused-chunks/chunk-HL47UQZJ.js";import{a as ze}from"./focused-chunks/chunk-BWOVFE5B.js";import"./focused-chunks/chunk-X6CXWWNB.js";import{o as He,p as k,q as x,r as Me,s as Ne,t as Pe,u as ve,v as f,va as O,w as Be}from"./focused-chunks/chunk-SMMOZ3H3.js";import{c as R}from"./focused-chunks/chunk-3Z7MCUJM.js";import"./focused-chunks/chunk-RIQUIHYU.js";import"./focused-chunks/chunk-A6VEMCRR.js";import{createHash as Te}from"node:crypto";var _=1;function g(e){e?.throwIfAborted()}function d(e,r){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`Relationship graph ${r} must be non-empty`);return e.trim()}function m(e,r,t={}){let n=Date.parse(t.createdAt??new Date().toISOString());if(!Number.isFinite(n))throw new TypeError("Relationship graph createdAt must be a valid timestamp");let i=e.nodes(),s=e.edges(),a=r.list();return Object.freeze({version:_,fingerprint:Te("sha256").update(R({nodes:i,edges:s,kinds:a})).digest("hex"),created_at:new Date(n).toISOString(),nodes:i,edges:s,kinds:a})}function Ie(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function y(e){if(!Ie(e))throw new TypeError("Relationship graph snapshot must be an object");if(e.version!==_)throw new TypeError(`Unsupported relationship graph snapshot version: ${String(e.version)}`);if(!Array.isArray(e.nodes)||e.nodes.some(i=>typeof i!="string"))throw new TypeError("Relationship graph snapshot nodes must be strings");if(!Array.isArray(e.edges)||!Array.isArray(e.kinds))throw new TypeError("Relationship graph snapshot edges and kinds must be arrays");if(typeof e.created_at!="string"||!Number.isFinite(Date.parse(e.created_at)))throw new TypeError("Relationship graph snapshot created_at must be valid");if(typeof e.fingerprint!="string")throw new TypeError("Relationship graph snapshot fingerprint must be a string");let r=new k([]);for(let i of e.kinds)r.register(i);let t=new f(e.nodes,e.edges,r),n=m(t,r,{createdAt:e.created_at});if(n.fingerprint!==e.fingerprint)throw new TypeError("Relationship graph snapshot fingerprint mismatch");return{snapshot:n,registry:r,graph:t}}async function h(e,r){d(e.name,"adapter name");let t=d(r.workspace,"workspace");g(r.signal);let n=await e.read({...r,workspace:t});return g(r.signal),n===null?null:y(n)}async function b(e,r){let t=d(r.workspace,"workspace"),n=y(r.snapshot).snapshot,i=await h(e,{workspace:t,signal:r.signal});if(i?.snapshot.fingerprint===n.fingerprint)return{adapter:e.name,workspace:t,disposition:"current",fingerprint:n.fingerprint,previous_fingerprint:i.snapshot.fingerprint,node_count:n.nodes.length,edge_count:n.edges.length};if(g(r.signal),await e.replace({workspace:t,signal:r.signal,snapshot:n,expected_fingerprint:i?.snapshot.fingerprint??null}),(await h(e,{workspace:t,signal:r.signal}))?.snapshot.fingerprint!==n.fingerprint)throw new Error(`Relationship graph adapter "${e.name}" did not expose the replaced snapshot`);return{adapter:e.name,workspace:t,disposition:"written",fingerprint:n.fingerprint,...i?{previous_fingerprint:i.snapshot.fingerprint}:{},node_count:n.nodes.length,edge_count:n.edges.length}}function De(e,r={}){let t=e.map(y),n=new Map;for(let a of t)for(let o of a.snapshot.kinds){let c=n.get(o.kind);if(c&&R(c)!==R(o))throw new TypeError(`Conflicting federated relationship kind: ${o.kind}`);n.set(o.kind,o)}let i=new k([...n.values()].sort((a,o)=>a.kind.localeCompare(o.kind))),s=new f(new Set(t.flatMap(a=>[...a.snapshot.nodes])),t.flatMap(a=>[...a.snapshot.edges]),i);return m(s,i,r)}var u=class{name;#e=new Map;constructor(r="memory"){this.name=d(r,"adapter name")}async read(r){g(r.signal);let t=this.#e.get(d(r.workspace,"workspace"));return t?structuredClone(t):null}async replace(r){g(r.signal);let t=d(r.workspace,"workspace"),n=this.#e.get(t);if(r.expected_fingerprint!==void 0&&(n?.fingerprint??null)!==r.expected_fingerprint)throw new Error(`Relationship graph adapter conflict for ${t}`);this.#e.set(t,structuredClone(y(r.snapshot).snapshot))}async clear(r){g(r.signal);let t=d(r.workspace,"workspace"),n=this.#e.get(t);if(r.expected_fingerprint!==void 0&&(n?.fingerprint??null)!==r.expected_fingerprint)throw new Error(`Relationship graph adapter conflict for ${t}`);this.#e.delete(t)}};function E(e,r){if(!Number.isInteger(e)||e<1)throw new TypeError(`Relationship graph ${r} must be a positive integer`);return e}function Oe(e){let r=E(e.nodeCount,"nodeCount"),t=E(e.edgeStride??1,"edgeStride"),n=e.topology??"chain";if(!["chain","star","disconnected"].includes(n))throw new TypeError(`Unsupported relationship graph topology: ${n}`);let i=(e.kind??"related").trim(),s=(e.idPrefix??"node").trim();if(!i||!s)throw new TypeError("Relationship graph kind and idPrefix must be non-empty");let a=n==="disconnected"?0:Math.floor((r-1)/t);return{node_count:r,edge_count:a,edge_basis:"fixture_generated",nodes:{*[Symbol.iterator](){for(let o=0;o<r;o+=1)yield`${s}-${o}`}},edges:{*[Symbol.iterator](){if(n!=="disconnected")for(let o=t;o<r;o+=t)yield{source:`${s}-${n==="star"?0:o-t}`,target:`${s}-${o}`,kind:i}}}}}function l(e,r){if(!e)throw new Error(`Relationship graph adapter conformance: ${r}`)}async function C(e,r={}){let t=r.workspace?.trim()||"pm-graph-conformance",n=x(),i=m(new f(["a","b"],[{source:"a",target:"b",kind:"related"}],n),n,{createdAt:"2026-01-01T00:00:00.000Z"}),s=m(new f(["a","b","c"],[{source:"a",target:"b",kind:"related"},{source:"b",target:"c",kind:"blocked_by"}],n),n,{createdAt:"2026-01-02T00:00:00.000Z"}),a=[];l(await h(e,{workspace:t})===null,"workspace must start empty"),a.push({name:"empty-read",passed:!0});let o=await b(e,{workspace:t,snapshot:i});l(o.disposition==="written","first sync must write"),a.push({name:"atomic-replace",passed:!0}),(await e.read({workspace:t})).nodes.push("mutated-reader-copy"),l((await h(e,{workspace:t}))?.snapshot.nodes.length===2,"reads must not mutate stored state"),a.push({name:"read-isolation",passed:!0}),l((await b(e,{workspace:t,snapshot:i})).disposition==="current","identical sync must be idempotent"),a.push({name:"idempotent-sync",passed:!0}),await e.replace({workspace:t,snapshot:s,expected_fingerprint:i.fingerprint}),l((await h(e,{workspace:t}))?.snapshot.fingerprint===s.fingerprint,"replacement must become visible"),a.push({name:"replacement-visibility",passed:!0});let w=!1;try{await e.replace({workspace:t,snapshot:i,expected_fingerprint:i.fingerprint})}catch{w=!0}return l(w,"stale compare-and-swap must fail"),a.push({name:"stale-cas",passed:!0}),e.clear&&(await e.clear({workspace:t,expected_fingerprint:s.fingerprint}),l(await h(e,{workspace:t})===null,"clear must remove the workspace"),a.push({name:"clear",passed:!0})),{adapter:e.name,workspace:t,cases:Object.freeze(a),clear_supported:e.clear!==void 0}}function $e(e){return C(new u,e?{workspace:e}:{})}import{createHash as T}from"node:crypto";function I(e,r){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`Relationship backfill ${r} must be non-empty`);return e.trim()}function Dr(e,r){let t=I(r.migrationId,"migrationId"),n=I(r.author,"author"),i=Date.parse(r.timestamp);if(!Number.isFinite(i))throw new TypeError("Relationship backfill timestamp must be valid");let s=new Date(i).toISOString(),a=A(e,void 0,r.registry),o=a.graph.nodes(),c=a.graph.edges().map(p=>{let S=T("sha256").update(JSON.stringify([t,p.kind,p.source,p.target,p.createdAt??null,p.author??null,p.payload??null])).digest("hex").slice(0,24);return Object.freeze({eventId:`backfill:${t}:${S}`,relationshipId:`migration:${t}:${S}`,action:"add",edge:p,author:n,timestamp:s,reason:`Backfill ${t} from legacy item metadata`})}),w=T("sha256").update(JSON.stringify({migrationId:t,nodes:o,events:c})).digest("hex"),D=new Set([...r.existingEventIds??[]].filter(p=>typeof p=="string").map(p=>p.trim()).filter(Boolean)),G=c.filter(p=>!D.has(p.eventId));return Object.freeze({migration_id:t,fingerprint:w,nodes:o,events:Object.freeze(G),edge_count:c.length,skipped_existing_count:c.length-G.length,duplicate_dependency_rows:a.duplicateRows.length,dangling_reference_count:a.dangling.active.length+a.dangling.legacy_terminal.length})}export{je as ACTIONABILITY_ORDERING_KINDS,He as BUILTIN_RELATIONSHIP_KINDS,tr as DEFAULT_RELATIONSHIP_CONTEXT_TOKEN_BUDGET,ge as GRAPH_DURABLE_CACHE_MIN_ITEMS,fe as GRAPH_DURABLE_CACHE_VERSION,ze as GRAPH_QUERY_DEFAULTS,O as GRAPH_SUBCOMMAND_VALUES,u as MemoryRelationshipGraphAdapter,_ as RELATIONSHIP_GRAPH_SNAPSHOT_VERSION,Ze as RelationshipEventLog,Qe as RelationshipEventStore,f as RelationshipGraph,k as RelationshipKindRegistry,L as WorkspaceGraphCache,Ye as analyzeGraphImpact,M as analyzeHierarchyIntegrity,er as analyzeKnowledgeGraph,Xe as analyzeRelationshipExecution,ae as analyzeRelationshipSchedule,A as assembleWorkspaceRelationshipGraph,v as assertHierarchyMutationAllowed,$e as assertMemoryRelationshipGraphAdapterConformance,Ce as assertNonHierarchyCardinalityMutationAllowed,ve as assertRelationshipEdgeAllowed,C as assertRelationshipGraphAdapterConformance,de as auditWorkspaceRelationshipGraph,nr as buildRelationshipContext,Me as canonicalizeRelationshipKind,Re as clearDurableGraphCache,Fe as collectBlockedByIds,Le as collectBlockedByIdsFromCorpus,j as collectDanglingDependencyReferences,Ke as collectDependencyBlockedIds,z as collectDuplicateDependencyRows,he as collectDuplicateRelationshipEdgeGroups,H as collectHierarchyRelations,F as collectMissingDependencyTargetIds,Ee as collectNewOrderingCycleWarnings,se as collectOrderingCycles,W as collectOrderingStorageContradictions,rr as compareRelationshipSnapshots,Je as computeActionabilityReport,ne as computeRelationshipCentrality,te as computeRelationshipDominators,U as computeWorkspaceGraphFingerprint,Oe as createRelationshipGraphScaleFixture,m as createRelationshipGraphSnapshot,x as createRelationshipKindRegistry,Be as dependencyToRelationship,oe as deriveRelationshipDeadlines,ee as detectRelationshipCommunities,le as diffRelationshipAuditSnapshots,me as durableGraphCachePath,be as durableGraphCacheStatus,X as enumerateRelationshipPaths,De as federateRelationshipGraphSnapshots,re as findRedundantRelationshipEdges,ie as findRelationshipCutStructure,Y as forEachMatchedRelationshipEdge,ce as formatDuplicateEdgeGroup,N as formatHierarchyRelation,pe as formatOrderingStorageContradiction,ue as graphAuditBaselinePath,q as hierarchyAncestors,J as hierarchyDescendants,Ue as indexBlockedByIds,P as indexHierarchyRelations,Pe as isOrderingRelationshipKind,Ae as loadGraphAuditBaseline,h as loadRelationshipGraphAdapter,B as normalizeDependencyGraphTarget,ye as openDurableGraphCache,Z as orderingPredecessors,Q as orderingSuccessors,Se as parseGraphSubcommand,y as parseRelationshipGraphSnapshot,we as persistDurableGraphResult,Dr as planRelationshipEventBackfill,Ge as planRelationshipRemediation,K as resetWorkspaceGraphCache,Ne as resolveCanonicalRelationshipKind,Ve as resolveItemBlockers,We as resolveItemExecutionRole,$ as resolveWorkspaceRelationshipKindRegistry,xe as runGraph,_e as saveGraphAuditBaseline,qe as selectActionableEntries,ke as shouldPersistDurableGraphCache,b as syncRelationshipGraphAdapter,V as workspaceGraphCache};
|
|
2
2
|
//# sourceMappingURL=sdk-graph.js.map
|