-
Notifications
You must be signed in to change notification settings - Fork 3.3k
CLI-via-goosed: add missing goosed API endpoints and remove remaining self.agent calls #7225
Description
Context
Branch: — the CLI now goes through goosed (HTTP/SSE) for the main reply loop, matching the desktop UI architecture.
Remaining usages in
The following direct calls still bypass goosed and need API endpoints:
1. (3 uses: lines ~404, 425, 1249)
Used for tab completion and /prompts command.
Goosed has: /config/prompts endpoint — needs a GoosedClient method to call it.
2. (2 uses: lines ~626, 856)
Used for display_context_usage (token stats) and plan mode provider info.
Goosed needs: A GET /agent/provider_info endpoint returning provider name, model name, and token usage.
3. (1 use: line ~841)
Plan mode constructs a special prompt. This is CLI-specific reasoning logic.
Options: Add /agent/plan_prompt endpoint, or move plan mode entirely server-side.
4. Session manager access
self.agent.config.session_manager is used for session operations.
Goosed has: /sessions/* endpoints — GoosedClient already has methods for these.
Goal
Remove the goose crate dependency from goose-cli Cargo.toml (or keep only for shared types like Message, ExtensionConfig).
Related
goosed_client.rsalready hasreply(),confirm_tool_action(),send_elicitation_response(),get_session(), etc.- The
agentfield on CliSession can be removed once all calls go through goosed.