@infernetprotocol/cli 0.1.56 → 0.1.57
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/commands/mcp.js +3 -1
- package/commands/reservation.js +13 -1
- package/lib/reservations-client.js +4 -1
- package/package.json +7 -7
package/commands/mcp.js
CHANGED
|
@@ -27,7 +27,7 @@ export const TOOLS = [
|
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
name: 'reservation_create',
|
|
30
|
-
description: 'Book a managed endpoint: exact model ids on one named operator target (provider_id of an Infernet node, or an OpenAI-compatible endpoint_url), starting at a whole UTC hour for N hours, with included tokens and per-key/shared rps + concurrency limits. Returns the reservation and a one-time buyer token.
|
|
30
|
+
description: 'Book a managed endpoint: exact model ids on one named operator target (provider_id of an Infernet node, or an OpenAI-compatible endpoint_url), starting at a whole UTC hour for N hours, with included tokens and per-key/shared rps + concurrency limits. Returns the reservation and a one-time buyer token. Unpriced unless gpu_class or price_per_hour is passed.',
|
|
31
31
|
inputSchema: {
|
|
32
32
|
type: 'object',
|
|
33
33
|
required: ['name', 'operator_name', 'models', 'start_at', 'hours'],
|
|
@@ -48,7 +48,9 @@ export const TOOLS = [
|
|
|
48
48
|
shared_concurrency: { type: 'integer', minimum: 1 },
|
|
49
49
|
required_minutes_per_hour: { type: 'integer', minimum: 1, maximum: 60 },
|
|
50
50
|
probe_completion: { type: 'boolean' },
|
|
51
|
+
gpu_class: { type: 'string', enum: ['l40s', 'a100', 'h100', 'h100x2'], description: 'Prices the reservation from the list (GET /api/v1/reservations/pricing); a lower price_per_hour is refused.' },
|
|
51
52
|
price_per_hour: { type: 'number', minimum: 0 },
|
|
53
|
+
setup_fee: { type: 'number', minimum: 0 },
|
|
52
54
|
currency: { type: 'string' },
|
|
53
55
|
notes: { type: 'string' }
|
|
54
56
|
}
|
package/commands/reservation.js
CHANGED
|
@@ -21,7 +21,10 @@ Usage:
|
|
|
21
21
|
--start 2026-10-12T15:00:00Z --hours 1 --included-tokens 2000000
|
|
22
22
|
--per-key-rps 2 --per-key-concurrency 2 --shared-rps 10 --shared-concurrency 8
|
|
23
23
|
[--buyer KAI] [--required-minutes 60] [--probe-completion]
|
|
24
|
-
[--
|
|
24
|
+
[--gpu-class l40s|a100|h100|h100x2] [--price-per-hour X] [--setup-fee X]
|
|
25
|
+
[--currency USD] [--notes "..."]
|
|
26
|
+
(--gpu-class prices it from the list; a lower --price-per-hour is refused)
|
|
27
|
+
infernet reservation pricing the price list by GPU class
|
|
25
28
|
infernet reservation show <id>
|
|
26
29
|
infernet reservation price <id> --price-per-hour X [--currency USD]
|
|
27
30
|
infernet reservation cancel <id>
|
|
@@ -100,6 +103,15 @@ export default async function reservation(args) {
|
|
|
100
103
|
process.stdout.write(`next: infernet reservation key-issue ${created.reservation.id} --label <customer>\n`);
|
|
101
104
|
return 0;
|
|
102
105
|
}
|
|
106
|
+
case 'pricing': {
|
|
107
|
+
const list = await client.pricing();
|
|
108
|
+
if (json) return out(list), 0;
|
|
109
|
+
process.stdout.write(`${list.currency} ${list.basis}\nsetup fee: ${list.setup_fee}\n\n`);
|
|
110
|
+
for (const t of list.tiers) {
|
|
111
|
+
process.stdout.write(`${t.gpu_class.padEnd(7)} ${t.label.padEnd(13)} $${t.price_per_hour.toFixed(2)}/hr setup $${t.setup_fee.toFixed(2)} ${t.fits}\n`);
|
|
112
|
+
}
|
|
113
|
+
return 0;
|
|
114
|
+
}
|
|
103
115
|
case 'show': {
|
|
104
116
|
const r = await client.get(needId(a1));
|
|
105
117
|
return out(r), 0;
|
|
@@ -48,6 +48,7 @@ export function createReservationsClient({ baseUrl, adminToken, buyerToken, fetc
|
|
|
48
48
|
|
|
49
49
|
return {
|
|
50
50
|
list: () => call('GET', '/api/v1/reservations'),
|
|
51
|
+
pricing: () => call('GET', '/api/v1/reservations/pricing'),
|
|
51
52
|
create: (input) => call('POST', '/api/v1/reservations', { body: input }),
|
|
52
53
|
get: (id) => call('GET', `/api/v1/reservations/${enc(id)}`, { asBuyer: reader() }),
|
|
53
54
|
update: (id, patch) => call('PATCH', `/api/v1/reservations/${enc(id)}`, { body: patch }),
|
|
@@ -82,6 +83,8 @@ export function createBodyFromFlags(get) {
|
|
|
82
83
|
required_minutes_per_hour: num('required-minutes'),
|
|
83
84
|
probe_completion: get('probe-completion') === true || get('probe-completion') === 'true' ? true : undefined,
|
|
84
85
|
price_per_hour: get('price-per-hour'),
|
|
86
|
+
gpu_class: get('gpu-class'),
|
|
87
|
+
setup_fee: get('setup-fee'),
|
|
85
88
|
currency: get('currency'),
|
|
86
89
|
notes: get('notes')
|
|
87
90
|
};
|
|
@@ -118,7 +121,7 @@ export function renderInvoice(inv) {
|
|
|
118
121
|
const lines = [
|
|
119
122
|
`invoice data for reservation ${inv.reservation_id}${inv.buyer ? ` (buyer ${inv.buyer})` : ''}`,
|
|
120
123
|
`operator ${inv.operator_name} models ${inv.models.join(', ')}`,
|
|
121
|
-
`price per hour ${money(inv.price_per_hour)} final=${inv.final}`,
|
|
124
|
+
`price per hour ${money(inv.price_per_hour)}${inv.gpu_class ? ` (${inv.gpu_class})` : ''} setup fee ${money(inv.setup_fee)} final=${inv.final}`,
|
|
122
125
|
`hours: ${inv.hours_reserved} reserved, ${inv.hours_compliant} compliant, ${inv.hours_non_compliant} non-compliant, ${inv.hours_open} open`,
|
|
123
126
|
''
|
|
124
127
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infernetprotocol/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.57",
|
|
4
4
|
"description": "GPU-node CLI / daemon for the Infernet Protocol — register a GPU server with a Supabase control plane and start earning.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
"ora": "^9.4.0",
|
|
31
31
|
"react": "^17.0.2",
|
|
32
32
|
"react-blessed": "^0.7.2",
|
|
33
|
-
"@infernetprotocol/
|
|
34
|
-
"@infernetprotocol/
|
|
35
|
-
"@infernetprotocol/engine": "0.1.
|
|
36
|
-
"@infernetprotocol/
|
|
37
|
-
"@infernetprotocol/
|
|
38
|
-
"@infernetprotocol/
|
|
33
|
+
"@infernetprotocol/config": "0.1.57",
|
|
34
|
+
"@infernetprotocol/deploy-providers": "0.1.57",
|
|
35
|
+
"@infernetprotocol/engine": "0.1.57",
|
|
36
|
+
"@infernetprotocol/auth": "0.1.57",
|
|
37
|
+
"@infernetprotocol/rpc-adapter": "0.1.57",
|
|
38
|
+
"@infernetprotocol/gpu": "0.1.57"
|
|
39
39
|
},
|
|
40
40
|
"repository": {
|
|
41
41
|
"type": "git",
|