Fork dsh-cron-tasks as dsh-ops-cron with DSH/IM delivery.

Agent cron_* jobs default to IM when created from a WhatsApp session with a matching delivery target; otherwise DSH sidebar sessions. Fire path soft-calls ctx.dshIm.send for summaries.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-09-05 21:48:17 +08:00
parent 4447404361
commit 2f08136adf
17 changed files with 472 additions and 285 deletions

View file

@ -23,7 +23,7 @@ export function createRunRecord(job, decision, now, trigger) {
}
}
export const TITLE_PREFIX = '定时任务 · '
export const TITLE_PREFIX = '运维定时 · '
export function extractAssistantText(messages, maxChars = 4000) {
if (!Array.isArray(messages)) return ''
@ -55,6 +55,9 @@ export function publicJob(job) {
provider: job.provider || '',
model: job.model || '',
reasoningEffort: job.reasoningEffort || '',
delivery: job.delivery && job.delivery.kind === 'im'
? { kind: 'im', botId: job.delivery.botId, targetId: job.delivery.targetId }
: { kind: 'dsh' },
schedule: job.schedule,
createdAt: job.createdAt,
updatedAt: job.updatedAt,