Commit Graph
78 Commits
Author SHA1 Message Date
david-dev666 9a9117967e feat(cron): expose recent run history to the agent 2026-10-25 14:21:47 +08:00
david-dev666 f971712f4f feat(cron): enable and disable jobs from the tool 2026-10-25 14:08:36 +08:00
david-dev666 60fd7c1a64 feat(cron): update scheduled tasks in place 2026-10-25 13:42:15 +08:00
Xubin Renandchengyongru fbb61a373f feat(update): integrate managed installs and recoverable in-app updates (#6168)
Add owner-aware Stable and Preview updates with explicit consent, verified release plans, protected process handoff and bounded service recovery. Keep configuration and conversations separate from program rollback.

Include the compact About controls, Windows long-path support, native package recovery checks and optional macOS Dock lifecycle integration. Preserve documented guidance for installations owned by other managers.

This code integration does not publish packages, enable signing or advance the public update channel.

Co-authored-by: chengyongru <61816729+chengyongru@users.noreply.github.com>
2026-10-21 19:16:56 +08:00
chengyongru f284749d2f ci: reduce Python test overhead and Windows latency (#6357)
* test: merge overlapping semantic contract coverage

Consolidate the six confirmed NAN-310 overlap groups while preserving replay, usage, generation kwargs, archive metadata, inspect fields, and subagent crash/redelivery assertions.

* test: lighten history seeds and layer runner progress rules

* ci: defer test storage setup and record phase timings

Close each listener-owned binary bridge before waiting for its TCP server; retain active upload and undecided-connection regressions. Avoid consuming readiness twice and run the repository import scan once in its static gate. NAN-310.

* test: scope filesystem mocks and observe consumed socket prefixes

* test: publish subprocess readiness files atomically

* ci: isolate external tool discovery and use three Windows workers
2026-10-21 14:47:55 +08:00
fhgffy a3ead61580 fix(cron): preserve schedules edited during execution 2026-10-18 22:11:14 +08:00
Xubin Ren 59bfdc895b test(cron): cover repeated restart and overdue interval behavior 2026-10-18 21:44:59 +08:00
DDT 6dd3788e05 fix(cron): keep pending interval runs across gateway restarts
Every-interval jobs had their next run recomputed from now on startup,
and register_system_job reset the Dream/heartbeat state on each boot.
A gateway restarted more often than the interval therefore never ran
the job. Keep a persisted next run while it is still pending and at
most one interval away.
2026-10-18 21:44:59 +08:00
Xubin Ren 61db036cee test(cron): narrow delivery review to saved-chat routing 2026-10-17 12:49:03 +08:00
chengyongru 5be1e589f2 feat(providers): share Responses backend with Codex WebSocket continuation (#6096)
* feat(codex): continue sessions over Responses WebSocket

* fix(codex): retain API errors with repeated handshake headers

* test(codex): assert attachment paths before JSON escaping

* refactor(providers): share Responses transport and state backend

* fix(grok): update subscription client version

* docs: keep Codex configuration focused on user settings
2026-10-08 11:54:23 +08:00
Xubin Ren ab614478a0 fix(automations): unify chat replies and preserve explicit sends 2026-10-07 01:12:23 +08:00
Xubin Ren d8c3b3cab5 test(cron): cover rejected updates and legacy interval recovery 2026-10-03 19:28:39 +08:00
bob b5f539292d fix(cron): reject non-positive every_seconds intervals
A negative every_seconds created a job with no next run and still reported 'Created job', so it silently never fired. every_seconds=0 passed the exactly-one-schedule check but then fell through the truthiness test to the misleading 'either every_seconds, cron_expr, or at is required' error. Declare minimum=1 in the tool schema, check every_seconds explicitly, and have CronService refuse every schedules without a positive every_ms, matching the WebUI parser.
2026-10-03 19:28:39 +08:00
yu-xin-c 0dcc03c4a9 fix(cron): preserve pending actions until store save succeeds 2026-10-03 00:08:49 +08:00
chengyongru 6eccc2859a test: consolidate repetitive cases across the suite 2026-09-25 14:28:21 +08:00
chengyongru c406024b59 test: consolidate redundant compaction and tool tests 2026-09-25 14:28:21 +08:00
FanouZeng-TTandClaude Code 835cac0ae7 fix(cron): reject conflicting schedule fields
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-17 21:05:13 +08:00
FanouZeng-TTandClaude Code b1d54b2ca2 fix(cron): reject past one-time schedules in the cron tool
The webui automation path already rejects one-time schedules that are
not in the future, but the agent cron tool silently accepted them: a
past ISO datetime produced an enabled job with next_run_at_ms=None
that never fires and never honors delete_after_run, while the tool
reported success. Reject the request at the tool boundary with an
actionable error instead.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-17 20:57:51 +08:00
chengyongru 60b7c8cf3c fix(cron): recheck pending jobs before execution 2026-09-14 17:48:10 +08:00
Kuang-xianxin 02ca8f6558 fix(cron): defer timer rearming while jobs execute 2026-09-14 17:48:10 +08:00
beeminesandbeemines 93b51121d1 fix(cron): preserve pending runs when editing automation details (#5751)
Co-authored-by: beemines <182060364+beemines@users.noreply.github.com>
2026-09-14 15:30:10 +08:00
Xubin Ren 1ac1b35c84 fix(cron): sanitize migrated legacy metadata 2026-08-30 17:24:05 +08:00
Oxygen56 679a07460e fix(cron): sanitize persisted origin metadata 2026-08-30 17:24:05 +08:00
chengyongru dbc1801d3c fix(cron): report reconciled startup job count 2026-08-22 02:38:47 +08:00
aiguozhi123456 20488a585d fix(cron): review follow-ups for system job retirement
- advance the disabled-dream cursor before touching the cron store so
  the #4242 fix still applies when jobs.json is corrupt
- pin the gateway wiring: the disabled-path test now asserts both
  dream and heartbeat are retired, not just unregistered
- cover remove_system_job on a fresh install with no store file
2026-08-22 02:38:47 +08:00
aiguozhi123456 e5718d4de6 fix(cron): retire persisted heartbeat/dream jobs when disabled
Disabling gateway.heartbeat (or agents.defaults.dream) only skipped
job registration on startup; the previously persisted system job in
<workspace>/cron/jobs.json kept firing, and remove_job refuses to
touch protected system jobs. Add CronService.remove_system_job for
startup reconciliation and call it from the gateway disabled branches
so the config toggle takes effect after restart.
2026-08-22 02:38:47 +08:00
Xubin Ren ecef2b055d fix(cron): prevent replay after persistence failure 2026-08-15 23:34:35 +08:00
f10rence 8bdf5ed2b2 fix(cron): keep scheduler alive when job-store persistence fails
A single OSError from _save_store() (disk full, permission change, locked
file) escaped _on_timer's try/finally and killed the asyncio timer task,
because _arm_timer() sits outside the block. All scheduled jobs silently
stopped until restart or a manual re-arm via add_job/update_job/remove_job.

Move _arm_timer() into the finally block and guard the whole tick body
(including _load_store, which can persist during agent-binding migrations)
so a transient persistence failure is logged and retried on the next tick
instead of killing the scheduler.

Add test_save_store_failure_does_not_kill_scheduler to cover the failure
path that existing tests (which mock _arm_timer) never exercised.
2026-08-15 23:34:35 +08:00
Xubin Ren 84f98f5e92 test(cron): cover invalid schedule expressions 2026-08-03 16:20:22 +08:00
Xubin Ren e152e7bc0b test(cron): cover stop during manual execution 2026-08-01 20:03:19 +08:00
yu-xin-c e26e09c205 fix(cron): preserve manual run completion state 2026-08-01 20:03:19 +08:00
chengyongru 757ad9c764 refactor: enforce BasedPyright strict type checking (#5158) 2026-07-29 21:37:11 +08:00
santhreal 299bcf491b fix(cron): skip null runHistory elements when loading jobs.json
Null entries in state.runHistory raised TypeError and quarantined the
store. Skip non-dict elements like LocalTrigger.from_dict already does.
2026-07-23 14:07:06 +08:00
santhreal b81c05581f fix(cron): coerce string schedule/state ms fields from jobs.json
jobs.json can store everyMs/atMs and next/last run timestamps as strings.
Loading left them as str, so _compute_next_run compared str to int and raised TypeError.
Coerce with an optional-int helper at from_store_dict, matching runHistory int() paths.
2026-07-21 19:07:45 +08:00
santhreal b6156fdd79 fix(cron): also coerce null createdAtMs/updatedAtMs on load
Same present-null footgun as runHistory; route all required store
ints through _store_int.
2026-07-21 13:45:02 +08:00
santhreal 0b1b02f187 fix(cron): coerce null runHistory ms fields from jobs.json
Explicit JSON null for runAtMs/durationMs bypassed the missing-key
default and raised TypeError on load. Treat null/blank like missing.
2026-07-21 13:45:02 +08:00
santhreal afed32b013 fix(cron): dual-case keys when loading jobs.json
jobs.json hand-edits and asdict-style snake_case for schedule intervals and
runHistory crashed or silently disabled cron. Deserialize via Cron* from_store_dict
and shared get_camel_snake (also used by local triggers).
2026-07-18 17:39:06 +08:00
chengyongru 42d7ad34a4 refactor(agent): unify request context routing 2026-07-10 17:54:34 +08:00
yu-xin-c 64c7ff5fdc test(cron): cover stale instance mutation consistency 2026-07-02 14:36:12 +08:00
chengyongru 661ab00656 feat(trigger): add local trigger run audit records 2026-07-02 13:32:46 +08:00
chengyongru f6d1dba32a fix(cron): tolerate unsupported directory fsync 2026-07-01 19:51:43 +08:00
yorkhellen e5dbb15c34 fix(cron): guard public APIs against unavailable store 2026-06-28 19:46:44 +08:00
chengyongru b24b5f19fc fix(cron): always require bound automation sessions 2026-06-16 14:16:12 +08:00
chengyongru 6239114c46 fix(cron): prevent unbound automation execution 2026-06-16 14:07:08 +08:00
chengyongru a50b3ac0f2 fix: harden cron session automation flows 2026-06-12 18:13:25 +08:00
chengyongru 8335554894 refactor: migrate legacy cron payloads to bound sessions 2026-06-12 16:51:20 +08:00
chengyongru 5ae907bc2f refactor: store cron origin delivery context 2026-06-12 15:07:25 +08:00
chengyongru c4b64a4caf refactor: preserve origin session routing for cron 2026-06-12 14:21:09 +08:00
chengyongru 271b3651d7 refactor: use cron turn naming internally 2026-06-12 11:57:35 +08:00
chengyongru d9d481bc15 refactor: centralize cron session metadata keys 2026-06-12 11:43:23 +08:00