Commit Graph

7 Commits

Author SHA1 Message Date
Alex Knight
cd24da031b feat(plugin-sdk): expose sessionTarget and agentId on cron_changed hook events (#77641) 2026-05-05 18:48:06 +10:00
Alex Knight
f155a5f955 Add cron changed plugin hook (#72773)
* feat: add cron changed plugin hook

* fix: improve cron_changed hook correctness and code quality

- Fix PluginHookGatewayCronDeliveryStatus: replace 'error' with 'unknown'
  to match internal CronDeliveryStatus enum
- Add job snapshot to CronEvent so removed events carry the deleted job
- Extract pickDefined helper, replace 14-field verbose spread mapping
- Add toPluginCronJob mapper for explicit internal→public type boundary
- Fix schedule union: use literal-only kind discriminants for TS narrowing
- Use loadConfig() (runtime) instead of params.cfg (startup) in hook ctx
- Use formatErrorMessage instead of String(err) for stack preservation
- Fix pre-existing getCron TS2322 with explicit cast (matches gateway_start)
- Re-export supporting types from hooks.ts for plugin consumers
- Add tests: removed events with job, finished with full fields, runtime cfg
2026-04-28 21:34:42 +10:00
Vincent Koc
6d003cbcee fix(hooks): expose typed gateway startup context 2026-04-22 11:22:51 -07:00
Peter Steinberger
1256943a46 test: dedupe plugin hook runner suites 2026-03-28 03:30:25 +00:00
Peter Steinberger
c1fb18189b test: dedupe plugin hook runner suites 2026-03-28 02:05:01 +00:00
Peter Steinberger
e2c68cb169 refactor(test): share plugin hook registry helper 2026-02-15 14:44:15 +00:00
Kyle Tse
2655041f69 fix: wire 9 unwired plugin hooks to core code (openclaw#14882) thanks @shtse8
Verified:
- GitHub CI checks green (non-skipped)

Co-authored-by: shtse8 <8020099+shtse8@users.noreply.github.com>
2026-02-12 18:14:14 -06:00