fix: resolve main ci shard failures

This commit is contained in:
Peter Steinberger
2026-04-28 05:52:16 +01:00
parent 540cbe24be
commit a68cc94c36
9 changed files with 23 additions and 15 deletions

View File

@@ -1,3 +1,2 @@
// oxlint-disable-next-line typescript/no-explicit-any
export type MockFn<T extends (...args: any[]) => any = (...args: any[]) => any> =
export type MockFn<T extends (...args: unknown[]) => unknown = (...args: unknown[]) => unknown> =
import("vitest").Mock<T>;

View File

@@ -50,7 +50,7 @@ export type {
ChannelMessageActionContext,
} from "openclaw/plugin-sdk/channel-contract";
export type { OpenClawConfig } from "openclaw/plugin-sdk/config-types";
export { formatZonedTimestamp } from "openclaw/plugin-sdk/core";
export { formatZonedTimestamp } from "openclaw/plugin-sdk/time-runtime";
export type { PluginRuntime, RuntimeLogger } from "openclaw/plugin-sdk/plugin-runtime";
export type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env";
export type { WizardPrompter } from "openclaw/plugin-sdk/setup";

View File

@@ -103,11 +103,8 @@ export {
resolveSenderScopedGroupPolicy,
} from "openclaw/plugin-sdk/channel-policy";
export { buildTimeoutAbortSignal } from "./matrix/sdk/timeout-abort-signal.js";
export {
formatZonedTimestamp,
type PluginRuntime,
type RuntimeLogger,
} from "openclaw/plugin-sdk/core";
export { formatZonedTimestamp } from "openclaw/plugin-sdk/time-runtime";
export type { PluginRuntime, RuntimeLogger } from "openclaw/plugin-sdk/plugin-runtime";
export type { ReplyPayload } from "openclaw/plugin-sdk/reply-runtime";
// resolveMatrixAccountStringValues already comes from the Matrix API barrel.
// Re-exporting auth-precedence here makes Jiti try to define the same export twice.

View File

@@ -542,6 +542,10 @@
"types": "./dist/plugin-sdk/temp-path.d.ts",
"default": "./dist/plugin-sdk/temp-path.js"
},
"./plugin-sdk/time-runtime": {
"types": "./dist/plugin-sdk/time-runtime.d.ts",
"default": "./dist/plugin-sdk/time-runtime.js"
},
"./plugin-sdk/logging-core": {
"types": "./dist/plugin-sdk/logging-core.d.ts",
"default": "./dist/plugin-sdk/logging-core.js"

View File

@@ -60,6 +60,10 @@
"types": "./dist/src/plugin-sdk/system-event-runtime.d.ts",
"default": "./src/system-event-runtime.ts"
},
"./time-runtime": {
"types": "./dist/src/plugin-sdk/time-runtime.d.ts",
"default": "./src/time-runtime.ts"
},
"./transport-ready-runtime": {
"types": "./dist/src/plugin-sdk/transport-ready-runtime.d.ts",
"default": "./src/transport-ready-runtime.ts"

View File

@@ -119,6 +119,7 @@
"test-node-mocks",
"testing",
"temp-path",
"time-runtime",
"logging-core",
"migration",
"migration-runtime",

View File

@@ -1,4 +1,4 @@
import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { beforeEach, describe, expect, it, vi } from "vitest";
import type { OpenClawConfig } from "../config/config.js";
import { buildConfiguredAcpSessionKey } from "./persistent-bindings.types.js";
@@ -43,11 +43,8 @@ const baseCfg = {
let resetAcpSessionInPlace: typeof import("./persistent-bindings.lifecycle.js").resetAcpSessionInPlace;
beforeAll(async () => {
({ resetAcpSessionInPlace } = await import("./persistent-bindings.lifecycle.js"));
});
beforeEach(() => {
beforeEach(async () => {
vi.resetModules();
managerMocks.resolveSession.mockReset().mockReturnValue({ kind: "none" });
managerMocks.closeSession.mockReset().mockResolvedValue({
runtimeClosed: true,
@@ -57,6 +54,7 @@ beforeEach(() => {
managerMocks.updateSessionRuntimeOptions.mockReset().mockResolvedValue(undefined);
sessionMetaMocks.readAcpSessionEntry.mockReset().mockReturnValue(undefined);
resolveMocks.resolveConfiguredAcpBindingSpecBySessionKey.mockReset().mockReturnValue(null);
({ resetAcpSessionInPlace } = await import("./persistent-bindings.lifecycle.js"));
});
describe("resetAcpSessionInPlace", () => {

View File

@@ -0,0 +1,5 @@
export {
formatUtcTimestamp,
formatZonedTimestamp,
resolveTimezone,
} from "../infra/format-time/format-datetime.js";

View File

@@ -129,7 +129,7 @@ const RUNTIME_API_EXPORT_GUARDS: Record<string, readonly string[]> = {
'export { writeJsonFileAtomically } from "openclaw/plugin-sdk/json-store";',
'export type { ChannelDirectoryEntry, ChannelMessageActionContext } from "openclaw/plugin-sdk/channel-contract";',
'export type { OpenClawConfig } from "openclaw/plugin-sdk/config-types";',
'export { formatZonedTimestamp } from "openclaw/plugin-sdk/core";',
'export { formatZonedTimestamp } from "openclaw/plugin-sdk/time-runtime";',
'export type { PluginRuntime, RuntimeLogger } from "openclaw/plugin-sdk/plugin-runtime";',
'export type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env";',
'export type { WizardPrompter } from "openclaw/plugin-sdk/setup";',