mirror of
https://github.com/hansjone/dsh-ops-cron.git
synced 2026-10-18 02:50:45 +08:00
Inherit agent presets and auto-bind IM delivery targets (0.1.7).
Cron jobs created from WhatsApp can omit bot/target ids and reuse chat overrides; sidebar/agent preset pins persist on fire. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
2f08136adf
commit
2e690c30c8
15 changed files with 830 additions and 82 deletions
|
|
@ -9,6 +9,7 @@ import { randomUUID } from 'node:crypto'
|
|||
import { applyRunIsolation, recordHiddenSession } from './isolation.js'
|
||||
import { nextFire, validateSchedule } from './scheduler.js'
|
||||
import { normalizeDelivery } from './delivery.js'
|
||||
import { normalizeAgentPresetId } from './preset.js'
|
||||
|
||||
export const STORE_VERSION = 1
|
||||
|
||||
|
|
@ -94,6 +95,7 @@ export function createJobRecord(input, state, now) {
|
|||
const timeoutMinutes = Number(input.timeoutMinutes)
|
||||
const model = normalizeJobModel(input)
|
||||
const delivery = normalizeDelivery(input.delivery)
|
||||
const agentPreset = normalizeAgentPresetId(input.agentPreset ?? input.agent_preset)
|
||||
const job = {
|
||||
id: String(input.id || newId()),
|
||||
name,
|
||||
|
|
@ -106,6 +108,7 @@ export function createJobRecord(input, state, now) {
|
|||
provider: model.provider,
|
||||
model: model.model,
|
||||
reasoningEffort: model.reasoningEffort,
|
||||
agentPreset,
|
||||
delivery,
|
||||
schedule: schedule.kind === 'cron'
|
||||
? { kind: 'cron', expr: schedule.expr, timezone: schedule.timezone }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue