zot/internal
patriceckhart f47996bc82 agent: add 'zot update' subcommand for in-place self-update
Adds a CLI subcommand that downloads the latest GitHub release for
the current GOOS/GOARCH, verifies its sha256 against checksums.txt,
extracts the archive, and atomically replaces the running binary.

  zot update           install the latest release
  zot update --check   show whether one is available, install nothing
  zot update --help    usage

Dispatch follows the same router shape as runBotCommand /
runExtCommand in cli.go. Asset naming stays in sync with the
archives.name_template in .goreleaser.yaml (zot_<ver>_<os>_<arch>).
Reuses fetchLatestRelease + versionLess from update.go so the
"what's latest" answer is identical to the in-TUI banner.

Refuses to operate on dev builds (version 0.0.0) since the version
comparison is meaningless and we'd happily downgrade a freshly
compiled local build back to whatever ships on GitHub. $GITHUB_TOKEN
is honoured so private-repo releases work.

Unix: atomic os.Rename in place (the kernel keeps the running
binary's inode alive until exit). Windows: rename current aside
to .old, drop the new exe in, leave the .old for next-update
cleanup since the running process has it locked.
2026-05-12 21:27:11 +02:00
..
agent agent: add 'zot update' subcommand for in-place self-update 2026-05-12 21:27:11 +02:00
assets assets: refresh zot logo to cleaner pixel-art Z 2026-04-20 12:01:43 +02:00
auth add deepseek provider (api-key, openai-compatible v4 catalog) 2026-05-10 16:49:31 +02:00
core Persist compaction checkpoints in sessions 2026-05-09 23:02:54 +02:00
extproto feat(ext): interactive extension panels + persistence 2026-04-22 08:53:21 +02:00
provider add deepseek provider (api-key, openai-compatible v4 catalog) 2026-05-10 16:49:31 +02:00
skills perf(prompt): cut system prompt to the bone (410 -> 54 tokens) 2026-04-19 17:39:38 +02:00
tui tui: drop cursor-home from forced-full-repaint clear too 2026-05-11 11:44:22 +02:00