@graphrefly/graphrefly 0.39.0 → 0.40.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 (215) hide show
  1. package/dist/{cascading-g2_rhhaM.d.ts → cascading-BNfxffgc.d.ts} +1 -1
  2. package/dist/{cascading-BzuxW0_w.d.cts → cascading-Cxs1eztH.d.cts} +1 -1
  3. package/dist/{chunk-7JRF5YEK.js → chunk-2BX4NB34.js} +1 -1
  4. package/dist/{chunk-TFPZLQ5H.js → chunk-2DMKW2AD.js} +1 -1
  5. package/dist/{chunk-7NZMZJMW.js → chunk-2QXRYP7Q.js} +1 -1
  6. package/dist/{chunk-NQI2C36M.js → chunk-32N3JALT.js} +1 -1
  7. package/dist/{chunk-CGDMTXSY.js → chunk-6I726LZU.js} +1 -1
  8. package/dist/{chunk-S2U57TFC.js → chunk-6VWBPSSY.js} +1 -1
  9. package/dist/chunk-6XVD5TZV.js +1 -0
  10. package/dist/{chunk-VJJLIEAL.js → chunk-756D5TFD.js} +1 -1
  11. package/dist/{chunk-XQ55HO5N.js → chunk-7Q4ZD3YW.js} +1 -1
  12. package/dist/{chunk-ZOX3LBRV.js → chunk-B7LCDQEV.js} +1 -1
  13. package/dist/{chunk-IA7DUNGB.js → chunk-CKFQS2CJ.js} +1 -1
  14. package/dist/{chunk-R75BMDLA.js → chunk-ECQRP2UT.js} +1 -1
  15. package/dist/{chunk-L7WY6TZS.js → chunk-FHRBBHJN.js} +1 -1
  16. package/dist/{chunk-JNMC2WJ6.js → chunk-I2DEVPMU.js} +1 -1
  17. package/dist/chunk-INQFTVZA.js +61 -0
  18. package/dist/{chunk-N7UIBZCW.js → chunk-J63M5U46.js} +1 -1
  19. package/dist/{chunk-7SD73DS6.js → chunk-JKBOIJ22.js} +1 -1
  20. package/dist/chunk-K2Z7UENB.js +1 -0
  21. package/dist/{chunk-INH6FS2G.js → chunk-LCGAVGGV.js} +1 -1
  22. package/dist/{chunk-LQNOXGET.js → chunk-LYM4PBMV.js} +1 -1
  23. package/dist/{chunk-KD4NHLMU.js → chunk-MNZIKXK4.js} +1 -1
  24. package/dist/{chunk-RF3QZP6D.js → chunk-N43XM7BM.js} +1 -1
  25. package/dist/{chunk-5XRI6RM3.js → chunk-OSZ22J7O.js} +1 -1
  26. package/dist/{chunk-WHIZM6JV.js → chunk-PPUYQ66A.js} +1 -1
  27. package/dist/{chunk-SC7BQDNP.js → chunk-QSK3RRII.js} +1 -1
  28. package/dist/chunk-RZJDIV2G.js +1 -0
  29. package/dist/{chunk-HX3EGQ5Z.js → chunk-SSCGRYJ2.js} +1 -1
  30. package/dist/chunk-SVFKHUCW.js +1 -0
  31. package/dist/chunk-TSOYJ743.js +1 -0
  32. package/dist/{chunk-HAWKGIXM.js → chunk-UWA6D7UF.js} +1 -1
  33. package/dist/{chunk-GX5LSSRE.js → chunk-VMF23LGB.js} +1 -1
  34. package/dist/{chunk-5LK7XMEV.js → chunk-WL6LFPJB.js} +1 -1
  35. package/dist/{chunk-D47YVDR5.js → chunk-WUT362QV.js} +1 -1
  36. package/dist/{chunk-INHC33EH.js → chunk-XJLYLLIJ.js} +1 -1
  37. package/dist/{chunk-GEAO3TL3.js → chunk-XW4YDF6G.js} +1 -1
  38. package/dist/{chunk-XEUANKBO.js → chunk-YKD7WUYJ.js} +1 -1
  39. package/dist/{chunk-AU7YTQX7.js → chunk-YXDRGKXP.js} +1 -1
  40. package/dist/{chunk-7QFRK3N3.js → chunk-Z4F3DOWS.js} +1 -1
  41. package/dist/compat/index.d.cts +6 -6
  42. package/dist/compat/index.d.ts +6 -6
  43. package/dist/compat/index.js +1 -1
  44. package/dist/compat/nestjs/index.d.cts +4 -4
  45. package/dist/compat/nestjs/index.d.ts +4 -4
  46. package/dist/compat/nestjs/index.js +1 -1
  47. package/dist/compat/zustand/index.d.cts +2 -2
  48. package/dist/compat/zustand/index.d.ts +2 -2
  49. package/dist/compat/zustand/index.js +1 -1
  50. package/dist/{composite-DGatA-JK.d.ts → decay-BnrlbxSv.d.ts} +38 -2
  51. package/dist/{composite-CKd0e2vz.d.cts → decay-C25AyNAj.d.cts} +38 -2
  52. package/dist/extra/index.cjs +15 -15
  53. package/dist/extra/index.d.cts +6 -6
  54. package/dist/extra/index.d.ts +6 -6
  55. package/dist/extra/index.js +1 -1
  56. package/dist/extra/node.js +1 -1
  57. package/dist/extra/operators.js +1 -1
  58. package/dist/extra/reactive.d.cts +1 -1
  59. package/dist/extra/reactive.d.ts +1 -1
  60. package/dist/extra/reactive.js +1 -1
  61. package/dist/extra/render/index.d.cts +1 -1
  62. package/dist/extra/render/index.d.ts +1 -1
  63. package/dist/extra/sources.cjs +1 -1
  64. package/dist/extra/sources.js +1 -1
  65. package/dist/graph/index.d.cts +3 -3
  66. package/dist/graph/index.d.ts +3 -3
  67. package/dist/graph/index.js +1 -1
  68. package/dist/{graph-30XSgtVX.d.ts → graph-BkIkog4h.d.ts} +1 -1
  69. package/dist/{graph-BUwMAxJI.d.cts → graph-E6likq7w.d.cts} +1 -1
  70. package/dist/{index-BXd6OMEy.d.ts → index-3k4Gg6-n.d.ts} +2 -2
  71. package/dist/{index-DszPlZzK.d.ts → index-40ZT4MHj.d.ts} +1 -1
  72. package/dist/index-8s-Qm-gz.d.ts +218 -0
  73. package/dist/{index-K-vl_c6A.d.cts → index-A3U3CSve.d.cts} +1 -1
  74. package/dist/{index-jKLph6cu.d.ts → index-B6iTqKtJ.d.ts} +1 -1
  75. package/dist/{index-WyFKER-c.d.ts → index-B72TQQHd.d.cts} +3 -3
  76. package/dist/{index-CmqiJZKM.d.ts → index-BAQrjuZF.d.ts} +64 -6
  77. package/dist/{index-CusEP3Sv.d.ts → index-BQ1fR4li.d.ts} +1 -1
  78. package/dist/{index-xZYcDqFH.d.cts → index-BTHOTC0Q.d.cts} +2 -2
  79. package/dist/{index-jr6PuSBt.d.ts → index-BaA-xpSw.d.ts} +2 -2
  80. package/dist/{index-FVoPvhAu.d.cts → index-Bd91Nmf4.d.cts} +2 -2
  81. package/dist/{index-PqbnoScQ.d.ts → index-BgjS2b8N.d.ts} +2 -2
  82. package/dist/{index-DCbE8fFM.d.cts → index-BiHUBEKq.d.cts} +2 -2
  83. package/dist/{index-DlgHqQxW.d.cts → index-BilOa6AE.d.cts} +6 -32
  84. package/dist/{index-DoYc8BWK.d.cts → index-BmSQLAZo.d.cts} +2 -2
  85. package/dist/{index-DlrWu9Hs.d.cts → index-C-dkXOpB.d.cts} +1 -1
  86. package/dist/{index-C7VV_qOs.d.ts → index-C5cQ7Gfx.d.ts} +2 -2
  87. package/dist/{index-CPhBvRJU.d.ts → index-C6ZUaos7.d.ts} +1 -1
  88. package/dist/{index-PlJ3MraE.d.ts → index-CAP3UGsq.d.ts} +1 -1
  89. package/dist/{index-B41Asm7D.d.ts → index-CD2dBMet.d.ts} +2 -2
  90. package/dist/index-CGhMJNHb.d.cts +128 -0
  91. package/dist/{index-BAlaVimV.d.ts → index-CQtWm7jS.d.ts} +2 -2
  92. package/dist/{index-8R1vzNOx.d.cts → index-CRm0YIzC.d.cts} +2 -2
  93. package/dist/index-CUIkE1l9.d.cts +230 -0
  94. package/dist/{index-KlZ_ZUip.d.cts → index-Cczxgd2D.d.ts} +3 -3
  95. package/dist/{index-DIHcMLr6.d.cts → index-CgnCFhr2.d.cts} +1 -1
  96. package/dist/{index-BC9VybQs.d.ts → index-Ck35nA-T.d.ts} +2 -2
  97. package/dist/{index-BndG0cpK.d.cts → index-Cnr1WrlX.d.cts} +1 -1
  98. package/dist/{index-H_I66pav.d.cts → index-CtFNGe-m.d.cts} +2 -2
  99. package/dist/index-CuPUehFa.d.cts +218 -0
  100. package/dist/index-D1Gc7wV5.d.ts +230 -0
  101. package/dist/{index-iTX5IqSP.d.ts → index-D1IEZUsj.d.ts} +5 -5
  102. package/dist/{index-CWHtYmSh.d.cts → index-D4uimgee.d.cts} +1 -1
  103. package/dist/{index-CwP_KAMS.d.cts → index-DGTo1yka.d.cts} +64 -6
  104. package/dist/{index-BUPVld1w.d.ts → index-DH4fm2Ck.d.ts} +2 -2
  105. package/dist/{index-mNwgxC21.d.cts → index-DJ_MPOJ5.d.cts} +5 -5
  106. package/dist/{index-DyM4tFAe.d.cts → index-DQQCOIt8.d.cts} +2 -2
  107. package/dist/{index-BJ26eEjs.d.cts → index-DVAlsmEU.d.cts} +2 -2
  108. package/dist/{index-DINuaZlJ.d.cts → index-DVDapw2k.d.cts} +1 -1
  109. package/dist/{index-DTtBpuQy.d.cts → index-DgJc8Zgc.d.cts} +5 -3
  110. package/dist/{index-BKMdnYnk.d.ts → index-DhLyOHYZ.d.ts} +1 -1
  111. package/dist/{index-89FczVZ_.d.ts → index-DhnsQfa3.d.ts} +77 -51
  112. package/dist/{index-L8XI8Zql.d.cts → index-DktLSZOc.d.cts} +2 -2
  113. package/dist/{index-pVDQcbar.d.cts → index-DpiGqtrs.d.cts} +77 -51
  114. package/dist/{index-B9fmw5n2.d.ts → index-I1cCY3ZI.d.ts} +5 -3
  115. package/dist/{index-C19qqa38.d.ts → index-IUCY0OFN.d.ts} +2 -2
  116. package/dist/index-N2MAxt7_.d.ts +128 -0
  117. package/dist/{index-Br3WnqEn.d.ts → index-WSlcjhQF.d.ts} +6 -32
  118. package/dist/{index-DQUVq1_d.d.ts → index-bXXLSvor.d.ts} +2 -2
  119. package/dist/{index-BhUaMYm_.d.ts → index-da2V5vPy.d.ts} +1 -1
  120. package/dist/{index-PsVHpPwP.d.cts → index-t6L2qpHh.d.cts} +2 -2
  121. package/dist/{index-IwFqHxCs.d.cts → index-tV3AA9hI.d.cts} +1 -1
  122. package/dist/index.cjs +48 -48
  123. package/dist/index.d.cts +33 -33
  124. package/dist/index.d.ts +33 -33
  125. package/dist/index.js +1 -1
  126. package/dist/patterns/ai/browser.cjs +5 -5
  127. package/dist/patterns/ai/browser.d.cts +2 -2
  128. package/dist/patterns/ai/browser.d.ts +2 -2
  129. package/dist/patterns/ai/browser.js +1 -1
  130. package/dist/patterns/ai/index.cjs +14 -14
  131. package/dist/patterns/ai/index.d.cts +11 -11
  132. package/dist/patterns/ai/index.d.ts +11 -11
  133. package/dist/patterns/ai/index.js +1 -1
  134. package/dist/patterns/ai/node.js +1 -1
  135. package/dist/patterns/audit/index.d.cts +3 -3
  136. package/dist/patterns/audit/index.d.ts +3 -3
  137. package/dist/patterns/audit/index.js +1 -1
  138. package/dist/patterns/cqrs/index.d.cts +3 -3
  139. package/dist/patterns/cqrs/index.d.ts +3 -3
  140. package/dist/patterns/cqrs/index.js +1 -1
  141. package/dist/patterns/demo-shell/index.d.cts +3 -3
  142. package/dist/patterns/demo-shell/index.d.ts +3 -3
  143. package/dist/patterns/demo-shell/index.js +1 -1
  144. package/dist/patterns/domain-templates/index.d.cts +2 -2
  145. package/dist/patterns/domain-templates/index.d.ts +2 -2
  146. package/dist/patterns/domain-templates/index.js +1 -1
  147. package/dist/patterns/graphspec/index.d.cts +2 -2
  148. package/dist/patterns/graphspec/index.d.ts +2 -2
  149. package/dist/patterns/graphspec/index.js +1 -1
  150. package/dist/patterns/guarded-execution/index.cjs +3 -3
  151. package/dist/patterns/guarded-execution/index.d.cts +4 -4
  152. package/dist/patterns/guarded-execution/index.d.ts +4 -4
  153. package/dist/patterns/guarded-execution/index.js +1 -1
  154. package/dist/patterns/harness/index.cjs +1 -1
  155. package/dist/patterns/harness/index.d.cts +7 -7
  156. package/dist/patterns/harness/index.d.ts +7 -7
  157. package/dist/patterns/harness/index.js +1 -1
  158. package/dist/patterns/job-queue/index.d.cts +3 -3
  159. package/dist/patterns/job-queue/index.d.ts +3 -3
  160. package/dist/patterns/job-queue/index.js +1 -1
  161. package/dist/patterns/lens/index.cjs +3 -3
  162. package/dist/patterns/lens/index.d.cts +3 -4
  163. package/dist/patterns/lens/index.d.ts +3 -4
  164. package/dist/patterns/lens/index.js +1 -1
  165. package/dist/patterns/memory/index.cjs +1 -1
  166. package/dist/patterns/memory/index.d.cts +3 -3
  167. package/dist/patterns/memory/index.d.ts +3 -3
  168. package/dist/patterns/memory/index.js +1 -1
  169. package/dist/patterns/messaging/index.d.cts +2 -2
  170. package/dist/patterns/messaging/index.d.ts +2 -2
  171. package/dist/patterns/messaging/index.js +1 -1
  172. package/dist/patterns/orchestration/index.d.cts +3 -3
  173. package/dist/patterns/orchestration/index.d.ts +3 -3
  174. package/dist/patterns/orchestration/index.js +1 -1
  175. package/dist/patterns/process/index.d.cts +4 -4
  176. package/dist/patterns/process/index.d.ts +4 -4
  177. package/dist/patterns/process/index.js +1 -1
  178. package/dist/patterns/reactive-layout/index.d.cts +3 -3
  179. package/dist/patterns/reactive-layout/index.d.ts +3 -3
  180. package/dist/patterns/reactive-layout/index.js +1 -1
  181. package/dist/patterns/reduction/index.d.cts +2 -2
  182. package/dist/patterns/reduction/index.d.ts +2 -2
  183. package/dist/patterns/reduction/index.js +1 -1
  184. package/dist/patterns/refine-loop/index.d.cts +3 -3
  185. package/dist/patterns/refine-loop/index.d.ts +3 -3
  186. package/dist/patterns/refine-loop/index.js +1 -1
  187. package/dist/patterns/resilient-pipeline/index.cjs +3 -1
  188. package/dist/patterns/resilient-pipeline/index.d.cts +7 -3
  189. package/dist/patterns/resilient-pipeline/index.d.ts +7 -3
  190. package/dist/patterns/resilient-pipeline/index.js +1 -1
  191. package/dist/patterns/surface/index.d.cts +3 -3
  192. package/dist/patterns/surface/index.d.ts +3 -3
  193. package/dist/patterns/surface/index.js +1 -1
  194. package/dist/{pipeline-graph-D8vKcO_p.d.ts → pipeline-graph-CB4La-UW.d.ts} +2 -2
  195. package/dist/{pipeline-graph-BQPr2Lqs.d.cts → pipeline-graph-MWrQZXCq.d.cts} +2 -2
  196. package/dist/{reactive-layout-8CSc0tiA.d.cts → reactive-layout-BtZfUKuL.d.cts} +1 -1
  197. package/dist/{reactive-layout-DkTXxtSy.d.ts → reactive-layout-KJj4E2dT.d.ts} +1 -1
  198. package/dist/{reactive-map-B2qfD3hb.d.cts → reactive-map-6P_k3AQM.d.cts} +1 -1
  199. package/dist/{reactive-map-jFIsE6Kt.d.ts → reactive-map-CjXByDV-.d.ts} +1 -1
  200. package/dist/{resilience-HTF2LBRS.js → resilience-S33JV6XC.js} +1 -1
  201. package/dist/{topology-tree-B5Ngw3j0.d.cts → topology-tree-3LBKFsUo.d.cts} +1 -1
  202. package/dist/{topology-tree-BtvbgMXJ.d.ts → topology-tree-mF7Emqzm.d.ts} +1 -1
  203. package/package.json +1 -1
  204. package/dist/chunk-73PBQNST.js +0 -1
  205. package/dist/chunk-A6ZSKGUG.js +0 -1
  206. package/dist/chunk-EWF7KCDJ.js +0 -61
  207. package/dist/chunk-IUB4NYI2.js +0 -1
  208. package/dist/chunk-MC4UYY2X.js +0 -1
  209. package/dist/chunk-ZJ7SM3G2.js +0 -1
  210. package/dist/index-BEHmxORq.d.ts +0 -135
  211. package/dist/index-BM9szD8n.d.cts +0 -113
  212. package/dist/index-BskfDoZ_.d.ts +0 -113
  213. package/dist/index-CIRG8Hxp.d.cts +0 -135
  214. package/dist/index-Cey6VTnX.d.ts +0 -166
  215. package/dist/index-CpLpJb6A.d.cts +0 -166
@@ -1,135 +0,0 @@
1
- import { P as PolicyRuleData, N as Node, A as Actor } from './node-BYInONRr.cjs';
2
- import { G as Graph, a as GraphOptions, d as GraphDescribeOptions, b as GraphDescribeOutput, D as DescribeFilter } from './graph-BUwMAxJI.cjs';
3
- import { P as PolicyGateGraph, a as PolicyViolation } from './index-DoYc8BWK.cjs';
4
- import { T as TopicGraph } from './index-BndG0cpK.cjs';
5
-
6
- /**
7
- * Composable safety layer (roadmap §9.0b).
8
- *
9
- * {@link guardedExecution} wraps any {@link Graph} with:
10
- *
11
- * - {@link policyGate} — reactive ABAC (Tier 2.3 rename of `policyEnforcer`),
12
- * policies stored as a `Node` so LLMs / humans can update them at runtime.
13
- * Now with full transitive dynamic coverage via `watchTopologyTree`.
14
- * - Scoped {@link GuardedExecutionGraph.scopedDescribe} — delegates to
15
- * `target.describe({actor})` so callers see only what the actor is
16
- * allowed to see.
17
- * - The enforcer's `violations` topic is republished as `violations` on
18
- * the wrapper, composable with {@link graphLens}.`health` alerts.
19
- *
20
- * V1 scope: policies + actor + scoped describe. Budget-as-option is NOT
21
- * in V1 — it requires a cost-tracking design that hasn't landed yet.
22
- * Callers who need a budget limit today append a budget-aware
23
- * {@link PolicyRuleData} to the policies list (check current cost and
24
- * `deny` when exhausted).
25
- *
26
- * @module
27
- */
28
-
29
- /** Options for {@link guardedExecution}. */
30
- interface GuardedExecutionOptions {
31
- /**
32
- * Policies enforced against every guarded write. Static list or a live
33
- * `Node<readonly PolicyRuleData[]>` (LLM-updatable).
34
- *
35
- * **Deny-by-default gotcha:** the underlying `policyFromRules()` denies any
36
- * action that matches no rule. An empty policies list in `mode: "enforce"`
37
- * therefore blocks EVERY write AND every `observe` through the stacked
38
- * guard — including `scopedDescribe()`. If you want a permissive base, add
39
- * at least `{ effect: "allow", action: "*" }` and layer deny rules on top.
40
- * In `mode: "audit"` no guards are stacked, so empty policies are safe.
41
- */
42
- policies: readonly PolicyRuleData[] | Node<readonly PolicyRuleData[]>;
43
- /**
44
- * Actor whose perspective drives {@link GuardedExecutionGraph.scopedDescribe}
45
- * and {@link GuardedExecutionGraph.describe} — when omitted, callers must
46
- * pass `{actor}` explicitly or they get the target's raw describe.
47
- */
48
- actor?: Actor;
49
- /**
50
- * `"enforce"` (default) — push guards onto target nodes so disallowed
51
- * writes throw {@link GuardDenied}.
52
- * `"audit"` — record would-be denials to the `violations` topic without
53
- * blocking writes.
54
- */
55
- mode?: "audit" | "enforce";
56
- /** Ring-buffer cap for the `violations` topic. Default 1000 (inherited from policyGate). */
57
- violationsLimit?: number;
58
- /** Wrapper graph name. Default `${target.name}_guarded`. */
59
- name?: string;
60
- /** Wrapper graph options. */
61
- graph?: GraphOptions;
62
- }
63
- /**
64
- * Wrapper over a target {@link Graph} providing reactive ABAC + scoped
65
- * describe. Mounts a {@link PolicyGateGraph} under `enforcer`.
66
- *
67
- * @category patterns
68
- */
69
- declare class GuardedExecutionGraph extends Graph {
70
- readonly enforcer: PolicyGateGraph;
71
- readonly violations: TopicGraph<PolicyViolation>;
72
- private readonly _target;
73
- private readonly _defaultActor;
74
- constructor(target: Graph, opts: GuardedExecutionOptions);
75
- /**
76
- * Describe the **target** graph scoped to the configured actor. Returns
77
- * only nodes the actor is permitted to see (via the target's node guards
78
- * filtering `describe()` via `actor`).
79
- *
80
- * Pass `{actor}` in opts to override the configured actor for this call.
81
- * Pass any standard {@link GraphDescribeOptions} fields (`detail`,
82
- * `fields`, `filter`) — they apply to the target's describe.
83
- *
84
- * **Mode interaction:**
85
- * - In `mode: "enforce"` (default), the enforcer stacks a policy-derived
86
- * guard on every target node. `scopedDescribe({actor})` then filters by
87
- * the AND of per-node guards AND the stacked policy guard.
88
- * - In `mode: "audit"`, NO guards are stacked — `scopedDescribe` filters
89
- * purely by the target's pre-existing per-node guards. If a target has
90
- * no node-level guards, the policy rules you pass have no effect on
91
- * visibility (they only populate the `violations` topic on writes).
92
- */
93
- scopedDescribe(opts?: Omit<GraphDescribeOptions, "actor"> & {
94
- actor?: Actor;
95
- }): GraphDescribeOutput;
96
- /** The wrapped graph (escape hatch for tooling). */
97
- get target(): Graph;
98
- }
99
- /**
100
- * Wrap a {@link Graph} with {@link policyGate} plus a scoped describe
101
- * lens. Returns a {@link GuardedExecutionGraph} that can be mounted, diffed,
102
- * or composed with {@link graphLens}.
103
- *
104
- * @param target - The graph to guard.
105
- * @param opts - See {@link GuardedExecutionOptions}.
106
- *
107
- * @example
108
- * ```ts
109
- * const guarded = guardedExecution(app, {
110
- * actor: { type: "human", id: "alice" },
111
- * policies: [
112
- * { effect: "allow", action: "read", actorType: "human" },
113
- * { effect: "deny", action: "write", pathPattern: "system::*" },
114
- * ],
115
- * mode: "enforce",
116
- * });
117
- *
118
- * const view = guarded.scopedDescribe({ detail: "standard" });
119
- * guarded.violations.events.subscribe(msgs => console.log("violations:", msgs));
120
- * ```
121
- *
122
- * @category patterns
123
- */
124
- declare function guardedExecution(target: Graph, opts: GuardedExecutionOptions): GuardedExecutionGraph;
125
-
126
- declare const index_DescribeFilter: typeof DescribeFilter;
127
- type index_GuardedExecutionGraph = GuardedExecutionGraph;
128
- declare const index_GuardedExecutionGraph: typeof GuardedExecutionGraph;
129
- type index_GuardedExecutionOptions = GuardedExecutionOptions;
130
- declare const index_guardedExecution: typeof guardedExecution;
131
- declare namespace index {
132
- export { index_DescribeFilter as DescribeFilter, index_GuardedExecutionGraph as GuardedExecutionGraph, type index_GuardedExecutionOptions as GuardedExecutionOptions, index_guardedExecution as guardedExecution };
133
- }
134
-
135
- export { GuardedExecutionGraph as G, type GuardedExecutionOptions as a, guardedExecution as g, index as i };
@@ -1,166 +0,0 @@
1
- import { N as Node } from './node-BYInONRr.js';
2
- import { R as ReactiveMapBundle } from './reactive-map-jFIsE6Kt.js';
3
- import { a as GraphOptions, G as Graph, C as CausalChain } from './graph-30XSgtVX.js';
4
- import { w as watchTopologyTree } from './topology-tree-BtvbgMXJ.js';
5
-
6
- /** Aggregate topology stats emitted by {@link LensGraph.stats}. */
7
- interface TopologyStats {
8
- /** Total primary nodes across this graph and all transitively mounted subgraphs. */
9
- nodeCount: number;
10
- /** Total directed edges (derived from deps; no duplicates). */
11
- edgeCount: number;
12
- /** Count of mounted subgraphs (transitive). */
13
- subgraphCount: number;
14
- /** Qualified paths with no upstream deps (source nodes). Sorted. */
15
- sources: readonly string[];
16
- /** Qualified paths with no downstream consumers in-graph (sink nodes). Sorted. */
17
- sinks: readonly string[];
18
- /** Longest path from any source to any sink (in edges). `0` for empty graphs. */
19
- depth: number;
20
- /** `true` if the dep DAG contains a cycle (feedback edge). */
21
- hasCycles: boolean;
22
- }
23
- /** A single health problem entry. */
24
- interface HealthProblem {
25
- path: string;
26
- /** V1 only reports `"errored"`. Future versions may add `"completed"`, `"disconnected"`. */
27
- status: "errored";
28
- /** First errored upstream ancestor along the dep chain, when one exists and is distinct from `path`. */
29
- upstreamCause?: string;
30
- }
31
- /** Aggregate health snapshot. `ok=true` iff `problems.length === 0`. */
32
- interface HealthReport {
33
- ok: boolean;
34
- problems: readonly HealthProblem[];
35
- }
36
- /** One per-path flow entry stored in {@link LensGraph.flow}. */
37
- interface FlowEntry {
38
- path: string;
39
- /** Cumulative DATA emissions observed since the lens activated. */
40
- count: number;
41
- /** `monotonicNs()` at the most recent DATA emission, or `null` if none yet. */
42
- lastUpdate_ns: number | null;
43
- }
44
- /** Options for {@link graphLens}. */
45
- interface GraphLensOptions {
46
- name?: string;
47
- graph?: GraphOptions;
48
- /**
49
- * Limit which node paths `flow` tracks. When omitted, every path in
50
- * `target.describe()` is observed. Recommended for graphs with hundreds
51
- * of nodes since each tracked path adds one observe-event dispatch per
52
- * DATA emission.
53
- */
54
- pathFilter?: (path: string) => boolean;
55
- /**
56
- * LRU cap on the {@link LensGraph.flow} map. When set, the flow tracker
57
- * evicts least-recently-used paths (by insertion / set order) once the
58
- * entry count exceeds this bound. Omit for unbounded (not recommended
59
- * for long-running graphs with churning paths). Passed through to the
60
- * underlying {@link reactiveMap}'s `maxSize`.
61
- */
62
- maxFlowPaths?: number;
63
- }
64
- /**
65
- * Reactive observability surface for a target {@link Graph}.
66
- * See {@link graphLens}.
67
- *
68
- * @category observability
69
- */
70
- declare class LensGraph extends Graph {
71
- /**
72
- * Aggregate structural stats — `nodeCount`, `edgeCount`, `sources`,
73
- * `sinks`, `depth`, `hasCycles`, `subgraphCount`. Recomputes on every
74
- * structural change via {@link watchTopologyTree} (transitive).
75
- *
76
- * Named `stats` (not `topology`) because `Graph.topology` already names
77
- * the raw `TopologyEvent` stream on every graph including `LensGraph`;
78
- * giving the lens its own `topology` accessor with an incompatible
79
- * `Node<TopologyStats>` type would break Liskov substitutability.
80
- */
81
- readonly stats: Node<TopologyStats>;
82
- readonly health: Node<HealthReport>;
83
- /**
84
- * Per-path flow tracker — a live {@link ReactiveMapBundle} keyed by
85
- * qualified path. Use `.get(path)` / `.has(path)` / `.size` for O(1)
86
- * sync queries; subscribe to `.entries` for a reactive snapshot of the
87
- * whole map. Lazy — the snapshot is materialized only while `.entries`
88
- * has subscribers.
89
- *
90
- * Shape intentionally differs from `stats` / `health` (which are plain
91
- * `Node<Report>`) because `flow` is a keyed collection, not a single
92
- * aggregate value. The map shape exposes cheaper queries than any
93
- * snapshot-based design.
94
- */
95
- readonly flow: ReactiveMapBundle<string, FlowEntry>;
96
- private readonly _target;
97
- constructor(target: Graph, opts?: GraphLensOptions);
98
- /**
99
- * Live causal chain from `from` to `to`. Recomputes whenever the target
100
- * mutates. Disposed automatically when the lens is destroyed.
101
- *
102
- * **Lifetime note:** every call to `why()` registers a lens-owned disposer
103
- * that runs on `lens.destroy()`. The returned `dispose` function releases
104
- * the internal subscription but does NOT remove the lens-owned disposer —
105
- * so heavy calling (e.g. per render frame) accumulates no-op disposers
106
- * until lens teardown. Cache the returned handle for long-lived queries.
107
- *
108
- * Tier 3.5: rebuilt on top of `graph.explain(from, to, { reactive: true })`
109
- * after the deprecated `reactiveExplainPath` wrapper was deleted.
110
- *
111
- * @param from - Qualified path of the upstream endpoint.
112
- * @param to - Qualified path of the downstream endpoint.
113
- * @param opts - See {@link Graph.explain} (`{ reactive: true }` overload).
114
- */
115
- why(from: string, to: string, opts?: {
116
- maxDepth?: number;
117
- name?: string;
118
- findCycle?: boolean;
119
- }): {
120
- node: Node<CausalChain>;
121
- dispose: () => void;
122
- };
123
- /** Reference to the lensed graph. */
124
- get target(): Graph;
125
- }
126
- /**
127
- * Create a reactive observability lens over a {@link Graph}. Returns a
128
- * {@link LensGraph} with three reactive surfaces (`stats`, `health`, `flow`)
129
- * plus the `why(from, to)` method.
130
- *
131
- * The returned graph is detached. Mount it via `target.mount("lens", lens)`
132
- * if you want it to appear in the target's `describe()`, or keep it standalone.
133
- *
134
- * @param target - The graph to observe.
135
- * @param opts - See {@link GraphLensOptions}.
136
- *
137
- * @example
138
- * ```ts
139
- * const g = new Graph("app");
140
- * g.add(state(0, { name: "counter" }));
141
- * const lens = graphLens(g);
142
- * lens.stats.subscribe((msgs) => console.log(msgs[0]?.[1])); // TopologyStats
143
- * // Flow queries — O(1) without subscribing to snapshots:
144
- * lens.flow.get("counter"); // FlowEntry | undefined
145
- * lens.flow.size; // number
146
- * lens.flow.entries.subscribe(...); // reactive snapshot, lazy-materialized
147
- * ```
148
- *
149
- * @category observability
150
- */
151
- declare function graphLens(target: Graph, opts?: GraphLensOptions): LensGraph;
152
-
153
- type index_FlowEntry = FlowEntry;
154
- type index_GraphLensOptions = GraphLensOptions;
155
- type index_HealthProblem = HealthProblem;
156
- type index_HealthReport = HealthReport;
157
- type index_LensGraph = LensGraph;
158
- declare const index_LensGraph: typeof LensGraph;
159
- type index_TopologyStats = TopologyStats;
160
- declare const index_graphLens: typeof graphLens;
161
- declare const index_watchTopologyTree: typeof watchTopologyTree;
162
- declare namespace index {
163
- export { type index_FlowEntry as FlowEntry, type index_GraphLensOptions as GraphLensOptions, type index_HealthProblem as HealthProblem, type index_HealthReport as HealthReport, index_LensGraph as LensGraph, type index_TopologyStats as TopologyStats, index_graphLens as graphLens, index_watchTopologyTree as watchTopologyTree };
164
- }
165
-
166
- export { type FlowEntry as F, type GraphLensOptions as G, type HealthProblem as H, LensGraph as L, type TopologyStats as T, type HealthReport as a, graphLens as g, index as i };
@@ -1,166 +0,0 @@
1
- import { N as Node } from './node-BYInONRr.cjs';
2
- import { R as ReactiveMapBundle } from './reactive-map-B2qfD3hb.cjs';
3
- import { a as GraphOptions, G as Graph, C as CausalChain } from './graph-BUwMAxJI.cjs';
4
- import { w as watchTopologyTree } from './topology-tree-B5Ngw3j0.cjs';
5
-
6
- /** Aggregate topology stats emitted by {@link LensGraph.stats}. */
7
- interface TopologyStats {
8
- /** Total primary nodes across this graph and all transitively mounted subgraphs. */
9
- nodeCount: number;
10
- /** Total directed edges (derived from deps; no duplicates). */
11
- edgeCount: number;
12
- /** Count of mounted subgraphs (transitive). */
13
- subgraphCount: number;
14
- /** Qualified paths with no upstream deps (source nodes). Sorted. */
15
- sources: readonly string[];
16
- /** Qualified paths with no downstream consumers in-graph (sink nodes). Sorted. */
17
- sinks: readonly string[];
18
- /** Longest path from any source to any sink (in edges). `0` for empty graphs. */
19
- depth: number;
20
- /** `true` if the dep DAG contains a cycle (feedback edge). */
21
- hasCycles: boolean;
22
- }
23
- /** A single health problem entry. */
24
- interface HealthProblem {
25
- path: string;
26
- /** V1 only reports `"errored"`. Future versions may add `"completed"`, `"disconnected"`. */
27
- status: "errored";
28
- /** First errored upstream ancestor along the dep chain, when one exists and is distinct from `path`. */
29
- upstreamCause?: string;
30
- }
31
- /** Aggregate health snapshot. `ok=true` iff `problems.length === 0`. */
32
- interface HealthReport {
33
- ok: boolean;
34
- problems: readonly HealthProblem[];
35
- }
36
- /** One per-path flow entry stored in {@link LensGraph.flow}. */
37
- interface FlowEntry {
38
- path: string;
39
- /** Cumulative DATA emissions observed since the lens activated. */
40
- count: number;
41
- /** `monotonicNs()` at the most recent DATA emission, or `null` if none yet. */
42
- lastUpdate_ns: number | null;
43
- }
44
- /** Options for {@link graphLens}. */
45
- interface GraphLensOptions {
46
- name?: string;
47
- graph?: GraphOptions;
48
- /**
49
- * Limit which node paths `flow` tracks. When omitted, every path in
50
- * `target.describe()` is observed. Recommended for graphs with hundreds
51
- * of nodes since each tracked path adds one observe-event dispatch per
52
- * DATA emission.
53
- */
54
- pathFilter?: (path: string) => boolean;
55
- /**
56
- * LRU cap on the {@link LensGraph.flow} map. When set, the flow tracker
57
- * evicts least-recently-used paths (by insertion / set order) once the
58
- * entry count exceeds this bound. Omit for unbounded (not recommended
59
- * for long-running graphs with churning paths). Passed through to the
60
- * underlying {@link reactiveMap}'s `maxSize`.
61
- */
62
- maxFlowPaths?: number;
63
- }
64
- /**
65
- * Reactive observability surface for a target {@link Graph}.
66
- * See {@link graphLens}.
67
- *
68
- * @category observability
69
- */
70
- declare class LensGraph extends Graph {
71
- /**
72
- * Aggregate structural stats — `nodeCount`, `edgeCount`, `sources`,
73
- * `sinks`, `depth`, `hasCycles`, `subgraphCount`. Recomputes on every
74
- * structural change via {@link watchTopologyTree} (transitive).
75
- *
76
- * Named `stats` (not `topology`) because `Graph.topology` already names
77
- * the raw `TopologyEvent` stream on every graph including `LensGraph`;
78
- * giving the lens its own `topology` accessor with an incompatible
79
- * `Node<TopologyStats>` type would break Liskov substitutability.
80
- */
81
- readonly stats: Node<TopologyStats>;
82
- readonly health: Node<HealthReport>;
83
- /**
84
- * Per-path flow tracker — a live {@link ReactiveMapBundle} keyed by
85
- * qualified path. Use `.get(path)` / `.has(path)` / `.size` for O(1)
86
- * sync queries; subscribe to `.entries` for a reactive snapshot of the
87
- * whole map. Lazy — the snapshot is materialized only while `.entries`
88
- * has subscribers.
89
- *
90
- * Shape intentionally differs from `stats` / `health` (which are plain
91
- * `Node<Report>`) because `flow` is a keyed collection, not a single
92
- * aggregate value. The map shape exposes cheaper queries than any
93
- * snapshot-based design.
94
- */
95
- readonly flow: ReactiveMapBundle<string, FlowEntry>;
96
- private readonly _target;
97
- constructor(target: Graph, opts?: GraphLensOptions);
98
- /**
99
- * Live causal chain from `from` to `to`. Recomputes whenever the target
100
- * mutates. Disposed automatically when the lens is destroyed.
101
- *
102
- * **Lifetime note:** every call to `why()` registers a lens-owned disposer
103
- * that runs on `lens.destroy()`. The returned `dispose` function releases
104
- * the internal subscription but does NOT remove the lens-owned disposer —
105
- * so heavy calling (e.g. per render frame) accumulates no-op disposers
106
- * until lens teardown. Cache the returned handle for long-lived queries.
107
- *
108
- * Tier 3.5: rebuilt on top of `graph.explain(from, to, { reactive: true })`
109
- * after the deprecated `reactiveExplainPath` wrapper was deleted.
110
- *
111
- * @param from - Qualified path of the upstream endpoint.
112
- * @param to - Qualified path of the downstream endpoint.
113
- * @param opts - See {@link Graph.explain} (`{ reactive: true }` overload).
114
- */
115
- why(from: string, to: string, opts?: {
116
- maxDepth?: number;
117
- name?: string;
118
- findCycle?: boolean;
119
- }): {
120
- node: Node<CausalChain>;
121
- dispose: () => void;
122
- };
123
- /** Reference to the lensed graph. */
124
- get target(): Graph;
125
- }
126
- /**
127
- * Create a reactive observability lens over a {@link Graph}. Returns a
128
- * {@link LensGraph} with three reactive surfaces (`stats`, `health`, `flow`)
129
- * plus the `why(from, to)` method.
130
- *
131
- * The returned graph is detached. Mount it via `target.mount("lens", lens)`
132
- * if you want it to appear in the target's `describe()`, or keep it standalone.
133
- *
134
- * @param target - The graph to observe.
135
- * @param opts - See {@link GraphLensOptions}.
136
- *
137
- * @example
138
- * ```ts
139
- * const g = new Graph("app");
140
- * g.add(state(0, { name: "counter" }));
141
- * const lens = graphLens(g);
142
- * lens.stats.subscribe((msgs) => console.log(msgs[0]?.[1])); // TopologyStats
143
- * // Flow queries — O(1) without subscribing to snapshots:
144
- * lens.flow.get("counter"); // FlowEntry | undefined
145
- * lens.flow.size; // number
146
- * lens.flow.entries.subscribe(...); // reactive snapshot, lazy-materialized
147
- * ```
148
- *
149
- * @category observability
150
- */
151
- declare function graphLens(target: Graph, opts?: GraphLensOptions): LensGraph;
152
-
153
- type index_FlowEntry = FlowEntry;
154
- type index_GraphLensOptions = GraphLensOptions;
155
- type index_HealthProblem = HealthProblem;
156
- type index_HealthReport = HealthReport;
157
- type index_LensGraph = LensGraph;
158
- declare const index_LensGraph: typeof LensGraph;
159
- type index_TopologyStats = TopologyStats;
160
- declare const index_graphLens: typeof graphLens;
161
- declare const index_watchTopologyTree: typeof watchTopologyTree;
162
- declare namespace index {
163
- export { type index_FlowEntry as FlowEntry, type index_GraphLensOptions as GraphLensOptions, type index_HealthProblem as HealthProblem, type index_HealthReport as HealthReport, index_LensGraph as LensGraph, type index_TopologyStats as TopologyStats, index_graphLens as graphLens, index_watchTopologyTree as watchTopologyTree };
164
- }
165
-
166
- export { type FlowEntry as F, type GraphLensOptions as G, type HealthProblem as H, LensGraph as L, type TopologyStats as T, type HealthReport as a, graphLens as g, index as i };