feat: parse decrypted Antigravity CLI trajectory sidecars#552
Conversation
Treat <uuid>.trajectory.json sidecars as untrusted structured input, consistent with the "Imports and new readers" row of SECURITY.md's trust-boundary table. Adds a 64 MB read cap on the sidecar (real transcripts are well under 1 MB) so a buggy or hostile sidecar writer cannot OOM agentsview by dropping a multi-GB file in the session directory, and adds a parser-level comment cross-referencing SECURITY.md so reviewers and future contributors see the posture. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
roborev: Combined Review (
|
Adds a README section that names the two ingestion modes for Antigravity CLI sessions: - summary mode (default, no extra setup): prompts from history.jsonl plus plain-text artifacts under brain/. - high-resolution mode: run agy-reader alongside agentsview to write <uuid>.trajectory.json sidecars; agentsview detects them automatically and parses full transcripts in their place. Replaces the cryptic "(summary mode)" annotation in the supported- agents table with a pointer to the new section, and references SECURITY.md for the trust model so the privacy posture of the sidecar handoff is explicit. Refs kenn-io#529. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
agy-reader as of d760722 auto-discovers the Antigravity daemon URL by parsing ~/.gemini/antigravity-cli/cli.log, so the happy path no longer requires the user to export ANTIGRAVITY_DAEMON_URL manually. Drops the manual-export step from the example block and adds a short note about the fallback behavior when discovery fails. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
roborev: Combined Review (
|
mariusvniekerk
left a comment
There was a problem hiding this comment.
This helps maintain feature compatibility with the older gemini cli, thanks a lot for this one
Adds support for
<uuid>.trajectory.jsonsidecars next to the existing AES-encrypted<uuid>.pbfiles under~/.gemini/antigravity-cli/{conversations,implicit}/. The sidecars are produced out-of-process by 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 existinghistory.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 viaAntigravityCLIFileInfo) and forces message replacement on AgentAntigravityCLI sessions so trajectory updates land cleanly. Per the trust-boundary table inSECURITY.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 throughjson.RawMessageaccessors, and reads are size-capped at 64 MB. No new outbound channel is introduced; agy-reader is local-only. The legacy in-processANTIGRAVITY_KEYdecrypt path is preserved as a fallback for users without agy-reader installed; consolidating on the sidecar path is left for a follow-up.