mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-12 11:10:43 +00:00
test: remove stale unused imports
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -29,7 +29,6 @@ import {
|
||||
parseMessageContent,
|
||||
resolveFeishuGroupSession,
|
||||
resolveFeishuMediaList,
|
||||
toMessageResourceType,
|
||||
} from "./bot-content.js";
|
||||
import {
|
||||
buildAgentMediaPayload,
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -11,7 +11,6 @@ import {
|
||||
execAz,
|
||||
getAccessTokenResult,
|
||||
getLoggedInAccount,
|
||||
listSubscriptions,
|
||||
} from "./cli.js";
|
||||
import {
|
||||
type AzAccount,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import {
|
||||
DEFAULT_QA_LIVE_PROVIDER_MODE,
|
||||
getQaProvider,
|
||||
type QaProviderMode,
|
||||
type QaProviderModeInput,
|
||||
} from "./providers/index.js";
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -37,7 +37,6 @@ import {
|
||||
reconcileOrphanedRun,
|
||||
resolveAnnounceRetryDelayMs,
|
||||
resolveSubagentRunOrphanReason,
|
||||
resolveSubagentSessionStatus,
|
||||
safeRemoveAttachmentsDir,
|
||||
} from "./subagent-registry-helpers.js";
|
||||
import { createSubagentRegistryLifecycleController } from "./subagent-registry-lifecycle.js";
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -28,7 +28,6 @@ import type {
|
||||
ChannelTurnDeliveryAdapter,
|
||||
ChannelTurnHistoryFinalizeOptions,
|
||||
ChannelTurnLogEvent,
|
||||
ChannelTurnReplyPipelineOptions,
|
||||
ChannelTurnResolved,
|
||||
ChannelTurnResult,
|
||||
DispatchedChannelTurnResult,
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -28,8 +28,6 @@ import {
|
||||
buildResolvedApprovalView,
|
||||
} from "./approval-view-model.js";
|
||||
import type {
|
||||
ApprovalActionView,
|
||||
ApprovalMetadataView,
|
||||
ExpiredApprovalView,
|
||||
PendingApprovalView,
|
||||
ResolvedApprovalView,
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import type {
|
||||
ChannelAccountSnapshot,
|
||||
ChannelGroupContext,
|
||||
ChannelMessageActionAdapter,
|
||||
ChannelStatusIssue,
|
||||
} from "./channel-contract.js";
|
||||
import type { ChannelPlugin } from "./channel-core.js";
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import type { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { formatErrorMessage } from "../infra/errors.js";
|
||||
import {
|
||||
installRequestBodyLimitGuard,
|
||||
isRequestBodyLimitError,
|
||||
readJsonBodyWithLimit,
|
||||
readRequestBodyWithLimit,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
import {
|
||||
resolvePluginInteractiveNamespaceMatch,
|
||||
type InteractiveRegistrationResult,
|
||||
} from "./interactive-registry.js";
|
||||
import { resolvePluginInteractiveNamespaceMatch } from "./interactive-registry.js";
|
||||
import {
|
||||
claimPluginInteractiveCallbackDedupe,
|
||||
commitPluginInteractiveCallbackDedupe,
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user