Files
dsh_shenxian/package.json
T
admin 640813e84e 覆盖网络线 S0+S1 落地:可达性单一入口 + 会合地址出 env
S0(本机):新增 src/net/reachability.ts(Reachability 描述 + agentBaseUrlOf 唯一取值入口)、src/net/rendezvous.ts、docs/architecture.md(四层划分 + 依赖方向 + R1-R4 判据)、scripts/check-layering.mjs + layering-baseline.json、test/reachability.test.mjs;src/supervisor/remote-spawner.ts 与 src/web/server.ts 改为统一走 agentBaseUrlOf(),agentUrl 降级为可选旧字段(向后兼容)。

S1(本机 + 106):新增 DSHS_RENDEZVOUS_URL 出 env(src/config.ts 解析 clusterRendezvousUrl,优先级 overrides > 新变量 > DSHS_TUNNEL_TARGET 兜底 > 空),src/worker/tunnel.ts 新增 normalizeTunnelTarget()、src/worker/agent.ts 改读新配置 ⇒ 双路径并存、可零代码回滚(删掉新 env 即走旧路径)。106 已上线,健康检查 tunnel.ready=true。

package.json 增加 check:layering 脚本并接入 verify;README 登记分层文档。

验收:npm run build 通过;npm test 44/44;check:layering 无新增违规(基线 5 条)。
2026-09-16 15:02:52 +08:00

86 lines
2.9 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",
"check:layering": "node scripts/check-layering.mjs",
"verify": "npm run build && node scripts/check-layering.mjs && node --test test/db.test.mjs test/local-user-fs.test.mjs test/crash-policy.test.mjs test/locale-pref.test.mjs test/worker-provision.test.mjs test/reachability.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 && node scripts/verify-dsh-install.mjs && node scripts/verify-models-dict.mjs && node scripts/verify-models-render.cjs && node scripts/verify-dsh-compat.mjs && node scripts/verify-my-skills.mjs && node scripts/verify-portal-entry.mjs",
"test": "npm run build && node --test test/db.test.mjs test/local-user-fs.test.mjs test/crash-policy.test.mjs test/reachability.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: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",
"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"
}
}