Tags and diagnostics
A tag names the kind of node. It is half the node’s identity and the label that appears in diagnostics.
Tags
Create a tag with Frond.tag(value).
tag: Frond.tag("resources/profile"),
The value must be a non-empty string with no whitespace. Use stable, path-like names — resources/profile, services/auth-session — that read well grouped in a list. The tag is part of the node id, so renaming it changes the identity of every node built from the spec. See Identity and keys.
Labels and ids
A node surfaces in two forms:
| Form | Shape | Example |
|---|---|---|
| Node id | tag:key | resources/profile:v1:{"userId":"u_42"} |
| Diagnostics label | kind:tag | resource:resources/profile |
The label carries the kind, which is why the kind is worth setting even though it does not change behavior.
Snapshots
A node snapshot is the inspectable state of one node. Each carries:
| Field | Description |
|---|---|
tag, kind, key, label | Identity and naming. |
status | Unwired, Invalid, or Wired with a run state of idle, pending, ready, or error. |
resultValidity | Current, Stale, or Expired. |
operation | The running operation, if any. |
operationFailure | The last operation failure. |
liveDemand | Whether the node is live, and its sources. |
Snapshots are passive — reading one never starts work or creates liveness demand.
Report sinks
The runtime emits events for readiness, operations, validity changes, eviction, liveness, and failures. Attach a sink to receive them. Frond.Diagnostics.createRuntimeReportSink turns raw events into readable reports.
import * as Frond from "@frondruntime/core";
const runtime = Frond.createRuntime({
sinks: [
Frond.Diagnostics.createRuntimeReportSink({
name: "console",
handleReport: ({ report }) => {
console.log(report);
},
}),
],
});
Frond.Diagnostics also exposes createErrorReport for projecting a single failure and serializeCauseChain for flattening an Effect cause into readable frames. See Error projection.
Next: React provider — the provider and hooks in depth.