@runpod/mcp-server 4.6.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/dist/stdio.mjs CHANGED
@@ -5,14 +5,14 @@ import {
5
5
  publicGraphqlBase,
6
6
  sdkBase,
7
7
  serverlessBase
8
- } from "./chunk-4GF3CMSH.mjs";
8
+ } from "./chunk-5IFIMVI6.mjs";
9
9
 
10
10
  // src/stdio.ts
11
11
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
12
12
 
13
13
  // src/server.ts
14
14
  var SERVER_NAME = "Runpod API Server";
15
- var SERVER_VERSION = true ? "4.6.0" : "dev";
15
+ var SERVER_VERSION = true ? "4.7.0" : "dev";
16
16
 
17
17
  // src/specgen/server.ts
18
18
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
@@ -414,7 +414,7 @@ var generatedTools = [
414
414
  description: "Environment variables as key-value pairs",
415
415
  examples: [
416
416
  {
417
- JUPYTER_PASSWORD: "hunter2"
417
+ JUPYTER_PASSWORD: "changeme"
418
418
  }
419
419
  ]
420
420
  },
@@ -617,7 +617,7 @@ var generatedTools = [
617
617
  type: "string",
618
618
  description: "ECR resource ARN",
619
619
  examples: [
620
- "arn:aws:ecr:us-east-2:418399314813:repository/runpod/deployment"
620
+ "arn:aws:ecr:us-east-2:123456789012:repository/runpod/deployment"
621
621
  ]
622
622
  },
623
623
  name: {
@@ -701,7 +701,7 @@ var generatedTools = [
701
701
  description: "Environment variables as key-value pairs",
702
702
  examples: [
703
703
  {
704
- JUPYTER_PASSWORD: "hunter2"
704
+ JUPYTER_PASSWORD: "changeme"
705
705
  }
706
706
  ]
707
707
  },
@@ -952,7 +952,7 @@ var generatedTools = [
952
952
  type: "object",
953
953
  required: ["volumeId"],
954
954
  additionalProperties: false,
955
- description: "A volume mounted on every worker, always at `/runpod-volume`. Custom paths are not supported yet.",
955
+ description: "A volume mounted on every worker, always at `/runpod-volume`.",
956
956
  properties: {
957
957
  volumeId: {
958
958
  type: "string",
@@ -1002,8 +1002,7 @@ var generatedTools = [
1002
1002
  },
1003
1003
  EndpointType: {
1004
1004
  type: "string",
1005
- description: "Request-routing semantics for a modern serverless endpoint. `QUEUE` \u2014 submit asynchronous or synchronous jobs through the managed queue. `LOAD_BALANCER` \u2014 send requests directly to worker-defined HTTP paths.",
1006
- "x-enum-varnames": ["EndpointTypeQueue", "EndpointTypeLoadBalancer"],
1005
+ 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.",
1007
1006
  enum: ["QUEUE", "LOAD_BALANCER"]
1008
1007
  },
1009
1008
  EndpointWorkers: {
@@ -1112,7 +1111,6 @@ var generatedTools = [
1112
1111
  type: "string",
1113
1112
  minLength: 1,
1114
1113
  maxLength: 191,
1115
- pattern: "[^\\p{Z}\\t-\\r\x85]",
1116
1114
  description: "Human-readable name, 1\u2013191 characters with at least one non-whitespace character. Leading and trailing whitespace is trimmed.",
1117
1115
  examples: ["training-data"]
1118
1116
  }
@@ -1259,7 +1257,7 @@ var generatedTools = [
1259
1257
  description: "Environment variables as key-value pairs",
1260
1258
  examples: [
1261
1259
  {
1262
- JUPYTER_PASSWORD: "hunter2"
1260
+ JUPYTER_PASSWORD: "changeme"
1263
1261
  }
1264
1262
  ]
1265
1263
  },
@@ -1408,7 +1406,7 @@ var generatedTools = [
1408
1406
  {
1409
1407
  type: "object",
1410
1408
  required: ["name"],
1411
- description: "Request body for creating a pod. Exactly one of `gpu` or `cpu` must be set \u2014 enforced at the handler layer.",
1409
+ 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.",
1412
1410
  properties: {
1413
1411
  name: {
1414
1412
  type: "string",
@@ -1438,7 +1436,7 @@ var generatedTools = [
1438
1436
  globalNetworking: {
1439
1437
  type: "boolean",
1440
1438
  default: false,
1441
- 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 (both enforced upstream).",
1439
+ 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.",
1442
1440
  examples: [false]
1443
1441
  },
1444
1442
  gpu: {
@@ -1737,7 +1735,7 @@ var generatedTools = [
1737
1735
  description: "Environment variables as key-value pairs",
1738
1736
  examples: [
1739
1737
  {
1740
- JUPYTER_PASSWORD: "hunter2"
1738
+ JUPYTER_PASSWORD: "changeme"
1741
1739
  }
1742
1740
  ]
1743
1741
  },
@@ -2198,7 +2196,7 @@ var generatedTools = [
2198
2196
  items: {
2199
2197
  $ref: "#/$defs/CatalogInclude"
2200
2198
  },
2201
- description: "Comma-separated optional expansions. Supported value today: AVAILABILITY. This may expand with more include values in the future."
2199
+ description: "Comma-separated optional expansions; see `CatalogInclude` for the supported values."
2202
2200
  },
2203
2201
  product: {
2204
2202
  type: "array",
@@ -2218,7 +2216,7 @@ var generatedTools = [
2218
2216
  $defs: {
2219
2217
  CatalogInclude: {
2220
2218
  type: "string",
2221
- description: "Catalog include expansion. Only AVAILABILITY is supported today; additional include values may be added in the future.",
2219
+ description: "Catalog include expansion. `AVAILABILITY` is the only supported value.",
2222
2220
  enum: ["AVAILABILITY"]
2223
2221
  },
2224
2222
  CpuProduct: {
@@ -2444,7 +2442,7 @@ var generatedTools = [
2444
2442
  items: {
2445
2443
  $ref: "#/$defs/CatalogInclude"
2446
2444
  },
2447
- description: "Comma-separated optional expansions. Supported value today: AVAILABILITY. This may expand with more include values in the future."
2445
+ description: "Comma-separated optional expansions; see `CatalogInclude` for the supported values."
2448
2446
  },
2449
2447
  product: {
2450
2448
  type: "array",
@@ -2490,7 +2488,7 @@ var generatedTools = [
2490
2488
  $defs: {
2491
2489
  CatalogInclude: {
2492
2490
  type: "string",
2493
- description: "Catalog include expansion. Only AVAILABILITY is supported today; additional include values may be added in the future.",
2491
+ description: "Catalog include expansion. `AVAILABILITY` is the only supported value.",
2494
2492
  enum: ["AVAILABILITY"]
2495
2493
  },
2496
2494
  GpuCloudFilter: {
@@ -2699,6 +2697,99 @@ var generatedTools = [
2699
2697
  required: ["id"]
2700
2698
  }
2701
2699
  },
2700
+ {
2701
+ name: "list-audit-logs",
2702
+ title: "List audit logs",
2703
+ operationId: "listAuditLogs",
2704
+ 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.",
2705
+ 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.",
2706
+ method: "GET",
2707
+ path: "/v2/audit-logs",
2708
+ params: [
2709
+ {
2710
+ name: "actorIds",
2711
+ location: "query",
2712
+ explode: false
2713
+ },
2714
+ {
2715
+ name: "actions",
2716
+ location: "query",
2717
+ explode: false
2718
+ },
2719
+ {
2720
+ name: "startTime",
2721
+ location: "query"
2722
+ },
2723
+ {
2724
+ name: "endTime",
2725
+ location: "query"
2726
+ },
2727
+ {
2728
+ name: "search",
2729
+ location: "query"
2730
+ },
2731
+ {
2732
+ name: "cursor",
2733
+ location: "query"
2734
+ },
2735
+ {
2736
+ name: "limit",
2737
+ location: "query"
2738
+ }
2739
+ ],
2740
+ hasBody: false,
2741
+ annotations: {
2742
+ readOnlyHint: true,
2743
+ destructiveHint: false,
2744
+ idempotentHint: true,
2745
+ openWorldHint: true
2746
+ },
2747
+ inputSchema: {
2748
+ type: "object",
2749
+ properties: {
2750
+ actorIds: {
2751
+ type: "array",
2752
+ items: {
2753
+ type: "string"
2754
+ },
2755
+ 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."
2756
+ },
2757
+ actions: {
2758
+ type: "array",
2759
+ items: {
2760
+ type: "string"
2761
+ },
2762
+ description: "Only return entries whose `action` is one of these names, matched exactly as recorded. Comma-separated."
2763
+ },
2764
+ startTime: {
2765
+ type: "string",
2766
+ format: "date-time",
2767
+ 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."
2768
+ },
2769
+ endTime: {
2770
+ type: "string",
2771
+ format: "date-time",
2772
+ description: "Latest instant to include, inclusive (RFC 3339). Must be after `startTime` when both are given; 400 otherwise."
2773
+ },
2774
+ search: {
2775
+ type: "string",
2776
+ minLength: 1,
2777
+ description: "Case-insensitive substring match against `email`, `resourceType`, `resourceId`, `action` and `value`; `actorId` is not searched. Surrounding whitespace is ignored."
2778
+ },
2779
+ cursor: {
2780
+ type: "string",
2781
+ minLength: 1,
2782
+ 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."
2783
+ },
2784
+ limit: {
2785
+ type: "integer",
2786
+ minimum: 1,
2787
+ maximum: 200,
2788
+ description: "Page size, 1\u2013200. Defaults to 200 when omitted."
2789
+ }
2790
+ }
2791
+ }
2792
+ },
2702
2793
  {
2703
2794
  name: "list-billing",
2704
2795
  title: "List billing",
@@ -2759,13 +2850,6 @@ var generatedTools = [
2759
2850
  BillingBucketSize: {
2760
2851
  type: "string",
2761
2852
  enum: ["hour", "day", "week", "month", "year"],
2762
- "x-enum-varnames": [
2763
- "BillingBucketSizeHour",
2764
- "BillingBucketSizeDay",
2765
- "BillingBucketSizeWeek",
2766
- "BillingBucketSizeMonth",
2767
- "BillingBucketSizeYear"
2768
- ],
2769
2853
  default: "day",
2770
2854
  description: "Length of each billing time bucket.",
2771
2855
  examples: ["day"]
@@ -2841,13 +2925,6 @@ var generatedTools = [
2841
2925
  BillingBucketSize: {
2842
2926
  type: "string",
2843
2927
  enum: ["hour", "day", "week", "month", "year"],
2844
- "x-enum-varnames": [
2845
- "BillingBucketSizeHour",
2846
- "BillingBucketSizeDay",
2847
- "BillingBucketSizeWeek",
2848
- "BillingBucketSizeMonth",
2849
- "BillingBucketSizeYear"
2850
- ],
2851
2928
  default: "day",
2852
2929
  description: "Length of each billing time bucket.",
2853
2930
  examples: ["day"]
@@ -2966,7 +3043,7 @@ var generatedTools = [
2966
3043
  items: {
2967
3044
  $ref: "#/$defs/CatalogInclude"
2968
3045
  },
2969
- description: "Comma-separated optional expansions. Supported value today: AVAILABILITY. This may expand with more include values in the future."
3046
+ description: "Comma-separated optional expansions; see `CatalogInclude` for the supported values."
2970
3047
  },
2971
3048
  product: {
2972
3049
  type: "array",
@@ -2985,7 +3062,7 @@ var generatedTools = [
2985
3062
  $defs: {
2986
3063
  CatalogInclude: {
2987
3064
  type: "string",
2988
- description: "Catalog include expansion. Only AVAILABILITY is supported today; additional include values may be added in the future.",
3065
+ description: "Catalog include expansion. `AVAILABILITY` is the only supported value.",
2989
3066
  enum: ["AVAILABILITY"]
2990
3067
  },
2991
3068
  CpuProduct: {
@@ -3204,13 +3281,6 @@ var generatedTools = [
3204
3281
  BillingBucketSize: {
3205
3282
  type: "string",
3206
3283
  enum: ["hour", "day", "week", "month", "year"],
3207
- "x-enum-varnames": [
3208
- "BillingBucketSizeHour",
3209
- "BillingBucketSizeDay",
3210
- "BillingBucketSizeWeek",
3211
- "BillingBucketSizeMonth",
3212
- "BillingBucketSizeYear"
3213
- ],
3214
3284
  default: "day",
3215
3285
  description: "Length of each billing time bucket.",
3216
3286
  examples: ["day"]
@@ -3447,7 +3517,7 @@ var generatedTools = [
3447
3517
  items: {
3448
3518
  $ref: "#/$defs/CatalogInclude"
3449
3519
  },
3450
- description: "Comma-separated optional expansions. Supported value today: AVAILABILITY. This may expand with more include values in the future."
3520
+ description: "Comma-separated optional expansions; see `CatalogInclude` for the supported values."
3451
3521
  },
3452
3522
  product: {
3453
3523
  type: "array",
@@ -3492,7 +3562,7 @@ var generatedTools = [
3492
3562
  $defs: {
3493
3563
  CatalogInclude: {
3494
3564
  type: "string",
3495
- description: "Catalog include expansion. Only AVAILABILITY is supported today; additional include values may be added in the future.",
3565
+ description: "Catalog include expansion. `AVAILABILITY` is the only supported value.",
3496
3566
  enum: ["AVAILABILITY"]
3497
3567
  },
3498
3568
  GpuCloudFilter: {
@@ -3576,13 +3646,6 @@ var generatedTools = [
3576
3646
  BillingBucketSize: {
3577
3647
  type: "string",
3578
3648
  enum: ["hour", "day", "week", "month", "year"],
3579
- "x-enum-varnames": [
3580
- "BillingBucketSizeHour",
3581
- "BillingBucketSizeDay",
3582
- "BillingBucketSizeWeek",
3583
- "BillingBucketSizeMonth",
3584
- "BillingBucketSizeYear"
3585
- ],
3586
3649
  default: "day",
3587
3650
  description: "Length of each billing time bucket.",
3588
3651
  examples: ["day"]
@@ -3699,13 +3762,6 @@ var generatedTools = [
3699
3762
  BillingBucketSize: {
3700
3763
  type: "string",
3701
3764
  enum: ["hour", "day", "week", "month", "year"],
3702
- "x-enum-varnames": [
3703
- "BillingBucketSizeHour",
3704
- "BillingBucketSizeDay",
3705
- "BillingBucketSizeWeek",
3706
- "BillingBucketSizeMonth",
3707
- "BillingBucketSizeYear"
3708
- ],
3709
3765
  default: "day",
3710
3766
  description: "Length of each billing time bucket.",
3711
3767
  examples: ["day"]
@@ -3914,13 +3970,6 @@ var generatedTools = [
3914
3970
  BillingBucketSize: {
3915
3971
  type: "string",
3916
3972
  enum: ["hour", "day", "week", "month", "year"],
3917
- "x-enum-varnames": [
3918
- "BillingBucketSizeHour",
3919
- "BillingBucketSizeDay",
3920
- "BillingBucketSizeWeek",
3921
- "BillingBucketSizeMonth",
3922
- "BillingBucketSizeYear"
3923
- ],
3924
3973
  default: "day",
3925
3974
  description: "Length of each billing time bucket.",
3926
3975
  examples: ["day"]
@@ -4139,7 +4188,7 @@ var generatedTools = [
4139
4188
  description: "Environment variables as key-value pairs",
4140
4189
  examples: [
4141
4190
  {
4142
- JUPYTER_PASSWORD: "hunter2"
4191
+ JUPYTER_PASSWORD: "changeme"
4143
4192
  }
4144
4193
  ]
4145
4194
  },
@@ -4236,7 +4285,7 @@ var generatedTools = [
4236
4285
  type: "object",
4237
4286
  required: ["volumeId"],
4238
4287
  additionalProperties: false,
4239
- description: "A volume mounted on every worker, always at `/runpod-volume`. Custom paths are not supported yet.",
4288
+ description: "A volume mounted on every worker, always at `/runpod-volume`.",
4240
4289
  properties: {
4241
4290
  volumeId: {
4242
4291
  type: "string",
@@ -4496,7 +4545,6 @@ var generatedTools = [
4496
4545
  type: "string",
4497
4546
  minLength: 1,
4498
4547
  maxLength: 191,
4499
- pattern: "[^\\p{Z}\\t-\\r\x85]",
4500
4548
  description: "New human-readable name, 1\u2013191 characters with at least one non-whitespace character. Leading and trailing whitespace is trimmed.",
4501
4549
  examples: ["renamed-volume"]
4502
4550
  }
@@ -4642,7 +4690,7 @@ var generatedTools = [
4642
4690
  description: "Environment variables as key-value pairs",
4643
4691
  examples: [
4644
4692
  {
4645
- JUPYTER_PASSWORD: "hunter2"
4693
+ JUPYTER_PASSWORD: "changeme"
4646
4694
  }
4647
4695
  ]
4648
4696
  },
@@ -4780,7 +4828,7 @@ var generatedTools = [
4780
4828
  properties: {
4781
4829
  globalNetworking: {
4782
4830
  type: "boolean",
4783
- 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 (both enforced upstream)."
4831
+ 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."
4784
4832
  },
4785
4833
  locked: {
4786
4834
  type: "boolean",
@@ -4927,7 +4975,7 @@ var generatedTools = [
4927
4975
  hasBody: true,
4928
4976
  annotations: {
4929
4977
  readOnlyHint: false,
4930
- destructiveHint: false,
4978
+ destructiveHint: true,
4931
4979
  idempotentHint: true,
4932
4980
  openWorldHint: true
4933
4981
  },
@@ -4989,7 +5037,7 @@ var generatedTools = [
4989
5037
  description: "Environment variables as key-value pairs",
4990
5038
  examples: [
4991
5039
  {
4992
- JUPYTER_PASSWORD: "hunter2"
5040
+ JUPYTER_PASSWORD: "changeme"
4993
5041
  }
4994
5042
  ]
4995
5043
  },
@@ -5109,8 +5157,186 @@ var generatedTools = [
5109
5157
  }
5110
5158
  ];
5111
5159
 
5160
+ // src/specgen/tools/annotations.ts
5161
+ var readOnly = {
5162
+ readOnlyHint: true,
5163
+ destructiveHint: false,
5164
+ idempotentHint: true,
5165
+ openWorldHint: true
5166
+ };
5167
+ var bundledRead = {
5168
+ readOnlyHint: true,
5169
+ destructiveHint: false,
5170
+ idempotentHint: true,
5171
+ openWorldHint: false
5172
+ };
5173
+ var write = {
5174
+ readOnlyHint: false,
5175
+ destructiveHint: false,
5176
+ idempotentHint: false,
5177
+ openWorldHint: true
5178
+ };
5179
+ var idempotentWrite = {
5180
+ readOnlyHint: false,
5181
+ destructiveHint: false,
5182
+ idempotentHint: true,
5183
+ openWorldHint: true
5184
+ };
5185
+ var destructive = {
5186
+ readOnlyHint: false,
5187
+ destructiveHint: true,
5188
+ idempotentHint: true,
5189
+ openWorldHint: true
5190
+ };
5191
+ var destructiveWrite = {
5192
+ readOnlyHint: false,
5193
+ destructiveHint: true,
5194
+ idempotentHint: false,
5195
+ openWorldHint: true
5196
+ };
5197
+
5198
+ // src/specgen/clients/http-error.ts
5199
+ var HttpError = class extends Error {
5200
+ constructor(message, status, payload = void 0) {
5201
+ super(message);
5202
+ this.status = status;
5203
+ this.payload = payload;
5204
+ this.name = "HttpError";
5205
+ }
5206
+ };
5207
+ function missingKeyError() {
5208
+ return new HttpError(
5209
+ "No Runpod API key: the request carried no usable credential.",
5210
+ 401
5211
+ );
5212
+ }
5213
+
5214
+ // src/specgen/tools/util.ts
5215
+ function ok(payload) {
5216
+ return { ok: true, status: 200, payload };
5217
+ }
5218
+ function badRequest(message) {
5219
+ return { ok: false, status: 400, payload: { error: message } };
5220
+ }
5221
+ function isTimeout(error) {
5222
+ if (!(error instanceof Error)) return false;
5223
+ if (error.name === "TimeoutError" || error.name === "AbortError") return true;
5224
+ const cause = error.cause;
5225
+ return cause instanceof Error && (cause.name === "TimeoutError" || cause.name === "AbortError");
5226
+ }
5227
+ var UNREACHED_CODES = /* @__PURE__ */ new Set([
5228
+ "ENOTFOUND",
5229
+ "EAI_AGAIN",
5230
+ "ECONNREFUSED",
5231
+ "EHOSTUNREACH",
5232
+ "ENETUNREACH",
5233
+ "UND_ERR_CONNECT_TIMEOUT"
5234
+ ]);
5235
+ var TLS_CODE = /^(?:CERT_|ERR_TLS_|UNABLE_TO_|DEPTH_ZERO_|SELF_SIGNED_)/;
5236
+ function causeCode(cause) {
5237
+ const code = cause?.code;
5238
+ if (typeof code === "string") return code;
5239
+ const inner = cause instanceof AggregateError ? cause.errors[0] : void 0;
5240
+ const innerCode = inner?.code;
5241
+ return typeof innerCode === "string" ? innerCode : void 0;
5242
+ }
5243
+ function networkFailureResult(error) {
5244
+ if (!(error instanceof TypeError)) return void 0;
5245
+ const afterHeaders = error.message === "terminated";
5246
+ if (!afterHeaders && error.message !== "fetch failed") return void 0;
5247
+ const code = causeCode(error.cause);
5248
+ if (!code) return void 0;
5249
+ const unreached = !afterHeaders && (UNREACHED_CODES.has(code) || TLS_CODE.test(code));
5250
+ return {
5251
+ ok: false,
5252
+ status: unreached ? 503 : 502,
5253
+ payload: unreached ? {
5254
+ error: "Could not reach the Runpod API.",
5255
+ cause: code,
5256
+ 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."
5257
+ } : {
5258
+ error: "The connection to the Runpod API dropped before the full response arrived.",
5259
+ cause: code,
5260
+ 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."
5261
+ }
5262
+ };
5263
+ }
5264
+ async function runTool(body) {
5265
+ try {
5266
+ return await body();
5267
+ } catch (error) {
5268
+ if (error instanceof HttpError) {
5269
+ return {
5270
+ ok: false,
5271
+ status: error.status,
5272
+ payload: { error: error.message, detail: error.payload }
5273
+ };
5274
+ }
5275
+ if (isTimeout(error)) {
5276
+ return {
5277
+ ok: false,
5278
+ status: 504,
5279
+ payload: {
5280
+ error: "The Runpod API did not respond before the request deadline.",
5281
+ hint: "Transient upstream stall: retry the same call once; if it persists, check https://uptime.runpod.io."
5282
+ }
5283
+ };
5284
+ }
5285
+ const network = networkFailureResult(error);
5286
+ if (network) return network;
5287
+ throw error;
5288
+ }
5289
+ }
5290
+
5291
+ // src/specgen/tools/pod-transitions.ts
5292
+ var podAction = generatedTools.find((tool) => tool.name === "pod-action");
5293
+ if (!podAction)
5294
+ throw new Error("pod-action is missing from the generated tools");
5295
+ var POD_ID = {
5296
+ type: "object",
5297
+ properties: { id: { type: "string", description: "ID of the Pod" } },
5298
+ required: ["id"],
5299
+ additionalProperties: false
5300
+ };
5301
+ function transition(action, title, description, annotations) {
5302
+ return {
5303
+ name: `${action}-pod`,
5304
+ title,
5305
+ description,
5306
+ inputSchema: POD_ID,
5307
+ annotations,
5308
+ handler: (ctx, args) => runTool(
5309
+ () => dispatchGeneratedTool(ctx.sdk, podAction, {
5310
+ id: args.id,
5311
+ body: { action }
5312
+ })
5313
+ )
5314
+ };
5315
+ }
5316
+ var podTransitionTools = [
5317
+ transition(
5318
+ "start",
5319
+ "Start Pod",
5320
+ "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.",
5321
+ write
5322
+ ),
5323
+ transition(
5324
+ "stop",
5325
+ "Stop Pod",
5326
+ "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.",
5327
+ destructiveWrite
5328
+ ),
5329
+ transition(
5330
+ "restart",
5331
+ "Restart Pod",
5332
+ "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.",
5333
+ destructiveWrite
5334
+ )
5335
+ ];
5336
+
5112
5337
  // src/specgen/profile.ts
5113
5338
  var IN = { include: true };
5339
+ var CREDENTIAL_MANAGEMENT = "Manages stored credentials; OpenAI restricts plugins that handle access credentials, so the directory leaves the whole credential family out.";
5114
5340
  var CREDENTIAL_INPUT = "Takes a secret or password as input; directories forbid collecting credentials.";
5115
5341
  var ALP = "Collects conversation-derived data beyond the task; the directory profile never serves it.";
5116
5342
  var DIRECTORY_TOOLS = {
@@ -5127,8 +5353,6 @@ var DIRECTORY_TOOLS = {
5127
5353
  "delete-global-volume": IN,
5128
5354
  "delete-network-volume": IN,
5129
5355
  "delete-pod": IN,
5130
- "delete-registry": IN,
5131
- "delete-secret": IN,
5132
5356
  "delete-template": IN,
5133
5357
  "deploy-hub-repo": IN,
5134
5358
  "endpoint-health": IN,
@@ -5144,10 +5368,9 @@ var DIRECTORY_TOOLS = {
5144
5368
  "get-network-volume": IN,
5145
5369
  "get-organization": IN,
5146
5370
  "get-pod": IN,
5147
- "get-registry": IN,
5148
- "get-secret": IN,
5149
5371
  "get-ssh-keys": IN,
5150
5372
  "get-template": IN,
5373
+ "list-audit-logs": IN,
5151
5374
  "list-billing": IN,
5152
5375
  "list-cluster-billing": IN,
5153
5376
  "list-cluster-pods": IN,
@@ -5169,12 +5392,9 @@ var DIRECTORY_TOOLS = {
5169
5392
  "list-pods": IN,
5170
5393
  "list-public-endpoints": IN,
5171
5394
  "list-public-templates": IN,
5172
- "list-registries": IN,
5173
- "list-secrets": IN,
5174
5395
  "list-serverless-billing": IN,
5175
5396
  "list-templates": IN,
5176
5397
  "lookup-concept": IN,
5177
- "pod-action": IN,
5178
5398
  "purge-endpoint-queue": IN,
5179
5399
  "retry-job": IN,
5180
5400
  "revoke-delegation": IN,
@@ -5193,6 +5413,13 @@ var DIRECTORY_TOOLS = {
5193
5413
  "update-template": IN,
5194
5414
  "run-endpoint": { include: true, omitInputs: ["s3Config"] },
5195
5415
  "runsync-endpoint": { include: true, omitInputs: ["s3Config"] },
5416
+ "pod-action": {
5417
+ include: false,
5418
+ 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)."
5419
+ },
5420
+ "start-pod": IN,
5421
+ "stop-pod": IN,
5422
+ "restart-pod": IN,
5196
5423
  "list-guides": {
5197
5424
  include: false,
5198
5425
  reason: "Serves playbooks that instruct the model how to behave."
@@ -5206,6 +5433,12 @@ var DIRECTORY_TOOLS = {
5206
5433
  reason: "Fetches schemas the directory already lists in full; directories reject schema fetching."
5207
5434
  },
5208
5435
  "create-secret": { include: false, reason: CREDENTIAL_INPUT },
5436
+ "get-secret": { include: false, reason: CREDENTIAL_MANAGEMENT },
5437
+ "list-secrets": { include: false, reason: CREDENTIAL_MANAGEMENT },
5438
+ "delete-secret": { include: false, reason: CREDENTIAL_MANAGEMENT },
5439
+ "get-registry": { include: false, reason: CREDENTIAL_MANAGEMENT },
5440
+ "list-registries": { include: false, reason: CREDENTIAL_MANAGEMENT },
5441
+ "delete-registry": { include: false, reason: CREDENTIAL_MANAGEMENT },
5209
5442
  "update-secret": { include: false, reason: CREDENTIAL_INPUT },
5210
5443
  "create-registry": { include: false, reason: CREDENTIAL_INPUT },
5211
5444
  report_feedback: { include: false, reason: ALP },
@@ -5320,137 +5553,6 @@ function capList(items, options, extra) {
5320
5553
  };
5321
5554
  }
5322
5555
 
5323
- // src/specgen/clients/http-error.ts
5324
- var HttpError = class extends Error {
5325
- constructor(message, status, payload = void 0) {
5326
- super(message);
5327
- this.status = status;
5328
- this.payload = payload;
5329
- this.name = "HttpError";
5330
- }
5331
- };
5332
- function missingKeyError() {
5333
- return new HttpError(
5334
- "No Runpod API key: the request carried no usable credential.",
5335
- 401
5336
- );
5337
- }
5338
-
5339
- // src/specgen/tools/util.ts
5340
- function ok(payload) {
5341
- return { ok: true, status: 200, payload };
5342
- }
5343
- function badRequest(message) {
5344
- return { ok: false, status: 400, payload: { error: message } };
5345
- }
5346
- function isTimeout(error) {
5347
- if (!(error instanceof Error)) return false;
5348
- if (error.name === "TimeoutError" || error.name === "AbortError") return true;
5349
- const cause = error.cause;
5350
- return cause instanceof Error && (cause.name === "TimeoutError" || cause.name === "AbortError");
5351
- }
5352
- var UNREACHED_CODES = /* @__PURE__ */ new Set([
5353
- "ENOTFOUND",
5354
- "EAI_AGAIN",
5355
- "ECONNREFUSED",
5356
- "EHOSTUNREACH",
5357
- "ENETUNREACH",
5358
- "UND_ERR_CONNECT_TIMEOUT"
5359
- ]);
5360
- var TLS_CODE = /^(?:CERT_|ERR_TLS_|UNABLE_TO_|DEPTH_ZERO_|SELF_SIGNED_)/;
5361
- function causeCode(cause) {
5362
- const code = cause?.code;
5363
- if (typeof code === "string") return code;
5364
- const inner = cause instanceof AggregateError ? cause.errors[0] : void 0;
5365
- const innerCode = inner?.code;
5366
- return typeof innerCode === "string" ? innerCode : void 0;
5367
- }
5368
- function networkFailureResult(error) {
5369
- if (!(error instanceof TypeError)) return void 0;
5370
- const afterHeaders = error.message === "terminated";
5371
- if (!afterHeaders && error.message !== "fetch failed") return void 0;
5372
- const code = causeCode(error.cause);
5373
- if (!code) return void 0;
5374
- const unreached = !afterHeaders && (UNREACHED_CODES.has(code) || TLS_CODE.test(code));
5375
- return {
5376
- ok: false,
5377
- status: unreached ? 503 : 502,
5378
- payload: unreached ? {
5379
- error: "Could not reach the Runpod API.",
5380
- cause: code,
5381
- 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."
5382
- } : {
5383
- error: "The connection to the Runpod API dropped before the full response arrived.",
5384
- cause: code,
5385
- 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."
5386
- }
5387
- };
5388
- }
5389
- async function runTool(body) {
5390
- try {
5391
- return await body();
5392
- } catch (error) {
5393
- if (error instanceof HttpError) {
5394
- return {
5395
- ok: false,
5396
- status: error.status,
5397
- payload: { error: error.message, detail: error.payload }
5398
- };
5399
- }
5400
- if (isTimeout(error)) {
5401
- return {
5402
- ok: false,
5403
- status: 504,
5404
- payload: {
5405
- error: "The Runpod API did not respond before the request deadline.",
5406
- hint: "Transient upstream stall: retry the same call once; if it persists, check https://uptime.runpod.io."
5407
- }
5408
- };
5409
- }
5410
- const network = networkFailureResult(error);
5411
- if (network) return network;
5412
- throw error;
5413
- }
5414
- }
5415
-
5416
- // src/specgen/tools/annotations.ts
5417
- var readOnly = {
5418
- readOnlyHint: true,
5419
- destructiveHint: false,
5420
- idempotentHint: true,
5421
- openWorldHint: true
5422
- };
5423
- var bundledRead = {
5424
- readOnlyHint: true,
5425
- destructiveHint: false,
5426
- idempotentHint: true,
5427
- openWorldHint: false
5428
- };
5429
- var write = {
5430
- readOnlyHint: false,
5431
- destructiveHint: false,
5432
- idempotentHint: false,
5433
- openWorldHint: true
5434
- };
5435
- var idempotentWrite = {
5436
- readOnlyHint: false,
5437
- destructiveHint: false,
5438
- idempotentHint: true,
5439
- openWorldHint: true
5440
- };
5441
- var destructive = {
5442
- readOnlyHint: false,
5443
- destructiveHint: true,
5444
- idempotentHint: true,
5445
- openWorldHint: true
5446
- };
5447
- var destructiveWrite = {
5448
- readOnlyHint: false,
5449
- destructiveHint: true,
5450
- idempotentHint: false,
5451
- openWorldHint: true
5452
- };
5453
-
5454
5556
  // src/specgen/tools/capacity.ts
5455
5557
  var CUDA_VERSION_REGEX = /^\d{1,2}\.\d{1,2}$/;
5456
5558
  var MAX_PROBE_VERSIONS = 12;
@@ -6813,7 +6915,7 @@ var listTemplates = {
6813
6915
  }
6814
6916
  };
6815
6917
 
6816
- // node_modules/.pnpm/@runpod+typescript-api-sdk@0.3.0/node_modules/@runpod/typescript-api-sdk/dist/index.js
6918
+ // packages/typescript-api-sdk/dist/index.js
6817
6919
  var PATH_PARAM_RE = /\{[^{}]+\}/g;
6818
6920
  var supportsRequestInitExt = () => {
6819
6921
  return typeof process === "object" && Number.parseInt(process?.versions?.node?.substring(0, 2)) >= 18 && process.versions.undici;
@@ -7385,10 +7487,7 @@ var Parser = class {
7385
7487
  parseItem(standaloneItem = true) {
7386
7488
  if (standaloneItem)
7387
7489
  this.skipWS();
7388
- const result = [
7389
- this.parseBareItem(),
7390
- this.parseParameters()
7391
- ];
7490
+ const result = [this.parseBareItem(), this.parseParameters()];
7392
7491
  if (standaloneItem)
7393
7492
  this.checkTrail();
7394
7493
  return result;
@@ -7408,10 +7507,7 @@ var Parser = class {
7408
7507
  this.skipWS();
7409
7508
  if (this.lookChar() === ")") {
7410
7509
  this.pos++;
7411
- return [
7412
- innerList,
7413
- this.parseParameters()
7414
- ];
7510
+ return [innerList, this.parseParameters()];
7415
7511
  }
7416
7512
  innerList.push(this.parseItem(false));
7417
7513
  const nextChar = this.lookChar();
@@ -7998,7 +8094,6 @@ var LogEventParser = class {
7998
8094
  constructor(maxEventBytes) {
7999
8095
  this.maxEventBytes = maxEventBytes;
8000
8096
  }
8001
- maxEventBytes;
8002
8097
  line = "";
8003
8098
  dataLines = [];
8004
8099
  eventName = "";
@@ -8744,7 +8839,9 @@ function listTool(tool, profile = "default") {
8744
8839
  tool.directoryDescription ?? tool.description,
8745
8840
  inputSchema
8746
8841
  ),
8747
- inputSchema: withoutInputs(inputSchema, directoryOmittedInputs(name)),
8842
+ inputSchema: withoutCredentialExamples(
8843
+ withoutInputs(inputSchema, directoryOmittedInputs(name))
8844
+ ),
8748
8845
  annotations
8749
8846
  };
8750
8847
  const { description } = tool;
@@ -8766,6 +8863,21 @@ function withApiReference(description, schema) {
8766
8863
  const sentence = /[.!?]$/.test(trimmed) ? trimmed : `${trimmed}.`;
8767
8864
  return `${sentence} ${DIRECTORY_API_REFERENCE}`;
8768
8865
  }
8866
+ var CREDENTIAL = /pass(word|wd|phrase)?|secret|token(?!s)|api_?key|private_?key|credential/i;
8867
+ function withoutCredentialExamples(schema) {
8868
+ const strip = (node) => {
8869
+ if (Array.isArray(node)) return node.map(strip);
8870
+ if (!node || typeof node !== "object") return node;
8871
+ const out = {};
8872
+ for (const [key, value] of Object.entries(node)) {
8873
+ if (key === "examples" && CREDENTIAL.test(JSON.stringify(value)))
8874
+ continue;
8875
+ out[key] = strip(value);
8876
+ }
8877
+ return out;
8878
+ };
8879
+ return strip(schema);
8880
+ }
8769
8881
  function withoutInputs(schema, omit) {
8770
8882
  if (!omit.length) return schema;
8771
8883
  const properties = { ...schema.properties ?? {} };
@@ -9718,8 +9830,10 @@ PLAYBOOKS \u2014 READ BEFORE ACTING. Each Runpod task has a journey playbook car
9718
9830
 
9719
9831
  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.
9720
9832
 
9721
- The tool schemas are generated from the Runpod v2 OpenAPI contract, served as a machine-readable document at https://api.runpod.io/v2/openapi.json \u2014 consult it for fields beyond the tool surface. 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.`;
9722
- 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, secrets, SSH keys, container registry credentials, billing history, Public Endpoints, and the Runpod Hub. Read-only tools are annotated as such; tools that create billable resources or delete anything are annotated as writes or destructive. Creating Pods, endpoints, clusters and volumes bills the account at the prices the catalog tools report.`;
9833
+ 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.
9834
+
9835
+ 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.`;
9836
+ 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.`;
9723
9837
  var ALP_INSTRUCTIONS = `
9724
9838
 
9725
9839
  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.`;
@@ -9737,6 +9851,7 @@ function createSpecgenServer(ctx, version = "0.1.0", opts = {}) {
9737
9851
  ...curatedTools,
9738
9852
  ...opts.search ? [createSearchDocsTool(opts.search)] : [],
9739
9853
  ...alp ? createAlpTools(alp) : [],
9854
+ ...directory ? podTransitionTools : [],
9740
9855
  createDescribeTool(() => [...servedCuratedTools, ...servedGeneratedTools])
9741
9856
  ].filter((tool) => !directory || directoryIncludes(tool.name));
9742
9857
  const callShapeOnlyTools = new Set(
@@ -9978,7 +10093,7 @@ if (subcommand === "--version" || subcommand === "-v") {
9978
10093
  ].join("\n")
9979
10094
  );
9980
10095
  } else if (isWizardMode) {
9981
- import("./wizard-KKTBTVXE.mjs").then(async ({ runWizard }) => {
10096
+ import("./wizard-NVV3UNOG.mjs").then(async ({ runWizard }) => {
9982
10097
  process.exitCode = await runWizard(subcommand);
9983
10098
  }).catch((error) => {
9984
10099
  console.error(error instanceof Error ? error.message : String(error));