@suwenguang/pi-feishu-bridge 0.6.3 → 0.6.6
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/.pi/feishu/debug.pi.log +81 -1151
- package/.pi/feishu/state.pi.json +1 -1
- package/package.json +1 -1
- package/src/adapters/pi/index.ts +8 -5
- package/src/feishu/daemon-spec.ts +4 -6
package/.pi/feishu/state.pi.json
CHANGED
package/package.json
CHANGED
package/src/adapters/pi/index.ts
CHANGED
|
@@ -987,14 +987,17 @@ function listProcesses() {
|
|
|
987
987
|
}
|
|
988
988
|
|
|
989
989
|
function looksLikeFeishuDaemon(command: string, extensionPath: string) {
|
|
990
|
-
// 启动命令经 quoteShell 处理,每个参数单独加引号('--mode' 'rpc'
|
|
990
|
+
// 启动命令经 quoteShell 处理,每个参数单独加引号('--mode' 'rpc'),
|
|
991
991
|
// 直接匹配 "--mode rpc" 永远失败 —— 那样残留的 daemon 空壳(bash + tail 喂 stdin)
|
|
992
992
|
// 永远不会被 reap 掉。所以先去引号再匹配。
|
|
993
|
+
//
|
|
994
|
+
// 2026-11-13 起 daemon 不再带 --no-* 开关(与 TUI 等同),判据改为三件套:
|
|
995
|
+
// rpc 模式 + 给 stdin 续命的 `tail -f /dev/null` + `-e` 紧跟本实例入口。
|
|
996
|
+
// 只「引用了启动命令」的脚本 / heredoc 缺那只 tail,仍然认不出来。
|
|
993
997
|
const normalized = command.replace(/'/g, "");
|
|
994
|
-
const
|
|
995
|
-
&& normalized.includes("
|
|
996
|
-
|
|
997
|
-
if (!hasDaemonFlags) return false;
|
|
998
|
+
const hasDaemonShape = normalized.includes("--mode rpc")
|
|
999
|
+
&& normalized.includes("tail -f /dev/null");
|
|
1000
|
+
if (!hasDaemonShape) return false;
|
|
998
1001
|
if (!extensionPath) return false;
|
|
999
1002
|
// 入口路径必须**紧跟在 `-e` 后面**(daemon 的启动形状),而不是「命令行里提到过这个路径」:
|
|
1000
1003
|
// 否则一段只是引用了启动命令的脚本 / heredoc(测试探针、重启脚本)也会被当成 daemon 回收。
|
|
@@ -20,14 +20,12 @@ export function quoteShell(value: string): string {
|
|
|
20
20
|
|
|
21
21
|
export function daemonSpec(extensionPath: string): DaemonSpec {
|
|
22
22
|
const piBin = process.env.PI_BIN || "pi";
|
|
23
|
+
// 2026-11-13 用户口径:「飞书进程应该与 pi 的 TUI 等同」。
|
|
24
|
+
// 以前这里是 rpc + 六个 --no-*(关扩展 / 技能 / 提示模板 / 主题 / 上下文文件 / 内置工具),
|
|
25
|
+
// 结果桥接侧与 TUI 能力面不一致:拿不到 skills、AGENTS.md 注入变少、内置工具也少。
|
|
26
|
+
// 现在只保留 rpc 协议本身与显式 -e(显式入口不依赖扩展自动发现,settings 写坏也起得来)。
|
|
23
27
|
const args = [
|
|
24
28
|
"--mode", "rpc",
|
|
25
|
-
"--no-extensions",
|
|
26
|
-
"--no-skills",
|
|
27
|
-
"--no-prompt-templates",
|
|
28
|
-
"--no-themes",
|
|
29
|
-
"--no-context-files",
|
|
30
|
-
"--no-builtin-tools",
|
|
31
29
|
"-e", extensionPath,
|
|
32
30
|
];
|
|
33
31
|
return { extensionPath, piBin, args };
|