From 01741f81f84e1d60eaacf4975be6a2c7b8678dbf Mon Sep 17 00:00:00 2001 From: Shakker Date: Sat, 9 May 2026 11:26:33 +0100 Subject: [PATCH] test: remove stale unused imports --- .../src/browser/client-actions-core.ts | 2 +- extensions/feishu/src/bot.ts | 1 - extensions/google/api.ts | 1 - extensions/imessage/src/probe.ts | 1 - extensions/matrix/src/matrix/client/config.ts | 12 ++------- extensions/matrix/src/matrix/config-update.ts | 6 +---- extensions/microsoft-foundry/onboard.ts | 1 - extensions/openshell/src/cli.ts | 1 - extensions/qa-channel/src/bus-client.ts | 2 -- extensions/qa-lab/src/model-selection.ts | 1 - extensions/qa-lab/src/qa-gateway-config.ts | 2 +- extensions/whatsapp/src/active-listener.ts | 2 +- extensions/whatsapp/src/session.ts | 4 +-- extensions/xai/api.ts | 4 --- extensions/xai/src/web-search-shared.ts | 1 - extensions/zalouser/src/setup-surface.ts | 1 - src/agents/agent-scope.ts | 5 ---- src/agents/auth-profiles/external-cli-sync.ts | 3 --- src/agents/auth-profiles/paths.ts | 1 - src/agents/auth-profiles/usage.ts | 2 -- src/agents/bash-tools.exec.ts | 6 +---- src/agents/live-model-switch.ts | 1 - src/agents/model-auth.ts | 7 +----- src/agents/pi-embedded-error-observation.ts | 1 - src/agents/pi-embedded-helpers/errors.ts | 5 ---- src/agents/pi-tools.policy.ts | 2 +- src/agents/sandbox/backend.types.ts | 2 +- src/agents/subagent-registry-read.ts | 5 ---- src/agents/subagent-registry.ts | 1 - src/agents/subagent-spawn.ts | 3 --- src/agents/tool-policy.ts | 8 +----- src/agents/tools/sessions-access.ts | 10 +------- src/auto-reply/commands-registry.ts | 11 ++------ src/auto-reply/reply/agent-runner-utils.ts | 1 - .../plugins/outbound/direct-text-media.ts | 8 +----- src/channels/registry.ts | 2 +- src/channels/turn/kernel.ts | 1 - src/config/io.ts | 1 - src/cron/service/timer.ts | 2 +- src/flows/model-picker.ts | 1 - src/gateway/mcp-http.ts | 2 -- src/gateway/session-utils.fs.ts | 7 +----- src/gateway/session-utils.ts | 1 - src/infra/approval-handler-runtime.ts | 2 -- src/infra/heartbeat-runner.ts | 7 +----- src/infra/outbound/deliver.ts | 2 +- src/infra/replace-file.ts | 3 --- src/media-understanding/shared.ts | 2 -- src/plugin-sdk/channel-setup.ts | 1 - src/plugin-sdk/channel-streaming.ts | 3 --- src/plugin-sdk/core.ts | 3 +-- src/plugin-sdk/discord.ts | 1 - src/plugin-sdk/plugin-entry.ts | 1 - src/plugin-sdk/provider-model-shared.ts | 1 - src/plugin-sdk/provider-stream.ts | 6 +---- src/plugin-sdk/runtime.ts | 1 - src/plugin-sdk/tts-runtime.ts | 13 +--------- src/plugin-sdk/webhook-request-guards.ts | 1 - src/plugins/hook-types.ts | 4 --- src/plugins/interactive.ts | 5 +--- src/plugins/provider-auth-input.ts | 6 +---- src/plugins/registry.ts | 19 -------------- src/plugins/runtime/index.ts | 7 +----- src/plugins/runtime/runtime-tasks.types.ts | 1 - src/plugins/types.ts | 25 ++----------------- src/routing/session-key.ts | 4 +-- src/security/audit.ts | 1 - src/trajectory/runtime.ts | 1 - src/utils/message-channel.ts | 5 +--- 69 files changed, 32 insertions(+), 234 deletions(-) diff --git a/extensions/browser/src/browser/client-actions-core.ts b/extensions/browser/src/browser/client-actions-core.ts index f528ad74d8f..7402d1ea4c6 100644 --- a/extensions/browser/src/browser/client-actions-core.ts +++ b/extensions/browser/src/browser/client-actions-core.ts @@ -4,7 +4,7 @@ import type { BrowserActionTabResult, } from "./client-actions-types.js"; import { buildProfileQuery, withBaseUrl } from "./client-actions-url.js"; -import type { BrowserActRequest, BrowserFormField } from "./client-actions.types.js"; +import type { BrowserActRequest } from "./client-actions.types.js"; import { fetchBrowserJson } from "./client-fetch.js"; import { DEFAULT_BROWSER_ACTION_TIMEOUT_MS, diff --git a/extensions/feishu/src/bot.ts b/extensions/feishu/src/bot.ts index ca24a73e1f6..ab3155a8322 100644 --- a/extensions/feishu/src/bot.ts +++ b/extensions/feishu/src/bot.ts @@ -29,7 +29,6 @@ import { parseMessageContent, resolveFeishuGroupSession, resolveFeishuMediaList, - toMessageResourceType, } from "./bot-content.js"; import { buildAgentMediaPayload, diff --git a/extensions/google/api.ts b/extensions/google/api.ts index b49526fd473..81fa6fce004 100644 --- a/extensions/google/api.ts +++ b/extensions/google/api.ts @@ -7,7 +7,6 @@ export { parseGeminiAuth }; export { applyGoogleGeminiModelDefault, GOOGLE_GEMINI_DEFAULT_MODEL } from "./onboard.js"; import { DEFAULT_GOOGLE_API_BASE_URL, - normalizeGoogleApiBaseUrl, normalizeGoogleGenerativeAiBaseUrl, } from "./provider-policy.js"; export { normalizeAntigravityModelId, normalizeGoogleModelId } from "./model-id.js"; diff --git a/extensions/imessage/src/probe.ts b/extensions/imessage/src/probe.ts index 6d876f24f77..b78255ec25a 100644 --- a/extensions/imessage/src/probe.ts +++ b/extensions/imessage/src/probe.ts @@ -10,7 +10,6 @@ import { DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS } from "./constants.js"; import { clearCachedIMessagePrivateApiStatus, getCachedIMessagePrivateApiStatus, - imessageRpcSupportsMethod, setCachedIMessagePrivateApiStatus, type IMessagePrivateApiStatus, } from "./private-api-status.js"; diff --git a/extensions/matrix/src/matrix/client/config.ts b/extensions/matrix/src/matrix/client/config.ts index 04d3405b2af..9f6b1245868 100644 --- a/extensions/matrix/src/matrix/client/config.ts +++ b/extensions/matrix/src/matrix/client/config.ts @@ -27,18 +27,10 @@ import { normalizeOptionalAccountId, ssrfPolicyFromDangerouslyAllowPrivateNetwork, } from "./config-runtime-api.js"; -import { - hasReadyMatrixEnvAuth, - resolveGlobalMatrixEnvConfig, - resolveMatrixEnvAuthReadiness, - resolveScopedMatrixEnvConfig, -} from "./env-auth.js"; +import { resolveGlobalMatrixEnvConfig, resolveScopedMatrixEnvConfig } from "./env-auth.js"; import { repairCurrentTokenStorageMetaDeviceId } from "./storage.js"; import type { MatrixAuth, MatrixResolvedConfig } from "./types.js"; -import { - resolveValidatedMatrixHomeserverUrl, - validateMatrixHomeserverUrl, -} from "./url-validation.js"; +import { resolveValidatedMatrixHomeserverUrl } from "./url-validation.js"; type MatrixAuthClientDeps = { MatrixClient: typeof import("../sdk.js").MatrixClient; diff --git a/extensions/matrix/src/matrix/config-update.ts b/extensions/matrix/src/matrix/config-update.ts index 5b7280a6698..24f9891900f 100644 --- a/extensions/matrix/src/matrix/config-update.ts +++ b/extensions/matrix/src/matrix/config-update.ts @@ -3,11 +3,7 @@ import { coerceSecretRef } from "openclaw/plugin-sdk/secret-ref-runtime"; import { normalizeSecretInputString } from "openclaw/plugin-sdk/setup"; import type { CoreConfig, MatrixConfig } from "../types.js"; import { findMatrixAccountConfig } from "./account-config.js"; -import { - resolveMatrixConfigFieldPath, - resolveMatrixConfigPath, - shouldStoreMatrixAccountAtTopLevel, -} from "./config-paths.js"; +import { shouldStoreMatrixAccountAtTopLevel } from "./config-paths.js"; export { resolveMatrixConfigFieldPath, diff --git a/extensions/microsoft-foundry/onboard.ts b/extensions/microsoft-foundry/onboard.ts index 253703224b2..ca084d7752c 100644 --- a/extensions/microsoft-foundry/onboard.ts +++ b/extensions/microsoft-foundry/onboard.ts @@ -11,7 +11,6 @@ import { execAz, getAccessTokenResult, getLoggedInAccount, - listSubscriptions, } from "./cli.js"; import { type AzAccount, diff --git a/extensions/openshell/src/cli.ts b/extensions/openshell/src/cli.ts index 1748c566c60..c9d36028d29 100644 --- a/extensions/openshell/src/cli.ts +++ b/extensions/openshell/src/cli.ts @@ -2,7 +2,6 @@ import { createRequire } from "node:module"; import path from "node:path"; import { loadJsonFile } from "openclaw/plugin-sdk/json-store"; import { - buildExecRemoteCommand, createSshSandboxSessionFromConfigText, runPluginCommandWithTimeout, shellEscape, diff --git a/extensions/qa-channel/src/bus-client.ts b/extensions/qa-channel/src/bus-client.ts index 7fba6036118..0d212ecf416 100644 --- a/extensions/qa-channel/src/bus-client.ts +++ b/extensions/qa-channel/src/bus-client.ts @@ -2,8 +2,6 @@ import http from "node:http"; import https from "node:https"; import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime"; import type { - QaBusConversation, - QaBusEvent, QaBusInboundMessageInput, QaBusMessage, QaBusPollResult, diff --git a/extensions/qa-lab/src/model-selection.ts b/extensions/qa-lab/src/model-selection.ts index b36fc213b51..e16118304c7 100644 --- a/extensions/qa-lab/src/model-selection.ts +++ b/extensions/qa-lab/src/model-selection.ts @@ -1,7 +1,6 @@ import { DEFAULT_QA_LIVE_PROVIDER_MODE, getQaProvider, - type QaProviderMode, type QaProviderModeInput, } from "./providers/index.js"; diff --git a/extensions/qa-lab/src/qa-gateway-config.ts b/extensions/qa-lab/src/qa-gateway-config.ts index c7b7183ff5a..2db4c724f3b 100644 --- a/extensions/qa-lab/src/qa-gateway-config.ts +++ b/extensions/qa-lab/src/qa-gateway-config.ts @@ -8,7 +8,7 @@ import { } from "./model-selection.js"; import { getQaProvider } from "./providers/index.js"; import { DEFAULT_QA_PROVIDER_MODE } from "./providers/index.js"; -import { normalizeQaThinkingLevel, type QaThinkingLevel } from "./qa-thinking.js"; +import { type QaThinkingLevel } from "./qa-thinking.js"; import type { QaTransportGatewayConfig } from "./qa-transport.js"; export { normalizeQaThinkingLevel, type QaThinkingLevel } from "./qa-thinking.js"; diff --git a/extensions/whatsapp/src/active-listener.ts b/extensions/whatsapp/src/active-listener.ts index 96bda4a9f0d..351f9971689 100644 --- a/extensions/whatsapp/src/active-listener.ts +++ b/extensions/whatsapp/src/active-listener.ts @@ -1,7 +1,7 @@ import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveDefaultWhatsAppAccountId } from "./account-ids.js"; import { getRegisteredWhatsAppConnectionController } from "./connection-controller-registry.js"; -import type { ActiveWebListener, ActiveWebSendOptions } from "./inbound/types.js"; +import type { ActiveWebListener } from "./inbound/types.js"; export type { ActiveWebListener, ActiveWebSendOptions } from "./inbound/types.js"; diff --git a/extensions/whatsapp/src/session.ts b/extensions/whatsapp/src/session.ts index 6eb31a6a994..93dfd933e30 100644 --- a/extensions/whatsapp/src/session.ts +++ b/extensions/whatsapp/src/session.ts @@ -20,13 +20,11 @@ import { } from "./auth-store.js"; import { enqueueCredsSave, - waitForCredsSaveQueue, waitForCredsSaveQueueWithTimeout, writeCredsJsonAtomically, - type CredsQueueWaitResult, } from "./creds-persistence.js"; import { renderQrTerminal } from "./qr-terminal.js"; -import { formatError, getStatusCode } from "./session-errors.js"; +import { getStatusCode } from "./session-errors.js"; import { DisconnectReason, fetchLatestBaileysVersion, diff --git a/extensions/xai/api.ts b/extensions/xai/api.ts index 039e66e9319..76c5c985401 100644 --- a/extensions/xai/api.ts +++ b/extensions/xai/api.ts @@ -3,10 +3,6 @@ import { normalizeNativeXaiModelId, normalizeProviderId, } from "openclaw/plugin-sdk/provider-model-shared"; -import { - applyXaiModelCompat, - resolveXaiModelCompatPatch, -} from "openclaw/plugin-sdk/provider-tools"; import { readStringValue } from "openclaw/plugin-sdk/text-runtime"; export { buildXaiProvider } from "./provider-catalog.js"; diff --git a/extensions/xai/src/web-search-shared.ts b/extensions/xai/src/web-search-shared.ts index 4ab20e08881..519b8b6bdec 100644 --- a/extensions/xai/src/web-search-shared.ts +++ b/extensions/xai/src/web-search-shared.ts @@ -2,7 +2,6 @@ import { postTrustedWebToolsJson, wrapWebContent } from "openclaw/plugin-sdk/pro import { normalizeXaiModelId } from "../model-id.js"; import { buildXaiResponsesToolBody, - extractXaiWebSearchContent, resolveXaiResponseTextCitationsAndInline, resolveXaiResponsesEndpoint, } from "./responses-tool-shared.js"; diff --git a/extensions/zalouser/src/setup-surface.ts b/extensions/zalouser/src/setup-surface.ts index b91e056dbb8..e6dd1ad0325 100644 --- a/extensions/zalouser/src/setup-surface.ts +++ b/extensions/zalouser/src/setup-surface.ts @@ -19,7 +19,6 @@ import { checkZcaAuthenticated, } from "./accounts.js"; import { writeQrDataUrlToTempFile } from "./qr-temp-file.js"; -import { zalouserSetupAdapter } from "./setup-core.js"; import { logoutZaloProfile, resolveZaloAllowFromEntries, diff --git a/src/agents/agent-scope.ts b/src/agents/agent-scope.ts index ceaaa8584a0..c071c2594e9 100644 --- a/src/agents/agent-scope.ts +++ b/src/agents/agent-scope.ts @@ -19,15 +19,10 @@ import { } from "../shared/string-coerce.js"; import { resolveUserPath } from "../utils.js"; import { - listAgentEntries, listAgentIds, resolveAgentConfig, - resolveAgentContextLimits, - resolveAgentDir, - resolveDefaultAgentDir, resolveAgentWorkspaceDir, resolveDefaultAgentId, - type ResolvedAgentConfig, } from "./agent-scope-config.js"; import { resolveEffectiveAgentSkillFilter } from "./skills/agent-filter.js"; export { diff --git a/src/agents/auth-profiles/external-cli-sync.ts b/src/agents/auth-profiles/external-cli-sync.ts index ca92743d192..1e60f0abc4e 100644 --- a/src/agents/auth-profiles/external-cli-sync.ts +++ b/src/agents/auth-profiles/external-cli-sync.ts @@ -13,11 +13,8 @@ import { import { log } from "./constants.js"; import { areOAuthCredentialsEquivalent, - hasUsableOAuthCredential, isSafeToAdoptBootstrapOAuthIdentity, - isSafeToOverwriteStoredOAuthIdentity, shouldBootstrapFromExternalCliCredential, - shouldReplaceStoredOAuthCredential, } from "./oauth-shared.js"; import type { AuthProfileStore, OAuthCredential } from "./types.js"; diff --git a/src/agents/auth-profiles/paths.ts b/src/agents/auth-profiles/paths.ts index 38bcfb86275..fb05e687c45 100644 --- a/src/agents/auth-profiles/paths.ts +++ b/src/agents/auth-profiles/paths.ts @@ -1,7 +1,6 @@ import fs from "node:fs"; import { saveJsonFile } from "../../infra/json-file.js"; import { AUTH_STORE_VERSION } from "./constants.js"; -import { resolveAuthStatePath, resolveAuthStorePath } from "./path-resolve.js"; import type { AuthProfileSecretsStore } from "./types.js"; export { resolveAuthStatePath, diff --git a/src/agents/auth-profiles/usage.ts b/src/agents/auth-profiles/usage.ts index fc44101f9fc..71762a5215e 100644 --- a/src/agents/auth-profiles/usage.ts +++ b/src/agents/auth-profiles/usage.ts @@ -5,10 +5,8 @@ import { logAuthProfileFailureStateChange } from "./state-observation.js"; import { saveAuthProfileStore, updateAuthProfileStoreWithLock } from "./store.js"; import type { AuthProfileFailureReason, AuthProfileStore, ProfileUsageStats } from "./types.js"; import { - clearExpiredCooldowns, isActiveUnusableWindow, isAuthCooldownBypassedForProvider, - isProfileInCooldown, resolveProfileUnusableUntil, } from "./usage-state.js"; export { diff --git a/src/agents/bash-tools.exec.ts b/src/agents/bash-tools.exec.ts index 7b7eb058ae1..89849c7d2c5 100644 --- a/src/agents/bash-tools.exec.ts +++ b/src/agents/bash-tools.exec.ts @@ -47,11 +47,7 @@ import { runExecProcess, execSchema, } from "./bash-tools.exec-runtime.js"; -import type { - ExecElevatedDefaults, - ExecToolDefaults, - ExecToolDetails, -} from "./bash-tools.exec-types.js"; +import type { ExecToolDefaults, ExecToolDetails } from "./bash-tools.exec-types.js"; import { buildSandboxEnv, clampWithDefault, diff --git a/src/agents/live-model-switch.ts b/src/agents/live-model-switch.ts index 1fa1f906577..ee4e38a4b4a 100644 --- a/src/agents/live-model-switch.ts +++ b/src/agents/live-model-switch.ts @@ -1,7 +1,6 @@ import { resolveStorePath } from "../config/sessions/paths.js"; import { loadSessionStore, updateSessionStore } from "../config/sessions/store.js"; import type { SessionEntry } from "../config/sessions/types.js"; -import { LiveSessionModelSwitchError } from "./live-model-switch-error.js"; import { normalizeStoredOverrideModel, resolveDefaultModelForAgent, diff --git a/src/agents/model-auth.ts b/src/agents/model-auth.ts index b8e0b98e3fa..2279ec339b6 100644 --- a/src/agents/model-auth.ts +++ b/src/agents/model-auth.ts @@ -24,7 +24,6 @@ import { type AuthProfileStore, externalCliDiscoveryForProviderAuth, ensureAuthProfileStore, - ensureAuthProfileStoreWithoutExternalProfiles, isConfiguredAwsSdkAuthProfileForProvider, listProfilesForProvider, resolveApiKeyForProfile, @@ -39,11 +38,7 @@ import { isNonSecretApiKeyMarker, NON_ENV_SECRETREF_MARKER, } from "./model-auth-markers.js"; -import { - requireApiKey, - resolveAwsSdkEnvVarName, - type ResolvedProviderAuth, -} from "./model-auth-runtime-shared.js"; +import { type ResolvedProviderAuth } from "./model-auth-runtime-shared.js"; import { normalizeProviderId } from "./model-selection.js"; export { diff --git a/src/agents/pi-embedded-error-observation.ts b/src/agents/pi-embedded-error-observation.ts index 7d0f1f8d80a..c857ac66063 100644 --- a/src/agents/pi-embedded-error-observation.ts +++ b/src/agents/pi-embedded-error-observation.ts @@ -2,7 +2,6 @@ import { readLoggingConfig } from "../logging/config.js"; import { redactIdentifier } from "../logging/redact-identifier.js"; import { getDefaultRedactPatterns, redactSensitiveText } from "../logging/redact.js"; import { normalizeOptionalString } from "../shared/string-coerce.js"; -import { sanitizeForConsole } from "./console-sanitize.js"; import { classifyProviderRuntimeFailureKind, getApiErrorPayloadFingerprint, diff --git a/src/agents/pi-embedded-helpers/errors.ts b/src/agents/pi-embedded-helpers/errors.ts index c805a590b8c..9feca04f191 100644 --- a/src/agents/pi-embedded-helpers/errors.ts +++ b/src/agents/pi-embedded-helpers/errors.ts @@ -4,8 +4,6 @@ import { createSubsystemLogger } from "../../logging/subsystem.js"; import { extractLeadingHttpStatus, formatRawAssistantErrorForUi, - isCloudflareOrHtmlErrorPage, - parseApiErrorInfo, } from "../../shared/assistant-error-format.js"; import { normalizeLowercaseStringOrEmpty, @@ -37,17 +35,14 @@ import { matchesProviderContextOverflow, } from "./provider-error-patterns.js"; import { - BILLING_ERROR_USER_MESSAGE, formatBillingErrorMessage, formatDiskSpaceErrorCopy, formatRateLimitOrOverloadedErrorCopy, formatTransportErrorCopy, - getApiErrorPayloadFingerprint, isInvalidStreamingEventOrderError, isLikelyHttpErrorText, isRawApiErrorPayload, isStreamingJsonParseError, - sanitizeUserFacingText, } from "./sanitize-user-facing-text.js"; import type { FailoverReason } from "./types.js"; diff --git a/src/agents/pi-tools.policy.ts b/src/agents/pi-tools.policy.ts index d2039c56353..d2216a29ff1 100644 --- a/src/agents/pi-tools.policy.ts +++ b/src/agents/pi-tools.policy.ts @@ -26,7 +26,7 @@ import { type SessionCapabilityStore, type SubagentSessionRole, } from "./subagent-capabilities.js"; -import { isToolAllowedByPolicies, isToolAllowedByPolicyName } from "./tool-policy-match.js"; +import { isToolAllowedByPolicyName } from "./tool-policy-match.js"; import { mergeAlsoAllowPolicy, normalizeToolName, diff --git a/src/agents/sandbox/backend.types.ts b/src/agents/sandbox/backend.types.ts index 97600786476..dd6ed445abd 100644 --- a/src/agents/sandbox/backend.types.ts +++ b/src/agents/sandbox/backend.types.ts @@ -1,5 +1,5 @@ import type { OpenClawConfig } from "../../config/types.openclaw.js"; -import type { SandboxBackendHandle, SandboxBackendId } from "./backend-handle.types.js"; +import type { SandboxBackendHandle } from "./backend-handle.types.js"; import type { SandboxRegistryEntry } from "./registry.js"; import type { SandboxConfig } from "./types.js"; diff --git a/src/agents/subagent-registry-read.ts b/src/agents/subagent-registry-read.ts index 85388a64e7e..77c651ed5e6 100644 --- a/src/agents/subagent-registry-read.ts +++ b/src/agents/subagent-registry-read.ts @@ -10,11 +10,6 @@ import { } from "./subagent-registry-queries.js"; import { getSubagentRunsSnapshotForRead } from "./subagent-registry-state.js"; import type { SubagentRunRecord } from "./subagent-registry.types.js"; -import { - getSubagentSessionRuntimeMs, - getSubagentSessionStartedAt, - resolveSubagentSessionStatus, -} from "./subagent-session-metrics.js"; export { getSubagentSessionRuntimeMs, diff --git a/src/agents/subagent-registry.ts b/src/agents/subagent-registry.ts index e8dcec65420..89d891f48f5 100644 --- a/src/agents/subagent-registry.ts +++ b/src/agents/subagent-registry.ts @@ -37,7 +37,6 @@ import { reconcileOrphanedRun, resolveAnnounceRetryDelayMs, resolveSubagentRunOrphanReason, - resolveSubagentSessionStatus, safeRemoveAttachmentsDir, } from "./subagent-registry-helpers.js"; import { createSubagentRegistryLifecycleController } from "./subagent-registry-lifecycle.js"; diff --git a/src/agents/subagent-spawn.ts b/src/agents/subagent-spawn.ts index eed7fef2e2d..8f5370d8f4f 100644 --- a/src/agents/subagent-spawn.ts +++ b/src/agents/subagent-spawn.ts @@ -68,9 +68,6 @@ import { isAdminOnlyMethod, } from "./subagent-spawn.runtime.js"; import { - SUBAGENT_SPAWN_CONTEXT_MODES, - SUBAGENT_SPAWN_MODES, - SUBAGENT_SPAWN_SANDBOX_MODES, type SpawnSubagentContextMode, type SpawnSubagentMode, type SpawnSubagentSandboxMode, diff --git a/src/agents/tool-policy.ts b/src/agents/tool-policy.ts index 65767703021..70f07e04375 100644 --- a/src/agents/tool-policy.ts +++ b/src/agents/tool-policy.ts @@ -1,12 +1,6 @@ import { normalizeOptionalLowercaseString } from "../shared/string-coerce.js"; import { IMPLICIT_ALLOW_ALL_FROM_ALSO_ALLOW } from "./sandbox-tool-policy.js"; -import { - expandToolGroups, - normalizeToolList, - normalizeToolName, - resolveToolProfilePolicy, - TOOL_GROUPS, -} from "./tool-policy-shared.js"; +import { expandToolGroups, normalizeToolList, normalizeToolName } from "./tool-policy-shared.js"; import type { AnyAgentTool } from "./tools/common.js"; export { expandToolGroups, diff --git a/src/agents/tools/sessions-access.ts b/src/agents/tools/sessions-access.ts index 46aa69ad0d0..dcab1a1e66a 100644 --- a/src/agents/tools/sessions-access.ts +++ b/src/agents/tools/sessions-access.ts @@ -1,13 +1,5 @@ import type { OpenClawConfig } from "../../config/types.openclaw.js"; -import { - createAgentToAgentPolicy, - createSessionVisibilityChecker, - createSessionVisibilityGuard, - createSessionVisibilityRowChecker, - listSpawnedSessionKeys, - resolveEffectiveSessionToolsVisibility, - resolveSandboxSessionToolsVisibility, -} from "../../plugin-sdk/session-visibility.js"; +import { resolveSandboxSessionToolsVisibility } from "../../plugin-sdk/session-visibility.js"; import { isSubagentSessionKey } from "../../routing/session-key.js"; import { normalizeOptionalString } from "../../shared/string-coerce.js"; import { resolveInternalSessionKey, resolveMainSessionAlias } from "./sessions-resolution.js"; diff --git a/src/auto-reply/commands-registry.ts b/src/auto-reply/commands-registry.ts index eea5cce631e..e5e19c1eb01 100644 --- a/src/auto-reply/commands-registry.ts +++ b/src/auto-reply/commands-registry.ts @@ -7,22 +7,15 @@ import type { SkillCommandSpec } from "../agents/skills.js"; import { getChannelPlugin, getLoadedChannelPlugin } from "../channels/plugins/index.js"; import type { OpenClawConfig } from "../config/types.js"; import { normalizeOptionalLowercaseString } from "../shared/string-coerce.js"; -import { - isCommandEnabled, - listChatCommands, - listChatCommandsForConfig, -} from "./commands-registry-list.js"; -import { normalizeCommandBody, resolveTextCommand } from "./commands-registry-normalize.js"; +import { listChatCommands, listChatCommandsForConfig } from "./commands-registry-list.js"; +import { normalizeCommandBody } from "./commands-registry-normalize.js"; import { getChatCommands } from "./commands-registry.data.js"; import type { ChatCommandDefinition, CommandArgChoiceContext, CommandArgDefinition, - CommandArgMenuSpec, CommandArgValues, CommandArgs, - CommandDetection, - CommandNormalizeOptions, NativeCommandSpec, } from "./commands-registry.types.js"; import type { ThinkingCatalogEntry } from "./thinking.shared.js"; diff --git a/src/auto-reply/reply/agent-runner-utils.ts b/src/auto-reply/reply/agent-runner-utils.ts index 8960bc30423..bd002f4ca5f 100644 --- a/src/auto-reply/reply/agent-runner-utils.ts +++ b/src/auto-reply/reply/agent-runner-utils.ts @@ -29,7 +29,6 @@ import { export { resolveProviderScopedAuthProfile, resolveRunAuthProfile }; import { buildEmbeddedRunBaseParams as buildEmbeddedRunBaseParamsCore, - resolveModelFallbackOptions, resolveEnforceFinalTagWithResolver, } from "./agent-runner-run-params.js"; export { resolveModelFallbackOptions } from "./agent-runner-run-params.js"; diff --git a/src/channels/plugins/outbound/direct-text-media.ts b/src/channels/plugins/outbound/direct-text-media.ts index 2f04ca758cd..9b1e3025ee8 100644 --- a/src/channels/plugins/outbound/direct-text-media.ts +++ b/src/channels/plugins/outbound/direct-text-media.ts @@ -1,11 +1,5 @@ import { sanitizeForPlainText } from "openclaw/plugin-sdk/outbound-runtime"; -import { - resolvePayloadMediaUrls, - sendPayloadMediaSequence, - sendPayloadMediaSequenceAndFinalize, - sendPayloadMediaSequenceOrFallback, - sendTextMediaPayload, -} from "openclaw/plugin-sdk/reply-payload"; +import { sendTextMediaPayload } from "openclaw/plugin-sdk/reply-payload"; import { chunkText } from "../../../auto-reply/chunk.js"; import type { OpenClawConfig } from "../../../config/types.openclaw.js"; import type { OutboundSendDeps } from "../../../infra/outbound/deliver.js"; diff --git a/src/channels/registry.ts b/src/channels/registry.ts index d225e8be7f5..c82b0911492 100644 --- a/src/channels/registry.ts +++ b/src/channels/registry.ts @@ -3,7 +3,7 @@ import { normalizeOptionalLowercaseString, normalizeOptionalString, } from "../shared/string-coerce.js"; -import { CHAT_CHANNEL_ORDER, normalizeChatChannelId, type ChatChannelId } from "./ids.js"; +import { normalizeChatChannelId, type ChatChannelId } from "./ids.js"; import type { ChannelId } from "./plugins/channel-id.types.js"; import type { ChannelMeta } from "./plugins/types.core.js"; export { getChatChannelMeta } from "./chat-meta.js"; diff --git a/src/channels/turn/kernel.ts b/src/channels/turn/kernel.ts index 8ed79a5ae45..26f8a9bca80 100644 --- a/src/channels/turn/kernel.ts +++ b/src/channels/turn/kernel.ts @@ -28,7 +28,6 @@ import type { ChannelTurnDeliveryAdapter, ChannelTurnHistoryFinalizeOptions, ChannelTurnLogEvent, - ChannelTurnReplyPipelineOptions, ChannelTurnResolved, ChannelTurnResult, DispatchedChannelTurnResult, diff --git a/src/config/io.ts b/src/config/io.ts index f9daba9093d..52ac22452db 100644 --- a/src/config/io.ts +++ b/src/config/io.ts @@ -32,7 +32,6 @@ import { maintainConfigBackups } from "./backup-rotation.js"; import { restoreEnvVarRefs } from "./env-preserve.js"; import { type EnvSubstitutionWarning, - MissingEnvVarError, containsEnvVarReference, resolveConfigEnvVars, } from "./env-substitution.js"; diff --git a/src/cron/service/timer.ts b/src/cron/service/timer.ts index 0ae5a327305..37da0b04d39 100644 --- a/src/cron/service/timer.ts +++ b/src/cron/service/timer.ts @@ -46,7 +46,7 @@ import { import { locked } from "./locked.js"; import type { CronEvent, CronServiceState } from "./state.js"; import { ensureLoaded, persist } from "./store.js"; -import { DEFAULT_JOB_TIMEOUT_MS, resolveCronJobTimeoutMs } from "./timeout-policy.js"; +import { resolveCronJobTimeoutMs } from "./timeout-policy.js"; export { DEFAULT_JOB_TIMEOUT_MS } from "./timeout-policy.js"; diff --git a/src/flows/model-picker.ts b/src/flows/model-picker.ts index 6e41daaba5b..62e20efad30 100644 --- a/src/flows/model-picker.ts +++ b/src/flows/model-picker.ts @@ -27,7 +27,6 @@ import { resolveAgentModelPrimaryValue, } from "../config/model-input.js"; import type { OpenClawConfig } from "../config/types.openclaw.js"; -import { applyPrimaryModel } from "../plugins/provider-model-primary.js"; import { resolveOwningPluginIdsForProvider } from "../plugins/providers.js"; import type { ProviderPlugin } from "../plugins/types.js"; import type { RuntimeEnv } from "../runtime.js"; diff --git a/src/gateway/mcp-http.ts b/src/gateway/mcp-http.ts index 4d6220d617d..26ee6ee1cd3 100644 --- a/src/gateway/mcp-http.ts +++ b/src/gateway/mcp-http.ts @@ -11,8 +11,6 @@ import { logDebug, logWarn } from "../logger.js"; import { handleMcpJsonRpc } from "./mcp-http.handlers.js"; import { clearActiveMcpLoopbackRuntimeByOwnerToken, - createMcpLoopbackServerConfig, - getActiveMcpLoopbackRuntime, setActiveMcpLoopbackRuntime, } from "./mcp-http.loopback-runtime.js"; import { jsonRpcError, type JsonRpcRequest } from "./mcp-http.protocol.js"; diff --git a/src/gateway/session-utils.fs.ts b/src/gateway/session-utils.fs.ts index 6c0525c1eac..5b8c0057db7 100644 --- a/src/gateway/session-utils.fs.ts +++ b/src/gateway/session-utils.fs.ts @@ -8,12 +8,7 @@ import { normalizeLowercaseStringOrEmpty } from "../shared/string-coerce.js"; import { stripInlineDirectiveTagsForDisplay } from "../utils/directive-tags.js"; import { extractToolCallNames, hasToolCall } from "../utils/transcript-tools.js"; import { stripEnvelope } from "./chat-sanitize.js"; -import { - resolveSessionTranscriptCandidates, - archiveFileOnDisk, - archiveSessionTranscripts, - cleanupArchivedSessionTranscripts, -} from "./session-transcript-files.fs.js"; +import { resolveSessionTranscriptCandidates } from "./session-transcript-files.fs.js"; import { readSessionTranscriptIndex, type IndexedTranscriptEntry, diff --git a/src/gateway/session-utils.ts b/src/gateway/session-utils.ts index 5a4a712e82f..3b33a299f05 100644 --- a/src/gateway/session-utils.ts +++ b/src/gateway/session-utils.ts @@ -81,7 +81,6 @@ import { import { normalizeSessionDeliveryFields } from "../utils/delivery-context.shared.js"; import { estimateUsageCost, resolveModelCostConfig } from "../utils/usage-format.js"; import { - canonicalizeSpawnedByForAgent, resolveSessionStoreAgentId, resolveSessionStoreKey, resolveStoredSessionKeyForAgentStore, diff --git a/src/infra/approval-handler-runtime.ts b/src/infra/approval-handler-runtime.ts index 57764478934..494d70c907b 100644 --- a/src/infra/approval-handler-runtime.ts +++ b/src/infra/approval-handler-runtime.ts @@ -28,8 +28,6 @@ import { buildResolvedApprovalView, } from "./approval-view-model.js"; import type { - ApprovalActionView, - ApprovalMetadataView, ExpiredApprovalView, PendingApprovalView, ResolvedApprovalView, diff --git a/src/infra/heartbeat-runner.ts b/src/infra/heartbeat-runner.ts index 3bf1e208b93..014e154360e 100644 --- a/src/infra/heartbeat-runner.ts +++ b/src/infra/heartbeat-runner.ts @@ -106,12 +106,7 @@ import { resolveNextHeartbeatDueMs, seekNextActivePhaseDueMs, } from "./heartbeat-schedule.js"; -import { - isHeartbeatEnabledForAgent, - resolveHeartbeatIntervalMs, - resolveHeartbeatSummaryForAgent, - type HeartbeatSummary, -} from "./heartbeat-summary.js"; +import { isHeartbeatEnabledForAgent, resolveHeartbeatIntervalMs } from "./heartbeat-summary.js"; import { createHeartbeatTypingCallbacks } from "./heartbeat-typing.js"; import { resolveHeartbeatVisibility } from "./heartbeat-visibility.js"; import { diff --git a/src/infra/outbound/deliver.ts b/src/infra/outbound/deliver.ts index 5dbb736367d..b8d930ec397 100644 --- a/src/infra/outbound/deliver.ts +++ b/src/infra/outbound/deliver.ts @@ -79,7 +79,7 @@ import { } from "./payloads.js"; import { createReplyToDeliveryPolicy } from "./reply-policy.js"; import { stripInternalRuntimeScaffolding } from "./sanitize-text.js"; -import { resolveOutboundSendDep, type OutboundSendDeps } from "./send-deps.js"; +import { type OutboundSendDeps } from "./send-deps.js"; import type { OutboundSessionContext } from "./session-context.js"; import type { OutboundChannel } from "./targets.js"; diff --git a/src/infra/replace-file.ts b/src/infra/replace-file.ts index 85034d34cd5..4714c6278ca 100644 --- a/src/infra/replace-file.ts +++ b/src/infra/replace-file.ts @@ -3,9 +3,6 @@ import fs from "node:fs/promises"; import path from "node:path"; import { movePathWithCopyFallback as movePathWithCopyFallbackBase, - replaceDirectoryAtomic, - replaceFileAtomic, - replaceFileAtomicSync, type MovePathWithCopyFallbackOptions as BaseMovePathWithCopyFallbackOptions, } from "@openclaw/fs-safe/atomic"; diff --git a/src/media-understanding/shared.ts b/src/media-understanding/shared.ts index a57601da8f0..e1a3895c2e1 100644 --- a/src/media-understanding/shared.ts +++ b/src/media-understanding/shared.ts @@ -7,9 +7,7 @@ import type { } from "../agents/provider-attribution.js"; import { buildProviderRequestDispatcherPolicy, - normalizeBaseUrl, resolveProviderRequestPolicyConfig, - sanitizeConfiguredModelProviderRequest, type ProviderRequestTransportOverrides, type ResolvedProviderRequestConfig, } from "../agents/provider-request-config.js"; diff --git a/src/plugin-sdk/channel-setup.ts b/src/plugin-sdk/channel-setup.ts index 5a9b54b38e2..cbf3d1f468d 100644 --- a/src/plugin-sdk/channel-setup.ts +++ b/src/plugin-sdk/channel-setup.ts @@ -1,6 +1,5 @@ import type { ChannelSetupWizard } from "../channels/plugins/setup-wizard-types.js"; import type { ChannelSetupAdapter } from "../channels/plugins/types.adapters.js"; -import type { ChannelSetupInput } from "../channels/plugins/types.core.js"; import { createOptionalChannelSetupAdapter, createOptionalChannelSetupWizard, diff --git a/src/plugin-sdk/channel-streaming.ts b/src/plugin-sdk/channel-streaming.ts index e8d01ae3394..a3072866ec5 100644 --- a/src/plugin-sdk/channel-streaming.ts +++ b/src/plugin-sdk/channel-streaming.ts @@ -3,12 +3,9 @@ import { formatToolAggregate } from "../auto-reply/tool-meta.js"; import type { BlockStreamingChunkConfig, BlockStreamingCoalesceConfig, - ChannelDeliveryStreamingConfig, - ChannelPreviewStreamingConfig, ChannelStreamingCommandTextMode, ChannelStreamingProgressConfig, ChannelStreamingConfig, - SlackChannelStreamingConfig, StreamingMode, TextChunkMode, } from "../config/types.base.js"; diff --git a/src/plugin-sdk/core.ts b/src/plugin-sdk/core.ts index 43853224847..c6208bdaa79 100644 --- a/src/plugin-sdk/core.ts +++ b/src/plugin-sdk/core.ts @@ -12,7 +12,7 @@ import type { ChannelPairingAdapter, ChannelSecurityAdapter, } from "../channels/plugins/types.adapters.js"; -import type { ChannelConfigSchema, ChannelConfigUiHint } from "../channels/plugins/types.config.js"; +import type { ChannelConfigSchema } from "../channels/plugins/types.config.js"; import type { ChannelMessagingAdapter, ChannelOutboundSessionRoute, @@ -27,7 +27,6 @@ import { buildOutboundBaseSessionKey } from "../infra/outbound/base-session-key. import type { OutboundDeliveryResult } from "../infra/outbound/deliver.js"; import { normalizeOutboundThreadId } from "../infra/outbound/thread-id.js"; import { resolveBundledPluginsDir } from "../plugins/bundled-dir.js"; -import type { ProviderRuntimeModel } from "../plugins/provider-runtime-model.types.js"; import type { PluginRuntime } from "../plugins/runtime/types.js"; import type { OpenClawPluginApi } from "../plugins/types.js"; import { resolveThreadSessionKeys } from "../routing/session-key.js"; diff --git a/src/plugin-sdk/discord.ts b/src/plugin-sdk/discord.ts index ed3c5d7c83e..2546ac753b3 100644 --- a/src/plugin-sdk/discord.ts +++ b/src/plugin-sdk/discord.ts @@ -1,7 +1,6 @@ import type { ChannelAccountSnapshot, ChannelGroupContext, - ChannelMessageActionAdapter, ChannelStatusIssue, } from "./channel-contract.js"; import type { ChannelPlugin } from "./channel-core.js"; diff --git a/src/plugin-sdk/plugin-entry.ts b/src/plugin-sdk/plugin-entry.ts index 0d17a708e6e..466591d6451 100644 --- a/src/plugin-sdk/plugin-entry.ts +++ b/src/plugin-sdk/plugin-entry.ts @@ -1,6 +1,5 @@ import type { OpenClawConfig } from "../config/types.openclaw.js"; import { emptyPluginConfigSchema } from "../plugins/config-schema.js"; -import type { ProviderRuntimeModel } from "../plugins/provider-runtime-model.types.js"; import type { AnyAgentTool, AgentHarness, diff --git a/src/plugin-sdk/provider-model-shared.ts b/src/plugin-sdk/provider-model-shared.ts index a6c9c94c1ef..da35431c3e4 100644 --- a/src/plugin-sdk/provider-model-shared.ts +++ b/src/plugin-sdk/provider-model-shared.ts @@ -3,7 +3,6 @@ // Keep provider-owned exports out of this subpath so plugin loaders can import it // without recursing through provider-specific facades. -import type { BedrockDiscoveryConfig, ModelDefinitionConfig } from "../config/types.models.js"; import { buildAnthropicReplayPolicyForModel, buildGoogleGeminiReplayPolicy, diff --git a/src/plugin-sdk/provider-stream.ts b/src/plugin-sdk/provider-stream.ts index adeee16dfb3..059d690cec3 100644 --- a/src/plugin-sdk/provider-stream.ts +++ b/src/plugin-sdk/provider-stream.ts @@ -1,7 +1,4 @@ -import { - createGoogleThinkingPayloadWrapper, - sanitizeGoogleThinkingPayload, -} from "../agents/pi-embedded-runner/google-stream-wrappers.js"; +import { createGoogleThinkingPayloadWrapper } from "../agents/pi-embedded-runner/google-stream-wrappers.js"; import { createMinimaxFastModeWrapper } from "../agents/pi-embedded-runner/minimax-stream-wrappers.js"; import { resolveMoonshotThinkingKeep } from "../agents/pi-embedded-runner/moonshot-thinking-stream-wrappers.js"; import { @@ -20,7 +17,6 @@ import { } from "../agents/pi-embedded-runner/openai-stream-wrappers.js"; import { createKilocodeWrapper, - createOpenRouterSystemCacheWrapper, createOpenRouterWrapper, isProxyReasoningUnsupported, } from "../agents/pi-embedded-runner/proxy-stream-wrappers.js"; diff --git a/src/plugin-sdk/runtime.ts b/src/plugin-sdk/runtime.ts index f49f5708bde..edd6b038286 100644 --- a/src/plugin-sdk/runtime.ts +++ b/src/plugin-sdk/runtime.ts @@ -1,4 +1,3 @@ -import type { OutputRuntimeEnv, RuntimeEnv } from "../runtime.js"; export type { OutputRuntimeEnv, RuntimeEnv } from "../runtime.js"; export { createNonExitingRuntime, defaultRuntime } from "../runtime.js"; export { resolveCommandSecretRefsViaGateway } from "../cli/command-secret-gateway.js"; diff --git a/src/plugin-sdk/tts-runtime.ts b/src/plugin-sdk/tts-runtime.ts index 5761f3b5d17..346d1dec6d0 100644 --- a/src/plugin-sdk/tts-runtime.ts +++ b/src/plugin-sdk/tts-runtime.ts @@ -3,18 +3,7 @@ import { createLazyFacadeObjectValue, loadActivatedBundledPluginPublicSurfaceModuleSync, } from "./facade-runtime.js"; -import type { - ResolvedTtsConfig, - ResolvedTtsModelOverrides, - TtsDirectiveOverrides, - TtsDirectiveParseResult, - TtsResult, - TtsRuntimeFacade, - TtsSynthesisResult, - TtsSynthesisStreamResult, - TtsStreamResult, - TtsTelephonyResult, -} from "./tts-runtime.types.js"; +import type { TtsRuntimeFacade } from "./tts-runtime.types.js"; export { TtsAutoSchema, TtsConfigSchema, diff --git a/src/plugin-sdk/webhook-request-guards.ts b/src/plugin-sdk/webhook-request-guards.ts index a32168d0114..e831e9fa64e 100644 --- a/src/plugin-sdk/webhook-request-guards.ts +++ b/src/plugin-sdk/webhook-request-guards.ts @@ -1,7 +1,6 @@ import type { IncomingMessage, ServerResponse } from "node:http"; import { formatErrorMessage } from "../infra/errors.js"; import { - installRequestBodyLimitGuard, isRequestBodyLimitError, readJsonBodyWithLimit, readRequestBodyWithLimit, diff --git a/src/plugins/hook-types.ts b/src/plugins/hook-types.ts index 36779728f03..8fe13dd896f 100644 --- a/src/plugins/hook-types.ts +++ b/src/plugins/hook-types.ts @@ -9,10 +9,6 @@ import type { FinalizedMsgContext } from "../auto-reply/templating.js"; import type { OpenClawConfig } from "../config/types.openclaw.js"; import type { TtsAutoMode } from "../config/types.tts.js"; import type { DiagnosticTraceContext } from "../infra/diagnostic-trace-context.js"; -import { - PLUGIN_PROMPT_MUTATION_RESULT_FIELDS, - stripPromptMutationFieldsFromLegacyHookResult, -} from "./hook-before-agent-start.types.js"; import type { PluginHookBeforeAgentStartEvent, PluginHookBeforeAgentStartResult, diff --git a/src/plugins/interactive.ts b/src/plugins/interactive.ts index 0f829dd7d82..e42bb02f426 100644 --- a/src/plugins/interactive.ts +++ b/src/plugins/interactive.ts @@ -1,7 +1,4 @@ -import { - resolvePluginInteractiveNamespaceMatch, - type InteractiveRegistrationResult, -} from "./interactive-registry.js"; +import { resolvePluginInteractiveNamespaceMatch } from "./interactive-registry.js"; import { claimPluginInteractiveCallbackDedupe, commitPluginInteractiveCallbackDedupe, diff --git a/src/plugins/provider-auth-input.ts b/src/plugins/provider-auth-input.ts index 058f3c74ab7..232ce5d6982 100644 --- a/src/plugins/provider-auth-input.ts +++ b/src/plugins/provider-auth-input.ts @@ -6,15 +6,11 @@ import { normalizeStringifiedOptionalString, } from "../shared/string-coerce.js"; import type { WizardPrompter } from "../wizard/prompts.js"; -import { - resolveSecretInputModeForEnvSelection, - type SecretInputModePromptCopy, -} from "./provider-auth-mode.js"; +import { resolveSecretInputModeForEnvSelection } from "./provider-auth-mode.js"; import { extractEnvVarFromSourceLabel, promptSecretRefForSetup, resolveRefFallbackInput, - type SecretRefSetupPromptCopy, } from "./provider-auth-ref.js"; import type { SecretInputMode } from "./provider-auth-types.js"; diff --git a/src/plugins/registry.ts b/src/plugins/registry.ts index 2d64ab31fd3..61f5c6f7f2c 100644 --- a/src/plugins/registry.ts +++ b/src/plugins/registry.ts @@ -102,29 +102,10 @@ import { normalizeRegisteredProvider } from "./provider-validation.js"; import { createEmptyPluginRegistry } from "./registry-empty.js"; import { isPluginRegistryRetired } from "./registry-lifecycle.js"; import type { - PluginCliBackendRegistration, - PluginCliRegistration, - PluginCommandRegistration, - PluginControlUiDescriptorRegistryRegistration, - PluginConversationBindingResolvedHandlerRegistration, - PluginHostedMediaResolverRegistration, - PluginHookRegistration, PluginHttpRouteRegistration as RegistryTypesPluginHttpRouteRegistration, - PluginAgentHarnessRegistration, - PluginMemoryEmbeddingProviderRegistration, - PluginNodeHostCommandRegistration, - PluginProviderRegistration, PluginRecord, - PluginRegistry, PluginRegistryParams, - PluginReloadRegistration, - PluginRuntimeLifecycleRegistryRegistration, - PluginSecurityAuditCollectorRegistration, - PluginServiceRegistration, - PluginSessionExtensionRegistryRegistration, PluginTextTransformsRegistration, - PluginToolMetadataRegistryRegistration, - PluginTrustedToolPolicyRegistryRegistration, } from "./registry-types.js"; import { withPluginRuntimePluginIdScope } from "./runtime/gateway-request-scope.js"; import type { PluginRuntime } from "./runtime/types.js"; diff --git a/src/plugins/runtime/index.ts b/src/plugins/runtime/index.ts index 1e2ce62acba..d17901f5154 100644 --- a/src/plugins/runtime/index.ts +++ b/src/plugins/runtime/index.ts @@ -21,12 +21,7 @@ import { listRuntimeVideoGenerationProviders, } from "../../video-generation/runtime.js"; import { listWebSearchProviders, runWebSearch } from "../../web-search/runtime.js"; -import { - gatewaySubagentState, - setGatewayNodesRuntime, - setGatewaySubagentRuntime, - clearGatewaySubagentRuntime, -} from "./gateway-bindings.js"; +import { gatewaySubagentState } from "./gateway-bindings.js"; import { createRuntimeAgent } from "./runtime-agent.js"; import { defineCachedValue } from "./runtime-cache.js"; import { createRuntimeChannel } from "./runtime-channel.js"; diff --git a/src/plugins/runtime/runtime-tasks.types.ts b/src/plugins/runtime/runtime-tasks.types.ts index 6de41ac08c1..106afd06840 100644 --- a/src/plugins/runtime/runtime-tasks.types.ts +++ b/src/plugins/runtime/runtime-tasks.types.ts @@ -1,5 +1,4 @@ import type { OpenClawConfig } from "../../config/types.openclaw.js"; -import type { DetachedTaskLifecycleRuntime } from "../../tasks/detached-task-runtime-contract.js"; import type { TaskDeliveryState } from "../../tasks/task-registry.types.js"; import type { OpenClawPluginToolContext } from "../tool-types.js"; import type { PluginRuntimeTaskFlow } from "./runtime-taskflow.types.js"; diff --git a/src/plugins/types.ts b/src/plugins/types.ts index debd8247a59..9a82aacd619 100644 --- a/src/plugins/types.ts +++ b/src/plugins/types.ts @@ -84,26 +84,13 @@ import type { AgentToolResultMiddleware, AgentToolResultMiddlewareOptions, } from "./agent-tool-result-middleware-types.js"; -import type { - CliBackendAuthEpochMode, - CliBackendNormalizeConfigContext, - CliBackendPreparedExecution, - CliBackendPrepareExecutionContext, - CliBackendResolveExecutionArgs, - CliBackendResolveExecutionArgsContext, - CliBackendThinkingLevel, - CliBackendPlugin, - CliBundleMcpMode, - PluginTextReplacement, - PluginTextTransforms, -} from "./cli-backend.types.js"; +import type { CliBackendPlugin, PluginTextTransforms } from "./cli-backend.types.js"; import type { CodexAppServerExtensionFactory } from "./codex-app-server-extension-types.js"; import type { PluginConversationBinding, PluginConversationBindingRequestParams, PluginConversationBindingRequestResult, PluginConversationBindingResolvedEvent, - PluginConversationBindingResolutionDecision, } from "./conversation-binding.types.js"; import type { PluginHookHandlerMap, PluginHookName } from "./hook-types.js"; import type { @@ -112,7 +99,6 @@ import type { PluginJsonValue, PluginNextTurnInjection, PluginNextTurnInjectionEnqueueResult, - PluginNextTurnInjectionRecord, PluginRunContextGetParams, PluginRunContextPatch, PluginRuntimeLifecycleRegistration, @@ -122,14 +108,8 @@ import type { PluginToolMetadataRegistration, PluginTrustedToolPolicyRegistration, } from "./host-hooks.js"; -import type { - PluginBundleFormat, - PluginConfigUiHint, - PluginDiagnostic, - PluginFormat, -} from "./manifest-types.js"; +import type { PluginConfigUiHint } from "./manifest-types.js"; import type { PluginKind } from "./plugin-kind.types.js"; -import type { PluginOrigin } from "./plugin-origin.types.js"; import type { SecretInputMode } from "./provider-auth-types.js"; import type { ProviderApplyConfigDefaultsContext, @@ -154,7 +134,6 @@ import type { import type { PluginRuntime } from "./runtime/types.js"; import type { OpenClawPluginHookOptions, - OpenClawPluginToolContext, OpenClawPluginToolFactory, OpenClawPluginToolOptions, } from "./tool-types.js"; diff --git a/src/routing/session-key.ts b/src/routing/session-key.ts index 5e56066a7ca..6f2129bf4ca 100644 --- a/src/routing/session-key.ts +++ b/src/routing/session-key.ts @@ -1,7 +1,7 @@ import type { ChatType } from "../channels/chat-type.js"; -import { parseAgentSessionKey, type ParsedAgentSessionKey } from "../sessions/session-key-utils.js"; +import { parseAgentSessionKey } from "../sessions/session-key-utils.js"; import { normalizeLowercaseStringOrEmpty } from "../shared/string-coerce.js"; -import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "./account-id.js"; +import { normalizeAccountId } from "./account-id.js"; export { getSubagentDepth, diff --git a/src/security/audit.ts b/src/security/audit.ts index 833ee66f05f..c888864fcee 100644 --- a/src/security/audit.ts +++ b/src/security/audit.ts @@ -26,7 +26,6 @@ import { collectGatewayConfigFindings as collectGatewayConfigFindingsBase } from import type { SecurityAuditFinding, SecurityAuditReport, - SecurityAuditSeverity, SecurityAuditSummary, } from "./audit.types.js"; import { collectEnabledInsecureOrDangerousFlags } from "./dangerous-config-flags.js"; diff --git a/src/trajectory/runtime.ts b/src/trajectory/runtime.ts index e714cd30ac2..875f70a4266 100644 --- a/src/trajectory/runtime.ts +++ b/src/trajectory/runtime.ts @@ -8,7 +8,6 @@ import { safeJsonStringify } from "../utils/safe-json.js"; import { TRAJECTORY_RUNTIME_CAPTURE_MAX_BYTES, TRAJECTORY_RUNTIME_EVENT_MAX_BYTES, - TRAJECTORY_RUNTIME_FILE_MAX_BYTES, resolveTrajectoryFilePath, resolveTrajectoryPointerFilePath, resolveTrajectoryPointerOpenFlags, diff --git a/src/utils/message-channel.ts b/src/utils/message-channel.ts index 55f6a7d6d7e..8fc14276103 100644 --- a/src/utils/message-channel.ts +++ b/src/utils/message-channel.ts @@ -28,10 +28,7 @@ import { INTERNAL_MESSAGE_CHANNEL, type InternalMessageChannel, } from "./message-channel-constants.js"; -import { - normalizeMessageChannel, - type DeliverableMessageChannel, -} from "./message-channel-normalize.js"; +import { normalizeMessageChannel } from "./message-channel-normalize.js"; export { GATEWAY_CLIENT_NAMES, GATEWAY_CLIENT_MODES }; export type { GatewayClientName, GatewayClientMode };