@okxweb3/a2a-node 0.1.1-beta-b61454118d-260630145950 → 0.1.1
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 +35 -37
- package/dist/index.js +6 -6
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -7852,7 +7852,7 @@ function buildConnectParams(config, instanceId, protocolVersion) {
|
|
|
7852
7852
|
client: {
|
|
7853
7853
|
id: "gateway-client",
|
|
7854
7854
|
displayName: "okx-a2a-node",
|
|
7855
|
-
version: "0.1.1
|
|
7855
|
+
version: "0.1.1",
|
|
7856
7856
|
platform: "node",
|
|
7857
7857
|
mode: "backend",
|
|
7858
7858
|
instanceId
|
|
@@ -7863,7 +7863,7 @@ function buildConnectParams(config, instanceId, protocolVersion) {
|
|
|
7863
7863
|
commands: [],
|
|
7864
7864
|
permissions: {},
|
|
7865
7865
|
locale: Intl.DateTimeFormat().resolvedOptions().locale || "en-US",
|
|
7866
|
-
userAgent: `okx-a2a-node/${"0.1.1
|
|
7866
|
+
userAgent: `okx-a2a-node/${"0.1.1"}`,
|
|
7867
7867
|
auth: {
|
|
7868
7868
|
...config.token ? { token: config.token } : {},
|
|
7869
7869
|
...config.password ? { password: config.password } : {}
|
|
@@ -25082,7 +25082,7 @@ var init_sentry_config = __esm({
|
|
|
25082
25082
|
environment = process.env.SENTRY_ENV === "dev" ? "dev" : "prod";
|
|
25083
25083
|
SENTRY_CONFIG = {
|
|
25084
25084
|
projectName: "okx/openclaw-okx-a2a-extension",
|
|
25085
|
-
release: "0.1.1
|
|
25085
|
+
release: "0.1.1",
|
|
25086
25086
|
environment
|
|
25087
25087
|
};
|
|
25088
25088
|
}
|
|
@@ -93065,12 +93065,12 @@ async function runListenerWithLock(options, paths) {
|
|
|
93065
93065
|
}));
|
|
93066
93066
|
}
|
|
93067
93067
|
});
|
|
93068
|
-
service.setPluginVersion("0.1.1
|
|
93068
|
+
service.setPluginVersion("0.1.1");
|
|
93069
93069
|
await service.init();
|
|
93070
93070
|
const pluginVersionStatus = service.pluginVersionStatus;
|
|
93071
93071
|
if (pluginVersionStatus.unavailable) {
|
|
93072
93072
|
throw new Error(
|
|
93073
|
-
`@okxweb3/a2a-node v${"0.1.1
|
|
93073
|
+
`@okxweb3/a2a-node v${"0.1.1"} is below the required minimum v${pluginVersionStatus.minVersion}`
|
|
93074
93074
|
);
|
|
93075
93075
|
}
|
|
93076
93076
|
const systemConfig = service.getSystemConfig();
|
|
@@ -93088,7 +93088,7 @@ async function runListenerWithLock(options, paths) {
|
|
|
93088
93088
|
onchainosAgentId: "*",
|
|
93089
93089
|
reason: "system-config missing sentryDsn",
|
|
93090
93090
|
pluginId: "@okxweb3/a2a-node",
|
|
93091
|
-
pluginVersion: "0.1.1
|
|
93091
|
+
pluginVersion: "0.1.1"
|
|
93092
93092
|
});
|
|
93093
93093
|
}
|
|
93094
93094
|
logWithTimestamp(
|
|
@@ -96012,11 +96012,11 @@ Commands:
|
|
|
96012
96012
|
update openclaw --release latest
|
|
96013
96013
|
Update an already installed OpenClaw plugin release, then refresh the plugin without restarting.
|
|
96014
96014
|
update openclaw --release latest --restart --yes
|
|
96015
|
-
Update and refresh an already installed OpenClaw plugin release, then restart OpenClaw gateway
|
|
96015
|
+
Update and refresh an already installed OpenClaw plugin release, then restart OpenClaw gateway.
|
|
96016
96016
|
update hermes --release latest
|
|
96017
96017
|
Update an already installed Hermes plugin release without restarting.
|
|
96018
96018
|
update hermes --release latest --restart --yes
|
|
96019
|
-
Update an already installed Hermes plugin release, then restart Hermes gateway
|
|
96019
|
+
Update an already installed Hermes plugin release, then restart Hermes gateway.
|
|
96020
96020
|
|
|
96021
96021
|
Use \`okx-a2a setup\` to detect a runtime and install missing plugins.
|
|
96022
96022
|
`);
|
|
@@ -96116,7 +96116,6 @@ async function handleUpdateCommand(args) {
|
|
|
96116
96116
|
await preflightGatewayUpdateRelease("openclaw", release);
|
|
96117
96117
|
await updateOpenClaw(release, { restart: false, deferRestart: restart, label: "update", allowGatewayRuntime: restart });
|
|
96118
96118
|
if (restart) {
|
|
96119
|
-
await restartNodeDaemonAfterGatewayUpdate(resolvedTarget);
|
|
96120
96119
|
await restartGatewayAfterUpdate(resolvedTarget);
|
|
96121
96120
|
}
|
|
96122
96121
|
warnIfProviderMismatch(resolvedTarget);
|
|
@@ -96126,7 +96125,6 @@ async function handleUpdateCommand(args) {
|
|
|
96126
96125
|
await preflightGatewayUpdateRelease("hermes", release);
|
|
96127
96126
|
await updateHermes(release, { restart: false, deferRestart: restart, label: "update", allowGatewayRuntime: restart });
|
|
96128
96127
|
if (restart) {
|
|
96129
|
-
await restartNodeDaemonAfterGatewayUpdate(resolvedTarget);
|
|
96130
96128
|
await restartGatewayAfterUpdate(resolvedTarget);
|
|
96131
96129
|
}
|
|
96132
96130
|
warnIfProviderMismatch(resolvedTarget);
|
|
@@ -96185,13 +96183,19 @@ async function runSetup(options) {
|
|
|
96185
96183
|
const releasePlan = await resolveSetupRelease(resolvedTarget, options);
|
|
96186
96184
|
console.log(`[setup] target: ${resolvedTarget}`);
|
|
96187
96185
|
if (resolvedTarget === "node") {
|
|
96188
|
-
|
|
96186
|
+
const nodeChange = await detectNodeSetupChange(releasePlan);
|
|
96187
|
+
console.log(`[setup] okx-a2a node CLI installedNode=${nodeChange.nodeVersion ?? "(not installed)"} desiredNode=${nodeChange.desiredNodeVersion}`);
|
|
96188
|
+
if (nodeChange.nodeChanged) {
|
|
96189
|
+
await installNode(releasePlan.nodeRelease, "setup");
|
|
96190
|
+
} else {
|
|
96191
|
+
console.log("[setup] okx-a2a node CLI is already up to date; restart skipped");
|
|
96192
|
+
}
|
|
96189
96193
|
const runtime = detectRuntime();
|
|
96190
96194
|
if (runtime === "codex" || runtime === "claude") {
|
|
96191
96195
|
switchDefaultProviderForSetup(runtime);
|
|
96192
96196
|
}
|
|
96193
|
-
if (runtime === "codex" || runtime === "claude") {
|
|
96194
|
-
await restartNodeDaemonAfterNodeSetup(
|
|
96197
|
+
if (nodeChange.nodeChanged && (runtime === "codex" || runtime === "claude")) {
|
|
96198
|
+
await restartNodeDaemonAfterNodeSetup();
|
|
96195
96199
|
}
|
|
96196
96200
|
return {
|
|
96197
96201
|
ok: true,
|
|
@@ -96265,6 +96269,15 @@ async function runSetup(options) {
|
|
|
96265
96269
|
userMessage: setupReadyMessage(resolvedTarget)
|
|
96266
96270
|
};
|
|
96267
96271
|
}
|
|
96272
|
+
async function detectNodeSetupChange(releasePlan) {
|
|
96273
|
+
const nodeVersion = await getCurrentNodeCliVersion();
|
|
96274
|
+
const desiredNodeVersion = await resolveRequiredNpmPackageVersion("node", releasePlan.nodeRelease);
|
|
96275
|
+
return {
|
|
96276
|
+
nodeVersion,
|
|
96277
|
+
desiredNodeVersion,
|
|
96278
|
+
nodeChanged: nodeVersion !== desiredNodeVersion
|
|
96279
|
+
};
|
|
96280
|
+
}
|
|
96268
96281
|
async function detectSetupChanges(target, releasePlan) {
|
|
96269
96282
|
const desiredGatewayVersion = await resolveRequiredNpmPackageVersion(target, releasePlan.gatewayRelease);
|
|
96270
96283
|
const nodeVersion = await getGlobalNpmPackageVersion(UPDATE_PACKAGES.node);
|
|
@@ -96314,17 +96327,7 @@ function detectSetupTarget() {
|
|
|
96314
96327
|
if (configured === "openclaw" || configured === "hermes") {
|
|
96315
96328
|
return configured;
|
|
96316
96329
|
}
|
|
96317
|
-
|
|
96318
|
-
...commandExists("openclaw") ? ["openclaw"] : [],
|
|
96319
|
-
...commandExists("hermes") || (0, import_node_fs18.existsSync)((0, import_node_path22.join)(process.env.HERMES_HOME ?? (0, import_node_path22.join)((0, import_node_os9.homedir)(), ".hermes"))) ? ["hermes"] : []
|
|
96320
|
-
];
|
|
96321
|
-
if (gatewayProviders.length === 1) {
|
|
96322
|
-
return gatewayProviders[0];
|
|
96323
|
-
}
|
|
96324
|
-
if (gatewayProviders.length > 1) {
|
|
96325
|
-
throw new Error("setup detected both OpenClaw and Hermes. Run `okx-a2a setup openclaw` or `okx-a2a setup hermes`.");
|
|
96326
|
-
}
|
|
96327
|
-
throw new Error("setup could not detect OpenClaw or Hermes. Run `okx-a2a setup openclaw` or `okx-a2a setup hermes`.");
|
|
96330
|
+
throw new Error("setup could not detect OpenClaw or Hermes from the runtime environment. Run `okx-a2a setup openclaw` or `okx-a2a setup hermes`.");
|
|
96328
96331
|
}
|
|
96329
96332
|
function isSetupNeedsUserActionMessage(message) {
|
|
96330
96333
|
return message.includes("setup detected both OpenClaw and Hermes") || message.includes("setup could not detect OpenClaw or Hermes") || message.includes("Refusing to update openclaw from inside the openclaw gateway runtime") || message.includes("Refusing to update hermes from inside the hermes gateway runtime");
|
|
@@ -96373,7 +96376,7 @@ async function getCurrentNodeCliVersion() {
|
|
|
96373
96376
|
return await getGlobalNpmPackageVersion(UPDATE_PACKAGES.node) ?? getBundledNodeCliVersion();
|
|
96374
96377
|
}
|
|
96375
96378
|
function getBundledNodeCliVersion() {
|
|
96376
|
-
return true ? "0.1.1
|
|
96379
|
+
return true ? "0.1.1" : null;
|
|
96377
96380
|
}
|
|
96378
96381
|
function readConfiguredAiProvider() {
|
|
96379
96382
|
const explicit = process.env.OKX_AGENT_TASK_AI_CLI ?? process.env.OKX_A2A_AI_PROVIDER;
|
|
@@ -96412,13 +96415,9 @@ async function restartNodeDaemonAfterSetup(provider) {
|
|
|
96412
96415
|
console.log(`[setup] restarting okx-a2a daemon after node CLI setup with provider=${provider}`);
|
|
96413
96416
|
await runCommand("okx-a2a", ["daemon", "restart", "--provider", provider]);
|
|
96414
96417
|
}
|
|
96415
|
-
async function restartNodeDaemonAfterNodeSetup(
|
|
96416
|
-
console.log(
|
|
96417
|
-
await runCommand("okx-a2a", ["daemon", "restart"
|
|
96418
|
-
}
|
|
96419
|
-
async function restartNodeDaemonAfterGatewayUpdate(provider) {
|
|
96420
|
-
console.log(`[update] restarting okx-a2a daemon after gateway update with provider=${provider}`);
|
|
96421
|
-
await runCommand("okx-a2a", ["daemon", "restart", "--provider", provider]);
|
|
96418
|
+
async function restartNodeDaemonAfterNodeSetup() {
|
|
96419
|
+
console.log("[setup] restarting okx-a2a daemon after node CLI setup");
|
|
96420
|
+
await runCommand("okx-a2a", ["daemon", "restart"]);
|
|
96422
96421
|
}
|
|
96423
96422
|
async function restartGatewayAfterSetup(provider) {
|
|
96424
96423
|
if (provider === "hermes" && detectGatewayInvocation() === "hermes") {
|
|
@@ -97180,7 +97179,6 @@ var init_update_cli = __esm({
|
|
|
97180
97179
|
import_node_os9 = require("node:os");
|
|
97181
97180
|
import_node_path22 = require("node:path");
|
|
97182
97181
|
init_ai_provider();
|
|
97183
|
-
init_ai_command();
|
|
97184
97182
|
init_session_store();
|
|
97185
97183
|
UPDATE_PACKAGES = {
|
|
97186
97184
|
node: "@okxweb3/a2a-node",
|
|
@@ -97216,7 +97214,7 @@ init_sentry_logger();
|
|
|
97216
97214
|
init_sentry_config();
|
|
97217
97215
|
var CURRENT_GATEWAY_SESSION_KEYS_ENV3 = "OKX_A2A_CURRENT_GATEWAY_SESSION_KEYS";
|
|
97218
97216
|
function printUsage2() {
|
|
97219
|
-
console.log(`okx-a2a ${"0.1.1
|
|
97217
|
+
console.log(`okx-a2a ${"0.1.1"}
|
|
97220
97218
|
|
|
97221
97219
|
Usage:
|
|
97222
97220
|
okx-a2a <command> [options]
|
|
@@ -97253,7 +97251,7 @@ Run \`okx-a2a <command> -h\` for command-specific help.
|
|
|
97253
97251
|
`);
|
|
97254
97252
|
}
|
|
97255
97253
|
function printVersion() {
|
|
97256
|
-
console.log("0.1.1
|
|
97254
|
+
console.log("0.1.1");
|
|
97257
97255
|
}
|
|
97258
97256
|
function printDaemonUsage() {
|
|
97259
97257
|
console.log(`Usage: okx-a2a daemon <start|restart|stop|status|autostart> [options]
|
|
@@ -97461,11 +97459,11 @@ Commands:
|
|
|
97461
97459
|
update openclaw --release latest
|
|
97462
97460
|
Update an already installed OpenClaw plugin release, then refresh the plugin without restarting.
|
|
97463
97461
|
update openclaw --release latest --restart --yes
|
|
97464
|
-
Update and refresh an already installed OpenClaw plugin release, then restart OpenClaw gateway
|
|
97462
|
+
Update and refresh an already installed OpenClaw plugin release, then restart OpenClaw gateway.
|
|
97465
97463
|
update hermes --release latest
|
|
97466
97464
|
Update an already installed Hermes plugin release without restarting.
|
|
97467
97465
|
update hermes --release latest --restart --yes
|
|
97468
|
-
Update an already installed Hermes plugin release, then restart Hermes gateway
|
|
97466
|
+
Update an already installed Hermes plugin release, then restart Hermes gateway.
|
|
97469
97467
|
|
|
97470
97468
|
Use \`okx-a2a setup\` to detect a runtime and install missing plugins.
|
|
97471
97469
|
`);
|
package/dist/index.js
CHANGED
|
@@ -86724,7 +86724,7 @@ function buildConnectParams(config, instanceId, protocolVersion) {
|
|
|
86724
86724
|
client: {
|
|
86725
86725
|
id: "gateway-client",
|
|
86726
86726
|
displayName: "okx-a2a-node",
|
|
86727
|
-
version: "0.1.1
|
|
86727
|
+
version: "0.1.1",
|
|
86728
86728
|
platform: "node",
|
|
86729
86729
|
mode: "backend",
|
|
86730
86730
|
instanceId
|
|
@@ -86735,7 +86735,7 @@ function buildConnectParams(config, instanceId, protocolVersion) {
|
|
|
86735
86735
|
commands: [],
|
|
86736
86736
|
permissions: {},
|
|
86737
86737
|
locale: Intl.DateTimeFormat().resolvedOptions().locale || "en-US",
|
|
86738
|
-
userAgent: `okx-a2a-node/${"0.1.1
|
|
86738
|
+
userAgent: `okx-a2a-node/${"0.1.1"}`,
|
|
86739
86739
|
auth: {
|
|
86740
86740
|
...config.token ? { token: config.token } : {},
|
|
86741
86741
|
...config.password ? { password: config.password } : {}
|
|
@@ -91154,7 +91154,7 @@ function userWatchEventDeliveredSentryExtra(event) {
|
|
|
91154
91154
|
var environment = process.env.SENTRY_ENV === "dev" ? "dev" : "prod";
|
|
91155
91155
|
var SENTRY_CONFIG = {
|
|
91156
91156
|
projectName: "okx/openclaw-okx-a2a-extension",
|
|
91157
|
-
release: "0.1.1
|
|
91157
|
+
release: "0.1.1",
|
|
91158
91158
|
environment
|
|
91159
91159
|
};
|
|
91160
91160
|
|
|
@@ -91381,12 +91381,12 @@ async function runListenerWithLock(options, paths) {
|
|
|
91381
91381
|
}));
|
|
91382
91382
|
}
|
|
91383
91383
|
});
|
|
91384
|
-
service.setPluginVersion("0.1.1
|
|
91384
|
+
service.setPluginVersion("0.1.1");
|
|
91385
91385
|
await service.init();
|
|
91386
91386
|
const pluginVersionStatus = service.pluginVersionStatus;
|
|
91387
91387
|
if (pluginVersionStatus.unavailable) {
|
|
91388
91388
|
throw new Error(
|
|
91389
|
-
`@okxweb3/a2a-node v${"0.1.1
|
|
91389
|
+
`@okxweb3/a2a-node v${"0.1.1"} is below the required minimum v${pluginVersionStatus.minVersion}`
|
|
91390
91390
|
);
|
|
91391
91391
|
}
|
|
91392
91392
|
const systemConfig = service.getSystemConfig();
|
|
@@ -91404,7 +91404,7 @@ async function runListenerWithLock(options, paths) {
|
|
|
91404
91404
|
onchainosAgentId: "*",
|
|
91405
91405
|
reason: "system-config missing sentryDsn",
|
|
91406
91406
|
pluginId: "@okxweb3/a2a-node",
|
|
91407
|
-
pluginVersion: "0.1.1
|
|
91407
|
+
pluginVersion: "0.1.1"
|
|
91408
91408
|
});
|
|
91409
91409
|
}
|
|
91410
91410
|
logWithTimestamp(
|
package/package.json
CHANGED