ai2rules-harness 0.6.0 → 0.8.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/README.md +25 -6
- package/bin/harness.js +1 -1
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -5,11 +5,15 @@
|
|
|
5
5
|
```bash
|
|
6
6
|
npm install -g ai2rules-harness
|
|
7
7
|
harness init
|
|
8
|
+
harness demo # prove the kernel decides — 8 cases, no execution, no credentials
|
|
8
9
|
```
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
`init` writes a governance manifest, a `PreToolUse` shim, and the host settings entry
|
|
11
12
|
into the current project. It is safe to run twice, it never replaces a manifest you
|
|
12
|
-
have tuned, and turning it off is one file.
|
|
13
|
+
have tuned, and turning it off is one file. `demo` is the credential-free first proof:
|
|
14
|
+
it runs eight cases through the real kernel (Read, Write, Shell, JIRA_CREATE_ISSUE,
|
|
15
|
+
scoped actions, path roots, poisoned knowledge, classification), records each verdict,
|
|
16
|
+
and replays them to prove deterministic decisions. Decision-only, no tool execution.
|
|
13
17
|
|
|
14
18
|
> **Install it globally, not into a project.** `harness init` **refuses** to run
|
|
15
19
|
> when the binary lives inside the project it would govern — a local
|
|
@@ -48,9 +52,24 @@ This installs a deterministic kernel between the agent and the world. No model
|
|
|
48
52
|
takes part in the decision: a verdict is a pure function of the proposed call, the
|
|
49
53
|
session's context, and a compiled manifest.
|
|
50
54
|
|
|
51
|
-
## Prove it
|
|
55
|
+
## Prove it works
|
|
52
56
|
|
|
53
|
-
After `init`,
|
|
57
|
+
After `init`, run the built-in demonstration:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
harness demo
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Eight cases through the real kernel (ALLOW for in-root read, DENY for out-of-root
|
|
64
|
+
write, DENY for tainted network, ASK for destructive shell, DENY for background
|
|
65
|
+
destructive shell, and three classification/scoped/knowledge cases), with immediate
|
|
66
|
+
replay to prove deterministic decisions. No credentials, no execution.
|
|
67
|
+
|
|
68
|
+
The demo footer says "Next: harness doctor" — that command is planned (issue AI2-25)
|
|
69
|
+
but not yet shipped; the reference is honest about what comes next, not a claim it
|
|
70
|
+
exists today.
|
|
71
|
+
|
|
72
|
+
Or ask the kernel directly about one call — no agent session needed:
|
|
54
73
|
|
|
55
74
|
```bash
|
|
56
75
|
echo '{"tool_name":"Write","tool_input":{"file_path":"/etc/passwd"}}' \
|
|
@@ -89,9 +108,9 @@ Delete the file to re-enable. The shim runs per call, so the toggle is immediate
|
|
|
89
108
|
contain where it runs. Both matter and they are different properties.
|
|
90
109
|
- **Depth is asymmetric.** Deep on hosts that expose a pre-execution hook; at the
|
|
91
110
|
MCP seam only on hosts that do not. What each host actually permits is measured
|
|
92
|
-
in [the Agent Governability Index](https://github.com/
|
|
111
|
+
in [the Agent Governability Index](https://github.com/ai2rules/kernel/blob/main/docs/GOVERNABILITY-INDEX.md),
|
|
93
112
|
including the cells where the answer is unknown.
|
|
94
113
|
- **This installs a policy you should read.** `.claude/cc-world.yaml` is a starter,
|
|
95
114
|
not a finished judgement about your project.
|
|
96
115
|
|
|
97
|
-
MIT OR Apache-2.0 · [source](https://github.com/
|
|
116
|
+
MIT OR Apache-2.0 · [source](https://github.com/ai2rules/kernel)
|
package/bin/harness.js
CHANGED
|
@@ -55,7 +55,7 @@ if (!bin || !fs.existsSync(bin)) {
|
|
|
55
55
|
|
|
56
56
|
Build one, or point at an existing binary:
|
|
57
57
|
|
|
58
|
-
cargo install --git https://github.com/
|
|
58
|
+
cargo install --git https://github.com/ai2rules/kernel cli-harness
|
|
59
59
|
export AI2RULES_HARNESS=/absolute/path/to/harness
|
|
60
60
|
`);
|
|
61
61
|
process.exit(127);
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai2rules-harness",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Deterministic governance for local CLI coding agents. `npx ai2rules-harness init` governs a project in one command.",
|
|
5
5
|
"license": "MIT OR Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/
|
|
8
|
+
"url": "git+https://github.com/ai2rules/kernel.git",
|
|
9
9
|
"directory": "npm"
|
|
10
10
|
},
|
|
11
|
-
"homepage": "https://github.com/
|
|
12
|
-
"bugs": "https://github.com/
|
|
11
|
+
"homepage": "https://github.com/ai2rules/kernel#govern-a-project-in-one-command",
|
|
12
|
+
"bugs": "https://github.com/ai2rules/kernel/issues",
|
|
13
13
|
"keywords": [
|
|
14
14
|
"ai",
|
|
15
15
|
"agent",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"node": ">=18"
|
|
33
33
|
},
|
|
34
34
|
"optionalDependencies": {
|
|
35
|
-
"ai2rules-harness-darwin-arm64": "0.
|
|
36
|
-
"ai2rules-harness-darwin-x64": "0.
|
|
37
|
-
"ai2rules-harness-linux-x64": "0.
|
|
38
|
-
"ai2rules-harness-windows-x64": "0.
|
|
35
|
+
"ai2rules-harness-darwin-arm64": "0.8.0",
|
|
36
|
+
"ai2rules-harness-darwin-x64": "0.8.0",
|
|
37
|
+
"ai2rules-harness-linux-x64": "0.8.0",
|
|
38
|
+
"ai2rules-harness-windows-x64": "0.8.0"
|
|
39
39
|
}
|
|
40
40
|
}
|