@hanzo/bot 2026.3.11 → 2026.3.13
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/{accounts-cApXM7Ij.js → accounts-BfUDrXkg.js} +17 -17
- package/dist/{accounts-7zwrtsCi.js → accounts-CU6IpCdO.js} +2 -2
- package/dist/{accounts-BEs2omoE.js → accounts-CvwEUGLi.js} +2 -2
- package/dist/{active-listener-DR8OFowd.js → active-listener-BrRv4Xwc.js} +2 -2
- package/dist/{api-key-rotation-RknBrUrn.js → api-key-rotation-GaH2pQmb.js} +2 -2
- package/dist/{audio-preflight-Chfaq_QP.js → audio-preflight-ClPkYtiy.js} +32 -32
- package/dist/{audio-preflight-D2ryNxLv.js → audio-preflight-hEJ-K1Ib.js} +4 -4
- package/dist/{audio-transcription-runner-BI-TLd1r.js → audio-transcription-runner-CqUAFMxM.js} +1 -1
- package/dist/{audio-transcription-runner-BvSPpIzU.js → audio-transcription-runner-DcmYYRTV.js} +12 -12
- package/dist/{audit-membership-runtime-CVVxrZ7j.js → audit-membership-runtime-BJ149bTU.js} +4 -4
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +51 -51
- package/dist/bundled/bootstrap-extra-files/handler.js +6 -6
- package/dist/bundled/command-logger/handler.js +2 -2
- package/dist/bundled/session-memory/handler.js +51 -51
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-activity-CALqzTg5.js → channel-activity-BtB_KYWB.js} +3 -3
- package/dist/{chrome-CFVzlBUF.js → chrome-CiH9yYg6.js} +18 -18
- package/dist/{chrome-DWoTm_BG.js → chrome-jdOx2dAl.js} +8 -8
- package/dist/{cloud-connect-bZKXaJWj.js → cloud-connect-yv8A2P84.js} +1 -1
- package/dist/{commands-registry-DD9ywdfc.js → commands-registry-CYzULUtG.js} +4 -4
- package/dist/{deliver-B2IvdEAO.js → deliver-CQ6QaVna.js} +21 -21
- package/dist/{deliver-BrVS3qD4.js → deliver-DpRQLcxS.js} +1 -1
- package/dist/{deliver-runtime-y426rL_k.js → deliver-runtime-9qy2zTFN.js} +3 -3
- package/dist/deliver-runtime-AIl3Ydhb.js +36 -0
- package/dist/deps-send-discord.runtime-BCKKTBVj.js +26 -0
- package/dist/deps-send-imessage.runtime-CrYNg1e_.js +25 -0
- package/dist/deps-send-signal.runtime-rttQOioa.js +24 -0
- package/dist/deps-send-slack.runtime-BsCUhMAR.js +22 -0
- package/dist/deps-send-telegram.runtime-sOFkXXMD.js +27 -0
- package/dist/deps-send-whatsapp.runtime-B4PrMybd.js +60 -0
- package/dist/{deps-send-whatsapp.runtime-CUDRJQI6.js → deps-send-whatsapp.runtime-CZEk5mx7.js} +7 -7
- package/dist/{diagnostic-pXxnbxER.js → diagnostic-Dt3OGXoB.js} +2 -2
- package/dist/entry.js +1 -1
- package/dist/{errors-CHd6Q-vF.js → errors-DDrhcWHi.js} +1 -1
- package/dist/extensionAPI.js +6 -6
- package/dist/{fetch-DZVswJ-3.js → fetch-C7bGdK_0.js} +5 -5
- package/dist/{fetch-guard-EqKIhwBB.js → fetch-guard-Danf_0St.js} +2 -2
- package/dist/{frontmatter-B6XNqDx2.js → frontmatter-BFHzrAY7.js} +3 -3
- package/dist/{fs-safe-ClYE3-y0.js → fs-safe-Cou1ijNV.js} +4 -4
- package/dist/{github-copilot-token-BDioPmd6.js → github-copilot-token-D13V9YBz.js} +7 -7
- package/dist/{image-BgWMM5C3.js → image-Cw0N8PLF.js} +6 -6
- package/dist/{image-D99xLnGA.js → image-YeyG7rr8.js} +1 -1
- package/dist/{image-ops-DGh7juCd.js → image-ops-C23SGeMe.js} +2 -2
- package/dist/image-runtime-BTWt5pDL.js +29 -0
- package/dist/{image-runtime-BHiX93k-.js → image-runtime-DZ9BSPkK.js} +3 -3
- package/dist/{ir-BUxTWPJl.js → ir-CeK8iZwE.js} +8 -8
- package/dist/{legacy-names-DZdACm3t.js → legacy-names-Bkl4tjN-.js} +1 -1
- package/dist/llm-slug-generator.js +51 -51
- package/dist/{local-launch-DO77bp0N.js → local-launch-CUwfR4xk.js} +29 -9
- package/dist/{logger-LCC1m_20.js → logger-D4RcXHR-.js} +7 -7
- package/dist/{login-BPpT7LmW.js → login-CHghmysG.js} +5 -5
- package/dist/{login-qr-ROsDrMTV.js → login-qr-CNFNhTf4.js} +10 -10
- package/dist/{manager-DcZ7mOtr.js → manager-DD6mzJNU.js} +13 -13
- package/dist/manager-runtime-Daqs8hiB.js +18 -0
- package/dist/{model-selection-DX7XfNlF.js → model-selection-CLGE3YIs.js} +43 -43
- package/dist/{outbound-attachment-CC04mCS8.js → outbound-attachment-gUN8NzLf.js} +2 -2
- package/dist/{outbound-CQ5XVDFO.js → outbound-qbvc4GA6.js} +6 -6
- package/dist/{path-alias-guards-IQC4IpGS.js → path-alias-guards-BzNEeFKJ.js} +1 -1
- package/dist/{paths-GZsDv0mI.js → paths-0WxUzzEz.js} +4 -4
- package/dist/{paths-Cvc9EM8Y.js → paths-C6TxBCvO.js} +5 -5
- package/dist/{pi-embedded-bHDdzvEW.js → pi-embedded-DF0t5HJD.js} +159 -159
- package/dist/{pi-embedded-DoF5GLjn.js → pi-embedded-bklbT-yp.js} +24 -24
- package/dist/{pi-embedded-helpers-CVj2Bw45.js → pi-embedded-helpers-BT9OkmaI.js} +52 -52
- package/dist/{pi-embedded-helpers-DkZKaPa4.js → pi-embedded-helpers-CSHUPpwW.js} +3 -3
- package/dist/pi-model-discovery-runtime-C9astVbX.js +11 -0
- package/dist/{pi-model-discovery-BYBYqQ0u.js → pi-model-discovery-vsJpfYA9.js} +7 -7
- package/dist/{pi-tools.before-tool-call.runtime-BiTed3Jt.js → pi-tools.before-tool-call.runtime-D-Vj4eZ7.js} +9 -9
- package/dist/plugin-sdk/discord.js +6 -6
- package/dist/plugin-sdk/mattermost.js +3 -3
- package/dist/{plugins-DB-tbkgl.js → plugins-BZY4UQdP.js} +13 -13
- package/dist/{proxy-env-CiOhiqru.js → proxy-env-BgSzvACM.js} +1 -1
- package/dist/{proxy-fetch-lxJGuoUa.js → proxy-fetch-ChfJDZwG.js} +1 -1
- package/dist/{pw-ai-Mq6HuD9y.js → pw-ai-C99W41P5.js} +1 -1
- package/dist/{pw-ai-WtE5uJRQ.js → pw-ai-CaeuHJYc.js} +14 -14
- package/dist/{qmd-manager-Bcw2cb8D.js → qmd-manager-IaHGjYlf.js} +10 -10
- package/dist/{query-expansion-D9bYNybh.js → query-expansion-CzkZbxDS.js} +6 -6
- package/dist/{redact-DqlKR0-n.js → redact-DGz6yigq.js} +1 -1
- package/dist/{run-main-BDJMRMI4.js → run-main-BmfZLBd9.js} +2 -2
- package/dist/{run-with-concurrency-B8f7bYi3.js → run-with-concurrency-Ccm0w34R.js} +4 -4
- package/dist/runtime-whatsapp-login.runtime-BQjNpkbA.js +13 -0
- package/dist/runtime-whatsapp-outbound.runtime-GVjcQLWE.js +22 -0
- package/dist/{send-CkPIBk6V.js → send-BRWGalFX.js} +8 -8
- package/dist/{send-BftnuVa7.js → send-CYoz4Xjy.js} +7 -7
- package/dist/{send-D9k6sRe5.js → send-Cpd5Q5mD.js} +6 -6
- package/dist/{send-yLSU7X_F.js → send-Dsz28eiu.js} +28 -28
- package/dist/{send-pIawmzTN.js → send-tBfK5Za7.js} +5 -5
- package/dist/{session-CgL23zvS.js → session-Dn8bzB0l.js} +8 -8
- package/dist/{skill-commands-Cnz3QjWm.js → skill-commands-LO2hG7Hm.js} +9 -9
- package/dist/{skills-BhLAW7lA.js → skills-mpCKgKof.js} +22 -22
- package/dist/slash-commands.runtime-Qho-6_Lc.js +16 -0
- package/dist/{slash-dispatch.runtime-BI4kyhSk.js → slash-dispatch.runtime-CLPlz-lX.js} +6 -6
- package/dist/slash-dispatch.runtime-CkR-TldC.js +56 -0
- package/dist/slash-skill-commands.runtime-DmrTozXn.js +20 -0
- package/dist/{store-EDjci9yP.js → store-DbpT7v8D.js} +2 -2
- package/dist/subagent-registry-runtime-DWAZpHqO.js +56 -0
- package/dist/{subagent-registry-runtime-nzkRCNeS.js → subagent-registry-runtime-TuyVULIb.js} +6 -6
- package/dist/{subsystem-CdFYjh2k.js → subsystem-W834z9Wa.js} +14 -14
- package/dist/{tables-tp9Zl0hI.js → tables-BpeU6RzS.js} +1 -1
- package/dist/{target-errors-3YX3buv4.js → target-errors-Dcsvl3HX.js} +2 -2
- package/dist/{thinking-BaTRgLOg.js → thinking-DzbkyD99.js} +7 -7
- package/dist/{tokens-mtgzW7UN.js → tokens-Cyi-NbsV.js} +1 -1
- package/dist/{tool-images-C3-c00jy.js → tool-images-DktJ_8C5.js} +2 -2
- package/dist/{web-BOPbMZux.js → web-BByXTa4p.js} +55 -55
- package/dist/{web-72kt7sM1.js → web-Ci3EFOGu.js} +6 -6
- package/dist/{whatsapp-actions-BQWT_h74.js → whatsapp-actions-BK9m2IVX.js} +21 -21
- package/dist/{workspace-DKhOowSl.js → workspace-BhNk7PBH.js} +20 -20
- package/extensions/acpx/package.json +1 -1
- package/extensions/bluebubbles/package.json +1 -1
- package/extensions/ci-fix-loop/package.json +1 -1
- package/extensions/continuous-learning/package.json +1 -1
- package/extensions/copilot-proxy/package.json +1 -1
- package/extensions/diagnostics-otel/package.json +1 -1
- package/extensions/diffs/package.json +1 -1
- package/extensions/discord/package.json +1 -1
- package/extensions/feishu/package.json +1 -1
- package/extensions/flow/package.json +1 -1
- package/extensions/google-antigravity-auth/package.json +1 -1
- package/extensions/google-gemini-cli-auth/package.json +1 -1
- package/extensions/googlechat/package.json +1 -1
- package/extensions/imessage/package.json +1 -1
- package/extensions/irc/package.json +1 -1
- package/extensions/line/package.json +1 -1
- package/extensions/llm-task/package.json +1 -1
- package/extensions/lobster/package.json +1 -1
- package/extensions/matrix/CHANGELOG.md +10 -0
- package/extensions/matrix/package.json +1 -1
- package/extensions/mattermost/package.json +1 -1
- package/extensions/memory-core/package.json +1 -1
- package/extensions/memory-lancedb/package.json +1 -1
- package/extensions/minimax-portal-auth/package.json +1 -1
- package/extensions/msteams/CHANGELOG.md +10 -0
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/CHANGELOG.md +10 -0
- package/extensions/nostr/package.json +1 -1
- package/extensions/open-prose/package.json +1 -1
- package/extensions/self-improvement/package.json +1 -1
- package/extensions/signal/package.json +1 -1
- package/extensions/slack/package.json +1 -1
- package/extensions/synology-chat/package.json +1 -1
- package/extensions/telegram/package.json +1 -1
- package/extensions/tlon/package.json +1 -1
- package/extensions/twitch/CHANGELOG.md +10 -0
- package/extensions/twitch/package.json +1 -1
- package/extensions/voice-call/CHANGELOG.md +10 -0
- package/extensions/voice-call/package.json +1 -1
- package/extensions/whatsapp/package.json +1 -1
- package/extensions/zalo/CHANGELOG.md +10 -0
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/CHANGELOG.md +10 -0
- package/extensions/zalouser/package.json +1 -1
- package/package.json +1 -1
- package/dist/deliver-runtime-DY7UPWdO.js +0 -36
- package/dist/deps-send-discord.runtime-B_MPWdLu.js +0 -26
- package/dist/deps-send-imessage.runtime-BqgAHmfA.js +0 -25
- package/dist/deps-send-signal.runtime-B4CYnceH.js +0 -24
- package/dist/deps-send-slack.runtime-dtkYbGcS.js +0 -22
- package/dist/deps-send-telegram.runtime-C5f1UIXW.js +0 -27
- package/dist/deps-send-whatsapp.runtime-D6XwcPPI.js +0 -60
- package/dist/image-runtime-v_h0aTZD.js +0 -29
- package/dist/manager-runtime-D_u9rPEs.js +0 -18
- package/dist/pi-model-discovery-runtime-ZDLroaI6.js +0 -11
- package/dist/runtime-whatsapp-login.runtime-A_4Z63o5.js +0 -13
- package/dist/runtime-whatsapp-outbound.runtime-QGzX864p.js +0 -22
- package/dist/slash-commands.runtime-BD-KtYmG.js +0 -16
- package/dist/slash-dispatch.runtime-Dzq3WGxH.js +0 -56
- package/dist/slash-skill-commands.runtime-EpYM7zik.js +0 -20
- package/dist/subagent-registry-runtime-DwTeW5f1.js +0 -56
|
@@ -4,7 +4,7 @@ import chalk, { Chalk } from "chalk";
|
|
|
4
4
|
import fs, { constants } from "node:fs";
|
|
5
5
|
import { Logger } from "tslog";
|
|
6
6
|
import os from "node:os";
|
|
7
|
-
import
|
|
7
|
+
import JSON5 from "json5";
|
|
8
8
|
import { isDeepStrictEqual, promisify } from "node:util";
|
|
9
9
|
import fs$1 from "node:fs/promises";
|
|
10
10
|
import { execFile, execFileSync, spawn } from "node:child_process";
|
|
@@ -812,7 +812,7 @@ function readLoggingConfig() {
|
|
|
812
812
|
try {
|
|
813
813
|
if (!fs.existsSync(configPath)) return;
|
|
814
814
|
const raw = fs.readFileSync(configPath, "utf-8");
|
|
815
|
-
const logging =
|
|
815
|
+
const logging = JSON5.parse(raw)?.logging;
|
|
816
816
|
if (!logging || typeof logging !== "object" || Array.isArray(logging)) return;
|
|
817
817
|
return logging;
|
|
818
818
|
} catch {
|
|
@@ -6046,7 +6046,7 @@ const defaultResolver = {
|
|
|
6046
6046
|
resolvedPath,
|
|
6047
6047
|
rootRealDir
|
|
6048
6048
|
}),
|
|
6049
|
-
parseJson: (raw) =>
|
|
6049
|
+
parseJson: (raw) => JSON5.parse(raw)
|
|
6050
6050
|
};
|
|
6051
6051
|
/**
|
|
6052
6052
|
* Resolves all $include directives in a parsed config object.
|
|
@@ -13506,7 +13506,7 @@ function resolveConfigPathForDeps(deps) {
|
|
|
13506
13506
|
function normalizeDeps(overrides = {}) {
|
|
13507
13507
|
return {
|
|
13508
13508
|
fs: overrides.fs ?? fs,
|
|
13509
|
-
json5: overrides.json5 ??
|
|
13509
|
+
json5: overrides.json5 ?? JSON5,
|
|
13510
13510
|
env: overrides.env ?? process.env,
|
|
13511
13511
|
homedir: overrides.homedir ?? (() => resolveRequiredHomeDir(overrides.env ?? process.env, os.homedir)),
|
|
13512
13512
|
configPath: overrides.configPath ?? "",
|
|
@@ -13517,11 +13517,11 @@ function maybeLoadDotEnvForConfig(env) {
|
|
|
13517
13517
|
if (env !== process.env) return;
|
|
13518
13518
|
loadDotEnv({ quiet: true });
|
|
13519
13519
|
}
|
|
13520
|
-
function parseConfigJson5(raw, json5
|
|
13520
|
+
function parseConfigJson5(raw, json5 = JSON5) {
|
|
13521
13521
|
try {
|
|
13522
13522
|
return {
|
|
13523
13523
|
ok: true,
|
|
13524
|
-
parsed: json5
|
|
13524
|
+
parsed: json5.parse(raw)
|
|
13525
13525
|
};
|
|
13526
13526
|
} catch (err) {
|
|
13527
13527
|
return {
|
|
@@ -5,7 +5,7 @@ import fs, { constants } from "node:fs";
|
|
|
5
5
|
import os from "node:os";
|
|
6
6
|
import chalk, { Chalk } from "chalk";
|
|
7
7
|
import { Logger } from "tslog";
|
|
8
|
-
import
|
|
8
|
+
import JSON5 from "json5";
|
|
9
9
|
import util, { promisify } from "node:util";
|
|
10
10
|
import fs$1 from "node:fs/promises";
|
|
11
11
|
import process$1 from "node:process";
|
|
@@ -400,7 +400,7 @@ function readLoggingConfig() {
|
|
|
400
400
|
try {
|
|
401
401
|
if (!fs.existsSync(configPath)) return;
|
|
402
402
|
const raw = fs.readFileSync(configPath, "utf-8");
|
|
403
|
-
const logging =
|
|
403
|
+
const logging = JSON5.parse(raw)?.logging;
|
|
404
404
|
if (!logging || typeof logging !== "object" || Array.isArray(logging)) return;
|
|
405
405
|
return logging;
|
|
406
406
|
} catch {
|
|
@@ -4656,7 +4656,7 @@ function resolveOpenClawManifestBlock(params) {
|
|
|
4656
4656
|
const raw = getFrontmatterString(params.frontmatter, params.key ?? "metadata");
|
|
4657
4657
|
if (!raw) return;
|
|
4658
4658
|
try {
|
|
4659
|
-
const parsed =
|
|
4659
|
+
const parsed = JSON5.parse(raw);
|
|
4660
4660
|
if (!parsed || typeof parsed !== "object") return;
|
|
4661
4661
|
const manifestKeys = [MANIFEST_KEY, ...LEGACY_MANIFEST_KEYS];
|
|
4662
4662
|
for (const key of manifestKeys) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { l as resolveDefaultAgentId } from "./run-with-concurrency-
|
|
2
|
-
import { t as createSubsystemLogger } from "./subsystem-
|
|
3
|
-
import { G as normalizeAccountId, K as normalizeOptionalAccountId, R as normalizeAgentId, W as DEFAULT_ACCOUNT_ID } from "./workspace-
|
|
4
|
-
import { h as normalizeE164 } from "./logger-
|
|
5
|
-
import { Jt as normalizeChatChannelId, Kt as normalizeAnyChannelId, Qt as requireActivePluginRegistry, Ut as CHAT_CHANNEL_ORDER, Zt as getActivePluginRegistryVersion, br as normalizeSecretInputString, er as isTruthyEnvValue, vr as hasConfiguredSecretInput, yr as normalizeResolvedSecretInputString } from "./model-selection-
|
|
6
|
-
import { g as resolveAccountEntry, h as createAccountListHelpers } from "./accounts-
|
|
7
|
-
import
|
|
1
|
+
import { l as resolveDefaultAgentId } from "./run-with-concurrency-Ccm0w34R.js";
|
|
2
|
+
import { t as createSubsystemLogger } from "./subsystem-W834z9Wa.js";
|
|
3
|
+
import { G as normalizeAccountId, K as normalizeOptionalAccountId, R as normalizeAgentId, W as DEFAULT_ACCOUNT_ID } from "./workspace-BhNk7PBH.js";
|
|
4
|
+
import { h as normalizeE164 } from "./logger-D4RcXHR-.js";
|
|
5
|
+
import { Jt as normalizeChatChannelId, Kt as normalizeAnyChannelId, Qt as requireActivePluginRegistry, Ut as CHAT_CHANNEL_ORDER, Zt as getActivePluginRegistryVersion, br as normalizeSecretInputString, er as isTruthyEnvValue, vr as hasConfiguredSecretInput, yr as normalizeResolvedSecretInputString } from "./model-selection-CLGE3YIs.js";
|
|
6
|
+
import { g as resolveAccountEntry, h as createAccountListHelpers } from "./accounts-BfUDrXkg.js";
|
|
7
|
+
import syncFs from "node:fs";
|
|
8
8
|
import util from "node:util";
|
|
9
9
|
|
|
10
10
|
//#region src/channels/plugins/account-action-gate.ts
|
|
@@ -512,7 +512,7 @@ function resolveTelegramToken(cfg, opts = {}) {
|
|
|
512
512
|
const accountCfg = resolveAccountCfg(accountId !== DEFAULT_ACCOUNT_ID ? accountId : DEFAULT_ACCOUNT_ID);
|
|
513
513
|
const accountTokenFile = accountCfg?.tokenFile?.trim();
|
|
514
514
|
if (accountTokenFile) {
|
|
515
|
-
if (!
|
|
515
|
+
if (!syncFs.existsSync(accountTokenFile)) {
|
|
516
516
|
opts.logMissingFile?.(`channels.telegram.accounts.${accountId}.tokenFile not found: ${accountTokenFile}`);
|
|
517
517
|
return {
|
|
518
518
|
token: "",
|
|
@@ -520,7 +520,7 @@ function resolveTelegramToken(cfg, opts = {}) {
|
|
|
520
520
|
};
|
|
521
521
|
}
|
|
522
522
|
try {
|
|
523
|
-
const token =
|
|
523
|
+
const token = syncFs.readFileSync(accountTokenFile, "utf-8").trim();
|
|
524
524
|
if (token) return {
|
|
525
525
|
token,
|
|
526
526
|
source: "tokenFile"
|
|
@@ -548,7 +548,7 @@ function resolveTelegramToken(cfg, opts = {}) {
|
|
|
548
548
|
const allowEnv = accountId === DEFAULT_ACCOUNT_ID;
|
|
549
549
|
const tokenFile = telegramCfg?.tokenFile?.trim();
|
|
550
550
|
if (tokenFile) {
|
|
551
|
-
if (!
|
|
551
|
+
if (!syncFs.existsSync(tokenFile)) {
|
|
552
552
|
opts.logMissingFile?.(`channels.telegram.tokenFile not found: ${tokenFile}`);
|
|
553
553
|
return {
|
|
554
554
|
token: "",
|
|
@@ -556,7 +556,7 @@ function resolveTelegramToken(cfg, opts = {}) {
|
|
|
556
556
|
};
|
|
557
557
|
}
|
|
558
558
|
try {
|
|
559
|
-
const token =
|
|
559
|
+
const token = syncFs.readFileSync(tokenFile, "utf-8").trim();
|
|
560
560
|
if (token) return {
|
|
561
561
|
token,
|
|
562
562
|
source: "tokenFile"
|
|
@@ -720,13 +720,13 @@ function mergeTelegramAccountConfig(cfg, accountId) {
|
|
|
720
720
|
function inspectTokenFile(pathValue) {
|
|
721
721
|
const tokenFile = typeof pathValue === "string" ? pathValue.trim() : "";
|
|
722
722
|
if (!tokenFile) return null;
|
|
723
|
-
if (!
|
|
723
|
+
if (!syncFs.existsSync(tokenFile)) return {
|
|
724
724
|
token: "",
|
|
725
725
|
tokenSource: "tokenFile",
|
|
726
726
|
tokenStatus: "configured_unavailable"
|
|
727
727
|
};
|
|
728
728
|
try {
|
|
729
|
-
const token =
|
|
729
|
+
const token = syncFs.readFileSync(tokenFile, "utf-8").trim();
|
|
730
730
|
return {
|
|
731
731
|
token,
|
|
732
732
|
tokenSource: "tokenFile",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Dt as parseLooseIpAddress, Et as parseCanonicalIpAddress, St as isLegacyIpv4Literal, _t as extractEmbeddedIpv4FromIpv6, bt as isCanonicalDottedDecimalIPv4, vt as isBlockedSpecialUseIpv4Address, xt as isIpv4Address, yt as isBlockedSpecialUseIpv6Address } from "./model-selection-
|
|
1
|
+
import { Dt as parseLooseIpAddress, Et as parseCanonicalIpAddress, St as isLegacyIpv4Literal, _t as extractEmbeddedIpv4FromIpv6, bt as isCanonicalDottedDecimalIPv4, vt as isBlockedSpecialUseIpv4Address, xt as isIpv4Address, yt as isBlockedSpecialUseIpv6Address } from "./model-selection-CLGE3YIs.js";
|
|
2
2
|
import { lookup } from "node:dns";
|
|
3
3
|
import { lookup as lookup$1 } from "node:dns/promises";
|
|
4
4
|
import { Agent } from "undici";
|
|
@@ -3,7 +3,7 @@ import "./paths-CaA28K0s.js";
|
|
|
3
3
|
import { Y as resolvePreferredOpenClawTmpDir } from "./logger-03l-fZAz.js";
|
|
4
4
|
import { gr as formatCliCommand } from "./model-selection-DBsGeiK-.js";
|
|
5
5
|
import "./github-copilot-token-BWXANsA6.js";
|
|
6
|
-
import { F as resolveStrictExistingPathsWithinRoot, L as DEFAULT_FILL_FIELD_TYPE, M as DEFAULT_TRACE_DIR, N as DEFAULT_UPLOAD_DIR, S as withCdpSocket, _ as withBrowserNavigationPolicy, d as formatAriaSnapshot, f as normalizeCdpWsUrl, g as assertBrowserNavigationResultAllowed, h as assertBrowserNavigationAllowed, k as withNoProxyForCdpUrl, t as getChromeWebSocketUrl, v as appendCdpPath, x as getHeadersWithAuth, y as fetchJson } from "./chrome-
|
|
6
|
+
import { F as resolveStrictExistingPathsWithinRoot, L as DEFAULT_FILL_FIELD_TYPE, M as DEFAULT_TRACE_DIR, N as DEFAULT_UPLOAD_DIR, S as withCdpSocket, _ as withBrowserNavigationPolicy, d as formatAriaSnapshot, f as normalizeCdpWsUrl, g as assertBrowserNavigationResultAllowed, h as assertBrowserNavigationAllowed, k as withNoProxyForCdpUrl, t as getChromeWebSocketUrl, v as appendCdpPath, x as getHeadersWithAuth, y as fetchJson } from "./chrome-jdOx2dAl.js";
|
|
7
7
|
import "./path-alias-guards-CnMi477K.js";
|
|
8
8
|
import "./redact-BYyl-Ec1.js";
|
|
9
9
|
import { r as formatErrorMessage } from "./errors-LUTSBF6A.js";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import "./run-with-concurrency-
|
|
2
|
-
import "./paths-
|
|
3
|
-
import { w as resolvePreferredOpenClawTmpDir } from "./subsystem-
|
|
4
|
-
import "./workspace-
|
|
5
|
-
import "./logger-
|
|
6
|
-
import { fr as formatCliCommand } from "./model-selection-
|
|
7
|
-
import "./github-copilot-token-
|
|
8
|
-
import "./legacy-names-
|
|
9
|
-
import { F as resolveStrictExistingPathsWithinRoot, L as DEFAULT_FILL_FIELD_TYPE, M as DEFAULT_TRACE_DIR, N as DEFAULT_UPLOAD_DIR, S as withCdpSocket, _ as withBrowserNavigationPolicy, d as formatAriaSnapshot, f as normalizeCdpWsUrl, g as assertBrowserNavigationResultAllowed, h as assertBrowserNavigationAllowed, k as withNoProxyForCdpUrl, t as getChromeWebSocketUrl, v as appendCdpPath, x as getHeadersWithAuth, y as fetchJson } from "./chrome-
|
|
10
|
-
import "./path-alias-guards-
|
|
11
|
-
import "./redact-
|
|
12
|
-
import { r as formatErrorMessage } from "./errors-
|
|
13
|
-
import { s as writeFileFromPathWithinRoot } from "./fs-safe-
|
|
14
|
-
import "./proxy-env-
|
|
1
|
+
import "./run-with-concurrency-Ccm0w34R.js";
|
|
2
|
+
import "./paths-C6TxBCvO.js";
|
|
3
|
+
import { w as resolvePreferredOpenClawTmpDir } from "./subsystem-W834z9Wa.js";
|
|
4
|
+
import "./workspace-BhNk7PBH.js";
|
|
5
|
+
import "./logger-D4RcXHR-.js";
|
|
6
|
+
import { fr as formatCliCommand } from "./model-selection-CLGE3YIs.js";
|
|
7
|
+
import "./github-copilot-token-D13V9YBz.js";
|
|
8
|
+
import "./legacy-names-Bkl4tjN-.js";
|
|
9
|
+
import { F as resolveStrictExistingPathsWithinRoot, L as DEFAULT_FILL_FIELD_TYPE, M as DEFAULT_TRACE_DIR, N as DEFAULT_UPLOAD_DIR, S as withCdpSocket, _ as withBrowserNavigationPolicy, d as formatAriaSnapshot, f as normalizeCdpWsUrl, g as assertBrowserNavigationResultAllowed, h as assertBrowserNavigationAllowed, k as withNoProxyForCdpUrl, t as getChromeWebSocketUrl, v as appendCdpPath, x as getHeadersWithAuth, y as fetchJson } from "./chrome-CiH9yYg6.js";
|
|
10
|
+
import "./path-alias-guards-BzNEeFKJ.js";
|
|
11
|
+
import "./redact-DGz6yigq.js";
|
|
12
|
+
import { r as formatErrorMessage } from "./errors-DDrhcWHi.js";
|
|
13
|
+
import { s as writeFileFromPathWithinRoot } from "./fs-safe-Cou1ijNV.js";
|
|
14
|
+
import "./proxy-env-BgSzvACM.js";
|
|
15
15
|
import fs from "node:fs/promises";
|
|
16
16
|
import path from "node:path";
|
|
17
17
|
import crypto from "node:crypto";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { c as resolveAgentWorkspaceDir } from "./run-with-concurrency-
|
|
2
|
-
import { c as resolveStateDir } from "./paths-
|
|
3
|
-
import { t as createSubsystemLogger } from "./subsystem-
|
|
4
|
-
import { $ as parseAgentSessionKey } from "./workspace-
|
|
5
|
-
import "./logger-
|
|
6
|
-
import "./path-alias-guards-
|
|
7
|
-
import "./redact-
|
|
8
|
-
import { c as writeFileWithinRoot } from "./fs-safe-
|
|
1
|
+
import { c as resolveAgentWorkspaceDir } from "./run-with-concurrency-Ccm0w34R.js";
|
|
2
|
+
import { c as resolveStateDir } from "./paths-C6TxBCvO.js";
|
|
3
|
+
import { t as createSubsystemLogger } from "./subsystem-W834z9Wa.js";
|
|
4
|
+
import { $ as parseAgentSessionKey } from "./workspace-BhNk7PBH.js";
|
|
5
|
+
import "./logger-D4RcXHR-.js";
|
|
6
|
+
import "./path-alias-guards-BzNEeFKJ.js";
|
|
7
|
+
import "./redact-DGz6yigq.js";
|
|
8
|
+
import { c as writeFileWithinRoot } from "./fs-safe-Cou1ijNV.js";
|
|
9
9
|
import { n as resolveWindowsSpawnProgram, t as materializeWindowsSpawnProgram } from "./windows-spawn-B89VigUN.js";
|
|
10
|
-
import "./paths-
|
|
11
|
-
import { a as listSessionFilesForAgent, i as buildSessionEntry, r as requireNodeSqlite, t as extractKeywords, v as isFileMissingError, y as statRegularFile } from "./query-expansion-
|
|
10
|
+
import "./paths-0WxUzzEz.js";
|
|
11
|
+
import { a as listSessionFilesForAgent, i as buildSessionEntry, r as requireNodeSqlite, t as extractKeywords, v as isFileMissingError, y as statRegularFile } from "./query-expansion-CzkZbxDS.js";
|
|
12
12
|
import fs from "node:fs/promises";
|
|
13
13
|
import os from "node:os";
|
|
14
14
|
import path from "node:path";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as runTasksWithConcurrency } from "./run-with-concurrency-
|
|
2
|
-
import { t as createSubsystemLogger } from "./subsystem-
|
|
3
|
-
import { t as redactSensitiveText } from "./redact-
|
|
4
|
-
import { o as resolveSessionTranscriptsDirForAgent } from "./paths-
|
|
1
|
+
import { t as runTasksWithConcurrency } from "./run-with-concurrency-Ccm0w34R.js";
|
|
2
|
+
import { t as createSubsystemLogger } from "./subsystem-W834z9Wa.js";
|
|
3
|
+
import { t as redactSensitiveText } from "./redact-DGz6yigq.js";
|
|
4
|
+
import { o as resolveSessionTranscriptsDirForAgent } from "./paths-0WxUzzEz.js";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
6
|
import fs from "node:fs/promises";
|
|
7
7
|
import path from "node:path";
|
|
8
|
-
import
|
|
8
|
+
import syncFs from "node:fs";
|
|
9
9
|
import crypto from "node:crypto";
|
|
10
10
|
|
|
11
11
|
//#region src/memory/fs-utils.ts
|
|
@@ -31,7 +31,7 @@ async function statRegularFile(absPath) {
|
|
|
31
31
|
//#region src/memory/internal.ts
|
|
32
32
|
function ensureDir(dir) {
|
|
33
33
|
try {
|
|
34
|
-
|
|
34
|
+
syncFs.mkdirSync(dir, { recursive: true });
|
|
35
35
|
} catch {}
|
|
36
36
|
return dir;
|
|
37
37
|
}
|
|
@@ -404,14 +404,14 @@ async function runCli(argv = process$1.argv) {
|
|
|
404
404
|
if (!hasHelpOrVersion(normalizedArgv)) {
|
|
405
405
|
const { readConfigFileSnapshot } = await import("./auth-profiles-1kLg_p4r.js").then((n) => n.F);
|
|
406
406
|
if (!(await readConfigFileSnapshot()).exists) {
|
|
407
|
-
const { runFirstRunCloudConnect } = await import("./cloud-connect-
|
|
407
|
+
const { runFirstRunCloudConnect } = await import("./cloud-connect-yv8A2P84.js");
|
|
408
408
|
await runFirstRunCloudConnect();
|
|
409
409
|
return;
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
412
|
if (!hasHelpOrVersion(normalizedArgv)) {
|
|
413
413
|
if (!getPrimaryCommand(normalizedArgv)) {
|
|
414
|
-
const { showLaunchMenu } = await import("./cloud-connect-
|
|
414
|
+
const { showLaunchMenu } = await import("./cloud-connect-yv8A2P84.js");
|
|
415
415
|
await showLaunchMenu();
|
|
416
416
|
return;
|
|
417
417
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as resolveStateDir } from "./paths-
|
|
2
|
-
import { t as createSubsystemLogger } from "./subsystem-
|
|
3
|
-
import { $ as parseAgentSessionKey, B as resolveAgentIdFromSessionKey, R as normalizeAgentId, j as DEFAULT_AGENT_ID, p as resolveDefaultAgentWorkspaceDir } from "./workspace-
|
|
4
|
-
import { y as resolveUserPath } from "./logger-
|
|
1
|
+
import { c as resolveStateDir } from "./paths-C6TxBCvO.js";
|
|
2
|
+
import { t as createSubsystemLogger } from "./subsystem-W834z9Wa.js";
|
|
3
|
+
import { $ as parseAgentSessionKey, B as resolveAgentIdFromSessionKey, R as normalizeAgentId, j as DEFAULT_AGENT_ID, p as resolveDefaultAgentWorkspaceDir } from "./workspace-BhNk7PBH.js";
|
|
4
|
+
import { y as resolveUserPath } from "./logger-D4RcXHR-.js";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
|
|
7
7
|
//#region src/config/model-input.ts
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "./run-with-concurrency-Ccm0w34R.js";
|
|
2
|
+
import "./paths-C6TxBCvO.js";
|
|
3
|
+
import "./subsystem-W834z9Wa.js";
|
|
4
|
+
import "./workspace-BhNk7PBH.js";
|
|
5
|
+
import "./logger-D4RcXHR-.js";
|
|
6
|
+
import "./model-selection-CLGE3YIs.js";
|
|
7
|
+
import "./github-copilot-token-D13V9YBz.js";
|
|
8
|
+
import "./legacy-names-Bkl4tjN-.js";
|
|
9
|
+
import "./accounts-BfUDrXkg.js";
|
|
10
|
+
import "./session-Dn8bzB0l.js";
|
|
11
|
+
import { t as loginWeb } from "./login-CHghmysG.js";
|
|
12
|
+
|
|
13
|
+
export { loginWeb };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import "./run-with-concurrency-Ccm0w34R.js";
|
|
2
|
+
import "./paths-C6TxBCvO.js";
|
|
3
|
+
import "./subsystem-W834z9Wa.js";
|
|
4
|
+
import "./workspace-BhNk7PBH.js";
|
|
5
|
+
import "./logger-D4RcXHR-.js";
|
|
6
|
+
import "./model-selection-CLGE3YIs.js";
|
|
7
|
+
import "./github-copilot-token-D13V9YBz.js";
|
|
8
|
+
import "./legacy-names-Bkl4tjN-.js";
|
|
9
|
+
import "./accounts-BfUDrXkg.js";
|
|
10
|
+
import "./plugins-BZY4UQdP.js";
|
|
11
|
+
import "./image-ops-C23SGeMe.js";
|
|
12
|
+
import "./path-alias-guards-BzNEeFKJ.js";
|
|
13
|
+
import "./fs-safe-Cou1ijNV.js";
|
|
14
|
+
import "./proxy-env-BgSzvACM.js";
|
|
15
|
+
import "./fetch-C7bGdK_0.js";
|
|
16
|
+
import "./fetch-guard-Danf_0St.js";
|
|
17
|
+
import "./ir-CeK8iZwE.js";
|
|
18
|
+
import "./render-DW7AcFdD.js";
|
|
19
|
+
import "./tables-BpeU6RzS.js";
|
|
20
|
+
import { n as sendPollWhatsApp, t as sendMessageWhatsApp } from "./outbound-qbvc4GA6.js";
|
|
21
|
+
|
|
22
|
+
export { sendMessageWhatsApp, sendPollWhatsApp };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { w as resolvePreferredOpenClawTmpDir } from "./subsystem-
|
|
2
|
-
import { G as normalizeAccountId, W as DEFAULT_ACCOUNT_ID } from "./workspace-
|
|
3
|
-
import { S as retryAsync, Z as loadConfig, x as resolveRetryConfig } from "./model-selection-
|
|
4
|
-
import { E as normalizeDiscordToken, T as resolveDiscordAccount } from "./plugins-
|
|
1
|
+
import { w as resolvePreferredOpenClawTmpDir } from "./subsystem-W834z9Wa.js";
|
|
2
|
+
import { G as normalizeAccountId, W as DEFAULT_ACCOUNT_ID } from "./workspace-BhNk7PBH.js";
|
|
3
|
+
import { S as retryAsync, Z as loadConfig, x as resolveRetryConfig } from "./model-selection-CLGE3YIs.js";
|
|
4
|
+
import { E as normalizeDiscordToken, T as resolveDiscordAccount } from "./plugins-BZY4UQdP.js";
|
|
5
5
|
import { i as requireTargetKind, r as parseMentionPrefixOrAtUserTarget, t as buildMessagingTarget } from "./targets-Bhj5bO-0.js";
|
|
6
|
-
import { k as maxBytesForKind, x as extensionForMime } from "./image-ops-
|
|
7
|
-
import { a as loadWebMedia, d as chunkMarkdownTextWithMode, m as resolveChunkMode, o as loadWebMediaRaw, s as resolveMarkdownTableMode } from "./ir-
|
|
6
|
+
import { k as maxBytesForKind, x as extensionForMime } from "./image-ops-C23SGeMe.js";
|
|
7
|
+
import { a as loadWebMedia, d as chunkMarkdownTextWithMode, m as resolveChunkMode, o as loadWebMediaRaw, s as resolveMarkdownTableMode } from "./ir-CeK8iZwE.js";
|
|
8
8
|
import { t as resolveFetch } from "./fetch-BfuG8uZ8.js";
|
|
9
|
-
import { n as recordChannelActivity, r as createDiscordRetryRunner } from "./channel-activity-
|
|
9
|
+
import { n as recordChannelActivity, r as createDiscordRetryRunner } from "./channel-activity-BtB_KYWB.js";
|
|
10
10
|
import { t as buildOutboundMediaLoadOptions } from "./load-options-BFUunM8u.js";
|
|
11
11
|
import { n as normalizePollInput, t as normalizePollDurationHours } from "./polls-C_BruSkP.js";
|
|
12
|
-
import { t as convertMarkdownTables } from "./tables-
|
|
12
|
+
import { t as convertMarkdownTables } from "./tables-BpeU6RzS.js";
|
|
13
13
|
import fs from "node:fs/promises";
|
|
14
14
|
import path from "node:path";
|
|
15
15
|
import { promisify } from "node:util";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { h as normalizeE164, y as resolveUserPath } from "./logger-
|
|
2
|
-
import { Z as loadConfig } from "./model-selection-
|
|
3
|
-
import { E as kindFromMime } from "./image-ops-
|
|
4
|
-
import { t as resolveIMessageAccount } from "./accounts-
|
|
5
|
-
import { s as resolveMarkdownTableMode } from "./ir-
|
|
6
|
-
import { t as convertMarkdownTables } from "./tables-
|
|
7
|
-
import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-
|
|
1
|
+
import { h as normalizeE164, y as resolveUserPath } from "./logger-D4RcXHR-.js";
|
|
2
|
+
import { Z as loadConfig } from "./model-selection-CLGE3YIs.js";
|
|
3
|
+
import { E as kindFromMime } from "./image-ops-C23SGeMe.js";
|
|
4
|
+
import { t as resolveIMessageAccount } from "./accounts-CvwEUGLi.js";
|
|
5
|
+
import { s as resolveMarkdownTableMode } from "./ir-CeK8iZwE.js";
|
|
6
|
+
import { t as convertMarkdownTables } from "./tables-BpeU6RzS.js";
|
|
7
|
+
import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-gUN8NzLf.js";
|
|
8
8
|
import { spawn } from "node:child_process";
|
|
9
9
|
import { createInterface } from "node:readline";
|
|
10
10
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { u as logVerbose } from "./subsystem-
|
|
2
|
-
import { Z as loadConfig } from "./model-selection-
|
|
3
|
-
import { i as isSilentReplyText } from "./tokens-
|
|
4
|
-
import { _ as resolveSlackAccount, b as resolveSlackBotToken } from "./plugins-
|
|
1
|
+
import { u as logVerbose } from "./subsystem-W834z9Wa.js";
|
|
2
|
+
import { Z as loadConfig } from "./model-selection-CLGE3YIs.js";
|
|
3
|
+
import { i as isSilentReplyText } from "./tokens-Cyi-NbsV.js";
|
|
4
|
+
import { _ as resolveSlackAccount, b as resolveSlackBotToken } from "./plugins-BZY4UQdP.js";
|
|
5
5
|
import { i as requireTargetKind, n as ensureTargetId, r as parseMentionPrefixOrAtUserTarget, t as buildMessagingTarget } from "./targets-Bhj5bO-0.js";
|
|
6
|
-
import { r as withTrustedEnvProxyGuardedFetchMode, t as fetchWithSsrFGuard } from "./fetch-guard-
|
|
7
|
-
import { a as loadWebMedia, d as chunkMarkdownTextWithMode, h as resolveTextChunkLimit, m as resolveChunkMode, n as markdownToIR, s as resolveMarkdownTableMode, t as chunkMarkdownIR } from "./ir-
|
|
6
|
+
import { r as withTrustedEnvProxyGuardedFetchMode, t as fetchWithSsrFGuard } from "./fetch-guard-Danf_0St.js";
|
|
7
|
+
import { a as loadWebMedia, d as chunkMarkdownTextWithMode, h as resolveTextChunkLimit, m as resolveChunkMode, n as markdownToIR, s as resolveMarkdownTableMode, t as chunkMarkdownIR } from "./ir-CeK8iZwE.js";
|
|
8
8
|
import { t as renderMarkdownWithMarkers } from "./render-DW7AcFdD.js";
|
|
9
9
|
import { WebClient } from "@slack/web-api";
|
|
10
10
|
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { c as resolveStateDir, d as resolveRequiredHomeDir, l as expandHomePrefix, o as resolveOAuthDir } from "./paths-
|
|
2
|
-
import { c as danger, t as createSubsystemLogger, u as logVerbose } from "./subsystem-
|
|
3
|
-
import { G as normalizeAccountId, W as DEFAULT_ACCOUNT_ID } from "./workspace-
|
|
4
|
-
import { a as CONFIG_DIR, b as safeParseJson } from "./logger-
|
|
5
|
-
import { $ as readConfigFileSnapshotForWrite, Gn as resolveTelegramPreviewStreamMode, Z as loadConfig, cr as withFileLock$1, er as isTruthyEnvValue, tt as writeConfigFile } from "./model-selection-
|
|
6
|
-
import { n as listChannelPlugins, t as getChannelPlugin, u as resolveTelegramAccount } from "./plugins-
|
|
1
|
+
import { c as resolveStateDir, d as resolveRequiredHomeDir, l as expandHomePrefix, o as resolveOAuthDir } from "./paths-C6TxBCvO.js";
|
|
2
|
+
import { c as danger, t as createSubsystemLogger, u as logVerbose } from "./subsystem-W834z9Wa.js";
|
|
3
|
+
import { G as normalizeAccountId, W as DEFAULT_ACCOUNT_ID } from "./workspace-BhNk7PBH.js";
|
|
4
|
+
import { a as CONFIG_DIR, b as safeParseJson } from "./logger-D4RcXHR-.js";
|
|
5
|
+
import { $ as readConfigFileSnapshotForWrite, Gn as resolveTelegramPreviewStreamMode, Z as loadConfig, cr as withFileLock$1, er as isTruthyEnvValue, tt as writeConfigFile } from "./model-selection-CLGE3YIs.js";
|
|
6
|
+
import { n as listChannelPlugins, t as getChannelPlugin, u as resolveTelegramAccount } from "./plugins-BZY4UQdP.js";
|
|
7
7
|
import { n as normalizeTelegramLookupTarget, r as parseTelegramTarget, t as normalizeTelegramChatId } from "./targets-BiE9e9-P.js";
|
|
8
|
-
import { D as normalizeMimeType, E as kindFromMime, S as getFileExtension, T as isGifMedia } from "./image-ops-
|
|
9
|
-
import { t as redactSensitiveText } from "./redact-
|
|
10
|
-
import { i as formatUncaughtError, n as extractErrorCode, o as readErrorName, r as formatErrorMessage, t as collectErrorGraphCandidates } from "./errors-
|
|
11
|
-
import { t as hasProxyEnvConfigured } from "./proxy-env-
|
|
8
|
+
import { D as normalizeMimeType, E as kindFromMime, S as getFileExtension, T as isGifMedia } from "./image-ops-C23SGeMe.js";
|
|
9
|
+
import { t as redactSensitiveText } from "./redact-DGz6yigq.js";
|
|
10
|
+
import { i as formatUncaughtError, n as extractErrorCode, o as readErrorName, r as formatErrorMessage, t as collectErrorGraphCandidates } from "./errors-DDrhcWHi.js";
|
|
11
|
+
import { t as hasProxyEnvConfigured } from "./proxy-env-BgSzvACM.js";
|
|
12
12
|
import { r as writeJsonAtomic } from "./json-files-D7-rxoSr.js";
|
|
13
|
-
import { t as makeProxyFetch } from "./proxy-fetch-
|
|
14
|
-
import { a as loadWebMedia, n as markdownToIR, s as resolveMarkdownTableMode, t as chunkMarkdownIR } from "./ir-
|
|
13
|
+
import { t as makeProxyFetch } from "./proxy-fetch-ChfJDZwG.js";
|
|
14
|
+
import { a as loadWebMedia, n as markdownToIR, s as resolveMarkdownTableMode, t as chunkMarkdownIR } from "./ir-CeK8iZwE.js";
|
|
15
15
|
import { t as renderMarkdownWithMarkers } from "./render-DW7AcFdD.js";
|
|
16
16
|
import { t as resolveFetch } from "./fetch-BfuG8uZ8.js";
|
|
17
|
-
import { i as createTelegramRetryRunner, n as recordChannelActivity } from "./channel-activity-
|
|
17
|
+
import { i as createTelegramRetryRunner, n as recordChannelActivity } from "./channel-activity-BtB_KYWB.js";
|
|
18
18
|
import { t as buildOutboundMediaLoadOptions } from "./load-options-BFUunM8u.js";
|
|
19
19
|
import { n as normalizePollInput } from "./polls-C_BruSkP.js";
|
|
20
20
|
import fs from "node:fs/promises";
|
|
21
21
|
import os from "node:os";
|
|
22
22
|
import path from "node:path";
|
|
23
|
-
import
|
|
23
|
+
import syncFs, { readFileSync } from "node:fs";
|
|
24
24
|
import JSON5 from "json5";
|
|
25
25
|
import process$1 from "node:process";
|
|
26
26
|
import crypto, { randomBytes } from "node:crypto";
|
|
@@ -81,7 +81,7 @@ function getPairingAdapter(channelId) {
|
|
|
81
81
|
//#region src/plugin-sdk/json-store.ts
|
|
82
82
|
async function readJsonFileWithFallback(filePath, fallback) {
|
|
83
83
|
try {
|
|
84
|
-
const parsed = safeParseJson(await
|
|
84
|
+
const parsed = safeParseJson(await syncFs.promises.readFile(filePath, "utf-8"));
|
|
85
85
|
if (parsed == null) return {
|
|
86
86
|
value: fallback,
|
|
87
87
|
exists: true
|
|
@@ -168,7 +168,7 @@ async function readPairingRequests(filePath) {
|
|
|
168
168
|
}
|
|
169
169
|
async function ensureJsonFile(filePath, fallback) {
|
|
170
170
|
try {
|
|
171
|
-
await
|
|
171
|
+
await syncFs.promises.access(filePath);
|
|
172
172
|
} catch {
|
|
173
173
|
await writeJsonFile(filePath, fallback);
|
|
174
174
|
}
|
|
@@ -324,7 +324,7 @@ function resolveAllowFromReadCacheOrMissing(filePath, stat) {
|
|
|
324
324
|
async function readAllowFromStateForPathWithExists(channel, filePath) {
|
|
325
325
|
let stat = null;
|
|
326
326
|
try {
|
|
327
|
-
stat = await
|
|
327
|
+
stat = await syncFs.promises.stat(filePath);
|
|
328
328
|
} catch (err) {
|
|
329
329
|
if (err.code !== "ENOENT") throw err;
|
|
330
330
|
}
|
|
@@ -367,7 +367,7 @@ async function writeAllowFromState(filePath, allowFrom) {
|
|
|
367
367
|
});
|
|
368
368
|
let stat = null;
|
|
369
369
|
try {
|
|
370
|
-
stat = await
|
|
370
|
+
stat = await syncFs.promises.stat(filePath);
|
|
371
371
|
} catch {}
|
|
372
372
|
setAllowFromReadCache(filePath, {
|
|
373
373
|
exists: true,
|
|
@@ -974,7 +974,7 @@ function resolveCronStorePath(storePath) {
|
|
|
974
974
|
}
|
|
975
975
|
async function loadCronStore(storePath) {
|
|
976
976
|
try {
|
|
977
|
-
const raw = await
|
|
977
|
+
const raw = await syncFs.promises.readFile(storePath, "utf-8");
|
|
978
978
|
let parsed;
|
|
979
979
|
try {
|
|
980
980
|
parsed = JSON5.parse(raw);
|
|
@@ -1000,21 +1000,21 @@ async function loadCronStore(storePath) {
|
|
|
1000
1000
|
}
|
|
1001
1001
|
}
|
|
1002
1002
|
async function setSecureFileMode(filePath) {
|
|
1003
|
-
await
|
|
1003
|
+
await syncFs.promises.chmod(filePath, 384).catch(() => void 0);
|
|
1004
1004
|
}
|
|
1005
1005
|
async function saveCronStore(storePath, store, opts) {
|
|
1006
1006
|
const storeDir = path.dirname(storePath);
|
|
1007
|
-
await
|
|
1007
|
+
await syncFs.promises.mkdir(storeDir, {
|
|
1008
1008
|
recursive: true,
|
|
1009
1009
|
mode: 448
|
|
1010
1010
|
});
|
|
1011
|
-
await
|
|
1011
|
+
await syncFs.promises.chmod(storeDir, 448).catch(() => void 0);
|
|
1012
1012
|
const json = JSON.stringify(store, null, 2);
|
|
1013
1013
|
const cached = serializedStoreCache.get(storePath);
|
|
1014
1014
|
if (cached === json) return;
|
|
1015
1015
|
let previous = cached ?? null;
|
|
1016
1016
|
if (previous === null) try {
|
|
1017
|
-
previous = await
|
|
1017
|
+
previous = await syncFs.promises.readFile(storePath, "utf-8");
|
|
1018
1018
|
} catch (err) {
|
|
1019
1019
|
if (err.code !== "ENOENT") throw err;
|
|
1020
1020
|
}
|
|
@@ -1023,14 +1023,14 @@ async function saveCronStore(storePath, store, opts) {
|
|
|
1023
1023
|
return;
|
|
1024
1024
|
}
|
|
1025
1025
|
const tmp = `${storePath}.${process.pid}.${randomBytes(8).toString("hex")}.tmp`;
|
|
1026
|
-
await
|
|
1026
|
+
await syncFs.promises.writeFile(tmp, json, {
|
|
1027
1027
|
encoding: "utf-8",
|
|
1028
1028
|
mode: 384
|
|
1029
1029
|
});
|
|
1030
1030
|
await setSecureFileMode(tmp);
|
|
1031
1031
|
if (previous !== null && !opts?.skipBackup) try {
|
|
1032
1032
|
const backupPath = `${storePath}.bak`;
|
|
1033
|
-
await
|
|
1033
|
+
await syncFs.promises.copyFile(storePath, backupPath);
|
|
1034
1034
|
await setSecureFileMode(backupPath);
|
|
1035
1035
|
} catch {}
|
|
1036
1036
|
await renameWithRetry(tmp, storePath);
|
|
@@ -1041,7 +1041,7 @@ const RENAME_MAX_RETRIES = 3;
|
|
|
1041
1041
|
const RENAME_BASE_DELAY_MS = 50;
|
|
1042
1042
|
async function renameWithRetry(src, dest) {
|
|
1043
1043
|
for (let attempt = 0; attempt <= RENAME_MAX_RETRIES; attempt++) try {
|
|
1044
|
-
await
|
|
1044
|
+
await syncFs.promises.rename(src, dest);
|
|
1045
1045
|
return;
|
|
1046
1046
|
} catch (err) {
|
|
1047
1047
|
const code = err.code;
|
|
@@ -1050,8 +1050,8 @@ async function renameWithRetry(src, dest) {
|
|
|
1050
1050
|
continue;
|
|
1051
1051
|
}
|
|
1052
1052
|
if (code === "EPERM" || code === "EEXIST") {
|
|
1053
|
-
await
|
|
1054
|
-
await
|
|
1053
|
+
await syncFs.promises.copyFile(src, dest);
|
|
1054
|
+
await syncFs.promises.unlink(src).catch(() => {});
|
|
1055
1055
|
return;
|
|
1056
1056
|
}
|
|
1057
1057
|
throw err;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Z as loadConfig } from "./model-selection-
|
|
1
|
+
import { Z as loadConfig } from "./model-selection-CLGE3YIs.js";
|
|
2
2
|
import { n as generateSecureUuid } from "./secure-random-CXrBi7Jq.js";
|
|
3
|
-
import { n as resolveSignalAccount } from "./accounts-
|
|
4
|
-
import { E as kindFromMime } from "./image-ops-
|
|
3
|
+
import { n as resolveSignalAccount } from "./accounts-CU6IpCdO.js";
|
|
4
|
+
import { E as kindFromMime } from "./image-ops-C23SGeMe.js";
|
|
5
5
|
import { n as fetchWithTimeout } from "./fetch-timeout-Wgx3OXYj.js";
|
|
6
|
-
import { n as markdownToIR, s as resolveMarkdownTableMode, t as chunkMarkdownIR } from "./ir-
|
|
6
|
+
import { n as markdownToIR, s as resolveMarkdownTableMode, t as chunkMarkdownIR } from "./ir-CeK8iZwE.js";
|
|
7
7
|
import { t as resolveFetch } from "./fetch-BfuG8uZ8.js";
|
|
8
|
-
import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-
|
|
8
|
+
import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-gUN8NzLf.js";
|
|
9
9
|
|
|
10
10
|
//#region src/signal/format.ts
|
|
11
11
|
function normalizeUrlForComparison(url) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c as danger, m as success, x as toPinoLikeLogger, y as getChildLogger } from "./subsystem-
|
|
2
|
-
import { l as ensureDir, y as resolveUserPath } from "./logger-
|
|
3
|
-
import { Xn as VERSION, fr as formatCliCommand } from "./model-selection-
|
|
4
|
-
import { d as resolveDefaultWebAuthDir, f as resolveWebCredsBackupPath, l as readCredsJsonRaw, p as resolveWebCredsPath, s as maybeRestoreCredsFromBackup } from "./accounts-
|
|
5
|
-
import
|
|
1
|
+
import { c as danger, m as success, x as toPinoLikeLogger, y as getChildLogger } from "./subsystem-W834z9Wa.js";
|
|
2
|
+
import { l as ensureDir, y as resolveUserPath } from "./logger-D4RcXHR-.js";
|
|
3
|
+
import { Xn as VERSION, fr as formatCliCommand } from "./model-selection-CLGE3YIs.js";
|
|
4
|
+
import { d as resolveDefaultWebAuthDir, f as resolveWebCredsBackupPath, l as readCredsJsonRaw, p as resolveWebCredsPath, s as maybeRestoreCredsFromBackup } from "./accounts-BfUDrXkg.js";
|
|
5
|
+
import syncFs from "node:fs";
|
|
6
6
|
import { randomUUID } from "node:crypto";
|
|
7
7
|
import { DisconnectReason, fetchLatestBaileysVersion, makeCacheableSignalKeyStore, makeWASocket, useMultiFileAuthState } from "@whiskeysockets/baileys";
|
|
8
8
|
import qrcode from "qrcode-terminal";
|
|
@@ -21,16 +21,16 @@ async function safeSaveCreds(authDir, saveCreds, logger) {
|
|
|
21
21
|
const raw = readCredsJsonRaw(credsPath);
|
|
22
22
|
if (raw) try {
|
|
23
23
|
JSON.parse(raw);
|
|
24
|
-
|
|
24
|
+
syncFs.copyFileSync(credsPath, backupPath);
|
|
25
25
|
try {
|
|
26
|
-
|
|
26
|
+
syncFs.chmodSync(backupPath, 384);
|
|
27
27
|
} catch {}
|
|
28
28
|
} catch {}
|
|
29
29
|
} catch {}
|
|
30
30
|
try {
|
|
31
31
|
await Promise.resolve(saveCreds());
|
|
32
32
|
try {
|
|
33
|
-
|
|
33
|
+
syncFs.chmodSync(resolveWebCredsPath(authDir), 384);
|
|
34
34
|
} catch {}
|
|
35
35
|
} catch (err) {
|
|
36
36
|
logger.warn({ error: String(err) }, "failed saving WhatsApp creds");
|