Skip to content

Add local WebLLM and NodePod browser runtime#32

Merged
nick-pape merged 6 commits into
mainfrom
codex/webllm-qwen-option
Jun 10, 2026
Merged

Add local WebLLM and NodePod browser runtime#32
nick-pape merged 6 commits into
mainfrom
codex/webllm-qwen-option

Conversation

@nick-pape

Copy link
Copy Markdown
Owner

Summary

  • add a browser WebLLM/Qwen model option with manual workspace tool handling
  • add NodePod-backed browser workspace runtime and make it the default demo runtime
  • keep WebContainer available as an alternate runtime while sharing browser workspace MCP tooling

Stacking note

This PR is stacked on #31. Review/merge #31 first, then rebase this branch onto main.

Validation

  • rush test --to @fledgling/workspace-nodepod
  • rush build --to @fledgling/web-demo

@nick-pape nick-pape force-pushed the codex/webllm-qwen-option branch from 751e5d7 to 5e4b0e4 Compare June 9, 2026 14:47
@nick-pape nick-pape marked this pull request as ready for review June 10, 2026 00:15
Copilot AI review requested due to automatic review settings June 10, 2026 00:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a browser-focused demo/runtime stack: a shared browser MCP workspace sidecar (@fledgling/mcp-workspace-browser), a NodePod-backed workspace runtime, and a Vite-based web demo that can run either a remote OpenAI model or a local WebLLM Qwen model (with a manual tool-call fallback when function calling isn’t available).

Changes:

  • Introduce @fledgling/mcp-workspace-browser as the shared browser workspace runtime + MCP sidecar/tooling layer, and refactor WebContainer runtime to reuse it.
  • Add @fledgling/workspace-nodepod implementing the shared workspace runtime interface on top of NodePod.
  • Add @fledgling/web-demo (Vite + React) with OpenAI and WebLLM/Qwen model options, plus NodePod/WebContainer runtime switching.

Reviewed changes

Copilot reviewed 44 out of 46 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
rush.json Adds new workspace packages to the Rush monorepo.
packages/mcp-workspace-browser/package.json New shared browser workspace sidecar package definition.
packages/mcp-workspace-browser/tsconfig.json TS config for the new browser workspace package.
packages/mcp-workspace-browser/vitest.config.ts Vitest config for the new browser workspace package.
packages/mcp-workspace-browser/eslint.config.cjs ESLint rig wiring for the new browser workspace package.
packages/mcp-workspace-browser/config/rig.json Heft rig config for the new browser workspace package.
packages/mcp-workspace-browser/src/index.ts Exports the new browser workspace runtime + sidecar.
packages/mcp-workspace-browser/src/runtime.ts Defines shared IWorkspaceRuntime + path helpers for browser workspaces.
packages/mcp-workspace-browser/src/runtime.test.ts Unit tests for the shared browser workspace helpers.
packages/mcp-workspace-browser/src/sidecar.ts Implements MCP sidecar + tool registration for browser workspaces.
packages/mcp-workspace-webcontainer/package.json Adds dependency on @fledgling/mcp-workspace-browser.
packages/mcp-workspace-webcontainer/src/runtime.ts Refactors runtime to reuse shared browser workspace helpers/types.
packages/mcp-workspace-webcontainer/src/index.ts Re-exports shared browser workspace APIs from the webcontainer package.
packages/workspace-nodepod/package.json New NodePod-backed browser workspace runtime package definition.
packages/workspace-nodepod/tsconfig.json TS config for the new NodePod runtime package.
packages/workspace-nodepod/vitest.config.ts Vitest config for the new NodePod runtime package.
packages/workspace-nodepod/eslint.config.cjs ESLint rig wiring for the new NodePod runtime package.
packages/workspace-nodepod/config/rig.json Heft rig config for the new NodePod runtime package.
packages/workspace-nodepod/src/index.ts Exports the NodePod workspace runtime.
packages/workspace-nodepod/src/runtime.ts Implements IWorkspaceRuntime on top of NodePod FS + process APIs.
packages/workspace-nodepod/src/runtime.test.ts Unit tests for path normalization and command execution behavior.
packages/web-agent/package.json Switches dependency from webcontainer workspace package to browser workspace package.
packages/web-agent/src/index.ts Re-exports browser workspace APIs (instead of webcontainer workspace APIs).
packages/web-agent/src/dependencies.ts Uses the new shared browser workspace sidecar factory.
packages/web-agent/src/tool-provider.ts Retypes sidecar dependency to the new shared browser workspace sidecar.
packages/web-agent/src/web-agent.test.ts Updates IWorkspaceRuntime import to come from the shared browser workspace package.
packages/web-demo/package.json New Vite/React demo app with WebLLM + NodePod dependencies.
packages/web-demo/tsconfig.json TS config for the demo app with bundler module resolution.
packages/web-demo/vite.config.ts Vite config with NodePod plugin + chunking strategy + node:* shims.
packages/web-demo/index.html New demo HTML entrypoint.
packages/web-demo/.env.example Documents demo env vars for OpenAI + WebLLM model selection.
packages/web-demo/src/main.tsx React entrypoint wiring.
packages/web-demo/src/styles.css Demo UI styling.
packages/web-demo/src/components.tsx Demo UI components (chat + file browser + runtime panel).
packages/web-demo/src/App.tsx Demo state machine: workspace boot, session wiring, streaming transcript updates.
packages/web-demo/src/acp-demo.ts In-browser ACP wiring + workspace/runtime factory for NodePod/WebContainer.
packages/web-demo/src/model-runner.ts Model runner abstraction supporting OpenAI + WebLLM (manual tool protocol fallback).
packages/web-demo/src/webllm-worker.ts WebLLM worker entrypoint.
packages/web-demo/src/node-module-shim.ts Shim for node:module import in the demo build.
packages/web-demo/src/node-process-shim.ts Shim for node:process import in the demo build.
packages/agent-core/src/index.ts Exports the new AiSdkModelTurnRunner.
packages/agent-core/src/ai-sdk-model-turn-runner.ts Adds reusable Vercel AI SDK model-turn runner wrapper.
packages/agent-core/src/ai-sdk-model-turn-runner.test.ts Unit tests for the new model-turn runner wrapper.
packages/acp-agent/src/agent.ts Refactors Node ACP agent model runner to use the new shared AI SDK runner.
common/config/rush/pnpm-lock.yaml Lockfile updates for new packages/deps.
.gitignore Ignores additional local env file patterns.
Files not reviewed (1)
  • common/config/rush/pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/workspace-nodepod/src/runtime.ts
Comment thread packages/web-demo/src/model-runner.ts
Comment thread packages/web-demo/src/model-runner.ts
@nick-pape nick-pape merged commit cb73add into main Jun 10, 2026
4 checks passed
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