@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
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare const ALP_ROUTES: readonly ["feedback", "journal", "question", "referral"];
|
|
2
|
+
type AlpRoute = (typeof ALP_ROUTES)[number];
|
|
3
|
+
declare const ONCE_PER_ACCOUNT_ROUTES: readonly ["referral"];
|
|
4
|
+
type OncePerAccountRoute = (typeof ONCE_PER_ACCOUNT_ROUTES)[number];
|
|
5
|
+
declare function isOncePerAccountRoute(route: unknown): route is OncePerAccountRoute;
|
|
6
|
+
declare const ALREADY_SUBMITTED_NOTE = "This account has already made this one-time submission; nothing new was stored. Do not call this again on this account \u2014 continue your task.";
|
|
7
|
+
declare const ALP_REFERRAL_SOURCES: readonly ["searched", "user_named", "recommended", "other"];
|
|
8
|
+
type AlpReferralSource = (typeof ALP_REFERRAL_SOURCES)[number];
|
|
9
|
+
declare const ALP_REFERRAL_USE_CASES: readonly ["inference", "fine_tuning", "training", "image_video_generation", "dev_environment", "batch_processing", "other"];
|
|
10
|
+
type AlpReferralUseCase = (typeof ALP_REFERRAL_USE_CASES)[number];
|
|
11
|
+
/** The sink is a Convex HTTP action, always. Anything else is a typo. */
|
|
12
|
+
declare function isSinkUrl(value: string): boolean;
|
|
13
|
+
/** A sibling route on the same deployment as the configured submit URL.
|
|
14
|
+
* Derived, never configured, so no second variable can point elsewhere. */
|
|
15
|
+
declare function sinkRouteUrl(submitUrl: string, path: string): string | null;
|
|
16
|
+
|
|
17
|
+
export { ALP_ROUTES as A, ONCE_PER_ACCOUNT_ROUTES as O, ALP_REFERRAL_SOURCES as a, ALP_REFERRAL_USE_CASES as b, ALREADY_SUBMITTED_NOTE as c, isSinkUrl as d, type AlpReferralSource as e, type AlpReferralUseCase as f, type AlpRoute as g, type OncePerAccountRoute as h, isOncePerAccountRoute as i, sinkRouteUrl as s };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare const ALP_ROUTES: readonly ["feedback", "journal", "question", "referral"];
|
|
2
|
+
type AlpRoute = (typeof ALP_ROUTES)[number];
|
|
3
|
+
declare const ONCE_PER_ACCOUNT_ROUTES: readonly ["referral"];
|
|
4
|
+
type OncePerAccountRoute = (typeof ONCE_PER_ACCOUNT_ROUTES)[number];
|
|
5
|
+
declare function isOncePerAccountRoute(route: unknown): route is OncePerAccountRoute;
|
|
6
|
+
declare const ALREADY_SUBMITTED_NOTE = "This account has already made this one-time submission; nothing new was stored. Do not call this again on this account \u2014 continue your task.";
|
|
7
|
+
declare const ALP_REFERRAL_SOURCES: readonly ["searched", "user_named", "recommended", "other"];
|
|
8
|
+
type AlpReferralSource = (typeof ALP_REFERRAL_SOURCES)[number];
|
|
9
|
+
declare const ALP_REFERRAL_USE_CASES: readonly ["inference", "fine_tuning", "training", "image_video_generation", "dev_environment", "batch_processing", "other"];
|
|
10
|
+
type AlpReferralUseCase = (typeof ALP_REFERRAL_USE_CASES)[number];
|
|
11
|
+
/** The sink is a Convex HTTP action, always. Anything else is a typo. */
|
|
12
|
+
declare function isSinkUrl(value: string): boolean;
|
|
13
|
+
/** A sibling route on the same deployment as the configured submit URL.
|
|
14
|
+
* Derived, never configured, so no second variable can point elsewhere. */
|
|
15
|
+
declare function sinkRouteUrl(submitUrl: string, path: string): string | null;
|
|
16
|
+
|
|
17
|
+
export { ALP_ROUTES as A, ONCE_PER_ACCOUNT_ROUTES as O, ALP_REFERRAL_SOURCES as a, ALP_REFERRAL_USE_CASES as b, ALREADY_SUBMITTED_NOTE as c, isSinkUrl as d, type AlpReferralSource as e, type AlpReferralUseCase as f, type AlpRoute as g, type OncePerAccountRoute as h, isOncePerAccountRoute as i, sinkRouteUrl as s };
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/specgen/profile.ts
|
|
21
|
+
var profile_exports = {};
|
|
22
|
+
__export(profile_exports, {
|
|
23
|
+
DIRECTORY_PATH: () => DIRECTORY_PATH,
|
|
24
|
+
DIRECTORY_TOOLS: () => DIRECTORY_TOOLS,
|
|
25
|
+
directoryIncludes: () => directoryIncludes,
|
|
26
|
+
directoryOmittedInputs: () => directoryOmittedInputs,
|
|
27
|
+
profileForPath: () => profileForPath
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(profile_exports);
|
|
30
|
+
var DIRECTORY_PATH = "/directory";
|
|
31
|
+
var IN = { include: true };
|
|
32
|
+
var CREDENTIAL_MANAGEMENT = "Manages stored credentials; OpenAI restricts plugins that handle access credentials, so the directory leaves the whole credential family out.";
|
|
33
|
+
var CREDENTIAL_INPUT = "Takes a secret or password as input; directories forbid collecting credentials.";
|
|
34
|
+
var ALP = "Collects conversation-derived data beyond the task; the directory profile never serves it.";
|
|
35
|
+
var DIRECTORY_TOOLS = {
|
|
36
|
+
"cancel-job": IN,
|
|
37
|
+
"create-cluster": IN,
|
|
38
|
+
"create-delegation": IN,
|
|
39
|
+
"create-endpoint": IN,
|
|
40
|
+
"create-global-volume": IN,
|
|
41
|
+
"create-network-volume": IN,
|
|
42
|
+
"create-pod": IN,
|
|
43
|
+
"create-template": IN,
|
|
44
|
+
"delete-cluster": IN,
|
|
45
|
+
"delete-endpoint": IN,
|
|
46
|
+
"delete-global-volume": IN,
|
|
47
|
+
"delete-network-volume": IN,
|
|
48
|
+
"delete-pod": IN,
|
|
49
|
+
"delete-template": IN,
|
|
50
|
+
"deploy-hub-repo": IN,
|
|
51
|
+
"endpoint-health": IN,
|
|
52
|
+
"get-capacity": IN,
|
|
53
|
+
"get-cluster": IN,
|
|
54
|
+
"get-cpu-type": IN,
|
|
55
|
+
"get-data-center": IN,
|
|
56
|
+
"get-endpoint": IN,
|
|
57
|
+
"get-endpoint-build": IN,
|
|
58
|
+
"get-global-volume": IN,
|
|
59
|
+
"get-gpu-type": IN,
|
|
60
|
+
"get-job-status": IN,
|
|
61
|
+
"get-network-volume": IN,
|
|
62
|
+
"get-organization": IN,
|
|
63
|
+
"get-organization-user": IN,
|
|
64
|
+
"get-pod": IN,
|
|
65
|
+
"get-ssh-keys": IN,
|
|
66
|
+
"get-template": IN,
|
|
67
|
+
"list-audit-logs": IN,
|
|
68
|
+
"list-billing": IN,
|
|
69
|
+
"list-cluster-billing": IN,
|
|
70
|
+
"list-cluster-pods": IN,
|
|
71
|
+
"list-clusters": IN,
|
|
72
|
+
"list-cpu-types": IN,
|
|
73
|
+
"list-data-centers": IN,
|
|
74
|
+
"list-delegations": IN,
|
|
75
|
+
"list-endpoint-billing": IN,
|
|
76
|
+
"list-endpoint-builds": IN,
|
|
77
|
+
"list-endpoint-releases": IN,
|
|
78
|
+
"list-endpoint-workers": IN,
|
|
79
|
+
"list-endpoints": IN,
|
|
80
|
+
"list-global-volumes": IN,
|
|
81
|
+
"list-gpu-types": IN,
|
|
82
|
+
"list-hub-repos": IN,
|
|
83
|
+
"list-network-volume-billing": IN,
|
|
84
|
+
"list-network-volumes": IN,
|
|
85
|
+
"list-organization-users": IN,
|
|
86
|
+
"list-pod-billing": IN,
|
|
87
|
+
"list-pods": IN,
|
|
88
|
+
"list-public-endpoints": IN,
|
|
89
|
+
"list-public-templates": IN,
|
|
90
|
+
"list-serverless-billing": IN,
|
|
91
|
+
"list-templates": IN,
|
|
92
|
+
"lookup-concept": IN,
|
|
93
|
+
"purge-endpoint-queue": IN,
|
|
94
|
+
"retry-job": IN,
|
|
95
|
+
"revoke-delegation": IN,
|
|
96
|
+
"search-concepts": IN,
|
|
97
|
+
"search-docs": IN,
|
|
98
|
+
"set-endpoint-gpus": IN,
|
|
99
|
+
"stream-job": IN,
|
|
100
|
+
"stream-pod-logs": IN,
|
|
101
|
+
"stream-worker-logs": IN,
|
|
102
|
+
"update-cluster": IN,
|
|
103
|
+
"update-endpoint": IN,
|
|
104
|
+
"update-global-volume": IN,
|
|
105
|
+
"update-network-volume": IN,
|
|
106
|
+
"update-pod": IN,
|
|
107
|
+
"update-ssh-keys": IN,
|
|
108
|
+
"update-template": IN,
|
|
109
|
+
"run-endpoint": { include: true, omitInputs: ["s3Config"] },
|
|
110
|
+
"runsync-endpoint": { include: true, omitInputs: ["s3Config"] },
|
|
111
|
+
"pod-action": {
|
|
112
|
+
include: false,
|
|
113
|
+
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)."
|
|
114
|
+
},
|
|
115
|
+
"start-pod": IN,
|
|
116
|
+
"stop-pod": IN,
|
|
117
|
+
"restart-pod": IN,
|
|
118
|
+
"list-guides": {
|
|
119
|
+
include: false,
|
|
120
|
+
reason: "Serves playbooks that instruct the model how to behave."
|
|
121
|
+
},
|
|
122
|
+
"read-guide": {
|
|
123
|
+
include: false,
|
|
124
|
+
reason: "Serves playbooks that instruct the model how to behave."
|
|
125
|
+
},
|
|
126
|
+
"describe-tool": {
|
|
127
|
+
include: false,
|
|
128
|
+
reason: "Fetches schemas the directory already lists in full; directories reject schema fetching."
|
|
129
|
+
},
|
|
130
|
+
"create-secret": { include: false, reason: CREDENTIAL_INPUT },
|
|
131
|
+
"get-secret": { include: false, reason: CREDENTIAL_MANAGEMENT },
|
|
132
|
+
"list-secrets": { include: false, reason: CREDENTIAL_MANAGEMENT },
|
|
133
|
+
"delete-secret": { include: false, reason: CREDENTIAL_MANAGEMENT },
|
|
134
|
+
"get-registry": { include: false, reason: CREDENTIAL_MANAGEMENT },
|
|
135
|
+
"list-registries": { include: false, reason: CREDENTIAL_MANAGEMENT },
|
|
136
|
+
"delete-registry": { include: false, reason: CREDENTIAL_MANAGEMENT },
|
|
137
|
+
"update-secret": { include: false, reason: CREDENTIAL_INPUT },
|
|
138
|
+
"create-registry": { include: false, reason: CREDENTIAL_INPUT },
|
|
139
|
+
report_feedback: { include: false, reason: ALP },
|
|
140
|
+
report_how_user_found_runpod: { include: false, reason: ALP },
|
|
141
|
+
save_to_journal: { include: false, reason: ALP },
|
|
142
|
+
read_journal: { include: false, reason: ALP },
|
|
143
|
+
ask_question: { include: false, reason: ALP }
|
|
144
|
+
};
|
|
145
|
+
function directoryIncludes(name) {
|
|
146
|
+
return DIRECTORY_TOOLS[name]?.include === true;
|
|
147
|
+
}
|
|
148
|
+
function directoryOmittedInputs(name) {
|
|
149
|
+
const decision = DIRECTORY_TOOLS[name];
|
|
150
|
+
return decision?.include ? decision.omitInputs ?? [] : [];
|
|
151
|
+
}
|
|
152
|
+
function profileForPath(pathname) {
|
|
153
|
+
return pathname.replace(/\/+$/, "") === DIRECTORY_PATH ? "directory" : "default";
|
|
154
|
+
}
|
|
155
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
156
|
+
0 && (module.exports = {
|
|
157
|
+
DIRECTORY_PATH,
|
|
158
|
+
DIRECTORY_TOOLS,
|
|
159
|
+
directoryIncludes,
|
|
160
|
+
directoryOmittedInputs,
|
|
161
|
+
profileForPath
|
|
162
|
+
});
|
|
163
|
+
//# sourceMappingURL=profile.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/specgen/profile.ts"],"sourcesContent":["// Which tool surface a connection gets. `default` is the full surface every\n// client has always had. `directory` is what app directories (Anthropic's\n// connector directory, OpenAI's plugin directory) list: their policies forbid\n// tool descriptions that instruct the model, steer it toward other tools or\n// external instructions, or collect conversation data beyond the tool's job.\n// The directory profile is served only at DIRECTORY_PATH; nothing about the\n// default surface changes.\nexport type ServerProfile = 'default' | 'directory';\n\nexport const DIRECTORY_PATH = '/directory';\n\n/** Whether a tool is listed on the directory profile. Every tool the server\n * can serve must have an entry, so a new tool (a spec regeneration, a new\n * curated tool) fails tests/specgen-directory.test.ts until someone decides.\n * The rules for deciding are in specgen/DIRECTORY_POLICY.md.\n * `omitInputs` hides top-level arguments the directory must not ask for (a\n * credential, for example); a call that passes one is refused. */\nexport type DirectoryDecision =\n | { include: true; omitInputs?: readonly string[] }\n | { include: false; reason: string };\n\nconst IN = { include: true } as const;\nconst CREDENTIAL_MANAGEMENT =\n 'Manages stored credentials; OpenAI restricts plugins that handle access credentials, so the directory leaves the whole credential family out.';\nconst CREDENTIAL_INPUT =\n 'Takes a secret or password as input; directories forbid collecting credentials.';\nconst ALP =\n 'Collects conversation-derived data beyond the task; the directory profile never serves it.';\n\nexport const DIRECTORY_TOOLS: Readonly<Record<string, DirectoryDecision>> = {\n 'cancel-job': IN,\n 'create-cluster': IN,\n 'create-delegation': IN,\n 'create-endpoint': IN,\n 'create-global-volume': IN,\n 'create-network-volume': IN,\n 'create-pod': IN,\n 'create-template': IN,\n 'delete-cluster': IN,\n 'delete-endpoint': IN,\n 'delete-global-volume': IN,\n 'delete-network-volume': IN,\n 'delete-pod': IN,\n 'delete-template': IN,\n 'deploy-hub-repo': IN,\n 'endpoint-health': IN,\n 'get-capacity': IN,\n 'get-cluster': IN,\n 'get-cpu-type': IN,\n 'get-data-center': IN,\n 'get-endpoint': IN,\n 'get-endpoint-build': IN,\n 'get-global-volume': IN,\n 'get-gpu-type': IN,\n 'get-job-status': IN,\n 'get-network-volume': IN,\n 'get-organization': IN,\n 'get-organization-user': IN,\n 'get-pod': IN,\n 'get-ssh-keys': IN,\n 'get-template': IN,\n 'list-audit-logs': IN,\n 'list-billing': IN,\n 'list-cluster-billing': IN,\n 'list-cluster-pods': IN,\n 'list-clusters': IN,\n 'list-cpu-types': IN,\n 'list-data-centers': IN,\n 'list-delegations': IN,\n 'list-endpoint-billing': IN,\n 'list-endpoint-builds': IN,\n 'list-endpoint-releases': IN,\n 'list-endpoint-workers': IN,\n 'list-endpoints': IN,\n 'list-global-volumes': IN,\n 'list-gpu-types': IN,\n 'list-hub-repos': IN,\n 'list-network-volume-billing': IN,\n 'list-network-volumes': IN,\n 'list-organization-users': IN,\n 'list-pod-billing': IN,\n 'list-pods': IN,\n 'list-public-endpoints': IN,\n 'list-public-templates': IN,\n 'list-serverless-billing': IN,\n 'list-templates': IN,\n 'lookup-concept': IN,\n 'purge-endpoint-queue': IN,\n 'retry-job': IN,\n 'revoke-delegation': IN,\n 'search-concepts': IN,\n 'search-docs': IN,\n 'set-endpoint-gpus': IN,\n 'stream-job': IN,\n 'stream-pod-logs': IN,\n 'stream-worker-logs': IN,\n 'update-cluster': IN,\n 'update-endpoint': IN,\n 'update-global-volume': IN,\n 'update-network-volume': IN,\n 'update-pod': IN,\n 'update-ssh-keys': IN,\n 'update-template': IN,\n 'run-endpoint': { include: true, omitInputs: ['s3Config'] },\n 'runsync-endpoint': { include: true, omitInputs: ['s3Config'] },\n 'pod-action': {\n include: false,\n reason:\n '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).',\n },\n 'start-pod': IN,\n 'stop-pod': IN,\n 'restart-pod': IN,\n 'list-guides': {\n include: false,\n reason: 'Serves playbooks that instruct the model how to behave.',\n },\n 'read-guide': {\n include: false,\n reason: 'Serves playbooks that instruct the model how to behave.',\n },\n 'describe-tool': {\n include: false,\n reason:\n 'Fetches schemas the directory already lists in full; directories reject schema fetching.',\n },\n 'create-secret': { include: false, reason: CREDENTIAL_INPUT },\n 'get-secret': { include: false, reason: CREDENTIAL_MANAGEMENT },\n 'list-secrets': { include: false, reason: CREDENTIAL_MANAGEMENT },\n 'delete-secret': { include: false, reason: CREDENTIAL_MANAGEMENT },\n 'get-registry': { include: false, reason: CREDENTIAL_MANAGEMENT },\n 'list-registries': { include: false, reason: CREDENTIAL_MANAGEMENT },\n 'delete-registry': { include: false, reason: CREDENTIAL_MANAGEMENT },\n 'update-secret': { include: false, reason: CREDENTIAL_INPUT },\n 'create-registry': { include: false, reason: CREDENTIAL_INPUT },\n report_feedback: { include: false, reason: ALP },\n report_how_user_found_runpod: { include: false, reason: ALP },\n save_to_journal: { include: false, reason: ALP },\n read_journal: { include: false, reason: ALP },\n ask_question: { include: false, reason: ALP },\n};\n\n/** Served on the directory profile only with an explicit include. */\nexport function directoryIncludes(name: string): boolean {\n return DIRECTORY_TOOLS[name]?.include === true;\n}\n\nexport function directoryOmittedInputs(name: string): readonly string[] {\n const decision = DIRECTORY_TOOLS[name];\n return decision?.include ? (decision.omitInputs ?? []) : [];\n}\n\nexport function profileForPath(pathname: string): ServerProfile {\n return pathname.replace(/\\/+$/, '') === DIRECTORY_PATH\n ? 'directory'\n : 'default';\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASO,IAAM,iBAAiB;AAY9B,IAAM,KAAK,EAAE,SAAS,KAAK;AAC3B,IAAM,wBACJ;AACF,IAAM,mBACJ;AACF,IAAM,MACJ;AAEK,IAAM,kBAA+D;AAAA,EAC1E,cAAc;AAAA,EACd,kBAAkB;AAAA,EAClB,qBAAqB;AAAA,EACrB,mBAAmB;AAAA,EACnB,wBAAwB;AAAA,EACxB,yBAAyB;AAAA,EACzB,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,kBAAkB;AAAA,EAClB,mBAAmB;AAAA,EACnB,wBAAwB;AAAA,EACxB,yBAAyB;AAAA,EACzB,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,mBAAmB;AAAA,EACnB,mBAAmB;AAAA,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C,SAAO,UAAU,UAAW,SAAS,cAAc,CAAC,IAAK,CAAC;AAC5D;AAEO,SAAS,eAAe,UAAiC;AAC9D,SAAO,SAAS,QAAQ,QAAQ,EAAE,MAAM,iBACpC,cACA;AACN;","names":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type ServerProfile = 'default' | 'directory';
|
|
2
|
+
declare const DIRECTORY_PATH = "/directory";
|
|
3
|
+
/** Whether a tool is listed on the directory profile. Every tool the server
|
|
4
|
+
* can serve must have an entry, so a new tool (a spec regeneration, a new
|
|
5
|
+
* curated tool) fails tests/specgen-directory.test.ts until someone decides.
|
|
6
|
+
* The rules for deciding are in specgen/DIRECTORY_POLICY.md.
|
|
7
|
+
* `omitInputs` hides top-level arguments the directory must not ask for (a
|
|
8
|
+
* credential, for example); a call that passes one is refused. */
|
|
9
|
+
type DirectoryDecision = {
|
|
10
|
+
include: true;
|
|
11
|
+
omitInputs?: readonly string[];
|
|
12
|
+
} | {
|
|
13
|
+
include: false;
|
|
14
|
+
reason: string;
|
|
15
|
+
};
|
|
16
|
+
declare const DIRECTORY_TOOLS: Readonly<Record<string, DirectoryDecision>>;
|
|
17
|
+
/** Served on the directory profile only with an explicit include. */
|
|
18
|
+
declare function directoryIncludes(name: string): boolean;
|
|
19
|
+
declare function directoryOmittedInputs(name: string): readonly string[];
|
|
20
|
+
declare function profileForPath(pathname: string): ServerProfile;
|
|
21
|
+
|
|
22
|
+
export { DIRECTORY_PATH, DIRECTORY_TOOLS, type DirectoryDecision, type ServerProfile, directoryIncludes, directoryOmittedInputs, profileForPath };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type ServerProfile = 'default' | 'directory';
|
|
2
|
+
declare const DIRECTORY_PATH = "/directory";
|
|
3
|
+
/** Whether a tool is listed on the directory profile. Every tool the server
|
|
4
|
+
* can serve must have an entry, so a new tool (a spec regeneration, a new
|
|
5
|
+
* curated tool) fails tests/specgen-directory.test.ts until someone decides.
|
|
6
|
+
* The rules for deciding are in specgen/DIRECTORY_POLICY.md.
|
|
7
|
+
* `omitInputs` hides top-level arguments the directory must not ask for (a
|
|
8
|
+
* credential, for example); a call that passes one is refused. */
|
|
9
|
+
type DirectoryDecision = {
|
|
10
|
+
include: true;
|
|
11
|
+
omitInputs?: readonly string[];
|
|
12
|
+
} | {
|
|
13
|
+
include: false;
|
|
14
|
+
reason: string;
|
|
15
|
+
};
|
|
16
|
+
declare const DIRECTORY_TOOLS: Readonly<Record<string, DirectoryDecision>>;
|
|
17
|
+
/** Served on the directory profile only with an explicit include. */
|
|
18
|
+
declare function directoryIncludes(name: string): boolean;
|
|
19
|
+
declare function directoryOmittedInputs(name: string): readonly string[];
|
|
20
|
+
declare function profileForPath(pathname: string): ServerProfile;
|
|
21
|
+
|
|
22
|
+
export { DIRECTORY_PATH, DIRECTORY_TOOLS, type DirectoryDecision, type ServerProfile, directoryIncludes, directoryOmittedInputs, profileForPath };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DIRECTORY_PATH,
|
|
3
|
+
DIRECTORY_TOOLS,
|
|
4
|
+
directoryIncludes,
|
|
5
|
+
directoryOmittedInputs,
|
|
6
|
+
profileForPath
|
|
7
|
+
} from "../chunk-6IETGSON.mjs";
|
|
8
|
+
export {
|
|
9
|
+
DIRECTORY_PATH,
|
|
10
|
+
DIRECTORY_TOOLS,
|
|
11
|
+
directoryIncludes,
|
|
12
|
+
directoryOmittedInputs,
|
|
13
|
+
profileForPath
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=profile.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/stdio.cjs
CHANGED
|
@@ -1183,7 +1183,7 @@ var import_stdio = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
|
1183
1183
|
|
|
1184
1184
|
// src/server.ts
|
|
1185
1185
|
var SERVER_NAME = "Runpod API Server";
|
|
1186
|
-
var SERVER_VERSION = true ? "4.
|
|
1186
|
+
var SERVER_VERSION = true ? "4.9.0" : "dev";
|
|
1187
1187
|
|
|
1188
1188
|
// src/specgen/server.ts
|
|
1189
1189
|
var import_server3 = require("@modelcontextprotocol/sdk/server/index.js");
|
|
@@ -1642,9 +1642,36 @@ var generatedTools = [
|
|
|
1642
1642
|
},
|
|
1643
1643
|
ClusterMounts: {
|
|
1644
1644
|
description: "Storage mounts for a cluster create: `persistent` or `network`, not both. Clusters cannot mount global volumes, so `global` is rejected.",
|
|
1645
|
+
"x-go-type": "BaseMounts",
|
|
1645
1646
|
allOf: [
|
|
1646
1647
|
{
|
|
1647
1648
|
$ref: "#/$defs/BaseMounts"
|
|
1649
|
+
},
|
|
1650
|
+
{
|
|
1651
|
+
type: "object",
|
|
1652
|
+
properties: {
|
|
1653
|
+
persistent: {
|
|
1654
|
+
type: "object",
|
|
1655
|
+
properties: {
|
|
1656
|
+
path: {
|
|
1657
|
+
type: "string",
|
|
1658
|
+
minLength: 1
|
|
1659
|
+
}
|
|
1660
|
+
}
|
|
1661
|
+
},
|
|
1662
|
+
network: {
|
|
1663
|
+
type: "array",
|
|
1664
|
+
items: {
|
|
1665
|
+
type: "object",
|
|
1666
|
+
properties: {
|
|
1667
|
+
path: {
|
|
1668
|
+
type: "string",
|
|
1669
|
+
minLength: 1
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
1672
|
+
}
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1648
1675
|
}
|
|
1649
1676
|
],
|
|
1650
1677
|
unevaluatedProperties: false
|
|
@@ -3720,6 +3747,37 @@ var generatedTools = [
|
|
|
3720
3747
|
properties: {}
|
|
3721
3748
|
}
|
|
3722
3749
|
},
|
|
3750
|
+
{
|
|
3751
|
+
name: "get-organization-user",
|
|
3752
|
+
title: "Get organization user",
|
|
3753
|
+
operationId: "getOrganizationUser",
|
|
3754
|
+
description: "Get an organization member. Returns one member of the authenticated caller's organization by user ID, with the role they hold. Any member can read it. A user who is not a member, including one from another organization, returns 404. Returns 404 when the caller does not belong to an organization, or 403 when organizations are unavailable to the caller.",
|
|
3755
|
+
method: "GET",
|
|
3756
|
+
path: "/v2/organization/users/{id}",
|
|
3757
|
+
params: [
|
|
3758
|
+
{
|
|
3759
|
+
name: "id",
|
|
3760
|
+
location: "path"
|
|
3761
|
+
}
|
|
3762
|
+
],
|
|
3763
|
+
hasBody: false,
|
|
3764
|
+
annotations: {
|
|
3765
|
+
readOnlyHint: true,
|
|
3766
|
+
destructiveHint: false,
|
|
3767
|
+
idempotentHint: true,
|
|
3768
|
+
openWorldHint: true
|
|
3769
|
+
},
|
|
3770
|
+
inputSchema: {
|
|
3771
|
+
type: "object",
|
|
3772
|
+
properties: {
|
|
3773
|
+
id: {
|
|
3774
|
+
type: "string",
|
|
3775
|
+
description: "User identifier"
|
|
3776
|
+
}
|
|
3777
|
+
},
|
|
3778
|
+
required: ["id"]
|
|
3779
|
+
}
|
|
3780
|
+
},
|
|
3723
3781
|
{
|
|
3724
3782
|
name: "get-pod",
|
|
3725
3783
|
title: "Get Pod",
|
|
@@ -4859,6 +4917,26 @@ var generatedTools = [
|
|
|
4859
4917
|
}
|
|
4860
4918
|
}
|
|
4861
4919
|
},
|
|
4920
|
+
{
|
|
4921
|
+
name: "list-organization-users",
|
|
4922
|
+
title: "List organization users",
|
|
4923
|
+
operationId: "listOrganizationUsers",
|
|
4924
|
+
description: "List organization members. Returns every member of the authenticated caller's organization with the role each holds. Any member can read the roster. The list is complete and takes no pagination parameters. Returns 404 when the caller does not belong to an organization, or 403 when organizations are unavailable to the caller.",
|
|
4925
|
+
method: "GET",
|
|
4926
|
+
path: "/v2/organization/users",
|
|
4927
|
+
params: [],
|
|
4928
|
+
hasBody: false,
|
|
4929
|
+
annotations: {
|
|
4930
|
+
readOnlyHint: true,
|
|
4931
|
+
destructiveHint: false,
|
|
4932
|
+
idempotentHint: true,
|
|
4933
|
+
openWorldHint: true
|
|
4934
|
+
},
|
|
4935
|
+
inputSchema: {
|
|
4936
|
+
type: "object",
|
|
4937
|
+
properties: {}
|
|
4938
|
+
}
|
|
4939
|
+
},
|
|
4862
4940
|
{
|
|
4863
4941
|
name: "list-pod-billing",
|
|
4864
4942
|
title: "List Pod billing",
|
|
@@ -6415,6 +6493,7 @@ function networkFailureResult(error) {
|
|
|
6415
6493
|
return {
|
|
6416
6494
|
ok: false,
|
|
6417
6495
|
status: unreached ? 503 : 502,
|
|
6496
|
+
requestDelivery: unreached ? "not_sent" : "uncertain",
|
|
6418
6497
|
payload: unreached ? {
|
|
6419
6498
|
error: "Could not reach the Runpod API.",
|
|
6420
6499
|
cause: code,
|
|
@@ -6441,6 +6520,7 @@ async function runTool(body) {
|
|
|
6441
6520
|
return {
|
|
6442
6521
|
ok: false,
|
|
6443
6522
|
status: 504,
|
|
6523
|
+
requestDelivery: "uncertain",
|
|
6444
6524
|
payload: {
|
|
6445
6525
|
error: "The Runpod API did not respond before the request deadline.",
|
|
6446
6526
|
hint: "Transient upstream stall: retry the same call once; if it persists, check https://uptime.runpod.io."
|
|
@@ -6532,6 +6612,7 @@ var DIRECTORY_TOOLS = {
|
|
|
6532
6612
|
"get-job-status": IN,
|
|
6533
6613
|
"get-network-volume": IN,
|
|
6534
6614
|
"get-organization": IN,
|
|
6615
|
+
"get-organization-user": IN,
|
|
6535
6616
|
"get-pod": IN,
|
|
6536
6617
|
"get-ssh-keys": IN,
|
|
6537
6618
|
"get-template": IN,
|
|
@@ -6553,6 +6634,7 @@ var DIRECTORY_TOOLS = {
|
|
|
6553
6634
|
"list-hub-repos": IN,
|
|
6554
6635
|
"list-network-volume-billing": IN,
|
|
6555
6636
|
"list-network-volumes": IN,
|
|
6637
|
+
"list-organization-users": IN,
|
|
6556
6638
|
"list-pod-billing": IN,
|
|
6557
6639
|
"list-pods": IN,
|
|
6558
6640
|
"list-public-endpoints": IN,
|
|
@@ -10217,6 +10299,7 @@ function captureToolCall(apiKey, event) {
|
|
|
10217
10299
|
...event.clientName ? { client_name: event.clientName } : {},
|
|
10218
10300
|
...event.guideKind ? { guide_kind: event.guideKind } : {},
|
|
10219
10301
|
...event.blockedBy ? { blocked_by: event.blockedBy } : {},
|
|
10302
|
+
...event.profile ? { profile: event.profile } : {},
|
|
10220
10303
|
...args
|
|
10221
10304
|
});
|
|
10222
10305
|
}
|
|
@@ -11094,6 +11177,7 @@ function createSpecgenServer(ctx, version = "0.1.0", opts = {}) {
|
|
|
11094
11177
|
status: 429,
|
|
11095
11178
|
durationMs: 0,
|
|
11096
11179
|
...verdict.reason ? { blockedBy: verdict.reason } : {},
|
|
11180
|
+
profile,
|
|
11097
11181
|
...opts.analytics
|
|
11098
11182
|
});
|
|
11099
11183
|
}
|
|
@@ -11114,6 +11198,9 @@ function createSpecgenServer(ctx, version = "0.1.0", opts = {}) {
|
|
|
11114
11198
|
const curated = servedCuratedTools.find(
|
|
11115
11199
|
(tool) => tool.name === request.params.name
|
|
11116
11200
|
);
|
|
11201
|
+
const generated = servedGeneratedTools.find(
|
|
11202
|
+
(tool) => tool.name === request.params.name
|
|
11203
|
+
);
|
|
11117
11204
|
const omitted = directory ? directoryOmittedInputs(request.params.name).filter((key) => key in args) : [];
|
|
11118
11205
|
const rejected = omitted.length ? {
|
|
11119
11206
|
ok: false,
|
|
@@ -11126,7 +11213,7 @@ function createSpecgenServer(ctx, version = "0.1.0", opts = {}) {
|
|
|
11126
11213
|
args
|
|
11127
11214
|
) : null;
|
|
11128
11215
|
const result = rejected ?? await runTool(
|
|
11129
|
-
() => curated ? curated.handler(ctx, args) : dispatchTool(request.params.name, args)
|
|
11216
|
+
() => curated ? curated.handler(ctx, args) : dispatchTool(generated, request.params.name, args)
|
|
11130
11217
|
);
|
|
11131
11218
|
logToolCall({
|
|
11132
11219
|
tool: request.params.name,
|
|
@@ -11146,23 +11233,27 @@ function createSpecgenServer(ctx, version = "0.1.0", opts = {}) {
|
|
|
11146
11233
|
args: recordedArgumentValues(curated?.recordedArguments, args),
|
|
11147
11234
|
guideKind: curated?.recordedGuideKind?.(args)
|
|
11148
11235
|
},
|
|
11236
|
+
profile,
|
|
11149
11237
|
...opts.analytics
|
|
11150
11238
|
});
|
|
11151
11239
|
}
|
|
11152
11240
|
opts.onToolResult?.(request.params.name, result.status);
|
|
11153
11241
|
if (!result.ok && result.status === 401) opts.onUnauthorized?.();
|
|
11242
|
+
const annotations = curated?.annotations ?? generated?.annotations;
|
|
11154
11243
|
const payload = redactSecretEnv(
|
|
11155
|
-
result.ok ? result.payload : withRecoveryHint(
|
|
11244
|
+
result.ok ? result.payload : withRecoveryHint(
|
|
11245
|
+
result,
|
|
11246
|
+
annotations?.idempotentHint === true,
|
|
11247
|
+
request.params.name,
|
|
11248
|
+
callShapeOnlyTools.has(request.params.name)
|
|
11249
|
+
)
|
|
11156
11250
|
);
|
|
11157
11251
|
return {
|
|
11158
11252
|
content: [{ type: "text", text: JSON.stringify(payload, null, 2) }],
|
|
11159
11253
|
isError: !result.ok
|
|
11160
11254
|
};
|
|
11161
11255
|
});
|
|
11162
|
-
async function dispatchTool(name, args) {
|
|
11163
|
-
const tool = servedGeneratedTools.find(
|
|
11164
|
-
(candidate) => candidate.name === name
|
|
11165
|
-
);
|
|
11256
|
+
async function dispatchTool(tool, name, args) {
|
|
11166
11257
|
if (!tool)
|
|
11167
11258
|
return {
|
|
11168
11259
|
ok: false,
|
|
@@ -11210,8 +11301,24 @@ function errorHint(status, detail) {
|
|
|
11210
11301
|
return void 0;
|
|
11211
11302
|
}
|
|
11212
11303
|
var CALL_SHAPE_ONLY_HINT = `This tool lists its call shape only; ${DESCRIBE_TOOL_NAME} serves the full argument schema.`;
|
|
11213
|
-
|
|
11304
|
+
var OUTCOME_UNKNOWN_HINT = "Runpod may have completed this operation even though its response failed. Do not submit it again yet. Check the matching get- or list- tool or the Runpod console using the original request details and time. Lists can lag; if you cannot confirm the outcome, stop and ask the user to verify before retrying.";
|
|
11305
|
+
var JOB_OUTCOME_UNKNOWN_HINT = "Runpod may have submitted this Serverless job even though its response failed. Do not submit it again yet. No job-list tool is available, and get-job-status requires a job ID that this failed response may not have returned. Check the endpoint in the Runpod console or ask the user to verify the submission. If the outcome remains uncertain, stop instead of retrying.";
|
|
11306
|
+
var RETRY_JOB_OUTCOME_UNKNOWN_HINT = "Runpod may have requeued this Serverless job even though its response failed. Do not retry it again yet. Check get-job-status with the endpoint and job IDs you supplied, or check the Runpod console. If you cannot confirm the outcome, stop and ask the user to verify before retrying.";
|
|
11307
|
+
var JOB_SUBMISSION_TOOLS = /* @__PURE__ */ new Set(["run-endpoint", "runsync-endpoint"]);
|
|
11308
|
+
function withRecoveryHint(result, idempotent, toolName, listsCallShapeOnly = false) {
|
|
11214
11309
|
const payload = asRecord(result.payload) ?? { error: result.payload };
|
|
11310
|
+
if (!idempotent && result.status >= 500 && result.requestDelivery !== "not_sent") {
|
|
11311
|
+
const detail = asRecord(payload.detail);
|
|
11312
|
+
const safeDetail = detail ? { ...detail } : void 0;
|
|
11313
|
+
if (safeDetail) delete safeDetail.hint;
|
|
11314
|
+
return {
|
|
11315
|
+
...payload,
|
|
11316
|
+
...safeDetail ? { detail: safeDetail } : {},
|
|
11317
|
+
...payload.code !== void 0 ? { upstreamCode: payload.code } : {},
|
|
11318
|
+
code: "outcome_unknown",
|
|
11319
|
+
hint: toolName === "retry-job" ? RETRY_JOB_OUTCOME_UNKNOWN_HINT : JOB_SUBMISSION_TOOLS.has(toolName) ? JOB_OUTCOME_UNKNOWN_HINT : OUTCOME_UNKNOWN_HINT
|
|
11320
|
+
};
|
|
11321
|
+
}
|
|
11215
11322
|
const hint = payload.hint ?? asRecord(payload.detail)?.hint ?? errorHint(result.status, detailText(payload));
|
|
11216
11323
|
const shapeRejected = result.status === 400 || result.status === 422;
|
|
11217
11324
|
return {
|