feat: statusline provider usage + session workspace actions SDK - #77089
feat: statusline provider usage + session workspace actions SDK#77089Codezilla-jpg wants to merge 8 commits into
Conversation
teknium1
left a comment
There was a problem hiding this comment.
Thanks for the focused SDK and session-workspace groundwork. Two integration gaps need resolution before the companion plugin can work end to end.
Problems
apps/desktop/src/sdk/index.ts:128-131routes to a profile gateway but does not sendprofilein the RPC params. The handler selects its database through_profile_db(params)(tui_gateway/server.py:1209-1218), so app-global remote mode can target the launch profile rather than the row's profile.agent/account_usage.py:57-81andagent/rate_limit_tracker.py:106-122add serializers, but nousage.providershandler is added. The linked plugin callshost.request('usage.providers', ...), so its provider status path remains unavailable.
Suggested changes
- Forward
profilein the workspace RPC params and add a cross-profile durable-id test. - Add and exercise the combined provider-usage RPC, or split that unfinished statusline integration from this PR.
This is an automated hermes-sweeper review.
|
|
||
| /** Persist a stored session's workspace without foregrounding its profile. */ | ||
| setSessionWorkspace: async (change: SessionWorkspaceChange): Promise<SessionWorkspaceResult> => | ||
| requestGatewayForProfile<SessionWorkspaceResult>(change.profile, 'session.workspace.set', { |
There was a problem hiding this comment.
requestGatewayForProfile changes the socket, but this handler selects its database from params['profile'] (_profile_db). App-global remote mode can share one backend, so please include profile: change.profile in this payload and cover the same durable id existing in two profile DBs.
| return value.astimezone(timezone.utc).isoformat().removesuffix("+00:00") + "Z" | ||
|
|
||
|
|
||
| def account_usage_snapshot_to_dict( |
There was a problem hiding this comment.
This serializer is not exposed by a gateway RPC in this PR. The linked companion plugin requests usage.providers, so it cannot consume this output yet. Please add and test that endpoint here, or split the unfinished provider-statusline portion.
Related: #58339 (provider account/rate-limit usage surface), #33094 (provider-usage request), and #66484 (Desktop plugin workspace capability). This PR combines a distinct Desktop-plugin session-actions SDK with profile-aware durable workspace mutation; the public API contract needs maintainer direction. |
|
Rückgängig gemacht - Plugin soll privat bleiben. |
Summary
Adds the core/gateway/desktop plumbing needed by the external Desktop plugin hermes-statusline-workspaces:
session.workspace.setRPC (durable session id, optional profile, busy-session guard)session.actionsplus curated host helpers:host.selectWorkspaceDirectoryhost.setSessionWorkspaceCompanion plugin
Notes / follow-ups
usage.providersis still a planned follow-up for a single combined account+rate-limit payload.Test plan
tests/agent/test_account_usage.py(serializer + account suites)tests/agent/test_rate_limit_tracker.pytests/tui_gateway/test_session_workspace_set.py(+ adjacent session/cwd suites)session-actions-menu.test.tsx, typecheck on touched surfaces