Commit graph

38 commits

Author SHA1 Message Date
a41a2b53c9 Make cron_retrigger fire-and-forget so callers do not wait for the run.
Detached settle still finishes history and delivery in the background.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-11 20:54:40 +08:00
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
839660d12f Fix monitor test syntax after settleRun duration coverage.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 15:46:53 +08:00
8cc3bed5f1 Preserve run start timestamps when settling terminal status.
cron_runs entered/exited were identical because settleRun rewrote stateEnteredAt and actualAt to the finish instant.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 15:46:27 +08:00
6ed7187754 Fix cron_* Host registration: additionalProperties must be boolean.
labels schemas used additionalProperties:{type:string}, which assertSupportedJsonSchema rejects and aborted the whole tools.register batch.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 15:36:20 +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
9b8f937a65 Fix cron_* registration: Host rejects JSON Schema type arrays.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 10:50:09 +08:00
25454a5c8c Recover from corrupt ops-cron store and tighten cron tool schemas.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 10:34:41 +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
d1127dba88 Hide unclaimed cron jobs from non-admin viewers.
Unassigned jobs are visible only to super_admin / fallback_admin (canViewAll). Regular users still reclaim jobs proven by session owner or their user-workspaces cwd.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-08 17:03:56 +08:00
feae559fcf Restore cron sidebar UX: sync mode to editor and show orphan jobs.
DOM cron mode and React overlay could desync so the right pane stayed on the workspace chat; unassigned legacy jobs were also filtered out for normal users. Re-sync mode from the sidebar attribute and adopt/show reclaimable orphans again.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-08 16:39:21 +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
4447404361 Keep the job list mounted across sidebar collapse so it does not flash.
Expanding used to replay a fade-in and sometimes remount CronApp onto an
empty state before /jobs returned. Reattach the existing root and skip
setState when the snapshot has not changed.
2026-08-24 21:06:37 +08:00
Whale-Zhang
30e37b5e89 Match the collapsed list-hide selector in the installable-bundle test. 2026-08-24 17:24:56 +08:00
Whale-Zhang
d2a4b1b2fd Hide the scheduled-task list when the sidebar is the collapsed rail.
Official workspace rows unmount when !wide; the plugin list stayed flex
and leaked folder icons into the 56px rail.
2026-08-24 17:24:37 +08:00
Whale-Zhang
41a382c592 Lay the job editor in the center column so it tracks the sidebar grid.
The overlay used a measured left offset that sampled width in steps during
the frame's grid-template-columns transition, which stuttered and flashed
the chat behind it.
2026-08-24 17:13:59 +08:00
Whale-Zhang
f9b28f896f Hide the rail label and pin the clock icon to the button center.
Collapsed New Session renders only an 18px icon in a 36px control; the
plugin still laid out the title in the flex row, which shoved the glyph left.
2026-08-24 16:25:31 +08:00
Whale-Zhang
8e038700f2 Center the scheduled-tasks icon when the sidebar rail is collapsed.
The native New Session button hides its label and becomes a 36px square;
the plugin entry kept the label in flow, so the clock icon sat to the left.
2026-08-24 16:20:56 +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