feat: remove zod, centralize config I/O, add self-update#1
Merged
ryanlee666 merged 1 commit intomainfrom Mar 26, 2026
Merged
Conversation
…date - Remove zod dependency (-200KB bundle); replace with 20-line manual validation - Centralize config read/write into readConfigFile/writeConfigFile, eliminating yaml parse/stringify duplication across 5 files - Add src/update/checker.ts: background update check, 24h throttle, fire-and-forget - Add src/update/self-update.ts: SHA256-verified atomic binary replacement - Add `minimax update [stable|latest|VERSION]` command - Startup update notification (prints to stderr after command, respects --quiet) - Rewrite install.sh: SHA256 verification, Rosetta2 detection, musl detection, curl/wget fallback, channel param, defaults to ~/.local/bin (no sudo) - build.ts: proper bun musl targets, Windows target, generates manifest.json with per-platform SHA256 checksums - release.yml: test job gates release job; uploads manifest.json alongside binaries Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
zod: replaced with 20-line manual validation, npm bundle 417KB → 310KB (-26%)readConfigFile/writeConfigFileinloader.ts, eliminates yaml parse+stringify duplication across 5 filesminimax update [stable|latest|VERSION]— fetches GitHub release manifest, verifies SHA256, atomically replaces current binary--quiet)install.sh: SHA256 verification, Rosetta2 detection, musl detection, curl/wget fallback, channel parameter, defaults to~/.local/binbuild.ts: proper bun musl targets (not copies), Windows target restored, generatesdist/manifest.jsonwith per-platform SHA256release.ymlnow runs test job first; release job uploadsmanifest.jsonalongside binariesTest plan
bun run typecheckpassesbun test(62 tests) passesminimax update --dry-runprints correct target without modifying binaryinstall.sh stabledownloads, verifies, and installs correctly🤖 Generated with Claude Code