glasspane-harness 0.8.2 → 0.9.1
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 +12 -6
- package/README.zh-CN.md +20 -8
- package/package.json +3 -3
- package/postinstall.mjs +81 -15
package/README.md
CHANGED
|
@@ -49,14 +49,15 @@ Nothing was cut to make room for the kernel.
|
|
|
49
49
|
That is a measured claim, not a promise. The fork tracks upstream
|
|
50
50
|
[anomalyco/opencode](https://github.com/anomalyco/opencode) at a pinned tag, and
|
|
51
51
|
`harness/tools/fork-diff.mjs` compares every file in this tree against that tag on every
|
|
52
|
-
change
|
|
52
|
+
change. The ruler prints its own line — this is that line, verbatim, against the golden
|
|
53
|
+
recorded 2026-10-18:
|
|
53
54
|
|
|
54
55
|
```
|
|
55
|
-
fork-diff vs v1.18.32:
|
|
56
|
+
fork-diff vs v1.18.32: 4645/6724 byte-identical, 282 edited, 92 added, 1705 deleted
|
|
56
57
|
```
|
|
57
58
|
|
|
58
|
-
Most of what upstream ships is still byte-for-byte upstream — 4,
|
|
59
|
-
|
|
59
|
+
Most of what upstream ships is still byte-for-byte upstream — 4,645 of its 6,632 files. The
|
|
60
|
+
282 edits are concentrated in config/paths/branding, the `gp_*` tool surface, the kernel
|
|
60
61
|
binding, the compaction hook, and the packaging scripts. The deleted files are upstream's own
|
|
61
62
|
publish plumbing for channels this product does not use (ghcr images, AUR, a Homebrew tap, a
|
|
62
63
|
hosted console account) — plus, in 0.4.0, the first-party account surface described below.
|
|
@@ -108,7 +109,7 @@ npm install -g glasspane-harness
|
|
|
108
109
|
bun add -g glasspane-harness
|
|
109
110
|
|
|
110
111
|
# or one-click (npm first, GitHub release asset as fallback)
|
|
111
|
-
curl -fsSL https://raw.githubusercontent.com/jingzhao-l/glasspane-harness/
|
|
112
|
+
curl -fsSL https://raw.githubusercontent.com/jingzhao-l/glasspane-harness/v0.9.1/scripts/install.sh | bash
|
|
112
113
|
```
|
|
113
114
|
|
|
114
115
|
Two commands are installed: **`glasspane-harness`** and the short alias **`gp-harness`**.
|
|
@@ -206,9 +207,14 @@ bun install # workspace (on TLS-intercepting networks bun needs
|
|
|
206
207
|
# NODE_EXTRA_CA_CERTS — see FORK.md)
|
|
207
208
|
bun run typecheck # per package
|
|
208
209
|
bun test --timeout 30000 # fixed-point tests (from packages/opencode)
|
|
209
|
-
bun run build --single
|
|
210
|
+
cd packages/opencode && bun run build --single # product build: CLI + TUI + embedded web app
|
|
210
211
|
```
|
|
211
212
|
|
|
213
|
+
`build` is a script in `packages/opencode/package.json`; the workspace root has no `build`
|
|
214
|
+
script, so the last command must run from that package — from the root it dies with
|
|
215
|
+
`Script not found "build"`, which is failure #1 of the four recorded in
|
|
216
|
+
[docs/release.md](docs/release.md).
|
|
217
|
+
|
|
212
218
|
The repo-side gates live in the GlassPane repository under `harness/` (hook-liveness,
|
|
213
219
|
fork-diff, kernel-pin, tool-surface, surface-semantics, product-surface,
|
|
214
220
|
brand-surface); their rationale, negative controls and known boundaries are documented in
|
package/README.zh-CN.md
CHANGED
|
@@ -42,13 +42,14 @@ SDK 与 plugin API。为了塞下内核,没有任何功能被砍掉。
|
|
|
42
42
|
|
|
43
43
|
这句话是**量出来的**,不是承诺。分叉锚定上游
|
|
44
44
|
[anomalyco/opencode](https://github.com/anomalyco/opencode) 的某个 tag,
|
|
45
|
-
`harness/tools/fork-diff.mjs` 每次改动都会把本树与那个 tag
|
|
45
|
+
`harness/tools/fork-diff.mjs` 每次改动都会把本树与那个 tag 逐文件对比。那把尺子自己打出的就是
|
|
46
|
+
下面这一行——原样照抄,对着 2026-10-18 记录的金样:
|
|
46
47
|
|
|
47
48
|
```
|
|
48
|
-
fork-diff vs v1.18.32:
|
|
49
|
+
fork-diff vs v1.18.32: 4645/6724 byte-identical, 282 edited, 92 added, 1705 deleted
|
|
49
50
|
```
|
|
50
51
|
|
|
51
|
-
上游发来的 6,632 个文件里 4,
|
|
52
|
+
上游发来的 6,632 个文件里 4,645 个仍逐字节保持上游原样。改动(282 个)集中在 config/paths/品牌、
|
|
52
53
|
`gp_*` 工具面、内核绑定、压缩钩子和打包脚本;删掉的是上游**自己的**发布管道(ghcr 镜像、AUR、
|
|
53
54
|
Homebrew tap、托管 console 账号)——外加 0.4.0 里下面说的第一方账号面。
|
|
54
55
|
|
|
@@ -79,16 +80,18 @@ Azure、OpenRouter 等等全在——几百个模型——每一个都用**你
|
|
|
79
80
|
| **SDK** | TypeScript SDK 与 plugin SDK,用来写自己的 `gp_*` 式工具 | 工作区包,随树发布 |
|
|
80
81
|
|
|
81
82
|
**刻意不发**:上游的托管 console / enterprise 栈(私有 harness 不需要"组织与额度后台"这种形态)、
|
|
82
|
-
上游的**文档站**(`packages/web
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
上游的**文档站**(`packages/web`)——这些片已**从本仓删除**;本产品的 canonical 文档是 `docs/`。
|
|
84
|
+
它们从来不属于这个产品,把别人的产品面留在自己仓里只会让私有化变成自欺。**Electron 桌面 app
|
|
85
|
+
不随产品发布,这是决定**:`packages/desktop` 仍在树里,但它是**血缘**——`product.json` 的
|
|
86
|
+
`product.lineageOnly` 把它记作 `packages/desktop (Electron — second batch: needs signing/notarisation accounts)`,
|
|
87
|
+
第二批缺的正是签名与公证账号。
|
|
85
88
|
|
|
86
89
|
## 安装
|
|
87
90
|
|
|
88
91
|
```bash
|
|
89
92
|
npm install -g glasspane-harness # 推荐
|
|
90
93
|
bun add -g glasspane-harness
|
|
91
|
-
curl -fsSL https://raw.githubusercontent.com/jingzhao-l/glasspane-harness/
|
|
94
|
+
curl -fsSL https://raw.githubusercontent.com/jingzhao-l/glasspane-harness/v0.9.1/scripts/install.sh | bash
|
|
92
95
|
```
|
|
93
96
|
|
|
94
97
|
会装出两个命令:**`glasspane-harness`** 与短别名 **`gp-harness`**。
|
|
@@ -151,9 +154,14 @@ glasspane-harness --help
|
|
|
151
154
|
## 文档
|
|
152
155
|
|
|
153
156
|
- [`docs/install.md`](docs/install.md) — 安装通道、权限、自检
|
|
157
|
+
- [`docs/models-and-keys.md`](docs/models-and-keys.md) — 模型目录,以及怎么把你自己的 API key
|
|
158
|
+
交进去
|
|
154
159
|
- [`docs/tools.md`](docs/tools.md) — 逐个参数的 `gp_*` 参考
|
|
155
160
|
- [`docs/evidence.md`](docs/evidence.md) — 归因、诊断、决策日志
|
|
156
161
|
- [`docs/migrate-from-opencode.md`](docs/migrate-from-opencode.md) — 相对上游改了什么、刻意留了什么
|
|
162
|
+
- [`docs/release.md`](docs/release.md) — 怎么切一版,以及 npm trusted-publisher 的配置
|
|
163
|
+
- [`docs/kernel-integration.md`](docs/kernel-integration.md) — 共享内核、它如何以钉住的
|
|
164
|
+
`iterate-kernel` 依赖进入本 fork、以及双向集成今天到底有多少
|
|
157
165
|
- [`docs/troubleshooting.md`](docs/troubleshooting.md) — 引擎不可达、权限拒绝、`GP_E_*` 码表
|
|
158
166
|
- [`FORK.md`](FORK.md) / [`SYNCLOG.md`](SYNCLOG.md) — 分叉坐标、纪律、每批实测数字;
|
|
159
167
|
[`NOTICE`](NOTICE) — 署名;[`CHANGELOG.md`](CHANGELOG.md) — 每个版本发了什么
|
|
@@ -164,9 +172,13 @@ glasspane-harness --help
|
|
|
164
172
|
bun install # 工作区(被 TLS 拦截的网络上 bun 需要 NODE_EXTRA_CA_CERTS,见 FORK.md)
|
|
165
173
|
bun run typecheck
|
|
166
174
|
bun test --timeout 30000 # 固定点测试(在 packages/opencode 里跑)
|
|
167
|
-
bun run build --single
|
|
175
|
+
cd packages/opencode && bun run build --single # 产品构建:CLI + TUI + 内嵌 web 应用
|
|
168
176
|
```
|
|
169
177
|
|
|
178
|
+
`build` 是 `packages/opencode/package.json` 里的脚本,工作区根**没有** `build` 这个脚本,所以最后
|
|
179
|
+
那条必须在那个包里跑——在根上跑会死在 `Script not found "build"`,那正是
|
|
180
|
+
[docs/release.md](docs/release.md) 记的四次栽跟头里的第一次。
|
|
181
|
+
|
|
170
182
|
仓侧的闸住在 GlassPane 仓的 `harness/`(hook-liveness、fork-diff、kernel-pin、
|
|
171
183
|
tool-surface、surface-semantics、product-surface、brand-surface),理由、反向控制与已知边界
|
|
172
184
|
写在 `harness/README.md`。我们每个定制提交都带 `[gp]` 前缀。
|
package/package.json
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"scripts": {
|
|
26
26
|
"postinstall": "node ./postinstall.mjs"
|
|
27
27
|
},
|
|
28
|
-
"version": "0.
|
|
28
|
+
"version": "0.9.1",
|
|
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.
|
|
48
|
-
"glasspane-harness-darwin-x64": "0.
|
|
47
|
+
"glasspane-harness-darwin-arm64": "0.9.1",
|
|
48
|
+
"glasspane-harness-darwin-x64": "0.9.1"
|
|
49
49
|
}
|
|
50
50
|
}
|
package/postinstall.mjs
CHANGED
|
@@ -33,6 +33,39 @@ const sourceBinary = platform === "windows" ? "glasspane-harness.exe" : "glasspa
|
|
|
33
33
|
const REGISTRY = "https://registry.npmjs.org"
|
|
34
34
|
const targetBinary = path.join(__dirname, "bin", "glasspane-harness.exe")
|
|
35
35
|
|
|
36
|
+
// The installable platform packages are the target matrix, never an enumeration of possible
|
|
37
|
+
// suffixes. product.json holds that matrix and script/publish.ts seals it into this wrapper's
|
|
38
|
+
// own optionalDependencies (its --dry-run refuses a wrapper whose list disagrees), so both
|
|
39
|
+
// copies are the same declared set by construction. Read product.json the same way
|
|
40
|
+
// script/build.ts does — at the fork root, three directories above this file — which holds in
|
|
41
|
+
// the repo and in installer-selftest fixtures; inside an installed wrapper that path does not
|
|
42
|
+
// exist and the sealed optionalDependencies are the matrix's only surviving copy there. A
|
|
43
|
+
// foreign product.json three directories above node_modules (a project that happens to ship
|
|
44
|
+
// one) is rejected by the name check below, never obeyed.
|
|
45
|
+
const declaredNames = (() => {
|
|
46
|
+
const namesFromMatrix = (matrix) =>
|
|
47
|
+
matrix.map((target) =>
|
|
48
|
+
[
|
|
49
|
+
packageJson.name,
|
|
50
|
+
target.os === "win32" ? "windows" : target.os,
|
|
51
|
+
target.arch,
|
|
52
|
+
target.avx2 === false ? "baseline" : undefined,
|
|
53
|
+
target.abi ?? undefined,
|
|
54
|
+
]
|
|
55
|
+
.filter(Boolean)
|
|
56
|
+
.join("-"),
|
|
57
|
+
)
|
|
58
|
+
try {
|
|
59
|
+
const parsed = JSON.parse(fs.readFileSync(path.join(__dirname, "..", "..", "..", "product.json"), "utf8"))
|
|
60
|
+
if (parsed?.name === packageJson.name && Array.isArray(parsed.platformTargets) && parsed.platformTargets.length > 0) {
|
|
61
|
+
return namesFromMatrix(parsed.platformTargets)
|
|
62
|
+
}
|
|
63
|
+
} catch {
|
|
64
|
+
// not in a repo checkout — fall through to the sealed manifest
|
|
65
|
+
}
|
|
66
|
+
return Object.keys(packageJson.optionalDependencies ?? {})
|
|
67
|
+
})()
|
|
68
|
+
|
|
36
69
|
function supportsAvx2() {
|
|
37
70
|
if (arch !== "x64") return false
|
|
38
71
|
|
|
@@ -101,24 +134,45 @@ function isMusl() {
|
|
|
101
134
|
function packageNames() {
|
|
102
135
|
const baseline = arch === "x64" && !supportsAvx2()
|
|
103
136
|
|
|
104
|
-
|
|
105
|
-
if (
|
|
137
|
+
const candidates = (() => {
|
|
138
|
+
if (platform === "linux") {
|
|
139
|
+
if (isMusl()) {
|
|
140
|
+
if (arch === "x64")
|
|
141
|
+
return baseline
|
|
142
|
+
? [`${base}-baseline-musl`, `${base}-musl`, `${base}-baseline`, base]
|
|
143
|
+
: [`${base}-musl`, `${base}-baseline-musl`, base, `${base}-baseline`]
|
|
144
|
+
return [`${base}-musl`, base]
|
|
145
|
+
}
|
|
146
|
+
|
|
106
147
|
if (arch === "x64")
|
|
107
148
|
return baseline
|
|
108
|
-
? [`${base}-baseline
|
|
109
|
-
: [`${base}-
|
|
110
|
-
return [`${base}-musl
|
|
149
|
+
? [`${base}-baseline`, base, `${base}-baseline-musl`, `${base}-musl`]
|
|
150
|
+
: [base, `${base}-baseline`, `${base}-musl`, `${base}-baseline-musl`]
|
|
151
|
+
return [base, `${base}-musl`]
|
|
111
152
|
}
|
|
112
153
|
|
|
113
|
-
if (arch === "x64")
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
154
|
+
if (arch === "x64") return baseline ? [`${base}-baseline`, base] : [base, `${base}-baseline`]
|
|
155
|
+
return [base]
|
|
156
|
+
})()
|
|
157
|
+
|
|
158
|
+
// Only a declared package can be installed (installPackage already refuses to run npm for a
|
|
159
|
+
// name with no sealed version, so everything filtered here was ever just an unsatisfiable
|
|
160
|
+
// fallback — naming one in the failure advice sent the reader to a package this product does
|
|
161
|
+
// not publish), and a no-AVX2 x64 machine can only run a baseline build (the plain x64 build
|
|
162
|
+
// needs AVX2; product.json's platform.dropped records that darwin-x64-baseline was dropped
|
|
163
|
+
// by decision, so on such a machine the honest answer is the refusal below, not the plain
|
|
164
|
+
// package that would not start). An empty list means "this machine has no build to install".
|
|
165
|
+
return candidates.filter((name) => {
|
|
166
|
+
if (!declaredNames.includes(name)) return false
|
|
167
|
+
return !baseline || name.endsWith("-baseline") || name.endsWith("-baseline-musl")
|
|
168
|
+
})
|
|
169
|
+
}
|
|
119
170
|
|
|
120
|
-
|
|
121
|
-
|
|
171
|
+
function machineLabel() {
|
|
172
|
+
const parts = [`${platform}-${arch}`]
|
|
173
|
+
if (platform === "linux" && isMusl()) parts.push("musl")
|
|
174
|
+
if (arch === "x64" && !supportsAvx2()) parts.push("without AVX2")
|
|
175
|
+
return parts.join(" ")
|
|
122
176
|
}
|
|
123
177
|
|
|
124
178
|
function resolveBinary(name) {
|
|
@@ -186,7 +240,19 @@ function verifyBinary() {
|
|
|
186
240
|
}
|
|
187
241
|
|
|
188
242
|
function main() {
|
|
189
|
-
|
|
243
|
+
const names = packageNames()
|
|
244
|
+
// The machine has no installable build at all: say so plainly and name the supported set.
|
|
245
|
+
// The old text here told Linux, Windows and no-AVX2 x64 Mac users to "manually install"
|
|
246
|
+
// names like glasspane-harness-darwin-x64-baseline — packages this product has decided
|
|
247
|
+
// (product.json platform.dropped) not to publish, so the printed remedy could never work.
|
|
248
|
+
if (names.length === 0) {
|
|
249
|
+
const supported = declaredNames.length
|
|
250
|
+
? `The builds it does publish are ${declaredNames.map((name) => JSON.stringify(name)).join(", ")}.`
|
|
251
|
+
: "This wrapper declares no platform packages at all."
|
|
252
|
+
throw new Error(`glasspane-harness does not ship a build for your platform (${machineLabel()}). ${supported}`)
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
for (const name of names) {
|
|
190
256
|
try {
|
|
191
257
|
copyBinary(resolveBinary(name), targetBinary)
|
|
192
258
|
if (verifyBinary()) return
|
|
@@ -196,7 +262,7 @@ function main() {
|
|
|
196
262
|
}
|
|
197
263
|
|
|
198
264
|
throw new Error(
|
|
199
|
-
`It seems your package manager failed to install the right glasspane-harness CLI package. Try manually installing ${
|
|
265
|
+
`It seems your package manager failed to install the right glasspane-harness CLI package. Try manually installing ${names
|
|
200
266
|
.map((name) => JSON.stringify(name))
|
|
201
267
|
.join(" or ")}.`,
|
|
202
268
|
)
|