@cofy-x/dsh-console 0.1.0-alpha.4 → 0.1.0-alpha.5
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/cordis.patch.yml +1 -0
- package/dist/{chunk-ZO6HZW3P.js → chunk-6BGDBP2N.js} +1875 -654
- package/dist/chunk-WTD7XY24.js +32 -0
- package/dist/dsh/index.d.ts +1 -0
- package/dist/dsh/index.js +2 -1
- package/dist/dsh/startup.d.ts +1 -0
- package/dist/dsh/startup.js +22 -7
- package/dist/index.js +2 -1
- package/package.json +7 -2
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// src/config/pokemon-selection.ts
|
|
2
|
+
var POKEMON_NUMBER_ENV = "DSH_CONSOLE_POKEMON";
|
|
3
|
+
function parsePokemonNumber(raw, source) {
|
|
4
|
+
const value = raw.trim();
|
|
5
|
+
if (!/^\d+$/.test(value)) {
|
|
6
|
+
throw new Error(`${source} must be a positive integer.`);
|
|
7
|
+
}
|
|
8
|
+
const pokemonNumber = Number(value);
|
|
9
|
+
if (!Number.isSafeInteger(pokemonNumber) || pokemonNumber < 1) {
|
|
10
|
+
throw new Error(`${source} must be a positive integer.`);
|
|
11
|
+
}
|
|
12
|
+
return pokemonNumber;
|
|
13
|
+
}
|
|
14
|
+
function resolvePokemonNumber(cliValue, envValue) {
|
|
15
|
+
if (cliValue !== void 0) {
|
|
16
|
+
return parsePokemonNumber(cliValue, "--pokemon");
|
|
17
|
+
}
|
|
18
|
+
if (envValue !== void 0) {
|
|
19
|
+
return parsePokemonNumber(envValue, POKEMON_NUMBER_ENV);
|
|
20
|
+
}
|
|
21
|
+
return void 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export {
|
|
25
|
+
POKEMON_NUMBER_ENV,
|
|
26
|
+
resolvePokemonNumber
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* @license
|
|
30
|
+
* Copyright 2026 cofy-x
|
|
31
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
32
|
+
*/
|
package/dist/dsh/index.d.ts
CHANGED
package/dist/dsh/index.js
CHANGED
package/dist/dsh/startup.d.ts
CHANGED
package/dist/dsh/startup.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import {
|
|
2
|
+
POKEMON_NUMBER_ENV,
|
|
3
|
+
resolvePokemonNumber
|
|
4
|
+
} from "../chunk-WTD7XY24.js";
|
|
5
|
+
|
|
1
6
|
// src/dsh/startup.ts
|
|
2
7
|
import { Command } from "commander";
|
|
3
8
|
import { parseCmdline } from "@deepseek-ai/dsh-cmdline";
|
|
@@ -5,13 +10,23 @@ var name = "dsh-console-startup";
|
|
|
5
10
|
var inject = ["cmdlineArgs"];
|
|
6
11
|
var DSH_CONSOLE_STARTUP_SERVICE = "dshConsoleStartup";
|
|
7
12
|
function apply(ctx) {
|
|
8
|
-
const program = new Command().name("dsh-console").description("Run DeepSeek Harness with the DSH Console terminal frontend.").helpOption("-h, --help", "show this help").option("-d, --debug", "enable DSH Console diagnostics", false).option(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
const program = new Command().name("dsh-console").description("Run DeepSeek Harness with the DSH Console terminal frontend.").helpOption("-h, --help", "show this help").option("-d, --debug", "enable DSH Console diagnostics", false).option(
|
|
14
|
+
"--pokemon <number>",
|
|
15
|
+
"use a bundled Pokemon number for this launch"
|
|
16
|
+
).option("-p, --prompt <text>", "submit an initial prompt after startup");
|
|
17
|
+
program.action(
|
|
18
|
+
(options) => {
|
|
19
|
+
const pokemon = resolvePokemonNumber(
|
|
20
|
+
options.pokemon,
|
|
21
|
+
process.env[POKEMON_NUMBER_ENV]
|
|
22
|
+
);
|
|
23
|
+
ctx.provide(DSH_CONSOLE_STARTUP_SERVICE, {
|
|
24
|
+
...options.prompt === void 0 ? {} : { prompt: options.prompt },
|
|
25
|
+
...pokemon === void 0 ? {} : { pokemon },
|
|
26
|
+
debug: options.debug
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
);
|
|
15
30
|
parseCmdline(ctx, program);
|
|
16
31
|
}
|
|
17
32
|
export {
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cofy-x/dsh-console",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.5",
|
|
4
4
|
"description": "A TypeScript and React/Ink terminal frontend for DeepSeek Harness.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"prepack": "pnpm run build",
|
|
33
33
|
"start": "node dist/index.js",
|
|
34
34
|
"debug": "node --inspect-brk dist/index.js",
|
|
35
|
-
"lint": "eslint . --ext .ts,.tsx",
|
|
35
|
+
"lint": "eslint . --ext .ts,.tsx --max-warnings=0",
|
|
36
36
|
"format": "prettier --write .",
|
|
37
37
|
"test": "vitest run",
|
|
38
38
|
"test:ci": "vitest run --coverage --exclude '**/*.performance.test.ts'",
|
|
@@ -104,6 +104,7 @@
|
|
|
104
104
|
"@deepseek-ai/dsh-session-projection": "0.1.1-rc.2",
|
|
105
105
|
"@deepseek-ai/dsh-session-query": "0.1.1-rc.2",
|
|
106
106
|
"@deepseek-ai/dsh-settings": "0.1.1-rc.2",
|
|
107
|
+
"@deepseek-ai/dsh-subagent": "0.1.1-rc.2",
|
|
107
108
|
"@deepseek-ai/dsh-tools": "0.1.1-rc.2",
|
|
108
109
|
"@deepseek-ai/dsh-user-approval": "0.1.1-rc.2",
|
|
109
110
|
"@deepseek-ai/dsh-user-questions": "0.1.1-rc.2",
|
|
@@ -132,6 +133,7 @@
|
|
|
132
133
|
"@deepseek-ai/dsh-session-projection": ">=0.1.0-rc.3 <0.2.0",
|
|
133
134
|
"@deepseek-ai/dsh-session-query": ">=0.1.0-rc.3 <0.2.0",
|
|
134
135
|
"@deepseek-ai/dsh-settings": ">=0.1.0-rc.3 <0.2.0",
|
|
136
|
+
"@deepseek-ai/dsh-subagent": ">=0.1.0-rc.3 <0.2.0",
|
|
135
137
|
"@deepseek-ai/dsh-tools": ">=0.1.0-rc.3 <0.2.0",
|
|
136
138
|
"@deepseek-ai/dsh-user-approval": ">=0.1.0-rc.3 <0.2.0",
|
|
137
139
|
"@deepseek-ai/dsh-user-questions": ">=0.1.0-rc.3 <0.2.0"
|
|
@@ -184,6 +186,9 @@
|
|
|
184
186
|
},
|
|
185
187
|
"@deepseek-ai/dsh-settings": {
|
|
186
188
|
"optional": true
|
|
189
|
+
},
|
|
190
|
+
"@deepseek-ai/dsh-subagent": {
|
|
191
|
+
"optional": true
|
|
187
192
|
}
|
|
188
193
|
},
|
|
189
194
|
"license": "Apache-2.0",
|