tide-commander 0.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +364 -0
  3. package/dist/assets/characters/Textures/colormap.png +0 -0
  4. package/dist/assets/characters/character-female-a.glb +0 -0
  5. package/dist/assets/characters/character-female-b.glb +0 -0
  6. package/dist/assets/characters/character-female-c.glb +0 -0
  7. package/dist/assets/characters/character-female-d.glb +0 -0
  8. package/dist/assets/characters/character-female-e.glb +0 -0
  9. package/dist/assets/characters/character-female-f.glb +0 -0
  10. package/dist/assets/characters/character-male-a-processed.gltf +11862 -0
  11. package/dist/assets/characters/character-male-a.glb +0 -0
  12. package/dist/assets/characters/character-male-b.glb +0 -0
  13. package/dist/assets/characters/character-male-c.glb +0 -0
  14. package/dist/assets/characters/character-male-d.glb +0 -0
  15. package/dist/assets/characters/character-male-e.glb +0 -0
  16. package/dist/assets/characters/character-male-f.glb +0 -0
  17. package/dist/assets/icons/icon-192.png +0 -0
  18. package/dist/assets/icons/icon-512.png +0 -0
  19. package/dist/assets/landing-Cc0MDBAK.css +1 -0
  20. package/dist/assets/main-BIpLsrUu.css +1 -0
  21. package/dist/assets/main-DMTRw3br.js +276 -0
  22. package/dist/assets/textures/concrete_floor_worn_001_diff_1k.jpg +0 -0
  23. package/dist/assets/textures/logo-blanco.png +0 -0
  24. package/dist/assets/vendor-react-uS-d4TUT.js +17 -0
  25. package/dist/assets/vendor-three-4iQNXcoo.js +3828 -0
  26. package/dist/assets/web-BZdi2lG9.js +1 -0
  27. package/dist/assets/web-yHsOO1Qb.js +1 -0
  28. package/dist/index.html +38 -0
  29. package/dist/manifest.json +39 -0
  30. package/dist/src/packages/landing/index.html +463 -0
  31. package/dist/src/packages/server/app.js +87 -0
  32. package/dist/src/packages/server/auth/index.js +121 -0
  33. package/dist/src/packages/server/claude/backend.js +578 -0
  34. package/dist/src/packages/server/claude/index.js +8 -0
  35. package/dist/src/packages/server/claude/runner/internal-events.js +22 -0
  36. package/dist/src/packages/server/claude/runner/process-lifecycle.js +208 -0
  37. package/dist/src/packages/server/claude/runner/recovery-store.js +72 -0
  38. package/dist/src/packages/server/claude/runner/resource-monitor.js +51 -0
  39. package/dist/src/packages/server/claude/runner/restart-policy.js +69 -0
  40. package/dist/src/packages/server/claude/runner/stdout-pipeline.js +153 -0
  41. package/dist/src/packages/server/claude/runner/watchdog.js +114 -0
  42. package/dist/src/packages/server/claude/runner.js +310 -0
  43. package/dist/src/packages/server/claude/session-loader.js +898 -0
  44. package/dist/src/packages/server/claude/types.js +5 -0
  45. package/dist/src/packages/server/cli.js +113 -0
  46. package/dist/src/packages/server/codex/backend.js +119 -0
  47. package/dist/src/packages/server/codex/index.js +2 -0
  48. package/dist/src/packages/server/codex/json-event-parser.js +612 -0
  49. package/dist/src/packages/server/data/builtin-skills/bitbucket-pr.js +298 -0
  50. package/dist/src/packages/server/data/builtin-skills/full-notifications.js +49 -0
  51. package/dist/src/packages/server/data/builtin-skills/git-captain.js +304 -0
  52. package/dist/src/packages/server/data/builtin-skills/index.js +61 -0
  53. package/dist/src/packages/server/data/builtin-skills/pm2-logs.js +354 -0
  54. package/dist/src/packages/server/data/builtin-skills/send-message-to-agent.js +51 -0
  55. package/dist/src/packages/server/data/builtin-skills/server-logs.js +124 -0
  56. package/dist/src/packages/server/data/builtin-skills/streaming-exec.js +94 -0
  57. package/dist/src/packages/server/data/builtin-skills/types.js +4 -0
  58. package/dist/src/packages/server/data/builtin-skills.js +6 -0
  59. package/dist/src/packages/server/data/index.js +890 -0
  60. package/dist/src/packages/server/data/snapshots.js +371 -0
  61. package/dist/src/packages/server/index.js +96 -0
  62. package/dist/src/packages/server/prompts/tide-commander.js +13 -0
  63. package/dist/src/packages/server/routes/agents.js +406 -0
  64. package/dist/src/packages/server/routes/config.js +347 -0
  65. package/dist/src/packages/server/routes/custom-models.js +170 -0
  66. package/dist/src/packages/server/routes/exec.js +269 -0
  67. package/dist/src/packages/server/routes/files.js +995 -0
  68. package/dist/src/packages/server/routes/index.js +38 -0
  69. package/dist/src/packages/server/routes/notifications.js +81 -0
  70. package/dist/src/packages/server/routes/permissions.js +115 -0
  71. package/dist/src/packages/server/routes/snapshots.js +224 -0
  72. package/dist/src/packages/server/routes/stt.js +99 -0
  73. package/dist/src/packages/server/routes/tts.js +166 -0
  74. package/dist/src/packages/server/routes/voice-assistant.js +310 -0
  75. package/dist/src/packages/server/runtime/claude-runtime-provider.js +10 -0
  76. package/dist/src/packages/server/runtime/codex-runtime-provider.js +11 -0
  77. package/dist/src/packages/server/runtime/index.js +2 -0
  78. package/dist/src/packages/server/runtime/types.js +6 -0
  79. package/dist/src/packages/server/services/agent-lifecycle-service.js +82 -0
  80. package/dist/src/packages/server/services/agent-service.js +410 -0
  81. package/dist/src/packages/server/services/boss-message-service.js +430 -0
  82. package/dist/src/packages/server/services/boss-service.js +553 -0
  83. package/dist/src/packages/server/services/building-service.js +867 -0
  84. package/dist/src/packages/server/services/claude-service.js +5 -0
  85. package/dist/src/packages/server/services/custom-class-service.js +323 -0
  86. package/dist/src/packages/server/services/database-service.js +914 -0
  87. package/dist/src/packages/server/services/docker-service.js +865 -0
  88. package/dist/src/packages/server/services/fileTracker.js +242 -0
  89. package/dist/src/packages/server/services/index.js +21 -0
  90. package/dist/src/packages/server/services/permission-service.js +258 -0
  91. package/dist/src/packages/server/services/pm2-service.js +435 -0
  92. package/dist/src/packages/server/services/runtime-command-execution.js +168 -0
  93. package/dist/src/packages/server/services/runtime-events.js +357 -0
  94. package/dist/src/packages/server/services/runtime-service.js +308 -0
  95. package/dist/src/packages/server/services/runtime-status-sync.js +104 -0
  96. package/dist/src/packages/server/services/runtime-subagents.js +50 -0
  97. package/dist/src/packages/server/services/runtime-watchdog.js +74 -0
  98. package/dist/src/packages/server/services/secrets-service.js +206 -0
  99. package/dist/src/packages/server/services/skill-service.js +508 -0
  100. package/dist/src/packages/server/services/subordinate-context-service.js +223 -0
  101. package/dist/src/packages/server/services/supervisor-claude.js +132 -0
  102. package/dist/src/packages/server/services/supervisor-prompts.js +80 -0
  103. package/dist/src/packages/server/services/supervisor-service.js +659 -0
  104. package/dist/src/packages/server/services/work-plan-service.js +476 -0
  105. package/dist/src/packages/server/setup.js +86 -0
  106. package/dist/src/packages/server/utils/index.js +4 -0
  107. package/dist/src/packages/server/utils/logger.js +302 -0
  108. package/dist/src/packages/server/utils/string.js +39 -0
  109. package/dist/src/packages/server/utils/tool-formatting.js +139 -0
  110. package/dist/src/packages/server/utils/unicode.js +46 -0
  111. package/dist/src/packages/server/websocket/handler.js +290 -0
  112. package/dist/src/packages/server/websocket/handlers/agent-handler.js +515 -0
  113. package/dist/src/packages/server/websocket/handlers/boss-handler.js +116 -0
  114. package/dist/src/packages/server/websocket/handlers/boss-response-handler.js +250 -0
  115. package/dist/src/packages/server/websocket/handlers/building-handler.js +298 -0
  116. package/dist/src/packages/server/websocket/handlers/command-handler.js +217 -0
  117. package/dist/src/packages/server/websocket/handlers/custom-class-handler.js +68 -0
  118. package/dist/src/packages/server/websocket/handlers/database-handler.js +223 -0
  119. package/dist/src/packages/server/websocket/handlers/notification-handler.js +25 -0
  120. package/dist/src/packages/server/websocket/handlers/permission-handler.js +21 -0
  121. package/dist/src/packages/server/websocket/handlers/secrets-handler.js +61 -0
  122. package/dist/src/packages/server/websocket/handlers/skill-handler.js +148 -0
  123. package/dist/src/packages/server/websocket/handlers/supervisor-handler.js +44 -0
  124. package/dist/src/packages/server/websocket/handlers/sync-handler.js +19 -0
  125. package/dist/src/packages/server/websocket/handlers/types.js +4 -0
  126. package/dist/src/packages/server/websocket/listeners/boss-listeners.js +21 -0
  127. package/dist/src/packages/server/websocket/listeners/index.js +32 -0
  128. package/dist/src/packages/server/websocket/listeners/permission-listeners.js +19 -0
  129. package/dist/src/packages/server/websocket/listeners/runtime-listeners.js +196 -0
  130. package/dist/src/packages/server/websocket/listeners/skill-listeners.js +51 -0
  131. package/dist/src/packages/server/websocket/listeners/supervisor-listeners.js +37 -0
  132. package/dist/src/packages/shared/agent-types.js +54 -0
  133. package/dist/src/packages/shared/building-types.js +43 -0
  134. package/dist/src/packages/shared/common-types.js +1 -0
  135. package/dist/src/packages/shared/database-types.js +8 -0
  136. package/dist/src/packages/shared/types/snapshot.js +7 -0
  137. package/dist/src/packages/shared/types.js +12 -0
  138. package/dist/src/packages/shared/websocket-messages.js +1 -0
  139. package/dist/sw.js +37 -0
  140. package/package.json +90 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 David Alcalá
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,364 @@
1
+ # 🌊 Tide Commander
2
+
3
+ **A visual multi-agent orchestrator for Claude Code and Codex**
4
+
5
+ ![Tide Commander Preview](docs/preview-3d.png)
6
+
7
+ ![2D View](docs/preview-2d.png)
8
+
9
+ [![Watch the demo](https://img.shields.io/badge/YouTube-Watch%20Demo-red?style=for-the-badge&logo=youtube)](https://www.youtube.com/watch?v=r1Op_xfhqOM)
10
+
11
+ Tide Commander is a Claude Code and Codex orchestrator and manager that lets you deploy, control, and monitor multiple AI coding agents from a single visual interface. Spawn agents, assign tasks, and watch them work in real-time on an RTS-inspired 3D battlefield — or switch to a lightweight 2D canvas or a metrics dashboard.
12
+
13
+ ## 💡 Why Tide Commander?
14
+
15
+ Managing multiple Claude Code terminals at the same time is painful. Tide Commander replaces that mess with a single visual UI where you can see every agent, their status, and their output at a glance.
16
+
17
+ Despite looking like a game, Tide Commander is a full-featured Claude Code GUI packed with developer tools: built-in file explorer with git diffs, conversation history with tool formatting, permission controls, and a command palette. For many workflows, an IDE becomes almost unnecessary.
18
+
19
+ Think of it like having a team of AI developers at your command. Assign one agent to investigate a bug while another implements a feature. Watch them work in real-time, send follow-up commands, and keep your project moving forward on multiple fronts.
20
+
21
+ ## 📋 Prerequisites
22
+
23
+ - Node.js 18+ or Bun
24
+ - Claude Code CLI (`claude` command available in PATH)
25
+ - OpenAI Codex CLI compatibility (experimental)
26
+
27
+ ## 🚀 Getting Started
28
+
29
+ ```bash
30
+ # Install dependencies
31
+ bun install
32
+
33
+ # Start the application
34
+ bun run dev
35
+ ```
36
+
37
+ Open http://localhost:5173 in your browser (or your configured `VITE_PORT`) and you're ready to go!
38
+
39
+ ## 📦 Global npm Install
40
+
41
+ ```bash
42
+ npm i -g tide-commander
43
+ tide-commander
44
+ ```
45
+
46
+ CLI flags:
47
+
48
+ ```bash
49
+ tide-commander --port 8080 --host 0.0.0.0
50
+ # or
51
+ tide-commander --listen-all --port 8080
52
+ ```
53
+
54
+ ## 🎖️ Agent Concepts
55
+
56
+ Tide Commander introduces several powerful concepts for orchestrating your AI agents:
57
+
58
+ ### Boss
59
+ The boss agent has context of other agents assigned to him. The boss can delegate tasks. Imagine you have a single boss to talk with, and the boss decides which of the subordinate agents is the most capable of doing the requested task. This saves a lot of time, without having to know which Claude Code terminal has which context. The boss can also give you a summary of the progress of their workers.
60
+
61
+ ### Supervisor
62
+ Like god, the supervisor sees everything on the field, knows when an agent finished, and generates a summary of their last task, appending it to a global, centralized panel.
63
+
64
+ ### Group Areas
65
+ Help to organize agents in projects and find them quickly. Areas can have assigned folders, enabling the file explorer on those added folders. Completed or inactive areas can be **archived** to hide them from the battlefield without deleting them - they can be restored at any time.
66
+
67
+ ### Buildings
68
+ 3D models placed on the battlefield with real functionality. Building types include:
69
+ - **Server** - Start/stop/restart services with real-time log streaming (supports PM2 and Docker)
70
+ - **Database** - Connect to MySQL, PostgreSQL, or Oracle with a built-in SQL query editor, schema browser, and query history
71
+ - **Docker** - Manage containers and compose projects with health checks and port detection
72
+ - **Link** - Quick URL shortcuts accessible from the field
73
+ - **Folder** - Opens the file explorer for a specific directory
74
+ - **Boss Building** - Manages multiple subordinate buildings with unified controls
75
+
76
+ ### Classes
77
+ Like COD or Minecraft classes, you assign a class to the agent character. It has a linked model, a definition of instructions (like a claude.md), and a definition of skills (you can also create skills on the same interface).
78
+
79
+ Built-in classes include Scout, Builder, Debugger, Architect, Warrior, Support, and Boss. You can also create **custom classes** with your own 3D models, instructions, and default skills.
80
+
81
+ ### Custom 3D Models
82
+ You can upload your own 3D character models in **GLB format**. Custom models support animation mapping for idle, walk, and working states. Models are uploaded through the class editor and stored locally. Scaling and position offsets are configurable per model.
83
+
84
+ ### Commander View
85
+ A view where you can see all the Claude Code agent terminals on a single view, grouped by areas.
86
+
87
+ ### Skills
88
+ Built-in and custom skills that extend what agents can do. Skills are like plugins with defined tool permissions and can be assigned to specific agents or classes. Built-in skills include notifications, inter-agent messaging, git workflows, server log access, and streaming command execution. You can create your own skills in TypeScript.
89
+
90
+ ### Snapshots
91
+ Save the full conversation history and any created/modified files from an agent's session. Snapshots can be reviewed later with full tool formatting, and files can be restored from them.
92
+
93
+ ### Secrets
94
+ Securely store API keys, tokens, and other credentials. Use `{{SECRET_NAME}}` placeholders in your prompts, and the server injects the real values before sending to Claude. Secrets never leave the server.
95
+
96
+ ### View Modes
97
+ Three ways to view the battlefield (cycle with Alt+2):
98
+ - **3D View** - Full Three.js battlefield with character models and post-processing (default)
99
+ - **2D View** - Lightweight canvas-based rendering for better performance
100
+ - **Dashboard** - Agent status cards, building overview, and metrics
101
+
102
+ ### Spotlight Search
103
+ Press **Ctrl+K** (or Alt+P) to open the command palette. Search for agents by name, class, or current task. Jump to areas, find modified files across all agents, or trigger quick actions.
104
+
105
+ ## ✨ Features
106
+
107
+ AI coding orchestration and multi-agent management features:
108
+
109
+ - 🎮 **3D Battlefield** - Visual command center with Three.js (also has a lightweight 2D canvas mode)
110
+ - 🎯 **RTS Controls** - Click to select, right-click to move, number keys for quick selection
111
+ - 📡 **Real-time Activity Feed** - Watch your agents work in real-time
112
+ - 🤹 **Multi-Agent Management** - Spawn and control multiple Claude/Codex instances simultaneously
113
+ - 💾 **Session Persistence** - Agents resume their Claude Code or Codex sessions across restarts
114
+ - 📊 **Context Tracking** - Mana bar visualization showing agent context usage
115
+ - 📁 **File Explorer** - Built-in file browser with git diff viewer for uncommitted changes
116
+ - 📋 **Large Text & Screenshot Paste** - Compact and send large content easily
117
+ - ⌨️ **Custom Hotkeys** - Configurable keyboard shortcuts
118
+ - 🔐 **Permission Control** - Permissionless or permission-enabled per agent
119
+ - 🎬 **Custom 3D Models** - Upload your own GLB models with animation mapping
120
+ - 🏗️ **Buildings** - Servers, databases, Docker containers, and links managed from the battlefield
121
+ - 🧩 **Skills System** - Built-in and custom skills assignable to agents or classes
122
+ - 📸 **Snapshots** - Save conversation history and modified files for later review or restore
123
+ - 🔑 **Secrets Management** - Secure storage with `{{PLACEHOLDER}}` injection into prompts
124
+ - 🔍 **Spotlight Search** - Command palette (Ctrl+K) to find agents, files, and actions
125
+ - 📺 **Commander View** - See all agent terminals at once in a grid, grouped by area
126
+ - 📊 **Dashboard View** - Agent status cards, building overview, and metrics
127
+ - 🖥️ **Guake Terminal** - Drop-down terminal overlay for agent conversations
128
+ - 🌐 **Multiplayer** - WebSocket-based multi-user support
129
+ - 📱 **Mobile Compatible** - Works on mobile devices and Android (optional APK)
130
+
131
+ ## 📚 Documentation
132
+
133
+ Detailed guides for each feature are available in the [`docs/`](docs/) folder:
134
+
135
+ | Topic | Description |
136
+ |-------|-------------|
137
+ | [Buildings](docs/buildings.md) | Server, Database, Docker, and Boss building types with PM2 integration |
138
+ | [Custom Classes & 3D Models](docs/custom-classes.md) | Create custom agent classes with your own GLB models and animations |
139
+ | [Skills](docs/skills.md) | Built-in and custom skills, tool permissions, and assignment |
140
+ | [Snapshots](docs/snapshots.md) | Save and restore conversation history and file artifacts |
141
+ | [Secrets](docs/secrets.md) | Secure credential storage with placeholder injection |
142
+ | [Architecture](docs/architecture.md) | Runtime architecture, command flow, and incremental improvements |
143
+ | [Views & UI](docs/views.md) | 3D, 2D, Dashboard, Commander View, Guake terminal, and Spotlight |
144
+ | [Android APK](docs/android.md) | Build and install the optional mobile companion app |
145
+ | [Docker Deployment](docs/docker.md) | Run Tide Commander in a Docker container |
146
+ | [Contributing](CONTRIBUTING.md) | Setup, workflow, and pull request guidelines for contributors |
147
+ | [Security Policy](SECURITY.md) | Supported versions, vulnerability reporting, and disclosure process |
148
+
149
+ ## 🎮 How to Use
150
+
151
+ 1. **Deploy an agent** - Click the **+ New Agent** button ➕
152
+ 2. **Configure it** - Give it a name and choose a working directory 📁
153
+ 3. **Select it** - Click on the agent in the 3D view or press 1-9 👆
154
+ 4. **Send commands** - Type your task in the command bar and press Enter ⌨️
155
+ 5. **Watch it work** - The activity feed shows real-time progress 👀
156
+ 6. **Send follow-ups** - Agents maintain context, so you can have ongoing conversations 💬
157
+
158
+ You can spawn multiple agents, each working in different directories or on different tasks. Switch between them by clicking or using number keys.
159
+
160
+ ## ⌨️ Keyboard Shortcuts
161
+
162
+ | Key | Action |
163
+ |-----|--------|
164
+ | 1-9 | Select agent by index |
165
+ | Escape | Deselect / Close modal |
166
+ | Alt+N | Spawn new agent |
167
+ | Enter | Send command (when input focused) |
168
+ | Ctrl+K / Alt+P | Spotlight search |
169
+ | Alt+2 | Cycle view mode (3D / 2D / Dashboard) |
170
+ | Alt+S | Toggle sidebar |
171
+ | Alt+R | Toggle right panel |
172
+ | Alt+E | Toggle file explorer |
173
+ | Alt+J / Alt+K | Navigate messages in terminal |
174
+ | ` (backtick) | Toggle Guake terminal |
175
+
176
+ Shortcuts are fully customizable in Settings.
177
+
178
+ ## 🔧 How It Works
179
+
180
+ ### Overview
181
+
182
+ Tide Commander is a Claude Code and Codex-compatible orchestrator that provides a visual interface for managing multiple AI coding CLI instances simultaneously. Each "agent" you spawn is a real CLI process running in the background, and you can send commands to them and watch their output in real-time.
183
+
184
+ ### Core Components
185
+
186
+ **🖥️ Frontend (React + Three.js)**
187
+ - 3D battlefield where agents are visualized as characters
188
+ - WebSocket connection to receive real-time updates
189
+ - Command input for sending tasks to agents
190
+ - Activity feed showing what each agent is doing
191
+
192
+ **⚙️ Backend (Node.js + Express)**
193
+ - REST API for agent CRUD operations
194
+ - WebSocket server for real-time event streaming
195
+ - Process manager that spawns and controls Claude and Codex CLI instances
196
+
197
+ **🤖 CLI Integration (Claude + Codex)**
198
+ - Claude agents run `claude` with `--output-format stream-json` and use stdin for follow-up messages
199
+ - Codex agents run `codex exec --json` and resume via session-based command args
200
+ - Events (tool usage, text output, errors) are parsed from stdout for both providers
201
+ - Sessions are persisted and can be resumed
202
+
203
+ ### Architecture
204
+
205
+ For Mermaid diagrams and deeper design notes, see [`docs/architecture.md`](docs/architecture.md).
206
+
207
+ ![System Architecture](docs/system-architecture.png)
208
+
209
+ ### Data Storage
210
+
211
+ **Server State** is saved to `~/.local/share/tide-commander/`:
212
+ - `agents.json` - Agent configurations (name, position, session mapping, token usage)
213
+ - `areas.json` - Drawing areas synced from the frontend
214
+ - `buildings.json` - Building configurations and service definitions
215
+ - `skills.json` - Custom skill definitions
216
+ - `custom-agent-classes.json` - Custom agent class definitions
217
+ - `secrets.json` - Encrypted secrets storage
218
+ - `supervisor-history.json` - Agent supervisor history
219
+ - `snapshots/` - Saved conversation snapshots with file captures
220
+
221
+ **Custom Models** are stored in `~/.tide-commander/custom-models/`
222
+
223
+ **Claude Conversations** are read from `~/.claude/projects/`:
224
+ - Claude Code stores session files as JSONL (one JSON object per line)
225
+ - Directory names encode the working directory path (e.g., `/home/user/project` → `-home-user-project`)
226
+ - Tide Commander reads these to resume sessions and display conversation history
227
+
228
+ ## 🔐 Permission Modes
229
+
230
+ Agents can operate in two permission modes:
231
+
232
+ ### Bypass Mode (Default)
233
+ Agents run with `--dangerously-skip-permissions`, allowing them to execute any tool (Bash, Edit, Write, etc.) without asking for approval. This is ideal for trusted, autonomous work.
234
+
235
+ ### Interactive Mode
236
+ Agents require user approval for potentially dangerous operations. This mode uses a hook-based system:
237
+
238
+ #### Safe Tools (Auto-Approved)
239
+ These read-only tools are automatically approved without prompting:
240
+ - `Read`, `Glob`, `Grep` - File reading and searching
241
+ - `Task`, `TaskOutput` - Agent task management
242
+ - `WebFetch`, `WebSearch` - Web content fetching
243
+ - `TodoWrite` - Task list management
244
+ - `AskUserQuestion` - User interaction
245
+ - `EnterPlanMode`, `ExitPlanMode`, `Skill` - Planning tools
246
+
247
+ #### Dangerous Tools (Require Approval)
248
+ These tools prompt for user permission:
249
+ - `Bash` - Shell command execution
250
+ - `Edit`, `Write` - File modifications
251
+ - `NotebookEdit` - Jupyter notebook edits
252
+
253
+ #### Remembered Patterns
254
+ When approving a permission request, you can check "Remember this" to auto-approve similar future requests:
255
+ - **File operations**: Remembers the directory (e.g., approving `/project/src/file.ts` remembers `/project/src/`)
256
+ - **Bash commands**: Remembers the command prefix (e.g., approving `npm test` remembers `npm`)
257
+
258
+ Remembered patterns are stored in `~/.tide-commander/remembered-permissions.json` and can be cleared via the API or by deleting the file.
259
+
260
+ #### Setting Permission Mode
261
+ When spawning an agent, select the permission mode in the spawn dialog. You can also change it later by editing the agent configuration.
262
+
263
+ ## ⚙️ Configuration
264
+
265
+ Configuration via environment variables (see `.env.example`):
266
+
267
+ | Variable | Default | Description |
268
+ |----------|---------|-------------|
269
+ | `PORT` | 5174 | Backend server port |
270
+ | `HOST` | `127.0.0.1` | Backend bind host |
271
+ | `VITE_PORT` | 5173 | Vite dev server port |
272
+ | `TIDE_SERVER` | `http://localhost:$PORT` | Server URL for hooks |
273
+ | `LISTEN_ALL_INTERFACES` | _(unset)_ | Set to `1` to listen on 0.0.0.0 instead of localhost |
274
+ | `AUTH_TOKEN` | _(unset)_ | Token for authenticating WebSocket and HTTP connections |
275
+
276
+ ## 🛠️ Development
277
+
278
+ ```bash
279
+ # Run client only
280
+ bun run dev:client
281
+
282
+ # Run server only
283
+ bun run dev:server
284
+
285
+ # Run both concurrently
286
+ bun run dev
287
+
288
+ # Build for production
289
+ bun run build
290
+ ```
291
+
292
+ ## 🐳 Docker
293
+
294
+ ```bash
295
+ docker build -t tide-commander .
296
+ docker run -p 5174:5174 \
297
+ -v ~/.local/share/tide-commander:/root/.local/share/tide-commander \
298
+ tide-commander
299
+ ```
300
+
301
+ > Note: The Docker container still needs `claude` CLI accessible inside the container for agent processes to work.
302
+
303
+ ## 📱 Android APK (Optional)
304
+
305
+ Tide Commander can be built as an Android app using Capacitor. The APK connects to your Tide Commander server over the local network, giving you a mobile remote control for your agents.
306
+
307
+ **Prerequisites:** Android SDK and Java 17+
308
+
309
+ ```bash
310
+ # Build debug APK
311
+ make apk
312
+
313
+ # Or build release APK
314
+ make apk-release
315
+ ```
316
+
317
+ The APK will be at `android/app/build/outputs/apk/debug/app-debug.apk`.
318
+
319
+ To configure which server the app connects to, set `LISTEN_ALL_INTERFACES=1` on your server and update the server URL in the app settings.
320
+
321
+ ## 🐛 Troubleshooting
322
+
323
+ **Agent stuck in "working" status**
324
+ - The Claude process may have died unexpectedly
325
+ - Refresh the page - status sync runs on reconnect
326
+ - Check server logs for errors
327
+
328
+ **"Claude Code CLI not found"**
329
+ - Ensure `claude` is in your PATH
330
+ - Run `which claude` to verify installation
331
+
332
+ **WebSocket disconnects**
333
+ - Check that the server is running (default port 5174, or your configured `PORT`)
334
+ - Look for CORS or firewall issues
335
+
336
+ ## 💬 Community
337
+
338
+ Join the Discord to chat, share feedback, report bugs, or request features:
339
+
340
+ [![Discord](https://img.shields.io/badge/Discord-Join%20Server-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/MymXXDCvf)
341
+
342
+ ## 🗺️ Roadmap
343
+
344
+ Planned features and improvements — contributions and feedback welcome:
345
+
346
+ - [ ] **Test Coverage** — Unit, integration, and E2E tests (currently minimal)
347
+ - [ ] **Multilingual Support** — i18n with translations for Chinese, French, Spanish, and more
348
+ - [x] **Codex Integration (Experimental)** — Compatible with OpenAI Codex CLI alongside Claude Code
349
+ - [ ] **Buildings Plugin System** — External plugin API for community-built building types
350
+ - [ ] **API Documentation** — OpenAPI/Swagger spec for the REST and WebSocket APIs
351
+ - [ ] **Observability** — Error tracking, logging aggregation, and performance monitoring
352
+
353
+ Have a feature idea or found a bug? Open an [issue](https://github.com/your-repo/tide-commander/issues) or drop it in the [Discord](https://discord.gg/MymXXDCvf).
354
+
355
+ ## 📄 License
356
+
357
+ MIT
358
+
359
+ Added line.
360
+ This line was added as requested.
361
+
362
+ Line added.
363
+
364
+ Added a line.