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.
- package/dist/core/runtime.js +12 -0
- package/package.json +1 -1
- package/src/core/runtime.ts +12 -0
package/dist/core/runtime.js
CHANGED
|
@@ -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
package/src/core/runtime.ts
CHANGED
|
@@ -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> {
|