deskbuddy 0.2.0-beta.40 → 0.2.0-beta.41
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.
|
@@ -8509,6 +8509,10 @@ var LAUNCH_FRESH_MS = 10 * 1e3;
|
|
|
8509
8509
|
var LAUNCH_PORT_WINDOW_MS = 10 * 60 * 1e3;
|
|
8510
8510
|
var LAUNCH_PORT_MAX = 2;
|
|
8511
8511
|
var LAUNCH_SEEN_MAX = 32;
|
|
8512
|
+
function macOpenArgs(brand, app, port, background) {
|
|
8513
|
+
const env = Object.entries(brand.macLaunchEnv ?? {}).flatMap(([k, v]) => ["--env", `${k}=${v}`]);
|
|
8514
|
+
return [...env, ...background ? ["-g"] : [], "-a", app, "--args", `--remote-debugging-port=${port}`];
|
|
8515
|
+
}
|
|
8512
8516
|
function winBrandMainProc(procs, exe) {
|
|
8513
8517
|
const want = exe.toLowerCase();
|
|
8514
8518
|
for (const p of procs) {
|
|
@@ -8671,7 +8675,7 @@ var QoderCdpKeeper = class {
|
|
|
8671
8675
|
}
|
|
8672
8676
|
return await launch(app, [`--remote-debugging-port=${port}`], env);
|
|
8673
8677
|
}
|
|
8674
|
-
return await launch("open",
|
|
8678
|
+
return await launch("open", macOpenArgs(this.#d.brand, app, port, true), env);
|
|
8675
8679
|
}
|
|
8676
8680
|
#exec() {
|
|
8677
8681
|
return this.#d.exec ?? defaultExec;
|
|
@@ -8766,11 +8770,14 @@ var QoderCdpKeeper = class {
|
|
|
8766
8770
|
const r = await exec("lsof", ["-nP", `-iTCP:${this.#d.port()}`, "-sTCP:LISTEN"]);
|
|
8767
8771
|
const rows = parseLsof(r.stdout);
|
|
8768
8772
|
if (rows.length === 0 || rows.some((x) => x.addr !== "127.0.0.1")) return false;
|
|
8773
|
+
const b = this.#d.brand;
|
|
8774
|
+
let own = false;
|
|
8769
8775
|
for (const { pid } of rows) {
|
|
8770
8776
|
const p = await exec("ps", ["-o", "comm=", "-p", String(pid)]);
|
|
8771
|
-
if (
|
|
8777
|
+
if (b.comm.test(p.stdout)) own = true;
|
|
8778
|
+
else if (!b.macInheritors?.test(p.stdout)) return false;
|
|
8772
8779
|
}
|
|
8773
|
-
return
|
|
8780
|
+
return own;
|
|
8774
8781
|
}
|
|
8775
8782
|
async appRunning() {
|
|
8776
8783
|
if (this.#d.appRunning) return this.#d.appRunning();
|
|
@@ -8939,7 +8946,7 @@ var QoderCdpKeeper = class {
|
|
|
8939
8946
|
const port = this.#d.port();
|
|
8940
8947
|
const launch = this.#d.launch ?? defaultLaunch;
|
|
8941
8948
|
const env = (this.#d.launchEnv ?? cleanLaunchEnv)();
|
|
8942
|
-
const ok = await launch("open",
|
|
8949
|
+
const ok = await launch("open", macOpenArgs(b, app, port, false), env);
|
|
8943
8950
|
this.#d.log(ok ? `${b.label} \u521A\u542F\u52A8\u6CA1\u5E26\u8C03\u8BD5\u7AEF\u53E3\uFF0C\u5DF2\u5E26\u7AEF\u53E3\u91CD\u5F00\uFF08\u7AEF\u53E3 ${port}\uFF09` : `${b.label} \u521A\u542F\u52A8\u6CA1\u5E26\u8C03\u8BD5\u7AEF\u53E3\uFF0C\u5DF2\u9000\u51FA\u4F46\u5E26\u7AEF\u53E3\u62C9\u8D77\u5931\u8D25\uFF08\u4E0D\u518D\u91CD\u8BD5\uFF09`);
|
|
8944
8951
|
return ok ? "reopened" : "failed";
|
|
8945
8952
|
}
|
|
@@ -11067,7 +11074,7 @@ var defaultLoginOpenDeps = () => ({
|
|
|
11067
11074
|
});
|
|
11068
11075
|
async function installCodebuddyHooks(log) {
|
|
11069
11076
|
try {
|
|
11070
|
-
const { installTools: installTools2 } = await import("./enable-
|
|
11077
|
+
const { installTools: installTools2 } = await import("./enable-3G3TWPSH.js");
|
|
11071
11078
|
installTools2(["workbuddy"], () => {
|
|
11072
11079
|
}, null, { auto: true });
|
|
11073
11080
|
} catch (e) {
|
|
@@ -11581,7 +11588,7 @@ function defaultOfferDeps(log) {
|
|
|
11581
11588
|
}),
|
|
11582
11589
|
openLogin: () => defaultOpenLogin(platform),
|
|
11583
11590
|
installHooks: async () => {
|
|
11584
|
-
const { installTools: installTools2 } = await import("./enable-
|
|
11591
|
+
const { installTools: installTools2 } = await import("./enable-3G3TWPSH.js");
|
|
11585
11592
|
installTools2(["workbuddy"], (l) => log(`[WorkBuddy \u72EC\u7ACB\u7248] ${l}`), null, { auto: true });
|
|
11586
11593
|
},
|
|
11587
11594
|
log: (l) => log(`[WorkBuddy \u72EC\u7ACB\u7248] ${l}`),
|
package/dist/cli.js
CHANGED
|
@@ -271,7 +271,7 @@ import {
|
|
|
271
271
|
writeState,
|
|
272
272
|
writeWakeMark,
|
|
273
273
|
writeWakeSecret
|
|
274
|
-
} from "./chunk-
|
|
274
|
+
} from "./chunk-W2GIOQDI.js";
|
|
275
275
|
|
|
276
276
|
// src/commands/config.ts
|
|
277
277
|
function runConfig(args, out = (s2) => process.stdout.write(s2 + "\n")) {
|
|
@@ -14331,10 +14331,16 @@ var CHATGPT_BRAND = {
|
|
|
14331
14331
|
appName: "ChatGPT",
|
|
14332
14332
|
// 26.1007 的 Info.plist:CFBundleIdentifier = com.openai.codex
|
|
14333
14333
|
bundleId: "com.openai.codex",
|
|
14334
|
-
//
|
|
14335
|
-
|
|
14334
|
+
// 10-13 实测 26.1007:/json/version 的 UA 是纯 Chrome(不带 Codex/ChatGPT 字样);
|
|
14335
|
+
// 是不是这个 App 靠监听者核对(lsof 回环 + ps comm 在 ChatGPT.app 里)把关
|
|
14336
|
+
ua: /\b(Codex|ChatGPT|Chrome)\/\d/,
|
|
14336
14337
|
comm: /\/ChatGPT\.app\//,
|
|
14337
|
-
defaultPort: CHATGPT_DEFAULT_CDP_PORT
|
|
14338
|
+
defaultPort: CHATGPT_DEFAULT_CDP_PORT,
|
|
14339
|
+
// 用户 10-13 拍板:有进行中的本地会话 / 开了定时任务时 App 退出会弹「Quit ChatGPT?」(默认 Quit),
|
|
14340
|
+
// keeper 的 osascript quit 会被它拦下;由 DeskBuddy 拉起的 App 带上 App 自带的开关关掉这道确认
|
|
14341
|
+
macLaunchEnv: { CODEX_ELECTRON_DISABLE_QUIT_CONFIRMATION: "1" },
|
|
14342
|
+
// 10-13 实测:App 拉起的 Codex Computer Use(~/.codex/computer-use/…)继承了调试端口的监听句柄,lsof 里两个进程同一个 socket
|
|
14343
|
+
macInheritors: /\/\.codex\/computer-use\/Codex Computer Use\.app\//
|
|
14338
14344
|
};
|
|
14339
14345
|
var CODEX_ACTIVE_MS = 5 * 60 * 1e3;
|
|
14340
14346
|
var ROLLOUT_MAX_ENTRIES = 2e4;
|
package/hook/hook-debug.log
CHANGED
|
@@ -464,3 +464,21 @@
|
|
|
464
464
|
2026-10-12T15:21:56.191Z [opencode] opencode 版本 读不出:带说明的拒绝不走新路由
|
|
465
465
|
2026-10-12T15:21:56.192Z [opencode] opencode 版本不确定支持带说明的拒绝,设备上的反馈没有带给模型
|
|
466
466
|
2026-10-12T15:21:58.689Z [opencode] 后台任务里的提问 que_r2 没法在设备上回答(后台任务不能提问,请在电脑上继续),已拒绝
|
|
467
|
+
2026-10-13T02:00:47.491Z [opencode] 回填选择题失败:/question/{requestID}/reply status=404
|
|
468
|
+
2026-10-13T02:00:52.742Z [opencode] opencode 版本 1.4.3:带说明的拒绝不走新路由
|
|
469
|
+
2026-10-13T02:00:52.742Z [opencode] opencode 版本不确定支持带说明的拒绝,设备上的反馈没有带给模型
|
|
470
|
+
2026-10-13T02:00:52.899Z [opencode] opencode 版本 读不出:带说明的拒绝不走新路由
|
|
471
|
+
2026-10-13T02:00:52.899Z [opencode] opencode 版本不确定支持带说明的拒绝,设备上的反馈没有带给模型
|
|
472
|
+
2026-10-13T02:00:56.217Z [opencode] 后台任务里的提问 que_r2 没法在设备上回答(后台任务不能提问,请在电脑上继续),已拒绝
|
|
473
|
+
2026-10-13T02:04:00.351Z [opencode] 回填选择题失败:/question/{requestID}/reply status=404
|
|
474
|
+
2026-10-13T02:04:05.491Z [opencode] opencode 版本 1.4.3:带说明的拒绝不走新路由
|
|
475
|
+
2026-10-13T02:04:05.491Z [opencode] opencode 版本不确定支持带说明的拒绝,设备上的反馈没有带给模型
|
|
476
|
+
2026-10-13T02:04:05.629Z [opencode] opencode 版本 读不出:带说明的拒绝不走新路由
|
|
477
|
+
2026-10-13T02:04:05.629Z [opencode] opencode 版本不确定支持带说明的拒绝,设备上的反馈没有带给模型
|
|
478
|
+
2026-10-13T02:04:09.075Z [opencode] 后台任务里的提问 que_r2 没法在设备上回答(后台任务不能提问,请在电脑上继续),已拒绝
|
|
479
|
+
2026-10-13T02:29:30.508Z [opencode] 回填选择题失败:/question/{requestID}/reply status=404
|
|
480
|
+
2026-10-13T02:29:35.742Z [opencode] opencode 版本 1.4.3:带说明的拒绝不走新路由
|
|
481
|
+
2026-10-13T02:29:35.742Z [opencode] opencode 版本不确定支持带说明的拒绝,设备上的反馈没有带给模型
|
|
482
|
+
2026-10-13T02:29:35.919Z [opencode] opencode 版本 读不出:带说明的拒绝不走新路由
|
|
483
|
+
2026-10-13T02:29:35.919Z [opencode] opencode 版本不确定支持带说明的拒绝,设备上的反馈没有带给模型
|
|
484
|
+
2026-10-13T02:29:38.734Z [opencode] 后台任务里的提问 que_r2 没法在设备上回答(后台任务不能提问,请在电脑上继续),已拒绝
|