@metaharness/openclaw 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 +75 -0
- package/bin/scaffold.mjs +24 -0
- package/package.json +40 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 rUv
|
|
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,75 @@
|
|
|
1
|
+
# MetaHarness × OpenClaw .openclaw/ config
|
|
2
|
+
|
|
3
|
+
A minimal MetaHarness scaffold pre-wired for [OpenClaw](https://github.com/openclaw), the open-source AI coding host that reads its configuration from a `.openclaw/` directory. Run one command and you get a working harness folder with the right config file layout, a starter agent, and the doctor/validate tooling that ships with MetaHarness. This is for developers who want to bootstrap an OpenClaw-compatible project without copy-pasting a config tree from another repo. It does NOT install OpenClaw itself, ship a model, or run any agent for you — it scaffolds the static files you need so `openclaw` (or any OpenClaw-compatible runner) finds a valid configuration on first launch.
|
|
4
|
+
|
|
5
|
+
## Quickstart
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx @metaharness/openclaw@latest my-bot
|
|
9
|
+
cd my-bot
|
|
10
|
+
npm install
|
|
11
|
+
harness doctor
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
`harness doctor` walks the generated tree, confirms the `.openclaw/` config is present and parseable, and reports anything missing before you point a runtime at it.
|
|
15
|
+
|
|
16
|
+
## What you get
|
|
17
|
+
|
|
18
|
+
- `.openclaw/config.json` — the host-specific manifest OpenClaw looks for on startup
|
|
19
|
+
- `.openclaw/agents/` — one starter agent definition you can rename, duplicate, or delete
|
|
20
|
+
- `harness.config.mjs` — the MetaHarness root config that ties templates, hosts, and validators together
|
|
21
|
+
- `package.json` — pinned `harness` CLI plus `doctor`, `validate`, and `dev` scripts
|
|
22
|
+
- `README.md` — a short orientation for whoever opens the repo next
|
|
23
|
+
- `.gitignore` — sensible defaults so you don't commit `node_modules/` or local secret files
|
|
24
|
+
|
|
25
|
+
## Advanced
|
|
26
|
+
|
|
27
|
+
Run the built-in diagnostics:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
harness doctor
|
|
31
|
+
# ✓ .openclaw/config.json found
|
|
32
|
+
# ✓ 1 agent definition discovered
|
|
33
|
+
# ✓ harness.config.mjs parses
|
|
34
|
+
# ✓ host=openclaw template=minimal
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Validate the config schema without running anything:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
harness validate
|
|
41
|
+
# .openclaw/config.json ok
|
|
42
|
+
# .openclaw/agents/*.json ok
|
|
43
|
+
# 0 errors, 0 warnings
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Point another tool at the same folder (any Claude-compatible CLI works):
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
claude -p --plugin-dir ./my-bot "list the agents in this project"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Re-scaffold in place after editing the template (overwrites the harness skeleton, leaves your agents alone):
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
npx metaharness@latest my-bot --template minimal --host openclaw --force
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## FAQ
|
|
59
|
+
|
|
60
|
+
**Q: Does this install OpenClaw?**
|
|
61
|
+
A: No. It only writes the `.openclaw/` configuration tree that an OpenClaw runtime expects to find. Install OpenClaw separately following its own docs.
|
|
62
|
+
|
|
63
|
+
**Q: Can I use this with Claude Code, Codex, or another host?**
|
|
64
|
+
A: This scaffold is specifically wired for the OpenClaw host config layout. For other hosts, run `npx metaharness@latest my-bot --host <name>` directly, or use one of the sibling `@metaharness/*` example packages.
|
|
65
|
+
|
|
66
|
+
**Q: How do I add a second agent?**
|
|
67
|
+
A: Copy `.openclaw/agents/<starter>.json`, rename it, edit the `name` and `prompt` fields, then run `harness validate` to confirm the schema still passes.
|
|
68
|
+
|
|
69
|
+
## License
|
|
70
|
+
|
|
71
|
+
MIT. Built on metaharness (https://www.npmjs.com/package/metaharness).
|
|
72
|
+
|
|
73
|
+
## Deep-dive
|
|
74
|
+
|
|
75
|
+
Full explainer gist: https://gist.github.com/ruvnet/d88608ce148db9ca410243d35997d38a
|
package/bin/scaffold.mjs
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { execSync } from 'node:child_process';
|
|
3
|
+
import process from 'node:process';
|
|
4
|
+
|
|
5
|
+
const args = process.argv.slice(2);
|
|
6
|
+
const name = args[0] && !args[0].startsWith('-') ? args[0] : 'my-bot';
|
|
7
|
+
const extra = (args[0] && !args[0].startsWith('-') ? args.slice(1) : args)
|
|
8
|
+
.map((a) => JSON.stringify(a))
|
|
9
|
+
.join(' ');
|
|
10
|
+
|
|
11
|
+
const cmd = `npx --yes metaharness@latest ${JSON.stringify(name)} --template minimal --host openclaw --force${extra ? ' ' + extra : ''}`;
|
|
12
|
+
|
|
13
|
+
try {
|
|
14
|
+
execSync(cmd, { stdio: 'inherit' });
|
|
15
|
+
} catch (err) {
|
|
16
|
+
console.error(`\nmetaharness failed: ${err && err.message ? err.message : err}`);
|
|
17
|
+
process.exit(typeof err?.status === 'number' ? err.status : 1);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
console.log('');
|
|
21
|
+
console.log(`Next steps:`);
|
|
22
|
+
console.log(` 1. cd ${name}`);
|
|
23
|
+
console.log(` 2. npm install`);
|
|
24
|
+
console.log(` 3. harness doctor # verify the .openclaw/ config`);
|
package/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@metaharness/openclaw",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "MetaHarness example — minimal scaffold wired to OpenClaw's .openclaw/ config (npx @metaharness/openclaw my-bot)",
|
|
5
|
+
"homepage": "https://github.com/ruvnet/agent-harness-generator/tree/main/examples-packages/openclaw",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/ruvnet/agent-harness-generator.git",
|
|
9
|
+
"directory": "examples-packages/openclaw"
|
|
10
|
+
},
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"author": "rUv <ruv@ruv.net>",
|
|
13
|
+
"type": "module",
|
|
14
|
+
"bin": "./bin/scaffold.mjs",
|
|
15
|
+
"files": [
|
|
16
|
+
"bin/**",
|
|
17
|
+
"README.md",
|
|
18
|
+
"LICENSE"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"smoke": "node --check bin/scaffold.mjs"
|
|
22
|
+
},
|
|
23
|
+
"keywords": [
|
|
24
|
+
"metaharness",
|
|
25
|
+
"agent-harness",
|
|
26
|
+
"agent-harness-generator",
|
|
27
|
+
"openclaw",
|
|
28
|
+
"host",
|
|
29
|
+
"ai-agent",
|
|
30
|
+
"mcp",
|
|
31
|
+
"npx",
|
|
32
|
+
"scaffold"
|
|
33
|
+
],
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"access": "public"
|
|
36
|
+
},
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=20.0.0"
|
|
39
|
+
}
|
|
40
|
+
}
|