Skip to content

feat(agy-status): handle the agy activity status in the sessions tab#80

Merged
StuBehan merged 1 commit into
mainfrom
feat/agy-status
Jun 8, 2026
Merged

feat(agy-status): handle the agy activity status in the sessions tab#80
StuBehan merged 1 commit into
mainfrom
feat/agy-status

Conversation

@StuBehan

@StuBehan StuBehan commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Shows Antigravity (agy) busy/idle in the Sessions tab — the agy analog of Claude's per-pid sidecar status. agy has no sidecar, so its live session state is read from the running CLI's local loopback RPC (GetAllCascadeTrajectories) and matched to the session by workspace/cwd. Along the way it generalizes the per-session live-state fields so Claude and agy flow through one path, and factors a shared loopback-RPC client.

Changes

Agy session status (panel/AntigravityLocalServer.swift, SessionStore.swift)

  • New AntigravityLocalServer — shared client for the running agy's local Connect-RPC (the Codeium/Windsurf "Cascade" language server; lsof loopback port → HTTP POST, no auth/CSRF, 127.0.0.1 only). liveStatusByWorkspace() calls GetAllCascadeTrajectories, maps CASCADE_RUN_STATUS_{BUSY,RUNNING,CANCELING} → busy / IDLE → idle, keyed by workspace path (latest trajectory per workspace).
  • SessionStore.enrichAntigravity — during the 3s poll, when an agy session is present, fetch the workspace statuses and match each agy session by cwd (exact or prefix) → set its live status + last-activity. One RPC per scan, only when agy is running.
  • Result: agy sessions get the busy/idle dot (yellow/green), the "busy/idle · Nm ago" status line, and busy-first sort — same as Claude.

Generalized live-state fields (SessionStore, Sessions, CompactView, Panel)

  • Session.claudeStatus/claudeName/claudeUpdatedAtliveStatus/liveTitle/lastActivityAt (agent-agnostic; Claude's sidecar and agy's RPC feed the one path). claudeSessionID unchanged (it's the transcript/event key).

Refactor (AntigravityUsage.swift)

  • AntigravityUsageProbe now uses the shared AntigravityLocalServer.call(...) for GetUserStatus, dropping ~64 lines of duplicated port-discovery + HTTP plumbing.

build.sh — new file added to the swiftc source list.

Testing

  • swift build → clean; ./build.sh → app builds.
  • liveStatusByWorkspace() validated against the live agy 1.0.6 RPC: /Users/stubehan/stackoneidle, correct last-activity time (matches raw GetAllCascadeTrajectories).
  • Not exercisable in CI (panel + live agy). Manual check: with an agy session running, its Sessions-tab dot is yellow while it works and green when idle, sorted busy-first; quitting agy leaves the row without live status (it's a live RPC, not persisted).

Related issues

agy local-RPC surface per steipete/CodexBar#1178. Builds on the usage panel (#78) — the shared client is introduced here and the usage probe refactored onto it.

@StuBehan StuBehan merged commit 052feca into main Jun 8, 2026
5 checks passed
@StuBehan StuBehan deleted the feat/agy-status branch June 8, 2026 23:04
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