@graphrefly/graphrefly 0.18.0 → 0.19.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 (72) hide show
  1. package/dist/{chunk-TNKODJ6E.js → chunk-AHRKWMNI.js} +7 -3
  2. package/dist/{chunk-TNKODJ6E.js.map → chunk-AHRKWMNI.js.map} +1 -1
  3. package/dist/{chunk-76YPZQTW.js → chunk-BER7UYLM.js} +27 -26
  4. package/dist/chunk-BER7UYLM.js.map +1 -0
  5. package/dist/{chunk-F6ORUNO7.js → chunk-IRZAGZUB.js} +34 -2
  6. package/dist/{chunk-F6ORUNO7.js.map → chunk-IRZAGZUB.js.map} +1 -1
  7. package/dist/{chunk-LB3RYLSC.js → chunk-JC2SN46B.js} +197 -42
  8. package/dist/chunk-JC2SN46B.js.map +1 -0
  9. package/dist/{chunk-KJGUP35I.js → chunk-OO5QOAXI.js} +4 -4
  10. package/dist/{chunk-UVWEKTYC.js → chunk-UW77D7SP.js} +3 -3
  11. package/dist/{chunk-J7S54G7I.js → chunk-XUOY3YKN.js} +7 -2
  12. package/dist/chunk-XUOY3YKN.js.map +1 -0
  13. package/dist/chunk-YLR5JUJZ.js +111 -0
  14. package/dist/chunk-YLR5JUJZ.js.map +1 -0
  15. package/dist/{chunk-BV3TPSBK.js → chunk-YXR3WW3Q.js} +740 -755
  16. package/dist/chunk-YXR3WW3Q.js.map +1 -0
  17. package/dist/compat/nestjs/index.cjs +931 -784
  18. package/dist/compat/nestjs/index.cjs.map +1 -1
  19. package/dist/compat/nestjs/index.d.cts +4 -4
  20. package/dist/compat/nestjs/index.d.ts +4 -4
  21. package/dist/compat/nestjs/index.js +7 -7
  22. package/dist/core/index.cjs +651 -664
  23. package/dist/core/index.cjs.map +1 -1
  24. package/dist/core/index.d.cts +2 -2
  25. package/dist/core/index.d.ts +2 -2
  26. package/dist/core/index.js +7 -3
  27. package/dist/extra/index.cjs +686 -672
  28. package/dist/extra/index.cjs.map +1 -1
  29. package/dist/extra/index.d.cts +4 -4
  30. package/dist/extra/index.d.ts +4 -4
  31. package/dist/extra/index.js +5 -5
  32. package/dist/graph/index.cjs +836 -808
  33. package/dist/graph/index.cjs.map +1 -1
  34. package/dist/graph/index.d.cts +3 -3
  35. package/dist/graph/index.d.ts +3 -3
  36. package/dist/graph/index.js +8 -8
  37. package/dist/{graph-gISB9n3n.d.ts → graph-KsTe57nI.d.cts} +82 -8
  38. package/dist/{graph-BYFlyNpX.d.cts → graph-mILUUqW8.d.ts} +82 -8
  39. package/dist/{index-CgKPpiu8.d.ts → index-8a605sg9.d.ts} +2 -2
  40. package/dist/{index-DKaB2x0T.d.ts → index-B2SvPEbc.d.ts} +6 -65
  41. package/dist/{index-B80mMeuf.d.ts → index-BBUYZfJ1.d.cts} +122 -76
  42. package/dist/{index-D_tUMcpz.d.cts → index-Bjh5C1Tp.d.cts} +37 -32
  43. package/dist/{index-B43mC7uY.d.cts → index-BjtlNirP.d.cts} +3 -3
  44. package/dist/{index-7WnwgjMu.d.ts → index-BnkMgNNa.d.ts} +37 -32
  45. package/dist/{index-CEDaJaYE.d.ts → index-CgSiUouz.d.ts} +3 -3
  46. package/dist/{index-EmzYk-TG.d.cts → index-CvKzv0AW.d.ts} +122 -76
  47. package/dist/{index-Ci_vPaVm.d.cts → index-UudxGnzc.d.cts} +6 -65
  48. package/dist/{index-BqOWSFhr.d.cts → index-VHA43cGP.d.cts} +2 -2
  49. package/dist/index.cjs +5920 -5572
  50. package/dist/index.cjs.map +1 -1
  51. package/dist/index.d.cts +595 -399
  52. package/dist/index.d.ts +595 -399
  53. package/dist/index.js +4357 -4063
  54. package/dist/index.js.map +1 -1
  55. package/dist/{meta-npl5b97j.d.cts → meta-BnG7XAaE.d.cts} +394 -236
  56. package/dist/{meta-npl5b97j.d.ts → meta-BnG7XAaE.d.ts} +394 -236
  57. package/dist/{observable-DFBCBELR.d.cts → observable-C8Kx_O6k.d.cts} +1 -1
  58. package/dist/{observable-oAGygKvc.d.ts → observable-DcBwQY7t.d.ts} +1 -1
  59. package/dist/patterns/reactive-layout/index.cjs +865 -718
  60. package/dist/patterns/reactive-layout/index.cjs.map +1 -1
  61. package/dist/patterns/reactive-layout/index.d.cts +3 -3
  62. package/dist/patterns/reactive-layout/index.d.ts +3 -3
  63. package/dist/patterns/reactive-layout/index.js +4 -4
  64. package/package.json +1 -1
  65. package/dist/chunk-76YPZQTW.js.map +0 -1
  66. package/dist/chunk-BV3TPSBK.js.map +0 -1
  67. package/dist/chunk-FCLROC4Q.js +0 -231
  68. package/dist/chunk-FCLROC4Q.js.map +0 -1
  69. package/dist/chunk-J7S54G7I.js.map +0 -1
  70. package/dist/chunk-LB3RYLSC.js.map +0 -1
  71. /package/dist/{chunk-KJGUP35I.js.map → chunk-OO5QOAXI.js.map} +0 -0
  72. /package/dist/{chunk-UVWEKTYC.js.map → chunk-UW77D7SP.js.map} +0 -0
@@ -1,3 +1,3 @@
1
- export { D as DeltaCheckpoint, E as EvictedSubgraphInfo, b as EvictionPolicy, c as GraphCodec, a as GraphProfileOptions, G as GraphProfileResult, J as JsonCodec, L as LazyGraphCodec, N as NodeProfile, W as WALEntry, d as createDagCborCodec, e as createDagCborZstdCodec, g as graphProfile, n as negotiateCodec, r as replayWAL, s as sizeof } from '../index-Ci_vPaVm.cjs';
2
- export { A as AutoCheckpointAdapter, D as DescribeFilter, d as GRAPH_META_SEGMENT, G as Graph, e as GraphActorOptions, b as GraphAutoCheckpointHandle, c as GraphAutoCheckpointOptions, f as GraphCheckpointRecord, g as GraphDescribeOptions, h as GraphDescribeOutput, i as GraphDiagramDirection, j as GraphDiagramOptions, k as GraphDiffChange, l as GraphDiffResult, m as GraphDumpOptions, n as GraphFactoryContext, o as GraphNodeFactory, p as GraphObserveAll, q as GraphObserveOne, a as GraphOptions, r as GraphPersistSnapshot, O as ObserveDetail, s as ObserveEvent, t as ObserveOptions, u as ObserveResult, v as ObserveTheme, w as ObserveThemeName, R as ReachableDirection, x as ReachableOptions, T as TraceEntry, y as reachable } from '../graph-BYFlyNpX.cjs';
3
- import '../meta-npl5b97j.cjs';
1
+ export { D as DeltaCheckpoint, E as EvictedSubgraphInfo, a as EvictionPolicy, G as GraphCodec, J as JsonCodec, L as LazyGraphCodec, W as WALEntry, c as createDagCborCodec, b as createDagCborZstdCodec, n as negotiateCodec, r as replayWAL, s as sizeof } from '../index-UudxGnzc.cjs';
2
+ export { A as AutoCheckpointAdapter, D as DescribeFilter, f as GRAPH_META_SEGMENT, G as Graph, g as GraphActorOptions, b as GraphAutoCheckpointHandle, c as GraphAutoCheckpointOptions, h as GraphCheckpointRecord, i as GraphDescribeOptions, j as GraphDescribeOutput, k as GraphDiagramDirection, l as GraphDiagramOptions, m as GraphDiffChange, n as GraphDiffResult, o as GraphDumpOptions, p as GraphFactoryContext, q as GraphNodeFactory, r as GraphObserveAll, s as GraphObserveOne, a as GraphOptions, t as GraphPersistSnapshot, e as GraphProfileOptions, d as GraphProfileResult, N as NodeProfile, O as ObserveDetail, u as ObserveEvent, v as ObserveOptions, w as ObserveResult, x as ObserveTheme, y as ObserveThemeName, R as ReachableDirection, z as ReachableOptions, T as TraceEntry, B as graphProfile, C as reachable } from '../graph-KsTe57nI.cjs';
3
+ import '../meta-BnG7XAaE.cjs';
@@ -1,3 +1,3 @@
1
- export { D as DeltaCheckpoint, E as EvictedSubgraphInfo, b as EvictionPolicy, c as GraphCodec, a as GraphProfileOptions, G as GraphProfileResult, J as JsonCodec, L as LazyGraphCodec, N as NodeProfile, W as WALEntry, d as createDagCborCodec, e as createDagCborZstdCodec, g as graphProfile, n as negotiateCodec, r as replayWAL, s as sizeof } from '../index-DKaB2x0T.js';
2
- export { A as AutoCheckpointAdapter, D as DescribeFilter, d as GRAPH_META_SEGMENT, G as Graph, e as GraphActorOptions, b as GraphAutoCheckpointHandle, c as GraphAutoCheckpointOptions, f as GraphCheckpointRecord, g as GraphDescribeOptions, h as GraphDescribeOutput, i as GraphDiagramDirection, j as GraphDiagramOptions, k as GraphDiffChange, l as GraphDiffResult, m as GraphDumpOptions, n as GraphFactoryContext, o as GraphNodeFactory, p as GraphObserveAll, q as GraphObserveOne, a as GraphOptions, r as GraphPersistSnapshot, O as ObserveDetail, s as ObserveEvent, t as ObserveOptions, u as ObserveResult, v as ObserveTheme, w as ObserveThemeName, R as ReachableDirection, x as ReachableOptions, T as TraceEntry, y as reachable } from '../graph-gISB9n3n.js';
3
- import '../meta-npl5b97j.js';
1
+ export { D as DeltaCheckpoint, E as EvictedSubgraphInfo, a as EvictionPolicy, G as GraphCodec, J as JsonCodec, L as LazyGraphCodec, W as WALEntry, c as createDagCborCodec, b as createDagCborZstdCodec, n as negotiateCodec, r as replayWAL, s as sizeof } from '../index-B2SvPEbc.js';
2
+ export { A as AutoCheckpointAdapter, D as DescribeFilter, f as GRAPH_META_SEGMENT, G as Graph, g as GraphActorOptions, b as GraphAutoCheckpointHandle, c as GraphAutoCheckpointOptions, h as GraphCheckpointRecord, i as GraphDescribeOptions, j as GraphDescribeOutput, k as GraphDiagramDirection, l as GraphDiagramOptions, m as GraphDiffChange, n as GraphDiffResult, o as GraphDumpOptions, p as GraphFactoryContext, q as GraphNodeFactory, r as GraphObserveAll, s as GraphObserveOne, a as GraphOptions, t as GraphPersistSnapshot, e as GraphProfileOptions, d as GraphProfileResult, N as NodeProfile, O as ObserveDetail, u as ObserveEvent, v as ObserveOptions, w as ObserveResult, x as ObserveTheme, y as ObserveThemeName, R as ReachableDirection, z as ReachableOptions, T as TraceEntry, B as graphProfile, C as reachable } from '../graph-mILUUqW8.js';
3
+ import '../meta-BnG7XAaE.js';
@@ -2,18 +2,18 @@ import {
2
2
  JsonCodec,
3
3
  createDagCborCodec,
4
4
  createDagCborZstdCodec,
5
- graphProfile,
6
5
  negotiateCodec,
7
- replayWAL,
8
- sizeof
9
- } from "../chunk-FCLROC4Q.js";
6
+ replayWAL
7
+ } from "../chunk-YLR5JUJZ.js";
10
8
  import {
11
9
  GRAPH_META_SEGMENT,
12
10
  Graph,
13
- reachable
14
- } from "../chunk-LB3RYLSC.js";
15
- import "../chunk-J7S54G7I.js";
16
- import "../chunk-BV3TPSBK.js";
11
+ graphProfile,
12
+ reachable,
13
+ sizeof
14
+ } from "../chunk-JC2SN46B.js";
15
+ import "../chunk-XUOY3YKN.js";
16
+ import "../chunk-YXR3WW3Q.js";
17
17
  export {
18
18
  GRAPH_META_SEGMENT,
19
19
  Graph,
@@ -1,4 +1,67 @@
1
- import { j as DescribeNodeOutput, h as DescribeDetail, i as DescribeField, N as Node, y as VersioningLevel, A as Actor, m as Messages, p as NodeSink } from './meta-npl5b97j.js';
1
+ import { i as DescribeNodeOutput, g as DescribeDetail, h as DescribeField, N as Node, y as VersioningLevel, A as Actor, l as Messages, o as NodeSink } from './meta-BnG7XAaE.cjs';
2
+
3
+ /**
4
+ * Graph profiling and inspection utilities.
5
+ *
6
+ * Provides per-node memory estimation, connectivity stats, and hotspot
7
+ * detection. Non-invasive — reads from `describe()` and node internals
8
+ * without modifying state.
9
+ *
10
+ * @module
11
+ */
12
+
13
+ /** Per-node profile entry. */
14
+ interface NodeProfile {
15
+ /** Qualified path within the graph. */
16
+ path: string;
17
+ /** Node type (state, derived, producer, effect). */
18
+ type: string;
19
+ /** Node status (disconnected, dirty, settled, errored, completed). */
20
+ status: string;
21
+ /** Approximate retained bytes for the node's cached value. */
22
+ valueSizeBytes: number;
23
+ /** Number of downstream subscribers (sinks). */
24
+ subscriberCount: number;
25
+ /** Number of upstream dependencies. */
26
+ depCount: number;
27
+ /** True if this is an effect node with no external subscribers (potential leak). */
28
+ isOrphanEffect: boolean;
29
+ }
30
+ /** Aggregate graph profile. */
31
+ interface GraphProfileResult {
32
+ /** Total node count. */
33
+ nodeCount: number;
34
+ /** Total edge count. */
35
+ edgeCount: number;
36
+ /** Subgraph count. */
37
+ subgraphCount: number;
38
+ /** All node profiles. */
39
+ nodes: NodeProfile[];
40
+ /** Total approximate value memory across all nodes. */
41
+ totalValueSizeBytes: number;
42
+ /** Nodes sorted by valueSizeBytes descending (top N). */
43
+ hotspots: NodeProfile[];
44
+ /** Effect nodes with no external subscribers (potential leaks). */
45
+ orphanEffects: NodeProfile[];
46
+ }
47
+ /** Options for {@link graphProfile}. */
48
+ interface GraphProfileOptions {
49
+ /** Limit hotspot list (default 10). */
50
+ topN?: number;
51
+ /** Include subgraph nodes recursively (default true). */
52
+ recursive?: boolean;
53
+ }
54
+ /**
55
+ * Profile a graph's memory and connectivity characteristics.
56
+ *
57
+ * Uses `describe({ detail: "standard" })` for node metadata and direct
58
+ * `NodeImpl` access for subscriber counts and cached values.
59
+ *
60
+ * @param graph - The graph to profile.
61
+ * @param opts - Optional configuration.
62
+ * @returns Aggregate profile with per-node details and hotspots.
63
+ */
64
+ declare function graphProfile(graph: Graph, opts?: GraphProfileOptions): GraphProfileResult;
2
65
 
3
66
  /**
4
67
  * Reserved segment for meta companion paths: `nodeName::__meta__::metaKey` (GRAPHREFLY-SPEC §3.6).
@@ -189,10 +252,12 @@ type ObserveResult<T = unknown> = {
189
252
  readonly resolvedCount: number;
190
253
  /** All events in order. */
191
254
  readonly events: ObserveEvent[];
192
- /** True if COMPLETE received without prior ERROR. */
193
- readonly completedCleanly: boolean;
194
- /** True if ERROR received. */
195
- readonly errored: boolean;
255
+ /** True if any observed node sent COMPLETE without prior ERROR on that node. */
256
+ readonly anyCompletedCleanly: boolean;
257
+ /** True if any observed node sent ERROR. */
258
+ readonly anyErrored: boolean;
259
+ /** True if at least one COMPLETE received and no ERROR from any observed node. */
260
+ readonly completedWithoutErrors: boolean;
196
261
  /** Stop observing. */
197
262
  dispose(): void;
198
263
  /**
@@ -427,6 +492,14 @@ declare class Graph {
427
492
  describe(options?: GraphDescribeOptions): GraphDescribeOutput;
428
493
  private _collectSubgraphs;
429
494
  private _collectAllEdges;
495
+ /**
496
+ * Snapshot-based resource profile: per-node stats, orphan effect detection,
497
+ * memory hotspots. Zero runtime overhead — walks nodes on demand.
498
+ *
499
+ * @param opts - Optional `topN` for hotspot limit (default 10).
500
+ * @returns Aggregate profile with per-node details, hotspots, and orphan effects.
501
+ */
502
+ resourceProfile(opts?: GraphProfileOptions): GraphProfileResult;
430
503
  private _qualifyEdgeEndpoint;
431
504
  private _collectObserveTargets;
432
505
  private _appendMetaObserveTargets;
@@ -557,8 +630,9 @@ declare class Graph {
557
630
  /**
558
631
  * Debounced persistence wired to graph-wide observe stream (spec §3.8 auto-checkpoint).
559
632
  *
560
- * Checkpoint trigger uses {@link messageTier}: only batches containing tier >= 2 messages
561
- * schedule a save (`DATA`/`RESOLVED`/terminal/destruction), never pure tier-0/1 control waves.
633
+ * Checkpoint trigger uses {@link messageTier}: only batches containing tier >= 3 messages
634
+ * schedule a save (`DATA`/`RESOLVED`/terminal/destruction), never pure tier-0/1/2 control
635
+ * waves (`START`/`DIRTY`/`INVALIDATE`/`PAUSE`/`RESUME`).
562
636
  */
563
637
  autoCheckpoint(adapter: AutoCheckpointAdapter, options?: GraphAutoCheckpointOptions): GraphAutoCheckpointHandle;
564
638
  /**
@@ -673,4 +747,4 @@ type ReachableOptions = {
673
747
  */
674
748
  declare function reachable(described: GraphDescribeOutput, from: string, direction: ReachableDirection, options?: ReachableOptions): string[];
675
749
 
676
- export { type AutoCheckpointAdapter as A, type DescribeFilter as D, Graph as G, type ObserveDetail as O, type ReachableDirection as R, type TraceEntry as T, type GraphOptions as a, type GraphAutoCheckpointHandle as b, type GraphAutoCheckpointOptions as c, GRAPH_META_SEGMENT as d, type GraphActorOptions as e, type GraphCheckpointRecord as f, type GraphDescribeOptions as g, type GraphDescribeOutput as h, type GraphDiagramDirection as i, type GraphDiagramOptions as j, type GraphDiffChange as k, type GraphDiffResult as l, type GraphDumpOptions as m, type GraphFactoryContext as n, type GraphNodeFactory as o, type GraphObserveAll as p, type GraphObserveOne as q, type GraphPersistSnapshot as r, type ObserveEvent as s, type ObserveOptions as t, type ObserveResult as u, type ObserveTheme as v, type ObserveThemeName as w, type ReachableOptions as x, reachable as y };
750
+ export { type AutoCheckpointAdapter as A, graphProfile as B, reachable as C, type DescribeFilter as D, Graph as G, type NodeProfile as N, type ObserveDetail as O, type ReachableDirection as R, type TraceEntry as T, type GraphOptions as a, type GraphAutoCheckpointHandle as b, type GraphAutoCheckpointOptions as c, type GraphProfileResult as d, type GraphProfileOptions as e, GRAPH_META_SEGMENT as f, type GraphActorOptions as g, type GraphCheckpointRecord as h, type GraphDescribeOptions as i, type GraphDescribeOutput as j, type GraphDiagramDirection as k, type GraphDiagramOptions as l, type GraphDiffChange as m, type GraphDiffResult as n, type GraphDumpOptions as o, type GraphFactoryContext as p, type GraphNodeFactory as q, type GraphObserveAll as r, type GraphObserveOne as s, type GraphPersistSnapshot as t, type ObserveEvent as u, type ObserveOptions as v, type ObserveResult as w, type ObserveTheme as x, type ObserveThemeName as y, type ReachableOptions as z };
@@ -1,4 +1,67 @@
1
- import { j as DescribeNodeOutput, h as DescribeDetail, i as DescribeField, N as Node, y as VersioningLevel, A as Actor, m as Messages, p as NodeSink } from './meta-npl5b97j.cjs';
1
+ import { i as DescribeNodeOutput, g as DescribeDetail, h as DescribeField, N as Node, y as VersioningLevel, A as Actor, l as Messages, o as NodeSink } from './meta-BnG7XAaE.js';
2
+
3
+ /**
4
+ * Graph profiling and inspection utilities.
5
+ *
6
+ * Provides per-node memory estimation, connectivity stats, and hotspot
7
+ * detection. Non-invasive — reads from `describe()` and node internals
8
+ * without modifying state.
9
+ *
10
+ * @module
11
+ */
12
+
13
+ /** Per-node profile entry. */
14
+ interface NodeProfile {
15
+ /** Qualified path within the graph. */
16
+ path: string;
17
+ /** Node type (state, derived, producer, effect). */
18
+ type: string;
19
+ /** Node status (disconnected, dirty, settled, errored, completed). */
20
+ status: string;
21
+ /** Approximate retained bytes for the node's cached value. */
22
+ valueSizeBytes: number;
23
+ /** Number of downstream subscribers (sinks). */
24
+ subscriberCount: number;
25
+ /** Number of upstream dependencies. */
26
+ depCount: number;
27
+ /** True if this is an effect node with no external subscribers (potential leak). */
28
+ isOrphanEffect: boolean;
29
+ }
30
+ /** Aggregate graph profile. */
31
+ interface GraphProfileResult {
32
+ /** Total node count. */
33
+ nodeCount: number;
34
+ /** Total edge count. */
35
+ edgeCount: number;
36
+ /** Subgraph count. */
37
+ subgraphCount: number;
38
+ /** All node profiles. */
39
+ nodes: NodeProfile[];
40
+ /** Total approximate value memory across all nodes. */
41
+ totalValueSizeBytes: number;
42
+ /** Nodes sorted by valueSizeBytes descending (top N). */
43
+ hotspots: NodeProfile[];
44
+ /** Effect nodes with no external subscribers (potential leaks). */
45
+ orphanEffects: NodeProfile[];
46
+ }
47
+ /** Options for {@link graphProfile}. */
48
+ interface GraphProfileOptions {
49
+ /** Limit hotspot list (default 10). */
50
+ topN?: number;
51
+ /** Include subgraph nodes recursively (default true). */
52
+ recursive?: boolean;
53
+ }
54
+ /**
55
+ * Profile a graph's memory and connectivity characteristics.
56
+ *
57
+ * Uses `describe({ detail: "standard" })` for node metadata and direct
58
+ * `NodeImpl` access for subscriber counts and cached values.
59
+ *
60
+ * @param graph - The graph to profile.
61
+ * @param opts - Optional configuration.
62
+ * @returns Aggregate profile with per-node details and hotspots.
63
+ */
64
+ declare function graphProfile(graph: Graph, opts?: GraphProfileOptions): GraphProfileResult;
2
65
 
3
66
  /**
4
67
  * Reserved segment for meta companion paths: `nodeName::__meta__::metaKey` (GRAPHREFLY-SPEC §3.6).
@@ -189,10 +252,12 @@ type ObserveResult<T = unknown> = {
189
252
  readonly resolvedCount: number;
190
253
  /** All events in order. */
191
254
  readonly events: ObserveEvent[];
192
- /** True if COMPLETE received without prior ERROR. */
193
- readonly completedCleanly: boolean;
194
- /** True if ERROR received. */
195
- readonly errored: boolean;
255
+ /** True if any observed node sent COMPLETE without prior ERROR on that node. */
256
+ readonly anyCompletedCleanly: boolean;
257
+ /** True if any observed node sent ERROR. */
258
+ readonly anyErrored: boolean;
259
+ /** True if at least one COMPLETE received and no ERROR from any observed node. */
260
+ readonly completedWithoutErrors: boolean;
196
261
  /** Stop observing. */
197
262
  dispose(): void;
198
263
  /**
@@ -427,6 +492,14 @@ declare class Graph {
427
492
  describe(options?: GraphDescribeOptions): GraphDescribeOutput;
428
493
  private _collectSubgraphs;
429
494
  private _collectAllEdges;
495
+ /**
496
+ * Snapshot-based resource profile: per-node stats, orphan effect detection,
497
+ * memory hotspots. Zero runtime overhead — walks nodes on demand.
498
+ *
499
+ * @param opts - Optional `topN` for hotspot limit (default 10).
500
+ * @returns Aggregate profile with per-node details, hotspots, and orphan effects.
501
+ */
502
+ resourceProfile(opts?: GraphProfileOptions): GraphProfileResult;
430
503
  private _qualifyEdgeEndpoint;
431
504
  private _collectObserveTargets;
432
505
  private _appendMetaObserveTargets;
@@ -557,8 +630,9 @@ declare class Graph {
557
630
  /**
558
631
  * Debounced persistence wired to graph-wide observe stream (spec §3.8 auto-checkpoint).
559
632
  *
560
- * Checkpoint trigger uses {@link messageTier}: only batches containing tier >= 2 messages
561
- * schedule a save (`DATA`/`RESOLVED`/terminal/destruction), never pure tier-0/1 control waves.
633
+ * Checkpoint trigger uses {@link messageTier}: only batches containing tier >= 3 messages
634
+ * schedule a save (`DATA`/`RESOLVED`/terminal/destruction), never pure tier-0/1/2 control
635
+ * waves (`START`/`DIRTY`/`INVALIDATE`/`PAUSE`/`RESUME`).
562
636
  */
563
637
  autoCheckpoint(adapter: AutoCheckpointAdapter, options?: GraphAutoCheckpointOptions): GraphAutoCheckpointHandle;
564
638
  /**
@@ -673,4 +747,4 @@ type ReachableOptions = {
673
747
  */
674
748
  declare function reachable(described: GraphDescribeOutput, from: string, direction: ReachableDirection, options?: ReachableOptions): string[];
675
749
 
676
- export { type AutoCheckpointAdapter as A, type DescribeFilter as D, Graph as G, type ObserveDetail as O, type ReachableDirection as R, type TraceEntry as T, type GraphOptions as a, type GraphAutoCheckpointHandle as b, type GraphAutoCheckpointOptions as c, GRAPH_META_SEGMENT as d, type GraphActorOptions as e, type GraphCheckpointRecord as f, type GraphDescribeOptions as g, type GraphDescribeOutput as h, type GraphDiagramDirection as i, type GraphDiagramOptions as j, type GraphDiffChange as k, type GraphDiffResult as l, type GraphDumpOptions as m, type GraphFactoryContext as n, type GraphNodeFactory as o, type GraphObserveAll as p, type GraphObserveOne as q, type GraphPersistSnapshot as r, type ObserveEvent as s, type ObserveOptions as t, type ObserveResult as u, type ObserveTheme as v, type ObserveThemeName as w, type ReachableOptions as x, reachable as y };
750
+ export { type AutoCheckpointAdapter as A, graphProfile as B, reachable as C, type DescribeFilter as D, Graph as G, type NodeProfile as N, type ObserveDetail as O, type ReachableDirection as R, type TraceEntry as T, type GraphOptions as a, type GraphAutoCheckpointHandle as b, type GraphAutoCheckpointOptions as c, type GraphProfileResult as d, type GraphProfileOptions as e, GRAPH_META_SEGMENT as f, type GraphActorOptions as g, type GraphCheckpointRecord as h, type GraphDescribeOptions as i, type GraphDescribeOutput as j, type GraphDiagramDirection as k, type GraphDiagramOptions as l, type GraphDiffChange as m, type GraphDiffResult as n, type GraphDumpOptions as o, type GraphFactoryContext as p, type GraphNodeFactory as q, type GraphObserveAll as r, type GraphObserveOne as s, type GraphPersistSnapshot as t, type ObserveEvent as u, type ObserveOptions as v, type ObserveResult as w, type ObserveTheme as x, type ObserveThemeName as y, type ReachableOptions as z };
@@ -1,5 +1,5 @@
1
- import { N as Node } from './meta-npl5b97j.js';
2
- import { G as Graph } from './graph-gISB9n3n.js';
1
+ import { N as Node } from './meta-BnG7XAaE.js';
2
+ import { G as Graph } from './graph-mILUUqW8.js';
3
3
 
4
4
  /** Pluggable measurement backend. */
5
5
  interface MeasurementAdapter {
@@ -1,4 +1,4 @@
1
- import { r as GraphPersistSnapshot, G as Graph, A as AutoCheckpointAdapter, D as DescribeFilter, d as GRAPH_META_SEGMENT, e as GraphActorOptions, b as GraphAutoCheckpointHandle, c as GraphAutoCheckpointOptions, f as GraphCheckpointRecord, g as GraphDescribeOptions, h as GraphDescribeOutput, i as GraphDiagramDirection, j as GraphDiagramOptions, k as GraphDiffChange, l as GraphDiffResult, m as GraphDumpOptions, n as GraphFactoryContext, o as GraphNodeFactory, p as GraphObserveAll, q as GraphObserveOne, a as GraphOptions, O as ObserveDetail, s as ObserveEvent, t as ObserveOptions, u as ObserveResult, v as ObserveTheme, w as ObserveThemeName, R as ReachableDirection, x as ReachableOptions, T as TraceEntry, y as reachable } from './graph-gISB9n3n.js';
1
+ import { t as GraphPersistSnapshot, A as AutoCheckpointAdapter, D as DescribeFilter, f as GRAPH_META_SEGMENT, G as Graph, g as GraphActorOptions, b as GraphAutoCheckpointHandle, c as GraphAutoCheckpointOptions, h as GraphCheckpointRecord, i as GraphDescribeOptions, j as GraphDescribeOutput, k as GraphDiagramDirection, l as GraphDiagramOptions, m as GraphDiffChange, n as GraphDiffResult, o as GraphDumpOptions, p as GraphFactoryContext, q as GraphNodeFactory, r as GraphObserveAll, s as GraphObserveOne, a as GraphOptions, e as GraphProfileOptions, d as GraphProfileResult, N as NodeProfile, O as ObserveDetail, u as ObserveEvent, v as ObserveOptions, w as ObserveResult, x as ObserveTheme, y as ObserveThemeName, R as ReachableDirection, z as ReachableOptions, T as TraceEntry, B as graphProfile, C as reachable } from './graph-mILUUqW8.js';
2
2
 
3
3
  /**
4
4
  * GraphCodec — pluggable serialization for graph snapshots (Phase 8.6).
@@ -178,65 +178,6 @@ declare function negotiateCodec(localPreference: readonly GraphCodec[], remoteCo
178
178
  */
179
179
  declare function replayWAL(entries: readonly WALEntry[]): GraphPersistSnapshot;
180
180
 
181
- /**
182
- * Graph profiling and inspection utilities.
183
- *
184
- * Provides per-node memory estimation, connectivity stats, and hotspot
185
- * detection. Non-invasive — reads from `describe()` and node internals
186
- * without modifying state.
187
- *
188
- * @module
189
- */
190
-
191
- /** Per-node profile entry. */
192
- interface NodeProfile {
193
- /** Qualified path within the graph. */
194
- path: string;
195
- /** Node type (state, derived, producer, effect). */
196
- type: string;
197
- /** Node status (disconnected, dirty, settled, errored, completed). */
198
- status: string;
199
- /** Approximate retained bytes for the node's cached value. */
200
- valueSizeBytes: number;
201
- /** Number of downstream subscribers (sinks). */
202
- subscriberCount: number;
203
- /** Number of upstream dependencies. */
204
- depCount: number;
205
- }
206
- /** Aggregate graph profile. */
207
- interface GraphProfileResult {
208
- /** Total node count. */
209
- nodeCount: number;
210
- /** Total edge count. */
211
- edgeCount: number;
212
- /** Subgraph count. */
213
- subgraphCount: number;
214
- /** All node profiles. */
215
- nodes: NodeProfile[];
216
- /** Total approximate value memory across all nodes. */
217
- totalValueSizeBytes: number;
218
- /** Nodes sorted by valueSizeBytes descending (top N). */
219
- hotspots: NodeProfile[];
220
- }
221
- /** Options for {@link graphProfile}. */
222
- interface GraphProfileOptions {
223
- /** Limit hotspot list (default 10). */
224
- topN?: number;
225
- /** Include subgraph nodes recursively (default true). */
226
- recursive?: boolean;
227
- }
228
- /**
229
- * Profile a graph's memory and connectivity characteristics.
230
- *
231
- * Uses `describe({ detail: "standard" })` for node metadata and direct
232
- * `NodeImpl` access for subscriber counts and cached values.
233
- *
234
- * @param graph - The graph to profile.
235
- * @param opts - Optional configuration.
236
- * @returns Aggregate profile with per-node details and hotspots.
237
- */
238
- declare function graphProfile(graph: Graph, opts?: GraphProfileOptions): GraphProfileResult;
239
-
240
181
  /**
241
182
  * Approximate in-memory size estimation for arbitrary JS values.
242
183
  *
@@ -287,11 +228,11 @@ declare const index_GraphObserveAll: typeof GraphObserveAll;
287
228
  declare const index_GraphObserveOne: typeof GraphObserveOne;
288
229
  declare const index_GraphOptions: typeof GraphOptions;
289
230
  declare const index_GraphPersistSnapshot: typeof GraphPersistSnapshot;
290
- type index_GraphProfileOptions = GraphProfileOptions;
291
- type index_GraphProfileResult = GraphProfileResult;
231
+ declare const index_GraphProfileOptions: typeof GraphProfileOptions;
232
+ declare const index_GraphProfileResult: typeof GraphProfileResult;
292
233
  declare const index_JsonCodec: typeof JsonCodec;
293
234
  type index_LazyGraphCodec = LazyGraphCodec;
294
- type index_NodeProfile = NodeProfile;
235
+ declare const index_NodeProfile: typeof NodeProfile;
295
236
  declare const index_ObserveDetail: typeof ObserveDetail;
296
237
  declare const index_ObserveEvent: typeof ObserveEvent;
297
238
  declare const index_ObserveOptions: typeof ObserveOptions;
@@ -310,7 +251,7 @@ declare const index_reachable: typeof reachable;
310
251
  declare const index_replayWAL: typeof replayWAL;
311
252
  declare const index_sizeof: typeof sizeof;
312
253
  declare namespace index {
313
- export { index_AutoCheckpointAdapter as AutoCheckpointAdapter, type index_DeltaCheckpoint as DeltaCheckpoint, index_DescribeFilter as DescribeFilter, type index_EvictedSubgraphInfo as EvictedSubgraphInfo, type index_EvictionPolicy as EvictionPolicy, index_GRAPH_META_SEGMENT as GRAPH_META_SEGMENT, index_Graph as Graph, index_GraphActorOptions as GraphActorOptions, index_GraphAutoCheckpointHandle as GraphAutoCheckpointHandle, index_GraphAutoCheckpointOptions as GraphAutoCheckpointOptions, index_GraphCheckpointRecord as GraphCheckpointRecord, type index_GraphCodec as GraphCodec, index_GraphDescribeOptions as GraphDescribeOptions, index_GraphDescribeOutput as GraphDescribeOutput, index_GraphDiagramDirection as GraphDiagramDirection, index_GraphDiagramOptions as GraphDiagramOptions, index_GraphDiffChange as GraphDiffChange, index_GraphDiffResult as GraphDiffResult, index_GraphDumpOptions as GraphDumpOptions, index_GraphFactoryContext as GraphFactoryContext, index_GraphNodeFactory as GraphNodeFactory, index_GraphObserveAll as GraphObserveAll, index_GraphObserveOne as GraphObserveOne, index_GraphOptions as GraphOptions, index_GraphPersistSnapshot as GraphPersistSnapshot, type index_GraphProfileOptions as GraphProfileOptions, type index_GraphProfileResult as GraphProfileResult, index_JsonCodec as JsonCodec, type index_LazyGraphCodec as LazyGraphCodec, type index_NodeProfile as NodeProfile, index_ObserveDetail as ObserveDetail, index_ObserveEvent as ObserveEvent, index_ObserveOptions as ObserveOptions, index_ObserveResult as ObserveResult, index_ObserveTheme as ObserveTheme, index_ObserveThemeName as ObserveThemeName, index_ReachableDirection as ReachableDirection, index_ReachableOptions as ReachableOptions, index_TraceEntry as TraceEntry, type index_WALEntry as WALEntry, index_createDagCborCodec as createDagCborCodec, index_createDagCborZstdCodec as createDagCborZstdCodec, index_graphProfile as graphProfile, index_negotiateCodec as negotiateCodec, index_reachable as reachable, index_replayWAL as replayWAL, index_sizeof as sizeof };
254
+ export { index_AutoCheckpointAdapter as AutoCheckpointAdapter, type index_DeltaCheckpoint as DeltaCheckpoint, index_DescribeFilter as DescribeFilter, type index_EvictedSubgraphInfo as EvictedSubgraphInfo, type index_EvictionPolicy as EvictionPolicy, index_GRAPH_META_SEGMENT as GRAPH_META_SEGMENT, index_Graph as Graph, index_GraphActorOptions as GraphActorOptions, index_GraphAutoCheckpointHandle as GraphAutoCheckpointHandle, index_GraphAutoCheckpointOptions as GraphAutoCheckpointOptions, index_GraphCheckpointRecord as GraphCheckpointRecord, type index_GraphCodec as GraphCodec, index_GraphDescribeOptions as GraphDescribeOptions, index_GraphDescribeOutput as GraphDescribeOutput, index_GraphDiagramDirection as GraphDiagramDirection, index_GraphDiagramOptions as GraphDiagramOptions, index_GraphDiffChange as GraphDiffChange, index_GraphDiffResult as GraphDiffResult, index_GraphDumpOptions as GraphDumpOptions, index_GraphFactoryContext as GraphFactoryContext, index_GraphNodeFactory as GraphNodeFactory, index_GraphObserveAll as GraphObserveAll, index_GraphObserveOne as GraphObserveOne, index_GraphOptions as GraphOptions, index_GraphPersistSnapshot as GraphPersistSnapshot, index_GraphProfileOptions as GraphProfileOptions, index_GraphProfileResult as GraphProfileResult, index_JsonCodec as JsonCodec, type index_LazyGraphCodec as LazyGraphCodec, index_NodeProfile as NodeProfile, index_ObserveDetail as ObserveDetail, index_ObserveEvent as ObserveEvent, index_ObserveOptions as ObserveOptions, index_ObserveResult as ObserveResult, index_ObserveTheme as ObserveTheme, index_ObserveThemeName as ObserveThemeName, index_ReachableDirection as ReachableDirection, index_ReachableOptions as ReachableOptions, index_TraceEntry as TraceEntry, type index_WALEntry as WALEntry, index_createDagCborCodec as createDagCborCodec, index_createDagCborZstdCodec as createDagCborZstdCodec, index_graphProfile as graphProfile, index_negotiateCodec as negotiateCodec, index_reachable as reachable, index_replayWAL as replayWAL, index_sizeof as sizeof };
314
255
  }
315
256
 
316
- export { type DeltaCheckpoint as D, type EvictedSubgraphInfo as E, type GraphProfileResult as G, JsonCodec as J, type LazyGraphCodec as L, type NodeProfile as N, type WALEntry as W, type GraphProfileOptions as a, type EvictionPolicy as b, type GraphCodec as c, createDagCborCodec as d, createDagCborZstdCodec as e, graphProfile as g, index as i, negotiateCodec as n, replayWAL as r, sizeof as s };
257
+ export { type DeltaCheckpoint as D, type EvictedSubgraphInfo as E, type GraphCodec as G, JsonCodec as J, type LazyGraphCodec as L, type WALEntry as W, type EvictionPolicy as a, createDagCborZstdCodec as b, createDagCborCodec as c, index as i, negotiateCodec as n, replayWAL as r, sizeof as s };