File tree Expand file tree Collapse file tree 3 files changed +24
-51
lines changed Expand file tree Collapse file tree 3 files changed +24
-51
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -16,6 +16,11 @@ class ClientManager {
1616 }
1717
1818 this . loadAllClients ( ) ;
19+
20+ // Auto-generate default client if no clients exist (for AUTOMATED_MODE)
21+ if ( this . clients . size === 0 ) {
22+ this . autoGenerateDefaultClient ( ) ;
23+ }
1924 }
2025
2126 /**
@@ -150,6 +155,25 @@ class ClientManager {
150155 return { clientId, yamlPath } ;
151156 }
152157
158+ /**
159+ * Auto-generate a default client configuration (for AUTOMATED_MODE)
160+ */
161+ autoGenerateDefaultClient ( ) {
162+ logger . info ( 'No client configurations found. Auto-generating default client for AUTOMATED_MODE...' ) ;
163+
164+ const clientId = uuidv4 ( ) ;
165+ const clientName = 'DevTools Client' ;
166+
167+ try {
168+ const result = this . createClientWithId ( clientId , clientName , null ) ;
169+ logger . info ( `✅ Auto-generated client configuration: ${ clientId } ` ) ;
170+ return result ;
171+ } catch ( error ) {
172+ logger . error ( 'Failed to auto-generate default client:' , error ) ;
173+ throw error ;
174+ }
175+ }
176+
153177 /**
154178 * Reload a specific client's configuration
155179 */
Original file line number Diff line number Diff line change @@ -83,10 +83,6 @@ COPY --from=builder /workspace/devtools/devtools-frontend/out/Default/gen/front_
8383# Copy agent-server from builder stage
8484COPY --from=agent-server-builder /workspace/agent-server /opt/agent-server
8585
86- # Copy client initialization script
87- COPY agent-server/nodejs/init-client.sh /opt/agent-server/init-client.sh
88- RUN chmod +x /opt/agent-server/init-client.sh
89-
9086# Copy nginx config
9187COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
9288
@@ -95,10 +91,6 @@ RUN cat > /usr/local/bin/start-services.sh <<'EOFSCRIPT'
9591# !/bin/bash
9692set -e
9793
98- # Initialize client configuration if needed
99- echo "Initializing client configuration..."
100- /opt/agent-server/init-client.sh
101-
10294# Start nginx in background
10395echo "Starting nginx..."
10496nginx -g "daemon off;" &
You can’t perform that action at this time.
0 commit comments