dsh-infinite-canvas
Manifest validInfinite canvas workspace in the DSH sidebar — arrange text, image, video and audio nodes, generate media with AI, and let agents drive every canvas operation through MCP tools. Ships a local bridge s
dsh-infinite-canvas(DSH 工作台插件包)
把本仓库的无限画布接入 DeepSeek Harness(DSH Desktop)的插件包,形态与
dsh-3d-director-desk 0.2.3 同构。一个包同时是:
- npm 包:
dsh plugin add可安装的.tgz; - DSH 插件(bundle):
cordis.patch.yml把服务端入口插入 Harness 插件树; - 右侧栏面板:客户端经
sidebarRightTabs.register()注册「无限画布」标签; - MCP 工具来源:patch 里的
dsh-mcp-client条目把桥的/mcp门面注册为mcp__infinite-canvas__site_navigate / canvas_list_projects / canvas_get_state / canvas_get_selection / canvas_apply_ops / canvas_run_generation / canvas_export_snapshot原生工具(streamable-http,无状态)。
架构
DSH 会话(模型调用 mcp__infinite-canvas__*)
▼
dsh-mcp-client(harness 进程,streamable-http → 127.0.0.1:17371/mcp,持续重连)
▼
canvas-agent 桥(esbuild 单文件,由 dsh/index.js spawn 并 8s 心跳监管;
数据目录 = dshHomePath('infinite-canvas'),经 CANVAS_AGENT_HOME 注入)
│ SSE tool_call(/api/tools 同一执行通道,进程内直达 CanvasSession)
▼
executor = 面板 iframe 里的画布页面(经 /bootstrap 零配置拿到本机 token,
use-agent-bridge + agent-site-tools 在浏览器内执行 canvas_* 工具)
与 dsh-3d-director-desk 并存:两个插件同时在线时,Harness 用不同 MCP server 名
(infinite-canvas / director-desk)区分调用目标,端口互不冲突(17371 / 17372)。
目录
dsh-plugin/
├── package.json # npm 与 dsh.bundle.patch / dsh.client 声明
├── cordis.patch.yml # 服务端入口条目 + dsh-mcp-client 条目
├── dsh/index.js # 服务端入口:托管桥(复用/拉起/心跳/手动重启)+ bridge-info
├── lib/client.js # 客户端单文件(右侧栏标签:工具栏 + 画布 iframe)
├── scripts/sync-assets.mjs # 打包前同步 bridge/(canvas-agent dist-bundle)与 site/(web/dist)
├── bridge/ # 生成目录(gitignore):esbuild 单文件桥运行时
└── site/ # 生成目录(gitignore):web/dist 构建产物
宿主接口
| 接口 | 用途 |
|---|---|
GET /api/infinite-canvas.bridge-info | { ready, host, port, supervised, restarts, error? },面板据此显示 iframe 还是恢复引导 |
POST /api/infinite-canvas.restart-bridge | 杀掉插件托管的桥并重建,不用重启 DSH Desktop |
sidebarRightTabs.register({ kind: 'infinite-canvas' }) | 右侧栏标签类型 + 「开始」引导页入口 |
桥进程(canvas-agent 单文件)
canvas-agent/scripts/build-bundle.mjs 用 esbuild 把全部依赖(express、MCP SDK、
zod、winston 等)内联成 dist-bundle/index.js,插件包无需携带 node_modules。
插件环境变量:
| 变量 | 作用 |
|---|---|
CANVAS_AGENT_HOME | 配置与会话线程/技能/日志落点(= dshHomePath('infinite-canvas'));独立开发态不设,仍用 ~/.infinite-canvas |
CANVAS_SITE_DIR | 指向打包内 site/,桥据此伺服画布站点(静态 + SPA 回退) |
PORT | 监听端口(= Config.port) |
桥新增的插件化端点(独立运行时同样可用):
GET /bootstrap:零配置下发{ url, token }(回环端点,token 中间件之前);POST /mcp:无状态 streamable-http MCP 门面,工具在桥进程内直达CanvasSession;- 静态站点伺服 + SPA 回退(
CANVAS_SITE_DIR存在时启用)。
构建与安装
# 1. 构建前端(web/)
cd web && npm install --legacy-peer-deps && npm run build
# 2. 构建单文件桥(canvas-agent/)
cd ../canvas-agent && npm install && npm run build:bundle
# 3. 同步资产并打包(dsh-plugin/)
cd ../dsh-plugin && npm run pack:all # = sync + npm pack,产出 dsh-infinite-canvas-0.2.6.tgz
# 4. 安装到 DSH Desktop
dsh plugin --profile web add /绝对路径/dsh-infinite-canvas-0.2.6.tgz
# 5. 完整退出并重新打开 Desktop(安装/替换包必须重启才载入新 JS 模块代码)
改端口时只设一处:CANVAS_AGENT_PORT=18000(Harness 进程环境),patch 的 url 与
插件 Config.port 同步生效。
验收(按工作台规范第 8 节)
npm pack后tar -tzf dsh-infinite-canvas-0.2.6.tgz核对package.json、dsh/、lib/、bridge/、site/、cordis.patch.yml;dsh --profile web --dump-config出现本包两层条目(只证明配置,不代表界面已加载);- Desktop 右侧栏「开始」引导页出现「无限画布」入口,打开后面板显示画布;
- 原生会话里调用
mcp__infinite-canvas__canvas_get_state全链路跑通(工具经桥下发 iframe 内执行器)。
已知限制
- 端口/包更新需重启 DSH Desktop 才生效;
- 17371 若被 start.bat 起的独立桥占用,插件会复用它(数据落在
~/.infinite-canvas而非 dshHomePath,站点能力探测通过即可); - iframe 内建 AI 助手(页面直连模型)仍存在,与 Harness 原生会话并存。
Comments
Loading…
From the same category
DeepSeek Harness plugin for Reactive Resume: bridges your resumes and job applications into a Harness session over MCP.
★ 41.7k
↓ 215/wk
MIT
Aug 24, 2026
dsh plugin --profile web add dsh-plugin-reactive-resumeby dsh-market
The plugin market inside DeepSeek Harness — browse, search, one-click install · DSH 可视化插件市场
★ 10.1k
↓ 361.7k/wk
MIT
TypeScript
Nov 1, 2026
dsh plugin --profile web add dshmarketby Tencent
Let AI agents use your real, logged-in browser without interrupting your work. CLI + extension for browser automation across any shell-capable AI agent.
★ 9.9k
↓ 12.3k/wk
MIT
TypeScript
Nov 1, 2026
dsh plugin --profile terminal add @wxg-prc-cpg/browser-skill-dsh-pluginby yjh051108
dsh-routing-suite — injector + router-standard kit: install the runtime injector first, then the task-aware reasoning-mode router preset (measured P1-P23).
★ 7k
MIT
JavaScript
Sep 18, 2026
dsh plugin --profile web add @dsh-external/dsh-super-injectorby superdesigndev
OpenRouter for agent tools. Join community here: https://discord.gg/6mQYYfFMAn
★ 7k
NOASSERTION
Python
Nov 2, 2026
dsh plugin --profile web add treg-dshby Q00
Agent OS: the agent gets smarter on its own. We just hold the line: Interview-gated, staged evaluation, budgeted evolution loop. MCP server, 14 runtimes: Claude Code, Codex CLI, Gemini CLI, OpenCode,
★ 6.3k
MIT
Python
Nov 1, 2026