use-agently 0.23.0 → 0.24.0
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/build/bin.js +41 -6
- package/package.json +2 -2
package/build/bin.js
CHANGED
|
@@ -61459,6 +61459,14 @@ function boxen(text, options) {
|
|
|
61459
61459
|
function getOutputFormat(command) {
|
|
61460
61460
|
return command.optsWithGlobals().output ?? "tui";
|
|
61461
61461
|
}
|
|
61462
|
+
function resolveOutputFormat(command) {
|
|
61463
|
+
try {
|
|
61464
|
+
return getOutputFormat(command);
|
|
61465
|
+
} catch (err) {
|
|
61466
|
+
console.warn("Falling back to TUI output after failing to resolve --output option:", err instanceof Error ? err.message : String(err));
|
|
61467
|
+
return "tui";
|
|
61468
|
+
}
|
|
61469
|
+
}
|
|
61462
61470
|
function getMaxWidth() {
|
|
61463
61471
|
return Math.max(process.stdout.columns || 80, 120);
|
|
61464
61472
|
}
|
|
@@ -91820,7 +91828,7 @@ function PayTransaction(wallet) {
|
|
|
91820
91828
|
// ../use-agently-sdk/package.json
|
|
91821
91829
|
var package_default = {
|
|
91822
91830
|
name: "@use-agently/sdk",
|
|
91823
|
-
version: "0.
|
|
91831
|
+
version: "0.24.0",
|
|
91824
91832
|
description: "Core SDK for the Agently platform — wallet management, A2A, MCP, x402 payments",
|
|
91825
91833
|
homepage: "https://github.com/AgentlyHQ/use-agently/tree/main/packages/use-agently-sdk",
|
|
91826
91834
|
bugs: {
|
|
@@ -91864,7 +91872,7 @@ var package_default = {
|
|
|
91864
91872
|
|
|
91865
91873
|
// ../use-agently-sdk/client.ts
|
|
91866
91874
|
function createClient4(options) {
|
|
91867
|
-
const fetch2 = createFetch({ userAgent: options
|
|
91875
|
+
const fetch2 = createFetch({ userAgent: options?.userAgent });
|
|
91868
91876
|
return {
|
|
91869
91877
|
fetch: fetch2
|
|
91870
91878
|
};
|
|
@@ -96487,7 +96495,7 @@ var balanceCommand = new Command("balance").description("Check wallet balance on
|
|
|
96487
96495
|
// package.json
|
|
96488
96496
|
var package_default2 = {
|
|
96489
96497
|
name: "use-agently",
|
|
96490
|
-
version: "0.
|
|
96498
|
+
version: "0.24.0",
|
|
96491
96499
|
description: "Use Agently CLI",
|
|
96492
96500
|
homepage: "https://use-agently.com",
|
|
96493
96501
|
bugs: "https://github.com/AgentlyHQ/use-agently/issues",
|
|
@@ -96511,7 +96519,7 @@ var package_default2 = {
|
|
|
96511
96519
|
test: "bun test"
|
|
96512
96520
|
},
|
|
96513
96521
|
dependencies: {
|
|
96514
|
-
"@use-agently/sdk": "0.
|
|
96522
|
+
"@use-agently/sdk": "0.24.0",
|
|
96515
96523
|
boxen: "^8.0.1",
|
|
96516
96524
|
"cli-table3": "^0.6.5",
|
|
96517
96525
|
commander: "^14.0.3",
|
|
@@ -97336,7 +97344,34 @@ async function flushTelemetry() {
|
|
|
97336
97344
|
} catch {}
|
|
97337
97345
|
}
|
|
97338
97346
|
|
|
97347
|
+
// src/errors.ts
|
|
97348
|
+
function isProcessExitError(err) {
|
|
97349
|
+
return err instanceof Error && err.message === "process.exit";
|
|
97350
|
+
}
|
|
97351
|
+
function handleCliError(err, format) {
|
|
97352
|
+
if (isProcessExitError(err))
|
|
97353
|
+
throw err;
|
|
97354
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
97355
|
+
if (format === "json") {
|
|
97356
|
+
console.error(JSON.stringify({ error: { message } }));
|
|
97357
|
+
} else if (process.stderr.isTTY) {
|
|
97358
|
+
console.error(boxen(message, {
|
|
97359
|
+
title: "Error",
|
|
97360
|
+
titleAlignment: "center",
|
|
97361
|
+
borderColor: "red",
|
|
97362
|
+
padding: 1
|
|
97363
|
+
}));
|
|
97364
|
+
} else {
|
|
97365
|
+
console.error(`Error: ${message}`);
|
|
97366
|
+
}
|
|
97367
|
+
process.exit(1);
|
|
97368
|
+
}
|
|
97369
|
+
|
|
97339
97370
|
// src/bin.ts
|
|
97340
97371
|
installTelemetry(cli);
|
|
97341
|
-
|
|
97342
|
-
await
|
|
97372
|
+
try {
|
|
97373
|
+
await cli.parseAsync();
|
|
97374
|
+
await Promise.all([checkAutoUpdate(), flushTelemetry()]);
|
|
97375
|
+
} catch (err) {
|
|
97376
|
+
handleCliError(err, resolveOutputFormat(cli));
|
|
97377
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "use-agently",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"description": "Use Agently CLI",
|
|
5
5
|
"homepage": "https://use-agently.com",
|
|
6
6
|
"bugs": "https://github.com/AgentlyHQ/use-agently/issues",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"test": "bun test"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@use-agently/sdk": "0.
|
|
27
|
+
"@use-agently/sdk": "0.24.0",
|
|
28
28
|
"boxen": "^8.0.1",
|
|
29
29
|
"cli-table3": "^0.6.5",
|
|
30
30
|
"commander": "^14.0.3",
|