@roarkanalytics/sdk-mcp 4.44.1 → 4.44.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/client-headers.d.mts +2 -2
- package/client-headers.d.ts +2 -2
- package/client-headers.js +1 -1
- package/client-headers.mjs +1 -1
- package/directory-output-schemas.d.mts +139 -0
- package/directory-output-schemas.d.mts.map +1 -0
- package/directory-output-schemas.d.ts +139 -0
- package/directory-output-schemas.d.ts.map +1 -0
- package/directory-output-schemas.js +191 -0
- package/directory-output-schemas.js.map +1 -0
- package/directory-output-schemas.mjs +188 -0
- package/directory-output-schemas.mjs.map +1 -0
- package/directory-tools.d.mts.map +1 -1
- package/directory-tools.d.ts.map +1 -1
- package/directory-tools.js +261 -105
- package/directory-tools.js.map +1 -1
- package/directory-tools.mjs +261 -105
- package/directory-tools.mjs.map +1 -1
- package/docs-search-tool.d.mts.map +1 -1
- package/docs-search-tool.d.ts.map +1 -1
- package/docs-search-tool.js +6 -3
- package/docs-search-tool.js.map +1 -1
- package/docs-search-tool.mjs +6 -3
- package/docs-search-tool.mjs.map +1 -1
- package/http.d.mts.map +1 -1
- package/http.d.ts.map +1 -1
- package/http.js +8 -7
- package/http.js.map +1 -1
- package/http.mjs +9 -8
- package/http.mjs.map +1 -1
- package/oauth.d.mts +16 -1
- package/oauth.d.mts.map +1 -1
- package/oauth.d.ts +16 -1
- package/oauth.d.ts.map +1 -1
- package/oauth.js +24 -1
- package/oauth.js.map +1 -1
- package/oauth.mjs +22 -0
- package/oauth.mjs.map +1 -1
- package/options.d.mts +10 -0
- package/options.d.mts.map +1 -1
- package/options.d.ts +10 -0
- package/options.d.ts.map +1 -1
- package/options.js +28 -3
- package/options.js.map +1 -1
- package/options.mjs +26 -3
- package/options.mjs.map +1 -1
- package/package.json +11 -1
- package/server.d.mts.map +1 -1
- package/server.d.ts.map +1 -1
- package/server.js +8 -1
- package/server.js.map +1 -1
- package/server.mjs +8 -1
- package/server.mjs.map +1 -1
- package/src/client-headers.ts +1 -1
- package/src/directory-output-schemas.ts +240 -0
- package/src/directory-tools.ts +298 -91
- package/src/docs-search-tool.ts +9 -3
- package/src/http.ts +9 -7
- package/src/oauth.ts +28 -1
- package/src/options.ts +27 -3
- package/src/server.ts +9 -1
- package/src/types.ts +1 -0
- package/types.d.mts +1 -0
- package/types.d.mts.map +1 -1
- package/types.d.ts +1 -0
- package/types.d.ts.map +1 -1
- package/types.js.map +1 -1
- package/types.mjs.map +1 -1
package/src/docs-search-tool.ts
CHANGED
|
@@ -22,25 +22,31 @@ export const tool: Tool = {
|
|
|
22
22
|
properties: {
|
|
23
23
|
query: {
|
|
24
24
|
type: 'string',
|
|
25
|
-
description:
|
|
25
|
+
description:
|
|
26
|
+
'What to look up, in plain words: a task, method, or parameter, such as "create a persona" or "list calls by agent".',
|
|
26
27
|
},
|
|
27
28
|
language: {
|
|
28
29
|
type: 'string',
|
|
29
|
-
description:
|
|
30
|
+
description:
|
|
31
|
+
'SDK language the signatures and examples are shown in. http returns the REST endpoints.',
|
|
30
32
|
enum: ['http', 'python', 'go', 'typescript', 'javascript', 'terraform', 'ruby', 'java', 'kotlin'],
|
|
31
33
|
},
|
|
32
34
|
detail: {
|
|
33
35
|
type: 'string',
|
|
34
|
-
description:
|
|
36
|
+
description:
|
|
37
|
+
'How much to return for each match: default gives a summary, verbose the full reference. When omitted, default.',
|
|
35
38
|
enum: ['default', 'verbose'],
|
|
36
39
|
},
|
|
37
40
|
},
|
|
38
41
|
required: ['query', 'language'],
|
|
39
42
|
},
|
|
43
|
+
// Reads a fixed documentation corpus, so the result depends only on the input.
|
|
40
44
|
annotations: {
|
|
41
45
|
title: 'Search Roark docs',
|
|
42
46
|
readOnlyHint: true,
|
|
43
47
|
destructiveHint: false,
|
|
48
|
+
idempotentHint: true,
|
|
49
|
+
openWorldHint: false,
|
|
44
50
|
},
|
|
45
51
|
};
|
|
46
52
|
|
package/src/http.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { getLogger } from './logger';
|
|
|
12
12
|
import { McpOptions, toolSurfaceFor } from './options';
|
|
13
13
|
import {
|
|
14
14
|
Connector,
|
|
15
|
+
oauthConfigForRequest,
|
|
15
16
|
ORIGIN_CONNECTOR,
|
|
16
17
|
protectedResourceMetadata,
|
|
17
18
|
requireBearer,
|
|
@@ -55,7 +56,8 @@ const newServer = async ({
|
|
|
55
56
|
let authOptions: Partial<ClientOptions>;
|
|
56
57
|
if (mcpOptions.oauth) {
|
|
57
58
|
const connector = connectorFrom(req);
|
|
58
|
-
const
|
|
59
|
+
const oauth = oauthConfigForRequest(mcpOptions.oauth, req);
|
|
60
|
+
const authorized = requireBearer(req, oauth, connector);
|
|
59
61
|
// Presence is not validity. Ask customer-api whether the token is still live, so a revoked or
|
|
60
62
|
// expired one is answered with 401 + WWW-Authenticate here - the signal a client needs to
|
|
61
63
|
// re-run the OAuth flow - rather than completing the handshake and failing later inside a
|
|
@@ -64,7 +66,7 @@ const newServer = async ({
|
|
|
64
66
|
// The base URL is resolved the way the SDK resolves it, NOT defaulted to prod: this server is
|
|
65
67
|
// launched without `clientOptions`, so on any stage but prod a prod default would check the
|
|
66
68
|
// token against a server that never issued it and refuse every request.
|
|
67
|
-
await requireLiveBearer(authorized.bearerToken,
|
|
69
|
+
await requireLiveBearer(authorized.bearerToken, oauth, connector, {
|
|
68
70
|
baseURL: resolveApiBaseUrl(clientOptions),
|
|
69
71
|
});
|
|
70
72
|
authOptions = authorized;
|
|
@@ -289,13 +291,13 @@ export const streamableHTTPApp = ({
|
|
|
289
291
|
// served in remote OAuth mode.
|
|
290
292
|
if (mcpOptions.oauth) {
|
|
291
293
|
const oauth = mcpOptions.oauth;
|
|
292
|
-
app.get('/.well-known/oauth-protected-resource', (
|
|
293
|
-
res.status(200).json(protectedResourceMetadata(oauth));
|
|
294
|
+
app.get('/.well-known/oauth-protected-resource', (req, res) => {
|
|
295
|
+
res.status(200).json(protectedResourceMetadata(oauthConfigForRequest(oauth, req)));
|
|
294
296
|
});
|
|
295
297
|
// The single connector. Its `resource` carries no project, which is what tells the
|
|
296
298
|
// authorization server to mint a credential for the person rather than for one project.
|
|
297
|
-
app.get('/.well-known/oauth-protected-resource/mcp', (
|
|
298
|
-
res.status(200).json(protectedResourceMetadata(oauth, { kind: 'mcp' }));
|
|
299
|
+
app.get('/.well-known/oauth-protected-resource/mcp', (req, res) => {
|
|
300
|
+
res.status(200).json(protectedResourceMetadata(oauthConfigForRequest(oauth, req), { kind: 'mcp' }));
|
|
299
301
|
});
|
|
300
302
|
app.get('/.well-known/oauth-protected-resource/mcp/:projectId', (req, res) => {
|
|
301
303
|
const projectId = req.params['projectId'];
|
|
@@ -303,7 +305,7 @@ export const streamableHTTPApp = ({
|
|
|
303
305
|
.status(200)
|
|
304
306
|
.json(
|
|
305
307
|
protectedResourceMetadata(
|
|
306
|
-
oauth,
|
|
308
|
+
oauthConfigForRequest(oauth, req),
|
|
307
309
|
typeof projectId === 'string' ? { kind: 'project', projectId } : undefined,
|
|
308
310
|
),
|
|
309
311
|
);
|
package/src/oauth.ts
CHANGED
|
@@ -17,8 +17,35 @@ import { readEnv } from './util';
|
|
|
17
17
|
export type OAuthConfig = {
|
|
18
18
|
/** Authorization server issuer, e.g. https://mcp-oauth.api.roark.ai */
|
|
19
19
|
issuer: string;
|
|
20
|
-
/** Public origin of this resource server, e.g. https://mcp.
|
|
20
|
+
/** Public origin of this resource server, e.g. https://mcp.roark.ai; connector URLs are `<base>/mcp/<projectId>`. */
|
|
21
21
|
resourceBaseUrl: string;
|
|
22
|
+
/**
|
|
23
|
+
* Other origins this server also answers on, e.g. https://mcp.api.roark.ai after a move to a
|
|
24
|
+
* new hostname. A request that arrives on one of them is described with that origin, so a
|
|
25
|
+
* client connected to the old URL keeps getting metadata that names the URL it used.
|
|
26
|
+
*/
|
|
27
|
+
resourceAliases?: string[];
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The config for one request: `resourceBaseUrl` becomes the origin the request arrived on when
|
|
32
|
+
* that origin is one of `resourceAliases`, and stays the canonical one otherwise.
|
|
33
|
+
*
|
|
34
|
+
* RFC 9728 has a client check that the `resource` in the metadata is the URL it connected to.
|
|
35
|
+
* Serving two hostnames with one fixed origin would fail that check on one of them. Only
|
|
36
|
+
* configured origins are reflected, so a forged Host header cannot name a resource we do not own.
|
|
37
|
+
*/
|
|
38
|
+
export const oauthConfigForRequest = (config: OAuthConfig, req: Pick<IncomingMessage, 'headers'>) => {
|
|
39
|
+
const host = req.headers.host?.toLowerCase();
|
|
40
|
+
if (!host) return config;
|
|
41
|
+
const alias = config.resourceAliases?.find((origin) => {
|
|
42
|
+
try {
|
|
43
|
+
return new URL(origin).host.toLowerCase() === host;
|
|
44
|
+
} catch {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
return alias ? { ...config, resourceBaseUrl: stripSlash(alias) } : config;
|
|
22
49
|
};
|
|
23
50
|
|
|
24
51
|
/** Thrown when a request cannot be authorized; carries the WWW-Authenticate value to return. */
|
package/src/options.ts
CHANGED
|
@@ -160,6 +160,12 @@ export function parseCLIOptions(): CLIOptions {
|
|
|
160
160
|
default: readEnv('MCP_OAUTH_RESOURCE_BASE_URL'),
|
|
161
161
|
description: 'Public base URL of this resource server, used to build metadata and resource URLs.',
|
|
162
162
|
})
|
|
163
|
+
.option('oauth-resource-aliases', {
|
|
164
|
+
type: 'string',
|
|
165
|
+
default: readEnv('MCP_OAUTH_RESOURCE_ALIASES'),
|
|
166
|
+
description:
|
|
167
|
+
'Comma-separated origins this server also answers on, e.g. a previous hostname. Requests on them get metadata naming that origin.',
|
|
168
|
+
})
|
|
163
169
|
.env('MCP_SERVER')
|
|
164
170
|
.version(true)
|
|
165
171
|
.help();
|
|
@@ -223,15 +229,33 @@ export function parseCLIOptions(): CLIOptions {
|
|
|
223
229
|
* when either field is absent (legacy optional-bearer mode). Both the issuer and
|
|
224
230
|
* this server's public base URL are required together.
|
|
225
231
|
*/
|
|
226
|
-
const buildOAuthConfig = (argv: {
|
|
232
|
+
export const buildOAuthConfig = (argv: {
|
|
227
233
|
oauthIssuer?: string | undefined;
|
|
228
234
|
oauthResourceBaseUrl?: string | undefined;
|
|
235
|
+
oauthResourceAliases?: string | undefined;
|
|
229
236
|
}): OAuthConfig | undefined => {
|
|
230
|
-
const { oauthIssuer, oauthResourceBaseUrl } = argv;
|
|
237
|
+
const { oauthIssuer, oauthResourceBaseUrl, oauthResourceAliases } = argv;
|
|
231
238
|
if (!oauthIssuer || !oauthResourceBaseUrl) {
|
|
232
239
|
return undefined;
|
|
233
240
|
}
|
|
234
|
-
|
|
241
|
+
// Each alias is reduced to its origin, and a value that is not a URL stops the server: a typo
|
|
242
|
+
// would otherwise surface only as clients on that host failing the resource check.
|
|
243
|
+
const resourceAliases = (oauthResourceAliases ?? '')
|
|
244
|
+
.split(',')
|
|
245
|
+
.map((alias) => alias.trim())
|
|
246
|
+
.filter((alias) => alias.length > 0)
|
|
247
|
+
.map((alias) => {
|
|
248
|
+
try {
|
|
249
|
+
return new URL(alias).origin;
|
|
250
|
+
} catch {
|
|
251
|
+
throw new Error(`oauth-resource-aliases: "${alias}" is not a URL. Give each alias as an origin.`);
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
return {
|
|
255
|
+
issuer: oauthIssuer,
|
|
256
|
+
resourceBaseUrl: oauthResourceBaseUrl,
|
|
257
|
+
...(resourceAliases.length > 0 && { resourceAliases }),
|
|
258
|
+
};
|
|
235
259
|
};
|
|
236
260
|
|
|
237
261
|
const coerceArray = <T extends z.ZodTypeAny>(zodType: T) =>
|
package/src/server.ts
CHANGED
|
@@ -32,8 +32,16 @@ export const newMcpServer = async ({
|
|
|
32
32
|
new McpServer(
|
|
33
33
|
{
|
|
34
34
|
name: 'roarkanalytics_sdk_api',
|
|
35
|
+
title: 'Roark',
|
|
36
|
+
description:
|
|
37
|
+
'Test and monitor voice and chat AI agents with Roark. Read calls, transcripts, metric scores, and simulation results, and set up agents, personas, and customer flows to run simulated calls against your agent.',
|
|
38
|
+
websiteUrl: 'https://roark.ai',
|
|
39
|
+
icons: [
|
|
40
|
+
{ src: 'https://roark.ai/icon.svg', mimeType: 'image/svg+xml', sizes: ['any'] },
|
|
41
|
+
{ src: 'https://roark.ai/icon.png', mimeType: 'image/png', sizes: ['512x512'] },
|
|
42
|
+
],
|
|
35
43
|
// A literal, not MCP_SERVER_VERSION: publish.yml checks dist/server.js for it.
|
|
36
|
-
version: '4.44.
|
|
44
|
+
version: '4.44.4', // x-release-please-version
|
|
37
45
|
},
|
|
38
46
|
{
|
|
39
47
|
// Directory mode does not fetch instructions. The hosted document tells a
|
package/src/types.ts
CHANGED
package/types.d.mts
CHANGED
|
@@ -29,6 +29,7 @@ type ResourceContentBlock = {
|
|
|
29
29
|
export type ContentBlock = TextContentBlock | ImageContentBlock | AudioContentBlock | ResourceContentBlock;
|
|
30
30
|
export type ToolCallResult = {
|
|
31
31
|
content: ContentBlock[];
|
|
32
|
+
structuredContent?: Record<string, unknown>;
|
|
32
33
|
isError?: boolean;
|
|
33
34
|
};
|
|
34
35
|
export type McpRequestContext = {
|
package/types.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","sourceRoot":"","sources":["src/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAE1D,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MA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,OAAO,EAAE,MAAM,GAAG,cAAc,CAU7D;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,eAAe,CAAC;CAC1B,CAAC"}
|
package/types.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ type ResourceContentBlock = {
|
|
|
29
29
|
export type ContentBlock = TextContentBlock | ImageContentBlock | AudioContentBlock | ResourceContentBlock;
|
|
30
30
|
export type ToolCallResult = {
|
|
31
31
|
content: ContentBlock[];
|
|
32
|
+
structuredContent?: Record<string, unknown>;
|
|
32
33
|
isError?: boolean;
|
|
33
34
|
};
|
|
34
35
|
export type McpRequestContext = {
|
package/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["src/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAE1D,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,Q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AM,GAAG,cAAc,CAU7D;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,eAAe,CAAC;CAC1B,CAAC"}
|
package/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["src/types.ts"],"names":[],"mappings":";AAAA,sFAAsF;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["src/types.ts"],"names":[],"mappings":";AAAA,sFAAsF;;AAuEtF,kDASC;AAED,sDA2BC;AAED,sCAUC;AAlDD,SAAgB,mBAAmB,CAAC,MAAe;IACjD,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;aACtC;SACF;KACF,CAAC;AACJ,CAAC;AAEM,KAAK,UAAU,qBAAqB,CAAC,QAAkB;IAC5D,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;IACnC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC;IAC3B,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACtE,IAAI,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAClC,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;SAC7C,CAAC;IACJ,CAAC;SAAM,IAAI,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QACzC,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;SAC7C,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,UAAU;oBAChB,QAAQ,EAAE;wBACR,uEAAuE;wBACvE,GAAG,EAAE,0BAA0B;wBAC/B,QAAQ;wBACR,IAAI,EAAE,IAAI;qBACX;iBACF;aACF;SACF,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAgB,aAAa,CAAC,OAAe;IAC3C,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,OAAO;aACd;SACF;QACD,OAAO,EAAE,IAAI;KACd,CAAC;AACJ,CAAC"}
|
package/types.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","sourceRoot":"","sources":["src/types.ts"],"names":[],"mappings":"AAAA,sFAAsF;
|
|
1
|
+
{"version":3,"file":"types.mjs","sourceRoot":"","sources":["src/types.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAuEtF,MAAM,UAAU,mBAAmB,CAAC,MAAe;IACjD,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;aACtC;SACF;KACF,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,QAAkB;IAC5D,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;IACnC,MAAM,QAAQ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