BingChanCN/fabric

Project Overview项目介绍

Fabric is a DSH-native runtime plugin kernel and software development kit built exclusively for DeepSeek Harness. It is the only static base plugin that needs to be added to the DSH boot graph for every user profile, and handles all lifecycle operations including install, start, stop, upgrade, and uninstall of business plugins. To install the core, run the command dsh plugin --profile web add @dsh-do/fabric in your terminal, then restart DSH one time to complete the initial setup. After that, you can install any runtime package from the Fabric mods page or the dsh-do plugin marketplace.

Fabric is targeted at DSH plugin developers who want to build hot-reloadable plugins without restarting DSH after every change. To create a new plugin, first run npx create-fabric-plugin @example/jobs to initialize the project skeleton, then install dependencies, build, verify, and start local development. The fabric dev command uses a temporary overlay to enable full hot swapping of host and client code after a successful build. If build or activation fails, it keeps the last working version, and it will not modify your existing production plugin configuration.

This project is released under the open source MIT license, and runtime packages are run as trusted local machine code, they do not run in a security sandbox. Existing DSH plugins can be analyzed for migration compatibility with the fabric migrate analyze command, and only plugins that meet strict source requirements can be automatically migrated to the Fabric runtime. Local development requires pnpm for dependency management and validation, and full release validation can be triggered manually via GitHub Actions on both Linux and Windows platforms.

Fabric是专为DeepSeek Harness(DSH)开发的运行时插件内核和下游开发SDK。作为DSH启动流程中唯一需要引入的静态基础插件,它负责业务插件的安装、启停、升级和卸载,支持插件热更新无需重启DSH。当前兼容基线版本为Fabric 1.0.0和@deepseek-ai/dsh@0.1.0-rc.6,可通过DSH CLI命令完成核心安装。

面向DSH插件开发者,Fabric提供了完整的插件开发、测试、打包工作流。开发者可通过create-fabric-plugin脚手架快速初始化项目,编写代码后可使用fabric CLI完成构建、验证、本地调试。调试阶段支持热重载,开发失败会自动保留上一个可用版本,不会影响生产环境的插件配置。

本项目采用MIT许可证开源,运行插件作为可信本机代码运行,不提供安全沙箱,安装时会提示用户注意来源。支持普通DSH插件迁移评估,仅符合特定源码规范的插件可自动迁移,复杂场景需要人工调整。依赖pnpm进行本地构建和验证,完整发布流程可通过GitHub Actions触发。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add @dsh-do/fabric

把 BingChanCN/fabric 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

Fabric

Fabric 是 DSH 的 Runtime Plugin 内核和下游 SDK。@dsh-do/fabric 是每个 Profile 唯一需要进入 DSH boot graph 的静态基础插件;业务插件由 Fabric 按 Profile 安装、启停、升级和卸载,安装后无需重启 DSH。

当前基线:Fabric 1.0.0、@deepseek-ai/dsh@0.1.0-rc.6。

安装

先安装 Core,并完成这一次计划内重启:

dsh plugin --profile web add @dsh-do/fabric

此后在 Fabric 的 Mods 页面或 dsh-do 插件市场安装 Runtime Package,例如:

hello-fabric
@dsh-do/fabric-theme-studio
file:D:/work/my-plugin

Runtime Package 不写入 DSH profile bundle,也没有 cordis.patch.yml。安装、升级、停用、回退和删除会同步到当前 Profile 的所有浏览器标签页。

创建插件

npx create-fabric-plugin @example/jobs
cd jobs
pnpm install
pnpm build
fabric verify
fabric dev --profile web

fabric dev 使用临时 overlay:成功构建会完整热换 Host 与每个标签页的 Client;构建或 Host 激活失败时保留上一个成功 generation;CLI 退出或连接断开后恢复已安装的 production 版本。它不会修改 plugins.json 或 current/previous 版本槽。

Runtime manifest 位于 package.json:

{
  "name": "@example/jobs",
  "version": "1.0.0",
  "type": "module",
  "fabric": {
    "format": 1,
    "api": "^1.0.0",
    "host": "./lib/fabric-host.js",
    "client": "./lib/fabric-client.js",
    "contracts": "./lib/contracts.js"
  }
}

Host 或 Client 至少提供一个。普通依赖在构建时进入对应 bundle;Runtime 插件之间不做运行时 npm import,协作使用 Capability、Resource 或 Operation。

编程模型

  • Host 默认导出 defineHostPlugin(...),只接收窄的 Fabric Host Context。
  • Client 默认导出 defineClientPlugin(...),注册 Page、Dialog、Command、HUD、Config 和 Capability。
  • Host/Client 数据交换只走带 { owner, id, exact version } 身份的 typed Resource 或 Operation。
  • Config、Document、Blob 存在当前 Profile 的 .fabric/data/<canonical-package>/;Credential 复用 DSH provider,Client 永远读不到明文。
  • Runtime Package 是可信本机代码,不是安全沙箱。安装界面会显示来源、包名、版本和执行本机代码提示。

最小构建配置:

import { fabricRuntimePackage } from '@dsh-do/fabric/build'

export default fabricRuntimePackage()

作者命令

fabric create @example/jobs
fabric build
fabric test
fabric verify
fabric dev --profile web
fabric pack

verify 与 Core 安装器调用同一个 package validator。pack 先验证工作目录,执行真实 npm pack,再验证最终 tgz。

普通 DSH 插件可先用 fabric migrate analyze <source>、fabric migrate analyze npm:<spec> 或 fabric migrate analyze file:<tgz> 做只读迁移评估。真实 Runtime tgz 才能获得 native-compatible;只有严格的纯 shell.overlay 源码子集能在本地用 fabric migrate apply <source> --out <target> 自动生成 Runtime 包。复杂 Host/Client 行为必须人工迁移,已发布的 DSH bundle 不会被安装时转译。详见 迁移普通插件。

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-server-kit 下一个 Next superstack →