@plateer-xgen/harness-engine-node
v0.31.3
Published
TypeScript engine for xgen-harness — reads spec.json (compiled from Python harness workflow) and runs the same 13-stage pipeline. v0.31.3: 도구 호출 시 미설정 env 명시 안내 (http secret / rag QDRANT_URL·HARNESS_RAG_ENDPOINT / mcp env_keys·MCP_STATION_BASE_URL) — pyth
Readme
xgen-harness-engine-node
TypeScript engine for xgen-harness — reads spec.json (compiled from a
Python harness workflow) and runs the same 13-stage pipeline. Fully
equivalent — every stage setting from the original workflow is preserved.
Install
npm install xgen-harness-engine-nodeUse as MCP server
Wrapper packages (e.g. xgen-harness-my_agent) bundle a spec.json plus a
1-line bin/cli.js that calls this engine:
const { serveMcp } = require("xgen-harness-engine-node");
const spec = require("./spec.json");
serveMcp(spec);The wrapper is the unit Claude Desktop / Cursor / mcp-station picks up:
{
"mcpServers": {
"my-agent": {
"command": "npx",
"args": ["-y", "xgen-harness-my_agent"]
}
}
}Programmatic use
import { runOnce, loadSpec } from "xgen-harness-engine-node";
const spec = loadSpec("./spec.json");
const result = await runOnce(spec, "What is 2+2?");
console.log(result.output);What's inside
- 13 pipeline stages (s00_harness ... s11_finalize) ported 1:1 from the
Python
xgen-harnessengine - 4 LLM providers — Anthropic, OpenAI, vLLM (with Qwen native
<tool_call>XML parser), Bedrock-ready - 4 builtin Policy Guards — cost_cap / max_loop / pii_block / domain_allow
- Tool dispatch — http / mcp_session / rag (frozen at publish time, no Python NodeClass dependency)
Spec source
A spec.json is produced by Python:
from xgen_harness.compile import compile_workflow_to_npm
result = compile_workflow_to_npm(
harness_config=config,
gallery_name="my_agent",
gallery_version="0.1.0",
out_dir="./dist",
)This produces a complete npm tarball (xgen-harness-my_agent-0.1.0.tgz)
with the wrapper + spec + cli.
License
UNLICENSED (private use). Contact the maintainer for distribution rights.
