-
Notifications
You must be signed in to change notification settings - Fork 1
Client Modules
Edge replaces upstream's runtime module scanning with build-time static assembly.
Upstream reference: Client Modules
The ClientModuleRegistry (ctx.clientModules) manages web plugin integration through incremental package scanning, boot graph composition, bundle routing, and index injection. At startup it scans dsh.client declarations in package.json files, builds a WebBootGraph with dependency edges and content hashes, and injects it as window.__DSH_BOOT__. Bundle changes trigger HMR updates via stat polling.
Edge replaces runtime module scanning with a build-time pipeline:
-
assemble-standalone-web.mjsreads upstream published packages, builds each client plugin's bundle, and outputs them todist/plugins/. - The boot graph is pre-computed and frozen at build time — no runtime scanning, no HMR.
-
verify-standalone.mjschecks the assembled plugin set againstexpected-boot-graph.jsonto catch accidental additions or removals. - Bundles are served as Cloudflare Assets (static files) with the Worker.
The 32 upstream client plugins run unmodified in the browser. Edge adds one custom plugin (ui-edge) for workspace directory picker and file download — 33 total.
- Client plugin code — all 32 upstream bundles run as published
- Boot graph wire format (
window.__DSH_BOOT__) - Plugin dependency resolution in the browser
- cordis Context composition on the client side
Static assets served from Cloudflare's edge CDN — no server-side rendering or module scanning at request time. The boot graph is a single JSON object embedded in the HTML. Plugin bundles are fetched in dependency order with content-hash cache busting.
verify-standalone.mjs runs at build time (CI) in milliseconds. It compares the assembled plugin list against the reviewed expected-boot-graph.json. Any upstream dependency change that adds or removes a client plugin fails the build until the expectation is explicitly updated.
| Component | Category | Upstream Equivalent |
|---|---|---|
| Build-time assembly | Replace | Runtime ClientModuleRegistry
|
| Static asset serving | Replace | Bundle route + HMR |
| Boot graph verification | Replace | Runtime graph composition |
| 32 upstream client plugins | Reuse | — |
ui-edge |
Replace | No equivalent (Edge-specific UI) |
Key observation: Edge trades runtime flexibility (HMR, dynamic scanning) for deployment simplicity (static bundles, build-time verification). The client-side plugin system is identical — only the delivery mechanism changes.
- Home
- Architecture
- Core & Scope
- Session & Persistence
- Model & Context
-
Execution & Tools
- Tools
- Bash
- Subprocess 🚫
- PTY Session 🚫
- Background Jobs 🚫
- Filesystem
- LSP Navigation 🚫
- Code Runtime 🚫
-
Web Access
⚠️ -
Skills
⚠️ - Workflow 🚫
- Subagent 🚫
-
Policy & Interaction
- Goal
- Approval 🚫
- Permission Presets 🚫
-
Sandbox
⚠️ - Plan Mode 🚫
- User Interaction 🚫
- Commands 🚫
- Schedule 🚫
- Message Feedback 🚫
- Platform & Access
- Development
- 首页
- 架构
- 核心与作用域
- 会话与持久化
- 模型与上下文
- 执行与工具
- 策略与交互
- 平台与接入
- 开发