ylib-syim 0.0.7 → 0.0.8

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/bridges/main.ts +16 -3
  2. package/package.json +6 -5
package/bridges/main.ts CHANGED
@@ -28,6 +28,11 @@ const runtimeConfigTenantId = (
28
28
  const allowLocalRuntimeConfig =
29
29
  process.env.ALLOW_LOCAL_RUNTIME_CONFIG === "1" ||
30
30
  process.env.NODE_ENV === "development";
31
+ // 调试用:强制只读本地配置文件,即使设置了 RUNTIME_CONFIG_PULL_URL 也跳过远端拉取。
32
+ // 设置方式:LOCAL_CONFIG_ONLY=1 或命令行参数 --local-config-only
33
+ const localConfigOnly =
34
+ process.env.LOCAL_CONFIG_ONLY === "1" ||
35
+ process.argv.includes("--local-config-only");
31
36
  const RUNTIME_ERROR_LOG_FALLBACK_LINES_DEFAULT = 10;
32
37
  const runtimeErrorLogFallbackLines = Math.max(
33
38
  1,
@@ -1088,6 +1093,7 @@ function readEffectiveWhitelistFromConfig(
1088
1093
  "groupSessionScope",
1089
1094
  "streaming",
1090
1095
  "uploadHost",
1096
+ // "yuceImageCookieStrictOrigin",
1091
1097
  ],
1092
1098
  },
1093
1099
  "dingtalk-connector": {
@@ -1103,6 +1109,7 @@ function readEffectiveWhitelistFromConfig(
1103
1109
  "gatewayPort",
1104
1110
  "gatewayBaseUrl",
1105
1111
  "uploadHost",
1112
+ // "yuceImageCookieStrictOrigin",
1106
1113
  ],
1107
1114
  },
1108
1115
  };
@@ -1933,10 +1940,10 @@ function loadOpenClawConfig(): {
1933
1940
  configPath: string;
1934
1941
  config: Record<string, unknown>;
1935
1942
  } | null {
1936
- if (runtimeConfigPullUrl) {
1943
+ if (runtimeConfigPullUrl && !localConfigOnly) {
1937
1944
  return null;
1938
1945
  }
1939
- if (!allowLocalRuntimeConfig) {
1946
+ if (!allowLocalRuntimeConfig && !localConfigOnly) {
1940
1947
  return null;
1941
1948
  }
1942
1949
  const configPaths = [
@@ -2006,6 +2013,9 @@ function printConfigBootstrapGuide(): void {
2006
2013
  );
2007
2014
  console.log("- channels.feishu.accounts.<id>.streaming: 是否流式回复。");
2008
2015
  console.log("- channels.feishu.accounts.<id>.uploadHost: 上传服务地址。");
2016
+ // console.log(
2017
+ // "- channels.feishu.accounts.<id>.yuceImageCookieStrictOrigin: 可选,默认 false;true 时仅与 uploadHost 同源的 Markdown 图片拉取带 YCSESSIONID。",
2018
+ // );
2009
2019
  console.log("- channels.dingtalk-connector.enabled: 是否启用钉钉渠道。");
2010
2020
  console.log(
2011
2021
  "- channels.dingtalk-connector.accounts.<id>.clientId/clientSecret: 钉钉应用凭据。",
@@ -2025,6 +2035,9 @@ function printConfigBootstrapGuide(): void {
2025
2035
  console.log(
2026
2036
  "- channels.dingtalk-connector.accounts.<id>.uploadHost: 上传服务地址。",
2027
2037
  );
2038
+ // console.log(
2039
+ // "- channels.dingtalk-connector.accounts.<id>.yuceImageCookieStrictOrigin: 可选,默认 false;true 时仅与 uploadHost 同源的 Markdown 图片拉取带 YCSESSIONID。",
2040
+ // );
2028
2041
  console.log("- bindings: 渠道路由规则。");
2029
2042
  console.log("- bindings[].agentId: 目标 Agent ID。");
2030
2043
  console.log("- bindings[].match.channel: 命中的渠道。");
@@ -2081,7 +2094,7 @@ async function main(): Promise<void> {
2081
2094
  markConfiguredBotsAsConnecting(loaded.config);
2082
2095
  }
2083
2096
 
2084
- if (runtimeConfigPullUrl) {
2097
+ if (runtimeConfigPullUrl && !localConfigOnly) {
2085
2098
  // 启动前必须先拉到配置,确保插件启动时读到的是最新本地文件。
2086
2099
  const pullResult = await pullRuntimeConfigFromPython(false);
2087
2100
  if (!pullResult.ok) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ylib-syim",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "多 IM / 多 Agent 的会话路由与上下文管理(支持 /new)",
5
5
  "type": "module",
6
6
  "exports": {
@@ -31,17 +31,18 @@
31
31
  "start:connector": "tsx src/connector-host.ts",
32
32
  "start:stdio-bridge": "tsx bridges/dingtalk-stdio-bridge.ts",
33
33
  "start:lark-bridge": "tsx bridges/lark-stdio-bridge.ts",
34
- "start:bridges": "tsx bridges/main.ts",
34
+ "start:bridges": "tsx --inspect bridges/main.ts",
35
35
  "start:feishu-bridge": "tsx scripts/feishu-yuce-bridge.ts",
36
36
  "build:bridge": "node scripts/build-bridge.mjs",
37
37
  "build:bridge:all": "node scripts/build-bridge.mjs --all",
38
38
  "build:bridge:debug": "node scripts/build-bridge.mjs --no-minify",
39
- "start:stdio-bridge:bundle": "node dist/dingtalk-stdio-bridge.cjs"
39
+ "start:stdio-bridge:bundle": "node dist/dingtalk-stdio-bridge.cjs",
40
+ "local": "export LOCAL_CONFIG_ONLY=1 && npm run start:bridges"
40
41
  },
41
42
  "dependencies": {
42
43
  "@ffmpeg-installer/ffmpeg": "^1.1.0",
43
- "ylib-dingtalk-connector": "0.7.10-beata.2",
44
- "ylib-openclaw-lark": "2026.3.17-beata.6",
44
+ "ylib-dingtalk-connector": "0.7.10-beata.3",
45
+ "ylib-openclaw-lark": "2026.3.17-beata.7",
45
46
  "axios": "^1.6.0",
46
47
  "dingtalk-stream": "^2.1.4",
47
48
  "fluent-ffmpeg": "^2.1.3",