dsh-edge 0.1.3 → 0.2.0-alpha.2
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 +6 -6
- package/README.md +25 -10
- package/README.zh.md +25 -10
- package/THIRD_PARTY_NOTICES.md +10019 -187
- package/dist/index.html +1 -1
- package/dist/plugins/@deepseek-ai/dsh-client-locale/client.js +7 -7
- package/dist/plugins/@deepseek-ai/dsh-client-ui-agent-preset/client.js +61 -61
- package/dist/plugins/@deepseek-ai/dsh-client-ui-commands/client.js +14 -14
- package/dist/plugins/@deepseek-ai/dsh-client-ui-conversation/client.js +287 -287
- package/dist/plugins/@deepseek-ai/dsh-client-ui-deliverables/client.js +10 -10
- package/dist/plugins/@deepseek-ai/dsh-client-ui-input-trigger/client.js +11 -11
- package/dist/plugins/@deepseek-ai/dsh-client-ui-jobs/client.js +15 -15
- package/dist/plugins/@deepseek-ai/dsh-client-ui-layout/client.js +8 -8
- package/dist/plugins/@deepseek-ai/dsh-client-ui-model-selection/client.js +27 -27
- package/dist/plugins/@deepseek-ai/dsh-client-ui-permission-presets/client.js +8 -8
- package/dist/plugins/@deepseek-ai/dsh-client-ui-settings-general/client.js +31 -31
- package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar/client.js +23 -23
- package/dist/plugins/@deepseek-ai/dsh-client-ui-skill/client.js +19 -19
- package/dist/plugins/@deepseek-ai/dsh-client-ui-subagent/client.js +29 -29
- package/dist/plugins/@deepseek-ai/dsh-client-ui-theme/client.js +7 -7
- package/dist/plugins/@deepseek-ai/dsh-client-ui-tool/client.js +64 -64
- package/dist/plugins/@deepseek-ai/dsh-client-ui-trajectory/client.js +183 -183
- package/dist/plugins/@deepseek-ai/dsh-client-ui-user-questions/client.js +44 -44
- package/dist/plugins/@deepseek-ai/dsh-client-ui-workflow-run/client.js +24 -24
- package/dist/plugins/@deepseek-ai/dsh-client-ui-workspace/client.js +79 -79
- package/dist/plugins/dsh-edge-client-ui/client.js +68 -53
- package/package.json +22 -22
- package/scripts/activation.d.mts +34 -0
- package/scripts/activation.mjs +133 -0
- package/scripts/cli.d.mts +9 -0
- package/scripts/cli.mjs +66 -3
- package/scripts/dev.mjs +38 -0
- package/scripts/install.d.mts +8 -0
- package/scripts/install.mjs +95 -4
- package/scripts/legal-files.d.mts +23 -0
- package/scripts/legal-files.mjs +222 -40
- package/scripts/pnpm-invocation.d.mts +14 -0
- package/scripts/pnpm-invocation.mjs +25 -0
- package/scripts/publish.d.mts +25 -0
- package/scripts/publish.mjs +145 -0
- package/scripts/smoke-installed.mjs +27 -22
- package/scripts/verify-packed.mjs +8 -0
- package/scripts/wrangler-config-core.mjs +107 -0
- package/scripts/wrangler-config.d.mts +2 -0
- package/scripts/wrangler-config.mjs +9 -78
- package/worker/direct/index.js +1136 -1139
- package/worker/isolated/index.js +872 -875
- package/scripts/assemble-web.mjs +0 -230
- package/scripts/bundle.mjs +0 -86
package/README.i18n.yaml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Bilingual-pair consistency record
|
|
2
|
-
#
|
|
3
|
-
#
|
|
4
|
-
# pnpm run
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
1
|
+
# Bilingual-pair consistency record: the git blob hash of each side at the
|
|
2
|
+
# last confirmed-consistent state. Both languages carry equal authority.
|
|
3
|
+
# After editing either side, update both and re-record every pair with:
|
|
4
|
+
# pnpm run doc-pairs -- --write
|
|
5
|
+
README.md: 6677bc90acde245bf00f9cacf27c800c1320caf3
|
|
6
|
+
README.zh.md: 899072d815abafe399c8561999a07c8c3cb12474
|
package/README.md
CHANGED
|
@@ -2,19 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
English | [中文](README.zh.md)
|
|
4
4
|
|
|
5
|
-
`dsh-edge` is the Cloudflare runtime
|
|
5
|
+
`dsh-edge` is the Cloudflare runtime for DeepSeek Harness. One deployment maps its authenticated owner to one Durable Object whose SQLite-backed virtual filesystem survives requests. By default, an in-process just-bash backend runs commands against that same filesystem without a Linux container or Dynamic Worker.
|
|
6
6
|
|
|
7
7
|
`dsh-edge` is an independent community project. It is not affiliated with or endorsed by DeepSeek; DeepSeek Harness remains an upstream dependency under its own license.
|
|
8
8
|
|
|
9
9
|
The checked-in Wrangler configuration exposes two deployment targets from the same application graph. The default target is direct mode for Workers Free and has no Worker Loader binding. The named `isolated` target adds the `LOADER` binding and requires Workers Paid, but does not fork the DSH protocol, storage, UI, or tool implementation.
|
|
10
10
|
|
|
11
|
-
The
|
|
11
|
+
The runtime runs persistent conversations through the upstream Cordis-composed `ReactLoopAgent`, `AgentRegistry`, `LlmRuntime`, `ToolRuntime`, `SystemPrompt`, `SessionStore`, and `SessionPersistence`. Edge code only binds a request-scoped DeepSeek adapter and maps one native DSH `bash` tool definition onto Cloudflare Computer. Durable Object SQLite implements the upstream persistence backend contract; `PersistenceCoordinator` still owns write-behind, revisions, resume preparation, and crash recovery. Model history is projected from canonical events rather than persisted separately.
|
|
12
12
|
|
|
13
13
|
The browser is the upstream Web shell and upstream client-plugin bundles. A build-time assembler derives the browser roster from the upstream base and Web bundle configs, injects the standard `window.__DSH_BOOT__` graph, and publishes the result as Cloudflare static assets. The Durable Object implements the supported upstream `ApiProxy` methods through the standard HTTP carrier and supplies the two upstream downlinks as hibernatable WebSockets. Edge excludes client plugins whose host domains are absent instead of forking their UI code; this includes session-log export until its server endpoint exists. A small Edge-owned login shell protects the upstream UI and protocol without changing either one. Optional local-host plugins remain unavailable.
|
|
14
14
|
|
|
15
15
|
## Run locally
|
|
16
16
|
|
|
17
|
-
Use Node.js 22.19 or newer
|
|
17
|
+
Use Node.js 22.19 or newer. Install both the repository dependencies and the separately locked release assembly from the repository root:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
pnpm install --frozen-lockfile
|
|
21
|
+
pnpm --dir apps/dsh-edge/standalone install --frozen-lockfile
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
To call DeepSeek, create an ignored `apps/dsh-edge/.dev.vars` file:
|
|
18
25
|
|
|
19
26
|
```dotenv
|
|
20
27
|
DSH_EDGE_ACCESS_KEY=replace-with-at-least-32-random-bytes
|
|
@@ -33,7 +40,7 @@ Then start the Worker:
|
|
|
33
40
|
pnpm --filter dsh-edge dev
|
|
34
41
|
```
|
|
35
42
|
|
|
36
|
-
The command
|
|
43
|
+
The command builds the pinned published Harness packages into the same prebuilt Web and Worker artifacts shipped by the installer, then starts Wrangler without rebundling them. Open the printed URL, normally `http://localhost:8787`, enter the owner access key, choose **Workspace**, and send a message. The Web UI creates a lazy blank session and streams the turn through authenticated Durable Object WebSockets.
|
|
37
44
|
|
|
38
45
|
The diagnostic API uses the same owner cookie. Log in once to a temporary cookie jar, then verify the persistent filesystem and shell:
|
|
39
46
|
|
|
@@ -139,31 +146,39 @@ The same file also defines `env.isolated`, a complete Workers Paid target with t
|
|
|
139
146
|
|
|
140
147
|
`wrangler.jsonc` remains the single canonical configuration for both modes. Release packaging builds one tested, minified Worker artifact per mode from the workspace sources. Direct mode replaces only Computer's unreachable Dynamic Worker shell-core module at build time; the Computer workspace adapter and command exports remain the upstream implementations. Isolated mode preserves that shell core but replaces the unreachable Direct backend with a fail-closed module, so each artifact carries only its selected command runtime. The published installer generates a private mode-specific configuration that points at the selected artifact and asks Wrangler to upload it with `no_bundle`; the user's machine does not rebuild dsh-edge or resolve the upstream Harness packages into a new Worker. CI starts the Direct artifact from an installed tarball and rejects it above a 900 KiB compressed budget, leaving headroom below the 1 MiB limit enforced by Cloudflare's anonymous temporary-account upload path.
|
|
141
148
|
|
|
142
|
-
Run the
|
|
149
|
+
Run the current 0.2 prerelease installer from the `next` channel without cloning this repository:
|
|
143
150
|
|
|
144
151
|
```sh
|
|
145
|
-
|
|
152
|
+
npx dsh-edge@next install
|
|
146
153
|
```
|
|
147
154
|
|
|
155
|
+
Use `npx dsh-edge@latest install` for the stable channel, which remains on 0.1.3 until 0.2 is promoted.
|
|
156
|
+
|
|
148
157
|
Upgrade an existing named Worker with the same runtime choice. The deployment keeps its Durable Object data; because Cloudflare secrets are write-only, the upgrade asks for the owner access key and DeepSeek API key again and replaces their active values:
|
|
149
158
|
|
|
159
|
+
Use the same channel as the installed release. A 0.2 prerelease follows `next`:
|
|
160
|
+
|
|
150
161
|
```sh
|
|
151
|
-
|
|
162
|
+
npx dsh-edge@next upgrade
|
|
152
163
|
```
|
|
153
164
|
|
|
165
|
+
Stable deployments use `npx dsh-edge@latest upgrade`. The Edge settings page derives the channel from the installed version and copies the matching command.
|
|
166
|
+
|
|
154
167
|
The installer asks for the runtime before the account. The recommended `Free — Direct Shell` mode works on Workers Free and can use a detected Cloudflare account, open Cloudflare sign-in or registration, or create a temporary account without login. `Isolated — Dynamic Worker` requires Workers Paid and therefore offers only a detected or newly authenticated account. Cloudflare does not expose a reliable local entitlement check for Worker Loader, so an isolated install lets Cloudflare authorize the upload and turns a rejection into a choice between enabling Workers Paid and using direct mode.
|
|
155
168
|
|
|
156
|
-
The remaining prompts select a Worker name, generate or accept the owner access key, collect the DeepSeek API key through hidden input, and show a final cost summary. A temporary-account install also asks the user to accept Cloudflare's Terms of Service and Privacy Policy explicitly. An existing Worker is never overwritten without confirmation. The installer passes both credentials through a mode-`0600` temporary secrets file and gives Wrangler only an allowlisted runtime environment plus the Cloudflare authentication selected for that command; unrelated ambient keys, tokens, passwords, secrets, and Node injection options do not reach the child. It removes the secret file after the command and discovers the resulting URL from Wrangler's structured output. Deployment output is hidden behind one progress indicator by default; add `--verbose` to either command to inspect Wrangler diagnostics.
|
|
169
|
+
The remaining prompts select a Worker name, generate or accept the owner access key, collect the DeepSeek API key through hidden input, and show a final cost summary. A temporary-account install also asks the user to accept Cloudflare's Terms of Service and Privacy Policy explicitly. An existing Worker is never overwritten without confirmation. The installer passes both credentials through a mode-`0600` temporary secrets file and gives Wrangler only an allowlisted runtime environment plus the Cloudflare authentication selected for that command; unrelated ambient keys, tokens, passwords, secrets, and Node injection options do not reach the child. It removes the secret file after the command and discovers the resulting URL from Wrangler's structured output. Deployment output is hidden behind one progress indicator by default; add `--verbose` to either command to inspect Wrangler diagnostics.
|
|
170
|
+
|
|
171
|
+
After an accepted upload, a second progress indicator observes the public `/api/health` route for at most 45 seconds without sending either credential or following redirects. It accepts only the exact packaged version and selected runtime. A matching response produces a ready card. Cloudflare propagation, challenge, placeholder, transport, and older-release responses remain pending; expiry still exits successfully and tells the owner to wait briefly and refresh. This observation does not call DeepSeek or touch Durable Object state. The final card prints the URL, owner access key, and concrete next steps; a temporary account also receives a bearer claim URL that must be claimed within 60 minutes to retain the Worker and its data. A rejected upload is reported as not installed and, when Wrangler created a temporary account first, still prints its claim URL without presenting the unused owner key as active. If upload succeeds but output parsing, claim-URL extraction, interruption handling, activation interruption, or local cleanup prevents a normal handoff, a recovery card still prints the active owner key and any known URLs before the command exits unsuccessfully. The installation uploads directly through Wrangler and does not create or bind a GitHub repository, Cloudflare Builds project, or source-build pipeline.
|
|
157
172
|
|
|
158
173
|
Contributors working from a checkout can reproduce the two release artifacts locally with `pnpm --filter dsh-edge bundle:direct` and `pnpm --filter dsh-edge bundle:isolated`. The first command also enforces the compressed-size budget.
|
|
159
174
|
|
|
160
|
-
Contributors can replay the complete Free temporary-account journey without a key or network call. This example runs the shipped bin, real prompts, Wrangler subprocess, structured deployment-output parsing, and final handoff while replacing
|
|
175
|
+
Contributors can replay the complete Free temporary-account journey without a key or network call. This example runs the shipped bin, real prompts, Wrangler subprocess, structured deployment-output parsing, public-activation observation, and final handoff while replacing the external Cloudflare boundaries:
|
|
161
176
|
|
|
162
177
|
```sh
|
|
163
178
|
pnpm --filter dsh-edge example:install
|
|
164
179
|
```
|
|
165
180
|
|
|
166
|
-
##
|
|
181
|
+
## Edge API
|
|
167
182
|
|
|
168
183
|
- `POST /api/<upstream-method>` accepts the upstream `ClientRequest` envelope for the supported `ApiProxy` methods. The Web client currently uses session list/search/create/history/models/select/prompt/updateQueue/rename/fork/cancel, host description, workspace list/create/rename/delete/reorder/archive, skills, agent presets, settings and credential descriptions, and LLM catalogs. `agentPreset.read` renders the programmatic Edge composition through the upstream read-only viewer, and `credentials.describe` returns credential state without a value. Search projects canonical current-message surfaces and returns only bounded upstream result values. Fork copies a completed-turn prefix through the canonical session seed format and retains parent lineage; Edge refuses a seed above 8,192 events or 8 MiB rather than materializing an unbounded Durable Object history. Queue mutations edit, remove, or promote an item through the live upstream Agent inbox; the synchronous inbox mutation is the upstream acceptance point, while the persistence coordinator owns later write-behind and retirement retry. Workspace mutations persist the upstream workspace-domain global and record shapes through the Durable Object backend. Archive preserves the session log and workspace slot; unary responses and Host frames carry the same full snapshots as upstream.
|
|
169
184
|
- `GET /login` renders the Edge-owned owner form; `POST /api/auth/login` exchanges the configured access key for a signed cookie, `GET /api/auth/session` reports cookie validity, and `POST /api/auth/logout` clears it.
|
package/README.zh.md
CHANGED
|
@@ -2,19 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) | 中文
|
|
4
4
|
|
|
5
|
-
`dsh-edge` 是 DeepSeek Harness 的 Cloudflare
|
|
5
|
+
`dsh-edge` 是 DeepSeek Harness 的 Cloudflare 运行时。每次部署把通过认证的 owner 固定映射到一个 Durable Object,其基于 SQLite 的虚拟文件系统可跨请求持久保存。默认情况下,进程内 just-bash 后端直接在同一文件系统上执行命令,不依赖 Linux 容器或 Dynamic Worker。
|
|
6
6
|
|
|
7
7
|
`dsh-edge` 是独立的社区项目,与 DeepSeek 没有隶属关系,也未获得 DeepSeek 官方背书;DeepSeek Harness 仍是按其自身许可证使用的上游依赖。
|
|
8
8
|
|
|
9
9
|
仓库提交的 Wrangler 配置从同一套应用 graph 暴露两个部署目标。默认目标是面向 Workers Free 的 direct 模式,不包含 Worker Loader binding。命名的 `isolated` 目标会添加 `LOADER` binding,并且需要 Workers Paid,但不会 fork DSH protocol、storage、UI 或 tool implementation。
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
该运行时通过上游 Cordis 组合的 `ReactLoopAgent`、`AgentRegistry`、`LlmRuntime`、`ToolRuntime`、`SystemPrompt`、`SessionStore` 和 `SessionPersistence` 运行持久对话。Edge 代码只绑定请求作用域的 DeepSeek 适配器,并把一个原生 DSH `bash` 工具定义映射到 Cloudflare Computer。Durable Object SQLite 实现上游持久化后端约定,write-behind、revision、恢复准备和崩溃恢复仍由 `PersistenceCoordinator` 负责。模型历史从 canonical 事件投影,不再单独持久化。
|
|
12
12
|
|
|
13
13
|
浏览器直接使用上游 Web shell 和上游客户端插件包。构建期 assembler 根据上游 base 与 Web 组合包配置推导浏览器 roster,注入标准 `window.__DSH_BOOT__` graph,并把结果发布为 Cloudflare 静态资源。Durable Object 通过标准 HTTP carrier 实现受支持的上游 `ApiProxy` 方法,并以支持休眠的 WebSocket 提供两条上游 downlink。Edge 会排除缺少对应 host domain 的客户端插件,而不会 fork 其 UI 代码;在服务端 endpoint 可用前,session log export 也属于排除项。一个很小的 Edge 登录外壳会保护上游 UI 与协议,不修改两者本身。可选的本地 host 插件仍不可用。
|
|
14
14
|
|
|
15
15
|
## 本地运行
|
|
16
16
|
|
|
17
|
-
使用 Node.js 22.19
|
|
17
|
+
使用 Node.js 22.19 或更高版本。在仓库根目录安装仓库依赖,以及使用独立 lock 的发布装配依赖:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
pnpm install --frozen-lockfile
|
|
21
|
+
pnpm --dir apps/dsh-edge/standalone install --frozen-lockfile
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
调用 DeepSeek 前,创建一个不会提交到 Git 的 `apps/dsh-edge/.dev.vars` 文件:
|
|
18
25
|
|
|
19
26
|
```dotenv
|
|
20
27
|
DSH_EDGE_ACCESS_KEY=replace-with-at-least-32-random-bytes
|
|
@@ -33,7 +40,7 @@ DSH_EDGE_MAX_COMMAND_TIMEOUT_MS=120000
|
|
|
33
40
|
pnpm --filter dsh-edge dev
|
|
34
41
|
```
|
|
35
42
|
|
|
36
|
-
|
|
43
|
+
该命令会把锁定版本的 Harness 发布包构建为与安装器交付内容相同的预构建 Web 与 Worker 产物,然后让 Wrangler 在不重新打包的情况下启动这些产物。打开输出的地址(通常为 `http://localhost:8787`),输入 owner access key,选择 **Workspace** 并发送消息。Web UI 会创建 lazy blank session,并通过已认证的 Durable Object WebSocket 流式接收该轮次。
|
|
37
44
|
|
|
38
45
|
诊断 API 使用相同的 owner cookie。先登录一次并把 cookie 写入临时 cookie jar,再验证持久文件系统和 shell:
|
|
39
46
|
|
|
@@ -139,31 +146,39 @@ Cloudflare static assets -> upstream Web shell + client plugin graph
|
|
|
139
146
|
|
|
140
147
|
`wrangler.jsonc` 仍然是两种模式唯一的 canonical configuration。发布打包会从 workspace 源码为每种模式构建一个经过测试、已 minify 的 Worker artifact。Direct 模式只在构建时替换 Computer 中不可达的 Dynamic Worker shell-core module;Computer workspace adapter 与 command export 仍使用上游实现。Isolated 模式保留该 shell core,但把不可达的 Direct backend 替换成 fail-closed module,因此每个 artifact 都只携带所选 command runtime。发布的安装器会生成私有的 mode-specific configuration,指向所选 artifact,并要求 Wrangler 使用 `no_bundle` 上传;用户机器不会重新构建 dsh-edge,也不会把上游 Harness package 解析进一个新的 Worker。CI 会从已安装的 tarball 启动 Direct artifact,并拒绝压缩后超过 900 KiB 的产物,从而在 Cloudflare 匿名临时账户上传路径强制执行的 1 MiB 上限下保留余量。
|
|
141
148
|
|
|
142
|
-
|
|
149
|
+
无需克隆仓库,即可从 `next` 渠道运行当前 0.2 预发布安装器:
|
|
143
150
|
|
|
144
151
|
```sh
|
|
145
|
-
|
|
152
|
+
npx dsh-edge@next install
|
|
146
153
|
```
|
|
147
154
|
|
|
155
|
+
稳定渠道使用 `npx dsh-edge@latest install`;在 0.2 正式晋级前,它仍指向 0.1.3。
|
|
156
|
+
|
|
148
157
|
选择相同 runtime 并输入现有 Worker 名称即可升级。部署会保留 Durable Object 数据;由于 Cloudflare secret 只能写入而不能读取,升级会再次要求 owner access key 与 DeepSeek API key,并用输入值替换当前生效值:
|
|
149
158
|
|
|
159
|
+
升级时使用与已安装版本相同的渠道。0.2 预发布版本跟随 `next`:
|
|
160
|
+
|
|
150
161
|
```sh
|
|
151
|
-
|
|
162
|
+
npx dsh-edge@next upgrade
|
|
152
163
|
```
|
|
153
164
|
|
|
165
|
+
稳定部署使用 `npx dsh-edge@latest upgrade`。Edge 设置页会根据已安装版本推导渠道,并复制匹配的命令。
|
|
166
|
+
|
|
154
167
|
安装器会先询问运行时,再询问账户。推荐的 `Free — Direct Shell` 模式可在 Workers Free 上运行,并可使用检测到的 Cloudflare 账户、打开 Cloudflare 登录或注册,也可在不登录的情况下创建临时账户。`Isolated — Dynamic Worker` 需要 Workers Paid,因此只提供已检测到或新认证的账户。Cloudflare 没有提供可靠的本地 Worker Loader entitlement 检查;isolated 安装会由 Cloudflare 对上传进行授权,并在被拒绝时提示启用 Workers Paid 或改用 direct 模式。
|
|
155
168
|
|
|
156
|
-
后续提示会选择 Worker 名称、生成或接收 owner access key、通过隐藏输入收集 DeepSeek API key,并显示最终费用摘要。临时账户安装还会要求用户明确接受 Cloudflare 服务条款与隐私政策。安装器绝不会在未经确认时覆盖现有 Worker。两项 credential 会通过权限模式为 `0600` 的临时 secret 文件传给 Wrangler;Wrangler 子进程只会收到 allowlist 内的运行时环境变量和当前命令选中的 Cloudflare authentication,其他 ambient key、token、password、secret 与 Node 注入选项不会进入子进程。命令结束后临时 secret 文件会被删除,安装器从 Wrangler 结构化输出中取得最终 URL。默认情况下,部署输出会收敛到一个进度提示;在任一命令后添加 `--verbose` 可以查看 Wrangler
|
|
169
|
+
后续提示会选择 Worker 名称、生成或接收 owner access key、通过隐藏输入收集 DeepSeek API key,并显示最终费用摘要。临时账户安装还会要求用户明确接受 Cloudflare 服务条款与隐私政策。安装器绝不会在未经确认时覆盖现有 Worker。两项 credential 会通过权限模式为 `0600` 的临时 secret 文件传给 Wrangler;Wrangler 子进程只会收到 allowlist 内的运行时环境变量和当前命令选中的 Cloudflare authentication,其他 ambient key、token、password、secret 与 Node 注入选项不会进入子进程。命令结束后临时 secret 文件会被删除,安装器从 Wrangler 结构化输出中取得最终 URL。默认情况下,部署输出会收敛到一个进度提示;在任一命令后添加 `--verbose` 可以查看 Wrangler 诊断。
|
|
170
|
+
|
|
171
|
+
上传被接受后,第二个进度提示会在不发送任一 credential 且不跟随重定向的前提下,最多观察公开 `/api/health` 路由 45 秒。它只接受当前 package 的精确版本和所选 runtime。匹配的 response 会产生 ready 卡片;Cloudflare propagation、challenge、占位页、传输错误与旧 release response 都保持 pending,观察到期仍以成功退出,并提示 owner 稍后刷新。该观察不会调用 DeepSeek,也不会访问 Durable Object 状态。最终卡片会输出 URL、owner access key 与明确的下一步;临时账户还会收到一个 bearer claim URL,必须在 60 分钟内认领才能保留 Worker 及其数据。上传被拒绝时,安装器会明确报告未安装;如果 Wrangler 已经创建临时账户,仍会输出其 claim URL,但不会把尚未生效的 owner key 显示为 active。如果上传成功,但输出解析、claim URL 提取、中断处理、激活观察中断或本地清理导致正常交接无法完成,命令仍会在按失败退出前通过恢复卡片输出已生效的 owner key 与当时已知的 URL。安装过程直接通过 Wrangler 上传,不会创建或绑定 GitHub 仓库、Cloudflare Builds 项目或源码构建流水线。
|
|
157
172
|
|
|
158
173
|
从 checkout 开发的贡献者可以用 `pnpm --filter dsh-edge bundle:direct` 和 `pnpm --filter dsh-edge bundle:isolated` 在本地复现两种 release artifact。第一条命令还会执行压缩体积预算检查。
|
|
159
174
|
|
|
160
|
-
贡献者可以在没有 key 且不发起网络请求的情况下重放完整的 Free 临时账户流程。这个 example 会运行实际交付的 bin、真实 prompt、Wrangler
|
|
175
|
+
贡献者可以在没有 key 且不发起网络请求的情况下重放完整的 Free 临时账户流程。这个 example 会运行实际交付的 bin、真实 prompt、Wrangler 子进程、结构化部署输出解析、公开激活观察与最终交接,并替换外部 Cloudflare 边界:
|
|
161
176
|
|
|
162
177
|
```sh
|
|
163
178
|
pnpm --filter dsh-edge example:install
|
|
164
179
|
```
|
|
165
180
|
|
|
166
|
-
##
|
|
181
|
+
## Edge API
|
|
167
182
|
|
|
168
183
|
- `POST /api/<upstream-method>` 接受受支持 `ApiProxy` 方法的上游 `ClientRequest` envelope。Web client 当前使用 session list/search/create/history/models/select/prompt/updateQueue/rename/fork/cancel、host description、workspace list/create/rename/delete/reorder/archive、skills、agent presets、settings 与 credential description,以及 LLM catalog。`agentPreset.read` 会通过上游只读 viewer 渲染程序化 Edge composition,`credentials.describe` 则返回不含 value 的 credential state。Search 会投影 canonical current-message surface,并且只返回有界的上游 result value。Fork 会通过 canonical session seed format 复制 completed-turn prefix,并保留 parent lineage;超过 8,192 个事件或 8 MiB 的 seed 会被 Edge 拒绝,而不会在 Durable Object 中物化无界 history。Queue mutation 通过 live upstream Agent inbox 编辑、移除或把一项提升为 steering;同步 inbox mutation 是上游接纳点,后续 write-behind 与 retirement retry 由 persistence coordinator 负责。Workspace mutation 通过 Durable Object backend 持久化上游 workspace-domain global 与 record shape。Archive 保留 session log 与 workspace slot;unary response 与 Host frame 携带和上游一致的完整 snapshot。
|
|
169
184
|
- `GET /login` 渲染 Edge 持有的 owner form;`POST /api/auth/login` 用已配置的 access key 换取 signed cookie,`GET /api/auth/session` 报告 cookie 是否有效,`POST /api/auth/logout` 清除 cookie。
|