ylib-syim 0.0.23 → 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,6 +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
+ // 内部控制面监听地址,容器部署默认 127.0.0.1 便于跨容器访问。
39
+ const internalHost = (process.env.INTERNAL_CONTROL_HOST || "127.0.0.1").trim();
38
40
  // 是否启用内部控制面 API。
39
41
  const enableInternalApi = process.env.ENABLE_INTERNAL_API !== "0";
40
42
 
@@ -8415,9 +8417,9 @@ async function startInternalApiServer(): Promise<void> {
8415
8417
  res.writeHead(404, { "Content-Type": "application/json" });
8416
8418
  res.end(JSON.stringify({ ok: false, error: "Not found" }));
8417
8419
  });
8418
- server.listen(internalPort, () => {
8420
+ server.listen(internalPort, internalHost, () => {
8419
8421
  console.log(
8420
- `[bridges/main] internal api listening on http://127.0.0.1:${internalPort}`,
8422
+ `[bridges/main] internal api listening on http://${internalHost}:${internalPort}`,
8421
8423
  );
8422
8424
  });
8423
8425
  }
@@ -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) {
package/install-ylib.sh CHANGED
@@ -16,6 +16,17 @@ npm config set audit false
16
16
  npm config set loglevel=verbose
17
17
 
18
18
  echo "开始安装..."
19
+
20
+ npm i pm2 -g \
21
+ --registry=https://registry.npmmirror.com \
22
+ --ignore-engines \
23
+ --no-optional \
24
+ --no-audit \
25
+ --no-fund \
26
+ --prefer-offline \
27
+ --legacy-peer-deps \
28
+ --verbose
29
+
19
30
  # 使用最小化安装
20
31
  npm i ylib-syim -g \
21
32
  --registry=https://registry.npmmirror.com \
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ylib-syim",
3
- "version": "0.0.23",
3
+ "version": "0.0.25",
4
4
  "description": "多 IM / 多 Agent 的会话路由与上下文管理(支持 /new)",
5
5
  "type": "module",
6
6
  "exports": {