openclaw/src/auto-reply
David Rudduck 11e1363d2d
feat(hooks): add trigger and channelId to plugin hook agent context (#28623)
* feat(hooks): add trigger and channelId to plugin hook agent context

Adds `trigger` and `channelId` fields to `PluginHookAgentContext` so
plugins can determine what initiated the agent run and which channel
it originated from, without session-key parsing or Redis bridging.

trigger values: "user", "heartbeat", "cron", "memory"
channelId values: "telegram", "discord", "whatsapp", etc.

Both fields are threaded through run.ts and attempt.ts hookCtx so all
hook phases receive them (before_model_resolve, before_prompt_build,
before_agent_start, llm_input, llm_output, agent_end).

channelId falls back from messageChannel to messageProvider when the
former is not set. followup-runner passes originatingChannel so queued
followup runs also carry channel context.

* docs(changelog): note hook context parity fix for #28623

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-03-02 17:39:20 -08:00
..
reply feat(hooks): add trigger and channelId to plugin hook agent context (#28623) 2026-03-02 17:39:20 -08:00
chunk.test.ts test: streamline auto-reply and tts suites 2026-02-21 21:44:01 +00:00
chunk.ts fix(security): harden account-key handling against prototype pollution 2026-02-24 01:09:31 +00:00
command-auth.ts fix(commands): restrict commands.allowFrom to sender principals 2026-02-24 02:01:01 +00:00
command-control.test.ts fix(commands): restrict commands.allowFrom to sender principals 2026-02-24 02:01:01 +00:00
command-detection.ts
commands-args.test.ts style: align formatting with oxfmt 0.33 2026-02-18 01:34:35 +00:00
commands-args.ts refactor(auto-reply): share command action arg formatting 2026-02-18 17:23:44 +00:00
commands-registry.data.ts Discord: thread bindings idle + max-age lifecycle (#27845) (thanks @osolmaz) 2026-02-27 10:02:39 +01:00
commands-registry.test.ts Tests: validate discord slash command options 2026-02-27 18:41:16 -06:00
commands-registry.ts fix(slack): land #29032 /agentstatus alias from @maloqab 2026-02-27 19:09:38 +00:00
commands-registry.types.ts
dispatch.test.ts style: align formatting with oxfmt 0.33 2026-02-18 01:34:35 +00:00
dispatch.ts style: align formatting with oxfmt 0.33 2026-02-18 01:34:35 +00:00
envelope.test.ts fix(whatsapp): propagate fromMe through inbound message pipeline 2026-03-02 21:20:21 +00:00
envelope.ts fix(whatsapp): propagate fromMe through inbound message pipeline 2026-03-02 21:20:21 +00:00
fallback-state.test.ts feat(auto-reply): add model fallback lifecycle visibility in status, verbose logs, and WebUI (#20704) 2026-02-19 14:33:02 -08:00
fallback-state.ts feat(auto-reply): add model fallback lifecycle visibility in status, verbose logs, and WebUI (#20704) 2026-02-19 14:33:02 -08:00
group-activation.ts
heartbeat-reply-payload.ts refactor(heartbeat): share reply payload picker 2026-02-15 04:37:52 +00:00
heartbeat.test.ts Ignore up to 4 non-word characters when stripping HEARTBEAT_OK token … (#15847) 2026-02-14 01:36:04 +01:00
heartbeat.ts Ignore up to 4 non-word characters when stripping HEARTBEAT_OK token … (#15847) 2026-02-14 01:36:04 +01:00
inbound-debounce.ts refactor: unify inbound debounce policy and split gateway/models helpers 2026-03-03 00:54:33 +00:00
inbound.test.ts fix(security): harden spoofed system marker handling 2026-03-02 06:19:16 +00:00
media-note.test.ts chore: Fix types in tests 42/N. 2026-02-17 15:50:07 +09:00
media-note.ts
media-understanding.test-fixtures.ts refactor(agent): dedupe harness and command workflows 2026-02-16 14:59:30 +00:00
model-runtime.ts feat(auto-reply): add model fallback lifecycle visibility in status, verbose logs, and WebUI (#20704) 2026-02-19 14:33:02 -08:00
model.test.ts fix(models): normalize trailing @profile parsing across resolver paths 2026-02-26 14:34:15 +01:00
model.ts fix(models): normalize trailing @profile parsing across resolver paths 2026-02-26 14:34:15 +01:00
reply.block-streaming.test.ts test(reply): replace heavy resets in media and runner helper specs 2026-02-22 08:15:28 +00:00
reply.directive.directive-behavior.applies-inline-reasoning-mixed-messages-acks-immediately.test.ts chore(deps): bump workspace dependencies 2026-03-02 04:22:33 +00:00
reply.directive.directive-behavior.defaults-think-low-reasoning-capable-models-no.test.ts docs: tighten subscription guidance and update MiniMax M2.5 refs 2026-03-03 00:02:37 +00:00
reply.directive.directive-behavior.e2e-harness.ts test(auto-reply): share elevated-off status assertion 2026-02-18 17:01:22 +00:00
reply.directive.directive-behavior.e2e-mocks.ts test: fix tsgo baseline test compatibility 2026-03-03 01:24:20 +00:00
reply.directive.directive-behavior.model-directive-test-utils.ts test: dedupe fixtures and test harness setup 2026-02-23 05:45:54 +00:00
reply.directive.directive-behavior.prefers-alias-matches-fuzzy-selection-is-ambiguous.test.ts docs: tighten subscription guidance and update MiniMax M2.5 refs 2026-03-03 00:02:37 +00:00
reply.directive.directive-behavior.shows-current-verbose-level-verbose-has-no.test.ts test: consolidate directive behavior suites for faster runs 2026-02-23 21:48:12 +00:00
reply.directive.parse.test.ts
reply.heartbeat-typing.test.ts refactor: dedupe agent and browser cli helpers 2026-03-03 00:15:00 +00:00
reply.media-note.test.ts test(reply): replace heavy resets in media and runner helper specs 2026-02-22 08:15:28 +00:00
reply.raw-body.test.ts refactor: dedupe agent and browser cli helpers 2026-03-03 00:15:00 +00:00
reply.test-harness.ts refactor(test): share auto-reply temp home harness 2026-02-14 23:51:41 +00:00
reply.triggers.group-intro-prompts.cases.ts test: consolidate trigger handling suites 2026-02-23 19:41:47 +00:00
reply.triggers.trigger-handling.filters-usage-summary-current-model-provider.cases.ts test: prune redundant trigger handling integration coverage 2026-02-23 20:00:11 +00:00
reply.triggers.trigger-handling.stages-inbound-media-into-sandbox-workspace.test.ts refactor(core): dedupe final pairing and sandbox media clones 2026-03-02 21:36:23 +00:00
reply.triggers.trigger-handling.targets-active-session-native-stop.e2e.test.ts test: move integration-heavy suites to e2e lane 2026-03-02 05:33:07 +00:00
reply.triggers.trigger-handling.test-harness.ts docs: tighten subscription guidance and update MiniMax M2.5 refs 2026-03-03 00:02:37 +00:00
reply.ts
send-policy.ts
skill-commands.test.ts fix(skills): scope skill-command APIs to respect agent allowlists (#32155) 2026-03-03 02:00:05 +03:00
skill-commands.ts fix(skills): scope skill-command APIs to respect agent allowlists (#32155) 2026-03-03 02:00:05 +03:00
stage-sandbox-media.test-harness.ts style: align formatting with oxfmt 0.33 2026-02-18 01:34:35 +00:00
status.test.ts fix: read thinking/verbose/reasoning levels from session entry in status 2026-03-01 14:42:34 +05:30
status.ts fix: read thinking/verbose/reasoning levels from session entry in status 2026-03-01 14:42:34 +05:30
templating.ts feat(telegram): improve DM topics support (#30579) (thanks @kesor) 2026-03-02 09:06:45 +05:30
thinking.test.ts feat(agents): support `thinkingDefault: "adaptive"` for Anthropic models (#31227) 2026-03-02 03:52:02 +00:00
thinking.ts feat(agents): support `thinkingDefault: "adaptive"` for Anthropic models (#31227) 2026-03-02 03:52:02 +00:00
tokens.test.ts fix: prevent reasoning text leak through handleMessageEnd fallback 2026-03-02 20:32:01 +00:00
tokens.ts perf(runtime): trim hot-path allocations and cache channel plugin lookups 2026-03-02 23:56:30 +00:00
tool-meta.test.ts
tool-meta.ts
types.ts feat: lightweight bootstrap context mode for heartbeat/cron runs (openclaw#26064) thanks @jose-velez 2026-03-01 20:13:24 -06:00