@orq-ai/node 4.3.0-rc.9 → 4.3.1-rc.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 +15 -10
- package/examples/package-lock.json +3 -3
- package/funcs/evalsInvoke.d.ts +1 -1
- package/funcs/evalsInvoke.d.ts.map +1 -1
- package/funcs/evalsInvoke.js +2 -2
- package/funcs/evalsInvoke.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/event-streams.d.ts.map +1 -1
- package/lib/event-streams.js +40 -21
- package/lib/event-streams.js.map +1 -1
- package/models/components/agentstartedstreamingevent.d.ts +5 -0
- package/models/components/agentstartedstreamingevent.d.ts.map +1 -1
- package/models/components/agentstartedstreamingevent.js +4 -0
- package/models/components/agentstartedstreamingevent.js.map +1 -1
- package/models/components/conversationresponse.js +1 -1
- package/models/components/conversationwithmessagesresponse.js +1 -1
- package/models/components/partdoneevent.js +1 -1
- package/models/components/reasoningpart.js +1 -1
- package/models/components/toolexecutionstartedstreamingevent.d.ts +1 -0
- package/models/components/toolexecutionstartedstreamingevent.d.ts.map +1 -1
- package/models/components/toolexecutionstartedstreamingevent.js +2 -0
- package/models/components/toolexecutionstartedstreamingevent.js.map +1 -1
- package/models/errors/invokeeval.d.ts +23 -3
- package/models/errors/invokeeval.d.ts.map +1 -1
- package/models/errors/invokeeval.js +28 -2
- package/models/errors/invokeeval.js.map +1 -1
- package/models/operations/createagentrequest.d.ts +35 -5
- package/models/operations/createagentrequest.d.ts.map +1 -1
- package/models/operations/createagentrequest.js +23 -4
- package/models/operations/createagentrequest.js.map +1 -1
- package/models/operations/createchatcompletion.d.ts +2 -2
- package/models/operations/createcompletion.d.ts +2 -2
- package/models/operations/createcontact.js +1 -1
- package/models/operations/createconversation.js +1 -1
- package/models/operations/createconversationresponse.js +2 -2
- package/models/operations/createdataset.js +1 -1
- package/models/operations/createdatasetitem.js +4 -4
- package/models/operations/createdatasource.js +1 -1
- package/models/operations/createeval.js +14 -14
- package/models/operations/createidentity.js +1 -1
- package/models/operations/createprompt.d.ts +1 -0
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +1 -0
- package/models/operations/createprompt.js.map +1 -1
- package/models/operations/createtool.js +6 -6
- package/models/operations/deploymentinvoke.d.ts +1 -0
- package/models/operations/deploymentinvoke.d.ts.map +1 -1
- package/models/operations/deploymentinvoke.js +1 -0
- package/models/operations/deploymentinvoke.js.map +1 -1
- package/models/operations/deployments.d.ts +1 -0
- package/models/operations/deployments.d.ts.map +1 -1
- package/models/operations/deployments.js +2 -1
- package/models/operations/deployments.js.map +1 -1
- package/models/operations/deploymentstream.d.ts +1 -0
- package/models/operations/deploymentstream.d.ts.map +1 -1
- package/models/operations/deploymentstream.js +1 -0
- package/models/operations/deploymentstream.js.map +1 -1
- package/models/operations/fileget.js +1 -1
- package/models/operations/filelist.js +2 -2
- package/models/operations/filelist.js.map +1 -1
- package/models/operations/fileupload.js +1 -1
- package/models/operations/generateconversationname.js +1 -1
- package/models/operations/getallmemories.js +1 -1
- package/models/operations/getallmemories.js.map +1 -1
- package/models/operations/getallmemorydocuments.js +1 -1
- package/models/operations/getallmemorydocuments.js.map +1 -1
- package/models/operations/getallmemorystores.js +1 -1
- package/models/operations/getallmemorystores.js.map +1 -1
- package/models/operations/getallprompts.d.ts +1 -0
- package/models/operations/getallprompts.d.ts.map +1 -1
- package/models/operations/getallprompts.js +2 -1
- package/models/operations/getallprompts.js.map +1 -1
- package/models/operations/getalltools.js +6 -6
- package/models/operations/getevals.js +15 -15
- package/models/operations/getevals.js.map +1 -1
- package/models/operations/getoneprompt.d.ts +1 -0
- package/models/operations/getoneprompt.d.ts.map +1 -1
- package/models/operations/getoneprompt.js +1 -0
- package/models/operations/getoneprompt.js.map +1 -1
- package/models/operations/getpromptversion.d.ts +1 -0
- package/models/operations/getpromptversion.d.ts.map +1 -1
- package/models/operations/getpromptversion.js +1 -0
- package/models/operations/getpromptversion.js.map +1 -1
- package/models/operations/getv2evaluatorsidversions.js +1 -1
- package/models/operations/getv2evaluatorsidversions.js.map +1 -1
- package/models/operations/getv2toolstoolidversions.js +1 -1
- package/models/operations/getv2toolstoolidversions.js.map +1 -1
- package/models/operations/invokeeval.d.ts +15 -1
- package/models/operations/invokeeval.d.ts.map +1 -1
- package/models/operations/invokeeval.js +12 -1
- package/models/operations/invokeeval.js.map +1 -1
- package/models/operations/listagents.d.ts +4 -0
- package/models/operations/listagents.d.ts.map +1 -1
- package/models/operations/listagents.js +2 -0
- package/models/operations/listagents.js.map +1 -1
- package/models/operations/listchunks.js +1 -1
- package/models/operations/listchunks.js.map +1 -1
- package/models/operations/listdatasetdatapoints.js +5 -5
- package/models/operations/listdatasetdatapoints.js.map +1 -1
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/listdatasets.js.map +1 -1
- package/models/operations/listdatasources.js +1 -1
- package/models/operations/listidentities.js +2 -2
- package/models/operations/listidentities.js.map +1 -1
- package/models/operations/listknowledgebases.js +1 -1
- package/models/operations/listknowledgebases.js.map +1 -1
- package/models/operations/listpromptversions.d.ts +1 -0
- package/models/operations/listpromptversions.d.ts.map +1 -1
- package/models/operations/listpromptversions.js +2 -1
- package/models/operations/listpromptversions.js.map +1 -1
- package/models/operations/retrieveagentrequest.d.ts +4 -0
- package/models/operations/retrieveagentrequest.d.ts.map +1 -1
- package/models/operations/retrieveagentrequest.js +2 -0
- package/models/operations/retrieveagentrequest.js.map +1 -1
- package/models/operations/retrievedatapoint.js +4 -4
- package/models/operations/retrievedataset.js +1 -1
- package/models/operations/retrievedatasource.js +1 -1
- package/models/operations/retrieveidentity.js +1 -1
- package/models/operations/retrievetool.js +6 -6
- package/models/operations/runagent.d.ts +5 -0
- package/models/operations/runagent.d.ts.map +1 -1
- package/models/operations/runagent.js +3 -1
- package/models/operations/runagent.js.map +1 -1
- package/models/operations/searchknowledge.d.ts +2 -2
- package/models/operations/streamrunagent.d.ts +5 -0
- package/models/operations/streamrunagent.d.ts.map +1 -1
- package/models/operations/streamrunagent.js +3 -1
- package/models/operations/streamrunagent.js.map +1 -1
- package/models/operations/updateagent.d.ts +35 -5
- package/models/operations/updateagent.d.ts.map +1 -1
- package/models/operations/updateagent.js +23 -4
- package/models/operations/updateagent.js.map +1 -1
- package/models/operations/updateconversation.js +1 -1
- package/models/operations/updatedatapoint.js +4 -4
- package/models/operations/updatedataset.js +1 -1
- package/models/operations/updatedatasource.js +1 -1
- package/models/operations/updateeval.js +14 -14
- package/models/operations/updateidentity.js +1 -1
- package/models/operations/updatememorydocument.d.ts +2 -2
- package/models/operations/updatememorydocument.d.ts.map +1 -1
- package/models/operations/updatememorydocument.js +1 -1
- package/models/operations/updatememorydocument.js.map +1 -1
- package/models/operations/updatememorystore.d.ts +1 -0
- package/models/operations/updatememorystore.d.ts.map +1 -1
- package/models/operations/updatememorystore.js +1 -0
- package/models/operations/updatememorystore.js.map +1 -1
- package/models/operations/updateprompt.d.ts +1 -0
- package/models/operations/updateprompt.d.ts.map +1 -1
- package/models/operations/updateprompt.js +1 -0
- package/models/operations/updateprompt.js.map +1 -1
- package/models/operations/updatetool.js +7 -7
- package/package.json +3 -3
- package/src/funcs/evalsInvoke.ts +7 -3
- package/src/lib/config.ts +3 -3
- package/src/lib/event-streams.ts +37 -20
- package/src/models/components/agentstartedstreamingevent.ts +9 -0
- package/src/models/components/conversationresponse.ts +1 -1
- package/src/models/components/conversationwithmessagesresponse.ts +1 -1
- package/src/models/components/partdoneevent.ts +1 -1
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/components/toolexecutionstartedstreamingevent.ts +3 -0
- package/src/models/errors/invokeeval.ts +48 -3
- package/src/models/operations/createagentrequest.ts +62 -1
- package/src/models/operations/createchatcompletion.ts +2 -2
- package/src/models/operations/createcompletion.ts +2 -2
- package/src/models/operations/createcontact.ts +1 -1
- package/src/models/operations/createconversation.ts +1 -1
- package/src/models/operations/createconversationresponse.ts +2 -2
- package/src/models/operations/createdataset.ts +1 -1
- package/src/models/operations/createdatasetitem.ts +4 -4
- package/src/models/operations/createdatasource.ts +1 -1
- package/src/models/operations/createeval.ts +14 -14
- package/src/models/operations/createidentity.ts +1 -1
- package/src/models/operations/createprompt.ts +1 -0
- package/src/models/operations/createtool.ts +6 -6
- package/src/models/operations/deploymentinvoke.ts +1 -0
- package/src/models/operations/deployments.ts +2 -1
- package/src/models/operations/deploymentstream.ts +1 -0
- package/src/models/operations/fileget.ts +1 -1
- package/src/models/operations/filelist.ts +2 -2
- package/src/models/operations/fileupload.ts +1 -1
- package/src/models/operations/generateconversationname.ts +1 -1
- package/src/models/operations/getallmemories.ts +1 -1
- package/src/models/operations/getallmemorydocuments.ts +1 -1
- package/src/models/operations/getallmemorystores.ts +1 -1
- package/src/models/operations/getallprompts.ts +2 -1
- package/src/models/operations/getalltools.ts +6 -6
- package/src/models/operations/getevals.ts +15 -15
- package/src/models/operations/getoneprompt.ts +1 -0
- package/src/models/operations/getpromptversion.ts +1 -0
- package/src/models/operations/getv2evaluatorsidversions.ts +1 -1
- package/src/models/operations/getv2toolstoolidversions.ts +1 -1
- package/src/models/operations/invokeeval.ts +34 -1
- package/src/models/operations/listagents.ts +6 -0
- package/src/models/operations/listchunks.ts +1 -1
- package/src/models/operations/listdatasetdatapoints.ts +5 -5
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/listdatasources.ts +1 -1
- package/src/models/operations/listidentities.ts +2 -2
- package/src/models/operations/listknowledgebases.ts +1 -1
- package/src/models/operations/listpromptversions.ts +2 -1
- package/src/models/operations/retrieveagentrequest.ts +6 -0
- package/src/models/operations/retrievedatapoint.ts +4 -4
- package/src/models/operations/retrievedataset.ts +1 -1
- package/src/models/operations/retrievedatasource.ts +1 -1
- package/src/models/operations/retrieveidentity.ts +1 -1
- package/src/models/operations/retrievetool.ts +6 -6
- package/src/models/operations/runagent.ts +8 -1
- package/src/models/operations/searchknowledge.ts +2 -2
- package/src/models/operations/streamrunagent.ts +8 -1
- package/src/models/operations/updateagent.ts +64 -1
- package/src/models/operations/updateconversation.ts +1 -1
- package/src/models/operations/updatedatapoint.ts +4 -4
- package/src/models/operations/updatedataset.ts +1 -1
- package/src/models/operations/updatedatasource.ts +1 -1
- package/src/models/operations/updateeval.ts +14 -14
- package/src/models/operations/updateidentity.ts +1 -1
- package/src/models/operations/updatememorydocument.ts +3 -3
- package/src/models/operations/updatememorystore.ts +1 -0
- package/src/models/operations/updateprompt.ts +1 -0
- package/src/models/operations/updatetool.ts +7 -7
|
@@ -339,7 +339,7 @@ function updateToolRequestBodyToolsSchemaToJSON(updateToolRequestBodyToolsSchema
|
|
|
339
339
|
}
|
|
340
340
|
/** @internal */
|
|
341
341
|
exports.RequestBodyTools$outboundSchema = z.object({
|
|
342
|
-
id: z.string().default("
|
|
342
|
+
id: z.string().default("01KHJN2DD7DMB5D33ZD2FAB1J7"),
|
|
343
343
|
name: z.string(),
|
|
344
344
|
description: z.string().optional(),
|
|
345
345
|
schema: z.lazy(() => exports.UpdateToolRequestBodyToolsSchema$outboundSchema),
|
|
@@ -612,7 +612,7 @@ function updateToolResponseBodyCodeToolFromJSON(jsonString) {
|
|
|
612
612
|
}
|
|
613
613
|
/** @internal */
|
|
614
614
|
exports.UpdateToolResponseBodyCodeExecutionTool$inboundSchema = z.object({
|
|
615
|
-
_id: z.string().default("
|
|
615
|
+
_id: z.string().default("tool_01KHJN2DD024ZW8350S8CA2438"),
|
|
616
616
|
path: z.string(),
|
|
617
617
|
key: z.string(),
|
|
618
618
|
display_name: z.string().optional(),
|
|
@@ -667,7 +667,7 @@ function updateToolResponseBodyToolsSchemaFromJSON(jsonString) {
|
|
|
667
667
|
}
|
|
668
668
|
/** @internal */
|
|
669
669
|
exports.UpdateToolResponseBodyTools$inboundSchema = z.object({
|
|
670
|
-
id: z.string().default("
|
|
670
|
+
id: z.string().default("01KHJN2DCZTBNJ52RNFDEAVAMY"),
|
|
671
671
|
name: z.string(),
|
|
672
672
|
description: z.string().optional(),
|
|
673
673
|
schema: z.lazy(() => exports.UpdateToolResponseBodyToolsSchema$inboundSchema),
|
|
@@ -695,7 +695,7 @@ function updateToolResponseBodyMcpFromJSON(jsonString) {
|
|
|
695
695
|
}
|
|
696
696
|
/** @internal */
|
|
697
697
|
exports.UpdateToolResponseBodyMCPTool$inboundSchema = z.object({
|
|
698
|
-
_id: z.string().default("
|
|
698
|
+
_id: z.string().default("tool_01KHJN2DCYCH74AYGW2ZMAZX59"),
|
|
699
699
|
path: z.string(),
|
|
700
700
|
key: z.string(),
|
|
701
701
|
display_name: z.string().optional(),
|
|
@@ -784,7 +784,7 @@ function updateToolResponseBodyHttpFromJSON(jsonString) {
|
|
|
784
784
|
}
|
|
785
785
|
/** @internal */
|
|
786
786
|
exports.UpdateToolResponseBodyHTTPTool$inboundSchema = z.object({
|
|
787
|
-
_id: z.string().default("
|
|
787
|
+
_id: z.string().default("tool_01KHJN2DCW9JQMV01QYC14RJXG"),
|
|
788
788
|
path: z.string(),
|
|
789
789
|
key: z.string(),
|
|
790
790
|
display_name: z.string().optional(),
|
|
@@ -836,7 +836,7 @@ function updateToolResponseBodyJsonSchemaFromJSON(jsonString) {
|
|
|
836
836
|
}
|
|
837
837
|
/** @internal */
|
|
838
838
|
exports.UpdateToolResponseBodyJSONSchemaTool$inboundSchema = z.object({
|
|
839
|
-
_id: z.string().default("
|
|
839
|
+
_id: z.string().default("tool_01KHJN2DCV9YP7R4FWX69QNV02"),
|
|
840
840
|
path: z.string(),
|
|
841
841
|
key: z.string(),
|
|
842
842
|
display_name: z.string().optional(),
|
|
@@ -892,7 +892,7 @@ function updateToolResponseBodyFunctionFromJSON(jsonString) {
|
|
|
892
892
|
}
|
|
893
893
|
/** @internal */
|
|
894
894
|
exports.UpdateToolResponseBodyFunctionTool$inboundSchema = z.object({
|
|
895
|
-
_id: z.string().default("
|
|
895
|
+
_id: z.string().default("tool_01KHJN2DCT636ZRG3KRN2GKJ50"),
|
|
896
896
|
path: z.string(),
|
|
897
897
|
key: z.string(),
|
|
898
898
|
display_name: z.string().optional(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orq-ai/node",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.1-rc.0",
|
|
4
4
|
"author": "Orq",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@eslint/js": "^9.
|
|
22
|
-
"eslint": "^9.
|
|
21
|
+
"@eslint/js": "^9.26.0",
|
|
22
|
+
"eslint": "^9.26.0",
|
|
23
23
|
"globals": "^15.14.0",
|
|
24
24
|
"typescript": "~5.8.3",
|
|
25
25
|
"typescript-eslint": "^8.26.0"
|
package/src/funcs/evalsInvoke.ts
CHANGED
|
@@ -37,6 +37,7 @@ export function evalsInvoke(
|
|
|
37
37
|
operations.InvokeEvalResponseBody,
|
|
38
38
|
| errors.InvokeEvalResponseBody
|
|
39
39
|
| errors.InvokeEvalEvalsResponseBody
|
|
40
|
+
| errors.InvokeEvalEvalsResponseResponseBody
|
|
40
41
|
| OrqError
|
|
41
42
|
| ResponseValidationError
|
|
42
43
|
| ConnectionError
|
|
@@ -64,6 +65,7 @@ async function $do(
|
|
|
64
65
|
operations.InvokeEvalResponseBody,
|
|
65
66
|
| errors.InvokeEvalResponseBody
|
|
66
67
|
| errors.InvokeEvalEvalsResponseBody
|
|
68
|
+
| errors.InvokeEvalEvalsResponseResponseBody
|
|
67
69
|
| OrqError
|
|
68
70
|
| ResponseValidationError
|
|
69
71
|
| ConnectionError
|
|
@@ -137,7 +139,7 @@ async function $do(
|
|
|
137
139
|
|
|
138
140
|
const doResult = await client._do(req, {
|
|
139
141
|
context,
|
|
140
|
-
errorCodes: ["404", "4XX", "500", "5XX"],
|
|
142
|
+
errorCodes: ["400", "404", "4XX", "500", "5XX"],
|
|
141
143
|
retryConfig: context.retryConfig,
|
|
142
144
|
retryCodes: context.retryCodes,
|
|
143
145
|
});
|
|
@@ -154,6 +156,7 @@ async function $do(
|
|
|
154
156
|
operations.InvokeEvalResponseBody,
|
|
155
157
|
| errors.InvokeEvalResponseBody
|
|
156
158
|
| errors.InvokeEvalEvalsResponseBody
|
|
159
|
+
| errors.InvokeEvalEvalsResponseResponseBody
|
|
157
160
|
| OrqError
|
|
158
161
|
| ResponseValidationError
|
|
159
162
|
| ConnectionError
|
|
@@ -164,8 +167,9 @@ async function $do(
|
|
|
164
167
|
| SDKValidationError
|
|
165
168
|
>(
|
|
166
169
|
M.json(200, operations.InvokeEvalResponseBody$inboundSchema),
|
|
167
|
-
M.jsonErr(
|
|
168
|
-
M.jsonErr(
|
|
170
|
+
M.jsonErr(400, errors.InvokeEvalResponseBody$inboundSchema),
|
|
171
|
+
M.jsonErr(404, errors.InvokeEvalEvalsResponseBody$inboundSchema),
|
|
172
|
+
M.jsonErr(500, errors.InvokeEvalEvalsResponseResponseBody$inboundSchema),
|
|
169
173
|
M.fail("4XX"),
|
|
170
174
|
M.fail("5XX"),
|
|
171
175
|
)(response, req, { extraFields: responseFields });
|
package/src/lib/config.ts
CHANGED
|
@@ -68,7 +68,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
68
68
|
export const SDK_METADATA = {
|
|
69
69
|
language: "typescript",
|
|
70
70
|
openapiDocVersion: "2.0",
|
|
71
|
-
sdkVersion: "4.3.
|
|
72
|
-
genVersion: "2.
|
|
73
|
-
userAgent: "speakeasy-sdk/typescript 4.3.
|
|
71
|
+
sdkVersion: "4.3.1-rc.0",
|
|
72
|
+
genVersion: "2.824.1",
|
|
73
|
+
userAgent: "speakeasy-sdk/typescript 4.3.1-rc.0 2.824.1 2.0 @orq-ai/node",
|
|
74
74
|
} as const;
|
package/src/lib/event-streams.ts
CHANGED
|
@@ -17,6 +17,7 @@ export class EventStream<T extends SseMessage<unknown>>
|
|
|
17
17
|
) {
|
|
18
18
|
const upstream = responseBody.getReader();
|
|
19
19
|
let buffer: Uint8Array = new Uint8Array();
|
|
20
|
+
const state = { eventId: undefined as string | undefined };
|
|
20
21
|
super({
|
|
21
22
|
async pull(downstream) {
|
|
22
23
|
try {
|
|
@@ -30,7 +31,7 @@ export class EventStream<T extends SseMessage<unknown>>
|
|
|
30
31
|
}
|
|
31
32
|
const message = buffer.slice(0, match.index);
|
|
32
33
|
buffer = buffer.slice(match.index + match.length);
|
|
33
|
-
const item = parseMessage(message, parse);
|
|
34
|
+
const item = parseMessage(message, parse, state);
|
|
34
35
|
if (item && !item.done) return downstream.enqueue(item.value);
|
|
35
36
|
if (item?.done) {
|
|
36
37
|
await upstream.cancel("done");
|
|
@@ -84,24 +85,35 @@ function concatBuffer(a: Uint8Array, b: Uint8Array): Uint8Array {
|
|
|
84
85
|
return c;
|
|
85
86
|
}
|
|
86
87
|
|
|
87
|
-
|
|
88
|
+
const CR = 13;
|
|
89
|
+
const LF = 10;
|
|
90
|
+
const BOUNDARIES = [
|
|
91
|
+
[CR, LF, CR, LF], // \r\n\r\n
|
|
92
|
+
[CR, LF, CR], // \r\n\r
|
|
93
|
+
[CR, LF, LF], // \r\n\n
|
|
94
|
+
[CR, CR, LF], // \r\r\n
|
|
95
|
+
[LF, CR, LF], // \n\r\n
|
|
96
|
+
[CR, CR], // \r\r
|
|
97
|
+
[LF, CR], // \n\r
|
|
98
|
+
[LF, LF], // \n\n
|
|
99
|
+
];
|
|
100
|
+
|
|
88
101
|
function findBoundary(
|
|
89
102
|
buf: Uint8Array,
|
|
90
103
|
): { index: number; length: number } | null {
|
|
91
104
|
const len = buf.length;
|
|
92
105
|
for (let i = 0; i < len; i++) {
|
|
93
|
-
if (
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
return { index: i, length: 2 };
|
|
106
|
+
if (buf[i] !== CR && buf[i] !== LF) continue;
|
|
107
|
+
for (const boundary of BOUNDARIES) {
|
|
108
|
+
if (i + boundary.length > len) continue;
|
|
109
|
+
let match = true;
|
|
110
|
+
for (let j = 0; j < boundary.length; j++) {
|
|
111
|
+
if (buf[i + j] !== boundary[j]) {
|
|
112
|
+
match = false;
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
if (match) return { index: i, length: boundary.length };
|
|
105
117
|
}
|
|
106
118
|
}
|
|
107
119
|
return null;
|
|
@@ -109,6 +121,7 @@ function findBoundary(
|
|
|
109
121
|
function parseMessage<T extends SseMessage<unknown>>(
|
|
110
122
|
chunk: Uint8Array,
|
|
111
123
|
parse: (x: SseMessage<string>) => IteratorResult<T, undefined>,
|
|
124
|
+
state: { eventId: string | undefined },
|
|
112
125
|
) {
|
|
113
126
|
const text = new TextDecoder().decode(chunk);
|
|
114
127
|
const lines = text.split(/\r\n|\r|\n/);
|
|
@@ -119,17 +132,21 @@ function parseMessage<T extends SseMessage<unknown>>(
|
|
|
119
132
|
if (!line || line.startsWith(":")) continue;
|
|
120
133
|
ignore = false;
|
|
121
134
|
const i = line.indexOf(":");
|
|
122
|
-
|
|
123
|
-
|
|
135
|
+
let field = line;
|
|
136
|
+
let value = "";
|
|
137
|
+
if (i > 0) {
|
|
138
|
+
field = line.slice(0, i);
|
|
139
|
+
value = line[i + 1] === " " ? line.slice(i + 2) : line.slice(i + 1);
|
|
140
|
+
}
|
|
124
141
|
if (field === "data") dataLines.push(value);
|
|
125
142
|
else if (field === "event") ret.event = value;
|
|
126
|
-
else if (field === "id")
|
|
127
|
-
else if (field === "retry") {
|
|
128
|
-
|
|
129
|
-
if (!isNaN(n)) ret.retry = n;
|
|
143
|
+
else if (field === "id" && !value.includes("\0")) state.eventId = value;
|
|
144
|
+
else if (field === "retry" && /^\d+$/.test(value)) {
|
|
145
|
+
ret.retry = Number(value);
|
|
130
146
|
}
|
|
131
147
|
}
|
|
132
148
|
if (ignore) return;
|
|
149
|
+
ret.id = state.eventId;
|
|
133
150
|
if (dataLines.length) ret.data = dataLines.join("\n");
|
|
134
151
|
return parse(ret);
|
|
135
152
|
}
|
|
@@ -174,6 +174,10 @@ export type Settings = {
|
|
|
174
174
|
* Maximum time (in seconds) for the agent thinking process. This does not include the time for tool calls and sub agent calls. It will be loosely enforced, the in progress LLM calls will not be terminated and the last assistant message will be returned.
|
|
175
175
|
*/
|
|
176
176
|
maxExecutionTime: number;
|
|
177
|
+
/**
|
|
178
|
+
* Maximum cost in USD for the agent execution. When the accumulated cost exceeds this limit, the agent will stop executing. Set to 0 for unlimited. Only supported in v3 responses
|
|
179
|
+
*/
|
|
180
|
+
maxCost: number;
|
|
177
181
|
/**
|
|
178
182
|
* If all, the agent will require approval for all tools. If respect_tool, the agent will require approval for tools that have the requires_approval flag set to true. If none, the agent will not require approval for any tools.
|
|
179
183
|
*/
|
|
@@ -199,6 +203,7 @@ export type AgentStartedStreamingEventData = {
|
|
|
199
203
|
settings?: Settings | undefined;
|
|
200
204
|
agentManifestId: string;
|
|
201
205
|
agentKey: string;
|
|
206
|
+
agentDescription?: string | null | undefined;
|
|
202
207
|
variables?: { [k: string]: any } | undefined;
|
|
203
208
|
toolExecutionId?: string | undefined;
|
|
204
209
|
isContinuation?: boolean | undefined;
|
|
@@ -407,6 +412,7 @@ export const Settings$inboundSchema: z.ZodType<
|
|
|
407
412
|
> = z.object({
|
|
408
413
|
max_iterations: z.number().int().default(100),
|
|
409
414
|
max_execution_time: z.number().int().default(600),
|
|
415
|
+
max_cost: z.number().default(0),
|
|
410
416
|
tool_approval_required: ToolApprovalRequired$inboundSchema.default(
|
|
411
417
|
"respect_tool",
|
|
412
418
|
),
|
|
@@ -417,6 +423,7 @@ export const Settings$inboundSchema: z.ZodType<
|
|
|
417
423
|
return remap$(v, {
|
|
418
424
|
"max_iterations": "maxIterations",
|
|
419
425
|
"max_execution_time": "maxExecutionTime",
|
|
426
|
+
"max_cost": "maxCost",
|
|
420
427
|
"tool_approval_required": "toolApprovalRequired",
|
|
421
428
|
});
|
|
422
429
|
});
|
|
@@ -446,6 +453,7 @@ export const AgentStartedStreamingEventData$inboundSchema: z.ZodType<
|
|
|
446
453
|
settings: z.lazy(() => Settings$inboundSchema).optional(),
|
|
447
454
|
agent_manifest_id: z.string(),
|
|
448
455
|
agent_key: z.string(),
|
|
456
|
+
agent_description: z.nullable(z.string()).optional(),
|
|
449
457
|
variables: z.record(z.any()).optional(),
|
|
450
458
|
tool_execution_id: z.string().optional(),
|
|
451
459
|
is_continuation: z.boolean().optional(),
|
|
@@ -457,6 +465,7 @@ export const AgentStartedStreamingEventData$inboundSchema: z.ZodType<
|
|
|
457
465
|
"system_prompt": "systemPrompt",
|
|
458
466
|
"agent_manifest_id": "agentManifestId",
|
|
459
467
|
"agent_key": "agentKey",
|
|
468
|
+
"agent_description": "agentDescription",
|
|
460
469
|
"tool_execution_id": "toolExecutionId",
|
|
461
470
|
"is_continuation": "isContinuation",
|
|
462
471
|
});
|
|
@@ -107,7 +107,7 @@ export const ConversationResponse$inboundSchema: z.ZodType<
|
|
|
107
107
|
z.ZodTypeDef,
|
|
108
108
|
unknown
|
|
109
109
|
> = z.object({
|
|
110
|
-
_id: z.string().default("
|
|
110
|
+
_id: z.string().default("conv_01khjn2d0y4paarqczgydn5pdq"),
|
|
111
111
|
kind: ConversationResponseKind$inboundSchema,
|
|
112
112
|
displayName: z.string(),
|
|
113
113
|
createdAt: z.number(),
|
|
@@ -122,7 +122,7 @@ export const ConversationWithMessagesResponse$inboundSchema: z.ZodType<
|
|
|
122
122
|
z.ZodTypeDef,
|
|
123
123
|
unknown
|
|
124
124
|
> = z.object({
|
|
125
|
-
_id: z.string().default("
|
|
125
|
+
_id: z.string().default("conv_01khjn2d14j98269rrkv9q1ffm"),
|
|
126
126
|
kind: ConversationWithMessagesResponseKind$inboundSchema,
|
|
127
127
|
displayName: z.string(),
|
|
128
128
|
createdAt: z.number(),
|
|
@@ -76,7 +76,7 @@ export const PartReasoningPart$inboundSchema: z.ZodType<
|
|
|
76
76
|
z.ZodTypeDef,
|
|
77
77
|
unknown
|
|
78
78
|
> = z.object({
|
|
79
|
-
_id: z.string().default("
|
|
79
|
+
_id: z.string().default("reasoning_01khjn2cpn2zq29ss7v9vsxhsm"),
|
|
80
80
|
metadata: z.record(z.any()).optional(),
|
|
81
81
|
kind: PartKind$inboundSchema,
|
|
82
82
|
reasoning: z.string(),
|
|
@@ -40,7 +40,7 @@ export const ReasoningPart$inboundSchema: z.ZodType<
|
|
|
40
40
|
z.ZodTypeDef,
|
|
41
41
|
unknown
|
|
42
42
|
> = z.object({
|
|
43
|
-
_id: z.string().default("
|
|
43
|
+
_id: z.string().default("reasoning_01khjn2cpfpbn5sh26wwndgnzw"),
|
|
44
44
|
metadata: z.record(z.any()).optional(),
|
|
45
45
|
kind: z.literal("reasoning"),
|
|
46
46
|
reasoning: z.string(),
|
|
@@ -58,6 +58,7 @@ export type ToolExecutionStartedStreamingEventData = {
|
|
|
58
58
|
toolId: string;
|
|
59
59
|
toolKey?: string | undefined;
|
|
60
60
|
toolDisplayName?: string | undefined;
|
|
61
|
+
toolDescription?: string | null | undefined;
|
|
61
62
|
actionType: string;
|
|
62
63
|
toolArguments: { [k: string]: any };
|
|
63
64
|
toolExecutionContext: ToolExecutionContext;
|
|
@@ -146,6 +147,7 @@ export const ToolExecutionStartedStreamingEventData$inboundSchema: z.ZodType<
|
|
|
146
147
|
tool_id: z.string(),
|
|
147
148
|
tool_key: z.string().optional(),
|
|
148
149
|
tool_display_name: z.string().optional(),
|
|
150
|
+
tool_description: z.nullable(z.string()).optional(),
|
|
149
151
|
action_type: z.string(),
|
|
150
152
|
tool_arguments: z.record(z.any()),
|
|
151
153
|
tool_execution_context: z.lazy(() => ToolExecutionContext$inboundSchema),
|
|
@@ -157,6 +159,7 @@ export const ToolExecutionStartedStreamingEventData$inboundSchema: z.ZodType<
|
|
|
157
159
|
"tool_id": "toolId",
|
|
158
160
|
"tool_key": "toolKey",
|
|
159
161
|
"tool_display_name": "toolDisplayName",
|
|
162
|
+
"tool_description": "toolDescription",
|
|
160
163
|
"action_type": "actionType",
|
|
161
164
|
"tool_arguments": "toolArguments",
|
|
162
165
|
"tool_execution_context": "toolExecutionContext",
|
|
@@ -8,13 +8,39 @@ import { OrqError } from "./orqerror.js";
|
|
|
8
8
|
/**
|
|
9
9
|
* Error running the evaluator
|
|
10
10
|
*/
|
|
11
|
-
export type
|
|
11
|
+
export type InvokeEvalEvalsResponseResponseBodyData = {
|
|
12
12
|
message: string;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Error running the evaluator
|
|
17
17
|
*/
|
|
18
|
+
export class InvokeEvalEvalsResponseResponseBody extends OrqError {
|
|
19
|
+
/** The original data that was passed to this error instance. */
|
|
20
|
+
data$: InvokeEvalEvalsResponseResponseBodyData;
|
|
21
|
+
|
|
22
|
+
constructor(
|
|
23
|
+
err: InvokeEvalEvalsResponseResponseBodyData,
|
|
24
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
25
|
+
) {
|
|
26
|
+
const message = err.message || `API error occurred: ${JSON.stringify(err)}`;
|
|
27
|
+
super(message, httpMeta);
|
|
28
|
+
this.data$ = err;
|
|
29
|
+
|
|
30
|
+
this.name = "InvokeEvalEvalsResponseResponseBody";
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Workspace ID is not found on the request
|
|
36
|
+
*/
|
|
37
|
+
export type InvokeEvalEvalsResponseBodyData = {
|
|
38
|
+
message: string;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Workspace ID is not found on the request
|
|
43
|
+
*/
|
|
18
44
|
export class InvokeEvalEvalsResponseBody extends OrqError {
|
|
19
45
|
/** The original data that was passed to this error instance. */
|
|
20
46
|
data$: InvokeEvalEvalsResponseBodyData;
|
|
@@ -32,14 +58,14 @@ export class InvokeEvalEvalsResponseBody extends OrqError {
|
|
|
32
58
|
}
|
|
33
59
|
|
|
34
60
|
/**
|
|
35
|
-
*
|
|
61
|
+
* Bad request
|
|
36
62
|
*/
|
|
37
63
|
export type InvokeEvalResponseBodyData = {
|
|
38
64
|
message: string;
|
|
39
65
|
};
|
|
40
66
|
|
|
41
67
|
/**
|
|
42
|
-
*
|
|
68
|
+
* Bad request
|
|
43
69
|
*/
|
|
44
70
|
export class InvokeEvalResponseBody extends OrqError {
|
|
45
71
|
/** The original data that was passed to this error instance. */
|
|
@@ -57,6 +83,25 @@ export class InvokeEvalResponseBody extends OrqError {
|
|
|
57
83
|
}
|
|
58
84
|
}
|
|
59
85
|
|
|
86
|
+
/** @internal */
|
|
87
|
+
export const InvokeEvalEvalsResponseResponseBody$inboundSchema: z.ZodType<
|
|
88
|
+
InvokeEvalEvalsResponseResponseBody,
|
|
89
|
+
z.ZodTypeDef,
|
|
90
|
+
unknown
|
|
91
|
+
> = z.object({
|
|
92
|
+
message: z.string(),
|
|
93
|
+
request$: z.instanceof(Request),
|
|
94
|
+
response$: z.instanceof(Response),
|
|
95
|
+
body$: z.string(),
|
|
96
|
+
})
|
|
97
|
+
.transform((v) => {
|
|
98
|
+
return new InvokeEvalEvalsResponseResponseBody(v, {
|
|
99
|
+
request: v.request$,
|
|
100
|
+
response: v.response$,
|
|
101
|
+
body: v.body$,
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
|
|
60
105
|
/** @internal */
|
|
61
106
|
export const InvokeEvalEvalsResponseBody$inboundSchema: z.ZodType<
|
|
62
107
|
InvokeEvalEvalsResponseBody,
|
|
@@ -996,6 +996,20 @@ export const ToolApprovalRequired = {
|
|
|
996
996
|
*/
|
|
997
997
|
export type ToolApprovalRequired = ClosedEnum<typeof ToolApprovalRequired>;
|
|
998
998
|
|
|
999
|
+
/**
|
|
1000
|
+
* Provider-specific built-in tools that are passed through to the provider. Must be prefixed with the provider name (e.g., openai:web_search, anthropic:web_search_20250305, google:google_search).
|
|
1001
|
+
*/
|
|
1002
|
+
export type ProviderBuiltInTool = {
|
|
1003
|
+
/**
|
|
1004
|
+
* Provider-prefixed tool type
|
|
1005
|
+
*/
|
|
1006
|
+
type: string;
|
|
1007
|
+
/**
|
|
1008
|
+
* Whether this tool requires approval before execution
|
|
1009
|
+
*/
|
|
1010
|
+
requiresApproval?: boolean | undefined;
|
|
1011
|
+
};
|
|
1012
|
+
|
|
999
1013
|
/**
|
|
1000
1014
|
* MCP tool type
|
|
1001
1015
|
*/
|
|
@@ -1412,7 +1426,7 @@ export type GoogleSearchTool = {
|
|
|
1412
1426
|
};
|
|
1413
1427
|
|
|
1414
1428
|
/**
|
|
1415
|
-
* Tool configuration for agent create/update operations. Built-in tools only require a type, while custom tools (HTTP, Code, Function, JSON Schema, MCP) must reference pre-created tools by key or id.
|
|
1429
|
+
* Tool configuration for agent create/update operations. Built-in tools only require a type, while custom tools (HTTP, Code, Function, JSON Schema, MCP) must reference pre-created tools by key or id. Provider-prefixed tools (e.g., openai:web_search) are passed through to the provider.
|
|
1416
1430
|
*/
|
|
1417
1431
|
export type AgentToolInputCRUD =
|
|
1418
1432
|
| GoogleSearchTool
|
|
@@ -1427,6 +1441,7 @@ export type AgentToolInputCRUD =
|
|
|
1427
1441
|
| QueryKnowledgeBaseTool
|
|
1428
1442
|
| CurrentDateTool
|
|
1429
1443
|
| MCPTool
|
|
1444
|
+
| ProviderBuiltInTool
|
|
1430
1445
|
| HTTPTool
|
|
1431
1446
|
| CodeExecutionTool
|
|
1432
1447
|
| FunctionTool
|
|
@@ -1502,6 +1517,10 @@ export type Settings = {
|
|
|
1502
1517
|
* Maximum time (in seconds) for the agent thinking process. This does not include the time for tool calls and sub agent calls. It will be loosely enforced, the in progress LLM calls will not be terminated and the last assistant message will be returned.
|
|
1503
1518
|
*/
|
|
1504
1519
|
maxExecutionTime?: number | undefined;
|
|
1520
|
+
/**
|
|
1521
|
+
* Maximum cost in USD for the agent execution. When the accumulated cost exceeds this limit, the agent will stop executing. Set to 0 for unlimited. Only supported in v3 responses
|
|
1522
|
+
*/
|
|
1523
|
+
maxCost?: number | undefined;
|
|
1505
1524
|
/**
|
|
1506
1525
|
* If all, the agent will require approval for all tools. If respect_tool, the agent will require approval for tools that have the requires_approval flag set to true. If none, the agent will not require approval for any tools.
|
|
1507
1526
|
*/
|
|
@@ -1523,6 +1542,7 @@ export type Settings = {
|
|
|
1523
1542
|
| QueryKnowledgeBaseTool
|
|
1524
1543
|
| CurrentDateTool
|
|
1525
1544
|
| MCPTool
|
|
1545
|
+
| ProviderBuiltInTool
|
|
1526
1546
|
| HTTPTool
|
|
1527
1547
|
| CodeExecutionTool
|
|
1528
1548
|
| FunctionTool
|
|
@@ -1765,6 +1785,10 @@ export type CreateAgentRequestSettings = {
|
|
|
1765
1785
|
* Maximum time (in seconds) for the agent thinking process. This does not include the time for tool calls and sub agent calls. It will be loosely enforced, the in progress LLM calls will not be terminated and the last assistant message will be returned.
|
|
1766
1786
|
*/
|
|
1767
1787
|
maxExecutionTime: number;
|
|
1788
|
+
/**
|
|
1789
|
+
* Maximum cost in USD for the agent execution. When the accumulated cost exceeds this limit, the agent will stop executing. Set to 0 for unlimited. Only supported in v3 responses
|
|
1790
|
+
*/
|
|
1791
|
+
maxCost: number;
|
|
1768
1792
|
/**
|
|
1769
1793
|
* If all, the agent will require approval for all tools. If respect_tool, the agent will require approval for tools that have the requires_approval flag set to true. If none, the agent will not require approval for any tools.
|
|
1770
1794
|
*/
|
|
@@ -4357,6 +4381,34 @@ export const ToolApprovalRequired$outboundSchema: z.ZodNativeEnum<
|
|
|
4357
4381
|
typeof ToolApprovalRequired
|
|
4358
4382
|
> = z.nativeEnum(ToolApprovalRequired);
|
|
4359
4383
|
|
|
4384
|
+
/** @internal */
|
|
4385
|
+
export type ProviderBuiltInTool$Outbound = {
|
|
4386
|
+
type: string;
|
|
4387
|
+
requires_approval?: boolean | undefined;
|
|
4388
|
+
};
|
|
4389
|
+
|
|
4390
|
+
/** @internal */
|
|
4391
|
+
export const ProviderBuiltInTool$outboundSchema: z.ZodType<
|
|
4392
|
+
ProviderBuiltInTool$Outbound,
|
|
4393
|
+
z.ZodTypeDef,
|
|
4394
|
+
ProviderBuiltInTool
|
|
4395
|
+
> = z.object({
|
|
4396
|
+
type: z.string(),
|
|
4397
|
+
requiresApproval: z.boolean().optional(),
|
|
4398
|
+
}).transform((v) => {
|
|
4399
|
+
return remap$(v, {
|
|
4400
|
+
requiresApproval: "requires_approval",
|
|
4401
|
+
});
|
|
4402
|
+
});
|
|
4403
|
+
|
|
4404
|
+
export function providerBuiltInToolToJSON(
|
|
4405
|
+
providerBuiltInTool: ProviderBuiltInTool,
|
|
4406
|
+
): string {
|
|
4407
|
+
return JSON.stringify(
|
|
4408
|
+
ProviderBuiltInTool$outboundSchema.parse(providerBuiltInTool),
|
|
4409
|
+
);
|
|
4410
|
+
}
|
|
4411
|
+
|
|
4360
4412
|
/** @internal */
|
|
4361
4413
|
export const CreateAgentRequestAgentToolInputCRUDAgentsRequestRequestBodySettingsTools16Type$outboundSchema:
|
|
4362
4414
|
z.ZodNativeEnum<
|
|
@@ -4954,6 +5006,7 @@ export type AgentToolInputCRUD$Outbound =
|
|
|
4954
5006
|
| QueryKnowledgeBaseTool$Outbound
|
|
4955
5007
|
| CurrentDateTool$Outbound
|
|
4956
5008
|
| MCPTool$Outbound
|
|
5009
|
+
| ProviderBuiltInTool$Outbound
|
|
4957
5010
|
| HTTPTool$Outbound
|
|
4958
5011
|
| CodeExecutionTool$Outbound
|
|
4959
5012
|
| FunctionTool$Outbound
|
|
@@ -4977,6 +5030,7 @@ export const AgentToolInputCRUD$outboundSchema: z.ZodType<
|
|
|
4977
5030
|
z.lazy(() => QueryKnowledgeBaseTool$outboundSchema),
|
|
4978
5031
|
z.lazy(() => CurrentDateTool$outboundSchema),
|
|
4979
5032
|
z.lazy(() => MCPTool$outboundSchema),
|
|
5033
|
+
z.lazy(() => ProviderBuiltInTool$outboundSchema),
|
|
4980
5034
|
z.lazy(() => HTTPTool$outboundSchema),
|
|
4981
5035
|
z.lazy(() => CodeExecutionTool$outboundSchema),
|
|
4982
5036
|
z.lazy(() => FunctionTool$outboundSchema),
|
|
@@ -5065,6 +5119,7 @@ export function createAgentRequestGuardrailsToJSON(
|
|
|
5065
5119
|
export type Settings$Outbound = {
|
|
5066
5120
|
max_iterations: number;
|
|
5067
5121
|
max_execution_time: number;
|
|
5122
|
+
max_cost: number;
|
|
5068
5123
|
tool_approval_required: string;
|
|
5069
5124
|
tools?:
|
|
5070
5125
|
| Array<
|
|
@@ -5080,6 +5135,7 @@ export type Settings$Outbound = {
|
|
|
5080
5135
|
| QueryKnowledgeBaseTool$Outbound
|
|
5081
5136
|
| CurrentDateTool$Outbound
|
|
5082
5137
|
| MCPTool$Outbound
|
|
5138
|
+
| ProviderBuiltInTool$Outbound
|
|
5083
5139
|
| HTTPTool$Outbound
|
|
5084
5140
|
| CodeExecutionTool$Outbound
|
|
5085
5141
|
| FunctionTool$Outbound
|
|
@@ -5098,6 +5154,7 @@ export const Settings$outboundSchema: z.ZodType<
|
|
|
5098
5154
|
> = z.object({
|
|
5099
5155
|
maxIterations: z.number().int().default(100),
|
|
5100
5156
|
maxExecutionTime: z.number().int().default(600),
|
|
5157
|
+
maxCost: z.number().default(0),
|
|
5101
5158
|
toolApprovalRequired: ToolApprovalRequired$outboundSchema.default(
|
|
5102
5159
|
"respect_tool",
|
|
5103
5160
|
),
|
|
@@ -5115,6 +5172,7 @@ export const Settings$outboundSchema: z.ZodType<
|
|
|
5115
5172
|
z.lazy(() => QueryKnowledgeBaseTool$outboundSchema),
|
|
5116
5173
|
z.lazy(() => CurrentDateTool$outboundSchema),
|
|
5117
5174
|
z.lazy(() => MCPTool$outboundSchema),
|
|
5175
|
+
z.lazy(() => ProviderBuiltInTool$outboundSchema),
|
|
5118
5176
|
z.lazy(() => HTTPTool$outboundSchema),
|
|
5119
5177
|
z.lazy(() => CodeExecutionTool$outboundSchema),
|
|
5120
5178
|
z.lazy(() => FunctionTool$outboundSchema),
|
|
@@ -5128,6 +5186,7 @@ export const Settings$outboundSchema: z.ZodType<
|
|
|
5128
5186
|
return remap$(v, {
|
|
5129
5187
|
maxIterations: "max_iterations",
|
|
5130
5188
|
maxExecutionTime: "max_execution_time",
|
|
5189
|
+
maxCost: "max_cost",
|
|
5131
5190
|
toolApprovalRequired: "tool_approval_required",
|
|
5132
5191
|
});
|
|
5133
5192
|
});
|
|
@@ -5391,6 +5450,7 @@ export const CreateAgentRequestSettings$inboundSchema: z.ZodType<
|
|
|
5391
5450
|
> = z.object({
|
|
5392
5451
|
max_iterations: z.number().int().default(100),
|
|
5393
5452
|
max_execution_time: z.number().int().default(600),
|
|
5453
|
+
max_cost: z.number().default(0),
|
|
5394
5454
|
tool_approval_required: CreateAgentRequestToolApprovalRequired$inboundSchema
|
|
5395
5455
|
.default("respect_tool"),
|
|
5396
5456
|
tools: z.array(z.lazy(() => CreateAgentRequestTools$inboundSchema))
|
|
@@ -5404,6 +5464,7 @@ export const CreateAgentRequestSettings$inboundSchema: z.ZodType<
|
|
|
5404
5464
|
return remap$(v, {
|
|
5405
5465
|
"max_iterations": "maxIterations",
|
|
5406
5466
|
"max_execution_time": "maxExecutionTime",
|
|
5467
|
+
"max_cost": "maxCost",
|
|
5407
5468
|
"tool_approval_required": "toolApprovalRequired",
|
|
5408
5469
|
});
|
|
5409
5470
|
});
|
|
@@ -1179,7 +1179,7 @@ export type CreateChatCompletionFilterBy1 =
|
|
|
1179
1179
|
| CreateChatCompletion1Exists;
|
|
1180
1180
|
|
|
1181
1181
|
/**
|
|
1182
|
-
* The metadata filter to apply to the search. Check the [Searching a Knowledge Base](https://
|
|
1182
|
+
* The metadata filter to apply to the search. Check the [Searching a Knowledge Base](https://docs.orq.ai/docs/knowledge/api#knowledge-base-search) for more information.
|
|
1183
1183
|
*/
|
|
1184
1184
|
export type CreateChatCompletionFilterBy =
|
|
1185
1185
|
| CreateChatCompletionFilterByAnd
|
|
@@ -1257,7 +1257,7 @@ export type CreateChatCompletionKnowledgeBases = {
|
|
|
1257
1257
|
*/
|
|
1258
1258
|
searchType?: CreateChatCompletionSearchType | undefined;
|
|
1259
1259
|
/**
|
|
1260
|
-
* The metadata filter to apply to the search. Check the [Searching a Knowledge Base](https://
|
|
1260
|
+
* The metadata filter to apply to the search. Check the [Searching a Knowledge Base](https://docs.orq.ai/docs/knowledge/api#knowledge-base-search) for more information.
|
|
1261
1261
|
*/
|
|
1262
1262
|
filterBy?:
|
|
1263
1263
|
| CreateChatCompletionFilterByAnd
|
|
@@ -486,7 +486,7 @@ export type CreateCompletionFilterBy1 =
|
|
|
486
486
|
| CreateCompletion1Exists;
|
|
487
487
|
|
|
488
488
|
/**
|
|
489
|
-
* The metadata filter to apply to the search. Check the [Searching a Knowledge Base](https://
|
|
489
|
+
* The metadata filter to apply to the search. Check the [Searching a Knowledge Base](https://docs.orq.ai/docs/knowledge/api#knowledge-base-search) for more information.
|
|
490
490
|
*/
|
|
491
491
|
export type CreateCompletionFilterBy =
|
|
492
492
|
| CreateCompletionFilterByAnd
|
|
@@ -564,7 +564,7 @@ export type CreateCompletionKnowledgeBases = {
|
|
|
564
564
|
*/
|
|
565
565
|
searchType?: CreateCompletionSearchType | undefined;
|
|
566
566
|
/**
|
|
567
|
-
* The metadata filter to apply to the search. Check the [Searching a Knowledge Base](https://
|
|
567
|
+
* The metadata filter to apply to the search. Check the [Searching a Knowledge Base](https://docs.orq.ai/docs/knowledge/api#knowledge-base-search) for more information.
|
|
568
568
|
*/
|
|
569
569
|
filterBy?: CreateCompletionFilterByAnd | CreateCompletionFilterByOr | {
|
|
570
570
|
[k: string]:
|
|
@@ -134,7 +134,7 @@ export const CreateContactResponseBody$inboundSchema: z.ZodType<
|
|
|
134
134
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
135
135
|
.optional(),
|
|
136
136
|
updated: z.string().datetime({ offset: true }).default(
|
|
137
|
-
"2026-
|
|
137
|
+
"2026-02-16T07:18:52.260Z",
|
|
138
138
|
).transform(v => new Date(v)),
|
|
139
139
|
}).transform((v) => {
|
|
140
140
|
return remap$(v, {
|
|
@@ -201,7 +201,7 @@ export const CreateConversationResponseBody$inboundSchema: z.ZodType<
|
|
|
201
201
|
z.ZodTypeDef,
|
|
202
202
|
unknown
|
|
203
203
|
> = z.object({
|
|
204
|
-
_id: z.string().default("
|
|
204
|
+
_id: z.string().default("conv_01khjn2d10644qayn4tn0d3ky9"),
|
|
205
205
|
kind: CreateConversationKind$inboundSchema,
|
|
206
206
|
displayName: z.string(),
|
|
207
207
|
createdAt: z.number(),
|