@peninsula-med/beisen-ehr-configure 2.0.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/configure.js +20 -7
  2. package/package.json +1 -1
package/configure.js CHANGED
@@ -106,15 +106,28 @@ async function main() {
106
106
  config: config,
107
107
  };
108
108
 
109
- // 更新配置 - MCP 服务器配置(关键!)
110
- if (!openclawConfig.mcpServers) {
111
- openclawConfig.mcpServers = {};
109
+ // 添加工具 allowlist(关键!)
110
+ if (!openclawConfig.tools) {
111
+ openclawConfig.tools = {};
112
112
  }
113
113
 
114
- openclawConfig.mcpServers['beisen-ehr'] = {
115
- command: 'beisen-ehr-mcp',
116
- config: config,
117
- };
114
+ if (!openclawConfig.tools.allow) {
115
+ openclawConfig.tools.allow = [];
116
+ }
117
+
118
+ if (!openclawConfig.tools.allow.includes('beisen-ehr-plugin')) {
119
+ openclawConfig.tools.allow.push('beisen-ehr-plugin');
120
+ }
121
+
122
+ if (!openclawConfig.tools.allow.includes('beisen_submit_overtime')) {
123
+ openclawConfig.tools.allow.push('beisen_submit_overtime');
124
+ }
125
+
126
+ // 删除 mcpServers 配置(OpenClaw 2026.3.8 不支持)
127
+ if (openclawConfig.mcpServers) {
128
+ console.log('⚠️ 检测到 mcpServers 配置(OpenClaw 2026.3.8 不支持),已自动删除');
129
+ delete openclawConfig.mcpServers;
130
+ }
118
131
 
119
132
  // 备份旧配置
120
133
  if (fs.existsSync(configPath)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peninsula-med/beisen-ehr-configure",
3
- "version": "2.0.0",
3
+ "version": "3.0.0",
4
4
  "description": "北森 EHR 插件配置向导",
5
5
  "type": "module",
6
6
  "bin": {