You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move scheduler behavior into a dedicated `@sentry/junior-scheduler`
trusted plugin package. Apps now opt into scheduled tasks with
`schedulerPlugin()`, while core keeps the generic heartbeat, dispatch,
and plugin-state primitives.
**Plugin Boundary**
The scheduler package owns schedule tools, recurrence math, prompt
framing, durable scheduler state, and heartbeat dispatch.
`@sentry/junior` no longer registers scheduler hooks by default.
**Trusted Plugin API**
Expose plugin state locking, set-if-not-exists writes, and
`AgentPluginToolInputError` so scheduler can preserve its idempotency
and model-repairable validation behavior outside core.
**Release And Docs**
Add the scheduler package to workspace dependencies, release metadata,
CI packaging, docs, tests, and eval harness wiring.
---------
Co-authored-by: GPT-5 Codex <codex@openai.com>
-`AI_WEB_SEARCH_MODEL` (optional, overrides the `webSearch` tool model; defaults to a search-tuned model)
30
30
-`JUNIOR_SECRET` (required outside `pnpm dev`; the local wrapper supplies a dev-only secret when unset)
31
-
-`JUNIOR_SCHEDULER_SECRET` or `CRON_SECRET` (optional for `pnpm dev`; the local wrapper supplies a dev-only secret when both are unset)
31
+
-`JUNIOR_SCHEDULER_SECRET` or `CRON_SECRET` (optional for `pnpm dev`; the local wrapper supplies a dev-only heartbeat secret when both are unset)
32
32
-`NOTION_TOKEN` (optional, enables the bundled Notion plugin)
33
33
34
34
## Wiring
35
35
36
36
-`plugin-packages.ts` is the single source of truth for installed plugin packages in this app
37
37
-`nitro.config.ts` passes that list to `juniorNitro()` so plugin content is copied into the build output
38
38
-`server.ts` passes the same list to `createApp()` so local dev does not depend on Nitro's virtual config path for plugin discovery
39
-
- root `pnpm dev` starts a local heartbeat loop that calls `/api/internal/heartbeat` every minute, matching the production cron pulse used by the built-in scheduler plugin; it also defaults `JUNIOR_BASE_URL` to the local server when unset so signed internal callbacks can recover scheduled dispatches
39
+
- root `pnpm dev` starts a local heartbeat loop that calls `/api/internal/heartbeat` every minute, matching the production cron pulse used for trusted plugin heartbeats and stale dispatch recovery; it also defaults `JUNIOR_BASE_URL` to the local server when unset so signed internal callbacks can recover dispatched runs
@@ -331,7 +331,7 @@ Then install it in the host app:
331
331
pnpm add @acme/junior-example
332
332
```
333
333
334
-
The `juniorNitro({ plugins: { packages: [...] } })` module includes `app/**/*` and the declared plugin package content in the deployed function bundle. The plugin list is automatically available at runtime via `createApp()` for declarative manifest behavior. Plugins that export trusted runtime hooks, such as `@sentry/junior-github`, must also be registered from app code.
334
+
The `juniorNitro({ plugins: { packages: [...] } })` module includes `app/**/*` and the declared plugin package content in the deployed function bundle. The plugin list is automatically available at runtime via `createApp()` for declarative manifest behavior. Plugins that export trusted runtime hooks, such as `@sentry/junior-scheduler` and `@sentry/junior-github`, must also be registered from app code.
Copy file name to clipboardExpand all lines: packages/docs/src/content/docs/extend/scheduler-plugin.md
+31-12Lines changed: 31 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
---
2
2
title: Scheduler Plugin
3
-
description: Enable and verify Junior's built-in scheduled task support.
3
+
description: Enable and verify Junior's scheduled task support.
4
4
type: tutorial
5
-
summary: Configure the built-in scheduler plugin so Slack users can create reminders and recurring tasks.
5
+
summary: Configure the scheduler plugin so Slack users can create reminders and recurring tasks.
6
6
prerequisites:
7
7
- /start-here/quickstart/
8
8
- /start-here/slack-app-setup/
@@ -12,20 +12,39 @@ related:
12
12
- /operate/reliability-runbooks/
13
13
---
14
14
15
-
The scheduler plugin is built into `@sentry/junior`. It registers Slack tools for creating, listing, updating, deleting, and running scheduled tasks, then uses Junior's internal heartbeat to dispatch due work back to the configured Slack conversation.
15
+
The scheduler plugin lives in `@sentry/junior-scheduler`. It registers Slack tools for creating, listing, updating, deleting, and running scheduled tasks, then uses Junior's internal heartbeat to dispatch due work back to the configured Slack conversation.
16
16
17
17
## Runtime setup
18
18
19
-
No plugin package install is required. `createApp()` registers the trusted scheduler plugin automatically:
|`CRON_SECRET` or `JUNIOR_SCHEDULER_SECRET`| Production | Bearer token for internal scheduler and heartbeat routes. Use `CRON_SECRET` with Vercel Cron. |
55
-
|`JUNIOR_TIMEZONE`| No | Default IANA timezone for schedule authoring. Defaults to `America/Los_Angeles`. |
|`CRON_SECRET` or `JUNIOR_SCHEDULER_SECRET`| Production | Bearer token for the internal heartbeat route. Use `CRON_SECRET` with Vercel Cron. |
74
+
|`JUNIOR_TIMEZONE`| No | Default IANA timezone for schedule authoring. Defaults to `America/Los_Angeles`. |
56
75
57
-
Local development can run without a scheduler route secret when you call the dev server directly. Production deployments should set `CRON_SECRET` or `JUNIOR_SCHEDULER_SECRET`.
76
+
Local development can run without a heartbeat route secret when you call the dev server directly. Production deployments should set `CRON_SECRET` or `JUNIOR_SCHEDULER_SECRET`.
58
77
59
78
## Verify
60
79
@@ -80,4 +99,4 @@ For recurring or non-reminder scheduled work, Junior should show the proposed ta
80
99
81
100
## Next step
82
101
83
-
Read [Build a Plugin](/extend/build-a-plugin/) for the trusted `tools(ctx)` and `heartbeat(ctx)` APIs that the built-in scheduler uses.
102
+
Read [Build a Plugin](/extend/build-a-plugin/) for the trusted `tools(ctx)` and `heartbeat(ctx)` APIs that the scheduler uses.
0 commit comments