@orq-ai/node 4.4.12 → 4.4.14

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 (133) hide show
  1. package/jsr.json +1 -1
  2. package/lib/config.d.ts +3 -3
  3. package/lib/config.js +3 -3
  4. package/models/components/partdoneevent.js +1 -1
  5. package/models/components/reasoningpart.js +1 -1
  6. package/models/operations/createcontact.js +1 -1
  7. package/models/operations/createdataset.js +1 -1
  8. package/models/operations/createdatasetitem.js +4 -4
  9. package/models/operations/createdatasource.js +1 -1
  10. package/models/operations/createeval.js +16 -16
  11. package/models/operations/createidentity.js +1 -1
  12. package/models/operations/createtool.js +6 -6
  13. package/models/operations/fileget.js +1 -1
  14. package/models/operations/filelist.js +1 -1
  15. package/models/operations/fileupload.js +1 -1
  16. package/models/operations/getalltools.js +6 -6
  17. package/models/operations/getevals.js +16 -16
  18. package/models/operations/listdatasetdatapoints.js +4 -4
  19. package/models/operations/listdatasets.js +1 -1
  20. package/models/operations/listdatasources.js +1 -1
  21. package/models/operations/listidentities.js +1 -1
  22. package/models/operations/retrievedatapoint.js +4 -4
  23. package/models/operations/retrievedataset.js +1 -1
  24. package/models/operations/retrievedatasource.js +1 -1
  25. package/models/operations/retrieveidentity.js +1 -1
  26. package/models/operations/retrievetool.js +6 -6
  27. package/models/operations/runagent.js +1 -1
  28. package/models/operations/streamrunagent.js +1 -1
  29. package/models/operations/updatedatapoint.js +4 -4
  30. package/models/operations/updatedataset.js +1 -1
  31. package/models/operations/updatedatasource.js +1 -1
  32. package/models/operations/updateeval.js +16 -16
  33. package/models/operations/updateidentity.js +1 -1
  34. package/models/operations/updatetool.js +7 -7
  35. package/package.json +1 -1
  36. package/packages/orq-rc/src/funcs/agentsList.ts +5 -0
  37. package/packages/orq-rc/src/funcs/agentsPostV2AgentsA2a.ts +178 -0
  38. package/packages/orq-rc/src/funcs/agentsPostV2AgentsKeyCardRefresh.ts +187 -0
  39. package/packages/orq-rc/src/funcs/agentsResponsesGet.ts +182 -0
  40. package/packages/orq-rc/src/funcs/agentsUpdate.ts +2 -2
  41. package/packages/orq-rc/src/lib/config.ts +3 -3
  42. package/packages/orq-rc/src/models/components/createagentresponse.ts +6 -0
  43. package/packages/orq-rc/src/models/components/extendedmessage.ts +146 -0
  44. package/packages/orq-rc/src/models/components/getagentresponse.ts +348 -0
  45. package/packages/orq-rc/src/models/components/index.ts +3 -0
  46. package/packages/orq-rc/src/models/components/partdoneevent.ts +1 -1
  47. package/packages/orq-rc/src/models/components/reasoningpart.ts +1 -1
  48. package/packages/orq-rc/src/models/components/responsedoneevent.ts +6 -0
  49. package/packages/orq-rc/src/models/components/responsestartedevent.ts +6 -0
  50. package/packages/orq-rc/src/models/components/telemetry.ts +48 -0
  51. package/packages/orq-rc/src/models/errors/index.ts +2 -0
  52. package/packages/orq-rc/src/models/errors/postv2agentsa2a.ts +96 -0
  53. package/packages/orq-rc/src/models/errors/postv2agentskeycardrefresh.ts +97 -0
  54. package/packages/orq-rc/src/models/operations/createagentrequest.ts +755 -1212
  55. package/packages/orq-rc/src/models/operations/createagentresponserequest.ts +35 -1
  56. package/packages/orq-rc/src/models/operations/createannotation.ts +5 -1
  57. package/packages/orq-rc/src/models/operations/createcontact.ts +1 -1
  58. package/packages/orq-rc/src/models/operations/createdataset.ts +1 -1
  59. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +4 -4
  60. package/packages/orq-rc/src/models/operations/createdatasource.ts +1 -1
  61. package/packages/orq-rc/src/models/operations/createeval.ts +16 -16
  62. package/packages/orq-rc/src/models/operations/createidentity.ts +1 -1
  63. package/packages/orq-rc/src/models/operations/createknowledge.ts +19 -17
  64. package/packages/orq-rc/src/models/operations/createprompt.ts +55 -66
  65. package/packages/orq-rc/src/models/operations/createtool.ts +103 -91
  66. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +38 -0
  67. package/packages/orq-rc/src/models/operations/deploymentstream.ts +38 -0
  68. package/packages/orq-rc/src/models/operations/fileget.ts +1 -1
  69. package/packages/orq-rc/src/models/operations/filelist.ts +1 -1
  70. package/packages/orq-rc/src/models/operations/fileupload.ts +1 -1
  71. package/packages/orq-rc/src/models/operations/getagentresponse.ts +46 -0
  72. package/packages/orq-rc/src/models/operations/getalltools.ts +93 -87
  73. package/packages/orq-rc/src/models/operations/getevals.ts +16 -16
  74. package/packages/orq-rc/src/models/operations/index.ts +3 -0
  75. package/packages/orq-rc/src/models/operations/invokeagent.ts +45 -1
  76. package/packages/orq-rc/src/models/operations/listagents.ts +751 -787
  77. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +4 -4
  78. package/packages/orq-rc/src/models/operations/listdatasets.ts +1 -1
  79. package/packages/orq-rc/src/models/operations/listdatasources.ts +1 -1
  80. package/packages/orq-rc/src/models/operations/listidentities.ts +1 -1
  81. package/packages/orq-rc/src/models/operations/listknowledgebases.ts +72 -64
  82. package/packages/orq-rc/src/models/operations/postv2agentsa2a.ts +252 -0
  83. package/packages/orq-rc/src/models/operations/postv2agentskeycardrefresh.ts +100 -0
  84. package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +962 -857
  85. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +4 -4
  86. package/packages/orq-rc/src/models/operations/retrievedataset.ts +1 -1
  87. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +1 -1
  88. package/packages/orq-rc/src/models/operations/retrieveidentity.ts +1 -1
  89. package/packages/orq-rc/src/models/operations/retrievetool.ts +6 -6
  90. package/packages/orq-rc/src/models/operations/runagent.ts +69 -493
  91. package/packages/orq-rc/src/models/operations/streamagent.ts +40 -1
  92. package/packages/orq-rc/src/models/operations/streamrunagent.ts +36 -493
  93. package/packages/orq-rc/src/models/operations/updateagent.ts +966 -1313
  94. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +4 -4
  95. package/packages/orq-rc/src/models/operations/updatedataset.ts +1 -1
  96. package/packages/orq-rc/src/models/operations/updatedatasource.ts +1 -1
  97. package/packages/orq-rc/src/models/operations/updateeval.ts +16 -16
  98. package/packages/orq-rc/src/models/operations/updateidentity.ts +1 -1
  99. package/packages/orq-rc/src/models/operations/updatetool.ts +7 -7
  100. package/packages/orq-rc/src/sdk/agents.ts +39 -1
  101. package/packages/orq-rc/src/sdk/responses.ts +19 -0
  102. package/src/lib/config.ts +3 -3
  103. package/src/models/components/partdoneevent.ts +1 -1
  104. package/src/models/components/reasoningpart.ts +1 -1
  105. package/src/models/operations/createcontact.ts +1 -1
  106. package/src/models/operations/createdataset.ts +1 -1
  107. package/src/models/operations/createdatasetitem.ts +4 -4
  108. package/src/models/operations/createdatasource.ts +1 -1
  109. package/src/models/operations/createeval.ts +16 -16
  110. package/src/models/operations/createidentity.ts +1 -1
  111. package/src/models/operations/createtool.ts +6 -6
  112. package/src/models/operations/fileget.ts +1 -1
  113. package/src/models/operations/filelist.ts +1 -1
  114. package/src/models/operations/fileupload.ts +1 -1
  115. package/src/models/operations/getalltools.ts +6 -6
  116. package/src/models/operations/getevals.ts +16 -16
  117. package/src/models/operations/listdatasetdatapoints.ts +4 -4
  118. package/src/models/operations/listdatasets.ts +1 -1
  119. package/src/models/operations/listdatasources.ts +1 -1
  120. package/src/models/operations/listidentities.ts +1 -1
  121. package/src/models/operations/retrievedatapoint.ts +4 -4
  122. package/src/models/operations/retrievedataset.ts +1 -1
  123. package/src/models/operations/retrievedatasource.ts +1 -1
  124. package/src/models/operations/retrieveidentity.ts +1 -1
  125. package/src/models/operations/retrievetool.ts +6 -6
  126. package/src/models/operations/runagent.ts +1 -1
  127. package/src/models/operations/streamrunagent.ts +1 -1
  128. package/src/models/operations/updatedatapoint.ts +4 -4
  129. package/src/models/operations/updatedataset.ts +1 -1
  130. package/src/models/operations/updatedatasource.ts +1 -1
  131. package/src/models/operations/updateeval.ts +16 -16
  132. package/src/models/operations/updateidentity.ts +1 -1
  133. package/src/models/operations/updatetool.ts +7 -7
@@ -0,0 +1,187 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { OrqCore } from "../core.js";
6
+ import { encodeJSON, encodeSimple } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import {
14
+ ConnectionError,
15
+ InvalidRequestError,
16
+ RequestAbortedError,
17
+ RequestTimeoutError,
18
+ UnexpectedClientError,
19
+ } from "../models/errors/httpclienterrors.js";
20
+ import * as errors from "../models/errors/index.js";
21
+ import { OrqError } from "../models/errors/orqerror.js";
22
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
23
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
+ import * as operations from "../models/operations/index.js";
25
+ import { APICall, APIPromise } from "../types/async.js";
26
+ import { Result } from "../types/fp.js";
27
+
28
+ /**
29
+ * Refresh A2A agent card
30
+ *
31
+ * @remarks
32
+ * Fetches the latest agent card from the external A2A agent and updates the cached card in the database. Similar to MCP server refresh functionality.
33
+ */
34
+ export function agentsPostV2AgentsKeyCardRefresh(
35
+ client: OrqCore,
36
+ request: operations.PostV2AgentsKeyCardRefreshRequest,
37
+ options?: RequestOptions,
38
+ ): APIPromise<
39
+ Result<
40
+ operations.PostV2AgentsKeyCardRefreshResponseBody,
41
+ | errors.PostV2AgentsKeyCardRefreshResponseBody
42
+ | errors.PostV2AgentsKeyCardRefreshAgentsResponseBody
43
+ | OrqError
44
+ | ResponseValidationError
45
+ | ConnectionError
46
+ | RequestAbortedError
47
+ | RequestTimeoutError
48
+ | InvalidRequestError
49
+ | UnexpectedClientError
50
+ | SDKValidationError
51
+ >
52
+ > {
53
+ return new APIPromise($do(
54
+ client,
55
+ request,
56
+ options,
57
+ ));
58
+ }
59
+
60
+ async function $do(
61
+ client: OrqCore,
62
+ request: operations.PostV2AgentsKeyCardRefreshRequest,
63
+ options?: RequestOptions,
64
+ ): Promise<
65
+ [
66
+ Result<
67
+ operations.PostV2AgentsKeyCardRefreshResponseBody,
68
+ | errors.PostV2AgentsKeyCardRefreshResponseBody
69
+ | errors.PostV2AgentsKeyCardRefreshAgentsResponseBody
70
+ | OrqError
71
+ | ResponseValidationError
72
+ | ConnectionError
73
+ | RequestAbortedError
74
+ | RequestTimeoutError
75
+ | InvalidRequestError
76
+ | UnexpectedClientError
77
+ | SDKValidationError
78
+ >,
79
+ APICall,
80
+ ]
81
+ > {
82
+ const parsed = safeParse(
83
+ request,
84
+ (value) =>
85
+ operations.PostV2AgentsKeyCardRefreshRequest$outboundSchema.parse(value),
86
+ "Input validation failed",
87
+ );
88
+ if (!parsed.ok) {
89
+ return [parsed, { status: "invalid" }];
90
+ }
91
+ const payload = parsed.value;
92
+ const body = encodeJSON("body", payload.RequestBody, { explode: true });
93
+
94
+ const pathParams = {
95
+ key: encodeSimple("key", payload.key, {
96
+ explode: false,
97
+ charEncoding: "percent",
98
+ }),
99
+ };
100
+
101
+ const path = pathToFunc("/v2/agents/{key}/card/refresh")(pathParams);
102
+
103
+ const headers = new Headers(compactMap({
104
+ "Content-Type": "application/json",
105
+ Accept: "application/json",
106
+ }));
107
+
108
+ const secConfig = await extractSecurity(client._options.apiKey);
109
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
110
+ const requestSecurity = resolveGlobalSecurity(securityInput);
111
+
112
+ const context = {
113
+ options: client._options,
114
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
115
+ operationID: "post_/v2/agents/{key}/card/refresh",
116
+ oAuth2Scopes: null,
117
+
118
+ resolvedSecurity: requestSecurity,
119
+
120
+ securitySource: client._options.apiKey,
121
+ retryConfig: options?.retries
122
+ || client._options.retryConfig
123
+ || { strategy: "none" },
124
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
125
+ };
126
+
127
+ const requestRes = client._createRequest(context, {
128
+ security: requestSecurity,
129
+ method: "POST",
130
+ baseURL: options?.serverURL,
131
+ path: path,
132
+ headers: headers,
133
+ body: body,
134
+ userAgent: client._options.userAgent,
135
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
136
+ }, options);
137
+ if (!requestRes.ok) {
138
+ return [requestRes, { status: "invalid" }];
139
+ }
140
+ const req = requestRes.value;
141
+
142
+ const doResult = await client._do(req, {
143
+ context,
144
+ errorCodes: ["400", "404", "4XX", "5XX"],
145
+ retryConfig: context.retryConfig,
146
+ retryCodes: context.retryCodes,
147
+ });
148
+ if (!doResult.ok) {
149
+ return [doResult, { status: "request-error", request: req }];
150
+ }
151
+ const response = doResult.value;
152
+
153
+ const responseFields = {
154
+ HttpMeta: { Response: response, Request: req },
155
+ };
156
+
157
+ const [result] = await M.match<
158
+ operations.PostV2AgentsKeyCardRefreshResponseBody,
159
+ | errors.PostV2AgentsKeyCardRefreshResponseBody
160
+ | errors.PostV2AgentsKeyCardRefreshAgentsResponseBody
161
+ | OrqError
162
+ | ResponseValidationError
163
+ | ConnectionError
164
+ | RequestAbortedError
165
+ | RequestTimeoutError
166
+ | InvalidRequestError
167
+ | UnexpectedClientError
168
+ | SDKValidationError
169
+ >(
170
+ M.json(
171
+ 200,
172
+ operations.PostV2AgentsKeyCardRefreshResponseBody$inboundSchema,
173
+ ),
174
+ M.jsonErr(400, errors.PostV2AgentsKeyCardRefreshResponseBody$inboundSchema),
175
+ M.jsonErr(
176
+ 404,
177
+ errors.PostV2AgentsKeyCardRefreshAgentsResponseBody$inboundSchema,
178
+ ),
179
+ M.fail("4XX"),
180
+ M.fail("5XX"),
181
+ )(response, req, { extraFields: responseFields });
182
+ if (!result.ok) {
183
+ return [result, { status: "complete", request: req, response }];
184
+ }
185
+
186
+ return [result, { status: "complete", request: req, response }];
187
+ }
@@ -0,0 +1,182 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { OrqCore } from "../core.js";
6
+ import { encodeSimple } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import * as components from "../models/components/index.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../models/errors/httpclienterrors.js";
21
+ import * as errors from "../models/errors/index.js";
22
+ import { OrqError } from "../models/errors/orqerror.js";
23
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
24
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
25
+ import * as operations from "../models/operations/index.js";
26
+ import { APICall, APIPromise } from "../types/async.js";
27
+ import { Result } from "../types/fp.js";
28
+
29
+ /**
30
+ * Get response
31
+ *
32
+ * @remarks
33
+ * Retrieves the current state of an agent response by task ID. Returns the response output, model information, token usage, and execution status. When the agent is still processing, the output array will be empty and status will be `in_progress`. Once completed, the response includes the full output, usage statistics, and finish reason.
34
+ */
35
+ export function agentsResponsesGet(
36
+ client: OrqCore,
37
+ request: operations.GetAgentResponseRequest,
38
+ options?: RequestOptions,
39
+ ): APIPromise<
40
+ Result<
41
+ components.GetAgentResponse,
42
+ | errors.HonoApiError
43
+ | OrqError
44
+ | ResponseValidationError
45
+ | ConnectionError
46
+ | RequestAbortedError
47
+ | RequestTimeoutError
48
+ | InvalidRequestError
49
+ | UnexpectedClientError
50
+ | SDKValidationError
51
+ >
52
+ > {
53
+ return new APIPromise($do(
54
+ client,
55
+ request,
56
+ options,
57
+ ));
58
+ }
59
+
60
+ async function $do(
61
+ client: OrqCore,
62
+ request: operations.GetAgentResponseRequest,
63
+ options?: RequestOptions,
64
+ ): Promise<
65
+ [
66
+ Result<
67
+ components.GetAgentResponse,
68
+ | errors.HonoApiError
69
+ | OrqError
70
+ | ResponseValidationError
71
+ | ConnectionError
72
+ | RequestAbortedError
73
+ | RequestTimeoutError
74
+ | InvalidRequestError
75
+ | UnexpectedClientError
76
+ | SDKValidationError
77
+ >,
78
+ APICall,
79
+ ]
80
+ > {
81
+ const parsed = safeParse(
82
+ request,
83
+ (value) => operations.GetAgentResponseRequest$outboundSchema.parse(value),
84
+ "Input validation failed",
85
+ );
86
+ if (!parsed.ok) {
87
+ return [parsed, { status: "invalid" }];
88
+ }
89
+ const payload = parsed.value;
90
+ const body = null;
91
+
92
+ const pathParams = {
93
+ agent_key: encodeSimple("agent_key", payload.agent_key, {
94
+ explode: false,
95
+ charEncoding: "percent",
96
+ }),
97
+ task_id: encodeSimple("task_id", payload.task_id, {
98
+ explode: false,
99
+ charEncoding: "percent",
100
+ }),
101
+ };
102
+
103
+ const path = pathToFunc("/v2/agents/{agent_key}/responses/{task_id}")(
104
+ pathParams,
105
+ );
106
+
107
+ const headers = new Headers(compactMap({
108
+ Accept: "application/json",
109
+ }));
110
+
111
+ const secConfig = await extractSecurity(client._options.apiKey);
112
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
113
+ const requestSecurity = resolveGlobalSecurity(securityInput);
114
+
115
+ const context = {
116
+ options: client._options,
117
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
118
+ operationID: "GetAgentResponse",
119
+ oAuth2Scopes: null,
120
+
121
+ resolvedSecurity: requestSecurity,
122
+
123
+ securitySource: client._options.apiKey,
124
+ retryConfig: options?.retries
125
+ || client._options.retryConfig
126
+ || { strategy: "none" },
127
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
128
+ };
129
+
130
+ const requestRes = client._createRequest(context, {
131
+ security: requestSecurity,
132
+ method: "GET",
133
+ baseURL: options?.serverURL,
134
+ path: path,
135
+ headers: headers,
136
+ body: body,
137
+ userAgent: client._options.userAgent,
138
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
139
+ }, options);
140
+ if (!requestRes.ok) {
141
+ return [requestRes, { status: "invalid" }];
142
+ }
143
+ const req = requestRes.value;
144
+
145
+ const doResult = await client._do(req, {
146
+ context,
147
+ errorCodes: ["404", "4XX", "5XX"],
148
+ retryConfig: context.retryConfig,
149
+ retryCodes: context.retryCodes,
150
+ });
151
+ if (!doResult.ok) {
152
+ return [doResult, { status: "request-error", request: req }];
153
+ }
154
+ const response = doResult.value;
155
+
156
+ const responseFields = {
157
+ HttpMeta: { Response: response, Request: req },
158
+ };
159
+
160
+ const [result] = await M.match<
161
+ components.GetAgentResponse,
162
+ | errors.HonoApiError
163
+ | OrqError
164
+ | ResponseValidationError
165
+ | ConnectionError
166
+ | RequestAbortedError
167
+ | RequestTimeoutError
168
+ | InvalidRequestError
169
+ | UnexpectedClientError
170
+ | SDKValidationError
171
+ >(
172
+ M.json(200, components.GetAgentResponse$inboundSchema),
173
+ M.jsonErr(404, errors.HonoApiError$inboundSchema),
174
+ M.fail("4XX"),
175
+ M.fail("5XX"),
176
+ )(response, req, { extraFields: responseFields });
177
+ if (!result.ok) {
178
+ return [result, { status: "complete", request: req, response }];
179
+ }
180
+
181
+ return [result, { status: "complete", request: req, response }];
182
+ }
@@ -33,7 +33,7 @@ import { Result } from "../types/fp.js";
33
33
  */
34
34
  export function agentsUpdate(
35
35
  client: OrqCore,
36
- requestBody: operations.UpdateAgentUpdateAgentRequest,
36
+ requestBody: operations.UpdateAgentRequestBody,
37
37
  agentKey: string,
38
38
  options?: RequestOptions,
39
39
  ): APIPromise<
@@ -60,7 +60,7 @@ export function agentsUpdate(
60
60
 
61
61
  async function $do(
62
62
  client: OrqCore,
63
- requestBody: operations.UpdateAgentUpdateAgentRequest,
63
+ requestBody: operations.UpdateAgentRequestBody,
64
64
  agentKey: string,
65
65
  options?: RequestOptions,
66
66
  ): Promise<
@@ -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.5.0-rc.23",
72
- genVersion: "2.846.1",
73
- userAgent: "speakeasy-sdk/typescript 4.5.0-rc.23 2.846.1 2.0 @orq-ai/node",
71
+ sdkVersion: "4.5.0-rc.33",
72
+ genVersion: "2.849.8",
73
+ userAgent: "speakeasy-sdk/typescript 4.5.0-rc.33 2.849.8 2.0 @orq-ai/node",
74
74
  } as const;
@@ -12,6 +12,7 @@ import {
12
12
  AgentResponseMessage,
13
13
  AgentResponseMessage$inboundSchema,
14
14
  } from "./agentresponsemessage.js";
15
+ import { Telemetry, Telemetry$inboundSchema } from "./telemetry.js";
15
16
 
16
17
  export type PromptTokensDetails = {
17
18
  cachedTokens?: number | null | undefined;
@@ -123,6 +124,10 @@ export type CreateAgentResponse = {
123
124
  * Tool calls awaiting user response (when finish_reason is function_call)
124
125
  */
125
126
  pendingToolCalls?: Array<PendingToolCalls> | undefined;
127
+ /**
128
+ * Telemetry information for correlating the response with traces
129
+ */
130
+ telemetry?: Telemetry | undefined;
126
131
  };
127
132
 
128
133
  /** @internal */
@@ -278,6 +283,7 @@ export const CreateAgentResponse$inboundSchema: z.ZodType<
278
283
  finish_reason: FinishReason$inboundSchema.optional(),
279
284
  pending_tool_calls: z.array(z.lazy(() => PendingToolCalls$inboundSchema))
280
285
  .optional(),
286
+ telemetry: Telemetry$inboundSchema.optional(),
281
287
  }).transform((v) => {
282
288
  return remap$(v, {
283
289
  "_id": "id",
@@ -0,0 +1,146 @@
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 { ClosedEnum } from "../../types/enums.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import { DataPart, DataPart$inboundSchema } from "./datapart.js";
11
+ import { ErrorPart, ErrorPart$inboundSchema } from "./errorpart.js";
12
+ import { FilePart, FilePart$inboundSchema } from "./filepart.js";
13
+ import { TextPart, TextPart$inboundSchema } from "./textpart.js";
14
+ import { ToolCallPart, ToolCallPart$inboundSchema } from "./toolcallpart.js";
15
+ import {
16
+ ToolResultPart,
17
+ ToolResultPart$inboundSchema,
18
+ } from "./toolresultpart.js";
19
+
20
+ export const ExtendedMessageKind = {
21
+ Message: "message",
22
+ } as const;
23
+ export type ExtendedMessageKind = ClosedEnum<typeof ExtendedMessageKind>;
24
+
25
+ /**
26
+ * Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
27
+ */
28
+ export const ExtendedMessageRole = {
29
+ User: "user",
30
+ Agent: "agent",
31
+ Tool: "tool",
32
+ System: "system",
33
+ } as const;
34
+ /**
35
+ * Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
36
+ */
37
+ export type ExtendedMessageRole = ClosedEnum<typeof ExtendedMessageRole>;
38
+
39
+ export type ExtendedMessageParts =
40
+ | TextPart
41
+ | ErrorPart
42
+ | DataPart
43
+ | FilePart
44
+ | ToolCallPart
45
+ | ToolResultPart;
46
+
47
+ /**
48
+ * Extended Agent-to-Agent protocol message with support for tool calls and tool results. Extends the base A2A message format with Orquesta-specific features.
49
+ */
50
+ export type ExtendedMessage = {
51
+ kind: ExtendedMessageKind;
52
+ /**
53
+ * Unique identifier for the message
54
+ */
55
+ messageId: string;
56
+ /**
57
+ * Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
58
+ */
59
+ role: ExtendedMessageRole;
60
+ /**
61
+ * Array of message parts (text, file, tool_call, tool_result)
62
+ */
63
+ parts: Array<
64
+ TextPart | ErrorPart | DataPart | FilePart | ToolCallPart | ToolResultPart
65
+ >;
66
+ /**
67
+ * Associated task ID if applicable
68
+ */
69
+ taskId?: string | undefined;
70
+ /**
71
+ * Correlation ID for execution tracking
72
+ */
73
+ contextId?: string | undefined;
74
+ /**
75
+ * Additional message metadata
76
+ */
77
+ metadata?: { [k: string]: any } | undefined;
78
+ };
79
+
80
+ /** @internal */
81
+ export const ExtendedMessageKind$inboundSchema: z.ZodNativeEnum<
82
+ typeof ExtendedMessageKind
83
+ > = z.nativeEnum(ExtendedMessageKind);
84
+
85
+ /** @internal */
86
+ export const ExtendedMessageRole$inboundSchema: z.ZodNativeEnum<
87
+ typeof ExtendedMessageRole
88
+ > = z.nativeEnum(ExtendedMessageRole);
89
+
90
+ /** @internal */
91
+ export const ExtendedMessageParts$inboundSchema: z.ZodType<
92
+ ExtendedMessageParts,
93
+ z.ZodTypeDef,
94
+ unknown
95
+ > = z.union([
96
+ TextPart$inboundSchema,
97
+ ErrorPart$inboundSchema,
98
+ DataPart$inboundSchema,
99
+ FilePart$inboundSchema,
100
+ ToolCallPart$inboundSchema,
101
+ ToolResultPart$inboundSchema,
102
+ ]);
103
+
104
+ export function extendedMessagePartsFromJSON(
105
+ jsonString: string,
106
+ ): SafeParseResult<ExtendedMessageParts, SDKValidationError> {
107
+ return safeParse(
108
+ jsonString,
109
+ (x) => ExtendedMessageParts$inboundSchema.parse(JSON.parse(x)),
110
+ `Failed to parse 'ExtendedMessageParts' from JSON`,
111
+ );
112
+ }
113
+
114
+ /** @internal */
115
+ export const ExtendedMessage$inboundSchema: z.ZodType<
116
+ ExtendedMessage,
117
+ z.ZodTypeDef,
118
+ unknown
119
+ > = z.object({
120
+ kind: ExtendedMessageKind$inboundSchema,
121
+ messageId: z.string(),
122
+ role: ExtendedMessageRole$inboundSchema,
123
+ parts: z.array(
124
+ z.union([
125
+ TextPart$inboundSchema,
126
+ ErrorPart$inboundSchema,
127
+ DataPart$inboundSchema,
128
+ FilePart$inboundSchema,
129
+ ToolCallPart$inboundSchema,
130
+ ToolResultPart$inboundSchema,
131
+ ]),
132
+ ),
133
+ taskId: z.string().optional(),
134
+ contextId: z.string().optional(),
135
+ metadata: z.record(z.any()).optional(),
136
+ });
137
+
138
+ export function extendedMessageFromJSON(
139
+ jsonString: string,
140
+ ): SafeParseResult<ExtendedMessage, SDKValidationError> {
141
+ return safeParse(
142
+ jsonString,
143
+ (x) => ExtendedMessage$inboundSchema.parse(JSON.parse(x)),
144
+ `Failed to parse 'ExtendedMessage' from JSON`,
145
+ );
146
+ }