@ruvnet/agent-harness-generator 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +91 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +27 -0
- package/package.json +56 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 RuvNet (https://ruv.io)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# @ruvnet/agent-harness-generator
|
|
2
|
+
|
|
3
|
+
> Library / core package for the **Agent Harness Generator**. Pair with
|
|
4
|
+
> [`metaharness`](https://www.npmjs.com/package/metaharness) for the CLI.
|
|
5
|
+
|
|
6
|
+
## What this is
|
|
7
|
+
|
|
8
|
+
The **library** half of the dual-package model. If you want to **run** the
|
|
9
|
+
generator, use `metaharness`. If you want to **import** it from your own code,
|
|
10
|
+
use this package.
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
# Run it (CLI)
|
|
14
|
+
npx metaharness my-bot --template vertical:coding
|
|
15
|
+
|
|
16
|
+
# Import it (library)
|
|
17
|
+
npm install @ruvnet/agent-harness-generator
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
import {
|
|
22
|
+
scaffold,
|
|
23
|
+
validateHarnessName,
|
|
24
|
+
HOSTS,
|
|
25
|
+
TEMPLATES,
|
|
26
|
+
} from '@ruvnet/agent-harness-generator';
|
|
27
|
+
|
|
28
|
+
// Generate a harness programmatically:
|
|
29
|
+
const result = await scaffold({
|
|
30
|
+
name: 'my-bot',
|
|
31
|
+
template: 'vertical:coding',
|
|
32
|
+
host: 'claude-code',
|
|
33
|
+
targetDir: '/tmp/my-bot',
|
|
34
|
+
force: true,
|
|
35
|
+
generatorVersion: '0.1.0',
|
|
36
|
+
});
|
|
37
|
+
console.log(`wrote ${result.files.length} files`);
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## What's exported
|
|
41
|
+
|
|
42
|
+
| Group | Exports |
|
|
43
|
+
|---|---|
|
|
44
|
+
| **Scaffold pipeline** | `scaffold`, `parseArgs`, `main`, `detectRufloProject`, `templateDir` |
|
|
45
|
+
| **Catalog surface** | `HOSTS`, `TEMPLATES`, `loadCatalog`, `formatCatalog` |
|
|
46
|
+
| **Rendering** | `render`, `extractVarReferences`, `validateHarnessName`, `walkTemplate`, `asFileMap`, `writeAtomic` |
|
|
47
|
+
| **Manifest / fingerprinting** | `emptyManifest`, `sha256`, `fingerprintFiles`, `diffFingerprints` |
|
|
48
|
+
| **Types** | `Host`, `TemplateId`, `CatalogEntry`, `CliArgs`, `ScaffoldOptions`, `ScaffoldResult`, `TemplateVars` |
|
|
49
|
+
|
|
50
|
+
The full per-subcommand surface (validate / sbom / audit / score / genome /
|
|
51
|
+
threat-model / …) lives in `metaharness`. We re-export the *generation*
|
|
52
|
+
primitives here; per-subcommand commands stay CLI-only because they assume
|
|
53
|
+
the harness has already been written to disk and is being inspected.
|
|
54
|
+
|
|
55
|
+
## How the dual-package model works
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
┌─────────────────────────────────┐
|
|
59
|
+
│ metaharness │ ← the published CLI
|
|
60
|
+
│ • bin: metaharness, harness │ `npx metaharness`
|
|
61
|
+
│ • full implementation │ `npx metaharness score ./my-bot`
|
|
62
|
+
│ • full JS API │
|
|
63
|
+
└────────────┬────────────────────┘
|
|
64
|
+
│ depends on
|
|
65
|
+
┌────────────┴────────────────────┐
|
|
66
|
+
│ @ruvnet/agent-harness-generator │ ← this package: thin re-export
|
|
67
|
+
│ • no bin │ `import { scaffold } from …`
|
|
68
|
+
│ • re-exports the library API │
|
|
69
|
+
└─────────────────────────────────┘
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
One source of truth. Two published names. The wrapper has no
|
|
73
|
+
implementation — if logic ever leaks into this package, it's a bug.
|
|
74
|
+
|
|
75
|
+
## When to use which
|
|
76
|
+
|
|
77
|
+
- **`metaharness`** — you want the command-line tool, full subcommand
|
|
78
|
+
surface, marketplace plugin, Codex skills.
|
|
79
|
+
- **`@ruvnet/agent-harness-generator`** — you're embedding the generator
|
|
80
|
+
in a build script, a web service, or another tool, and don't want the
|
|
81
|
+
`bin` baggage.
|
|
82
|
+
|
|
83
|
+
## Version pinning
|
|
84
|
+
|
|
85
|
+
This package always depends on the same minor version of `metaharness`. A
|
|
86
|
+
patch release of `metaharness` doesn't bump us automatically — we cut a
|
|
87
|
+
matching patch and re-publish so the dependency stays tight.
|
|
88
|
+
|
|
89
|
+
## License
|
|
90
|
+
|
|
91
|
+
MIT — see [LICENSE](LICENSE).
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { scaffold, parseArgs, main, detectRufloProject, templateDir, HOSTS, TEMPLATES, loadCatalog, formatCatalog, render, extractVarReferences, validateHarnessName, walkTemplate, asFileMap, writeAtomic, emptyManifest, sha256, fingerprintFiles, diffFingerprints, } from 'metaharness';
|
|
2
|
+
export type { Host, TemplateId, CatalogEntry, CliArgs, ScaffoldOptions, ScaffoldResult, TemplateVars, } from 'metaharness';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
//
|
|
3
|
+
// @ruvnet/agent-harness-generator — library/core API for the harness generator.
|
|
4
|
+
//
|
|
5
|
+
// The actual implementation lives in the `metaharness` package (which is the
|
|
6
|
+
// published CLI). This package re-exports the JS API surface so consumers can
|
|
7
|
+
// import it cleanly without depending on the CLI's `bin` entry:
|
|
8
|
+
//
|
|
9
|
+
// import { scaffold, validateHarnessName, HOSTS, TEMPLATES }
|
|
10
|
+
// from '@ruvnet/agent-harness-generator';
|
|
11
|
+
//
|
|
12
|
+
// Why split? Per the user's iter-108 naming directive:
|
|
13
|
+
// - `metaharness` — the CLI, what users run (`npx metaharness`)
|
|
14
|
+
// - `@ruvnet/agent-harness-generator` — the library, what code imports
|
|
15
|
+
//
|
|
16
|
+
// One source of truth (metaharness), two published names. The wrapper has no
|
|
17
|
+
// implementation of its own — if you find yourself adding logic here, that
|
|
18
|
+
// logic belongs in metaharness and gets re-exported.
|
|
19
|
+
export {
|
|
20
|
+
// Core scaffold pipeline.
|
|
21
|
+
scaffold, parseArgs, main, detectRufloProject, templateDir,
|
|
22
|
+
// Catalog surface.
|
|
23
|
+
HOSTS, TEMPLATES, loadCatalog, formatCatalog,
|
|
24
|
+
// Rendering primitives.
|
|
25
|
+
render, extractVarReferences, validateHarnessName, walkTemplate, asFileMap, writeAtomic,
|
|
26
|
+
// Manifest + fingerprinting (used by `harness compare`).
|
|
27
|
+
emptyManifest, sha256, fingerprintFiles, diffFingerprints, } from 'metaharness';
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ruvnet/agent-harness-generator",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "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-generator'` without shelling out to the CLI.",
|
|
5
|
+
"homepage": "https://github.com/ruvnet/agent-harness-generator",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/ruvnet/agent-harness-generator.git",
|
|
9
|
+
"directory": "packages/agent-harness-generator-lib"
|
|
10
|
+
},
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"author": "rUv <ruv@ruv.net>",
|
|
13
|
+
"type": "module",
|
|
14
|
+
"main": "./dist/index.js",
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"import": "./dist/index.js"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist/**",
|
|
24
|
+
"README.md",
|
|
25
|
+
"LICENSE"
|
|
26
|
+
],
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "tsc",
|
|
29
|
+
"test": "vitest run --passWithNoTests",
|
|
30
|
+
"lint": "tsc --noEmit"
|
|
31
|
+
},
|
|
32
|
+
"keywords": [
|
|
33
|
+
"agent-harness",
|
|
34
|
+
"agent-harness-generator",
|
|
35
|
+
"metaharness",
|
|
36
|
+
"scaffold",
|
|
37
|
+
"mcp-server",
|
|
38
|
+
"claude-code",
|
|
39
|
+
"codex",
|
|
40
|
+
"library"
|
|
41
|
+
],
|
|
42
|
+
"publishConfig": {
|
|
43
|
+
"access": "public"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"metaharness": "0.1.0"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@types/node": "^20.0.0",
|
|
50
|
+
"typescript": "^5.4.0",
|
|
51
|
+
"vitest": "^2.0.0"
|
|
52
|
+
},
|
|
53
|
+
"engines": {
|
|
54
|
+
"node": ">=20.0.0"
|
|
55
|
+
}
|
|
56
|
+
}
|