agentstudio 0.1.7 → 0.1.9
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.
- package/README.md +481 -37
- package/README.zh-CN.md +525 -0
- package/{dist → backend/dist}/bin/agentstudio.js +7 -5
- package/backend/dist/bin/agentstudio.js.map +1 -0
- package/backend/dist/index.d.ts +3 -0
- package/backend/dist/index.d.ts.map +1 -0
- package/{dist → backend/dist}/index.js +9 -28
- package/{dist → backend/dist}/index.js.map +1 -1
- package/{dist → backend/dist}/routes/agents.js +3 -3
- package/{dist → backend/dist}/routes/agents.js.map +1 -1
- package/{dist → backend/dist}/routes/projects.js +2 -2
- package/{dist → backend/dist}/routes/projects.js.map +1 -1
- package/{dist → backend/dist}/routes/sessions.js +1 -1
- package/{dist → backend/dist}/routes/sessions.js.map +1 -1
- package/{dist → backend/dist}/routes/settings.js +2 -2
- package/{dist → backend/dist}/routes/settings.js.map +1 -1
- package/package.json +30 -50
- package/.env +0 -15
- package/dist/bin/agentstudio.js.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +0 -1
- package/frontend/dist/assets/AgentsPage-Dqb_aqAA.js +0 -1
- package/frontend/dist/assets/ChatPage-BvQmXfcP.css +0 -1
- package/frontend/dist/assets/ChatPage-L8Paywyc.js +0 -91
- package/frontend/dist/assets/CommandForm-DLl7EIMS.js +0 -7
- package/frontend/dist/assets/CommandsPage-Bzavq0Ec.js +0 -1
- package/frontend/dist/assets/DashboardPage-B3o4AYFT.js +0 -15
- package/frontend/dist/assets/FileBrowser-DL3ayaqb.js +0 -1
- package/frontend/dist/assets/GeneralSettingsPage-CBN_de-V.js +0 -1
- package/frontend/dist/assets/LandingPage-Dl4ioKos.js +0 -1
- package/frontend/dist/assets/LoginPage-4QqRdiSi.js +0 -12
- package/frontend/dist/assets/McpPage-CY3tYiqj.js +0 -39
- package/frontend/dist/assets/MemorySettingsPage-DGxrok5K.js +0 -1
- package/frontend/dist/assets/ProjectSelector-hgmGYVFh.js +0 -1
- package/frontend/dist/assets/ProjectsPage-D399IM0c.js +0 -14
- package/frontend/dist/assets/SettingsLayout-CL_K-lzJ.js +0 -1
- package/frontend/dist/assets/SubagentForm-DXtTTIKg.js +0 -7
- package/frontend/dist/assets/SubagentsPage-Chbhj8p2.js +0 -1
- package/frontend/dist/assets/ToastTestPage-DT4wuN5C.js +0 -1
- package/frontend/dist/assets/UnifiedToolSelector-CsM9qBvs.js +0 -1
- package/frontend/dist/assets/VersionSettingsPage-74Q-LVgA.js +0 -5
- package/frontend/dist/assets/agents-ClAzIJTw.js +0 -1
- package/frontend/dist/assets/agents-DwCY2K8p.css +0 -1
- package/frontend/dist/assets/authFetch-BATQyPG5.js +0 -1
- package/frontend/dist/assets/data-structures-DLJedtzx.js +0 -27
- package/frontend/dist/assets/dateFormat-CXa8VnEC.js +0 -1
- package/frontend/dist/assets/index-B9YHa7XT.css +0 -1
- package/frontend/dist/assets/index-B_CTNvca.js +0 -268
- package/frontend/dist/assets/monaco-editor-C7Z4sOhS.js +0 -19
- package/frontend/dist/assets/syntax-highlighting-YWvMU4Hm.js +0 -24
- package/frontend/dist/assets/tabManager-DV8urRBM.js +0 -30
- package/frontend/dist/assets/table-D6q1rytw.js +0 -1
- package/frontend/dist/assets/tools-C4EPanYi.js +0 -1
- package/frontend/dist/assets/ui-components-Cw21Epuw.js +0 -481
- package/frontend/dist/assets/useAgents-DwnOE1_k.js +0 -2
- package/frontend/dist/assets/useClaudeVersions-CQdGnCqv.js +0 -1
- package/frontend/dist/assets/useCommands-CCVaurbt.js +0 -1
- package/frontend/dist/cc-studio.png +0 -0
- package/frontend/dist/index.html +0 -70
- package/frontend/dist/vite.svg +0 -1
- package/shared/index.d.ts +0 -6
- package/shared/index.d.ts.map +0 -1
- package/shared/index.js +0 -7
- package/shared/types/agents.d.ts +0 -80
- package/shared/types/agents.d.ts.map +0 -1
- package/shared/types/agents.js +0 -145
- package/shared/types/claude-history.d.ts +0 -61
- package/shared/types/claude-history.d.ts.map +0 -1
- package/shared/types/claude-history.js +0 -2
- package/shared/types/claude-versions.d.ts +0 -40
- package/shared/types/claude-versions.d.ts.map +0 -1
- package/shared/types/claude-versions.js +0 -1
- package/shared/types/commands.d.ts +0 -48
- package/shared/types/commands.d.ts.map +0 -1
- package/shared/types/commands.js +0 -19
- package/shared/types/projects.d.ts +0 -35
- package/shared/types/projects.d.ts.map +0 -1
- package/shared/types/projects.js +0 -2
- package/shared/types/subagents.d.ts +0 -26
- package/shared/types/subagents.d.ts.map +0 -1
- package/shared/types/subagents.js +0 -1
- package/shared/utils/agentStorage.d.ts +0 -27
- package/shared/utils/agentStorage.d.ts.map +0 -1
- package/shared/utils/agentStorage.js +0 -392
- package/shared/utils/claudeVersionStorage.d.ts +0 -16
- package/shared/utils/claudeVersionStorage.d.ts.map +0 -1
- package/shared/utils/claudeVersionStorage.js +0 -230
- package/shared/utils/projectMetadataStorage.d.ts +0 -94
- package/shared/utils/projectMetadataStorage.d.ts.map +0 -1
- package/shared/utils/projectMetadataStorage.js +0 -422
- package/shared/utils/toolMapping.d.ts +0 -56
- package/shared/utils/toolMapping.d.ts.map +0 -1
- package/shared/utils/toolMapping.js +0 -71
- package/tsconfig.json +0 -27
- /package/{dist → backend/dist}/bin/agentstudio.d.ts +0 -0
- /package/{dist → backend/dist}/bin/agentstudio.d.ts.map +0 -0
- /package/{dist → backend/dist}/middleware/auth.d.ts +0 -0
- /package/{dist → backend/dist}/middleware/auth.d.ts.map +0 -0
- /package/{dist → backend/dist}/middleware/auth.js +0 -0
- /package/{dist → backend/dist}/middleware/auth.js.map +0 -0
- /package/{dist → backend/dist}/routes/agents.d.ts +0 -0
- /package/{dist → backend/dist}/routes/agents.d.ts.map +0 -0
- /package/{dist → backend/dist}/routes/auth.d.ts +0 -0
- /package/{dist → backend/dist}/routes/auth.d.ts.map +0 -0
- /package/{dist → backend/dist}/routes/auth.js +0 -0
- /package/{dist → backend/dist}/routes/auth.js.map +0 -0
- /package/{dist → backend/dist}/routes/commands.d.ts +0 -0
- /package/{dist → backend/dist}/routes/commands.d.ts.map +0 -0
- /package/{dist → backend/dist}/routes/commands.js +0 -0
- /package/{dist → backend/dist}/routes/commands.js.map +0 -0
- /package/{dist → backend/dist}/routes/files.d.ts +0 -0
- /package/{dist → backend/dist}/routes/files.d.ts.map +0 -0
- /package/{dist → backend/dist}/routes/files.js +0 -0
- /package/{dist → backend/dist}/routes/files.js.map +0 -0
- /package/{dist → backend/dist}/routes/mcp.d.ts +0 -0
- /package/{dist → backend/dist}/routes/mcp.d.ts.map +0 -0
- /package/{dist → backend/dist}/routes/mcp.js +0 -0
- /package/{dist → backend/dist}/routes/mcp.js.map +0 -0
- /package/{dist → backend/dist}/routes/media.d.ts +0 -0
- /package/{dist → backend/dist}/routes/media.d.ts.map +0 -0
- /package/{dist → backend/dist}/routes/media.js +0 -0
- /package/{dist → backend/dist}/routes/media.js.map +0 -0
- /package/{dist → backend/dist}/routes/projects.d.ts +0 -0
- /package/{dist → backend/dist}/routes/projects.d.ts.map +0 -0
- /package/{dist → backend/dist}/routes/sessions.d.ts +0 -0
- /package/{dist → backend/dist}/routes/sessions.d.ts.map +0 -0
- /package/{dist → backend/dist}/routes/settings.d.ts +0 -0
- /package/{dist → backend/dist}/routes/settings.d.ts.map +0 -0
- /package/{dist → backend/dist}/routes/slides.d.ts +0 -0
- /package/{dist → backend/dist}/routes/slides.d.ts.map +0 -0
- /package/{dist → backend/dist}/routes/slides.js +0 -0
- /package/{dist → backend/dist}/routes/slides.js.map +0 -0
- /package/{dist → backend/dist}/routes/subagents.d.ts +0 -0
- /package/{dist → backend/dist}/routes/subagents.d.ts.map +0 -0
- /package/{dist → backend/dist}/routes/subagents.js +0 -0
- /package/{dist → backend/dist}/routes/subagents.js.map +0 -0
- /package/{dist → backend/dist}/services/claudeSession.d.ts +0 -0
- /package/{dist → backend/dist}/services/claudeSession.d.ts.map +0 -0
- /package/{dist → backend/dist}/services/claudeSession.js +0 -0
- /package/{dist → backend/dist}/services/claudeSession.js.map +0 -0
- /package/{dist → backend/dist}/services/messageQueue.d.ts +0 -0
- /package/{dist → backend/dist}/services/messageQueue.d.ts.map +0 -0
- /package/{dist → backend/dist}/services/messageQueue.js +0 -0
- /package/{dist → backend/dist}/services/messageQueue.js.map +0 -0
- /package/{dist → backend/dist}/services/sessionManager.d.ts +0 -0
- /package/{dist → backend/dist}/services/sessionManager.d.ts.map +0 -0
- /package/{dist → backend/dist}/services/sessionManager.js +0 -0
- /package/{dist → backend/dist}/services/sessionManager.js.map +0 -0
- /package/{dist → backend/dist}/utils/jwt.d.ts +0 -0
- /package/{dist → backend/dist}/utils/jwt.d.ts.map +0 -0
- /package/{dist → backend/dist}/utils/jwt.js +0 -0
- /package/{dist → backend/dist}/utils/jwt.js.map +0 -0
package/README.md
CHANGED
|
@@ -1,83 +1,527 @@
|
|
|
1
1
|
# AgentStudio
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<div align="center">
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
**A Claude Code-powered Personal Agent Workspace Platform**
|
|
8
|
+
|
|
9
|
+
[](https://choosealicense.com/licenses/mit/)
|
|
10
|
+
[](https://github.com/git-men/agentstudio/stargazers)
|
|
11
|
+
[](https://github.com/git-men/agentstudio/issues)
|
|
12
|
+
|
|
13
|
+
[English](README.md) | [中文](README.zh-CN.md)
|
|
14
|
+
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## English
|
|
20
|
+
|
|
21
|
+
### Overview
|
|
22
|
+
|
|
23
|
+
AgentStudio is a modern, web-based personal agent workspace platform built on top of Claude Code SDK. It extends Claude Code's capabilities with a professional web interface, making AI-powered development accessible to everyone.
|
|
24
|
+
|
|
25
|
+
### ✨ Key Features
|
|
26
|
+
|
|
27
|
+
#### 🎨 **Modern Web Interface**
|
|
28
|
+
- Professional, intuitive web UI designed for both developers and general users
|
|
29
|
+
- Real-time streaming responses for immediate feedback
|
|
30
|
+
- Split-panel layout with chat interface and live preview
|
|
31
|
+
- Responsive design optimized for desktop and mobile
|
|
32
|
+
|
|
33
|
+
#### 🤖 **Multi-LLM Support**
|
|
34
|
+
- **Claude Integration**: Built on Claude Code SDK with full API support
|
|
35
|
+
- **Multiple Providers**: Support for OpenAI, GLM, DeepSeek, and other popular LLMs
|
|
36
|
+
- **Flexible Configuration**: Easy switching between different AI models
|
|
37
|
+
- **Streaming Input**: Real-time response streaming for better user experience
|
|
38
|
+
|
|
39
|
+
#### 🛠️ **Advanced Agent System**
|
|
40
|
+
- **Built-in Agents**: PPT Editor, Code Assistant, Document Writer
|
|
41
|
+
- **Custom Agents**: Create and configure your own specialized agents
|
|
42
|
+
- **Subagents**: User-defined AI agents with custom system prompts
|
|
43
|
+
- **Agent Marketplace**: Extensible agent development framework
|
|
44
|
+
- **Message-level Tool Customization**: Fine-grained control over agent capabilities
|
|
45
|
+
|
|
46
|
+
#### 📁 **Integrated File Management**
|
|
47
|
+
- **Built-in File Browser**: Navigate and manage project files seamlessly
|
|
48
|
+
- **File Content Viewer**: Preview and edit files directly in the interface
|
|
49
|
+
- **Project-aware Operations**: Context-sensitive file operations
|
|
50
|
+
- **Version Control Integration**: Git-aware file management
|
|
51
|
+
|
|
52
|
+
#### 🎯 **Specialized Tools**
|
|
53
|
+
- **Slide Agent**: Create and edit presentations with AI assistance
|
|
54
|
+
- **Code Explorer**: Navigate codebases with intelligent search
|
|
55
|
+
- **Document Outline**: Structured document editing and management
|
|
56
|
+
- **Image Upload**: Support for visual content analysis
|
|
57
|
+
- **Tool Renderer**: Dynamic visualization of tool usage and results
|
|
58
|
+
|
|
59
|
+
#### 🔧 **Developer-Friendly**
|
|
60
|
+
- **TypeScript Throughout**: Full type safety for better development experience
|
|
61
|
+
- **Modern Stack**: React 18, Vite, TailwindCSS, Zustand
|
|
62
|
+
- **Testing Suite**: Comprehensive test coverage with Vitest
|
|
63
|
+
- **Hot Reload**: Fast development with instant code updates
|
|
64
|
+
|
|
65
|
+
#### 🌐 **Deployment Ready**
|
|
66
|
+
- **Local Development**: Easy setup for development environments
|
|
67
|
+
- **One-Click Installation**: Simplified deployment for end users
|
|
68
|
+
- **Production Builds**: Optimized builds for performance
|
|
69
|
+
- **Cross-Platform**: Support for Linux, macOS, and Windows
|
|
70
|
+
|
|
71
|
+
### 🚀 Quick Start
|
|
72
|
+
|
|
73
|
+
#### 🐳 Docker Deployment (Recommended for Quick Testing)
|
|
74
|
+
|
|
75
|
+
**One-Command Setup:**
|
|
6
76
|
|
|
7
77
|
```bash
|
|
8
|
-
|
|
78
|
+
# Build and run with docker-compose
|
|
79
|
+
docker build -t agentstudio:latest .
|
|
80
|
+
docker-compose up -d
|
|
9
81
|
```
|
|
10
82
|
|
|
11
|
-
|
|
83
|
+
Then open http://localhost in your browser.
|
|
12
84
|
|
|
13
|
-
|
|
85
|
+
**What you get:**
|
|
86
|
+
- ✅ **All-in-One Container**: Frontend + Backend in a single container
|
|
87
|
+
- ✅ **Data Persistence**: Automatic data backup via Docker volumes
|
|
88
|
+
- ✅ **Zero Configuration**: Works out of the box
|
|
89
|
+
- ✅ **Easy Updates**: Simple rebuild and restart
|
|
90
|
+
|
|
91
|
+
📖 **Full Documentation:**
|
|
92
|
+
- [Docker Deployment Guide](DOCKER.md) - Detailed setup and configuration
|
|
93
|
+
- [Quick Start Guide](QUICKSTART.md) - Step-by-step tutorial with examples
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
#### For End Users (One-Click Installation)
|
|
98
|
+
|
|
99
|
+
**🐧 Linux & 🍎 macOS - User Installation (Recommended - No sudo required)**
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
# Install Agent Studio backend in user space
|
|
103
|
+
curl -fsSL https://raw.githubusercontent.com/git-men/agentstudio/main/scripts/remote-install.sh | bash
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
The installer will:
|
|
107
|
+
- ✅ **Auto-detect and install Node.js 18+** (via system package manager or NVM)
|
|
108
|
+
- ✅ **Auto-install pnpm** for faster package management (optional)
|
|
109
|
+
- ✅ **Handle all dependencies** automatically
|
|
110
|
+
- ✅ **Support all major Linux distributions** (Ubuntu, CentOS, Fedora, Arch, etc.)
|
|
111
|
+
- ✅ **Work with both root and regular users**
|
|
112
|
+
|
|
113
|
+
The installer will ask if you want to start the backend immediately. If you choose not to start now, you can start it later:
|
|
14
114
|
|
|
15
115
|
```bash
|
|
16
|
-
|
|
116
|
+
# Start the backend
|
|
117
|
+
~/.agent-studio/start.sh
|
|
118
|
+
|
|
119
|
+
# Stop the backend
|
|
120
|
+
~/.agent-studio/stop.sh
|
|
17
121
|
```
|
|
18
122
|
|
|
19
|
-
|
|
123
|
+
**🪟 Windows - PowerShell Installation**
|
|
124
|
+
|
|
125
|
+
```powershell
|
|
126
|
+
# Run as Administrator in PowerShell
|
|
127
|
+
PowerShell -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/git-men/agentstudio/main/scripts/windows-install.ps1'))"
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
The Windows installer will:
|
|
131
|
+
- ✅ **Auto-install Node.js** (via Chocolatey, winget, or direct download)
|
|
132
|
+
- ✅ **Auto-install Git** if not available
|
|
133
|
+
- ✅ **Handle all dependencies** automatically
|
|
134
|
+
- ✅ **Create start/stop batch scripts**
|
|
135
|
+
|
|
136
|
+
**Windows Alternative - Simple Batch Script**
|
|
137
|
+
If you already have Node.js and Git installed:
|
|
138
|
+
|
|
139
|
+
```batch
|
|
140
|
+
# Download and run the simple installer
|
|
141
|
+
curl -o windows-install-simple.bat https://raw.githubusercontent.com/git-men/agentstudio/main/scripts/windows-install-simple.bat
|
|
142
|
+
windows-install-simple.bat
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
**Access the application:**
|
|
146
|
+
1. Open your browser and visit: **https://agentstudio-frontend.vercel.app/**
|
|
147
|
+
2. In the web interface, go to **Settings → API Configuration**
|
|
148
|
+
3. Enter your backend URL: `http://localhost:4936`
|
|
149
|
+
4. Click "Test Connection" to verify
|
|
150
|
+
|
|
151
|
+
**Option 2: System Service Installation (Requires sudo)**
|
|
152
|
+
|
|
153
|
+
For production deployments with automatic startup on boot:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
# Install as system service with auto-start
|
|
157
|
+
curl -fsSL https://raw.githubusercontent.com/git-men/agentstudio/main/scripts/remote-install.sh | sudo bash
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
After installation, manage the service:
|
|
161
|
+
```bash
|
|
162
|
+
agent-studio start # Start the service
|
|
163
|
+
agent-studio stop # Stop the service
|
|
164
|
+
agent-studio restart # Restart the service
|
|
165
|
+
agent-studio status # Check service status
|
|
166
|
+
agent-studio logs # View logs
|
|
167
|
+
agent-studio config # Edit configuration
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Then access the web interface at **https://agentstudio-frontend.vercel.app/** and configure the backend URL in Settings.
|
|
171
|
+
|
|
172
|
+
#### For Developers (Development Setup)
|
|
173
|
+
|
|
174
|
+
**Prerequisites:**
|
|
175
|
+
- Node.js 18+
|
|
176
|
+
- pnpm (recommended) or npm
|
|
177
|
+
- Git
|
|
178
|
+
|
|
179
|
+
**Installation:**
|
|
180
|
+
```bash
|
|
181
|
+
# Clone the repository
|
|
182
|
+
git clone https://github.com/git-men/agentstudio.git
|
|
183
|
+
cd agentstudio
|
|
184
|
+
|
|
185
|
+
# Install dependencies
|
|
186
|
+
pnpm install
|
|
187
|
+
|
|
188
|
+
# Start development servers (both frontend and backend)
|
|
189
|
+
pnpm run dev
|
|
190
|
+
|
|
191
|
+
# Or start them separately
|
|
192
|
+
pnpm run dev:frontend # Frontend only (port 3000)
|
|
193
|
+
pnpm run dev:backend # Backend only (port 4936)
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
**Build for production:**
|
|
197
|
+
```bash
|
|
198
|
+
pnpm run build
|
|
199
|
+
pnpm start
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### 📁 Project Structure
|
|
203
|
+
|
|
204
|
+
```
|
|
205
|
+
agentstudio/
|
|
206
|
+
├── frontend/ # React frontend application
|
|
207
|
+
│ ├── src/
|
|
208
|
+
│ │ ├── components/ # Reusable UI components
|
|
209
|
+
│ │ ├── pages/ # Page components
|
|
210
|
+
│ │ ├── agents/ # Agent-specific components
|
|
211
|
+
│ │ ├── hooks/ # React hooks and data fetching
|
|
212
|
+
│ │ └── stores/ # State management (Zustand)
|
|
213
|
+
│ └── public/ # Static assets
|
|
214
|
+
├── backend/ # Node.js backend server
|
|
215
|
+
│ ├── src/
|
|
216
|
+
│ │ ├── routes/ # API endpoints
|
|
217
|
+
│ │ ├── services/ # Business logic
|
|
218
|
+
│ │ └── index.ts # Server entry point
|
|
219
|
+
│ └── dist/ # Built backend code
|
|
220
|
+
├── shared/ # Shared types and utilities
|
|
221
|
+
└── scripts/ # Installation and deployment scripts
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### ⚙️ Configuration
|
|
225
|
+
|
|
226
|
+
#### Environment Variables
|
|
227
|
+
|
|
228
|
+
**For Development:**
|
|
229
|
+
Create a `.env` file in the `backend/` directory:
|
|
20
230
|
|
|
21
231
|
```env
|
|
22
|
-
# AI Provider (choose one)
|
|
23
|
-
OPENAI_API_KEY=your_openai_api_key_here
|
|
232
|
+
# AI Provider Configuration (choose one or more)
|
|
24
233
|
ANTHROPIC_API_KEY=your_anthropic_api_key_here
|
|
234
|
+
OPENAI_API_KEY=your_openai_api_key_here
|
|
25
235
|
|
|
26
236
|
# Server Configuration
|
|
27
237
|
PORT=4936
|
|
28
|
-
NODE_ENV=
|
|
238
|
+
NODE_ENV=development
|
|
29
239
|
|
|
30
240
|
# File System
|
|
31
|
-
SLIDES_DIR
|
|
241
|
+
SLIDES_DIR=../slides
|
|
32
242
|
|
|
33
|
-
# CORS Configuration (
|
|
34
|
-
CORS_ORIGINS=https://your-frontend
|
|
243
|
+
# CORS Configuration (for production)
|
|
244
|
+
CORS_ORIGINS=https://your-frontend-domain.com
|
|
35
245
|
```
|
|
36
246
|
|
|
37
|
-
|
|
247
|
+
**For System Service Installation:**
|
|
248
|
+
Edit the configuration file at `/etc/agent-studio/config.env`:
|
|
38
249
|
|
|
39
250
|
```bash
|
|
40
|
-
|
|
251
|
+
# Edit configuration
|
|
252
|
+
agent-studio config
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
Configuration options:
|
|
256
|
+
```env
|
|
257
|
+
# Server configuration
|
|
258
|
+
NODE_ENV=production
|
|
259
|
+
PORT=4936
|
|
260
|
+
SLIDES_DIR=/opt/slides
|
|
261
|
+
|
|
262
|
+
# Optional: AI provider keys (configure if needed)
|
|
263
|
+
# ANTHROPIC_API_KEY=your_anthropic_api_key_here
|
|
264
|
+
# OPENAI_API_KEY=your_openai_api_key_here
|
|
265
|
+
|
|
266
|
+
# Optional: CORS configuration for custom frontends
|
|
267
|
+
# CORS_ORIGINS=https://your-frontend.vercel.app,https://custom-domain.com
|
|
41
268
|
```
|
|
42
269
|
|
|
43
|
-
|
|
270
|
+
#### API Configuration
|
|
44
271
|
|
|
45
|
-
|
|
272
|
+
The frontend is hosted at **https://agentstudio-frontend.vercel.app/** and can connect to different backend instances:
|
|
46
273
|
|
|
47
|
-
|
|
274
|
+
**For Local Backend:**
|
|
275
|
+
1. Open **Settings → API Configuration** in the web interface
|
|
276
|
+
2. Enter: `http://localhost:4936` (or your custom port)
|
|
277
|
+
3. Click "Test Connection" to verify
|
|
48
278
|
|
|
279
|
+
**For Remote Backend:**
|
|
280
|
+
1. Deploy your backend to a server with a public IP or domain
|
|
281
|
+
2. Configure the backend URL in Settings (e.g., `https://your-backend.com`)
|
|
282
|
+
3. Ensure CORS is properly configured in your backend's `.env` file
|
|
283
|
+
|
|
284
|
+
### 📋 Service Management
|
|
285
|
+
|
|
286
|
+
#### System Service Commands (when installed with sudo)
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
# Basic service operations
|
|
290
|
+
agent-studio start # Start the service
|
|
291
|
+
agent-studio stop # Stop the service
|
|
292
|
+
agent-studio restart # Restart the service
|
|
293
|
+
agent-studio status # Check service status
|
|
294
|
+
|
|
295
|
+
# Monitoring and logs
|
|
296
|
+
agent-studio logs # View real-time logs
|
|
297
|
+
agent-studio health # Check service health
|
|
298
|
+
|
|
299
|
+
# Configuration
|
|
300
|
+
agent-studio config # Edit configuration file
|
|
301
|
+
|
|
302
|
+
# Service details
|
|
303
|
+
agent-studio uninstall # Remove the service
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
#### Service Details
|
|
307
|
+
|
|
308
|
+
**Installation Directories:**
|
|
309
|
+
|
|
310
|
+
For user installation (no sudo):
|
|
311
|
+
- Application: `~/.agent-studio`
|
|
312
|
+
- Configuration: `~/.agent-studio-config/config.env`
|
|
313
|
+
- Logs: `~/.agent-studio-logs/`
|
|
314
|
+
- Slides: `~/slides`
|
|
315
|
+
- Start script: `~/.agent-studio/start.sh`
|
|
316
|
+
- Stop script: `~/.agent-studio/stop.sh`
|
|
317
|
+
|
|
318
|
+
For system service installation (with sudo):
|
|
319
|
+
- Application: `~/.agent-studio`
|
|
320
|
+
- Configuration: `~/.agent-studio-config/config.env`
|
|
321
|
+
- Logs: `~/.agent-studio-logs/`
|
|
322
|
+
- Slides: `~/slides`
|
|
323
|
+
|
|
324
|
+
**Log Files:**
|
|
325
|
+
- Output log: `/var/log/agent-studio/output.log`
|
|
326
|
+
- Error log: `/var/log/agent-studio/error.log`
|
|
327
|
+
- Log rotation: Daily (30 days retention)
|
|
328
|
+
|
|
329
|
+
**Service Integration:**
|
|
330
|
+
- Linux: systemd service (`/etc/systemd/system/agent-studio.service`)
|
|
331
|
+
- macOS: launchd service (`/Library/LaunchDaemons/com.agent-studio.backend.plist`)
|
|
332
|
+
- Auto-start on boot enabled by default
|
|
333
|
+
|
|
334
|
+
### 🔧 Troubleshooting
|
|
335
|
+
|
|
336
|
+
#### Installation Issues
|
|
337
|
+
|
|
338
|
+
**Node.js Installation Problems:**
|
|
339
|
+
The installer automatically handles Node.js installation, but if you encounter issues:
|
|
340
|
+
|
|
341
|
+
```bash
|
|
342
|
+
# For Linux/macOS - Manual Node.js installation via NVM
|
|
343
|
+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
|
|
344
|
+
source ~/.bashrc
|
|
345
|
+
nvm install --lts
|
|
346
|
+
nvm use --lts
|
|
347
|
+
|
|
348
|
+
# For Windows - Download from official website
|
|
349
|
+
# Visit: https://nodejs.org/
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
**Ubuntu/Debian Specific Issues:**
|
|
353
|
+
- **Root User Detection**: Fixed in latest installer - now properly supports both root and regular users
|
|
354
|
+
- **TTY Issues**: Installer sets `CI=true` to handle non-interactive environments
|
|
355
|
+
- **Build Failures**: Installer automatically retries with dev dependencies
|
|
356
|
+
|
|
357
|
+
**Windows Installation Issues:**
|
|
358
|
+
- **PowerShell Execution Policy**: Run `Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser`
|
|
359
|
+
- **Missing Dependencies**: Installer will prompt to install Node.js, Git, and other requirements
|
|
360
|
+
- **Permission Issues**: Run PowerShell as Administrator for system-wide installations
|
|
361
|
+
|
|
362
|
+
#### Service Won't Start
|
|
363
|
+
|
|
364
|
+
**For User Installation:**
|
|
365
|
+
```bash
|
|
366
|
+
# Check if backend is running
|
|
367
|
+
curl http://localhost:4936/api/health
|
|
368
|
+
|
|
369
|
+
# View logs
|
|
370
|
+
cat ~/.agent-studio-logs/output.log
|
|
371
|
+
cat ~/.agent-studio-logs/error.log
|
|
372
|
+
|
|
373
|
+
# Restart backend
|
|
374
|
+
~/.agent-studio/stop.sh
|
|
375
|
+
~/.agent-studio/start.sh
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
**For System Service Installation:**
|
|
379
|
+
```bash
|
|
380
|
+
# Check service status
|
|
381
|
+
agent-studio status
|
|
382
|
+
|
|
383
|
+
# View logs for errors
|
|
384
|
+
agent-studio logs
|
|
385
|
+
|
|
386
|
+
# Verify configuration
|
|
387
|
+
agent-studio config
|
|
388
|
+
|
|
389
|
+
# Check if port is available
|
|
390
|
+
lsof -i :4936
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
#### Common Issues
|
|
394
|
+
|
|
395
|
+
**Permission Errors (User Installation):**
|
|
396
|
+
```bash
|
|
397
|
+
# Fix script permissions
|
|
398
|
+
chmod +x ~/.agent-studio/start.sh
|
|
399
|
+
chmod +x ~/.agent-studio/stop.sh
|
|
400
|
+
|
|
401
|
+
# Fix directory permissions
|
|
402
|
+
chmod -R 755 ~/.agent-studio
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
**Permission Errors (System Service):**
|
|
406
|
+
```bash
|
|
407
|
+
sudo chown -R agent-studio:agent-studio /opt/agent-studio
|
|
408
|
+
sudo chown -R agent-studio:agent-studio /var/log/agent-studio
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
**Port Already in Use:**
|
|
412
|
+
```bash
|
|
413
|
+
# Find process using the port
|
|
414
|
+
lsof -i :4936
|
|
415
|
+
|
|
416
|
+
# Kill the process (replace PID with actual process ID)
|
|
417
|
+
kill -9 <PID>
|
|
418
|
+
|
|
419
|
+
# Or change port in configuration
|
|
420
|
+
# Edit ~/.agent-studio-config/config.env and change PORT=8080
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
**Build Failures:**
|
|
424
|
+
The installer now automatically handles build failures by:
|
|
425
|
+
1. Installing dev dependencies
|
|
426
|
+
2. Retrying the build
|
|
427
|
+
3. Falling back to development mode if build still fails
|
|
428
|
+
|
|
429
|
+
**Health Check:**
|
|
49
430
|
```bash
|
|
50
|
-
|
|
431
|
+
# For user installation
|
|
432
|
+
curl http://localhost:4936/api/health
|
|
433
|
+
|
|
434
|
+
# For system service
|
|
435
|
+
agent-studio health
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
**Windows Specific Issues:**
|
|
439
|
+
```batch
|
|
440
|
+
REM Check if Node.js is available
|
|
441
|
+
node --version
|
|
442
|
+
|
|
443
|
+
REM Check if backend is running
|
|
444
|
+
curl http://localhost:4936/api/health
|
|
445
|
+
|
|
446
|
+
REM Start backend manually
|
|
447
|
+
cd %USERPROFILE%\.agent-studio
|
|
448
|
+
start.bat
|
|
449
|
+
|
|
450
|
+
REM Stop backend
|
|
451
|
+
stop.bat
|
|
51
452
|
```
|
|
52
453
|
|
|
53
|
-
###
|
|
454
|
+
### 📦 Updates
|
|
455
|
+
|
|
456
|
+
To update an existing installation:
|
|
54
457
|
|
|
55
458
|
```bash
|
|
56
|
-
|
|
459
|
+
# Stop the service
|
|
460
|
+
agent-studio stop
|
|
461
|
+
|
|
462
|
+
# Update the code
|
|
463
|
+
cd /opt/agent-studio
|
|
464
|
+
git pull
|
|
465
|
+
pnpm install
|
|
466
|
+
pnpm run build:backend
|
|
467
|
+
|
|
468
|
+
# Start the service
|
|
469
|
+
agent-studio start
|
|
57
470
|
```
|
|
58
471
|
|
|
59
|
-
###
|
|
472
|
+
### 🧪 Testing
|
|
60
473
|
|
|
61
474
|
```bash
|
|
62
|
-
|
|
475
|
+
# Run all tests
|
|
476
|
+
pnpm test
|
|
477
|
+
|
|
478
|
+
# Run frontend tests only
|
|
479
|
+
cd frontend && pnpm test
|
|
480
|
+
|
|
481
|
+
# Run tests with coverage
|
|
482
|
+
cd frontend && pnpm run test:coverage
|
|
483
|
+
|
|
484
|
+
# Run tests with UI
|
|
485
|
+
cd frontend && pnpm run test:ui
|
|
63
486
|
```
|
|
64
487
|
|
|
65
|
-
|
|
488
|
+
### 🛡️ Security
|
|
489
|
+
|
|
490
|
+
- **API Key Protection**: Environment-based API key management
|
|
491
|
+
- **CORS Configuration**: Configurable cross-origin policies
|
|
492
|
+
- **Input Validation**: Comprehensive input sanitization
|
|
493
|
+
- **Secure File Operations**: Sandboxed file system access
|
|
494
|
+
|
|
495
|
+
### 🤝 Contributing
|
|
496
|
+
|
|
497
|
+
We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details.
|
|
498
|
+
|
|
499
|
+
1. Fork the repository
|
|
500
|
+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
|
|
501
|
+
3. Commit your changes (`git commit -m 'Add amazing feature'`)
|
|
502
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
503
|
+
5. Open a Pull Request
|
|
504
|
+
|
|
505
|
+
### 📄 License
|
|
506
|
+
|
|
507
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
508
|
+
|
|
509
|
+
### 🙏 Acknowledgments
|
|
510
|
+
|
|
511
|
+
- Built on top of [Claude Code SDK](https://claude.ai/code)
|
|
512
|
+
- Inspired by modern development workflows
|
|
513
|
+
- Community feedback and contributions
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
## Links
|
|
66
517
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
- `PUT /api/slides/:index` - Update slide content
|
|
518
|
+
| link | type | service | description |
|
|
519
|
+
|:---|:---|:---|:---|
|
|
520
|
+
| **[ctok.ai](https://ctok.ai/)** | 🤝 community | <small>✅ Claude Code<br>✅ Codex CLI</small> | Claude Code / Codex CLI carpool service. |
|
|
71
521
|
|
|
72
|
-
## Environment Variables
|
|
73
522
|
|
|
74
|
-
|
|
75
|
-
- `NODE_ENV` - Environment (development/production)
|
|
76
|
-
- `SLIDES_DIR` - Directory for slide files
|
|
77
|
-
- `OPENAI_API_KEY` - OpenAI API key
|
|
78
|
-
- `ANTHROPIC_API_KEY` - Anthropic API key
|
|
79
|
-
- `CORS_ORIGINS` - Allowed CORS origins
|
|
523
|
+
## 中文文档
|
|
80
524
|
|
|
81
|
-
|
|
525
|
+
请查看 [README.zh-CN.md](README.zh-CN.md) 获取中文文档。
|
|
82
526
|
|
|
83
|
-
|
|
527
|
+
---
|