Repository navigation
Commit 698fc44
fix: Serve task and schedule instructions only with their tools (#1579)
## Why
Closes #1576.
`getServerInstructions()` always rendered `## Actor tasks` and `##
Schedules`, so sessions without any task or schedule tool were told
about them, including "the create tool here enables them".
## What changed
Server instructions contract change. The render with every tool served
is byte-identical to master (default and apps mode).
- `## Actor tasks` renders when any of the five task tools is served;
`## Schedules` when any of the four schedule tools is.
- Inside them:
- "Creating or updating a task does not make it public." needs
`create-actor-task` or `update-actor-task`.
- The two publishing bullets need `publish-actor-task`.
- The schedule creation sentence needs `create-schedule`.
- "send every action to keep" needs `update-schedule`.
- The cron advice "so use an explicit expression when the user names a
time" needs `create-schedule` or `update-schedule`.
- The other bullets are facts about tasks and schedules and stay
whenever the section renders.
Default sessions (`actors`, `docs`) and the Claude connector `?tools=`
set now get neither section.
With only `get-schedule` and `get-actor-task`:
```
## Actor tasks
- An Actor task is a saved, reusable configuration of an Actor. It stores the Actor input and run options such as the build, memory, and timeout.
- Tasks are useful for repeated or scheduled jobs, because the user does not have to configure the Actor again for every run.
## Schedules
- A schedule runs Actors and/or saved tasks automatically on a cron expression, evaluated in the schedule's time zone (default UTC).
- A cron expression has 5 fields (minute hour day-of-month month day-of-week), with an optional leading seconds field. The shortcuts @hourly, @daily, @Weekly, @monthly and @Yearly fire at a random offset inside their period.
- Disabling a schedule pauses it without losing its configuration.
- With isExclusive (the default), a run is skipped while the previous run from the same action is still running.
- A schedule holds at most 10 Actor actions and 10 task actions.
```
## Notes for reviewers (human-written)
## Proof it works
mcpc against a local stdio build (0.18.3 + this branch):
- Claude connector tool set (`--tools` with the 23 selectors, `--ui
apps`): instruction headings are `Actor`, `Actor discovery and
selection`, `Actor execution workflow`, `Storage types`, `Apify API
resources`, `Tool dependencies and disambiguation`. No `## Actor tasks`,
no `## Schedules`, no `MUST`.
- `--tools get-schedule,get-actor-task`: both sections, exactly as
quoted above.
The new unit tests failed on master (10 failures). A review script
rendered all 512 subsets of the nine task and schedule tools in both
modes, with and without the other tools: no tripled newlines, a blank
line before every heading, text outside the two sections identical to
master.
AI-assisted: Claude Code wrote the change, tests and this description,
and ran the mcpc probe.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01CPzYK17FoL2F3cuVonqnej
---
_Generated by [Claude
Code](https://claude.ai/code/session_01CPzYK17FoL2F3cuVonqnej)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 62f30e6 commit 698fc44
2 files changed
Lines changed: 137 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
192 | 232 | | |
193 | 233 | | |
194 | 234 | | |
| |||
210 | 250 | | |
211 | 251 | | |
212 | 252 | | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
| 253 | + | |
229 | 254 | | |
230 | 255 | | |
231 | 256 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
215 | | - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
216 | 255 | | |
217 | | - | |
218 | | - | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
219 | 270 | | |
| 271 | + | |
220 | 272 | | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
229 | 287 | | |
230 | 288 | | |
231 | 289 | | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
232 | 309 | | |
233 | 310 | | |
234 | 311 | | |
| |||
379 | 456 | | |
380 | 457 | | |
381 | 458 | | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
382 | 466 | | |
0 commit comments