@moltium/core 0.1.23 → 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.js CHANGED
@@ -3040,7 +3040,7 @@ var AgentCardBuilder = class {
3040
3040
  name: config.name,
3041
3041
  description: config.personality.bio || `${config.name} - An autonomous AI agent`,
3042
3042
  protocolVersion: "0.3.0",
3043
- version: "0.1.23",
3043
+ version: "0.1.25",
3044
3044
  url: `${baseUrl}/a2a/jsonrpc`,
3045
3045
  skills,
3046
3046
  capabilities,
@@ -3513,18 +3513,21 @@ async function startServer(agent, options = {}) {
3513
3513
  const port = options.port || parseInt(process.env.PORT || "3000", 10);
3514
3514
  const host = options.host || "0.0.0.0";
3515
3515
  const app = createApp(agent, options);
3516
- await agent.start();
3517
- app.listen(port, host, () => {
3518
- logger10.info(`Agent "${agent.name}" running at http://${host}:${port}`);
3519
- if (options.enableA2A !== false) {
3520
- const protocol = host === "localhost" || host === "127.0.0.1" ? "http" : "https";
3521
- const baseUrl = `${protocol}://${host}:${port}`;
3522
- logger10.info("A2A Protocol Endpoints:");
3523
- logger10.info(` Agent Card: ${baseUrl}/.well-known/agent-card.json`);
3524
- logger10.info(` JSON-RPC: ${baseUrl}/a2a/jsonrpc`);
3525
- logger10.info(` HTTP+JSON: ${baseUrl}/a2a/rest`);
3526
- }
3516
+ await new Promise((resolve2) => {
3517
+ app.listen(port, host, () => {
3518
+ logger10.info(`Agent "${agent.name}" running at http://${host}:${port}`);
3519
+ if (options.enableA2A !== false) {
3520
+ const protocol = host === "localhost" || host === "127.0.0.1" ? "http" : "https";
3521
+ const baseUrl = `${protocol}://${host}:${port}`;
3522
+ logger10.info("A2A Protocol Endpoints:");
3523
+ logger10.info(` Agent Card: ${baseUrl}/.well-known/agent-card.json`);
3524
+ logger10.info(` JSON-RPC: ${baseUrl}/a2a/jsonrpc`);
3525
+ logger10.info(` HTTP+JSON: ${baseUrl}/a2a/rest`);
3526
+ }
3527
+ resolve2();
3528
+ });
3527
3529
  });
3530
+ await agent.start();
3528
3531
  const shutdown = async () => {
3529
3532
  logger10.info("Received shutdown signal");
3530
3533
  await agent.stop();