aiworkhub_task_archive
Archive stale non-processing tasks atomically with per-task receipts and dry-run previews; use selectors or explicit IDs to avoid direct SQLite writes.
Instructions
COORDINATOR WRITE: archive stale non-processing tasks atomically
(archived_at + card_json + an archived task_events row each). Runs the
full coordinator-capability write gate per item -- use this instead of
patching SQLite. For an active/orphaned card use supersede.
Targets: one task_id, task_ids (<= 200), or a selector
(status/topic/older_than_hours/task_id_prefix, conjunctive).
dry_run=True previews the exact ids (and the processing cards that
would be refused) without writing. Replies with per-id receipts
{task_id, ok, status_after, error?}; one refusal never hides the rest.
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": "aiworkhub_task_archive"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| topic | No | Selector: only archive cards with exactly this topic. | |
| reason | No | Why the cards are archived, recorded with each audit event; default empty. | |
| status | No | Selector: only archive cards whose status equals this value; all selectors given must match. | |
| dry_run | No | Set true to list the exact ids that would be archived, and the processing cards that would be refused, without writing; default false. | |
| task_id | No | Id of a single card to archive; omit when passing task_ids or a selector. | |
| task_ids | No | Explicit list of card ids to archive, at most 200; merged with task_id and de-duplicated, and not combinable with a selector. | |
| task_id_prefix | No | Selector: only archive cards whose id starts with this prefix. | |
| older_than_hours | No | Selector: only archive cards last updated at least this many hours ago. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||