@orq-ai/node 4.1.10 → 4.1.12
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 +222 -222
- package/bin/mcp-server.js.map +40 -40
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/sdks.js +2 -2
- package/lib/sdks.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/models/components/conversationresponse.js +2 -2
- package/models/components/partdoneevent.js +2 -2
- package/models/components/reasoningpart.js +2 -2
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createconversation.js +2 -2
- package/models/operations/createdataset.js +2 -2
- package/models/operations/createdatasetitem.js +8 -8
- package/models/operations/createdatasource.js +2 -2
- package/models/operations/createeval.js +28 -28
- package/models/operations/createtool.js +12 -12
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/generateconversationname.js +2 -2
- package/models/operations/getalltools.js +12 -12
- package/models/operations/getevals.js +28 -28
- package/models/operations/listcontacts.js +2 -2
- package/models/operations/listdatasetdatapoints.js +8 -8
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/listdatasources.js +2 -2
- package/models/operations/retrievecontact.js +2 -2
- package/models/operations/retrieveconversation.js +2 -2
- package/models/operations/retrievedatapoint.js +8 -8
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/retrievedatasource.js +2 -2
- package/models/operations/retrievetool.js +12 -12
- package/models/operations/runagent.js +2 -2
- package/models/operations/streamrunagent.js +2 -2
- package/models/operations/updatecontact.js +2 -2
- package/models/operations/updateconversation.js +2 -2
- package/models/operations/updatedatapoint.js +8 -8
- package/models/operations/updatedataset.js +2 -2
- package/models/operations/updatedatasource.js +2 -2
- package/models/operations/updateeval.js +28 -28
- package/models/operations/updatetool.js +14 -14
- package/package.json +1 -1
- package/packages/orq-rc/examples/package-lock.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/funcs/agentsCreate.ts +2 -11
- package/packages/orq-rc/src/funcs/{evaluatorsGetV2EvaluatorsIdVersionsVersionId.ts → conversationsCreateConversationResponse.ts} +34 -38
- package/packages/orq-rc/src/funcs/conversationsList.ts +6 -1
- package/packages/orq-rc/src/funcs/conversationsRetrieve.ts +5 -4
- package/packages/orq-rc/src/funcs/memoryStoresCreateDocument.ts +6 -5
- package/packages/orq-rc/src/funcs/memoryStoresDeleteDocument.ts +6 -5
- package/packages/orq-rc/src/funcs/memoryStoresDeleteMemory.ts +6 -5
- package/packages/orq-rc/src/funcs/memoryStoresListDocuments.ts +6 -5
- package/packages/orq-rc/src/funcs/memoryStoresRetrieveDocument.ts +6 -5
- package/packages/orq-rc/src/funcs/memoryStoresRetrieveMemory.ts +6 -5
- package/packages/orq-rc/src/funcs/memoryStoresUpdateDocument.ts +6 -5
- package/packages/orq-rc/src/funcs/memoryStoresUpdateMemory.ts +6 -5
- package/packages/orq-rc/src/funcs/toolsCreate.ts +2 -11
- package/packages/orq-rc/src/lib/config.ts +3 -3
- package/packages/orq-rc/src/lib/sdks.ts +2 -2
- package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
- package/packages/orq-rc/src/mcp-server/server.ts +3 -3
- package/packages/orq-rc/src/mcp-server/tools/conversationsCreateConversationResponse.ts +39 -0
- package/packages/orq-rc/src/mcp-server/tools/conversationsList.ts +2 -0
- package/packages/orq-rc/src/models/components/agentinactivestreamingevent.ts +16 -1
- package/packages/orq-rc/src/models/components/agentmessagecreatedstreamingevent.ts +16 -1
- package/packages/orq-rc/src/models/components/agentresponsemessage.ts +16 -1
- package/packages/orq-rc/src/models/components/agentstartedstreamingevent.ts +16 -1
- package/packages/orq-rc/src/models/components/agentthoughtstreamingevent.ts +16 -1
- package/packages/orq-rc/src/models/components/conversationresponse.ts +26 -26
- package/packages/orq-rc/src/models/components/conversationwithmessagesresponse.ts +226 -0
- package/packages/orq-rc/src/models/components/errorpart.ts +58 -0
- package/packages/orq-rc/src/models/components/index.ts +4 -0
- package/packages/orq-rc/src/models/components/messageresponse.ts +217 -0
- package/packages/orq-rc/src/models/components/partdoneevent.ts +2 -2
- package/packages/orq-rc/src/models/components/publiccontact.ts +1 -1
- package/packages/orq-rc/src/models/components/reasoningpart.ts +2 -2
- package/packages/orq-rc/src/models/components/responsestartedevent.ts +14 -0
- package/packages/orq-rc/src/models/components/toolexecutionfailedstreamingevent.ts +1 -0
- package/packages/orq-rc/src/models/components/toolexecutionfinishedstreamingevent.ts +1 -0
- package/packages/orq-rc/src/models/components/toolexecutionstartedstreamingevent.ts +1 -0
- package/packages/orq-rc/src/models/components/usermessagerequest.ts +194 -0
- package/packages/orq-rc/src/models/errors/index.ts +0 -2
- package/packages/orq-rc/src/models/operations/createagentrequest.ts +40 -0
- package/packages/orq-rc/src/models/operations/createagentresponserequest.ts +122 -5
- package/packages/orq-rc/src/models/operations/createchatcompletion.ts +110 -7
- package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/createconversation.ts +59 -36
- package/packages/orq-rc/src/models/operations/createconversationresponse.ts +794 -0
- package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +48 -40
- package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/createeval.ts +28 -28
- package/packages/orq-rc/src/models/operations/createimage.ts +105 -5
- package/packages/orq-rc/src/models/operations/creatememory.ts +3 -15
- package/packages/orq-rc/src/models/operations/creatememorydocument.ts +7 -7
- package/packages/orq-rc/src/models/operations/createtool.ts +12 -12
- package/packages/orq-rc/src/models/operations/deletememory.ts +6 -6
- package/packages/orq-rc/src/models/operations/deletememorydocument.ts +6 -6
- package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
- package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
- package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
- package/packages/orq-rc/src/models/operations/generateconversationname.ts +27 -27
- package/packages/orq-rc/src/models/operations/getallmemories.ts +3 -8
- package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +6 -6
- package/packages/orq-rc/src/models/operations/getalltools.ts +12 -12
- package/packages/orq-rc/src/models/operations/getevals.ts +28 -28
- package/packages/orq-rc/src/models/operations/getv2evaluatorsidversions.ts +4 -4
- package/packages/orq-rc/src/models/operations/getv2toolstoolidversions.ts +4 -4
- package/packages/orq-rc/src/models/operations/getv2toolstoolidversionsversionid.ts +4 -4
- package/packages/orq-rc/src/models/operations/index.ts +1 -1
- package/packages/orq-rc/src/models/operations/invokeagent.ts +128 -5
- package/packages/orq-rc/src/models/operations/listagents.ts +20 -0
- package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
- package/packages/orq-rc/src/models/operations/listconversations.ts +10 -3
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +53 -53
- package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
- package/packages/orq-rc/src/models/operations/parse.ts +157 -2
- package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +9 -0
- package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +22 -0
- package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrieveconversation.ts +0 -197
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +8 -8
- package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievememory.ts +9 -14
- package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +6 -6
- package/packages/orq-rc/src/models/operations/retrievetool.ts +12 -12
- package/packages/orq-rc/src/models/operations/runagent.ts +130 -7
- package/packages/orq-rc/src/models/operations/streamagent.ts +120 -5
- package/packages/orq-rc/src/models/operations/streamrunagent.ts +122 -7
- package/packages/orq-rc/src/models/operations/updateagent.ts +20 -0
- package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/updateconversation.ts +39 -33
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +8 -8
- package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/updateeval.ts +28 -28
- package/packages/orq-rc/src/models/operations/updatememory.ts +9 -32
- package/packages/orq-rc/src/models/operations/updatememorydocument.ts +6 -6
- package/packages/orq-rc/src/models/operations/updatetool.ts +14 -14
- package/packages/orq-rc/src/sdk/conversations.ts +23 -1
- package/packages/orq-rc/src/sdk/evaluators.ts +0 -18
- package/packages/orq-rc/src/sdk/internal.ts +28 -0
- package/packages/orq-rc/src/sdk/sdk.ts +6 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/sdks.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/conversationresponse.ts +2 -2
- package/src/models/components/partdoneevent.ts +2 -2
- package/src/models/components/reasoningpart.ts +2 -2
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createconversation.ts +2 -2
- package/src/models/operations/createdataset.ts +2 -2
- package/src/models/operations/createdatasetitem.ts +8 -8
- package/src/models/operations/createdatasource.ts +2 -2
- package/src/models/operations/createeval.ts +28 -28
- package/src/models/operations/createtool.ts +12 -12
- package/src/models/operations/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +2 -2
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/generateconversationname.ts +2 -2
- package/src/models/operations/getalltools.ts +12 -12
- package/src/models/operations/getevals.ts +28 -28
- package/src/models/operations/listcontacts.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +8 -8
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/listdatasources.ts +2 -2
- package/src/models/operations/retrievecontact.ts +2 -2
- package/src/models/operations/retrieveconversation.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +8 -8
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/retrievedatasource.ts +2 -2
- package/src/models/operations/retrievetool.ts +12 -12
- package/src/models/operations/runagent.ts +2 -2
- package/src/models/operations/streamrunagent.ts +2 -2
- package/src/models/operations/updatecontact.ts +2 -2
- package/src/models/operations/updateconversation.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +8 -8
- package/src/models/operations/updatedataset.ts +2 -2
- package/src/models/operations/updatedatasource.ts +2 -2
- package/src/models/operations/updateeval.ts +28 -28
- package/src/models/operations/updatetool.ts +14 -14
- package/packages/orq-rc/src/mcp-server/tools/evaluatorsGetV2EvaluatorsIdVersionsVersionId.ts +0 -40
- package/packages/orq-rc/src/models/errors/createagentrequest.ts +0 -67
- package/packages/orq-rc/src/models/errors/getv2evaluatorsidversionsversionid.ts +0 -69
- package/packages/orq-rc/src/models/operations/getv2evaluatorsidversionsversionid.ts +0 -193
|
@@ -17,7 +17,6 @@ import {
|
|
|
17
17
|
RequestTimeoutError,
|
|
18
18
|
UnexpectedClientError,
|
|
19
19
|
} from "../models/errors/httpclienterrors.js";
|
|
20
|
-
import * as errors from "../models/errors/index.js";
|
|
21
20
|
import { OrqError } from "../models/errors/orqerror.js";
|
|
22
21
|
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
22
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
@@ -38,7 +37,6 @@ export function agentsCreate(
|
|
|
38
37
|
): APIPromise<
|
|
39
38
|
Result<
|
|
40
39
|
operations.CreateAgentRequestResponseBody,
|
|
41
|
-
| errors.CreateAgentRequestResponseBody
|
|
42
40
|
| OrqError
|
|
43
41
|
| ResponseValidationError
|
|
44
42
|
| ConnectionError
|
|
@@ -64,7 +62,6 @@ async function $do(
|
|
|
64
62
|
[
|
|
65
63
|
Result<
|
|
66
64
|
operations.CreateAgentRequestResponseBody,
|
|
67
|
-
| errors.CreateAgentRequestResponseBody
|
|
68
65
|
| OrqError
|
|
69
66
|
| ResponseValidationError
|
|
70
67
|
| ConnectionError
|
|
@@ -132,7 +129,7 @@ async function $do(
|
|
|
132
129
|
|
|
133
130
|
const doResult = await client._do(req, {
|
|
134
131
|
context,
|
|
135
|
-
errorCodes: ["
|
|
132
|
+
errorCodes: ["4XX", "5XX"],
|
|
136
133
|
retryConfig: context.retryConfig,
|
|
137
134
|
retryCodes: context.retryCodes,
|
|
138
135
|
});
|
|
@@ -141,13 +138,8 @@ async function $do(
|
|
|
141
138
|
}
|
|
142
139
|
const response = doResult.value;
|
|
143
140
|
|
|
144
|
-
const responseFields = {
|
|
145
|
-
HttpMeta: { Response: response, Request: req },
|
|
146
|
-
};
|
|
147
|
-
|
|
148
141
|
const [result] = await M.match<
|
|
149
142
|
operations.CreateAgentRequestResponseBody,
|
|
150
|
-
| errors.CreateAgentRequestResponseBody
|
|
151
143
|
| OrqError
|
|
152
144
|
| ResponseValidationError
|
|
153
145
|
| ConnectionError
|
|
@@ -158,10 +150,9 @@ async function $do(
|
|
|
158
150
|
| SDKValidationError
|
|
159
151
|
>(
|
|
160
152
|
M.json(201, operations.CreateAgentRequestResponseBody$inboundSchema),
|
|
161
|
-
M.jsonErr(409, errors.CreateAgentRequestResponseBody$inboundSchema),
|
|
162
153
|
M.fail("4XX"),
|
|
163
154
|
M.fail("5XX"),
|
|
164
|
-
)(response, req
|
|
155
|
+
)(response, req);
|
|
165
156
|
if (!result.ok) {
|
|
166
157
|
return [result, { status: "complete", request: req, response }];
|
|
167
158
|
}
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import * as z from "zod/v3";
|
|
5
6
|
import { OrqCore } from "../core.js";
|
|
6
|
-
import { encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
8
|
+
import { EventStream } from "../lib/event-streams.js";
|
|
7
9
|
import * as M from "../lib/matchers.js";
|
|
8
10
|
import { compactMap } from "../lib/primitives.js";
|
|
9
11
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -17,7 +19,6 @@ import {
|
|
|
17
19
|
RequestTimeoutError,
|
|
18
20
|
UnexpectedClientError,
|
|
19
21
|
} from "../models/errors/httpclienterrors.js";
|
|
20
|
-
import * as errors from "../models/errors/index.js";
|
|
21
22
|
import { OrqError } from "../models/errors/orqerror.js";
|
|
22
23
|
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
24
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
@@ -26,19 +27,18 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
26
27
|
import { Result } from "../types/fp.js";
|
|
27
28
|
|
|
28
29
|
/**
|
|
29
|
-
*
|
|
30
|
+
* Create internal response
|
|
30
31
|
*
|
|
31
32
|
* @remarks
|
|
32
|
-
*
|
|
33
|
+
* Creates a response for a freeform conversation without an agent. Uses a default model for generation.
|
|
33
34
|
*/
|
|
34
|
-
export function
|
|
35
|
+
export function conversationsCreateConversationResponse(
|
|
35
36
|
client: OrqCore,
|
|
36
|
-
request: operations.
|
|
37
|
+
request: operations.CreateConversationResponseRequest,
|
|
37
38
|
options?: RequestOptions,
|
|
38
39
|
): APIPromise<
|
|
39
40
|
Result<
|
|
40
|
-
operations.
|
|
41
|
-
| errors.GetV2EvaluatorsIdVersionsVersionIdResponseBody
|
|
41
|
+
EventStream<operations.CreateConversationResponseResponseBody>,
|
|
42
42
|
| OrqError
|
|
43
43
|
| ResponseValidationError
|
|
44
44
|
| ConnectionError
|
|
@@ -58,13 +58,12 @@ export function evaluatorsGetV2EvaluatorsIdVersionsVersionId(
|
|
|
58
58
|
|
|
59
59
|
async function $do(
|
|
60
60
|
client: OrqCore,
|
|
61
|
-
request: operations.
|
|
61
|
+
request: operations.CreateConversationResponseRequest,
|
|
62
62
|
options?: RequestOptions,
|
|
63
63
|
): Promise<
|
|
64
64
|
[
|
|
65
65
|
Result<
|
|
66
|
-
operations.
|
|
67
|
-
| errors.GetV2EvaluatorsIdVersionsVersionIdResponseBody
|
|
66
|
+
EventStream<operations.CreateConversationResponseResponseBody>,
|
|
68
67
|
| OrqError
|
|
69
68
|
| ResponseValidationError
|
|
70
69
|
| ConnectionError
|
|
@@ -80,34 +79,29 @@ async function $do(
|
|
|
80
79
|
const parsed = safeParse(
|
|
81
80
|
request,
|
|
82
81
|
(value) =>
|
|
83
|
-
operations.
|
|
84
|
-
value,
|
|
85
|
-
),
|
|
82
|
+
operations.CreateConversationResponseRequest$outboundSchema.parse(value),
|
|
86
83
|
"Input validation failed",
|
|
87
84
|
);
|
|
88
85
|
if (!parsed.ok) {
|
|
89
86
|
return [parsed, { status: "invalid" }];
|
|
90
87
|
}
|
|
91
88
|
const payload = parsed.value;
|
|
92
|
-
const body =
|
|
89
|
+
const body = encodeJSON("body", payload.RequestBody, { explode: true });
|
|
93
90
|
|
|
94
91
|
const pathParams = {
|
|
95
|
-
|
|
96
|
-
explode: false,
|
|
97
|
-
charEncoding: "percent",
|
|
98
|
-
}),
|
|
99
|
-
version_id: encodeSimple("version_id", payload.version_id, {
|
|
92
|
+
conversation_id: encodeSimple("conversation_id", payload.conversation_id, {
|
|
100
93
|
explode: false,
|
|
101
94
|
charEncoding: "percent",
|
|
102
95
|
}),
|
|
103
96
|
};
|
|
104
97
|
|
|
105
|
-
const path = pathToFunc("/v2/
|
|
98
|
+
const path = pathToFunc("/v2/conversations/{conversation_id}/responses")(
|
|
106
99
|
pathParams,
|
|
107
100
|
);
|
|
108
101
|
|
|
109
102
|
const headers = new Headers(compactMap({
|
|
110
|
-
|
|
103
|
+
"Content-Type": "application/json",
|
|
104
|
+
Accept: "text/event-stream",
|
|
111
105
|
}));
|
|
112
106
|
|
|
113
107
|
const secConfig = await extractSecurity(client._options.apiKey);
|
|
@@ -117,7 +111,7 @@ async function $do(
|
|
|
117
111
|
const context = {
|
|
118
112
|
options: client._options,
|
|
119
113
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
120
|
-
operationID: "
|
|
114
|
+
operationID: "CreateConversationResponse",
|
|
121
115
|
oAuth2Scopes: null,
|
|
122
116
|
|
|
123
117
|
resolvedSecurity: requestSecurity,
|
|
@@ -131,7 +125,7 @@ async function $do(
|
|
|
131
125
|
|
|
132
126
|
const requestRes = client._createRequest(context, {
|
|
133
127
|
security: requestSecurity,
|
|
134
|
-
method: "
|
|
128
|
+
method: "POST",
|
|
135
129
|
baseURL: options?.serverURL,
|
|
136
130
|
path: path,
|
|
137
131
|
headers: headers,
|
|
@@ -146,7 +140,7 @@ async function $do(
|
|
|
146
140
|
|
|
147
141
|
const doResult = await client._do(req, {
|
|
148
142
|
context,
|
|
149
|
-
errorCodes: ["
|
|
143
|
+
errorCodes: ["4XX", "5XX"],
|
|
150
144
|
retryConfig: context.retryConfig,
|
|
151
145
|
retryCodes: context.retryCodes,
|
|
152
146
|
});
|
|
@@ -155,13 +149,8 @@ async function $do(
|
|
|
155
149
|
}
|
|
156
150
|
const response = doResult.value;
|
|
157
151
|
|
|
158
|
-
const responseFields = {
|
|
159
|
-
HttpMeta: { Response: response, Request: req },
|
|
160
|
-
};
|
|
161
|
-
|
|
162
152
|
const [result] = await M.match<
|
|
163
|
-
operations.
|
|
164
|
-
| errors.GetV2EvaluatorsIdVersionsVersionIdResponseBody
|
|
153
|
+
EventStream<operations.CreateConversationResponseResponseBody>,
|
|
165
154
|
| OrqError
|
|
166
155
|
| ResponseValidationError
|
|
167
156
|
| ConnectionError
|
|
@@ -171,17 +160,24 @@ async function $do(
|
|
|
171
160
|
| UnexpectedClientError
|
|
172
161
|
| SDKValidationError
|
|
173
162
|
>(
|
|
174
|
-
M.
|
|
163
|
+
M.sse(
|
|
175
164
|
200,
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
165
|
+
z.instanceof(ReadableStream<Uint8Array>)
|
|
166
|
+
.transform(stream => {
|
|
167
|
+
return new EventStream(stream, rawEvent => {
|
|
168
|
+
if (rawEvent.data === "[DONE]") return { done: true };
|
|
169
|
+
return {
|
|
170
|
+
value: operations
|
|
171
|
+
.CreateConversationResponseResponseBody$inboundSchema.parse(
|
|
172
|
+
rawEvent,
|
|
173
|
+
),
|
|
174
|
+
};
|
|
175
|
+
});
|
|
176
|
+
}),
|
|
181
177
|
),
|
|
182
178
|
M.fail("4XX"),
|
|
183
179
|
M.fail("5XX"),
|
|
184
|
-
)(response, req
|
|
180
|
+
)(response, req);
|
|
185
181
|
if (!result.ok) {
|
|
186
182
|
return [result, { status: "complete", request: req, response }];
|
|
187
183
|
}
|
|
@@ -35,6 +35,7 @@ export function conversationsList(
|
|
|
35
35
|
limit?: number | undefined,
|
|
36
36
|
startingAfter?: string | undefined,
|
|
37
37
|
endingBefore?: string | undefined,
|
|
38
|
+
entityId?: string | undefined,
|
|
38
39
|
options?: RequestOptions,
|
|
39
40
|
): APIPromise<
|
|
40
41
|
Result<
|
|
@@ -54,6 +55,7 @@ export function conversationsList(
|
|
|
54
55
|
limit,
|
|
55
56
|
startingAfter,
|
|
56
57
|
endingBefore,
|
|
58
|
+
entityId,
|
|
57
59
|
options,
|
|
58
60
|
));
|
|
59
61
|
}
|
|
@@ -63,6 +65,7 @@ async function $do(
|
|
|
63
65
|
limit?: number | undefined,
|
|
64
66
|
startingAfter?: string | undefined,
|
|
65
67
|
endingBefore?: string | undefined,
|
|
68
|
+
entityId?: string | undefined,
|
|
66
69
|
options?: RequestOptions,
|
|
67
70
|
): Promise<
|
|
68
71
|
[
|
|
@@ -84,6 +87,7 @@ async function $do(
|
|
|
84
87
|
limit: limit,
|
|
85
88
|
startingAfter: startingAfter,
|
|
86
89
|
endingBefore: endingBefore,
|
|
90
|
+
entityId: entityId,
|
|
87
91
|
};
|
|
88
92
|
|
|
89
93
|
const parsed = safeParse(
|
|
@@ -100,10 +104,11 @@ async function $do(
|
|
|
100
104
|
const payload = parsed.value;
|
|
101
105
|
const body = null;
|
|
102
106
|
|
|
103
|
-
const path = pathToFunc("/v2/conversations")();
|
|
107
|
+
const path = pathToFunc("/v2/conversations/")();
|
|
104
108
|
|
|
105
109
|
const query = encodeFormQuery({
|
|
106
110
|
"endingBefore": payload?.endingBefore,
|
|
111
|
+
"entityId": payload?.entityId,
|
|
107
112
|
"limit": payload?.limit,
|
|
108
113
|
"startingAfter": payload?.startingAfter,
|
|
109
114
|
});
|
|
@@ -10,6 +10,7 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
10
10
|
import { RequestOptions } from "../lib/sdks.js";
|
|
11
11
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
12
|
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import * as components from "../models/components/index.js";
|
|
13
14
|
import {
|
|
14
15
|
ConnectionError,
|
|
15
16
|
InvalidRequestError,
|
|
@@ -37,7 +38,7 @@ export function conversationsRetrieve(
|
|
|
37
38
|
options?: RequestOptions,
|
|
38
39
|
): APIPromise<
|
|
39
40
|
Result<
|
|
40
|
-
|
|
41
|
+
components.ConversationWithMessagesResponse,
|
|
41
42
|
| errors.RetrieveConversationResponseBody
|
|
42
43
|
| OrqError
|
|
43
44
|
| ResponseValidationError
|
|
@@ -63,7 +64,7 @@ async function $do(
|
|
|
63
64
|
): Promise<
|
|
64
65
|
[
|
|
65
66
|
Result<
|
|
66
|
-
|
|
67
|
+
components.ConversationWithMessagesResponse,
|
|
67
68
|
| errors.RetrieveConversationResponseBody
|
|
68
69
|
| OrqError
|
|
69
70
|
| ResponseValidationError
|
|
@@ -156,7 +157,7 @@ async function $do(
|
|
|
156
157
|
};
|
|
157
158
|
|
|
158
159
|
const [result] = await M.match<
|
|
159
|
-
|
|
160
|
+
components.ConversationWithMessagesResponse,
|
|
160
161
|
| errors.RetrieveConversationResponseBody
|
|
161
162
|
| OrqError
|
|
162
163
|
| ResponseValidationError
|
|
@@ -167,7 +168,7 @@ async function $do(
|
|
|
167
168
|
| UnexpectedClientError
|
|
168
169
|
| SDKValidationError
|
|
169
170
|
>(
|
|
170
|
-
M.json(200,
|
|
171
|
+
M.json(200, components.ConversationWithMessagesResponse$inboundSchema),
|
|
171
172
|
M.jsonErr(404, errors.RetrieveConversationResponseBody$inboundSchema),
|
|
172
173
|
M.fail("4XX"),
|
|
173
174
|
M.fail("5XX"),
|
|
@@ -87,10 +87,11 @@ async function $do(
|
|
|
87
87
|
const body = encodeJSON("body", payload.RequestBody, { explode: true });
|
|
88
88
|
|
|
89
89
|
const pathParams = {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
memory_entity_id: encodeSimple(
|
|
91
|
+
"memory_entity_id",
|
|
92
|
+
payload.memory_entity_id,
|
|
93
|
+
{ explode: false, charEncoding: "percent" },
|
|
94
|
+
),
|
|
94
95
|
memory_store_key: encodeSimple(
|
|
95
96
|
"memory_store_key",
|
|
96
97
|
payload.memory_store_key,
|
|
@@ -99,7 +100,7 @@ async function $do(
|
|
|
99
100
|
};
|
|
100
101
|
|
|
101
102
|
const path = pathToFunc(
|
|
102
|
-
"/v2/memory-stores/{memory_store_key}/memories/{
|
|
103
|
+
"/v2/memory-stores/{memory_store_key}/memories/{memory_entity_id}/documents",
|
|
103
104
|
)(pathParams);
|
|
104
105
|
|
|
105
106
|
const headers = new Headers(compactMap({
|
|
@@ -97,10 +97,11 @@ async function $do(
|
|
|
97
97
|
explode: false,
|
|
98
98
|
charEncoding: "percent",
|
|
99
99
|
}),
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
100
|
+
memory_entity_id: encodeSimple(
|
|
101
|
+
"memory_entity_id",
|
|
102
|
+
payload.memory_entity_id,
|
|
103
|
+
{ explode: false, charEncoding: "percent" },
|
|
104
|
+
),
|
|
104
105
|
memory_store_key: encodeSimple(
|
|
105
106
|
"memory_store_key",
|
|
106
107
|
payload.memory_store_key,
|
|
@@ -109,7 +110,7 @@ async function $do(
|
|
|
109
110
|
};
|
|
110
111
|
|
|
111
112
|
const path = pathToFunc(
|
|
112
|
-
"/v2/memory-stores/{memory_store_key}/memories/{
|
|
113
|
+
"/v2/memory-stores/{memory_store_key}/memories/{memory_entity_id}/documents/{document_id}",
|
|
113
114
|
)(pathParams);
|
|
114
115
|
|
|
115
116
|
const headers = new Headers(compactMap({
|
|
@@ -92,10 +92,11 @@ async function $do(
|
|
|
92
92
|
const body = null;
|
|
93
93
|
|
|
94
94
|
const pathParams = {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
95
|
+
memory_entity_id: encodeSimple(
|
|
96
|
+
"memory_entity_id",
|
|
97
|
+
payload.memory_entity_id,
|
|
98
|
+
{ explode: false, charEncoding: "percent" },
|
|
99
|
+
),
|
|
99
100
|
memory_store_key: encodeSimple(
|
|
100
101
|
"memory_store_key",
|
|
101
102
|
payload.memory_store_key,
|
|
@@ -104,7 +105,7 @@ async function $do(
|
|
|
104
105
|
};
|
|
105
106
|
|
|
106
107
|
const path = pathToFunc(
|
|
107
|
-
"/v2/memory-stores/{memory_store_key}/memories/{
|
|
108
|
+
"/v2/memory-stores/{memory_store_key}/memories/{memory_entity_id}",
|
|
108
109
|
)(pathParams);
|
|
109
110
|
|
|
110
111
|
const headers = new Headers(compactMap({
|
|
@@ -87,10 +87,11 @@ async function $do(
|
|
|
87
87
|
const body = null;
|
|
88
88
|
|
|
89
89
|
const pathParams = {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
memory_entity_id: encodeSimple(
|
|
91
|
+
"memory_entity_id",
|
|
92
|
+
payload.memory_entity_id,
|
|
93
|
+
{ explode: false, charEncoding: "percent" },
|
|
94
|
+
),
|
|
94
95
|
memory_store_key: encodeSimple(
|
|
95
96
|
"memory_store_key",
|
|
96
97
|
payload.memory_store_key,
|
|
@@ -99,7 +100,7 @@ async function $do(
|
|
|
99
100
|
};
|
|
100
101
|
|
|
101
102
|
const path = pathToFunc(
|
|
102
|
-
"/v2/memory-stores/{memory_store_key}/memories/{
|
|
103
|
+
"/v2/memory-stores/{memory_store_key}/memories/{memory_entity_id}/documents",
|
|
103
104
|
)(pathParams);
|
|
104
105
|
|
|
105
106
|
const query = encodeFormQuery({
|
|
@@ -91,10 +91,11 @@ async function $do(
|
|
|
91
91
|
explode: false,
|
|
92
92
|
charEncoding: "percent",
|
|
93
93
|
}),
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
memory_entity_id: encodeSimple(
|
|
95
|
+
"memory_entity_id",
|
|
96
|
+
payload.memory_entity_id,
|
|
97
|
+
{ explode: false, charEncoding: "percent" },
|
|
98
|
+
),
|
|
98
99
|
memory_store_key: encodeSimple(
|
|
99
100
|
"memory_store_key",
|
|
100
101
|
payload.memory_store_key,
|
|
@@ -103,7 +104,7 @@ async function $do(
|
|
|
103
104
|
};
|
|
104
105
|
|
|
105
106
|
const path = pathToFunc(
|
|
106
|
-
"/v2/memory-stores/{memory_store_key}/memories/{
|
|
107
|
+
"/v2/memory-stores/{memory_store_key}/memories/{memory_entity_id}/documents/{document_id}",
|
|
107
108
|
)(pathParams);
|
|
108
109
|
|
|
109
110
|
const headers = new Headers(compactMap({
|
|
@@ -86,10 +86,11 @@ async function $do(
|
|
|
86
86
|
const body = null;
|
|
87
87
|
|
|
88
88
|
const pathParams = {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
memory_entity_id: encodeSimple(
|
|
90
|
+
"memory_entity_id",
|
|
91
|
+
payload.memory_entity_id,
|
|
92
|
+
{ explode: false, charEncoding: "percent" },
|
|
93
|
+
),
|
|
93
94
|
memory_store_key: encodeSimple(
|
|
94
95
|
"memory_store_key",
|
|
95
96
|
payload.memory_store_key,
|
|
@@ -98,7 +99,7 @@ async function $do(
|
|
|
98
99
|
};
|
|
99
100
|
|
|
100
101
|
const path = pathToFunc(
|
|
101
|
-
"/v2/memory-stores/{memory_store_key}/memories/{
|
|
102
|
+
"/v2/memory-stores/{memory_store_key}/memories/{memory_entity_id}",
|
|
102
103
|
)(pathParams);
|
|
103
104
|
|
|
104
105
|
const headers = new Headers(compactMap({
|
|
@@ -91,10 +91,11 @@ async function $do(
|
|
|
91
91
|
explode: false,
|
|
92
92
|
charEncoding: "percent",
|
|
93
93
|
}),
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
memory_entity_id: encodeSimple(
|
|
95
|
+
"memory_entity_id",
|
|
96
|
+
payload.memory_entity_id,
|
|
97
|
+
{ explode: false, charEncoding: "percent" },
|
|
98
|
+
),
|
|
98
99
|
memory_store_key: encodeSimple(
|
|
99
100
|
"memory_store_key",
|
|
100
101
|
payload.memory_store_key,
|
|
@@ -103,7 +104,7 @@ async function $do(
|
|
|
103
104
|
};
|
|
104
105
|
|
|
105
106
|
const path = pathToFunc(
|
|
106
|
-
"/v2/memory-stores/{memory_store_key}/memories/{
|
|
107
|
+
"/v2/memory-stores/{memory_store_key}/memories/{memory_entity_id}/documents/{document_id}",
|
|
107
108
|
)(pathParams);
|
|
108
109
|
|
|
109
110
|
const headers = new Headers(compactMap({
|
|
@@ -86,10 +86,11 @@ async function $do(
|
|
|
86
86
|
const body = encodeJSON("body", payload.RequestBody, { explode: true });
|
|
87
87
|
|
|
88
88
|
const pathParams = {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
memory_entity_id: encodeSimple(
|
|
90
|
+
"memory_entity_id",
|
|
91
|
+
payload.memory_entity_id,
|
|
92
|
+
{ explode: false, charEncoding: "percent" },
|
|
93
|
+
),
|
|
93
94
|
memory_store_key: encodeSimple(
|
|
94
95
|
"memory_store_key",
|
|
95
96
|
payload.memory_store_key,
|
|
@@ -98,7 +99,7 @@ async function $do(
|
|
|
98
99
|
};
|
|
99
100
|
|
|
100
101
|
const path = pathToFunc(
|
|
101
|
-
"/v2/memory-stores/{memory_store_key}/memories/{
|
|
102
|
+
"/v2/memory-stores/{memory_store_key}/memories/{memory_entity_id}",
|
|
102
103
|
)(pathParams);
|
|
103
104
|
|
|
104
105
|
const headers = new Headers(compactMap({
|
|
@@ -17,7 +17,6 @@ import {
|
|
|
17
17
|
RequestTimeoutError,
|
|
18
18
|
UnexpectedClientError,
|
|
19
19
|
} from "../models/errors/httpclienterrors.js";
|
|
20
|
-
import * as errors from "../models/errors/index.js";
|
|
21
20
|
import { OrqError } from "../models/errors/orqerror.js";
|
|
22
21
|
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
22
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
@@ -38,7 +37,6 @@ export function toolsCreate(
|
|
|
38
37
|
): APIPromise<
|
|
39
38
|
Result<
|
|
40
39
|
operations.CreateToolResponseBody,
|
|
41
|
-
| errors.HonoApiError
|
|
42
40
|
| OrqError
|
|
43
41
|
| ResponseValidationError
|
|
44
42
|
| ConnectionError
|
|
@@ -64,7 +62,6 @@ async function $do(
|
|
|
64
62
|
[
|
|
65
63
|
Result<
|
|
66
64
|
operations.CreateToolResponseBody,
|
|
67
|
-
| errors.HonoApiError
|
|
68
65
|
| OrqError
|
|
69
66
|
| ResponseValidationError
|
|
70
67
|
| ConnectionError
|
|
@@ -134,7 +131,7 @@ async function $do(
|
|
|
134
131
|
|
|
135
132
|
const doResult = await client._do(req, {
|
|
136
133
|
context,
|
|
137
|
-
errorCodes: ["
|
|
134
|
+
errorCodes: ["4XX", "5XX"],
|
|
138
135
|
retryConfig: context.retryConfig,
|
|
139
136
|
retryCodes: context.retryCodes,
|
|
140
137
|
});
|
|
@@ -143,13 +140,8 @@ async function $do(
|
|
|
143
140
|
}
|
|
144
141
|
const response = doResult.value;
|
|
145
142
|
|
|
146
|
-
const responseFields = {
|
|
147
|
-
HttpMeta: { Response: response, Request: req },
|
|
148
|
-
};
|
|
149
|
-
|
|
150
143
|
const [result] = await M.match<
|
|
151
144
|
operations.CreateToolResponseBody,
|
|
152
|
-
| errors.HonoApiError
|
|
153
145
|
| OrqError
|
|
154
146
|
| ResponseValidationError
|
|
155
147
|
| ConnectionError
|
|
@@ -160,10 +152,9 @@ async function $do(
|
|
|
160
152
|
| SDKValidationError
|
|
161
153
|
>(
|
|
162
154
|
M.json(200, operations.CreateToolResponseBody$inboundSchema),
|
|
163
|
-
M.jsonErr([400, 404], errors.HonoApiError$inboundSchema),
|
|
164
155
|
M.fail("4XX"),
|
|
165
156
|
M.fail("5XX"),
|
|
166
|
-
)(response, req
|
|
157
|
+
)(response, req);
|
|
167
158
|
if (!result.ok) {
|
|
168
159
|
return [result, { status: "complete", request: req, response }];
|
|
169
160
|
}
|
|
@@ -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.2.0-rc.
|
|
72
|
-
genVersion: "2.
|
|
73
|
-
userAgent: "speakeasy-sdk/typescript 4.2.0-rc.
|
|
71
|
+
sdkVersion: "4.2.0-rc.27",
|
|
72
|
+
genVersion: "2.794.1",
|
|
73
|
+
userAgent: "speakeasy-sdk/typescript 4.2.0-rc.27 2.794.1 2.0 @orq-ai/node",
|
|
74
74
|
} as const;
|
|
@@ -308,9 +308,9 @@ export class ClientSDK {
|
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
310
|
|
|
311
|
-
const jsonLikeContentTypeRE =
|
|
311
|
+
const jsonLikeContentTypeRE = /^(application|text)\/([^+]+\+)*json.*/;
|
|
312
312
|
const jsonlLikeContentTypeRE =
|
|
313
|
-
|
|
313
|
+
/^(application|text)\/([^+]+\+)*(jsonl|x-ndjson)\b.*/;
|
|
314
314
|
async function logRequest(logger: Logger | undefined, req: Request) {
|
|
315
315
|
if (!logger) {
|
|
316
316
|
return;
|
|
@@ -30,6 +30,7 @@ import { tool$contactsList } from "./tools/contactsList.js";
|
|
|
30
30
|
import { tool$contactsRetrieve } from "./tools/contactsRetrieve.js";
|
|
31
31
|
import { tool$contactsUpdate } from "./tools/contactsUpdate.js";
|
|
32
32
|
import { tool$conversationsCreate } from "./tools/conversationsCreate.js";
|
|
33
|
+
import { tool$conversationsCreateConversationResponse } from "./tools/conversationsCreateConversationResponse.js";
|
|
33
34
|
import { tool$conversationsDelete } from "./tools/conversationsDelete.js";
|
|
34
35
|
import { tool$conversationsGenerateName } from "./tools/conversationsGenerateName.js";
|
|
35
36
|
import { tool$conversationsList } from "./tools/conversationsList.js";
|
|
@@ -57,7 +58,6 @@ import { tool$evalsDelete } from "./tools/evalsDelete.js";
|
|
|
57
58
|
import { tool$evalsInvoke } from "./tools/evalsInvoke.js";
|
|
58
59
|
import { tool$evalsUpdate } from "./tools/evalsUpdate.js";
|
|
59
60
|
import { tool$evaluatorsGetV2EvaluatorsIdVersions } from "./tools/evaluatorsGetV2EvaluatorsIdVersions.js";
|
|
60
|
-
import { tool$evaluatorsGetV2EvaluatorsIdVersionsVersionId } from "./tools/evaluatorsGetV2EvaluatorsIdVersionsVersionId.js";
|
|
61
61
|
import { tool$feedbackCreate } from "./tools/feedbackCreate.js";
|
|
62
62
|
import { tool$filesCreate } from "./tools/filesCreate.js";
|
|
63
63
|
import { tool$filesDelete } from "./tools/filesDelete.js";
|
|
@@ -128,7 +128,7 @@ export function createMCPServer(deps: {
|
|
|
128
128
|
}) {
|
|
129
129
|
const server = new McpServer({
|
|
130
130
|
name: "Orq",
|
|
131
|
-
version: "4.2.0-rc.
|
|
131
|
+
version: "4.2.0-rc.27",
|
|
132
132
|
});
|
|
133
133
|
|
|
134
134
|
const client = new OrqCore({
|
|
@@ -172,7 +172,6 @@ export function createMCPServer(deps: {
|
|
|
172
172
|
tool(tool$evalsDelete);
|
|
173
173
|
tool(tool$evalsInvoke);
|
|
174
174
|
tool(tool$evaluatorsGetV2EvaluatorsIdVersions);
|
|
175
|
-
tool(tool$evaluatorsGetV2EvaluatorsIdVersionsVersionId);
|
|
176
175
|
tool(tool$deploymentsInvoke);
|
|
177
176
|
tool(tool$deploymentsList);
|
|
178
177
|
tool(tool$deploymentsGetConfig);
|
|
@@ -192,6 +191,7 @@ export function createMCPServer(deps: {
|
|
|
192
191
|
tool(tool$conversationsRetrieve);
|
|
193
192
|
tool(tool$conversationsUpdate);
|
|
194
193
|
tool(tool$conversationsDelete);
|
|
194
|
+
tool(tool$conversationsCreateConversationResponse);
|
|
195
195
|
tool(tool$filesCreate);
|
|
196
196
|
tool(tool$filesList);
|
|
197
197
|
tool(tool$filesGet);
|