Skip to content

feat(web): deploy schedules become cron rows addressed at the agent's run (CL-8534) - #925

Merged
TheGreatAxios merged 3 commits into
mainfrom
cl-8534-schedule-cron-rows
Sep 18, 2026
Merged

TheGreatAxios merged 3 commits into
mainfrom
cl-8534-schedule-cron-rows

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Summary

  • A deployed agent can carry an optional five-field cron schedule; on success it creates a @corbits/cron row addressed at the deploy's run, since Interchange's own schedule trigger is reserved but never fires.
  • The Workflows/Routines page reads that schedule back (GET /cron joined against each deployment's run address) instead of the old "manual" placeholder.
  • Myra's deploy contract regains the optional schedule field, matching what PR refactor(web)!: drop the schedule trigger and cron column (CL-8527) #918 removed.

Changes

  • apps/web/src/agent-deploy.ts: NewAgentInput.schedule, and scheduleAgentRun posts a cron row to POST /api/tenants/:id/cron (expression, toAddress: run_<id>@<domain>, subject "Scheduled run", body "This is your scheduled run. Do the work your definition describes and reply with the result.") after a successful deploy.
  • apps/web/src/chat/deployable-package.ts: restores the schedule? field and isFiveFieldCron shape check on the deploy package contract.
  • apps/web/src/chat/message-attachments.tsx: shows the schedule's cron sentence on the deploy card, disables Deploy on an invalid schedule, and forwards it to the deploy mutation.
  • apps/web/src/routines-api.ts: adds a CronSchedule arktype schema and listCronSchedules, and joins cron rows onto ScheduledWorkflowDefinition.schedule by the deployment's run address (same join chat/threads-api.ts uses for a chat agent's live address).
  • apps/web/src/pages/routines-page.tsx / routine-detail-page.tsx: render the joined schedule instead of the removed cron column/sentence.
  • agents/myra/src/system-prompt.ts: mentions the optional cron schedule in the definition contract again.

Testing

  • bun test apps/web/src/chat/deployable-package.test.ts apps/web/src/insights-stats.test.ts apps/web/src/agent-deploy.test.ts
  • bun run check (typecheck, lint, fmt, full test suite) — green.
  • Not verified: an actual scheduled agent firing on the next minute against a live hub — left to the orchestrator per the issue.

…(CL-8534)

Reintroduce coverage for a deploy package's cron string ahead of restoring
the schedule field, and update the routines fixture for the new schedule
column.
… run (CL-8534)

A deployed agent's optional five-field cron schedule now creates a
@corbits/cron row addressed at that deploy's run, since Interchange's own
schedule trigger is reserved but never fires. The Workflows page reads the
schedule back by joining GET /cron against each deployment's run address,
replacing the old "manual" placeholder.
@linear-code

linear-code Bot commented Sep 18, 2026

Copy link
Copy Markdown

CL-8534

@TheGreatAxios
TheGreatAxios merged commit 3192292 into main Sep 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant