@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.
- package/configure.js +20 -7
- 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
|
-
//
|
|
110
|
-
if (!openclawConfig.
|
|
111
|
-
openclawConfig.
|
|
109
|
+
// 添加工具 allowlist(关键!)
|
|
110
|
+
if (!openclawConfig.tools) {
|
|
111
|
+
openclawConfig.tools = {};
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
openclawConfig.
|
|
115
|
-
|
|
116
|
-
|
|
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)) {
|