@fabric-harness/node

中文文档
6.7.1发布于 2026/11/08Apache-2.0TypeScriptES Module近 30 天下载 5307

Node.js runtime, build pipeline, dev server, and pluggable persistence bundles for TechFabric Harness.

原始使用文档
文档目录5 节
  1. Install
  2. What's in the box
  3. Typical usage
  4. Documentation
  5. License

@fabric-harness/node

Node.js runtime, build pipeline, dev server, and pluggable persistence bundles for TechFabric 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/sdk

What's in the box

  • Agent loader — discovers .fabricharness/agents/*.ts, transpiles them on-the-fly for fh dev / fh run.
  • Skill / role loader — reads .fabricharness/skills/*.md and .fabricharness/roles/*.md with 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:, or patch: are bundled into the output. Source-only specifiers are omitted from the generated package.json, so a deployment system can stage the directory without the producer monorepo or unpublished shared-contract package.
  • Dev server — startDevServer() exposes every agent as POST /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(), and libsqlPersistence() 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 (with perTool breakdown), shell durations, artifacts, mounts (count / total bytes / total files / perSource byte 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 TechFabric 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

版本与发布记录

@fabric-harness/node 共发布 81 个版本,首次发布于 2026/05/06;过去 12 个月发布了 81 个版本。

版本发布日期距今
6.7.1latest2026/11/086 天前
6.7.02026/11/0311 天前
6.6.02026/10/3114 天前
6.5.12026/10/1728 天前
6.5.02026/09/301 个月前
6.4.02026/09/251 个月前

关于 @fabric-harness/node 的常见问题

@fabric-harness/node 是什么?

Node.js runtime, build pipeline, dev server, and pluggable persistence bundles for TechFabric Harness.

如何安装 @fabric-harness/node?

在项目目录运行 npm install @fabric-harness/node,或使用 pnpm add / yarn add / bun add。

@fabric-harness/node 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@fabric-harness/node 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@fabric-harness/node 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.19.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@fabric-harness/node 可以商用吗?

@fabric-harness/node 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@fabric-harness/node 的下载量有多少?

根据 npm 官方下载统计,@fabric-harness/node 在 2026/10/14 – 2026/11/12 这 30 天内被下载 5,307 次,日均约 177 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@fabric-harness/node 还在维护吗?

最新版本 6.7.1 发布于 2026/11/08(6 天前);至今共发布 81 个版本,其中过去 12 个月发布了 81 个;首次发布于 2026/05/06。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。