mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 05:51:15 +08:00
build(deps): refresh workspace dependency pins
This commit is contained in:
@@ -7,12 +7,16 @@ Docs: https://docs.openclaw.ai
|
||||
### Changes
|
||||
|
||||
- Gateway/skills: add an opt-in private skill archive upload install path gated by `skills.install.allowUploadedArchives`, so trusted Gateway clients can stage and install zip-backed skills only when operators explicitly enable the code-install surface. (#74430) Thanks @samzong.
|
||||
- Dependencies: refresh workspace pins and patch targets, including ACPX `@agentclientprotocol/claude-agent-acp` `0.33.1`, Codex ACP `0.14.0`, Baileys `7.0.0-rc10`, Google GenAI `2.0.1`, OpenAI `6.37.0`, AWS SDK `3.1045.0`, Kysely `0.29.0`, Tlon skill `0.3.6`, Aimock `1.19.5`, and tsdown `0.22.0`.
|
||||
- Agents/compaction: preserve scoped background exec/process session references across embedded compaction and after-turn runtime contexts without exposing sessions from unrelated scopes. Fixes #79284. (#79307) Thanks @TurboTheTurtle.
|
||||
- CLI/onboarding: improve setup, onboarding, configure, and channel command wayfinding so terminal flows explain the next useful command instead of relying on terse setup labels.
|
||||
|
||||
### Fixes
|
||||
|
||||
- Ollama: keep DeepSeek V4 cloud models thinking-capable even when Ollama Cloud `/api/show` omits the `thinking` capability, so `/think high` no longer rejects `ollama/deepseek-v4-*:cloud`.
|
||||
- ACPX/Claude ACP: keep foreground prompts waiting for their own result when autonomous task-notification results arrive during the same session, and retarget the patch for Claude Agent ACP `0.33.1`.
|
||||
- WhatsApp: keep Baileys media uploads from passing non-Dispatcher agents to undici in `7.0.0-rc10`, and patch the bundled Baileys declaration so the latest tsdown build stays warning-clean.
|
||||
- Build: keep tsdown `0.22.0` warning-clean by externalizing known third-party declaration edges and replacing relative channel config module augmentations with explicit built-in channel fields.
|
||||
- ACP sessions: map canonical runtime options to backend-advertised ACP config keys like Claude's `effort` while keeping persisted OpenClaw state canonical. (#79926) Thanks @InTheCloudDan.
|
||||
- Gateway/watch: rebuild or restage missing bundled-plugin dist and runtime-postbuild outputs before launching the Gateway from a source checkout, preventing incomplete watch-mode runtime trees. (#70805) Thanks @rubencu.
|
||||
- CLI/update: allow restart health probes from the previous gateway protocol during self-update, and make plugin dry-runs report exact npm target versions instead of `unknown` while preserving unchanged status.
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
},
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@agentclientprotocol/claude-agent-acp": "0.32.0",
|
||||
"@zed-industries/codex-acp": "0.13.0",
|
||||
"@agentclientprotocol/claude-agent-acp": "0.33.1",
|
||||
"@zed-industries/codex-acp": "0.14.0",
|
||||
"acpx": "0.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -35,7 +35,7 @@ class ManualAsyncIterator implements AsyncIterator<unknown> {
|
||||
}
|
||||
}
|
||||
|
||||
function makeResultMessage() {
|
||||
function makeResultMessage(overrides: Record<string, unknown> = {}) {
|
||||
return {
|
||||
type: "result",
|
||||
subtype: "success",
|
||||
@@ -50,6 +50,7 @@ function makeResultMessage() {
|
||||
cache_creation_input_tokens: 0,
|
||||
},
|
||||
modelUsage: [],
|
||||
...overrides,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -126,4 +127,67 @@ describe("patched claude-agent-acp completion", () => {
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it("does not resolve a prompt after a task-notification result goes idle", async () => {
|
||||
const query = new ManualAsyncIterator();
|
||||
const agent = new ClaudeAcpAgent({
|
||||
sessionUpdate: vi.fn(),
|
||||
extNotification: vi.fn(),
|
||||
} as unknown as ConstructorParameters<typeof ClaudeAcpAgent>[0]);
|
||||
agent.sessions["session-1"] = {
|
||||
cancelled: false,
|
||||
accumulatedUsage: {
|
||||
inputTokens: 0,
|
||||
outputTokens: 0,
|
||||
cachedReadTokens: 0,
|
||||
cachedWriteTokens: 0,
|
||||
},
|
||||
contextWindowSize: 200_000,
|
||||
cwd: "/tmp",
|
||||
emitRawSDKMessages: false,
|
||||
input: {
|
||||
push: vi.fn(),
|
||||
end: vi.fn(),
|
||||
},
|
||||
nextPendingOrder: 0,
|
||||
pendingMessages: new Map(),
|
||||
promptRunning: false,
|
||||
query,
|
||||
settingsManager: {
|
||||
dispose: vi.fn(),
|
||||
},
|
||||
} as unknown as (typeof agent.sessions)[string];
|
||||
|
||||
let resolved = false;
|
||||
const promptPromise = agent
|
||||
.prompt({
|
||||
sessionId: "session-1",
|
||||
prompt: [{ type: "text", text: "do foreground work" }],
|
||||
})
|
||||
.then((value) => {
|
||||
resolved = true;
|
||||
return value;
|
||||
});
|
||||
|
||||
query.push(makeResultMessage({ origin: { kind: "task-notification" } }));
|
||||
await flushMicrotasks();
|
||||
expect(resolved).toBe(false);
|
||||
|
||||
query.push(makeIdleMessage());
|
||||
await flushMicrotasks();
|
||||
expect(resolved).toBe(false);
|
||||
|
||||
query.push(makeResultMessage());
|
||||
await flushMicrotasks();
|
||||
expect(resolved).toBe(false);
|
||||
|
||||
query.push(makeIdleMessage());
|
||||
await expect(promptPromise).resolves.toMatchObject({
|
||||
stopReason: "end_turn",
|
||||
usage: {
|
||||
inputTokens: 2,
|
||||
outputTokens: 2,
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -167,7 +167,7 @@ describe("prepareAcpxCodexAuthConfig", () => {
|
||||
});
|
||||
|
||||
const wrapper = await fs.readFile(generated.wrapperPath, "utf8");
|
||||
expect(wrapper).toContain('"@zed-industries/codex-acp@0.13.0"');
|
||||
expect(wrapper).toContain('"@zed-industries/codex-acp@0.14.0"');
|
||||
expect(wrapper).toContain('"--", "codex-acp"');
|
||||
expect(wrapper).not.toContain("@zed-industries/codex-acp@^0.11.1");
|
||||
});
|
||||
@@ -188,7 +188,7 @@ describe("prepareAcpxCodexAuthConfig", () => {
|
||||
});
|
||||
|
||||
const wrapper = await fs.readFile(generated.wrapperPath, "utf8");
|
||||
expect(wrapper).toContain('"@agentclientprotocol/claude-agent-acp@0.32.0"');
|
||||
expect(wrapper).toContain('"@agentclientprotocol/claude-agent-acp@0.33.1"');
|
||||
expect(wrapper).toContain('"--", "claude-agent-acp"');
|
||||
expect(wrapper).not.toContain("@agentclientprotocol/claude-agent-acp@^0.31.0");
|
||||
expect(wrapper).not.toContain("@agentclientprotocol/claude-agent-acp@0.31.0");
|
||||
|
||||
@@ -14,8 +14,8 @@ describe("acpx package manifest", () => {
|
||||
|
||||
expect(packageJson.dependencies?.acpx).toBeTypeOf("string");
|
||||
expect(packageJson.dependencies?.acpx).not.toBe("");
|
||||
expect(packageJson.dependencies?.["@zed-industries/codex-acp"]).toBe("0.13.0");
|
||||
expect(packageJson.dependencies?.["@agentclientprotocol/claude-agent-acp"]).toBe("0.32.0");
|
||||
expect(packageJson.dependencies?.["@zed-industries/codex-acp"]).toBe("0.14.0");
|
||||
expect(packageJson.dependencies?.["@agentclientprotocol/claude-agent-acp"]).toBe("0.33.1");
|
||||
expect(packageJson.devDependencies?.["@agentclientprotocol/claude-agent-acp"]).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"description": "OpenClaw Amazon Bedrock Mantle (OpenAI-compatible) provider plugin",
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@anthropic-ai/sdk": "0.95.0",
|
||||
"@anthropic-ai/sdk": "0.95.1",
|
||||
"@aws/bedrock-token-generator": "^1.1.0",
|
||||
"@mariozechner/pi-ai": "0.73.1"
|
||||
},
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
"description": "OpenClaw Amazon Bedrock provider plugin",
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-bedrock": "3.1044.0",
|
||||
"@aws-sdk/client-bedrock-runtime": "3.1044.0",
|
||||
"@aws-sdk/client-bedrock": "3.1045.0",
|
||||
"@aws-sdk/client-bedrock-runtime": "3.1045.0",
|
||||
"@aws-sdk/credential-provider-node": "3.972.39",
|
||||
"@smithy/shared-ini-file-loader": "4.4.9"
|
||||
},
|
||||
|
||||
@@ -1 +1 @@
|
||||
3fff2963cf04b8a07a5ebd943c501db50a12721cb437efc61dbb9e3b4c82a9f9
|
||||
61650e677e27bc6d4ea84631a045953626231e050485f1a7cfeb932a8b585a9f
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"build:viewer": "bun build src/viewer-client.ts --target browser --format esm --minify --outfile assets/viewer-runtime.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@pierre/diffs": "1.1.20",
|
||||
"@pierre/diffs": "1.1.21",
|
||||
"@pierre/theme": "0.0.29",
|
||||
"playwright-core": "1.59.1",
|
||||
"typebox": "1.1.38"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
},
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@larksuiteoapi/node-sdk": "^1.62.1",
|
||||
"@larksuiteoapi/node-sdk": "^1.63.1",
|
||||
"typebox": "1.1.38"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"description": "OpenClaw Google plugin",
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@google/genai": "^1.52.0",
|
||||
"@google/genai": "^2.0.1",
|
||||
"@mariozechner/pi-ai": "0.73.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"dependencies": {
|
||||
"@lancedb/lancedb": "^0.27.2",
|
||||
"apache-arrow": "18.1.0",
|
||||
"openai": "^6.36.0",
|
||||
"openai": "^6.37.0",
|
||||
"typebox": "1.1.38"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"description": "OpenClaw QA lab plugin with private debugger UI and scenario runner",
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@copilotkit/aimock": "1.19.0",
|
||||
"@copilotkit/aimock": "1.19.5",
|
||||
"@modelcontextprotocol/sdk": "1.29.0",
|
||||
"playwright-core": "1.59.1",
|
||||
"yaml": "^2.8.4"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@slack/bolt": "^4.7.2",
|
||||
"@slack/types": "^2.21.0",
|
||||
"@slack/types": "^2.21.1",
|
||||
"@slack/web-api": "^7.15.2",
|
||||
"https-proxy-agent": "^9.0.0"
|
||||
},
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
},
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-s3": "3.1044.0",
|
||||
"@aws-sdk/s3-request-presigner": "3.1044.0",
|
||||
"@tloncorp/tlon-skill": "0.3.5",
|
||||
"@aws-sdk/client-s3": "3.1045.0",
|
||||
"@aws-sdk/s3-request-presigner": "3.1045.0",
|
||||
"@tloncorp/tlon-skill": "0.3.6",
|
||||
"@urbit/aura": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
},
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@whiskeysockets/baileys": "7.0.0-rc.9",
|
||||
"@whiskeysockets/baileys": "7.0.0-rc10",
|
||||
"https-proxy-agent": "^9.0.0",
|
||||
"jimp": "^1.6.1",
|
||||
"typebox": "1.1.38",
|
||||
|
||||
34
package.json
34
package.json
@@ -1688,15 +1688,15 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@agentclientprotocol/sdk": "0.21.0",
|
||||
"@anthropic-ai/sdk": "0.95.0",
|
||||
"@anthropic-ai/sdk": "0.95.1",
|
||||
"@anthropic-ai/vertex-sdk": "^0.16.0",
|
||||
"@aws-sdk/client-bedrock": "3.1044.0",
|
||||
"@aws-sdk/client-bedrock-runtime": "3.1044.0",
|
||||
"@aws-sdk/client-bedrock": "3.1045.0",
|
||||
"@aws-sdk/client-bedrock-runtime": "3.1045.0",
|
||||
"@aws-sdk/credential-provider-node": "3.972.39",
|
||||
"@aws/bedrock-token-generator": "^1.1.0",
|
||||
"@clack/core": "^1.3.0",
|
||||
"@clack/prompts": "^1.3.0",
|
||||
"@google/genai": "^1.52.0",
|
||||
"@google/genai": "^2.0.1",
|
||||
"@grammyjs/runner": "^2.0.3",
|
||||
"@grammyjs/transformer-throttler": "^1.2.1",
|
||||
"@homebridge/ciao": "^1.3.8",
|
||||
@@ -1709,7 +1709,7 @@
|
||||
"@mozilla/readability": "^0.6.0",
|
||||
"@openclaw/fs-safe": "github:openclaw/fs-safe#c7ccb99d3058f2acf2ad2758ad2470c7e113a53c",
|
||||
"@slack/bolt": "^4.7.2",
|
||||
"@slack/types": "^2.21.0",
|
||||
"@slack/types": "^2.21.1",
|
||||
"@slack/web-api": "^7.15.2",
|
||||
"ajv": "^8.20.0",
|
||||
"chalk": "^5.6.2",
|
||||
@@ -1726,18 +1726,18 @@
|
||||
"jiti": "^2.7.0",
|
||||
"json5": "^2.2.3",
|
||||
"jszip": "^3.10.1",
|
||||
"kysely": "0.28.17",
|
||||
"kysely": "0.29.0",
|
||||
"linkedom": "^0.18.12",
|
||||
"markdown-it": "14.1.1",
|
||||
"minimatch": "10.2.5",
|
||||
"node-edge-tts": "^1.2.10",
|
||||
"openai": "^6.36.0",
|
||||
"openai": "^6.37.0",
|
||||
"openshell": "0.1.0",
|
||||
"pdfjs-dist": "^5.7.284",
|
||||
"playwright-core": "1.59.1",
|
||||
"proxy-agent": "^8.0.1",
|
||||
"qrcode": "1.5.4",
|
||||
"tar": "7.5.14",
|
||||
"tar": "7.5.15",
|
||||
"tokenjuice": "0.7.0",
|
||||
"tree-sitter-bash": "^0.25.1",
|
||||
"tslog": "^4.10.2",
|
||||
@@ -1751,7 +1751,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@a2ui/lit": "0.9.3",
|
||||
"@copilotkit/aimock": "1.19.0",
|
||||
"@copilotkit/aimock": "1.19.5",
|
||||
"@grammyjs/types": "^3.26.0",
|
||||
"@lit-labs/signals": "^0.2.0",
|
||||
"@lit/context": "^1.1.6",
|
||||
@@ -1762,14 +1762,14 @@
|
||||
"@types/ws": "^8.18.1",
|
||||
"@typescript/native-preview": "7.0.0-dev.20260509.2",
|
||||
"@vitest/coverage-v8": "^4.1.5",
|
||||
"jscpd": "4.0.9",
|
||||
"jscpd": "4.1.0",
|
||||
"jsdom": "^29.1.1",
|
||||
"lit": "^3.3.2",
|
||||
"oxfmt": "0.48.0",
|
||||
"oxlint": "^1.63.0",
|
||||
"oxlint-tsgolint": "^0.22.1",
|
||||
"signal-utils": "0.21.1",
|
||||
"tsdown": "0.21.10",
|
||||
"tsdown": "0.22.0",
|
||||
"tsx": "^4.21.0",
|
||||
"typescript": "^6.0.3",
|
||||
"vitest": "^4.1.5"
|
||||
@@ -1792,10 +1792,10 @@
|
||||
"packageManager": "pnpm@10.33.2+sha512.a90faf6feeab71ad6c6e57f94e0fe1a12f5dcc22cd754db40ae9593eb6a3e0b6b12e3540218bb37ae083404b1f2ce6db2a4121e979829b4aff94b99f49da1cf8",
|
||||
"pnpm": {
|
||||
"overrides": {
|
||||
"@anthropic-ai/sdk": "0.95.0",
|
||||
"hono": "4.12.14",
|
||||
"@anthropic-ai/sdk": "0.95.1",
|
||||
"hono": "4.12.18",
|
||||
"@hono/node-server": "1.19.14",
|
||||
"@aws-sdk/client-bedrock-runtime": "3.1044.0",
|
||||
"@aws-sdk/client-bedrock-runtime": "3.1045.0",
|
||||
"axios": "1.16.0",
|
||||
"fast-uri": "3.1.2",
|
||||
"follow-redirects": "1.16.0",
|
||||
@@ -1812,7 +1812,7 @@
|
||||
"qs": "6.14.2",
|
||||
"node-domexception": "npm:@nolyfill/domexception@1.0.28",
|
||||
"typebox": "1.1.38",
|
||||
"tar": "7.5.14",
|
||||
"tar": "7.5.15",
|
||||
"tough-cookie": "4.1.3",
|
||||
"yauzl": "3.2.1",
|
||||
"protobufjs": "7.5.5",
|
||||
@@ -1851,8 +1851,8 @@
|
||||
}
|
||||
},
|
||||
"patchedDependencies": {
|
||||
"@whiskeysockets/baileys@7.0.0-rc.9": "patches/@whiskeysockets__baileys@7.0.0-rc.9.patch",
|
||||
"@agentclientprotocol/claude-agent-acp@0.32.0": "patches/@agentclientprotocol__claude-agent-acp@0.32.0.patch"
|
||||
"@whiskeysockets/baileys@7.0.0-rc10": "patches/@whiskeysockets__baileys@7.0.0-rc10.patch",
|
||||
"@agentclientprotocol/claude-agent-acp@0.33.1": "patches/@agentclientprotocol__claude-agent-acp@0.33.1.patch"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/dist/acp-agent.js b/dist/acp-agent.js
|
||||
index e1d9aa9f0815f57ea2fd299a7f2b8ef0917ca191..875fdfb25fbfa905ca80728355d25a17e6d89148 100644
|
||||
index d0af13a..0f84309 100644
|
||||
--- a/dist/acp-agent.js
|
||||
+++ b/dist/acp-agent.js
|
||||
@@ -436,6 +436,7 @@ export class ClaudeAcpAgent {
|
||||
@@ -441,6 +441,7 @@ export class ClaudeAcpAgent {
|
||||
session.promptRunning = true;
|
||||
let handedOff = false;
|
||||
let stopReason = "end_turn";
|
||||
@@ -10,7 +10,7 @@ index e1d9aa9f0815f57ea2fd299a7f2b8ef0917ca191..875fdfb25fbfa905ca80728355d25a17
|
||||
try {
|
||||
while (true) {
|
||||
const { value: message, done } = await session.query.next();
|
||||
@@ -443,6 +444,9 @@ export class ClaudeAcpAgent {
|
||||
@@ -448,6 +449,9 @@ export class ClaudeAcpAgent {
|
||||
if (session.cancelled) {
|
||||
return { stopReason: "cancelled" };
|
||||
}
|
||||
@@ -20,7 +20,7 @@ index e1d9aa9f0815f57ea2fd299a7f2b8ef0917ca191..875fdfb25fbfa905ca80728355d25a17
|
||||
break;
|
||||
}
|
||||
if (session.emitRawSDKMessages &&
|
||||
@@ -499,7 +503,7 @@ export class ClaudeAcpAgent {
|
||||
@@ -518,7 +522,7 @@ export class ClaudeAcpAgent {
|
||||
break;
|
||||
}
|
||||
case "session_state_changed": {
|
||||
@@ -29,11 +29,13 @@ index e1d9aa9f0815f57ea2fd299a7f2b8ef0917ca191..875fdfb25fbfa905ca80728355d25a17
|
||||
return { stopReason, usage: sessionUsage(session) };
|
||||
}
|
||||
break;
|
||||
@@ -621,6 +625,7 @@ export class ClaudeAcpAgent {
|
||||
@@ -637,6 +641,9 @@ export class ClaudeAcpAgent {
|
||||
unreachable(message, this.logger);
|
||||
break;
|
||||
}
|
||||
+ sawResult = true;
|
||||
+ if (!isTaskNotification) {
|
||||
+ sawResult = true;
|
||||
+ }
|
||||
break;
|
||||
}
|
||||
case "stream_event": {
|
||||
@@ -1,46 +0,0 @@
|
||||
diff --git a/lib/Utils/messages-media.js b/lib/Utils/messages-media.js
|
||||
index 0d32dfb4882dfe029ba8804772d7d89404b08e76..73809fcd1d52362aef0c35cb7416c29d86482df0 100644
|
||||
--- a/lib/Utils/messages-media.js
|
||||
+++ b/lib/Utils/messages-media.js
|
||||
@@ -353,9 +353,17 @@
|
||||
const fileSha256 = sha256Plain.digest();
|
||||
const fileEncSha256 = sha256Enc.digest();
|
||||
encFileWriteStream.write(mac);
|
||||
+ // Create finish promises before calling end() to avoid missing the event
|
||||
+ const encFinishPromise = once(encFileWriteStream, 'finish');
|
||||
+ const originalFinishPromise = originalFileStream ? once(originalFileStream, 'finish') : Promise.resolve();
|
||||
encFileWriteStream.end();
|
||||
originalFileStream?.end?.();
|
||||
stream.destroy();
|
||||
+ // Wait for write streams to fully flush to disk before returning encFilePath.
|
||||
+ // Without this await, the caller may open a read stream on the file before
|
||||
+ // the OS has created it, causing a race-condition ENOENT crash.
|
||||
+ await encFinishPromise;
|
||||
+ await originalFinishPromise;
|
||||
logger?.debug('encrypted data successfully');
|
||||
return {
|
||||
mediaKey,
|
||||
@@ -520,11 +528,10 @@
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
let result;
|
||||
try {
|
||||
const stream = createReadStream(filePath);
|
||||
const response = await fetch(url, {
|
||||
- dispatcher: fetchAgent,
|
||||
method: 'POST',
|
||||
body: stream,
|
||||
headers: {
|
||||
...(() => {
|
||||
const hdrs = options?.headers;
|
||||
@@ -535,6 +542,11 @@
|
||||
'Content-Type': 'application/octet-stream',
|
||||
Origin: DEFAULT_ORIGIN
|
||||
},
|
||||
+ // Baileys passes a generic agent here in some runtimes. Undici's
|
||||
+ // `dispatcher` only works with Dispatcher-compatible implementations,
|
||||
+ // so only wire it through when the object actually implements
|
||||
+ // `dispatch`.
|
||||
+ ...(typeof fetchAgent?.dispatch === 'function' ? { dispatcher: fetchAgent } : {}),
|
||||
duplex: 'half',
|
||||
// Note: custom agents/proxy require undici Agent; omitted here.
|
||||
signal: timeoutMs ? AbortSignal.timeout(timeoutMs) : undefined
|
||||
28
patches/@whiskeysockets__baileys@7.0.0-rc10.patch
Normal file
28
patches/@whiskeysockets__baileys@7.0.0-rc10.patch
Normal file
@@ -0,0 +1,28 @@
|
||||
diff --git a/lib/Utils/messages-media.js b/lib/Utils/messages-media.js
|
||||
index 95f8c63..612b7fb 100644
|
||||
--- a/lib/Utils/messages-media.js
|
||||
+++ b/lib/Utils/messages-media.js
|
||||
@@ -596,7 +596,10 @@ const uploadWithFetch = async ({ url, filePath, headers, timeoutMs, agent }) =>
|
||||
const nodeStream = createReadStream(filePath);
|
||||
const webStream = Readable.toWeb(nodeStream);
|
||||
const response = await fetch(url, {
|
||||
- dispatcher: agent,
|
||||
+ // Baileys may pass a generic agent in some runtimes. Undici's dispatcher
|
||||
+ // option only accepts Dispatcher-compatible implementations, so only wire
|
||||
+ // it through when the object actually implements dispatch.
|
||||
+ ...(typeof agent?.dispatch === 'function' ? { dispatcher: agent } : {}),
|
||||
method: 'POST',
|
||||
body: webStream,
|
||||
headers,
|
||||
diff --git a/lib/Utils/logger.d.ts b/lib/Utils/logger.d.ts
|
||||
index 4d78996..059f58f 100644
|
||||
--- a/lib/Utils/logger.d.ts
|
||||
+++ b/lib/Utils/logger.d.ts
|
||||
@@ -7,6 +7,6 @@ export interface ILogger {
|
||||
info(obj: unknown, msg?: string): void;
|
||||
warn(obj: unknown, msg?: string): void;
|
||||
error(obj: unknown, msg?: string): void;
|
||||
}
|
||||
-declare const _default: import("pino").Logger<never, boolean>;
|
||||
+declare const _default: ILogger;
|
||||
export default _default;
|
||||
1112
pnpm-lock.yaml
generated
1112
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user