@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 +21 -6
- package/app-dist/assets/index-BMTuPr57.js +126 -0
- package/app-dist/assets/index-CWG3ZSzH.css +1 -0
- package/app-dist/index.html +2 -2
- package/app-single/index.html +48 -26
- package/package.json +4 -2
- package/src/components/DebugPanel.tsx +12 -3
- package/src/components/EventGraph.tsx +462 -0
- package/src/components/index.ts +1 -0
- package/src/components/styles.css +270 -0
- package/src/filter.ts +6 -2
- package/src/graph.test.ts +222 -0
- package/src/graph.ts +360 -0
- package/src/index.ts +16 -0
- package/app-dist/assets/index-CK8ArLzP.css +0 -1
- package/app-dist/assets/index-CwTwcQ4d.js +0 -104
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**,
|
|
5
|
-
tab split) — plus a standalone single-page app, built
|
|
6
|
-
(`app-dist/`) and as one self-contained file
|
|
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).
|