






















@@ -1,11 +1,11 @@
11import type { SlackActionMiddlewareArgs, SlackCommandMiddlewareArgs } from "@slack/bolt";
22import { createChannelReplyPipeline } from "openclaw/plugin-sdk/channel-reply-pipeline";
3+import type { ChatCommandDefinition } from "openclaw/plugin-sdk/command-auth";
34import {
5+type CommandArgs,
46resolveCommandAuthorizedFromAuthorizers,
57resolveNativeCommandSessionTargets,
6-listProviderPluginCommandSpecs,
7-} from "openclaw/plugin-sdk/command-auth";
8-import { type ChatCommandDefinition, type CommandArgs } from "openclaw/plugin-sdk/command-auth";
8+} from "openclaw/plugin-sdk/command-auth-native";
99import {
1010resolveNativeCommandsEnabled,
1111resolveNativeSkillsEnabled,
@@ -47,6 +47,9 @@ let slashCommandsRuntimePromise: Promise<typeof import("./slash-commands.runtime
4747null;
4848let slashDispatchRuntimePromise: Promise<typeof import("./slash-dispatch.runtime.js")> | null =
4949null;
50+let slackPluginCommandsRuntimePromise: Promise<
51+typeof import("./slash-plugin-commands.runtime.js")
52+> | null = null;
5053let slashSkillCommandsRuntimePromise: Promise<
5154typeof import("./slash-skill-commands.runtime.js")
5255> | null = null;
@@ -61,6 +64,11 @@ function loadSlashDispatchRuntime() {
6164return slashDispatchRuntimePromise;
6265}
636667+function loadSlackPluginCommandsRuntime() {
68+slackPluginCommandsRuntimePromise ??= import("./slash-plugin-commands.runtime.js");
69+return slackPluginCommandsRuntimePromise;
70+}
71+6472function loadSlashSkillCommandsRuntime() {
6573slashSkillCommandsRuntimePromise ??= import("./slash-skill-commands.runtime.js");
6674return slashSkillCommandsRuntimePromise;
@@ -685,6 +693,7 @@ export async function registerSlackMonitorSlashCommands(params: {
685693const existingNativeNames = new Set(
686694nativeCommands.map((c) => normalizeLowercaseStringOrEmpty(c.name)).filter(Boolean),
687695);
696+const { listProviderPluginCommandSpecs } = await loadSlackPluginCommandsRuntime();
688697for (const pluginCommand of listProviderPluginCommandSpecs("slack")) {
689698const normalizedName = normalizeLowercaseStringOrEmpty(pluginCommand.name);
690699if (!normalizedName || existingNativeNames.has(normalizedName)) {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。