fix: daemon status guidance and telegram fetch

This commit is contained in:
Peter Steinberger
2026-01-08 08:39:55 +01:00
parent 5b397c0f15
commit 9a11325cc9
5 changed files with 47 additions and 22 deletions

View File

@@ -106,15 +106,14 @@ export function createSessionsSpawnTool(opts?: {
const allowAgents =
resolveAgentConfig(cfg, requesterAgentId)?.subagents?.allowAgents ??
[];
const allowAny = allowAgents.some(
(value) => value.trim() === "*",
);
const allowAny = allowAgents.some((value) => value.trim() === "*");
const normalizedTargetId = targetAgentId.toLowerCase();
const allowSet = new Set(
allowAgents
.filter((value) => value.trim() && value.trim() !== "*")
.map((value) => normalizeAgentId(value)),
.map((value) => normalizeAgentId(value).toLowerCase()),
);
if (!allowAny && !allowSet.has(targetAgentId)) {
if (!allowAny && !allowSet.has(normalizedTargetId)) {
const allowedText = allowAny
? "*"
: allowSet.size > 0