mirror of
https://github.com/hansjone/dsh-ops-cron.git
synced 2026-10-18 06:20:44 +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
|
|
@ -2,7 +2,7 @@
|
|||
* dsh-ops-cron, node half.
|
||||
*
|
||||
* Durable scheduled jobs: create a fresh root Session on fire, hide that
|
||||
* session from the workspace list, and keep history under 运维定时.
|
||||
* session from the workspace list, and keep history under 定时任务.
|
||||
* Jobs may deliver summaries to IM via soft-injected ctx.dshIm.
|
||||
*
|
||||
* Do not list @deepseek-ai/* in package.json — resolve schemastery from the
|
||||
|
|
@ -131,6 +131,7 @@ function registerWebRoute(ctx, handler) {
|
|||
export function apply(ctx, config = {}) {
|
||||
const entry = resolveConfig(config)
|
||||
const getDshIm = () => tryGet(ctx, 'dshIm')
|
||||
const getAgentPresets = () => tryGet(ctx, 'agentPresets')
|
||||
const service = createHostService({
|
||||
sessionPort: makeLiveSessionPort(ctx),
|
||||
getDshIm,
|
||||
|
|
@ -143,7 +144,7 @@ export function apply(ctx, config = {}) {
|
|||
})
|
||||
|
||||
ctx.inject(['tools'], (tctx) => {
|
||||
registerCronTools(tctx, service, { getDshIm })
|
||||
registerCronTools(tctx, service, { getDshIm, getAgentPresets })
|
||||
tctx.logger?.info?.('[dsh-ops-cron] tools cron_create/list/pause/resume/delete registered')
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue