Commit a1c762a
feat: parse decrypted Antigravity CLI trajectory sidecars (#552)
Adds support for `<uuid>.trajectory.json` sidecars next to the existing
AES-encrypted `<uuid>.pb` files under
`~/.gemini/antigravity-cli/{conversations,implicit}/`. The sidecars are
produced out-of-process by
[agy-reader](https://github.com/mjacobs/agy-reader), which holds the
decryption path and writes the resulting transcript as plain JSON;
agentsview's parser now detects the sidecar and uses it as the source of
truth for messages, tool calls, and tool results, falling back to the
existing `history.jsonl` + brain artifact path when no sidecar is
present. The sync engine treats the sidecar as part of the session for
change detection (combined mtime/size via `AntigravityCLIFileInfo`) and
forces message replacement on AgentAntigravityCLI sessions so trajectory
updates land cleanly. Per the trust-boundary table in `SECURITY.md`,
sidecars are treated as untrusted structured input under the "Imports
and new readers" row: the parser is defensive against unknown step
types, volatile fields are decoded through `json.RawMessage` accessors,
and reads are size-capped at 64 MB. No new outbound channel is
introduced; agy-reader is local-only. The legacy in-process
`ANTIGRAVITY_KEY` decrypt path is preserved as a fallback for users
without agy-reader installed; consolidating on the sidecar path is left
for a follow-up.
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: Wes McKinney <wesmckinn+git@gmail.com>1 parent c6dc0b3 commit a1c762a
8 files changed
Lines changed: 1311 additions & 36 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
| 216 | + | |
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
221 | 254 | | |
222 | 255 | | |
223 | 256 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
| |||
61 | 64 | | |
62 | 65 | | |
63 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
64 | 70 | | |
65 | 71 | | |
66 | 72 | | |
| |||
0 commit comments