@okxweb3/a2a-node 0.0.12 → 0.0.13-beta-1d2e01866f-260622105420
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 +90 -14
- package/dist/index.js +6 -6
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -7225,7 +7225,7 @@ function buildConnectParams(config, instanceId, protocolVersion) {
|
|
|
7225
7225
|
client: {
|
|
7226
7226
|
id: "gateway-client",
|
|
7227
7227
|
displayName: "okx-a2a-node",
|
|
7228
|
-
version: "0.0.
|
|
7228
|
+
version: "0.0.13-beta-1d2e01866f-260622105420",
|
|
7229
7229
|
platform: "node",
|
|
7230
7230
|
mode: "backend",
|
|
7231
7231
|
instanceId
|
|
@@ -7236,7 +7236,7 @@ function buildConnectParams(config, instanceId, protocolVersion) {
|
|
|
7236
7236
|
commands: [],
|
|
7237
7237
|
permissions: {},
|
|
7238
7238
|
locale: Intl.DateTimeFormat().resolvedOptions().locale || "en-US",
|
|
7239
|
-
userAgent: `okx-a2a-node/${"0.0.
|
|
7239
|
+
userAgent: `okx-a2a-node/${"0.0.13-beta-1d2e01866f-260622105420"}`,
|
|
7240
7240
|
auth: {
|
|
7241
7241
|
...config.token ? { token: config.token } : {},
|
|
7242
7242
|
...config.password ? { password: config.password } : {}
|
|
@@ -23777,7 +23777,7 @@ var init_sentry_config = __esm({
|
|
|
23777
23777
|
environment = process.env.SENTRY_ENV === "dev" ? "dev" : "prod";
|
|
23778
23778
|
SENTRY_CONFIG = {
|
|
23779
23779
|
projectName: "okx/openclaw-okx-a2a-extension",
|
|
23780
|
-
release: "0.0.
|
|
23780
|
+
release: "0.0.13-beta-1d2e01866f-260622105420",
|
|
23781
23781
|
environment
|
|
23782
23782
|
};
|
|
23783
23783
|
}
|
|
@@ -90740,12 +90740,12 @@ async function runListenerWithLock(options, paths) {
|
|
|
90740
90740
|
}));
|
|
90741
90741
|
}
|
|
90742
90742
|
});
|
|
90743
|
-
service.setPluginVersion("0.0.
|
|
90743
|
+
service.setPluginVersion("0.0.13-beta-1d2e01866f-260622105420");
|
|
90744
90744
|
await service.init();
|
|
90745
90745
|
const pluginVersionStatus = service.pluginVersionStatus;
|
|
90746
90746
|
if (pluginVersionStatus.unavailable) {
|
|
90747
90747
|
throw new Error(
|
|
90748
|
-
`@okxweb3/a2a-node v${"0.0.
|
|
90748
|
+
`@okxweb3/a2a-node v${"0.0.13-beta-1d2e01866f-260622105420"} is below the required minimum v${pluginVersionStatus.minVersion}`
|
|
90749
90749
|
);
|
|
90750
90750
|
}
|
|
90751
90751
|
const systemConfig = service.getSystemConfig();
|
|
@@ -90763,7 +90763,7 @@ async function runListenerWithLock(options, paths) {
|
|
|
90763
90763
|
onchainosAgentId: "*",
|
|
90764
90764
|
reason: "system-config missing sentryDsn",
|
|
90765
90765
|
pluginId: "@okxweb3/a2a-node",
|
|
90766
|
-
pluginVersion: "0.0.
|
|
90766
|
+
pluginVersion: "0.0.13-beta-1d2e01866f-260622105420"
|
|
90767
90767
|
});
|
|
90768
90768
|
}
|
|
90769
90769
|
console.log(
|
|
@@ -93281,6 +93281,7 @@ __export(update_cli_exports, {
|
|
|
93281
93281
|
handleUpdateCommand: () => handleUpdateCommand,
|
|
93282
93282
|
isPrereleaseVersion: () => isPrereleaseVersion,
|
|
93283
93283
|
normalizeHermesOkxA2aPluginConfig: () => normalizeHermesOkxA2aPluginConfig,
|
|
93284
|
+
parseOpenClawPluginList: () => parseOpenClawPluginList,
|
|
93284
93285
|
parsePluginYamlVersion: () => parsePluginYamlVersion,
|
|
93285
93286
|
parseSetupArgs: () => parseSetupArgs,
|
|
93286
93287
|
parseUpdateArgs: () => parseUpdateArgs,
|
|
@@ -93610,7 +93611,7 @@ function isPrereleaseVersion(version2) {
|
|
|
93610
93611
|
}
|
|
93611
93612
|
function getCurrentNodeCliVersion() {
|
|
93612
93613
|
try {
|
|
93613
|
-
return "0.0.
|
|
93614
|
+
return "0.0.13-beta-1d2e01866f-260622105420";
|
|
93614
93615
|
} catch {
|
|
93615
93616
|
return null;
|
|
93616
93617
|
}
|
|
@@ -93663,9 +93664,6 @@ async function updateOpenClaw(release, options) {
|
|
|
93663
93664
|
if (!version2) {
|
|
93664
93665
|
throw new Error(`Unable to resolve ${UPDATE_PACKAGES.openclaw}@${release}`);
|
|
93665
93666
|
}
|
|
93666
|
-
const spec = buildNpmPackageSpec("openclaw", release);
|
|
93667
|
-
console.log(`[${label}] installing ${spec}`);
|
|
93668
|
-
await runCommand("npm", ["install", "-g", spec]);
|
|
93669
93667
|
await updateMatchingNode("openclaw", release, label, version2);
|
|
93670
93668
|
const pluginSpec = buildNpmPackageSpec("openclaw", version2);
|
|
93671
93669
|
console.log(`[${label}] reinstalling OpenClaw plugin okx-a2a from ${pluginSpec}`);
|
|
@@ -93834,7 +93832,7 @@ async function assertGatewayPluginInstalled(target) {
|
|
|
93834
93832
|
}
|
|
93835
93833
|
async function isGatewayPluginInstalled(target) {
|
|
93836
93834
|
if (target === "openclaw") {
|
|
93837
|
-
return await
|
|
93835
|
+
return (await getInstalledOpenClawPluginInfo()).installed;
|
|
93838
93836
|
}
|
|
93839
93837
|
if ((0, import_node_fs17.existsSync)((0, import_node_path21.join)(process.env.HERMES_HOME ?? (0, import_node_path21.join)((0, import_node_os6.homedir)(), ".hermes"), "plugins", "platforms", "okx-a2a", "plugin.yaml"))) {
|
|
93840
93838
|
return true;
|
|
@@ -93849,7 +93847,85 @@ async function getInstalledGatewayPluginVersion(target) {
|
|
|
93849
93847
|
if (target === "hermes") {
|
|
93850
93848
|
return await getInstalledHermesPluginVersion() ?? await getGlobalNpmPackageVersion(UPDATE_PACKAGES.hermes);
|
|
93851
93849
|
}
|
|
93852
|
-
return await
|
|
93850
|
+
return (await getInstalledOpenClawPluginInfo()).version;
|
|
93851
|
+
}
|
|
93852
|
+
async function getInstalledOpenClawPluginInfo() {
|
|
93853
|
+
let result = await runCommandCaptureOptional("openclaw", ["plugins", "list", "--json"]);
|
|
93854
|
+
if (!result.ok) {
|
|
93855
|
+
result = await runCommandCaptureOptional("openclaw", ["plugins", "list"]);
|
|
93856
|
+
}
|
|
93857
|
+
if (!result.ok) {
|
|
93858
|
+
return { installed: false, version: null };
|
|
93859
|
+
}
|
|
93860
|
+
return parseOpenClawPluginList(result.stdout);
|
|
93861
|
+
}
|
|
93862
|
+
function parseOpenClawPluginList(output4) {
|
|
93863
|
+
if (!output4.trim()) {
|
|
93864
|
+
return { installed: false, version: null };
|
|
93865
|
+
}
|
|
93866
|
+
try {
|
|
93867
|
+
return findOpenClawPluginInJson(JSON.parse(output4));
|
|
93868
|
+
} catch {
|
|
93869
|
+
return {
|
|
93870
|
+
installed: output4.includes(UPDATE_PACKAGES.openclaw) || /(^|[\s@/])okx-a2a($|[\s@])/.test(output4),
|
|
93871
|
+
version: parsePackageVersionFromText(output4)
|
|
93872
|
+
};
|
|
93873
|
+
}
|
|
93874
|
+
}
|
|
93875
|
+
function findOpenClawPluginInJson(value) {
|
|
93876
|
+
if (Array.isArray(value)) {
|
|
93877
|
+
for (const item of value) {
|
|
93878
|
+
const found = findOpenClawPluginInJson(item);
|
|
93879
|
+
if (found.installed) {
|
|
93880
|
+
return found;
|
|
93881
|
+
}
|
|
93882
|
+
}
|
|
93883
|
+
return { installed: false, version: null };
|
|
93884
|
+
}
|
|
93885
|
+
if (!value || typeof value !== "object") {
|
|
93886
|
+
return { installed: false, version: null };
|
|
93887
|
+
}
|
|
93888
|
+
const record = value;
|
|
93889
|
+
if (isOpenClawPluginRecord(record)) {
|
|
93890
|
+
return { installed: true, version: readVersionField(record) };
|
|
93891
|
+
}
|
|
93892
|
+
const dependencies = record.dependencies;
|
|
93893
|
+
if (dependencies && typeof dependencies === "object") {
|
|
93894
|
+
const dependency = dependencies[UPDATE_PACKAGES.openclaw] ?? dependencies["okx-a2a"];
|
|
93895
|
+
if (dependency && typeof dependency === "object") {
|
|
93896
|
+
return { installed: true, version: readVersionField(dependency) };
|
|
93897
|
+
}
|
|
93898
|
+
}
|
|
93899
|
+
for (const key of ["plugins", "items", "data", "installed"]) {
|
|
93900
|
+
const child = record[key];
|
|
93901
|
+
if (child !== void 0) {
|
|
93902
|
+
const found = findOpenClawPluginInJson(child);
|
|
93903
|
+
if (found.installed) {
|
|
93904
|
+
return found;
|
|
93905
|
+
}
|
|
93906
|
+
}
|
|
93907
|
+
}
|
|
93908
|
+
return { installed: false, version: null };
|
|
93909
|
+
}
|
|
93910
|
+
function isOpenClawPluginRecord(record) {
|
|
93911
|
+
return Object.values(record).some((value) => {
|
|
93912
|
+
if (typeof value !== "string") {
|
|
93913
|
+
return false;
|
|
93914
|
+
}
|
|
93915
|
+
return value === "okx-a2a" || value === UPDATE_PACKAGES.openclaw || value.endsWith("/okx-a2a");
|
|
93916
|
+
});
|
|
93917
|
+
}
|
|
93918
|
+
function readVersionField(record) {
|
|
93919
|
+
for (const key of ["version", "installedVersion", "packageVersion"]) {
|
|
93920
|
+
const value = record[key];
|
|
93921
|
+
if (typeof value === "string" && value.trim()) {
|
|
93922
|
+
return value.trim();
|
|
93923
|
+
}
|
|
93924
|
+
}
|
|
93925
|
+
return null;
|
|
93926
|
+
}
|
|
93927
|
+
function parsePackageVersionFromText(output4) {
|
|
93928
|
+
return output4.match(/@okxweb3\/a2a-openclaw@([0-9A-Za-z.+-]+)/)?.[1] ?? null;
|
|
93853
93929
|
}
|
|
93854
93930
|
async function getInstalledHermesPluginVersion() {
|
|
93855
93931
|
const pluginYaml = (0, import_node_path21.join)(process.env.HERMES_HOME ?? (0, import_node_path21.join)((0, import_node_os6.homedir)(), ".hermes"), "plugins", "platforms", "okx-a2a", "plugin.yaml");
|
|
@@ -94073,7 +94149,7 @@ init_task_config();
|
|
|
94073
94149
|
init_sentry_logger();
|
|
94074
94150
|
init_sentry_config();
|
|
94075
94151
|
function printUsage2() {
|
|
94076
|
-
console.log(`okx-a2a ${"0.0.
|
|
94152
|
+
console.log(`okx-a2a ${"0.0.13-beta-1d2e01866f-260622105420"}
|
|
94077
94153
|
|
|
94078
94154
|
Usage:
|
|
94079
94155
|
okx-a2a <command> [options]
|
|
@@ -94110,7 +94186,7 @@ Run \`okx-a2a <command> -h\` for command-specific help.
|
|
|
94110
94186
|
`);
|
|
94111
94187
|
}
|
|
94112
94188
|
function printVersion() {
|
|
94113
|
-
console.log("0.0.
|
|
94189
|
+
console.log("0.0.13-beta-1d2e01866f-260622105420");
|
|
94114
94190
|
}
|
|
94115
94191
|
function printDaemonUsage() {
|
|
94116
94192
|
console.log(`Usage: okx-a2a daemon <start|restart|stop|status> [options]
|
package/dist/index.js
CHANGED
|
@@ -85891,7 +85891,7 @@ function buildConnectParams(config, instanceId, protocolVersion) {
|
|
|
85891
85891
|
client: {
|
|
85892
85892
|
id: "gateway-client",
|
|
85893
85893
|
displayName: "okx-a2a-node",
|
|
85894
|
-
version: "0.0.
|
|
85894
|
+
version: "0.0.13-beta-1d2e01866f-260622105420",
|
|
85895
85895
|
platform: "node",
|
|
85896
85896
|
mode: "backend",
|
|
85897
85897
|
instanceId
|
|
@@ -85902,7 +85902,7 @@ function buildConnectParams(config, instanceId, protocolVersion) {
|
|
|
85902
85902
|
commands: [],
|
|
85903
85903
|
permissions: {},
|
|
85904
85904
|
locale: Intl.DateTimeFormat().resolvedOptions().locale || "en-US",
|
|
85905
|
-
userAgent: `okx-a2a-node/${"0.0.
|
|
85905
|
+
userAgent: `okx-a2a-node/${"0.0.13-beta-1d2e01866f-260622105420"}`,
|
|
85906
85906
|
auth: {
|
|
85907
85907
|
...config.token ? { token: config.token } : {},
|
|
85908
85908
|
...config.password ? { password: config.password } : {}
|
|
@@ -89317,7 +89317,7 @@ function userWatchEventDeliveredSentryExtra(event) {
|
|
|
89317
89317
|
var environment = process.env.SENTRY_ENV === "dev" ? "dev" : "prod";
|
|
89318
89318
|
var SENTRY_CONFIG = {
|
|
89319
89319
|
projectName: "okx/openclaw-okx-a2a-extension",
|
|
89320
|
-
release: "0.0.
|
|
89320
|
+
release: "0.0.13-beta-1d2e01866f-260622105420",
|
|
89321
89321
|
environment
|
|
89322
89322
|
};
|
|
89323
89323
|
|
|
@@ -89436,12 +89436,12 @@ async function runListenerWithLock(options, paths) {
|
|
|
89436
89436
|
}));
|
|
89437
89437
|
}
|
|
89438
89438
|
});
|
|
89439
|
-
service.setPluginVersion("0.0.
|
|
89439
|
+
service.setPluginVersion("0.0.13-beta-1d2e01866f-260622105420");
|
|
89440
89440
|
await service.init();
|
|
89441
89441
|
const pluginVersionStatus = service.pluginVersionStatus;
|
|
89442
89442
|
if (pluginVersionStatus.unavailable) {
|
|
89443
89443
|
throw new Error(
|
|
89444
|
-
`@okxweb3/a2a-node v${"0.0.
|
|
89444
|
+
`@okxweb3/a2a-node v${"0.0.13-beta-1d2e01866f-260622105420"} is below the required minimum v${pluginVersionStatus.minVersion}`
|
|
89445
89445
|
);
|
|
89446
89446
|
}
|
|
89447
89447
|
const systemConfig = service.getSystemConfig();
|
|
@@ -89459,7 +89459,7 @@ async function runListenerWithLock(options, paths) {
|
|
|
89459
89459
|
onchainosAgentId: "*",
|
|
89460
89460
|
reason: "system-config missing sentryDsn",
|
|
89461
89461
|
pluginId: "@okxweb3/a2a-node",
|
|
89462
|
-
pluginVersion: "0.0.
|
|
89462
|
+
pluginVersion: "0.0.13-beta-1d2e01866f-260622105420"
|
|
89463
89463
|
});
|
|
89464
89464
|
}
|
|
89465
89465
|
console.log(
|
package/package.json
CHANGED