dsh-edge 0.31.0 → 0.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.i18n.yaml CHANGED
@@ -2,5 +2,5 @@
2
2
  # last confirmed-consistent state. Both languages carry equal authority.
3
3
  # After editing either side, update both and re-record every pair with:
4
4
  # pnpm run doc-pairs -- --write
5
- README.md: eff3f86f1ae2447ab25e6fac213795044b7c6fe9
6
- README.zh.md: a5d1544d578b0bccb304ae6573aa81f5a7228da3
5
+ README.md: 562126af9fd42b9fb4fb1e7ee448c4adda1b01dc
6
+ README.zh.md: e7cb898297a3d893342ee2c9dddef01464b67ba4
package/README.md CHANGED
@@ -153,7 +153,7 @@ This reference separates code that runs natively in Workers, code adapted at an
153
153
  | Directory picker | `ctx.directoryPicker` seam with the `-native` OS chooser or the `-browse` filesystem backend, chosen at boot by `dsh-host-directory-picker-auto`, plus the Web browse dialog | Reused with an Edge browse backend | Install the upstream seam and pin the upstream `dsh-client-ui-directory-picker-browse` dialog in the Web roster; Edge answers the `browse` capability from the `/workspace` Computer VFS one level per call, rooted at `/workspace` with the upstream hidden, bound, and failure vocabulary, so the upstream `DirectoryPickerController` serves `directoryPicker/list` and `createDirectory` and refuses the native `pick`. |
154
154
  | Conversation file links | `session/openWorkspacePath` hands a clicked path to the Host desktop opener through `dsh-native-command`; `session/canOpenWorkspacePath` gates the affordance | Adapted at the upstream `SessionControllerInternals` seam plus a Web download fallback | Compose `SessionController` with Edge internals so the native probe answers false and an open attempt fails with a readable reason instead of a `child_process` error. The V3 Web client opens file links in its right-sidebar preview. Edge composes the upstream `workspaceFiles` controller over request-scoped VFS reads, including bounded text/byte windows and metadata subscriptions. The legacy `ctx.remote.session.openWorkspacePath` fallback and owner-authenticated `GET /api/workspace/file` download remain available. |
155
155
  | Existing Web UI | Runtime-loaded shell and `dsh.client` plugin graph | Reused with generic composition fallbacks | Assemble the upstream shell and supported upstream client bundles as Worker assets. Shared slot-occupancy rules hide actions whose provider is absent; Cloudflare serves ordinary assets directly, while `/`, `/login`, and `/api/*` enter the Worker for owner access control. The assembled asset policy prevents every direct or SPA-fallback shell alias from being framed. |
156
- | Other tools | Web Search, filesystem editor tools, MCP, skills, workflows, jobs, and subagents | Search, file, glob/grep, goal, todo, skill, subagent, and MCP tools ported; workflow and run_code ported for the isolated build | Reuse upstream DeepSeek Web Search with its 30-second tool-call timeout. The web search card's "Use the new Web Search API" switch (off by default) moves search and fetch to the DeepSeek Search and Fetch APIs (`dsh-web-deepseek-api`): DeepSeek fetches the page, so the Worker reads no third-party page itself, and no auxiliary model request is made. They use the DeepSeek API key the Models page stores (the key name may not be another Edge feature's credential, and a literal key is refused in settings), their API base must be an HTTP(S) URL without credentials, a query, or a fragment, a redirect is refused, and the account sign-in route is not offered. The Search and Fetch APIs may bill separately from model tokens. The upstream `workflow` tool is offered only by the Dynamic Worker runtime (the isolated, Paid-plan build); the Direct build does not register it. Each run loads its script into its own Dynamic Worker with no outbound network and a 30-second Worker Loader `cpuMs` limit (enforced by the Cloudflare runtime, not by local development), because workerd forbids in-process `eval`/`new Function`/`node:vm`; `agent()`, `phase()`, and `log()` cross an RPC bridge to the Durable Object, which enforces the caps: at most 4 children run at once (below the Workers six-connection limit) and one run starts at most 100 children to bound child-session row writes. The same runtime offers upstream's `ralph` tool (`dsh-tool-ralph`), which runs a foreground loop of fresh `subagent` children toward one objective, each round handing only a bounded report to the next, until a child reports completion or a blocker. Like upstream, its prompt reserves it for an explicit request. It runs on the workflow engine, so a run is capped at 100 rounds (upstream defaults to 256), and the PTC mode preset does not offer it, as it does not offer `workflow`. The upstream `run_code` tool (`dsh-tools` PTC mode) is offered by the same runtime, but only to sessions started in the upstream `ptc` agent preset (PTC mode), which isolated deployments offer under its upstream id so the Web client shows its built-in bilingual name. That preset presents every tool through the generated SDK and, as upstream does, does not offer `workflow`, because `run_code` is its only orchestration surface. The default upstream `standard` preset (Standard mode; sessions recorded under the earlier `dsh-edge` id read as `standard`) presents tools natively and keeps `workflow`. As upstream, Settings → Agent presets writes `selectedDefault` in the `agent-preset-registry` settings namespace to choose which offered preset new sessions start on; a default saved by an earlier release under `agent-presets` moves there on start. In PTC mode, each program is type-stripped with sucrase and runs in its own Dynamic Worker with a 30-second `cpuMs` limit and no outbound network; its `tools.*` calls cross an RPC bridge where the Durable Object caps them at 200 per run (each is a nested tool dispatch with its own session events), 256 KiB of arguments, and 2 MiB per result, and nested calls stay approval-gated. `run_code`'s description tells the model this environment and these limits, as upstream's Node runtime describes its own. File tools (read/write/edit/read_image) adapted via `EdgeFileSystem` backed by Computer VFS. `glob` and `grep` keep upstream `dsh-tool-fs-search`'s names, schemas, result text, search cards, and spill of results over 100 paths or 250 matches, but Workers cannot spawn its ripgrep binary, so Edge runs them over the VFS: both skip VCS metadata; `grep` also skips binary files and files over 4 MiB and, like ripgrep's defaults that upstream's `grep` keeps, hidden entries and those `.rgignore`, `.ignore`, and (inside a git repository) `.gitignore` files exclude, without entering an ignored directory, so a large ignored `node_modules` costs one entry (as ripgrep's `--glob`, a file `include` matches is searched even when ignored or hidden); `glob`, like upstream's (`--no-ignore --hidden`), lists hidden and ignored files. Ignore globs match by character, where ripgrep matches `?` and classes by byte on Unix, so a rule such as `?` also matches a one-character non-ASCII name. Global gitignore files and `.git/info/exclude` are not read, and an ignore file over 256 KiB, or one that would bring a search past 5,000 compiled matchers (one per rule, or per alternative of its `{a,b}` groups, each kept in memory for the walk), is not applied (the budget is taken in walk order, so an ignore file that comes after it is skipped even when its kind would outrank an earlier `.gitignore`, which ripgrep would honor), and a walk that would test ignore patterns more than 5,000,000 times fails like one past its entry cap. `grep` patterns use RE2 syntax (no lookaround or backreferences) through re2js, which matches in linear time, so a pathological pattern cannot stall the Durable Object. A search walks at most 20,000 entries, and `grep` collects at most 20,000 matching lines or 20 MB of their text; past a cap it fails and asks for a narrower path or pattern. Glob syntax that ripgrep 15 rejects (an unclosed `[` or `{`, a reversed range such as `[z-a]`, a dangling `\`) fails as an invalid pattern; nested alternates such as `a{b,{c,d}}` work. A search checks for cancellation before and after each directory listing, so the 30-second tool timeout stops a long walk. As upstream, the file observation policy (`dsh-fs-observation-policy`) guards them: `write` may not overwrite a file the session has not read, `edit` requires a prior read, and a file changed since it was read (by `bash` or the Linux container, for example) fails as stale until it is read again; a restarted session starts with no reads recorded. Goal tools (`ToolGoal`) composed directly with `GoalService` as upstream cordis plugins. Subagents follow upstream's standard composition: `subagent` starts a fresh child and `subagent_fork` one that starts from the parent's completed turns (`dsh-subagent-spawn-in-process`, `dsh-subagent-fork-in-process`). Both run the child in the background by default as a continuable subagent, and the parent continues it with `send_message`, stops its current turn with `interrupt_agent`, and finds it with `list_agents` (`dsh-tool-subagent-control`). A child keeps working after the parent's turn ends, and its closing message wakes the parent for another turn; as upstream, Stop on the parent does not stop running children. A child that is not running resumes from storage when messaged, also after a restart. The upstream `todo_write` tool (`dsh-tool-todo`) keeps the session's task list, with several tasks allowed in progress as in upstream's composition; its `todos` projection drives the Web client's todo dock. The upstream `present` tool (`dsh-tool-present`) declares workspace files as a turn's deliverables, which the Web client shows as file cards with a sidebar preview; the Edge has no desktop, so it answers the cards' Host check (`/api/present.host`) as unavailable and they offer no native opening. As upstream, `dsh-agent-instructions` loads `AGENTS.md` and `CLAUDE.md` (and their `.local.md` overlays) from the project root (the nearest ancestor directory containing `.git`, or else the session's working directory) down to the working directory, through the workspace VFS, into a 64 KiB baseline message before the first request; a `read`, `write`, or `edit` that reaches a deeper directory adds its instructions to the next request. Workers have no home directory, so the user-global files are `/.dsh/AGENTS.md` and the shared agent root's `/.agents/AGENTS.md` (the Edge sets `DSH_HOME` and `DSH_AGENTS_HOME` itself, because the plugin reads its homes only from those variables). The `working_directory` tool (`dsh-tool-working-directory`) reads the session's working directory or changes it to an existing directory; the change is a durable `working-directory/change` event that a downgrade to a release before this one cannot read, and the Edge always offers `/workspace` as an existing directory. Skill tool via `SkillRegistry`. As upstream `dsh-skill-filesystem`, skills are `<name>/SKILL.md` or `<name>.md` files with `name` and `description` frontmatter under the project's `.dsh/skills` and `.agents/skills` and the user roots `/.dsh/skills` and `/.agents/skills` (Workers have no home directory), read through the workspace VFS, up to 100 entries per root and 64 KiB per skill file; an added or edited skill applies from the next turn, and the `/` menu of a session opened after the change lists it; as upstream, the Web client keeps an open session's `/` list until the page reloads. Upstream's session skill catalog (`skills/list`) answers that menu, with each skill's file path; Workers have no file watches, so the Edge rechecks the session's skill roots before it lists, and gives it the workspace's file metadata, which a resident session's working-directory check reads outside a turn. Skills stored through the owner API `GET/PUT/DELETE /api/skills` (`EdgeSkillProvider`, DO KV) rank below them. MCP runs on the Edge's own client (`edge-mcp-client.ts`; upstream `dsh-mcp-client` is not mounted): Streamable HTTP only (stdio is unavailable on Workers) and one connection per call. A server whose probe reports the `resources` capability is registered with upstream `dsh-mcp-resources`, whose `list_mcp_resources`, `list_mcp_resource_templates`, and `read_mcp_resource` tools exist while one such server is configured (probe an existing server again to record the capability); a server without the tools capability probes as an empty tool catalog. Resource calls follow the connector's tool permission as its read-only tools do, so they ask first only when it asks before every call. Each resources response body is limited to 1 MiB and fails while it streams in past that, because the SDK parses a response whole and a read result, binary data included, is kept in the session log; a list without a cursor follows at most 10 pages or 1 MiB of entries and returns the cursor where it stopped. As upstream, binary contents reach the model only as a description. Configure servers in Settings → DSH Edge → MCP Servers; tools appear as `mcp__<serverName>__<tool>`. Add the remaining tools individually against Worker-compatible capabilities; do not advertise unavailable host behavior. |
156
+ | Other tools | Web Search, filesystem editor tools, MCP, skills, workflows, jobs, and subagents | Search, file, glob/grep, goal, todo, skill, subagent, and MCP tools ported; workflow and run_code ported for the isolated build | Reuse upstream DeepSeek Web Search with its 30-second tool-call timeout. The web search card's "Use the new Web Search API" switch (off by default) moves search and fetch to the DeepSeek Search and Fetch APIs (`dsh-web-deepseek-api`): DeepSeek fetches the page, so the Worker reads no third-party page itself, and no auxiliary model request is made. They use the DeepSeek API key the Models page stores (the key name may not be another Edge feature's credential, and a literal key is refused in settings), their API base must be an HTTP(S) URL without credentials, a query, or a fragment, a redirect is refused, and the account sign-in route is not offered. The Search and Fetch APIs may bill separately from model tokens. The upstream `workflow` tool is offered only by the Dynamic Worker runtime (the isolated, Paid-plan build); the Direct build does not register it. Each run loads its script into its own Dynamic Worker with no outbound network and a 30-second Worker Loader `cpuMs` limit (enforced by the Cloudflare runtime, not by local development), because workerd forbids in-process `eval`/`new Function`/`node:vm`; `agent()`, `phase()`, and `log()` cross an RPC bridge to the Durable Object, which enforces the caps: at most 4 children run at once (below the Workers six-connection limit) and one run starts at most 100 children to bound child-session row writes. The same runtime offers upstream's `ralph` tool (`dsh-tool-ralph`), which runs a foreground loop of fresh `subagent` children toward one objective, each round handing only a bounded report to the next, until a child reports completion or a blocker. Like upstream, its prompt reserves it for an explicit request. It runs on the workflow engine, so a run is capped at 100 rounds (upstream defaults to 256), and the PTC mode preset does not offer it, as it does not offer `workflow`. The upstream `run_code` tool (`dsh-tools` PTC mode) is offered by the same runtime, but only to sessions started in the upstream `ptc` agent preset (PTC mode), which isolated deployments offer under its upstream id so the Web client shows its built-in bilingual name. That preset presents every tool through the generated SDK and, as upstream does, does not offer `workflow`, because `run_code` is its only orchestration surface. The default upstream `standard` preset (Standard mode; sessions recorded under the earlier `dsh-edge` id read as `standard`) presents tools natively and keeps `workflow`. As upstream, Settings → Agent presets writes `selectedDefault` in the `agent-preset-registry` settings namespace to choose which offered preset new sessions start on; a default saved by an earlier release under `agent-presets` moves there on start. In PTC mode, each program is type-stripped with sucrase and runs in its own Dynamic Worker with a 30-second `cpuMs` limit and no outbound network; its `tools.*` calls cross an RPC bridge where the Durable Object caps them at 200 per run (each is a nested tool dispatch with its own session events), 256 KiB of arguments, and 2 MiB per result, and nested calls stay approval-gated. `run_code`'s description tells the model this environment and these limits, as upstream's Node runtime describes its own. File tools (read/write/edit/read_image) adapted via `EdgeFileSystem` backed by Computer VFS. `glob` and `grep` keep upstream `dsh-tool-fs-search`'s names, schemas, result text, search cards, and spill of results over 100 paths or 250 matches, but Workers cannot spawn its ripgrep binary, so Edge runs them over the VFS: both skip VCS metadata; `grep` also skips binary files and files over 4 MiB and, like ripgrep's defaults that upstream's `grep` keeps, hidden entries and those `.rgignore`, `.ignore`, and (inside a git repository) `.gitignore` files exclude, without entering an ignored directory, so a large ignored `node_modules` costs one entry (as ripgrep's `--glob`, a file `include` matches is searched even when ignored or hidden); `glob`, like upstream's (`--no-ignore --hidden`), lists hidden and ignored files. Ignore globs match by character, where ripgrep matches `?` and classes by byte on Unix, so a rule such as `?` also matches a one-character non-ASCII name. Global gitignore files and `.git/info/exclude` are not read, and an ignore file over 256 KiB, or one that would bring a search past 5,000 compiled matchers (one per rule, or per alternative of its `{a,b}` groups, each kept in memory for the walk), is not applied (the budget is taken in walk order, so an ignore file that comes after it is skipped even when its kind would outrank an earlier `.gitignore`, which ripgrep would honor), and a walk that would test ignore patterns more than 5,000,000 times fails like one past its entry cap. `grep` patterns use RE2 syntax (no lookaround or backreferences) through re2js, which matches in linear time, so a pathological pattern cannot stall the Durable Object. A search walks at most 20,000 entries, and `grep` collects at most 20,000 matching lines or 20 MB of their text; past a cap it fails and asks for a narrower path or pattern. Glob syntax that ripgrep 15 rejects (an unclosed `[` or `{`, a reversed range such as `[z-a]`, a dangling `\`) fails as an invalid pattern; nested alternates such as `a{b,{c,d}}` work. A search checks for cancellation before and after each directory listing, so the 30-second tool timeout stops a long walk. As upstream, the file observation policy (`dsh-fs-observation-policy`) guards them: `write` may not overwrite a file the session has not read, `edit` requires a prior read, and a file changed since it was read (by `bash` or the Linux container, for example) fails as stale until it is read again; a restarted session starts with no reads recorded. Goal tools (`ToolGoal`) composed directly with `GoalService` as upstream cordis plugins. Subagents follow upstream's standard composition: `subagent` starts a fresh child and `subagent_fork` one that starts from the parent's completed turns (`dsh-subagent-spawn-in-process`, `dsh-subagent-fork-in-process`). Both run the child in the background by default as a continuable subagent, and the parent continues it with `send_message`, stops its current turn with `interrupt_agent`, and finds it with `list_agents` (`dsh-tool-subagent-control`). A child keeps working after the parent's turn ends, and its closing message wakes the parent for another turn; as upstream, Stop on the parent does not stop running children. A child that is not running resumes from storage when messaged, also after a restart. The upstream `todo_write` tool (`dsh-tool-todo`) keeps the session's task list, with several tasks allowed in progress as in upstream's composition; its `todos` projection drives the Web client's todo dock. The upstream `present` tool (`dsh-tool-present`) declares workspace files as a turn's deliverables, which the Web client shows as file cards with a sidebar preview. Upstream's deliverables host half (`dsh-client-ui-deliverables`) is mounted as is: it serves the cards' `/api/present.*` and `/api/changes.*` routes and adds its guidance on linking files and using `present` to the system prompt; the Edge has no desktop, so the cards offer no native opening. Each top-level turn's `write` and `edit` calls produce the changed-files card, with per-file line counts and a turn-start and turn-end comparison. This is upstream `dsh-workspace-changes` in its documented no-git mode (`edge-workspace-changes.ts`): Workers run no git, so files changed only through `bash` or in the Linux container are not listed, and subagent sessions are not recorded. Each edited file is copied whole, before its first edit in a turn and again at turn end, into the workspace VFS under `/.dsh/workspace-changes`, named by the SHA-1 of its bytes, so a turn holds at most two file contents in memory; as upstream, a file over 2 MiB is listed without counts; unlike upstream, so is a file with more than 20,000 lines on either side, because a comparison allocates per line (a million short lines peaked at 265 MiB of heap, past a Durable Object's 128 MiB); a file holding a NUL byte is listed as binary, a rewrite that leaves the content unchanged is not listed, a file that differs only in its final newline is listed with no changed lines, a summary carries at most 500 files, and a comparison that runs past 100 ms is shown as whole-file replacement. Summaries live with their resident session, as upstream's live with their Session; after a Durable Object restart the earlier turns have no card, and the copies of the previous activation are removed before the next capture. As upstream, `dsh-agent-instructions` loads `AGENTS.md` and `CLAUDE.md` (and their `.local.md` overlays) from the project root (the nearest ancestor directory containing `.git`, or else the session's working directory) down to the working directory, through the workspace VFS, into a 64 KiB baseline message before the first request; a `read`, `write`, or `edit` that reaches a deeper directory adds its instructions to the next request. Workers have no home directory, so the user-global files are `/.dsh/AGENTS.md` and the shared agent root's `/.agents/AGENTS.md` (the Edge sets `DSH_HOME` and `DSH_AGENTS_HOME` itself, because the plugin reads its homes only from those variables). The `working_directory` tool (`dsh-tool-working-directory`) reads the session's working directory or changes it to an existing directory; the change is a durable `working-directory/change` event that a downgrade to a release before this one cannot read, and the Edge always offers `/workspace` as an existing directory. Skill tool via `SkillRegistry`. As upstream `dsh-skill-filesystem`, skills are `<name>/SKILL.md` or `<name>.md` files with `name` and `description` frontmatter under the project's `.dsh/skills` and `.agents/skills` and the user roots `/.dsh/skills` and `/.agents/skills` (Workers have no home directory), read through the workspace VFS, up to 100 entries per root and 64 KiB per skill file; an added or edited skill applies from the next turn, and the `/` menu of a session opened after the change lists it; as upstream, the Web client keeps an open session's `/` list until the page reloads. Upstream's session skill catalog (`skills/list`) answers that menu, with each skill's file path; Workers have no file watches, so the Edge rechecks the session's skill roots before it lists, and gives it the workspace's file metadata, which a resident session's working-directory check reads outside a turn. Skills stored through the owner API `GET/PUT/DELETE /api/skills` (`EdgeSkillProvider`, DO KV) rank below them. MCP runs on the Edge's own client (`edge-mcp-client.ts`; upstream `dsh-mcp-client` is not mounted): Streamable HTTP only (stdio is unavailable on Workers) and one connection per call. A server whose probe reports the `resources` capability is registered with upstream `dsh-mcp-resources`, whose `list_mcp_resources`, `list_mcp_resource_templates`, and `read_mcp_resource` tools exist while one such server is configured (probe an existing server again to record the capability); a server without the tools capability probes as an empty tool catalog. Resource calls follow the connector's tool permission as its read-only tools do, so they ask first only when it asks before every call. Each resources response body is limited to 1 MiB and fails while it streams in past that, because the SDK parses a response whole and a read result, binary data included, is kept in the session log; a list without a cursor follows at most 10 pages or 1 MiB of entries and returns the cursor where it stopped. As upstream, binary contents reach the model only as a description. Configure servers in Settings → DSH Edge → MCP Servers; tools appear as `mcp__<serverName>__<tool>`. Add the remaining tools individually against Worker-compatible capabilities; do not advertise unavailable host behavior. |
157
157
  | Attachments | Local attachment storage, upstream image references, composer, gallery, lightbox, and provider conversion | Adapted at the native storage seam | Reuse upstream `AttachmentStore`, admission, protocol, authorization, UI, and DeepSeek conversion unchanged. Store immutable image bytes (PNG or JPEG, or WebP when image optimization keeps transparency) under their SHA-256 identities in a 64 MiB, 512 KiB-chunked DO backend for new and pre-attachment deployments, or in private R2 for deployments already pinned to it; session events retain only upstream refs. The first backend is pinned per owner instance so claiming or upgrading cannot strand existing references. Images are PNG or JPEG, at most 3.5 MiB each and 4 per message. Other files stream through upstream's upload route and are kept verbatim, at most 64 MiB each (an upload must declare its length, so a larger one is refused before any byte is stored), in the workspace VFS at upstream's `files/<prefix>/<digest>/<name>` layout below `/.dsh/attachments/v1`, the path the model is told; its file tools and the lightweight shell read them there, but commands routed to a Linux Container do not see them. |
158
158
  | Goal tracking | `GoalService` with create/edit/pause/resume/complete/clear mutations and GoalBar UI | Reused | Install upstream `GoalService` and `ToolGoal` as cordis plugins (direct composition). Browser GoalBar mutations route through `TypertGatewayService` at `/api/goals/<method>`. `SessionProjectionCache` persists goal state across DO restart. The upstream `/goal` command (`dsh-command-goal`) shows, sets, edits, pauses, resumes, or clears the session's goal. Every goal round runs inside an Edge turn, with its workspace, deadline, and live events: a turn stays open while upstream's round driver queues the next round, and a call that arms a goal outside a turn (`/goal`, GoalBar Resume) runs inside a new one. |
159
159
  | Context compaction | Token metering, automatic compaction, and session title generation | Reused | Install upstream cordis plugins directly. Context compaction, token metering, tool-result pruning, and automatic session title generation run unchanged. Upstream image offload (`dsh-compaction-image-offload`) keeps a turn going when its images exceed the route's budget (600 images per request by default): it marks the oldest occurrences offloaded with an `image/offload` session event and the request is retried. |
package/README.zh.md CHANGED
@@ -153,7 +153,7 @@ curl -b /tmp/dsh-edge-cookie -N -X POST -H 'content-type: application/json' \
153
153
  | Directory picker | `ctx.directoryPicker` seam,由 `dsh-host-directory-picker-auto` 在启动时选择 `-native` OS 选择器或 `-browse` 文件系统 backend,加 Web browse 对话框 | 复用并提供 Edge browse backend | 安装上游 seam,并把上游 `dsh-client-ui-directory-picker-browse` 对话框固定进 Web roster;Edge 从 `/workspace` Computer VFS 按每次一层回答 `browse` capability,以 `/workspace` 为根并沿用上游的 hidden、bound 与失败词汇,因此上游 `DirectoryPickerController` 提供 `directoryPicker/list` 与 `createDirectory`,并拒绝原生 `pick`。 |
154
154
  | 对话文件链接 | `session/openWorkspacePath` 经 `dsh-native-command` 把点击的路径交给宿主桌面打开器;`session/canOpenWorkspacePath` 决定是否展示该入口 | 在上游 `SessionControllerInternals` seam 适配,加 Web 端下载回退 | 用 Edge internals 组合 `SessionController`,让原生探测返回 false、打开尝试以可读原因失败而不是 `child_process` 错误。V3 Web 客户端在右侧栏预览文件链接。Edge 将上游 `workspaceFiles` 控制器接入请求作用域内的 VFS 读取,支持有界文本/字节分页和元数据订阅。旧版 `ctx.remote.session.openWorkspacePath` 回退以及经 owner 鉴权的 `GET /api/workspace/file` 下载仍然可用。 |
155
155
  | Existing Web UI | 运行时加载的 shell 和 `dsh.client` 插件 graph | 复用并采用通用 composition fallback | 把上游 shell 和受支持的上游客户端包组装成 Worker 静态资源;共享的 slot occupancy 规则会隐藏缺少 provider 的 action。Cloudflare 直接提供普通资源,`/`、`/login` 与 `/api/*` 则进入 Worker 执行 owner access control。组装后的 asset policy 会阻止所有直接或 SPA-fallback shell alias 被嵌入 frame。 |
156
- | Other tools | Web Search、filesystem editor tools、MCP、skills、workflows、jobs 和 subagents | Search、文件、glob/grep、goal、todo、skill、subagent 和 MCP 工具已移植;workflow 与 run_code 已在 isolated 构建中移植 | 复用上游 DeepSeek Web Search 及其 30 秒 tool-call timeout。网页搜索卡片里的“Use the new Web Search API”开关(默认关闭)会把搜索和抓取切换到 DeepSeek Search and Fetch API(`dsh-web-deepseek-api`):页面由 DeepSeek 抓取,Worker 自己不读取任何第三方页面,也不产生辅助模型请求。它们使用 Models 页面保存的 DeepSeek API key(key 名称不能是其他 Edge 功能的凭据,设置里不接受明文 key),API 地址必须是不含凭据、查询或片段的 HTTP(S) URL,重定向会被拒绝,也不提供账号登录路径。Search and Fetch API 可能与模型 token 分开计费。上游 `workflow` 工具仅由 Dynamic Worker 运行时提供(isolated、Paid 计划构建);Direct 构建不注册该工具。由于 workerd 禁止在进程内使用 `eval`/`new Function`/`node:vm`,每次运行都会把脚本加载到独立的 Dynamic Worker 中执行,该 Worker 无出站网络,并受 30 秒 Worker Loader `cpuMs` 上限约束(由 Cloudflare 运行时强制执行,本地开发环境不执行);`agent()`、`phase()`、`log()` 经 RPC 桥回到 Durable Object,由其执行各项上限:同时最多运行 4 个子 agent(低于 Workers 六连接上限),单次运行最多启动 100 个子 agent,以限制子会话的行写入。同一运行时还提供上游的 `ralph` 工具(`dsh-tool-ralph`):它在前台循环启动全新的 `subagent` 子 agent,朝同一个目标推进,每一轮只把一份有大小上限的报告交给下一轮,直到某个子 agent 报告完成或遇到阻碍。与上游一样,它的提示词要求只在用户明确要求时使用。它运行在 workflow 引擎上,因此一次最多 100 轮(上游默认 256 轮);与 `workflow` 一样,PTC 模式预设不提供它。上游 `run_code` 工具(`dsh-tools` PTC 模式)由同一运行时提供,但只提供给以上游 `ptc` agent 预设(PTC 模式)开始的会话。isolated 部署沿用上游 id 提供该预设,因此 Web 客户端显示其内置的双语名称。该预设通过生成的 SDK 呈现全部工具,并与上游一样不提供 `workflow`,因为 `run_code` 是它唯一的编排方式。默认使用上游的 `standard` 预设(标准模式;以早先 `dsh-edge` id 记录的会话按 `standard` 读取),以原生方式呈现工具,并保留 `workflow`。与上游一致,Settings → Agent presets 写入 `agent-preset-registry` 设置命名空间的 `selectedDefault`,从可用预设中选择新会话的起始预设;早期版本保存在 `agent-presets` 下的默认值会在启动时迁移过来。在 PTC 模式下,每个程序先用 sucrase 去除类型,再在独立 Dynamic Worker 中运行,受 30 秒 `cpuMs` 上限约束且无出站网络;其中的 `tools.*` 调用经 RPC 桥回到 Durable Object,由其限制为每次运行最多 200 次(每次都是一次写入 session 事件的嵌套工具派发)、参数最多 256 KiB、单次结果最多 2 MiB,嵌套调用仍走审批。与上游 Node 运行时描述自身环境一样,`run_code` 的描述会把这个环境和这些上限告诉模型。文件工具(read/write/edit/read_image)通过 `EdgeFileSystem` 适配 Computer VFS。`glob` 和 `grep` 保持上游 `dsh-tool-fs-search` 的工具名、参数结构、结果文本、搜索卡片,以及超过 100 条路径或 250 条匹配时把完整结果另存为文件;但 Workers 无法启动它所需的 ripgrep 程序,所以 Edge 在 VFS 上运行它们:两者都跳过版本控制元数据目录;`grep` 还跳过二进制文件和超过 4 MiB 的文件,并与上游 `grep` 沿用的 ripgrep 默认行为一致,跳过隐藏条目,以及 `.rgignore`、`.ignore` 和(在 git 仓库内的)`.gitignore` 文件排除的条目,且不进入被忽略的目录,因此一个很大的被忽略的 `node_modules` 只占一个条目(与 ripgrep 的 `--glob` 一致,`include` 匹配的文件即使被忽略或隐藏也会被搜索);`glob` 与上游一致(`--no-ignore --hidden`),会列出隐藏和被忽略的文件。ignore 规则按字符匹配,而 ripgrep 在 Unix 上按字节匹配 `?` 和字符类,所以像 `?` 这样的规则也会匹配只有一个非 ASCII 字符的文件名。不读取全局 gitignore 文件和 `.git/info/exclude`,超过 256 KiB 的 ignore 文件,或会让一次搜索编译的匹配器超过 5,000 个(每条规则一个,带 `{a,b}` 分组的规则按展开后的每个分支计,遍历期间都保留在内存中)的 ignore 文件不生效(预算按遍历顺序分配,所以预算用完后遇到的 ignore 文件即使优先级高于先前的 `.gitignore` 也会被跳过,而 ripgrep 会应用它);一次遍历若要测试 ignore 规则超过 5,000,000 次,会像超出条目上限一样失败。`grep` 的正则使用 RE2 语法(不支持环视和反向引用),由 re2js 以线性时间匹配,所以病态正则不会卡住 Durable Object。一次搜索最多遍历 20,000 个条目,`grep` 最多收集 20,000 行匹配或 20 MB 文本;超出上限时会失败,并提示缩小路径或模式。ripgrep 15 会拒绝的 glob 语法(未闭合的 `[` 或 `{`、`[z-a]` 这样的反向范围、末尾悬空的 `\`)会作为无效模式报错;`a{b,{c,d}}` 这样的嵌套分组可以使用。搜索在每次列出目录前后检查是否已取消,所以 30 秒的工具超时能中止耗时的遍历。与上游一致,文件观察策略(`dsh-fs-observation-policy`)为它们把关:`write` 不能覆盖本会话尚未读过的文件,`edit` 必须先读过目标文件,读取之后被改动过的文件(例如被 `bash` 或 Linux 容器改动)在重新读取之前会作为过期而失败;会话重启后不保留读取记录。Goal 工具(`ToolGoal`)作为上游 cordis 插件直接与 `GoalService` 组合。子 agent 沿用上游标准组合:`subagent` 启动一个全新的子 agent,`subagent_fork` 启动一个从父 agent 已完成的 turn 开始的子 agent(`dsh-subagent-spawn-in-process`、`dsh-subagent-fork-in-process`)。两者默认都在后台以可续接子 agent 运行,父 agent 用 `send_message` 继续它、用 `interrupt_agent` 停止它当前的 turn、用 `list_agents` 找到它(`dsh-tool-subagent-control`)。父 agent 的 turn 结束后子 agent 仍继续工作,它的结束消息会唤醒父 agent 再跑一个 turn;与上游一致,停止父 agent 不会停止正在运行的子 agent。未在运行的子 agent 收到消息时会从存储恢复,重启后也一样。上游 `todo_write` 工具(`dsh-tool-todo`)维护会话的任务列表,与上游的组合一样允许多个任务同时进行;它的 `todos` projection 驱动 Web 客户端的待办面板。上游 `present` 工具(`dsh-tool-present`)把工作区文件声明为本 turn 的交付物,Web 客户端将其显示为可在侧边栏预览的文件卡片;Edge 没有桌面,所以对卡片的 Host 检查(`/api/present.host`)回答不可用,卡片不提供用本机应用打开。与上游一样,`dsh-agent-instructions` 在第一次请求前,通过工作区 VFS 从项目根目录(最近一个包含 `.git` 的上级目录,没有则为会话工作目录)到工作目录逐级加载 `AGENTS.md` 和 `CLAUDE.md`(以及它们的 `.local.md` 覆盖文件),合成一条不超过 64 KiB 的基线消息;`read`、`write` 或 `edit` 进入更深的目录时,下一次请求会加入该目录的说明。Workers 没有用户主目录,所以用户全局文件是 `/.dsh/AGENTS.md` 和共享 agent 根目录下的 `/.agents/AGENTS.md`(Edge 自己设置 `DSH_HOME` 和 `DSH_AGENTS_HOME`,因为该插件只从这两个变量读取主目录)。`working_directory` 工具(`dsh-tool-working-directory`)读取会话的工作目录,或把它切换到一个已存在的目录;切换是一条持久化的 `working-directory/change` 事件,早于本版本的发布无法读取它,降级后无法打开已写入该事件的会话,Edge 始终把 `/workspace` 视为已存在的目录。Skill 工具通过 `SkillRegistry` 提供。与上游 `dsh-skill-filesystem` 一致,skill 是带 `name` 和 `description` frontmatter 的 `<name>/SKILL.md` 或 `<name>.md` 文件,位于项目的 `.dsh/skills`、`.agents/skills`,以及用户目录 `/.dsh/skills`、`/.agents/skills`(Workers 没有用户主目录),通过工作区 VFS 读取,每个目录最多读取 100 个条目,每个 skill 文件不超过 64 KiB;新增或修改的 skill 从下一个 turn 起生效,变更后打开的会话的 `/` 菜单也会列出它;与上游一致,Web 客户端在页面刷新前保留已打开会话的 `/` 列表。这个菜单由上游的会话 skill 目录(`skills/list`)应答,并带有每个 skill 的文件路径;Workers 没有文件监听,因此 Edge 在列出前重新检查该会话的 skill 根目录,并为它提供工作区文件元数据,因为常驻会话的工作目录检查要在 turn 之外读取这些元数据。通过 owner 接口 `GET/PUT/DELETE /api/skills` 存储的 skill(`EdgeSkillProvider`,DO KV)优先级低于它们。MCP 使用 Edge 自己的客户端(`edge-mcp-client.ts`;未挂载上游 `dsh-mcp-client`):仅支持 Streamable HTTP(Workers 上不可用 stdio),每次调用单独建立连接。probe 显示具备 `resources` 能力的服务器会注册到上游 `dsh-mcp-resources`;只要配置了一个这样的服务器,就会提供它的 `list_mcp_resources`、`list_mcp_resource_templates` 和 `read_mcp_resource` 工具(已有服务器需重新 probe 一次才会记录该能力);不具备 tools 能力的服务器 probe 后工具目录为空。资源调用与该连接器的只读工具一样遵循其工具权限,只有设为每次调用前询问时才会先询问。每个资源响应体限制为 1 MiB,传输中一旦超过就失败,因为 SDK 会整体解析响应,而读取结果(包括二进制数据)会保存在会话日志中;不带 cursor 的列表最多跟随 10 页或 1 MiB 的条目,并返回停下处的 cursor。与上游一致,二进制内容只以描述的形式交给模型。在 Settings → DSH Edge → MCP Servers 中配置服务器;工具名格式为 `mcp__<serverName>__<tool>`。逐个针对 Worker-compatible capabilities 增加其余工具,不宣称不可用的 host 行为。 |
156
+ | Other tools | Web Search、filesystem editor tools、MCP、skills、workflows、jobs 和 subagents | Search、文件、glob/grep、goal、todo、skill、subagent 和 MCP 工具已移植;workflow 与 run_code 已在 isolated 构建中移植 | 复用上游 DeepSeek Web Search 及其 30 秒 tool-call timeout。网页搜索卡片里的“Use the new Web Search API”开关(默认关闭)会把搜索和抓取切换到 DeepSeek Search and Fetch API(`dsh-web-deepseek-api`):页面由 DeepSeek 抓取,Worker 自己不读取任何第三方页面,也不产生辅助模型请求。它们使用 Models 页面保存的 DeepSeek API key(key 名称不能是其他 Edge 功能的凭据,设置里不接受明文 key),API 地址必须是不含凭据、查询或片段的 HTTP(S) URL,重定向会被拒绝,也不提供账号登录路径。Search and Fetch API 可能与模型 token 分开计费。上游 `workflow` 工具仅由 Dynamic Worker 运行时提供(isolated、Paid 计划构建);Direct 构建不注册该工具。由于 workerd 禁止在进程内使用 `eval`/`new Function`/`node:vm`,每次运行都会把脚本加载到独立的 Dynamic Worker 中执行,该 Worker 无出站网络,并受 30 秒 Worker Loader `cpuMs` 上限约束(由 Cloudflare 运行时强制执行,本地开发环境不执行);`agent()`、`phase()`、`log()` 经 RPC 桥回到 Durable Object,由其执行各项上限:同时最多运行 4 个子 agent(低于 Workers 六连接上限),单次运行最多启动 100 个子 agent,以限制子会话的行写入。同一运行时还提供上游的 `ralph` 工具(`dsh-tool-ralph`):它在前台循环启动全新的 `subagent` 子 agent,朝同一个目标推进,每一轮只把一份有大小上限的报告交给下一轮,直到某个子 agent 报告完成或遇到阻碍。与上游一样,它的提示词要求只在用户明确要求时使用。它运行在 workflow 引擎上,因此一次最多 100 轮(上游默认 256 轮);与 `workflow` 一样,PTC 模式预设不提供它。上游 `run_code` 工具(`dsh-tools` PTC 模式)由同一运行时提供,但只提供给以上游 `ptc` agent 预设(PTC 模式)开始的会话。isolated 部署沿用上游 id 提供该预设,因此 Web 客户端显示其内置的双语名称。该预设通过生成的 SDK 呈现全部工具,并与上游一样不提供 `workflow`,因为 `run_code` 是它唯一的编排方式。默认使用上游的 `standard` 预设(标准模式;以早先 `dsh-edge` id 记录的会话按 `standard` 读取),以原生方式呈现工具,并保留 `workflow`。与上游一致,Settings → Agent presets 写入 `agent-preset-registry` 设置命名空间的 `selectedDefault`,从可用预设中选择新会话的起始预设;早期版本保存在 `agent-presets` 下的默认值会在启动时迁移过来。在 PTC 模式下,每个程序先用 sucrase 去除类型,再在独立 Dynamic Worker 中运行,受 30 秒 `cpuMs` 上限约束且无出站网络;其中的 `tools.*` 调用经 RPC 桥回到 Durable Object,由其限制为每次运行最多 200 次(每次都是一次写入 session 事件的嵌套工具派发)、参数最多 256 KiB、单次结果最多 2 MiB,嵌套调用仍走审批。与上游 Node 运行时描述自身环境一样,`run_code` 的描述会把这个环境和这些上限告诉模型。文件工具(read/write/edit/read_image)通过 `EdgeFileSystem` 适配 Computer VFS。`glob` 和 `grep` 保持上游 `dsh-tool-fs-search` 的工具名、参数结构、结果文本、搜索卡片,以及超过 100 条路径或 250 条匹配时把完整结果另存为文件;但 Workers 无法启动它所需的 ripgrep 程序,所以 Edge 在 VFS 上运行它们:两者都跳过版本控制元数据目录;`grep` 还跳过二进制文件和超过 4 MiB 的文件,并与上游 `grep` 沿用的 ripgrep 默认行为一致,跳过隐藏条目,以及 `.rgignore`、`.ignore` 和(在 git 仓库内的)`.gitignore` 文件排除的条目,且不进入被忽略的目录,因此一个很大的被忽略的 `node_modules` 只占一个条目(与 ripgrep 的 `--glob` 一致,`include` 匹配的文件即使被忽略或隐藏也会被搜索);`glob` 与上游一致(`--no-ignore --hidden`),会列出隐藏和被忽略的文件。ignore 规则按字符匹配,而 ripgrep 在 Unix 上按字节匹配 `?` 和字符类,所以像 `?` 这样的规则也会匹配只有一个非 ASCII 字符的文件名。不读取全局 gitignore 文件和 `.git/info/exclude`,超过 256 KiB 的 ignore 文件,或会让一次搜索编译的匹配器超过 5,000 个(每条规则一个,带 `{a,b}` 分组的规则按展开后的每个分支计,遍历期间都保留在内存中)的 ignore 文件不生效(预算按遍历顺序分配,所以预算用完后遇到的 ignore 文件即使优先级高于先前的 `.gitignore` 也会被跳过,而 ripgrep 会应用它);一次遍历若要测试 ignore 规则超过 5,000,000 次,会像超出条目上限一样失败。`grep` 的正则使用 RE2 语法(不支持环视和反向引用),由 re2js 以线性时间匹配,所以病态正则不会卡住 Durable Object。一次搜索最多遍历 20,000 个条目,`grep` 最多收集 20,000 行匹配或 20 MB 文本;超出上限时会失败,并提示缩小路径或模式。ripgrep 15 会拒绝的 glob 语法(未闭合的 `[` 或 `{`、`[z-a]` 这样的反向范围、末尾悬空的 `\`)会作为无效模式报错;`a{b,{c,d}}` 这样的嵌套分组可以使用。搜索在每次列出目录前后检查是否已取消,所以 30 秒的工具超时能中止耗时的遍历。与上游一致,文件观察策略(`dsh-fs-observation-policy`)为它们把关:`write` 不能覆盖本会话尚未读过的文件,`edit` 必须先读过目标文件,读取之后被改动过的文件(例如被 `bash` 或 Linux 容器改动)在重新读取之前会作为过期而失败;会话重启后不保留读取记录。Goal 工具(`ToolGoal`)作为上游 cordis 插件直接与 `GoalService` 组合。子 agent 沿用上游标准组合:`subagent` 启动一个全新的子 agent,`subagent_fork` 启动一个从父 agent 已完成的 turn 开始的子 agent(`dsh-subagent-spawn-in-process`、`dsh-subagent-fork-in-process`)。两者默认都在后台以可续接子 agent 运行,父 agent 用 `send_message` 继续它、用 `interrupt_agent` 停止它当前的 turn、用 `list_agents` 找到它(`dsh-tool-subagent-control`)。父 agent 的 turn 结束后子 agent 仍继续工作,它的结束消息会唤醒父 agent 再跑一个 turn;与上游一致,停止父 agent 不会停止正在运行的子 agent。未在运行的子 agent 收到消息时会从存储恢复,重启后也一样。上游 `todo_write` 工具(`dsh-tool-todo`)维护会话的任务列表,与上游的组合一样允许多个任务同时进行;它的 `todos` projection 驱动 Web 客户端的待办面板。上游 `present` 工具(`dsh-tool-present`)把工作区文件声明为本 turn 的交付物,Web 客户端将其显示为可在侧边栏预览的文件卡片。上游交付物的 Host 半边(`dsh-client-ui-deliverables`)原样挂载:它提供卡片使用的 `/api/present.*` 和 `/api/changes.*` 路由,并在系统提示中加入关于链接文件和使用 `present` 的说明;Edge 没有桌面,所以卡片不提供用本机应用打开。每个顶层 turn 中的 `write` 和 `edit` 调用会生成变更文件卡片,列出每个文件的增删行数,并可查看 turn 开始与结束时的对比。这是上游 `dsh-workspace-changes` 文档中的无 git 模式(`edge-workspace-changes.ts`):Workers 不运行 git,所以只通过 `bash` 或在 Linux 容器中改动的文件不会列出,子代理会话也不记录。每个被编辑的文件会在本 turn 第一次编辑前和 turn 结束时各整体复制一份,存入工作区 VFS 的 `/.dsh/workspace-changes`,以内容的 SHA-1 命名,因此一个 turn 在内存中最多同时保留两份文件内容;与上游一致,超过 2 MiB 的文件列出但不计行数;与上游不同,任一侧超过 20,000 行的文件也一样,因为比较会按行分配内存(一百万个短行的峰值达 265 MiB 堆内存,超过 Durable Object 的 128 MiB);含 NUL 字节的文件列为二进制,内容未变的重写不列出,只差结尾换行的文件会列出但没有变更行,一份摘要最多 500 个文件,超过 100 ms 的行比较按整份替换显示。摘要随常驻会话保留,与上游随 Session 保留一致;Durable Object 重启后,之前的 turn 不再有卡片,上一次激活留下的副本会在下一次捕获前删除。与上游一样,`dsh-agent-instructions` 在第一次请求前,通过工作区 VFS 从项目根目录(最近一个包含 `.git` 的上级目录,没有则为会话工作目录)到工作目录逐级加载 `AGENTS.md` 和 `CLAUDE.md`(以及它们的 `.local.md` 覆盖文件),合成一条不超过 64 KiB 的基线消息;`read`、`write` 或 `edit` 进入更深的目录时,下一次请求会加入该目录的说明。Workers 没有用户主目录,所以用户全局文件是 `/.dsh/AGENTS.md` 和共享 agent 根目录下的 `/.agents/AGENTS.md`(Edge 自己设置 `DSH_HOME` 和 `DSH_AGENTS_HOME`,因为该插件只从这两个变量读取主目录)。`working_directory` 工具(`dsh-tool-working-directory`)读取会话的工作目录,或把它切换到一个已存在的目录;切换是一条持久化的 `working-directory/change` 事件,早于本版本的发布无法读取它,降级后无法打开已写入该事件的会话,Edge 始终把 `/workspace` 视为已存在的目录。Skill 工具通过 `SkillRegistry` 提供。与上游 `dsh-skill-filesystem` 一致,skill 是带 `name` 和 `description` frontmatter 的 `<name>/SKILL.md` 或 `<name>.md` 文件,位于项目的 `.dsh/skills`、`.agents/skills`,以及用户目录 `/.dsh/skills`、`/.agents/skills`(Workers 没有用户主目录),通过工作区 VFS 读取,每个目录最多读取 100 个条目,每个 skill 文件不超过 64 KiB;新增或修改的 skill 从下一个 turn 起生效,变更后打开的会话的 `/` 菜单也会列出它;与上游一致,Web 客户端在页面刷新前保留已打开会话的 `/` 列表。这个菜单由上游的会话 skill 目录(`skills/list`)应答,并带有每个 skill 的文件路径;Workers 没有文件监听,因此 Edge 在列出前重新检查该会话的 skill 根目录,并为它提供工作区文件元数据,因为常驻会话的工作目录检查要在 turn 之外读取这些元数据。通过 owner 接口 `GET/PUT/DELETE /api/skills` 存储的 skill(`EdgeSkillProvider`,DO KV)优先级低于它们。MCP 使用 Edge 自己的客户端(`edge-mcp-client.ts`;未挂载上游 `dsh-mcp-client`):仅支持 Streamable HTTP(Workers 上不可用 stdio),每次调用单独建立连接。probe 显示具备 `resources` 能力的服务器会注册到上游 `dsh-mcp-resources`;只要配置了一个这样的服务器,就会提供它的 `list_mcp_resources`、`list_mcp_resource_templates` 和 `read_mcp_resource` 工具(已有服务器需重新 probe 一次才会记录该能力);不具备 tools 能力的服务器 probe 后工具目录为空。资源调用与该连接器的只读工具一样遵循其工具权限,只有设为每次调用前询问时才会先询问。每个资源响应体限制为 1 MiB,传输中一旦超过就失败,因为 SDK 会整体解析响应,而读取结果(包括二进制数据)会保存在会话日志中;不带 cursor 的列表最多跟随 10 页或 1 MiB 的条目,并返回停下处的 cursor。与上游一致,二进制内容只以描述的形式交给模型。在 Settings → DSH Edge → MCP Servers 中配置服务器;工具名格式为 `mcp__<serverName>__<tool>`。逐个针对 Worker-compatible capabilities 增加其余工具,不宣称不可用的 host 行为。 |
157
157
  | Attachments | 本地 attachment storage、上游 image reference、composer、gallery、lightbox 与 provider conversion | 在原生 storage seam 上适配 | 原样复用上游 `AttachmentStore`、admission、协议、授权、UI 与 DeepSeek conversion。不可变的图片字节(PNG 或 JPEG;图片优化为保留透明而转换时为 WebP)按 SHA-256 identity 存入新部署与 pre-attachment 部署使用的 64 MiB、按 512 KiB 分块的 DO backend,或存入已固定使用私有 R2 的部署的 R2;session event 只保留上游 ref。每个 owner instance 首次选择的 backend 会被固定,认领或升级不会让既有引用失联。图片为 PNG 或 JPEG,每张最多 3.5 MiB,每条消息最多 4 张。其他文件经上游上传路由流式写入,按上游 `files/<prefix>/<digest>/<name>` 布局原样保存在工作区 VFS 的 `/.dsh/attachments/v1` 下,每个最多 64 MiB(上传必须声明长度,超限的在写入任何字节前即被拒绝),告知模型的就是这个路径;模型的文件工具与轻量 shell 可在此读取,但路由到 Linux Container 的命令看不到这些文件。 |
158
158
  | Goal tracking | `GoalService` 提供 create/edit/pause/resume/complete/clear mutation 与 GoalBar UI | 复用 | 作为 cordis 插件安装上游 `GoalService` 和 `ToolGoal`(直接组合)。浏览器 GoalBar mutation 通过 `TypertGatewayService` 路由到 `/api/goals/<method>`。`SessionProjectionCache` 在 DO 重启后持久化 goal 状态。上游的 `/goal` 命令(`dsh-command-goal`)可以查看、设定、编辑、暂停、恢复或清除会话的目标。每一轮目标都在 Edge 的 turn 内运行,带有工作区、时限和实时事件:上游的轮次驱动排入下一轮期间,turn 保持打开;在 turn 之外启用目标的调用(`/goal`、GoalBar 的恢复)在一个新的 turn 内运行。 |
159
159
  | Context compaction | Token 计量、自动压缩和 session 标题生成 | 复用 | 直接安装上游 cordis 插件。上下文压缩、token 计量、工具结果修剪和自动 session 标题生成原样运行。上游的图片卸载(`dsh-compaction-image-offload`)在请求中的图片超出路由预算(默认每个请求 600 张)时让 turn 继续:它用一条 `image/offload` 会话事件把最早的图片标记为已卸载,然后重试请求。 |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-edge",
3
- "version": "0.31.0",
3
+ "version": "0.32.0",
4
4
  "description": "Your DeepSeek Harness, anywhere — deploy a persistent personal coding agent to Cloudflare Workers in one command",
5
5
  "author": "pawaca",
6
6
  "license": "MIT",
@@ -80,6 +80,7 @@
80
80
  "@deepseek-ai/dsh-client-store": "0.2.1-rc.2",
81
81
  "@deepseek-ai/dsh-client-ui-chat": "0.2.1-rc.2",
82
82
  "@deepseek-ai/dsh-client-ui-conversation": "0.2.1-rc.2",
83
+ "@deepseek-ai/dsh-client-ui-deliverables": "0.2.1-rc.2",
83
84
  "@deepseek-ai/dsh-client-ui-settings": "0.2.1-rc.2",
84
85
  "@deepseek-ai/dsh-client-ui-settings-general": "0.2.1-rc.2",
85
86
  "@deepseek-ai/dsh-client-ui-theme": "0.2.1-rc.2",
@@ -180,10 +181,12 @@
180
181
  "@deepseek-ai/dsh-workflow": "0.2.1-rc.2",
181
182
  "@deepseek-ai/dsh-working-directory": "0.2.1-rc.2",
182
183
  "@deepseek-ai/dsh-workspace": "0.2.1-rc.2",
184
+ "@deepseek-ai/dsh-workspace-changes": "0.2.1-rc.2",
183
185
  "@deepseek-ai/schemastery": "3.18.5",
184
186
  "@mixmark-io/domino": "2.2.0",
185
187
  "@modelcontextprotocol/sdk": "1.30.0",
186
188
  "acorn": "8.18.0",
189
+ "diff": "9.0.0",
187
190
  "fast-png": "8.0.0",
188
191
  "fflate": "0.8.3",
189
192
  "jpeg-js": "0.4.4",