ylib-syim 0.0.26 → 0.0.27
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 +16 -9
- package/ecosystem.config.cjs +1 -0
- package/package.json +4 -4
package/bridges/main.ts
CHANGED
|
@@ -5161,6 +5161,12 @@ function applyRuntimeStatusSinkPayload(payload: RuntimeStatusSinkPayload): void
|
|
|
5161
5161
|
const botAccountId = String(payload.bot_account_id || "").trim();
|
|
5162
5162
|
if (!platform || !botAccountId) return;
|
|
5163
5163
|
const normalizedAccountId = normalizeRuntimeAccountId(platform, botAccountId);
|
|
5164
|
+
if (!isConfiguredRuntimeAccount(platform, normalizedAccountId || botAccountId)) {
|
|
5165
|
+
logRuntimeStatusDebug(
|
|
5166
|
+
`status sink ignored: unconfigured account platform=${platform} account=${normalizedAccountId || botAccountId}`,
|
|
5167
|
+
);
|
|
5168
|
+
return;
|
|
5169
|
+
}
|
|
5164
5170
|
const key = keyOf(platform, normalizedAccountId || botAccountId);
|
|
5165
5171
|
const previous = getRuntimeBotStatusByKey(key);
|
|
5166
5172
|
const nextLinkStatus = resolveLinkStatusFromSinkPayload(payload, previous);
|
|
@@ -7172,8 +7178,8 @@ async function buildRuntimeBotsStatusPayload(params: {
|
|
|
7172
7178
|
generatedAtMs: Date.now(),
|
|
7173
7179
|
onlyAccountKey: onlyKey,
|
|
7174
7180
|
});
|
|
7175
|
-
const summary = summarizeBots();
|
|
7176
|
-
const runtimeReadiness = buildRuntimeReadinessSnapshot(
|
|
7181
|
+
const summary = summarizeBots(onlyKey);
|
|
7182
|
+
const runtimeReadiness = buildRuntimeReadinessSnapshot(botsComposed, nowIso());
|
|
7177
7183
|
const tApplied = lastProbeSweepTimeouts;
|
|
7178
7184
|
return {
|
|
7179
7185
|
ok: true,
|
|
@@ -8032,19 +8038,20 @@ async function startInternalApiServer(): Promise<void> {
|
|
|
8032
8038
|
);
|
|
8033
8039
|
return;
|
|
8034
8040
|
}
|
|
8035
|
-
const body = await readRequestJson(req);
|
|
8036
|
-
const restartModeRaw = String(body.mode || "")
|
|
8037
|
-
.trim()
|
|
8038
|
-
.toLowerCase();
|
|
8039
|
-
const restartMode = restartModeRaw === "full" ? "full" : "soft";
|
|
8040
|
-
// 重启流程:显式 stop 标记 -> 拉取并落盘配置 -> 进入 connecting -> 等待状态收敛。
|
|
8041
|
-
console.log(`[bridges/main] restart-all requested mode=${restartMode}`);
|
|
8042
8041
|
const restartRequestAt = nowIso();
|
|
8043
8042
|
console.log(
|
|
8044
8043
|
`[bridges/main] restart-all step=enter at=${restartRequestAt} runtime_state=${runtimeState} instance=${runtimeInstanceId}`,
|
|
8045
8044
|
);
|
|
8046
8045
|
runtimeState = "restarting";
|
|
8046
|
+
let restartMode = "soft";
|
|
8047
8047
|
try {
|
|
8048
|
+
const body = await readRequestJson(req);
|
|
8049
|
+
const restartModeRaw = String(body.mode || "")
|
|
8050
|
+
.trim()
|
|
8051
|
+
.toLowerCase();
|
|
8052
|
+
restartMode = restartModeRaw === "full" ? "full" : "soft";
|
|
8053
|
+
// 重启流程:显式 stop 标记 -> 拉取并落盘配置 -> 进入 connecting -> 等待状态收敛。
|
|
8054
|
+
console.log(`[bridges/main] restart-all requested mode=${restartMode}`);
|
|
8048
8055
|
if (runtimeConfigPullUrl) {
|
|
8049
8056
|
console.log(
|
|
8050
8057
|
`[bridges/main] restart-all step=pull_config begin url=${runtimeConfigPullUrl}`,
|
package/ecosystem.config.cjs
CHANGED
|
@@ -15,6 +15,7 @@ module.exports = {
|
|
|
15
15
|
ENABLE_INTERNAL_API: "1",
|
|
16
16
|
INTERNAL_CONTROL_PORT: "18999",
|
|
17
17
|
INTERNAL_FIXED_TOKEN: "syim_runtime",
|
|
18
|
+
NODE_OPTIONS: process.env.NODE_OPTIONS || "--max-old-space-size=512",
|
|
18
19
|
RUNTIME_CONFIG_PULL_URL:
|
|
19
20
|
"http://127.0.0.1:3999/api/v1/yucegpt/im/runtime/config/full",
|
|
20
21
|
RESTART_ALL_EXIT_PROCESS: "0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ylib-syim",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.27",
|
|
4
4
|
"description": "多 IM / 多 Agent 的会话路由与上下文管理(支持 /new)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@ffmpeg-installer/ffmpeg": "^1.1.0",
|
|
49
|
-
"ylib-dingtalk-connector": "0.7.10-beta.
|
|
50
|
-
"ylib-openclaw-lark": "2026.3.17-beta.
|
|
51
|
-
"ylib-openclaw-weixin": "2.1.7-beta.
|
|
49
|
+
"ylib-dingtalk-connector": "0.7.10-beta.16",
|
|
50
|
+
"ylib-openclaw-lark": "2026.3.17-beta.21",
|
|
51
|
+
"ylib-openclaw-weixin": "2.1.7-beta.9",
|
|
52
52
|
"axios": "^1.6.0",
|
|
53
53
|
"dingtalk-stream": "^2.1.4",
|
|
54
54
|
"fluent-ffmpeg": "^2.1.3",
|