Home

mweinbach / agent-coworker

publicmweinbach/agent-coworker
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

feat: add A2UI workspace defaults and prompt gating

6 months ago

875e1f0
Authored
mweinbach4/18/2026, 12:50:55 AM
This threads A2UI through the same workspace-default path as the existing desktop behavior toggles, adds a settings control to flip it, and refreshes the system prompt so the model is explicitly told when A2UI is enabled or disabled. The prompt path also hides the a2ui skill when the workspace has generative UI turned off so the advertised prompt contract matches the actual toolbelt.

Constraint: The desktop workspace-default flow must stay aligned with the control-session JSON-RPC schema and persisted workspace state
Rejected: UI-only toggle without prompt changes | the model could still advertise or load a2ui when the tool was disabled
Confidence: high
Scope-risk: moderate
Reversibility: clean
Directive: Keep A2UI config, prompt injection, and desktop workspace defaults in sync; changing only one of those surfaces will reintroduce drift
Tested: bun run docs:generate-jsonrpc; bun test test/prompt.test.ts test/session.test.ts test/server.jsonrpc.control.test.ts apps/desktop/test/workspaces-page.test.ts; bun run typecheck; bun test
Not-tested: Manual desktop smoke with a live non-Google provider emitting A2UI after toggling the workspace setting

Parent9716e1e

20 files changed
  • apps/desktop/src/app/store.actions/bootstrap.ts+3−0
  • apps/desktop/src/app/store.actions/workspace.ts+1−0
  • apps/desktop/src/app/store.actions/workspaceDefaults.ts+18−0
  • apps/desktop/src/app/store.helpers/controlSocket.ts+3−0
  • apps/desktop/src/app/types.ts+1−0
  • apps/desktop/src/lib/desktopSchemas.ts+1−0
  • apps/desktop/src/ui/settings/pages/WorkspacesPage.tsx+16−0
apps/desktop/test/workspaces-page.test.ts
+70
−0
  • docs/generated/websocket-jsonrpc.d.ts+5−5
  • docs/generated/websocket-jsonrpc.schema.json+1−1
  • docs/websocket-protocol.md+3−1
  • src/prompt.ts+27−3
  • src/server/jsonrpc/schema.sessionRuntime.ts+2−0
  • src/server/protocol.ts+2−0
  • src/server/session/SessionContext.ts+1−0
  • src/server/session/SessionMetadataManager.ts+10−0
  • src/server/startServer.ts+4−0
  • test/prompt.test.ts+22−0
  • test/server.jsonrpc.control.test.ts+4−0
  • test/session.test.ts+28−1