@marxbiotech/openclaw 2026.3.11-1 → 2026.3.11-2
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/dist/build-info.json +1 -1
- package/dist/{command-registry-CiMD-19N.js → command-registry-BwvVyOax.js} +4 -4
- package/dist/{completion-cli-C4uCH0Kd.js → completion-cli-BjFvxqkm.js} +2 -2
- package/dist/{completion-cli-2fPGXG9F.js → completion-cli-DNfaygQw.js} +1 -1
- package/dist/{doctor-completion-BFZFKMyo.js → doctor-completion-CibRt8Rl.js} +1 -1
- package/dist/{doctor-completion-DlZQ7I1V.js → doctor-completion-DFE2hJUf.js} +1 -1
- package/dist/entry.js +2 -2
- package/dist/{gateway-cli-C9fWJKrH.js → gateway-cli-BgW_9mxA.js} +3 -3
- package/dist/{gateway-cli-DOsXwB-u.js → gateway-cli-Deul5Gqw.js} +3 -3
- package/dist/index.js +1 -1
- package/dist/{onboard-BZKGY5U9.js → onboard-CiuG7-_X.js} +1 -1
- package/dist/{onboard-BKg2al8k.js → onboard-KmjsDTHy.js} +1 -1
- package/dist/{onboarding-DTUuuTa2.js → onboarding-B9iZJ59O.js} +1 -1
- package/dist/{onboarding-BlLfmPcu.js → onboarding-BavUkAWX.js} +1 -1
- package/dist/{onboarding.finalize-Cu3PWqB6.js → onboarding.finalize-D7HFF0jj.js} +4 -4
- package/dist/{onboarding.finalize-5pT3u3y8.js → onboarding.finalize-DRo9cCXW.js} +3 -3
- package/dist/plugin-sdk/active-listener-D_luHjqP.js +35 -0
- package/dist/plugin-sdk/api-key-rotation-9K_7bukm.js +176 -0
- package/dist/plugin-sdk/audio-preflight-U8TyckgJ.js +51 -0
- package/dist/plugin-sdk/audio-transcription-runner-BosFSNTi.js +2173 -0
- package/dist/plugin-sdk/audit-membership-runtime-VAoOOLkL.js +58 -0
- package/dist/plugin-sdk/channel-activity-BLrZlTU4.js +95 -0
- package/dist/plugin-sdk/channel-web-CVreooXi.js +2238 -0
- package/dist/plugin-sdk/commands-registry-BPjiuv0E.js +1118 -0
- package/dist/plugin-sdk/compact.runtime-SLKipCSc.js +35 -0
- package/dist/plugin-sdk/config-CIhQ4UZf.js +38330 -0
- package/dist/plugin-sdk/deliver-DYH4XIUg.js +1757 -0
- package/dist/plugin-sdk/deliver-runtime-BWAUi_ze.js +15 -0
- package/dist/plugin-sdk/deps-send-discord.runtime-hUAIImIR.js +15 -0
- package/dist/plugin-sdk/deps-send-imessage.runtime-DXEMrmo6.js +14 -0
- package/dist/plugin-sdk/deps-send-signal.runtime-gjCPan5F.js +13 -0
- package/dist/plugin-sdk/deps-send-slack.runtime-gNVx_aaF.js +13 -0
- package/dist/plugin-sdk/deps-send-telegram.runtime-DFmGgS9o.js +16 -0
- package/dist/plugin-sdk/deps-send-whatsapp.runtime-Cshec2jQ.js +40 -0
- package/dist/plugin-sdk/diagnostic-BL2lZVv6.js +315 -0
- package/dist/plugin-sdk/dispatch-DcgRtXg_.js +106376 -0
- package/dist/plugin-sdk/fetch-guard-BUWdIU_v.js +165 -0
- package/dist/plugin-sdk/fetch-hBba0z1v.js +324 -0
- package/dist/plugin-sdk/gateway/acp-node-event-bridge.d.ts +7 -7
- package/dist/plugin-sdk/image-3uuAqTpI.js +2440 -0
- package/dist/plugin-sdk/image-runtime-nkUIHq77.js +8 -0
- package/dist/plugin-sdk/index.js +35 -35
- package/dist/plugin-sdk/ir-CdWA5u5_.js +1316 -0
- package/dist/plugin-sdk/local-roots-BOWdxr17.js +216 -0
- package/dist/plugin-sdk/logger-CewrL2f2.js +1165 -0
- package/dist/plugin-sdk/login-CTcC4om3.js +54 -0
- package/dist/plugin-sdk/login-qr-4qm5vcJq.js +316 -0
- package/dist/plugin-sdk/manager-Da07TROR.js +4090 -0
- package/dist/plugin-sdk/manager-runtime-CZT5Q9w5.js +11 -0
- package/dist/plugin-sdk/outbound-BLKpin1t.js +220 -0
- package/dist/plugin-sdk/outbound-attachment-BkHLoRUT.js +17 -0
- package/dist/plugin-sdk/paths-CfpEgEQR.js +3515 -0
- package/dist/plugin-sdk/pi-model-discovery-BBHM2drb.js +131 -0
- package/dist/plugin-sdk/pi-model-discovery-runtime-CmfYZeVY.js +8 -0
- package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-BQvx2yXx.js +349 -0
- package/dist/plugin-sdk/proxy-env-ChB9Wo5H.js +73 -0
- package/dist/plugin-sdk/proxy-fetch-Olbav515.js +55 -0
- package/dist/plugin-sdk/pw-ai-BB8RZVm0.js +1990 -0
- package/dist/plugin-sdk/qmd-manager-BE2dOOqQ.js +1581 -0
- package/dist/plugin-sdk/remote-acpx.js +28 -5
- package/dist/plugin-sdk/resolve-outbound-target-pj5m_Ri_.js +38 -0
- package/dist/plugin-sdk/runtime-whatsapp-login.runtime-BCRygGdJ.js +9 -0
- package/dist/plugin-sdk/runtime-whatsapp-outbound.runtime-C1yNUZr-.js +13 -0
- package/dist/plugin-sdk/send-B2a0lJsN.js +3295 -0
- package/dist/plugin-sdk/send-BHwYaGzJ.js +2706 -0
- package/dist/plugin-sdk/send-D6NnusXB.js +496 -0
- package/dist/plugin-sdk/send-DrTtKCJk.js +533 -0
- package/dist/plugin-sdk/send-O41VmVaJ.js +407 -0
- package/dist/plugin-sdk/session-BN_U7LTE.js +166 -0
- package/dist/plugin-sdk/skill-commands-yTWGW7as.js +336 -0
- package/dist/plugin-sdk/slash-commands.runtime-PmOmljkw.js +8 -0
- package/dist/plugin-sdk/slash-dispatch.runtime-BUnqcIrq.js +35 -0
- package/dist/plugin-sdk/slash-skill-commands.runtime-CoZv2pXz.js +9 -0
- package/dist/plugin-sdk/sqlite-CwmMC5Zf.js +1229 -0
- package/dist/plugin-sdk/subagent-registry-runtime-8pi1LEsj.js +35 -0
- package/dist/plugin-sdk/tables-DoT2mR55.js +53 -0
- package/dist/plugin-sdk/target-errors-Di4Z4T9X.js +192 -0
- package/dist/plugin-sdk/tokens-fjY_4q2S.js +50 -0
- package/dist/plugin-sdk/web-aSYNqTh_.js +39 -0
- package/dist/plugin-sdk/whatsapp-actions-DoeSLsmK.js +71 -0
- package/dist/{program-BgL_1myT.js → program-B2KyKnnR.js} +2 -2
- package/dist/{program-context-5cQ0a89v.js → program-context-BnLIP7YF.js} +6 -6
- package/dist/{prompt-select-styled-Cl7Q-gZd.js → prompt-select-styled-BvG9o5pE.js} +1 -1
- package/dist/{prompt-select-styled-C7-iOwAu.js → prompt-select-styled-ColQQ54Z.js} +1 -1
- package/dist/{push-apns-Db_Rmr8P.js → push-apns-Bb-aceyk.js} +22 -5
- package/dist/{push-apns-C5xpP3Qw.js → push-apns-DhQtuovD.js} +22 -5
- package/dist/{register.maintenance-CN4z5AZX.js → register.maintenance-DmXC2YjV.js} +4 -4
- package/dist/{register.maintenance-DvyYZ-Dm.js → register.maintenance-wVGXdxhu.js} +5 -5
- package/dist/{register.onboard-C7ZTxyNt.js → register.onboard-CoosDR1d.js} +2 -2
- package/dist/{register.onboard-BOUUi1Ly.js → register.onboard-Yyz7u5g9.js} +2 -2
- package/dist/{register.setup-CJ8mVj-V.js → register.setup-BxSFzC_O.js} +2 -2
- package/dist/{register.setup-BQF2ez6b.js → register.setup-CZEyPdxG.js} +2 -2
- package/dist/{register.subclis-CjokLhiE.js → register.subclis-DNtNzpTi.js} +3 -3
- package/dist/{run-main-BjTtgtS4.js → run-main-BtuubYTb.js} +4 -4
- package/dist/{server-node-events-CudpZOe9.js → server-node-events-Cp6K_UPl.js} +1 -1
- package/dist/{server-node-events-D9YRLmHx.js → server-node-events-fY4Ut_B8.js} +1 -1
- package/dist/{update-cli-Bpkzg9VX.js → update-cli-CwsZRTqs.js} +5 -5
- package/dist/{update-cli-3gmmXaPw.js → update-cli-SBHb47N9.js} +4 -4
- package/package.json +1 -1
- package/dist/control-ui/apple-touch-icon.png +0 -0
- package/dist/control-ui/assets/de-DuUYLvt1.js +0 -2
- package/dist/control-ui/assets/de-DuUYLvt1.js.map +0 -1
- package/dist/control-ui/assets/es-DHtyqUQZ.js +0 -2
- package/dist/control-ui/assets/es-DHtyqUQZ.js.map +0 -1
- package/dist/control-ui/assets/index-CYbiPp9k.js +0 -8384
- package/dist/control-ui/assets/index-CYbiPp9k.js.map +0 -1
- package/dist/control-ui/assets/index-C_GaJ8wS.css +0 -1
- package/dist/control-ui/assets/pt-BR-D2dJb9G8.js +0 -2
- package/dist/control-ui/assets/pt-BR-D2dJb9G8.js.map +0 -1
- package/dist/control-ui/assets/zh-CN-BgJ8_lE3.js +0 -2
- package/dist/control-ui/assets/zh-CN-BgJ8_lE3.js.map +0 -1
- package/dist/control-ui/assets/zh-TW-cW5xB87I.js +0 -2
- package/dist/control-ui/assets/zh-TW-cW5xB87I.js.map +0 -1
- package/dist/control-ui/favicon-32.png +0 -0
- package/dist/control-ui/favicon.ico +0 -0
- package/dist/control-ui/favicon.svg +0 -22
- package/dist/control-ui/index.html +0 -17
package/dist/build-info.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-DUslC3ob.js";
|
|
2
2
|
import { J as getPrimaryCommand, Z as hasHelpOrVersion } from "./subsystem-DVwhOlEq.js";
|
|
3
|
-
import { i as registerSubCliCommands, o as removeCommandByName, s as reparseProgramFromActionArgs } from "./register.subclis-
|
|
3
|
+
import { i as registerSubCliCommands, o as removeCommandByName, s as reparseProgramFromActionArgs } from "./register.subclis-DNtNzpTi.js";
|
|
4
4
|
//#region src/cli/program/command-registry.ts
|
|
5
5
|
var command_registry_exports = /* @__PURE__ */ __exportAll({
|
|
6
6
|
getCoreCliCommandNames: () => getCoreCliCommandNames,
|
|
@@ -21,7 +21,7 @@ const coreEntries = [
|
|
|
21
21
|
hasSubcommands: false
|
|
22
22
|
}],
|
|
23
23
|
register: async ({ program }) => {
|
|
24
|
-
(await import("./register.setup-
|
|
24
|
+
(await import("./register.setup-BxSFzC_O.js")).registerSetupCommand(program);
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
{
|
|
@@ -31,7 +31,7 @@ const coreEntries = [
|
|
|
31
31
|
hasSubcommands: false
|
|
32
32
|
}],
|
|
33
33
|
register: async ({ program }) => {
|
|
34
|
-
(await import("./register.onboard-
|
|
34
|
+
(await import("./register.onboard-Yyz7u5g9.js")).registerOnboardCommand(program);
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
{
|
|
@@ -88,7 +88,7 @@ const coreEntries = [
|
|
|
88
88
|
}
|
|
89
89
|
],
|
|
90
90
|
register: async ({ program }) => {
|
|
91
|
-
(await import("./register.maintenance-
|
|
91
|
+
(await import("./register.maintenance-wVGXdxhu.js")).registerMaintenanceCommands(program);
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
94
|
{
|
|
@@ -3,8 +3,8 @@ import { A as theme, i as routeLogsToStderr } from "./subsystem-DVwhOlEq.js";
|
|
|
3
3
|
import { g as resolveStateDir } from "./paths-BfR2LXbA.js";
|
|
4
4
|
import { m as pathExists } from "./utils-0k7pUAq8.js";
|
|
5
5
|
import { t as formatDocsLink } from "./links-BNP-f5t1.js";
|
|
6
|
-
import { n as getSubCliEntries, r as registerSubCliByName } from "./register.subclis-
|
|
7
|
-
import { i as registerCoreCliByName, n as getCoreCliCommandNames } from "./command-registry-
|
|
6
|
+
import { n as getSubCliEntries, r as registerSubCliByName } from "./register.subclis-DNtNzpTi.js";
|
|
7
|
+
import { i as registerCoreCliByName, n as getCoreCliCommandNames } from "./command-registry-BwvVyOax.js";
|
|
8
8
|
import { t as getProgramContext } from "./program-context-BHVoTH7q.js";
|
|
9
9
|
import os from "node:os";
|
|
10
10
|
import path from "node:path";
|
|
@@ -3,7 +3,7 @@ import { g as resolveStateDir } from "./paths-BJV7vkaX.js";
|
|
|
3
3
|
import { A as theme, i as routeLogsToStderr } from "./subsystem-DBBM_0ww.js";
|
|
4
4
|
import { h as pathExists } from "./utils-Bgkbkk_o.js";
|
|
5
5
|
import { t as formatDocsLink } from "./links-O5XaN5d6.js";
|
|
6
|
-
import { a as registerCoreCliByName, c as getSubCliEntries, l as registerSubCliByName, r as getCoreCliCommandNames, t as getProgramContext } from "./program-context-
|
|
6
|
+
import { a as registerCoreCliByName, c as getSubCliEntries, l as registerSubCliByName, r as getCoreCliCommandNames, t as getProgramContext } from "./program-context-BnLIP7YF.js";
|
|
7
7
|
import os from "node:os";
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
import fs from "node:fs/promises";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as resolveOpenClawPackageRoot } from "./openclaw-root-sEvXEezk.js";
|
|
2
2
|
import { r as resolveCliName } from "./command-format-3Z_Kl5PP.js";
|
|
3
3
|
import { t as note } from "./note-50Mi-Ba7.js";
|
|
4
|
-
import { a as resolveCompletionCachePath, i as isCompletionInstalled, o as resolveShellFromEnv, r as installCompletion, s as usesSlowDynamicCompletion, t as completionCacheExists } from "./completion-cli-
|
|
4
|
+
import { a as resolveCompletionCachePath, i as isCompletionInstalled, o as resolveShellFromEnv, r as installCompletion, s as usesSlowDynamicCompletion, t as completionCacheExists } from "./completion-cli-DNfaygQw.js";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { spawnSync } from "node:child_process";
|
|
7
7
|
//#region src/commands/doctor-completion.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as resolveCliName } from "./command-format-CO3N-oGG.js";
|
|
2
2
|
import { t as resolveOpenClawPackageRoot } from "./openclaw-root-0rIXZNhj.js";
|
|
3
3
|
import { t as note } from "./note-D_-wdXWA.js";
|
|
4
|
-
import { a as resolveCompletionCachePath, i as isCompletionInstalled, o as resolveShellFromEnv, r as installCompletion, s as usesSlowDynamicCompletion, t as completionCacheExists } from "./completion-cli-
|
|
4
|
+
import { a as resolveCompletionCachePath, i as isCompletionInstalled, o as resolveShellFromEnv, r as installCompletion, s as usesSlowDynamicCompletion, t as completionCacheExists } from "./completion-cli-BjFvxqkm.js";
|
|
5
5
|
import { spawnSync } from "node:child_process";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
//#region src/commands/doctor-completion.ts
|
package/dist/entry.js
CHANGED
|
@@ -377,7 +377,7 @@ if (!isMainModule({
|
|
|
377
377
|
}
|
|
378
378
|
function tryHandleRootHelpFastPath(argv) {
|
|
379
379
|
if (!isRootHelpInvocation(argv)) return false;
|
|
380
|
-
import("./program-
|
|
380
|
+
import("./program-B2KyKnnR.js").then(({ buildProgram }) => {
|
|
381
381
|
buildProgram().outputHelp();
|
|
382
382
|
}).catch((error) => {
|
|
383
383
|
console.error("[openclaw] Failed to display help:", error instanceof Error ? error.stack ?? error.message : error);
|
|
@@ -396,7 +396,7 @@ if (!isMainModule({
|
|
|
396
396
|
applyCliProfileEnv({ profile: parsed.profile });
|
|
397
397
|
process$1.argv = parsed.argv;
|
|
398
398
|
}
|
|
399
|
-
if (!tryHandleRootVersionFastPath(process$1.argv) && !tryHandleRootHelpFastPath(process$1.argv)) import("./run-main-
|
|
399
|
+
if (!tryHandleRootVersionFastPath(process$1.argv) && !tryHandleRootHelpFastPath(process$1.argv)) import("./run-main-BtuubYTb.js").then(({ runCli }) => runCli(process$1.argv)).catch((error) => {
|
|
400
400
|
console.error("[openclaw] Failed to start CLI:", error instanceof Error ? error.stack ?? error.message : error);
|
|
401
401
|
process$1.exitCode = 1;
|
|
402
402
|
});
|
|
@@ -128,8 +128,8 @@ import { a as styleHealthChannelLine, c as startHeartbeatRunner, n as getHealthS
|
|
|
128
128
|
import { a as resolveControlUiRootOverrideSync, n as isPackageProvenControlUiRootSync, o as resolveControlUiRootSync, t as ensureControlUiAssetsBuilt } from "./control-ui-assets-bcAk-oJO.js";
|
|
129
129
|
import { m as normalizeUpdateChannel, n as checkUpdateStatus, o as resolveNpmChannelTag, r as compareSemverStrings } from "./channel-account-context-CZDxkofQ.js";
|
|
130
130
|
import "./onboarding.secret-input-BMisMmBg.js";
|
|
131
|
-
import { t as runOnboardingWizard } from "./onboarding-
|
|
132
|
-
import { _ as registerAcpNodeSender, a as sendApnsAlert, c as parseMessageWithAttachments, d as shouldLogWs, f as summarizeAgentEventForWsLog, g as registerAcpNodeListProvider, h as registerAcpNodeChecker, i as resolveApnsAuthConfigFromEnv, l as formatForLog, n as normalizeApnsEnvironment, o as sendApnsBackgroundWake, p as setGatewayWsLogStyle, s as normalizeRpcAttachmentsToChatAttachments, t as loadApnsRegistration, u as logWs } from "./push-apns-
|
|
131
|
+
import { t as runOnboardingWizard } from "./onboarding-B9iZJ59O.js";
|
|
132
|
+
import { _ as registerAcpNodeSender, a as sendApnsAlert, c as parseMessageWithAttachments, d as shouldLogWs, f as summarizeAgentEventForWsLog, g as registerAcpNodeListProvider, h as registerAcpNodeChecker, i as resolveApnsAuthConfigFromEnv, l as formatForLog, n as normalizeApnsEnvironment, o as sendApnsBackgroundWake, p as setGatewayWsLogStyle, s as normalizeRpcAttachmentsToChatAttachments, t as loadApnsRegistration, u as logWs } from "./push-apns-DhQtuovD.js";
|
|
133
133
|
import { _ as buildGogWatchStartArgs, g as buildGogWatchServeArgs, i as ensureTailscaleEndpoint, w as resolveGmailHookRuntimeConfig } from "./gmail-setup-utils-BuskVZ6v.js";
|
|
134
134
|
import { d as coerceFiniteScheduleNumber, f as computeNextRunAtMs, p as computePreviousRunAtMs, t as runGatewayUpdate, u as normalizeStoredCronJobs } from "./update-runner-Cr2fL15_.js";
|
|
135
135
|
import { n as isNodeCommandAllowed, r as resolveNodeCommandAllowlist } from "./node-command-policy-mH4TgIh3.js";
|
|
@@ -13748,7 +13748,7 @@ const nodeHandlers = {
|
|
|
13748
13748
|
const p = params;
|
|
13749
13749
|
const payloadJSON = typeof p.payloadJSON === "string" ? p.payloadJSON : p.payload !== void 0 ? JSON.stringify(p.payload) : null;
|
|
13750
13750
|
await respondUnavailableOnThrow(respond, async () => {
|
|
13751
|
-
const { handleNodeEvent } = await import("./server-node-events-
|
|
13751
|
+
const { handleNodeEvent } = await import("./server-node-events-Cp6K_UPl.js");
|
|
13752
13752
|
const nodeId = client?.connect?.device?.id ?? client?.connect?.client?.id ?? "node";
|
|
13753
13753
|
await handleNodeEvent({
|
|
13754
13754
|
deps: context.deps,
|
|
@@ -124,8 +124,8 @@ import { a as styleHealthChannelLine, c as startHeartbeatRunner, n as getHealthS
|
|
|
124
124
|
import { a as resolveControlUiRootOverrideSync, n as isPackageProvenControlUiRootSync, o as resolveControlUiRootSync, t as ensureControlUiAssetsBuilt } from "./control-ui-assets-BmN6xJnx.js";
|
|
125
125
|
import { m as normalizeUpdateChannel, n as checkUpdateStatus, o as resolveNpmChannelTag, r as compareSemverStrings } from "./channel-account-context-DFstQ_6q.js";
|
|
126
126
|
import "./onboarding.secret-input-BrBxwLiF.js";
|
|
127
|
-
import { t as runOnboardingWizard } from "./onboarding-
|
|
128
|
-
import { _ as registerAcpNodeSender, a as sendApnsAlert, c as parseMessageWithAttachments, d as shouldLogWs, f as summarizeAgentEventForWsLog, g as registerAcpNodeListProvider, h as registerAcpNodeChecker, i as resolveApnsAuthConfigFromEnv, l as formatForLog, n as normalizeApnsEnvironment, o as sendApnsBackgroundWake, p as setGatewayWsLogStyle, s as normalizeRpcAttachmentsToChatAttachments, t as loadApnsRegistration, u as logWs } from "./push-apns-
|
|
127
|
+
import { t as runOnboardingWizard } from "./onboarding-BavUkAWX.js";
|
|
128
|
+
import { _ as registerAcpNodeSender, a as sendApnsAlert, c as parseMessageWithAttachments, d as shouldLogWs, f as summarizeAgentEventForWsLog, g as registerAcpNodeListProvider, h as registerAcpNodeChecker, i as resolveApnsAuthConfigFromEnv, l as formatForLog, n as normalizeApnsEnvironment, o as sendApnsBackgroundWake, p as setGatewayWsLogStyle, s as normalizeRpcAttachmentsToChatAttachments, t as loadApnsRegistration, u as logWs } from "./push-apns-Bb-aceyk.js";
|
|
129
129
|
import { _ as buildGogWatchStartArgs, g as buildGogWatchServeArgs, i as ensureTailscaleEndpoint, w as resolveGmailHookRuntimeConfig } from "./gmail-setup-utils-BEIYD1LT.js";
|
|
130
130
|
import { d as coerceFiniteScheduleNumber, f as computeNextRunAtMs, p as computePreviousRunAtMs, t as runGatewayUpdate, u as normalizeStoredCronJobs } from "./update-runner-QLPQ-lMt.js";
|
|
131
131
|
import { n as isNodeCommandAllowed, r as resolveNodeCommandAllowlist } from "./node-command-policy-ldlTl5zx.js";
|
|
@@ -13743,7 +13743,7 @@ const nodeHandlers = {
|
|
|
13743
13743
|
const p = params;
|
|
13744
13744
|
const payloadJSON = typeof p.payloadJSON === "string" ? p.payloadJSON : p.payload !== void 0 ? JSON.stringify(p.payload) : null;
|
|
13745
13745
|
await respondUnavailableOnThrow(respond, async () => {
|
|
13746
|
-
const { handleNodeEvent } = await import("./server-node-events-
|
|
13746
|
+
const { handleNodeEvent } = await import("./server-node-events-fY4Ut_B8.js");
|
|
13747
13747
|
const nodeId = client?.connect?.device?.id ?? client?.connect?.client?.id ?? "node";
|
|
13748
13748
|
await handleNodeEvent({
|
|
13749
13749
|
deps: context.deps,
|
package/dist/index.js
CHANGED
|
@@ -92,7 +92,7 @@ import { t as isMainModule } from "./is-main-JmIV053T.js";
|
|
|
92
92
|
import { t as ensureOpenClawCliOnPath } from "./path-env-BUUHGbw6.js";
|
|
93
93
|
import { t as assertSupportedRuntime } from "./runtime-guard-B8O0vp1r.js";
|
|
94
94
|
import "./ports-1RSfj88K.js";
|
|
95
|
-
import { i as getCoreCliCommandsWithSubcommands, n as setProgramContext, o as registerProgramCommands, s as getSubCliCommandsWithSubcommands } from "./program-context-
|
|
95
|
+
import { i as getCoreCliCommandsWithSubcommands, n as setProgramContext, o as registerProgramCommands, s as getSubCliCommandsWithSubcommands } from "./program-context-BnLIP7YF.js";
|
|
96
96
|
import "./plugin-registry-CVrNfP-4.js";
|
|
97
97
|
import { n as resolveCliChannelOptions } from "./channel-options-9KWbEym5.js";
|
|
98
98
|
import process$1 from "node:process";
|
|
@@ -10,7 +10,7 @@ import { t as WizardCancelledError } from "./prompts-CYx67zxq.js";
|
|
|
10
10
|
import { t as createClackPrompter } from "./clack-prompter-CNzND-0H.js";
|
|
11
11
|
import { t as assertSupportedRuntime } from "./runtime-guard-Deu-vbXy.js";
|
|
12
12
|
import "./daemon-runtime-BSvRTNYU.js";
|
|
13
|
-
import { t as runOnboardingWizard } from "./onboarding-
|
|
13
|
+
import { t as runOnboardingWizard } from "./onboarding-B9iZJ59O.js";
|
|
14
14
|
import { n as logConfigUpdated } from "./logging-Ad_0qkXG.js";
|
|
15
15
|
import { i as normalizeLegacyOnboardAuthChoice, r as isDeprecatedAuthChoice, t as ONBOARD_PROVIDER_AUTH_FLAGS } from "./onboard-provider-auth-flags-CTdSaVHN.js";
|
|
16
16
|
import { t as applyOnboardingLocalWorkspaceConfig } from "./onboard-config-DOvFN8JH.js";
|
|
@@ -10,7 +10,7 @@ import { t as assertSupportedRuntime } from "./runtime-guard-B8O0vp1r.js";
|
|
|
10
10
|
import { t as WizardCancelledError } from "./prompts-CUi1yYdV.js";
|
|
11
11
|
import { t as createClackPrompter } from "./clack-prompter-D80bAXsP.js";
|
|
12
12
|
import "./daemon-runtime-DM4uTR2W.js";
|
|
13
|
-
import { t as runOnboardingWizard } from "./onboarding-
|
|
13
|
+
import { t as runOnboardingWizard } from "./onboarding-BavUkAWX.js";
|
|
14
14
|
import { n as logConfigUpdated } from "./logging-DFQKvPnP.js";
|
|
15
15
|
import { i as normalizeLegacyOnboardAuthChoice, r as isDeprecatedAuthChoice, t as ONBOARD_PROVIDER_AUTH_FLAGS } from "./onboard-provider-auth-flags-WRzW8NRS.js";
|
|
16
16
|
import { t as applyOnboardingLocalWorkspaceConfig } from "./onboard-config-CUiAIDc3.js";
|
|
@@ -369,7 +369,7 @@ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
|
|
|
369
369
|
mode
|
|
370
370
|
});
|
|
371
371
|
await writeConfigFile(nextConfig);
|
|
372
|
-
const { finalizeOnboardingWizard } = await import("./onboarding.finalize-
|
|
372
|
+
const { finalizeOnboardingWizard } = await import("./onboarding.finalize-D7HFF0jj.js");
|
|
373
373
|
const { launchedTui } = await finalizeOnboardingWizard({
|
|
374
374
|
flow,
|
|
375
375
|
opts,
|
|
@@ -369,7 +369,7 @@ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
|
|
|
369
369
|
mode
|
|
370
370
|
});
|
|
371
371
|
await writeConfigFile(nextConfig);
|
|
372
|
-
const { finalizeOnboardingWizard } = await import("./onboarding.finalize-
|
|
372
|
+
const { finalizeOnboardingWizard } = await import("./onboarding.finalize-DRo9cCXW.js");
|
|
373
373
|
const { launchedTui } = await finalizeOnboardingWizard({
|
|
374
374
|
flow,
|
|
375
375
|
opts,
|
|
@@ -86,9 +86,9 @@ import "./cli-utils-nB6lHuak.js";
|
|
|
86
86
|
import "./help-format-BysmLRMx.js";
|
|
87
87
|
import "./progress-CNsW4QH6.js";
|
|
88
88
|
import "./note-D_-wdXWA.js";
|
|
89
|
-
import { r as installCompletion } from "./completion-cli-
|
|
90
|
-
import "./register.subclis-
|
|
91
|
-
import "./command-registry-
|
|
89
|
+
import { r as installCompletion } from "./completion-cli-BjFvxqkm.js";
|
|
90
|
+
import "./register.subclis-DNtNzpTi.js";
|
|
91
|
+
import "./command-registry-BwvVyOax.js";
|
|
92
92
|
import "./program-context-BHVoTH7q.js";
|
|
93
93
|
import "./daemon-install-plan.shared-6weWmBDU.js";
|
|
94
94
|
import "./runtime-guard-Deu-vbXy.js";
|
|
@@ -100,7 +100,7 @@ import { r as healthCommand } from "./health-D6kq8yei.js";
|
|
|
100
100
|
import { t as ensureControlUiAssetsBuilt } from "./control-ui-assets-bcAk-oJO.js";
|
|
101
101
|
import { t as resolveOnboardingSecretInputString } from "./onboarding.secret-input-BMisMmBg.js";
|
|
102
102
|
import { t as formatHealthCheckFailure } from "./health-format-DDGNhiV4.js";
|
|
103
|
-
import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-
|
|
103
|
+
import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-DFE2hJUf.js";
|
|
104
104
|
import { t as runTui } from "./tui-hShwrJPt.js";
|
|
105
105
|
import os from "node:os";
|
|
106
106
|
import path from "node:path";
|
|
@@ -84,9 +84,9 @@ import "./cli-utils-CsurA6i4.js";
|
|
|
84
84
|
import "./help-format-DbH5qlt4.js";
|
|
85
85
|
import "./progress-Db9dzAeG.js";
|
|
86
86
|
import "./runtime-guard-B8O0vp1r.js";
|
|
87
|
-
import "./program-context-
|
|
87
|
+
import "./program-context-BnLIP7YF.js";
|
|
88
88
|
import "./note-50Mi-Ba7.js";
|
|
89
|
-
import { r as installCompletion } from "./completion-cli-
|
|
89
|
+
import { r as installCompletion } from "./completion-cli-DNfaygQw.js";
|
|
90
90
|
import "./daemon-install-plan.shared-Bm8gIebo.js";
|
|
91
91
|
import { n as buildGatewayInstallPlan, r as gatewayInstallErrorHint, t as resolveGatewayInstallToken } from "./gateway-install-token-W2My4uNJ.js";
|
|
92
92
|
import { n as GATEWAY_DAEMON_RUNTIME_OPTIONS, t as DEFAULT_GATEWAY_DAEMON_RUNTIME } from "./daemon-runtime-DM4uTR2W.js";
|
|
@@ -96,7 +96,7 @@ import { r as healthCommand } from "./health-D7cwBG5d.js";
|
|
|
96
96
|
import { t as ensureControlUiAssetsBuilt } from "./control-ui-assets-BmN6xJnx.js";
|
|
97
97
|
import { t as resolveOnboardingSecretInputString } from "./onboarding.secret-input-BrBxwLiF.js";
|
|
98
98
|
import { t as formatHealthCheckFailure } from "./health-format-CPPUtgtI.js";
|
|
99
|
-
import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-
|
|
99
|
+
import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-CibRt8Rl.js";
|
|
100
100
|
import { t as runTui } from "./tui-BsFMtpvR.js";
|
|
101
101
|
import os from "node:os";
|
|
102
102
|
import path from "node:path";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Jt as DEFAULT_ACCOUNT_ID } from "./paths-CfpEgEQR.js";
|
|
2
|
+
import { Bl as formatCliCommand } from "./config-CIhQ4UZf.js";
|
|
3
|
+
//#region src/web/active-listener.ts
|
|
4
|
+
const listeners = /* @__PURE__ */ new Map();
|
|
5
|
+
function resolveWebAccountId(accountId) {
|
|
6
|
+
return (accountId ?? "").trim() || "default";
|
|
7
|
+
}
|
|
8
|
+
function requireActiveWebListener(accountId) {
|
|
9
|
+
const id = resolveWebAccountId(accountId);
|
|
10
|
+
const listener = listeners.get(id) ?? null;
|
|
11
|
+
if (!listener) throw new Error(`No active WhatsApp Web listener (account: ${id}). Start the gateway, then link WhatsApp with: ${formatCliCommand(`openclaw channels login --channel whatsapp --account ${id}`)}.`);
|
|
12
|
+
return {
|
|
13
|
+
accountId: id,
|
|
14
|
+
listener
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function setActiveWebListener(accountIdOrListener, maybeListener) {
|
|
18
|
+
const { accountId, listener } = typeof accountIdOrListener === "string" ? {
|
|
19
|
+
accountId: accountIdOrListener,
|
|
20
|
+
listener: maybeListener ?? null
|
|
21
|
+
} : {
|
|
22
|
+
accountId: DEFAULT_ACCOUNT_ID,
|
|
23
|
+
listener: accountIdOrListener ?? null
|
|
24
|
+
};
|
|
25
|
+
const id = resolveWebAccountId(accountId);
|
|
26
|
+
if (!listener) listeners.delete(id);
|
|
27
|
+
else listeners.set(id, listener);
|
|
28
|
+
if (id === "default") {}
|
|
29
|
+
}
|
|
30
|
+
function getActiveWebListener(accountId) {
|
|
31
|
+
const id = resolveWebAccountId(accountId);
|
|
32
|
+
return listeners.get(id) ?? null;
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { requireActiveWebListener as n, setActiveWebListener as r, getActiveWebListener as t };
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { Ht as normalizeProviderId, Ls as formatErrorMessage } from "./config-CIhQ4UZf.js";
|
|
2
|
+
//#region src/infra/gemini-auth.ts
|
|
3
|
+
/**
|
|
4
|
+
* Shared Gemini authentication utilities.
|
|
5
|
+
*
|
|
6
|
+
* Supports both traditional API keys and OAuth JSON format.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Parse Gemini API key and return appropriate auth headers.
|
|
10
|
+
*
|
|
11
|
+
* OAuth format: `{"token": "...", "projectId": "..."}`
|
|
12
|
+
*
|
|
13
|
+
* @param apiKey - Either a traditional API key string or OAuth JSON
|
|
14
|
+
* @returns Headers object with appropriate authentication
|
|
15
|
+
*/
|
|
16
|
+
function parseGeminiAuth(apiKey) {
|
|
17
|
+
if (apiKey.startsWith("{")) try {
|
|
18
|
+
const parsed = JSON.parse(apiKey);
|
|
19
|
+
if (typeof parsed.token === "string" && parsed.token) return { headers: {
|
|
20
|
+
Authorization: `Bearer ${parsed.token}`,
|
|
21
|
+
"Content-Type": "application/json"
|
|
22
|
+
} };
|
|
23
|
+
} catch {}
|
|
24
|
+
return { headers: {
|
|
25
|
+
"x-goog-api-key": apiKey,
|
|
26
|
+
"Content-Type": "application/json"
|
|
27
|
+
} };
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/agents/live-auth-keys.ts
|
|
31
|
+
const KEY_SPLIT_RE = /[\s,;]+/g;
|
|
32
|
+
const GOOGLE_LIVE_SINGLE_KEY = "OPENCLAW_LIVE_GEMINI_KEY";
|
|
33
|
+
const PROVIDER_PREFIX_OVERRIDES = {
|
|
34
|
+
google: "GEMINI",
|
|
35
|
+
"google-vertex": "GEMINI"
|
|
36
|
+
};
|
|
37
|
+
const PROVIDER_API_KEY_CONFIG = {
|
|
38
|
+
anthropic: {
|
|
39
|
+
liveSingle: "OPENCLAW_LIVE_ANTHROPIC_KEY",
|
|
40
|
+
listVar: "OPENCLAW_LIVE_ANTHROPIC_KEYS",
|
|
41
|
+
primaryVar: "ANTHROPIC_API_KEY",
|
|
42
|
+
prefixedVar: "ANTHROPIC_API_KEY_"
|
|
43
|
+
},
|
|
44
|
+
google: {
|
|
45
|
+
liveSingle: GOOGLE_LIVE_SINGLE_KEY,
|
|
46
|
+
listVar: "GEMINI_API_KEYS",
|
|
47
|
+
primaryVar: "GEMINI_API_KEY",
|
|
48
|
+
prefixedVar: "GEMINI_API_KEY_"
|
|
49
|
+
},
|
|
50
|
+
"google-vertex": {
|
|
51
|
+
liveSingle: GOOGLE_LIVE_SINGLE_KEY,
|
|
52
|
+
listVar: "GEMINI_API_KEYS",
|
|
53
|
+
primaryVar: "GEMINI_API_KEY",
|
|
54
|
+
prefixedVar: "GEMINI_API_KEY_"
|
|
55
|
+
},
|
|
56
|
+
openai: {
|
|
57
|
+
liveSingle: "OPENCLAW_LIVE_OPENAI_KEY",
|
|
58
|
+
listVar: "OPENAI_API_KEYS",
|
|
59
|
+
primaryVar: "OPENAI_API_KEY",
|
|
60
|
+
prefixedVar: "OPENAI_API_KEY_"
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
function parseKeyList(raw) {
|
|
64
|
+
if (!raw) return [];
|
|
65
|
+
return raw.split(KEY_SPLIT_RE).map((value) => value.trim()).filter(Boolean);
|
|
66
|
+
}
|
|
67
|
+
function collectEnvPrefixedKeys(prefix) {
|
|
68
|
+
const keys = [];
|
|
69
|
+
for (const [name, value] of Object.entries(process.env)) {
|
|
70
|
+
if (!name.startsWith(prefix)) continue;
|
|
71
|
+
const trimmed = value?.trim();
|
|
72
|
+
if (!trimmed) continue;
|
|
73
|
+
keys.push(trimmed);
|
|
74
|
+
}
|
|
75
|
+
return keys;
|
|
76
|
+
}
|
|
77
|
+
function resolveProviderApiKeyConfig(provider) {
|
|
78
|
+
const normalized = normalizeProviderId(provider);
|
|
79
|
+
const custom = PROVIDER_API_KEY_CONFIG[normalized];
|
|
80
|
+
const base = PROVIDER_PREFIX_OVERRIDES[normalized] ?? normalized.toUpperCase().replace(/-/g, "_");
|
|
81
|
+
const liveSingle = custom?.liveSingle ?? `OPENCLAW_LIVE_${base}_KEY`;
|
|
82
|
+
const listVar = custom?.listVar ?? `${base}_API_KEYS`;
|
|
83
|
+
const primaryVar = custom?.primaryVar ?? `${base}_API_KEY`;
|
|
84
|
+
const prefixedVar = custom?.prefixedVar ?? `${base}_API_KEY_`;
|
|
85
|
+
if (normalized === "google" || normalized === "google-vertex") return {
|
|
86
|
+
liveSingle,
|
|
87
|
+
listVar,
|
|
88
|
+
primaryVar,
|
|
89
|
+
prefixedVar,
|
|
90
|
+
fallbackVars: ["GOOGLE_API_KEY"]
|
|
91
|
+
};
|
|
92
|
+
return {
|
|
93
|
+
liveSingle,
|
|
94
|
+
listVar,
|
|
95
|
+
primaryVar,
|
|
96
|
+
prefixedVar,
|
|
97
|
+
fallbackVars: []
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
function collectProviderApiKeys(provider) {
|
|
101
|
+
const config = resolveProviderApiKeyConfig(provider);
|
|
102
|
+
const forcedSingle = config.liveSingle ? process.env[config.liveSingle]?.trim() : void 0;
|
|
103
|
+
if (forcedSingle) return [forcedSingle];
|
|
104
|
+
const fromList = parseKeyList(config.listVar ? process.env[config.listVar] : void 0);
|
|
105
|
+
const primary = config.primaryVar ? process.env[config.primaryVar]?.trim() : void 0;
|
|
106
|
+
const fromPrefixed = config.prefixedVar ? collectEnvPrefixedKeys(config.prefixedVar) : [];
|
|
107
|
+
const fallback = config.fallbackVars.map((envVar) => process.env[envVar]?.trim()).filter(Boolean);
|
|
108
|
+
const seen = /* @__PURE__ */ new Set();
|
|
109
|
+
const add = (value) => {
|
|
110
|
+
if (!value) return;
|
|
111
|
+
if (seen.has(value)) return;
|
|
112
|
+
seen.add(value);
|
|
113
|
+
};
|
|
114
|
+
for (const value of fromList) add(value);
|
|
115
|
+
add(primary);
|
|
116
|
+
for (const value of fromPrefixed) add(value);
|
|
117
|
+
for (const value of fallback) add(value);
|
|
118
|
+
return Array.from(seen);
|
|
119
|
+
}
|
|
120
|
+
function isApiKeyRateLimitError(message) {
|
|
121
|
+
const lower = message.toLowerCase();
|
|
122
|
+
if (lower.includes("rate_limit")) return true;
|
|
123
|
+
if (lower.includes("rate limit")) return true;
|
|
124
|
+
if (lower.includes("429")) return true;
|
|
125
|
+
if (lower.includes("quota exceeded") || lower.includes("quota_exceeded")) return true;
|
|
126
|
+
if (lower.includes("resource exhausted") || lower.includes("resource_exhausted")) return true;
|
|
127
|
+
if (lower.includes("too many requests")) return true;
|
|
128
|
+
return false;
|
|
129
|
+
}
|
|
130
|
+
//#endregion
|
|
131
|
+
//#region src/agents/api-key-rotation.ts
|
|
132
|
+
function dedupeApiKeys(raw) {
|
|
133
|
+
const seen = /* @__PURE__ */ new Set();
|
|
134
|
+
const keys = [];
|
|
135
|
+
for (const value of raw) {
|
|
136
|
+
const apiKey = value.trim();
|
|
137
|
+
if (!apiKey || seen.has(apiKey)) continue;
|
|
138
|
+
seen.add(apiKey);
|
|
139
|
+
keys.push(apiKey);
|
|
140
|
+
}
|
|
141
|
+
return keys;
|
|
142
|
+
}
|
|
143
|
+
function collectProviderApiKeysForExecution(params) {
|
|
144
|
+
const { primaryApiKey, provider } = params;
|
|
145
|
+
return dedupeApiKeys([primaryApiKey?.trim() ?? "", ...collectProviderApiKeys(provider)]);
|
|
146
|
+
}
|
|
147
|
+
async function executeWithApiKeyRotation(params) {
|
|
148
|
+
const keys = dedupeApiKeys(params.apiKeys);
|
|
149
|
+
if (keys.length === 0) throw new Error(`No API keys configured for provider "${params.provider}".`);
|
|
150
|
+
let lastError;
|
|
151
|
+
for (let attempt = 0; attempt < keys.length; attempt += 1) {
|
|
152
|
+
const apiKey = keys[attempt];
|
|
153
|
+
try {
|
|
154
|
+
return await params.execute(apiKey);
|
|
155
|
+
} catch (error) {
|
|
156
|
+
lastError = error;
|
|
157
|
+
const message = formatErrorMessage(error);
|
|
158
|
+
if (!(params.shouldRetry ? params.shouldRetry({
|
|
159
|
+
apiKey,
|
|
160
|
+
error,
|
|
161
|
+
attempt,
|
|
162
|
+
message
|
|
163
|
+
}) : isApiKeyRateLimitError(message)) || attempt + 1 >= keys.length) break;
|
|
164
|
+
params.onRetry?.({
|
|
165
|
+
apiKey,
|
|
166
|
+
error,
|
|
167
|
+
attempt,
|
|
168
|
+
message
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
if (lastError === void 0) throw new Error(`Failed to run API request for ${params.provider}.`);
|
|
173
|
+
throw lastError;
|
|
174
|
+
}
|
|
175
|
+
//#endregion
|
|
176
|
+
export { executeWithApiKeyRotation as n, parseGeminiAuth as r, collectProviderApiKeysForExecution as t };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import "./paths-CfpEgEQR.js";
|
|
2
|
+
import "./config-CIhQ4UZf.js";
|
|
3
|
+
import "./paths-eFexkPEh.js";
|
|
4
|
+
import "./github-copilot-token-Cxf8QYZb.js";
|
|
5
|
+
import { B as shouldLogVerbose, R as logVerbose } from "./logger-CewrL2f2.js";
|
|
6
|
+
import "./proxy-env-ChB9Wo5H.js";
|
|
7
|
+
import "./fetch-guard-BUWdIU_v.js";
|
|
8
|
+
import "./local-roots-BOWdxr17.js";
|
|
9
|
+
import { i as normalizeMediaAttachments, m as isAudioAttachment, o as resolveMediaAttachmentLocalRoots, t as runAudioTranscription } from "./audio-transcription-runner-BosFSNTi.js";
|
|
10
|
+
import "./image-3uuAqTpI.js";
|
|
11
|
+
import "./api-key-rotation-9K_7bukm.js";
|
|
12
|
+
import "./proxy-fetch-Olbav515.js";
|
|
13
|
+
//#region src/media-understanding/audio-preflight.ts
|
|
14
|
+
/**
|
|
15
|
+
* Transcribes the first audio attachment BEFORE mention checking.
|
|
16
|
+
* This allows voice notes to be processed in group chats with requireMention: true.
|
|
17
|
+
* Returns the transcript or undefined if transcription fails or no audio is found.
|
|
18
|
+
*/
|
|
19
|
+
async function transcribeFirstAudio(params) {
|
|
20
|
+
const { ctx, cfg } = params;
|
|
21
|
+
const audioConfig = cfg.tools?.media?.audio;
|
|
22
|
+
if (!audioConfig || audioConfig.enabled === false) return;
|
|
23
|
+
const attachments = normalizeMediaAttachments(ctx);
|
|
24
|
+
if (!attachments || attachments.length === 0) return;
|
|
25
|
+
const firstAudio = attachments.find((att) => att && isAudioAttachment(att) && !att.alreadyTranscribed);
|
|
26
|
+
if (!firstAudio) return;
|
|
27
|
+
if (shouldLogVerbose()) logVerbose(`audio-preflight: transcribing attachment ${firstAudio.index} for mention check`);
|
|
28
|
+
try {
|
|
29
|
+
const { transcript } = await runAudioTranscription({
|
|
30
|
+
ctx,
|
|
31
|
+
cfg,
|
|
32
|
+
attachments,
|
|
33
|
+
agentDir: params.agentDir,
|
|
34
|
+
providers: params.providers,
|
|
35
|
+
activeModel: params.activeModel,
|
|
36
|
+
localPathRoots: resolveMediaAttachmentLocalRoots({
|
|
37
|
+
cfg,
|
|
38
|
+
ctx
|
|
39
|
+
})
|
|
40
|
+
});
|
|
41
|
+
if (!transcript) return;
|
|
42
|
+
firstAudio.alreadyTranscribed = true;
|
|
43
|
+
if (shouldLogVerbose()) logVerbose(`audio-preflight: transcribed ${transcript.length} chars from attachment ${firstAudio.index}`);
|
|
44
|
+
return transcript;
|
|
45
|
+
} catch (err) {
|
|
46
|
+
if (shouldLogVerbose()) logVerbose(`audio-preflight: transcription failed: ${String(err)}`);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
//#endregion
|
|
51
|
+
export { transcribeFirstAudio };
|