openclaw-multi-auto 1.8.0 → 1.8.1
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/{agent-BomWJjOy.js → agent-ef71Xoo3.js} +10 -10
- package/dist/{audio-preflight-GAYJDgGF.js → audio-preflight-BK4MI6Gs.js} +1 -1
- package/dist/{audio-preflight-CZHCr2-5.js → audio-preflight-BQoP-O-0.js} +9 -9
- package/dist/{audit-membership-runtime-fBOVjLNx.js → audit-membership-runtime-0b4ZhE41.js} +4 -4
- package/dist/auth-profiles.runtime-CuInvQ6F.js +11 -0
- package/dist/{auth-profiles.runtime-IXde-3_L.js → auth-profiles.runtime-DEhTAVAo.js} +1 -1
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +10 -10
- 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 +9 -9
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/compact.runtime-BOg89Gro.js +11 -0
- package/dist/{compact.runtime-BCHQpekB.js → compact.runtime-CH24Vvny.js} +1 -1
- package/dist/{deliver-runtime-Bm3VqH55.js → deliver-runtime-6WeFOxSI.js} +1 -1
- package/dist/deliver-runtime-CUrIlSzN.js +11 -0
- package/dist/extensionAPI.js +1 -1
- package/dist/{fetch-BdTTF2z-.js → fetch-sH_NN8SV.js} +2 -2
- package/dist/{frontmatter-DZlWsaUx.js → frontmatter-DhmdUnBP.js} +3 -3
- package/dist/{github-copilot-token-BeFx3MLn.js → github-copilot-token-368sRGBD.js} +7 -7
- package/dist/{image-runtime-CReMeTZL.js → image-runtime-BwzYRCA5.js} +1 -1
- package/dist/image-runtime-Dur8cmII.js +11 -0
- package/dist/llm-slug-generator.js +9 -9
- package/dist/{logger-DCBlX1uz.js → logger-C0l_Gj8Y.js} +7 -7
- package/dist/{login-xsvrgJJt.js → login-BEOnxdap.js} +2 -2
- package/dist/{login-CKmmxErc.js → login-CvFRLU0k.js} +4 -4
- package/dist/{login-qr-KVA4wuh0.js → login-qr-D-_3HfJq.js} +10 -10
- package/dist/{login-qr-D2jYdV8v.js → login-qr-FW_sLvPl.js} +2 -2
- package/dist/manager-runtime-CfBjUnwB.js +11 -0
- package/dist/{manager-runtime-BBxiBzvv.js → manager-runtime-DV0_pZDZ.js} +1 -1
- package/dist/{manager.runtime-CF3GyuMb.js → manager.runtime-CynsHdcO.js} +7 -7
- package/dist/{manager.runtime-BV-CBNb2.js → manager.runtime-DF-LRAbL.js} +10 -10
- package/dist/{model-selection-CNRMBWfR.js → model-selection-C9tlIhgN.js} +271 -271
- package/dist/{model-selection-BQm6_iuT.js → model-selection-qaBek98Q.js} +43 -43
- package/dist/{paths-CNIc83Pn.js → paths-BwJ6yG6k.js} +5 -5
- package/dist/pi-model-discovery-runtime-CK36RhYz.js +11 -0
- package/dist/{pi-model-discovery-runtime-DeRljgTs.js → pi-model-discovery-runtime-Q0BoklY3.js} +1 -1
- package/dist/{pi-tools.before-tool-call.runtime-PhxG0y1R.js → pi-tools.before-tool-call.runtime-B_uML_Gt.js} +1 -1
- package/dist/{pi-tools.before-tool-call.runtime-DgAiY2la.js → pi-tools.before-tool-call.runtime-CLRTNt4A.js} +9 -9
- package/dist/{pw-ai-3ual6adI.js → pw-ai-CRL5SGWK.js} +9 -9
- package/dist/{pw-ai-CzFFsGR7.js → pw-ai-DzdseGw2.js} +1 -1
- package/dist/{qmd-manager-DvglNhlJ.js → qmd-manager-CFVuAj9l.js} +5 -5
- package/dist/{query-expansion-DXwSmE_K.js → query-expansion-DnS6CGY2.js} +8 -8
- package/dist/runtime-whatsapp-login.runtime-CO-iUlqS.js +13 -0
- package/dist/{runtime-whatsapp-login.runtime-vKFKNi8Z.js → runtime-whatsapp-login.runtime-Dsz-DNfa.js} +3 -3
- package/dist/{runtime-whatsapp-outbound.runtime-SAT-C6UE.js → runtime-whatsapp-outbound.runtime-BeZMBTt6.js} +2 -2
- package/dist/runtime-whatsapp-outbound.runtime-IeVUgrJu.js +12 -0
- package/dist/{send-CXnKWzde.js → send-CsgNtXyY.js} +3 -3
- package/dist/{send-DGQUY-kp.js → send-DxYxezcL.js} +1 -1
- package/dist/{session-CbQ43pUq.js → session--tqRfZQU.js} +1 -1
- package/dist/{session-kt-bqE_z.js → session-BhX4LYCK.js} +7 -7
- package/dist/slash-commands.runtime-BTNXGYOP.js +11 -0
- package/dist/{slash-commands.runtime-DoT9bJKb.js → slash-commands.runtime-C8j-n-bX.js} +1 -1
- package/dist/{slash-dispatch.runtime--9HmQuIE.js → slash-dispatch.runtime-BA-MMy0P.js} +1 -1
- package/dist/{slash-dispatch.runtime-Cu8ghe1h.js → slash-dispatch.runtime-cYx62DOd.js} +9 -9
- package/dist/{slash-skill-commands.runtime-BZqnnkHJ.js → slash-skill-commands.runtime-Cm8K1kWM.js} +1 -1
- package/dist/slash-skill-commands.runtime-ThOxhaze.js +11 -0
- package/dist/{subagent-registry-runtime-9WfVik2h.js → subagent-registry-runtime-DKOXxZgH.js} +1 -1
- package/dist/{subagent-registry-runtime-Z0fdsGSq.js → subagent-registry-runtime-DkamrsVw.js} +9 -9
- package/dist/{subsystem-Cr1MiLhx.js → subsystem-CDcEQtQK.js} +14 -14
- package/dist/{web-B_EVHbEP.js → web-RzQ9jrtt.js} +4 -4
- package/dist/{web-CXyjF_si.js → web-bHB4SzXZ.js} +12 -12
- package/dist/{whatsapp-actions-pQqLTCXJ.js → whatsapp-actions-BmDvJijd.js} +2 -2
- package/dist/{whatsapp-actions-BUvGEDSk.js → whatsapp-actions-BqFiZbuw.js} +10 -10
- package/dist/{workspace-Bi8vpJN0.js → workspace-Cg3kGb1y.js} +20 -20
- package/package.json +1 -1
- package/scripts/create-instance.sh +19 -3
- package/dist/auth-profiles.runtime-DNqCx0L5.js +0 -11
- package/dist/compact.runtime-pgjSlzSY.js +0 -11
- package/dist/deliver-runtime-D4aWAXZ9.js +0 -11
- package/dist/image-runtime-Brryt_BU.js +0 -11
- package/dist/manager-runtime-D9AEoM1M.js +0 -11
- package/dist/pi-model-discovery-runtime-CDKkuBYh.js +0 -11
- package/dist/runtime-whatsapp-login.runtime-Br3SxDXL.js +0 -13
- package/dist/runtime-whatsapp-outbound.runtime-L3Qkst0n.js +0 -12
- package/dist/slash-commands.runtime-BYfxn_xu.js +0 -11
- package/dist/slash-skill-commands.runtime-8dS5PTaH.js +0 -11
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { S as toPinoLikeLogger, b as getChildLogger, h as success, l as danger } from "./subsystem-
|
|
2
|
-
import { l as ensureDir, y as resolveUserPath } from "./logger-
|
|
3
|
-
import { Ar as resolveWebCredsBackupPath, Ci as formatCliCommand, Dr as readCredsJsonRaw, Tr as maybeRestoreCredsFromBackup, jr as resolveWebCredsPath, kr as resolveDefaultWebAuthDir, xi as VERSION } from "./model-selection-
|
|
4
|
-
import
|
|
1
|
+
import { S as toPinoLikeLogger, b as getChildLogger, h as success, l as danger } from "./subsystem-CDcEQtQK.js";
|
|
2
|
+
import { l as ensureDir, y as resolveUserPath } from "./logger-C0l_Gj8Y.js";
|
|
3
|
+
import { Ar as resolveWebCredsBackupPath, Ci as formatCliCommand, Dr as readCredsJsonRaw, Tr as maybeRestoreCredsFromBackup, jr as resolveWebCredsPath, kr as resolveDefaultWebAuthDir, xi as VERSION } from "./model-selection-C9tlIhgN.js";
|
|
4
|
+
import fs from "node:fs";
|
|
5
5
|
import "node:crypto";
|
|
6
6
|
import { DisconnectReason, fetchLatestBaileysVersion, makeCacheableSignalKeyStore, makeWASocket, useMultiFileAuthState } from "@whiskeysockets/baileys";
|
|
7
7
|
import qrcode from "qrcode-terminal";
|
|
@@ -19,16 +19,16 @@ async function safeSaveCreds(authDir, saveCreds, logger) {
|
|
|
19
19
|
const raw = readCredsJsonRaw(credsPath);
|
|
20
20
|
if (raw) try {
|
|
21
21
|
JSON.parse(raw);
|
|
22
|
-
|
|
22
|
+
fs.copyFileSync(credsPath, backupPath);
|
|
23
23
|
try {
|
|
24
|
-
|
|
24
|
+
fs.chmodSync(backupPath, 384);
|
|
25
25
|
} catch {}
|
|
26
26
|
} catch {}
|
|
27
27
|
} catch {}
|
|
28
28
|
try {
|
|
29
29
|
await Promise.resolve(saveCreds());
|
|
30
30
|
try {
|
|
31
|
-
|
|
31
|
+
fs.chmodSync(resolveWebCredsPath(authDir), 384);
|
|
32
32
|
} catch {}
|
|
33
33
|
} catch (err) {
|
|
34
34
|
logger.warn({ error: String(err) }, "failed saving WhatsApp creds");
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "./query-expansion-DnS6CGY2.js";
|
|
2
|
+
import "./paths-BwJ6yG6k.js";
|
|
3
|
+
import "./subsystem-CDcEQtQK.js";
|
|
4
|
+
import "./workspace-Cg3kGb1y.js";
|
|
5
|
+
import "./logger-C0l_Gj8Y.js";
|
|
6
|
+
import { an as listNativeCommandSpecsForConfig, in as findCommandByNativeName, on as parseCommandArgs, rn as buildCommandTextFromArgs, sn as resolveCommandArgMenu } from "./model-selection-C9tlIhgN.js";
|
|
7
|
+
import "./github-copilot-token-368sRGBD.js";
|
|
8
|
+
import "./boolean-C7Ct_klp.js";
|
|
9
|
+
import "./fetch-sH_NN8SV.js";
|
|
10
|
+
import "./frontmatter-DhmdUnBP.js";
|
|
11
|
+
export { buildCommandTextFromArgs, findCommandByNativeName, listNativeCommandSpecsForConfig, parseCommandArgs, resolveCommandArgMenu };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./query-expansion-C6UNkw7W.js";
|
|
2
2
|
import "./paths-CzCvxHkV.js";
|
|
3
3
|
import "./logger-Cmh2bFJD.js";
|
|
4
|
-
import { en as buildCommandTextFromArgs, in as resolveCommandArgMenu, nn as listNativeCommandSpecsForConfig, rn as parseCommandArgs, tn as findCommandByNativeName } from "./model-selection-
|
|
4
|
+
import { en as buildCommandTextFromArgs, in as resolveCommandArgMenu, nn as listNativeCommandSpecsForConfig, rn as parseCommandArgs, tn as findCommandByNativeName } from "./model-selection-qaBek98Q.js";
|
|
5
5
|
import "./github-copilot-token-xzmo0MIc.js";
|
|
6
6
|
import "./fetch-sqCl8SIJ.js";
|
|
7
7
|
export { buildCommandTextFromArgs, findCommandByNativeName, listNativeCommandSpecsForConfig, parseCommandArgs, resolveCommandArgMenu };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./query-expansion-C6UNkw7W.js";
|
|
2
2
|
import "./paths-CzCvxHkV.js";
|
|
3
3
|
import "./logger-Cmh2bFJD.js";
|
|
4
|
-
import { Ar as resolveConversationLabel, Dn as resolveChunkMode, T as createReplyPrefixOptions, bn as resolveMarkdownTableMode, fn as resolveAgentRoute, g as deliverSlackSlashReplies, m as recordInboundSessionMetaSafe, x as dispatchReplyWithDispatcher, z as finalizeInboundContext } from "./model-selection-
|
|
4
|
+
import { Ar as resolveConversationLabel, Dn as resolveChunkMode, T as createReplyPrefixOptions, bn as resolveMarkdownTableMode, fn as resolveAgentRoute, g as deliverSlackSlashReplies, m as recordInboundSessionMetaSafe, x as dispatchReplyWithDispatcher, z as finalizeInboundContext } from "./model-selection-qaBek98Q.js";
|
|
5
5
|
import "./github-copilot-token-xzmo0MIc.js";
|
|
6
6
|
import "./fetch-sqCl8SIJ.js";
|
|
7
7
|
export { createReplyPrefixOptions, deliverSlackSlashReplies, dispatchReplyWithDispatcher, finalizeInboundContext, recordInboundSessionMetaSafe, resolveAgentRoute, resolveChunkMode, resolveConversationLabel, resolveMarkdownTableMode };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "./query-expansion-
|
|
2
|
-
import "./paths-
|
|
3
|
-
import "./subsystem-
|
|
4
|
-
import "./workspace-
|
|
5
|
-
import "./logger-
|
|
6
|
-
import { An as resolveChunkMode, B as finalizeInboundContext, Cn as resolveMarkdownTableMode, E as createReplyPrefixOptions, Fr as resolveConversationLabel, S as dispatchReplyWithDispatcher, _ as deliverSlackSlashReplies, h as recordInboundSessionMetaSafe, hn as resolveAgentRoute } from "./model-selection-
|
|
7
|
-
import "./github-copilot-token-
|
|
1
|
+
import "./query-expansion-DnS6CGY2.js";
|
|
2
|
+
import "./paths-BwJ6yG6k.js";
|
|
3
|
+
import "./subsystem-CDcEQtQK.js";
|
|
4
|
+
import "./workspace-Cg3kGb1y.js";
|
|
5
|
+
import "./logger-C0l_Gj8Y.js";
|
|
6
|
+
import { An as resolveChunkMode, B as finalizeInboundContext, Cn as resolveMarkdownTableMode, E as createReplyPrefixOptions, Fr as resolveConversationLabel, S as dispatchReplyWithDispatcher, _ as deliverSlackSlashReplies, h as recordInboundSessionMetaSafe, hn as resolveAgentRoute } from "./model-selection-C9tlIhgN.js";
|
|
7
|
+
import "./github-copilot-token-368sRGBD.js";
|
|
8
8
|
import "./boolean-C7Ct_klp.js";
|
|
9
|
-
import "./fetch-
|
|
10
|
-
import "./frontmatter-
|
|
9
|
+
import "./fetch-sH_NN8SV.js";
|
|
10
|
+
import "./frontmatter-DhmdUnBP.js";
|
|
11
11
|
export { createReplyPrefixOptions, deliverSlackSlashReplies, dispatchReplyWithDispatcher, finalizeInboundContext, recordInboundSessionMetaSafe, resolveAgentRoute, resolveChunkMode, resolveConversationLabel, resolveMarkdownTableMode };
|
package/dist/{slash-skill-commands.runtime-BZqnnkHJ.js → slash-skill-commands.runtime-Cm8K1kWM.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./query-expansion-C6UNkw7W.js";
|
|
2
2
|
import "./paths-CzCvxHkV.js";
|
|
3
3
|
import "./logger-Cmh2bFJD.js";
|
|
4
|
-
import { F as listSkillCommandsForAgents } from "./model-selection-
|
|
4
|
+
import { F as listSkillCommandsForAgents } from "./model-selection-qaBek98Q.js";
|
|
5
5
|
import "./github-copilot-token-xzmo0MIc.js";
|
|
6
6
|
import "./fetch-sqCl8SIJ.js";
|
|
7
7
|
export { listSkillCommandsForAgents };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "./query-expansion-DnS6CGY2.js";
|
|
2
|
+
import "./paths-BwJ6yG6k.js";
|
|
3
|
+
import "./subsystem-CDcEQtQK.js";
|
|
4
|
+
import "./workspace-Cg3kGb1y.js";
|
|
5
|
+
import "./logger-C0l_Gj8Y.js";
|
|
6
|
+
import { I as listSkillCommandsForAgents } from "./model-selection-C9tlIhgN.js";
|
|
7
|
+
import "./github-copilot-token-368sRGBD.js";
|
|
8
|
+
import "./boolean-C7Ct_klp.js";
|
|
9
|
+
import "./fetch-sH_NN8SV.js";
|
|
10
|
+
import "./frontmatter-DhmdUnBP.js";
|
|
11
|
+
export { listSkillCommandsForAgents };
|
package/dist/{subagent-registry-runtime-9WfVik2h.js → subagent-registry-runtime-DKOXxZgH.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./query-expansion-C6UNkw7W.js";
|
|
2
2
|
import "./paths-CzCvxHkV.js";
|
|
3
3
|
import "./logger-Cmh2bFJD.js";
|
|
4
|
-
import { $ as countPendingDescendantRunsExcludingRun, Q as countPendingDescendantRuns, Z as countActiveDescendantRuns, et as isSubagentSessionRunActive, it as shouldIgnorePostCompletionAnnounceForSession, nt as replaceSubagentRunAfterSteer, rt as resolveRequesterForChildSession, tt as listSubagentRunsForRequester } from "./model-selection-
|
|
4
|
+
import { $ as countPendingDescendantRunsExcludingRun, Q as countPendingDescendantRuns, Z as countActiveDescendantRuns, et as isSubagentSessionRunActive, it as shouldIgnorePostCompletionAnnounceForSession, nt as replaceSubagentRunAfterSteer, rt as resolveRequesterForChildSession, tt as listSubagentRunsForRequester } from "./model-selection-qaBek98Q.js";
|
|
5
5
|
import "./github-copilot-token-xzmo0MIc.js";
|
|
6
6
|
import "./fetch-sqCl8SIJ.js";
|
|
7
7
|
export { countActiveDescendantRuns, countPendingDescendantRuns, countPendingDescendantRunsExcludingRun, isSubagentSessionRunActive, listSubagentRunsForRequester, replaceSubagentRunAfterSteer, resolveRequesterForChildSession, shouldIgnorePostCompletionAnnounceForSession };
|
package/dist/{subagent-registry-runtime-Z0fdsGSq.js → subagent-registry-runtime-DkamrsVw.js}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "./query-expansion-
|
|
2
|
-
import "./paths-
|
|
3
|
-
import "./subsystem-
|
|
4
|
-
import "./workspace-
|
|
5
|
-
import "./logger-
|
|
6
|
-
import { $ as countPendingDescendantRuns, Q as countActiveDescendantRuns, at as shouldIgnorePostCompletionAnnounceForSession, et as countPendingDescendantRunsExcludingRun, it as resolveRequesterForChildSession, nt as listSubagentRunsForRequester, rt as replaceSubagentRunAfterSteer, tt as isSubagentSessionRunActive } from "./model-selection-
|
|
7
|
-
import "./github-copilot-token-
|
|
1
|
+
import "./query-expansion-DnS6CGY2.js";
|
|
2
|
+
import "./paths-BwJ6yG6k.js";
|
|
3
|
+
import "./subsystem-CDcEQtQK.js";
|
|
4
|
+
import "./workspace-Cg3kGb1y.js";
|
|
5
|
+
import "./logger-C0l_Gj8Y.js";
|
|
6
|
+
import { $ as countPendingDescendantRuns, Q as countActiveDescendantRuns, at as shouldIgnorePostCompletionAnnounceForSession, et as countPendingDescendantRunsExcludingRun, it as resolveRequesterForChildSession, nt as listSubagentRunsForRequester, rt as replaceSubagentRunAfterSteer, tt as isSubagentSessionRunActive } from "./model-selection-C9tlIhgN.js";
|
|
7
|
+
import "./github-copilot-token-368sRGBD.js";
|
|
8
8
|
import "./boolean-C7Ct_klp.js";
|
|
9
|
-
import "./fetch-
|
|
10
|
-
import "./frontmatter-
|
|
9
|
+
import "./fetch-sH_NN8SV.js";
|
|
10
|
+
import "./frontmatter-DhmdUnBP.js";
|
|
11
11
|
export { countActiveDescendantRuns, countPendingDescendantRuns, countPendingDescendantRunsExcludingRun, isSubagentSessionRunActive, listSubagentRunsForRequester, replaceSubagentRunAfterSteer, resolveRequesterForChildSession, shouldIgnorePostCompletionAnnounceForSession };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as resolveConfigPath } from "./paths-
|
|
1
|
+
import { r as resolveConfigPath } from "./paths-BwJ6yG6k.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,12 +1,12 @@
|
|
|
1
1
|
import { R as resolveStorePath, fn as normalizeAgentId, ln as buildGroupHistoryKey, on as DEFAULT_MAIN_KEY, sn as buildAgentMainSessionKey } from "./query-expansion-C6UNkw7W.js";
|
|
2
2
|
import "./paths-CzCvxHkV.js";
|
|
3
3
|
import { B as shouldLogVerbose, C as sleep, K as getChildLogger, M as defaultRuntime, O as createSubsystemLogger, R as logVerbose, T as toWhatsappJid, h as normalizeE164, m as jidToE164, o as clamp, p as isSelfChatMode, v as resolveJidToE164 } from "./logger-Cmh2bFJD.js";
|
|
4
|
-
import { $r as saveMediaBuffer, A as getReplyFromConfig, C as resolveMentionGating, Cn as resolveDefaultGroupPolicy, Cr as readWebSelfId, D as buildHistoryContextFromEntries, Dn as resolveChunkMode, Dr as webAuthExists, Dt as toLocationContext, E as shouldAckReactionForWhatsApp, Ei as resolveMessagePrefix, En as chunkMarkdownTextWithMode, Et as formatLocationText, G as buildMentionRegexes, Gn as registerUnhandledRejectionHandler, H as resolveInboundDebounceMs, K as normalizeMentionText, O as recordPendingHistoryEntryIfEnabled, On as resolveTextChunkLimit, Or as resolveChannelGroupPolicy, Qn as recordSessionMetaFromInbound, S as issuePairingChallenge, St as createDedupeCache, T as createReplyPrefixOptions, Ti as resolveIdentityNamePrefix, Tn as warnMissingProviderGroupPolicyFallbackOnce, Tt as parseActivationCommand, U as hasControlCommand, V as createInboundDebouncer, W as shouldComputeCommandAuthorized, Zn as loadSessionStore, _r as getWebAuthAgeMs, an as readStoreAllowFromForDmPolicy, b as dispatchReplyWithBufferedBlockDispatcher, bn as resolveMarkdownTableMode, bt as computeBackoff, cn as resolvePinnedMainDmOwnerFromAllowlist, dn as deriveLastRoutePolicy, er as updateLastRoute, f as setActiveWebListener, fn as resolveAgentRoute, gr as WA_WEB_AUTH_DIR, hn as formatDurationPrecise, hr as resolveWhatsAppMediaMaxBytes, jr as resolveGroupSessionKey, k as formatInboundEnvelope, kn as loadWebMedia, kr as resolveChannelGroupRequireMention, ln as upsertChannelPairingRequest, mn as enqueueSystemEvent, mr as resolveWhatsAppAccount, on as resolveDmGroupAccessWithCommandGate, p as resolveInboundSessionEnvelopeContext, pi as loadConfig, pn as resolveInboundLastRouteSessionKey, qn as getAgentScopedMediaLocalRoots, sn as resolveDmGroupAccessWithLists, un as buildAgentSessionKey, vi as formatCliCommand, vn as convertMarkdownTables, vr as logWebSelfId, wn as resolveOpenProviderRuntimeGroupPolicy, wt as normalizeGroupActivation, xr as pickWebChannel, xt as sleepWithAbort, y as createConnectedChannelStatusPatch, yn as recordChannelActivity, z as finalizeInboundContext } from "./model-selection-
|
|
4
|
+
import { $r as saveMediaBuffer, A as getReplyFromConfig, C as resolveMentionGating, Cn as resolveDefaultGroupPolicy, Cr as readWebSelfId, D as buildHistoryContextFromEntries, Dn as resolveChunkMode, Dr as webAuthExists, Dt as toLocationContext, E as shouldAckReactionForWhatsApp, Ei as resolveMessagePrefix, En as chunkMarkdownTextWithMode, Et as formatLocationText, G as buildMentionRegexes, Gn as registerUnhandledRejectionHandler, H as resolveInboundDebounceMs, K as normalizeMentionText, O as recordPendingHistoryEntryIfEnabled, On as resolveTextChunkLimit, Or as resolveChannelGroupPolicy, Qn as recordSessionMetaFromInbound, S as issuePairingChallenge, St as createDedupeCache, T as createReplyPrefixOptions, Ti as resolveIdentityNamePrefix, Tn as warnMissingProviderGroupPolicyFallbackOnce, Tt as parseActivationCommand, U as hasControlCommand, V as createInboundDebouncer, W as shouldComputeCommandAuthorized, Zn as loadSessionStore, _r as getWebAuthAgeMs, an as readStoreAllowFromForDmPolicy, b as dispatchReplyWithBufferedBlockDispatcher, bn as resolveMarkdownTableMode, bt as computeBackoff, cn as resolvePinnedMainDmOwnerFromAllowlist, dn as deriveLastRoutePolicy, er as updateLastRoute, f as setActiveWebListener, fn as resolveAgentRoute, gr as WA_WEB_AUTH_DIR, hn as formatDurationPrecise, hr as resolveWhatsAppMediaMaxBytes, jr as resolveGroupSessionKey, k as formatInboundEnvelope, kn as loadWebMedia, kr as resolveChannelGroupRequireMention, ln as upsertChannelPairingRequest, mn as enqueueSystemEvent, mr as resolveWhatsAppAccount, on as resolveDmGroupAccessWithCommandGate, p as resolveInboundSessionEnvelopeContext, pi as loadConfig, pn as resolveInboundLastRouteSessionKey, qn as getAgentScopedMediaLocalRoots, sn as resolveDmGroupAccessWithLists, un as buildAgentSessionKey, vi as formatCliCommand, vn as convertMarkdownTables, vr as logWebSelfId, wn as resolveOpenProviderRuntimeGroupPolicy, wt as normalizeGroupActivation, xr as pickWebChannel, xt as sleepWithAbort, y as createConnectedChannelStatusPatch, yn as recordChannelActivity, z as finalizeInboundContext } from "./model-selection-qaBek98Q.js";
|
|
5
5
|
import "./github-copilot-token-xzmo0MIc.js";
|
|
6
6
|
import "./fetch-sqCl8SIJ.js";
|
|
7
|
-
import { i as waitForWaConnection, n as formatError, r as getStatusCode, t as createWaSocket } from "./session
|
|
8
|
-
import { i as markdownToWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./send-
|
|
9
|
-
import { t as loginWeb } from "./login-
|
|
7
|
+
import { i as waitForWaConnection, n as formatError, r as getStatusCode, t as createWaSocket } from "./session--tqRfZQU.js";
|
|
8
|
+
import { i as markdownToWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./send-DxYxezcL.js";
|
|
9
|
+
import { t as loginWeb } from "./login-BEOnxdap.js";
|
|
10
10
|
import { randomUUID } from "node:crypto";
|
|
11
11
|
import { DisconnectReason, downloadMediaMessage, extractMessageContent, getContentType, isJidGroup, normalizeMessageContent } from "@whiskeysockets/baileys";
|
|
12
12
|
const DEFAULT_RECONNECT_POLICY = {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { R as resolveStorePath } from "./query-expansion-
|
|
2
|
-
import "./paths-
|
|
3
|
-
import { a as defaultRuntime, b as getChildLogger, d as logVerbose, m as shouldLogVerbose, t as createSubsystemLogger } from "./subsystem-
|
|
4
|
-
import { F as DEFAULT_MAIN_KEY, I as buildAgentMainSessionKey, R as buildGroupHistoryKey, V 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 { A as formatInboundEnvelope, An as resolveChunkMode, At as toLocationContext, B as finalizeInboundContext, C as issuePairingChallenge, Ci as formatCliCommand, Cn as resolveMarkdownTableMode, Cr as logWebSelfId, Ct as createDedupeCache, D as shouldAckReactionForWhatsApp, Dn as resolveOpenProviderRuntimeGroupPolicy, Dt as normalizeGroupActivation, E as createReplyPrefixOptions, En as resolveDefaultGroupPolicy, Er as pickWebChannel, Et as resolveMessagePrefix, G as shouldComputeCommandAuthorized, H as createInboundDebouncer, Ir as resolveGroupSessionKey, Jn as registerUnhandledRejectionHandler, K as buildMentionRegexes, Mn as loadWebMedia, Mr as webAuthExists, Nr as resolveChannelGroupPolicy, O as buildHistoryContextFromEntries, On as warnMissingProviderGroupPolicyFallbackOnce, Or as readWebSelfId, Ot as parseActivationCommand, Pr as resolveChannelGroupRequireMention, Sn as recordChannelActivity, Sr as getWebAuthAgeMs, St as sleepWithAbort, Tt as resolveIdentityNamePrefix, U as resolveInboundDebounceMs, W as hasControlCommand, Xn as getAgentScopedMediaLocalRoots, _n as enqueueSystemEvent, b as createConnectedChannelStatusPatch, br as resolveWhatsAppMediaMaxBytes, cn as readStoreAllowFromForDmPolicy, dn as resolvePinnedMainDmOwnerFromAllowlist, er as loadSessionStore, fn as upsertChannelPairingRequest, gn as resolveInboundLastRouteSessionKey, hn as resolveAgentRoute, ii as saveMediaBuffer, j as getReplyFromConfig, jn as resolveTextChunkLimit, k as recordPendingHistoryEntryIfEnabled, kn as chunkMarkdownTextWithMode, kt as formatLocationText, ln as resolveDmGroupAccessWithCommandGate, m as resolveInboundSessionEnvelopeContext, mn as deriveLastRoutePolicy, nr as updateLastRoute, p as setActiveWebListener, pn as buildAgentSessionKey, q as normalizeMentionText, tr as recordSessionMetaFromInbound, un as resolveDmGroupAccessWithLists, vi as loadConfig, vn as formatDurationPrecise, w as resolveMentionGating, x as dispatchReplyWithBufferedBlockDispatcher, xn as convertMarkdownTables, xr as WA_WEB_AUTH_DIR, xt as computeBackoff, yr as resolveWhatsAppAccount } from "./model-selection-
|
|
7
|
-
import "./github-copilot-token-
|
|
1
|
+
import { R as resolveStorePath } from "./query-expansion-DnS6CGY2.js";
|
|
2
|
+
import "./paths-BwJ6yG6k.js";
|
|
3
|
+
import { a as defaultRuntime, b as getChildLogger, d as logVerbose, m as shouldLogVerbose, t as createSubsystemLogger } from "./subsystem-CDcEQtQK.js";
|
|
4
|
+
import { F as DEFAULT_MAIN_KEY, I as buildAgentMainSessionKey, R as buildGroupHistoryKey, V as normalizeAgentId } from "./workspace-Cg3kGb1y.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-C0l_Gj8Y.js";
|
|
6
|
+
import { A as formatInboundEnvelope, An as resolveChunkMode, At as toLocationContext, B as finalizeInboundContext, C as issuePairingChallenge, Ci as formatCliCommand, Cn as resolveMarkdownTableMode, Cr as logWebSelfId, Ct as createDedupeCache, D as shouldAckReactionForWhatsApp, Dn as resolveOpenProviderRuntimeGroupPolicy, Dt as normalizeGroupActivation, E as createReplyPrefixOptions, En as resolveDefaultGroupPolicy, Er as pickWebChannel, Et as resolveMessagePrefix, G as shouldComputeCommandAuthorized, H as createInboundDebouncer, Ir as resolveGroupSessionKey, Jn as registerUnhandledRejectionHandler, K as buildMentionRegexes, Mn as loadWebMedia, Mr as webAuthExists, Nr as resolveChannelGroupPolicy, O as buildHistoryContextFromEntries, On as warnMissingProviderGroupPolicyFallbackOnce, Or as readWebSelfId, Ot as parseActivationCommand, Pr as resolveChannelGroupRequireMention, Sn as recordChannelActivity, Sr as getWebAuthAgeMs, St as sleepWithAbort, Tt as resolveIdentityNamePrefix, U as resolveInboundDebounceMs, W as hasControlCommand, Xn as getAgentScopedMediaLocalRoots, _n as enqueueSystemEvent, b as createConnectedChannelStatusPatch, br as resolveWhatsAppMediaMaxBytes, cn as readStoreAllowFromForDmPolicy, dn as resolvePinnedMainDmOwnerFromAllowlist, er as loadSessionStore, fn as upsertChannelPairingRequest, gn as resolveInboundLastRouteSessionKey, hn as resolveAgentRoute, ii as saveMediaBuffer, j as getReplyFromConfig, jn as resolveTextChunkLimit, k as recordPendingHistoryEntryIfEnabled, kn as chunkMarkdownTextWithMode, kt as formatLocationText, ln as resolveDmGroupAccessWithCommandGate, m as resolveInboundSessionEnvelopeContext, mn as deriveLastRoutePolicy, nr as updateLastRoute, p as setActiveWebListener, pn as buildAgentSessionKey, q as normalizeMentionText, tr as recordSessionMetaFromInbound, un as resolveDmGroupAccessWithLists, vi as loadConfig, vn as formatDurationPrecise, w as resolveMentionGating, x as dispatchReplyWithBufferedBlockDispatcher, xn as convertMarkdownTables, xr as WA_WEB_AUTH_DIR, xt as computeBackoff, yr as resolveWhatsAppAccount } from "./model-selection-C9tlIhgN.js";
|
|
7
|
+
import "./github-copilot-token-368sRGBD.js";
|
|
8
8
|
import "./boolean-C7Ct_klp.js";
|
|
9
|
-
import "./fetch-
|
|
10
|
-
import "./frontmatter-
|
|
11
|
-
import { i as waitForWaConnection, n as formatError, r as getStatusCode, t as createWaSocket } from "./session-
|
|
12
|
-
import { i as markdownToWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./send-
|
|
13
|
-
import { t as loginWeb } from "./login-
|
|
9
|
+
import "./fetch-sH_NN8SV.js";
|
|
10
|
+
import "./frontmatter-DhmdUnBP.js";
|
|
11
|
+
import { i as waitForWaConnection, n as formatError, r as getStatusCode, t as createWaSocket } from "./session-BhX4LYCK.js";
|
|
12
|
+
import { i as markdownToWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./send-CsgNtXyY.js";
|
|
13
|
+
import { t as loginWeb } from "./login-CvFRLU0k.js";
|
|
14
14
|
import { randomUUID } from "node:crypto";
|
|
15
15
|
import { DisconnectReason, downloadMediaMessage, extractMessageContent, getContentType, isJidGroup, normalizeMessageContent } from "@whiskeysockets/baileys";
|
|
16
16
|
const DEFAULT_RECONNECT_POLICY = {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "./query-expansion-C6UNkw7W.js";
|
|
2
2
|
import "./paths-CzCvxHkV.js";
|
|
3
3
|
import "./logger-Cmh2bFJD.js";
|
|
4
|
-
import { Bt as createActionGate, Ht as readReactionParams, Ut as readStringParam, Vt as jsonResult, mr as resolveWhatsAppAccount, pr as resolveWhatsAppOutboundTarget, zt as ToolAuthorizationError } from "./model-selection-
|
|
4
|
+
import { Bt as createActionGate, Ht as readReactionParams, Ut as readStringParam, Vt as jsonResult, mr as resolveWhatsAppAccount, pr as resolveWhatsAppOutboundTarget, zt as ToolAuthorizationError } from "./model-selection-qaBek98Q.js";
|
|
5
5
|
import "./github-copilot-token-xzmo0MIc.js";
|
|
6
6
|
import "./fetch-sqCl8SIJ.js";
|
|
7
|
-
import { r as sendReactionWhatsApp } from "./send-
|
|
7
|
+
import { r as sendReactionWhatsApp } from "./send-DxYxezcL.js";
|
|
8
8
|
//#region src/agents/tools/whatsapp-target-auth.ts
|
|
9
9
|
function resolveAuthorizedWhatsAppOutboundTarget(params) {
|
|
10
10
|
const account = resolveWhatsAppAccount({
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import "./query-expansion-
|
|
2
|
-
import "./paths-
|
|
3
|
-
import "./subsystem-
|
|
4
|
-
import "./workspace-
|
|
5
|
-
import "./logger-
|
|
6
|
-
import { Gt as readReactionParams, Ht as ToolAuthorizationError, Kt as readStringParam, Ut as createActionGate, Wt as jsonResult, vr as resolveWhatsAppOutboundTarget, yr as resolveWhatsAppAccount } from "./model-selection-
|
|
7
|
-
import "./github-copilot-token-
|
|
1
|
+
import "./query-expansion-DnS6CGY2.js";
|
|
2
|
+
import "./paths-BwJ6yG6k.js";
|
|
3
|
+
import "./subsystem-CDcEQtQK.js";
|
|
4
|
+
import "./workspace-Cg3kGb1y.js";
|
|
5
|
+
import "./logger-C0l_Gj8Y.js";
|
|
6
|
+
import { Gt as readReactionParams, Ht as ToolAuthorizationError, Kt as readStringParam, Ut as createActionGate, Wt as jsonResult, vr as resolveWhatsAppOutboundTarget, yr as resolveWhatsAppAccount } from "./model-selection-C9tlIhgN.js";
|
|
7
|
+
import "./github-copilot-token-368sRGBD.js";
|
|
8
8
|
import "./boolean-C7Ct_klp.js";
|
|
9
|
-
import "./fetch-
|
|
10
|
-
import "./frontmatter-
|
|
11
|
-
import { r as sendReactionWhatsApp } from "./send-
|
|
9
|
+
import "./fetch-sH_NN8SV.js";
|
|
10
|
+
import "./frontmatter-DhmdUnBP.js";
|
|
11
|
+
import { r as sendReactionWhatsApp } from "./send-CsgNtXyY.js";
|
|
12
12
|
//#region src/agents/tools/whatsapp-target-auth.ts
|
|
13
13
|
function resolveAuthorizedWhatsAppOutboundTarget(params) {
|
|
14
14
|
const account = resolveWhatsAppAccount({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { f 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 { f as resolveRequiredHomeDir } from "./paths-BwJ6yG6k.js";
|
|
2
|
+
import { l as danger, m as shouldLogVerbose } from "./subsystem-CDcEQtQK.js";
|
|
3
|
+
import { g as pathExists$1, n as logError, t as logDebug, y as resolveUserPath } from "./logger-C0l_Gj8Y.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";
|
|
@@ -571,7 +571,7 @@ function resolveBoundaryPathLexicalSync(params) {
|
|
|
571
571
|
rootCanonicalPath: params.rootCanonicalPath,
|
|
572
572
|
resolveParams: params.params,
|
|
573
573
|
absolutePath: params.absolutePath,
|
|
574
|
-
read: (cursor) =>
|
|
574
|
+
read: (cursor) => fs$1.lstatSync(cursor)
|
|
575
575
|
});
|
|
576
576
|
if (isPromiseLike(maybeStat)) throw new Error("Unexpected async lexical stat");
|
|
577
577
|
const stat = maybeStat;
|
|
@@ -721,15 +721,15 @@ function resolvePathViaExistingAncestorSync(targetPath) {
|
|
|
721
721
|
const normalized = path.resolve(targetPath);
|
|
722
722
|
let cursor = normalized;
|
|
723
723
|
const missingSuffix = [];
|
|
724
|
-
while (!isFilesystemRoot(cursor) && !
|
|
724
|
+
while (!isFilesystemRoot(cursor) && !fs$1.existsSync(cursor)) {
|
|
725
725
|
missingSuffix.unshift(path.basename(cursor));
|
|
726
726
|
const parent = path.dirname(cursor);
|
|
727
727
|
if (parent === cursor) break;
|
|
728
728
|
cursor = parent;
|
|
729
729
|
}
|
|
730
|
-
if (!
|
|
730
|
+
if (!fs$1.existsSync(cursor)) return normalized;
|
|
731
731
|
try {
|
|
732
|
-
const resolvedAncestor = path.resolve(
|
|
732
|
+
const resolvedAncestor = path.resolve(fs$1.realpathSync(cursor));
|
|
733
733
|
if (missingSuffix.length === 0) return resolvedAncestor;
|
|
734
734
|
return path.resolve(resolvedAncestor, ...missingSuffix);
|
|
735
735
|
} catch {
|
|
@@ -754,7 +754,7 @@ function getPathKindSync(absolutePath, preserveFinalSymlink) {
|
|
|
754
754
|
try {
|
|
755
755
|
return {
|
|
756
756
|
exists: true,
|
|
757
|
-
kind: toResolvedKind(preserveFinalSymlink ?
|
|
757
|
+
kind: toResolvedKind(preserveFinalSymlink ? fs$1.lstatSync(absolutePath) : fs$1.statSync(absolutePath))
|
|
758
758
|
};
|
|
759
759
|
} catch (error) {
|
|
760
760
|
if (isNotFoundPathError(error)) return {
|
|
@@ -814,10 +814,10 @@ async function resolveSymlinkHopPath(symlinkPath) {
|
|
|
814
814
|
}
|
|
815
815
|
function resolveSymlinkHopPathSync(symlinkPath) {
|
|
816
816
|
try {
|
|
817
|
-
return path.resolve(
|
|
817
|
+
return path.resolve(fs$1.realpathSync(symlinkPath));
|
|
818
818
|
} catch (error) {
|
|
819
819
|
if (!isNotFoundPathError(error)) throw error;
|
|
820
|
-
const linkTarget =
|
|
820
|
+
const linkTarget = fs$1.readlinkSync(symlinkPath);
|
|
821
821
|
return resolvePathViaExistingAncestorSync(path.resolve(path.dirname(symlinkPath), linkTarget));
|
|
822
822
|
}
|
|
823
823
|
}
|
|
@@ -841,7 +841,7 @@ function sameFileIdentity(left, right) {
|
|
|
841
841
|
return sameFileIdentity$1(left, right);
|
|
842
842
|
}
|
|
843
843
|
function openVerifiedFileSync(params) {
|
|
844
|
-
const ioFs = params.ioFs ??
|
|
844
|
+
const ioFs = params.ioFs ?? fs$1;
|
|
845
845
|
const allowedType = params.allowedType ?? "file";
|
|
846
846
|
const openReadFlags = ioFs.constants.O_RDONLY | (typeof ioFs.constants.O_NOFOLLOW === "number" ? ioFs.constants.O_NOFOLLOW : 0);
|
|
847
847
|
let fd = null;
|
|
@@ -917,7 +917,7 @@ function canUseBoundaryFileOpen(ioFs) {
|
|
|
917
917
|
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;
|
|
918
918
|
}
|
|
919
919
|
function openBoundaryFileSync(params) {
|
|
920
|
-
const ioFs = params.ioFs ??
|
|
920
|
+
const ioFs = params.ioFs ?? fs$1;
|
|
921
921
|
const resolved = resolveBoundaryFilePathGeneric({
|
|
922
922
|
absolutePath: params.absolutePath,
|
|
923
923
|
resolve: (absolutePath) => resolveBoundaryPathSync({
|
|
@@ -968,7 +968,7 @@ function finalizeBoundaryFileOpen(params) {
|
|
|
968
968
|
});
|
|
969
969
|
}
|
|
970
970
|
async function openBoundaryFile(params) {
|
|
971
|
-
const ioFs = params.ioFs ??
|
|
971
|
+
const ioFs = params.ioFs ?? fs$1;
|
|
972
972
|
const maybeResolved = resolveBoundaryFilePathGeneric({
|
|
973
973
|
absolutePath: params.absolutePath,
|
|
974
974
|
resolve: (absolutePath) => resolveBoundaryPath({
|
|
@@ -1133,7 +1133,7 @@ function resolveNpmArgvForWindows(argv) {
|
|
|
1133
1133
|
if (!cliName) return null;
|
|
1134
1134
|
const nodeDir = path.dirname(process$1.execPath);
|
|
1135
1135
|
const cliPath = path.join(nodeDir, "node_modules", "npm", "bin", cliName);
|
|
1136
|
-
if (!
|
|
1136
|
+
if (!fs$1.existsSync(cliPath)) {
|
|
1137
1137
|
const command = argv[0] ?? "";
|
|
1138
1138
|
return [path.extname(command).toLowerCase() ? command : `${command}.cmd`, ...argv.slice(1)];
|
|
1139
1139
|
}
|
|
@@ -1338,7 +1338,7 @@ async function readPackageName(dir) {
|
|
|
1338
1338
|
}
|
|
1339
1339
|
function readPackageNameSync(dir) {
|
|
1340
1340
|
try {
|
|
1341
|
-
return parsePackageName(
|
|
1341
|
+
return parsePackageName(fs$1.readFileSync(path.join(dir, "package.json"), "utf-8"));
|
|
1342
1342
|
} catch {
|
|
1343
1343
|
return null;
|
|
1344
1344
|
}
|
|
@@ -1370,7 +1370,7 @@ function candidateDirsFromArgv1(argv1) {
|
|
|
1370
1370
|
const normalized = path.resolve(argv1);
|
|
1371
1371
|
const candidates = [path.dirname(normalized)];
|
|
1372
1372
|
try {
|
|
1373
|
-
const resolved =
|
|
1373
|
+
const resolved = fs$1.realpathSync(normalized);
|
|
1374
1374
|
if (resolved !== normalized) candidates.push(path.dirname(resolved));
|
|
1375
1375
|
} catch {}
|
|
1376
1376
|
const parts = normalized.split(path.sep);
|
|
@@ -1482,14 +1482,14 @@ async function readWorkspaceFileWithGuards(params) {
|
|
|
1482
1482
|
const identity = workspaceFileIdentity(opened.stat, opened.path);
|
|
1483
1483
|
const cached = workspaceFileCache.get(params.filePath);
|
|
1484
1484
|
if (cached && cached.identity === identity) {
|
|
1485
|
-
|
|
1485
|
+
fs$1.closeSync(opened.fd);
|
|
1486
1486
|
return {
|
|
1487
1487
|
ok: true,
|
|
1488
1488
|
content: cached.content
|
|
1489
1489
|
};
|
|
1490
1490
|
}
|
|
1491
1491
|
try {
|
|
1492
|
-
const content =
|
|
1492
|
+
const content = fs$1.readFileSync(opened.fd, "utf-8");
|
|
1493
1493
|
workspaceFileCache.set(params.filePath, {
|
|
1494
1494
|
content,
|
|
1495
1495
|
identity
|
|
@@ -1506,7 +1506,7 @@ async function readWorkspaceFileWithGuards(params) {
|
|
|
1506
1506
|
error
|
|
1507
1507
|
};
|
|
1508
1508
|
} finally {
|
|
1509
|
-
|
|
1509
|
+
fs$1.closeSync(opened.fd);
|
|
1510
1510
|
}
|
|
1511
1511
|
}
|
|
1512
1512
|
function stripFrontMatter(content) {
|
package/package.json
CHANGED
|
@@ -108,6 +108,24 @@ if [ ! -f "${INSTANCE_DIR}/package.json" ]; then
|
|
|
108
108
|
exit 1
|
|
109
109
|
fi
|
|
110
110
|
|
|
111
|
+
# --- 修改 package.json 包名为 openclaw (修复插件 SDK 别名问题) ---
|
|
112
|
+
echo -e "${BLUE}🔧 正在修改 package.json 包名以支持插件 SDK...${NC}"
|
|
113
|
+
if command -v jq &> /dev/null; then
|
|
114
|
+
jq '.name = "openclaw"' "${INSTANCE_DIR}/package.json" > "${INSTANCE_DIR}/package.json.tmp"
|
|
115
|
+
mv "${INSTANCE_DIR}/package.json.tmp" "${INSTANCE_DIR}/package.json"
|
|
116
|
+
echo -e "${GREEN}✅ 包名已修改为 openclaw${NC}"
|
|
117
|
+
elif command -v node &> /dev/null; then
|
|
118
|
+
node -e "
|
|
119
|
+
const fs = require('fs');
|
|
120
|
+
const pkg = JSON.parse(fs.readFileSync('${INSTANCE_DIR}/package.json', 'utf-8'));
|
|
121
|
+
pkg.name = 'openclaw';
|
|
122
|
+
fs.writeFileSync('${INSTANCE_DIR}/package.json', JSON.stringify(pkg, null, 2));
|
|
123
|
+
"
|
|
124
|
+
echo -e "${GREEN}✅ 包名已修改为 openclaw${NC}"
|
|
125
|
+
else
|
|
126
|
+
echo -e "${YELLOW}⚠️ 未找到 jq 或 node,无法自动修改包名${NC}"
|
|
127
|
+
fi
|
|
128
|
+
|
|
111
129
|
# --- 依赖安装 ---
|
|
112
130
|
echo -e "${BLUE}📦 正在安装依赖...${NC}"
|
|
113
131
|
cd "${INSTANCE_DIR}"
|
|
@@ -178,8 +196,6 @@ if [ -e "${INSTANCE_DIR}/config" ] && [ ! -d "${INSTANCE_DIR}/config" ]; then
|
|
|
178
196
|
rm -f "${INSTANCE_DIR}/config"
|
|
179
197
|
fi
|
|
180
198
|
mkdir -p "${INSTANCE_DIR}/config"
|
|
181
|
-
touch "${INSTANCE_DIR}/config/.write_test" || { echo -e "${RED}❌ config 目录不可写${NC}"; exit 1; }
|
|
182
|
-
rm -f "${INSTANCE_DIR}/config/.write_test"
|
|
183
199
|
|
|
184
200
|
# 设置模型变量
|
|
185
201
|
ZAI_KEY=""; DS_KEY=""; MX_KEY=""; KIMI_KEY=""; QWEN_KEY=""
|
|
@@ -415,4 +431,4 @@ if kill -0 $PID 2>/dev/null; then
|
|
|
415
431
|
else
|
|
416
432
|
echo -e "${RED}❌ 启动失败,请查看日志: tail -n 20 ${INSTANCE_DIR}/workspace/server.log${NC}"
|
|
417
433
|
exit 1
|
|
418
|
-
|
|
434
|
+
if
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import "./query-expansion-DXwSmE_K.js";
|
|
2
|
-
import "./paths-CNIc83Pn.js";
|
|
3
|
-
import "./subsystem-Cr1MiLhx.js";
|
|
4
|
-
import "./workspace-Bi8vpJN0.js";
|
|
5
|
-
import "./logger-DCBlX1uz.js";
|
|
6
|
-
import { Si as ensureAuthProfileStore } from "./model-selection-CNRMBWfR.js";
|
|
7
|
-
import "./github-copilot-token-BeFx3MLn.js";
|
|
8
|
-
import "./boolean-C7Ct_klp.js";
|
|
9
|
-
import "./fetch-BdTTF2z-.js";
|
|
10
|
-
import "./frontmatter-DZlWsaUx.js";
|
|
11
|
-
export { ensureAuthProfileStore };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import "./query-expansion-DXwSmE_K.js";
|
|
2
|
-
import "./paths-CNIc83Pn.js";
|
|
3
|
-
import "./subsystem-Cr1MiLhx.js";
|
|
4
|
-
import "./workspace-Bi8vpJN0.js";
|
|
5
|
-
import "./logger-DCBlX1uz.js";
|
|
6
|
-
import { Z as compactEmbeddedPiSessionDirect } from "./model-selection-CNRMBWfR.js";
|
|
7
|
-
import "./github-copilot-token-BeFx3MLn.js";
|
|
8
|
-
import "./boolean-C7Ct_klp.js";
|
|
9
|
-
import "./fetch-BdTTF2z-.js";
|
|
10
|
-
import "./frontmatter-DZlWsaUx.js";
|
|
11
|
-
export { compactEmbeddedPiSessionDirect };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import "./query-expansion-DXwSmE_K.js";
|
|
2
|
-
import "./paths-CNIc83Pn.js";
|
|
3
|
-
import "./subsystem-Cr1MiLhx.js";
|
|
4
|
-
import "./workspace-Bi8vpJN0.js";
|
|
5
|
-
import "./logger-DCBlX1uz.js";
|
|
6
|
-
import { Pt as deliverOutboundPayloads } from "./model-selection-CNRMBWfR.js";
|
|
7
|
-
import "./github-copilot-token-BeFx3MLn.js";
|
|
8
|
-
import "./boolean-C7Ct_klp.js";
|
|
9
|
-
import "./fetch-BdTTF2z-.js";
|
|
10
|
-
import "./frontmatter-DZlWsaUx.js";
|
|
11
|
-
export { deliverOutboundPayloads };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import "./query-expansion-DXwSmE_K.js";
|
|
2
|
-
import "./paths-CNIc83Pn.js";
|
|
3
|
-
import "./subsystem-Cr1MiLhx.js";
|
|
4
|
-
import "./workspace-Bi8vpJN0.js";
|
|
5
|
-
import "./logger-DCBlX1uz.js";
|
|
6
|
-
import { qn as describeImageWithModel } from "./model-selection-CNRMBWfR.js";
|
|
7
|
-
import "./github-copilot-token-BeFx3MLn.js";
|
|
8
|
-
import "./boolean-C7Ct_klp.js";
|
|
9
|
-
import "./fetch-BdTTF2z-.js";
|
|
10
|
-
import "./frontmatter-DZlWsaUx.js";
|
|
11
|
-
export { describeImageWithModel };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import "./query-expansion-DXwSmE_K.js";
|
|
2
|
-
import "./paths-CNIc83Pn.js";
|
|
3
|
-
import "./subsystem-Cr1MiLhx.js";
|
|
4
|
-
import "./workspace-Bi8vpJN0.js";
|
|
5
|
-
import "./logger-DCBlX1uz.js";
|
|
6
|
-
import { Xt as MemoryIndexManager, Zt as closeAllMemoryIndexManagers } from "./model-selection-CNRMBWfR.js";
|
|
7
|
-
import "./github-copilot-token-BeFx3MLn.js";
|
|
8
|
-
import "./boolean-C7Ct_klp.js";
|
|
9
|
-
import "./fetch-BdTTF2z-.js";
|
|
10
|
-
import "./frontmatter-DZlWsaUx.js";
|
|
11
|
-
export { MemoryIndexManager, closeAllMemoryIndexManagers };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import "./query-expansion-DXwSmE_K.js";
|
|
2
|
-
import "./paths-CNIc83Pn.js";
|
|
3
|
-
import "./subsystem-Cr1MiLhx.js";
|
|
4
|
-
import "./workspace-Bi8vpJN0.js";
|
|
5
|
-
import "./logger-DCBlX1uz.js";
|
|
6
|
-
import { Bn as discoverModels, Ln as PiAuthStorageClass, Rn as PiModelRegistryClass, zn as discoverAuthStorage } from "./model-selection-CNRMBWfR.js";
|
|
7
|
-
import "./github-copilot-token-BeFx3MLn.js";
|
|
8
|
-
import "./boolean-C7Ct_klp.js";
|
|
9
|
-
import "./fetch-BdTTF2z-.js";
|
|
10
|
-
import "./frontmatter-DZlWsaUx.js";
|
|
11
|
-
export { PiAuthStorageClass as AuthStorage, PiModelRegistryClass as ModelRegistry, discoverAuthStorage, discoverModels };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import "./query-expansion-DXwSmE_K.js";
|
|
2
|
-
import "./paths-CNIc83Pn.js";
|
|
3
|
-
import "./subsystem-Cr1MiLhx.js";
|
|
4
|
-
import "./workspace-Bi8vpJN0.js";
|
|
5
|
-
import "./logger-DCBlX1uz.js";
|
|
6
|
-
import "./model-selection-CNRMBWfR.js";
|
|
7
|
-
import "./github-copilot-token-BeFx3MLn.js";
|
|
8
|
-
import "./boolean-C7Ct_klp.js";
|
|
9
|
-
import "./fetch-BdTTF2z-.js";
|
|
10
|
-
import "./frontmatter-DZlWsaUx.js";
|
|
11
|
-
import "./session-kt-bqE_z.js";
|
|
12
|
-
import { t as loginWeb } from "./login-CKmmxErc.js";
|
|
13
|
-
export { loginWeb };
|