You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've searched existing issues and didn't find a duplicate.
This relates to Gaia Agent UI (gaia chat --ui).
This relates to the SDK, CLI, or a specific agent.
What problem are you trying to solve?
Activation toggles only push live UI updates when they go through the HTTP router. The connector.activation.changed SSE event is emitted from the PUT/DELETE handlers in src/gaia/ui/routers/connectors.py, but gaia connectors activate / deactivate (CLI) and direct SDK calls write the same ~/.gaia/activations.json ledger silently.
Result: with the Agent UI Settings tab open, a CLI-driven activation change is invisible until the user navigates away and back to force a refetch. That makes CLI ↔ UI workflows confusing — the activation actually took effect, but the panel keeps lying about state. This was called out as a follow-up on PR #1219 (closes #1005).
Proposed solution
Two viable options:
Route CLI/SDK writes through the router layer — share a single internal entry point (e.g. activations.set(...) / activations.delete(...)) that always emits the SSE event after a successful write, regardless of caller. Cleanest, mirrors how PR feat(connectors): per-agent MCP tool-visibility activations (#1005) #1219 centralized the MCP-only guard at connectors/api.py.
File-watcher on ~/.gaia/activations.json — the FastAPI server tails the ledger and emits connector.activation.changed whenever the file mtime moves. Looser coupling, also covers third-party writes.
Option 1 is preferred — it keeps the event source authoritative and avoids the watcher race when multiple processes write the ledger concurrently (already serialized by the per-process lock from #1219).
Acceptance criteria
gaia connectors activate <id> --agent <agent_id> triggers a connector.activation.changed SSE event with the same payload the HTTP PUT handler emits
gaia connectors deactivate ... triggers the same event with active: false
With Agent UI Settings open, a CLI activation toggle updates the "Active for" state without requiring a navigation refresh
Unit test covers the CLI → SSE path (mock the event bus, assert publish was called)
Quick check
gaia chat --ui).What problem are you trying to solve?
Activation toggles only push live UI updates when they go through the HTTP router. The
connector.activation.changedSSE event is emitted from the PUT/DELETE handlers insrc/gaia/ui/routers/connectors.py, butgaia connectors activate/deactivate(CLI) and direct SDK calls write the same~/.gaia/activations.jsonledger silently.Result: with the Agent UI Settings tab open, a CLI-driven activation change is invisible until the user navigates away and back to force a refetch. That makes CLI ↔ UI workflows confusing — the activation actually took effect, but the panel keeps lying about state. This was called out as a follow-up on PR #1219 (closes #1005).
Proposed solution
Two viable options:
activations.set(...)/activations.delete(...)) that always emits the SSE event after a successful write, regardless of caller. Cleanest, mirrors how PR feat(connectors): per-agent MCP tool-visibility activations (#1005) #1219 centralized the MCP-only guard atconnectors/api.py.~/.gaia/activations.json— the FastAPI server tails the ledger and emitsconnector.activation.changedwhenever the file mtime moves. Looser coupling, also covers third-party writes.Option 1 is preferred — it keeps the event source authoritative and avoids the watcher race when multiple processes write the ledger concurrently (already serialized by the per-process lock from #1219).
Acceptance criteria
gaia connectors activate <id> --agent <agent_id>triggers aconnector.activation.changedSSE event with the same payload the HTTP PUT handler emitsgaia connectors deactivate ...triggers the same event withactive: false