@simonepri/refined-antigravity-acp 1.4.2 → 1.5.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.
Files changed (49) hide show
  1. package/dist/src/core/command.d.ts +1 -1
  2. package/dist/src/core/command.d.ts.map +1 -1
  3. package/dist/src/core/command.js +2 -1
  4. package/dist/src/core/command.js.map +1 -1
  5. package/dist/src/core/pipeline.d.ts.map +1 -1
  6. package/dist/src/core/pipeline.js.map +1 -1
  7. package/dist/src/core/supervisor.d.ts +1 -0
  8. package/dist/src/core/supervisor.d.ts.map +1 -1
  9. package/dist/src/core/supervisor.js +19 -3
  10. package/dist/src/core/supervisor.js.map +1 -1
  11. package/dist/src/core/telemetry.d.ts.map +1 -1
  12. package/dist/src/core/types.d.ts.map +1 -1
  13. package/dist/src/fixes/active-turn-collision/index.d.ts +1 -0
  14. package/dist/src/fixes/active-turn-collision/index.d.ts.map +1 -1
  15. package/dist/src/fixes/active-turn-collision/index.js +11 -10
  16. package/dist/src/fixes/active-turn-collision/index.js.map +1 -1
  17. package/dist/src/fixes/dangling-tool-calls/index.d.ts.map +1 -1
  18. package/dist/src/fixes/gated-third-party-models/index.d.ts +25 -0
  19. package/dist/src/fixes/gated-third-party-models/index.d.ts.map +1 -0
  20. package/dist/src/fixes/gated-third-party-models/index.js +55 -0
  21. package/dist/src/fixes/gated-third-party-models/index.js.map +1 -0
  22. package/dist/src/fixes/index.d.ts +1 -0
  23. package/dist/src/fixes/index.d.ts.map +1 -1
  24. package/dist/src/fixes/index.js +3 -2
  25. package/dist/src/fixes/index.js.map +1 -1
  26. package/dist/src/fixes/malformed-stream-syntax/index.d.ts +10 -0
  27. package/dist/src/fixes/malformed-stream-syntax/index.d.ts.map +1 -1
  28. package/dist/src/fixes/malformed-stream-syntax/index.js +157 -36
  29. package/dist/src/fixes/malformed-stream-syntax/index.js.map +1 -1
  30. package/dist/src/fixes/missing-question-fallback/index.d.ts.map +1 -1
  31. package/dist/src/fixes/missing-question-fallback/index.js +22 -10
  32. package/dist/src/fixes/missing-question-fallback/index.js.map +1 -1
  33. package/dist/src/fixes/missing-slash-skills/index.d.ts.map +1 -1
  34. package/dist/src/fixes/missing-slash-skills/index.js +24 -2
  35. package/dist/src/fixes/missing-slash-skills/index.js.map +1 -1
  36. package/dist/src/fixes/missing-system-prompt/index.js.map +1 -1
  37. package/dist/src/fixes/premature-turn-stop/index.d.ts.map +1 -1
  38. package/dist/src/fixes/premature-turn-stop/index.js.map +1 -1
  39. package/dist/src/fixes/repetitive-tool-loop/index.d.ts.map +1 -1
  40. package/dist/src/fixes/repetitive-tool-loop/index.js.map +1 -1
  41. package/dist/src/fixes/silent-background-tasks/index.d.ts.map +1 -1
  42. package/dist/src/fixes/silent-background-tasks/index.js.map +1 -1
  43. package/dist/src/fixes/stale-mcp-endpoints/index.d.ts.map +1 -1
  44. package/dist/src/fixes/stale-mcp-endpoints/index.js.map +1 -1
  45. package/dist/src/fixes/subagent-hang/subagent-hang.d.ts.map +1 -1
  46. package/dist/src/index.js.map +1 -1
  47. package/dist/src/setup.js.map +1 -1
  48. package/package.json +4 -4
  49. package/readme.md +33 -31
package/readme.md CHANGED
@@ -138,30 +138,31 @@ The matrix below documents upstream defects across process startup, turn executi
138
138
  > - **Star the repository**: Community visibility signals to the Google Antigravity team which upstream defects impact real users.
139
139
  > - **Report new issues**: If you encounter an unhandled crash, deadlock, or protocol edge case, [open an issue](https://github.com/simonepri/refined-antigravity-acp/issues). Every report includes a reproducible problem test and a solution test.
140
140
 
141
- | Defect | Upstream Problem | Solution |
142
- | :--------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
143
- | [**Missing Localharness Binary**](src/fixes/missing-localharness/index.ts) | **Problem**: `agy_acp_server` invokes sibling `./localharness_external`. When relocated or spawned in an isolated directory without `$ANTIGRAVITY_HARNESS_PATH`, it crashes on `session/new`.<br>🔗 [`problem: startup crash`](src/fixes/missing-localharness/index.e2e.test.ts#L20) | Searches standard install paths, downloads the official package if missing, and exports the resolved `$ANTIGRAVITY_HARNESS_PATH`.<br>🔗 [`solution: harness resolution`](src/fixes/missing-localharness/index.e2e.test.ts#L38) |
144
- | [**Missing Custom System Prompt**](src/fixes/missing-system-prompt/index.ts) | **Problem**: Stock ACP protocol does not support injecting custom workspace rules, agent personas, or profile system prompts.<br>🔗 [`problem: missing system prompt context`](src/fixes/missing-system-prompt/index.e2e.test.ts#L6) | Injects client-configured `systemPrompt` (via `_meta.systemPrompt` or nested `_meta.<client>.systemPrompt`) and tool visibility guidance into prompt turns without polluting saved history.<br>🔗 [`solution: prompt injection`](src/fixes/missing-system-prompt/index.e2e.test.ts#L15) |
145
- | [**Unadvertised Workspace Slash Skills**](src/fixes/missing-slash-skills/index.ts) | **Problem**: Raw ACP only advertises built-in model commands and ignores custom workspace skills defined in `.agents/skills` or `.gemini/skills`.<br>🔗 [`problem: missing slash skills`](src/fixes/missing-slash-skills/index.e2e.test.ts#L40) | Discovers `SKILL.md` files across all configured workspace directories and dynamically augments `available_commands_update`.<br>🔗 [`solution: skill augmentation`](src/fixes/missing-slash-skills/index.e2e.test.ts#L73) |
146
- | [**Subagent Deadlock & Hang**](src/fixes/subagent-hang/index.ts) | **Problem**: Subprocesses can enter unmonitored hangs or panic (`could not find doneCh for checkpoint`) during background task execution.<br>🔗 [`problem: unmonitored hang`](src/fixes/subagent-hang/index.e2e.test.ts#L7) | Monitors telemetry activity and stderr panics to trigger process recycling without mutating upstream Python bytecode.<br>🔗 [`solution: hang telemetry recycling`](src/fixes/subagent-hang/index.e2e.test.ts#L22) |
147
- | [**Malformed Stream Syntax & LaTeX**](src/fixes/malformed-stream-syntax/index.ts) | **Problem**: LLM outputs unquoted node labels with parentheses (`id[Label (Prod)]`) and raw LaTeX math (`\\le`), crashing frontend Mermaid and markdown parsers.<br>🔗 [`problem: syntax normalization`](src/fixes/malformed-stream-syntax/index.e2e.test.ts#L42) | Wraps parenthetical labels in quotes `["..."`] and converts LaTeX escapes to clean Unicode characters (`≤`, `→`, `≠`) across streaming chunks.<br>🔗 [`solution: stream sanitizer`](src/fixes/malformed-stream-syntax/index.e2e.test.ts#L42) |
148
- | [**Active Foreground Turn Collision**](src/fixes/active-turn-collision/index.ts) | **Problem**: Sending a prompt while the model is executing tool calls either crashes or is rejected with _"A foreground turn is already active"_.<br>🔗 [`problem: foreground active collision`](src/fixes/active-turn-collision/index.e2e.test.ts#L13) | Categorizes mid-turn inputs (side questions, course corrections, or stop requests) with non-destructive steering directives and prompt retries.<br>🔗 [`solution: user steering`](src/fixes/active-turn-collision/index.e2e.test.ts#L26) |
149
- | [**Interruption Cancellation Leak**](src/fixes/cancellation-leak/index.ts) | **Problem**: Interrupted turns leak raw internal Go/Python cancellation exception strings (_"context canceledThe request was cancelled by the client."_) directly into assistant message chunks.<br>🔗 [`problem: raw cancellation leak`](src/fixes/cancellation-leak/index.e2e.test.ts#L6) | Drops raw upstream cancellation error chunks so editor chat feeds remain clean on interruption.<br>🔗 [`solution: cancellation drop`](src/fixes/cancellation-leak/index.e2e.test.ts#L11) |
150
- | [**Stale Ephemeral MCP Endpoints**](src/fixes/stale-mcp-endpoints/index.ts) | **Problem**: When a hung child process is recycled, resending initial `mcpServers` with outdated localhost ports fails because proxy endpoints have changed.<br>🔗 [`problem: stale proxy port`](src/fixes/stale-mcp-endpoints/index.e2e.test.ts#L20) | Uses `McpProxyPool` to dynamically intercept, remap, and heal MCP tool URLs across process restarts.<br>🔗 [`solution: proxy URL remapping`](src/fixes/stale-mcp-endpoints/index.e2e.test.ts#L20) |
151
- | [**Orphaned SQLite Checkpoints**](src/fixes/orphaned-checkpoints/index.ts) | **Problem**: Canceling a turn leaves in-progress checkpoints uncommitted in SQLite, causing fatal panics (_"could not find doneCh for checkpoint"_) on future turns.<br>🔗 [`problem: orphaned checkpoint`](src/fixes/orphaned-checkpoints/index.e2e.test.ts#L11) | Scans the session SQLite database on startup and teardown, updating orphaned in-progress checkpoints to `ABORTED` (status 5).<br>🔗 [`solution: checkpoint repair`](src/fixes/orphaned-checkpoints/index.e2e.test.ts#L42) |
152
- | [**Out-of-Bounds Generation Metadata**](src/fixes/orphaned-checkpoints/index.ts) | **Problem**: Canceling or truncating turns leaves orphaned metadata in SQLite referencing future step indices, causing Go executor panics (_"earliest step index is out of bounds"_).<br>🔗 [`problem: out-of-bounds metadata`](src/fixes/orphaned-checkpoints/index.e2e.test.ts#L224) | Automatically prunes orphaned executor and generation metadata referencing non-existent step indices on prompt and load.<br>🔗 [`solution: metadata pruning`](src/fixes/orphaned-checkpoints/index.e2e.test.ts#L268) |
153
- | [**Unscoped Database Corruptions**](src/fixes/orphaned-checkpoints/index.ts) | **Problem**: Global database repair scans would mutate concurrent session databases across open tabs, corrupting active turns.<br>🔗 [`problem: concurrent tab safety`](src/fixes/orphaned-checkpoints/index.e2e.test.ts#L78) | Scopes checkpoint repair strictly to the target `sessionId.db`, isolating concurrent editor tabs.<br>🔗 [`solution: scoped session repair`](src/fixes/orphaned-checkpoints/index.e2e.test.ts#L117) |
154
- | [**Database Concurrency Lockout**](src/fixes/orphaned-checkpoints/index.ts) | **Problem**: Raw `DatabaseSync` without busy timeout throws `SQLITE_BUSY: database is locked` when reading conversation steps during active writes.<br>🔗 [`problem: raw sqlite busy error`](src/fixes/orphaned-checkpoints/index.ts#L41) | Configures all database connections with `timeout: 2000` to wait out locks during concurrent reads and writes.<br>🔗 [`solution: sqlite timeout wait`](src/fixes/orphaned-checkpoints/index.ts#L41) |
155
- | [**Dropped History Chunks on Load**](src/fixes/dropped-history-chunks/index.ts) | **Problem**: Raw `agy_acp_server` drops thought chains and agent message chunks during `session/load`, loading an incomplete history.<br>🔗 [`problem: dropped history chunks`](src/fixes/dropped-history-chunks/index.e2e.test.ts#L53) | Directly inspects protobuf steps in SQLite and reconstructs missing thought and message update events.<br>🔗 [`solution: sqlite history reconstruction`](src/fixes/dropped-history-chunks/index.e2e.test.ts#L99) |
156
- | [**Noisy WebSocket stderr Logs**](src/fixes/noisy-stderr-logs/index.ts) | **Problem**: Upstream binary dumps unbuffered `RAW WS MSG:` debug payloads to stderr, flooding editor logs.<br>🔗 [`problem: stderr noise`](src/fixes/noisy-stderr-logs/index.e2e.test.ts#L16) | Filters noisy websocket trace logs from stderr by default, exposing them only when `REFINED_AGY_TRACE=1` is explicitly set.<br>🔗 [`solution: stderr filter`](src/fixes/noisy-stderr-logs/index.e2e.test.ts#L16) |
157
- | [**Flattened Model Variants & Efforts**](src/fixes/flattened-model-efforts/index.ts) | **Problem**: Upstream binary flattens all model and reasoning variants into a confusing 11-item flat dropdown list (`gemini-3.8-flash-high`, `gemini-pro-agent`, etc.) without dedicated reasoning controls.<br>🔗 [`problem: flattened model list`](src/fixes/flattened-model-efforts/index.e2e.test.ts#L14) | Decomposes upstream models into clean base model choices (`gemini-3.8-flash`, `gemini-3.1-pro`, etc.) and injects standard reasoning effort controls (`high`, `medium`, `low`), translating settings upstream.<br>🔗 [`solution: decomposed effort options`](src/fixes/flattened-model-efforts/index.e2e.test.ts#L34) |
158
- | [**Non-Canonical Mode ID Rejection**](src/fixes/non-canonical-mode-ids/index.ts) | **Problem**: Upstream binary expects internal mode IDs (`auto_edit`, `yolo`, `default`) and rejects standard Paseo mode identifiers like `accept-edits`, `dangerously-skip-permissions`, and `plan`.<br>🔗 [`problem: mode rejection`](src/fixes/non-canonical-mode-ids/index.e2e.test.ts#L14) | Translates client mode aliases to canonical internal IDs across outbound requests, session reloads, and child restarts.<br>🔗 [`solution: mode normalization`](src/fixes/non-canonical-mode-ids/index.e2e.test.ts#L32) |
159
- | [**Silent Background Task Execution**](src/fixes/silent-background-tasks/index.ts) | **Problem**: Subagents and background tasks execute silently; upstream binary produces no stdout chunks during `STATE_WAITING_FOR_TASKS`, leaving editor UIs frozen.<br>🔗 [`problem: silent background tasks`](src/fixes/silent-background-tasks/index.e2e.test.ts#L6) | Synthesizes standard ACP `session/update` plan notifications (`sessionUpdate: "plan"`) tracking active subagent roles and background tasks with live progress and completion.<br>🔗 [`solution: plan synthesis`](src/fixes/silent-background-tasks/index.e2e.test.ts#L12) |
160
- | ~~[**Missing Usage & Token Metrics**](src/fixes/missing-usage-metrics/index.ts)~~<br>🎉 **Retired in ACP 1.3.0** | **Problem**: Upstream binary never emitted ACP `usage_update` notifications, leaving editor context window meters blank.<br>🔗 [`verified: upstream fix`](src/fixes/missing-usage-metrics/index.e2e.test.ts#L15) | **Resolved Upstream by Google in ACP 1.3.0**.<br>Upstream binary now natively emits standard ACP `sessionUpdate: "usage_update"` with `used` and `size` context tokens. Patch retired.<br>🔗 [`solution: native usage passthrough`](src/fixes/missing-usage-metrics/index.e2e.test.ts#L36) |
161
- | [**Dangling Running Tool Calls**](src/fixes/dangling-tool-calls/index.ts) | **Problem**: When commands are backgrounded, upstream never emits terminal `tool_call_update` with `status: "completed"`, leaving editor UIs with an infinite active running animation.<br>🔗 [`problem: dangling running tool call`](src/fixes/dangling-tool-calls/index.test.ts#L67) | Tracks active tool calls and marks backgrounded tools completed immediately, before assistant text streams, and upon turn completion.<br>🔗 [`solution: tool call auto-completion`](src/fixes/dangling-tool-calls/index.test.ts#L79) |
162
- | [**Interactive Question Deadlock**](src/fixes/missing-question-fallback/index.ts) | **Problem**: When `ask_question` is active, sending a chat prompt or cancel causes upstream to reject the message with _"A foreground turn is already active"_, deadlocking sessions indefinitely.<br>🔗 [`problem: question collision`](src/fixes/missing-question-fallback/index.e2e.test.ts#L16) | Intercepts user chat prompts and cancellations to auto-unblock pending question permission requests to the child process and complete UI tool states.<br>🔗 [`solution: question unblocking`](src/fixes/missing-question-fallback/index.e2e.test.ts#L53) |
163
- | [**Premature Empty Turn Stop**](src/fixes/premature-turn-stop/index.ts) | **Problem**: Upstream binary prematurely concludes prompt turns with empty completions (`stopReason=16`) without emitting assistant message chunks, leaving editor UIs frozen in silence.<br>🔗 [`problem: premature turn termination`](src/fixes/premature-turn-stop/index.test.ts#L88) | Injects system prompt steering and intercepts empty prompt turn completions to autonomously dispatch self-healing continuation directives without proxy text synthesis.<br>🔗 [`solution: self-healing continuation`](src/fixes/premature-turn-stop/index.test.ts#L131) |
164
- | [**Repetitive Tool Calling Loop**](src/fixes/repetitive-tool-loop/index.ts) | **Problem**: Upstream binary has no loop detector and will execute cyclic or identical tool calls indefinitely, burning thousands of tokens and freezing sessions.<br>🔗 [`problem: repetitive tool loop`](src/fixes/repetitive-tool-loop/index.e2e.test.ts#L25) | Tracks tool signatures and resource paths per turn using suffix cycle matching, sending `session/cancel` upstream, auto-completing tools, and steering the model to proceed e2e without polluting chat.<br>🔗 [`solution: loop circuit breaker`](src/fixes/repetitive-tool-loop/index.e2e.test.ts#L81) |
141
+ | Defect | Upstream Problem | Solution |
142
+ | :---------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
143
+ | [**Missing Localharness Binary**](src/fixes/missing-localharness/index.ts) | **Problem**: `agy_acp_server` invokes sibling `./localharness_external`. When relocated or spawned in an isolated directory without `$ANTIGRAVITY_HARNESS_PATH`, it crashes on `session/new`.<br>🔗 [`problem: startup crash`](src/fixes/missing-localharness/index.e2e.test.ts#L20) | Searches standard install paths, downloads the official package if missing, and exports the resolved `$ANTIGRAVITY_HARNESS_PATH`.<br>🔗 [`solution: harness resolution`](src/fixes/missing-localharness/index.e2e.test.ts#L38) |
144
+ | [**Missing Custom System Prompt**](src/fixes/missing-system-prompt/index.ts) | **Problem**: Stock ACP protocol does not support injecting custom workspace rules, agent personas, or profile system prompts.<br>🔗 [`problem: missing system prompt context`](src/fixes/missing-system-prompt/index.e2e.test.ts#L6) | Injects client-configured `systemPrompt` (via `_meta.systemPrompt` or nested `_meta.<client>.systemPrompt`) and tool visibility guidance into prompt turns without polluting saved history.<br>🔗 [`solution: prompt injection`](src/fixes/missing-system-prompt/index.e2e.test.ts#L15) |
145
+ | [**Unadvertised Workspace Slash Skills**](src/fixes/missing-slash-skills/index.ts) | **Problem**: Raw ACP only advertises built-in model commands and ignores custom workspace skills defined in `.agents/skills` or `.gemini/skills`.<br>🔗 [`problem: missing slash skills`](src/fixes/missing-slash-skills/index.e2e.test.ts#L40) | Discovers `SKILL.md` files across all configured workspace directories and dynamically augments `available_commands_update`.<br>🔗 [`solution: skill augmentation`](src/fixes/missing-slash-skills/index.e2e.test.ts#L73) |
146
+ | [**Subagent Deadlock & Hang**](src/fixes/subagent-hang/index.ts) | **Problem**: Subprocesses can enter unmonitored hangs or panic (`could not find doneCh for checkpoint`) during background task execution.<br>🔗 [`problem: unmonitored hang`](src/fixes/subagent-hang/index.e2e.test.ts#L7) | Monitors telemetry activity and stderr panics to trigger process recycling without mutating upstream Python bytecode.<br>🔗 [`solution: hang telemetry recycling`](src/fixes/subagent-hang/index.e2e.test.ts#L22) |
147
+ | [**Malformed Stream Syntax & LaTeX**](src/fixes/malformed-stream-syntax/index.ts) | **Problem**: LLM outputs unquoted node labels with parentheses (`id[Label (Prod)]`) and raw LaTeX math (`\\le`), crashing frontend Mermaid and markdown parsers.<br>🔗 [`problem: syntax normalization`](src/fixes/malformed-stream-syntax/index.e2e.test.ts#L42) | Wraps parenthetical labels in quotes `["..."`] and converts LaTeX escapes to clean Unicode characters (`≤`, `→`, `≠`) across streaming chunks.<br>🔗 [`solution: stream sanitizer`](src/fixes/malformed-stream-syntax/index.e2e.test.ts#L42) |
148
+ | [**Active Foreground Turn Collision**](src/fixes/active-turn-collision/index.ts) | **Problem**: Sending a prompt while the model is executing tool calls either crashes or is rejected with _"A foreground turn is already active"_.<br>🔗 [`problem: foreground active collision`](src/fixes/active-turn-collision/index.e2e.test.ts#L13) | Categorizes mid-turn inputs (side questions, course corrections, or stop requests) with non-destructive steering directives and prompt retries.<br>🔗 [`solution: user steering`](src/fixes/active-turn-collision/index.e2e.test.ts#L26) |
149
+ | [**Interruption Cancellation Leak**](src/fixes/cancellation-leak/index.ts) | **Problem**: Interrupted turns leak raw internal Go/Python cancellation exception strings (_"context canceledThe request was cancelled by the client."_) directly into assistant message chunks.<br>🔗 [`problem: raw cancellation leak`](src/fixes/cancellation-leak/index.e2e.test.ts#L6) | Drops raw upstream cancellation error chunks so editor chat feeds remain clean on interruption.<br>🔗 [`solution: cancellation drop`](src/fixes/cancellation-leak/index.e2e.test.ts#L11) |
150
+ | [**Stale Ephemeral MCP Endpoints**](src/fixes/stale-mcp-endpoints/index.ts) | **Problem**: When a hung child process is recycled, resending initial `mcpServers` with outdated localhost ports fails because proxy endpoints have changed.<br>🔗 [`problem: stale proxy port`](src/fixes/stale-mcp-endpoints/index.e2e.test.ts#L20) | Uses `McpProxyPool` to dynamically intercept, remap, and heal MCP tool URLs across process restarts.<br>🔗 [`solution: proxy URL remapping`](src/fixes/stale-mcp-endpoints/index.e2e.test.ts#L20) |
151
+ | [**Orphaned SQLite Checkpoints**](src/fixes/orphaned-checkpoints/index.ts) | **Problem**: Canceling a turn leaves in-progress checkpoints uncommitted in SQLite, causing fatal panics (_"could not find doneCh for checkpoint"_) on future turns.<br>🔗 [`problem: orphaned checkpoint`](src/fixes/orphaned-checkpoints/index.e2e.test.ts#L11) | Scans the session SQLite database on startup and teardown, updating orphaned in-progress checkpoints to `ABORTED` (status 5).<br>🔗 [`solution: checkpoint repair`](src/fixes/orphaned-checkpoints/index.e2e.test.ts#L42) |
152
+ | [**Out-of-Bounds Generation Metadata**](src/fixes/orphaned-checkpoints/index.ts) | **Problem**: Canceling or truncating turns leaves orphaned metadata in SQLite referencing future step indices, causing Go executor panics (_"earliest step index is out of bounds"_).<br>🔗 [`problem: out-of-bounds metadata`](src/fixes/orphaned-checkpoints/index.e2e.test.ts#L224) | Automatically prunes orphaned executor and generation metadata referencing non-existent step indices on prompt and load.<br>🔗 [`solution: metadata pruning`](src/fixes/orphaned-checkpoints/index.e2e.test.ts#L268) |
153
+ | [**Unscoped Database Corruptions**](src/fixes/orphaned-checkpoints/index.ts) | **Problem**: Global database repair scans would mutate concurrent session databases across open tabs, corrupting active turns.<br>🔗 [`problem: concurrent tab safety`](src/fixes/orphaned-checkpoints/index.e2e.test.ts#L78) | Scopes checkpoint repair strictly to the target `sessionId.db`, isolating concurrent editor tabs.<br>🔗 [`solution: scoped session repair`](src/fixes/orphaned-checkpoints/index.e2e.test.ts#L117) |
154
+ | [**Database Concurrency Lockout**](src/fixes/orphaned-checkpoints/index.ts) | **Problem**: Raw `DatabaseSync` without busy timeout throws `SQLITE_BUSY: database is locked` when reading conversation steps during active writes.<br>🔗 [`problem: raw sqlite busy error`](src/fixes/orphaned-checkpoints/index.ts#L41) | Configures all database connections with `timeout: 2000` to wait out locks during concurrent reads and writes.<br>🔗 [`solution: sqlite timeout wait`](src/fixes/orphaned-checkpoints/index.ts#L41) |
155
+ | [**Dropped History Chunks on Load**](src/fixes/dropped-history-chunks/index.ts) | **Problem**: Raw `agy_acp_server` drops thought chains and agent message chunks during `session/load`, loading an incomplete history.<br>🔗 [`problem: dropped history chunks`](src/fixes/dropped-history-chunks/index.e2e.test.ts#L53) | Directly inspects protobuf steps in SQLite and reconstructs missing thought and message update events.<br>🔗 [`solution: sqlite history reconstruction`](src/fixes/dropped-history-chunks/index.e2e.test.ts#L99) |
156
+ | [**Noisy WebSocket stderr Logs**](src/fixes/noisy-stderr-logs/index.ts) | **Problem**: Upstream binary dumps unbuffered `RAW WS MSG:` debug payloads to stderr, flooding editor logs.<br>🔗 [`problem: stderr noise`](src/fixes/noisy-stderr-logs/index.e2e.test.ts#L16) | Filters noisy websocket trace logs from stderr by default, exposing them only when `REFINED_AGY_TRACE=1` is explicitly set.<br>🔗 [`solution: stderr filter`](src/fixes/noisy-stderr-logs/index.e2e.test.ts#L16) |
157
+ | ~~[**Flattened Model Variants & Efforts**](src/fixes/flattened-model-efforts/index.ts)~~<br>🎉 **Retired in ACP 1.4.0** | **Problem**: Upstream binary flattens all model and reasoning variants into a confusing 11-item flat dropdown list (`gemini-3.8-flash-high`, `gemini-pro-agent`, etc.) without dedicated reasoning controls.<br>🔗 [`verified: upstream fix`](src/fixes/flattened-model-efforts/index.e2e.test.ts#L14) | **Resolved Upstream by Google in ACP 1.4.0**.<br>Upstream binary now natively returns clean base models (`gemini-4-argon`, `gemini-3.8-flash`) and a dedicated `thinking_level` option (`low`, `medium`, `high`). Patch retired.<br>🔗 [`solution: native models and thinking_level passthrough`](src/fixes/flattened-model-efforts/index.e2e.test.ts#L33) |
158
+ | [**Client-Gated Third-Party Models**](src/fixes/gated-third-party-models/index.ts) | **Problem**: Upstream binary offers non-Gemini models (Claude, GPT-OSS) only when `initialize` `clientInfo.name` identifies Zed, Xcode or JetBrains; other clients see Gemini only, and selecting a Claude model fails with `-32602 Model ... is not available for the current authentication method`.<br>🔗 [`problem: gemini-only model list`](src/fixes/gated-third-party-models/index.e2e.test.ts#L24) | Opt-in: when `REFINED_AGY_CLIENT_NAME` is set (e.g. `zed`), rewrites `clientInfo.name` in `initialize`, including after process recycles. Unset, `initialize` passes through unchanged.<br>🔗 [`solution: client name override`](src/fixes/gated-third-party-models/index.e2e.test.ts#L37) |
159
+ | [**Non-Canonical Mode ID Rejection**](src/fixes/non-canonical-mode-ids/index.ts) | **Problem**: Upstream binary expects internal mode IDs (`auto_edit`, `yolo`, `default`) and rejects standard Paseo mode identifiers like `accept-edits`, `dangerously-skip-permissions`, and `plan`.<br>🔗 [`problem: mode rejection`](src/fixes/non-canonical-mode-ids/index.e2e.test.ts#L14) | Translates client mode aliases to canonical internal IDs across outbound requests, session reloads, and child restarts.<br>🔗 [`solution: mode normalization`](src/fixes/non-canonical-mode-ids/index.e2e.test.ts#L32) |
160
+ | [**Silent Background Task Execution**](src/fixes/silent-background-tasks/index.ts) | **Problem**: Subagents and background tasks execute silently; upstream binary produces no stdout chunks during `STATE_WAITING_FOR_TASKS`, leaving editor UIs frozen.<br>🔗 [`problem: silent background tasks`](src/fixes/silent-background-tasks/index.e2e.test.ts#L6) | Synthesizes standard ACP `session/update` plan notifications (`sessionUpdate: "plan"`) tracking active subagent roles and background tasks with live progress and completion.<br>🔗 [`solution: plan synthesis`](src/fixes/silent-background-tasks/index.e2e.test.ts#L12) |
161
+ | ~~[**Missing Usage & Token Metrics**](src/fixes/missing-usage-metrics/index.ts)~~<br>🎉 **Retired in ACP 1.3.0** | **Problem**: Upstream binary never emitted ACP `usage_update` notifications, leaving editor context window meters blank.<br>🔗 [`verified: upstream fix`](src/fixes/missing-usage-metrics/index.e2e.test.ts#L15) | **Resolved Upstream by Google in ACP 1.3.0**.<br>Upstream binary now natively emits standard ACP `sessionUpdate: "usage_update"` with `used` and `size` context tokens. Patch retired.<br>🔗 [`solution: native usage passthrough`](src/fixes/missing-usage-metrics/index.e2e.test.ts#L36) |
162
+ | [**Dangling Running Tool Calls**](src/fixes/dangling-tool-calls/index.ts) | **Problem**: When commands are backgrounded, upstream never emits terminal `tool_call_update` with `status: "completed"`, leaving editor UIs with an infinite active running animation.<br>🔗 [`problem: dangling running tool call`](src/fixes/dangling-tool-calls/index.test.ts#L67) | Tracks active tool calls and marks backgrounded tools completed immediately, before assistant text streams, and upon turn completion.<br>🔗 [`solution: tool call auto-completion`](src/fixes/dangling-tool-calls/index.test.ts#L79) |
163
+ | [**Interactive Question Deadlock**](src/fixes/missing-question-fallback/index.ts) | **Problem**: When `ask_question` is active, sending a chat prompt or cancel causes upstream to reject the message with _"A foreground turn is already active"_, deadlocking sessions indefinitely.<br>🔗 [`problem: question collision`](src/fixes/missing-question-fallback/index.e2e.test.ts#L16) | Intercepts user chat prompts and cancellations to auto-unblock pending question permission requests to the child process and complete UI tool states.<br>🔗 [`solution: question unblocking`](src/fixes/missing-question-fallback/index.e2e.test.ts#L53) |
164
+ | [**Premature Empty Turn Stop**](src/fixes/premature-turn-stop/index.ts) | **Problem**: Upstream binary prematurely concludes prompt turns with empty completions (`stopReason=16`) without emitting assistant message chunks, leaving editor UIs frozen in silence.<br>🔗 [`problem: premature turn termination`](src/fixes/premature-turn-stop/index.test.ts#L88) | Injects system prompt steering and intercepts empty prompt turn completions to autonomously dispatch self-healing continuation directives without proxy text synthesis.<br>🔗 [`solution: self-healing continuation`](src/fixes/premature-turn-stop/index.test.ts#L131) |
165
+ | [**Repetitive Tool Calling Loop**](src/fixes/repetitive-tool-loop/index.ts) | **Problem**: Upstream binary has no loop detector and will execute cyclic or identical tool calls indefinitely, burning thousands of tokens and freezing sessions.<br>🔗 [`problem: repetitive tool loop`](src/fixes/repetitive-tool-loop/index.e2e.test.ts#L25) | Tracks tool signatures and resource paths per turn using suffix cycle matching, sending `session/cancel` upstream, auto-completing tools, and steering the model to proceed e2e without polluting chat.<br>🔗 [`solution: loop circuit breaker`](src/fixes/repetitive-tool-loop/index.e2e.test.ts#L81) |
165
166
 
166
167
  ## Setup
167
168
 
@@ -320,13 +321,14 @@ For OAuth logins, the server runs a local browser login flow and saves credentia
320
321
 
321
322
  ## Configuration & Environment Variables
322
323
 
323
- | Variable | Default | Description |
324
- | :--------------------------------- | :----------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
325
- | `REFINED_AGY_OFFICIAL_ACP_VERSION` | `1.3.0` | Version of the official upstream Google Antigravity ACP binary (`agy_acp_server.par`) to download if not installed locally. (Falls back to `REFINED_AGY_VERSION` if set). |
326
- | `REFINED_AGY_ACP_BIN` | Auto-detected | Custom path to an `agy_acp_server.par` binary. |
327
- | `REFINED_AGY_RECYCLE_TIMEOUT_MS` | `10000` | Timeout (in ms) when respawning and resyncing a replacement process after an upstream Antigravity crash or deadlock (e.g. subagent channel panic). Caps how long internal initialization, session loading, and mode restoration requests can take before retrying. |
328
- | `REFINED_AGY_TRACE` | `0` | Set to `1` to trace inbound/outbound ACP JSON-RPC message ids to stderr and restore the full upstream debug log (normally filtered). |
329
- | `REFINED_AGY_DATA_DIR` | `~/.refined-antigravity` | Base directory for the MCP proxy's remembered-port configuration. |
324
+ | Variable | Default | Description |
325
+ | :--------------------------------- | :----------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
326
+ | `REFINED_AGY_OFFICIAL_ACP_VERSION` | `1.4.0` | Version of the official upstream Google Antigravity ACP binary (`agy_acp_server.par`) to download if not installed locally. (Falls back to `REFINED_AGY_VERSION` if set). |
327
+ | `REFINED_AGY_ACP_BIN` | Auto-detected | Custom path to an `agy_acp_server.par` binary. |
328
+ | `REFINED_AGY_RECYCLE_TIMEOUT_MS` | `10000` | Timeout (in ms) when respawning and resyncing a replacement process after an upstream Antigravity crash or deadlock (e.g. subagent channel panic). Caps how long internal initialization, session loading, and mode restoration requests can take before retrying. |
329
+ | `REFINED_AGY_CLIENT_NAME` | unset | Opt-in. Replaces the `clientInfo.name` this wrapper forwards in ACP `initialize`. Google's binary offers non-Gemini models (Claude, GPT-OSS) only to clients named Zed, Xcode or JetBrains, so `zed` unlocks them for other clients. This works around a deliberate upstream client check: it may stop working in a later release, and you should check that it fits the terms that apply to your account. |
330
+ | `REFINED_AGY_TRACE` | `0` | Set to `1` to trace inbound/outbound ACP JSON-RPC message ids to stderr and restore the full upstream debug log (normally filtered). |
331
+ | `REFINED_AGY_DATA_DIR` | `~/.refined-antigravity` | Base directory for the MCP proxy's remembered-port configuration. |
330
332
 
331
333
  ---
332
334