opc-agent 4.0.13 → 4.0.14

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.
Files changed (3) hide show
  1. package/dist/cli.js +14 -2
  2. package/package.json +1 -1
  3. package/src/cli.ts +14 -2
package/dist/cli.js CHANGED
@@ -842,9 +842,21 @@ program
842
842
  await runtime.initialize();
843
843
  await runtime.start();
844
844
  const agent = runtime.getAgent();
845
+ // Auto-start Studio on port 4000
846
+ let studioUrl = '';
847
+ try {
848
+ const { StudioServer } = require('./studio/server');
849
+ const studioPort = parseInt(opts.port || '3000') === 4000 ? 4001 : 4000;
850
+ const studio = new StudioServer({ port: studioPort, agentDir: process.cwd() });
851
+ await studio.start();
852
+ studioUrl = `http://localhost:${studioPort}`;
853
+ }
854
+ catch { }
845
855
  console.log(`\n${icon.rocket} Agent "${color.bold(agent?.name ?? 'unknown')}" is running.`);
846
- console.log(` ${color.dim('Web UI:')} http://localhost:3000`);
847
- console.log(` ${color.dim('API:')} POST http://localhost:3000/api/chat`);
856
+ console.log(` ${color.dim('Chat:')} http://localhost:3000`);
857
+ if (studioUrl)
858
+ console.log(` ${color.dim('Studio:')} ${studioUrl}`);
859
+ console.log(` ${color.dim('API:')} POST http://localhost:3000/api/chat`);
848
860
  console.log(`\n ${color.dim('Press Ctrl+C to stop.')}\n`);
849
861
  });
850
862
  // ── Serve command (OpenAI-compatible API) ────────────────────
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opc-agent",
3
- "version": "4.0.13",
3
+ "version": "4.0.14",
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",
package/src/cli.ts CHANGED
@@ -939,9 +939,21 @@ program
939
939
  await runtime.initialize();
940
940
  await runtime.start();
941
941
  const agent = runtime.getAgent();
942
+
943
+ // Auto-start Studio on port 4000
944
+ let studioUrl = '';
945
+ try {
946
+ const { StudioServer } = require('./studio/server');
947
+ const studioPort = parseInt(opts.port || '3000') === 4000 ? 4001 : 4000;
948
+ const studio = new StudioServer({ port: studioPort, agentDir: process.cwd() });
949
+ await studio.start();
950
+ studioUrl = `http://localhost:${studioPort}`;
951
+ } catch {}
952
+
942
953
  console.log(`\n${icon.rocket} Agent "${color.bold(agent?.name ?? 'unknown')}" is running.`);
943
- console.log(` ${color.dim('Web UI:')} http://localhost:3000`);
944
- console.log(` ${color.dim('API:')} POST http://localhost:3000/api/chat`);
954
+ console.log(` ${color.dim('Chat:')} http://localhost:3000`);
955
+ if (studioUrl) console.log(` ${color.dim('Studio:')} ${studioUrl}`);
956
+ console.log(` ${color.dim('API:')} POST http://localhost:3000/api/chat`);
945
957
  console.log(`\n ${color.dim('Press Ctrl+C to stop.')}\n`);
946
958
  });
947
959