@agentgates/cli 0.11.0 → 0.11.2
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.mjs +375 -112
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -5037,15 +5037,15 @@ var require_curve = __commonJS({
|
|
|
5037
5037
|
windowSize = wbits - 2;
|
|
5038
5038
|
else if (wbits > 0)
|
|
5039
5039
|
windowSize = 2;
|
|
5040
|
-
const
|
|
5041
|
-
const buckets = new Array(Number(
|
|
5040
|
+
const MASK2 = (0, utils_ts_1.bitMask)(windowSize);
|
|
5041
|
+
const buckets = new Array(Number(MASK2) + 1).fill(zero);
|
|
5042
5042
|
const lastBits = Math.floor((fieldN.BITS - 1) / windowSize) * windowSize;
|
|
5043
5043
|
let sum = zero;
|
|
5044
5044
|
for (let i = lastBits; i >= 0; i -= windowSize) {
|
|
5045
5045
|
buckets.fill(zero);
|
|
5046
5046
|
for (let j = 0; j < slength; j++) {
|
|
5047
5047
|
const scalar = scalars[j];
|
|
5048
|
-
const wbits2 = Number(scalar >> BigInt(i) &
|
|
5048
|
+
const wbits2 = Number(scalar >> BigInt(i) & MASK2);
|
|
5049
5049
|
buckets[wbits2] = buckets[wbits2].add(points[j]);
|
|
5050
5050
|
}
|
|
5051
5051
|
let resI = zero;
|
|
@@ -5066,7 +5066,7 @@ var require_curve = __commonJS({
|
|
|
5066
5066
|
const zero = c.ZERO;
|
|
5067
5067
|
const tableSize = 2 ** windowSize - 1;
|
|
5068
5068
|
const chunks = Math.ceil(fieldN.BITS / windowSize);
|
|
5069
|
-
const
|
|
5069
|
+
const MASK2 = (0, utils_ts_1.bitMask)(windowSize);
|
|
5070
5070
|
const tables = points.map((p) => {
|
|
5071
5071
|
const res = [];
|
|
5072
5072
|
for (let i = 0, acc = p; i < tableSize; i++) {
|
|
@@ -5087,7 +5087,7 @@ var require_curve = __commonJS({
|
|
|
5087
5087
|
const shiftBy = BigInt(chunks * windowSize - (i + 1) * windowSize);
|
|
5088
5088
|
for (let j = 0; j < scalars.length; j++) {
|
|
5089
5089
|
const n = scalars[j];
|
|
5090
|
-
const curr = Number(n >> shiftBy &
|
|
5090
|
+
const curr = Number(n >> shiftBy & MASK2);
|
|
5091
5091
|
if (!curr)
|
|
5092
5092
|
continue;
|
|
5093
5093
|
res = res.add(tables[j][curr - 1]);
|
|
@@ -5176,7 +5176,7 @@ var require_edwards = __commonJS({
|
|
|
5176
5176
|
let CURVE = validated.CURVE;
|
|
5177
5177
|
const { h: cofactor } = CURVE;
|
|
5178
5178
|
(0, utils_ts_1._validateObject)(extraOpts, {}, { uvRatio: "function" });
|
|
5179
|
-
const
|
|
5179
|
+
const MASK2 = _2n << BigInt(Fn.BYTES * 8) - _1n;
|
|
5180
5180
|
const modP = (n) => Fp.create(n);
|
|
5181
5181
|
const uvRatio = extraOpts.uvRatio || ((u, v) => {
|
|
5182
5182
|
try {
|
|
@@ -5189,7 +5189,7 @@ var require_edwards = __commonJS({
|
|
|
5189
5189
|
throw new Error("bad curve params: generator point");
|
|
5190
5190
|
function acoord(title, n, banZero = false) {
|
|
5191
5191
|
const min = banZero ? _1n : _0n;
|
|
5192
|
-
(0, utils_ts_1.aInRange)("coordinate " + title, n, min,
|
|
5192
|
+
(0, utils_ts_1.aInRange)("coordinate " + title, n, min, MASK2);
|
|
5193
5193
|
return n;
|
|
5194
5194
|
}
|
|
5195
5195
|
function aextpoint(other) {
|
|
@@ -5259,7 +5259,7 @@ var require_edwards = __commonJS({
|
|
|
5259
5259
|
const lastByte = bytes[len - 1];
|
|
5260
5260
|
normed[len - 1] = lastByte & ~128;
|
|
5261
5261
|
const y = (0, utils_ts_1.bytesToNumberLE)(normed);
|
|
5262
|
-
const max = zip215 ?
|
|
5262
|
+
const max = zip215 ? MASK2 : Fp.ORDER;
|
|
5263
5263
|
(0, utils_ts_1.aInRange)("point.y", y, _0n, max);
|
|
5264
5264
|
const y2 = modP(y * y);
|
|
5265
5265
|
const u = modP(y2 - _1n);
|
|
@@ -10417,31 +10417,31 @@ var require_Layout = __commonJS({
|
|
|
10417
10417
|
return name;
|
|
10418
10418
|
}
|
|
10419
10419
|
exports.nameWithProperty = nameWithProperty;
|
|
10420
|
-
function bindConstructorLayout(Class,
|
|
10420
|
+
function bindConstructorLayout(Class, layout2) {
|
|
10421
10421
|
if ("function" !== typeof Class) {
|
|
10422
10422
|
throw new TypeError("Class must be constructor");
|
|
10423
10423
|
}
|
|
10424
10424
|
if (Object.prototype.hasOwnProperty.call(Class, "layout_")) {
|
|
10425
10425
|
throw new Error("Class is already bound to a layout");
|
|
10426
10426
|
}
|
|
10427
|
-
if (!(
|
|
10427
|
+
if (!(layout2 && layout2 instanceof Layout)) {
|
|
10428
10428
|
throw new TypeError("layout must be a Layout");
|
|
10429
10429
|
}
|
|
10430
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
10430
|
+
if (Object.prototype.hasOwnProperty.call(layout2, "boundConstructor_")) {
|
|
10431
10431
|
throw new Error("layout is already bound to a constructor");
|
|
10432
10432
|
}
|
|
10433
|
-
Class.layout_ =
|
|
10434
|
-
|
|
10435
|
-
|
|
10433
|
+
Class.layout_ = layout2;
|
|
10434
|
+
layout2.boundConstructor_ = Class;
|
|
10435
|
+
layout2.makeDestinationObject = (() => new Class());
|
|
10436
10436
|
Object.defineProperty(Class.prototype, "encode", {
|
|
10437
10437
|
value(b, offset) {
|
|
10438
|
-
return
|
|
10438
|
+
return layout2.encode(this, b, offset);
|
|
10439
10439
|
},
|
|
10440
10440
|
writable: true
|
|
10441
10441
|
});
|
|
10442
10442
|
Object.defineProperty(Class, "decode", {
|
|
10443
10443
|
value(b, offset) {
|
|
10444
|
-
return
|
|
10444
|
+
return layout2.decode(b, offset);
|
|
10445
10445
|
},
|
|
10446
10446
|
writable: true
|
|
10447
10447
|
});
|
|
@@ -10489,15 +10489,15 @@ var require_Layout = __commonJS({
|
|
|
10489
10489
|
};
|
|
10490
10490
|
exports.GreedyCount = GreedyCount;
|
|
10491
10491
|
var OffsetLayout = class extends ExternalLayout {
|
|
10492
|
-
constructor(
|
|
10493
|
-
if (!(
|
|
10492
|
+
constructor(layout2, offset = 0, property) {
|
|
10493
|
+
if (!(layout2 instanceof Layout)) {
|
|
10494
10494
|
throw new TypeError("layout must be a Layout");
|
|
10495
10495
|
}
|
|
10496
10496
|
if (!Number.isInteger(offset)) {
|
|
10497
10497
|
throw new TypeError("offset must be integer or undefined");
|
|
10498
10498
|
}
|
|
10499
|
-
super(
|
|
10500
|
-
this.layout =
|
|
10499
|
+
super(layout2.span, property || layout2.property);
|
|
10500
|
+
this.layout = layout2;
|
|
10501
10501
|
this.offset = offset;
|
|
10502
10502
|
}
|
|
10503
10503
|
/** @override */
|
|
@@ -10974,12 +10974,12 @@ var require_Layout = __commonJS({
|
|
|
10974
10974
|
};
|
|
10975
10975
|
exports.UnionDiscriminator = UnionDiscriminator;
|
|
10976
10976
|
var UnionLayoutDiscriminator = class extends UnionDiscriminator {
|
|
10977
|
-
constructor(
|
|
10978
|
-
if (!(
|
|
10977
|
+
constructor(layout2, property) {
|
|
10978
|
+
if (!(layout2 instanceof ExternalLayout && layout2.isCount())) {
|
|
10979
10979
|
throw new TypeError("layout must be an unsigned integer ExternalLayout");
|
|
10980
10980
|
}
|
|
10981
|
-
super(property ||
|
|
10982
|
-
this.layout =
|
|
10981
|
+
super(property || layout2.property || "variant");
|
|
10982
|
+
this.layout = layout2;
|
|
10983
10983
|
}
|
|
10984
10984
|
/** Delegate decoding to {@link UnionLayoutDiscriminator#layout|layout}. */
|
|
10985
10985
|
decode(b, offset) {
|
|
@@ -11154,8 +11154,8 @@ var require_Layout = __commonJS({
|
|
|
11154
11154
|
* Layout#property|property}.
|
|
11155
11155
|
*
|
|
11156
11156
|
* @return {VariantLayout} */
|
|
11157
|
-
addVariant(variant,
|
|
11158
|
-
const rv = new VariantLayout(this, variant,
|
|
11157
|
+
addVariant(variant, layout2, property) {
|
|
11158
|
+
const rv = new VariantLayout(this, variant, layout2, property);
|
|
11159
11159
|
this.registry[variant] = rv;
|
|
11160
11160
|
return rv;
|
|
11161
11161
|
}
|
|
@@ -11185,22 +11185,22 @@ var require_Layout = __commonJS({
|
|
|
11185
11185
|
};
|
|
11186
11186
|
exports.Union = Union;
|
|
11187
11187
|
var VariantLayout = class extends Layout {
|
|
11188
|
-
constructor(union, variant,
|
|
11188
|
+
constructor(union, variant, layout2, property) {
|
|
11189
11189
|
if (!(union instanceof Union)) {
|
|
11190
11190
|
throw new TypeError("union must be a Union");
|
|
11191
11191
|
}
|
|
11192
11192
|
if (!Number.isInteger(variant) || 0 > variant) {
|
|
11193
11193
|
throw new TypeError("variant must be a (non-negative) integer");
|
|
11194
11194
|
}
|
|
11195
|
-
if ("string" === typeof
|
|
11196
|
-
property =
|
|
11197
|
-
|
|
11195
|
+
if ("string" === typeof layout2 && void 0 === property) {
|
|
11196
|
+
property = layout2;
|
|
11197
|
+
layout2 = null;
|
|
11198
11198
|
}
|
|
11199
|
-
if (
|
|
11200
|
-
if (!(
|
|
11199
|
+
if (layout2) {
|
|
11200
|
+
if (!(layout2 instanceof Layout)) {
|
|
11201
11201
|
throw new TypeError("layout must be a Layout");
|
|
11202
11202
|
}
|
|
11203
|
-
if (null !== union.defaultLayout && 0 <=
|
|
11203
|
+
if (null !== union.defaultLayout && 0 <= layout2.span && layout2.span > union.defaultLayout.span) {
|
|
11204
11204
|
throw new Error("variant span exceeds span of containing union");
|
|
11205
11205
|
}
|
|
11206
11206
|
if ("string" !== typeof property) {
|
|
@@ -11209,7 +11209,7 @@ var require_Layout = __commonJS({
|
|
|
11209
11209
|
}
|
|
11210
11210
|
let span = union.span;
|
|
11211
11211
|
if (0 > union.span) {
|
|
11212
|
-
span =
|
|
11212
|
+
span = layout2 ? layout2.span : 0;
|
|
11213
11213
|
if (0 <= span && union.usesPrefixDiscriminator) {
|
|
11214
11214
|
span += union.discriminator.layout.span;
|
|
11215
11215
|
}
|
|
@@ -11217,7 +11217,7 @@ var require_Layout = __commonJS({
|
|
|
11217
11217
|
super(span, property);
|
|
11218
11218
|
this.union = union;
|
|
11219
11219
|
this.variant = variant;
|
|
11220
|
-
this.layout =
|
|
11220
|
+
this.layout = layout2 || null;
|
|
11221
11221
|
}
|
|
11222
11222
|
/** @override */
|
|
11223
11223
|
getSpan(b, offset = 0) {
|
|
@@ -11610,7 +11610,7 @@ var require_Layout = __commonJS({
|
|
|
11610
11610
|
};
|
|
11611
11611
|
exports.Constant = Constant;
|
|
11612
11612
|
exports.greedy = ((elementSpan, property) => new GreedyCount(elementSpan, property));
|
|
11613
|
-
exports.offset = ((
|
|
11613
|
+
exports.offset = ((layout2, offset, property) => new OffsetLayout(layout2, offset, property));
|
|
11614
11614
|
exports.u8 = ((property) => new UInt(1, property));
|
|
11615
11615
|
exports.u16 = ((property) => new UInt(2, property));
|
|
11616
11616
|
exports.u24 = ((property) => new UInt(3, property));
|
|
@@ -11645,7 +11645,7 @@ var require_Layout = __commonJS({
|
|
|
11645
11645
|
exports.bits = ((word, msb, property) => new BitStructure(word, msb, property));
|
|
11646
11646
|
exports.seq = ((elementLayout, count, property) => new Sequence(elementLayout, count, property));
|
|
11647
11647
|
exports.union = ((discr, defaultLayout, property) => new Union(discr, defaultLayout, property));
|
|
11648
|
-
exports.unionLayoutDiscriminator = ((
|
|
11648
|
+
exports.unionLayoutDiscriminator = ((layout2, property) => new UnionLayoutDiscriminator(layout2, property));
|
|
11649
11649
|
exports.blob = ((length, property) => new Blob2(length, property));
|
|
11650
11650
|
exports.cstr = ((property) => new CString(property));
|
|
11651
11651
|
exports.utf8 = ((maxSpan, property) => new UTF8(maxSpan, property));
|
|
@@ -27144,10 +27144,10 @@ Message: ${transactionMessage}.
|
|
|
27144
27144
|
}
|
|
27145
27145
|
};
|
|
27146
27146
|
function u64(property) {
|
|
27147
|
-
const
|
|
27148
|
-
const decode =
|
|
27149
|
-
const encode =
|
|
27150
|
-
const bigIntLayout =
|
|
27147
|
+
const layout2 = BufferLayout.blob(8, property);
|
|
27148
|
+
const decode = layout2.decode.bind(layout2);
|
|
27149
|
+
const encode = layout2.encode.bind(layout2);
|
|
27150
|
+
const bigIntLayout = layout2;
|
|
27151
27151
|
const codec = codecsNumbers.getU64Codec();
|
|
27152
27152
|
bigIntLayout.decode = (buffer2, offset) => {
|
|
27153
27153
|
const src = decode(buffer2, offset);
|
|
@@ -27173,8 +27173,8 @@ Message: ${transactionMessage}.
|
|
|
27173
27173
|
const instructionTypeLayout = BufferLayout__namespace.u32("instruction");
|
|
27174
27174
|
const typeIndex = instructionTypeLayout.decode(instruction.data);
|
|
27175
27175
|
let type;
|
|
27176
|
-
for (const [ixType,
|
|
27177
|
-
if (
|
|
27176
|
+
for (const [ixType, layout2] of Object.entries(SYSTEM_INSTRUCTION_LAYOUTS)) {
|
|
27177
|
+
if (layout2.index == typeIndex) {
|
|
27178
27178
|
type = ixType;
|
|
27179
27179
|
break;
|
|
27180
27180
|
}
|
|
@@ -32364,8 +32364,8 @@ Message: ${transactionMessage}.
|
|
|
32364
32364
|
const instructionTypeLayout = BufferLayout__namespace.u32("instruction");
|
|
32365
32365
|
const index = instructionTypeLayout.decode(instruction.data);
|
|
32366
32366
|
let type;
|
|
32367
|
-
for (const [layoutType,
|
|
32368
|
-
if (
|
|
32367
|
+
for (const [layoutType, layout2] of Object.entries(LOOKUP_TABLE_INSTRUCTION_LAYOUTS)) {
|
|
32368
|
+
if (layout2.index == index) {
|
|
32369
32369
|
type = layoutType;
|
|
32370
32370
|
break;
|
|
32371
32371
|
}
|
|
@@ -32585,8 +32585,8 @@ Message: ${transactionMessage}.
|
|
|
32585
32585
|
const instructionTypeLayout = BufferLayout__namespace.u8("instruction");
|
|
32586
32586
|
const typeIndex = instructionTypeLayout.decode(instruction.data);
|
|
32587
32587
|
let type;
|
|
32588
|
-
for (const [ixType,
|
|
32589
|
-
if (
|
|
32588
|
+
for (const [ixType, layout2] of Object.entries(COMPUTE_BUDGET_INSTRUCTION_LAYOUTS)) {
|
|
32589
|
+
if (layout2.index == typeIndex) {
|
|
32590
32590
|
type = ixType;
|
|
32591
32591
|
break;
|
|
32592
32592
|
}
|
|
@@ -32986,8 +32986,8 @@ Message: ${transactionMessage}.
|
|
|
32986
32986
|
const instructionTypeLayout = BufferLayout__namespace.u32("instruction");
|
|
32987
32987
|
const typeIndex = instructionTypeLayout.decode(instruction.data);
|
|
32988
32988
|
let type;
|
|
32989
|
-
for (const [ixType,
|
|
32990
|
-
if (
|
|
32989
|
+
for (const [ixType, layout2] of Object.entries(STAKE_INSTRUCTION_LAYOUTS)) {
|
|
32990
|
+
if (layout2.index == typeIndex) {
|
|
32991
32991
|
type = ixType;
|
|
32992
32992
|
break;
|
|
32993
32993
|
}
|
|
@@ -33649,8 +33649,8 @@ Message: ${transactionMessage}.
|
|
|
33649
33649
|
const instructionTypeLayout = BufferLayout__namespace.u32("instruction");
|
|
33650
33650
|
const typeIndex = instructionTypeLayout.decode(instruction.data);
|
|
33651
33651
|
let type;
|
|
33652
|
-
for (const [ixType,
|
|
33653
|
-
if (
|
|
33652
|
+
for (const [ixType, layout2] of Object.entries(VOTE_INSTRUCTION_LAYOUTS)) {
|
|
33653
|
+
if (layout2.index == typeIndex) {
|
|
33654
33654
|
type = ixType;
|
|
33655
33655
|
break;
|
|
33656
33656
|
}
|
|
@@ -34297,7 +34297,7 @@ var require_package = __commonJS({
|
|
|
34297
34297
|
"package.json"(exports, module) {
|
|
34298
34298
|
module.exports = {
|
|
34299
34299
|
name: "@agentgates/cli",
|
|
34300
|
-
version: "0.11.
|
|
34300
|
+
version: "0.11.2",
|
|
34301
34301
|
description: "Wallet operations for AI agents and humans",
|
|
34302
34302
|
keywords: [
|
|
34303
34303
|
"crypto",
|
|
@@ -35349,6 +35349,138 @@ function shortAddress(addr) {
|
|
|
35349
35349
|
var import_picocolors5 = __toESM(require_picocolors(), 1);
|
|
35350
35350
|
import { createInterface } from "node:readline/promises";
|
|
35351
35351
|
|
|
35352
|
+
// src/lib/water.ts
|
|
35353
|
+
var RAMP = ".:-=+*#%@";
|
|
35354
|
+
var FONT = {
|
|
35355
|
+
a: [" ", " ", " ### ", " #", " ####", "# #", " ####", " "],
|
|
35356
|
+
g: [" ", " ", " ####", "# #", "# #", " ####", " #", " ### "],
|
|
35357
|
+
e: [" ", " ", " ### ", "# #", "#####", "# ", " ####", " "],
|
|
35358
|
+
n: [" ", " ", "# ## ", "## #", "# #", "# #", "# #", " "],
|
|
35359
|
+
t: [" # ", " # ", "#####", " # ", " # ", " # ", " ## ", " "],
|
|
35360
|
+
s: [" ", " ", " ####", "# ", " ### ", " #", "#### ", " "]
|
|
35361
|
+
};
|
|
35362
|
+
var WORD = "agentgates";
|
|
35363
|
+
var MARGIN = 2;
|
|
35364
|
+
var MASK_ROWS = 8;
|
|
35365
|
+
function buildMask() {
|
|
35366
|
+
const rows = Array.from({ length: MASK_ROWS }, () => []);
|
|
35367
|
+
for (let r = 0; r < MASK_ROWS; r++) {
|
|
35368
|
+
rows[r].push(...Array(MARGIN).fill(false));
|
|
35369
|
+
for (const ch of WORD) {
|
|
35370
|
+
const glyph = FONT[ch];
|
|
35371
|
+
for (const cell of glyph[r]) rows[r].push(cell === "#");
|
|
35372
|
+
rows[r].push(false);
|
|
35373
|
+
}
|
|
35374
|
+
}
|
|
35375
|
+
return rows;
|
|
35376
|
+
}
|
|
35377
|
+
var MASK = buildMask();
|
|
35378
|
+
var COLS = MASK[0].length;
|
|
35379
|
+
var STOPS = [
|
|
35380
|
+
[0, [16, 62, 138]],
|
|
35381
|
+
[0.45, [36, 120, 200]],
|
|
35382
|
+
[0.75, [66, 186, 232]],
|
|
35383
|
+
[1, [168, 240, 248]]
|
|
35384
|
+
];
|
|
35385
|
+
function rgb(b) {
|
|
35386
|
+
for (let i = 1; i < STOPS.length; i++) {
|
|
35387
|
+
if (b <= STOPS[i][0]) {
|
|
35388
|
+
const [b0, c0] = STOPS[i - 1];
|
|
35389
|
+
const [b1, c1] = STOPS[i];
|
|
35390
|
+
const f = (b - b0) / (b1 - b0);
|
|
35391
|
+
return [0, 1, 2].map((k) => Math.round(c0[k] + f * (c1[k] - c0[k])));
|
|
35392
|
+
}
|
|
35393
|
+
}
|
|
35394
|
+
return STOPS[STOPS.length - 1][1];
|
|
35395
|
+
}
|
|
35396
|
+
var RAMP256 = [17, 18, 24, 25, 31, 38, 44, 51, 87, 123, 159];
|
|
35397
|
+
function brightness(x, y, t, scale) {
|
|
35398
|
+
const w1 = Math.sin((x * 0.28 + y * 0.55) / scale + t * 2);
|
|
35399
|
+
const w2 = Math.sin(x * 0.11 / scale - t * 1.35 + Math.sin(y * 0.9 / scale + t * 0.6));
|
|
35400
|
+
const b = 0.5 + 0.27 * w1 + 0.23 * w2;
|
|
35401
|
+
return b < 0 ? 0 : b > 1 ? 1 : b;
|
|
35402
|
+
}
|
|
35403
|
+
function waterMode() {
|
|
35404
|
+
if (!process.stdout.isTTY) return null;
|
|
35405
|
+
if (process.env.NO_COLOR) return null;
|
|
35406
|
+
const term = process.env.TERM ?? "";
|
|
35407
|
+
if (term === "dumb") return null;
|
|
35408
|
+
const cols = process.stdout.columns || 80;
|
|
35409
|
+
if (cols < COLS + 1) return null;
|
|
35410
|
+
if (/truecolor|24bit/i.test(process.env.COLORTERM ?? "")) return "truecolor";
|
|
35411
|
+
if (/256color/.test(term)) return "256";
|
|
35412
|
+
return null;
|
|
35413
|
+
}
|
|
35414
|
+
function layout() {
|
|
35415
|
+
const cols = process.stdout.columns || 80;
|
|
35416
|
+
const lines = process.stdout.rows || 24;
|
|
35417
|
+
const scale = cols >= COLS * 2 + 1 && lines >= 30 ? 2 : 1;
|
|
35418
|
+
return { scale, width: COLS * scale, rows: MASK_ROWS * scale };
|
|
35419
|
+
}
|
|
35420
|
+
function frame(t, mode, L) {
|
|
35421
|
+
const out = [];
|
|
35422
|
+
for (let y = 0; y < L.rows; y++) {
|
|
35423
|
+
let line = "";
|
|
35424
|
+
let last = "";
|
|
35425
|
+
const my = Math.floor(y / L.scale);
|
|
35426
|
+
for (let x = 0; x < L.width; x++) {
|
|
35427
|
+
if (!MASK[my][Math.floor(x / L.scale)]) {
|
|
35428
|
+
line += " ";
|
|
35429
|
+
continue;
|
|
35430
|
+
}
|
|
35431
|
+
const b = brightness(x, y, t, L.scale);
|
|
35432
|
+
const g = RAMP[Math.max(1, Math.round(b * (RAMP.length - 1)))];
|
|
35433
|
+
const color = mode === "truecolor" ? `\x1B[38;2;${rgb(b).join(";")}m` : `\x1B[38;5;${RAMP256[Math.round(b * (RAMP256.length - 1))]}m`;
|
|
35434
|
+
line += (color === last ? "" : color) + g;
|
|
35435
|
+
last = color;
|
|
35436
|
+
}
|
|
35437
|
+
out.push(line + "\x1B[0m");
|
|
35438
|
+
}
|
|
35439
|
+
return out;
|
|
35440
|
+
}
|
|
35441
|
+
var cursorHookArmed = false;
|
|
35442
|
+
function armCursorHook() {
|
|
35443
|
+
if (cursorHookArmed) return;
|
|
35444
|
+
cursorHookArmed = true;
|
|
35445
|
+
process.on("exit", () => process.stdout.write("\x1B[?25h"));
|
|
35446
|
+
}
|
|
35447
|
+
function water() {
|
|
35448
|
+
const mode = waterMode();
|
|
35449
|
+
if (!mode) return null;
|
|
35450
|
+
armCursorHook();
|
|
35451
|
+
const L = layout();
|
|
35452
|
+
let below = 0;
|
|
35453
|
+
let t = 0;
|
|
35454
|
+
process.stdout.write("\x1B[?25l" + frame(t, mode, L).join("\n") + "\n");
|
|
35455
|
+
const rawStderrWrite = process.stderr.write.bind(process.stderr);
|
|
35456
|
+
process.stderr.write = ((chunk, ...rest) => {
|
|
35457
|
+
const s = typeof chunk === "string" ? chunk : Buffer.from(chunk).toString("utf8");
|
|
35458
|
+
for (const ch of s) if (ch === "\n") below++;
|
|
35459
|
+
return rawStderrWrite(chunk, ...rest);
|
|
35460
|
+
});
|
|
35461
|
+
const timer = setInterval(() => {
|
|
35462
|
+
if ((process.stdout.columns || 80) < L.width + 1) {
|
|
35463
|
+
stop();
|
|
35464
|
+
return;
|
|
35465
|
+
}
|
|
35466
|
+
t += 0.09;
|
|
35467
|
+
const up = below + L.rows;
|
|
35468
|
+
const body = frame(t, mode, L).join("\x1B[1B\r");
|
|
35469
|
+
process.stdout.write(`\x1B7\x1B[${up}A\r` + body + "\x1B8");
|
|
35470
|
+
}, 90);
|
|
35471
|
+
function stop() {
|
|
35472
|
+
clearInterval(timer);
|
|
35473
|
+
process.stderr.write = rawStderrWrite;
|
|
35474
|
+
process.stdout.write("\x1B[?25h");
|
|
35475
|
+
}
|
|
35476
|
+
return {
|
|
35477
|
+
wrote(s) {
|
|
35478
|
+
for (const ch of s) if (ch === "\n") below++;
|
|
35479
|
+
},
|
|
35480
|
+
stop
|
|
35481
|
+
};
|
|
35482
|
+
}
|
|
35483
|
+
|
|
35352
35484
|
// src/commands/compute.ts
|
|
35353
35485
|
var import_picocolors3 = __toESM(require_picocolors(), 1);
|
|
35354
35486
|
var SITE = (process.env.AGENTGATES_ORIGIN || "https://agentgates.ai").replace(/\/$/, "");
|
|
@@ -35368,7 +35500,7 @@ async function computePlans(opts) {
|
|
|
35368
35500
|
return;
|
|
35369
35501
|
}
|
|
35370
35502
|
process.stdout.write(`
|
|
35371
|
-
${import_picocolors3.default.bold("MACHINES")} ${import_picocolors3.default.dim("
|
|
35503
|
+
${import_picocolors3.default.bold("CONFIDENTIAL VIRTUAL MACHINES")} ${import_picocolors3.default.dim("memory encrypted in use")}
|
|
35372
35504
|
|
|
35373
35505
|
`);
|
|
35374
35506
|
for (const p of plans) {
|
|
@@ -35401,33 +35533,67 @@ async function computeBuy() {
|
|
|
35401
35533
|
// src/commands/inference.ts
|
|
35402
35534
|
var import_picocolors4 = __toESM(require_picocolors(), 1);
|
|
35403
35535
|
var SITE2 = (process.env.AGENTGATES_ORIGIN || "https://agentgates.ai").replace(/\/$/, "");
|
|
35536
|
+
function applyFilters(models, f) {
|
|
35537
|
+
let out = models;
|
|
35538
|
+
if (f.tier === "confidential") out = out.filter((m) => m.confidential);
|
|
35539
|
+
else if (f.tier === "open") out = out.filter((m) => !m.confidential);
|
|
35540
|
+
for (const t of f.tag ?? []) out = out.filter((m) => (m.tags ?? []).includes(t.toLowerCase()));
|
|
35541
|
+
if (f.org) out = out.filter((m) => (m.org ?? "").toLowerCase() === f.org.toLowerCase());
|
|
35542
|
+
if (f.search) {
|
|
35543
|
+
const q = f.search.toLowerCase();
|
|
35544
|
+
out = out.filter((m) => m.id.toLowerCase().includes(q) || m.name.toLowerCase().includes(q));
|
|
35545
|
+
}
|
|
35546
|
+
return out;
|
|
35547
|
+
}
|
|
35548
|
+
var hasFilters = (f) => Boolean(f.tier || (f.tag ?? []).length || f.org || f.search);
|
|
35404
35549
|
var ctx = (n) => n >= 1e6 ? `${Math.round(n / 1e6)}M` : `${Math.round(n / 1e3)}k`;
|
|
35405
35550
|
async function inferenceModels(opts) {
|
|
35406
35551
|
const res = await fetch(`${SITE2}/api/inference/catalog`, { headers: { accept: "application/json" } });
|
|
35407
35552
|
if (!res.ok) throw new Error(`inference catalog: HTTP ${res.status}`);
|
|
35408
35553
|
const body = await res.json();
|
|
35554
|
+
const all = body.models ?? [];
|
|
35555
|
+
const filtered = hasFilters(opts);
|
|
35556
|
+
const matched = applyFilters(all, opts);
|
|
35409
35557
|
if (opts.json) {
|
|
35410
|
-
process.stdout.write(JSON.stringify(body, null, 2) + "\n");
|
|
35558
|
+
process.stdout.write(JSON.stringify({ ...body, models: matched }, null, 2) + "\n");
|
|
35411
35559
|
return;
|
|
35412
35560
|
}
|
|
35413
|
-
|
|
35414
|
-
|
|
35415
|
-
|
|
35416
|
-
`
|
|
35417
|
-
${import_picocolors4.default.bold("MODELS")} ${import_picocolors4.default.dim(opts.all ? `all ${models.length}` : `${shown.length} confidential of ${models.length}`)}
|
|
35561
|
+
if (filtered && matched.length === 0) {
|
|
35562
|
+
process.stdout.write(`
|
|
35563
|
+
${import_picocolors4.default.bold("MODELS")} ${import_picocolors4.default.dim(`0 of ${all.length} match`)}
|
|
35418
35564
|
|
|
35419
|
-
`
|
|
35420
|
-
|
|
35421
|
-
|
|
35565
|
+
`);
|
|
35566
|
+
const vocab = [...new Set(all.flatMap((m) => m.tags ?? []))].sort().join(", ");
|
|
35567
|
+
process.stdout.write(` ${import_picocolors4.default.dim(`nothing matches. tags on this board: ${vocab || "none"}; tiers: confidential, open`)}
|
|
35568
|
+
|
|
35569
|
+
`);
|
|
35570
|
+
return;
|
|
35571
|
+
}
|
|
35572
|
+
const row = (m) => {
|
|
35422
35573
|
const tier = m.confidential ? import_picocolors4.default.cyan("attested") : import_picocolors4.default.dim("open");
|
|
35423
35574
|
const ask = m.typicalAskUsd ? `~$${Number(m.typicalAskUsd).toFixed(3)}/ask` : "";
|
|
35424
|
-
|
|
35575
|
+
const tags = (m.tags ?? []).join(" ");
|
|
35576
|
+
process.stdout.write(` ${import_picocolors4.default.bold(m.name.padEnd(22))} ${import_picocolors4.default.dim(`${ctx(m.contextLength)} ctx`.padEnd(9))} ${tier.padEnd(18)} ${import_picocolors4.default.cyan(ask)}${tags ? ` ${import_picocolors4.default.dim(tags)}` : ""}
|
|
35425
35577
|
`);
|
|
35426
35578
|
process.stdout.write(` ${import_picocolors4.default.dim(m.id.padEnd(22))} ${import_picocolors4.default.dim(`$${m.priceInUsdPerMTokens} in \xB7 $${m.priceOutUsdPerMTokens} out /M`)}
|
|
35427
35579
|
|
|
35428
35580
|
`);
|
|
35581
|
+
};
|
|
35582
|
+
const open2 = matched.filter((m) => !m.confidential);
|
|
35583
|
+
const attested = matched.filter((m) => m.confidential);
|
|
35584
|
+
const headline = filtered ? `${matched.length} of ${all.length} match` : `all ${all.length} \xB7 attested tier last`;
|
|
35585
|
+
process.stdout.write(`
|
|
35586
|
+
${import_picocolors4.default.bold("MODELS")} ${import_picocolors4.default.dim(headline)}
|
|
35587
|
+
|
|
35588
|
+
`);
|
|
35589
|
+
for (const m of open2) row(m);
|
|
35590
|
+
if (attested.length) {
|
|
35591
|
+
process.stdout.write(` ${import_picocolors4.default.bold("ATTESTED")} ${import_picocolors4.default.dim(`${attested.length} confidential, memory encrypted in use`)}
|
|
35592
|
+
|
|
35593
|
+
`);
|
|
35594
|
+
for (const m of attested) row(m);
|
|
35429
35595
|
}
|
|
35430
|
-
|
|
35596
|
+
process.stdout.write(` ${import_picocolors4.default.dim("filters: --tier confidential|open \xB7 --tag frontier \xB7 --org anthropic \xB7 --search gpt \xB7 --json")}
|
|
35431
35597
|
|
|
35432
35598
|
`);
|
|
35433
35599
|
}
|
|
@@ -35450,78 +35616,175 @@ var WORDMARK = [
|
|
|
35450
35616
|
" \\__,_\\__, \\___|_||_\\__\\__, \\__,_|\\__\\___/__/",
|
|
35451
35617
|
" |___/ |___/"
|
|
35452
35618
|
].join("\n");
|
|
35453
|
-
var TAGLINE = "Confidential
|
|
35619
|
+
var TAGLINE = "Confidential virtual machines and inference, paid per use in USDC.";
|
|
35620
|
+
function makePut(w) {
|
|
35621
|
+
return (s) => {
|
|
35622
|
+
process.stdout.write(s);
|
|
35623
|
+
w?.wrote(s);
|
|
35624
|
+
};
|
|
35625
|
+
}
|
|
35454
35626
|
function banner() {
|
|
35455
|
-
|
|
35456
|
-
process.stdout.write(
|
|
35627
|
+
const w = water();
|
|
35628
|
+
if (!w) process.stdout.write("\n" + import_picocolors5.default.cyan(WORDMARK) + "\n\n");
|
|
35629
|
+
const put = makePut(w);
|
|
35630
|
+
put(` ${import_picocolors5.default.dim(TAGLINE)}
|
|
35457
35631
|
|
|
35458
35632
|
`);
|
|
35633
|
+
return { w, put };
|
|
35634
|
+
}
|
|
35635
|
+
var MENU = {
|
|
35636
|
+
compute: { label: "see virtual machine pricing" },
|
|
35637
|
+
models: { label: "see inference pricing" },
|
|
35638
|
+
docs: { label: "read the docs" },
|
|
35639
|
+
poke: { label: "nothing, I'll poke around" },
|
|
35640
|
+
wallet: { label: "pair my wallet", hint: "(members only)" }
|
|
35641
|
+
};
|
|
35642
|
+
function menuOrder(lane) {
|
|
35643
|
+
const browse = lane === "inference" ? ["models", "compute"] : ["compute", "models"];
|
|
35644
|
+
return [...browse, "docs", "poke", "wallet"];
|
|
35645
|
+
}
|
|
35646
|
+
function printMenu(put, order, first) {
|
|
35647
|
+
put(` ${import_picocolors5.default.bold(first ? "choose how to start:" : "what next:")}
|
|
35648
|
+
`);
|
|
35649
|
+
order.forEach((k, i) => {
|
|
35650
|
+
const item = MENU[k];
|
|
35651
|
+
put(` ${import_picocolors5.default.cyan(`${i + 1}.`)} ${item.label}${item.hint ? ` ${import_picocolors5.default.dim(item.hint)}` : ""}
|
|
35652
|
+
`);
|
|
35653
|
+
});
|
|
35654
|
+
}
|
|
35655
|
+
async function printDocs(put, lane) {
|
|
35656
|
+
const lead = lane === "inference" ? "inference" : "compute";
|
|
35657
|
+
const other = lead === "inference" ? "compute" : "inference";
|
|
35658
|
+
const name = (l) => l === "compute" ? "virtual machines" : "inference";
|
|
35659
|
+
try {
|
|
35660
|
+
const res = await fetch(`${CREATORS_ORIGIN}/api/${lead}/docs`, {
|
|
35661
|
+
headers: { accept: "text/markdown, text/plain" }
|
|
35662
|
+
});
|
|
35663
|
+
if (!res.ok) throw new Error(String(res.status));
|
|
35664
|
+
const md = (await res.text()).replace(/\s+$/, "");
|
|
35665
|
+
put(`
|
|
35666
|
+
${import_picocolors5.default.bold(`THE ${name(lead).toUpperCase()} CONTRACT`)} ${import_picocolors5.default.dim(`${CREATORS_ORIGIN}/api/${lead}/docs`)}
|
|
35667
|
+
|
|
35668
|
+
`);
|
|
35669
|
+
put(md + "\n\n");
|
|
35670
|
+
put(` ${import_picocolors5.default.dim(`the ${name(other)} contract:`)} ${CREATORS_ORIGIN}/api/${other}/docs
|
|
35671
|
+
|
|
35672
|
+
`);
|
|
35673
|
+
} catch {
|
|
35674
|
+
put(` ${import_picocolors5.default.red("\u2715")} could not fetch the contract; the URLs:
|
|
35675
|
+
`);
|
|
35676
|
+
put(` ${import_picocolors5.default.cyan("virtual machines")} ${CREATORS_ORIGIN}/api/compute/docs
|
|
35677
|
+
`);
|
|
35678
|
+
put(` ${import_picocolors5.default.cyan("inference")} ${CREATORS_ORIGIN}/api/inference/docs
|
|
35679
|
+
|
|
35680
|
+
`);
|
|
35681
|
+
}
|
|
35459
35682
|
}
|
|
35460
35683
|
async function onboard(opts = {}) {
|
|
35461
35684
|
const profileName = opts.profile ?? DEFAULT_PROFILE;
|
|
35462
|
-
banner();
|
|
35685
|
+
const { w, put } = banner();
|
|
35463
35686
|
const existing = await loadProfile(profileName).catch(() => null);
|
|
35464
35687
|
if (existing) {
|
|
35465
|
-
|
|
35688
|
+
put(` ${import_picocolors5.default.green("\u2713")} already paired as ${import_picocolors5.default.bold(existing.walletAddress ?? existing.userId)}
|
|
35466
35689
|
|
|
35467
35690
|
`);
|
|
35468
|
-
printNext();
|
|
35469
|
-
return;
|
|
35470
35691
|
}
|
|
35471
35692
|
if (!process.stdin.isTTY) {
|
|
35472
|
-
|
|
35693
|
+
put(` No terminal attached, so no menu. The machine door:
|
|
35473
35694
|
|
|
35474
35695
|
`);
|
|
35475
|
-
|
|
35476
|
-
|
|
35477
|
-
}
|
|
35478
|
-
process.stdout.write(` ${import_picocolors5.default.bold("choose how to start:")}
|
|
35696
|
+
put(` agentgates compute plans --json ${import_picocolors5.default.dim("\xB7 virtual machine pricing, JSON")}
|
|
35697
|
+
`);
|
|
35698
|
+
put(` agentgates inference models --json ${import_picocolors5.default.dim("\xB7 model pricing, JSON; --tier --tag --org --search filter it")}
|
|
35479
35699
|
`);
|
|
35480
|
-
|
|
35700
|
+
put(` ${CREATORS_ORIGIN}/api/compute/docs ${import_picocolors5.default.dim("\xB7 the buy/read/renew/destroy contract")}
|
|
35481
35701
|
`);
|
|
35482
|
-
|
|
35702
|
+
put(` ${CREATORS_ORIGIN}/api/inference/docs ${import_picocolors5.default.dim("\xB7 the chat contract, x402 or Bearer")}
|
|
35483
35703
|
`);
|
|
35484
|
-
|
|
35704
|
+
put(` ${CREATORS_ORIGIN}/llms.txt ${import_picocolors5.default.dim("\xB7 the whole surface")}
|
|
35705
|
+
|
|
35485
35706
|
`);
|
|
35486
|
-
|
|
35707
|
+
if (!existing) {
|
|
35708
|
+
put(` Pairing a wallet needs a human at a browser: ${import_picocolors5.default.bold("agentgates onboard")} in a real terminal.
|
|
35709
|
+
|
|
35487
35710
|
`);
|
|
35711
|
+
}
|
|
35712
|
+
return;
|
|
35713
|
+
}
|
|
35714
|
+
const order = menuOrder(opts.lane).filter((k) => existing ? k !== "wallet" : true);
|
|
35715
|
+
printMenu(put, order, true);
|
|
35488
35716
|
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
35489
|
-
|
|
35717
|
+
const exitDefault = String(order.indexOf("poke") + 1);
|
|
35718
|
+
let first = true;
|
|
35719
|
+
let plain = put;
|
|
35490
35720
|
try {
|
|
35491
|
-
|
|
35492
|
-
|
|
35493
|
-
|
|
35494
|
-
|
|
35495
|
-
|
|
35721
|
+
for (; ; ) {
|
|
35722
|
+
const fallback = first ? "1" : exitDefault;
|
|
35723
|
+
let choice;
|
|
35724
|
+
try {
|
|
35725
|
+
choice = (await rl.question(` ${import_picocolors5.default.dim(`choice [${fallback}]:`)} `)).trim() || fallback;
|
|
35726
|
+
} catch {
|
|
35727
|
+
if (first) w?.stop();
|
|
35728
|
+
process.stdout.write("\n");
|
|
35729
|
+
printNext(makePut(null));
|
|
35730
|
+
return;
|
|
35731
|
+
}
|
|
35732
|
+
if (first) {
|
|
35733
|
+
w?.stop();
|
|
35734
|
+
plain = makePut(null);
|
|
35735
|
+
first = false;
|
|
35736
|
+
}
|
|
35737
|
+
process.stdout.write("\n");
|
|
35738
|
+
const key = order[parseInt(choice, 10) - 1] ?? "poke";
|
|
35739
|
+
if (key === "poke") {
|
|
35740
|
+
printNext(plain);
|
|
35741
|
+
return;
|
|
35742
|
+
}
|
|
35743
|
+
switch (key) {
|
|
35744
|
+
case "wallet":
|
|
35745
|
+
try {
|
|
35746
|
+
await runLoginFlow({ profile: profileName, jsonMode: false, ttyHeader: "Pairing this terminal with your wallet\u2026" });
|
|
35747
|
+
process.stdout.write("\n");
|
|
35748
|
+
} catch {
|
|
35749
|
+
plain(` ${import_picocolors5.default.red("\u2715")} pairing didn't complete
|
|
35750
|
+
|
|
35751
|
+
`);
|
|
35752
|
+
}
|
|
35753
|
+
break;
|
|
35754
|
+
case "compute":
|
|
35755
|
+
try {
|
|
35756
|
+
await computePlans({});
|
|
35757
|
+
} catch {
|
|
35758
|
+
plain(` ${import_picocolors5.default.red("\u2715")} could not read the compute catalog
|
|
35759
|
+
|
|
35760
|
+
`);
|
|
35761
|
+
}
|
|
35762
|
+
break;
|
|
35763
|
+
case "models":
|
|
35764
|
+
try {
|
|
35765
|
+
await inferenceModels({});
|
|
35766
|
+
} catch {
|
|
35767
|
+
plain(` ${import_picocolors5.default.red("\u2715")} could not read the model catalog
|
|
35768
|
+
|
|
35769
|
+
`);
|
|
35770
|
+
}
|
|
35771
|
+
break;
|
|
35772
|
+
case "docs":
|
|
35773
|
+
await printDocs(plain, opts.lane);
|
|
35774
|
+
break;
|
|
35775
|
+
}
|
|
35776
|
+
printMenu(plain, order, false);
|
|
35777
|
+
}
|
|
35496
35778
|
} finally {
|
|
35497
35779
|
rl.close();
|
|
35498
35780
|
}
|
|
35499
|
-
process.stdout.write("\n");
|
|
35500
|
-
switch (choice) {
|
|
35501
|
-
case "1":
|
|
35502
|
-
await runLoginFlow({ profile: profileName, jsonMode: false, ttyHeader: "Pairing this terminal with your wallet\u2026" });
|
|
35503
|
-
process.stdout.write("\n");
|
|
35504
|
-
printNext();
|
|
35505
|
-
return;
|
|
35506
|
-
case "2":
|
|
35507
|
-
await computePlans({});
|
|
35508
|
-
printNext();
|
|
35509
|
-
return;
|
|
35510
|
-
case "3":
|
|
35511
|
-
await inferenceModels({});
|
|
35512
|
-
printNext();
|
|
35513
|
-
return;
|
|
35514
|
-
default:
|
|
35515
|
-
printNext();
|
|
35516
|
-
return;
|
|
35517
|
-
}
|
|
35518
35781
|
}
|
|
35519
|
-
function printNext() {
|
|
35520
|
-
|
|
35782
|
+
function printNext(put) {
|
|
35783
|
+
put(` ${import_picocolors5.default.dim("agentgates compute plans")} ${import_picocolors5.default.dim("\xB7 virtual machines by the hour")}
|
|
35521
35784
|
`);
|
|
35522
|
-
|
|
35785
|
+
put(` ${import_picocolors5.default.dim("agentgates inference models")} ${import_picocolors5.default.dim("\xB7 models by the token")}
|
|
35523
35786
|
`);
|
|
35524
|
-
|
|
35787
|
+
put(` ${import_picocolors5.default.dim("agentgates --help")} ${import_picocolors5.default.dim("\xB7 everything else")}
|
|
35525
35788
|
|
|
35526
35789
|
`);
|
|
35527
35790
|
}
|
|
@@ -40517,10 +40780,10 @@ desk.command("buy").description("Buy a launch coin with desk USDC credit (sessio
|
|
|
40517
40780
|
desk.command("sell").description("Sell desk coin credit back to the curve (session signs; sells uncapped by design \u2014 proceeds only ever land in the owner's vault)").argument("<coin>", "coin ticker or base58 mint address").argument("<amount>", 'coin amount, a percentage like "50%" (resolved from the state read), or "all"').option("--min-out <usdc>", "explicit min-out in USDC (overrides the server-owned guard)").option("--json", "machine-readable output").action(async (coin, amount, opts) => {
|
|
40518
40781
|
await deskSell(coin, amount, opts);
|
|
40519
40782
|
});
|
|
40520
|
-
program2.command("onboard").description("Welcome screen:
|
|
40783
|
+
program2.command("onboard").description("Welcome screen: look at what is for sale, or pair your wallet. Run by the installer.").option("--profile <name>", "named profile (default: 'default')").option("--lane <lane>", "which lane leads the menu: compute | inference").action(async (opts) => {
|
|
40521
40784
|
await onboard(opts);
|
|
40522
40785
|
});
|
|
40523
|
-
var compute = program2.command("compute").description("Confidential
|
|
40786
|
+
var compute = program2.command("compute").description("Confidential virtual machines by the hour, USDC per payment");
|
|
40524
40787
|
compute.command("plans").description("Live plans and the price ladder. Public read: no key, no account, no payment.").option("--json", "machine-readable output (the raw catalog)").action(async (opts) => {
|
|
40525
40788
|
await computePlans(opts);
|
|
40526
40789
|
});
|
|
@@ -40528,7 +40791,7 @@ compute.command("buy").description("Rent a machine (needs an x402 signature this
|
|
|
40528
40791
|
await computeBuy();
|
|
40529
40792
|
});
|
|
40530
40793
|
var inference = program2.command("inference").description("Attested confidential models, plus an open tier, USDC per request");
|
|
40531
|
-
inference.command("models").description("Live models and per-token prices. Public read: no key, no account, no payment.").option("--all", "every model, not just the attested tier").option("--json", "machine-readable output (the
|
|
40794
|
+
inference.command("models").description("Live models and per-token prices. Public read: no key, no account, no payment.").option("--all", "every model, not just the attested tier").option("--tier <tier>", "confidential | open").option("--tag <tag>", "filter by tag, repeatable (the board carries: reasoning, multimodal, frontier)", (v, prev) => prev.concat(v), []).option("--org <org>", "filter by maker org (openai, anthropic, qwen, ...)").option("--search <text>", "match against model id and name").option("--json", "machine-readable output (the catalog, filters applied)").action(async (opts) => {
|
|
40532
40795
|
await inferenceModels(opts);
|
|
40533
40796
|
});
|
|
40534
40797
|
inference.command("ask").description("One paid ask (needs an x402 signature this CLI does not have yet)").action(async () => {
|