- 类型生态:service 模块 re-export SidebarTab/SidebarState/SidebarStore/ SidebarSnapshot/SidebarDiffRef/TabType/SessionScope/SidebarPrefs 等公共 状态词汇(此前 TS2459 无法命名);context-types 去 Node 依赖(结构镜像 SidebarHttpRequest/Response/UpgradeSocket/Head),client 可达声明图零 node:* 引用,外部消费者无 @types/node + skipLibCheck:false 可编译 (scripts/check-consumer-types.sh 守护) - 服务能力:version/features 版本与能力探测(单调只增)、getSnapshot/ subscribeState 状态订阅、updateTab(title/path/meta)、activateTab、 openFile(路径派生 id 与内置拦截一致)、openTab(seed, scope?) 定向到 指定 session(store.reduceFor 不扰动 UI) - TabDescriptor:badge 角标(99+ 封顶,抛错吞掉)、onOpen/onActivate/ onClose 生命周期回调(service 路径派发,dedupe 聚焦触发 onActivate 而非 onOpen,抛错不打断流程);SidebarTab.meta JSON 可序列化跨刷新 持久化(sanitize 宽松保留) - 设置 seam 开放:PrefsSchema 增 pluginSettings 开放嵌套 map(z.dict), settings.pluginToggles(插件自有行,同 switch/text/number 控件)与 settings.render(自定义面板,含 store/service/prefs/updatePluginSetting/ close props);viewer 卡片 v0.12.0 起也有齿轮设置弹窗 - FileViewerDescriptor.load 增第三参 AbortSignal(EditorHost 生命周期中止) - UI 接线:tab 激活/关闭改走 service(跨树激活修复 + 回调触发)、+ 菜单 传 scope、TabBar badge pill 渲染;active-session scope 走原 reduce 路径 保证 notify - 测试 +23:生命周期/定向打开/updateTab/activateTab/openFile/meta 持久化/ reduceFor/能力常量(与 package.json 锁步)、consumer-types.ts 编译门、 api-surface.spec.ts(client 图零 node 依赖守护);既有 430 测试全绿 - 文档:AGENTS.md 修 available 三参示例并补全部新 API;external-plugin- guide.md 刷新至 v0.12.0(7 tab + 9 viewer、设置 seam 开放、类型导入 路径建议);README×2 服务化小节同步 未发版 npm(用户决定);分支 feat/plugin-api-v012。
175 lines
5.5 KiB
JSON
175 lines
5.5 KiB
JSON
{
|
|
"name": "dsh-better-sidebar",
|
|
"version": "0.12.0",
|
|
"description": "DSH web plugin: a VSCode-like right sidebar (explorer / editor / terminal / git / browser), isolated per conversation session. Exposes a service for other plugins to register sidebar tabs and file viewers.",
|
|
"type": "module",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/omdsh-dev/DSH-better-sidebar"
|
|
},
|
|
"publishConfig": {
|
|
"access": "public"
|
|
},
|
|
"main": "lib/index.js",
|
|
"types": "lib/types/index.d.ts",
|
|
"exports": {
|
|
".": {
|
|
"types": "./lib/types/index.d.ts",
|
|
"default": "./lib/index.js"
|
|
},
|
|
"./invariant": {
|
|
"types": "./lib/types/invariant.d.ts",
|
|
"default": "./lib/invariant.js"
|
|
},
|
|
"./client": {
|
|
"types": "./lib/types/client/index.d.ts",
|
|
"default": "./lib/client.js"
|
|
},
|
|
"./client/service": {
|
|
"types": "./lib/types/client/service.d.ts",
|
|
"default": "./lib/client.js"
|
|
},
|
|
"./client/api": {
|
|
"types": "./lib/types/client/service.d.ts",
|
|
"default": "./lib/client.js"
|
|
},
|
|
"./src/*": "./src/*",
|
|
"./package.json": "./package.json"
|
|
},
|
|
"engines": {
|
|
"node": ">=20"
|
|
},
|
|
"dsh": {
|
|
"bundle": {
|
|
"patch": "./cordis.patch.yml"
|
|
},
|
|
"client": {
|
|
"inject": [
|
|
"@deepseek-ai/dsh-client-runtime",
|
|
"@deepseek-ai/dsh-client-locale",
|
|
"@deepseek-ai/dsh-client-ui-slots",
|
|
"@deepseek-ai/dsh-client-ui-conversation"
|
|
],
|
|
"platform": "web"
|
|
}
|
|
},
|
|
"files": [
|
|
"lib/index.js",
|
|
"lib/invariant.js",
|
|
"lib/client.js",
|
|
"lib/client-registry.js",
|
|
"lib/client-docx.js",
|
|
"lib/client-xlsx.js",
|
|
"lib/client-pptx.js",
|
|
"lib/client-terminal.js",
|
|
"lib/client-editor.js",
|
|
"lib/types/**/*.d.ts",
|
|
"src",
|
|
"scripts/install.sh",
|
|
"scripts/install.ps1",
|
|
"cordis.patch.yml",
|
|
"README.md",
|
|
"README_EN.md",
|
|
"LICENSE"
|
|
],
|
|
"scripts": {
|
|
"build": "rm -rf lib && tsc -p tsconfig.build.json && tsdown",
|
|
"prepublishOnly": "pnpm build",
|
|
"typecheck": "tsc --noEmit",
|
|
"bundle": "tsdown",
|
|
"watch": "tsdown --watch",
|
|
"prepare": "tsdown",
|
|
"test": "vitest run"
|
|
},
|
|
"license": "MIT",
|
|
"peerDependencies": {
|
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
"@deepseek-ai/dsh-agent": "^0.1.0-rc.6",
|
|
"@deepseek-ai/dsh-client-locale": "^0.1.0-rc.6",
|
|
"@deepseek-ai/dsh-client-runtime": "^0.1.0-rc.6",
|
|
"@deepseek-ai/dsh-client-schema-form": "^0.1.0-rc.6",
|
|
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.0-rc.6",
|
|
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.0-rc.6",
|
|
"@deepseek-ai/dsh-client-ui-settings": "^0.1.0-rc.6",
|
|
"@deepseek-ai/dsh-client-ui-slots": "^0.1.0-rc.6",
|
|
"@deepseek-ai/dsh-client-web-react": "^0.1.0-rc.6",
|
|
"@deepseek-ai/dsh-host-webserver": "^0.1.0-rc.6",
|
|
"@deepseek-ai/dsh-invariants": "^0.1.0-rc.6",
|
|
"@deepseek-ai/dsh-llm": "^0.1.0-rc.6",
|
|
"@deepseek-ai/dsh-session": "^0.1.0-rc.6",
|
|
"@deepseek-ai/dsh-settings": "^0.1.0-rc.6",
|
|
"@deepseek-ai/dsh-tools": "^0.1.0-rc.6",
|
|
"cordis": "^4.0.0-rc.7",
|
|
"react": "^18.2.0",
|
|
"react-dom": "^18.2.0"
|
|
},
|
|
"peerDependenciesMeta": {
|
|
"cordis": { "optional": true }
|
|
},
|
|
"dependencies": {
|
|
"@aiden0z/pptx-renderer": "^1.2.4",
|
|
"@codemirror/commands": "^6.10.4",
|
|
"@codemirror/lang-cpp": "^6.0.3",
|
|
"@codemirror/lang-css": "^6.3.1",
|
|
"@codemirror/lang-go": "^6.0.1",
|
|
"@codemirror/lang-html": "^6.4.12",
|
|
"@codemirror/lang-java": "^6.0.2",
|
|
"@codemirror/lang-javascript": "^6.2.5",
|
|
"@codemirror/lang-json": "^6.0.2",
|
|
"@codemirror/lang-markdown": "^6.5.2",
|
|
"@codemirror/lang-php": "^6.0.2",
|
|
"@codemirror/lang-python": "^6.2.1",
|
|
"@codemirror/lang-rust": "^6.0.2",
|
|
"@codemirror/lang-sql": "^6.10.0",
|
|
"@codemirror/lang-xml": "^6.1.0",
|
|
"@codemirror/lang-yaml": "^6.1.3",
|
|
"@codemirror/language": "^6.12.4",
|
|
"@codemirror/legacy-modes": "^6.5.3",
|
|
"@codemirror/search": "^6.7.1",
|
|
"@codemirror/state": "^6.7.1",
|
|
"@codemirror/view": "^6.43.8",
|
|
"@lezer/highlight": "^1.2.3",
|
|
"@univerjs/preset-sheets-core": "^0.25.1",
|
|
"@univerjs/presets": "^0.25.1",
|
|
"@xterm/addon-fit": "^0.10.0",
|
|
"clsx": "^2.1.1",
|
|
"docx-preview": "^0.4.0",
|
|
"node-pty": "^1.1.0",
|
|
"rxjs": "^7.8.2",
|
|
"schemastery": "^3.18.0",
|
|
"ws": "^8.18.0",
|
|
"xlsx": "^0.18.5",
|
|
"xterm": "^5.3.0"
|
|
},
|
|
"devDependencies": {
|
|
"@deepseek-ai/dsh-agent": "^0.1.0-rc.6",
|
|
"@deepseek-ai/dsh-client-locale": "^0.1.0-rc.6",
|
|
"@deepseek-ai/dsh-client-runtime": "^0.1.0-rc.6",
|
|
"@deepseek-ai/dsh-client-schema-form": "^0.1.0-rc.6",
|
|
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.0-rc.6",
|
|
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.0-rc.6",
|
|
"@deepseek-ai/dsh-client-ui-settings": "^0.1.0-rc.6",
|
|
"@deepseek-ai/dsh-client-ui-slots": "^0.1.0-rc.6",
|
|
"@deepseek-ai/dsh-client-web-react": "^0.1.0-rc.6",
|
|
"@deepseek-ai/dsh-host-webserver": "^0.1.0-rc.6",
|
|
"@deepseek-ai/dsh-invariants": "^0.1.0-rc.6",
|
|
"@deepseek-ai/dsh-llm": "^0.1.0-rc.6",
|
|
"@deepseek-ai/dsh-session": "^0.1.0-rc.6",
|
|
"@deepseek-ai/dsh-settings": "^0.1.0-rc.6",
|
|
"@deepseek-ai/dsh-tools": "^0.1.0-rc.6",
|
|
"@types/node": "^24.0.0",
|
|
"@types/react": "~18.3.1",
|
|
"@types/react-dom": "~18.3.1",
|
|
"@types/ws": "^8.5.10",
|
|
"@cordisjs/plugin-loader": "^1.0.0-rc.5",
|
|
"cordis": "^4.0.0-rc.7",
|
|
"jsdom": "^29.1.1",
|
|
"lightningcss": "^1.32.0",
|
|
"react": "^18.2.0",
|
|
"react-dom": "18.2.0",
|
|
"tsdown": "^0.22.2",
|
|
"typescript": "^5.6.0",
|
|
"vitest": "^4.1.8"
|
|
}
|
|
}
|