From fdc7892a6e5a47ba2d1844d5080bec30745aa190 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Tue, 7 Jul 2026 07:41:04 -0700 Subject: [PATCH] refactor: localize internal implementation types (#101731) --- extensions/discord/src/approval-handler.runtime.ts | 2 +- extensions/feishu/src/doctor.ts | 2 +- extensions/feishu/src/monitor.account.ts | 6 ++++-- extensions/file-transfer/src/shared/policy.ts | 2 +- extensions/logbook/src/node-host.ts | 2 +- extensions/matrix/src/approval-handler.runtime.ts | 2 +- extensions/msteams/src/graph-messages.ts | 2 +- .../live-transports/shared/credential-lease.runtime.ts | 2 +- .../live-transports/whatsapp/whatsapp-live.runtime.ts | 2 +- extensions/qa-lab/src/scorecard-taxonomy.ts | 4 ++-- extensions/signal/src/client.ts | 2 +- extensions/slack/src/approval-handler.runtime.ts | 2 +- extensions/slack/src/draft-stream.ts | 2 +- extensions/slack/src/monitor/relay-source.ts | 2 +- extensions/telegram/src/rich-plain-fallback.ts | 5 +---- extensions/tlon/src/urbit/send.ts | 2 +- extensions/voice-call/src/config.ts | 2 +- src/agents/acp-spawn.ts | 4 ++-- src/agents/auth-profiles/oauth-manager.ts | 2 +- src/agents/model-fallback.ts | 2 +- src/agents/utils/syntax-highlight.ts | 2 +- src/auto-reply/reply/agent-runner-cli-dispatch.ts | 2 +- src/auto-reply/reply/prompt-prelude.ts | 2 +- src/channels/plugins/read-only.ts | 2 +- src/cli/hooks-cli.ts | 2 +- src/cli/plugins-cli.ts | 10 +++++----- src/cli/program/routed-command-definitions.ts | 2 +- src/commands/onboard-non-interactive/local/output.ts | 2 +- src/gateway/session-compaction-checkpoints.ts | 2 +- src/hooks/install.ts | 3 +-- src/infra/backup-create.ts | 2 +- src/infra/outbound/channel-target-prefix.ts | 2 +- src/infra/outbound/message.ts | 2 +- src/infra/outbound/targets.ts | 2 +- src/plugins/discovery.ts | 2 +- src/plugins/setup-registry.ts | 2 +- src/plugins/update.ts | 2 +- src/process/spawn-utils.ts | 2 +- 38 files changed, 47 insertions(+), 49 deletions(-) diff --git a/extensions/discord/src/approval-handler.runtime.ts b/extensions/discord/src/approval-handler.runtime.ts index a0a7f5d0cabd..a6f951502556 100644 --- a/extensions/discord/src/approval-handler.runtime.ts +++ b/extensions/discord/src/approval-handler.runtime.ts @@ -49,7 +49,7 @@ type PreparedDeliveryTarget = { recipientUserId?: string; }; -export type DiscordApprovalHandlerContext = { +type DiscordApprovalHandlerContext = { token: string; config: DiscordExecApprovalConfig; }; diff --git a/extensions/feishu/src/doctor.ts b/extensions/feishu/src/doctor.ts index fad47d522d0d..22928e158544 100644 --- a/extensions/feishu/src/doctor.ts +++ b/extensions/feishu/src/doctor.ts @@ -71,7 +71,7 @@ export type FeishuDoctorInspection = { sessionEntries: FeishuDoctorSessionEntry[]; }; -export type FeishuDoctorRepairReport = { +type FeishuDoctorRepairReport = { backupDir: string; stateDirRepairAttempted: boolean; rebuiltStateDir: boolean; diff --git a/extensions/feishu/src/monitor.account.ts b/extensions/feishu/src/monitor.account.ts index 1e6c337a862c..2df76b6bc175 100644 --- a/extensions/feishu/src/monitor.account.ts +++ b/extensions/feishu/src/monitor.account.ts @@ -46,7 +46,7 @@ export type FeishuReactionCreatedEvent = { action_time?: string; }; -export type FeishuReactionDeletedEvent = FeishuReactionCreatedEvent & { +type FeishuReactionDeletedEvent = FeishuReactionCreatedEvent & { reaction_id?: string; }; @@ -500,7 +500,9 @@ export async function monitorSingleAccount(params: MonitorSingleAccountParams): const eventDispatcher = createEventDispatcher(account); const chatHistories = new Map(); threadBindingManager = createFeishuThreadBindingManager({ accountId, cfg }); - const channelRuntime = params.channelRuntime?.inbound ? params.channelRuntime : getFeishuRuntime().channel; + const channelRuntime = params.channelRuntime?.inbound + ? params.channelRuntime + : getFeishuRuntime().channel; registerEventHandlers(eventDispatcher, { cfg, diff --git a/extensions/file-transfer/src/shared/policy.ts b/extensions/file-transfer/src/shared/policy.ts index 7fb2a70db5f9..a2e76d1cabfd 100644 --- a/extensions/file-transfer/src/shared/policy.ts +++ b/extensions/file-transfer/src/shared/policy.ts @@ -52,7 +52,7 @@ import { mutateConfigFile } from "openclaw/plugin-sdk/config-mutation"; import { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot"; export type FilePolicyKind = "read" | "write"; -export type FilePolicyAskMode = "off" | "on-miss" | "always"; +type FilePolicyAskMode = "off" | "on-miss" | "always"; type FilePolicyDecision = | { ok: true; reason: "matched-allow"; maxBytes?: number; followSymlinks: boolean } diff --git a/extensions/logbook/src/node-host.ts b/extensions/logbook/src/node-host.ts index 6b7750257636..516c39f49cc7 100644 --- a/extensions/logbook/src/node-host.ts +++ b/extensions/logbook/src/node-host.ts @@ -10,7 +10,7 @@ import { resolvePreferredOpenClawTmpDir } from "openclaw/plugin-sdk/temp-path"; const execFileAsync = promisify(execFile); -export type LogbookSnapshotParams = { +type LogbookSnapshotParams = { screenIndex?: number; maxWidth?: number; quality?: number; diff --git a/extensions/matrix/src/approval-handler.runtime.ts b/extensions/matrix/src/approval-handler.runtime.ts index b360e4c7846d..0f74b3f1da0f 100644 --- a/extensions/matrix/src/approval-handler.runtime.ts +++ b/extensions/matrix/src/approval-handler.runtime.ts @@ -139,7 +139,7 @@ export type MatrixApprovalHandlerDeps = { repairDirectRooms?: typeof repairMatrixDirectRooms; }; -export type MatrixApprovalHandlerContext = { +type MatrixApprovalHandlerContext = { client: MatrixClient; deps?: MatrixApprovalHandlerDeps; }; diff --git a/extensions/msteams/src/graph-messages.ts b/extensions/msteams/src/graph-messages.ts index dd71f5fac4ea..0404703d6009 100644 --- a/extensions/msteams/src/graph-messages.ts +++ b/extensions/msteams/src/graph-messages.ts @@ -312,7 +312,7 @@ export const TEAMS_REACTION_TYPES = [ "sad", "angry", ] as const; -export type TeamsReactionType = (typeof TEAMS_REACTION_TYPES)[number]; +type TeamsReactionType = (typeof TEAMS_REACTION_TYPES)[number]; type GraphReaction = { reactionType?: string; diff --git a/extensions/qa-lab/src/live-transports/shared/credential-lease.runtime.ts b/extensions/qa-lab/src/live-transports/shared/credential-lease.runtime.ts index 0c3a0b018b99..3b04e356eb74 100644 --- a/extensions/qa-lab/src/live-transports/shared/credential-lease.runtime.ts +++ b/extensions/qa-lab/src/live-transports/shared/credential-lease.runtime.ts @@ -74,7 +74,7 @@ type QaCredentialLeaseHeartbeat = { throwIfFailed(): void; }; -export type QaCredentialRole = "ci" | "maintainer"; +type QaCredentialRole = "ci" | "maintainer"; type QaCredentialLeaseSource = "convex" | "env"; diff --git a/extensions/qa-lab/src/live-transports/whatsapp/whatsapp-live.runtime.ts b/extensions/qa-lab/src/live-transports/whatsapp/whatsapp-live.runtime.ts index a9576bb83613..d7e64b7412cd 100644 --- a/extensions/qa-lab/src/live-transports/whatsapp/whatsapp-live.runtime.ts +++ b/extensions/qa-lab/src/live-transports/whatsapp/whatsapp-live.runtime.ts @@ -51,7 +51,7 @@ import { const execFileAsync = promisify(execFile); -export type WhatsAppQaRuntimeEnv = { +type WhatsAppQaRuntimeEnv = { driverAuthArchiveBase64: string; driverPhoneE164: string; sutAuthArchiveBase64: string; diff --git a/extensions/qa-lab/src/scorecard-taxonomy.ts b/extensions/qa-lab/src/scorecard-taxonomy.ts index a39f92dd4c91..2a792d3ad26f 100644 --- a/extensions/qa-lab/src/scorecard-taxonomy.ts +++ b/extensions/qa-lab/src/scorecard-taxonomy.ts @@ -325,10 +325,10 @@ export type QaNativeCoverageEvidenceKind = "script" | "vitest" | "playwright"; export type QaScorecardEvidenceKind = QaNativeCoverageEvidenceKind | "qa-scenario"; export type QaScorecardEvidenceMode = z.infer; export type QaScorecardChannelDriver = z.infer; -export type QaMaturityScoreKey = (typeof QA_MATURITY_SCORE_KEYS)[number]; +type QaMaturityScoreKey = (typeof QA_MATURITY_SCORE_KEYS)[number]; export type QaMaturityScoreObject = z.infer; export type QaMaturityScoreSurfaceLts = z.infer; -export type QaMaturityScoreCategory = z.infer; +type QaMaturityScoreCategory = z.infer; export type QaMaturityScoreSurface = z.infer; export type QaMaturityScores = z.infer; export type QaMaturityTaxonomyLevel = z.infer; diff --git a/extensions/signal/src/client.ts b/extensions/signal/src/client.ts index 4e925b467404..1944eb443a0b 100644 --- a/extensions/signal/src/client.ts +++ b/extensions/signal/src/client.ts @@ -18,7 +18,7 @@ export type SignalRpcError = { data?: unknown; }; -export type SignalRpcResponse = { +type SignalRpcResponse = { jsonrpc?: string; result?: T; error?: SignalRpcError; diff --git a/extensions/slack/src/approval-handler.runtime.ts b/extensions/slack/src/approval-handler.runtime.ts index 94de82fd1cec..ca444d38c274 100644 --- a/extensions/slack/src/approval-handler.runtime.ts +++ b/extensions/slack/src/approval-handler.runtime.ts @@ -56,7 +56,7 @@ type SlackExecApprovalConfig = NonNullable< NonNullable["slack"]>["execApprovals"] >; -export type SlackApprovalHandlerContext = { +type SlackApprovalHandlerContext = { app: App; config: SlackExecApprovalConfig; }; diff --git a/extensions/slack/src/draft-stream.ts b/extensions/slack/src/draft-stream.ts index be7340c43c10..b3843c12e3da 100644 --- a/extensions/slack/src/draft-stream.ts +++ b/extensions/slack/src/draft-stream.ts @@ -23,7 +23,7 @@ type SlackDraftStream = { channelId: () => string | undefined; }; -export type SlackDraftStreamUpdate = +type SlackDraftStreamUpdate = | string | { text: string; diff --git a/extensions/slack/src/monitor/relay-source.ts b/extensions/slack/src/monitor/relay-source.ts index 6dd118c4aa21..b0f18fce827d 100644 --- a/extensions/slack/src/monitor/relay-source.ts +++ b/extensions/slack/src/monitor/relay-source.ts @@ -35,7 +35,7 @@ type RelayConnectionState = { const SLACK_RELAY_ROUTE_KINDS = new Set(["user_group", "thread_affinity", "channel_default"]); export const SLACK_RELAY_MAX_PAYLOAD_BYTES = 1024 * 1024; -export type SlackRelayRoute = { +type SlackRelayRoute = { kind: "user_group" | "thread_affinity" | "channel_default"; key: string; }; diff --git a/extensions/telegram/src/rich-plain-fallback.ts b/extensions/telegram/src/rich-plain-fallback.ts index 877fba375882..f3b6085af99c 100644 --- a/extensions/telegram/src/rich-plain-fallback.ts +++ b/extensions/telegram/src/rich-plain-fallback.ts @@ -11,10 +11,7 @@ const RICH_ENTITY_INVALID_RE = const RICH_CONTENT_REQUIRED_RE = /RICH_MESSAGE_CONTENT_REQUIRED/i; const PARSE_ERR_RE = /can't parse entities|parse entities|find end of the entity/i; -export type TelegramPlainFallbackTrigger = - | "rich-entity-invalid" - | "html-parse" - | "rich-content-required"; +type TelegramPlainFallbackTrigger = "rich-entity-invalid" | "html-parse" | "rich-content-required"; type TelegramPlainFallbackPlan = { plainText: string; diff --git a/extensions/tlon/src/urbit/send.ts b/extensions/tlon/src/urbit/send.ts index 62f9f0ce9bfc..06eabf233448 100644 --- a/extensions/tlon/src/urbit/send.ts +++ b/extensions/tlon/src/urbit/send.ts @@ -6,7 +6,7 @@ import { } from "openclaw/plugin-sdk/channel-outbound"; import { markdownToStory, createImageBlock, isImageUrl, type Story } from "./story.js"; -export type TlonPokeApi = { +type TlonPokeApi = { poke: (params: { app: string; mark: string; json: unknown }) => Promise; }; diff --git a/extensions/voice-call/src/config.ts b/extensions/voice-call/src/config.ts index 8ce01bf8fa5b..bba6a9746c3d 100644 --- a/extensions/voice-call/src/config.ts +++ b/extensions/voice-call/src/config.ts @@ -100,7 +100,7 @@ const VoiceCallNumberRouteConfigSchema = z responseTimeoutMs: z.number().int().positive().optional(), }) .strict(); -export type VoiceCallNumberRouteConfig = z.infer; +type VoiceCallNumberRouteConfig = z.infer; // ----------------------------------------------------------------------------- // Webhook Server Configuration diff --git a/src/agents/acp-spawn.ts b/src/agents/acp-spawn.ts index e1cf0ff396d7..cb02dcede761 100644 --- a/src/agents/acp-spawn.ts +++ b/src/agents/acp-spawn.ts @@ -117,7 +117,7 @@ const log = createSubsystemLogger("agents/acp-spawn"); const ACP_RUNTIME_TIMEOUT_MAX_SECONDS = 24 * 60 * 60; export const ACP_SPAWN_MODES = ["run", "session"] as const; -export type SpawnAcpMode = (typeof ACP_SPAWN_MODES)[number]; +type SpawnAcpMode = (typeof ACP_SPAWN_MODES)[number]; const ACP_SPAWN_SANDBOX_MODES = ["inherit", "require"] as const; export type SpawnAcpSandboxMode = (typeof ACP_SPAWN_SANDBOX_MODES)[number]; export const ACP_SPAWN_STREAM_TARGETS = ["parent"] as const; @@ -197,7 +197,7 @@ const ACP_SPAWN_ERROR_CODES = [ "spawn_failed", "dispatch_failed", ] as const; -export type SpawnAcpErrorCode = (typeof ACP_SPAWN_ERROR_CODES)[number]; +type SpawnAcpErrorCode = (typeof ACP_SPAWN_ERROR_CODES)[number]; type SpawnAcpResultFields = { childSessionKey?: string; diff --git a/src/agents/auth-profiles/oauth-manager.ts b/src/agents/auth-profiles/oauth-manager.ts index 3706c6392ce4..bd66269c9fcb 100644 --- a/src/agents/auth-profiles/oauth-manager.ts +++ b/src/agents/auth-profiles/oauth-manager.ts @@ -53,7 +53,7 @@ export type OAuthManagerAdapter = { isRefreshTokenReusedError: (error: unknown) => boolean; }; -export type ResolvedOAuthAccess = { +type ResolvedOAuthAccess = { apiKey: string; credential: OAuthCredential; }; diff --git a/src/agents/model-fallback.ts b/src/agents/model-fallback.ts index 7d1895960973..cd162eec7895 100644 --- a/src/agents/model-fallback.ts +++ b/src/agents/model-fallback.ts @@ -176,7 +176,7 @@ export function isFallbackSummaryError(err: unknown): err is FallbackSummaryErro return err instanceof FallbackSummaryError; } -export type ModelFallbackRunOptions = { +type ModelFallbackRunOptions = { allowTransientCooldownProbe?: boolean; isFinalFallbackAttempt?: boolean; }; diff --git a/src/agents/utils/syntax-highlight.ts b/src/agents/utils/syntax-highlight.ts index a8aabdce727e..7175ad3dd6c9 100644 --- a/src/agents/utils/syntax-highlight.ts +++ b/src/agents/utils/syntax-highlight.ts @@ -10,7 +10,7 @@ import { decodeHtmlEntityAt } from "./html.js"; /** Formatter applied to highlighted text segments. */ export type HighlightFormatter = (text: string) => string; /** Mapping from highlight.js scope names to text formatters. */ -export type HighlightTheme = Partial>; +type HighlightTheme = Partial>; /** Options used when highlighting code and rendering themed text. */ interface HighlightOptions { diff --git a/src/auto-reply/reply/agent-runner-cli-dispatch.ts b/src/auto-reply/reply/agent-runner-cli-dispatch.ts index a566bba77030..78a80f476145 100644 --- a/src/auto-reply/reply/agent-runner-cli-dispatch.ts +++ b/src/auto-reply/reply/agent-runner-cli-dispatch.ts @@ -210,7 +210,7 @@ function readCommentaryTextPayload(evt: AgentEventPayload): CommentaryTextPayloa }; } -export type CliToolEventPayload = { +type CliToolEventPayload = { name: string | undefined; phase: "start" | "update" | "result"; args: Record | undefined; diff --git a/src/auto-reply/reply/prompt-prelude.ts b/src/auto-reply/reply/prompt-prelude.ts index c39cfda1f003..a66b65aa86e2 100644 --- a/src/auto-reply/reply/prompt-prelude.ts +++ b/src/auto-reply/reply/prompt-prelude.ts @@ -78,7 +78,7 @@ export function buildReplyPromptBodies(params: { } /** Startup action associated with a reply prompt envelope. */ -export type ReplyPromptEnvelopeStartupAction = "new" | "reset"; +type ReplyPromptEnvelopeStartupAction = "new" | "reset"; /** Full prompt envelope passed into reply run preparation. */ export type ReplyPromptEnvelope = ReturnType & { diff --git a/src/channels/plugins/read-only.ts b/src/channels/plugins/read-only.ts index c3d6ccb04281..8a54fa0c8c9a 100644 --- a/src/channels/plugins/read-only.ts +++ b/src/channels/plugins/read-only.ts @@ -154,7 +154,7 @@ type ReadOnlyChannelPluginResolution = { loadFailures: ReadOnlyChannelPluginLoadFailure[]; }; type ManifestChannelConfigRecord = NonNullable[string]; -export type ReadOnlyChannelPluginLoadFailure = { +type ReadOnlyChannelPluginLoadFailure = { channelId: string; pluginId: string; message: string; diff --git a/src/cli/hooks-cli.ts b/src/cli/hooks-cli.ts index 62162c5542bb..2a280664382a 100644 --- a/src/cli/hooks-cli.ts +++ b/src/cli/hooks-cli.ts @@ -42,7 +42,7 @@ export type HooksCheckOptions = { json?: boolean; }; -export type HooksUpdateOptions = { +type HooksUpdateOptions = { all?: boolean; dryRun?: boolean; }; diff --git a/src/cli/plugins-cli.ts b/src/cli/plugins-cli.ts index e8f5e2e1e4fa..974ebb35db80 100644 --- a/src/cli/plugins-cli.ts +++ b/src/cli/plugins-cli.ts @@ -7,7 +7,7 @@ import type { PluginsListOptions } from "./plugins-list-command.js"; import { parseStrictPositiveIntOption } from "./program/helpers.js"; import { applyParentDefaultHelpAction } from "./program/parent-default-help.js"; -export type PluginUpdateOptions = { +type PluginUpdateOptions = { all?: boolean; acknowledgeClawhubRisk?: boolean; dryRun?: boolean; @@ -40,7 +40,7 @@ export type PluginMarketplaceRefreshOptions = { json?: boolean; }; -export type PluginSearchOptions = { +type PluginSearchOptions = { json?: boolean; limit?: number; }; @@ -58,18 +58,18 @@ export type PluginRegistryOptions = { refresh?: boolean; }; -export type PluginAuthoringBuildOptions = { +type PluginAuthoringBuildOptions = { root?: string; entry?: string; check?: boolean; }; -export type PluginAuthoringValidateOptions = { +type PluginAuthoringValidateOptions = { root?: string; entry?: string; }; -export type PluginAuthoringInitOptions = { +type PluginAuthoringInitOptions = { directory?: string; force?: boolean; type?: string; diff --git a/src/cli/program/routed-command-definitions.ts b/src/cli/program/routed-command-definitions.ts index be8f72f6a0f7..85f1ce0b6962 100644 --- a/src/cli/program/routed-command-definitions.ts +++ b/src/cli/program/routed-command-definitions.ts @@ -28,7 +28,7 @@ type ModelsStatusCommandModule = typeof import("../../commands/models/list.statu type TasksJsonCommandModule = typeof import("../../commands/tasks-json.js"); /** Typed parsed route definition that binds one parser to its runner. */ -export type RoutedCommandDefinition> = { +type RoutedCommandDefinition> = { parseArgs: TParse; runParsedArgs: (args: ParsedRouteArgs) => Promise; }; diff --git a/src/commands/onboard-non-interactive/local/output.ts b/src/commands/onboard-non-interactive/local/output.ts index bd0c88bacdf0..3b3eeb02144c 100644 --- a/src/commands/onboard-non-interactive/local/output.ts +++ b/src/commands/onboard-non-interactive/local/output.ts @@ -24,7 +24,7 @@ export type GatewayHealthFailureDiagnostics = { }; /** Coarse recovery category for gateway health failures. */ -export type GatewayHealthFailureClassification = +type GatewayHealthFailureClassification = | "not-listening" | "auth-mismatch" | "service-missing" diff --git a/src/gateway/session-compaction-checkpoints.ts b/src/gateway/session-compaction-checkpoints.ts index 3c8b74925460..8fe1729579cd 100644 --- a/src/gateway/session-compaction-checkpoints.ts +++ b/src/gateway/session-compaction-checkpoints.ts @@ -66,7 +66,7 @@ export type CompactionCheckpointForkedTranscript = ForkedCompactionCheckpointTra totalTokens?: number; }; -export type CompactionCheckpointTranscriptForkResult = +type CompactionCheckpointTranscriptForkResult = | { status: "created"; transcript: CompactionCheckpointForkedTranscript } | { status: "missing-boundary" } | { status: "failed" }; diff --git a/src/hooks/install.ts b/src/hooks/install.ts index b39b21130339..3c6ffbb5a546 100644 --- a/src/hooks/install.ts +++ b/src/hooks/install.ts @@ -53,8 +53,7 @@ export const HOOK_INSTALL_ERROR_CODE = { EMPTY_OPENCLAW_HOOKS: "empty_openclaw_hooks", } as const; -export type HookInstallErrorCode = - (typeof HOOK_INSTALL_ERROR_CODE)[keyof typeof HOOK_INSTALL_ERROR_CODE]; +type HookInstallErrorCode = (typeof HOOK_INSTALL_ERROR_CODE)[keyof typeof HOOK_INSTALL_ERROR_CODE]; /** Integrity drift payload surfaced when npm metadata no longer matches an install record. */ export type HookNpmIntegrityDriftParams = { diff --git a/src/infra/backup-create.ts b/src/infra/backup-create.ts index 136d8db9def1..f858fce97628 100644 --- a/src/infra/backup-create.ts +++ b/src/infra/backup-create.ts @@ -169,7 +169,7 @@ function isTarEofRaceError(err: unknown): boolean { return /(did not encounter expected|encountered unexpected) EOF|TAR_BAD_ARCHIVE/i.test(message); } -export type BackupTarRetryLogger = (message: string) => void; +type BackupTarRetryLogger = (message: string) => void; function resolveBackupTarAttemptTempPath(tempArchivePath: string, attempt: number): string { return attempt === 1 ? tempArchivePath : `${tempArchivePath}.retry-${attempt}`; diff --git a/src/infra/outbound/channel-target-prefix.ts b/src/infra/outbound/channel-target-prefix.ts index b836e2c03433..f7c47b66260e 100644 --- a/src/infra/outbound/channel-target-prefix.ts +++ b/src/infra/outbound/channel-target-prefix.ts @@ -53,7 +53,7 @@ export function stripTargetTopicSuffix( } /** Parsed provider prefix and the channel that owns it. */ -export type ChannelTargetProviderPrefix = { +type ChannelTargetProviderPrefix = { prefix: string; channel: string; }; diff --git a/src/infra/outbound/message.ts b/src/infra/outbound/message.ts index 9b9461583c1a..f1b1dd192b6a 100644 --- a/src/infra/outbound/message.ts +++ b/src/infra/outbound/message.ts @@ -47,7 +47,7 @@ const loadMessageGatewayRuntime = createLazyRuntimeModule( () => import("./message.gateway.runtime.js"), ); -export type MessageGatewayOptions = OutboundMessageGatewayOptionsInput; +type MessageGatewayOptions = OutboundMessageGatewayOptionsInput; type MessageSendParams = { to: string; diff --git a/src/infra/outbound/targets.ts b/src/infra/outbound/targets.ts index d3fa7a9bb61b..80bd13d31279 100644 --- a/src/infra/outbound/targets.ts +++ b/src/infra/outbound/targets.ts @@ -38,7 +38,7 @@ import { export type OutboundChannel = DeliverableMessageChannel; /** Heartbeat target channel id from agent/default heartbeat config. */ -export type HeartbeatTarget = OutboundChannel; +type HeartbeatTarget = OutboundChannel; /** Resolved outbound delivery destination and routing hints. */ export type OutboundTarget = { diff --git a/src/plugins/discovery.ts b/src/plugins/discovery.ts index 6b5f044e6e26..c37f03111137 100644 --- a/src/plugins/discovery.ts +++ b/src/plugins/discovery.ts @@ -109,7 +109,7 @@ function currentUid(overrideUid?: number | null): number | null { return process.getuid(); } -export type CandidateBlockReason = +type CandidateBlockReason = | "source_escapes_root" | "path_stat_failed" | "path_world_writable" diff --git a/src/plugins/setup-registry.ts b/src/plugins/setup-registry.ts index 7d47450ad6bf..51af91e3b32d 100644 --- a/src/plugins/setup-registry.ts +++ b/src/plugins/setup-registry.ts @@ -67,7 +67,7 @@ export type PluginSetupRegistryDiagnosticCode = | "setup-descriptor-cli-backend-missing-runtime" | "setup-descriptor-cli-backend-runtime-undeclared"; -export type PluginSetupRegistryDiagnostic = { +type PluginSetupRegistryDiagnostic = { pluginId: string; code: PluginSetupRegistryDiagnosticCode; declaredId?: string; diff --git a/src/plugins/update.ts b/src/plugins/update.ts index 41786e8c0504..31f5f795deb2 100644 --- a/src/plugins/update.ts +++ b/src/plugins/update.ts @@ -82,7 +82,7 @@ export type PluginUpdateLogger = { /** Outcome status for one plugin update attempt. */ export type PluginUpdateStatus = "updated" | "unchanged" | "skipped" | "error"; -export type PluginUpdateChannelFallback = { +type PluginUpdateChannelFallback = { requestedSpec: string; usedSpec: string; requestedLabel: string; diff --git a/src/process/spawn-utils.ts b/src/process/spawn-utils.ts index 19ff86adf949..6fa195fcf3bb 100644 --- a/src/process/spawn-utils.ts +++ b/src/process/spawn-utils.ts @@ -3,7 +3,7 @@ import type { ChildProcess, SpawnOptions } from "node:child_process"; import { spawn } from "node:child_process"; import { toErrorObject } from "../infra/errors.js"; -export type SpawnFallback = { +type SpawnFallback = { label: string; options: SpawnOptions; };