@gobing-ai/ts-ai-runner 0.4.60 → 0.4.63
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.md +4 -1
- package/dist/agents/shims.d.ts +1 -1
- package/dist/agents/shims.d.ts.map +1 -1
- package/dist/agents/shims.js +28 -0
- package/package.json +4 -4
- package/src/agents/shims.ts +31 -1
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@ bun add @gobing-ai/ts-ai-runner
|
|
|
33
33
|
| `AGENT_SHIMS` / `TIER1_PRIORITY` / `TIER2_AGENTS` / `DISPLAY_ORDER` | Agent registry constants |
|
|
34
34
|
| `isAgentName()` | Type guard for supported agent identifiers |
|
|
35
35
|
|
|
36
|
-
Supported agent identifiers: `claude`, `codex`, `gemini` (deprecated), `pi`, `omp`, `opencode`, `antigravity-cli`, `openclaw`, `hermes`, `grok`. The `antigravity` id is a deprecated alias of `antigravity-cli`. See [Deprecation & Aliases](#deprecation--aliases).
|
|
36
|
+
Supported agent identifiers: `claude`, `codex`, `gemini` (deprecated), `pi`, `omp`, `opencode`, `antigravity-cli`, `openclaw`, `hermes`, `grok`, `deepseek`. The `antigravity` id is a deprecated alias of `antigravity-cli`. See [Deprecation & Aliases](#deprecation--aliases).
|
|
37
37
|
|
|
38
38
|
## Architecture
|
|
39
39
|
|
|
@@ -337,6 +337,7 @@ const { args } = getAgentShim('omp').getPromptCommand({
|
|
|
337
337
|
| codex | ✗ | ✗ (ignored) | — | degrade → fresh `exec` | `exec resume --last` |
|
|
338
338
|
| agy | ✓ | ✗ (ignored) | — | `--conversation <id>` | `--continue` |
|
|
339
339
|
| grok | ✓ | ✗ (ignored) | — | `--resume <id>` | `-c` |
|
|
340
|
+
| deepseek | ✗ | ✗ (ignored) | — | degrade → fresh headless one-shot | degrade → fresh headless one-shot |
|
|
340
341
|
|
|
341
342
|
**Degrade rule:** when `sessionDir`/`sessionId` is set and the agent lacks resume-by-id or a
|
|
342
343
|
session-store flag, the shim opens **fresh in isolation** (or plain fresh) — never bare global
|
|
@@ -488,6 +489,7 @@ Agent-specific behavior:
|
|
|
488
489
|
| `openclaw` | `openclaw` | 2 | `openclaw health` | `agent --local -m` |
|
|
489
490
|
| `hermes` | `hermes` | 1 | `hermes doctor` | `chat -q`, `--continue`, `-m` |
|
|
490
491
|
| `grok` | `grok` | 1 | env/file (`XAI_API_KEY` or `~/.grok/auth.json`) | `-p`, `-c` (resume), `-m`, `--output-format plain\|json` (maps ai-runner `text` → `plain`) |
|
|
492
|
+
| `deepseek` | `dsh` | 1 | env-only / `~/.dsh` (no status verb) | `--profile headless <task>`; session/model options degrade to a fresh one-shot (no flags at 0.1.5-rc.1) |
|
|
491
493
|
|
|
492
494
|
This is the right layer for UI previews, audit logging, and custom launchers.
|
|
493
495
|
|
|
@@ -515,6 +517,7 @@ resolveAgentName('cursor'); // → undefined
|
|
|
515
517
|
| `omp` | canonical | `omp` | First-class; NOT a pi alias. |
|
|
516
518
|
| `hermes` | canonical | `hermes` | First-class; OpenClaw-compatible but distinct binary. |
|
|
517
519
|
| `grok` | canonical | `grok` | Grok Build CLI; headless via `-p`; auth is env/file only (no status verb). |
|
|
520
|
+
| `deepseek` | canonical | `deepseek` | DeepSeek `dsh` CLI; headless via `--profile headless`; auth is env/file only (no status verb). |
|
|
518
521
|
|
|
519
522
|
`getAgentShim()` and `isAgentName()` are alias-aware: passing `'antigravity'` resolves to the `antigravity-cli` shim. `DoctorResult` and `DetectedAgent` surface `deprecated` + `replacedBy` when the resolved canonical id is marked deprecated.
|
|
520
523
|
|
package/dist/agents/shims.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Identifier for one supported coding agent (canonical id). */
|
|
2
|
-
export type AgentName = 'claude' | 'codex' | 'gemini' | 'pi' | 'opencode' | 'antigravity-cli' | 'openclaw' | 'hermes' | 'omp' | 'grok';
|
|
2
|
+
export type AgentName = 'claude' | 'codex' | 'gemini' | 'pi' | 'opencode' | 'antigravity-cli' | 'openclaw' | 'hermes' | 'omp' | 'grok' | 'deepseek';
|
|
3
3
|
/** Output mode for prompt invocations. */
|
|
4
4
|
export type OutputMode = 'text' | 'json';
|
|
5
5
|
/** Concrete executable and argv pair returned by an agent shim. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shims.d.ts","sourceRoot":"","sources":["../../src/agents/shims.ts"],"names":[],"mappings":"AAEA,gEAAgE;AAChE,MAAM,MAAM,SAAS,GACf,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,IAAI,GACJ,UAAU,GACV,iBAAiB,GACjB,UAAU,GACV,QAAQ,GACR,KAAK,GACL,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"shims.d.ts","sourceRoot":"","sources":["../../src/agents/shims.ts"],"names":[],"mappings":"AAEA,gEAAgE;AAChE,MAAM,MAAM,SAAS,GACf,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,IAAI,GACJ,UAAU,GACV,iBAAiB,GACjB,UAAU,GACV,QAAQ,GACR,KAAK,GACL,MAAM,GACN,UAAU,CAAC;AAEjB,0CAA0C;AAC1C,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;AAEzC,mEAAmE;AACnE,MAAM,WAAW,WAAW;IACxB,4BAA4B;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,2CAA2C;IAC3C,IAAI,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,4CAA4C;AAC5C,MAAM,WAAW,aAAa;IAC1B,yDAAyD;IACzD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,IAAI,CAAC,EAAE,UAAU,CAAC;I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I,CAAC;CACxC;AAoQD,6DAA6D;AAC7D,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,CAY9D,CAAC;AAEF,kEAAkE;AAClE,MAAM,WAAW,sBAAsB;IACnC,oFAAoF;IACpF,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC;IACrC,oEAAoE;IACpE,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC;CACxC;AA6BD,6EAA6E;AAC7E,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,SAAS,GAAG,sBAAsB,CAElF;AAED,mEAAmE;AACnE,eAAO,MAAM,cAAc,EAAE,SAAS,SAAS,EAU9C,CAAC;AAEF,kDAAkD;AAClD,eAAO,MAAM,aAAa,EAAE,SAAS,SAAS,EAY7C,CAAC;AAEF,6CAA6C;AAC7C,eAAO,MAAM,YAAY,EAAE,WAAW,CAAC,SAAS,CAAyB,CAAC;AAU1E;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAQrE;AAED;mEACmE;AACnE,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAElD;AAED,6EAA6E;AAC7E,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,CAMxD"}
|
package/dist/agents/shims.js
CHANGED
|
@@ -252,6 +252,29 @@ const grokShim = {
|
|
|
252
252
|
},
|
|
253
253
|
getAuthCommand: () => null,
|
|
254
254
|
};
|
|
255
|
+
/**
|
|
256
|
+
* DeepSeek coding agent (`dsh`, @deepseek-ai/dsh) — tier-1. Boot model is
|
|
257
|
+
* `dsh --profile <name>`; the headless one-shot surface is the `headless`
|
|
258
|
+
* profile: `dsh --profile headless "<task>"` streams reasoning to stderr and
|
|
259
|
+
* prints the final assistant message to stdout. At 0.1.5-rc.1 the headless
|
|
260
|
+
* app accepts only the positional task and `-h` — no resume/model/mode flags.
|
|
261
|
+
* No auth subcommand; credentials resolve via env references / `~/.dsh`.
|
|
262
|
+
*/
|
|
263
|
+
const dshShim = {
|
|
264
|
+
name: 'deepseek',
|
|
265
|
+
command: 'dsh',
|
|
266
|
+
tier: 1,
|
|
267
|
+
getHelpCommand: () => ({ command: 'dsh', args: ['--help'] }),
|
|
268
|
+
getVersionCommand: () => ({ command: 'dsh', args: ['--version'] }),
|
|
269
|
+
getPromptCommand: (options) => {
|
|
270
|
+
// Always a fresh one-shot headless dispatch: sessionId/sessionDir/
|
|
271
|
+
// continue/model degrade silently — the HEADLESS app takes only the
|
|
272
|
+
// task + `-h`; no resume/model flags exist at dsh 0.1.5-rc.1.
|
|
273
|
+
// mode/workspace/timeoutMs have no dsh flag — best-effort ignored.
|
|
274
|
+
return { command: 'dsh', args: ['--profile', 'headless', options.input ?? ''] };
|
|
275
|
+
},
|
|
276
|
+
getAuthCommand: () => null,
|
|
277
|
+
};
|
|
255
278
|
/** All bundled agent shims keyed by canonical agent name. */
|
|
256
279
|
export const AGENT_SHIMS = {
|
|
257
280
|
claude: claudeShim,
|
|
@@ -264,6 +287,7 @@ export const AGENT_SHIMS = {
|
|
|
264
287
|
hermes: hermesShim,
|
|
265
288
|
omp: ompShim,
|
|
266
289
|
grok: grokShim,
|
|
290
|
+
deepseek: dshShim,
|
|
267
291
|
};
|
|
268
292
|
/**
|
|
269
293
|
* Session-affinity capability metadata per agent. Callers must consult this
|
|
@@ -288,6 +312,8 @@ const AGENT_SESSION_CAPABILITY = {
|
|
|
288
312
|
opencode: { supportsResumeById: false, supportsSessionDir: false },
|
|
289
313
|
openclaw: { supportsResumeById: false, supportsSessionDir: false },
|
|
290
314
|
hermes: { supportsResumeById: false, supportsSessionDir: false },
|
|
315
|
+
// dsh headless has no resume/session flags — fresh-dispatch degrade.
|
|
316
|
+
deepseek: { supportsResumeById: false, supportsSessionDir: false },
|
|
291
317
|
};
|
|
292
318
|
/** Query a bundled agent's session-affinity capability by canonical name. */
|
|
293
319
|
export function getAgentSessionCapability(agent) {
|
|
@@ -303,6 +329,7 @@ export const TIER1_PRIORITY = [
|
|
|
303
329
|
'hermes',
|
|
304
330
|
'opencode',
|
|
305
331
|
'grok',
|
|
332
|
+
'deepseek',
|
|
306
333
|
];
|
|
307
334
|
/** Display order for doctor and list commands. */
|
|
308
335
|
export const DISPLAY_ORDER = [
|
|
@@ -316,6 +343,7 @@ export const DISPLAY_ORDER = [
|
|
|
316
343
|
'openclaw',
|
|
317
344
|
'hermes',
|
|
318
345
|
'grok',
|
|
346
|
+
'deepseek',
|
|
319
347
|
];
|
|
320
348
|
/** Set of gateway/TUI-constrained agents. */
|
|
321
349
|
export const TIER2_AGENTS = new Set(['openclaw']);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gobing-ai/ts-ai-runner",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.63",
|
|
4
4
|
"description": "@gobing-ai/ts-ai-runner — Coding-agent shims, detection, doctor checks, and prompt execution.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
"release": "echo 'Manual publish is disabled. Releases go through GitHub Actions via Trusted Publishing — push a tag: git tag @gobing-ai/ts-ai-runner-v<version> && git push --tags' && exit 1"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@gobing-ai/ts-infra": "^0.4.
|
|
51
|
-
"@gobing-ai/ts-runtime": "^0.4.
|
|
50
|
+
"@gobing-ai/ts-infra": "^0.4.63",
|
|
51
|
+
"@gobing-ai/ts-runtime": "^0.4.63"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@types/bun": "1.3.14",
|
|
55
|
-
"@gobing-ai/ts-db": "^0.4.
|
|
55
|
+
"@gobing-ai/ts-db": "^0.4.63"
|
|
56
56
|
},
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|
package/src/agents/shims.ts
CHANGED
|
@@ -11,7 +11,8 @@ export type AgentName =
|
|
|
11
11
|
| 'openclaw'
|
|
12
12
|
| 'hermes'
|
|
13
13
|
| 'omp'
|
|
14
|
-
| 'grok'
|
|
14
|
+
| 'grok'
|
|
15
|
+
| 'deepseek';
|
|
15
16
|
|
|
16
17
|
/** Output mode for prompt invocations. */
|
|
17
18
|
export type OutputMode = 'text' | 'json';
|
|
@@ -331,6 +332,30 @@ const grokShim: AgentShim = {
|
|
|
331
332
|
getAuthCommand: () => null,
|
|
332
333
|
};
|
|
333
334
|
|
|
335
|
+
/**
|
|
336
|
+
* DeepSeek coding agent (`dsh`, @deepseek-ai/dsh) — tier-1. Boot model is
|
|
337
|
+
* `dsh --profile <name>`; the headless one-shot surface is the `headless`
|
|
338
|
+
* profile: `dsh --profile headless "<task>"` streams reasoning to stderr and
|
|
339
|
+
* prints the final assistant message to stdout. At 0.1.5-rc.1 the headless
|
|
340
|
+
* app accepts only the positional task and `-h` — no resume/model/mode flags.
|
|
341
|
+
* No auth subcommand; credentials resolve via env references / `~/.dsh`.
|
|
342
|
+
*/
|
|
343
|
+
const dshShim: AgentShim = {
|
|
344
|
+
name: 'deepseek',
|
|
345
|
+
command: 'dsh',
|
|
346
|
+
tier: 1,
|
|
347
|
+
getHelpCommand: () => ({ command: 'dsh', args: ['--help'] }),
|
|
348
|
+
getVersionCommand: () => ({ command: 'dsh', args: ['--version'] }),
|
|
349
|
+
getPromptCommand: (options) => {
|
|
350
|
+
// Always a fresh one-shot headless dispatch: sessionId/sessionDir/
|
|
351
|
+
// continue/model degrade silently — the HEADLESS app takes only the
|
|
352
|
+
// task + `-h`; no resume/model flags exist at dsh 0.1.5-rc.1.
|
|
353
|
+
// mode/workspace/timeoutMs have no dsh flag — best-effort ignored.
|
|
354
|
+
return { command: 'dsh', args: ['--profile', 'headless', options.input ?? ''] };
|
|
355
|
+
},
|
|
356
|
+
getAuthCommand: () => null,
|
|
357
|
+
};
|
|
358
|
+
|
|
334
359
|
/** All bundled agent shims keyed by canonical agent name. */
|
|
335
360
|
export const AGENT_SHIMS: Readonly<Record<AgentName, AgentShim>> = {
|
|
336
361
|
claude: claudeShim,
|
|
@@ -343,6 +368,7 @@ export const AGENT_SHIMS: Readonly<Record<AgentName, AgentShim>> = {
|
|
|
343
368
|
hermes: hermesShim,
|
|
344
369
|
omp: ompShim,
|
|
345
370
|
grok: grokShim,
|
|
371
|
+
deepseek: dshShim,
|
|
346
372
|
};
|
|
347
373
|
|
|
348
374
|
/** Session-affinity capability for one coding agent (ADR-047). */
|
|
@@ -376,6 +402,8 @@ const AGENT_SESSION_CAPABILITY: Readonly<Record<AgentName, AgentSessionCapabilit
|
|
|
376
402
|
opencode: { supportsResumeById: false, supportsSessionDir: false },
|
|
377
403
|
openclaw: { supportsResumeById: false, supportsSessionDir: false },
|
|
378
404
|
hermes: { supportsResumeById: false, supportsSessionDir: false },
|
|
405
|
+
// dsh headless has no resume/session flags — fresh-dispatch degrade.
|
|
406
|
+
deepseek: { supportsResumeById: false, supportsSessionDir: false },
|
|
379
407
|
};
|
|
380
408
|
|
|
381
409
|
/** Query a bundled agent's session-affinity capability by canonical name. */
|
|
@@ -393,6 +421,7 @@ export const TIER1_PRIORITY: readonly AgentName[] = [
|
|
|
393
421
|
'hermes',
|
|
394
422
|
'opencode',
|
|
395
423
|
'grok',
|
|
424
|
+
'deepseek',
|
|
396
425
|
];
|
|
397
426
|
|
|
398
427
|
/** Display order for doctor and list commands. */
|
|
@@ -407,6 +436,7 @@ export const DISPLAY_ORDER: readonly AgentName[] = [
|
|
|
407
436
|
'openclaw',
|
|
408
437
|
'hermes',
|
|
409
438
|
'grok',
|
|
439
|
+
'deepseek',
|
|
410
440
|
];
|
|
411
441
|
|
|
412
442
|
/** Set of gateway/TUI-constrained agents. */
|