ylib-syim 0.0.11 → 0.0.13
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/bridges/main.ts +41 -11
- package/package.json +5 -5
package/bridges/main.ts
CHANGED
|
@@ -1161,15 +1161,25 @@ function readEffectiveWhitelistFromConfig(
|
|
|
1161
1161
|
"enabled",
|
|
1162
1162
|
"appId",
|
|
1163
1163
|
"appSecret",
|
|
1164
|
-
"
|
|
1165
|
-
"
|
|
1164
|
+
"modelName",
|
|
1165
|
+
"agentId",
|
|
1166
1166
|
"gatewayBaseUrl",
|
|
1167
1167
|
"gatewayToken",
|
|
1168
|
-
"separateSessionByConversation",
|
|
1169
|
-
"groupSessionScope",
|
|
1170
1168
|
"streaming",
|
|
1171
1169
|
"uploadHost",
|
|
1172
|
-
|
|
1170
|
+
],
|
|
1171
|
+
runtimeReadonlyFields: [
|
|
1172
|
+
"separateSessionByConversation",
|
|
1173
|
+
"groupSessionScope",
|
|
1174
|
+
"dmPolicy",
|
|
1175
|
+
"allowFrom",
|
|
1176
|
+
"groupPolicy",
|
|
1177
|
+
"requireMention",
|
|
1178
|
+
"scopeType",
|
|
1179
|
+
"projectId",
|
|
1180
|
+
"scope_type",
|
|
1181
|
+
"type",
|
|
1182
|
+
"project_id",
|
|
1173
1183
|
],
|
|
1174
1184
|
},
|
|
1175
1185
|
"dingtalk-connector": {
|
|
@@ -1179,13 +1189,23 @@ function readEffectiveWhitelistFromConfig(
|
|
|
1179
1189
|
"clientSecret",
|
|
1180
1190
|
"gatewayToken",
|
|
1181
1191
|
"modelName",
|
|
1192
|
+
"agentId",
|
|
1182
1193
|
"asyncMode",
|
|
1183
|
-
"separateSessionByConversation",
|
|
1184
|
-
"groupSessionScope",
|
|
1185
1194
|
"gatewayPort",
|
|
1186
1195
|
"gatewayBaseUrl",
|
|
1187
1196
|
"uploadHost",
|
|
1188
|
-
|
|
1197
|
+
],
|
|
1198
|
+
runtimeReadonlyFields: [
|
|
1199
|
+
"separateSessionByConversation",
|
|
1200
|
+
"groupSessionScope",
|
|
1201
|
+
"dmPolicy",
|
|
1202
|
+
"allowFrom",
|
|
1203
|
+
"groupPolicy",
|
|
1204
|
+
"scopeType",
|
|
1205
|
+
"projectId",
|
|
1206
|
+
"scope_type",
|
|
1207
|
+
"type",
|
|
1208
|
+
"project_id",
|
|
1189
1209
|
],
|
|
1190
1210
|
},
|
|
1191
1211
|
};
|
|
@@ -1226,10 +1246,20 @@ function normalizeRuntimeConfigByWhitelist(config: Record<string, unknown>): {
|
|
|
1226
1246
|
: "";
|
|
1227
1247
|
if (!pluginId) return new Set();
|
|
1228
1248
|
const pluginWhitelist = whitelist[pluginId] as Record<string, unknown>;
|
|
1229
|
-
const fields = pluginWhitelist?.fields
|
|
1230
|
-
|
|
1249
|
+
const fields = Array.isArray(pluginWhitelist?.fields)
|
|
1250
|
+
? pluginWhitelist.fields
|
|
1251
|
+
: [];
|
|
1252
|
+
const runtimeReadonlyFields = Array.isArray(
|
|
1253
|
+
pluginWhitelist?.runtimeReadonlyFields,
|
|
1254
|
+
)
|
|
1255
|
+
? pluginWhitelist.runtimeReadonlyFields
|
|
1256
|
+
: [];
|
|
1257
|
+
// 运行时配置需要同时保留“前端可编辑字段”和“后端只读注入字段”,
|
|
1258
|
+
// 否则项目作用域等系统填充字段会在 bridge 侧被误删。
|
|
1259
|
+
const mergedFields = [...fields, ...runtimeReadonlyFields];
|
|
1260
|
+
if (mergedFields.length === 0) return new Set();
|
|
1231
1261
|
return new Set(
|
|
1232
|
-
|
|
1262
|
+
mergedFields
|
|
1233
1263
|
.map((item) => String(item || "").trim())
|
|
1234
1264
|
.filter((item) => item.length > 0),
|
|
1235
1265
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ylib-syim",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"description": "多 IM / 多 Agent 的会话路由与上下文管理(支持 /new)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
"build:bridge:all": "node scripts/build-bridge.mjs --all",
|
|
39
39
|
"build:bridge:debug": "node scripts/build-bridge.mjs --no-minify",
|
|
40
40
|
"start:stdio-bridge:bundle": "node dist/dingtalk-stdio-bridge.cjs",
|
|
41
|
-
"local": "export RESTART_ALL_EXIT_PROCESS=\"0\" && export RUNTIME_CONFIG_PULL_URL=\"http://127.0.0.1:
|
|
42
|
-
"remote": "export RESTART_ALL_EXIT_PROCESS=\"0\" && export RUNTIME_CONFIG_PULL_URL=\"http://127.0.0.1:
|
|
41
|
+
"local": "export RESTART_ALL_EXIT_PROCESS=\"0\" && export RUNTIME_CONFIG_PULL_URL=\"http://127.0.0.1:4999/api/v1/yucegpt/im/runtime/config/full\" && export ENABLE_INTERNAL_API=\"1\" && export INTERNAL_CONTROL_PORT=\"18999\" && export INTERNAL_FIXED_TOKEN=\"syim_runtime\" && export LOCAL_CONFIG_ONLY=1 && npm run start:bridges",
|
|
42
|
+
"remote": "export RESTART_ALL_EXIT_PROCESS=\"0\" && export RUNTIME_CONFIG_PULL_URL=\"http://127.0.0.1:4999/api/v1/yucegpt/im/runtime/config/full\" && export ENABLE_INTERNAL_API=\"1\" && export INTERNAL_CONTROL_PORT=\"18999\" && export INTERNAL_FIXED_TOKEN=\"syim_runtime\" && npm run start:bridges"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@ffmpeg-installer/ffmpeg": "^1.1.0",
|
|
46
|
-
"ylib-dingtalk-connector": "0.7.10-beata.
|
|
47
|
-
"ylib-openclaw-lark": "2026.3.17-beata.
|
|
46
|
+
"ylib-dingtalk-connector": "0.7.10-beata.8",
|
|
47
|
+
"ylib-openclaw-lark": "2026.3.17-beata.12",
|
|
48
48
|
"axios": "^1.6.0",
|
|
49
49
|
"dingtalk-stream": "^2.1.4",
|
|
50
50
|
"fluent-ffmpeg": "^2.1.3",
|