cclawd 1.0.6 → 1.0.7
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/{active-listener-Dkhmfuwx.js → active-listener-DYmI7imH.js} +2 -2
- package/dist/{api-key-rotation-BOfI3cG3.js → api-key-rotation-DLU4jvSu.js} +1 -1
- package/dist/{audio-preflight-CtkZ5SAs.js → audio-preflight-C9TMbRb4.js} +15 -15
- package/dist/{audio-transcription-runner-CbPqoiHX.js → audio-transcription-runner-Q5zG_hYd.js} +10 -10
- package/dist/{audit-membership-runtime-hXUuer4x.js → audit-membership-runtime-DhxSwFnF.js} +6 -6
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +35 -35
- package/dist/bundled/bootstrap-extra-files/handler.js +5 -5
- package/dist/bundled/command-logger/handler.js +2 -2
- package/dist/bundled/session-memory/handler.js +35 -35
- package/dist/{channel-activity-DWAER4wd.js → channel-activity-Bx08UTAg.js} +2 -2
- package/dist/{commands-registry-BUyiA7nE.js → commands-registry-llLVCTH9.js} +2 -2
- package/dist/compact.runtime-BEn3giMt.js +39 -0
- package/dist/{deliver-aHOaRbkt.js → deliver-DJf2ZBpe.js} +19 -19
- package/dist/deliver-runtime-DkQ3XzGv.js +19 -0
- package/dist/deps-send-discord.runtime-BLpqSj6s.js +19 -0
- package/dist/deps-send-imessage.runtime-BFzyYqvR.js +18 -0
- package/dist/deps-send-signal.runtime-DT0TYCy1.js +17 -0
- package/dist/deps-send-slack.runtime-BhaGFfMX.js +17 -0
- package/dist/deps-send-telegram.runtime-B6Cic9NX.js +20 -0
- package/dist/deps-send-whatsapp.runtime-WtEhIq2S.js +43 -0
- package/dist/{diagnostic-BdcXX9iJ.js → diagnostic-BCCMF3O_.js} +2 -2
- package/dist/{env-lw2hsIUY.js → env-aYXLHjfZ.js} +1 -1
- package/dist/{fetch-D9NUULbj.js → fetch-DCTUdr1U.js} +5 -5
- package/dist/{fetch-C0iyt-Iz.js → fetch-bvgIiupu.js} +3 -3
- package/dist/{fetch-guard-B5ZMnGaN.js → fetch-guard-CqpEmMQ2.js} +2 -2
- package/dist/{frontmatter-C_obXuTp.js → frontmatter-DjZuS525.js} +3 -3
- package/dist/{github-copilot-token-8N63GdbE.js → github-copilot-token-CQmATy5E.js} +7 -7
- package/dist/{image-4x07m4Jl.js → image-Q8E1-lZn.js} +4 -4
- package/dist/image-runtime-B1LFYfQ2.js +12 -0
- package/dist/{ir-CsgNUpOU.js → ir-CzM3SxId.js} +6 -6
- package/dist/llm-slug-generator.js +35 -35
- package/dist/{logger-CbUVl62f.js → logger-ChbX1G7s.js} +7 -7
- package/dist/{login-p_O59TVQ.js → login-B0mtU11X.js} +4 -4
- package/dist/{login-qr-BCJpDsAy.js → login-qr-DY_i60f5.js} +10 -10
- package/dist/{manager-CwYv8O3T.js → manager-FAQPC0uO.js} +12 -12
- package/dist/manager-runtime-Da7ME9vS.js +15 -0
- package/dist/{model-selection-Cv2Puf5z.js → model-selection-wf3OY5DX.js} +122 -122
- package/dist/{outbound-Chpiwybe.js → outbound-Bw0dOVS7.js} +6 -6
- package/dist/{outbound-attachment-BnAVJDLe.js → outbound-attachment-1R6r9Pg_.js} +2 -2
- package/dist/{paths-CehYKFsO.js → paths-C0HLtPu0.js} +7 -7
- package/dist/{paths-DkxwiA8g.js → paths-hfkBoC7i.js} +5 -5
- package/dist/{pi-embedded-CJVNBk0y.js → pi-embedded-BAHaY-Oh.js} +150 -150
- package/dist/{pi-model-discovery-7IzK0Uc3.js → pi-model-discovery-ItS07aJB.js} +7 -7
- package/dist/pi-model-discovery-runtime-DjM7Z1fx.js +12 -0
- package/dist/{pi-tools.before-tool-call.runtime-BP2UvGJb.js → pi-tools.before-tool-call.runtime-D_mthvtC.js} +10 -10
- package/dist/plugin-sdk/signal.js +2 -2
- package/dist/{proxy-fetch-BOh1PLOW.js → proxy-fetch-c1ZUFFcO.js} +1 -1
- package/dist/{pw-ai-DwH5GpEO.js → pw-ai-Ok6KGelf.js} +9 -9
- package/dist/{qmd-manager-DEscZz5_.js → qmd-manager-DhfEz4Ar.js} +6 -6
- package/dist/{query-expansion-BErUY8P2.js → query-expansion-GqNV2iIE.js} +4 -4
- package/dist/runtime-whatsapp-login.runtime-D4BRhQkK.js +13 -0
- package/dist/runtime-whatsapp-outbound.runtime-DJPpS6g-.js +17 -0
- package/dist/{send-DUibfNQD.js → send-6R8b9zsj.js} +5 -5
- package/dist/{send-ORtn50qg.js → send-CEg4P96c.js} +5 -5
- package/dist/{send-C-Q_WPMf.js → send-CS0ocZHl.js} +3 -3
- package/dist/{send-DtBvCnPQ.js → send-DPflcjM5.js} +6 -6
- package/dist/{send-BDnOgWIp.js → send-DwAoiT2p.js} +25 -25
- package/dist/{session-B7imi6T5.js → session-BoIID5UR.js} +7 -7
- package/dist/{skill-commands-B9brPuiL.js → skill-commands-DhdiziMs.js} +9 -9
- package/dist/slash-commands.runtime-Cu1lTjV9.js +12 -0
- package/dist/slash-dispatch.runtime-DRVJEF4l.js +39 -0
- package/dist/slash-skill-commands.runtime-C373PJjv.js +13 -0
- package/dist/subagent-registry-runtime-D7hWBo1G.js +39 -0
- package/dist/{subsystem-DfXy5gUB.js → subsystem-C8z6w6xC.js} +14 -14
- package/dist/{tables-CjQqTOdD.js → tables-DQusRhkD.js} +1 -1
- package/dist/{target-errors-BZE1mc-W.js → target-errors-CfavnC9U.js} +1 -1
- package/dist/{tokens-6ul2IrzG.js → tokens-BWDIKewp.js} +1 -1
- package/dist/{web-Cd8yK1Zq.js → web-CrcrTQ2c.js} +39 -39
- package/dist/{whatsapp-actions-CYEzUMBI.js → whatsapp-actions-B0u0ZAme.js} +15 -15
- package/dist/{workspace-DGIcKCCW.js → workspace-CWDYHR27.js} +20 -20
- package/extensions/mfa-auth/index.ts +1028 -675
- package/extensions/mfa-auth/node_modules/.package-lock.json +21 -0
- package/extensions/mfa-auth/node_modules/ws/LICENSE +20 -0
- package/extensions/mfa-auth/node_modules/ws/README.md +548 -0
- package/extensions/mfa-auth/node_modules/ws/browser.js +8 -0
- package/extensions/mfa-auth/node_modules/ws/index.js +13 -0
- package/extensions/mfa-auth/node_modules/ws/lib/buffer-util.js +131 -0
- package/extensions/mfa-auth/node_modules/ws/lib/constants.js +19 -0
- package/extensions/mfa-auth/node_modules/ws/lib/event-target.js +292 -0
- package/extensions/mfa-auth/node_modules/ws/lib/extension.js +203 -0
- package/extensions/mfa-auth/node_modules/ws/lib/limiter.js +55 -0
- package/extensions/mfa-auth/node_modules/ws/lib/permessage-deflate.js +528 -0
- package/extensions/mfa-auth/node_modules/ws/lib/receiver.js +706 -0
- package/extensions/mfa-auth/node_modules/ws/lib/sender.js +602 -0
- package/extensions/mfa-auth/node_modules/ws/lib/stream.js +161 -0
- package/extensions/mfa-auth/node_modules/ws/lib/subprotocol.js +62 -0
- package/extensions/mfa-auth/node_modules/ws/lib/validation.js +152 -0
- package/extensions/mfa-auth/node_modules/ws/lib/websocket-server.js +554 -0
- package/extensions/mfa-auth/node_modules/ws/lib/websocket.js +1393 -0
- package/extensions/mfa-auth/node_modules/ws/package.json +69 -0
- package/extensions/mfa-auth/node_modules/ws/wrapper.mjs +8 -0
- package/extensions/mfa-auth/openclaw.plugin.json +1 -1
- package/extensions/mfa-auth/package-lock.json +23 -1
- package/extensions/mfa-auth/src/notification-service.ts +8 -2
- package/package.json +1 -1
- package/dist/compact.runtime-DpcZpcTl.js +0 -39
- package/dist/deliver-runtime-D4bCsr6d.js +0 -19
- package/dist/deps-send-discord.runtime-BziKU-pE.js +0 -19
- package/dist/deps-send-imessage.runtime-CFRnDTqp.js +0 -18
- package/dist/deps-send-signal.runtime-BuOtABJm.js +0 -17
- package/dist/deps-send-slack.runtime-BOLqvMxW.js +0 -17
- package/dist/deps-send-telegram.runtime-DeEoFLv5.js +0 -20
- package/dist/deps-send-whatsapp.runtime-CG1uXYLY.js +0 -43
- package/dist/image-runtime-smkMrIol.js +0 -12
- package/dist/manager-runtime-D_jEoBr9.js +0 -15
- package/dist/pi-model-discovery-runtime-DABef3qy.js +0 -12
- package/dist/runtime-whatsapp-login.runtime-BI3U306v.js +0 -13
- package/dist/runtime-whatsapp-outbound.runtime-Bsc2uD09.js +0 -17
- package/dist/slash-commands.runtime-Cf6ygfBp.js +0 -12
- package/dist/slash-dispatch.runtime-CsmvhO5K.js +0 -39
- package/dist/slash-skill-commands.runtime-CX7stIEP.js +0 -13
- package/dist/subagent-registry-runtime-B_S1nf7y.js +0 -39
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as resolveConfigPath } from "./paths-
|
|
1
|
+
import { r as resolveConfigPath } from "./paths-hfkBoC7i.js";
|
|
2
2
|
import os from "node:os";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import
|
|
4
|
+
import fs from "node:fs";
|
|
5
5
|
import chalk, { Chalk } from "chalk";
|
|
6
6
|
import { Logger } from "tslog";
|
|
7
7
|
import JSON5 from "json5";
|
|
@@ -49,15 +49,15 @@ function getCommandPathInternal(argv, depth, opts) {
|
|
|
49
49
|
//#endregion
|
|
50
50
|
//#region src/infra/tmp-openclaw-dir.ts
|
|
51
51
|
const POSIX_OPENCLAW_TMP_DIR = "/tmp/openclaw";
|
|
52
|
-
const TMP_DIR_ACCESS_MODE =
|
|
52
|
+
const TMP_DIR_ACCESS_MODE = fs.constants.W_OK | fs.constants.X_OK;
|
|
53
53
|
function isNodeErrorWithCode(err, code) {
|
|
54
54
|
return typeof err === "object" && err !== null && "code" in err && err.code === code;
|
|
55
55
|
}
|
|
56
56
|
function resolvePreferredOpenClawTmpDir(options = {}) {
|
|
57
|
-
const accessSync = options.accessSync ??
|
|
58
|
-
const chmodSync = options.chmodSync ??
|
|
59
|
-
const lstatSync = options.lstatSync ??
|
|
60
|
-
const mkdirSync = options.mkdirSync ??
|
|
57
|
+
const accessSync = options.accessSync ?? fs.accessSync;
|
|
58
|
+
const chmodSync = options.chmodSync ?? fs.chmodSync;
|
|
59
|
+
const lstatSync = options.lstatSync ?? fs.lstatSync;
|
|
60
|
+
const mkdirSync = options.mkdirSync ?? fs.mkdirSync;
|
|
61
61
|
const warn = options.warn ?? ((message) => console.warn(message));
|
|
62
62
|
const getuid = options.getuid ?? (() => {
|
|
63
63
|
try {
|
|
@@ -149,8 +149,8 @@ function resolvePreferredOpenClawTmpDir(options = {}) {
|
|
|
149
149
|
function readLoggingConfig() {
|
|
150
150
|
const configPath = resolveConfigPath();
|
|
151
151
|
try {
|
|
152
|
-
if (!
|
|
153
|
-
const raw =
|
|
152
|
+
if (!fs.existsSync(configPath)) return;
|
|
153
|
+
const raw = fs.readFileSync(configPath, "utf-8");
|
|
154
154
|
const logging = JSON5.parse(raw)?.logging;
|
|
155
155
|
if (!logging || typeof logging !== "object" || Array.isArray(logging)) return;
|
|
156
156
|
return logging;
|
|
@@ -332,7 +332,7 @@ function buildLogger(settings) {
|
|
|
332
332
|
for (const transport of externalTransports) attachExternalTransport(logger, transport);
|
|
333
333
|
return logger;
|
|
334
334
|
}
|
|
335
|
-
|
|
335
|
+
fs.mkdirSync(path.dirname(settings.file), { recursive: true });
|
|
336
336
|
if (isRollingPath(settings.file)) pruneOldRollingLogs(path.dirname(settings.file));
|
|
337
337
|
let currentFileBytes = getCurrentLogFileBytes(settings.file);
|
|
338
338
|
let warnedAboutSizeCap = false;
|
|
@@ -371,14 +371,14 @@ function resolveMaxLogFileBytes(raw) {
|
|
|
371
371
|
}
|
|
372
372
|
function getCurrentLogFileBytes(file) {
|
|
373
373
|
try {
|
|
374
|
-
return
|
|
374
|
+
return fs.statSync(file).size;
|
|
375
375
|
} catch {
|
|
376
376
|
return 0;
|
|
377
377
|
}
|
|
378
378
|
}
|
|
379
379
|
function appendLogLine(file, line) {
|
|
380
380
|
try {
|
|
381
|
-
|
|
381
|
+
fs.appendFileSync(file, line, { encoding: "utf8" });
|
|
382
382
|
return true;
|
|
383
383
|
} catch {
|
|
384
384
|
return false;
|
|
@@ -430,14 +430,14 @@ function isRollingPath(file) {
|
|
|
430
430
|
}
|
|
431
431
|
function pruneOldRollingLogs(dir) {
|
|
432
432
|
try {
|
|
433
|
-
const entries =
|
|
433
|
+
const entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
434
434
|
const cutoff = Date.now() - MAX_LOG_AGE_MS;
|
|
435
435
|
for (const entry of entries) {
|
|
436
436
|
if (!entry.isFile()) continue;
|
|
437
437
|
if (!entry.name.startsWith(`${LOG_PREFIX}-`) || !entry.name.endsWith(LOG_SUFFIX)) continue;
|
|
438
438
|
const fullPath = path.join(dir, entry.name);
|
|
439
439
|
try {
|
|
440
|
-
if (
|
|
440
|
+
if (fs.statSync(fullPath).mtimeMs < cutoff) fs.rmSync(fullPath, { force: true });
|
|
441
441
|
} catch {}
|
|
442
442
|
}
|
|
443
443
|
} catch {}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ji as detectMime, lt as sanitizeToolResultImages } from "./model-selection-
|
|
1
|
+
import { ji as detectMime, lt as sanitizeToolResultImages } from "./model-selection-wf3OY5DX.js";
|
|
2
2
|
import fs from "node:fs/promises";
|
|
3
3
|
//#region src/agents/tools/common.ts
|
|
4
4
|
var ToolInputError = class extends Error {
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { s as resolveStorePath } from "./paths-
|
|
2
|
-
import "./paths-
|
|
3
|
-
import { a as defaultRuntime, b as getChildLogger, d as logVerbose, m as shouldLogVerbose, t as createSubsystemLogger } from "./subsystem-
|
|
4
|
-
import { I as buildGroupHistoryKey, N as DEFAULT_MAIN_KEY, P as buildAgentMainSessionKey, z as normalizeAgentId } from "./workspace-
|
|
5
|
-
import { C as sleep, T as toWhatsappJid, h as normalizeE164, m as jidToE164, o as clamp, p as isSelfChatMode, v as resolveJidToE164 } from "./logger-
|
|
6
|
-
import { $t as recordSessionMetaFromInbound, Ai as saveMediaBuffer, Fr as resolveChannelGroupPolicy, Ir as resolveChannelGroupRequireMention, Vr as resolveGroupSessionKey, Zt as loadSessionStore, ao as loadConfig, br as readWebSelfId, dr as resolveWhatsAppAccount, fr as resolveWhatsAppMediaMaxBytes, hr as logWebSelfId, mr as getWebAuthAgeMs, nc as formatCliCommand, pr as WA_WEB_AUTH_DIR, tn as updateLastRoute, vr as pickWebChannel, wr as webAuthExists } from "./model-selection-
|
|
7
|
-
import "./github-copilot-token-
|
|
1
|
+
import { s as resolveStorePath } from "./paths-C0HLtPu0.js";
|
|
2
|
+
import "./paths-hfkBoC7i.js";
|
|
3
|
+
import { a as defaultRuntime, b as getChildLogger, d as logVerbose, m as shouldLogVerbose, t as createSubsystemLogger } from "./subsystem-C8z6w6xC.js";
|
|
4
|
+
import { I as buildGroupHistoryKey, N as DEFAULT_MAIN_KEY, P as buildAgentMainSessionKey, z as normalizeAgentId } from "./workspace-CWDYHR27.js";
|
|
5
|
+
import { C as sleep, T as toWhatsappJid, h as normalizeE164, m as jidToE164, o as clamp, p as isSelfChatMode, v as resolveJidToE164 } from "./logger-ChbX1G7s.js";
|
|
6
|
+
import { $t as recordSessionMetaFromInbound, Ai as saveMediaBuffer, Fr as resolveChannelGroupPolicy, Ir as resolveChannelGroupRequireMention, Vr as resolveGroupSessionKey, Zt as loadSessionStore, ao as loadConfig, br as readWebSelfId, dr as resolveWhatsAppAccount, fr as resolveWhatsAppMediaMaxBytes, hr as logWebSelfId, mr as getWebAuthAgeMs, nc as formatCliCommand, pr as WA_WEB_AUTH_DIR, tn as updateLastRoute, vr as pickWebChannel, wr as webAuthExists } from "./model-selection-wf3OY5DX.js";
|
|
7
|
+
import "./github-copilot-token-CQmATy5E.js";
|
|
8
8
|
import "./boolean-C7Ct_klp.js";
|
|
9
|
-
import "./env-
|
|
10
|
-
import "./frontmatter-
|
|
11
|
-
import "./send-
|
|
12
|
-
import { At as resolveOpenProviderRuntimeGroupPolicy, jt as warnMissingProviderGroupPolicyFallbackOnce, kt as resolveDefaultGroupPolicy } from "./send-
|
|
13
|
-
import { A as enqueueSystemEvent, C as formatInboundEnvelope, D as computeBackoff, E as parseActivationCommand, F as finalizeInboundContext, I as hasControlCommand, J as createDedupeCache, L as shouldComputeCommandAuthorized, M as deriveLastRoutePolicy, N as resolveAgentRoute, O as sleepWithAbort, P as resolveInboundLastRouteSessionKey, R as buildMentionRegexes, S as resolveInboundDebounceMs, T as normalizeGroupActivation, X as resolveMessagePrefix, Y as resolveIdentityNamePrefix, _ as resolvePinnedMainDmOwnerFromAllowlist, a as resolveInboundSessionEnvelopeContext, c as createConnectedChannelStatusPatch, d as createReplyPrefixOptions, f as buildHistoryContextFromEntries, g as resolveDmGroupAccessWithLists, h as resolveDmGroupAccessWithCommandGate, j as buildAgentSessionKey, k as formatDurationPrecise, l as issuePairingChallenge, m as readStoreAllowFromForDmPolicy, p as recordPendingHistoryEntryIfEnabled, u as resolveMentionGating, v as shouldAckReactionForWhatsApp, w as getReplyFromConfig, x as createInboundDebouncer, y as dispatchReplyWithBufferedBlockDispatcher, z as normalizeMentionText } from "./pi-embedded-
|
|
14
|
-
import "./tokens-
|
|
15
|
-
import "./deliver-
|
|
16
|
-
import "./diagnostic-
|
|
17
|
-
import { $ as toLocationContext, Q as formatLocationText, rt as upsertChannelPairingRequest } from "./send-
|
|
18
|
-
import "./pi-model-discovery-
|
|
19
|
-
import "./image-
|
|
20
|
-
import { _ as registerUnhandledRejectionHandler } from "./audio-transcription-runner-
|
|
21
|
-
import { i as getAgentScopedMediaLocalRoots } from "./fetch-
|
|
22
|
-
import "./fetch-guard-
|
|
23
|
-
import "./api-key-rotation-
|
|
24
|
-
import "./proxy-fetch-
|
|
25
|
-
import { a as loadWebMedia, d as chunkMarkdownTextWithMode, h as resolveTextChunkLimit, m as resolveChunkMode, s as resolveMarkdownTableMode } from "./ir-
|
|
9
|
+
import "./env-aYXLHjfZ.js";
|
|
10
|
+
import "./frontmatter-DjZuS525.js";
|
|
11
|
+
import "./send-CEg4P96c.js";
|
|
12
|
+
import { At as resolveOpenProviderRuntimeGroupPolicy, jt as warnMissingProviderGroupPolicyFallbackOnce, kt as resolveDefaultGroupPolicy } from "./send-DPflcjM5.js";
|
|
13
|
+
import { A as enqueueSystemEvent, C as formatInboundEnvelope, D as computeBackoff, E as parseActivationCommand, F as finalizeInboundContext, I as hasControlCommand, J as createDedupeCache, L as shouldComputeCommandAuthorized, M as deriveLastRoutePolicy, N as resolveAgentRoute, O as sleepWithAbort, P as resolveInboundLastRouteSessionKey, R as buildMentionRegexes, S as resolveInboundDebounceMs, T as normalizeGroupActivation, X as resolveMessagePrefix, Y as resolveIdentityNamePrefix, _ as resolvePinnedMainDmOwnerFromAllowlist, a as resolveInboundSessionEnvelopeContext, c as createConnectedChannelStatusPatch, d as createReplyPrefixOptions, f as buildHistoryContextFromEntries, g as resolveDmGroupAccessWithLists, h as resolveDmGroupAccessWithCommandGate, j as buildAgentSessionKey, k as formatDurationPrecise, l as issuePairingChallenge, m as readStoreAllowFromForDmPolicy, p as recordPendingHistoryEntryIfEnabled, u as resolveMentionGating, v as shouldAckReactionForWhatsApp, w as getReplyFromConfig, x as createInboundDebouncer, y as dispatchReplyWithBufferedBlockDispatcher, z as normalizeMentionText } from "./pi-embedded-BAHaY-Oh.js";
|
|
14
|
+
import "./tokens-BWDIKewp.js";
|
|
15
|
+
import "./deliver-DJf2ZBpe.js";
|
|
16
|
+
import "./diagnostic-BCCMF3O_.js";
|
|
17
|
+
import { $ as toLocationContext, Q as formatLocationText, rt as upsertChannelPairingRequest } from "./send-DwAoiT2p.js";
|
|
18
|
+
import "./pi-model-discovery-ItS07aJB.js";
|
|
19
|
+
import "./image-Q8E1-lZn.js";
|
|
20
|
+
import { _ as registerUnhandledRejectionHandler } from "./audio-transcription-runner-Q5zG_hYd.js";
|
|
21
|
+
import { i as getAgentScopedMediaLocalRoots } from "./fetch-DCTUdr1U.js";
|
|
22
|
+
import "./fetch-guard-CqpEmMQ2.js";
|
|
23
|
+
import "./api-key-rotation-DLU4jvSu.js";
|
|
24
|
+
import "./proxy-fetch-c1ZUFFcO.js";
|
|
25
|
+
import { a as loadWebMedia, d as chunkMarkdownTextWithMode, h as resolveTextChunkLimit, m as resolveChunkMode, s as resolveMarkdownTableMode } from "./ir-CzM3SxId.js";
|
|
26
26
|
import "./render-IRnn-2gt.js";
|
|
27
|
-
import "./target-errors-
|
|
28
|
-
import "./commands-registry-
|
|
29
|
-
import "./skill-commands-
|
|
27
|
+
import "./target-errors-CfavnC9U.js";
|
|
28
|
+
import "./commands-registry-llLVCTH9.js";
|
|
29
|
+
import "./skill-commands-DhdiziMs.js";
|
|
30
30
|
import "./fetch-CeWULXBI.js";
|
|
31
|
-
import { n as recordChannelActivity } from "./channel-activity-
|
|
32
|
-
import { t as convertMarkdownTables } from "./tables-
|
|
33
|
-
import "./send-
|
|
34
|
-
import "./outbound-attachment-
|
|
35
|
-
import "./send-
|
|
36
|
-
import "./fetch-
|
|
37
|
-
import { r as setActiveWebListener } from "./active-listener-
|
|
38
|
-
import "./manager-
|
|
39
|
-
import "./query-expansion-
|
|
40
|
-
import { i as markdownToWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./outbound-
|
|
41
|
-
import { i as waitForWaConnection, n as formatError, r as getStatusCode, t as createWaSocket } from "./session-
|
|
42
|
-
import { t as loginWeb } from "./login-
|
|
31
|
+
import { n as recordChannelActivity } from "./channel-activity-Bx08UTAg.js";
|
|
32
|
+
import { t as convertMarkdownTables } from "./tables-DQusRhkD.js";
|
|
33
|
+
import "./send-CS0ocZHl.js";
|
|
34
|
+
import "./outbound-attachment-1R6r9Pg_.js";
|
|
35
|
+
import "./send-6R8b9zsj.js";
|
|
36
|
+
import "./fetch-bvgIiupu.js";
|
|
37
|
+
import { r as setActiveWebListener } from "./active-listener-DYmI7imH.js";
|
|
38
|
+
import "./manager-FAQPC0uO.js";
|
|
39
|
+
import "./query-expansion-GqNV2iIE.js";
|
|
40
|
+
import { i as markdownToWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./outbound-Bw0dOVS7.js";
|
|
41
|
+
import { i as waitForWaConnection, n as formatError, r as getStatusCode, t as createWaSocket } from "./session-BoIID5UR.js";
|
|
42
|
+
import { t as loginWeb } from "./login-B0mtU11X.js";
|
|
43
43
|
import { randomUUID } from "node:crypto";
|
|
44
44
|
import { DisconnectReason, downloadMediaMessage, extractMessageContent, getContentType, isJidGroup, normalizeMessageContent } from "@whiskeysockets/baileys";
|
|
45
45
|
const DEFAULT_RECONNECT_POLICY = {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import "./paths-
|
|
2
|
-
import "./paths-
|
|
3
|
-
import "./subsystem-
|
|
4
|
-
import "./workspace-
|
|
5
|
-
import "./logger-
|
|
6
|
-
import { Dr as normalizeWhatsAppTarget, Er as isWhatsAppGroupJid, dr as resolveWhatsAppAccount } from "./model-selection-
|
|
7
|
-
import "./github-copilot-token-
|
|
1
|
+
import "./paths-C0HLtPu0.js";
|
|
2
|
+
import "./paths-hfkBoC7i.js";
|
|
3
|
+
import "./subsystem-C8z6w6xC.js";
|
|
4
|
+
import "./workspace-CWDYHR27.js";
|
|
5
|
+
import "./logger-ChbX1G7s.js";
|
|
6
|
+
import { Dr as normalizeWhatsAppTarget, Er as isWhatsAppGroupJid, dr as resolveWhatsAppAccount } from "./model-selection-wf3OY5DX.js";
|
|
7
|
+
import "./github-copilot-token-CQmATy5E.js";
|
|
8
8
|
import "./boolean-C7Ct_klp.js";
|
|
9
|
-
import "./env-
|
|
10
|
-
import "./frontmatter-
|
|
11
|
-
import "./fetch-
|
|
12
|
-
import "./fetch-guard-
|
|
13
|
-
import "./ir-
|
|
9
|
+
import "./env-aYXLHjfZ.js";
|
|
10
|
+
import "./frontmatter-DjZuS525.js";
|
|
11
|
+
import "./fetch-DCTUdr1U.js";
|
|
12
|
+
import "./fetch-guard-CqpEmMQ2.js";
|
|
13
|
+
import "./ir-CzM3SxId.js";
|
|
14
14
|
import "./render-IRnn-2gt.js";
|
|
15
|
-
import { f as readReactionParams, h as readStringParam, i as ToolAuthorizationError, l as jsonResult, n as missingTargetError, o as createActionGate } from "./target-errors-
|
|
16
|
-
import "./tables-
|
|
17
|
-
import { r as sendReactionWhatsApp } from "./outbound-
|
|
15
|
+
import { f as readReactionParams, h as readStringParam, i as ToolAuthorizationError, l as jsonResult, n as missingTargetError, o as createActionGate } from "./target-errors-CfavnC9U.js";
|
|
16
|
+
import "./tables-DQusRhkD.js";
|
|
17
|
+
import { r as sendReactionWhatsApp } from "./outbound-Bw0dOVS7.js";
|
|
18
18
|
//#region src/whatsapp/resolve-outbound-target.ts
|
|
19
19
|
function resolveWhatsAppOutboundTarget(params) {
|
|
20
20
|
const trimmed = params.to?.trim() ?? "";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { d as resolveRequiredHomeDir } from "./paths-
|
|
2
|
-
import { l as danger, m as shouldLogVerbose } from "./subsystem-
|
|
3
|
-
import { g as pathExists$1, n as logError, t as logDebug, y as resolveUserPath } from "./logger-
|
|
1
|
+
import { d as resolveRequiredHomeDir } from "./paths-hfkBoC7i.js";
|
|
2
|
+
import { l as danger, m as shouldLogVerbose } from "./subsystem-C8z6w6xC.js";
|
|
3
|
+
import { g as pathExists$1, n as logError, t as logDebug, y as resolveUserPath } from "./logger-ChbX1G7s.js";
|
|
4
4
|
import fs from "node:fs/promises";
|
|
5
5
|
import os from "node:os";
|
|
6
6
|
import path from "node:path";
|
|
7
|
-
import
|
|
7
|
+
import fs$1 from "node:fs";
|
|
8
8
|
import { promisify } from "node:util";
|
|
9
9
|
import { execFile, spawn } from "node:child_process";
|
|
10
10
|
import process$1 from "node:process";
|
|
@@ -566,7 +566,7 @@ function resolveBoundaryPathLexicalSync(params) {
|
|
|
566
566
|
rootCanonicalPath: params.rootCanonicalPath,
|
|
567
567
|
resolveParams: params.params,
|
|
568
568
|
absolutePath: params.absolutePath,
|
|
569
|
-
read: (cursor) =>
|
|
569
|
+
read: (cursor) => fs$1.lstatSync(cursor)
|
|
570
570
|
});
|
|
571
571
|
if (isPromiseLike(maybeStat)) throw new Error("Unexpected async lexical stat");
|
|
572
572
|
const stat = maybeStat;
|
|
@@ -716,15 +716,15 @@ function resolvePathViaExistingAncestorSync(targetPath) {
|
|
|
716
716
|
const normalized = path.resolve(targetPath);
|
|
717
717
|
let cursor = normalized;
|
|
718
718
|
const missingSuffix = [];
|
|
719
|
-
while (!isFilesystemRoot(cursor) && !
|
|
719
|
+
while (!isFilesystemRoot(cursor) && !fs$1.existsSync(cursor)) {
|
|
720
720
|
missingSuffix.unshift(path.basename(cursor));
|
|
721
721
|
const parent = path.dirname(cursor);
|
|
722
722
|
if (parent === cursor) break;
|
|
723
723
|
cursor = parent;
|
|
724
724
|
}
|
|
725
|
-
if (!
|
|
725
|
+
if (!fs$1.existsSync(cursor)) return normalized;
|
|
726
726
|
try {
|
|
727
|
-
const resolvedAncestor = path.resolve(
|
|
727
|
+
const resolvedAncestor = path.resolve(fs$1.realpathSync(cursor));
|
|
728
728
|
if (missingSuffix.length === 0) return resolvedAncestor;
|
|
729
729
|
return path.resolve(resolvedAncestor, ...missingSuffix);
|
|
730
730
|
} catch {
|
|
@@ -749,7 +749,7 @@ function getPathKindSync(absolutePath, preserveFinalSymlink) {
|
|
|
749
749
|
try {
|
|
750
750
|
return {
|
|
751
751
|
exists: true,
|
|
752
|
-
kind: toResolvedKind(preserveFinalSymlink ?
|
|
752
|
+
kind: toResolvedKind(preserveFinalSymlink ? fs$1.lstatSync(absolutePath) : fs$1.statSync(absolutePath))
|
|
753
753
|
};
|
|
754
754
|
} catch (error) {
|
|
755
755
|
if (isNotFoundPathError(error)) return {
|
|
@@ -809,10 +809,10 @@ async function resolveSymlinkHopPath(symlinkPath) {
|
|
|
809
809
|
}
|
|
810
810
|
function resolveSymlinkHopPathSync(symlinkPath) {
|
|
811
811
|
try {
|
|
812
|
-
return path.resolve(
|
|
812
|
+
return path.resolve(fs$1.realpathSync(symlinkPath));
|
|
813
813
|
} catch (error) {
|
|
814
814
|
if (!isNotFoundPathError(error)) throw error;
|
|
815
|
-
const linkTarget =
|
|
815
|
+
const linkTarget = fs$1.readlinkSync(symlinkPath);
|
|
816
816
|
return resolvePathViaExistingAncestorSync(path.resolve(path.dirname(symlinkPath), linkTarget));
|
|
817
817
|
}
|
|
818
818
|
}
|
|
@@ -836,7 +836,7 @@ function sameFileIdentity(left, right) {
|
|
|
836
836
|
return sameFileIdentity$1(left, right);
|
|
837
837
|
}
|
|
838
838
|
function openVerifiedFileSync(params) {
|
|
839
|
-
const ioFs = params.ioFs ??
|
|
839
|
+
const ioFs = params.ioFs ?? fs$1;
|
|
840
840
|
const allowedType = params.allowedType ?? "file";
|
|
841
841
|
const openReadFlags = ioFs.constants.O_RDONLY | (typeof ioFs.constants.O_NOFOLLOW === "number" ? ioFs.constants.O_NOFOLLOW : 0);
|
|
842
842
|
let fd = null;
|
|
@@ -912,7 +912,7 @@ function canUseBoundaryFileOpen(ioFs) {
|
|
|
912
912
|
return typeof ioFs.openSync === "function" && typeof ioFs.closeSync === "function" && typeof ioFs.fstatSync === "function" && typeof ioFs.lstatSync === "function" && typeof ioFs.realpathSync === "function" && typeof ioFs.readFileSync === "function" && typeof ioFs.constants === "object" && ioFs.constants !== null;
|
|
913
913
|
}
|
|
914
914
|
function openBoundaryFileSync(params) {
|
|
915
|
-
const ioFs = params.ioFs ??
|
|
915
|
+
const ioFs = params.ioFs ?? fs$1;
|
|
916
916
|
const resolved = resolveBoundaryFilePathGeneric({
|
|
917
917
|
absolutePath: params.absolutePath,
|
|
918
918
|
resolve: (absolutePath) => resolveBoundaryPathSync({
|
|
@@ -963,7 +963,7 @@ function finalizeBoundaryFileOpen(params) {
|
|
|
963
963
|
});
|
|
964
964
|
}
|
|
965
965
|
async function openBoundaryFile(params) {
|
|
966
|
-
const ioFs = params.ioFs ??
|
|
966
|
+
const ioFs = params.ioFs ?? fs$1;
|
|
967
967
|
const maybeResolved = resolveBoundaryFilePathGeneric({
|
|
968
968
|
absolutePath: params.absolutePath,
|
|
969
969
|
resolve: (absolutePath) => resolveBoundaryPath({
|
|
@@ -1119,7 +1119,7 @@ function resolveNpmArgvForWindows(argv) {
|
|
|
1119
1119
|
if (!cliName) return null;
|
|
1120
1120
|
const nodeDir = path.dirname(process$1.execPath);
|
|
1121
1121
|
const cliPath = path.join(nodeDir, "node_modules", "npm", "bin", cliName);
|
|
1122
|
-
if (!
|
|
1122
|
+
if (!fs$1.existsSync(cliPath)) {
|
|
1123
1123
|
const command = argv[0] ?? "";
|
|
1124
1124
|
return [path.extname(command).toLowerCase() ? command : `${command}.cmd`, ...argv.slice(1)];
|
|
1125
1125
|
}
|
|
@@ -1323,7 +1323,7 @@ async function readPackageName(dir) {
|
|
|
1323
1323
|
}
|
|
1324
1324
|
function readPackageNameSync(dir) {
|
|
1325
1325
|
try {
|
|
1326
|
-
const raw =
|
|
1326
|
+
const raw = fs$1.readFileSync(path.join(dir, "package.json"), "utf-8");
|
|
1327
1327
|
const parsed = JSON.parse(raw);
|
|
1328
1328
|
return typeof parsed.name === "string" ? parsed.name : null;
|
|
1329
1329
|
} catch {
|
|
@@ -1357,7 +1357,7 @@ function candidateDirsFromArgv1(argv1) {
|
|
|
1357
1357
|
const normalized = path.resolve(argv1);
|
|
1358
1358
|
const candidates = [path.dirname(normalized)];
|
|
1359
1359
|
try {
|
|
1360
|
-
const resolved =
|
|
1360
|
+
const resolved = fs$1.realpathSync(normalized);
|
|
1361
1361
|
if (resolved !== normalized) candidates.push(path.dirname(resolved));
|
|
1362
1362
|
} catch {}
|
|
1363
1363
|
const parts = normalized.split(path.sep);
|
|
@@ -1469,14 +1469,14 @@ async function readWorkspaceFileWithGuards(params) {
|
|
|
1469
1469
|
const identity = workspaceFileIdentity(opened.stat, opened.path);
|
|
1470
1470
|
const cached = workspaceFileCache.get(params.filePath);
|
|
1471
1471
|
if (cached && cached.identity === identity) {
|
|
1472
|
-
|
|
1472
|
+
fs$1.closeSync(opened.fd);
|
|
1473
1473
|
return {
|
|
1474
1474
|
ok: true,
|
|
1475
1475
|
content: cached.content
|
|
1476
1476
|
};
|
|
1477
1477
|
}
|
|
1478
1478
|
try {
|
|
1479
|
-
const content =
|
|
1479
|
+
const content = fs$1.readFileSync(opened.fd, "utf-8");
|
|
1480
1480
|
workspaceFileCache.set(params.filePath, {
|
|
1481
1481
|
content,
|
|
1482
1482
|
identity
|
|
@@ -1493,7 +1493,7 @@ async function readWorkspaceFileWithGuards(params) {
|
|
|
1493
1493
|
error
|
|
1494
1494
|
};
|
|
1495
1495
|
} finally {
|
|
1496
|
-
|
|
1496
|
+
fs$1.closeSync(opened.fd);
|
|
1497
1497
|
}
|
|
1498
1498
|
}
|
|
1499
1499
|
function stripFrontMatter(content) {
|