fix(release): repair 2026.5.30 beta prerelease gates · openclaw/openclaw@ab35dcd
steipete
·
2026-05-31
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | | -import { describe, expect, it } from "vitest"; |
| 1 | +import { describe, expect, it, vi } from "vitest"; |
2 | 2 | import { |
3 | 3 | createDiscordMessageHandler, |
4 | 4 | preflightDiscordMessageMock, |
@@ -51,8 +51,10 @@ describe("createDiscordMessageHandler bot-self filter", () => {
|
51 | 51 | preflightDiscordMessageMock.mockReset(); |
52 | 52 | processDiscordMessageMock.mockReset(); |
53 | 53 | preflightDiscordMessageMock.mockImplementation( |
54 | | -async (params: { data: { channel_id: string } }) => |
55 | | -createPreflightContext(params.data.channel_id), |
| 54 | +async (params: { data: { channel_id: string } }) => ({ |
| 55 | + ...params, |
| 56 | + ...createPreflightContext(params.data.channel_id), |
| 57 | +}), |
56 | 58 | ); |
57 | 59 | |
58 | 60 | const handler = createDiscordMessageHandler(createDiscordHandlerParams()); |
@@ -62,7 +64,9 @@ describe("createDiscordMessageHandler bot-self filter", () => {
|
62 | 64 | ).resolves.toBeUndefined(); |
63 | 65 | |
64 | 66 | await flushAsyncWork(); |
65 | | -expect(preflightDiscordMessageMock).toHaveBeenCalledTimes(1); |
66 | | -expect(processDiscordMessageMock).toHaveBeenCalledTimes(1); |
| 67 | +await vi.waitFor(() => { |
| 68 | +expect(preflightDiscordMessageMock).toHaveBeenCalledTimes(1); |
| 69 | +expect(processDiscordMessageMock).toHaveBeenCalledTimes(1); |
| 70 | +}); |
67 | 71 | }); |
68 | 72 | }); |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -71,5 +71,11 @@ export function createDiscordPreflightContext(channelId = "ch-1") {
|
71 | 71 | }, |
72 | 72 | baseSessionKey: `agent:main:discord:channel:${channelId}`, |
73 | 73 | messageChannelId: channelId, |
| 74 | +messageText: "hello", |
| 75 | +isDirectMessage: true, |
| 76 | +isGroupDm: false, |
| 77 | +isGuildMessage: false, |
| 78 | +inboundEventKind: "message", |
| 79 | +effectiveWasMentioned: false, |
74 | 80 | }; |
75 | 81 | } |
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import type { ReplyPayload } from "openclaw/plugin-sdk/reply-dispatch-runtime"; |
2 | 2 | import { resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload"; |
3 | 3 | import { sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking"; |
| 4 | +import { stripPlainTextToolCallBlocks } from "openclaw/plugin-sdk/tool-payload"; |
4 | 5 | |
5 | 6 | const DISCORD_INTERNAL_TRACE_LINE_RE = |
6 | 7 | /^(?:>\s*)?(?:📊|🛠️|📖|📝|🔍|🔎|⚙️)\s*(?:Session Status|Exec|Read|Edit|Write|Patch|Search|Open|Click|Find|Screenshot|Update Plan|Tool Call|Tool Result|Function Call|Shell|Command)\s*:/i; |
@@ -64,8 +65,10 @@ function collapseExcessBlankLines(text: string): string {
|
64 | 65 | } |
65 | 66 | |
66 | 67 | export function sanitizeDiscordFrontChannelText(text: string): string { |
67 | | -const withoutAssistantScaffolding = sanitizeAssistantVisibleText(text); |
68 | | -const withoutTraceLines = stripDiscordInternalTraceLines(withoutAssistantScaffolding); |
| 68 | +const withoutToolCallBlocks = stripPlainTextToolCallBlocks(text); |
| 69 | +const withoutAssistantScaffolding = sanitizeAssistantVisibleText(withoutToolCallBlocks); |
| 70 | +const withoutResidualToolCallBlocks = stripPlainTextToolCallBlocks(withoutAssistantScaffolding); |
| 71 | +const withoutTraceLines = stripDiscordInternalTraceLines(withoutResidualToolCallBlocks); |
69 | 72 | return collapseExcessBlankLines(withoutTraceLines).trim(); |
70 | 73 | } |
71 | 74 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2,6 +2,6 @@ import { describePluginRegistrationContract } from "openclaw/plugin-sdk/plugin-t
|
2 | 2 | |
3 | 3 | describePluginRegistrationContract({ |
4 | 4 | pluginId: "ollama", |
5 | | -providerIds: ["ollama"], |
| 5 | +providerIds: ["ollama", "ollama-cloud"], |
6 | 6 | webSearchProviderIds: ["ollama"], |
7 | 7 | }); |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2,7 +2,15 @@ import { describePluginRegistrationContract } from "openclaw/plugin-sdk/plugin-t
|
2 | 2 | |
3 | 3 | describePluginRegistrationContract({ |
4 | 4 | pluginId: "qwen", |
5 | | -providerIds: ["qwen", "qwencloud", "modelstudio", "dashscope"], |
| 5 | +providerIds: [ |
| 6 | +"qwen", |
| 7 | +"qwencloud", |
| 8 | +"modelstudio", |
| 9 | +"dashscope", |
| 10 | +"qwen-oauth", |
| 11 | +"qwen-portal", |
| 12 | +"qwen-cli", |
| 13 | +], |
6 | 14 | mediaUnderstandingProviderIds: ["qwen"], |
7 | 15 | videoGenerationProviderIds: ["qwen"], |
8 | 16 | requireDescribeImages: true, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2257,7 +2257,10 @@ describe("TelegramPollingSession", () => {
|
2257 | 2257 | }); |
2258 | 2258 | |
2259 | 2259 | try { |
2260 | | -await writeSpooledTestUpdates(tempDir, [topicUpdate(42, 10, "wedged topic 10 turn")]); |
| 2260 | +await writeSpooledTestUpdates(tempDir, [ |
| 2261 | +topicUpdate(42, 10, "wedged topic 10 turn"), |
| 2262 | +topicUpdate(43, 10, "later blocked topic 10 turn"), |
| 2263 | +]); |
2261 | 2264 | const { runPromise, stopWorker } = startIsolatedIngressSession({ |
2262 | 2265 | abort, |
2263 | 2266 | spoolDir: tempDir, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -629,7 +629,7 @@ export class TelegramPollingSession {
|
629 | 629 | continue; |
630 | 630 | } |
631 | 631 | const ageMs = now - handler.startedAt; |
632 | | -if (ageMs <= this.#spooledUpdateHandlerTimeoutMs) { |
| 632 | +if (ageMs < this.#spooledUpdateHandlerTimeoutMs) { |
633 | 633 | continue; |
634 | 634 | } |
635 | 635 | if (!timedOut || ageMs > timedOut.ageMs) { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -49,7 +49,13 @@ describe("web monitor inbox", () => {
|
49 | 49 | const listener = await openMonitor(onMessage); |
50 | 50 | const sock = getSock(); |
51 | 51 | sock.ev.emit("messages.upsert", upsert); |
52 | | -await new Promise((resolve) => setTimeout(resolve, 25)); |
| 52 | +await vi.waitFor(() => { |
| 53 | +expect( |
| 54 | +onMessage.mock.calls.length + |
| 55 | +sock.readMessages.mock.calls.length + |
| 56 | +inboundLoggerInfoMock.mock.calls.length, |
| 57 | +).toBeGreaterThan(0); |
| 58 | +}); |
53 | 59 | return { onMessage, listener, sock }; |
54 | 60 | } |
55 | 61 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -7,6 +7,7 @@ import { createVpsAwareOAuthHandlers } from "./provider-oauth-flow.js";
|
7 | 7 | import type { ProviderAuthContext } from "./types.js"; |
8 | 8 | |
9 | 9 | const OPENAI_CODEX_PROVIDER_ID = "openai"; |
| 10 | +const OPENAI_CODEX_LEGACY_PROVIDER_ID = "openai-codex"; |
10 | 11 | const OPENAI_CODEX_OAUTH_METHOD_ID = "oauth"; |
11 | 12 | |
12 | 13 | type OpenAICodexOAuthBridgeContext = ProviderAuthContext & { |
@@ -44,7 +45,8 @@ function isOAuthCredential(value: unknown): value is OAuthCredentials {
|
44 | 45 | const record = value as Record<string, unknown>; |
45 | 46 | return ( |
46 | 47 | record.type === "oauth" && |
47 | | -record.provider === OPENAI_CODEX_PROVIDER_ID && |
| 48 | +(record.provider === OPENAI_CODEX_PROVIDER_ID || |
| 49 | +record.provider === OPENAI_CODEX_LEGACY_PROVIDER_ID) && |
48 | 50 | typeof record.access === "string" && |
49 | 51 | typeof record.refresh === "string" && |
50 | 52 | typeof record.expires === "number" |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。