@kernelonpanic/kitcode 1.3.3 → 1.4.1

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.
package/README.md CHANGED
@@ -24,14 +24,14 @@ OpenAI-compatible providers, including OpenRouter and local model servers.
24
24
  - persistent and resumable sessions with native terminal scrollback;
25
25
  - searchable session management with rename, delete, and Markdown export;
26
26
  - input history with the `↑` and `↓` keys;
27
- - queued messages while the agent is working;
27
+ - queued messages while the agent is working, with status and settings commands running immediately;
28
28
  - image and UTF-8 text attachments;
29
- - manual and automatic context compaction;
29
+ - manual and automatic context compaction with a selectable context window;
30
30
  - token, estimated cost, exact context-window, and provider rate-limit indicators;
31
31
  - automatic file checkpoints with `/undo`;
32
32
  - detected project checks after file edits;
33
33
  - model and provider switching from the TUI;
34
- - live MCP add, enable, disable, and delete operations, plus skills and subagents;
34
+ - live MCP add, enable, disable, and delete operations, plus skills and subagents running concurrently;
35
35
  - a local `/checker` report for the runtime, provider, session, context, and MCP setup;
36
36
  - English and Russian interfaces with configurable accents.
37
37
 
@@ -111,6 +111,8 @@ Press `/` to open the command list.
111
111
  | `/key [provider]` | Change API key for a provider. |
112
112
  | `/refresh [provider]` | Reload a provider's model list, bypassing the 24h cache. |
113
113
  | `/effort [auto|low|medium|high|xhigh|max]` · `/thinking` | Select reasoning effort and configure reasoning output. |
114
+ | `/bell [on|off]` | Toggle the beep when a long answer finishes or a permission prompt appears. |
115
+ | `/context [tokens]` | Show or set the model context window used by the meter and automatic compaction. |
114
116
  | `/memory show` · `/memory set <text>` · `/memory clear` | View, replace, or clear this project's persistent notes. |
115
117
  | `/resume` · `/clear` | Resume a session or start a new one. |
116
118
  | `/sessions` | Search sessions, then resume, rename, delete, or export one. |
@@ -151,7 +153,11 @@ Press `/` to open the command list.
151
153
  | `Ctrl+V` / `Cmd+V` | Attach an image from the system clipboard; `/attach clipboard` is the explicit fallback. |
152
154
  | `Esc` | Cancel the current request or close an overlay. |
153
155
 
154
- Messages entered while the agent is running are queued and processed in order.
156
+ Messages entered while the agent is running are queued and processed in order; they are listed above the input, and ↑/↓ on an empty input pick one to edit. Status and settings
157
+ commands — `/help`, `/usage`, `/context`, `/model`, `/effort`, `/thinking`, `/bell`, `/budget`, `/theme`,
158
+ `/lang`, `/subagents`, `/config`, `/checker`, `/exit` — run immediately instead. Commands that
159
+ change the running turn or the session (`/clear`, `/compact`, `/resume`, `/undo`, `/login`,
160
+ `/provider`, `/logout`, `/key`, `/refresh`, `/mcp`, `/sessions`) wait for the turn to finish.
155
161
 
156
162
  ## Modes
157
163
 
@@ -166,7 +172,26 @@ Completed output is committed to
166
172
  normal terminal scrollback, so it remains smooth to scroll while a response is streaming.
167
173
 
168
174
  When exact usage reaches 80% of a known context window, KitCode automatically summarizes older
169
- turns while keeping the latest two user turns. `/compact` runs the same operation manually.
175
+ turns while keeping the latest two user turns. `/compact` runs the same operation manually, and
176
+ `/context` sets the window when the provider does not report one.
177
+
178
+ ## Context window
179
+
180
+ `/context` shows the window currently in use and opens a picker with the common sizes — `256k`,
181
+ `512k`, `1M` — plus `auto`. The argument form accepts the same values and any explicit token count:
182
+
183
+ ```text
184
+ /context 256k
185
+ /context 1m
186
+ /context 400000
187
+ /context auto
188
+ ```
189
+
190
+ The value is stored in the config as `contextWindow` and survives restarts. A manual value outranks
191
+ whatever the provider catalogue reports, so a gateway that understates its window does not distort
192
+ the meter. It feeds both the status-bar capsule and the 80% threshold for automatic compaction.
193
+ `auto` returns to the provider's number; when the provider reports none, the meter shows `ctx ?` and
194
+ automatic compaction stays off, because it needs a known window to decide anything.
170
195
 
171
196
  Before the built-in `write` and `edit` tools change a file, KitCode creates a private checkpoint.
172
197
  `/undo` restores the latest checkpoint and leaves files with newer manual changes untouched.
@@ -211,6 +236,19 @@ in the conversation. Secret-pattern redaction is best effort; do not put credent
211
236
  Context compaction separately asks the model to preserve requirements, evidence, verification
212
237
  commands and outcomes, assumptions, and remaining work. Generated summaries can still omit details.
213
238
 
239
+ ## Subagents
240
+
241
+ The `task` tool hands one self-contained sub-task to a subagent that works in its own fresh context
242
+ and reports back a single summary. Subagents share the filesystem and working directory but have no
243
+ memory of the conversation and cannot ask questions, so the prompt has to stand alone.
244
+
245
+ Consecutive `task` calls in one model response run concurrently, and there is no fixed cap on how
246
+ many: five or ten start together. Each subagent gets its own execution lane, so their tool calls and
247
+ model requests overlap instead of queueing. Two things stay deliberately serialized: approval prompts,
248
+ because the interface shows one at a time, and the per-message budget, which the whole turn shares.
249
+ The live box lists up to three running subagents and collapses the rest into a count; `/subagents`
250
+ prints every active task with its latest progress.
251
+
214
252
  ## Configuration
215
253
 
216
254
  KitCode uses these main paths:
@@ -242,9 +280,10 @@ Minimal manual provider configuration:
242
280
  }
243
281
  ```
244
282
 
245
- The main settings are `model`, `effort`, `thinking`, `maxTokens`, `budget`, and `diagnostics`,
246
- `theme`, `permissions`, `providers`, and `mcp`. `budget` controls local per-message safety limits for model
247
- requests, tokens, estimated cost (when model pricing is available), and subagents. These values are
283
+ The main settings are `model`, `effort`, `thinking`, `contextWindow`, `maxTokens`, `budget`,
284
+ `diagnostics`, `theme`, `permissions`, `providers`, and `mcp`. `budget` controls local per-message
285
+ safety limits for model requests, tokens, estimated cost (when model pricing is available), and
286
+ subagents. These values are
248
287
  not the provider's account balance or rate limits. `diagnostics.autoRun`
249
288
  enables checks after file edits; `diagnostics.commands` can replace automatic detection with up to
250
289
  eight explicit commands. KitCode checks npm for a newer version on every app start and prints the
package/README.ru.md CHANGED
@@ -24,14 +24,15 @@ OpenAI-совместимые провайдеры, включая OpenRouter и
24
24
  - продолжение и восстановление прошлых сессий с обычным scrollback терминала;
25
25
  - поиск по сессиям, переименование, удаление и экспорт в Markdown;
26
26
  - история введённых сообщений по клавишам `↑` и `↓`;
27
- - очередь сообщений, пока агент занят;
27
+ - очередь сообщений, пока агент занят, а статусные команды и настройки выполняются сразу;
28
28
  - вложения PNG, JPEG, GIF, WebP и текстовых UTF-8 файлов;
29
- - ручное и автоматическое сжатие старого контекста;
29
+ - ручное и автоматическое сжатие старого контекста с выбором размера окна;
30
30
  - индикатор токенов, стоимости, точного заполнения контекста и rate limits провайдера;
31
31
  - автоматические чекпоинты файлов и команда `/undo`;
32
32
  - автоматическое определение проверок проекта после правок;
33
33
  - переключение моделей и провайдеров из TUI;
34
- - добавление, включение, выключение и удаление MCP без перезапуска, skills и субагенты;
34
+ - добавление, включение, выключение и удаление MCP без перезапуска, skills и субагенты,
35
+ работающие параллельно;
35
36
  - команда `/checker` для проверки runtime, провайдера, сессии, контекста и MCP;
36
37
  - русский и английский интерфейс, настраиваемый цвет темы.
37
38
 
@@ -111,6 +112,8 @@ http://localhost:11434/v1
111
112
  | `/key [provider]` | Сменить ключ провайдера. |
112
113
  | `/refresh [provider]` | Перечитать список моделей провайдера в обход суточного кеша. |
113
114
  | `/effort [auto|low|medium|high|xhigh|max]` · `/thinking` | Выбрать effort и настроить reasoning. |
115
+ | `/bell [on|off]` | Включить/выключить сигнал о готовом долгом ответе и запросе разрешения. |
116
+ | `/context [tokens\|auto]` | Показать или задать окно контекста модели для индикатора и автосжатия. |
114
117
  | `/memory show` · `/memory set <текст>` · `/memory clear` | Просмотреть, заменить или очистить постоянные заметки проекта. |
115
118
  | `/resume` · `/clear` | Восстановить сессию или начать новую. |
116
119
  | `/sessions` | Найти сессию и открыть, переименовать, удалить или экспортировать её. |
@@ -150,7 +153,11 @@ http://localhost:11434/v1
150
153
  | `Ctrl+V` / `Cmd+V` | Прикрепить картинку из системного буфера; явный запасной вариант — `/attach clipboard`. |
151
154
  | `Esc` | Остановить текущий запрос или закрыть окно. |
152
155
 
153
- Сообщения можно вводить, пока агент работает: они попадут в очередь и выполнятся по порядку.
156
+ Сообщения можно вводить, пока агент работает: они попадут в очередь и выполнятся по порядку. Очередь видна над полем ввода, а ↑/↓ в пустом поле выбирают сообщение для правки.
157
+ Статусные команды и настройки — `/help`, `/usage`, `/context`, `/model`, `/effort`, `/thinking`,
158
+ `/bell`, `/budget`, `/theme`, `/lang`, `/subagents`, `/config`, `/checker`, `/exit` — выполняются сразу.
159
+ Команды, которые меняют текущий ход или сессию (`/clear`, `/compact`, `/resume`, `/undo`, `/login`,
160
+ `/provider`, `/logout`, `/key`, `/refresh`, `/mcp`, `/sessions`), ждут завершения хода.
154
161
 
155
162
  ## Режимы
156
163
 
@@ -165,7 +172,39 @@ http://localhost:11434/v1
165
172
  scrollback терминала, поэтому историю можно плавно листать даже во время потокового ответа.
166
173
 
167
174
  При достижении 80% известного окна KitCode автоматически сворачивает старые сообщения в сводку,
168
- оставляя последние два пользовательских хода. Команда `/compact` запускает это вручную.
175
+ оставляя последние два пользовательских хода. Команда `/compact` запускает это вручную, а
176
+ `/context` задаёт окно, если провайдер его не сообщает.
177
+
178
+ ## Окно контекста
179
+
180
+ `/context` показывает текущее окно и открывает выбор из типичных размеров — `256k`, `512k`, `1M` —
181
+ плюс `auto`. Аргумент принимает те же значения и любое явное число токенов:
182
+
183
+ ```text
184
+ /context 256k
185
+ /context 1m
186
+ /context 400000
187
+ /context auto
188
+ ```
189
+
190
+ Значение хранится в конфиге как `contextWindow` и переживает перезапуски. Ручное значение важнее
191
+ того, что сообщает каталог провайдера, поэтому шлюз, занижающий окно, не искажает индикатор.
192
+ Оно питает и капсулу в статус-баре, и порог 80% для автосжатия. `auto` возвращает число провайдера;
193
+ если провайдер ничего не сообщает, индикатор показывает `ctx ?`, а автосжатие остаётся выключенным,
194
+ потому что без известного окна решать нечего.
195
+
196
+ ## Субагенты
197
+
198
+ Инструмент `task` передаёт одну самодостаточную подзадачу субагенту, который работает в своём
199
+ свежем контексте и возвращает один итог. Субагенты делят файловую систему и рабочую папку, но не
200
+ помнят переписку и не могут задавать вопросы, поэтому промт должен быть самостоятельным.
201
+
202
+ Подряд идущие вызовы `task` в одном ответе модели выполняются параллельно, и фиксированного
203
+ лимита нет: пять или десять стартуют одновременно. У каждого субагента свой execution lane, поэтому
204
+ их инструментальные вызовы и запросы к модели перекрываются, а не выстраиваются в очередь. Две вещи
205
+ остаются заведомо последовательными: подтверждения, потому что интерфейс показывает их по одному,
206
+ и бюджет на сообщение, общий для всего хода. Живой блок показывает до трёх работающих субагентов,
207
+ остальные сворачиваются в счётчик; `/subagents` печатает каждую активную задачу с её прогрессом.
169
208
 
170
209
  Перед изменением файла встроенными инструментами `write` и `edit` KitCode создаёт приватный
171
210
  чекпоинт. Команда `/undo` восстанавливает последний чекпоинт и не перезаписывает более свежие
@@ -241,9 +280,9 @@ OpenAI-совместимых моделей параметр не отправ
241
280
  }
242
281
  ```
243
282
 
244
- Основные параметры: `model`, `effort`, `thinking`, `maxTokens`, `budget` и `diagnostics`,
245
- `theme`, `permissions`, `providers` и `mcp`. Секция `budget` задаёт лимиты запросов к модели, токенов,
246
- примерной стоимости (если провайдер сообщает цены) и субагентов на одно сообщение.
283
+ Основные параметры: `model`, `effort`, `thinking`, `contextWindow`, `maxTokens`, `budget` и
284
+ `diagnostics`, `theme`, `permissions`, `providers` и `mcp`. Секция `budget` задаёт лимиты запросов к
285
+ модели, токенов, примерной стоимости (если провайдер сообщает цены) и субагентов на одно сообщение.
247
286
  `diagnostics.autoRun` включает проверки после правок, а `diagnostics.commands` позволяет заменить
248
287
  автоопределение списком до восьми команд. При каждом входе KitCode проверяет новую версию в npm и,
249
288
  если она вышла, показывает команду обновления. `/update` повторяет проверку вручную.