refactor: consolidate plugin sdk surface

This commit is contained in:
Peter Steinberger
2026-03-20 18:50:25 +00:00
parent 46854a84a4
commit 62ddc9d9e0
294 changed files with 2071 additions and 1268 deletions

View File

@@ -1,12 +1,15 @@
import { resolveHumanDelayConfig } from "openclaw/plugin-sdk/agent-runtime";
import {
logAckFailure,
logTypingFailure,
removeAckReactionAfterReply,
} from "openclaw/plugin-sdk/channel-feedback";
import { createChannelReplyPipeline } from "openclaw/plugin-sdk/channel-reply-pipeline";
import { removeAckReactionAfterReply } from "openclaw/plugin-sdk/channel-runtime";
import { logAckFailure, logTypingFailure } from "openclaw/plugin-sdk/channel-runtime";
import { resolveStorePath, updateLastRoute } from "openclaw/plugin-sdk/config-runtime";
import { resolveAgentOutboundIdentity } from "openclaw/plugin-sdk/infra-runtime";
import { clearHistoryEntriesIfEnabled } from "openclaw/plugin-sdk/reply-history";
import { resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
import { dispatchInboundMessage } from "openclaw/plugin-sdk/reply-runtime";
import { clearHistoryEntriesIfEnabled } from "openclaw/plugin-sdk/reply-runtime";
import { createReplyDispatcherWithTyping } from "openclaw/plugin-sdk/reply-runtime";
import type { ReplyPayload } from "openclaw/plugin-sdk/reply-runtime";
import { danger, logVerbose, shouldLogVerbose } from "openclaw/plugin-sdk/runtime-env";

View File

@@ -1,5 +1,5 @@
import { formatInboundEnvelope } from "openclaw/plugin-sdk/channel-inbound";
import { readSessionUpdatedAt } from "openclaw/plugin-sdk/config-runtime";
import { formatInboundEnvelope } from "openclaw/plugin-sdk/reply-runtime";
import { logVerbose } from "openclaw/plugin-sdk/runtime-env";
import type { ResolvedSlackAccount } from "../../accounts.js";
import type { SlackMessageEvent } from "../../types.js";
@@ -30,7 +30,7 @@ export async function resolveSlackThreadContextData(params: {
storePath: string;
sessionKey: string;
envelopeOptions: ReturnType<
typeof import("openclaw/plugin-sdk/reply-runtime").resolveEnvelopeFormatOptions
typeof import("openclaw/plugin-sdk/channel-inbound").resolveEnvelopeFormatOptions
>;
effectiveDirectMedia: SlackMediaResult[] | null;
}): Promise<SlackThreadContextData> {

View File

@@ -2,26 +2,29 @@ import { resolveAckReaction } from "openclaw/plugin-sdk/agent-runtime";
import {
shouldAckReaction as shouldAckReactionGate,
type AckReactionScope,
} from "openclaw/plugin-sdk/channel-runtime";
import { resolveControlCommandGate } from "openclaw/plugin-sdk/channel-runtime";
import { resolveConversationLabel } from "openclaw/plugin-sdk/channel-runtime";
import { logInboundDrop } from "openclaw/plugin-sdk/channel-runtime";
import { resolveMentionGatingWithBypass } from "openclaw/plugin-sdk/channel-runtime";
import { recordInboundSession } from "openclaw/plugin-sdk/channel-runtime";
import { readSessionUpdatedAt, resolveStorePath } from "openclaw/plugin-sdk/config-runtime";
import { enqueueSystemEvent } from "openclaw/plugin-sdk/infra-runtime";
import { hasControlCommand } from "openclaw/plugin-sdk/reply-runtime";
import { shouldHandleTextCommands } from "openclaw/plugin-sdk/reply-runtime";
} from "openclaw/plugin-sdk/channel-feedback";
import {
buildMentionRegexes,
formatInboundEnvelope,
logInboundDrop,
matchesMentionWithExplicit,
resolveEnvelopeFormatOptions,
} from "openclaw/plugin-sdk/reply-runtime";
resolveMentionGatingWithBypass,
} from "openclaw/plugin-sdk/channel-inbound";
import { resolveControlCommandGate } from "openclaw/plugin-sdk/command-auth";
import { hasControlCommand } from "openclaw/plugin-sdk/command-auth";
import { shouldHandleTextCommands } from "openclaw/plugin-sdk/command-auth";
import { readSessionUpdatedAt, resolveStorePath } from "openclaw/plugin-sdk/config-runtime";
import {
recordInboundSession,
resolveConversationLabel,
} from "openclaw/plugin-sdk/conversation-runtime";
import { enqueueSystemEvent } from "openclaw/plugin-sdk/infra-runtime";
import {
buildPendingHistoryContextFromMap,
recordPendingHistoryEntryIfEnabled,
} from "openclaw/plugin-sdk/reply-runtime";
} from "openclaw/plugin-sdk/reply-history";
import { finalizeInboundContext } from "openclaw/plugin-sdk/reply-runtime";
import { buildMentionRegexes, matchesMentionWithExplicit } from "openclaw/plugin-sdk/reply-runtime";
import type { FinalizedMsgContext } from "openclaw/plugin-sdk/reply-runtime";
import { resolveAgentRoute } from "openclaw/plugin-sdk/routing";
import { resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing";