@visorcraft/idlehands 4.2.5 → 4.2.7
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 -0
- package/dist/{agent-via-gateway-Bhon8XVm.js → agent-via-gateway-BMsMjnWe.js} +2 -2
- package/dist/{agent-via-gateway-DVTkXwmI.js → agent-via-gateway-CW7FhqaW.js} +7 -7
- package/dist/{agent-via-gateway-CS-8ChjV.js → agent-via-gateway-CZLe7Ijx.js} +1 -1
- package/dist/{agent-via-gateway-Drygi4ty.js → agent-via-gateway-D8QBXTZL.js} +1 -1
- package/dist/{agents-dNuQ9qUa.js → agents-C1x5jDIo.js} +4 -4
- package/dist/{agents.config-B_6rOTVW.js → agents.config-4ilUlWts.js} +1 -1
- package/dist/{agents.config-DCNsF8yj.js → agents.config-B_McnvK1.js} +1 -1
- package/dist/{anton-D375-ufL.js → anton-0pF0zqOs.js} +88 -22
- package/dist/{anton-BmSsFmSP.js → anton-BDDjbZ5H.js} +88 -22
- package/dist/{anton-Cw4-BgtA.js → anton-C33_8bVg.js} +88 -22
- package/dist/{anton-Di5VPZiI.js → anton-D4a5lMjo.js} +88 -22
- package/dist/{audio-preflight-CW8IH1lU.js → audio-preflight-BSlR2jEq.js} +4 -4
- package/dist/{auth-choice-C8Tj46gd.js → auth-choice-BhfFkY6h.js} +1 -1
- package/dist/{auth-choice-CYV4KLt7.js → auth-choice-JcCIJBlD.js} +1 -1
- package/dist/{banner-B7_rwm3P.js → banner-DfFhVf3q.js} +1 -1
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +7 -7
- package/dist/bundled/session-memory/handler.js +7 -7
- package/dist/{channel-options-Dxc1A5iC.js → channel-options-9SPtt4MW.js} +1 -1
- package/dist/{channel-options-DTqGMcYU.js → channel-options-CUviKu-7.js} +1 -1
- package/dist/{channel-web-CgvDCMru.js → channel-web-C6dFy-1o.js} +2 -2
- package/dist/{channel-web-BPlapQS3.js → channel-web-CFn6Nsja.js} +2 -2
- package/dist/{channels-cli-BfUIc52d.js → channels-cli-B2da56zV.js} +7 -7
- package/dist/{channels-cli-k45uGu5k.js → channels-cli-DGfqgSUL.js} +7 -7
- package/dist/{chrome-BcJB6PcM.js → chrome-_2tzVjVl.js} +9 -9
- package/dist/{cli-C6GCCnET.js → cli-DmnwiKz9.js} +2 -2
- package/dist/{cli-BapK2rdH.js → cli-FOBK-XcZ.js} +2 -2
- package/dist/{command-registry-DJb9jSNL.js → command-registry-DacWRRgz.js} +10 -10
- package/dist/{completion-cli-BXA0UZAn.js → completion-cli-DydUIkNr.js} +2 -2
- package/dist/{completion-cli-DqJEZMJt.js → completion-cli-NMyMglwl.js} +1 -1
- package/dist/{config-cli-BfaVUsj-.js → config-cli-B4fFlFK0.js} +1 -1
- package/dist/{config-cli-97SkUuuT.js → config-cli-C_DUmmo_.js} +1 -1
- package/dist/{configure-DpswIHZC.js → configure-BRK8DqNR.js} +3 -3
- package/dist/{configure-CmTKkn3M.js → configure-k0XQkt_5.js} +3 -3
- package/dist/{deliver-BUiQ-9fE.js → deliver-CVTXl0Cv.js} +1 -1
- package/dist/{deps-CDLYb9a7.js → deps-Bp-zobQ9.js} +1 -1
- package/dist/{deps-BV_-fxNb.js → deps-C8gMsatU.js} +1 -1
- package/dist/{deps-IpeS3x5O.js → deps-CC9rj6VE.js} +1 -1
- package/dist/{deps-Bc5yBM-U.js → deps-k7zLO-No.js} +1 -1
- package/dist/{doctor-completion-WFEPRjgs.js → doctor-completion-CtkKGYq1.js} +1 -1
- package/dist/{doctor-completion-BkS6Phs6.js → doctor-completion-T65otQPW.js} +1 -1
- package/dist/{emergency-stop-DMTHxdvC.js → emergency-stop-B1WGLPIl.js} +2 -2
- package/dist/{emergency-stop-Dxp2e3a9.js → emergency-stop-Bqex5qoB.js} +7 -7
- package/dist/{emergency-stop-zy54uJoE.js → emergency-stop-C0olMHR9.js} +2 -2
- package/dist/{emergency-stop-DKLc7AmD.js → emergency-stop-CHHSptxF.js} +2 -2
- package/dist/entry.js +1 -1
- package/dist/extensionAPI.js +2 -2
- package/dist/{gateway-cli-FNbwxOiN.js → gateway-cli-B4fOuxUC.js} +9 -9
- package/dist/{gateway-cli-E6DUzxEX.js → gateway-cli-LuvH-d8m.js} +9 -9
- package/dist/{health-CGW71CVV.js → health-BFXk0LFk.js} +1 -1
- package/dist/{health-D60h_a2w.js → health-CpPRbWHn.js} +1 -1
- package/dist/{hooks-cli-BnVSeWIo.js → hooks-cli-RL3GbGUT.js} +3 -3
- package/dist/{hooks-cli-DaWPRdgZ.js → hooks-cli-q_ukCmeC.js} +3 -3
- package/dist/{image-D8b_rlQC.js → image-COw__ACq.js} +1 -1
- package/dist/index.js +7 -7
- package/dist/llm-slug-generator.js +7 -7
- package/dist/{models-C1ouQF8k.js → models-DToiZ2jp.js} +2 -2
- package/dist/{models-cli-CxEFLoMt.js → models-cli-8wuQnOxc.js} +3 -3
- package/dist/{models-cli-BhFUh61j.js → models-cli-C8tnFvU6.js} +4 -4
- package/dist/{npm-resolution-Ds0qg1EX.js → npm-resolution-CPEoaDTw.js} +1 -1
- package/dist/{npm-resolution-D30nzRfu.js → npm-resolution-Dz95V6fj.js} +1 -1
- package/dist/{onboard-NcA_odSQ.js → onboard-DnGowokw.js} +2 -2
- package/dist/{onboard-Cv6q6Usf.js → onboard-Dx-J8Bes.js} +2 -2
- package/dist/{onboard-channels-C1E5DpTR.js → onboard-channels-CU5VwTMC.js} +1 -1
- package/dist/{onboard-channels-bfoS7x6P.js → onboard-channels-rnRb5koA.js} +1 -1
- package/dist/{onboarding-CX8a934a.js → onboarding-5FnIgrWy.js} +3 -3
- package/dist/{onboarding-CpGBbVTj.js → onboarding-ztl5snrV.js} +3 -3
- package/dist/{onboarding.finalize-CRgpFQIz.js → onboarding.finalize-CvJCdPZc.js} +6 -6
- package/dist/{onboarding.finalize-BnKQeFN8.js → onboarding.finalize-DpwZIBVH.js} +7 -7
- package/dist/{pi-embedded-0YMQWOc5.js → pi-embedded-BYtUxbhJ.js} +11 -11
- package/dist/{pi-embedded-BO8wzB4O.js → pi-embedded-CIJj8Clt.js} +26 -26
- package/dist/{pi-embedded-helpers-CghCLoPo.js → pi-embedded-helpers-CyTpDKo5.js} +4 -4
- package/dist/{plugin-registry-Cp2q0pVP.js → plugin-registry-BCBZDFZm.js} +1 -1
- package/dist/{plugin-registry-DceNUcJc.js → plugin-registry-CY9YBaxv.js} +1 -1
- package/dist/plugin-sdk/{agent-via-gateway-MuDsrNW6.js → agent-via-gateway-RUSmiQPF.js} +2 -2
- package/dist/plugin-sdk/{anton-CkJKOeKT.js → anton-BluQsLu2.js} +88 -22
- package/dist/plugin-sdk/{channel-web-B6pGyJpM.js → channel-web-Dn0OzSFP.js} +2 -2
- package/dist/plugin-sdk/{deps-FuyQakmK.js → deps-C8qACokW.js} +1 -1
- package/dist/plugin-sdk/{emergency-stop-Ci4JC4dU.js → emergency-stop-DylRK_E8.js} +2 -2
- package/dist/plugin-sdk/index.js +3 -3
- package/dist/plugin-sdk/{reply-BTVimsoK.js → reply-DhycbFxW.js} +11 -11
- package/dist/plugin-sdk/{web-HiiN5NkP.js → web-yryYzFPs.js} +3 -3
- package/dist/{plugins-cli-2wK7R85Y.js → plugins-cli-BLcXY9sR.js} +3 -3
- package/dist/{plugins-cli-BaQt7jqk.js → plugins-cli-c-YfMlpn.js} +3 -3
- package/dist/{program-CbwFv75G.js → program-IXAxx4y-.js} +8 -8
- package/dist/{program-context-Ck-chzM_.js → program-context-lbXboD45.js} +18 -18
- package/dist/{prompt-select-styled-DJ5ONfKl.js → prompt-select-styled-C9ZBkTHU.js} +4 -4
- package/dist/{prompt-select-styled-DigZiJWM.js → prompt-select-styled-D1foahBO.js} +4 -4
- package/dist/{provider-auth-helpers-DGTDTeE5.js → provider-auth-helpers-CKJG35W4.js} +1 -1
- package/dist/{provider-auth-helpers-Ci_EGvif.js → provider-auth-helpers-Q2ZCYpBX.js} +1 -1
- package/dist/{push-apns-Dz4hOY07.js → push-apns-DM5pSWEU.js} +1 -1
- package/dist/{push-apns-BSYjGCn9.js → push-apns-DbZAasNF.js} +1 -1
- package/dist/{pw-ai-CfYaR1K2.js → pw-ai-CowTfhOG.js} +1 -1
- package/dist/{register.agent-CTPc2Q9m.js → register.agent-BObt1WS1.js} +8 -8
- package/dist/{register.agent-BZh3UWw3.js → register.agent-CMgUOruT.js} +9 -9
- package/dist/{register.configure-vVDARCph.js → register.configure-B3lElmGa.js} +8 -8
- package/dist/{register.configure-BzTxX7SG.js → register.configure-BSoAZhfz.js} +8 -8
- package/dist/{register.maintenance-DTXn32on.js → register.maintenance-0PNfXeOc.js} +8 -8
- package/dist/{register.maintenance-BNHEV-po.js → register.maintenance-mxkecZ9A.js} +9 -9
- package/dist/{register.message-BYWAEsKP.js → register.message-D7VHunA0.js} +3 -3
- package/dist/{register.message-CHf51taw.js → register.message-Dr4UBjNt.js} +3 -3
- package/dist/{register.onboard-CxwDhXRS.js → register.onboard-BvDwJMC5.js} +2 -2
- package/dist/{register.onboard-vruDRZdG.js → register.onboard-Xh9xW0hH.js} +2 -2
- package/dist/{register.orchestrator-anton-qBr2ZYrk.js → register.orchestrator-anton-CObXxmuY.js} +2 -2
- package/dist/{register.orchestrator-anton-GSAFxzGa.js → register.orchestrator-anton-DShH4ce_.js} +2 -2
- package/dist/{register.setup-DlFQIXoR.js → register.setup-BxsKZdfB.js} +2 -2
- package/dist/{register.setup-B0zmlTXV.js → register.setup-d2XyhTY9.js} +2 -2
- package/dist/{register.status-health-sessions-16paRP9f.js → register.status-health-sessions-CADZZQMe.js} +4 -4
- package/dist/{register.status-health-sessions-CtXhn9Dq.js → register.status-health-sessions-wyNUhSbK.js} +4 -4
- package/dist/{register.subclis-lskGgus9.js → register.subclis-Bh3Lakik.js} +9 -9
- package/dist/{reply-DfRr_KdS.js → reply-AI4n5V-o.js} +11 -11
- package/dist/{run-main-Bj-8MZGb.js → run-main-DNLZvSB0.js} +15 -15
- package/dist/{runner-PgRFPYUj.js → runner-BzNdfqDz.js} +1 -1
- package/dist/{server-node-events-Benu2lR2.js → server-node-events-B9rufyZR.js} +3 -3
- package/dist/{server-node-events-B_LUFrA_.js → server-node-events-DPeIs1oo.js} +3 -3
- package/dist/{status-DxcdgCyX.js → status-CvtDDIW9.js} +2 -2
- package/dist/{status-DzCllHYZ.js → status-rvywYmZR.js} +2 -2
- package/dist/{subagent-registry-BcpHnckA.js → subagent-registry-D7Dwl-dH.js} +11 -11
- package/dist/{update-cli-B53rJqAV.js → update-cli-Bofvelva.js} +8 -8
- package/dist/{update-cli-CTETjvrF.js → update-cli-DaGTiqso.js} +9 -9
- package/dist/{update-runner-BGAdvd0c.js → update-runner-4txNUERu.js} +1 -1
- package/dist/{update-runner-BOGIWX18.js → update-runner-B9mGXrK4.js} +1 -1
- package/dist/{web-C7HXffph.js → web-BsIp9miY.js} +3 -3
- package/dist/{web-CqOVupWI.js → web-D3gEaA39.js} +3 -3
- package/dist/{web-3nv8mK11.js → web-DhiwmDh8.js} +3 -3
- package/dist/{web-Dwj9igbL.js → web-JPsGpVZ5.js} +8 -8
- package/package.json +1 -1
|
@@ -26,28 +26,53 @@ async function writeState(state) {
|
|
|
26
26
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
27
27
|
}, null, 2)}\n`, "utf8");
|
|
28
28
|
}
|
|
29
|
+
async function isAntonLockPid(pid) {
|
|
30
|
+
try {
|
|
31
|
+
const { stdout } = await execFile$1("ps", [
|
|
32
|
+
"-p",
|
|
33
|
+
String(pid),
|
|
34
|
+
"-o",
|
|
35
|
+
"args="
|
|
36
|
+
], { encoding: "utf8" });
|
|
37
|
+
const cmd = stdout.trim().toLowerCase();
|
|
38
|
+
return cmd.includes(" anton") || cmd.endsWith("anton") || cmd.includes(" node ") && cmd.includes("anton");
|
|
39
|
+
} catch {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
29
43
|
async function acquireLock(force = false) {
|
|
30
44
|
await ensureStateDir();
|
|
45
|
+
const payload = JSON.stringify({
|
|
46
|
+
pid: process.pid,
|
|
47
|
+
startedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
48
|
+
});
|
|
31
49
|
try {
|
|
32
|
-
await fs.writeFile(ANTON_LOCK_PATH,
|
|
33
|
-
pid: process.pid,
|
|
34
|
-
startedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
35
|
-
}), {
|
|
50
|
+
await fs.writeFile(ANTON_LOCK_PATH, payload, {
|
|
36
51
|
encoding: "utf8",
|
|
37
52
|
flag: "wx"
|
|
38
53
|
});
|
|
54
|
+
return;
|
|
55
|
+
} catch {}
|
|
56
|
+
let staleOrInvalid = false;
|
|
57
|
+
try {
|
|
58
|
+
const raw = await fs.readFile(ANTON_LOCK_PATH, "utf8");
|
|
59
|
+
const parsed = JSON.parse(raw);
|
|
60
|
+
const pid = Number(parsed?.pid);
|
|
61
|
+
if (!Number.isFinite(pid) || pid <= 0) staleOrInvalid = true;
|
|
62
|
+
else staleOrInvalid = !await isAntonLockPid(pid);
|
|
39
63
|
} catch {
|
|
40
|
-
|
|
41
|
-
await fs.rm(ANTON_LOCK_PATH, { force: true });
|
|
42
|
-
await fs.writeFile(ANTON_LOCK_PATH, JSON.stringify({
|
|
43
|
-
pid: process.pid,
|
|
44
|
-
startedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
45
|
-
force: true
|
|
46
|
-
}), {
|
|
47
|
-
encoding: "utf8",
|
|
48
|
-
flag: "wx"
|
|
49
|
-
});
|
|
64
|
+
staleOrInvalid = true;
|
|
50
65
|
}
|
|
66
|
+
if (!force && !staleOrInvalid) throw new Error("Anton is already running (lock held)");
|
|
67
|
+
await fs.rm(ANTON_LOCK_PATH, { force: true });
|
|
68
|
+
await fs.writeFile(ANTON_LOCK_PATH, JSON.stringify({
|
|
69
|
+
pid: process.pid,
|
|
70
|
+
startedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
71
|
+
force: force || staleOrInvalid
|
|
72
|
+
}), {
|
|
73
|
+
encoding: "utf8",
|
|
74
|
+
flag: "wx"
|
|
75
|
+
});
|
|
51
76
|
}
|
|
52
77
|
async function releaseLock() {
|
|
53
78
|
await fs.rm(ANTON_LOCK_PATH, { force: true });
|
|
@@ -80,6 +105,13 @@ function markTaskDone(markdown, lineNo) {
|
|
|
80
105
|
function isJsonTaskFile(taskFile) {
|
|
81
106
|
return taskFile.toLowerCase().endsWith(".json");
|
|
82
107
|
}
|
|
108
|
+
function isJsonTaskComplete(obj) {
|
|
109
|
+
if (obj.done === true) return true;
|
|
110
|
+
const status = typeof obj.status === "string" ? obj.status.trim().toLowerCase() : "";
|
|
111
|
+
if (status === "complete" || status === "completed" || status === "done") return true;
|
|
112
|
+
if (status === "incomplete" || status === "pending" || status === "todo" || status === "open") return false;
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
83
115
|
function parsePendingTasksFromJson(jsonText) {
|
|
84
116
|
const data = JSON.parse(jsonText);
|
|
85
117
|
const pending = [];
|
|
@@ -90,7 +122,7 @@ function parsePendingTasksFromJson(jsonText) {
|
|
|
90
122
|
for (const sub of subtasks) {
|
|
91
123
|
if (!sub || typeof sub !== "object") continue;
|
|
92
124
|
const subObj = sub;
|
|
93
|
-
if (subObj
|
|
125
|
+
if (isJsonTaskComplete(subObj)) continue;
|
|
94
126
|
const name = typeof subObj.name === "string" ? subObj.name.trim() : "";
|
|
95
127
|
if (!name) continue;
|
|
96
128
|
const subDetails = typeof subObj.details === "string" ? subObj.details.trim() : "";
|
|
@@ -100,7 +132,7 @@ function parsePendingTasksFromJson(jsonText) {
|
|
|
100
132
|
return details.length > 0 ? details.join("\n\n") : void 0;
|
|
101
133
|
};
|
|
102
134
|
const pushTask = (jsonPath, obj) => {
|
|
103
|
-
if (obj
|
|
135
|
+
if (isJsonTaskComplete(obj)) return;
|
|
104
136
|
const text = typeof obj.name === "string" ? obj.name.trim() : "";
|
|
105
137
|
if (!text) return;
|
|
106
138
|
const subtasks = Array.isArray(obj.subtasks) ? obj.subtasks : [];
|
|
@@ -139,6 +171,7 @@ function markJsonTaskDone(data, jsonPath) {
|
|
|
139
171
|
}
|
|
140
172
|
if (!cur || typeof cur !== "object" || Array.isArray(cur)) return;
|
|
141
173
|
cur.done = true;
|
|
174
|
+
cur.status = "complete";
|
|
142
175
|
}
|
|
143
176
|
function formatTaskForPrompt(task) {
|
|
144
177
|
if (task.details) return `${task.text}
|
|
@@ -362,7 +395,7 @@ async function loadAntonConfig() {
|
|
|
362
395
|
}
|
|
363
396
|
}
|
|
364
397
|
async function runAgentTask(args) {
|
|
365
|
-
const { agentCliCommand } = await import("./agent-via-gateway-
|
|
398
|
+
const { agentCliCommand } = await import("./agent-via-gateway-CW7FhqaW.js");
|
|
366
399
|
const extraSystemPrompt = args.workspaceDir ? `Your working directory is: ${args.workspaceDir}\nAll file paths are relative to this directory. Use this as your cwd for all operations.` : void 0;
|
|
367
400
|
const result = await agentCliCommand({
|
|
368
401
|
message: args.message,
|
|
@@ -425,6 +458,29 @@ async function getGitChangedFileCount(cwd, ignorePaths = []) {
|
|
|
425
458
|
return null;
|
|
426
459
|
}
|
|
427
460
|
}
|
|
461
|
+
async function getGitHeadCommit(cwd) {
|
|
462
|
+
try {
|
|
463
|
+
const { stdout } = await execFile$1("git", ["rev-parse", "HEAD"], { cwd });
|
|
464
|
+
const sha = stdout.trim();
|
|
465
|
+
return sha.length > 0 ? sha : null;
|
|
466
|
+
} catch {
|
|
467
|
+
return null;
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
async function getGitReflogTop(cwd) {
|
|
471
|
+
try {
|
|
472
|
+
const { stdout } = await execFile$1("git", [
|
|
473
|
+
"reflog",
|
|
474
|
+
"-n",
|
|
475
|
+
"1",
|
|
476
|
+
"--format=%H:%gs"
|
|
477
|
+
], { cwd });
|
|
478
|
+
const value = stdout.trim();
|
|
479
|
+
return value.length > 0 ? value : null;
|
|
480
|
+
} catch {
|
|
481
|
+
return null;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
428
484
|
function extractJsonObject(text) {
|
|
429
485
|
const trimmed = text.trim();
|
|
430
486
|
if (!trimmed) return null;
|
|
@@ -720,11 +776,15 @@ async function runAnton(args) {
|
|
|
720
776
|
const raw = await fs.readFile(filePath, "utf8");
|
|
721
777
|
let pending = [];
|
|
722
778
|
let jsonData;
|
|
723
|
-
if (isJsonTaskFile(filePath)) {
|
|
779
|
+
if (isJsonTaskFile(filePath)) try {
|
|
724
780
|
const parsed = parsePendingTasksFromJson(raw);
|
|
725
781
|
pending = parsed.pending;
|
|
726
782
|
jsonData = parsed.data;
|
|
727
|
-
}
|
|
783
|
+
} catch (err) {
|
|
784
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
785
|
+
throw new Error(`Invalid JSON task file: ${filePath} (${msg})`, { cause: err });
|
|
786
|
+
}
|
|
787
|
+
else pending = parsePendingTasks(raw);
|
|
728
788
|
const notify = args.onProgress ?? (async () => {});
|
|
729
789
|
if (args.dryRun) {
|
|
730
790
|
args.runtime.log(`Dry run: ${pending.length} pending task(s)`);
|
|
@@ -818,6 +878,8 @@ async function runAnton(args) {
|
|
|
818
878
|
const gitCwdForBaseline = args.workspaceDir ? path.resolve(args.workspaceDir) : path.dirname(filePath);
|
|
819
879
|
const taskFileRelForBaseline = path.relative(gitCwdForBaseline, filePath).replace(/\\/g, "/");
|
|
820
880
|
const changedBeforeTask = await getGitChangedFileCount(gitCwdForBaseline, taskFileRelForBaseline.startsWith("..") ? [] : [taskFileRelForBaseline]);
|
|
881
|
+
const headBeforeTask = await getGitHeadCommit(gitCwdForBaseline);
|
|
882
|
+
const reflogBeforeTask = await getGitReflogTop(gitCwdForBaseline);
|
|
821
883
|
if (mode === "preflight") {
|
|
822
884
|
await hardCleanRepo(repoCwd);
|
|
823
885
|
await ensureRepoCleanOrThrow(repoCwd);
|
|
@@ -913,8 +975,10 @@ async function runAnton(args) {
|
|
|
913
975
|
workspaceDir: args.workspaceDir
|
|
914
976
|
});
|
|
915
977
|
let changedAfter = await getGitChangedFileCount(gitCwd, changeIgnores);
|
|
916
|
-
|
|
917
|
-
|
|
978
|
+
let headAfterTask = await getGitHeadCommit(gitCwd);
|
|
979
|
+
let reflogAfterTask = await getGitReflogTop(gitCwd);
|
|
980
|
+
if (mode === "direct" && changedBeforeTask !== null && changedAfter !== null && changedAfter <= changedBeforeTask && headBeforeTask !== null && headAfterTask === headBeforeTask && reflogBeforeTask !== null && reflogAfterTask === reflogBeforeTask && !allowNoChanges) throw new Error("Implementation made no repository changes; refusing to mark task complete");
|
|
981
|
+
if (mode === "preflight" && changedBeforeTask !== null && changedAfter !== null && changedAfter <= changedBeforeTask && headBeforeTask !== null && headAfterTask === headBeforeTask && reflogBeforeTask !== null && reflogAfterTask === reflogBeforeTask) {
|
|
918
982
|
if (!allowNoChanges) {
|
|
919
983
|
const retrySessionId = `anton-impl-retry-${Date.now()}-${taskNum}`;
|
|
920
984
|
await notify({
|
|
@@ -937,7 +1001,9 @@ async function runAnton(args) {
|
|
|
937
1001
|
workspaceDir: args.workspaceDir
|
|
938
1002
|
});
|
|
939
1003
|
changedAfter = await getGitChangedFileCount(gitCwd, changeIgnores);
|
|
940
|
-
|
|
1004
|
+
headAfterTask = await getGitHeadCommit(gitCwd);
|
|
1005
|
+
reflogAfterTask = await getGitReflogTop(gitCwd);
|
|
1006
|
+
if (changedAfter !== null && changedAfter <= changedBeforeTask && headBeforeTask !== null && headAfterTask === headBeforeTask && reflogBeforeTask !== null && reflogAfterTask === reflogBeforeTask) throw new Error("Implementation made no repository changes after retry; refusing to mark task complete");
|
|
941
1007
|
}
|
|
942
1008
|
}
|
|
943
1009
|
const latest = await fs.readFile(filePath, "utf8");
|
|
@@ -33,28 +33,53 @@ async function writeState(state) {
|
|
|
33
33
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
34
34
|
}, null, 2)}\n`, "utf8");
|
|
35
35
|
}
|
|
36
|
+
async function isAntonLockPid(pid) {
|
|
37
|
+
try {
|
|
38
|
+
const { stdout } = await execFile$1("ps", [
|
|
39
|
+
"-p",
|
|
40
|
+
String(pid),
|
|
41
|
+
"-o",
|
|
42
|
+
"args="
|
|
43
|
+
], { encoding: "utf8" });
|
|
44
|
+
const cmd = stdout.trim().toLowerCase();
|
|
45
|
+
return cmd.includes(" anton") || cmd.endsWith("anton") || cmd.includes(" node ") && cmd.includes("anton");
|
|
46
|
+
} catch {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
36
50
|
async function acquireLock(force = false) {
|
|
37
51
|
await ensureStateDir();
|
|
52
|
+
const payload = JSON.stringify({
|
|
53
|
+
pid: process.pid,
|
|
54
|
+
startedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
55
|
+
});
|
|
38
56
|
try {
|
|
39
|
-
await fs.writeFile(ANTON_LOCK_PATH,
|
|
40
|
-
pid: process.pid,
|
|
41
|
-
startedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
42
|
-
}), {
|
|
57
|
+
await fs.writeFile(ANTON_LOCK_PATH, payload, {
|
|
43
58
|
encoding: "utf8",
|
|
44
59
|
flag: "wx"
|
|
45
60
|
});
|
|
61
|
+
return;
|
|
62
|
+
} catch {}
|
|
63
|
+
let staleOrInvalid = false;
|
|
64
|
+
try {
|
|
65
|
+
const raw = await fs.readFile(ANTON_LOCK_PATH, "utf8");
|
|
66
|
+
const parsed = JSON.parse(raw);
|
|
67
|
+
const pid = Number(parsed?.pid);
|
|
68
|
+
if (!Number.isFinite(pid) || pid <= 0) staleOrInvalid = true;
|
|
69
|
+
else staleOrInvalid = !await isAntonLockPid(pid);
|
|
46
70
|
} catch {
|
|
47
|
-
|
|
48
|
-
await fs.rm(ANTON_LOCK_PATH, { force: true });
|
|
49
|
-
await fs.writeFile(ANTON_LOCK_PATH, JSON.stringify({
|
|
50
|
-
pid: process.pid,
|
|
51
|
-
startedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
52
|
-
force: true
|
|
53
|
-
}), {
|
|
54
|
-
encoding: "utf8",
|
|
55
|
-
flag: "wx"
|
|
56
|
-
});
|
|
71
|
+
staleOrInvalid = true;
|
|
57
72
|
}
|
|
73
|
+
if (!force && !staleOrInvalid) throw new Error("Anton is already running (lock held)");
|
|
74
|
+
await fs.rm(ANTON_LOCK_PATH, { force: true });
|
|
75
|
+
await fs.writeFile(ANTON_LOCK_PATH, JSON.stringify({
|
|
76
|
+
pid: process.pid,
|
|
77
|
+
startedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
78
|
+
force: force || staleOrInvalid
|
|
79
|
+
}), {
|
|
80
|
+
encoding: "utf8",
|
|
81
|
+
flag: "wx"
|
|
82
|
+
});
|
|
58
83
|
}
|
|
59
84
|
async function releaseLock() {
|
|
60
85
|
await fs.rm(ANTON_LOCK_PATH, { force: true });
|
|
@@ -87,6 +112,13 @@ function markTaskDone(markdown, lineNo) {
|
|
|
87
112
|
function isJsonTaskFile(taskFile) {
|
|
88
113
|
return taskFile.toLowerCase().endsWith(".json");
|
|
89
114
|
}
|
|
115
|
+
function isJsonTaskComplete(obj) {
|
|
116
|
+
if (obj.done === true) return true;
|
|
117
|
+
const status = typeof obj.status === "string" ? obj.status.trim().toLowerCase() : "";
|
|
118
|
+
if (status === "complete" || status === "completed" || status === "done") return true;
|
|
119
|
+
if (status === "incomplete" || status === "pending" || status === "todo" || status === "open") return false;
|
|
120
|
+
return false;
|
|
121
|
+
}
|
|
90
122
|
function parsePendingTasksFromJson(jsonText) {
|
|
91
123
|
const data = JSON.parse(jsonText);
|
|
92
124
|
const pending = [];
|
|
@@ -97,7 +129,7 @@ function parsePendingTasksFromJson(jsonText) {
|
|
|
97
129
|
for (const sub of subtasks) {
|
|
98
130
|
if (!sub || typeof sub !== "object") continue;
|
|
99
131
|
const subObj = sub;
|
|
100
|
-
if (subObj
|
|
132
|
+
if (isJsonTaskComplete(subObj)) continue;
|
|
101
133
|
const name = typeof subObj.name === "string" ? subObj.name.trim() : "";
|
|
102
134
|
if (!name) continue;
|
|
103
135
|
const subDetails = typeof subObj.details === "string" ? subObj.details.trim() : "";
|
|
@@ -107,7 +139,7 @@ function parsePendingTasksFromJson(jsonText) {
|
|
|
107
139
|
return details.length > 0 ? details.join("\n\n") : void 0;
|
|
108
140
|
};
|
|
109
141
|
const pushTask = (jsonPath, obj) => {
|
|
110
|
-
if (obj
|
|
142
|
+
if (isJsonTaskComplete(obj)) return;
|
|
111
143
|
const text = typeof obj.name === "string" ? obj.name.trim() : "";
|
|
112
144
|
if (!text) return;
|
|
113
145
|
const subtasks = Array.isArray(obj.subtasks) ? obj.subtasks : [];
|
|
@@ -146,6 +178,7 @@ function markJsonTaskDone(data, jsonPath) {
|
|
|
146
178
|
}
|
|
147
179
|
if (!cur || typeof cur !== "object" || Array.isArray(cur)) return;
|
|
148
180
|
cur.done = true;
|
|
181
|
+
cur.status = "complete";
|
|
149
182
|
}
|
|
150
183
|
function formatTaskForPrompt(task) {
|
|
151
184
|
if (task.details) return `${task.text}
|
|
@@ -369,7 +402,7 @@ async function loadAntonConfig() {
|
|
|
369
402
|
}
|
|
370
403
|
}
|
|
371
404
|
async function runAgentTask(args) {
|
|
372
|
-
const { agentCliCommand } = await import("./agent-via-gateway-
|
|
405
|
+
const { agentCliCommand } = await import("./agent-via-gateway-D8QBXTZL.js").then((n) => n.n);
|
|
373
406
|
const extraSystemPrompt = args.workspaceDir ? `Your working directory is: ${args.workspaceDir}\nAll file paths are relative to this directory. Use this as your cwd for all operations.` : void 0;
|
|
374
407
|
const result = await agentCliCommand({
|
|
375
408
|
message: args.message,
|
|
@@ -432,6 +465,29 @@ async function getGitChangedFileCount(cwd, ignorePaths = []) {
|
|
|
432
465
|
return null;
|
|
433
466
|
}
|
|
434
467
|
}
|
|
468
|
+
async function getGitHeadCommit(cwd) {
|
|
469
|
+
try {
|
|
470
|
+
const { stdout } = await execFile$1("git", ["rev-parse", "HEAD"], { cwd });
|
|
471
|
+
const sha = stdout.trim();
|
|
472
|
+
return sha.length > 0 ? sha : null;
|
|
473
|
+
} catch {
|
|
474
|
+
return null;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
async function getGitReflogTop(cwd) {
|
|
478
|
+
try {
|
|
479
|
+
const { stdout } = await execFile$1("git", [
|
|
480
|
+
"reflog",
|
|
481
|
+
"-n",
|
|
482
|
+
"1",
|
|
483
|
+
"--format=%H:%gs"
|
|
484
|
+
], { cwd });
|
|
485
|
+
const value = stdout.trim();
|
|
486
|
+
return value.length > 0 ? value : null;
|
|
487
|
+
} catch {
|
|
488
|
+
return null;
|
|
489
|
+
}
|
|
490
|
+
}
|
|
435
491
|
function extractJsonObject(text) {
|
|
436
492
|
const trimmed = text.trim();
|
|
437
493
|
if (!trimmed) return null;
|
|
@@ -727,11 +783,15 @@ async function runAnton(args) {
|
|
|
727
783
|
const raw = await fs.readFile(filePath, "utf8");
|
|
728
784
|
let pending = [];
|
|
729
785
|
let jsonData;
|
|
730
|
-
if (isJsonTaskFile(filePath)) {
|
|
786
|
+
if (isJsonTaskFile(filePath)) try {
|
|
731
787
|
const parsed = parsePendingTasksFromJson(raw);
|
|
732
788
|
pending = parsed.pending;
|
|
733
789
|
jsonData = parsed.data;
|
|
734
|
-
}
|
|
790
|
+
} catch (err) {
|
|
791
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
792
|
+
throw new Error(`Invalid JSON task file: ${filePath} (${msg})`, { cause: err });
|
|
793
|
+
}
|
|
794
|
+
else pending = parsePendingTasks(raw);
|
|
735
795
|
const notify = args.onProgress ?? (async () => {});
|
|
736
796
|
if (args.dryRun) {
|
|
737
797
|
args.runtime.log(`Dry run: ${pending.length} pending task(s)`);
|
|
@@ -825,6 +885,8 @@ async function runAnton(args) {
|
|
|
825
885
|
const gitCwdForBaseline = args.workspaceDir ? path.resolve(args.workspaceDir) : path.dirname(filePath);
|
|
826
886
|
const taskFileRelForBaseline = path.relative(gitCwdForBaseline, filePath).replace(/\\/g, "/");
|
|
827
887
|
const changedBeforeTask = await getGitChangedFileCount(gitCwdForBaseline, taskFileRelForBaseline.startsWith("..") ? [] : [taskFileRelForBaseline]);
|
|
888
|
+
const headBeforeTask = await getGitHeadCommit(gitCwdForBaseline);
|
|
889
|
+
const reflogBeforeTask = await getGitReflogTop(gitCwdForBaseline);
|
|
828
890
|
if (mode === "preflight") {
|
|
829
891
|
await hardCleanRepo(repoCwd);
|
|
830
892
|
await ensureRepoCleanOrThrow(repoCwd);
|
|
@@ -920,8 +982,10 @@ async function runAnton(args) {
|
|
|
920
982
|
workspaceDir: args.workspaceDir
|
|
921
983
|
});
|
|
922
984
|
let changedAfter = await getGitChangedFileCount(gitCwd, changeIgnores);
|
|
923
|
-
|
|
924
|
-
|
|
985
|
+
let headAfterTask = await getGitHeadCommit(gitCwd);
|
|
986
|
+
let reflogAfterTask = await getGitReflogTop(gitCwd);
|
|
987
|
+
if (mode === "direct" && changedBeforeTask !== null && changedAfter !== null && changedAfter <= changedBeforeTask && headBeforeTask !== null && headAfterTask === headBeforeTask && reflogBeforeTask !== null && reflogAfterTask === reflogBeforeTask && !allowNoChanges) throw new Error("Implementation made no repository changes; refusing to mark task complete");
|
|
988
|
+
if (mode === "preflight" && changedBeforeTask !== null && changedAfter !== null && changedAfter <= changedBeforeTask && headBeforeTask !== null && headAfterTask === headBeforeTask && reflogBeforeTask !== null && reflogAfterTask === reflogBeforeTask) {
|
|
925
989
|
if (!allowNoChanges) {
|
|
926
990
|
const retrySessionId = `anton-impl-retry-${Date.now()}-${taskNum}`;
|
|
927
991
|
await notify({
|
|
@@ -944,7 +1008,9 @@ async function runAnton(args) {
|
|
|
944
1008
|
workspaceDir: args.workspaceDir
|
|
945
1009
|
});
|
|
946
1010
|
changedAfter = await getGitChangedFileCount(gitCwd, changeIgnores);
|
|
947
|
-
|
|
1011
|
+
headAfterTask = await getGitHeadCommit(gitCwd);
|
|
1012
|
+
reflogAfterTask = await getGitReflogTop(gitCwd);
|
|
1013
|
+
if (changedAfter !== null && changedAfter <= changedBeforeTask && headBeforeTask !== null && headAfterTask === headBeforeTask && reflogBeforeTask !== null && reflogAfterTask === reflogBeforeTask) throw new Error("Implementation made no repository changes after retry; refusing to mark task complete");
|
|
948
1014
|
}
|
|
949
1015
|
}
|
|
950
1016
|
const latest = await fs.readFile(filePath, "utf8");
|
|
@@ -17,8 +17,8 @@ import "./accounts-BDVs8LTu.js";
|
|
|
17
17
|
import "./image-ops-D1KtygWz.js";
|
|
18
18
|
import "./pi-model-discovery-Bb__OY-j.js";
|
|
19
19
|
import "./message-channel-C8QtrwEU.js";
|
|
20
|
-
import "./pi-embedded-helpers-
|
|
21
|
-
import "./chrome-
|
|
20
|
+
import "./pi-embedded-helpers-CyTpDKo5.js";
|
|
21
|
+
import "./chrome-_2tzVjVl.js";
|
|
22
22
|
import "./ssrf-CZeHDwVZ.js";
|
|
23
23
|
import "./frontmatter-BOudmHMS.js";
|
|
24
24
|
import "./skills-CnAPWfca.js";
|
|
@@ -32,11 +32,11 @@ import "./accounts-CIvVRRHb.js";
|
|
|
32
32
|
import "./paths-D_qUel1T.js";
|
|
33
33
|
import "./tool-images-CcGZpzmq.js";
|
|
34
34
|
import "./thinking-z4_linel.js";
|
|
35
|
-
import "./image-
|
|
35
|
+
import "./image-COw__ACq.js";
|
|
36
36
|
import "./gemini-auth-CIyaa44H.js";
|
|
37
37
|
import "./fetch-guard-iuQsIjqN.js";
|
|
38
38
|
import "./local-roots-KN4Hp1yZ.js";
|
|
39
|
-
import { a as resolveMediaAttachmentLocalRoots, n as createMediaAttachmentCache, o as runCapability, r as normalizeMediaAttachments, t as buildProviderRegistry, u as isAudioAttachment } from "./runner-
|
|
39
|
+
import { a as resolveMediaAttachmentLocalRoots, n as createMediaAttachmentCache, o as runCapability, r as normalizeMediaAttachments, t as buildProviderRegistry, u as isAudioAttachment } from "./runner-BzNdfqDz.js";
|
|
40
40
|
|
|
41
41
|
//#region src/media-understanding/audio-preflight.ts
|
|
42
42
|
/**
|
|
@@ -6,7 +6,7 @@ import { n as loadModelCatalog } from "./model-catalog-D9no0CH2.js";
|
|
|
6
6
|
import { f as openUrl } from "./onboard-helpers-mzy38DiC.js";
|
|
7
7
|
import { t as enablePluginInConfig } from "./enable-o_s6PBsC.js";
|
|
8
8
|
import { $ as ZAI_DEFAULT_MODEL_REF, A as applyTogetherConfig, B as applyLitellmConfig, C as applyMoonshotProviderConfigCn, Ct as writeOAuthCredentials, D as applyQianfanProviderConfig, Dt as QIANFAN_DEFAULT_MODEL_REF, E as applyQianfanConfig, Et as MOONSHOT_DEFAULT_MODEL_REF, F as applyXaiProviderConfig, G as applyVercelAiGatewayProviderConfig, H as applyCloudflareAiGatewayConfig, I as applyXiaomiConfig, J as LITELLM_DEFAULT_MODEL_REF, K as applyAgentDefaultModelPrimary, L as applyXiaomiProviderConfig, M as applyVeniceConfig, N as applyVeniceProviderConfig, O as applySyntheticConfig, Ot as XAI_DEFAULT_MODEL_REF, P as applyXaiConfig, Q as XIAOMI_DEFAULT_MODEL_REF, R as applyZaiConfig, S as applyMoonshotProviderConfig, St as setZaiApiKey, T as applyOpenrouterProviderConfig, Tt as MISTRAL_DEFAULT_MODEL_REF, U as applyCloudflareAiGatewayProviderConfig, V as applyLitellmProviderConfig, W as applyVercelAiGatewayConfig, X as TOGETHER_DEFAULT_MODEL_REF, Y as OPENROUTER_DEFAULT_MODEL_REF, Z as VERCEL_AI_GATEWAY_DEFAULT_MODEL_REF, _ as applyKimiCodeProviderConfig, _t as setVeniceApiKey, a as applyMinimaxApiConfig, at as setKilocodeApiKey, b as applyMoonshotConfig, bt as setXaiApiKey, c as applyMinimaxApiProviderConfigCn, ct as setMinimaxApiKey, d as applyAuthProfileConfig, dt as setOpenaiApiKey, et as setAnthropicApiKey, ft as setOpencodeZenApiKey, g as applyKimiCodeConfig, gt as setTogetherApiKey, h as applyKilocodeProviderConfig, ht as setSyntheticApiKey, i as applyOpencodeZenProviderConfig, it as setHuggingfaceApiKey, j as applyTogetherProviderConfig, k as applySyntheticProviderConfig, l as applyMinimaxConfig, lt as setMistralApiKey, m as applyKilocodeConfig, mt as setQianfanApiKey, n as validateAnthropicSetupToken, nt as setCloudflareAiGatewayConfig, o as applyMinimaxApiConfigCn, ot as setKimiCodingApiKey, p as applyHuggingfaceProviderConfig, pt as setOpenrouterApiKey, q as HUGGINGFACE_DEFAULT_MODEL_REF, r as applyOpencodeZenConfig, rt as setGeminiApiKey, s as applyMinimaxApiProviderConfig, st as setLitellmApiKey, t as buildTokenProfileId, tt as setByteplusApiKey, u as applyMinimaxProviderConfig, ut as setMoonshotApiKey, v as applyMistralConfig, vt as setVercelAiGatewayApiKey, w as applyOpenrouterConfig, wt as KIMI_CODING_MODEL_REF, x as applyMoonshotConfigCn, xt as setXiaomiApiKey, y as applyMistralProviderConfig, yt as setVolcengineApiKey, z as applyZaiProviderConfig } from "./auth-token-BJq87X3o.js";
|
|
9
|
-
import { a as createVpsAwareOAuthHandlers, c as githubCopilotLoginCommand, i as resolveProviderMatch, n as mergeConfigPatch, o as isRemoteEnvironment, r as pickAuthMethod, s as resolvePluginProviders, t as applyDefaultModel } from "./provider-auth-helpers-
|
|
9
|
+
import { a as createVpsAwareOAuthHandlers, c as githubCopilotLoginCommand, i as resolveProviderMatch, n as mergeConfigPatch, o as isRemoteEnvironment, r as pickAuthMethod, s as resolvePluginProviders, t as applyDefaultModel } from "./provider-auth-helpers-Q2ZCYpBX.js";
|
|
10
10
|
import { a as ensureApiKeyFromOptionEnvOrPrompt, c as applyDefaultModelChoice, d as validateApiKeyInput, l as ensureModelAllowlistEntry, n as createAuthChoiceDefaultModelApplier, o as normalizeSecretInputModeInput, r as createAuthChoiceModelStateBridge, s as normalizeTokenProviderInput, t as createAuthChoiceAgentModelNoter, u as normalizeApiKeyInput } from "./auth-choice.apply-helpers-CGcniL1T.js";
|
|
11
11
|
import { a as GOOGLE_GEMINI_DEFAULT_MODEL, i as detectZaiEndpoint, n as applyOpenAIConfig, o as applyGoogleGeminiModelDefault, r as applyOpenAIProviderConfig, t as OPENAI_DEFAULT_MODEL } from "./openai-model-default-7J6cw1rA.js";
|
|
12
12
|
import { c as OPENAI_CODEX_DEFAULT_MODEL, l as applyOpenAICodexModelDefault, r as applyPrimaryModel, s as promptAndConfigureVllm } from "./model-picker-BkXoTOiA.js";
|
|
@@ -6,7 +6,7 @@ import { n as loadModelCatalog } from "./model-catalog-DYWymzg_.js";
|
|
|
6
6
|
import { f as openUrl } from "./onboard-helpers-DWivfzcc.js";
|
|
7
7
|
import { t as enablePluginInConfig } from "./enable-CMXupNXl.js";
|
|
8
8
|
import { $ as ZAI_DEFAULT_MODEL_REF, A as applyTogetherConfig, B as applyLitellmConfig, C as applyMoonshotProviderConfigCn, Ct as writeOAuthCredentials, D as applyQianfanProviderConfig, Dt as QIANFAN_DEFAULT_MODEL_REF, E as applyQianfanConfig, Et as MOONSHOT_DEFAULT_MODEL_REF, F as applyXaiProviderConfig, G as applyVercelAiGatewayProviderConfig, H as applyCloudflareAiGatewayConfig, I as applyXiaomiConfig, J as LITELLM_DEFAULT_MODEL_REF, K as applyAgentDefaultModelPrimary, L as applyXiaomiProviderConfig, M as applyVeniceConfig, N as applyVeniceProviderConfig, O as applySyntheticConfig, Ot as XAI_DEFAULT_MODEL_REF, P as applyXaiConfig, Q as XIAOMI_DEFAULT_MODEL_REF, R as applyZaiConfig, S as applyMoonshotProviderConfig, St as setZaiApiKey, T as applyOpenrouterProviderConfig, Tt as MISTRAL_DEFAULT_MODEL_REF, U as applyCloudflareAiGatewayProviderConfig, V as applyLitellmProviderConfig, W as applyVercelAiGatewayConfig, X as TOGETHER_DEFAULT_MODEL_REF, Y as OPENROUTER_DEFAULT_MODEL_REF, Z as VERCEL_AI_GATEWAY_DEFAULT_MODEL_REF, _ as applyKimiCodeProviderConfig, _t as setVeniceApiKey, a as applyMinimaxApiConfig, at as setKilocodeApiKey, b as applyMoonshotConfig, bt as setXaiApiKey, c as applyMinimaxApiProviderConfigCn, ct as setMinimaxApiKey, d as applyAuthProfileConfig, dt as setOpenaiApiKey, et as setAnthropicApiKey, ft as setOpencodeZenApiKey, g as applyKimiCodeConfig, gt as setTogetherApiKey, h as applyKilocodeProviderConfig, ht as setSyntheticApiKey, i as applyOpencodeZenProviderConfig, it as setHuggingfaceApiKey, j as applyTogetherProviderConfig, k as applySyntheticProviderConfig, l as applyMinimaxConfig, lt as setMistralApiKey, m as applyKilocodeConfig, mt as setQianfanApiKey, n as validateAnthropicSetupToken, nt as setCloudflareAiGatewayConfig, o as applyMinimaxApiConfigCn, ot as setKimiCodingApiKey, p as applyHuggingfaceProviderConfig, pt as setOpenrouterApiKey, q as HUGGINGFACE_DEFAULT_MODEL_REF, r as applyOpencodeZenConfig, rt as setGeminiApiKey, s as applyMinimaxApiProviderConfig, st as setLitellmApiKey, t as buildTokenProfileId, tt as setByteplusApiKey, u as applyMinimaxProviderConfig, ut as setMoonshotApiKey, v as applyMistralConfig, vt as setVercelAiGatewayApiKey, w as applyOpenrouterConfig, wt as KIMI_CODING_MODEL_REF, x as applyMoonshotConfigCn, xt as setXiaomiApiKey, y as applyMistralProviderConfig, yt as setVolcengineApiKey, z as applyZaiProviderConfig } from "./auth-token-BQ_ECwH7.js";
|
|
9
|
-
import { a as createVpsAwareOAuthHandlers, c as githubCopilotLoginCommand, i as resolveProviderMatch, n as mergeConfigPatch, o as isRemoteEnvironment, r as pickAuthMethod, s as resolvePluginProviders, t as applyDefaultModel } from "./provider-auth-helpers-
|
|
9
|
+
import { a as createVpsAwareOAuthHandlers, c as githubCopilotLoginCommand, i as resolveProviderMatch, n as mergeConfigPatch, o as isRemoteEnvironment, r as pickAuthMethod, s as resolvePluginProviders, t as applyDefaultModel } from "./provider-auth-helpers-CKJG35W4.js";
|
|
10
10
|
import { a as ensureApiKeyFromOptionEnvOrPrompt, c as applyDefaultModelChoice, d as validateApiKeyInput, l as ensureModelAllowlistEntry, n as createAuthChoiceDefaultModelApplier, o as normalizeSecretInputModeInput, r as createAuthChoiceModelStateBridge, s as normalizeTokenProviderInput, t as createAuthChoiceAgentModelNoter, u as normalizeApiKeyInput } from "./auth-choice.apply-helpers-Bj-Y-Sar.js";
|
|
11
11
|
import { a as GOOGLE_GEMINI_DEFAULT_MODEL, i as detectZaiEndpoint, n as applyOpenAIConfig, o as applyGoogleGeminiModelDefault, r as applyOpenAIProviderConfig, t as OPENAI_DEFAULT_MODEL } from "./openai-model-default-DTIibBxa.js";
|
|
12
12
|
import { c as OPENAI_CODEX_DEFAULT_MODEL, l as applyOpenAICodexModelDefault, r as applyPrimaryModel, s as promptAndConfigureVllm } from "./model-picker-D_yngXMe.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { St as theme, g as visibleWidth, sn as hasRootVersionAlias, xt as isRich } from "./entry.js";
|
|
2
|
-
import { Tn as resolveCommitHash } from "./subagent-registry-
|
|
2
|
+
import { Tn as resolveCommitHash } from "./subagent-registry-D7Dwl-dH.js";
|
|
3
3
|
|
|
4
4
|
//#region src/cli/tagline.ts
|
|
5
5
|
const DEFAULT_TAGLINE = "All your chats, one IdleHands.";
|
package/dist/build-info.json
CHANGED
|
@@ -11,14 +11,14 @@ import "../../boolean-CE7i9tBR.js";
|
|
|
11
11
|
import "../../env-B5G1qwGc.js";
|
|
12
12
|
import "../../dock-BgOmHcbh.js";
|
|
13
13
|
import { n as SILENT_REPLY_TOKEN } from "../../tokens-BRLyURxW.js";
|
|
14
|
-
import { a as agentCommand } from "../../pi-embedded-
|
|
14
|
+
import { a as agentCommand } from "../../pi-embedded-CIJj8Clt.js";
|
|
15
15
|
import "../../plugins-CRB60mCJ.js";
|
|
16
16
|
import "../../accounts-Dk8mJIrQ.js";
|
|
17
17
|
import "../../bindings-D3b5Fmc9.js";
|
|
18
18
|
import "../../auth-store-DXT-l7fO.js";
|
|
19
19
|
import "../../send-BeIZJuy4.js";
|
|
20
20
|
import "../../send-DmLC7aEF.js";
|
|
21
|
-
import "../../deliver-
|
|
21
|
+
import "../../deliver-CVTXl0Cv.js";
|
|
22
22
|
import "../../diagnostic-4owMk4vH.js";
|
|
23
23
|
import "../../diagnostic-session-state-BGF2r-kt.js";
|
|
24
24
|
import "../../accounts-BDVs8LTu.js";
|
|
@@ -26,8 +26,8 @@ import "../../send-Dfa3sn6r.js";
|
|
|
26
26
|
import "../../image-ops-D1KtygWz.js";
|
|
27
27
|
import "../../pi-model-discovery-Bb__OY-j.js";
|
|
28
28
|
import "../../message-channel-C8QtrwEU.js";
|
|
29
|
-
import "../../pi-embedded-helpers-
|
|
30
|
-
import "../../chrome-
|
|
29
|
+
import "../../pi-embedded-helpers-CyTpDKo5.js";
|
|
30
|
+
import "../../chrome-_2tzVjVl.js";
|
|
31
31
|
import "../../ssrf-CZeHDwVZ.js";
|
|
32
32
|
import "../../frontmatter-BOudmHMS.js";
|
|
33
33
|
import "../../skills-CnAPWfca.js";
|
|
@@ -41,7 +41,7 @@ import "../../accounts-CIvVRRHb.js";
|
|
|
41
41
|
import { u as resolveStorePath } from "../../paths-D_qUel1T.js";
|
|
42
42
|
import "../../tool-images-CcGZpzmq.js";
|
|
43
43
|
import "../../thinking-z4_linel.js";
|
|
44
|
-
import "../../image-
|
|
44
|
+
import "../../image-COw__ACq.js";
|
|
45
45
|
import "../../reply-prefix-BUgeSN2R.js";
|
|
46
46
|
import "../../manager-BE_76jWB.js";
|
|
47
47
|
import "../../gemini-auth-CIyaa44H.js";
|
|
@@ -56,7 +56,7 @@ import "../../ir-B7IBoKLy.js";
|
|
|
56
56
|
import "../../render-MTSxc7LK.js";
|
|
57
57
|
import "../../commands-registry-j4vAzcF2.js";
|
|
58
58
|
import "../../skill-commands-Ck3flWX7.js";
|
|
59
|
-
import "../../runner-
|
|
59
|
+
import "../../runner-BzNdfqDz.js";
|
|
60
60
|
import "../../fetch-CsfR_943.js";
|
|
61
61
|
import "../../channel-activity-D_TMOGQ0.js";
|
|
62
62
|
import "../../tables-5k-zOZ-s.js";
|
|
@@ -66,7 +66,7 @@ import "../../send-D4bMycQu.js";
|
|
|
66
66
|
import "../../resolve-route-DuttYY7A.js";
|
|
67
67
|
import "../../proxy-CRB9oCP5.js";
|
|
68
68
|
import "../../replies-6_GxvQYe.js";
|
|
69
|
-
import { t as createDefaultDeps } from "../../deps-
|
|
69
|
+
import { t as createDefaultDeps } from "../../deps-k7zLO-No.js";
|
|
70
70
|
import fs from "node:fs/promises";
|
|
71
71
|
import path from "node:path";
|
|
72
72
|
import crypto from "node:crypto";
|
|
@@ -11,14 +11,14 @@ import "../../boolean-CE7i9tBR.js";
|
|
|
11
11
|
import "../../env-B5G1qwGc.js";
|
|
12
12
|
import "../../dock-BgOmHcbh.js";
|
|
13
13
|
import "../../tokens-BRLyURxW.js";
|
|
14
|
-
import "../../pi-embedded-
|
|
14
|
+
import "../../pi-embedded-CIJj8Clt.js";
|
|
15
15
|
import "../../plugins-CRB60mCJ.js";
|
|
16
16
|
import "../../accounts-Dk8mJIrQ.js";
|
|
17
17
|
import "../../bindings-D3b5Fmc9.js";
|
|
18
18
|
import "../../auth-store-DXT-l7fO.js";
|
|
19
19
|
import "../../send-BeIZJuy4.js";
|
|
20
20
|
import "../../send-DmLC7aEF.js";
|
|
21
|
-
import "../../deliver-
|
|
21
|
+
import "../../deliver-CVTXl0Cv.js";
|
|
22
22
|
import "../../diagnostic-4owMk4vH.js";
|
|
23
23
|
import "../../diagnostic-session-state-BGF2r-kt.js";
|
|
24
24
|
import "../../accounts-BDVs8LTu.js";
|
|
@@ -26,8 +26,8 @@ import "../../send-Dfa3sn6r.js";
|
|
|
26
26
|
import "../../image-ops-D1KtygWz.js";
|
|
27
27
|
import "../../pi-model-discovery-Bb__OY-j.js";
|
|
28
28
|
import "../../message-channel-C8QtrwEU.js";
|
|
29
|
-
import "../../pi-embedded-helpers-
|
|
30
|
-
import "../../chrome-
|
|
29
|
+
import "../../pi-embedded-helpers-CyTpDKo5.js";
|
|
30
|
+
import "../../chrome-_2tzVjVl.js";
|
|
31
31
|
import "../../ssrf-CZeHDwVZ.js";
|
|
32
32
|
import "../../frontmatter-BOudmHMS.js";
|
|
33
33
|
import "../../skills-CnAPWfca.js";
|
|
@@ -41,7 +41,7 @@ import "../../accounts-CIvVRRHb.js";
|
|
|
41
41
|
import "../../paths-D_qUel1T.js";
|
|
42
42
|
import "../../tool-images-CcGZpzmq.js";
|
|
43
43
|
import "../../thinking-z4_linel.js";
|
|
44
|
-
import "../../image-
|
|
44
|
+
import "../../image-COw__ACq.js";
|
|
45
45
|
import "../../reply-prefix-BUgeSN2R.js";
|
|
46
46
|
import "../../manager-BE_76jWB.js";
|
|
47
47
|
import "../../gemini-auth-CIyaa44H.js";
|
|
@@ -56,7 +56,7 @@ import "../../ir-B7IBoKLy.js";
|
|
|
56
56
|
import "../../render-MTSxc7LK.js";
|
|
57
57
|
import "../../commands-registry-j4vAzcF2.js";
|
|
58
58
|
import "../../skill-commands-Ck3flWX7.js";
|
|
59
|
-
import "../../runner-
|
|
59
|
+
import "../../runner-BzNdfqDz.js";
|
|
60
60
|
import "../../fetch-CsfR_943.js";
|
|
61
61
|
import "../../channel-activity-D_TMOGQ0.js";
|
|
62
62
|
import "../../tables-5k-zOZ-s.js";
|
|
@@ -66,7 +66,7 @@ import "../../send-D4bMycQu.js";
|
|
|
66
66
|
import "../../resolve-route-DuttYY7A.js";
|
|
67
67
|
import "../../proxy-CRB9oCP5.js";
|
|
68
68
|
import "../../replies-6_GxvQYe.js";
|
|
69
|
-
import "../../deps-
|
|
69
|
+
import "../../deps-k7zLO-No.js";
|
|
70
70
|
import { generateSlugViaLLM } from "../../llm-slug-generator.js";
|
|
71
71
|
import { t as resolveHookConfig } from "../../config-BsP4lHEP.js";
|
|
72
72
|
import fs from "node:fs/promises";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as isTruthyEnvValue, v as CHAT_CHANNEL_ORDER } from "./entry.js";
|
|
2
2
|
import { n as listChannelPlugins } from "./plugins-CCrfZ49T.js";
|
|
3
3
|
import { a as listChannelPluginCatalogEntries } from "./plugin-auto-enable-dpNitoNd.js";
|
|
4
|
-
import { t as ensurePluginRegistryLoaded } from "./plugin-registry-
|
|
4
|
+
import { t as ensurePluginRegistryLoaded } from "./plugin-registry-BCBZDFZm.js";
|
|
5
5
|
|
|
6
6
|
//#region src/cli/channel-options.ts
|
|
7
7
|
function dedupe(values) {
|
|
@@ -2,7 +2,7 @@ import { f as CHAT_CHANNEL_ORDER } from "./subsystem-CGZX2PBV.js";
|
|
|
2
2
|
import { t as isTruthyEnvValue } from "./env-Bx-F45X5.js";
|
|
3
3
|
import { n as listChannelPlugins } from "./plugins-D46VZh7u.js";
|
|
4
4
|
import { a as listChannelPluginCatalogEntries } from "./plugin-auto-enable-7DUxMy6A.js";
|
|
5
|
-
import { t as ensurePluginRegistryLoaded } from "./plugin-registry-
|
|
5
|
+
import { t as ensurePluginRegistryLoaded } from "./plugin-registry-CY9YBaxv.js";
|
|
6
6
|
|
|
7
7
|
//#region src/cli/channel-options.ts
|
|
8
8
|
function dedupe(values) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as sleep, F as shouldLogVerbose, M as logVerbose, T as toWhatsappJid, V as getChildLogger, f as isSelfChatMode, m as normalizeE164, p as jidToE164, r as clamp, v as resolveJidToE164 } from "./utils-CXzXXV2o.js";
|
|
2
|
-
import { Cr as enqueueSystemEvent, Dn as createDedupeCache, On as hasControlCommand, Ot as computeBackoff, Sn as resolveEnvelopeFormatOptions, Sr as normalizeMentionText, _n as dispatchReplyWithBufferedBlockDispatcher, _t as normalizeGroupActivation, bn as resolveInboundDebounceMs, cn as buildPairingReply, dn as buildHistoryContextFromEntries, fn as recordPendingHistoryEntryIfEnabled, gn as shouldAckReactionForWhatsApp, hn as warnMissingProviderGroupPolicyFallbackOnce, kn as shouldComputeCommandAuthorized, kt as sleepWithAbort, ln as resolveMentionGating, mn as resolveOpenProviderRuntimeGroupPolicy, pn as resolveDefaultGroupPolicy, t as getReplyFromConfig, un as DEFAULT_GROUP_HISTORY_LIMIT, vt as parseActivationCommand, xn as formatInboundEnvelope, xr as buildMentionRegexes, yn as createInboundDebouncer } from "./reply-
|
|
2
|
+
import { Cr as enqueueSystemEvent, Dn as createDedupeCache, On as hasControlCommand, Ot as computeBackoff, Sn as resolveEnvelopeFormatOptions, Sr as normalizeMentionText, _n as dispatchReplyWithBufferedBlockDispatcher, _t as normalizeGroupActivation, bn as resolveInboundDebounceMs, cn as buildPairingReply, dn as buildHistoryContextFromEntries, fn as recordPendingHistoryEntryIfEnabled, gn as shouldAckReactionForWhatsApp, hn as warnMissingProviderGroupPolicyFallbackOnce, kn as shouldComputeCommandAuthorized, kt as sleepWithAbort, ln as resolveMentionGating, mn as resolveOpenProviderRuntimeGroupPolicy, pn as resolveDefaultGroupPolicy, t as getReplyFromConfig, un as DEFAULT_GROUP_HISTORY_LIMIT, vt as parseActivationCommand, xn as formatInboundEnvelope, xr as buildMentionRegexes, yn as createInboundDebouncer } from "./reply-AI4n5V-o.js";
|
|
3
3
|
import { t as createSubsystemLogger } from "./subsystem-CGZX2PBV.js";
|
|
4
4
|
import { n as defaultRuntime } from "./runtime-44j_X4Y6.js";
|
|
5
5
|
import { a as buildGroupHistoryKey, n as DEFAULT_MAIN_KEY, r as buildAgentMainSessionKey, s as normalizeAgentId } from "./session-key-Cuihcz_O.js";
|
|
@@ -819,7 +819,7 @@ async function monitorWebInbox(options) {
|
|
|
819
819
|
};
|
|
820
820
|
const stopText = (inboundMessage.body ?? "").trim();
|
|
821
821
|
if (stopText) {
|
|
822
|
-
const { isAbortRequestText, emergencyStop, resolveSessionForEmergencyStop } = await import("./emergency-stop-
|
|
822
|
+
const { isAbortRequestText, emergencyStop, resolveSessionForEmergencyStop } = await import("./emergency-stop-C0olMHR9.js");
|
|
823
823
|
if (isAbortRequestText(stopText)) {
|
|
824
824
|
const { loadConfig: loadCfg } = await import("./model-selection-0dGxYGp8.js").then((n) => n.Mt);
|
|
825
825
|
const { resolveAgentRoute } = await import("./resolve-route-D_AbcmD6.js").then((n) => n.r);
|
|
@@ -7,7 +7,7 @@ import { a as resolveChannelGroupRequireMention, i as resolveChannelGroupPolicy
|
|
|
7
7
|
import { c as loadSessionStore, d as recordSessionMetaFromInbound, h as updateLastRoute, lt as resolveGroupSessionKey, u as readSessionUpdatedAt } from "./sessions-BoqJKVEs.js";
|
|
8
8
|
import { i as resolveWhatsAppAccount } from "./accounts-nuNP3OfB.js";
|
|
9
9
|
import { l as readWebSelfId, n as getWebAuthAgeMs } from "./auth-store-D9BmR4S6.js";
|
|
10
|
-
import { $ as createDedupeCache, B as resolveDefaultGroupPolicy, C as computeBackoff, En as enqueueSystemEvent, F as buildPairingReply, H as warnMissingProviderGroupPolicyFallbackOnce, I as resolveMentionGating, J as formatInboundEnvelope, K as createInboundDebouncer, L as DEFAULT_GROUP_HISTORY_LIMIT, R as buildHistoryContextFromEntries, U as shouldAckReactionForWhatsApp, V as resolveOpenProviderRuntimeGroupPolicy, W as dispatchReplyWithBufferedBlockDispatcher, Xn as shouldComputeCommandAuthorized, Y as resolveEnvelopeFormatOptions, Yn as hasControlCommand, er as buildMentionRegexes, et as getReplyFromConfig, mn as parseActivationCommand, pn as normalizeGroupActivation, q as resolveInboundDebounceMs, tr as normalizeMentionText, w as sleepWithAbort, z as recordPendingHistoryEntryIfEnabled } from "./subagent-registry-
|
|
10
|
+
import { $ as createDedupeCache, B as resolveDefaultGroupPolicy, C as computeBackoff, En as enqueueSystemEvent, F as buildPairingReply, H as warnMissingProviderGroupPolicyFallbackOnce, I as resolveMentionGating, J as formatInboundEnvelope, K as createInboundDebouncer, L as DEFAULT_GROUP_HISTORY_LIMIT, R as buildHistoryContextFromEntries, U as shouldAckReactionForWhatsApp, V as resolveOpenProviderRuntimeGroupPolicy, W as dispatchReplyWithBufferedBlockDispatcher, Xn as shouldComputeCommandAuthorized, Y as resolveEnvelopeFormatOptions, Yn as hasControlCommand, er as buildMentionRegexes, et as getReplyFromConfig, mn as parseActivationCommand, pn as normalizeGroupActivation, q as resolveInboundDebounceMs, tr as normalizeMentionText, w as sleepWithAbort, z as recordPendingHistoryEntryIfEnabled } from "./subagent-registry-D7Dwl-dH.js";
|
|
11
11
|
import { u as resolveStorePath } from "./paths-CC17i2eK.js";
|
|
12
12
|
import { K as formatLocationText, q as toLocationContext } from "./send-PtDa6Pf-.js";
|
|
13
13
|
import { r as saveMediaBuffer } from "./store-a6R4X6WX.js";
|
|
@@ -818,7 +818,7 @@ async function monitorWebInbox(options) {
|
|
|
818
818
|
};
|
|
819
819
|
const stopText = (inboundMessage.body ?? "").trim();
|
|
820
820
|
if (stopText) {
|
|
821
|
-
const { isAbortRequestText, emergencyStop, resolveSessionForEmergencyStop } = await import("./emergency-stop-
|
|
821
|
+
const { isAbortRequestText, emergencyStop, resolveSessionForEmergencyStop } = await import("./emergency-stop-B1WGLPIl.js");
|
|
822
822
|
if (isAbortRequestText(stopText)) {
|
|
823
823
|
const { loadConfig: loadCfg } = await import("./auth-profiles-Baj5ImDJ.js").then((n) => n.D);
|
|
824
824
|
const { resolveAgentRoute } = await import("./resolve-route-VUTvr63H.js").then((n) => n.r);
|