Skip to content

feat(hosts): read antigravity cli conversations for last reply - #116

Merged
backnotprop merged 2 commits into
mainfrom
feat/antigravity-host
Oct 28, 2026
Merged

backnotprop merged 2 commits into
mainfrom
feat/antigravity-host

Conversation

@backnotprop

Copy link
Copy Markdown
Contributor

Adds an Antigravity CLI (agy) host to plannotator-tui last, so herdr-annotate's "review the agent's last reply" works on agy panes (plannotator/herdr-annotate#70).

Where it reads from

  • App data directory: $ANTIGRAVITY_CLI_HOME, else ~/.gemini/antigravity-cli (%USERPROFILE% on Windows).
  • Transcript: brain/<conversation id>/.system_generated/logs/transcript_full.jsonl. The truncated transcript.jsonl is never read.
  • A reply is a PLANNER_RESPONSE step's non-empty content, read as-is. A step that only calls tools has no content and is skipped. Prompts (USER_INPUT) are not shown, so their <USER_REQUEST> and <ADDITIONAL_METADATA> wrappers are left in place. The picker's multi-reply review works like it does for other hosts. Each step's step_index is its message id.

How it picks the conversation

  • Herdr reports agent: "agy" with agent_session {kind: id}. That id names the transcript directly. The new agy label is matched through Host::ALL, so the launcher needs no change apart from adding agy as a known process name.
  • Without an id, the transcript does not record its folder, so two files supply it:
    • conversation_summaries.db: workspace_uris per conversation. It is opened read-only with the existing immutable fallback, and subagent rows are skipped.
    • history.jsonl: workspace plus conversationId for each prompt.
  • A conversation whose workspace equals the cwd wins over one whose workspace only contains the cwd. Within each group, the newest transcript (by last write) that holds a message wins.
  • If the database is missing or unreadable, the history decides alone. A transcript that neither file ties to the cwd is never shown. In that case the error names both files and the database failure.
  • file:// URIs are percent-decoded, including Windows drive forms (file:///C:/..., file:///c%3A/...). On Windows, paths match regardless of case and slash direction.
  • --session <transcript> detects the format without --host, and the conversation id is recovered from the path.

Verification

  • Run against real agy 1.2.7 data on macOS (read-only):
    • by id;
    • by cwd through the database alone;
    • by cwd through the history alone;
    • a workspace subdirectory;
    • an unrelated folder (clear error).
  • The fixture is built from the issue's sample with synthetic paths.
  • Tests: 11 host tests (plus 1 Windows-only), plus detection, CLI end-to-end, and Herdr launch tests.
  • cargo fmt --check, cargo clippy --workspace --all-targets -- -D warnings and cargo test --workspace (410 passed) are clean.

refs plannotator/herdr-annotate#70

@backnotprop
backnotprop added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit d6a481c Oct 28, 2026
3 checks passed
@backnotprop
backnotprop deleted the feat/antigravity-host branch October 28, 2026 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant