Files
dsh_shenxian/package.json
T
admin 918f1d3a51 feat(models): 平台自建「模型设置」—— 用户自配厂家 / 条目各自开关 / 共享模型开关(档案 87)
- 官方「设置 → 模型」页在平台环境**必然报错**(判据在**浏览器页面**的 loopback 判定;官方 README 原文 Non-loopback pages get no durable settings)⇒ 该分区对全角色(含 admin)隐藏,用户自配改走平台自建页(插件 0.3.11)
- DB 迁移 V6:credential_vault.route/base_url/api/models + users.shared_model_enabled;并**重定义 getEnabledCredentialKeyRef**(互斥删除后原实现无 ORDER BY ⇒ 「任取一条」)
- 新落地层 src/web/model-landing.ts:spawn 时把「已启用条目」写进实例 .credentials.yaml 与 settings.yaml 的 llm-pi-ai.providers.<route>;字段名与官方包实测对齐(apiKeyEnv / baseURL / api,**不是** protocol);只碰自己写过的 + 一次性交接
- 接口 /api/me/keys、/api/me/keys/:id/toggle、/api/me/models/shared;前端新增「设置 → 模型设置」分区(settings.section id=model-settings / order 100 / 全角色)
- 顺手修两处:ensure-role-profile-patch.cjs 的 --force 整文件覆盖会抹掉 admin 的 disable-hmr 与 workspace-scoped-picker 两个平台块(改为 stripManagedBlock 只替换自己那段);verify-mem-model.mjs 因档案 86 重构而长期失败的陈旧断言

⚠️ 本提交同时包含**档案 86(admin 跨用户实例管理 + 两处改名)**的代码改动 —— 该部分已上线并端到端验证;其 import/register 与本次改动同处 src/web/server.ts、poc/business-plugins/lib/client.js 等文件,按**文件粒度无法拆分**,且不带它会让仓库 tsc 直接失败(缺 src/web/routes/admin-user-ops.ts)。
2026-09-14 00:00:15 +08:00

87 lines
2.7 KiB
JSON

{
"name": "dshs",
"version": "0.1.0",
"description": "面向公网的多租户 DSH 托管平台:登录审核、每用户隔离的 DSH 环境(主 + 按需守护)、桌面与域名访问。",
"type": "module",
"main": "./lib/index.js",
"exports": {
".": "./lib/index.js",
"./runtime": "./lib/runtime.js"
},
"bin": {
"dshs": "./lib/cli.js"
},
"files": [
"lib",
"web",
"cordis.patch.yml",
"README.md"
],
"scripts": {
"build": "tsc -p tsconfig.json",
"prepare": "npm run build",
"dev": "node lib/cli.js",
"typecheck": "tsc -p tsconfig.json --noEmit",
"verify": "npm run build && node --test test/db.test.mjs test/k8s-spawner.test.mjs test/leader.test.mjs test/local-user-fs.test.mjs test/crash-policy.test.mjs && node scripts/verify-inject.cjs lib/supervisor/proxy.js && node scripts/verify-static.mjs && node scripts/verify-platform-admin-section.mjs && node scripts/verify-mem-model.mjs && node scripts/verify-model-landing.mjs",
"test": "npm run build && node --test test/db.test.mjs test/k8s-spawner.test.mjs test/leader.test.mjs test/local-user-fs.test.mjs test/crash-policy.test.mjs && node scripts/verify-inject.cjs lib/supervisor/proxy.js",
"smoke": "node scripts/smoke.mjs",
"smoke:admin": "node scripts/smoke-admin.mjs",
"smoke:auth": "node scripts/smoke-auth.mjs",
"smoke:fs": "node scripts/smoke-fs.mjs",
"smoke:file-service": "node scripts/smoke-file-service.mjs",
"smoke:dsh": "node scripts/smoke-dsh.mjs",
"smoke:domain": "node scripts/smoke-domain.mjs",
"smoke:isolation": "node scripts/smoke-isolation.mjs",
"smoke:subdomain": "node scripts/smoke-subdomain.mjs"
},
"dsh": {
"plugin": true,
"kind": "server",
"bundle": {
"patch": "./cordis.patch.yml"
}
},
"disclosure": {
"cloud": true,
"network": [
"https://api.deepseek.com"
],
"apiKeys": [
{
"env": "DEEPSEEK_API_KEY",
"storage": "sqlite-encrypted-ref"
}
],
"permissions": {
"filesystem": "per-user-0700",
"network": "egress",
"env": "read-listed"
},
"jurisdiction": [
"PIPL(CN)"
],
"retention": "server"
},
"dependencies": {
"@fastify/rate-limit": "^10.0.0",
"@fastify/static": "^10.1.3",
"@kubernetes/client-node": "^2.0.0",
"better-sqlite3": "^11.10.0",
"fastify": "^5.0.0",
"pg": "^8.23.0"
},
"devDependencies": {
"@types/better-sqlite3": "^7.6.11",
"@types/node": "^22.10.0",
"@types/pg": "^8.23.1",
"typescript": "^5.7.0"
},
"engines": {
"node": "^22.19.0 || >=24"
},
"repository": {
"type": "git",
"url": "https://work.alotbuy.com/maogeigei/dsh_shenxian.git"
}
}