Local SQLite equipment lifecycle management with inspection, maintenance, repair, downtime/release/transfer/stocktake/scrap workflows and reports; zero external dependencies, offline-ready, LAN multi-device access. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-plugin-m10-device-personal
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:baihui3311/dsh-ems
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
面向工厂 MES 现场的设备全生命周期管理插件。数据存本机 SQLite,无需 SQL Server、无需外部网关,断网也能用。
一套系统覆盖设备从进厂到报废的主线: 建档、点检、保养、维修、停机、允产、迁移、盘点、报废,以及全过程报表追溯。
快速开始
1. 安装
在 Harness「插件」→「添加插件」中填写:
https://github.com/baihui3311/dsh-ems.git#v0.1.12
首次安装建议锁 tag;跟随主线可去掉
#v0.1.12。其他安装方式见安装方式怎么选。
2. 首次使用
- 进入「基础资料 → 组织」,新建一个组织。未维护组织时无法保存业务单据。
- 进入「设备管理 → 设备档案」,新增第一台设备。
- 按现场节奏创建点检、保养、报修、停机等单据。
3. 数据说明
- 每台电脑各自保存一套本地数据,目录为
~/.m10-device-personal。 - 安装包不包含你的设备档案、单据或本地数据库。
- 首次启动仅创建默认基础资料与字典,不生成业务单据和设备档案。
- 升级或重装插件不会删除本地数据;备份 = 拷贝
device-personal.db。
功能模块总览
侧栏共 9 个分组、52 张页面(16 基础资料 + 23 业务页 + 16 报表),另有概览与设置。
| 分组 | 页面数 | 主要内容 |
|---|---|---|
| 基础资料 | 16 | 设备类型、部件分类、存放地点、设备组、供应商、客户、车间/部门、生产中心、仓库、人员、计量单位、币别、岗位、点检项目类型、保养项目类型、组织 |
| 设备管理 | 3 | 设备档案、设备部件档案、设备备件档案 |
| 点检管理基础资料 | 2 | 点检项目、点检方案 |
| 点检管理 | 2 | 点检任务单、点检记录 |
| 保养管理基础资料 | 2 | 保养项目、保养方案 |
| 保养管理 | 2 | 保养任务单、保养记录 |
| 维修管理 | 3 | 报修单、维修任务单、维修记录 |
| 业务处理 | 6 | 停机单、允产单、迁移单、使用汇报单、盘点记录单、报废单 |
| 报表分析 | 16 | 点检、保养、报修、维修、停机、允产、寿命、盘点、故障次数/原因、人员任务、报废预测、使用情况、设备履历等 |
| 概览 / 设置 | 2 | KPI 看板(保养到期、寿命预警、运行时长)、语言切换、局域网扫码访问 |
| AI 助手 | — | 数据分析悬浮球、本地规则问答、可选本地模型 |
与原厂 MES 的口径差异(请先看)
本插件刻意只覆盖设备侧闭环,以下页面未包含,需要时请走原厂 MES/ERP:
- 点检/保养派工池与作业单(任务分配到班组/个人)
- 停机审批、接收/验收/出厂流程
- 数字化设备管理(联网采集、感应设备、电阻焊点位)
- MES 生产记录(产量报工)
设备寿命与保养周期统一按**小时(运行时长)**计量:设计寿命(小时)、累计运行时长(小时)、剩余寿命(小时)、保养周期(小时)、上次保养时长(小时)。
运行前提
| 项 | 要求 | 说明 |
|---|---|---|
| DeepSeek Harness(宿主) | 已安装 | 提供页面容器与 HTTP 服务 |
| Node.js | ≥ 22.13(推荐 24.x) | 使用内置 node:sqlite |
| 第三方 npm 依赖 | 无 | 插件 dependencies 为空对象 |
关键约定
- 路由前缀:
/m10-device-personal/api/* - 数据目录:
~/.m10-device-personal,优先级为cordis.patch.yml的config.dataDir> 环境变量M10_PERSONAL_DATADIR> 默认值 - 首启行为:建库 → 迁移 → 幂等灌默认基础资料(16 类台账 + 字典项),不含业务单据与设备档案
- 做单前必须先建组织:组织台账故意不预置,未维护时保存会被服务端拒回并提示先维护组织
- 示例数据开关(默认关):
cordis.patch.yml的config.sampleDevices: true会在设备台账为空时插入一台示例设备 - 面板标识:侧栏面板 id =
m10-device-personal,moduleKey=device,侧栏排序21(紧邻模具20)
安装方式怎么选
| 方式 | 适用 | 前提 |
|---|---|---|
| A:插件页贴 GitHub 地址 | 默认推荐,跟随仓库源码或指定 tag | 目标机能连 github.com |
| B:插件页填本地路径 | 内网机 / 离线交付 | 先把仓库/解压包放到本机某目录 |
| C:npm 安装 | 已发布到 npm 的版本 | 能访问 registry.npmjs.org |
| D:手改 profile | 宿主是源码仓形态、或要批量部署 | 见下文 |
方式 A:Harness「插件」页直接贴 GitHub 地址
打开 Harness →「插件」→「添加插件」,安装源填:
https://github.com/baihui3311/dsh-ems.git等价写法:
github:baihui3311/dsh-ems。锁版本在末尾加#和 tag / 分支 / commit:https://github.com/baihui3311/dsh-ems.git#v0.1.12宿主对 git 地址不做包内容预检,整仓交给 pnpm,读的是仓库根的
package.json——本仓采用「根即插件包」布局正是为此。装完宿主会自行校验
dsh.bundle、加载cordis.patch.yml、把包名写进当前 profile 的bundles并启用。重启实例后侧栏出现「AI设备管理」。
方式 B:插件页填本地路径
「添加插件」里填绝对路径,指向 clone/解压目录根(路径中不要带中文/空格更稳):
D:/dsh-plugins/dsh-ems
宿主要求该目录有 package.json 且声明 dsh.bundle,否则回 declares no dsh.bundle 拒掉。相对路径不接受。
方式 C:npm 安装(已发布时可用)
dsh plugin --profile web add dsh-plugin-m10-device-personal
web 换成本机实际使用的 profile 名(浏览器版通常是 web,桌面版通常是 desktop 或 desktop-NNN)。
方式 D:手动配 profile
把目录根放到目标机固定位置,例如
D:/dsh-plugins/dsh-ems。编辑 profile 的
package.json(%USERPROFILE%/.dsh/profiles/<profile>/package.json),把包名加进bundles,并在dependencies里用link:指向该目录:{ "dependencies": { "dsh-plugin-m10-device-personal": "link:D:/dsh-plugins/dsh-ems" }, "dsh": { "profile": { "bundles": ["dsh-plugin-m10-device-personal"] } } }用宿主自带 pnpm 执行 install,然后重启 harness。不要在插件目录裸跑
npm install。
局域网多端访问
设置页可查看本机访问地址与二维码,手机/平板扫码即可打开同一套本地数据(同一局域网内)。宿主桌面端默认只绑 127.0.0.1,需要局域网访问时按设置页提示启动局域网实例;目标机若无 Node 或防火墙未放行,会表现为「能打开但连不上」。
常见问题
Q:装完侧栏没有入口?
A:先确认插件已启用并重启实例;再检查 locale/en.json、zh.json 是否随包装齐(缺失时卡片只显示包名)。
Q:保存单据提示组织未维护? A:到「基础资料 → 组织」新建组织后再做单,这是数据源头门禁。
Q:换电脑怎么迁移数据?
A:拷贝 ~/.m10-device-personal/device-personal.db 到新机器的同名目录;版本升级会自动跑迁移,不要用旧版本程序打开新库。
Q:支持多用户并发吗? A:单机单账套设计,多人同时写同一库没有冲突控制,工厂多人协同请使用企业版(SQL Server)。
许可
插件本体随发布仓分发;数据库与业务数据归使用者所有,不含任何凭据、账套或第三方数据。
Links
More in this category
loopx-project/loopx#dsh-loopx-plugin★ 6786
LoopX, a provider-neutral, local-first state kernel and control plane for long-horizon agents: keeps Goal, Todo, gate, evidence, quota, recovery, and handoff state above DeepSeek Harness, while the plugin bootstraps the CLI and skills, admits bounded same-session continuation, and adds a loopback GoalBar for the exact bound loop. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.
Q00/ouroboros#integrations/dsh-plugin★ 6396
Config-only bundle that mounts Ouroboros through the DSH MCP client, exposing 36 interview, Seed, execution, evaluation, and evolution workflow tools in DSH.
chuspeeism/dashi-taskboard#deepseek-harness★ 3557
Embeds the active installed Codex Taskboard runtime in the DeepSeek Harness sidebar, using its launcher runtime descriptor instead of a fixed port.
NanmiCoder/dsh-agent-teams★ 3164
AgentTeams multi-agent teams.
EthanYoQ/AI-Novel-Writer#dsh-ai-novel-writer★ 3020
Installs a dedicated AI novel-writing preset and workbench: revisioned local project assets, a compact side drawer, and native approval-gated single-file changes.
shanliuling/dsh-image-gen★ 1931
Native conversational image generation for DeepSeek Harness: ask the agent to create an image, and it handles generation and keeps the result directly in the conversation.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.