From 5370e73ee984cd698fc59b06f78bdeddc06f2996 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Wed, 17 Jun 2026 17:30:08 +0800 Subject: [PATCH] refactor(channels): hide internal channel types --- src/channels/chat-meta.ts | 2 -- src/channels/message/send.ts | 8 +++----- src/channels/plugins/package-state-probes.ts | 2 +- src/channels/status/read-model.ts | 2 +- src/channels/thread-bindings-policy.ts | 2 +- 5 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/channels/chat-meta.ts b/src/channels/chat-meta.ts index 2cd7221f9b8..ece54c22b74 100644 --- a/src/channels/chat-meta.ts +++ b/src/channels/chat-meta.ts @@ -13,8 +13,6 @@ function getChatChannelMetaById(): Record { return chatChannelMetaCache; } -export type { ChatChannelMeta }; - /** * Lists built-in chat channel metadata in configured display order. */ diff --git a/src/channels/message/send.ts b/src/channels/message/send.ts index e783f3f9e91..600d5d9419c 100644 --- a/src/channels/message/send.ts +++ b/src/channels/message/send.ts @@ -43,13 +43,13 @@ export type DurableMessageBatchSendParams = Omit< previousReceipt?: MessageReceipt; }; -export type DurableMessageSuppressionReason = +type DurableMessageSuppressionReason = | OutboundPayloadDeliverySuppressionReason | "no_visible_result"; -export type DurableMessageFailureStage = "platform_send" | "queue" | "unknown"; +type DurableMessageFailureStage = "platform_send" | "queue" | "unknown"; -export type DurableMessagePayloadDeliveryOutcome = +type DurableMessagePayloadDeliveryOutcome = | { index: number; status: "sent"; @@ -104,8 +104,6 @@ export type DurableMessageBatchSendResult = payloadOutcomes?: DurableMessagePayloadDeliveryOutcome[]; }; -export type DurableMessageDeliveryOutcome = DurableMessageBatchSendResult; - const neverAbortedSignal = new AbortController().signal; function toDurableMessageIntent( diff --git a/src/channels/plugins/package-state-probes.ts b/src/channels/plugins/package-state-probes.ts index 62875baa577..1fa422408fc 100644 --- a/src/channels/plugins/package-state-probes.ts +++ b/src/channels/plugins/package-state-probes.ts @@ -39,7 +39,7 @@ type ChannelPackageStateMetadata = { /** * Metadata keys that can declare a lightweight package-state checker. */ -export type ChannelPackageStateMetadataKey = "configuredState" | "persistedAuthState"; +type ChannelPackageStateMetadataKey = "configuredState" | "persistedAuthState"; const log = createSubsystemLogger("channels"); const sourcePackageStateLoaderCache: PluginModuleLoaderCache = new Map(); diff --git a/src/channels/status/read-model.ts b/src/channels/status/read-model.ts index d6709deac71..d674a1f45f2 100644 --- a/src/channels/status/read-model.ts +++ b/src/channels/status/read-model.ts @@ -10,7 +10,7 @@ export type RuntimeChannelStatusPayload = { channelAccounts?: unknown; }; -export type RuntimeChannelAccount = Record; +type RuntimeChannelAccount = Record; const CREDENTIAL_STATUS_KEYS = [ "tokenStatus", diff --git a/src/channels/thread-bindings-policy.ts b/src/channels/thread-bindings-policy.ts index a7a94c8481d..a98d3a8de17 100644 --- a/src/channels/thread-bindings-policy.ts +++ b/src/channels/thread-bindings-policy.ts @@ -46,7 +46,7 @@ export type ThreadBindingSpawnPolicy = { }; /** Starting transcript mode for a spawned thread-bound session. */ -export type ThreadBindingSpawnContext = "isolated" | "fork"; +type ThreadBindingSpawnContext = "isolated" | "fork"; function normalizeChannelId(value: string | undefined | null): string { return normalizeLowercaseStringOrEmpty(value);