@unbrained/pm-cli 2026.11.1 → 2026.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +32 -0
- package/CONTRIBUTING.md +1 -1
- package/dist/cli/error-guidance.d.ts +9 -0
- package/dist/cli/error-guidance.js +4 -3
- package/dist/cli/main.js +1 -1
- package/dist/cli/migration-gates.js +1 -1
- package/dist/cli/runtime/field-route-retry.d.ts +15 -0
- package/dist/cli/runtime/field-route-retry.js +2 -0
- package/dist/cli-bundle/bundle-manifest.json +1 -1
- package/dist/cli-bundle/chunks/{chunk-2GK2IVU5.js → chunk-2CBHQXYJ.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-32BCU6HN.js +115 -0
- package/dist/cli-bundle/chunks/{chunk-MTRIGD7M.js → chunk-5IPXDZKU.js} +42 -42
- package/dist/cli-bundle/chunks/{chunk-O56O7NIE.js → chunk-5JZMF4M5.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TYERATXH.js → chunk-7ZEFHFAU.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-B6UTLYLM.js +3 -0
- package/dist/cli-bundle/chunks/{chunk-N45IXPCA.js → chunk-DEJHTFEF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ICT6E4IW.js → chunk-HBKD5HZB.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-6PKWKVS6.js → chunk-JPKIUWLG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WFBYKDB2.js → chunk-L6LCLC37.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-Y7CKVU56.js → chunk-MQJXZX3Q.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-NR4KABHC.js +31 -0
- package/dist/cli-bundle/chunks/{chunk-WX25MU4N.js → chunk-O4ZLEN4T.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-F3ECOBKA.js → chunk-PWD5RY2D.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SBVX5CMV.js → chunk-RSAN2YUU.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NILQ2ZMV.js → chunk-TZ3D3DPQ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MRUA2Z43.js → chunk-UJMQP2HP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TMPO4CTZ.js → chunk-UYNMKUGA.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UUN3WNMQ.js → chunk-XRMYA4R7.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-UEEG47TU.js → chunk-Y7H55PCY.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-5KW4WUAK.js → chunk-YWS4XV4I.js} +4 -4
- package/dist/cli-bundle/chunks/chunk-ZOAJNPBL.js +129 -0
- package/dist/cli-bundle/chunks/{indexed-receipt-blobs-KGMJVFH2.js → indexed-receipt-blobs-I6RQGD6Y.js} +2 -2
- package/dist/cli-bundle/chunks/item-transaction-ZHLJTBD7.js +2 -0
- package/dist/cli-bundle/chunks/{mutation-admission-BOOCJPCU.js → mutation-admission-ZQMRMGIB.js} +2 -2
- package/dist/cli-bundle/chunks/{register-list-query-23OX36Q3.js → register-list-query-I6AZA3IX.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-JPJ5YNDX.js → register-mutation-3DAXCLXR.js} +2 -2
- package/dist/cli-bundle/chunks/{register-operations-IGR7ERY5.js → register-operations-G3QGGQ5Z.js} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-BMIFKZZP.js → register-setup-LDXHMNOT.js} +2 -2
- package/dist/cli-bundle/chunks/{settlement-hook-YWSWFOZY.js → settlement-hook-JHXLUBEN.js} +2 -2
- package/dist/cli-bundle/chunks/{stage-ON7CYYPM.js → stage-7H36OTDJ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-3XGKBVJ3.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-WX2RVS2Y.js → chunk-4HY6EGPB.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-3NYWMUX3.js → chunk-D4XQOMG4.js} +3 -3
- package/dist/cli-bundle/focused-chunks/{chunk-UQIBGLDR.js → chunk-F3X6UWMI.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-JLXGRDTG.js → chunk-G6ERMFJ5.js} +3 -3
- package/dist/cli-bundle/focused-chunks/{chunk-VFQAZLKO.js → chunk-HJ27QLZV.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-5TWS5KOM.js → chunk-HOXIIZEO.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-HUXZCPWT.js +26 -0
- package/dist/cli-bundle/focused-chunks/{chunk-LVA76N27.js → chunk-I5FODKYB.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-DFUTCKUF.js → chunk-IDAYTYNN.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-2Y77HWIX.js → chunk-IKXJ57XA.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-RPUDOJVB.js → chunk-LKN2WGGB.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-MOY6KZGJ.js +44 -0
- package/dist/cli-bundle/focused-chunks/{chunk-PAT6QF63.js → chunk-PWUTFKSI.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-PZRB7IXH.js +91 -0
- package/dist/cli-bundle/focused-chunks/chunk-RY4QEMAE.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-6GMYW42K.js → chunk-TYHDZUL4.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-WSYPVBKS.js +80 -0
- package/dist/cli-bundle/focused-chunks/{chunk-Z7GIVH6B.js → chunk-WXLG7HZ5.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-5WCQFH6D.js → chunk-WZDFCVLX.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-VS2ZFPXD.js → chunk-YGO3FWA2.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-YVLAP3BL.js +23 -0
- package/dist/cli-bundle/focused-chunks/{chunk-6OKPYCLU.js → chunk-ZQRCVRGS.js} +54 -54
- package/dist/cli-bundle/focused-chunks/chunk-ZYXQACPB.js +2 -0
- package/dist/cli-bundle/focused-chunks/{indexed-receipt-blobs-KHWT44EK.js → indexed-receipt-blobs-7XGVHYAO.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{item-transaction-7VLPA2SU.js → item-transaction-PZ2FQ6B2.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{mutation-admission-2DH27R5Y.js → mutation-admission-XOOK6XFH.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{settlement-hook-SJV52ZTV.js → settlement-hook-H56537UV.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{stage-FYOBWQA7.js → stage-4SQHVI3O.js} +2 -2
- package/dist/cli-bundle/main.js +30 -29
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +1 -1
- package/dist/cli-bundle/sdk-core.js +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 +57 -57
- 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/extensions/extension-hook-runtime.js +1 -1
- package/dist/core/extensions/extension-types.d.ts +5 -0
- package/dist/core/extensions/extension-types.js +1 -1
- package/dist/core/extensions/item-fields.d.ts +1 -1
- package/dist/core/extensions/item-fields.js +1 -1
- package/dist/core/item/parse.js +2 -2
- package/dist/core/lock/lock-confinement.d.ts +55 -0
- package/dist/core/lock/lock-confinement.js +2 -0
- package/dist/core/lock/lock-gc.js +1 -1
- package/dist/core/lock/lock.js +2 -2
- package/dist/core/schema/runtime-field-values.d.ts +30 -0
- package/dist/core/schema/runtime-field-values.js +1 -1
- package/dist/core/sentry/helpers.js +1 -1
- package/dist/core/sentry/instrument.js +1 -1
- package/dist/core/shared/error-details.d.ts +98 -0
- package/dist/core/shared/error-details.js +2 -0
- package/dist/core/shared/errors.d.ts +43 -0
- package/dist/core/shared/errors.js +1 -1
- package/dist/core/store/settings-sections.d.ts +61 -0
- package/dist/core/store/settings-sections.js +3 -0
- package/dist/core/store/settings-validator.d.ts +4 -0
- package/dist/core/store/settings-validator.js +1 -1
- package/dist/core/store/settings.d.ts +29 -2
- package/dist/core/store/settings.js +4 -3
- package/dist/core/telemetry/consent.js +2 -2
- package/dist/core/telemetry/runtime.js +2 -2
- package/dist/core/test/background-runs.js +3 -3
- package/dist/mcp/server.js +2 -2
- package/dist/sdk/config.js +1 -1
- package/dist/sdk/errors.d.ts +6 -2
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/extension-command-context.js +2 -2
- package/dist/sdk/generated/error-code-catalog-rows.d.ts +39 -0
- package/dist/sdk/generated/error-code-catalog-rows.js +2 -0
- package/dist/sdk/generated/generated-error-code-catalog-part-1.d.ts +3 -3
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
- package/dist/sdk/generated/generated-error-code-catalog-part-2.d.ts +3 -3
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1 -1
- package/dist/sdk/generated-error-code-catalog.js +1 -1
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/lifecycle/core-field-recovery.d.ts +26 -0
- package/dist/sdk/lifecycle/core-field-recovery.js +1 -1
- package/dist/sdk/lifecycle/create.js +1 -1
- package/dist/sdk/lifecycle/update.js +2 -2
- package/dist/sdk/mcp/discovery.js +1 -1
- package/dist/sdk/public-surface.json +1 -1
- package/dist/sdk/runtime-primitives.d.ts +2 -1
- package/dist/sdk/runtime-primitives.js +1 -1
- package/dist/sdk/runtime.d.ts +1 -1
- package/dist/sdk/runtime.js +1 -1
- package/dist/sdk/test/entry.d.ts +5 -0
- package/dist/sdk/test/entry.js +2 -2
- package/dist/sdk/test/execution.d.ts +1 -2
- package/dist/sdk/test/execution.js +2 -2
- package/dist/sdk/test/linked-command-detection.d.ts +10 -0
- package/dist/sdk/test/linked-command-detection.js +1 -1
- package/dist/sdk/test/update.d.ts +2 -0
- package/dist/sdk/test/update.js +1 -1
- package/docs/AGENT_EVIDENCE_CONSISTENCY.md +10 -0
- package/docs/CONFIGURATION.md +9 -0
- package/docs/DEVELOPMENT_DEPENDENCY_SECURITY.md +9 -6
- package/docs/EXTENSIONS.md +2 -2
- package/docs/LINKED_TEST_EDITS.md +38 -5
- package/docs/RELEASING.md +22 -2
- package/docs/SDK.md +103 -1
- package/docs/SDK_CONFIGURATION_SAFETY.md +55 -0
- package/docs/TESTING.md +2 -1
- package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +15 -3
- package/marketplace.json +1 -1
- package/package.json +9 -3
- 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-5WVE7XBS.js +0 -114
- package/dist/cli-bundle/chunks/chunk-E74BORFX.js +0 -128
- package/dist/cli-bundle/chunks/chunk-MP2DQJH2.js +0 -3
- package/dist/cli-bundle/chunks/chunk-O6TFUV6M.js +0 -31
- package/dist/cli-bundle/chunks/item-transaction-Q5S5YLEJ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-3Z53POXU.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-7WJDRZOR.js +0 -22
- package/dist/cli-bundle/focused-chunks/chunk-AL7SOFUL.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-CIQ6YWCW.js +0 -26
- package/dist/cli-bundle/focused-chunks/chunk-GE755ODZ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-JCR32IAO.js +0 -91
- package/dist/cli-bundle/focused-chunks/chunk-M22TI7LP.js +0 -79
- package/dist/cli-bundle/focused-chunks/chunk-SXZM4PSS.js +0 -44
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as Pe,b as Oe,c as Ae,d as Fe,e as Re,f as Te,g as Me,h as Be,i as $,j as D,k as j,l as K,m as H,p as U,q,w as G,x as Y,y as X,z as J}from"./focused-chunks/chunk-5TWS5KOM.js";import{a as M,b as B,c as N,d as L,u as Q}from"./focused-chunks/chunk-LVA76N27.js";import"./focused-chunks/chunk-Z7GIVH6B.js";import"./focused-chunks/chunk-6GMYW42K.js";import"./focused-chunks/chunk-UQIBGLDR.js";import{a as g}from"./focused-chunks/chunk-AL7SOFUL.js";import"./focused-chunks/chunk-VFQAZLKO.js";import"./focused-chunks/chunk-AK2CI2GI.js";import{Bb as R,Cb as T,J as x,K as k,L as C,M as I,N as F,O as w,b as y,c as E,f as m,fc as V,hc as z,ic as W}from"./focused-chunks/chunk-CIQ6YWCW.js";import{b as we,c as Se,d as be}from"./focused-chunks/chunk-JLXGRDTG.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="52f6eff3-e226-56d9-893a-f16997d11c50")}catch{}})();function He(e){return e}function Ue(e){return e}function Z(e,o){for(let r of o.commands??[])e.registerCommand(r);for(let[r,t]of Object.entries(o.commandOverrides??{}))e.registerCommand(r,t);for(let[r,t]of Object.entries(o.flags??{}))e.registerFlags(r,t);for(let[r,t]of Object.entries(o.parsers??{}))e.registerParser(r,t);for(let[r,t]of Object.entries(o.renderers??{}))if(typeof t=="function")e.registerRenderer(r,t);else{let{run:i,...s}=t;e.registerRenderer(r,i,s)}for(let[r,t]of Object.entries(o.services??{}))e.registerService(r,t)}function ee(e,o){for(let s of o.preflights??[])e.registerPreflight(s);let r=o.itemTypes??[];r.length>0&&e.registerItemTypes(r);let t=o.itemFields??[];t.length>0&&e.registerItemFields(t);let i=o.relationshipKinds??[];i.length>0&&e.registerRelationshipKinds(i);for(let s of o.migrations??[])e.registerMigration(s);for(let s of o.profiles??[])e.registerProfile(s)}function re(e,o){for(let r of o.searchProviders??[])e.registerSearchProvider(r);for(let r of o.vectorStoreAdapters??[])e.registerVectorStoreAdapter(r);for(let r of o.assuranceProviders??[])e.registerAssuranceMeasurementProvider(r);for(let r of o.importers??[])e.registerImporter(r.name,r.importer,r.options);for(let r of o.exporters??[])e.registerExporter(r.name,r.exporter,r.options)}function oe(e,o){for(let r of o.beforeCommand??[])e.hooks.beforeCommand(r);for(let r of o.beforeMutation??[])e.hooks.beforeMutation(r);for(let r of o.afterCommand??[])e.hooks.afterCommand(r);for(let r of o.onWrite??[])e.hooks.onWrite(r);for(let r of o.onRead??[])e.hooks.onRead(r);for(let r of o.onIndex??[])e.hooks.onIndex(r)}function te(e){let o={activate:async r=>{Z(r,e),ee(r,e),re(r,e),oe(r,e.hooks??{}),await e.activate?.(r)}};return e.manifest&&(o.manifest=e.manifest),e.deactivate&&(o.deactivate=e.deactivate),o}function d(e){let o=e.flatMap(r=>r??[]);return o.length>0?o:void 0}function p(e){let o=Object.assign({},...e.map(r=>r??{}));return Object.keys(o).length>0?o:void 0}function ne(e){let o={};for(let r of e)for(let[t,i]of Object.entries(r??{}))o[t]=[...o[t]??[],...i];return Object.keys(o).length>0?o:void 0}var ie=["beforeCommand","beforeMutation","afterCommand","onWrite","onRead","onIndex"];function se(e,o,r){let t=o.map(s=>s?.[r]),i=d(t);if(i!==void 0){let s=e;s[r]=i}}function ae(e){let o={};for(let r of ie)se(o,e,r);return Object.keys(o).length>0?o:void 0}function qe(...e){let o={},r=(n,c)=>{c!==void 0&&(o[n]=c)};r("commands",d(e.map(n=>n.commands))),r("commandOverrides",p(e.map(n=>n.commandOverrides))),r("flags",ne(e.map(n=>n.flags))),r("parsers",p(e.map(n=>n.parsers))),r("renderers",p(e.map(n=>n.renderers))),r("services",p(e.map(n=>n.services))),r("preflights",d(e.map(n=>n.preflights))),r("itemTypes",d(e.map(n=>n.itemTypes))),r("itemFields",d(e.map(n=>n.itemFields))),r("relationshipKinds",d(e.map(n=>n.relationshipKinds))),r("migrations",d(e.map(n=>n.migrations))),r("profiles",d(e.map(n=>n.profiles))),r("searchProviders",d(e.map(n=>n.searchProviders))),r("vectorStoreAdapters",d(e.map(n=>n.vectorStoreAdapters))),r("assuranceProviders",d(e.map(n=>n.assuranceProviders))),r("importers",d(e.map(n=>n.importers))),r("exporters",d(e.map(n=>n.exporters))),r("hooks",ae(e.map(n=>n.hooks)));let t;for(let n of e)n.manifest&&(t=n.manifest);r("manifest",t);let i=e.some(n=>n.activate);r("activate",i?async n=>{for(let c of e)c.activate&&await c.activate(n)}:void 0);let s=e.some(n=>n.deactivate);return r("deactivate",s?async()=>{let n=[];for(let c of[...e].reverse())if(c.deactivate)try{await c.deactivate()}catch(f){n.push(f)}if(n.length>0)throw n.length>1?new AggregateError(n,"Multiple extension blueprint deactivate hooks failed."):n[0]}:void 0),o}var ce=[["commands","commands"],["commandOverrides","commands"],["flags","schema"],["itemTypes","schema"],["itemFields","schema"],["relationshipKinds","schema"],["migrations","schema"],["profiles","schema"],["parsers","parser"],["renderers","renderers"],["services","services"],["preflights","preflight"],["searchProviders","search"],["vectorStoreAdapters","search"],["assuranceProviders","services"],["importers","importers"],["exporters","importers"]];function u(e){return e?Array.isArray(e)?e.length>0:Object.keys(e).length>0:!1}function h(e){let o=new Set;for(let[i,s]of ce)u(e[i])&&o.add(s);(e.commands??[]).filter(l).some(i=>i.flags!==void 0)&&o.add("schema");let r=[...e.importers??[],...e.exporters??[]].filter(l);r.some(i=>i?.options?.flags!==void 0)&&o.add("schema"),r.some(i=>typeof i=="object")&&o.add("commands");let t=e.hooks??{};return[t.beforeCommand,t.beforeMutation,t.afterCommand,t.onWrite,t.onRead,t.onIndex].some(u)&&o.add("hooks"),[...o].sort((i,s)=>i.localeCompare(s))}var me=[["beforeCommand","before_command"],["beforeMutation","before_mutation"],["afterCommand","after_command"],["onWrite","on_write"],["onRead","on_read"],["onIndex","on_index"]];function a(e){return[...new Set(e)].sort((o,r)=>o.localeCompare(r))}function l(e){return e!=null}function v(e){return m(`${e.name} import`)}function _(e){return m(`${e.name} export`)}function de(e,o,r){return[...e.map(t=>m(t.name)),...o.filter(t=>t.options!==void 0).map(v),...r.filter(t=>t.options!==void 0).map(_)]}function fe(e,o,r,t){return[...Object.keys(e.flags??{}).map(i=>m(i)),...o.filter(i=>i.flags!==void 0).map(i=>m(i.name)),...r.filter(i=>i.options?.flags!==void 0).map(v),...t.filter(i=>i.options?.flags!==void 0).map(_)]}function le(e){return me.filter(([o])=>(e[o]?.length??0)>0).map(([,o])=>o)}function pe(e){let o=Object.entries(e??{}).filter(([,r])=>typeof r!="function"&&((r.commands?.length??0)>0||r.resultDiscriminator!==void 0)).map(([r,t])=>{let i=t;return{format:r,commands:a((i.commands??[]).map(s=>m(s))),result_discriminator:i.resultDiscriminator!==void 0}}).sort((r,t)=>r.format.localeCompare(t.format));return o.length>0?{renderer_ownership:o}:{}}function ue(e){return!e||e.length===0?{}:{assurance_providers:a(e.map(o=>o.id))}}function ge(e,o,r){return{item_types:a((e.itemTypes??[]).map(t=>t.name)),item_fields:a((e.itemFields??[]).map(t=>t.name)),...(e.relationshipKinds?.length??0)>0?{relationship_kinds:a(e.relationshipKinds.map(t=>t.kind))}:{},migrations:a((e.migrations??[]).flatMap(t=>typeof t.id=="string"?[t.id]:[])),profiles:a((e.profiles??[]).map(t=>t.name)),importers:a(o.map(t=>m(t.name))),exporters:a(r.map(t=>m(t.name))),search_providers:a((e.searchProviders??[]).map(t=>t.name)),vector_store_adapters:a((e.vectorStoreAdapters??[]).map(t=>t.name)),...ue(e.assuranceProviders),parser_overrides:a(Object.keys(e.parsers??{}).map(t=>m(t))),service_overrides:a(Object.keys(e.services??{}).map(t=>String(t).trim().toLowerCase())),renderer_overrides:a(Object.keys(e.renderers??{}).map(t=>String(t).trim().toLowerCase())),...pe(e.renderers),preflight_overrides:(e.preflights??[]).length,preflight_ownership:(e.preflights??[]).map(t=>({commands:[...t.commands??[]]}))}}function Ve(e){let o=(e.commands??[]).filter(l),r=(e.importers??[]).filter(l),t=(e.exporters??[]).filter(l),i=r.map(v),s=t.map(_),n=de(o,r,t),c=fe(e,o,r,t),f=e.hooks??{},O=ge(e,r,t);return{capabilities:h(e),commands:a(n),command_overrides:a(Object.keys(e.commandOverrides??{}).map(A=>m(A))),command_handlers:a([...n,...i,...s]),hooks:le(f),flag_commands:a(c),...O}}var he=["commands","commandOverrides","flags","parsers","renderers","services","preflights","itemTypes","itemFields","relationshipKinds","migrations","profiles","searchProviders","vectorStoreAdapters","assuranceProviders","importers","exporters"];function ve(e){return(e.itemFields??[]).filter(o=>typeof o?.name=="string"&&g.has(o.name.trim())).map(o=>({code:"reserved_item_field",severity:"error",message:`Item field "${o.name}" collides with reserved item metadata; rename it with an extension-specific prefix before publishing.`,field:o.name}))}function _e(e){return[...Object.values(e.flags??{}).flat(),...(e.commands??[]).flatMap(o=>o.flags??[]),...(e.importers??[]).flatMap(o=>o.options?.flags??[]),...(e.exporters??[]).flatMap(o=>o.options?.flags??[])].flatMap(o=>{if(typeof o?.long!="string"&&typeof o?.short!="string")return[];let r=x(o.long,o.short);if(r===null)return[];let{token:t,failure:i}=r;return[{code:i,severity:"error",message:`Flag "${t}" ${k(t,i)}.`,field:t}]})}function b(e){let o=new Set;for(let r of e){let t=E(r)??y(r);t!==null&&o.add(t)}return[...o].sort((r,t)=>r.localeCompare(t))}function ye(e,o){let r=[];if(o===null)return e.length>0&&r.push({code:"manifest_capabilities_absent",severity:"warning",message:`Blueprint exercises ${e.length===1?"capability":"capabilities"} [${e.join(", ")}] but declares none; set capabilities to deriveExtensionCapabilities(blueprint) so the manifest grant matches.`}),r;let t=new Set(o),i=new Set(e);for(let s of e)t.has(s)||r.push({code:"capability_undeclared",severity:"error",message:`Blueprint exercises capability "${s}" but it is absent from the declared capabilities; activation throws extension_capability_missing \u2014 add "${s}" to the manifest capabilities.`,capability:s});for(let s of o)i.has(s)||r.push({code:"capability_unused",severity:"warning",message:`Capability "${s}" is declared but no blueprint surface exercises it; drop it to keep the manifest least-privilege (pm package doctor reports this as extension_capability_unused).`,capability:s});return r}function Ee(e){let o=[],r=new Map;for(let i of e.commands??[]){let s=m(i.name);r.set(s,(r.get(s)??0)+1)}for(let[i,s]of r)s>1&&o.push({code:"duplicate_command",severity:"warning",message:`Command "${i}" is declared ${s} times in commands; the later registration shadows the earlier one at dispatch.`,command:i});let t=new Set(Object.keys(e.commandOverrides??{}).map(i=>m(i)));for(let i of r.keys())t.has(i)&&o.push({code:"command_override_conflict",severity:"warning",message:`Command "${i}" is declared both as a new command definition and as a command override; register one or the other.`,command:i});return o}function xe(e){let o=[];for(let r of he)r in e&&!u(e[r])&&o.push({code:"empty_surface",severity:"warning",message:`Blueprint field "${r}" is present but empty; remove it or populate it.`,field:r});if("hooks"in e){let r=e.hooks??{};[r.beforeCommand,r.beforeMutation,r.afterCommand,r.onWrite,r.onRead,r.onIndex].some(u)||o.push({code:"empty_surface",severity:"warning",message:'Blueprint field "hooks" is present but registers no lifecycle hooks; remove it or populate it.',field:"hooks"})}return o}function ke(e,o={}){let r=h(e),t=o.declaredCapabilities??e.manifest?.capabilities,i=Array.isArray(t)?b(t):null,s=[...ye(r,i),...Ee(e),..._e(e),...ve(e),...xe(e)];return{ok:s.every(n=>n.severity!=="error"),findings:s,used:r,declared:i}}function P(e,o){let{additionalCapabilities:r,...t}=o,i=Array.isArray(r)?b(r):[],s=[...new Set([...h(e),...i])].sort((n,c)=>n.localeCompare(c));return{...t,capabilities:s}}function ze(e,o){let r=P(e,o);return{module:te({...e,manifest:r}),manifest:r}}function S(e,o){if(e.status==="absent"||e.status==="ok")return null;let r=`${e.kind}_${e.status}`,t="";switch(r){case"pm_min_version_invalid":t=`pm_min_version "${e.required}" is not a valid version; the extension is treated as incompatible and the loader skips it.`;break;case"pm_min_version_unchecked":t=`pm_min_version "${e.required}" could not be compared against pm ${o}; compatibility is unverified.`;break;case"pm_min_version_unmet":t=`Requires pm >= ${e.required} but the target is pm ${o}; the loader skips the extension.`;break;case"pm_max_version_invalid":t=`pm_max_version "${e.required}" is not a valid inclusive upper bound (version ranges are not allowed); the extension is treated as incompatible and the loader skips it.`;break;case"pm_max_version_unchecked":t=`pm_max_version "${e.required}" could not be compared against pm ${o}; compatibility is unverified.`;break;case"pm_max_version_exceeded":t=`Allows pm <= ${e.required} but the target is pm ${o}; the loader skips the extension.`;break;case"pm_max_version_exceeded_warn":t=`Target pm ${o} is newer than pm_max_version ${e.required}, but the "warn" exceeded mode lets it load with a warning.`;break}return{code:r,severity:e.allowed?"warning":"error",constraint:e.kind,required:e.required,current:o,message:t}}function Ce(e,o){let r=C(e.pm_min_version,o.pmVersion),t=I(e.pm_max_version,o.pmVersion,o.pmMaxVersionExceededMode??"block"),i=w(e).findings.map(f=>({code:f.code,severity:"warning",constraint:"manifest",required:f.code==="manifest_unknown_key"?f.path:"pm_min_version",current:o.pmVersion,path:f.path,...f.suggested_key?{suggested_key:f.suggested_key}:{},message:f.message})),s=[],n=S(r,o.pmVersion);n!==null&&s.push(n);let c=S(t,o.pmVersion);return c!==null&&s.push(c),{compatible:r.allowed&&t.allowed,findings:[...i,...s],pmVersion:o.pmVersion}}var Ie=new Set(["capability_undeclared","capability_unused","manifest_capabilities_absent"]);function We(e,o={}){let r=ke(e,{declaredCapabilities:o.declaredCapabilities}),t=o.identity?P(e,o.identity):null,i=o.target?Ce(t??e.manifest??{},o.target):null,s=[...(t!==null&&o.declaredCapabilities===void 0?r.findings.filter(n=>!Ie.has(n.code)):r.findings).map(n=>({source:"blueprint",severity:n.severity,code:n.code,message:n.message})),...(i?.findings??[]).map(n=>({source:"compatibility",severity:n.severity,code:n.code,message:n.message}))];return{ok:s.every(n=>n.severity!=="error"),capabilities:r.used,blueprint:r,manifest:t,compatibility:i,findings:s}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="4c9a1aa8-05b6-53da-a8b1-f1a7289d39cf")}catch{}})();function Ye(e){return e}function Xe(e){return e}function Je(e){return e}function Qe(e){return e}function Ze(e){return e}function er(e){return e}function rr(e){return e}function or(e){return e}function tr(e){return e}function nr(e){return e}function ir(e){return e}function sr(e){return e}function ar(e){return e}function cr(e){return{handled:!0,result:e}}function mr(){return{handled:!1}}function dr(e){return e}function fr(e){return e}function lr(e){return e}function pr(e){return e}function ur(e){return e}function gr(e){return e}function hr(e){return e}function vr(e){return e}function _r(e){return e}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="d0b86c6a-67f0-52f2-90b8-d1058e8f2284")}catch{}})();export{D as BUILTIN_PROFILES,Pe as EXTENSION_CAPABILITIES,be as EXTENSION_CAPABILITY_CONTRACT,we as EXTENSION_CAPABILITY_CONTRACT_VERSION,Se as EXTENSION_CAPABILITY_LEGACY_ALIASES,V as EXTENSION_CAPABILITY_REGISTRATION_SURFACES,Oe as EXTENSION_POLICY_MODES,Ae as EXTENSION_POLICY_SURFACES,Re as EXTENSION_SANDBOX_PROFILES,Fe as EXTENSION_TRUST_MODES,Me as LIST_FILTER_EXTENSION_FLAG_DEFINITIONS,B as PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS,M as PM_PACKAGE_RESOURCE_KINDS,Y as PROFILE_LINT_CODES,G as PROFILE_LINT_DIMENSIONS,$ as PROFILE_NAMES,g as RESERVED_ITEM_FIELD_NAMES,Be as SEARCH_EXTENSION_FLAG_DEFINITIONS,Ce as checkExtensionManifestCompatibility,L as collectPackageExtensionDirectories,z as collectUsedExtensionCapabilities,te as composeExtension,ze as composeExtensionPackage,T as createExtensionContributionInventory,mr as declineServiceOverride,gr as defineAfterCommandHook,pr as defineBeforeCommandHook,ur as defineBeforeMutationHook,Je as defineCommand,nr as defineCommandOverride,lr as defineExporter,He as defineExtension,Ue as defineExtensionBlueprint,Ye as defineExtensionManifest,Qe as defineFlag,fr as defineImporter,er as defineItemField,Ze as defineItemType,rr as defineMigration,_r as defineOnIndexHook,vr as defineOnReadHook,hr as defineOnWriteHook,ir as defineParserOverride,sr as definePreflightOverride,Xe as defineProjectProfile,dr as defineRendererOverride,or as defineSearchProvider,ar as defineServiceOverride,tr as defineVectorStoreAdapter,h as deriveExtensionCapabilities,Ve as describeExtensionBlueprint,U as describeProfileComposition,q as describeProjectProfile,cr as handleServiceOverride,F as inspectExtensionManifestSchema,ke as lintExtensionBlueprint,w as lintExtensionManifestSchema,X as lintProjectProfile,H as listProfiles,qe as mergeExtensionBlueprints,R as normalizeExtensionContributionInventory,j as normalizeProfileName,J as planProfileApplication,We as preflightExtension,N as readPmPackageManifest,W as reconcileExtensionCapabilityUsage,Q as renderExtensionSurfaceMarkdown,K as resolveProfile,P as synthesizeExtensionManifest,Te as toExtensionFlagDefinitions};
|
|
1
|
+
import{a as Pe,b as Oe,c as Ae,d as Fe,e as Re,f as Te,g as Me,h as Be,i as $,j as D,k as j,l as K,m as H,p as U,q,w as G,x as Y,y as X,z as J}from"./focused-chunks/chunk-HOXIIZEO.js";import{a as M,b as B,c as N,d as L,u as Q}from"./focused-chunks/chunk-I5FODKYB.js";import"./focused-chunks/chunk-WXLG7HZ5.js";import"./focused-chunks/chunk-TYHDZUL4.js";import"./focused-chunks/chunk-F3X6UWMI.js";import{a as g}from"./focused-chunks/chunk-RY4QEMAE.js";import"./focused-chunks/chunk-HJ27QLZV.js";import"./focused-chunks/chunk-AK2CI2GI.js";import{Bb as R,Cb as T,J as x,K as k,L as C,M as I,N as F,O as w,b as y,c as E,f as m,hc as V,jc as z,kc as W}from"./focused-chunks/chunk-HUXZCPWT.js";import{b as we,c as Se,d as be}from"./focused-chunks/chunk-G6ERMFJ5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="52f6eff3-e226-56d9-893a-f16997d11c50")}catch{}})();function He(e){return e}function Ue(e){return e}function Z(e,o){for(let r of o.commands??[])e.registerCommand(r);for(let[r,t]of Object.entries(o.commandOverrides??{}))e.registerCommand(r,t);for(let[r,t]of Object.entries(o.flags??{}))e.registerFlags(r,t);for(let[r,t]of Object.entries(o.parsers??{}))e.registerParser(r,t);for(let[r,t]of Object.entries(o.renderers??{}))if(typeof t=="function")e.registerRenderer(r,t);else{let{run:i,...s}=t;e.registerRenderer(r,i,s)}for(let[r,t]of Object.entries(o.services??{}))e.registerService(r,t)}function ee(e,o){for(let s of o.preflights??[])e.registerPreflight(s);let r=o.itemTypes??[];r.length>0&&e.registerItemTypes(r);let t=o.itemFields??[];t.length>0&&e.registerItemFields(t);let i=o.relationshipKinds??[];i.length>0&&e.registerRelationshipKinds(i);for(let s of o.migrations??[])e.registerMigration(s);for(let s of o.profiles??[])e.registerProfile(s)}function re(e,o){for(let r of o.searchProviders??[])e.registerSearchProvider(r);for(let r of o.vectorStoreAdapters??[])e.registerVectorStoreAdapter(r);for(let r of o.assuranceProviders??[])e.registerAssuranceMeasurementProvider(r);for(let r of o.importers??[])e.registerImporter(r.name,r.importer,r.options);for(let r of o.exporters??[])e.registerExporter(r.name,r.exporter,r.options)}function oe(e,o){for(let r of o.beforeCommand??[])e.hooks.beforeCommand(r);for(let r of o.beforeMutation??[])e.hooks.beforeMutation(r);for(let r of o.afterCommand??[])e.hooks.afterCommand(r);for(let r of o.onWrite??[])e.hooks.onWrite(r);for(let r of o.onRead??[])e.hooks.onRead(r);for(let r of o.onIndex??[])e.hooks.onIndex(r)}function te(e){let o={activate:async r=>{Z(r,e),ee(r,e),re(r,e),oe(r,e.hooks??{}),await e.activate?.(r)}};return e.manifest&&(o.manifest=e.manifest),e.deactivate&&(o.deactivate=e.deactivate),o}function d(e){let o=e.flatMap(r=>r??[]);return o.length>0?o:void 0}function p(e){let o=Object.assign({},...e.map(r=>r??{}));return Object.keys(o).length>0?o:void 0}function ne(e){let o={};for(let r of e)for(let[t,i]of Object.entries(r??{}))o[t]=[...o[t]??[],...i];return Object.keys(o).length>0?o:void 0}var ie=["beforeCommand","beforeMutation","afterCommand","onWrite","onRead","onIndex"];function se(e,o,r){let t=o.map(s=>s?.[r]),i=d(t);if(i!==void 0){let s=e;s[r]=i}}function ae(e){let o={};for(let r of ie)se(o,e,r);return Object.keys(o).length>0?o:void 0}function qe(...e){let o={},r=(n,c)=>{c!==void 0&&(o[n]=c)};r("commands",d(e.map(n=>n.commands))),r("commandOverrides",p(e.map(n=>n.commandOverrides))),r("flags",ne(e.map(n=>n.flags))),r("parsers",p(e.map(n=>n.parsers))),r("renderers",p(e.map(n=>n.renderers))),r("services",p(e.map(n=>n.services))),r("preflights",d(e.map(n=>n.preflights))),r("itemTypes",d(e.map(n=>n.itemTypes))),r("itemFields",d(e.map(n=>n.itemFields))),r("relationshipKinds",d(e.map(n=>n.relationshipKinds))),r("migrations",d(e.map(n=>n.migrations))),r("profiles",d(e.map(n=>n.profiles))),r("searchProviders",d(e.map(n=>n.searchProviders))),r("vectorStoreAdapters",d(e.map(n=>n.vectorStoreAdapters))),r("assuranceProviders",d(e.map(n=>n.assuranceProviders))),r("importers",d(e.map(n=>n.importers))),r("exporters",d(e.map(n=>n.exporters))),r("hooks",ae(e.map(n=>n.hooks)));let t;for(let n of e)n.manifest&&(t=n.manifest);r("manifest",t);let i=e.some(n=>n.activate);r("activate",i?async n=>{for(let c of e)c.activate&&await c.activate(n)}:void 0);let s=e.some(n=>n.deactivate);return r("deactivate",s?async()=>{let n=[];for(let c of[...e].reverse())if(c.deactivate)try{await c.deactivate()}catch(f){n.push(f)}if(n.length>0)throw n.length>1?new AggregateError(n,"Multiple extension blueprint deactivate hooks failed."):n[0]}:void 0),o}var ce=[["commands","commands"],["commandOverrides","commands"],["flags","schema"],["itemTypes","schema"],["itemFields","schema"],["relationshipKinds","schema"],["migrations","schema"],["profiles","schema"],["parsers","parser"],["renderers","renderers"],["services","services"],["preflights","preflight"],["searchProviders","search"],["vectorStoreAdapters","search"],["assuranceProviders","services"],["importers","importers"],["exporters","importers"]];function u(e){return e?Array.isArray(e)?e.length>0:Object.keys(e).length>0:!1}function h(e){let o=new Set;for(let[i,s]of ce)u(e[i])&&o.add(s);(e.commands??[]).filter(l).some(i=>i.flags!==void 0)&&o.add("schema");let r=[...e.importers??[],...e.exporters??[]].filter(l);r.some(i=>i?.options?.flags!==void 0)&&o.add("schema"),r.some(i=>typeof i=="object")&&o.add("commands");let t=e.hooks??{};return[t.beforeCommand,t.beforeMutation,t.afterCommand,t.onWrite,t.onRead,t.onIndex].some(u)&&o.add("hooks"),[...o].sort((i,s)=>i.localeCompare(s))}var me=[["beforeCommand","before_command"],["beforeMutation","before_mutation"],["afterCommand","after_command"],["onWrite","on_write"],["onRead","on_read"],["onIndex","on_index"]];function a(e){return[...new Set(e)].sort((o,r)=>o.localeCompare(r))}function l(e){return e!=null}function v(e){return m(`${e.name} import`)}function _(e){return m(`${e.name} export`)}function de(e,o,r){return[...e.map(t=>m(t.name)),...o.filter(t=>t.options!==void 0).map(v),...r.filter(t=>t.options!==void 0).map(_)]}function fe(e,o,r,t){return[...Object.keys(e.flags??{}).map(i=>m(i)),...o.filter(i=>i.flags!==void 0).map(i=>m(i.name)),...r.filter(i=>i.options?.flags!==void 0).map(v),...t.filter(i=>i.options?.flags!==void 0).map(_)]}function le(e){return me.filter(([o])=>(e[o]?.length??0)>0).map(([,o])=>o)}function pe(e){let o=Object.entries(e??{}).filter(([,r])=>typeof r!="function"&&((r.commands?.length??0)>0||r.resultDiscriminator!==void 0)).map(([r,t])=>{let i=t;return{format:r,commands:a((i.commands??[]).map(s=>m(s))),result_discriminator:i.resultDiscriminator!==void 0}}).sort((r,t)=>r.format.localeCompare(t.format));return o.length>0?{renderer_ownership:o}:{}}function ue(e){return!e||e.length===0?{}:{assurance_providers:a(e.map(o=>o.id))}}function ge(e,o,r){return{item_types:a((e.itemTypes??[]).map(t=>t.name)),item_fields:a((e.itemFields??[]).map(t=>t.name)),...(e.relationshipKinds?.length??0)>0?{relationship_kinds:a(e.relationshipKinds.map(t=>t.kind))}:{},migrations:a((e.migrations??[]).flatMap(t=>typeof t.id=="string"?[t.id]:[])),profiles:a((e.profiles??[]).map(t=>t.name)),importers:a(o.map(t=>m(t.name))),exporters:a(r.map(t=>m(t.name))),search_providers:a((e.searchProviders??[]).map(t=>t.name)),vector_store_adapters:a((e.vectorStoreAdapters??[]).map(t=>t.name)),...ue(e.assuranceProviders),parser_overrides:a(Object.keys(e.parsers??{}).map(t=>m(t))),service_overrides:a(Object.keys(e.services??{}).map(t=>String(t).trim().toLowerCase())),renderer_overrides:a(Object.keys(e.renderers??{}).map(t=>String(t).trim().toLowerCase())),...pe(e.renderers),preflight_overrides:(e.preflights??[]).length,preflight_ownership:(e.preflights??[]).map(t=>({commands:[...t.commands??[]]}))}}function Ve(e){let o=(e.commands??[]).filter(l),r=(e.importers??[]).filter(l),t=(e.exporters??[]).filter(l),i=r.map(v),s=t.map(_),n=de(o,r,t),c=fe(e,o,r,t),f=e.hooks??{},O=ge(e,r,t);return{capabilities:h(e),commands:a(n),command_overrides:a(Object.keys(e.commandOverrides??{}).map(A=>m(A))),command_handlers:a([...n,...i,...s]),hooks:le(f),flag_commands:a(c),...O}}var he=["commands","commandOverrides","flags","parsers","renderers","services","preflights","itemTypes","itemFields","relationshipKinds","migrations","profiles","searchProviders","vectorStoreAdapters","assuranceProviders","importers","exporters"];function ve(e){return(e.itemFields??[]).filter(o=>typeof o?.name=="string"&&g.has(o.name.trim())).map(o=>({code:"reserved_item_field",severity:"error",message:`Item field "${o.name}" collides with reserved item metadata; rename it with an extension-specific prefix before publishing.`,field:o.name}))}function _e(e){return[...Object.values(e.flags??{}).flat(),...(e.commands??[]).flatMap(o=>o.flags??[]),...(e.importers??[]).flatMap(o=>o.options?.flags??[]),...(e.exporters??[]).flatMap(o=>o.options?.flags??[])].flatMap(o=>{if(typeof o?.long!="string"&&typeof o?.short!="string")return[];let r=x(o.long,o.short);if(r===null)return[];let{token:t,failure:i}=r;return[{code:i,severity:"error",message:`Flag "${t}" ${k(t,i)}.`,field:t}]})}function b(e){let o=new Set;for(let r of e){let t=E(r)??y(r);t!==null&&o.add(t)}return[...o].sort((r,t)=>r.localeCompare(t))}function ye(e,o){let r=[];if(o===null)return e.length>0&&r.push({code:"manifest_capabilities_absent",severity:"warning",message:`Blueprint exercises ${e.length===1?"capability":"capabilities"} [${e.join(", ")}] but declares none; set capabilities to deriveExtensionCapabilities(blueprint) so the manifest grant matches.`}),r;let t=new Set(o),i=new Set(e);for(let s of e)t.has(s)||r.push({code:"capability_undeclared",severity:"error",message:`Blueprint exercises capability "${s}" but it is absent from the declared capabilities; activation throws extension_capability_missing \u2014 add "${s}" to the manifest capabilities.`,capability:s});for(let s of o)i.has(s)||r.push({code:"capability_unused",severity:"warning",message:`Capability "${s}" is declared but no blueprint surface exercises it; drop it to keep the manifest least-privilege (pm package doctor reports this as extension_capability_unused).`,capability:s});return r}function Ee(e){let o=[],r=new Map;for(let i of e.commands??[]){let s=m(i.name);r.set(s,(r.get(s)??0)+1)}for(let[i,s]of r)s>1&&o.push({code:"duplicate_command",severity:"warning",message:`Command "${i}" is declared ${s} times in commands; the later registration shadows the earlier one at dispatch.`,command:i});let t=new Set(Object.keys(e.commandOverrides??{}).map(i=>m(i)));for(let i of r.keys())t.has(i)&&o.push({code:"command_override_conflict",severity:"warning",message:`Command "${i}" is declared both as a new command definition and as a command override; register one or the other.`,command:i});return o}function xe(e){let o=[];for(let r of he)r in e&&!u(e[r])&&o.push({code:"empty_surface",severity:"warning",message:`Blueprint field "${r}" is present but empty; remove it or populate it.`,field:r});if("hooks"in e){let r=e.hooks??{};[r.beforeCommand,r.beforeMutation,r.afterCommand,r.onWrite,r.onRead,r.onIndex].some(u)||o.push({code:"empty_surface",severity:"warning",message:'Blueprint field "hooks" is present but registers no lifecycle hooks; remove it or populate it.',field:"hooks"})}return o}function ke(e,o={}){let r=h(e),t=o.declaredCapabilities??e.manifest?.capabilities,i=Array.isArray(t)?b(t):null,s=[...ye(r,i),...Ee(e),..._e(e),...ve(e),...xe(e)];return{ok:s.every(n=>n.severity!=="error"),findings:s,used:r,declared:i}}function P(e,o){let{additionalCapabilities:r,...t}=o,i=Array.isArray(r)?b(r):[],s=[...new Set([...h(e),...i])].sort((n,c)=>n.localeCompare(c));return{...t,capabilities:s}}function ze(e,o){let r=P(e,o);return{module:te({...e,manifest:r}),manifest:r}}function S(e,o){if(e.status==="absent"||e.status==="ok")return null;let r=`${e.kind}_${e.status}`,t="";switch(r){case"pm_min_version_invalid":t=`pm_min_version "${e.required}" is not a valid version; the extension is treated as incompatible and the loader skips it.`;break;case"pm_min_version_unchecked":t=`pm_min_version "${e.required}" could not be compared against pm ${o}; compatibility is unverified.`;break;case"pm_min_version_unmet":t=`Requires pm >= ${e.required} but the target is pm ${o}; the loader skips the extension.`;break;case"pm_max_version_invalid":t=`pm_max_version "${e.required}" is not a valid inclusive upper bound (version ranges are not allowed); the extension is treated as incompatible and the loader skips it.`;break;case"pm_max_version_unchecked":t=`pm_max_version "${e.required}" could not be compared against pm ${o}; compatibility is unverified.`;break;case"pm_max_version_exceeded":t=`Allows pm <= ${e.required} but the target is pm ${o}; the loader skips the extension.`;break;case"pm_max_version_exceeded_warn":t=`Target pm ${o} is newer than pm_max_version ${e.required}, but the "warn" exceeded mode lets it load with a warning.`;break}return{code:r,severity:e.allowed?"warning":"error",constraint:e.kind,required:e.required,current:o,message:t}}function Ce(e,o){let r=C(e.pm_min_version,o.pmVersion),t=I(e.pm_max_version,o.pmVersion,o.pmMaxVersionExceededMode??"block"),i=w(e).findings.map(f=>({code:f.code,severity:"warning",constraint:"manifest",required:f.code==="manifest_unknown_key"?f.path:"pm_min_version",current:o.pmVersion,path:f.path,...f.suggested_key?{suggested_key:f.suggested_key}:{},message:f.message})),s=[],n=S(r,o.pmVersion);n!==null&&s.push(n);let c=S(t,o.pmVersion);return c!==null&&s.push(c),{compatible:r.allowed&&t.allowed,findings:[...i,...s],pmVersion:o.pmVersion}}var Ie=new Set(["capability_undeclared","capability_unused","manifest_capabilities_absent"]);function We(e,o={}){let r=ke(e,{declaredCapabilities:o.declaredCapabilities}),t=o.identity?P(e,o.identity):null,i=o.target?Ce(t??e.manifest??{},o.target):null,s=[...(t!==null&&o.declaredCapabilities===void 0?r.findings.filter(n=>!Ie.has(n.code)):r.findings).map(n=>({source:"blueprint",severity:n.severity,code:n.code,message:n.message})),...(i?.findings??[]).map(n=>({source:"compatibility",severity:n.severity,code:n.code,message:n.message}))];return{ok:s.every(n=>n.severity!=="error"),capabilities:r.used,blueprint:r,manifest:t,compatibility:i,findings:s}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="4c9a1aa8-05b6-53da-a8b1-f1a7289d39cf")}catch{}})();function Ye(e){return e}function Xe(e){return e}function Je(e){return e}function Qe(e){return e}function Ze(e){return e}function er(e){return e}function rr(e){return e}function or(e){return e}function tr(e){return e}function nr(e){return e}function ir(e){return e}function sr(e){return e}function ar(e){return e}function cr(e){return{handled:!0,result:e}}function mr(){return{handled:!1}}function dr(e){return e}function fr(e){return e}function lr(e){return e}function pr(e){return e}function ur(e){return e}function gr(e){return e}function hr(e){return e}function vr(e){return e}function _r(e){return e}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="d0b86c6a-67f0-52f2-90b8-d1058e8f2284")}catch{}})();export{D as BUILTIN_PROFILES,Pe as EXTENSION_CAPABILITIES,be as EXTENSION_CAPABILITY_CONTRACT,we as EXTENSION_CAPABILITY_CONTRACT_VERSION,Se as EXTENSION_CAPABILITY_LEGACY_ALIASES,V as EXTENSION_CAPABILITY_REGISTRATION_SURFACES,Oe as EXTENSION_POLICY_MODES,Ae as EXTENSION_POLICY_SURFACES,Re as EXTENSION_SANDBOX_PROFILES,Fe as EXTENSION_TRUST_MODES,Me as LIST_FILTER_EXTENSION_FLAG_DEFINITIONS,B as PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS,M as PM_PACKAGE_RESOURCE_KINDS,Y as PROFILE_LINT_CODES,G as PROFILE_LINT_DIMENSIONS,$ as PROFILE_NAMES,g as RESERVED_ITEM_FIELD_NAMES,Be as SEARCH_EXTENSION_FLAG_DEFINITIONS,Ce as checkExtensionManifestCompatibility,L as collectPackageExtensionDirectories,z as collectUsedExtensionCapabilities,te as composeExtension,ze as composeExtensionPackage,T as createExtensionContributionInventory,mr as declineServiceOverride,gr as defineAfterCommandHook,pr as defineBeforeCommandHook,ur as defineBeforeMutationHook,Je as defineCommand,nr as defineCommandOverride,lr as defineExporter,He as defineExtension,Ue as defineExtensionBlueprint,Ye as defineExtensionManifest,Qe as defineFlag,fr as defineImporter,er as defineItemField,Ze as defineItemType,rr as defineMigration,_r as defineOnIndexHook,vr as defineOnReadHook,hr as defineOnWriteHook,ir as defineParserOverride,sr as definePreflightOverride,Xe as defineProjectProfile,dr as defineRendererOverride,or as defineSearchProvider,ar as defineServiceOverride,tr as defineVectorStoreAdapter,h as deriveExtensionCapabilities,Ve as describeExtensionBlueprint,U as describeProfileComposition,q as describeProjectProfile,cr as handleServiceOverride,F as inspectExtensionManifestSchema,ke as lintExtensionBlueprint,w as lintExtensionManifestSchema,X as lintProjectProfile,H as listProfiles,qe as mergeExtensionBlueprints,R as normalizeExtensionContributionInventory,j as normalizeProfileName,J as planProfileApplication,We as preflightExtension,N as readPmPackageManifest,W as reconcileExtensionCapabilityUsage,Q as renderExtensionSurfaceMarkdown,K as resolveProfile,P as synthesizeExtensionManifest,Te as toExtensionFlagDefinitions};
|
|
2
2
|
//# sourceMappingURL=sdk-authoring.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ji,b as Ai,c as Ri,d as T,e as Di,f as L,g as Ni,h as Li,i as Fi,j as qi,k as zi,l as Ui,m as Gi,n as Hi,o as F,p as Vi,q,u as z,v as Bi,w as Ji,x as U,y as Ki,z as Yi}from"./focused-chunks/chunk-
|
|
1
|
+
import{a as ji,b as Ai,c as Ri,d as T,e as Di,f as L,g as Ni,h as Li,i as Fi,j as qi,k as zi,l as Ui,m as Gi,n as Hi,o as F,p as Vi,q,u as z,v as Bi,w as Ji,x as U,y as Ki,z as Yi}from"./focused-chunks/chunk-ZYXQACPB.js";import{a as Wi}from"./focused-chunks/chunk-SVOOGGAK.js";import{a as Ii}from"./focused-chunks/chunk-YGO3FWA2.js";import{$ as Ei,A as yo,N as fi,O as mi,P as gi,Q as yi,R as bi,S as hi,T as wi,U as xi,V as Ti,W as Ci,X as Pi,Z as vi,_ as ki,a as Je,aa as Mi,b as Ke,ba as Oi,c as Ye,ca as $i,d as We,da as Si,e as Xe,f as Qe,g as Ze,h as et,i as tt,j as Zr,k as eo,l as to,m as ro,n as oo,o as io,p as no,q as so,r as ao,s as co,t as lo,u as po,v as uo,w as _o,x as fo,y as mo,z as go}from"./focused-chunks/chunk-WXLG7HZ5.js";import{$ as er,$a as A,A as Mt,Aa as Er,B as Ot,Ba as Mr,C as $t,Ca as Or,D as St,Da as $r,E as It,Ea as Sr,F as jt,Fa as Ir,Ga as jr,H as At,Ha as Ar,I as Rt,Ia as Rr,J as Dt,Ja as Dr,K as Nt,Ka as Nr,L as Lt,La as Lr,M as Ft,Ma as Fr,N as qt,Na as qr,O as zt,Oa as zr,P as Ut,Pa as Ur,Q as Gt,Qa as Gr,R as Ht,Ra as Hr,S as Vt,Sa as Vr,T as Bt,Ta as Br,U as Jt,Ua as Jr,V as Kt,Va as Kr,W as Yt,Wa as Yr,X as Wt,Xa as Wr,Y as Xt,Z as Qt,Za as Xr,_ as Zt,aa as tr,ab as R,b as ot,ba as rr,bb as Qr,c as it,ca as or,d as nt,da as ir,e as st,ea as nr,f as at,fa as sr,g as dt,ga as ar,h as ct,ha as dr,i as lt,ia as cr,j as pt,ja as lr,k as ut,ka as pr,l as _t,la as ur,m as ft,ma as _r,n as mt,na as fr,o as gt,oa as mr,p as yt,pa as gr,q as bt,qa as yr,r as ht,ra as br,s as wt,sa as hr,t as xt,ta as wr,u as Tt,ua as xr,v as Ct,va as Tr,w as Pt,wa as Cr,x as vt,xa as Pr,y as kt,ya as vr,z as Et,za as kr}from"./focused-chunks/chunk-F3X6UWMI.js";import{a as Xi,b as Qi,c as Zi,d as en,e as tn,f as rn,g as on,h as nn}from"./focused-chunks/chunk-4PW5XWVI.js";import{a as rt}from"./focused-chunks/chunk-AK2CI2GI.js";import{$a as O,$c as Oo,Ab as Be,Ad as Qo,Bd as Zo,Cd as ei,Dd as ti,Fe as _i,Kc as D,Lc as N,Mb as Q,Qc as bo,Rc as ho,Sc as wo,Tc as xo,Ua as ge,Uc as To,Va as ye,Vc as Co,Wa as be,Wc as Po,Xa as he,Xc as vo,Ya as M,Yb as $,Yc as ko,Za as we,Zb as S,Zc as Eo,_a as f,_c as Mo,ab as xe,ad as $o,bb as Te,bc as I,bd as So,cb as Ce,cd as Io,db as Pe,dc as j,dd as jo,eb as ve,ed as Ao,fb as ke,fd as Ro,gb as Ee,gd as Do,hb as Me,hd as No,ib as Oe,jb as $e,kb as Se,mb as Ie,md as Lo,nb as je,nd as Fo,ob as Ae,od as qo,oe as ri,pb as Re,pd as zo,pe as x,qb as De,qd as Uo,qe as oi,rb as Ne,rd as Go,re as ii,sb as Le,sd as Ho,se as ni,tb as Fe,td as Vo,te as si,ub as qe,ud as Bo,ue as ai,vb as ze,vd as Jo,ve as di,wb as Ue,wd as Ko,we as ci,xb as Ge,xd as Yo,xe as li,yb as He,yd as Wo,ye as pi,zb as Ve,zd as Xo,ze as ui}from"./focused-chunks/chunk-HUXZCPWT.js";import{z as w}from"./focused-chunks/chunk-G6ERMFJ5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="8f11e0bf-4115-55a8-bd39-c360f43cdc09")}catch{}})();var Z="2026-07-28",G=["2025-11-25","2025-06-18"],H=[Z];(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="d4a56906-c542-567e-9265-15184a5c330b")}catch{}})();var ee=new Set(["--help","-h","--version","-V"]);function te(e,r){let o=[`Usage: ${e==="stdio"?"pm-mcp":"pm-mcp-http"} [--help | --version]`,"",e==="stdio"?"JSON-RPC over stdin/stdout. With no arguments, starts the stdio server.":"Streamable HTTP POST /mcp. With no arguments, starts the HTTP server.","","Options:"," -h, --help Print help and exit before transport startup."," -V, --version Print the package version and exit.","","Environment:"," PM_PATH Tracker root (otherwise discovered from cwd)."," PM_GLOBAL_PATH Global settings root."," PM_MCP_PROFILE core (default), standard, full, or custom."," PM_MCP_TOOLS Comma-separated tool allowlist for custom profile."," PM_MCP_DISCOVERY_CURSOR_KEY Shared discovery cursor secret, at least 32 UTF-8 bytes."," PM_MCP_BAGGAGE_ALLOWLIST Comma-separated permitted trace baggage keys."];return e==="http"&&o.push(" PM_MCP_HTTP_HOST Bind host (default 127.0.0.1)."," PM_MCP_HTTP_PORT Bind port, 0..65535 (default 3000)."," PM_MCP_HTTP_ALLOWED_ORIGINS Comma-separated exact browser origins (default none)."," PM_MCP_HTTP_BEARER_TOKEN Deployment token for the bundled verifier."," PM_MCP_HTTP_AUTH_ISSUER Exact HTTPS authorization-server issuer."," PM_MCP_HTTP_RESOURCE Canonical resource/audience URI."," PM_MCP_HTTP_SCOPES Space-separated scopes (default pm:read pm:write).","","Non-loopback HTTP requires bearer token, issuer, and resource together."),o.push("",`MCP protocol: ${H.join(", ")}.`,e==="stdio"?`Legacy initialize compatibility: ${G.join(", ")}.`:"HTTP requires modern per-request metadata; legacy initialize is stdio-only.","",e==="stdio"?"Client configuration:":"Example loopback server:",e==="stdio"?JSON.stringify({mcpServers:{pm:{command:"npx",args:["--yes","--package",`@unbrained/pm-cli@${r}`,"pm-mcp"]}}}):`PM_MCP_HTTP_PORT=3000 npx --yes --package @unbrained/pm-cli@${r} pm-mcp-http`,...e==="http"?["HTTP client configuration:",JSON.stringify({mcpServers:{pm:{url:"http://127.0.0.1:3000/mcp"}}})]:[],"","Configuration: https://github.com/unbraind/pm-cli/blob/main/docs/MCP_REMOTE_TRANSPORT_SECURITY.md",""),o.join(`
|
|
2
2
|
`)}function dn(e,r,o){if(e.length===0)return{kind:"serve"};let i=e.find(t=>!ee.has(t));if(i!==void 0){let t=r==="stdio"?"pm-mcp":"pm-mcp-http";return{kind:"exit",exitCode:64,stdout:"",stderr:`Unsupported argument ${JSON.stringify(i)}. Run ${t} --help.
|
|
3
3
|
`}}return{kind:"exit",exitCode:0,stdout:e.includes("--help")||e.includes("-h")?te(r,o):`${o}
|
|
4
4
|
`,stderr:""}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="1cda240f-7416-5d00-abf5-53695f26ef69")}catch{}})();var m,re=Object.freeze({list:"list-item-projection","list-all":"list-item-projection","list-draft":"list-item-projection","list-open":"list-item-projection","list-in-progress":"list-item-projection","list-blocked":"list-item-projection","list-closed":"list-item-projection","list-canceled":"list-item-projection",get:"get-item-projection",graph:"graph-detail-projection",search:"search-result-projection",history:"history-entry-projection",events:"mutation-event-projection",activity:"activity-entry-projection",deps:"dependency-graph-projection",health:"health-diagnostic-projection",validate:"validation-diagnostic-projection",contracts:"contract-catalog-projection"});function oe(e,r){if(r==="--limit")return"result-row-limit";if(r==="--node-limit")return"graph-node-limit";if(r==="--edge-limit")return"graph-edge-limit";if(r==="--output-limit")return"rendered-output-row-limit";if(r==="--output-budget")return"rendered-output-byte-budget";if(r==="--token-budget")return"context-intent-token-budget";if(r==="--full"){let o=re[f(e)];if(o===void 0)throw new Error(`Command ${e} exposes --full without a registered projection concept.`);return o}return r!=="--file"?r.slice(2):["create","update","update-many"].includes(f(e))?"linked-file-path":["comments","notes","learnings"].includes(f(e))?"entry-file-input":"plan-definition-file"}function g(){if(m!==void 0)return m;let e=q.filter(({command:t})=>A(t)).flatMap(({command:t,family:n})=>F(t,R(t)).map(s=>({command:t,family:n,concept:oe(t,s.flag),flag:s.flag,aliases:Object.freeze([...s.aliases??[]]),value_kind:s.repeatable?"list":s.flag==="--limit"?"number":s.value_type}))),r=new Set(e.flatMap(t=>t.aliases.map(n=>`${t.command}:${n}`))),o=e.filter(t=>!r.has(`${t.command}:${t.flag}`)),i=new Map;for(let t of o){let n=i.get(t.concept)??new Set;n.add(t.value_kind),i.set(t.concept,n)}return m=Object.freeze(o.map(t=>Object.freeze({...t,concept:i.get(t.concept)?.size===1?t.concept:`${t.concept}@${t.command}`}))),m}function fn(){return Object.freeze(g().map(e=>Object.freeze({command:e.command,canonical_flag:e.flag,accepted_spellings:Object.freeze([...new Set([e.flag,...e.aliases])].sort())})))}var V=Object.freeze({init:30,item:20,config:36,extension:55,package:56,packages:56,install:27,upgrade:29,create:102,copy:24,focus:22,list:86,"list-all":86,"list-draft":84,"list-open":84,"list-in-progress":84,"list-blocked":84,"list-closed":84,"list-canceled":84,aggregate:40,context:45,ctx:45,get:30,graph:34,search:78,duplicates:25,eval:25,next:38,history:36,events:34,"history-attest":23,"history-redact":27,"history-repair":27,"history-compact":30,"history-author-acknowledge":28,merge:29,schema:43,profile:22,activity:36,restore:23,update:105,"update-many":146,close:32,"close-many":72,delete:24,append:25,comments:31,notes:35,learnings:31,files:39,docs:30,deps:32,plan:111,test:56,"test-all":40,telemetry:21,stats:29,health:36,validate:46,assurance:30,gc:22,workspace:23,contracts:29,claim:39,release:25,"start-task":23,"pause-task":23,"close-task":24,meet:33,event:33,remind:29,"test-runs-worker":20}),B=Object.freeze({...V,...Object.fromEntries(M.flatMap(({alias:e,canonical:r})=>{let o=V[e];return o===void 0?[]:[[r,o]]}))});function J(){let e=new Map(Object.keys(B).map(r=>[r,0]));for(let{command:r}of g())e.set(r,Number(e.get(r))+1);return Object.freeze(Object.entries(B).map(([r,o])=>Object.freeze({command:r,current:Number(e.get(r)),maximum:o})))}function ie(e,r,o){for(let i of e)for(let t of i.aliases){let n=r.get(`${i.command}:${t}`);n===void 0||n.flag===i.flag||o.push({code:"alias_collision",command:i.command,detail:`${t} aliases ${i.flag} but is canonical for ${n.flag}.`})}}function ne(e,r,o){let i=new Set(r.map(({command:t})=>t));for(let t of e.keys())i.has(t)||o.push({code:"missing_budget",command:t,detail:`${t} has canonical flags but no persisted budget.`});for(let t of r){let n=e.get(t.command)??0;n===0&&o.push({code:"stale_budget",command:t.command,detail:`${t.command} has a persisted budget but no canonical flags.`}),!(n<=t.maximum)&&o.push({code:"budget_exceeded",command:t.command,detail:`${n} canonical flags exceed the ratcheted maximum ${t.maximum}.`})}}function se(e,r,o){let i=new Map(e.map(t=>[`${t.command}:${t.flag}`,t]));for(let t of r){let n=`${t.command}:${t.canonical_flag}`,s=i.get(n);if(!s){o.push({code:"removed_canonical_spelling",command:t.command,detail:`${t.canonical_flag} disappeared from the executable spelling inventory.`});continue}let d=new Set([s.flag,...s.aliases]);for(let a of t.accepted_spellings)d.has(a)||o.push({code:"removed_compatibility_spelling",command:t.command,detail:`${a} no longer resolves to ${t.canonical_flag}.`})}}function mn(e=g(),r=J(),o=[]){let i=[],t=new Map,n=new Map,s=new Map,d=new Map;for(let a of e){let c=`${a.command}:${a.flag}`;t.has(c)?i.push({code:"duplicate_canonical_flag",command:a.command,detail:`${a.flag} has more than one canonical row.`}):t.set(c,a),d.set(a.command,(d.get(a.command)??0)+1);let l=n.get(a.concept);l!==void 0&&l!==a.value_kind?i.push({code:"inconsistent_concept_kind",command:a.command,detail:`${a.concept} uses both ${l} and ${a.value_kind}.`}):n.set(a.concept,a.value_kind);let p=s.get(a.concept);p!==void 0&&p!==a.flag?i.push({code:"semantic_spelling_collision",command:a.command,detail:`${a.concept} is canonicalized by both ${p} and ${a.flag}.`}):s.set(a.concept,a.flag)}return ie(e,t,i),ne(d,r,i),se(e,o,i),i.sort((a,c)=>a.command.localeCompare(c.command)||a.code.localeCompare(c.code)||a.detail.localeCompare(c.detail)),{ok:i.length===0,entry_count:e.length,budget_count:r.length,concept_count:new Set(e.map(({concept:a})=>a)).size,baseline_entry_count:o.length,findings:i}}function gn(){let e=g(),r=J(),o=new Map(r.map(({command:i})=>[i,"unknown"]));for(let{command:i,family:t}of e)o.set(i,t);return["# Generated flag lexicon budgets","","This file is generated by `listPmFlagLexicon()`. Compatibility aliases do not consume canonical budget.","","| Command | Capability family | Canonical flags | Maximum |","| --- | --- | ---: | ---: |",...r.map(({command:i,current:t,maximum:n})=>{let s=o.get(i);return`| \`${i}\` | ${s} | ${t} | ${n} |`}),""].join(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{A as Ye,B as Xe,C as Ke,D as je,E as qe,F as Je,G as Qe,H as Ze,I as $e,J as et,K as tt,L as ot,N as rt,b as Se,c as Te,d as ye,e as Re,f as Oe,g as be,h as De,i as Ce,j as Ne,k as Pe,l as ve,m as Ue,n as Le,o as he,p as Me,q as we,r as xe,s as Ve,t as Fe,u as ze,v as ke,w as Be,x as He,y as Ge,z as We}from"./focused-chunks/chunk-
|
|
1
|
+
import{A as Ye,B as Xe,C as Ke,D as je,E as qe,F as Je,G as Qe,H as Ze,I as $e,J as et,K as tt,L as ot,N as rt,b as Se,c as Te,d as ye,e as Re,f as Oe,g as be,h as De,i as Ce,j as Ne,k as Pe,l as ve,m as Ue,n as Le,o as he,p as Me,q as we,r as xe,s as Ve,t as Fe,u as ze,v as ke,w as Be,x as He,y as Ge,z as We}from"./focused-chunks/chunk-MOY6KZGJ.js";import"./focused-chunks/chunk-HOXIIZEO.js";import"./focused-chunks/chunk-ZYXQACPB.js";import{ka as pe,la as ce}from"./focused-chunks/chunk-ZQRCVRGS.js";import"./focused-chunks/chunk-D4XQOMG4.js";import"./focused-chunks/chunk-IDAYTYNN.js";import"./focused-chunks/chunk-4HY6EGPB.js";import"./focused-chunks/chunk-I5FODKYB.js";import"./focused-chunks/chunk-SVOOGGAK.js";import{a as L}from"./focused-chunks/chunk-YGO3FWA2.js";import"./focused-chunks/chunk-WXLG7HZ5.js";import"./focused-chunks/chunk-IKXJ57XA.js";import"./focused-chunks/chunk-LKN2WGGB.js";import{k as Ee,l as fe,m as Ie,n as _e,o as Ae,p as ge}from"./focused-chunks/chunk-WZDFCVLX.js";import"./focused-chunks/chunk-3XGKBVJ3.js";import"./focused-chunks/chunk-YVLAP3BL.js";import"./focused-chunks/chunk-TYHDZUL4.js";import"./focused-chunks/chunk-F3X6UWMI.js";import"./focused-chunks/chunk-PWUTFKSI.js";import"./focused-chunks/chunk-GHQVM6K6.js";import{R as ae,S as de,T as ue,U as le,V as me,f as se}from"./focused-chunks/chunk-PZRB7IXH.js";import{$ as te,C as z,D as k,E as B,F as H,G,H as W,R as Y,S as X,T as K,U as j,V as q,W as J,X as Q,Y as Z,Z as $,_ as ee,aa as oe,ba as re,ca as ne,da as ie,o as h,p as M,r as w,s as x,t as V,v as F}from"./focused-chunks/chunk-WSYPVBKS.js";import"./focused-chunks/chunk-RY4QEMAE.js";import"./focused-chunks/chunk-HJ27QLZV.js";import"./focused-chunks/chunk-4PW5XWVI.js";import"./focused-chunks/chunk-AK2CI2GI.js";import{Ae as b,Be as D,Cd as y,Dd as R,He as C,Je as N,Ke as P,Le as v,Me as U,Od as O,g as r,h as n,i,md as p,n as s,nd as c,od as E,p as a,pd as f,q as d,qd as I,r as u,rd as _,vd as A,xd as g,yd as S,zd as T}from"./focused-chunks/chunk-HUXZCPWT.js";import"./focused-chunks/chunk-EGN2HFRU.js";import"./focused-chunks/chunk-FOA7XKWP.js";import{A as m,z as l}from"./focused-chunks/chunk-G6ERMFJ5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="48d03e9b-14a4-545c-8e5d-5f5f2092a113")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="38023567-8a5b-5e25-8d71-5112f74d1894")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="1b7735e8-a1a3-59bb-a89f-d014b70c34ec")}catch{}})();export{Y as AGENT_PROVENANCE_DIMENSIONS,h as BASELINE_ITEM_FORMAT_VERSION,K as BUILTIN_AGENT_PROVENANCE_ADAPTERS,X as BUILTIN_HARNESS_SIGNAL_DESCRIPTORS,r as BUILTIN_ITEM_TYPE_VALUES,u as CONFIDENCE_TEXT_VALUES,M as CURRENT_ITEM_FORMAT_VERSION,s as DEPENDENCY_KIND_VALUES,l as EXIT_CODE,d as ISSUE_SEVERITY_VALUES,n as ITEM_TYPE_VALUES,de as PM_CLI_EXPECTED_ERROR_NAME,E as PM_READ_OUTPUT_COMPOSITION_OPTION_FLAGS,p as PM_READ_OUTPUT_DIMENSIONS,c as PM_READ_OUTPUT_OPTION_FLAGS,f as PM_READ_OUTPUT_SURFACE_CONTRACTS,m as PmCliError,Pe as PmClient,a as RISK_VALUES,Ae as SEMANTIC_ATTRIBUTION_LIMITS,i as STATUS_VALUES,W as agentSessionEnvironment,xe as aggregate,ye as analyzeAgentProvenanceDescriptorCoverage,L as analyzeSdkCliParameterCompleteness,Ye as append,g as applyReadOutputDimensions,P as applyReadOutputSessionReferences,D as assertWellFormedOutputText,v as attachReadOutputSessionReceipt,B as boundAgentEpisodeIdentity,k as canonicalDocument,Je as claim,Qe as claimNext,V as classifyItemFormatVersion,qe as close,Ve as comments,ve as context,$e as copy,Xe as create,le as createPmCliExpectedError,R as decodeReadOutputContinuationCursor,et as deleteItem,Ge as deps,ee as detectAgentIdentity,ne as detectHarnessIdentity,te as diagnoseAgentIdentity,He as docs,w as effectiveItemFormatVersion,Ne as emptyImportedDocument,y as encodeReadOutputContinuationCursor,be as evaluateSemanticAttributionCoverage,ce as explainSourceTraceability,ke as files,Be as filesDiscover,ot as focus,Me as get,We as graph,De as groupHistoryByEpisode,Se as isAlreadyClaimedError,ue as isItemAlreadyExistsError,me as isPmCliExpectedError,ae as isPmTokenBudgetRecovery,S as isReadOutputBudgetExceeded,C as isReadOutputSessionReference,ze as learnings,Ue as list,q as listAgentProvenanceAdapters,Le as listAllComplete,we as next,Q as normalizeAgentProvenanceAdapterValue,x as normalizeItemFormatVersion,se as normalizeItemId,F as normalizeStatusInput,Fe as notes,O as nowIso,N as parseReadOutputSession,pe as parseSourceLineRange,oe as readAuthorEnvironment,U as readOutputSessionRemainingTokens,fe as recordClaimSemanticAttribution,_e as recordFocusSemanticAttribution,Ie as recordReleaseSemanticAttribution,J as registerAgentProvenanceAdapters,j as registerHarnessSignalDescriptors,Ze as release,je as reopen,H as resolveAgentSessionContextFromSignals,ie as resolveAuthorIdentity,Te as resolveHistoryEpisodeGroupIdentity,A as resolveReadOutputDimensions,T as resolveReadOutputEncoding,I as resolveReadOutputSurface,Ee as resolveSemanticLineageIds,tt as restore,rt as runAction,G as runWithAgentSessionContext,Z as runWithHarnessDetectionSignals,$ as runWithWorkspaceHarnessSignalDescriptors,he as search,ge as semanticAttributionAffinity,z as serializeItemDocument,Re as summarizeAgentModelProvenance,Oe as summarizeAgentProvenance,b as toWellFormedText,Ke as update,Ce as updateLinkedTest,_ as validateReadOutputOptions,re as writeAuthorEnvironment};
|
|
2
2
|
//# sourceMappingURL=sdk-core.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{$a as kt,Ab as At,Bb as Dt,Cb as Rt,D as Pe,Db as Ot,E as Fe,Eb as $t,F as Je,Fb as Nt,G as We,Gb as Bt,H as Me,Hb as Ct,Ib as zt,Jb as h,Kb as jt,Lb as qt,Mb as Ut,Nb as Pt,Ob as Ft,Pb as Jt,Qa as gt,Qb as Wt,Rb as v,Ua as yt,Va as wt,Wa as ht,Xa as vt,Ya as bt,Za as xt,_a as Et,a as ge,aa as Ze,ab as Tt,b as ye,ba as Ge,c as we,ca as He,d as he,da as Ve,e as ve,ea as Ye,f as be,fa as Ke,g as xe,ga as Le,h as Ee,ha as Xe,i as ke,ia as Qe,j as Te,k as Ie,l as Se,m as Ae,n as De,o as Re,p as Oe,pa as at,q as $e,qa as dt,r as Ne,ra as st,s as Be,sa as ft,t as Ce,ta as ut,u as ze,ua as ct,v as je,va as pt,w as qe,wa as lt,x as Ue,xa as mt,ya as _t,yb as It,zb as St}from"./focused-chunks/chunk-6OKPYCLU.js";import"./focused-chunks/chunk-3NYWMUX3.js";import"./focused-chunks/chunk-DFUTCKUF.js";import"./focused-chunks/chunk-WX2RVS2Y.js";import"./focused-chunks/chunk-LVA76N27.js";import{a as K}from"./focused-chunks/chunk-SVOOGGAK.js";import"./focused-chunks/chunk-VS2ZFPXD.js";import{E as J,F as W,G as M,H as Z,I as G,J as H,K as V,L as Y}from"./focused-chunks/chunk-Z7GIVH6B.js";import"./focused-chunks/chunk-RPUDOJVB.js";import{C as et,D as tt,E as it,F as rt,G as nt,H as ot}from"./focused-chunks/chunk-GE755ODZ.js";import{Ga as re,Ha as ne,Ia as oe,Ja as ae,Ka as de,La as se,Ma as fe,Na as ue,Oa as ce,Pa as pe,Qa as le,Ra as me,Sa as _e}from"./focused-chunks/chunk-7WJDRZOR.js";import"./focused-chunks/chunk-6GMYW42K.js";import"./focused-chunks/chunk-UQIBGLDR.js";import"./focused-chunks/chunk-PAT6QF63.js";import"./focused-chunks/chunk-GHQVM6K6.js";import{o as ie}from"./focused-chunks/chunk-JCR32IAO.js";import{a as L,b as X,c as Q,d as ee,e as te}from"./focused-chunks/chunk-M22TI7LP.js";import"./focused-chunks/chunk-AL7SOFUL.js";import"./focused-chunks/chunk-VFQAZLKO.js";import"./focused-chunks/chunk-4PW5XWVI.js";import"./focused-chunks/chunk-AK2CI2GI.js";import{Ec as F,Ja as R,Ka as O,La as $,Ma as N,Na as B,Oa as C,Pa as z,Qa as j,Qd as y,Ra as q,Sa as U,Ta as P}from"./focused-chunks/chunk-CIQ6YWCW.js";import"./focused-chunks/chunk-EGN2HFRU.js";import"./focused-chunks/chunk-FOA7XKWP.js";import"./focused-chunks/chunk-JLXGRDTG.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new e.Error().stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="7e55d416-9cc3-51c5-8e56-6b5fd5c836a9")}catch{}})();var b=["captured_redacted","captured_verbatim"],x=[{label:"home directory",pattern:/(?:\/home\/|\/Users\/)[^/\s"']+/u},{label:"GitHub token",pattern:/\b(?:gh[oprsu]_[A-Za-z0-9_]{20,})\b/u},{label:"npm token",pattern:/\bnpm_[A-Za-z0-9]{20,}\b/u},{label:"private key",pattern:/-----BEGIN (?:RSA |EC |OPENSSH )?PRIVATE KEY-----/u}];function c(e){return typeof e=="string"&&e.trim().length>0}function E(e,i){if(typeof i!="object"||i===null||Array.isArray(i))return[{boundary_id:e.id,kind:"invalid_fixture",detail:`${e.fixture_path} must contain a JSON object.`}];let t=i,r=[];t.boundary_id!==e.id&&r.push({boundary_id:e.id,kind:"fixture_boundary_mismatch",detail:`${e.fixture_path} names ${String(t.boundary_id)} instead of ${e.id}.`}),(t.version!==1||!b.includes(t.capture_source)||!c(t.capture_provenance)||!Array.isArray(t.redactions)||!t.redactions.every(c)||!("input"in t)||!("observed"in t))&&r.push({boundary_id:e.id,kind:"invalid_fixture",detail:`${e.fixture_path} lacks captured provenance, redaction metadata, input, or observed output.`});let o=JSON.stringify(i);for(let u of x)u.pattern.test(o)&&r.push({boundary_id:e.id,kind:"unsafe_fixture",detail:`${e.fixture_path} contains a possible ${u.label}.`});return r}function k(e,i){let t=Date.parse(e.waiver_expires_at),r=c(e.waiver_reason)&&c(e.waiver_owner)&&e.waiver_expires_at.endsWith("Z")&&y(e.waiver_expires_at)&&Number.isFinite(t);return{captured:0,waived:r&&t>=i?1:0,findings:r?t<i?[{boundary_id:e.id,kind:"expired_waiver",detail:`Boundary ${e.id} waiver expired at ${e.waiver_expires_at}.`}]:[]:[{boundary_id:e.id,kind:"invalid_waiver",detail:`Boundary ${e.id} waiver requires reason, owner, and an RFC 3339 UTC expiry.`}]}}function T(e,i,t){if(!c(e.id)||!c(e.producer)||!c(e.consumer)||!c(e.format))return{captured:0,waived:0,findings:[{boundary_id:c(e.id)?e.id:"unknown",kind:"invalid_boundary",detail:"Each boundary requires non-empty id, producer, consumer, and format."}]};if("fixture_path"in e){let r=i[e.fixture_path],o=c(e.fixture_path)&&e.fixture_path in i?E(e,r):[{boundary_id:e.id,kind:"missing_fixture",detail:`Boundary ${e.id} fixture ${String(e.fixture_path)} is missing.`}];return{captured:o.length===0?1:0,waived:0,findings:o}}return k(e,t)}function Zt(e,i,t=new Date){let r=[];if(e.version!==1||!c(e.inventory_scope)||!Array.isArray(e.boundaries))return{ok:!1,boundary_count:0,captured_count:0,waived_count:0,findings:[{boundary_id:"registry",kind:"invalid_registry",detail:"Boundary registry requires version 1, inventory_scope, and boundaries."}]};let o=new Set,u=0,n=0;for(let d of e.boundaries){if(typeof d!="object"||d===null||Array.isArray(d)){r.push({boundary_id:"unknown",kind:"invalid_boundary",detail:"Each boundary must be a JSON object."});continue}let s=d,a=c(s.id)?s.id:void 0;if(a!==void 0&&o.has(a)){r.push({boundary_id:a,kind:"duplicate_boundary",detail:`Boundary ${a} is inventoried more than once.`});continue}a!==void 0&&o.add(a);let p=T(s,i,t.getTime());u+=p.captured,n+=p.waived,r.push(...p.findings)}return r.sort((d,s)=>d.boundary_id!==s.boundary_id?d.boundary_id.localeCompare(s.boundary_id):d.kind.localeCompare(s.kind)),{ok:r.length===0,boundary_count:e.boundaries.length,captured_count:u,waived_count:n,findings:r}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new e.Error().stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="604d7dcb-9fea-5631-8a72-b2a7ff3278f8")}catch{}})();function l(e){if(typeof e!="string"||!y(e))throw new TypeError("Invalid reliability timestamp.");return Date.parse(e)}function I(e){let i=l(e.window_start),t=l(e.window_end);if(i>=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:i,end:t}}function S(e,i,t,r){let o=new Map(i.map(n=>[n,[]])),u=new Set;for(let n of e){if(typeof n.id!="string"||n.id.trim().length===0||u.has(n.id))throw new TypeError("Invalid or duplicate reliability attempt identity.");u.add(n.id);let d=o.get(n.family);if(!d||!["success","failure","pending"].includes(n.outcome)||n.cause!==void 0&&(!["product","infrastructure","unknown"].includes(n.cause)||n.outcome!=="failure"))throw new TypeError("Invalid reliability attempt family, outcome or cause.");let s=l(n.started_at);if(n.repaired_at!==void 0&&(l(n.repaired_at)<s||n.outcome!=="failure"))throw new TypeError("Invalid reliability repair chronology.");s>=t&&s<r&&d.push(n)}return o}function Vt(e,i){let{start:t,end:r}=I(i),o=[...S(e,i.families,t,r)].map(([u,n])=>{let d=n.filter(f=>f.outcome==="failure"),s=n.filter(f=>f.outcome!=="pending").length,a=s===0?null:d.length/s,p=d.filter(f=>f.repaired_at!==void 0&&l(f.repaired_at)<r),m={product:0,infrastructure:0,unknown:0};for(let f of d)m[f.cause??"unknown"]+=1;let _=[];return s<i.min_completed_attempts&&_.push("insufficient_completed_attempts"),a!==null&&a>i.max_failure_rate&&_.push("failure_rate"),{family:u,attempts:n.length,completed:s,failed:d.length,pending:n.length-s,failure_rate:a,affected_days:[...new Set(d.map(f=>new Date(l(f.started_at)).toISOString().slice(0,10)))].sort(),repair_minutes:p.map(f=>(l(f.repaired_at)-l(f.started_at))/6e4).sort((f,w)=>f-w),unresolved:d.length-p.length,causes:m,violations:_,ok:_.length===0}});return{schema:"pm-reliability-window/1",window_start:new Date(t).toISOString(),window_end:new Date(r).toISOString(),ok:o.every(u=>u.ok),families:o}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new e.Error().stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="773ad2b6-326e-5483-bdce-a377f935cb31")}catch{}})();function g(e){return typeof e=="string"&&e.length>0&&e.trim()===e}function A(e){if(!Array.isArray(e)||e.length<2)throw new TypeError("Expected at least two artifact ledgers.");let i=new Map;for(let t of e){if(t===null||typeof t!="object"||!g(t.name)||i.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(o=>!g(o)))throw new TypeError("Invalid or duplicate artifact identity.");i.set(t.name,r)}if([...i.values()].every(t=>t.size===0))throw new TypeError("Empty inventories cannot establish artifact reconciliation.");return i}function D(e,i){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"||!g(r.identity)||t.has(r.identity)||!g(r.reason)||!g(r.evidence))throw new TypeError("Expected unique evidence-backed artifact exceptions.");let o=r.missing_from;if(!Array.isArray(o)||o.length===0||o.length>=i.length||new Set(o).size!==o.length||[...o].some(u=>!i.includes(u)))throw new TypeError("Invalid artifact exception ledger signature.");t.set(r.identity,r)}return t}function Kt(e,i=[]){let t=A(e),r=[...t.keys()].sort(),o=D(i,r),u=[...new Set([...t.values()].flatMap(a=>[...a]))].sort(),n=[],d=new Set;for(let a of u){let p=r.filter(f=>!t.get(f).has(a));if(p.length===0)continue;let m=o.get(a),_=m!==void 0&&JSON.stringify([...m.missing_from].sort())===JSON.stringify(p);_&&d.add(a),n.push({identity:a,present_in:r.filter(f=>t.get(f).has(a)),missing_from:p,disposition:_?{reason:m.reason,evidence:m.evidence}:null})}let s=[...o.keys()].filter(a=>!d.has(a)).sort();return{schema:"pm-artifact-ledgers/1",ok:n.every(a=>a.disposition!==null)&&s.length===0,counts:Object.fromEntries(r.map(a=>[a,t.get(a).size])),findings:n,stale_exceptions:s}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new e.Error().stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="fca4e9bb-3a30-512e-9929-565ab6c11c54")}catch{}})();export{$t as ASSURANCE_ACTIONS,Nt as ASSURANCE_DECLARATION_KINDS,be as ASSURANCE_DOCUMENT_VERSION,xe as ASSURANCE_GATE_TRIGGERS,Ee as ASSURANCE_MEASUREMENT_SOURCE_KINDS,at as ASSURANCE_PRESET_IDS,ye as AssuranceEvaluationRefusalError,ge as AssuranceMutationRefusalError,we as AssuranceSourceResolutionError,b as BOUNDARY_FIXTURE_CAPTURE_SOURCES,Q as CURRENT_HISTORY_HASH_ALGORITHM,J as DEFECT_ESCAPE_CLASSES,W as DEFECT_GATE_EVIDENCE_DISPOSITIONS,H as DefectRecurrencePolicyParseError,Ze as HISTORY_AUTHOR_ATTRIBUTION_BASELINE,L as HISTORY_HASH_ALGORITHMS,X as LEGACY_HISTORY_HASH_ALGORITHM,O as MAX_WORKFLOW_POLICIES,$ as MAX_WORKFLOW_POLICY_TERMS,K as PM_HISTORY_ATTESTATION_CONTRACT,re as PM_MUTATION_ACTION_CONTRACTS,R as WORKFLOW_POLICY_ACTIONS,Fe as WORKFLOW_POLICY_DOCUMENT_SCHEMA,Pe as WORKFLOW_POLICY_SCHEMA,vt as _testOnlyHealthCommand,tt as _testOnlySimilarity,St as _testOnlyValidateCommand,Wt as _testOnlyWorkspacePosition,ut as acceptAssuranceProposals,Qe as acknowledgeUnknownAuthorHistoryEvents,Xe as acknowledgeUnknownAuthorHistoryEventsFromTransport,Z as analyzeDefectChangeRisk,Ot as analyzeDefectRecurrenceCoverage,rt as analyzeDuplicateItems,st as applyAssurancePreset,Et as applyClosureTimestampFix,ke as assuranceAssertionUpdateIsLoosening,M as buildDefectRecurrenceIndex,kt as buildLinkedFileRepairReport,wt as buildStatusRoleWarnings,Je as buildWorkflowCompletenessCheck,Ge as classifyHistoryAuthorEvent,dt as createAssurancePreset,Dt as createAssuranceWorkspaceContext,De as createEmptyAssuranceDocument,We as createLifecycleCompletenessPolicies,P as createWorkflowPolicyEvaluator,ft as deriveAssuranceProposals,bt as deriveClosureTimestamp,Oe as evaluateAssuranceAssertion,$e as evaluateAssuranceGate,Zt as evaluateBoundaryFixtures,G as evaluateDefectGateEvidence,Re as evaluateMeasurement,oe as evaluateMutationGuard,Vt as evaluateReliabilityWindow,ot as evaluateSimilarityGovernance,U as evaluateWorkflowPolicies,qt as exportAttestation,nt as findDuplicateClusters,it as findSimilarItems,Jt as formatWorkspacePositionHuman,Be as getAssuranceDeclaration,se as getMutationActionContract,te as historyDigest,He as inspectHistoryAuthorStream,me as inspectStaleInProgressItems,yt as inspectStatusRoleAssignments,ae as isMutationAction,F as jaccardSimilarity,Ne as listAssuranceDeclarations,Ue as listAssuranceVerdicts,mt as listInvalidProvenanceHistoryStreamIds,de as listMutationActions,ve as normalizeAssuranceEvaluation,he as normalizeAssuranceMutation,lt as normalizeInvalidHistoryProvenance,fe as normalizeSimilarityText,Y as parseDefectChangeRiskRequest,Rt as parseDefectRecurrenceCoverageRequest,V as parseDefectRecurrencePolicy,jt as parseHistoryAttestation,Le as parseUnknownAuthorHistoryEventCoordinates,N as parseWorkflowPolicy,B as parseWorkflowPolicyDocument,Ye as planUnknownAuthorHistoryAcknowledgment,ce as prepareSimilarityText,It as projectValidateCounts,ct as promoteAssuranceAssertion,Ce as putAssuranceDeclaration,ze as putAssuranceDeclarationBundle,ie as readWorkflowPolicies,C as readWorkflowPolicyField,Ft as readWorkspacePosition,Kt as reconcileArtifactLedgers,qe as recordAssuranceVerdict,je as removeAssuranceDeclaration,ee as resolveHistoryHashAlgorithm,Ke as resolveUnknownAuthorAcknowledgmentSelector,Bt as runAssuranceAction,Ct as runAssuranceDispatch,zt as runGc,ht as runHealth,Pt as runHistoryAttest,gt as runHistoryMaintenance,v as runReindex,h as runUpgrade,At as runValidate,Me as runWorkflowPolicyAction,xt as scanClosureTimestamps,pt as scanExtensionHostVersions,Ve as scanHistoryAuthorAttribution,ne as scanMutationSecrets,_t as scanProvenanceResolverHealth,_e as scanStaleInProgressItems,Tt as scanStorageIntegrity,pe as scoreItemSimilarity,le as scorePreparedItemSimilarity,et as similarityAdvisoryWarnings,ue as tokenizeSimilarityText,Ie as validateAssertionDefinition,Ae as validateAssuranceDocument,Se as validateGateDefinition,Te as validateMeasurementDefinition,Ut as verifyAttestation,j as workflowApprovalFingerprint,q as workflowPolicyApplies,z as workflowPolicyFingerprint};
|
|
1
|
+
import{$a as kt,Ab as At,Bb as Dt,Cb as Rt,D as Pe,Db as Ot,E as Fe,Eb as $t,F as Je,Fb as Nt,G as We,Gb as Bt,H as Me,Hb as Ct,Ib as zt,Jb as h,Kb as jt,Lb as qt,Mb as Ut,Nb as Pt,Ob as Ft,Pb as Jt,Qa as gt,Qb as Wt,Rb as v,Ua as yt,Va as wt,Wa as ht,Xa as vt,Ya as bt,Za as xt,_a as Et,a as ge,aa as Ze,ab as Tt,b as ye,ba as Ge,c as we,ca as He,d as he,da as Ve,e as ve,ea as Ye,f as be,fa as Ke,g as xe,ga as Le,h as Ee,ha as Xe,i as ke,ia as Qe,j as Te,k as Ie,l as Se,m as Ae,n as De,o as Re,p as Oe,pa as at,q as $e,qa as dt,r as Ne,ra as st,s as Be,sa as ft,t as Ce,ta as ut,u as ze,ua as ct,v as je,va as pt,w as qe,wa as lt,x as Ue,xa as mt,ya as _t,yb as It,zb as St}from"./focused-chunks/chunk-ZQRCVRGS.js";import"./focused-chunks/chunk-D4XQOMG4.js";import"./focused-chunks/chunk-IDAYTYNN.js";import"./focused-chunks/chunk-4HY6EGPB.js";import"./focused-chunks/chunk-I5FODKYB.js";import{a as K}from"./focused-chunks/chunk-SVOOGGAK.js";import"./focused-chunks/chunk-YGO3FWA2.js";import{E as J,F as W,G as M,H as Z,I as G,J as H,K as V,L as Y}from"./focused-chunks/chunk-WXLG7HZ5.js";import"./focused-chunks/chunk-LKN2WGGB.js";import{C as et,D as tt,E as it,F as rt,G as nt,H as ot}from"./focused-chunks/chunk-3XGKBVJ3.js";import{Ia as re,Ja as ne,Ka as oe,La as ae,Ma as de,Na as se,Oa as fe,Pa as ue,Qa as ce,Ra as pe,Sa as le,Ta as me,Ua as _e}from"./focused-chunks/chunk-YVLAP3BL.js";import"./focused-chunks/chunk-TYHDZUL4.js";import"./focused-chunks/chunk-F3X6UWMI.js";import"./focused-chunks/chunk-PWUTFKSI.js";import"./focused-chunks/chunk-GHQVM6K6.js";import{o as ie}from"./focused-chunks/chunk-PZRB7IXH.js";import{a as L,b as X,c as Q,d as ee,e as te}from"./focused-chunks/chunk-WSYPVBKS.js";import"./focused-chunks/chunk-RY4QEMAE.js";import"./focused-chunks/chunk-HJ27QLZV.js";import"./focused-chunks/chunk-4PW5XWVI.js";import"./focused-chunks/chunk-AK2CI2GI.js";import{Ja as R,Ka as O,La as $,Ma as N,Na as B,Oa as C,Ob as F,Pa as z,Qa as j,Qd as y,Ra as q,Sa as U,Ta as P}from"./focused-chunks/chunk-HUXZCPWT.js";import"./focused-chunks/chunk-EGN2HFRU.js";import"./focused-chunks/chunk-FOA7XKWP.js";import"./focused-chunks/chunk-G6ERMFJ5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new e.Error().stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="7e55d416-9cc3-51c5-8e56-6b5fd5c836a9")}catch{}})();var b=["captured_redacted","captured_verbatim"],x=[{label:"home directory",pattern:/(?:\/home\/|\/Users\/)[^/\s"']+/u},{label:"GitHub token",pattern:/\b(?:gh[oprsu]_[A-Za-z0-9_]{20,})\b/u},{label:"npm token",pattern:/\bnpm_[A-Za-z0-9]{20,}\b/u},{label:"private key",pattern:/-----BEGIN (?:RSA |EC |OPENSSH )?PRIVATE KEY-----/u}];function c(e){return typeof e=="string"&&e.trim().length>0}function E(e,i){if(typeof i!="object"||i===null||Array.isArray(i))return[{boundary_id:e.id,kind:"invalid_fixture",detail:`${e.fixture_path} must contain a JSON object.`}];let t=i,r=[];t.boundary_id!==e.id&&r.push({boundary_id:e.id,kind:"fixture_boundary_mismatch",detail:`${e.fixture_path} names ${String(t.boundary_id)} instead of ${e.id}.`}),(t.version!==1||!b.includes(t.capture_source)||!c(t.capture_provenance)||!Array.isArray(t.redactions)||!t.redactions.every(c)||!("input"in t)||!("observed"in t))&&r.push({boundary_id:e.id,kind:"invalid_fixture",detail:`${e.fixture_path} lacks captured provenance, redaction metadata, input, or observed output.`});let o=JSON.stringify(i);for(let u of x)u.pattern.test(o)&&r.push({boundary_id:e.id,kind:"unsafe_fixture",detail:`${e.fixture_path} contains a possible ${u.label}.`});return r}function k(e,i){let t=Date.parse(e.waiver_expires_at),r=c(e.waiver_reason)&&c(e.waiver_owner)&&e.waiver_expires_at.endsWith("Z")&&y(e.waiver_expires_at)&&Number.isFinite(t);return{captured:0,waived:r&&t>=i?1:0,findings:r?t<i?[{boundary_id:e.id,kind:"expired_waiver",detail:`Boundary ${e.id} waiver expired at ${e.waiver_expires_at}.`}]:[]:[{boundary_id:e.id,kind:"invalid_waiver",detail:`Boundary ${e.id} waiver requires reason, owner, and an RFC 3339 UTC expiry.`}]}}function T(e,i,t){if(!c(e.id)||!c(e.producer)||!c(e.consumer)||!c(e.format))return{captured:0,waived:0,findings:[{boundary_id:c(e.id)?e.id:"unknown",kind:"invalid_boundary",detail:"Each boundary requires non-empty id, producer, consumer, and format."}]};if("fixture_path"in e){let r=i[e.fixture_path],o=c(e.fixture_path)&&e.fixture_path in i?E(e,r):[{boundary_id:e.id,kind:"missing_fixture",detail:`Boundary ${e.id} fixture ${String(e.fixture_path)} is missing.`}];return{captured:o.length===0?1:0,waived:0,findings:o}}return k(e,t)}function Zt(e,i,t=new Date){let r=[];if(e.version!==1||!c(e.inventory_scope)||!Array.isArray(e.boundaries))return{ok:!1,boundary_count:0,captured_count:0,waived_count:0,findings:[{boundary_id:"registry",kind:"invalid_registry",detail:"Boundary registry requires version 1, inventory_scope, and boundaries."}]};let o=new Set,u=0,n=0;for(let d of e.boundaries){if(typeof d!="object"||d===null||Array.isArray(d)){r.push({boundary_id:"unknown",kind:"invalid_boundary",detail:"Each boundary must be a JSON object."});continue}let s=d,a=c(s.id)?s.id:void 0;if(a!==void 0&&o.has(a)){r.push({boundary_id:a,kind:"duplicate_boundary",detail:`Boundary ${a} is inventoried more than once.`});continue}a!==void 0&&o.add(a);let p=T(s,i,t.getTime());u+=p.captured,n+=p.waived,r.push(...p.findings)}return r.sort((d,s)=>d.boundary_id!==s.boundary_id?d.boundary_id.localeCompare(s.boundary_id):d.kind.localeCompare(s.kind)),{ok:r.length===0,boundary_count:e.boundaries.length,captured_count:u,waived_count:n,findings:r}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new e.Error().stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="604d7dcb-9fea-5631-8a72-b2a7ff3278f8")}catch{}})();function l(e){if(typeof e!="string"||!y(e))throw new TypeError("Invalid reliability timestamp.");return Date.parse(e)}function I(e){let i=l(e.window_start),t=l(e.window_end);if(i>=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:i,end:t}}function S(e,i,t,r){let o=new Map(i.map(n=>[n,[]])),u=new Set;for(let n of e){if(typeof n.id!="string"||n.id.trim().length===0||u.has(n.id))throw new TypeError("Invalid or duplicate reliability attempt identity.");u.add(n.id);let d=o.get(n.family);if(!d||!["success","failure","pending"].includes(n.outcome)||n.cause!==void 0&&(!["product","infrastructure","unknown"].includes(n.cause)||n.outcome!=="failure"))throw new TypeError("Invalid reliability attempt family, outcome or cause.");let s=l(n.started_at);if(n.repaired_at!==void 0&&(l(n.repaired_at)<s||n.outcome!=="failure"))throw new TypeError("Invalid reliability repair chronology.");s>=t&&s<r&&d.push(n)}return o}function Vt(e,i){let{start:t,end:r}=I(i),o=[...S(e,i.families,t,r)].map(([u,n])=>{let d=n.filter(f=>f.outcome==="failure"),s=n.filter(f=>f.outcome!=="pending").length,a=s===0?null:d.length/s,p=d.filter(f=>f.repaired_at!==void 0&&l(f.repaired_at)<r),m={product:0,infrastructure:0,unknown:0};for(let f of d)m[f.cause??"unknown"]+=1;let _=[];return s<i.min_completed_attempts&&_.push("insufficient_completed_attempts"),a!==null&&a>i.max_failure_rate&&_.push("failure_rate"),{family:u,attempts:n.length,completed:s,failed:d.length,pending:n.length-s,failure_rate:a,affected_days:[...new Set(d.map(f=>new Date(l(f.started_at)).toISOString().slice(0,10)))].sort(),repair_minutes:p.map(f=>(l(f.repaired_at)-l(f.started_at))/6e4).sort((f,w)=>f-w),unresolved:d.length-p.length,causes:m,violations:_,ok:_.length===0}});return{schema:"pm-reliability-window/1",window_start:new Date(t).toISOString(),window_end:new Date(r).toISOString(),ok:o.every(u=>u.ok),families:o}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new e.Error().stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="773ad2b6-326e-5483-bdce-a377f935cb31")}catch{}})();function g(e){return typeof e=="string"&&e.length>0&&e.trim()===e}function A(e){if(!Array.isArray(e)||e.length<2)throw new TypeError("Expected at least two artifact ledgers.");let i=new Map;for(let t of e){if(t===null||typeof t!="object"||!g(t.name)||i.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(o=>!g(o)))throw new TypeError("Invalid or duplicate artifact identity.");i.set(t.name,r)}if([...i.values()].every(t=>t.size===0))throw new TypeError("Empty inventories cannot establish artifact reconciliation.");return i}function D(e,i){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"||!g(r.identity)||t.has(r.identity)||!g(r.reason)||!g(r.evidence))throw new TypeError("Expected unique evidence-backed artifact exceptions.");let o=r.missing_from;if(!Array.isArray(o)||o.length===0||o.length>=i.length||new Set(o).size!==o.length||[...o].some(u=>!i.includes(u)))throw new TypeError("Invalid artifact exception ledger signature.");t.set(r.identity,r)}return t}function Kt(e,i=[]){let t=A(e),r=[...t.keys()].sort(),o=D(i,r),u=[...new Set([...t.values()].flatMap(a=>[...a]))].sort(),n=[],d=new Set;for(let a of u){let p=r.filter(f=>!t.get(f).has(a));if(p.length===0)continue;let m=o.get(a),_=m!==void 0&&JSON.stringify([...m.missing_from].sort())===JSON.stringify(p);_&&d.add(a),n.push({identity:a,present_in:r.filter(f=>t.get(f).has(a)),missing_from:p,disposition:_?{reason:m.reason,evidence:m.evidence}:null})}let s=[...o.keys()].filter(a=>!d.has(a)).sort();return{schema:"pm-artifact-ledgers/1",ok:n.every(a=>a.disposition!==null)&&s.length===0,counts:Object.fromEntries(r.map(a=>[a,t.get(a).size])),findings:n,stale_exceptions:s}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new e.Error().stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="fca4e9bb-3a30-512e-9929-565ab6c11c54")}catch{}})();export{$t as ASSURANCE_ACTIONS,Nt as ASSURANCE_DECLARATION_KINDS,be as ASSURANCE_DOCUMENT_VERSION,xe as ASSURANCE_GATE_TRIGGERS,Ee as ASSURANCE_MEASUREMENT_SOURCE_KINDS,at as ASSURANCE_PRESET_IDS,ye as AssuranceEvaluationRefusalError,ge as AssuranceMutationRefusalError,we as AssuranceSourceResolutionError,b as BOUNDARY_FIXTURE_CAPTURE_SOURCES,Q as CURRENT_HISTORY_HASH_ALGORITHM,J as DEFECT_ESCAPE_CLASSES,W as DEFECT_GATE_EVIDENCE_DISPOSITIONS,H as DefectRecurrencePolicyParseError,Ze as HISTORY_AUTHOR_ATTRIBUTION_BASELINE,L as HISTORY_HASH_ALGORITHMS,X as LEGACY_HISTORY_HASH_ALGORITHM,O as MAX_WORKFLOW_POLICIES,$ as MAX_WORKFLOW_POLICY_TERMS,K as PM_HISTORY_ATTESTATION_CONTRACT,re as PM_MUTATION_ACTION_CONTRACTS,R as WORKFLOW_POLICY_ACTIONS,Fe as WORKFLOW_POLICY_DOCUMENT_SCHEMA,Pe as WORKFLOW_POLICY_SCHEMA,vt as _testOnlyHealthCommand,tt as _testOnlySimilarity,St as _testOnlyValidateCommand,Wt as _testOnlyWorkspacePosition,ut as acceptAssuranceProposals,Qe as acknowledgeUnknownAuthorHistoryEvents,Xe as acknowledgeUnknownAuthorHistoryEventsFromTransport,Z as analyzeDefectChangeRisk,Ot as analyzeDefectRecurrenceCoverage,rt as analyzeDuplicateItems,st as applyAssurancePreset,Et as applyClosureTimestampFix,ke as assuranceAssertionUpdateIsLoosening,M as buildDefectRecurrenceIndex,kt as buildLinkedFileRepairReport,wt as buildStatusRoleWarnings,Je as buildWorkflowCompletenessCheck,Ge as classifyHistoryAuthorEvent,dt as createAssurancePreset,Dt as createAssuranceWorkspaceContext,De as createEmptyAssuranceDocument,We as createLifecycleCompletenessPolicies,P as createWorkflowPolicyEvaluator,ft as deriveAssuranceProposals,bt as deriveClosureTimestamp,Oe as evaluateAssuranceAssertion,$e as evaluateAssuranceGate,Zt as evaluateBoundaryFixtures,G as evaluateDefectGateEvidence,Re as evaluateMeasurement,oe as evaluateMutationGuard,Vt as evaluateReliabilityWindow,ot as evaluateSimilarityGovernance,U as evaluateWorkflowPolicies,qt as exportAttestation,nt as findDuplicateClusters,it as findSimilarItems,Jt as formatWorkspacePositionHuman,Be as getAssuranceDeclaration,se as getMutationActionContract,te as historyDigest,He as inspectHistoryAuthorStream,me as inspectStaleInProgressItems,yt as inspectStatusRoleAssignments,ae as isMutationAction,F as jaccardSimilarity,Ne as listAssuranceDeclarations,Ue as listAssuranceVerdicts,mt as listInvalidProvenanceHistoryStreamIds,de as listMutationActions,ve as normalizeAssuranceEvaluation,he as normalizeAssuranceMutation,lt as normalizeInvalidHistoryProvenance,fe as normalizeSimilarityText,Y as parseDefectChangeRiskRequest,Rt as parseDefectRecurrenceCoverageRequest,V as parseDefectRecurrencePolicy,jt as parseHistoryAttestation,Le as parseUnknownAuthorHistoryEventCoordinates,N as parseWorkflowPolicy,B as parseWorkflowPolicyDocument,Ye as planUnknownAuthorHistoryAcknowledgment,ce as prepareSimilarityText,It as projectValidateCounts,ct as promoteAssuranceAssertion,Ce as putAssuranceDeclaration,ze as putAssuranceDeclarationBundle,ie as readWorkflowPolicies,C as readWorkflowPolicyField,Ft as readWorkspacePosition,Kt as reconcileArtifactLedgers,qe as recordAssuranceVerdict,je as removeAssuranceDeclaration,ee as resolveHistoryHashAlgorithm,Ke as resolveUnknownAuthorAcknowledgmentSelector,Bt as runAssuranceAction,Ct as runAssuranceDispatch,zt as runGc,ht as runHealth,Pt as runHistoryAttest,gt as runHistoryMaintenance,v as runReindex,h as runUpgrade,At as runValidate,Me as runWorkflowPolicyAction,xt as scanClosureTimestamps,pt as scanExtensionHostVersions,Ve as scanHistoryAuthorAttribution,ne as scanMutationSecrets,_t as scanProvenanceResolverHealth,_e as scanStaleInProgressItems,Tt as scanStorageIntegrity,pe as scoreItemSimilarity,le as scorePreparedItemSimilarity,et as similarityAdvisoryWarnings,ue as tokenizeSimilarityText,Ie as validateAssertionDefinition,Ae as validateAssuranceDocument,Se as validateGateDefinition,Te as validateMeasurementDefinition,Ut as verifyAttestation,j as workflowApprovalFingerprint,q as workflowPolicyApplies,z as workflowPolicyFingerprint};
|
|
2
2
|
//# sourceMappingURL=sdk-governance.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as Ze,b as Qe,c as Ie,e as De}from"./focused-chunks/chunk-2Y77HWIX.js";import{A as me,B as ye,C as we,D as be,E as Re,F as _e,G as ke,H as Ae,I as Ge,J as Se,K as Ee,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 de,u as ce,v as le,w as he,x as fe,y as ge,z as ue}from"./focused-chunks/chunk-RPUDOJVB.js";import{A as L,B as V,C as K,D as tr,E as nr,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,m as $,n as H,o as v,p as M,q as N,r as P,s as B,t as z,u as W,v as j,w as F,y as _,z as U}from"./focused-chunks/chunk-PAT6QF63.js";import"./focused-chunks/chunk-GHQVM6K6.js";import"./focused-chunks/chunk-JCR32IAO.js";import"./focused-chunks/chunk-M22TI7LP.js";import"./focused-chunks/chunk-AL7SOFUL.js";import"./focused-chunks/chunk-VFQAZLKO.js";import"./focused-chunks/chunk-4PW5XWVI.js";import{a as ze}from"./focused-chunks/chunk-AK2CI2GI.js";import{Fa as w,P as He,Q as R,R as S,S as ve,T as Me,U as Ne,V as Pe,W as f,X as Be,lb as O}from"./focused-chunks/chunk-CIQ6YWCW.js";import"./focused-chunks/chunk-JLXGRDTG.js";import{createHash as Te}from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="ff60bc5b-bd85-5b3c-9a55-21e7e72477ac")}catch{}})();var k=1;function g(e){e?.throwIfAborted()}function l(e,r){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`Relationship graph ${r} must be non-empty`);return e.trim()}function u(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:k,fingerprint:Te("sha256").update(w({nodes:i,edges:s,kinds:a})).digest("hex"),created_at:new Date(n).toISOString(),nodes:i,edges:s,kinds:a})}function Ce(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function y(e){if(!Ce(e))throw new TypeError("Relationship graph snapshot must be an object");if(e.version!==k)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 R([]);for(let i of e.kinds)r.register(i);let t=new f(e.nodes,e.edges,r),n=u(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 c(e,r){l(e.name,"adapter name");let t=l(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=l(r.workspace,"workspace"),n=y(r.snapshot).snapshot,i=await c(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 c(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 xe(e,r={}){let t=e.map(y),n=new Map;for(let a of t)for(let o of a.snapshot.kinds){let d=n.get(o.kind);if(d&&w(d)!==w(o))throw new TypeError(`Conflicting federated relationship kind: ${o.kind}`);n.set(o.kind,o)}let i=new R([...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 u(s,i,r)}var m=class{name;#e=new Map;constructor(r="memory"){this.name=l(r,"adapter name")}async read(r){g(r.signal);let t=this.#e.get(l(r.workspace,"workspace"));return t?structuredClone(t):null}async replace(r){g(r.signal);let t=l(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=l(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(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="e47f9bb8-f98e-5159-9116-29c3e6fedfc3")}catch{}})();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 h(e,r){if(!e)throw new Error(`Relationship graph adapter conformance: ${r}`)}async function I(e,r={}){let t=r.workspace?.trim()||"pm-graph-conformance",n=S(),i=u(new f(["a","b"],[{source:"a",target:"b",kind:"related"}],n),n,{createdAt:"2026-01-01T00:00:00.000Z"}),s=u(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=[];h(await c(e,{workspace:t})===null,"workspace must start empty"),a.push({name:"empty-read",passed:!0});let o=await b(e,{workspace:t,snapshot:i});h(o.disposition==="written","first sync must write"),a.push({name:"atomic-replace",passed:!0}),(await e.read({workspace:t})).nodes.push("mutated-reader-copy"),h((await c(e,{workspace:t}))?.snapshot.nodes.length===2,"reads must not mutate stored state"),a.push({name:"read-isolation",passed:!0}),h((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}),h((await c(e,{workspace:t}))?.snapshot.fingerprint===s.fingerprint,"replacement must become visible"),a.push({name:"replacement-visibility",passed:!0});let d=!1;try{await e.replace({workspace:t,snapshot:i,expected_fingerprint:i.fingerprint})}catch{d=!0}return h(d,"stale compare-and-swap must fail"),a.push({name:"stale-cas",passed:!0}),e.clear&&(await e.clear({workspace:t,expected_fingerprint:s.fingerprint}),h(await c(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 I(new m,e?{workspace:e}:{})}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="58736688-35d0-545d-892e-e0ede7fedc1a")}catch{}})();import{createHash as D}from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="7163a078-d8be-5bca-813f-c941fcb8e406")}catch{}})();function T(e,r){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`Relationship backfill ${r} must be non-empty`);return e.trim()}function xr(e,r){let t=T(r.migrationId,"migrationId"),n=T(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=_(e,void 0,r.registry),o=a.graph.nodes(),d=a.graph.edges().map(p=>{let G=D("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}:${G}`,relationshipId:`migration:${t}:${G}`,action:"add",edge:p,author:n,timestamp:s,reason:`Backfill ${t} from legacy item metadata`})}),C=D("sha256").update(JSON.stringify({migrationId:t,nodes:o,events:d})).digest("hex"),x=new Set([...r.existingEventIds??[]].filter(p=>typeof p=="string").map(p=>p.trim()).filter(Boolean)),A=d.filter(p=>!x.has(p.eventId));return Object.freeze({migration_id:t,fingerprint:C,nodes:o,events:Object.freeze(A),edge_count:d.length,skipped_existing_count:d.length-A.length,duplicate_dependency_rows:a.duplicateRows.length,dangling_reference_count:a.dangling.active.length+a.dangling.legacy_terminal.length})}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="3160880c-9d85-52c5-ae1d-ada213f56ce6")}catch{}})();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,m as MemoryRelationshipGraphAdapter,k as RELATIONSHIP_GRAPH_SNAPSHOT_VERSION,Ze as RelationshipEventLog,Qe as RelationshipEventStore,f as RelationshipGraph,R as RelationshipKindRegistry,L as WorkspaceGraphCache,Ye as analyzeGraphImpact,v as analyzeHierarchyIntegrity,er as analyzeKnowledgeGraph,Xe as analyzeRelationshipExecution,ae as analyzeRelationshipSchedule,_ as assembleWorkspaceRelationshipGraph,P as assertHierarchyMutationAllowed,$e as assertMemoryRelationshipGraphAdapterConformance,De as assertNonHierarchyCardinalityMutationAllowed,Pe as assertRelationshipEdgeAllowed,I as assertRelationshipGraphAdapterConformance,le as auditWorkspaceRelationshipGraph,nr as buildRelationshipContext,ve as canonicalizeRelationshipKind,be as clearDurableGraphCache,Fe as collectBlockedByIds,Le as collectBlockedByIdsFromCorpus,j as collectDanglingDependencyReferences,Ke as collectDependencyBlockedIds,z as collectDuplicateDependencyRows,ce as collectDuplicateRelationshipEdgeGroups,H as collectHierarchyRelations,F as collectMissingDependencyTargetIds,Ie 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,u as createRelationshipGraphSnapshot,S as createRelationshipKindRegistry,Be as dependencyToRelationship,oe as deriveRelationshipDeadlines,ee as detectRelationshipCommunities,he as diffRelationshipAuditSnapshots,ue as durableGraphCachePath,Re as durableGraphCacheStatus,X as enumerateRelationshipPaths,xe as federateRelationshipGraphSnapshots,re as findRedundantRelationshipEdges,ie as findRelationshipCutStructure,Y as forEachMatchedRelationshipEdge,de as formatDuplicateEdgeGroup,M as formatHierarchyRelation,pe as formatOrderingStorageContradiction,me as graphAuditBaselinePath,q as hierarchyAncestors,J as hierarchyDescendants,Ue as indexBlockedByIds,N as indexHierarchyRelations,Ne as isOrderingRelationshipKind,ke as loadGraphAuditBaseline,c as loadRelationshipGraphAdapter,B as normalizeDependencyGraphTarget,ye as openDurableGraphCache,Z as orderingPredecessors,Q as orderingSuccessors,Se as parseGraphSubcommand,y as parseRelationshipGraphSnapshot,we as persistDurableGraphResult,xr as planRelationshipEventBackfill,Ge as planRelationshipRemediation,K as resetWorkspaceGraphCache,Me as resolveCanonicalRelationshipKind,Ve as resolveItemBlockers,We as resolveItemExecutionRole,$ as resolveWorkspaceRelationshipKindRegistry,Ee as runGraph,Ae as saveGraphAuditBaseline,qe as selectActionableEntries,_e as shouldPersistDurableGraphCache,b as syncRelationshipGraphAdapter,V as workspaceGraphCache};
|
|
1
|
+
import{a as Ze,b as Qe,c as Ie,e as De}from"./focused-chunks/chunk-IKXJ57XA.js";import{A as me,B as ye,C as we,D as be,E as Re,F as _e,G as ke,H as Ae,I as Ge,J as Se,K as Ee,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 de,u as ce,v as le,w as he,x as fe,y as ge,z as ue}from"./focused-chunks/chunk-LKN2WGGB.js";import{A as L,B as V,C as K,D as tr,E as nr,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,m as $,n as H,o as v,p as M,q as N,r as P,s as B,t as z,u as W,v as j,w as F,y as _,z as U}from"./focused-chunks/chunk-PWUTFKSI.js";import"./focused-chunks/chunk-GHQVM6K6.js";import"./focused-chunks/chunk-PZRB7IXH.js";import"./focused-chunks/chunk-WSYPVBKS.js";import"./focused-chunks/chunk-RY4QEMAE.js";import"./focused-chunks/chunk-HJ27QLZV.js";import"./focused-chunks/chunk-4PW5XWVI.js";import{a as ze}from"./focused-chunks/chunk-AK2CI2GI.js";import{Fa as w,P as He,Q as R,R as S,S as ve,T as Me,U as Ne,V as Pe,W as f,X as Be,lb as O}from"./focused-chunks/chunk-HUXZCPWT.js";import"./focused-chunks/chunk-G6ERMFJ5.js";import{createHash as Te}from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="ff60bc5b-bd85-5b3c-9a55-21e7e72477ac")}catch{}})();var k=1;function g(e){e?.throwIfAborted()}function l(e,r){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`Relationship graph ${r} must be non-empty`);return e.trim()}function u(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:k,fingerprint:Te("sha256").update(w({nodes:i,edges:s,kinds:a})).digest("hex"),created_at:new Date(n).toISOString(),nodes:i,edges:s,kinds:a})}function Ce(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function y(e){if(!Ce(e))throw new TypeError("Relationship graph snapshot must be an object");if(e.version!==k)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 R([]);for(let i of e.kinds)r.register(i);let t=new f(e.nodes,e.edges,r),n=u(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 c(e,r){l(e.name,"adapter name");let t=l(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=l(r.workspace,"workspace"),n=y(r.snapshot).snapshot,i=await c(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 c(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 xe(e,r={}){let t=e.map(y),n=new Map;for(let a of t)for(let o of a.snapshot.kinds){let d=n.get(o.kind);if(d&&w(d)!==w(o))throw new TypeError(`Conflicting federated relationship kind: ${o.kind}`);n.set(o.kind,o)}let i=new R([...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 u(s,i,r)}var m=class{name;#e=new Map;constructor(r="memory"){this.name=l(r,"adapter name")}async read(r){g(r.signal);let t=this.#e.get(l(r.workspace,"workspace"));return t?structuredClone(t):null}async replace(r){g(r.signal);let t=l(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=l(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(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="e47f9bb8-f98e-5159-9116-29c3e6fedfc3")}catch{}})();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 h(e,r){if(!e)throw new Error(`Relationship graph adapter conformance: ${r}`)}async function I(e,r={}){let t=r.workspace?.trim()||"pm-graph-conformance",n=S(),i=u(new f(["a","b"],[{source:"a",target:"b",kind:"related"}],n),n,{createdAt:"2026-01-01T00:00:00.000Z"}),s=u(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=[];h(await c(e,{workspace:t})===null,"workspace must start empty"),a.push({name:"empty-read",passed:!0});let o=await b(e,{workspace:t,snapshot:i});h(o.disposition==="written","first sync must write"),a.push({name:"atomic-replace",passed:!0}),(await e.read({workspace:t})).nodes.push("mutated-reader-copy"),h((await c(e,{workspace:t}))?.snapshot.nodes.length===2,"reads must not mutate stored state"),a.push({name:"read-isolation",passed:!0}),h((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}),h((await c(e,{workspace:t}))?.snapshot.fingerprint===s.fingerprint,"replacement must become visible"),a.push({name:"replacement-visibility",passed:!0});let d=!1;try{await e.replace({workspace:t,snapshot:i,expected_fingerprint:i.fingerprint})}catch{d=!0}return h(d,"stale compare-and-swap must fail"),a.push({name:"stale-cas",passed:!0}),e.clear&&(await e.clear({workspace:t,expected_fingerprint:s.fingerprint}),h(await c(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 I(new m,e?{workspace:e}:{})}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="58736688-35d0-545d-892e-e0ede7fedc1a")}catch{}})();import{createHash as D}from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="7163a078-d8be-5bca-813f-c941fcb8e406")}catch{}})();function T(e,r){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`Relationship backfill ${r} must be non-empty`);return e.trim()}function xr(e,r){let t=T(r.migrationId,"migrationId"),n=T(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=_(e,void 0,r.registry),o=a.graph.nodes(),d=a.graph.edges().map(p=>{let G=D("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}:${G}`,relationshipId:`migration:${t}:${G}`,action:"add",edge:p,author:n,timestamp:s,reason:`Backfill ${t} from legacy item metadata`})}),C=D("sha256").update(JSON.stringify({migrationId:t,nodes:o,events:d})).digest("hex"),x=new Set([...r.existingEventIds??[]].filter(p=>typeof p=="string").map(p=>p.trim()).filter(Boolean)),A=d.filter(p=>!x.has(p.eventId));return Object.freeze({migration_id:t,fingerprint:C,nodes:o,events:Object.freeze(A),edge_count:d.length,skipped_existing_count:d.length-A.length,duplicate_dependency_rows:a.duplicateRows.length,dangling_reference_count:a.dangling.active.length+a.dangling.legacy_terminal.length})}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="3160880c-9d85-52c5-ae1d-ada213f56ce6")}catch{}})();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,m as MemoryRelationshipGraphAdapter,k as RELATIONSHIP_GRAPH_SNAPSHOT_VERSION,Ze as RelationshipEventLog,Qe as RelationshipEventStore,f as RelationshipGraph,R as RelationshipKindRegistry,L as WorkspaceGraphCache,Ye as analyzeGraphImpact,v as analyzeHierarchyIntegrity,er as analyzeKnowledgeGraph,Xe as analyzeRelationshipExecution,ae as analyzeRelationshipSchedule,_ as assembleWorkspaceRelationshipGraph,P as assertHierarchyMutationAllowed,$e as assertMemoryRelationshipGraphAdapterConformance,De as assertNonHierarchyCardinalityMutationAllowed,Pe as assertRelationshipEdgeAllowed,I as assertRelationshipGraphAdapterConformance,le as auditWorkspaceRelationshipGraph,nr as buildRelationshipContext,ve as canonicalizeRelationshipKind,be as clearDurableGraphCache,Fe as collectBlockedByIds,Le as collectBlockedByIdsFromCorpus,j as collectDanglingDependencyReferences,Ke as collectDependencyBlockedIds,z as collectDuplicateDependencyRows,ce as collectDuplicateRelationshipEdgeGroups,H as collectHierarchyRelations,F as collectMissingDependencyTargetIds,Ie 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,u as createRelationshipGraphSnapshot,S as createRelationshipKindRegistry,Be as dependencyToRelationship,oe as deriveRelationshipDeadlines,ee as detectRelationshipCommunities,he as diffRelationshipAuditSnapshots,ue as durableGraphCachePath,Re as durableGraphCacheStatus,X as enumerateRelationshipPaths,xe as federateRelationshipGraphSnapshots,re as findRedundantRelationshipEdges,ie as findRelationshipCutStructure,Y as forEachMatchedRelationshipEdge,de as formatDuplicateEdgeGroup,M as formatHierarchyRelation,pe as formatOrderingStorageContradiction,me as graphAuditBaselinePath,q as hierarchyAncestors,J as hierarchyDescendants,Ue as indexBlockedByIds,N as indexHierarchyRelations,Ne as isOrderingRelationshipKind,ke as loadGraphAuditBaseline,c as loadRelationshipGraphAdapter,B as normalizeDependencyGraphTarget,ye as openDurableGraphCache,Z as orderingPredecessors,Q as orderingSuccessors,Se as parseGraphSubcommand,y as parseRelationshipGraphSnapshot,we as persistDurableGraphResult,xr as planRelationshipEventBackfill,Ge as planRelationshipRemediation,K as resetWorkspaceGraphCache,Me as resolveCanonicalRelationshipKind,Ve as resolveItemBlockers,We as resolveItemExecutionRole,$ as resolveWorkspaceRelationshipKindRegistry,Ee as runGraph,Ae as saveGraphAuditBaseline,qe as selectActionableEntries,_e as shouldPersistDurableGraphCache,b as syncRelationshipGraphAdapter,V as workspaceGraphCache};
|
|
2
2
|
//# sourceMappingURL=sdk-graph.js.map
|