token-harness 0.1.2 → 0.1.3

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 CHANGED
@@ -90,13 +90,14 @@ HarnessTrim, or a coding agent.
90
90
  ### Managed compatibility rows
91
91
 
92
92
  Token Harness changes a harness configuration only when a reviewed compatibility row covers the
93
- exact provider version, harness version, platform, and configuration schema. Two rows ship, and each
93
+ exact provider version, harness version, platform, and configuration schema. Three rows ship, and each
94
94
  names the recording it stands on:
95
95
 
96
96
  | Provider | Harness | Platform | Tested versions | Tier |
97
97
  | --- | --- | --- | --- | --- |
98
98
  | RTK | Claude Code | Windows | rtk 0.44.0, Claude Code 2.1.220 | `canary` |
99
99
  | HarnessTrim | Claude Code | Windows | harnesstrim 0.1.0, Claude Code 2.1.220 | `config-only` |
100
+ | HarnessTrim | Codex | Windows | harnesstrim 0.1.0, Codex 0.146.0 | `config-only` |
100
101
 
101
102
  Everything else is refused, and that is the design rather than a gap: `doctor` detects and reports on
102
103
  every supported platform, and only the *mutation* is narrower. An uncovered combination exits 9 and
@@ -107,9 +108,18 @@ What is not covered today, and why:
107
108
  - **macOS and Linux.** No row on either. The recordings a row needs are states of a real machine, and
108
109
  a fixture cannot be written from a machine nobody ran. On those platforms `plan` and `apply` refuse;
109
110
  install the provider with its own installer and Token Harness will detect, verify, and measure it.
110
- - **Codex and OpenCode.** Both providers are detected and adopted there, and neither is written:
111
- RTK's plan builder produces a Claude-shaped hook list, and HarnessTrim's reviewed write set covers
112
- Claude only. A row would admit a mutation that nothing proposes.
111
+ - **OpenCode, and permanently rather than pending.** Both providers are detected, adopted, verified
112
+ and measured there, and neither is written. RTK reaches OpenCode through a plugin module its own
113
+ installer places globally, which this build has no action for. HarnessTrim's OpenCode installer
114
+ writes a plugin wrapper *and runs an npm install*, so a containment boundary covering what it wrote
115
+ would hold a `node_modules` tree — and that is not a decision deferred for want of a fixture. A
116
+ dependency tree is not configuration, so it cannot be a reviewed write set; snapshotting it on
117
+ every apply to keep the rollback honest would be slow and would be restoring upstream's install
118
+ rather than our change; and excluding it would leave a transaction claiming a reversibility it does
119
+ not have. So the assignment is not producible, and RFC 0003 is explicit about what that means: a
120
+ capability the provider has but cannot be asked for is not an assignable capability. OpenCode stays
121
+ adoption-only by decision.
122
+ - **RTK on Codex.** Not managed, and no row: RTK writes a Claude-shaped hook list and nothing else.
113
123
  - **A newer Claude Code.** The range is a single observed version. `2.1.221` reads `unknown-newer` and
114
124
  refuses rather than assuming it behaves like `2.1.220`.
115
125
 
@@ -122,21 +132,35 @@ There are three separate layers. Installing one does not automatically provide t
122
132
 
123
133
  | Layer | Examples | Who installs it? |
124
134
  | --- | --- | --- |
125
- | Coding agent (harness) | Claude Code, Codex, OpenCode | You, using the agent's official installer |
135
+ | Coding agent (harness) | Claude Code, Codex, OpenCode, Hermes, Pi | You, using the agent's official installer |
126
136
  | Token Harness | `token-harness` | You, from npm or this repository |
127
137
  | Optimization provider | RTK, HarnessTrim | Both can be installed by Token Harness where a compatibility row covers the combination; otherwise install them with their own installers and Token Harness detects and measures them |
128
138
 
129
- Token Harness does not install Claude Code, Codex, or OpenCode. Install and run at least one of
139
+ Token Harness does not install Claude Code, Codex, OpenCode, Hermes, or Pi. Install and run at least one of
130
140
  them first so that `token-harness doctor` can detect it.
131
141
 
132
- | Provider | Claude Code | Codex | OpenCode | Installed by Token Harness |
133
- | --- | --- | --- | --- | --- |
134
- | RTK | Configure, verify, and measure | Not managed | Detect, adopt, verify, and measure | **Yes**, for the supported Claude Code path |
135
- | HarnessTrim | Claude skills only; no reducer hook or reduce-pipe instruction | Detect, adopt, verify, and measure | Detect, adopt, verify, and measure | **Yes**, on a covered row — see above |
142
+ | Provider | Claude Code | Codex | OpenCode | Hermes | Pi | Installed by Token Harness |
143
+ | --- | --- | --- | --- | --- | --- | --- |
144
+ | RTK | Configure, verify, and measure | Not managed | Detect, adopt, verify, and measure | Not managed | Not managed | **Yes**, for the supported Claude Code path |
145
+ | HarnessTrim | Claude skills only; no reducer hook or reduce-pipe instruction | Detect, adopt, verify, and measure | Detect, adopt, verify, and measure | Detect, verify, and measure | Detect, verify, and measure | **Yes**, on a covered row — see above |
136
146
 
137
147
  "Not managed" does not mean the upstream tool cannot support that agent. It means this release
138
148
  does not claim ownership of that integration and will not modify it.
139
149
 
150
+ Hermes is read-only in both directions: the adapter finds the HarnessTrim plugin, reads whether it
151
+ is enabled, and imports the telemetry it writes to `~/.hermes/harnesstrim-metrics.jsonl`, but nothing
152
+ here enables the plugin or restarts the gateway. Enabling it is
153
+ `hermes plugins enable harnesstrim`, and that stays your command to run. No compatibility row ships
154
+ for Hermes because a row is the precondition for a *mutation*, and none is proposed.
155
+
156
+ Pi is read-only in both directions too: the adapter finds the HarnessTrim extension module in the
157
+ directories Pi auto-loads (`~/.pi/agent/extensions/` and `<project>/.pi/extensions/`) and verifies
158
+ the configuration, but nothing here installs it, and nothing here can say which mode it runs in —
159
+ the extension defaults to `dryrun` and only `HARNESSTRIM_MODE=active` in Pi's environment makes it
160
+ reduce. Installing it is `harnesstrim install pi --apply`, and that stays your command to run. No
161
+ compatibility row ships for Pi because a row is the precondition for a *mutation*, and none is
162
+ proposed.
163
+
140
164
  RTK on OpenCode is detected and verified, not written: `rtk init -g --opencode` installs a plugin
141
165
  module at `~/.config/opencode/plugins/rtk.ts`, and Token Harness reads that file rather than
142
166
  producing it. Note that the plugin is inert under OpenCode Desktop — see
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "token-harness",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "One control plane for token-efficient coding agents.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
package/sbom.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "type": "application",
8
8
  "bom-ref": "token-harness",
9
9
  "name": "token-harness",
10
- "version": "0.1.2",
10
+ "version": "0.1.3",
11
11
  "description": "One control plane for token-efficient coding agents.",
12
12
  "licenses": [
13
13
  {
@@ -19,7 +19,7 @@
19
19
  "hashes": [
20
20
  {
21
21
  "alg": "SHA-256",
22
- "content": "8e2f96efbb15fd8aec72a98ae3b62d128265abd779e9f911c8c0d4bf024adfb2"
22
+ "content": "d28d7044c0215e3471e990732b14275cca61e57a823e7a04a505748be73613c8"
23
23
  }
24
24
  ]
25
25
  },