Commit 2e11aa7
Support Antigravity CLI SQLite sessions (#580)
## Summary
*Resolves a breaking change in antigravity-cli release 1.0.4
(2026-06-01) release.*
Adds support for newer Antigravity CLI sessions that are stored as
per-conversation SQLite `.db` files under
`~/.gemini/antigravity-cli/conversations/`.
This keeps the existing encrypted `.pb` + `agy-reader` sidecar flow
intact, while allowing Agentsview to index the newer DB-backed sessions
directly.
## Changes
- Discover Antigravity CLI `conversations/<uuid>.db` files and prefer
them over same-ID `.pb` files.
- Classify `.db`, `.db-wal`, and `.db-shm` filesystem events back to the
canonical DB source.
- Parse CLI SQLite DB steps through the existing Antigravity
SQLite/protobuf path.
- Include SQLite WAL/SHM mtimes in effective file info so live session
updates resync reliably.
- Clean noisy internal strings from DB-decoded transcripts, including
step headers, UUIDs, opaque request IDs, model placeholders, AGY config
paths, and tool-action JSON blobs.
- Tighten prompt replacement from `history.jsonl` so sparse or blank
history rows do not misassign prompts.
- Update README guidance for the two Antigravity CLI storage formats.
## Root Cause
Recent Antigravity CLI releases now write `conversations/<uuid>.db`
instead of the older encrypted `conversations/<uuid>.pb` format.
Agentsview only discovered `.pb` files for Antigravity CLI, so newer
sessions were invisible. Once DB discovery was added, the old protobuf
string-extraction heuristic surfaced internal protocol strings in the
visible transcript; this PR filters those strings and prefers
human-facing prompt text.
## Follow-up
Tracked in #579: newer `history.jsonl` rows may omit `conversationId`,
so DB sessions can parse cleanly but still lack project inference from
history. That should be handled conservatively by matching
prompt/timestamp proximity rather than assuming every nearby history row
belongs to a DB.
## Validation
- `go test ./internal/parser ./internal/sync`
- Tested against local Antigravity CLI `.db` sessions before and after
the code changes; transcript parsing produced a clean first user message
without step headers or internal IDs.
---------
Co-authored-by: Wes McKinney <wesmckinn+git@gmail.com>1 parent 234d7a2 commit 2e11aa7
8 files changed
Lines changed: 1038 additions & 88 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
264 | 266 | | |
265 | 267 | | |
266 | 268 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
32 | 42 | | |
33 | 43 | | |
34 | 44 | | |
35 | 45 | | |
36 | | - | |
| 46 | + | |
37 | 47 | | |
38 | 48 | | |
39 | 49 | | |
| |||
102 | 112 | | |
103 | 113 | | |
104 | 114 | | |
105 | | - | |
106 | | - | |
107 | | - | |
| 115 | + | |
108 | 116 | | |
109 | 117 | | |
110 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
27 | 32 | | |
28 | 33 | | |
29 | 34 | | |
| |||
172 | 177 | | |
173 | 178 | | |
174 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
175 | 195 | | |
176 | 196 | | |
177 | 197 | | |
178 | 198 | | |
179 | 199 | | |
180 | | - | |
| 200 | + | |
181 | 201 | | |
182 | 202 | | |
183 | | - | |
| 203 | + | |
184 | 204 | | |
185 | 205 | | |
186 | 206 | | |
187 | 207 | | |
188 | 208 | | |
189 | 209 | | |
190 | 210 | | |
191 | | - | |
| 211 | + | |
192 | 212 | | |
| 213 | + | |
193 | 214 | | |
194 | 215 | | |
195 | 216 | | |
196 | 217 | | |
197 | | - | |
| 218 | + | |
198 | 219 | | |
199 | 220 | | |
200 | | - | |
| 221 | + | |
201 | 222 | | |
202 | | - | |
| 223 | + | |
203 | 224 | | |
204 | 225 | | |
205 | 226 | | |
206 | 227 | | |
207 | 228 | | |
208 | 229 | | |
209 | 230 | | |
210 | | - | |
211 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
212 | 235 | | |
213 | 236 | | |
214 | 237 | | |
| |||
220 | 243 | | |
221 | 244 | | |
222 | 245 | | |
223 | | - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
224 | 249 | | |
225 | 250 | | |
226 | 251 | | |
| |||
229 | 254 | | |
230 | 255 | | |
231 | 256 | | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
| 257 | + | |
236 | 258 | | |
237 | 259 | | |
238 | 260 | | |
| |||
254 | 276 | | |
255 | 277 | | |
256 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
257 | 408 | | |
258 | 409 | | |
259 | 410 | | |
| |||
0 commit comments