Fix structured IPC envelope leakage

Normalize EJClaw structured send_message envelopes, preserve attachments, unwrap stored room payloads, and add regression tests.
This commit is contained in:
Eyejoker
2026-04-28 01:35:26 +09:00
committed by GitHub
parent 20e1a1e5e1
commit 8bb77ffaa3
11 changed files with 291 additions and 14 deletions

View File

@@ -387,7 +387,7 @@ async function main(): Promise<void> {
editFormattedTrackedChannelMessage(channels, jid, messageId, rawText),
});
startIpcWatcher({
sendMessage: async (jid, text, senderRole, runId) => {
sendMessage: async (jid, text, senderRole, runId, attachments) => {
if (
runId &&
(senderRole === 'reviewer' || senderRole === 'arbiter') &&
@@ -419,7 +419,7 @@ async function main(): Promise<void> {
},
'IPC relay routed message to channel',
);
await route.channel.sendMessage(jid, text);
await route.channel.sendMessage(jid, text, { attachments });
if (
(senderRole === 'reviewer' || senderRole === 'arbiter') &&
isTerminalStatusMessage(text)