@unbrained/pm-cli 2026.10.10 → 2026.10.12
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 -36
- package/CHANGELOG.md +31 -4
- package/dist/cli/commander-usage.d.ts +5 -5
- package/dist/cli/commander-usage.js +3 -3
- package/dist/cli/error-guidance.d.ts +2 -0
- package/dist/cli/error-guidance.js +2 -2
- package/dist/cli/help-json-payload.js +1 -1
- package/dist/cli/main.d.ts +1 -0
- package/dist/cli/main.js +4 -4
- package/dist/cli/register-operations.d.ts +9 -4
- package/dist/cli/register-operations.js +1 -1
- package/dist/cli-bundle/bundle-manifest.json +1 -382
- package/dist/cli-bundle/chunks/{chunk-2JYTSTQP.js → chunk-3LQTJN4J.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-YMLF6QT7.js → chunk-6PZPUJW3.js} +28 -28
- package/dist/cli-bundle/chunks/{chunk-RUT3CCAG.js → chunk-B465HPS5.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ESRACL6K.js → chunk-DT3KUUKY.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SSY4OSJR.js → chunk-GUVKPOY6.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-ILQEZ4Y6.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-RBPOO46D.js → chunk-JRRXWH5B.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MEWBSWE3.js → chunk-LH5QDBMN.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KNW3RSLS.js → chunk-M5NDSW6E.js} +30 -30
- package/dist/cli-bundle/chunks/{chunk-K2UTE75T.js → chunk-MHPU2LDF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OBLO45UM.js → chunk-QM3M7GB5.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-S445XEYT.js → chunk-UABZJXIS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ZWRLAOA4.js → chunk-X2I2EEAS.js} +2 -2
- package/dist/cli-bundle/chunks/{register-list-query-T6BOR67M.js → register-list-query-OR33UEML.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-6NXR7SAJ.js → register-mutation-R34EJ3NH.js} +2 -2
- package/dist/cli-bundle/chunks/register-operations-UHSMEHSF.js +2 -0
- package/dist/cli-bundle/chunks/{register-setup-MAYFPKBX.js → register-setup-5E3PT22L.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-SIEGIPNT.js → chunk-7QIZB2F2.js} +7 -7
- package/dist/cli-bundle/focused-chunks/{chunk-PLTTMQAW.js → chunk-AJG3DBXR.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-AXBO53EQ.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-W5AE7GKZ.js → chunk-CYEZLKLL.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-PBCYGO7X.js → chunk-FXRWJEQ5.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-GVGFUD52.js → chunk-IKJFAU32.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-DMSADMEU.js → chunk-OGOLIS5R.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-PPH5N26M.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-WAOXID5J.js → chunk-RNAWRTQV.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-B3YW6H2I.js → chunk-RZVNGUT7.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-52UJEHEV.js → chunk-SV6YYZLR.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-EIOQNLBQ.js → chunk-TS46OZD5.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-KNJR2WUO.js → chunk-VBTLX5SN.js} +62 -62
- package/dist/cli-bundle/focused-chunks/{chunk-JGFSSR3G.js → chunk-YCOJLIDI.js} +3 -3
- package/dist/cli-bundle/focused-chunks/chunk-YDJT33JU.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-AU6VJGTY.js → chunk-Z4T3637Y.js} +2 -2
- package/dist/cli-bundle/main.js +22 -22
- 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 +31 -31
- 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 +24 -24
- 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 +9 -9
- package/dist/core/history/event-classification.d.ts +1 -1
- package/dist/core/history/event-classification.js +1 -1
- package/dist/core/item/item-format.d.ts +2 -0
- package/dist/core/item/item-format.js +2 -2
- package/dist/core/telemetry/runtime.d.ts +1 -1
- package/dist/core/telemetry/runtime.js +2 -2
- package/dist/core/test/background-runs.d.ts +1 -0
- package/dist/core/test/background-runs.js +2 -2
- package/dist/sdk/agent/command-suggestions.d.ts +2 -0
- package/dist/sdk/agent/command-suggestions.js +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.js +1 -1
- package/dist/sdk/cli-contracts/flag-lexicon-contracts.js +1 -1
- package/dist/sdk/cli-contracts/grammar-contracts.js +1 -1
- package/dist/sdk/cli-contracts/registration-helpers.d.ts +1 -4
- package/dist/sdk/cli-contracts/registration-helpers.js +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +1 -1
- package/dist/sdk/cli-contracts/tool-schema.d.ts +1 -1
- package/dist/sdk/cli-contracts/tool-schema.js +1 -1
- package/dist/sdk/core.d.ts +1 -0
- package/dist/sdk/core.js +1 -1
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1 -1
- package/dist/sdk/governance/artifact-ledgers.d.ts +59 -0
- package/dist/sdk/governance/artifact-ledgers.js +2 -0
- package/dist/sdk/governance.d.ts +1 -0
- package/dist/sdk/governance.js +1 -1
- package/dist/sdk/index.d.ts +2 -0
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/public-surface.json +1 -1
- package/dist/sdk/test/batch.js +1 -1
- package/dist/sdk/test/command-args.d.ts +4 -0
- package/dist/sdk/test/command-args.js +2 -0
- package/dist/sdk/test/entry.d.ts +3 -0
- package/dist/sdk/test/entry.js +1 -1
- package/dist/sdk/test/execution.d.ts +15 -4
- package/dist/sdk/test/execution.js +2 -2
- package/dist/sdk/test/prerequisites.d.ts +6 -0
- package/dist/sdk/test/prerequisites.js +2 -0
- package/dist/sdk/test/trust.js +1 -1
- package/dist/sdk/test/update.d.ts +55 -0
- package/dist/sdk/test/update.js +2 -0
- package/dist/types.d.ts +4 -0
- package/dist/types.js +1 -1
- package/docs/LINKED_TEST_EDITS.md +79 -0
- package/docs/RELEASE_LEDGER_RECONCILIATION.md +148 -0
- package/docs/RELEASE_RELIABILITY.md +4 -0
- package/docs/RELEASING.md +53 -13
- package/docs/SDK.md +178 -636
- package/docs/SDK_EVIDENCE_TRACEABILITY.md +4 -0
- package/docs/TESTING.md +13 -0
- package/docs/agent-task-token-baseline.json +1 -292
- package/docs/agent-task-transcripts.json +1 -478
- package/docs/ecosystem-review-2026-09-28.json +1 -2866
- package/docs/examples/policy-restricted-extension/manifest.json +1 -22
- package/docs/examples/policy-restricted-extension/package.json +1 -8
- package/docs/examples/sdk-agent-environment/package.json +1 -8
- package/docs/examples/sdk-app-embedding/package.json +1 -9
- package/docs/examples/sdk-contract-consumer/package.json +1 -11
- package/docs/examples/sdk-custom-tool/package.json +1 -13
- package/docs/examples/starter-extension/manifest.json +1 -33
- package/docs/examples/starter-extension/package.json +1 -10
- package/docs/generated/FLAG_LEXICON_BUDGETS.md +2 -2
- package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +8 -3
- package/docs/performance/corpus-shape-comparison.json +1 -108
- package/docs/performance/latest-scale-report.json +1 -418
- package/docs/performance/runner-qualification.md +36 -0
- package/docs/performance/scale-100k-report.json +1 -418
- package/docs/schemas/extension-manifest.schema.json +1 -165
- package/marketplace.json +1 -36
- package/package.json +1 -1
- package/packages/pm-beads/extensions/beads/manifest.json +1 -28
- package/packages/pm-beads/extensions/beads/package.json +1 -3
- package/packages/pm-beads/package.json +1 -50
- package/packages/pm-calendar/extensions/calendar/manifest.json +1 -22
- package/packages/pm-calendar/extensions/calendar/package.json +1 -3
- package/packages/pm-calendar/package.json +1 -51
- package/packages/pm-command-kit/extensions/command-kit/manifest.json +1 -22
- package/packages/pm-command-kit/extensions/command-kit/package.json +1 -3
- package/packages/pm-command-kit/package.json +1 -53
- package/packages/pm-digital-twin/extensions/digital-twin/manifest.json +1 -19
- package/packages/pm-digital-twin/extensions/digital-twin/package.json +1 -3
- package/packages/pm-digital-twin/package.json +1 -58
- package/packages/pm-governance-audit/extensions/governance-audit/manifest.json +1 -19
- package/packages/pm-governance-audit/extensions/governance-audit/package.json +1 -3
- package/packages/pm-governance-audit/package.json +1 -55
- package/packages/pm-guide-shell/extensions/guide-shell/manifest.json +1 -22
- package/packages/pm-guide-shell/extensions/guide-shell/package.json +1 -3
- package/packages/pm-guide-shell/package.json +1 -52
- package/packages/pm-kanban/extensions/kanban/manifest.json +1 -19
- package/packages/pm-kanban/extensions/kanban/package.json +1 -3
- package/packages/pm-kanban/package.json +1 -57
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/manifest.json +1 -19
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/package.json +1 -3
- package/packages/pm-lifecycle-hooks/package.json +1 -52
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/manifest.json +1 -29
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/package.json +1 -3
- package/packages/pm-linked-test-adapters/package.json +1 -53
- package/packages/pm-search-advanced/extensions/search-advanced/manifest.json +1 -29
- package/packages/pm-search-advanced/extensions/search-advanced/package.json +1 -3
- package/packages/pm-search-advanced/package.json +1 -54
- package/packages/pm-templates/extensions/templates/manifest.json +1 -22
- package/packages/pm-templates/extensions/templates/package.json +1 -3
- package/packages/pm-templates/package.json +1 -50
- package/packages/pm-todos/extensions/todos/manifest.json +1 -29
- package/packages/pm-todos/extensions/todos/package.json +1 -3
- package/packages/pm-todos/package.json +1 -51
- package/packages/pm-vcs/extensions/vcs/manifest.json +1 -19
- package/packages/pm-vcs/extensions/vcs/package.json +1 -3
- package/packages/pm-vcs/package.json +1 -55
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -25
- package/plugins/pm-claude/.mcp.json +1 -8
- package/plugins/pm-claude/hooks/hooks.json +1 -17
- package/plugins/pm-claude/package.json +1 -9
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -45
- package/plugins/pm-codex/.mcp.json +1 -11
- package/plugins/pm-codex/mcp.json +1 -11
- package/plugins/pm-codex/package.json +1 -9
- package/plugins/pm-codex/plugin.json +1 -45
- package/runtime-dependencies.json +1 -512
- package/dist/cli-bundle/chunks/chunk-BXSXT5Z6.js +0 -2
- package/dist/cli-bundle/chunks/register-operations-PDOBQZUJ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-2CJWTLQG.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-MJQ253F3.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-WOEZJUA2.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{$b as Tt,Aa as We,Ba as Je,Ca as Ze,Da as Ge,Ea as He,F as Ue,Fa as Ve,G as Pe,Ga as Ye,H as Fe,Ha as Ke,I as je,J as qe,Oa as it,Pa as rt,Qa as nt,Ra as at,Sa as ot,Ta as dt,Ua as st,Va as ut,Wa as ft,Wb as bt,Xa as pt,Xb as kt,Yb as Et,Zb as St,_b as It,a as le,ac as At,b as ce,bc as Dt,c as me,cc as Rt,d as _e,dc as $t,e as we,ec as Bt,f as ge,fc as v,g as ve,gc as Ct,h as xe,hc as Nt,i as he,ic as Ot,j as ye,jc as Ut,k as be,kc as Pt,l as ke,lc as Ft,m as Ee,mb as lt,mc as jt,n as Se,nc as x,o as Ie,p as Te,q as Ae,qb as ct,r as De,rb as mt,s as Re,sb as _t,t as $e,tb as wt,u as Be,ub as gt,v as Ce,vb as vt,w as Ne,wb as xt,x as Oe,xb as ht,yb as yt,za as ze}from"./focused-chunks/chunk-KNJR2WUO.js";import"./focused-chunks/chunk-W5AE7GKZ.js";import{h as G}from"./focused-chunks/chunk-WAOXID5J.js";import{E as F,F as j,G as q,H as z,I as W,J,K as Z}from"./focused-chunks/chunk-2CJWTLQG.js";import"./focused-chunks/chunk-52UJEHEV.js";import{Aa as ne,Ba as ae,Ca as oe,Da as de,Ea as se,Fa as ue,Ga as fe,Ha as pe,qb as Xe,rb as Le,sb as Me,ta as M,tb as Qe,ua as Q,ub as et,va as ee,vb as tt,wa as te,xa as ie,ya as re}from"./focused-chunks/chunk-JGFSSR3G.js";import"./focused-chunks/chunk-PLTTMQAW.js";import"./focused-chunks/chunk-AU6VJGTY.js";import"./focused-chunks/chunk-WOEZJUA2.js";import{E as H,F as V,G as Y,H as K,I as X,lb as L}from"./focused-chunks/chunk-SIEGIPNT.js";import"./focused-chunks/chunk-PBCYGO7X.js";import"./focused-chunks/chunk-YLVHHWHN.js";import{$b as U,Sb as T,Tb as A,Ub as D,Vb as R,Wb as $,Xb as B,Yb as C,Zb as N,_b as O,_d as _,ac as P}from"./focused-chunks/chunk-B3YW6H2I.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]="7e55d416-9cc3-51c5-8e56-6b5fd5c836a9")}catch{}})();var h=["captured_redacted","captured_verbatim"],y=[{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 f(e){return typeof e=="string"&&e.trim().length>0}function b(e,t){if(typeof t!="object"||t===null||Array.isArray(t))return[{boundary_id:e.id,kind:"invalid_fixture",detail:`${e.fixture_path} must contain a JSON object.`}];let i=t,r=[];i.boundary_id!==e.id&&r.push({boundary_id:e.id,kind:"fixture_boundary_mismatch",detail:`${e.fixture_path} names ${String(i.boundary_id)} instead of ${e.id}.`}),(i.version!==1||!h.includes(i.capture_source)||!f(i.capture_provenance)||!Array.isArray(i.redactions)||!i.redactions.every(f)||!("input"in i)||!("observed"in i))&&r.push({boundary_id:e.id,kind:"invalid_fixture",detail:`${e.fixture_path} lacks captured provenance, redaction metadata, input, or observed output.`});let s=JSON.stringify(t);for(let u of y)u.pattern.test(s)&&r.push({boundary_id:e.id,kind:"unsafe_fixture",detail:`${e.fixture_path} contains a possible ${u.label}.`});return r}function k(e,t){let i=Date.parse(e.waiver_expires_at),r=f(e.waiver_reason)&&f(e.waiver_owner)&&e.waiver_expires_at.endsWith("Z")&&_(e.waiver_expires_at)&&Number.isFinite(i);return{captured:0,waived:r&&i>=t?1:0,findings:r?i<t?[{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 E(e,t,i){if(!f(e.id)||!f(e.producer)||!f(e.consumer)||!f(e.format))return{captured:0,waived:0,findings:[{boundary_id:f(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=t[e.fixture_path],s=f(e.fixture_path)&&e.fixture_path in t?b(e,r):[{boundary_id:e.id,kind:"missing_fixture",detail:`Boundary ${e.id} fixture ${String(e.fixture_path)} is missing.`}];return{captured:s.length===0?1:0,waived:0,findings:s}}return k(e,i)}function zt(e,t,i=new Date){let r=[];if(e.version!==1||!f(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 s=new Set,u=0,n=0;for(let a of e.boundaries){if(typeof a!="object"||a===null||Array.isArray(a)){r.push({boundary_id:"unknown",kind:"invalid_boundary",detail:"Each boundary must be a JSON object."});continue}let o=a,p=f(o.id)?o.id:void 0;if(p!==void 0&&s.has(p)){r.push({boundary_id:p,kind:"duplicate_boundary",detail:`Boundary ${p} is inventoried more than once.`});continue}p!==void 0&&s.add(p);let c=E(o,t,i.getTime());u+=c.captured,n+=c.waived,r.push(...c.findings)}return r.sort((a,o)=>a.boundary_id!==o.boundary_id?a.boundary_id.localeCompare(o.boundary_id):a.kind.localeCompare(o.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:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="604d7dcb-9fea-5631-8a72-b2a7ff3278f8")}catch{}})();function l(e){if(typeof e!="string"||!_(e))throw new TypeError("Invalid reliability timestamp.");return Date.parse(e)}function S(e){let t=l(e.window_start),i=l(e.window_end);if(t>=i||!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:t,end:i}}function I(e,t,i,r){let s=new Map(t.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 a=s.get(n.family);if(!a||!["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 o=l(n.started_at);if(n.repaired_at!==void 0&&(l(n.repaired_at)<o||n.outcome!=="failure"))throw new TypeError("Invalid reliability repair chronology.");o>=i&&o<r&&a.push(n)}return s}function Zt(e,t){let{start:i,end:r}=S(t),s=[...I(e,t.families,i,r)].map(([u,n])=>{let a=n.filter(d=>d.outcome==="failure"),o=n.filter(d=>d.outcome!=="pending").length,p=o===0?null:a.length/o,c=a.filter(d=>d.repaired_at!==void 0&&l(d.repaired_at)<r),w={product:0,infrastructure:0,unknown:0};for(let d of a)w[d.cause??"unknown"]+=1;let m=[];return o<t.min_completed_attempts&&m.push("insufficient_completed_attempts"),p!==null&&p>t.max_failure_rate&&m.push("failure_rate"),{family:u,attempts:n.length,completed:o,failed:a.length,pending:n.length-o,failure_rate:p,affected_days:[...new Set(a.map(d=>new Date(l(d.started_at)).toISOString().slice(0,10)))].sort(),repair_minutes:c.map(d=>(l(d.repaired_at)-l(d.started_at))/6e4).sort((d,g)=>d-g),unresolved:a.length-c.length,causes:w,violations:m,ok:m.length===0}});return{schema:"pm-reliability-window/1",window_start:new Date(i).toISOString(),window_end:new Date(r).toISOString(),ok:s.every(u=>u.ok),families:s}}(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]="c0218aaf-791c-57b1-8f9a-13816cb0c01f")}catch{}})();export{At as ASSURANCE_ACTIONS,Dt as ASSURANCE_DECLARATION_KINDS,ge as ASSURANCE_DOCUMENT_VERSION,ve as ASSURANCE_GATE_TRIGGERS,xe as ASSURANCE_MEASUREMENT_SOURCE_KINDS,it as ASSURANCE_PRESET_IDS,ce as AssuranceEvaluationRefusalError,le as AssuranceMutationRefusalError,me as AssuranceSourceResolutionError,h as BOUNDARY_FIXTURE_CAPTURE_SOURCES,Y as CURRENT_HISTORY_HASH_ALGORITHM,F as DEFECT_ESCAPE_CLASSES,j as DEFECT_GATE_EVIDENCE_DISPOSITIONS,ze as HISTORY_AUTHOR_ATTRIBUTION_BASELINE,H as HISTORY_HASH_ALGORITHMS,V as LEGACY_HISTORY_HASH_ALGORITHM,A as MAX_WORKFLOW_POLICIES,D as MAX_WORKFLOW_POLICY_TERMS,G as PM_HISTORY_ATTESTATION_CONTRACT,M as PM_MUTATION_ACTION_CONTRACTS,T as WORKFLOW_POLICY_ACTIONS,Pe as WORKFLOW_POLICY_DOCUMENT_SCHEMA,Ue as WORKFLOW_POLICY_SCHEMA,wt as _testOnlyHealthCommand,Le as _testOnlySimilarity,kt as _testOnlyValidateCommand,jt as _testOnlyWorkspacePosition,ot as acceptAssuranceProposals,Ke as acknowledgeUnknownAuthorHistoryEvents,Ye as acknowledgeUnknownAuthorHistoryEventsFromTransport,z as analyzeDefectChangeRisk,Tt as analyzeDefectRecurrenceCoverage,Qe as analyzeDuplicateItems,nt as applyAssurancePreset,xt as applyClosureTimestampFix,he as assuranceAssertionUpdateIsLoosening,q as buildDefectRecurrenceIndex,ht as buildLinkedFileRepairReport,mt as buildStatusRoleWarnings,Fe as buildWorkflowCompletenessCheck,We as classifyHistoryAuthorEvent,rt as createAssurancePreset,St as createAssuranceWorkspaceContext,Se as createEmptyAssuranceDocument,je as createLifecycleCompletenessPolicies,P as createWorkflowPolicyEvaluator,at as deriveAssuranceProposals,gt as deriveClosureTimestamp,Te as evaluateAssuranceAssertion,Ae as evaluateAssuranceGate,zt as evaluateBoundaryFixtures,W as evaluateDefectGateEvidence,Ie as evaluateMeasurement,ee as evaluateMutationGuard,Zt as evaluateReliabilityWindow,tt as evaluateSimilarityGovernance,U as evaluateWorkflowPolicies,Nt as exportAttestation,et as findDuplicateClusters,Me as findSimilarItems,Ft as formatWorkspacePositionHuman,Re as getAssuranceDeclaration,re as getMutationActionContract,X as historyDigest,Je as inspectHistoryAuthorStream,fe as inspectStaleInProgressItems,ct as inspectStatusRoleAssignments,te as isMutationAction,ne as jaccardSimilarity,De as listAssuranceDeclarations,Oe as listAssuranceVerdicts,ft as listInvalidProvenanceHistoryStreamIds,ie as listMutationActions,we as normalizeAssuranceEvaluation,_e as normalizeAssuranceMutation,ut as normalizeInvalidHistoryProvenance,ae as normalizeSimilarityText,Z as parseDefectChangeRiskRequest,It as parseDefectRecurrenceCoverageRequest,J as parseDefectRecurrencePolicy,Ct as parseHistoryAttestation,Ve as parseUnknownAuthorHistoryEventCoordinates,R as parseWorkflowPolicy,$ as parseWorkflowPolicyDocument,Ge as planUnknownAuthorHistoryAcknowledgment,de as prepareSimilarityText,bt as projectValidateCounts,dt as promoteAssuranceAssertion,$e as putAssuranceDeclaration,Be as putAssuranceDeclarationBundle,L as readWorkflowPolicies,B as readWorkflowPolicyField,Pt as readWorkspacePosition,Ne as recordAssuranceVerdict,Ce as removeAssuranceDeclaration,K as resolveHistoryHashAlgorithm,He as resolveUnknownAuthorAcknowledgmentSelector,Rt as runAssuranceAction,$t as runAssuranceDispatch,Bt as runGc,_t as runHealth,Ut as runHistoryAttest,lt as runHistoryMaintenance,x as runReindex,v as runUpgrade,Et as runValidate,qe as runWorkflowPolicyAction,vt as scanClosureTimestamps,st as scanExtensionHostVersions,Ze as scanHistoryAuthorAttribution,Q as scanMutationSecrets,pt as scanProvenanceResolverHealth,pe as scanStaleInProgressItems,yt as scanStorageIntegrity,se as scoreItemSimilarity,ue as scorePreparedItemSimilarity,Xe as similarityAdvisoryWarnings,oe as tokenizeSimilarityText,be as validateAssertionDefinition,Ee as validateAssuranceDocument,ke as validateGateDefinition,ye as validateMeasurementDefinition,Ot as verifyAttestation,N as workflowApprovalFingerprint,O as workflowPolicyApplies,C as workflowPolicyFingerprint};
|
|
1
|
+
import{$b as Tt,Aa as Me,Ba as Ze,Ca as Ge,Da as He,Ea as Ve,F as Ue,Fa as Ye,G as Pe,Ga as Ke,H as Fe,Ha as Le,I as Je,Ia as Xe,J as We,Pa as ot,Qa as at,Ra as dt,Sa as st,Ta as ft,Ua as ut,Va as ct,Wa as pt,Xa as lt,Ya as mt,a as _e,ac as It,b as ge,bc as St,c as ye,cc as At,d as we,dc as Dt,e as he,ec as Rt,f as ve,fc as Ot,g as be,gc as $t,h as xe,hc as Nt,i as Ee,ic as Bt,j as ke,jc as Ct,k as Te,kc as h,l as Ie,lc as zt,m as Se,mc as jt,n as Ae,nb as _t,nc as qt,o as De,oc as Ut,p as Re,pc as Pt,q as Oe,qc as Ft,r as $e,rb as gt,rc as Jt,s as Ne,sb as yt,sc as v,t as Be,tb as wt,u as Ce,ub as ht,v as ze,vb as vt,w as je,wb as bt,x as qe,xb as xt,yb as Et,zb as kt}from"./focused-chunks/chunk-VBTLX5SN.js";import"./focused-chunks/chunk-CYEZLKLL.js";import{h as V}from"./focused-chunks/chunk-RNAWRTQV.js";import{E as F,F as J,G as W,H as M,I as Z,J as G,K as H}from"./focused-chunks/chunk-AXBO53EQ.js";import"./focused-chunks/chunk-SV6YYZLR.js";import{Aa as de,Ba as se,Ca as fe,Da as ue,Ea as ce,Fa as pe,Ga as le,Ha as me,qb as Qe,rb as et,sb as tt,ta as te,tb as it,ua as ie,ub as rt,va as re,vb as nt,wa as ne,xa as oe,ya as ae}from"./focused-chunks/chunk-YCOJLIDI.js";import"./focused-chunks/chunk-AJG3DBXR.js";import"./focused-chunks/chunk-Z4T3637Y.js";import"./focused-chunks/chunk-YDJT33JU.js";import{E as Y,F as K,G as L,H as X,I as Q,mb as ee}from"./focused-chunks/chunk-7QIZB2F2.js";import"./focused-chunks/chunk-FXRWJEQ5.js";import"./focused-chunks/chunk-YLVHHWHN.js";import{$b as U,Sb as R,Tb as O,Ub as $,Vb as N,Wb as B,Xb as C,Yb as z,Zb as j,_b as q,_d as y,ac as P}from"./focused-chunks/chunk-RZVNGUT7.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 Mt(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 Ht(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 Yt(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{Ot as ASSURANCE_ACTIONS,$t as ASSURANCE_DECLARATION_KINDS,ve as ASSURANCE_DOCUMENT_VERSION,be as ASSURANCE_GATE_TRIGGERS,xe as ASSURANCE_MEASUREMENT_SOURCE_KINDS,ot as ASSURANCE_PRESET_IDS,ge as AssuranceEvaluationRefusalError,_e as AssuranceMutationRefusalError,ye as AssuranceSourceResolutionError,b as BOUNDARY_FIXTURE_CAPTURE_SOURCES,L as CURRENT_HISTORY_HASH_ALGORITHM,F as DEFECT_ESCAPE_CLASSES,J as DEFECT_GATE_EVIDENCE_DISPOSITIONS,Me as HISTORY_AUTHOR_ATTRIBUTION_BASELINE,Y as HISTORY_HASH_ALGORITHMS,K as LEGACY_HISTORY_HASH_ALGORITHM,O as MAX_WORKFLOW_POLICIES,$ as MAX_WORKFLOW_POLICY_TERMS,V as PM_HISTORY_ATTESTATION_CONTRACT,te as PM_MUTATION_ACTION_CONTRACTS,R as WORKFLOW_POLICY_ACTIONS,Pe as WORKFLOW_POLICY_DOCUMENT_SCHEMA,Ue as WORKFLOW_POLICY_SCHEMA,ht as _testOnlyHealthCommand,et as _testOnlySimilarity,It as _testOnlyValidateCommand,Jt as _testOnlyWorkspacePosition,ft as acceptAssuranceProposals,Xe as acknowledgeUnknownAuthorHistoryEvents,Le as acknowledgeUnknownAuthorHistoryEventsFromTransport,M as analyzeDefectChangeRisk,Rt as analyzeDefectRecurrenceCoverage,it as analyzeDuplicateItems,dt as applyAssurancePreset,xt as applyClosureTimestampFix,Ee as assuranceAssertionUpdateIsLoosening,W as buildDefectRecurrenceIndex,Et as buildLinkedFileRepairReport,yt as buildStatusRoleWarnings,Fe as buildWorkflowCompletenessCheck,Ze as classifyHistoryAuthorEvent,at as createAssurancePreset,At as createAssuranceWorkspaceContext,Ae as createEmptyAssuranceDocument,Je as createLifecycleCompletenessPolicies,P as createWorkflowPolicyEvaluator,st as deriveAssuranceProposals,vt as deriveClosureTimestamp,Re as evaluateAssuranceAssertion,Oe as evaluateAssuranceGate,Mt as evaluateBoundaryFixtures,Z as evaluateDefectGateEvidence,De as evaluateMeasurement,re as evaluateMutationGuard,Ht as evaluateReliabilityWindow,nt as evaluateSimilarityGovernance,U as evaluateWorkflowPolicies,jt as exportAttestation,rt as findDuplicateClusters,tt as findSimilarItems,Ft as formatWorkspacePositionHuman,Ne as getAssuranceDeclaration,ae as getMutationActionContract,Q as historyDigest,Ge as inspectHistoryAuthorStream,le as inspectStaleInProgressItems,gt as inspectStatusRoleAssignments,ne as isMutationAction,de as jaccardSimilarity,$e as listAssuranceDeclarations,qe as listAssuranceVerdicts,lt as listInvalidProvenanceHistoryStreamIds,oe as listMutationActions,he as normalizeAssuranceEvaluation,we as normalizeAssuranceMutation,pt as normalizeInvalidHistoryProvenance,se as normalizeSimilarityText,H as parseDefectChangeRiskRequest,Dt as parseDefectRecurrenceCoverageRequest,G as parseDefectRecurrencePolicy,zt as parseHistoryAttestation,Ke as parseUnknownAuthorHistoryEventCoordinates,N as parseWorkflowPolicy,B as parseWorkflowPolicyDocument,Ve as planUnknownAuthorHistoryAcknowledgment,ue as prepareSimilarityText,Tt as projectValidateCounts,ut as promoteAssuranceAssertion,Be as putAssuranceDeclaration,Ce as putAssuranceDeclarationBundle,ee as readWorkflowPolicies,C as readWorkflowPolicyField,Pt as readWorkspacePosition,Yt as reconcileArtifactLedgers,je as recordAssuranceVerdict,ze as removeAssuranceDeclaration,X as resolveHistoryHashAlgorithm,Ye as resolveUnknownAuthorAcknowledgmentSelector,Nt as runAssuranceAction,Bt as runAssuranceDispatch,Ct as runGc,wt as runHealth,Ut as runHistoryAttest,_t as runHistoryMaintenance,v as runReindex,h as runUpgrade,St as runValidate,We as runWorkflowPolicyAction,bt as scanClosureTimestamps,ct as scanExtensionHostVersions,He as scanHistoryAuthorAttribution,ie as scanMutationSecrets,mt as scanProvenanceResolverHealth,me as scanStaleInProgressItems,kt as scanStorageIntegrity,ce as scoreItemSimilarity,pe as scorePreparedItemSimilarity,Qe as similarityAdvisoryWarnings,fe as tokenizeSimilarityText,Te as validateAssertionDefinition,Se as validateAssuranceDocument,Ie as validateGateDefinition,ke as validateMeasurementDefinition,qt 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 Je,b as Ze,c as Ie}from"./focused-chunks/chunk-GVGFUD52.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 Qe,b as Xe,c as Ye,d as er,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-52UJEHEV.js";import{$b as P,Mb as ze,Nb as We,Ob as je,Pb as Fe,Qb as Ue,Rb as Le,Sb as Ve,Tb as Ke,Ub as qe,Yb as $,Zb as H,_b as v,ac as M,bc as N,cc as B,dc as z,ec as W,fc as j,gc as F,ic as _,jc as U,kc as L,lc as V,mc as K,nc as rr}from"./focused-chunks/chunk-SIEGIPNT.js";import"./focused-chunks/chunk-PBCYGO7X.js";import"./focused-chunks/chunk-YLVHHWHN.js";import{Qb as Be,ia as $e,ic as O,ja as R,ka as S,la as He,ma as ve,na as Pe,oa as Me,pa as f,qa as Ne,tb as w}from"./focused-chunks/chunk-B3YW6H2I.js";import{createHash as De}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:De("sha256").update(w({nodes:i,edges:s,kinds:a})).digest("hex"),created_at:new Date(n).toISOString(),nodes:i,edges:s,kinds:a})}function Te(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function y(e){if(!Te(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 Ce(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 xe(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 Oe(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]="df28925a-72d8-5d39-accf-e295ee01d3f9")}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 Dr(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{We as ACTIONABILITY_ORDERING_KINDS,$e as BUILTIN_RELATIONSHIP_KINDS,ge as GRAPH_DURABLE_CACHE_MIN_ITEMS,fe as GRAPH_DURABLE_CACHE_VERSION,Be as GRAPH_QUERY_DEFAULTS,O as GRAPH_SUBCOMMAND_VALUES,m as MemoryRelationshipGraphAdapter,k as RELATIONSHIP_GRAPH_SNAPSHOT_VERSION,Je as RelationshipEventLog,Ze as RelationshipEventStore,f as RelationshipGraph,R as RelationshipKindRegistry,L as WorkspaceGraphCache,Xe as analyzeGraphImpact,v as analyzeHierarchyIntegrity,Ye as analyzeKnowledgeGraph,Qe as analyzeRelationshipExecution,ae as analyzeRelationshipSchedule,_ as assembleWorkspaceRelationshipGraph,N as assertHierarchyMutationAllowed,Oe as assertMemoryRelationshipGraphAdapterConformance,Me as assertRelationshipEdgeAllowed,I as assertRelationshipGraphAdapterConformance,le as auditWorkspaceRelationshipGraph,rr as buildRelationshipContext,He as canonicalizeRelationshipKind,be as clearDurableGraphCache,je as collectBlockedByIds,Ue as collectBlockedByIdsFromCorpus,j as collectDanglingDependencyReferences,Ve as collectDependencyBlockedIds,z as collectDuplicateDependencyRows,ce as collectDuplicateRelationshipEdgeGroups,H as collectHierarchyRelations,F as collectMissingDependencyTargetIds,Ie as collectNewOrderingCycleWarnings,se as collectOrderingCycles,W as collectOrderingStorageContradictions,er as compareRelationshipSnapshots,qe as computeActionabilityReport,ne as computeRelationshipCentrality,te as computeRelationshipDominators,U as computeWorkspaceGraphFingerprint,xe as createRelationshipGraphScaleFixture,u as createRelationshipGraphSnapshot,S as createRelationshipKindRegistry,Ne as dependencyToRelationship,oe as deriveRelationshipDeadlines,ee as detectRelationshipCommunities,he as diffRelationshipAuditSnapshots,ue as durableGraphCachePath,Re as durableGraphCacheStatus,X as enumerateRelationshipPaths,Ce as federateRelationshipGraphSnapshots,re as findRedundantRelationshipEdges,ie as findRelationshipCutStructure,Y as forEachMatchedRelationshipEdge,de as formatDuplicateEdgeGroup,P as formatHierarchyRelation,pe as formatOrderingStorageContradiction,me as graphAuditBaselinePath,q as hierarchyAncestors,J as hierarchyDescendants,Fe as indexBlockedByIds,M as indexHierarchyRelations,Pe 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,Dr as planRelationshipEventBackfill,Ge as planRelationshipRemediation,K as resetWorkspaceGraphCache,ve as resolveCanonicalRelationshipKind,Le as resolveItemBlockers,ze as resolveItemExecutionRole,$ as resolveWorkspaceRelationshipKindRegistry,Ee as runGraph,Ae as saveGraphAuditBaseline,Ke as selectActionableEntries,_e as shouldPersistDurableGraphCache,b as syncRelationshipGraphAdapter,V as workspaceGraphCache};
|
|
1
|
+
import{a as Je,b as Ze,c as Ie}from"./focused-chunks/chunk-IKJFAU32.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 Qe,b as Xe,c as Ye,d as er,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-SV6YYZLR.js";import{$b as v,Nb as ze,Ob as We,Pb as je,Qb as Fe,Rb as Ue,Sb as Le,Tb as Ve,Ub as Ke,Vb as qe,Zb as $,_b as H,ac as P,bc as M,cc as N,dc as B,ec as z,fc as W,gc as j,hc as F,jc as _,kc as U,lc as L,mc as V,nc as K,oc as rr}from"./focused-chunks/chunk-7QIZB2F2.js";import"./focused-chunks/chunk-FXRWJEQ5.js";import"./focused-chunks/chunk-YLVHHWHN.js";import{Qb as Be,ia as $e,ic as O,ja as R,ka as S,la as He,ma as ve,na as Pe,oa as Me,pa as f,qa as Ne,tb as w}from"./focused-chunks/chunk-RZVNGUT7.js";import{createHash as De}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:De("sha256").update(w({nodes:i,edges:s,kinds:a})).digest("hex"),created_at:new Date(n).toISOString(),nodes:i,edges:s,kinds:a})}function Te(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function y(e){if(!Te(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 Ce(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 xe(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 Oe(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]="df28925a-72d8-5d39-accf-e295ee01d3f9")}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 Dr(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{We as ACTIONABILITY_ORDERING_KINDS,$e as BUILTIN_RELATIONSHIP_KINDS,ge as GRAPH_DURABLE_CACHE_MIN_ITEMS,fe as GRAPH_DURABLE_CACHE_VERSION,Be as GRAPH_QUERY_DEFAULTS,O as GRAPH_SUBCOMMAND_VALUES,m as MemoryRelationshipGraphAdapter,k as RELATIONSHIP_GRAPH_SNAPSHOT_VERSION,Je as RelationshipEventLog,Ze as RelationshipEventStore,f as RelationshipGraph,R as RelationshipKindRegistry,L as WorkspaceGraphCache,Xe as analyzeGraphImpact,v as analyzeHierarchyIntegrity,Ye as analyzeKnowledgeGraph,Qe as analyzeRelationshipExecution,ae as analyzeRelationshipSchedule,_ as assembleWorkspaceRelationshipGraph,N as assertHierarchyMutationAllowed,Oe as assertMemoryRelationshipGraphAdapterConformance,Me as assertRelationshipEdgeAllowed,I as assertRelationshipGraphAdapterConformance,le as auditWorkspaceRelationshipGraph,rr as buildRelationshipContext,He as canonicalizeRelationshipKind,be as clearDurableGraphCache,je as collectBlockedByIds,Ue as collectBlockedByIdsFromCorpus,j as collectDanglingDependencyReferences,Ve as collectDependencyBlockedIds,z as collectDuplicateDependencyRows,ce as collectDuplicateRelationshipEdgeGroups,H as collectHierarchyRelations,F as collectMissingDependencyTargetIds,Ie as collectNewOrderingCycleWarnings,se as collectOrderingCycles,W as collectOrderingStorageContradictions,er as compareRelationshipSnapshots,qe as computeActionabilityReport,ne as computeRelationshipCentrality,te as computeRelationshipDominators,U as computeWorkspaceGraphFingerprint,xe as createRelationshipGraphScaleFixture,u as createRelationshipGraphSnapshot,S as createRelationshipKindRegistry,Ne as dependencyToRelationship,oe as deriveRelationshipDeadlines,ee as detectRelationshipCommunities,he as diffRelationshipAuditSnapshots,ue as durableGraphCachePath,Re as durableGraphCacheStatus,X as enumerateRelationshipPaths,Ce as federateRelationshipGraphSnapshots,re as findRedundantRelationshipEdges,ie as findRelationshipCutStructure,Y as forEachMatchedRelationshipEdge,de as formatDuplicateEdgeGroup,P as formatHierarchyRelation,pe as formatOrderingStorageContradiction,me as graphAuditBaselinePath,q as hierarchyAncestors,J as hierarchyDescendants,Fe as indexBlockedByIds,M as indexHierarchyRelations,Pe 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,Dr as planRelationshipEventBackfill,Ge as planRelationshipRemediation,K as resetWorkspaceGraphCache,ve as resolveCanonicalRelationshipKind,Le as resolveItemBlockers,ze as resolveItemExecutionRole,$ as resolveWorkspaceRelationshipKindRegistry,Ee as runGraph,Ae as saveGraphAuditBaseline,Ke as selectActionableEntries,_e as shouldPersistDurableGraphCache,b as syncRelationshipGraphAdapter,V as workspaceGraphCache};
|
|
2
2
|
//# sourceMappingURL=sdk-graph.js.map
|