


















@@ -11,12 +11,12 @@ import {
1111normalizeOptionalLowercaseString,
1212normalizeOptionalString,
1313} from "../../shared/string-coerce.js";
14-import type { SkillCommandSpec } from "../../skills/types.js";
15-import { markReplyPayloadForSourceSuppressionDelivery } from "../reply-payload.js";
1614import {
1715listReservedChatSlashCommandNames,
1816resolveSkillCommandInvocation,
19-} from "../skill-commands-base.js";
17+} from "../../skills/discovery/chat-commands.js";
18+import type { SkillCommandSpec } from "../../skills/types.js";
19+import { markReplyPayloadForSourceSuppressionDelivery } from "../reply-payload.js";
2020import type { MsgContext, TemplateContext } from "../templating.js";
2121import type { ElevatedLevel, ReasoningLevel, ThinkLevel, VerboseLevel } from "../thinking.js";
2222import type { GetReplyOptions, ReplyPayload } from "../types.js";
@@ -29,21 +29,22 @@ import { getAbortMemory, isAbortRequestText } from "./abort-primitives.js";
2929import type { buildStatusReply, handleCommands } from "./commands.runtime.js";
3030import { isDirectiveOnly } from "./directive-handling.directive-only.js";
3131import type { InlineDirectives } from "./directive-handling.parse.js";
32+import { extractExplicitGroupId } from "./group-id.js";
3233import { stripMentions, stripStructuralPrefixes } from "./mentions.js";
3334import type { createModelSelectionState } from "./model-selection.js";
3435import { extractInlineSimpleCommand } from "./reply-inline.js";
3536import type { TypingController } from "./typing.js";
363737-type SkillCommandsRuntime = typeof import("../skill-commands.runtime.js");
38-type SkillToolDispatchRuntime = typeof import("./skill-tool-dispatch.runtime.js");
38+type SkillCommandsRuntime = typeof import("../../skills/discovery/chat-commands.runtime.js");
39+type SkillToolDispatchRuntime = typeof import("../../skills/runtime/tool-dispatch.js");
3940type AbortCutoffRuntime = typeof import("./abort-cutoff.runtime.js");
4041type CommandsRuntime = typeof import("./commands.runtime.js");
41424243const skillCommandsRuntimeLoader = createLazyImportLoader<SkillCommandsRuntime>(
43-() => import("../skill-commands.runtime.js"),
44+() => import("../../skills/discovery/chat-commands.runtime.js"),
4445);
4546const skillToolDispatchRuntimeLoader = createLazyImportLoader<SkillToolDispatchRuntime>(
46-() => import("./skill-tool-dispatch.runtime.js"),
47+() => import("../../skills/runtime/tool-dispatch.js"),
4748);
4849const abortCutoffRuntimeLoader = createLazyImportLoader<AbortCutoffRuntime>(
4950() => import("./abort-cutoff.runtime.js"),
@@ -301,7 +302,19 @@ export async function handleInlineActions(params: {
301302const rawArgs = (skillInvocation.args ?? "").trim();
302303const { resolveSkillDispatchTools } = await loadSkillToolDispatchRuntime();
303304const authorizedTools = resolveSkillDispatchTools({
304- ctx,
305+message: {
306+surface: ctx.Surface,
307+provider: ctx.Provider,
308+accountId: ctx.AccountId,
309+senderId: ctx.SenderId,
310+senderName: ctx.SenderName,
311+senderUsername: ctx.SenderUsername,
312+senderE164: ctx.SenderE164,
313+originatingTo: ctx.OriginatingTo,
314+to: ctx.To,
315+messageThreadId: ctx.MessageThreadId,
316+memberRoleIds: ctx.MemberRoleIds,
317+},
305318 cfg,
306319 agentId,
307320 agentDir,
@@ -312,6 +325,7 @@ export async function handleInlineActions(params: {
312325 model,
313326senderId: command.senderId,
314327currentChannelId: command.channelId,
328+groupId: extractExplicitGroupId(ctx.From),
315329skillCommand: {
316330name: skillInvocation.command.name,
317331skillName: skillInvocation.command.skillName,
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。