@okxweb3/a2a-node 0.0.13 → 0.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.
package/dist/cli.js CHANGED
@@ -7189,8 +7189,13 @@ function createDefaultWebSocket(url) {
7189
7189
  function resolveOpenClawGatewayConfig(env = process.env) {
7190
7190
  const synced = readSyncedGatewayConfig(env);
7191
7191
  const explicitUrl = env.OKX_A2A_OPENCLAW_GATEWAY_URL?.trim() || void 0;
7192
- const port = Number(env.OKX_A2A_OPENCLAW_GATEWAY_PORT) || DEFAULT_GATEWAY_PORT;
7193
- const defaultUrl = `ws://127.0.0.1:${port}`;
7192
+ if (!explicitUrl && !synced && requiresSyncedOpenClawGatewayConfig(env)) {
7193
+ const expectedPath = resolveOpenClawGatewayConfigPath(env.OKX_AGENT_TASK_HOME);
7194
+ throw new Error(
7195
+ `OpenClaw gateway URL was not synced. Expected ${expectedPath}. Restart the OpenClaw gateway so okx-a2a can read the gateway URL from openclaw-gateway.json.`
7196
+ );
7197
+ }
7198
+ const defaultUrl = `ws://127.0.0.1:${DEFAULT_GATEWAY_PORT}`;
7194
7199
  const url = explicitUrl ?? synced?.url ?? defaultUrl;
7195
7200
  const password = env.OKX_A2A_OPENCLAW_GATEWAY_PASSWORD?.trim() || synced?.password || void 0;
7196
7201
  const token = env.OKX_A2A_OPENCLAW_GATEWAY_TOKEN?.trim() || synced?.token || void 0;
@@ -7363,6 +7368,9 @@ function readSyncedGatewayConfig(env) {
7363
7368
  return null;
7364
7369
  }
7365
7370
  }
7371
+ function requiresSyncedOpenClawGatewayConfig(env) {
7372
+ return env.OKX_A2A_GATEWAY_PROVIDER === "openclaw" || env.OKX_A2A_RUNTIME_CONTEXT === "openclaw-gateway" || env.OKX_A2A_IN_GATEWAY === "1";
7373
+ }
7366
7374
  function buildConnectParams(config, instanceId, protocolVersion) {
7367
7375
  return {
7368
7376
  minProtocol: protocolVersion,
@@ -7370,7 +7378,7 @@ function buildConnectParams(config, instanceId, protocolVersion) {
7370
7378
  client: {
7371
7379
  id: "gateway-client",
7372
7380
  displayName: "okx-a2a-node",
7373
- version: "0.0.13",
7381
+ version: "0.0.14",
7374
7382
  platform: "node",
7375
7383
  mode: "backend",
7376
7384
  instanceId
@@ -7381,7 +7389,7 @@ function buildConnectParams(config, instanceId, protocolVersion) {
7381
7389
  commands: [],
7382
7390
  permissions: {},
7383
7391
  locale: Intl.DateTimeFormat().resolvedOptions().locale || "en-US",
7384
- userAgent: `okx-a2a-node/${"0.0.13"}`,
7392
+ userAgent: `okx-a2a-node/${"0.0.14"}`,
7385
7393
  auth: {
7386
7394
  ...config.token ? { token: config.token } : {},
7387
7395
  ...config.password ? { password: config.password } : {}
@@ -23938,7 +23946,7 @@ var init_sentry_config = __esm({
23938
23946
  environment = process.env.SENTRY_ENV === "dev" ? "dev" : "prod";
23939
23947
  SENTRY_CONFIG = {
23940
23948
  projectName: "okx/openclaw-okx-a2a-extension",
23941
- release: "0.0.13",
23949
+ release: "0.0.14",
23942
23950
  environment
23943
23951
  };
23944
23952
  }
@@ -91469,7 +91477,7 @@ async function getCurrentNodeCliVersion() {
91469
91477
  return await getGlobalNpmPackageVersion(UPDATE_PACKAGES.node) ?? getBundledNodeCliVersion();
91470
91478
  }
91471
91479
  function getBundledNodeCliVersion() {
91472
- return true ? "0.0.13" : null;
91480
+ return true ? "0.0.14" : null;
91473
91481
  }
91474
91482
  function readConfiguredAiProvider() {
91475
91483
  const explicit = process.env.OKX_AGENT_TASK_AI_CLI ?? process.env.OKX_A2A_AI_PROVIDER;
@@ -92189,7 +92197,7 @@ function isBelowRequiredVersion(currentVersion, minVersion) {
92189
92197
  async function ensureCommunicationMinVersions(input) {
92190
92198
  const runUpdate = input.runUpdate ?? runOkxA2aForcedUpdate;
92191
92199
  const cliMinVersion = input.systemConfig.minVersion.cli;
92192
- const currentCliVersion = input.currentCliVersion ?? "0.0.13";
92200
+ const currentCliVersion = input.currentCliVersion ?? "0.0.14";
92193
92201
  if (isBelowRequiredVersion(currentCliVersion, cliMinVersion)) {
92194
92202
  await forceUpdate({
92195
92203
  target: "cli",
@@ -92441,7 +92449,7 @@ async function runListenerWithLock(options, paths) {
92441
92449
  }));
92442
92450
  }
92443
92451
  });
92444
- service.setCliVersion("0.0.13");
92452
+ service.setCliVersion("0.0.14");
92445
92453
  await service.init();
92446
92454
  const startupVersionCheck = await ensureCommunicationMinVersions({
92447
92455
  systemConfig: service.getSystemConfig(),
@@ -92474,7 +92482,7 @@ async function runListenerWithLock(options, paths) {
92474
92482
  onchainosAgentId: "*",
92475
92483
  reason: "system-config missing sentryDsn",
92476
92484
  pluginId: "@okxweb3/a2a-node",
92477
- pluginVersion: "0.0.13"
92485
+ pluginVersion: "0.0.14"
92478
92486
  });
92479
92487
  }
92480
92488
  logWithTimestamp(
@@ -94959,7 +94967,7 @@ init_task_config();
94959
94967
  init_sentry_logger();
94960
94968
  init_sentry_config();
94961
94969
  function printUsage2() {
94962
- console.log(`okx-a2a ${"0.0.13"}
94970
+ console.log(`okx-a2a ${"0.0.14"}
94963
94971
 
94964
94972
  Usage:
94965
94973
  okx-a2a <command> [options]
@@ -94996,7 +95004,7 @@ Run \`okx-a2a <command> -h\` for command-specific help.
94996
95004
  `);
94997
95005
  }
94998
95006
  function printVersion() {
94999
- console.log("0.0.13");
95007
+ console.log("0.0.14");
95000
95008
  }
95001
95009
  function printDaemonUsage() {
95002
95010
  console.log(`Usage: okx-a2a daemon <start|restart|stop|status> [options]
package/dist/index.js CHANGED
@@ -85719,8 +85719,13 @@ var sharedClient = null;
85719
85719
  function resolveOpenClawGatewayConfig(env = process.env) {
85720
85720
  const synced = readSyncedGatewayConfig(env);
85721
85721
  const explicitUrl = env.OKX_A2A_OPENCLAW_GATEWAY_URL?.trim() || void 0;
85722
- const port = Number(env.OKX_A2A_OPENCLAW_GATEWAY_PORT) || DEFAULT_GATEWAY_PORT;
85723
- const defaultUrl = `ws://127.0.0.1:${port}`;
85722
+ if (!explicitUrl && !synced && requiresSyncedOpenClawGatewayConfig(env)) {
85723
+ const expectedPath = resolveOpenClawGatewayConfigPath(env.OKX_AGENT_TASK_HOME);
85724
+ throw new Error(
85725
+ `OpenClaw gateway URL was not synced. Expected ${expectedPath}. Restart the OpenClaw gateway so okx-a2a can read the gateway URL from openclaw-gateway.json.`
85726
+ );
85727
+ }
85728
+ const defaultUrl = `ws://127.0.0.1:${DEFAULT_GATEWAY_PORT}`;
85724
85729
  const url = explicitUrl ?? synced?.url ?? defaultUrl;
85725
85730
  const password = env.OKX_A2A_OPENCLAW_GATEWAY_PASSWORD?.trim() || synced?.password || void 0;
85726
85731
  const token = env.OKX_A2A_OPENCLAW_GATEWAY_TOKEN?.trim() || synced?.token || void 0;
@@ -86085,6 +86090,9 @@ function readSyncedGatewayConfig(env) {
86085
86090
  return null;
86086
86091
  }
86087
86092
  }
86093
+ function requiresSyncedOpenClawGatewayConfig(env) {
86094
+ return env.OKX_A2A_GATEWAY_PROVIDER === "openclaw" || env.OKX_A2A_RUNTIME_CONTEXT === "openclaw-gateway" || env.OKX_A2A_IN_GATEWAY === "1";
86095
+ }
86088
86096
  function buildConnectParams(config, instanceId, protocolVersion) {
86089
86097
  return {
86090
86098
  minProtocol: protocolVersion,
@@ -86092,7 +86100,7 @@ function buildConnectParams(config, instanceId, protocolVersion) {
86092
86100
  client: {
86093
86101
  id: "gateway-client",
86094
86102
  displayName: "okx-a2a-node",
86095
- version: "0.0.13",
86103
+ version: "0.0.14",
86096
86104
  platform: "node",
86097
86105
  mode: "backend",
86098
86106
  instanceId
@@ -86103,7 +86111,7 @@ function buildConnectParams(config, instanceId, protocolVersion) {
86103
86111
  commands: [],
86104
86112
  permissions: {},
86105
86113
  locale: Intl.DateTimeFormat().resolvedOptions().locale || "en-US",
86106
- userAgent: `okx-a2a-node/${"0.0.13"}`,
86114
+ userAgent: `okx-a2a-node/${"0.0.14"}`,
86107
86115
  auth: {
86108
86116
  ...config.token ? { token: config.token } : {},
86109
86117
  ...config.password ? { password: config.password } : {}
@@ -89649,7 +89657,7 @@ function userWatchEventDeliveredSentryExtra(event) {
89649
89657
  var environment = process.env.SENTRY_ENV === "dev" ? "dev" : "prod";
89650
89658
  var SENTRY_CONFIG = {
89651
89659
  projectName: "okx/openclaw-okx-a2a-extension",
89652
- release: "0.0.13",
89660
+ release: "0.0.14",
89653
89661
  environment
89654
89662
  };
89655
89663
 
@@ -90070,7 +90078,7 @@ function isBelowRequiredVersion(currentVersion, minVersion) {
90070
90078
  async function ensureCommunicationMinVersions(input) {
90071
90079
  const runUpdate = input.runUpdate ?? runOkxA2aForcedUpdate;
90072
90080
  const cliMinVersion = input.systemConfig.minVersion.cli;
90073
- const currentCliVersion = input.currentCliVersion ?? "0.0.13";
90081
+ const currentCliVersion = input.currentCliVersion ?? "0.0.14";
90074
90082
  if (isBelowRequiredVersion(currentCliVersion, cliMinVersion)) {
90075
90083
  await forceUpdate({
90076
90084
  target: "cli",
@@ -90305,7 +90313,7 @@ async function runListenerWithLock(options, paths) {
90305
90313
  }));
90306
90314
  }
90307
90315
  });
90308
- service.setCliVersion("0.0.13");
90316
+ service.setCliVersion("0.0.14");
90309
90317
  await service.init();
90310
90318
  const startupVersionCheck = await ensureCommunicationMinVersions({
90311
90319
  systemConfig: service.getSystemConfig(),
@@ -90338,7 +90346,7 @@ async function runListenerWithLock(options, paths) {
90338
90346
  onchainosAgentId: "*",
90339
90347
  reason: "system-config missing sentryDsn",
90340
90348
  pluginId: "@okxweb3/a2a-node",
90341
- pluginVersion: "0.0.13"
90349
+ pluginVersion: "0.0.14"
90342
90350
  });
90343
90351
  }
90344
90352
  logWithTimestamp(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@okxweb3/a2a-node",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "description": "Host-agnostic Node CLI for E2E encrypted agent-to-agent communication via XMTP",
5
5
  "main": "dist/index.js",
6
6
  "bin": {