@graphrefly/graphrefly 0.37.0 → 0.38.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/dist/{chunk-CZIQ6JCE.js → chunk-2YFDSYEF.js} +1 -1
- package/dist/{chunk-YVYSO5CW.js → chunk-4BDQXBXE.js} +1 -1
- package/dist/chunk-5BGFS2XH.js +1 -0
- package/dist/chunk-6773HURD.js +1 -0
- package/dist/{chunk-U3COB5WU.js → chunk-6KZZ6XQE.js} +1 -1
- package/dist/{chunk-5CPPC75H.js → chunk-6VFC334U.js} +1 -1
- package/dist/{chunk-KUVDFOJH.js → chunk-7KZZLWZ6.js} +1 -1
- package/dist/{chunk-Q7EUZ6NN.js → chunk-B5S7KTGP.js} +1 -1
- package/dist/chunk-CMTN3KPT.js +80 -0
- package/dist/chunk-DQJLC6YY.js +1 -0
- package/dist/chunk-DSOVKKTI.js +1 -0
- package/dist/chunk-FAYEMS5M.js +1 -0
- package/dist/chunk-FWGIZP3W.js +1 -0
- package/dist/{chunk-FMI4CWFL.js → chunk-G7JN6LCB.js} +1 -1
- package/dist/{chunk-PCD2MU7X.js → chunk-IBGE62GZ.js} +1 -1
- package/dist/{chunk-MYFR67PY.js → chunk-K5C67OGE.js} +1 -1
- package/dist/chunk-KJEAIIIY.js +43 -0
- package/dist/chunk-LV3ACS5J.js +1 -0
- package/dist/{chunk-LOQRPP4Y.js → chunk-NBGPXQSP.js} +1 -1
- package/dist/chunk-NN3QPJ6U.js +1 -0
- package/dist/{chunk-QWVQIL3T.js → chunk-NSAZ6PR6.js} +1 -1
- package/dist/{chunk-MC5LZG3U.js → chunk-NV63VQHI.js} +1 -1
- package/dist/{chunk-2C4NESZE.js → chunk-O245YLM5.js} +1 -1
- package/dist/{chunk-TLS7M7H4.js → chunk-O2BLVQU4.js} +1 -1
- package/dist/chunk-PHXZRR6C.js +1 -0
- package/dist/{chunk-K6ZFJ473.js → chunk-POCWFIJ7.js} +1 -1
- package/dist/{chunk-C5CBVOCB.js → chunk-QEVSIVSF.js} +1 -1
- package/dist/chunk-QMC2PLNM.js +7 -0
- package/dist/chunk-QOJFR6GS.js +1 -0
- package/dist/{chunk-MQZWA3DF.js → chunk-RZ5HKPGI.js} +1 -1
- package/dist/{chunk-WSLN4JFO.js → chunk-SFK7MN7S.js} +1 -1
- package/dist/{chunk-QP5TH523.js → chunk-SP5O2MIX.js} +1 -1
- package/dist/chunk-TB7JKSVS.js +61 -0
- package/dist/{chunk-T4U24DXX.js → chunk-TMVY7OWG.js} +1 -1
- package/dist/{chunk-UODQF4EY.js → chunk-UAXFKMAG.js} +1 -1
- package/dist/{chunk-TFK4P4CX.js → chunk-UVLZX2OU.js} +1 -1
- package/dist/chunk-XIMFHEKV.js +1 -0
- package/dist/{chunk-XIJKEXWR.js → chunk-XLMYQB6F.js} +1 -1
- package/dist/{chunk-4EATTNAE.js → chunk-XLYF4LBH.js} +1 -1
- package/dist/compat/index.cjs +9 -9
- package/dist/compat/index.d.cts +7 -7
- package/dist/compat/index.d.ts +7 -7
- package/dist/compat/index.js +1 -1
- package/dist/compat/nestjs/index.cjs +11 -11
- package/dist/compat/nestjs/index.d.cts +5 -5
- package/dist/compat/nestjs/index.d.ts +5 -5
- package/dist/compat/nestjs/index.js +1 -1
- package/dist/compat/zustand/index.cjs +7 -7
- package/dist/compat/zustand/index.d.cts +3 -3
- package/dist/compat/zustand/index.d.ts +3 -3
- package/dist/compat/zustand/index.js +1 -1
- package/dist/{composite-_XckYx2e.d.cts → composite-CgG0MqHm.d.cts} +8 -1
- package/dist/{composite-CT_mApQD.d.ts → composite-DTOlDuch.d.ts} +8 -1
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +1 -1
- package/dist/extra/index.cjs +19 -19
- package/dist/extra/index.d.cts +5 -5
- package/dist/extra/index.d.ts +5 -5
- package/dist/extra/index.js +1 -1
- package/dist/extra/node.cjs +2 -2
- package/dist/extra/node.d.cts +107 -1
- package/dist/extra/node.d.ts +107 -1
- package/dist/extra/node.js +2 -2
- package/dist/extra/operators.cjs +1 -1
- package/dist/extra/operators.js +1 -1
- package/dist/extra/reactive.d.cts +1 -1
- package/dist/extra/reactive.d.ts +1 -1
- package/dist/extra/reactive.js +1 -1
- package/dist/extra/sources.cjs +1 -1
- package/dist/extra/sources.js +1 -1
- package/dist/extra/storage-tiers-browser.d.cts +76 -5
- package/dist/extra/storage-tiers-browser.d.ts +76 -5
- package/dist/extra/storage-tiers-node.d.cts +137 -13
- package/dist/extra/storage-tiers-node.d.ts +137 -13
- package/dist/extra/storage-tiers.d.cts +151 -23
- package/dist/extra/storage-tiers.d.ts +151 -23
- package/dist/graph/index.cjs +7 -7
- package/dist/graph/index.d.cts +4 -4
- package/dist/graph/index.d.ts +4 -4
- package/dist/graph/index.js +1 -1
- package/dist/{graph-YQXDndFy.d.ts → graph-BjW1taJl.d.ts} +217 -10
- package/dist/{graph-CaNXUc3c.d.cts → graph-CHsVwf9S.d.cts} +217 -10
- package/dist/{index-CUTHDZ7Q.d.ts → index-5dNRlW7J.d.ts} +3 -3
- package/dist/{index-Bpzw8hx3.d.ts → index-AUqWe_fX.d.ts} +7 -4
- package/dist/{index-fHKHdAso.d.ts → index-B-ORMr3k.d.ts} +2 -2
- package/dist/{index-DcWbx58m.d.cts → index-B2IUcH13.d.cts} +2 -2
- package/dist/{index-DuhOdNyg.d.ts → index-BFaALJxR.d.ts} +2 -2
- package/dist/{index-DPqR3wdW.d.ts → index-BI1wMfyc.d.ts} +2 -2
- package/dist/{index-D0ZxFXYl.d.ts → index-BUFCHvOR.d.ts} +2 -2
- package/dist/{index-CLPQyYY5.d.cts → index-BWUMIt7J.d.cts} +3 -3
- package/dist/{index-CkN8CZlT.d.cts → index-BaSy4L6w.d.cts} +37 -17
- package/dist/{index-B1IcU--K.d.cts → index-BgzPO43H.d.cts} +2 -2
- package/dist/{index-D6tRNEKz.d.cts → index-BhzwpIJc.d.cts} +1 -1
- package/dist/{index-4IwO4mH2.d.cts → index-BkQqf1EF.d.cts} +80 -7
- package/dist/{index-CajEOoAN.d.ts → index-BmWuVdER.d.ts} +2 -2
- package/dist/{index-0qOD-421.d.ts → index-Bn0uZEL4.d.ts} +2 -2
- package/dist/{index-DAKm44My.d.cts → index-BpMZzX9P.d.cts} +2 -2
- package/dist/{index-CrpjECS6.d.cts → index-Bpr0Pwgl.d.cts} +2 -2
- package/dist/{index-BECJ8M0T.d.cts → index-BqcgiSQg.d.cts} +2 -2
- package/dist/{index-DfAo9WKr.d.ts → index-BsZk9T8y.d.ts} +1 -1
- package/dist/{index-CU3z8Cel.d.cts → index-BsgxnHN8.d.cts} +2 -2
- package/dist/index-Bub6x_D4.d.cts +427 -0
- package/dist/{index-C-pFD_FV.d.ts → index-BwOsJfLJ.d.ts} +2 -2
- package/dist/{index-CRycrNfn.d.ts → index-Byp771zP.d.ts} +1 -1
- package/dist/{index-e1m3ZHgc.d.cts → index-C-3UXnHT.d.cts} +1 -1
- package/dist/{index-DTYIRT_v.d.cts → index-C56XZiDe.d.cts} +2 -2
- package/dist/{index-D11pGlaI.d.cts → index-CAV-3RpJ.d.cts} +2 -2
- package/dist/{index-D_DThl_J.d.cts → index-CAbHN_rP.d.cts} +1 -1
- package/dist/{index-BhLA9feT.d.ts → index-CEVzBWeB.d.ts} +2 -2
- package/dist/{index-Ci358GSC.d.cts → index-CM-i58FY.d.cts} +2 -2
- package/dist/{index-B9qJmmv3.d.cts → index-CQsqqEVz.d.cts} +1 -1
- package/dist/{index-C0tga1_x.d.ts → index-CijfwEWx.d.ts} +2 -2
- package/dist/{index-BwtIbzSV.d.cts → index-Ckil6miL.d.cts} +2 -2
- package/dist/{index-BokynmA4.d.cts → index-CpdnP-0y.d.cts} +1 -1
- package/dist/{index-BmLkcDlj.d.ts → index-CrlHFsiT.d.ts} +37 -17
- package/dist/{index-DCAuN9u5.d.cts → index-Czk3r0yA.d.cts} +37 -3
- package/dist/{index-C4N-dg5U.d.cts → index-D-B7U42V.d.cts} +2 -2
- package/dist/{index-CKcnuQ2c.d.ts → index-D-HZ7sP4.d.ts} +2 -2
- package/dist/{index-D6pwWiOc.d.cts → index-D7-RSD93.d.cts} +2 -2
- package/dist/{index-9mbs_PIG.d.ts → index-D9vBTuzo.d.ts} +2 -2
- package/dist/{index-C_qi0WlF.d.cts → index-DJNAWzcH.d.cts} +2 -2
- package/dist/{index-Ae6L8liv.d.ts → index-DJVQ-t07.d.ts} +2 -2
- package/dist/{index-D_d1erkR.d.ts → index-DKrIuF-r.d.ts} +2 -2
- package/dist/{index-DXz9uwcs.d.ts → index-DOU1Ee_k.d.ts} +1 -1
- package/dist/{index-D1E1tqHT.d.ts → index-DTDVDzhA.d.ts} +37 -3
- package/dist/{index-B5UR87KG.d.ts → index-DY2f2b9z.d.ts} +4 -2
- package/dist/{index-D8IyqHvT.d.cts → index-DeSsvHDD.d.cts} +4 -2
- package/dist/index-Di7OdwlO.d.ts +427 -0
- package/dist/{index-CzIWlnPp.d.ts → index-DqICM_I7.d.ts} +80 -7
- package/dist/{index-BOfHwQc1.d.ts → index-ML6vHKXK.d.ts} +1 -1
- package/dist/{index-DqtXA3yX.d.cts → index-UsU9ptzs.d.cts} +7 -4
- package/dist/{index-B46GWgk3.d.ts → index-Vz7KPfgz.d.ts} +1 -1
- package/dist/index.cjs +50 -50
- package/dist/index.d.cts +32 -32
- package/dist/index.d.ts +32 -32
- package/dist/index.js +1 -1
- package/dist/meta-BYqlATmg.d.ts +98 -0
- package/dist/meta-DreaEM_a.d.cts +98 -0
- package/dist/patterns/ai/browser.cjs +2 -2
- package/dist/patterns/ai/browser.js +1 -1
- package/dist/patterns/ai/index.cjs +21 -21
- package/dist/patterns/ai/index.d.cts +9 -9
- package/dist/patterns/ai/index.d.ts +9 -9
- package/dist/patterns/ai/index.js +1 -1
- package/dist/patterns/ai/node.js +1 -1
- package/dist/patterns/audit/index.cjs +7 -7
- package/dist/patterns/audit/index.d.cts +5 -5
- package/dist/patterns/audit/index.d.ts +5 -5
- package/dist/patterns/audit/index.js +1 -1
- package/dist/patterns/cqrs/index.cjs +7 -7
- package/dist/patterns/cqrs/index.d.cts +4 -4
- package/dist/patterns/cqrs/index.d.ts +4 -4
- package/dist/patterns/cqrs/index.js +1 -1
- package/dist/patterns/demo-shell/index.cjs +8 -8
- package/dist/patterns/demo-shell/index.d.cts +4 -4
- package/dist/patterns/demo-shell/index.d.ts +4 -4
- package/dist/patterns/demo-shell/index.js +1 -1
- package/dist/patterns/domain-templates/index.cjs +7 -7
- package/dist/patterns/domain-templates/index.d.cts +3 -3
- package/dist/patterns/domain-templates/index.d.ts +3 -3
- package/dist/patterns/domain-templates/index.js +1 -1
- package/dist/patterns/graphspec/index.cjs +21 -21
- package/dist/patterns/graphspec/index.d.cts +3 -3
- package/dist/patterns/graphspec/index.d.ts +3 -3
- package/dist/patterns/graphspec/index.js +1 -1
- package/dist/patterns/guarded-execution/index.cjs +7 -7
- package/dist/patterns/guarded-execution/index.d.cts +6 -6
- package/dist/patterns/guarded-execution/index.d.ts +6 -6
- package/dist/patterns/guarded-execution/index.js +1 -1
- package/dist/patterns/harness/index.cjs +12 -12
- package/dist/patterns/harness/index.d.cts +8 -8
- package/dist/patterns/harness/index.d.ts +8 -8
- package/dist/patterns/harness/index.js +1 -1
- package/dist/patterns/job-queue/index.cjs +7 -7
- package/dist/patterns/job-queue/index.d.cts +4 -4
- package/dist/patterns/job-queue/index.d.ts +4 -4
- package/dist/patterns/job-queue/index.js +1 -1
- package/dist/patterns/lens/index.cjs +7 -7
- package/dist/patterns/lens/index.d.cts +4 -4
- package/dist/patterns/lens/index.d.ts +4 -4
- package/dist/patterns/lens/index.js +1 -1
- package/dist/patterns/memory/index.cjs +7 -7
- package/dist/patterns/memory/index.d.cts +6 -4
- package/dist/patterns/memory/index.d.ts +6 -4
- package/dist/patterns/memory/index.js +1 -1
- package/dist/patterns/messaging/index.cjs +7 -7
- package/dist/patterns/messaging/index.d.cts +4 -4
- package/dist/patterns/messaging/index.d.ts +4 -4
- package/dist/patterns/messaging/index.js +1 -1
- package/dist/patterns/orchestration/index.cjs +7 -7
- package/dist/patterns/orchestration/index.d.cts +4 -4
- package/dist/patterns/orchestration/index.d.ts +4 -4
- package/dist/patterns/orchestration/index.js +1 -1
- package/dist/patterns/process/index.d.cts +5 -5
- package/dist/patterns/process/index.d.ts +5 -5
- package/dist/patterns/process/index.js +1 -1
- package/dist/patterns/reactive-layout/index.cjs +8 -8
- package/dist/patterns/reactive-layout/index.d.cts +4 -4
- package/dist/patterns/reactive-layout/index.d.ts +4 -4
- package/dist/patterns/reactive-layout/index.js +1 -1
- package/dist/patterns/reduction/index.cjs +7 -7
- package/dist/patterns/reduction/index.d.cts +3 -3
- package/dist/patterns/reduction/index.d.ts +3 -3
- package/dist/patterns/reduction/index.js +1 -1
- package/dist/patterns/refine-loop/index.cjs +8 -8
- package/dist/patterns/refine-loop/index.d.cts +5 -5
- package/dist/patterns/refine-loop/index.d.ts +5 -5
- package/dist/patterns/refine-loop/index.js +1 -1
- package/dist/patterns/resilient-pipeline/index.cjs +1 -1
- package/dist/patterns/resilient-pipeline/index.d.cts +4 -4
- package/dist/patterns/resilient-pipeline/index.d.ts +4 -4
- package/dist/patterns/resilient-pipeline/index.js +1 -1
- package/dist/patterns/surface/index.cjs +14 -14
- package/dist/patterns/surface/index.d.cts +4 -4
- package/dist/patterns/surface/index.d.ts +4 -4
- package/dist/patterns/surface/index.js +1 -1
- package/dist/{pipeline-graph-DX2Twdj-.d.ts → pipeline-graph-9JBbmRxA.d.ts} +2 -2
- package/dist/{pipeline-graph-BrrYGjuZ.d.cts → pipeline-graph-DuHpXSOn.d.cts} +2 -2
- package/dist/{reactive-layout-DrGjuwyC.d.cts → reactive-layout-BMLDB4Vd.d.cts} +1 -1
- package/dist/{reactive-layout-BDdngW56.d.ts → reactive-layout-D-tRiNhg.d.ts} +1 -1
- package/dist/{reactive-log-jirQsxMY.d.ts → reactive-log-BgWSA1fg.d.ts} +28 -1
- package/dist/{reactive-log-ScpWyqny.d.cts → reactive-log-C3IMAGpT.d.cts} +28 -1
- package/dist/resilience-LGBK236C.js +1 -0
- package/dist/{topology-tree-BI665P0L.d.ts → topology-tree-D47-nI6Z.d.ts} +1 -1
- package/dist/{topology-tree-BkhmMg2a.d.cts → topology-tree-jrZue3ao.d.cts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-533RQFF6.js +0 -1
- package/dist/chunk-6SVKZ7VI.js +0 -1
- package/dist/chunk-A5HZZYRK.js +0 -1
- package/dist/chunk-B4L5X2QO.js +0 -7
- package/dist/chunk-FJ6IEMOS.js +0 -1
- package/dist/chunk-G6Q3DUMJ.js +0 -1
- package/dist/chunk-GDDPCDLG.js +0 -1
- package/dist/chunk-GFOT6UBB.js +0 -1
- package/dist/chunk-JJTF75VS.js +0 -1
- package/dist/chunk-K2WYIVHM.js +0 -1
- package/dist/chunk-KTWBUJO5.js +0 -61
- package/dist/chunk-M27MVZCP.js +0 -1
- package/dist/chunk-NKKUUKPD.js +0 -43
- package/dist/chunk-QKBCTKH7.js +0 -1
- package/dist/chunk-WGST56ZH.js +0 -80
- package/dist/index-BCq12BqB.d.ts +0 -139
- package/dist/index-DbWwMWiB.d.cts +0 -139
- package/dist/meta-BGO6C7K9.d.cts +0 -41
- package/dist/meta-CC6EPdpK.d.ts +0 -41
- package/dist/resilience-OBU472D2.js +0 -1
|
@@ -1,8 +1,97 @@
|
|
|
1
1
|
import { A as Actor, p as GraphReFlyConfig, V as VersioningLevel, a as Node, b as Messages, K as NodeSink } from './node-fSc-hCv8.js';
|
|
2
|
-
import { b as DescribeNodeOutput, D as DescribeDetail, a as DescribeField } from './meta-
|
|
2
|
+
import { b as DescribeNodeOutput, D as DescribeDetail, a as DescribeField } from './meta-BYqlATmg.js';
|
|
3
3
|
import { StorageHandle } from './extra/storage-core.js';
|
|
4
4
|
import { SnapshotStorageTier } from './extra/storage-tiers.js';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Pure structural diff over `GraphDescribeOutput` snapshots.
|
|
8
|
+
*
|
|
9
|
+
* Produces a {@link DescribeChangeset} of {@link DescribeEvent}s describing the
|
|
10
|
+
* topology delta from `prev` → `next`. Used by `Graph.describe({ reactive:
|
|
11
|
+
* "diff" })` internally and re-exported here for static-snapshot diffing
|
|
12
|
+
* (e.g. computing the topology delta between two persisted snapshots without
|
|
13
|
+
* spinning up a live graph).
|
|
14
|
+
*
|
|
15
|
+
* Topology-only — no value/state events. The data layer lives in
|
|
16
|
+
* `Graph.observe`. Per Tier 1.5.1 (locked Session A.1), `DescribeEvent` and
|
|
17
|
+
* {@link ObserveEvent} have disjoint type sets so a consumer can route both
|
|
18
|
+
* streams without ambiguity.
|
|
19
|
+
*
|
|
20
|
+
* `flushedAt_ns` is taken from `core/clock.ts`'s `monotonicNs()` so callers can
|
|
21
|
+
* order changesets across the same process without wall-clock skew.
|
|
22
|
+
*
|
|
23
|
+
* @module
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Meta dictionary attached to a node, as surfaced by
|
|
28
|
+
* {@link DescribeNodeOutput.meta}. Aliased here so {@link DescribeEvent}'s
|
|
29
|
+
* `node-meta-changed` variant has a stable, narrow type.
|
|
30
|
+
*/
|
|
31
|
+
type Meta = Record<string, unknown>;
|
|
32
|
+
/**
|
|
33
|
+
* One topology delta between two `describe()` snapshots. Disjoint from
|
|
34
|
+
* `ObserveEvent` (the data-layer envelope).
|
|
35
|
+
*/
|
|
36
|
+
type DescribeEvent = {
|
|
37
|
+
type: "node-added";
|
|
38
|
+
path: string;
|
|
39
|
+
node: DescribeNodeOutput;
|
|
40
|
+
} | {
|
|
41
|
+
type: "node-removed";
|
|
42
|
+
path: string;
|
|
43
|
+
} | {
|
|
44
|
+
type: "node-meta-changed";
|
|
45
|
+
path: string;
|
|
46
|
+
prevMeta: Meta;
|
|
47
|
+
nextMeta: Meta;
|
|
48
|
+
} | {
|
|
49
|
+
type: "edge-added";
|
|
50
|
+
from: string;
|
|
51
|
+
to: string;
|
|
52
|
+
} | {
|
|
53
|
+
type: "edge-removed";
|
|
54
|
+
from: string;
|
|
55
|
+
to: string;
|
|
56
|
+
} | {
|
|
57
|
+
type: "subgraph-mounted";
|
|
58
|
+
path: string;
|
|
59
|
+
} | {
|
|
60
|
+
type: "subgraph-unmounted";
|
|
61
|
+
path: string;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Coalesced batch of {@link DescribeEvent}s emitted as a single DATA wave by
|
|
65
|
+
* `Graph.describe({ reactive: "diff" })` per outermost batch flush.
|
|
66
|
+
*
|
|
67
|
+
* `flushedAt_ns` is monotonic (from `core/clock.ts`); compare against another
|
|
68
|
+
* changeset's `flushedAt_ns` to order them. `events` is empty only when
|
|
69
|
+
* `topologyDiff` is called with two structurally identical snapshots; reactive
|
|
70
|
+
* variants suppress empty changesets so consumers don't see no-op DATA waves.
|
|
71
|
+
*/
|
|
72
|
+
type DescribeChangeset = {
|
|
73
|
+
events: ReadonlyArray<DescribeEvent>;
|
|
74
|
+
flushedAt_ns: number;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Pure topology delta from `prev` → `next`. No I/O, no node references — purely
|
|
78
|
+
* over the JSON shape `Graph.describe()` returns.
|
|
79
|
+
*
|
|
80
|
+
* Event ordering within a changeset:
|
|
81
|
+
* 1. `subgraph-mounted` (added subgraphs first — their nodes follow)
|
|
82
|
+
* 2. `node-added`
|
|
83
|
+
* 3. `node-meta-changed`
|
|
84
|
+
* 4. `edge-added`
|
|
85
|
+
* 5. `edge-removed`
|
|
86
|
+
* 6. `node-removed`
|
|
87
|
+
* 7. `subgraph-unmounted` (last — node removals already reported)
|
|
88
|
+
*
|
|
89
|
+
* Each group is emitted in code-point sort order on the path / `${from}->${to}`
|
|
90
|
+
* key so the changeset is deterministic across runs (useful for snapshot
|
|
91
|
+
* tests and golden-output assertions).
|
|
92
|
+
*/
|
|
93
|
+
declare function topologyDiff(prev: GraphDescribeOutput, next: GraphDescribeOutput): DescribeChangeset;
|
|
94
|
+
|
|
6
95
|
/**
|
|
7
96
|
* Causal walkback over a {@link Graph.describe} snapshot (roadmap §9.2).
|
|
8
97
|
*
|
|
@@ -222,6 +311,25 @@ interface GraphOptions {
|
|
|
222
311
|
* time — not mutable afterward (ring buffers can't resize cleanly).
|
|
223
312
|
*/
|
|
224
313
|
traceCapacity?: number;
|
|
314
|
+
/**
|
|
315
|
+
* Tier 1.5.3 Phase 2.5 (Session A.1 lock + Phase 2.5 design DG1=B, 2026-04-27).
|
|
316
|
+
* Top-level factory identifier for Graph-returning factories (`agentMemory`,
|
|
317
|
+
* `harnessLoop`, `pipelineGraph`, etc.). When set, `describe()` surfaces
|
|
318
|
+
* `factory` + `factoryArgs` at the top of `GraphDescribeOutput` so consumers
|
|
319
|
+
* can identify provenance, and `compileSpec` can delegate reconstruction to
|
|
320
|
+
* `catalog.graphFactories[factory]` with `factoryArgs`. Prefer the
|
|
321
|
+
* post-construction `Graph.prototype.tagFactory(name, args?)` mutator inside
|
|
322
|
+
* the factory body over passing here directly.
|
|
323
|
+
*/
|
|
324
|
+
factory?: string;
|
|
325
|
+
/**
|
|
326
|
+
* JSON-serializable subset of the construction args. For non-JSON fields
|
|
327
|
+
* (LLMAdapter, callbacks, embedders), prefer the {@link placeholderArgs}
|
|
328
|
+
* helper which substitutes descriptive `"<Node>"` / `"<function>"` strings
|
|
329
|
+
* (DG2 = ii). Catalog `graphFactories` recipients receive this back during
|
|
330
|
+
* `compileSpec` to recreate the graph with the user-supplied runtime ctx.
|
|
331
|
+
*/
|
|
332
|
+
factoryArgs?: unknown;
|
|
225
333
|
[key: string]: unknown;
|
|
226
334
|
}
|
|
227
335
|
/** Filter for {@link Graph.describe} — object-style partial match or predicate. */
|
|
@@ -332,14 +440,18 @@ type GraphDescribeOptions = {
|
|
|
332
440
|
*/
|
|
333
441
|
asciiCharset?: "unicode" | "ascii";
|
|
334
442
|
/**
|
|
335
|
-
* Reactive describe (D2):
|
|
336
|
-
*
|
|
337
|
-
*
|
|
338
|
-
* {@link Graph.explain} with
|
|
339
|
-
*
|
|
340
|
-
*
|
|
341
|
-
|
|
342
|
-
|
|
443
|
+
* Reactive describe (D2):
|
|
444
|
+
* - `true` — return `{ node, dispose }` where `node` emits a fresh
|
|
445
|
+
* `GraphDescribeOutput` (or format string, if `format` is set) every time
|
|
446
|
+
* the graph state settles. Same coalescing as {@link Graph.explain} with
|
|
447
|
+
* `{ reactive: true }`.
|
|
448
|
+
* - `"diff"` — return `{ node, dispose }` where `node` emits a
|
|
449
|
+
* {@link DescribeChangeset} per topology change. Empty changesets are
|
|
450
|
+
* suppressed; the initial cache is a synthetic full-add diff so a fresh
|
|
451
|
+
* subscriber sees the current topology as adds via push-on-subscribe.
|
|
452
|
+
* (Tier 1.5.1 — Session A.1 lock).
|
|
453
|
+
*/
|
|
454
|
+
reactive?: boolean | "diff";
|
|
343
455
|
/** Reactive-only: name for the backing derived node (default `"describe"`). */
|
|
344
456
|
reactiveName?: string;
|
|
345
457
|
};
|
|
@@ -357,6 +469,16 @@ type GraphDescribeOutput = {
|
|
|
357
469
|
to: string;
|
|
358
470
|
}>;
|
|
359
471
|
subgraphs: string[];
|
|
472
|
+
/**
|
|
473
|
+
* Top-level factory identifier (Tier 1.5.3 Phase 2.5 — DG1=B). Present when
|
|
474
|
+
* the graph was constructed by a Graph-returning factory that called
|
|
475
|
+
* `Graph.prototype.tagFactory(name, args?)` (or set `GraphOptions.factory`).
|
|
476
|
+
* Used by `compileSpec` for catalog-based reconstruction via
|
|
477
|
+
* `catalog.graphFactories[factory]`.
|
|
478
|
+
*/
|
|
479
|
+
factory?: string;
|
|
480
|
+
/** JSON-serializable construction args paired with `factory`. */
|
|
481
|
+
factoryArgs?: unknown;
|
|
360
482
|
/**
|
|
361
483
|
* Re-read the live graph with higher detail (Phase 3.3b).
|
|
362
484
|
* Returns a new `GraphDescribeOutput`; the original remains a snapshot.
|
|
@@ -519,6 +641,26 @@ type GraphObserveAll = {
|
|
|
519
641
|
* - `"full"` — standard + timeline + causal + derived.
|
|
520
642
|
*/
|
|
521
643
|
type ObserveDetail = "minimal" | "standard" | "full";
|
|
644
|
+
/**
|
|
645
|
+
* Tier name for {@link ObserveEvent} filtering. Aligns with spec §1.2 message
|
|
646
|
+
* tier semantics — each `ObserveTier` corresponds to one or more protocol
|
|
647
|
+
* message types. Used by {@link ObserveOptions.tiers} to scope observation to
|
|
648
|
+
* a subset of event categories (e.g. `tiers: ["error", "complete", "teardown"]`
|
|
649
|
+
* for failure-only health monitoring).
|
|
650
|
+
*/
|
|
651
|
+
type ObserveTier = ObserveEvent["type"];
|
|
652
|
+
/**
|
|
653
|
+
* Coalesced batch of {@link ObserveEvent}s emitted as one DATA wave per
|
|
654
|
+
* outermost batch flush by `Graph.observe({ reactive: true })`.
|
|
655
|
+
*
|
|
656
|
+
* Disjoint from `DescribeChangeset` (the topology-layer envelope). Each event
|
|
657
|
+
* carries its own `path` so consumers route per-path without unwrapping the
|
|
658
|
+
* envelope first. `flushedAt_ns` is monotonic via `core/clock.ts`.
|
|
659
|
+
*/
|
|
660
|
+
type ObserveChangeset = {
|
|
661
|
+
events: ReadonlyArray<ObserveEvent>;
|
|
662
|
+
flushedAt_ns: number;
|
|
663
|
+
};
|
|
522
664
|
/** Options for structured observation modes on {@link Graph.observe}. */
|
|
523
665
|
type ObserveOptions = {
|
|
524
666
|
actor?: Actor;
|
|
@@ -536,6 +678,27 @@ type ObserveOptions = {
|
|
|
536
678
|
* `"minimal"` filters to DATA-only events.
|
|
537
679
|
*/
|
|
538
680
|
detail?: ObserveDetail;
|
|
681
|
+
/**
|
|
682
|
+
* Filter observed events to these tiers only. When omitted, all event types
|
|
683
|
+
* are delivered. Applies to both the structured callback and the reactive
|
|
684
|
+
* variants (`observe({ reactive: true })`).
|
|
685
|
+
*
|
|
686
|
+
* Example: `tiers: ["error", "complete", "teardown"]` for failure-only
|
|
687
|
+
* health monitoring; `tiers: ["data"]` for value-flow tracking.
|
|
688
|
+
*/
|
|
689
|
+
tiers?: readonly ObserveTier[];
|
|
690
|
+
/**
|
|
691
|
+
* Return a `Node<ObserveChangeset>` that emits one DATA wave per outermost
|
|
692
|
+
* batch flush, with all observed events for that flush coalesced into a
|
|
693
|
+
* single changeset. Auto-enables structured mode (the reactive variant
|
|
694
|
+
* delivers {@link ObserveEvent}s, not raw messages).
|
|
695
|
+
*
|
|
696
|
+
* Coalescing matches `describe({ reactive: true })`'s `registerBatchFlushHook`
|
|
697
|
+
* mechanism — N events in one batch → one changeset DATA wave at flush.
|
|
698
|
+
*/
|
|
699
|
+
reactive?: boolean;
|
|
700
|
+
/** Optional name for the reactive changeset node when `reactive: true`. */
|
|
701
|
+
reactiveName?: string;
|
|
539
702
|
/**
|
|
540
703
|
* When set, auto-enables structured mode and attaches a logger.
|
|
541
704
|
* - `"pretty"` — colored one-line output per event.
|
|
@@ -755,7 +918,24 @@ declare class Graph {
|
|
|
755
918
|
* equal the reserved meta segment `__meta__`).
|
|
756
919
|
* @param opts - See {@link GraphOptions}. Stored frozen on the instance.
|
|
757
920
|
*/
|
|
921
|
+
/** Tier 1.5.3 Phase 2.5 — top-level factory tag for Graph-returning factories. */
|
|
922
|
+
private _factory?;
|
|
923
|
+
private _factoryArgs?;
|
|
758
924
|
constructor(name: string, opts?: GraphOptions);
|
|
925
|
+
/**
|
|
926
|
+
* Tag this graph with its constructing factory's identifier and args.
|
|
927
|
+
* Used by Graph-returning factories (`agentMemory`, `harnessLoop`,
|
|
928
|
+
* `pipelineGraph`, etc.) so `describe()` exposes provenance and
|
|
929
|
+
* `compileSpec` can delegate reconstruction to
|
|
930
|
+
* `catalog.graphFactories[factory]`. Tier 1.5.3 Phase 2.5 (DG1=B).
|
|
931
|
+
*
|
|
932
|
+
* `factoryArgs` should be JSON-serializable. For non-JSON fields
|
|
933
|
+
* (LLMAdapter, callbacks, etc.), use {@link placeholderArgs} to
|
|
934
|
+
* substitute descriptive strings (DG2=ii).
|
|
935
|
+
*
|
|
936
|
+
* Returns `this` for fluent chaining inside factory bodies.
|
|
937
|
+
*/
|
|
938
|
+
tagFactory(factory: string, factoryArgs?: unknown): this;
|
|
759
939
|
/**
|
|
760
940
|
* Walk ancestors up through `_parent`. Returns the chain starting at this
|
|
761
941
|
* instance, ending at the root (a graph with no parent). O(depth).
|
|
@@ -1015,6 +1195,9 @@ declare class Graph {
|
|
|
1015
1195
|
reactive: true;
|
|
1016
1196
|
format: "json" | "pretty" | "mermaid" | "mermaid-url" | "d2" | "ascii";
|
|
1017
1197
|
}): ReactiveDescribeHandle<string>;
|
|
1198
|
+
describe(options: GraphDescribeOptions & {
|
|
1199
|
+
reactive: "diff";
|
|
1200
|
+
}): ReactiveDescribeHandle<DescribeChangeset>;
|
|
1018
1201
|
describe(options: GraphDescribeOptions & {
|
|
1019
1202
|
reactive: true;
|
|
1020
1203
|
}): ReactiveDescribeHandle<GraphDescribeOutput>;
|
|
@@ -1076,6 +1259,14 @@ declare class Graph {
|
|
|
1076
1259
|
};
|
|
1077
1260
|
private _explainStatic;
|
|
1078
1261
|
private _describeReactive;
|
|
1262
|
+
/**
|
|
1263
|
+
* Reactive topology-diff variant of `describe()`. Wraps `_describeReactive`'s
|
|
1264
|
+
* snapshot stream and emits a `DescribeChangeset` per change, suppressing
|
|
1265
|
+
* empty changesets. The initial cache is a synthetic full-add diff so a
|
|
1266
|
+
* fresh subscriber sees the current topology as a single `node-added` /
|
|
1267
|
+
* `edge-added` / `subgraph-mounted` payload via push-on-subscribe.
|
|
1268
|
+
*/
|
|
1269
|
+
private _describeReactiveDiff;
|
|
1079
1270
|
private _explainReactive;
|
|
1080
1271
|
/**
|
|
1081
1272
|
* @internal Collect all qualified paths in this graph tree matching a
|
|
@@ -1102,10 +1293,26 @@ declare class Graph {
|
|
|
1102
1293
|
* `ObserveResult` is also an `AsyncIterable<ObserveEvent>` — use
|
|
1103
1294
|
* `for await (const ev of result)` for pull-based consumption.
|
|
1104
1295
|
*/
|
|
1296
|
+
observe(path: string, options: ObserveOptions & {
|
|
1297
|
+
reactive: true;
|
|
1298
|
+
}): Node<ObserveChangeset>;
|
|
1299
|
+
observe(options: ObserveOptions & {
|
|
1300
|
+
reactive: true;
|
|
1301
|
+
}): Node<ObserveChangeset>;
|
|
1105
1302
|
observe(path: string, options?: ObserveOptions & StructuredTriggers): ObserveResult;
|
|
1106
1303
|
observe(path: string, options?: ObserveOptions): GraphObserveOne;
|
|
1107
1304
|
observe(options: ObserveOptions & StructuredTriggers): ObserveResult;
|
|
1108
1305
|
observe(options?: ObserveOptions): GraphObserveAll;
|
|
1306
|
+
/**
|
|
1307
|
+
* Reactive observe variant — wraps the structured observer and emits one
|
|
1308
|
+
* `ObserveChangeset` DATA per outermost batch flush, with all observed
|
|
1309
|
+
* events for that flush coalesced into a single envelope. Tier filter
|
|
1310
|
+
* (`options.tiers`) drops out-of-scope events before accumulation.
|
|
1311
|
+
*
|
|
1312
|
+
* Cleanup is producer-bound: the structured observer is torn down when the
|
|
1313
|
+
* last consumer of the returned node unsubscribes.
|
|
1314
|
+
*/
|
|
1315
|
+
private _observeReactive;
|
|
1109
1316
|
/** Dispatch helper — builds a unified observer + its expand closure. */
|
|
1110
1317
|
private _buildStructuredObserver;
|
|
1111
1318
|
/**
|
|
@@ -1482,4 +1689,4 @@ declare function reachable(described: GraphDescribeOutput, from: string, directi
|
|
|
1482
1689
|
}): ReachableResult;
|
|
1483
1690
|
declare function reachable(described: GraphDescribeOutput, from: string, direction: ReachableDirection, options?: ReachableOptions): string[];
|
|
1484
1691
|
|
|
1485
|
-
export { type
|
|
1692
|
+
export { type ObserveTheme as A, type ObserveThemeName as B, type CausalChain as C, type DescribeFilter as D, type ExplainPathOptions as E, type ReachableOptions as F, Graph as G, type TraceEntry as H, diffForWAL as I, explainPath as J, graphProfile as K, mermaidLiveUrl as L, type Meta as M, type NodeProfile as N, type ObserveDetail as O, reachable as P, topologyDiff as Q, type ReachableDirection as R, SNAPSHOT_VERSION as S, type TopologyEvent as T, type GraphOptions as a, type GraphPersistSnapshot as b, type GraphDescribeOptions as c, type GraphDescribeOutput as d, type CausalStep as e, type DescribeChangeset as f, type DescribeEvent as g, GRAPH_META_SEGMENT as h, type GraphActorOptions as i, type GraphAttachStorageOptions as j, type GraphCheckpointRecord as k, type GraphDiagramDirection as l, type GraphDiagramOptions as m, type GraphDiffChange as n, type GraphDiffResult as o, type GraphFactoryContext as p, type GraphNodeFactory as q, type GraphObserveAll as r, type GraphObserveOne as s, type GraphProfileOptions as t, type GraphProfileResult as u, type GraphVersionChange as v, type GraphWALDiff as w, type ObserveEvent as x, type ObserveOptions as y, type ObserveResult as z };
|
|
@@ -1,8 +1,97 @@
|
|
|
1
1
|
import { A as Actor, p as GraphReFlyConfig, V as VersioningLevel, a as Node, b as Messages, K as NodeSink } from './node-fSc-hCv8.cjs';
|
|
2
|
-
import { b as DescribeNodeOutput, D as DescribeDetail, a as DescribeField } from './meta-
|
|
2
|
+
import { b as DescribeNodeOutput, D as DescribeDetail, a as DescribeField } from './meta-DreaEM_a.cjs';
|
|
3
3
|
import { StorageHandle } from './extra/storage-core.cjs';
|
|
4
4
|
import { SnapshotStorageTier } from './extra/storage-tiers.cjs';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Pure structural diff over `GraphDescribeOutput` snapshots.
|
|
8
|
+
*
|
|
9
|
+
* Produces a {@link DescribeChangeset} of {@link DescribeEvent}s describing the
|
|
10
|
+
* topology delta from `prev` → `next`. Used by `Graph.describe({ reactive:
|
|
11
|
+
* "diff" })` internally and re-exported here for static-snapshot diffing
|
|
12
|
+
* (e.g. computing the topology delta between two persisted snapshots without
|
|
13
|
+
* spinning up a live graph).
|
|
14
|
+
*
|
|
15
|
+
* Topology-only — no value/state events. The data layer lives in
|
|
16
|
+
* `Graph.observe`. Per Tier 1.5.1 (locked Session A.1), `DescribeEvent` and
|
|
17
|
+
* {@link ObserveEvent} have disjoint type sets so a consumer can route both
|
|
18
|
+
* streams without ambiguity.
|
|
19
|
+
*
|
|
20
|
+
* `flushedAt_ns` is taken from `core/clock.ts`'s `monotonicNs()` so callers can
|
|
21
|
+
* order changesets across the same process without wall-clock skew.
|
|
22
|
+
*
|
|
23
|
+
* @module
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Meta dictionary attached to a node, as surfaced by
|
|
28
|
+
* {@link DescribeNodeOutput.meta}. Aliased here so {@link DescribeEvent}'s
|
|
29
|
+
* `node-meta-changed` variant has a stable, narrow type.
|
|
30
|
+
*/
|
|
31
|
+
type Meta = Record<string, unknown>;
|
|
32
|
+
/**
|
|
33
|
+
* One topology delta between two `describe()` snapshots. Disjoint from
|
|
34
|
+
* `ObserveEvent` (the data-layer envelope).
|
|
35
|
+
*/
|
|
36
|
+
type DescribeEvent = {
|
|
37
|
+
type: "node-added";
|
|
38
|
+
path: string;
|
|
39
|
+
node: DescribeNodeOutput;
|
|
40
|
+
} | {
|
|
41
|
+
type: "node-removed";
|
|
42
|
+
path: string;
|
|
43
|
+
} | {
|
|
44
|
+
type: "node-meta-changed";
|
|
45
|
+
path: string;
|
|
46
|
+
prevMeta: Meta;
|
|
47
|
+
nextMeta: Meta;
|
|
48
|
+
} | {
|
|
49
|
+
type: "edge-added";
|
|
50
|
+
from: string;
|
|
51
|
+
to: string;
|
|
52
|
+
} | {
|
|
53
|
+
type: "edge-removed";
|
|
54
|
+
from: string;
|
|
55
|
+
to: string;
|
|
56
|
+
} | {
|
|
57
|
+
type: "subgraph-mounted";
|
|
58
|
+
path: string;
|
|
59
|
+
} | {
|
|
60
|
+
type: "subgraph-unmounted";
|
|
61
|
+
path: string;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Coalesced batch of {@link DescribeEvent}s emitted as a single DATA wave by
|
|
65
|
+
* `Graph.describe({ reactive: "diff" })` per outermost batch flush.
|
|
66
|
+
*
|
|
67
|
+
* `flushedAt_ns` is monotonic (from `core/clock.ts`); compare against another
|
|
68
|
+
* changeset's `flushedAt_ns` to order them. `events` is empty only when
|
|
69
|
+
* `topologyDiff` is called with two structurally identical snapshots; reactive
|
|
70
|
+
* variants suppress empty changesets so consumers don't see no-op DATA waves.
|
|
71
|
+
*/
|
|
72
|
+
type DescribeChangeset = {
|
|
73
|
+
events: ReadonlyArray<DescribeEvent>;
|
|
74
|
+
flushedAt_ns: number;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Pure topology delta from `prev` → `next`. No I/O, no node references — purely
|
|
78
|
+
* over the JSON shape `Graph.describe()` returns.
|
|
79
|
+
*
|
|
80
|
+
* Event ordering within a changeset:
|
|
81
|
+
* 1. `subgraph-mounted` (added subgraphs first — their nodes follow)
|
|
82
|
+
* 2. `node-added`
|
|
83
|
+
* 3. `node-meta-changed`
|
|
84
|
+
* 4. `edge-added`
|
|
85
|
+
* 5. `edge-removed`
|
|
86
|
+
* 6. `node-removed`
|
|
87
|
+
* 7. `subgraph-unmounted` (last — node removals already reported)
|
|
88
|
+
*
|
|
89
|
+
* Each group is emitted in code-point sort order on the path / `${from}->${to}`
|
|
90
|
+
* key so the changeset is deterministic across runs (useful for snapshot
|
|
91
|
+
* tests and golden-output assertions).
|
|
92
|
+
*/
|
|
93
|
+
declare function topologyDiff(prev: GraphDescribeOutput, next: GraphDescribeOutput): DescribeChangeset;
|
|
94
|
+
|
|
6
95
|
/**
|
|
7
96
|
* Causal walkback over a {@link Graph.describe} snapshot (roadmap §9.2).
|
|
8
97
|
*
|
|
@@ -222,6 +311,25 @@ interface GraphOptions {
|
|
|
222
311
|
* time — not mutable afterward (ring buffers can't resize cleanly).
|
|
223
312
|
*/
|
|
224
313
|
traceCapacity?: number;
|
|
314
|
+
/**
|
|
315
|
+
* Tier 1.5.3 Phase 2.5 (Session A.1 lock + Phase 2.5 design DG1=B, 2026-04-27).
|
|
316
|
+
* Top-level factory identifier for Graph-returning factories (`agentMemory`,
|
|
317
|
+
* `harnessLoop`, `pipelineGraph`, etc.). When set, `describe()` surfaces
|
|
318
|
+
* `factory` + `factoryArgs` at the top of `GraphDescribeOutput` so consumers
|
|
319
|
+
* can identify provenance, and `compileSpec` can delegate reconstruction to
|
|
320
|
+
* `catalog.graphFactories[factory]` with `factoryArgs`. Prefer the
|
|
321
|
+
* post-construction `Graph.prototype.tagFactory(name, args?)` mutator inside
|
|
322
|
+
* the factory body over passing here directly.
|
|
323
|
+
*/
|
|
324
|
+
factory?: string;
|
|
325
|
+
/**
|
|
326
|
+
* JSON-serializable subset of the construction args. For non-JSON fields
|
|
327
|
+
* (LLMAdapter, callbacks, embedders), prefer the {@link placeholderArgs}
|
|
328
|
+
* helper which substitutes descriptive `"<Node>"` / `"<function>"` strings
|
|
329
|
+
* (DG2 = ii). Catalog `graphFactories` recipients receive this back during
|
|
330
|
+
* `compileSpec` to recreate the graph with the user-supplied runtime ctx.
|
|
331
|
+
*/
|
|
332
|
+
factoryArgs?: unknown;
|
|
225
333
|
[key: string]: unknown;
|
|
226
334
|
}
|
|
227
335
|
/** Filter for {@link Graph.describe} — object-style partial match or predicate. */
|
|
@@ -332,14 +440,18 @@ type GraphDescribeOptions = {
|
|
|
332
440
|
*/
|
|
333
441
|
asciiCharset?: "unicode" | "ascii";
|
|
334
442
|
/**
|
|
335
|
-
* Reactive describe (D2):
|
|
336
|
-
*
|
|
337
|
-
*
|
|
338
|
-
* {@link Graph.explain} with
|
|
339
|
-
*
|
|
340
|
-
*
|
|
341
|
-
|
|
342
|
-
|
|
443
|
+
* Reactive describe (D2):
|
|
444
|
+
* - `true` — return `{ node, dispose }` where `node` emits a fresh
|
|
445
|
+
* `GraphDescribeOutput` (or format string, if `format` is set) every time
|
|
446
|
+
* the graph state settles. Same coalescing as {@link Graph.explain} with
|
|
447
|
+
* `{ reactive: true }`.
|
|
448
|
+
* - `"diff"` — return `{ node, dispose }` where `node` emits a
|
|
449
|
+
* {@link DescribeChangeset} per topology change. Empty changesets are
|
|
450
|
+
* suppressed; the initial cache is a synthetic full-add diff so a fresh
|
|
451
|
+
* subscriber sees the current topology as adds via push-on-subscribe.
|
|
452
|
+
* (Tier 1.5.1 — Session A.1 lock).
|
|
453
|
+
*/
|
|
454
|
+
reactive?: boolean | "diff";
|
|
343
455
|
/** Reactive-only: name for the backing derived node (default `"describe"`). */
|
|
344
456
|
reactiveName?: string;
|
|
345
457
|
};
|
|
@@ -357,6 +469,16 @@ type GraphDescribeOutput = {
|
|
|
357
469
|
to: string;
|
|
358
470
|
}>;
|
|
359
471
|
subgraphs: string[];
|
|
472
|
+
/**
|
|
473
|
+
* Top-level factory identifier (Tier 1.5.3 Phase 2.5 — DG1=B). Present when
|
|
474
|
+
* the graph was constructed by a Graph-returning factory that called
|
|
475
|
+
* `Graph.prototype.tagFactory(name, args?)` (or set `GraphOptions.factory`).
|
|
476
|
+
* Used by `compileSpec` for catalog-based reconstruction via
|
|
477
|
+
* `catalog.graphFactories[factory]`.
|
|
478
|
+
*/
|
|
479
|
+
factory?: string;
|
|
480
|
+
/** JSON-serializable construction args paired with `factory`. */
|
|
481
|
+
factoryArgs?: unknown;
|
|
360
482
|
/**
|
|
361
483
|
* Re-read the live graph with higher detail (Phase 3.3b).
|
|
362
484
|
* Returns a new `GraphDescribeOutput`; the original remains a snapshot.
|
|
@@ -519,6 +641,26 @@ type GraphObserveAll = {
|
|
|
519
641
|
* - `"full"` — standard + timeline + causal + derived.
|
|
520
642
|
*/
|
|
521
643
|
type ObserveDetail = "minimal" | "standard" | "full";
|
|
644
|
+
/**
|
|
645
|
+
* Tier name for {@link ObserveEvent} filtering. Aligns with spec §1.2 message
|
|
646
|
+
* tier semantics — each `ObserveTier` corresponds to one or more protocol
|
|
647
|
+
* message types. Used by {@link ObserveOptions.tiers} to scope observation to
|
|
648
|
+
* a subset of event categories (e.g. `tiers: ["error", "complete", "teardown"]`
|
|
649
|
+
* for failure-only health monitoring).
|
|
650
|
+
*/
|
|
651
|
+
type ObserveTier = ObserveEvent["type"];
|
|
652
|
+
/**
|
|
653
|
+
* Coalesced batch of {@link ObserveEvent}s emitted as one DATA wave per
|
|
654
|
+
* outermost batch flush by `Graph.observe({ reactive: true })`.
|
|
655
|
+
*
|
|
656
|
+
* Disjoint from `DescribeChangeset` (the topology-layer envelope). Each event
|
|
657
|
+
* carries its own `path` so consumers route per-path without unwrapping the
|
|
658
|
+
* envelope first. `flushedAt_ns` is monotonic via `core/clock.ts`.
|
|
659
|
+
*/
|
|
660
|
+
type ObserveChangeset = {
|
|
661
|
+
events: ReadonlyArray<ObserveEvent>;
|
|
662
|
+
flushedAt_ns: number;
|
|
663
|
+
};
|
|
522
664
|
/** Options for structured observation modes on {@link Graph.observe}. */
|
|
523
665
|
type ObserveOptions = {
|
|
524
666
|
actor?: Actor;
|
|
@@ -536,6 +678,27 @@ type ObserveOptions = {
|
|
|
536
678
|
* `"minimal"` filters to DATA-only events.
|
|
537
679
|
*/
|
|
538
680
|
detail?: ObserveDetail;
|
|
681
|
+
/**
|
|
682
|
+
* Filter observed events to these tiers only. When omitted, all event types
|
|
683
|
+
* are delivered. Applies to both the structured callback and the reactive
|
|
684
|
+
* variants (`observe({ reactive: true })`).
|
|
685
|
+
*
|
|
686
|
+
* Example: `tiers: ["error", "complete", "teardown"]` for failure-only
|
|
687
|
+
* health monitoring; `tiers: ["data"]` for value-flow tracking.
|
|
688
|
+
*/
|
|
689
|
+
tiers?: readonly ObserveTier[];
|
|
690
|
+
/**
|
|
691
|
+
* Return a `Node<ObserveChangeset>` that emits one DATA wave per outermost
|
|
692
|
+
* batch flush, with all observed events for that flush coalesced into a
|
|
693
|
+
* single changeset. Auto-enables structured mode (the reactive variant
|
|
694
|
+
* delivers {@link ObserveEvent}s, not raw messages).
|
|
695
|
+
*
|
|
696
|
+
* Coalescing matches `describe({ reactive: true })`'s `registerBatchFlushHook`
|
|
697
|
+
* mechanism — N events in one batch → one changeset DATA wave at flush.
|
|
698
|
+
*/
|
|
699
|
+
reactive?: boolean;
|
|
700
|
+
/** Optional name for the reactive changeset node when `reactive: true`. */
|
|
701
|
+
reactiveName?: string;
|
|
539
702
|
/**
|
|
540
703
|
* When set, auto-enables structured mode and attaches a logger.
|
|
541
704
|
* - `"pretty"` — colored one-line output per event.
|
|
@@ -755,7 +918,24 @@ declare class Graph {
|
|
|
755
918
|
* equal the reserved meta segment `__meta__`).
|
|
756
919
|
* @param opts - See {@link GraphOptions}. Stored frozen on the instance.
|
|
757
920
|
*/
|
|
921
|
+
/** Tier 1.5.3 Phase 2.5 — top-level factory tag for Graph-returning factories. */
|
|
922
|
+
private _factory?;
|
|
923
|
+
private _factoryArgs?;
|
|
758
924
|
constructor(name: string, opts?: GraphOptions);
|
|
925
|
+
/**
|
|
926
|
+
* Tag this graph with its constructing factory's identifier and args.
|
|
927
|
+
* Used by Graph-returning factories (`agentMemory`, `harnessLoop`,
|
|
928
|
+
* `pipelineGraph`, etc.) so `describe()` exposes provenance and
|
|
929
|
+
* `compileSpec` can delegate reconstruction to
|
|
930
|
+
* `catalog.graphFactories[factory]`. Tier 1.5.3 Phase 2.5 (DG1=B).
|
|
931
|
+
*
|
|
932
|
+
* `factoryArgs` should be JSON-serializable. For non-JSON fields
|
|
933
|
+
* (LLMAdapter, callbacks, etc.), use {@link placeholderArgs} to
|
|
934
|
+
* substitute descriptive strings (DG2=ii).
|
|
935
|
+
*
|
|
936
|
+
* Returns `this` for fluent chaining inside factory bodies.
|
|
937
|
+
*/
|
|
938
|
+
tagFactory(factory: string, factoryArgs?: unknown): this;
|
|
759
939
|
/**
|
|
760
940
|
* Walk ancestors up through `_parent`. Returns the chain starting at this
|
|
761
941
|
* instance, ending at the root (a graph with no parent). O(depth).
|
|
@@ -1015,6 +1195,9 @@ declare class Graph {
|
|
|
1015
1195
|
reactive: true;
|
|
1016
1196
|
format: "json" | "pretty" | "mermaid" | "mermaid-url" | "d2" | "ascii";
|
|
1017
1197
|
}): ReactiveDescribeHandle<string>;
|
|
1198
|
+
describe(options: GraphDescribeOptions & {
|
|
1199
|
+
reactive: "diff";
|
|
1200
|
+
}): ReactiveDescribeHandle<DescribeChangeset>;
|
|
1018
1201
|
describe(options: GraphDescribeOptions & {
|
|
1019
1202
|
reactive: true;
|
|
1020
1203
|
}): ReactiveDescribeHandle<GraphDescribeOutput>;
|
|
@@ -1076,6 +1259,14 @@ declare class Graph {
|
|
|
1076
1259
|
};
|
|
1077
1260
|
private _explainStatic;
|
|
1078
1261
|
private _describeReactive;
|
|
1262
|
+
/**
|
|
1263
|
+
* Reactive topology-diff variant of `describe()`. Wraps `_describeReactive`'s
|
|
1264
|
+
* snapshot stream and emits a `DescribeChangeset` per change, suppressing
|
|
1265
|
+
* empty changesets. The initial cache is a synthetic full-add diff so a
|
|
1266
|
+
* fresh subscriber sees the current topology as a single `node-added` /
|
|
1267
|
+
* `edge-added` / `subgraph-mounted` payload via push-on-subscribe.
|
|
1268
|
+
*/
|
|
1269
|
+
private _describeReactiveDiff;
|
|
1079
1270
|
private _explainReactive;
|
|
1080
1271
|
/**
|
|
1081
1272
|
* @internal Collect all qualified paths in this graph tree matching a
|
|
@@ -1102,10 +1293,26 @@ declare class Graph {
|
|
|
1102
1293
|
* `ObserveResult` is also an `AsyncIterable<ObserveEvent>` — use
|
|
1103
1294
|
* `for await (const ev of result)` for pull-based consumption.
|
|
1104
1295
|
*/
|
|
1296
|
+
observe(path: string, options: ObserveOptions & {
|
|
1297
|
+
reactive: true;
|
|
1298
|
+
}): Node<ObserveChangeset>;
|
|
1299
|
+
observe(options: ObserveOptions & {
|
|
1300
|
+
reactive: true;
|
|
1301
|
+
}): Node<ObserveChangeset>;
|
|
1105
1302
|
observe(path: string, options?: ObserveOptions & StructuredTriggers): ObserveResult;
|
|
1106
1303
|
observe(path: string, options?: ObserveOptions): GraphObserveOne;
|
|
1107
1304
|
observe(options: ObserveOptions & StructuredTriggers): ObserveResult;
|
|
1108
1305
|
observe(options?: ObserveOptions): GraphObserveAll;
|
|
1306
|
+
/**
|
|
1307
|
+
* Reactive observe variant — wraps the structured observer and emits one
|
|
1308
|
+
* `ObserveChangeset` DATA per outermost batch flush, with all observed
|
|
1309
|
+
* events for that flush coalesced into a single envelope. Tier filter
|
|
1310
|
+
* (`options.tiers`) drops out-of-scope events before accumulation.
|
|
1311
|
+
*
|
|
1312
|
+
* Cleanup is producer-bound: the structured observer is torn down when the
|
|
1313
|
+
* last consumer of the returned node unsubscribes.
|
|
1314
|
+
*/
|
|
1315
|
+
private _observeReactive;
|
|
1109
1316
|
/** Dispatch helper — builds a unified observer + its expand closure. */
|
|
1110
1317
|
private _buildStructuredObserver;
|
|
1111
1318
|
/**
|
|
@@ -1482,4 +1689,4 @@ declare function reachable(described: GraphDescribeOutput, from: string, directi
|
|
|
1482
1689
|
}): ReachableResult;
|
|
1483
1690
|
declare function reachable(described: GraphDescribeOutput, from: string, direction: ReachableDirection, options?: ReachableOptions): string[];
|
|
1484
1691
|
|
|
1485
|
-
export { type
|
|
1692
|
+
export { type ObserveTheme as A, type ObserveThemeName as B, type CausalChain as C, type DescribeFilter as D, type ExplainPathOptions as E, type ReachableOptions as F, Graph as G, type TraceEntry as H, diffForWAL as I, explainPath as J, graphProfile as K, mermaidLiveUrl as L, type Meta as M, type NodeProfile as N, type ObserveDetail as O, reachable as P, topologyDiff as Q, type ReachableDirection as R, SNAPSHOT_VERSION as S, type TopologyEvent as T, type GraphOptions as a, type GraphPersistSnapshot as b, type GraphDescribeOptions as c, type GraphDescribeOutput as d, type CausalStep as e, type DescribeChangeset as f, type DescribeEvent as g, GRAPH_META_SEGMENT as h, type GraphActorOptions as i, type GraphAttachStorageOptions as j, type GraphCheckpointRecord as k, type GraphDiagramDirection as l, type GraphDiagramOptions as m, type GraphDiffChange as n, type GraphDiffResult as o, type GraphFactoryContext as p, type GraphNodeFactory as q, type GraphObserveAll as r, type GraphObserveOne as s, type GraphProfileOptions as t, type GraphProfileResult as u, type GraphVersionChange as v, type GraphWALDiff as w, type ObserveEvent as x, type ObserveOptions as y, type ObserveResult as z };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { P as PolicyRuleData, a as Node, A as Actor } from './node-fSc-hCv8.js';
|
|
2
|
-
import { G as Graph, a as GraphOptions, c as GraphDescribeOptions, d as GraphDescribeOutput, D as DescribeFilter } from './graph-
|
|
3
|
-
import { P as PolicyEnforcerGraph, a as PolicyViolation } from './index-
|
|
4
|
-
import { T as TopicGraph } from './index-
|
|
2
|
+
import { G as Graph, a as GraphOptions, c as GraphDescribeOptions, d as GraphDescribeOutput, D as DescribeFilter } from './graph-BjW1taJl.js';
|
|
3
|
+
import { P as PolicyEnforcerGraph, a as PolicyViolation } from './index-DJVQ-t07.js';
|
|
4
|
+
import { T as TopicGraph } from './index-BUFCHvOR.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Composable safety layer (roadmap §9.0b).
|