@moltium/core 0.1.25 → 0.1.26

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.25",
2971
+ version: "0.1.26",
2972
2972
  url: `${baseUrl}/a2a/jsonrpc`,
2973
2973
  skills,
2974
2974
  capabilities,
@@ -3417,8 +3417,9 @@ function createApp(agent, options = {}) {
3417
3417
  if (options.enableA2A !== false) {
3418
3418
  const port = options.port || parseInt(process.env.PORT || "3000", 10);
3419
3419
  const host = options.host || "0.0.0.0";
3420
- const protocol = host === "localhost" || host === "127.0.0.1" || host === "0.0.0.0" ? "http" : "https";
3421
- const baseUrl = options.a2aConfig?.baseUrl || `${protocol}://${host}:${port}`;
3420
+ const cardHost = host === "0.0.0.0" ? "localhost" : host;
3421
+ const protocol = cardHost === "localhost" || cardHost === "127.0.0.1" ? "http" : "https";
3422
+ const baseUrl = options.a2aConfig?.baseUrl || `${protocol}://${cardHost}:${port}`;
3422
3423
  const a2aIntegration = createA2AIntegration(agent, {
3423
3424
  a2aConfig: {
3424
3425
  enabled: true,
@@ -3445,8 +3446,9 @@ async function startServer(agent, options = {}) {
3445
3446
  app.listen(port, host, () => {
3446
3447
  logger10.info(`Agent "${agent.name}" running at http://${host}:${port}`);
3447
3448
  if (options.enableA2A !== false) {
3448
- const protocol = host === "localhost" || host === "127.0.0.1" ? "http" : "https";
3449
- const baseUrl = `${protocol}://${host}:${port}`;
3449
+ const logHost = host === "0.0.0.0" ? "localhost" : host;
3450
+ const protocol = logHost === "localhost" || logHost === "127.0.0.1" ? "http" : "https";
3451
+ const baseUrl = `${protocol}://${logHost}:${port}`;
3450
3452
  logger10.info("A2A Protocol Endpoints:");
3451
3453
  logger10.info(` Agent Card: ${baseUrl}/.well-known/agent-card.json`);
3452
3454
  logger10.info(` JSON-RPC: ${baseUrl}/a2a/jsonrpc`);