diff --git a/extensions/matrix/src/matrix/actions/types.ts b/extensions/matrix/src/matrix/actions/types.ts index 8cc79959281..23f95ce90b8 100644 --- a/extensions/matrix/src/matrix/actions/types.ts +++ b/extensions/matrix/src/matrix/actions/types.ts @@ -1,22 +1,9 @@ import type { CoreConfig } from "../../types.js"; -import { - MATRIX_ANNOTATION_RELATION_TYPE, - MATRIX_REACTION_EVENT_TYPE, - type MatrixReactionEventContent, -} from "../reaction-common.js"; +import { MATRIX_REACTION_EVENT_TYPE } from "../reaction-common.js"; import type { MatrixClient, MessageEventContent } from "../sdk.js"; export type { MatrixRawEvent } from "../sdk.js"; export type { MatrixReactionSummary } from "../reaction-common.js"; -export const MsgType = { - Text: "m.text", -} as const; - -export const RelationType = { - Replace: "m.replace", - Annotation: MATRIX_ANNOTATION_RELATION_TYPE, -} as const; - export const EventType = { RoomMessage: "m.room.message", RoomPinnedEvents: "m.room.pinned_events", @@ -35,16 +22,10 @@ export type RoomMessageEventContent = MessageEventContent & { }; }; -export type ReactionEventContent = MatrixReactionEventContent; - export type RoomPinnedEventsEventContent = { pinned: string[]; }; -export type RoomTopicEventContent = { - topic?: string; -}; - export type MatrixActionClientOpts = { client?: MatrixClient; cfg?: CoreConfig; diff --git a/extensions/matrix/src/matrix/send/types.ts b/extensions/matrix/src/matrix/send/types.ts index da90dd9de62..e3bf69e7e47 100644 --- a/extensions/matrix/src/matrix/send/types.ts +++ b/extensions/matrix/src/matrix/send/types.ts @@ -1,9 +1,5 @@ import type { CoreConfig } from "../../types.js"; -import { - MATRIX_ANNOTATION_RELATION_TYPE, - MATRIX_REACTION_EVENT_TYPE, - type MatrixReactionEventContent, -} from "../reaction-common.js"; +import { MATRIX_ANNOTATION_RELATION_TYPE, MATRIX_REACTION_EVENT_TYPE } from "../reaction-common.js"; import type { DimensionalFileInfo, EncryptedFile, @@ -79,8 +75,6 @@ export type MatrixMediaContent = MessageEventContent & export type MatrixOutboundContent = MatrixTextContent | MatrixMediaContent; -export type ReactionEventContent = MatrixReactionEventContent; - export type MatrixSendResult = { messageId: string; roomId: string; diff --git a/extensions/qqbot/src/engine/gateway/stages/access-stage.ts b/extensions/qqbot/src/engine/gateway/stages/access-stage.ts index 7523ae29835..c0bde54f26e 100644 --- a/extensions/qqbot/src/engine/gateway/stages/access-stage.ts +++ b/extensions/qqbot/src/engine/gateway/stages/access-stage.ts @@ -15,7 +15,7 @@ import { buildBlockedInboundContext } from "./stub-contexts.js"; // ─────────────────────────── Types ─────────────────────────── -export interface AccessStageAllow { +interface AccessStageAllow { kind: "allow"; isGroupChat: boolean; peerId: string; @@ -25,12 +25,12 @@ export interface AccessStageAllow { access: QQBotAccessResult; } -export interface AccessStageBlock { +interface AccessStageBlock { kind: "block"; context: InboundContext; } -export type AccessStageResult = AccessStageAllow | AccessStageBlock; +type AccessStageResult = AccessStageAllow | AccessStageBlock; // ─────────────────────────── Stage ─────────────────────────── diff --git a/extensions/qqbot/src/engine/gateway/stages/assembly-stage.ts b/extensions/qqbot/src/engine/gateway/stages/assembly-stage.ts index dd4b1252d22..a800a0269e2 100644 --- a/extensions/qqbot/src/engine/gateway/stages/assembly-stage.ts +++ b/extensions/qqbot/src/engine/gateway/stages/assembly-stage.ts @@ -26,7 +26,7 @@ import type { QueuedMessage } from "../message-queue.js"; // ─────────────────────────── buildUserMessage ─────────────────────────── -export interface BuildUserMessageInput { +interface BuildUserMessageInput { event: QueuedMessage; userContent: string; quotePart: string; @@ -69,7 +69,7 @@ export function buildUserMessage(input: BuildUserMessageInput): string { // ─────────────────────────── buildAgentBody ─────────────────────────── -export interface BuildAgentBodyInput { +interface BuildAgentBodyInput { event: QueuedMessage; userContent: string; userMessage: string; diff --git a/extensions/qqbot/src/engine/gateway/stages/content-stage.ts b/extensions/qqbot/src/engine/gateway/stages/content-stage.ts index 3a9e05dc1e1..34fecf2dbed 100644 --- a/extensions/qqbot/src/engine/gateway/stages/content-stage.ts +++ b/extensions/qqbot/src/engine/gateway/stages/content-stage.ts @@ -18,7 +18,7 @@ import type { QueuedMention, QueuedMessage } from "../message-queue.js"; // ─────────────────────────── Types ─────────────────────────── /** Input for {@link buildUserContent}. */ -export interface ContentStageInput { +interface ContentStageInput { event: QueuedMessage; /** `attachmentInfo` from the attachment stage — appended verbatim. */ attachmentInfo: string; @@ -27,7 +27,7 @@ export interface ContentStageInput { } /** Output of {@link buildUserContent}. */ -export interface ContentStageOutput { +interface ContentStageOutput { /** `parseFaceTags(event.content)`. */ parsedContent: string; /** Full user-visible content (parsed + voice + attachments + mention cleanup). */ diff --git a/extensions/qqbot/src/engine/gateway/stages/envelope-stage.ts b/extensions/qqbot/src/engine/gateway/stages/envelope-stage.ts index 550608c5cd3..501208683bb 100644 --- a/extensions/qqbot/src/engine/gateway/stages/envelope-stage.ts +++ b/extensions/qqbot/src/engine/gateway/stages/envelope-stage.ts @@ -13,7 +13,7 @@ import type { QueuedMessage } from "../message-queue.js"; // ─────────────────────────── Envelope body ─────────────────────────── -export interface BuildBodyInput { +interface BuildBodyInput { event: QueuedMessage; deps: InboundPipelineDeps; userContent: string; @@ -49,7 +49,7 @@ export function buildQuotePart(replyTo?: ReplyToInfo): string { : `[Quoted message begins]\nOriginal content unavailable\n[Quoted message ends]\n`; } -export interface BuildDynamicCtxInput { +interface BuildDynamicCtxInput { imageUrls: string[]; uniqueVoicePaths: string[]; uniqueVoiceUrls: string[]; @@ -94,7 +94,7 @@ export function buildGroupSystemPrompt( // ─────────────────────────── Media classification ─────────────────────────── -export interface MediaClassification { +interface MediaClassification { localMediaPaths: string[]; localMediaTypes: string[]; remoteMediaUrls: string[]; diff --git a/extensions/qqbot/src/engine/gateway/stages/group-gate-stage.ts b/extensions/qqbot/src/engine/gateway/stages/group-gate-stage.ts index f1dc6225b39..f22f65b283d 100644 --- a/extensions/qqbot/src/engine/gateway/stages/group-gate-stage.ts +++ b/extensions/qqbot/src/engine/gateway/stages/group-gate-stage.ts @@ -27,20 +27,20 @@ import { isMergedTurn, type QueuedMessage } from "../message-queue.js"; // ─────────────────────────── Types ─────────────────────────── -export interface GroupGatePass { +interface GroupGatePass { kind: "pass"; groupInfo: InboundGroupInfo; } -export interface GroupGateSkip { +interface GroupGateSkip { kind: "skip"; groupInfo: InboundGroupInfo; skipReason: NonNullable; } -export type GroupGateStageResult = GroupGatePass | GroupGateSkip; +type GroupGateStageResult = GroupGatePass | GroupGateSkip; -export interface GroupGateStageInput { +interface GroupGateStageInput { event: QueuedMessage; deps: InboundPipelineDeps; accountId: string; diff --git a/extensions/qqbot/src/engine/gateway/stages/index.ts b/extensions/qqbot/src/engine/gateway/stages/index.ts index 322a99d87b3..8882dc4b99f 100644 --- a/extensions/qqbot/src/engine/gateway/stages/index.ts +++ b/extensions/qqbot/src/engine/gateway/stages/index.ts @@ -15,4 +15,4 @@ export * from "./envelope-stage.js"; export * from "./group-gate-stage.js"; export * from "./quote-stage.js"; export * from "./refidx-stage.js"; -export * from "./stub-contexts.js"; +export { buildSkippedInboundContext } from "./stub-contexts.js"; diff --git a/extensions/qqbot/src/engine/gateway/stages/stub-contexts.ts b/extensions/qqbot/src/engine/gateway/stages/stub-contexts.ts index d49fe0b3605..fa95fb755f7 100644 --- a/extensions/qqbot/src/engine/gateway/stages/stub-contexts.ts +++ b/extensions/qqbot/src/engine/gateway/stages/stub-contexts.ts @@ -23,7 +23,7 @@ interface BaseStubFields { } /** Build an {@link InboundContext} with all non-routing fields cleared. */ -export function emptyInboundContext(fields: BaseStubFields): InboundContext { +function emptyInboundContext(fields: BaseStubFields): InboundContext { return { event: fields.event, route: fields.route, diff --git a/extensions/qqbot/src/engine/types.ts b/extensions/qqbot/src/engine/types.ts index 23cf39b4978..c33757c979b 100644 --- a/extensions/qqbot/src/engine/types.ts +++ b/extensions/qqbot/src/engine/types.ts @@ -139,13 +139,6 @@ export interface UploadPrepareResponse { retry_timeout?: number; } -/** Complete upload response. */ -export interface MediaUploadResponse { - file_uuid: string; - file_info: string; - ttl: number; -} - /** File hash information for upload_prepare. */ export interface UploadPrepareHashes { /** Whole-file MD5 (hex). */ diff --git a/extensions/slack/src/monitor/events/interactions.block-actions.ts b/extensions/slack/src/monitor/events/interactions.block-actions.ts index ff4c02cba98..803114c73cc 100644 --- a/extensions/slack/src/monitor/events/interactions.block-actions.ts +++ b/extensions/slack/src/monitor/events/interactions.block-actions.ts @@ -62,7 +62,7 @@ type InteractionSelectionFields = { routedChannelId?: string; }; -export type InteractionSummary = InteractionSelectionFields & { +type InteractionSummary = InteractionSelectionFields & { interactionType?: "block_action" | "view_submission" | "view_closed"; actionId: string; userId?: string; diff --git a/extensions/slack/src/monitor/types.ts b/extensions/slack/src/monitor/types.ts index 7d66dd83a53..fb98a8aa5df 100644 --- a/extensions/slack/src/monitor/types.ts +++ b/extensions/slack/src/monitor/types.ts @@ -86,13 +86,4 @@ export type SlackMessageDeletedEvent = { event_ts?: string; }; -export type SlackThreadBroadcastEvent = { - type: "message"; - subtype: "thread_broadcast"; - channel?: string; - user?: string; - message?: { ts?: string; user?: string; bot_id?: string }; - event_ts?: string; -}; - export type { SlackFile, SlackMessageEvent }; diff --git a/extensions/telegram/src/bot/reply-threading.ts b/extensions/telegram/src/bot/reply-threading.ts index 7ee37c6cd73..a65d511cb99 100644 --- a/extensions/telegram/src/bot/reply-threading.ts +++ b/extensions/telegram/src/bot/reply-threading.ts @@ -5,13 +5,6 @@ export type DeliveryProgress = { hasDelivered: boolean; }; -export function createDeliveryProgress(): DeliveryProgress { - return { - hasReplied: false, - hasDelivered: false, - }; -} - export function resolveReplyToForSend(params: { replyToId?: number; replyToMode: ReplyToMode; diff --git a/extensions/telegram/src/bot/types.ts b/extensions/telegram/src/bot/types.ts index 516da65b23c..766c459b396 100644 --- a/extensions/telegram/src/bot/types.ts +++ b/extensions/telegram/src/bot/types.ts @@ -22,10 +22,6 @@ export type TelegramContext = { getFile: TelegramGetFile; }; -export type TelegramSyntheticContextSource = Pick & { - getFile?: TelegramGetFile; -}; - /** Telegram sticker metadata for context enrichment and caching. */ export interface StickerMetadata { /** Emoji associated with the sticker. */