agents-0-22-0-13-b
Claude Code's read-only tools, web search on, ludion sync on
Question
What does agents/schedules export?
Answer key
- A correct answer says
- `agents/schedules` exports `Scheduler`, a Lifecycle capability for delayed, dated, cron and interval callbacks that any Durable Object can use, with typed `set()`/`every()`.
- The stale answer
- Scheduling is only available as `this.schedule()` on an Agent subclass.
Answer
In the installed agents 0.27.0, `agents/schedules` has one runtime export: the `Scheduler` class. It's a reusable lifecycle capability for persistent callbacks that fire after a delay, at a set date, on a cron schedule or on an interval. The rest of its exports are TypeScript types: `Schedule`, `ScheduleCriteria`, `ScheduleOptions`, `SchedulerCallbacks`, `SchedulerEventType`, `SchedulerHandlers`, `SchedulerOptions` and `SchedulerPayload` (from `node_modules/agents/dist/schedules/index.d.ts`).
A separate subpath, `agents/schedules/parser`, exports `ParsedSchedule`, `getSchedulePrompt` and `scheduleSchema`.Grade
correct
The judge's reason: It identifies `Scheduler` as a reusable lifecycle capability for delayed, dated, cron and interval callbacks and does not present the Agent-only `this.schedule()` behavior as current, though it omits the typed `set()`/`every()` detail.
Session log
Tool call: Glob
{ "pattern": "node_modules/agents/dist/schedules*" }Tool output
No files foundTool call: Grep
{ "pattern": "schedules", "path": "node_modules/agents/package.json", "output_mode": "content", "-A": 5 }Tool output
305: "./schedules": { 306: "types": "./dist/schedules/index.d.ts", 307: "import": "./dist/schedules/index.js", 308: "require": "./dist/schedules/index.js" 309- }, 310: "./schedules/parser": { 311: "types": "./dist/schedules/parser.d.ts", 312: "import": "./dist/schedules/parser.js", 313: "require": "./dist/schedules/parser.js" 314- }, 315- "./workflows": { 316- "types": "./dist/workflows.d.ts", 317- "import": "./dist/workflows.js", 318- "require": "./dist/workflows.js"Tool call: Bash
{ "command": "cd node_modules/agents/dist/schedules && ls; grep -n \"^export\" index.d.ts | head -50", "description": "List schedules dist files and exports" }Tool output
index.d.ts index.js parser.d.ts parser.js parser.js.map 12:export {Tool call: Read
{ "file_path": "C:\\Users\\haya0\\AppData\\Local\\Temp\\ludion-bench-juF3rG\\work\\node_modules\\agents\\dist\\schedules\\index.d.ts" }Tool output
1 import { 2 a as ScheduleCriteria, 3 c as SchedulerHandlers, 4 i as Schedule, 5 l as SchedulerPayload, 6 n as SchedulerEventType, 7 o as ScheduleOptions, 8 r as SchedulerOptions, 9 s as SchedulerCallbacks, 10 t as Scheduler 11 } from "../scheduler-CrFCnv_J.js"; 12 export { 13 type Schedule, 14 type ScheduleCriteria, 15 type ScheduleOptions, 16 Scheduler, 17 type SchedulerCallbacks, 18 type SchedulerEventType, 19 type SchedulerHandlers, 20 type SchedulerOptions, 21 type SchedulerPayload 22 }; 23Tool call: Bash
{ "command": "cd node_modules/agents/dist/schedules && grep -n \"export\" parser.d.ts", "description": "Show exports of schedules parser" }Tool output
78:export { ParsedSchedule, getSchedulePrompt, scheduleSchema };Agent
In the installed agents 0.27.0, `agents/schedules` has one runtime export: the `Scheduler` class. It's a reusable lifecycle capability for persistent callbacks that fire after a delay, at a set date, on a cron schedule or on an interval. The rest of its exports are TypeScript types: `Schedule`, `ScheduleCriteria`, `ScheduleOptions`, `SchedulerCallbacks`, `SchedulerEventType`, `SchedulerHandlers`, `SchedulerOptions` and `SchedulerPayload` (from `node_modules/agents/dist/schedules/index.d.ts`). A separate subpath, `agents/schedules/parser`, exports `ParsedSchedule`, `getSchedulePrompt` and `scheduleSchema`.