dsh-coding 0.0.1 → 0.1.1-rc1

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 (74) hide show
  1. package/README.md +65 -58
  2. package/cordis.patch.yml +231 -4
  3. package/docs/DETAIL.md +183 -0
  4. package/docs/DEVELOPMENT.md +189 -0
  5. package/icon.svg +4 -4
  6. package/lib/apply-patch.js +268 -0
  7. package/lib/client/capsule.js +120 -0
  8. package/lib/client/card.js +220 -0
  9. package/lib/client/command-row.js +76 -0
  10. package/lib/client/config-page.js +392 -0
  11. package/lib/client/definition.js +164 -0
  12. package/lib/client/index.js +129 -0
  13. package/lib/client/locales.js +156 -0
  14. package/lib/client/mode-picker.js +77 -0
  15. package/lib/client/styles.js +283 -0
  16. package/lib/client.js +1691 -0
  17. package/lib/coding-projection.js +349 -0
  18. package/lib/config.js +204 -0
  19. package/lib/contract.js +124 -0
  20. package/lib/editor.js +23 -0
  21. package/lib/failures.js +142 -0
  22. package/lib/handoff.js +312 -0
  23. package/lib/index.js +109 -7
  24. package/lib/language.js +136 -0
  25. package/lib/messages.js +43 -0
  26. package/lib/models.js +154 -0
  27. package/lib/patch.js +235 -0
  28. package/lib/preset.js +1488 -0
  29. package/lib/reasoning-levels.js +28 -0
  30. package/lib/reasoning-projection.js +178 -0
  31. package/lib/reasoning.js +585 -0
  32. package/lib/stages.js +306 -0
  33. package/lib/state.js +550 -0
  34. package/lib/system-language.js +56 -0
  35. package/lib/types/apply-patch.d.ts +13 -0
  36. package/lib/types/client/capsule.d.ts +9 -0
  37. package/lib/types/client/card.d.ts +72 -0
  38. package/lib/types/client/command-row.d.ts +42 -0
  39. package/lib/types/client/config-page.d.ts +136 -0
  40. package/lib/types/client/definition.d.ts +51 -0
  41. package/lib/types/client/index.d.ts +10 -0
  42. package/lib/types/client/locales.d.ts +18 -0
  43. package/lib/types/client/mode-picker.d.ts +25 -0
  44. package/lib/types/client/styles.d.ts +28 -0
  45. package/lib/types/coding-projection.d.ts +116 -0
  46. package/lib/types/config.d.ts +193 -0
  47. package/lib/types/contract.d.ts +33 -0
  48. package/lib/types/editor.d.ts +9 -0
  49. package/lib/types/failures.d.ts +62 -0
  50. package/lib/types/handoff.d.ts +112 -0
  51. package/lib/types/index.d.ts +144 -0
  52. package/lib/types/language.d.ts +56 -0
  53. package/lib/types/messages.d.ts +27 -0
  54. package/lib/types/models.d.ts +82 -0
  55. package/lib/types/patch.d.ts +37 -0
  56. package/lib/types/preset.d.ts +22 -0
  57. package/lib/types/reasoning-levels.d.ts +20 -0
  58. package/lib/types/reasoning-projection.d.ts +64 -0
  59. package/lib/types/reasoning.d.ts +141 -0
  60. package/lib/types/stages.d.ts +164 -0
  61. package/lib/types/state.d.ts +261 -0
  62. package/lib/types/system-language.d.ts +10 -0
  63. package/lib/types/verification-tool.d.ts +32 -0
  64. package/lib/types/verification.d.ts +77 -0
  65. package/lib/types/verifier.d.ts +9 -0
  66. package/lib/types/volatile.d.ts +17 -0
  67. package/lib/verification-tool.js +176 -0
  68. package/lib/verification.js +337 -0
  69. package/lib/verifier.js +25 -0
  70. package/lib/volatile.js +20 -0
  71. package/locale/en.json +3 -2
  72. package/locale/zh.json +3 -2
  73. package/package.json +83 -9
  74. package/lib/index.d.ts +0 -11
@@ -0,0 +1,337 @@
1
+ /**
2
+ * Project-aware verification execution.
3
+ *
4
+ * Resolution reads the project's own manifest (package scripts, lockfile
5
+ * manager) and the plugin's configured overrides; execution goes through the
6
+ * `ctx.subprocess` Service Definition, never through a hard-coded local
7
+ * runner. A deployment that swaps the subprocess provider (a remote sandbox,
8
+ * for example) keeps this tool's contract unchanged.
9
+ *
10
+ * @module dsh-coding/verification
11
+ */
12
+ import { readFile, stat } from 'node:fs/promises';
13
+ import { dirname, join, relative, resolve } from 'node:path';
14
+ import { configuredCommand, } from './config.js';
15
+ /** Failure raised before or during a verification run, with an actionable message. */
16
+ export class VerificationError extends Error {
17
+ constructor(message) {
18
+ super(`run_verification: ${message}`);
19
+ this.name = 'VerificationError';
20
+ }
21
+ }
22
+ const MAX_PACKAGE_JSON_BYTES = 512 * 1024;
23
+ const OUT_MAX_BYTES = 256 * 1024;
24
+ const ERR_MAX_BYTES = 128 * 1024;
25
+ const OUTPUT_TAIL_CHARS = 4000;
26
+ const MAX_FAILED_TESTS = 20;
27
+ const MAX_ERROR_LINES = 15;
28
+ /** Whether a path is a regular file. */
29
+ async function isFile(path) {
30
+ try {
31
+ const info = await stat(path);
32
+ return info.isFile();
33
+ }
34
+ catch {
35
+ return false;
36
+ }
37
+ }
38
+ /** Walk up from `start` to the first directory holding a regular file named `name`. */
39
+ async function nearestWith(start, name, limit = 24) {
40
+ let current = resolve(start);
41
+ for (let depth = 0; depth < limit; depth += 1) {
42
+ if (await isFile(join(current, name)))
43
+ return current;
44
+ const parent = dirname(current);
45
+ if (parent === current)
46
+ return undefined;
47
+ current = parent;
48
+ }
49
+ return undefined;
50
+ }
51
+ /** Whether a path is a directory. */
52
+ async function isDirectory(path) {
53
+ try {
54
+ const info = await stat(path);
55
+ return info.isDirectory();
56
+ }
57
+ catch {
58
+ return false;
59
+ }
60
+ }
61
+ /** Walk up from `start` to the first directory holding `.git` (a file or a directory). */
62
+ async function nearestRepoRoot(start, limit = 24) {
63
+ let current = resolve(start);
64
+ for (let depth = 0; depth < limit; depth += 1) {
65
+ if (await isFile(join(current, '.git')) || await isDirectory(join(current, '.git')))
66
+ return current;
67
+ const parent = dirname(current);
68
+ if (parent === current)
69
+ return undefined;
70
+ current = parent;
71
+ }
72
+ return undefined;
73
+ }
74
+ /** Detect the package manager from the lockfile nearest the package root. */
75
+ async function detectManager(packageRoot) {
76
+ let current = packageRoot;
77
+ for (let depth = 0; depth < 24; depth += 1) {
78
+ if (await isFile(join(current, 'pnpm-lock.yaml')))
79
+ return 'pnpm';
80
+ if (await isFile(join(current, 'bun.lockb')) || await isFile(join(current, 'bun.lock')))
81
+ return 'bun';
82
+ if (await isFile(join(current, 'yarn.lock')))
83
+ return 'yarn';
84
+ if (await isFile(join(current, 'package-lock.json')))
85
+ return 'npm';
86
+ const parent = dirname(current);
87
+ if (parent === current)
88
+ break;
89
+ current = parent;
90
+ }
91
+ return 'npm';
92
+ }
93
+ /** Read the `scripts` map of one package.json, tolerating a missing or oversized file. */
94
+ async function readScripts(packageRoot) {
95
+ try {
96
+ const path = join(packageRoot, 'package.json');
97
+ const info = await stat(path);
98
+ if (!info.isFile() || info.size > MAX_PACKAGE_JSON_BYTES)
99
+ return {};
100
+ const parsed = JSON.parse(await readFile(path, 'utf8'));
101
+ const scripts = parsed?.scripts;
102
+ if (typeof scripts !== 'object' || scripts === null || Array.isArray(scripts))
103
+ return {};
104
+ const result = {};
105
+ for (const [key, value] of Object.entries(scripts)) {
106
+ if (typeof value === 'string' && value.trim() !== '')
107
+ result[key] = value;
108
+ }
109
+ return result;
110
+ }
111
+ catch {
112
+ return {};
113
+ }
114
+ }
115
+ /** Candidate script names per verification kind, most specific first. */
116
+ const SCRIPT_CANDIDATES = {
117
+ test: ['test', 'test:unit', 'unit'],
118
+ build: ['build', 'compile'],
119
+ lint: ['lint', 'eslint', 'check:lint'],
120
+ typecheck: ['typecheck', 'type-check', 'check:types', 'tsc'],
121
+ };
122
+ /** Render a package-manager invocation for one script. */
123
+ function scriptCommand(manager, script) {
124
+ return manager === 'npm' ? `npm run ${script}` : `${manager} run ${script}`;
125
+ }
126
+ /** Render the shell invocation for one configured command. */
127
+ function shellArgv(command) {
128
+ return process.platform === 'win32'
129
+ ? ['cmd.exe', '/d', '/s', '/c', command]
130
+ : ['/bin/sh', '-c', command];
131
+ }
132
+ /**
133
+ * Resolve the concrete command for a verification request.
134
+ * @param config - plugin configuration, whose overrides win over detection.
135
+ * @param cwd - session working directory.
136
+ * @param kind - requested verification kind.
137
+ * @param scope - requested scope; `full` runs from the repository root.
138
+ * @returns the resolved command and directory.
139
+ * @throws {VerificationError} when neither configuration nor the project can supply a command.
140
+ */
141
+ export async function resolveVerification(config, cwd, kind, scope) {
142
+ const repoRoot = await nearestRepoRoot(cwd);
143
+ const packageRoot = await nearestWith(cwd, 'package.json');
144
+ // `full` proves the change at repository scale: resolve the script from the
145
+ // repository root and run it there. `targeted` / `package` stay on the
146
+ // nearest package root.
147
+ const manifestRoot = scope === 'full' ? repoRoot ?? packageRoot : packageRoot;
148
+ const runDir = manifestRoot ?? cwd;
149
+ const configured = configuredCommand(config, kind, scope);
150
+ if (configured !== undefined) {
151
+ return { command: configured, cwd: runDir };
152
+ }
153
+ if (manifestRoot === undefined) {
154
+ throw new VerificationError(`no package.json was found from ${cwd} upward; configure verificationCommands.${kind} `
155
+ + 'in the dsh-coding bundle config to name the command');
156
+ }
157
+ const scripts = await readScripts(manifestRoot);
158
+ const manager = await detectManager(manifestRoot);
159
+ const found = SCRIPT_CANDIDATES[kind].find(name => scripts[name] !== undefined);
160
+ if (found === undefined) {
161
+ const available = Object.keys(scripts).sort().join(', ') || '(none)';
162
+ throw new VerificationError(`package.json at ${relative(cwd, manifestRoot) || '.'} has no ${kind} script; `
163
+ + `available scripts: ${available}. Configure verificationCommands.${kind} to override.`);
164
+ }
165
+ return { command: scriptCommand(manager, found), cwd: runDir, script: found, packageManager: manager };
166
+ }
167
+ /** Parse runner output into failing test names and the most useful error lines. */
168
+ export function parseFailure(kind, stdout, stderr) {
169
+ const lines = [...stdout.split('\n'), ...stderr.split('\n')];
170
+ const failed = new Set();
171
+ const errors = [];
172
+ const failPatterns = [
173
+ /^\s*(?:×|✕|✗|✖)\s+(.{1,160})$/u,
174
+ // TAP: "not ok 1 - name"; the plan number and dash are runner bookkeeping.
175
+ /^\s*not ok\s+(?:\d+\s+)?-?\s*(.{1,160})$/u,
176
+ /^\s*FAIL\s+(?:\S+\s+)?-?\s*(.{1,160})$/u,
177
+ /^--- FAIL:\s+(\S+)/u,
178
+ /^\s*(?:●|○)\s+(.{1,160})$/u,
179
+ /^\s*\d+\)\s+(.{1,160})$/u,
180
+ ];
181
+ const errorPatterns = [
182
+ /\berror\b[: ]/iu,
183
+ /\bexpected\b.*\bbut\b/iu,
184
+ /\bcannot find\b/iu,
185
+ /\b(?:TS\d{4})\b/u,
186
+ /\bfailed\b/iu,
187
+ ];
188
+ for (const line of lines) {
189
+ const text = line.trimEnd();
190
+ if (text.trim() === '')
191
+ continue;
192
+ for (const pattern of failPatterns) {
193
+ const match = pattern.exec(text);
194
+ if (match !== null) {
195
+ failed.add(match[1].trim());
196
+ break;
197
+ }
198
+ }
199
+ if (errors.length < MAX_ERROR_LINES && errorPatterns.some(pattern => pattern.test(text))) {
200
+ const trimmed = text.trim();
201
+ if (!errors.includes(trimmed))
202
+ errors.push(trimmed.slice(0, 300));
203
+ }
204
+ if (failed.size >= MAX_FAILED_TESTS && errors.length >= MAX_ERROR_LINES)
205
+ break;
206
+ }
207
+ return {
208
+ failedTests: [...failed].slice(0, MAX_FAILED_TESTS),
209
+ errors,
210
+ };
211
+ }
212
+ /** Read one collected stream after the process settled. */
213
+ function collectedText(reader) {
214
+ if (reader === undefined)
215
+ return '';
216
+ try {
217
+ return reader.readFrom(0).text;
218
+ }
219
+ catch {
220
+ return '';
221
+ }
222
+ }
223
+ /**
224
+ * Run one verification through the mounted subprocess provider.
225
+ * @param subprocess - the `ctx.subprocess` Service Definition.
226
+ * @param resolved - resolved command and directory.
227
+ * @param kind - requested kind, recorded in the outcome and used for parsing.
228
+ * @param scope - requested scope, recorded in the outcome.
229
+ * @param source - which agent asked for the check, recorded in the outcome.
230
+ * @param signal - caller cancellation; aborts the managed process range.
231
+ * @param timeoutMs - hard deadline of the command in milliseconds; once it
232
+ * elapses the managed range is terminated and the run is reported as a failed
233
+ * verification. `0` disables the deadline.
234
+ * @returns the structured outcome.
235
+ */
236
+ export async function executeVerification(subprocess, resolved, kind, scope, source, signal, timeoutMs) {
237
+ const startedAt = Date.now();
238
+ let handle;
239
+ try {
240
+ handle = subprocess.spawn({
241
+ argv: [...shellArgv(resolved.command)],
242
+ cwd: resolved.cwd,
243
+ stdio: {
244
+ stdin: 'ignore',
245
+ stdout: { maxBytes: OUT_MAX_BYTES },
246
+ stderr: { maxBytes: ERR_MAX_BYTES },
247
+ },
248
+ graceMs: 5000,
249
+ ...signal === undefined ? {} : { signal },
250
+ });
251
+ }
252
+ catch (error) {
253
+ throw new VerificationError(`could not start ${JSON.stringify(resolved.command)} in ${resolved.cwd}: ${messageOf(error)}`);
254
+ }
255
+ let timedOut = false;
256
+ let timer;
257
+ let outcome;
258
+ try {
259
+ // A timeout abandons `handle.done`, so a later provider rejection is
260
+ // expected here; keep it from surfacing as an unhandled rejection.
261
+ void handle.done.catch(() => { });
262
+ if (timeoutMs > 0) {
263
+ const timed = new Promise((settle) => {
264
+ timer = setTimeout(() => {
265
+ timedOut = true;
266
+ try {
267
+ void Promise.resolve(handle.terminate?.()).catch(() => { });
268
+ }
269
+ catch {
270
+ // A provider that throws on termination must not mask the timeout.
271
+ }
272
+ settle({ exitCode: null, signal: 'SIGTERM' });
273
+ }, timeoutMs);
274
+ });
275
+ outcome = await Promise.race([handle.done, timed]);
276
+ }
277
+ else {
278
+ outcome = await handle.done;
279
+ }
280
+ }
281
+ catch (error) {
282
+ throw new VerificationError(`the subprocess provider failed while running ${JSON.stringify(resolved.command)}: ${messageOf(error)}`);
283
+ }
284
+ finally {
285
+ if (timer !== undefined) {
286
+ clearTimeout(timer);
287
+ timer = undefined;
288
+ }
289
+ }
290
+ const durationMs = Date.now() - startedAt;
291
+ const stdout = collectedText(handle.collected.stdout);
292
+ const stderr = collectedText(handle.collected.stderr);
293
+ const passed = outcome.exitCode === 0 && !timedOut;
294
+ const parsed = passed
295
+ ? { failedTests: [], errors: [] }
296
+ : parseFailure(kind, stdout, stderr);
297
+ if (timedOut) {
298
+ const note = `the check exceeded verificationTimeoutMs (${timeoutMs} ms) and was terminated`;
299
+ if (!parsed.errors.includes(note))
300
+ parsed.errors.unshift(note);
301
+ }
302
+ const output = `${stdout}${stderr === '' ? '' : `\n${stderr}`}`.slice(-OUTPUT_TAIL_CHARS);
303
+ return {
304
+ passed,
305
+ kind,
306
+ scope,
307
+ source,
308
+ command: resolved.command,
309
+ exitCode: outcome.exitCode,
310
+ durationMs,
311
+ failedTests: parsed.failedTests,
312
+ errors: parsed.errors,
313
+ ranAt: startedAt,
314
+ output,
315
+ };
316
+ }
317
+ function messageOf(error) {
318
+ return error instanceof Error ? error.message : String(error);
319
+ }
320
+ /** Render the model-facing result of one verification. */
321
+ export function renderVerification(run) {
322
+ const head = run.passed
323
+ ? `Verification passed: ${run.kind} (${run.scope}) in ${run.durationMs}ms — ${run.command}`
324
+ : `Verification FAILED: ${run.kind} (${run.scope}) exit ${String(run.exitCode)} after ${run.durationMs}ms — ${run.command}`;
325
+ const lines = [head];
326
+ if (!run.passed && run.failedTests.length > 0) {
327
+ lines.push(`Failing tests: ${run.failedTests.join('; ')}`);
328
+ }
329
+ if (!run.passed && run.errors.length > 0) {
330
+ lines.push(`Errors:\n${run.errors.map(line => ` ${line}`).join('\n')}`);
331
+ }
332
+ lines.push(`Output tail:\n${run.output === '' ? ' (empty)' : run.output}`);
333
+ if (!run.passed) {
334
+ lines.push('Next: return to the implement stage, fix the failure, then verify again. Do not deliver yet.');
335
+ }
336
+ return lines.join('\n');
337
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * The structured verifier as a preset entry.
3
+ *
4
+ * The verify worker holds no editing tool and no shell: `run_verification` is
5
+ * its only way to execute anything, and that tool cannot write a file. It reads
6
+ * the same bundle configuration as the lead, so both halves resolve a check with
7
+ * the same command.
8
+ *
9
+ * @module dsh-coding/verifier
10
+ */
11
+ import { registerVerificationTool } from './verification-tool.js';
12
+ /** Cordis plugin name used by loader diagnostics. */
13
+ export const name = 'dsh-coding-verifier';
14
+ /** The registry and the shared bundle settings are required; `subprocess` is awaited. */
15
+ export const inject = ['tools', 'dshCodingRuntime'];
16
+ /**
17
+ * Register `run_verification` in the verify worker's scope.
18
+ * @param ctx - the worker preset's scope context.
19
+ */
20
+ export function apply(ctx) {
21
+ const settings = ctx.dshCodingRuntime;
22
+ ctx.inject(['subprocess'], (child) => {
23
+ registerVerificationTool(child, { config: () => settings.options });
24
+ });
25
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Small helper for reading Schemastery volatile values.
3
+ *
4
+ * It lives in its own module on purpose: a plugin reload after editing a shared
5
+ * module can keep the old generation of that module cached, so a newly exported
6
+ * symbol must come from a new file to be importable without a full restart.
7
+ *
8
+ * @module dsh-coding/volatile
9
+ */
10
+ /**
11
+ * Read one configured value through a Schemastery volatile accessor, or use it
12
+ * directly when the caller passed a plain object (direct `apply()` in tests, or
13
+ * a schema generation that did not mark the field volatile).
14
+ * @param value - schema-resolved value or `Volatile` wrapper.
15
+ * @returns the current raw value.
16
+ */
17
+ export function volatileValue(value) {
18
+ const accessor = value;
19
+ return typeof accessor?.get === 'function' ? accessor.get() : value;
20
+ }
package/locale/en.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "meta": {
3
- "title": "DSH Coding",
4
- "description": "Work in progress. The npm package name is reserved as dsh-coding."
3
+ "title": "DSH Coding agent",
4
+ "description": "A coding-agent runtime for DSH: it borrows Claude's task-orchestration mechanism and advances stage by stage through Codex's five-stage contract, with DeepSeek Pro analysing requirements and planning tasks while Flash subagents do the work — ensuring delivery quality and maximising token value.",
5
+ "detail": "docs/DETAIL.md"
5
6
  }
6
7
  }
package/locale/zh.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "meta": {
3
- "title": "DSH Coding 编程智能体插件",
4
- "description": "开发中,NPM 包名锁定为 dsh-coding。"
3
+ "title": "DSH Coding 编程智能体",
4
+ "description": "DSH 编程智能体运行时插件,借鉴 Claude 任务编排机制,Codex 五段式契约层层推进,DeepSeek Pro 分析需求、编排任务,Flash 子智能体去干活,确保任务交付质量和 Token 价值最大化。",
5
+ "detail": "docs/DETAIL.md"
5
6
  }
6
7
  }
package/package.json CHANGED
@@ -1,15 +1,31 @@
1
1
  {
2
2
  "name": "dsh-coding",
3
- "version": "0.0.1",
4
- "description": "DSH Coding 编程智能体插件。开发中,NPM 包名锁定为 dsh-coding。",
3
+ "version": "0.1.1-rc1",
4
+ "description": "DSH 编程智能体运行时插件,借鉴 Claude 任务编排机制,Codex 五段式契约层层推进,DeepSeek Pro 分析需求、编排任务,Flash 子智能体去干活,确保任务交付质量和 Token 价值最大化。A coding-agent runtime for DSH: it borrows Claude's task-orchestration mechanism and advances stage by stage through Codex's five-stage contract, with DeepSeek Pro analysing requirements and planning tasks while Flash subagents do the work — ensuring delivery quality and maximising token value.",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
7
- "types": "./lib/index.d.ts",
7
+ "types": "./lib/types/index.d.ts",
8
8
  "exports": {
9
9
  ".": {
10
- "types": "./lib/index.d.ts",
10
+ "types": "./lib/types/index.d.ts",
11
11
  "default": "./lib/index.js"
12
12
  },
13
+ "./preset": {
14
+ "types": "./lib/types/preset.d.ts",
15
+ "default": "./lib/preset.js"
16
+ },
17
+ "./editor": {
18
+ "types": "./lib/types/editor.d.ts",
19
+ "default": "./lib/editor.js"
20
+ },
21
+ "./verifier": {
22
+ "types": "./lib/types/verifier.d.ts",
23
+ "default": "./lib/verifier.js"
24
+ },
25
+ "./client": {
26
+ "types": "./lib/types/client/index.d.ts",
27
+ "default": "./lib/client.js"
28
+ },
13
29
  "./locale/*.json": "./locale/*.json",
14
30
  "./icon": "./icon.svg",
15
31
  "./package.json": "./package.json"
@@ -17,6 +33,7 @@
17
33
  "files": [
18
34
  "lib",
19
35
  "locale/*.json",
36
+ "docs",
20
37
  "icon.svg",
21
38
  "cordis.patch.yml",
22
39
  "README.md",
@@ -25,15 +42,44 @@
25
42
  "dsh": {
26
43
  "bundle": {
27
44
  "patch": "./cordis.patch.yml"
45
+ },
46
+ "client": {
47
+ "platform": "web",
48
+ "immediately": true,
49
+ "inject": [
50
+ "@deepseek-ai/dsh-api-remotes",
51
+ "@deepseek-ai/dsh-api-session-controller",
52
+ "@deepseek-ai/dsh-client-locale",
53
+ "@deepseek-ai/dsh-client-ui-chat",
54
+ "@deepseek-ai/dsh-client-ui-conversation",
55
+ "@deepseek-ai/dsh-client-ui-renderer",
56
+ "@deepseek-ai/dsh-client-ui-session",
57
+ "@deepseek-ai/dsh-client-ui-plugin-manager",
58
+ "@deepseek-ai/dsh-client-ui-settings"
59
+ ]
28
60
  }
29
61
  },
30
62
  "keywords": [
31
63
  "deepseek-harness",
32
64
  "dsh",
33
65
  "dsh-plugin",
34
- "dsh-coding"
66
+ "dsh-preset",
67
+ "dsh-coding",
68
+ "coding-agent"
35
69
  ],
36
- "author": "ygzhang",
70
+ "author": {
71
+ "name": "ygzhang",
72
+ "email": "ygzhang.cn@msn.com",
73
+ "url": "https://github.com/ygzhang-lab"
74
+ },
75
+ "repository": {
76
+ "type": "git",
77
+ "url": "git+https://github.com/ygzhang-lab/dsh-coding.git"
78
+ },
79
+ "homepage": "https://github.com/ygzhang-lab/dsh-coding#readme",
80
+ "bugs": {
81
+ "url": "https://github.com/ygzhang-lab/dsh-coding/issues"
82
+ },
37
83
  "license": "MIT",
38
84
  "publishConfig": {
39
85
  "access": "public"
@@ -42,17 +88,45 @@
42
88
  "node": ">=24.9.0",
43
89
  "dsh": ">=0.2.2-rc.5 <0.3.0"
44
90
  },
91
+ "dependencies": {
92
+ "@deepseek-ai/schemastery": "^3.19.0"
93
+ },
45
94
  "peerDependencies": {
46
- "@deepseek-ai/cordis": ">=4.0.5 <5"
95
+ "@deepseek-ai/cordis": ">=4.0.5 <5",
96
+ "@deepseek-ai/dsh-agent": ">=0.2.2-rc.5 <0.3.0",
97
+ "@deepseek-ai/dsh-llm": ">=0.2.2-rc.5 <0.3.0",
98
+ "@deepseek-ai/dsh-session": ">=0.2.2-rc.5 <0.3.0",
99
+ "@deepseek-ai/dsh-subagent": ">=0.2.2-rc.5 <0.3.0",
100
+ "@deepseek-ai/dsh-subprocess": ">=0.2.2-rc.5 <0.3.0",
101
+ "@deepseek-ai/dsh-tools": ">=0.2.2-rc.5 <0.3.0"
47
102
  },
48
103
  "devDependencies": {
49
104
  "@deepseek-ai/cordis": "4.1.0",
105
+ "@deepseek-ai/dsh-agent": "0.2.2-rc.5",
106
+ "@deepseek-ai/dsh-api-session-controller": "0.2.2-rc.5",
107
+ "@deepseek-ai/dsh-client-locale": "0.2.2-rc.5",
108
+ "@deepseek-ai/dsh-client-ui-chat": "0.2.2-rc.5",
109
+ "@deepseek-ai/dsh-client-ui-conversation": "0.2.2-rc.5",
110
+ "@deepseek-ai/dsh-client-ui-renderer": "0.2.2-rc.5",
111
+ "@deepseek-ai/dsh-client-ui-slots": "0.2.2-rc.5",
112
+ "@deepseek-ai/dsh-llm": "0.2.2-rc.5",
113
+ "@deepseek-ai/dsh-session": "0.2.2-rc.5",
114
+ "@deepseek-ai/dsh-session-projection": "0.2.2-rc.5",
115
+ "@deepseek-ai/dsh-subagent": "0.2.2-rc.5",
116
+ "@deepseek-ai/dsh-subprocess": "0.2.2-rc.5",
117
+ "@deepseek-ai/dsh-system-prompt": "0.2.2-rc.5",
118
+ "@deepseek-ai/dsh-tools": "0.2.2-rc.5",
119
+ "@deepseek-ai/dsh-util-values": "0.2.2-rc.5",
50
120
  "@types/node": "^24.0.0",
121
+ "@types/react": "^18.3.0",
122
+ "esbuild": "^0.25.0",
123
+ "js-yaml": "^5.5.0",
124
+ "react": "^18.3.1",
51
125
  "typescript": "^5.9.0"
52
126
  },
53
127
  "scripts": {
54
- "build": "tsc -p tsconfig.build.json",
128
+ "build": "node scripts/build.mjs",
55
129
  "typecheck": "tsc -p tsconfig.json",
56
- "test": "node --test test/*.test.mjs"
130
+ "test": "pnpm build && node --test --test-timeout=120000 test/*.test.mjs"
57
131
  }
58
132
  }
package/lib/index.d.ts DELETED
@@ -1,11 +0,0 @@
1
- import { Service, type Context } from '@deepseek-ai/cordis';
2
- /**
3
- * Inert Host entry for the `dsh-coding` bundle.
4
- *
5
- * It registers the `dshCoding` service and does nothing else: the package
6
- * reserves the npm name and proves that the bundle installs and composes. It
7
- * adds no tools, prompts, presets, client code, or settings.
8
- */
9
- export default class DshCodingService extends Service {
10
- constructor(ctx: Context);
11
- }