@okxweb3/a2a-node 0.2.14 → 0.2.15
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 +30 -15
- package/dist/index.js +27 -12
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2703,7 +2703,7 @@ __export(autostart_exports, {
|
|
|
2703
2703
|
uninstallSystemdAutostart: () => uninstallSystemdAutostart
|
|
2704
2704
|
});
|
|
2705
2705
|
function isSystemdManagerUnavailableMessage(message) {
|
|
2706
|
-
return /spawn systemctl ENOENT|system has not been booted with systemd|failed to connect to bus|systemctl shim:\s*unsupported unit\b/i.test(message);
|
|
2706
|
+
return /spawn systemctl ENOENT|system has not been booted with systemd|["']?systemd["']?\s+is not running|failed to connect to bus|systemctl shim:\s*unsupported unit\b/i.test(message);
|
|
2707
2707
|
}
|
|
2708
2708
|
function isAutostartManagerUnavailableError(error) {
|
|
2709
2709
|
return error instanceof AutostartManagerUnavailableError || typeof error === "object" && error !== null && "code" in error && error.code === "AUTOSTART_MANAGER_UNAVAILABLE";
|
|
@@ -2818,8 +2818,23 @@ async function runSystemctl(args, options = {}) {
|
|
|
2818
2818
|
timeout: 3e4,
|
|
2819
2819
|
env: process.env
|
|
2820
2820
|
});
|
|
2821
|
-
|
|
2821
|
+
const stdout = String(result.stdout ?? "");
|
|
2822
|
+
const stderr = String(result.stderr ?? "");
|
|
2823
|
+
const message = (stderr || stdout).trim();
|
|
2824
|
+
if (isSystemdManagerUnavailableMessage(message)) {
|
|
2825
|
+
if (options.tolerateFailure) {
|
|
2826
|
+
return { stdout, stderr, ok: false };
|
|
2827
|
+
}
|
|
2828
|
+
throw new AutostartManagerUnavailableError(message);
|
|
2829
|
+
}
|
|
2830
|
+
return { stdout, stderr, ok: true };
|
|
2822
2831
|
} catch (err2) {
|
|
2832
|
+
if (err2 instanceof AutostartManagerUnavailableError) {
|
|
2833
|
+
if (options.tolerateFailure) {
|
|
2834
|
+
return { stdout: "", stderr: err2.message, ok: false };
|
|
2835
|
+
}
|
|
2836
|
+
throw err2;
|
|
2837
|
+
}
|
|
2823
2838
|
const e = err2;
|
|
2824
2839
|
const stdout = String(e.stdout ?? "");
|
|
2825
2840
|
const stderr = String(e.stderr ?? e.message ?? err2);
|
|
@@ -26925,7 +26940,7 @@ function buildConnectParams(config, instanceId, protocolVersion) {
|
|
|
26925
26940
|
client: {
|
|
26926
26941
|
id: "gateway-client",
|
|
26927
26942
|
displayName: "okx-a2a-node",
|
|
26928
|
-
version: "0.2.
|
|
26943
|
+
version: "0.2.15",
|
|
26929
26944
|
platform: "node",
|
|
26930
26945
|
mode: "backend",
|
|
26931
26946
|
instanceId
|
|
@@ -26936,7 +26951,7 @@ function buildConnectParams(config, instanceId, protocolVersion) {
|
|
|
26936
26951
|
commands: [],
|
|
26937
26952
|
permissions: {},
|
|
26938
26953
|
locale: Intl.DateTimeFormat().resolvedOptions().locale || "en-US",
|
|
26939
|
-
userAgent: `okx-a2a-node/${"0.2.
|
|
26954
|
+
userAgent: `okx-a2a-node/${"0.2.15"}`,
|
|
26940
26955
|
auth: {
|
|
26941
26956
|
...config.token ? { token: config.token } : {},
|
|
26942
26957
|
...config.password ? { password: config.password } : {}
|
|
@@ -28995,7 +29010,7 @@ var init_sentry_config = __esm({
|
|
|
28995
29010
|
environment = process.env.SENTRY_ENV === "dev" ? "dev" : "prod";
|
|
28996
29011
|
SENTRY_CONFIG = {
|
|
28997
29012
|
projectName: "okx/openclaw-okx-a2a-extension",
|
|
28998
|
-
release: "0.2.
|
|
29013
|
+
release: "0.2.15",
|
|
28999
29014
|
environment,
|
|
29000
29015
|
runtimeContainer: normalizeRuntimeContainer(process.env.OKX_A2A_RUNTIME_CONTAINER)
|
|
29001
29016
|
};
|
|
@@ -40165,7 +40180,7 @@ async function exportDiagnosticLogs(options) {
|
|
|
40165
40180
|
node: process.version,
|
|
40166
40181
|
platform: process.platform,
|
|
40167
40182
|
arch: process.arch,
|
|
40168
|
-
packageVersion: true ? "0.2.
|
|
40183
|
+
packageVersion: true ? "0.2.15" : "unknown",
|
|
40169
40184
|
sensitiveContentIncluded: options.includeSensitiveContent,
|
|
40170
40185
|
listenerAndLlmContentIncluded: true,
|
|
40171
40186
|
credentialsAlwaysRedacted: true,
|
|
@@ -69671,12 +69686,12 @@ async function runListenerWithLock(options, paths) {
|
|
|
69671
69686
|
});
|
|
69672
69687
|
}
|
|
69673
69688
|
});
|
|
69674
|
-
service.setPluginVersion("0.2.
|
|
69689
|
+
service.setPluginVersion("0.2.15");
|
|
69675
69690
|
await service.init();
|
|
69676
69691
|
const pluginVersionStatus = service.pluginVersionStatus;
|
|
69677
69692
|
if (pluginVersionStatus.unavailable) {
|
|
69678
69693
|
throw new Error(
|
|
69679
|
-
`@okxweb3/a2a-node v${"0.2.
|
|
69694
|
+
`@okxweb3/a2a-node v${"0.2.15"} is below the required minimum v${pluginVersionStatus.minVersion}`
|
|
69680
69695
|
);
|
|
69681
69696
|
}
|
|
69682
69697
|
const systemConfig = service.getSystemConfig();
|
|
@@ -69704,7 +69719,7 @@ async function runListenerWithLock(options, paths) {
|
|
|
69704
69719
|
onchainosAgentId: "*",
|
|
69705
69720
|
reason: "system-config missing sentryDsn",
|
|
69706
69721
|
pluginId: "@okxweb3/a2a-node",
|
|
69707
|
-
pluginVersion: "0.2.
|
|
69722
|
+
pluginVersion: "0.2.15"
|
|
69708
69723
|
});
|
|
69709
69724
|
}
|
|
69710
69725
|
logWithTimestamp(
|
|
@@ -118046,7 +118061,7 @@ async function getCurrentNodeCliVersion() {
|
|
|
118046
118061
|
return await getGlobalNpmPackageVersion(UPDATE_PACKAGES.node) ?? getBundledNodeCliVersion();
|
|
118047
118062
|
}
|
|
118048
118063
|
function getBundledNodeCliVersion() {
|
|
118049
|
-
return true ? "0.2.
|
|
118064
|
+
return true ? "0.2.15" : null;
|
|
118050
118065
|
}
|
|
118051
118066
|
function readConfiguredAiProvider() {
|
|
118052
118067
|
const explicit = process.env.OKX_A2A_AI_PROVIDER || process.env.OKX_AGENT_TASK_AI_CLI;
|
|
@@ -118256,7 +118271,7 @@ async function updateHermes(release, options) {
|
|
|
118256
118271
|
}
|
|
118257
118272
|
}
|
|
118258
118273
|
async function installGatewayPluginForDoctor(target) {
|
|
118259
|
-
const release = isPrereleaseVersion("0.2.
|
|
118274
|
+
const release = isPrereleaseVersion("0.2.15") ? "beta" : "latest";
|
|
118260
118275
|
const insideTargetGateway = detectGatewayInvocation() === target;
|
|
118261
118276
|
const options = {
|
|
118262
118277
|
restart: !insideTargetGateway,
|
|
@@ -119309,7 +119324,7 @@ async function runDoctor(options = {}) {
|
|
|
119309
119324
|
platform: options.platform ?? process.platform,
|
|
119310
119325
|
env: options.env ?? process.env,
|
|
119311
119326
|
target: options.target ?? resolveDoctorTarget(options.env ?? process.env),
|
|
119312
|
-
cliVersion: options.cliVersion ?? (true ? "0.2.
|
|
119327
|
+
cliVersion: options.cliVersion ?? (true ? "0.2.15" : "0.0.0"),
|
|
119313
119328
|
fixMode: options.fix === true,
|
|
119314
119329
|
nonInteractive: options.nonInteractive === true,
|
|
119315
119330
|
packageChanged: false,
|
|
@@ -120416,7 +120431,7 @@ init_sentry_config();
|
|
|
120416
120431
|
init_runtime_metadata();
|
|
120417
120432
|
var CURRENT_GATEWAY_SESSION_KEYS_ENV4 = "OKX_A2A_CURRENT_GATEWAY_SESSION_KEYS";
|
|
120418
120433
|
function printUsage3() {
|
|
120419
|
-
console.log(`okx-a2a ${"0.2.
|
|
120434
|
+
console.log(`okx-a2a ${"0.2.15"}
|
|
120420
120435
|
|
|
120421
120436
|
Usage:
|
|
120422
120437
|
okx-a2a <command> [options]
|
|
@@ -120458,7 +120473,7 @@ Run \`okx-a2a <command> -h\` for command-specific help.
|
|
|
120458
120473
|
`);
|
|
120459
120474
|
}
|
|
120460
120475
|
function printVersion() {
|
|
120461
|
-
console.log("0.2.
|
|
120476
|
+
console.log("0.2.15");
|
|
120462
120477
|
}
|
|
120463
120478
|
function printDaemonUsage() {
|
|
120464
120479
|
console.log(`Usage: okx-a2a daemon <start|restart|stop|status|autostart> [options]
|
|
@@ -121948,7 +121963,7 @@ async function main() {
|
|
|
121948
121963
|
if (command === "xmtp-test") {
|
|
121949
121964
|
const { handleXmtpTestCommand: handleXmtpTestCommand2 } = await Promise.resolve().then(() => (init_xmtp_test_cli(), xmtp_test_cli_exports));
|
|
121950
121965
|
await handleXmtpTestCommand2(process.argv.slice(3), {
|
|
121951
|
-
packageVersion: "0.2.
|
|
121966
|
+
packageVersion: "0.2.15",
|
|
121952
121967
|
agentSdkVersion: "2.3.0",
|
|
121953
121968
|
nodeSdkVersion: "6.1.0",
|
|
121954
121969
|
nodeBindingsVersion: "1.11.0"
|
package/dist/index.js
CHANGED
|
@@ -2724,7 +2724,7 @@ __export(autostart_exports, {
|
|
|
2724
2724
|
uninstallSystemdAutostart: () => uninstallSystemdAutostart
|
|
2725
2725
|
});
|
|
2726
2726
|
function isSystemdManagerUnavailableMessage(message) {
|
|
2727
|
-
return /spawn systemctl ENOENT|system has not been booted with systemd|failed to connect to bus|systemctl shim:\s*unsupported unit\b/i.test(message);
|
|
2727
|
+
return /spawn systemctl ENOENT|system has not been booted with systemd|["']?systemd["']?\s+is not running|failed to connect to bus|systemctl shim:\s*unsupported unit\b/i.test(message);
|
|
2728
2728
|
}
|
|
2729
2729
|
function isAutostartManagerUnavailableError(error) {
|
|
2730
2730
|
return error instanceof AutostartManagerUnavailableError || typeof error === "object" && error !== null && "code" in error && error.code === "AUTOSTART_MANAGER_UNAVAILABLE";
|
|
@@ -2839,8 +2839,23 @@ async function runSystemctl(args, options = {}) {
|
|
|
2839
2839
|
timeout: 3e4,
|
|
2840
2840
|
env: process.env
|
|
2841
2841
|
});
|
|
2842
|
-
|
|
2842
|
+
const stdout = String(result.stdout ?? "");
|
|
2843
|
+
const stderr = String(result.stderr ?? "");
|
|
2844
|
+
const message = (stderr || stdout).trim();
|
|
2845
|
+
if (isSystemdManagerUnavailableMessage(message)) {
|
|
2846
|
+
if (options.tolerateFailure) {
|
|
2847
|
+
return { stdout, stderr, ok: false };
|
|
2848
|
+
}
|
|
2849
|
+
throw new AutostartManagerUnavailableError(message);
|
|
2850
|
+
}
|
|
2851
|
+
return { stdout, stderr, ok: true };
|
|
2843
2852
|
} catch (err) {
|
|
2853
|
+
if (err instanceof AutostartManagerUnavailableError) {
|
|
2854
|
+
if (options.tolerateFailure) {
|
|
2855
|
+
return { stdout: "", stderr: err.message, ok: false };
|
|
2856
|
+
}
|
|
2857
|
+
throw err;
|
|
2858
|
+
}
|
|
2844
2859
|
const e = err;
|
|
2845
2860
|
const stdout = String(e.stdout ?? "");
|
|
2846
2861
|
const stderr = String(e.stderr ?? e.message ?? err);
|
|
@@ -32434,7 +32449,7 @@ var init_sentry_config = __esm({
|
|
|
32434
32449
|
environment = process.env.SENTRY_ENV === "dev" ? "dev" : "prod";
|
|
32435
32450
|
SENTRY_CONFIG = {
|
|
32436
32451
|
projectName: "okx/openclaw-okx-a2a-extension",
|
|
32437
|
-
release: "0.2.
|
|
32452
|
+
release: "0.2.15",
|
|
32438
32453
|
environment,
|
|
32439
32454
|
runtimeContainer: normalizeRuntimeContainer(process.env.OKX_A2A_RUNTIME_CONTAINER)
|
|
32440
32455
|
};
|
|
@@ -33390,7 +33405,7 @@ async function getCurrentNodeCliVersion() {
|
|
|
33390
33405
|
return await getGlobalNpmPackageVersion(UPDATE_PACKAGES.node) ?? getBundledNodeCliVersion();
|
|
33391
33406
|
}
|
|
33392
33407
|
function getBundledNodeCliVersion() {
|
|
33393
|
-
return true ? "0.2.
|
|
33408
|
+
return true ? "0.2.15" : null;
|
|
33394
33409
|
}
|
|
33395
33410
|
function readConfiguredAiProvider() {
|
|
33396
33411
|
const explicit = process.env.OKX_A2A_AI_PROVIDER || process.env.OKX_AGENT_TASK_AI_CLI;
|
|
@@ -33600,7 +33615,7 @@ async function updateHermes(release, options) {
|
|
|
33600
33615
|
}
|
|
33601
33616
|
}
|
|
33602
33617
|
async function installGatewayPluginForDoctor(target) {
|
|
33603
|
-
const release = isPrereleaseVersion("0.2.
|
|
33618
|
+
const release = isPrereleaseVersion("0.2.15") ? "beta" : "latest";
|
|
33604
33619
|
const insideTargetGateway = detectGatewayInvocation() === target;
|
|
33605
33620
|
const options = {
|
|
33606
33621
|
restart: !insideTargetGateway,
|
|
@@ -61318,7 +61333,7 @@ function buildConnectParams(config, instanceId, protocolVersion) {
|
|
|
61318
61333
|
client: {
|
|
61319
61334
|
id: "gateway-client",
|
|
61320
61335
|
displayName: "okx-a2a-node",
|
|
61321
|
-
version: "0.2.
|
|
61336
|
+
version: "0.2.15",
|
|
61322
61337
|
platform: "node",
|
|
61323
61338
|
mode: "backend",
|
|
61324
61339
|
instanceId
|
|
@@ -61329,7 +61344,7 @@ function buildConnectParams(config, instanceId, protocolVersion) {
|
|
|
61329
61344
|
commands: [],
|
|
61330
61345
|
permissions: {},
|
|
61331
61346
|
locale: Intl.DateTimeFormat().resolvedOptions().locale || "en-US",
|
|
61332
|
-
userAgent: `okx-a2a-node/${"0.2.
|
|
61347
|
+
userAgent: `okx-a2a-node/${"0.2.15"}`,
|
|
61333
61348
|
auth: {
|
|
61334
61349
|
...config.token ? { token: config.token } : {},
|
|
61335
61350
|
...config.password ? { password: config.password } : {}
|
|
@@ -67668,12 +67683,12 @@ async function runListenerWithLock(options, paths) {
|
|
|
67668
67683
|
});
|
|
67669
67684
|
}
|
|
67670
67685
|
});
|
|
67671
|
-
service.setPluginVersion("0.2.
|
|
67686
|
+
service.setPluginVersion("0.2.15");
|
|
67672
67687
|
await service.init();
|
|
67673
67688
|
const pluginVersionStatus = service.pluginVersionStatus;
|
|
67674
67689
|
if (pluginVersionStatus.unavailable) {
|
|
67675
67690
|
throw new Error(
|
|
67676
|
-
`@okxweb3/a2a-node v${"0.2.
|
|
67691
|
+
`@okxweb3/a2a-node v${"0.2.15"} is below the required minimum v${pluginVersionStatus.minVersion}`
|
|
67677
67692
|
);
|
|
67678
67693
|
}
|
|
67679
67694
|
const systemConfig = service.getSystemConfig();
|
|
@@ -67701,7 +67716,7 @@ async function runListenerWithLock(options, paths) {
|
|
|
67701
67716
|
onchainosAgentId: "*",
|
|
67702
67717
|
reason: "system-config missing sentryDsn",
|
|
67703
67718
|
pluginId: "@okxweb3/a2a-node",
|
|
67704
|
-
pluginVersion: "0.2.
|
|
67719
|
+
pluginVersion: "0.2.15"
|
|
67705
67720
|
});
|
|
67706
67721
|
}
|
|
67707
67722
|
logWithTimestamp(
|
|
@@ -70474,7 +70489,7 @@ async function exportDiagnosticLogs(options) {
|
|
|
70474
70489
|
node: process.version,
|
|
70475
70490
|
platform: process.platform,
|
|
70476
70491
|
arch: process.arch,
|
|
70477
|
-
packageVersion: true ? "0.2.
|
|
70492
|
+
packageVersion: true ? "0.2.15" : "unknown",
|
|
70478
70493
|
sensitiveContentIncluded: options.includeSensitiveContent,
|
|
70479
70494
|
listenerAndLlmContentIncluded: true,
|
|
70480
70495
|
credentialsAlwaysRedacted: true,
|
|
@@ -72386,7 +72401,7 @@ async function runDoctor(options = {}) {
|
|
|
72386
72401
|
platform: options.platform ?? process.platform,
|
|
72387
72402
|
env: options.env ?? process.env,
|
|
72388
72403
|
target: options.target ?? resolveDoctorTarget(options.env ?? process.env),
|
|
72389
|
-
cliVersion: options.cliVersion ?? (true ? "0.2.
|
|
72404
|
+
cliVersion: options.cliVersion ?? (true ? "0.2.15" : "0.0.0"),
|
|
72390
72405
|
fixMode: options.fix === true,
|
|
72391
72406
|
nonInteractive: options.nonInteractive === true,
|
|
72392
72407
|
packageChanged: false,
|