@okxweb3/a2a-node 0.1.0 → 0.1.1-beta-b61454118d-260630143950

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
@@ -7846,7 +7846,7 @@ function buildConnectParams(config, instanceId, protocolVersion) {
7846
7846
  client: {
7847
7847
  id: "gateway-client",
7848
7848
  displayName: "okx-a2a-node",
7849
- version: "0.1.0",
7849
+ version: "0.1.1-beta-b61454118d-260630143950",
7850
7850
  platform: "node",
7851
7851
  mode: "backend",
7852
7852
  instanceId
@@ -7857,7 +7857,7 @@ function buildConnectParams(config, instanceId, protocolVersion) {
7857
7857
  commands: [],
7858
7858
  permissions: {},
7859
7859
  locale: Intl.DateTimeFormat().resolvedOptions().locale || "en-US",
7860
- userAgent: `okx-a2a-node/${"0.1.0"}`,
7860
+ userAgent: `okx-a2a-node/${"0.1.1-beta-b61454118d-260630143950"}`,
7861
7861
  auth: {
7862
7862
  ...config.token ? { token: config.token } : {},
7863
7863
  ...config.password ? { password: config.password } : {}
@@ -25076,7 +25076,7 @@ var init_sentry_config = __esm({
25076
25076
  environment = process.env.SENTRY_ENV === "dev" ? "dev" : "prod";
25077
25077
  SENTRY_CONFIG = {
25078
25078
  projectName: "okx/openclaw-okx-a2a-extension",
25079
- release: "0.1.0",
25079
+ release: "0.1.1-beta-b61454118d-260630143950",
25080
25080
  environment
25081
25081
  };
25082
25082
  }
@@ -25091,6 +25091,7 @@ __export(autostart_exports, {
25091
25091
  installAutostart: () => installAutostart,
25092
25092
  installLaunchdAutostart: () => installLaunchdAutostart,
25093
25093
  installSystemdAutostart: () => installSystemdAutostart,
25094
+ isAutostartInstalled: () => isAutostartInstalled,
25094
25095
  printLaunchdPlist: () => printLaunchdPlist,
25095
25096
  printSystemdAutostartUnit: () => printSystemdAutostartUnit,
25096
25097
  resolveLaunchdAutostartPaths: () => resolveLaunchdAutostartPaths,
@@ -25378,6 +25379,15 @@ async function restartAutostart() {
25378
25379
  }
25379
25380
  throw new Error(`autostart is not supported on ${process.platform}`);
25380
25381
  }
25382
+ function isAutostartInstalled() {
25383
+ if (process.platform === "linux") {
25384
+ return (0, import_node_fs10.existsSync)(resolveSystemdAutostartPaths().servicePath);
25385
+ }
25386
+ if (process.platform === "darwin") {
25387
+ return (0, import_node_fs10.existsSync)(resolveLaunchdAutostartPaths().plistPath);
25388
+ }
25389
+ return false;
25390
+ }
25381
25391
  function autostartStatus() {
25382
25392
  if (process.platform === "linux") {
25383
25393
  return printSystemdAutostartUnit();
@@ -92865,7 +92875,7 @@ async function isGatewayAvailableForHeartbeat(options) {
92865
92875
  }
92866
92876
  async function isHermesGatewayPluginEnabled(options = {}) {
92867
92877
  const env = options.env ?? process.env;
92868
- if (detectGatewayInvocation(env) !== "hermes") {
92878
+ if (options.requireGatewayRuntime && detectGatewayInvocation(env) !== "hermes") {
92869
92879
  return false;
92870
92880
  }
92871
92881
  const hermesHome = env.HERMES_HOME?.trim() || (0, import_node_path19.join)((0, import_node_os7.homedir)(), ".hermes");
@@ -93049,12 +93059,12 @@ async function runListenerWithLock(options, paths) {
93049
93059
  }));
93050
93060
  }
93051
93061
  });
93052
- service.setPluginVersion("0.1.0");
93062
+ service.setPluginVersion("0.1.1-beta-b61454118d-260630143950");
93053
93063
  await service.init();
93054
93064
  const pluginVersionStatus = service.pluginVersionStatus;
93055
93065
  if (pluginVersionStatus.unavailable) {
93056
93066
  throw new Error(
93057
- `@okxweb3/a2a-node v${"0.1.0"} is below the required minimum v${pluginVersionStatus.minVersion}`
93067
+ `@okxweb3/a2a-node v${"0.1.1-beta-b61454118d-260630143950"} is below the required minimum v${pluginVersionStatus.minVersion}`
93058
93068
  );
93059
93069
  }
93060
93070
  const systemConfig = service.getSystemConfig();
@@ -93072,7 +93082,7 @@ async function runListenerWithLock(options, paths) {
93072
93082
  onchainosAgentId: "*",
93073
93083
  reason: "system-config missing sentryDsn",
93074
93084
  pluginId: "@okxweb3/a2a-node",
93075
- pluginVersion: "0.1.0"
93085
+ pluginVersion: "0.1.1-beta-b61454118d-260630143950"
93076
93086
  });
93077
93087
  }
93078
93088
  logWithTimestamp(
@@ -96186,7 +96196,7 @@ async function runSetup(options) {
96186
96196
  };
96187
96197
  }
96188
96198
  const changes = await detectSetupChanges(resolvedTarget, releasePlan);
96189
- const providerChanged = switchDefaultProviderForSetup(resolvedTarget);
96199
+ switchDefaultProviderForSetup(resolvedTarget);
96190
96200
  logSetupChangeState(resolvedTarget, changes);
96191
96201
  if (resolvedTarget === "openclaw") {
96192
96202
  const pluginAlreadyInstalled2 = await isGatewayPluginInstalled("openclaw");
@@ -96203,7 +96213,7 @@ async function runSetup(options) {
96203
96213
  if (changes.pluginChanged) {
96204
96214
  await updateOpenClaw(releasePlan.gatewayRelease, { restart: false, deferRestart: true, label: "setup", allowGatewayRuntime: true });
96205
96215
  }
96206
- if (changes.nodeChanged || changes.pluginChanged || providerChanged) {
96216
+ if (changes.nodeChanged) {
96207
96217
  await restartNodeDaemonAfterSetup(resolvedTarget);
96208
96218
  }
96209
96219
  if (changes.pluginChanged) {
@@ -96234,9 +96244,7 @@ async function runSetup(options) {
96234
96244
  if (changes.pluginChanged) {
96235
96245
  await updateHermes(releasePlan.gatewayRelease, { restart: false, deferRestart: true, label: "setup", allowGatewayRuntime: true });
96236
96246
  }
96237
- if (changes.nodeChanged || changes.pluginChanged || providerChanged) {
96238
- await restartNodeDaemonAfterSetup(resolvedTarget);
96239
- } else if (changes.configChanged) {
96247
+ if (changes.nodeChanged) {
96240
96248
  await restartNodeDaemonAfterSetup(resolvedTarget);
96241
96249
  }
96242
96250
  if (changes.pluginChanged || changes.configChanged) {
@@ -96359,7 +96367,7 @@ async function getCurrentNodeCliVersion() {
96359
96367
  return await getGlobalNpmPackageVersion(UPDATE_PACKAGES.node) ?? getBundledNodeCliVersion();
96360
96368
  }
96361
96369
  function getBundledNodeCliVersion() {
96362
- return true ? "0.1.0" : null;
96370
+ return true ? "0.1.1-beta-b61454118d-260630143950" : null;
96363
96371
  }
96364
96372
  function readConfiguredAiProvider() {
96365
96373
  const explicit = process.env.OKX_AGENT_TASK_AI_CLI ?? process.env.OKX_A2A_AI_PROVIDER;
@@ -97202,7 +97210,7 @@ init_sentry_logger();
97202
97210
  init_sentry_config();
97203
97211
  var CURRENT_GATEWAY_SESSION_KEYS_ENV3 = "OKX_A2A_CURRENT_GATEWAY_SESSION_KEYS";
97204
97212
  function printUsage2() {
97205
- console.log(`okx-a2a ${"0.1.0"}
97213
+ console.log(`okx-a2a ${"0.1.1-beta-b61454118d-260630143950"}
97206
97214
 
97207
97215
  Usage:
97208
97216
  okx-a2a <command> [options]
@@ -97239,7 +97247,7 @@ Run \`okx-a2a <command> -h\` for command-specific help.
97239
97247
  `);
97240
97248
  }
97241
97249
  function printVersion() {
97242
- console.log("0.1.0");
97250
+ console.log("0.1.1-beta-b61454118d-260630143950");
97243
97251
  }
97244
97252
  function printDaemonUsage() {
97245
97253
  console.log(`Usage: okx-a2a daemon <start|restart|stop|status|autostart> [options]
@@ -97972,8 +97980,10 @@ async function configureDefaultAiProviderForLifecycle(args) {
97972
97980
  async function handleStart(args) {
97973
97981
  await configureDefaultAiProviderForLifecycle(args);
97974
97982
  if (shouldInstallAutostart(args)) {
97983
+ let autostartInstalled = false;
97975
97984
  try {
97976
- const { installAutostart: installAutostart2 } = await Promise.resolve().then(() => (init_autostart(), autostart_exports));
97985
+ const { installAutostart: installAutostart2, isAutostartInstalled: isAutostartInstalled2 } = await Promise.resolve().then(() => (init_autostart(), autostart_exports));
97986
+ autostartInstalled = isAutostartInstalled2();
97977
97987
  const result2 = await installAutostart2();
97978
97988
  console.log(`installed ${result2.platform} autostart ${result2.path}`);
97979
97989
  const status = await getDaemonStatus();
@@ -97983,6 +97993,11 @@ async function handleStart(args) {
97983
97993
  return;
97984
97994
  } catch (err2) {
97985
97995
  const message = err2 instanceof Error ? err2.message : String(err2);
97996
+ if (autostartInstalled) {
97997
+ throw new Error(
97998
+ `autostart install failed while an autostart service is already installed; refusing to start a second manual daemon. ${message}`
97999
+ );
98000
+ }
97986
98001
  console.warn(`autostart install failed; starting without autostart: ${message}`);
97987
98002
  }
97988
98003
  }
@@ -97995,6 +98010,25 @@ async function handleStart(args) {
97995
98010
  }
97996
98011
  async function handleRestart(args) {
97997
98012
  await configureDefaultAiProviderForLifecycle(args);
98013
+ let autostartInstalled = false;
98014
+ try {
98015
+ const { isAutostartInstalled: isAutostartInstalled2, restartAutostart: restartAutostart2 } = await Promise.resolve().then(() => (init_autostart(), autostart_exports));
98016
+ autostartInstalled = isAutostartInstalled2();
98017
+ if (autostartInstalled) {
98018
+ const autostart = await restartAutostart2();
98019
+ if (!autostart.restarted) {
98020
+ throw new Error(autostart.message || "autostart service did not restart");
98021
+ }
98022
+ console.log(`restarted ${autostart.platform} autostart service ${autostart.path}`);
98023
+ return;
98024
+ }
98025
+ } catch (err2) {
98026
+ const message = err2 instanceof Error ? err2.message : String(err2);
98027
+ if (autostartInstalled) {
98028
+ throw new Error(`autostart restart failed; refusing to start a second manual daemon. ${message}`);
98029
+ }
98030
+ autostartInstalled = false;
98031
+ }
97998
98032
  const stopResult = await stopDaemon();
97999
98033
  if (stopResult.stopped || stopResult.running) {
98000
98034
  printStopDaemonResult(stopResult);
@@ -98003,7 +98037,8 @@ async function handleRestart(args) {
98003
98037
  return;
98004
98038
  }
98005
98039
  try {
98006
- const { installAutostart: installAutostart2, restartAutostart: restartAutostart2 } = await Promise.resolve().then(() => (init_autostart(), autostart_exports));
98040
+ const { installAutostart: installAutostart2, isAutostartInstalled: isAutostartInstalled2, restartAutostart: restartAutostart2 } = await Promise.resolve().then(() => (init_autostart(), autostart_exports));
98041
+ autostartInstalled = autostartInstalled || isAutostartInstalled2();
98007
98042
  const autostart = await restartAutostart2();
98008
98043
  if (autostart.restarted) {
98009
98044
  console.log(`restarted ${autostart.platform} autostart service ${autostart.path}`);
@@ -98018,6 +98053,11 @@ async function handleRestart(args) {
98018
98053
  return;
98019
98054
  } catch (err2) {
98020
98055
  const message = err2 instanceof Error ? err2.message : String(err2);
98056
+ if (autostartInstalled) {
98057
+ throw new Error(
98058
+ `autostart restart failed while an autostart service is installed; refusing to start a second manual daemon. ${message}`
98059
+ );
98060
+ }
98021
98061
  console.warn(`autostart restart skipped: ${message}`);
98022
98062
  }
98023
98063
  const startResult = await startDaemon();
package/dist/index.js CHANGED
@@ -86718,7 +86718,7 @@ function buildConnectParams(config, instanceId, protocolVersion) {
86718
86718
  client: {
86719
86719
  id: "gateway-client",
86720
86720
  displayName: "okx-a2a-node",
86721
- version: "0.1.0",
86721
+ version: "0.1.1-beta-b61454118d-260630143950",
86722
86722
  platform: "node",
86723
86723
  mode: "backend",
86724
86724
  instanceId
@@ -86729,7 +86729,7 @@ function buildConnectParams(config, instanceId, protocolVersion) {
86729
86729
  commands: [],
86730
86730
  permissions: {},
86731
86731
  locale: Intl.DateTimeFormat().resolvedOptions().locale || "en-US",
86732
- userAgent: `okx-a2a-node/${"0.1.0"}`,
86732
+ userAgent: `okx-a2a-node/${"0.1.1-beta-b61454118d-260630143950"}`,
86733
86733
  auth: {
86734
86734
  ...config.token ? { token: config.token } : {},
86735
86735
  ...config.password ? { password: config.password } : {}
@@ -91148,7 +91148,7 @@ function userWatchEventDeliveredSentryExtra(event) {
91148
91148
  var environment = process.env.SENTRY_ENV === "dev" ? "dev" : "prod";
91149
91149
  var SENTRY_CONFIG = {
91150
91150
  projectName: "okx/openclaw-okx-a2a-extension",
91151
- release: "0.1.0",
91151
+ release: "0.1.1-beta-b61454118d-260630143950",
91152
91152
  environment
91153
91153
  };
91154
91154
 
@@ -91190,7 +91190,7 @@ async function isGatewayAvailableForHeartbeat(options) {
91190
91190
  }
91191
91191
  async function isHermesGatewayPluginEnabled(options = {}) {
91192
91192
  const env = options.env ?? process.env;
91193
- if (detectGatewayInvocation(env) !== "hermes") {
91193
+ if (options.requireGatewayRuntime && detectGatewayInvocation(env) !== "hermes") {
91194
91194
  return false;
91195
91195
  }
91196
91196
  const hermesHome = env.HERMES_HOME?.trim() || (0, import_node_path18.join)((0, import_node_os6.homedir)(), ".hermes");
@@ -91375,12 +91375,12 @@ async function runListenerWithLock(options, paths) {
91375
91375
  }));
91376
91376
  }
91377
91377
  });
91378
- service.setPluginVersion("0.1.0");
91378
+ service.setPluginVersion("0.1.1-beta-b61454118d-260630143950");
91379
91379
  await service.init();
91380
91380
  const pluginVersionStatus = service.pluginVersionStatus;
91381
91381
  if (pluginVersionStatus.unavailable) {
91382
91382
  throw new Error(
91383
- `@okxweb3/a2a-node v${"0.1.0"} is below the required minimum v${pluginVersionStatus.minVersion}`
91383
+ `@okxweb3/a2a-node v${"0.1.1-beta-b61454118d-260630143950"} is below the required minimum v${pluginVersionStatus.minVersion}`
91384
91384
  );
91385
91385
  }
91386
91386
  const systemConfig = service.getSystemConfig();
@@ -91398,7 +91398,7 @@ async function runListenerWithLock(options, paths) {
91398
91398
  onchainosAgentId: "*",
91399
91399
  reason: "system-config missing sentryDsn",
91400
91400
  pluginId: "@okxweb3/a2a-node",
91401
- pluginVersion: "0.1.0"
91401
+ pluginVersion: "0.1.1-beta-b61454118d-260630143950"
91402
91402
  });
91403
91403
  }
91404
91404
  logWithTimestamp(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@okxweb3/a2a-node",
3
- "version": "0.1.0",
3
+ "version": "0.1.1-beta-b61454118d-260630143950",
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": {