refactor: migrate extensions to plugin sdk

This commit is contained in:
Peter Steinberger
2026-01-18 02:51:42 +00:00
parent 5b4651d9ed
commit 1420d113d8
95 changed files with 380 additions and 208 deletions

View File

@@ -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,

View File

@@ -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: {