@runpod/mcp-server 4.7.0 → 4.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/README.md +9 -0
- package/dist/alp.cjs +319 -0
- package/dist/alp.cjs.map +1 -0
- package/dist/alp.d.cts +20 -0
- package/dist/alp.d.ts +20 -0
- package/dist/alp.mjs +25 -0
- package/dist/alp.mjs.map +1 -0
- package/dist/chunk-577IYCJT.mjs +53 -0
- package/dist/chunk-577IYCJT.mjs.map +1 -0
- package/dist/chunk-6IETGSON.mjs +135 -0
- package/dist/chunk-6IETGSON.mjs.map +1 -0
- package/dist/chunk-H3NZYQIB.mjs +236 -0
- package/dist/chunk-H3NZYQIB.mjs.map +1 -0
- package/dist/chunk-VKLWTK4O.mjs +10671 -0
- package/dist/chunk-VKLWTK4O.mjs.map +1 -0
- package/dist/hosted.cjs +11272 -0
- package/dist/hosted.cjs.map +1 -0
- package/dist/hosted.d.cts +58 -0
- package/dist/hosted.d.ts +58 -0
- package/dist/hosted.mjs +241 -0
- package/dist/hosted.mjs.map +1 -0
- package/dist/http-BaACCis6.d.cts +75 -0
- package/dist/http-BcFDW7LG.d.ts +75 -0
- package/dist/http.cjs +115 -8
- package/dist/http.cjs.map +1 -1
- package/dist/http.d.cts +5 -78
- package/dist/http.d.ts +5 -78
- package/dist/http.mjs +13 -10602
- package/dist/http.mjs.map +1 -1
- package/dist/sink-Cm8lp16D.d.cts +17 -0
- package/dist/sink-Cm8lp16D.d.ts +17 -0
- package/dist/specgen/profile.cjs +163 -0
- package/dist/specgen/profile.cjs.map +1 -0
- package/dist/specgen/profile.d.cts +22 -0
- package/dist/specgen/profile.d.ts +22 -0
- package/dist/specgen/profile.mjs +15 -0
- package/dist/specgen/profile.mjs.map +1 -0
- package/dist/stdio.cjs +115 -8
- package/dist/stdio.cjs.map +1 -1
- package/dist/stdio.mjs +115 -8
- package/dist/stdio.mjs.map +1 -1
- package/package.json +17 -2
package/dist/http.cjs
CHANGED
|
@@ -566,9 +566,36 @@ var generatedTools = [
|
|
|
566
566
|
},
|
|
567
567
|
ClusterMounts: {
|
|
568
568
|
description: "Storage mounts for a cluster create: `persistent` or `network`, not both. Clusters cannot mount global volumes, so `global` is rejected.",
|
|
569
|
+
"x-go-type": "BaseMounts",
|
|
569
570
|
allOf: [
|
|
570
571
|
{
|
|
571
572
|
$ref: "#/$defs/BaseMounts"
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
type: "object",
|
|
576
|
+
properties: {
|
|
577
|
+
persistent: {
|
|
578
|
+
type: "object",
|
|
579
|
+
properties: {
|
|
580
|
+
path: {
|
|
581
|
+
type: "string",
|
|
582
|
+
minLength: 1
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
},
|
|
586
|
+
network: {
|
|
587
|
+
type: "array",
|
|
588
|
+
items: {
|
|
589
|
+
type: "object",
|
|
590
|
+
properties: {
|
|
591
|
+
path: {
|
|
592
|
+
type: "string",
|
|
593
|
+
minLength: 1
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
}
|
|
572
599
|
}
|
|
573
600
|
],
|
|
574
601
|
unevaluatedProperties: false
|
|
@@ -2644,6 +2671,37 @@ var generatedTools = [
|
|
|
2644
2671
|
properties: {}
|
|
2645
2672
|
}
|
|
2646
2673
|
},
|
|
2674
|
+
{
|
|
2675
|
+
name: "get-organization-user",
|
|
2676
|
+
title: "Get organization user",
|
|
2677
|
+
operationId: "getOrganizationUser",
|
|
2678
|
+
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.",
|
|
2679
|
+
method: "GET",
|
|
2680
|
+
path: "/v2/organization/users/{id}",
|
|
2681
|
+
params: [
|
|
2682
|
+
{
|
|
2683
|
+
name: "id",
|
|
2684
|
+
location: "path"
|
|
2685
|
+
}
|
|
2686
|
+
],
|
|
2687
|
+
hasBody: false,
|
|
2688
|
+
annotations: {
|
|
2689
|
+
readOnlyHint: true,
|
|
2690
|
+
destructiveHint: false,
|
|
2691
|
+
idempotentHint: true,
|
|
2692
|
+
openWorldHint: true
|
|
2693
|
+
},
|
|
2694
|
+
inputSchema: {
|
|
2695
|
+
type: "object",
|
|
2696
|
+
properties: {
|
|
2697
|
+
id: {
|
|
2698
|
+
type: "string",
|
|
2699
|
+
description: "User identifier"
|
|
2700
|
+
}
|
|
2701
|
+
},
|
|
2702
|
+
required: ["id"]
|
|
2703
|
+
}
|
|
2704
|
+
},
|
|
2647
2705
|
{
|
|
2648
2706
|
name: "get-pod",
|
|
2649
2707
|
title: "Get Pod",
|
|
@@ -3783,6 +3841,26 @@ var generatedTools = [
|
|
|
3783
3841
|
}
|
|
3784
3842
|
}
|
|
3785
3843
|
},
|
|
3844
|
+
{
|
|
3845
|
+
name: "list-organization-users",
|
|
3846
|
+
title: "List organization users",
|
|
3847
|
+
operationId: "listOrganizationUsers",
|
|
3848
|
+
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.",
|
|
3849
|
+
method: "GET",
|
|
3850
|
+
path: "/v2/organization/users",
|
|
3851
|
+
params: [],
|
|
3852
|
+
hasBody: false,
|
|
3853
|
+
annotations: {
|
|
3854
|
+
readOnlyHint: true,
|
|
3855
|
+
destructiveHint: false,
|
|
3856
|
+
idempotentHint: true,
|
|
3857
|
+
openWorldHint: true
|
|
3858
|
+
},
|
|
3859
|
+
inputSchema: {
|
|
3860
|
+
type: "object",
|
|
3861
|
+
properties: {}
|
|
3862
|
+
}
|
|
3863
|
+
},
|
|
3786
3864
|
{
|
|
3787
3865
|
name: "list-pod-billing",
|
|
3788
3866
|
title: "List Pod billing",
|
|
@@ -5339,6 +5417,7 @@ function networkFailureResult(error) {
|
|
|
5339
5417
|
return {
|
|
5340
5418
|
ok: false,
|
|
5341
5419
|
status: unreached ? 503 : 502,
|
|
5420
|
+
requestDelivery: unreached ? "not_sent" : "uncertain",
|
|
5342
5421
|
payload: unreached ? {
|
|
5343
5422
|
error: "Could not reach the Runpod API.",
|
|
5344
5423
|
cause: code,
|
|
@@ -5365,6 +5444,7 @@ async function runTool(body) {
|
|
|
5365
5444
|
return {
|
|
5366
5445
|
ok: false,
|
|
5367
5446
|
status: 504,
|
|
5447
|
+
requestDelivery: "uncertain",
|
|
5368
5448
|
payload: {
|
|
5369
5449
|
error: "The Runpod API did not respond before the request deadline.",
|
|
5370
5450
|
hint: "Transient upstream stall: retry the same call once; if it persists, check https://uptime.runpod.io."
|
|
@@ -5457,6 +5537,7 @@ var DIRECTORY_TOOLS = {
|
|
|
5457
5537
|
"get-job-status": IN,
|
|
5458
5538
|
"get-network-volume": IN,
|
|
5459
5539
|
"get-organization": IN,
|
|
5540
|
+
"get-organization-user": IN,
|
|
5460
5541
|
"get-pod": IN,
|
|
5461
5542
|
"get-ssh-keys": IN,
|
|
5462
5543
|
"get-template": IN,
|
|
@@ -5478,6 +5559,7 @@ var DIRECTORY_TOOLS = {
|
|
|
5478
5559
|
"list-hub-repos": IN,
|
|
5479
5560
|
"list-network-volume-billing": IN,
|
|
5480
5561
|
"list-network-volumes": IN,
|
|
5562
|
+
"list-organization-users": IN,
|
|
5481
5563
|
"list-pod-billing": IN,
|
|
5482
5564
|
"list-pods": IN,
|
|
5483
5565
|
"list-public-endpoints": IN,
|
|
@@ -9097,7 +9179,7 @@ function words2(name) {
|
|
|
9097
9179
|
|
|
9098
9180
|
// src/server.ts
|
|
9099
9181
|
var SERVER_NAME = "Runpod API Server";
|
|
9100
|
-
var SERVER_VERSION = true ? "4.
|
|
9182
|
+
var SERVER_VERSION = true ? "4.9.0" : "dev";
|
|
9101
9183
|
|
|
9102
9184
|
// src/specgen/analytics.ts
|
|
9103
9185
|
var import_node_crypto = require("crypto");
|
|
@@ -9166,6 +9248,7 @@ function captureToolCall(apiKey, event) {
|
|
|
9166
9248
|
...event.clientName ? { client_name: event.clientName } : {},
|
|
9167
9249
|
...event.guideKind ? { guide_kind: event.guideKind } : {},
|
|
9168
9250
|
...event.blockedBy ? { blocked_by: event.blockedBy } : {},
|
|
9251
|
+
...event.profile ? { profile: event.profile } : {},
|
|
9169
9252
|
...args
|
|
9170
9253
|
});
|
|
9171
9254
|
}
|
|
@@ -9798,6 +9881,7 @@ function createSpecgenServer(ctx, version = "0.1.0", opts = {}) {
|
|
|
9798
9881
|
status: 429,
|
|
9799
9882
|
durationMs: 0,
|
|
9800
9883
|
...verdict.reason ? { blockedBy: verdict.reason } : {},
|
|
9884
|
+
profile,
|
|
9801
9885
|
...opts.analytics
|
|
9802
9886
|
});
|
|
9803
9887
|
}
|
|
@@ -9818,6 +9902,9 @@ function createSpecgenServer(ctx, version = "0.1.0", opts = {}) {
|
|
|
9818
9902
|
const curated = servedCuratedTools.find(
|
|
9819
9903
|
(tool) => tool.name === request.params.name
|
|
9820
9904
|
);
|
|
9905
|
+
const generated = servedGeneratedTools.find(
|
|
9906
|
+
(tool) => tool.name === request.params.name
|
|
9907
|
+
);
|
|
9821
9908
|
const omitted = directory ? directoryOmittedInputs(request.params.name).filter((key) => key in args) : [];
|
|
9822
9909
|
const rejected = omitted.length ? {
|
|
9823
9910
|
ok: false,
|
|
@@ -9830,7 +9917,7 @@ function createSpecgenServer(ctx, version = "0.1.0", opts = {}) {
|
|
|
9830
9917
|
args
|
|
9831
9918
|
) : null;
|
|
9832
9919
|
const result = rejected ?? await runTool(
|
|
9833
|
-
() => curated ? curated.handler(ctx, args) : dispatchTool(request.params.name, args)
|
|
9920
|
+
() => curated ? curated.handler(ctx, args) : dispatchTool(generated, request.params.name, args)
|
|
9834
9921
|
);
|
|
9835
9922
|
logToolCall({
|
|
9836
9923
|
tool: request.params.name,
|
|
@@ -9850,23 +9937,27 @@ function createSpecgenServer(ctx, version = "0.1.0", opts = {}) {
|
|
|
9850
9937
|
args: recordedArgumentValues(curated?.recordedArguments, args),
|
|
9851
9938
|
guideKind: curated?.recordedGuideKind?.(args)
|
|
9852
9939
|
},
|
|
9940
|
+
profile,
|
|
9853
9941
|
...opts.analytics
|
|
9854
9942
|
});
|
|
9855
9943
|
}
|
|
9856
9944
|
opts.onToolResult?.(request.params.name, result.status);
|
|
9857
9945
|
if (!result.ok && result.status === 401) opts.onUnauthorized?.();
|
|
9946
|
+
const annotations = curated?.annotations ?? generated?.annotations;
|
|
9858
9947
|
const payload = redactSecretEnv(
|
|
9859
|
-
result.ok ? result.payload : withRecoveryHint(
|
|
9948
|
+
result.ok ? result.payload : withRecoveryHint(
|
|
9949
|
+
result,
|
|
9950
|
+
annotations?.idempotentHint === true,
|
|
9951
|
+
request.params.name,
|
|
9952
|
+
callShapeOnlyTools.has(request.params.name)
|
|
9953
|
+
)
|
|
9860
9954
|
);
|
|
9861
9955
|
return {
|
|
9862
9956
|
content: [{ type: "text", text: JSON.stringify(payload, null, 2) }],
|
|
9863
9957
|
isError: !result.ok
|
|
9864
9958
|
};
|
|
9865
9959
|
});
|
|
9866
|
-
async function dispatchTool(name, args) {
|
|
9867
|
-
const tool = servedGeneratedTools.find(
|
|
9868
|
-
(candidate) => candidate.name === name
|
|
9869
|
-
);
|
|
9960
|
+
async function dispatchTool(tool, name, args) {
|
|
9870
9961
|
if (!tool)
|
|
9871
9962
|
return {
|
|
9872
9963
|
ok: false,
|
|
@@ -9914,8 +10005,24 @@ function errorHint(status, detail) {
|
|
|
9914
10005
|
return void 0;
|
|
9915
10006
|
}
|
|
9916
10007
|
var CALL_SHAPE_ONLY_HINT = `This tool lists its call shape only; ${DESCRIBE_TOOL_NAME} serves the full argument schema.`;
|
|
9917
|
-
|
|
10008
|
+
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.";
|
|
10009
|
+
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.";
|
|
10010
|
+
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.";
|
|
10011
|
+
var JOB_SUBMISSION_TOOLS = /* @__PURE__ */ new Set(["run-endpoint", "runsync-endpoint"]);
|
|
10012
|
+
function withRecoveryHint(result, idempotent, toolName, listsCallShapeOnly = false) {
|
|
9918
10013
|
const payload = asRecord(result.payload) ?? { error: result.payload };
|
|
10014
|
+
if (!idempotent && result.status >= 500 && result.requestDelivery !== "not_sent") {
|
|
10015
|
+
const detail = asRecord(payload.detail);
|
|
10016
|
+
const safeDetail = detail ? { ...detail } : void 0;
|
|
10017
|
+
if (safeDetail) delete safeDetail.hint;
|
|
10018
|
+
return {
|
|
10019
|
+
...payload,
|
|
10020
|
+
...safeDetail ? { detail: safeDetail } : {},
|
|
10021
|
+
...payload.code !== void 0 ? { upstreamCode: payload.code } : {},
|
|
10022
|
+
code: "outcome_unknown",
|
|
10023
|
+
hint: toolName === "retry-job" ? RETRY_JOB_OUTCOME_UNKNOWN_HINT : JOB_SUBMISSION_TOOLS.has(toolName) ? JOB_OUTCOME_UNKNOWN_HINT : OUTCOME_UNKNOWN_HINT
|
|
10024
|
+
};
|
|
10025
|
+
}
|
|
9919
10026
|
const hint = payload.hint ?? asRecord(payload.detail)?.hint ?? errorHint(result.status, detailText(payload));
|
|
9920
10027
|
const shapeRejected = result.status === 400 || result.status === 422;
|
|
9921
10028
|
return {
|