Commit graph

24 commits

Author SHA1 Message Date
89ab5f59af Add cron_reschedule so pending one-shots can be moved without delete/recreate.
Keeps retrigger for consumed jobs only; agents can advance or delay nextRunAt safely.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-11 19:57:22 +08:00
b22048d377 Fix one-shot jobs that never auto-fire after restart or slow ticks.
recover was clearing past-due at nextRunAt via nextFire→null; keep and re-arm them, and evaluate schedule misfire at tick start so a slow prior job cannot age peers out of grace.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-11 07:00:29 +08:00
8cf624ce7f Add sidebar run permission preset for scheduled jobs.
Default inherits Host new-session access mode; humans can raise to workspace-write or full access. Agents never see or set the field.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 22:08:39 +08:00
ad6e90f197 Add sidebar-only agentAccess lock for scheduled jobs.
Default remains allow; humans can deny agent pause/resume/retrigger/delete in the panel while tools never expose or set the field.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 21:54:31 +08:00
4472a9c74b Normalize doubled provider/model routes on cron create and fire.
Agents often pass zte/Qwen3-… as both provider and model; split combined routes so scheduled runs resolve a real model.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 21:46:16 +08:00
3ce60b200c Allow cron_retrigger to immediately fire recurring jobs.
Recurring tasks can start one extra run now without changing the cron schedule; delay remains oneshot-only.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 21:22:06 +08:00
c11221606a Add cron_retrigger for consumed one-shot jobs.
Resume only unpauses; listeners need a native way to re-fire the same job id with a new run without creating duplicate executors.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 17:40:39 +08:00
2e13432b0a Show cron state/labels in sidebar and push archive history.
Surface lifecycle badges and editable monitor fields in the UI, and POST terminal runs to persist_history archive endpoints on settle/tick.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 15:29:04 +08:00
b6934b20a3 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>
2026-09-10 15:23:42 +08:00
43facd608a Keep shared external cron cwd (e.g. D:\code\gpt) instead of silent clamp.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 11:23:41 +08:00
7a2a673ac2 Keep foreign cron cwd for super_admin via live role resolve and session default.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 11:09:56 +08:00
b1bb0067a0 Fix cron cwd for super_admin and harden IM channel job isolation.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 10:00:59 +08:00
b35bfde557 Add zh/en i18n and follow DSH locale.bind for UI.
Wire API/delivery/tool strings through lib/i18n.js, and make the sidebar use ctx.locale.bind plus locale/change so English host preference no longer stays frozen on Chinese.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-09 22:10:07 +08:00
819feed310 Make origin session mirror opt-in per job.
Default mirrorToSession to false so cron summaries stay in run history unless the sidebar checkbox or mirror_to_session is enabled.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-08 21:00:20 +08:00
933bad9201 Make uds-auth optional: standalone local mode for cron.
Without udsAuth, trusted HTTP uses a synthetic __local__ viewer that sees all jobs; with uds-auth, keep multi-user empNo isolation and admin folders. Document that IM channels are not default UDS accounts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-08 17:39:54 +08:00
a0dc070372 Stamp and reclaim chat-created cron jobs for the current user.
Tool creates often left ownerEmpNo unassigned so the sidebar hid them while runs still fired; infer identity from session/cwd, claim legacy orphans on list, and keep cron rows visible without leaking run sessions into the workspace list.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-08 16:19:59 +08:00
7d27179e51 Isolate scheduled tasks by empNo, aligned with uds-auth workspaces.
Super/fallback admins see all jobs grouped by user folder; admin/user only see their own. Stamp ownership on create, filter HTTP/tools, and prefer the owner's provisioned cwd on fire.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-08 15:49:54 +08:00
a38f3dcec3 Require browser login for scheduled-task HTTP APIs.
List/run/pause/resume/delete now return 401 without UDS cookies; hide sidebar chrome when logged out. uds-auth still validates the session store on the same routes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-08 08:06:54 +08:00
67238d746e Isolate IM cron tools and trust-gate read APIs.
Scope list/pause/delete to the calling chat, bind IM delivery to that peer, ignore client job ids, require trusted Host for GETs, and wrap mirrored summaries as system reminders.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-06 14:45:37 +08:00
29d946f3dd Mirror scheduled-run summaries into the origin effective session.
Pin origin at create time, keep isolated fire sessions for audit, and after IM/DSH delivery resume or open the origin chat to append the same summary for follow-ups.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-06 12:45:37 +08:00
2e690c30c8 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>
2026-09-06 02:31:43 +08:00
2f08136adf 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>
2026-09-05 21:48:17 +08:00
Whale-Zhang
b0d0db1553 Allow each scheduled job to pin its provider and model.
New jobs snapshot the current New Session default so quota is predictable.
cron_create inherits the calling session model unless provider+model are set.
The editor lists configured models; the job row shows which model will run.
2026-08-24 14:31:52 +08:00
Whale-Zhang
ef8ff6e10d Initial commit: scheduled tasks plugin for DeepSeek Harness
Sidebar jobs under New Session, isolated run history, cron/at schedules, and model-facing cron_* tools.
2026-08-24 14:16:47 +08:00