@nosana/api 2.14.3 → 2.16.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/README.md +12 -0
- package/dist/client/client-manager/schema.d.ts +143 -1
- package/dist/client/client-manager/schema.d.ts.map +1 -1
- package/dist/client/host-manager/schema.d.ts +1187 -193
- package/dist/client/host-manager/schema.d.ts.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/routes/index.d.ts +1 -0
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/index.js +1 -0
- package/dist/routes/index.js.map +1 -1
- package/dist/routes/jobs/index.d.ts.map +1 -1
- package/dist/routes/jobs/index.js +10 -0
- package/dist/routes/jobs/index.js.map +1 -1
- package/dist/routes/jobs/types.d.ts +2 -0
- package/dist/routes/jobs/types.d.ts.map +1 -1
- package/dist/routes/reservations/index.d.ts +12 -0
- package/dist/routes/reservations/index.d.ts.map +1 -0
- package/dist/routes/reservations/index.js +34 -0
- package/dist/routes/reservations/index.js.map +1 -0
- package/dist/routes/reservations/types.d.ts +37 -0
- package/dist/routes/reservations/types.d.ts.map +1 -0
- package/dist/routes/reservations/types.js +2 -0
- package/dist/routes/reservations/types.js.map +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -182,6 +182,18 @@ await vault.topup({ NOS: 100 });
|
|
|
182
182
|
| `getTemplatePerformance` | `nodeId: string` | `Promise<Record<string, unknown>>` |
|
|
183
183
|
| `getBenchmarkSummary` | `request?: BenchmarkSummaryRequest` | `Promise<Record<string, unknown>>` |
|
|
184
184
|
|
|
185
|
+
### `api.reservations` — GPU Models & Requirement Lookups
|
|
186
|
+
|
|
187
|
+
Read-only and unauthenticated. A requirement set maps a metric key to a value:
|
|
188
|
+
a number is a minimum, a string or boolean must match exactly, and the GPU
|
|
189
|
+
model is the `name` key.
|
|
190
|
+
|
|
191
|
+
| Method | Parameters | Returns |
|
|
192
|
+
|--------|-----------|---------|
|
|
193
|
+
| `listGpus` | — | `Promise<NosanaGpuModels>` |
|
|
194
|
+
| `getRequirementOptions` | `request?: NosanaRequirementOptionsRequest` | `Promise<NosanaRequirementOptions>` |
|
|
195
|
+
| `findAvailable` | `request?: NosanaAvailableNodesRequest` | `Promise<NosanaAvailableNodes>` |
|
|
196
|
+
|
|
185
197
|
### `api.node` / `api.jobs.get(job)` — Node access
|
|
186
198
|
|
|
187
199
|
A node verifies the job owner's signature, and the client manager signs on the
|
|
@@ -413,7 +413,7 @@ export interface paths {
|
|
|
413
413
|
get?: never;
|
|
414
414
|
put?: never;
|
|
415
415
|
post?: never;
|
|
416
|
-
delete
|
|
416
|
+
delete: operations["deleteCreditsAdminLlmModelsById"];
|
|
417
417
|
options?: never;
|
|
418
418
|
head?: never;
|
|
419
419
|
patch: operations["patchCreditsAdminLlmModelsById"];
|
|
@@ -527,6 +527,26 @@ export interface paths {
|
|
|
527
527
|
patch?: never;
|
|
528
528
|
trace?: never;
|
|
529
529
|
};
|
|
530
|
+
"/jobs/assign/batch": {
|
|
531
|
+
parameters: {
|
|
532
|
+
query?: never;
|
|
533
|
+
header?: never;
|
|
534
|
+
path?: never;
|
|
535
|
+
cookie?: never;
|
|
536
|
+
};
|
|
537
|
+
get?: never;
|
|
538
|
+
put?: never;
|
|
539
|
+
/**
|
|
540
|
+
* Bulk-assign jobs to nodes using credits
|
|
541
|
+
* @description Bulk-create jobs assigned directly to the given `node` each (on-chain `assign` instead of listing into the market queue), in the fewest packed transactions. Same contract as `/jobs/list/batch`: requires an `Idempotency-Key` header (one key per batch), the batch is posted at most once per key, and the response reports each job's outcome by `index` — `confirmed` (with its `job`/`run` address) or `expired`. Re-post only the expired items under a fresh key. Still-confirming returns 409 `IDEMPOTENCY_KEY_IN_PROGRESS` (retry the same key).
|
|
542
|
+
*/
|
|
543
|
+
post: operations["postJobsAssignBatch"];
|
|
544
|
+
delete?: never;
|
|
545
|
+
options?: never;
|
|
546
|
+
head?: never;
|
|
547
|
+
patch?: never;
|
|
548
|
+
trace?: never;
|
|
549
|
+
};
|
|
530
550
|
"/jobs/{address}/extend": {
|
|
531
551
|
parameters: {
|
|
532
552
|
query?: never;
|
|
@@ -3244,6 +3264,25 @@ export interface operations {
|
|
|
3244
3264
|
};
|
|
3245
3265
|
};
|
|
3246
3266
|
};
|
|
3267
|
+
deleteCreditsAdminLlmModelsById: {
|
|
3268
|
+
parameters: {
|
|
3269
|
+
query?: never;
|
|
3270
|
+
header?: never;
|
|
3271
|
+
path: {
|
|
3272
|
+
id: string;
|
|
3273
|
+
};
|
|
3274
|
+
cookie?: never;
|
|
3275
|
+
};
|
|
3276
|
+
requestBody?: never;
|
|
3277
|
+
responses: {
|
|
3278
|
+
200: {
|
|
3279
|
+
headers: {
|
|
3280
|
+
[name: string]: unknown;
|
|
3281
|
+
};
|
|
3282
|
+
content?: never;
|
|
3283
|
+
};
|
|
3284
|
+
};
|
|
3285
|
+
};
|
|
3247
3286
|
patchCreditsAdminLlmModelsById: {
|
|
3248
3287
|
parameters: {
|
|
3249
3288
|
query?: never;
|
|
@@ -3690,6 +3729,109 @@ export interface operations {
|
|
|
3690
3729
|
};
|
|
3691
3730
|
};
|
|
3692
3731
|
};
|
|
3732
|
+
postJobsAssignBatch: {
|
|
3733
|
+
parameters: {
|
|
3734
|
+
query?: never;
|
|
3735
|
+
header: {
|
|
3736
|
+
/** @description De-duplicates retried requests sharing the same key (one key per batch). Required on batch endpoints — omitting it returns 400. */
|
|
3737
|
+
"Idempotency-Key": string;
|
|
3738
|
+
};
|
|
3739
|
+
path?: never;
|
|
3740
|
+
cookie?: never;
|
|
3741
|
+
};
|
|
3742
|
+
requestBody: {
|
|
3743
|
+
content: {
|
|
3744
|
+
"application/json": {
|
|
3745
|
+
/** @description Jobs to bulk-assign, each to its node */
|
|
3746
|
+
jobs: {
|
|
3747
|
+
/** @description IPFS hash of the job definition */
|
|
3748
|
+
ipfsHash: string;
|
|
3749
|
+
/** @description Market address */
|
|
3750
|
+
market: string;
|
|
3751
|
+
/** @description Job timeout in seconds (default: 3600). Same 3600-second minimum as single LIST; one too-short item rejects the whole batch with 400. */
|
|
3752
|
+
timeout?: number;
|
|
3753
|
+
/** @description Address (base58 public key) of the node to assign the job to */
|
|
3754
|
+
node: string;
|
|
3755
|
+
}[];
|
|
3756
|
+
};
|
|
3757
|
+
"multipart/form-data": {
|
|
3758
|
+
/** @description Jobs to bulk-assign, each to its node */
|
|
3759
|
+
jobs: {
|
|
3760
|
+
/** @description IPFS hash of the job definition */
|
|
3761
|
+
ipfsHash: string;
|
|
3762
|
+
/** @description Market address */
|
|
3763
|
+
market: string;
|
|
3764
|
+
/** @description Job timeout in seconds (default: 3600). Same 3600-second minimum as single LIST; one too-short item rejects the whole batch with 400. */
|
|
3765
|
+
timeout?: number;
|
|
3766
|
+
/** @description Address (base58 public key) of the node to assign the job to */
|
|
3767
|
+
node: string;
|
|
3768
|
+
}[];
|
|
3769
|
+
};
|
|
3770
|
+
"text/plain": {
|
|
3771
|
+
/** @description Jobs to bulk-assign, each to its node */
|
|
3772
|
+
jobs: {
|
|
3773
|
+
/** @description IPFS hash of the job definition */
|
|
3774
|
+
ipfsHash: string;
|
|
3775
|
+
/** @description Market address */
|
|
3776
|
+
market: string;
|
|
3777
|
+
/** @description Job timeout in seconds (default: 3600). Same 3600-second minimum as single LIST; one too-short item rejects the whole batch with 400. */
|
|
3778
|
+
timeout?: number;
|
|
3779
|
+
/** @description Address (base58 public key) of the node to assign the job to */
|
|
3780
|
+
node: string;
|
|
3781
|
+
}[];
|
|
3782
|
+
};
|
|
3783
|
+
};
|
|
3784
|
+
};
|
|
3785
|
+
responses: {
|
|
3786
|
+
/** @description Per-item results by `index`: `confirmed` (with its job/run address and the packed tx's `tx` signature) or `expired` — re-post only the expired items under a fresh key. `tx` is absent on an already-terminal no-op (nothing was sent); items packed into the same on-chain tx share one `tx`. */
|
|
3787
|
+
200: {
|
|
3788
|
+
headers: {
|
|
3789
|
+
[name: string]: unknown;
|
|
3790
|
+
};
|
|
3791
|
+
content: {
|
|
3792
|
+
"application/json": components["schemas"]["JobsBatchResponse"];
|
|
3793
|
+
};
|
|
3794
|
+
};
|
|
3795
|
+
/** @description Missing `Idempotency-Key` header (required on batch endpoints) or an otherwise invalid request. Ordinary error: no `code` field. */
|
|
3796
|
+
400: {
|
|
3797
|
+
headers: {
|
|
3798
|
+
[name: string]: unknown;
|
|
3799
|
+
};
|
|
3800
|
+
content: {
|
|
3801
|
+
"application/json": components["schemas"]["JobError"];
|
|
3802
|
+
};
|
|
3803
|
+
};
|
|
3804
|
+
/** @description Caller does not own the job, or the market is not credit-eligible. Ordinary error: no `code` field. */
|
|
3805
|
+
403: {
|
|
3806
|
+
headers: {
|
|
3807
|
+
[name: string]: unknown;
|
|
3808
|
+
};
|
|
3809
|
+
content: {
|
|
3810
|
+
"application/json": components["schemas"]["JobError"];
|
|
3811
|
+
};
|
|
3812
|
+
};
|
|
3813
|
+
/** @description Job, credit-job, or user not found — or an Idempotency-Key minted by a different user. Ordinary error: no `code` field. */
|
|
3814
|
+
404: {
|
|
3815
|
+
headers: {
|
|
3816
|
+
[name: string]: unknown;
|
|
3817
|
+
};
|
|
3818
|
+
content: {
|
|
3819
|
+
"application/json": components["schemas"]["JobError"];
|
|
3820
|
+
};
|
|
3821
|
+
};
|
|
3822
|
+
/** @description Idempotency control signal — branch on `code` (IDEMPOTENCY_KEY_*), never on the HTTP status. IN_PROGRESS → retry the same key after Retry-After; EXPIRED → mint a fresh key; PAYLOAD_MISMATCH → do not retry. */
|
|
3823
|
+
409: {
|
|
3824
|
+
headers: {
|
|
3825
|
+
/** @description Seconds to wait before retrying the same key. Sent only for IDEMPOTENCY_KEY_IN_PROGRESS. */
|
|
3826
|
+
"Retry-After"?: number;
|
|
3827
|
+
[name: string]: unknown;
|
|
3828
|
+
};
|
|
3829
|
+
content: {
|
|
3830
|
+
"application/json": components["schemas"]["IdempotencyError"];
|
|
3831
|
+
};
|
|
3832
|
+
};
|
|
3833
|
+
};
|
|
3834
|
+
};
|
|
3693
3835
|
postJobsByAddressExtend: {
|
|
3694
3836
|
parameters: {
|
|
3695
3837
|
query?: never;
|