refactor(core): dedupe shared config and runtime helpers

This commit is contained in:
Peter Steinberger
2026-02-16 14:52:03 +00:00
parent 544ffbcf7b
commit 04892ee230
68 changed files with 1966 additions and 2018 deletions

View File

@@ -0,0 +1,15 @@
export function extractToolSend(
args: Record<string, unknown>,
expectedAction = "sendMessage",
): { to: string; accountId?: string } | null {
const action = typeof args.action === "string" ? args.action.trim() : "";
if (action !== expectedAction) {
return null;
}
const to = typeof args.to === "string" ? args.to : undefined;
if (!to) {
return null;
}
const accountId = typeof args.accountId === "string" ? args.accountId.trim() : undefined;
return { to, accountId };
}