dsh-acp-enhanced 0.1.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/LICENSE +21 -0
- package/README-en.md +336 -0
- package/README.md +290 -0
- package/cordis.patch.yml +28 -0
- package/lib/codec.js +87 -0
- package/lib/index.js +1429 -0
- package/package.json +65 -0
- package/profile/cordis.yml +138 -0
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-acp-enhanced",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Enhanced ACP server for DeepSeek Harness: block-level streaming, usage/stat telemetry (cache hit rate, token speed, input/output tokens, context length, turns, tool timing), model & reasoning-effort switching, and permission-preset control over the ACP wire (Zed-friendly)",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"dsh",
|
|
7
|
+
"dsh-plugin",
|
|
8
|
+
"deepseek-harness",
|
|
9
|
+
"acp",
|
|
10
|
+
"agent-client-protocol",
|
|
11
|
+
"zed",
|
|
12
|
+
"zed-editor",
|
|
13
|
+
"ai-agent",
|
|
14
|
+
"coding-assistant",
|
|
15
|
+
"llm"
|
|
16
|
+
],
|
|
17
|
+
"type": "module",
|
|
18
|
+
"main": "lib/index.js",
|
|
19
|
+
"exports": {
|
|
20
|
+
".": "./lib/index.js",
|
|
21
|
+
"./package.json": "./package.json"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"lib",
|
|
25
|
+
"profile",
|
|
26
|
+
"cordis.patch.yml",
|
|
27
|
+
"README.md",
|
|
28
|
+
"README-en.md",
|
|
29
|
+
"LICENSE"
|
|
30
|
+
],
|
|
31
|
+
"scripts": {
|
|
32
|
+
"test:client": "node scripts/acp-client.mjs"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@agentclientprotocol/sdk": "0.25.1",
|
|
36
|
+
"@deepseek-ai/cordis": "4.0.1-rc.4",
|
|
37
|
+
"@deepseek-ai/cordis-plugin-include": "1.0.6-rc.4",
|
|
38
|
+
"@deepseek-ai/cordis-plugin-loader": "1.0.2-rc.4",
|
|
39
|
+
"@deepseek-ai/dsh-agent": "0.1.0-rc.6",
|
|
40
|
+
"@deepseek-ai/dsh-agent-instructions": "0.1.0-rc.6",
|
|
41
|
+
"@deepseek-ai/dsh-invariants": "0.1.0-rc.6",
|
|
42
|
+
"@deepseek-ai/dsh-llm": "0.1.0-rc.6",
|
|
43
|
+
"@deepseek-ai/dsh-permission-presets": "0.1.0-rc.6",
|
|
44
|
+
"@deepseek-ai/dsh-session": "0.1.0-rc.6",
|
|
45
|
+
"@deepseek-ai/dsh-session-query": "0.1.0-rc.6",
|
|
46
|
+
"@deepseek-ai/dsh-tools": "0.1.0-rc.6",
|
|
47
|
+
"@deepseek-ai/dsh-user-approval": "0.1.0-rc.6",
|
|
48
|
+
"@deepseek-ai/schemastery": "^3.18.1",
|
|
49
|
+
"zod": "^4.4.3"
|
|
50
|
+
},
|
|
51
|
+
"peerDependencies": {
|
|
52
|
+
"@deepseek-ai/cordis": "^4.0.1-rc.1",
|
|
53
|
+
"@deepseek-ai/dsh-agent": "^0.0.1-rc.1",
|
|
54
|
+
"@deepseek-ai/dsh-llm": "^0.0.1-rc.1",
|
|
55
|
+
"@deepseek-ai/dsh-permission-presets": "^0.0.1-rc.1",
|
|
56
|
+
"@deepseek-ai/dsh-session": "^0.0.1-rc.1",
|
|
57
|
+
"@deepseek-ai/dsh-user-approval": "^0.0.1-rc.1"
|
|
58
|
+
},
|
|
59
|
+
"license": "MIT",
|
|
60
|
+
"dsh": {
|
|
61
|
+
"bundle": {
|
|
62
|
+
"patch": "./cordis.patch.yml"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# acp-enhanced profile: an ACP automation server exposing the Web-GUI surfaces
|
|
2
|
+
# (block-level streaming, usage/stat telemetry, model & reasoning-effort
|
|
3
|
+
# switching, permission-preset modes) to ACP clients such as the Zed editor.
|
|
4
|
+
#
|
|
5
|
+
# Run with:
|
|
6
|
+
# dsh --profile acp-enhanced
|
|
7
|
+
# then register it in Zed settings.json under agent_servers (see README.md).
|
|
8
|
+
#
|
|
9
|
+
# Stdout carries ONLY newline-delimited ACP JSON-RPC. No logger may write to
|
|
10
|
+
# stdout; diagnostics belong on stderr.
|
|
11
|
+
|
|
12
|
+
# ── the shared agent spine (llm, session, system-prompt, tools, skill,
|
|
13
|
+
# agent registry + loop, goals, jobs) with NO pre-created agents ─────────
|
|
14
|
+
- id: spine
|
|
15
|
+
name: '@deepseek-ai/dsh-agent-spine-demo'
|
|
16
|
+
config:
|
|
17
|
+
agents: []
|
|
18
|
+
maxParallelToolCalls: 1
|
|
19
|
+
workspaceContext:
|
|
20
|
+
maxBytes: 65536
|
|
21
|
+
persona: >-
|
|
22
|
+
You are a coding assistant powered by the {{model}} model. Your working
|
|
23
|
+
directory is {{cwd}}. Your bash tool runs under a file sandbox — a
|
|
24
|
+
`[sandbox: file access denied …]` result is policy, not a command bug.
|
|
25
|
+
|
|
26
|
+
Verify your work by running the code or tests. Keep answers brief and factual.
|
|
27
|
+
|
|
28
|
+
# ── the DeepSeek adapter ────────────────────────────────────────────────────
|
|
29
|
+
- id: llm-deepseek
|
|
30
|
+
name: '@deepseek-ai/dsh-llm-deepseek'
|
|
31
|
+
config:
|
|
32
|
+
thinking: enabled
|
|
33
|
+
reasoningEffort: max
|
|
34
|
+
models:
|
|
35
|
+
- id: deepseek-v4-flash
|
|
36
|
+
- id: deepseek-v4-pro
|
|
37
|
+
|
|
38
|
+
# ── sandbox stack: bash + filesystem share one workspace-write policy ───────
|
|
39
|
+
- id: sandbox
|
|
40
|
+
name: '@deepseek-ai/dsh-sandbox-local'
|
|
41
|
+
|
|
42
|
+
- id: sandbox-policy
|
|
43
|
+
name: '@deepseek-ai/dsh-sandbox-policy'
|
|
44
|
+
config:
|
|
45
|
+
mode: !!js "process.env.DSH_PERMISSION_MODE ?? 'workspace-write'"
|
|
46
|
+
workspaceRoot: !!js process.cwd()
|
|
47
|
+
|
|
48
|
+
- id: subprocess
|
|
49
|
+
name: '@deepseek-ai/dsh-subprocess-local'
|
|
50
|
+
|
|
51
|
+
- id: bash
|
|
52
|
+
name: '@deepseek-ai/dsh-bash-sandbox'
|
|
53
|
+
config:
|
|
54
|
+
timeoutMs: 60000
|
|
55
|
+
|
|
56
|
+
- id: approval
|
|
57
|
+
name: '@deepseek-ai/dsh-user-approval'
|
|
58
|
+
config:
|
|
59
|
+
policy: !!js "(process.env.DSH_PERMISSION_MODE ?? 'workspace-write') === 'danger-full-access' ? 'never' : 'ask'"
|
|
60
|
+
|
|
61
|
+
# ── permission presets: the ACP mode/config surface for sandbox+approval ────
|
|
62
|
+
- id: permission-presets
|
|
63
|
+
name: '@deepseek-ai/dsh-permission-presets'
|
|
64
|
+
config:
|
|
65
|
+
presets:
|
|
66
|
+
read-only:
|
|
67
|
+
name: Read-only
|
|
68
|
+
description: Read-only sandbox; every write asks for approval.
|
|
69
|
+
sandbox: read-only
|
|
70
|
+
approval: ask
|
|
71
|
+
workspace-write:
|
|
72
|
+
name: Workspace write
|
|
73
|
+
description: Write inside the workspace; wider retries require approval.
|
|
74
|
+
sandbox: workspace-write
|
|
75
|
+
approval: ask
|
|
76
|
+
danger-full-access:
|
|
77
|
+
name: Full access
|
|
78
|
+
description: Full file access without approval prompts.
|
|
79
|
+
sandbox: danger-full-access
|
|
80
|
+
approval: never
|
|
81
|
+
|
|
82
|
+
# ── durability: JSONL session log + checkpointing + derived query index ─────
|
|
83
|
+
- id: session-persistence-jsonl
|
|
84
|
+
name: '@deepseek-ai/dsh-session-persistence-jsonl'
|
|
85
|
+
config:
|
|
86
|
+
root: !!js process.env.DSH_ACP_SESSIONS_ROOT ?? './.sessions'
|
|
87
|
+
|
|
88
|
+
- id: session-checkpoint-policy
|
|
89
|
+
name: '@deepseek-ai/dsh-session-checkpoint-policy'
|
|
90
|
+
|
|
91
|
+
- id: session-query-sqlite
|
|
92
|
+
name: '@deepseek-ai/dsh-session-query-sqlite'
|
|
93
|
+
config:
|
|
94
|
+
path: !!js process.env.DSH_ACP_SESSIONS_ROOT ?? './.sessions'
|
|
95
|
+
openAt: startup
|
|
96
|
+
|
|
97
|
+
- id: session-projection
|
|
98
|
+
name: '@deepseek-ai/dsh-session-projection'
|
|
99
|
+
|
|
100
|
+
# ── telemetry & compaction ──────────────────────────────────────────────────
|
|
101
|
+
- id: token-meter
|
|
102
|
+
name: '@deepseek-ai/dsh-token-meter'
|
|
103
|
+
|
|
104
|
+
- id: compaction-basic
|
|
105
|
+
name: '@deepseek-ai/dsh-compaction-basic'
|
|
106
|
+
config:
|
|
107
|
+
thresholdRatio: 0.8
|
|
108
|
+
retainRatio: 0.08
|
|
109
|
+
maxTokens: 8192
|
|
110
|
+
compactionRetries: 1
|
|
111
|
+
|
|
112
|
+
# ── filesystem tools on the same sandbox policy ─────────────────────────────
|
|
113
|
+
- id: fs-sandbox
|
|
114
|
+
name: '@deepseek-ai/dsh-fs-sandbox'
|
|
115
|
+
config:
|
|
116
|
+
cwd: !!js process.cwd()
|
|
117
|
+
|
|
118
|
+
- id: fs-observation-policy
|
|
119
|
+
name: '@deepseek-ai/dsh-fs-observation-policy'
|
|
120
|
+
|
|
121
|
+
- id: tool-fs
|
|
122
|
+
name: '@deepseek-ai/dsh-tool-fs'
|
|
123
|
+
|
|
124
|
+
# ── remaining model-facing tools ────────────────────────────────────────────
|
|
125
|
+
- id: tool-todo
|
|
126
|
+
name: '@deepseek-ai/dsh-tool-todo'
|
|
127
|
+
config:
|
|
128
|
+
allowParallelInProgress: true
|
|
129
|
+
|
|
130
|
+
- id: repeat-tool-reminder
|
|
131
|
+
name: '@deepseek-ai/dsh-repeat-tool-reminder'
|
|
132
|
+
|
|
133
|
+
# ── the enhanced ACP transport (stdout is the protocol wire) ────────────────
|
|
134
|
+
- id: acp-enhanced
|
|
135
|
+
name: 'dsh-acp-enhanced'
|
|
136
|
+
config:
|
|
137
|
+
provider: deepseek-official
|
|
138
|
+
model: deepseek-v4-flash
|