-
Notifications
You must be signed in to change notification settings - Fork 156
Expand file tree
/
Copy pathcordis.yml
More file actions
245 lines (214 loc) · 9.95 KB
/
Copy pathcordis.yml
File metadata and controls
245 lines (214 loc) · 9.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
# dsh-tui interactive front door over the agent-spine bundle.
# Run with: dsh --config cordis.yml (或 npm 安装后走 dsh plugin 机制)
# Requires DEEPSEEK_API_KEY; a terminal TTY is mandatory.
# The user-interaction service: hosts `ctx.userQuestions`, the seam behind
# the model-facing ask_user_question tool. dsh-tui uses the legacy provider
# API when present, otherwise the scoped user-questions/request waterfall;
# the service must live at the root so the agent loop's tool execution can
# reach it.
- id: user-questions
name: '@deepseek-ai/dsh-user-questions'
# The approval service (issue #49): the harness's sandbox escalation seam
# (`sandbox_permissions: danger-full-access`) asks ApprovalService.request(),
# which dispatches an `approval/request` waterfall; dsh-tui registers itself
# as the interactive answerer (ApprovalStore + approval panel). Without this
# row the waterfall has no service and fail-closes to 'unavailable'. Policy
# expression mirrors the profile cordis.patch.yml row exactly (verified by
# scripts/verify-cordis-approval.mjs): ask everywhere except
# danger-full-access (nothing needs asking) and Windows (no sandbox — the
# user's terminal trust model, matching every other terminal coding agent).
- id: approval
name: '@deepseek-ai/dsh-user-approval'
config:
policy: !!js "process.platform === 'win32' ? 'never' : ((process.env.DSH_PERMISSION_MODE ?? 'workspace-write') === 'danger-full-access' ? 'never' : 'ask')"
- id: dsh-tui-workspaces
name: '@deepseek-harness-tui/dsh-tui/workspaces'
- id: dsh-tui-command-trees
name: '@deepseek-harness-tui/dsh-tui/command-trees'
# Optional plugins declare editable settings sections here (issue #165);
# storage, validation and writes remain owned by the dsh settings service.
- id: dsh-tui-settings-sections
name: '@deepseek-harness-tui/dsh-tui/settings-sections'
- id: dsh-tui-scenes
name: '@deepseek-harness-tui/dsh-tui/scenes'
# Plugin-interop anchor (v0.15): unified grant store, runtime generation
# id, Host Descriptor; later contract surfaces mount off this row's apply.
- id: dsh-tui-plugin-host
name: '@deepseek-harness-tui/dsh-tui/plugin-host'
# Plugin-facing UI seams: managed dialogs, status-line contributions,
# keyboard shortcuts, custom session-entry renderers, and runtime themes
# (decision events are fired by the channel and need no row).
- id: dsh-tui-extensions
name: '@deepseek-harness-tui/dsh-tui/extensions'
- id: dsh-tui
name: '@deepseek-harness-tui/dsh-tui'
# Entry-level only: orders/rebinds optional extension services on reload;
# dsh-tui does not hard-inject them at code level, so stale profiles degrade
# to static themes and inert extension surfaces instead of deadlocking boot.
inject: [agents, tuiWorkspaces, tuiScenes, tuiDialogs, tuiStatus, tuiShortcuts, tuiRenderers, tuiThemes]
config:
provider: deepseek-official
# Alt-screen fullscreen (CC 同款): 应用内鼠标选区(选择即复制, OSC 52 +
# wl-copy/xclip/xsel 兜底)、滚轮滚动、双击选词/三击选行。false 则退回
# inline 渲染, 鼠标交给终端模拟器原生选择。
fullscreen: true
# Reasoning effort applied to every request, validated against the live
# route's adapter levels. An unlisted level falls back to the adapter
# default; this wins over the persisted /effort choice and seeds the
# startup header/statusline.
effort: max
# Shift+Tab 会话模式循环(数组顺序即循环顺序;缺省为下面三档)。
# 每档可声明 plan(计划模式开/关)、sandbox(read-only/
# workspace-write/danger-full-access)、approval(ask/never)三个
# 原子的任意子集;未声明的原子不动。首档(index 0)为无标记基态。
# modes:
# - id: default
# plan: false
# sandbox: workspace-write
# approval: ask
# - id: plan
# plan: true
# sandbox: read-only
# approval: ask
# - id: full
# plan: false
# sandbox: danger-full-access
# approval: never
# feeds the chosen session id through this env var (DSH_TUI_ name; the
# pre-rename DSH_CC_ spelling is still honored, issue #120).
sessionId: !!js process.env.DSH_TUI_RESUME_SESSION ?? process.env.DSH_CC_RESUME_SESSION ?? undefined
workspace: !!js process.env.DSH_TUI_WORKSPACE_TARGET ?? undefined
# The DeepSeek adapter. Shipped default: full thinking at max effort.
# rc.6 schema key is `apiKeyEnv` (a credential-ref env var NAME, default
# DEEPSEEK_API_KEY), not `apiKey`; the old snapshot's `apiKey` key is
# dropped by the loader and would never take effect.
- id: llm-deepseek
name: '@deepseek-ai/dsh-llm-deepseek'
config:
apiKeyEnv: 'DEEPSEEK_API_KEY'
baseURL: !!js process.env.DEEPSEEK_BASE_URL
thinking: enabled
reasoningEffort: max
# Managed child-process groups for the bash executor.
- id: subprocess
name: '@deepseek-ai/dsh-subprocess-local'
- id: bash
name: '@deepseek-ai/dsh-bash-local'
config:
cwd: !!js process.cwd()
timeoutMs: 60000
# Filesystem service: `@` completion lists the session cwd through it, and
# the model-facing fs tools resolve relative paths from the process cwd.
- id: fs
name: '@deepseek-ai/dsh-fs-local'
config:
cwd: !!js process.cwd()
# Read/write/edit policy loads before the model-facing filesystem tools so
# writes and edits require an observed file (DSH's own fs policy gate).
- id: fs-policy
name: '@deepseek-ai/dsh-fs-observation-policy'
- id: tool-fs
name: '@deepseek-ai/dsh-tool-fs'
# The todo_write tool replaces the logged whole list (DSH's todo tool).
# allowParallelInProgress is REQUIRED (no schema default) — a bare mount
# fails validation. True matches the official dsh-base bundle value.
- id: tool-todo
name: '@deepseek-ai/dsh-tool-todo'
config:
allowParallelInProgress: true
# Subagents: the registry service, then the spawn/fork backends and the
# delegation tools (max depth 1 keeps the TUI's tool cards shallow). The
# core `dsh-subagent` service MUST be mounted before any provider.
- id: subagent
name: '@deepseek-ai/dsh-subagent'
- id: subagent-spawn
name: '@deepseek-ai/dsh-subagent-spawn-in-process'
config:
providerName: spawn
- id: subagent-fork
name: '@deepseek-ai/dsh-subagent-fork-in-process'
config:
providerName: fork
- id: tool-subagent
name: '@deepseek-ai/dsh-tool-subagent'
config:
provider: spawn
toolName: subagent
backgroundMode: continuable
maxDepth: 1
- id: tool-subagent-fork
name: '@deepseek-ai/dsh-tool-subagent'
config:
provider: fork
toolName: subagent_fork
backgroundMode: continuable
maxDepth: 1
- id: agent-spine
name: '@deepseek-ai/dsh-agent-spine-demo'
config:
persona: !!js process.env.DSH_TUI_PERSONA ?? 'You are a coding agent.'
# Workspace context (AGENTS.md injection) at the standard 64KB cap;
# task tools stay at their DSH defaults (on).
workspaceContext:
maxBytes: 65536
# Skills on: the spine mounts the local skill provider (discovers
# SKILL.md catalogs under ~/.dsh, ~/.agents and project roots) plus the
# model-facing skill catalog/load tools.
skills:
enabled: true
# Persisted goal stack: mounts the goal domain service + the model-facing
# goal tool; /goal (command-goal below) needs the service present.
goals: {}
# Human-command registry: plan-mode's /plan and command-goal's /goal register
# here; the TUI merges them into its slash menu and dispatches through the
# registry (logs command/run + command/done). Must mount before the commands.
- id: commands
name: '@deepseek-ai/dsh-commands'
# Plan mode: the plan:policy prompt section, the /plan command and the
# model-facing plan/exit tools (DSH's plan seam). `section` is REQUIRED and
# non-empty — a bare mount fails validation and rolls the whole tree back.
- id: plan-mode
name: '@deepseek-ai/dsh-plan-mode'
config:
section: |
You are in plan mode. Explore and design before presenting the
complete plan through exit_plan_mode.
# /goal — set or view the goal for a long-running task (needs the goal
# domain service mounted by agent-spine's `goals` config above).
- id: command-goal
name: '@deepseek-ai/dsh-command-goal'
# Live working line narration support. dsh-tui computes the visible status
# in-process from base session events; activity/status is never persisted.
# Mounted through @deepseek-harness-tui/dsh-tui's `./working-activity`
# re-export (not the bare `dsh-working-activity` name) so the row resolves
# from install layouts that never link transitive dependencies into the
# boot anchor's node_modules — pnpm's isolated profile layout, issue #60.
- id: working-activity
name: '@deepseek-harness-tui/dsh-tui/working-activity'
config:
publish: false
publishIntervalMs: 500
# Durable session log (DSH's own persistence seam): /resume and rewind both
# rely on this backend writing every session/event. Root defaults under the
# user home so sessions survive across terminals (Windows: USERPROFILE).
- id: sessions
name: '@deepseek-ai/dsh-session-persistence-jsonl'
config:
root: !!js process.env.DSH_TUI_SESSION_ROOT ?? (process.env.USERPROFILE ?? process.env.HOME) + '/.dsh-tui/sessions'
# Read-only session lineage — the subagent service's /agents listing reads it.
- id: session-query
name: '@deepseek-ai/dsh-session-query'
- id: session-checkpoints
name: '@deepseek-ai/dsh-session-checkpoint-policy'
# Token accounting + manual session compaction (/compact).
- id: token-meter
name: '@deepseek-ai/dsh-token-meter'
- id: compact
name: '@deepseek-ai/dsh-compaction-basic'
config:
# DeepSeek advertises a 1M context window, so the 80% default threshold
# would never make manual /compact useful. Default 20% (200k tokens)
# with a 5% retained tail; both are overridable for tests and must keep
# retainRatio < thresholdRatio (BasicCompactConfig validates this).
thresholdRatio: !!js parseFloat(process.env.DSH_TUI_COMPACT_RATIO ?? '0.2')
retainRatio: !!js parseFloat(process.env.DSH_TUI_COMPACT_RETAIN ?? '0.05')