import { resolveDefaultAgentId } from "../agents/agent-scope.js"; import { listRouteBindings } from "../config/bindings.js"; import type { AgentRouteBinding } from "../config/types.agents.js"; import type { OpenClawConfig } from "../config/types.openclaw.js"; import {
normalizeRouteBindingChannelId,
resolveNormalizedRouteBindingMatch,
} from "./binding-scope.js"; import { normalizeAgentId } from "./session-key.js";
export function listBindings(cfg: OpenClawConfig): AgentRouteBinding[] { return listRouteBindings(cfg);
}
export function listBoundAccountIds(cfg: OpenClawConfig, channelId: string): string[] { const normalizedChannel = normalizeRouteBindingChannelId(channelId); if (!normalizedChannel) { return [];
} const ids = new Set<string>(); for (const binding of listBindings(cfg)) { const resolved = resolveNormalizedRouteBindingMatch(binding); if (!resolved || resolved.channelId !== normalizedChannel) { continue;
}
ids.add(resolved.accountId);
} return Array.from(ids).toSorted((a, b) => a.localeCompare(b));
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.