@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/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.8.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
  },
@@ -477,9 +477,36 @@ var generatedTools = [
477
477
  },
478
478
  ClusterMounts: {
479
479
  description: "Storage mounts for a cluster create: `persistent` or `network`, not both. Clusters cannot mount global volumes, so `global` is rejected.",
480
+ "x-go-type": "BaseMounts",
480
481
  allOf: [
481
482
  {
482
483
  $ref: "#/$defs/BaseMounts"
484
+ },
485
+ {
486
+ type: "object",
487
+ properties: {
488
+ persistent: {
489
+ type: "object",
490
+ properties: {
491
+ path: {
492
+ type: "string",
493
+ minLength: 1
494
+ }
495
+ }
496
+ },
497
+ network: {
498
+ type: "array",
499
+ items: {
500
+ type: "object",
501
+ properties: {
502
+ path: {
503
+ type: "string",
504
+ minLength: 1
505
+ }
506
+ }
507
+ }
508
+ }
509
+ }
483
510
  }
484
511
  ],
485
512
  unevaluatedProperties: false
@@ -617,7 +644,7 @@ var generatedTools = [
617
644
  type: "string",
618
645
  description: "ECR resource ARN",
619
646
  examples: [
620
- "arn:aws:ecr:us-east-2:418399314813:repository/runpod/deployment"
647
+ "arn:aws:ecr:us-east-2:123456789012:repository/runpod/deployment"
621
648
  ]
622
649
  },
623
650
  name: {
@@ -701,7 +728,7 @@ var generatedTools = [
701
728
  description: "Environment variables as key-value pairs",
702
729
  examples: [
703
730
  {
704
- JUPYTER_PASSWORD: "hunter2"
731
+ JUPYTER_PASSWORD: "changeme"
705
732
  }
706
733
  ]
707
734
  },
@@ -952,7 +979,7 @@ var generatedTools = [
952
979
  type: "object",
953
980
  required: ["volumeId"],
954
981
  additionalProperties: false,
955
- description: "A volume mounted on every worker, always at `/runpod-volume`. Custom paths are not supported yet.",
982
+ description: "A volume mounted on every worker, always at `/runpod-volume`.",
956
983
  properties: {
957
984
  volumeId: {
958
985
  type: "string",
@@ -1002,8 +1029,7 @@ var generatedTools = [
1002
1029
  },
1003
1030
  EndpointType: {
1004
1031
  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"],
1032
+ 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
1033
  enum: ["QUEUE", "LOAD_BALANCER"]
1008
1034
  },
1009
1035
  EndpointWorkers: {
@@ -1112,7 +1138,6 @@ var generatedTools = [
1112
1138
  type: "string",
1113
1139
  minLength: 1,
1114
1140
  maxLength: 191,
1115
- pattern: "[^\\p{Z}\\t-\\r\x85]",
1116
1141
  description: "Human-readable name, 1\u2013191 characters with at least one non-whitespace character. Leading and trailing whitespace is trimmed.",
1117
1142
  examples: ["training-data"]
1118
1143
  }
@@ -1259,7 +1284,7 @@ var generatedTools = [
1259
1284
  description: "Environment variables as key-value pairs",
1260
1285
  examples: [
1261
1286
  {
1262
- JUPYTER_PASSWORD: "hunter2"
1287
+ JUPYTER_PASSWORD: "changeme"
1263
1288
  }
1264
1289
  ]
1265
1290
  },
@@ -1408,7 +1433,7 @@ var generatedTools = [
1408
1433
  {
1409
1434
  type: "object",
1410
1435
  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.",
1436
+ 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
1437
  properties: {
1413
1438
  name: {
1414
1439
  type: "string",
@@ -1438,7 +1463,7 @@ var generatedTools = [
1438
1463
  globalNetworking: {
1439
1464
  type: "boolean",
1440
1465
  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).",
1466
+ 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
1467
  examples: [false]
1443
1468
  },
1444
1469
  gpu: {
@@ -1737,7 +1762,7 @@ var generatedTools = [
1737
1762
  description: "Environment variables as key-value pairs",
1738
1763
  examples: [
1739
1764
  {
1740
- JUPYTER_PASSWORD: "hunter2"
1765
+ JUPYTER_PASSWORD: "changeme"
1741
1766
  }
1742
1767
  ]
1743
1768
  },
@@ -2198,7 +2223,7 @@ var generatedTools = [
2198
2223
  items: {
2199
2224
  $ref: "#/$defs/CatalogInclude"
2200
2225
  },
2201
- description: "Comma-separated optional expansions. Supported value today: AVAILABILITY. This may expand with more include values in the future."
2226
+ description: "Comma-separated optional expansions; see `CatalogInclude` for the supported values."
2202
2227
  },
2203
2228
  product: {
2204
2229
  type: "array",
@@ -2218,7 +2243,7 @@ var generatedTools = [
2218
2243
  $defs: {
2219
2244
  CatalogInclude: {
2220
2245
  type: "string",
2221
- description: "Catalog include expansion. Only AVAILABILITY is supported today; additional include values may be added in the future.",
2246
+ description: "Catalog include expansion. `AVAILABILITY` is the only supported value.",
2222
2247
  enum: ["AVAILABILITY"]
2223
2248
  },
2224
2249
  CpuProduct: {
@@ -2444,7 +2469,7 @@ var generatedTools = [
2444
2469
  items: {
2445
2470
  $ref: "#/$defs/CatalogInclude"
2446
2471
  },
2447
- description: "Comma-separated optional expansions. Supported value today: AVAILABILITY. This may expand with more include values in the future."
2472
+ description: "Comma-separated optional expansions; see `CatalogInclude` for the supported values."
2448
2473
  },
2449
2474
  product: {
2450
2475
  type: "array",
@@ -2490,7 +2515,7 @@ var generatedTools = [
2490
2515
  $defs: {
2491
2516
  CatalogInclude: {
2492
2517
  type: "string",
2493
- description: "Catalog include expansion. Only AVAILABILITY is supported today; additional include values may be added in the future.",
2518
+ description: "Catalog include expansion. `AVAILABILITY` is the only supported value.",
2494
2519
  enum: ["AVAILABILITY"]
2495
2520
  },
2496
2521
  GpuCloudFilter: {
@@ -2557,6 +2582,37 @@ var generatedTools = [
2557
2582
  properties: {}
2558
2583
  }
2559
2584
  },
2585
+ {
2586
+ name: "get-organization-user",
2587
+ title: "Get organization user",
2588
+ operationId: "getOrganizationUser",
2589
+ 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.",
2590
+ method: "GET",
2591
+ path: "/v2/organization/users/{id}",
2592
+ params: [
2593
+ {
2594
+ name: "id",
2595
+ location: "path"
2596
+ }
2597
+ ],
2598
+ hasBody: false,
2599
+ annotations: {
2600
+ readOnlyHint: true,
2601
+ destructiveHint: false,
2602
+ idempotentHint: true,
2603
+ openWorldHint: true
2604
+ },
2605
+ inputSchema: {
2606
+ type: "object",
2607
+ properties: {
2608
+ id: {
2609
+ type: "string",
2610
+ description: "User identifier"
2611
+ }
2612
+ },
2613
+ required: ["id"]
2614
+ }
2615
+ },
2560
2616
  {
2561
2617
  name: "get-pod",
2562
2618
  title: "Get Pod",
@@ -2699,6 +2755,99 @@ var generatedTools = [
2699
2755
  required: ["id"]
2700
2756
  }
2701
2757
  },
2758
+ {
2759
+ name: "list-audit-logs",
2760
+ title: "List audit logs",
2761
+ operationId: "listAuditLogs",
2762
+ 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.",
2763
+ 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.",
2764
+ method: "GET",
2765
+ path: "/v2/audit-logs",
2766
+ params: [
2767
+ {
2768
+ name: "actorIds",
2769
+ location: "query",
2770
+ explode: false
2771
+ },
2772
+ {
2773
+ name: "actions",
2774
+ location: "query",
2775
+ explode: false
2776
+ },
2777
+ {
2778
+ name: "startTime",
2779
+ location: "query"
2780
+ },
2781
+ {
2782
+ name: "endTime",
2783
+ location: "query"
2784
+ },
2785
+ {
2786
+ name: "search",
2787
+ location: "query"
2788
+ },
2789
+ {
2790
+ name: "cursor",
2791
+ location: "query"
2792
+ },
2793
+ {
2794
+ name: "limit",
2795
+ location: "query"
2796
+ }
2797
+ ],
2798
+ hasBody: false,
2799
+ annotations: {
2800
+ readOnlyHint: true,
2801
+ destructiveHint: false,
2802
+ idempotentHint: true,
2803
+ openWorldHint: true
2804
+ },
2805
+ inputSchema: {
2806
+ type: "object",
2807
+ properties: {
2808
+ actorIds: {
2809
+ type: "array",
2810
+ items: {
2811
+ type: "string"
2812
+ },
2813
+ 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."
2814
+ },
2815
+ actions: {
2816
+ type: "array",
2817
+ items: {
2818
+ type: "string"
2819
+ },
2820
+ description: "Only return entries whose `action` is one of these names, matched exactly as recorded. Comma-separated."
2821
+ },
2822
+ startTime: {
2823
+ type: "string",
2824
+ format: "date-time",
2825
+ 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."
2826
+ },
2827
+ endTime: {
2828
+ type: "string",
2829
+ format: "date-time",
2830
+ description: "Latest instant to include, inclusive (RFC 3339). Must be after `startTime` when both are given; 400 otherwise."
2831
+ },
2832
+ search: {
2833
+ type: "string",
2834
+ minLength: 1,
2835
+ description: "Case-insensitive substring match against `email`, `resourceType`, `resourceId`, `action` and `value`; `actorId` is not searched. Surrounding whitespace is ignored."
2836
+ },
2837
+ cursor: {
2838
+ type: "string",
2839
+ minLength: 1,
2840
+ 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."
2841
+ },
2842
+ limit: {
2843
+ type: "integer",
2844
+ minimum: 1,
2845
+ maximum: 200,
2846
+ description: "Page size, 1\u2013200. Defaults to 200 when omitted."
2847
+ }
2848
+ }
2849
+ }
2850
+ },
2702
2851
  {
2703
2852
  name: "list-billing",
2704
2853
  title: "List billing",
@@ -2759,13 +2908,6 @@ var generatedTools = [
2759
2908
  BillingBucketSize: {
2760
2909
  type: "string",
2761
2910
  enum: ["hour", "day", "week", "month", "year"],
2762
- "x-enum-varnames": [
2763
- "BillingBucketSizeHour",
2764
- "BillingBucketSizeDay",
2765
- "BillingBucketSizeWeek",
2766
- "BillingBucketSizeMonth",
2767
- "BillingBucketSizeYear"
2768
- ],
2769
2911
  default: "day",
2770
2912
  description: "Length of each billing time bucket.",
2771
2913
  examples: ["day"]
@@ -2841,13 +2983,6 @@ var generatedTools = [
2841
2983
  BillingBucketSize: {
2842
2984
  type: "string",
2843
2985
  enum: ["hour", "day", "week", "month", "year"],
2844
- "x-enum-varnames": [
2845
- "BillingBucketSizeHour",
2846
- "BillingBucketSizeDay",
2847
- "BillingBucketSizeWeek",
2848
- "BillingBucketSizeMonth",
2849
- "BillingBucketSizeYear"
2850
- ],
2851
2986
  default: "day",
2852
2987
  description: "Length of each billing time bucket.",
2853
2988
  examples: ["day"]
@@ -2966,7 +3101,7 @@ var generatedTools = [
2966
3101
  items: {
2967
3102
  $ref: "#/$defs/CatalogInclude"
2968
3103
  },
2969
- description: "Comma-separated optional expansions. Supported value today: AVAILABILITY. This may expand with more include values in the future."
3104
+ description: "Comma-separated optional expansions; see `CatalogInclude` for the supported values."
2970
3105
  },
2971
3106
  product: {
2972
3107
  type: "array",
@@ -2985,7 +3120,7 @@ var generatedTools = [
2985
3120
  $defs: {
2986
3121
  CatalogInclude: {
2987
3122
  type: "string",
2988
- description: "Catalog include expansion. Only AVAILABILITY is supported today; additional include values may be added in the future.",
3123
+ description: "Catalog include expansion. `AVAILABILITY` is the only supported value.",
2989
3124
  enum: ["AVAILABILITY"]
2990
3125
  },
2991
3126
  CpuProduct: {
@@ -3204,13 +3339,6 @@ var generatedTools = [
3204
3339
  BillingBucketSize: {
3205
3340
  type: "string",
3206
3341
  enum: ["hour", "day", "week", "month", "year"],
3207
- "x-enum-varnames": [
3208
- "BillingBucketSizeHour",
3209
- "BillingBucketSizeDay",
3210
- "BillingBucketSizeWeek",
3211
- "BillingBucketSizeMonth",
3212
- "BillingBucketSizeYear"
3213
- ],
3214
3342
  default: "day",
3215
3343
  description: "Length of each billing time bucket.",
3216
3344
  examples: ["day"]
@@ -3447,7 +3575,7 @@ var generatedTools = [
3447
3575
  items: {
3448
3576
  $ref: "#/$defs/CatalogInclude"
3449
3577
  },
3450
- description: "Comma-separated optional expansions. Supported value today: AVAILABILITY. This may expand with more include values in the future."
3578
+ description: "Comma-separated optional expansions; see `CatalogInclude` for the supported values."
3451
3579
  },
3452
3580
  product: {
3453
3581
  type: "array",
@@ -3492,7 +3620,7 @@ var generatedTools = [
3492
3620
  $defs: {
3493
3621
  CatalogInclude: {
3494
3622
  type: "string",
3495
- description: "Catalog include expansion. Only AVAILABILITY is supported today; additional include values may be added in the future.",
3623
+ description: "Catalog include expansion. `AVAILABILITY` is the only supported value.",
3496
3624
  enum: ["AVAILABILITY"]
3497
3625
  },
3498
3626
  GpuCloudFilter: {
@@ -3576,13 +3704,6 @@ var generatedTools = [
3576
3704
  BillingBucketSize: {
3577
3705
  type: "string",
3578
3706
  enum: ["hour", "day", "week", "month", "year"],
3579
- "x-enum-varnames": [
3580
- "BillingBucketSizeHour",
3581
- "BillingBucketSizeDay",
3582
- "BillingBucketSizeWeek",
3583
- "BillingBucketSizeMonth",
3584
- "BillingBucketSizeYear"
3585
- ],
3586
3707
  default: "day",
3587
3708
  description: "Length of each billing time bucket.",
3588
3709
  examples: ["day"]
@@ -3631,6 +3752,26 @@ var generatedTools = [
3631
3752
  }
3632
3753
  }
3633
3754
  },
3755
+ {
3756
+ name: "list-organization-users",
3757
+ title: "List organization users",
3758
+ operationId: "listOrganizationUsers",
3759
+ 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.",
3760
+ method: "GET",
3761
+ path: "/v2/organization/users",
3762
+ params: [],
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
+ }
3774
+ },
3634
3775
  {
3635
3776
  name: "list-pod-billing",
3636
3777
  title: "List Pod billing",
@@ -3699,13 +3840,6 @@ var generatedTools = [
3699
3840
  BillingBucketSize: {
3700
3841
  type: "string",
3701
3842
  enum: ["hour", "day", "week", "month", "year"],
3702
- "x-enum-varnames": [
3703
- "BillingBucketSizeHour",
3704
- "BillingBucketSizeDay",
3705
- "BillingBucketSizeWeek",
3706
- "BillingBucketSizeMonth",
3707
- "BillingBucketSizeYear"
3708
- ],
3709
3843
  default: "day",
3710
3844
  description: "Length of each billing time bucket.",
3711
3845
  examples: ["day"]
@@ -3914,13 +4048,6 @@ var generatedTools = [
3914
4048
  BillingBucketSize: {
3915
4049
  type: "string",
3916
4050
  enum: ["hour", "day", "week", "month", "year"],
3917
- "x-enum-varnames": [
3918
- "BillingBucketSizeHour",
3919
- "BillingBucketSizeDay",
3920
- "BillingBucketSizeWeek",
3921
- "BillingBucketSizeMonth",
3922
- "BillingBucketSizeYear"
3923
- ],
3924
4051
  default: "day",
3925
4052
  description: "Length of each billing time bucket.",
3926
4053
  examples: ["day"]
@@ -4139,7 +4266,7 @@ var generatedTools = [
4139
4266
  description: "Environment variables as key-value pairs",
4140
4267
  examples: [
4141
4268
  {
4142
- JUPYTER_PASSWORD: "hunter2"
4269
+ JUPYTER_PASSWORD: "changeme"
4143
4270
  }
4144
4271
  ]
4145
4272
  },
@@ -4236,7 +4363,7 @@ var generatedTools = [
4236
4363
  type: "object",
4237
4364
  required: ["volumeId"],
4238
4365
  additionalProperties: false,
4239
- description: "A volume mounted on every worker, always at `/runpod-volume`. Custom paths are not supported yet.",
4366
+ description: "A volume mounted on every worker, always at `/runpod-volume`.",
4240
4367
  properties: {
4241
4368
  volumeId: {
4242
4369
  type: "string",
@@ -4496,7 +4623,6 @@ var generatedTools = [
4496
4623
  type: "string",
4497
4624
  minLength: 1,
4498
4625
  maxLength: 191,
4499
- pattern: "[^\\p{Z}\\t-\\r\x85]",
4500
4626
  description: "New human-readable name, 1\u2013191 characters with at least one non-whitespace character. Leading and trailing whitespace is trimmed.",
4501
4627
  examples: ["renamed-volume"]
4502
4628
  }
@@ -4642,7 +4768,7 @@ var generatedTools = [
4642
4768
  description: "Environment variables as key-value pairs",
4643
4769
  examples: [
4644
4770
  {
4645
- JUPYTER_PASSWORD: "hunter2"
4771
+ JUPYTER_PASSWORD: "changeme"
4646
4772
  }
4647
4773
  ]
4648
4774
  },
@@ -4780,7 +4906,7 @@ var generatedTools = [
4780
4906
  properties: {
4781
4907
  globalNetworking: {
4782
4908
  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)."
4909
+ 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
4910
  },
4785
4911
  locked: {
4786
4912
  type: "boolean",
@@ -4927,7 +5053,7 @@ var generatedTools = [
4927
5053
  hasBody: true,
4928
5054
  annotations: {
4929
5055
  readOnlyHint: false,
4930
- destructiveHint: false,
5056
+ destructiveHint: true,
4931
5057
  idempotentHint: true,
4932
5058
  openWorldHint: true
4933
5059
  },
@@ -4989,7 +5115,7 @@ var generatedTools = [
4989
5115
  description: "Environment variables as key-value pairs",
4990
5116
  examples: [
4991
5117
  {
4992
- JUPYTER_PASSWORD: "hunter2"
5118
+ JUPYTER_PASSWORD: "changeme"
4993
5119
  }
4994
5120
  ]
4995
5121
  },
@@ -5109,8 +5235,188 @@ var generatedTools = [
5109
5235
  }
5110
5236
  ];
5111
5237
 
5238
+ // src/specgen/tools/annotations.ts
5239
+ var readOnly = {
5240
+ readOnlyHint: true,
5241
+ destructiveHint: false,
5242
+ idempotentHint: true,
5243
+ openWorldHint: true
5244
+ };
5245
+ var bundledRead = {
5246
+ readOnlyHint: true,
5247
+ destructiveHint: false,
5248
+ idempotentHint: true,
5249
+ openWorldHint: false
5250
+ };
5251
+ var write = {
5252
+ readOnlyHint: false,
5253
+ destructiveHint: false,
5254
+ idempotentHint: false,
5255
+ openWorldHint: true
5256
+ };
5257
+ var idempotentWrite = {
5258
+ readOnlyHint: false,
5259
+ destructiveHint: false,
5260
+ idempotentHint: true,
5261
+ openWorldHint: true
5262
+ };
5263
+ var destructive = {
5264
+ readOnlyHint: false,
5265
+ destructiveHint: true,
5266
+ idempotentHint: true,
5267
+ openWorldHint: true
5268
+ };
5269
+ var destructiveWrite = {
5270
+ readOnlyHint: false,
5271
+ destructiveHint: true,
5272
+ idempotentHint: false,
5273
+ openWorldHint: true
5274
+ };
5275
+
5276
+ // src/specgen/clients/http-error.ts
5277
+ var HttpError = class extends Error {
5278
+ constructor(message, status, payload = void 0) {
5279
+ super(message);
5280
+ this.status = status;
5281
+ this.payload = payload;
5282
+ this.name = "HttpError";
5283
+ }
5284
+ };
5285
+ function missingKeyError() {
5286
+ return new HttpError(
5287
+ "No Runpod API key: the request carried no usable credential.",
5288
+ 401
5289
+ );
5290
+ }
5291
+
5292
+ // src/specgen/tools/util.ts
5293
+ function ok(payload) {
5294
+ return { ok: true, status: 200, payload };
5295
+ }
5296
+ function badRequest(message) {
5297
+ return { ok: false, status: 400, payload: { error: message } };
5298
+ }
5299
+ function isTimeout(error) {
5300
+ if (!(error instanceof Error)) return false;
5301
+ if (error.name === "TimeoutError" || error.name === "AbortError") return true;
5302
+ const cause = error.cause;
5303
+ return cause instanceof Error && (cause.name === "TimeoutError" || cause.name === "AbortError");
5304
+ }
5305
+ var UNREACHED_CODES = /* @__PURE__ */ new Set([
5306
+ "ENOTFOUND",
5307
+ "EAI_AGAIN",
5308
+ "ECONNREFUSED",
5309
+ "EHOSTUNREACH",
5310
+ "ENETUNREACH",
5311
+ "UND_ERR_CONNECT_TIMEOUT"
5312
+ ]);
5313
+ var TLS_CODE = /^(?:CERT_|ERR_TLS_|UNABLE_TO_|DEPTH_ZERO_|SELF_SIGNED_)/;
5314
+ function causeCode(cause) {
5315
+ const code = cause?.code;
5316
+ if (typeof code === "string") return code;
5317
+ const inner = cause instanceof AggregateError ? cause.errors[0] : void 0;
5318
+ const innerCode = inner?.code;
5319
+ return typeof innerCode === "string" ? innerCode : void 0;
5320
+ }
5321
+ function networkFailureResult(error) {
5322
+ if (!(error instanceof TypeError)) return void 0;
5323
+ const afterHeaders = error.message === "terminated";
5324
+ if (!afterHeaders && error.message !== "fetch failed") return void 0;
5325
+ const code = causeCode(error.cause);
5326
+ if (!code) return void 0;
5327
+ const unreached = !afterHeaders && (UNREACHED_CODES.has(code) || TLS_CODE.test(code));
5328
+ return {
5329
+ ok: false,
5330
+ status: unreached ? 503 : 502,
5331
+ requestDelivery: unreached ? "not_sent" : "uncertain",
5332
+ payload: unreached ? {
5333
+ error: "Could not reach the Runpod API.",
5334
+ cause: code,
5335
+ 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."
5336
+ } : {
5337
+ error: "The connection to the Runpod API dropped before the full response arrived.",
5338
+ cause: code,
5339
+ 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."
5340
+ }
5341
+ };
5342
+ }
5343
+ async function runTool(body) {
5344
+ try {
5345
+ return await body();
5346
+ } catch (error) {
5347
+ if (error instanceof HttpError) {
5348
+ return {
5349
+ ok: false,
5350
+ status: error.status,
5351
+ payload: { error: error.message, detail: error.payload }
5352
+ };
5353
+ }
5354
+ if (isTimeout(error)) {
5355
+ return {
5356
+ ok: false,
5357
+ status: 504,
5358
+ requestDelivery: "uncertain",
5359
+ payload: {
5360
+ error: "The Runpod API did not respond before the request deadline.",
5361
+ hint: "Transient upstream stall: retry the same call once; if it persists, check https://uptime.runpod.io."
5362
+ }
5363
+ };
5364
+ }
5365
+ const network = networkFailureResult(error);
5366
+ if (network) return network;
5367
+ throw error;
5368
+ }
5369
+ }
5370
+
5371
+ // src/specgen/tools/pod-transitions.ts
5372
+ var podAction = generatedTools.find((tool) => tool.name === "pod-action");
5373
+ if (!podAction)
5374
+ throw new Error("pod-action is missing from the generated tools");
5375
+ var POD_ID = {
5376
+ type: "object",
5377
+ properties: { id: { type: "string", description: "ID of the Pod" } },
5378
+ required: ["id"],
5379
+ additionalProperties: false
5380
+ };
5381
+ function transition(action, title, description, annotations) {
5382
+ return {
5383
+ name: `${action}-pod`,
5384
+ title,
5385
+ description,
5386
+ inputSchema: POD_ID,
5387
+ annotations,
5388
+ handler: (ctx, args) => runTool(
5389
+ () => dispatchGeneratedTool(ctx.sdk, podAction, {
5390
+ id: args.id,
5391
+ body: { action }
5392
+ })
5393
+ )
5394
+ };
5395
+ }
5396
+ var podTransitionTools = [
5397
+ transition(
5398
+ "start",
5399
+ "Start Pod",
5400
+ "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.",
5401
+ write
5402
+ ),
5403
+ transition(
5404
+ "stop",
5405
+ "Stop Pod",
5406
+ "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.",
5407
+ destructiveWrite
5408
+ ),
5409
+ transition(
5410
+ "restart",
5411
+ "Restart Pod",
5412
+ "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.",
5413
+ destructiveWrite
5414
+ )
5415
+ ];
5416
+
5112
5417
  // src/specgen/profile.ts
5113
5418
  var IN = { include: true };
5419
+ var CREDENTIAL_MANAGEMENT = "Manages stored credentials; OpenAI restricts plugins that handle access credentials, so the directory leaves the whole credential family out.";
5114
5420
  var CREDENTIAL_INPUT = "Takes a secret or password as input; directories forbid collecting credentials.";
5115
5421
  var ALP = "Collects conversation-derived data beyond the task; the directory profile never serves it.";
5116
5422
  var DIRECTORY_TOOLS = {
@@ -5127,8 +5433,6 @@ var DIRECTORY_TOOLS = {
5127
5433
  "delete-global-volume": IN,
5128
5434
  "delete-network-volume": IN,
5129
5435
  "delete-pod": IN,
5130
- "delete-registry": IN,
5131
- "delete-secret": IN,
5132
5436
  "delete-template": IN,
5133
5437
  "deploy-hub-repo": IN,
5134
5438
  "endpoint-health": IN,
@@ -5143,11 +5447,11 @@ var DIRECTORY_TOOLS = {
5143
5447
  "get-job-status": IN,
5144
5448
  "get-network-volume": IN,
5145
5449
  "get-organization": IN,
5450
+ "get-organization-user": IN,
5146
5451
  "get-pod": IN,
5147
- "get-registry": IN,
5148
- "get-secret": IN,
5149
5452
  "get-ssh-keys": IN,
5150
5453
  "get-template": IN,
5454
+ "list-audit-logs": IN,
5151
5455
  "list-billing": IN,
5152
5456
  "list-cluster-billing": IN,
5153
5457
  "list-cluster-pods": IN,
@@ -5165,16 +5469,14 @@ var DIRECTORY_TOOLS = {
5165
5469
  "list-hub-repos": IN,
5166
5470
  "list-network-volume-billing": IN,
5167
5471
  "list-network-volumes": IN,
5472
+ "list-organization-users": IN,
5168
5473
  "list-pod-billing": IN,
5169
5474
  "list-pods": IN,
5170
5475
  "list-public-endpoints": IN,
5171
5476
  "list-public-templates": IN,
5172
- "list-registries": IN,
5173
- "list-secrets": IN,
5174
5477
  "list-serverless-billing": IN,
5175
5478
  "list-templates": IN,
5176
5479
  "lookup-concept": IN,
5177
- "pod-action": IN,
5178
5480
  "purge-endpoint-queue": IN,
5179
5481
  "retry-job": IN,
5180
5482
  "revoke-delegation": IN,
@@ -5193,6 +5495,13 @@ var DIRECTORY_TOOLS = {
5193
5495
  "update-template": IN,
5194
5496
  "run-endpoint": { include: true, omitInputs: ["s3Config"] },
5195
5497
  "runsync-endpoint": { include: true, omitInputs: ["s3Config"] },
5498
+ "pod-action": {
5499
+ include: false,
5500
+ 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)."
5501
+ },
5502
+ "start-pod": IN,
5503
+ "stop-pod": IN,
5504
+ "restart-pod": IN,
5196
5505
  "list-guides": {
5197
5506
  include: false,
5198
5507
  reason: "Serves playbooks that instruct the model how to behave."
@@ -5206,6 +5515,12 @@ var DIRECTORY_TOOLS = {
5206
5515
  reason: "Fetches schemas the directory already lists in full; directories reject schema fetching."
5207
5516
  },
5208
5517
  "create-secret": { include: false, reason: CREDENTIAL_INPUT },
5518
+ "get-secret": { include: false, reason: CREDENTIAL_MANAGEMENT },
5519
+ "list-secrets": { include: false, reason: CREDENTIAL_MANAGEMENT },
5520
+ "delete-secret": { include: false, reason: CREDENTIAL_MANAGEMENT },
5521
+ "get-registry": { include: false, reason: CREDENTIAL_MANAGEMENT },
5522
+ "list-registries": { include: false, reason: CREDENTIAL_MANAGEMENT },
5523
+ "delete-registry": { include: false, reason: CREDENTIAL_MANAGEMENT },
5209
5524
  "update-secret": { include: false, reason: CREDENTIAL_INPUT },
5210
5525
  "create-registry": { include: false, reason: CREDENTIAL_INPUT },
5211
5526
  report_feedback: { include: false, reason: ALP },
@@ -5320,137 +5635,6 @@ function capList(items, options, extra) {
5320
5635
  };
5321
5636
  }
5322
5637
 
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
5638
  // src/specgen/tools/capacity.ts
5455
5639
  var CUDA_VERSION_REGEX = /^\d{1,2}\.\d{1,2}$/;
5456
5640
  var MAX_PROBE_VERSIONS = 12;
@@ -6813,7 +6997,7 @@ var listTemplates = {
6813
6997
  }
6814
6998
  };
6815
6999
 
6816
- // node_modules/.pnpm/@runpod+typescript-api-sdk@0.3.0/node_modules/@runpod/typescript-api-sdk/dist/index.js
7000
+ // packages/typescript-api-sdk/dist/index.js
6817
7001
  var PATH_PARAM_RE = /\{[^{}]+\}/g;
6818
7002
  var supportsRequestInitExt = () => {
6819
7003
  return typeof process === "object" && Number.parseInt(process?.versions?.node?.substring(0, 2)) >= 18 && process.versions.undici;
@@ -7385,10 +7569,7 @@ var Parser = class {
7385
7569
  parseItem(standaloneItem = true) {
7386
7570
  if (standaloneItem)
7387
7571
  this.skipWS();
7388
- const result = [
7389
- this.parseBareItem(),
7390
- this.parseParameters()
7391
- ];
7572
+ const result = [this.parseBareItem(), this.parseParameters()];
7392
7573
  if (standaloneItem)
7393
7574
  this.checkTrail();
7394
7575
  return result;
@@ -7408,10 +7589,7 @@ var Parser = class {
7408
7589
  this.skipWS();
7409
7590
  if (this.lookChar() === ")") {
7410
7591
  this.pos++;
7411
- return [
7412
- innerList,
7413
- this.parseParameters()
7414
- ];
7592
+ return [innerList, this.parseParameters()];
7415
7593
  }
7416
7594
  innerList.push(this.parseItem(false));
7417
7595
  const nextChar = this.lookChar();
@@ -7998,7 +8176,6 @@ var LogEventParser = class {
7998
8176
  constructor(maxEventBytes) {
7999
8177
  this.maxEventBytes = maxEventBytes;
8000
8178
  }
8001
- maxEventBytes;
8002
8179
  line = "";
8003
8180
  dataLines = [];
8004
8181
  eventName = "";
@@ -8744,7 +8921,9 @@ function listTool(tool, profile = "default") {
8744
8921
  tool.directoryDescription ?? tool.description,
8745
8922
  inputSchema
8746
8923
  ),
8747
- inputSchema: withoutInputs(inputSchema, directoryOmittedInputs(name)),
8924
+ inputSchema: withoutCredentialExamples(
8925
+ withoutInputs(inputSchema, directoryOmittedInputs(name))
8926
+ ),
8748
8927
  annotations
8749
8928
  };
8750
8929
  const { description } = tool;
@@ -8766,6 +8945,21 @@ function withApiReference(description, schema) {
8766
8945
  const sentence = /[.!?]$/.test(trimmed) ? trimmed : `${trimmed}.`;
8767
8946
  return `${sentence} ${DIRECTORY_API_REFERENCE}`;
8768
8947
  }
8948
+ var CREDENTIAL = /pass(word|wd|phrase)?|secret|token(?!s)|api_?key|private_?key|credential/i;
8949
+ function withoutCredentialExamples(schema) {
8950
+ const strip = (node) => {
8951
+ if (Array.isArray(node)) return node.map(strip);
8952
+ if (!node || typeof node !== "object") return node;
8953
+ const out = {};
8954
+ for (const [key, value] of Object.entries(node)) {
8955
+ if (key === "examples" && CREDENTIAL.test(JSON.stringify(value)))
8956
+ continue;
8957
+ out[key] = strip(value);
8958
+ }
8959
+ return out;
8960
+ };
8961
+ return strip(schema);
8962
+ }
8769
8963
  function withoutInputs(schema, omit) {
8770
8964
  if (!omit.length) return schema;
8771
8965
  const properties = { ...schema.properties ?? {} };
@@ -8939,6 +9133,7 @@ function captureToolCall(apiKey, event) {
8939
9133
  ...event.clientName ? { client_name: event.clientName } : {},
8940
9134
  ...event.guideKind ? { guide_kind: event.guideKind } : {},
8941
9135
  ...event.blockedBy ? { blocked_by: event.blockedBy } : {},
9136
+ ...event.profile ? { profile: event.profile } : {},
8942
9137
  ...args
8943
9138
  });
8944
9139
  }
@@ -9718,8 +9913,10 @@ PLAYBOOKS \u2014 READ BEFORE ACTING. Each Runpod task has a journey playbook car
9718
9913
 
9719
9914
  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
9915
 
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.`;
9916
+ 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.
9917
+
9918
+ 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.`;
9919
+ 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
9920
  var ALP_INSTRUCTIONS = `
9724
9921
 
9725
9922
  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 +9934,7 @@ function createSpecgenServer(ctx, version = "0.1.0", opts = {}) {
9737
9934
  ...curatedTools,
9738
9935
  ...opts.search ? [createSearchDocsTool(opts.search)] : [],
9739
9936
  ...alp ? createAlpTools(alp) : [],
9937
+ ...directory ? podTransitionTools : [],
9740
9938
  createDescribeTool(() => [...servedCuratedTools, ...servedGeneratedTools])
9741
9939
  ].filter((tool) => !directory || directoryIncludes(tool.name));
9742
9940
  const callShapeOnlyTools = new Set(
@@ -9812,6 +10010,7 @@ function createSpecgenServer(ctx, version = "0.1.0", opts = {}) {
9812
10010
  status: 429,
9813
10011
  durationMs: 0,
9814
10012
  ...verdict.reason ? { blockedBy: verdict.reason } : {},
10013
+ profile,
9815
10014
  ...opts.analytics
9816
10015
  });
9817
10016
  }
@@ -9832,6 +10031,9 @@ function createSpecgenServer(ctx, version = "0.1.0", opts = {}) {
9832
10031
  const curated = servedCuratedTools.find(
9833
10032
  (tool) => tool.name === request.params.name
9834
10033
  );
10034
+ const generated = servedGeneratedTools.find(
10035
+ (tool) => tool.name === request.params.name
10036
+ );
9835
10037
  const omitted = directory ? directoryOmittedInputs(request.params.name).filter((key) => key in args) : [];
9836
10038
  const rejected = omitted.length ? {
9837
10039
  ok: false,
@@ -9844,7 +10046,7 @@ function createSpecgenServer(ctx, version = "0.1.0", opts = {}) {
9844
10046
  args
9845
10047
  ) : null;
9846
10048
  const result = rejected ?? await runTool(
9847
- () => curated ? curated.handler(ctx, args) : dispatchTool(request.params.name, args)
10049
+ () => curated ? curated.handler(ctx, args) : dispatchTool(generated, request.params.name, args)
9848
10050
  );
9849
10051
  logToolCall({
9850
10052
  tool: request.params.name,
@@ -9864,23 +10066,27 @@ function createSpecgenServer(ctx, version = "0.1.0", opts = {}) {
9864
10066
  args: recordedArgumentValues(curated?.recordedArguments, args),
9865
10067
  guideKind: curated?.recordedGuideKind?.(args)
9866
10068
  },
10069
+ profile,
9867
10070
  ...opts.analytics
9868
10071
  });
9869
10072
  }
9870
10073
  opts.onToolResult?.(request.params.name, result.status);
9871
10074
  if (!result.ok && result.status === 401) opts.onUnauthorized?.();
10075
+ const annotations = curated?.annotations ?? generated?.annotations;
9872
10076
  const payload = redactSecretEnv(
9873
- result.ok ? result.payload : withRecoveryHint(result, callShapeOnlyTools.has(request.params.name))
10077
+ result.ok ? result.payload : withRecoveryHint(
10078
+ result,
10079
+ annotations?.idempotentHint === true,
10080
+ request.params.name,
10081
+ callShapeOnlyTools.has(request.params.name)
10082
+ )
9874
10083
  );
9875
10084
  return {
9876
10085
  content: [{ type: "text", text: JSON.stringify(payload, null, 2) }],
9877
10086
  isError: !result.ok
9878
10087
  };
9879
10088
  });
9880
- async function dispatchTool(name, args) {
9881
- const tool = servedGeneratedTools.find(
9882
- (candidate) => candidate.name === name
9883
- );
10089
+ async function dispatchTool(tool, name, args) {
9884
10090
  if (!tool)
9885
10091
  return {
9886
10092
  ok: false,
@@ -9928,8 +10134,24 @@ function errorHint(status, detail) {
9928
10134
  return void 0;
9929
10135
  }
9930
10136
  var CALL_SHAPE_ONLY_HINT = `This tool lists its call shape only; ${DESCRIBE_TOOL_NAME} serves the full argument schema.`;
9931
- function withRecoveryHint(result, listsCallShapeOnly = false) {
10137
+ 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.";
10138
+ 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.";
10139
+ 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.";
10140
+ var JOB_SUBMISSION_TOOLS = /* @__PURE__ */ new Set(["run-endpoint", "runsync-endpoint"]);
10141
+ function withRecoveryHint(result, idempotent, toolName, listsCallShapeOnly = false) {
9932
10142
  const payload = asRecord(result.payload) ?? { error: result.payload };
10143
+ if (!idempotent && result.status >= 500 && result.requestDelivery !== "not_sent") {
10144
+ const detail = asRecord(payload.detail);
10145
+ const safeDetail = detail ? { ...detail } : void 0;
10146
+ if (safeDetail) delete safeDetail.hint;
10147
+ return {
10148
+ ...payload,
10149
+ ...safeDetail ? { detail: safeDetail } : {},
10150
+ ...payload.code !== void 0 ? { upstreamCode: payload.code } : {},
10151
+ code: "outcome_unknown",
10152
+ hint: toolName === "retry-job" ? RETRY_JOB_OUTCOME_UNKNOWN_HINT : JOB_SUBMISSION_TOOLS.has(toolName) ? JOB_OUTCOME_UNKNOWN_HINT : OUTCOME_UNKNOWN_HINT
10153
+ };
10154
+ }
9933
10155
  const hint = payload.hint ?? asRecord(payload.detail)?.hint ?? errorHint(result.status, detailText(payload));
9934
10156
  const shapeRejected = result.status === 400 || result.status === 422;
9935
10157
  return {
@@ -9978,7 +10200,7 @@ if (subcommand === "--version" || subcommand === "-v") {
9978
10200
  ].join("\n")
9979
10201
  );
9980
10202
  } else if (isWizardMode) {
9981
- import("./wizard-KKTBTVXE.mjs").then(async ({ runWizard }) => {
10203
+ import("./wizard-NVV3UNOG.mjs").then(async ({ runWizard }) => {
9982
10204
  process.exitCode = await runWizard(subcommand);
9983
10205
  }).catch((error) => {
9984
10206
  console.error(error instanceof Error ? error.message : String(error));