opencode/packages/core
Ryan Vogel 705c3ab746 feat(core): let agents create recurring and one-shot schedules
Adds schedule_create, schedule_list and schedule_cancel tools in the
opencode namespace so the agent can schedule prompts back into its own
session. schedule_create accepts `every` (30s/15m/2h/1d), `at` (ISO 8601
with offset) for a single run, or both (`at` sets the first run).

SessionSchedule now stores multiple schedules per session, keyed by a
new `sch_` ID, and persists the absolute next fire time instead of only
the interval. This replaces the one-schedule-per-session model and fixes
restarts resetting the countdown: one-shots fire at their original time
after a restart, and overdue recurring schedules fire once then resume
their cadence rather than bursting. `/schedule off` now cancels every
schedule in the session. Past `at` times, missing timing and invalid
intervals return tool errors.

Verified with an isolated managed-mode server and a scripted
OpenAI-compatible mock model driving `execute`: create every 5s fired
every 5s; `at` fired at 15:55:42.013 for a 15:55:42 target; a one-shot
created before a restart fired on time after it (15:56:23.013); list
returned both schedules with server time; cancel stopped firing; invalid
inputs returned the three expected errors. core and server typecheck.
2026-09-29 11:57:09 -04:00
..
script chore(core): remove dead modules and exports (#51667) 2026-09-27 06:38:43 -07:00
src feat(core): let agents create recurring and one-shot schedules 2026-09-29 11:57:09 -04:00
test fix(core): drop SSO link from Console sign-in error (#52062) 2026-09-29 12:04:27 +02:00
bunfig.toml refactor(core): simplify integration test fixtures (#33292) 2026-06-22 04:15:34 +00:00
drizzle.config.ts refactor(core): move database schema ownership (#29068) 2026-05-30 21:08:38 -04:00
package.json sync release versions for v2.0.19 2026-09-29 04:31:02 +00:00
README.md refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00
schema.json feat(core): order projects by recent activity (#50790) 2026-09-23 01:59:32 +00:00
sst-env.d.ts refactor: rename shared package to core (#24309) 2026-04-25 10:59:17 -04:00
tsconfig.build.json feat(core): configure package publishing 2026-08-12 09:30:34 -04:00
tsconfig.json fix(core): restore bundler resolution for source-imported deps (#41885) 2026-08-11 21:01:24 -04:00
tsconfig.tests.json chore: improve incremental typecheck performance (#40925) 2026-08-07 15:34:36 -04:00

@opencode/core

Core runtime services for OpenCode.