larkway 0.3.47 → 0.3.49
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/README.md +1 -1
- package/README.zh.md +1 -1
- package/dist/cli/index.js +28 -10
- package/dist/main.js +20 -6
- package/dist/web/public/style.css +5 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
You @ the bot in a Feishu thread. It runs on your machine — reading your real codebase, executing commands, opening MRs — and posts the result back. You define what the agent knows and what it can do. Larkway just carries the messages.
|
|
10
10
|
|
|
11
|
-
**Current release: v0.3.
|
|
11
|
+
**Current release: v0.3.49**
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
package/README.zh.md
CHANGED
package/dist/cli/index.js
CHANGED
|
@@ -11032,8 +11032,8 @@ var require_common = __commonJS({
|
|
|
11032
11032
|
}
|
|
11033
11033
|
return debug;
|
|
11034
11034
|
}
|
|
11035
|
-
function extend3(namespace,
|
|
11036
|
-
const newDebug = createDebug(this.namespace + (typeof
|
|
11035
|
+
function extend3(namespace, delimiter2) {
|
|
11036
|
+
const newDebug = createDebug(this.namespace + (typeof delimiter2 === "undefined" ? ":" : delimiter2) + namespace);
|
|
11037
11037
|
newDebug.log = this.log;
|
|
11038
11038
|
return newDebug;
|
|
11039
11039
|
}
|
|
@@ -12448,14 +12448,14 @@ var require_axios = __commonJS({
|
|
|
12448
12448
|
}
|
|
12449
12449
|
});
|
|
12450
12450
|
};
|
|
12451
|
-
var toObjectSet = (arrayOrString,
|
|
12451
|
+
var toObjectSet = (arrayOrString, delimiter2) => {
|
|
12452
12452
|
const obj = {};
|
|
12453
12453
|
const define2 = (arr) => {
|
|
12454
12454
|
arr.forEach((value) => {
|
|
12455
12455
|
obj[value] = true;
|
|
12456
12456
|
});
|
|
12457
12457
|
};
|
|
12458
|
-
isArray(arrayOrString) ? define2(arrayOrString) : define2(String(arrayOrString).split(
|
|
12458
|
+
isArray(arrayOrString) ? define2(arrayOrString) : define2(String(arrayOrString).split(delimiter2));
|
|
12459
12459
|
return obj;
|
|
12460
12460
|
};
|
|
12461
12461
|
var noop = () => {
|
|
@@ -131262,14 +131262,28 @@ async function cancelOnboard(sessionId) {
|
|
|
131262
131262
|
|
|
131263
131263
|
// src/runtimeRequirements.ts
|
|
131264
131264
|
import { execFileSync } from "node:child_process";
|
|
131265
|
+
import { homedir as homedir5 } from "node:os";
|
|
131266
|
+
import { delimiter } from "node:path";
|
|
131267
|
+
function commandProbeEnv() {
|
|
131268
|
+
const extra = [
|
|
131269
|
+
`${homedir5()}/.local/bin`,
|
|
131270
|
+
"/opt/homebrew/bin",
|
|
131271
|
+
"/usr/local/bin"
|
|
131272
|
+
];
|
|
131273
|
+
const current = process.env.PATH ?? "";
|
|
131274
|
+
const parts = current.split(delimiter);
|
|
131275
|
+
const merged = [...parts, ...extra.filter((p) => !parts.includes(p))].join(delimiter);
|
|
131276
|
+
return { ...process.env, PATH: merged };
|
|
131277
|
+
}
|
|
131265
131278
|
function checkCli(command) {
|
|
131279
|
+
const env = commandProbeEnv();
|
|
131266
131280
|
try {
|
|
131267
|
-
execFileSync("which", [command], { stdio: ["pipe", "pipe", "pipe"] });
|
|
131281
|
+
execFileSync("which", [command], { stdio: ["pipe", "pipe", "pipe"], env });
|
|
131268
131282
|
} catch {
|
|
131269
131283
|
return { ok: false };
|
|
131270
131284
|
}
|
|
131271
131285
|
try {
|
|
131272
|
-
const version = execFileSync(command, ["--version"], { stdio: ["pipe", "pipe", "pipe"] }).toString().trim().split("\n")[0];
|
|
131286
|
+
const version = execFileSync(command, ["--version"], { stdio: ["pipe", "pipe", "pipe"], env }).toString().trim().split("\n")[0];
|
|
131273
131287
|
return { ok: true, ...version ? { version } : {} };
|
|
131274
131288
|
} catch {
|
|
131275
131289
|
return { ok: true };
|
|
@@ -131500,7 +131514,7 @@ async function defaultBackendLoginProbe(backend) {
|
|
|
131500
131514
|
}
|
|
131501
131515
|
}
|
|
131502
131516
|
var HEALTH_SCAN_TTL_MS = 10 * 60 * 1e3;
|
|
131503
|
-
var HEALTH_SCAN_PROBE_TIMEOUT_MS =
|
|
131517
|
+
var HEALTH_SCAN_PROBE_TIMEOUT_MS = 15e3;
|
|
131504
131518
|
var healthScanCache = /* @__PURE__ */ new Map();
|
|
131505
131519
|
var BOT_PERMISSION_BASELINE = [
|
|
131506
131520
|
{ scope: "im:message", reason: "\u6536\u53D1\u6D88\u606F \u2014\u2014 @ \u89E6\u53D1\u4E0E\u8BDD\u9898\u56DE\u590D\u7684\u6839\u672C" },
|
|
@@ -131530,7 +131544,9 @@ async function runHealthScan(bot, hostConfigStore) {
|
|
|
131530
131544
|
const { stdout: stdout2 } = await healthScanExecFile(
|
|
131531
131545
|
process.env.LARK_CLI_PATH || "lark-cli",
|
|
131532
131546
|
["--profile", profile, "auth", "status", "--json"],
|
|
131533
|
-
|
|
131547
|
+
// commandProbeEnv:补齐 ~/.local/bin 等用户级安装目录(mini 实测:精简
|
|
131548
|
+
// PATH 的 UI 进程探测不到工具,与登录态探测自相矛盾)
|
|
131549
|
+
{ timeout: HEALTH_SCAN_PROBE_TIMEOUT_MS, maxBuffer: 1024 * 1024, env: commandProbeEnv() }
|
|
131534
131550
|
);
|
|
131535
131551
|
const payload = healthScanParseJson(stdout2);
|
|
131536
131552
|
const botIdentity = payload?.identities?.bot;
|
|
@@ -131542,14 +131558,16 @@ async function runHealthScan(bot, hostConfigStore) {
|
|
|
131542
131558
|
global: false,
|
|
131543
131559
|
...botIdentity?.available !== true ? { hint: "\u91CD\u542F Larkway \u4F1A\u81EA\u52A8\u91CD\u65B0\u914D\u7F6E profile;\u82E5\u4ECD\u5931\u8D25,\u68C0\u67E5 keychain \u662F\u5426\u9501\u5B9A" } : {}
|
|
131544
131560
|
});
|
|
131545
|
-
} catch {
|
|
131561
|
+
} catch (e) {
|
|
131562
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
131563
|
+
const timedOut = e.killed === true || /timed? ?out/i.test(msg);
|
|
131546
131564
|
credentials.push({
|
|
131547
131565
|
id: "lark-profile",
|
|
131548
131566
|
label: "lark-cli profile",
|
|
131549
131567
|
status: "unknown",
|
|
131550
131568
|
severity: "required",
|
|
131551
131569
|
global: false,
|
|
131552
|
-
hint: "lark-cli \u63A2\u6D4B\u5931\u8D25(\u672A\u5B89\u88C5\u6216\
|
|
131570
|
+
hint: timedOut ? "lark-cli \u63A2\u6D4B\u8D85\u65F6(\u98DE\u4E66\u63A5\u53E3\u54CD\u5E94\u6162)\u2014\u2014 \u70B9\u300C\u91CD\u65B0\u4F53\u68C0\u300D\u518D\u8BD5\u4E00\u6B21" : "lark-cli \u63A2\u6D4B\u5931\u8D25(\u672A\u5B89\u88C5\u6216\u65E0\u6CD5\u6267\u884C)\u2014\u2014 \u88C5\u597D\u5DE5\u5177\u540E\u91CD\u65B0\u4F53\u68C0,\u8FD9\u9879\u4F1A\u81EA\u52A8\u8865\u4E0A"
|
|
131553
131571
|
});
|
|
131554
131572
|
}
|
|
131555
131573
|
const tokenEnv = bot.git_token_env ?? bot.gitlab_token_env;
|
package/dist/main.js
CHANGED
|
@@ -10588,8 +10588,8 @@ var require_common = __commonJS({
|
|
|
10588
10588
|
}
|
|
10589
10589
|
return debug;
|
|
10590
10590
|
}
|
|
10591
|
-
function extend3(namespace,
|
|
10592
|
-
const newDebug = createDebug(this.namespace + (typeof
|
|
10591
|
+
function extend3(namespace, delimiter2) {
|
|
10592
|
+
const newDebug = createDebug(this.namespace + (typeof delimiter2 === "undefined" ? ":" : delimiter2) + namespace);
|
|
10593
10593
|
newDebug.log = this.log;
|
|
10594
10594
|
return newDebug;
|
|
10595
10595
|
}
|
|
@@ -12004,14 +12004,14 @@ var require_axios = __commonJS({
|
|
|
12004
12004
|
}
|
|
12005
12005
|
});
|
|
12006
12006
|
};
|
|
12007
|
-
var toObjectSet = (arrayOrString,
|
|
12007
|
+
var toObjectSet = (arrayOrString, delimiter2) => {
|
|
12008
12008
|
const obj = {};
|
|
12009
12009
|
const define2 = (arr) => {
|
|
12010
12010
|
arr.forEach((value) => {
|
|
12011
12011
|
obj[value] = true;
|
|
12012
12012
|
});
|
|
12013
12013
|
};
|
|
12014
|
-
isArray(arrayOrString) ? define2(arrayOrString) : define2(String(arrayOrString).split(
|
|
12014
|
+
isArray(arrayOrString) ? define2(arrayOrString) : define2(String(arrayOrString).split(delimiter2));
|
|
12015
12015
|
return obj;
|
|
12016
12016
|
};
|
|
12017
12017
|
var noop = () => {
|
|
@@ -130432,14 +130432,28 @@ function checkGrantMatchesBot(normalizedGrantText, bot) {
|
|
|
130432
130432
|
|
|
130433
130433
|
// src/runtimeRequirements.ts
|
|
130434
130434
|
import { execFileSync } from "node:child_process";
|
|
130435
|
+
import { homedir as homedir2 } from "node:os";
|
|
130436
|
+
import { delimiter } from "node:path";
|
|
130437
|
+
function commandProbeEnv() {
|
|
130438
|
+
const extra = [
|
|
130439
|
+
`${homedir2()}/.local/bin`,
|
|
130440
|
+
"/opt/homebrew/bin",
|
|
130441
|
+
"/usr/local/bin"
|
|
130442
|
+
];
|
|
130443
|
+
const current = process.env.PATH ?? "";
|
|
130444
|
+
const parts = current.split(delimiter);
|
|
130445
|
+
const merged = [...parts, ...extra.filter((p) => !parts.includes(p))].join(delimiter);
|
|
130446
|
+
return { ...process.env, PATH: merged };
|
|
130447
|
+
}
|
|
130435
130448
|
function checkCli(command) {
|
|
130449
|
+
const env = commandProbeEnv();
|
|
130436
130450
|
try {
|
|
130437
|
-
execFileSync("which", [command], { stdio: ["pipe", "pipe", "pipe"] });
|
|
130451
|
+
execFileSync("which", [command], { stdio: ["pipe", "pipe", "pipe"], env });
|
|
130438
130452
|
} catch {
|
|
130439
130453
|
return { ok: false };
|
|
130440
130454
|
}
|
|
130441
130455
|
try {
|
|
130442
|
-
const version = execFileSync(command, ["--version"], { stdio: ["pipe", "pipe", "pipe"] }).toString().trim().split("\n")[0];
|
|
130456
|
+
const version = execFileSync(command, ["--version"], { stdio: ["pipe", "pipe", "pipe"], env }).toString().trim().split("\n")[0];
|
|
130443
130457
|
return { ok: true, ...version ? { version } : {} };
|
|
130444
130458
|
} catch {
|
|
130445
130459
|
return { ok: true };
|
|
@@ -3936,11 +3936,14 @@ textarea.input {
|
|
|
3936
3936
|
}
|
|
3937
3937
|
.bk2-sel-desc { flex: 1; min-width: 0; font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
3938
3938
|
.bk2-select .icon { width: 15px; height: 15px; color: var(--faint); flex-shrink: 0; }
|
|
3939
|
+
/* 菜单走文档流内展开(不用 absolute):外层 .ac-layer 有 overflow:hidden
|
|
3940
|
+
圆角裁剪,浮层会被裁得只剩一两项「看起来没有选项」—— in-flow 展开时卡片
|
|
3941
|
+
自然撑高,免疫任何祖先裁剪(2026-07-10 本机部署实测修复)。 */
|
|
3939
3942
|
.bk2-menu {
|
|
3940
|
-
|
|
3943
|
+
margin-top: 6px;
|
|
3941
3944
|
border: 1px solid var(--border); border-radius: 11px;
|
|
3942
3945
|
background: #fff; overflow: hidden;
|
|
3943
|
-
box-shadow: 0
|
|
3946
|
+
box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
|
|
3944
3947
|
}
|
|
3945
3948
|
.bk2-mi {
|
|
3946
3949
|
display: flex; align-items: baseline; gap: 10px;
|