@simonepri/refined-antigravity-acp 0.1.2 → 1.0.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 (165) hide show
  1. package/dist/bin/cli.js +2 -51
  2. package/dist/bin/cli.js.map +1 -1
  3. package/dist/src/cli.d.ts +2 -0
  4. package/dist/src/cli.d.ts.map +1 -0
  5. package/dist/src/cli.js +44 -0
  6. package/dist/src/cli.js.map +1 -0
  7. package/dist/src/{command.d.ts → core/command.d.ts} +4 -0
  8. package/dist/src/core/command.d.ts.map +1 -0
  9. package/dist/src/{command.js → core/command.js} +27 -11
  10. package/dist/src/core/command.js.map +1 -0
  11. package/dist/src/core/pipeline.d.ts +20 -0
  12. package/dist/src/core/pipeline.d.ts.map +1 -0
  13. package/dist/src/core/pipeline.js +94 -0
  14. package/dist/src/core/pipeline.js.map +1 -0
  15. package/dist/src/core/session-cache.d.ts +12 -0
  16. package/dist/src/core/session-cache.d.ts.map +1 -0
  17. package/dist/src/core/session-cache.js +85 -0
  18. package/dist/src/core/session-cache.js.map +1 -0
  19. package/dist/src/core/supervisor.d.ts +90 -0
  20. package/dist/src/core/supervisor.d.ts.map +1 -0
  21. package/dist/src/core/supervisor.js +582 -0
  22. package/dist/src/core/supervisor.js.map +1 -0
  23. package/dist/src/core/telemetry.d.ts +23 -0
  24. package/dist/src/core/telemetry.d.ts.map +1 -0
  25. package/dist/src/core/telemetry.js +75 -0
  26. package/dist/src/core/telemetry.js.map +1 -0
  27. package/dist/src/core/transport.d.ts +7 -0
  28. package/dist/src/core/transport.d.ts.map +1 -0
  29. package/dist/src/core/transport.js +37 -0
  30. package/dist/src/core/transport.js.map +1 -0
  31. package/dist/src/core/types.d.ts +293 -0
  32. package/dist/src/core/types.d.ts.map +1 -0
  33. package/dist/src/core/types.js +78 -0
  34. package/dist/src/core/types.js.map +1 -0
  35. package/dist/src/fixes/active-turn-collision/index.d.ts +27 -0
  36. package/dist/src/fixes/active-turn-collision/index.d.ts.map +1 -0
  37. package/dist/src/fixes/active-turn-collision/index.js +117 -0
  38. package/dist/src/fixes/active-turn-collision/index.js.map +1 -0
  39. package/dist/src/fixes/cancellation-leak/index.d.ts +17 -0
  40. package/dist/src/fixes/cancellation-leak/index.d.ts.map +1 -0
  41. package/dist/src/fixes/cancellation-leak/index.js +57 -0
  42. package/dist/src/fixes/cancellation-leak/index.js.map +1 -0
  43. package/dist/src/fixes/dangling-tool-calls/index.d.ts +32 -0
  44. package/dist/src/fixes/dangling-tool-calls/index.d.ts.map +1 -0
  45. package/dist/src/fixes/dangling-tool-calls/index.js +188 -0
  46. package/dist/src/fixes/dangling-tool-calls/index.js.map +1 -0
  47. package/dist/src/fixes/dropped-history-chunks/index.d.ts +47 -0
  48. package/dist/src/fixes/dropped-history-chunks/index.d.ts.map +1 -0
  49. package/dist/src/fixes/dropped-history-chunks/index.js +202 -0
  50. package/dist/src/fixes/dropped-history-chunks/index.js.map +1 -0
  51. package/dist/src/fixes/flattened-model-efforts/index.d.ts +39 -0
  52. package/dist/src/fixes/flattened-model-efforts/index.d.ts.map +1 -0
  53. package/dist/src/fixes/flattened-model-efforts/index.js +306 -0
  54. package/dist/src/fixes/flattened-model-efforts/index.js.map +1 -0
  55. package/dist/src/fixes/index.d.ts +25 -0
  56. package/dist/src/fixes/index.d.ts.map +1 -0
  57. package/dist/src/fixes/index.js +61 -0
  58. package/dist/src/fixes/index.js.map +1 -0
  59. package/dist/src/fixes/malformed-stream-syntax/index.d.ts +44 -0
  60. package/dist/src/fixes/malformed-stream-syntax/index.d.ts.map +1 -0
  61. package/dist/src/fixes/malformed-stream-syntax/index.js +346 -0
  62. package/dist/src/fixes/malformed-stream-syntax/index.js.map +1 -0
  63. package/dist/src/fixes/missing-localharness/index.d.ts +20 -0
  64. package/dist/src/fixes/missing-localharness/index.d.ts.map +1 -0
  65. package/dist/src/fixes/missing-localharness/index.js +103 -0
  66. package/dist/src/fixes/missing-localharness/index.js.map +1 -0
  67. package/dist/src/fixes/missing-question-fallback/index.d.ts +30 -0
  68. package/dist/src/fixes/missing-question-fallback/index.d.ts.map +1 -0
  69. package/dist/src/fixes/missing-question-fallback/index.js +119 -0
  70. package/dist/src/fixes/missing-question-fallback/index.js.map +1 -0
  71. package/dist/src/fixes/missing-slash-skills/index.d.ts +17 -0
  72. package/dist/src/fixes/missing-slash-skills/index.d.ts.map +1 -0
  73. package/dist/src/fixes/missing-slash-skills/index.js +107 -0
  74. package/dist/src/fixes/missing-slash-skills/index.js.map +1 -0
  75. package/dist/src/{skills.d.ts → fixes/missing-slash-skills/skills.d.ts} +2 -1
  76. package/dist/src/fixes/missing-slash-skills/skills.d.ts.map +1 -0
  77. package/dist/src/fixes/missing-slash-skills/skills.js +199 -0
  78. package/dist/src/fixes/missing-slash-skills/skills.js.map +1 -0
  79. package/dist/src/fixes/missing-system-prompt/index.d.ts +19 -0
  80. package/dist/src/fixes/missing-system-prompt/index.d.ts.map +1 -0
  81. package/dist/src/fixes/missing-system-prompt/index.js +118 -0
  82. package/dist/src/fixes/missing-system-prompt/index.js.map +1 -0
  83. package/dist/src/fixes/missing-usage-metrics/index.d.ts +26 -0
  84. package/dist/src/fixes/missing-usage-metrics/index.d.ts.map +1 -0
  85. package/dist/src/fixes/missing-usage-metrics/index.js +132 -0
  86. package/dist/src/fixes/missing-usage-metrics/index.js.map +1 -0
  87. package/dist/src/fixes/noisy-stderr-logs/index.d.ts +15 -0
  88. package/dist/src/fixes/noisy-stderr-logs/index.d.ts.map +1 -0
  89. package/dist/src/fixes/noisy-stderr-logs/index.js +23 -0
  90. package/dist/src/fixes/noisy-stderr-logs/index.js.map +1 -0
  91. package/dist/src/fixes/non-canonical-mode-ids/index.d.ts +26 -0
  92. package/dist/src/fixes/non-canonical-mode-ids/index.d.ts.map +1 -0
  93. package/dist/src/fixes/non-canonical-mode-ids/index.js +47 -0
  94. package/dist/src/fixes/non-canonical-mode-ids/index.js.map +1 -0
  95. package/dist/src/fixes/orphaned-checkpoints/index.d.ts +31 -0
  96. package/dist/src/fixes/orphaned-checkpoints/index.d.ts.map +1 -0
  97. package/dist/src/fixes/orphaned-checkpoints/index.js +82 -0
  98. package/dist/src/fixes/orphaned-checkpoints/index.js.map +1 -0
  99. package/dist/src/fixes/silent-background-tasks/index.d.ts +66 -0
  100. package/dist/src/fixes/silent-background-tasks/index.d.ts.map +1 -0
  101. package/dist/src/fixes/silent-background-tasks/index.js +491 -0
  102. package/dist/src/fixes/silent-background-tasks/index.js.map +1 -0
  103. package/dist/src/{mcp-proxy.d.ts → fixes/stale-mcp-endpoints/index.d.ts} +31 -4
  104. package/dist/src/fixes/stale-mcp-endpoints/index.d.ts.map +1 -0
  105. package/dist/src/{mcp-proxy.js → fixes/stale-mcp-endpoints/index.js} +162 -14
  106. package/dist/src/fixes/stale-mcp-endpoints/index.js.map +1 -0
  107. package/dist/src/fixes/subagent-hang/index.d.ts +2 -0
  108. package/dist/src/fixes/subagent-hang/index.d.ts.map +1 -0
  109. package/dist/src/fixes/subagent-hang/index.js +2 -0
  110. package/dist/src/fixes/subagent-hang/index.js.map +1 -0
  111. package/dist/src/fixes/subagent-hang/subagent-hang.d.ts +43 -0
  112. package/dist/src/fixes/subagent-hang/subagent-hang.d.ts.map +1 -0
  113. package/dist/src/fixes/subagent-hang/subagent-hang.js +114 -0
  114. package/dist/src/fixes/subagent-hang/subagent-hang.js.map +1 -0
  115. package/dist/src/index.d.ts +27 -0
  116. package/dist/src/index.d.ts.map +1 -0
  117. package/dist/src/index.js +43 -0
  118. package/dist/src/index.js.map +1 -0
  119. package/dist/src/lib/protobuf.d.ts +9 -0
  120. package/dist/src/lib/protobuf.d.ts.map +1 -0
  121. package/dist/src/lib/protobuf.js +89 -0
  122. package/dist/src/lib/protobuf.js.map +1 -0
  123. package/package.json +22 -4
  124. package/readme.md +147 -141
  125. package/assets/icon.svg +0 -3
  126. package/dist/index.server.d.ts +0 -4
  127. package/dist/index.server.d.ts.map +0 -1
  128. package/dist/index.server.js +0 -7
  129. package/dist/index.server.js.map +0 -1
  130. package/dist/src/agy-patch.d.ts +0 -65
  131. package/dist/src/agy-patch.d.ts.map +0 -1
  132. package/dist/src/agy-patch.js +0 -351
  133. package/dist/src/agy-patch.js.map +0 -1
  134. package/dist/src/auth.d.ts +0 -27
  135. package/dist/src/auth.d.ts.map +0 -1
  136. package/dist/src/auth.js +0 -113
  137. package/dist/src/auth.js.map +0 -1
  138. package/dist/src/command.d.ts.map +0 -1
  139. package/dist/src/command.js.map +0 -1
  140. package/dist/src/connector.d.ts +0 -188
  141. package/dist/src/connector.d.ts.map +0 -1
  142. package/dist/src/connector.js +0 -1138
  143. package/dist/src/connector.js.map +0 -1
  144. package/dist/src/history.d.ts +0 -12
  145. package/dist/src/history.d.ts.map +0 -1
  146. package/dist/src/history.js +0 -152
  147. package/dist/src/history.js.map +0 -1
  148. package/dist/src/mcp-proxy.d.ts.map +0 -1
  149. package/dist/src/mcp-proxy.js.map +0 -1
  150. package/dist/src/provider.d.ts +0 -11
  151. package/dist/src/provider.d.ts.map +0 -1
  152. package/dist/src/provider.js +0 -31
  153. package/dist/src/provider.js.map +0 -1
  154. package/dist/src/sanitize.d.ts +0 -29
  155. package/dist/src/sanitize.d.ts.map +0 -1
  156. package/dist/src/sanitize.js +0 -237
  157. package/dist/src/sanitize.js.map +0 -1
  158. package/dist/src/skills.d.ts.map +0 -1
  159. package/dist/src/skills.js +0 -140
  160. package/dist/src/skills.js.map +0 -1
  161. package/dist/src/steering.d.ts +0 -30
  162. package/dist/src/steering.d.ts.map +0 -1
  163. package/dist/src/steering.js +0 -174
  164. package/dist/src/steering.js.map +0 -1
  165. package/paseo-plugin.json +0 -7
@@ -0,0 +1 @@
1
+ {"version":3,"file":"protobuf.js","sourceRoot":"","sources":["../../../src/lib/protobuf.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,UAAU,YAAY,CAAC,GAAW;IACtC,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,CAAC,GAAG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QACvD,MAAM,GAAG,UAAU,CAAC;QACpB,MAAM,QAAQ,GAAG,GAAG,GAAG,GAAG,CAAC;QAC3B,MAAM,QAAQ,GAAG,GAAG,IAAI,CAAC,CAAC;QAC1B,IAAI,QAAQ,KAAK,CAAC,EAAE,CAAC;YACnB,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,GAAG,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YACrD,MAAM,GAAG,QAAQ,CAAC;YAClB,IAAI,QAAQ,KAAK,WAAW;gBAAE,OAAO,GAAG,CAAC;QAC3C,CAAC;aAAM,IAAI,QAAQ,KAAK,CAAC,EAAE,CAAC;YAC1B,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,GAAG,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YACrD,MAAM,GAAG,QAAQ,GAAG,GAAG,CAAC;QAC1B,CAAC;aAAM,IAAI,QAAQ,KAAK,CAAC;YAAE,MAAM,IAAI,CAAC,CAAC;aAClC,IAAI,QAAQ,KAAK,CAAC;YAAE,MAAM,IAAI,CAAC,CAAC;;YAChC,MAAM;IACb,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simonepri/refined-antigravity-acp",
3
- "version": "0.1.2",
3
+ "version": "1.0.0",
4
4
  "description": "A hardened wrapper around Google's official Antigravity ACP binary.",
5
5
  "homepage": "https://github.com/simonepri/refined-antigravity-acp#readme",
6
6
  "bugs": {
@@ -17,12 +17,19 @@
17
17
  },
18
18
  "files": [
19
19
  "dist",
20
- "paseo-plugin.json",
21
20
  "readme.md",
22
21
  "license",
23
22
  "assets"
24
23
  ],
25
24
  "type": "module",
25
+ "main": "dist/src/index.js",
26
+ "types": "dist/src/index.d.ts",
27
+ "exports": {
28
+ ".": {
29
+ "types": "./dist/src/index.d.ts",
30
+ "import": "./dist/src/index.js"
31
+ }
32
+ },
26
33
  "publishConfig": {
27
34
  "access": "public"
28
35
  },
@@ -30,18 +37,29 @@
30
37
  "test": "vitest run",
31
38
  "typecheck": "tsc --noEmit",
32
39
  "lint": "oxlint",
40
+ "lint:json": "node bin/lint-json.mjs",
41
+ "lint:pub": "publint --strict",
42
+ "lint:md": "mmdlint readme.md",
43
+ "lint:actions": "actionlint",
44
+ "lint:yaml": "yamllint .github/workflows/",
33
45
  "format": "oxfmt",
34
46
  "format:check": "oxfmt --check",
35
47
  "dead-code": "fallow dead-code",
48
+ "check": "pnpm run format:check && pnpm run lint && pnpm run lint:json && pnpm run lint:pub && pnpm run lint:md && pnpm run lint:actions && pnpm run lint:yaml && pnpm run typecheck && pnpm run dead-code",
36
49
  "build": "tsc -p tsconfig.build.json",
37
- "prepack": "pnpm build"
50
+ "prepack": "pnpm build",
51
+ "test:e2e": "vitest run -c vitest.e2e.config.ts"
38
52
  },
39
53
  "devDependencies": {
40
- "@getpaseo/plugin": "^0.9.0",
54
+ "@agentclientprotocol/sdk": "^1.5.0",
55
+ "@sysid/mmdlint": "^0.1.1",
41
56
  "@types/node": "^24.3.0",
57
+ "ajv": "^8.20.0",
58
+ "ajv-formats": "^3.0.1",
42
59
  "fallow": "^3.28.0",
43
60
  "oxfmt": "^0.70.0",
44
61
  "oxlint": "^1.85.0",
62
+ "publint": "^0.3.24",
45
63
  "typescript": "^5.9.3",
46
64
  "vitest": "^5.0.1"
47
65
  },
package/readme.md CHANGED
@@ -17,9 +17,23 @@
17
17
  <a href="https://pnpm.io/">
18
18
  <img src="https://img.shields.io/badge/package_manager-pnpm-F69220?logo=pnpm&amp;logoColor=white" alt="pnpm">
19
19
  </a>
20
+ <br>
21
+ <!-- Quality & Tooling -->
22
+ <a href="https://oxc.rs/">
23
+ <img src="https://img.shields.io/badge/formatter-oxfmt-orange?logo=rust&amp;logoColor=white" alt="oxfmt">
24
+ </a>
20
25
  <a href="https://oxc.rs/">
21
26
  <img src="https://img.shields.io/badge/linter-oxlint-orange?logo=rust&amp;logoColor=white" alt="oxlint">
22
27
  </a>
28
+ <a href="https://publint.dev/">
29
+ <img src="https://img.shields.io/badge/packaging-publint-2A52BE?logo=npm&amp;logoColor=white" alt="publint">
30
+ </a>
31
+ <a href="https://github.com/trumppet/fallow">
32
+ <img src="https://img.shields.io/badge/dead_code-fallow-5C2D91?logoColor=white" alt="fallow">
33
+ </a>
34
+ <a href="https://github.com/rhysd/actionlint">
35
+ <img src="https://img.shields.io/badge/workflows-actionlint-2088FF?logo=githubactions&amp;logoColor=white" alt="actionlint">
36
+ </a>
23
37
  <br>
24
38
  <!-- Verification -->
25
39
  <a href="https://github.com/simonepri/refined-antigravity-acp/actions/workflows/ci.yml">
@@ -30,11 +44,14 @@
30
44
  </a>
31
45
  <br>
32
46
  <!-- Distribution -->
47
+ <a href="https://github.com/simonepri/refined-antigravity-acp/stargazers">
48
+ <img src="https://img.shields.io/github/stars/simonepri/refined-antigravity-acp?style=flat&amp;logo=github&amp;logoColor=white" alt="GitHub stars">
49
+ </a>
33
50
  <a href="https://github.com/googleapis/release-please">
34
51
  <img src="https://img.shields.io/badge/released_with-Release_Please-4285F4?logo=google&amp;logoColor=white" alt="Released with Release Please">
35
52
  </a>
36
53
  <a href="https://github.com/getpaseo/paseo">
37
- <img src="https://img.shields.io/badge/ecosystem-Paseo_Plugin-20744A?logo=buffer&amp;logoColor=white" alt="Paseo Plugin">
54
+ <img src="https://img.shields.io/badge/ecosystem-Paseo_ACP_Provider-20744A?logo=buffer&amp;logoColor=white" alt="Paseo ACP Provider">
38
55
  </a>
39
56
  <a href="license">
40
57
  <img src="https://img.shields.io/github/license/simonepri/refined-antigravity-acp" alt="MIT license">
@@ -47,108 +64,123 @@
47
64
 
48
65
  ---
49
66
 
50
- ## What is Refined Antigravity ACP?
67
+ ## Overview
51
68
 
52
- **Refined Antigravity ACP** is an **proxy wrapper** around Google's official Antigravity ACP binary ([`agy_acp_server.par`](https://dl.google.com/agy-extensions/releases/)).
69
+ **Refined Antigravity ACP** is a proxy wrapper around Google's official Antigravity ACP binary ([`agy_acp_server.par`](https://dl.google.com/agy-extensions/releases/)).
53
70
 
54
- Google's binary powers the core model execution, agent loop, and tool calling. This project intercepts the ACP stream between your editor and the server to transparently fix upstream bugs (such as turn completion and subagent hangs), absorb malformed MCP traffic, and provide first-class integration for **Paseo**, **Zed**, and any standard ACP client.
71
+ Google's binary executes models, agent loops, and tool calls. This proxy intercepts the ACP stream between editor and server to fix upstream crashes and deadlocks, normalize MCP traffic, and integrate with **Paseo**, **Zed**, and other ACP clients.
55
72
 
56
73
  ```mermaid
57
74
  flowchart LR
58
75
  subgraph Editors["Supported ACP Clients"]
59
- PaseoUI["Paseo<br>(Native Plugin)"]
76
+ PaseoUI["Paseo<br>(ACP Agent Provider)"]
60
77
  ZedUI["Zed Editor<br>(Stdio Agent)"]
61
78
  OtherUI["Neovim / JetBrains / Custom<br>(Standard ACP)"]
62
79
  end
63
80
 
64
- subgraph Wrapper["Refined Antigravity ACP"]
65
- Connector["Stream Connector<br>(src/connector.ts)"]
66
- HangDetector["Hang & Turn-Complete Detector<br>(Grace Timers + Synthetic end_turn)"]
67
- McpProxy["Loopback MCP Proxy<br>(Header Normalization & 4xx Absorption)"]
68
- Steering["Mid-Flight Steering<br>(src/steering.ts)"]
69
- SkillsEngine["Slash Skills Autocomplete<br>(src/skills.ts)"]
70
- Sanitizer["Stream Sanitizer<br>(Markup & Internal Tag Stripping)"]
71
- AgyPatch["Binary Patch Engine<br>(Zero-Offset Byte Preservation)"]
72
-
73
- Connector --- HangDetector
74
- Connector --- McpProxy
75
- Connector --- Steering
76
- Connector --- SkillsEngine
77
- Connector --- Sanitizer
78
- Connector --- AgyPatch
81
+ subgraph Wrapper["Refined Antigravity ACP (Proxy & Hardening Layer)"]
82
+ direction TB
83
+
84
+ Supervisor["Process Supervisor<br>• Subprocess Lifecycle & Health<br>• Transparent Crash Recovery<br>• Multi-Session State Cache"]
85
+
86
+ subgraph Pipeline["Bidirectional ACP Pipeline"]
87
+ direction TB
88
+ Outbound["Outbound Stream<br>• Request & Option Normalization<br>• Workspace Context Injection<br>• MCP Port & URL Rewriting"]
89
+ Inbound["Inbound Stream<br>• Output & Stream Sanitization<br>• Progress & Plan Synthesis<br>• Interruption Leak Cleanup"]
90
+ Telemetry["Telemetry & Diagnostics<br>• Real-time Stderr Event Tracking<br>• SQLite Checkpoint & History Repair<br>• Token Usage Extraction"]
91
+ end
92
+
93
+ McpProxy["Loopback MCP Proxy Pool<br>• Dynamic Endpoint Remapping<br>• Protocol Version Adaptation"]
94
+
95
+ Supervisor <--> Pipeline
96
+ Supervisor <--> McpProxy
79
97
  end
80
98
 
81
99
  subgraph Upstream["Google Official Backend"]
82
100
  Kernel["agy_acp_server.par<br>(Google Subprocess)"]
101
+ LocalDb[(Local SQLite Store<br>Conversations & Steps)]
83
102
  GeminiCloud["Google DeepMind / Gemini Cloud"]
84
- Kernel <-->|"gRPC / HTTPS"| GeminiCloud
85
- end
86
-
87
- PaseoUI <-->|"In-Process Provider Plugin"| Wrapper
88
- ZedUI <-->|"Stdio NDJSON (CLI)"| Wrapper
89
- OtherUI <-->|"Stdio NDJSON (CLI)"| Wrapper
90
- Wrapper <-->|"Standard ACP (NDJSON)"| Kernel
91
103
 
92
- classDef editor fill:#20744A,stroke:#10B981,color:#fff,stroke-width:2px;
93
- classDef wrapper fill:#0F172A,stroke:#3B82F6,color:#fff,stroke-width:2px;
94
- classDef google fill:#1E293B,stroke:#64748B,color:#fff,stroke-width:2px;
104
+ Kernel <-->|gRPC / HTTPS| GeminiCloud
105
+ Kernel <-->|WAL Journal| LocalDb
106
+ end
95
107
 
96
- class PaseoUI,ZedUI,OtherUI editor;
97
- class Connector,HangDetector,McpProxy,Steering,SkillsEngine,Sanitizer,AgyPatch wrapper;
98
- class Kernel,GeminiCloud google;
108
+ Editors <-->|Stdio NDJSON CLI| Supervisor
109
+ Supervisor <-->|Standard ACP NDJSON| Kernel
110
+ Pipeline -.->|Direct Read / Heal| LocalDb
111
+ McpProxy <-->|HTTP Rewriting| Kernel
112
+
113
+ classDef editor fill:#20744A,stroke:#10B981,color:#fff,stroke-width:2px
114
+ classDef wrapper fill:#0F172A,stroke:#3B82F6,color:#fff,stroke-width:2px
115
+ classDef component fill:#1E293B,stroke:#60A5FA,color:#fff,stroke-width:1px
116
+ classDef google fill:#18181B,stroke:#71717A,color:#fff,stroke-width:2px
117
+ classDef db fill:#312E81,stroke:#818CF8,color:#fff,stroke-width:2px
118
+
119
+ class PaseoUI,ZedUI,OtherUI editor
120
+ class Supervisor,Pipeline,McpProxy,Outbound,Inbound,Telemetry component
121
+ class Kernel,GeminiCloud google
122
+ class LocalDb db
99
123
  ```
100
124
 
101
- ---
102
-
103
- ## What Does This ACP Give You?
104
-
105
- ### Upstream Bugfixes & Hardening
106
-
107
- | Area | Upstream Issue | Mitigation in Refined ACP |
108
- | :----------------------------------------- | :--------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------- |
109
- | 🛡️ **Subagent & Task Hangs** | Upstream binary permanently wedges in `STATE_WAITING_FOR_TASKS` when launching subagents or background tasks. | 3-layer defense: automated non-destructive binary patch, stderr telemetry hang detection, and transparent process recycling. |
110
- | ⏳ **Turn Completion & Infinite Spinners** | Upstream omits the final JSON-RPC prompt response after completing user turns, leaving editors spinning forever. | Stream-detects `TARGET_USER` `STATE_DONE` telemetry, runs a 5s grace timer, and fires synthetic `end_turn` completions. |
111
- | 🔌 **MCP Header & 4xx Fatal Crashes** | Upstream Go SDK harnesses crash fatally on notification 4xx HTTP responses or missing `Accept` headers. | In-process loopback MCP proxy normalizes headers and absorbs notification 4xx errors with HTTP `202 Accepted`. |
112
- | 🧼 **Internal Markup Leaks** | Raw harness internal markers (`<system_message>`, `<context>`, `<messaging>`) leak into user output. | Live stream sanitizer strips internal tags and converts raw HTML elements into clean Markdown. |
113
-
114
- ### Enhanced Capabilities
125
+ The matrix below documents upstream defects across process startup, turn execution, cancellation, and session replay. Each entry links directly to tests demonstrating the defect (**Problem**) and the fix (**Solution**).
115
126
 
116
- | Feature | Description |
117
- | :---------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------- |
118
- | 🎯 **Mid-Turn Steering (`prompt.steer`)** | Steer running agent turns in flight without interrupting execution or losing context. Cleanly strips steering markers from saved history. |
119
- | 🔄 **Session History Recovery** | Automatically discovers and restores previous conversation history directly from the local Antigravity SQLite database on session reload. |
120
- | ⚡ **Workspace Slash Skills Discovery** | Discovers skill definitions in `.gemini/skills`, `.agents/skills`, `.codex/skills`, and global paths, exposing them as autocomplete commands. |
121
- | 🧠 **Workspace Context Injection** | Seamlessly injects project profile instructions and system prompts during session initialization without duplicate re-injections across turns. |
122
- | 🔐 **Zero-Touch Authentication** | Reuses existing Google CLI credentials from macOS Keychain or `acp_token.json` without requiring browser re-login. |
123
-
124
- ---
125
-
126
- ## Editor Support & Setup
127
-
128
- ### 1. Paseo (Native Provider Plugin)
129
-
130
- Refined Antigravity ACP runs natively as an in-process Paseo provider plugin.
131
-
132
- #### Installation
133
-
134
- **Option A: Native Plugin via Paseo CLI (Recommended)**
127
+ > [!TIP]
128
+ >
129
+ > ### ⭐️ Help Retire These Patches
130
+ >
131
+ > Refined Antigravity ACP is a transitional hardening layer. When Google resolves a defect in an official release, the corresponding problem test verifies the fix and the wrapper retires the patch.
132
+ >
133
+ > To help prioritize upstream fixes:
134
+ >
135
+ > - **Star the repository**: Community visibility signals to the Google Antigravity team which upstream defects impact real users.
136
+ > - **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.
137
+
138
+ | Defect | Upstream Problem | Solution |
139
+ | :----------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
140
+ | [**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) |
141
+ | [**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) |
142
+ | [**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) |
143
+ | [**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) |
144
+ | [**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) |
145
+ | [**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) |
146
+ | [**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) |
147
+ | [**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) |
148
+ | [**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) |
149
+ | [**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) |
150
+ | [**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) |
151
+ | [**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) |
152
+ | [**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) |
153
+ | [**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) |
154
+ | [**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) |
155
+ | [**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) |
156
+ | [**Missing Usage & Token Metrics**](src/fixes/missing-usage-metrics/index.ts) | **Problem**: Upstream binary never emits ACP `usage_update` notifications, leaving editor context window meters blank.<br>🔗 [`problem: missing usage metrics`](src/fixes/missing-usage-metrics/index.e2e.test.ts#L14) | Intercepts SQLite step metadata to extract token counts and emits standard ACP `sessionUpdate: "usage_update"` with `usedTokens` and `maxTokens`.<br>🔗 [`solution: token usage synthesis`](src/fixes/missing-usage-metrics/index.e2e.test.ts#L35) |
157
+ | [**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) |
158
+ | [**Forbidden Question Other Option**](src/fixes/missing-question-fallback/index.ts) | **Problem**: Upstream instructs the model not to provide an 'Other' option (`"Do NOT add an 'Other' option to questions"`), stranding users in multiple-choice prompts when none of the choices apply.<br>🔗 [`problem: missing other option`](src/fixes/missing-question-fallback/index.test.ts#L14) | Steers the model to always include an 'Other' choice and appends a fallback 'Other' option to inbound `ask_question` tool calls.<br>🔗 [`solution: option fallback`](src/fixes/missing-question-fallback/index.test.ts#L14) |
159
+
160
+ ## Setup
161
+
162
+ Install globally:
135
163
 
136
164
  ```bash
137
- paseo plugin add @simonepri/refined-antigravity-acp
165
+ npm install -g @simonepri/refined-antigravity-acp
166
+ which refined-antigravity-acp
138
167
  ```
139
168
 
140
- **Option B: Manual Provider Configuration (`~/.paseo/config.json`)**
169
+ > [!TIP]
170
+ > The wrapper downloads [`agy_acp_server.par`](https://dl.google.com/agy-extensions/releases/) if not already installed locally.
171
+
172
+ ### 1. Paseo (ACP Agent Provider)
141
173
 
142
- You can also register it directly as an ACP agent provider in your `~/.paseo/config.json` under `agents.providers`:
174
+ Register the wrapper in `~/.paseo/config.json` under `agents.providers`:
143
175
 
144
176
  ```json
145
177
  {
146
178
  "agents": {
147
179
  "providers": {
148
- "antigravity": {
180
+ "refined-antigravity-acp": {
149
181
  "extends": "acp",
150
182
  "label": "Antigravity",
151
- "command": ["npx", "-y", "@simonepri/refined-antigravity-acp"],
183
+ "command": ["/usr/local/bin/refined-antigravity-acp"],
152
184
  "enabled": true
153
185
  }
154
186
  }
@@ -156,39 +188,13 @@ You can also register it directly as an ACP agent provider in your `~/.paseo/con
156
188
  }
157
189
  ```
158
190
 
159
- _(Alternatively, install globally via `npm install -g @simonepri/refined-antigravity-acp` or `pnpm add -g @simonepri/refined-antigravity-acp` and configure `["refined-antigravity-acp"]` or the absolute path from `which refined-antigravity-acp`)._
191
+ Zero-install alternative: `"command": ["pnpm", "dlx", "@simonepri/refined-antigravity-acp"]`.
160
192
 
161
193
  ---
162
194
 
163
195
  ### 2. Zed Editor (ACP Agent)
164
196
 
165
- Zed supports external agents via the Agent Client Protocol over stdio.
166
-
167
- #### Configuration
168
-
169
- Add `refined-antigravity-acp` to your Zed `settings.json` (accessible via `Cmd+,` or `~/.config/zed/settings.json`) under `agent.profiles`.
170
-
171
- You can configure it using `npx` (zero-install) or by pointing directly to your local binary path:
172
-
173
- **Via npx (Zero-install):**
174
-
175
- ```json
176
- {
177
- "agent": {
178
- "profiles": {
179
- "antigravity": {
180
- "type": "acp",
181
- "command": "npx",
182
- "args": ["-y", "@simonepri/refined-antigravity-acp"]
183
- }
184
- }
185
- }
186
- }
187
- ```
188
-
189
- **Via Local / Global Binary Path:**
190
-
191
- If you installed the package globally (`npm install -g @simonepri/refined-antigravity-acp`) or cloned it locally, find the binary path via `which refined-antigravity-acp` and provide the absolute path to `command`:
197
+ Add `refined-antigravity-acp` to your Zed `settings.json` under `agent.profiles`:
192
198
 
193
199
  ```json
194
200
  {
@@ -204,65 +210,51 @@ If you installed the package globally (`npm install -g @simonepri/refined-antigr
204
210
  }
205
211
  ```
206
212
 
207
- ---
208
-
209
- ### 3. Standalone CLI / Other ACP Editors (Neovim, JetBrains)
213
+ Zero-install alternative: `"command": "pnpm", "args": ["dlx", "@simonepri/refined-antigravity-acp"]`.
210
214
 
211
- Any editor or tool speaking standard ACP over stdio can launch Refined Antigravity ACP directly:
215
+ ---
212
216
 
213
- ```bash
214
- npx @simonepri/refined-antigravity-acp
215
- ```
217
+ ### 3. Standalone CLI and Other ACP Editors
216
218
 
217
- Or install globally:
219
+ Run directly from any terminal or editor speaking standard ACP over stdio:
218
220
 
219
221
  ```bash
220
- npm install -g @simonepri/refined-antigravity-acp
221
222
  refined-antigravity-acp
222
223
  ```
223
224
 
224
- > [!TIP]
225
- > The wrapper automatically resolves or downloads the official Google [`agy_acp_server.par`](https://dl.google.com/agy-extensions/releases/) binary if it is not already present on your machine.
225
+ Zero-install alternative: `pnpm dlx @simonepri/refined-antigravity-acp`.
226
226
 
227
227
  ---
228
228
 
229
229
  ## Authentication
230
230
 
231
- If you already use Google Antigravity on your machine, you are already authenticated! The wrapper reads your existing credentials from macOS Keychain or `~/.gemini/antigravity-acp/acp_token.json`.
231
+ Google's ACP server handles authentication directly. On initialization, the server advertises standard ACP `authMethods` (Google OAuth, Gemini Enterprise, Gemini API keys, or Agent Platform).
232
232
 
233
- If starting fresh on a new machine, authenticate once via the Google CLI:
234
-
235
- ```bash
236
- agy
237
- ```
233
+ For OAuth logins, the server runs a local browser login flow and saves credentials to the operating system keychain. The CLI requires no manual authentication step.
238
234
 
239
235
  ---
240
236
 
241
- ## Behavioral Notes
237
+ ## Configuration & Environment Variables
242
238
 
243
- > [!NOTE]
244
- > **Tool execution priority**: Google Antigravity models prioritize immediate tool execution over conversational chat. When starting a prompt or responding after an interruption, the agent will typically call required tools immediately rather than outputting a preliminary text acknowledgment.
245
- >
246
- > If you prefer the agent to verbally state its intentions before calling tools, you can configure your Paseo agent or profile system prompt (e.g., in `.paseo/profile.json` or agent instructions) to include:
247
- >
248
- > ```text
249
- > Before calling any tools, always output a concise 1-2 sentence acknowledgment outlining what you are about to do.
250
- > ```
239
+ | Variable | Default | Description |
240
+ | :--------------------------------- | :----------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
241
+ | `REFINED_AGY_OFFICIAL_ACP_VERSION` | `1.2.1` | 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). |
242
+ | `REFINED_AGY_ACP_BIN` | Auto-detected | Custom path to an `agy_acp_server.par` binary. |
243
+ | `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. |
244
+ | `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). |
245
+ | `REFINED_AGY_DATA_DIR` | `~/.refined-antigravity` | Base directory for the MCP proxy's remembered-port configuration. |
251
246
 
252
247
  ---
253
248
 
254
- ## Configuration & Environment Variables
249
+ ## Protocol Coverage
250
+
251
+ Refined Antigravity ACP implements the **[Agent Client Protocol (ACP)](https://agentclientprotocol.com)** specification across two layers:
255
252
 
256
- | Variable | Default | Description |
257
- | :----------------------------- | :------------ | :----------------------------------------------------------------------------------------- |
258
- | `PASEO_AGY_ACP_BIN` | Auto-detected | Custom path to an `agy_acp_server.par` binary. |
259
- | `PASEO_AGY_NO_PATCH` | `0` | Set to `1` to disable binary auto-patching and force the unmodified binary. |
260
- | `PASEO_AGY_HANG_GRACE_MS` | `5000` | Grace period in milliseconds after `STATE_WAITING_FOR_TASKS` before declaring a turn hung. |
261
- | `PASEO_AGY_HANG_INACTIVITY_MS` | `30000` | Inactivity backstop timer (30 seconds) before declaring a turn hung. |
262
- | `PASEO_AGY_RECYCLE_TIMEOUT_MS` | `30000` | Maximum time allowed to spawn and initialize a recycled replacement process. |
263
- | `PASEO_AGY_TRACE` | `0` | Set to `1` to trace all inbound and outbound ACP JSON-RPC messages to stderr. |
264
- | `PASEO_AGY_MCP_PROXY_PORT` | `0` | Fixed port for the loopback MCP proxy (defaults to an ephemeral open port). |
265
- | `ANTIGRAVITY_HARNESS_PATH` | Auto-detected | Explicit path to the Antigravity Python harness. |
253
+ - **Direct Passthrough**: Requests and notifications requiring no modification pass through unchanged: client filesystem operations (`fs/*`), terminals (`terminal/*`), authentication (`authenticate`, `logout`), permission requests (`session/request_permission`), and MCP bridge channels.
254
+ - **Hardening and Telemetry**: The wrapper intercepts session methods to prevent deadlocks, repair database state, and synthesize missing ACP notifications (`usage_update` token metrics and `plan` subagent tracking).
255
+
256
+ > [!NOTE]
257
+ > All synthesized and modified messages are verified against the canonical ACP JSON Schema (Draft 2020-12) and type-checked against `@agentclientprotocol/sdk` in [`src/core/acp-conformance.test.ts`](src/core/acp-conformance.test.ts).
266
258
 
267
259
  ---
268
260
 
@@ -270,15 +262,29 @@ agy
270
262
 
271
263
  ```bash
272
264
  pnpm install
273
- pnpm run format:check
274
- pnpm run lint
275
- pnpm run dead-code
276
- pnpm run typecheck
277
- pnpm run test
265
+ pnpm run check # runs format:check, lint, typecheck, and dead-code
266
+ pnpm run test # fast, hermetic unit tests (no auth required)
267
+ pnpm run test:e2e # end-to-end integration tests (requires local agy login)
278
268
  ```
279
269
 
280
270
  ---
281
271
 
272
+ ## Contributing
273
+
274
+ Every fix pull request must follow this structure:
275
+
276
+ 1. **Directory**: Place the fix in `src/fixes/<bug-name>/`, named after the bug (for example, `dangling-tool-calls`). Do not prefix with issue numbers.
277
+ 2. **Header**: Add a JSDoc block with `Problem:` and `Solution:` sections at the top of `src/fixes/<bug-name>/index.ts`.
278
+ 3. **Tests**: Include both an upstream reproduction (`problem: <description>`) and a fix verification (`solution: <description>`).
279
+ 4. **Exports**: Export the fix from [`src/fixes/index.ts`](src/fixes/index.ts) and register it in [`src/index.ts`](src/index.ts).
280
+ 5. **Documentation**: Add a row to the table in [`readme.md`](readme.md) linking the fix and tests.
281
+ 6. **Verification**: Run quality checks before submitting:
282
+ ```bash
283
+ pnpm run check && pnpm run build && pnpm test
284
+ ```
285
+
286
+ ---
287
+
282
288
  ## Disclaimer
283
289
 
284
290
  This is an independent open-source project and is not affiliated with, authorized, or endorsed by Google LLC. "Antigravity", "Gemini", and Google are trademarks of Google LLC.
package/assets/icon.svg DELETED
@@ -1,3 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
2
- <path d="M2.1 19.4C6.3 15.3 5.4 2 12 2s5.7 13.3 9.9 17.4c1.5 1.5-.3 2.2-1.5 1.3C16 17.6 16.3 12.8 12 12.8s-4 4.8-8.4 7.9c-1.2.9-3 .2-1.5-1.3Z"/>
3
- </svg>
@@ -1,4 +0,0 @@
1
- import type { PluginServerContext } from "@getpaseo/plugin/server";
2
- export { createAntigravityProvider } from "./src/provider.js";
3
- export default function contribute(server: PluginServerContext): () => void;
4
- //# sourceMappingURL=index.server.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.server.d.ts","sourceRoot":"","sources":["../index.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAGnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,MAAM,EAAE,mBAAmB,cAG7D"}
@@ -1,7 +0,0 @@
1
- import { createAntigravityProvider } from "./src/provider.js";
2
- export { createAntigravityProvider } from "./src/provider.js";
3
- export default function contribute(server) {
4
- server.registerProvider(createAntigravityProvider());
5
- return () => { };
6
- }
7
- //# sourceMappingURL=index.server.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.server.js","sourceRoot":"","sources":["../index.server.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,MAA2B;IAC5D,MAAM,CAAC,gBAAgB,CAAC,yBAAyB,EAAE,CAAC,CAAC;IACrD,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;AAClB,CAAC"}
@@ -1,65 +0,0 @@
1
- export declare const EVENT_PROCESSOR_ENTRY = "google3/third_party/py/google/antigravity/connections/local/event_processor.py";
2
- export declare const PYCACHE_PREFIX = "google3/third_party/py/google/antigravity/connections/local/__pycache__/event_processor.";
3
- export declare const ZIP_EOCD_MAGIC = 101010256;
4
- export declare const ZIP_CD_MAGIC = 33639248;
5
- export declare const ZIP_LOCAL_MAGIC = 67324752;
6
- export declare const ORIGINAL_ANCHOR = " elif (\n tsu.state\n == localharness_pb2.TrajectoryStateUpdate.State.STATE_FULLY_IDLE\n ):";
7
- export declare const REPLACEMENT_CODE = " elif tsu.state in (\n localharness_pb2.TrajectoryStateUpdate.State.STATE_FULLY_IDLE,\n localharness_pb2.TrajectoryStateUpdate.State.STATE_WAITING_FOR_TASKS,\n ):";
8
- export declare const PROMPT_ANCHOR = "elif (\n tsu.state\n == localharness_pb2.TrajectoryStateUpdate.State.STATE_FULLY_IDLE):";
9
- export declare const PROMPT_REPLACEMENT = " elif tsu.state in (\n localharness_pb2.TrajectoryStateUpdate.State.STATE_FULLY_IDLE,\n localharness_pb2.TrajectoryStateUpdate.State.STATE_WAITING_FOR_TASKS,\n ):";
10
- export type PatchClassification = "patchable" | "already-fixed" | "unrecognized" | "entry-missing";
11
- export interface ZipEntryInfo {
12
- name: string;
13
- method: number;
14
- crc32: number;
15
- compSize: number;
16
- uncompSize: number;
17
- localHeaderOffset: number;
18
- cdEntryOffset: number;
19
- nameLength: number;
20
- extraLength: number;
21
- commentLength: number;
22
- }
23
- export interface ZipArchiveInfo {
24
- eocdOffset: number;
25
- cdOffset: number;
26
- cdSize: number;
27
- cdStart: number;
28
- baseOffset: number;
29
- entries: Map<string, ZipEntryInfo>;
30
- }
31
- export interface PatchOptions {
32
- cacheBaseDir?: string;
33
- force?: boolean;
34
- skipSign?: boolean;
35
- }
36
- export interface PatchResult {
37
- path: string;
38
- patched: boolean;
39
- classification: PatchClassification;
40
- cached: boolean;
41
- }
42
- export declare function findEocd(buf: Buffer): number;
43
- export declare function parseZipArchive(buf: Buffer): ZipArchiveInfo | null;
44
- export declare function getEntryData(buf: Buffer, zip: ZipArchiveInfo, entry: ZipEntryInfo): Buffer | null;
45
- export declare function findAnchorAndReplacement(text: string): {
46
- anchor: string;
47
- replacement: string;
48
- } | null;
49
- export declare function shortenDecorativeComments(text: string, delta: number): string | null;
50
- export declare function patchEventProcessorContent(content: string): string | null;
51
- export declare function classifyBuffer(buf: Buffer): PatchClassification;
52
- export declare function classifyBinary(filePath: string): PatchClassification;
53
- export declare function patchBuffer(buf: Buffer): {
54
- patched: boolean;
55
- classification: PatchClassification;
56
- };
57
- export declare function getCacheKey(realpath: string, stat?: {
58
- size: number;
59
- mtimeMs: number;
60
- }): string;
61
- export declare function getCacheBaseDir(customDir?: string): string;
62
- export declare function gcCache(baseDir: string, currentKey?: string): void;
63
- export declare function patchBinary(srcPath: string, options?: PatchOptions): PatchResult;
64
- export declare function ensurePatchedBinary(srcPath: string, options?: PatchOptions): string;
65
- //# sourceMappingURL=agy-patch.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agy-patch.d.ts","sourceRoot":"","sources":["../../src/agy-patch.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,qBAAqB,mFACgD,CAAC;AAEnF,eAAO,MAAM,cAAc,6FACiE,CAAC;AAE7F,eAAO,MAAM,cAAc,YAAa,CAAC;AACzC,eAAO,MAAM,YAAY,WAAa,CAAC;AACvC,eAAO,MAAM,eAAe,WAAa,CAAC;AAE1C,eAAO,MAAM,eAAe,4HAGnB,CAAC;AAEV,eAAO,MAAM,gBAAgB,mMAGpB,CAAC;AAEV,eAAO,MAAM,aAAa,kHAEqD,CAAC;AAEhF,eAAO,MAAM,kBAAkB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