@runpod/mcp-server 4.5.0 → 4.7.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/CHANGELOG.md +47 -0
- package/README.md +7 -5
- package/dist/{chunk-4GF3CMSH.mjs → chunk-5IFIMVI6.mjs} +2 -2
- package/dist/{chunk-4GF3CMSH.mjs.map → chunk-5IFIMVI6.mjs.map} +1 -1
- package/dist/http.cjs +617 -242
- package/dist/http.cjs.map +1 -1
- package/dist/http.d.cts +6 -1
- package/dist/http.d.ts +6 -1
- package/dist/http.mjs +616 -242
- package/dist/http.mjs.map +1 -1
- package/dist/stdio.cjs +601 -238
- package/dist/stdio.cjs.map +1 -1
- package/dist/stdio.mjs +602 -239
- package/dist/stdio.mjs.map +1 -1
- package/dist/{wizard-KKTBTVXE.mjs → wizard-NVV3UNOG.mjs} +2 -2
- package/package.json +6 -3
- /package/dist/{wizard-KKTBTVXE.mjs.map → wizard-NVV3UNOG.mjs.map} +0 -0
package/dist/http.mjs
CHANGED
|
@@ -414,6 +414,7 @@ var generatedTools = [
|
|
|
414
414
|
title: "Create cluster",
|
|
415
415
|
operationId: "createCluster",
|
|
416
416
|
description: "Create an instant cluster (multiple pods with high-speed interconnect). BILLABLE from creation for every pod in the cluster: it rents compute.podCount identical pods at once, each with compute.gpuCountPerPod GPUs of compute.gpuTypeId \u2014 state the hourly price for the total GPU count (podCount * gpuCountPerPod, priced from the catalog tools) and create only after the user's explicit go on that quoted shape and total hourly price. Verify GPU stock first via the catalog tools. The compute shape and type are fixed at creation; only the name can be changed later. The container configuration applies to every pod, and templateId is the only private-image path \u2014 a bare registry property is rejected. Delete with delete-cluster when finished.",
|
|
417
|
+
directoryDescription: "Create an Instant Cluster: compute.podCount identical Pods joined by a high-speed interconnect, each with compute.gpuCountPerPod GPUs of compute.gpuTypeId. Billable from creation for every Pod in the cluster, at the GPU type's hourly price times the total GPU count. The compute shape and type are fixed at creation; only the name can change later. The container configuration applies to every Pod, and templateId is the only way to use a private image; a bare registry property is rejected.",
|
|
417
418
|
method: "POST",
|
|
418
419
|
path: "/v2/clusters",
|
|
419
420
|
params: [],
|
|
@@ -429,7 +430,8 @@ var generatedTools = [
|
|
|
429
430
|
type: "object",
|
|
430
431
|
properties: {
|
|
431
432
|
body: {
|
|
432
|
-
$ref: "#/$defs/CreateClusterRequest"
|
|
433
|
+
$ref: "#/$defs/CreateClusterRequest",
|
|
434
|
+
type: "object"
|
|
433
435
|
}
|
|
434
436
|
},
|
|
435
437
|
required: ["body"],
|
|
@@ -478,7 +480,7 @@ var generatedTools = [
|
|
|
478
480
|
description: "Environment variables as key-value pairs",
|
|
479
481
|
examples: [
|
|
480
482
|
{
|
|
481
|
-
JUPYTER_PASSWORD: "
|
|
483
|
+
JUPYTER_PASSWORD: "changeme"
|
|
482
484
|
}
|
|
483
485
|
]
|
|
484
486
|
},
|
|
@@ -666,7 +668,8 @@ var generatedTools = [
|
|
|
666
668
|
type: "object",
|
|
667
669
|
properties: {
|
|
668
670
|
body: {
|
|
669
|
-
$ref: "#/$defs/CreateDelegationRequest"
|
|
671
|
+
$ref: "#/$defs/CreateDelegationRequest",
|
|
672
|
+
type: "object"
|
|
670
673
|
}
|
|
671
674
|
},
|
|
672
675
|
required: ["body"],
|
|
@@ -680,7 +683,7 @@ var generatedTools = [
|
|
|
680
683
|
type: "string",
|
|
681
684
|
description: "ECR resource ARN",
|
|
682
685
|
examples: [
|
|
683
|
-
"arn:aws:ecr:us-east-2:
|
|
686
|
+
"arn:aws:ecr:us-east-2:123456789012:repository/runpod/deployment"
|
|
684
687
|
]
|
|
685
688
|
},
|
|
686
689
|
name: {
|
|
@@ -698,6 +701,7 @@ var generatedTools = [
|
|
|
698
701
|
title: "Create endpoint",
|
|
699
702
|
operationId: "createEndpoint",
|
|
700
703
|
description: "Create a serverless endpoint. BILLABLE: state the worker's hourly price (from the catalog tools) before creating. Worker hardware is one of two choices: the gpu object (gpu.pools takes serverless pool ids from the catalog, e.g. ADA_24, never display names; gpu.count sets GPUs per worker) or the cpu array of CPU flavor configurations for a CPU endpoint. type and scaling are required and fix the request-routing model. Workers cold-start on the first job: expect minutes, poll with get-job-status wait.",
|
|
704
|
+
directoryDescription: "Create a Serverless endpoint. Billable while its workers run, at the worker's hourly price. Worker hardware is either the gpu object (gpu.pools takes Serverless pool ids such as ADA_24, and gpu.count sets GPUs per worker) or the cpu array of CPU flavor configurations. type and scaling are required and set the request-routing model. Workers cold-start on their first job, which commonly takes minutes.",
|
|
701
705
|
method: "POST",
|
|
702
706
|
path: "/v2/serverless",
|
|
703
707
|
params: [],
|
|
@@ -713,7 +717,8 @@ var generatedTools = [
|
|
|
713
717
|
type: "object",
|
|
714
718
|
properties: {
|
|
715
719
|
body: {
|
|
716
|
-
$ref: "#/$defs/CreateEndpointRequest"
|
|
720
|
+
$ref: "#/$defs/CreateEndpointRequest",
|
|
721
|
+
type: "object"
|
|
717
722
|
}
|
|
718
723
|
},
|
|
719
724
|
required: ["body"],
|
|
@@ -762,7 +767,7 @@ var generatedTools = [
|
|
|
762
767
|
description: "Environment variables as key-value pairs",
|
|
763
768
|
examples: [
|
|
764
769
|
{
|
|
765
|
-
JUPYTER_PASSWORD: "
|
|
770
|
+
JUPYTER_PASSWORD: "changeme"
|
|
766
771
|
}
|
|
767
772
|
]
|
|
768
773
|
},
|
|
@@ -1013,7 +1018,7 @@ var generatedTools = [
|
|
|
1013
1018
|
type: "object",
|
|
1014
1019
|
required: ["volumeId"],
|
|
1015
1020
|
additionalProperties: false,
|
|
1016
|
-
description: "A volume mounted on every worker, always at `/runpod-volume`.
|
|
1021
|
+
description: "A volume mounted on every worker, always at `/runpod-volume`.",
|
|
1017
1022
|
properties: {
|
|
1018
1023
|
volumeId: {
|
|
1019
1024
|
type: "string",
|
|
@@ -1063,8 +1068,7 @@ var generatedTools = [
|
|
|
1063
1068
|
},
|
|
1064
1069
|
EndpointType: {
|
|
1065
1070
|
type: "string",
|
|
1066
|
-
description: "Request-routing semantics for a
|
|
1067
|
-
"x-enum-varnames": ["EndpointTypeQueue", "EndpointTypeLoadBalancer"],
|
|
1071
|
+
description: "Request-routing semantics for a serverless endpoint. `QUEUE` \u2014 submit asynchronous or synchronous jobs through the managed queue. `LOAD_BALANCER` \u2014 send requests directly to worker-defined HTTP paths.",
|
|
1068
1072
|
enum: ["QUEUE", "LOAD_BALANCER"]
|
|
1069
1073
|
},
|
|
1070
1074
|
EndpointWorkers: {
|
|
@@ -1158,7 +1162,8 @@ var generatedTools = [
|
|
|
1158
1162
|
type: "object",
|
|
1159
1163
|
properties: {
|
|
1160
1164
|
body: {
|
|
1161
|
-
$ref: "#/$defs/CreateGlobalVolumeRequest"
|
|
1165
|
+
$ref: "#/$defs/CreateGlobalVolumeRequest",
|
|
1166
|
+
type: "object"
|
|
1162
1167
|
}
|
|
1163
1168
|
},
|
|
1164
1169
|
required: ["body"],
|
|
@@ -1172,7 +1177,6 @@ var generatedTools = [
|
|
|
1172
1177
|
type: "string",
|
|
1173
1178
|
minLength: 1,
|
|
1174
1179
|
maxLength: 191,
|
|
1175
|
-
pattern: "[^\\p{Z}\\t-\\r\x85]",
|
|
1176
1180
|
description: "Human-readable name, 1\u2013191 characters with at least one non-whitespace character. Leading and trailing whitespace is trimmed.",
|
|
1177
1181
|
examples: ["training-data"]
|
|
1178
1182
|
}
|
|
@@ -1200,7 +1204,8 @@ var generatedTools = [
|
|
|
1200
1204
|
type: "object",
|
|
1201
1205
|
properties: {
|
|
1202
1206
|
body: {
|
|
1203
|
-
$ref: "#/$defs/CreateNetworkVolumeRequest"
|
|
1207
|
+
$ref: "#/$defs/CreateNetworkVolumeRequest",
|
|
1208
|
+
type: "object"
|
|
1204
1209
|
}
|
|
1205
1210
|
},
|
|
1206
1211
|
required: ["body"],
|
|
@@ -1252,6 +1257,7 @@ var generatedTools = [
|
|
|
1252
1257
|
title: "Create Pod",
|
|
1253
1258
|
operationId: "createPod",
|
|
1254
1259
|
description: 'Rent a GPU/CPU pod. BILLABLE from creation until stop/terminate: state the hourly price before creating. GPU selection is the gpu object: gpu.id takes a catalog GPU type id (e.g. "NVIDIA GeForce RTX 4090"), verified via list-gpu-types, and gpu.count sets the GPU count; cloud/data-center choice constrains stock.',
|
|
1260
|
+
directoryDescription: 'Create a GPU or CPU Pod. Billable from creation until it is stopped or terminated. GPU selection is the gpu object: gpu.id takes a GPU type id such as "NVIDIA GeForce RTX 4090", and gpu.count sets the number of GPUs. Cloud tier and data center choices limit which machines can host it.',
|
|
1255
1261
|
method: "POST",
|
|
1256
1262
|
path: "/v2/pods",
|
|
1257
1263
|
params: [],
|
|
@@ -1267,7 +1273,8 @@ var generatedTools = [
|
|
|
1267
1273
|
type: "object",
|
|
1268
1274
|
properties: {
|
|
1269
1275
|
body: {
|
|
1270
|
-
$ref: "#/$defs/CreatePodRequest"
|
|
1276
|
+
$ref: "#/$defs/CreatePodRequest",
|
|
1277
|
+
type: "object"
|
|
1271
1278
|
}
|
|
1272
1279
|
},
|
|
1273
1280
|
required: ["body"],
|
|
@@ -1316,7 +1323,7 @@ var generatedTools = [
|
|
|
1316
1323
|
description: "Environment variables as key-value pairs",
|
|
1317
1324
|
examples: [
|
|
1318
1325
|
{
|
|
1319
|
-
JUPYTER_PASSWORD: "
|
|
1326
|
+
JUPYTER_PASSWORD: "changeme"
|
|
1320
1327
|
}
|
|
1321
1328
|
]
|
|
1322
1329
|
},
|
|
@@ -1465,7 +1472,7 @@ var generatedTools = [
|
|
|
1465
1472
|
{
|
|
1466
1473
|
type: "object",
|
|
1467
1474
|
required: ["name"],
|
|
1468
|
-
description: "Request body for creating a pod. Exactly one of `gpu` or `cpu` must be set
|
|
1475
|
+
description: "Request body for creating a pod. Exactly one of `gpu` or `cpu` must be set. For CPU pods, memory is derived by the API from the selected flavor's RAM multiplier; clients provide only CPU flavor and vCPU count.",
|
|
1469
1476
|
properties: {
|
|
1470
1477
|
name: {
|
|
1471
1478
|
type: "string",
|
|
@@ -1495,7 +1502,7 @@ var generatedTools = [
|
|
|
1495
1502
|
globalNetworking: {
|
|
1496
1503
|
type: "boolean",
|
|
1497
1504
|
default: false,
|
|
1498
|
-
description: "Enable global networking, giving the pod a private IP reachable across data centers. Requires an NVIDIA GPU and a global-networking-enabled data center (
|
|
1505
|
+
description: "Enable global networking, giving the pod a private IP reachable across data centers. Requires an NVIDIA GPU and a global-networking-enabled data center. See `list-data-centers` (`globalNetwork`) for eligible data centers.",
|
|
1499
1506
|
examples: [false]
|
|
1500
1507
|
},
|
|
1501
1508
|
gpu: {
|
|
@@ -1634,7 +1641,8 @@ var generatedTools = [
|
|
|
1634
1641
|
type: "object",
|
|
1635
1642
|
properties: {
|
|
1636
1643
|
body: {
|
|
1637
|
-
$ref: "#/$defs/CreateRegistryRequest"
|
|
1644
|
+
$ref: "#/$defs/CreateRegistryRequest",
|
|
1645
|
+
type: "object"
|
|
1638
1646
|
}
|
|
1639
1647
|
},
|
|
1640
1648
|
required: ["body"],
|
|
@@ -1679,7 +1687,7 @@ var generatedTools = [
|
|
|
1679
1687
|
annotations: {
|
|
1680
1688
|
readOnlyHint: false,
|
|
1681
1689
|
destructiveHint: false,
|
|
1682
|
-
idempotentHint:
|
|
1690
|
+
idempotentHint: true,
|
|
1683
1691
|
openWorldHint: true
|
|
1684
1692
|
},
|
|
1685
1693
|
schemaOnDemand: true,
|
|
@@ -1687,7 +1695,8 @@ var generatedTools = [
|
|
|
1687
1695
|
type: "object",
|
|
1688
1696
|
properties: {
|
|
1689
1697
|
body: {
|
|
1690
|
-
$ref: "#/$defs/CreateSecretRequest"
|
|
1698
|
+
$ref: "#/$defs/CreateSecretRequest",
|
|
1699
|
+
type: "object"
|
|
1691
1700
|
}
|
|
1692
1701
|
},
|
|
1693
1702
|
required: ["body"],
|
|
@@ -1742,7 +1751,8 @@ var generatedTools = [
|
|
|
1742
1751
|
type: "object",
|
|
1743
1752
|
properties: {
|
|
1744
1753
|
body: {
|
|
1745
|
-
$ref: "#/$defs/CreateTemplateRequest"
|
|
1754
|
+
$ref: "#/$defs/CreateTemplateRequest",
|
|
1755
|
+
type: "object"
|
|
1746
1756
|
}
|
|
1747
1757
|
},
|
|
1748
1758
|
required: ["body"],
|
|
@@ -1791,7 +1801,7 @@ var generatedTools = [
|
|
|
1791
1801
|
description: "Environment variables as key-value pairs",
|
|
1792
1802
|
examples: [
|
|
1793
1803
|
{
|
|
1794
|
-
JUPYTER_PASSWORD: "
|
|
1804
|
+
JUPYTER_PASSWORD: "changeme"
|
|
1795
1805
|
}
|
|
1796
1806
|
]
|
|
1797
1807
|
},
|
|
@@ -1929,6 +1939,7 @@ var generatedTools = [
|
|
|
1929
1939
|
title: "Delete cluster",
|
|
1930
1940
|
operationId: "deleteCluster",
|
|
1931
1941
|
description: "Delete a cluster permanently: it terminates every member pod. Verify the id with get-cluster, and list-cluster-pods for what the delete takes down, before deleting; delete only clusters your own tool calls created in this conversation, or the one the user asked you to delete by id \u2014 a name found by listing is not attribution.",
|
|
1942
|
+
directoryDescription: "Delete an Instant Cluster permanently. Every member Pod is terminated and its container disk is lost.",
|
|
1932
1943
|
method: "DELETE",
|
|
1933
1944
|
path: "/v2/clusters/{id}",
|
|
1934
1945
|
params: [
|
|
@@ -1960,6 +1971,7 @@ var generatedTools = [
|
|
|
1960
1971
|
title: "Delete endpoint",
|
|
1961
1972
|
operationId: "deleteEndpoint",
|
|
1962
1973
|
description: "Delete a serverless endpoint permanently and immediately. Verify the id belongs to the intended endpoint (get-endpoint) before deleting; delete only endpoints your own tool calls created in this conversation, or the one the user asked you to delete by id \u2014 a name found by listing is not attribution.",
|
|
1974
|
+
directoryDescription: "Delete a Serverless endpoint permanently and immediately.",
|
|
1963
1975
|
method: "DELETE",
|
|
1964
1976
|
path: "/v2/serverless/{id}",
|
|
1965
1977
|
params: [
|
|
@@ -2053,6 +2065,7 @@ var generatedTools = [
|
|
|
2053
2065
|
title: "Delete Pod",
|
|
2054
2066
|
operationId: "deletePod",
|
|
2055
2067
|
description: "Terminate a pod permanently \u2014 its container disk is lost. Distinguish from stopping (pod-action stop) which releases the GPU but keeps volume data. Verify the id with get-pod first; terminate only pods your own tool calls created in this conversation, or the one the user asked you to terminate by id \u2014 a name found by listing is not attribution.",
|
|
2068
|
+
directoryDescription: "Terminate a Pod permanently. Its container disk is lost; data on an attached network volume is kept. Stopping a Pod instead releases its compute but keeps its disk.",
|
|
2056
2069
|
method: "DELETE",
|
|
2057
2070
|
path: "/v2/pods/{id}",
|
|
2058
2071
|
params: [
|
|
@@ -2114,6 +2127,7 @@ var generatedTools = [
|
|
|
2114
2127
|
title: "Delete secret",
|
|
2115
2128
|
operationId: "deleteSecret",
|
|
2116
2129
|
description: "Delete a secret permanently. Environment variables referencing its name ({{ RUNPOD_SECRET_<name> }}) stop resolving at the next pod or worker boot; running instances keep the value they started with. Verify the id with get-secret first; delete only secrets your own tool calls created in this conversation, or the one the user asked you to delete by id \u2014 a name found by listing is not attribution.",
|
|
2130
|
+
directoryDescription: "Delete a secret permanently. Environment variables that reference it ({{ RUNPOD_SECRET_<name> }}) stop resolving at the next Pod or worker boot; running instances keep the value they started with.",
|
|
2117
2131
|
method: "DELETE",
|
|
2118
2132
|
path: "/v2/account/secrets/{id}",
|
|
2119
2133
|
params: [
|
|
@@ -2145,6 +2159,7 @@ var generatedTools = [
|
|
|
2145
2159
|
title: "Delete template",
|
|
2146
2160
|
operationId: "deleteTemplate",
|
|
2147
2161
|
description: "Delete a template permanently. Verify with get-template first; a template referenced by a live endpoint should not be deleted.",
|
|
2162
|
+
directoryDescription: "Delete a template permanently. An endpoint that references the template can stop working once it is deleted.",
|
|
2148
2163
|
method: "DELETE",
|
|
2149
2164
|
path: "/v2/templates/{id}",
|
|
2150
2165
|
params: [
|
|
@@ -2247,7 +2262,7 @@ var generatedTools = [
|
|
|
2247
2262
|
items: {
|
|
2248
2263
|
$ref: "#/$defs/CatalogInclude"
|
|
2249
2264
|
},
|
|
2250
|
-
description: "Comma-separated optional expansions
|
|
2265
|
+
description: "Comma-separated optional expansions; see `CatalogInclude` for the supported values."
|
|
2251
2266
|
},
|
|
2252
2267
|
product: {
|
|
2253
2268
|
type: "array",
|
|
@@ -2267,7 +2282,7 @@ var generatedTools = [
|
|
|
2267
2282
|
$defs: {
|
|
2268
2283
|
CatalogInclude: {
|
|
2269
2284
|
type: "string",
|
|
2270
|
-
description: "Catalog include expansion.
|
|
2285
|
+
description: "Catalog include expansion. `AVAILABILITY` is the only supported value.",
|
|
2271
2286
|
enum: ["AVAILABILITY"]
|
|
2272
2287
|
},
|
|
2273
2288
|
CpuProduct: {
|
|
@@ -2493,7 +2508,7 @@ var generatedTools = [
|
|
|
2493
2508
|
items: {
|
|
2494
2509
|
$ref: "#/$defs/CatalogInclude"
|
|
2495
2510
|
},
|
|
2496
|
-
description: "Comma-separated optional expansions
|
|
2511
|
+
description: "Comma-separated optional expansions; see `CatalogInclude` for the supported values."
|
|
2497
2512
|
},
|
|
2498
2513
|
product: {
|
|
2499
2514
|
type: "array",
|
|
@@ -2510,7 +2525,8 @@ var generatedTools = [
|
|
|
2510
2525
|
},
|
|
2511
2526
|
cloud: {
|
|
2512
2527
|
$ref: "#/$defs/GpuCloudFilter",
|
|
2513
|
-
description: "Cloud type for availability and lowest-price calculations. Valid only with include=AVAILABILITY. Supported values: SECURE, COMMUNITY. Upstream default when omitted: SECURE."
|
|
2528
|
+
description: "Cloud type for availability and lowest-price calculations. Valid only with include=AVAILABILITY. Supported values: SECURE, COMMUNITY. Upstream default when omitted: SECURE.",
|
|
2529
|
+
type: "string"
|
|
2514
2530
|
},
|
|
2515
2531
|
countryCodes: {
|
|
2516
2532
|
type: "array",
|
|
@@ -2538,7 +2554,7 @@ var generatedTools = [
|
|
|
2538
2554
|
$defs: {
|
|
2539
2555
|
CatalogInclude: {
|
|
2540
2556
|
type: "string",
|
|
2541
|
-
description: "Catalog include expansion.
|
|
2557
|
+
description: "Catalog include expansion. `AVAILABILITY` is the only supported value.",
|
|
2542
2558
|
enum: ["AVAILABILITY"]
|
|
2543
2559
|
},
|
|
2544
2560
|
GpuCloudFilter: {
|
|
@@ -2747,6 +2763,99 @@ var generatedTools = [
|
|
|
2747
2763
|
required: ["id"]
|
|
2748
2764
|
}
|
|
2749
2765
|
},
|
|
2766
|
+
{
|
|
2767
|
+
name: "list-audit-logs",
|
|
2768
|
+
title: "List audit logs",
|
|
2769
|
+
operationId: "listAuditLogs",
|
|
2770
|
+
description: "List audit logs. Returns the account's audit trail, newest first, cursor-paginated; an omitted `limit` defaults to 200. Each entry records who acted (`actorId`, `email`), what they did (`action`), to which resource (`resourceType`, `resourceId`), and the details of the change (`value`). When the caller belongs to an organization the trail is the organization's, and `actorIds` narrows it to specific members; otherwise it is the trail of the account the request acts for. Filters combine with AND. Entries older than the account's audit log retention window are not returned, and an account whose plan does not include audit logs is answered 403. Follow `pagination.nextCursor` until `hasNextPage` is false.",
|
|
2771
|
+
directoryDescription: "List the account's audit trail, newest first. Results are cursor-paginated and record the actor, action, resource, timestamp, and change details. Filters include actor IDs, actions, time range, and text search. The account's retention window and plan determine which entries are available.",
|
|
2772
|
+
method: "GET",
|
|
2773
|
+
path: "/v2/audit-logs",
|
|
2774
|
+
params: [
|
|
2775
|
+
{
|
|
2776
|
+
name: "actorIds",
|
|
2777
|
+
location: "query",
|
|
2778
|
+
explode: false
|
|
2779
|
+
},
|
|
2780
|
+
{
|
|
2781
|
+
name: "actions",
|
|
2782
|
+
location: "query",
|
|
2783
|
+
explode: false
|
|
2784
|
+
},
|
|
2785
|
+
{
|
|
2786
|
+
name: "startTime",
|
|
2787
|
+
location: "query"
|
|
2788
|
+
},
|
|
2789
|
+
{
|
|
2790
|
+
name: "endTime",
|
|
2791
|
+
location: "query"
|
|
2792
|
+
},
|
|
2793
|
+
{
|
|
2794
|
+
name: "search",
|
|
2795
|
+
location: "query"
|
|
2796
|
+
},
|
|
2797
|
+
{
|
|
2798
|
+
name: "cursor",
|
|
2799
|
+
location: "query"
|
|
2800
|
+
},
|
|
2801
|
+
{
|
|
2802
|
+
name: "limit",
|
|
2803
|
+
location: "query"
|
|
2804
|
+
}
|
|
2805
|
+
],
|
|
2806
|
+
hasBody: false,
|
|
2807
|
+
annotations: {
|
|
2808
|
+
readOnlyHint: true,
|
|
2809
|
+
destructiveHint: false,
|
|
2810
|
+
idempotentHint: true,
|
|
2811
|
+
openWorldHint: true
|
|
2812
|
+
},
|
|
2813
|
+
inputSchema: {
|
|
2814
|
+
type: "object",
|
|
2815
|
+
properties: {
|
|
2816
|
+
actorIds: {
|
|
2817
|
+
type: "array",
|
|
2818
|
+
items: {
|
|
2819
|
+
type: "string"
|
|
2820
|
+
},
|
|
2821
|
+
description: "Only return entries performed by these users. Comma-separated user IDs. Available to organization accounts only; a personal or team account is answered 400."
|
|
2822
|
+
},
|
|
2823
|
+
actions: {
|
|
2824
|
+
type: "array",
|
|
2825
|
+
items: {
|
|
2826
|
+
type: "string"
|
|
2827
|
+
},
|
|
2828
|
+
description: "Only return entries whose `action` is one of these names, matched exactly as recorded. Comma-separated."
|
|
2829
|
+
},
|
|
2830
|
+
startTime: {
|
|
2831
|
+
type: "string",
|
|
2832
|
+
format: "date-time",
|
|
2833
|
+
description: "Earliest instant to include, inclusive (RFC 3339). The account's audit log retention window still applies: entries that have aged out are not returned even when this reaches further back."
|
|
2834
|
+
},
|
|
2835
|
+
endTime: {
|
|
2836
|
+
type: "string",
|
|
2837
|
+
format: "date-time",
|
|
2838
|
+
description: "Latest instant to include, inclusive (RFC 3339). Must be after `startTime` when both are given; 400 otherwise."
|
|
2839
|
+
},
|
|
2840
|
+
search: {
|
|
2841
|
+
type: "string",
|
|
2842
|
+
minLength: 1,
|
|
2843
|
+
description: "Case-insensitive substring match against `email`, `resourceType`, `resourceId`, `action` and `value`; `actorId` is not searched. Surrounding whitespace is ignored."
|
|
2844
|
+
},
|
|
2845
|
+
cursor: {
|
|
2846
|
+
type: "string",
|
|
2847
|
+
minLength: 1,
|
|
2848
|
+
description: "Opaque resume cursor \u2014 pass the previous response's `pagination.nextCursor` through verbatim; omit for the first page. A cursor is only valid for the operation and parameters that issued it; a malformed or foreign cursor is rejected."
|
|
2849
|
+
},
|
|
2850
|
+
limit: {
|
|
2851
|
+
type: "integer",
|
|
2852
|
+
minimum: 1,
|
|
2853
|
+
maximum: 200,
|
|
2854
|
+
description: "Page size, 1\u2013200. Defaults to 200 when omitted."
|
|
2855
|
+
}
|
|
2856
|
+
}
|
|
2857
|
+
}
|
|
2858
|
+
},
|
|
2750
2859
|
{
|
|
2751
2860
|
name: "list-billing",
|
|
2752
2861
|
title: "List billing",
|
|
@@ -2794,7 +2903,8 @@ var generatedTools = [
|
|
|
2794
2903
|
},
|
|
2795
2904
|
bucketSize: {
|
|
2796
2905
|
$ref: "#/$defs/BillingBucketSize",
|
|
2797
|
-
description: "Length of each billing time bucket. Defaults to day."
|
|
2906
|
+
description: "Length of each billing time bucket. Defaults to day.",
|
|
2907
|
+
type: "string"
|
|
2798
2908
|
},
|
|
2799
2909
|
lastN: {
|
|
2800
2910
|
type: "integer",
|
|
@@ -2806,13 +2916,6 @@ var generatedTools = [
|
|
|
2806
2916
|
BillingBucketSize: {
|
|
2807
2917
|
type: "string",
|
|
2808
2918
|
enum: ["hour", "day", "week", "month", "year"],
|
|
2809
|
-
"x-enum-varnames": [
|
|
2810
|
-
"BillingBucketSizeHour",
|
|
2811
|
-
"BillingBucketSizeDay",
|
|
2812
|
-
"BillingBucketSizeWeek",
|
|
2813
|
-
"BillingBucketSizeMonth",
|
|
2814
|
-
"BillingBucketSizeYear"
|
|
2815
|
-
],
|
|
2816
2919
|
default: "day",
|
|
2817
2920
|
description: "Length of each billing time bucket.",
|
|
2818
2921
|
examples: ["day"]
|
|
@@ -2871,7 +2974,8 @@ var generatedTools = [
|
|
|
2871
2974
|
},
|
|
2872
2975
|
bucketSize: {
|
|
2873
2976
|
$ref: "#/$defs/BillingBucketSize",
|
|
2874
|
-
description: "Length of each billing time bucket. Defaults to day."
|
|
2977
|
+
description: "Length of each billing time bucket. Defaults to day.",
|
|
2978
|
+
type: "string"
|
|
2875
2979
|
},
|
|
2876
2980
|
lastN: {
|
|
2877
2981
|
type: "integer",
|
|
@@ -2887,13 +2991,6 @@ var generatedTools = [
|
|
|
2887
2991
|
BillingBucketSize: {
|
|
2888
2992
|
type: "string",
|
|
2889
2993
|
enum: ["hour", "day", "week", "month", "year"],
|
|
2890
|
-
"x-enum-varnames": [
|
|
2891
|
-
"BillingBucketSizeHour",
|
|
2892
|
-
"BillingBucketSizeDay",
|
|
2893
|
-
"BillingBucketSizeWeek",
|
|
2894
|
-
"BillingBucketSizeMonth",
|
|
2895
|
-
"BillingBucketSizeYear"
|
|
2896
|
-
],
|
|
2897
2994
|
default: "day",
|
|
2898
2995
|
description: "Length of each billing time bucket.",
|
|
2899
2996
|
examples: ["day"]
|
|
@@ -3012,7 +3109,7 @@ var generatedTools = [
|
|
|
3012
3109
|
items: {
|
|
3013
3110
|
$ref: "#/$defs/CatalogInclude"
|
|
3014
3111
|
},
|
|
3015
|
-
description: "Comma-separated optional expansions
|
|
3112
|
+
description: "Comma-separated optional expansions; see `CatalogInclude` for the supported values."
|
|
3016
3113
|
},
|
|
3017
3114
|
product: {
|
|
3018
3115
|
type: "array",
|
|
@@ -3031,7 +3128,7 @@ var generatedTools = [
|
|
|
3031
3128
|
$defs: {
|
|
3032
3129
|
CatalogInclude: {
|
|
3033
3130
|
type: "string",
|
|
3034
|
-
description: "Catalog include expansion.
|
|
3131
|
+
description: "Catalog include expansion. `AVAILABILITY` is the only supported value.",
|
|
3035
3132
|
enum: ["AVAILABILITY"]
|
|
3036
3133
|
},
|
|
3037
3134
|
CpuProduct: {
|
|
@@ -3237,7 +3334,8 @@ var generatedTools = [
|
|
|
3237
3334
|
},
|
|
3238
3335
|
bucketSize: {
|
|
3239
3336
|
$ref: "#/$defs/BillingBucketSize",
|
|
3240
|
-
description: "Length of each billing time bucket. Defaults to day."
|
|
3337
|
+
description: "Length of each billing time bucket. Defaults to day.",
|
|
3338
|
+
type: "string"
|
|
3241
3339
|
},
|
|
3242
3340
|
lastN: {
|
|
3243
3341
|
type: "integer",
|
|
@@ -3249,13 +3347,6 @@ var generatedTools = [
|
|
|
3249
3347
|
BillingBucketSize: {
|
|
3250
3348
|
type: "string",
|
|
3251
3349
|
enum: ["hour", "day", "week", "month", "year"],
|
|
3252
|
-
"x-enum-varnames": [
|
|
3253
|
-
"BillingBucketSizeHour",
|
|
3254
|
-
"BillingBucketSizeDay",
|
|
3255
|
-
"BillingBucketSizeWeek",
|
|
3256
|
-
"BillingBucketSizeMonth",
|
|
3257
|
-
"BillingBucketSizeYear"
|
|
3258
|
-
],
|
|
3259
3350
|
default: "day",
|
|
3260
3351
|
description: "Length of each billing time bucket.",
|
|
3261
3352
|
examples: ["day"]
|
|
@@ -3492,7 +3583,7 @@ var generatedTools = [
|
|
|
3492
3583
|
items: {
|
|
3493
3584
|
$ref: "#/$defs/CatalogInclude"
|
|
3494
3585
|
},
|
|
3495
|
-
description: "Comma-separated optional expansions
|
|
3586
|
+
description: "Comma-separated optional expansions; see `CatalogInclude` for the supported values."
|
|
3496
3587
|
},
|
|
3497
3588
|
product: {
|
|
3498
3589
|
type: "array",
|
|
@@ -3509,7 +3600,8 @@ var generatedTools = [
|
|
|
3509
3600
|
},
|
|
3510
3601
|
cloud: {
|
|
3511
3602
|
$ref: "#/$defs/GpuCloudFilter",
|
|
3512
|
-
description: "Cloud type for availability and lowest-price calculations. Valid only with include=AVAILABILITY. Supported values: SECURE, COMMUNITY. Upstream default when omitted: SECURE."
|
|
3603
|
+
description: "Cloud type for availability and lowest-price calculations. Valid only with include=AVAILABILITY. Supported values: SECURE, COMMUNITY. Upstream default when omitted: SECURE.",
|
|
3604
|
+
type: "string"
|
|
3513
3605
|
},
|
|
3514
3606
|
countryCodes: {
|
|
3515
3607
|
type: "array",
|
|
@@ -3536,7 +3628,7 @@ var generatedTools = [
|
|
|
3536
3628
|
$defs: {
|
|
3537
3629
|
CatalogInclude: {
|
|
3538
3630
|
type: "string",
|
|
3539
|
-
description: "Catalog include expansion.
|
|
3631
|
+
description: "Catalog include expansion. `AVAILABILITY` is the only supported value.",
|
|
3540
3632
|
enum: ["AVAILABILITY"]
|
|
3541
3633
|
},
|
|
3542
3634
|
GpuCloudFilter: {
|
|
@@ -3603,7 +3695,8 @@ var generatedTools = [
|
|
|
3603
3695
|
},
|
|
3604
3696
|
bucketSize: {
|
|
3605
3697
|
$ref: "#/$defs/BillingBucketSize",
|
|
3606
|
-
description: "Length of each billing time bucket. Defaults to day."
|
|
3698
|
+
description: "Length of each billing time bucket. Defaults to day.",
|
|
3699
|
+
type: "string"
|
|
3607
3700
|
},
|
|
3608
3701
|
lastN: {
|
|
3609
3702
|
type: "integer",
|
|
@@ -3619,13 +3712,6 @@ var generatedTools = [
|
|
|
3619
3712
|
BillingBucketSize: {
|
|
3620
3713
|
type: "string",
|
|
3621
3714
|
enum: ["hour", "day", "week", "month", "year"],
|
|
3622
|
-
"x-enum-varnames": [
|
|
3623
|
-
"BillingBucketSizeHour",
|
|
3624
|
-
"BillingBucketSizeDay",
|
|
3625
|
-
"BillingBucketSizeWeek",
|
|
3626
|
-
"BillingBucketSizeMonth",
|
|
3627
|
-
"BillingBucketSizeYear"
|
|
3628
|
-
],
|
|
3629
3715
|
default: "day",
|
|
3630
3716
|
description: "Length of each billing time bucket.",
|
|
3631
3717
|
examples: ["day"]
|
|
@@ -3725,7 +3811,8 @@ var generatedTools = [
|
|
|
3725
3811
|
},
|
|
3726
3812
|
bucketSize: {
|
|
3727
3813
|
$ref: "#/$defs/BillingBucketSize",
|
|
3728
|
-
description: "Length of each billing time bucket. Defaults to day."
|
|
3814
|
+
description: "Length of each billing time bucket. Defaults to day.",
|
|
3815
|
+
type: "string"
|
|
3729
3816
|
},
|
|
3730
3817
|
lastN: {
|
|
3731
3818
|
type: "integer",
|
|
@@ -3741,13 +3828,6 @@ var generatedTools = [
|
|
|
3741
3828
|
BillingBucketSize: {
|
|
3742
3829
|
type: "string",
|
|
3743
3830
|
enum: ["hour", "day", "week", "month", "year"],
|
|
3744
|
-
"x-enum-varnames": [
|
|
3745
|
-
"BillingBucketSizeHour",
|
|
3746
|
-
"BillingBucketSizeDay",
|
|
3747
|
-
"BillingBucketSizeWeek",
|
|
3748
|
-
"BillingBucketSizeMonth",
|
|
3749
|
-
"BillingBucketSizeYear"
|
|
3750
|
-
],
|
|
3751
3831
|
default: "day",
|
|
3752
3832
|
description: "Length of each billing time bucket.",
|
|
3753
3833
|
examples: ["day"]
|
|
@@ -3892,6 +3972,7 @@ var generatedTools = [
|
|
|
3892
3972
|
title: "List Serverless billing",
|
|
3893
3973
|
operationId: "listServerlessBilling",
|
|
3894
3974
|
description: "Get serverless billing history, split into time buckets. SIZE WARNING: with defaults this emits one record per endpoint PER BUCKET \u2014 on an account with many endpoints the response overflows the tool-result limit and becomes unusable. Always pass lastN: 1 (or a bucketSize spanning the whole window) for one record per endpoint, and serverlessId when you need one endpoint. Distinct from pod billing, which covers standalone pods.",
|
|
3975
|
+
directoryDescription: "Get Serverless billing history, split into time buckets. By default the response has one record per endpoint per bucket, which can be very large on accounts with many endpoints; lastN: 1 (or one bucket spanning the whole window) returns one record per endpoint, and serverlessId narrows it to a single endpoint. Pod billing is reported separately.",
|
|
3895
3976
|
method: "GET",
|
|
3896
3977
|
path: "/v2/billing/serverless",
|
|
3897
3978
|
params: [
|
|
@@ -3938,7 +4019,8 @@ var generatedTools = [
|
|
|
3938
4019
|
},
|
|
3939
4020
|
bucketSize: {
|
|
3940
4021
|
$ref: "#/$defs/BillingBucketSize",
|
|
3941
|
-
description: "Length of each billing time bucket. Defaults to day."
|
|
4022
|
+
description: "Length of each billing time bucket. Defaults to day.",
|
|
4023
|
+
type: "string"
|
|
3942
4024
|
},
|
|
3943
4025
|
lastN: {
|
|
3944
4026
|
type: "integer",
|
|
@@ -3954,13 +4036,6 @@ var generatedTools = [
|
|
|
3954
4036
|
BillingBucketSize: {
|
|
3955
4037
|
type: "string",
|
|
3956
4038
|
enum: ["hour", "day", "week", "month", "year"],
|
|
3957
|
-
"x-enum-varnames": [
|
|
3958
|
-
"BillingBucketSizeHour",
|
|
3959
|
-
"BillingBucketSizeDay",
|
|
3960
|
-
"BillingBucketSizeWeek",
|
|
3961
|
-
"BillingBucketSizeMonth",
|
|
3962
|
-
"BillingBucketSizeYear"
|
|
3963
|
-
],
|
|
3964
4039
|
default: "day",
|
|
3965
4040
|
description: "Length of each billing time bucket.",
|
|
3966
4041
|
examples: ["day"]
|
|
@@ -3995,7 +4070,8 @@ var generatedTools = [
|
|
|
3995
4070
|
type: "string"
|
|
3996
4071
|
},
|
|
3997
4072
|
body: {
|
|
3998
|
-
$ref: "#/$defs/PodActionRequest"
|
|
4073
|
+
$ref: "#/$defs/PodActionRequest",
|
|
4074
|
+
type: "object"
|
|
3999
4075
|
}
|
|
4000
4076
|
},
|
|
4001
4077
|
required: ["id", "body"],
|
|
@@ -4065,7 +4141,7 @@ var generatedTools = [
|
|
|
4065
4141
|
annotations: {
|
|
4066
4142
|
readOnlyHint: false,
|
|
4067
4143
|
destructiveHint: false,
|
|
4068
|
-
idempotentHint:
|
|
4144
|
+
idempotentHint: true,
|
|
4069
4145
|
openWorldHint: true
|
|
4070
4146
|
},
|
|
4071
4147
|
inputSchema: {
|
|
@@ -4076,7 +4152,8 @@ var generatedTools = [
|
|
|
4076
4152
|
description: "Cluster identifier"
|
|
4077
4153
|
},
|
|
4078
4154
|
body: {
|
|
4079
|
-
$ref: "#/$defs/UpdateClusterRequest"
|
|
4155
|
+
$ref: "#/$defs/UpdateClusterRequest",
|
|
4156
|
+
type: "object"
|
|
4080
4157
|
}
|
|
4081
4158
|
},
|
|
4082
4159
|
required: ["id", "body"],
|
|
@@ -4102,6 +4179,7 @@ var generatedTools = [
|
|
|
4102
4179
|
title: "Update endpoint",
|
|
4103
4180
|
operationId: "updateEndpoint",
|
|
4104
4181
|
description: "Partially update a serverless endpoint (PATCH): only fields present in the body change, omitted ones are untouched, with one exception. DESTRUCTIVE GOTCHA: gpu.pools and gpu.excludedTypes are a single selection, so sending pools without excludedTypes clears any exclusions pinned elsewhere (the console or set-endpoint-gpus) \u2014 read the endpoint first with get-endpoint and resend excludedTypes if you still want them. An exclusion naming a type outside pools returns 400. A CUDA-only or count-only change does not need pools at all, so omit it unless you mean to replace the selection. Mutable fields: name, gpu, cpu, workers (min/max/idleTimeout), scaling (type plus queueDelay or requestCount), dataCenterIds, networkVolumes, timeout, flashboot, and the container settings (image, args, disk, ports, env, registry). cpu completely replaces a CPU endpoint's flavor selection. Compute family is immutable: gpu on a CPU endpoint, cpu on a GPU one, or both, returns 400. Effect timing differs by field \u2014 workers/scaling/timeout reach the autoscaler promptly, while container changes (image, env) cut a new release that rolls out as workers cycle, so in-flight workers keep the previous version. Track rollout with list-endpoint-releases.",
|
|
4182
|
+
directoryDescription: "Partially update a Serverless endpoint (PATCH): only fields present in the body change. gpu.pools and gpu.excludedTypes are one selection, so sending pools without excludedTypes clears existing exclusions; an exclusion naming a type outside pools returns 400, and a CUDA-only or count-only change does not need pools. Mutable fields: name, gpu, cpu, workers (min/max/idleTimeout), scaling (type plus queueDelay or requestCount), dataCenterIds, networkVolumes, timeout, flashboot, and the container settings (image, args, disk, ports, env, registry). cpu replaces a CPU endpoint's whole flavor selection. The compute family is fixed: gpu on a CPU endpoint, cpu on a GPU one, or both returns 400. Worker, scaling and timeout changes apply promptly; container changes (image, env) create a new release that rolls out as workers cycle, so in-flight workers keep the previous version.",
|
|
4105
4183
|
method: "PATCH",
|
|
4106
4184
|
path: "/v2/serverless/{id}",
|
|
4107
4185
|
params: [
|
|
@@ -4113,7 +4191,7 @@ var generatedTools = [
|
|
|
4113
4191
|
hasBody: true,
|
|
4114
4192
|
annotations: {
|
|
4115
4193
|
readOnlyHint: false,
|
|
4116
|
-
destructiveHint:
|
|
4194
|
+
destructiveHint: true,
|
|
4117
4195
|
idempotentHint: false,
|
|
4118
4196
|
openWorldHint: true
|
|
4119
4197
|
},
|
|
@@ -4126,7 +4204,8 @@ var generatedTools = [
|
|
|
4126
4204
|
description: "Serverless endpoint identifier"
|
|
4127
4205
|
},
|
|
4128
4206
|
body: {
|
|
4129
|
-
$ref: "#/$defs/UpdateEndpointRequest"
|
|
4207
|
+
$ref: "#/$defs/UpdateEndpointRequest",
|
|
4208
|
+
type: "object"
|
|
4130
4209
|
}
|
|
4131
4210
|
},
|
|
4132
4211
|
required: ["id", "body"],
|
|
@@ -4175,7 +4254,7 @@ var generatedTools = [
|
|
|
4175
4254
|
description: "Environment variables as key-value pairs",
|
|
4176
4255
|
examples: [
|
|
4177
4256
|
{
|
|
4178
|
-
JUPYTER_PASSWORD: "
|
|
4257
|
+
JUPYTER_PASSWORD: "changeme"
|
|
4179
4258
|
}
|
|
4180
4259
|
]
|
|
4181
4260
|
},
|
|
@@ -4272,7 +4351,7 @@ var generatedTools = [
|
|
|
4272
4351
|
type: "object",
|
|
4273
4352
|
required: ["volumeId"],
|
|
4274
4353
|
additionalProperties: false,
|
|
4275
|
-
description: "A volume mounted on every worker, always at `/runpod-volume`.
|
|
4354
|
+
description: "A volume mounted on every worker, always at `/runpod-volume`.",
|
|
4276
4355
|
properties: {
|
|
4277
4356
|
volumeId: {
|
|
4278
4357
|
type: "string",
|
|
@@ -4505,7 +4584,7 @@ var generatedTools = [
|
|
|
4505
4584
|
annotations: {
|
|
4506
4585
|
readOnlyHint: false,
|
|
4507
4586
|
destructiveHint: false,
|
|
4508
|
-
idempotentHint:
|
|
4587
|
+
idempotentHint: true,
|
|
4509
4588
|
openWorldHint: true
|
|
4510
4589
|
},
|
|
4511
4590
|
inputSchema: {
|
|
@@ -4516,7 +4595,8 @@ var generatedTools = [
|
|
|
4516
4595
|
description: "Global volume identifier"
|
|
4517
4596
|
},
|
|
4518
4597
|
body: {
|
|
4519
|
-
$ref: "#/$defs/UpdateGlobalVolumeRequest"
|
|
4598
|
+
$ref: "#/$defs/UpdateGlobalVolumeRequest",
|
|
4599
|
+
type: "object"
|
|
4520
4600
|
}
|
|
4521
4601
|
},
|
|
4522
4602
|
required: ["id", "body"],
|
|
@@ -4531,7 +4611,6 @@ var generatedTools = [
|
|
|
4531
4611
|
type: "string",
|
|
4532
4612
|
minLength: 1,
|
|
4533
4613
|
maxLength: 191,
|
|
4534
|
-
pattern: "[^\\p{Z}\\t-\\r\x85]",
|
|
4535
4614
|
description: "New human-readable name, 1\u2013191 characters with at least one non-whitespace character. Leading and trailing whitespace is trimmed.",
|
|
4536
4615
|
examples: ["renamed-volume"]
|
|
4537
4616
|
}
|
|
@@ -4557,7 +4636,7 @@ var generatedTools = [
|
|
|
4557
4636
|
annotations: {
|
|
4558
4637
|
readOnlyHint: false,
|
|
4559
4638
|
destructiveHint: false,
|
|
4560
|
-
idempotentHint:
|
|
4639
|
+
idempotentHint: true,
|
|
4561
4640
|
openWorldHint: true
|
|
4562
4641
|
},
|
|
4563
4642
|
inputSchema: {
|
|
@@ -4568,7 +4647,8 @@ var generatedTools = [
|
|
|
4568
4647
|
description: "Network volume identifier"
|
|
4569
4648
|
},
|
|
4570
4649
|
body: {
|
|
4571
|
-
$ref: "#/$defs/UpdateNetworkVolumeRequest"
|
|
4650
|
+
$ref: "#/$defs/UpdateNetworkVolumeRequest",
|
|
4651
|
+
type: "object"
|
|
4572
4652
|
}
|
|
4573
4653
|
},
|
|
4574
4654
|
required: ["id", "body"],
|
|
@@ -4613,7 +4693,7 @@ var generatedTools = [
|
|
|
4613
4693
|
hasBody: true,
|
|
4614
4694
|
annotations: {
|
|
4615
4695
|
readOnlyHint: false,
|
|
4616
|
-
destructiveHint:
|
|
4696
|
+
destructiveHint: true,
|
|
4617
4697
|
idempotentHint: false,
|
|
4618
4698
|
openWorldHint: true
|
|
4619
4699
|
},
|
|
@@ -4626,7 +4706,8 @@ var generatedTools = [
|
|
|
4626
4706
|
description: "Pod identifier"
|
|
4627
4707
|
},
|
|
4628
4708
|
body: {
|
|
4629
|
-
$ref: "#/$defs/UpdatePodRequest"
|
|
4709
|
+
$ref: "#/$defs/UpdatePodRequest",
|
|
4710
|
+
type: "object"
|
|
4630
4711
|
}
|
|
4631
4712
|
},
|
|
4632
4713
|
required: ["id", "body"],
|
|
@@ -4675,7 +4756,7 @@ var generatedTools = [
|
|
|
4675
4756
|
description: "Environment variables as key-value pairs",
|
|
4676
4757
|
examples: [
|
|
4677
4758
|
{
|
|
4678
|
-
JUPYTER_PASSWORD: "
|
|
4759
|
+
JUPYTER_PASSWORD: "changeme"
|
|
4679
4760
|
}
|
|
4680
4761
|
]
|
|
4681
4762
|
},
|
|
@@ -4813,7 +4894,7 @@ var generatedTools = [
|
|
|
4813
4894
|
properties: {
|
|
4814
4895
|
globalNetworking: {
|
|
4815
4896
|
type: "boolean",
|
|
4816
|
-
description: "Enable (true) or disable (false) global networking. Takes effect on the next pod start/restart, not live. Requires an NVIDIA GPU and a global-networking-enabled data center
|
|
4897
|
+
description: "Enable (true) or disable (false) global networking. Takes effect on the next pod start/restart, not live. Requires an NVIDIA GPU and a global-networking-enabled data center."
|
|
4817
4898
|
},
|
|
4818
4899
|
locked: {
|
|
4819
4900
|
type: "boolean",
|
|
@@ -4855,7 +4936,7 @@ var generatedTools = [
|
|
|
4855
4936
|
hasBody: true,
|
|
4856
4937
|
annotations: {
|
|
4857
4938
|
readOnlyHint: false,
|
|
4858
|
-
destructiveHint:
|
|
4939
|
+
destructiveHint: true,
|
|
4859
4940
|
idempotentHint: false,
|
|
4860
4941
|
openWorldHint: true
|
|
4861
4942
|
},
|
|
@@ -4868,7 +4949,8 @@ var generatedTools = [
|
|
|
4868
4949
|
description: "Secret identifier"
|
|
4869
4950
|
},
|
|
4870
4951
|
body: {
|
|
4871
|
-
$ref: "#/$defs/UpdateSecretRequest"
|
|
4952
|
+
$ref: "#/$defs/UpdateSecretRequest",
|
|
4953
|
+
type: "object"
|
|
4872
4954
|
}
|
|
4873
4955
|
},
|
|
4874
4956
|
required: ["id", "body"],
|
|
@@ -4914,7 +4996,8 @@ var generatedTools = [
|
|
|
4914
4996
|
type: "object",
|
|
4915
4997
|
properties: {
|
|
4916
4998
|
body: {
|
|
4917
|
-
$ref: "#/$defs/UpdateSshKeysRequest"
|
|
4999
|
+
$ref: "#/$defs/UpdateSshKeysRequest",
|
|
5000
|
+
type: "object"
|
|
4918
5001
|
}
|
|
4919
5002
|
},
|
|
4920
5003
|
required: ["body"],
|
|
@@ -4958,8 +5041,8 @@ var generatedTools = [
|
|
|
4958
5041
|
hasBody: true,
|
|
4959
5042
|
annotations: {
|
|
4960
5043
|
readOnlyHint: false,
|
|
4961
|
-
destructiveHint:
|
|
4962
|
-
idempotentHint:
|
|
5044
|
+
destructiveHint: true,
|
|
5045
|
+
idempotentHint: true,
|
|
4963
5046
|
openWorldHint: true
|
|
4964
5047
|
},
|
|
4965
5048
|
schemaOnDemand: true,
|
|
@@ -4970,7 +5053,8 @@ var generatedTools = [
|
|
|
4970
5053
|
type: "string"
|
|
4971
5054
|
},
|
|
4972
5055
|
body: {
|
|
4973
|
-
$ref: "#/$defs/UpdateTemplateRequest"
|
|
5056
|
+
$ref: "#/$defs/UpdateTemplateRequest",
|
|
5057
|
+
type: "object"
|
|
4974
5058
|
}
|
|
4975
5059
|
},
|
|
4976
5060
|
required: ["id", "body"],
|
|
@@ -5019,7 +5103,7 @@ var generatedTools = [
|
|
|
5019
5103
|
description: "Environment variables as key-value pairs",
|
|
5020
5104
|
examples: [
|
|
5021
5105
|
{
|
|
5022
|
-
JUPYTER_PASSWORD: "
|
|
5106
|
+
JUPYTER_PASSWORD: "changeme"
|
|
5023
5107
|
}
|
|
5024
5108
|
]
|
|
5025
5109
|
},
|
|
@@ -5139,80 +5223,43 @@ var generatedTools = [
|
|
|
5139
5223
|
}
|
|
5140
5224
|
];
|
|
5141
5225
|
|
|
5142
|
-
// src/specgen/
|
|
5143
|
-
var
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5226
|
+
// src/specgen/tools/annotations.ts
|
|
5227
|
+
var readOnly = {
|
|
5228
|
+
readOnlyHint: true,
|
|
5229
|
+
destructiveHint: false,
|
|
5230
|
+
idempotentHint: true,
|
|
5231
|
+
openWorldHint: true
|
|
5232
|
+
};
|
|
5233
|
+
var bundledRead = {
|
|
5234
|
+
readOnlyHint: true,
|
|
5235
|
+
destructiveHint: false,
|
|
5236
|
+
idempotentHint: true,
|
|
5237
|
+
openWorldHint: false
|
|
5238
|
+
};
|
|
5239
|
+
var write = {
|
|
5240
|
+
readOnlyHint: false,
|
|
5241
|
+
destructiveHint: false,
|
|
5242
|
+
idempotentHint: false,
|
|
5243
|
+
openWorldHint: true
|
|
5244
|
+
};
|
|
5245
|
+
var idempotentWrite = {
|
|
5246
|
+
readOnlyHint: false,
|
|
5247
|
+
destructiveHint: false,
|
|
5248
|
+
idempotentHint: true,
|
|
5249
|
+
openWorldHint: true
|
|
5250
|
+
};
|
|
5251
|
+
var destructive = {
|
|
5252
|
+
readOnlyHint: false,
|
|
5253
|
+
destructiveHint: true,
|
|
5254
|
+
idempotentHint: true,
|
|
5255
|
+
openWorldHint: true
|
|
5256
|
+
};
|
|
5257
|
+
var destructiveWrite = {
|
|
5258
|
+
readOnlyHint: false,
|
|
5259
|
+
destructiveHint: true,
|
|
5260
|
+
idempotentHint: false,
|
|
5261
|
+
openWorldHint: true
|
|
5156
5262
|
};
|
|
5157
|
-
function clampListLimit(limit) {
|
|
5158
|
-
const requested = Number(limit);
|
|
5159
|
-
return Math.min(
|
|
5160
|
-
Number.isFinite(requested) && requested >= 1 ? Math.floor(requested) : DEFAULT_LIST_LIMIT,
|
|
5161
|
-
MAX_LIST_LIMIT
|
|
5162
|
-
);
|
|
5163
|
-
}
|
|
5164
|
-
function serverPageQuery(args) {
|
|
5165
|
-
const cursor = typeof args.cursor === "string" && args.cursor !== "" ? args.cursor : void 0;
|
|
5166
|
-
return { limit: clampListLimit(args.limit), ...cursor ? { cursor } : {} };
|
|
5167
|
-
}
|
|
5168
|
-
function serverPagination(pagination, returned) {
|
|
5169
|
-
const hasNextPage = pagination?.hasNextPage === true;
|
|
5170
|
-
return {
|
|
5171
|
-
returned,
|
|
5172
|
-
hasNextPage,
|
|
5173
|
-
nextCursor: pagination?.nextCursor ?? null,
|
|
5174
|
-
...hasNextPage ? { note: "More results exist. Pass cursor=nextCursor to fetch them." } : {}
|
|
5175
|
-
};
|
|
5176
|
-
}
|
|
5177
|
-
function decodeCursorOffset(cursor) {
|
|
5178
|
-
if (!cursor) return 0;
|
|
5179
|
-
try {
|
|
5180
|
-
const decoded = Buffer.from(cursor, "base64").toString("utf8");
|
|
5181
|
-
if (!/^\d+$/.test(decoded)) return 0;
|
|
5182
|
-
const offset = Number.parseInt(decoded, 10);
|
|
5183
|
-
return Number.isFinite(offset) && offset >= 0 ? offset : 0;
|
|
5184
|
-
} catch {
|
|
5185
|
-
return 0;
|
|
5186
|
-
}
|
|
5187
|
-
}
|
|
5188
|
-
function encodeCursorOffset(offset) {
|
|
5189
|
-
return Buffer.from(String(offset), "utf8").toString("base64");
|
|
5190
|
-
}
|
|
5191
|
-
function capList(items, options, extra) {
|
|
5192
|
-
const limit = clampListLimit(options.limit);
|
|
5193
|
-
const offset = decodeCursorOffset(options.cursor);
|
|
5194
|
-
const total = items.length;
|
|
5195
|
-
const page = items.slice(offset, offset + limit);
|
|
5196
|
-
const nextOffset = offset + page.length;
|
|
5197
|
-
const hasMore = nextOffset < total;
|
|
5198
|
-
const { items: _i, pagination: _p, ...safeExtra } = extra ?? {};
|
|
5199
|
-
void _i;
|
|
5200
|
-
void _p;
|
|
5201
|
-
return {
|
|
5202
|
-
...safeExtra,
|
|
5203
|
-
items: page,
|
|
5204
|
-
pagination: {
|
|
5205
|
-
total,
|
|
5206
|
-
returned: page.length,
|
|
5207
|
-
offset,
|
|
5208
|
-
truncated: hasMore,
|
|
5209
|
-
nextCursor: hasMore ? encodeCursorOffset(nextOffset) : null,
|
|
5210
|
-
...hasMore ? {
|
|
5211
|
-
note: `Showing ${page.length} of ${total}. Pass cursor=nextCursor to fetch more, or narrow the query with filters.`
|
|
5212
|
-
} : {}
|
|
5213
|
-
}
|
|
5214
|
-
};
|
|
5215
|
-
}
|
|
5216
5263
|
|
|
5217
5264
|
// src/specgen/clients/http-error.ts
|
|
5218
5265
|
var HttpError = class extends Error {
|
|
@@ -5307,37 +5354,274 @@ async function runTool(body) {
|
|
|
5307
5354
|
}
|
|
5308
5355
|
}
|
|
5309
5356
|
|
|
5310
|
-
// src/specgen/tools/
|
|
5311
|
-
var
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
}
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
destructiveHint: false,
|
|
5320
|
-
idempotentHint: true,
|
|
5321
|
-
openWorldHint: false
|
|
5322
|
-
};
|
|
5323
|
-
var write = {
|
|
5324
|
-
readOnlyHint: false,
|
|
5325
|
-
destructiveHint: false,
|
|
5326
|
-
idempotentHint: false,
|
|
5327
|
-
openWorldHint: true
|
|
5357
|
+
// src/specgen/tools/pod-transitions.ts
|
|
5358
|
+
var podAction = generatedTools.find((tool) => tool.name === "pod-action");
|
|
5359
|
+
if (!podAction)
|
|
5360
|
+
throw new Error("pod-action is missing from the generated tools");
|
|
5361
|
+
var POD_ID = {
|
|
5362
|
+
type: "object",
|
|
5363
|
+
properties: { id: { type: "string", description: "ID of the Pod" } },
|
|
5364
|
+
required: ["id"],
|
|
5365
|
+
additionalProperties: false
|
|
5328
5366
|
};
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5367
|
+
function transition(action, title, description, annotations) {
|
|
5368
|
+
return {
|
|
5369
|
+
name: `${action}-pod`,
|
|
5370
|
+
title,
|
|
5371
|
+
description,
|
|
5372
|
+
inputSchema: POD_ID,
|
|
5373
|
+
annotations,
|
|
5374
|
+
handler: (ctx, args) => runTool(
|
|
5375
|
+
() => dispatchGeneratedTool(ctx.sdk, podAction, {
|
|
5376
|
+
id: args.id,
|
|
5377
|
+
body: { action }
|
|
5378
|
+
})
|
|
5379
|
+
)
|
|
5380
|
+
};
|
|
5381
|
+
}
|
|
5382
|
+
var podTransitionTools = [
|
|
5383
|
+
transition(
|
|
5384
|
+
"start",
|
|
5385
|
+
"Start Pod",
|
|
5386
|
+
"Start a stopped Pod (status EXITED or ERROR). Billable: the Pod accrues its hourly price while it runs. Returns the updated Pod; a Pod in any other status returns 409.",
|
|
5387
|
+
write
|
|
5388
|
+
),
|
|
5389
|
+
transition(
|
|
5390
|
+
"stop",
|
|
5391
|
+
"Stop Pod",
|
|
5392
|
+
"Stop a running or provisioning Pod. It releases its GPU or CPU and stops compute billing; the container disk is wiped, while the volume disk and any attached network volume keep their data and volume storage keeps billing. Returns the updated Pod; a Pod in any other status returns 409.",
|
|
5393
|
+
destructiveWrite
|
|
5394
|
+
),
|
|
5395
|
+
transition(
|
|
5396
|
+
"restart",
|
|
5397
|
+
"Restart Pod",
|
|
5398
|
+
"Restart a running Pod's container in place. Whatever is running in the container is interrupted and the container disk is wiped; the volume disk and any attached network volume keep their data. Returns the updated Pod; a Pod that is not RUNNING returns 409.",
|
|
5399
|
+
destructiveWrite
|
|
5400
|
+
)
|
|
5401
|
+
];
|
|
5402
|
+
|
|
5403
|
+
// src/specgen/profile.ts
|
|
5404
|
+
var DIRECTORY_PATH = "/directory";
|
|
5405
|
+
var IN = { include: true };
|
|
5406
|
+
var CREDENTIAL_MANAGEMENT = "Manages stored credentials; OpenAI restricts plugins that handle access credentials, so the directory leaves the whole credential family out.";
|
|
5407
|
+
var CREDENTIAL_INPUT = "Takes a secret or password as input; directories forbid collecting credentials.";
|
|
5408
|
+
var ALP = "Collects conversation-derived data beyond the task; the directory profile never serves it.";
|
|
5409
|
+
var DIRECTORY_TOOLS = {
|
|
5410
|
+
"cancel-job": IN,
|
|
5411
|
+
"create-cluster": IN,
|
|
5412
|
+
"create-delegation": IN,
|
|
5413
|
+
"create-endpoint": IN,
|
|
5414
|
+
"create-global-volume": IN,
|
|
5415
|
+
"create-network-volume": IN,
|
|
5416
|
+
"create-pod": IN,
|
|
5417
|
+
"create-template": IN,
|
|
5418
|
+
"delete-cluster": IN,
|
|
5419
|
+
"delete-endpoint": IN,
|
|
5420
|
+
"delete-global-volume": IN,
|
|
5421
|
+
"delete-network-volume": IN,
|
|
5422
|
+
"delete-pod": IN,
|
|
5423
|
+
"delete-template": IN,
|
|
5424
|
+
"deploy-hub-repo": IN,
|
|
5425
|
+
"endpoint-health": IN,
|
|
5426
|
+
"get-capacity": IN,
|
|
5427
|
+
"get-cluster": IN,
|
|
5428
|
+
"get-cpu-type": IN,
|
|
5429
|
+
"get-data-center": IN,
|
|
5430
|
+
"get-endpoint": IN,
|
|
5431
|
+
"get-endpoint-build": IN,
|
|
5432
|
+
"get-global-volume": IN,
|
|
5433
|
+
"get-gpu-type": IN,
|
|
5434
|
+
"get-job-status": IN,
|
|
5435
|
+
"get-network-volume": IN,
|
|
5436
|
+
"get-organization": IN,
|
|
5437
|
+
"get-pod": IN,
|
|
5438
|
+
"get-ssh-keys": IN,
|
|
5439
|
+
"get-template": IN,
|
|
5440
|
+
"list-audit-logs": IN,
|
|
5441
|
+
"list-billing": IN,
|
|
5442
|
+
"list-cluster-billing": IN,
|
|
5443
|
+
"list-cluster-pods": IN,
|
|
5444
|
+
"list-clusters": IN,
|
|
5445
|
+
"list-cpu-types": IN,
|
|
5446
|
+
"list-data-centers": IN,
|
|
5447
|
+
"list-delegations": IN,
|
|
5448
|
+
"list-endpoint-billing": IN,
|
|
5449
|
+
"list-endpoint-builds": IN,
|
|
5450
|
+
"list-endpoint-releases": IN,
|
|
5451
|
+
"list-endpoint-workers": IN,
|
|
5452
|
+
"list-endpoints": IN,
|
|
5453
|
+
"list-global-volumes": IN,
|
|
5454
|
+
"list-gpu-types": IN,
|
|
5455
|
+
"list-hub-repos": IN,
|
|
5456
|
+
"list-network-volume-billing": IN,
|
|
5457
|
+
"list-network-volumes": IN,
|
|
5458
|
+
"list-pod-billing": IN,
|
|
5459
|
+
"list-pods": IN,
|
|
5460
|
+
"list-public-endpoints": IN,
|
|
5461
|
+
"list-public-templates": IN,
|
|
5462
|
+
"list-serverless-billing": IN,
|
|
5463
|
+
"list-templates": IN,
|
|
5464
|
+
"lookup-concept": IN,
|
|
5465
|
+
"purge-endpoint-queue": IN,
|
|
5466
|
+
"retry-job": IN,
|
|
5467
|
+
"revoke-delegation": IN,
|
|
5468
|
+
"search-concepts": IN,
|
|
5469
|
+
"search-docs": IN,
|
|
5470
|
+
"set-endpoint-gpus": IN,
|
|
5471
|
+
"stream-job": IN,
|
|
5472
|
+
"stream-pod-logs": IN,
|
|
5473
|
+
"stream-worker-logs": IN,
|
|
5474
|
+
"update-cluster": IN,
|
|
5475
|
+
"update-endpoint": IN,
|
|
5476
|
+
"update-global-volume": IN,
|
|
5477
|
+
"update-network-volume": IN,
|
|
5478
|
+
"update-pod": IN,
|
|
5479
|
+
"update-ssh-keys": IN,
|
|
5480
|
+
"update-template": IN,
|
|
5481
|
+
"run-endpoint": { include: true, omitInputs: ["s3Config"] },
|
|
5482
|
+
"runsync-endpoint": { include: true, omitInputs: ["s3Config"] },
|
|
5483
|
+
"pod-action": {
|
|
5484
|
+
include: false,
|
|
5485
|
+
reason: "Takes the transition as an argument; OpenAI asks for one tool per operation, so the directory serves start-pod, stop-pod and restart-pod (terminate is delete-pod)."
|
|
5486
|
+
},
|
|
5487
|
+
"start-pod": IN,
|
|
5488
|
+
"stop-pod": IN,
|
|
5489
|
+
"restart-pod": IN,
|
|
5490
|
+
"list-guides": {
|
|
5491
|
+
include: false,
|
|
5492
|
+
reason: "Serves playbooks that instruct the model how to behave."
|
|
5493
|
+
},
|
|
5494
|
+
"read-guide": {
|
|
5495
|
+
include: false,
|
|
5496
|
+
reason: "Serves playbooks that instruct the model how to behave."
|
|
5497
|
+
},
|
|
5498
|
+
"describe-tool": {
|
|
5499
|
+
include: false,
|
|
5500
|
+
reason: "Fetches schemas the directory already lists in full; directories reject schema fetching."
|
|
5501
|
+
},
|
|
5502
|
+
"create-secret": { include: false, reason: CREDENTIAL_INPUT },
|
|
5503
|
+
"get-secret": { include: false, reason: CREDENTIAL_MANAGEMENT },
|
|
5504
|
+
"list-secrets": { include: false, reason: CREDENTIAL_MANAGEMENT },
|
|
5505
|
+
"delete-secret": { include: false, reason: CREDENTIAL_MANAGEMENT },
|
|
5506
|
+
"get-registry": { include: false, reason: CREDENTIAL_MANAGEMENT },
|
|
5507
|
+
"list-registries": { include: false, reason: CREDENTIAL_MANAGEMENT },
|
|
5508
|
+
"delete-registry": { include: false, reason: CREDENTIAL_MANAGEMENT },
|
|
5509
|
+
"update-secret": { include: false, reason: CREDENTIAL_INPUT },
|
|
5510
|
+
"create-registry": { include: false, reason: CREDENTIAL_INPUT },
|
|
5511
|
+
report_feedback: { include: false, reason: ALP },
|
|
5512
|
+
report_how_user_found_runpod: { include: false, reason: ALP },
|
|
5513
|
+
save_to_journal: { include: false, reason: ALP },
|
|
5514
|
+
read_journal: { include: false, reason: ALP },
|
|
5515
|
+
ask_question: { include: false, reason: ALP }
|
|
5334
5516
|
};
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5517
|
+
function directoryIncludes(name) {
|
|
5518
|
+
return DIRECTORY_TOOLS[name]?.include === true;
|
|
5519
|
+
}
|
|
5520
|
+
function directoryOmittedInputs(name) {
|
|
5521
|
+
const decision = DIRECTORY_TOOLS[name];
|
|
5522
|
+
return decision?.include ? decision.omitInputs ?? [] : [];
|
|
5523
|
+
}
|
|
5524
|
+
function profileForPath(pathname) {
|
|
5525
|
+
return pathname.replace(/\/+$/, "") === DIRECTORY_PATH ? "directory" : "default";
|
|
5526
|
+
}
|
|
5527
|
+
|
|
5528
|
+
// src/specgen/redact.ts
|
|
5529
|
+
var REDACTED = "[redacted]";
|
|
5530
|
+
var SECRET_KEY = /pass(word|wd)?|secret|token|api_?key|private_?key|credential|auth/i;
|
|
5531
|
+
var SECRET_REFERENCE = /^\s*\{\{\s*RUNPOD_SECRET_[^}]+\}\}\s*$/;
|
|
5532
|
+
function redactEnv(env) {
|
|
5533
|
+
return Object.fromEntries(
|
|
5534
|
+
Object.entries(env).map(([key, value]) => [
|
|
5535
|
+
key,
|
|
5536
|
+
typeof value === "string" && value !== "" && SECRET_KEY.test(key) && !SECRET_REFERENCE.test(value) ? REDACTED : value
|
|
5537
|
+
])
|
|
5538
|
+
);
|
|
5539
|
+
}
|
|
5540
|
+
function redactSecretEnv(payload) {
|
|
5541
|
+
if (Array.isArray(payload)) return payload.map(redactSecretEnv);
|
|
5542
|
+
if (!payload || typeof payload !== "object") return payload;
|
|
5543
|
+
return Object.fromEntries(
|
|
5544
|
+
Object.entries(payload).map(([key, value]) => [
|
|
5545
|
+
key,
|
|
5546
|
+
key === "env" && value && typeof value === "object" && !Array.isArray(value) ? redactEnv(value) : redactSecretEnv(value)
|
|
5547
|
+
])
|
|
5548
|
+
);
|
|
5549
|
+
}
|
|
5550
|
+
|
|
5551
|
+
// src/specgen/pagination.ts
|
|
5552
|
+
var DEFAULT_LIST_LIMIT = 20;
|
|
5553
|
+
var MAX_LIST_LIMIT = 100;
|
|
5554
|
+
var listPaginationProperties = {
|
|
5555
|
+
limit: {
|
|
5556
|
+
type: "integer",
|
|
5557
|
+
minimum: 1,
|
|
5558
|
+
maximum: MAX_LIST_LIMIT,
|
|
5559
|
+
description: `Maximum number of items to return (default ${DEFAULT_LIST_LIMIT}, max ${MAX_LIST_LIMIT}). Use the returned nextCursor to fetch the next page.`
|
|
5560
|
+
},
|
|
5561
|
+
cursor: {
|
|
5562
|
+
type: "string",
|
|
5563
|
+
description: "Opaque pagination cursor from a previous response (nextCursor). Omit to start from the beginning."
|
|
5564
|
+
}
|
|
5340
5565
|
};
|
|
5566
|
+
function clampListLimit(limit) {
|
|
5567
|
+
const requested = Number(limit);
|
|
5568
|
+
return Math.min(
|
|
5569
|
+
Number.isFinite(requested) && requested >= 1 ? Math.floor(requested) : DEFAULT_LIST_LIMIT,
|
|
5570
|
+
MAX_LIST_LIMIT
|
|
5571
|
+
);
|
|
5572
|
+
}
|
|
5573
|
+
function serverPageQuery(args) {
|
|
5574
|
+
const cursor = typeof args.cursor === "string" && args.cursor !== "" ? args.cursor : void 0;
|
|
5575
|
+
return { limit: clampListLimit(args.limit), ...cursor ? { cursor } : {} };
|
|
5576
|
+
}
|
|
5577
|
+
function serverPagination(pagination, returned) {
|
|
5578
|
+
const hasNextPage = pagination?.hasNextPage === true;
|
|
5579
|
+
return {
|
|
5580
|
+
returned,
|
|
5581
|
+
hasNextPage,
|
|
5582
|
+
nextCursor: pagination?.nextCursor ?? null,
|
|
5583
|
+
...hasNextPage ? { note: "More results exist. Pass cursor=nextCursor to fetch them." } : {}
|
|
5584
|
+
};
|
|
5585
|
+
}
|
|
5586
|
+
function decodeCursorOffset(cursor) {
|
|
5587
|
+
if (!cursor) return 0;
|
|
5588
|
+
try {
|
|
5589
|
+
const decoded = Buffer.from(cursor, "base64").toString("utf8");
|
|
5590
|
+
if (!/^\d+$/.test(decoded)) return 0;
|
|
5591
|
+
const offset = Number.parseInt(decoded, 10);
|
|
5592
|
+
return Number.isFinite(offset) && offset >= 0 ? offset : 0;
|
|
5593
|
+
} catch {
|
|
5594
|
+
return 0;
|
|
5595
|
+
}
|
|
5596
|
+
}
|
|
5597
|
+
function encodeCursorOffset(offset) {
|
|
5598
|
+
return Buffer.from(String(offset), "utf8").toString("base64");
|
|
5599
|
+
}
|
|
5600
|
+
function capList(items, options, extra) {
|
|
5601
|
+
const limit = clampListLimit(options.limit);
|
|
5602
|
+
const offset = decodeCursorOffset(options.cursor);
|
|
5603
|
+
const total = items.length;
|
|
5604
|
+
const page = items.slice(offset, offset + limit);
|
|
5605
|
+
const nextOffset = offset + page.length;
|
|
5606
|
+
const hasMore = nextOffset < total;
|
|
5607
|
+
const { items: _i, pagination: _p, ...safeExtra } = extra ?? {};
|
|
5608
|
+
void _i;
|
|
5609
|
+
void _p;
|
|
5610
|
+
return {
|
|
5611
|
+
...safeExtra,
|
|
5612
|
+
items: page,
|
|
5613
|
+
pagination: {
|
|
5614
|
+
total,
|
|
5615
|
+
returned: page.length,
|
|
5616
|
+
offset,
|
|
5617
|
+
truncated: hasMore,
|
|
5618
|
+
nextCursor: hasMore ? encodeCursorOffset(nextOffset) : null,
|
|
5619
|
+
...hasMore ? {
|
|
5620
|
+
note: `Showing ${page.length} of ${total}. Pass cursor=nextCursor to fetch more, or narrow the query with filters.`
|
|
5621
|
+
} : {}
|
|
5622
|
+
}
|
|
5623
|
+
};
|
|
5624
|
+
}
|
|
5341
5625
|
|
|
5342
5626
|
// src/specgen/tools/capacity.ts
|
|
5343
5627
|
var CUDA_VERSION_REGEX = /^\d{1,2}\.\d{1,2}$/;
|
|
@@ -5374,6 +5658,7 @@ function rankByStock(rows, stats, includeUnavailable) {
|
|
|
5374
5658
|
var getCapacity = {
|
|
5375
5659
|
name: "get-capacity",
|
|
5376
5660
|
title: "Get GPU capacity by CUDA version",
|
|
5661
|
+
directoryDescription: "GPU capacity across host CUDA versions, as a matrix. By default one call returns, for each GPU type, overall stock plus AVAILABLE or UNAVAILABLE per host CUDA version. With cudaVersions it checks each listed version and returns graded stock (High, Medium, Low, Out) and the lowest on-demand price per version; a check that fails transiently reports an error for that version only. Out-of-stock GPUs are included unless includeUnavailable is false. Live public catalog data, so page cursors can shift between calls.",
|
|
5377
5662
|
annotations: readOnly,
|
|
5378
5663
|
description: "GPU capacity across host CUDA versions, as a matrix. Use this to choose an endpoint's allowedCudaVersions/minCudaVersion (or diagnose/widen a capacity-starved one) and to distinguish capacity problems from compatibility problems. Default mode is one call returning, per GPU type, overall stock plus AVAILABLE/UNAVAILABLE per host-reported CUDA version. Pass cudaVersions to deep-probe instead: one stock lookup per listed version, returning graded stock (High/Medium/Low/Out) and the lowest on-demand price per version; a probe that fails transiently reports a per-version error instead of failing the call. Nothing is hidden by default \u2014 set includeUnavailable:false to drop GPUs with no stock on any listed version. Credential-free public catalog data. Stock is live, so page cursors can shift between calls.",
|
|
5379
5664
|
inputSchema: {
|
|
@@ -5576,7 +5861,9 @@ function formatGpuIds(gpu) {
|
|
|
5576
5861
|
var setEndpointGpus = {
|
|
5577
5862
|
name: "set-endpoint-gpus",
|
|
5578
5863
|
title: "Set endpoint GPUs",
|
|
5579
|
-
|
|
5864
|
+
directoryDescription: "Set which GPUs a Serverless endpoint's workers run on, including pinning specific GPU types. Takes either a raw gpuIds string, or pools plus optional excludeGpuTypeIds, from which the exclusion string is built: a pool allows every GPU type in it, and excluding all but one pins that type. Changes only GPU settings and keeps the endpoint's other settings.",
|
|
5865
|
+
// Replaces the whole GPU selection: exclusions not resent are cleared.
|
|
5866
|
+
annotations: destructive,
|
|
5580
5867
|
description: "Set which GPUs a Serverless endpoint's workers run on \u2014 including pinning specific GPU SKUs. Provide either a raw gpuIds string, or pools plus optional excludeGpuTypeIds (GPU type ids from list-gpu-types) and the exclusion string is built for you: a pool allows every SKU in it, and excluding all but one SKU pins that SKU exactly. Updates only GPU settings through REST v2, preserving other endpoint settings. create-endpoint/update-endpoint also support gpu.excludedTypes.",
|
|
5581
5868
|
inputSchema: {
|
|
5582
5869
|
type: "object",
|
|
@@ -5771,6 +6058,7 @@ function randomSuffix() {
|
|
|
5771
6058
|
var listHubRepos = {
|
|
5772
6059
|
name: "list-hub-repos",
|
|
5773
6060
|
title: "List Hub repos",
|
|
6061
|
+
directoryDescription: "List repos published to the Runpod Hub (prebuilt Serverless workers and Pod templates, such as vLLM and ComfyUI), sorted by deploy count. Public catalog; no sign-in needed. Each result includes the listed release with its hubReleaseId and image name. includeConfig: true adds each release's config (hardware requirements and environment-variable schema), which is large; repoOwner and searchTerm narrow the list.",
|
|
5774
6062
|
annotations: readOnly,
|
|
5775
6063
|
description: "List repos published to the Runpod Hub (prebuilt Serverless workers and Pod templates, e.g. vLLM, ComfyUI). Public catalog \u2014 no auth required. Each result includes the currently listed release with its hubReleaseId and prebuilt image name. Results are sorted by deploy count (most popular first). Set includeConfig:true to also return the release config (hardware requirements and environment-variable schema) \u2014 it is large, so prefer requesting it for a single repo via the repoOwner/searchTerm filters.",
|
|
5776
6064
|
inputSchema: {
|
|
@@ -5874,6 +6162,7 @@ var listHubRepos = {
|
|
|
5874
6162
|
var deployHubRepo = {
|
|
5875
6163
|
name: "deploy-hub-repo",
|
|
5876
6164
|
title: "Deploy Hub repo",
|
|
6165
|
+
directoryDescription: `Deploy a Runpod Hub repo's listed release as a new Serverless endpoint, the same as clicking Deploy on the Hub. Identifies the repo by repo ("owner/name") or hubReleaseId. The release supplies the image, container disk, CUDA constraints and environment-variable defaults; env overrides or fills in values, and keys the release requires without a default have to be supplied. GPUs come from the release config when it sets them, otherwise from gpuIds (pool names such as 'ADA_24'). Billable while the endpoint's workers run.`,
|
|
5877
6166
|
// Two sequential upstream calls: together they can outlast a client's request timeout.
|
|
5878
6167
|
holdsResponse: true,
|
|
5879
6168
|
annotations: write,
|
|
@@ -6335,6 +6624,7 @@ function validateWait(wait) {
|
|
|
6335
6624
|
var runEndpoint = {
|
|
6336
6625
|
name: "run-endpoint",
|
|
6337
6626
|
title: "Submit Serverless job",
|
|
6627
|
+
directoryDescription: "Submit an asynchronous job to a Serverless endpoint. Returns a job ID immediately; the result stays available for 30 minutes after the job completes.",
|
|
6338
6628
|
annotations: write,
|
|
6339
6629
|
description: "Submit an asynchronous job to a Serverless endpoint. Returns a job ID immediately \u2014 use get-job-status to poll for results (pass its `wait` to block through a cold start instead of tight-looping). Async results are available for 30 minutes after completion.",
|
|
6340
6630
|
inputSchema: {
|
|
@@ -6366,6 +6656,7 @@ var runEndpoint = {
|
|
|
6366
6656
|
var runsyncEndpoint = {
|
|
6367
6657
|
name: "runsync-endpoint",
|
|
6368
6658
|
title: "Run Serverless job and wait",
|
|
6659
|
+
directoryDescription: `Submit a synchronous job to a Serverless endpoint and wait up to ${HTTP_LONG_POLL_BUDGET_MS} ms for the result. If the job outlives the wait, the response carries the job ID and its current status (IN_QUEUE or IN_PROGRESS). Maximum payload 20 MB; results expire 1 minute after completion.`,
|
|
6369
6660
|
holdsResponse: true,
|
|
6370
6661
|
annotations: write,
|
|
6371
6662
|
description: "Submit a synchronous job to a Serverless endpoint and wait for the result. Best for fast tasks: if the job outlives the wait, the response returns a job ID and a non-terminal status (IN_QUEUE or IN_PROGRESS) to poll with get-job-status. Max payload 20 MB; results expire after 1 minute. The wait parameter extends the server-side wait" + (HOSTED ? ` \u2014 this server runs behind a 60-second gateway deadline, so waits clamp to ${HTTP_LONG_POLL_BUDGET_MS} ms, which is also the effective default. For longer jobs use run-endpoint + get-job-status.` : " to up to 5 minutes (300000 ms); it defaults to 90000 (90 seconds)."),
|
|
@@ -6412,6 +6703,7 @@ var runsyncEndpoint = {
|
|
|
6412
6703
|
var getJobStatus = {
|
|
6413
6704
|
name: "get-job-status",
|
|
6414
6705
|
title: "Get job status",
|
|
6706
|
+
directoryDescription: `Get the status of a Serverless job, and its output once it completes. Statuses: IN_QUEUE, IN_PROGRESS, COMPLETED, FAILED, CANCELLED, TIMED_OUT. With wait (milliseconds, up to ${HTTP_LONG_POLL_BUDGET_MS}) the server polls until the job reaches a final status or the wait runs out, in which case it returns the latest status with pollingTimedOut: true; without wait it returns the current status at once. An IN_QUEUE result includes a workerHealth summary of the endpoint's workers.`,
|
|
6415
6707
|
holdsResponse: true,
|
|
6416
6708
|
annotations: readOnly,
|
|
6417
6709
|
description: "Check the status of a Serverless job. Returns the current status and output when complete. Job statuses: IN_QUEUE, IN_PROGRESS, COMPLETED, FAILED, CANCELLED, TIMED_OUT. Pass `wait` (milliseconds, up to " + STATUS_WAIT_MAX_MS + ") to BLOCK server-side, polling until the job reaches a terminal status or the budget expires \u2014 use it to ride out a cold start (a first job on a fresh worker pulls the image and loads the model, commonly 1\u20135+ minutes) in a single call instead of returning on the first IN_QUEUE and tight-looping the tool. Without `wait` it returns the current status immediately (a single check). If the budget expires before a terminal status, it returns the latest non-terminal status with pollingTimedOut:true \u2014 call again (with `wait`) to keep blocking. IMPORTANT: a job stuck IN_QUEUE does not necessarily mean a capacity shortage \u2014 a worker may have spun up and crash-looped. When the job is IN_QUEUE this tool attaches a workerHealth summary and a hint. To dig deeper call list-endpoint-workers, then read stream-worker-logs regardless of the status a worker reports: a container failing to start loops while its worker still shows RUNNING or THROTTLED and unhealthy stays 0, so UNHEALTHY is one symptom of a crash loop and not a test for it. The logs are the authority.",
|
|
@@ -6462,8 +6754,11 @@ var getJobStatus = {
|
|
|
6462
6754
|
var streamJob = {
|
|
6463
6755
|
name: "stream-job",
|
|
6464
6756
|
title: "Stream job output",
|
|
6757
|
+
directoryDescription: `Collect streaming output from a Serverless job whose worker streams its output. Polls the job's stream until it reaches COMPLETED, FAILED, CANCELLED or TIMED_OUT, for up to ${formatBudget(HTTP_LONG_POLL_BUDGET_MS)}; if time runs out first, it returns the chunks collected so far with pollingTimedOut: true, and a later call resumes where it left off.`,
|
|
6465
6758
|
holdsResponse: true,
|
|
6466
|
-
|
|
6759
|
+
// Not a read: /stream hands out each chunk once, so a chunk collected by a
|
|
6760
|
+
// call whose response is lost cannot be fetched again.
|
|
6761
|
+
annotations: destructiveWrite,
|
|
6467
6762
|
description: `Retrieve streaming output from a Serverless job. The worker must support streaming output. Polls /stream/{jobId} and collects chunks until the status is COMPLETED, FAILED, CANCELLED, or TIMED_OUT, for up to ${formatBudget(STREAM_BUDGET_MS)}. If the budget expires first, returns the chunks collected so far with pollingTimedOut: true \u2014 call stream-job again to resume where it left off, or get-job-status to check without streaming.`,
|
|
6468
6763
|
inputSchema: {
|
|
6469
6764
|
type: "object",
|
|
@@ -6521,7 +6816,8 @@ var cancelJob = {
|
|
|
6521
6816
|
var retryJob = {
|
|
6522
6817
|
name: "retry-job",
|
|
6523
6818
|
title: "Retry job",
|
|
6524
|
-
|
|
6819
|
+
// Removes the previous output before requeueing.
|
|
6820
|
+
annotations: destructiveWrite,
|
|
6525
6821
|
description: "Retry a failed or timed-out Serverless job. Only works for jobs with FAILED or TIMED_OUT status. The previous output is removed and the job is requeued.",
|
|
6526
6822
|
inputSchema: {
|
|
6527
6823
|
type: "object",
|
|
@@ -6547,6 +6843,7 @@ var retryJob = {
|
|
|
6547
6843
|
var endpointHealth = {
|
|
6548
6844
|
name: "endpoint-health",
|
|
6549
6845
|
title: "Get endpoint health",
|
|
6846
|
+
directoryDescription: "Get the health rollup for a Serverless endpoint: worker counts by state and job queue statistics. The rollup can lag the per-worker state, and a worker whose container keeps failing to start can still report RUNNING or THROTTLED here. Zero workers means the endpoint is waiting for GPU capacity.",
|
|
6550
6847
|
annotations: readOnly,
|
|
6551
6848
|
description: "Get the endpoint-level health rollup for a Serverless endpoint: worker counts by state plus job queue statistics. This is the runtime plane's own /health view and it can lag or disagree with the per-worker truth \u2014 when a job is stuck IN_QUEUE, prefer list-endpoint-workers over this rollup for per-worker state \u2014 but treat neither as the authority on crash loops, because a container failing to start loops while its worker reports RUNNING or THROTTLED and unhealthy stays 0; stream-worker-logs is what settles it, and note that get-job-status already attaches that worker summary and a hint on every IN_QUEUE result. Zero workers here means the endpoint is waiting for GPU capacity.",
|
|
6552
6849
|
inputSchema: {
|
|
@@ -6568,6 +6865,7 @@ var endpointHealth = {
|
|
|
6568
6865
|
var purgeEndpointQueue = {
|
|
6569
6866
|
name: "purge-endpoint-queue",
|
|
6570
6867
|
title: "Purge endpoint queue",
|
|
6868
|
+
directoryDescription: "Remove all queued jobs from a Serverless endpoint. Jobs already in progress keep running.",
|
|
6571
6869
|
annotations: destructive,
|
|
6572
6870
|
description: "Remove all pending jobs from a Serverless endpoint queue. Only affects queued jobs \u2014 in-progress jobs continue running. Use this for error recovery or clearing outdated requests.",
|
|
6573
6871
|
inputSchema: {
|
|
@@ -6605,6 +6903,7 @@ var jobTools = [
|
|
|
6605
6903
|
var listEndpoints = {
|
|
6606
6904
|
name: "list-endpoints",
|
|
6607
6905
|
title: "List endpoints",
|
|
6906
|
+
directoryDescription: "List the Serverless endpoints the account owns, trimmed to id, name, image, compute config, worker counts, scaling and data centers; environment variables and request URLs are left out. Returns one page at a time; cursor=nextCursor returns the next page.",
|
|
6608
6907
|
annotations: readOnly,
|
|
6609
6908
|
description: "List serverless endpoints owned by the account (trimmed: id, name, image, compute config, worker counts, scaling, data centers per endpoint \u2014 env vars and request URLs are omitted; use get-endpoint for the full object). Returns a page; pass cursor=nextCursor for more.",
|
|
6610
6909
|
inputSchema: {
|
|
@@ -6651,6 +6950,7 @@ var listEndpoints = {
|
|
|
6651
6950
|
var listTemplates = {
|
|
6652
6951
|
name: "list-templates",
|
|
6653
6952
|
title: "List templates",
|
|
6953
|
+
directoryDescription: "List the templates visible to the account, with id, name, image and Serverless flag for each. Returns 20 templates per page by default; pagination.nextCursor returns the next page, and a template missing from one page can be on a later one.",
|
|
6654
6954
|
annotations: readOnly,
|
|
6655
6955
|
description: "List templates visible to the account. Returns id, name, image, and serverless flag per template; use get-template for full detail. Returns 20 templates per page by default. To find a template, follow `pagination.nextCursor` until `hasNextPage` is false: a name missing from one page may be on a later one.",
|
|
6656
6956
|
inputSchema: {
|
|
@@ -6705,7 +7005,7 @@ function knowledgeSearchBase(env) {
|
|
|
6705
7005
|
return pick(env.KNOWLEDGE_SEARCH_URL, "") || void 0;
|
|
6706
7006
|
}
|
|
6707
7007
|
|
|
6708
|
-
//
|
|
7008
|
+
// packages/typescript-api-sdk/dist/index.js
|
|
6709
7009
|
var PATH_PARAM_RE = /\{[^{}]+\}/g;
|
|
6710
7010
|
var supportsRequestInitExt = () => {
|
|
6711
7011
|
return typeof process === "object" && Number.parseInt(process?.versions?.node?.substring(0, 2)) >= 18 && process.versions.undici;
|
|
@@ -7277,10 +7577,7 @@ var Parser = class {
|
|
|
7277
7577
|
parseItem(standaloneItem = true) {
|
|
7278
7578
|
if (standaloneItem)
|
|
7279
7579
|
this.skipWS();
|
|
7280
|
-
const result = [
|
|
7281
|
-
this.parseBareItem(),
|
|
7282
|
-
this.parseParameters()
|
|
7283
|
-
];
|
|
7580
|
+
const result = [this.parseBareItem(), this.parseParameters()];
|
|
7284
7581
|
if (standaloneItem)
|
|
7285
7582
|
this.checkTrail();
|
|
7286
7583
|
return result;
|
|
@@ -7300,10 +7597,7 @@ var Parser = class {
|
|
|
7300
7597
|
this.skipWS();
|
|
7301
7598
|
if (this.lookChar() === ")") {
|
|
7302
7599
|
this.pos++;
|
|
7303
|
-
return [
|
|
7304
|
-
innerList,
|
|
7305
|
-
this.parseParameters()
|
|
7306
|
-
];
|
|
7600
|
+
return [innerList, this.parseParameters()];
|
|
7307
7601
|
}
|
|
7308
7602
|
innerList.push(this.parseItem(false));
|
|
7309
7603
|
const nextChar = this.lookChar();
|
|
@@ -7890,7 +8184,6 @@ var LogEventParser = class {
|
|
|
7890
8184
|
constructor(maxEventBytes) {
|
|
7891
8185
|
this.maxEventBytes = maxEventBytes;
|
|
7892
8186
|
}
|
|
7893
|
-
maxEventBytes;
|
|
7894
8187
|
line = "";
|
|
7895
8188
|
dataLines = [];
|
|
7896
8189
|
eventName = "";
|
|
@@ -8134,6 +8427,7 @@ var streamPodLogs = {
|
|
|
8134
8427
|
var streamWorkerLogs = {
|
|
8135
8428
|
name: "stream-worker-logs",
|
|
8136
8429
|
title: "Stream worker logs",
|
|
8430
|
+
directoryDescription: "Read a bounded snapshot of a Serverless worker's logs (container, system, or both). Holds the live stream open for maxWaitMs and returns the parsed log lines; truncated: true means the byte cap cut the output. A worker whose container keeps failing to start can report RUNNING or THROTTLED while its logs show the failure.",
|
|
8137
8431
|
holdsResponse: true,
|
|
8138
8432
|
annotations: readOnly,
|
|
8139
8433
|
description: "Read a bounded snapshot of a Serverless worker's logs (container and/or system source). Holds the live stream open for maxWaitMs and returns the parsed log lines; `truncated: true` means the byte cap cut the output. Get worker IDs from list-endpoint-workers. Use this whenever a job stays IN_QUEUE while workers exist, whatever status they report \u2014 a crash-looping container often still shows RUNNING or THROTTLED with unhealthy 0, so these logs, not the worker status, are what identify a crash loop.",
|
|
@@ -8177,6 +8471,7 @@ function parseMetadata(metadata) {
|
|
|
8177
8471
|
var listPublicEndpoints = {
|
|
8178
8472
|
name: "list-public-endpoints",
|
|
8179
8473
|
title: "List public endpoints",
|
|
8474
|
+
directoryDescription: "List Runpod Public Endpoints: managed, pay-per-use model APIs (text, image, video, audio) that need no deployment. Public catalog; no sign-in needed. Each result includes its endpointId, model name, modality, owner and pricing. Only live endpoints are listed unless includeOffline is true.",
|
|
8180
8475
|
annotations: readOnly,
|
|
8181
8476
|
description: "List Runpod Public Endpoints \u2014 managed, pay-per-use model APIs (text, image, video, audio) that require no deployment. Public catalog, no auth required. Each result includes the endpointId to call with run-endpoint/runsync-endpoint (or via https://api.runpod.ai/v2/{endpointId}), the model name, modality, owner, and pricing. Only live endpoints are returned by default; set includeOffline:true to also list ones that are not currently live.",
|
|
8182
8477
|
inputSchema: {
|
|
@@ -8477,6 +8772,7 @@ var readGuide = {
|
|
|
8477
8772
|
var lookupConcept = {
|
|
8478
8773
|
name: "lookup-concept",
|
|
8479
8774
|
title: "Look up a concept",
|
|
8775
|
+
directoryDescription: "Look up one Runpod concept (Pod, network volume, machine, worker, template and so on) by id, name or alias; case, plurals and small typos are tolerated, and matched_as shows the key used when the match was not exact. Returns its summary, fields, states, relations and rules, each rule with its public source, plus the concepts that point at it. Answers exact questions such as whether a volume disk is tied to one machine.",
|
|
8480
8776
|
annotations: bundledRead,
|
|
8481
8777
|
recordedArguments: ["concept"],
|
|
8482
8778
|
description: 'Look up one Runpod concept (pod, network volume, machine, worker, template, \u2026) by id, name or alias; case, plurals and small typos are tolerated, and `matched_as` shows the key used when the match was not exact. Returns its summary, fields, states, relations and rules, each rule with the public source it comes from, the concepts that point at it, and the linked guides: examples (golden paths that use it, with their mcp level) and docs (skills and reference docs that explain it). Use it for exact facts, for example "is a volume disk tied to one machine" or "what happens to a stopped pod\'s GPU".',
|
|
@@ -8531,6 +8827,7 @@ var lookupConcept = {
|
|
|
8531
8827
|
var searchConcepts = {
|
|
8532
8828
|
name: "search-concepts",
|
|
8533
8829
|
title: "Search concepts",
|
|
8830
|
+
directoryDescription: 'Search the rules of the Runpod concept graph by words, for example "restart stopped pod no gpu" or "network volume data center". Returns the best-matching rules with their concept and public evidence.',
|
|
8534
8831
|
annotations: bundledRead,
|
|
8535
8832
|
recordedArguments: ["query", "limit"],
|
|
8536
8833
|
description: 'Search the rules of the Runpod concept graph by words, for example "restart stopped pod no gpu" or "network volume data center". Returns the best-matching rules with their concept and public evidence. Follow up with lookup-concept for the full concept.',
|
|
@@ -8621,9 +8918,23 @@ function listedAnnotations(annotations) {
|
|
|
8621
8918
|
const { idempotentHint, ...listed } = annotations;
|
|
8622
8919
|
return idempotentHint ? annotations : listed;
|
|
8623
8920
|
}
|
|
8624
|
-
function listTool(tool) {
|
|
8625
|
-
const { name, title,
|
|
8626
|
-
const annotations = listedAnnotations(tool.annotations);
|
|
8921
|
+
function listTool(tool, profile = "default") {
|
|
8922
|
+
const { name, title, inputSchema } = tool;
|
|
8923
|
+
const annotations = { title, ...listedAnnotations(tool.annotations) };
|
|
8924
|
+
if (profile === "directory")
|
|
8925
|
+
return {
|
|
8926
|
+
name,
|
|
8927
|
+
title,
|
|
8928
|
+
description: withApiReference(
|
|
8929
|
+
tool.directoryDescription ?? tool.description,
|
|
8930
|
+
inputSchema
|
|
8931
|
+
),
|
|
8932
|
+
inputSchema: withoutCredentialExamples(
|
|
8933
|
+
withoutInputs(inputSchema, directoryOmittedInputs(name))
|
|
8934
|
+
),
|
|
8935
|
+
annotations
|
|
8936
|
+
};
|
|
8937
|
+
const { description } = tool;
|
|
8627
8938
|
if (!tool.schemaOnDemand)
|
|
8628
8939
|
return { name, title, description, inputSchema, annotations };
|
|
8629
8940
|
return {
|
|
@@ -8634,6 +8945,36 @@ function listTool(tool) {
|
|
|
8634
8945
|
annotations
|
|
8635
8946
|
};
|
|
8636
8947
|
}
|
|
8948
|
+
var DIRECTORY_API_REFERENCE = "Calls the Runpod REST API v2: https://docs.runpod.io/api-reference-v2/overview";
|
|
8949
|
+
function withApiReference(description, schema) {
|
|
8950
|
+
const properties = schema.properties ?? {};
|
|
8951
|
+
if (!("body" in properties)) return description;
|
|
8952
|
+
const trimmed = description.replace(/\s*$/, "");
|
|
8953
|
+
const sentence = /[.!?]$/.test(trimmed) ? trimmed : `${trimmed}.`;
|
|
8954
|
+
return `${sentence} ${DIRECTORY_API_REFERENCE}`;
|
|
8955
|
+
}
|
|
8956
|
+
var CREDENTIAL = /pass(word|wd|phrase)?|secret|token(?!s)|api_?key|private_?key|credential/i;
|
|
8957
|
+
function withoutCredentialExamples(schema) {
|
|
8958
|
+
const strip = (node) => {
|
|
8959
|
+
if (Array.isArray(node)) return node.map(strip);
|
|
8960
|
+
if (!node || typeof node !== "object") return node;
|
|
8961
|
+
const out = {};
|
|
8962
|
+
for (const [key, value] of Object.entries(node)) {
|
|
8963
|
+
if (key === "examples" && CREDENTIAL.test(JSON.stringify(value)))
|
|
8964
|
+
continue;
|
|
8965
|
+
out[key] = strip(value);
|
|
8966
|
+
}
|
|
8967
|
+
return out;
|
|
8968
|
+
};
|
|
8969
|
+
return strip(schema);
|
|
8970
|
+
}
|
|
8971
|
+
function withoutInputs(schema, omit) {
|
|
8972
|
+
if (!omit.length) return schema;
|
|
8973
|
+
const properties = { ...schema.properties ?? {} };
|
|
8974
|
+
for (const key of omit) delete properties[key];
|
|
8975
|
+
const required = Array.isArray(schema.required) ? schema.required.filter((key) => !omit.includes(key)) : schema.required;
|
|
8976
|
+
return { ...schema, properties, ...required ? { required } : {} };
|
|
8977
|
+
}
|
|
8637
8978
|
function callShape(schema) {
|
|
8638
8979
|
const defs = schema.$defs ?? {};
|
|
8639
8980
|
const resolve = (node) => {
|
|
@@ -8735,7 +9076,7 @@ function words2(name) {
|
|
|
8735
9076
|
|
|
8736
9077
|
// src/server.ts
|
|
8737
9078
|
var SERVER_NAME = "Runpod API Server";
|
|
8738
|
-
var SERVER_VERSION = true ? "4.
|
|
9079
|
+
var SERVER_VERSION = true ? "4.7.0" : "dev";
|
|
8739
9080
|
|
|
8740
9081
|
// src/specgen/analytics.ts
|
|
8741
9082
|
import { createHmac } from "crypto";
|
|
@@ -9255,6 +9596,7 @@ function createSearchDocsTool(search) {
|
|
|
9255
9596
|
return {
|
|
9256
9597
|
name: "search-docs",
|
|
9257
9598
|
title: "Search docs",
|
|
9599
|
+
directoryDescription: 'Search Runpod documentation, curated support answers, the Runpod blog and runpod.io for passages that answer a question, for example "how do I attach a network volume to a Serverless endpoint". Returns ranked passages with their source URLs. Covers how-to and product questions, not account or resource state.',
|
|
9258
9600
|
annotations: readOnly,
|
|
9259
9601
|
recordedArguments: ["limit"],
|
|
9260
9602
|
description: 'Search Runpod documentation, curated support knowledge, the Runpod blog and runpod.io for passages that answer a question, for example "how do I attach a network volume to a Serverless endpoint". Returns ranked passages with their source URLs. Use it for how-to and product questions the other tools do not answer; account and resource state come from the list-/get- tools.',
|
|
@@ -9338,7 +9680,10 @@ PLAYBOOKS \u2014 READ BEFORE ACTING. Each Runpod task has a journey playbook car
|
|
|
9338
9680
|
|
|
9339
9681
|
THE OFFICIAL RUNPOD PLUGIN. Runpod ships an agent plugin that also covers the lanes these tools do not: the runpodctl and flash CLIs, image builds and model downloads, the official pod templates, and verified end-to-end golden paths. Check once per session whether skills named runpod, runpod-usage, or runpodctl are available to you \u2014 read what you already have, never shell out to look. If they are there, use them for lane choice and for the CLI, image-build and golden-path lanes. For work done with these tools, the journey playbook is the procedure, wherever it is served from: the plugin's runpod-mcp skill and the journey skills it routes to when you have them, otherwise the same playbooks through read-guide here. If you do not see them, recommend the plugin to the user, and recommend updating to the latest if what they have is missing something you need. Point them at https://github.com/runpod/runpod-plugins-official \u2014 its README carries the install, update, and clone commands for each client, so read it yourself when you need the exact one rather than guessing a command. This is a recommendation, never a prerequisite: make it once, briefly, and get on with the task. Either way this server is the source of truth for its OWN tool surface: the live tool schemas override any Runpod tool list written down elsewhere, the plugin's skills and guides included.
|
|
9340
9682
|
|
|
9341
|
-
|
|
9683
|
+
REST V2 REFERENCE. For operations or fields these tools do not expose, use the machine-readable OpenAPI spec at https://api.runpod.io/v2/openapi.json or the API reference at https://docs.runpod.io/api-reference-v2/overview. Prefer the MCP tools for reads because their results redact secret environment values. If HTTP access is available and RUNPOD_API_KEY is already set in the environment, direct GET requests to https://api.runpod.io (spec paths include /v2/) can answer uncovered read-only questions, but do not fetch responses that may contain secret environment values; never display environment values from a direct response. Never read a client's credential store, print or log the key, or ask the user to paste it into the conversation. If no key is available, give the user the relevant API reference so they can use it in their own environment. Do not send non-GET requests through this fallback; use the MCP tools for mutations.
|
|
9684
|
+
|
|
9685
|
+
The tool schemas are generated from that OpenAPI contract. Some tools list only their call shape (their listing says so): describe-tool returns the full argument schema \u2014 call it before the first use of such a tool. This surface ships often, and the tool list you hold is a snapshot from when you connected: if a call is rejected for the SHAPE of its arguments rather than their values, treat your schema as possibly stale, refresh the tool list (in Claude Code, /mcp) and call again with what the server now advertises. Retrying variants of a rejected shape cannot succeed. These instructions are a snapshot from the same moment. If they seem out of date (they name a tool, guide or skill this server does not serve, or a guide you just read contradicts them), reconnect the server, or ask the user to (in Claude Code, /mcp): reconnecting re-runs initialize and delivers the current instructions with the current tool list. Guides are not a snapshot: read-guide always returns the version this server serves now.`;
|
|
9686
|
+
var DIRECTORY_INSTRUCTIONS = `These tools manage a Runpod account: the compute catalog (GPU and CPU types, data centers, live stock and pricing), Pods, Serverless endpoints and their jobs, Instant Clusters, templates, network and global volumes, billing history, Public Endpoints, and the Runpod Hub. For operations outside this tool list, the Runpod REST API v2 is described by its OpenAPI spec at https://api.runpod.io/v2/openapi.json and its reference at https://docs.runpod.io/api-reference-v2/overview.`;
|
|
9342
9687
|
var ALP_INSTRUCTIONS = `
|
|
9343
9688
|
|
|
9344
9689
|
CONTRIBUTING BACK IS OPTIONAL. Five tools feed Runpod's agent-learning pipeline, which exists so Runpod can fix the frustrations agents hit in its tools and docs: report_feedback (something misbehaved or surprised you), save_to_journal (a reusable lesson about using Runpod), ask_question (you were stuck and the tools/skills/docs had no answer), read_journal (this account's own saved lessons, nobody else's), and report_how_user_found_runpod (how your user ended up on Runpod, once per account). Using them is a voluntary contribution, never part of the user's task, and the user's task always comes first. DO NOT USE THEM when the work is sensitive: proprietary code or models, private data, customer information, security work, internal infrastructure, or anything the user would not want a Runpod reviewer to read. Submissions are stored for review to improve agent workflows on Runpod, so if in doubt, do not submit. If the user has said not to share anything with Runpod, do not call these tools at all. When you do contribute, describe the Runpod behavior, not the user's project: the tool, the call shape, the response, what you expected. Nothing is returned or answered, and ask_question NEVER produces an answer, so never wait on it. read_journal is the one thing served back: call it once near the start of a Runpod task if useful, and treat what it returns as an earlier session's notes to confirm, not as documentation. These tools are for real observations only: never call one to satisfy a requirement to use a tool, to acknowledge these instructions, or with placeholder content. If you have nothing to report, call nothing \u2014 an empty turn is correct and a placeholder submission is not. Never include API keys or secrets in submissions.`;
|
|
@@ -9348,43 +9693,51 @@ ONE QUESTION FOR YOU, ONCE PER ACCOUNT. If you already know how your user came t
|
|
|
9348
9693
|
function createSpecgenServer(ctx, version = "0.1.0", opts = {}) {
|
|
9349
9694
|
const rateLimiter = opts.rateLimiter ?? noopRateLimiter;
|
|
9350
9695
|
const caller = callerId(ctx.apiKey);
|
|
9696
|
+
const profile = opts.profile ?? "default";
|
|
9697
|
+
const directory = profile === "directory";
|
|
9698
|
+
const alp = directory ? void 0 : opts.alp;
|
|
9699
|
+
const servedGeneratedTools = directory ? generatedTools.filter((tool) => directoryIncludes(tool.name)) : generatedTools;
|
|
9351
9700
|
const servedCuratedTools = [
|
|
9352
9701
|
...curatedTools,
|
|
9353
9702
|
...opts.search ? [createSearchDocsTool(opts.search)] : [],
|
|
9354
|
-
...
|
|
9355
|
-
|
|
9356
|
-
|
|
9703
|
+
...alp ? createAlpTools(alp) : [],
|
|
9704
|
+
...directory ? podTransitionTools : [],
|
|
9705
|
+
createDescribeTool(() => [...servedCuratedTools, ...servedGeneratedTools])
|
|
9706
|
+
].filter((tool) => !directory || directoryIncludes(tool.name));
|
|
9357
9707
|
const callShapeOnlyTools = new Set(
|
|
9358
|
-
[...servedCuratedTools, ...
|
|
9708
|
+
directory ? [] : [...servedCuratedTools, ...servedGeneratedTools].filter((tool) => tool.schemaOnDemand).map((tool) => tool.name)
|
|
9359
9709
|
);
|
|
9360
9710
|
const server = new Server(
|
|
9361
9711
|
{ name: SERVER_NAME, version: `${version} [specgen]` },
|
|
9362
9712
|
{
|
|
9363
9713
|
capabilities: { tools: {}, resources: {} },
|
|
9364
|
-
instructions:
|
|
9714
|
+
instructions: directory ? DIRECTORY_INSTRUCTIONS : alp ? SERVER_INSTRUCTIONS + ALP_INSTRUCTIONS + (opts.promptReferral === false ? "" : REFERRAL_INSTRUCTIONS) : SERVER_INSTRUCTIONS
|
|
9365
9715
|
}
|
|
9366
9716
|
);
|
|
9367
9717
|
server.oninitialized = () => {
|
|
9368
9718
|
const clientInfo = server.getClientVersion();
|
|
9369
9719
|
if (clientInfo?.name) {
|
|
9370
9720
|
ctx.setClientInfo?.(clientInfo.name, clientInfo.version);
|
|
9371
|
-
if (
|
|
9372
|
-
|
|
9373
|
-
|
|
9721
|
+
if (alp) {
|
|
9722
|
+
alp.harness = clientInfo.version ? `${clientInfo.name}/${clientInfo.version}` : clientInfo.name;
|
|
9723
|
+
alp.harnessSource = "client_info";
|
|
9374
9724
|
}
|
|
9375
9725
|
}
|
|
9376
9726
|
};
|
|
9377
9727
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
9378
|
-
tools: [...servedCuratedTools, ...
|
|
9728
|
+
tools: [...servedCuratedTools, ...servedGeneratedTools].map(
|
|
9729
|
+
(tool) => listTool(tool, profile)
|
|
9730
|
+
)
|
|
9379
9731
|
}));
|
|
9732
|
+
const servedGuides = directory ? [] : guideResources;
|
|
9380
9733
|
server.setRequestHandler(ListResourcesRequestSchema, async () => ({
|
|
9381
|
-
resources:
|
|
9734
|
+
resources: servedGuides.map(({ text: _text, ...resource }) => resource)
|
|
9382
9735
|
}));
|
|
9383
9736
|
server.setRequestHandler(ListResourceTemplatesRequestSchema, async () => ({
|
|
9384
9737
|
resourceTemplates: []
|
|
9385
9738
|
}));
|
|
9386
9739
|
server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
|
|
9387
|
-
const guide =
|
|
9740
|
+
const guide = servedGuides.find(
|
|
9388
9741
|
(candidate) => candidate.uri === request.params.uri
|
|
9389
9742
|
);
|
|
9390
9743
|
if (opts.analytics) {
|
|
@@ -9444,7 +9797,14 @@ function createSpecgenServer(ctx, version = "0.1.0", opts = {}) {
|
|
|
9444
9797
|
const curated = servedCuratedTools.find(
|
|
9445
9798
|
(tool) => tool.name === request.params.name
|
|
9446
9799
|
);
|
|
9447
|
-
const
|
|
9800
|
+
const omitted = directory ? directoryOmittedInputs(request.params.name).filter((key) => key in args) : [];
|
|
9801
|
+
const rejected = omitted.length ? {
|
|
9802
|
+
ok: false,
|
|
9803
|
+
status: 400,
|
|
9804
|
+
payload: {
|
|
9805
|
+
error: `Not accepted on this server: ${omitted.join(", ")}.`
|
|
9806
|
+
}
|
|
9807
|
+
} : curated && !curated.lenientArguments ? validateArguments(
|
|
9448
9808
|
curated.inputSchema,
|
|
9449
9809
|
args
|
|
9450
9810
|
) : null;
|
|
@@ -9464,21 +9824,28 @@ function createSpecgenServer(ctx, version = "0.1.0", opts = {}) {
|
|
|
9464
9824
|
ok: result.ok,
|
|
9465
9825
|
status: result.status,
|
|
9466
9826
|
durationMs: Date.now() - startedAt,
|
|
9467
|
-
|
|
9468
|
-
|
|
9827
|
+
// The directory profile records which tool ran, never what was asked.
|
|
9828
|
+
...directory ? {} : {
|
|
9829
|
+
args: recordedArgumentValues(curated?.recordedArguments, args),
|
|
9830
|
+
guideKind: curated?.recordedGuideKind?.(args)
|
|
9831
|
+
},
|
|
9469
9832
|
...opts.analytics
|
|
9470
9833
|
});
|
|
9471
9834
|
}
|
|
9472
9835
|
opts.onToolResult?.(request.params.name, result.status);
|
|
9473
9836
|
if (!result.ok && result.status === 401) opts.onUnauthorized?.();
|
|
9474
|
-
const payload =
|
|
9837
|
+
const payload = redactSecretEnv(
|
|
9838
|
+
result.ok ? result.payload : withRecoveryHint(result, callShapeOnlyTools.has(request.params.name))
|
|
9839
|
+
);
|
|
9475
9840
|
return {
|
|
9476
9841
|
content: [{ type: "text", text: JSON.stringify(payload, null, 2) }],
|
|
9477
9842
|
isError: !result.ok
|
|
9478
9843
|
};
|
|
9479
9844
|
});
|
|
9480
9845
|
async function dispatchTool(name, args) {
|
|
9481
|
-
const tool =
|
|
9846
|
+
const tool = servedGeneratedTools.find(
|
|
9847
|
+
(candidate) => candidate.name === name
|
|
9848
|
+
);
|
|
9482
9849
|
if (!tool)
|
|
9483
9850
|
return {
|
|
9484
9851
|
ok: false,
|
|
@@ -9905,6 +10272,9 @@ function getBaseUrl(req) {
|
|
|
9905
10272
|
}
|
|
9906
10273
|
return `${proto}://${host}`;
|
|
9907
10274
|
}
|
|
10275
|
+
function requestProfile(req) {
|
|
10276
|
+
return profileForPath(new URL(req.url ?? "/", "http://localhost").pathname);
|
|
10277
|
+
}
|
|
9908
10278
|
function writeUnauthorized(req, res, error, invalidToken = false) {
|
|
9909
10279
|
const challenge = [
|
|
9910
10280
|
'Bearer realm="mcp"',
|
|
@@ -9912,9 +10282,9 @@ function writeUnauthorized(req, res, error, invalidToken = false) {
|
|
|
9912
10282
|
'error="invalid_token"',
|
|
9913
10283
|
'error_description="The credential was rejected; re-authenticate."'
|
|
9914
10284
|
] : [],
|
|
9915
|
-
|
|
9916
|
-
|
|
9917
|
-
)}/.well-known/oauth-protected-resource"`
|
|
10285
|
+
// RFC 9728: a resource served under a path advertises its metadata at the
|
|
10286
|
+
// well-known URI with that path appended.
|
|
10287
|
+
`resource_metadata="${getBaseUrl(req)}/.well-known/oauth-protected-resource${requestProfile(req) === "directory" ? DIRECTORY_PATH : ""}"`
|
|
9918
10288
|
].join(", ");
|
|
9919
10289
|
res.writeHead(401, {
|
|
9920
10290
|
"Content-Type": "application/json",
|
|
@@ -10151,8 +10521,10 @@ async function handleMcpRequest(req, res, opts = {}) {
|
|
|
10151
10521
|
const alpConfigured = Boolean(
|
|
10152
10522
|
process.env.ALP_SINK_URL && process.env.ALP_SINK_SECRET
|
|
10153
10523
|
);
|
|
10524
|
+
const profile = requestProfile(req);
|
|
10525
|
+
const alpServed = alpConfigured && profile === "default";
|
|
10154
10526
|
let promptReferral = true;
|
|
10155
|
-
if (
|
|
10527
|
+
if (alpServed && accountId && messages.some(isInitialize)) {
|
|
10156
10528
|
const answered = await (opts.hasAnswered ?? hasAnswered)(
|
|
10157
10529
|
accountId,
|
|
10158
10530
|
"referral"
|
|
@@ -10189,7 +10561,8 @@ async function handleMcpRequest(req, res, opts = {}) {
|
|
|
10189
10561
|
// store submissions (the sink is configured). The ingest endpoint is
|
|
10190
10562
|
// this deployment's own /api/alp/submit — one write path, both
|
|
10191
10563
|
// transports (docs/agent-learning-protocol.md).
|
|
10192
|
-
|
|
10564
|
+
profile,
|
|
10565
|
+
...alpServed ? {
|
|
10193
10566
|
alp: {
|
|
10194
10567
|
ingestUrl: `${getBaseUrl(req)}/api/alp/submit`,
|
|
10195
10568
|
transport: "http",
|
|
@@ -10237,6 +10610,7 @@ export {
|
|
|
10237
10610
|
parseMcpMessages,
|
|
10238
10611
|
prefersJsonResponse,
|
|
10239
10612
|
requestLogSampleRate,
|
|
10613
|
+
requestProfile,
|
|
10240
10614
|
summarizeRpc
|
|
10241
10615
|
};
|
|
10242
10616
|
//# sourceMappingURL=http.mjs.map
|