@kikkimo/claude-launcher 2.5.0 → 3.1.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.
@@ -1,187 +0,0 @@
1
- # Design: Update Models & Add Auto Mode
2
-
3
- **Date:** 2026-03-31
4
- **Branch:** `feature/update-models-and-auto-mode`
5
- **Scope:** Update GLM/Kimi/MiniMax model versions, add Claude Auto Mode menu item, add dynamic menu hints
6
-
7
- ---
8
-
9
- ## 1. Model Configuration Updates (`lib/presets/providers.js`)
10
-
11
- ### 1.1 GLM (zhipu + zai)
12
-
13
- **Changes:** Add `glm-5.1`, `glm-5-turbo`; remove `glm-4.5`, `glm-4.6`; add versionAliases for removed models only.
14
-
15
- **Source:** [Z.AI Developer Docs - Using GLM-5.1](https://docs.z.ai/devpack/using5.1), confirmed available on Anthropic-compatible endpoint `https://api.z.ai/api/anthropic`.
16
-
17
- ```js
18
- // Both zhipu and zai get identical model config:
19
- name: 'ZhiPu AI (GLM-5.1/5-Turbo/5/4.7) - 智谱清言', // zhipu
20
- name: 'Z.ai (GLM-5.1/5-Turbo/5/4.7) - ZhiPu Global', // zai
21
- models: ['glm-5.1', 'glm-5-turbo', 'glm-5', 'glm-4.7'],
22
- versionAliases: {
23
- 'glm-4.5': 'glm-5.1', // removed from model list
24
- 'glm-4.6': 'glm-5.1' // removed from model list
25
- }
26
- ```
27
-
28
- Note: `glm-5-turbo`, `glm-5`, `glm-4.7` are distinct models offered concurrently by the provider ([docs](https://docs.z.ai/guides/llm/glm-5-turbo)). They are NOT deprecated and must NOT appear in versionAliases, otherwise auto-upgrade would silently rewrite a user's intentional model choice.
29
-
30
- ### 1.2 Kimi (moonshot)
31
-
32
- **Changes:** Add `kimi-k2.5`; remove `kimi-k2-0711-preview`, `kimi-k2-0905-preview`, `kimi-k2-turbo-preview`; add versionAliases for removed models only.
33
-
34
- **Source:** [Kimi K2.5 Quickstart](https://platform.moonshot.cn/docs/guide/kimi-k2-5-quickstart)
35
-
36
- ```js
37
- name: 'Moonshot AI (Kimi-K2.5/K2-Thinking)',
38
- models: ['kimi-k2.5', 'kimi-k2-thinking', 'kimi-k2-thinking-turbo'],
39
- versionAliases: {
40
- 'kimi-k2-0711-preview': 'kimi-k2.5', // removed from model list
41
- 'kimi-k2-0905-preview': 'kimi-k2.5', // removed from model list
42
- 'kimi-k2-turbo-preview': 'kimi-k2.5' // removed from model list
43
- }
44
- ```
45
-
46
- Note: `kimi-k2-thinking` and `kimi-k2-thinking-turbo` are distinct thinking models ([docs](https://platform.moonshot.ai/docs/guide/use-kimi-k2-thinking-model)), not deprecated. They must NOT appear in versionAliases.
47
-
48
- `kimi_for_coding` provider: no changes.
49
-
50
- ### 1.3 MiniMax (minimax_cn + minimax_global)
51
-
52
- **Changes:** Add `MiniMax-M2.7`, `MiniMax-M2.5`; no versionAliases needed (all models remain selectable).
53
-
54
- **Source:** [MiniMax Anthropic API Docs](https://platform.minimax.io/docs/api-reference/text-anthropic-api)
55
-
56
- ```js
57
- // minimax_cn
58
- name: 'MiniMax CN (国内版)',
59
- models: ['MiniMax-M2.7', 'MiniMax-M2.5', 'MiniMax-M2.1'],
60
- // No versionAliases - M2.1 and M2.5 are distinct tiers, not deprecated
61
-
62
- // minimax_global
63
- name: 'MiniMax Global (国际版)',
64
- models: ['MiniMax-M2.7', 'MiniMax-M2.5', 'MiniMax-M2.1'],
65
- // No versionAliases - same reason
66
- ```
67
-
68
- Note: MiniMax offers M2.1, M2.5, and M2.7 as concurrent tiers with different price/performance profiles ([platform docs](https://platform.minimax.io/)). They are NOT deprecated and must NOT appear in versionAliases.
69
-
70
- ### 1.4 Unchanged Providers
71
-
72
- - `anthropic`: No changes (existing versionAliases handle multi-series upgrades correctly)
73
- - `deepseek`: No changes
74
- - `kimi_for_coding`: No changes
75
- - `custom`: No changes
76
-
77
- ### 1.5 Upgrade Logic
78
-
79
- `getLatestModel()` and `hasModelUpgrade()` in `providers.js` remain unchanged. They continue to use `versionAliases` exclusively. The key invariant is: **versionAliases must only contain models that are truly removed/deprecated, never distinct models that the provider offers concurrently.**
80
-
81
- ---
82
-
83
- ## 2. Auto Mode Menu Item
84
-
85
- ### 2.1 Background
86
-
87
- Claude Code auto mode (released March 24, 2026) uses a classifier-gated approval system. The `--enable-auto-mode` CLI flag **enables auto mode support** in a session, but does NOT start the session directly in auto mode. The user must press **Shift+Tab** to cycle to auto mode after launch. ([Source](https://claude.com/blog/auto-mode))
88
-
89
- Plan support: Currently available on Team plans. Enterprise and API plan support is rolling out.
90
-
91
- ### 2.2 New Menu Structure
92
-
93
- ```
94
- 0: Launch Claude Code
95
- 1: Launch Claude Code (Skip Permissions)
96
- 2: Launch Claude Code (Enable Auto Mode) <-- NEW (note: "Enable", not just "Auto Mode")
97
- 3: Launch Claude Code with 3rd-party API
98
- 4: Launch Claude Code with 3rd-party API (Auto Skip Permissions)
99
- 5: 3rd-party API Management
100
- 6: Language Settings
101
- 7: Version Update Check
102
- 8: Exit
103
- ```
104
-
105
- ### 2.3 Launch Implementation (`lib/launcher.js`)
106
-
107
- New function `launchClaudeAutoMode()`:
108
- - Command: `claude --enable-auto-mode`
109
- - Uses existing `launchClaude()` core with the new command string
110
- - This enables auto mode as a selectable permission mode; user switches to it with Shift+Tab in session
111
-
112
- ### 2.4 Main File Changes (`claude-launcher`)
113
-
114
- - Add new menu option at index 2
115
- - Shift all subsequent menu indices by 1
116
- - Add case handler for index 2 calling `launchClaudeAutoMode()`
117
-
118
- ---
119
-
120
- ## 3. Dynamic Menu Hints
121
-
122
- ### 3.1 Menu Class Changes (`lib/ui/menu.js`)
123
-
124
- **Parameter contract preservation:** Current signatures are `displayMenu(clearScreen, versionInfo)` and `navigate(clearScreen, versionInfo)`. The `hintCallback` parameter is added as the **third** parameter to both methods:
125
-
126
- ```js
127
- displayMenu(clearScreen = true, versionInfo = null, hintCallback = null)
128
- navigate(clearScreen = true, versionInfo = null, hintCallback = null)
129
- ```
130
-
131
- This preserves backward compatibility with all existing call sites that pass `(clearScreen, versionInfo)`.
132
-
133
- **Sync constraint:** `hintCallback` must be a **synchronous** function returning `string | null`. The menu redraws synchronously inside the raw-mode keypress handler (`lib/ui/menu.js` handleKeyPress), which has no `await` space. Hint text must be pre-computed before calling `navigate()`, or the callback must use only `i18n.tSync()` / cached data — never `await i18n.t()`.
134
-
135
- **Rendering:** If `hintCallback` is provided and `hintCallback(this.selectedIndex)` returns a non-null string, the Menu rendering layer prepends the `ℹ` icon with `colors.cyan` and renders the hint text in `colors.gray` below the menu options. If it returns null, no hint line is rendered. **Locale values must be pure text without the `ℹ` prefix** — the icon and color are added by Menu, not by i18n strings.
136
-
137
- ### 3.2 Hint Rules
138
-
139
- | Selected Index | Hint text returned by hintCallback (no icon prefix) |
140
- |---|---|
141
- | 0 (Default Launch) | `null` (no hint) |
142
- | 1 (Skip Permissions) | `null` (no hint) |
143
- | 2 (Enable Auto Mode) | `"Auto Mode: Currently supports Team plan. Enterprise/API rolling out. Use Shift+Tab to switch after launch."` |
144
- | 3 (3rd-party API) | Active API exists: `"Active: ZhiPu AI / glm-5.1"` (formatted from i18n); No API: `"No active API configured. Go to 'API Management' to add one."` |
145
- | 4 (3rd-party + Skip) | Same as index 3 |
146
- | 5-8 | `null` (no hint) |
147
-
148
- ### 3.3 Hint i18n
149
-
150
- All hint strings go through the i18n system. **Placeholders use positional `{0}`, `{1}` format** to match the existing `MessageFormatter.format()` in `lib/i18n/formatter.js`. Locale values must NOT include the `ℹ` icon prefix.
151
-
152
- New keys:
153
- - `hints.auto_mode_info` — e.g. `'Auto Mode: Currently supports Team plan. Enterprise/API rolling out. Use Shift+Tab to switch after launch.'`
154
- - `hints.active_api_info` — e.g. `'Active: {0} / {1}'` (where `{0}` = provider name, `{1}` = model)
155
- - `hints.no_active_api` — e.g. `'No active API configured. Go to "API Management" to add one.'`
156
-
157
- ---
158
-
159
- ## 4. i18n Updates
160
-
161
- All 11 locale files need new entries:
162
-
163
- - `menu.main.launch_auto_mode` - Menu item text for "Launch Claude Code (Enable Auto Mode)"
164
- - `hints.auto_mode_info` - Pure text, no icon prefix
165
- - `hints.active_api_info` - Uses `{0}` for provider name, `{1}` for model name
166
- - `hints.no_active_api` - Pure text, no icon prefix
167
-
168
- ---
169
-
170
- ## 5. Files to Modify
171
-
172
- | File | Changes |
173
- |---|---|
174
- | `lib/presets/providers.js` | Update models, names, versionAliases for GLM/Kimi/MiniMax (deprecations only) |
175
- | `lib/ui/menu.js` | Add `hintCallback` as **3rd parameter** to `displayMenu()` and `navigate()` |
176
- | `lib/launcher.js` | Add `launchClaudeAutoMode()` function |
177
- | `claude-launcher` (main) | New menu item, hint callback, case handler, index shifts |
178
- | `lib/i18n/locales/*.js` (x11) | New i18n keys for Auto Mode menu and hints |
179
-
180
- ---
181
-
182
- ## 6. Out of Scope
183
-
184
- - No changes to `getLatestModel()` / `hasModelUpgrade()` logic
185
- - No new `latestModel` field
186
- - No changes to DeepSeek, Anthropic, kimi_for_coding, or custom providers
187
- - No changes to the model upgrade checker or auto-upgrade flow