Implements the message:received hook event that fires when a user message is received, before processing. This enables hooks to: - Track user activity in real-time - Update state files without polling - React to incoming messages Changes: - Add 'message' to InternalHookEventType union - Fire message:received event in dispatchInboundMessage() - Event fires async to avoid blocking message processing - Include context: senderId, channel, messageBody (truncated), timestamp, cfg New bundled hook: - activity-tracker: Updates heartbeat-state.json on every user message - Sets lastUserMessage to current timestamp - Sets backupActive=true to enable hourly backups - Enables session-backup hook to work without polling Tests: - message-received.test.ts: Tests for the new hook event Docs: - Updated hooks.md to document message:received event - Moved from 'Future Events' to 'Message Events' section |
||
|---|---|---|
| .. | ||
| fixtures/child-process-bridge | ||
| helpers | ||
| hooks | ||
| mocks | ||
| auto-reply.retry.test.ts | ||
| gateway.multi.e2e.test.ts | ||
| global-setup.ts | ||
| inbound-contract.providers.test.ts | ||
| media-understanding.auto.e2e.test.ts | ||
| provider-timeout.e2e.test.ts | ||
| setup.ts | ||
| test-env.ts | ||