@fabric-harness/node
v6.1.0
Published
Node.js runtime, build pipeline, dev server, and pluggable persistence bundles for Fabric Harness.
Readme
@fabric-harness/node
Node.js runtime, build pipeline, dev server, and pluggable persistence bundles for Fabric Harness.
Companion package to @fabric-harness/sdk. The SDK ships the runtime contract; this package provides the Node-flavored implementations that the CLI and most deployments use under the hood.
Install
npm install @fabric-harness/node @fabric-harness/sdk
# or
pnpm add @fabric-harness/node @fabric-harness/sdkWhat's in the box
- Agent loader — discovers
.fabricharness/agents/*.ts, transpiles them on-the-fly forfh dev/fh run. - Skill / role loader — reads
.fabricharness/skills/*.mdand.fabricharness/roles/*.mdwith frontmatter. - Build pipeline —
buildWorkspace({ target })for:node,temporal-worker,docker,cloudflare,foundry-hosted-agent,databricks-app,aks(k8s manifests with health probes),aca(azd + Bicep with scale-to-zero). Each emits a deployable artifact plus signed manifest, optional SBOM, optional in-toto attestation. - Portable packages — agent/job definitions, the v2 server, and dependencies reached through
workspace:,catalog:,file:,link:,portal:, orpatch:are bundled into the output. Source-only specifiers are omitted from the generatedpackage.json, so a deployment system can stage the directory without the producer monorepo or unpublished shared-contract package. - Dev server —
startDevServer()exposes every agent asPOST /agents/:agent/:id. - Session stores:
FileSessionStore— JSON files under.fabricharness/sessions/.SQLiteSessionStore— single-file embedded DB.PostgresSessionStore— production-grade durable store.createConfiguredSessionStore— pick by config.
- Complete persistence bundles —
memoryPersistence(),sqlitePersistence(),postgresPersistence(),redisPersistence(),mysqlPersistence(),mongodbPersistence(), andlibsqlPersistence()keep sessions, submissions, offsets, attachments, runs, costs, health, and cascade deletion on one backend. libSQL also covers remote Turso; Postgres and Redis-protocol clients cover Supabase/Lakebase and Valkey respectively. - Inspection helpers —
listSessions,inspectSession,getSessionMetrics,cancelSessionTask, etc. - Extended
SessionMetrics— token usage (input / output / total /costUsd), tool calls (withperToolbreakdown), shell durations, artifacts, mounts (count / total bytes / total files /perSourcebyte breakdown).
Typical usage
You usually don't import this package directly — the @fabric-harness/cli wraps it. Reach for it when you're building custom tooling on top of Fabric Harness or embedding the runtime in another Node app.
import { startDevServer, createConfiguredSessionStore } from '@fabric-harness/node';
const store = await createConfiguredSessionStore({ /* ... */ });
await startDevServer({ port: 8787, store });Documentation
License
Apache-2.0
