Skip to content

ci: release packages - #4220

Merged
wbxl2000 merged 1 commit into
release/2026-10-13from
changeset-release/release/2026-10-13
Oct 14, 2026
Merged

wbxl2000 merged 1 commit into
release/2026-10-13from
changeset-release/release/2026-10-13

Conversation

@github-actions

@github-actions github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or setup this action to publish automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to release/2026-10-13, this PR will be updated.

Releases

@moonshot-ai/[email protected]

Minor Changes

  • #4159 0a3a2fb Thanks @RealKai42! - Add an opt-in NotifyUser progress update feature (off by default): new sessions can show the agent's mid-turn progress with an optional one-line title, enabled in the TUI /experiments or the web/Desktop settings' Lab section; set [experimental] notify_user = true or KIMI_CODE_EXPERIMENTAL_NOTIFY_USER=1 to turn it on.

  • #4145 242ac23 Thanks @wbxl2000! - Add kimi app [path] to open a new desktop chat in the current or specified directory.

  • #4061 20a2cea Thanks @chengluyu! - Cap the agent's in-turn wait for background tasks at 90 seconds (longer timeouts are no longer accepted), discourage repeated waits, and let a new message end the wait immediately.

  • #3998 09af3b4 Thanks @tpoisonooo! - Tower mode: a message sent while the agent is running aborts the in-progress turn and runs as its own turn.

  • #4031 33e368a Thanks @Grapedge! - Add sticky user message summaries in fullscreen mode; click a summary to jump to the original message.

  • #4074 c9f01f0 Thanks @tpoisonooo! - Tower mode: deterministic orchestration with TowerRebase and LLM-free status, goal/tower mutual exclusion, and workspace protection.

  • #4059 1f6f0b1 Thanks @7Sageer! - Add the KIMI_CODE_TRUST_WORKSPACE environment variable to mark the workspace as trusted.

  • #4165 afd95f6 Thanks @Grapedge! - Replace user skill cards with highlighted prompts and support Ctrl-S for skill prompts.

Patch Changes

  • #4183 c15638b Thanks @RealKai42! - Cancel in-flight video uploads when a media read is interrupted.

  • #4081 06ebfc8 Thanks @sailist! - Fix shifted turns and lost replies when a UserPromptSubmit hook injects text; hook JSON output without a "message" field is no longer added to the conversation.

  • #4154 419aced Thanks @7Sageer! - Fix media file reading on the first turn after resuming a session.

  • #4083 f409caa Thanks @sailist! - Cron tasks from the source session no longer fire inside a forked session.

  • #4152 f0bc988 Thanks @7Sageer! - Forked subagents now inherit the parent's available agent types, including custom agents.

  • #4057 a940f2f Thanks @huangzheng2016! - Fix the permission mode switch in the goal-start approval prompt not taking effect on the v2 engine.

  • #4081 06ebfc8 Thanks @sailist! - Fix messages rendering out of place in sessions with a UserPromptSubmit hook.

  • #4153 7091138 Thanks @RealKai42! - Let the agent write one- or two-sentence progress notes between tool calls instead of bare status lines; in the experimental Updates panel (KIMI_CODE_EXPERIMENTAL_NOTIFY_USER=1), stop asking the agent to repost its mid-turn text as an update and remind it to post updates less often.

  • #4054 4fbe065 Thanks @RealKai42! - Stop prompting the agent to send NotifyUser updates when a session is opened in a host that does not display them.

  • #4091 21406fb Thanks @sailist! - Omit max_tokens for models without an explicit output limit, fixing repeated 400 errors on strict serving stacks (e.g. bare vLLM) when the model's max output size is unknown.

  • #4184 cbd7540 Thanks @7Sageer! - Remove the never-implemented executor = "kaos" option from MCP stdio server configuration; configs using it now fail validation at load time.

  • #2919 0f052fe Thanks @duyphan154! - Sanitize foreground Bash tool output so captured terminal escape sequences no longer change the host terminal state.

  • #4164 3395f5b Thanks @huangzheng2016! - Show a "Shutting down" status hint while shutdown hooks run during exit, and let a Ctrl+C during that window force an immediate exit instead of waiting for the hook timeout.

  • #4033 eec9bbd Thanks @Grapedge! - Feedback surveys now appear less often.

  • #4160 72fc1d0 Thanks @kimi-agent-bot! - Show "Working…" in the status spinner while thinking.

  • #4056 395d537 Thanks @7Sageer! - Replace inline MCP commands in the workspace trust prompt with activation summaries and configuration paths for manual inspection.

  • #4076 e3bf50c Thanks @7Sageer! - Remove interruption reminders from the conversation when their interrupted turns are undone.

  • #4031 33e368a Thanks @Grapedge! - Replace the user message bullet ✨ with ❯.

  • #4221 2e6821d Thanks @kimi-agent-bot! - web: Improved interactions and fixed known bugs.

@moonshot-ai/[email protected]

Minor Changes

  • #4058 5b93669 Thanks @liruifengv! - Add an allow_ignored_globs option to the workspace fs:list request: matching entries are listed even when gitignored, ignored ancestor directories of a match stay traversable, and dot-path allowances require show_hidden: true.

Patch Changes

  • #4058 5b93669 Thanks @liruifengv! - Match workspace fs globs (include_globs, exclude_globs, allow_ignored_globs) with the standard picomatch engine: a/**/b no longer matches paths like a/xxb, and a/** now also matches a itself.

@moonshot-ai/[email protected]

Minor Changes

  • #4184 cbd7540 Thanks @7Sageer! - Remove the kaos / persistenceKaos session options and the createSessionWithKaos / resumeSessionWithKaos client methods, which were already ignored at runtime.

  • #4156 e5b4b88 Thanks @Grapedge! - Add cumulative main-agent user-turn counts to session recovery snapshots.

@moonshot-ai/[email protected]

Minor Changes

  • #4031 33e368a Thanks @Grapedge! - Add fullscreen layout effects that settle render requests before terminal output.

[email protected]

Patch Changes

@moonshot-ai/[email protected]

Patch Changes

@moonshot-ai/[email protected]

Patch Changes

@moonshot-ai/[email protected]

Patch Changes

@moonshot-ai/[email protected]

Patch Changes

@moonshot-ai/[email protected]

Patch Changes

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T15:26:50.983987Z 5a00484 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e724b08888

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

{
"name": "@moonshot-ai/kimi-code-sdk",
"version": "0.20.0",
"version": "0.21.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep the SDK compatible or issue a major release

The 0.21.0 changelog explicitly removes the public createSessionWithKaos / resumeSessionWithKaos methods and kaos / persistenceKaos options, so SDK consumers upgrading from 0.20.0 can stop compiling. Publishing that API removal as a minor release conflicts with the repository's required major-bump path for breaking changes; either retain deprecated compatibility declarations or obtain the required major release approval.

AGENTS.md reference: AGENTS.md:L62-L62

Useful? React with 👍 / 👎.


- [#4091](https://github.com/MoonshotAI/kimi-code/pull/4091) [`21406fb`](https://github.com/MoonshotAI/kimi-code/commit/21406fb4c805cc8c715e6d1f16ad3fb5f25f4fe3) Thanks [@sailist](https://github.com/sailist)! - Omit max_tokens for models without an explicit output limit, fixing repeated 400 errors on strict serving stacks (e.g. bare vLLM) when the model's max output size is unknown.

- [#4184](https://github.com/MoonshotAI/kimi-code/pull/4184) [`cbd7540`](https://github.com/MoonshotAI/kimi-code/commit/cbd754049a114ee36d1b27675c82819e4963c692) Thanks [@7Sageer](https://github.com/7Sageer)! - Remove the never-implemented `executor = "kaos"` option from MCP stdio server configuration; configs using it now fail validation at load time.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve legacy kaos configs behind a compatibility path

For an existing configuration containing a disabled stdio MCP entry with executor = "kaos", the previous release could load the configuration because the value was only rejected when that client was constructed; 2.2.0 now rejects the entire configuration during schema validation. This entry names the loss but provides no config, environment variable, flag, or migration path to restore startup behavior, so preserve the legacy value as deprecated or add the required escape hatch/sign-off before publishing.

AGENTS.md reference: AGENTS.md:L106-L108

Useful? React with 👍 / 👎.

Comment on lines +7 to +9
- Updated dependencies [[`5b93669`](https://github.com/MoonshotAI/kimi-code/commit/5b936697670ed15444bcb4720bd91e6ee776a941), [`5b93669`](https://github.com/MoonshotAI/kimi-code/commit/5b936697670ed15444bcb4720bd91e6ee776a941)]:
- @moonshot-ai/[email protected]
- @moonshot-ai/[email protected]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Declare the new remote-control API contract

The release parent contains the new remote-control device list, rename, deactivate, and delete routes plus new status/conflict response fields from c69bd6c and c1ec372, but this changelog describes 0.2.4 only as dependency updates and the generated release description never names the desktop/web consumers or previous-client compatibility. Because the API-surface snapshot is an explicit external contract tripwire, add a release entry that declares those consumers and compatibility guarantees before consuming the release changesets.

AGENTS.md reference: AGENTS.md:L114-L116

Useful? React with 👍 / 👎.

@@ -1,5 +1,63 @@
# @moonshot-ai/kimi-code

## 2.2.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add public CLI entries for bundled behavior changes

The 2.2.0 artifact also ships observable changes that are absent from this public CLI changelog: KIMI_CODE_LLM_HEADERS_TIMEOUT_MS from c151d5a, relay-triggered shutdown for kimi web --remote-control from 7f0ff53, and the changed fs:list glob semantics from 5b93669 (listed only under the private engine package). CLI users therefore receive new inputs and changed behavior without the release declaring them; add CLI changesets or equivalent 2.2.0 entries before publication.

AGENTS.md reference: AGENTS.md:L102-L104

Useful? React with 👍 / 👎.

{
"name": "@moonshot-ai/kimi-code-sdk",
"version": "0.20.0",
"version": "0.21.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Remove private from the SDK before publishing 0.21.0

This release consumes the SDK changesets and advances the repository to 0.21.0, but the manifest still has private: true and .github/workflows/release.yml:131 publishes exclusively through changeset publish. The pinned Changesets 2.30.0 implementation filters publish candidates to packages where packageJson.private is false, so 0.21.0 will be skipped while the changesets are permanently consumed (Changesets publish implementation); remove private or otherwise make this explicitly public before merging the release commit.

AGENTS.md reference: AGENTS.md:L22-L22

Useful? React with 👍 / 👎.


### Minor Changes

- [#4159](https://github.com/MoonshotAI/kimi-code/pull/4159) [`0a3a2fb`](https://github.com/MoonshotAI/kimi-code/commit/0a3a2fbafab473df9e9f6609f825af78d2c1ce6d) Thanks [@RealKai42](https://github.com/RealKai42)! - Add an opt-in NotifyUser progress update feature (off by default): new sessions can show the agent's mid-turn progress with an optional one-line title, enabled in the TUI `/experiments` or the web/Desktop settings' Lab section; set `[experimental] notify_user = true` or `KIMI_CODE_EXPERIMENTAL_NOTIFY_USER=1` to turn it on.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Ship the web bundle that implements NotifyUser

For kimi web users who enable notify_user, the server now advertises the update_panel capability and the changelog promises a Lab toggle and progress display, but apps/kimi-code/dist-web is byte-identical to the previous 2.1.1 release (its last sync predates #4159) and its main bundle contains no NotifyUser or update_panel handling. The agent can therefore emit updates that the shipped browser UI cannot present; sync and commit the code-app bundle with this release, or remove the web capability and claim until that bundle is available.

AGENTS.md reference: AGENTS.md:L18-L18

Useful? React with 👍 / 👎.


- [#4145](https://github.com/MoonshotAI/kimi-code/pull/4145) [`242ac23`](https://github.com/MoonshotAI/kimi-code/commit/242ac230006447f8601e1678c49182bfbae89fe9) Thanks [@wbxl2000](https://github.com/wbxl2000)! - Add `kimi app [path]` to open a new desktop chat in the current or specified directory.

- [#4061](https://github.com/MoonshotAI/kimi-code/pull/4061) [`20a2cea`](https://github.com/MoonshotAI/kimi-code/commit/20a2cea72f5d2c4be3a3845e4ff24ce302a6630e) Thanks [@chengluyu](https://github.com/chengluyu)! - Cap the agent's in-turn wait for background tasks at 90 seconds (longer timeouts are no longer accepted), discourage repeated waits, and let a new message end the wait immediately.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the previous WaitFor range behind an escape hatch

Custom agents and persisted tool-call flows that previously supplied a WaitFor.timeout between 91 and 600 seconds now fail schema validation because WAIT_FOR_MAX_TIMEOUT_S is hard-coded to 90. The release entry names that loss, but there is no config, environment variable, or feature flag that lets the affected population retain the old accepted range, nor a guard for such a compatibility path; provide the required escape hatch or explicit maintainer sign-off before publishing the narrowed contract.

AGENTS.md reference: AGENTS.md:L106-L108

Useful? React with 👍 / 👎.

@github-actions
github-actions Bot force-pushed the changeset-release/release/2026-10-13 branch from e724b08 to 5a00484 Compare October 14, 2026 15:18
@wbxl2000
wbxl2000 merged commit 472192c into release/2026-10-13 Oct 14, 2026
12 checks passed
@wbxl2000
wbxl2000 deleted the changeset-release/release/2026-10-13 branch October 14, 2026 15:25

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5a00484bb3

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".


### Minor Changes

- [#4184](https://github.com/MoonshotAI/kimi-code/pull/4184) [`cbd7540`](https://github.com/MoonshotAI/kimi-code/commit/cbd754049a114ee36d1b27675c82819e4963c692) Thanks [@7Sageer](https://github.com/7Sageer)! - Remove the `kaos` / `persistenceKaos` session options and the `createSessionWithKaos` / `resumeSessionWithKaos` client methods, which were already ignored at runtime.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Document all public SDK contract changes

The 0.21.0 section lists only the kaos removal and user-turn counts, but this release also ships public additions and type changes including Session.getTowerStatus(), the steerIfActive option for promptWithSkills, and new required WorkspaceTrustInfo disclosure fields. SDK consumers—especially those constructing trust-info values or implementing test doubles—need these contract changes called out, so add corresponding entries and compatibility guidance rather than publishing the release as if it contained only the two listed API changes.

AGENTS.md reference: AGENTS.md:L102-L104

Useful? React with 👍 / 👎.

Comment thread apps/vscode/CHANGELOG.md

### Patch Changes

- Updated dependencies [[`cbd7540`](https://github.com/MoonshotAI/kimi-code/commit/cbd754049a114ee36d1b27675c82819e4963c692), [`e5b4b88`](https://github.com/MoonshotAI/kimi-code/commit/e5b4b88ba93d5a27aa9a36cf847eed4f1aa39c48)]:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include the VS Code replay behavior in its release notes

Version 0.8.2 contains a direct apps/vscode/src/runtime/replay-adapter.ts change that strips expanded skill instructions when resuming marked or legacy bundled-skill sessions, with new tests pinning that visible behavior, but this section claims only dependency updates. VS Code users upgrading and reopening those sessions therefore receive an undeclared transcript-rendering change; add a VS Code release entry for it.

AGENTS.md reference: AGENTS.md:L102-L104

Useful? React with 👍 / 👎.


- [#4031](https://github.com/MoonshotAI/kimi-code/pull/4031) [`33e368a`](https://github.com/MoonshotAI/kimi-code/commit/33e368a1eff8d958856af8e2fb64f4db122b2247) Thanks [@Grapedge](https://github.com/Grapedge)! - Replace the user message bullet ✨ with ❯.

- [#4221](https://github.com/MoonshotAI/kimi-code/pull/4221) [`2e6821d`](https://github.com/MoonshotAI/kimi-code/commit/2e6821dcbd8034f128b2326a73d4704201b7c108) Thanks [@kimi-agent-bot](https://github.com/kimi-agent-bot)! - web: Improved interactions and fixed known bugs.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Replace the vague web bundle release entry

For browser users this is the only entry covering the newly synchronized code-app bundle, but “Improved interactions and fixed known bugs” identifies neither an interaction nor a bug. Because the web source is outside this repository and the committed bundle changes thousands of generated lines, this wording leaves the shipped behavior impossible to review or understand; replace it with concrete user-facing sentences describing what changed.

AGENTS.md reference: AGENTS.md:L89-L90

Useful? React with 👍 / 👎.


- [#4183](https://github.com/MoonshotAI/kimi-code/pull/4183) [`c15638b`](https://github.com/MoonshotAI/kimi-code/commit/c15638b0a1234e5aa97659fbc625d7dc4d60d93f) Thanks [@RealKai42](https://github.com/RealKai42)! - Cancel in-flight video uploads when a media read is interrupted.

- [#4081](https://github.com/MoonshotAI/kimi-code/pull/4081) [`06ebfc8`](https://github.com/MoonshotAI/kimi-code/commit/06ebfc821e304bd4ca3f828ae739954166463d65) Thanks [@sailist](https://github.com/sailist)! - Fix shifted turns and lost replies when a UserPromptSubmit hook injects text; hook JSON output without a "message" field is no longer added to the conversation.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve message-less structured hook output

For an existing UserPromptSubmit hook that emits valid structured JSON without a message field, such as {"continue":true}, the previous implementation fell back to injecting stdout into the conversation, while the new structuredOutput guard silently returns no hook part. This entry names the loss, but the hook receives no error and there is no config, environment variable, flag, compatibility path, or explicit release sign-off allowing affected hook scripts to retain their previous behavior; preserve the fallback behind an escape hatch or obtain the required sign-off before publishing.

AGENTS.md reference: AGENTS.md:L106-L108

Useful? React with 👍 / 👎.


- [#4031](https://github.com/MoonshotAI/kimi-code/pull/4031) [`33e368a`](https://github.com/MoonshotAI/kimi-code/commit/33e368a1eff8d958856af8e2fb64f4db122b2247) Thanks [@Grapedge](https://github.com/Grapedge)! - Add sticky user message summaries in fullscreen mode; click a summary to jump to the original message.

- [#4074](https://github.com/MoonshotAI/kimi-code/pull/4074) [`c9f01f0`](https://github.com/MoonshotAI/kimi-code/commit/c9f01f07388abc2cdca40c9c5267f58c65086710) Thanks [@tpoisonooo](https://github.com/tpoisonooo)! - Tower mode: deterministic orchestration with TowerRebase and LLM-free status, goal/tower mutual exclusion, and workspace protection.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Declare the loss of nested Tower worker delegation

Tower workers and reviewers previously received the Agent tool plus the explore and plan subagent allowlist, but this release removes both, so Tower missions that delegated investigation from inside a worker can no longer run that workflow. The entry mentions orchestration and workspace protection without naming this lost capability, and disabling Tower does not preserve the old Tower behavior; name the loss and provide an escape hatch or explicit maintainer sign-off before publishing.

AGENTS.md reference: AGENTS.md:L106-L108

Useful? React with 👍 / 👎.

wbxl2000 added a commit that referenced this pull request Oct 14, 2026
* feat(kap-server): add remote control device deletion (#4192) (#4195)

* feat(kap-server): add remote control device deletion

* fix(kap-server): coordinate with the local tunnel before deleting this machine's device

Co-authored-by: liruifengv <[email protected]>

* ci: enable recoverable publishing for the October release (#4218)

* ci: publish core releases from isolated release branches

* ci: simplify release recovery to the CLI package

* ci: publish VS Code from approved release commits

* test: await release test registration for type-aware lint

* test: avoid assuming order of independent tower events

* ci: limit release migration to existing publishing flow

* chore: sync web dist from code-app (#4221)

* chore: sync web dist from code-app

code-app: f828bac439ab5b9266ff8387c2afb96ecfcb59ae

* ci: retrigger (flaky rpc-events teardown ENOTEMPTY)

---------

Co-authored-by: kimi-agent-bot <[email protected]>

* ci: release packages (#4220)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: qer <[email protected]>
Co-authored-by: liruifengv <[email protected]>
Co-authored-by: kimi-agent-bot <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
liruifengv added a commit that referenced this pull request Oct 20, 2026
* feat(kap-server): add remote control device deletion (#4192) (#4195)

* feat(kap-server): add remote control device deletion

* fix(kap-server): coordinate with the local tunnel before deleting this machine's device

Co-authored-by: liruifengv <[email protected]>

* ci: enable recoverable publishing for the October release (#4218)

* ci: publish core releases from isolated release branches

* ci: simplify release recovery to the CLI package

* ci: publish VS Code from approved release commits

* test: await release test registration for type-aware lint

* test: avoid assuming order of independent tower events

* ci: limit release migration to existing publishing flow

* chore: sync web dist from code-app (#4221)

* chore: sync web dist from code-app

code-app: f828bac439ab5b9266ff8387c2afb96ecfcb59ae

* ci: retrigger (flaky rpc-events teardown ENOTEMPTY)

---------

Co-authored-by: kimi-agent-bot <[email protected]>

* ci: release packages (#4220)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* feat(tui): queue /compact behind the running turn (#4276)

* feat(tui): queue /compact behind the running turn

* docs: note /compact queueing while the agent is busy

* fix(tui): harden queued /compact edge cases

- keep /compact blocked while a compaction holds the turn (busy reason normalized to compacting)
- treat the first queued /compact as a FIFO barrier for Ctrl-S manual steer
- gate the failed-fire retry timer on the session actually going idle

* fix(tui): cover remaining /compact queue review edges

- advertise Ctrl-S in the queue pane only for items ahead of the compact barrier
- queue /compact when the awaited lazy session creation lands on a running turn
- document the auto-compaction skip for queued /compact in docs and the changeset

* fix(tui): guard queued /compact against concurrent compactions

- requeue without firing when another compaction already started (the SDK's begin() swallows this as a silent no-op; declared residual window needs the contract to expose the result)
- restore the input when a duplicate /compact is refused after lazy session creation

* fix(tui): render requeued /compact and mark it always available in docs

- request a render after restoring a compact item to the queue so it does not appear vanished during backoff
- the reference table's availability column now matches the queueing behavior (/compact is accepted during streaming and runs in order)

* fix(tui): steer messages ahead of a queued /compact automatically

The automatic (tower/WaitFor) steer batch now slices at the first queued /compact just like the manual path, so pre-barrier prompts still end a WaitFor promptly instead of being blocked by an unrelated compact item. Batches containing bash or skill items ahead of the barrier keep their existing all-or-nothing semantics.

* test(tui): drive the tower steer barrier case through the WaitFor event path

* chore: downgrade the /compact queue changeset to patch (#4279)

* feat: add cloud-gated model switch confirmation (#4286)

* feat(cli): add cloud-gated model switch confirmation dialog

* feat(server): expose named client_configs endpoint for cloud-controlled clients

* fix(server): keep broadcasting compaction events to transcript subscribers

* Revert "fix(server): keep broadcasting compaction events to transcript subscribers"

This reverts commit e489915.

* fix(cli): address review findings on the model switch confirmation

* test(cli): fix the auth-flow gate test typing

* fix: close the login-path holes in the model switch gate

- install the refreshed model catalog before matching the cloud rule,
  so an alias introduced by /login no longer bypasses the confirmation
- return 'gated' from refreshConfigAfterLogin and forward the picked
  effort to the dialog; setDefaultModel skips its follow-up activation
  while the gate owns the switch
- ignore Escape once a dialog action was chosen so the input lock
  survives the new-session creation

* fix: keep displaced panels alive when the new-session switch settles

The async finalizer of a settled dialog action now only restores the
editor while the model-switch dialog still owns the editor replacement,
so an approval or question panel mounted over it is never wiped out
with its reverse-RPC request still pending.

* feat: support id lists and always-fresh model switch confirmation configs (#4292)

* feat: accept id lists in model switch confirmation rules

* feat: fetch client configs fresh on every request

The /client_configs endpoint now proxies the cloud per request instead
of serving a copy cached at server startup, so config changes take
effect without a server restart. The startup warm-up and the in-memory
store are removed; region is resolved per request.

---------

Co-authored-by: qer <[email protected]>
Co-authored-by: Kimi Agent <[email protected]>
Co-authored-by: kimi-agent-bot <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
liruifengv added a commit that referenced this pull request Oct 27, 2026
* feat(agent-core-v2): add cross-process session occupancy lock (#4246)

* feat(agent-core-v2): add cross-process session occupancy lock

Multiple clients (TUI / kap-server / VS Code / ACP) running core in
separate processes could open the same session and corrupt each
other's wire.jsonl and metadata. Each session now holds a cross-process
occupancy lock ({homeDir}/locks/sessions/{id}.lock) taken only while
writing: runs acquire it on submit / compact / undo / cron / delete /
fork / cold-archive, the append log holds it before flushing, and a
stale check compares the main agent wire's on-disk length with the
length this process knows.

Collisions surface as session.occupied (holder in details); writes by
another client detected after acquire surface as session.stale and the
caller reloads before continuing. kap-server maps them to
SESSION_OCCUPIED (40903) / SESSION_STALE (40930), reloads the session
on stale, and re-attaches WS subscriptions; the TUI shows an occupancy
dialog (retry/cancel) or reloads and replays history keeping the input;
print exits with code 4 on occupied and reloads automatically on stale;
VS Code / ACP get minimal occupancy notices. Locks are released a few
seconds after the session goes idle, on close, and on process exit;
locking I/O failures degrade to unlocked operation with a warning.

* docs: document session occupancy error codes and lock directory

* fix: address codex review on session occupancy lock

- metadata: re-read state.json on the first write of each lock-hold
  epoch (holdToken), so pure-metadata changes made by another client
  (title, archive) are not clobbered by turn-end lastPrompt writes
- lifecycle: hold an explicit lease across live archive(), matching
  delete(), so the idle release timer cannot drop the lock mid-teardown
- tui: route the occupied dialog's Cancel selection through the same
  cleanup as Esc (restore input, release recalled media)
- acp: tell stale-session users to close and reopen the session
- append-log: warn when retirement drops records kept in memory because
  the session lock was unavailable

* fix: always run the staleness check in beginSessionRun

The prompt channels (AgentPromptChannel.submit/submitSteer, kap
/prompts, promptWithSkills) write prompt metadata before calling
loop.submit, and the metadata write acquires the session lock first.
beginSessionRun then short-circuited on 'already held' and skipped the
wire-length staleness check, so the main prompt path never detected
updates written by another client. Drop the already-held shortcut: the
check is a single stat and always passes while the lock is continuously
held, so every acquisition path now runs it regardless of order.

* fix(print): preserve occupied handling on the stale retry

If another client acquires the session between the reload and the
retry, the retried turn now goes through the same conflict handler:
session.occupied reports to stderr / stream-json and exits with code 4
instead of bubbling out as exit code 1.

* fix: do not mistake own in-flight writes for external modification

storage.append grows the file (writeFile) before fsync/close complete,
and knownLength only catches up afterwards; a beginSessionRun landing
in that window (steer, queued prompts, cron fires during a turn) was
misjudged as session.stale and deleted the lock file mid-turn. Track
in-flight bytes per log and compare disk against known + in-flight.
Cover the analogous rewrite window (post-rename syncDir) with an
expected-final-length marker.

* fix: bound the staleness comparison and check once per lock hold

The equality check disk !== known + inFlight moved the false-positive
window to before the append lands (mkdir/open) and into chunked
writes, so beginSessionRun during a turn (steer, cron, queued prompts)
could misjudge, delete the lock file mid-turn, and later append behind
another client. Compare known <= disk <= known + inFlight instead, and
evaluate the check only on a fresh hold (holdToken epoch): re-entrant
runs pass through without a stat, matching the RFC's 'already held
passes through' while every acquisition path still triggers the check
exactly once per hold.

Also unify the occupancy prompt copy across clients: the engine error
message is now the single user-facing text ('该会话正在被其他 Kimi
Code 进程使用;请停止其他进程中的会话或退出该进程后重试'), and the
TUI dialog, /compact /undo errors, print output, and the VS Code
fallback all display it instead of maintaining their own wordings.

* fix: address third-round codex review

- metadata: hold an explicit lease across each state.json write so the
  idle release timer cannot unlink the lock mid-write
- print: preflight the session lock before goal creation; make goal
  creation idempotent and emit the goal summary only for attempts that
  did not fail with session.stale, so a stale reload + retry neither
  duplicates the goal nor the summary
- tui: route every prompt-launch path (plain, goal steer, plugin
  command, inline skill, batch steer) through one conflict handler
  with the occupied dialog and stale reload + input restore
- tui: snapshot and restore the attachment store across stale reloads
  so pasted media placeholders still resolve after history replay

* fix: move session occupancy to a fresh error code, use English copy, release locks on exit

SESSION_OCCUPIED reused 40903, which belonged to PROMPT_ALREADY_COMPLETED until #3747 retired it, and web clients still allowlist 40903 for that old meaning; reusing it conflated the two semantics. Move session occupancy to the never-used 40931 and update the server API reference in both locales.

The occupied error message was hardcoded in Chinese while every other engine error is English, so the TUI, print mode, VS Code, and ACP clients all rendered mixed-language output; replace it with an English equivalent.

The lock release hook ran on 'beforeExit', which never fires when the process leaves through process.exit (SIGHUP in the TUI goes through emergencyTerminalExit), leaving stale lock files that could keep a session looking occupied forever after a hostname change or pid reuse. releaseAll is fully synchronous, so hook 'exit' instead.

* fix(agent-core-v2): decide prompt-derived titles after re-reading session metadata

applyPromptMetadataUpdate decided whether to derive a title from the
prompt from the in-memory metadata cache, which is only refreshed when
the session lock is re-acquired. If another client named the session in
the meantime, the stale cache still looked untitled, so the next prompt
from this client overwrote the other client's title — both on the stale
path, where the prompt is rejected afterwards, and on the fresh path,
where the other client only changed the title on disk.

Move the untitled check into SessionMetadata.applyPromptMetadata, which
runs after ensureWriteOwnership() has re-read state.json, so the
decision is based on the latest persisted metadata. The published
SessionMetaUpdated event now carries the derived title only when it was
actually written.

* fix: address fourth-round codex review

- vscode: classify session.occupied and session.stale as preflight errors so the webview toasts them instead of silently swallowing the send, and give session.occupied the same English copy the engine emits (the toast text comes from getUserMessage in the extension host).
- engine: beginSessionRun now takes the session context and agent lifecycle service, and on the first check of each lock hold it runs externallyModified over every loaded agent's wire (scope agents/<agentId>, key wire.jsonl) instead of only the main agent's, so a fork that only touched a subagent journal is detected as stale. All four call sites (loop submit, manual compaction begin, undo, print preflight) pass the extra dependency.
- tui: keep the request in flight across a stale reload instead of dropping to idle, so input submitted during the reload queues rather than racing the closing session; park the queue around switchToSession (resetSessionRuntime would clear it) and drain it into the reloaded session afterwards; when restoring the rejected text, prepend it before content the user typed during the reload instead of overwriting it.
- kap-server: clear the in-flight turn tracker and subagent roster in detachSession so a reattached session no longer reports stale in-flight turns or running subagents in REST snapshots and WS resyncs.

* fix: harden session conflict recovery

Detect external appends that race journal reads so a later run cannot miss session.stale. Keep deferred wire migrations pending and finish them before appending, while rejecting the append if migration still cannot complete. Restore the complete plugin command after an occupied cancellation, including commands without arguments.

* fix: scope session staleness cache to session context

Replace the process-global session-id map with a WeakMap keyed by ISessionContext so closed and reloaded sessions do not retain cache entries for the lifetime of the process.

* fix: document session conflicts for metadata routes

Declare SESSION_OCCUPIED and SESSION_STALE in the response schemas for profile updates, title generation, and child creation. Cover the OpenAPI declarations and the existing HTTP 200 conflict envelopes with regression tests.

* refactor: centralize session conflict handling

Move session error mapping and stale reloads into one shared route helper, reuse shared conflict response declarations, and cover skill activation conflicts. Remove the duplicate prompt, session, and skill error mappers while preserving their existing envelopes.

* fix(sdk): restate session conflict errors

* fix(tui): keep the reloaded session open and resend after a stale conflict

* fix(agent-core-v2): lazily rebuild registered agents after a session reload

* refactor: simplify session conflict handling

* refactor: hygiene fixes from session-lock review

- kap-server: move SESSION_STALE to 40932 (collided with
  DEFAULT_WORKSPACE_UNAVAILABLE at 40930) and pin ErrorCode value
  uniqueness with a test
- node-sdk: fold six catch-and-restate copies into a restate() helper
- acp-server: sync mapPromptLaunchError docstring with the
  occupied/stale branches
- replace hardcoded session.stale/session.occupied literals with
  ErrorCodes constants
- inline the single-use sessionStaleError
- restore the strict timer-leak assertion with a warmup baseline
  instead of a blanket +1 allowance
- narrow SessionState.detached to ?: true

* refactor: introduce session-level run gate

- replace the beginSessionRun free function with ISessionRunGate, a
  Session-scoped service; loop/compaction/undo now inject one
  dependency instead of four, and sessionLock.ts no longer imports
  session-layer modules
- tryHold() absorbs the duplicated try/catch hold copies in
  wireService and sessionMetadataService
- resolve IAgentLifecycleService lazily inside the gate to avoid a
  construction-time cycle with agentLifecycleService

* refactor: tighten session lock and conflict recovery structure

- Narrow ISessionLockService to hold/tryHold/release/lease/held and share
  the hold bookkeeping between the memory and node-fs backends; drop
  holdToken and the module-level exit hook state.
- Session metadata refreshes on a new hold via onDidHold and skips agent
  registration through tryHold instead of catching session.occupied.
- AppendLogStore reads sizes through IFileSystemStorageService.sizeSync and
  exposes a generic write guard instead of a session-lock binding.
- kap: reload stale sessions only at the call sites that can raise
  session.stale and log reload failures; error mapping stays side-effect free.
- TUI: recover from a stale conflict through the in-place session reload with
  history replay, removing the same-session switch special case, the media
  store snapshot, and the queue parking.
- print: bound stale reloads with a simple retry loop.

* refactor(agent-core-v2): merge session lock release into run gate

* test(agent-core-v2): reuse append log fixtures

* refactor(agent-core-v2): break run gate and agent lifecycle dependency cycle

* refactor: reload stale sessions in core instead of each host

Stale detection already lived in core, but every host re-implemented the
recovery: TUI, print, and kap each closed and resumed the session, and TUI
and web resent the rejected input themselves.

Core now exposes reloadOnStale: on session.stale it closes and resumes the
session, lets the caller refresh, then retries the call once (undo reloads
and still rejects, since its count depends on what the user saw).

- kap: prompt submit, skill activation, and compact retry in place instead
  of returning 40932; undo still returns 40932 after reloading
- print: retries through reloadOnStale on the same session id and keeps the
  original permission mode to restore
- SDK: run-starting calls reload and retry internally; Session gains
  setStaleReloadHandler so hosts refresh before the retry
- TUI: drops its own reload/resend/queue-merge path; the stale handler
  replays history and keeps in-flight messages

* docs(server-api): note that only undo returns 40932 after a stale reload

* refactor(agent-core-v2): ask each agent's wire whether it was modified externally

* refactor(agent-core-v2): clarify agent restoration helper name

* Delete .changeset/ensure-agent-lazy-rebuild.md

Signed-off-by: 7Sageer <[email protected]>

* fix(tui): wrap session occupied notice

---------

Signed-off-by: 7Sageer <[email protected]>

* revert: remove default workspace session creation (#4295)

* chore: merge release/2026-10-20 into release/2026-10-21 (#4294)

* feat(kap-server): add remote control device deletion (#4192) (#4195)

* feat(kap-server): add remote control device deletion

* fix(kap-server): coordinate with the local tunnel before deleting this machine's device

Co-authored-by: liruifengv <[email protected]>

* ci: enable recoverable publishing for the October release (#4218)

* ci: publish core releases from isolated release branches

* ci: simplify release recovery to the CLI package

* ci: publish VS Code from approved release commits

* test: await release test registration for type-aware lint

* test: avoid assuming order of independent tower events

* ci: limit release migration to existing publishing flow

* chore: sync web dist from code-app (#4221)

* chore: sync web dist from code-app

code-app: f828bac439ab5b9266ff8387c2afb96ecfcb59ae

* ci: retrigger (flaky rpc-events teardown ENOTEMPTY)

---------

Co-authored-by: kimi-agent-bot <[email protected]>

* ci: release packages (#4220)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* feat(tui): queue /compact behind the running turn (#4276)

* feat(tui): queue /compact behind the running turn

* docs: note /compact queueing while the agent is busy

* fix(tui): harden queued /compact edge cases

- keep /compact blocked while a compaction holds the turn (busy reason normalized to compacting)
- treat the first queued /compact as a FIFO barrier for Ctrl-S manual steer
- gate the failed-fire retry timer on the session actually going idle

* fix(tui): cover remaining /compact queue review edges

- advertise Ctrl-S in the queue pane only for items ahead of the compact barrier
- queue /compact when the awaited lazy session creation lands on a running turn
- document the auto-compaction skip for queued /compact in docs and the changeset

* fix(tui): guard queued /compact against concurrent compactions

- requeue without firing when another compaction already started (the SDK's begin() swallows this as a silent no-op; declared residual window needs the contract to expose the result)
- restore the input when a duplicate /compact is refused after lazy session creation

* fix(tui): render requeued /compact and mark it always available in docs

- request a render after restoring a compact item to the queue so it does not appear vanished during backoff
- the reference table's availability column now matches the queueing behavior (/compact is accepted during streaming and runs in order)

* fix(tui): steer messages ahead of a queued /compact automatically

The automatic (tower/WaitFor) steer batch now slices at the first queued /compact just like the manual path, so pre-barrier prompts still end a WaitFor promptly instead of being blocked by an unrelated compact item. Batches containing bash or skill items ahead of the barrier keep their existing all-or-nothing semantics.

* test(tui): drive the tower steer barrier case through the WaitFor event path

* chore: downgrade the /compact queue changeset to patch (#4279)

* feat: add cloud-gated model switch confirmation (#4286)

* feat(cli): add cloud-gated model switch confirmation dialog

* feat(server): expose named client_configs endpoint for cloud-controlled clients

* fix(server): keep broadcasting compaction events to transcript subscribers

* Revert "fix(server): keep broadcasting compaction events to transcript subscribers"

This reverts commit e489915.

* fix(cli): address review findings on the model switch confirmation

* test(cli): fix the auth-flow gate test typing

* fix: close the login-path holes in the model switch gate

- install the refreshed model catalog before matching the cloud rule,
  so an alias introduced by /login no longer bypasses the confirmation
- return 'gated' from refreshConfigAfterLogin and forward the picked
  effort to the dialog; setDefaultModel skips its follow-up activation
  while the gate owns the switch
- ignore Escape once a dialog action was chosen so the input lock
  survives the new-session creation

* fix: keep displaced panels alive when the new-session switch settles

The async finalizer of a settled dialog action now only restores the
editor while the model-switch dialog still owns the editor replacement,
so an approval or question panel mounted over it is never wiped out
with its reverse-RPC request still pending.

* feat: support id lists and always-fresh model switch confirmation configs (#4292)

* feat: accept id lists in model switch confirmation rules

* feat: fetch client configs fresh on every request

The /client_configs endpoint now proxies the cloud per request instead
of serving a copy cached at server startup, so config changes take
effect without a server restart. The startup warm-up and the in-memory
store are removed; region is resolved per request.

---------

Co-authored-by: qer <[email protected]>
Co-authored-by: Kimi Agent <[email protected]>
Co-authored-by: kimi-agent-bot <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore: sync web dist from code-app (#4304)

code-app: 913137036c35c608f3a487eb2c7b4a8815b53b95

Co-authored-by: kimi-agent-bot <[email protected]>

* ci: release packages (#4288)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix: decouple workspace trust from runtime initialization (#4348)

* fix(kap-server): decouple workspace trust from runtime initialization

* fix: preserve workspace trust errors

* fix: emit workspace trust recovery changes

* fix: complete workspace trust recovery

* fix(agent-core-v2): reclaim session locks from zombie processes (#4320)

(cherry picked from commit 0a90e2e)

* feat: let users take over a session lock left by an exited process (#4328)

* feat: let users take over a session lock left by an exited process

Session locks judged alive by mistake (a different hostname, pid reuse, or a failed process-state probe) blocked the session with no way out. Add a takeover path: the lock service evicts another process's lock, the SDK exposes Session.takeOverLock(), kap-server adds POST /api/v1/sessions/{id}:takeover, and the TUI offers Take over once a retry is still occupied. KIMI_CODE_SESSION_LOCK=0 turns the lock off for a process.

* fix(agent-core-v2): evict the lock directly on takeover

Takeover went through the reclaim marker, so a stale marker left by a crashed reclaimer on another host made takeover a silent no-op while the API reported success. Unlink the lock file directly instead.

* fix(agent-core-v2): surface takeover failures when the lock cannot be removed

Takeover swallowed unlink errors, so a lock file another user owns in a shared sticky directory was reported as taken over while the next retry stayed occupied. Ignore only ENOENT and let other errors reach the caller. Also fix the run gate test bootstrap stub typing.

* fix(tui): simplify the session takeover copy

* fix(tui): tie the takeover warning to the takeover action

* fix(tui): drop the holder line from the takeover dialog

* refactor(tui): move the session occupancy dialogs into a controller

(cherry picked from commit e7f1a99)

* chore: sync web dist from code-app

code-app: 76483646b7c46a61bff868f1473535e0a32b473d

---------

Co-authored-by: 7Sageer <[email protected]>

* feat: show session lock holder client names (#4356)

* chore: sync web dist from code-app (#4357)

code-app: 7be8bf55306625ade7b5dbead86bc789d22d0159

Co-authored-by: kimi-agent-bot <[email protected]>

* ci: release packages (#4353)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* test: isolate cloud config in message flow tests (#4363) (#4383)

(cherry picked from commit 087db85)

Co-authored-by: grapedge <[email protected]>

* fix(agent-core-v2): leave swarm mode to the user (#4384)

* fix(agent-core-v2): leave swarm mode to the user

AgentSwarm now runs only while swarm mode is on, and only the user can
turn swarm mode on, so the model can no longer start a swarm by itself.

- Reject AgentSwarm at resolve time while swarm mode is off and check
  again right before it runs; no subagents start and swarm mode stays off.
- Stop AgentSwarm from entering swarm mode, reject the tool trigger, and
  ignore tool-triggered entries that older versions recorded on replay.
- Skip the one-AgentSwarm-per-response veto while swarm mode is off so
  the other tools in that response still run.
- Say in the AgentSwarm description and the swarm exit reminder that only
  the user can turn swarm mode on.
- Update the tools and slash-command reference docs.

* fix(transcript): ignore model-started swarm entries when folding history

Swarm mode entries with the tool trigger come only from older versions,
where the model started a swarm by itself. The engine already ignores
them on replay, so a session that stopped mid-swarm resumes with swarm
mode off. Folding history still marked swarm mode on from that entry,
and no later status update turned it off, so the web UI kept showing
swarm mode as on.

Keep the swarm.enter marker in history, but leave meta.modes untouched
for tool-triggered entries.

* fix(agent-core-v2): launch subagents only on explicit request (#4386)

The main agent launched subagents on its own: the explore type told it to
delegate any exploration needing more than three searches and to run several
explore agents at once, the Agent description sold delegation, and the
EnterPlanMode description sent plan mode to an explore subagent first.

- Agent description: launch a subagent only when the user asks for one, or
  AGENTS.md, a skill, or a multi-agent mode the user turned on calls for it;
  agent type descriptions only pick a type once launching is authorized.
- System prompt: state the same rule for Agent.
- Drop the delegation nudges from the Agent and explore descriptions and from
  the EnterPlanMode description.
- Swarm exit reminder: once swarm mode ends, handle the next request without
  subagents unless it asks for them.

* chore: clarify subagent changeset

* ci: release packages (#4385)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix: hide AgentSwarm calls rejected before any subagent starts (#4414)

While swarm mode is off the core rejects AgentSwarm before any subagent
starts, but the TUI still drew the call as a swarm whose members all
failed, and resumed sessions replayed it as a failed swarm card.

- Do not create the swarm panel while swarm mode is off, and remove the
  panel when a call ends before any subagent started (swarm mode off,
  input validation, a rejected approval, or a blocking hook).
- Create the panel when the first subagent spawns, so a swarm that does
  run is never hidden when the TUI's swarm state lags behind.
- Skip such calls when replaying a session.
- Tell the model to point the user to /swarm only when they asked for a
  swarm, and otherwise to continue without mentioning swarm mode.

* feat: warn about high usage when swarm mode turns on (#4423)

Swarm runs many agents in parallel and can use many times the tokens of
a normal task. Show a warning line under "Swarm activated" whenever
/swarm, /swarm on, or /swarm <task> turns swarm mode on, suggesting a
small task first and turning swarm off when done.

* feat: add session-aware model switch confirmations (#4424)

* feat: add session-aware model switch confirmations

* chore: remove changesets

* fix: harden model switch confirmation loading

* fix(cli): merge duplicated permission-mode notice lines in swarm and goal start prompts (#4432)

* feat: add cloud-controlled effort switching prompts (#4436)

* feat: add cloud-controlled effort switching prompts

* fix: rename effort switch client config

* fix: refine model and effort switch prompts

* docs: update model switch release note to English (#4440)

* chore: sync web dist from code-app (#4443)

code-app: e3e6af32171e939399cea2edc728757dcae0ba18

Co-authored-by: kimi-agent-bot <[email protected]>

* ci: release packages (#4417)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* test(tui): use the release gate fixtures in auth-flow.test.ts

The merged gate path needs the release fixtures (session_type rules +
model capabilities); keep main's unique auth/refreshProviderModels tests
alongside release's.

* fix: drop unused isSessionOccupiedError import left by the sync resolution

* test(tui): align goal start prompt expectations with the merged notice copy

#4432 merged the duplicated permission-mode notice lines; update the goal
and fullscreen dock expectations to the merged copy (the body now fits at
maxBodyRows=6, so no scroll suffix).

---------

Signed-off-by: 7Sageer <[email protected]>
Co-authored-by: 7Sageer <[email protected]>
Co-authored-by: qer <[email protected]>
Co-authored-by: liruifengv <[email protected]>
Co-authored-by: kimi-agent-bot <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Kai <[email protected]>
Co-authored-by: grapedge <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant