dsh-edge 0.5.0 → 0.5.1-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 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: 04d37d38a8414b164ab161cef9a0f29a5d0da137
6
- README.zh.md: d8e4d6e4958b6d88df60b23ae16e7484e4fb99f3
5
+ README.md: f870511de0609d04c9fed66ec1b08a50be3378d6
6
+ README.zh.md: 537bee540b01ca55b65d8c08e3e35b16da88fcf6
package/README.md CHANGED
@@ -113,7 +113,7 @@ This reference separates code that runs natively in Workers, code adapted at an
113
113
  | DeepSeek transport | Fetch, SSE parsing, wire translation, retry metadata | Reused | Construct the upstream `DeepSeekAdapter` per request. `nodejs_compat` supplies its compatible Node APIs. |
114
114
  | Provider attribution | Package version loaded with Node `createRequire` | Reused after portability fix | Import package metadata statically so bundlers preserve the same version source without requiring `import.meta.url` at runtime. |
115
115
  | LLM protocol | DSH messages, content blocks, stream chunks, tool calls, usage, and finish reasons | Reused | Let upstream `LlmRuntime` and `ReactLoopAgent` assemble, stream, and log the model exchange. |
116
- | Agent loop | Cordis-composed `ReactLoopAgent` with hooks, guards, sessions, and tools | Reused | Create and cold-resume agents through `AgentRegistry`; keep optional Node-oriented plugins such as local compaction outside the edge composition until adapted. |
116
+ | Agent loop | Cordis-composed `ReactLoopAgent` with hooks, guards, sessions, and tools | Reused | Create and cold-resume agents through `AgentRegistry`. Context compaction, token metering, tool-result pruning, and automatic session title generation run as upstream cordis plugins. |
117
117
  | Bash tool | Node subprocess, sandbox, terminal, and job services | Adapted at the native tool seam | Register an upstream `ToolDefinition`, but execute its body through the configured Computer workspace backend and just-bash. The default direct backend runs inside the owner Durable Object with hardened interpreter limits and no network command; adding a `LOADER` binding selects Computer's isolated Worker Shell backend. Native tool cancellation sends `SIGINT` through the Computer execution handle. Deployment configuration supplies an explicit default timeout and caller-selectable ceiling, while `timedOut` reports the deadline independently from exit and cancellation status. Native binaries, background processes, PTYs, and arbitrary Linux behavior are unavailable. |
118
118
  | Workspace filesystem | Local filesystem services and host paths | Adapted | Store `/workspace` in the owner's SQLite-backed Durable Object VFS. |
119
119
  | Session persistence | `SessionPersistence` service, `PersistenceCoordinator`, and local JSONL/SQLite backends | Native backend adaptation | Reuse the upstream service and coordinator ownership. Implement storage primitives over Durable Object SQL with the upstream header/event mapping. One Edge-only table retains empty session headers across transparent hibernation and is removed when canonical rows materialize; no Edge turn or message schema exists. Internal coordinator helpers validate the bounded replay loader and abandon a failed unmaterialized creation before disposal. |
package/README.zh.md CHANGED
@@ -113,7 +113,7 @@ curl -b /tmp/dsh-edge-cookie -N -X POST -H 'content-type: application/json' \
113
113
  | DeepSeek transport | Fetch、SSE 解析、wire translation 和 retry metadata | 复用 | 每个请求构造一个上游 `DeepSeekAdapter`;其兼容的 Node API 由 `nodejs_compat` 提供。 |
114
114
  | Provider attribution | 用 Node `createRequire` 加载 package version | 完成可移植修复后复用 | 静态导入 package metadata,让 bundler 保留同一个版本来源,运行时不再依赖 `import.meta.url`。 |
115
115
  | LLM protocol | DSH messages、content blocks、stream chunks、tool calls、usage 和 finish reasons | 复用 | 由上游 `LlmRuntime` 和 `ReactLoopAgent` 组装、流式处理并记录 model exchange。 |
116
- | Agent loop | 由 Cordis 组合、带 hooks、guards、sessions 和 tools 的 `ReactLoopAgent` | 复用 | 通过 `AgentRegistry` 创建和冷恢复 agent;local compaction 等可选 Node-oriented plugins 在完成适配前不加入 edge composition。 |
116
+ | Agent loop | 由 Cordis 组合、带 hooks、guards、sessions 和 tools 的 `ReactLoopAgent` | 复用 | 通过 `AgentRegistry` 创建和冷恢复 agent。上下文压缩、token 计量、工具结果修剪和自动 session 标题生成作为上游 cordis 插件运行。 |
117
117
  | Bash tool | Node subprocess、sandbox、terminal 和 job services | 在原生 tool seam 上适配 | 注册上游 `ToolDefinition`,但通过配置的 Computer workspace backend 和 just-bash 执行其 body。默认 direct backend 在 owner Durable Object 内运行,启用 hardened interpreter limits 且不提供网络命令;添加 `LOADER` binding 后会选择 Computer 的 isolated Worker Shell backend。原生 tool cancellation 会通过 Computer execution handle 发送 `SIGINT`。部署配置提供明确的默认 timeout 与调用方可选值上限,`timedOut` 则独立于 exit 与 cancellation status 报告 deadline。不支持原生二进制、后台进程、PTY 和任意 Linux 行为。 |
118
118
  | Workspace filesystem | 本地 filesystem services 和 host paths | 适配 | 在 owner 基于 SQLite 的 Durable Object VFS 中保存 `/workspace`。 |
119
119
  | Session persistence | `SessionPersistence` service、`PersistenceCoordinator` 及本地 JSONL/SQLite backends | 原生 backend 适配 | 复用上游 service 及 coordinator 的职责划分,在 Durable Object SQL 上实现存储原语,并使用上游 header/event 映射。一个 Edge 独有表会在透明休眠期间保留 empty session header,并在 canonical rows 物化时删除;Edge 不定义 turn 或 message schema。内部 coordinator helper 负责校验有界 replay loader,并在 disposal 前放弃失败且尚未物化的创建。 |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-edge",
3
- "version": "0.5.0",
3
+ "version": "0.5.1-alpha.2",
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",
@@ -46,24 +46,6 @@
46
46
  "dshEdge": {
47
47
  "upstreamVersion": "0.1.1-rc.2"
48
48
  },
49
- "scripts": {
50
- "bundle:direct": "pnpm run web:build && pnpm --dir standalone run build:worker:direct && node standalone/scripts/promote.mjs direct",
51
- "bundle:isolated": "pnpm run web:build && pnpm --dir standalone run build:worker:isolated && node standalone/scripts/promote.mjs isolated",
52
- "bundle:workers": "pnpm --dir standalone run build && pnpm --dir standalone run verify && node standalone/scripts/promote.mjs all",
53
- "dev": "pnpm run bundle:direct && node scripts/dev.mjs direct",
54
- "dev:isolated": "pnpm run bundle:isolated && node scripts/dev.mjs isolated",
55
- "dsh-edge": "node scripts/cli.mjs",
56
- "example:install": "node examples/install-keyless.mjs",
57
- "install:cloudflare": "pnpm run bundle:workers && node scripts/cli.mjs install",
58
- "legal:write": "node scripts/legal-files.mjs write",
59
- "pack:verify": "node scripts/verify-packed.mjs",
60
- "prepack": "node scripts/legal-files.mjs verify && pnpm run bundle:workers",
61
- "web:build": "pnpm --dir standalone run build:web && node standalone/scripts/promote.mjs web",
62
- "test": "vitest run --root ../.. --project edge-runtime",
63
- "test:integration": "pnpm run bundle:workers && node tests/run-session-integration.mjs",
64
- "test:snapshot": "vitest run --root ../.. --config apps/dsh-edge/vitest.snapshot.config.ts",
65
- "typecheck": "tsc --noEmit"
66
- },
67
49
  "dependencies": {
68
50
  "@clack/prompts": "1.7.0",
69
51
  "compare-versions": "6.1.1",
@@ -80,6 +62,9 @@
80
62
  "@deepseek-ai/dsh-anonymous-user-id": "0.1.1-rc.2",
81
63
  "@deepseek-ai/dsh-attachment": "0.1.1-rc.2",
82
64
  "@deepseek-ai/dsh-brand": "0.1.1-rc.2",
65
+ "@deepseek-ai/dsh-compaction": "0.1.1-rc.2",
66
+ "@deepseek-ai/dsh-compaction-basic": "0.1.1-rc.2",
67
+ "@deepseek-ai/dsh-compaction-tool-result-pruner": "0.1.1-rc.2",
83
68
  "@deepseek-ai/dsh-credentials": "0.1.1-rc.2",
84
69
  "@deepseek-ai/dsh-host-apiproxy": "0.1.1-rc.2",
85
70
  "@deepseek-ai/dsh-launch-environment": "0.1.1-rc.2",
@@ -87,9 +72,14 @@
87
72
  "@deepseek-ai/dsh-llm-deepseek": "0.1.1-rc.2",
88
73
  "@deepseek-ai/dsh-session": "0.1.1-rc.2",
89
74
  "@deepseek-ai/dsh-session-persistence": "0.1.1-rc.2",
75
+ "@deepseek-ai/dsh-session-projection": "0.1.1-rc.2",
90
76
  "@deepseek-ai/dsh-session-query": "0.1.1-rc.2",
91
77
  "@deepseek-ai/dsh-session-title": "0.1.1-rc.2",
78
+ "@deepseek-ai/dsh-session-title-first-prompt-llm": "0.1.1-rc.2",
79
+ "@deepseek-ai/dsh-session-title-llm": "0.1.1-rc.2",
92
80
  "@deepseek-ai/dsh-settings": "0.1.1-rc.2",
81
+ "@deepseek-ai/dsh-timeout": "0.1.1-rc.2",
82
+ "@deepseek-ai/dsh-token-meter": "0.1.1-rc.2",
93
83
  "@deepseek-ai/dsh-system-prompt": "0.1.1-rc.2",
94
84
  "@deepseek-ai/dsh-tool-call-timeout-policy": "0.1.1-rc.2",
95
85
  "@deepseek-ai/dsh-tool-web": "0.1.1-rc.2",
@@ -103,5 +93,22 @@
103
93
  "typescript": "^6.0.3",
104
94
  "vitest": "^4.1.8",
105
95
  "ws": "^8.21.0"
96
+ },
97
+ "scripts": {
98
+ "bundle:direct": "pnpm run web:build && pnpm --dir standalone run build:worker:direct && node standalone/scripts/promote.mjs direct",
99
+ "bundle:isolated": "pnpm run web:build && pnpm --dir standalone run build:worker:isolated && node standalone/scripts/promote.mjs isolated",
100
+ "bundle:workers": "pnpm --dir standalone run build && pnpm --dir standalone run verify && node standalone/scripts/promote.mjs all",
101
+ "dev": "pnpm run bundle:direct && node scripts/dev.mjs direct",
102
+ "dev:isolated": "pnpm run bundle:isolated && node scripts/dev.mjs isolated",
103
+ "dsh-edge": "node scripts/cli.mjs",
104
+ "example:install": "node examples/install-keyless.mjs",
105
+ "install:cloudflare": "pnpm run bundle:workers && node scripts/cli.mjs install",
106
+ "legal:write": "node scripts/legal-files.mjs write",
107
+ "pack:verify": "node scripts/verify-packed.mjs",
108
+ "web:build": "pnpm --dir standalone run build:web && node standalone/scripts/promote.mjs web",
109
+ "test": "vitest run --root ../.. --project edge-runtime",
110
+ "test:integration": "pnpm run bundle:workers && node tests/run-session-integration.mjs",
111
+ "test:snapshot": "vitest run --root ../.. --config apps/dsh-edge/vitest.snapshot.config.ts",
112
+ "typecheck": "tsc --noEmit"
106
113
  }
107
- }
114
+ }