opc-agent 4.0.14 → 4.0.16

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,20 @@ 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
+ const msg = e?.message || String(e);
356
+ this.logger.warn('Studio UI failed to start: ' + msg);
357
+ console.log(` Studio: ⚠️ failed - ${msg}`);
358
+ }
345
359
  }
346
360
  async stop() {
347
361
  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.16",
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,20 @@ 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
+ const msg = e?.message || String(e);
334
+ this.logger.warn('Studio UI failed to start: ' + msg);
335
+ console.log(` Studio: ⚠️ failed - ${msg}`);
336
+ }
323
337
  }
324
338
 
325
339
  async stop(): Promise<void> {