npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@x12i/graphenix-trace-format

v2.7.1

Published

GraphExecutionTrace format: append-only events, validation, and trace helpers.

Readme

@x12i/graphenix-trace-format

GraphExecutionTrace format — append-only run evidence for a single graph execution.

Covers node traces, execution unit traces, model invocation attempts, fallback events, and final output. Does not depend on authoring graphs.

Canonical vocabulary: GLOSSARY.md — task run phases map to trace unit.* events in plan order.
Finalization brief: EXECUTE-TRACE-FORMAT-FINALIZATION.md.

Do not use “Synthesis PRE” in trace docs — use PRE-phase utility / externalPreUtility with strategyKey.


Who should use this

| Role | Use this package? | | ---- | ----------------- | | Execution engine | Yes — create and append events during a run | | Run history / observability / analytics | Yes — validate and read traces | | Graph designer / Studio | No (unless displaying run history) |


Lifecycle position

ExecutableGraphPlan + GraphRuntimeObject
        │  engine executes executionUnits[] (prePhase → mainPhase → postPhase)
        ▼
GraphExecutionTrace              ← THIS PACKAGE

Reference domain: content pipeline plan (graph:content-pipeline) — three parallel tasks with PRE synthesis + MAIN skill, no POST on reference tasks.


Install

npm install @x12i/graphenix-trace-format

Trace document shape

GraphExecutionTrace
  ├─ traceId, jobId, status, createdAt, completedAt
  ├─ source — graphId, graphHash (from plan)
  ├─ plan — planId, planHash (bind trace to frozen plan)
  ├─ runtime — mode, environment, inputHash (no credentials)
  ├─ events[] — append-only, ordered
  └─ nodeExecutions{} — per-node unit summaries

Examples (JSON)

Trace header (bound to content pipeline plan)

{
  "format": "graphenix.execution-trace/v1",
  "traceId": "trace:job-001",
  "jobId": "job-001",
  "createdAt": "2026-06-06T12:00:00.000Z",
  "status": "running",
  "source": {
    "graphId": "graph:content-pipeline",
    "graphRevision": "1.0.0",
    "graphHash": "sha256:…"
  },
  "plan": {
    "planId": "plan:abc123",
    "planHash": "sha256:…"
  },
  "runtime": {
    "mode": "live",
    "environment": "prod",
    "inputHash": "sha256:…"
  },
  "events": [],
  "nodeExecutions": {}
}

Unit events for one content-pipeline task (PRE + MAIN)

After node:audience-insights runs PRE-phase utility synthesis then MAIN skill:

"events": [
  {
    "id": "evt:1",
    "ts": "2026-06-06T12:00:01.000Z",
    "level": "info",
    "type": "node.started",
    "nodeId": "node:audience-insights"
  },
  {
    "id": "evt:2",
    "ts": "2026-06-06T12:00:01.100Z",
    "level": "info",
    "type": "unit.started",
    "nodeId": "node:audience-insights",
    "unitId": "unit:node:audience-insights:pre:0",
    "unitKind": "externalPreUtility"
  },
  {
    "id": "evt:3",
    "ts": "2026-06-06T12:00:02.500Z",
    "level": "info",
    "type": "model.invocation.completed",
    "nodeId": "node:audience-insights",
    "unitId": "unit:node:audience-insights:pre:0",
    "modelSlot": "preActionModel"
  },
  {
    "id": "evt:4",
    "ts": "2026-06-06T12:00:02.600Z",
    "level": "info",
    "type": "unit.started",
    "nodeId": "node:audience-insights",
    "unitId": "unit:node:audience-insights:main:1",
    "unitKind": "mainSkill"
  },
  {
    "id": "evt:5",
    "ts": "2026-06-06T12:00:05.000Z",
    "level": "info",
    "type": "node.completed",
    "nodeId": "node:audience-insights"
  }
]

Model profiles were resolved at compile time — trace records which modelSlot was invoked, not a re-selected case.


Example (API)

import {
  createExecutionTrace,
  appendExecutionEvent,
  validateExecutionTrace,
  deriveGraphStatus,
  summarizeExecutionTrace
} from "@x12i/graphenix-trace-format";

const trace = createExecutionTrace(plan, runtime);

appendExecutionEvent(trace, {
  id: "evt:1",
  ts: new Date().toISOString(),
  level: "info",
  type: "graph.started",
  message: "Graph execution started."
});

appendExecutionEvent(trace, {
  id: "evt:2",
  ts: new Date().toISOString(),
  level: "info",
  type: "node.started",
  nodeId: "node:audience-insights"
});

const result = validateExecutionTrace(trace, plan.nodePlans);
const status = deriveGraphStatus(trace);
const summary = summarizeExecutionTrace(trace);

Key exports

| API | Purpose | | --- | ------- | | createExecutionTrace | Initialize trace bound to a plan + runtime | | appendExecutionEvent | Append-only event mutation | | validateExecutionTrace | Validate trace against plan node plans | | deriveGraphStatus | Overall run status from events | | deriveNodeStatusFromUnits | Per-node status | | summarizeExecutionTrace | Compact summary for dashboards | | createContentPipelineReferenceTrace(plan, options?) | Build completed CP trace for tests and golden fixtures |

Trace event types include graph/node lifecycle, execution unit lifecycle (unit.started / unit.completed), model invocation, fallback applied, validation failures, and warnings.

Event catalog (required fields per type): execution-logs.md · golden trace: fixtures/content-pipeline.trace.json


Validation tier

| When | API | | ---- | --- | | Run end (engine) | validateExecutionTrace(trace, plan.nodePlans) | | Index / analytics | validateExecutionTrace before storing | | Dashboards | deriveGraphStatus, summarizeExecutionTrace |

Store planHash (or full plan snapshot) with each trace for strict replay validation.


Format identifiers

EXECUTION_TRACE_FORMAT     // v1 — @x12i/graphenix-executable-contracts
EXECUTION_TRACE_FORMAT_V2  // v2 — when plan is v2

Dependencies

  • @x12i/graphenix-executable-contracts ^1.1.0

Related packages

| Package | Role | | ------- | ---- | | GLOSSARY.md | Phase vocabulary for unit events | | @x12i/graphenix-plan-format | Plan shape traces reference | | @x12i/graphenix-plan-compiler | Produces the plan a trace is bound to | | EXECUTE-TRACE-FORMAT-FINALIZATION.md | Execute + trace phase brief | | observability role guide | Run history client guide |


README sync policy

When documenting task run phases at execution/trace layer, update together:

| Layer | README / doc | | ----- | ------------ | | Compiled plan units | plan-format/README.md | | Trace events | this file | | Execute + trace brief | EXECUTE-TRACE-FORMAT-FINALIZATION.md | | Terms of record | GLOSSARY.md |