Skip to content

Keiki swarm controls: group roster, conversation liveness, background tasks with Cancel / End all - #54

Open
devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/1789271167-swarm-controls
Open

Keiki swarm controls: group roster, conversation liveness, background tasks with Cancel / End all#54
devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/1789271167-swarm-controls

Conversation

@devin-ai-integration

Copy link
Copy Markdown

Summary

Desktop counterpart of Mail-0/sms-kit#1000 (swarm observability). Depends on those platform routes being deployed; on older servers the new fields default to empty (#[serde(default)]) and the roster/end/cancel calls fail with their HTTP error, nothing else changes.

keiki-model / keiki-api — new models ConversationLiveness, SubagentTaskSummary, AgentGroupRoster{members, totals}, and client methods:

GET  /api/webapp/agent-groups/{id}/roster   -> AgentGroupRoster
POST /api/webapp/agent-groups/{id}/end      -> { threadsEnded, tasksCancelled }
POST /api/webapp/subagent-tasks/{id}/cancel -> { cancelled }

ConversationSummary/ConversationDetail gain liveness: Option<ConversationLiveness>; detail gains tasks: Vec<SubagentTaskSummary>.

UI — remote-only state lives in AppState (no engine/proto/persistence changes):

  • keiki_liveness: chat_id -> Option<Liveness> written by both the 15 s snapshot loop and the selected-conversation detail poll; the session title bar shows a Working / Waiting on peer badge.
  • KeikiConversation.tasks from the detail poll feeds a new right-pane Tasks surface (status pill, request, timestamps). Cancel on running/suspended tasks only when KeikiSessionInfo::can_manage() (role owner/admin — server is still authoritative).
  • keiki_group_rosters: group_id -> AgentGroupRoster, polled in the snapshot loop for every expanded sidebar group; the expanded set is derived from settings.sidebar_collapsed_groups (Shell::sync_keiki_expanded_groups) so groups already open at launch poll too. Group header shows N members · running · waiting · $cost; expanded body lists ≤25 members (running → waiting → idle → ended) with a +N more row. End all (stop icon, manage roles, only when something is live) confirms with the live thread/task counts, calls end_agent_group, refreshes the roster, and surfaces 403/errors via notify.
  • authorized_request wraps the credential read + token refresh for the two new mutating calls.

Verification

cargo fmt --check, cargo check -p zeron-ui, cargo test -p keiki-model (serde round-trip + defaulting for missing liveness/tasks), cargo test -p zeron-ui shell (58 passed). Not driven in the GUI against a live server.

Link to Devin session: https://app.devin.ai/sessions/e39718f873d847298776b2e2fdc14fcc
Open in Devin Desktop: https://app.devin.ai/desktop/session/e39718f873d847298776b2e2fdc14fcc?variant=devin
Requested by: @MrgSub

@devin-ai-integration

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

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