fix: derive prefixes from routed identity (#578) (thanks @p6l-richard)

This commit is contained in:
Peter Steinberger
2026-01-09 16:39:32 +01:00
parent 43848b7b43
commit 66bbb723c5
18 changed files with 156 additions and 27 deletions

View File

@@ -1,3 +1,4 @@
import { resolveResponsePrefix } from "../agents/identity.js";
import {
DEFAULT_HEARTBEAT_ACK_MAX_CHARS,
DEFAULT_HEARTBEAT_EVERY,
@@ -268,7 +269,7 @@ export async function runHeartbeatOnce(opts: {
const ackMaxChars = resolveHeartbeatAckMaxChars(cfg);
const normalized = normalizeHeartbeatReply(
replyPayload,
cfg.messages?.responsePrefix,
resolveResponsePrefix(cfg, resolveAgentIdFromSessionKey(sessionKey)),
ackMaxChars,
);
if (normalized.shouldSkip && !normalized.hasMedia) {