@moltium/core 0.1.24 → 0.1.25

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/index.mjs CHANGED
@@ -2968,7 +2968,7 @@ var AgentCardBuilder = class {
2968
2968
  name: config.name,
2969
2969
  description: config.personality.bio || `${config.name} - An autonomous AI agent`,
2970
2970
  protocolVersion: "0.3.0",
2971
- version: "0.1.24",
2971
+ version: "0.1.25",
2972
2972
  url: `${baseUrl}/a2a/jsonrpc`,
2973
2973
  skills,
2974
2974
  capabilities,
@@ -3441,18 +3441,21 @@ async function startServer(agent, options = {}) {
3441
3441
  const port = options.port || parseInt(process.env.PORT || "3000", 10);
3442
3442
  const host = options.host || "0.0.0.0";
3443
3443
  const app = createApp(agent, options);
3444
- await agent.start();
3445
- app.listen(port, host, () => {
3446
- logger10.info(`Agent "${agent.name}" running at http://${host}:${port}`);
3447
- if (options.enableA2A !== false) {
3448
- const protocol = host === "localhost" || host === "127.0.0.1" ? "http" : "https";
3449
- const baseUrl = `${protocol}://${host}:${port}`;
3450
- logger10.info("A2A Protocol Endpoints:");
3451
- logger10.info(` Agent Card: ${baseUrl}/.well-known/agent-card.json`);
3452
- logger10.info(` JSON-RPC: ${baseUrl}/a2a/jsonrpc`);
3453
- logger10.info(` HTTP+JSON: ${baseUrl}/a2a/rest`);
3454
- }
3444
+ await new Promise((resolve2) => {
3445
+ app.listen(port, host, () => {
3446
+ logger10.info(`Agent "${agent.name}" running at http://${host}:${port}`);
3447
+ if (options.enableA2A !== false) {
3448
+ const protocol = host === "localhost" || host === "127.0.0.1" ? "http" : "https";
3449
+ const baseUrl = `${protocol}://${host}:${port}`;
3450
+ logger10.info("A2A Protocol Endpoints:");
3451
+ logger10.info(` Agent Card: ${baseUrl}/.well-known/agent-card.json`);
3452
+ logger10.info(` JSON-RPC: ${baseUrl}/a2a/jsonrpc`);
3453
+ logger10.info(` HTTP+JSON: ${baseUrl}/a2a/rest`);
3454
+ }
3455
+ resolve2();
3456
+ });
3455
3457
  });
3458
+ await agent.start();
3456
3459
  const shutdown = async () => {
3457
3460
  logger10.info("Received shutdown signal");
3458
3461
  await agent.stop();