opc-agent 4.0.14 → 4.0.15

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.
@@ -342,6 +342,18 @@ class AgentRuntime {
342
342
  this.logger.info('Scheduler started');
343
343
  }
344
344
  this.logger.info('Agent started');
345
+ // Auto-start Studio UI
346
+ try {
347
+ const { StudioServer } = require('../studio/server');
348
+ const studioPort = 4000;
349
+ const studio = new StudioServer({ port: studioPort, agentDir: process.cwd() });
350
+ await studio.start();
351
+ this.logger.info(`Studio UI ready → http://localhost:${studioPort}`);
352
+ console.log(` Studio: http://localhost:${studioPort}`);
353
+ }
354
+ catch (e) {
355
+ this.logger.debug('Studio UI not available: ' + (e?.message || ''));
356
+ }
345
357
  }
346
358
  async stop() {
347
359
  if (!this.agent)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opc-agent",
3
- "version": "4.0.14",
3
+ "version": "4.0.15",
4
4
  "description": "Open Agent Framework — Build, test, and run AI Agents for business workstations",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -320,6 +320,18 @@ export class AgentRuntime {
320
320
  this.logger.info('Scheduler started');
321
321
  }
322
322
  this.logger.info('Agent started');
323
+
324
+ // Auto-start Studio UI
325
+ try {
326
+ const { StudioServer } = require('../studio/server');
327
+ const studioPort = 4000;
328
+ const studio = new StudioServer({ port: studioPort, agentDir: process.cwd() });
329
+ await studio.start();
330
+ this.logger.info(`Studio UI ready → http://localhost:${studioPort}`);
331
+ console.log(` Studio: http://localhost:${studioPort}`);
332
+ } catch (e: any) {
333
+ this.logger.debug('Studio UI not available: ' + (e?.message || ''));
334
+ }
323
335
  }
324
336
 
325
337
  async stop(): Promise<void> {