mirror of
https://github.com/hansjone/dsh-ops-cron.git
synced 2026-10-10 17:23:21 +08:00
Add cron monitor APIs: labels, watch, progress, and query tools.
Extend jobs with lifecycle projection and history policies so listeners can poll state at scale without breaking existing cron_* flows. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
43facd608a
commit
b6934b20a3
10 changed files with 1501 additions and 53 deletions
|
|
@ -431,7 +431,16 @@ test('registerCronTools registers each definition and disposer unregisters', ()
|
|||
},
|
||||
}
|
||||
const off = registerCronTools(ctx, {})
|
||||
assert.deepEqual(registered, ['cron_create', 'cron_list', 'cron_pause', 'cron_resume', 'cron_delete'])
|
||||
assert.deepEqual(registered, [
|
||||
'cron_create',
|
||||
'cron_list',
|
||||
'cron_query',
|
||||
'cron_runs',
|
||||
'cron_progress',
|
||||
'cron_pause',
|
||||
'cron_resume',
|
||||
'cron_delete',
|
||||
])
|
||||
off()
|
||||
assert.deepEqual(registered, [])
|
||||
})
|
||||
|
|
@ -440,6 +449,9 @@ test('cron tool output schemas never use type arrays (Host rejects them)', () =>
|
|||
const defs = cronToolDefinitions({
|
||||
async createJob() { return {} },
|
||||
async listJobs() { return [] },
|
||||
async queryJobs() { return { jobs: [], items: [], count: 0 } },
|
||||
async listRuns() { return { task_id: '', runs: [], next_cursor: null, total: 0 } },
|
||||
async getProgress() { return { snapshots: [], count: 0 } },
|
||||
async pauseJob() { return {} },
|
||||
async resumeJob() { return {} },
|
||||
async deleteJob() { return {} },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue