@harness-mix/cli 0.2.2 → 0.2.4

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 (45) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +469 -467
  3. package/output/native-build/desktop-controller.mjs +1 -1
  4. package/output/native-build/renderer-extension.js +23 -4
  5. package/package.json +16 -9
  6. package/scripts/antigravity-adapter-test.cjs +647 -626
  7. package/scripts/codex-adapter-test.cjs +162 -127
  8. package/scripts/collaboration-test.cjs +274 -262
  9. package/scripts/core-review-test.cjs +68 -0
  10. package/scripts/delegation-await-test.cjs +76 -0
  11. package/scripts/jsonl-stdin-test.cjs +40 -0
  12. package/scripts/kiro-cursor-adapters-test.cjs +124 -100
  13. package/scripts/native-acp-depth-test.cjs +30 -5
  14. package/scripts/native-protocol-test.cjs +14 -1
  15. package/scripts/native-update-apply-test.cjs +269 -215
  16. package/scripts/native-update.cjs +78 -0
  17. package/scripts/native-vendor-adapters-test.cjs +196 -154
  18. package/scripts/salvage-rollout-writes.cjs +72 -0
  19. package/scripts/send-cancel-race-test.cjs +80 -0
  20. package/scripts/send-pre-turn-cancel-test.cjs +100 -0
  21. package/scripts/stuck-turn-test.cjs +6 -1
  22. package/scripts/zcode-adapter-test.cjs +329 -0
  23. package/scripts/zcode-live-probe.cjs +66 -0
  24. package/src/main/adapters/antigravity.js +1428 -1415
  25. package/src/main/adapters/codex.js +656 -649
  26. package/src/main/adapters/native-acp-command.js +51 -48
  27. package/src/main/adapters/native-acp.js +47 -12
  28. package/src/main/adapters/qoder.js +12 -8
  29. package/src/main/adapters/zcode.js +921 -10
  30. package/src/main/harness-adapter/event-normalizer.js +5 -2
  31. package/src/main/host/collaboration.js +723 -715
  32. package/src/main/host/jsonl.js +130 -116
  33. package/src/main/host/runtime.js +30 -14
  34. package/src/main/native/config.js +9 -9
  35. package/src/main/native/host.js +2 -0
  36. package/src/main/native/launcher.js +252 -237
  37. package/src/main/native/process-utils.js +157 -57
  38. package/src/main/native/protocol.js +1221 -1177
  39. package/src/main/native/secure-store.js +2 -0
  40. package/src/main/native/update-state.js +123 -110
  41. package/src/main/native/updater.js +460 -394
  42. package/src/main/workspace/core-review.js +13 -5
  43. package/src/native-ui/desktop-control/src/renderer-cdp-control-session.ts +358 -358
  44. package/src/native-ui/renderer-extension/src/renderer-binding-probe.ts +3211 -3181
  45. package/src/native-ui/renderer-extension/src/settings/connections-page.ts +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.4 — 2026-09-21
4
+
5
+ - **ZCode joins as a native harness**: a new adapter speaks the ZCode Protocol stdio app-server directly (`zcode.cjs app-server --stdio`, the same entry the ZCode desktop drives; the jsonl transport gains a `jsonrpc:false` pure-framing mode), replacing the never-workable ACP mapping — session create/resume/close, model selection with an explicit reasoning level (GLM models demand one), thought levels and context usage; events ride the desktop-continuous push with an afterSeq poll loop as fallback; server requests are answered per protocol (runtime preferences, official MCP auth decline, permission approval cards, user-input questions); the account push is key-free (`{builtinModelIds, access:{type, entitled}}` plus the credential entry name — the agent resolves its own shared credentials locally; the one sanctioned runtime key fetch stays in memory, never logged or persisted); image attachments are live-verified (local paths deliver to the model, base64 payloads are materialized to a temp file); permission modes use the canonical `session/setMode` enum; and ZCode is now a dispatchable collaboration worker, Agent-Team member and `/delegate` target with a yolo worker default (the `#` lead role stays off until the protocol gains runtime MCP registration). ZCode 原生适配器落地:直连 ZCode Protocol app-server,附件/权限模式/协作成员均实测可用。
6
+ - ZCode second-pass hardening from live protocol audits: a CLI that dies between turns hung the next send forever — the send now transparently reconnects (fresh process, session resume with create fallback, replayed account push and mode/model selections, reset event-id dedup); a cancelled turn's late `turn.completed` can no longer settle the next turn into an empty answer; declining a permission short-circuited to cancelled instead of a real `deny` decision; and the context projection rides the subscribe snapshot, so the context meter is no longer undefined. ZCode 崩溃自愈、取消竞态、拒绝即拒绝与上下文投影修复。
7
+ - **Qoder unlocked and kept usable across turns**: the reasoning-effort selector maps to qodercli's `reasoning_effort` config option so the catalog and `setThinkingLevel` work, session fork takes the standard Zed params (generalized beyond Kiro), and the fabricated always-empty usage meter is gone (`usage_update` is never emitted); a qodercli that dies between turns (libuv crash-on-exit) no longer poisons the thread — the next send transparently restores the same native session and replays the confirmed model/thinking/permission selections; a locked thread no longer gates its model catalog on the per-host availability cache; switching models replays the confirmed effort instead of silently resetting it; and thread inspection omits empty usage instead of spreading an explicit `usage: null`, which failed the renderer's strict parse and wedged the composer into an ownership error after exactly one task. Qoder 推理等级与会话分叉解锁,跨回合崩溃自愈,模型目录与线程归属修复。
8
+ - Antigravity: desktop-spawned agy children now inherit the Windows system proxy (WinINET) mapped to standard `HTTP_PROXY`/`HTTPS_PROXY`/`NO_PROXY` env vars — Go CLIs ignore registry proxy settings, so without this the OAuth code exchange black-holed and every start demanded a fresh interactive login. Explicit host proxy env always wins. agy 子进程继承系统代理,修复每次启动都要求重新登录的问题。
9
+ - Desktop-triggered updates run in a detached helper process instead of the host: no more updater output polluting the JSONL protocol channel or minutes of synchronous git/npm freezing the event loop; the update lock is exclusive with stale-lock reaping (two updaters can no longer both win), native builds blocked by a running Desktop defer via pendingBuild state and complete at the next launch, npm repair verifies the reinstall result, git repair rebuilds so binaries match the reset sources, and qoder resolution no longer falls back to the IDE launcher (a `--version` probe passed but every `--acp` open launched the GUI); the connections page points grok/antigravity at their official installers. 桌面触发的更新改为独立辅助进程执行,修复协议通道污染与事件循环冻结。
10
+ - Codex: cancelling a turn now settles every pending request shape — `item/tool/requestUserInput` entries are stored group-only, so cancel crashed with a TypeError mid-loop, `turn/interrupt` was never sent, and the native turn kept running behind a UI that believed it was cancelled; cancel also releases the local turn when it lands during the `turn/start` round trip. Codex 取消修复:所有待决请求形态都能正确结算。
11
+ - Collaboration: `apply_delegation_changes` can actually succeed now — its concurrency guard counted the waiting lead thread itself (guaranteed to be running while the MCP call is served), so isolated-worktree results could never be applied; the lead and the job's own child are excluded and paths compare case-insensitively. 协作守卫不再把等待中的 Lead 计入并发,隔离工作树结果得以应用。
12
+ - Desktop control: the enabled-agent set is validated order-insensitively — the controller's hardcoded catalog and the injected bundle disagreed on order, so every production binding was rejected, stalling first boot ~90s in the readiness poll while piling duplicate CDP script registrations. 桌面控制按集合比较启用的 harness,消除首启阻塞与重复注入。
13
+ - `JsonlProcess` marks post-exit rejections with the `harnessExited` marker so deterministic harness exits stay non-retryable upstream, and the launcher's PowerShell helper falls back to Windows PowerShell 5.1.
14
+ - Docs: a standalone bilingual project homepage (GitHub Pages) with an animated flow diagram. 新增独立项目主页。
15
+
16
+ ## 0.2.3 — 2026-09-18
17
+
18
+ - Turn transcripts now fold correctly again: the wire `phase` for `agentMessage` items uses Codex's own vocabulary — `commentary` / `final_answer` — which the Desktop matches literally when extracting the final answer and collapsing the execution zone into the elapsed-time bar. 0.2.1/0.2.2 sent the internal `progress` / `final` values, which the Desktop does not recognize, so completed turns stayed expanded. The internal vocabulary is unchanged and translated at the projection boundary (historic persisted items map through the same function), and the final message segment is explicitly closed at turn settle so its phase reaches the Desktop on the wire. 修复回合转录折叠:agentMessage 的 phase 改用 Codex 原生词表(commentary/final_answer),完成后过程内容正确折叠进「用时」栏。
19
+
20
+ - Send/cancel race hardening: the per-thread send lock is now ticket-owned. Stopping a turn mid-stream frees the thread for an immediate resend, but the old send's exit path can no longer delete the newer send's lock (which previously let a third submission run concurrently and trip the native harness's "already processing" error); pending cancel requests are likewise scoped to the send generation they target. 取消-重发竞态修复:发送锁改为票据所有制,旧发送退出时不再误删新发送的锁。
21
+ - Stuck-turn watchdog now cancels the native session when it settles a wedged turn, instead of only settling the UI: a zombie native process no longer blocks the thread's next turn with an occupancy error. 卡死回合看门狗结算时级联取消原生会话,避免僵尸进程占用后续回合。
22
+ - `/delegate` waits for the child task to actually settle (up to 30 minutes, aligned with collaboration orchestration, injectable as `delegationTimeoutMs`) and cancels the child on timeout with an explicit parent-side error — previously a non-blocking harness child (e.g. Pi) running longer than 30 seconds was silently reported as done with its result dropped. 委派等待修复:子任务异步结算前父线程不再提前误判成功。
23
+ - Forked threads now broadcast `thread/started`, so a fork appears in the Desktop sidebar immediately instead of only after a reload. Fork 分支会话即时显示在侧边栏。
24
+ - Multi-select question answers from the Desktop are preserved in full (JSON-encoded) instead of being truncated to the first option, fixing `JSON.parse` crashes on OpenCode multiple-choice questions; empty answer arrays now resolve to `''` rather than `undefined`. 多选答案全量保留,空数组回退为空字符串。
25
+ - Workspace review attribution: files this turn's own tools touched win over historical "foreign session" attribution, so same-directory sessions' old edits no longer hide this turn's legitimate changes from the review card and undo list. 审查归属修复:本轮触碰的文件不再被历史 foreign 归属误剔。
26
+ - Child-process stdin streams (`jsonl` transports, the DPAPI secure-store helper, the Antigravity CLI, and the official app-server pipe) now swallow asynchronous EPIPE stream errors instead of crashing the host process with an unhandled exception. 子进程 stdin 管道错误不再导致宿主崩溃。
27
+
3
28
  ## 0.2.2 — 2026-09-18
4
29
 
5
30
  - Aligns all six `@harness-mix/native-*` runtime packages at 0.2.2 with the CLI and pins `optionalDependencies` to the same version. 0.2.1 shipped with pins still at 0.1.11, so a fresh install's postinstall could overwrite the bundled fresh Shim binaries with the old-contract 0.1.11 ones; supersedes 0.2.1. Native binaries are rebuilt from unchanged Rust sources.