multica/packages/core/src/agent
Jiang Bohan 8d6a803739 fix(agent): filter heartbeat ACK messages from desktop event stream
The heartbeat runner uses agent.write() (normal write), so heartbeat
ACK responses like "HEARTBEAT_OK" were not suppressed by the internal
run filter and leaked into the desktop UI chat. The Gateway path was
already fixed (Hub has delayed-start + isHeartbeatAckEvent filtering),
but the local Desktop path through AsyncAgent had no such filtering.

Add createFilteredHandler() to AsyncAgent that buffers message_start
for assistant messages and checks subsequent events with
isHeartbeatAckEvent(). Pure heartbeat ACKs are suppressed end-to-end;
all other messages are forwarded normally.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 19:34:23 +08:00
..
auth-profiles refactor: restructure to monorepo architecture 2026-02-10 18:00:23 +08:00
cli refactor: restructure to monorepo architecture 2026-02-10 18:00:23 +08:00
context-window refactor: restructure to monorepo architecture 2026-02-10 18:00:23 +08:00
profile refactor: restructure to monorepo architecture 2026-02-10 18:00:23 +08:00
providers fix(core): fix OpenRouter model resolution and add fallback for custom models 2026-02-10 23:40:31 +08:00
session fix(agent): sanitize invalid tool call ids in context 2026-02-10 19:33:44 +08:00
skills refactor: restructure to monorepo architecture 2026-02-10 18:00:23 +08:00
subagent fix(subagent): forward announcement summary to UI stream 2026-02-11 18:58:32 +08:00
system-prompt Merge pull request #126 from multica-ai/feat/subagent-announce-delivery 2026-02-11 19:04:39 +08:00
tools Merge pull request #126 from multica-ai/feat/subagent-announce-delivery 2026-02-11 19:04:39 +08:00
async-agent.test.ts feat(agent): expose isRunning and lastRunError on Agent and AsyncAgent 2026-02-11 17:09:33 +08:00
async-agent.ts fix(agent): filter heartbeat ACK messages from desktop event stream 2026-02-11 19:34:23 +08:00
channel.ts refactor: restructure to monorepo architecture 2026-02-10 18:00:23 +08:00
credentials-cli.ts fix(core): read data tool API key from credentials.json5 2026-02-11 16:45:46 +08:00
credentials.ts refactor: restructure to monorepo architecture 2026-02-10 18:00:23 +08:00
events.ts refactor: restructure to monorepo architecture 2026-02-10 18:00:23 +08:00
extract-text.ts refactor: restructure to monorepo architecture 2026-02-10 18:00:23 +08:00
index.ts refactor: restructure to monorepo architecture 2026-02-10 18:00:23 +08:00
message-timestamp.test.ts refactor: restructure to monorepo architecture 2026-02-10 18:00:23 +08:00
message-timestamp.ts refactor: restructure to monorepo architecture 2026-02-10 18:00:23 +08:00
runner.ts fix(agent): reload tools after setProvider to fix stale closure 2026-02-11 18:58:24 +08:00
sync-agent.ts refactor: restructure to monorepo architecture 2026-02-10 18:00:23 +08:00
tokens.test.ts fix(agent): add NO_REPLY detection utility for filtering silent replies 2026-02-11 17:16:22 +08:00
tokens.ts fix(agent): add NO_REPLY detection utility for filtering silent replies 2026-02-11 17:16:22 +08:00
tools.ts Merge pull request #126 from multica-ai/feat/subagent-announce-delivery 2026-02-11 19:04:39 +08:00
types.ts refactor: restructure to monorepo architecture 2026-02-10 18:00:23 +08:00