dsh-edge 0.14.1 → 0.15.0-alpha.1
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 +2 -2
- package/README.md +3 -3
- package/README.zh.md +3 -3
- package/THIRD_PARTY_NOTICES.md +625 -730
- package/dist/assets/index-BKQ_L1z6.js +117 -0
- package/dist/assets/index-DPX2bQLO.css +1 -0
- package/dist/index.html +3 -3
- package/dist/plugins/@deepseek-ai/dsh-api-gateway/client.js +21 -5
- package/dist/plugins/@deepseek-ai/dsh-api-remotes/client.js +1041 -293
- package/dist/plugins/@deepseek-ai/dsh-api-session-controller/client.js +840 -58
- package/dist/plugins/@deepseek-ai/dsh-api-workspace-files/client.js +474 -0
- package/dist/plugins/@deepseek-ai/dsh-client-connection/client.js +2045 -453
- package/dist/plugins/@deepseek-ai/dsh-client-file-upload/client.js +333 -0
- package/dist/plugins/@deepseek-ai/dsh-client-resources/client.js +185 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-agent-preset/client.js +15 -12
- package/dist/plugins/@deepseek-ai/dsh-client-ui-approval/client.js +2 -1
- package/dist/plugins/@deepseek-ai/dsh-client-ui-attachment/client.js +191 -71
- package/dist/plugins/@deepseek-ai/dsh-client-ui-chat/client.js +817 -625
- package/dist/plugins/@deepseek-ai/dsh-client-ui-commands/client.js +92 -110
- package/dist/plugins/@deepseek-ai/dsh-client-ui-conversation/client.js +12798 -12226
- package/dist/plugins/@deepseek-ai/dsh-client-ui-deliverables/client.js +649 -69
- package/dist/plugins/@deepseek-ai/dsh-client-ui-goal/client.js +222 -69
- package/dist/plugins/@deepseek-ai/dsh-client-ui-input-trigger/client.js +12 -1
- package/dist/plugins/@deepseek-ai/dsh-client-ui-layout/client.js +244 -157
- package/dist/plugins/@deepseek-ai/dsh-client-ui-message-feedback/client.js +564 -383
- package/dist/plugins/@deepseek-ai/dsh-client-ui-model-selection/client.js +78 -12
- package/dist/plugins/@deepseek-ai/dsh-client-ui-open-in-app/client.js +431 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-reference/client.js +0 -4
- package/dist/plugins/@deepseek-ai/dsh-client-ui-settings-general/client.js +7 -6
- package/dist/plugins/@deepseek-ai/dsh-client-ui-settings-models/client.js +55 -26
- package/dist/plugins/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/client.js +46 -21
- package/dist/plugins/@deepseek-ai/dsh-client-ui-settings-plugins/client.js +14 -22
- package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar/client.js +93 -13
- package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/client.js +26979 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar-files/client.js +720 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar-right/client.js +3780 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-skill/client.js +2 -2
- package/dist/plugins/@deepseek-ai/dsh-client-ui-theme/client.js +1 -1
- package/dist/plugins/@deepseek-ai/dsh-client-ui-tool/client.js +572 -314
- package/dist/plugins/@deepseek-ai/dsh-client-ui-trajectory/client.js +157 -127
- package/dist/plugins/@deepseek-ai/dsh-client-ui-workflow-run/client.js +1 -1
- package/dist/plugins/@deepseek-ai/dsh-client-ui-workspace/client.js +150 -69
- package/dist/plugins/@deepseek-ai/dsh-typert-registry/client.js +0 -15
- package/package.json +79 -73
- package/worker/direct/index.js +1826 -1528
- package/worker/isolated/index.js +1219 -921
- package/dist/assets/index-Df-65__b.js +0 -110
- package/dist/assets/index-b24khbeK.css +0 -1
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:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: df37b120d64d39186c91bdcb811cf2ac1f1745ac
|
|
6
|
+
README.zh.md: 2348c8e25572a915c0423ed940abc1a80638381e
|
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ The runtime keeps upstream ownership clear:
|
|
|
14
14
|
|
|
15
15
|
- `ReactLoopAgent`, `AgentRegistry`, `LlmRuntime`, `ToolRuntime`, `SystemPrompt`, `SessionStore`, and `SessionPersistence` run through the upstream Cordis composition.
|
|
16
16
|
- The upstream `dsh-llm-deepseek` cordis plugin is installed directly, auto-registering its settings namespace and configurable provider entry. Edge maps the native DSH `bash` tool onto Cloudflare Computer.
|
|
17
|
-
- Durable Object SQLite implements the upstream persistence
|
|
17
|
+
- Durable Object SQLite implements the upstream `SessionHandle` persistence contract. Edge buffers live events and flushes them before publication; initialization events, including `session/end-seed` during cold model selection, are persisted before subsequent mutations. The upstream agent loop supplies interrupted-turn closers on resume. Under write ownership, Edge first truncates a torn physical tail and atomically rebuilds summaries and reminder state; tails containing inbox events, malformed reminders, or already-dispatched reminders are rejected to prevent duplicate delivery.
|
|
18
18
|
- Model history is projected from canonical events rather than persisted in a second Edge schema.
|
|
19
19
|
- `GoalService` and `ToolGoal` run as upstream cordis plugins (direct composition). Browser GoalBar mutations route through `TypertGatewayService`.
|
|
20
20
|
- `SessionProjectionCache` persists goal, title, and model state across Durable Object restart via KV cache.
|
|
@@ -150,7 +150,7 @@ This reference separates code that runs natively in Workers, code adapted at an
|
|
|
150
150
|
| DSH transport | Typed HTTP RPC plus mux and host WebSocket downlinks | Reused with an Edge server implementation | Use the upstream fetch carrier for unary methods and preserve its envelopes, schemas, projections, lazy blank-session behavior, bounded content search, prompt and queue mutations, workspace mutations, queue snapshots, and event frames. Durable Object WebSocket hibernation owns both downlinks; mux reconnects replay pending live inbox state, while REST/SSE routes remain a diagnostic compatibility path. |
|
|
151
151
|
| Workspace registry | Storage-domain global state plus `WorkspaceRecord` rows | Native backend adaptation | Keep the upstream global and record value shapes, including manual session order and archive membership, but map their physical keys and atomic writes to Durable Object storage. Edge constrains the registry to the one native `/workspace` VFS; rename, delete, recreation, and session reordering retain the upstream RPC and Host-frame semantics. |
|
|
152
152
|
| 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`. |
|
|
153
|
-
| 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
|
|
153
|
+
| 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. |
|
|
154
154
|
| 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. |
|
|
155
155
|
| Other tools | Web Search, filesystem editor tools, MCP, skills, workflows, jobs, and subagents | Search, file, goal, and skill tools ported; MCP, workflows, and subagents not yet ported | Reuse upstream DeepSeek Web Search with its 30-second tool-call timeout. File tools (read/write/edit/read_image) adapted via `EdgeFileSystem` backed by Computer VFS. Goal tools (`ToolGoal`) composed directly with `GoalService` as upstream cordis plugins. Skill tool via `SkillRegistry` + `EdgeSkillProvider` (DO KV-backed); owner CRUD at `GET/PUT/DELETE /api/skills`. MCP client (`dsh-mcp-client`) not yet installed; Streamable HTTP transport is feasible on the free plan. Add the remaining tools individually against Worker-compatible capabilities; do not advertise unavailable host behavior. |
|
|
156
156
|
| 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 PNG/JPEG bytes under their SHA-256 identities in private R2 for new permanent deployments or in a 64 MiB, 512 KiB-chunked DO backend for temporary deployments and owners who select it while upgrading a pre-attachment Worker; session events retain only upstream refs. The first backend is pinned per owner instance so claiming or upgrading cannot strand existing references. |
|
|
@@ -188,7 +188,7 @@ Cloudflare static assets -> upstream Web shell + client plugin graph
|
|
|
188
188
|
(or optional Computer Worker Shell when LOADER is bound)
|
|
189
189
|
-> Durable Object /workspace VFS
|
|
190
190
|
-> upstream tool/result and next model step
|
|
191
|
-
-> ReactLoopAgent appends canonical inbox,
|
|
191
|
+
-> ReactLoopAgent appends canonical inbox, message, tool and boundary events (V3 embeds compact streams in assistant events)
|
|
192
192
|
-> sessions.flush durable barrier -> Durable Object SQLite backend
|
|
193
193
|
-> session/event, projection, and status frames over Durable Object WebSockets
|
|
194
194
|
-> upstream Web runtime reconciles and renders the canonical events
|
package/README.zh.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
- `ReactLoopAgent`、`AgentRegistry`、`LlmRuntime`、`ToolRuntime`、`SystemPrompt`、`SessionStore` 和 `SessionPersistence` 通过上游 Cordis 组合运行。
|
|
16
16
|
- 上游 `dsh-llm-deepseek` cordis 插件直接安装,自动注册 Settings 命名空间和可配置 Provider 条目。Edge 把原生 DSH `bash` 工具映射到 Cloudflare Computer。
|
|
17
|
-
- Durable Object SQLite
|
|
17
|
+
- Durable Object SQLite 实现上游 `SessionHandle` 持久化约定。Edge 缓冲实时事件并在发布前完成落盘;初始化事件(包括冷会话切换模型时的 `session/end-seed`)先于后续变更持久化。上游 agent loop 在恢复时补齐中断 turn 的结束事件。Edge 在持有写入所有权时先截断损坏的物理尾部,并原子重建摘要和提醒状态;对于含有 inbox 事件、格式损坏提醒或已派发提醒的尾部,拒绝自动修复,避免重复投递。
|
|
18
18
|
- 模型历史从 canonical 事件投影,不在 Edge 中建立第二套 schema。
|
|
19
19
|
- `GoalService` 和 `ToolGoal` 作为上游 cordis 插件直接组合。浏览器 GoalBar mutation 经由 `TypertGatewayService` 路由。
|
|
20
20
|
- `SessionProjectionCache` 通过 KV 缓存在 Durable Object 重启后持久化 goal、title 和 model 状态。
|
|
@@ -150,7 +150,7 @@ curl -b /tmp/dsh-edge-cookie -N -X POST -H 'content-type: application/json' \
|
|
|
150
150
|
| DSH transport | Typed HTTP RPC 加 mux/host WebSocket downlink | 复用并提供 Edge 服务端实现 | 对 unary method 使用上游 fetch carrier,并保留其 envelope、schema、projection、lazy blank-session 行为、有界内容搜索、prompt 与 queue mutation、workspace mutation、queue snapshot 和 event frame。两条 downlink 都由 Durable Object WebSocket 休眠机制持有;mux 重连会重放 live inbox 的待处理状态,REST/SSE 路由则保留为诊断兼容路径。 |
|
|
151
151
|
| Workspace registry | Storage-domain global state 加 `WorkspaceRecord` rows | 原生 backend 适配 | 保持上游 global 和 record value shape,包括手动 session 顺序与 archive membership;仅把物理 key 和原子写入映射到 Durable Object storage。Edge 把 registry 限制为一个原生 `/workspace` VFS;rename、delete、recreate 与 session reorder 保持上游 RPC 和 Host-frame 语义。 |
|
|
152
152
|
| 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`。 |
|
|
153
|
-
| 对话文件链接 | `session/openWorkspacePath` 经 `dsh-native-command` 把点击的路径交给宿主桌面打开器;`session/canOpenWorkspacePath` 决定是否展示该入口 | 在上游 `SessionControllerInternals` seam 适配,加 Web 端下载回退 | 用 Edge internals 组合 `SessionController`,让原生探测返回 false、打开尝试以可读原因失败而不是 `child_process` 错误。
|
|
153
|
+
| 对话文件链接 | `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` 下载仍然可用。 |
|
|
154
154
|
| 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。 |
|
|
155
155
|
| Other tools | Web Search、filesystem editor tools、MCP、skills、workflows、jobs 和 subagents | Search、文件、goal 和 skill 工具已移植;MCP、workflows 和 subagents 尚未移植 | 复用上游 DeepSeek Web Search 及其 30 秒 tool-call timeout。文件工具(read/write/edit/read_image)通过 `EdgeFileSystem` 适配 Computer VFS。Goal 工具(`ToolGoal`)作为上游 cordis 插件直接与 `GoalService` 组合。Skill 工具通过 `SkillRegistry` + `EdgeSkillProvider`(DO KV 存储);owner CRUD 接口 `GET/PUT/DELETE /api/skills`。MCP client(`dsh-mcp-client`)尚未安装;Streamable HTTP transport 在免费 plan 上可行。逐个针对 Worker-compatible capabilities 增加其余工具,不宣称不可用的 host 行为。 |
|
|
156
156
|
| Attachments | 本地 attachment storage、上游 image reference、composer、gallery、lightbox 与 provider conversion | 在原生 storage seam 上适配 | 原样复用上游 `AttachmentStore`、admission、协议、授权、UI 与 DeepSeek conversion。PNG/JPEG 不可变字节按 SHA-256 identity 存入新永久部署的私有 R2,或存入临时部署以及升级旧版 Worker 时由 owner 选择的 64 MiB、按 512 KiB 分块的 DO backend;session event 只保留上游 ref。每个 owner instance 首次选择的 backend 会被固定,认领或升级不会让既有引用失联。 |
|
|
@@ -188,7 +188,7 @@ Cloudflare static assets -> upstream Web shell + client plugin graph
|
|
|
188
188
|
(or optional Computer Worker Shell when LOADER is bound)
|
|
189
189
|
-> Durable Object /workspace VFS
|
|
190
190
|
-> upstream tool/result and next model step
|
|
191
|
-
-> ReactLoopAgent appends canonical inbox,
|
|
191
|
+
-> ReactLoopAgent appends canonical inbox, message, tool and boundary events (V3 embeds compact streams in assistant events)
|
|
192
192
|
-> sessions.flush durable barrier -> Durable Object SQLite backend
|
|
193
193
|
-> session/event, projection, and status frames over Durable Object WebSockets
|
|
194
194
|
-> upstream Web runtime reconciles and renders the canonical events
|