从 0 重写的 v2.0.0 DSH 侧边栏插件第一阶段: - 工程骨架:tsdown 双构建(host ESM + client CJS closure)、vitest、strict TS - host 半:namespace 插件形状(name/inject/apply,无 default),minimal apply - client 半:closure factory 注册 5 个 apes:* tab 占位 + zh/en i18n - 不变量面:assert/semver/peer guard(dsh-better-sidebar >= 0.18.0) - 依赖策略:dsh-better-sidebar=peerDependency(不打包),cordis=devDependency(仅类型) - 门禁:pnpm typecheck + build + test 全绿(14 单测通过) - AGENTS.md 工程约定 + .gitignore(排除 lib/node_modules/maxkb-integration) 模板:dsh-better-sidebar。作用域锁定信息层(tasks/agents/apps/messages/profile), 不含 file/terminal/browser(归 better-sidebar)、不含 team/room(归 background-agents)。
14 lines
636 B
YAML
14 lines
636 B
YAML
# apes-sidebar bundle patch: inserts the host plugin row into the profile
|
|
# roster. The client half (sidebar tabs: Tasks / Agents / Messages / Apps /
|
|
# Profile) loads through the dsh.client.inject declaration in package.json;
|
|
# this patch mounts the Node-side host entry only.
|
|
#
|
|
# Double-mount guard: if another *enabled* entry already mounts the same
|
|
# package (e.g. via an aggregate bundle), this row backs off.
|
|
- insert:
|
|
- id: apes-sidebar
|
|
name: apes-sidebar
|
|
disabled: !!js >
|
|
[...ctx.loader.entries()].some((e) =>
|
|
e.options.name === 'apes-sidebar' && e.options.id !== 'apes-sidebar' && !e.disabled)
|