Repository navigation
feat: expose OpenWork UI control MCP bridge - #1644
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
The following comment was made by an LLM, it may be inaccurate: |
This was referenced May 4, 2026
benjaminshafii
added a commit
that referenced
this pull request
May 15, 2026
* feat: expose UI control MCP bridge * docs: rewrite MCP UI control as a tutorial * ci: add isolated openwork-ui-mcp check and publish workflow * fix: harden UI control bridge
benjaminshafii
added a commit
that referenced
this pull request
May 15, 2026
* feat: expose UI control MCP bridge * docs: rewrite MCP UI control as a tutorial * ci: add isolated openwork-ui-mcp check and publish workflow * fix: harden UI control bridge
yomgui
added a commit
that referenced
this pull request
Sep 10, 2026
* fix(app): return every loaded session from session.list_sessions session.list_sessions hard-coded `out.slice(0, 30)` since the original UI control bridge (#1644) even though the app already holds up to 200 sessions per workspace in memory. The action exposed no `limit` or `workspaceId` args and no truncation signal, so an agent asked to inventory ~100 sessions could not see them and fell back to scraping OpenCode storage on disk. - Return every loaded session (pinned first, then newest) by default. - Accept optional `limit` (opt-in cap) and `workspaceId` (exact id or display-name match, never falls back to another workspace). - Extract the pure listing into list-control-sessions.ts so the behavior is provable without booting Electron; keep the array result shape that the existing e2e specs consume. - Document the args in the UI control profile and cross-chat memory docs. Proof: evals/specs/session-list-sessions-inventory.test.ts (4 tests) fails 3/4 with the old cap and passes 4/4 with the fix. * fix(app): parse list_sessions args in the pure helper; drop personal name from docs - listControlSessions now takes the raw control-action payload, so the hook's execute is a one-line pass-through and the spec covers arg forwarding (null / {} / positive-integer limit / trimmed workspaceId) exactly as the control bridge delivers it (Warden 2C6-KRW). - Replace a real-looking personal name in the public cross-chat-memory example with a fictional topic (Warden 2T3-GM4).
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
window.__openworkControlaction registry for semantic OpenWork UI state/action discovery.packages/openwork-ui-mcpso MCP clients can callui_status,ui_snapshot,ui_list_actions, andui_execute_action.Scope
This PR intentionally excludes built-in Realtime, microphone permissions, Realtime server endpoints, and Feature Preview UI. Those are split into the follow-up draft PR.
Verification
pnpm install --lockfile-only✅pnpm install✅node --check packages/openwork-ui-mcp/index.mjs✅node --check apps/desktop/electron/main.mjs✅pnpm --filter @openwork/app typecheck✅How to test
Package checks
git checkout feat/openwork-ui-control-mcp cd packages/openwork-ui-mcp npm install --ignore-scripts node --check index.mjs npm publish --dry-run --access publicLocal Electron bridge
Launch OpenWork desktop locally, then confirm one discovery file exists:
Test the bridge directly:
Expected:
/healthreturnsok: true,/actionsincludes actions likecomposer.set_text,composer.send, andsession.list_sessions, andcomposer.set_textvisibly updates the desktop composer. Unauthorized raw HTTP requests should return401.MCP client flow
From the repo root:
In the inspector, call:
ui_statusui_snapshotui_list_actionsui_execute_actionwith:{ "actionId": "composer.set_text", "args": { "text": "Hello from MCP" } }Optionally send it with:
{ "actionId": "composer.send" }A successful end-to-end pass means OpenWork desktop is running, MCP status is connected, snapshot shows route/actions,
composer.set_textvisibly updates the composer, andsession.list_sessionsreturns sessions. Use the underscore MCP tool names (ui_snapshot,ui_list_actions,ui_execute_action).