openclaw/test
Rex Liu 3a1ca0ea8b
feat(hooks): Add message:received hook event
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
2026-01-26 22:01:54 -05:00
..
fixtures/child-process-bridge fix: bridge respawned child signals (#933) (thanks @roshanasingh4) 2026-01-15 06:37:27 +00:00
helpers test: align envelope timestamp expectations (#1329) (thanks @dlauer) 2026-01-22 05:51:42 +00:00
hooks feat(hooks): Add message:received hook event 2026-01-26 22:01:54 -05:00
mocks chore: migrate to oxlint and oxfmt 2026-01-14 15:02:19 +00:00
auto-reply.retry.test.ts refactor: lint cleanups and helpers 2025-12-23 00:28:55 +00:00
gateway.multi.e2e.test.ts test: update gateway node/e2e tests 2026-01-20 10:41:09 +00:00
global-setup.ts test: speed up default test env 2026-01-23 18:34:33 +00:00
inbound-contract.providers.test.ts style: oxfmt format 2026-01-17 05:48:56 +00:00
media-understanding.auto.e2e.test.ts test: add media auto-detect coverage 2026-01-23 05:47:13 +00:00
provider-timeout.e2e.test.ts fix(agents): treat provider request-aborted as timeout for fallback (#1576) 2026-01-24 11:27:24 +00:00
setup.ts feat: Add Ollama provider with automatic model discovery (#1606) 2026-01-24 22:38:52 +00:00
test-env.ts fix: expand linux service PATH handling 2026-01-23 19:16:41 +00:00