@runpod/mcp-server 4.10.0 → 4.11.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/http.mjs CHANGED
@@ -9,9 +9,9 @@ import {
9
9
  requestLogSampleRate,
10
10
  requestProfile,
11
11
  summarizeRpc
12
- } from "./chunk-JTK6RETN.mjs";
12
+ } from "./chunk-4M7QDHK4.mjs";
13
13
  import "./chunk-577IYCJT.mjs";
14
- import "./chunk-FQJFKWUV.mjs";
14
+ import "./chunk-24UOECYY.mjs";
15
15
  export {
16
16
  bodyIsCheckable,
17
17
  defaultCredentialChecker,
@@ -24,6 +24,7 @@ __export(profile_exports, {
24
24
  DIRECTORY_TOOLS: () => DIRECTORY_TOOLS,
25
25
  directoryIncludes: () => directoryIncludes,
26
26
  directoryOmittedInputs: () => directoryOmittedInputs,
27
+ omittedInputsIn: () => omittedInputsIn,
27
28
  profileForPath: () => profileForPath
28
29
  });
29
30
  module.exports = __toCommonJS(profile_exports);
@@ -61,6 +62,8 @@ var DIRECTORY_TOOLS = {
61
62
  "deploy-hub-repo": IN,
62
63
  "detach-cost-center-resource": IN,
63
64
  "endpoint-health": IN,
65
+ // env can carry tokens (HF_TOKEN for a model download), so the directory omits it.
66
+ "exec-pod": { include: true, omitInputs: ["body.env"] },
64
67
  "get-capacity": IN,
65
68
  "get-cluster": IN,
66
69
  "get-cost-center": IN,
@@ -180,6 +183,21 @@ function directoryOmittedInputs(name) {
180
183
  const decision = DIRECTORY_TOOLS[name];
181
184
  return decision?.include ? decision.omitInputs ?? [] : [];
182
185
  }
186
+ function omittedInputsIn(omit, args) {
187
+ return omit.filter((key) => {
188
+ const [parent, child] = key.split(".");
189
+ if (child === void 0) return parent in args;
190
+ let value = args[parent];
191
+ if (typeof value === "string") {
192
+ try {
193
+ value = JSON.parse(value);
194
+ } catch {
195
+ return false;
196
+ }
197
+ }
198
+ return !!value && typeof value === "object" && child in value;
199
+ });
200
+ }
183
201
  function profileForPath(pathname) {
184
202
  return pathname.replace(/\/+$/, "") === DIRECTORY_PATH ? "directory" : "default";
185
203
  }
@@ -189,6 +207,7 @@ function profileForPath(pathname) {
189
207
  DIRECTORY_TOOLS,
190
208
  directoryIncludes,
191
209
  directoryOmittedInputs,
210
+ omittedInputsIn,
192
211
  profileForPath
193
212
  });
194
213
  //# sourceMappingURL=profile.cjs.map
@@ -1 +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 'add-organization-group-member': IN,\n 'attach-cost-center-resource': IN,\n 'cancel-job': IN,\n 'create-cluster': IN,\n 'create-cost-center': IN,\n 'create-delegation': IN,\n 'create-endpoint': IN,\n 'create-global-volume': IN,\n 'create-network-volume': IN,\n 'create-organization-group': IN,\n 'create-organization-invite': IN,\n 'create-organization-role': IN,\n 'create-pod': IN,\n 'create-template': IN,\n 'delete-cluster': IN,\n 'delete-cost-center': IN,\n 'delete-endpoint': IN,\n 'delete-global-volume': IN,\n 'delete-network-volume': IN,\n 'delete-organization-group': IN,\n 'delete-organization-invite': IN,\n 'delete-organization-role': IN,\n 'delete-organization-user': IN,\n 'delete-pod': IN,\n 'delete-template': IN,\n 'deploy-hub-repo': IN,\n 'detach-cost-center-resource': IN,\n 'endpoint-health': IN,\n 'get-capacity': IN,\n 'get-cluster': IN,\n 'get-cost-center': IN,\n 'get-cpu-type': IN,\n 'get-data-center': IN,\n 'get-endpoint': IN,\n 'get-endpoint-build': IN,\n 'get-endpoint-cold-start-metrics': IN,\n 'get-endpoint-request-metrics': IN,\n 'get-endpoint-worker-metrics': 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-group': IN,\n 'get-organization-invite': IN,\n 'get-organization-role': IN,\n 'get-organization-role-capabilities': 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-cost-center-resources': IN,\n 'list-cost-centers': 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-group-members': IN,\n 'list-organization-groups': IN,\n 'list-organization-invites': IN,\n 'list-organization-roles': 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 'remove-organization-group-member': 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-cost-center': IN,\n 'update-endpoint': IN,\n 'update-global-volume': IN,\n 'update-network-volume': IN,\n 'update-organization-group': IN,\n 'update-organization-role': IN,\n 'update-organization-user': 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,iCAAiC;AAAA,EACjC,+BAA+B;AAAA,EAC/B,cAAc;AAAA,EACd,kBAAkB;AAAA,EAClB,sBAAsB;AAAA,EACtB,qBAAqB;AAAA,EACrB,mBAAmB;AAAA,EACnB,wBAAwB;AAAA,EACxB,yBAAyB;AAAA,EACzB,6BAA6B;AAAA,EAC7B,8BAA8B;AAAA,EAC9B,4BAA4B;AAAA,EAC5B,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,kBAAkB;AAAA,EAClB,sBAAsB;AAAA,EACtB,mBAAmB;AAAA,EACnB,wBAAwB;AAAA,EACxB,yBAAyB;AAAA,EACzB,6BAA6B;AAAA,EAC7B,8BAA8B;AAAA,EAC9B,4BAA4B;AAAA,EAC5B,4BAA4B;AAAA,EAC5B,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,mBAAmB;AAAA,EACnB,+BAA+B;AAAA,EAC/B,mBAAmB;AAAA,EACnB,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,m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AAI;AAAA,EAC/C,8BAA8B,EAAE,SAAS,OAAO,QAAQ,IAAI;AAAA,EAC5D,iBAAiB,EAAE,SAAS,OAAO,QAAQ,IAAI;AAAA,EAC/C,cAAc,EAAE,SAAS,OAAO,QAAQ,IAAI;AAAA,EAC5C,cAAc,EAAE,SAAS,OAAO,QAAQ,IAAI;AAC9C;AAGO,SAAS,kBAAkB,MAAuB;AACvD,SAAO,gBAAgB,IAAI,GAAG,YAAY;AAC5C;AAEO,SAAS,uBAAuB,MAAiC;AACtE,QAAM,WAAW,gBAAgB,IAAI;AACrC,SAAO,UAAU,UAAW,SAAS,cAAc,CAAC,IAAK,CAAC;AAC5D;AAEO,SAAS,eAAe,UAAiC;AAC9D,SAAO,SAAS,QAAQ,QAAQ,EAAE,MAAM,iBACpC,cACA;AACN;","names":[]}
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 arguments the directory must not ask for (a credential,\n * for example); a call that passes one is refused. A key is a top-level\n * argument (`s3Config`) or one level inside an object argument (`body.env`). */\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 'add-organization-group-member': IN,\n 'attach-cost-center-resource': IN,\n 'cancel-job': IN,\n 'create-cluster': IN,\n 'create-cost-center': IN,\n 'create-delegation': IN,\n 'create-endpoint': IN,\n 'create-global-volume': IN,\n 'create-network-volume': IN,\n 'create-organization-group': IN,\n 'create-organization-invite': IN,\n 'create-organization-role': IN,\n 'create-pod': IN,\n 'create-template': IN,\n 'delete-cluster': IN,\n 'delete-cost-center': IN,\n 'delete-endpoint': IN,\n 'delete-global-volume': IN,\n 'delete-network-volume': IN,\n 'delete-organization-group': IN,\n 'delete-organization-invite': IN,\n 'delete-organization-role': IN,\n 'delete-organization-user': IN,\n 'delete-pod': IN,\n 'delete-template': IN,\n 'deploy-hub-repo': IN,\n 'detach-cost-center-resource': IN,\n 'endpoint-health': IN,\n // env can carry tokens (HF_TOKEN for a model download), so the directory omits it.\n 'exec-pod': { include: true, omitInputs: ['body.env'] },\n 'get-capacity': IN,\n 'get-cluster': IN,\n 'get-cost-center': IN,\n 'get-cpu-type': IN,\n 'get-data-center': IN,\n 'get-endpoint': IN,\n 'get-endpoint-build': IN,\n 'get-endpoint-cold-start-metrics': IN,\n 'get-endpoint-request-metrics': IN,\n 'get-endpoint-worker-metrics': 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-group': IN,\n 'get-organization-invite': IN,\n 'get-organization-role': IN,\n 'get-organization-role-capabilities': 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-cost-center-resources': IN,\n 'list-cost-centers': 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-group-members': IN,\n 'list-organization-groups': IN,\n 'list-organization-invites': IN,\n 'list-organization-roles': 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 'remove-organization-group-member': 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-cost-center': IN,\n 'update-endpoint': IN,\n 'update-global-volume': IN,\n 'update-network-volume': IN,\n 'update-organization-group': IN,\n 'update-organization-role': IN,\n 'update-organization-user': 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\n/** The omitted inputs (see DirectoryDecision) that a call's arguments set. */\nexport function omittedInputsIn(\n omit: readonly string[],\n args: Record<string, unknown>\n): string[] {\n return omit.filter((key) => {\n const [parent, child] = key.split('.');\n if (child === undefined) return parent in args;\n let value = args[parent];\n // Dispatch parses a body sent as a JSON string, so check its parsed form;\n // a string that is not JSON fails in dispatch instead.\n if (typeof value === 'string') {\n try {\n value = JSON.parse(value);\n } catch {\n return false;\n }\n }\n return !!value && typeof value === 'object' && child in value;\n });\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;AAAA;AASO,IAAM,iBAAiB;AAa9B,IAAM,KAAK,EAAE,SAAS,KAAK;AAC3B,IAAM,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AAC1B,UAAM,CAAC,QAAQ,KAAK,IAAI,IAAI,MAAM,GAAG;AACrC,QAAI,UAAU,OAAW,QAAO,UAAU;AAC1C,QAAI,QAAQ,KAAK,MAAM;AAGvB,QAAI,OAAO,UAAU,UAAU;AAC7B,UAAI;AACF,gBAAQ,KAAK,MAAM,KAAK;AAAA,MAC1B,QAAQ;AACN,eAAO;AAAA,MACT;AAAA,IACF;AACA,WAAO,CAAC,CAAC,SAAS,OAAO,UAAU,YAAY,SAAS;AAAA,EAC1D,CAAC;AACH;AAEO,SAAS,eAAe,UAAiC;AAC9D,SAAO,SAAS,QAAQ,QAAQ,EAAE,MAAM,iBACpC,cACA;AACN;","names":[]}
@@ -4,8 +4,9 @@ declare const DIRECTORY_PATH = "/directory";
4
4
  * can serve must have an entry, so a new tool (a spec regeneration, a new
5
5
  * curated tool) fails tests/specgen-directory.test.ts until someone decides.
6
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. */
7
+ * `omitInputs` hides arguments the directory must not ask for (a credential,
8
+ * for example); a call that passes one is refused. A key is a top-level
9
+ * argument (`s3Config`) or one level inside an object argument (`body.env`). */
9
10
  type DirectoryDecision = {
10
11
  include: true;
11
12
  omitInputs?: readonly string[];
@@ -17,6 +18,8 @@ declare const DIRECTORY_TOOLS: Readonly<Record<string, DirectoryDecision>>;
17
18
  /** Served on the directory profile only with an explicit include. */
18
19
  declare function directoryIncludes(name: string): boolean;
19
20
  declare function directoryOmittedInputs(name: string): readonly string[];
21
+ /** The omitted inputs (see DirectoryDecision) that a call's arguments set. */
22
+ declare function omittedInputsIn(omit: readonly string[], args: Record<string, unknown>): string[];
20
23
  declare function profileForPath(pathname: string): ServerProfile;
21
24
 
22
- export { DIRECTORY_PATH, DIRECTORY_TOOLS, type DirectoryDecision, type ServerProfile, directoryIncludes, directoryOmittedInputs, profileForPath };
25
+ export { DIRECTORY_PATH, DIRECTORY_TOOLS, type DirectoryDecision, type ServerProfile, directoryIncludes, directoryOmittedInputs, omittedInputsIn, profileForPath };
@@ -4,8 +4,9 @@ declare const DIRECTORY_PATH = "/directory";
4
4
  * can serve must have an entry, so a new tool (a spec regeneration, a new
5
5
  * curated tool) fails tests/specgen-directory.test.ts until someone decides.
6
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. */
7
+ * `omitInputs` hides arguments the directory must not ask for (a credential,
8
+ * for example); a call that passes one is refused. A key is a top-level
9
+ * argument (`s3Config`) or one level inside an object argument (`body.env`). */
9
10
  type DirectoryDecision = {
10
11
  include: true;
11
12
  omitInputs?: readonly string[];
@@ -17,6 +18,8 @@ declare const DIRECTORY_TOOLS: Readonly<Record<string, DirectoryDecision>>;
17
18
  /** Served on the directory profile only with an explicit include. */
18
19
  declare function directoryIncludes(name: string): boolean;
19
20
  declare function directoryOmittedInputs(name: string): readonly string[];
21
+ /** The omitted inputs (see DirectoryDecision) that a call's arguments set. */
22
+ declare function omittedInputsIn(omit: readonly string[], args: Record<string, unknown>): string[];
20
23
  declare function profileForPath(pathname: string): ServerProfile;
21
24
 
22
- export { DIRECTORY_PATH, DIRECTORY_TOOLS, type DirectoryDecision, type ServerProfile, directoryIncludes, directoryOmittedInputs, profileForPath };
25
+ export { DIRECTORY_PATH, DIRECTORY_TOOLS, type DirectoryDecision, type ServerProfile, directoryIncludes, directoryOmittedInputs, omittedInputsIn, profileForPath };
@@ -3,13 +3,15 @@ import {
3
3
  DIRECTORY_TOOLS,
4
4
  directoryIncludes,
5
5
  directoryOmittedInputs,
6
+ omittedInputsIn,
6
7
  profileForPath
7
- } from "../chunk-FQJFKWUV.mjs";
8
+ } from "../chunk-24UOECYY.mjs";
8
9
  export {
9
10
  DIRECTORY_PATH,
10
11
  DIRECTORY_TOOLS,
11
12
  directoryIncludes,
12
13
  directoryOmittedInputs,
14
+ omittedInputsIn,
13
15
  profileForPath
14
16
  };
15
17
  //# sourceMappingURL=profile.mjs.map