@visorcraft/idlehands 4.0.13 → 4.0.14
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/CHANGELOG.md +7 -0
- package/dist/{agent-via-gateway-C1akskt-.js → agent-via-gateway-B0077UOc.js} +1 -1
- package/dist/{agent-via-gateway-C9xTFnnb.js → agent-via-gateway-BCActbIf.js} +7 -7
- package/dist/{agent-via-gateway-B7gDrTh2.js → agent-via-gateway-D-FbIr6E.js} +2 -2
- package/dist/{agent-via-gateway-Cq6YTkRw.js → agent-via-gateway-DFnFArbP.js} +1 -1
- package/dist/{agents-BEWuTIwE.js → agents-DBtNXoSW.js} +4 -4
- package/dist/{agents.config-s_1D920P.js → agents.config-C48CGAxv.js} +1 -1
- package/dist/{agents.config-cH3kcrKU.js → agents.config-a7WEBiP9.js} +1 -1
- package/dist/{anton-bQ51g5Ec.js → anton-BiE961do.js} +137 -11
- package/dist/{anton-gFIz387q.js → anton-BzjiLD-a.js} +137 -11
- package/dist/{anton-DZGESeSl.js → anton-GmxStpbM.js} +137 -11
- package/dist/{anton-Cs3aBMKq.js → anton-fsipCiB9.js} +137 -11
- package/dist/{audio-preflight-vD3mDc6w.js → audio-preflight-CSSlgO89.js} +4 -4
- package/dist/{auth-choice-CoDCd8IM.js → auth-choice-B9F26cWG.js} +1 -1
- package/dist/{auth-choice-Dunr1I8A.js → auth-choice-DCHD89CG.js} +1 -1
- package/dist/{banner-XXOWQkH8.js → banner-DGxHi5f3.js} +1 -1
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +2 -2
- package/dist/bundled/session-memory/handler.js +2 -2
- package/dist/{channel-options-JZ8UUgne.js → channel-options-BURifbbT.js} +1 -1
- package/dist/{channel-options-DcbnvkV8.js → channel-options-DZ237bIi.js} +1 -1
- package/dist/{channel-web-Z-H-wjMO.js → channel-web-Dx3LCcqS.js} +2 -2
- package/dist/{channel-web-Dz8l9j3Z.js → channel-web-Ylr-WudQ.js} +2 -2
- package/dist/{channels-cli-DVTF8msL.js → channels-cli-BHyVWKE_.js} +7 -7
- package/dist/{channels-cli-F1TB2Ms2.js → channels-cli-CntOyA1l.js} +7 -7
- package/dist/{chrome-DEnkfZ9p.js → chrome-Do5potHV.js} +9 -9
- package/dist/{cli-Cysh5mku.js → cli-DnAZgvLv.js} +2 -2
- package/dist/{cli-CLfBho_N.js → cli-DxFD9X-g.js} +2 -2
- package/dist/{command-registry-BzM89IOr.js → command-registry-BB2Vnuy4.js} +10 -10
- package/dist/{completion-cli-C5Y0omSs.js → completion-cli-Cd_zlB-2.js} +1 -1
- package/dist/{completion-cli-CWl8tMGs.js → completion-cli-eFXXaRI-.js} +2 -2
- package/dist/{config-cli-DY7H5mxq.js → config-cli-C0kgcpE4.js} +1 -1
- package/dist/{config-cli-DrupHrLQ.js → config-cli-CNuPoVE4.js} +1 -1
- package/dist/{configure-teHRuPU7.js → configure-BDO6l1oe.js} +3 -3
- package/dist/{configure-CEhvh4Tl.js → configure-DEyZZjPG.js} +3 -3
- package/dist/{deliver-5FLCa6tB.js → deliver-whAbSPLk.js} +1 -1
- package/dist/{deps--Jd_1mvW.js → deps-7AsluBQV.js} +1 -1
- package/dist/{deps-BuqRbUb-.js → deps-8ieGS4Mv.js} +1 -1
- package/dist/{deps-CEc0DzO7.js → deps-CIF1pkFi.js} +1 -1
- package/dist/{deps-DOKkEv5X.js → deps-CXtbmEWH.js} +1 -1
- package/dist/{doctor-completion-jhxR4t3O.js → doctor-completion-BM1W0ErJ.js} +1 -1
- package/dist/{doctor-completion-C47EWkPr.js → doctor-completion-DZ7EW_dp.js} +1 -1
- package/dist/{emergency-stop-DeVGttt7.js → emergency-stop-BQVndluY.js} +2 -2
- package/dist/{emergency-stop-BDOqqnou.js → emergency-stop-C5022igA.js} +2 -2
- package/dist/{emergency-stop-CC3HM3fX.js → emergency-stop-DdNkOB3t.js} +2 -2
- package/dist/{emergency-stop-C1Aq7hF2.js → emergency-stop-DpTSZhRz.js} +7 -7
- package/dist/entry.js +1 -1
- package/dist/extensionAPI.js +7 -7
- package/dist/{gateway-cli-CwuxFfnq.js → gateway-cli-CgCMdrYY.js} +9 -9
- package/dist/{gateway-cli-Bg9EHlHZ.js → gateway-cli-DvDS1_s1.js} +9 -9
- package/dist/{health-B5FcoZjN.js → health-Bs81nsdt.js} +1 -1
- package/dist/{health-D-LRUDN7.js → health-CPiopwcS.js} +1 -1
- package/dist/{hooks-cli-hH93rV1P.js → hooks-cli-CNq30Huh.js} +3 -3
- package/dist/{hooks-cli-DrwJGeyQ.js → hooks-cli-DXM6dTkU.js} +3 -3
- package/dist/{image-C_aN5P6-.js → image-BAsQlUqT.js} +1 -1
- package/dist/index.js +7 -7
- package/dist/llm-slug-generator.js +2 -2
- package/dist/{models-C7BxqYrW.js → models-CVGwjQpG.js} +2 -2
- package/dist/{models-cli-CDDj0F5v.js → models-cli-2QkLeKdt.js} +4 -4
- package/dist/{models-cli-CqjmKMK2.js → models-cli-bkbKnWld.js} +3 -3
- package/dist/{npm-resolution-BjPIvwHA.js → npm-resolution-CmAIOir0.js} +1 -1
- package/dist/{npm-resolution-C_gT5wrI.js → npm-resolution-DHetuEi8.js} +1 -1
- package/dist/{onboard-CAifMogc.js → onboard-Du522rv9.js} +2 -2
- package/dist/{onboard-DyZAtFGg.js → onboard-IDM50Cwp.js} +2 -2
- package/dist/{onboard-channels-Bk3dz_Jr.js → onboard-channels-5uQfEVIz.js} +1 -1
- package/dist/{onboard-channels-DAk60Ns1.js → onboard-channels-CHLOUR52.js} +1 -1
- package/dist/{onboarding-DxXFvGbr.js → onboarding-B73ADr9Y.js} +3 -3
- package/dist/{onboarding-kCJZ-hVf.js → onboarding-Ct8sM6do.js} +3 -3
- package/dist/{onboarding.finalize-Dl63X819.js → onboarding.finalize-DEVkNjj0.js} +6 -6
- package/dist/{onboarding.finalize-CLyBIGRt.js → onboarding.finalize-mNlZG1KO.js} +7 -7
- package/dist/{pi-embedded-B4tp4aBd.js → pi-embedded-ChimfAJ-.js} +11 -11
- package/dist/{pi-embedded-CNvCKXkm.js → pi-embedded-bwvtdswf.js} +26 -26
- package/dist/{pi-embedded-helpers-C2j0LfJC.js → pi-embedded-helpers-Ct2rwp-P.js} +4 -4
- package/dist/{plugin-registry-CVL1r-yd.js → plugin-registry-BBx7owin.js} +1 -1
- package/dist/{plugin-registry-n---u7EU.js → plugin-registry-CYh53OcU.js} +1 -1
- package/dist/plugin-sdk/{agent-via-gateway-nyxykUkn.js → agent-via-gateway-C2tn6sON.js} +2 -2
- package/dist/plugin-sdk/{anton-BdO0Oxvp.js → anton-_MnTuJJ-.js} +137 -11
- package/dist/plugin-sdk/{channel-web-CtnWXT6I.js → channel-web-DwtLzVOR.js} +2 -2
- package/dist/plugin-sdk/{deps-Be1yXgl3.js → deps-mdAvVF88.js} +1 -1
- package/dist/plugin-sdk/{emergency-stop-qkFklwE3.js → emergency-stop-DYCGWJzN.js} +2 -2
- package/dist/plugin-sdk/index.js +3 -3
- package/dist/plugin-sdk/{reply-Csf1i8F8.js → reply-B-q4HnAx.js} +11 -11
- package/dist/plugin-sdk/{web-Cs2SXpS-.js → web-P5eS5E4t.js} +3 -3
- package/dist/{plugins-cli--xMWIg-4.js → plugins-cli-SxHWgGz6.js} +3 -3
- package/dist/{plugins-cli-D3VgmVpQ.js → plugins-cli-TmKS47EG.js} +3 -3
- package/dist/{program-C4UqPGzI.js → program-ZVWCD0Zm.js} +8 -8
- package/dist/{program-context-Dp52v2OQ.js → program-context-3VJmK0G6.js} +18 -18
- package/dist/{prompt-select-styled-DlX1LGGJ.js → prompt-select-styled-D7s-dTdd.js} +4 -4
- package/dist/{prompt-select-styled-CsGzk9Gq.js → prompt-select-styled-DefgYXen.js} +4 -4
- package/dist/{provider-auth-helpers-Czzq_QPi.js → provider-auth-helpers-DZhIVPGv.js} +1 -1
- package/dist/{provider-auth-helpers-DOkJeW-i.js → provider-auth-helpers-ZH_-N5zd.js} +1 -1
- package/dist/{push-apns-RknfH2wN.js → push-apns-Do1ENlJt.js} +1 -1
- package/dist/{push-apns-BtFayED4.js → push-apns-xWUFiO5-.js} +1 -1
- package/dist/{pw-ai-DjmrIQle.js → pw-ai-yrIWfcWX.js} +1 -1
- package/dist/{register.agent-C35pTLnm.js → register.agent-BQjgsbPA.js} +9 -9
- package/dist/{register.agent-BiHrmIpA.js → register.agent-oVyiMffI.js} +8 -8
- package/dist/{register.configure-BPdGcoT-.js → register.configure-24YtUj4s.js} +8 -8
- package/dist/{register.configure-DCf6SaYp.js → register.configure-D_zfBA_E.js} +8 -8
- package/dist/{register.maintenance-DUdYmaQm.js → register.maintenance-BccFDIZU.js} +9 -9
- package/dist/{register.maintenance-DujCPOfC.js → register.maintenance-CkYNqabD.js} +8 -8
- package/dist/{register.message-BhzLKaq7.js → register.message-CPejF6cS.js} +3 -3
- package/dist/{register.message-BHLa16p6.js → register.message-CySQp5gA.js} +3 -3
- package/dist/{register.onboard-DqRuNACj.js → register.onboard-BddM-Tey.js} +2 -2
- package/dist/{register.onboard-hOo1cBls.js → register.onboard-Cg5R87xG.js} +2 -2
- package/dist/{register.orchestrator-anton-DDUP6r-1.js → register.orchestrator-anton-Dfd2g3y-.js} +2 -2
- package/dist/{register.orchestrator-anton-gJUfWbMJ.js → register.orchestrator-anton-uFQntDpJ.js} +2 -2
- package/dist/{register.setup-Cg9pGGKa.js → register.setup-Bla4J47z.js} +2 -2
- package/dist/{register.setup-1kqsk9Nz.js → register.setup-Cnil6_M-.js} +2 -2
- package/dist/{register.status-health-sessions-DWCD-xxm.js → register.status-health-sessions-CI6-RlLt.js} +4 -4
- package/dist/{register.status-health-sessions-DGVjxQ4x.js → register.status-health-sessions-CiakJrlx.js} +4 -4
- package/dist/{register.subclis-C39R-X4d.js → register.subclis-9fhzxHCF.js} +9 -9
- package/dist/{reply-DuYN0-Pb.js → reply-Cmj0wbnT.js} +11 -11
- package/dist/{run-main-DhnKFvJ8.js → run-main-DUtPECK6.js} +15 -15
- package/dist/{runner-CZW_eyf2.js → runner-Bv_BA3vd.js} +1 -1
- package/dist/{server-node-events-CsvrVnbd.js → server-node-events--qmTbghp.js} +3 -3
- package/dist/{server-node-events-S-Ffj9aJ.js → server-node-events-DwUtqxW5.js} +3 -3
- package/dist/{status-OrfDNo6n.js → status-CMG5erwf.js} +2 -2
- package/dist/{status-DtnoXYQp.js → status-CPCpSX9k.js} +2 -2
- package/dist/{subagent-registry-CV8jrQca.js → subagent-registry-DHwrN9Oj.js} +11 -11
- package/dist/{update-cli-UpWfq3c5.js → update-cli-CQhZlXlT.js} +8 -8
- package/dist/{update-cli-DZfUy8hM.js → update-cli-DMjQ-pCl.js} +9 -9
- package/dist/{update-runner-GJO5-g7n.js → update-runner-BnTu_uJ4.js} +1 -1
- package/dist/{update-runner-DTzgmQYD.js → update-runner-CghbY9Ay.js} +1 -1
- package/dist/{web-y9QkD_tf.js → web-BJk05p_4.js} +8 -8
- package/dist/{web-DpyY5rK8.js → web-J7TF5rpD.js} +3 -3
- package/dist/{web-CwYkIq_A.js → web-U5rtNi4Q.js} +3 -3
- package/dist/{web-BC36pno5.js → web-weF5X5MU.js} +3 -3
- package/extensions/acpx/package.json +1 -1
- package/extensions/bluebubbles/package.json +1 -1
- package/extensions/copilot-proxy/package.json +1 -1
- package/extensions/diagnostics-otel/package.json +1 -1
- package/extensions/discord/package.json +1 -1
- package/extensions/feishu/package.json +1 -1
- package/extensions/google-gemini-cli-auth/package.json +1 -1
- package/extensions/googlechat/package.json +1 -1
- package/extensions/hand/package.json +1 -1
- package/extensions/imessage/package.json +1 -1
- package/extensions/irc/package.json +1 -1
- package/extensions/line/package.json +1 -1
- package/extensions/llm-task/package.json +1 -1
- package/extensions/matrix/CHANGELOG.md +6 -0
- package/extensions/matrix/package.json +1 -1
- package/extensions/mattermost/package.json +1 -1
- package/extensions/memory-core/package.json +1 -1
- package/extensions/memory-lancedb/package.json +1 -1
- package/extensions/minimax-portal-auth/package.json +1 -1
- package/extensions/msteams/CHANGELOG.md +6 -0
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/CHANGELOG.md +6 -0
- package/extensions/nostr/package.json +1 -1
- package/extensions/open-prose/package.json +1 -1
- package/extensions/signal/package.json +1 -1
- package/extensions/slack/package.json +1 -1
- package/extensions/synology-chat/package.json +1 -1
- package/extensions/telegram/package.json +1 -1
- package/extensions/tlon/package.json +1 -1
- package/extensions/twitch/CHANGELOG.md +6 -0
- package/extensions/twitch/package.json +1 -1
- package/extensions/voice-call/CHANGELOG.md +6 -0
- package/extensions/voice-call/package.json +1 -1
- package/extensions/whatsapp/package.json +1 -1
- package/extensions/zalo/CHANGELOG.md +6 -0
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/CHANGELOG.md +6 -0
- package/extensions/zalouser/package.json +1 -1
- package/package.json +1 -1
|
@@ -222,18 +222,19 @@ async function loadAntonConfig() {
|
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
224
|
async function runAgentTask(args) {
|
|
225
|
-
const { agentCliCommand } = await import("./agent-via-gateway-
|
|
225
|
+
const { agentCliCommand } = await import("./agent-via-gateway-B0077UOc.js").then((n) => n.n);
|
|
226
226
|
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;
|
|
227
|
-
await agentCliCommand({
|
|
227
|
+
const result = await agentCliCommand({
|
|
228
228
|
message: args.message,
|
|
229
229
|
agent: args.agent,
|
|
230
230
|
to: args.to,
|
|
231
231
|
sessionId: args.sessionId,
|
|
232
232
|
timeout: args.timeout,
|
|
233
|
-
json:
|
|
233
|
+
json: true,
|
|
234
234
|
deliver: false,
|
|
235
235
|
extraSystemPrompt
|
|
236
236
|
}, args.runtime, args.deps);
|
|
237
|
+
return { text: (result && typeof result === "object" && "result" in result ? result.result?.payloads ?? [] : []).map((p) => typeof p?.text === "string" ? p.text.trim() : "").filter(Boolean).join("\n\n").trim() };
|
|
237
238
|
}
|
|
238
239
|
function makePlanFilePath(planDir, taskIndex) {
|
|
239
240
|
return path.join(planDir, `task-${taskIndex}-${Date.now()}.md`);
|
|
@@ -249,6 +250,63 @@ async function isPlanFileValid(filePath) {
|
|
|
249
250
|
return false;
|
|
250
251
|
}
|
|
251
252
|
}
|
|
253
|
+
function extractJsonObject(text) {
|
|
254
|
+
const trimmed = text.trim();
|
|
255
|
+
if (!trimmed) return null;
|
|
256
|
+
const tryParse = (candidate) => {
|
|
257
|
+
try {
|
|
258
|
+
const parsed = JSON.parse(candidate);
|
|
259
|
+
if (!parsed || typeof parsed !== "object") return null;
|
|
260
|
+
return parsed;
|
|
261
|
+
} catch {
|
|
262
|
+
return null;
|
|
263
|
+
}
|
|
264
|
+
};
|
|
265
|
+
const direct = tryParse(trimmed);
|
|
266
|
+
if (direct) return direct;
|
|
267
|
+
const fencedMatch = trimmed.match(/```(?:json)?\s*([\s\S]*?)```/i);
|
|
268
|
+
if (fencedMatch?.[1]) {
|
|
269
|
+
const fenced = tryParse(fencedMatch[1].trim());
|
|
270
|
+
if (fenced) return fenced;
|
|
271
|
+
}
|
|
272
|
+
const first = trimmed.indexOf("{");
|
|
273
|
+
const last = trimmed.lastIndexOf("}");
|
|
274
|
+
if (first >= 0 && last > first) {
|
|
275
|
+
const sliced = tryParse(trimmed.slice(first, last + 1));
|
|
276
|
+
if (sliced) return sliced;
|
|
277
|
+
}
|
|
278
|
+
return null;
|
|
279
|
+
}
|
|
280
|
+
function extractPlanMarkdownFromText(text) {
|
|
281
|
+
const candidate = text.match(/```(?:markdown|md)?\s*([\s\S]*?)```/i)?.[1]?.trim() ?? text.trim();
|
|
282
|
+
if (candidate.length < 60) return;
|
|
283
|
+
return candidate;
|
|
284
|
+
}
|
|
285
|
+
function normalizeDiscoveryFilename(filename, expectedPlanFile) {
|
|
286
|
+
const trimmed = filename?.trim();
|
|
287
|
+
if (!trimmed) return expectedPlanFile;
|
|
288
|
+
return path.resolve(trimmed);
|
|
289
|
+
}
|
|
290
|
+
function buildDiscoveryRepairPrompt(task, taskFile, planFilePath) {
|
|
291
|
+
return `RETRY: your previous preflight response did not produce a valid plan file.
|
|
292
|
+
|
|
293
|
+
You MUST complete these steps exactly:
|
|
294
|
+
1) Write the implementation plan to: ${planFilePath}
|
|
295
|
+
2) Verify the file exists and is non-empty
|
|
296
|
+
3) Return ONLY strict JSON: {"status":"incomplete","filename":"${planFilePath}"}
|
|
297
|
+
|
|
298
|
+
If task is already complete, return ONLY: {"status":"complete","filename":""}
|
|
299
|
+
|
|
300
|
+
Do not include THOUGHT, markdown fences, or extra commentary.
|
|
301
|
+
Task file: ${taskFile}
|
|
302
|
+
Task: ${task}`;
|
|
303
|
+
}
|
|
304
|
+
async function tryPersistPlanFallback(params) {
|
|
305
|
+
const planText = (((typeof params.parsed?.planMarkdown === "string" ? params.parsed.planMarkdown : void 0) ?? (typeof params.parsed?.plan === "string" ? params.parsed.plan : void 0))?.trim() || extractPlanMarkdownFromText(params.rawText) || "").trim();
|
|
306
|
+
if (planText.length < 60) return false;
|
|
307
|
+
await fs.writeFile(params.planFile, `${planText}\n`, "utf8");
|
|
308
|
+
return await isPlanFileValid(params.planFile);
|
|
309
|
+
}
|
|
252
310
|
async function runDiscoveryPhase(args) {
|
|
253
311
|
const planFile = makePlanFilePath(args.planDir, args.taskNum);
|
|
254
312
|
await ensurePlanDir(args.planDir);
|
|
@@ -268,7 +326,7 @@ async function runDiscoveryPhase(args) {
|
|
|
268
326
|
task: `Discovery (attempt ${attempt + 1})`,
|
|
269
327
|
sessionId
|
|
270
328
|
});
|
|
271
|
-
await runAgentTask({
|
|
329
|
+
const firstPass = await runAgentTask({
|
|
272
330
|
message: buildDiscoveryPrompt(args.task.text, args.taskFile, planFile),
|
|
273
331
|
sessionId,
|
|
274
332
|
timeout: args.timeout,
|
|
@@ -278,23 +336,91 @@ async function runDiscoveryPhase(args) {
|
|
|
278
336
|
deps: args.deps,
|
|
279
337
|
workspaceDir: args.workspaceDir
|
|
280
338
|
});
|
|
281
|
-
|
|
339
|
+
const firstParsed = extractJsonObject(firstPass.text);
|
|
340
|
+
if ((firstParsed?.status ?? "").toLowerCase() === "complete") return { status: "complete" };
|
|
341
|
+
const declaredPlanFile = normalizeDiscoveryFilename(firstParsed?.filename, planFile);
|
|
342
|
+
if (await isPlanFileValid(declaredPlanFile)) {
|
|
282
343
|
await args.notify({
|
|
283
344
|
phase: "discovery_complete",
|
|
284
345
|
index: args.taskNum,
|
|
285
346
|
total: args.total,
|
|
286
347
|
task: args.task.text,
|
|
287
|
-
planFile
|
|
348
|
+
planFile: declaredPlanFile
|
|
288
349
|
});
|
|
289
350
|
return {
|
|
290
351
|
status: "plan_ready",
|
|
291
|
-
planFile
|
|
352
|
+
planFile: declaredPlanFile
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
if ((firstParsed?.status ?? "").toLowerCase() === "incomplete" && await tryPersistPlanFallback({
|
|
356
|
+
planFile: declaredPlanFile,
|
|
357
|
+
parsed: firstParsed,
|
|
358
|
+
rawText: firstPass.text
|
|
359
|
+
})) {
|
|
360
|
+
await args.notify({
|
|
361
|
+
phase: "discovery_complete",
|
|
362
|
+
index: args.taskNum,
|
|
363
|
+
total: args.total,
|
|
364
|
+
task: args.task.text,
|
|
365
|
+
planFile: declaredPlanFile
|
|
366
|
+
});
|
|
367
|
+
return {
|
|
368
|
+
status: "plan_ready",
|
|
369
|
+
planFile: declaredPlanFile
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
const repairSessionId = `anton-discovery-repair-${Date.now()}-${args.taskNum}-${attempt}`;
|
|
373
|
+
await args.notify({
|
|
374
|
+
phase: "task_agent_spawned",
|
|
375
|
+
index: args.taskNum,
|
|
376
|
+
total: args.total,
|
|
377
|
+
task: `Discovery repair (attempt ${attempt + 1})`,
|
|
378
|
+
sessionId: repairSessionId
|
|
379
|
+
});
|
|
380
|
+
const repairPass = await runAgentTask({
|
|
381
|
+
message: buildDiscoveryRepairPrompt(args.task.text, args.taskFile, declaredPlanFile),
|
|
382
|
+
sessionId: repairSessionId,
|
|
383
|
+
timeout: args.timeout,
|
|
384
|
+
agent: args.agent,
|
|
385
|
+
to: args.to,
|
|
386
|
+
runtime: args.runtime,
|
|
387
|
+
deps: args.deps,
|
|
388
|
+
workspaceDir: args.workspaceDir
|
|
389
|
+
});
|
|
390
|
+
const repairParsed = extractJsonObject(repairPass.text);
|
|
391
|
+
if ((repairParsed?.status ?? "").toLowerCase() === "complete") return { status: "complete" };
|
|
392
|
+
const repairPlanFile = normalizeDiscoveryFilename(repairParsed?.filename, declaredPlanFile);
|
|
393
|
+
if (await isPlanFileValid(repairPlanFile) || await tryPersistPlanFallback({
|
|
394
|
+
planFile: repairPlanFile,
|
|
395
|
+
parsed: repairParsed,
|
|
396
|
+
rawText: repairPass.text
|
|
397
|
+
})) {
|
|
398
|
+
await args.notify({
|
|
399
|
+
phase: "discovery_complete",
|
|
400
|
+
index: args.taskNum,
|
|
401
|
+
total: args.total,
|
|
402
|
+
task: args.task.text,
|
|
403
|
+
planFile: repairPlanFile
|
|
404
|
+
});
|
|
405
|
+
return {
|
|
406
|
+
status: "plan_ready",
|
|
407
|
+
planFile: repairPlanFile
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
if (attempt === args.maxRetries) {
|
|
411
|
+
const reason = "Discovery did not produce a valid plan file after primary + repair passes";
|
|
412
|
+
await args.notify({
|
|
413
|
+
phase: "discovery_failed",
|
|
414
|
+
index: args.taskNum,
|
|
415
|
+
total: args.total,
|
|
416
|
+
task: args.task.text,
|
|
417
|
+
error: reason
|
|
418
|
+
});
|
|
419
|
+
return {
|
|
420
|
+
status: "failed",
|
|
421
|
+
error: reason
|
|
292
422
|
};
|
|
293
423
|
}
|
|
294
|
-
if (attempt === args.maxRetries) return {
|
|
295
|
-
status: "failed",
|
|
296
|
-
error: "Discovery did not produce a valid plan file"
|
|
297
|
-
};
|
|
298
424
|
} catch (err) {
|
|
299
425
|
const errorMsg = err instanceof Error ? err.message : String(err);
|
|
300
426
|
if (attempt === args.maxRetries) {
|
|
@@ -216,18 +216,19 @@ async function loadAntonConfig() {
|
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
218
|
async function runAgentTask(args) {
|
|
219
|
-
const { agentCliCommand } = await import("./agent-via-gateway-
|
|
219
|
+
const { agentCliCommand } = await import("./agent-via-gateway-D-FbIr6E.js");
|
|
220
220
|
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;
|
|
221
|
-
await agentCliCommand({
|
|
221
|
+
const result = await agentCliCommand({
|
|
222
222
|
message: args.message,
|
|
223
223
|
agent: args.agent,
|
|
224
224
|
to: args.to,
|
|
225
225
|
sessionId: args.sessionId,
|
|
226
226
|
timeout: args.timeout,
|
|
227
|
-
json:
|
|
227
|
+
json: true,
|
|
228
228
|
deliver: false,
|
|
229
229
|
extraSystemPrompt
|
|
230
230
|
}, args.runtime, args.deps);
|
|
231
|
+
return { text: (result && typeof result === "object" && "result" in result ? result.result?.payloads ?? [] : []).map((p) => typeof p?.text === "string" ? p.text.trim() : "").filter(Boolean).join("\n\n").trim() };
|
|
231
232
|
}
|
|
232
233
|
function makePlanFilePath(planDir, taskIndex) {
|
|
233
234
|
return path.join(planDir, `task-${taskIndex}-${Date.now()}.md`);
|
|
@@ -243,6 +244,63 @@ async function isPlanFileValid(filePath) {
|
|
|
243
244
|
return false;
|
|
244
245
|
}
|
|
245
246
|
}
|
|
247
|
+
function extractJsonObject(text) {
|
|
248
|
+
const trimmed = text.trim();
|
|
249
|
+
if (!trimmed) return null;
|
|
250
|
+
const tryParse = (candidate) => {
|
|
251
|
+
try {
|
|
252
|
+
const parsed = JSON.parse(candidate);
|
|
253
|
+
if (!parsed || typeof parsed !== "object") return null;
|
|
254
|
+
return parsed;
|
|
255
|
+
} catch {
|
|
256
|
+
return null;
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
const direct = tryParse(trimmed);
|
|
260
|
+
if (direct) return direct;
|
|
261
|
+
const fencedMatch = trimmed.match(/```(?:json)?\s*([\s\S]*?)```/i);
|
|
262
|
+
if (fencedMatch?.[1]) {
|
|
263
|
+
const fenced = tryParse(fencedMatch[1].trim());
|
|
264
|
+
if (fenced) return fenced;
|
|
265
|
+
}
|
|
266
|
+
const first = trimmed.indexOf("{");
|
|
267
|
+
const last = trimmed.lastIndexOf("}");
|
|
268
|
+
if (first >= 0 && last > first) {
|
|
269
|
+
const sliced = tryParse(trimmed.slice(first, last + 1));
|
|
270
|
+
if (sliced) return sliced;
|
|
271
|
+
}
|
|
272
|
+
return null;
|
|
273
|
+
}
|
|
274
|
+
function extractPlanMarkdownFromText(text) {
|
|
275
|
+
const candidate = text.match(/```(?:markdown|md)?\s*([\s\S]*?)```/i)?.[1]?.trim() ?? text.trim();
|
|
276
|
+
if (candidate.length < 60) return;
|
|
277
|
+
return candidate;
|
|
278
|
+
}
|
|
279
|
+
function normalizeDiscoveryFilename(filename, expectedPlanFile) {
|
|
280
|
+
const trimmed = filename?.trim();
|
|
281
|
+
if (!trimmed) return expectedPlanFile;
|
|
282
|
+
return path.resolve(trimmed);
|
|
283
|
+
}
|
|
284
|
+
function buildDiscoveryRepairPrompt(task, taskFile, planFilePath) {
|
|
285
|
+
return `RETRY: your previous preflight response did not produce a valid plan file.
|
|
286
|
+
|
|
287
|
+
You MUST complete these steps exactly:
|
|
288
|
+
1) Write the implementation plan to: ${planFilePath}
|
|
289
|
+
2) Verify the file exists and is non-empty
|
|
290
|
+
3) Return ONLY strict JSON: {"status":"incomplete","filename":"${planFilePath}"}
|
|
291
|
+
|
|
292
|
+
If task is already complete, return ONLY: {"status":"complete","filename":""}
|
|
293
|
+
|
|
294
|
+
Do not include THOUGHT, markdown fences, or extra commentary.
|
|
295
|
+
Task file: ${taskFile}
|
|
296
|
+
Task: ${task}`;
|
|
297
|
+
}
|
|
298
|
+
async function tryPersistPlanFallback(params) {
|
|
299
|
+
const planText = (((typeof params.parsed?.planMarkdown === "string" ? params.parsed.planMarkdown : void 0) ?? (typeof params.parsed?.plan === "string" ? params.parsed.plan : void 0))?.trim() || extractPlanMarkdownFromText(params.rawText) || "").trim();
|
|
300
|
+
if (planText.length < 60) return false;
|
|
301
|
+
await fs.writeFile(params.planFile, `${planText}\n`, "utf8");
|
|
302
|
+
return await isPlanFileValid(params.planFile);
|
|
303
|
+
}
|
|
246
304
|
async function runDiscoveryPhase(args) {
|
|
247
305
|
const planFile = makePlanFilePath(args.planDir, args.taskNum);
|
|
248
306
|
await ensurePlanDir(args.planDir);
|
|
@@ -262,7 +320,7 @@ async function runDiscoveryPhase(args) {
|
|
|
262
320
|
task: `Discovery (attempt ${attempt + 1})`,
|
|
263
321
|
sessionId
|
|
264
322
|
});
|
|
265
|
-
await runAgentTask({
|
|
323
|
+
const firstPass = await runAgentTask({
|
|
266
324
|
message: buildDiscoveryPrompt(args.task.text, args.taskFile, planFile),
|
|
267
325
|
sessionId,
|
|
268
326
|
timeout: args.timeout,
|
|
@@ -272,23 +330,91 @@ async function runDiscoveryPhase(args) {
|
|
|
272
330
|
deps: args.deps,
|
|
273
331
|
workspaceDir: args.workspaceDir
|
|
274
332
|
});
|
|
275
|
-
|
|
333
|
+
const firstParsed = extractJsonObject(firstPass.text);
|
|
334
|
+
if ((firstParsed?.status ?? "").toLowerCase() === "complete") return { status: "complete" };
|
|
335
|
+
const declaredPlanFile = normalizeDiscoveryFilename(firstParsed?.filename, planFile);
|
|
336
|
+
if (await isPlanFileValid(declaredPlanFile)) {
|
|
276
337
|
await args.notify({
|
|
277
338
|
phase: "discovery_complete",
|
|
278
339
|
index: args.taskNum,
|
|
279
340
|
total: args.total,
|
|
280
341
|
task: args.task.text,
|
|
281
|
-
planFile
|
|
342
|
+
planFile: declaredPlanFile
|
|
282
343
|
});
|
|
283
344
|
return {
|
|
284
345
|
status: "plan_ready",
|
|
285
|
-
planFile
|
|
346
|
+
planFile: declaredPlanFile
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
if ((firstParsed?.status ?? "").toLowerCase() === "incomplete" && await tryPersistPlanFallback({
|
|
350
|
+
planFile: declaredPlanFile,
|
|
351
|
+
parsed: firstParsed,
|
|
352
|
+
rawText: firstPass.text
|
|
353
|
+
})) {
|
|
354
|
+
await args.notify({
|
|
355
|
+
phase: "discovery_complete",
|
|
356
|
+
index: args.taskNum,
|
|
357
|
+
total: args.total,
|
|
358
|
+
task: args.task.text,
|
|
359
|
+
planFile: declaredPlanFile
|
|
360
|
+
});
|
|
361
|
+
return {
|
|
362
|
+
status: "plan_ready",
|
|
363
|
+
planFile: declaredPlanFile
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
const repairSessionId = `anton-discovery-repair-${Date.now()}-${args.taskNum}-${attempt}`;
|
|
367
|
+
await args.notify({
|
|
368
|
+
phase: "task_agent_spawned",
|
|
369
|
+
index: args.taskNum,
|
|
370
|
+
total: args.total,
|
|
371
|
+
task: `Discovery repair (attempt ${attempt + 1})`,
|
|
372
|
+
sessionId: repairSessionId
|
|
373
|
+
});
|
|
374
|
+
const repairPass = await runAgentTask({
|
|
375
|
+
message: buildDiscoveryRepairPrompt(args.task.text, args.taskFile, declaredPlanFile),
|
|
376
|
+
sessionId: repairSessionId,
|
|
377
|
+
timeout: args.timeout,
|
|
378
|
+
agent: args.agent,
|
|
379
|
+
to: args.to,
|
|
380
|
+
runtime: args.runtime,
|
|
381
|
+
deps: args.deps,
|
|
382
|
+
workspaceDir: args.workspaceDir
|
|
383
|
+
});
|
|
384
|
+
const repairParsed = extractJsonObject(repairPass.text);
|
|
385
|
+
if ((repairParsed?.status ?? "").toLowerCase() === "complete") return { status: "complete" };
|
|
386
|
+
const repairPlanFile = normalizeDiscoveryFilename(repairParsed?.filename, declaredPlanFile);
|
|
387
|
+
if (await isPlanFileValid(repairPlanFile) || await tryPersistPlanFallback({
|
|
388
|
+
planFile: repairPlanFile,
|
|
389
|
+
parsed: repairParsed,
|
|
390
|
+
rawText: repairPass.text
|
|
391
|
+
})) {
|
|
392
|
+
await args.notify({
|
|
393
|
+
phase: "discovery_complete",
|
|
394
|
+
index: args.taskNum,
|
|
395
|
+
total: args.total,
|
|
396
|
+
task: args.task.text,
|
|
397
|
+
planFile: repairPlanFile
|
|
398
|
+
});
|
|
399
|
+
return {
|
|
400
|
+
status: "plan_ready",
|
|
401
|
+
planFile: repairPlanFile
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
if (attempt === args.maxRetries) {
|
|
405
|
+
const reason = "Discovery did not produce a valid plan file after primary + repair passes";
|
|
406
|
+
await args.notify({
|
|
407
|
+
phase: "discovery_failed",
|
|
408
|
+
index: args.taskNum,
|
|
409
|
+
total: args.total,
|
|
410
|
+
task: args.task.text,
|
|
411
|
+
error: reason
|
|
412
|
+
});
|
|
413
|
+
return {
|
|
414
|
+
status: "failed",
|
|
415
|
+
error: reason
|
|
286
416
|
};
|
|
287
417
|
}
|
|
288
|
-
if (attempt === args.maxRetries) return {
|
|
289
|
-
status: "failed",
|
|
290
|
-
error: "Discovery did not produce a valid plan file"
|
|
291
|
-
};
|
|
292
418
|
} catch (err) {
|
|
293
419
|
const errorMsg = err instanceof Error ? err.message : String(err);
|
|
294
420
|
if (attempt === args.maxRetries) {
|
|
@@ -15,8 +15,8 @@ import "./accounts-BRVjft5i.js";
|
|
|
15
15
|
import "./image-ops-BDG-MYYV.js";
|
|
16
16
|
import "./pi-model-discovery-Dic-M5qw.js";
|
|
17
17
|
import "./message-channel-DqqfOIdx.js";
|
|
18
|
-
import "./pi-embedded-helpers-
|
|
19
|
-
import "./chrome-
|
|
18
|
+
import "./pi-embedded-helpers-Ct2rwp-P.js";
|
|
19
|
+
import "./chrome-Do5potHV.js";
|
|
20
20
|
import "./ssrf-DappnhDp.js";
|
|
21
21
|
import "./skills-nQcWk6Z6.js";
|
|
22
22
|
import "./path-alias-guards-CGbCFqW8.js";
|
|
@@ -29,11 +29,11 @@ import "./accounts-CBoBCTgA.js";
|
|
|
29
29
|
import "./paths-vOrMwCEQ.js";
|
|
30
30
|
import "./tool-images-CpZSs-zE.js";
|
|
31
31
|
import "./thinking-BFsWfunr.js";
|
|
32
|
-
import "./image-
|
|
32
|
+
import "./image-BAsQlUqT.js";
|
|
33
33
|
import "./gemini-auth-m2hi6OmF.js";
|
|
34
34
|
import "./fetch-guard-BdCPmLBP.js";
|
|
35
35
|
import "./local-roots-BnWzOrXv.js";
|
|
36
|
-
import { a as resolveMediaAttachmentLocalRoots, n as createMediaAttachmentCache, o as runCapability, r as normalizeMediaAttachments, t as buildProviderRegistry, u as isAudioAttachment } from "./runner-
|
|
36
|
+
import { a as resolveMediaAttachmentLocalRoots, n as createMediaAttachmentCache, o as runCapability, r as normalizeMediaAttachments, t as buildProviderRegistry, u as isAudioAttachment } from "./runner-Bv_BA3vd.js";
|
|
37
37
|
|
|
38
38
|
//#region src/media-understanding/audio-preflight.ts
|
|
39
39
|
/**
|
|
@@ -6,7 +6,7 @@ import { n as loadModelCatalog } from "./model-catalog-DYWymzg_.js";
|
|
|
6
6
|
import { f as openUrl } from "./onboard-helpers-Dp6wXNs7.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-ZH_-N5zd.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";
|
|
@@ -6,7 +6,7 @@ import { n as loadModelCatalog } from "./model-catalog-D9no0CH2.js";
|
|
|
6
6
|
import { f as openUrl } from "./onboard-helpers-BQmbMJxJ.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-DZhIVPGv.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";
|
|
@@ -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-DHwrN9Oj.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,7 +11,7 @@ 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-ChimfAJ-.js";
|
|
15
15
|
import "../../plugins-CRB60mCJ.js";
|
|
16
16
|
import "../../accounts-Dk8mJIrQ.js";
|
|
17
17
|
import "../../bindings-D3b5Fmc9.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-7AsluBQV.js";
|
|
70
70
|
import fs from "node:fs/promises";
|
|
71
71
|
import path from "node:path";
|
|
72
72
|
import crypto from "node:crypto";
|
|
@@ -11,7 +11,7 @@ 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-ChimfAJ-.js";
|
|
15
15
|
import "../../plugins-CRB60mCJ.js";
|
|
16
16
|
import "../../accounts-Dk8mJIrQ.js";
|
|
17
17
|
import "../../bindings-D3b5Fmc9.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-7AsluBQV.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";
|
|
@@ -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-BBx7owin.js";
|
|
6
6
|
|
|
7
7
|
//#region src/cli/channel-options.ts
|
|
8
8
|
function dedupe(values) {
|
|
@@ -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-CYh53OcU.js";
|
|
5
5
|
|
|
6
6
|
//#region src/cli/channel-options.ts
|
|
7
7
|
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-Cmj0wbnT.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-BQVndluY.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-DHwrN9Oj.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-C5022igA.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);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./paths-Cn44w-EB.js";
|
|
2
2
|
import { B as theme, O as danger, P as setVerbose, U as getResolvedLoggerSettings, d as isRecord } from "./utils-CXzXXV2o.js";
|
|
3
3
|
import "./thinking-EAliFiVK.js";
|
|
4
|
-
import { bt as formatUsageReportLines, gt as deleteTelegramUpdateOffset, yt as loadProviderUsageSummary } from "./reply-
|
|
4
|
+
import { bt as formatUsageReportLines, gt as deleteTelegramUpdateOffset, yt as loadProviderUsageSummary } from "./reply-Cmj0wbnT.js";
|
|
5
5
|
import { d as resolveDefaultAgentId, u as resolveAgentWorkspaceDir } from "./agent-scope-RA0zXRpu.js";
|
|
6
6
|
import "./subsystem-CGZX2PBV.js";
|
|
7
7
|
import { n as defaultRuntime } from "./runtime-44j_X4Y6.js";
|
|
@@ -105,7 +105,7 @@ import "./resolve-route-D_AbcmD6.js";
|
|
|
105
105
|
import "./replies-hSFVxL4h.js";
|
|
106
106
|
import "./skill-commands-BFzmZAfo.js";
|
|
107
107
|
import "./workspace-dirs-SsExQ3Bz.js";
|
|
108
|
-
import "./deps-
|
|
108
|
+
import "./deps-CXtbmEWH.js";
|
|
109
109
|
import { a as listChannelPluginCatalogEntries } from "./plugin-auto-enable-7DUxMy6A.js";
|
|
110
110
|
import { n as resolveMessageChannelSelection } from "./channel-selection-ZxRkxpuF.js";
|
|
111
111
|
import "./outbound-attachment-Bot3bRnK.js";
|
|
@@ -118,25 +118,25 @@ import "./pairing-labels-ChQJzbS9.js";
|
|
|
118
118
|
import "./server-lifecycle-B5PlrlbG.js";
|
|
119
119
|
import "./stagger-rQoQSWkz.js";
|
|
120
120
|
import "./system-run-command-qJdgzxLp.js";
|
|
121
|
-
import "./channel-web-
|
|
121
|
+
import "./channel-web-Dx3LCcqS.js";
|
|
122
122
|
import "./outbound-DPTxwchq.js";
|
|
123
123
|
import "./session-CdnrRhb4.js";
|
|
124
124
|
import "./login-CfUhrgWT.js";
|
|
125
|
-
import "./plugin-registry-
|
|
126
|
-
import { t as formatCliChannelOptions } from "./channel-options-
|
|
125
|
+
import "./plugin-registry-BBx7owin.js";
|
|
126
|
+
import { t as formatCliChannelOptions } from "./channel-options-BURifbbT.js";
|
|
127
127
|
import { t as hasExplicitOptions } from "./command-options-D4MmqoOd.js";
|
|
128
128
|
import { n as moveSingleAccountChannelSectionToDefaultAccount } from "./api-DK3_W0VC.js";
|
|
129
129
|
import "./note-69EfBEU-.js";
|
|
130
130
|
import { t as createClackPrompter } from "./clack-prompter-CvbZsmjW.js";
|
|
131
131
|
import { t as resolveChannelDefaultAccountId } from "./helpers-C6eW1WGZ.js";
|
|
132
132
|
import { i as describeBinding, n as applyAgentBindings, t as requireValidConfigSnapshot } from "./config-validation-BvKX6fPw.js";
|
|
133
|
-
import { n as buildAgentSummaries } from "./agents.config-
|
|
133
|
+
import { n as buildAgentSummaries } from "./agents.config-a7WEBiP9.js";
|
|
134
134
|
import "./enable-o_s6PBsC.js";
|
|
135
135
|
import "./install-safe-path-ChNR9pl6.js";
|
|
136
136
|
import "./npm-registry-spec-BCbbfIhX.js";
|
|
137
137
|
import "./skill-scanner-D7mzXRXd.js";
|
|
138
138
|
import "./installs-CNubze2L.js";
|
|
139
|
-
import { a as reloadOnboardingPluginRegistry, i as ensureOnboardingPluginInstalled, r as setupChannels } from "./onboard-channels-
|
|
139
|
+
import { a as reloadOnboardingPluginRegistry, i as ensureOnboardingPluginInstalled, r as setupChannels } from "./onboard-channels-5uQfEVIz.js";
|
|
140
140
|
import { t as buildChannelAccountSnapshot } from "./status-D8Z2uvBM.js";
|
|
141
141
|
import { t as parseLogLine } from "./parse-log-line-Csn1jHbq.js";
|
|
142
142
|
import { t as collectChannelStatusIssues } from "./channels-status-issues-CDpWjdI3.js";
|