@peninsula-med/beisen-ehr-configure 1.1.1 → 2.0.1

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 +36 -1
  2. package/package.json +1 -1
package/configure.js CHANGED
@@ -92,7 +92,7 @@ async function main() {
92
92
 
93
93
  await sleep(500);
94
94
 
95
- // 更新配置
95
+ // 更新配置 - 插件配置
96
96
  if (!openclawConfig.plugins) {
97
97
  openclawConfig.plugins = {};
98
98
  }
@@ -106,6 +106,41 @@ async function main() {
106
106
  config: config,
107
107
  };
108
108
 
109
+ // 添加工具 allowlist(关键!)
110
+ if (!openclawConfig.tools) {
111
+ openclawConfig.tools = {};
112
+ }
113
+
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
+ if (!openclawConfig.tools.allow.includes('beisen_get_leave_balance')) {
127
+ openclawConfig.tools.allow.push('beisen_get_leave_balance');
128
+ }
129
+
130
+ if (!openclawConfig.tools.allow.includes('beisen_query_attendance')) {
131
+ openclawConfig.tools.allow.push('beisen_query_attendance');
132
+ }
133
+
134
+ if (!openclawConfig.tools.allow.includes('beisen_get_approval_status')) {
135
+ openclawConfig.tools.allow.push('beisen_get_approval_status');
136
+ }
137
+
138
+ // 删除 mcpServers 配置(OpenClaw 2026.3.8 不支持)
139
+ if (openclawConfig.mcpServers) {
140
+ console.log('⚠️ 检测到 mcpServers 配置(OpenClaw 2026.3.8 不支持),已自动删除');
141
+ delete openclawConfig.mcpServers;
142
+ }
143
+
109
144
  // 备份旧配置
110
145
  if (fs.existsSync(configPath)) {
111
146
  const backupPath = configPath + '.bak.' + Date.now();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peninsula-med/beisen-ehr-configure",
3
- "version": "1.1.1",
3
+ "version": "2.0.1",
4
4
  "description": "北森 EHR 插件配置向导",
5
5
  "type": "module",
6
6
  "bin": {