@mcd0luo/dsh-celestea
v0.1.6
Published
Celestea series settings hub: one Settings → Celestea page listing every celestea-* namespace plugin (celes-dsh-eye, ...) with a schema form for each
Downloads
880
Maintainers
Readme
@mcd0luo/dsh-celestea
Celestea 系列设置中心:在 dsh 设置页提供一个 Celestea 页面,自动聚合所有
celestea-* 命名空间插件的配置表单(顶部搜索框 + 插件标签 + schema 表单)。
安装
一条命令即可(本包声明了 dsh.bundle,dsh plugin 会把它自动挂进
dsh.profile.bundles,无需手改 cordis.patch.yml):
dsh plugin --profile web add @mcd0luo/dsh-celestea本包是 Celestea 系列的前置(先装本包,再装成员)。 它的 bundle 补丁是
系列的统一挂载点:补丁里为每个成员插件(celes-dsh-eye、
dsh-opencode-statusline 等)预留了挂载行,行带 disabled: !!js 条件——
成员包装进当前 profile 的那一次启动自动启用,移除后自动禁用
(按需补丁,不是全家桶)。因此:
# 1. 先装基座(一次性)——成为 profile 直接依赖,自动进 bundles
dsh plugin --profile web add @mcd0luo/dsh-celestea
# 2. 按需加成员,重启后自动挂载
dsh plugin --profile web add @mcd0luo/celes-dsh-eye
dsh plugin --profile web add @mcd0luo/dsh-opencode-statusline为什么必须先装基座:成员包把本包列为依赖,pnpm 会自动把它装进 node_modules,但
dsh plugin只把 profile 的直接依赖挂进dsh.profile.bundles——不显式add本包,挂载行就不存在,成员装了也 不会激活。
成员包注意:自己不要再声明 dsh.bundle,profile 里也不要再手写成员行,
否则会 duplicate loader entry id。
重启 dsh web / desk 后,设置 → Celestea 即可看到系列插件。
系列插件规范
- 配置命名空间前缀
celestea-(如celes-dsh-eye注册celestea-dsh-eye) - 依赖本包:
dependencies: { "@mcd0luo/dsh-celestea": ">=0.1.0" }(自动带装基座包;挂载仍按上文需要显式 add 基座) - 配置 schema 用 schemastery;可选值字段
.extra("suggest", [...])提供下拉建议 - 状态展示:schema 根
.extra("statusRoute", "/api/...")声明只读状态路由, 设置页表单顶部显示"当前生效"(模型/地址/凭据来源,脱敏)
机制说明
官方 settings RPC 只暴露 api-proxy 硬编码白名单内的命名空间(第三方 ns 一律
settings-not-exposed),因此本包提供自己的 host 路由直连 settings 服务:
POST /api/celestea/namespaces→ 全部celestea-*描述符(secret 脱敏)POST /api/celestea/update→{ ns, mode, patch, expectedRevision }写用户层
License
MIT
