@ruvnet/agent-harness-generator
v0.1.3
Published
Library/core package for the Agent Harness Generator. Pair with `metaharness` for the CLI. Re-exports scaffold(), validate(), and the deterministic-analysis pipeline from `metaharness` so consumers can `import { scaffold } from '@ruvnet/agent-harness-gene
Maintainers
Readme
@ruvnet/agent-harness-generator
Library / core package for the Agent Harness Generator. Pair with
metaharnessfor the CLI.
What this is
The library half of the dual-package model. If you want to run the
generator, use metaharness. If you want to import it from your own code,
use this package.
# Run it (CLI)
npx metaharness my-bot --template vertical:coding
# Import it (library)
npm install @ruvnet/agent-harness-generatorimport {
scaffold,
validateHarnessName,
HOSTS,
TEMPLATES,
} from '@ruvnet/agent-harness-generator';
// Generate a harness programmatically:
const result = await scaffold({
name: 'my-bot',
template: 'vertical:coding',
host: 'claude-code',
targetDir: '/tmp/my-bot',
force: true,
generatorVersion: '0.1.0',
});
console.log(`wrote ${result.files.length} files`);What's exported
| Group | Exports |
|---|---|
| Scaffold pipeline | scaffold, parseArgs, main, detectRufloProject, templateDir |
| Catalog surface | HOSTS, TEMPLATES, loadCatalog, formatCatalog |
| Rendering | render, extractVarReferences, validateHarnessName, walkTemplate, asFileMap, writeAtomic |
| Manifest / fingerprinting | emptyManifest, sha256, fingerprintFiles, diffFingerprints |
| Types | Host, TemplateId, CatalogEntry, CliArgs, ScaffoldOptions, ScaffoldResult, TemplateVars |
The full per-subcommand surface (validate / sbom / audit / score / genome /
threat-model / …) lives in metaharness. We re-export the generation
primitives here; per-subcommand commands stay CLI-only because they assume
the harness has already been written to disk and is being inspected.
How the dual-package model works
┌─────────────────────────────────┐
│ metaharness │ ← the published CLI
│ • bin: metaharness, harness │ `npx metaharness`
│ • full implementation │ `npx metaharness score ./my-bot`
│ • full JS API │
└────────────┬────────────────────┘
│ depends on
┌────────────┴────────────────────┐
│ @ruvnet/agent-harness-generator │ ← this package: thin re-export
│ • no bin │ `import { scaffold } from …`
│ • re-exports the library API │
└─────────────────────────────────┘One source of truth. Two published names. The wrapper has no implementation — if logic ever leaks into this package, it's a bug.
When to use which
metaharness— you want the command-line tool, full subcommand surface, marketplace plugin, Codex skills.@ruvnet/agent-harness-generator— you're embedding the generator in a build script, a web service, or another tool, and don't want thebinbaggage.
Version pinning
This package always depends on the same minor version of metaharness. A
patch release of metaharness doesn't bump us automatically — we cut a
matching patch and re-publish so the dependency stays tight.
License
MIT — see LICENSE.
