@ruvnet/agent-harness-generator 0.1.2 → 0.1.4
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/README.md +48 -1
- package/package.json +9 -6
package/README.md
CHANGED
|
@@ -1,5 +1,52 @@
|
|
|
1
1
|
# @ruvnet/agent-harness-generator
|
|
2
2
|
|
|
3
|
+
<!-- ruv-seo:start (ADR-356) -->
|
|
4
|
+

|
|
5
|
+
|
|
6
|
+
`@ruvnet/agent-harness-generator` is the library form of the MetaHarness generator: it re-exports `scaffold()`, `validateHarnessName()`, `HOSTS`, `TEMPLATES` and the rendering and fingerprinting helpers from [`metaharness`](https://www.npmjs.com/package/metaharness), so your code can generate a harness without shelling out to the CLI.
|
|
7
|
+
|
|
8
|
+
**Supported environments:** Node.js 20+ on Linux, macOS and Windows. ESM only (`import`, not `require`). No native build step. Since 0.1.4 it pins `metaharness` 0.4.22, which stages the scaffold next to the target directory, so `scaffold()` works when the target is on a different filesystem from the OS temp directory (0.1.3 failed there with `EXDEV`).
|
|
9
|
+
|
|
10
|
+
## Quickstart
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install @ruvnet/agent-harness-generator
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Save this as `quickstart.mjs` and run `node quickstart.mjs`:
|
|
17
|
+
|
|
18
|
+
```js
|
|
19
|
+
import { scaffold, validateHarnessName, HOSTS, TEMPLATES } from '@ruvnet/agent-harness-generator';
|
|
20
|
+
|
|
21
|
+
console.log(`hosts: ${HOSTS.length}, templates: ${TEMPLATES.length}`);
|
|
22
|
+
console.log('name valid:', validateHarnessName('my-bot').valid);
|
|
23
|
+
const result = await scaffold({
|
|
24
|
+
name: 'my-bot',
|
|
25
|
+
template: 'vertical:coding',
|
|
26
|
+
host: 'claude-code',
|
|
27
|
+
targetDir: './my-bot',
|
|
28
|
+
generatorVersion: '0.4.22',
|
|
29
|
+
});
|
|
30
|
+
console.log(`wrote ${result.paths.length} files`);
|
|
31
|
+
console.log(`manifest: ${result.manifestPath}`);
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Expected output:
|
|
35
|
+
|
|
36
|
+
```text
|
|
37
|
+
hosts: 10, templates: 20
|
|
38
|
+
name valid: true
|
|
39
|
+
wrote 31 files
|
|
40
|
+
manifest: my-bot/.harness/manifest.json
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Then `npx -y -p metaharness harness doctor my-bot | tail -1` prints `Result: HEALTHY (…/my-bot)`.
|
|
44
|
+
|
|
45
|
+
**Next:** [`metaharness`](https://www.npmjs.com/package/metaharness) — the CLI this package wraps, with `harness doctor`, `harness score`, `harness genome` and the other inspection commands.
|
|
46
|
+
<!-- ruv-seo:end -->
|
|
47
|
+
|
|
48
|
+
## Reference
|
|
49
|
+
|
|
3
50
|
> Library / core package for the **Agent Harness Generator**. Pair with
|
|
4
51
|
> [`metaharness`](https://www.npmjs.com/package/metaharness) for the CLI.
|
|
5
52
|
|
|
@@ -34,7 +81,7 @@ const result = await scaffold({
|
|
|
34
81
|
force: true,
|
|
35
82
|
generatorVersion: '0.1.0',
|
|
36
83
|
});
|
|
37
|
-
console.log(`wrote ${result.
|
|
84
|
+
console.log(`wrote ${result.paths.length} files`);
|
|
38
85
|
```
|
|
39
86
|
|
|
40
87
|
## What's exported
|
package/package.json
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ruvnet/agent-harness-generator",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Library
|
|
5
|
-
"homepage": "https://
|
|
3
|
+
"version": "0.1.4",
|
|
4
|
+
"description": "Library API for the MetaHarness generator: import scaffold(), validateHarnessName(), HOSTS and TEMPLATES from code instead of shelling out to the metaharness CLI.",
|
|
5
|
+
"homepage": "https://ruv.io",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "https://github.com/ruvnet/
|
|
8
|
+
"url": "https://github.com/ruvnet/metaharness.git",
|
|
9
9
|
"directory": "packages/agent-harness-generator-lib"
|
|
10
10
|
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/ruvnet/metaharness/issues"
|
|
13
|
+
},
|
|
11
14
|
"license": "MIT",
|
|
12
15
|
"author": "rUv <ruv@ruv.net>",
|
|
13
16
|
"type": "module",
|
|
@@ -43,12 +46,12 @@
|
|
|
43
46
|
"access": "public"
|
|
44
47
|
},
|
|
45
48
|
"dependencies": {
|
|
46
|
-
"metaharness": "0.
|
|
49
|
+
"metaharness": "0.4.22"
|
|
47
50
|
},
|
|
48
51
|
"devDependencies": {
|
|
49
52
|
"@types/node": "^20.0.0",
|
|
50
53
|
"typescript": "^5.4.0",
|
|
51
|
-
"vitest": "^
|
|
54
|
+
"vitest": "^4.1.12"
|
|
52
55
|
},
|
|
53
56
|
"engines": {
|
|
54
57
|
"node": ">=20.0.0"
|