Skip to content

Add Antigravity and T3 Code coding-agent session readers - #567

Merged
stevyhacker merged 2 commits into
masterfrom
t3/add-antigravity-t3code-sessions
Nov 21, 2026
Merged

stevyhacker merged 2 commits into
masterfrom
t3/add-antigravity-t3code-sessions

Conversation

@stevyhacker

Copy link
Copy Markdown
Owner

Summary

Adds local coding-agent session readers for Antigravity (antigravity) and T3 Code (t3-code) alongside Claude Code and Codex in both the macOS app and the Windows/Linux Rust app, with per-agent toggles, timeline/digest attribution, privacy-contract updates, and 24-locale UI strings.

  • Antigravity reads transcript.jsonl (never transcript_full.jsonl) and sibling annotations/*.pbtxt titles under ~/.gemini/antigravity, ~/.gemini/antigravity-cli, and ~/.gemini/antigravity-ide (deduplicated by conversation ID), skipping thinking, tool outputs, file contents, credentials, and settings.
  • T3 Code opens ~/.t3/userdata/statev2.sqlite (and legacy state.sqlite fallback) strictly read-only for orchestration projection tables only — never auth, secrets, or settings — using json_extract so command output, file diffs, and reasoning never leave SQLite, skipping deleted/subagent threads, and returning claimedSessions from orchestration_v2_projection_provider_threads so native Claude Code and Codex sessions owned by T3 Code (including delegated subagents) are counted once.
  • Read coding agent notes remains scoped to Claude Code and Codex; the new Antigravity and T3 Code toggles appear only when session reading is enabled.

Validation

# macOS
Scripts/build/build-sync-xcframework.sh
xcodegen generate
swiftlint lint --strict --quiet
# exit 0

xcodebuild test -project LokalBot.xcodeproj -scheme LokalBot \
  -destination 'platform=macOS' -derivedDataPath Local/DerivedData \
  CODE_SIGNING_ALLOWED=NO -only-testing:LokalBotTests
# ** TEST SUCCEEDED **  Executed 5228 tests, with 60 tests skipped and 0 failures (0 unexpected)

# Live smoke check against real local sessions on this Mac
Local/DerivedData/Build/Products/Debug/LokalBot.app/Contents/MacOS/LokalBot --agent-sessions 2026-11-21
# 8 sessions, 18 bursts (t3-code: 13, claude-code: 5), 0 unreadable
Local/DerivedData/Build/Products/Debug/LokalBot.app/Contents/MacOS/LokalBot --agent-sessions 2026-11-20
# 16 sessions, 83 bursts (t3-code: 62, claude-code: 16, codex: 3, antigravity: 2), 0 unreadable
Local/DerivedData/Build/Products/Debug/LokalBot.app/Contents/MacOS/LokalBot --agent-sessions 2026-11-19
# 51 sessions, 116 bursts (t3-code: 56, antigravity: 36, codex: 13, claude-code: 11), 0 unreadable

# Localization & repo Python checks
python3 -m unittest Scripts/tests/test_localization.py Scripts/tests/test_upgrade_fixture_settings.py Scripts/tests/test_sync_crate_notices.py
# Ran 18 tests — OK
(cd LinuxWindows && python3 scripts/sync-localizations.py --check && python3 -m unittest discover -s scripts/tests)
# Ran 9 tests — OK

# Windows and Linux app (from LinuxWindows/ on macOS)
cargo fmt --all -- --check
# exit 0
TMPDIR=/tmp cargo test -p lokalbot-i18n -p lokalbot-core -p lokalbot-cli --locked
cargo test -p lokalbot-ai --locked digest
cargo clippy -p lokalbot-i18n -p lokalbot-core -p lokalbot-ai -p lokalbot-cli --all-targets --locked -- -D warnings
# exit 0 (all tests passed, clippy clean)

Not yet verified end-to-end:

  • Native Linux and Windows cargo test --workspace --locked / cargo clippy --workspace --all-targets --locked -- -D warnings will run on the Linux & Windows CI workflow (lokalbot-engine uses Linux/Windows keyring dependencies; lokalbot-engine coding_agents (23 tests), agent_notes (24 tests), lokalbot-app settings (101 tests) and onboarding (24 tests), and cargo clippy --no-deps -p lokalbot-engine were verified locally on macOS using a temporary non-committed keyring stub).
  • macOS UI tests were not run locally per repository policy and will run once marked ready for review.

Changed test expectations

  • CodingAgentEvidenceTests/testSettingsDefaultOnAndRoundTrip: default enabledCodingAgents [.claudeCode, .codex] → [.claudeCode, .codex, .antigravity, .t3Code], and round-trip expectation updated with codingAgentReadsT3Code = false → [.claudeCode, .antigravity].
    Why the old expectation was wrong: Antigravity and T3 Code are now first-class coding-agent session sources enabled by default alongside Claude Code and Codex when session reading is on.
  • CodingAgentEvidenceTests/testFinishedSetupKeepsTheSavedChoicesOfExistingInstalls: saved settings with codingAgentReadsCodex: false [.claudeCode] → [.claudeCode, .antigravity, .t3Code], and legacy {} [.claudeCode, .codex] → [.claudeCode, .codex, .antigravity, .t3Code].
    Why the old expectation was wrong: installs with session reading enabled default the two new per-agent toggles to true, so omitting those keys in older settings.json files now enables Antigravity and T3 Code alongside Claude Code and Codex.
  • lokalbot-core::coding_agents::tests::reading_needs_both_the_setting_and_a_choice_the_person_made: confirmed default enabled_coding_agents() [ClaudeCode, Codex] → [ClaudeCode, Codex, Antigravity, T3Code], and one_agent now also disables coding_agent_reads_antigravity and coding_agent_reads_t3_code to isolate Codex.
    Why the old expectation was wrong: matches the expanded four-agent default set when the user has confirmed coding-agent session reading.
  • lokalbot-app::pages::settings::coding_agents::tests::the_row_stays_off_until_the_person_chooses: settings.enabled_coding_agents().len() 2 → 4.
    Why the old expectation was wrong: confirming session reading now enables all four supported session readers (Claude Code, Codex, Antigravity, and T3 Code).

Linked issues

None

Risk / rollout notes

  • Settings & persistence: Adds codingAgentReadsAntigravity and codingAgentReadsT3Code (both defaulting to true when decoded from existing settings files). No SQLite schema migration is needed because coding_agent_bursts.agent already stores CodingAgentKind.rawValue as text ("antigravity", "t3-code").
  • Dependencies: Adds rusqlite.workspace = true to LinuxWindows/crates/lokalbot-engine/Cargo.toml (already pinned in the workspace Cargo.toml/Cargo.lock; no version pins changed).
  • Privacy & read-only access: T3 Code's SQLite database is opened strictly read-only (?mode=ro, fallback ?mode=ro&immutable=1 if a read-only folder blocks -shm), touches only orchestration projection tables, and skips statev2.sqlite entirely when max(mtime(db), mtime(db-wal)) precedes the scan window. Sessions that consult LokalBot via CLI or MCP withhold replies on both new readers.
  • Consent boundary: Antigravity reads only ~/.gemini/antigravity*; T3 Code reads only ~/.t3/userdata/statev2.sqlite / state.sqlite (and deduplicates T3-owned Claude Code and Codex native logs when T3 Code is enabled).

@stevyhacker
stevyhacker marked this pull request as draft November 21, 2026 09:21
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
lokalbot 2a2a1bf Commit Preview URL

Branch Preview URL
Nov 21 2026, 10:11 AM

@stevyhacker
stevyhacker marked this pull request as ready for review November 21, 2026 10:00
@stevyhacker
stevyhacker merged commit 42374bd into master Nov 21, 2026
23 checks passed
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