use-agently 0.22.0 → 0.23.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 +105 -12
- package/package.json +2 -2
package/build/bin.js
CHANGED
|
@@ -91820,7 +91820,7 @@ function PayTransaction(wallet) {
|
|
|
91820
91820
|
// ../use-agently-sdk/package.json
|
|
91821
91821
|
var package_default = {
|
|
91822
91822
|
name: "@use-agently/sdk",
|
|
91823
|
-
version: "0.
|
|
91823
|
+
version: "0.23.0",
|
|
91824
91824
|
description: "Core SDK for the Agently platform — wallet management, A2A, MCP, x402 payments",
|
|
91825
91825
|
homepage: "https://github.com/AgentlyHQ/use-agently/tree/main/packages/use-agently-sdk",
|
|
91826
91826
|
bugs: {
|
|
@@ -96487,7 +96487,7 @@ var balanceCommand = new Command("balance").description("Check wallet balance on
|
|
|
96487
96487
|
// package.json
|
|
96488
96488
|
var package_default2 = {
|
|
96489
96489
|
name: "use-agently",
|
|
96490
|
-
version: "0.
|
|
96490
|
+
version: "0.23.0",
|
|
96491
96491
|
description: "Use Agently CLI",
|
|
96492
96492
|
homepage: "https://use-agently.com",
|
|
96493
96493
|
bugs: "https://github.com/AgentlyHQ/use-agently/issues",
|
|
@@ -96511,7 +96511,7 @@ var package_default2 = {
|
|
|
96511
96511
|
test: "bun test"
|
|
96512
96512
|
},
|
|
96513
96513
|
dependencies: {
|
|
96514
|
-
"@use-agently/sdk": "0.
|
|
96514
|
+
"@use-agently/sdk": "0.23.0",
|
|
96515
96515
|
boxen: "^8.0.1",
|
|
96516
96516
|
"cli-table3": "^0.6.5",
|
|
96517
96517
|
commander: "^14.0.3",
|
|
@@ -96633,15 +96633,15 @@ ${item.description}`, (item.protocols ?? []).join(", ")]);
|
|
|
96633
96633
|
}
|
|
96634
96634
|
|
|
96635
96635
|
// src/commands/search.ts
|
|
96636
|
-
var searchCommand = new Command("search").description("Search the Agently marketplace for agents").
|
|
96636
|
+
var searchCommand = new Command("search").description("Search the Agently marketplace for agents").option("-q, --query <text>", "Search query to filter agents by name or description").option("-p, --protocol <protocols>", "Filter by protocol(s), comma-separated (e.g. a2a,mcp)").showHelpAfterError(true).addHelpText("after", `
|
|
96637
96637
|
Examples:
|
|
96638
96638
|
use-agently search
|
|
96639
|
-
use-agently search "echo"
|
|
96639
|
+
use-agently search -q "echo"
|
|
96640
96640
|
use-agently search --protocol a2a
|
|
96641
|
-
use-agently search "assistant" --protocol "a2a,mcp"`).action(async (
|
|
96641
|
+
use-agently search -q "assistant" --protocol "a2a,mcp"`).action(async (options, command) => {
|
|
96642
96642
|
const format = getOutputFormat(command);
|
|
96643
96643
|
const protocol = options.protocol ? options.protocol.split(",").map((p) => p.trim().toLowerCase()) : undefined;
|
|
96644
|
-
const result = await search(defaultClient, { q: query, protocol });
|
|
96644
|
+
const result = await search(defaultClient, { q: options.query, protocol });
|
|
96645
96645
|
const items = result.hits.map(({ id, name, description, protocols }) => ({ id, name, description, protocols }));
|
|
96646
96646
|
if (items.length === 0) {
|
|
96647
96647
|
outputNoResults(format);
|
|
@@ -96681,12 +96681,12 @@ ${item.description}`, (item.protocols ?? []).join(", ")]);
|
|
|
96681
96681
|
}
|
|
96682
96682
|
|
|
96683
96683
|
// src/commands/view.ts
|
|
96684
|
-
var viewCommand = new Command("view").description("View an agent by its ID (e.g. CAIP-19)").
|
|
96684
|
+
var viewCommand = new Command("view").description("View an agent by its ID (e.g. CAIP-19)").requiredOption("-u, --uri <value>", "Agent CAIP-19 ID (e.g. eip155:8453/erc8004:0x1234/1)").showHelpAfterError(true).addHelpText("after", `
|
|
96685
96685
|
Examples:
|
|
96686
|
-
use-agently view eip155:8453/erc8004:0x1234/1`).action(async (
|
|
96687
|
-
const agent = await getAgent(defaultClient,
|
|
96686
|
+
use-agently view --uri eip155:8453/erc8004:0x1234/1`).action(async (options, command) => {
|
|
96687
|
+
const agent = await getAgent(defaultClient, options.uri);
|
|
96688
96688
|
if (!agent) {
|
|
96689
|
-
throw new Error(`No agent found for
|
|
96689
|
+
throw new Error(`No agent found for URI: ${options.uri}
|
|
96690
96690
|
Run 'use-agently search' to find available agents.`);
|
|
96691
96691
|
}
|
|
96692
96692
|
output(command, agent);
|
|
@@ -97244,6 +97244,99 @@ function enableGlobalOptionsInHelp(cmd) {
|
|
|
97244
97244
|
}
|
|
97245
97245
|
enableGlobalOptionsInHelp(cli);
|
|
97246
97246
|
|
|
97247
|
+
// src/telemetry.ts
|
|
97248
|
+
var events = [];
|
|
97249
|
+
function getName(command) {
|
|
97250
|
+
const parts = [];
|
|
97251
|
+
let cmd = command;
|
|
97252
|
+
while (cmd) {
|
|
97253
|
+
if (cmd.parent) {
|
|
97254
|
+
parts.unshift(cmd.name());
|
|
97255
|
+
}
|
|
97256
|
+
cmd = cmd.parent;
|
|
97257
|
+
}
|
|
97258
|
+
return parts.join(" ");
|
|
97259
|
+
}
|
|
97260
|
+
function getArgs(command) {
|
|
97261
|
+
const opts = command.opts();
|
|
97262
|
+
const args = {};
|
|
97263
|
+
const name = getName(command);
|
|
97264
|
+
if (opts.uri) {
|
|
97265
|
+
args.uri = opts.uri;
|
|
97266
|
+
}
|
|
97267
|
+
if ("pay" in opts) {
|
|
97268
|
+
args.pay = !!opts.pay;
|
|
97269
|
+
}
|
|
97270
|
+
switch (name) {
|
|
97271
|
+
case "init":
|
|
97272
|
+
args.local = !!opts.local;
|
|
97273
|
+
args.regenerate = !!opts.regenerate;
|
|
97274
|
+
break;
|
|
97275
|
+
case "search":
|
|
97276
|
+
args.query = opts.query;
|
|
97277
|
+
args.protocol = opts.protocol;
|
|
97278
|
+
break;
|
|
97279
|
+
case "mcp call":
|
|
97280
|
+
args.tool = opts.tool;
|
|
97281
|
+
args.has_args = opts.args !== undefined;
|
|
97282
|
+
break;
|
|
97283
|
+
case "web get":
|
|
97284
|
+
case "web post":
|
|
97285
|
+
case "web put":
|
|
97286
|
+
case "web patch":
|
|
97287
|
+
case "web delete":
|
|
97288
|
+
args.has_headers = (opts.header?.length ?? 0) > 0;
|
|
97289
|
+
args.has_body = opts.data !== undefined || opts.dataRaw !== undefined;
|
|
97290
|
+
args.follow_redirects = !!opts.location;
|
|
97291
|
+
args.verbose = !!opts.verbose;
|
|
97292
|
+
break;
|
|
97293
|
+
}
|
|
97294
|
+
return args;
|
|
97295
|
+
}
|
|
97296
|
+
function getSession(command) {
|
|
97297
|
+
return {
|
|
97298
|
+
version: package_default2.version,
|
|
97299
|
+
os: process.platform,
|
|
97300
|
+
arch: process.arch,
|
|
97301
|
+
is_tty: !!process.stdout.isTTY,
|
|
97302
|
+
output: command.optsWithGlobals().output,
|
|
97303
|
+
wallet: null
|
|
97304
|
+
};
|
|
97305
|
+
}
|
|
97306
|
+
function installTelemetry(cli2) {
|
|
97307
|
+
if (process.env.USE_AGENTLY_TELEMETRY === "0")
|
|
97308
|
+
return;
|
|
97309
|
+
let startTime;
|
|
97310
|
+
cli2.hook("preAction", async () => {
|
|
97311
|
+
startTime = Date.now();
|
|
97312
|
+
});
|
|
97313
|
+
cli2.hook("postAction", (_thisCommand, actionCommand) => {
|
|
97314
|
+
events.push({
|
|
97315
|
+
name: getName(actionCommand),
|
|
97316
|
+
args: { ...getArgs(actionCommand), duration: Date.now() - startTime },
|
|
97317
|
+
session: getSession(actionCommand)
|
|
97318
|
+
});
|
|
97319
|
+
});
|
|
97320
|
+
}
|
|
97321
|
+
async function flushTelemetry() {
|
|
97322
|
+
if (events.length === 0)
|
|
97323
|
+
return;
|
|
97324
|
+
try {
|
|
97325
|
+
const body = JSON.stringify(events);
|
|
97326
|
+
events.length = 0;
|
|
97327
|
+
const controller = new AbortController;
|
|
97328
|
+
const timeout = setTimeout(() => controller.abort(), 3000);
|
|
97329
|
+
await fetch("https://api.use-agently.com/telemetry", {
|
|
97330
|
+
method: "POST",
|
|
97331
|
+
headers: { "Content-Type": "application/json" },
|
|
97332
|
+
body,
|
|
97333
|
+
signal: controller.signal
|
|
97334
|
+
});
|
|
97335
|
+
clearTimeout(timeout);
|
|
97336
|
+
} catch {}
|
|
97337
|
+
}
|
|
97338
|
+
|
|
97247
97339
|
// src/bin.ts
|
|
97340
|
+
installTelemetry(cli);
|
|
97248
97341
|
await cli.parseAsync();
|
|
97249
|
-
await checkAutoUpdate();
|
|
97342
|
+
await Promise.all([checkAutoUpdate(), flushTelemetry()]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "use-agently",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.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.23.0",
|
|
28
28
|
"boxen": "^8.0.1",
|
|
29
29
|
"cli-table3": "^0.6.5",
|
|
30
30
|
"commander": "^14.0.3",
|