-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Add automatic periodic update checking as a built-in scheduler task. Zeph queries GitHub Releases API for the latest version and notifies the user when a newer version is available.
Motivation
Users running long-lived Zeph instances (daemon mode, TUI) have no way to know a new release is available without manually checking. An opt-out periodic check solves this with minimal overhead.
Design
New TaskKind variant
Add TaskKind::UpdateCheck to zeph-scheduler alongside existing MemoryCleanup, SkillRefresh, HealthCheck.
Config
New section in config.toml under [agent] or as a dedicated table:
[agent]
auto_update_check = true # default: true, set false to disable
[scheduler.tasks.update_check]
enabled = true
cron = "0 0 */6 * * *" # every 6 hours, configurableEnvironment override: ZEPH_AUTO_UPDATE_CHECK=false.
Implementation
-
Version check logic (in
zeph-core):GET https://api.github.com/repos/bug-ops/zeph/releases/latestviareqwest- Parse
tag_namefield, stripvprefix, compare withenv!("CARGO_PKG_VERSION")usingsemvercrate - Return
Option<NewRelease { current, latest, url }>if newer version found
-
UpdateCheckHandlerimplementingTaskHandlertrait:- Calls version check logic
- On new version: logs
info!message + sends notification to active channel (if available) - On same/older version or network error: logs
debug!, does not notify user - Respects rate limiting (GitHub API: 60 req/h unauthenticated)
-
Registration in bootstrap:
- When scheduler feature is enabled, register
UpdateCheckHandleras a built-in task - Skip registration if
auto_update_check = false
- When scheduler feature is enabled, register
-
Notification format (channel message):
New Zeph release available: v0.12.0 (current: v0.11.0) https://github.com/bug-ops/zeph/releases/tag/v0.12.0
What this does NOT do
- Does not download or install updates (user responsibility)
- Does not require GitHub auth token (uses public releases API)
- No menu integration yet (deferred to Epic: TUI Command Palette for agent management #572)
Dependencies
semvercrate (workspace dependency, add if not present)- Existing:
reqwest,serde,tracing - Feature:
scheduler(already optional)
Acceptance Criteria
-
TaskKind::UpdateCheckvariant added -
UpdateCheckHandlerimplementsTaskHandler - Config field
auto_update_check(defaulttrue) + env override - Scheduler task registered on bootstrap when enabled
- Notification sent to active channel on new release
- Graceful handling: network errors logged at debug, no user-facing noise
- Unit tests for version comparison logic
-
--initwizard updated with auto-update option
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request