@orq-ai/node 3.1.10 → 3.1.11
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/bin/mcp-server.js +2896 -804
- package/bin/mcp-server.js.map +18 -18
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/cli/start/command.d.ts.map +1 -1
- package/mcp-server/cli/start/command.js +9 -0
- package/mcp-server/cli/start/command.js.map +1 -1
- package/mcp-server/cli/start/impl.d.ts +1 -0
- package/mcp-server/cli/start/impl.d.ts.map +1 -1
- package/mcp-server/cli/start/impl.js +2 -0
- package/mcp-server/cli/start/impl.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.d.ts +1 -0
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +3 -2
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools.d.ts +1 -1
- package/mcp-server/tools.d.ts.map +1 -1
- package/mcp-server/tools.js +4 -1
- package/mcp-server/tools.js.map +1 -1
- package/models/components/deployments.d.ts +1716 -400
- package/models/components/deployments.d.ts.map +1 -1
- package/models/components/deployments.js +1617 -357
- package/models/components/deployments.js.map +1 -1
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createprompt.d.ts +16 -16
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +26 -27
- package/models/operations/createprompt.js.map +1 -1
- package/models/operations/deploymentcreatemetric.d.ts +790 -132
- package/models/operations/deploymentcreatemetric.d.ts.map +1 -1
- package/models/operations/deploymentcreatemetric.js +770 -143
- package/models/operations/deploymentcreatemetric.js.map +1 -1
- package/models/operations/deploymentgetconfig.d.ts +1819 -503
- package/models/operations/deploymentgetconfig.d.ts.map +1 -1
- package/models/operations/deploymentgetconfig.js +1786 -521
- package/models/operations/deploymentgetconfig.js.map +1 -1
- package/models/operations/deploymentinvoke.d.ts +17 -17
- package/models/operations/deploymentinvoke.d.ts.map +1 -1
- package/models/operations/deploymentinvoke.js +20 -20
- package/models/operations/deploymentinvoke.js.map +1 -1
- package/models/operations/deploymentstream.d.ts +1742 -426
- package/models/operations/deploymentstream.d.ts.map +1 -1
- package/models/operations/deploymentstream.js +1643 -386
- package/models/operations/deploymentstream.js.map +1 -1
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/package.json +1 -1
- package/packages/orq-rc/jsr.json +1 -1
- package/packages/orq-rc/package-lock.json +2 -2
- package/packages/orq-rc/package.json +1 -1
- package/packages/orq-rc/src/lib/config.ts +3 -3
- package/packages/orq-rc/src/mcp-server/cli/start/command.ts +9 -0
- package/packages/orq-rc/src/mcp-server/cli/start/impl.ts +3 -0
- package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
- package/packages/orq-rc/src/mcp-server/server.ts +10 -2
- package/packages/orq-rc/src/mcp-server/tools.ts +5 -0
- package/packages/orq-rc/src/models/components/deployments.ts +3134 -673
- package/packages/orq-rc/src/models/operations/bulkcreatedatapoints.ts +2 -2
- package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2 -2
- package/packages/orq-rc/src/models/operations/createprompt.ts +8 -8
- package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +1799 -334
- package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +3619 -1003
- package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +32 -28
- package/packages/orq-rc/src/models/operations/fileget.ts +3 -2
- package/packages/orq-rc/src/models/operations/filelist.ts +3 -2
- package/packages/orq-rc/src/models/operations/fileupload.ts +4 -2
- package/packages/orq-rc/src/models/operations/getallprompts.ts +8 -8
- package/packages/orq-rc/src/models/operations/getoneprompt.ts +8 -8
- package/packages/orq-rc/src/models/operations/getpromptversion.ts +8 -8
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
- package/packages/orq-rc/src/models/operations/listpromptversions.ts +8 -8
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/updateprompt.ts +50 -46
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/cli/start/command.ts +9 -0
- package/src/mcp-server/cli/start/impl.ts +3 -0
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +10 -2
- package/src/mcp-server/tools.ts +5 -0
- package/src/models/components/deployments.ts +3133 -635
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createprompt.ts +34 -30
- package/src/models/operations/deploymentcreatemetric.ts +1859 -324
- package/src/models/operations/deploymentgetconfig.ts +3442 -886
- package/src/models/operations/deploymentinvoke.ts +32 -28
- package/src/models/operations/deploymentstream.ts +3661 -763
- package/src/models/operations/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +2 -2
- package/src/models/operations/fileupload.ts +2 -2
|
@@ -31,7 +31,7 @@ export type ModelType = ClosedEnum<typeof ModelType>;
|
|
|
31
31
|
/**
|
|
32
32
|
* Only supported on `image` models.
|
|
33
33
|
*/
|
|
34
|
-
export const
|
|
34
|
+
export const UpdatePromptFormat = {
|
|
35
35
|
Url: "url",
|
|
36
36
|
B64Json: "b64_json",
|
|
37
37
|
Text: "text",
|
|
@@ -40,7 +40,7 @@ export const Format = {
|
|
|
40
40
|
/**
|
|
41
41
|
* Only supported on `image` models.
|
|
42
42
|
*/
|
|
43
|
-
export type
|
|
43
|
+
export type UpdatePromptFormat = ClosedEnum<typeof UpdatePromptFormat>;
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
46
|
* Only supported on `image` models.
|
|
@@ -170,7 +170,7 @@ export type ModelParameters = {
|
|
|
170
170
|
/**
|
|
171
171
|
* Only supported on `image` models.
|
|
172
172
|
*/
|
|
173
|
-
format?:
|
|
173
|
+
format?: UpdatePromptFormat | undefined;
|
|
174
174
|
/**
|
|
175
175
|
* Only supported on `image` models.
|
|
176
176
|
*/
|
|
@@ -405,8 +405,8 @@ export type UpdatePromptRequestBody = {
|
|
|
405
405
|
domainId?: string | undefined;
|
|
406
406
|
created?: string | undefined;
|
|
407
407
|
updated?: string | undefined;
|
|
408
|
-
createdById?: string | undefined;
|
|
409
|
-
updatedById?: string | undefined;
|
|
408
|
+
createdById?: string | null | undefined;
|
|
409
|
+
updatedById?: string | null | undefined;
|
|
410
410
|
/**
|
|
411
411
|
* The prompt’s name, meant to be displayable in the UI.
|
|
412
412
|
*/
|
|
@@ -459,7 +459,7 @@ export type UpdatePromptModelType = ClosedEnum<typeof UpdatePromptModelType>;
|
|
|
459
459
|
/**
|
|
460
460
|
* Only supported on `image` models.
|
|
461
461
|
*/
|
|
462
|
-
export const
|
|
462
|
+
export const UpdatePromptPromptsFormat = {
|
|
463
463
|
Url: "url",
|
|
464
464
|
B64Json: "b64_json",
|
|
465
465
|
Text: "text",
|
|
@@ -468,7 +468,9 @@ export const UpdatePromptFormat = {
|
|
|
468
468
|
/**
|
|
469
469
|
* Only supported on `image` models.
|
|
470
470
|
*/
|
|
471
|
-
export type
|
|
471
|
+
export type UpdatePromptPromptsFormat = ClosedEnum<
|
|
472
|
+
typeof UpdatePromptPromptsFormat
|
|
473
|
+
>;
|
|
472
474
|
|
|
473
475
|
/**
|
|
474
476
|
* Only supported on `image` models.
|
|
@@ -608,7 +610,7 @@ export type UpdatePromptModelParameters = {
|
|
|
608
610
|
/**
|
|
609
611
|
* Only supported on `image` models.
|
|
610
612
|
*/
|
|
611
|
-
format?:
|
|
613
|
+
format?: UpdatePromptPromptsFormat | undefined;
|
|
612
614
|
/**
|
|
613
615
|
* Only supported on `image` models.
|
|
614
616
|
*/
|
|
@@ -872,8 +874,8 @@ export type UpdatePromptResponseBody = {
|
|
|
872
874
|
domainId: string;
|
|
873
875
|
created: string;
|
|
874
876
|
updated: string;
|
|
875
|
-
createdById?: string | undefined;
|
|
876
|
-
updatedById?: string | undefined;
|
|
877
|
+
createdById?: string | null | undefined;
|
|
878
|
+
updatedById?: string | null | undefined;
|
|
877
879
|
/**
|
|
878
880
|
* The prompt’s name, meant to be displayable in the UI.
|
|
879
881
|
*/
|
|
@@ -909,22 +911,24 @@ export namespace ModelType$ {
|
|
|
909
911
|
}
|
|
910
912
|
|
|
911
913
|
/** @internal */
|
|
912
|
-
export const
|
|
913
|
-
|
|
914
|
+
export const UpdatePromptFormat$inboundSchema: z.ZodNativeEnum<
|
|
915
|
+
typeof UpdatePromptFormat
|
|
916
|
+
> = z.nativeEnum(UpdatePromptFormat);
|
|
914
917
|
|
|
915
918
|
/** @internal */
|
|
916
|
-
export const
|
|
917
|
-
|
|
919
|
+
export const UpdatePromptFormat$outboundSchema: z.ZodNativeEnum<
|
|
920
|
+
typeof UpdatePromptFormat
|
|
921
|
+
> = UpdatePromptFormat$inboundSchema;
|
|
918
922
|
|
|
919
923
|
/**
|
|
920
924
|
* @internal
|
|
921
925
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
922
926
|
*/
|
|
923
|
-
export namespace
|
|
924
|
-
/** @deprecated use `
|
|
925
|
-
export const inboundSchema =
|
|
926
|
-
/** @deprecated use `
|
|
927
|
-
export const outboundSchema =
|
|
927
|
+
export namespace UpdatePromptFormat$ {
|
|
928
|
+
/** @deprecated use `UpdatePromptFormat$inboundSchema` instead. */
|
|
929
|
+
export const inboundSchema = UpdatePromptFormat$inboundSchema;
|
|
930
|
+
/** @deprecated use `UpdatePromptFormat$outboundSchema` instead. */
|
|
931
|
+
export const outboundSchema = UpdatePromptFormat$outboundSchema;
|
|
928
932
|
}
|
|
929
933
|
|
|
930
934
|
/** @internal */
|
|
@@ -1288,7 +1292,7 @@ export const ModelParameters$inboundSchema: z.ZodType<
|
|
|
1288
1292
|
presencePenalty: z.number().optional(),
|
|
1289
1293
|
numImages: z.number().optional(),
|
|
1290
1294
|
seed: z.number().optional(),
|
|
1291
|
-
format:
|
|
1295
|
+
format: UpdatePromptFormat$inboundSchema.optional(),
|
|
1292
1296
|
dimensions: z.string().optional(),
|
|
1293
1297
|
quality: Quality$inboundSchema.optional(),
|
|
1294
1298
|
style: z.string().optional(),
|
|
@@ -1347,7 +1351,7 @@ export const ModelParameters$outboundSchema: z.ZodType<
|
|
|
1347
1351
|
presencePenalty: z.number().optional(),
|
|
1348
1352
|
numImages: z.number().optional(),
|
|
1349
1353
|
seed: z.number().optional(),
|
|
1350
|
-
format:
|
|
1354
|
+
format: UpdatePromptFormat$outboundSchema.optional(),
|
|
1351
1355
|
dimensions: z.string().optional(),
|
|
1352
1356
|
quality: Quality$outboundSchema.optional(),
|
|
1353
1357
|
style: z.string().optional(),
|
|
@@ -2181,8 +2185,8 @@ export const UpdatePromptRequestBody$inboundSchema: z.ZodType<
|
|
|
2181
2185
|
domain_id: z.string().optional(),
|
|
2182
2186
|
created: z.string().optional(),
|
|
2183
2187
|
updated: z.string().optional(),
|
|
2184
|
-
created_by_id: z.string().optional(),
|
|
2185
|
-
updated_by_id: z.string().optional(),
|
|
2188
|
+
created_by_id: z.nullable(z.string()).optional(),
|
|
2189
|
+
updated_by_id: z.nullable(z.string()).optional(),
|
|
2186
2190
|
display_name: z.string().optional(),
|
|
2187
2191
|
description: z.nullable(z.string()).optional(),
|
|
2188
2192
|
prompt_config: z.lazy(() => PromptConfig$inboundSchema).optional(),
|
|
@@ -2203,8 +2207,8 @@ export type UpdatePromptRequestBody$Outbound = {
|
|
|
2203
2207
|
domain_id?: string | undefined;
|
|
2204
2208
|
created?: string | undefined;
|
|
2205
2209
|
updated?: string | undefined;
|
|
2206
|
-
created_by_id?: string | undefined;
|
|
2207
|
-
updated_by_id?: string | undefined;
|
|
2210
|
+
created_by_id?: string | null | undefined;
|
|
2211
|
+
updated_by_id?: string | null | undefined;
|
|
2208
2212
|
display_name?: string | undefined;
|
|
2209
2213
|
description?: string | null | undefined;
|
|
2210
2214
|
prompt_config?: PromptConfig$Outbound | undefined;
|
|
@@ -2221,8 +2225,8 @@ export const UpdatePromptRequestBody$outboundSchema: z.ZodType<
|
|
|
2221
2225
|
domainId: z.string().optional(),
|
|
2222
2226
|
created: z.string().optional(),
|
|
2223
2227
|
updated: z.string().optional(),
|
|
2224
|
-
createdById: z.string().optional(),
|
|
2225
|
-
updatedById: z.string().optional(),
|
|
2228
|
+
createdById: z.nullable(z.string()).optional(),
|
|
2229
|
+
updatedById: z.nullable(z.string()).optional(),
|
|
2226
2230
|
displayName: z.string().optional(),
|
|
2227
2231
|
description: z.nullable(z.string()).optional(),
|
|
2228
2232
|
promptConfig: z.lazy(() => PromptConfig$outboundSchema).optional(),
|
|
@@ -2376,24 +2380,24 @@ export namespace UpdatePromptModelType$ {
|
|
|
2376
2380
|
}
|
|
2377
2381
|
|
|
2378
2382
|
/** @internal */
|
|
2379
|
-
export const
|
|
2380
|
-
typeof
|
|
2381
|
-
> = z.nativeEnum(
|
|
2383
|
+
export const UpdatePromptPromptsFormat$inboundSchema: z.ZodNativeEnum<
|
|
2384
|
+
typeof UpdatePromptPromptsFormat
|
|
2385
|
+
> = z.nativeEnum(UpdatePromptPromptsFormat);
|
|
2382
2386
|
|
|
2383
2387
|
/** @internal */
|
|
2384
|
-
export const
|
|
2385
|
-
typeof
|
|
2386
|
-
> =
|
|
2388
|
+
export const UpdatePromptPromptsFormat$outboundSchema: z.ZodNativeEnum<
|
|
2389
|
+
typeof UpdatePromptPromptsFormat
|
|
2390
|
+
> = UpdatePromptPromptsFormat$inboundSchema;
|
|
2387
2391
|
|
|
2388
2392
|
/**
|
|
2389
2393
|
* @internal
|
|
2390
2394
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2391
2395
|
*/
|
|
2392
|
-
export namespace
|
|
2393
|
-
/** @deprecated use `
|
|
2394
|
-
export const inboundSchema =
|
|
2395
|
-
/** @deprecated use `
|
|
2396
|
-
export const outboundSchema =
|
|
2396
|
+
export namespace UpdatePromptPromptsFormat$ {
|
|
2397
|
+
/** @deprecated use `UpdatePromptPromptsFormat$inboundSchema` instead. */
|
|
2398
|
+
export const inboundSchema = UpdatePromptPromptsFormat$inboundSchema;
|
|
2399
|
+
/** @deprecated use `UpdatePromptPromptsFormat$outboundSchema` instead. */
|
|
2400
|
+
export const outboundSchema = UpdatePromptPromptsFormat$outboundSchema;
|
|
2397
2401
|
}
|
|
2398
2402
|
|
|
2399
2403
|
/** @internal */
|
|
@@ -2785,7 +2789,7 @@ export const UpdatePromptModelParameters$inboundSchema: z.ZodType<
|
|
|
2785
2789
|
presencePenalty: z.number().optional(),
|
|
2786
2790
|
numImages: z.number().optional(),
|
|
2787
2791
|
seed: z.number().optional(),
|
|
2788
|
-
format:
|
|
2792
|
+
format: UpdatePromptPromptsFormat$inboundSchema.optional(),
|
|
2789
2793
|
dimensions: z.string().optional(),
|
|
2790
2794
|
quality: UpdatePromptQuality$inboundSchema.optional(),
|
|
2791
2795
|
style: z.string().optional(),
|
|
@@ -2844,7 +2848,7 @@ export const UpdatePromptModelParameters$outboundSchema: z.ZodType<
|
|
|
2844
2848
|
presencePenalty: z.number().optional(),
|
|
2845
2849
|
numImages: z.number().optional(),
|
|
2846
2850
|
seed: z.number().optional(),
|
|
2847
|
-
format:
|
|
2851
|
+
format: UpdatePromptPromptsFormat$outboundSchema.optional(),
|
|
2848
2852
|
dimensions: z.string().optional(),
|
|
2849
2853
|
quality: UpdatePromptQuality$outboundSchema.optional(),
|
|
2850
2854
|
style: z.string().optional(),
|
|
@@ -3733,8 +3737,8 @@ export const UpdatePromptResponseBody$inboundSchema: z.ZodType<
|
|
|
3733
3737
|
domain_id: z.string(),
|
|
3734
3738
|
created: z.string(),
|
|
3735
3739
|
updated: z.string(),
|
|
3736
|
-
created_by_id: z.string().optional(),
|
|
3737
|
-
updated_by_id: z.string().optional(),
|
|
3740
|
+
created_by_id: z.nullable(z.string()).optional(),
|
|
3741
|
+
updated_by_id: z.nullable(z.string()).optional(),
|
|
3738
3742
|
display_name: z.string(),
|
|
3739
3743
|
description: z.nullable(z.string()).optional(),
|
|
3740
3744
|
prompt_config: z.lazy(() => UpdatePromptPromptConfig$inboundSchema),
|
|
@@ -3758,8 +3762,8 @@ export type UpdatePromptResponseBody$Outbound = {
|
|
|
3758
3762
|
domain_id: string;
|
|
3759
3763
|
created: string;
|
|
3760
3764
|
updated: string;
|
|
3761
|
-
created_by_id?: string | undefined;
|
|
3762
|
-
updated_by_id?: string | undefined;
|
|
3765
|
+
created_by_id?: string | null | undefined;
|
|
3766
|
+
updated_by_id?: string | null | undefined;
|
|
3763
3767
|
display_name: string;
|
|
3764
3768
|
description?: string | null | undefined;
|
|
3765
3769
|
prompt_config: UpdatePromptPromptConfig$Outbound;
|
|
@@ -3778,8 +3782,8 @@ export const UpdatePromptResponseBody$outboundSchema: z.ZodType<
|
|
|
3778
3782
|
domainId: z.string(),
|
|
3779
3783
|
created: z.string(),
|
|
3780
3784
|
updated: z.string(),
|
|
3781
|
-
createdById: z.string().optional(),
|
|
3782
|
-
updatedById: z.string().optional(),
|
|
3785
|
+
createdById: z.nullable(z.string()).optional(),
|
|
3786
|
+
updatedById: z.nullable(z.string()).optional(),
|
|
3783
3787
|
displayName: z.string(),
|
|
3784
3788
|
description: z.nullable(z.string()).optional(),
|
|
3785
3789
|
promptConfig: z.lazy(() => UpdatePromptPromptConfig$outboundSchema),
|
package/src/lib/config.ts
CHANGED
|
@@ -64,7 +64,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
64
64
|
export const SDK_METADATA = {
|
|
65
65
|
language: "typescript",
|
|
66
66
|
openapiDocVersion: "2.0",
|
|
67
|
-
sdkVersion: "3.1.
|
|
68
|
-
genVersion: "2.
|
|
69
|
-
userAgent: "speakeasy-sdk/typescript 3.1.
|
|
67
|
+
sdkVersion: "3.1.11",
|
|
68
|
+
genVersion: "2.541.0",
|
|
69
|
+
userAgent: "speakeasy-sdk/typescript 3.1.11 2.541.0 2.0 @orq-ai/node",
|
|
70
70
|
} as const;
|
|
@@ -28,6 +28,15 @@ export const startCommand = buildCommand({
|
|
|
28
28
|
parse: (val: string) =>
|
|
29
29
|
z.coerce.number().int().gte(0).lt(65536).parse(val),
|
|
30
30
|
},
|
|
31
|
+
tool: {
|
|
32
|
+
kind: "parsed",
|
|
33
|
+
brief: "Specify tools to mount on the server",
|
|
34
|
+
optional: true,
|
|
35
|
+
variadic: true,
|
|
36
|
+
parse: (value) => {
|
|
37
|
+
return z.string().parse(value);
|
|
38
|
+
},
|
|
39
|
+
},
|
|
31
40
|
...(mcpScopes.length
|
|
32
41
|
? {
|
|
33
42
|
scope: {
|
|
@@ -17,6 +17,7 @@ import { createMCPServer } from "../../server.js";
|
|
|
17
17
|
interface StartCommandFlags {
|
|
18
18
|
readonly transport: "stdio" | "sse";
|
|
19
19
|
readonly port: number;
|
|
20
|
+
readonly tool?: string[];
|
|
20
21
|
readonly scope?: MCPScope[];
|
|
21
22
|
readonly "api-key"?: string | undefined;
|
|
22
23
|
readonly "contact-id"?: SDKOptions["contactId"] | undefined;
|
|
@@ -49,6 +50,7 @@ async function startStdio(flags: StartCommandFlags) {
|
|
|
49
50
|
const transport = new StdioServerTransport();
|
|
50
51
|
const server = createMCPServer({
|
|
51
52
|
logger,
|
|
53
|
+
allowedTools: flags.tool,
|
|
52
54
|
scopes: flags.scope,
|
|
53
55
|
...{ apiKey: flags["api-key"] },
|
|
54
56
|
contactId: flags["contact-id"],
|
|
@@ -71,6 +73,7 @@ async function startSSE(flags: StartCommandFlags) {
|
|
|
71
73
|
const app = express();
|
|
72
74
|
const mcpServer = createMCPServer({
|
|
73
75
|
logger,
|
|
76
|
+
allowedTools: flags.tool,
|
|
74
77
|
scopes: flags.scope,
|
|
75
78
|
...{ apiKey: flags["api-key"] },
|
|
76
79
|
contactId: flags["contact-id"],
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -30,6 +30,7 @@ import { tool$remoteconfigsRetrieve } from "./tools/remoteconfigsRetrieve.js";
|
|
|
30
30
|
|
|
31
31
|
export function createMCPServer(deps: {
|
|
32
32
|
logger: ConsoleLogger;
|
|
33
|
+
allowedTools?: string[] | undefined;
|
|
33
34
|
scopes?: MCPScope[] | undefined;
|
|
34
35
|
serverURL?: string | undefined;
|
|
35
36
|
apiKey?: SDKOptions["apiKey"] | undefined;
|
|
@@ -39,7 +40,7 @@ export function createMCPServer(deps: {
|
|
|
39
40
|
}) {
|
|
40
41
|
const server = new McpServer({
|
|
41
42
|
name: "Orq",
|
|
42
|
-
version: "3.1.
|
|
43
|
+
version: "3.1.11",
|
|
43
44
|
});
|
|
44
45
|
|
|
45
46
|
const client = new OrqCore({
|
|
@@ -50,7 +51,14 @@ export function createMCPServer(deps: {
|
|
|
50
51
|
serverIdx: deps.serverIdx,
|
|
51
52
|
});
|
|
52
53
|
const scopes = new Set(deps.scopes ?? mcpScopes);
|
|
53
|
-
const
|
|
54
|
+
const allowedTools = deps.allowedTools && new Set(deps.allowedTools);
|
|
55
|
+
const tool = createRegisterTool(
|
|
56
|
+
deps.logger,
|
|
57
|
+
server,
|
|
58
|
+
client,
|
|
59
|
+
scopes,
|
|
60
|
+
allowedTools,
|
|
61
|
+
);
|
|
54
62
|
|
|
55
63
|
tool(tool$contactsCreate);
|
|
56
64
|
tool(tool$feedbackCreate);
|
package/src/mcp-server/tools.ts
CHANGED
|
@@ -94,8 +94,13 @@ export function createRegisterTool(
|
|
|
94
94
|
server: McpServer,
|
|
95
95
|
sdk: OrqCore,
|
|
96
96
|
allowedScopes: Set<MCPScope>,
|
|
97
|
+
allowedTools?: Set<string>,
|
|
97
98
|
): <A extends ZodRawShape | undefined>(tool: ToolDefinition<A>) => void {
|
|
98
99
|
return <A extends ZodRawShape | undefined>(tool: ToolDefinition<A>): void => {
|
|
100
|
+
if (allowedTools && !allowedTools.has(tool.name)) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
|
|
99
104
|
const toolScopes = tool.scopes ?? [];
|
|
100
105
|
if (!toolScopes.every((s) => allowedScopes.has(s))) {
|
|
101
106
|
return;
|