dsh-edge 0.3.0 → 0.4.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 +2 -2
- package/README.md +12 -10
- package/README.zh.md +12 -10
- package/dist/index.html +1 -1
- package/dist/plugins/@deepseek-ai/dsh-client-ui-settings-models/client.js +2812 -0
- package/package.json +27 -23
- package/scripts/cli.mjs +10 -0
- package/scripts/install.mjs +2 -2
- package/worker/direct/index.js +730 -728
- package/worker/isolated/index.js +485 -483
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-edge",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.4.0-alpha.2",
|
|
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",
|
|
7
7
|
"type": "module",
|
|
@@ -24,15 +24,18 @@
|
|
|
24
24
|
"url": "git+https://github.com/pawaca/dsh-edge.git",
|
|
25
25
|
"directory": "apps/dsh-edge"
|
|
26
26
|
},
|
|
27
|
-
"homepage": "https://github.com/pawaca/dsh-edge
|
|
27
|
+
"homepage": "https://github.com/pawaca/dsh-edge#readme",
|
|
28
28
|
"bugs": {
|
|
29
29
|
"url": "https://github.com/pawaca/dsh-edge/issues"
|
|
30
30
|
},
|
|
31
31
|
"keywords": [
|
|
32
32
|
"deepseek",
|
|
33
|
-
"
|
|
33
|
+
"deepseek-harness",
|
|
34
|
+
"ai-agents",
|
|
35
|
+
"byok",
|
|
34
36
|
"cloudflare-workers",
|
|
35
|
-
"durable-objects"
|
|
37
|
+
"durable-objects",
|
|
38
|
+
"self-hosted"
|
|
36
39
|
],
|
|
37
40
|
"engines": {
|
|
38
41
|
"node": ">=22.14.0"
|
|
@@ -43,6 +46,24 @@
|
|
|
43
46
|
"dshEdge": {
|
|
44
47
|
"upstreamVersion": "0.1.1-rc.1"
|
|
45
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
|
+
},
|
|
46
67
|
"dependencies": {
|
|
47
68
|
"@clack/prompts": "1.7.0",
|
|
48
69
|
"compare-versions": "6.1.1",
|
|
@@ -82,22 +103,5 @@
|
|
|
82
103
|
"typescript": "^6.0.3",
|
|
83
104
|
"vitest": "^4.1.8",
|
|
84
105
|
"ws": "^8.21.0"
|
|
85
|
-
},
|
|
86
|
-
"scripts": {
|
|
87
|
-
"bundle:direct": "pnpm run web:build && pnpm --dir standalone run build:worker:direct && node standalone/scripts/promote.mjs direct",
|
|
88
|
-
"bundle:isolated": "pnpm run web:build && pnpm --dir standalone run build:worker:isolated && node standalone/scripts/promote.mjs isolated",
|
|
89
|
-
"bundle:workers": "pnpm --dir standalone run build && pnpm --dir standalone run verify && node standalone/scripts/promote.mjs all",
|
|
90
|
-
"dev": "pnpm run bundle:direct && node scripts/dev.mjs direct",
|
|
91
|
-
"dev:isolated": "pnpm run bundle:isolated && node scripts/dev.mjs isolated",
|
|
92
|
-
"dsh-edge": "node scripts/cli.mjs",
|
|
93
|
-
"example:install": "node examples/install-keyless.mjs",
|
|
94
|
-
"install:cloudflare": "pnpm run bundle:workers && node scripts/cli.mjs install",
|
|
95
|
-
"legal:write": "node scripts/legal-files.mjs write",
|
|
96
|
-
"pack:verify": "node scripts/verify-packed.mjs",
|
|
97
|
-
"web:build": "pnpm --dir standalone run build:web && node standalone/scripts/promote.mjs web",
|
|
98
|
-
"test": "vitest run --root ../.. --project edge-runtime",
|
|
99
|
-
"test:integration": "pnpm run bundle:workers && node tests/run-session-integration.mjs",
|
|
100
|
-
"test:snapshot": "vitest run --root ../.. --config apps/dsh-edge/vitest.snapshot.config.ts",
|
|
101
|
-
"typecheck": "tsc --noEmit"
|
|
102
106
|
}
|
|
103
|
-
}
|
|
107
|
+
}
|
package/scripts/cli.mjs
CHANGED
|
@@ -205,6 +205,16 @@ export function createInstallerUi(
|
|
|
205
205
|
})))
|
|
206
206
|
},
|
|
207
207
|
async deepSeekKey(validate) {
|
|
208
|
+
const mode = await requireAnswer(await clack.select(withOutput({
|
|
209
|
+
message: 'DeepSeek API key setup',
|
|
210
|
+
initialValue: 'enter',
|
|
211
|
+
signal,
|
|
212
|
+
options: [
|
|
213
|
+
{ value: 'enter', label: 'Enter now' },
|
|
214
|
+
{ value: 'skip', label: 'Configure later in Settings → Models', hint: 'optional' },
|
|
215
|
+
],
|
|
216
|
+
})))
|
|
217
|
+
if (mode === 'skip') return ''
|
|
208
218
|
return await requireAnswer(await clack.password(withOutput({
|
|
209
219
|
message: 'DeepSeek API key',
|
|
210
220
|
mask: '•',
|
package/scripts/install.mjs
CHANGED
|
@@ -231,7 +231,7 @@ export function validateOwnerSecret(value) {
|
|
|
231
231
|
|
|
232
232
|
/** Validate a provider key without encoding assumptions that DeepSeek does not promise. */
|
|
233
233
|
export function validateDeepSeekKey(value) {
|
|
234
|
-
if (value === '') return
|
|
234
|
+
if (value === undefined || value === '') return undefined
|
|
235
235
|
if (value !== value.trim()) return 'The DeepSeek API key cannot start or end with whitespace.'
|
|
236
236
|
if (CONTROL_CHARACTER.test(value)) return 'The DeepSeek API key cannot contain control characters.'
|
|
237
237
|
}
|
|
@@ -685,7 +685,7 @@ export async function installEdge({
|
|
|
685
685
|
...bucketName === undefined ? {} : { r2BucketName: bucketName },
|
|
686
686
|
})
|
|
687
687
|
await writeFile(secretsFile, JSON.stringify({
|
|
688
|
-
DEEPSEEK_API_KEY: deepSeekKey,
|
|
688
|
+
...deepSeekKey !== '' ? { DEEPSEEK_API_KEY: deepSeekKey } : {},
|
|
689
689
|
DSH_EDGE_ACCESS_KEY: ownerSecret,
|
|
690
690
|
}), { encoding: 'utf8', mode: 0o600, flag: 'wx' })
|
|
691
691
|
|