openclaw-multi-auto 1.7.5 → 1.7.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/{audio-preflight-ByLQ-O2o.js → audio-preflight-CUgcQtbA.js} +1 -1
- package/dist/{auth-profiles.runtime-Bp6HfAW4.js → auth-profiles.runtime-BEes_Rco.js} +1 -1
- package/dist/build-info.json +3 -3
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/channels/plugins/actions/discord.js +1 -1
- package/dist/channels/plugins/actions/signal.js +1 -1
- package/dist/channels/plugins/actions/telegram.js +1 -1
- package/dist/channels/plugins/agent-tools/whatsapp-login.js +1 -1
- package/dist/{compact.runtime-Dy7P2p35.js → compact.runtime-D9Tmp5YS.js} +1 -1
- package/dist/{deliver-runtime-DLAZp9H3.js → deliver-runtime-CjrGc3oj.js} +1 -1
- package/dist/{discord-C5GTGVrg.js → discord-DKZdsbTR.js} +42 -42
- package/dist/{image-runtime-CidKJsqA.js → image-runtime-Cr6qZmyh.js} +1 -1
- package/dist/line/send.js +1 -1
- package/dist/{login-rVmwSeBs.js → login-CIjIxi5t.js} +2 -2
- package/dist/{login-qr-D3WKyrcm.js → login-qr-Djgtmdpd.js} +2 -2
- package/dist/{manager-runtime-DON5nkey.js → manager-runtime-CvM8JTRt.js} +1 -1
- package/dist/{manager.runtime-B8hc-v_R.js → manager.runtime-DbQBNTV4.js} +7 -7
- package/dist/{pi-model-discovery-runtime-Do-8n2s8.js → pi-model-discovery-runtime-BujN_d1_.js} +1 -1
- package/dist/{pi-tools.before-tool-call.runtime-DpSw9nu5.js → pi-tools.before-tool-call.runtime-BYooFUjV.js} +1 -1
- package/dist/{pw-ai-B9F20k6L.js → pw-ai-C_IaVhUm.js} +1 -1
- package/dist/{runtime-whatsapp-login.runtime-BAgknLYS.js → runtime-whatsapp-login.runtime-6yfwX0nq.js} +3 -3
- package/dist/{runtime-whatsapp-outbound.runtime-3elssz_a.js → runtime-whatsapp-outbound.runtime-BKesQQli.js} +2 -2
- package/dist/{send-t1epz3bc.js → send-pxKoZnv6.js} +1 -1
- package/dist/{session-BUpAKttt.js → session-D0j0Q_PW.js} +1 -1
- package/dist/{slash-commands.runtime-YWtbFO1w.js → slash-commands.runtime-eZUYakkd.js} +1 -1
- package/dist/{slash-dispatch.runtime-QxpHMagD.js → slash-dispatch.runtime-D7ogJeRu.js} +1 -1
- package/dist/{slash-skill-commands.runtime-Cgu35QuS.js → slash-skill-commands.runtime-iwoxGLKu.js} +1 -1
- package/dist/{subagent-registry-runtime-CNgez4Yd.js → subagent-registry-runtime-BPxjP8o9.js} +1 -1
- package/dist/{web-rZyV5Fxs.js → web-Bl0ih6N1.js} +4 -4
- package/dist/{whatsapp-actions-De9-kJMP.js → whatsapp-actions-Cpf6YROk.js} +2 -2
- package/package.json +8 -8
- package/scripts/create-instance.sh +30 -51
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cr as resolveMediaAttachmentLocalRoots, fr as isAudioAttachment, ir as runAudioTranscription, sr as normalizeMediaAttachments } from "./discord-
|
|
1
|
+
import { cr as resolveMediaAttachmentLocalRoots, fr as isAudioAttachment, ir as runAudioTranscription, sr as normalizeMediaAttachments } from "./discord-DKZdsbTR.js";
|
|
2
2
|
import "./accounts-D5tcOoP8.js";
|
|
3
3
|
import "./token-DI5_CK8b.js";
|
|
4
4
|
import "./query-expansion-Dpf_vNBe.js";
|
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
7cd51fb2d6130a098ba7ba6c53be847f5301873afb4c3ad92317947e732d5c6c
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as discordMessageActions } from "../../../discord-
|
|
1
|
+
import { t as discordMessageActions } from "../../../discord-DKZdsbTR.js";
|
|
2
2
|
import "../../../accounts-D5tcOoP8.js";
|
|
3
3
|
import "../../../token-DI5_CK8b.js";
|
|
4
4
|
import "../../../query-expansion-Dpf_vNBe.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { L as signalMessageActions } from "../../../discord-
|
|
1
|
+
import { L as signalMessageActions } from "../../../discord-DKZdsbTR.js";
|
|
2
2
|
import "../../../accounts-D5tcOoP8.js";
|
|
3
3
|
import "../../../token-DI5_CK8b.js";
|
|
4
4
|
import "../../../query-expansion-Dpf_vNBe.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as telegramMessageActions } from "../../../discord-
|
|
1
|
+
import { I as telegramMessageActions } from "../../../discord-DKZdsbTR.js";
|
|
2
2
|
import "../../../accounts-D5tcOoP8.js";
|
|
3
3
|
import "../../../token-DI5_CK8b.js";
|
|
4
4
|
import "../../../query-expansion-Dpf_vNBe.js";
|
|
@@ -15,7 +15,7 @@ function createWhatsAppLoginTool() {
|
|
|
15
15
|
force: Type.Optional(Type.Boolean())
|
|
16
16
|
}),
|
|
17
17
|
execute: async (_toolCallId, args) => {
|
|
18
|
-
const { startWebLoginWithQr, waitForWebLogin } = await import("../../../login-qr-
|
|
18
|
+
const { startWebLoginWithQr, waitForWebLogin } = await import("../../../login-qr-Djgtmdpd.js");
|
|
19
19
|
if ((args?.action ?? "start") === "wait") {
|
|
20
20
|
const result = await waitForWebLogin({ timeoutMs: typeof args.timeoutMs === "number" ? args.timeoutMs : void 0 });
|
|
21
21
|
return {
|
|
@@ -49,7 +49,7 @@ import { EventEmitter } from "node:events";
|
|
|
49
49
|
import "node:stream/promises";
|
|
50
50
|
import http, { createServer } from "node:http";
|
|
51
51
|
import https from "node:https";
|
|
52
|
-
import WebSocket
|
|
52
|
+
import WebSocket, { WebSocket as WebSocket$1, WebSocketServer } from "ws";
|
|
53
53
|
import { Buffer as Buffer$1 } from "node:buffer";
|
|
54
54
|
import { BedrockClient, ListFoundationModelsCommand } from "@aws-sdk/client-bedrock";
|
|
55
55
|
import { complete, completeSimple, createAssistantMessageEventStream, getApiProvider, getEnvApiKey, registerApiProvider, streamSimple } from "@mariozechner/pi-ai";
|
|
@@ -10695,7 +10695,7 @@ function isModuleNotFoundError(err) {
|
|
|
10695
10695
|
}
|
|
10696
10696
|
async function loadPwAiModule(mode) {
|
|
10697
10697
|
try {
|
|
10698
|
-
return await import("./pw-ai-
|
|
10698
|
+
return await import("./pw-ai-C_IaVhUm.js");
|
|
10699
10699
|
} catch (err) {
|
|
10700
10700
|
if (mode === "soft") return null;
|
|
10701
10701
|
if (isModuleNotFoundError(err)) return null;
|
|
@@ -13869,7 +13869,7 @@ async function ensureChromeExtensionRelayServer(opts) {
|
|
|
13869
13869
|
let extensionWs = null;
|
|
13870
13870
|
const cdpClients = /* @__PURE__ */ new Set();
|
|
13871
13871
|
const connectedTargets = /* @__PURE__ */ new Map();
|
|
13872
|
-
const extensionConnected = () => extensionWs?.readyState === WebSocket
|
|
13872
|
+
const extensionConnected = () => extensionWs?.readyState === WebSocket.OPEN;
|
|
13873
13873
|
const hasConnectedTargets = () => connectedTargets.size > 0;
|
|
13874
13874
|
let extensionDisconnectCleanupTimer = null;
|
|
13875
13875
|
const extensionReconnectWaiters = /* @__PURE__ */ new Set();
|
|
@@ -13921,7 +13921,7 @@ async function ensureChromeExtensionRelayServer(opts) {
|
|
|
13921
13921
|
let nextExtensionId = 1;
|
|
13922
13922
|
const sendToExtension = async (payload) => {
|
|
13923
13923
|
const ws = extensionWs;
|
|
13924
|
-
if (!ws || ws.readyState !== WebSocket
|
|
13924
|
+
if (!ws || ws.readyState !== WebSocket.OPEN) throw new Error("Chrome extension not connected");
|
|
13925
13925
|
ws.send(JSON.stringify(payload));
|
|
13926
13926
|
return await new Promise((resolve, reject) => {
|
|
13927
13927
|
const timer = setTimeout(() => {
|
|
@@ -13938,12 +13938,12 @@ async function ensureChromeExtensionRelayServer(opts) {
|
|
|
13938
13938
|
const broadcastToCdpClients = (evt) => {
|
|
13939
13939
|
const msg = JSON.stringify(evt);
|
|
13940
13940
|
for (const ws of cdpClients) {
|
|
13941
|
-
if (ws.readyState !== WebSocket
|
|
13941
|
+
if (ws.readyState !== WebSocket.OPEN) continue;
|
|
13942
13942
|
ws.send(msg);
|
|
13943
13943
|
}
|
|
13944
13944
|
};
|
|
13945
13945
|
const sendResponseToCdp = (ws, res) => {
|
|
13946
|
-
if (ws.readyState !== WebSocket
|
|
13946
|
+
if (ws.readyState !== WebSocket.OPEN) return;
|
|
13947
13947
|
ws.send(JSON.stringify(res));
|
|
13948
13948
|
};
|
|
13949
13949
|
const dropConnectedTargetSession = (sessionId) => {
|
|
@@ -14197,7 +14197,7 @@ async function ensureChromeExtensionRelayServer(opts) {
|
|
|
14197
14197
|
rejectUpgrade(socket, 401, "Unauthorized");
|
|
14198
14198
|
return;
|
|
14199
14199
|
}
|
|
14200
|
-
if (extensionWs && extensionWs.readyState !== WebSocket
|
|
14200
|
+
if (extensionWs && extensionWs.readyState !== WebSocket.OPEN) {
|
|
14201
14201
|
try {
|
|
14202
14202
|
extensionWs.terminate();
|
|
14203
14203
|
} catch {}
|
|
@@ -14230,7 +14230,7 @@ async function ensureChromeExtensionRelayServer(opts) {
|
|
|
14230
14230
|
clearExtensionDisconnectCleanupTimer();
|
|
14231
14231
|
flushExtensionReconnectWaiters(true);
|
|
14232
14232
|
const ping = setInterval(() => {
|
|
14233
|
-
if (ws.readyState !== WebSocket
|
|
14233
|
+
if (ws.readyState !== WebSocket.OPEN) return;
|
|
14234
14234
|
ws.send(JSON.stringify({ method: "ping" }));
|
|
14235
14235
|
}, 5e3);
|
|
14236
14236
|
ws.on("message", (data) => {
|
|
@@ -14583,7 +14583,7 @@ function createProfileAvailability({ opts, profile, state, getProfileState, setP
|
|
|
14583
14583
|
};
|
|
14584
14584
|
const closePlaywrightBrowserConnectionForProfile = async (cdpUrl) => {
|
|
14585
14585
|
try {
|
|
14586
|
-
await (await import("./pw-ai-
|
|
14586
|
+
await (await import("./pw-ai-C_IaVhUm.js")).closePlaywrightBrowserConnection(cdpUrl ? { cdpUrl } : void 0);
|
|
14587
14587
|
} catch {}
|
|
14588
14588
|
};
|
|
14589
14589
|
const reconcileProfileRuntime = async () => {
|
|
@@ -14710,7 +14710,7 @@ async function movePathToTrash(targetPath) {
|
|
|
14710
14710
|
//#region src/browser/server-context.reset.ts
|
|
14711
14711
|
async function closePlaywrightBrowserConnectionForProfile(cdpUrl) {
|
|
14712
14712
|
try {
|
|
14713
|
-
await (await import("./pw-ai-
|
|
14713
|
+
await (await import("./pw-ai-C_IaVhUm.js")).closePlaywrightBrowserConnection(cdpUrl ? { cdpUrl } : void 0);
|
|
14714
14714
|
} catch {}
|
|
14715
14715
|
}
|
|
14716
14716
|
function createProfileResetOps({ profile, getProfileState, stopRunningBrowser, isHttpReachable, resolveOpenClawUserDataDir }) {
|
|
@@ -15674,7 +15674,7 @@ function openCdpWebSocket(wsUrl, opts) {
|
|
|
15674
15674
|
const headers = getHeadersWithAuth(wsUrl, opts?.headers ?? {});
|
|
15675
15675
|
const handshakeTimeoutMs = typeof opts?.handshakeTimeoutMs === "number" && Number.isFinite(opts.handshakeTimeoutMs) ? Math.max(1, Math.floor(opts.handshakeTimeoutMs)) : CDP_WS_HANDSHAKE_TIMEOUT_MS;
|
|
15676
15676
|
const agent = getDirectAgentForCdp(wsUrl);
|
|
15677
|
-
return new WebSocket
|
|
15677
|
+
return new WebSocket(wsUrl, {
|
|
15678
15678
|
handshakeTimeout: handshakeTimeoutMs,
|
|
15679
15679
|
...Object.keys(headers).length ? { headers } : {},
|
|
15680
15680
|
...agent ? { agent } : {}
|
|
@@ -30894,7 +30894,7 @@ async function ensureOpenClawModelsJson(config, agentDirOverride) {
|
|
|
30894
30894
|
const log$31 = createSubsystemLogger("model-catalog");
|
|
30895
30895
|
let modelCatalogPromise = null;
|
|
30896
30896
|
let hasLoggedModelCatalogError = false;
|
|
30897
|
-
const defaultImportPiSdk = () => import("./pi-model-discovery-runtime-
|
|
30897
|
+
const defaultImportPiSdk = () => import("./pi-model-discovery-runtime-BujN_d1_.js");
|
|
30898
30898
|
let importPiSdk = defaultImportPiSdk;
|
|
30899
30899
|
const CODEX_PROVIDER = "openai-codex";
|
|
30900
30900
|
const OPENAI_PROVIDER = "openai";
|
|
@@ -34152,7 +34152,7 @@ function resolveProviderVisionModelFromConfig(params) {
|
|
|
34152
34152
|
//#region src/media-understanding/providers/image.ts
|
|
34153
34153
|
let piModelDiscoveryRuntimePromise = null;
|
|
34154
34154
|
function loadPiModelDiscoveryRuntime() {
|
|
34155
|
-
piModelDiscoveryRuntimePromise ??= import("./pi-model-discovery-runtime-
|
|
34155
|
+
piModelDiscoveryRuntimePromise ??= import("./pi-model-discovery-runtime-BujN_d1_.js");
|
|
34156
34156
|
return piModelDiscoveryRuntimePromise;
|
|
34157
34157
|
}
|
|
34158
34158
|
async function describeImageWithModel(params) {
|
|
@@ -45735,7 +45735,7 @@ var LegacyContextEngine = class {
|
|
|
45735
45735
|
}
|
|
45736
45736
|
async afterTurn(_params) {}
|
|
45737
45737
|
async compact(params) {
|
|
45738
|
-
const { compactEmbeddedPiSessionDirect } = await import("./compact.runtime-
|
|
45738
|
+
const { compactEmbeddedPiSessionDirect } = await import("./compact.runtime-D9Tmp5YS.js");
|
|
45739
45739
|
const runtimeContext = params.runtimeContext ?? {};
|
|
45740
45740
|
const currentTokenCount = params.currentTokenCount ?? (typeof runtimeContext.currentTokenCount === "number" && Number.isFinite(runtimeContext.currentTokenCount) && runtimeContext.currentTokenCount > 0 ? Math.floor(runtimeContext.currentTokenCount) : void 0);
|
|
45741
45741
|
const result = await compactEmbeddedPiSessionDirect({
|
|
@@ -50245,7 +50245,7 @@ const log$24 = createSubsystemLogger("memory");
|
|
|
50245
50245
|
const QMD_MANAGER_CACHE = /* @__PURE__ */ new Map();
|
|
50246
50246
|
let managerRuntimePromise = null;
|
|
50247
50247
|
function loadManagerRuntime() {
|
|
50248
|
-
managerRuntimePromise ??= import("./manager-runtime-
|
|
50248
|
+
managerRuntimePromise ??= import("./manager-runtime-CvM8JTRt.js");
|
|
50249
50249
|
return managerRuntimePromise;
|
|
50250
50250
|
}
|
|
50251
50251
|
async function getMemorySearchManager(params) {
|
|
@@ -58404,7 +58404,7 @@ var GatewayClient = class {
|
|
|
58404
58404
|
if (fingerprint !== expected) return /* @__PURE__ */ new Error("gateway tls fingerprint mismatch");
|
|
58405
58405
|
});
|
|
58406
58406
|
}
|
|
58407
|
-
this.ws = new WebSocket(url, wsOptions);
|
|
58407
|
+
this.ws = new WebSocket$1(url, wsOptions);
|
|
58408
58408
|
this.ws.on("open", () => {
|
|
58409
58409
|
if (url.startsWith("wss://") && this.opts.tlsFingerprint) {
|
|
58410
58410
|
const tlsError = this.validateTlsFingerprint();
|
|
@@ -58680,7 +58680,7 @@ var GatewayClient = class {
|
|
|
58680
58680
|
const connectChallengeTimeoutMs = typeof rawConnectDelayMs === "number" && Number.isFinite(rawConnectDelayMs) ? Math.max(250, Math.min(1e4, rawConnectDelayMs)) : 2e3;
|
|
58681
58681
|
if (this.connectTimer) clearTimeout(this.connectTimer);
|
|
58682
58682
|
this.connectTimer = setTimeout(() => {
|
|
58683
|
-
if (this.connectSent || this.ws?.readyState !== WebSocket.OPEN) return;
|
|
58683
|
+
if (this.connectSent || this.ws?.readyState !== WebSocket$1.OPEN) return;
|
|
58684
58684
|
this.opts.onConnectError?.(/* @__PURE__ */ new Error("gateway connect challenge timeout"));
|
|
58685
58685
|
this.ws?.close(1008, "connect challenge timeout");
|
|
58686
58686
|
}, connectChallengeTimeoutMs);
|
|
@@ -58725,7 +58725,7 @@ var GatewayClient = class {
|
|
|
58725
58725
|
return null;
|
|
58726
58726
|
}
|
|
58727
58727
|
async request(method, params, opts) {
|
|
58728
|
-
if (!this.ws || this.ws.readyState !== WebSocket.OPEN) throw new Error("gateway not connected");
|
|
58728
|
+
if (!this.ws || this.ws.readyState !== WebSocket$1.OPEN) throw new Error("gateway not connected");
|
|
58729
58729
|
const id = randomUUID();
|
|
58730
58730
|
const frame = {
|
|
58731
58731
|
type: "req",
|
|
@@ -79357,7 +79357,7 @@ function normalizeReplyPayload(payload, opts = {}) {
|
|
|
79357
79357
|
*/
|
|
79358
79358
|
let deliverRuntimePromise$2 = null;
|
|
79359
79359
|
function loadDeliverRuntime$2() {
|
|
79360
|
-
deliverRuntimePromise$2 ??= import("./deliver-runtime-
|
|
79360
|
+
deliverRuntimePromise$2 ??= import("./deliver-runtime-CjrGc3oj.js");
|
|
79361
79361
|
return deliverRuntimePromise$2;
|
|
79362
79362
|
}
|
|
79363
79363
|
/**
|
|
@@ -79907,7 +79907,7 @@ function ensureContextWindowCacheLoaded() {
|
|
|
79907
79907
|
await ensureOpenClawModelsJson(cfg);
|
|
79908
79908
|
} catch {}
|
|
79909
79909
|
try {
|
|
79910
|
-
const { discoverAuthStorage, discoverModels } = await import("./pi-model-discovery-runtime-
|
|
79910
|
+
const { discoverAuthStorage, discoverModels } = await import("./pi-model-discovery-runtime-BujN_d1_.js");
|
|
79911
79911
|
const agentDir = resolveOpenClawAgentDir();
|
|
79912
79912
|
const modelRegistry = discoverModels(discoverAuthStorage(agentDir), agentDir);
|
|
79913
79913
|
applyDiscoveredContextWindows({
|
|
@@ -84945,7 +84945,7 @@ const MAX_TIMER_SAFE_TIMEOUT_MS = 2147e6;
|
|
|
84945
84945
|
const GATEWAY_TIMEOUT_PATTERN = /gateway timeout/i;
|
|
84946
84946
|
let subagentRegistryRuntimePromise = null;
|
|
84947
84947
|
function loadSubagentRegistryRuntime() {
|
|
84948
|
-
subagentRegistryRuntimePromise ??= import("./subagent-registry-runtime-
|
|
84948
|
+
subagentRegistryRuntimePromise ??= import("./subagent-registry-runtime-BPxjP8o9.js");
|
|
84949
84949
|
return subagentRegistryRuntimePromise;
|
|
84950
84950
|
}
|
|
84951
84951
|
const DIRECT_ANNOUNCE_TRANSIENT_RETRY_DELAYS_MS = FAST_TEST_MODE ? [
|
|
@@ -90970,7 +90970,7 @@ const LOOP_WARNING_BUCKET_SIZE = 10;
|
|
|
90970
90970
|
const MAX_LOOP_WARNING_KEYS = 256;
|
|
90971
90971
|
let beforeToolCallRuntimePromise = null;
|
|
90972
90972
|
function loadBeforeToolCallRuntime() {
|
|
90973
|
-
beforeToolCallRuntimePromise ??= import("./pi-tools.before-tool-call.runtime-
|
|
90973
|
+
beforeToolCallRuntimePromise ??= import("./pi-tools.before-tool-call.runtime-BYooFUjV.js");
|
|
90974
90974
|
return beforeToolCallRuntimePromise;
|
|
90975
90975
|
}
|
|
90976
90976
|
function buildAdjustedParamsKey(params) {
|
|
@@ -98923,7 +98923,7 @@ var OpenAIWebSocketManager = class extends EventEmitter {
|
|
|
98923
98923
|
* Throws if the connection is not open.
|
|
98924
98924
|
*/
|
|
98925
98925
|
send(event) {
|
|
98926
|
-
if (!this.ws || this.ws.readyState !== WebSocket
|
|
98926
|
+
if (!this.ws || this.ws.readyState !== WebSocket.OPEN) throw new Error(`OpenAIWebSocketManager: cannot send — connection is not open (readyState=${this.ws?.readyState ?? "no socket"})`);
|
|
98927
98927
|
this.ws.send(JSON.stringify(event));
|
|
98928
98928
|
}
|
|
98929
98929
|
/**
|
|
@@ -98940,7 +98940,7 @@ var OpenAIWebSocketManager = class extends EventEmitter {
|
|
|
98940
98940
|
* Returns true if the WebSocket is currently open and ready to send.
|
|
98941
98941
|
*/
|
|
98942
98942
|
isConnected() {
|
|
98943
|
-
return this.ws !== null && this.ws.readyState === WebSocket
|
|
98943
|
+
return this.ws !== null && this.ws.readyState === WebSocket.OPEN;
|
|
98944
98944
|
}
|
|
98945
98945
|
/**
|
|
98946
98946
|
* Permanently closes the WebSocket connection and disables auto-reconnect.
|
|
@@ -98950,7 +98950,7 @@ var OpenAIWebSocketManager = class extends EventEmitter {
|
|
|
98950
98950
|
this._cancelRetryTimer();
|
|
98951
98951
|
if (this.ws) {
|
|
98952
98952
|
this.ws.removeAllListeners();
|
|
98953
|
-
if (this.ws.readyState === WebSocket
|
|
98953
|
+
if (this.ws.readyState === WebSocket.OPEN || this.ws.readyState === WebSocket.CONNECTING) this.ws.close(1e3, "Client closed");
|
|
98954
98954
|
this.ws = null;
|
|
98955
98955
|
}
|
|
98956
98956
|
}
|
|
@@ -98960,7 +98960,7 @@ var OpenAIWebSocketManager = class extends EventEmitter {
|
|
|
98960
98960
|
reject(/* @__PURE__ */ new Error("OpenAIWebSocketManager: apiKey is required before connecting."));
|
|
98961
98961
|
return;
|
|
98962
98962
|
}
|
|
98963
|
-
const socket = new WebSocket
|
|
98963
|
+
const socket = new WebSocket(this.wsUrl, { headers: {
|
|
98964
98964
|
Authorization: `Bearer ${this.apiKey}`,
|
|
98965
98965
|
"OpenAI-Beta": "responses-websocket=v1"
|
|
98966
98966
|
} });
|
|
@@ -107209,7 +107209,7 @@ async function runWithConcurrency(tasks, limit) {
|
|
|
107209
107209
|
//#region src/media-understanding/echo-transcript.ts
|
|
107210
107210
|
let deliverRuntimePromise$1 = null;
|
|
107211
107211
|
function loadDeliverRuntime$1() {
|
|
107212
|
-
deliverRuntimePromise$1 ??= import("./deliver-runtime-
|
|
107212
|
+
deliverRuntimePromise$1 ??= import("./deliver-runtime-CjrGc3oj.js");
|
|
107213
107213
|
return deliverRuntimePromise$1;
|
|
107214
107214
|
}
|
|
107215
107215
|
function formatEchoTranscript(transcript, format) {
|
|
@@ -117162,7 +117162,7 @@ async function createModelSelectionState(params) {
|
|
|
117162
117162
|
}
|
|
117163
117163
|
}
|
|
117164
117164
|
if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
|
|
117165
|
-
const { ensureAuthProfileStore } = await import("./auth-profiles.runtime-
|
|
117165
|
+
const { ensureAuthProfileStore } = await import("./auth-profiles.runtime-BEes_Rco.js");
|
|
117166
117166
|
const profile = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }).profiles[sessionEntry.authProfileOverride];
|
|
117167
117167
|
const providerKey = normalizeProviderId(provider);
|
|
117168
117168
|
if (!profile || normalizeProviderId(profile.provider) !== providerKey) await clearSessionAuthProfileOverride({
|
|
@@ -123548,7 +123548,7 @@ const warnedContexts = /* @__PURE__ */ new Map();
|
|
|
123548
123548
|
const log$5 = createSubsystemLogger("session-maintenance-warning");
|
|
123549
123549
|
let deliverRuntimePromise = null;
|
|
123550
123550
|
function loadDeliverRuntime() {
|
|
123551
|
-
deliverRuntimePromise ??= import("./deliver-runtime-
|
|
123551
|
+
deliverRuntimePromise ??= import("./deliver-runtime-CjrGc3oj.js");
|
|
123552
123552
|
return deliverRuntimePromise;
|
|
123553
123553
|
}
|
|
123554
123554
|
function shouldSendWarning() {
|
|
@@ -129104,7 +129104,7 @@ async function resolveDiscordPreflightAudioMentionContext(params) {
|
|
|
129104
129104
|
hasTypedText
|
|
129105
129105
|
};
|
|
129106
129106
|
try {
|
|
129107
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
129107
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-CUgcQtbA.js");
|
|
129108
129108
|
if (params.abortSignal?.aborted) return {
|
|
129109
129109
|
hasAudioAttachment,
|
|
129110
129110
|
hasTypedText
|
|
@@ -135290,7 +135290,7 @@ function createGatewayPlugin(params) {
|
|
|
135290
135290
|
}
|
|
135291
135291
|
createWebSocket(url) {
|
|
135292
135292
|
if (!params.wsAgent) return super.createWebSocket(url);
|
|
135293
|
-
return new WebSocket
|
|
135293
|
+
return new WebSocket(url, { agent: params.wsAgent });
|
|
135294
135294
|
}
|
|
135295
135295
|
}
|
|
135296
135296
|
return new SafeGatewayPlugin();
|
|
@@ -136283,7 +136283,7 @@ function resolveDiscordRestFetch(proxyUrl, runtime) {
|
|
|
136283
136283
|
//#region extensions/discord/src/monitor/provider.ts
|
|
136284
136284
|
let discordVoiceRuntimePromise;
|
|
136285
136285
|
async function loadDiscordVoiceRuntime() {
|
|
136286
|
-
discordVoiceRuntimePromise ??= import("./manager.runtime-
|
|
136286
|
+
discordVoiceRuntimePromise ??= import("./manager.runtime-DbQBNTV4.js");
|
|
136287
136287
|
return await discordVoiceRuntimePromise;
|
|
136288
136288
|
}
|
|
136289
136289
|
function formatThreadBindingDurationForConfigLabel(durationMs) {
|
|
@@ -144286,15 +144286,15 @@ let slashCommandsRuntimePromise = null;
|
|
|
144286
144286
|
let slashDispatchRuntimePromise = null;
|
|
144287
144287
|
let slashSkillCommandsRuntimePromise = null;
|
|
144288
144288
|
function loadSlashCommandsRuntime() {
|
|
144289
|
-
slashCommandsRuntimePromise ??= import("./slash-commands.runtime-
|
|
144289
|
+
slashCommandsRuntimePromise ??= import("./slash-commands.runtime-eZUYakkd.js");
|
|
144290
144290
|
return slashCommandsRuntimePromise;
|
|
144291
144291
|
}
|
|
144292
144292
|
function loadSlashDispatchRuntime() {
|
|
144293
|
-
slashDispatchRuntimePromise ??= import("./slash-dispatch.runtime-
|
|
144293
|
+
slashDispatchRuntimePromise ??= import("./slash-dispatch.runtime-D7ogJeRu.js");
|
|
144294
144294
|
return slashDispatchRuntimePromise;
|
|
144295
144295
|
}
|
|
144296
144296
|
function loadSlashSkillCommandsRuntime() {
|
|
144297
|
-
slashSkillCommandsRuntimePromise ??= import("./slash-skill-commands.runtime-
|
|
144297
|
+
slashSkillCommandsRuntimePromise ??= import("./slash-skill-commands.runtime-iwoxGLKu.js");
|
|
144298
144298
|
return slashSkillCommandsRuntimePromise;
|
|
144299
144299
|
}
|
|
144300
144300
|
const slackExternalArgMenuStore = createSlackExternalArgMenuStore();
|
|
@@ -147861,7 +147861,7 @@ function getCacheStats() {
|
|
|
147861
147861
|
const STICKER_DESCRIPTION_PROMPT = "Describe this sticker image in 1-2 sentences. Focus on what the sticker depicts (character, object, action, emotion). Be concise and objective.";
|
|
147862
147862
|
let imageRuntimePromise = null;
|
|
147863
147863
|
function loadImageRuntime() {
|
|
147864
|
-
imageRuntimePromise ??= import("./image-runtime-
|
|
147864
|
+
imageRuntimePromise ??= import("./image-runtime-Cr6qZmyh.js");
|
|
147865
147865
|
return imageRuntimePromise;
|
|
147866
147866
|
}
|
|
147867
147867
|
/**
|
|
@@ -149593,7 +149593,7 @@ async function resolveTelegramInboundBody(params) {
|
|
|
149593
149593
|
const disableAudioPreflight = (topicConfig?.disableAudioPreflight ?? groupConfig?.disableAudioPreflight) === true;
|
|
149594
149594
|
let preflightTranscript;
|
|
149595
149595
|
if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0 && !disableAudioPreflight) try {
|
|
149596
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
149596
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-CUgcQtbA.js");
|
|
149597
149597
|
preflightTranscript = await transcribeFirstAudio({
|
|
149598
149598
|
ctx: {
|
|
149599
149599
|
MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
|
|
@@ -156065,23 +156065,23 @@ let webOutboundPromise = null;
|
|
|
156065
156065
|
let webLoginPromise = null;
|
|
156066
156066
|
let whatsappActionsPromise = null;
|
|
156067
156067
|
function loadWebOutbound() {
|
|
156068
|
-
webOutboundPromise ??= import("./runtime-whatsapp-outbound.runtime-
|
|
156068
|
+
webOutboundPromise ??= import("./runtime-whatsapp-outbound.runtime-BKesQQli.js");
|
|
156069
156069
|
return webOutboundPromise;
|
|
156070
156070
|
}
|
|
156071
156071
|
function loadWebLogin() {
|
|
156072
|
-
webLoginPromise ??= import("./runtime-whatsapp-login.runtime-
|
|
156072
|
+
webLoginPromise ??= import("./runtime-whatsapp-login.runtime-6yfwX0nq.js");
|
|
156073
156073
|
return webLoginPromise;
|
|
156074
156074
|
}
|
|
156075
156075
|
function loadWebLoginQr() {
|
|
156076
|
-
webLoginQrPromise ??= import("./login-qr-
|
|
156076
|
+
webLoginQrPromise ??= import("./login-qr-Djgtmdpd.js");
|
|
156077
156077
|
return webLoginQrPromise;
|
|
156078
156078
|
}
|
|
156079
156079
|
function loadWebChannel() {
|
|
156080
|
-
webChannelPromise ??= import("./web-
|
|
156080
|
+
webChannelPromise ??= import("./web-Bl0ih6N1.js");
|
|
156081
156081
|
return webChannelPromise;
|
|
156082
156082
|
}
|
|
156083
156083
|
function loadWhatsAppActions() {
|
|
156084
|
-
whatsappActionsPromise ??= import("./whatsapp-actions-
|
|
156084
|
+
whatsappActionsPromise ??= import("./whatsapp-actions-Cpf6YROk.js");
|
|
156085
156085
|
return whatsappActionsPromise;
|
|
156086
156086
|
}
|
|
156087
156087
|
function createRuntimeWhatsApp() {
|
package/dist/line/send.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as pushTemplateMessage, C as getUserDisplayName, D as pushLocationMessage, E as pushImageMessage, M as replyMessageLine, N as sendMessageLine, O as pushMessageLine, P as showLoadingAnimation, S as createTextMessageWithQuickReplies, T as pushFlexMessage, b as createLocationMessage, j as pushTextMessageWithQuickReplies, k as pushMessagesLine, v as createFlexMessage, w as getUserProfile, x as createQuickReplyItems, y as createImageMessage } from "../discord-
|
|
1
|
+
import { A as pushTemplateMessage, C as getUserDisplayName, D as pushLocationMessage, E as pushImageMessage, M as replyMessageLine, N as sendMessageLine, O as pushMessageLine, P as showLoadingAnimation, S as createTextMessageWithQuickReplies, T as pushFlexMessage, b as createLocationMessage, j as pushTextMessageWithQuickReplies, k as pushMessagesLine, v as createFlexMessage, w as getUserProfile, x as createQuickReplyItems, y as createImageMessage } from "../discord-DKZdsbTR.js";
|
|
2
2
|
import "../accounts-D5tcOoP8.js";
|
|
3
3
|
import "../token-DI5_CK8b.js";
|
|
4
4
|
import "../query-expansion-Dpf_vNBe.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Ni as formatCliCommand, Nr as resolveWhatsAppAccount, Rr as logoutWeb, r as loadConfig } from "./discord-
|
|
1
|
+
import { Ni as formatCliCommand, Nr as resolveWhatsAppAccount, Rr as logoutWeb, r as loadConfig } from "./discord-DKZdsbTR.js";
|
|
2
2
|
import { T as info, j as success, w as danger } from "./utils-BBQx0yHF.js";
|
|
3
3
|
import { l as defaultRuntime, r as logInfo } from "./logger-DLTnPbcB.js";
|
|
4
|
-
import { i as waitForWaConnection, n as formatError, t as createWaSocket } from "./session-
|
|
4
|
+
import { i as waitForWaConnection, n as formatError, t as createWaSocket } from "./session-D0j0Q_PW.js";
|
|
5
5
|
import { DisconnectReason } from "@whiskeysockets/baileys";
|
|
6
6
|
//#region extensions/whatsapp/src/login.ts
|
|
7
7
|
async function loginWeb(verbose, waitForConnection, runtime = defaultRuntime, accountId) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Hr as readWebSelfId, Kr as webAuthExists, Nr as resolveWhatsAppAccount, Rr as logoutWeb, r as loadConfig } from "./discord-
|
|
1
|
+
import { Hr as readWebSelfId, Kr as webAuthExists, Nr as resolveWhatsAppAccount, Rr as logoutWeb, r as loadConfig } from "./discord-DKZdsbTR.js";
|
|
2
2
|
import "./accounts-D5tcOoP8.js";
|
|
3
3
|
import "./token-DI5_CK8b.js";
|
|
4
4
|
import "./query-expansion-Dpf_vNBe.js";
|
|
@@ -8,7 +8,7 @@ import { l as defaultRuntime, r as logInfo } from "./logger-DLTnPbcB.js";
|
|
|
8
8
|
import "./fetch-CeMD-RCB.js";
|
|
9
9
|
import "./github-copilot-token-BLZmlHiy.js";
|
|
10
10
|
import "./secret-file-y2u902kb.js";
|
|
11
|
-
import { i as waitForWaConnection, n as formatError, r as getStatusCode, t as createWaSocket } from "./session-
|
|
11
|
+
import { i as waitForWaConnection, n as formatError, r as getStatusCode, t as createWaSocket } from "./session-D0j0Q_PW.js";
|
|
12
12
|
import { randomUUID } from "node:crypto";
|
|
13
13
|
import { DisconnectReason } from "@whiskeysockets/baileys";
|
|
14
14
|
import QRCodeModule from "qrcode-terminal/vendor/QRCode/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Cn as MemoryIndexManager, wn as closeAllMemoryIndexManagers } from "./discord-
|
|
1
|
+
import { Cn as MemoryIndexManager, wn as closeAllMemoryIndexManagers } from "./discord-DKZdsbTR.js";
|
|
2
2
|
import "./accounts-D5tcOoP8.js";
|
|
3
3
|
import "./token-DI5_CK8b.js";
|
|
4
4
|
import "./query-expansion-Dpf_vNBe.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $n as parseTtsDirectives, $r as isGatewayMessageChannel, Ai as buildWorkspaceSkillSnapshot, Ar as getChannelPlugin, Bi as DEFAULT_MODEL, Bt as resolveAcpDispatchPolicyError, Cr as evaluateSessionFreshness, Dn as isSilentReplyText, Dr as mergeSessionEntry, En as isSilentReplyPrefixText, Er as resolveSessionResetType, Fi as formatXHighModelHint, Ft as clearAgentRunContext, Gt as hasNonzeroUsage, Hn as resolveAgentRoute, Ht as AGENT_LANE_SUBAGENT, Ii as normalizeThinkLevel, It as emitAgentEvent, Kn as resolveDiscordOwnerAccess, Kt as resolveContextTokensForModel, Li as normalizeVerboseLevel, Lt as registerAgentRunContext, Mi as ensureAuthProfileStore, Mt as resolveAgentTimeoutMs, Ni as formatCliCommand, Nt as formatAgentInternalEventsForPrompt, On as getAcpSessionManager, Or as setSessionRuntimeModel, Pi as formatThinkingLevels, Pt as normalizeSpawnedRunMetadata, Qn as textToSpeech, Qr as isDeliverableMessageChannel, Ri as supportsXHighThinking, Rt as resolveAcpSessionCwd, Si as formatErrorMessage, Sr as resolveSessionKey, St as resolveBootstrapWarningSignaturesSeen, Tr as resolveSessionResetPolicy, U as formatMention, Ut as applyModelOverrideToSessionEntry, Vi as DEFAULT_PROVIDER, Vt as AGENT_LANE_NESTED, Wt as deriveSessionTotalTokens, Xt as normalizeReplyPayload, Z as isDangerousNameMatchingEnabled, Zn as resolveTtsConfig, Zr as INTERNAL_MESSAGE_CHANNEL, _n as runWithModelFallback, _r as loadSessionStore, a as setRuntimeConfigSnapshot, an as buildOutboundSessionContext, ar as buildProviderRegistry, at as setCliSessionId, bn as clearBootstrapSnapshotOnSessionRollover, br as updateSessionStore, bt as runEmbeddedPiAgent, c as modelKey, cn as normalizeOutboundPayloads, d as resolveConfiguredModelRef, dt as clearSessionAuthProfileOverride, ei as isInternalMessageChannel, f as resolveDefaultModelForAgent, gr as emitSessionTranscriptUpdate, h as resolveCommandSecretRefsViaGateway, hn as resolveMessageChannelSelection, hr as resolveSessionTranscriptFile, i as readConfigFileSnapshotForWrite, in as resolveSessionDeliveryTarget, it as getCliSessionId, jr as normalizeChannelId, kn as toAcpRuntimeError, kr as resolveExplicitAgentSessionKey, l as normalizeModelRef, ln as normalizeOutboundPayloadsForJson, lr as runCapability, lt as getRemoteSkillEligibility, m as getAgentRuntimeCommandSecretTargetIds, mr as loadModelCatalog, ni as resolveMessageChannel, o as buildAllowedModelSet, on as deliverOutboundPayloads, or as createMediaAttachmentCache, ot as runCliAgent, p as resolveThinkingDefault, pt as resolveSendPolicy, qn as formatDiscordUserTag, r as loadConfig, rn as resolveOutboundTarget, s as isCliProvider, sn as formatOutboundPayloadLog, sr as normalizeMediaAttachments, st as applyVerboseOverride, ti as normalizeMessageChannel, u as normalizeProviderId, ut as getSkillsSnapshotVersion, vn as FailoverError, wr as resolveChannelResetConfig, xr as normalizeAccountId, xt as prepareSessionManagerForRun, zt as resolveAcpAgentPolicyError } from "./discord-
|
|
1
|
+
import { $n as parseTtsDirectives, $r as isGatewayMessageChannel, Ai as buildWorkspaceSkillSnapshot, Ar as getChannelPlugin, Bi as DEFAULT_MODEL, Bt as resolveAcpDispatchPolicyError, Cr as evaluateSessionFreshness, Dn as isSilentReplyText, Dr as mergeSessionEntry, En as isSilentReplyPrefixText, Er as resolveSessionResetType, Fi as formatXHighModelHint, Ft as clearAgentRunContext, Gt as hasNonzeroUsage, Hn as resolveAgentRoute, Ht as AGENT_LANE_SUBAGENT, Ii as normalizeThinkLevel, It as emitAgentEvent, Kn as resolveDiscordOwnerAccess, Kt as resolveContextTokensForModel, Li as normalizeVerboseLevel, Lt as registerAgentRunContext, Mi as ensureAuthProfileStore, Mt as resolveAgentTimeoutMs, Ni as formatCliCommand, Nt as formatAgentInternalEventsForPrompt, On as getAcpSessionManager, Or as setSessionRuntimeModel, Pi as formatThinkingLevels, Pt as normalizeSpawnedRunMetadata, Qn as textToSpeech, Qr as isDeliverableMessageChannel, Ri as supportsXHighThinking, Rt as resolveAcpSessionCwd, Si as formatErrorMessage, Sr as resolveSessionKey, St as resolveBootstrapWarningSignaturesSeen, Tr as resolveSessionResetPolicy, U as formatMention, Ut as applyModelOverrideToSessionEntry, Vi as DEFAULT_PROVIDER, Vt as AGENT_LANE_NESTED, Wt as deriveSessionTotalTokens, Xt as normalizeReplyPayload, Z as isDangerousNameMatchingEnabled, Zn as resolveTtsConfig, Zr as INTERNAL_MESSAGE_CHANNEL, _n as runWithModelFallback, _r as loadSessionStore, a as setRuntimeConfigSnapshot, an as buildOutboundSessionContext, ar as buildProviderRegistry, at as setCliSessionId, bn as clearBootstrapSnapshotOnSessionRollover, br as updateSessionStore, bt as runEmbeddedPiAgent, c as modelKey, cn as normalizeOutboundPayloads, d as resolveConfiguredModelRef, dt as clearSessionAuthProfileOverride, ei as isInternalMessageChannel, f as resolveDefaultModelForAgent, gr as emitSessionTranscriptUpdate, h as resolveCommandSecretRefsViaGateway, hn as resolveMessageChannelSelection, hr as resolveSessionTranscriptFile, i as readConfigFileSnapshotForWrite, in as resolveSessionDeliveryTarget, it as getCliSessionId, jr as normalizeChannelId, kn as toAcpRuntimeError, kr as resolveExplicitAgentSessionKey, l as normalizeModelRef, ln as normalizeOutboundPayloadsForJson, lr as runCapability, lt as getRemoteSkillEligibility, m as getAgentRuntimeCommandSecretTargetIds, mr as loadModelCatalog, ni as resolveMessageChannel, o as buildAllowedModelSet, on as deliverOutboundPayloads, or as createMediaAttachmentCache, ot as runCliAgent, p as resolveThinkingDefault, pt as resolveSendPolicy, qn as formatDiscordUserTag, r as loadConfig, rn as resolveOutboundTarget, s as isCliProvider, sn as formatOutboundPayloadLog, sr as normalizeMediaAttachments, st as applyVerboseOverride, ti as normalizeMessageChannel, u as normalizeProviderId, ut as getSkillsSnapshotVersion, vn as FailoverError, wr as resolveChannelResetConfig, xr as normalizeAccountId, xt as prepareSessionManagerForRun, zt as resolveAcpAgentPolicyError } from "./discord-DKZdsbTR.js";
|
|
2
2
|
import { c as normalizeAgentId, l as normalizeMainKey, u as resolveAgentIdFromSessionKey } from "./session-key-CyBSOnfu.js";
|
|
3
3
|
import "./accounts-D5tcOoP8.js";
|
|
4
4
|
import "./token-DI5_CK8b.js";
|
|
@@ -69,12 +69,12 @@ function createLazySender(channelId, loader, exportName) {
|
|
|
69
69
|
}
|
|
70
70
|
function createDefaultDeps() {
|
|
71
71
|
return {
|
|
72
|
-
whatsapp: createLazySender("whatsapp", () => import("./web-
|
|
73
|
-
telegram: createLazySender("telegram", () => import("./discord-
|
|
74
|
-
discord: createLazySender("discord", () => import("./discord-
|
|
75
|
-
slack: createLazySender("slack", () => import("./discord-
|
|
76
|
-
signal: createLazySender("signal", () => import("./discord-
|
|
77
|
-
imessage: createLazySender("imessage", () => import("./discord-
|
|
72
|
+
whatsapp: createLazySender("whatsapp", () => import("./web-Bl0ih6N1.js"), "sendMessageWhatsApp"),
|
|
73
|
+
telegram: createLazySender("telegram", () => import("./discord-DKZdsbTR.js").then((n) => n.z), "sendMessageTelegram"),
|
|
74
|
+
discord: createLazySender("discord", () => import("./discord-DKZdsbTR.js").then((n) => n.n), "sendMessageDiscord"),
|
|
75
|
+
slack: createLazySender("slack", () => import("./discord-DKZdsbTR.js").then((n) => n.V), "sendMessageSlack"),
|
|
76
|
+
signal: createLazySender("signal", () => import("./discord-DKZdsbTR.js").then((n) => n.un), "sendMessageSignal"),
|
|
77
|
+
imessage: createLazySender("imessage", () => import("./discord-DKZdsbTR.js").then((n) => n.H), "sendMessageIMessage")
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
//#endregion
|
package/dist/{pi-model-discovery-runtime-Do-8n2s8.js → pi-model-discovery-runtime-BujN_d1_.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { er as PiAuthStorageClass, nr as discoverAuthStorage, rr as discoverModels, tr as PiModelRegistryClass } from "./discord-
|
|
1
|
+
import { er as PiAuthStorageClass, nr as discoverAuthStorage, rr as discoverModels, tr as PiModelRegistryClass } from "./discord-DKZdsbTR.js";
|
|
2
2
|
import "./accounts-D5tcOoP8.js";
|
|
3
3
|
import "./token-DI5_CK8b.js";
|
|
4
4
|
import "./query-expansion-Dpf_vNBe.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Sn as getDiagnosticSessionState, xn as logToolLoopAction } from "./discord-
|
|
1
|
+
import { Sn as getDiagnosticSessionState, xn as logToolLoopAction } from "./discord-DKZdsbTR.js";
|
|
2
2
|
import "./accounts-D5tcOoP8.js";
|
|
3
3
|
import "./token-DI5_CK8b.js";
|
|
4
4
|
import "./query-expansion-Dpf_vNBe.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ci as matchBrowserUrlPattern, Di as assertBrowserNavigationRedirectChainAllowed, Ei as assertBrowserNavigationAllowed, Ni as formatCliCommand, Oi as assertBrowserNavigationResultAllowed, Si as formatErrorMessage, Ti as BrowserTabNotFoundError, _i as withNoProxyForCdpUrl, ai as getRoleSnapshotStats, bi as DEFAULT_UPLOAD_DIR, ci as normalizeCdpWsUrl, di as getHeadersWithAuth, fi as normalizeCdpHttpBaseForJsonEndpoints, gi as markPwAiLoaded, hi as getChromeWebSocketUrl, ii as buildRoleSnapshotFromAriaSnapshot, ki as withBrowserNavigationPolicy, li as appendCdpPath, oi as parseRoleRef, pi as withCdpSocket, ri as buildRoleSnapshotFromAiSnapshot, si as formatAriaSnapshot, ui as fetchJson, xi as resolveStrictExistingPathsWithinRoot, yi as DEFAULT_TRACE_DIR } from "./discord-
|
|
1
|
+
import { Ci as matchBrowserUrlPattern, Di as assertBrowserNavigationRedirectChainAllowed, Ei as assertBrowserNavigationAllowed, Ni as formatCliCommand, Oi as assertBrowserNavigationResultAllowed, Si as formatErrorMessage, Ti as BrowserTabNotFoundError, _i as withNoProxyForCdpUrl, ai as getRoleSnapshotStats, bi as DEFAULT_UPLOAD_DIR, ci as normalizeCdpWsUrl, di as getHeadersWithAuth, fi as normalizeCdpHttpBaseForJsonEndpoints, gi as markPwAiLoaded, hi as getChromeWebSocketUrl, ii as buildRoleSnapshotFromAriaSnapshot, ki as withBrowserNavigationPolicy, li as appendCdpPath, oi as parseRoleRef, pi as withCdpSocket, ri as buildRoleSnapshotFromAiSnapshot, si as formatAriaSnapshot, ui as fetchJson, xi as resolveStrictExistingPathsWithinRoot, yi as DEFAULT_TRACE_DIR } from "./discord-DKZdsbTR.js";
|
|
2
2
|
import "./accounts-D5tcOoP8.js";
|
|
3
3
|
import "./token-DI5_CK8b.js";
|
|
4
4
|
import { J as writeFileFromPathWithinRoot } from "./query-expansion-Dpf_vNBe.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./discord-
|
|
1
|
+
import "./discord-DKZdsbTR.js";
|
|
2
2
|
import "./accounts-D5tcOoP8.js";
|
|
3
3
|
import "./token-DI5_CK8b.js";
|
|
4
4
|
import "./query-expansion-Dpf_vNBe.js";
|
|
@@ -8,6 +8,6 @@ import "./logger-DLTnPbcB.js";
|
|
|
8
8
|
import "./fetch-CeMD-RCB.js";
|
|
9
9
|
import "./github-copilot-token-BLZmlHiy.js";
|
|
10
10
|
import "./secret-file-y2u902kb.js";
|
|
11
|
-
import "./session-
|
|
12
|
-
import { t as loginWeb } from "./login-
|
|
11
|
+
import "./session-D0j0Q_PW.js";
|
|
12
|
+
import { t as loginWeb } from "./login-CIjIxi5t.js";
|
|
13
13
|
export { loginWeb };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./discord-
|
|
1
|
+
import "./discord-DKZdsbTR.js";
|
|
2
2
|
import "./accounts-D5tcOoP8.js";
|
|
3
3
|
import "./token-DI5_CK8b.js";
|
|
4
4
|
import "./query-expansion-Dpf_vNBe.js";
|
|
@@ -8,5 +8,5 @@ import "./logger-DLTnPbcB.js";
|
|
|
8
8
|
import "./fetch-CeMD-RCB.js";
|
|
9
9
|
import "./github-copilot-token-BLZmlHiy.js";
|
|
10
10
|
import "./secret-file-y2u902kb.js";
|
|
11
|
-
import { n as sendPollWhatsApp, t as sendMessageWhatsApp } from "./send-
|
|
11
|
+
import { n as sendPollWhatsApp, t as sendMessageWhatsApp } from "./send-pxKoZnv6.js";
|
|
12
12
|
export { sendMessageWhatsApp, sendPollWhatsApp };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Nr as resolveWhatsAppAccount, Pr as resolveWhatsAppMediaMaxBytes, X as convertMarkdownTables, dn as resolveMarkdownTableMode, g as requireActiveWebListener, gn as normalizePollInput, ji as redactIdentifier, mi as generateSecureUuid, r as loadConfig, yn as loadWebMedia } from "./discord-
|
|
1
|
+
import { Nr as resolveWhatsAppAccount, Pr as resolveWhatsAppMediaMaxBytes, X as convertMarkdownTables, dn as resolveMarkdownTableMode, g as requireActiveWebListener, gn as normalizePollInput, ji as redactIdentifier, mi as generateSecureUuid, r as loadConfig, yn as loadWebMedia } from "./discord-DKZdsbTR.js";
|
|
2
2
|
import { I as getChildLogger, o as escapeRegExp, x as toWhatsappJid } from "./utils-BBQx0yHF.js";
|
|
3
3
|
import { a as createSubsystemLogger } from "./logger-DLTnPbcB.js";
|
|
4
4
|
//#region src/markdown/whatsapp.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Gr as resolveWebCredsPath, Hi as VERSION, Ni as formatCliCommand, Ur as resolveDefaultWebAuthDir, Vr as readCredsJsonRaw, Wr as resolveWebCredsBackupPath, zr as maybeRestoreCredsFromBackup } from "./discord-
|
|
1
|
+
import { Gr as resolveWebCredsPath, Hi as VERSION, Ni as formatCliCommand, Ur as resolveDefaultWebAuthDir, Vr as readCredsJsonRaw, Wr as resolveWebCredsBackupPath, zr as maybeRestoreCredsFromBackup } from "./discord-DKZdsbTR.js";
|
|
2
2
|
import { I as getChildLogger, a as ensureDir, h as resolveUserPath, j as success, w as danger, z as toPinoLikeLogger } from "./utils-BBQx0yHF.js";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import "node:crypto";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { An as buildCommandTextFromArgs, Mn as listNativeCommandSpecsForConfig, Nn as parseCommandArgs, Pn as resolveCommandArgMenu, jn as findCommandByNativeName } from "./discord-
|
|
1
|
+
import { An as buildCommandTextFromArgs, Mn as listNativeCommandSpecsForConfig, Nn as parseCommandArgs, Pn as resolveCommandArgMenu, jn as findCommandByNativeName } from "./discord-DKZdsbTR.js";
|
|
2
2
|
import "./accounts-D5tcOoP8.js";
|
|
3
3
|
import "./token-DI5_CK8b.js";
|
|
4
4
|
import "./query-expansion-Dpf_vNBe.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as deliverSlackSlashReplies, Hn as resolveAgentRoute, K as dispatchReplyWithDispatcher, Q as createReplyPrefixOptions, R as recordInboundSessionMetaSafe, Yr as resolveConversationLabel, dn as resolveMarkdownTableMode, ft as finalizeInboundContext, pn as resolveChunkMode } from "./discord-
|
|
1
|
+
import { B as deliverSlackSlashReplies, Hn as resolveAgentRoute, K as dispatchReplyWithDispatcher, Q as createReplyPrefixOptions, R as recordInboundSessionMetaSafe, Yr as resolveConversationLabel, dn as resolveMarkdownTableMode, ft as finalizeInboundContext, pn as resolveChunkMode } from "./discord-DKZdsbTR.js";
|
|
2
2
|
import "./accounts-D5tcOoP8.js";
|
|
3
3
|
import "./token-DI5_CK8b.js";
|
|
4
4
|
import "./query-expansion-Dpf_vNBe.js";
|
package/dist/{subagent-registry-runtime-CNgez4Yd.js → subagent-registry-runtime-BPxjP8o9.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { At as resolveRequesterForChildSession, Dt as isSubagentSessionRunActive, Et as countPendingDescendantRunsExcludingRun, Ot as listSubagentRunsForRequester, Tt as countPendingDescendantRuns, jt as shouldIgnorePostCompletionAnnounceForSession, kt as replaceSubagentRunAfterSteer, wt as countActiveDescendantRuns } from "./discord-
|
|
1
|
+
import { At as resolveRequesterForChildSession, Dt as isSubagentSessionRunActive, Et as countPendingDescendantRunsExcludingRun, Ot as listSubagentRunsForRequester, Tt as countPendingDescendantRuns, jt as shouldIgnorePostCompletionAnnounceForSession, kt as replaceSubagentRunAfterSteer, wt as countActiveDescendantRuns } from "./discord-DKZdsbTR.js";
|
|
2
2
|
import "./accounts-D5tcOoP8.js";
|
|
3
3
|
import "./token-DI5_CK8b.js";
|
|
4
4
|
import "./query-expansion-Dpf_vNBe.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as shouldAckReactionForWhatsApp, $t as normalizeGroupActivation, Bn as buildAgentSessionKey, Br as pickWebChannel, F as resolveInboundSessionEnvelopeContext, Fn as readStoreAllowFromForDmPolicy, Fr as WA_WEB_AUTH_DIR, G as dispatchReplyWithBufferedBlockDispatcher, Gn as formatDurationPrecise, Hn as resolveAgentRoute, Hr as readWebSelfId, In as resolveDmGroupAccessWithCommandGate, Ir as getWebAuthAgeMs, J as recordChannelActivity, Jn as resolveDefaultGroupPolicy, Jr as resolveChannelGroupRequireMention, Jt as sleepWithAbort, Kr as webAuthExists, Ln as resolveDmGroupAccessWithLists, Lr as logWebSelfId, Ni as formatCliCommand, Nr as resolveWhatsAppAccount, Pr as resolveWhatsAppMediaMaxBytes, Q as createReplyPrefixOptions, Qt as resolveMessagePrefix, Rn as resolvePinnedMainDmOwnerFromAllowlist, Un as resolveInboundLastRouteSessionKey, Vn as deriveLastRoutePolicy, W as createConnectedChannelStatusPatch, Wn as enqueueSystemEvent, X as convertMarkdownTables, Xn as warnMissingProviderGroupPolicyFallbackOnce, Xr as resolveGroupSessionKey, Y as resolveMentionGating, Yn as resolveOpenProviderRuntimeGroupPolicy, Yt as createDedupeCache, Zt as resolveIdentityNamePrefix, _ as setActiveWebListener, _r as loadSessionStore, _t as shouldComputeCommandAuthorized, dn as resolveMarkdownTableMode, dr as registerUnhandledRejectionHandler, en as parseActivationCommand, et as buildHistoryContextFromEntries, fn as chunkMarkdownTextWithMode, ft as finalizeInboundContext, gt as hasControlCommand, ht as resolveInboundDebounceMs, mn as resolveTextChunkLimit, mt as createInboundDebouncer, nn as toLocationContext, nt as formatInboundEnvelope, pn as resolveChunkMode, pr as getAgentScopedMediaLocalRoots, q as issuePairingChallenge, qr as resolveChannelGroupPolicy, qt as computeBackoff, r as loadConfig, rt as getReplyFromConfig, tn as formatLocationText, tt as recordPendingHistoryEntryIfEnabled, vi as saveMediaBuffer, vr as recordSessionMetaFromInbound, vt as buildMentionRegexes, yn as loadWebMedia, yr as updateLastRoute, yt as normalizeMentionText, zn as upsertChannelPairingRequest } from "./discord-
|
|
1
|
+
import { $ as shouldAckReactionForWhatsApp, $t as normalizeGroupActivation, Bn as buildAgentSessionKey, Br as pickWebChannel, F as resolveInboundSessionEnvelopeContext, Fn as readStoreAllowFromForDmPolicy, Fr as WA_WEB_AUTH_DIR, G as dispatchReplyWithBufferedBlockDispatcher, Gn as formatDurationPrecise, Hn as resolveAgentRoute, Hr as readWebSelfId, In as resolveDmGroupAccessWithCommandGate, Ir as getWebAuthAgeMs, J as recordChannelActivity, Jn as resolveDefaultGroupPolicy, Jr as resolveChannelGroupRequireMention, Jt as sleepWithAbort, Kr as webAuthExists, Ln as resolveDmGroupAccessWithLists, Lr as logWebSelfId, Ni as formatCliCommand, Nr as resolveWhatsAppAccount, Pr as resolveWhatsAppMediaMaxBytes, Q as createReplyPrefixOptions, Qt as resolveMessagePrefix, Rn as resolvePinnedMainDmOwnerFromAllowlist, Un as resolveInboundLastRouteSessionKey, Vn as deriveLastRoutePolicy, W as createConnectedChannelStatusPatch, Wn as enqueueSystemEvent, X as convertMarkdownTables, Xn as warnMissingProviderGroupPolicyFallbackOnce, Xr as resolveGroupSessionKey, Y as resolveMentionGating, Yn as resolveOpenProviderRuntimeGroupPolicy, Yt as createDedupeCache, Zt as resolveIdentityNamePrefix, _ as setActiveWebListener, _r as loadSessionStore, _t as shouldComputeCommandAuthorized, dn as resolveMarkdownTableMode, dr as registerUnhandledRejectionHandler, en as parseActivationCommand, et as buildHistoryContextFromEntries, fn as chunkMarkdownTextWithMode, ft as finalizeInboundContext, gt as hasControlCommand, ht as resolveInboundDebounceMs, mn as resolveTextChunkLimit, mt as createInboundDebouncer, nn as toLocationContext, nt as formatInboundEnvelope, pn as resolveChunkMode, pr as getAgentScopedMediaLocalRoots, q as issuePairingChallenge, qr as resolveChannelGroupPolicy, qt as computeBackoff, r as loadConfig, rt as getReplyFromConfig, tn as formatLocationText, tt as recordPendingHistoryEntryIfEnabled, vi as saveMediaBuffer, vr as recordSessionMetaFromInbound, vt as buildMentionRegexes, yn as loadWebMedia, yr as updateLastRoute, yt as normalizeMentionText, zn as upsertChannelPairingRequest } from "./discord-DKZdsbTR.js";
|
|
2
2
|
import { a as buildGroupHistoryKey, c as normalizeAgentId, n as DEFAULT_MAIN_KEY, r as buildAgentMainSessionKey } from "./session-key-CyBSOnfu.js";
|
|
3
3
|
import "./accounts-D5tcOoP8.js";
|
|
4
4
|
import "./token-DI5_CK8b.js";
|
|
@@ -9,9 +9,9 @@ import { a as createSubsystemLogger, l as defaultRuntime } from "./logger-DLTnPb
|
|
|
9
9
|
import "./fetch-CeMD-RCB.js";
|
|
10
10
|
import "./github-copilot-token-BLZmlHiy.js";
|
|
11
11
|
import "./secret-file-y2u902kb.js";
|
|
12
|
-
import { i as waitForWaConnection, n as formatError, r as getStatusCode, t as createWaSocket } from "./session-
|
|
13
|
-
import { i as markdownToWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./send-
|
|
14
|
-
import { t as loginWeb } from "./login-
|
|
12
|
+
import { i as waitForWaConnection, n as formatError, r as getStatusCode, t as createWaSocket } from "./session-D0j0Q_PW.js";
|
|
13
|
+
import { i as markdownToWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./send-pxKoZnv6.js";
|
|
14
|
+
import { t as loginWeb } from "./login-CIjIxi5t.js";
|
|
15
15
|
import { randomUUID } from "node:crypto";
|
|
16
16
|
import { DisconnectReason, downloadMediaMessage, extractMessageContent, getContentType, isJidGroup, normalizeMessageContent } from "@whiskeysockets/baileys";
|
|
17
17
|
const DEFAULT_RECONNECT_POLICY = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Gi as jsonResult, Ki as readReactionParams, Mr as resolveWhatsAppOutboundTarget, Nr as resolveWhatsAppAccount, Ui as ToolAuthorizationError, Wi as createActionGate, qi as readStringParam } from "./discord-
|
|
1
|
+
import { Gi as jsonResult, Ki as readReactionParams, Mr as resolveWhatsAppOutboundTarget, Nr as resolveWhatsAppAccount, Ui as ToolAuthorizationError, Wi as createActionGate, qi as readStringParam } from "./discord-DKZdsbTR.js";
|
|
2
2
|
import "./accounts-D5tcOoP8.js";
|
|
3
3
|
import "./token-DI5_CK8b.js";
|
|
4
4
|
import "./query-expansion-Dpf_vNBe.js";
|
|
@@ -8,7 +8,7 @@ import "./logger-DLTnPbcB.js";
|
|
|
8
8
|
import "./fetch-CeMD-RCB.js";
|
|
9
9
|
import "./github-copilot-token-BLZmlHiy.js";
|
|
10
10
|
import "./secret-file-y2u902kb.js";
|
|
11
|
-
import { r as sendReactionWhatsApp } from "./send-
|
|
11
|
+
import { r as sendReactionWhatsApp } from "./send-pxKoZnv6.js";
|
|
12
12
|
//#region src/agents/tools/whatsapp-target-auth.ts
|
|
13
13
|
function resolveAuthorizedWhatsAppOutboundTarget(params) {
|
|
14
14
|
const account = resolveWhatsAppAccount({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openclaw-multi-auto",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.7",
|
|
4
4
|
"description": "Multi-channel AI gateway with extensible messaging integrations",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"homepage": "https://github.com/openclaw/openclaw#readme",
|
|
@@ -368,6 +368,7 @@
|
|
|
368
368
|
"@slack/bolt": "^4.6.0",
|
|
369
369
|
"@slack/web-api": "^7.15.0",
|
|
370
370
|
"@whiskeysockets/baileys": "7.0.0-rc.9",
|
|
371
|
+
"@whiskeysockets/libsignal-node": "npm:@openclaw-cn/libsignal@2.0.1",
|
|
371
372
|
"ajv": "^8.18.0",
|
|
372
373
|
"chalk": "^5.6.2",
|
|
373
374
|
"chokidar": "^5.0.0",
|
|
@@ -385,6 +386,7 @@
|
|
|
385
386
|
"jiti": "^2.6.1",
|
|
386
387
|
"json5": "^2.2.3",
|
|
387
388
|
"jszip": "^3.10.1",
|
|
389
|
+
"libsignal": "npm:@openclaw-cn/libsignal@2.0.1",
|
|
388
390
|
"linkedom": "^0.18.12",
|
|
389
391
|
"long": "^5.3.2",
|
|
390
392
|
"markdown-it": "^14.1.1",
|
|
@@ -401,9 +403,7 @@
|
|
|
401
403
|
"undici": "^7.24.1",
|
|
402
404
|
"ws": "^8.19.0",
|
|
403
405
|
"yaml": "^2.8.2",
|
|
404
|
-
"zod": "^4.3.6"
|
|
405
|
-
"@whiskeysockets/libsignal-node": "npm:@openclaw-cn/libsignal@2.0.1",
|
|
406
|
-
"libsignal": "npm:@openclaw-cn/libsignal@2.0.1"
|
|
406
|
+
"zod": "^4.3.6"
|
|
407
407
|
},
|
|
408
408
|
"devDependencies": {
|
|
409
409
|
"@grammyjs/types": "^3.25.0",
|
|
@@ -437,6 +437,10 @@
|
|
|
437
437
|
"optional": true
|
|
438
438
|
}
|
|
439
439
|
},
|
|
440
|
+
"overrides": {
|
|
441
|
+
"libsignal": "npm:@openclaw-cn/libsignal@2.0.1",
|
|
442
|
+
"@whiskeysockets/libsignal-node": "npm:@openclaw-cn/libsignal@2.0.1"
|
|
443
|
+
},
|
|
440
444
|
"engines": {
|
|
441
445
|
"node": ">=22.16.0"
|
|
442
446
|
},
|
|
@@ -467,9 +471,5 @@
|
|
|
467
471
|
}
|
|
468
472
|
}
|
|
469
473
|
}
|
|
470
|
-
},
|
|
471
|
-
"overrides": {
|
|
472
|
-
"libsignal": "npm:@openclaw-cn/libsignal@2.0.1",
|
|
473
|
-
"@whiskeysockets/libsignal-node": "npm:@openclaw-cn/libsignal@2.0.1"
|
|
474
474
|
}
|
|
475
475
|
}
|
|
@@ -50,6 +50,12 @@ fi
|
|
|
50
50
|
# 实例基础目录:~/openclaws
|
|
51
51
|
INSTANCES_BASE="$HOME/openclaws"
|
|
52
52
|
|
|
53
|
+
# 实例根目录
|
|
54
|
+
INSTANCE_DIR="$INSTANCES_BASE/${INSTANCE_NAME}"
|
|
55
|
+
|
|
56
|
+
# dist 目录:实例根目录(不使用子目录,避免 root-alias.cjs 路径解析问题)
|
|
57
|
+
DIST_DIR="${INSTANCE_DIR}"
|
|
58
|
+
|
|
53
59
|
# --- 2. 获取实例名称 ---
|
|
54
60
|
INSTANCE_NAME="${1:-}"
|
|
55
61
|
if [ -z "$INSTANCE_NAME" ]; then
|
|
@@ -67,7 +73,6 @@ fi
|
|
|
67
73
|
|
|
68
74
|
# --- 4. 定义实例目录并清理旧残留 ---
|
|
69
75
|
INSTANCE_DIR="$INSTANCES_BASE/${INSTANCE_NAME}"
|
|
70
|
-
DIST_DIR="${INSTANCE_DIR}/dist"
|
|
71
76
|
|
|
72
77
|
echo -e "${BLUE}🏗️ 正在深度初始化实例: ${INSTANCE_NAME} (端口 ${PORT})${NC}"
|
|
73
78
|
echo "SOURCE_CODE = $SOURCE_CODE"
|
|
@@ -99,17 +104,16 @@ else
|
|
|
99
104
|
echo -e "${YELLOW}⚠️ 未找到 package.json,使用兜底版本: ${CURRENT_VERSION}${NC}"
|
|
100
105
|
fi
|
|
101
106
|
|
|
102
|
-
# --- 7. 核心代码同步 (
|
|
103
|
-
echo -e "${BLUE}🔄
|
|
107
|
+
# --- 7. 核心代码同步 (从源码复制到实例根目录) ---
|
|
108
|
+
echo -e "${BLUE}🔄 正在从源码复制文件到实例根目录...${NC}"
|
|
104
109
|
echo -e "${YELLOW}源码路径: ${SOURCE_CODE}${NC}"
|
|
105
|
-
echo -e "${YELLOW}目标路径: ${
|
|
110
|
+
echo -e "${YELLOW}目标路径: ${INSTANCE_DIR}${NC}"
|
|
106
111
|
|
|
107
|
-
#
|
|
108
|
-
rm -rf "$
|
|
109
|
-
mkdir -p "$DIST_DIR"
|
|
112
|
+
# 清理实例目录
|
|
113
|
+
rm -rf "$INSTANCE_DIR"
|
|
110
114
|
|
|
111
|
-
#
|
|
112
|
-
if cp -r "${SOURCE_CODE}/." "${
|
|
115
|
+
# 复制源码所有内容到实例根目录
|
|
116
|
+
if cp -r "${SOURCE_CODE}/." "${INSTANCE_DIR}/"; then
|
|
113
117
|
echo -e "${GREEN}✅ 源码复制成功${NC}"
|
|
114
118
|
else
|
|
115
119
|
echo -e "${RED}❌ 错误: 源码复制失败${NC}"
|
|
@@ -117,8 +121,8 @@ else
|
|
|
117
121
|
fi
|
|
118
122
|
|
|
119
123
|
# 验证关键文件是否存在
|
|
120
|
-
if [ ! -f "${
|
|
121
|
-
echo -e "${RED}❌ 错误:
|
|
124
|
+
if [ ! -f "${INSTANCE_DIR}/package.json" ]; then
|
|
125
|
+
echo -e "${RED}❌ 错误: 实例目录中未找到 package.json${NC}"
|
|
122
126
|
exit 1
|
|
123
127
|
fi
|
|
124
128
|
|
|
@@ -126,12 +130,6 @@ fi
|
|
|
126
130
|
# 注意:npm/pnpm 发布的包不包含 node_modules,需要在实例中安装
|
|
127
131
|
echo -e "${BLUE}📦 正在安装依赖...${NC}"
|
|
128
132
|
|
|
129
|
-
# 复制 package.json 和 pnpm-lock.yaml 到实例根目录(用于依赖安装)
|
|
130
|
-
cp "${DIST_DIR}/package.json" "${INSTANCE_DIR}/package.json"
|
|
131
|
-
if [ -f "${DIST_DIR}/pnpm-lock.yaml" ]; then
|
|
132
|
-
cp "${DIST_DIR}/pnpm-lock.yaml" "${INSTANCE_DIR}/pnpm-lock.yaml"
|
|
133
|
-
fi
|
|
134
|
-
|
|
135
133
|
cd "${INSTANCE_DIR}"
|
|
136
134
|
|
|
137
135
|
# 临时清理可能干扰的 workspace 配置
|
|
@@ -156,13 +154,13 @@ if [ ! -d "node_modules" ]; then
|
|
|
156
154
|
fi
|
|
157
155
|
echo -e "${GREEN}✅ 依赖安装成功${NC}"
|
|
158
156
|
|
|
159
|
-
# ---
|
|
157
|
+
# --- 安装扩展到实例根目录 ---
|
|
160
158
|
echo -e "${BLUE}📦 正在安装扩展 page-action-cache...${NC}"
|
|
161
159
|
|
|
162
|
-
# 确保
|
|
163
|
-
mkdir -p "${
|
|
160
|
+
# 确保 extensions 目录存在
|
|
161
|
+
mkdir -p "${INSTANCE_DIR}/extensions"
|
|
164
162
|
|
|
165
|
-
cd "${
|
|
163
|
+
cd "${INSTANCE_DIR}/extensions"
|
|
166
164
|
|
|
167
165
|
# 下载 page-action-cache tarball 并解压到临时目录
|
|
168
166
|
TEMP_EXT_DIR=$(mktemp -d)
|
|
@@ -172,8 +170,8 @@ if npm pack page-action-cache --registry=https://registry.npmmirror.com --quiet
|
|
|
172
170
|
# 解压到临时目录
|
|
173
171
|
tar -xzf "$TARBALL"
|
|
174
172
|
# 移动到 extensions/page-action-cache
|
|
175
|
-
rm -rf "${
|
|
176
|
-
mv package "${
|
|
173
|
+
rm -rf "${INSTANCE_DIR}/extensions/page-action-cache"
|
|
174
|
+
mv package "${INSTANCE_DIR}/extensions/page-action-cache"
|
|
177
175
|
echo -e "${GREEN}✅ page-action-cache 安装成功${NC}"
|
|
178
176
|
else
|
|
179
177
|
echo -e "${YELLOW}⚠️ page-action-cache 下载失败${NC}"
|
|
@@ -305,14 +303,7 @@ cat > "${INSTANCE_DIR}/config/openclaw.json" << EOF
|
|
|
305
303
|
}
|
|
306
304
|
},
|
|
307
305
|
"commands": { "native": "auto", "restart": false },
|
|
308
|
-
"gateway": { "port": ${PORT}, "mode": "local" }
|
|
309
|
-
"plugins": {
|
|
310
|
-
"entries": {
|
|
311
|
-
"page-action-cache": {
|
|
312
|
-
"enabled": true
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
}
|
|
306
|
+
"gateway": { "port": ${PORT}, "mode": "local" }
|
|
316
307
|
}
|
|
317
308
|
EOF
|
|
318
309
|
|
|
@@ -399,22 +390,13 @@ cat > "${INSTANCE_DIR}/start.sh" << 'EOF'
|
|
|
399
390
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
400
391
|
INSTANCE_NAME=$(basename "$SCRIPT_DIR")
|
|
401
392
|
|
|
402
|
-
#
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
# 检查 dist 目录是否存在
|
|
406
|
-
if [ ! -d "$DIST_DIR" ]; then
|
|
407
|
-
echo -e "\033[0;31m❌ 错误: dist 目录不存在: $DIST_DIR\033[0m"
|
|
393
|
+
# 检查实例根目录中是否有关键文件
|
|
394
|
+
if [ ! -f "$SCRIPT_DIR/package.json" ]; then
|
|
395
|
+
echo -e "\033[0;31m❌ 错误: 实例目录中未找到 package.json\033[0m"
|
|
408
396
|
echo -e "\033[1;33m请重新运行 create-instance.sh 脚本\033[0m"
|
|
409
397
|
exit 1
|
|
410
398
|
fi
|
|
411
399
|
|
|
412
|
-
# 检查 dist 目录中是否有关键文件
|
|
413
|
-
if [ ! -f "$DIST_DIR/package.json" ]; then
|
|
414
|
-
echo -e "\033[0;31m❌ 错误: dist 目录中未找到 package.json\033[0m"
|
|
415
|
-
exit 1
|
|
416
|
-
fi
|
|
417
|
-
|
|
418
400
|
# 检查实例根目录中是否包含 node_modules(依赖已安装)
|
|
419
401
|
if [ ! -d "$SCRIPT_DIR/node_modules" ]; then
|
|
420
402
|
echo -e "\033[0;31m❌ 错误: 实例目录中未找到 node_modules\033[0m"
|
|
@@ -459,12 +441,9 @@ EOP
|
|
|
459
441
|
fi
|
|
460
442
|
fi
|
|
461
443
|
|
|
462
|
-
# 定义可执行文件路径:使用 dist 目录中的代码
|
|
463
|
-
OPENCLAW_EXEC="node $DIST_DIR/dist/index.js"
|
|
464
|
-
|
|
465
444
|
# 验证可执行文件是否存在
|
|
466
|
-
if [ ! -f "$
|
|
467
|
-
echo -e "\033[0;31m❌ 错误: 未找到可执行文件 $
|
|
445
|
+
if [ ! -f "$SCRIPT_DIR/dist/index.js" ]; then
|
|
446
|
+
echo -e "\033[0;31m❌ 错误: 未找到可执行文件 $SCRIPT_DIR/dist/index.js\033[0m"
|
|
468
447
|
exit 1
|
|
469
448
|
fi
|
|
470
449
|
|
|
@@ -474,7 +453,7 @@ if [ $# -eq 0 ]; then
|
|
|
474
453
|
if [ -f "$OPENCLAW_CONFIG_PATH" ]; then
|
|
475
454
|
GATEWAY_PORT=$(node -e "console.log(require('$OPENCLAW_CONFIG_PATH').gateway?.port || 18789)")
|
|
476
455
|
echo -e "\033[0;32m🚀 启动 OpenClaw-$INSTANCE_NAME 网关 (端口: $GATEWAY_PORT)...\033[0m"
|
|
477
|
-
exec $OPENCLAW_EXEC gateway run --port "$GATEWAY_PORT"
|
|
456
|
+
exec $OPENCLAW_EXEC="node $SCRIPT_DIR/dist/index.js" gateway run --port "$GATEWAY_PORT"
|
|
478
457
|
else
|
|
479
458
|
echo -e "\033[0;31m❌ 错误: 未找到配置文件 $OPENCLAW_CONFIG_PATH\033[0m"
|
|
480
459
|
exit 1
|
|
@@ -484,11 +463,11 @@ else
|
|
|
484
463
|
# TUI 必须在 workspace 目录下运行,以正确加载模板文件
|
|
485
464
|
echo -e "\033[0;32m🚀 启动 OpenClaw-$INSTANCE_NAME TUI (workspace mode)...\033[0m"
|
|
486
465
|
cd "$OPENCLAW_WORKSPACE"
|
|
487
|
-
exec node "$
|
|
466
|
+
exec node "$SCRIPT_DIR/dist/index.js" tui
|
|
488
467
|
else
|
|
489
468
|
# 其他命令直接在实例目录执行
|
|
490
469
|
echo -e "\033[0;32m🚀 执行 OpenClaw-$INSTANCE_NAME 命令: $@\033[0m"
|
|
491
|
-
exec $OPENCLAW_EXEC "$@"
|
|
470
|
+
exec $OPENCLAW_EXEC="node $SCRIPT_DIR/dist/index.js" "$@"
|
|
492
471
|
fi
|
|
493
472
|
fi
|
|
494
473
|
EOF
|