fix(webchat): sessions persist after reconnects (#89017)

* fix(gateway): preserve asserted webchat sessions

* test(gateway): cover stale asserted webchat sessions

* fix(gateway): scope webchat session resume

* chore(protocol): refresh chat send models

* fix: document reconnect session resume protocol

* fix(gateway): keep reconnect resume internal

* gateway: keep reconnect resume options internal

* test(ui): avoid private resume marker lint access
This commit is contained in:
zhang-guiping
2026-06-23 04:02:58 +08:00
committed by GitHub
parent 9122e762d8
commit 2dc2d73b07
18 changed files with 339 additions and 27 deletions
@@ -23,6 +23,7 @@ import type {
PluginRuntime as CorePluginRuntime,
} from "openclaw/plugin-sdk/core";
import * as providerEntrySdk from "openclaw/plugin-sdk/provider-entry";
import type { GetReplyOptions as ReplyRuntimeGetReplyOptions } from "openclaw/plugin-sdk/reply-runtime";
import * as zalouserSdk from "openclaw/plugin-sdk/zalouser";
import ts from "typescript";
import { beforeAll, describe, expect, expectTypeOf, it } from "vitest";
@@ -625,6 +626,8 @@ describe("plugin-sdk subpath exports", () => {
"clearHistoryEntriesIfEnabled",
"recordPendingHistoryEntryIfEnabled",
"DEFAULT_GROUP_HISTORY_LIMIT",
"requestedSessionId",
"resumeRequestedSession",
],
});
expectSourceMentions("account-helpers", ["createAccountListHelpers"]);
@@ -1337,6 +1340,11 @@ describe("plugin-sdk subpath exports", () => {
expectTypeOf<CoreOpenClawPluginApi>().toMatchTypeOf<SharedOpenClawPluginApi>();
expectTypeOf<CorePluginRuntime>().toMatchTypeOf<SharedPluginRuntime>();
expectTypeOf<CoreChannelMessageActionContext>().toMatchTypeOf<SharedChannelMessageActionContext>();
type PrivateResumeOptionKeys = Extract<
keyof ReplyRuntimeGetReplyOptions,
"requestedSessionId" | "resumeRequestedSession"
>;
expectTypeOf<PrivateResumeOptionKeys>().toEqualTypeOf<never>();
});
it("keeps runtime entry subpaths importable", async () => {