feat: wire multi-agent config and routing

Co-authored-by: Mark Pors <1078320+pors@users.noreply.github.com>
This commit is contained in:
Peter Steinberger
2026-01-09 12:44:23 +00:00
parent 81beda0772
commit 7b81d97ec2
189 changed files with 4340 additions and 2903 deletions

View File

@@ -4,6 +4,7 @@ import {
type SlackEventMiddlewareArgs,
} from "@slack/bolt";
import type { WebClient as SlackWebClient } from "@slack/web-api";
import { resolveAckReaction } from "../agents/identity.js";
import {
chunkMarkdownText,
resolveTextChunkLimit,
@@ -509,7 +510,6 @@ export async function monitorSlackProvider(opts: MonitorSlackOpts = {}) {
opts.slashCommand ?? slackCfg.slashCommand,
);
const textLimit = resolveTextChunkLimit(cfg, "slack", account.accountId);
const ackReaction = (cfg.messages?.ackReaction ?? "").trim();
const ackReactionScope = cfg.messages?.ackReactionScope ?? "group-mentions";
const mediaMaxBytes =
(opts.mediaMaxMb ?? slackCfg.mediaMaxMb ?? 20) * 1024 * 1024;
@@ -936,6 +936,7 @@ export async function monitorSlackProvider(opts: MonitorSlackOpts = {}) {
});
const rawBody = (message.text ?? "").trim() || media?.placeholder || "";
if (!rawBody) return;
const ackReaction = resolveAckReaction(cfg, route.agentId);
const shouldAckReaction = () => {
if (!ackReaction) return false;
if (ackReactionScope === "all") return true;