@agentgates/cli 0.11.2 → 0.11.3

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.
Files changed (2) hide show
  1. package/dist/cli.mjs +95 -63
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -3113,6 +3113,69 @@ var require_picocolors = __commonJS({
3113
3113
  }
3114
3114
  });
3115
3115
 
3116
+ // package.json
3117
+ var require_package = __commonJS({
3118
+ "package.json"(exports, module) {
3119
+ module.exports = {
3120
+ name: "@agentgates/cli",
3121
+ version: "0.11.3",
3122
+ description: "Wallet operations for AI agents and humans",
3123
+ keywords: [
3124
+ "crypto",
3125
+ "wallet",
3126
+ "cli",
3127
+ "ai-agent",
3128
+ "agentgates",
3129
+ "usdc",
3130
+ "solana",
3131
+ "ethereum",
3132
+ "polygon",
3133
+ "defi"
3134
+ ],
3135
+ license: "MIT",
3136
+ homepage: "https://agentgates.ai",
3137
+ repository: {
3138
+ type: "git",
3139
+ url: "git+https://github.com/Carlos-Sotop/agentgates-ai-cli.git"
3140
+ },
3141
+ author: "Agentgates",
3142
+ type: "module",
3143
+ bin: {
3144
+ agentgates: "bin/agentgates"
3145
+ },
3146
+ files: [
3147
+ "bin",
3148
+ "dist/cli.mjs",
3149
+ "scripts/postinstall.mjs",
3150
+ "README.md"
3151
+ ],
3152
+ scripts: {
3153
+ build: `esbuild src/main.ts --bundle --platform=node --format=esm --outfile=dist/cli.mjs --banner:js="import{createRequire}from'module';const require=createRequire(import.meta.url);"`,
3154
+ "build:tsc": "tsc -p tsconfig.json",
3155
+ postinstall: "node scripts/postinstall.mjs || exit 0",
3156
+ prepare: "[ -x node_modules/.bin/esbuild ] && npm run build || true",
3157
+ dev: "tsc -w -p tsconfig.json",
3158
+ typecheck: "tsc --noEmit",
3159
+ bounty: "node bin/bounty",
3160
+ "sync:bounty-shared": "node scripts/sync-bounty-shared.mjs",
3161
+ clean: "rm -rf dist"
3162
+ },
3163
+ engines: {
3164
+ node: ">=20"
3165
+ },
3166
+ devDependencies: {
3167
+ "@solana/web3.js": "^1.98.4",
3168
+ "@types/node": "^22.10.0",
3169
+ commander: "^12.1.0",
3170
+ esbuild: "^0.28.0",
3171
+ open: "^10.1.0",
3172
+ picocolors: "^1.1.1",
3173
+ typescript: "^5.6.3"
3174
+ }
3175
+ };
3176
+ }
3177
+ });
3178
+
3116
3179
  // node_modules/@solana/web3.js/node_modules/@noble/hashes/cryptoNode.js
3117
3180
  var require_cryptoNode = __commonJS({
3118
3181
  "node_modules/@solana/web3.js/node_modules/@noble/hashes/cryptoNode.js"(exports) {
@@ -34292,69 +34355,6 @@ Message: ${transactionMessage}.
34292
34355
  }
34293
34356
  });
34294
34357
 
34295
- // package.json
34296
- var require_package = __commonJS({
34297
- "package.json"(exports, module) {
34298
- module.exports = {
34299
- name: "@agentgates/cli",
34300
- version: "0.11.2",
34301
- description: "Wallet operations for AI agents and humans",
34302
- keywords: [
34303
- "crypto",
34304
- "wallet",
34305
- "cli",
34306
- "ai-agent",
34307
- "agentgates",
34308
- "usdc",
34309
- "solana",
34310
- "ethereum",
34311
- "polygon",
34312
- "defi"
34313
- ],
34314
- license: "MIT",
34315
- homepage: "https://agentgates.ai",
34316
- repository: {
34317
- type: "git",
34318
- url: "git+https://github.com/Carlos-Sotop/agentgates-ai-cli.git"
34319
- },
34320
- author: "Agentgates",
34321
- type: "module",
34322
- bin: {
34323
- agentgates: "bin/agentgates"
34324
- },
34325
- files: [
34326
- "bin",
34327
- "dist/cli.mjs",
34328
- "scripts/postinstall.mjs",
34329
- "README.md"
34330
- ],
34331
- scripts: {
34332
- build: `esbuild src/main.ts --bundle --platform=node --format=esm --outfile=dist/cli.mjs --banner:js="import{createRequire}from'module';const require=createRequire(import.meta.url);"`,
34333
- "build:tsc": "tsc -p tsconfig.json",
34334
- postinstall: "node scripts/postinstall.mjs || exit 0",
34335
- prepare: "[ -x node_modules/.bin/esbuild ] && npm run build || true",
34336
- dev: "tsc -w -p tsconfig.json",
34337
- typecheck: "tsc --noEmit",
34338
- bounty: "node bin/bounty",
34339
- "sync:bounty-shared": "node scripts/sync-bounty-shared.mjs",
34340
- clean: "rm -rf dist"
34341
- },
34342
- engines: {
34343
- node: ">=20"
34344
- },
34345
- devDependencies: {
34346
- "@solana/web3.js": "^1.98.4",
34347
- "@types/node": "^22.10.0",
34348
- commander: "^12.1.0",
34349
- esbuild: "^0.28.0",
34350
- open: "^10.1.0",
34351
- picocolors: "^1.1.1",
34352
- typescript: "^5.6.3"
34353
- }
34354
- };
34355
- }
34356
- });
34357
-
34358
34358
  // node_modules/commander/esm.mjs
34359
34359
  var import_index = __toESM(require_commander(), 1);
34360
34360
  var {
@@ -35617,6 +35617,34 @@ var WORDMARK = [
35617
35617
  " |___/ |___/"
35618
35618
  ].join("\n");
35619
35619
  var TAGLINE = "Confidential virtual machines and inference, paid per use in USDC.";
35620
+ var { version: LOCAL_VERSION } = require_package();
35621
+ function olderThan(a, b) {
35622
+ const pa = a.split(".").map(Number);
35623
+ const pb = b.split(".").map(Number);
35624
+ for (let i = 0; i < 3; i++) {
35625
+ if ((pa[i] ?? 0) < (pb[i] ?? 0)) return true;
35626
+ if ((pa[i] ?? 0) > (pb[i] ?? 0)) return false;
35627
+ }
35628
+ return false;
35629
+ }
35630
+ async function staleLine() {
35631
+ try {
35632
+ const ctl = new AbortController();
35633
+ const timer = setTimeout(() => ctl.abort(), 900);
35634
+ const res = await fetch("https://registry.npmjs.org/@agentgates/cli/latest", {
35635
+ headers: { accept: "application/json" },
35636
+ signal: ctl.signal
35637
+ }).finally(() => clearTimeout(timer));
35638
+ if (!res.ok) return null;
35639
+ const { version: latest } = await res.json();
35640
+ if (!latest || !olderThan(LOCAL_VERSION, latest)) return null;
35641
+ return ` ${import_picocolors5.default.yellow("\u2191")} ${latest} is out, this copy is ${LOCAL_VERSION} \xB7 curl -fsSL ${CREATORS_ORIGIN}/api/cli/install | sh
35642
+
35643
+ `;
35644
+ } catch {
35645
+ return null;
35646
+ }
35647
+ }
35620
35648
  function makePut(w) {
35621
35649
  return (s) => {
35622
35650
  process.stdout.write(s);
@@ -35709,8 +35737,12 @@ async function onboard(opts = {}) {
35709
35737
 
35710
35738
  `);
35711
35739
  }
35740
+ const staleNonTty = await staleLine();
35741
+ if (staleNonTty) put(staleNonTty);
35712
35742
  return;
35713
35743
  }
35744
+ const stale = await staleLine();
35745
+ if (stale) put(stale);
35714
35746
  const order = menuOrder(opts.lane).filter((k) => existing ? k !== "wallet" : true);
35715
35747
  printMenu(put, order, true);
35716
35748
  const rl = createInterface({ input: process.stdin, output: process.stdout });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentgates/cli",
3
- "version": "0.11.2",
3
+ "version": "0.11.3",
4
4
  "description": "Wallet operations for AI agents and humans",
5
5
  "keywords": [
6
6
  "crypto",