Skip to content

feat(install): MCP preselection parity, YOLO prompt, v2 engine flag - #15

Merged
fusengine merged 3 commits into
mainfrom
feat/installer-permission-mode-v2-flag
Jul 29, 2026
Merged

feat(install): MCP preselection parity, YOLO prompt, v2 engine flag#15
fusengine merged 3 commits into
mainfrom
feat/installer-permission-mode-v2-flag

Conversation

@fusengine

Copy link
Copy Markdown
Owner

What

Three installer improvements, discovered while comparing with the Claude Code installer:

  1. MCP preselection parity (mcp-select.ts): initialValues used default !== false, pre-selecting key-required servers even when the key is missing. Now follows the Claude rule (getDefaultSelections): explicit default wins, otherwise no-key servers plus key-required ones whose apiKeyEnv is already set. Key-required entries show [✓] / [⚠ key missing] labels, like buildMcpOptions.

  2. YOLO permission mode step (permission-mode.ts): TTY select (OFF manual / ON yolo, seeded with the current value) persists default_permission_mode in $KIMI_HOME/config.toml via a surgical line edit (everything else preserved). Non-TTY: FUSENGINE_PERMISSION_MODE=manual|yolo|auto, else no-op.

  3. v2 engine flag step (experimental-flag.ts): custom agents (~/.kimi-code/agents/*.md) are only discovered by the v2 engine — the v1 backport (feat(agent-core): custom agent files and secondary model on the v1 engine MoonshotAI/kimi-code#2232) is merged but not yet released. The installer proposes KIMI_CODE_EXPERIMENTAL_FLAG=1 in the detected shell rc (default YES, guarded idempotent block, zsh/bash/fish). Kimi does not read $KIMI_HOME/.env at startup, so the export must live in the shell rc. Non-TTY applies only with explicit FUSENGINE_EXPERIMENTAL_FLAG=1 — CI never touches the real rc.

Tests

  • bun test scripts/tests/33/33 pass (12 new: MCP parity units, permission-mode integration, experimental-flag integration + shellTarget units)
  • bun run validate → 24/24 plugins OK
  • Real dry-run shows all three steps in the plan

initialValues now follow the Claude installer's getDefaultSelections:
explicit default wins, otherwise no-key servers plus key-required ones
whose apiKeyEnv is already set. Key-required entries are labelled
[check] / [key missing] in the multiselect, like buildMcpOptions.
configurePermissionMode: TTY select (YOLO ON/OFF, seeded with the current
value) persists default_permission_mode in config.toml via a surgical
line edit; non-TTY honors FUSENGINE_PERMISSION_MODE, else no-op.

configureExperimentalFlag: custom agents are only discovered by the v2
engine (v1 backport #2232 not yet released), so the installer proposes
KIMI_CODE_EXPERIMENTAL_FLAG=1 in the detected shell rc (default YES,
guarded idempotent block). Kimi does not read $KIMI_HOME/.env, so the
export must live in the shell rc. Non-TTY applies only with the explicit
FUSENGINE_EXPERIMENTAL_FLAG=1 opt-in.
@fusengine
fusengine merged commit 56d2f95 into main Jul 29, 2026
@fusengine
fusengine deleted the feat/installer-permission-mode-v2-flag branch July 29, 2026 18:25
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