@runpod/mcp-server 4.6.0 → 4.8.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 +42 -0
- package/README.md +6 -1
- package/dist/{chunk-4GF3CMSH.mjs → chunk-5IFIMVI6.mjs} +2 -2
- package/dist/{chunk-4GF3CMSH.mjs.map → chunk-5IFIMVI6.mjs.map} +1 -1
- package/dist/chunk-6IETGSON.mjs +135 -0
- package/dist/chunk-6IETGSON.mjs.map +1 -0
- package/dist/http.cjs +449 -227
- package/dist/http.cjs.map +1 -1
- package/dist/http.d.cts +1 -2
- package/dist/http.d.ts +1 -2
- package/dist/http.mjs +434 -332
- package/dist/http.mjs.map +1 -1
- package/dist/specgen/profile.cjs +163 -0
- package/dist/specgen/profile.cjs.map +1 -0
- package/dist/specgen/profile.d.cts +22 -0
- package/dist/specgen/profile.d.ts +22 -0
- package/dist/specgen/profile.mjs +15 -0
- package/dist/specgen/profile.mjs.map +1 -0
- package/dist/stdio.cjs +450 -228
- package/dist/stdio.cjs.map +1 -1
- package/dist/stdio.mjs +451 -229
- package/dist/stdio.mjs.map +1 -1
- package/dist/{wizard-KKTBTVXE.mjs → wizard-NVV3UNOG.mjs} +2 -2
- package/package.json +10 -3
- /package/dist/{wizard-KKTBTVXE.mjs.map → wizard-NVV3UNOG.mjs.map} +0 -0
package/dist/stdio.cjs
CHANGED
|
@@ -47,7 +47,7 @@ function authedGraphqlBase(env) {
|
|
|
47
47
|
return pick(env.RUNPOD_AUTHED_GRAPHQL_URL, "https://api.runpod.io/graphql");
|
|
48
48
|
}
|
|
49
49
|
function hostedMcpBase(env) {
|
|
50
|
-
return pick(env.RUNPOD_MCP_URL, "https://mcp.
|
|
50
|
+
return pick(env.RUNPOD_MCP_URL, "https://mcp.runpod.io");
|
|
51
51
|
}
|
|
52
52
|
var init_hosts = __esm({
|
|
53
53
|
"src/_shared/hosts.ts"() {
|
|
@@ -1183,7 +1183,7 @@ var import_stdio = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
|
1183
1183
|
|
|
1184
1184
|
// src/server.ts
|
|
1185
1185
|
var SERVER_NAME = "Runpod API Server";
|
|
1186
|
-
var SERVER_VERSION = true ? "4.
|
|
1186
|
+
var SERVER_VERSION = true ? "4.8.0" : "dev";
|
|
1187
1187
|
|
|
1188
1188
|
// src/specgen/server.ts
|
|
1189
1189
|
var import_server3 = require("@modelcontextprotocol/sdk/server/index.js");
|
|
@@ -1579,7 +1579,7 @@ var generatedTools = [
|
|
|
1579
1579
|
description: "Environment variables as key-value pairs",
|
|
1580
1580
|
examples: [
|
|
1581
1581
|
{
|
|
1582
|
-
JUPYTER_PASSWORD: "
|
|
1582
|
+
JUPYTER_PASSWORD: "changeme"
|
|
1583
1583
|
}
|
|
1584
1584
|
]
|
|
1585
1585
|
},
|
|
@@ -1642,9 +1642,36 @@ var generatedTools = [
|
|
|
1642
1642
|
},
|
|
1643
1643
|
ClusterMounts: {
|
|
1644
1644
|
description: "Storage mounts for a cluster create: `persistent` or `network`, not both. Clusters cannot mount global volumes, so `global` is rejected.",
|
|
1645
|
+
"x-go-type": "BaseMounts",
|
|
1645
1646
|
allOf: [
|
|
1646
1647
|
{
|
|
1647
1648
|
$ref: "#/$defs/BaseMounts"
|
|
1649
|
+
},
|
|
1650
|
+
{
|
|
1651
|
+
type: "object",
|
|
1652
|
+
properties: {
|
|
1653
|
+
persistent: {
|
|
1654
|
+
type: "object",
|
|
1655
|
+
properties: {
|
|
1656
|
+
path: {
|
|
1657
|
+
type: "string",
|
|
1658
|
+
minLength: 1
|
|
1659
|
+
}
|
|
1660
|
+
}
|
|
1661
|
+
},
|
|
1662
|
+
network: {
|
|
1663
|
+
type: "array",
|
|
1664
|
+
items: {
|
|
1665
|
+
type: "object",
|
|
1666
|
+
properties: {
|
|
1667
|
+
path: {
|
|
1668
|
+
type: "string",
|
|
1669
|
+
minLength: 1
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
1672
|
+
}
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1648
1675
|
}
|
|
1649
1676
|
],
|
|
1650
1677
|
unevaluatedProperties: false
|
|
@@ -1782,7 +1809,7 @@ var generatedTools = [
|
|
|
1782
1809
|
type: "string",
|
|
1783
1810
|
description: "ECR resource ARN",
|
|
1784
1811
|
examples: [
|
|
1785
|
-
"arn:aws:ecr:us-east-2:
|
|
1812
|
+
"arn:aws:ecr:us-east-2:123456789012:repository/runpod/deployment"
|
|
1786
1813
|
]
|
|
1787
1814
|
},
|
|
1788
1815
|
name: {
|
|
@@ -1866,7 +1893,7 @@ var generatedTools = [
|
|
|
1866
1893
|
description: "Environment variables as key-value pairs",
|
|
1867
1894
|
examples: [
|
|
1868
1895
|
{
|
|
1869
|
-
JUPYTER_PASSWORD: "
|
|
1896
|
+
JUPYTER_PASSWORD: "changeme"
|
|
1870
1897
|
}
|
|
1871
1898
|
]
|
|
1872
1899
|
},
|
|
@@ -2117,7 +2144,7 @@ var generatedTools = [
|
|
|
2117
2144
|
type: "object",
|
|
2118
2145
|
required: ["volumeId"],
|
|
2119
2146
|
additionalProperties: false,
|
|
2120
|
-
description: "A volume mounted on every worker, always at `/runpod-volume`.
|
|
2147
|
+
description: "A volume mounted on every worker, always at `/runpod-volume`.",
|
|
2121
2148
|
properties: {
|
|
2122
2149
|
volumeId: {
|
|
2123
2150
|
type: "string",
|
|
@@ -2167,8 +2194,7 @@ var generatedTools = [
|
|
|
2167
2194
|
},
|
|
2168
2195
|
EndpointType: {
|
|
2169
2196
|
type: "string",
|
|
2170
|
-
description: "Request-routing semantics for a
|
|
2171
|
-
"x-enum-varnames": ["EndpointTypeQueue", "EndpointTypeLoadBalancer"],
|
|
2197
|
+
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.",
|
|
2172
2198
|
enum: ["QUEUE", "LOAD_BALANCER"]
|
|
2173
2199
|
},
|
|
2174
2200
|
EndpointWorkers: {
|
|
@@ -2277,7 +2303,6 @@ var generatedTools = [
|
|
|
2277
2303
|
type: "string",
|
|
2278
2304
|
minLength: 1,
|
|
2279
2305
|
maxLength: 191,
|
|
2280
|
-
pattern: "[^\\p{Z}\\t-\\r\x85]",
|
|
2281
2306
|
description: "Human-readable name, 1\u2013191 characters with at least one non-whitespace character. Leading and trailing whitespace is trimmed.",
|
|
2282
2307
|
examples: ["training-data"]
|
|
2283
2308
|
}
|
|
@@ -2424,7 +2449,7 @@ var generatedTools = [
|
|
|
2424
2449
|
description: "Environment variables as key-value pairs",
|
|
2425
2450
|
examples: [
|
|
2426
2451
|
{
|
|
2427
|
-
JUPYTER_PASSWORD: "
|
|
2452
|
+
JUPYTER_PASSWORD: "changeme"
|
|
2428
2453
|
}
|
|
2429
2454
|
]
|
|
2430
2455
|
},
|
|
@@ -2573,7 +2598,7 @@ var generatedTools = [
|
|
|
2573
2598
|
{
|
|
2574
2599
|
type: "object",
|
|
2575
2600
|
required: ["name"],
|
|
2576
|
-
description: "Request body for creating a pod. Exactly one of `gpu` or `cpu` must be set
|
|
2601
|
+
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.",
|
|
2577
2602
|
properties: {
|
|
2578
2603
|
name: {
|
|
2579
2604
|
type: "string",
|
|
@@ -2603,7 +2628,7 @@ var generatedTools = [
|
|
|
2603
2628
|
globalNetworking: {
|
|
2604
2629
|
type: "boolean",
|
|
2605
2630
|
default: false,
|
|
2606
|
-
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 (
|
|
2631
|
+
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.",
|
|
2607
2632
|
examples: [false]
|
|
2608
2633
|
},
|
|
2609
2634
|
gpu: {
|
|
@@ -2902,7 +2927,7 @@ var generatedTools = [
|
|
|
2902
2927
|
description: "Environment variables as key-value pairs",
|
|
2903
2928
|
examples: [
|
|
2904
2929
|
{
|
|
2905
|
-
JUPYTER_PASSWORD: "
|
|
2930
|
+
JUPYTER_PASSWORD: "changeme"
|
|
2906
2931
|
}
|
|
2907
2932
|
]
|
|
2908
2933
|
},
|
|
@@ -3363,7 +3388,7 @@ var generatedTools = [
|
|
|
3363
3388
|
items: {
|
|
3364
3389
|
$ref: "#/$defs/CatalogInclude"
|
|
3365
3390
|
},
|
|
3366
|
-
description: "Comma-separated optional expansions
|
|
3391
|
+
description: "Comma-separated optional expansions; see `CatalogInclude` for the supported values."
|
|
3367
3392
|
},
|
|
3368
3393
|
product: {
|
|
3369
3394
|
type: "array",
|
|
@@ -3383,7 +3408,7 @@ var generatedTools = [
|
|
|
3383
3408
|
$defs: {
|
|
3384
3409
|
CatalogInclude: {
|
|
3385
3410
|
type: "string",
|
|
3386
|
-
description: "Catalog include expansion.
|
|
3411
|
+
description: "Catalog include expansion. `AVAILABILITY` is the only supported value.",
|
|
3387
3412
|
enum: ["AVAILABILITY"]
|
|
3388
3413
|
},
|
|
3389
3414
|
CpuProduct: {
|
|
@@ -3609,7 +3634,7 @@ var generatedTools = [
|
|
|
3609
3634
|
items: {
|
|
3610
3635
|
$ref: "#/$defs/CatalogInclude"
|
|
3611
3636
|
},
|
|
3612
|
-
description: "Comma-separated optional expansions
|
|
3637
|
+
description: "Comma-separated optional expansions; see `CatalogInclude` for the supported values."
|
|
3613
3638
|
},
|
|
3614
3639
|
product: {
|
|
3615
3640
|
type: "array",
|
|
@@ -3655,7 +3680,7 @@ var generatedTools = [
|
|
|
3655
3680
|
$defs: {
|
|
3656
3681
|
CatalogInclude: {
|
|
3657
3682
|
type: "string",
|
|
3658
|
-
description: "Catalog include expansion.
|
|
3683
|
+
description: "Catalog include expansion. `AVAILABILITY` is the only supported value.",
|
|
3659
3684
|
enum: ["AVAILABILITY"]
|
|
3660
3685
|
},
|
|
3661
3686
|
GpuCloudFilter: {
|
|
@@ -3722,6 +3747,37 @@ var generatedTools = [
|
|
|
3722
3747
|
properties: {}
|
|
3723
3748
|
}
|
|
3724
3749
|
},
|
|
3750
|
+
{
|
|
3751
|
+
name: "get-organization-user",
|
|
3752
|
+
title: "Get organization user",
|
|
3753
|
+
operationId: "getOrganizationUser",
|
|
3754
|
+
description: "Get an organization member. Returns one member of the authenticated caller's organization by user ID, with the role they hold. Any member can read it. A user who is not a member, including one from another organization, returns 404. Returns 404 when the caller does not belong to an organization, or 403 when organizations are unavailable to the caller.",
|
|
3755
|
+
method: "GET",
|
|
3756
|
+
path: "/v2/organization/users/{id}",
|
|
3757
|
+
params: [
|
|
3758
|
+
{
|
|
3759
|
+
name: "id",
|
|
3760
|
+
location: "path"
|
|
3761
|
+
}
|
|
3762
|
+
],
|
|
3763
|
+
hasBody: false,
|
|
3764
|
+
annotations: {
|
|
3765
|
+
readOnlyHint: true,
|
|
3766
|
+
destructiveHint: false,
|
|
3767
|
+
idempotentHint: true,
|
|
3768
|
+
openWorldHint: true
|
|
3769
|
+
},
|
|
3770
|
+
inputSchema: {
|
|
3771
|
+
type: "object",
|
|
3772
|
+
properties: {
|
|
3773
|
+
id: {
|
|
3774
|
+
type: "string",
|
|
3775
|
+
description: "User identifier"
|
|
3776
|
+
}
|
|
3777
|
+
},
|
|
3778
|
+
required: ["id"]
|
|
3779
|
+
}
|
|
3780
|
+
},
|
|
3725
3781
|
{
|
|
3726
3782
|
name: "get-pod",
|
|
3727
3783
|
title: "Get Pod",
|
|
@@ -3864,6 +3920,99 @@ var generatedTools = [
|
|
|
3864
3920
|
required: ["id"]
|
|
3865
3921
|
}
|
|
3866
3922
|
},
|
|
3923
|
+
{
|
|
3924
|
+
name: "list-audit-logs",
|
|
3925
|
+
title: "List audit logs",
|
|
3926
|
+
operationId: "listAuditLogs",
|
|
3927
|
+
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.",
|
|
3928
|
+
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.",
|
|
3929
|
+
method: "GET",
|
|
3930
|
+
path: "/v2/audit-logs",
|
|
3931
|
+
params: [
|
|
3932
|
+
{
|
|
3933
|
+
name: "actorIds",
|
|
3934
|
+
location: "query",
|
|
3935
|
+
explode: false
|
|
3936
|
+
},
|
|
3937
|
+
{
|
|
3938
|
+
name: "actions",
|
|
3939
|
+
location: "query",
|
|
3940
|
+
explode: false
|
|
3941
|
+
},
|
|
3942
|
+
{
|
|
3943
|
+
name: "startTime",
|
|
3944
|
+
location: "query"
|
|
3945
|
+
},
|
|
3946
|
+
{
|
|
3947
|
+
name: "endTime",
|
|
3948
|
+
location: "query"
|
|
3949
|
+
},
|
|
3950
|
+
{
|
|
3951
|
+
name: "search",
|
|
3952
|
+
location: "query"
|
|
3953
|
+
},
|
|
3954
|
+
{
|
|
3955
|
+
name: "cursor",
|
|
3956
|
+
location: "query"
|
|
3957
|
+
},
|
|
3958
|
+
{
|
|
3959
|
+
name: "limit",
|
|
3960
|
+
location: "query"
|
|
3961
|
+
}
|
|
3962
|
+
],
|
|
3963
|
+
hasBody: false,
|
|
3964
|
+
annotations: {
|
|
3965
|
+
readOnlyHint: true,
|
|
3966
|
+
destructiveHint: false,
|
|
3967
|
+
idempotentHint: true,
|
|
3968
|
+
openWorldHint: true
|
|
3969
|
+
},
|
|
3970
|
+
inputSchema: {
|
|
3971
|
+
type: "object",
|
|
3972
|
+
properties: {
|
|
3973
|
+
actorIds: {
|
|
3974
|
+
type: "array",
|
|
3975
|
+
items: {
|
|
3976
|
+
type: "string"
|
|
3977
|
+
},
|
|
3978
|
+
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."
|
|
3979
|
+
},
|
|
3980
|
+
actions: {
|
|
3981
|
+
type: "array",
|
|
3982
|
+
items: {
|
|
3983
|
+
type: "string"
|
|
3984
|
+
},
|
|
3985
|
+
description: "Only return entries whose `action` is one of these names, matched exactly as recorded. Comma-separated."
|
|
3986
|
+
},
|
|
3987
|
+
startTime: {
|
|
3988
|
+
type: "string",
|
|
3989
|
+
format: "date-time",
|
|
3990
|
+
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."
|
|
3991
|
+
},
|
|
3992
|
+
endTime: {
|
|
3993
|
+
type: "string",
|
|
3994
|
+
format: "date-time",
|
|
3995
|
+
description: "Latest instant to include, inclusive (RFC 3339). Must be after `startTime` when both are given; 400 otherwise."
|
|
3996
|
+
},
|
|
3997
|
+
search: {
|
|
3998
|
+
type: "string",
|
|
3999
|
+
minLength: 1,
|
|
4000
|
+
description: "Case-insensitive substring match against `email`, `resourceType`, `resourceId`, `action` and `value`; `actorId` is not searched. Surrounding whitespace is ignored."
|
|
4001
|
+
},
|
|
4002
|
+
cursor: {
|
|
4003
|
+
type: "string",
|
|
4004
|
+
minLength: 1,
|
|
4005
|
+
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."
|
|
4006
|
+
},
|
|
4007
|
+
limit: {
|
|
4008
|
+
type: "integer",
|
|
4009
|
+
minimum: 1,
|
|
4010
|
+
maximum: 200,
|
|
4011
|
+
description: "Page size, 1\u2013200. Defaults to 200 when omitted."
|
|
4012
|
+
}
|
|
4013
|
+
}
|
|
4014
|
+
}
|
|
4015
|
+
},
|
|
3867
4016
|
{
|
|
3868
4017
|
name: "list-billing",
|
|
3869
4018
|
title: "List billing",
|
|
@@ -3924,13 +4073,6 @@ var generatedTools = [
|
|
|
3924
4073
|
BillingBucketSize: {
|
|
3925
4074
|
type: "string",
|
|
3926
4075
|
enum: ["hour", "day", "week", "month", "year"],
|
|
3927
|
-
"x-enum-varnames": [
|
|
3928
|
-
"BillingBucketSizeHour",
|
|
3929
|
-
"BillingBucketSizeDay",
|
|
3930
|
-
"BillingBucketSizeWeek",
|
|
3931
|
-
"BillingBucketSizeMonth",
|
|
3932
|
-
"BillingBucketSizeYear"
|
|
3933
|
-
],
|
|
3934
4076
|
default: "day",
|
|
3935
4077
|
description: "Length of each billing time bucket.",
|
|
3936
4078
|
examples: ["day"]
|
|
@@ -4006,13 +4148,6 @@ var generatedTools = [
|
|
|
4006
4148
|
BillingBucketSize: {
|
|
4007
4149
|
type: "string",
|
|
4008
4150
|
enum: ["hour", "day", "week", "month", "year"],
|
|
4009
|
-
"x-enum-varnames": [
|
|
4010
|
-
"BillingBucketSizeHour",
|
|
4011
|
-
"BillingBucketSizeDay",
|
|
4012
|
-
"BillingBucketSizeWeek",
|
|
4013
|
-
"BillingBucketSizeMonth",
|
|
4014
|
-
"BillingBucketSizeYear"
|
|
4015
|
-
],
|
|
4016
4151
|
default: "day",
|
|
4017
4152
|
description: "Length of each billing time bucket.",
|
|
4018
4153
|
examples: ["day"]
|
|
@@ -4131,7 +4266,7 @@ var generatedTools = [
|
|
|
4131
4266
|
items: {
|
|
4132
4267
|
$ref: "#/$defs/CatalogInclude"
|
|
4133
4268
|
},
|
|
4134
|
-
description: "Comma-separated optional expansions
|
|
4269
|
+
description: "Comma-separated optional expansions; see `CatalogInclude` for the supported values."
|
|
4135
4270
|
},
|
|
4136
4271
|
product: {
|
|
4137
4272
|
type: "array",
|
|
@@ -4150,7 +4285,7 @@ var generatedTools = [
|
|
|
4150
4285
|
$defs: {
|
|
4151
4286
|
CatalogInclude: {
|
|
4152
4287
|
type: "string",
|
|
4153
|
-
description: "Catalog include expansion.
|
|
4288
|
+
description: "Catalog include expansion. `AVAILABILITY` is the only supported value.",
|
|
4154
4289
|
enum: ["AVAILABILITY"]
|
|
4155
4290
|
},
|
|
4156
4291
|
CpuProduct: {
|
|
@@ -4369,13 +4504,6 @@ var generatedTools = [
|
|
|
4369
4504
|
BillingBucketSize: {
|
|
4370
4505
|
type: "string",
|
|
4371
4506
|
enum: ["hour", "day", "week", "month", "year"],
|
|
4372
|
-
"x-enum-varnames": [
|
|
4373
|
-
"BillingBucketSizeHour",
|
|
4374
|
-
"BillingBucketSizeDay",
|
|
4375
|
-
"BillingBucketSizeWeek",
|
|
4376
|
-
"BillingBucketSizeMonth",
|
|
4377
|
-
"BillingBucketSizeYear"
|
|
4378
|
-
],
|
|
4379
4507
|
default: "day",
|
|
4380
4508
|
description: "Length of each billing time bucket.",
|
|
4381
4509
|
examples: ["day"]
|
|
@@ -4612,7 +4740,7 @@ var generatedTools = [
|
|
|
4612
4740
|
items: {
|
|
4613
4741
|
$ref: "#/$defs/CatalogInclude"
|
|
4614
4742
|
},
|
|
4615
|
-
description: "Comma-separated optional expansions
|
|
4743
|
+
description: "Comma-separated optional expansions; see `CatalogInclude` for the supported values."
|
|
4616
4744
|
},
|
|
4617
4745
|
product: {
|
|
4618
4746
|
type: "array",
|
|
@@ -4657,7 +4785,7 @@ var generatedTools = [
|
|
|
4657
4785
|
$defs: {
|
|
4658
4786
|
CatalogInclude: {
|
|
4659
4787
|
type: "string",
|
|
4660
|
-
description: "Catalog include expansion.
|
|
4788
|
+
description: "Catalog include expansion. `AVAILABILITY` is the only supported value.",
|
|
4661
4789
|
enum: ["AVAILABILITY"]
|
|
4662
4790
|
},
|
|
4663
4791
|
GpuCloudFilter: {
|
|
@@ -4741,13 +4869,6 @@ var generatedTools = [
|
|
|
4741
4869
|
BillingBucketSize: {
|
|
4742
4870
|
type: "string",
|
|
4743
4871
|
enum: ["hour", "day", "week", "month", "year"],
|
|
4744
|
-
"x-enum-varnames": [
|
|
4745
|
-
"BillingBucketSizeHour",
|
|
4746
|
-
"BillingBucketSizeDay",
|
|
4747
|
-
"BillingBucketSizeWeek",
|
|
4748
|
-
"BillingBucketSizeMonth",
|
|
4749
|
-
"BillingBucketSizeYear"
|
|
4750
|
-
],
|
|
4751
4872
|
default: "day",
|
|
4752
4873
|
description: "Length of each billing time bucket.",
|
|
4753
4874
|
examples: ["day"]
|
|
@@ -4796,6 +4917,26 @@ var generatedTools = [
|
|
|
4796
4917
|
}
|
|
4797
4918
|
}
|
|
4798
4919
|
},
|
|
4920
|
+
{
|
|
4921
|
+
name: "list-organization-users",
|
|
4922
|
+
title: "List organization users",
|
|
4923
|
+
operationId: "listOrganizationUsers",
|
|
4924
|
+
description: "List organization members. Returns every member of the authenticated caller's organization with the role each holds. Any member can read the roster. The list is complete and takes no pagination parameters. Returns 404 when the caller does not belong to an organization, or 403 when organizations are unavailable to the caller.",
|
|
4925
|
+
method: "GET",
|
|
4926
|
+
path: "/v2/organization/users",
|
|
4927
|
+
params: [],
|
|
4928
|
+
hasBody: false,
|
|
4929
|
+
annotations: {
|
|
4930
|
+
readOnlyHint: true,
|
|
4931
|
+
destructiveHint: false,
|
|
4932
|
+
idempotentHint: true,
|
|
4933
|
+
openWorldHint: true
|
|
4934
|
+
},
|
|
4935
|
+
inputSchema: {
|
|
4936
|
+
type: "object",
|
|
4937
|
+
properties: {}
|
|
4938
|
+
}
|
|
4939
|
+
},
|
|
4799
4940
|
{
|
|
4800
4941
|
name: "list-pod-billing",
|
|
4801
4942
|
title: "List Pod billing",
|
|
@@ -4864,13 +5005,6 @@ var generatedTools = [
|
|
|
4864
5005
|
BillingBucketSize: {
|
|
4865
5006
|
type: "string",
|
|
4866
5007
|
enum: ["hour", "day", "week", "month", "year"],
|
|
4867
|
-
"x-enum-varnames": [
|
|
4868
|
-
"BillingBucketSizeHour",
|
|
4869
|
-
"BillingBucketSizeDay",
|
|
4870
|
-
"BillingBucketSizeWeek",
|
|
4871
|
-
"BillingBucketSizeMonth",
|
|
4872
|
-
"BillingBucketSizeYear"
|
|
4873
|
-
],
|
|
4874
5008
|
default: "day",
|
|
4875
5009
|
description: "Length of each billing time bucket.",
|
|
4876
5010
|
examples: ["day"]
|
|
@@ -5079,13 +5213,6 @@ var generatedTools = [
|
|
|
5079
5213
|
BillingBucketSize: {
|
|
5080
5214
|
type: "string",
|
|
5081
5215
|
enum: ["hour", "day", "week", "month", "year"],
|
|
5082
|
-
"x-enum-varnames": [
|
|
5083
|
-
"BillingBucketSizeHour",
|
|
5084
|
-
"BillingBucketSizeDay",
|
|
5085
|
-
"BillingBucketSizeWeek",
|
|
5086
|
-
"BillingBucketSizeMonth",
|
|
5087
|
-
"BillingBucketSizeYear"
|
|
5088
|
-
],
|
|
5089
5216
|
default: "day",
|
|
5090
5217
|
description: "Length of each billing time bucket.",
|
|
5091
5218
|
examples: ["day"]
|
|
@@ -5304,7 +5431,7 @@ var generatedTools = [
|
|
|
5304
5431
|
description: "Environment variables as key-value pairs",
|
|
5305
5432
|
examples: [
|
|
5306
5433
|
{
|
|
5307
|
-
JUPYTER_PASSWORD: "
|
|
5434
|
+
JUPYTER_PASSWORD: "changeme"
|
|
5308
5435
|
}
|
|
5309
5436
|
]
|
|
5310
5437
|
},
|
|
@@ -5401,7 +5528,7 @@ var generatedTools = [
|
|
|
5401
5528
|
type: "object",
|
|
5402
5529
|
required: ["volumeId"],
|
|
5403
5530
|
additionalProperties: false,
|
|
5404
|
-
description: "A volume mounted on every worker, always at `/runpod-volume`.
|
|
5531
|
+
description: "A volume mounted on every worker, always at `/runpod-volume`.",
|
|
5405
5532
|
properties: {
|
|
5406
5533
|
volumeId: {
|
|
5407
5534
|
type: "string",
|
|
@@ -5661,7 +5788,6 @@ var generatedTools = [
|
|
|
5661
5788
|
type: "string",
|
|
5662
5789
|
minLength: 1,
|
|
5663
5790
|
maxLength: 191,
|
|
5664
|
-
pattern: "[^\\p{Z}\\t-\\r\x85]",
|
|
5665
5791
|
description: "New human-readable name, 1\u2013191 characters with at least one non-whitespace character. Leading and trailing whitespace is trimmed.",
|
|
5666
5792
|
examples: ["renamed-volume"]
|
|
5667
5793
|
}
|
|
@@ -5807,7 +5933,7 @@ var generatedTools = [
|
|
|
5807
5933
|
description: "Environment variables as key-value pairs",
|
|
5808
5934
|
examples: [
|
|
5809
5935
|
{
|
|
5810
|
-
JUPYTER_PASSWORD: "
|
|
5936
|
+
JUPYTER_PASSWORD: "changeme"
|
|
5811
5937
|
}
|
|
5812
5938
|
]
|
|
5813
5939
|
},
|
|
@@ -5945,7 +6071,7 @@ var generatedTools = [
|
|
|
5945
6071
|
properties: {
|
|
5946
6072
|
globalNetworking: {
|
|
5947
6073
|
type: "boolean",
|
|
5948
|
-
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
|
|
6074
|
+
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."
|
|
5949
6075
|
},
|
|
5950
6076
|
locked: {
|
|
5951
6077
|
type: "boolean",
|
|
@@ -6092,7 +6218,7 @@ var generatedTools = [
|
|
|
6092
6218
|
hasBody: true,
|
|
6093
6219
|
annotations: {
|
|
6094
6220
|
readOnlyHint: false,
|
|
6095
|
-
destructiveHint:
|
|
6221
|
+
destructiveHint: true,
|
|
6096
6222
|
idempotentHint: true,
|
|
6097
6223
|
openWorldHint: true
|
|
6098
6224
|
},
|
|
@@ -6154,7 +6280,7 @@ var generatedTools = [
|
|
|
6154
6280
|
description: "Environment variables as key-value pairs",
|
|
6155
6281
|
examples: [
|
|
6156
6282
|
{
|
|
6157
|
-
JUPYTER_PASSWORD: "
|
|
6283
|
+
JUPYTER_PASSWORD: "changeme"
|
|
6158
6284
|
}
|
|
6159
6285
|
]
|
|
6160
6286
|
},
|
|
@@ -6274,8 +6400,188 @@ var generatedTools = [
|
|
|
6274
6400
|
}
|
|
6275
6401
|
];
|
|
6276
6402
|
|
|
6403
|
+
// src/specgen/tools/annotations.ts
|
|
6404
|
+
var readOnly = {
|
|
6405
|
+
readOnlyHint: true,
|
|
6406
|
+
destructiveHint: false,
|
|
6407
|
+
idempotentHint: true,
|
|
6408
|
+
openWorldHint: true
|
|
6409
|
+
};
|
|
6410
|
+
var bundledRead = {
|
|
6411
|
+
readOnlyHint: true,
|
|
6412
|
+
destructiveHint: false,
|
|
6413
|
+
idempotentHint: true,
|
|
6414
|
+
openWorldHint: false
|
|
6415
|
+
};
|
|
6416
|
+
var write = {
|
|
6417
|
+
readOnlyHint: false,
|
|
6418
|
+
destructiveHint: false,
|
|
6419
|
+
idempotentHint: false,
|
|
6420
|
+
openWorldHint: true
|
|
6421
|
+
};
|
|
6422
|
+
var idempotentWrite = {
|
|
6423
|
+
readOnlyHint: false,
|
|
6424
|
+
destructiveHint: false,
|
|
6425
|
+
idempotentHint: true,
|
|
6426
|
+
openWorldHint: true
|
|
6427
|
+
};
|
|
6428
|
+
var destructive = {
|
|
6429
|
+
readOnlyHint: false,
|
|
6430
|
+
destructiveHint: true,
|
|
6431
|
+
idempotentHint: true,
|
|
6432
|
+
openWorldHint: true
|
|
6433
|
+
};
|
|
6434
|
+
var destructiveWrite = {
|
|
6435
|
+
readOnlyHint: false,
|
|
6436
|
+
destructiveHint: true,
|
|
6437
|
+
idempotentHint: false,
|
|
6438
|
+
openWorldHint: true
|
|
6439
|
+
};
|
|
6440
|
+
|
|
6441
|
+
// src/specgen/clients/http-error.ts
|
|
6442
|
+
var HttpError = class extends Error {
|
|
6443
|
+
constructor(message, status, payload = void 0) {
|
|
6444
|
+
super(message);
|
|
6445
|
+
this.status = status;
|
|
6446
|
+
this.payload = payload;
|
|
6447
|
+
this.name = "HttpError";
|
|
6448
|
+
}
|
|
6449
|
+
};
|
|
6450
|
+
function missingKeyError() {
|
|
6451
|
+
return new HttpError(
|
|
6452
|
+
"No Runpod API key: the request carried no usable credential.",
|
|
6453
|
+
401
|
|
6454
|
+
);
|
|
6455
|
+
}
|
|
6456
|
+
|
|
6457
|
+
// src/specgen/tools/util.ts
|
|
6458
|
+
function ok(payload) {
|
|
6459
|
+
return { ok: true, status: 200, payload };
|
|
6460
|
+
}
|
|
6461
|
+
function badRequest(message) {
|
|
6462
|
+
return { ok: false, status: 400, payload: { error: message } };
|
|
6463
|
+
}
|
|
6464
|
+
function isTimeout(error) {
|
|
6465
|
+
if (!(error instanceof Error)) return false;
|
|
6466
|
+
if (error.name === "TimeoutError" || error.name === "AbortError") return true;
|
|
6467
|
+
const cause = error.cause;
|
|
6468
|
+
return cause instanceof Error && (cause.name === "TimeoutError" || cause.name === "AbortError");
|
|
6469
|
+
}
|
|
6470
|
+
var UNREACHED_CODES = /* @__PURE__ */ new Set([
|
|
6471
|
+
"ENOTFOUND",
|
|
6472
|
+
"EAI_AGAIN",
|
|
6473
|
+
"ECONNREFUSED",
|
|
6474
|
+
"EHOSTUNREACH",
|
|
6475
|
+
"ENETUNREACH",
|
|
6476
|
+
"UND_ERR_CONNECT_TIMEOUT"
|
|
6477
|
+
]);
|
|
6478
|
+
var TLS_CODE = /^(?:CERT_|ERR_TLS_|UNABLE_TO_|DEPTH_ZERO_|SELF_SIGNED_)/;
|
|
6479
|
+
function causeCode(cause) {
|
|
6480
|
+
const code = cause?.code;
|
|
6481
|
+
if (typeof code === "string") return code;
|
|
6482
|
+
const inner = cause instanceof AggregateError ? cause.errors[0] : void 0;
|
|
6483
|
+
const innerCode = inner?.code;
|
|
6484
|
+
return typeof innerCode === "string" ? innerCode : void 0;
|
|
6485
|
+
}
|
|
6486
|
+
function networkFailureResult(error) {
|
|
6487
|
+
if (!(error instanceof TypeError)) return void 0;
|
|
6488
|
+
const afterHeaders = error.message === "terminated";
|
|
6489
|
+
if (!afterHeaders && error.message !== "fetch failed") return void 0;
|
|
6490
|
+
const code = causeCode(error.cause);
|
|
6491
|
+
if (!code) return void 0;
|
|
6492
|
+
const unreached = !afterHeaders && (UNREACHED_CODES.has(code) || TLS_CODE.test(code));
|
|
6493
|
+
return {
|
|
6494
|
+
ok: false,
|
|
6495
|
+
status: unreached ? 503 : 502,
|
|
6496
|
+
requestDelivery: unreached ? "not_sent" : "uncertain",
|
|
6497
|
+
payload: unreached ? {
|
|
6498
|
+
error: "Could not reach the Runpod API.",
|
|
6499
|
+
cause: code,
|
|
6500
|
+
hint: "The request never reached Runpod, so retrying the same call is safe: retry it once. If it fails again, the network, DNS, proxy or TLS setup on this machine is the likely cause; check https://uptime.runpod.io and report it rather than retrying further."
|
|
6501
|
+
} : {
|
|
6502
|
+
error: "The connection to the Runpod API dropped before the full response arrived.",
|
|
6503
|
+
cause: code,
|
|
6504
|
+
hint: "The request may have been applied. A read can be retried once. For a create, update, delete or job submission, check with the matching get- or list- tool whether it took effect before calling again; retrying blindly can create a duplicate billable resource."
|
|
6505
|
+
}
|
|
6506
|
+
};
|
|
6507
|
+
}
|
|
6508
|
+
async function runTool(body) {
|
|
6509
|
+
try {
|
|
6510
|
+
return await body();
|
|
6511
|
+
} catch (error) {
|
|
6512
|
+
if (error instanceof HttpError) {
|
|
6513
|
+
return {
|
|
6514
|
+
ok: false,
|
|
6515
|
+
status: error.status,
|
|
6516
|
+
payload: { error: error.message, detail: error.payload }
|
|
6517
|
+
};
|
|
6518
|
+
}
|
|
6519
|
+
if (isTimeout(error)) {
|
|
6520
|
+
return {
|
|
6521
|
+
ok: false,
|
|
6522
|
+
status: 504,
|
|
6523
|
+
requestDelivery: "uncertain",
|
|
6524
|
+
payload: {
|
|
6525
|
+
error: "The Runpod API did not respond before the request deadline.",
|
|
6526
|
+
hint: "Transient upstream stall: retry the same call once; if it persists, check https://uptime.runpod.io."
|
|
6527
|
+
}
|
|
6528
|
+
};
|
|
6529
|
+
}
|
|
6530
|
+
const network = networkFailureResult(error);
|
|
6531
|
+
if (network) return network;
|
|
6532
|
+
throw error;
|
|
6533
|
+
}
|
|
6534
|
+
}
|
|
6535
|
+
|
|
6536
|
+
// src/specgen/tools/pod-transitions.ts
|
|
6537
|
+
var podAction = generatedTools.find((tool) => tool.name === "pod-action");
|
|
6538
|
+
if (!podAction)
|
|
6539
|
+
throw new Error("pod-action is missing from the generated tools");
|
|
6540
|
+
var POD_ID = {
|
|
6541
|
+
type: "object",
|
|
6542
|
+
properties: { id: { type: "string", description: "ID of the Pod" } },
|
|
6543
|
+
required: ["id"],
|
|
6544
|
+
additionalProperties: false
|
|
6545
|
+
};
|
|
6546
|
+
function transition(action, title, description, annotations) {
|
|
6547
|
+
return {
|
|
6548
|
+
name: `${action}-pod`,
|
|
6549
|
+
title,
|
|
6550
|
+
description,
|
|
6551
|
+
inputSchema: POD_ID,
|
|
6552
|
+
annotations,
|
|
6553
|
+
handler: (ctx, args) => runTool(
|
|
6554
|
+
() => dispatchGeneratedTool(ctx.sdk, podAction, {
|
|
6555
|
+
id: args.id,
|
|
6556
|
+
body: { action }
|
|
6557
|
+
})
|
|
6558
|
+
)
|
|
6559
|
+
};
|
|
6560
|
+
}
|
|
6561
|
+
var podTransitionTools = [
|
|
6562
|
+
transition(
|
|
6563
|
+
"start",
|
|
6564
|
+
"Start Pod",
|
|
6565
|
+
"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.",
|
|
6566
|
+
write
|
|
6567
|
+
),
|
|
6568
|
+
transition(
|
|
6569
|
+
"stop",
|
|
6570
|
+
"Stop Pod",
|
|
6571
|
+
"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.",
|
|
6572
|
+
destructiveWrite
|
|
6573
|
+
),
|
|
6574
|
+
transition(
|
|
6575
|
+
"restart",
|
|
6576
|
+
"Restart Pod",
|
|
6577
|
+
"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.",
|
|
6578
|
+
destructiveWrite
|
|
6579
|
+
)
|
|
6580
|
+
];
|
|
6581
|
+
|
|
6277
6582
|
// src/specgen/profile.ts
|
|
6278
6583
|
var IN = { include: true };
|
|
6584
|
+
var CREDENTIAL_MANAGEMENT = "Manages stored credentials; OpenAI restricts plugins that handle access credentials, so the directory leaves the whole credential family out.";
|
|
6279
6585
|
var CREDENTIAL_INPUT = "Takes a secret or password as input; directories forbid collecting credentials.";
|
|
6280
6586
|
var ALP = "Collects conversation-derived data beyond the task; the directory profile never serves it.";
|
|
6281
6587
|
var DIRECTORY_TOOLS = {
|
|
@@ -6292,8 +6598,6 @@ var DIRECTORY_TOOLS = {
|
|
|
6292
6598
|
"delete-global-volume": IN,
|
|
6293
6599
|
"delete-network-volume": IN,
|
|
6294
6600
|
"delete-pod": IN,
|
|
6295
|
-
"delete-registry": IN,
|
|
6296
|
-
"delete-secret": IN,
|
|
6297
6601
|
"delete-template": IN,
|
|
6298
6602
|
"deploy-hub-repo": IN,
|
|
6299
6603
|
"endpoint-health": IN,
|
|
@@ -6308,11 +6612,11 @@ var DIRECTORY_TOOLS = {
|
|
|
6308
6612
|
"get-job-status": IN,
|
|
6309
6613
|
"get-network-volume": IN,
|
|
6310
6614
|
"get-organization": IN,
|
|
6615
|
+
"get-organization-user": IN,
|
|
6311
6616
|
"get-pod": IN,
|
|
6312
|
-
"get-registry": IN,
|
|
6313
|
-
"get-secret": IN,
|
|
6314
6617
|
"get-ssh-keys": IN,
|
|
6315
6618
|
"get-template": IN,
|
|
6619
|
+
"list-audit-logs": IN,
|
|
6316
6620
|
"list-billing": IN,
|
|
6317
6621
|
"list-cluster-billing": IN,
|
|
6318
6622
|
"list-cluster-pods": IN,
|
|
@@ -6330,16 +6634,14 @@ var DIRECTORY_TOOLS = {
|
|
|
6330
6634
|
"list-hub-repos": IN,
|
|
6331
6635
|
"list-network-volume-billing": IN,
|
|
6332
6636
|
"list-network-volumes": IN,
|
|
6637
|
+
"list-organization-users": IN,
|
|
6333
6638
|
"list-pod-billing": IN,
|
|
6334
6639
|
"list-pods": IN,
|
|
6335
6640
|
"list-public-endpoints": IN,
|
|
6336
6641
|
"list-public-templates": IN,
|
|
6337
|
-
"list-registries": IN,
|
|
6338
|
-
"list-secrets": IN,
|
|
6339
6642
|
"list-serverless-billing": IN,
|
|
6340
6643
|
"list-templates": IN,
|
|
6341
6644
|
"lookup-concept": IN,
|
|
6342
|
-
"pod-action": IN,
|
|
6343
6645
|
"purge-endpoint-queue": IN,
|
|
6344
6646
|
"retry-job": IN,
|
|
6345
6647
|
"revoke-delegation": IN,
|
|
@@ -6358,6 +6660,13 @@ var DIRECTORY_TOOLS = {
|
|
|
6358
6660
|
"update-template": IN,
|
|
6359
6661
|
"run-endpoint": { include: true, omitInputs: ["s3Config"] },
|
|
6360
6662
|
"runsync-endpoint": { include: true, omitInputs: ["s3Config"] },
|
|
6663
|
+
"pod-action": {
|
|
6664
|
+
include: false,
|
|
6665
|
+
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)."
|
|
6666
|
+
},
|
|
6667
|
+
"start-pod": IN,
|
|
6668
|
+
"stop-pod": IN,
|
|
6669
|
+
"restart-pod": IN,
|
|
6361
6670
|
"list-guides": {
|
|
6362
6671
|
include: false,
|
|
6363
6672
|
reason: "Serves playbooks that instruct the model how to behave."
|
|
@@ -6371,6 +6680,12 @@ var DIRECTORY_TOOLS = {
|
|
|
6371
6680
|
reason: "Fetches schemas the directory already lists in full; directories reject schema fetching."
|
|
6372
6681
|
},
|
|
6373
6682
|
"create-secret": { include: false, reason: CREDENTIAL_INPUT },
|
|
6683
|
+
"get-secret": { include: false, reason: CREDENTIAL_MANAGEMENT },
|
|
6684
|
+
"list-secrets": { include: false, reason: CREDENTIAL_MANAGEMENT },
|
|
6685
|
+
"delete-secret": { include: false, reason: CREDENTIAL_MANAGEMENT },
|
|
6686
|
+
"get-registry": { include: false, reason: CREDENTIAL_MANAGEMENT },
|
|
6687
|
+
"list-registries": { include: false, reason: CREDENTIAL_MANAGEMENT },
|
|
6688
|
+
"delete-registry": { include: false, reason: CREDENTIAL_MANAGEMENT },
|
|
6374
6689
|
"update-secret": { include: false, reason: CREDENTIAL_INPUT },
|
|
6375
6690
|
"create-registry": { include: false, reason: CREDENTIAL_INPUT },
|
|
6376
6691
|
report_feedback: { include: false, reason: ALP },
|
|
@@ -6485,137 +6800,6 @@ function capList(items, options, extra) {
|
|
|
6485
6800
|
};
|
|
6486
6801
|
}
|
|
6487
6802
|
|
|
6488
|
-
// src/specgen/clients/http-error.ts
|
|
6489
|
-
var HttpError = class extends Error {
|
|
6490
|
-
constructor(message, status, payload = void 0) {
|
|
6491
|
-
super(message);
|
|
6492
|
-
this.status = status;
|
|
6493
|
-
this.payload = payload;
|
|
6494
|
-
this.name = "HttpError";
|
|
6495
|
-
}
|
|
6496
|
-
};
|
|
6497
|
-
function missingKeyError() {
|
|
6498
|
-
return new HttpError(
|
|
6499
|
-
"No Runpod API key: the request carried no usable credential.",
|
|
6500
|
-
401
|
|
6501
|
-
);
|
|
6502
|
-
}
|
|
6503
|
-
|
|
6504
|
-
// src/specgen/tools/util.ts
|
|
6505
|
-
function ok(payload) {
|
|
6506
|
-
return { ok: true, status: 200, payload };
|
|
6507
|
-
}
|
|
6508
|
-
function badRequest(message) {
|
|
6509
|
-
return { ok: false, status: 400, payload: { error: message } };
|
|
6510
|
-
}
|
|
6511
|
-
function isTimeout(error) {
|
|
6512
|
-
if (!(error instanceof Error)) return false;
|
|
6513
|
-
if (error.name === "TimeoutError" || error.name === "AbortError") return true;
|
|
6514
|
-
const cause = error.cause;
|
|
6515
|
-
return cause instanceof Error && (cause.name === "TimeoutError" || cause.name === "AbortError");
|
|
6516
|
-
}
|
|
6517
|
-
var UNREACHED_CODES = /* @__PURE__ */ new Set([
|
|
6518
|
-
"ENOTFOUND",
|
|
6519
|
-
"EAI_AGAIN",
|
|
6520
|
-
"ECONNREFUSED",
|
|
6521
|
-
"EHOSTUNREACH",
|
|
6522
|
-
"ENETUNREACH",
|
|
6523
|
-
"UND_ERR_CONNECT_TIMEOUT"
|
|
6524
|
-
]);
|
|
6525
|
-
var TLS_CODE = /^(?:CERT_|ERR_TLS_|UNABLE_TO_|DEPTH_ZERO_|SELF_SIGNED_)/;
|
|
6526
|
-
function causeCode(cause) {
|
|
6527
|
-
const code = cause?.code;
|
|
6528
|
-
if (typeof code === "string") return code;
|
|
6529
|
-
const inner = cause instanceof AggregateError ? cause.errors[0] : void 0;
|
|
6530
|
-
const innerCode = inner?.code;
|
|
6531
|
-
return typeof innerCode === "string" ? innerCode : void 0;
|
|
6532
|
-
}
|
|
6533
|
-
function networkFailureResult(error) {
|
|
6534
|
-
if (!(error instanceof TypeError)) return void 0;
|
|
6535
|
-
const afterHeaders = error.message === "terminated";
|
|
6536
|
-
if (!afterHeaders && error.message !== "fetch failed") return void 0;
|
|
6537
|
-
const code = causeCode(error.cause);
|
|
6538
|
-
if (!code) return void 0;
|
|
6539
|
-
const unreached = !afterHeaders && (UNREACHED_CODES.has(code) || TLS_CODE.test(code));
|
|
6540
|
-
return {
|
|
6541
|
-
ok: false,
|
|
6542
|
-
status: unreached ? 503 : 502,
|
|
6543
|
-
payload: unreached ? {
|
|
6544
|
-
error: "Could not reach the Runpod API.",
|
|
6545
|
-
cause: code,
|
|
6546
|
-
hint: "The request never reached Runpod, so retrying the same call is safe: retry it once. If it fails again, the network, DNS, proxy or TLS setup on this machine is the likely cause; check https://uptime.runpod.io and report it rather than retrying further."
|
|
6547
|
-
} : {
|
|
6548
|
-
error: "The connection to the Runpod API dropped before the full response arrived.",
|
|
6549
|
-
cause: code,
|
|
6550
|
-
hint: "The request may have been applied. A read can be retried once. For a create, update, delete or job submission, check with the matching get- or list- tool whether it took effect before calling again; retrying blindly can create a duplicate billable resource."
|
|
6551
|
-
}
|
|
6552
|
-
};
|
|
6553
|
-
}
|
|
6554
|
-
async function runTool(body) {
|
|
6555
|
-
try {
|
|
6556
|
-
return await body();
|
|
6557
|
-
} catch (error) {
|
|
6558
|
-
if (error instanceof HttpError) {
|
|
6559
|
-
return {
|
|
6560
|
-
ok: false,
|
|
6561
|
-
status: error.status,
|
|
6562
|
-
payload: { error: error.message, detail: error.payload }
|
|
6563
|
-
};
|
|
6564
|
-
}
|
|
6565
|
-
if (isTimeout(error)) {
|
|
6566
|
-
return {
|
|
6567
|
-
ok: false,
|
|
6568
|
-
status: 504,
|
|
6569
|
-
payload: {
|
|
6570
|
-
error: "The Runpod API did not respond before the request deadline.",
|
|
6571
|
-
hint: "Transient upstream stall: retry the same call once; if it persists, check https://uptime.runpod.io."
|
|
6572
|
-
}
|
|
6573
|
-
};
|
|
6574
|
-
}
|
|
6575
|
-
const network = networkFailureResult(error);
|
|
6576
|
-
if (network) return network;
|
|
6577
|
-
throw error;
|
|
6578
|
-
}
|
|
6579
|
-
}
|
|
6580
|
-
|
|
6581
|
-
// src/specgen/tools/annotations.ts
|
|
6582
|
-
var readOnly = {
|
|
6583
|
-
readOnlyHint: true,
|
|
6584
|
-
destructiveHint: false,
|
|
6585
|
-
idempotentHint: true,
|
|
6586
|
-
openWorldHint: true
|
|
6587
|
-
};
|
|
6588
|
-
var bundledRead = {
|
|
6589
|
-
readOnlyHint: true,
|
|
6590
|
-
destructiveHint: false,
|
|
6591
|
-
idempotentHint: true,
|
|
6592
|
-
openWorldHint: false
|
|
6593
|
-
};
|
|
6594
|
-
var write = {
|
|
6595
|
-
readOnlyHint: false,
|
|
6596
|
-
destructiveHint: false,
|
|
6597
|
-
idempotentHint: false,
|
|
6598
|
-
openWorldHint: true
|
|
6599
|
-
};
|
|
6600
|
-
var idempotentWrite = {
|
|
6601
|
-
readOnlyHint: false,
|
|
6602
|
-
destructiveHint: false,
|
|
6603
|
-
idempotentHint: true,
|
|
6604
|
-
openWorldHint: true
|
|
6605
|
-
};
|
|
6606
|
-
var destructive = {
|
|
6607
|
-
readOnlyHint: false,
|
|
6608
|
-
destructiveHint: true,
|
|
6609
|
-
idempotentHint: true,
|
|
6610
|
-
openWorldHint: true
|
|
6611
|
-
};
|
|
6612
|
-
var destructiveWrite = {
|
|
6613
|
-
readOnlyHint: false,
|
|
6614
|
-
destructiveHint: true,
|
|
6615
|
-
idempotentHint: false,
|
|
6616
|
-
openWorldHint: true
|
|
6617
|
-
};
|
|
6618
|
-
|
|
6619
6803
|
// src/specgen/tools/capacity.ts
|
|
6620
6804
|
var CUDA_VERSION_REGEX = /^\d{1,2}\.\d{1,2}$/;
|
|
6621
6805
|
var MAX_PROBE_VERSIONS = 12;
|
|
@@ -7981,7 +8165,7 @@ var listTemplates = {
|
|
|
7981
8165
|
// src/specgen/tools/logs.ts
|
|
7982
8166
|
init_hosts();
|
|
7983
8167
|
|
|
7984
|
-
//
|
|
8168
|
+
// packages/typescript-api-sdk/dist/index.js
|
|
7985
8169
|
var PATH_PARAM_RE = /\{[^{}]+\}/g;
|
|
7986
8170
|
var supportsRequestInitExt = () => {
|
|
7987
8171
|
return typeof process === "object" && Number.parseInt(process?.versions?.node?.substring(0, 2)) >= 18 && process.versions.undici;
|
|
@@ -8553,10 +8737,7 @@ var Parser = class {
|
|
|
8553
8737
|
parseItem(standaloneItem = true) {
|
|
8554
8738
|
if (standaloneItem)
|
|
8555
8739
|
this.skipWS();
|
|
8556
|
-
const result = [
|
|
8557
|
-
this.parseBareItem(),
|
|
8558
|
-
this.parseParameters()
|
|
8559
|
-
];
|
|
8740
|
+
const result = [this.parseBareItem(), this.parseParameters()];
|
|
8560
8741
|
if (standaloneItem)
|
|
8561
8742
|
this.checkTrail();
|
|
8562
8743
|
return result;
|
|
@@ -8576,10 +8757,7 @@ var Parser = class {
|
|
|
8576
8757
|
this.skipWS();
|
|
8577
8758
|
if (this.lookChar() === ")") {
|
|
8578
8759
|
this.pos++;
|
|
8579
|
-
return [
|
|
8580
|
-
innerList,
|
|
8581
|
-
this.parseParameters()
|
|
8582
|
-
];
|
|
8760
|
+
return [innerList, this.parseParameters()];
|
|
8583
8761
|
}
|
|
8584
8762
|
innerList.push(this.parseItem(false));
|
|
8585
8763
|
const nextChar = this.lookChar();
|
|
@@ -9166,7 +9344,6 @@ var LogEventParser = class {
|
|
|
9166
9344
|
constructor(maxEventBytes) {
|
|
9167
9345
|
this.maxEventBytes = maxEventBytes;
|
|
9168
9346
|
}
|
|
9169
|
-
maxEventBytes;
|
|
9170
9347
|
line = "";
|
|
9171
9348
|
dataLines = [];
|
|
9172
9349
|
eventName = "";
|
|
@@ -9910,7 +10087,9 @@ function listTool(tool, profile = "default") {
|
|
|
9910
10087
|
tool.directoryDescription ?? tool.description,
|
|
9911
10088
|
inputSchema
|
|
9912
10089
|
),
|
|
9913
|
-
inputSchema:
|
|
10090
|
+
inputSchema: withoutCredentialExamples(
|
|
10091
|
+
withoutInputs(inputSchema, directoryOmittedInputs(name))
|
|
10092
|
+
),
|
|
9914
10093
|
annotations
|
|
9915
10094
|
};
|
|
9916
10095
|
const { description } = tool;
|
|
@@ -9932,6 +10111,21 @@ function withApiReference(description, schema) {
|
|
|
9932
10111
|
const sentence = /[.!?]$/.test(trimmed) ? trimmed : `${trimmed}.`;
|
|
9933
10112
|
return `${sentence} ${DIRECTORY_API_REFERENCE}`;
|
|
9934
10113
|
}
|
|
10114
|
+
var CREDENTIAL = /pass(word|wd|phrase)?|secret|token(?!s)|api_?key|private_?key|credential/i;
|
|
10115
|
+
function withoutCredentialExamples(schema) {
|
|
10116
|
+
const strip = (node) => {
|
|
10117
|
+
if (Array.isArray(node)) return node.map(strip);
|
|
10118
|
+
if (!node || typeof node !== "object") return node;
|
|
10119
|
+
const out = {};
|
|
10120
|
+
for (const [key, value] of Object.entries(node)) {
|
|
10121
|
+
if (key === "examples" && CREDENTIAL.test(JSON.stringify(value)))
|
|
10122
|
+
continue;
|
|
10123
|
+
out[key] = strip(value);
|
|
10124
|
+
}
|
|
10125
|
+
return out;
|
|
10126
|
+
};
|
|
10127
|
+
return strip(schema);
|
|
10128
|
+
}
|
|
9935
10129
|
function withoutInputs(schema, omit) {
|
|
9936
10130
|
if (!omit.length) return schema;
|
|
9937
10131
|
const properties = { ...schema.properties ?? {} };
|
|
@@ -10105,6 +10299,7 @@ function captureToolCall(apiKey, event) {
|
|
|
10105
10299
|
...event.clientName ? { client_name: event.clientName } : {},
|
|
10106
10300
|
...event.guideKind ? { guide_kind: event.guideKind } : {},
|
|
10107
10301
|
...event.blockedBy ? { blocked_by: event.blockedBy } : {},
|
|
10302
|
+
...event.profile ? { profile: event.profile } : {},
|
|
10108
10303
|
...args
|
|
10109
10304
|
});
|
|
10110
10305
|
}
|
|
@@ -10885,8 +11080,10 @@ PLAYBOOKS \u2014 READ BEFORE ACTING. Each Runpod task has a journey playbook car
|
|
|
10885
11080
|
|
|
10886
11081
|
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.
|
|
10887
11082
|
|
|
10888
|
-
|
|
10889
|
-
|
|
11083
|
+
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.
|
|
11084
|
+
|
|
11085
|
+
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.`;
|
|
11086
|
+
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.`;
|
|
10890
11087
|
var ALP_INSTRUCTIONS = `
|
|
10891
11088
|
|
|
10892
11089
|
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.`;
|
|
@@ -10904,6 +11101,7 @@ function createSpecgenServer(ctx, version = "0.1.0", opts = {}) {
|
|
|
10904
11101
|
...curatedTools,
|
|
10905
11102
|
...opts.search ? [createSearchDocsTool(opts.search)] : [],
|
|
10906
11103
|
...alp ? createAlpTools(alp) : [],
|
|
11104
|
+
...directory ? podTransitionTools : [],
|
|
10907
11105
|
createDescribeTool(() => [...servedCuratedTools, ...servedGeneratedTools])
|
|
10908
11106
|
].filter((tool) => !directory || directoryIncludes(tool.name));
|
|
10909
11107
|
const callShapeOnlyTools = new Set(
|
|
@@ -10979,6 +11177,7 @@ function createSpecgenServer(ctx, version = "0.1.0", opts = {}) {
|
|
|
10979
11177
|
status: 429,
|
|
10980
11178
|
durationMs: 0,
|
|
10981
11179
|
...verdict.reason ? { blockedBy: verdict.reason } : {},
|
|
11180
|
+
profile,
|
|
10982
11181
|
...opts.analytics
|
|
10983
11182
|
});
|
|
10984
11183
|
}
|
|
@@ -10999,6 +11198,9 @@ function createSpecgenServer(ctx, version = "0.1.0", opts = {}) {
|
|
|
10999
11198
|
const curated = servedCuratedTools.find(
|
|
11000
11199
|
(tool) => tool.name === request.params.name
|
|
11001
11200
|
);
|
|
11201
|
+
const generated = servedGeneratedTools.find(
|
|
11202
|
+
(tool) => tool.name === request.params.name
|
|
11203
|
+
);
|
|
11002
11204
|
const omitted = directory ? directoryOmittedInputs(request.params.name).filter((key) => key in args) : [];
|
|
11003
11205
|
const rejected = omitted.length ? {
|
|
11004
11206
|
ok: false,
|
|
@@ -11011,7 +11213,7 @@ function createSpecgenServer(ctx, version = "0.1.0", opts = {}) {
|
|
|
11011
11213
|
args
|
|
11012
11214
|
) : null;
|
|
11013
11215
|
const result = rejected ?? await runTool(
|
|
11014
|
-
() => curated ? curated.handler(ctx, args) : dispatchTool(request.params.name, args)
|
|
11216
|
+
() => curated ? curated.handler(ctx, args) : dispatchTool(generated, request.params.name, args)
|
|
11015
11217
|
);
|
|
11016
11218
|
logToolCall({
|
|
11017
11219
|
tool: request.params.name,
|
|
@@ -11031,23 +11233,27 @@ function createSpecgenServer(ctx, version = "0.1.0", opts = {}) {
|
|
|
11031
11233
|
args: recordedArgumentValues(curated?.recordedArguments, args),
|
|
11032
11234
|
guideKind: curated?.recordedGuideKind?.(args)
|
|
11033
11235
|
},
|
|
11236
|
+
profile,
|
|
11034
11237
|
...opts.analytics
|
|
11035
11238
|
});
|
|
11036
11239
|
}
|
|
11037
11240
|
opts.onToolResult?.(request.params.name, result.status);
|
|
11038
11241
|
if (!result.ok && result.status === 401) opts.onUnauthorized?.();
|
|
11242
|
+
const annotations = curated?.annotations ?? generated?.annotations;
|
|
11039
11243
|
const payload = redactSecretEnv(
|
|
11040
|
-
result.ok ? result.payload : withRecoveryHint(
|
|
11244
|
+
result.ok ? result.payload : withRecoveryHint(
|
|
11245
|
+
result,
|
|
11246
|
+
annotations?.idempotentHint === true,
|
|
11247
|
+
request.params.name,
|
|
11248
|
+
callShapeOnlyTools.has(request.params.name)
|
|
11249
|
+
)
|
|
11041
11250
|
);
|
|
11042
11251
|
return {
|
|
11043
11252
|
content: [{ type: "text", text: JSON.stringify(payload, null, 2) }],
|
|
11044
11253
|
isError: !result.ok
|
|
11045
11254
|
};
|
|
11046
11255
|
});
|
|
11047
|
-
async function dispatchTool(name, args) {
|
|
11048
|
-
const tool = servedGeneratedTools.find(
|
|
11049
|
-
(candidate) => candidate.name === name
|
|
11050
|
-
);
|
|
11256
|
+
async function dispatchTool(tool, name, args) {
|
|
11051
11257
|
if (!tool)
|
|
11052
11258
|
return {
|
|
11053
11259
|
ok: false,
|
|
@@ -11095,8 +11301,24 @@ function errorHint(status, detail) {
|
|
|
11095
11301
|
return void 0;
|
|
11096
11302
|
}
|
|
11097
11303
|
var CALL_SHAPE_ONLY_HINT = `This tool lists its call shape only; ${DESCRIBE_TOOL_NAME} serves the full argument schema.`;
|
|
11098
|
-
|
|
11304
|
+
var OUTCOME_UNKNOWN_HINT = "Runpod may have completed this operation even though its response failed. Do not submit it again yet. Check the matching get- or list- tool or the Runpod console using the original request details and time. Lists can lag; if you cannot confirm the outcome, stop and ask the user to verify before retrying.";
|
|
11305
|
+
var JOB_OUTCOME_UNKNOWN_HINT = "Runpod may have submitted this Serverless job even though its response failed. Do not submit it again yet. No job-list tool is available, and get-job-status requires a job ID that this failed response may not have returned. Check the endpoint in the Runpod console or ask the user to verify the submission. If the outcome remains uncertain, stop instead of retrying.";
|
|
11306
|
+
var RETRY_JOB_OUTCOME_UNKNOWN_HINT = "Runpod may have requeued this Serverless job even though its response failed. Do not retry it again yet. Check get-job-status with the endpoint and job IDs you supplied, or check the Runpod console. If you cannot confirm the outcome, stop and ask the user to verify before retrying.";
|
|
11307
|
+
var JOB_SUBMISSION_TOOLS = /* @__PURE__ */ new Set(["run-endpoint", "runsync-endpoint"]);
|
|
11308
|
+
function withRecoveryHint(result, idempotent, toolName, listsCallShapeOnly = false) {
|
|
11099
11309
|
const payload = asRecord(result.payload) ?? { error: result.payload };
|
|
11310
|
+
if (!idempotent && result.status >= 500 && result.requestDelivery !== "not_sent") {
|
|
11311
|
+
const detail = asRecord(payload.detail);
|
|
11312
|
+
const safeDetail = detail ? { ...detail } : void 0;
|
|
11313
|
+
if (safeDetail) delete safeDetail.hint;
|
|
11314
|
+
return {
|
|
11315
|
+
...payload,
|
|
11316
|
+
...safeDetail ? { detail: safeDetail } : {},
|
|
11317
|
+
...payload.code !== void 0 ? { upstreamCode: payload.code } : {},
|
|
11318
|
+
code: "outcome_unknown",
|
|
11319
|
+
hint: toolName === "retry-job" ? RETRY_JOB_OUTCOME_UNKNOWN_HINT : JOB_SUBMISSION_TOOLS.has(toolName) ? JOB_OUTCOME_UNKNOWN_HINT : OUTCOME_UNKNOWN_HINT
|
|
11320
|
+
};
|
|
11321
|
+
}
|
|
11100
11322
|
const hint = payload.hint ?? asRecord(payload.detail)?.hint ?? errorHint(result.status, detailText(payload));
|
|
11101
11323
|
const shapeRejected = result.status === 400 || result.status === 422;
|
|
11102
11324
|
return {
|