@orq-ai/node 4.14.11 → 4.14.13

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 (126) hide show
  1. package/jsr.json +1 -1
  2. package/lib/config.d.ts +2 -2
  3. package/lib/config.js +2 -2
  4. package/models/components/evaluatorresponsefunction.js +2 -2
  5. package/models/components/evaluatorresponsehttp.js +2 -2
  6. package/models/components/evaluatorresponsejsonschema.js +2 -2
  7. package/models/components/evaluatorresponsellm.js +2 -2
  8. package/models/components/evaluatorresponsepython.js +2 -2
  9. package/models/components/evaluatorresponseragas.js +2 -2
  10. package/models/components/evaluatorresponsetypescript.js +2 -2
  11. package/models/components/reasoningpart.js +1 -1
  12. package/models/operations/createannotationqueue.js +1 -1
  13. package/models/operations/createdataset.js +1 -1
  14. package/models/operations/createdatasetitem.js +5 -5
  15. package/models/operations/createtool.js +4 -4
  16. package/models/operations/getalltools.js +4 -4
  17. package/models/operations/geteval.js +16 -16
  18. package/models/operations/getv2humanevalsets.js +2 -2
  19. package/models/operations/getv2humanevalsetsid.js +2 -2
  20. package/models/operations/listannotationqueues.js +1 -1
  21. package/models/operations/listdatasetdatapoints.js +5 -5
  22. package/models/operations/listdatasets.js +1 -1
  23. package/models/operations/patchv2humanevalsetsid.js +2 -2
  24. package/models/operations/postv2feedbackevaluation.js +4 -4
  25. package/models/operations/postv2humanevalsets.js +2 -2
  26. package/models/operations/retrieveannotationqueue.js +1 -1
  27. package/models/operations/retrievedatapoint.js +5 -5
  28. package/models/operations/retrievedataset.js +1 -1
  29. package/models/operations/retrievetool.js +4 -4
  30. package/models/operations/runagent.js +1 -1
  31. package/models/operations/streamrunagent.js +1 -1
  32. package/models/operations/updateannotationqueue.js +1 -1
  33. package/models/operations/updatedatapoint.js +5 -5
  34. package/models/operations/updatedataset.js +1 -1
  35. package/models/operations/updatetool.js +4 -4
  36. package/package.json +3 -3
  37. package/packages/orq-rc/src/funcs/piiCapabilities.ts +144 -0
  38. package/packages/orq-rc/src/lib/config.ts +2 -2
  39. package/packages/orq-rc/src/models/components/agentstartedstreamingevent.ts +11 -1
  40. package/packages/orq-rc/src/models/components/capabilitiesresponse.ts +96 -0
  41. package/packages/orq-rc/src/models/components/createmcpgatewayrequest.ts +11 -0
  42. package/packages/orq-rc/src/models/components/detectrequest.ts +48 -0
  43. package/packages/orq-rc/src/models/components/entitylist.ts +37 -0
  44. package/packages/orq-rc/src/models/components/guardrailruleplugin.ts +27 -0
  45. package/packages/orq-rc/src/models/components/index.ts +4 -3
  46. package/packages/orq-rc/src/models/components/mcpgateway.ts +9 -0
  47. package/packages/orq-rc/src/models/components/mcpgatewayplugin.ts +83 -0
  48. package/packages/orq-rc/src/models/components/monitorfilter.ts +8 -0
  49. package/packages/orq-rc/src/models/components/piiredactionplugin.ts +143 -0
  50. package/packages/orq-rc/src/models/components/publicplugin.ts +17 -21
  51. package/packages/orq-rc/src/models/components/reasoningpart.ts +1 -1
  52. package/packages/orq-rc/src/models/components/redactrequest.ts +52 -0
  53. package/packages/orq-rc/src/models/components/responsehealingplugin.ts +4 -27
  54. package/packages/orq-rc/src/models/components/routingruleplugin.ts +27 -0
  55. package/packages/orq-rc/src/models/components/tracescrubbingplugin.ts +4 -24
  56. package/packages/orq-rc/src/models/components/updatemcpgatewayrequest.ts +11 -0
  57. package/packages/orq-rc/src/models/operations/createagentrequest.ts +85 -87
  58. package/packages/orq-rc/src/models/operations/createchatcompletion.ts +18 -26
  59. package/packages/orq-rc/src/models/operations/createcompletion.ts +3 -51
  60. package/packages/orq-rc/src/models/operations/createdataset.ts +1 -1
  61. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +5 -5
  62. package/packages/orq-rc/src/models/operations/createimage.ts +3 -51
  63. package/packages/orq-rc/src/models/operations/createprompt.ts +31 -43
  64. package/packages/orq-rc/src/models/operations/creatererank.ts +3 -51
  65. package/packages/orq-rc/src/models/operations/createtool.ts +4 -4
  66. package/packages/orq-rc/src/models/operations/getallprompts.ts +13 -17
  67. package/packages/orq-rc/src/models/operations/getalltools.ts +4 -4
  68. package/packages/orq-rc/src/models/operations/getoneprompt.ts +13 -17
  69. package/packages/orq-rc/src/models/operations/getpromptversion.ts +13 -17
  70. package/packages/orq-rc/src/models/operations/getv2humanevalsets.ts +2 -2
  71. package/packages/orq-rc/src/models/operations/getv2humanevalsetsid.ts +2 -2
  72. package/packages/orq-rc/src/models/operations/listagents.ts +37 -35
  73. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +5 -5
  74. package/packages/orq-rc/src/models/operations/listdatasets.ts +1 -1
  75. package/packages/orq-rc/src/models/operations/listpromptversions.ts +13 -17
  76. package/packages/orq-rc/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  77. package/packages/orq-rc/src/models/operations/postv2feedbackevaluation.ts +4 -4
  78. package/packages/orq-rc/src/models/operations/postv2humanevalsets.ts +2 -2
  79. package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +37 -35
  80. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +5 -5
  81. package/packages/orq-rc/src/models/operations/retrievedataset.ts +1 -1
  82. package/packages/orq-rc/src/models/operations/retrievetool.ts +4 -4
  83. package/packages/orq-rc/src/models/operations/runagent.ts +49 -53
  84. package/packages/orq-rc/src/models/operations/streamrunagent.ts +49 -53
  85. package/packages/orq-rc/src/models/operations/updateagent.ts +85 -87
  86. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +5 -5
  87. package/packages/orq-rc/src/models/operations/updatedataset.ts +1 -1
  88. package/packages/orq-rc/src/models/operations/updateprompt.ts +31 -43
  89. package/packages/orq-rc/src/models/operations/updatetool.ts +4 -4
  90. package/packages/orq-rc/src/sdk/pii.ts +16 -0
  91. package/src/lib/config.ts +2 -2
  92. package/src/models/components/evaluatorresponsefunction.ts +2 -2
  93. package/src/models/components/evaluatorresponsehttp.ts +2 -2
  94. package/src/models/components/evaluatorresponsejsonschema.ts +2 -2
  95. package/src/models/components/evaluatorresponsellm.ts +2 -2
  96. package/src/models/components/evaluatorresponsepython.ts +2 -2
  97. package/src/models/components/evaluatorresponseragas.ts +2 -2
  98. package/src/models/components/evaluatorresponsetypescript.ts +2 -2
  99. package/src/models/components/reasoningpart.ts +1 -1
  100. package/src/models/operations/createannotationqueue.ts +1 -1
  101. package/src/models/operations/createdataset.ts +1 -1
  102. package/src/models/operations/createdatasetitem.ts +5 -5
  103. package/src/models/operations/createtool.ts +4 -4
  104. package/src/models/operations/getalltools.ts +4 -4
  105. package/src/models/operations/geteval.ts +16 -16
  106. package/src/models/operations/getv2humanevalsets.ts +2 -2
  107. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  108. package/src/models/operations/listannotationqueues.ts +1 -1
  109. package/src/models/operations/listdatasetdatapoints.ts +5 -5
  110. package/src/models/operations/listdatasets.ts +1 -1
  111. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  112. package/src/models/operations/postv2feedbackevaluation.ts +4 -4
  113. package/src/models/operations/postv2humanevalsets.ts +2 -2
  114. package/src/models/operations/retrieveannotationqueue.ts +1 -1
  115. package/src/models/operations/retrievedatapoint.ts +5 -5
  116. package/src/models/operations/retrievedataset.ts +1 -1
  117. package/src/models/operations/retrievetool.ts +4 -4
  118. package/src/models/operations/runagent.ts +1 -1
  119. package/src/models/operations/streamrunagent.ts +1 -1
  120. package/src/models/operations/updateannotationqueue.ts +1 -1
  121. package/src/models/operations/updatedatapoint.ts +5 -5
  122. package/src/models/operations/updatedataset.ts +1 -1
  123. package/src/models/operations/updatetool.ts +4 -4
  124. package/packages/orq-rc/src/models/components/piiredactionpluginauto.ts +0 -185
  125. package/packages/orq-rc/src/models/components/piiredactionpluginen.ts +0 -222
  126. package/packages/orq-rc/src/models/components/piiredactionpluginnl.ts +0 -218
@@ -164,7 +164,7 @@ function retrieveToolResponseBodyCodeToolFromJSON(jsonString) {
164
164
  }
165
165
  /** @internal */
166
166
  exports.RetrieveToolResponseBodyCodeExecutionTool$inboundSchema = z.object({
167
- _id: z.string().default("tool_01M1NNXSZHH8RYZXK6R57V2WJ7"),
167
+ _id: z.string().default("tool_01M1VC6PCPPVBEY2V347FNHBZB"),
168
168
  path: z.string(),
169
169
  key: z.string(),
170
170
  display_name: z.string().optional(),
@@ -253,7 +253,7 @@ function retrieveToolResponseBodyHttpFromJSON(jsonString) {
253
253
  }
254
254
  /** @internal */
255
255
  exports.RetrieveToolResponseBodyHTTPTool$inboundSchema = z.object({
256
- _id: z.string().default("tool_01M1NNXSZG5ERDF031JHFQBVAA"),
256
+ _id: z.string().default("tool_01M1VC6PCMZVG0NYKERBKMFNH4"),
257
257
  path: z.string(),
258
258
  key: z.string(),
259
259
  display_name: z.string().optional(),
@@ -303,7 +303,7 @@ function retrieveToolResponseBodyJsonSchemaFromJSON(jsonString) {
303
303
  }
304
304
  /** @internal */
305
305
  exports.RetrieveToolResponseBodyJSONSchemaTool$inboundSchema = z.object({
306
- _id: z.string().default("tool_01M1NNXSZF8CNGF2PEAPNTPA1S"),
306
+ _id: z.string().default("tool_01M1VC6PCK1424X503HCN6M03T"),
307
307
  path: z.string(),
308
308
  key: z.string(),
309
309
  display_name: z.string().optional(),
@@ -357,7 +357,7 @@ function retrieveToolResponseBodyFunctionFromJSON(jsonString) {
357
357
  }
358
358
  /** @internal */
359
359
  exports.RetrieveToolResponseBodyFunctionTool$inboundSchema = z.object({
360
- _id: z.string().default("tool_01M1NNXSZEE8K1MYYPSGVSC1RV"),
360
+ _id: z.string().default("tool_01M1VC6PCJDGGBV97J5J0JWSD7"),
361
361
  path: z.string(),
362
362
  key: z.string(),
363
363
  display_name: z.string().optional(),
@@ -1106,7 +1106,7 @@ function agentToolInputRunSchemaToJSON(agentToolInputRunSchema) {
1106
1106
  }
1107
1107
  /** @internal */
1108
1108
  exports.Tools$outboundSchema = z.object({
1109
- id: z.string().default("01M1NNXSVE980ZRX0067ZNND42"),
1109
+ id: z.string().default("01M1VC6P71R54BWNYM0SSNCVYD"),
1110
1110
  name: z.string(),
1111
1111
  description: z.string().optional(),
1112
1112
  schema: z.lazy(() => exports.AgentToolInputRunSchema$outboundSchema),
@@ -1072,7 +1072,7 @@ function streamRunAgentAgentToolInputRunAgentsSchemaToJSON(streamRunAgentAgentTo
1072
1072
  }
1073
1073
  /** @internal */
1074
1074
  exports.AgentToolInputRunTools$outboundSchema = z.object({
1075
- id: z.string().default("01M1NNXSW8EKTD21A6EGWGGH95"),
1075
+ id: z.string().default("01M1VC6P8703DNF7NB2C2ET696"),
1076
1076
  name: z.string(),
1077
1077
  description: z.string().optional(),
1078
1078
  schema: z.lazy(() => exports.StreamRunAgentAgentToolInputRunAgentsSchema$outboundSchema),
@@ -98,7 +98,7 @@ exports.UpdateAnnotationQueueResponseBody$inboundSchema = z.object({
98
98
  updated_by_id: z.nullable(z.string()).optional(),
99
99
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
100
100
  .optional(),
101
- updated: z.string().datetime({ offset: true }).default("2026-09-04T07:42:48.478Z").transform(v => new Date(v)),
101
+ updated: z.string().datetime({ offset: true }).default("2026-09-06T12:48:18.752Z").transform(v => new Date(v)),
102
102
  }).transform((v) => {
103
103
  return (0, primitives_js_1.remap)(v, {
104
104
  "_id": "id",
@@ -866,7 +866,7 @@ exports.UpdateDatapointEvaluations4$inboundSchema = z.object({
866
866
  parent_annotation_id: z.string().optional(),
867
867
  explanation: z.string().optional(),
868
868
  reviewed_by_id: z.string(),
869
- reviewed_at: z.string().datetime({ offset: true }).default("2026-09-04T07:42:57.053Z").transform(v => new Date(v)),
869
+ reviewed_at: z.string().datetime({ offset: true }).default("2026-09-06T12:48:29.140Z").transform(v => new Date(v)),
870
870
  type: z.literal("string_array"),
871
871
  values: z.array(z.string()),
872
872
  }).transform((v) => {
@@ -917,7 +917,7 @@ exports.UpdateDatapointEvaluations3$inboundSchema = z.object({
917
917
  parent_annotation_id: z.string().optional(),
918
918
  explanation: z.string().optional(),
919
919
  reviewed_by_id: z.string(),
920
- reviewed_at: z.string().datetime({ offset: true }).default("2026-09-04T07:42:57.053Z").transform(v => new Date(v)),
920
+ reviewed_at: z.string().datetime({ offset: true }).default("2026-09-06T12:48:29.139Z").transform(v => new Date(v)),
921
921
  type: z.literal("boolean"),
922
922
  value: z.boolean(),
923
923
  }).transform((v) => {
@@ -968,7 +968,7 @@ exports.UpdateDatapointEvaluations2$inboundSchema = z.object({
968
968
  parent_annotation_id: z.string().optional(),
969
969
  explanation: z.string().optional(),
970
970
  reviewed_by_id: z.string(),
971
- reviewed_at: z.string().datetime({ offset: true }).default("2026-09-04T07:42:57.052Z").transform(v => new Date(v)),
971
+ reviewed_at: z.string().datetime({ offset: true }).default("2026-09-06T12:48:29.139Z").transform(v => new Date(v)),
972
972
  type: z.literal("number"),
973
973
  value: z.number(),
974
974
  }).transform((v) => {
@@ -1018,7 +1018,7 @@ exports.UpdateDatapointEvaluations1$inboundSchema = z.object({
1018
1018
  parent_annotation_id: z.string().optional(),
1019
1019
  explanation: z.string().optional(),
1020
1020
  reviewed_by_id: z.string(),
1021
- reviewed_at: z.string().datetime({ offset: true }).default("2026-09-04T07:42:57.052Z").transform(v => new Date(v)),
1021
+ reviewed_at: z.string().datetime({ offset: true }).default("2026-09-06T12:48:29.138Z").transform(v => new Date(v)),
1022
1022
  type: z.literal("string"),
1023
1023
  value: z.string(),
1024
1024
  }).transform((v) => {
@@ -1069,7 +1069,7 @@ exports.UpdateDatapointResponseBody$inboundSchema = z.object({
1069
1069
  updated_by_id: z.nullable(z.string()).optional(),
1070
1070
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
1071
1071
  .optional(),
1072
- updated: z.string().datetime({ offset: true }).default("2026-09-04T07:42:48.478Z").transform(v => new Date(v)),
1072
+ updated: z.string().datetime({ offset: true }).default("2026-09-06T12:48:18.752Z").transform(v => new Date(v)),
1073
1073
  }).transform((v) => {
1074
1074
  return (0, primitives_js_1.remap)(v, {
1075
1075
  "_id": "id",
@@ -95,7 +95,7 @@ exports.UpdateDatasetResponseBody$inboundSchema = z.object({
95
95
  updated_by_id: z.nullable(z.string()).optional(),
96
96
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
97
97
  .optional(),
98
- updated: z.string().datetime({ offset: true }).default("2026-09-04T07:42:48.478Z").transform(v => new Date(v)),
98
+ updated: z.string().datetime({ offset: true }).default("2026-09-06T12:48:18.752Z").transform(v => new Date(v)),
99
99
  }).transform((v) => {
100
100
  return (0, primitives_js_1.remap)(v, {
101
101
  "_id": "id",
@@ -536,7 +536,7 @@ function updateToolResponseBodyCodeToolFromJSON(jsonString) {
536
536
  }
537
537
  /** @internal */
538
538
  exports.UpdateToolResponseBodyCodeExecutionTool$inboundSchema = z.object({
539
- _id: z.string().default("tool_01M1NNXSZ65MCC1AT3EWYEME1T"),
539
+ _id: z.string().default("tool_01M1VC6PC6DM9CK80BWC0478EQ"),
540
540
  path: z.string(),
541
541
  key: z.string(),
542
542
  display_name: z.string().optional(),
@@ -625,7 +625,7 @@ function updateToolResponseBodyHttpFromJSON(jsonString) {
625
625
  }
626
626
  /** @internal */
627
627
  exports.UpdateToolResponseBodyHTTPTool$inboundSchema = z.object({
628
- _id: z.string().default("tool_01M1NNXSZ56HY060MVWMXTF8E3"),
628
+ _id: z.string().default("tool_01M1VC6PC4KG5SS8J0ETTYMVCC"),
629
629
  path: z.string(),
630
630
  key: z.string(),
631
631
  display_name: z.string().optional(),
@@ -675,7 +675,7 @@ function updateToolResponseBodyJsonSchemaFromJSON(jsonString) {
675
675
  }
676
676
  /** @internal */
677
677
  exports.UpdateToolResponseBodyJSONSchemaTool$inboundSchema = z.object({
678
- _id: z.string().default("tool_01M1NNXSZ47BCKTC7M631ES9A9"),
678
+ _id: z.string().default("tool_01M1VC6PC3YYGRCFT3V7SJYB7B"),
679
679
  path: z.string(),
680
680
  key: z.string(),
681
681
  display_name: z.string().optional(),
@@ -729,7 +729,7 @@ function updateToolResponseBodyFunctionFromJSON(jsonString) {
729
729
  }
730
730
  /** @internal */
731
731
  exports.UpdateToolResponseBodyFunctionTool$inboundSchema = z.object({
732
- _id: z.string().default("tool_01M1NNXSZ38YH367CGBEG82QSQ"),
732
+ _id: z.string().default("tool_01M1VC6PC1HZATPEQTBV4Q4P4G"),
733
733
  path: z.string(),
734
734
  key: z.string(),
735
735
  display_name: z.string().optional(),
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@orq-ai/node",
3
- "version": "4.14.11",
3
+ "version": "4.14.13",
4
4
  "author": "Orq",
5
5
  "exports": {
6
6
  ".": {
7
+ "import": "./index.js",
7
8
  "require": "./index.js",
8
- "types": "./index.d.ts",
9
- "import": "./index.js"
9
+ "types": "./index.d.ts"
10
10
  },
11
11
  "./*": "./*",
12
12
  "./langchain": {
@@ -0,0 +1,144 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { OrqCore } from "../core.js";
6
+ import { matchStatusCode } from "../lib/http.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { RequestOptions } from "../lib/sdks.js";
10
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
+ import { pathToFunc } from "../lib/url.js";
12
+ import * as components from "../models/components/index.js";
13
+ import {
14
+ ConnectionError,
15
+ InvalidRequestError,
16
+ RequestAbortedError,
17
+ RequestTimeoutError,
18
+ UnexpectedClientError,
19
+ } from "../models/errors/httpclienterrors.js";
20
+ import { OrqError } from "../models/errors/orqerror.js";
21
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
22
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
23
+ import { APICall, APIPromise } from "../types/async.js";
24
+ import { Result } from "../types/fp.js";
25
+
26
+ /**
27
+ * Get PII capabilities
28
+ *
29
+ * @remarks
30
+ * Reports the entity catalog, supported regions, and default thresholds the PII detection service currently exposes, including per-entity default thresholds.
31
+ */
32
+ export function piiCapabilities(
33
+ client: OrqCore,
34
+ options?: RequestOptions,
35
+ ): APIPromise<
36
+ Result<
37
+ components.CapabilitiesResponse,
38
+ | OrqError
39
+ | ResponseValidationError
40
+ | ConnectionError
41
+ | RequestAbortedError
42
+ | RequestTimeoutError
43
+ | InvalidRequestError
44
+ | UnexpectedClientError
45
+ | SDKValidationError
46
+ >
47
+ > {
48
+ return new APIPromise($do(
49
+ client,
50
+ options,
51
+ ));
52
+ }
53
+
54
+ async function $do(
55
+ client: OrqCore,
56
+ options?: RequestOptions,
57
+ ): Promise<
58
+ [
59
+ Result<
60
+ components.CapabilitiesResponse,
61
+ | OrqError
62
+ | ResponseValidationError
63
+ | ConnectionError
64
+ | RequestAbortedError
65
+ | RequestTimeoutError
66
+ | InvalidRequestError
67
+ | UnexpectedClientError
68
+ | SDKValidationError
69
+ >,
70
+ APICall,
71
+ ]
72
+ > {
73
+ const path = pathToFunc("/v2/pii/capabilities")();
74
+
75
+ const headers = new Headers(compactMap({
76
+ Accept: "application/json",
77
+ }));
78
+
79
+ const secConfig = await extractSecurity(client._options.apiKey);
80
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
81
+ const requestSecurity = resolveGlobalSecurity(securityInput);
82
+
83
+ const context = {
84
+ options: client._options,
85
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
86
+ operationID: "PIICapabilities",
87
+ oAuth2Scopes: null,
88
+
89
+ resolvedSecurity: requestSecurity,
90
+
91
+ securitySource: client._options.apiKey,
92
+ retryConfig: options?.retries
93
+ || client._options.retryConfig
94
+ || { strategy: "none" },
95
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
96
+ };
97
+
98
+ const requestRes = client._createRequest(context, {
99
+ security: requestSecurity,
100
+ method: "GET",
101
+ baseURL: options?.serverURL,
102
+ path: path,
103
+ headers: headers,
104
+ userAgent: client._options.userAgent,
105
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
106
+ }, options);
107
+ if (!requestRes.ok) {
108
+ return [requestRes, { status: "invalid" }];
109
+ }
110
+ const req = requestRes.value;
111
+
112
+ const doResult = await client._do(req, {
113
+ context,
114
+ isErrorStatusCode: (statusCode: number) =>
115
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
116
+ retryConfig: context.retryConfig,
117
+ retryCodes: context.retryCodes,
118
+ });
119
+ if (!doResult.ok) {
120
+ return [doResult, { status: "request-error", request: req }];
121
+ }
122
+ const response = doResult.value;
123
+
124
+ const [result] = await M.match<
125
+ components.CapabilitiesResponse,
126
+ | OrqError
127
+ | ResponseValidationError
128
+ | ConnectionError
129
+ | RequestAbortedError
130
+ | RequestTimeoutError
131
+ | InvalidRequestError
132
+ | UnexpectedClientError
133
+ | SDKValidationError
134
+ >(
135
+ M.json(200, components.CapabilitiesResponse$inboundSchema),
136
+ M.fail("4XX"),
137
+ M.fail("5XX"),
138
+ )(response, req);
139
+ if (!result.ok) {
140
+ return [result, { status: "complete", request: req, response }];
141
+ }
142
+
143
+ return [result, { status: "complete", request: req, response }];
144
+ }
@@ -58,7 +58,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
58
58
  export const SDK_METADATA = {
59
59
  language: "typescript",
60
60
  openapiDocVersion: "2.0",
61
- sdkVersion: "4.15.0-rc.19",
61
+ sdkVersion: "4.15.0-rc.22",
62
62
  genVersion: "2.935.1",
63
- userAgent: "speakeasy-sdk/typescript 4.15.0-rc.19 2.935.1 2.0 @orq-ai/node",
63
+ userAgent: "speakeasy-sdk/typescript 4.15.0-rc.22 2.935.1 2.0 @orq-ai/node",
64
64
  } as const;
@@ -140,6 +140,10 @@ export type Evaluators = {
140
140
  * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
141
141
  */
142
142
  executeOn: AgentStartedStreamingEventDataExecuteOn;
143
+ /**
144
+ * Evaluator-specific configuration, passed through to the evaluator at run time. For orq_pii_detection this carries regions, entities, entity_thresholds, language and threshold, and is validated against PIIDetectionGuardrailOptions: regions and entities are two mutually exclusive coverage modes, and every entity_thresholds key must also appear in entities. on_failure is rejected: an evaluator acting as a guardrail always fails closed.
145
+ */
146
+ options?: { [k: string]: any } | undefined;
143
147
  };
144
148
 
145
149
  /**
@@ -169,6 +173,10 @@ export type Guardrails = {
169
173
  * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
170
174
  */
171
175
  executeOn: AgentStartedStreamingEventExecuteOn;
176
+ /**
177
+ * Evaluator-specific configuration, passed through to the evaluator at run time. For orq_pii_detection this carries regions, entities, entity_thresholds, language and threshold, and is validated against PIIDetectionGuardrailOptions: regions and entities are two mutually exclusive coverage modes, and every entity_thresholds key must also appear in entities. on_failure is rejected: an evaluator acting as a guardrail always fails closed.
178
+ */
179
+ options?: { [k: string]: any } | undefined;
172
180
  };
173
181
 
174
182
  export type Settings = {
@@ -198,7 +206,7 @@ export type Settings = {
198
206
  */
199
207
  evaluators?: Array<Evaluators> | undefined;
200
208
  /**
201
- * Configuration for a guardrail applied to the agent
209
+ * Configuration for a guardrail applied to the agent. sample_rate has no effect here: a guardrail is a gate rather than a measurement, so it runs on every request.
202
210
  */
203
211
  guardrails?: Array<Guardrails> | undefined;
204
212
  };
@@ -376,6 +384,7 @@ export const Evaluators$inboundSchema: z.ZodType<
376
384
  id: z.string(),
377
385
  sample_rate: z.number().default(50),
378
386
  execute_on: AgentStartedStreamingEventDataExecuteOn$inboundSchema,
387
+ options: z.record(z.any()).optional(),
379
388
  }).transform((v) => {
380
389
  return remap$(v, {
381
390
  "sample_rate": "sampleRate",
@@ -407,6 +416,7 @@ export const Guardrails$inboundSchema: z.ZodType<
407
416
  id: z.string(),
408
417
  sample_rate: z.number().default(50),
409
418
  execute_on: AgentStartedStreamingEventExecuteOn$inboundSchema,
419
+ options: z.record(z.any()).optional(),
410
420
  }).transform((v) => {
411
421
  return remap$(v, {
412
422
  "sample_rate": "sampleRate",
@@ -0,0 +1,96 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import { EntityList, EntityList$inboundSchema } from "./entitylist.js";
11
+
12
+ export type CapabilitiesResponse = {
13
+ /**
14
+ * Supported detector languages, e.g. "en", "nl". There is no "auto" value.
15
+ */
16
+ languages?: Array<string> | undefined;
17
+ /**
18
+ * Universal entity types available regardless of region, e.g. PASSPORT,
19
+ *
20
+ * @remarks
21
+ * LICENSE_PLATE, UUID, JWT, BIC.
22
+ */
23
+ baseEntities?: Array<string> | undefined;
24
+ /**
25
+ * Every entity type the service can detect across all regions and the
26
+ *
27
+ * @remarks
28
+ * base catalog.
29
+ */
30
+ allEntities?: Array<string> | undefined;
31
+ /**
32
+ * Region codes the service recognizes, e.g. "nl", "gb", "all".
33
+ */
34
+ regions?: Array<string> | undefined;
35
+ /**
36
+ * Maps each region code to the entity types it gates. Use this to find the
37
+ *
38
+ * @remarks
39
+ * type to name in `entities` when you need a per-entity threshold on a type
40
+ * a region gates.
41
+ */
42
+ regionEntities?: { [k: string]: EntityList } | undefined;
43
+ /**
44
+ * Sparse per-entity default thresholds; entities absent here fall back to
45
+ *
46
+ * @remarks
47
+ * default_threshold.
48
+ */
49
+ entityThresholds?: { [k: string]: number } | undefined;
50
+ /**
51
+ * Confidence cutoff applied when neither `threshold` nor an entity-specific
52
+ *
53
+ * @remarks
54
+ * override is supplied.
55
+ */
56
+ defaultThreshold?: number | undefined;
57
+ /**
58
+ * Maximum number of characters accepted per request.
59
+ */
60
+ maxTextChars?: number | undefined;
61
+ };
62
+
63
+ /** @internal */
64
+ export const CapabilitiesResponse$inboundSchema: z.ZodType<
65
+ CapabilitiesResponse,
66
+ z.ZodTypeDef,
67
+ unknown
68
+ > = z.object({
69
+ languages: z.array(z.string()).optional(),
70
+ base_entities: z.array(z.string()).optional(),
71
+ all_entities: z.array(z.string()).optional(),
72
+ regions: z.array(z.string()).optional(),
73
+ region_entities: z.record(EntityList$inboundSchema).optional(),
74
+ entity_thresholds: z.record(z.number()).optional(),
75
+ default_threshold: z.number().optional(),
76
+ max_text_chars: z.number().int().optional(),
77
+ }).transform((v) => {
78
+ return remap$(v, {
79
+ "base_entities": "baseEntities",
80
+ "all_entities": "allEntities",
81
+ "region_entities": "regionEntities",
82
+ "entity_thresholds": "entityThresholds",
83
+ "default_threshold": "defaultThreshold",
84
+ "max_text_chars": "maxTextChars",
85
+ });
86
+ });
87
+
88
+ export function capabilitiesResponseFromJSON(
89
+ jsonString: string,
90
+ ): SafeParseResult<CapabilitiesResponse, SDKValidationError> {
91
+ return safeParse(
92
+ jsonString,
93
+ (x) => CapabilitiesResponse$inboundSchema.parse(JSON.parse(x)),
94
+ `Failed to parse 'CapabilitiesResponse' from JSON`,
95
+ );
96
+ }
@@ -8,6 +8,11 @@ import {
8
8
  McpGatewayMode,
9
9
  McpGatewayMode$outboundSchema,
10
10
  } from "./mcpgatewaymode.js";
11
+ import {
12
+ McpGatewayPlugin,
13
+ McpGatewayPlugin$Outbound,
14
+ McpGatewayPlugin$outboundSchema,
15
+ } from "./mcpgatewayplugin.js";
11
16
  import {
12
17
  McpGatewayServerLink,
13
18
  McpGatewayServerLink$Outbound,
@@ -46,6 +51,10 @@ export type CreateMcpGatewayRequest = {
46
51
  * Which projects in the workspace may use this gateway. Defaults to every project.
47
52
  */
48
53
  sharing?: Sharing | undefined;
54
+ /**
55
+ * Plugins run on every tool call this gateway serves.
56
+ */
57
+ plugins?: Array<McpGatewayPlugin> | undefined;
49
58
  };
50
59
 
51
60
  /** @internal */
@@ -57,6 +66,7 @@ export type CreateMcpGatewayRequest$Outbound = {
57
66
  tool_naming?: string | undefined;
58
67
  mode?: string | undefined;
59
68
  sharing?: Sharing$Outbound | undefined;
69
+ plugins?: Array<McpGatewayPlugin$Outbound> | undefined;
60
70
  };
61
71
 
62
72
  /** @internal */
@@ -72,6 +82,7 @@ export const CreateMcpGatewayRequest$outboundSchema: z.ZodType<
72
82
  toolNaming: McpToolNaming$outboundSchema.optional(),
73
83
  mode: McpGatewayMode$outboundSchema.optional(),
74
84
  sharing: Sharing$outboundSchema.optional(),
85
+ plugins: z.array(McpGatewayPlugin$outboundSchema).optional(),
75
86
  }).transform((v) => {
76
87
  return remap$(v, {
77
88
  displayName: "display_name",
@@ -25,6 +25,47 @@ export type DetectRequest = {
25
25
  * When true, the response includes a per-type entity breakdown.
26
26
  */
27
27
  includeEntities?: boolean | undefined;
28
+ /**
29
+ * Region codes selecting whole regions of coverage, e.g. "nl", "gb". Every
30
+ *
31
+ * @remarks
32
+ * entity type those regions cover is included, alongside the base catalog.
33
+ * ["all"] is exclusive. Leaving this and `entities` both empty also runs every
34
+ * region, so selecting nothing is the widest request rather than the narrowest.
35
+ * Empty alongside a non-empty `entities` stays strict. See the capabilities
36
+ * endpoint for the region list.
37
+ *
38
+ * Combines with `entities`: the detector unions the two selections, so a
39
+ * request carrying both covers the regions plus the named types. Note that
40
+ * `entities` only narrows coverage when it travels alone.
41
+ */
42
+ regions?: Array<string> | undefined;
43
+ /**
44
+ * The entity types to cover. A named type fires even when it belongs to a
45
+ *
46
+ * @remarks
47
+ * region, so a region's types can be selected individually without naming
48
+ * the region. Alone this is a strict allowlist; alongside `regions` it adds
49
+ * to the region coverage instead of narrowing it.
50
+ */
51
+ entities?: Array<string> | undefined;
52
+ /**
53
+ * Per-entity confidence cutoff overrides. An override REPLACES the global
54
+ *
55
+ * @remarks
56
+ * `threshold` for that type and may sit above or below it: the gateway
57
+ * lowers the first-pass floor it sends the detector to the smallest value
58
+ * in the map, and every selected type carries its own cutoff, so a
59
+ * sub-global override detects MORE of that type without widening the rest.
60
+ *
61
+ * This only tunes confidence; it never changes which types are covered.
62
+ * Coverage is decided by `entities` alone, so every key here must also
63
+ * appear in `entities` — a key that does not is rejected, as is any key at
64
+ * all when `entities` is empty.
65
+ *
66
+ * Declarative [0,1] bound mirrors existing constraint on `threshold`.
67
+ */
68
+ entityThresholds?: { [k: string]: number } | undefined;
28
69
  };
29
70
 
30
71
  /** @internal */
@@ -33,6 +74,9 @@ export type DetectRequest$Outbound = {
33
74
  language?: string | undefined;
34
75
  threshold?: number | undefined;
35
76
  include_entities?: boolean | undefined;
77
+ regions?: Array<string> | undefined;
78
+ entities?: Array<string> | undefined;
79
+ entity_thresholds?: { [k: string]: number } | undefined;
36
80
  };
37
81
 
38
82
  /** @internal */
@@ -45,9 +89,13 @@ export const DetectRequest$outboundSchema: z.ZodType<
45
89
  language: z.string().optional(),
46
90
  threshold: z.number().optional(),
47
91
  includeEntities: z.boolean().optional(),
92
+ regions: z.array(z.string()).optional(),
93
+ entities: z.array(z.string()).optional(),
94
+ entityThresholds: z.record(z.number()).optional(),
48
95
  }).transform((v) => {
49
96
  return remap$(v, {
50
97
  includeEntities: "include_entities",
98
+ entityThresholds: "entity_thresholds",
51
99
  });
52
100
  });
53
101
 
@@ -0,0 +1,37 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ /**
11
+ * EntityList wraps a repeated string because proto3 maps cannot hold
12
+ *
13
+ * @remarks
14
+ * repeated values directly.
15
+ */
16
+ export type EntityList = {
17
+ entities?: Array<string> | undefined;
18
+ };
19
+
20
+ /** @internal */
21
+ export const EntityList$inboundSchema: z.ZodType<
22
+ EntityList,
23
+ z.ZodTypeDef,
24
+ unknown
25
+ > = z.object({
26
+ entities: z.array(z.string()).optional(),
27
+ });
28
+
29
+ export function entityListFromJSON(
30
+ jsonString: string,
31
+ ): SafeParseResult<EntityList, SDKValidationError> {
32
+ return safeParse(
33
+ jsonString,
34
+ (x) => EntityList$inboundSchema.parse(JSON.parse(x)),
35
+ `Failed to parse 'EntityList' from JSON`,
36
+ );
37
+ }