1Lany2a/dsh-domain-role--plugins-dsh-domain-bridge ↗★ 2
dsh-domain-bridge
域可达层:声明优先的域寻址、会话工厂、四级「已暂停」、唤醒接线与模型分派。工具清单与口径见 README.md,变更史见 CHANGELOG.md。 实现多机器路径解析与域会话管理,适合需要跨设备部署和域分发的高级用户。
インストール
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:1Lany2a/dsh-domain-role#ed0b35f0d15b5c3b904ddf09c08cf0cc0e7583ea&path:plugins/dsh-domain-bridgeドキュメント
README 全文を読む ↗配置(cordis.patch.yml + 每台机器的 config.json)
插件包里没有任何本机绝对路径:所有路径在加载时解析,前一层非空即胜出。
| 键 | 1. 部署配置(cordis.patch.yml) | 2. /config.json | 3. 环境变量 | 4. 默认 |
|---|---|---|---|---|
indexFile(只读:会话 id → 域 标注) | indexFile: | indexFile | DSH_DOMAIN_BRIDGE_INDEX | /registry.json |
domainsFile(在任声明册) | domainsFile: | domainsFile | DSH_DOMAIN_BRIDGE_DOMAINS | /domains.json |
ownerCli(外部 CLI 的写法提示,可空) | ownerCli: | ownerCli | DSH_DOMAIN_BRIDGE_OWNER_CLI | 空 ⇒ 文案只写裸脚本名 domain-owner.mjs |
domainSessionModel(v0.6.0:新建域会话建完铺的模型) | domainSessionModel: | domainSessionModel | —(无环境变量) | 空/非法 ⇒ 不铺,继承全局默认 |
home = DSH_DOMAIN_BRIDGE_HOME,没设就是 /.dsh/dsh-domain-bridge。要在一台机器上钉死路径,写 /config.json 就行,不用改 cordis.patch.yml(可选;JSON 里反斜杠要写两个):
{ "indexFile": ".json", "domainsFile": ".json", "ownerCli": "/domain-owner.mjs" }
config:
stateDir: '' # v0.4.0:政策轴「已暂停」+ 落盘队列;不给=/state,写 '' 也退回默认
domainSessionPreset: 'workspace-write' # v0.3.3:create_domain_session 建完设的权限档;v0.6.4 起缺省=workspace-write,要全权自己写 danger-full-access
indexFile / domainsFile / stateDir 读不到或格式坏掉一律静默降级(当成"没有域标注 / 没有人认领 / 没有暂停"),不抛错、不影响投递;domainSessionPreset 写 '' / none 即关掉那一步(保持宿主默认档)。`` 全空(没有 config、两个默认文件也不存在)时插件照常加载,只是报「0 个域」。