Skip to content

feat: GenUI MCP service and Workspace coordination#7768

Closed
bioinfornatics wants to merge 1 commit intoaaif-goose:mainfrom
bioinfornatics:pr/12-fix
Closed

feat: GenUI MCP service and Workspace coordination#7768
bioinfornatics wants to merge 1 commit intoaaif-goose:mainfrom
bioinfornatics:pr/12-fix

Conversation

@bioinfornatics
Copy link
Copy Markdown
Contributor

Summary

Adds two new modules:

GenUI MCP Service ()

  • LLM-driven UI component generation via MCP Sampling
  • Supports KPI cards, data tables, stat displays, and chart specs
  • Outputs JSONL patch format for streaming UI updates
  • Validates generated specs (balanced braces, root object check)

Workspace Coordination ()

  • Event bus with broadcast channels for inter-component communication
  • File-system based locking for shared workspace access
  • Session-scoped workspace contexts

Files Changed

  • crates/goose-mcp/src/genui_service/mod.rs (+534 lines) — GenUI service
  • crates/goose-mcp/src/lib.rs (+1 line) — module registration
  • crates/goose/src/execution/mod.rs (+1 line) — module registration
  • crates/goose/src/execution/workspace.rs (+532 lines) — workspace coordination

Verification

  • cargo check ✅
  • cargo clippy -D warnings ✅
  • cargo fmt ✅
  • 4 files, +1,068 lines (all new)

GenUI Service (crates/goose-mcp/src/genui_service/ — 534 lines):
- MCP server for generating UI components via LLM
- Supports HTML/CSS/JS generation with structured output
- KPI display, chart generation, data table rendering
- Template-based component generation

Workspace Coordination (crates/goose/src/execution/workspace.rs — 532 lines):
- WorkspaceEventBus: broadcast channel for file/build/agent events
- FileLockManager: advisory soft-locking for multi-agent file access
- SharedWorkspace: combines event bus + file locks
- WorkspaceEvent enum: FileChanged, BuildStarted, BuildCompleted, etc.
- 16 unit tests

Cherry-picked from feature/cli-via-goosed with zero adaptation needed.

Signed-off-by: Jonathan MERCIER <bioinfornatics@gmail.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 14c3cf2f3f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


pub mod autovisualiser;
pub mod computercontroller;
pub mod genui_service;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Expose GenUI service through MCP command routing

Adding genui_service as a module here does not make the new server runnable through Goose’s MCP entrypoints: McpCommand still only parses/dispatches autovisualiser, computercontroller, memory, and tutorial (in crates/goose-mcp/src/mcp_server_runner.rs, crates/goose-cli/src/cli.rs, and crates/goose-server/src/main.rs), so GenUiServiceServer cannot be launched by users and the feature is effectively unreachable.

Useful? React with 👍 / 👎.

Comment on lines +251 to +253
self.event_bus.publish(WorkspaceEvent::AgentLeft {
agent_id: agent_id.to_string(),
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Emit AgentLeft only for tracked agents

leave always publishes WorkspaceEvent::AgentLeft even when agent_id was never joined (or leave is called twice), which can desynchronize consumers that derive presence from join/left events and cause false “agent disconnected” handling despite no real membership change.

Useful? React with 👍 / 👎.

@DOsinga
Copy link
Copy Markdown
Collaborator

DOsinga commented Mar 11, 2026

thanks! this looks cool, probably overlaps somewhat with the goose-apps approach. then again, it is a standalone mcp server, no? so probably doesn't need to be bundled with goose

@DOsinga DOsinga closed this Mar 11, 2026
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.

2 participants