5 Commits

Author SHA1 Message Date
Antonio
7f2778b2bc fix(cron): expose callerSessionKey in AJV schemas so session isolation reaches handlers
The per-caller ownership enforcement introduced for issue #35447 was
silently bypassed: all four mutation/list schemas used
additionalProperties:false but did not declare callerSessionKey, causing
AJV to strip the field before the handler could read it.  As a result
resolveCronCallerOptions always received an empty caller and fell back to
allow-all behaviour.

Fix:
- Add optional callerSessionKey (NonEmptyString) to CronListParamsSchema,
  CronUpdateParamsSchema, CronRemoveParamsSchema and CronRunParamsSchema.
- Update the four handlers in server-methods/cron.ts to read
  p.callerSessionKey instead of the previous p.sessionKey (which was
  never populated through these schemas).
- Add validator tests covering acceptance of the new field and rejection
  of empty strings across all four operations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 08:20:37 -03:00
kkhomej33-netizen
e7d9648fba
feat(cron): support custom session IDs and auto-bind to current session (#16511)
feat(cron): support persistent session targets for cron jobs (#9765)

Add support for `sessionTarget: "current"` and `session:<id>` so cron jobs can
bind to the creating session or a persistent named session instead of only
`main` or ephemeral `isolated` sessions.

Also:
- preserve custom session targets across reloads and restarts
- update gateway validation and normalization for the new target forms
- add cron coverage for current/custom session targets and fallback behavior
- fix merged CI regressions in Discord and diffs tests
- add a changelog entry for the new cron session behavior

Co-authored-by: kkhomej33-netizen <kkhomej33-netizen@users.noreply.github.com>
Co-authored-by: ImLukeF <92253590+ImLukeF@users.noreply.github.com>
2026-03-14 16:48:46 +11:00
Tak Hoffman
77c3b142a9
Web UI: add full cron edit parity, all-jobs run history, and compact filters (openclaw#24155) thanks @Takhoffman
Verified:
- pnpm install --frozen-lockfile
- pnpm build
- pnpm check
- pnpm test:macmini

Co-authored-by: Takhoffman <781889+Takhoffman@users.noreply.github.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-02-22 23:05:42 -06:00
Tak Hoffman
259d863353
Gateway: harden cron.runs jobId path handling (openclaw#24038) thanks @Takhoffman
Verified:
- pnpm install --frozen-lockfile
- pnpm build
- pnpm check
- pnpm test:macmini

Co-authored-by: Takhoffman <781889+Takhoffman@users.noreply.github.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-02-22 19:35:26 -06:00
Peter Steinberger
f054cd6709 refactor(gateway): dedupe cron protocol param schemas 2026-02-18 22:31:45 +00:00