Repository navigation
feat(cockpit): desktop agents and Codex via cockpit mcp (part B of #243) - #253
Closed
Mystic0112 wants to merge 3 commits into
Closed
Mystic0112 wants to merge 3 commits into
Mystic0112 wants to merge 3 commits into
Conversation
… files (jacobaraujo7#243) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…#243) Part B of jacobaraujo7#243 (split from jacobaraujo7#245 at the maintainer's request; builds on the agents-graph PR). - `cockpit mcp --agent <app>`: stdio MCP server (send, peers, wait_messages max 55s, list_agents). Desktop apps (Claude Desktop, Cursor, Antigravity IDE, Codex/ChatGPT) join the graph as external nodes with a queued inbox. - New agent dialog: Desktop apps row; adds only the `cockpit` MCP entry to the app's config after explicit consent, with a 0600 backup. - Removal/undo: node menu and Settings > Automations remove only the `cockpit` entry (JSON/TOML), backup first; Codex opt-out setting so the hook installer stops re-adding it. - Codex in terminal tabs talks through the same MCP server (its sandbox blocks the shell CLI). Identity by process ancestry, env hint, or an explicit `from` + per-tab `from_token` (Codex 0.162 uses a shared daemon). - Status socket hardening: ~/.cockpit 0700 and the socket 0600 before listen; the no-env fallback is the same socket COCKPIT_STATUS_SOCK names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
|
Closing per the scope decision in #245. The Pi hook, the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part B of #243. It depends on #245 (part A), so the first two commits here are #245's. Review only the last commit,
f4137166, or this diff after #245 merges. It brings the new surface the reviewer wanted reviewed separately.What's in it
cockpit mcp --agent <claude-desktop|cursor|antigravity-ide|codex-desktop>: a stdio MCP server withsend,peers,wait_messages(long-poll, max 55s, below Claude Desktop's request timeout) andlist_agents.wait_messages. A presence ping shows the node as online or offline. They can be maestro, have colors and take part in links.mcpServers.cockpit(JSON) or[mcp_servers.cockpit](TOML), leaving the rest byte-identical.COCKPIT_*and blocks the socket (Operation not permitted), and MCP servers run outside that sandbox. The tab is identified by:fromplusfrom_token.Review feedback addressed
fromimpersonation. Every Codex intro carries a random 128-bit per-tabfrom_token. Each new intro rotates it, and closing the tab drops it. The app rejectsfromwithout a matching token, using a constant-time compare. The documented residual risk: a local process that can read that tab's terminal (e.g.cockpit read-tab) could learn the token. That's out of scope for a single-user app.Socket fallback permissions. Before, the socket followed the process umask. With umask 0002,
~/.cockpitwas 0775 and the socketsrwxrwxr-x, so group members could connect and other users could not. Now~/.cockpitis set to 0700 before bind and the socket to 0600 beforelisten, for both flavors, with a POSIX test. The no-env fallback (~/.cockpit/status[-debug].sock) is the same socketCOCKPIT_STATUS_SOCKalready points at. On Windows, the documentedstatus.jsonlives in the user profile (owner/SYSTEM/admins).Remove/undo path. Both places write a backup first and never restore an old backup over newer user edits:
Removal deletes only the
cockpitentry (JSON entry, or the TOML table plus sub-tables). Codex is a special case: terminal Codex also needs the entry, so removing it turns off the newcodexMcpIntegrationsetting and the hook installer stops re-adding it at boot. The confirmation text explains this.Testing
flutter analyzereports no issues.cargo test: 55 + 39 passed.main.send) and Antigravity (cockpit msg), exchanged messages in both directions.🤖 Generated with Claude Code