@didit-protocol/mcp-server 3.0.3 → 5.1.33

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.
Files changed (172) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +582 -178
  3. package/dist/audit-log.d.ts +22 -0
  4. package/dist/audit-log.d.ts.map +1 -0
  5. package/dist/audit-log.js +77 -0
  6. package/dist/audit-log.js.map +1 -0
  7. package/dist/auth/introspection-verifier.d.ts +16 -0
  8. package/dist/auth/introspection-verifier.d.ts.map +1 -0
  9. package/dist/auth/introspection-verifier.js +77 -0
  10. package/dist/auth/introspection-verifier.js.map +1 -0
  11. package/dist/auth/verifier.d.ts +19 -0
  12. package/dist/auth/verifier.d.ts.map +1 -0
  13. package/dist/auth/verifier.js +88 -0
  14. package/dist/auth/verifier.js.map +1 -0
  15. package/dist/blank-args.d.ts +10 -0
  16. package/dist/blank-args.d.ts.map +1 -0
  17. package/dist/blank-args.js +34 -0
  18. package/dist/blank-args.js.map +1 -0
  19. package/dist/chatgpt-app.d.ts +44 -0
  20. package/dist/chatgpt-app.d.ts.map +1 -0
  21. package/dist/chatgpt-app.js +52 -0
  22. package/dist/chatgpt-app.js.map +1 -0
  23. package/dist/config.d.ts +115 -2
  24. package/dist/config.d.ts.map +1 -1
  25. package/dist/config.js +251 -15
  26. package/dist/config.js.map +1 -1
  27. package/dist/dates.d.ts +2 -0
  28. package/dist/dates.d.ts.map +1 -0
  29. package/dist/dates.js +23 -0
  30. package/dist/dates.js.map +1 -0
  31. package/dist/feature-config-schema.d.ts +66 -0
  32. package/dist/feature-config-schema.d.ts.map +1 -0
  33. package/dist/feature-config-schema.js +192 -0
  34. package/dist/feature-config-schema.js.map +1 -0
  35. package/dist/http.d.ts +4 -0
  36. package/dist/http.d.ts.map +1 -0
  37. package/dist/http.js +230 -0
  38. package/dist/http.js.map +1 -0
  39. package/dist/index.d.ts +20 -1
  40. package/dist/index.d.ts.map +1 -1
  41. package/dist/index.js +2986 -440
  42. package/dist/index.js.map +1 -1
  43. package/dist/internal-tools.d.ts +17 -0
  44. package/dist/internal-tools.d.ts.map +1 -0
  45. package/dist/internal-tools.js +26 -0
  46. package/dist/internal-tools.js.map +1 -0
  47. package/dist/mcp-modern.d.ts +36 -0
  48. package/dist/mcp-modern.d.ts.map +1 -0
  49. package/dist/mcp-modern.js +152 -0
  50. package/dist/mcp-modern.js.map +1 -0
  51. package/dist/orgapp.d.ts +34 -0
  52. package/dist/orgapp.d.ts.map +1 -0
  53. package/dist/orgapp.js +93 -0
  54. package/dist/orgapp.js.map +1 -0
  55. package/dist/permissions.d.ts +24 -0
  56. package/dist/permissions.d.ts.map +1 -0
  57. package/dist/permissions.js +210 -0
  58. package/dist/permissions.js.map +1 -0
  59. package/dist/privileged-tools.d.ts +14 -0
  60. package/dist/privileged-tools.d.ts.map +1 -0
  61. package/dist/privileged-tools.js +21 -0
  62. package/dist/privileged-tools.js.map +1 -0
  63. package/dist/schema/feature-config-schema.json +4446 -0
  64. package/dist/security.d.ts +168 -0
  65. package/dist/security.d.ts.map +1 -0
  66. package/dist/security.js +858 -0
  67. package/dist/security.js.map +1 -0
  68. package/dist/session-pdf-download.d.ts +8 -0
  69. package/dist/session-pdf-download.d.ts.map +1 -0
  70. package/dist/session-pdf-download.js +91 -0
  71. package/dist/session-pdf-download.js.map +1 -0
  72. package/dist/tools/analytics.d.ts +13 -0
  73. package/dist/tools/analytics.d.ts.map +1 -0
  74. package/dist/tools/analytics.js +171 -0
  75. package/dist/tools/analytics.js.map +1 -0
  76. package/dist/tools/auth.d.ts +11 -2
  77. package/dist/tools/auth.d.ts.map +1 -1
  78. package/dist/tools/auth.js +93 -19
  79. package/dist/tools/auth.js.map +1 -1
  80. package/dist/tools/billing.d.ts +2 -2
  81. package/dist/tools/billing.d.ts.map +1 -1
  82. package/dist/tools/billing.js +38 -12
  83. package/dist/tools/billing.js.map +1 -1
  84. package/dist/tools/blocklist.d.ts +2 -1
  85. package/dist/tools/blocklist.d.ts.map +1 -1
  86. package/dist/tools/blocklist.js +10 -19
  87. package/dist/tools/blocklist.js.map +1 -1
  88. package/dist/tools/businesses.d.ts +7 -0
  89. package/dist/tools/businesses.d.ts.map +1 -0
  90. package/dist/tools/businesses.js +57 -0
  91. package/dist/tools/businesses.js.map +1 -0
  92. package/dist/tools/cases.d.ts +6 -0
  93. package/dist/tools/cases.d.ts.map +1 -0
  94. package/dist/tools/cases.js +63 -0
  95. package/dist/tools/cases.js.map +1 -0
  96. package/dist/tools/compliance.d.ts +8 -0
  97. package/dist/tools/compliance.d.ts.map +1 -0
  98. package/dist/tools/compliance.js +95 -0
  99. package/dist/tools/compliance.js.map +1 -0
  100. package/dist/tools/context.d.ts +2 -0
  101. package/dist/tools/context.d.ts.map +1 -0
  102. package/dist/tools/context.js +37 -0
  103. package/dist/tools/context.js.map +1 -0
  104. package/dist/tools/customization.d.ts +18 -0
  105. package/dist/tools/customization.d.ts.map +1 -0
  106. package/dist/tools/customization.js +35 -0
  107. package/dist/tools/customization.js.map +1 -0
  108. package/dist/tools/feature-config.d.ts +53 -0
  109. package/dist/tools/feature-config.d.ts.map +1 -0
  110. package/dist/tools/feature-config.js +432 -0
  111. package/dist/tools/feature-config.js.map +1 -0
  112. package/dist/tools/lists.d.ts +3 -0
  113. package/dist/tools/lists.d.ts.map +1 -1
  114. package/dist/tools/lists.js +29 -26
  115. package/dist/tools/lists.js.map +1 -1
  116. package/dist/tools/members.d.ts +7 -0
  117. package/dist/tools/members.d.ts.map +1 -0
  118. package/dist/tools/members.js +60 -0
  119. package/dist/tools/members.js.map +1 -0
  120. package/dist/tools/observability.d.ts +4 -0
  121. package/dist/tools/observability.d.ts.map +1 -0
  122. package/dist/tools/observability.js +17 -0
  123. package/dist/tools/observability.js.map +1 -0
  124. package/dist/tools/questionnaires.d.ts +61 -3
  125. package/dist/tools/questionnaires.d.ts.map +1 -1
  126. package/dist/tools/questionnaires.js +128 -24
  127. package/dist/tools/questionnaires.js.map +1 -1
  128. package/dist/tools/reports.d.ts +5 -0
  129. package/dist/tools/reports.d.ts.map +1 -0
  130. package/dist/tools/reports.js +89 -0
  131. package/dist/tools/reports.js.map +1 -0
  132. package/dist/tools/search.d.ts +30 -0
  133. package/dist/tools/search.d.ts.map +1 -0
  134. package/dist/tools/search.js +317 -0
  135. package/dist/tools/search.js.map +1 -0
  136. package/dist/tools/session-explain-levers.d.ts +17 -0
  137. package/dist/tools/session-explain-levers.d.ts.map +1 -0
  138. package/dist/tools/session-explain-levers.js +139 -0
  139. package/dist/tools/session-explain-levers.js.map +1 -0
  140. package/dist/tools/session-explain.d.ts +3 -0
  141. package/dist/tools/session-explain.d.ts.map +1 -0
  142. package/dist/tools/session-explain.js +180 -0
  143. package/dist/tools/session-explain.js.map +1 -0
  144. package/dist/tools/sessions.d.ts +16 -3
  145. package/dist/tools/sessions.d.ts.map +1 -1
  146. package/dist/tools/sessions.js +150 -64
  147. package/dist/tools/sessions.js.map +1 -1
  148. package/dist/tools/settings.d.ts +15 -1
  149. package/dist/tools/settings.d.ts.map +1 -1
  150. package/dist/tools/settings.js +141 -22
  151. package/dist/tools/settings.js.map +1 -1
  152. package/dist/tools/standalone.d.ts +9 -6
  153. package/dist/tools/standalone.d.ts.map +1 -1
  154. package/dist/tools/standalone.js +47 -102
  155. package/dist/tools/standalone.js.map +1 -1
  156. package/dist/tools/transactions.d.ts +14 -0
  157. package/dist/tools/transactions.d.ts.map +1 -0
  158. package/dist/tools/transactions.js +93 -0
  159. package/dist/tools/transactions.js.map +1 -0
  160. package/dist/tools/users.d.ts +3 -1
  161. package/dist/tools/users.d.ts.map +1 -1
  162. package/dist/tools/users.js +35 -22
  163. package/dist/tools/users.js.map +1 -1
  164. package/dist/tools/webhooks.d.ts +6 -0
  165. package/dist/tools/webhooks.d.ts.map +1 -0
  166. package/dist/tools/webhooks.js +41 -0
  167. package/dist/tools/webhooks.js.map +1 -0
  168. package/dist/tools/workflow-graph.d.ts +65 -0
  169. package/dist/tools/workflow-graph.d.ts.map +1 -0
  170. package/dist/tools/workflow-graph.js +686 -0
  171. package/dist/tools/workflow-graph.js.map +1 -0
  172. package/package.json +23 -6
@@ -0,0 +1,22 @@
1
+ import type { AuthInfo } from "@modelcontextprotocol/sdk/server/auth/types.js";
2
+ export interface ToolCallMeta {
3
+ tool: string;
4
+ args: Record<string, unknown>;
5
+ authInfo?: AuthInfo;
6
+ hosted: boolean;
7
+ /** Shadow-mode verdict of the permission pre-check (permissions.ts), when it would have denied. */
8
+ permissionCheck?: "would_deny";
9
+ }
10
+ export interface ToolResultLike {
11
+ isError?: boolean;
12
+ content?: Array<{
13
+ type: string;
14
+ text?: string;
15
+ }>;
16
+ }
17
+ /** Deterministic JSON: object keys sorted recursively, so key order never changes the digest. */
18
+ export declare function canonicalJson(value: unknown): string;
19
+ export declare function argsDigest(args: unknown): string;
20
+ /** Run one tool dispatch and log its outcome, whether it returned, errored, or threw. */
21
+ export declare function auditToolCall<T extends ToolResultLike>(meta: ToolCallMeta, run: () => Promise<T>): Promise<T>;
22
+ //# sourceMappingURL=audit-log.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit-log.d.ts","sourceRoot":"","sources":["../src/audit-log.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAE/E,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,mGAAmG;IACnG,eAAe,CAAC,EAAE,YAAY,CAAC;CAChC;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAClD;AAED,iGAAiG;AACjG,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAUpD;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAEhD;AA4CD,yFAAyF;AACzF,wBAAsB,aAAa,CAAC,CAAC,SAAS,cAAc,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAanH"}
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.canonicalJson = canonicalJson;
4
+ exports.argsDigest = argsDigest;
5
+ exports.auditToolCall = auditToolCall;
6
+ // One structured line per tools/call, so the log pipeline (stderr → the log store) can answer
7
+ // "who ran which tool, against which org, with what outcome" — the MCP server's own
8
+ // audit record, complementary to the backend's HTTP audit log (which sees the request
9
+ // but not the tool name). Argument VALUES are never logged (PII): only their keys and
10
+ // a canonical digest, which is enough to correlate a call with the exact payload.
11
+ const node_crypto_1 = require("node:crypto");
12
+ /** Deterministic JSON: object keys sorted recursively, so key order never changes the digest. */
13
+ function canonicalJson(value) {
14
+ if (Array.isArray(value))
15
+ return `[${value.map(canonicalJson).join(",")}]`;
16
+ if (value === null || typeof value !== "object")
17
+ return JSON.stringify(value) ?? "null";
18
+ const entries = Object.entries(value)
19
+ .filter(([, v]) => v !== undefined)
20
+ .sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0))
21
+ .map(([k, v]) => `${JSON.stringify(k)}:${canonicalJson(v)}`);
22
+ return `{${entries.join(",")}}`;
23
+ }
24
+ function argsDigest(args) {
25
+ return (0, node_crypto_1.createHash)("sha256").update(canonicalJson(args)).digest("hex").slice(0, 16);
26
+ }
27
+ /** Our own error format is `Error [code]: …` (see the dispatch catch); recover the code. */
28
+ function errorCodeOf(result) {
29
+ const text = result.content?.find((c) => c.type === "text")?.text ?? "";
30
+ return /^Error \[([a-z_]+)\]/.exec(text)?.[1] ?? "tool_error";
31
+ }
32
+ function extra(authInfo, key) {
33
+ const value = authInfo?.extra?.[key];
34
+ return typeof value === "string" ? value : undefined;
35
+ }
36
+ function record(meta, startedAt, outcome, errorCode) {
37
+ return {
38
+ time: new Date().toISOString(),
39
+ level: "info",
40
+ event: "mcp.tool_call",
41
+ tool: meta.tool,
42
+ outcome,
43
+ ...(errorCode ? { error_code: errorCode } : {}),
44
+ duration_ms: Date.now() - startedAt,
45
+ transport: meta.hosted ? "hosted" : "stdio",
46
+ sub: extra(meta.authInfo, "sub"),
47
+ organization_id: extra(meta.authInfo, "organization_id"),
48
+ client_id: meta.authInfo?.clientId,
49
+ args_digest: argsDigest(meta.args),
50
+ arg_keys: Object.keys(meta.args).sort(),
51
+ ...(typeof meta.args.confirm === "boolean" ? { confirm: meta.args.confirm } : {}),
52
+ ...(meta.permissionCheck ? { permission_check: meta.permissionCheck } : {}),
53
+ };
54
+ }
55
+ /** stderr on purpose: over stdio, stdout is the JSON-RPC channel. Never throws. */
56
+ function emit(meta, startedAt, outcome, errorCode) {
57
+ try {
58
+ console.error(JSON.stringify(record(meta, startedAt, outcome, errorCode)));
59
+ }
60
+ catch (error) {
61
+ console.error(`[didit-mcp] audit log failed for ${meta.tool}: ${error.message}`);
62
+ }
63
+ }
64
+ /** Run one tool dispatch and log its outcome, whether it returned, errored, or threw. */
65
+ async function auditToolCall(meta, run) {
66
+ const startedAt = Date.now();
67
+ try {
68
+ const result = await run();
69
+ emit(meta, startedAt, result.isError ? "error" : "ok", result.isError ? errorCodeOf(result) : undefined);
70
+ return result;
71
+ }
72
+ catch (error) {
73
+ emit(meta, startedAt, "error", "exception");
74
+ throw error;
75
+ }
76
+ }
77
+ //# sourceMappingURL=audit-log.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit-log.js","sourceRoot":"","sources":["../src/audit-log.ts"],"names":[],"mappings":";;AAuBA,sCAUC;AAED,gCAEC;AA6CD,sCAa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,CAAC;QAEzG,OAAO,MAAM,CAAC;IAChB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;QAC5C,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { OAuthTokenVerifier } from "@modelcontextprotocol/sdk/server/auth/provider.js";
2
+ import type { AuthInfo } from "@modelcontextprotocol/sdk/server/auth/types.js";
3
+ /**
4
+ * RFC 7662 token-introspection verifier — the correct path for service-didit-auth,
5
+ * whose OIDC authorization-code flow issues opaque access tokens. Mirrors the contract
6
+ * the verification service already uses (POST {token, requested_org} with the client's
7
+ * Basic auth) so the same auth backend validates MCP and API calls identically.
8
+ *
9
+ * Introspection returns the org-scoped permissions directly, so this also yields the
10
+ * scopes and organization_id the dispatch needs — no second call.
11
+ */
12
+ export declare class IntrospectionTokenVerifier implements OAuthTokenVerifier {
13
+ private readonly basic;
14
+ verifyAccessToken(token: string): Promise<AuthInfo>;
15
+ }
16
+ //# sourceMappingURL=introspection-verifier.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"introspection-verifier.d.ts","sourceRoot":"","sources":["../../src/auth/introspection-verifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mDAAmD,CAAC;AAC5F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAW/E;;;;;;;;GAQG;AACH,qBAAa,0BAA2B,YAAW,kBAAkB;IACnE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAkG;IAElH,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;CAmD1D"}
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IntrospectionTokenVerifier = void 0;
4
+ const errors_js_1 = require("@modelcontextprotocol/sdk/server/auth/errors.js");
5
+ const config_1 = require("../config");
6
+ /**
7
+ * RFC 7662 token-introspection verifier — the correct path for service-didit-auth,
8
+ * whose OIDC authorization-code flow issues opaque access tokens. Mirrors the contract
9
+ * the verification service already uses (POST {token, requested_org} with the client's
10
+ * Basic auth) so the same auth backend validates MCP and API calls identically.
11
+ *
12
+ * Introspection returns the org-scoped permissions directly, so this also yields the
13
+ * scopes and organization_id the dispatch needs — no second call.
14
+ */
15
+ class IntrospectionTokenVerifier {
16
+ constructor() {
17
+ this.basic = "Basic " + Buffer.from(`${config_1.MCP_OAUTH_CLIENT_ID}:${config_1.MCP_OAUTH_CLIENT_SECRET}`).toString("base64");
18
+ }
19
+ async verifyAccessToken(token) {
20
+ const body = { token };
21
+ if (config_1.MCP_DEFAULT_ORG)
22
+ body.requested_org = config_1.MCP_DEFAULT_ORG;
23
+ let data = null;
24
+ try {
25
+ const res = await fetch(config_1.MCP_OAUTH_INTROSPECT_URL, {
26
+ method: "POST",
27
+ headers: { "Content-Type": "application/json", Authorization: this.basic },
28
+ body: JSON.stringify(body),
29
+ signal: AbortSignal.timeout(8000),
30
+ });
31
+ if (res.ok)
32
+ data = (await res.json());
33
+ }
34
+ catch (err) {
35
+ throw new errors_js_1.InvalidTokenError(`Introspection request failed: ${String(err)}`);
36
+ }
37
+ // RFC 7662: `active` is REQUIRED and authoritative. Treat anything other than an
38
+ // explicit true (including a response that omits the field) as inactive.
39
+ if (!data || data.active !== true) {
40
+ throw new errors_js_1.InvalidTokenError("Token is inactive or unknown");
41
+ }
42
+ const exp = typeof data.exp === "number" ? data.exp : undefined;
43
+ if (exp !== undefined && exp * 1000 <= Date.now()) {
44
+ throw new errors_js_1.InvalidTokenError("Token has expired");
45
+ }
46
+ const scopes = coerceList(data.org_permissions).concat(coerceList(data.claims), coerceList(data.scope));
47
+ const organizationId = data.organization_id ||
48
+ data.requested_org ||
49
+ config_1.MCP_DEFAULT_ORG ||
50
+ undefined;
51
+ return {
52
+ token,
53
+ clientId: data.client_id || data.aud || config_1.MCP_OAUTH_CLIENT_ID || "unknown",
54
+ scopes: [...new Set(scopes)],
55
+ expiresAt: exp,
56
+ resource: new URL(config_1.MCP_RESOURCE_URI),
57
+ extra: {
58
+ organization_id: organizationId,
59
+ sub: data.sub ?? data.user_id,
60
+ identifier: data.identifier,
61
+ // Optional role flag from the token; the backend permission is the authoritative gate.
62
+ // It only controls which tools the connected user can see / call (none in the OSS build).
63
+ is_privileged: data.is_staff === true,
64
+ has_2fa_enabled: data.has_2fa_enabled === true,
65
+ },
66
+ };
67
+ }
68
+ }
69
+ exports.IntrospectionTokenVerifier = IntrospectionTokenVerifier;
70
+ function coerceList(value) {
71
+ if (Array.isArray(value))
72
+ return value.filter((v) => typeof v === "string");
73
+ if (typeof value === "string")
74
+ return value.split(/\s+/).filter(Boolean);
75
+ return [];
76
+ }
77
+ //# sourceMappingURL=introspection-verifier.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"introspection-verifier.js","sourceRoot":"","sources":["../../src/auth/introspection-verifier.ts"],"names":[],"mappings":";;;AAEA,+EAAoF;AAEpF,sCAMmB;AAEnB;;;;;;;;GAQG;AACH,MAAa,0BAA0B;IAAvC;QACmB,UAAK,GAAG,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,4BAAmB,IAAI,gCAAuB,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAqD1H,CAAC;IAnDC,KAAK,CAAC,iBAAiB,CAAC,KAAa;QACnC,MAAM,IAAI,GAA2B,EAAE,KAAK,EAAE,CAAC;QAC/C,IAAI,wBAAe;YAAE,IAAI,CAAC,aAAa,GAAG,wBAAe,CAAC;QAE1D,IAAI,IAAI,GAAmC,IAAI,CAAC;QAChD,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,iCAAwB,EAAE;gBAChD,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE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AAS;YAChG,MAAM,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;YAC5B,SAAS,EAAE,GAAG;YACd,QAAQ,EAAE,IAAI,GAAG,CAAC,yBAAgB,CAAC;YACnC,KAAK,EAAE;gBACL,eAAe,EAAE,cAAc;gBAC/B,GAAG,EAAE,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,OAAO;gBAC7B,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,uFAAuF;gBACvF,0FAA0F;gBAC1F,aAAa,EAAE,IAAI,CAAC,QAAQ,KAAK,IAAI;gBACrC,eAAe,EAAE,IAAI,CAAC,eAAe,KAAK,IAAI;aAC/C;SACF,CAAC;IACJ,CAAC;CACF;AAtDD,gEAsDC;AAED,SAAS,UAAU,CAAC,KAAc;IAChC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAe,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC;IACzF,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACzE,OAAO,EAAE,CAAC;AACZ,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { OAuthTokenVerifier } from "@modelcontextprotocol/sdk/server/auth/provider.js";
2
+ import type { AuthInfo } from "@modelcontextprotocol/sdk/server/auth/types.js";
3
+ /**
4
+ * Resource-server token verifier for the hosted MCP. Validates the user Bearer
5
+ * JWT minted by service-didit-auth using its published JWKS (signature + expiry),
6
+ * and — when configured — the issuer and audience. The verification API remains
7
+ * the authoritative org-permission enforcer (via introspection); this is the fast
8
+ * gate that produces the 401/403 challenge and the per-request AuthInfo.
9
+ *
10
+ * Validation is intentionally lenient on issuer/audience so it keeps working
11
+ * through the RFC 8707 rollout: those checks only apply once the corresponding
12
+ * env vars are set. Signature and expiry are always enforced.
13
+ */
14
+ export declare class DiditTokenVerifier implements OAuthTokenVerifier {
15
+ private readonly algorithms;
16
+ private readonly jwks;
17
+ verifyAccessToken(token: string): Promise<AuthInfo>;
18
+ }
19
+ //# sourceMappingURL=verifier.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verifier.d.ts","sourceRoot":"","sources":["../../src/auth/verifier.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mDAAmD,CAAC;AAC5F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAU/E;;;;;;;;;;GAUG;AACH,qBAAa,kBAAmB,YAAW,kBAAkB;IAG3D,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAsB;IACjD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA+C;IAE9D,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;CAmC1D"}
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DiditTokenVerifier = void 0;
4
+ const jose_1 = require("jose");
5
+ const errors_js_1 = require("@modelcontextprotocol/sdk/server/auth/errors.js");
6
+ const config_1 = require("../config");
7
+ /**
8
+ * Resource-server token verifier for the hosted MCP. Validates the user Bearer
9
+ * JWT minted by service-didit-auth using its published JWKS (signature + expiry),
10
+ * and — when configured — the issuer and audience. The verification API remains
11
+ * the authoritative org-permission enforcer (via introspection); this is the fast
12
+ * gate that produces the 401/403 challenge and the per-request AuthInfo.
13
+ *
14
+ * Validation is intentionally lenient on issuer/audience so it keeps working
15
+ * through the RFC 8707 rollout: those checks only apply once the corresponding
16
+ * env vars are set. Signature and expiry are always enforced.
17
+ */
18
+ class DiditTokenVerifier {
19
+ constructor() {
20
+ // Tokens are ECDSA-signed via AWS KMS (ES256) in prod and ES256 locally; auth
21
+ // settings also reference RS256. Allow both rather than hardcoding one.
22
+ this.algorithms = ["ES256", "RS256"];
23
+ this.jwks = (0, jose_1.createRemoteJWKSet)(new URL(config_1.DIDIT_JWKS_URL));
24
+ }
25
+ async verifyAccessToken(token) {
26
+ const audience = [config_1.MCP_RESOURCE_URI, config_1.MCP_OAUTH_CLIENT_ID].filter(Boolean);
27
+ let payload;
28
+ try {
29
+ ({ payload } = await (0, jose_1.jwtVerify)(token, this.jwks, {
30
+ algorithms: this.algorithms,
31
+ ...(config_1.DIDIT_AUTH_ISSUER ? { issuer: config_1.DIDIT_AUTH_ISSUER } : {}),
32
+ ...(audience.length ? { audience } : {}),
33
+ }));
34
+ }
35
+ catch (err) {
36
+ // jose throws on malformed/expired/bad-signature/wrong-aud tokens. Surface
37
+ // them as InvalidTokenError so the bearer middleware answers 401 (not 500).
38
+ if (err instanceof errors_js_1.OAuthError)
39
+ throw err;
40
+ throw new errors_js_1.InvalidTokenError(err instanceof Error ? err.message : "Invalid access token");
41
+ }
42
+ const scopes = extractScopes(payload);
43
+ const organizationId = payload.organization_id ?? payload.org;
44
+ return {
45
+ token,
46
+ clientId: coerceClientId(payload),
47
+ scopes,
48
+ expiresAt: payload.exp,
49
+ resource: new URL(config_1.MCP_RESOURCE_URI),
50
+ extra: {
51
+ organization_id: organizationId,
52
+ sub: payload.sub,
53
+ identifier: payload.identifier,
54
+ is_privileged: payload.is_staff === true,
55
+ has_2fa_enabled: payload.has_2fa_enabled === true,
56
+ },
57
+ };
58
+ }
59
+ }
60
+ exports.DiditTokenVerifier = DiditTokenVerifier;
61
+ /** Didit tokens carry permissions under `claims` and/or `org_permissions`; both may be a list or a space-delimited string. */
62
+ function extractScopes(payload) {
63
+ const out = new Set();
64
+ for (const key of ["claims", "org_permissions", "scope", "scopes"]) {
65
+ const value = payload[key];
66
+ if (Array.isArray(value)) {
67
+ for (const v of value)
68
+ if (typeof v === "string")
69
+ out.add(v);
70
+ }
71
+ else if (typeof value === "string") {
72
+ for (const v of value.split(/\s+/))
73
+ if (v)
74
+ out.add(v);
75
+ }
76
+ }
77
+ return [...out];
78
+ }
79
+ function coerceClientId(payload) {
80
+ if (typeof payload.client_id === "string")
81
+ return payload.client_id;
82
+ if (typeof payload.aud === "string")
83
+ return payload.aud;
84
+ if (Array.isArray(payload.aud) && typeof payload.aud[0] === "string")
85
+ return payload.aud[0];
86
+ return config_1.MCP_OAUTH_CLIENT_ID || "unknown";
87
+ }
88
+ //# sourceMappingURL=verifier.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verifier.js","sourceRoot":"","sources":["../../src/auth/verifier.ts"],"names":[],"mappings":";;;AAAA,+BAAsE;AAGtE,+EAAgG;AAEhG,sCAKmB;AAEnB;;;;;;;;;;GAUG;AACH,MAAa,kBAAkB;IAA/B;QACE,8EAA8E;QAC9E,wEAAwE;QACvD,eAAU,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAChC,SAAI,GAAG,IAAA,yBAAkB,EAAC,IAAI,GAAG,CAAC,uBAAc,CAAC,CAAC,CAAC;IAqCtE,CAAC;IAnCC,KAAK,CAAC,iBAAiB,CAAC,KAAa;QACnC,MAAM,QAAQ,GAAG,CAAC,yBAAgB,EAAE,4BAAmB,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACzE,IAAI,OAAmB,CAAC;QACxB,IAAI,CAAC;YACH,CAAC,EAAE,OAAO,EAAE,GAAG,MAAM,IAAA,gBAAS,EAAC,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE;gBAC/C,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,GAAG,CAAC,0BAAiB,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,0BAAiB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC3D,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aACzC,CAAC,CAAC,CAAC;QACN,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,2EA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IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YACrC,KAAK,MAAM,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC;gBAAE,IAAI,CAAC;oBAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QACxD,CAAC;IACH,CAAC;IACD,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC;AAClB,CAAC;AAED,SAAS,cAAc,CAAC,OAAmB;IACzC,IAAI,OAAO,OAAO,CAAC,SAAS,KAAK,QAAQ;QAAE,OAAO,OAAO,CAAC,SAAS,CAAC;IACpE,IAAI,OAAO,OAAO,CAAC,GAAG,KAAK,QAAQ;QAAE,OAAO,OAAO,CAAC,GAAG,CAAC;IACxD,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,QAAQ;QAAE,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC5F,OAAO,4BAAmB,IAAI,SAAS,CAAC;AAC1C,CAAC"}
@@ -0,0 +1,10 @@
1
+ type PropertySchema = {
2
+ type?: unknown;
3
+ };
4
+ export type InputSchema = {
5
+ properties?: Record<string, PropertySchema>;
6
+ required?: string[];
7
+ };
8
+ export declare function dropBlankOptionals<T extends Record<string, unknown> | undefined>(args: T, schema: InputSchema | undefined): T;
9
+ export {};
10
+ //# sourceMappingURL=blank-args.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blank-args.d.ts","sourceRoot":"","sources":["../src/blank-args.ts"],"names":[],"mappings":"AAiBA,KAAK,cAAc,GAAG;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAEzC,MAAM,MAAM,WAAW,GAAG;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC5C,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAYF,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EAC9E,IAAI,EAAE,CAAC,EACP,MAAM,EAAE,WAAW,GAAG,SAAS,GAC9B,CAAC,CAQH"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ // Blank OPTIONAL arguments are dropped before a tool handler sees them.
3
+ //
4
+ // Some model arms fill EVERY declared argument of a tool and blank the ones they
5
+ // have no value for (`""`, or `null` on a property whose schema never admits
6
+ // null). Prod 16-17 Sep 2026 (didit-ai-assistant, gpt-5.6-luna): every
7
+ // `didit_session_search` carried `date_from: ""` / `date_to: ""` and the console
8
+ // API answered 400 "Enter a valid date"; a workflow-check tool got
9
+ // `label: ""` and resolved it to "Several workflows are labelled """. Both were
10
+ // the call a schema-honouring model would have made, minus the blanks — so the
11
+ // blanks are removed and the argument is omitted.
12
+ //
13
+ // A REQUIRED argument is never touched: a blank there is the model's mistake to
14
+ // hear about from the handler ("session_id must not be empty."), and dropping
15
+ // it would turn that into a misleading "value was dropped before it reached the
16
+ // handler". Nested objects are left alone too: their shape is the handler's
17
+ // contract, not this seam's.
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.dropBlankOptionals = dropBlankOptionals;
20
+ function admitsNull(property) {
21
+ const type = property?.type;
22
+ return Array.isArray(type) ? type.includes("null") : type === "null";
23
+ }
24
+ function isBlank(value, property) {
25
+ return value === "" || (value === null && !admitsNull(property));
26
+ }
27
+ function dropBlankOptionals(args, schema) {
28
+ if (!args || !schema)
29
+ return args;
30
+ const required = new Set(schema.required ?? []);
31
+ const kept = Object.entries(args).filter(([key, value]) => required.has(key) || !isBlank(value, schema.properties?.[key]));
32
+ return (kept.length === Object.keys(args).length ? args : Object.fromEntries(kept));
33
+ }
34
+ //# sourceMappingURL=blank-args.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blank-args.js","sourceRoot":"","sources":["../src/blank-args.ts"],"names":[],"mappings":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C,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAM,CAAC;AAC3F,CAAC"}
@@ -0,0 +1,44 @@
1
+ import type { Express } from "express";
2
+ import type { OAuthMetadata } from "@modelcontextprotocol/sdk/shared/auth.js";
3
+ export type CatalogProfile = "full" | "chatgpt";
4
+ export interface CatalogTool {
5
+ name: string;
6
+ inputSchema?: {
7
+ properties?: Record<string, unknown>;
8
+ required?: string[];
9
+ [key: string]: unknown;
10
+ };
11
+ [key: string]: unknown;
12
+ }
13
+ export declare function applyCatalogProfile(tools: readonly CatalogTool[], _profile: CatalogProfile): CatalogTool[];
14
+ export declare function applyCatalogResult(_profile: CatalogProfile, _name: string, result: unknown): unknown;
15
+ export declare function catalogProfileRefusal(_profile: CatalogProfile, _name: string, _args: Record<string, unknown> | undefined): string | undefined;
16
+ /** No entry tool in the public build (never matches a tool name). */
17
+ export declare const CONSOLE_OPEN_TOOL = "";
18
+ export declare function consoleOpenResult(_args: Record<string, unknown>): {
19
+ content: Array<{
20
+ type: "text";
21
+ text: string;
22
+ }>;
23
+ isError?: boolean;
24
+ };
25
+ export declare function profileServesWidgets(_profile: CatalogProfile): boolean;
26
+ export declare function listWidgetResources(): Record<string, unknown>[];
27
+ export declare function readWidgetResource(uri: string): {
28
+ contents: Record<string, unknown>[];
29
+ };
30
+ export declare function widgetToolMeta(_profile: CatalogProfile, _name: string): Record<string, unknown>;
31
+ export declare function widgetTools(_profile: CatalogProfile): Record<string, unknown>[];
32
+ export declare function stdioCatalogProfile(): CatalogProfile;
33
+ export declare function mountDomainChallenge(_app: Express): void;
34
+ export interface ProfileEndpoint {
35
+ path: string;
36
+ profile: CatalogProfile;
37
+ resourceUrl: URL;
38
+ }
39
+ export declare function mountProfileEndpoint(_app: Express, _options: {
40
+ oauthMetadata: OAuthMetadata;
41
+ resourceServerUrl: URL;
42
+ scopesSupported: string[];
43
+ }): ProfileEndpoint | undefined;
44
+ //# sourceMappingURL=chatgpt-app.d.ts.map
@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AA;CAAE,CAEvI;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,cAAc,GAAG,OAAO,CAEtE;AAED,wBAAgB,mBAAmB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAE/D;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;CAAE,CAEvF;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAE/F;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAE/E;AAED,wBAAgB,mBAAmB,IAAI,cAAc,CAEpD;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAG;AAE5D,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,cAAc,CAAC;IACxB,WAAW,EAAE,GAAG,CAAC;CAClB;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,OAAO,EACb,QAAQ,EAAE;IAAE,aAAa,EAAE,aAAa,CAAC;IAAC,iBAAiB,EAAE,GAAG,CAAC;IAAC,eAAe,EAAE,MAAM,EAAE,CAAA;CAAE,GAC5F,eAAe,GAAG,SAAS,CAE7B"}
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CONSOLE_OPEN_TOOL = void 0;
4
+ exports.applyCatalogProfile = applyCatalogProfile;
5
+ exports.applyCatalogResult = applyCatalogResult;
6
+ exports.catalogProfileRefusal = catalogProfileRefusal;
7
+ exports.consoleOpenResult = consoleOpenResult;
8
+ exports.profileServesWidgets = profileServesWidgets;
9
+ exports.listWidgetResources = listWidgetResources;
10
+ exports.readWidgetResource = readWidgetResource;
11
+ exports.widgetToolMeta = widgetToolMeta;
12
+ exports.widgetTools = widgetTools;
13
+ exports.stdioCatalogProfile = stdioCatalogProfile;
14
+ exports.mountDomainChallenge = mountDomainChallenge;
15
+ exports.mountProfileEndpoint = mountProfileEndpoint;
16
+ function applyCatalogProfile(tools, _profile) {
17
+ return [...tools];
18
+ }
19
+ function applyCatalogResult(_profile, _name, result) {
20
+ return result;
21
+ }
22
+ function catalogProfileRefusal(_profile, _name, _args) {
23
+ return undefined;
24
+ }
25
+ /** No entry tool in the public build (never matches a tool name). */
26
+ exports.CONSOLE_OPEN_TOOL = "";
27
+ function consoleOpenResult(_args) {
28
+ return { content: [{ type: "text", text: "Unknown tool" }], isError: true };
29
+ }
30
+ function profileServesWidgets(_profile) {
31
+ return false;
32
+ }
33
+ function listWidgetResources() {
34
+ return [];
35
+ }
36
+ function readWidgetResource(uri) {
37
+ throw new Error(`Unknown resource: ${uri}`);
38
+ }
39
+ function widgetToolMeta(_profile, _name) {
40
+ return {};
41
+ }
42
+ function widgetTools(_profile) {
43
+ return [];
44
+ }
45
+ function stdioCatalogProfile() {
46
+ return "full";
47
+ }
48
+ function mountDomainChallenge(_app) { }
49
+ function mountProfileEndpoint(_app, _options) {
50
+ return undefined;
51
+ }
52
+ //# sourceMappingURL=chatgpt-app.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chatgpt-app.js","sourceRoot":"","sources":["../src/chatgpt-app.ts"],"names":[],"mappings":";;;AAiBA,kDAEC;AAED,gDAEC;AAED,sDAMC;AAKD,8CAEC;AAED,oDAEC;AAED,kDAEC;AAED,gDAEC;AAED,wCAEC;AAED,kCAEC;AAED,kDAEC;AAED,oDAA4D;AAQ5D,oDAKC;AA5DD,SAAgB,mBAAmB,CAAC,KAA6B,EAAE,QAAwB;IACzF,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC;AACpB,CAAC;AAED,SAAgB,kBAAkB,CAAC,QAAwB,EAAE,KAAa,EAAE,MAAe;IACzF,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAgB,qBAAqB,CACnC,QAAwB,EACxB,KAAa,EACb,KAA0C;IAE1C,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,qEAAqE;AACxD,QAAA,iBAAiB,GAAG,EAAE,CAAC;AAEpC,SAAgB,iBAAiB,CAAC,KAA8B;IAC9D,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAC9E,CAAC;AAED,SAAgB,oBAAoB,CAAC,QAAwB;IAC3D,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAgB,mBAAmB;IACjC,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,SAAgB,kBAAkB,CAAC,GAAW;IAC5C,MAAM,IAAI,KAAK,CAAC,qBAAqB,GAAG,EAAE,CAAC,CAAC;AAC9C,CAAC;AAED,SAAgB,cAAc,CAAC,QAAwB,EAAE,KAAa;IACpE,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,SAAgB,WAAW,CAAC,QAAwB;IAClD,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,SAAgB,mBAAmB;IACjC,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAgB,oBAAoB,CAAC,IAAa,IAAS,CAAC;AAQ5D,SAAgB,oBAAoB,CAClC,IAAa,EACb,QAA6F;IAE7F,OAAO,SAAS,CAAC;AACnB,CAAC"}
package/dist/config.d.ts CHANGED
@@ -1,7 +1,120 @@
1
+ import { AsyncLocalStorage } from "node:async_hooks";
2
+ import type { FileSource } from "./security";
3
+ export declare const SERVER_VERSION: string;
4
+ /**
5
+ * Per-tool permission pre-check (permissions.ts): `shadow` (default) only records what
6
+ * WOULD be denied on the audit line, `enforce` refuses the call and hides the tool from
7
+ * tools/list, `off` disables the check. Read per call so a deployment can flip it by env.
8
+ */
9
+ export declare function permissionMode(): "shadow" | "enforce" | "off";
1
10
  export declare const DIDIT_AUTH_BASE_URL: string;
2
11
  export declare const DIDIT_API_BASE_URL: string;
3
- export declare const DIDIT_API_KEY: string;
12
+ export declare const MCP_PORT: number;
13
+ export declare const MCP_RESOURCE_URI: string;
14
+ export declare const MCP_OAUTH_CLIENT_ID: string;
15
+ export declare const MCP_OAUTH_CLIENT_SECRET: string;
16
+ export declare const MCP_TOKEN_VERIFY_MODE: string;
17
+ export declare const MCP_OAUTH_INTROSPECT_URL: string;
18
+ export declare const MCP_DEFAULT_ORG: string;
19
+ export declare const MCP_PUBLIC_DISCOVERY: boolean;
20
+ export declare const MCP_DEFAULT_APP: string;
21
+ export declare const MCP_AUTHORIZATION_SERVER_ORIGIN: string;
22
+ export declare const DIDIT_AUTH_ISSUER: string;
23
+ export declare const DIDIT_OIDC_DISCOVERY_URL: string;
24
+ export declare const DIDIT_JWKS_URL: string;
25
+ export declare const DIDIT_OIDC_AUTHORIZE_URL: string;
26
+ export declare const DIDIT_OIDC_TOKEN_URL: string;
27
+ export declare const DIDIT_OIDC_REGISTRATION_URL: string;
28
+ export declare const MCP_SCOPES_SUPPORTED: string[];
29
+ /**
30
+ * Per-request credential context. The MCP always acts as a Didit USER: the OAuth
31
+ * resource-server layer (hosted mode) populates this with the caller's validated user
32
+ * Bearer token (and the org it is scoped to) for the duration of a single tool dispatch,
33
+ * so every tool authenticates as that user WITHOUT any tool-signature change. In stdio
34
+ * mode the same Bearer is supplied via the DIDIT_ACCESS_TOKEN env var. There is NO
35
+ * API-key mode — every tool targets the user-scoped console endpoints, which only
36
+ * authorize a Bearer token (an x-api-key is rejected).
37
+ */
38
+ export interface RequestCredentials {
39
+ accessToken?: string;
40
+ organizationId?: string;
41
+ applicationId?: string;
42
+ /** Tool being dispatched — sent as User-Agent so the backend audit log attributes the request. */
43
+ toolName?: string;
44
+ }
45
+ export declare const requestContext: AsyncLocalStorage<RequestCredentials>;
46
+ /**
47
+ * Org/app context for the console (management) endpoints.
48
+ *
49
+ * The hosted MCP acts AS THE USER: management tools (workflows, lists, businesses,
50
+ * webhooks, analytics, billing, …) call the same org/app-scoped endpoints the Didit
51
+ * console uses — `/organization/{org}/application/{app}/...` — which already authorize
52
+ * the user's Bearer token with per-role permissions. Those paths need an org id and
53
+ * (for most) an app id.
54
+ *
55
+ * Resolution order: explicit tool argument → per-request token context → env default.
56
+ * If none resolves we throw a clear, actionable error telling the agent to discover
57
+ * ids via didit_org_list / didit_org_list_applications.
58
+ */
59
+ export interface OrgAppArgs {
60
+ organizationId?: string;
61
+ applicationId?: string;
62
+ }
63
+ export declare function resolveOrganizationId(explicit?: string): string;
64
+ export declare function resolveApplicationId(explicit?: string): string;
65
+ /** `/organization/{org}/application/{app}{resource}` — org+app-scoped console path. */
66
+ export declare function orgAppPath(resource: string, opts?: OrgAppArgs): string;
67
+ /** `/organization/{org}{resource}` — org-only console path (e.g. billing). */
68
+ export declare function orgPath(resource: string, opts?: {
69
+ organizationId?: string;
70
+ }): string;
71
+ /**
72
+ * Identifies the MCP server (and the tool behind the request) to the backend. The
73
+ * backend's audit log stores the User-Agent, so every MCP-originated action shows up
74
+ * there attributed to its tool without any backend change.
75
+ */
76
+ export declare function userAgent(): string;
4
77
  export declare function getHeaders(): Record<string, string>;
5
- export declare function getApiKeyHeaders(): Record<string, string>;
78
+ export declare function getMultipartHeaders(): Record<string, string>;
6
79
  export declare function getAuthHeaders(accessToken: string): Record<string, string>;
80
+ export interface ApiRequestOptions {
81
+ /** Preserve the original PDF bytes instead of decoding them as text. */
82
+ responseType?: "pdf";
83
+ method?: string;
84
+ /** JSON request body. */
85
+ json?: any;
86
+ /** Multipart body. When set, the request uses API-key-only headers (no Content-Type) so fetch sets the boundary. */
87
+ form?: FormData;
88
+ /** Query-string params; undefined/null values are skipped, others stringified. */
89
+ params?: Record<string, any>;
90
+ /** Override the base URL (defaults to the verification API). */
91
+ baseUrl?: string;
92
+ /** Override request headers (e.g. Bearer auth for the auth API). */
93
+ headers?: Record<string, string>;
94
+ }
95
+ /**
96
+ * Single entry point for every Didit HTTP call. Centralizes auth headers, query
97
+ * building, 204 handling, and — importantly — error handling: a non-2xx response
98
+ * throws with the status and body so the MCP dispatch surfaces it as a tool error
99
+ * instead of silently returning the error body as if it were a success.
100
+ */
101
+ export declare function apiRequest(path: string, opts?: ApiRequestOptions): Promise<any>;
102
+ /**
103
+ * Build a multipart/form-data body from file inputs and optional scalar fields.
104
+ * Shared by the standalone image endpoints and branding customization. Each
105
+ * file input is either a local absolute path (string — local/stdio runs) or a
106
+ * FileSource ({ path?, base64? }) so hosted callers can send file content
107
+ * inline. The record key doubles as the multipart field name and the
108
+ * error-message parameter stem.
109
+ */
110
+ export declare function buildFormData(files: Record<string, string | FileSource | undefined>, scalars?: Record<string, any>): FormData;
111
+ /**
112
+ * Drop the routing ids from a tool call's arguments. They are read into
113
+ * `requestContext` by the CallTool dispatcher before the handler runs, so by
114
+ * the time a handler sees its args they are pure payload — which is what lets
115
+ * every app-scoped tool ADVERTISE `organization_id` / `application_id`
116
+ * (ORG_APP_PROPS) without the handlers that forward their args verbatim
117
+ * leaking them into a query string or a POST body.
118
+ */
119
+ export declare function stripRoutingIds(args: unknown): Record<string, unknown> | undefined;
7
120
  //# sourceMappingURL=config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,QAAoE,CAAC;AACrG,eAAO,MAAM,kBAAkB,QAAuE,CAAC;AACvG,eAAO,MAAM,aAAa,QAAkC,CAAC;AAE7D,wBAAgB,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAQnD;AAED,wBAAgB,gBAAgB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAMzD;AAED,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAK1E"}
1
+ {"version":3,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