@metaharness/kernel 0.1.6 → 0.1.7

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.
Files changed (2) hide show
  1. package/README.md +39 -0
  2. package/package.json +13 -6
package/README.md CHANGED
@@ -1,5 +1,44 @@
1
1
  # @metaharness/kernel
2
2
 
3
+ <!-- ruv-seo:start (ADR-356) -->
4
+ `@metaharness/kernel` is the shared runtime contract for MetaHarness: the `HarnessSpec` and `HostAdapter` types, MCP server validation, a hash-chained `SessionLog`, and memory backends, behind one `loadKernel()` that picks a native, WASM or pure-JS backend.
5
+
6
+ **Supported environments:** Node.js 20+ on Linux, macOS and Windows. ESM only (`import`, not `require`). `loadKernel()` prefers an installed per-platform native package, then WASM, then a dependency-free JavaScript backend; the native packages are optional peers that are not yet on npm, and the published tarball currently resolves to the JS backend, as the output below shows. `@ruvector/rvf` is an optional peer for the persistent `memory-rvf` backend.
7
+
8
+ ## Quickstart
9
+
10
+ ```bash
11
+ npm install @metaharness/kernel
12
+ cat > quickstart.mjs <<'JS'
13
+ import { loadKernel } from '@metaharness/kernel';
14
+
15
+ const kernel = await loadKernel();
16
+ const info = kernel.kernelInfo();
17
+ console.log(`kernel ${info.version} (${kernel.backend} backend)`);
18
+
19
+ const good = kernel.mcpValidate(JSON.stringify({ name: 'demo', command: ['npx', '-y', 'demo'] }));
20
+ const bad = kernel.mcpValidate(JSON.stringify({ name: '', command: [] }));
21
+ console.log('valid spec ->', good ?? 'ok');
22
+ console.log('broken spec ->', bad ?? 'ok');
23
+ JS
24
+ node quickstart.mjs
25
+ ```
26
+
27
+ Expected output:
28
+
29
+ ```text
30
+ kernel 0.1.7 (js backend)
31
+ valid spec -> ok
32
+ broken spec -> mcp: server name is empty
33
+ ```
34
+
35
+ **Next:** [`@metaharness/sdk`](https://www.npmjs.com/package/@metaharness/sdk) — typed `defineHarness`/`defineAgent` helpers on top of this kernel.
36
+
37
+ **Where it fits:** every `@metaharness/host-*` adapter and `@metaharness/sdk` depend on it, and every harness generated by `metaharness new` lists it in `dependencies` and calls `loadKernel()` in its smoke test and `doctor` command.
38
+ <!-- ruv-seo:end -->
39
+
40
+ ## Reference
41
+
3
42
  Cross-platform kernel for the [agent-harness-generator](https://github.com/ruvnet/agent-harness-generator) project.
4
43
 
5
44
  ## What it is
package/package.json CHANGED
@@ -1,13 +1,16 @@
1
1
  {
2
2
  "name": "@metaharness/kernel",
3
- "version": "0.1.6",
4
- "description": "Cross-platform kernel for the agent-harness-generator — wasm primary, NAPI-RS native fallback",
5
- "homepage": "https://github.com/ruvnet/metaharness",
3
+ "version": "0.1.7",
4
+ "description": "Cross-platform kernel for MetaHarness harnesses: the HarnessSpec and HostAdapter contract, memory backends, and a WASM-first runtime with NAPI-RS native and pure-JS fallbacks.",
5
+ "homepage": "https://ruv.io",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/ruvnet/metaharness.git",
9
9
  "directory": "packages/kernel-js"
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",
@@ -44,11 +47,15 @@
44
47
  "build:wasm": "RUSTFLAGS= wasm-pack build ../../crates/kernel-wasm --target nodejs --release --out-dir ../../packages/kernel-js/pkg && rm -f pkg/.gitignore && node -e \"const f=require('fs');const j=require('./pkg/package.json');j.type='commonjs';f.writeFileSync('./pkg/package.json',JSON.stringify(j,null,2)+'\\n')\""
45
48
  },
46
49
  "keywords": [
50
+ "metaharness",
47
51
  "agent-harness",
48
- "mcp",
49
- "wasm",
50
52
  "kernel",
51
- "ruflo"
53
+ "wasm",
54
+ "napi-rs",
55
+ "mcp",
56
+ "host-adapter",
57
+ "agent-memory",
58
+ "rvf"
52
59
  ],
53
60
  "publishConfig": {
54
61
  "access": "public"