@graphrefly/graphrefly 0.42.0 → 0.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/dist/{chunk-5ST42ESJ.js → chunk-3XDYJRYU.js} +1 -1
  2. package/dist/{chunk-FDZAZNRO.js → chunk-4YAN45KM.js} +1 -1
  3. package/dist/{chunk-ACMJ2ZPS.js → chunk-626TESAC.js} +1 -1
  4. package/dist/{chunk-7B7ELAT2.js → chunk-6HOSXQKF.js} +1 -1
  5. package/dist/{chunk-G5VBJ5K6.js → chunk-CUNIRONA.js} +1 -1
  6. package/dist/chunk-EBW4V6JN.js +1 -0
  7. package/dist/chunk-FDQGFWLF.js +1 -0
  8. package/dist/{chunk-KY2LMAXU.js → chunk-FG4TKHMC.js} +1 -1
  9. package/dist/{chunk-YGL7FPVQ.js → chunk-I7IGYPSL.js} +1 -1
  10. package/dist/{chunk-3K7HA4Y6.js → chunk-INQD2KRQ.js} +1 -1
  11. package/dist/{chunk-AGNM6RS6.js → chunk-JNWRYDJN.js} +1 -1
  12. package/dist/{chunk-LDQ3IUIP.js → chunk-JQFH2DV6.js} +1 -1
  13. package/dist/{chunk-5QRRKBUT.js → chunk-K2Q24F5T.js} +1 -1
  14. package/dist/chunk-KVV66NN2.js +1 -0
  15. package/dist/{chunk-3ERTUW2J.js → chunk-NON4NLIC.js} +4 -4
  16. package/dist/{chunk-IZM3UEH3.js → chunk-O2BLLH7M.js} +1 -1
  17. package/dist/{chunk-FUZ6S2DY.js → chunk-OCKEEPRJ.js} +1 -1
  18. package/dist/{chunk-NWXQIOIB.js → chunk-OFZG3TB3.js} +1 -1
  19. package/dist/{chunk-4QH6VJF4.js → chunk-OYJKFY7V.js} +1 -1
  20. package/dist/{chunk-7ARY3Y3T.js → chunk-P6C4WHZO.js} +1 -1
  21. package/dist/{chunk-Q7QQQA3I.js → chunk-PT7W5FCD.js} +1 -1
  22. package/dist/{chunk-KCACBSJH.js → chunk-Q4U3A3L5.js} +1 -1
  23. package/dist/{chunk-LPRWATHB.js → chunk-QE4IGY7I.js} +1 -1
  24. package/dist/{chunk-WHMUB5QB.js → chunk-QYVXF7GW.js} +1 -1
  25. package/dist/{chunk-DEJTNNQC.js → chunk-S3EEIPO7.js} +1 -1
  26. package/dist/{chunk-KT5DTRBP.js → chunk-SUWT3ZON.js} +1 -1
  27. package/dist/{chunk-CISGGAIF.js → chunk-TPKQW72B.js} +1 -1
  28. package/dist/{chunk-2K5RXLAH.js → chunk-V5A7M7RJ.js} +1 -1
  29. package/dist/{chunk-AS3TV2TV.js → chunk-VNC3TMVY.js} +1 -1
  30. package/dist/{chunk-6YFZMUMR.js → chunk-VOPGGIL7.js} +1 -1
  31. package/dist/{chunk-VRALOYRD.js → chunk-VQ4A6T2A.js} +1 -1
  32. package/dist/{chunk-HZKW2AAB.js → chunk-XG62INFA.js} +1 -1
  33. package/dist/{chunk-7VKFXLZQ.js → chunk-Y4NI3X7O.js} +1 -1
  34. package/dist/compat/index.cjs +5 -5
  35. package/dist/compat/index.d.cts +4 -4
  36. package/dist/compat/index.d.ts +4 -4
  37. package/dist/compat/index.js +1 -1
  38. package/dist/compat/nestjs/index.cjs +5 -5
  39. package/dist/compat/nestjs/index.d.cts +3 -3
  40. package/dist/compat/nestjs/index.d.ts +3 -3
  41. package/dist/compat/nestjs/index.js +1 -1
  42. package/dist/compat/zustand/index.js +1 -1
  43. package/dist/core/index.d.cts +2 -2
  44. package/dist/core/index.d.ts +2 -2
  45. package/dist/extra/index.cjs +11 -11
  46. package/dist/extra/index.d.cts +2 -2
  47. package/dist/extra/index.d.ts +2 -2
  48. package/dist/extra/index.js +1 -1
  49. package/dist/extra/node.js +1 -1
  50. package/dist/extra/operators.js +1 -1
  51. package/dist/extra/reactive.js +1 -1
  52. package/dist/extra/sources.js +1 -1
  53. package/dist/graph/index.cjs +1 -1
  54. package/dist/graph/index.d.cts +1 -1
  55. package/dist/graph/index.d.ts +1 -1
  56. package/dist/graph/index.js +1 -1
  57. package/dist/{index-C0-Jv1kP.d.cts → index-0rKFCVFp.d.cts} +9 -0
  58. package/dist/{index-B11anra4.d.cts → index-B5iz82A3.d.cts} +2 -2
  59. package/dist/{index-BtAsBp8K.d.cts → index-BAOD98JD.d.cts} +1 -1
  60. package/dist/{index-D-Xs74HZ.d.cts → index-BiX1Nkgx.d.cts} +13 -3
  61. package/dist/{index-HoU88d5U.d.cts → index-BojK2fwH.d.cts} +2 -2
  62. package/dist/{index-3NmAfcH0.d.cts → index-BwLvVVsy.d.cts} +1 -1
  63. package/dist/{index-DQo8xBgd.d.ts → index-C59mYFKp.d.ts} +1 -1
  64. package/dist/{index-DBIqYS43.d.cts → index-C9pjcz3l.d.cts} +0 -15
  65. package/dist/{index-CJQm0g38.d.ts → index-CAC_rNzm.d.ts} +1 -1
  66. package/dist/{index-sl4NyzQx.d.cts → index-CDXc9zKM.d.cts} +1 -1
  67. package/dist/{index-2B7u2pVn.d.cts → index-CLon-IWF.d.cts} +1 -1
  68. package/dist/{index-CEMx8n40.d.cts → index-COD1kVoS.d.cts} +1 -1
  69. package/dist/{index-Bn4zHYLj.d.ts → index-CPT7C_f1.d.ts} +1 -1
  70. package/dist/{index-D8l8hNXn.d.ts → index-CQG3D1cp.d.ts} +1 -1
  71. package/dist/{index-DO9XxMzS.d.ts → index-CZQXo5tH.d.ts} +0 -15
  72. package/dist/{index-Bbkgpt5t.d.ts → index-D-AEQVLo.d.ts} +2 -2
  73. package/dist/{index-CZmcDtFn.d.ts → index-D4Y1cMG0.d.ts} +1 -1
  74. package/dist/{index-B3OTH1dV.d.ts → index-DSZ3ZCHF.d.ts} +1 -1
  75. package/dist/{index-BUYXac2c.d.ts → index-Dh_HJ82K.d.ts} +2 -2
  76. package/dist/{index-4Uz-e_fL.d.ts → index-DwigL4lY.d.ts} +13 -3
  77. package/dist/{index-CPNSy-U0.d.cts → index-DyR7eU5S.d.cts} +19 -0
  78. package/dist/{index-BeT2r7sk.d.ts → index-JZUPJIJy.d.ts} +19 -0
  79. package/dist/{index-pT8sCpOJ.d.ts → index-K0_0eR8g.d.ts} +9 -0
  80. package/dist/{index-CJIuLu2f.d.cts → index-O16yXPK4.d.cts} +1 -1
  81. package/dist/{index-LIpQQE9f.d.cts → index-O7fucFrU.d.cts} +1 -1
  82. package/dist/{index-DmAgG5CI.d.cts → index-RV_yDjOX.d.cts} +1 -1
  83. package/dist/{index-D6egPFAL.d.ts → index-cm1GNcWE.d.ts} +1 -1
  84. package/dist/{index-CpyNFqkB.d.ts → index-wAzD9yVj.d.ts} +1 -1
  85. package/dist/index.cjs +39 -39
  86. package/dist/index.d.cts +16 -16
  87. package/dist/index.d.ts +16 -16
  88. package/dist/index.js +1 -1
  89. package/dist/patterns/ai/browser.js +1 -1
  90. package/dist/patterns/ai/index.cjs +15 -15
  91. package/dist/patterns/ai/index.d.cts +5 -5
  92. package/dist/patterns/ai/index.d.ts +5 -5
  93. package/dist/patterns/ai/index.js +1 -1
  94. package/dist/patterns/ai/node.js +1 -1
  95. package/dist/patterns/cqrs/index.cjs +3 -3
  96. package/dist/patterns/cqrs/index.d.cts +2 -2
  97. package/dist/patterns/cqrs/index.d.ts +2 -2
  98. package/dist/patterns/cqrs/index.js +1 -1
  99. package/dist/patterns/demo-shell/index.js +1 -1
  100. package/dist/patterns/domain-templates/index.cjs +2 -2
  101. package/dist/patterns/domain-templates/index.js +1 -1
  102. package/dist/patterns/graphspec/index.cjs +4 -4
  103. package/dist/patterns/graphspec/index.js +1 -1
  104. package/dist/patterns/harness/index.cjs +7 -7
  105. package/dist/patterns/harness/index.d.cts +5 -5
  106. package/dist/patterns/harness/index.d.ts +5 -5
  107. package/dist/patterns/harness/index.js +1 -1
  108. package/dist/patterns/inspect/index.cjs +3 -3
  109. package/dist/patterns/inspect/index.d.cts +1 -1
  110. package/dist/patterns/inspect/index.d.ts +1 -1
  111. package/dist/patterns/inspect/index.js +1 -1
  112. package/dist/patterns/job-queue/index.cjs +3 -3
  113. package/dist/patterns/job-queue/index.d.cts +2 -2
  114. package/dist/patterns/job-queue/index.d.ts +2 -2
  115. package/dist/patterns/job-queue/index.js +1 -1
  116. package/dist/patterns/memory/index.cjs +3 -3
  117. package/dist/patterns/memory/index.d.cts +2 -2
  118. package/dist/patterns/memory/index.d.ts +2 -2
  119. package/dist/patterns/memory/index.js +1 -1
  120. package/dist/patterns/messaging/index.cjs +3 -3
  121. package/dist/patterns/messaging/index.js +1 -1
  122. package/dist/patterns/orchestration/index.cjs +3 -3
  123. package/dist/patterns/orchestration/index.d.cts +3 -3
  124. package/dist/patterns/orchestration/index.d.ts +3 -3
  125. package/dist/patterns/orchestration/index.js +1 -1
  126. package/dist/patterns/process/index.cjs +1 -1
  127. package/dist/patterns/process/index.d.cts +3 -3
  128. package/dist/patterns/process/index.d.ts +3 -3
  129. package/dist/patterns/process/index.js +1 -1
  130. package/dist/patterns/reactive-layout/index.js +1 -1
  131. package/dist/patterns/reduction/index.js +1 -1
  132. package/dist/patterns/surface/index.cjs +3 -3
  133. package/dist/patterns/surface/index.js +1 -1
  134. package/dist/{pipeline-graph-WBlobVhU.d.cts → pipeline-graph-DPqKDk59.d.cts} +2 -2
  135. package/dist/{pipeline-graph-v8fMvqNk.d.ts → pipeline-graph-loP57TBA.d.ts} +2 -2
  136. package/dist/resilience-YIWPK4YC.js +1 -0
  137. package/dist/{sugar-CH-2ZY90.d.ts → sugar-DLwvMr3F.d.ts} +23 -3
  138. package/dist/{sugar-DStZfUEK.d.cts → sugar-DyVGtczU.d.cts} +23 -3
  139. package/package.json +1 -1
  140. package/dist/chunk-3ZZX7M25.js +0 -1
  141. package/dist/chunk-VE5SIZEM.js +0 -1
  142. package/dist/chunk-XLQPNNIC.js +0 -1
  143. package/dist/resilience-445VFFXQ.js +0 -1
@@ -1 +0,0 @@
1
- import{a as T}from"./chunk-4QH6VJF4.js";import{a as k}from"./chunk-L6NSJVJZ.js";import{b as Y}from"./chunk-LDQ3IUIP.js";import{a as S}from"./chunk-XLQPNNIC.js";import{j as N,l as W}from"./chunk-ACMJ2ZPS.js";import{C as D}from"./chunk-2K5RXLAH.js";import{b as C}from"./chunk-35JTVPOX.js";import{C as Q,E,G as A,m as B,o as R,p as O,u as $,w as J}from"./chunk-LYCLF26R.js";import{b as P}from"./chunk-CK2E7BTU.js";import{b as ne}from"./chunk-QYADASLV.js";var ue={};ne(ue,{AuditTrailGraph:()=>L,GuardedExecutionGraph:()=>V,InspectGraph:()=>M,PolicyGateGraph:()=>j,auditTrail:()=>H,complianceSnapshot:()=>I,computeHealthReport:()=>te,graphLens:()=>z,guardedExecution:()=>de,healthReportEqual:()=>oe,inspect:()=>ce,policyGate:()=>K,watchTopologyTree:()=>S});function ee(o,e){return k("audit",o,e)}var ie=new Set(["data","error","complete","teardown"]),L=class extends N{entries;count;_log;_target;constructor(e,t){super(t.name??`${e.name}_audit`,t.graph),this._target=e,this._log=Y([],{name:"entries",...t.maxSize!=null?{maxSize:t.maxSize}:{}}),this.entries=this._log.entries,this.add(this.entries,{name:"entries"}),this.count=A([this.entries],([s])=>s.length,{name:"count",describeKind:"derived",meta:ee("count")}),this.add(this.count,{name:"count"}),this.addDisposer(D(this.count));let n=t.includeTypes!=null?new Set(t.includeTypes):ie,r=t.filter,i=0,u=e.observe({timeline:!0,structured:!0}),h=u.onEvent(s=>{if(s.type==="derived")return;let d=s.type;if(!n.has(d))return;let y=s.path??"",g={seq:i++,timestamp_ns:s.timestamp_ns??R(),wall_clock_ns:O(),path:y,type:d},b=(y?F(e,y):void 0)?.lastMutation;b!=null&&(g.actor=b.actor),d==="data"&&(g.value=s.data),d==="error"&&(g.error=s.data);let l=y?re(e,y):void 0;l!=null&&(g.annotation=l),!(r!=null&&!r(g))&&this._log.append(g)});this.addDisposer(()=>{h(),u.dispose()}),this.addDisposer(()=>this._log.disposeAllViews())}all(){return this.entries.cache??[]}byNode(e){return this.all().filter(t=>t.path===e)}byActor(e){return this.all().filter(t=>t.actor?.id===e)}byActorType(e){return this.all().filter(t=>t.actor?.type===e)}byTimeRange(e,t){return this.all().filter(n=>!(n.timestamp_ns<e||t!=null&&n.timestamp_ns>=t))}get target(){return this._target}};function H(o,e={}){return new L(o,e)}var j=class extends N{policies;violations;violationCount;_target;_mode;_currentGuard;constructor(e,t,n){super(n.name??`${e.name}_policy`,n.graph),this._target=e,this._mode=n.mode??"audit";let r=X(t)?t:E(t,{name:"policies"});this.policies=r,this.add(this.policies,{name:"policies"}),this.violations=new T("violations",{retainedLimit:n.violationsLimit??1e3}),this.mount("violations",this.violations),this.violationCount=A([this.violations.events],([l])=>l.length,{name:"violationCount",describeKind:"derived",meta:ee("policy_violation_count")}),this.add(this.violationCount,{name:"violationCount"}),this.addDisposer(D(this.violationCount));let u=r.cache??[];this._currentGuard=$(u);let h=r.subscribe(l=>{for(let m of l)m[0]===P&&(u=m[1]??[],this._currentGuard=$(u))});this.addDisposer(h);let s=n.paths,d=X(s)?s:void 0,y=s!=null,G=d!=null?d.cache??[]:y?[...s]:void 0,b=G??Z(e);if(this._mode!=="enforce"&&d!=null){let l=d.subscribe(m=>{for(let a of m)a[0]===P&&(G=a[1]??[])});this.addDisposer(l)}if(this._mode==="enforce"){let l=new Map,m=a=>{if(l.has(a))return;let c=F(e,a);if(!(c instanceof Q))return;let _=(p,f)=>{let w=this._currentGuard(p,f);return w||this._publishViolation(p,f,a,"blocked"),w};l.set(a,c._pushGuard(_))};for(let a of b)m(a);if(d!=null){let a=d.subscribe(c=>{for(let _ of c){if(_[0]!==P)continue;let p=_[1]??[],f=new Set(p),w=new Set(G??[]);B(()=>{for(let v of w){if(f.has(v))continue;let x=l.get(v);x!=null&&(x(),l.delete(v))}for(let v of f)w.has(v)||m(v);G=p})}});this.addDisposer(a)}if(y){let a=e.topology.subscribe(c=>{for(let _ of c){if(_[0]!==P)continue;let p=_[1];if(p.kind!=="removed"||p.nodeKind!=="node")continue;let f=l.get(p.name);f!=null&&(f(),l.delete(p.name))}});this.addDisposer(a)}else{let a=S(e,(c,_,p)=>{if(c.kind==="added")if(c.nodeKind==="node")m(`${p}${c.name}`);else{let f=_._mounts.get(c.name);if(!(f instanceof N))return;let w=`${p}${c.name}::`,v=Z(f);for(let x of v)m(x===""?`${p}${c.name}`:`${w}${x}`)}else if(c.kind==="removed")if(c.nodeKind==="node"){let f=`${p}${c.name}`,w=l.get(f);w!=null&&(w(),l.delete(f))}else{let f=`${p}${c.name}`,w=`${f}::`;for(let[v,x]of l)(v===f||v.startsWith(w))&&(x(),l.delete(v))}});this.addDisposer(a)}this.addDisposer(()=>{for(let a of l.values())a();l.clear()})}else{let l=e.observe({timeline:!0,structured:!0}),m=l.onEvent(a=>{if(a.type!=="data"&&a.type!=="error")return;let c=a.path??"";if(!c||G!=null&&!G.includes(c))return;let _=a.actor??F(e,c)?.lastMutation?.actor;if(_==null)return;let p="write";this._currentGuard(_,p)||this._publishViolation(_,p,c,"observed")});this.addDisposer(()=>{m(),l.dispose()})}}_publishViolation(e,t,n,r){this.violations.publish({timestamp_ns:R(),wall_clock_ns:O(),path:n,actor:e,action:t,mode:this._mode,result:r})}all(){return this.violations.retained()}get mode(){return this._mode}get target(){return this._target}};function K(o,e,t={}){let n=new j(o,e,t);return n.tagFactory("policyGate",C(t)),n}function I(o,e={}){let t={format_version:1,timestamp_ns:R(),wall_clock_ns:O(),graph:o.snapshot()};if(e.actor!=null&&(t.actor=e.actor),e.audit!=null){let r=[...e.audit.all()];t.audit={count:r.length,entries:r}}if(e.policies!=null){let r=e.policies.policies.cache??[];t.policies={mode:e.policies.mode,rules:r,violations:[...e.policies.all()]}}let n=ae(t);return{...t,fingerprint:n}}function X(o){return typeof o=="object"&&o!==null&&"subscribe"in o}function F(o,e){try{return o.node(e)}catch{return}}function re(o,e){try{return o.annotation(e)}catch{return}}function Z(o){let e=o.describe({detail:"minimal"});return Object.keys(e.nodes)}function ae(o){return J(JSON.stringify(se(o)))}function se(o){let e=new Set,t=n=>{if(n===void 0)return{__undefined:!0};if(n===null)return null;let r=typeof n;if(r==="bigint")return{__bigint:n.toString()};if(r!=="object")return n;let i=n;if(e.has(i))return{__circular:!0};e.add(i);try{if(Array.isArray(i))return i.map(t);if(i instanceof Date)return{__date:i.toISOString()};if(i instanceof RegExp)return{__regexp:{source:i.source,flags:i.flags}};if(i instanceof Map)return{__map:[...i.entries()].map(([s,d])=>[t(s),t(d)])};if(i instanceof Set)return{__set:[...i].map(t)};if(ArrayBuffer.isView(i)){let h=i,s=new Array(h.length);for(let d=0;d<h.length;d++)s[d]=h[d]??0;return{__typed_array:{ctor:i.constructor.name,data:s}}}let u={};for(let h of Object.keys(i).sort())u[h]=t(i[h]);return u}finally{e.delete(i)}};return t(o)}function q(o){return typeof o=="object"&&o!==null&&"subscribe"in o&&"down"in o}function le(o){return k("guarded",o)}var V=class extends N{enforcer;violations;lints;scope;scopedDescribe;_target;_actorNode;_mode;_firedLintKinds=new Set;constructor(e,t){super(t.name??`${e.name}_guarded`,t.graph),this._target=e,this._mode=t.mode??"enforce";let n=t.policies,r=q(n);if(!r&&this._mode==="enforce"&&n.length===0)throw new RangeError('guardedExecution: empty `policies` in `mode: "enforce"` denies every action. Pass at least `{ effect: "allow", action: "*" }` and layer deny rules on top.');this.lints=new T("lints",{retainedLimit:t.lintsLimit??64}),this.mount("lints",this.lints);let i=t.actor;i==null?this._actorNode=E(null,{name:"actor"}):q(i)?this._actorNode=A([i],([s])=>s??null,{name:"actor",initial:null}):this._actorNode=E(i,{name:"actor"});let u={mode:this._mode,name:"enforcer"};if(t.violationsLimit!=null&&(u.violationsLimit=t.violationsLimit),this.enforcer=K(e,t.policies,u),this.violations=this.enforcer.violations,this.mount("enforcer",this.enforcer),r&&this._mode==="enforce"){let s=n,d=s.cache;d!=null&&d.length===0&&this._fireLint("empty-policies",'`policies` Node cached an empty array in `mode: "enforce"` \u2014 every action will be denied. Add at least one allow rule.');let y=s.subscribe(g=>{for(let G of g){if(G[0]!==P)continue;let b=G[1];(b==null||b.length===0)&&this._fireLint("empty-policies",'`policies` Node emitted an empty array in `mode: "enforce"` \u2014 every action will be denied. Add at least one allow rule.')}});this.addDisposer(y)}if(this._mode==="audit"){let s=e.describe({detail:"full"});Object.values(s.nodes).some(y=>y.guard!=null)||this._fireLint("audit-no-effect",'`mode: "audit"` + target has no per-node guards \u2014 `scopedDescribeNode` filters by per-node guards only, so policy rules will not affect describe() visibility. Policies still populate the `violations` topic on writes.')}i==null&&this._fireLint("no-actor","no actor configured \u2014 `wrapper.scopedDescribe` and `scopedDescribeNode()` will return an unscoped describe (full visibility) unless a per-call actor is supplied."),this.scope=A([this._actorNode,this.enforcer.policies],([s,d])=>({actor:s??null,mode:this._mode,policiesCount:d.length}),{name:"scope",describeKind:"derived",meta:le("scope")}),this.add(this.scope,{name:"scope"}),this.addDisposer(D(this.scope));let h=e.describe({reactive:!0,actor:this._actorNode,reactiveName:"scopedDescribe"});this.scopedDescribe=h.node,this.add(this.scopedDescribe,{name:"scopedDescribe"}),this.addDisposer(h.dispose)}_fireLint(e,t){this._firedLintKinds.has(e)||(this._firedLintKinds.add(e),this.lints.publish({kind:e,message:t,timestamp_ns:R()}))}scopedDescribeNode(e,t){let n=e==null?this._actorNode:q(e)?e:E(e,{name:"actor_override"}),r=this._target.describe({reactive:!0,actor:n,...t??{}});return this.addDisposer(r.dispose),{node:r.node,dispose:r.dispose}}get target(){return this._target}};function de(o,e){return new V(o,e)}function te(o){let e=[];for(let[t,n]of Object.entries(o.nodes)){if(n.status!=="errored")continue;let r={path:t,status:"errored"},i=W(o,t,"upstream",{});for(let u of i)if(u!==t&&o.nodes[u]?.status==="errored"){r.upstreamCause=u;break}e.push(r)}return e.sort((t,n)=>t.path<n.path?-1:t.path>n.path?1:0),{ok:e.length===0,problems:e}}function oe(o,e){if(o.ok!==e.ok||o.problems.length!==e.problems.length)return!1;for(let t=0;t<o.problems.length;t++){let n=o.problems[t],r=e.problems[t];if(n.path!==r.path||n.status!==r.status||n.upstreamCause!==r.upstreamCause)return!1}return!0}function z(o){let e=o.describe({reactive:!0,detail:"standard",reactiveName:"graphLens.topology"}),t=e.node,n=A([t],([g])=>te(g),{name:"graphLens.health",describeKind:"derived",equals:oe,meta:k("lens","health")}),r=D(n),i=new Map,u=-1,h=o.observe({reactive:!0,tiers:["data"]}),s=A([h,t],([g,G])=>{let b=g,l=G;if(b!=null&&b.flushedAt_ns>u){u=b.flushedAt_ns;for(let m of b.events){if(m.type!=="data")continue;let a=m.path;if(a==null||a==="")continue;let c=i.get(a);i.set(a,{path:a,count:(c?.count??0)+1,lastUpdate_ns:b.flushedAt_ns})}}if(l!=null&&i.size>0){let m=new Set(Object.keys(l.nodes));for(let a of[...i.keys()])m.has(a)||i.delete(a)}return new Map(i)},{name:"graphLens.flow",describeKind:"derived",meta:k("lens","flow")}),d=D(s),y=!1;return{topology:t,health:n,flow:s,dispose(){y||(y=!0,d(),r(),e.dispose())}}}var U=class extends N{view;constructor(e){super("lens"),this.view=z(e),this.add(this.view.topology,{name:"topology"}),this.add(this.view.health,{name:"health"}),this.add(this.view.flow,{name:"flow"})}},M=class extends N{target;lens;audit;_defaultActor;_lensSubgraph;constructor(e,t={}){super(t.name??`inspect(${e.name})`),this.target=e,this._defaultActor=t.actor,this._lensSubgraph=new U(e),this.lens=this._lensSubgraph.view,this.mount("lens",this._lensSubgraph),this.audit=H(e,t.audit??{}),this.mount("audit",this.audit),this.addDisposer(()=>this.lens.dispose())}explainTarget(e,t,n){return this.target.explain(e,t,n)}complianceSnapshot(e){let t=e?.actor??this._defaultActor;return I(this.target,{audit:this.audit,...t!=null?{actor:t}:{},...e?.policies!=null?{policies:e.policies}:{}})}};function ce(o,e={}){let t=new M(o,e);return t.tagFactory("inspect",C(e)),t}export{L as a,H as b,j as c,K as d,I as e,V as f,de as g,te as h,oe as i,z as j,M as k,ce as l,ue as m};
@@ -1 +0,0 @@
1
- import{a as I,b as P,c as V,d as j,f as _,g as w}from"./chunk-3G5U5QNE.js";import{a as C,b as D,c as $,d as R,g as A,h as S,i as N,j as h,k as T,l as F}from"./chunk-ACMJ2ZPS.js";import{a as m,b as g,c as k,d as v,e as O,f as E,g as G,h as x}from"./chunk-LYCLF26R.js";import{b as u}from"./chunk-CK2E7BTU.js";import{b as H}from"./chunk-QYADASLV.js";var q={};H(q,{ENVELOPE_VERSION:()=>v,GRAPH_META_SEGMENT:()=>S,Graph:()=>h,JsonCodec:()=>m,SIZEOF_OVERHEAD:()=>C,SIZEOF_SYMBOL:()=>D,SNAPSHOT_VERSION:()=>N,createDagCborCodec:()=>g,createDagCborZstdCodec:()=>k,decodeEnvelope:()=>E,diffForWAL:()=>T,encodeEnvelope:()=>O,explainPath:()=>R,graphProfile:()=>A,reachable:()=>F,registerBuiltinCodecs:()=>G,replayWAL:()=>x,sizeof:()=>$,validateGraphObservability:()=>W,validateNoIslands:()=>M,watchTopologyTree:()=>L});function L(n,p){let o=new Map,c=(s,a)=>{if(o.has(s))return;let i={off:()=>{},prefix:a};o.set(s,i);let f=s.topology.subscribe(l=>{for(let t of l){if(t[0]!==u)continue;let e=t[1];if(p(e,s,a),e.kind==="added"&&e.nodeKind==="mount"){let r=s._mounts.get(e.name);if(r instanceof h){let d=`${a}${e.name}::`;c(r,d)}}else if(e.kind==="removed"&&e.nodeKind==="mount"){let r=`${a}${e.name}::`;for(let[d,y]of Array.from(o.entries()))d!==n&&y.prefix.startsWith(r)&&(y.off(),o.delete(d))}}});i.off=f;for(let[l,t]of s._mounts)if(t instanceof h){let e=`${a}${l}::`;c(t,e)}};return c(n,""),()=>{for(let s of o.values())s.off();o.clear()}}function M(n){let p=n.describe({detail:"minimal"}),o=Object.keys(p.nodes),c=new Set;for(let a of o){let i=p.nodes[a];if(!i)continue;let f=i.deps??[];for(let l of f)c.add(l)}let s=[];for(let a of o){let i=p.nodes[a];if(!i)continue;let l=(i.deps??[]).length,t=c.has(a);if(l===0&&!t){let e=i.type??"unknown";s.push({path:a,kind:e})}}return s.sort((a,i)=>a.path<i.path?-1:a.path>i.path?1:0),{ok:s.length===0,orphans:s,summary(){if(s.length===0)return"validateNoIslands: ok (no islands)";let a=s.slice(0,3).map(i=>`${i.path} (${i.kind})`).join(", ");return`validateNoIslands: ${s.length} island node(s) \u2014 ${a}${s.length>3?", \u2026":""}`}}}var K={json:n=>V(n),pretty:n=>w(n),mermaid:n=>j(n),"mermaid-url":n=>_(n),d2:n=>P(n),ascii:n=>I(n)};function W(n,p={}){let o=[],c=p.requireFound??!0;if(p.skipDescribe!==!0)try{let t=n.describe(),e=new Set(Object.keys(t.nodes)),r=[];for(let[d,y]of Object.entries(t.nodes))for(let b of y.deps)b!==""&&!e.has(b)&&r.push(`${d} \u2192 ${b}`);for(let d of t.edges)e.has(d.from)||r.push(`edge.from: ${d.from}`),e.has(d.to)||r.push(`edge.to: ${d.to}`);r.length>0?o.push({kind:"describe",ok:!1,reason:`describe() has ${r.length} dangling pointer(s); nodes \u2289 deps`,danglingDeps:r}):o.push({kind:"describe",ok:!0,nodeCount:e.size,edgeCount:t.edges.length})}catch(t){o.push({kind:"describe",ok:!1,reason:`describe() threw: ${t instanceof Error?t.message:String(t)}`})}if((p.formats?.length??0)>0){let t=n.describe();for(let e of p.formats)try{let r=K[e](t);typeof r!="string"||r.length===0?o.push({kind:"describe-format",ok:!1,format:e,reason:`${e} renderer returned empty or non-string output`}):o.push({kind:"describe-format",ok:!0,format:e,length:r.length})}catch(r){o.push({kind:"describe-format",ok:!1,format:e,reason:r instanceof Error?r.message:String(r)})}}for(let t of p.paths??[])try{n.resolve(t),o.push({kind:"observe",ok:!0,path:t})}catch(e){o.push({kind:"observe",ok:!1,path:t,reason:e instanceof Error?e.message:String(e)})}for(let[t,e]of p.pairs??[])try{let r=n.explain(t,e);c&&r.found===!1?o.push({kind:"explain",ok:!1,from:t,to:e,reason:`explain(${t} \u2192 ${e}) found no path${r.reason?`: ${r.reason}`:""}`}):o.push({kind:"explain",ok:!0,from:t,to:e,found:r.found,steps:r.steps.length})}catch(r){o.push({kind:"explain",ok:!1,from:t,to:e,reason:r instanceof Error?r.message:String(r)})}let s=o.filter(t=>!t.ok),a=s.length===0,i=p.paths?.length??0,f=p.pairs?.length??0,l=p.formats?.length??0;return{ok:a,checks:o,failures:s,summary(){let t=[p.skipDescribe===!0?null:"describe",l>0?`${l} format${l===1?"":"s"}`:null,i>0?`${i} observe path${i===1?"":"s"}`:null,f>0?`${f} explain pair${f===1?"":"s"}`:null].filter(r=>r!=null),e=t.length>0?t.join(", "):"describe-only";return a?`validateGraphObservability: OK (${e})`:`validateGraphObservability: ${s.length} failure(s) across ${e}`}}}export{L as a,M as b,W as c,q as d};
@@ -1 +0,0 @@
1
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n}from"./chunk-AS3TV2TV.js";import"./chunk-L6NSJVJZ.js";import"./chunk-XLQPNNIC.js";import"./chunk-3G5U5QNE.js";import"./chunk-C72GO4IZ.js";import"./chunk-ACMJ2ZPS.js";import"./chunk-ESMPEKEV.js";import"./chunk-6YFZMUMR.js";import"./chunk-4VVTGLXJ.js";import"./chunk-2K5RXLAH.js";import"./chunk-35JTVPOX.js";import"./chunk-LYCLF26R.js";import"./chunk-CK2E7BTU.js";import"./chunk-QYADASLV.js";export{e as CircuitOpenError,i as RateLimiterOverflowError,b as ResilientPipelineGraph,l as TimeoutError,a as budgetGate,f as circuitBreaker,m as fallback,j as rateLimiter,c as resilientPipeline,d as retry,n as timeout,h as tokenBucket,g as withBreaker,k as withStatus};