ylib-syim 0.0.24 → 0.0.25
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
CHANGED
|
@@ -35,8 +35,8 @@ let runtimeInstanceId = `bridges-${process.pid}-${Date.now()}`;
|
|
|
35
35
|
const internalToken = (process.env.INTERNAL_FIXED_TOKEN || "").trim();
|
|
36
36
|
// 内部控制面监听端口。
|
|
37
37
|
const internalPort = Number(process.env.INTERNAL_CONTROL_PORT || "18999");
|
|
38
|
-
// 内部控制面监听地址,容器部署默认
|
|
39
|
-
const internalHost = (process.env.INTERNAL_CONTROL_HOST || "
|
|
38
|
+
// 内部控制面监听地址,容器部署默认 127.0.0.1 便于跨容器访问。
|
|
39
|
+
const internalHost = (process.env.INTERNAL_CONTROL_HOST || "127.0.0.1").trim();
|
|
40
40
|
// 是否启用内部控制面 API。
|
|
41
41
|
const enableInternalApi = process.env.ENABLE_INTERNAL_API !== "0";
|
|
42
42
|
|
|
@@ -242,6 +242,15 @@ export function evaluateRuntimeHealth(params: {
|
|
|
242
242
|
};
|
|
243
243
|
}
|
|
244
244
|
|
|
245
|
+
const explicitReportedFailure =
|
|
246
|
+
(status.status_source === "probe" || status.status_source === "event") &&
|
|
247
|
+
(status.link_status === "error" ||
|
|
248
|
+
status.link_status === "degraded" ||
|
|
249
|
+
status.link_status === "disconnected");
|
|
250
|
+
if (explicitReportedFailure) {
|
|
251
|
+
return { healthy: false, reason: "disconnected", evaluated_at: nowIsoText };
|
|
252
|
+
}
|
|
253
|
+
|
|
245
254
|
// OpenClaw parity: startup grace is a lifecycle-level guard. Once a lifecycle
|
|
246
255
|
// has just started, defer negative judgments until the connect grace elapses.
|
|
247
256
|
if (lastStartAtMs != null) {
|