dshb-auth 0.0.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.
- package/LICENSE +21 -0
- package/cordis.patch.yml +20 -0
- package/lib/client.js +468 -0
- package/lib/client.js.map +1 -0
- package/lib/credentials.d.ts +30 -0
- package/lib/credentials.js +121 -0
- package/lib/credentials.js.map +1 -0
- package/lib/gate.d.ts +14 -0
- package/lib/gate.js +45 -0
- package/lib/gate.js.map +1 -0
- package/lib/index-CLOUBKxU.d.ts +1125 -0
- package/lib/index.d.ts +8 -0
- package/lib/index.js +15 -0
- package/lib/index.js.map +1 -0
- package/lib/login-page.d.ts +5 -0
- package/lib/login-page.js +87 -0
- package/lib/login-page.js.map +1 -0
- package/lib/loopback-compat.d.ts +6 -0
- package/lib/loopback-compat.js +72 -0
- package/lib/loopback-compat.js.map +1 -0
- package/lib/loopback.d.ts +7 -0
- package/lib/loopback.js +24 -0
- package/lib/loopback.js.map +1 -0
- package/lib/ratelimit.d.ts +11 -0
- package/lib/ratelimit.js +37 -0
- package/lib/ratelimit.js.map +1 -0
- package/lib/routes.d.ts +8 -0
- package/lib/routes.js +224 -0
- package/lib/routes.js.map +1 -0
- package/lib/session.d.ts +11 -0
- package/lib/session.js +52 -0
- package/lib/session.js.map +1 -0
- package/lib/startup.d.ts +15 -0
- package/lib/startup.js +68 -0
- package/lib/startup.js.map +1 -0
- package/lib/webserver.d.ts +18 -0
- package/lib/webserver.js +60 -0
- package/lib/webserver.js.map +1 -0
- package/package.json +49 -0
package/lib/startup.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { t as Context } from "./index-CLOUBKxU.js";
|
|
2
|
+
//#region src/startup.d.ts
|
|
3
|
+
declare const name = "web-startup";
|
|
4
|
+
declare const inject: string[];
|
|
5
|
+
declare const WEB_STARTUP_SERVICE = "webStartup";
|
|
6
|
+
interface WebStartupValues {
|
|
7
|
+
openBrowser: boolean;
|
|
8
|
+
host?: string;
|
|
9
|
+
port?: number;
|
|
10
|
+
trustedHosts: string[];
|
|
11
|
+
}
|
|
12
|
+
declare function apply(ctx: Context): void;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { WEB_STARTUP_SERVICE, WebStartupValues, apply, inject, name };
|
|
15
|
+
//# sourceMappingURL=startup.d.ts.map
|
package/lib/startup.js
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { sanitizeUsername, sharedCredentialStore } from "./credentials.js";
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import { parseCmdline } from "@deepseek-ai/dsh-cmdline";
|
|
4
|
+
//#region src/startup.ts
|
|
5
|
+
const name = "web-startup";
|
|
6
|
+
const inject = ["cmdlineArgs"];
|
|
7
|
+
const WEB_STARTUP_SERVICE = "webStartup";
|
|
8
|
+
function runAuthReset(args) {
|
|
9
|
+
const store = sharedCredentialStore();
|
|
10
|
+
if (!store.isInitialized()) {
|
|
11
|
+
console.error("auth-reset: 尚未初始化管理员账号");
|
|
12
|
+
process.exit(1);
|
|
13
|
+
}
|
|
14
|
+
let password;
|
|
15
|
+
let username;
|
|
16
|
+
for (let i = 1; i < args.length; i++) if (args[i] === "--password") password = args[++i];
|
|
17
|
+
else if (args[i] === "--username") username = args[++i];
|
|
18
|
+
if (password === void 0 && username === void 0) {
|
|
19
|
+
console.error("auth-reset: 需要 --password <新密码> 和/或 --username <新用户名>");
|
|
20
|
+
process.exit(1);
|
|
21
|
+
}
|
|
22
|
+
if (password !== void 0 && password.length < 8) {
|
|
23
|
+
console.error("auth-reset: 密码至少 8 个字符");
|
|
24
|
+
process.exit(1);
|
|
25
|
+
}
|
|
26
|
+
if (username !== void 0) {
|
|
27
|
+
username = sanitizeUsername(username);
|
|
28
|
+
if (!username) {
|
|
29
|
+
console.error("auth-reset: 用户名不能为空");
|
|
30
|
+
process.exit(1);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (password !== void 0) store.changePassword(username ?? store.username, password);
|
|
34
|
+
else store.changeUsername(username);
|
|
35
|
+
console.log("auth-reset: 已更新凭据并轮换会话密钥,全部已签发会话作废");
|
|
36
|
+
process.exit(0);
|
|
37
|
+
}
|
|
38
|
+
function webCommand() {
|
|
39
|
+
return new Command().name("dsh --profile web").description("Serve the DeepSeek Harness browser UI.").helpOption("-h, --help", "show this help").option("--host <host>", "bind host").option("--no-open", "do not open the Web UI in the default browser").option("--port <port>", "listen port; pass 0 to let the OS pick a free one").option("--trusted-host <authority...>", "extra authority the /api browser-trust fence accepts (host or host:port; repeatable)").addHelpText("after", `
|
|
40
|
+
Examples:
|
|
41
|
+
dsh --profile web serve on the composed host and port
|
|
42
|
+
dsh --profile web --no-open serve without opening a browser
|
|
43
|
+
dsh --profile web --port 8080 serve on another port
|
|
44
|
+
dsh --profile web --host 0.0.0.0 serve on all interfaces (DSHB: auth plugin guards access)
|
|
45
|
+
dsh --profile web auth-reset --password <新密码> reset admin credentials and revoke all sessions
|
|
46
|
+
`);
|
|
47
|
+
}
|
|
48
|
+
function apply(ctx) {
|
|
49
|
+
const args = ctx.cmdlineArgs?.get() ?? [];
|
|
50
|
+
if (args[0] === "auth-reset") runAuthReset(args);
|
|
51
|
+
const program = webCommand();
|
|
52
|
+
program.action(() => {
|
|
53
|
+
const options = program.opts();
|
|
54
|
+
if (options.port !== void 0 && !/^\d+$/.test(options.port)) program.error(`error: --port must be a number, got ${JSON.stringify(options.port)}`);
|
|
55
|
+
const values = {
|
|
56
|
+
openBrowser: options.open,
|
|
57
|
+
...options.host !== void 0 && { host: options.host },
|
|
58
|
+
...options.port !== void 0 && { port: Number(options.port) },
|
|
59
|
+
trustedHosts: options.trustedHost ?? []
|
|
60
|
+
};
|
|
61
|
+
ctx.provide(WEB_STARTUP_SERVICE, values);
|
|
62
|
+
});
|
|
63
|
+
parseCmdline(ctx, program);
|
|
64
|
+
}
|
|
65
|
+
//#endregion
|
|
66
|
+
export { WEB_STARTUP_SERVICE, apply, inject, name };
|
|
67
|
+
|
|
68
|
+
//# sourceMappingURL=startup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"startup.js","names":[],"sources":["../src/startup.ts"],"sourcesContent":["import { Command } from 'commander'\nimport { parseCmdline } from '@deepseek-ai/dsh-cmdline'\nimport type { Context } from '@deepseek-ai/cordis'\nimport { sanitizeUsername, sharedCredentialStore } from './credentials.js'\n\nexport const name = 'web-startup'\n\nexport const inject = ['cmdlineArgs']\n\nexport const WEB_STARTUP_SERVICE = 'webStartup'\n\nexport interface WebStartupValues {\n openBrowser: boolean\n host?: string\n port?: number\n trustedHosts: string[]\n}\n\nfunction runAuthReset(args: readonly string[]): never {\n const store = sharedCredentialStore()\n if (!store.isInitialized()) {\n console.error('auth-reset: 尚未初始化管理员账号')\n process.exit(1)\n }\n let password: string | undefined\n let username: string | undefined\n for (let i = 1; i < args.length; i++) {\n if (args[i] === '--password') password = args[++i]\n else if (args[i] === '--username') username = args[++i]\n }\n if (password === undefined && username === undefined) {\n console.error('auth-reset: 需要 --password <新密码> 和/或 --username <新用户名>')\n process.exit(1)\n }\n if (password !== undefined && password.length < 8) {\n console.error('auth-reset: 密码至少 8 个字符')\n process.exit(1)\n }\n if (username !== undefined) {\n username = sanitizeUsername(username)\n if (!username) {\n console.error('auth-reset: 用户名不能为空')\n process.exit(1)\n }\n }\n if (password !== undefined) store.changePassword(username ?? store.username!, password)\n else store.changeUsername(username!)\n console.log('auth-reset: 已更新凭据并轮换会话密钥,全部已签发会话作废')\n process.exit(0)\n}\n\nfunction webCommand(): Command {\n return new Command()\n .name('dsh --profile web')\n .description('Serve the DeepSeek Harness browser UI.')\n .helpOption('-h, --help', 'show this help')\n .option('--host <host>', 'bind host')\n .option('--no-open', 'do not open the Web UI in the default browser')\n .option('--port <port>', 'listen port; pass 0 to let the OS pick a free one')\n .option(\n '--trusted-host <authority...>',\n 'extra authority the /api browser-trust fence accepts (host or host:port; repeatable)',\n )\n .addHelpText(\n 'after',\n `\nExamples:\n dsh --profile web serve on the composed host and port\n dsh --profile web --no-open serve without opening a browser\n dsh --profile web --port 8080 serve on another port\n dsh --profile web --host 0.0.0.0 serve on all interfaces (DSHB: auth plugin guards access)\n dsh --profile web auth-reset --password <新密码> reset admin credentials and revoke all sessions\n`,\n )\n}\n\nexport function apply(ctx: Context): void {\n const args = ctx.cmdlineArgs?.get() ?? []\n if (args[0] === 'auth-reset') runAuthReset(args)\n const program = webCommand()\n program.action(() => {\n const options = program.opts()\n if (options.port !== undefined && !/^\\d+$/.test(options.port)) {\n program.error(`error: --port must be a number, got ${JSON.stringify(options.port)}`)\n }\n const values: WebStartupValues = {\n openBrowser: options.open,\n ...(options.host !== undefined && { host: options.host }),\n ...(options.port !== undefined && { port: Number(options.port) }),\n trustedHosts: options.trustedHost ?? [],\n }\n ctx.provide(WEB_STARTUP_SERVICE, values)\n })\n parseCmdline(ctx, program)\n}\n"],"mappings":";;;;AAKA,MAAa,OAAO;AAEpB,MAAa,SAAS,CAAC,aAAa;AAEpC,MAAa,sBAAsB;AASnC,SAAS,aAAa,MAAgC;CACpD,MAAM,QAAQ,sBAAsB;CACpC,IAAI,CAAC,MAAM,cAAc,GAAG;EAC1B,QAAQ,MAAM,wBAAwB;EACtC,QAAQ,KAAK,CAAC;CAChB;CACA,IAAI;CACJ,IAAI;CACJ,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAC/B,IAAI,KAAK,OAAO,cAAc,WAAW,KAAK,EAAE;MAC3C,IAAI,KAAK,OAAO,cAAc,WAAW,KAAK,EAAE;CAEvD,IAAI,aAAa,KAAA,KAAa,aAAa,KAAA,GAAW;EACpD,QAAQ,MAAM,uDAAuD;EACrE,QAAQ,KAAK,CAAC;CAChB;CACA,IAAI,aAAa,KAAA,KAAa,SAAS,SAAS,GAAG;EACjD,QAAQ,MAAM,wBAAwB;EACtC,QAAQ,KAAK,CAAC;CAChB;CACA,IAAI,aAAa,KAAA,GAAW;EAC1B,WAAW,iBAAiB,QAAQ;EACpC,IAAI,CAAC,UAAU;GACb,QAAQ,MAAM,qBAAqB;GACnC,QAAQ,KAAK,CAAC;EAChB;CACF;CACA,IAAI,aAAa,KAAA,GAAW,MAAM,eAAe,YAAY,MAAM,UAAW,QAAQ;MACjF,MAAM,eAAe,QAAS;CACnC,QAAQ,IAAI,oCAAoC;CAChD,QAAQ,KAAK,CAAC;AAChB;AAEA,SAAS,aAAsB;CAC7B,OAAO,IAAI,QAAQ,CAAC,CACjB,KAAK,mBAAmB,CAAC,CACzB,YAAY,wCAAwC,CAAC,CACrD,WAAW,cAAc,gBAAgB,CAAC,CAC1C,OAAO,iBAAiB,WAAW,CAAC,CACpC,OAAO,aAAa,+CAA+C,CAAC,CACpE,OAAO,iBAAiB,mDAAmD,CAAC,CAC5E,OACC,iCACA,sFACF,CAAC,CACA,YACC,SACA;;;;;;;CAQF;AACJ;AAEA,SAAgB,MAAM,KAAoB;CACxC,MAAM,OAAO,IAAI,aAAa,IAAI,KAAK,CAAC;CACxC,IAAI,KAAK,OAAO,cAAc,aAAa,IAAI;CAC/C,MAAM,UAAU,WAAW;CAC3B,QAAQ,aAAa;EACnB,MAAM,UAAU,QAAQ,KAAK;EAC7B,IAAI,QAAQ,SAAS,KAAA,KAAa,CAAC,QAAQ,KAAK,QAAQ,IAAI,GAC1D,QAAQ,MAAM,uCAAuC,KAAK,UAAU,QAAQ,IAAI,GAAG;EAErF,MAAM,SAA2B;GAC/B,aAAa,QAAQ;GACrB,GAAI,QAAQ,SAAS,KAAA,KAAa,EAAE,MAAM,QAAQ,KAAK;GACvD,GAAI,QAAQ,SAAS,KAAA,KAAa,EAAE,MAAM,OAAO,QAAQ,IAAI,EAAE;GAC/D,cAAc,QAAQ,eAAe,CAAC;EACxC;EACA,IAAI,QAAQ,qBAAqB,MAAM;CACzC,CAAC;CACD,aAAa,KAAK,OAAO;AAC3B"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { t as Context } from "./index-CLOUBKxU.js";
|
|
2
|
+
import WebServer, { WebRoute, WebUpgradeRoute } from "@deepseek-ai/dsh-host-webserver";
|
|
3
|
+
//#region src/webserver.d.ts
|
|
4
|
+
declare class AuthedWebServer extends WebServer {
|
|
5
|
+
private readonly gate;
|
|
6
|
+
constructor(ctx: Context, config: {
|
|
7
|
+
host: '127.0.0.1' | '0.0.0.0';
|
|
8
|
+
port: number;
|
|
9
|
+
});
|
|
10
|
+
register(route: WebRoute): () => void;
|
|
11
|
+
registerFallback(handler: WebRoute['handler']): () => void;
|
|
12
|
+
registerUpgrade(route: WebUpgradeRoute): () => void;
|
|
13
|
+
private guarded;
|
|
14
|
+
private guardedUpgrade;
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { AuthedWebServer as default };
|
|
18
|
+
//# sourceMappingURL=webserver.d.ts.map
|
package/lib/webserver.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { sharedCredentialStore } from "./credentials.js";
|
|
2
|
+
import { AuthGate, rewriteToLoopback } from "./gate.js";
|
|
3
|
+
import WebServer from "@deepseek-ai/dsh-host-webserver";
|
|
4
|
+
//#region src/webserver.ts
|
|
5
|
+
var AuthedWebServer = class extends WebServer {
|
|
6
|
+
gate = new AuthGate(sharedCredentialStore());
|
|
7
|
+
constructor(ctx, config) {
|
|
8
|
+
super(ctx, config);
|
|
9
|
+
}
|
|
10
|
+
register(route) {
|
|
11
|
+
return super.register({
|
|
12
|
+
...route,
|
|
13
|
+
handler: (req, res) => this.guarded(route, req, res)
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
registerFallback(handler) {
|
|
17
|
+
return super.registerFallback((req, res) => this.guarded({
|
|
18
|
+
kind: "exact",
|
|
19
|
+
path: "/",
|
|
20
|
+
handler
|
|
21
|
+
}, req, res));
|
|
22
|
+
}
|
|
23
|
+
registerUpgrade(route) {
|
|
24
|
+
return super.registerUpgrade({
|
|
25
|
+
...route,
|
|
26
|
+
handler: (req, socket, head) => this.guardedUpgrade(route, req, socket, head)
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
guarded(route, req, res) {
|
|
30
|
+
const decision = this.gate.decide(req);
|
|
31
|
+
if (decision === "allow") {
|
|
32
|
+
rewriteToLoopback(req, this.port);
|
|
33
|
+
return route.handler(req, res);
|
|
34
|
+
}
|
|
35
|
+
if (decision === "exempt") return route.handler(req, res);
|
|
36
|
+
if (decision === "redirect-login") {
|
|
37
|
+
res.writeHead(302, { location: "/login" });
|
|
38
|
+
res.end();
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
res.writeHead(401, { "content-type": "application/json" });
|
|
42
|
+
res.end(JSON.stringify({
|
|
43
|
+
ok: false,
|
|
44
|
+
error: "unauthorized"
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
47
|
+
guardedUpgrade(route, req, socket, head) {
|
|
48
|
+
const decision = this.gate.decide(req);
|
|
49
|
+
if (decision === "allow" || decision === "exempt") {
|
|
50
|
+
if (decision === "allow") rewriteToLoopback(req, this.port);
|
|
51
|
+
return route.handler(req, socket, head);
|
|
52
|
+
}
|
|
53
|
+
socket.write("HTTP/1.1 401 Unauthorized\r\nConnection: close\r\n\r\n");
|
|
54
|
+
socket.destroy();
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
//#endregion
|
|
58
|
+
export { AuthedWebServer as default };
|
|
59
|
+
|
|
60
|
+
//# sourceMappingURL=webserver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webserver.js","names":[],"sources":["../src/webserver.ts"],"sourcesContent":["import type { IncomingMessage, ServerResponse } from 'node:http'\nimport type { Duplex } from 'node:stream'\nimport WebServer from '@deepseek-ai/dsh-host-webserver'\nimport type { WebRoute, WebUpgradeRoute } from '@deepseek-ai/dsh-host-webserver'\nimport type { Context } from '@deepseek-ai/cordis'\nimport { sharedCredentialStore } from './credentials.js'\nimport { AuthGate, rewriteToLoopback } from './gate.js'\n\nexport default class AuthedWebServer extends WebServer {\n private readonly gate = new AuthGate(sharedCredentialStore())\n\n constructor(ctx: Context, config: { host: '127.0.0.1' | '0.0.0.0'; port: number }) {\n super(ctx, config)\n }\n\n override register(route: WebRoute): () => void {\n return super.register({ ...route, handler: (req, res) => this.guarded(route, req, res) })\n }\n\n override registerFallback(handler: WebRoute['handler']): () => void {\n return super.registerFallback((req, res) =>\n this.guarded({ kind: 'exact', path: '/', handler }, req, res),\n )\n }\n\n override registerUpgrade(route: WebUpgradeRoute): () => void {\n return super.registerUpgrade({\n ...route,\n handler: (req, socket, head) => this.guardedUpgrade(route, req, socket, head),\n })\n }\n\n private guarded(route: WebRoute, req: IncomingMessage, res: ServerResponse): void | Promise<void> {\n const decision = this.gate.decide(req)\n if (decision === 'allow') {\n rewriteToLoopback(req, this.port)\n return route.handler(req, res)\n }\n if (decision === 'exempt') {\n return route.handler(req, res)\n }\n if (decision === 'redirect-login') {\n res.writeHead(302, { location: '/login' })\n res.end()\n return\n }\n res.writeHead(401, { 'content-type': 'application/json' })\n res.end(JSON.stringify({ ok: false, error: 'unauthorized' }))\n }\n\n private guardedUpgrade(\n route: WebUpgradeRoute,\n req: IncomingMessage,\n socket: Duplex,\n head: Buffer,\n ): void | Promise<void> {\n const decision = this.gate.decide(req)\n if (decision === 'allow' || decision === 'exempt') {\n if (decision === 'allow') rewriteToLoopback(req, this.port)\n return route.handler(req, socket, head)\n }\n socket.write('HTTP/1.1 401 Unauthorized\\r\\nConnection: close\\r\\n\\r\\n')\n socket.destroy()\n }\n}\n"],"mappings":";;;;AAQA,IAAqB,kBAArB,cAA6C,UAAU;CACrD,OAAwB,IAAI,SAAS,sBAAsB,CAAC;CAE5D,YAAY,KAAc,QAAyD;EACjF,MAAM,KAAK,MAAM;CACnB;CAEA,SAAkB,OAA6B;EAC7C,OAAO,MAAM,SAAS;GAAE,GAAG;GAAO,UAAU,KAAK,QAAQ,KAAK,QAAQ,OAAO,KAAK,GAAG;EAAE,CAAC;CAC1F;CAEA,iBAA0B,SAA0C;EAClE,OAAO,MAAM,kBAAkB,KAAK,QAClC,KAAK,QAAQ;GAAE,MAAM;GAAS,MAAM;GAAK;EAAQ,GAAG,KAAK,GAAG,CAC9D;CACF;CAEA,gBAAyB,OAAoC;EAC3D,OAAO,MAAM,gBAAgB;GAC3B,GAAG;GACH,UAAU,KAAK,QAAQ,SAAS,KAAK,eAAe,OAAO,KAAK,QAAQ,IAAI;EAC9E,CAAC;CACH;CAEA,QAAgB,OAAiB,KAAsB,KAA2C;EAChG,MAAM,WAAW,KAAK,KAAK,OAAO,GAAG;EACrC,IAAI,aAAa,SAAS;GACxB,kBAAkB,KAAK,KAAK,IAAI;GAChC,OAAO,MAAM,QAAQ,KAAK,GAAG;EAC/B;EACA,IAAI,aAAa,UACf,OAAO,MAAM,QAAQ,KAAK,GAAG;EAE/B,IAAI,aAAa,kBAAkB;GACjC,IAAI,UAAU,KAAK,EAAE,UAAU,SAAS,CAAC;GACzC,IAAI,IAAI;GACR;EACF;EACA,IAAI,UAAU,KAAK,EAAE,gBAAgB,mBAAmB,CAAC;EACzD,IAAI,IAAI,KAAK,UAAU;GAAE,IAAI;GAAO,OAAO;EAAe,CAAC,CAAC;CAC9D;CAEA,eACE,OACA,KACA,QACA,MACsB;EACtB,MAAM,WAAW,KAAK,KAAK,OAAO,GAAG;EACrC,IAAI,aAAa,WAAW,aAAa,UAAU;GACjD,IAAI,aAAa,SAAS,kBAAkB,KAAK,KAAK,IAAI;GAC1D,OAAO,MAAM,QAAQ,KAAK,QAAQ,IAAI;EACxC;EACA,OAAO,MAAM,wDAAwD;EACrE,OAAO,QAAQ;CACjB;AACF"}
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dshb-auth",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "DSHB 管理端认证与网络暴露(登录页 / 会话 Cookie / startup 替换)",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "lib/index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./lib/index.js",
|
|
9
|
+
"./startup": "./lib/startup.js",
|
|
10
|
+
"./webserver": "./lib/webserver.js",
|
|
11
|
+
"./loopback": "./lib/loopback.js",
|
|
12
|
+
"./client": "./lib/client.js",
|
|
13
|
+
"./package.json": "./package.json"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"lib",
|
|
17
|
+
"cordis.patch.yml"
|
|
18
|
+
],
|
|
19
|
+
"dsh": {
|
|
20
|
+
"bundle": {
|
|
21
|
+
"patch": "./cordis.patch.yml"
|
|
22
|
+
},
|
|
23
|
+
"client": {
|
|
24
|
+
"platform": "web",
|
|
25
|
+
"inject": [
|
|
26
|
+
"@deepseek-ai/dsh-client-runtime",
|
|
27
|
+
"@deepseek-ai/dsh-client-ui-settings"
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@deepseek-ai/dsh-cmdline": "^0.1.1-rc.2",
|
|
33
|
+
"@deepseek-ai/dsh-host-webserver": "^0.1.1-rc.2",
|
|
34
|
+
"commander": "^15.0.0"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@deepseek-ai/cordis": "^4.0.2",
|
|
38
|
+
"@deepseek-ai/dsh-client-runtime": "^0.1.1-rc.2",
|
|
39
|
+
"@deepseek-ai/dsh-client-ui-settings": "^0.1.1-rc.2",
|
|
40
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.1-rc.2",
|
|
41
|
+
"@types/react": "^19.0.0",
|
|
42
|
+
"react": "^19.0.0"
|
|
43
|
+
},
|
|
44
|
+
"types": "lib/index.d.ts",
|
|
45
|
+
"scripts": {
|
|
46
|
+
"build": "tsdown",
|
|
47
|
+
"typecheck": "tsc --noEmit"
|
|
48
|
+
}
|
|
49
|
+
}
|