@telorun/debug-ui 0.2.1 → 0.4.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 CHANGED
@@ -1,9 +1,24 @@
1
1
  # @telorun/debug-ui
2
2
 
3
3
  Browser-safe building blocks for watching a running Telo app's debug stream:
4
- **filter logic**, an **SSE client**, and **React components** (a **Logs / Events**
5
- tab split) — plus a standalone single-page app, built both multi-file
6
- (`app-dist/`) and as one self-contained file (`app-single/index.html`).
4
+ **filter logic**, an **SSE client**, a **graph model**, and **React components**
5
+ (a **Logs / Events / Graph** tab split) — plus a standalone single-page app, built
6
+ both multi-file (`app-dist/`) and as one self-contained file
7
+ (`app-single/index.html`).
8
+
9
+ The **Graph** view has two modes. Its left rail lists every traced **invocation**;
10
+ selecting one scopes the canvas to just the resources that took part in that call,
11
+ wired by the real parent→child **call edges** (reconstructed from event
12
+ `metadata.invocationId` / `parentInvocationId`), each node showing its
13
+ **inputs → outputs**. With nothing selected, the canvas shows the live **resource
14
+ topology**: a node is born gray on `Created`, brightens on `Initialized`, and
15
+ pulses on each invocation. The folds from frames to nodes/edges are the pure,
16
+ testable `deriveGraph` (topology) and `deriveInvocations` + `traceSubgraph`
17
+ (traces); the component adds [`@xyflow/react`](https://reactflow.dev) + dagre
18
+ layout on top.
19
+
20
+ Traces require the producer to be tracing — the CLI turns it on automatically
21
+ under `telo run --inspect` (or `--debug`).
7
22
 
8
23
  The **wire format** itself lives in [`@telorun/debug-wire`](../debug-wire); this
9
24
  package re-exports its types. A stream carries two frame kinds: `kind: "event"`
@@ -91,8 +106,8 @@ it only writes the `.telo.debug.jsonl` event log.
91
106
  ```ts
92
107
  // Logic — framework-agnostic, browser-safe
93
108
  import { connectDebugStream, matchesFilter, distinctSuffixes, isWireRef, eventSuffix,
94
- isLogFrame, endpointHref, type DebugFrame, type EventFilter,
95
- type AppEndpoint } from "@telorun/debug-ui";
109
+ isLogFrame, endpointHref, deriveGraph, type DebugFrame, type EventFilter,
110
+ type GraphState, type AppEndpoint } from "@telorun/debug-ui";
96
111
 
97
112
  // React components — for the standalone app and the editor panel
98
113
  import { DebugWatcher, DebugPanel } from "@telorun/debug-ui/components";
@@ -112,4 +127,4 @@ import { DebugWatcher, DebugPanel } from "@telorun/debug-ui/components";
112
127
  The single file is what the CLI fetches on demand (hosted on npm, delivered via
113
128
  jsDelivr) and serves; in the monorepo the CLI resolves it directly from this
114
129
  package, so a local build is testable without any network.
115
- - `pnpm --filter @telorun/debug-ui test` — unit tests (filter logic).
130
+ - `pnpm --filter @telorun/debug-ui test` — unit tests (filter + graph logic).