Repository navigation
merge: upstream e798b46 (#471 OSC 7501 program status) - #113
tournierjc wants to merge 54 commits into
Conversation
Co-authored-by: minimax <adhere@minimaxi.com>
Preserve public privacy defaults and distribution boundaries while porting compaction, Bash timeout, memory output and update-proxy improvements. Record selective provenance without advancing the full source baseline. Assisted-by: codex-cli reason:public-source-sync-0.5.5
…-AI#360) * docs: publish feedback and private security contact channels * docs: correct MiniMax Agent X contact link
…-AI#375) Include context window and effort controls in the first-run catalog while preserving existing managed snapshots. Docs-Impact: Existing model selection workflow is unchanged. Assisted-by: codex-cli reason:m31-flash-fallback-sync
* chore: bump version to 0.5.7 * test: drain stderr before nonzero Bash fixture exit
…x-AI#381) Port the reviewed shared runtime behavior while retaining standalone composition. Keep conversation leave separate from explicit stop, suppress canceled task delivery, and track append activations through teardown. Assisted-by: codex-cli reason:selective-runtime-port Docs-Impact: document stop and session-leave behavior in docs/tui-capabilities.md Co-authored-by: chenhao <chenhao@minimaxi.com>
…niMax-AI#385) * feat(examples): add reproducible Pocket Pet demo and refresh onboarding * feat(examples): polish Pocket Pet interaction and demo
…x-AI#389) * fix(tui): preserve native scrollback during projection updates * fix(tui): isolate transient overlays from native scrollback
…I#390) * fix(tui): prevent idle transcript replay and diff overlay frames * fix(tui): retain prompt identity and deferred main-buffer geometry
…budget (MiniMax-AI#397) * test(sandbox): pin the probe PATH instead of inheriting the ambient one The real sandbox-exec probes resolve their command through PATH, so inheriting the caller's let any wrapper ahead of /bin decide what `rm` means. On a machine that has run the agent, that is the recoverable-delete shim MCode installs into agent shells: `rm` resolves to the shim, the shim execs mavis-trash, the sandbox denies that trash move as a write outside the policy under test, and a correct allow-probe exits 1. The suite then reports a sandbox regression where the sandbox behaved correctly. Pin all three probe environments to the system binaries the probes actually use, matching the wrapper-argument test above them. This also drops the unguarded `process.env.PATH` in wrapProfile, which had no fallback and could hand a real sandbox spawn an undefined PATH. Fixes MiniMax-AI#394. * test(byok): scale the serial BYOK budget by platform The first case is 30+ serial CLI spawns, each booting the whole runtime, so its wall-clock cost tracks machine speed rather than the transport it asserts. The flat 90s budget only held with roughly 1.5x headroom on an idle machine, so a parallel build, a laptop under load, or a shared CI runner turned a passing transport into a `testTimeoutFailure` that named a product failure no assertion had actually observed. Budget it the way smoke.test.mjs already budgets runtime startup: a base allowance plus a Windows multiplier for slower process spawn. The test is not slowed down by a larger ceiling; it only stops failing for reasons unrelated to what it checks. Fixes MiniMax-AI#395.
TUI - Report active root-session background tasks as `background=N` in the `[V]` build-mode status line. Bash still owned by its foreground tool call is excluded, and the count holds at 1 after a turn settles until a fresh task list arrives. The documented minimum width is now 102 columns. Runtime - The MiniMax API-key route now shares the official model catalog with the managed route; the first-run catalog moves to `minimax-model-catalog.ts` with unchanged model definitions. - Apply byte limits to large media and accumulated history for BYOK requests. - Send the M3 thinking toggle as a thinking setting rather than a generic reasoning effort. - Allow edit and rewind after an interrupt that left only a background reminder in canonical history. - Read less data when listing session files and navigating long histories. - Measure token output rate from the time events are observed. - Add `worktreeRefreshBeforeCreate` (default on) to fetch the selected upstream before creating a worktree, and exclude nested roots from fork worktree fingerprints. - Add Ghostty to the external editor catalog. - Enable the Codex OAuth model settings entry by default. Prompts - Cron guidance now lives only in tool definitions; the legacy feature template is empty. Memory edits use the `memory` tool's `edit` operation. - Clarify multimodal tool discovery in the mcode-tools reminder.
…seline (MiniMax-AI#396) * Revert "fix(tui): stabilize native history and diff overlay frames (MiniMax-AI#390)" This reverts commit 1e136bf. * Revert "fix(tui): preserve native scrollback during automatic updates (MiniMax-AI#389)" This reverts commit 9b9c07b.
* fix: include hidden thinking in TPS timing * docs: note thinking_start in first token timing comment * test(windows): allow the NTFS source check to exceed the default timeout --------- Co-authored-by: hetaoBackend <hetao7@pku.edu.cn>
* fix: omit empty tools on OpenAI compaction requests * fix: negotiate missing tools with bounded compatibility recovery * fix: simplify empty tools handling to omit absent definitions
…AI#416) Regular mode wrote rows into native scrollback as soon as they scrolled off screen. When such a row later changed (a parallel tool finishing, a streamed table widening, a list turning loose, a turn growing past the projection fold, the welcome status badge flipping, or a stopped prompt gaining its cancelled marker), the renderer cleared scrollback and replayed the whole session from the welcome logo. Only final rows now reach native history: - The transcript reports how many leading rows later updates cannot change, including the committed blocks of a streaming Markdown reply. - The chat layout keeps rows that may still change within one screen above the footer, showing their latest rows under a one-line notice when they do not fit. - The regular-mode projection only appends; established turns are not re-folded or dropped. - The welcome banner above a conversation is static; account notices that need action appear above the Composer. - Stopping a run no longer marks its delivered prompt as cancelled; the marker stays reserved for prompts returned to the Composer. To keep long sessions responsive, the transcript drops final rows far above the screen and the engine rebases its retained state (takeDiscardedRows) instead of rewriting history.
Port the reviewed 0.6.0 runtime and TUI behavior into the standalone distribution and bump the release version to 0.6.0. - Allow /retry inside a /btw side conversation to resend its last message. - Default to MiniMax-M3.1-Flash-Preview when no model has been selected. - After an accepted Goal completion, keep the Turn open for one final reply that summarizes the result and deliverables; blocked proposals still end the Turn. - Do not retry provider safety refusals, including on BYOK, and classify them as content_filter; keep Anthropic refusal details in the error. - Retry TLS record verification failures before output like other transient network errors. - Keep a post-compaction reminder at the tail of a continuation instead of aborting the provider call and recompacting on every retry.
Allow /doctor and /feedback in a /btw side conversation so a failed side response can be diagnosed or reported without leaving it. Neither command mutates the parent or side Session. /quit stays blocked in the side view, because leaving from there aborts only the side Turn and skips side Session cleanup. Bump the root and TUI source versions to 0.6.1.
…x-AI#423) In a /btw side conversation, an empty Escape no longer arms the double-Escape /edit shortcut or shows its "Press Esc again to edit" hint, since /edit is unavailable in side conversations. Escape still interrupts a live side response. Switching between the side and main views re-adopted the main Session's live Turn at the switch time, which reset the Running/Loading timer and shortened the settled Turn duration. A Turn start ledger now records the earliest observed start (submission, session.start events including hidden Sessions, and adoption), and both re-adoption and the activity line use it. Bump the root and TUI source versions to 0.6.2.
…y with 6 updates (MiniMax-AI#363) Bumps the tooling-minor-patch group with 6 updates in the / directory: | Package | From | To | | --- | --- | --- | | [prettier](https://github.com/prettier/prettier) | `3.9.6` | `3.9.9` | | [tsx](https://github.com/privatenumber/tsx) | `4.23.13` | `4.23.15` | | [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) | `5.5.5` | `5.5.6` | | [dependency-cruiser](https://github.com/sverweij/dependency-cruiser) | `18.3.1` | `18.4.0` | | [jscpd](https://github.com/kucherenko/jscpd/tree/HEAD/rust/jscpd) | `5.2.1` | `5.3.3` | | [knip](https://github.com/webpro-nl/knip/tree/HEAD/packages/knip) | `6.35.1` | `6.38.0` | Updates `prettier` from 3.9.6 to 3.9.9 - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](prettier/prettier@3.9.6...3.9.9) Updates `tsx` from 4.23.13 to 4.23.15 - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs) - [Commits](privatenumber/tsx@v4.23.13...v4.23.15) Updates `eslint-plugin-prettier` from 5.5.5 to 5.5.6 - [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases) - [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/main/CHANGELOG.md) - [Commits](prettier/eslint-plugin-prettier@v5.5.5...v5.5.6) Updates `dependency-cruiser` from 18.3.1 to 18.4.0 - [Release notes](https://github.com/sverweij/dependency-cruiser/releases) - [Changelog](https://github.com/sverweij/dependency-cruiser/blob/main/CHANGELOG.md) - [Commits](sverweij/dependency-cruiser@v18.3.1...v18.4.0) Updates `jscpd` from 5.2.1 to 5.3.3 - [Release notes](https://github.com/kucherenko/jscpd/releases) - [Commits](https://github.com/kucherenko/jscpd/commits/v5.3.3/rust/jscpd) Updates `knip` from 6.35.1 to 6.38.0 - [Release notes](https://github.com/webpro-nl/knip/releases) - [Commits](https://github.com/webpro-nl/knip/commits/knip@6.38.0/packages/knip) --- updated-dependencies: - dependency-name: dependency-cruiser dependency-version: 18.4.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: tooling-minor-patch - dependency-name: eslint-plugin-prettier dependency-version: 5.5.6 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: tooling-minor-patch - dependency-name: jscpd dependency-version: 5.3.1 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: tooling-minor-patch - dependency-name: knip dependency-version: 6.37.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: tooling-minor-patch - dependency-name: prettier dependency-version: 3.9.8 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: tooling-minor-patch - dependency-name: tsx dependency-version: 4.23.15 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: tooling-minor-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…timeouts (MiniMax-AI#428) * fix: bound hung model requests so the retry path runs (MiniMax-AI#425) A provider that accepts a request but never sends a response held the turn for the transport default (undici headers timeout, ~300 s) before the existing retry path ran. During that window the TUI showed Loading, queued follow-ups, and /retry and /goal clear appeared to do nothing. - agent-core: wrap every physical model request (each withLLMRetry attempt, agent and compaction scopes) in a stream watchdog. No first event within 120 s, or no event for 300 s after the first, aborts the attempt and ends the stream with a retryable "LLM request timed out" error (stopReason "error", not "aborted"), so BYOK and managed providers retry it. Caller aborts pass through unchanged. Bounds are configurable via LLMModelConfig.firstEventTimeoutMs / streamIdleTimeoutMs or MCODE_LLM_FIRST_EVENT_TIMEOUT_MS / MCODE_LLM_STREAM_IDLE_TIMEOUT_MS (0 disables). - tui: /retry during a live run now says "Stop the running turn before using /retry." instead of "There is no failed response to retry"; /goal clear and /goal pause during a live run say the current response keeps running and that Esc interrupts it. - Tests: never-responding fake provider and real HTTP server that accepts but never answers; the attempt fails within the bound, retries and recovers, a fully hung turn fails and the next turn on the same runner completes. Document the bounds in docs/tui-capabilities.md. * fix: keep prior first-response wait and stop reading abandoned streams (MiniMax-AI#425) Review follow-up for the model request timeouts: - Default the first-event bound to 300 s, matching undici's headers timeout that was the effective previous wait, so no request that used to succeed now times out. The idle bound stays at 300 s. - Timeout errors name the setting that fired (MCODE_LLM_FIRST_EVENT_TIMEOUT_MS or MCODE_LLM_STREAM_IDLE_TIMEOUT_MS, or the host's per-model firstEventTimeoutMs/streamIdleTimeoutMs). - When a bound fires, the wrapper stops waiting on the inner stream even if the provider ignores the abort: the pending read races a stop signal, and the inner iterator is released without being awaited. Refs MiniMax-AI#425 --------- Co-authored-by: Tao He <hetaoBackend@users.noreply.github.com>
…#429) * fix(tui): keep scrolled-up readers in place on output-driven redraws (MiniMax-AI#426) The regular-mode history reconstruction (L034) clears scrollback with ED 3 and replays the document. xterm.js keeps its scrolled state while the scrollback is rebuilt, so a reader who had scrolled up was moved to line 0 whenever a resize settled (for example a fit addon reacting to a layout change) or a transient layout shrank while a reply streamed. Output-driven reconstructions now wait for the next user input, when terminals scroll back to the bottom: - TuiBase reports key and paste input through a protected onUserInput() hook; focus, size, mode and kitty-flag reports and key releases do not count. - A settled resize replays history only if input arrived after the resize notification; otherwise it finishes as an in-place viewport redraw and the replay is deferred. - A shrink in an unknown or changed layout pads like L038 unless input arrived within the last second (input-driven closes still restore rows immediately), and the replay is deferred. - The next input after the deferral, or stop(), runs the deferred replay, so native history ends up exact and unique as before. Changed historical text and size changes without a resize notification still reconstruct immediately. Recorded as L047 in LOCAL_CHANGES. * fix(tui): limit scroll preservation to output-driven layout shrink (MiniMax-AI#426) Review follow-up: - Resize again replays history as soon as it settles, as on main. The resize deferral is split out until the reporter's fit/resize behaviour is known; only the output-driven layout-shrink deferral remains (pad with blank rows, reconstruct on the next user input, immediately within one second of input). - User input detection splits each chunk into control sequences instead of matching the whole chunk. Cursor position reports, OSC/DCS/APC strings and SGR mouse reports join focus, window, device and mode reports and key releases as non-input, and a key or paste that shares a chunk with reports still counts. - Tests cover a tailing reader when output ends and the task list collapses, recent input reconstructing immediately, resize keeping its replay, each report kind, report-only and mixed chunks, and the replay before stop. L047 is updated accordingly. Refs MiniMax-AI#426 --------- Co-authored-by: Tao He <hetaoBackend@users.noreply.github.com>
… provider image limit (MiniMax-AI#431) * fix(images): cap images per request and recover sessions over the provider limit Inline images stay in persisted history and every request re-sends the whole provider-visible history, so a long session eventually exceeded the provider's per-request image limit ("Too many images in request: 31 > 30"). Every later request, /retry, /compact and a restarted session then failed the same way, each after the full BYOK retry window, behind a generic "temporarily unavailable / Run /retry" message. - Request-time image ceiling: projectAgentMessagesForModel keeps the newest N images across user messages and tool results and replaces older ones with a short placeholder naming the original file. Stored history is never rewritten. N comes from capabilities.max_images_per_request (default 20; api.mistral.ai defaults to its documented 8). Agent turns, checkpoint requests and footprint estimates share the projection. - Deterministic rejections are terminal: an image-count rejection, or an HTTP 400 invalid_request_error, is no longer retried by the BYOK retry-all path (timeouts, network, 408/429/5xx stay retryable). The TUI shows the upstream reason and suggests /compact or /new instead of /retry. - Compaction fallback: when the checkpoint Provider rejects a candidate for too many images, compaction retries the same history with media replaced by text (Hvideo) and continues down the attachment-free ladder. Refs MiniMax-AI#425 * fix(images): parse attachment reminder paths with a linear scan CodeQL flagged the attribute regular expression as polynomial on user-controlled message text (js/polynomial-redos). Parse the attachment tags with indexOf instead and cover escaped paths and adversarial input. Refs MiniMax-AI#425 --------- Co-authored-by: Tao He <hetaoBackend@users.noreply.github.com>
* feat: add opt-in lightweight context mode Co-authored-by: DanielWalnut <hetaoBackend@users.noreply.github.com> * docs: clarify lightweight context boundary Co-authored-by: DanielWalnut <hetaoBackend@users.noreply.github.com> * fix: harden lightweight session behavior Co-authored-by: DanielWalnut <hetaoBackend@users.noreply.github.com> * fix: type lightweight turn guard and localize indicator Co-authored-by: DanielWalnut <hetaoBackend@users.noreply.github.com> * fix: import lightweight turn callback contract Co-authored-by: DanielWalnut <hetaoBackend@users.noreply.github.com> * fix: stop lightweight turns after unoffered tool calls Co-authored-by: DanielWalnut <hetaoBackend@users.noreply.github.com> * test: snapshot standard footer and forward tool guard Co-authored-by: DanielWalnut <hetaoBackend@users.noreply.github.com> * fix: forward lightweight stop policy to agent loop Co-authored-by: DanielWalnut <hetaoBackend@users.noreply.github.com> * fix: normalize unexpected lightweight tool calls Co-authored-by: DanielWalnut <hetaoBackend@users.noreply.github.com> * test: require clear lightweight tool fallback Co-authored-by: DanielWalnut <hetaoBackend@users.noreply.github.com> * test: cover resumed mode indicator in TUI Co-authored-by: DanielWalnut <hetaoBackend@users.noreply.github.com> * test: hydrate resumed session purpose in TUI Co-authored-by: DanielWalnut <hetaoBackend@users.noreply.github.com> * fix: preserve failed unexpected tool responses Co-authored-by: DanielWalnut <hetaoBackend@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: DanielWalnut <hetaoBackend@users.noreply.github.com>
… settlement (MiniMax-AI#444) Add --system-prompt, --system-prompt-file, --append-system-prompt, and --append-system-prompt-file to the interactive TUI, exec, exec review, and acp. Replace and append are independent slots; each accepts inline text or a file, and the slot written closest to the subcommand wins, so `--system-prompt-file a.md exec --system-prompt "..."` uses the inline text and never reads a.md. Files are read once at startup and a missing, empty, or combined-form source fails the launch instead of running unpatched. Flags placed before a subcommand that does not accept them are rejected rather than silently ignored. The overrides replace or extend the main Agent identity prompt and are held in process memory only: they are never written to the Session or configuration, survive the post-login restart, and do not reach Task child Agents. Runtime rules, project instructions, Environment, Memory, and Skills are still composed as before. Also settle an ask_user turn as awaiting continuation. That turn ends with a durable pending request rather than a final assistant message, so it now settles as awaiting-user-continuation instead of a retryable EMPTY_RESPONSE failure. The tool result and, when a fast reply arrives before the stream drains, the pending request itself are both recognized; the generic event match is narrowed to questionnaire.ask so a later dismiss or supersede is not mistaken for a new request. Bump the root and TUI source versions to 0.6.3.
Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: DanielWalnut <hetaoBackend@users.noreply.github.com>
…I#435) * fix(cron): accept week unit in cron once --after durations `cron once --after 1w` was rejected with CRON_VALIDATION_ERROR even though DURATION_UNIT_MS defines `w`, because both relative-duration parsers only matched `ms|s|m|h|d`. Add `w` to the token regex in the shared agent-tools parser and the local-runtime parser (keeping `ms` ahead of `m`), and replace the local-runtime nested ternary with a unit table that includes weeks. Single (`1w`) and compound (`1w2d`) week durations now resolve correctly; existing units and invalid-input rejection are unchanged and covered by new unit tests in both packages. Fixes MiniMax-AI#433 Co-authored-by: smartworldarafath <153785481+smartworldarafath@users.noreply.github.com> * fix(cron): parse cron once durations with an anchored token pattern CodeQL flagged the `parseDurationMs` token regex (js/polynomial-redos): matching the unanchored global pattern against `after` retries `\d+` from every offset, so a long unit-less digit run takes quadratic time (about 2s for 50k digits). Consume one start-anchored `<number><unit>` token at a time instead, in both the agent-tools and local-runtime parsers. Accepted and rejected inputs are unchanged; add a regression test for the digit-run case. --------- Co-authored-by: Tao He <hetaoBackend@users.noreply.github.com> Co-authored-by: smartworldarafath <153785481+smartworldarafath@users.noreply.github.com>
…niMax-AI#434) * fix(tui): defer rebuild when scrollback rows change without input (MiniMax-AI#426) The regular-mode history reconstruction (L034) clears with ED 3 and replays the document. xterm.js keeps its scrolled state while scrollback is erased, so a reader who had scrolled up is moved to line 0. MiniMax-AI#429 deferred this for an output-driven layout shrink; the reporter's jumps line up with the other reconstruction paths, which still ran immediately without user input: - text already in native history changed or was removed ("firstChanged < viewportTop"), for example the previous run duration note that TurnProjection removes when a queued turn starts; - a shrink the L038 padding cannot absorb (changed history, overlays, images, or no rows left in the previous viewport); - a footer taller than a small screen refreshing rows in scrollback. Without user input in the last second these now repaint the screen in place and mark the deferred replay; the next key, a settled resize replay or stop() runs the L034 reconstruction as before. Changed history repaints from the previous viewport origin so growth in the same frame still enters native history; shrinks paint the document's last rows. Native scrollback keeps stale, removed or duplicated rows above the screen until the next key. PI_DEBUG_REDRAW lines now carry the pid (several sessions can share one log), whether a reconstruction was deferred, and the first changed history row with letters and digits masked. Existing tests that asserted an immediate exact rebuild without input now assert the deferred screen first and exact history after the next key. New xterm cases cover a changed scrollback row, removal of the previous run duration from a real append-only transcript, a shrink larger than a screen, a five-row panel whose footer refreshes, repeated turn endings, and the debug log. L047 is updated. Refs MiniMax-AI#426 * test(tui): model input-driven closes/submits under deferred rebuild (MiniMax-AI#426) The Tasks panel close and the typed /resume are user-driven; deliver the input explicitly so their history rebuild runs before the measured steps. Refs MiniMax-AI#426 * fix(tui): keep settled one-time feedback in transcript history (MiniMax-AI#426) The previous run-duration note, finished ephemeral `!` shell blocks and stale run errors were removed from the middle of the transcript when the next turn started or ended. Their rows are final and can already sit in native terminal scrollback, so the removal shifted every later row and forced a history rebuild that moved a scrolled-up xterm.js reader to the top whenever a turn started without a key press. Dismiss such feedback only while it is still the live tail (nothing but the next prompt, live cells or other feedback after it). Once settled output follows, it stays in place as history. Retained turn-scoped cells re-anchor after their own turn when a history refresh uses different cell ids, so kept notes do not drift or stack up. The edit flow now targets the most recent run duration. Refs MiniMax-AI#426 * fix(tui): drop kept feedback of turns an edit removed (MiniMax-AI#426) Run-duration notes, terminal errors and shell blocks kept in history carry their turn id. When an edit removes later turns, a history refresh could not anchor them to their turn and fell back to position-based placement, leaving an isolated note in an unrelated spot. Drop such feedback when its turn was projected before the refresh and is gone after it (only when turn ids are comparable across the refresh). Rewind reloads the projection from scratch and was not affected. Also guard the deferred in-place repaint: if the document no longer reaches the previous viewport, paint the tail instead of letting fullRender fall back to an immediate ED 3. Refs MiniMax-AI#426 --------- Co-authored-by: Tao He <hetaoBackend@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: DanielWalnut <hetaoBackend@users.noreply.github.com>
…iniMax-AI#445) * fix(tui): keep npm-prefix updates on the Node pinned by the receipt The versioned npm-prefix update flow pins every release launcher to one Node executable so the better-sqlite3 binding stays ABI-consistent, and records that executable in install.json. The launcher runtime, however, was taken from process.execPath: on macOS, execPath resolves Homebrew's stable bin/node symlink into a versioned Cellar keg such as Cellar/node/26.7.0/bin/node. After `brew upgrade` removes the old keg, self-updated launchers exec a path that no longer exists and the CLI fails to start with a bare "not found". Reuse the nodeExecutable recorded in the install receipt when it is still present, so launcher activation and the npm/npm validation child processes stay on the pinned executable instead of re-resolving it through process.execPath. Receipts without a usable nodeExecutable keep the previous process.execPath behavior. Versioned launchers now also print an actionable repair hint and exit 127 when their pinned Node is missing, instead of a bare exec failure. Homebrew same-major upgrades keep the ABI stable, so following the formula-managed symlink is safe; a cross-major upgrade surfaces through the existing SQLite validation and installer repair flow. Assisted-by: pi * fix(tui): heal Cellar-pinned Node receipts to the Homebrew opt path Review follow-up for npm-prefix updates on Homebrew-managed Node. Receipts written by earlier installers record the resolved Cellar keg path, so simply preferring the receipt's nodeExecutable still breaks after `brew upgrade` removes the keg. Canonicalize the recorded path at receipt parse time: when it points into a versioned Cellar/node keg (or a Homebrew-managed bin/node) and the formula's stable opt/<formula>/bin/node resolves to the same executable, use the opt path instead. The opt directory also keeps the update PATH prefix scoped to the Node formula rather than all of <brew>/bin. Unusable entries (missing, relative, non-file, non-executable) fall back to process.execPath as before. Also point the native SQLite startup diagnostic at rerunning the installer for npm-prefix installs instead of an npm-global reinstall command. Assisted-by: pi * fix(tui): match Homebrew opt node receipts explicitly Review follow-up: the formula branch of HOMEBREW_MANAGED_NODE_PATH was missing the opt/ literal, so it matched the nonexistent <brew>/node/bin/node while real opt/<formula>/bin/node receipts never matched. opt receipts are still returned unchanged either way, but the pattern now recognizes them explicitly and the escaped linuxbrew segment stops matching lookalike prefixes. Adds a pass-through test for opt receipts. Assisted-by: pi
…iMax-AI#448) Node clamps setTimeout delays above 2147483647 ms to 1 ms, so accepted durations such as --timeout 600h cancelled a run almost immediately while the forwarded execution deadline pointed weeks into the future. Schedule the coordinator timeout as consecutive bounded chunks that preserve the requested total delay, keeping parser acceptance of any positive safe-integer duration. Co-authored-by: minimax <agent@local>
Fork main squash-merged the previous sync, so a5b56b7 is not an ancestor. Record that tip with the ours strategy so the next merge only brings commits after it. Co-authored-by: kinetick-labs <kinetick-labs@users.noreply.github.com>
…xec timeout chunks) Take the buffered-burst output-rate exclusion and the chunked exec timeout scheduler. Keep kinetick-code / @mavis/code 0.6.9. Leave out the 0.6.4 and 0.6.5 version bumps and the npm-prefix Node receipt change, which only applies to the removed managed update channel. Co-authored-by: kinetick-labs <kinetick-labs@users.noreply.github.com>
pi-ai sets output_config.effort from the selected thinking effort, but patchThinkingPayload replaced the openplatform thinking variant and then deleted output_config for every non-custom provider, so --effort never reached the MiniMax open platform on the API-key path. For minimax_api requests, keep the explicitly selected effort in output_config the same way patchManagedThinkingPayload does on the managed path. 'default', plain on/off models and other providers are unchanged.
…e, session id once) (MiniMax-AI#459) P1-8: two reminders were spending tokens on every request/turn. --timeout execution budget (request-only, appended per LLM request): - Emit only on the first request, when remaining budget first drops to <=50%, <=25%, <=10% of the total, and on every request inside the final two minutes. Total budget is measured from hook creation (turn prep). - Coarse text: whole minutes above 2 min, 10-second steps inside it. - Drop the "since the previous model request" sentence. - Admission rejection does not consume a threshold. Caller's cancellation timer stays authoritative; hook ordering constraint unchanged. Per-turn <agent-context> system reminder (local runtime): - date: Date#toString() without seconds (minute precision). - The slim (turn >= 2) block omits YOUR SESSION ID when the provider-facing history since the latest compaction already contains a user message with this session's ID. First turn and the first turn after a compaction that dropped it still carry the ID. Full first-turn block and cloud scene are unchanged (flag absent => old behaviour).
…paction (MiniMax-AI#460) * fix: stop retrying oversized requests and recover with one forced compaction A request the provider rejects as too large (HTTP 413, request_too_large, the local request-body check, or a context-window overflow such as MiniMax 'context window exceeds limit (2013)') fails identically on every resend. The API-key and custom-provider paths retried it five times. - Classify these rejections as deterministic (isLLMRequestOversized), so withLLMRetry sends them once on every path. - Add contextOverflowRecoveryHook to PiTurnHooks. When the main-agent request is rejected as too large before any output, the runner runs only these hooks once per turn with trigger 'context_overflow_recovery', persists the replacement and resends once; a second rejection is final. - local-runtime-v2 registers the automatic compaction hook there; the trigger forces compaction and targets at most half of the rejected request, since the local estimate had admitted it. * fix: surface the original rejection when overflow recovery throws
…rflow compaction (MiniMax-AI#466) * fix(runtime): drop forced compaction after oversized requests Remove the one-shot compact-and-resend recovery that ran after a provider rejected a main-agent request as too large. The resend bypassed the normal before-LLM pipeline, so request-level transforms (screenshot caps, session identity restoration) were not reapplied to it. Oversized requests (HTTP 413, request_too_large, the local request-body check, context-window overflow) are still classified as deterministic rejections and are not resent unchanged. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(runtime): restore the session ID after compaction drops it The turn reminder omits `YOUR SESSION ID` while earlier history already shows it. When automatic compaction summarizes that history away, the model would lose its own session ID for the rest of the turn. A stateless post-compaction hook now appends a hidden session identity reminder when no visible user message or identity reminder after the latest compaction carries the ID (before the current user message on initial compaction, at the tail mid-turn). The preparation check counts that reminder too, so the next turn does not repeat the ID. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
…rtup (MiniMax-AI#465) * fix(tui): support SOCKS5 proxies and stop ALL_PROXY from crashing startup Fixes MiniMax-AI#393. ALL_PROXY=socks5://... used to abort CLI startup because only http:// and https:// proxy URLs were accepted. - Route socks5://, socks5h://, and socks:// proxies through undici's Socks5ProxyAgent, which sends host names to the proxy for resolution. socks5h:// is rewritten to socks5:// with its credentials preserved. NO_PROXY hosts, including loopback, still connect directly. - Ignore an unusable ALL_PROXY fallback (for example socks4:// or a malformed URL) with a single stderr warning instead of failing startup. Explicit invalid HTTP_PROXY/HTTPS_PROXY values are still rejected. - Mask proxy credentials in warnings. - Suppress only undici's one-time SOCKS5 ExperimentalWarning while the agent is constructed; other warnings are unaffected. - Add unit tests and a loopback SOCKS5 integration test covering no-auth, username/password auth, domain-name CONNECT, and NO_PROXY. * fix(tui): handle IPv6 SOCKS5 proxies and malformed proxy credentials Follow-up to MiniMax-AI#393 review feedback. - Dial SOCKS5 proxies at IPv6 literals such as socks5://[::1]:1080. undici passes the bracketed URL hostname to the socket connect, which failed with ENOTFOUND; a wrapped connector now strips the brackets. - Validate the percent-encoding of proxy user names and passwords while classifying proxy settings. undici decodes them during agent construction and threw URIError, so a malformed ALL_PROXY made every command, including --help, exit with only "URI malformed". Such an ALL_PROXY is now ignored with a redacted warning; an explicit HTTP_PROXY/HTTPS_PROXY fails with an error naming the variable. - Pass decoded SOCKS5 credentials as agent options and remove them from the proxy URL so undici does not decode them again.
…stream-c172cf9 # Conflicts: # packages/local-runtime/src/api/hosted-agent-capabilities.ts # test/vitest-suites.json
Delta
|
Cherry-pick of e798b46. The interactive TUI emits OSC 7501 on the local TTY: idle, working, done, error, or blocked on permission, a question, or login. Reports contain only state, kind, and app=kcode, with no heartbeat and no network egress. tui.programStatus defaults to true. Fork resolution: terminal titles stay the session title or "Kinetick Code". Build-mode still owns the [V] line. A missing login stays status=error on that line and is reported as blocked:kind=auth over OSC 7501. Co-authored-by: kinetick-labs <kinetick-labs@users.noreply.github.com>
Sync upstream
e798b46(tip 2026-10-13) — rollee sur #113Fetched
MiniMax-AI/minimax-codemain. Tipe798b460f4d8603ce732e5d319d63c8018ef6cad— un seul commit aprèscee0791. Cette PR reste surmerge/upstream-c172cf9(pas de PR dupliquée). Headed4ec3d. Identité conservée :kinetick-code/kcode/ Kinetick Code /@mavis/code0.6.9.Commit pris (delta
cee0791..e798b46)e798b46feat(tui): report program status with OSC 7501 (feat(tui): report program status with OSC 7501 MiniMax-AI/minimax-code#471) — le TUI interactif émet OSC 7501 sur le TTY local uniquement : idle, working, done, error, ou blocked (permission, question, login). Rapports limités àstate,kindetapp=kcode, sans heartbeat et sans egress réseau.tui.programStatusvauttruepar défaut. Cherry-pick avec conflits résolus.Résolution fork (MiniMax-AI#471)
Kinetick Codesi la session n'a pas de titre. Le format amontNeeds approval | … | MCoden'est pas repris.app=mcodedevientapp=kcode, aligné sur le nom d'application déjà utilisé par les titres (KCode).[V]reste opt-in viabuild-mode. Le readback d'interaction alimente toujours la projection de statut, donc OSC 7501 voit permission et question sansbuild-mode.status=errorsur la ligne machine,blocked:kind=authsur OSC 7501. Pas de télémétrie, pas de socket sortant.Commits pris précédemment
cee0791fix: update Codex catalog client version to 0.162.0 (fix: update Codex catalog client version to 0.162.0 MiniMax-AI/minimax-code#477) —CODEX_CATALOG_CLIENT_VERSION0.153.0→0.162.0. Version de protocole Codex, produit fork inchangé (0.6.9).c172cf9..ebfdc00:7682398(fix: keep --effort on the MiniMax API-key request MiniMax-AI/minimax-code#461 effort),8e93b19(perf(runtime): trim per-turn reminders (budget thresholds, minute time, session id once) MiniMax-AI/minimax-code#459 reminders),5b4e0a4(fix: stop retrying oversized requests and recover with one forced compaction MiniMax-AI/minimax-code#460 compaction),c460f08(fix(runtime): restore session ID after compaction and drop forced overflow compaction MiniMax-AI/minimax-code#466 session ID),ebfdc00(fix(tui): support SOCKS5 proxies and stop ALL_PROXY from crashing startup MiniMax-AI/minimax-code#465 SOCKS5).fccc7e6:8348311(fix(tui): exclude buffered bursts from the output rate at turn start MiniMax-AI/minimax-code#454) etc172cf9(fix: schedule exec timeouts above the Node timer limit in chunks MiniMax-AI/minimax-code#448).Skips (conservés, non réintroduits)
553b19e/b26f634— bumps de version amont. Numéros du fork conservés (0.6.9).f466590— canal de mise à jour npm-prefix exclusif MiniMax. Module retiré du fork.docs/telemetry.md,requireTelemetry,createTuiBusinessEventTracker, analytics sortant) : hors périmètre.minimax-code/mcode/ MiniMax Code : non réintroduits quand ils entrent en conflit avec l'identité du fork.Gates locaux sur
ed4ec3d(Node 24.21.0)pnpm typecheckPASSpnpm check:sourcePASS (4379 fichiers,terminal-program-status.tsinventorié)pnpm buildPASS (Kinetick Code 0.6.9, 6414 sources) ; le bundle contientapp=kcodeet pasapp=mcodepnpm check:egressPASS, scan d'artefact inclustui-app.test.ts,tui-terminal-presentation.test.ts,chrome-flow.test.ts,host-tui-settings.test.ts— 410/410 PASSCI verify (ubuntu/macos, Node 24) est lancé sur ce head. Pas de merge.