refactor: migrate extensions to plugin sdk
This commit is contained in:
@@ -6,6 +6,7 @@ import { createInboundDebouncer, resolveInboundDebounceMs } from "../../auto-rep
|
||||
import { buildMentionRegexes, matchesMentionPatterns } from "../../auto-reply/reply/mentions.js";
|
||||
import { dispatchReplyWithBufferedBlockDispatcher } from "../../auto-reply/reply/provider-dispatcher.js";
|
||||
import { createReplyDispatcherWithTyping } from "../../auto-reply/reply/reply-dispatcher.js";
|
||||
import { resolveEffectiveMessagesConfig, resolveHumanDelayConfig } from "../../agents/identity.js";
|
||||
import { resolveCommandAuthorizedFromAuthorizers } from "../../channels/command-gating.js";
|
||||
import { resolveChannelGroupPolicy, resolveChannelGroupRequireMention } from "../../config/group-policy.js";
|
||||
import { resolveStateDir } from "../../config/paths.js";
|
||||
@@ -46,6 +47,8 @@ export function createPluginRuntime(): PluginRuntime {
|
||||
reply: {
|
||||
dispatchReplyWithBufferedBlockDispatcher,
|
||||
createReplyDispatcherWithTyping,
|
||||
resolveEffectiveMessagesConfig,
|
||||
resolveHumanDelayConfig,
|
||||
},
|
||||
routing: {
|
||||
resolveAgentRoute,
|
||||
|
||||
@@ -25,6 +25,15 @@ export type PluginRuntime = {
|
||||
};
|
||||
}) => Promise<void>;
|
||||
createReplyDispatcherWithTyping: (...args: unknown[]) => unknown;
|
||||
resolveEffectiveMessagesConfig: (
|
||||
cfg: ClawdbotConfig,
|
||||
agentId: string,
|
||||
opts?: { hasAllowFrom?: boolean; fallbackMessagePrefix?: string },
|
||||
) => { messagePrefix: string; responsePrefix?: string };
|
||||
resolveHumanDelayConfig: (
|
||||
cfg: ClawdbotConfig,
|
||||
agentId: string,
|
||||
) => { mode?: string; minMs?: number; maxMs?: number } | undefined;
|
||||
};
|
||||
routing: {
|
||||
resolveAgentRoute: (params: {
|
||||
|
||||
Reference in New Issue
Block a user