refactor: delete dead infra and config exports (#106019)

* refactor: delete dead infra and config exports

* refactor: preserve live infra and config contracts

* refactor(config): remove obsolete file-store lifecycle APIs

* refactor(infra): finish current-main dead export cleanup
This commit is contained in:
Peter Steinberger
2026-07-13 12:00:47 -07:00
committed by GitHub
parent 8dd57279cd
commit d1684f48a3
444 changed files with 3161 additions and 14814 deletions
+3 -8
View File
@@ -7,11 +7,7 @@ import {
type OpenClawConfig,
} from "../../config/config.js";
import { onAgentEvent } from "../../infra/agent-events.js";
import {
requestHeartbeat,
resetHeartbeatWakeStateForTests,
setHeartbeatWakeHandler,
} from "../../infra/heartbeat-wake.js";
import { requestHeartbeat, setHeartbeatWakeHandler } from "../../infra/heartbeat-wake.js";
import * as execModule from "../../process/exec.js";
import { onSessionTranscriptUpdate } from "../../sessions/transcript-events.js";
import { VERSION } from "../../version.js";
@@ -190,12 +186,11 @@ describe("plugin runtime command execution", () => {
it("maps deprecated runtime.system.requestHeartbeatNow to an immediate compatibility wake", async () => {
vi.useFakeTimers();
resetHeartbeatWakeStateForTests();
const handler = vi.fn(async (_request: Parameters<typeof requestHeartbeat>[0]) => ({
status: "skipped" as const,
reason: "disabled",
}));
setHeartbeatWakeHandler(handler);
const dispose = setHeartbeatWakeHandler(handler);
try {
createPluginRuntime().system.requestHeartbeatNow({
reason: "legacy-plugin",
@@ -209,7 +204,7 @@ describe("plugin runtime command execution", () => {
expect(request?.intent).toBe("immediate");
expect(request?.reason).toBe("legacy-plugin");
} finally {
resetHeartbeatWakeStateForTests();
dispose();
vi.useRealTimers();
}
});
+7 -5
View File
@@ -18,6 +18,12 @@ import type {
} from "../../auto-reply/reply/mentions.types.js";
import type { CreateReplyDispatcherWithTyping } from "../../auto-reply/reply/reply-dispatcher.runtime-types.js";
import type { LoadChannelOutboundAdapter } from "../../channels/plugins/outbound/load.types.js";
import type { ResolveMarkdownTableMode } from "../../config/markdown-tables.types.js";
import type {
ReadSessionUpdatedAt,
RecordSessionMetaFromInbound,
UpdateLastRoute,
} from "../../config/sessions/runtime-types.js";
type DispatchReplyWithBufferedBlockDispatcher =
import("../../auto-reply/reply/provider-dispatcher.types.js").DispatchReplyWithBufferedBlockDispatcher;
@@ -25,10 +31,6 @@ type ReadChannelAllowFromStoreForAccount =
import("../../pairing/pairing-store.types.js").ReadChannelAllowFromStoreForAccount;
type UpsertChannelPairingRequestForAccount =
import("../../pairing/pairing-store.types.js").UpsertChannelPairingRequestForAccount;
type ReadSessionUpdatedAt = import("../../config/sessions/runtime-types.js").ReadSessionUpdatedAt;
type RecordSessionMetaFromInbound =
import("../../config/sessions/runtime-types.js").RecordSessionMetaFromInbound;
type UpdateLastRoute = import("../../config/sessions/runtime-types.js").UpdateLastRoute;
type RecordInboundSession = import("../../channels/session.types.js").RecordInboundSession;
type RuntimeThreadBindingLifecycleRecord =
@@ -83,7 +85,7 @@ export type PluginRuntimeChannel = {
resolveChunkMode: typeof import("../../auto-reply/chunk.js").resolveChunkMode;
resolveTextChunkLimit: typeof import("../../auto-reply/chunk.js").resolveTextChunkLimit;
hasControlCommand: typeof import("../../auto-reply/command-detection.js").hasControlCommand;
resolveMarkdownTableMode: import("../../config/markdown-tables.types.js").ResolveMarkdownTableMode;
resolveMarkdownTableMode: ResolveMarkdownTableMode;
convertMarkdownTables: typeof import("../../../packages/markdown-core/src/tables.js").convertMarkdownTables;
};
reply: {
+9 -5
View File
@@ -1,5 +1,7 @@
// Core runtime types define system, config, and task helper contracts for plugins.
import type { CreateChannelIngressQueueOptions } from "../../channels/message/ingress-queue.js";
import type { ConfigMutationBase } from "../../config/mutation-types.js";
import type { SessionPluginJsonValue } from "../../config/sessions/types.js";
import type { HeartbeatRunResult } from "../../infra/heartbeat-wake.js";
import type { LogLevel } from "../../logging/levels.js";
import type { MediaUnderstandingRuntime } from "../../media-understanding/runtime-types.js";
@@ -34,13 +36,12 @@ type DeepReadonly<T> = T extends (...args: never[]) => unknown
type RuntimeConfigAfterWrite = import("../../config/config.js").ConfigWriteAfterWrite;
type RuntimeConfigReplaceResult = import("../../config/mutate.js").ConfigReplaceResult;
type RuntimeConfigMutationBase = import("../../config/mutate.js").ConfigMutationBase;
type RuntimeConfigMutationContext = {
snapshot: import("../../config/types.openclaw.js").ConfigFileSnapshot;
previousHash: string | null;
};
type RuntimeMutateConfigFileParams<T = void> = {
base?: RuntimeConfigMutationBase;
base?: ConfigMutationBase;
baseHash?: string;
afterWrite: RuntimeConfigAfterWrite;
writeOptions?: RuntimeWriteConfigOptions;
@@ -56,6 +57,9 @@ type RuntimeReplaceConfigFileParams = {
writeOptions?: RuntimeWriteConfigOptions;
};
type RuntimeSessionEntry = import("../../config/sessions/types.js").SessionEntry;
type RuntimeSessionPluginExtensions =
| Record<string, Record<string, SessionPluginJsonValue>>
| undefined;
type RuntimeSessionStoreReadParams = {
agentId?: string;
env?: NodeJS.ProcessEnv;
@@ -76,7 +80,7 @@ type RuntimeCreateSessionEntryResult = {
entry: RuntimeSessionEntry;
};
type RuntimeCreateSessionEntryFinalPatch = {
pluginExtensions: RuntimeSessionEntry["pluginExtensions"];
pluginExtensions: RuntimeSessionPluginExtensions;
};
type RuntimeCreateSessionEntryBaseParams = {
cfg: import("../../config/types.openclaw.js").OpenClawConfig;
@@ -92,14 +96,14 @@ type RuntimeCreateSessionEntryBaseParams = {
| {
agentHarnessId: string;
modelSelectionLocked?: true;
pluginExtensions?: RuntimeSessionEntry["pluginExtensions"];
pluginExtensions?: RuntimeSessionPluginExtensions;
}
| {
cliBackendId: string;
model: string;
cliSessionBinding: import("../../config/sessions/types.js").CliSessionBinding;
modelSelectionLocked: true;
pluginExtensions?: RuntimeSessionEntry["pluginExtensions"];
pluginExtensions?: RuntimeSessionPluginExtensions;
/** Registry-injected owner; plugin callers cannot select another owner. */
pluginOwnerId?: string;
};