docs: overhaul docs, add architecture and traces, update README/GEMINI
- Add docs/architecture.md with 4 mermaid diagrams - Add docs/mitm.md with 3 mermaid diagrams (replaces mitm-interception-status) - Add docs/traces.md documenting per-call trace system - Rewrite README.md to be concise with mermaid and doc refs - Rewrite GEMINI.md for core philosophy and agent usage - Clean extension-server-analysis.md (remove stale debug sections) - Delete temp docs: standalone-ls-todo, panel-stream-investigation, endpoint-gap-analysis, request-comparison
This commit is contained in:
@@ -304,47 +304,3 @@ Both use `Connect-Protocol-Version: 1` header.
|
||||
|
||||
5. All other methods — return empty success
|
||||
- `GetChromeDevtoolsMcpUrl`, `ShowAnnotation`, `OpenFilePointer`, etc.
|
||||
|
||||
---
|
||||
|
||||
## Current Stub Issues (from latest debug log)
|
||||
|
||||
### Issue 1: "key not found"
|
||||
|
||||
```
|
||||
E0215 20:05:56.311541 server.go:558] Failed to get OAuth token: key not found
|
||||
```
|
||||
|
||||
The `GetSecretValue` response doesn't match what the LS expects. The LS calls `GetSecretValue` with a specific key, but our stub ignores the key and always returns the token. The "key not found" error suggests the LS's state sync layer caches by key and doesn't find the expected entry.
|
||||
|
||||
**Root cause**: The LS doesn't just call `GetSecretValue` — it goes through the `UnifiedStateSyncClient` which uses `GetRow(key)`. The state sync is a key-value store. The LS looks up a specific key in state sync, and the state sync client calls `GetSecretValue` on the extension server. Since our stub returns an empty protobuf for everything except `GetSecretValue`, the state sync's initial `SubscribeToUnifiedStateSyncTopic` gets no data, and subsequent `GetRow()` calls return "key not found".
|
||||
|
||||
### Issue 2: "unknown model key MODEL_PLACEHOLDER_M18"
|
||||
|
||||
```
|
||||
E0215 20:05:56.358443 interceptor.go:74] SendUserCascadeMessage: unknown model key MODEL_PLACEHOLDER_M18
|
||||
```
|
||||
|
||||
The model configuration isn't loaded because `Cache(loadCodeAssistResponse)` failed. This cache depends on `userInfo` which depends on the OAuth token. Fix the token flow and this should resolve.
|
||||
|
||||
### Issue 3: "mkdir permission denied"
|
||||
|
||||
```
|
||||
E0215 20:05:56.311614 log.go:380] Failed to create artifacts directory...mkdir /tmp/antigravity-standalone/.gemini/antigravity-standalone/brain/.../: permission denied
|
||||
```
|
||||
|
||||
The LS tries to create directories under the `gemini_dir`. This is non-fatal but noisy.
|
||||
|
||||
---
|
||||
|
||||
## Recommended Fix Strategy
|
||||
|
||||
The current approach of parsing individual methods won't scale — ALL 53+ methods are ServerStream and need envelope framing.
|
||||
|
||||
**Better approach**: Instead of understanding every method, ensure:
|
||||
|
||||
1. **Every response** uses Connect streaming envelope framing (`0x02 + len + {}` minimum)
|
||||
2. **GetSecretValue** returns the token in a data envelope before the end-of-stream
|
||||
3. **Content-Type** is always `application/connect+proto`
|
||||
4. **Connection: close** to avoid HTTP keep-alive issues
|
||||
5. Create the `gemini_dir` with proper permissions before spawning the LS
|
||||
|
||||
Reference in New Issue
Block a user