claude-multi 0.6.1 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CHANGELOG.md +107 -0
  2. package/dist/cli.js +4833 -3677
  3. package/package.json +12 -9
package/CHANGELOG.md CHANGED
@@ -5,6 +5,111 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.7.0] - 2026-05-30
9
+
10
+ ### Changed
11
+ - **Removed pinned Claude Code binary**: claude-multi no longer installs its own copy of `@anthropic-ai/claude-code` into `~/.claude-multi/bin/`. All instance wrappers now resolve to the user's globally installed `claude` binary via `which claude`/`where claude`. This means instances auto-update together with the global `claude` binary.
12
+ - `getClaudePath()` in `wrapper.ts` simplified to two priorities: `CLAUDE_MULTI_CLAUDE_PATH` env override, then global PATH. The pinned binary check was removed.
13
+ - `doctor fix` no longer installs a pinned Claude binary. It verifies `claude` is available in PATH and regenerates stale wrappers.
14
+ - Health check for wrapper binary paths now compares against the resolved global `claude` path instead of `PINNED_CLAUDE_BIN`. Also gained a Windows `.cmd` regex pattern.
15
+ - `fixWrapperVersions()` in `health.ts` rewritten to use `tryGetClaudePath()` instead of `PINNED_CLAUDE_BIN`.
16
+ - Instance migration (v0.6.2) updated to use `tryGetClaudePath()` instead of the deleted `tryGetGlobalClaudePath()`. Added `console.warn` when claude binary is not found during wrapper regeneration.
17
+ - `TUNABLE_ENV_VARS` local duplicate removed from `migration.ts` v0.6.3. Now imports the canonical set from `constants/env.ts` (was missing `CLAUDE_CODE_AUTO_COMPACT_WINDOW` and `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE`).
18
+ - PATH membership check in the `add` command uses `path.dirname()` and `path.delimiter` instead of Unix-specific `lastIndexOf('/')` and `split(':')`.
19
+ - `where claude` output split fixed to handle Windows `\r\n` line endings.
20
+ - Version warning banner and `isThirdPartyApiBroken` check removed from the TUI (the affected versions are ancient).
21
+
22
+ ### Removed
23
+ - `PINNED_BIN_DIR` and `PINNED_CLAUDE_BIN` constants from `paths.ts`.
24
+ - `COMPATIBLE_CLAUDE_VERSION`, `isThirdPartyApiBroken()`, `getPinnedBinaryVersion()`, `installPinnedClaude()` from `version.ts`.
25
+ - `getGlobalClaudePath()` and `tryGetGlobalClaudePath()` from `wrapper.ts` (became identical to `getClaudePath()` and `tryGetClaudePath()` after pinning removal).
26
+ - `ccVersion` state, `installFailed` doctor result, and version warning banner from `App.tsx`.
27
+
28
+ ### Fixed
29
+ - v0.6.3 migration `TUNABLE_ENV_VARS` local duplicate was missing two entries (`CLAUDE_CODE_AUTO_COMPACT_WINDOW`, `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE`), causing auto-compaction settings to be overwritten with template defaults during migration.
30
+ - Health check and `doctor fix` were fighting the v0.6.2 migration: migration set wrappers to global path, doctor overwrote them back to pinned binary. Both now use the same global path resolution.
31
+ - `where claude` output on Windows was split on `\n` only, missing `\r\n` carriage returns.
32
+ - `add` command PATH check was Unix-only (`lastIndexOf('/')` and `split(':')`).
33
+ - Health check had no regex for Windows `.cmd` wrapper format.
34
+
35
+ ### Blog
36
+ - Blog post: [v0.7.0: No More Pinned Claude Binary](https://claude-multi.hmziq.xyz/blog/v070-no-more-pinned-claude/)
37
+
38
+ ## [0.6.5] - 2026-05-30
39
+
40
+ ### Added
41
+ - **Instance details actions**: The instance details screen now has action buttons. Press Enter on any instance to access: Update settings template, Update alias wrapper, and Override alias to standard. Each action shows a live mismatch indicator (✓ up to date, ⚠ mismatch detected, ✗ wrapper missing).
42
+ - `syncProviderTemplateForInstance()` in `config.ts` — on-demand provider template sync for a single instance. Re-applies the latest template env vars while preserving API keys and user-customized tunable vars.
43
+ - `detectTemplateMismatch()` and `detectWrapperMismatch()` in `instance-diagnostics.ts` — compare an instance's current settings/wrapper against the expected provider template.
44
+ - `TUNABLE_ENV_VARS` shared constant in `constants/env.ts` — single source of truth for env vars that are preserved during template sync and excluded from staleness checks.
45
+
46
+ ### Changed
47
+ - **Health screen rewrite**: Replaced static `IssueCard` list with a Select-based issue picker. Issues can now be selected, viewed in detail, and dismissed. Press Enter to view an issue, `d` to dismiss, `D` to dismiss all.
48
+ - **Post-migration stale state fixed**: After running `doctor fix`, the health check warning no longer persists. The config is now reloaded before health checks re-run.
49
+ - **Migration lock staleness**: Added a 30-minute staleness check to the migration lock file. Prevents stale locks from blocking migrations after crashes or PID reuse.
50
+ - **Atomic health status writes**: `saveHealthStatus()` now uses write-to-temp + rename to prevent file corruption on crash or concurrent access.
51
+ - **Doctor fix guard**: `handleDoctorFix` is now guarded against double-invocation from rapid keypresses.
52
+ - Removed pre-existing TypeScript type errors in `migration.ts` v0.6.3 migration body (narrow `Record` type inference on `newEnv`).
53
+
54
+ ### Blog
55
+ - Blog post: [v0.6.5: Action Buttons, Health Screen Fix, Hardened Migrations](https://claude-multi.hmziq.xyz/blog/v065-instance-actions-health-fix/)
56
+
57
+ ## [0.6.4] - 2026-05-29
58
+
59
+ ### Added
60
+ - Instance migration (0.6.3) syncs provider template env vars to existing instances. Detects the provider from `ANTHROPIC_BASE_URL` in `settings.json` and re-applies the latest template (model names, thinking tokens, output limits). Preserves API keys and user-added env vars.
61
+ - `detectProvider()` and `getProviderByBaseUrl()` in `templates.ts` match a base URL to a provider template name.
62
+ - `providerTemplate` field on the `Instance` type. New instances store it; migration backfills it for existing instances.
63
+
64
+ ### Blog
65
+ - Blog post: [v0.6.4: Existing Instances Now Auto-Sync Provider Template Updates](https://claude-multi.hmziq.xyz/blog/v064-provider-template-sync/)
66
+
67
+ ## [0.6.3] - 2026-05-29
68
+
69
+ ### Changed
70
+ - Instance migrations regenerate wrappers pointing to the globally installed `claude` binary (via `which claude`), not the pinned binary at `~/.claude-multi/bin`. Wrappers that already match the expected content are left untouched.
71
+ - `runMigration` and `createBackup` are synchronous now (had no `await` expressions).
72
+ - MiMo (pay-per-token and Token Plan) models bumped to `mimo-v2.5-pro[1m]` and `mimo-v2.5[1m]` (1M context window variants).
73
+ - Kimi opus model changed from `kimi-k2.6` to `kimi-k2.5`.
74
+ - Provider templates now include explicit thinking and output token limits:
75
+ - MiniMax: 32K thinking, 64K output
76
+ - DeepSeek: 32K thinking, 128K output
77
+ - MiMo (both plans): 128K output
78
+ - Kimi: 16K thinking, 64K output
79
+ - Qwen and Qwen Coding Plan: 16K thinking, 64K output
80
+
81
+ ### Added
82
+ - `getGlobalClaudePath()` and `tryGetGlobalClaudePath()` in `wrapper.ts` resolve the claude binary from the env override or PATH, skipping the pinned binary.
83
+ - Instance migration tests: fast-path skip on current-version instances, mixed instances (some current, some old), `.claude.json` updates when the wrapper file is missing, and a verification that regenerated wrappers contain the global claude path.
84
+
85
+ ### Fixed
86
+ - Health test compared `fixWrapperVersions` output against `generateWrapperScript()` (resolves via env override) instead of `buildWrapperScript(inst, PINNED_CLAUDE_BIN)` (what the function actually uses). Would break if `CLAUDE_MULTI_CLAUDE_PATH` was set.
87
+
88
+ ### Blog
89
+ - Blog post: [v0.6.3: Drop the Pinned Binary, Update Every Provider Template](https://claude-multi.hmziq.xyz/blog/v063-migration-and-provider-updates/)
90
+
91
+ ### Added
92
+ - Instances track the claude-multi version they were created with (`createdWithVersion`). New instances get the current version. Instances created before this field existed get `0.5` and show "before version tracking" in the UI.
93
+ - `doctor` and the TUI health screen report when instance migrations are pending or when an instance is running an older version.
94
+ - `doctor fix` shows which instances need migration and asks for confirmation before running.
95
+ - Version column added to `list`, `info`, and the Ink TUI instance cards and detail screens.
96
+
97
+ ### Changed
98
+ - `instanceMigrationVersion` in config now stores the actual package version rather than a separate numbering scheme.
99
+ - The legacy sentinel (`"0.5"`) is defined once as `LEGACY_INSTANCE_VERSION` and imported everywhere, instead of being hardcoded in multiple files.
100
+ - Wrapper script template exists in a single place (`buildWrapperScript` in `wrapper.ts`). Migration and health check both delegate to it instead of duplicating the template string.
101
+ - Instance migration only rewrites wrappers when the file content actually differs (version check + content diff), instead of unconditionally regenerating every wrapper.
102
+ - `fixWrapperVersions` uses the canonical template targeting the pinned binary explicitly, with a content-diff check to avoid unnecessary writes.
103
+
104
+ ### Fixed
105
+ - Removed broken `compareVersions` references from `version.test.ts`.
106
+ - `resolveClaudePath()` in `migration.ts` used `await` in a non-async function (TypeScript error). Removed — replaced by `generateWrapperScriptSafe` from `wrapper.ts`.
107
+ - Unused imports (`COMPATIBLE_CLAUDE_VERSION`, `installPinnedClaude`, `getPinnedBinaryVersion`, `isThirdPartyApiBroken`, `PINNED_CLAUDE_BIN`) removed from `migration.ts`.
108
+ - `config.ts` `loadConfig` backfill loop now handles `noUncheckedIndexedAccess` correctly (pre-existing TypeScript error).
109
+ - `createBackup` changed from async to sync (had no `await` expressions — pre-existing lint warning).
110
+ - Array `.sort()` / `.reverse()` calls in `migration.ts` and `config.ts` changed to `.toSorted()` / `.toReversed()` (pre-existing lint warnings).
111
+ - Duplicate `existsSync` import in `test/wrapper.test.ts` merged into single import.
112
+
8
113
  ## [0.6.1] - 2026-05-29
9
114
 
10
115
  ### Changed
@@ -326,6 +431,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
326
431
  - Support for custom config and binary paths
327
432
  - Command-line interface built with Commander.js
328
433
 
434
+ [0.6.4]: https://github.com/hmziqrs/claude-multi/compare/v0.6.3...v0.6.4
435
+ [0.6.3]: https://github.com/hmziqrs/claude-multi/compare/v0.6.2...v0.6.3
329
436
  [0.5.5]: https://github.com/hmziqrs/claude-multi/compare/v0.5.1...v0.5.5
330
437
  [0.5.1]: https://github.com/hmziqrs/claude-multi/compare/v0.5.0...v0.5.1
331
438
  [0.5.0]: https://github.com/hmziqrs/claude-multi/compare/v0.4.4...v0.5.0