refactor: centralize inbound session updates
This commit is contained in:
@@ -27,6 +27,7 @@ import { handleSlackAction } from "../../agents/tools/slack-actions.js";
|
||||
import { handleWhatsAppAction } from "../../agents/tools/whatsapp-actions.js";
|
||||
import { removeAckReactionAfterReply, shouldAckReaction } from "../../channels/ack-reactions.js";
|
||||
import { resolveCommandAuthorizedFromAuthorizers } from "../../channels/command-gating.js";
|
||||
import { recordInboundSession } from "../../channels/session.js";
|
||||
import { discordMessageActions } from "../../channels/plugins/actions/discord.js";
|
||||
import { telegramMessageActions } from "../../channels/plugins/actions/telegram.js";
|
||||
import { createWhatsAppLoginTool } from "../../channels/plugins/agent-tools/whatsapp-login.js";
|
||||
@@ -193,6 +194,7 @@ export function createPluginRuntime(): PluginRuntime {
|
||||
resolveStorePath,
|
||||
readSessionUpdatedAt,
|
||||
recordSessionMetaFromInbound,
|
||||
recordInboundSession,
|
||||
updateLastRoute,
|
||||
},
|
||||
mentions: {
|
||||
|
||||
@@ -54,6 +54,7 @@ type FormatInboundEnvelope = typeof import("../../auto-reply/envelope.js").forma
|
||||
type ResolveEnvelopeFormatOptions =
|
||||
typeof import("../../auto-reply/envelope.js").resolveEnvelopeFormatOptions;
|
||||
type ResolveStateDir = typeof import("../../config/paths.js").resolveStateDir;
|
||||
type RecordInboundSession = typeof import("../../channels/session.js").recordInboundSession;
|
||||
type RecordSessionMetaFromInbound =
|
||||
typeof import("../../config/sessions.js").recordSessionMetaFromInbound;
|
||||
type ResolveStorePath = typeof import("../../config/sessions.js").resolveStorePath;
|
||||
@@ -208,6 +209,7 @@ export type PluginRuntime = {
|
||||
resolveStorePath: ResolveStorePath;
|
||||
readSessionUpdatedAt: ReadSessionUpdatedAt;
|
||||
recordSessionMetaFromInbound: RecordSessionMetaFromInbound;
|
||||
recordInboundSession: RecordInboundSession;
|
||||
updateLastRoute: UpdateLastRoute;
|
||||
};
|
||||
mentions: {
|
||||
|
||||
Reference in New Issue
Block a user