@lark-codem/codem-cli 0.1.162 → 0.1.163
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/bin/codem-service.js +15 -0
- package/package.json +7 -7
package/bin/codem-service.js
CHANGED
|
@@ -95,6 +95,21 @@ async function resolveRuntimeEntry(version) {
|
|
|
95
95
|
return null;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
+
// 服务 env 快照侧车(与 service-manager.js 的 SERVICE_ENTRY_SOURCE 同语义,
|
|
99
|
+
// 二者需同步改):Windows 计划任务 XML 无法携带环境变量,codem 专属服务 env
|
|
100
|
+
// (泳道快照等)统一从 runtime/service-env.json 加载。缺文件 = 无服务 env;
|
|
101
|
+
// 解析失败上报 stderr,不静默。
|
|
102
|
+
try {
|
|
103
|
+
const entries = JSON.parse(await fs.readFile(path.join(RUNTIME_ROOT, "service-env.json"), "utf8"));
|
|
104
|
+
for (const [key, value] of Object.entries(entries)) {
|
|
105
|
+
if (typeof value === "string") process.env[key] = value;
|
|
106
|
+
}
|
|
107
|
+
} catch (err) {
|
|
108
|
+
if (err?.code !== "ENOENT") {
|
|
109
|
+
console.error("[codem-service] 忽略无法解析的 service-env.json:", err?.message ?? err);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
98
113
|
// 开发态逃生门:跳过 runtime 指针,直接加载本仓源码。否则自动更新会把
|
|
99
114
|
// 指针自愈回发布版 runtime,本地源码改动永远不会被 daemon 加载。
|
|
100
115
|
const forceSource = process.env.CODEM_DAEMON_DEV_SOURCE === "1";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lark-codem/codem-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.163",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "CodeM local CLI for Feishu-driven coding sessions",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
"@lark-codem/codem-core": "latest"
|
|
30
30
|
},
|
|
31
31
|
"optionalDependencies": {
|
|
32
|
-
"@lark-codem/codem-cli-darwin-arm64": "0.1.
|
|
33
|
-
"@lark-codem/codem-cli-darwin-x64": "0.1.
|
|
34
|
-
"@lark-codem/codem-cli-linux-arm64": "0.1.
|
|
35
|
-
"@lark-codem/codem-cli-linux-x64": "0.1.
|
|
36
|
-
"@lark-codem/codem-cli-win32-arm64": "0.1.
|
|
37
|
-
"@lark-codem/codem-cli-win32-x64": "0.1.
|
|
32
|
+
"@lark-codem/codem-cli-darwin-arm64": "0.1.163",
|
|
33
|
+
"@lark-codem/codem-cli-darwin-x64": "0.1.163",
|
|
34
|
+
"@lark-codem/codem-cli-linux-arm64": "0.1.163",
|
|
35
|
+
"@lark-codem/codem-cli-linux-x64": "0.1.163",
|
|
36
|
+
"@lark-codem/codem-cli-win32-arm64": "0.1.163",
|
|
37
|
+
"@lark-codem/codem-cli-win32-x64": "0.1.163"
|
|
38
38
|
},
|
|
39
39
|
"engines": {
|
|
40
40
|
"node": ">=18"
|