@transcend-io/mcp 2.1.0 → 2.3.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/README.md +18 -16
- package/dist/cli.mjs +37 -17
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +442 -4
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{oauth-scopes-BFAI987v.mjs → oauth-scopes-WCeJ2itg.mjs} +8615 -8228
- package/dist/oauth-scopes-WCeJ2itg.mjs.map +1 -0
- package/package.json +17 -17
- package/dist/oauth-scopes-BFAI987v.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -58,22 +58,24 @@ Full setup, troubleshooting, and multi-server guidance: [MCP root README](../REA
|
|
|
58
58
|
|
|
59
59
|
### Environment variables
|
|
60
60
|
|
|
61
|
-
| Variable | Required (stdio OAuth) | Default | Description
|
|
62
|
-
| ------------------------------- | ---------------------- | -------------------------- |
|
|
63
|
-
| `TRANSCEND_OAUTH_CLIENT_ID` | Yes | — | Client ID from [app.transcend.io/admin/oauth-clients](https://app.transcend.io/admin/oauth-clients)
|
|
64
|
-
| `TRANSCEND_OAUTH_CLIENT_SECRET` | Yes | — | Client secret from the same OAuth clients page
|
|
65
|
-
| `TRANSCEND_OAUTH_REDIRECT_PORT` | Yes | — | Port number you choose for the OAuth callback server (must be available on your machine); **must match the port in your registered redirect URI**
|
|
66
|
-
| `TRANSCEND_OAUTH_REDIRECT_HOST` | No | `127.0.0.1` | Loopback host for the OAuth callback (`127.0.0.1` or `::1` for `http://[::1]:{port}/callback`)
|
|
67
|
-
| `TRANSCEND_OAUTH_ISSUER` | No | auto-detected | OAuth issuer URL; production auto-detects region. Test-only override
|
|
68
|
-
| `TRANSCEND_API_KEY` | No | — | API key for stdio (alternative to OAuth) or HTTP default auth. Disables OAuth when set alongside client ID
|
|
69
|
-
| `TRANSCEND_API_URL` | No | `https://api.transcend.io` | GraphQL backend API URL (org lookup, non-create tools)
|
|
70
|
-
| `SOMBRA_URL` | No | _(lazy GraphQL resolve)_ | Sticky **customer ingress** base URL for DSR create and other Sombra REST tools. When unset, resolves `organization.sombra.customerUrl`
|
|
71
|
-
| `SOMBRA_CUSTOMER_KEY` | No | — | Optional self-hosted customer-ingress key. Sent as `X-Sombra-Authorization: Bearer …`. Not needed on multi-tenant Transcend-hosted Sombra
|
|
72
|
-
| `TRANSCEND_DASHBOARD_URL` | No | `https://app.transcend.io` | Override the admin-dashboard base URL used for deep links returned by tool responses. Intended for local development against staging / fake hosts
|
|
73
|
-
| `TRANSCEND_HTTP_PORT` | No | `3000` | HTTP listen port
|
|
74
|
-
| `TRANSCEND_HTTP_HOST` | No | `127.0.0.1` | HTTP listen host
|
|
75
|
-
| `TRANSCEND_MCP_CORS_ORIGINS` | No | — | Comma-separated allowed CORS origins
|
|
76
|
-
| `TRANSCEND_MCP_SESSION_TTL_MS` | No | `1800000` | Idle session timeout (ms)
|
|
61
|
+
| Variable | Required (stdio OAuth) | Default | Description |
|
|
62
|
+
| ------------------------------- | ---------------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
63
|
+
| `TRANSCEND_OAUTH_CLIENT_ID` | Yes | — | Client ID from [app.transcend.io/admin/oauth-clients](https://app.transcend.io/admin/oauth-clients) |
|
|
64
|
+
| `TRANSCEND_OAUTH_CLIENT_SECRET` | Yes | — | Client secret from the same OAuth clients page |
|
|
65
|
+
| `TRANSCEND_OAUTH_REDIRECT_PORT` | Yes | — | Port number you choose for the OAuth callback server (must be available on your machine); **must match the port in your registered redirect URI** |
|
|
66
|
+
| `TRANSCEND_OAUTH_REDIRECT_HOST` | No | `127.0.0.1` | Loopback host for the OAuth callback (`127.0.0.1` or `::1` for `http://[::1]:{port}/callback`) |
|
|
67
|
+
| `TRANSCEND_OAUTH_ISSUER` | No | auto-detected | OAuth issuer URL; production auto-detects region. Test-only override |
|
|
68
|
+
| `TRANSCEND_API_KEY` | No | — | API key for stdio (alternative to OAuth) or HTTP default auth. Disables OAuth when set alongside client ID |
|
|
69
|
+
| `TRANSCEND_API_URL` | No | `https://api.transcend.io` | GraphQL backend API URL (org lookup, non-create tools) |
|
|
70
|
+
| `SOMBRA_URL` | No | _(lazy GraphQL resolve)_ | Sticky **customer ingress** base URL for DSR create and other Sombra REST tools. When unset, resolves `organization.sombra.customerUrl` |
|
|
71
|
+
| `SOMBRA_CUSTOMER_KEY` | No | — | Optional self-hosted customer-ingress key. Sent as `X-Sombra-Authorization: Bearer …`. Not needed on multi-tenant Transcend-hosted Sombra |
|
|
72
|
+
| `TRANSCEND_DASHBOARD_URL` | No | `https://app.transcend.io` | Override the admin-dashboard base URL used for deep links returned by tool responses. Intended for local development against staging / fake hosts |
|
|
73
|
+
| `TRANSCEND_HTTP_PORT` | No | `3000` | HTTP listen port |
|
|
74
|
+
| `TRANSCEND_HTTP_HOST` | No | `127.0.0.1` | HTTP listen host |
|
|
75
|
+
| `TRANSCEND_MCP_CORS_ORIGINS` | No | — | Comma-separated allowed CORS origins |
|
|
76
|
+
| `TRANSCEND_MCP_SESSION_TTL_MS` | No | `1800000` | Idle session timeout (ms) |
|
|
77
|
+
| `TRANSCEND_MCP_SERVERS` | No | _(all domains + docs)_ | Comma-separated domain allowlist: `admin`, `assessment`, `config`, `consent`, `customFunctions`, `discovery`, `dsr`, `inventory`, `policy`, `preferences`, `privacyCenter`, `workflows`, and `docs`. Unset keeps the full unified server. Invalid names fail at startup. Pair with `TRANSCEND_CONFIG_RESOURCES` to cap config OAuth scopes. |
|
|
78
|
+
| `TRANSCEND_CONFIG_RESOURCES` | No | _(full config server)_ | When `config` is in `TRANSCEND_MCP_SERVERS`, caps config pull/push sections and OAuth scopes (same as `@transcend-io/mcp-server-config`). |
|
|
77
79
|
|
|
78
80
|
### MCP client configuration (stdio)
|
|
79
81
|
|
package/dist/cli.mjs
CHANGED
|
@@ -1,25 +1,31 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { n as
|
|
2
|
+
import { d as TranscendMcpServer, f as TranscendGraphQLClient, l as parseMcpServerAllowlistFromEnv, n as resolveUmbrellaOAuthScopes, o as allowlistIncludesDocs, r as ToolRegistry, s as allowlistIncludesServer, u as resolveMcpServerAllowlist } from "./oauth-scopes-WCeJ2itg.mjs";
|
|
3
3
|
import { McpTransport, SimpleLogger, buildMcpServer, configureOAuthScopes, createTranscendRestClient, isOAuthModeEnabled, parseTransportArgs, readSombraEnvConfig, resolveMcpDashboardUrl, resolveMcpGraphqlUrl, resolveStdioStartupAuthOptional, runMcpHttp } from "@transcend-io/mcp-server-base";
|
|
4
4
|
import { getDsrPrompts } from "@transcend-io/mcp-server-dsr";
|
|
5
|
+
import { parseConfigResourceAllowlistFromEnv } from "@transcend-io/mcp-server-config";
|
|
5
6
|
import { getConsentPrompts } from "@transcend-io/mcp-server-consent";
|
|
6
7
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
7
8
|
//#region package.json
|
|
8
|
-
var version = "2.
|
|
9
|
+
var version = "2.3.0";
|
|
9
10
|
//#endregion
|
|
10
11
|
//#region src/server-instructions.ts
|
|
11
12
|
/** MCP initialize instructions for the unified @transcend-io/mcp server. */
|
|
12
13
|
const UMBRELLA_DOCS_SERVER_INSTRUCTIONS = "For how-to, product concepts, setup guides, or \"what is X\" questions about Transcend (e.g. airgap, consent, DSR): (1) call docs_list with the most distinctive terms for the topic (full-text over titles and article bodies), (2) call docs_fetch on the best matching URL, (3) answer from that content. API tools return data from the signed-in organization; they do not replace product documentation. For transcend.yml push previews, call config_diff and paste its diff before config_push.";
|
|
14
|
+
/** Instructions when docs tools are omitted via {@link TRANSCEND_MCP_SERVERS}. */
|
|
15
|
+
const UMBRELLA_SERVER_INSTRUCTIONS = "API tools return data from the signed-in organization. For transcend.yml push previews, call config_diff and paste its diff before config_push.";
|
|
13
16
|
//#endregion
|
|
14
17
|
//#region src/cli.ts
|
|
15
18
|
const VERSION = version;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
function buildServerOptions(allowlist) {
|
|
20
|
+
const prompts = [...allowlistIncludesServer(allowlist, TranscendMcpServer.Consent) ? getConsentPrompts() : [], ...allowlistIncludesServer(allowlist, TranscendMcpServer.Dsr) ? getDsrPrompts() : []];
|
|
21
|
+
return {
|
|
22
|
+
name: "transcend-mcp",
|
|
23
|
+
version: VERSION,
|
|
24
|
+
instructions: allowlistIncludesDocs(allowlist) ? UMBRELLA_DOCS_SERVER_INSTRUCTIONS : UMBRELLA_SERVER_INSTRUCTIONS,
|
|
25
|
+
prompts
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
function createToolRegistry(auth, sombraUrl, sombraCustomerKey, graphqlUrl, dashboardUrl, allowlist) {
|
|
23
29
|
const graphqlClient = new TranscendGraphQLClient(auth, graphqlUrl);
|
|
24
30
|
return new ToolRegistry({
|
|
25
31
|
rest: createTranscendRestClient(auth, graphqlClient, {
|
|
@@ -30,9 +36,19 @@ function createToolRegistry(auth, sombraUrl, sombraCustomerKey, graphqlUrl, dash
|
|
|
30
36
|
dashboardUrl,
|
|
31
37
|
transcendApiUrl: graphqlUrl,
|
|
32
38
|
auth
|
|
33
|
-
});
|
|
39
|
+
}, allowlist);
|
|
40
|
+
}
|
|
41
|
+
function resolveStartupAllowlist() {
|
|
42
|
+
try {
|
|
43
|
+
return resolveMcpServerAllowlist();
|
|
44
|
+
} catch (error) {
|
|
45
|
+
new SimpleLogger().error(error instanceof Error ? error.message : String(error));
|
|
46
|
+
process.exit(1);
|
|
47
|
+
}
|
|
34
48
|
}
|
|
35
49
|
async function main() {
|
|
50
|
+
const allowlist = resolveStartupAllowlist();
|
|
51
|
+
const serverOptions = buildServerOptions(allowlist);
|
|
36
52
|
const config = parseTransportArgs();
|
|
37
53
|
const isHttpTransport = config.transport === McpTransport.Http;
|
|
38
54
|
SimpleLogger.setInfoToStdout(isHttpTransport);
|
|
@@ -44,17 +60,20 @@ async function main() {
|
|
|
44
60
|
await runMcpHttp({
|
|
45
61
|
name: "transcend-mcp",
|
|
46
62
|
version: VERSION,
|
|
63
|
+
authorizationServerUrl: graphqlUrl,
|
|
64
|
+
scopesSupported: resolveUmbrellaOAuthScopes(allowlist, parseConfigResourceAllowlistFromEnv()),
|
|
47
65
|
createServer: async (auth) => {
|
|
48
66
|
logger.info("Creating unified MCP server for new HTTP session...", {
|
|
49
67
|
sombraUrl: sombraUrl ?? "(lazy GraphQL resolve)",
|
|
50
68
|
graphqlUrl,
|
|
51
69
|
dashboardUrl,
|
|
52
70
|
authType: auth?.type ?? "none",
|
|
53
|
-
hasSombraCustomerKey: Boolean(sombraCustomerKey)
|
|
71
|
+
hasSombraCustomerKey: Boolean(sombraCustomerKey),
|
|
72
|
+
mcpServers: parseMcpServerAllowlistFromEnv() ? [...allowlist].join(",") : "(all)"
|
|
54
73
|
});
|
|
55
|
-
const registry = createToolRegistry(auth, sombraUrl, sombraCustomerKey, graphqlUrl, dashboardUrl);
|
|
74
|
+
const registry = createToolRegistry(auth, sombraUrl, sombraCustomerKey, graphqlUrl, dashboardUrl, allowlist);
|
|
56
75
|
return buildMcpServer({
|
|
57
|
-
...
|
|
76
|
+
...serverOptions,
|
|
58
77
|
tools: registry.getAllTools(),
|
|
59
78
|
transport: McpTransport.Http
|
|
60
79
|
});
|
|
@@ -62,21 +81,22 @@ async function main() {
|
|
|
62
81
|
}, config);
|
|
63
82
|
return;
|
|
64
83
|
}
|
|
65
|
-
configureOAuthScopes(
|
|
84
|
+
configureOAuthScopes(resolveUmbrellaOAuthScopes(allowlist, parseConfigResourceAllowlistFromEnv()));
|
|
66
85
|
const auth = resolveStdioStartupAuthOptional();
|
|
67
86
|
logger.info("Initializing Transcend API clients...", {
|
|
68
87
|
sombraUrl: sombraUrl ?? "(lazy GraphQL resolve)",
|
|
69
88
|
graphqlUrl,
|
|
70
89
|
dashboardUrl,
|
|
71
|
-
authType: auth?.type ?? (isOAuthModeEnabled() ? "oauth-pending" : "none")
|
|
90
|
+
authType: auth?.type ?? (isOAuthModeEnabled() ? "oauth-pending" : "none"),
|
|
91
|
+
mcpServers: parseMcpServerAllowlistFromEnv() ? [...allowlist].join(",") : "(all)"
|
|
72
92
|
});
|
|
73
|
-
const toolRegistry = createToolRegistry(auth, sombraUrl, sombraCustomerKey, graphqlUrl, dashboardUrl);
|
|
93
|
+
const toolRegistry = createToolRegistry(auth, sombraUrl, sombraCustomerKey, graphqlUrl, dashboardUrl, allowlist);
|
|
74
94
|
logger.info(`Registered ${toolRegistry.getToolCount()} tools across ${toolRegistry.getCategories().length} categories`, {
|
|
75
95
|
categories: toolRegistry.getCategories(),
|
|
76
96
|
toolCount: toolRegistry.getToolCount()
|
|
77
97
|
});
|
|
78
98
|
const server = buildMcpServer({
|
|
79
|
-
...
|
|
99
|
+
...serverOptions,
|
|
80
100
|
tools: toolRegistry.getAllTools(),
|
|
81
101
|
transport: McpTransport.Stdio
|
|
82
102
|
});
|
package/dist/cli.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.mjs","names":["packageJson.version"],"sources":["../package.json","../src/server-instructions.ts","../src/cli.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"cli.mjs","names":["packageJson.version"],"sources":["../package.json","../src/server-instructions.ts","../src/cli.ts"],"mappings":"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"}
|
package/dist/index.d.mts
CHANGED
|
@@ -68,6 +68,435 @@ declare class TranscendGraphQLClient extends TranscendGraphQLBase {
|
|
|
68
68
|
listSombras: InstanceType<typeof CustomFunctionsMixin>['listSombras'];
|
|
69
69
|
}
|
|
70
70
|
//#endregion
|
|
71
|
+
//#region ../../../node_modules/.pnpm/fp-ts@2.16.11/node_modules/fp-ts/lib/Predicate.d.ts
|
|
72
|
+
/**
|
|
73
|
+
* @since 2.11.0
|
|
74
|
+
*/
|
|
75
|
+
interface Predicate<A> {
|
|
76
|
+
(a: A): boolean;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* @category type lambdas
|
|
80
|
+
* @since 2.11.0
|
|
81
|
+
*/
|
|
82
|
+
declare const URI$8 = 'Predicate';
|
|
83
|
+
/**
|
|
84
|
+
* @category type lambdas
|
|
85
|
+
* @since 2.11.0
|
|
86
|
+
*/
|
|
87
|
+
type URI$8 = typeof URI$8;
|
|
88
|
+
declare module './HKT' {
|
|
89
|
+
interface URItoKind<A> {
|
|
90
|
+
readonly [URI$8]: Predicate<A>;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* @category instances
|
|
95
|
+
* @since 2.11.0
|
|
96
|
+
*/
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region ../../../node_modules/.pnpm/fp-ts@2.16.11/node_modules/fp-ts/lib/Separated.d.ts
|
|
99
|
+
/**
|
|
100
|
+
* A `Separated` type which holds `left` and `right` parts.
|
|
101
|
+
*
|
|
102
|
+
* @category model
|
|
103
|
+
* @since 2.10.0
|
|
104
|
+
*/
|
|
105
|
+
interface Separated<E, A> {
|
|
106
|
+
readonly left: E;
|
|
107
|
+
readonly right: A;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* @category type lambdas
|
|
111
|
+
* @since 2.10.0
|
|
112
|
+
*/
|
|
113
|
+
declare const URI$7 = 'Separated';
|
|
114
|
+
/**
|
|
115
|
+
* @category type lambdas
|
|
116
|
+
* @since 2.10.0
|
|
117
|
+
*/
|
|
118
|
+
type URI$7 = typeof URI$7;
|
|
119
|
+
declare module './HKT' {
|
|
120
|
+
interface URItoKind2<E, A> {
|
|
121
|
+
readonly [URI$7]: Separated<E, A>;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* @category instances
|
|
126
|
+
* @since 2.10.0
|
|
127
|
+
*/
|
|
128
|
+
//#endregion
|
|
129
|
+
//#region ../../../node_modules/.pnpm/fp-ts@2.16.11/node_modules/fp-ts/lib/ReadonlyNonEmptyArray.d.ts
|
|
130
|
+
/**
|
|
131
|
+
* @category model
|
|
132
|
+
* @since 2.5.0
|
|
133
|
+
*/
|
|
134
|
+
type ReadonlyNonEmptyArray<A> = ReadonlyArray<A> & {
|
|
135
|
+
readonly 0: A;
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* @category type lambdas
|
|
139
|
+
* @since 2.5.0
|
|
140
|
+
*/
|
|
141
|
+
declare const URI$6 = 'ReadonlyNonEmptyArray';
|
|
142
|
+
/**
|
|
143
|
+
* @category type lambdas
|
|
144
|
+
* @since 2.5.0
|
|
145
|
+
*/
|
|
146
|
+
type URI$6 = typeof URI$6;
|
|
147
|
+
declare module './HKT' {
|
|
148
|
+
interface URItoKind<A> {
|
|
149
|
+
readonly [URI$6]: ReadonlyNonEmptyArray<A>;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* @category instances
|
|
154
|
+
* @since 2.5.0
|
|
155
|
+
*/
|
|
156
|
+
//#endregion
|
|
157
|
+
//#region ../../../node_modules/.pnpm/fp-ts@2.16.11/node_modules/fp-ts/lib/Option.d.ts
|
|
158
|
+
/**
|
|
159
|
+
* @category model
|
|
160
|
+
* @since 2.0.0
|
|
161
|
+
*/
|
|
162
|
+
interface None {
|
|
163
|
+
readonly _tag: 'None';
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* @category model
|
|
167
|
+
* @since 2.0.0
|
|
168
|
+
*/
|
|
169
|
+
interface Some<A> {
|
|
170
|
+
readonly _tag: 'Some';
|
|
171
|
+
readonly value: A;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* @category model
|
|
175
|
+
* @since 2.0.0
|
|
176
|
+
*/
|
|
177
|
+
type Option<A> = None | Some<A>;
|
|
178
|
+
/**
|
|
179
|
+
* @category type lambdas
|
|
180
|
+
* @since 2.0.0
|
|
181
|
+
*/
|
|
182
|
+
declare const URI$5 = 'Option';
|
|
183
|
+
/**
|
|
184
|
+
* @category type lambdas
|
|
185
|
+
* @since 2.0.0
|
|
186
|
+
*/
|
|
187
|
+
type URI$5 = typeof URI$5;
|
|
188
|
+
declare module './HKT' {
|
|
189
|
+
interface URItoKind<A> {
|
|
190
|
+
readonly [URI$5]: Option<A>;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* @category instances
|
|
195
|
+
* @since 2.0.0
|
|
196
|
+
*/
|
|
197
|
+
//#endregion
|
|
198
|
+
//#region ../../../node_modules/.pnpm/fp-ts@2.16.11/node_modules/fp-ts/lib/ReadonlyRecord.d.ts
|
|
199
|
+
/**
|
|
200
|
+
* @category model
|
|
201
|
+
* @since 2.5.0
|
|
202
|
+
*/
|
|
203
|
+
type ReadonlyRecord<K extends string, T> = Readonly<Record<K, T>>;
|
|
204
|
+
/**
|
|
205
|
+
* @category type lambdas
|
|
206
|
+
* @since 2.5.0
|
|
207
|
+
*/
|
|
208
|
+
declare const URI$4 = 'ReadonlyRecord';
|
|
209
|
+
/**
|
|
210
|
+
* @category type lambdas
|
|
211
|
+
* @since 2.5.0
|
|
212
|
+
*/
|
|
213
|
+
type URI$4 = typeof URI$4;
|
|
214
|
+
declare module './HKT' {
|
|
215
|
+
interface URItoKind<A> {
|
|
216
|
+
readonly [URI$4]: ReadonlyRecord<string, A>;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Produces a `Show` for a `ReadonlyRecord`, given a `Show` for the base type
|
|
221
|
+
* (a `Show` produces a human-readable representation of an instance).
|
|
222
|
+
* `ReadonlyRecord` entries are sorted by key with the provided `Ord`.
|
|
223
|
+
*
|
|
224
|
+
* @example
|
|
225
|
+
* import { getShow, ReadonlyRecord } from "fp-ts/ReadonlyRecord"
|
|
226
|
+
* import { Show } from "fp-ts/Show"
|
|
227
|
+
* import { Ord } from "fp-ts/string"
|
|
228
|
+
*
|
|
229
|
+
* const sNumber: Show<number> = { show: (n: number) => `${n}` };
|
|
230
|
+
* const sRecord: Show<ReadonlyRecord<string, number>> = getShow(Ord)(sNumber);
|
|
231
|
+
* assert.deepStrictEqual(sRecord.show({ b: 2, a: 1 }), '{ "a": 1, "b": 2 }');
|
|
232
|
+
*
|
|
233
|
+
* @category instances
|
|
234
|
+
* @since 2.5.0
|
|
235
|
+
*/
|
|
236
|
+
//#endregion
|
|
237
|
+
//#region ../../../node_modules/.pnpm/fp-ts@2.16.11/node_modules/fp-ts/lib/Endomorphism.d.ts
|
|
238
|
+
/**
|
|
239
|
+
* @since 2.11.0
|
|
240
|
+
*/
|
|
241
|
+
interface Endomorphism<A> {
|
|
242
|
+
(a: A): A;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* @category type lambdas
|
|
246
|
+
* @since 2.11.0
|
|
247
|
+
*/
|
|
248
|
+
declare const URI$3 = 'Endomorphism';
|
|
249
|
+
/**
|
|
250
|
+
* @category type lambdas
|
|
251
|
+
* @since 2.11.0
|
|
252
|
+
*/
|
|
253
|
+
type URI$3 = typeof URI$3;
|
|
254
|
+
declare module './HKT' {
|
|
255
|
+
interface URItoKind<A> {
|
|
256
|
+
readonly [URI$3]: Endomorphism<A>;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Endomorphism form a `Semigroup` where the `concat` operation is the usual function composition.
|
|
261
|
+
*
|
|
262
|
+
* @category instances
|
|
263
|
+
* @since 2.11.0
|
|
264
|
+
*/
|
|
265
|
+
//#endregion
|
|
266
|
+
//#region ../../../node_modules/.pnpm/fp-ts@2.16.11/node_modules/fp-ts/lib/Eq.d.ts
|
|
267
|
+
/**
|
|
268
|
+
* @category model
|
|
269
|
+
* @since 2.0.0
|
|
270
|
+
*/
|
|
271
|
+
interface Eq<A> {
|
|
272
|
+
readonly equals: (x: A, y: A) => boolean;
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* @category type lambdas
|
|
276
|
+
* @since 2.0.0
|
|
277
|
+
*/
|
|
278
|
+
declare const URI$2 = 'Eq';
|
|
279
|
+
/**
|
|
280
|
+
* @category type lambdas
|
|
281
|
+
* @since 2.0.0
|
|
282
|
+
*/
|
|
283
|
+
type URI$2 = typeof URI$2;
|
|
284
|
+
declare module './HKT' {
|
|
285
|
+
interface URItoKind<A> {
|
|
286
|
+
readonly [URI$2]: Eq<A>;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* @category instances
|
|
291
|
+
* @since 2.5.0
|
|
292
|
+
*/
|
|
293
|
+
//#endregion
|
|
294
|
+
//#region ../../../node_modules/.pnpm/fp-ts@2.16.11/node_modules/fp-ts/lib/Ordering.d.ts
|
|
295
|
+
/**
|
|
296
|
+
* @category model
|
|
297
|
+
* @since 2.0.0
|
|
298
|
+
*/
|
|
299
|
+
type Ordering = -1 | 0 | 1;
|
|
300
|
+
//#endregion
|
|
301
|
+
//#region ../../../node_modules/.pnpm/fp-ts@2.16.11/node_modules/fp-ts/lib/Ord.d.ts
|
|
302
|
+
/**
|
|
303
|
+
* @category model
|
|
304
|
+
* @since 2.0.0
|
|
305
|
+
*/
|
|
306
|
+
interface Ord<A> extends Eq<A> {
|
|
307
|
+
readonly compare: (first: A, second: A) => Ordering;
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* @category type lambdas
|
|
311
|
+
* @since 2.0.0
|
|
312
|
+
*/
|
|
313
|
+
declare const URI$1 = 'Ord';
|
|
314
|
+
/**
|
|
315
|
+
* @category type lambdas
|
|
316
|
+
* @since 2.0.0
|
|
317
|
+
*/
|
|
318
|
+
type URI$1 = typeof URI$1;
|
|
319
|
+
declare module './HKT' {
|
|
320
|
+
interface URItoKind<A> {
|
|
321
|
+
readonly [URI$1]: Ord<A>;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* A typical use case for the `Semigroup` instance of `Ord` is merging two or more orderings.
|
|
326
|
+
*
|
|
327
|
+
* For example the following snippet builds an `Ord` for a type `User` which
|
|
328
|
+
* sorts by `created` date descending, and **then** `lastName`
|
|
329
|
+
*
|
|
330
|
+
* @example
|
|
331
|
+
* import * as D from 'fp-ts/Date'
|
|
332
|
+
* import { pipe } from 'fp-ts/function'
|
|
333
|
+
* import { contramap, getSemigroup, Ord, reverse } from 'fp-ts/Ord'
|
|
334
|
+
* import * as RA from 'fp-ts/ReadonlyArray'
|
|
335
|
+
* import * as S from 'fp-ts/string'
|
|
336
|
+
*
|
|
337
|
+
* interface User {
|
|
338
|
+
* readonly id: string
|
|
339
|
+
* readonly lastName: string
|
|
340
|
+
* readonly created: Date
|
|
341
|
+
* }
|
|
342
|
+
*
|
|
343
|
+
* const ordByLastName: Ord<User> = pipe(
|
|
344
|
+
* S.Ord,
|
|
345
|
+
* contramap((user) => user.lastName)
|
|
346
|
+
* )
|
|
347
|
+
*
|
|
348
|
+
* const ordByCreated: Ord<User> = pipe(
|
|
349
|
+
* D.Ord,
|
|
350
|
+
* contramap((user) => user.created)
|
|
351
|
+
* )
|
|
352
|
+
*
|
|
353
|
+
* const ordUserByCreatedDescThenLastName = getSemigroup<User>().concat(
|
|
354
|
+
* reverse(ordByCreated),
|
|
355
|
+
* ordByLastName
|
|
356
|
+
* )
|
|
357
|
+
*
|
|
358
|
+
* assert.deepStrictEqual(
|
|
359
|
+
* RA.sort(ordUserByCreatedDescThenLastName)([
|
|
360
|
+
* { id: 'c', lastName: 'd', created: new Date(1973, 10, 30) },
|
|
361
|
+
* { id: 'a', lastName: 'b', created: new Date(1973, 10, 30) },
|
|
362
|
+
* { id: 'e', lastName: 'f', created: new Date(1980, 10, 30) }
|
|
363
|
+
* ]),
|
|
364
|
+
* [
|
|
365
|
+
* { id: 'e', lastName: 'f', created: new Date(1980, 10, 30) },
|
|
366
|
+
* { id: 'a', lastName: 'b', created: new Date(1973, 10, 30) },
|
|
367
|
+
* { id: 'c', lastName: 'd', created: new Date(1973, 10, 30) }
|
|
368
|
+
* ]
|
|
369
|
+
* )
|
|
370
|
+
*
|
|
371
|
+
* @category instances
|
|
372
|
+
* @since 2.0.0
|
|
373
|
+
*/
|
|
374
|
+
//#endregion
|
|
375
|
+
//#region ../../../node_modules/.pnpm/fp-ts@2.16.11/node_modules/fp-ts/lib/Either.d.ts
|
|
376
|
+
/**
|
|
377
|
+
* @category model
|
|
378
|
+
* @since 2.0.0
|
|
379
|
+
*/
|
|
380
|
+
interface Left<E> {
|
|
381
|
+
readonly _tag: 'Left';
|
|
382
|
+
readonly left: E;
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* @category model
|
|
386
|
+
* @since 2.0.0
|
|
387
|
+
*/
|
|
388
|
+
interface Right<A> {
|
|
389
|
+
readonly _tag: 'Right';
|
|
390
|
+
readonly right: A;
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* @category model
|
|
394
|
+
* @since 2.0.0
|
|
395
|
+
*/
|
|
396
|
+
type Either<E, A> = Left<E> | Right<A>;
|
|
397
|
+
/**
|
|
398
|
+
* @category type lambdas
|
|
399
|
+
* @since 2.0.0
|
|
400
|
+
*/
|
|
401
|
+
declare const URI = 'Either';
|
|
402
|
+
/**
|
|
403
|
+
* @category type lambdas
|
|
404
|
+
* @since 2.0.0
|
|
405
|
+
*/
|
|
406
|
+
type URI = typeof URI;
|
|
407
|
+
declare module './HKT' {
|
|
408
|
+
interface URItoKind2<E, A> {
|
|
409
|
+
readonly [URI]: Either<E, A>;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* @category instances
|
|
414
|
+
* @since 2.0.0
|
|
415
|
+
*/
|
|
416
|
+
//#endregion
|
|
417
|
+
//#region ../../privacy-types/dist/index.d.mts
|
|
418
|
+
/**
|
|
419
|
+
* Domain MCP server identifiers (excludes docs, which uses no API scopes).
|
|
420
|
+
* Wire values match {@link https://github.com/transcend-io/tools/pull/790 | SDK OAuth scope centralization}.
|
|
421
|
+
*/
|
|
422
|
+
declare const TranscendMcpServer: {
|
|
423
|
+
readonly Admin: "admin";
|
|
424
|
+
readonly Assessment: "assessment";
|
|
425
|
+
readonly Config: "config";
|
|
426
|
+
readonly Consent: "consent";
|
|
427
|
+
readonly CustomFunctions: "customFunctions";
|
|
428
|
+
readonly Discovery: "discovery";
|
|
429
|
+
readonly Dsr: "dsr";
|
|
430
|
+
readonly Inventory: "inventory";
|
|
431
|
+
readonly Policy: "policy";
|
|
432
|
+
readonly Preferences: "preferences";
|
|
433
|
+
readonly PrivacyCenter: "privacyCenter";
|
|
434
|
+
readonly Workflows: "workflows";
|
|
435
|
+
};
|
|
436
|
+
type TranscendMcpServer = (typeof TranscendMcpServer)[keyof typeof TranscendMcpServer]; //#endregion
|
|
437
|
+
//#region src/objects.d.ts
|
|
438
|
+
/** The purpose of processing data */
|
|
439
|
+
//#endregion
|
|
440
|
+
//#region ../../../node_modules/.pnpm/got@15.0.5/node_modules/got/dist/source/core/timed-out.d.ts
|
|
441
|
+
declare const reentry: unique symbol;
|
|
442
|
+
declare module 'http' {
|
|
443
|
+
interface ClientRequest {
|
|
444
|
+
[reentry]?: boolean;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
//#endregion
|
|
448
|
+
//#region ../../sdk/dist/index.d.mts
|
|
449
|
+
declare enum TranscendPullResource {
|
|
450
|
+
ApiKeys = "apiKeys",
|
|
451
|
+
Attributes = "customFields",
|
|
452
|
+
Templates = "templates",
|
|
453
|
+
DataSilos = "dataSilos",
|
|
454
|
+
Enrichers = "enrichers",
|
|
455
|
+
DataFlows = "dataFlows",
|
|
456
|
+
BusinessEntities = "businessEntities",
|
|
457
|
+
ProcessingActivities = "processingActivities",
|
|
458
|
+
Actions = "actions",
|
|
459
|
+
DataSubjects = "dataSubjects",
|
|
460
|
+
Identifiers = "identifiers",
|
|
461
|
+
Cookies = "cookies",
|
|
462
|
+
ConsentSites = "consentSites",
|
|
463
|
+
ConsentManager = "consentManager",
|
|
464
|
+
Partitions = "partitions",
|
|
465
|
+
Vendors = "vendors",
|
|
466
|
+
DataCategories = "dataCategories",
|
|
467
|
+
ProcessingPurposes = "processingPurposes",
|
|
468
|
+
ActionItems = "actionItems",
|
|
469
|
+
ActionItemCollections = "actionItemCollections",
|
|
470
|
+
Teams = "teams",
|
|
471
|
+
PrivacyCenters = "privacyCenters",
|
|
472
|
+
Policies = "policies",
|
|
473
|
+
Messages = "messages",
|
|
474
|
+
Assessments = "assessments",
|
|
475
|
+
AssessmentTemplates = "assessmentTemplates",
|
|
476
|
+
Purposes = "purposes",
|
|
477
|
+
PreferenceOptions = "preferenceOptions",
|
|
478
|
+
SystemDiscovery = "systemDiscovery",
|
|
479
|
+
PreferenceWorkflowConfigs = "preferenceWorkflowConfigs",
|
|
480
|
+
WorkflowConfigs = "workflowConfigs"
|
|
481
|
+
} //#endregion
|
|
482
|
+
//#region src/transcend-yml/checkTranscendYaml.d.ts
|
|
483
|
+
/** Sentinel for running every opt-in rule in `parseTranscendYamlCheckRules` */
|
|
484
|
+
//#endregion
|
|
485
|
+
//#region src/mcp-server-allowlist.d.ts
|
|
486
|
+
declare const TRANSCEND_MCP_SERVERS_ENV = "TRANSCEND_MCP_SERVERS";
|
|
487
|
+
/** Docs tools are not a {@link TranscendMcpServer} domain; allowlist uses this token. */
|
|
488
|
+
declare const MCP_ALLOWLIST_DOCS: "docs";
|
|
489
|
+
type McpAllowlistEntry = TranscendMcpServer | typeof MCP_ALLOWLIST_DOCS;
|
|
490
|
+
type McpServerAllowlist = ReadonlySet<McpAllowlistEntry>;
|
|
491
|
+
declare function formatValidMcpServerNames(): string;
|
|
492
|
+
/**
|
|
493
|
+
* Comma-separated {@link TranscendMcpServer} values plus `docs`.
|
|
494
|
+
* Returns `undefined` when unset so all domains register.
|
|
495
|
+
*/
|
|
496
|
+
declare function parseMcpServerAllowlistFromEnv(): McpServerAllowlist | undefined;
|
|
497
|
+
/** Effective server allowlist: every domain plus docs when env is unset. */
|
|
498
|
+
declare function resolveMcpServerAllowlist(): McpServerAllowlist;
|
|
499
|
+
//#endregion
|
|
71
500
|
//#region src/registry.d.ts
|
|
72
501
|
interface UmbrellaToolClients extends PolicyToolClients {
|
|
73
502
|
/** REST client for Sombra API */
|
|
@@ -82,7 +511,7 @@ declare class ToolRegistry {
|
|
|
82
511
|
private jsonSchemaCache;
|
|
83
512
|
private clients;
|
|
84
513
|
private logger;
|
|
85
|
-
constructor(clients: UmbrellaToolClients);
|
|
514
|
+
constructor(clients: UmbrellaToolClients, allowlist?: McpServerAllowlist);
|
|
86
515
|
private registerAllTools;
|
|
87
516
|
private registerToolsFromModule;
|
|
88
517
|
/**
|
|
@@ -104,6 +533,7 @@ declare class ToolRegistry {
|
|
|
104
533
|
readOnlyHint: boolean;
|
|
105
534
|
destructiveHint: boolean;
|
|
106
535
|
idempotentHint: boolean;
|
|
536
|
+
openWorldHint?: boolean;
|
|
107
537
|
};
|
|
108
538
|
_meta?: Record<string, unknown>;
|
|
109
539
|
}>;
|
|
@@ -118,8 +548,16 @@ declare class ToolRegistry {
|
|
|
118
548
|
}
|
|
119
549
|
//#endregion
|
|
120
550
|
//#region src/oauth-scopes.d.ts
|
|
121
|
-
/**
|
|
122
|
-
|
|
551
|
+
/**
|
|
552
|
+
* OAuth scopes for the unified MCP server (offline_access added by base).
|
|
553
|
+
*
|
|
554
|
+
* Only requests scopes for allowlisted servers. When `config` is allowlisted and
|
|
555
|
+
* `configResources` is set, config scopes are capped to those resources. Callers
|
|
556
|
+
* parse the env vars, so this function reads none.
|
|
557
|
+
*/
|
|
558
|
+
declare function resolveUmbrellaOAuthScopes(allowlist: McpServerAllowlist, configResources: readonly TranscendPullResource[] | undefined): readonly string[];
|
|
559
|
+
/** Every domain scope with no env input. Use `resolveUmbrellaOAuthScopes` to narrow. */
|
|
560
|
+
declare const UMBRELLA_OAUTH_SCOPES: readonly string[];
|
|
123
561
|
//#endregion
|
|
124
|
-
export { ToolRegistry, TranscendGraphQLClient, UMBRELLA_OAUTH_SCOPES };
|
|
562
|
+
export { MCP_ALLOWLIST_DOCS, type McpAllowlistEntry, type McpServerAllowlist, TRANSCEND_MCP_SERVERS_ENV, ToolRegistry, TranscendGraphQLClient, UMBRELLA_OAUTH_SCOPES, formatValidMcpServerNames, parseMcpServerAllowlistFromEnv, resolveMcpServerAllowlist, resolveUmbrellaOAuthScopes };
|
|
125
563
|
//# sourceMappingURL=index.d.mts.map
|