fix(ci): restore main typecheck

This commit is contained in:
Vincent Koc
2026-04-14 18:53:14 +01:00
parent e0d1810632
commit 2aaa17dc6f
5 changed files with 23 additions and 13 deletions

View File

@@ -14,11 +14,7 @@ import {
updateSessionStore,
} from "openclaw/plugin-sdk/config-runtime";
import type { DmPolicy } from "openclaw/plugin-sdk/config-runtime";
import type {
TelegramDirectConfig,
TelegramGroupConfig,
TelegramTopicConfig,
} from "openclaw/plugin-sdk/config-runtime";
import type { TelegramGroupConfig, TelegramTopicConfig } from "openclaw/plugin-sdk/config-runtime";
import { applyModelOverrideToSessionEntry } from "openclaw/plugin-sdk/config-runtime";
import {
buildPluginBindingResolvedText,
@@ -304,7 +300,7 @@ export const registerTelegramHandlers = ({
senderId?: string | number;
}): {
agentId: string;
sessionEntry: ReturnType<typeof loadSessionStore>[string] | undefined;
sessionEntry: ReturnType<typeof resolveSessionStoreEntry>["existing"];
sessionKey: string;
model?: string;
} => {
@@ -836,8 +832,9 @@ export const registerTelegramHandlers = ({
// for reactions, we cannot determine if the reaction came from a topic, so block all
// reactions if requireTopic is enabled for this DM.
if (!isGroup) {
const requireTopic = (eventAuthContext.groupConfig)
?.requireTopic;
const requireTopic = (
eventAuthContext.groupConfig as { requireTopic?: boolean } | undefined
)?.requireTopic;
if (requireTopic === true) {
logVerbose(
`Blocked telegram reaction in DM ${chatId}: requireTopic=true but topic unknown for reactions`,
@@ -1535,7 +1532,7 @@ export const registerTelegramHandlers = ({
}
return;
}
const models = [...modelSet].toSorted();
const models = [...modelSet].toSorted((left, right) => left.localeCompare(right));
const pageSize = getModelsPageSize();
const totalPages = calculateTotalPages(models.length, pageSize);
const safePage = Math.max(1, Math.min(page, totalPages));

View File

@@ -71,7 +71,10 @@ describe("bundled channel legacy config migrations", () => {
expect(applyPluginDoctorCompatibilityMigrations).not.toHaveBeenCalled();
expect(loadBundledChannelDoctorContractApi).toHaveBeenCalledWith("slack");
expect(result.next.channels?.slack).toMatchObject({
const nextChannels = (result.next.channels ?? {}) as {
slack?: Record<string, unknown>;
};
expect(nextChannels.slack).toMatchObject({
streaming: true,
normalizedByBundledContract: true,
});

View File

@@ -41,7 +41,7 @@ describe("channel plugin blockers", () => {
},
],
diagnostics: [],
} as ReturnType<typeof manifestRegistry.loadPluginManifestRegistry>);
} as unknown as ReturnType<typeof manifestRegistry.loadPluginManifestRegistry>);
const hits = scanConfiguredChannelPluginBlockers({
plugins: {

View File

@@ -648,6 +648,9 @@ describe("runMessageAction media behavior", () => {
});
expect(result.kind).toBe("send");
if (result.kind !== "send") {
throw new Error("expected send result");
}
expect(result.sendResult).toMatchObject({
channel: "profile-demo",
});

View File

@@ -185,12 +185,19 @@ function writePluginEntry(root: string, relativePath: string) {
}
function createUserInstalledPluginSdkAliasFixture() {
const { fixture, sourceRootAlias } = createPluginSdkAliasTargetFixture();
const { fixture, sourceRootAlias, sourceChannelRuntimePath } =
createPluginSdkAliasTargetFixture();
const externalPluginRoot = path.join(makeTempDir(), ".openclaw", "extensions", "demo");
const externalPluginEntry = path.join(externalPluginRoot, "index.ts");
mkdirSafeDir(externalPluginRoot);
fs.writeFileSync(externalPluginEntry, 'export const plugin = "demo";\n', "utf-8");
return { externalPluginEntry, externalPluginRoot, fixture, sourceRootAlias };
return {
externalPluginEntry,
externalPluginRoot,
fixture,
sourceRootAlias,
sourceChannelRuntimePath,
};
}
function resolvePluginSdkAlias(params: {