@zoraxylia/dsh-codex-adapter 0.0.0-stage → 0.1.1

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.
Files changed (88) hide show
  1. package/.claude-plugin/marketplace.json +15 -0
  2. package/.claude-plugin/plugin.json +8 -0
  3. package/.mcp.json +8 -0
  4. package/LICENSE +21 -0
  5. package/README.de.md +480 -0
  6. package/README.es.md +480 -0
  7. package/README.fr.md +480 -0
  8. package/README.hi.md +480 -0
  9. package/README.id.md +480 -0
  10. package/README.ja.md +478 -0
  11. package/README.ko.md +480 -0
  12. package/README.md +483 -2
  13. package/README.pt.md +480 -0
  14. package/README.ru.md +480 -0
  15. package/README.th.md +480 -0
  16. package/README.tr.md +480 -0
  17. package/README.vi.md +480 -0
  18. package/README.zh-TW.md +478 -0
  19. package/README.zh.md +482 -0
  20. package/agents/ds-flash.md +17 -0
  21. package/agents/ds-pro.md +17 -0
  22. package/agy/agents/ds-flash.md +18 -0
  23. package/agy/agents/ds-pro.md +18 -0
  24. package/agy/skills/dsh-config/SKILL.md +6 -0
  25. package/agy/skills/dsh-playbook/SKILL.md +65 -0
  26. package/agy/skills/dsh-status/SKILL.md +6 -0
  27. package/codex/agents/ds-flash.toml +23 -0
  28. package/codex/agents/ds-pro.toml +23 -0
  29. package/codex/prompts/dsh-config.md +3 -0
  30. package/codex/prompts/dsh-playbook.md +60 -0
  31. package/codex/prompts/dsh-status.md +1 -0
  32. package/commands/config.md +9 -0
  33. package/commands/off.md +5 -0
  34. package/commands/on.md +5 -0
  35. package/commands/playbook.md +64 -0
  36. package/commands/status.md +5 -0
  37. package/cordis.patch.yml +4 -0
  38. package/docs/images/dsh-adapter-host.png +0 -0
  39. package/docs/images/dsh-adapter-jobs.png +0 -0
  40. package/docs/images/dsh-adapter-logo.png +0 -0
  41. package/docs/images/dsh-adapter-overview.png +0 -0
  42. package/grok/agents/ds-flash.md +19 -0
  43. package/grok/agents/ds-pro.md +19 -0
  44. package/grok/commands/dsh-config.md +9 -0
  45. package/grok/commands/dsh-playbook.md +66 -0
  46. package/grok/commands/dsh-status.md +5 -0
  47. package/lib/client.js +2694 -0
  48. package/lib/server.mjs +15417 -0
  49. package/package.json +138 -4
  50. package/scripts/build-client.mjs +23 -0
  51. package/scripts/build-mcp.mjs +43 -0
  52. package/scripts/bump-version.mjs +79 -0
  53. package/scripts/fake-agy.sh +23 -0
  54. package/scripts/release-local.mjs +87 -0
  55. package/scripts/smoke-bundle.mjs +166 -0
  56. package/scripts/smoke-cwd.mjs +41 -0
  57. package/scripts/smoke-pack.mjs +285 -0
  58. package/scripts/smoke.mjs +79 -0
  59. package/scripts/verify-cli-workers.mjs +133 -0
  60. package/scripts/verify-wpc10-client.mjs +237 -0
  61. package/scripts/verify-wpc14-proc-endpoints.mjs +356 -0
  62. package/scripts/verify-wpc9-guardrails.mjs +432 -0
  63. package/src/cli-workers.mjs +396 -0
  64. package/src/client/index.tsx +1135 -0
  65. package/src/client/jobs-view.ts +374 -0
  66. package/src/cwd-lock.mjs +91 -0
  67. package/src/hub/index.mjs +643 -0
  68. package/src/hub-client.mjs +72 -0
  69. package/src/i18n.mjs +19 -0
  70. package/src/install/cli.mjs +34 -0
  71. package/src/install/install.mjs +580 -0
  72. package/src/jobs.mjs +289 -0
  73. package/src/multimodal.mjs +744 -0
  74. package/src/origin-guard.mjs +133 -0
  75. package/src/paths.mjs +43 -0
  76. package/src/plugin-env.mjs +65 -0
  77. package/src/proc-kill.mjs +208 -0
  78. package/src/process-info.mjs +60 -0
  79. package/src/provider-probe.mjs +35 -0
  80. package/src/server.mjs +438 -0
  81. package/src/status-shard.mjs +95 -0
  82. package/src/tier-binding.mjs +63 -0
  83. package/src/vision-route.mjs +139 -0
  84. package/src/worker-profiles.mjs +95 -0
  85. package/src/worker-question.mjs +22 -0
  86. package/statusline/statusline.sh +14 -0
  87. package/statusline/worker-segment.sh +35 -0
  88. package/worker.cordis.yml +77 -0
@@ -0,0 +1,139 @@
1
+ // Vision route: lets users paste images into DSH conversations on the
2
+ // text-only DeepSeek models.
3
+ //
4
+ // Two cooperating pieces:
5
+ // 1. A duck-typed LLM adapter registered as provider "deepseek-vision" that
6
+ // advertises image input modality (passing the api-proxy admission gate)
7
+ // and delegates every stream straight back to "deepseek-official".
8
+ // registerAdapter does no instanceof check, so a plain object keeps the
9
+ // zero-@deepseek-imports realm discipline.
10
+ // 2. A global agent/pre-step waterfall that appends a text transcription (via
11
+ // the multimodal describeFile pipeline) after each ImageBlock. The image
12
+ // block itself stays in history so the conversation still shows the picture;
13
+ // the adapter above drops image blocks on the way to the model, which is
14
+ // what keeps the DeepSeek serializer (it throws on any image block) happy.
15
+
16
+ import { writeFileSync, mkdirSync, existsSync } from 'node:fs';
17
+ import { join } from 'node:path';
18
+ import { homedir } from 'node:os';
19
+ import { createHash } from 'node:crypto';
20
+ import { describeFileWithProvenance } from './multimodal.mjs';
21
+ import { tr } from './i18n.mjs';
22
+
23
+ const VISION_PROVIDER = 'deepseek-vision';
24
+ const DELEGATE = 'deepseek-official';
25
+ const ATTACH_DIR = join(homedir(), '.config', 'dsh-adapter', 'attachments');
26
+
27
+ const EXT = { 'image/png': 'png', 'image/jpeg': 'jpg', 'image/webp': 'webp', 'image/gif': 'gif' };
28
+
29
+ const TRANSCRIPT_PREFIX = (name) => tr(`[图片「${name}」已由视觉桥转写]`, `[Image "${name}" transcribed by the vision bridge]`);
30
+ // Both locales' prefixes must be recognised: the user may switch language after
31
+ // a transcription was written, and re-transcribing would duplicate it.
32
+ const TRANSCRIPT_MARKERS = ['[图片「', '[Image "'];
33
+
34
+ /** True when `block` is a transcription this route wrote for `imageBlock`. */
35
+ function isTranscriptFor(block, imageBlock) {
36
+ if (block?.type !== 'text' || typeof block.text !== 'string') return false;
37
+ const name = imageBlock?.attachment?.name;
38
+ if (name && (block.text.startsWith(`[图片「${name}」`) || block.text.startsWith(`[Image "${name}"`))) return true;
39
+ return TRANSCRIPT_MARKERS.some((m) => block.text.startsWith(m));
40
+ }
41
+
42
+ /**
43
+ * Images live on in history for the UI, but never reach the model: the
44
+ * transcription that follows each one already carries the content, so the image
45
+ * block is dropped rather than replaced with a placeholder.
46
+ */
47
+ function stripImages(content) {
48
+ if (!Array.isArray(content)) return content;
49
+ if (!content.some((b) => b?.type === 'image')) return content;
50
+ const out = content.filter((b) => b?.type !== 'image');
51
+ return out.length > 0 ? out : [{ type: 'text', text: tr('[图片已由视觉桥转写,详见随后的描述]', '[image transcribed by the vision bridge — see the description that follows]') }];
52
+ }
53
+
54
+ export function installVisionRoute(ctx, getConfig) {
55
+ const llm = ctx.llm;
56
+ const disposers = [];
57
+
58
+ const adapter = {
59
+ providerInfo: (p) => ({ id: p, name: tr('DeepSeek (视觉)', 'DeepSeek (Vision)') }),
60
+ providerRetryPolicy: () => undefined,
61
+ async listModels(p) {
62
+ const models = await llm.listModels(DELEGATE);
63
+ return models.map((m) => ({ ...m, provider: p, name: `${m.name} ◉`, inputModalities: ['text', 'image'] }));
64
+ },
65
+ async resolveModel(p, model, signal) {
66
+ const base = await llm.resolveModelInfo(DELEGATE, model, signal);
67
+ return { ...base, provider: p, name: `${base.name} ◉`, inputModalities: ['text', 'image'] };
68
+ },
69
+ async *stream(options) {
70
+ // Safety net: any image block that survived pre-step would make the
71
+ // DeepSeek serializer throw — strip defensively.
72
+ // NOTE: routing reads top-level options.provider (adapterStream uses
73
+ // this.registration(options.provider)); rewriting anything else
74
+ // self-recurses into this adapter.
75
+ const messages = options.messages?.map((m) => ({ ...m, content: stripImages(m.content) })) ?? options.messages;
76
+ yield* llm.stream({ ...options, provider: DELEGATE, ...(messages === undefined ? {} : { messages }) });
77
+ },
78
+ };
79
+ const handle = llm.registerAdapter([VISION_PROVIDER], adapter);
80
+ disposers.push(() => handle());
81
+
82
+ // Transcribe pending images before the step enters history. Applies to every
83
+ // agent in this host: on a DS-only deployment any surviving image block is a
84
+ // hard error downstream, so rewriting is strictly better than crashing.
85
+ disposers.push(ctx.on('agent/pre-step', async (payload, next) => {
86
+ const decision = await next();
87
+ if (decision.kind !== 'enter') return decision;
88
+ if (getConfig().vision_provider === 'off') return decision;
89
+ let changed = false;
90
+ const rewritten = [];
91
+ for (const message of decision.messages) {
92
+ if (!Array.isArray(message.content) || !message.content.some((b) => b?.type === 'image')) {
93
+ rewritten.push(message);
94
+ continue;
95
+ }
96
+ const content = [];
97
+ for (const [i, block] of message.content.entries()) {
98
+ if (block?.type !== 'image') { content.push(block); continue; }
99
+ content.push(block); // keep the image so the conversation still shows it
100
+ // Steps replay the whole history: skip anything already transcribed,
101
+ // otherwise every step would append another copy.
102
+ if (isTranscriptFor(message.content[i + 1], block)) continue;
103
+ changed = true;
104
+ try {
105
+ const stored = await ctx.attachments.readImage(block.attachment, payload.signal);
106
+ const sha = createHash('sha256').update(stored.data).digest('hex').slice(0, 12);
107
+ const ext = EXT[block.attachment?.mediaType] ?? 'png';
108
+ mkdirSync(ATTACH_DIR, { recursive: true });
109
+ const path = join(ATTACH_DIR, `${sha}.${ext}`);
110
+ if (!existsSync(path)) writeFileSync(path, stored.data);
111
+ const name = block.attachment?.name ?? `${sha}.${ext}`;
112
+ const { text: desc, provider } = await describeFileWithProvenance(getConfig, path, tr(
113
+ '详细描述这张图片:整体内容、布局结构、可见文字(逐字)、颜色与显著元素。',
114
+ 'Describe this image in detail: overall content, layout, any visible text (verbatim), colours and notable elements.'));
115
+ ctx.logger?.info?.(`dsh-adapter: vision transcript for ${path} via ${provider}`);
116
+ content.push({
117
+ type: 'text',
118
+ text: `${TRANSCRIPT_PREFIX(name)}\n${desc}\n${tr(
119
+ `[原图: ${path} — 需要更多细节可用 describe_image 工具带具体问题查看]`,
120
+ `[Original: ${path} — for more detail, ask the describe_image tool a specific question]`)}`,
121
+ });
122
+ } catch (err) {
123
+ // Same prefix as a successful transcription so the dedup check above
124
+ // treats it as handled — otherwise a broken provider would append a
125
+ // fresh failure notice on every step.
126
+ content.push({
127
+ type: 'text',
128
+ text: `${TRANSCRIPT_PREFIX(block.attachment?.name ?? tr('图片', 'image'))}\n${tr(`[转写失败: ${err?.message ?? err}]`, `[transcription failed: ${err?.message ?? err}]`)}`,
129
+ });
130
+ }
131
+ }
132
+ rewritten.push({ ...message, content });
133
+ }
134
+ return changed ? { kind: 'enter', messages: rewritten } : decision;
135
+ }));
136
+
137
+ ctx.logger?.info?.('dsh-adapter: vision route registered (provider "deepseek-vision" + pre-step transcription)');
138
+ return () => { for (const d of disposers.reverse()) { try { d(); } catch {} } };
139
+ }
@@ -0,0 +1,95 @@
1
+ // Named worker-profile registry for the external-CLI dispatch backends.
2
+ //
3
+ // A profile = backend × model × effort. dsh_run_worker / dsh_spawn_worker
4
+ // accept an optional `worker: <profile name>`; when set, the dispatch
5
+ // bypasses the hub/standalone tier logic entirely and runs the task through
6
+ // the profile's CLI (see cli-workers.mjs). Calls without `worker` keep the
7
+ // existing tier/mode behavior unchanged.
8
+ //
9
+ // Extending to a new CLI backend (e.g. codex) = one profile entry here + one
10
+ // backend implementation (buildArgs + stream parser) in cli-workers.mjs.
11
+
12
+ export const WORKER_PROFILES = {
13
+ // --- Agy = Antigravity CLI (google3/jetski), measured with agy 1.1.16 ---
14
+ //
15
+ // Permission tradeoff: agy 1.1.16 has NO workspace-scoped permission mode.
16
+ // The only non-interactive approval switches are the full-approval flag
17
+ // --dangerously-skip-permissions ("Auto-approve all tool permission requests
18
+ // without prompting") and --mode accept-edits (auto-apply edit suggestions).
19
+ // --sandbox restricts the CLI terminal itself, which would cripple a coding
20
+ // worker. A headless worker has nobody to answer prompts, so we use the
21
+ // full-approval switch: the caller already trusts the worker with its cwd,
22
+ // same as the DSH standalone path (full agent tools) and hub path.
23
+ agy: {
24
+ name: 'agy',
25
+ backend: 'agy', // backend key implemented in cli-workers.mjs
26
+ cli: 'agy', // binary resolved from PATH at spawn time
27
+ label: 'Agy (Antigravity CLI) — CLI default model',
28
+ // Measured 2026-08-21: `agy models` lists gemini-3.7/3.6/3.5-flash
29
+ // (-high/-medium/-low), gemini-3.1-pro, claude-sonnet-4-6,
30
+ // claude-opus-4-6-thinking, gpt-oss-120b-medium. The CLI resolves its
31
+ // default model server-side and exposes it nowhere (logs, events and the
32
+ // summaries db carry no model id), so we pass no --model and document the
33
+ // default as "CLI default" instead of guessing.
34
+ model: null,
35
+ // null = CLI default effort. When the CALLER explicitly passes effort=
36
+ // (off|high|max), it maps to agy's native low|medium|high.
37
+ effort: null,
38
+ effortMap: { off: 'low', high: 'medium', max: 'high' },
39
+ permission:
40
+ '--dangerously-skip-permissions + --mode accept-edits (FULL approval: auto-approves all tool permission requests; agy 1.1.16 offers no workspace-scoped permission mode)',
41
+ notes:
42
+ 'output: stream-json NDJSON (init / step_update / result). Activity signal: step_update events (text_delta + usage) while generating.',
43
+ },
44
+
45
+ // --- Grok = grok-build CLI, measured with grok 1.0.3 ---
46
+ //
47
+ // Permission tradeoff: grok DOES have finer-grained modes, but the docs
48
+ // (docs.x.ai, "Permissions and safety" / "Agent mode") explicitly say that
49
+ // in non-interactive sessions restricted modes block tool calls ("Auto mode
50
+ // blocked this action …") and recommend always-approve for automation:
51
+ // "For automation that must run tools without interactive approval, use
52
+ // always-approve (and deny rules if you need hard blocks)". Empirically on
53
+ // 2026-08-21 acceptEdits ran a terminal command that wrote outside the cwd
54
+ // ($HOME) without asking, so it is NOT a command-scoped restriction anyway.
55
+ // We therefore use bypassPermissions (always-approve); deny rules, hooks and
56
+ // some shell ask rules still apply, so users can hard-block via ~/.grok.
57
+ grok: {
58
+ name: 'grok',
59
+ backend: 'grok',
60
+ cli: 'grok',
61
+ label: 'Grok (grok-4.5)',
62
+ // Measured 2026-08-21: `grok models` → "* grok-4.5 (default)".
63
+ model: 'grok-4.5',
64
+ // grok-4.5 is not a reasoning model; --reasoning-effort is not passed.
65
+ effort: null,
66
+ effortMap: null,
67
+ permission:
68
+ '--permission-mode bypassPermissions (always-approve; docs.x.ai recommends always-approve for headless automation; deny rules/hooks still apply)',
69
+ notes:
70
+ 'output: streaming-messages-json NDJSON (system init / stream_event Anthropic wire events / whole assistant message / result). Activity signal: content_block_delta + thinking_delta stream events.',
71
+ },
72
+ };
73
+
74
+ export function resolveProfile(name) {
75
+ const p = WORKER_PROFILES[name];
76
+ if (!p) {
77
+ throw new Error(
78
+ `unknown worker profile "${name}" (available: ${Object.keys(WORKER_PROFILES).join(', ')})`,
79
+ );
80
+ }
81
+ return p;
82
+ }
83
+
84
+ /** Descriptors for dsh_worker_config output: name, backend, label, pins. */
85
+ export function listProfiles() {
86
+ return Object.values(WORKER_PROFILES).map((p) => ({
87
+ name: p.name,
88
+ backend: p.backend,
89
+ label: p.label,
90
+ model: p.model,
91
+ effort: p.effort,
92
+ permission: p.permission,
93
+ cli: p.cli,
94
+ }));
95
+ }
@@ -0,0 +1,22 @@
1
+ /** Stop an unattended worker and hand its unresolved request back to its caller. */
2
+ export function installWorkerQuestionHandoff(agentCtx, job, publish) {
3
+ agentCtx.on('user-questions/request', (request) => {
4
+ const questions = Array.isArray(request?.questions) ? request.questions.slice(0, 16).map(q => ({
5
+ id: String(q.id ?? '').slice(0, 200),
6
+ question: String(q.question ?? '').slice(0, 4000),
7
+ ...(typeof q.detail === 'string' ? { detail: q.detail.slice(0, 12000) } : {}),
8
+ ...(Array.isArray(q.options) ? { options: q.options.slice(0, 32).map(o => ({ label: String(o.label ?? '').slice(0, 500) })) } : {}),
9
+ })) : [];
10
+ job.status = 'needs_input';
11
+ job.questions = questions;
12
+ job.result = JSON.stringify({ needs_input: true, questions, instruction: 'Obtain the required answer or approval from the user, then dispatch a new task with that answer. An unanswered question grants no permission.' });
13
+ job.error = 'Worker stopped for an unresolved question; no option was selected automatically.';
14
+ publish();
15
+ // Dispose the runtime, not merely tell the model to stop: it must not run
16
+ // another step after an unanswered overwrite/permission question.
17
+ try { Promise.resolve(job.handle?.dispose()).catch(() => {}); } catch {}
18
+ const error = new Error(job.error + ' Return the unresolved question to the orchestrator.');
19
+ error.name = 'UserQuestionError'; error.code = 'UNATTENDED_WORKER';
20
+ return Promise.reject(error);
21
+ }, true);
22
+ }
@@ -0,0 +1,14 @@
1
+ #!/bin/bash
2
+ # dsh-adapter statusline: prepends the live worker-pool segment (merged from
3
+ # all status shards) to a basic statusline. For claude-hud users prefer
4
+ # wiring worker-segment.sh via --extra-cmd instead (cli.mjs hud does this).
5
+
6
+ input=$(cat)
7
+ model=$(echo "$input" | jq -r '.model.display_name // .model.id // "?"')
8
+ dir=$(basename "$(echo "$input" | jq -r '.workspace.current_dir // "."')")
9
+
10
+ segment=$("$(dirname "$0")/worker-segment.sh")
11
+
12
+ line="[$model] $dir"
13
+ [ -n "$segment" ] && line="$segment | $line"
14
+ echo "$line"
@@ -0,0 +1,35 @@
1
+ #!/bin/bash
2
+ # Compact DSH worker segment for claude-hud --extra-cmd (or any statusline).
3
+ # Merges all fresh status shards (~/.config/dsh-adapter/status.d/*.json plus
4
+ # the legacy status.json during transition) so workers dispatched by ANY
5
+ # orchestrator on this machine are visible. Running jobs show tier, elapsed,
6
+ # and tokens; idle with history shows "⚙dsh ✓N"; no jobs prints nothing.
7
+ # Override the shard dir with $DSH_ADAPTER_STATUS_DIR (mainly for tests).
8
+
9
+ dir="${DSH_ADAPTER_STATUS_DIR:-$HOME/.config/dsh-adapter}"
10
+ files=()
11
+ for f in "$dir"/status.d/*.json "$dir"/status.json; do
12
+ [ -f "$f" ] && files+=("$f")
13
+ done
14
+ [ ${#files[@]} -eq 0 ] && exit 0
15
+
16
+ jq -rs --argjson now "$(date +%s)" '
17
+ def ktok: if . >= 1000 then ((. / 100 | floor) / 10 | tostring) + "k" else tostring end;
18
+ def ts: sub("\\.[0-9]+Z$"; "Z") | fromdateiso8601;
19
+ def elapsed: ($now - (.startedAt | ts)) as $s
20
+ | if $s >= 60 then (($s / 60) | floor | tostring) + "m" + (($s % 60) | tostring) + "s"
21
+ else ($s | tostring) + "s" end;
22
+ [.[] | select((.updatedAt | ts) > ($now - 1800)) | .jobs[]] as $all
23
+ | ($all | unique_by(.id)) as $jobs
24
+ | [$jobs[] | select(.status == "running")] as $r
25
+ | ([$jobs[] | select(.status == "done")] | length) as $d
26
+ | ([$jobs[] | select(.status == "failed" or .status == "cancelled")] | length) as $f
27
+ | if (($r | length) + $d + $f) == 0 then "" else
28
+ "⚙dsh"
29
+ + (if ($r | length) > 0 then
30
+ " " + (($r | length) | tostring) + "▶"
31
+ + ($r | map(.tier + " " + elapsed + " " + (.tokens.input | ktok) + "/" + (.tokens.output | ktok)) | join(" · "))
32
+ else "" end)
33
+ + (if $d > 0 then " ✓" + ($d | tostring) else "" end)
34
+ + (if $f > 0 then " ✗" + ($f | tostring) else "" end)
35
+ end' "${files[@]}" 2>/dev/null
@@ -0,0 +1,77 @@
1
+ # dsh-adapter: unattended coding-worker composition for dsh-jsonrpc-agent.
2
+ # stdout is reserved for JSON-RPC frames; never add a console logger here.
3
+ # Model/provider arrive per process via the SDK initialize handshake.
4
+
5
+ - id: sdk-jsonrpc-server
6
+ name: '@deepseek-ai/dsh-sdk-jsonrpc-server'
7
+ config:
8
+ maxTokensAsSuccess: true
9
+
10
+ - id: llm-deepseek
11
+ name: '@deepseek-ai/dsh-llm-deepseek'
12
+ config:
13
+ apiKeyEnv: DEEPSEEK_API_KEY
14
+ thinking: enabled
15
+ reasoningEffort: !!js process.env.DSH_REASONING_EFFORT ?? 'high'
16
+
17
+ - id: sandbox
18
+ name: '@deepseek-ai/dsh-sandbox-local'
19
+
20
+ - id: sandbox-policy
21
+ name: '@deepseek-ai/dsh-sandbox-policy'
22
+ config:
23
+ mode: !!js process.env.DSH_SANDBOX_MODE ?? 'workspace-write'
24
+ workspaceRoot: !!js process.env.DSH_CWD ?? process.cwd()
25
+
26
+ - id: subprocess
27
+ name: '@deepseek-ai/dsh-subprocess-local'
28
+
29
+ - id: bash
30
+ name: '@deepseek-ai/dsh-bash-local'
31
+ config:
32
+ cwd: !!js process.env.DSH_CWD ?? process.cwd()
33
+ timeoutMs: 300000
34
+
35
+ - id: agent-spine
36
+ name: '@deepseek-ai/dsh-agent-spine-demo'
37
+ config:
38
+ persona: !!js process.env.DSH_SYSTEM_PROMPT ?? 'You are a focused coding worker. Complete the assigned task, then summarize what you did in your final message.'
39
+ workspaceContext: false
40
+ skills:
41
+ enabled: false
42
+ toolBash:
43
+ enableRunInBackground: false
44
+ toolJobs: false
45
+
46
+ - id: fs-local
47
+ name: '@deepseek-ai/dsh-fs-local'
48
+ config:
49
+ cwd: !!js process.env.DSH_CWD ?? process.cwd()
50
+
51
+ - id: fs-observation-policy
52
+ name: '@deepseek-ai/dsh-fs-observation-policy'
53
+
54
+ - id: tool-fs
55
+ name: '@deepseek-ai/dsh-tool-fs'
56
+
57
+ - id: tool-todo
58
+ name: '@deepseek-ai/dsh-tool-todo'
59
+ config:
60
+ allowParallelInProgress: true
61
+
62
+ - id: sessions
63
+ name: '@deepseek-ai/dsh-session-persistence-jsonl'
64
+ config:
65
+ root: !!js process.env.DSH_SESSION_ROOT ?? './.sessions'
66
+ compression: zstd
67
+
68
+ - id: token-meter
69
+ name: '@deepseek-ai/dsh-token-meter'
70
+
71
+ - id: compaction-basic
72
+ name: '@deepseek-ai/dsh-compaction-basic'
73
+ config:
74
+ thresholdRatio: 0.8
75
+ retainRatio: 0.16
76
+ maxTokens: 8192
77
+ compactionRetries: 1