/** * MCP Resource content for kOS connection documentation */ export declare const CONNECTION_GUIDE = "# kOS Connection Guide\n\n## Quick Start\n\nConnection is **automatic** - just call the tools you need:\n\n```\nset_target({ name: \"Mun\" })\nhohmann()\nexecute_node()\n```\n\nAll tools auto-connect to the first available kOS CPU. Use `cpuLabel` parameter on any tool to target a specific CPU.\n\n## Utility Tools\n\n### execute\nExecute a kOS command.\n\n**Parameters:**\n- `command`: kOS command to execute\n- `timeout` (optional): Timeout in milliseconds (default: 5000)\n\n**Returns:** `{ success: boolean, output: string, error?: string }`\n\n**Example:**\n```\nexecute(command: \"PRINT SHIP:ALTITUDE.\")\n\u2192 { success: true, output: \"123456.789\" }\n```\n\n### status\nGet current connection status.\n\n**Returns:** Connection state with cpuId, vessel name, tag, etc.\n\n### disconnect\nDisconnect from kOS.\n\n**Returns:** `{ disconnected: true }`\n\n## Troubleshooting\n\n### \"Not connected to kOS\"\n- Check that KSP is running with kOS mod loaded\n- Verify kOS telnet server is enabled on port 5410\n- Use `list_cpus()` to verify CPUs are available\n\n### Connection timeout\n- Ensure kOS telnet server is running\n- Try calling any tool again (auto-reconnects)\n"; export declare const CPU_MENU_FORMAT = "# kOS CPU Menu Format\n\nWhen connecting to the kOS telnet server on port 5410, you see a CPU selection menu:\n\n```\nConnected to the kOS Terminal Server.\nTerminal: type = INITIAL_UNSET, size = 80x24\n________________________________________________________________________________\n Menu GUI Other\n Pick Open Telnets Vessel Name (CPU tagname)\n ---- ---- ------- --------------------------------\n [1] no 0 stick 1 (RC-L01(guidance))\n [2] yes 1 probe 1 (RC-M01(flight))\n [3] no 0 probe 1 (RC-M02())\n--------------------------------------------------------------------------------\nChoose a CPU to attach to by typing a selection number and pressing\nreturn/enter. Or enter [Q] to quit terminal server.\n```\n\n## Format Breakdown\n\nEach CPU line follows this pattern:\n```\n[ID] GUI_OPEN TELNETS VESSEL_NAME (PART_NAME(TAG))\n```\n\n**Fields:**\n- `ID`: Numeric CPU identifier (e.g., 1, 2, 3)\n- `GUI_OPEN`: \"yes\" if kOS terminal GUI is open for this CPU, \"no\" otherwise\n- `TELNETS`: Number of active telnet connections to this CPU\n- `VESSEL_NAME`: Name of the vessel/craft this CPU is on\n- `PART_NAME`: kOS part name (e.g., RC-L01, RC-M01)\n- `TAG`: CPU tag/label set in KSP (can be empty)\n\n## Examples\n\n```\n[1] no 0 stick 1 (RC-L01(guidance))\n```\n- ID: 1\n- GUI not open\n- No active telnets\n- Vessel: \"stick 1\"\n- Part: \"RC-L01\"\n- Tag: \"guidance\"\n\n```\n[2] yes 1 probe 1 (RC-M01(flight))\n```\n- ID: 2\n- GUI is open\n- 1 active telnet connection\n- Vessel: \"probe 1\"\n- Part: \"RC-M01\"\n- Tag: \"flight\"\n\n```\n[3] no 0 probe 1 (RC-M02())\n```\n- ID: 3\n- GUI not open\n- No active telnets\n- Vessel: \"probe 1\"\n- Part: \"RC-M02\"\n- Tag: (empty/unnamed)\n\n## How ksp-mcp Uses This\n\nTools auto-connect and can target CPUs by:\n\n1. **CPU ID** (`cpuId`): Select by numeric ID (e.g., 1, 2, 3)\n2. **CPU Label** (`cpuLabel`): Search for matching tag (e.g., \"guidance\")\n\nThe `list_cpus` tool parses this menu and returns structured data:\n```typescript\n[\n {\n id: 1,\n vessel: \"stick 1\",\n partName: \"RC-L01\",\n tag: \"guidance\",\n guiOpen: false,\n telnets: 0\n },\n ...\n]\n```\n"; export declare const TRANSPORT_OPTIONS = "# Transport Options\n\nksp-mcp uses a transport abstraction layer to communicate with kOS telnet.\n\n## Why Transport Abstraction?\n\nThe telnet connection to kOS requires:\n- Session management (connect, disconnect)\n- CPU selection menu handling\n- Command execution with proper timing\n- Output buffering and parsing\n- ANSI escape sequence handling\n\nRather than expose this complexity, ksp-mcp provides high-level tools that handle it automatically.\n\n## Available Transports\n\n### 1. Socket Transport (Default)\n\n**Technology:** Node.js net.Socket (direct TCP)\n\n**Pros:**\n- Event-driven I/O (efficient)\n- Only receives new data (no re-processing)\n- No external dependencies (pure JavaScript)\n- Best for MCP integration\n- Cross-platform (macOS, Windows, Linux)\n- TCP keepalive for long operations\n\n**Cons:**\n- Can't attach for debugging\n\n**Usage:** Default for all tools.\n\n### 2. Tmux Transport\n\n**Technology:** tmux CLI (terminal multiplexer)\n\n**Pros:**\n- Can attach to session: `tmux attach -t kos`\n- Pure shell commands (no native modules)\n- Useful for debugging\n- Can see session in real-time\n\n**Cons:**\n- Polling-based (re-captures output)\n- Requires tmux binary installed\n- More overhead\n\n**Usage:** Set `transportType: \"tmux\"` on any tool.\n\n**Debugging:**\n```bash\n# In another terminal:\ntmux attach -t kos # See the kOS session live\n```\n\n## Manual tmux-mcp Usage (Advanced)\n\nIf you need direct tmux control via MCP tmux tools (`mcp__tmux__*`):\n\n**Why you might NOT want this:**\n- Much more complex (10+ steps vs 2 steps)\n- Requires manual timing and session management\n- Error-prone\n- ksp-mcp tools already handle this\n\n**But if you really need it:**\n```\n1. mcp__tmux__create-session(name: \"kos-debug\")\n2. mcp__tmux__list-panes() \u2192 get paneId\n3. mcp__tmux__execute-command(paneId, \"nc 127.0.0.1 5410\", rawMode: true)\n4. [Wait 1 second]\n5. mcp__tmux__capture-pane(paneId) \u2192 verify menu appeared\n6. mcp__tmux__execute-command(paneId, \"1\", noEnter: true)\n7. mcp__tmux__execute-command(paneId, \"C-m\", noEnter: true)\n8. [Wait 2 seconds]\n9. mcp__tmux__execute-command(paneId, \"PRINT ALTITUDE.\", noEnter: true)\n10. mcp__tmux__execute-command(paneId, \"C-m\", noEnter: true)\n11. [Wait 1 second]\n12. mcp__tmux__capture-pane(paneId) \u2192 read output\n```\n\nCompare to ksp-mcp approach:\n```\nexecute({ command: \"PRINT ALTITUDE.\" })\n```\n\n## Recommendation\n\n**Use ksp-mcp tools** - connection is automatic.\n\nOnly use manual tmux-mcp if:\n- You need to debug the transport layer itself\n- You're investigating timing/buffering issues\n- You want to see raw telnet interaction\n\nOtherwise, the high-level tools are simpler, more reliable, and easier to use.\n"; //# sourceMappingURL=content.d.ts.map