@graphrefly/graphrefly 0.6.0 → 0.8.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.
- package/README.md +30 -14
- package/dist/{chunk-HP7OKEOE.js → chunk-A2AJJOSJ.js} +3 -3
- package/dist/chunk-A2AJJOSJ.js.map +1 -0
- package/dist/{chunk-CP6MNKAA.js → chunk-E7OH6ZAZ.js} +10 -4
- package/dist/{chunk-CP6MNKAA.js.map → chunk-E7OH6ZAZ.js.map} +1 -1
- package/dist/chunk-LR2CLSEF.js +106 -0
- package/dist/chunk-LR2CLSEF.js.map +1 -0
- package/dist/{chunk-5X3LAO3B.js → chunk-QTZSBQGJ.js} +79 -20
- package/dist/chunk-QTZSBQGJ.js.map +1 -0
- package/dist/{chunk-V3UACY6A.js → chunk-TZLX4KIT.js} +790 -203
- package/dist/chunk-TZLX4KIT.js.map +1 -0
- package/dist/{chunk-QW7H3ICI.js → chunk-UCW3VWMN.js} +4 -4
- package/dist/{chunk-6W5SGIGB.js → chunk-WYI7YW54.js} +142 -30
- package/dist/chunk-WYI7YW54.js.map +1 -0
- package/dist/chunk-WZ2Z2CRV.js +32 -0
- package/dist/chunk-WZ2Z2CRV.js.map +1 -0
- package/dist/{chunk-Z4Y4FMQN.js → chunk-XCZPGOVP.js} +7 -7
- package/dist/{chunk-KWXPDASV.js → chunk-YWTP2XRJ.js} +2 -2
- package/dist/compat/nestjs/index.cjs +268 -61
- package/dist/compat/nestjs/index.cjs.map +1 -1
- package/dist/compat/nestjs/index.d.cts +4 -4
- package/dist/compat/nestjs/index.d.ts +4 -4
- package/dist/compat/nestjs/index.js +8 -7
- package/dist/core/index.cjs +163 -35
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +10 -4
- package/dist/extra/index.cjs +892 -221
- package/dist/extra/index.cjs.map +1 -1
- package/dist/extra/index.d.cts +4 -4
- package/dist/extra/index.d.ts +4 -4
- package/dist/extra/index.js +22 -3
- package/dist/graph/index.cjs +268 -61
- package/dist/graph/index.cjs.map +1 -1
- package/dist/graph/index.d.cts +3 -3
- package/dist/graph/index.d.ts +3 -3
- package/dist/graph/index.js +4 -4
- package/dist/{graph-CL_ZDAj9.d.cts → graph-DqTICAY2.d.cts} +69 -12
- package/dist/{graph-D18qmsNm.d.ts → graph-X9uwnD_z.d.ts} +69 -12
- package/dist/{index-C3BMRmmp.d.cts → index-3U0WxdD-.d.cts} +3 -3
- package/dist/{index-Bk_idZm1.d.cts → index-BP1t_38S.d.cts} +406 -61
- package/dist/{index-BtK55IE2.d.ts → index-BPCeYDS4.d.ts} +4 -2
- package/dist/{index-Bvy_6CaN.d.ts → index-BVG5pjin.d.ts} +50 -5
- package/dist/{index-C5mqLhMX.d.cts → index-BYEgosAX.d.cts} +50 -5
- package/dist/{index-D_geH2Bm.d.cts → index-BYa2YMat.d.cts} +3 -3
- package/dist/{index-CP_QvbWu.d.ts → index-DLO8wnYU.d.ts} +3 -3
- package/dist/{index-B7eOdgEx.d.ts → index-DMv1Etbi.d.ts} +3 -3
- package/dist/{index-BvhgZRHK.d.cts → index-DbwgQ4Cw.d.cts} +4 -2
- package/dist/{index-B2jmzVxL.d.ts → index-a5gHmH5b.d.ts} +406 -61
- package/dist/index.cjs +2966 -1790
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +112 -14
- package/dist/index.d.ts +112 -14
- package/dist/index.js +385 -20
- package/dist/index.js.map +1 -1
- package/dist/{meta-BsF6Sag9.d.cts → meta-BJEU8fYz.d.cts} +31 -4
- package/dist/{meta-BsF6Sag9.d.ts → meta-BJEU8fYz.d.ts} +31 -4
- package/dist/patterns/reactive-layout/index.cjs +268 -61
- package/dist/patterns/reactive-layout/index.cjs.map +1 -1
- package/dist/patterns/reactive-layout/index.d.cts +3 -3
- package/dist/patterns/reactive-layout/index.d.ts +3 -3
- package/dist/patterns/reactive-layout/index.js +4 -4
- package/dist/{reactive-log-BfvfNWQh.d.cts → reactive-log-BfX6bOSZ.d.cts} +2 -2
- package/dist/{reactive-log-ohLmTXoZ.d.ts → reactive-log-RhgIog2Z.d.ts} +2 -2
- package/package.json +29 -18
- package/dist/chunk-5X3LAO3B.js.map +0 -1
- package/dist/chunk-6W5SGIGB.js.map +0 -1
- package/dist/chunk-HP7OKEOE.js.map +0 -1
- package/dist/chunk-O3PI7W45.js +0 -68
- package/dist/chunk-O3PI7W45.js.map +0 -1
- package/dist/chunk-V3UACY6A.js.map +0 -1
- /package/dist/{chunk-QW7H3ICI.js.map → chunk-UCW3VWMN.js.map} +0 -0
- /package/dist/{chunk-Z4Y4FMQN.js.map → chunk-XCZPGOVP.js.map} +0 -0
- /package/dist/{chunk-KWXPDASV.js.map → chunk-YWTP2XRJ.js.map} +0 -0
package/dist/graph/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
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 } from '../index-
|
|
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
|
|
3
|
-
import '../meta-
|
|
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 } from '../index-DbwgQ4Cw.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, s as GraphSpyHandle, t as GraphSpyOptions, u as GraphSpyTheme, v as GraphSpyThemeName, O as ObserveDetail, w as ObserveEvent, x as ObserveOptions, y as ObserveResult, R as ReachableDirection, z as ReachableOptions, T as TraceEntry, B as reachable } from '../graph-DqTICAY2.cjs';
|
|
3
|
+
import '../meta-BJEU8fYz.cjs';
|
package/dist/graph/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
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 } from '../index-
|
|
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
|
|
3
|
-
import '../meta-
|
|
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 } from '../index-BPCeYDS4.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, s as GraphSpyHandle, t as GraphSpyOptions, u as GraphSpyTheme, v as GraphSpyThemeName, O as ObserveDetail, w as ObserveEvent, x as ObserveOptions, y as ObserveResult, R as ReachableDirection, z as ReachableOptions, T as TraceEntry, B as reachable } from '../graph-X9uwnD_z.js';
|
|
3
|
+
import '../meta-BJEU8fYz.js';
|
package/dist/graph/index.js
CHANGED
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
createDagCborZstdCodec,
|
|
5
5
|
negotiateCodec,
|
|
6
6
|
replayWAL
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-A2AJJOSJ.js";
|
|
8
8
|
import {
|
|
9
9
|
GRAPH_META_SEGMENT,
|
|
10
10
|
Graph,
|
|
11
11
|
reachable
|
|
12
|
-
} from "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
12
|
+
} from "../chunk-WYI7YW54.js";
|
|
13
|
+
import "../chunk-LR2CLSEF.js";
|
|
14
|
+
import "../chunk-QTZSBQGJ.js";
|
|
15
15
|
export {
|
|
16
16
|
GRAPH_META_SEGMENT,
|
|
17
17
|
Graph,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h as DescribeNodeOutput, f as DescribeDetail, g as DescribeField, N as Node, w as VersioningLevel, A as Actor, k as Messages, n as NodeSink } from './meta-BJEU8fYz.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Reserved segment for meta companion paths: `nodeName::__meta__::metaKey` (GRAPHREFLY-SPEC §3.6).
|
|
@@ -28,6 +28,35 @@ type GraphActorOptions = {
|
|
|
28
28
|
*/
|
|
29
29
|
internal?: boolean;
|
|
30
30
|
};
|
|
31
|
+
/** Options for {@link Graph.describe} (Phase 3.3b progressive disclosure). */
|
|
32
|
+
type GraphDescribeOptions = {
|
|
33
|
+
actor?: Actor;
|
|
34
|
+
/**
|
|
35
|
+
* Node filter. Filters operate on whatever fields the chosen `detail` level
|
|
36
|
+
* provides. For `metaHas` and `status` filters, use `detail: "standard"` or
|
|
37
|
+
* higher — at `"minimal"` those fields are absent and the filter silently
|
|
38
|
+
* excludes all nodes.
|
|
39
|
+
*/
|
|
40
|
+
filter?: DescribeFilter;
|
|
41
|
+
/**
|
|
42
|
+
* Detail level (Phase 3.3b). Default: `"minimal"`.
|
|
43
|
+
* - `"minimal"` — type + deps only
|
|
44
|
+
* - `"standard"` — type, status, value, deps, meta, versioning (`v`)
|
|
45
|
+
* - `"full"` — standard + guard, lastMutation
|
|
46
|
+
*/
|
|
47
|
+
detail?: DescribeDetail;
|
|
48
|
+
/**
|
|
49
|
+
* Explicit field selection (GraphQL-style). Overrides `detail` when provided.
|
|
50
|
+
* Dotted paths like `"meta.label"` select specific meta keys.
|
|
51
|
+
*/
|
|
52
|
+
fields?: DescribeField[];
|
|
53
|
+
/**
|
|
54
|
+
* Output format (Phase 3.3b).
|
|
55
|
+
* - `undefined` — normal describe output
|
|
56
|
+
* - `"spec"` — GraphSpec input format (no status, no value, deps as edges, type labels)
|
|
57
|
+
*/
|
|
58
|
+
format?: "spec";
|
|
59
|
+
};
|
|
31
60
|
/** JSON snapshot from {@link Graph.describe} (GRAPHREFLY-SPEC §3.6, Appendix B). */
|
|
32
61
|
type GraphDescribeOutput = {
|
|
33
62
|
name: string;
|
|
@@ -37,10 +66,16 @@ type GraphDescribeOutput = {
|
|
|
37
66
|
to: string;
|
|
38
67
|
}>;
|
|
39
68
|
subgraphs: string[];
|
|
69
|
+
/**
|
|
70
|
+
* Re-read the live graph with higher detail (Phase 3.3b).
|
|
71
|
+
* Returns a new `GraphDescribeOutput`; the original remains a snapshot.
|
|
72
|
+
* Present on live describe results; absent on deserialized snapshots.
|
|
73
|
+
*/
|
|
74
|
+
expand?: (detailOrFields: DescribeDetail | DescribeField[]) => GraphDescribeOutput;
|
|
40
75
|
};
|
|
41
76
|
/**
|
|
42
77
|
* Persisted graph snapshot: {@link GraphDescribeOutput} plus optional format version
|
|
43
|
-
* ({@link Graph.snapshot}, {@link Graph.restore}, {@link Graph.fromSnapshot}, {@link Graph.
|
|
78
|
+
* ({@link Graph.snapshot}, {@link Graph.restore}, {@link Graph.fromSnapshot}, {@link Graph.toObject},
|
|
44
79
|
* {@link Graph.toJSONString} — §3.8).
|
|
45
80
|
*/
|
|
46
81
|
type GraphPersistSnapshot = GraphDescribeOutput & {
|
|
@@ -55,8 +90,9 @@ type GraphFactoryContext = {
|
|
|
55
90
|
resolvedDeps: readonly Node[];
|
|
56
91
|
};
|
|
57
92
|
type GraphNodeFactory = (name: string, context: GraphFactoryContext) => Node;
|
|
93
|
+
/** @deprecated Use `CheckpointAdapter` from `extra/checkpoint` instead. */
|
|
58
94
|
type AutoCheckpointAdapter = {
|
|
59
|
-
save(data: unknown): void;
|
|
95
|
+
save(key: string, data: unknown): void;
|
|
60
96
|
};
|
|
61
97
|
type GraphCheckpointRecord = {
|
|
62
98
|
mode: "full";
|
|
@@ -105,6 +141,13 @@ type GraphObserveAll = {
|
|
|
105
141
|
/** Send messages upstream toward a specific observed node's sources (e.g. PAUSE/RESUME). */
|
|
106
142
|
up(path: string, messages: Messages): void;
|
|
107
143
|
};
|
|
144
|
+
/**
|
|
145
|
+
* Detail level for `observe()` progressive disclosure (Phase 3.3b).
|
|
146
|
+
* - `"minimal"` — DATA events only, no timestamps, no causal info.
|
|
147
|
+
* - `"standard"` — all message types (DATA, DIRTY, RESOLVED, COMPLETE, ERROR).
|
|
148
|
+
* - `"full"` — standard + timeline + causal + derived.
|
|
149
|
+
*/
|
|
150
|
+
type ObserveDetail = "minimal" | "standard" | "full";
|
|
108
151
|
/** Options for structured observation modes on {@link Graph.observe}. */
|
|
109
152
|
type ObserveOptions = {
|
|
110
153
|
actor?: Actor;
|
|
@@ -116,6 +159,12 @@ type ObserveOptions = {
|
|
|
116
159
|
timeline?: boolean;
|
|
117
160
|
/** Include per-evaluation dep snapshots for compute/derived nodes. */
|
|
118
161
|
derived?: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* Detail level (Phase 3.3b). Individual flags (`causal`, `timeline`, `derived`)
|
|
164
|
+
* override. `"full"` implies all three plus structured.
|
|
165
|
+
* `"minimal"` filters to DATA-only events.
|
|
166
|
+
*/
|
|
167
|
+
detail?: ObserveDetail;
|
|
119
168
|
};
|
|
120
169
|
/** Accumulated observation result (structured mode). */
|
|
121
170
|
type ObserveResult<T = unknown> = {
|
|
@@ -133,6 +182,11 @@ type ObserveResult<T = unknown> = {
|
|
|
133
182
|
readonly errored: boolean;
|
|
134
183
|
/** Stop observing. */
|
|
135
184
|
dispose(): void;
|
|
185
|
+
/**
|
|
186
|
+
* Resubscribe with higher detail (Phase 3.3b).
|
|
187
|
+
* Disposes current observation, returns new `ObserveResult` with merged options.
|
|
188
|
+
*/
|
|
189
|
+
expand(extra: Partial<Pick<ObserveOptions, "causal" | "timeline" | "derived">> | ObserveDetail): ObserveResult<T>;
|
|
136
190
|
};
|
|
137
191
|
/** A single event in the structured observation log. */
|
|
138
192
|
type ObserveEvent = {
|
|
@@ -374,10 +428,7 @@ declare class Graph {
|
|
|
374
428
|
* graph.describe({ filter: (n) => n.type === "state" }) // predicate filter
|
|
375
429
|
* ```
|
|
376
430
|
*/
|
|
377
|
-
describe(options?:
|
|
378
|
-
actor?: Actor;
|
|
379
|
-
filter?: DescribeFilter;
|
|
380
|
-
}): GraphDescribeOutput;
|
|
431
|
+
describe(options?: GraphDescribeOptions): GraphDescribeOutput;
|
|
381
432
|
private _collectSubgraphs;
|
|
382
433
|
private _collectAllEdges;
|
|
383
434
|
private _qualifyEdgeEndpoint;
|
|
@@ -464,18 +515,24 @@ declare class Graph {
|
|
|
464
515
|
*/
|
|
465
516
|
static fromSnapshot(data: GraphPersistSnapshot, build?: (g: Graph) => void): Graph;
|
|
466
517
|
/**
|
|
467
|
-
* Plain snapshot with **recursively sorted object keys** for deterministic serialization (§3.8).
|
|
518
|
+
* Plain snapshot object with **recursively sorted object keys** for deterministic serialization (§3.8).
|
|
468
519
|
*
|
|
469
520
|
* @remarks
|
|
470
|
-
* ECMAScript `JSON.stringify(graph)` invokes this method; it must return a plain object, not an
|
|
471
|
-
* already-stringified JSON string (otherwise the graph would be double-encoded).
|
|
472
521
|
* For a single UTF-8 string with a trailing newline (convenient for git), use {@link Graph.toJSONString}.
|
|
473
522
|
*
|
|
474
523
|
* @returns Same object as {@link Graph.snapshot}.
|
|
475
524
|
*/
|
|
525
|
+
toObject(): GraphPersistSnapshot;
|
|
526
|
+
/**
|
|
527
|
+
* ECMAScript `JSON.stringify` hook — delegates to {@link Graph.toObject}.
|
|
528
|
+
*
|
|
529
|
+
* @remarks
|
|
530
|
+
* Must return a plain object (not a string) so `JSON.stringify(graph)` works correctly
|
|
531
|
+
* without double-encoding.
|
|
532
|
+
*/
|
|
476
533
|
toJSON(): GraphPersistSnapshot;
|
|
477
534
|
/**
|
|
478
|
-
* Deterministic JSON **text**: `JSON.stringify` of {@link Graph.
|
|
535
|
+
* Deterministic JSON **text**: `JSON.stringify` of {@link Graph.toObject} plus a trailing newline (§3.8).
|
|
479
536
|
*
|
|
480
537
|
* @returns Stable string suitable for diffs.
|
|
481
538
|
*/
|
|
@@ -602,4 +659,4 @@ type ReachableOptions = {
|
|
|
602
659
|
*/
|
|
603
660
|
declare function reachable(described: GraphDescribeOutput, from: string, direction: ReachableDirection, options?: ReachableOptions): string[];
|
|
604
661
|
|
|
605
|
-
export { type AutoCheckpointAdapter as A, type DescribeFilter as D, Graph as G, type
|
|
662
|
+
export { type AutoCheckpointAdapter as A, reachable as B, 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 GraphSpyHandle as s, type GraphSpyOptions as t, type GraphSpyTheme as u, type GraphSpyThemeName as v, type ObserveEvent as w, type ObserveOptions as x, type ObserveResult as y, type ReachableOptions as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h as DescribeNodeOutput, f as DescribeDetail, g as DescribeField, N as Node, w as VersioningLevel, A as Actor, k as Messages, n as NodeSink } from './meta-BJEU8fYz.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Reserved segment for meta companion paths: `nodeName::__meta__::metaKey` (GRAPHREFLY-SPEC §3.6).
|
|
@@ -28,6 +28,35 @@ type GraphActorOptions = {
|
|
|
28
28
|
*/
|
|
29
29
|
internal?: boolean;
|
|
30
30
|
};
|
|
31
|
+
/** Options for {@link Graph.describe} (Phase 3.3b progressive disclosure). */
|
|
32
|
+
type GraphDescribeOptions = {
|
|
33
|
+
actor?: Actor;
|
|
34
|
+
/**
|
|
35
|
+
* Node filter. Filters operate on whatever fields the chosen `detail` level
|
|
36
|
+
* provides. For `metaHas` and `status` filters, use `detail: "standard"` or
|
|
37
|
+
* higher — at `"minimal"` those fields are absent and the filter silently
|
|
38
|
+
* excludes all nodes.
|
|
39
|
+
*/
|
|
40
|
+
filter?: DescribeFilter;
|
|
41
|
+
/**
|
|
42
|
+
* Detail level (Phase 3.3b). Default: `"minimal"`.
|
|
43
|
+
* - `"minimal"` — type + deps only
|
|
44
|
+
* - `"standard"` — type, status, value, deps, meta, versioning (`v`)
|
|
45
|
+
* - `"full"` — standard + guard, lastMutation
|
|
46
|
+
*/
|
|
47
|
+
detail?: DescribeDetail;
|
|
48
|
+
/**
|
|
49
|
+
* Explicit field selection (GraphQL-style). Overrides `detail` when provided.
|
|
50
|
+
* Dotted paths like `"meta.label"` select specific meta keys.
|
|
51
|
+
*/
|
|
52
|
+
fields?: DescribeField[];
|
|
53
|
+
/**
|
|
54
|
+
* Output format (Phase 3.3b).
|
|
55
|
+
* - `undefined` — normal describe output
|
|
56
|
+
* - `"spec"` — GraphSpec input format (no status, no value, deps as edges, type labels)
|
|
57
|
+
*/
|
|
58
|
+
format?: "spec";
|
|
59
|
+
};
|
|
31
60
|
/** JSON snapshot from {@link Graph.describe} (GRAPHREFLY-SPEC §3.6, Appendix B). */
|
|
32
61
|
type GraphDescribeOutput = {
|
|
33
62
|
name: string;
|
|
@@ -37,10 +66,16 @@ type GraphDescribeOutput = {
|
|
|
37
66
|
to: string;
|
|
38
67
|
}>;
|
|
39
68
|
subgraphs: string[];
|
|
69
|
+
/**
|
|
70
|
+
* Re-read the live graph with higher detail (Phase 3.3b).
|
|
71
|
+
* Returns a new `GraphDescribeOutput`; the original remains a snapshot.
|
|
72
|
+
* Present on live describe results; absent on deserialized snapshots.
|
|
73
|
+
*/
|
|
74
|
+
expand?: (detailOrFields: DescribeDetail | DescribeField[]) => GraphDescribeOutput;
|
|
40
75
|
};
|
|
41
76
|
/**
|
|
42
77
|
* Persisted graph snapshot: {@link GraphDescribeOutput} plus optional format version
|
|
43
|
-
* ({@link Graph.snapshot}, {@link Graph.restore}, {@link Graph.fromSnapshot}, {@link Graph.
|
|
78
|
+
* ({@link Graph.snapshot}, {@link Graph.restore}, {@link Graph.fromSnapshot}, {@link Graph.toObject},
|
|
44
79
|
* {@link Graph.toJSONString} — §3.8).
|
|
45
80
|
*/
|
|
46
81
|
type GraphPersistSnapshot = GraphDescribeOutput & {
|
|
@@ -55,8 +90,9 @@ type GraphFactoryContext = {
|
|
|
55
90
|
resolvedDeps: readonly Node[];
|
|
56
91
|
};
|
|
57
92
|
type GraphNodeFactory = (name: string, context: GraphFactoryContext) => Node;
|
|
93
|
+
/** @deprecated Use `CheckpointAdapter` from `extra/checkpoint` instead. */
|
|
58
94
|
type AutoCheckpointAdapter = {
|
|
59
|
-
save(data: unknown): void;
|
|
95
|
+
save(key: string, data: unknown): void;
|
|
60
96
|
};
|
|
61
97
|
type GraphCheckpointRecord = {
|
|
62
98
|
mode: "full";
|
|
@@ -105,6 +141,13 @@ type GraphObserveAll = {
|
|
|
105
141
|
/** Send messages upstream toward a specific observed node's sources (e.g. PAUSE/RESUME). */
|
|
106
142
|
up(path: string, messages: Messages): void;
|
|
107
143
|
};
|
|
144
|
+
/**
|
|
145
|
+
* Detail level for `observe()` progressive disclosure (Phase 3.3b).
|
|
146
|
+
* - `"minimal"` — DATA events only, no timestamps, no causal info.
|
|
147
|
+
* - `"standard"` — all message types (DATA, DIRTY, RESOLVED, COMPLETE, ERROR).
|
|
148
|
+
* - `"full"` — standard + timeline + causal + derived.
|
|
149
|
+
*/
|
|
150
|
+
type ObserveDetail = "minimal" | "standard" | "full";
|
|
108
151
|
/** Options for structured observation modes on {@link Graph.observe}. */
|
|
109
152
|
type ObserveOptions = {
|
|
110
153
|
actor?: Actor;
|
|
@@ -116,6 +159,12 @@ type ObserveOptions = {
|
|
|
116
159
|
timeline?: boolean;
|
|
117
160
|
/** Include per-evaluation dep snapshots for compute/derived nodes. */
|
|
118
161
|
derived?: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* Detail level (Phase 3.3b). Individual flags (`causal`, `timeline`, `derived`)
|
|
164
|
+
* override. `"full"` implies all three plus structured.
|
|
165
|
+
* `"minimal"` filters to DATA-only events.
|
|
166
|
+
*/
|
|
167
|
+
detail?: ObserveDetail;
|
|
119
168
|
};
|
|
120
169
|
/** Accumulated observation result (structured mode). */
|
|
121
170
|
type ObserveResult<T = unknown> = {
|
|
@@ -133,6 +182,11 @@ type ObserveResult<T = unknown> = {
|
|
|
133
182
|
readonly errored: boolean;
|
|
134
183
|
/** Stop observing. */
|
|
135
184
|
dispose(): void;
|
|
185
|
+
/**
|
|
186
|
+
* Resubscribe with higher detail (Phase 3.3b).
|
|
187
|
+
* Disposes current observation, returns new `ObserveResult` with merged options.
|
|
188
|
+
*/
|
|
189
|
+
expand(extra: Partial<Pick<ObserveOptions, "causal" | "timeline" | "derived">> | ObserveDetail): ObserveResult<T>;
|
|
136
190
|
};
|
|
137
191
|
/** A single event in the structured observation log. */
|
|
138
192
|
type ObserveEvent = {
|
|
@@ -374,10 +428,7 @@ declare class Graph {
|
|
|
374
428
|
* graph.describe({ filter: (n) => n.type === "state" }) // predicate filter
|
|
375
429
|
* ```
|
|
376
430
|
*/
|
|
377
|
-
describe(options?:
|
|
378
|
-
actor?: Actor;
|
|
379
|
-
filter?: DescribeFilter;
|
|
380
|
-
}): GraphDescribeOutput;
|
|
431
|
+
describe(options?: GraphDescribeOptions): GraphDescribeOutput;
|
|
381
432
|
private _collectSubgraphs;
|
|
382
433
|
private _collectAllEdges;
|
|
383
434
|
private _qualifyEdgeEndpoint;
|
|
@@ -464,18 +515,24 @@ declare class Graph {
|
|
|
464
515
|
*/
|
|
465
516
|
static fromSnapshot(data: GraphPersistSnapshot, build?: (g: Graph) => void): Graph;
|
|
466
517
|
/**
|
|
467
|
-
* Plain snapshot with **recursively sorted object keys** for deterministic serialization (§3.8).
|
|
518
|
+
* Plain snapshot object with **recursively sorted object keys** for deterministic serialization (§3.8).
|
|
468
519
|
*
|
|
469
520
|
* @remarks
|
|
470
|
-
* ECMAScript `JSON.stringify(graph)` invokes this method; it must return a plain object, not an
|
|
471
|
-
* already-stringified JSON string (otherwise the graph would be double-encoded).
|
|
472
521
|
* For a single UTF-8 string with a trailing newline (convenient for git), use {@link Graph.toJSONString}.
|
|
473
522
|
*
|
|
474
523
|
* @returns Same object as {@link Graph.snapshot}.
|
|
475
524
|
*/
|
|
525
|
+
toObject(): GraphPersistSnapshot;
|
|
526
|
+
/**
|
|
527
|
+
* ECMAScript `JSON.stringify` hook — delegates to {@link Graph.toObject}.
|
|
528
|
+
*
|
|
529
|
+
* @remarks
|
|
530
|
+
* Must return a plain object (not a string) so `JSON.stringify(graph)` works correctly
|
|
531
|
+
* without double-encoding.
|
|
532
|
+
*/
|
|
476
533
|
toJSON(): GraphPersistSnapshot;
|
|
477
534
|
/**
|
|
478
|
-
* Deterministic JSON **text**: `JSON.stringify` of {@link Graph.
|
|
535
|
+
* Deterministic JSON **text**: `JSON.stringify` of {@link Graph.toObject} plus a trailing newline (§3.8).
|
|
479
536
|
*
|
|
480
537
|
* @returns Stable string suitable for diffs.
|
|
481
538
|
*/
|
|
@@ -602,4 +659,4 @@ type ReachableOptions = {
|
|
|
602
659
|
*/
|
|
603
660
|
declare function reachable(described: GraphDescribeOutput, from: string, direction: ReachableDirection, options?: ReachableOptions): string[];
|
|
604
661
|
|
|
605
|
-
export { type AutoCheckpointAdapter as A, type DescribeFilter as D, Graph as G, type
|
|
662
|
+
export { type AutoCheckpointAdapter as A, reachable as B, 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 GraphSpyHandle as s, type GraphSpyOptions as t, type GraphSpyTheme as u, type GraphSpyThemeName as v, type ObserveEvent as w, type ObserveOptions as x, type ObserveResult as y, type ReachableOptions as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as Node } from './meta-
|
|
2
|
-
import { G as Graph } from './graph-
|
|
1
|
+
import { N as Node } from './meta-BJEU8fYz.cjs';
|
|
2
|
+
import { G as Graph } from './graph-DqTICAY2.cjs';
|
|
3
3
|
|
|
4
4
|
/** Pluggable measurement backend. */
|
|
5
5
|
interface MeasurementAdapter {
|
|
@@ -446,4 +446,4 @@ declare namespace index {
|
|
|
446
446
|
export { type index_BlockAdapters as BlockAdapters, index_CanvasMeasureAdapter as CanvasMeasureAdapter, type index_CanvasMeasureAdapterOptions as CanvasMeasureAdapterOptions, type index_CanvasModule as CanvasModule, type index_CharPosition as CharPosition, index_CliMeasureAdapter as CliMeasureAdapter, type index_CliMeasureAdapterOptions as CliMeasureAdapterOptions, type index_ContentBlock as ContentBlock, type index_ImageMeasurer as ImageMeasurer, index_ImageSizeAdapter as ImageSizeAdapter, type index_LayoutLine as LayoutLine, type index_LineBreaksResult as LineBreaksResult, type index_MeasuredBlock as MeasuredBlock, type index_MeasurementAdapter as MeasurementAdapter, index_NodeCanvasMeasureAdapter as NodeCanvasMeasureAdapter, type index_PositionedBlock as PositionedBlock, index_PrecomputedAdapter as PrecomputedAdapter, type index_PrecomputedAdapterOptions as PrecomputedAdapterOptions, type index_PreparedSegment as PreparedSegment, type index_ReactiveBlockLayoutBundle as ReactiveBlockLayoutBundle, type index_ReactiveBlockLayoutOptions as ReactiveBlockLayoutOptions, type index_ReactiveLayoutBundle as ReactiveLayoutBundle, type index_ReactiveLayoutOptions as ReactiveLayoutOptions, type index_SegmentBreakKind as SegmentBreakKind, type index_SegmentMeasureStats as SegmentMeasureStats, index_SvgBoundsAdapter as SvgBoundsAdapter, type index_SvgMeasurer as SvgMeasurer, index_analyzeAndMeasure as analyzeAndMeasure, index_computeBlockFlow as computeBlockFlow, index_computeCharPositions as computeCharPositions, index_computeLineBreaks as computeLineBreaks, index_computeTotalHeight as computeTotalHeight, index_measureBlock as measureBlock, index_measureBlocks as measureBlocks, index_reactiveBlockLayout as reactiveBlockLayout, index_reactiveLayout as reactiveLayout };
|
|
447
447
|
}
|
|
448
448
|
|
|
449
|
-
export { reactiveBlockLayout as A, type BlockAdapters as B, CanvasMeasureAdapter as C, reactiveLayout as D, type ImageMeasurer as I, type LayoutLine as L, type
|
|
449
|
+
export { reactiveBlockLayout as A, type BlockAdapters as B, CanvasMeasureAdapter as C, reactiveLayout as D, type ImageMeasurer as I, type LayoutLine as L, type MeasurementAdapter as M, NodeCanvasMeasureAdapter as N, type PositionedBlock as P, type ReactiveBlockLayoutBundle as R, type SegmentBreakKind as S, type CanvasMeasureAdapterOptions as a, type CanvasModule as b, type CharPosition as c, CliMeasureAdapter as d, type CliMeasureAdapterOptions as e, type ContentBlock as f, ImageSizeAdapter as g, type LineBreaksResult as h, index as i, type MeasuredBlock as j, PrecomputedAdapter as k, type PrecomputedAdapterOptions as l, type PreparedSegment as m, type ReactiveBlockLayoutOptions as n, type ReactiveLayoutBundle as o, type ReactiveLayoutOptions as p, type SegmentMeasureStats as q, SvgBoundsAdapter as r, type SvgMeasurer as s, analyzeAndMeasure as t, computeBlockFlow as u, computeCharPositions as v, computeLineBreaks as w, computeTotalHeight as x, measureBlock as y, measureBlocks as z };
|