[PR #1345] [MERGED] Launcher Settings: Connect an AI agent, and the No AI switch #3490

Closed
opened 2026-11-03 04:09:55 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1345
Author: @ludovic111
Created: 10/23/2026
Status: ✅ Merged
Merged: 10/23/2026
Merged by: @ludovic111

Base: main ← Head: feat/agent-connect-launcher


📝 Commits (3)

  • b117930 No AI: one switch that turns off agent control (socket, horizon-ctl, both MCP servers)
  • ef792ec Launcher MCP: every CLI command is a tool of the same name, plus settings and agent-config
  • 51be242 Launcher Settings: Connect an AI agent, and the No AI switch

📊 Changes

18 files changed (+1360 additions, -302 deletions)

View changed files

📝 crates/horizon-client/src/bin/horizon-ctl/commands.rs (+3 -2)
📝 crates/horizon-client/src/bin/horizon-ctl/main.rs (+43 -1)
📝 crates/horizon-client/src/extras.rs (+7 -1)
📝 crates/horizon-client/src/game.rs (+7 -1)
📝 crates/horizon-core/src/lib.rs (+1 -0)
➕ crates/horizon-core/src/no_ai.rs (+97 -0)
📝 launcher/README.md (+27 -19)
➕ launcher/src/agents.rs (+214 -0)
➕ launcher/src/agents_page.rs (+240 -0)
📝 launcher/src/backend.rs (+13 -0)
📝 launcher/src/cli.rs (+183 -3)
➕ launcher/src/cli_tools.rs (+339 -0)
📝 launcher/src/game_tools.rs (+6 -6)
📝 launcher/src/lib.rs (+1 -0)
📝 launcher/src/main.rs (+8 -31)
📝 launcher/src/mcp.rs (+44 -226)
📝 tools/agent_control_e2e.py (+67 -5)
📝 tools/launcher_mcp_e2e.py (+60 -7)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Stacked on #1344 (launcher MCP), itself on #1342 (No AI). Built on main after #1269 (the redesign), in its look.

What

Settings gets an AI group and a Connect an AI agent section (brief agent-control-2, sections 4 and 5):

  • No AI switch (horizon_core::no_ai, the same switch the game reads and the CLI's no-ai): always shown, so it can be turned off again. While on, the Connect section is hidden too (the old "Use from the command line or AI agents" note is gone; the section replaces it).
  • Connect an AI agent (only while No AI is off):
    • a picker: Claude Code, Codex, Cursor, Any MCP client;
    • the ready-made config for that client (where it goes, the JSON or TOML) with a Copy button;
    • for Claude Code and Codex, their own add command (claude mcp add --scope user horizon -- <launcher> mcp, codex mcp add horizon -- <launcher> mcp), shown first, with Add to Claude Code / Add to Codex, which runs it only on that click, and Copy;
    • Test the connection: starts horizon-launcher mcp as a client would and says how many tools answered, then suggests asking the agent to say hello;
    • a link to the players' page (https://playhorizon.dev/docs/agents, in the docs PR).
  • The client's CLI is found on the PATH or in the folders installers use (~/.local/bin, /opt/homebrew/bin, npm's...), since a launcher started from the desktop gets a short PATH on macOS. When it is missing, the section says to copy the config instead.
  • horizon-launcher agent-config --test runs the same test from a terminal.

Tests

  • cargo clippy --features gpui/runtime_shaders --all-targets -- -D warnings, cargo test (launcher): ok.
  • tools/launcher_mcp_e2e.py: PASS, now also agent-config --test --json (134 tools answered).
  • Not click-tested and no screenshots yet: the Mac mini's session was locked the whole time (CGSSessionScreenIsLocked = 1), so screencapture only sees the lock screen, and the launcher has no offscreen mode. Screenshots dark and light are to be added once the session is unlocked.

Needs Ludovic

  • Unlock the Mac mini's session (or say to use the desktop's vscreen) so the section can be screenshotted and clicked through before merging.
  • "Add to Claude Code" uses --scope user (every project sees the server). Say if it should be the default (project) scope instead.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/1345 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/23/2026 **Status:** ✅ Merged **Merged:** 10/23/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/agent-connect-launcher` --- ### 📝 Commits (3) - [`b117930`](https://github.com/horizon-rust/horizon/commit/b117930ae493b00e4d1a8ef44555b449bddfa967) No AI: one switch that turns off agent control (socket, horizon-ctl, both MCP servers) - [`ef792ec`](https://github.com/horizon-rust/horizon/commit/ef792ec3b9c28bdc416d463b49fe8e751f3ebf59) Launcher MCP: every CLI command is a tool of the same name, plus settings and agent-config - [`51be242`](https://github.com/horizon-rust/horizon/commit/51be242af0394c620fbd3f142b5728c874e6af53) Launcher Settings: Connect an AI agent, and the No AI switch ### 📊 Changes **18 files changed** (+1360 additions, -302 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/bin/horizon-ctl/commands.rs` (+3 -2) 📝 `crates/horizon-client/src/bin/horizon-ctl/main.rs` (+43 -1) 📝 `crates/horizon-client/src/extras.rs` (+7 -1) 📝 `crates/horizon-client/src/game.rs` (+7 -1) 📝 `crates/horizon-core/src/lib.rs` (+1 -0) ➕ `crates/horizon-core/src/no_ai.rs` (+97 -0) 📝 `launcher/README.md` (+27 -19) ➕ `launcher/src/agents.rs` (+214 -0) ➕ `launcher/src/agents_page.rs` (+240 -0) 📝 `launcher/src/backend.rs` (+13 -0) 📝 `launcher/src/cli.rs` (+183 -3) ➕ `launcher/src/cli_tools.rs` (+339 -0) 📝 `launcher/src/game_tools.rs` (+6 -6) 📝 `launcher/src/lib.rs` (+1 -0) 📝 `launcher/src/main.rs` (+8 -31) 📝 `launcher/src/mcp.rs` (+44 -226) 📝 `tools/agent_control_e2e.py` (+67 -5) 📝 `tools/launcher_mcp_e2e.py` (+60 -7) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Stacked on #1344 (launcher MCP), itself on #1342 (No AI). Built on main after #1269 (the redesign), in its look. ## What Settings gets an **AI** group and a **Connect an AI agent** section (brief agent-control-2, sections 4 and 5): - **No AI** switch (`horizon_core::no_ai`, the same switch the game reads and the CLI's `no-ai`): always shown, so it can be turned off again. While on, the Connect section is hidden too (the old "Use from the command line or AI agents" note is gone; the section replaces it). - **Connect an AI agent** (only while No AI is off): - a picker: Claude Code, Codex, Cursor, Any MCP client; - the ready-made config for that client (where it goes, the JSON or TOML) with a **Copy** button; - for Claude Code and Codex, their own add command (`claude mcp add --scope user horizon -- <launcher> mcp`, `codex mcp add horizon -- <launcher> mcp`), shown first, with **Add to Claude Code** / **Add to Codex**, which runs it only on that click, and **Copy**; - **Test the connection**: starts `horizon-launcher mcp` as a client would and says how many tools answered, then suggests asking the agent to say hello; - a link to the players' page (https://playhorizon.dev/docs/agents, in the docs PR). - The client's CLI is found on the PATH or in the folders installers use (`~/.local/bin`, `/opt/homebrew/bin`, npm's...), since a launcher started from the desktop gets a short PATH on macOS. When it is missing, the section says to copy the config instead. - `horizon-launcher agent-config --test` runs the same test from a terminal. ## Tests - `cargo clippy --features gpui/runtime_shaders --all-targets -- -D warnings`, `cargo test` (launcher): ok. - `tools/launcher_mcp_e2e.py`: PASS, now also `agent-config --test --json` (134 tools answered). - **Not click-tested and no screenshots yet**: the Mac mini's session was locked the whole time (`CGSSessionScreenIsLocked` = 1), so `screencapture` only sees the lock screen, and the launcher has no offscreen mode. Screenshots dark and light are to be added once the session is unlocked. ## Needs Ludovic - Unlock the Mac mini's session (or say to use the desktop's vscreen) so the section can be screenshotted and clicked through before merging. - "Add to Claude Code" uses `--scope user` (every project sees the server). Say if it should be the default (project) scope instead. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:09:55 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#3490
No description provided.