Files
dsh-worktable/README.md
T

18 KiB
Raw Blame History

dsh-worktable 🖥️

📦 本仓库是内部补丁分发仓,不是上游源码仓

上游:https://github.com/Aisland-SJL/dsh-worktable | 本仓 = 上游 v0.5.1 + 桌面端状态持久化补丁(0.5.2-local.3)。 下面从「Screenshots」开始的全部内容是上游 README 原文;本次改动说明见 PATCH.md。

要不要装

你的环境 要不要装 原因
Slark 桌面端 要装 宿主每次启动都用随机端口(启动参数 --port 0),页面来源跟着变;工作台把项目存在 localStorage,浏览器按来源隔离 → 换端口就是空库,新建的工作台重启就没了
浏览器里跑的 dsh web(端口固定) 不用装 端口不变、来源不变,本来就不会丢

打这个补丁只治「重启丢数据」,不改变工作台的其他行为。

安装

当前版本 v0.5.2-local.3:

dsh plugin --profile web add "https://gitea.ququclean.com/xiaoqu/dsh-worktable/releases/download/v0.5.2-local.3/dsh-worktable.tgz"
  • 桌面端:先完全退出 Slark,再执行命令,装完手动重开;不要在宿主运行时安装。
  • --profile web 按你自己的 profile 名字改。
  • 资产 dsh-worktable.tgz,478216 字节,sha256: a2414c66282686648d6c1b8aecada2f1e420fb20afdf1d47715eaa9cc66fe3db (下载后可 Get-FileHash dsh-worktable.tgz -Algorithm SHA256 核对)
  • 声明兼容的 DSH 版本:0.2.0-rc.2 / 0.2.1-rc.3 / 0.2.1-rc.5 / 0.2.2-alpha.2。 宿主不在这个列表里时,安装会被兼容性检查直接拒绝并回滚。

装完怎么确认生效

  1. 重启后侧边栏能看到「工作台」;
  2. 新建一个项目/窗口,等两秒;
  3. 检查状态文件出现:<DSH_HOME>\worktable-state.json;
  4. 再完全退出重开 —— 项目还在,即生效。

<DSH_HOME> 一般是 %LOCALAPPDATA%\Slark\DSH\environments\<环境id>\profiles\<profile-id>。

覆盖范围(重要)

  • 覆盖:项目、布局、绑定、项目文件夹、视图与外观设置 → 镜像到 <DSH_HOME>/worktable-state.json
  • 不覆盖:图库媒体(照片仍存在 IndexedDB),换端口照样丢
  • 状态文件是宿主侧的,跨重启、跨端口稳定;localStorage 仍保留为第一落点
  • 不丢数据的两条保险(0.5.2-local.3 起):
    • 写入按 key 合并 —— 只改了外观时,projects 不会被半截写入抹掉
    • 启动时读不到宿主状态就整场不写 —— 宁可这次只在本地,也不拿空状态覆盖镜像

升级与回退

  • 装上 0.5.2-local.3 后,插件不会提示升级到 0.5.1。
  • 上游发布 0.5.2 及以上时插件会提示升级;一旦升级就回到没有补丁的状态,重启又会丢数据。新版本需要把补丁重新合并(改动只有三处,见 PATCH.md)。
  • 回退官方版:
    dsh plugin --profile web add "https://github.com/Aisland-SJL/dsh-worktable/releases/latest/download/dsh-worktable.tgz"
    
    同样要先完全退出宿主、装完手动重开。

English · 简体中文

An agent-project workbench for DeepSeek Harness — a sidebar app drawer that turns every project into dockable windows, plus a built-in control room that watches them all in real time.

Source version 0.5.1 adds exact DSH 0.2.1-rc.5 compatibility, neutral run-ended status and assistant-only previews, and fixes downgrade alerts caused by prerelease comparison and stale update caches. Publication status follows GitHub Releases. Existing sandbox/authentication boundaries remain; this is not a fix for the separate old-session HTTP 400 issue.

Compatibility is limited to the tested DSH versions 0.2.0-rc.2 / 0.2.1-rc.3 / 0.2.1-rc.5 on Windows; coverage varies by environment. The user confirmed that the downgrade alert disappeared and the page looked normal after installing 0.5.1-dev.3. This confirmation and earlier candidate GUI checks do not establish full final-package Desktop acceptance. DSH 0.1.x is outside this release’s support range. Version 0.5.1 retains the identity checks, page isolation, preview limits and layout fixes introduced in 0.5.0. Embedded storage, login, WebGL textures and automatic annotation text extraction can be affected. See compatibility and security for evidence and limits.

📸 Screenshots

Control room 🖥️ Control room — the built-in default project: a live card grid watching every project (working / needs you / run ended) with glassmorphism cards on a blueprint grid
Worktable sidebar 🧩 Worktable sidebar — the app drawer: projects, shortcuts and the pinned control-room entry
Split workspace 🪟 Our projects — every project opens as a dockable split workspace (resident apps like Travel Atlas included)

✨ Feature tour

🧩 Sidebar app drawer

  • Collects your self-hosted projects (and resident plugins like dsh-travelatlas) in one place
  • Rename / icon / reorder / hide each project; per-project folder; project ↔ conversation binding — opening a project switches the chat pane to its bound conversation
  • Collapse the sidebar and every project becomes a tappable square tile (icon only)

🪟 Dockable split workspace

  • Declarative layout presets (left column / top row / main grid + right chat pane)
  • Draggable dividers, per-pane tabs, per-layout width persistence
  • Built-in panes: file explorer, terminal, browser, animation site, custom window
  • Custom window: send a requirement to a new or existing conversation; the agent builds it and the result auto-mounts into the window (locked)

🖥️ Control room (built-in default project)

  • A pinned, undeletable first project — bind one management conversation on first open
  • A configurable card grid mirrors visible projects: working / needs you / run ended, with available runtime and the latest readable assistant reply. Run ended does not indicate task success.
  • Event-driven host snapshot mirroring; status monitoring does not call a model
  • Glassmorphism cards, dark / light / system theme, neon status glows and a rotating comet on busy cards

At a glance

🧩 Plugin type Cordis plugin — host routes + web client, pure additive (no official plugin replaced)
🪟 Workspace engine Self-built split engine rendered into the host shell overlay seat
💬 Chat pane Reuses the host conversation; navigation uses the host's new or legacy session API
📡 Status data Mirror of the host session runtime snapshots (subscription-driven)
💾 State Projects/layouts/bindings in localStorage; media in IndexedDB; file panes access configured project directories
🎨 UI TypeScript + React (host externals) + vanilla CSS, dark-first with light theme

Quick start (v0.5.1)

The current compatibility declaration lists only DSH 0.2.0-rc.2 / 0.2.1-rc.3 / 0.2.1-rc.5; DSH 0.1.x is not supported. The compatibility guide separates Windows Web checks from Desktop evidence. Back up important data and check other plugins before upgrading; use GitHub Releases to confirm that the requested version is published.

  1. Install (pick one):

    A · one-liner (recommended) — straight from the GitHub Release tarball, no Git needed:

    dsh plugin --profile web add "https://github.com/Aisland-SJL/dsh-worktable/releases/latest/download/dsh-worktable.tgz"
    

    B · local clone (for hacking on the source) — link: accepts a local absolute path only (no spaces in the path):

    git clone https://github.com/Aisland-SJL/dsh-worktable.git
    dsh plugin --profile web add "link:<absolute path of the cloned dsh-worktable directory>/01_content"
    # e.g. cloned into D:\tools → dsh plugin --profile web add "link:D:/tools/dsh-worktable/01_content"
    

    Either way the add command registers dsh-worktable in the profile bundle list (writes to ~/.dsh, may ask for authorization). If the dsh command is missing, use npx @deepseek-ai/dsh instead.

  2. Restart the DSH web process, refresh the GUI

  3. Open the control room: click the pinned 🖥️ control-room card → bind one conversation (join existing or create new) → you get the live card grid

  4. Create projects: sidebar + → pick a layout preset, set a project folder

Windows official Desktop

Save your tasks, fully exit the app from its menu/tray (closing the window is not enough), replace the installation-directory placeholder, run in PowerShell, then reopen the app manually:

& "<Desktop installation directory>\resources\runtime\cli\bin\dsh.cmd" plugin --profile desktop add "https://github.com/Aisland-SJL/dsh-worktable/releases/download/v0.5.1/dsh-worktable-0.5.1.tgz"

Use the Desktop-bundled CLI and desktop profile, not an unpinned npx or Web CLI. Preserve the actual DSH_HOME. Browser-local projects/layouts/media do not automatically sync between Web and Desktop origins, even when sessions share one data home.

Explicit Ungrouped in a custom-window task no longer silently joins a workspace. For a blank control-room conversation, the tested DSH 0.2 host disables the ungrouped composer: choose a group or join a usable existing conversation. The plugin explains this and blocks that blank creation, without changing your choice or sending an activation message. An empty existing-group selection cannot silently default either; legacy ungrouped creation stays unchanged.

v0.4.0 compatibility history

v0.4.0 adds Windows official Desktop support within the tested scope below. Web compatibility lists only DSH 0.1.1-rc.2 / 0.1.2-rc.1 / 0.2.0-rc.2; Desktop checks cover Windows + 0.2.0-rc.2. Desktop page checks and targeted regressions do not establish full final-package Desktop end-to-end acceptance. Older versions rely on prior page checks plus code regressions, not a newly repeated full GUI suite. Back up important data and check other plugins before upgrading; GitHub Release is the publication authority.


Architecture

One package ships the host Cordis plugin and the web client:

  • host: owner-checked file/Git/write/workspace routes and terminal WebSocket; public health and random read-only preview capabilities are explicit exceptions. See the route and lifecycle reference.
  • client: injected into the sidebar and the shell overlay via the slot protocol; the split engine, tab model, drag/drop and persistence are self-built
  • control room: reads the host session list snapshot (running / pending / completed, jobs, subagent catalogs) — an event-driven mirror, no model involvement
  • window tasks: custom tasks register project/pane/binding ownership and write a dedicated result under .dsh-worktable/project-<project ID>/; sharing a folder does not make a new project inherit another project's windows

Development & testing

cd 01_content
npm install
npm run build     # lib/index.js + lib/client.js
node --check lib/index.js
  • Build must run inside 01_content — building from the repo root writes lib/ to the wrong place while the host keeps loading the old bundle
  • The client bundle keeps the window.__ModuleLoader__.load handshake; react and @deepseek-ai/* stay external
  • Historical diagnostic scripts such as 04_test/functional-diag.cjs and browser probes contain local assumptions; inspect their paths/ports before running and use an isolated profile.
  • Installed-artifact checks: 04_test/anchor-dom.test.mjs (14 DOM scenarios, including fractional geometry), 04_test/sidebar-popup.test.mjs (expanded/collapsed sidebar popups), 04_test/split-margin.test.mjs (5 real Chromium cases), and 04_test/server-home.test.mjs (3 groups). Use Edge/Chrome or DSH_TEST_CHROMIUM for the browser check.
  • Release packaging uses npm run pack only. It also runs 139 source regressions, independent installation and client-factory checks. npm run test:sidebar runs the popup checks alone; npm run test:widget covers 26 ownership/session/late-result cases. After an approved release, run npm run verify:remote -- --expect-sha <final SHA> <release tag> and check latest separately.

Troubleshooting

Q: After a DeepSeek Harness update, the worktable fails to open / the service fails to start?

Projects, bindings and layouts live in browser localStorage; media lives in IndexedDB, and project files remain in your project directories. Back up important data before changing your installation, and keep the same browser origin when you want to retain its worktable state.

Case A: Harness works, only the worktable needs updating

  • Open the worktable "Settings" → click "Check now"; when the amber update badge appears next to the worktable title, click it and choose "Copy AI prompt" to hand the upgrade to your AI assistant;

  • For Web, re-run the install command (installs the latest published release), then restart dsh web and refresh. Desktop users must follow the Desktop instructions above:

    dsh plugin --profile web add "https://github.com/Aisland-SJL/dsh-worktable/releases/latest/download/dsh-worktable.tgz"
    

Case B: Harness itself is down (service fails to start / "Failed to load plugins")

  • Record the actual DSH version, plugin version, profile/data-home location and the first complete error. Restart the process fully before checking again.
  • Missing exports or failed imports require checking the named plugin against the installed host version. A newer host can change APIs; upgrading everything blindly is not a diagnosis.
  • An ancestor node_modules junction was a local workaround for a particular old link: loader issue. Do not create one as a general fix; remove an existing workaround only after verifying that the installed plugins no longer depend on it, preserving its target directory.
  • A model request returning HTTP 400 is a separate request problem. This plugin package does not include host-level repairs for it.

Point-to-annotate 📌

Every window title bar has a small annotate button (chat-bubble with a plus) next to the collapse toggle. Click it, your cursor becomes a blue speech bubble — click anywhere in a window to drop an input box, type what you want changed ("make this text bigger"), and hit ✓. The message is packaged (window number + coordinates + the clicked element + your request), filled into the chat input without sending — press Enter when ready, and the agent works through the annotation protocol (verify with a screenshot or the window, or ask one targeted question instead of guessing).

  • Point and speak — no verbal location description needed.
  • The payload is self-explaining: any agent, in any conversation, can pick it up.
  • Window-level annotation remains available; sandboxed pages cannot expose their internal text/DOM to the host. Describe the target or provide a screenshot when extraction is unavailable.
  • Same family of polish: the console gains a 5th dock button Changelog (version notes / check for updates / copy-upgrade command) and ships two default background presets (aurora gradient + coastal view) in the custom background library.

Known limits

  • Sandboxing can break embedded storage, login and WebGL/Cesium textures. StarMap’s moon-texture issue was fixed separately in that project; the worktable package does not contain this project-specific fix. A working new project does not establish compatibility for every existing page.

  • Platform: see the release scope above and compatibility guide. Earlier candidate Desktop checks and the user's 0.5.1-dev.3 confirmation cover the recorded interactions only; they do not establish complete formal-package Desktop acceptance. macOS has not been tested on real hardware.

  • State lives in the browser (localStorage and IndexedDB) — projects, bindings, views and media do not sync across machines

  • The terminal pane is a plain PowerShell host on Windows (no PTY feature parity with the native terminal app)

  • Auto-mount requires a registered custom task and its matching v2 result file. Old saved windows remain; unowned root-level widget-result.json files are not imported. To re-enable an old conversation, send one task via the target window's Custom → Send to conversation action. Later edits in that conversation may reuse the binding. Manually closing/replacing content revokes it; existing mistakenly mounted tabs must be closed once. Shared-folder projects can still overwrite the same artifact if explicitly told to write the same physical file.

  • The control room monitors projects that are bound to a conversation; unbound projects show as idle


Privacy

The plugin does not add an analytics service. Update checks use a read-only GitHub Releases request and can be disabled in Settings. It also communicates with host APIs/WebSockets, loads user-selected pages, and provides an interactive terminal whose commands can access files and the network. Preferences and media use browser storage. See the permissions and external-services disclosure for file access, inherited terminal environment and other limits.


License

MIT

  • dsh-reminder — cross-window completion & approval notifications
  • dsh-usage — persistent balance/usage dock