@agentrouter/agentrouter 0.2.3 → 0.2.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,WAAW,EAYX,KAAK,GAAG,EAET,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,WAAW,EAAE,CAAC;AACvB,oFAAoF;AACpF,eAAO,MAAM,eAAe,OAAO,CAAC;AAEpC,4EAA4E;AAC5E,eAAO,MAAM,IAAI;;;;;;;;;;;CAWP,CAAC;AAEX,MAAM,WAAW,KAAK;IACpB,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IAChC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAyFD,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,GAAE,KAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CA4c5E"}
1
+ {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,WAAW,EAYX,KAAK,GAAG,EAET,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,WAAW,EAAE,CAAC;AACvB,oFAAoF;AACpF,eAAO,MAAM,eAAe,OAAO,CAAC;AAEpC,4EAA4E;AAC5E,eAAO,MAAM,IAAI;;;;;;;;;;;CAWP,CAAC;AAEX,MAAM,WAAW,KAAK;IACpB,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IAChC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAwFD,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,GAAE,KAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAkc5E"}
package/dist/core.js CHANGED
@@ -28,7 +28,7 @@ class CliError extends Error {
28
28
  }
29
29
  }
30
30
  const API_KEY_FORMAT = /^ar_live_[0-9a-f]{16}_[A-Za-z0-9_-]{32,64}$/;
31
- const BOOLEAN_FLAGS = new Set(["json", "wait", "help", "no-browser", "no-color", "open", "version", "include-unavailable"]);
31
+ const BOOLEAN_FLAGS = new Set(["json", "wait", "help", "no-browser", "no-color", "version", "include-unavailable"]);
32
32
  const REPEATABLE = new Set(["run", "scope"]);
33
33
  function parseArgs(argv) {
34
34
  const positional = [];
@@ -77,7 +77,6 @@ Use tools
77
77
 
78
78
  Money and support
79
79
  agentrouter balance
80
- agentrouter topup --amount-usd 10 [--open] Creates a payment link; funds arrive after payment
81
80
  agentrouter feedback --text "..." [--run id] [--category c]
82
81
  agentrouter tools request --capability "..." --note "..."
83
82
  agentrouter dispute create --run <id> [--run <id>] --goal "..." --reason "..." [--evidence "..."]
@@ -277,7 +276,7 @@ export async function runCli(argv, io = {}) {
277
276
  info("No interactive terminal: set AGENTROUTER_API_KEY instead of logging in.");
278
277
  return EXIT.auth;
279
278
  }
280
- const scopes = ["read", "invoke", "topup", "feedback", "dispute"];
279
+ const scopes = ["read", "invoke", "feedback", "dispute"];
281
280
  const result = await browserLogin({ baseUrl, scopes, openBrowser: !flags["no-browser"] && io.openBrowser !== false, timeoutMs: 5 * 60000, fetchImpl, log: info });
282
281
  const stored = { kind: "oauth", baseUrl, accessToken: result.accessToken, refreshToken: result.refreshToken, expiresAt: Date.now() + result.expiresIn * 1000, scope: result.scope };
283
282
  const path = await saveCredential(env, stored);
@@ -520,19 +519,6 @@ export async function runCli(argv, io = {}) {
520
519
  print(result.json, `Available $${result.json.available_usd} · reserved $${result.json.reserved_usd} (USD)`);
521
520
  return EXIT.ok;
522
521
  }
523
- case "topup": {
524
- const amount = flags["amount-usd"];
525
- if (typeof amount !== "string")
526
- throw new CliError("usage: agentrouter topup --amount-usd 10", EXIT.usage);
527
- const result = await http("POST", "/v1/wallet/topups", { amount_usd: amount });
528
- if (result.status !== 200 && result.status !== 201)
529
- fail(result);
530
- const topup = result.json;
531
- print(topup, `Pay $${topup.quote.total_usd} ($${topup.quote.amount_usd} to wallet + $${topup.quote.fee_usd} fee):\n${topup.checkout_url}\nThe balance changes only after payment completes.`);
532
- if (flags.open)
533
- (await import("./terminal.js")).openInBrowser(topup.checkout_url);
534
- return EXIT.ok;
535
- }
536
522
  case "feedback": {
537
523
  if (typeof flags.text !== "string")
538
524
  throw new CliError('usage: agentrouter feedback --text "..." [--run id]', EXIT.usage);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentrouter/agentrouter",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "AgentRouter CLI: find, describe and invoke provider tools with one wallet.",
5
5
  "type": "module",
6
6
  "bin": {