@lawpath-tech/openclaw 2026.2.21-11 → 2026.2.21-12
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/{agents-DBULaIPd.js → agents-Acsw6oEr.js} +4 -4
- package/dist/{agents.config-Cd3-RJ-K.js → agents.config-BAILtL0e.js} +1 -1
- package/dist/{agents.config-DANgtZcG.js → agents.config-DA4Kt9C5.js} +1 -1
- package/dist/{audio-preflight-Bqg8wRF0.js → audio-preflight-BnwMjf3g.js} +3 -3
- package/dist/{audio-preflight-CSF2zAiB.js → audio-preflight-C56sndLt.js} +3 -3
- package/dist/{audio-preflight-DUN77LMG.js → audio-preflight-DTxmK1ti.js} +3 -3
- package/dist/{audio-preflight-DESlWRvS.js → audio-preflight-UmMU18Rf.js} +3 -3
- package/dist/{auth-choice-Bx0wfZkb.js → auth-choice-B0ExtimG.js} +1 -1
- package/dist/{auth-choice-EsB1VBYk.js → auth-choice-Cc9nPCSG.js} +1 -1
- package/dist/{banner-DSmZ1r91.js → banner-l8hdGVT6.js} +1 -1
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +5 -5
- package/dist/bundled/session-memory/handler.js +5 -5
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-options-tp4SdwWn.js → channel-options-BOgY_qkz.js} +1 -1
- package/dist/{channel-options-BFQz6sGG.js → channel-options-DU0lH77F.js} +1 -1
- package/dist/{channel-web-BLVzXq0y.js → channel-web-Bn_o0ClJ.js} +2 -2
- package/dist/{channels-cli-BfRfj__G.js → channels-cli-B8iPHVyY.js} +8 -8
- package/dist/{channels-cli-DZWnK7L3.js → channels-cli-HyoLT0X_.js} +8 -8
- package/dist/{cli-BMvkWAfY.js → cli-BjW27QBR.js} +5 -5
- package/dist/{cli-B5YSj6kb.js → cli-CB8wKUFa.js} +5 -5
- package/dist/{command-registry-DTFv7rlA.js → command-registry-hszLgVfh.js} +9 -9
- package/dist/{completion-cli-BkAlGttV.js → completion-cli-BTOzPrOy.js} +2 -2
- package/dist/{completion-cli-CJW4fXUd.js → completion-cli-jFF5jQZF.js} +1 -1
- package/dist/{config-cli-C0De5m2w.js → config-cli-CV3y1IAq.js} +1 -1
- package/dist/{config-cli-BBaQ2Rhl.js → config-cli-Cuv_T0Jj.js} +1 -1
- package/dist/{configure-DC4J1Gf2.js → configure-80FWz9jT.js} +3 -3
- package/dist/{configure-_wGqIyys.js → configure-BHGABgNw.js} +3 -3
- package/dist/control-ui/assets/{index-Cx1_w3YP.js → index-BfDl8X4O.js} +2 -2
- package/dist/control-ui/assets/index-BfDl8X4O.js.map +1 -0
- package/dist/control-ui/index.html +1 -1
- package/dist/{deliver-D3HyJhTX.js → deliver-B1Ddgm7X.js} +11 -6
- package/dist/{deliver-D22uPds_.js → deliver-BLkQFTzD.js} +11 -6
- package/dist/{deliver-Ct_AlJg5.js → deliver-J2cVd3TS.js} +11 -6
- package/dist/{deliver-BAjdrEoI.js → deliver-meQdcFaA.js} +11 -6
- package/dist/{doctor-completion-Cr7pfPFT.js → doctor-completion-BSCz_dGZ.js} +1 -1
- package/dist/{doctor-completion-C9EazQOq.js → doctor-completion-DGHNIbJN.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/extensionAPI.js +5 -5
- package/dist/{gateway-cli-DyK2K5AK.js → gateway-cli-DYYSJuSK.js} +13 -13
- package/dist/{gateway-cli-CUZeW2km.js → gateway-cli-gLp4lZSu.js} +13 -13
- package/dist/{health-DB9FsqfO.js → health-BfWYn33I.js} +2 -2
- package/dist/{health-C1FEsrl3.js → health-DEibfTDK.js} +2 -2
- package/dist/{hooks-cli-ChPkWEjM.js → hooks-cli-D-nL8J6w.js} +6 -6
- package/dist/{hooks-cli-CrVA4n9U.js → hooks-cli-wQnxbc8T.js} +6 -6
- package/dist/{image-D-DzmVjC.js → image-BZOs5dHY.js} +2 -2
- package/dist/{image-CvBYo9Bu.js → image-C8HOu4vb.js} +2 -2
- package/dist/{image-paXd6zl5.js → image-Cj9tfO74.js} +2 -2
- package/dist/{image-DfOLBle4.js → image-DuT8yGCI.js} +2 -2
- package/dist/index.js +10 -10
- package/dist/llm-slug-generator.js +5 -5
- package/dist/{models-D1lcFJXE.js → models-DFRcZ415.js} +2 -2
- package/dist/{models-cli-B-AmUt5Z.js → models-cli-CwEUrjU_.js} +7 -7
- package/dist/{models-cli-B5hzd5e-.js → models-cli-t1rYl_DG.js} +6 -6
- package/dist/{onboard-Bv6hNNhV.js → onboard-8PGPC4o-.js} +2 -2
- package/dist/{onboard-BN9SewlV.js → onboard-XsnXtjOy.js} +2 -2
- package/dist/{onboard-channels-DtiMw5DM.js → onboard-channels-Cb8T_ers.js} +1 -1
- package/dist/{onboard-channels-B9_hnbkl.js → onboard-channels-vQihczqp.js} +1 -1
- package/dist/{onboarding-BIFLJGsw.js → onboarding-C_807D1O.js} +3 -3
- package/dist/{onboarding-wkMK4RdO.js → onboarding-EwJ1WIut.js} +3 -3
- package/dist/{onboarding.finalize-Cq_uG8Il.js → onboarding.finalize-Crpg17t7.js} +10 -10
- package/dist/{onboarding.finalize-C5_35yUD.js → onboarding.finalize-DWFR8IbD.js} +11 -11
- package/dist/{pi-embedded-Bt3VYQ6Q.js → pi-embedded-Be34NhAY.js} +16 -12
- package/dist/{pi-embedded-26dX6W8j.js → pi-embedded-BywyyGi2.js} +16 -12
- package/dist/{pi-embedded-helpers-ISSMvBMe.js → pi-embedded-helpers-BVCPWN6Q.js} +40 -8
- package/dist/{pi-embedded-helpers-Cx3WmubG.js → pi-embedded-helpers-C4Annkh_.js} +40 -8
- package/dist/{pi-embedded-helpers-DOmGm3QX.js → pi-embedded-helpers-C_U_c_EU.js} +40 -8
- package/dist/{pi-embedded-helpers-DcmNfC3F.js → pi-embedded-helpers-Dl_FdUMU.js} +40 -8
- package/dist/{plugin-registry-CktL7kDf.js → plugin-registry-BrN1y1ig.js} +1 -1
- package/dist/{plugin-registry-DmGXbeyU.js → plugin-registry-CtLhKV8N.js} +1 -1
- package/dist/plugin-sdk/agents/pi-embedded-helpers/errors.d.ts +1 -0
- package/dist/plugin-sdk/{audio-preflight-DTmPFRJ7.js → audio-preflight-zFFuY6Bd.js} +3 -3
- package/dist/plugin-sdk/auto-reply/reply/reply-dispatcher.d.ts +1 -0
- package/dist/plugin-sdk/{channel-web-DBdAyFSo.js → channel-web-DfA1sgI9.js} +3 -3
- package/dist/plugin-sdk/{deliver-DvIFVzAj.js → deliver-D4QMj1KQ.js} +11 -6
- package/dist/plugin-sdk/{image-p_nEsuRt.js → image-Bu6pmW6i.js} +2 -2
- package/dist/plugin-sdk/index.js +6 -6
- package/dist/plugin-sdk/{pi-embedded-helpers-jfXMARle.js → pi-embedded-helpers-DBCtPcLq.js} +40 -8
- package/dist/plugin-sdk/{reply-CvZLZLYC.js → reply-Dl9JHnGW.js} +16 -12
- package/dist/plugin-sdk/{runner-B5paaQ1f.js → runner-DvYaPG7_.js} +1 -1
- package/dist/plugin-sdk/{web-xeAk5-Yr.js → web-BFEz8bk-.js} +6 -6
- package/dist/{plugins-cli-BB_bSrdc.js → plugins-cli-ByB9fyeR.js} +6 -6
- package/dist/{plugins-cli-B8LToOz_.js → plugins-cli-CP_m4f99.js} +6 -6
- package/dist/{program-CUQ4Dd4D.js → program-DlspJVqc.js} +11 -11
- package/dist/{program-context-BL-eWj4d.js → program-context-CpcNVMdA.js} +18 -18
- package/dist/{prompt-select-styled-Dw_5UkIh.js → prompt-select-styled-CWRcbfIK.js} +4 -4
- package/dist/{prompt-select-styled-OmW6kagQ.js → prompt-select-styled-DHXAx5uX.js} +4 -4
- package/dist/{provider-auth-helpers-CUdqrUdl.js → provider-auth-helpers-AORB3hk9.js} +1 -1
- package/dist/{provider-auth-helpers-Dj1zmS_9.js → provider-auth-helpers-TZ3D-fXq.js} +1 -1
- package/dist/{push-apns-BLl3-YNl.js → push-apns-BTcu7pip.js} +1 -1
- package/dist/{push-apns-DzvwLYLa.js → push-apns-CSSSwhDY.js} +1 -1
- package/dist/{register.agent-DL4xNjz5.js → register.agent-C4G2zuxZ.js} +9 -9
- package/dist/{register.agent-DdcJgcQB.js → register.agent-xMmK5W-R.js} +10 -10
- package/dist/{register.configure-CahYnp2K.js → register.configure-CeFYJnjt.js} +10 -10
- package/dist/{register.configure-BOUoS25O.js → register.configure-aXmgTNuB.js} +10 -10
- package/dist/{register.maintenance-CA0hn73s.js → register.maintenance-B_bQy-mZ.js} +11 -11
- package/dist/{register.maintenance-BBtBnw4T.js → register.maintenance-CWHUzso3.js} +12 -12
- package/dist/{register.message-C38olCA-.js → register.message-42he49is.js} +6 -6
- package/dist/{register.message-Bd2B4_gS.js → register.message-Cx6UTHOb.js} +6 -6
- package/dist/{register.onboard-DmsHuosI.js → register.onboard-BmtcBw-6.js} +8 -8
- package/dist/{register.onboard-CBcolfXI.js → register.onboard-C9pozCFG.js} +8 -8
- package/dist/{register.setup-V09teeGQ.js → register.setup-C4TWvr5B.js} +8 -8
- package/dist/{register.setup-sWIbdPfJ.js → register.setup-C54kkyhM.js} +8 -8
- package/dist/{register.status-health-sessions-BrlTrkeO.js → register.status-health-sessions-DHHGaJsX.js} +7 -7
- package/dist/{register.status-health-sessions-BHSA4iZL.js → register.status-health-sessions-DNqvYowR.js} +7 -7
- package/dist/{register.subclis-CNgqotfk.js → register.subclis-m5WJHhwT.js} +10 -10
- package/dist/{reply-BpeNwiEB.js → reply-V8UXM1XU.js} +16 -12
- package/dist/{run-main-ClMNdr5y.js → run-main-Djlctozd.js} +18 -18
- package/dist/{runner-B9g6ervv.js → runner-BMHyFfIL.js} +1 -1
- package/dist/{runner-Be7-7BcC.js → runner-CbkB3vpb.js} +1 -1
- package/dist/{runner-BIWQkeih.js → runner-DkWpm1Ly.js} +1 -1
- package/dist/{runner-D_-7GNC1.js → runner-DzmbTP-U.js} +1 -1
- package/dist/{server-node-events-C0ZzfaPA.js → server-node-events-D5Fen-q2.js} +6 -6
- package/dist/{server-node-events-CDra4Gjc.js → server-node-events-Dm6MSKk0.js} +6 -6
- package/dist/{session-dirs-D6iw22_Q.js → session-dirs-BmVdF2KM.js} +1 -1
- package/dist/{session-dirs-Cwn4le95.js → session-dirs-CRnGB63U.js} +1 -1
- package/dist/{status-CCPKZiSX.js → status-2w8d47j-.js} +2 -2
- package/dist/{status-DFs0LUlA.js → status-Bi_g-8aS.js} +1 -1
- package/dist/{status-CGTYQeqD.js → status-BjjDHl4v.js} +1 -1
- package/dist/{status-Rw3st2w_.js → status-DQEnKbht.js} +2 -2
- package/dist/{subagent-registry-C7ua7m8M.js → subagent-registry-DGNGenUN.js} +16 -12
- package/dist/{tui-C8TIc36Z.js → tui-BPSckkGa.js} +1 -1
- package/dist/{tui-dDj0kI9K.js → tui-Dn3NzP7B.js} +1 -1
- package/dist/{tui-cli-B1R2UxjK.js → tui-cli-DYhd0RT6.js} +2 -2
- package/dist/{tui-cli-DXNQuXf_.js → tui-cli-Dscc8usx.js} +2 -2
- package/dist/{update-cli-BxaSmz5G.js → update-cli-BQIIdEwf.js} +11 -11
- package/dist/{update-cli-DEMP1mj0.js → update-cli-C-xMtbk9.js} +12 -12
- package/dist/{web-gSQnImv2.js → web-CIdW3A5E.js} +5 -5
- package/dist/{web-jg0rymdq.js → web-Ciz1i7yI.js} +6 -6
- package/dist/{web-D1CVLSCy.js → web-H55ayBNa.js} +5 -5
- package/dist/{web-YTTXENUe.js → web-aUEiU7C4.js} +5 -5
- package/package.json +1 -1
- package/dist/control-ui/assets/index-Cx1_w3YP.js.map +0 -1
|
@@ -6908,9 +6908,9 @@ function isCompactionFailureError(errorMessage) {
|
|
|
6908
6908
|
if (isLikelyContextOverflowError(errorMessage)) return true;
|
|
6909
6909
|
return lower.includes("context overflow");
|
|
6910
6910
|
}
|
|
6911
|
-
const ERROR_PAYLOAD_PREFIX_RE = /^(?:error|api\s*error|apierror|openai\s*error|anthropic\s*error|gateway\s*error)[:\s-]+/i;
|
|
6911
|
+
const ERROR_PAYLOAD_PREFIX_RE = /^(?:error|(?:[a-z][\w-]*\s+)?api\s*error|apierror|openai\s*error|anthropic\s*error|gateway\s*error|codex\s*error)[:\s-]+/i;
|
|
6912
6912
|
const FINAL_TAG_RE = /<\s*\/?\s*final\s*>/gi;
|
|
6913
|
-
const ERROR_PREFIX_RE = /^(?:error|api\s*error|openai\s*error|anthropic\s*error|gateway\s*error|request failed|failed|exception)[:\s-]+/i;
|
|
6913
|
+
const ERROR_PREFIX_RE = /^(?:error|(?:[a-z][\w-]*\s+)?api\s*error|openai\s*error|anthropic\s*error|gateway\s*error|codex\s*error|request failed|failed|exception)(?:\s+\d{3})?[:\s-]+/i;
|
|
6914
6914
|
const CONTEXT_OVERFLOW_ERROR_HEAD_RE = /^(?:context overflow:|request_too_large\b|request size exceeds\b|request exceeds the maximum size\b|context length exceeded\b|maximum context length\b|prompt is too long\b|exceeds model context window\b)/i;
|
|
6915
6915
|
const BILLING_ERROR_HEAD_RE = /^(?:error[:\s-]+)?billing(?:\s+error)?(?:[:\s-]+|$)|^(?:error[:\s-]+)?(?:credit balance|insufficient credits?|payment required|http\s*402\b)/i;
|
|
6916
6916
|
const HTTP_STATUS_PREFIX_RE = /^(?:http\s*)?(\d{3})\s+(.+)$/i;
|
|
@@ -7053,6 +7053,25 @@ function getApiErrorPayloadFingerprint(raw) {
|
|
|
7053
7053
|
function isRawApiErrorPayload(raw) {
|
|
7054
7054
|
return getApiErrorPayloadFingerprint(raw) !== null;
|
|
7055
7055
|
}
|
|
7056
|
+
function isLikelyProviderErrorType(type) {
|
|
7057
|
+
const normalized = type?.trim().toLowerCase();
|
|
7058
|
+
if (!normalized) return false;
|
|
7059
|
+
return normalized.endsWith("_error");
|
|
7060
|
+
}
|
|
7061
|
+
const NON_ERROR_PROVIDER_PAYLOAD_MAX_LENGTH = 16384;
|
|
7062
|
+
const NON_ERROR_PROVIDER_PAYLOAD_PREFIX_RE = /^codex\s*error(?:\s+\d{3})?[:\s-]+/i;
|
|
7063
|
+
function shouldRewriteRawPayloadWithoutErrorContext(raw) {
|
|
7064
|
+
if (raw.length > NON_ERROR_PROVIDER_PAYLOAD_MAX_LENGTH) return false;
|
|
7065
|
+
if (!NON_ERROR_PROVIDER_PAYLOAD_PREFIX_RE.test(raw)) return false;
|
|
7066
|
+
const info = parseApiErrorInfo(raw);
|
|
7067
|
+
if (!info) return false;
|
|
7068
|
+
if (isLikelyProviderErrorType(info.type)) return true;
|
|
7069
|
+
if (info.httpCode) {
|
|
7070
|
+
const parsedCode = Number(info.httpCode);
|
|
7071
|
+
if (Number.isFinite(parsedCode) && parsedCode >= 400) return true;
|
|
7072
|
+
}
|
|
7073
|
+
return false;
|
|
7074
|
+
}
|
|
7056
7075
|
function parseApiErrorInfo(raw) {
|
|
7057
7076
|
if (!raw) return null;
|
|
7058
7077
|
const trimmed = raw.trim();
|
|
@@ -7095,12 +7114,7 @@ function formatRawAssistantErrorForUi(raw) {
|
|
|
7095
7114
|
if (!rest.startsWith("{")) return `HTTP ${httpMatch[1]}: ${rest}`;
|
|
7096
7115
|
}
|
|
7097
7116
|
const info = parseApiErrorInfo(trimmed);
|
|
7098
|
-
if (info?.message) {
|
|
7099
|
-
const prefix = info.httpCode ? `HTTP ${info.httpCode}` : "LLM error";
|
|
7100
|
-
const type = info.type ? ` ${info.type}` : "";
|
|
7101
|
-
const requestId = info.requestId ? ` (request_id: ${info.requestId})` : "";
|
|
7102
|
-
return `${prefix}${type}: ${info.message}${requestId}`;
|
|
7103
|
-
}
|
|
7117
|
+
if (info?.message) return `${info.httpCode ? `HTTP ${info.httpCode}` : "LLM error"}${info.type ? ` ${info.type}` : ""}: ${info.message}`;
|
|
7104
7118
|
return trimmed.length > 600 ? `${trimmed.slice(0, 600)}…` : trimmed;
|
|
7105
7119
|
}
|
|
7106
7120
|
function formatAssistantErrorText(msg, opts) {
|
|
@@ -7135,6 +7149,7 @@ function sanitizeUserFacingText(text, opts) {
|
|
|
7135
7149
|
const stripped = stripFinalTagsFromText(text);
|
|
7136
7150
|
const trimmed = stripped.trim();
|
|
7137
7151
|
if (!trimmed) return "";
|
|
7152
|
+
if (!errorContext && shouldRewriteRawPayloadWithoutErrorContext(trimmed)) return formatRawAssistantErrorForUi(trimmed);
|
|
7138
7153
|
if (errorContext) {
|
|
7139
7154
|
if (/incorrect role information|roles must alternate/i.test(trimmed)) return "Message ordering conflict - please try again. If this persists, use /new to start a fresh session.";
|
|
7140
7155
|
if (shouldRewriteContextOverflowText(trimmed)) return "Context overflow: prompt too large for the model. Try /reset (or /new) to start a fresh session, or use a larger-context model.";
|
|
@@ -7169,6 +7184,19 @@ const ERROR_PATTERNS = {
|
|
|
7169
7184
|
"service unavailable",
|
|
7170
7185
|
"high demand"
|
|
7171
7186
|
],
|
|
7187
|
+
serverError: [
|
|
7188
|
+
"an error occurred while processing",
|
|
7189
|
+
"internal server error",
|
|
7190
|
+
"internal_error",
|
|
7191
|
+
"server_error",
|
|
7192
|
+
"service temporarily unavailable",
|
|
7193
|
+
"service_unavailable",
|
|
7194
|
+
"bad gateway",
|
|
7195
|
+
"gateway timeout",
|
|
7196
|
+
"upstream error",
|
|
7197
|
+
"upstream connect error",
|
|
7198
|
+
"connection reset"
|
|
7199
|
+
],
|
|
7172
7200
|
timeout: [
|
|
7173
7201
|
"timeout",
|
|
7174
7202
|
"timed out",
|
|
@@ -7249,6 +7277,9 @@ function isAuthErrorMessage(raw) {
|
|
|
7249
7277
|
function isOverloadedErrorMessage(raw) {
|
|
7250
7278
|
return matchesErrorPatterns(raw, ERROR_PATTERNS.overloaded);
|
|
7251
7279
|
}
|
|
7280
|
+
function isServerErrorMessage(raw) {
|
|
7281
|
+
return matchesErrorPatterns(raw, ERROR_PATTERNS.serverError);
|
|
7282
|
+
}
|
|
7252
7283
|
function isJsonApiInternalServerError(raw) {
|
|
7253
7284
|
if (!raw) return false;
|
|
7254
7285
|
const value = raw.toLowerCase();
|
|
@@ -7310,6 +7341,7 @@ function classifyFailoverReason(raw) {
|
|
|
7310
7341
|
if (isBillingErrorMessage(raw)) return "billing";
|
|
7311
7342
|
if (isTimeoutErrorMessage(raw)) return "timeout";
|
|
7312
7343
|
if (isAuthErrorMessage(raw)) return "auth";
|
|
7344
|
+
if (isServerErrorMessage(raw)) return "timeout";
|
|
7313
7345
|
return null;
|
|
7314
7346
|
}
|
|
7315
7347
|
function isFailoverErrorMessage(raw) {
|
|
@@ -2,7 +2,7 @@ import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
|
2
2
|
import { M as getActivePluginRegistry, o as createSubsystemLogger } from "./entry.js";
|
|
3
3
|
import { c as resolveAgentWorkspaceDir, l as resolveDefaultAgentId } from "./agent-scope-BhZr1_OI.js";
|
|
4
4
|
import { i as loadConfig } from "./config-26MDXfhB.js";
|
|
5
|
-
import { g as loadOpenClawPlugins } from "./subagent-registry-
|
|
5
|
+
import { g as loadOpenClawPlugins } from "./subagent-registry-DGNGenUN.js";
|
|
6
6
|
|
|
7
7
|
//#region src/cli/plugin-registry.ts
|
|
8
8
|
var plugin_registry_exports = /* @__PURE__ */ __exportAll({ ensurePluginRegistryLoaded: () => ensurePluginRegistryLoaded });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { gt as loadOpenClawPlugins } from "./reply-
|
|
2
|
+
import { gt as loadOpenClawPlugins } from "./reply-V8UXM1XU.js";
|
|
3
3
|
import { d as getActivePluginRegistry } from "./registry-Dygi7Azw.js";
|
|
4
4
|
import { t as createSubsystemLogger } from "./subsystem-8bY95KEB.js";
|
|
5
5
|
import { c as resolveAgentWorkspaceDir, l as resolveDefaultAgentId } from "./agent-scope-Dl-vG2QO.js";
|
|
@@ -35,6 +35,7 @@ export declare function isMissingToolCallInputError(raw: string): boolean;
|
|
|
35
35
|
export declare function isBillingAssistantError(msg: AssistantMessage | undefined): boolean;
|
|
36
36
|
export declare function isAuthErrorMessage(raw: string): boolean;
|
|
37
37
|
export declare function isOverloadedErrorMessage(raw: string): boolean;
|
|
38
|
+
export declare function isServerErrorMessage(raw: string): boolean;
|
|
38
39
|
export declare function parseImageDimensionError(raw: string): {
|
|
39
40
|
maxDimensionPx?: number;
|
|
40
41
|
messageIndex?: number;
|
|
@@ -17,16 +17,16 @@ import "./local-roots-CW6TWE2a.js";
|
|
|
17
17
|
import "./message-channel-DY9wVB2A.js";
|
|
18
18
|
import "./bindings-HAeLX6mi.js";
|
|
19
19
|
import "./tool-images-BlYojiWx.js";
|
|
20
|
-
import { a as resolveMediaAttachmentLocalRoots, n as createMediaAttachmentCache, o as runCapability, r as normalizeMediaAttachments, t as buildProviderRegistry, u as isAudioAttachment } from "./runner-
|
|
20
|
+
import { a as resolveMediaAttachmentLocalRoots, n as createMediaAttachmentCache, o as runCapability, r as normalizeMediaAttachments, t as buildProviderRegistry, u as isAudioAttachment } from "./runner-DvYaPG7_.js";
|
|
21
21
|
import "./skills-DBG2n4rQ.js";
|
|
22
22
|
import "./chrome-NvVwZ3Xn.js";
|
|
23
23
|
import "./thinking-BiNjzudU.js";
|
|
24
24
|
import "./accounts-DEsAwvaZ.js";
|
|
25
25
|
import "./accounts-BcQo4OUu.js";
|
|
26
|
-
import "./pi-embedded-helpers-
|
|
26
|
+
import "./pi-embedded-helpers-DBCtPcLq.js";
|
|
27
27
|
import "./paths-BNQjLbn7.js";
|
|
28
28
|
import "./store-CMGBlFGX.js";
|
|
29
|
-
import "./image-
|
|
29
|
+
import "./image-Bu6pmW6i.js";
|
|
30
30
|
import "./pi-model-discovery-LbcEa65a.js";
|
|
31
31
|
import "./api-key-rotation-DRhVpAS4.js";
|
|
32
32
|
|
|
@@ -37,6 +37,7 @@ export type ReplyDispatcherWithTypingOptions = Omit<ReplyDispatcherOptions, "onI
|
|
|
37
37
|
type ReplyDispatcherWithTypingResult = {
|
|
38
38
|
dispatcher: ReplyDispatcher;
|
|
39
39
|
replyOptions: Pick<GetReplyOptions, "onReplyStart" | "onTypingController" | "onTypingCleanup">;
|
|
40
|
+
markRunComplete: () => void;
|
|
40
41
|
markDispatchIdle: () => void;
|
|
41
42
|
};
|
|
42
43
|
export type ReplyDispatcher = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as buildGroupHistoryKey, n as DEFAULT_MAIN_KEY, r as buildAgentMainSessionKey, s as normalizeAgentId } from "./session-key-C_0eELjb.js";
|
|
2
2
|
import { f as readWebSelfId, o as getWebAuthAgeMs, r as resolveWhatsAppAccount } from "./accounts-fnLsjAOi.js";
|
|
3
|
-
import { E as enqueueSystemEvent, G as resolveMentionGating, W as shouldAckReactionForWhatsApp, X as buildHistoryContextFromEntries, Y as DEFAULT_GROUP_HISTORY_LIMIT, _ as resolveEnvelopeFormatOptions, c as computeBackoff, d as formatDurationPrecise, f as dispatchReplyWithBufferedBlockDispatcher, g as formatInboundEnvelope, h as resolveInboundDebounceMs, ht as createDedupeCache, l as sleepWithAbort, m as createInboundDebouncer, n as normalizeGroupActivation, nt as buildMentionRegexes, r as parseActivationCommand, rt as normalizeMentionText, t as getReplyFromConfig, tt as recordPendingHistoryEntryIfEnabled, u as buildPairingReply, v as hasControlCommand, y as shouldComputeCommandAuthorized } from "./reply-
|
|
3
|
+
import { E as enqueueSystemEvent, G as resolveMentionGating, W as shouldAckReactionForWhatsApp, X as buildHistoryContextFromEntries, Y as DEFAULT_GROUP_HISTORY_LIMIT, _ as resolveEnvelopeFormatOptions, c as computeBackoff, d as formatDurationPrecise, f as dispatchReplyWithBufferedBlockDispatcher, g as formatInboundEnvelope, h as resolveInboundDebounceMs, ht as createDedupeCache, l as sleepWithAbort, m as createInboundDebouncer, n as normalizeGroupActivation, nt as buildMentionRegexes, r as parseActivationCommand, rt as normalizeMentionText, t as getReplyFromConfig, tt as recordPendingHistoryEntryIfEnabled, u as buildPairingReply, v as hasControlCommand, y as shouldComputeCommandAuthorized } from "./reply-Dl9JHnGW.js";
|
|
4
4
|
import { A as normalizeE164, B as toWhatsappJid, K as logVerbose, N as resolveJidToE164, O as isSelfChatMode, R as sleep, Y as shouldLogVerbose, k as jidToE164, s as normalizeChatChannelId, tt as getChildLogger, x as clamp } from "./registry-DL-33c9X.js";
|
|
5
5
|
import { n as loadConfig } from "./config-C1a-yGCa.js";
|
|
6
6
|
import { i as defaultRuntime, t as createSubsystemLogger } from "./subsystem-C9WnrKN8.js";
|
|
@@ -12,10 +12,10 @@ import { c as resolveChunkMode, i as chunkMarkdownTextWithMode, l as resolveText
|
|
|
12
12
|
import { n as resolveMarkdownTableMode } from "./markdown-tables-OYHjLFmr.js";
|
|
13
13
|
import { t as convertMarkdownTables } from "./tables-DzujD35V.js";
|
|
14
14
|
import { G as readChannelAllowFromStore, J as upsertChannelPairingRequest, K as readChannelAllowFromStoreSync, nt as toLocationContext, tt as formatLocationText } from "./send-CNMXFSjB.js";
|
|
15
|
-
import { f as registerUnhandledRejectionHandler } from "./runner-
|
|
15
|
+
import { f as registerUnhandledRejectionHandler } from "./runner-DvYaPG7_.js";
|
|
16
16
|
import { l as resolveIdentityNamePrefix, n as createReplyPrefixOptions, u as resolveMessagePrefix } from "./reply-prefix-DNmkrWtV.js";
|
|
17
17
|
import { F as resolveChannelGroupRequireMention, P as resolveChannelGroupPolicy } from "./thinking-BiNjzudU.js";
|
|
18
|
-
import { Xt as resolveGroupSessionKey, _t as updateLastRoute, gt as recordSessionMetaFromInbound, ht as readSessionUpdatedAt, mt as loadSessionStore } from "./pi-embedded-helpers-
|
|
18
|
+
import { Xt as resolveGroupSessionKey, _t as updateLastRoute, gt as recordSessionMetaFromInbound, ht as readSessionUpdatedAt, mt as loadSessionStore } from "./pi-embedded-helpers-DBCtPcLq.js";
|
|
19
19
|
import { s as resolveStorePath } from "./paths-BNQjLbn7.js";
|
|
20
20
|
import { i as saveMediaBuffer } from "./store-CMGBlFGX.js";
|
|
21
21
|
import { t as finalizeInboundContext } from "./inbound-context-D5EzMeL_.js";
|
|
@@ -9,7 +9,7 @@ import { c as resolveChunkMode, i as chunkMarkdownTextWithMode, l as resolveText
|
|
|
9
9
|
import { n as resolveMarkdownTableMode } from "./markdown-tables-OYHjLFmr.js";
|
|
10
10
|
import { i as isSilentReplyText, n as SILENT_REPLY_TOKEN } from "./tokens-2475WU2Z.js";
|
|
11
11
|
import { d as getChannelDock } from "./thinking-BiNjzudU.js";
|
|
12
|
-
import { dt as appendAssistantMessageToSessionTranscript, ft as resolveMirroredTranscriptText, i as isMessagingToolDuplicate } from "./pi-embedded-helpers-
|
|
12
|
+
import { dt as appendAssistantMessageToSessionTranscript, ft as resolveMirroredTranscriptText, i as isMessagingToolDuplicate } from "./pi-embedded-helpers-DBCtPcLq.js";
|
|
13
13
|
import { a as markdownToSignalTextChunks, t as sendMessageSignal } from "./send-BsKrW0Xh.js";
|
|
14
14
|
import fs from "node:fs";
|
|
15
15
|
import path from "node:path";
|
|
@@ -539,8 +539,13 @@ async function failDelivery(id, error, stateDir) {
|
|
|
539
539
|
//#region src/utils/directive-tags.ts
|
|
540
540
|
const AUDIO_TAG_RE = /\[\[\s*audio_as_voice\s*\]\]/gi;
|
|
541
541
|
const REPLY_TAG_RE = /\[\[\s*(?:reply_to_current|reply_to\s*:\s*([^\]\n]+))\s*\]\]/gi;
|
|
542
|
+
function replacementPreservesWordBoundary(source, offset, length) {
|
|
543
|
+
const before = source[offset - 1];
|
|
544
|
+
const after = source[offset + length];
|
|
545
|
+
return before && after && !/\s/u.test(before) && !/\s/u.test(after) ? " " : "";
|
|
546
|
+
}
|
|
542
547
|
function normalizeDirectiveWhitespace(text) {
|
|
543
|
-
return text.replace(/[ \t]
|
|
548
|
+
return text.replace(/\r\n/g, "\n").replace(/([^\s])[ \t]{2,}([^\s])/g, "$1 $2").replace(/^\n+/, "").replace(/^[ \t](?=\S)/, "").replace(/[ \t]+\n/g, "\n").replace(/\n{3,}/g, "\n\n").trimEnd();
|
|
544
549
|
}
|
|
545
550
|
function parseInlineDirectives(text, options = {}) {
|
|
546
551
|
const { currentMessageId, stripAudioTag = true, stripReplyTags = true } = options;
|
|
@@ -557,19 +562,19 @@ function parseInlineDirectives(text, options = {}) {
|
|
|
557
562
|
let hasReplyTag = false;
|
|
558
563
|
let sawCurrent = false;
|
|
559
564
|
let lastExplicitId;
|
|
560
|
-
cleaned = cleaned.replace(AUDIO_TAG_RE, (match) => {
|
|
565
|
+
cleaned = cleaned.replace(AUDIO_TAG_RE, (match, offset, source) => {
|
|
561
566
|
audioAsVoice = true;
|
|
562
567
|
hasAudioTag = true;
|
|
563
|
-
return stripAudioTag ?
|
|
568
|
+
return stripAudioTag ? replacementPreservesWordBoundary(source, offset, match.length) : match;
|
|
564
569
|
});
|
|
565
|
-
cleaned = cleaned.replace(REPLY_TAG_RE, (match, idRaw) => {
|
|
570
|
+
cleaned = cleaned.replace(REPLY_TAG_RE, (match, idRaw, offset, source) => {
|
|
566
571
|
hasReplyTag = true;
|
|
567
572
|
if (idRaw === void 0) sawCurrent = true;
|
|
568
573
|
else {
|
|
569
574
|
const id = idRaw.trim();
|
|
570
575
|
if (id) lastExplicitId = id;
|
|
571
576
|
}
|
|
572
|
-
return stripReplyTags ?
|
|
577
|
+
return stripReplyTags ? replacementPreservesWordBoundary(source, offset, match.length) : match;
|
|
573
578
|
});
|
|
574
579
|
cleaned = normalizeDirectiveWhitespace(cleaned);
|
|
575
580
|
const replyToId = lastExplicitId ?? (sawCurrent ? currentMessageId?.trim() || void 0 : void 0);
|
|
@@ -3,7 +3,7 @@ import { D as isRecord, I as shortenHomeInString } from "./registry-DL-33c9X.js"
|
|
|
3
3
|
import { n as loadConfig } from "./config-C1a-yGCa.js";
|
|
4
4
|
import { B as resolveOpenClawAgentDir, G as normalizeSecretInput, S as getApiKeyForModel, _ as resolveImplicitBedrockProvider, g as normalizeProviders, v as resolveImplicitCopilotProvider, w as requireApiKey, y as resolveImplicitProviders } from "./model-selection-TMsqRl-p.js";
|
|
5
5
|
import { n as redactToolDetail } from "./redact-DPnDWsnT.js";
|
|
6
|
-
import { N as sanitizeUserFacingText } from "./pi-embedded-helpers-
|
|
6
|
+
import { N as sanitizeUserFacingText } from "./pi-embedded-helpers-DBCtPcLq.js";
|
|
7
7
|
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-LbcEa65a.js";
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
import fs from "node:fs/promises";
|
|
@@ -215,7 +215,7 @@ const FINAL_TAG_RE = /<\s*\/?\s*final\b[^<>]*>/gi;
|
|
|
215
215
|
const THINKING_TAG_RE = /<\s*(\/?)\s*(?:think(?:ing)?|thought|antthinking)\b[^<>]*>/gi;
|
|
216
216
|
function findCodeRegions(text) {
|
|
217
217
|
const regions = [];
|
|
218
|
-
for (const match of text.matchAll(/(^|\n)(```|~~~)[^\n]*\n[\s\S]*?(?:\n\2
|
|
218
|
+
for (const match of text.matchAll(/(^|\n)(```|~~~)[^\n]*\n[\s\S]*?(?:\n\2|$)/g)) {
|
|
219
219
|
const start = (match.index ?? 0) + match[1].length;
|
|
220
220
|
regions.push({
|
|
221
221
|
start,
|
package/dist/plugin-sdk/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { f as DEFAULT_ACCOUNT_ID, p as normalizeAccountId } from "./session-key-C_0eELjb.js";
|
|
2
2
|
import { _ as createAccountListHelpers, i as resolveWhatsAppAuthDir, n as resolveDefaultWhatsAppAccountId, r as resolveWhatsAppAccount, t as listWhatsAppAccountIds } from "./accounts-fnLsjAOi.js";
|
|
3
|
-
import { $ as clearHistoryEntriesIfEnabled, A as resolveDiscordUserAllowlist, B as logTypingFailure, C as stripMarkdown, Ct as unbindThreadBindingsBySessionKey, D as resolveSlackUserAllowlist, Dt as BLUEBUBBLES_ACTION_NAMES, Et as BLUEBUBBLES_ACTIONS, F as stringEnum, G as resolveMentionGating, H as removeAckReactionAfterReply, I as recordInboundSession, J as summarizeMapping, K as resolveMentionGatingWithBypass, L as resolveControlCommandGate, M as collectDiscordAuditChannelIds, N as formatDocsLink, O as resolveSlackChannelAllowlist, Ot as BLUEBUBBLES_GROUP_ACTIONS, P as optionalStringEnum, Q as clearHistoryEntries, R as logAckFailure, S as processLineMessage, St as listThreadBindingsBySessionKey, T as attachFooterText, Tt as resolveAllowlistMatchSimple, U as shouldAckReaction, V as createTypingCallbacks, W as shouldAckReactionForWhatsApp, Y as DEFAULT_GROUP_HISTORY_LIMIT, Z as buildPendingHistoryContextFromMap, _t as listDevicePairing, a as normalizeAccountId$1, at as isWSLEnv, bt as registerPluginHttpRoute, ct as DEFAULT_WEBHOOK_MAX_BODY_BYTES, dt as isRequestBodyLimitError, et as recordPendingHistoryEntry, ft as readJsonBodyWithLimit, gt as approveDevicePairing, ht as createDedupeCache, i as listLineAccountIds, it as isWSL2Sync, j as resolveDiscordChannelAllowlist, k as detectBinary, kt as CHANNEL_MESSAGE_ACTION_NAMES, lt as RequestBodyLimitError, mt as requestBodyErrorToText, o as resolveDefaultLineAccountId, ot as isWSLSync, pt as readRequestBodyWithLimit, q as mergeAllowlist, s as resolveLineAccount, st as DEFAULT_WEBHOOK_BODY_TIMEOUT_MS, tt as recordPendingHistoryEntryIfEnabled, ut as installRequestBodyLimitGuard, vt as rejectDevicePairing, w as createReceiptCard, wt as formatAllowlistMatchMeta, x as hasMarkdownToConvert, xt as autoBindSpawnedDiscordSubagent, yt as extractToolSend, z as logInboundDrop } from "./reply-
|
|
3
|
+
import { $ as clearHistoryEntriesIfEnabled, A as resolveDiscordUserAllowlist, B as logTypingFailure, C as stripMarkdown, Ct as unbindThreadBindingsBySessionKey, D as resolveSlackUserAllowlist, Dt as BLUEBUBBLES_ACTION_NAMES, Et as BLUEBUBBLES_ACTIONS, F as stringEnum, G as resolveMentionGating, H as removeAckReactionAfterReply, I as recordInboundSession, J as summarizeMapping, K as resolveMentionGatingWithBypass, L as resolveControlCommandGate, M as collectDiscordAuditChannelIds, N as formatDocsLink, O as resolveSlackChannelAllowlist, Ot as BLUEBUBBLES_GROUP_ACTIONS, P as optionalStringEnum, Q as clearHistoryEntries, R as logAckFailure, S as processLineMessage, St as listThreadBindingsBySessionKey, T as attachFooterText, Tt as resolveAllowlistMatchSimple, U as shouldAckReaction, V as createTypingCallbacks, W as shouldAckReactionForWhatsApp, Y as DEFAULT_GROUP_HISTORY_LIMIT, Z as buildPendingHistoryContextFromMap, _t as listDevicePairing, a as normalizeAccountId$1, at as isWSLEnv, bt as registerPluginHttpRoute, ct as DEFAULT_WEBHOOK_MAX_BODY_BYTES, dt as isRequestBodyLimitError, et as recordPendingHistoryEntry, ft as readJsonBodyWithLimit, gt as approveDevicePairing, ht as createDedupeCache, i as listLineAccountIds, it as isWSL2Sync, j as resolveDiscordChannelAllowlist, k as detectBinary, kt as CHANNEL_MESSAGE_ACTION_NAMES, lt as RequestBodyLimitError, mt as requestBodyErrorToText, o as resolveDefaultLineAccountId, ot as isWSLSync, pt as readRequestBodyWithLimit, q as mergeAllowlist, s as resolveLineAccount, st as DEFAULT_WEBHOOK_BODY_TIMEOUT_MS, tt as recordPendingHistoryEntryIfEnabled, ut as installRequestBodyLimitGuard, vt as rejectDevicePairing, w as createReceiptCard, wt as formatAllowlistMatchMeta, x as hasMarkdownToConvert, xt as autoBindSpawnedDiscordSubagent, yt as extractToolSend, z as logInboundDrop } from "./reply-Dl9JHnGW.js";
|
|
4
4
|
import "./paths-DVWx7USN.js";
|
|
5
5
|
import "./github-copilot-token-Cg0YPPSu.js";
|
|
6
6
|
import { D as resolveSlackAccount, E as resolveDefaultSlackAccountId, F as resolveDiscordAccount, M as listDiscordAccountIds, O as resolveSlackReplyToMode, P as resolveDefaultDiscordAccountId, S as resolveTelegramAccount, T as listSlackAccountIds, _ as normalizeWhatsAppTarget, a as listDiscordDirectoryPeersFromConfig, b as listTelegramAccountIds, c as listTelegramDirectoryGroupsFromConfig, d as listWhatsAppDirectoryPeersFromConfig, f as looksLikeSlackTargetId, g as isWhatsAppGroupJid, i as listDiscordDirectoryGroupsFromConfig, l as listTelegramDirectoryPeersFromConfig, o as listSlackDirectoryGroupsFromConfig, p as normalizeSlackMessagingTarget, s as listSlackDirectoryPeersFromConfig, u as listWhatsAppDirectoryGroupsFromConfig, w as listEnabledSlackAccounts, x as resolveDefaultTelegramAccountId } from "./plugins-BizZYn_y.js";
|
|
@@ -32,7 +32,7 @@ import "./tool-images-BlYojiWx.js";
|
|
|
32
32
|
import { a as createActionGate, c as jsonResult, d as readReactionParams, m as readStringParam, n as missingTargetError, u as readNumberParam } from "./target-errors-KOPdGMxQ.js";
|
|
33
33
|
import { s as parseSlackBlocksInput } from "./send-3DmbiJfM.js";
|
|
34
34
|
import { it as writeJsonFileAtomically, nt as toLocationContext, rt as readJsonFileWithFallback, tt as formatLocationText } from "./send-CNMXFSjB.js";
|
|
35
|
-
import { b as withTempDownloadPath, y as buildRandomTempFilePath } from "./runner-
|
|
35
|
+
import { b as withTempDownloadPath, y as buildRandomTempFilePath } from "./runner-DvYaPG7_.js";
|
|
36
36
|
import { a as resolveAckReaction, n as createReplyPrefixOptions, t as createReplyPrefixContext } from "./reply-prefix-DNmkrWtV.js";
|
|
37
37
|
import { i as isSilentReplyText, n as SILENT_REPLY_TOKEN } from "./tokens-2475WU2Z.js";
|
|
38
38
|
import "./skill-commands-D7degVS7.js";
|
|
@@ -41,14 +41,14 @@ import { N as rawDataToString } from "./chrome-NvVwZ3Xn.js";
|
|
|
41
41
|
import { C as resolveSlackGroupRequireMention, D as resolveWhatsAppGroupRequireMention, E as resolveTelegramGroupToolPolicy, L as resolveToolsBySender, N as buildSlackThreadingToolContext, O as resolveWhatsAppGroupToolPolicy, S as resolveIMessageGroupToolPolicy, T as resolveTelegramGroupRequireMention, _ as resolveDiscordGroupRequireMention, b as resolveGoogleChatGroupToolPolicy, g as resolveBlueBubblesGroupToolPolicy, h as resolveBlueBubblesGroupRequireMention, m as normalizeSignalMessagingTarget, p as looksLikeSignalTargetId, v as resolveDiscordGroupToolPolicy, w as resolveSlackGroupToolPolicy, x as resolveIMessageGroupRequireMention, y as resolveGoogleChatGroupRequireMention } from "./thinking-BiNjzudU.js";
|
|
42
42
|
import { n as resolveDefaultIMessageAccountId, r as resolveIMessageAccount, t as listIMessageAccountIds } from "./accounts-DEsAwvaZ.js";
|
|
43
43
|
import { i as resolveSignalAccount, n as listSignalAccountIds, r as resolveDefaultSignalAccountId } from "./accounts-BcQo4OUu.js";
|
|
44
|
-
import { T as resolveChannelMediaMaxBytes } from "./deliver-
|
|
45
|
-
import "./pi-embedded-helpers-
|
|
44
|
+
import { T as resolveChannelMediaMaxBytes } from "./deliver-D4QMj1KQ.js";
|
|
45
|
+
import "./pi-embedded-helpers-DBCtPcLq.js";
|
|
46
46
|
import "./paths-BNQjLbn7.js";
|
|
47
47
|
import { h as onDiagnosticEvent, m as isDiagnosticsEnabled, p as emitDiagnosticEvent } from "./diagnostic-Up1aMyxZ.js";
|
|
48
48
|
import { n as extractOriginalFilename } from "./store-CMGBlFGX.js";
|
|
49
49
|
import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-DCb1ht31.js";
|
|
50
|
-
import { r as resolveWhatsAppHeartbeatRecipients } from "./channel-web-
|
|
51
|
-
import "./image-
|
|
50
|
+
import { r as resolveWhatsAppHeartbeatRecipients } from "./channel-web-DfA1sgI9.js";
|
|
51
|
+
import "./image-Bu6pmW6i.js";
|
|
52
52
|
import "./pi-model-discovery-LbcEa65a.js";
|
|
53
53
|
import "./api-key-rotation-DRhVpAS4.js";
|
|
54
54
|
import "./sqlite-ulpcowfN.js";
|
|
@@ -6895,9 +6895,9 @@ function isCompactionFailureError(errorMessage) {
|
|
|
6895
6895
|
if (isLikelyContextOverflowError(errorMessage)) return true;
|
|
6896
6896
|
return lower.includes("context overflow");
|
|
6897
6897
|
}
|
|
6898
|
-
const ERROR_PAYLOAD_PREFIX_RE = /^(?:error|api\s*error|apierror|openai\s*error|anthropic\s*error|gateway\s*error)[:\s-]+/i;
|
|
6898
|
+
const ERROR_PAYLOAD_PREFIX_RE = /^(?:error|(?:[a-z][\w-]*\s+)?api\s*error|apierror|openai\s*error|anthropic\s*error|gateway\s*error|codex\s*error)[:\s-]+/i;
|
|
6899
6899
|
const FINAL_TAG_RE = /<\s*\/?\s*final\s*>/gi;
|
|
6900
|
-
const ERROR_PREFIX_RE = /^(?:error|api\s*error|openai\s*error|anthropic\s*error|gateway\s*error|request failed|failed|exception)[:\s-]+/i;
|
|
6900
|
+
const ERROR_PREFIX_RE = /^(?:error|(?:[a-z][\w-]*\s+)?api\s*error|openai\s*error|anthropic\s*error|gateway\s*error|codex\s*error|request failed|failed|exception)(?:\s+\d{3})?[:\s-]+/i;
|
|
6901
6901
|
const CONTEXT_OVERFLOW_ERROR_HEAD_RE = /^(?:context overflow:|request_too_large\b|request size exceeds\b|request exceeds the maximum size\b|context length exceeded\b|maximum context length\b|prompt is too long\b|exceeds model context window\b)/i;
|
|
6902
6902
|
const BILLING_ERROR_HEAD_RE = /^(?:error[:\s-]+)?billing(?:\s+error)?(?:[:\s-]+|$)|^(?:error[:\s-]+)?(?:credit balance|insufficient credits?|payment required|http\s*402\b)/i;
|
|
6903
6903
|
const HTTP_STATUS_PREFIX_RE = /^(?:http\s*)?(\d{3})\s+(.+)$/i;
|
|
@@ -7040,6 +7040,25 @@ function getApiErrorPayloadFingerprint(raw) {
|
|
|
7040
7040
|
function isRawApiErrorPayload(raw) {
|
|
7041
7041
|
return getApiErrorPayloadFingerprint(raw) !== null;
|
|
7042
7042
|
}
|
|
7043
|
+
function isLikelyProviderErrorType(type) {
|
|
7044
|
+
const normalized = type?.trim().toLowerCase();
|
|
7045
|
+
if (!normalized) return false;
|
|
7046
|
+
return normalized.endsWith("_error");
|
|
7047
|
+
}
|
|
7048
|
+
const NON_ERROR_PROVIDER_PAYLOAD_MAX_LENGTH = 16384;
|
|
7049
|
+
const NON_ERROR_PROVIDER_PAYLOAD_PREFIX_RE = /^codex\s*error(?:\s+\d{3})?[:\s-]+/i;
|
|
7050
|
+
function shouldRewriteRawPayloadWithoutErrorContext(raw) {
|
|
7051
|
+
if (raw.length > NON_ERROR_PROVIDER_PAYLOAD_MAX_LENGTH) return false;
|
|
7052
|
+
if (!NON_ERROR_PROVIDER_PAYLOAD_PREFIX_RE.test(raw)) return false;
|
|
7053
|
+
const info = parseApiErrorInfo(raw);
|
|
7054
|
+
if (!info) return false;
|
|
7055
|
+
if (isLikelyProviderErrorType(info.type)) return true;
|
|
7056
|
+
if (info.httpCode) {
|
|
7057
|
+
const parsedCode = Number(info.httpCode);
|
|
7058
|
+
if (Number.isFinite(parsedCode) && parsedCode >= 400) return true;
|
|
7059
|
+
}
|
|
7060
|
+
return false;
|
|
7061
|
+
}
|
|
7043
7062
|
function parseApiErrorInfo(raw) {
|
|
7044
7063
|
if (!raw) return null;
|
|
7045
7064
|
const trimmed = raw.trim();
|
|
@@ -7082,12 +7101,7 @@ function formatRawAssistantErrorForUi(raw) {
|
|
|
7082
7101
|
if (!rest.startsWith("{")) return `HTTP ${httpMatch[1]}: ${rest}`;
|
|
7083
7102
|
}
|
|
7084
7103
|
const info = parseApiErrorInfo(trimmed);
|
|
7085
|
-
if (info?.message) {
|
|
7086
|
-
const prefix = info.httpCode ? `HTTP ${info.httpCode}` : "LLM error";
|
|
7087
|
-
const type = info.type ? ` ${info.type}` : "";
|
|
7088
|
-
const requestId = info.requestId ? ` (request_id: ${info.requestId})` : "";
|
|
7089
|
-
return `${prefix}${type}: ${info.message}${requestId}`;
|
|
7090
|
-
}
|
|
7104
|
+
if (info?.message) return `${info.httpCode ? `HTTP ${info.httpCode}` : "LLM error"}${info.type ? ` ${info.type}` : ""}: ${info.message}`;
|
|
7091
7105
|
return trimmed.length > 600 ? `${trimmed.slice(0, 600)}…` : trimmed;
|
|
7092
7106
|
}
|
|
7093
7107
|
function formatAssistantErrorText(msg, opts) {
|
|
@@ -7122,6 +7136,7 @@ function sanitizeUserFacingText(text, opts) {
|
|
|
7122
7136
|
const stripped = stripFinalTagsFromText(text);
|
|
7123
7137
|
const trimmed = stripped.trim();
|
|
7124
7138
|
if (!trimmed) return "";
|
|
7139
|
+
if (!errorContext && shouldRewriteRawPayloadWithoutErrorContext(trimmed)) return formatRawAssistantErrorForUi(trimmed);
|
|
7125
7140
|
if (errorContext) {
|
|
7126
7141
|
if (/incorrect role information|roles must alternate/i.test(trimmed)) return "Message ordering conflict - please try again. If this persists, use /new to start a fresh session.";
|
|
7127
7142
|
if (shouldRewriteContextOverflowText(trimmed)) return "Context overflow: prompt too large for the model. Try /reset (or /new) to start a fresh session, or use a larger-context model.";
|
|
@@ -7156,6 +7171,19 @@ const ERROR_PATTERNS = {
|
|
|
7156
7171
|
"service unavailable",
|
|
7157
7172
|
"high demand"
|
|
7158
7173
|
],
|
|
7174
|
+
serverError: [
|
|
7175
|
+
"an error occurred while processing",
|
|
7176
|
+
"internal server error",
|
|
7177
|
+
"internal_error",
|
|
7178
|
+
"server_error",
|
|
7179
|
+
"service temporarily unavailable",
|
|
7180
|
+
"service_unavailable",
|
|
7181
|
+
"bad gateway",
|
|
7182
|
+
"gateway timeout",
|
|
7183
|
+
"upstream error",
|
|
7184
|
+
"upstream connect error",
|
|
7185
|
+
"connection reset"
|
|
7186
|
+
],
|
|
7159
7187
|
timeout: [
|
|
7160
7188
|
"timeout",
|
|
7161
7189
|
"timed out",
|
|
@@ -7236,6 +7264,9 @@ function isAuthErrorMessage(raw) {
|
|
|
7236
7264
|
function isOverloadedErrorMessage(raw) {
|
|
7237
7265
|
return matchesErrorPatterns(raw, ERROR_PATTERNS.overloaded);
|
|
7238
7266
|
}
|
|
7267
|
+
function isServerErrorMessage(raw) {
|
|
7268
|
+
return matchesErrorPatterns(raw, ERROR_PATTERNS.serverError);
|
|
7269
|
+
}
|
|
7239
7270
|
function isJsonApiInternalServerError(raw) {
|
|
7240
7271
|
if (!raw) return false;
|
|
7241
7272
|
const value = raw.toLowerCase();
|
|
@@ -7297,6 +7328,7 @@ function classifyFailoverReason(raw) {
|
|
|
7297
7328
|
if (isBillingErrorMessage(raw)) return "billing";
|
|
7298
7329
|
if (isTimeoutErrorMessage(raw)) return "timeout";
|
|
7299
7330
|
if (isAuthErrorMessage(raw)) return "auth";
|
|
7331
|
+
if (isServerErrorMessage(raw)) return "timeout";
|
|
7300
7332
|
return null;
|
|
7301
7333
|
}
|
|
7302
7334
|
function isFailoverErrorMessage(raw) {
|
|
@@ -32,7 +32,7 @@ import { i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, r as san
|
|
|
32
32
|
import { a as createActionGate, c as jsonResult, d as readReactionParams, f as readStringArrayParam, l as parseAvailableTags, m as readStringParam, n as missingTargetError, o as imageResult, p as readStringOrNumberParam, r as unknownTargetError, s as imageResultFromFile, t as ambiguousTargetError, u as readNumberParam } from "./target-errors-KOPdGMxQ.js";
|
|
33
33
|
import { a as createSlackWebClient, c as validateSlackBlocksArray, i as buildSlackBlocksFallbackText, o as resolveSlackWebClientOptions, s as parseSlackBlocksInput, t as sendMessageSlack } from "./send-3DmbiJfM.js";
|
|
34
34
|
import { $ as parseTelegramTarget, A as hasBotMention, B as resolveSenderAllowMatch, C as buildTelegramGroupPeerId, D as describeReplyTarget, E as buildTypingThreadParams, F as resolveTelegramReplyId, G as readChannelAllowFromStore, H as isSenderIdAllowed, I as resolveTelegramStreamMode, J as upsertChannelPairingRequest, L as resolveTelegramThreadSpec, M as resolveTelegramForumThreadId, N as resolveTelegramGroupAllowFromContext, O as expandTextLinks, P as resolveTelegramMediaPlaceholder, Q as isVoiceCompatibleAudio, R as isSenderAllowed$1, S as buildTelegramGroupFrom, T as buildTelegramThreadParams, U as mergeAllowFromSources, V as firstDefined$1, W as addChannelAllowFromStoreEntry, X as listPairingChannels, Y as getPairingAdapter, Z as withTelegramApiErrorLogging, _ as resolveTelegramFetch, a as reactMessageTelegram, b as buildSenderLabel, c as sendStickerTelegram, d as wasSentByBot, et as resolveTelegramTargetChatType, f as isRecoverableTelegramNetworkError, g as wrapFileReferencesInHtml, h as renderTelegramHtmlText, i as editMessageTelegram, j as normalizeForwardedContext, k as extractTelegramLocation, m as markdownToTelegramHtml, n as createForumTopicTelegram, nt as toLocationContext, o as sendMessageTelegram, p as markdownToTelegramChunks, q as removeChannelAllowFromStoreEntry, r as deleteMessageTelegram, s as sendPollTelegram, t as buildInlineKeyboard, tt as formatLocationText, u as resolveTelegramVoiceSend, v as splitTelegramCaption, w as buildTelegramParentPeer, x as buildSenderName, y as buildGroupLabel, z as normalizeAllowFromWithStore$1 } from "./send-CNMXFSjB.js";
|
|
35
|
-
import { _ as CLI_OUTPUT_MAX_BUFFER, a as resolveMediaAttachmentLocalRoots, c as loadModelCatalog, d as resolveAttachmentKind, f as registerUnhandledRejectionHandler, g as resolveMediaUnderstandingScope, h as normalizeMediaUnderstandingChatType, i as resolveAutoImageModel, l as modelSupportsVision, m as resolveTimeoutMs$1, n as createMediaAttachmentCache, o as runCapability, p as resolveConcurrency, r as normalizeMediaAttachments, s as findModelInCatalog, t as buildProviderRegistry, v as applyTemplate, y as buildRandomTempFilePath } from "./runner-
|
|
35
|
+
import { _ as CLI_OUTPUT_MAX_BUFFER, a as resolveMediaAttachmentLocalRoots, c as loadModelCatalog, d as resolveAttachmentKind, f as registerUnhandledRejectionHandler, g as resolveMediaUnderstandingScope, h as normalizeMediaUnderstandingChatType, i as resolveAutoImageModel, l as modelSupportsVision, m as resolveTimeoutMs$1, n as createMediaAttachmentCache, o as runCapability, p as resolveConcurrency, r as normalizeMediaAttachments, s as findModelInCatalog, t as buildProviderRegistry, v as applyTemplate, y as buildRandomTempFilePath } from "./runner-DvYaPG7_.js";
|
|
36
36
|
import { a as resolveAckReaction, c as resolveHumanDelayConfig, i as resolveResponsePrefixTemplate, n as createReplyPrefixOptions, o as resolveAgentIdentity, s as resolveEffectiveMessagesConfig } from "./reply-prefix-DNmkrWtV.js";
|
|
37
37
|
import { i as isSilentReplyText, n as SILENT_REPLY_TOKEN, r as isSilentReplyPrefixText, t as HEARTBEAT_TOKEN } from "./tokens-2475WU2Z.js";
|
|
38
38
|
import { c as getSkillsSnapshotVersion, d as resolvePairingPaths, f as createAsyncLock, i as resolveSkillCommandInvocation, l as generatePairingToken, m as writeJsonAtomic, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, p as readJsonFile, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames, u as pruneExpiredPending } from "./skill-commands-D7degVS7.js";
|
|
@@ -41,15 +41,15 @@ import { M as isSecureWebSocketUrl, N as rawDataToString, T as DEFAULT_AI_SNAPSH
|
|
|
41
41
|
import { A as normalizeHyphenSlug, F as resolveChannelGroupRequireMention, I as resolveChannelGroupToolsPolicy, M as normalizeStringEntriesLower, P as resolveChannelGroupPolicy, a as normalizeReasoningLevel, c as normalizeVerboseLevel, d as getChannelDock, f as listChannelDocks, i as normalizeElevatedLevel, j as normalizeStringEntries, k as normalizeAtHashSlug, l as resolveResponseUsageMode, m as normalizeSignalMessagingTarget, n as formatXHighModelHint, o as normalizeThinkLevel, s as normalizeUsageDisplay, t as formatThinkingLevels, u as supportsXHighThinking } from "./thinking-BiNjzudU.js";
|
|
42
42
|
import { r as resolveIMessageAccount } from "./accounts-DEsAwvaZ.js";
|
|
43
43
|
import { i as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-BcQo4OUu.js";
|
|
44
|
-
import { C as getGlobalHookRunner, S as throwIfAborted, _ as normalizeTargetForProvider, a as normalizeOutboundPayloadsForJson, b as splitMediaFromOutput, c as applyReplyThreading, d as isRenderablePayload, f as shouldSuppressMessagingToolReplies, g as normalizeChannelTargetInput, h as buildTargetResolverSignature, i as normalizeOutboundPayloads, l as filterMessagingToolDuplicates, m as resolveReplyToMode, o as normalizeReplyPayloadsForDelivery, p as createReplyToModeFilterForChannel, r as formatOutboundPayloadLog, s as applyReplyTagsToPayload, t as deliverOutboundPayloads, u as filterMessagingToolMediaDuplicates, v as parseReplyDirectives, w as initializeGlobalHookRunner, x as parseInlineDirectives$1, y as MEDIA_TOKEN_RE } from "./deliver-
|
|
45
|
-
import { $ as normalizeToolName, A as isTransientHttpError, At as countToolResults, B as resolveProfile, Bt as resolveChannelResetConfig, C as isContextOverflowError, Ct as deliveryContextKey, D as isRateLimitAssistantError, Dt as normalizeAccountId$3, E as isLikelyContextOverflowError, Et as normalizeSessionDeliveryFields, F as resolveSandboxContext, Ft as normalizeInputProvenance, G as resolveBrowserControlAuth, Gt as resolveFreshSessionTotalTokens, H as resolveExistingPathsWithinRoot, Ht as resolveSessionResetType, I as resolveSandboxRuntimeStatus, It as acquireSessionWriteLock, J as buildPluginToolGroups, Jt as resolveMainSessionKey, K as resolveSandboxConfigForAgent, Kt as canonicalizeMainSessionAlias, L as createBrowserRouteContext, Lt as resolveSessionLockMaxHoldFromTimeout, M as parseImageSizeError, Mt as INPUT_PROVENANCE_KIND_VALUES, N as sanitizeUserFacingText, Nt as applyInputProvenanceToUserMessage, O as isRawApiErrorPayload, Ot as archiveSessionTranscripts, P as ensureSandboxWorkspaceForSession, Pt as hasInterSessionUserProvenance, Q as mergeAlsoAllowPolicy, R as registerBrowserRoutes, Rt as resolveSessionKey, S as isCompactionFailureError, St as deliveryContextFromSession, T as isFailoverErrorMessage, Tt as normalizeDeliveryContext, U as getBridgeAuthForPort, Ut as resolveThreadFlag, V as DEFAULT_UPLOAD_DIR, Vt as resolveSessionResetPolicy, W as ensureBrowserControlAuth, Wt as DEFAULT_RESET_TRIGGERS, X as expandPolicyWithPluginGroups, Xt as resolveGroupSessionKey, Y as collectExplicitAllowlist, Yt as deriveSessionMetaPatch, Z as expandToolGroups, _ as formatRawAssistantErrorForUi, _t as updateLastRoute, a as isMessagingToolDuplicateNormalized, at as ensureSessionHeader, b as isBillingAssistantError, bt as isCacheEnabled, c as extractToolCallsFromAssistant, ct as sanitizeGoogleTurnOrdering, d as isAntigravityClaude, dt as appendAssistantMessageToSessionTranscript, et as resolveToolProfilePolicy, f as isGoogleModelApi, g as formatBillingErrorMessage, gt as recordSessionMetaFromInbound, h as formatAssistantErrorText, ht as readSessionUpdatedAt, it as buildBootstrapContextFiles, j as parseImageDimensionError, jt as extractToolCallNames, k as isTimeoutErrorMessage, kt as capArrayByJsonBytes, l as extractToolResultId, lt as extractDeliveryInfo, m as classifyFailoverReason, mt as loadSessionStore, n as validateGeminiTurns, nt as compileGlobPatterns, o as normalizeTextForComparison, ot as resolveBootstrapMaxChars, p as BILLING_ERROR_USER_MESSAGE, pt as resolveAndPersistSessionFile, q as applyOwnerOnlyToolPolicy, qt as resolveExplicitAgentSessionKey, r as pickFallbackThinkingLevel, rt as matchesAnyGlobPattern, s as sanitizeSessionMessagesImages, st as resolveBootstrapTotalMaxChars, t as validateAnthropicTurns, tt as stripPluginOnlyAllowlist, u as downgradeOpenAIReasoningBlocks, ut as parseSessionThreadInfo, v as getApiErrorPayloadFingerprint, vt as updateSessionStore, w as isFailoverAssistantError, wt as mergeDeliveryContext, x as isCloudCodeAssistFormatError, xt as resolveCacheTtlMs$1, y as isAuthAssistantError, yt as updateSessionStoreEntry, z as resolveBrowserConfig, zt as evaluateSessionFreshness } from "./pi-embedded-helpers-
|
|
44
|
+
import { C as getGlobalHookRunner, S as throwIfAborted, _ as normalizeTargetForProvider, a as normalizeOutboundPayloadsForJson, b as splitMediaFromOutput, c as applyReplyThreading, d as isRenderablePayload, f as shouldSuppressMessagingToolReplies, g as normalizeChannelTargetInput, h as buildTargetResolverSignature, i as normalizeOutboundPayloads, l as filterMessagingToolDuplicates, m as resolveReplyToMode, o as normalizeReplyPayloadsForDelivery, p as createReplyToModeFilterForChannel, r as formatOutboundPayloadLog, s as applyReplyTagsToPayload, t as deliverOutboundPayloads, u as filterMessagingToolMediaDuplicates, v as parseReplyDirectives, w as initializeGlobalHookRunner, x as parseInlineDirectives$1, y as MEDIA_TOKEN_RE } from "./deliver-D4QMj1KQ.js";
|
|
45
|
+
import { $ as normalizeToolName, A as isTransientHttpError, At as countToolResults, B as resolveProfile, Bt as resolveChannelResetConfig, C as isContextOverflowError, Ct as deliveryContextKey, D as isRateLimitAssistantError, Dt as normalizeAccountId$3, E as isLikelyContextOverflowError, Et as normalizeSessionDeliveryFields, F as resolveSandboxContext, Ft as normalizeInputProvenance, G as resolveBrowserControlAuth, Gt as resolveFreshSessionTotalTokens, H as resolveExistingPathsWithinRoot, Ht as resolveSessionResetType, I as resolveSandboxRuntimeStatus, It as acquireSessionWriteLock, J as buildPluginToolGroups, Jt as resolveMainSessionKey, K as resolveSandboxConfigForAgent, Kt as canonicalizeMainSessionAlias, L as createBrowserRouteContext, Lt as resolveSessionLockMaxHoldFromTimeout, M as parseImageSizeError, Mt as INPUT_PROVENANCE_KIND_VALUES, N as sanitizeUserFacingText, Nt as applyInputProvenanceToUserMessage, O as isRawApiErrorPayload, Ot as archiveSessionTranscripts, P as ensureSandboxWorkspaceForSession, Pt as hasInterSessionUserProvenance, Q as mergeAlsoAllowPolicy, R as registerBrowserRoutes, Rt as resolveSessionKey, S as isCompactionFailureError, St as deliveryContextFromSession, T as isFailoverErrorMessage, Tt as normalizeDeliveryContext, U as getBridgeAuthForPort, Ut as resolveThreadFlag, V as DEFAULT_UPLOAD_DIR, Vt as resolveSessionResetPolicy, W as ensureBrowserControlAuth, Wt as DEFAULT_RESET_TRIGGERS, X as expandPolicyWithPluginGroups, Xt as resolveGroupSessionKey, Y as collectExplicitAllowlist, Yt as deriveSessionMetaPatch, Z as expandToolGroups, _ as formatRawAssistantErrorForUi, _t as updateLastRoute, a as isMessagingToolDuplicateNormalized, at as ensureSessionHeader, b as isBillingAssistantError, bt as isCacheEnabled, c as extractToolCallsFromAssistant, ct as sanitizeGoogleTurnOrdering, d as isAntigravityClaude, dt as appendAssistantMessageToSessionTranscript, et as resolveToolProfilePolicy, f as isGoogleModelApi, g as formatBillingErrorMessage, gt as recordSessionMetaFromInbound, h as formatAssistantErrorText, ht as readSessionUpdatedAt, it as buildBootstrapContextFiles, j as parseImageDimensionError, jt as extractToolCallNames, k as isTimeoutErrorMessage, kt as capArrayByJsonBytes, l as extractToolResultId, lt as extractDeliveryInfo, m as classifyFailoverReason, mt as loadSessionStore, n as validateGeminiTurns, nt as compileGlobPatterns, o as normalizeTextForComparison, ot as resolveBootstrapMaxChars, p as BILLING_ERROR_USER_MESSAGE, pt as resolveAndPersistSessionFile, q as applyOwnerOnlyToolPolicy, qt as resolveExplicitAgentSessionKey, r as pickFallbackThinkingLevel, rt as matchesAnyGlobPattern, s as sanitizeSessionMessagesImages, st as resolveBootstrapTotalMaxChars, t as validateAnthropicTurns, tt as stripPluginOnlyAllowlist, u as downgradeOpenAIReasoningBlocks, ut as parseSessionThreadInfo, v as getApiErrorPayloadFingerprint, vt as updateSessionStore, w as isFailoverAssistantError, wt as mergeDeliveryContext, x as isCloudCodeAssistFormatError, xt as resolveCacheTtlMs$1, y as isAuthAssistantError, yt as updateSessionStoreEntry, z as resolveBrowserConfig, zt as evaluateSessionFreshness } from "./pi-embedded-helpers-DBCtPcLq.js";
|
|
46
46
|
import { n as resolveConversationLabel } from "./conversation-label-yNSj43Jt.js";
|
|
47
47
|
import { i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-BNQjLbn7.js";
|
|
48
48
|
import { t as emitSessionTranscriptUpdate } from "./transcript-events-x1D4Vniz.js";
|
|
49
49
|
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-Up1aMyxZ.js";
|
|
50
50
|
import { i as saveMediaBuffer, r as getMediaDir } from "./store-CMGBlFGX.js";
|
|
51
51
|
import { r as normalizeInboundTextNewlines, t as finalizeInboundContext } from "./inbound-context-D5EzMeL_.js";
|
|
52
|
-
import { S as minimaxUnderstandImage, _ as stripThinkingTagsFromText, a as decodeDataUrl, b as extractTextFromChatContent, c as extractAssistantThinking, d as formatReasoningMessage, f as inferToolMetaFromArgs, g as stripMinimaxToolCallXml, h as stripDowngradedToolCallText, i as coerceImageModelConfig, l as extractThinkingFromTaggedStream, m as promoteThinkingTagsToBlocks, o as resolveProviderVisionModelFromConfig, p as isAssistantMessage, r as coerceImageAssistantText, s as extractAssistantText$1, u as extractThinkingFromTaggedText, v as resolveToolDisplay, x as ensureOpenClawModelsJson, y as stripReasoningTagsFromText } from "./image-
|
|
52
|
+
import { S as minimaxUnderstandImage, _ as stripThinkingTagsFromText, a as decodeDataUrl, b as extractTextFromChatContent, c as extractAssistantThinking, d as formatReasoningMessage, f as inferToolMetaFromArgs, g as stripMinimaxToolCallXml, h as stripDowngradedToolCallText, i as coerceImageModelConfig, l as extractThinkingFromTaggedStream, m as promoteThinkingTagsToBlocks, o as resolveProviderVisionModelFromConfig, p as isAssistantMessage, r as coerceImageAssistantText, s as extractAssistantText$1, u as extractThinkingFromTaggedText, v as resolveToolDisplay, x as ensureOpenClawModelsJson, y as stripReasoningTagsFromText } from "./image-Bu6pmW6i.js";
|
|
53
53
|
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-LbcEa65a.js";
|
|
54
54
|
import { d as listMemoryFiles, f as normalizeExtraMemoryPaths, v as runTasksWithConcurrency } from "./sqlite-ulpcowfN.js";
|
|
55
55
|
import { r as getDiagnosticSessionState } from "./diagnostic-session-state-Wd5tNeQG.js";
|
|
@@ -15480,7 +15480,7 @@ async function routeReply(params) {
|
|
|
15480
15480
|
const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
|
|
15481
15481
|
const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
|
|
15482
15482
|
try {
|
|
15483
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
15483
|
+
const { deliverOutboundPayloads } = await import("./deliver-D4QMj1KQ.js").then((n) => n.n);
|
|
15484
15484
|
return {
|
|
15485
15485
|
ok: true,
|
|
15486
15486
|
messageId: (await deliverOutboundPayloads({
|
|
@@ -15968,6 +15968,9 @@ function createReplyDispatcherWithTyping(options) {
|
|
|
15968
15968
|
typingController = typing;
|
|
15969
15969
|
}
|
|
15970
15970
|
},
|
|
15971
|
+
markRunComplete: () => {
|
|
15972
|
+
typingController?.markRunComplete();
|
|
15973
|
+
},
|
|
15971
15974
|
markDispatchIdle: () => {
|
|
15972
15975
|
typingController?.markDispatchIdle();
|
|
15973
15976
|
onIdle?.();
|
|
@@ -16003,7 +16006,7 @@ async function dispatchInboundMessage(params) {
|
|
|
16003
16006
|
});
|
|
16004
16007
|
}
|
|
16005
16008
|
async function dispatchInboundMessageWithBufferedDispatcher(params) {
|
|
16006
|
-
const { dispatcher, replyOptions, markDispatchIdle } = createReplyDispatcherWithTyping(params.dispatcherOptions);
|
|
16009
|
+
const { dispatcher, replyOptions, markDispatchIdle, markRunComplete } = createReplyDispatcherWithTyping(params.dispatcherOptions);
|
|
16007
16010
|
try {
|
|
16008
16011
|
return await dispatchInboundMessage({
|
|
16009
16012
|
ctx: params.ctx,
|
|
@@ -16016,6 +16019,7 @@ async function dispatchInboundMessageWithBufferedDispatcher(params) {
|
|
|
16016
16019
|
}
|
|
16017
16020
|
});
|
|
16018
16021
|
} finally {
|
|
16022
|
+
markRunComplete();
|
|
16019
16023
|
markDispatchIdle();
|
|
16020
16024
|
}
|
|
16021
16025
|
}
|
|
@@ -17954,7 +17958,7 @@ async function describeStickerImage(params) {
|
|
|
17954
17958
|
logVerbose(`telegram: describing sticker with ${provider}/${model}`);
|
|
17955
17959
|
try {
|
|
17956
17960
|
const buffer = await fs$1.readFile(imagePath);
|
|
17957
|
-
const { describeImageWithModel } = await import("./image-
|
|
17961
|
+
const { describeImageWithModel } = await import("./image-Bu6pmW6i.js").then((n) => n.n);
|
|
17958
17962
|
return (await describeImageWithModel({
|
|
17959
17963
|
buffer,
|
|
17960
17964
|
fileName: "sticker.webp",
|
|
@@ -20232,7 +20236,7 @@ async function preflightDiscordMessage(params) {
|
|
|
20232
20236
|
let preflightTranscript;
|
|
20233
20237
|
const hasAudioAttachment = message.attachments?.some((att) => att.contentType?.startsWith("audio/"));
|
|
20234
20238
|
if (!isDirectMessage && shouldRequireMention && hasAudioAttachment && !baseText && mentionRegexes.length > 0) try {
|
|
20235
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
20239
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-zFFuY6Bd.js");
|
|
20236
20240
|
const audioPaths = message.attachments?.filter((att) => att.contentType?.startsWith("audio/")).map((att) => att.url) ?? [];
|
|
20237
20241
|
if (audioPaths.length > 0) preflightTranscript = await transcribeFirstAudio({
|
|
20238
20242
|
ctx: {
|
|
@@ -26832,7 +26836,7 @@ async function runWithImageModelFallback(params) {
|
|
|
26832
26836
|
function createDefaultDeps() {
|
|
26833
26837
|
return {
|
|
26834
26838
|
sendMessageWhatsApp: async (...args) => {
|
|
26835
|
-
const { sendMessageWhatsApp } = await import("./web-
|
|
26839
|
+
const { sendMessageWhatsApp } = await import("./web-BFEz8bk-.js");
|
|
26836
26840
|
return await sendMessageWhatsApp(...args);
|
|
26837
26841
|
},
|
|
26838
26842
|
sendMessageTelegram: async (...args) => {
|
|
@@ -42362,7 +42366,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, storeAllowFro
|
|
|
42362
42366
|
const hasAudio = allMedia.some((media) => media.contentType?.startsWith("audio/"));
|
|
42363
42367
|
let preflightTranscript;
|
|
42364
42368
|
if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0) try {
|
|
42365
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
42369
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-zFFuY6Bd.js");
|
|
42366
42370
|
preflightTranscript = await transcribeFirstAudio({
|
|
42367
42371
|
ctx: {
|
|
42368
42372
|
MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
|
|
@@ -44519,7 +44523,7 @@ function loadWebLoginQr() {
|
|
|
44519
44523
|
return webLoginQrPromise;
|
|
44520
44524
|
}
|
|
44521
44525
|
function loadWebChannel() {
|
|
44522
|
-
webChannelPromise ??= import("./web-
|
|
44526
|
+
webChannelPromise ??= import("./web-BFEz8bk-.js");
|
|
44523
44527
|
return webChannelPromise;
|
|
44524
44528
|
}
|
|
44525
44529
|
function loadWhatsAppActions() {
|
|
@@ -76406,7 +76410,7 @@ async function deliverSessionMaintenanceWarning(params) {
|
|
|
76406
76410
|
return;
|
|
76407
76411
|
}
|
|
76408
76412
|
try {
|
|
76409
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
76413
|
+
const { deliverOutboundPayloads } = await import("./deliver-D4QMj1KQ.js").then((n) => n.n);
|
|
76410
76414
|
await deliverOutboundPayloads({
|
|
76411
76415
|
cfg: params.cfg,
|
|
76412
76416
|
channel,
|
|
@@ -6,7 +6,7 @@ import { E as runExec } from "./agent-scope-DnU66cJq.js";
|
|
|
6
6
|
import { c as detectMime, f as isAudioFileName, m as kindFromMime, u as getFileExtension } from "./image-ops-6S8Fa1d6.js";
|
|
7
7
|
import { i as fetchRemoteMedia, n as getDefaultMediaLocalRoots, o as fetchWithSsrFGuard, r as MediaFetchError } from "./local-roots-CW6TWE2a.js";
|
|
8
8
|
import { t as normalizeChatType } from "./chat-type-CEMQNtWX.js";
|
|
9
|
-
import { t as describeImageWithModel, x as ensureOpenClawModelsJson } from "./image-
|
|
9
|
+
import { t as describeImageWithModel, x as ensureOpenClawModelsJson } from "./image-Bu6pmW6i.js";
|
|
10
10
|
import { n as executeWithApiKeyRotation, r as parseGeminiAuth, t as collectProviderApiKeysForExecution } from "./api-key-rotation-DRhVpAS4.js";
|
|
11
11
|
import { constants } from "node:fs";
|
|
12
12
|
import path from "node:path";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as WA_WEB_AUTH_DIR, g as webAuthExists, s as logWebSelfId, u as pickWebChannel } from "./accounts-fnLsjAOi.js";
|
|
2
|
-
import "./reply-
|
|
2
|
+
import "./reply-Dl9JHnGW.js";
|
|
3
3
|
import "./paths-DVWx7USN.js";
|
|
4
4
|
import "./github-copilot-token-Cg0YPPSu.js";
|
|
5
5
|
import "./plugins-BizZYn_y.js";
|
|
@@ -31,7 +31,7 @@ import "./tool-images-BlYojiWx.js";
|
|
|
31
31
|
import "./target-errors-KOPdGMxQ.js";
|
|
32
32
|
import "./send-3DmbiJfM.js";
|
|
33
33
|
import "./send-CNMXFSjB.js";
|
|
34
|
-
import "./runner-
|
|
34
|
+
import "./runner-DvYaPG7_.js";
|
|
35
35
|
import "./reply-prefix-DNmkrWtV.js";
|
|
36
36
|
import "./tokens-2475WU2Z.js";
|
|
37
37
|
import "./skill-commands-D7degVS7.js";
|
|
@@ -40,13 +40,13 @@ import "./chrome-NvVwZ3Xn.js";
|
|
|
40
40
|
import "./thinking-BiNjzudU.js";
|
|
41
41
|
import "./accounts-DEsAwvaZ.js";
|
|
42
42
|
import "./accounts-BcQo4OUu.js";
|
|
43
|
-
import "./deliver-
|
|
44
|
-
import "./pi-embedded-helpers-
|
|
43
|
+
import "./deliver-D4QMj1KQ.js";
|
|
44
|
+
import "./pi-embedded-helpers-DBCtPcLq.js";
|
|
45
45
|
import "./paths-BNQjLbn7.js";
|
|
46
46
|
import "./diagnostic-Up1aMyxZ.js";
|
|
47
47
|
import "./store-CMGBlFGX.js";
|
|
48
|
-
import { n as monitorWebInbox, t as monitorWebChannel } from "./channel-web-
|
|
49
|
-
import "./image-
|
|
48
|
+
import { n as monitorWebInbox, t as monitorWebChannel } from "./channel-web-DfA1sgI9.js";
|
|
49
|
+
import "./image-Bu6pmW6i.js";
|
|
50
50
|
import "./pi-model-discovery-LbcEa65a.js";
|
|
51
51
|
import "./api-key-rotation-DRhVpAS4.js";
|
|
52
52
|
import "./sqlite-ulpcowfN.js";
|
|
@@ -13,7 +13,7 @@ import "./client-DrK7aLru.js";
|
|
|
13
13
|
import "./call-HzbpjcFE.js";
|
|
14
14
|
import "./message-channel-CVHJDItx.js";
|
|
15
15
|
import "./pairing-token-Byh6drgn.js";
|
|
16
|
-
import "./subagent-registry-
|
|
16
|
+
import "./subagent-registry-DGNGenUN.js";
|
|
17
17
|
import "./sessions-BVmrZrFA.js";
|
|
18
18
|
import "./tokens-ANnYrShl.js";
|
|
19
19
|
import "./plugins-BxYZzFkm.js";
|
|
@@ -23,13 +23,13 @@ import "./logging-CFvkxgcX.js";
|
|
|
23
23
|
import "./send-mdCBM_lP.js";
|
|
24
24
|
import "./send-ENOozmo1.js";
|
|
25
25
|
import "./with-timeout-BJj1dns_.js";
|
|
26
|
-
import "./deliver-
|
|
26
|
+
import "./deliver-meQdcFaA.js";
|
|
27
27
|
import "./diagnostic-C6WTf4ZE.js";
|
|
28
28
|
import "./diagnostic-session-state-CIjIGxEE.js";
|
|
29
29
|
import "./accounts-1gFWxwAw.js";
|
|
30
30
|
import "./send-Dd6W68eD.js";
|
|
31
31
|
import "./image-ops-CKJNUuNW.js";
|
|
32
|
-
import "./pi-embedded-helpers-
|
|
32
|
+
import "./pi-embedded-helpers-C_U_c_EU.js";
|
|
33
33
|
import "./sandbox-BMaHJcKh.js";
|
|
34
34
|
import "./chrome-DOT5Dxfr.js";
|
|
35
35
|
import { l as promptYesNo } from "./tailscale-BxzsxqAY.js";
|
|
@@ -65,9 +65,9 @@ import "./ir-DetFY9t5.js";
|
|
|
65
65
|
import "./render-e7fENCYH.js";
|
|
66
66
|
import "./commands-CDrOx1RO.js";
|
|
67
67
|
import "./commands-registry-BcqdkMzV.js";
|
|
68
|
-
import "./image-
|
|
68
|
+
import "./image-C8HOu4vb.js";
|
|
69
69
|
import "./tool-display-DixohEVL.js";
|
|
70
|
-
import "./runner-
|
|
70
|
+
import "./runner-CbkB3vpb.js";
|
|
71
71
|
import "./model-catalog-DzKq0MC2.js";
|
|
72
72
|
import "./session-utils-DbIfE0Ek.js";
|
|
73
73
|
import "./skill-commands-BdHYzdEB.js";
|
|
@@ -102,7 +102,7 @@ import "./npm-registry-spec-DkaZNHAW.js";
|
|
|
102
102
|
import "./skill-scanner-Cb7mXGIR.js";
|
|
103
103
|
import { i as resolvePluginInstallDir, n as installPluginFromNpmSpec, r as installPluginFromPath, t as recordPluginInstall } from "./installs-DDy4Ij7L.js";
|
|
104
104
|
import { t as renderTable } from "./table-C9BoE_4p.js";
|
|
105
|
-
import { t as buildPluginStatusReport } from "./status-
|
|
105
|
+
import { t as buildPluginStatusReport } from "./status-BjjDHl4v.js";
|
|
106
106
|
import { n as updateNpmInstalledPlugins } from "./update-ChO83Ek6.js";
|
|
107
107
|
import os from "node:os";
|
|
108
108
|
import path from "node:path";
|