@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.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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.
|
|
3043
|
+
version: "0.1.26",
|
|
3044
3044
|
url: `${baseUrl}/a2a/jsonrpc`,
|
|
3045
3045
|
skills,
|
|
3046
3046
|
capabilities,
|
|
@@ -3489,8 +3489,9 @@ function createApp(agent, options = {}) {
|
|
|
3489
3489
|
if (options.enableA2A !== false) {
|
|
3490
3490
|
const port = options.port || parseInt(process.env.PORT || "3000", 10);
|
|
3491
3491
|
const host = options.host || "0.0.0.0";
|
|
3492
|
-
const
|
|
3493
|
-
const
|
|
3492
|
+
const cardHost = host === "0.0.0.0" ? "localhost" : host;
|
|
3493
|
+
const protocol = cardHost === "localhost" || cardHost === "127.0.0.1" ? "http" : "https";
|
|
3494
|
+
const baseUrl = options.a2aConfig?.baseUrl || `${protocol}://${cardHost}:${port}`;
|
|
3494
3495
|
const a2aIntegration = createA2AIntegration(agent, {
|
|
3495
3496
|
a2aConfig: {
|
|
3496
3497
|
enabled: true,
|
|
@@ -3517,8 +3518,9 @@ async function startServer(agent, options = {}) {
|
|
|
3517
3518
|
app.listen(port, host, () => {
|
|
3518
3519
|
logger10.info(`Agent "${agent.name}" running at http://${host}:${port}`);
|
|
3519
3520
|
if (options.enableA2A !== false) {
|
|
3520
|
-
const
|
|
3521
|
-
const
|
|
3521
|
+
const logHost = host === "0.0.0.0" ? "localhost" : host;
|
|
3522
|
+
const protocol = logHost === "localhost" || logHost === "127.0.0.1" ? "http" : "https";
|
|
3523
|
+
const baseUrl = `${protocol}://${logHost}:${port}`;
|
|
3522
3524
|
logger10.info("A2A Protocol Endpoints:");
|
|
3523
3525
|
logger10.info(` Agent Card: ${baseUrl}/.well-known/agent-card.json`);
|
|
3524
3526
|
logger10.info(` JSON-RPC: ${baseUrl}/a2a/jsonrpc`);
|