Playlist Rebuild Orders
playlist_rebuild_ordersThe rebuild orders the playlist store writes for the Queue's build job. An order is written the moment a school's policy or a checklist's playlist is found stale (its pages or its catalog page differ from what is read now), when a stored playlist fails the current save check, and, when a school's policy passes its save and replaces the one in use, for every playlist built on the replaced policy. At most one order is open or taken per policy or playlist, and an order that ended done or dropped is not written again for the same row and reason. action list (the default) answers the orders, the oldest first, with an optional status (open, taken, done or dropped) and limit (default 50, at most 500). action take, with order_id, makes one open order taken; a playlist order waits, answered taken false with the reason, while its school's policy order is open or taken. action finish, with order_id and ending (done or dropped), ends a taken order, with the optional request_id that ran it and a note of what the build said. action release, with order_id and note, turns a taken order whose build was lost back to open, keeping the note in result_note; it is not ended, so it counts as neither done nor dropped. The row in use keeps serving until a rebuild passes its save and replaces it. [PLAYLIST_QUEUE_SLOT_TASKS, Q-Q6] action tasks answers a playlist's slot tasks: with checklist_id, those of its template-built playlist in use; with order_id, those an order's run last worked; with work_id, those of one copy; each task with its slot, row, field, span, kind, status, slot state, why, calls, tokens and history, and their count by state. An order run's own steps (run_copy, run_advance, run_close, slot_calls, slot_answer, policy_ladder, policy_values, run_passes) are answered only to main KSAserver's own key.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "playlist_rebuild_orders"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | With run_advance: the task kind moved on | |
| note | No | Optional with finish: what the build said. Required with release: why the order goes back to open | |
| rows | No | With run_copy and reopen rows: the row ids whose tasks are reopened | |
| limit | No | Optional, with list: how many orders to answer (default 50, at most 500) | |
| skill | No | With post or residue: the fill skill that posted or hands over the residue | |
| action | No | list (the default), take, finish or release; set answers the test set, the source checklists that govern the rebuild; run_set writes one test_set order for each checklist of the set that has none open or taken, rebuilt from its checklist whatever its last order ended; post, with skill and checklist_ids or element_id (and the optional undo_record), writes one database_post order for each checklist a fill skill posted to, or that links the shared element it posted to, each waiting for a publish that holds the post; residue, with skill, checklist_id and rows, writes one residue order that reopens those rows for the slot calls, whose checked answers are handed back on the tasks for the skill to post; tasks answers slot tasks; run_copy, run_advance and run_close are an order run's steps, main's key only | |
| ending | No | With finish: done when the rebuild passed, dropped when it failed | |
| reopen | No | Optional, with run_copy: work the copy in use with only these tasks reopened | |
| status | No | Optional, with list: only the orders with this status | |
| work_id | No | With tasks, run_advance or run_close: the copy whose tasks are read or worked | |
| order_id | No | With take, finish or release: the order | |
| task_ids | No | Optional, with run_advance: only these tasks | |
| element_id | No | Optional, with post: the shared award-level element the skill posted to; every checklist that links it is ordered | |
| request_id | No | Optional, with finish: the build request that ran the order | |
| undo_record | No | Optional, with post: the undo record the skill wrote beside its post | |
| checklist_id | No | With tasks: the checklist whose template-built playlist's tasks are answered. With run_copy or run_close: the checklist | |
| checklist_ids | No | With post: the checklists whose rows the skill posted to |