@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
|
@@ -26,7 +26,7 @@ import "./logging-Bgrm4o7g.js";
|
|
|
26
26
|
import "./auth-store-D9BmR4S6.js";
|
|
27
27
|
import "./send-m4lQkQcY.js";
|
|
28
28
|
import "./send-CCiDIuX4.js";
|
|
29
|
-
import "./subagent-registry-
|
|
29
|
+
import "./subagent-registry-DHwrN9Oj.js";
|
|
30
30
|
import "./paths-CC17i2eK.js";
|
|
31
31
|
import "./chat-envelope-Dedaetiq.js";
|
|
32
32
|
import "./client-Brv1GCwX.js";
|
|
@@ -109,24 +109,24 @@ import "./cli-utils-BfsDuRZS.js";
|
|
|
109
109
|
import "./help-format-CldHB7lS.js";
|
|
110
110
|
import "./progress-B76RkFx7.js";
|
|
111
111
|
import "./replies-DSfpze17.js";
|
|
112
|
-
import "./deps-
|
|
112
|
+
import "./deps-8ieGS4Mv.js";
|
|
113
113
|
import { b as waitForGatewayReachable, f as openUrl, g as resolveControlUiLinks, i as detectBrowserOpenSupport, m as probeGatewayReachable, o as formatControlUiSshHint } from "./onboard-helpers-Dp6wXNs7.js";
|
|
114
114
|
import "./prompt-style-XmK49QYK.js";
|
|
115
115
|
import "./pairing-labels-D7xcHkxi.js";
|
|
116
116
|
import "./note-C2HHth6G.js";
|
|
117
|
-
import { r as installCompletion } from "./completion-cli-
|
|
118
|
-
import "./register.subclis-
|
|
119
|
-
import "./command-registry-
|
|
117
|
+
import { r as installCompletion } from "./completion-cli-eFXXaRI-.js";
|
|
118
|
+
import "./register.subclis-9fhzxHCF.js";
|
|
119
|
+
import "./command-registry-BB2Vnuy4.js";
|
|
120
120
|
import "./program-context-BrqeiWcA.js";
|
|
121
121
|
import { n as gatewayInstallErrorHint, t as buildGatewayInstallPlan } from "./daemon-install-helpers-DUHqeg5Y.js";
|
|
122
122
|
import "./runtime-guard-DTSD0F6o.js";
|
|
123
123
|
import { n as GATEWAY_DAEMON_RUNTIME_OPTIONS, t as DEFAULT_GATEWAY_DAEMON_RUNTIME } from "./daemon-runtime-CRT3STlu.js";
|
|
124
124
|
import { r as isSystemdUserServiceAvailable } from "./systemd-CYLBa7fG.js";
|
|
125
125
|
import { t as resolveGatewayService } from "./service-BzgRt9im.js";
|
|
126
|
-
import { r as healthCommand } from "./health-
|
|
126
|
+
import { r as healthCommand } from "./health-CPiopwcS.js";
|
|
127
127
|
import { t as ensureControlUiAssetsBuilt } from "./control-ui-assets-B5haX6bT.js";
|
|
128
128
|
import { t as formatHealthCheckFailure } from "./health-format-wax5NzZB.js";
|
|
129
|
-
import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-
|
|
129
|
+
import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-BM1W0ErJ.js";
|
|
130
130
|
import { t as runTui } from "./tui-BPgLehyv.js";
|
|
131
131
|
import os from "node:os";
|
|
132
132
|
import path from "node:path";
|
|
@@ -75,7 +75,7 @@ import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-rou
|
|
|
75
75
|
import { i as redactIdentifier, t as getActiveWebListener } from "./active-listener-jilCMH1M.js";
|
|
76
76
|
import { t as makeProxyFetch } from "./proxy-CRB9oCP5.js";
|
|
77
77
|
import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-6_GxvQYe.js";
|
|
78
|
-
import { r as createOutboundSendDepsFromCliSource, t as createDefaultDeps } from "./deps
|
|
78
|
+
import { r as createOutboundSendDepsFromCliSource, t as createDefaultDeps } from "./deps-7AsluBQV.js";
|
|
79
79
|
import { createRequire } from "node:module";
|
|
80
80
|
import * as fs$1 from "node:fs/promises";
|
|
81
81
|
import fs from "node:fs/promises";
|
|
@@ -23061,7 +23061,7 @@ const handleAntonCommand = async (params, _allowTextCommands) => {
|
|
|
23061
23061
|
};
|
|
23062
23062
|
const arg = body.slice(6).trim();
|
|
23063
23063
|
if (arg === "status" || arg === "") {
|
|
23064
|
-
const { antonStatus } = await import("./anton-
|
|
23064
|
+
const { antonStatus } = await import("./anton-fsipCiB9.js");
|
|
23065
23065
|
const lines = [];
|
|
23066
23066
|
await antonStatus({
|
|
23067
23067
|
log: (msg) => lines.push(msg),
|
|
@@ -23077,7 +23077,7 @@ const handleAntonCommand = async (params, _allowTextCommands) => {
|
|
|
23077
23077
|
return { shouldContinue: false };
|
|
23078
23078
|
}
|
|
23079
23079
|
if (arg === "stop") {
|
|
23080
|
-
const { antonStop } = await import("./anton-
|
|
23080
|
+
const { antonStop } = await import("./anton-fsipCiB9.js");
|
|
23081
23081
|
const lines = [];
|
|
23082
23082
|
await antonStop({
|
|
23083
23083
|
log: (msg) => lines.push(msg),
|
|
@@ -23115,8 +23115,8 @@ const handleAntonCommand = async (params, _allowTextCommands) => {
|
|
|
23115
23115
|
await sendProgress(replyCtx, text);
|
|
23116
23116
|
return { shouldContinue: false };
|
|
23117
23117
|
}
|
|
23118
|
-
const { runAnton, formatProgressMessage } = await import("./anton-
|
|
23119
|
-
const { createDefaultDeps } = await import("./deps
|
|
23118
|
+
const { runAnton, formatProgressMessage } = await import("./anton-fsipCiB9.js");
|
|
23119
|
+
const { createDefaultDeps } = await import("./deps-7AsluBQV.js").then((n) => n.n);
|
|
23120
23120
|
const { createNonExitingRuntime } = await import("./runtime-8mi3mpYB.js").then((n) => n.r);
|
|
23121
23121
|
const runtime = createNonExitingRuntime();
|
|
23122
23122
|
const deps = createDefaultDeps();
|
|
@@ -57269,7 +57269,7 @@ function createDiscordMessageHandler(params) {
|
|
|
57269
57269
|
try {
|
|
57270
57270
|
const messageText = resolveDiscordMessageText(data.message)?.trim();
|
|
57271
57271
|
if (messageText) {
|
|
57272
|
-
const { isAbortRequestText, emergencyStop, resolveSessionForEmergencyStop } = await import("./emergency-stop-
|
|
57272
|
+
const { isAbortRequestText, emergencyStop, resolveSessionForEmergencyStop } = await import("./emergency-stop-DdNkOB3t.js");
|
|
57273
57273
|
if (isAbortRequestText(messageText)) {
|
|
57274
57274
|
const { resolveAgentRoute } = await import("./resolve-route-DuttYY7A.js").then((n) => n.r);
|
|
57275
57275
|
const channelId = resolveDiscordMessageChannelId({
|
|
@@ -64767,7 +64767,7 @@ async function monitorIMessageProvider(opts = {}) {
|
|
|
64767
64767
|
}
|
|
64768
64768
|
const msgText = (message.text ?? "").trim();
|
|
64769
64769
|
if (msgText) {
|
|
64770
|
-
const { isAbortRequestText, emergencyStop, resolveSessionForEmergencyStop } = await import("./emergency-stop-
|
|
64770
|
+
const { isAbortRequestText, emergencyStop, resolveSessionForEmergencyStop } = await import("./emergency-stop-DdNkOB3t.js");
|
|
64771
64771
|
if (isAbortRequestText(msgText)) {
|
|
64772
64772
|
const { resolveAgentRoute } = await import("./resolve-route-DuttYY7A.js").then((n) => n.r);
|
|
64773
64773
|
const route = resolveAgentRoute({
|
|
@@ -67378,7 +67378,7 @@ function createSignalEventHandler(deps) {
|
|
|
67378
67378
|
const senderName = envelope.sourceName ?? senderDisplay;
|
|
67379
67379
|
const messageId = typeof envelope.timestamp === "number" ? String(envelope.timestamp) : void 0;
|
|
67380
67380
|
if (bodyText) {
|
|
67381
|
-
const { isAbortRequestText, emergencyStop, resolveSessionForEmergencyStop } = await import("./emergency-stop-
|
|
67381
|
+
const { isAbortRequestText, emergencyStop, resolveSessionForEmergencyStop } = await import("./emergency-stop-DdNkOB3t.js");
|
|
67382
67382
|
if (isAbortRequestText(bodyText)) {
|
|
67383
67383
|
const { resolveAgentRoute } = await import("./resolve-route-DuttYY7A.js").then((n) => n.r);
|
|
67384
67384
|
const route = resolveAgentRoute({
|
|
@@ -70760,7 +70760,7 @@ function createSlackMessageHandler(params) {
|
|
|
70760
70760
|
if (ctx.markMessageSeen(message.channel, message.ts)) return;
|
|
70761
70761
|
const rawText = (message.text ?? "").trim();
|
|
70762
70762
|
if (rawText) {
|
|
70763
|
-
const { isAbortRequestText, emergencyStop, resolveSessionForEmergencyStop } = await import("./emergency-stop-
|
|
70763
|
+
const { isAbortRequestText, emergencyStop, resolveSessionForEmergencyStop } = await import("./emergency-stop-DdNkOB3t.js");
|
|
70764
70764
|
if (isAbortRequestText(rawText)) {
|
|
70765
70765
|
const { resolveAgentRoute } = await import("./resolve-route-DuttYY7A.js").then((n) => n.r);
|
|
70766
70766
|
const route = resolveAgentRoute({
|
|
@@ -72954,7 +72954,7 @@ const registerTelegramHandlers = ({ cfg, accountId, bot, opts, runtime, mediaMax
|
|
|
72954
72954
|
const { ctx, msg, chatId, resolvedThreadId, storeAllowFrom, sendOversizeWarning, oversizeLogMessage } = params;
|
|
72955
72955
|
const text = typeof msg.text === "string" ? msg.text : void 0;
|
|
72956
72956
|
if (text) {
|
|
72957
|
-
const { isAbortRequestText, emergencyStop, resolveSessionForEmergencyStop } = await import("./emergency-stop-
|
|
72957
|
+
const { isAbortRequestText, emergencyStop, resolveSessionForEmergencyStop } = await import("./emergency-stop-DdNkOB3t.js");
|
|
72958
72958
|
if (isAbortRequestText(text)) {
|
|
72959
72959
|
const senderId = msg.from?.id ? String(msg.from.id) : "";
|
|
72960
72960
|
if (!senderId || !allowFrom?.length || allowFrom.includes(senderId)) {
|
|
@@ -76439,7 +76439,7 @@ function loadWebLoginQr() {
|
|
|
76439
76439
|
return webLoginQrPromise;
|
|
76440
76440
|
}
|
|
76441
76441
|
function loadWebChannel() {
|
|
76442
|
-
webChannelPromise ??= import("./web-
|
|
76442
|
+
webChannelPromise ??= import("./web-weF5X5MU.js");
|
|
76443
76443
|
return webChannelPromise;
|
|
76444
76444
|
}
|
|
76445
76445
|
function loadWhatsAppActions() {
|
|
@@ -22,7 +22,7 @@ import { a as logoutWeb, i as logWebSelfId, l as readWebSelfId, n as getWebAuthA
|
|
|
22
22
|
import { a as resolveSlackWebClientOptions, c as buildSlackBlocksFallbackText, i as createSlackWebClient, l as parseSlackTarget, o as parseSlackBlocksInput, s as validateSlackBlocksArray, t as sendMessageSlack, u as resolveSlackChannelId } from "./send-J10cQN4A.js";
|
|
23
23
|
import { $ as fetchChannelPermissionsDiscord, A as unpinMessageDiscord, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveTimestampMs, D as pinMessageDiscord, Dt as normalizeChannelSlug, E as listThreadsDiscord, Et as buildChannelKeyCandidates, F as fetchMemberInfoDiscord, G as uploadStickerDiscord, H as timeoutMemberDiscord, I as fetchRoleInfoDiscord, J as editChannelDiscord, K as createChannelDiscord, L as fetchVoiceStatusDiscord, M as banMemberDiscord, N as createScheduledEventDiscord, O as readMessagesDiscord, Ot as resolveChannelEntryMatchWithFallback, P as fetchChannelInfoDiscord, Q as stripUndefinedFields, R as kickMemberDiscord, S as deleteMessageDiscord, St as resolveDiscordSystemLocation, T as listPinsDiscord, Tt as applyChannelMatchMeta, U as listGuildEmojisDiscord, V as removeRoleDiscord, W as uploadEmojiDiscord, X as removeChannelPermissionDiscord, Y as moveChannelDiscord, Z as setChannelPermissionDiscord, _ as sendPollDiscord, _t as resolveDiscordShouldRequireMention, a as removeReactionDiscord, at as resolveDiscordChannelId, b as sendWebhookMessageDiscord, bt as formatDiscordReactionEmoji, c as formatDiscordComponentEventText, ct as allowListMatches$1, d as parseDiscordModalCustomId, dt as normalizeDiscordSlug, et as hasAnyGuildPermissionDiscord, f as parseDiscordModalCustomIdForCarbon, ft as resolveDiscordAllowListMatch, g as sendMessageDiscord, gt as resolveDiscordOwnerAllowFrom, h as resolveDiscordModalEntry, ht as resolveDiscordMemberAccessState, i as removeOwnReactionsDiscord, it as parseDiscordTarget, j as addRoleDiscord, k as searchMessagesDiscord, l as parseDiscordComponentCustomId, lt as isDiscordGroupAllowedByPolicy, m as resolveDiscordComponentEntry, mt as resolveDiscordGuildEntry, n as fetchReactionsDiscord, nt as createDiscordClient, o as sendDiscordComponentMessage, ot as listDiscordDirectoryGroupsLive, p as readDiscordComponentSpec, pt as resolveDiscordChannelConfigWithFallback, q as deleteChannelDiscord, r as reactMessageDiscord, rt as createDiscordRestClient, s as createDiscordFormModal, st as listDiscordDirectoryPeersLive, tt as chunkDiscordTextWithMode, u as parseDiscordComponentCustomIdForCarbon, ut as normalizeDiscordAllowList, v as sendStickerDiscord, vt as resolveGroupDmAllow, w as fetchMessageDiscord, wt as fetchDiscord, x as createThreadDiscord, xt as formatDiscordUserTag, y as sendVoiceMessageDiscord, yt as shouldEmitDiscordReactionNotification, z as listGuildChannelsDiscord } from "./send-DLZt92Da.js";
|
|
24
24
|
import { n as generateSecureUuid, t as generateSecureToken } from "./secure-random-BvP4jdcV.js";
|
|
25
|
-
import { C as initializeGlobalHookRunner, S as getGlobalHookRunner, _ as createReplyToModeFilterForChannel, a as normalizeOutboundPayloadsForJson, b as normalizeChannelTargetInput, c as parseReplyDirectives, d as applyReplyThreading, f as filterMessagingToolDuplicates, g as shouldSuppressReasoningPayload, h as shouldSuppressMessagingToolReplies, i as normalizeOutboundPayloads, l as splitMediaFromOutput, m as isRenderablePayload, o as normalizeReplyPayloadsForDelivery, p as filterMessagingToolMediaDuplicates, r as formatOutboundPayloadLog, s as throwIfAborted, t as deliverOutboundPayloads, u as applyReplyTagsToPayload, v as resolveReplyToMode, x as normalizeTargetForProvider, y as buildTargetResolverSignature } from "./deliver-
|
|
25
|
+
import { C as initializeGlobalHookRunner, S as getGlobalHookRunner, _ as createReplyToModeFilterForChannel, a as normalizeOutboundPayloadsForJson, b as normalizeChannelTargetInput, c as parseReplyDirectives, d as applyReplyThreading, f as filterMessagingToolDuplicates, g as shouldSuppressReasoningPayload, h as shouldSuppressMessagingToolReplies, i as normalizeOutboundPayloads, l as splitMediaFromOutput, m as isRenderablePayload, o as normalizeReplyPayloadsForDelivery, p as filterMessagingToolMediaDuplicates, r as formatOutboundPayloadLog, s as throwIfAborted, t as deliverOutboundPayloads, u as applyReplyTagsToPayload, v as resolveReplyToMode, x as normalizeTargetForProvider, y as buildTargetResolverSignature } from "./deliver-whAbSPLk.js";
|
|
26
26
|
import { a as logMessageProcessed, c as logWebhookError, d as startDiagnosticHeartbeat, f as stopDiagnosticHeartbeat, i as logLaneEnqueue, l as logWebhookProcessed, m as isDiagnosticsEnabled, o as logMessageQueued, p as emitDiagnosticEvent, r as logLaneDequeue, s as logSessionStateChange, t as diag, u as logWebhookReceived } from "./diagnostic-jHCdo9Am.js";
|
|
27
27
|
import { r as getDiagnosticSessionState } from "./diagnostic-session-state-Bx2Le86J.js";
|
|
28
28
|
import { n as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-BRVjft5i.js";
|
|
@@ -30,8 +30,8 @@ import { $ as readJsonFileWithFallback, A as extractTelegramLocation, B as norma
|
|
|
30
30
|
import { c as detectMime, d as imageMimeFromFormat, f as isAudioFileName, g as MAX_IMAGE_BYTES, i as getImageMetadata, l as extensionForMime, p as isGifMedia, s as resizeToJpeg, v as mediaKindFromMime } from "./image-ops-BDG-MYYV.js";
|
|
31
31
|
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-Dic-M5qw.js";
|
|
32
32
|
import { a as isMarkdownCapableMessageChannel, c as resolveGatewayMessageChannel, d as GATEWAY_CLIENT_MODES, f as GATEWAY_CLIENT_NAMES, i as isInternalMessageChannel, l as resolveMessageChannel, n as isDeliverableMessageChannel, o as listDeliverableMessageChannels, r as isGatewayMessageChannel, s as normalizeMessageChannel, t as INTERNAL_MESSAGE_CHANNEL, u as GATEWAY_CLIENT_IDS } from "./message-channel-DqqfOIdx.js";
|
|
33
|
-
import { $ as stripPluginOnlyAllowlist, A as isTimeoutErrorMessage, B as resolveBrowserConfig, C as isCompactionFailureError, D as isLikelyContextOverflowError, E as isFailoverErrorMessage, F as ensureSandboxWorkspaceForSession, G as resolveGatewayCredentialsFromConfig, H as getBridgeAuthForPort, I as resolveSandboxContext, J as applyOwnerOnlyToolPolicy, K as trimToUndefined$1, L as resolveSandboxRuntimeStatus, M as parseImageDimensionError, N as parseImageSizeError, O as isRateLimitAssistantError, P as sanitizeUserFacingText, Q as mergeAlsoAllowPolicy, R as createBrowserRouteContext, S as isCloudCodeAssistFormatError, T as isFailoverAssistantError, U as ensureBrowserControlAuth, V as resolveProfile, W as resolveBrowserControlAuth, X as collectExplicitAllowlist, Y as buildPluginToolGroups, Z as expandPolicyWithPluginGroups, _ as formatRawAssistantErrorForUi, a as isMessagingToolDuplicateNormalized, at as buildBootstrapContextFiles, b as isAuthPermanentErrorMessage, c as extractToolCallsFromAssistant, ct as resolveBootstrapTotalMaxChars, d as downgradeOpenAIReasoningBlocks, et as expandToolGroups, f as isGoogleModelApi, g as formatBillingErrorMessage, h as formatAssistantErrorText, it as matchesAnyGlobPattern, j as isTransientHttpError, k as isRawApiErrorPayload, l as extractToolResultId, lt as sanitizeGoogleTurnOrdering, m as classifyFailoverReason, n as validateGeminiTurns, nt as resolveToolProfilePolicy, o as normalizeTextForComparison, ot as ensureSessionHeader, p as BILLING_ERROR_USER_MESSAGE, q as resolveSandboxConfigForAgent, r as pickFallbackThinkingLevel, rt as compileGlobPatterns, s as sanitizeSessionMessagesImages, st as resolveBootstrapMaxChars, t as validateAnthropicTurns, tt as normalizeToolName, u as sanitizeToolCallIdsForCloudCodeAssist, v as getApiErrorPayloadFingerprint, w as isContextOverflowError, x as isBillingAssistantError, y as isAuthAssistantError, z as registerBrowserRoutes } from "./pi-embedded-helpers-
|
|
34
|
-
import { C as ensureChromeExtensionRelayServer, F as isSecureWebSocketUrl, O as DEFAULT_UPLOAD_DIR, P as isLoopbackHost, R as DEFAULT_AI_SNAPSHOT_MAX_CHARS, T as rawDataToString, k as resolveExistingPathsWithinRoot, s as resolveLsofCommandSync } from "./chrome-
|
|
33
|
+
import { $ as stripPluginOnlyAllowlist, A as isTimeoutErrorMessage, B as resolveBrowserConfig, C as isCompactionFailureError, D as isLikelyContextOverflowError, E as isFailoverErrorMessage, F as ensureSandboxWorkspaceForSession, G as resolveGatewayCredentialsFromConfig, H as getBridgeAuthForPort, I as resolveSandboxContext, J as applyOwnerOnlyToolPolicy, K as trimToUndefined$1, L as resolveSandboxRuntimeStatus, M as parseImageDimensionError, N as parseImageSizeError, O as isRateLimitAssistantError, P as sanitizeUserFacingText, Q as mergeAlsoAllowPolicy, R as createBrowserRouteContext, S as isCloudCodeAssistFormatError, T as isFailoverAssistantError, U as ensureBrowserControlAuth, V as resolveProfile, W as resolveBrowserControlAuth, X as collectExplicitAllowlist, Y as buildPluginToolGroups, Z as expandPolicyWithPluginGroups, _ as formatRawAssistantErrorForUi, a as isMessagingToolDuplicateNormalized, at as buildBootstrapContextFiles, b as isAuthPermanentErrorMessage, c as extractToolCallsFromAssistant, ct as resolveBootstrapTotalMaxChars, d as downgradeOpenAIReasoningBlocks, et as expandToolGroups, f as isGoogleModelApi, g as formatBillingErrorMessage, h as formatAssistantErrorText, it as matchesAnyGlobPattern, j as isTransientHttpError, k as isRawApiErrorPayload, l as extractToolResultId, lt as sanitizeGoogleTurnOrdering, m as classifyFailoverReason, n as validateGeminiTurns, nt as resolveToolProfilePolicy, o as normalizeTextForComparison, ot as ensureSessionHeader, p as BILLING_ERROR_USER_MESSAGE, q as resolveSandboxConfigForAgent, r as pickFallbackThinkingLevel, rt as compileGlobPatterns, s as sanitizeSessionMessagesImages, st as resolveBootstrapMaxChars, t as validateAnthropicTurns, tt as normalizeToolName, u as sanitizeToolCallIdsForCloudCodeAssist, v as getApiErrorPayloadFingerprint, w as isContextOverflowError, x as isBillingAssistantError, y as isAuthAssistantError, z as registerBrowserRoutes } from "./pi-embedded-helpers-Ct2rwp-P.js";
|
|
34
|
+
import { C as ensureChromeExtensionRelayServer, F as isSecureWebSocketUrl, O as DEFAULT_UPLOAD_DIR, P as isLoopbackHost, R as DEFAULT_AI_SNAPSHOT_MAX_CHARS, T as rawDataToString, k as resolveExistingPathsWithinRoot, s as resolveLsofCommandSync } from "./chrome-Do5potHV.js";
|
|
35
35
|
import { i as isBlockedHostnameOrIp, o as normalizeHostname, t as SsrFBlockedError } from "./ssrf-DappnhDp.js";
|
|
36
36
|
import { c as assertSandboxPath, d as resolveSandboxedMediaSource, f as applySkillEnvOverrides, i as resolveSkillsPromptForRun, l as resolveSandboxInputPath, n as buildWorkspaceSkillSnapshot, p as applySkillEnvOverridesFromSnapshot, r as loadWorkspaceSkillEntries, s as assertMediaNotDataUrl } from "./skills-nQcWk6Z6.js";
|
|
37
37
|
import { t as PATH_ALIAS_POLICIES } from "./path-alias-guards-CGbCFqW8.js";
|
|
@@ -46,7 +46,7 @@ import { a as resolveSessionFilePathOptions, i as resolveSessionFilePath, l as r
|
|
|
46
46
|
import { t as emitSessionTranscriptUpdate } from "./transcript-events-BaUINxJH.js";
|
|
47
47
|
import { a as canonicalizeBase64, i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, o as estimateBase64DecodedBytes, r as sanitizeToolResultImages } from "./tool-images-CpZSs-zE.js";
|
|
48
48
|
import { a as normalizeReasoningLevel, c as normalizeVerboseLevel, i as normalizeElevatedLevel, l as resolveResponseUsageMode, n as formatXHighModelHint, o as normalizeThinkLevel, s as normalizeUsageDisplay, t as formatThinkingLevels, u as supportsXHighThinking } from "./thinking-BFsWfunr.js";
|
|
49
|
-
import { C as extractTextFromChatContent, S as isInsideCode, _ as stripMinimaxToolCallXml, a as decodeDataUrl, b as stripReasoningTagsFromText, c as extractAssistantText$1, d as extractThinkingFromTaggedText, f as formatReasoningMessage, g as stripDowngradedToolCallText, h as promoteThinkingTagsToBlocks, i as coerceImageModelConfig, l as extractAssistantThinking, m as isAssistantMessage, o as resolveProviderVisionModelFromConfig, p as inferToolMetaFromArgs, r as coerceImageAssistantText, s as minimaxUnderstandImage, u as extractThinkingFromTaggedStream, v as stripThinkingTagsFromText, w as ensureIdleHandsModelsJson, x as findCodeRegions, y as resolveToolDisplay } from "./image-
|
|
49
|
+
import { C as extractTextFromChatContent, S as isInsideCode, _ as stripMinimaxToolCallXml, a as decodeDataUrl, b as stripReasoningTagsFromText, c as extractAssistantText$1, d as extractThinkingFromTaggedText, f as formatReasoningMessage, g as stripDowngradedToolCallText, h as promoteThinkingTagsToBlocks, i as coerceImageModelConfig, l as extractAssistantThinking, m as isAssistantMessage, o as resolveProviderVisionModelFromConfig, p as inferToolMetaFromArgs, r as coerceImageAssistantText, s as minimaxUnderstandImage, u as extractThinkingFromTaggedStream, v as stripThinkingTagsFromText, w as ensureIdleHandsModelsJson, x as findCodeRegions, y as resolveToolDisplay } from "./image-BAsQlUqT.js";
|
|
50
50
|
import { n as resolveMemorySearchConfig } from "./manager-DYOflU5p.js";
|
|
51
51
|
import { n as fetchWithTimeout, t as bindAbortRelay } from "./fetch-timeout-B7YMixjc.js";
|
|
52
52
|
import { t as fetchWithSsrFGuard } from "./fetch-guard-BdCPmLBP.js";
|
|
@@ -60,7 +60,7 @@ import { a as loadWebMedia, i as getDefaultLocalRoots } from "./ir-BwkcXPZC.js";
|
|
|
60
60
|
import { _ as isNativeCommandsExplicitlyDisabled, a as listChatCommands, b as resolveNativeSkillsEnabled, c as listNativeCommandSpecsForConfig, d as parseCommandArgs, f as resolveCommandArgChoices, g as isCommandFlagEnabled, h as shouldHandleTextCommands, i as isCommandEnabled, l as maybeResolveTextAlias, m as serializeCommandArgs, o as listChatCommandsForConfig, p as resolveCommandArgMenu, r as findCommandByNativeName, s as listNativeCommandSpecs, t as buildCommandTextFromArgs, u as normalizeCommandBody, v as isRestartEnabled, y as resolveNativeCommandsEnabled } from "./commands-registry-1-Rv2-IS.js";
|
|
61
61
|
import { c as getSkillsSnapshotVersion, d as createAsyncLock, f as readJsonFile, i as resolveSkillCommandInvocation, l as pruneExpiredPending, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, p as writeJsonAtomic, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames, u as resolvePairingPaths } from "./skill-commands-CHpRgsOw.js";
|
|
62
62
|
import { r as normalizeInboundTextNewlines, t as finalizeInboundContext } from "./inbound-context-DZmR6jxY.js";
|
|
63
|
-
import { _ as resolveMediaUnderstandingScope, a as resolveMediaAttachmentLocalRoots, c as loadModelCatalog, d as resolveAttachmentKind, f as buildRandomTempFilePath, g as normalizeMediaUnderstandingChatType, h as resolveTimeoutMs$2, i as resolveAutoImageModel, l as modelSupportsVision, m as resolveConcurrency, n as createMediaAttachmentCache, o as runCapability, p as registerUnhandledRejectionHandler, r as normalizeMediaAttachments, s as findModelInCatalog, t as buildProviderRegistry, v as CLI_OUTPUT_MAX_BUFFER, y as applyTemplate } from "./runner-
|
|
63
|
+
import { _ as resolveMediaUnderstandingScope, a as resolveMediaAttachmentLocalRoots, c as loadModelCatalog, d as resolveAttachmentKind, f as buildRandomTempFilePath, g as normalizeMediaUnderstandingChatType, h as resolveTimeoutMs$2, i as resolveAutoImageModel, l as modelSupportsVision, m as resolveConcurrency, n as createMediaAttachmentCache, o as runCapability, p as registerUnhandledRejectionHandler, r as normalizeMediaAttachments, s as findModelInCatalog, t as buildProviderRegistry, v as CLI_OUTPUT_MAX_BUFFER, y as applyTemplate } from "./runner-Bv_BA3vd.js";
|
|
64
64
|
import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "./fetch-ChVgjTkv.js";
|
|
65
65
|
import { n as recordCommandPoll, r as resetCommandPollCount } from "./command-poll-backoff-DTHhQmHb.js";
|
|
66
66
|
import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-C3LJmSjf.js";
|
|
@@ -72,7 +72,7 @@ import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-rou
|
|
|
72
72
|
import { i as redactIdentifier, t as getActiveWebListener } from "./active-listener-BnWIC6Jc.js";
|
|
73
73
|
import { t as makeProxyFetch } from "./proxy-CNZpb4NE.js";
|
|
74
74
|
import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-CqYEEgmA.js";
|
|
75
|
-
import { r as createOutboundSendDepsFromCliSource, t as createDefaultDeps } from "./deps-
|
|
75
|
+
import { r as createOutboundSendDepsFromCliSource, t as createDefaultDeps } from "./deps-CIF1pkFi.js";
|
|
76
76
|
import { createRequire } from "node:module";
|
|
77
77
|
import * as path$1 from "node:path";
|
|
78
78
|
import path, { isAbsolute } from "node:path";
|
|
@@ -91,7 +91,7 @@ import { CURRENT_SESSION_VERSION, DefaultResourceLoader, SessionManager, Setting
|
|
|
91
91
|
import { EdgeTTS } from "node-edge-tts";
|
|
92
92
|
import { createServer } from "node:http";
|
|
93
93
|
import { ProxyAgent, fetch as fetch$1 } from "undici";
|
|
94
|
-
import WebSocket, { WebSocket
|
|
94
|
+
import WebSocket$1, { WebSocket } from "ws";
|
|
95
95
|
import { Buffer as Buffer$1 } from "node:buffer";
|
|
96
96
|
import { createJiti } from "jiti";
|
|
97
97
|
import { Type } from "@sinclair/typebox";
|
|
@@ -6371,7 +6371,7 @@ var GatewayClient = class {
|
|
|
6371
6371
|
if (fingerprint !== expected) return /* @__PURE__ */ new Error("gateway tls fingerprint mismatch");
|
|
6372
6372
|
});
|
|
6373
6373
|
}
|
|
6374
|
-
this.ws = new WebSocket
|
|
6374
|
+
this.ws = new WebSocket(url, wsOptions);
|
|
6375
6375
|
this.ws.on("open", () => {
|
|
6376
6376
|
if (url.startsWith("wss://") && this.opts.tlsFingerprint) {
|
|
6377
6377
|
const tlsError = this.validateTlsFingerprint();
|
|
@@ -6567,7 +6567,7 @@ var GatewayClient = class {
|
|
|
6567
6567
|
const connectChallengeTimeoutMs = typeof rawConnectDelayMs === "number" && Number.isFinite(rawConnectDelayMs) ? Math.max(250, Math.min(1e4, rawConnectDelayMs)) : 2e3;
|
|
6568
6568
|
if (this.connectTimer) clearTimeout(this.connectTimer);
|
|
6569
6569
|
this.connectTimer = setTimeout(() => {
|
|
6570
|
-
if (this.connectSent || this.ws?.readyState !== WebSocket
|
|
6570
|
+
if (this.connectSent || this.ws?.readyState !== WebSocket.OPEN) return;
|
|
6571
6571
|
this.opts.onConnectError?.(/* @__PURE__ */ new Error("gateway connect challenge timeout"));
|
|
6572
6572
|
this.ws?.close(1008, "connect challenge timeout");
|
|
6573
6573
|
}, connectChallengeTimeoutMs);
|
|
@@ -6609,7 +6609,7 @@ var GatewayClient = class {
|
|
|
6609
6609
|
return null;
|
|
6610
6610
|
}
|
|
6611
6611
|
async request(method, params, opts) {
|
|
6612
|
-
if (!this.ws || this.ws.readyState !== WebSocket
|
|
6612
|
+
if (!this.ws || this.ws.readyState !== WebSocket.OPEN) throw new Error("gateway not connected");
|
|
6613
6613
|
const id = randomUUID();
|
|
6614
6614
|
const frame = {
|
|
6615
6615
|
type: "req",
|
|
@@ -7933,7 +7933,7 @@ async function routeReply(params) {
|
|
|
7933
7933
|
const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
|
|
7934
7934
|
const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
|
|
7935
7935
|
try {
|
|
7936
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
7936
|
+
const { deliverOutboundPayloads } = await import("./deliver-whAbSPLk.js").then((n) => n.n);
|
|
7937
7937
|
const outboundSession = buildOutboundSessionContext({
|
|
7938
7938
|
cfg,
|
|
7939
7939
|
agentId: resolvedAgentId,
|
|
@@ -23058,7 +23058,7 @@ const handleAntonCommand = async (params, _allowTextCommands) => {
|
|
|
23058
23058
|
};
|
|
23059
23059
|
const arg = body.slice(6).trim();
|
|
23060
23060
|
if (arg === "status" || arg === "") {
|
|
23061
|
-
const { antonStatus } = await import("./anton-
|
|
23061
|
+
const { antonStatus } = await import("./anton-BzjiLD-a.js");
|
|
23062
23062
|
const lines = [];
|
|
23063
23063
|
await antonStatus({
|
|
23064
23064
|
log: (msg) => lines.push(msg),
|
|
@@ -23074,7 +23074,7 @@ const handleAntonCommand = async (params, _allowTextCommands) => {
|
|
|
23074
23074
|
return { shouldContinue: false };
|
|
23075
23075
|
}
|
|
23076
23076
|
if (arg === "stop") {
|
|
23077
|
-
const { antonStop } = await import("./anton-
|
|
23077
|
+
const { antonStop } = await import("./anton-BzjiLD-a.js");
|
|
23078
23078
|
const lines = [];
|
|
23079
23079
|
await antonStop({
|
|
23080
23080
|
log: (msg) => lines.push(msg),
|
|
@@ -23112,8 +23112,8 @@ const handleAntonCommand = async (params, _allowTextCommands) => {
|
|
|
23112
23112
|
await sendProgress(replyCtx, text);
|
|
23113
23113
|
return { shouldContinue: false };
|
|
23114
23114
|
}
|
|
23115
|
-
const { runAnton, formatProgressMessage } = await import("./anton-
|
|
23116
|
-
const { createDefaultDeps } = await import("./deps-
|
|
23115
|
+
const { runAnton, formatProgressMessage } = await import("./anton-BzjiLD-a.js");
|
|
23116
|
+
const { createDefaultDeps } = await import("./deps-CIF1pkFi.js").then((n) => n.n);
|
|
23117
23117
|
const { createNonExitingRuntime } = await import("./runtime-8mi3mpYB.js").then((n) => n.r);
|
|
23118
23118
|
const runtime = createNonExitingRuntime();
|
|
23119
23119
|
const deps = createDefaultDeps();
|
|
@@ -47425,7 +47425,7 @@ async function deliverSessionMaintenanceWarning(params) {
|
|
|
47425
47425
|
return;
|
|
47426
47426
|
}
|
|
47427
47427
|
try {
|
|
47428
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
47428
|
+
const { deliverOutboundPayloads } = await import("./deliver-whAbSPLk.js").then((n) => n.n);
|
|
47429
47429
|
const outboundSession = buildOutboundSessionContext({
|
|
47430
47430
|
cfg: params.cfg,
|
|
47431
47431
|
sessionKey: params.sessionKey
|
|
@@ -51861,7 +51861,7 @@ async function describeStickerImage(params) {
|
|
|
51861
51861
|
logVerbose(`telegram: describing sticker with ${provider}/${model}`);
|
|
51862
51862
|
try {
|
|
51863
51863
|
const buffer = await fs.readFile(imagePath);
|
|
51864
|
-
const { describeImageWithModel } = await import("./image-
|
|
51864
|
+
const { describeImageWithModel } = await import("./image-BAsQlUqT.js").then((n) => n.n);
|
|
51865
51865
|
return (await describeImageWithModel({
|
|
51866
51866
|
buffer,
|
|
51867
51867
|
fileName: "sticker.webp",
|
|
@@ -54789,7 +54789,7 @@ async function preflightDiscordMessage(params) {
|
|
|
54789
54789
|
let preflightTranscript;
|
|
54790
54790
|
const hasAudioAttachment = message.attachments?.some((att) => att.contentType?.startsWith("audio/"));
|
|
54791
54791
|
if (!isDirectMessage && shouldRequireMention && hasAudioAttachment && !baseText && mentionRegexes.length > 0) try {
|
|
54792
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
54792
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-CSSlgO89.js");
|
|
54793
54793
|
const audioPaths = message.attachments?.filter((att) => att.contentType?.startsWith("audio/")).map((att) => att.url) ?? [];
|
|
54794
54794
|
if (audioPaths.length > 0) preflightTranscript = await transcribeFirstAudio({
|
|
54795
54795
|
ctx: {
|
|
@@ -57266,7 +57266,7 @@ function createDiscordMessageHandler(params) {
|
|
|
57266
57266
|
try {
|
|
57267
57267
|
const messageText = resolveDiscordMessageText(data.message)?.trim();
|
|
57268
57268
|
if (messageText) {
|
|
57269
|
-
const { isAbortRequestText, emergencyStop, resolveSessionForEmergencyStop } = await import("./emergency-stop-
|
|
57269
|
+
const { isAbortRequestText, emergencyStop, resolveSessionForEmergencyStop } = await import("./emergency-stop-DpTSZhRz.js");
|
|
57270
57270
|
if (isAbortRequestText(messageText)) {
|
|
57271
57271
|
const { resolveAgentRoute } = await import("./resolve-route-BI3VjtwE.js").then((n) => n.r);
|
|
57272
57272
|
const channelId = resolveDiscordMessageChannelId({
|
|
@@ -62712,7 +62712,7 @@ function createDiscordGatewayPlugin(params) {
|
|
|
62712
62712
|
return super.registerClient(client);
|
|
62713
62713
|
}
|
|
62714
62714
|
createWebSocket(url) {
|
|
62715
|
-
return new WebSocket(url, { agent: wsAgent });
|
|
62715
|
+
return new WebSocket$1(url, { agent: wsAgent });
|
|
62716
62716
|
}
|
|
62717
62717
|
}
|
|
62718
62718
|
return new ProxyGatewayPlugin();
|
|
@@ -64764,7 +64764,7 @@ async function monitorIMessageProvider(opts = {}) {
|
|
|
64764
64764
|
}
|
|
64765
64765
|
const msgText = (message.text ?? "").trim();
|
|
64766
64766
|
if (msgText) {
|
|
64767
|
-
const { isAbortRequestText, emergencyStop, resolveSessionForEmergencyStop } = await import("./emergency-stop-
|
|
64767
|
+
const { isAbortRequestText, emergencyStop, resolveSessionForEmergencyStop } = await import("./emergency-stop-DpTSZhRz.js");
|
|
64768
64768
|
if (isAbortRequestText(msgText)) {
|
|
64769
64769
|
const { resolveAgentRoute } = await import("./resolve-route-BI3VjtwE.js").then((n) => n.r);
|
|
64770
64770
|
const route = resolveAgentRoute({
|
|
@@ -67375,7 +67375,7 @@ function createSignalEventHandler(deps) {
|
|
|
67375
67375
|
const senderName = envelope.sourceName ?? senderDisplay;
|
|
67376
67376
|
const messageId = typeof envelope.timestamp === "number" ? String(envelope.timestamp) : void 0;
|
|
67377
67377
|
if (bodyText) {
|
|
67378
|
-
const { isAbortRequestText, emergencyStop, resolveSessionForEmergencyStop } = await import("./emergency-stop-
|
|
67378
|
+
const { isAbortRequestText, emergencyStop, resolveSessionForEmergencyStop } = await import("./emergency-stop-DpTSZhRz.js");
|
|
67379
67379
|
if (isAbortRequestText(bodyText)) {
|
|
67380
67380
|
const { resolveAgentRoute } = await import("./resolve-route-BI3VjtwE.js").then((n) => n.r);
|
|
67381
67381
|
const route = resolveAgentRoute({
|
|
@@ -70757,7 +70757,7 @@ function createSlackMessageHandler(params) {
|
|
|
70757
70757
|
if (ctx.markMessageSeen(message.channel, message.ts)) return;
|
|
70758
70758
|
const rawText = (message.text ?? "").trim();
|
|
70759
70759
|
if (rawText) {
|
|
70760
|
-
const { isAbortRequestText, emergencyStop, resolveSessionForEmergencyStop } = await import("./emergency-stop-
|
|
70760
|
+
const { isAbortRequestText, emergencyStop, resolveSessionForEmergencyStop } = await import("./emergency-stop-DpTSZhRz.js");
|
|
70761
70761
|
if (isAbortRequestText(rawText)) {
|
|
70762
70762
|
const { resolveAgentRoute } = await import("./resolve-route-BI3VjtwE.js").then((n) => n.r);
|
|
70763
70763
|
const route = resolveAgentRoute({
|
|
@@ -72951,7 +72951,7 @@ const registerTelegramHandlers = ({ cfg, accountId, bot, opts, runtime, mediaMax
|
|
|
72951
72951
|
const { ctx, msg, chatId, resolvedThreadId, storeAllowFrom, sendOversizeWarning, oversizeLogMessage } = params;
|
|
72952
72952
|
const text = typeof msg.text === "string" ? msg.text : void 0;
|
|
72953
72953
|
if (text) {
|
|
72954
|
-
const { isAbortRequestText, emergencyStop, resolveSessionForEmergencyStop } = await import("./emergency-stop-
|
|
72954
|
+
const { isAbortRequestText, emergencyStop, resolveSessionForEmergencyStop } = await import("./emergency-stop-DpTSZhRz.js");
|
|
72955
72955
|
if (isAbortRequestText(text)) {
|
|
72956
72956
|
const senderId = msg.from?.id ? String(msg.from.id) : "";
|
|
72957
72957
|
if (!senderId || !allowFrom?.length || allowFrom.includes(senderId)) {
|
|
@@ -73838,7 +73838,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, replyMedia =
|
|
|
73838
73838
|
const hasAudio = allMedia.some((media) => media.contentType?.startsWith("audio/"));
|
|
73839
73839
|
let preflightTranscript;
|
|
73840
73840
|
if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0) try {
|
|
73841
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
73841
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-CSSlgO89.js");
|
|
73842
73842
|
preflightTranscript = await transcribeFirstAudio({
|
|
73843
73843
|
ctx: {
|
|
73844
73844
|
MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
|
|
@@ -76436,7 +76436,7 @@ function loadWebLoginQr() {
|
|
|
76436
76436
|
return webLoginQrPromise;
|
|
76437
76437
|
}
|
|
76438
76438
|
function loadWebChannel() {
|
|
76439
|
-
webChannelPromise ??= import("./web-
|
|
76439
|
+
webChannelPromise ??= import("./web-BJk05p_4.js");
|
|
76440
76440
|
return webChannelPromise;
|
|
76441
76441
|
}
|
|
76442
76442
|
function loadWhatsAppActions() {
|
|
@@ -9,7 +9,7 @@ import { t as formatCliCommand } from "./command-format-BAxx4PW5.js";
|
|
|
9
9
|
import { n as parseBooleanValue } from "./env-BpvqFD5n.js";
|
|
10
10
|
import { t as generateSecureToken } from "./secure-random-BvP4jdcV.js";
|
|
11
11
|
import { i as getImageMetadata, n as buildImageResizeSideGrid, s as resizeToJpeg, t as IMAGE_REDUCE_QUALITY_STEPS } from "./image-ops-BDG-MYYV.js";
|
|
12
|
-
import { B as DEFAULT_BROWSER_EVALUATE_ENABLED, C as ensureChromeExtensionRelayServer, D as DEFAULT_TRACE_DIR, E as DEFAULT_DOWNLOAD_DIR, H as DEFAULT_IDLEHANDS_BROWSER_ENABLED, I as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, L as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS, N as normalizeBrowserFormField, O as DEFAULT_UPLOAD_DIR, P as isLoopbackHost, R as DEFAULT_AI_SNAPSHOT_MAX_CHARS, U as DEFAULT_IDLEHANDS_BROWSER_PROFILE_NAME, V as DEFAULT_IDLEHANDS_BROWSER_COLOR, _ as withBrowserNavigationPolicy, a as resolveIdleHandsUserDataDir, b as fetchOk, c as resolveBrowserExecutableForPlatform, f as normalizeCdpWsUrl, g as assertBrowserNavigationResultAllowed, h as assertBrowserNavigationAllowed, i as launchIdleHandsChrome, j as resolveWritablePathWithinRoot, k as resolveExistingPathsWithinRoot, l as captureScreenshot, m as InvalidBrowserNavigationUrlError, n as isChromeCdpReady, o as stopIdleHandsChrome, p as snapshotAria, r as isChromeReachable, u as createTargetViaCdp, v as appendCdpPath, w as stopChromeExtensionRelayServer, y as fetchJson, z as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME } from "./chrome-
|
|
12
|
+
import { B as DEFAULT_BROWSER_EVALUATE_ENABLED, C as ensureChromeExtensionRelayServer, D as DEFAULT_TRACE_DIR, E as DEFAULT_DOWNLOAD_DIR, H as DEFAULT_IDLEHANDS_BROWSER_ENABLED, I as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, L as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS, N as normalizeBrowserFormField, O as DEFAULT_UPLOAD_DIR, P as isLoopbackHost, R as DEFAULT_AI_SNAPSHOT_MAX_CHARS, U as DEFAULT_IDLEHANDS_BROWSER_PROFILE_NAME, V as DEFAULT_IDLEHANDS_BROWSER_COLOR, _ as withBrowserNavigationPolicy, a as resolveIdleHandsUserDataDir, b as fetchOk, c as resolveBrowserExecutableForPlatform, f as normalizeCdpWsUrl, g as assertBrowserNavigationResultAllowed, h as assertBrowserNavigationAllowed, i as launchIdleHandsChrome, j as resolveWritablePathWithinRoot, k as resolveExistingPathsWithinRoot, l as captureScreenshot, m as InvalidBrowserNavigationUrlError, n as isChromeCdpReady, o as stopIdleHandsChrome, p as snapshotAria, r as isChromeReachable, u as createTargetViaCdp, v as appendCdpPath, w as stopChromeExtensionRelayServer, y as fetchJson, z as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME } from "./chrome-Do5potHV.js";
|
|
13
13
|
import { t as SsrFBlockedError } from "./ssrf-DappnhDp.js";
|
|
14
14
|
import { a as syncSkillsToWorkspace, l as resolveSandboxInputPath, m as sanitizeEnvVars, u as resolveSandboxPath } from "./skills-nQcWk6Z6.js";
|
|
15
15
|
import { t as PATH_ALIAS_POLICIES } from "./path-alias-guards-CGbCFqW8.js";
|
|
@@ -1181,7 +1181,7 @@ function isModuleNotFoundError(err) {
|
|
|
1181
1181
|
}
|
|
1182
1182
|
async function loadPwAiModule(mode) {
|
|
1183
1183
|
try {
|
|
1184
|
-
return await import("./pw-ai-
|
|
1184
|
+
return await import("./pw-ai-yrIWfcWX.js");
|
|
1185
1185
|
} catch (err) {
|
|
1186
1186
|
if (mode === "soft") return null;
|
|
1187
1187
|
if (isModuleNotFoundError(err)) return null;
|
|
@@ -3716,11 +3716,11 @@ function createProfileContext(opts, profile) {
|
|
|
3716
3716
|
const userDataDir = resolveIdleHandsUserDataDir(profile.name);
|
|
3717
3717
|
const profileState = getProfileState();
|
|
3718
3718
|
if (await isHttpReachable(300) && !profileState.running) try {
|
|
3719
|
-
await (await import("./pw-ai-
|
|
3719
|
+
await (await import("./pw-ai-yrIWfcWX.js")).closePlaywrightBrowserConnection();
|
|
3720
3720
|
} catch {}
|
|
3721
3721
|
if (profileState.running) await stopRunningBrowser();
|
|
3722
3722
|
try {
|
|
3723
|
-
await (await import("./pw-ai-
|
|
3723
|
+
await (await import("./pw-ai-yrIWfcWX.js")).closePlaywrightBrowserConnection();
|
|
3724
3724
|
} catch {}
|
|
3725
3725
|
if (!syncFs.existsSync(userDataDir)) return {
|
|
3726
3726
|
moved: false,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { ht as loadIdleHandsPlugins } from "./reply-
|
|
2
|
+
import { ht as loadIdleHandsPlugins } from "./reply-Cmj0wbnT.js";
|
|
3
3
|
import { d as resolveDefaultAgentId, u as resolveAgentWorkspaceDir } from "./agent-scope-RA0zXRpu.js";
|
|
4
4
|
import { b as getActivePluginRegistry, t as createSubsystemLogger } from "./subsystem-CGZX2PBV.js";
|
|
5
5
|
import { It as loadConfig } from "./model-selection-0dGxYGp8.js";
|
|
@@ -2,7 +2,7 @@ import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
|
2
2
|
import { E as getActivePluginRegistry, s as createSubsystemLogger } from "./entry.js";
|
|
3
3
|
import { j as loadConfig } from "./auth-profiles-Baj5ImDJ.js";
|
|
4
4
|
import { d as resolveDefaultAgentId, u as resolveAgentWorkspaceDir } from "./agent-scope-mLXQGQde.js";
|
|
5
|
-
import { _ as loadIdleHandsPlugins } from "./subagent-registry-
|
|
5
|
+
import { _ as loadIdleHandsPlugins } from "./subagent-registry-DHwrN9Oj.js";
|
|
6
6
|
|
|
7
7
|
//#region src/cli/plugin-registry.ts
|
|
8
8
|
var plugin_registry_exports = /* @__PURE__ */ __exportAll({ ensurePluginRegistryLoaded: () => ensurePluginRegistryLoaded });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { s as normalizeAgentId } from "./session-key-47BV2tLd.js";
|
|
2
2
|
import "./accounts-BLYMokxV.js";
|
|
3
|
-
import { F as callGateway, I as randomIdempotencyKey, d as agentCommand, f as resolveSessionKeyForRequest, p as withProgress } from "./reply-
|
|
3
|
+
import { F as callGateway, I as randomIdempotencyKey, d as agentCommand, f as resolveSessionKeyForRequest, p as withProgress } from "./reply-B-q4HnAx.js";
|
|
4
4
|
import "./paths-CtGV5i8O.js";
|
|
5
5
|
import "./github-copilot-token-CY2euW0d.js";
|
|
6
6
|
import { r as loadConfig } from "./config-CEgzwk0J.js";
|
|
@@ -63,7 +63,7 @@ import "./send-B26cNPqY.js";
|
|
|
63
63
|
import "./proxy-C4ewPdlN.js";
|
|
64
64
|
import "./resolve-route-BZABUE4J.js";
|
|
65
65
|
import "./replies-ZovJp-3F.js";
|
|
66
|
-
import "./deps-
|
|
66
|
+
import "./deps-mdAvVF88.js";
|
|
67
67
|
import "./outbound-attachment-BisU5Vji.js";
|
|
68
68
|
|
|
69
69
|
//#region src/commands/agent-via-gateway.ts
|
|
@@ -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-C2tn6sON.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) {
|