@orq-ai/node 4.3.0-rc.6 → 4.3.0-rc.60

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 (191) hide show
  1. package/README.md +16 -11
  2. package/examples/package-lock.json +3 -3
  3. package/funcs/agentsList.js +1 -1
  4. package/funcs/agentsList.js.map +1 -1
  5. package/funcs/evalsInvoke.d.ts +1 -1
  6. package/funcs/evalsInvoke.d.ts.map +1 -1
  7. package/funcs/evalsInvoke.js +2 -2
  8. package/funcs/evalsInvoke.js.map +1 -1
  9. package/jsr.json +1 -1
  10. package/lib/config.d.ts +3 -3
  11. package/lib/config.js +3 -3
  12. package/lib/config.js.map +1 -1
  13. package/lib/event-streams.d.ts.map +1 -1
  14. package/lib/event-streams.js +40 -21
  15. package/lib/event-streams.js.map +1 -1
  16. package/models/components/agentstartedstreamingevent.d.ts +5 -0
  17. package/models/components/agentstartedstreamingevent.d.ts.map +1 -1
  18. package/models/components/agentstartedstreamingevent.js +4 -0
  19. package/models/components/agentstartedstreamingevent.js.map +1 -1
  20. package/models/components/conversationresponse.js +1 -1
  21. package/models/components/conversationwithmessagesresponse.js +1 -1
  22. package/models/components/partdoneevent.js +1 -1
  23. package/models/components/reasoningpart.js +1 -1
  24. package/models/components/toolexecutionstartedstreamingevent.d.ts +1 -0
  25. package/models/components/toolexecutionstartedstreamingevent.d.ts.map +1 -1
  26. package/models/components/toolexecutionstartedstreamingevent.js +2 -0
  27. package/models/components/toolexecutionstartedstreamingevent.js.map +1 -1
  28. package/models/errors/invokeeval.d.ts +23 -3
  29. package/models/errors/invokeeval.d.ts.map +1 -1
  30. package/models/errors/invokeeval.js +28 -2
  31. package/models/errors/invokeeval.js.map +1 -1
  32. package/models/operations/createagentrequest.d.ts +9 -0
  33. package/models/operations/createagentrequest.d.ts.map +1 -1
  34. package/models/operations/createagentrequest.js +4 -0
  35. package/models/operations/createagentrequest.js.map +1 -1
  36. package/models/operations/createchatcompletion.d.ts +2 -2
  37. package/models/operations/createcompletion.d.ts +2 -2
  38. package/models/operations/createcontact.js +1 -1
  39. package/models/operations/createconversation.js +1 -1
  40. package/models/operations/createconversationresponse.js +2 -2
  41. package/models/operations/createdataset.js +1 -1
  42. package/models/operations/createdatasetitem.js +4 -4
  43. package/models/operations/createdatasource.js +1 -1
  44. package/models/operations/createeval.js +14 -14
  45. package/models/operations/createidentity.js +1 -1
  46. package/models/operations/createtool.js +6 -6
  47. package/models/operations/deployments.js +1 -1
  48. package/models/operations/deployments.js.map +1 -1
  49. package/models/operations/fileget.js +1 -1
  50. package/models/operations/filelist.js +2 -2
  51. package/models/operations/filelist.js.map +1 -1
  52. package/models/operations/fileupload.js +1 -1
  53. package/models/operations/generateconversationname.js +1 -1
  54. package/models/operations/getallmemories.js +1 -1
  55. package/models/operations/getallmemories.js.map +1 -1
  56. package/models/operations/getallmemorydocuments.js +1 -1
  57. package/models/operations/getallmemorydocuments.js.map +1 -1
  58. package/models/operations/getallmemorystores.js +1 -1
  59. package/models/operations/getallmemorystores.js.map +1 -1
  60. package/models/operations/getallprompts.js +1 -1
  61. package/models/operations/getallprompts.js.map +1 -1
  62. package/models/operations/getalltools.js +6 -6
  63. package/models/operations/getevals.js +15 -15
  64. package/models/operations/getevals.js.map +1 -1
  65. package/models/operations/getv2evaluatorsidversions.js +1 -1
  66. package/models/operations/getv2evaluatorsidversions.js.map +1 -1
  67. package/models/operations/getv2toolstoolidversions.js +1 -1
  68. package/models/operations/getv2toolstoolidversions.js.map +1 -1
  69. package/models/operations/invokeeval.d.ts +15 -1
  70. package/models/operations/invokeeval.d.ts.map +1 -1
  71. package/models/operations/invokeeval.js +12 -1
  72. package/models/operations/invokeeval.js.map +1 -1
  73. package/models/operations/listagents.d.ts +4 -0
  74. package/models/operations/listagents.d.ts.map +1 -1
  75. package/models/operations/listagents.js +2 -0
  76. package/models/operations/listagents.js.map +1 -1
  77. package/models/operations/listchunks.js +1 -1
  78. package/models/operations/listchunks.js.map +1 -1
  79. package/models/operations/listdatasetdatapoints.js +5 -5
  80. package/models/operations/listdatasetdatapoints.js.map +1 -1
  81. package/models/operations/listdatasets.js +2 -2
  82. package/models/operations/listdatasets.js.map +1 -1
  83. package/models/operations/listdatasources.js +1 -1
  84. package/models/operations/listidentities.js +2 -2
  85. package/models/operations/listidentities.js.map +1 -1
  86. package/models/operations/listknowledgebases.js +1 -1
  87. package/models/operations/listknowledgebases.js.map +1 -1
  88. package/models/operations/listpromptversions.js +1 -1
  89. package/models/operations/listpromptversions.js.map +1 -1
  90. package/models/operations/retrieveagentrequest.d.ts +4 -0
  91. package/models/operations/retrieveagentrequest.d.ts.map +1 -1
  92. package/models/operations/retrieveagentrequest.js +2 -0
  93. package/models/operations/retrieveagentrequest.js.map +1 -1
  94. package/models/operations/retrievedatapoint.js +4 -4
  95. package/models/operations/retrievedataset.js +1 -1
  96. package/models/operations/retrievedatasource.js +1 -1
  97. package/models/operations/retrieveidentity.js +1 -1
  98. package/models/operations/retrievetool.js +6 -6
  99. package/models/operations/runagent.d.ts +5 -0
  100. package/models/operations/runagent.d.ts.map +1 -1
  101. package/models/operations/runagent.js +3 -1
  102. package/models/operations/runagent.js.map +1 -1
  103. package/models/operations/searchknowledge.d.ts +2 -2
  104. package/models/operations/streamrunagent.d.ts +5 -0
  105. package/models/operations/streamrunagent.d.ts.map +1 -1
  106. package/models/operations/streamrunagent.js +3 -1
  107. package/models/operations/streamrunagent.js.map +1 -1
  108. package/models/operations/updateagent.d.ts +9 -0
  109. package/models/operations/updateagent.d.ts.map +1 -1
  110. package/models/operations/updateagent.js +4 -0
  111. package/models/operations/updateagent.js.map +1 -1
  112. package/models/operations/updateconversation.js +1 -1
  113. package/models/operations/updatedatapoint.js +4 -4
  114. package/models/operations/updatedataset.js +1 -1
  115. package/models/operations/updatedatasource.js +1 -1
  116. package/models/operations/updateeval.js +14 -14
  117. package/models/operations/updateidentity.js +1 -1
  118. package/models/operations/updatememorydocument.d.ts +2 -2
  119. package/models/operations/updatememorydocument.d.ts.map +1 -1
  120. package/models/operations/updatememorydocument.js +1 -1
  121. package/models/operations/updatememorydocument.js.map +1 -1
  122. package/models/operations/updatetool.js +7 -7
  123. package/package.json +3 -3
  124. package/sdk/agents.d.ts +7 -7
  125. package/sdk/agents.d.ts.map +1 -1
  126. package/sdk/agents.js +9 -9
  127. package/sdk/agents.js.map +1 -1
  128. package/src/funcs/agentsList.ts +1 -1
  129. package/src/funcs/evalsInvoke.ts +7 -3
  130. package/src/lib/config.ts +3 -3
  131. package/src/lib/event-streams.ts +37 -20
  132. package/src/models/components/agentstartedstreamingevent.ts +9 -0
  133. package/src/models/components/conversationresponse.ts +1 -1
  134. package/src/models/components/conversationwithmessagesresponse.ts +1 -1
  135. package/src/models/components/partdoneevent.ts +1 -1
  136. package/src/models/components/reasoningpart.ts +1 -1
  137. package/src/models/components/toolexecutionstartedstreamingevent.ts +3 -0
  138. package/src/models/errors/invokeeval.ts +48 -3
  139. package/src/models/operations/createagentrequest.ts +13 -0
  140. package/src/models/operations/createchatcompletion.ts +2 -2
  141. package/src/models/operations/createcompletion.ts +2 -2
  142. package/src/models/operations/createcontact.ts +1 -1
  143. package/src/models/operations/createconversation.ts +1 -1
  144. package/src/models/operations/createconversationresponse.ts +2 -2
  145. package/src/models/operations/createdataset.ts +1 -1
  146. package/src/models/operations/createdatasetitem.ts +4 -4
  147. package/src/models/operations/createdatasource.ts +1 -1
  148. package/src/models/operations/createeval.ts +14 -14
  149. package/src/models/operations/createidentity.ts +1 -1
  150. package/src/models/operations/createtool.ts +6 -6
  151. package/src/models/operations/deployments.ts +1 -1
  152. package/src/models/operations/fileget.ts +1 -1
  153. package/src/models/operations/filelist.ts +2 -2
  154. package/src/models/operations/fileupload.ts +1 -1
  155. package/src/models/operations/generateconversationname.ts +1 -1
  156. package/src/models/operations/getallmemories.ts +1 -1
  157. package/src/models/operations/getallmemorydocuments.ts +1 -1
  158. package/src/models/operations/getallmemorystores.ts +1 -1
  159. package/src/models/operations/getallprompts.ts +1 -1
  160. package/src/models/operations/getalltools.ts +6 -6
  161. package/src/models/operations/getevals.ts +15 -15
  162. package/src/models/operations/getv2evaluatorsidversions.ts +1 -1
  163. package/src/models/operations/getv2toolstoolidversions.ts +1 -1
  164. package/src/models/operations/invokeeval.ts +34 -1
  165. package/src/models/operations/listagents.ts +6 -0
  166. package/src/models/operations/listchunks.ts +1 -1
  167. package/src/models/operations/listdatasetdatapoints.ts +5 -5
  168. package/src/models/operations/listdatasets.ts +2 -2
  169. package/src/models/operations/listdatasources.ts +1 -1
  170. package/src/models/operations/listidentities.ts +2 -2
  171. package/src/models/operations/listknowledgebases.ts +1 -1
  172. package/src/models/operations/listpromptversions.ts +1 -1
  173. package/src/models/operations/retrieveagentrequest.ts +6 -0
  174. package/src/models/operations/retrievedatapoint.ts +4 -4
  175. package/src/models/operations/retrievedataset.ts +1 -1
  176. package/src/models/operations/retrievedatasource.ts +1 -1
  177. package/src/models/operations/retrieveidentity.ts +1 -1
  178. package/src/models/operations/retrievetool.ts +6 -6
  179. package/src/models/operations/runagent.ts +8 -1
  180. package/src/models/operations/searchknowledge.ts +2 -2
  181. package/src/models/operations/streamrunagent.ts +8 -1
  182. package/src/models/operations/updateagent.ts +13 -0
  183. package/src/models/operations/updateconversation.ts +1 -1
  184. package/src/models/operations/updatedatapoint.ts +4 -4
  185. package/src/models/operations/updatedataset.ts +1 -1
  186. package/src/models/operations/updatedatasource.ts +1 -1
  187. package/src/models/operations/updateeval.ts +14 -14
  188. package/src/models/operations/updateidentity.ts +1 -1
  189. package/src/models/operations/updatememorydocument.ts +3 -3
  190. package/src/models/operations/updatetool.ts +7 -7
  191. package/src/sdk/agents.ts +21 -21
@@ -339,7 +339,7 @@ function updateToolRequestBodyToolsSchemaToJSON(updateToolRequestBodyToolsSchema
339
339
  }
340
340
  /** @internal */
341
341
  exports.RequestBodyTools$outboundSchema = z.object({
342
- id: z.string().default("01KG1DFQDAXA6ETYVVG9CGMZ4G"),
342
+ id: z.string().default("01KH91GGYCDXY3Y0786YB3TQZ9"),
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("tool_01KG1DFQD4WKMSV14CRT9TRZR9"),
615
+ _id: z.string().default("tool_01KH91GGXYZSWSRCMTJDBF2ZDJ"),
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("01KG1DFQD30PKNQKV1HJMW30B1"),
670
+ id: z.string().default("01KH91GGXX8XRKQJ9N4ZC9FZWJ"),
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("tool_01KG1DFQD1CV9H6GWE5XMNCNAR"),
698
+ _id: z.string().default("tool_01KH91GGXWXE48N6TKY2SV5WGB"),
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("tool_01KG1DFQCYMQ1XXA2F61DAM770"),
787
+ _id: z.string().default("tool_01KH91GGXT5CQKY6QYN4SBQG27"),
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("tool_01KG1DFQCXSS583F05FVRY18WW"),
839
+ _id: z.string().default("tool_01KH91GGXS4XZQC4HKSG0TNZ2V"),
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("tool_01KG1DFQCWRX2NRWMXKVSN2TNP"),
895
+ _id: z.string().default("tool_01KH91GGXQ8QQ6WZV6SWNENR2J"),
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.0-rc.6",
3
+ "version": "4.3.0-rc.60",
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.19.0",
22
- "eslint": "^9.19.0",
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/sdk/agents.d.ts CHANGED
@@ -12,6 +12,13 @@ export declare class Agents extends ClientSDK {
12
12
  * Creates a new agent with the specified configuration, including model selection, instructions, tools, and knowledge bases. Agents are intelligent assistants that can execute tasks, interact with tools, and maintain context through memory stores. The agent can be configured with a primary model and optional fallback models for automatic failover, custom instructions for behavior control, and various settings to control execution limits and tool usage.
13
13
  */
14
14
  create(request: operations.CreateAgentRequestRequestBody, options?: RequestOptions): Promise<operations.CreateAgentRequestResponseBody>;
15
+ /**
16
+ * List agents
17
+ *
18
+ * @remarks
19
+ * Retrieves a comprehensive list of agents configured in your workspace. Supports pagination for large datasets and returns agents sorted by creation date (newest first). Each agent in the response includes its complete configuration: model settings with fallback options, instructions, tools, knowledge bases, memory stores, and execution parameters. Use pagination parameters to efficiently navigate through large collections of agents.
20
+ */
21
+ list(limit?: number | undefined, startingAfter?: string | undefined, endingBefore?: string | undefined, options?: RequestOptions): Promise<operations.ListAgentsResponseBody>;
15
22
  /**
16
23
  * Delete agent
17
24
  *
@@ -42,13 +49,6 @@ export declare class Agents extends ClientSDK {
42
49
  * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
43
50
  */
44
51
  invoke(key: string, requestBody?: operations.InvokeAgentRequestBody | undefined, options?: RequestOptions): Promise<operations.InvokeAgentA2ATaskResponse>;
45
- /**
46
- * List agents
47
- *
48
- * @remarks
49
- * Retrieves a comprehensive list of agents configured in your workspace. Supports pagination for large datasets and returns agents sorted by creation date (newest first). Each agent in the response includes its complete configuration: model settings with fallback options, instructions, tools, knowledge bases, memory stores, and execution parameters. Use pagination parameters to efficiently navigate through large collections of agents.
50
- */
51
- list(limit?: number | undefined, startingAfter?: string | undefined, endingBefore?: string | undefined, options?: RequestOptions): Promise<operations.ListAgentsResponseBody>;
52
52
  /**
53
53
  * Run an agent with configuration
54
54
  *
@@ -1 +1 @@
1
- {"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../src/sdk/agents.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,qBAAa,MAAO,SAAQ,SAAS;IACnC,OAAO,CAAC,UAAU,CAAC,CA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,GACvB,OAAO,CAAC,UAAU,CAAC,gCAAgC,CAAC;IAQvD;;;;;OAKG;IACG,MAAM,CACV,WAAW,EAAE,UAAU,CAAC,6BAA6B,EACrD,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,uBAAuB,CAAC;IAS9C;;;;;;;OAOG;IACG,MAAM,CACV,GAAG,EAAE,MAAM,EACX,WAAW,CAAC,EAAE,UAAU,CAAC,sBAAsB,GAAG,SAAS,EAC3D,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,0BAA0B,CAAC;IASjD;;;;;;;OAOG;IACG,GAAG,CACP,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,uBAAuB,CAAC;IAQ9C;;;;;;;OAOG;IACG,SAAS,CACb,OAAO,EAAE,UAAU,CAAC,yBAAyB,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,0BAA0B,CAAC,CAAC;IAQ9D;;;;;;;OAOG;IACG,MAAM,CACV,WAAW,EAAE,UAAU,CAAC,sBAAsB,EAC9C,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC;CAQ5D"}
package/sdk/agents.js CHANGED
@@ -29,6 +29,15 @@ class Agents extends sdks_js_1.ClientSDK {
29
29
  async create(request, options) {
30
30
  return (0, fp_js_1.unwrapAsync)((0, agentsCreate_js_1.agentsCreate)(this, request, options));
31
31
  }
32
+ /**
33
+ * List agents
34
+ *
35
+ * @remarks
36
+ * Retrieves a comprehensive list of agents configured in your workspace. Supports pagination for large datasets and returns agents sorted by creation date (newest first). Each agent in the response includes its complete configuration: model settings with fallback options, instructions, tools, knowledge bases, memory stores, and execution parameters. Use pagination parameters to efficiently navigate through large collections of agents.
37
+ */
38
+ async list(limit, startingAfter, endingBefore, options) {
39
+ return (0, fp_js_1.unwrapAsync)((0, agentsList_js_1.agentsList)(this, limit, startingAfter, endingBefore, options));
40
+ }
32
41
  /**
33
42
  * Delete agent
34
43
  *
@@ -67,15 +76,6 @@ class Agents extends sdks_js_1.ClientSDK {
67
76
  async invoke(key, requestBody, options) {
68
77
  return (0, fp_js_1.unwrapAsync)((0, agentsInvoke_js_1.agentsInvoke)(this, key, requestBody, options));
69
78
  }
70
- /**
71
- * List agents
72
- *
73
- * @remarks
74
- * Retrieves a comprehensive list of agents configured in your workspace. Supports pagination for large datasets and returns agents sorted by creation date (newest first). Each agent in the response includes its complete configuration: model settings with fallback options, instructions, tools, knowledge bases, memory stores, and execution parameters. Use pagination parameters to efficiently navigate through large collections of agents.
75
- */
76
- async list(limit, startingAfter, endingBefore, options) {
77
- return (0, fp_js_1.unwrapAsync)((0, agentsList_js_1.agentsList)(this, limit, startingAfter, endingBefore, options));
78
- }
79
79
  /**
80
80
  * Run an agent with configuration
81
81
  *
package/sdk/agents.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"agents.js","sourceRoot":"","sources":["../src/sdk/agents.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,8DAAwD;AACxD,8DAAwD;AACxD,8DAAwD;AACxD,0DAAoD;AACpD,kEAA4D;AAC5D,wDAAkD;AAClD,8DAAwD;AACxD,oEAA8D;AAC9D,8DAAwD;AAExD,4CAA2D;AAE3D,0CAA6C;AAC7C,iDAA2C;AAE3C,MAAa,MAAO,SAAQ,mBAAS;IAEnC,IAAI,SAAS;QACX,OAAO,CAAC,IAAI,CAAC,UAAU,KAAf,IAAI,CAAC,UAAU,GAAK,IAAI,wBAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAC5D,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,OAAiD,EACjD,OAAwB;QAExB,OAAO,IAAA,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I,EACJ,WAAW,EACX,GAAG,EACH,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AAhLD,wBAgLC"}
@@ -98,7 +98,7 @@ async function $do(
98
98
  const payload = parsed.value;
99
99
  const body = null;
100
100
 
101
- const path = pathToFunc("/v2/agents/")();
101
+ const path = pathToFunc("/v2/agents")();
102
102
 
103
103
  const query = encodeFormQuery({
104
104
  "ending_before": payload?.ending_before,
@@ -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(404, errors.InvokeEvalResponseBody$inboundSchema),
168
- M.jsonErr(500, errors.InvokeEvalEvalsResponseBody$inboundSchema),
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.0-rc.6",
72
- genVersion: "2.801.0",
73
- userAgent: "speakeasy-sdk/typescript 4.3.0-rc.6 2.801.0 2.0 @orq-ai/node",
71
+ sdkVersion: "4.3.0-rc.60",
72
+ genVersion: "2.821.4",
73
+ userAgent: "speakeasy-sdk/typescript 4.3.0-rc.60 2.821.4 2.0 @orq-ai/node",
74
74
  } as const;
@@ -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
- /** Finds the first (CR,LF,CR,LF) or (CR,CR) or (LF,LF) */
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
- i <= len - 4
95
- && buf[i] === 13 && buf[i + 1] === 10 && buf[i + 2] === 13
96
- && buf[i + 3] === 10
97
- ) {
98
- return { index: i, length: 4 };
99
- }
100
- if (i <= len - 2 && buf[i] === 13 && buf[i + 1] === 13) {
101
- return { index: i, length: 2 };
102
- }
103
- if (i <= len - 2 && buf[i] === 10 && buf[i + 1] === 10) {
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
- const field = line.slice(0, i);
123
- const value = line[i + 1] === " " ? line.slice(i + 2) : line.slice(i + 1);
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") ret.id = value;
127
- else if (field === "retry") {
128
- const n = Number(value);
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("conv_01kg1dfq1wfmbe14djq1meeara"),
110
+ _id: z.string().default("conv_01kh91gghxenkjd24bzx9e3kh9"),
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("conv_01kg1dfq22qq2ssjfvjb54dh09"),
125
+ _id: z.string().default("conv_01kh91ggjfyfg809y7a1gan9xe"),
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("reasoning_01kg1dfpq8xgqyxzzgwdv0b6cs"),
79
+ _id: z.string().default("reasoning_01kh91gg71d5ygv4c9d705vw6b"),
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("reasoning_01kg1dfppxy914gvk5v7g9rb8y"),
43
+ _id: z.string().default("reasoning_01kh91gg6vves3d8dd2jpj3f00"),
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 InvokeEvalEvalsResponseBodyData = {
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
- * Workspace ID is not found on the request
61
+ * Bad request
36
62
  */
37
63
  export type InvokeEvalResponseBodyData = {
38
64
  message: string;
39
65
  };
40
66
 
41
67
  /**
42
- * Workspace ID is not found on the request
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,
@@ -1502,6 +1502,10 @@ export type Settings = {
1502
1502
  * 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
1503
  */
1504
1504
  maxExecutionTime?: number | undefined;
1505
+ /**
1506
+ * 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
1507
+ */
1508
+ maxCost?: number | undefined;
1505
1509
  /**
1506
1510
  * 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
1511
  */
@@ -1765,6 +1769,10 @@ export type CreateAgentRequestSettings = {
1765
1769
  * 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
1770
  */
1767
1771
  maxExecutionTime: number;
1772
+ /**
1773
+ * 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
1774
+ */
1775
+ maxCost: number;
1768
1776
  /**
1769
1777
  * 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
1778
  */
@@ -5065,6 +5073,7 @@ export function createAgentRequestGuardrailsToJSON(
5065
5073
  export type Settings$Outbound = {
5066
5074
  max_iterations: number;
5067
5075
  max_execution_time: number;
5076
+ max_cost: number;
5068
5077
  tool_approval_required: string;
5069
5078
  tools?:
5070
5079
  | Array<
@@ -5098,6 +5107,7 @@ export const Settings$outboundSchema: z.ZodType<
5098
5107
  > = z.object({
5099
5108
  maxIterations: z.number().int().default(100),
5100
5109
  maxExecutionTime: z.number().int().default(600),
5110
+ maxCost: z.number().default(0),
5101
5111
  toolApprovalRequired: ToolApprovalRequired$outboundSchema.default(
5102
5112
  "respect_tool",
5103
5113
  ),
@@ -5128,6 +5138,7 @@ export const Settings$outboundSchema: z.ZodType<
5128
5138
  return remap$(v, {
5129
5139
  maxIterations: "max_iterations",
5130
5140
  maxExecutionTime: "max_execution_time",
5141
+ maxCost: "max_cost",
5131
5142
  toolApprovalRequired: "tool_approval_required",
5132
5143
  });
5133
5144
  });
@@ -5391,6 +5402,7 @@ export const CreateAgentRequestSettings$inboundSchema: z.ZodType<
5391
5402
  > = z.object({
5392
5403
  max_iterations: z.number().int().default(100),
5393
5404
  max_execution_time: z.number().int().default(600),
5405
+ max_cost: z.number().default(0),
5394
5406
  tool_approval_required: CreateAgentRequestToolApprovalRequired$inboundSchema
5395
5407
  .default("respect_tool"),
5396
5408
  tools: z.array(z.lazy(() => CreateAgentRequestTools$inboundSchema))
@@ -5404,6 +5416,7 @@ export const CreateAgentRequestSettings$inboundSchema: z.ZodType<
5404
5416
  return remap$(v, {
5405
5417
  "max_iterations": "maxIterations",
5406
5418
  "max_execution_time": "maxExecutionTime",
5419
+ "max_cost": "maxCost",
5407
5420
  "tool_approval_required": "toolApprovalRequired",
5408
5421
  });
5409
5422
  });
@@ -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://dash.readme.com/project/orqai/v2.0/docs/searching-a-knowledge-base) for more information.
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://dash.readme.com/project/orqai/v2.0/docs/searching-a-knowledge-base) for more information.
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://dash.readme.com/project/orqai/v2.0/docs/searching-a-knowledge-base) for more information.
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://dash.readme.com/project/orqai/v2.0/docs/searching-a-knowledge-base) for more information.
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-01-28T04:23:34.300Z",
137
+ "2026-02-12T13:43:53.762Z",
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("conv_01kg1dfq1y72kxxasw3fyt8bkx"),
204
+ _id: z.string().default("conv_01kh91ggj7q86gjndxts53kyp4"),
205
205
  kind: CreateConversationKind$inboundSchema,
206
206
  displayName: z.string(),
207
207
  createdAt: z.number(),