glasspane-harness 0.12.1 → 0.12.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 +54 -1
- package/README.zh-CN.md +42 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
- [Quick start](#quick-start)
|
|
33
33
|
- [The `gp_*` tool surface](#the-gp-tool-surface)
|
|
34
34
|
- [The evidence discipline](#the-evidence-discipline)
|
|
35
|
+
- [Two-way integration with iterate-harness](#two-way-integration-with-iterate-harness)
|
|
35
36
|
- [Documentation](#documentation)
|
|
36
37
|
- [Development](#development)
|
|
37
38
|
- [License & attribution](#license-attribution)
|
|
@@ -156,7 +157,7 @@ npm install -g glasspane-harness
|
|
|
156
157
|
bun add -g glasspane-harness
|
|
157
158
|
|
|
158
159
|
# or one-click (npm first, GitHub release asset as fallback)
|
|
159
|
-
curl -fsSL https://raw.githubusercontent.com/jingzhao-l/glasspane-harness/v0.12.
|
|
160
|
+
curl -fsSL https://raw.githubusercontent.com/jingzhao-l/glasspane-harness/v0.12.3/scripts/install.sh | bash
|
|
160
161
|
```
|
|
161
162
|
|
|
162
163
|
Two commands are installed: **`glasspane-harness`** and the short alias **`gp-harness`**.
|
|
@@ -227,6 +228,58 @@ is never hard-coded here, because it grows upstream of this file. Full reference
|
|
|
227
228
|
|
|
228
229
|
Details: [`docs/evidence.md`](docs/evidence.md).
|
|
229
230
|
|
|
231
|
+
## Two-way integration with iterate-harness
|
|
232
|
+
|
|
233
|
+
GlassPane Harness is one side of a second pair. The engine answers "did that operation really
|
|
234
|
+
take effect?"; [iterate-harness](https://github.com/jingzhao-l/iterate-harness) answers "is this
|
|
235
|
+
code right?". The two do not talk through a chat log — everything that crosses the boundary is
|
|
236
|
+
written by one side as a verifiable record and read by the other.
|
|
237
|
+
|
|
238
|
+
- **Same chain format, verified before quoting.** Every decision recorded from an evidence pack
|
|
239
|
+
is appended to a hash-chained ledger (`~/.local/share/glasspane-harness/decisions.jsonl`, or
|
|
240
|
+
wherever `GLASSPANE_DECISION_LOG` points). The review loop writes `.iterate/decision-log.jsonl`
|
|
241
|
+
in the project under review in the same chain format, so a claim quoted from the other side's
|
|
242
|
+
file is chain-verified first: a rewritten line is refused with the number of the line where the
|
|
243
|
+
chain stops. The production reader today is the loop's (`fix_proof`); this fork ships the same
|
|
244
|
+
verifier, and a fixed-point test pins that a chain written by the loop verifies here. A project
|
|
245
|
+
can name the loop's ledger as its fix-evidence source once, with
|
|
246
|
+
`ih iterate glasspane-ledger <absolute path>` — the link is written only after the whole chain
|
|
247
|
+
verifies, and it pins the chain's first entry, so a replaced ledger stops qualifying.
|
|
248
|
+
- **A review dimension travels with the call.** Five `gp_*` tools take an optional `dimension`
|
|
249
|
+
argument — `gp_act`, `gp_observe`, `gp_diagnose`, `gp_last_evidence`, `gp_attach` — and they are
|
|
250
|
+
the same five on both surfaces. The engine never sees the word: the declaration is stripped
|
|
251
|
+
before a request leaves, and this harness echoes it back. A decision that contradicts what was
|
|
252
|
+
already witnessed for that operation id is refused (`KERNEL_E_DIMENSION_CONTEST`).
|
|
253
|
+
- **A failed re-check goes back to the app.** When a round's invariant re-check fails, the loop
|
|
254
|
+
asks the running application again, read-only, through the host's MCP transport. It builds one
|
|
255
|
+
`gp_last_evidence` plus one `gp_diagnose` per recorded operation; the allow-list is the five
|
|
256
|
+
read-only tools, and a call that would mutate the app is refused by name.
|
|
257
|
+
- **Compaction knows what was reviewed.** The compaction hook re-injects the session's evidence
|
|
258
|
+
anchors (operation id, outcome, ledger line, entry hash). The run plan (`.iterate/run-plan.json`
|
|
259
|
+
or `GLASSPANE_RUN_PLAN`) decides which dimension history is dropped first, and declarations that
|
|
260
|
+
could not reach an anchor are counted rather than assumed.
|
|
261
|
+
- **A fix is not accepted on the agent's word.** Before advancing a repair recipe, the gate reads
|
|
262
|
+
this round's invariant verdict, the project's recipe (`GLASSPANE_RECIPE`), and a chain-verified
|
|
263
|
+
ledger line recording a passing outcome against an operation id. Anything absent or unmeasured
|
|
264
|
+
is refused by name (`RECIPE_GATE_E_*`). The answer is recorded in the project's ledger; a
|
|
265
|
+
contract refusal writes no ledger bytes. Both doors read it back: `ih iterate gate` in a
|
|
266
|
+
terminal, `/iterate gate` in a session.
|
|
267
|
+
- **Both tool surfaces speak one provider contract.** This fork and the MCP shell register the
|
|
268
|
+
same provider id and the same prerequisites per method, and a gate that runs both registrations
|
|
269
|
+
reddens when they diverge.
|
|
270
|
+
|
|
271
|
+
What stays where it belongs: the engine decides what the application did; neither harness judges
|
|
272
|
+
an interface on its own. The gate reports and withholds — it does not run the recipe, because
|
|
273
|
+
neither product ships a recipe executor. The formats above come from one published contract
|
|
274
|
+
layer, [`iterate-kernel`](https://www.npmjs.com/package/iterate-kernel), and the boundary is
|
|
275
|
+
stated honestly: whether the two implementations still agree on a case the corpus never wrote
|
|
276
|
+
down is answered by `scripts/diff_kernel_implementations.py`, an operator command rather than a
|
|
277
|
+
CI step. The exchange from the loop's side is documented in the iterate-harness README
|
|
278
|
+
([Two-way integration with GlassPane](https://github.com/jingzhao-l/iterate-harness#-two-way-integration-with-glasspane)),
|
|
279
|
+
and from the engine's side in [GlassPane's two-way integration section](https://github.com/jingzhao-l/GlassPane#two-way-integration-with-the-review-loop).
|
|
280
|
+
Implementation detail: [`docs/kernel-integration.md`](docs/kernel-integration.md) and
|
|
281
|
+
[`docs/evidence.md`](docs/evidence.md).
|
|
282
|
+
|
|
230
283
|
## Documentation
|
|
231
284
|
|
|
232
285
|
- [`docs/install.md`](docs/install.md) — install paths, permissions, verification
|
package/README.zh-CN.md
CHANGED
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
- [上手](#上手)
|
|
33
33
|
- [`gp_*` 工具面](#gp-工具面)
|
|
34
34
|
- [证据纪律](#证据纪律)
|
|
35
|
+
- [与 iterate-harness 的双向集成](#与-iterate-harness-的双向集成)
|
|
35
36
|
- [文档](#文档)
|
|
36
37
|
- [开发](#开发)
|
|
37
38
|
- [许可与署名](#许可与署名)
|
|
@@ -134,7 +135,7 @@ Azure、OpenRouter 等等全在——几百个模型——每一个都用**你
|
|
|
134
135
|
```bash
|
|
135
136
|
npm install -g glasspane-harness # 推荐
|
|
136
137
|
bun add -g glasspane-harness
|
|
137
|
-
curl -fsSL https://raw.githubusercontent.com/jingzhao-l/glasspane-harness/v0.12.
|
|
138
|
+
curl -fsSL https://raw.githubusercontent.com/jingzhao-l/glasspane-harness/v0.12.3/scripts/install.sh | bash
|
|
138
139
|
```
|
|
139
140
|
|
|
140
141
|
会装出两个命令:**`glasspane-harness`** 与短别名 **`gp-harness`**。
|
|
@@ -194,6 +195,46 @@ glasspane-harness --help
|
|
|
194
195
|
|
|
195
196
|
细节:[`docs/evidence.md`](docs/evidence.md)。
|
|
196
197
|
|
|
198
|
+
## 与 iterate-harness 的双向集成
|
|
199
|
+
|
|
200
|
+
GlassPane Harness 是第二对产品里的一半。引擎回答"这次操作到底生效了吗";
|
|
201
|
+
[iterate-harness](https://github.com/jingzhao-l/iterate-harness) 回答"这段代码对不对"。
|
|
202
|
+
两边不靠聊天记录对接——跨越边界的东西都由一侧写成可核验的记录,另一侧读它。
|
|
203
|
+
|
|
204
|
+
- **同一种链格式,先验通再引用。** 每条从证据包记下的决定都追加进哈希链账本
|
|
205
|
+
(`~/.local/share/glasspane-harness/decisions.jsonl`,或由 `GLASSPANE_DECISION_LOG` 指到别处)。
|
|
206
|
+
审查回路把 `.iterate/decision-log.jsonl` 写进被审项目,用的是同一种链格式,所以从对方那本引来的
|
|
207
|
+
主张会先整链验通:被改过的行会被拒绝,并说清链断在第几行。今天在生产里跑这个读者的是回路这一侧
|
|
208
|
+
(`fix_proof`);本 fork 带的是同一个校验器,一条固定点测试钉住"那边写的链在这边验得过"。
|
|
209
|
+
一个项目可以一次性用 `ih iterate glasspane-ledger <绝对路径>` 把回路的账本记为自己的修复证据来源:
|
|
210
|
+
链接只在整链验通之后落笔,并钉住链的首条,被替换的账本因此不再够格。
|
|
211
|
+
- **审查维度跟着调用走。** 有 5 项 `gp_*` 工具接受可选的 `dimension` 参数——`gp_act`、`gp_observe`、
|
|
212
|
+
`gp_diagnose`、`gp_last_evidence`、`gp_attach`——两侧是同五项。引擎从不看见这个词:声明在请求
|
|
213
|
+
出网前就被剥掉,回显由本 harness 自己写。与同一 operationId 上已有见证矛盾的决定会被拒绝
|
|
214
|
+
(`KERNEL_E_DIMENSION_CONTEST`)。
|
|
215
|
+
- **复核不过,就回到应用本身。** 一轮的 invariant 复核失败时,回路通过宿主的 MCP 通道再次只读地问
|
|
216
|
+
那个正在跑的应用:每个已记录操作构造一条 `gp_last_evidence` 加一条 `gp_diagnose`;允许名单是
|
|
217
|
+
5 项只读工具,会改动应用的调用被点名拒绝。
|
|
218
|
+
- **压缩知道这次查了什么。** 压缩钩子会重新注入会话的证据锚点(operationId、结果、台账行号、
|
|
219
|
+
条目哈希)。运行计划(`.iterate/run-plan.json` 或 `GLASSPANE_RUN_PLAN`)决定先丢哪一维的历史;
|
|
220
|
+
声明了维度却进不了锚点的调用会被数出来,而不是假设它们还在。
|
|
221
|
+
- **修复不靠代理自称就算完成。** 推进修复配方之前,闸会读三件实测的东西:本轮 invariant 判定、
|
|
222
|
+
项目配方(`GLASSPANE_RECIPE`),以及一条链可验、按 operationId 记着通过结果的账本行。
|
|
223
|
+
缺任何一件或未量到都具名拒绝(`RECIPE_GATE_E_*`)。答案落进项目账本;契约拒绝一个字节都不写。
|
|
224
|
+
两扇门都读得回来:终端里 `ih iterate gate`,会话里 `/iterate gate`。
|
|
225
|
+
- **两个工具面说的是同一份 provider 契约。** 本 fork 与 MCP 层注册同一个 provider id 和每个方法
|
|
226
|
+
相同的先决条件;跑两侧注册代码的尺子一旦发现分叉就红。
|
|
227
|
+
|
|
228
|
+
各归各位:应用做了什么由引擎判定,两个 harness 都不自行给界面下结论。闸只报与拦,不执行配方——
|
|
229
|
+
两个产品都没有配方执行器。上面这些格式来自同一份发布出去的契约层
|
|
230
|
+
[`iterate-kernel`](https://www.npmjs.com/package/iterate-kernel),边界也说清楚:
|
|
231
|
+
"两份实现对语料没写过的案子还一致吗"由 `scripts/diff_kernel_implementations.py` 回答——它是给操作者
|
|
232
|
+
跑的命令,不在 CI 步骤里。回路那一侧的说明见 iterate-harness README 的
|
|
233
|
+
[与 GlassPane 的双向集成](https://github.com/jingzhao-l/iterate-harness/blob/main/README.zh-CN.md#-与-glasspane-的双向集成),
|
|
234
|
+
引擎那一侧见 [GlassPane 的双向集成小节](https://github.com/jingzhao-l/GlassPane#two-way-integration-with-the-review-loop)。
|
|
235
|
+
实现细节:[`docs/kernel-integration.md`](docs/kernel-integration.md) 与
|
|
236
|
+
[`docs/evidence.md`](docs/evidence.md)。
|
|
237
|
+
|
|
197
238
|
## 文档
|
|
198
239
|
|
|
199
240
|
- [`docs/install.md`](docs/install.md) — 安装通道、权限、自检
|
package/package.json
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"scripts": {
|
|
26
26
|
"postinstall": "node ./postinstall.mjs"
|
|
27
27
|
},
|
|
28
|
-
"version": "0.12.
|
|
28
|
+
"version": "0.12.3",
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"os": [
|
|
31
31
|
"darwin"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"sideEffects": false,
|
|
46
46
|
"optionalDependencies": {
|
|
47
|
-
"glasspane-harness-darwin-arm64": "0.12.
|
|
48
|
-
"glasspane-harness-darwin-x64": "0.12.
|
|
47
|
+
"glasspane-harness-darwin-arm64": "0.12.3",
|
|
48
|
+
"glasspane-harness-darwin-x64": "0.12.3"
|
|
49
49
|
}
|
|
50
50
|
}
|