@orq-ai/node 4.14.3 → 4.14.4

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 (197) 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/lib/encodings.d.ts +10 -9
  5. package/lib/encodings.d.ts.map +1 -1
  6. package/lib/encodings.js +29 -13
  7. package/lib/encodings.js.map +1 -1
  8. package/models/components/evaluatorresponsefunction.js +2 -2
  9. package/models/components/evaluatorresponsehttp.js +2 -2
  10. package/models/components/evaluatorresponsejsonschema.js +2 -2
  11. package/models/components/evaluatorresponsellm.js +2 -2
  12. package/models/components/evaluatorresponsepython.js +2 -2
  13. package/models/components/evaluatorresponseragas.js +2 -2
  14. package/models/components/evaluatorresponsetypescript.js +2 -2
  15. package/models/components/reasoningpart.js +1 -1
  16. package/models/operations/createannotationqueue.js +1 -1
  17. package/models/operations/createdataset.js +1 -1
  18. package/models/operations/createdatasetitem.js +5 -5
  19. package/models/operations/createtool.js +4 -4
  20. package/models/operations/getalltools.js +4 -4
  21. package/models/operations/geteval.js +16 -16
  22. package/models/operations/getv2humanevalsets.js +2 -2
  23. package/models/operations/getv2humanevalsetsid.js +2 -2
  24. package/models/operations/listannotationqueues.js +1 -1
  25. package/models/operations/listdatasetdatapoints.js +5 -5
  26. package/models/operations/listdatasets.js +1 -1
  27. package/models/operations/patchv2humanevalsetsid.js +2 -2
  28. package/models/operations/postv2feedbackevaluation.js +4 -4
  29. package/models/operations/postv2humanevalsets.js +2 -2
  30. package/models/operations/retrieveannotationqueue.js +1 -1
  31. package/models/operations/retrievedatapoint.js +5 -5
  32. package/models/operations/retrievedataset.js +1 -1
  33. package/models/operations/retrievetool.js +4 -4
  34. package/models/operations/runagent.js +1 -1
  35. package/models/operations/streamrunagent.js +1 -1
  36. package/models/operations/updateannotationqueue.js +1 -1
  37. package/models/operations/updatedatapoint.js +5 -5
  38. package/models/operations/updatedataset.js +1 -1
  39. package/models/operations/updatetool.js +4 -4
  40. package/package.json +3 -3
  41. package/packages/orq-rc/examples/{evalsAll.example.ts → deploymentsList.example.ts} +2 -2
  42. package/packages/orq-rc/src/funcs/annotationQueuesAddItems.ts +9 -10
  43. package/packages/orq-rc/src/funcs/annotationQueuesClear.ts +8 -8
  44. package/packages/orq-rc/src/funcs/annotationQueuesCreate.ts +10 -13
  45. package/packages/orq-rc/src/funcs/annotationQueuesDelete.ts +8 -8
  46. package/packages/orq-rc/src/funcs/annotationQueuesList.ts +6 -5
  47. package/packages/orq-rc/src/funcs/annotationQueuesListItems.ts +6 -5
  48. package/packages/orq-rc/src/funcs/annotationQueuesRemoveItems.ts +12 -10
  49. package/packages/orq-rc/src/funcs/annotationQueuesRetrieve.ts +6 -5
  50. package/packages/orq-rc/src/funcs/annotationQueuesRetrieveItem.ts +8 -6
  51. package/packages/orq-rc/src/funcs/annotationQueuesUpdate.ts +10 -7
  52. package/packages/orq-rc/src/funcs/evalsAll.ts +6 -14
  53. package/packages/orq-rc/src/funcs/evalsCreate.ts +10 -35
  54. package/packages/orq-rc/src/funcs/evalsDelete.ts +6 -19
  55. package/packages/orq-rc/src/funcs/evalsGet.ts +6 -14
  56. package/packages/orq-rc/src/funcs/evalsGetVersion.ts +174 -0
  57. package/packages/orq-rc/src/funcs/evalsListVersions.ts +11 -20
  58. package/packages/orq-rc/src/funcs/evalsUpdate.ts +6 -14
  59. package/packages/orq-rc/src/lib/config.ts +3 -3
  60. package/packages/orq-rc/src/lib/encodings.ts +58 -23
  61. package/packages/orq-rc/src/models/components/addannotationqueueitemsrequest.ts +41 -0
  62. package/packages/orq-rc/src/models/components/addannotationqueueitemsresponse.ts +38 -0
  63. package/packages/orq-rc/src/models/components/agentresponserequest.ts +17 -10
  64. package/packages/orq-rc/src/models/components/annotationqueue.ts +101 -0
  65. package/packages/orq-rc/src/models/components/annotationqueueitem.ts +80 -0
  66. package/packages/orq-rc/src/models/components/annotationqueueitemref.ts +43 -0
  67. package/packages/orq-rc/src/models/components/annotationqueuemetadata.ts +42 -0
  68. package/packages/orq-rc/src/models/components/budgetmatch.ts +3 -3
  69. package/packages/orq-rc/src/models/components/budgetscope.ts +17 -1
  70. package/packages/orq-rc/src/models/components/budgetscopekind.ts +1 -0
  71. package/packages/orq-rc/src/models/components/budgetscoperestresponse.ts +13 -1
  72. package/packages/orq-rc/src/models/components/clearannotationqueueresponse.ts +27 -0
  73. package/packages/orq-rc/src/models/components/createannotationqueuerequest.ts +54 -0
  74. package/packages/orq-rc/src/models/components/createapikeyrequest.ts +9 -0
  75. package/packages/orq-rc/src/models/components/deleteannotationqueueresponse.ts +27 -0
  76. package/packages/orq-rc/src/models/components/deleteevaluatorresponse.ts +27 -0
  77. package/packages/orq-rc/src/models/components/evaluatordocumentresponse.ts +50 -0
  78. package/packages/orq-rc/src/models/components/factorybudgetscope.ts +66 -0
  79. package/packages/orq-rc/src/models/components/factorybudgetscoperestresponse.ts +37 -0
  80. package/packages/orq-rc/src/models/components/filesystemtoolinput.ts +63 -6
  81. package/packages/orq-rc/src/models/components/getevaluatorversionresponse.ts +58 -0
  82. package/packages/orq-rc/src/models/components/index.ts +22 -8
  83. package/packages/orq-rc/src/models/components/listannotationqueueitemsresponse.ts +53 -0
  84. package/packages/orq-rc/src/models/components/listannotationqueuesresponse.ts +53 -0
  85. package/packages/orq-rc/src/models/components/listevaluatorsresponse.ts +59 -0
  86. package/packages/orq-rc/src/models/components/listevaluatorversionsresponse.ts +59 -0
  87. package/packages/orq-rc/src/models/components/modelmetadata.ts +6 -0
  88. package/packages/orq-rc/src/models/components/modelsconfig.ts +10 -11
  89. package/packages/orq-rc/src/models/components/policyprofileidlist.ts +31 -0
  90. package/packages/orq-rc/src/models/components/pricing.ts +12 -0
  91. package/packages/orq-rc/src/models/components/pricingvariant.ts +12 -0
  92. package/packages/orq-rc/src/models/components/reasoningpart.ts +1 -1
  93. package/packages/orq-rc/src/models/components/removeannotationqueueitemsrequest.ts +41 -0
  94. package/packages/orq-rc/src/models/components/removeannotationqueueitemsresponse.ts +28 -0
  95. package/packages/orq-rc/src/models/components/searchknowledgerequest.ts +37 -58
  96. package/packages/orq-rc/src/models/components/textcontentpartschema.ts +19 -23
  97. package/packages/orq-rc/src/models/components/updateannotationqueuerequest.ts +61 -0
  98. package/packages/orq-rc/src/models/components/updateworkspacesettingsrequest.ts +9 -0
  99. package/packages/orq-rc/src/models/components/workspacesettings.ts +3 -0
  100. package/packages/orq-rc/src/models/errors/index.ts +0 -6
  101. package/packages/orq-rc/src/models/operations/addannotationqueueitems.ts +7 -139
  102. package/packages/orq-rc/src/models/operations/createagentrequest.ts +20 -31
  103. package/packages/orq-rc/src/models/operations/createdataset.ts +1 -1
  104. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +5 -5
  105. package/packages/orq-rc/src/models/operations/createeval.ts +3 -644
  106. package/packages/orq-rc/src/models/operations/createprompt.ts +19 -22
  107. package/packages/orq-rc/src/models/operations/createtool.ts +55 -56
  108. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +16 -18
  109. package/packages/orq-rc/src/models/operations/deployments.ts +43 -46
  110. package/packages/orq-rc/src/models/operations/getallprompts.ts +1 -0
  111. package/packages/orq-rc/src/models/operations/getalltools.ts +4 -4
  112. package/packages/orq-rc/src/models/operations/geteval.ts +0 -2770
  113. package/packages/orq-rc/src/models/operations/getevals.ts +5 -119
  114. package/packages/orq-rc/src/models/operations/getevalversion.ts +39 -0
  115. package/packages/orq-rc/src/models/operations/getoneprompt.ts +1 -0
  116. package/packages/orq-rc/src/models/operations/getpromptversion.ts +1 -0
  117. package/packages/orq-rc/src/models/operations/getv2humanevalsets.ts +2 -2
  118. package/packages/orq-rc/src/models/operations/getv2humanevalsetsid.ts +2 -2
  119. package/packages/orq-rc/src/models/operations/index.ts +2 -2
  120. package/packages/orq-rc/src/models/operations/listannotationqueueitems.ts +5 -183
  121. package/packages/orq-rc/src/models/operations/listannotationqueues.ts +7 -173
  122. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +5 -5
  123. package/packages/orq-rc/src/models/operations/listdatasets.ts +1 -1
  124. package/packages/orq-rc/src/models/operations/listevalversions.ts +49 -0
  125. package/packages/orq-rc/src/models/operations/listpromptversions.ts +1 -0
  126. package/packages/orq-rc/src/models/operations/parse.ts +7 -7
  127. package/packages/orq-rc/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  128. package/packages/orq-rc/src/models/operations/postv2feedbackevaluation.ts +14 -20
  129. package/packages/orq-rc/src/models/operations/postv2humanevalsets.ts +2 -2
  130. package/packages/orq-rc/src/models/operations/removeannotationqueueitems.ts +8 -41
  131. package/packages/orq-rc/src/models/operations/retrieveannotationqueue.ts +0 -123
  132. package/packages/orq-rc/src/models/operations/retrieveannotationqueueitem.ts +31 -0
  133. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +5 -5
  134. package/packages/orq-rc/src/models/operations/retrievedataset.ts +1 -1
  135. package/packages/orq-rc/src/models/operations/retrievetool.ts +4 -4
  136. package/packages/orq-rc/src/models/operations/runagent.ts +1 -1
  137. package/packages/orq-rc/src/models/operations/streamrunagent.ts +1 -1
  138. package/packages/orq-rc/src/models/operations/updateagent.ts +31 -40
  139. package/packages/orq-rc/src/models/operations/updateannotationqueue.ts +7 -182
  140. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +5 -5
  141. package/packages/orq-rc/src/models/operations/updatedataset.ts +1 -1
  142. package/packages/orq-rc/src/models/operations/updateeval.ts +6 -404
  143. package/packages/orq-rc/src/models/operations/updateprompt.ts +1 -0
  144. package/packages/orq-rc/src/models/operations/updatetool.ts +4 -4
  145. package/packages/orq-rc/src/sdk/annotationqueues.ts +31 -31
  146. package/packages/orq-rc/src/sdk/evals.ts +41 -23
  147. package/packages/orq-rc/src/sdk/sdk.ts +10 -10
  148. package/src/lib/config.ts +3 -3
  149. package/src/lib/encodings.ts +58 -23
  150. package/src/models/components/evaluatorresponsefunction.ts +2 -2
  151. package/src/models/components/evaluatorresponsehttp.ts +2 -2
  152. package/src/models/components/evaluatorresponsejsonschema.ts +2 -2
  153. package/src/models/components/evaluatorresponsellm.ts +2 -2
  154. package/src/models/components/evaluatorresponsepython.ts +2 -2
  155. package/src/models/components/evaluatorresponseragas.ts +2 -2
  156. package/src/models/components/evaluatorresponsetypescript.ts +2 -2
  157. package/src/models/components/reasoningpart.ts +1 -1
  158. package/src/models/operations/createannotationqueue.ts +1 -1
  159. package/src/models/operations/createdataset.ts +1 -1
  160. package/src/models/operations/createdatasetitem.ts +5 -5
  161. package/src/models/operations/createtool.ts +4 -4
  162. package/src/models/operations/getalltools.ts +4 -4
  163. package/src/models/operations/geteval.ts +16 -16
  164. package/src/models/operations/getv2humanevalsets.ts +2 -2
  165. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  166. package/src/models/operations/listannotationqueues.ts +1 -1
  167. package/src/models/operations/listdatasetdatapoints.ts +5 -5
  168. package/src/models/operations/listdatasets.ts +1 -1
  169. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  170. package/src/models/operations/postv2feedbackevaluation.ts +4 -4
  171. package/src/models/operations/postv2humanevalsets.ts +2 -2
  172. package/src/models/operations/retrieveannotationqueue.ts +1 -1
  173. package/src/models/operations/retrievedatapoint.ts +5 -5
  174. package/src/models/operations/retrievedataset.ts +1 -1
  175. package/src/models/operations/retrievetool.ts +4 -4
  176. package/src/models/operations/runagent.ts +1 -1
  177. package/src/models/operations/streamrunagent.ts +1 -1
  178. package/src/models/operations/updateannotationqueue.ts +1 -1
  179. package/src/models/operations/updatedatapoint.ts +5 -5
  180. package/src/models/operations/updatedataset.ts +1 -1
  181. package/src/models/operations/updatetool.ts +4 -4
  182. package/packages/orq-rc/src/models/components/evaluatorresponsefunction.ts +0 -922
  183. package/packages/orq-rc/src/models/components/evaluatorresponsehttp.ts +0 -77
  184. package/packages/orq-rc/src/models/components/evaluatorresponsejsonschema.ts +0 -60
  185. package/packages/orq-rc/src/models/components/evaluatorresponsellm.ts +0 -310
  186. package/packages/orq-rc/src/models/components/evaluatorresponsepython.ts +0 -60
  187. package/packages/orq-rc/src/models/components/evaluatorresponseragas.ts +0 -84
  188. package/packages/orq-rc/src/models/components/evaluatorresponsetypescript.ts +0 -60
  189. package/packages/orq-rc/src/models/components/publicspan.ts +0 -135
  190. package/packages/orq-rc/src/models/errors/createeval.ts +0 -51
  191. package/packages/orq-rc/src/models/errors/deleteeval.ts +0 -96
  192. package/packages/orq-rc/src/models/errors/geteval.ts +0 -51
  193. package/packages/orq-rc/src/models/errors/getevals.ts +0 -51
  194. package/packages/orq-rc/src/models/errors/getv2evaluatorsidversions.ts +0 -51
  195. package/packages/orq-rc/src/models/errors/updateeval.ts +0 -51
  196. package/packages/orq-rc/src/models/operations/createannotationqueue.ts +0 -176
  197. package/packages/orq-rc/src/models/operations/getv2evaluatorsidversions.ts +0 -162
@@ -13,6 +13,12 @@ import {
13
13
  ApiKeyBudgetScope$Outbound,
14
14
  ApiKeyBudgetScope$outboundSchema,
15
15
  } from "./apikeybudgetscope.js";
16
+ import {
17
+ FactoryBudgetScope,
18
+ FactoryBudgetScope$inboundSchema,
19
+ FactoryBudgetScope$Outbound,
20
+ FactoryBudgetScope$outboundSchema,
21
+ } from "./factorybudgetscope.js";
16
22
  import {
17
23
  IdentityBudgetScope,
18
24
  IdentityBudgetScope$inboundSchema,
@@ -48,7 +54,7 @@ import {
48
54
  * BudgetScope is a closed oneof. Exactly one variant must be set. The
49
55
  *
50
56
  * @remarks
51
- * six variants are ordered by enforcement precedence (most specific to
57
+ * variants are ordered by enforcement precedence (most specific to
52
58
  * most general) and mirror the BudgetScopeKind filter enum.
53
59
  */
54
60
  export type BudgetScope = {
@@ -89,6 +95,13 @@ export type BudgetScope = {
89
95
  * models), rather than an internal identifier.
90
96
  */
91
97
  model?: ModelBudgetScope | undefined;
98
+ /**
99
+ * Per-factory cap. Matches requests whose api key carries the label
100
+ *
101
+ * @remarks
102
+ * `factory=<factory_id>` (keys minted for agent sessions of that factory).
103
+ */
104
+ factory?: FactoryBudgetScope | undefined;
92
105
  };
93
106
 
94
107
  /** @internal */
@@ -103,6 +116,7 @@ export const BudgetScope$inboundSchema: z.ZodType<
103
116
  api_key: ApiKeyBudgetScope$inboundSchema.optional(),
104
117
  provider: ProviderBudgetScope$inboundSchema.optional(),
105
118
  model: ModelBudgetScope$inboundSchema.optional(),
119
+ factory: FactoryBudgetScope$inboundSchema.optional(),
106
120
  }).transform((v) => {
107
121
  return remap$(v, {
108
122
  "api_key": "apiKey",
@@ -116,6 +130,7 @@ export type BudgetScope$Outbound = {
116
130
  api_key?: ApiKeyBudgetScope$Outbound | undefined;
117
131
  provider?: ProviderBudgetScope$Outbound | undefined;
118
132
  model?: ModelBudgetScope$Outbound | undefined;
133
+ factory?: FactoryBudgetScope$Outbound | undefined;
119
134
  };
120
135
 
121
136
  /** @internal */
@@ -130,6 +145,7 @@ export const BudgetScope$outboundSchema: z.ZodType<
130
145
  apiKey: ApiKeyBudgetScope$outboundSchema.optional(),
131
146
  provider: ProviderBudgetScope$outboundSchema.optional(),
132
147
  model: ModelBudgetScope$outboundSchema.optional(),
148
+ factory: FactoryBudgetScope$outboundSchema.optional(),
133
149
  }).transform((v) => {
134
150
  return remap$(v, {
135
151
  apiKey: "api_key",
@@ -13,6 +13,7 @@ export const BudgetScopeKind = {
13
13
  BudgetScopeKindApiKey: "BUDGET_SCOPE_KIND_API_KEY",
14
14
  BudgetScopeKindProvider: "BUDGET_SCOPE_KIND_PROVIDER",
15
15
  BudgetScopeKindModel: "BUDGET_SCOPE_KIND_MODEL",
16
+ BudgetScopeKindFactory: "BUDGET_SCOPE_KIND_FACTORY",
16
17
  } as const;
17
18
  export type BudgetScopeKind = ClosedEnum<typeof BudgetScopeKind>;
18
19
 
@@ -10,6 +10,10 @@ import {
10
10
  ApiKeyBudgetScopeRestResponse,
11
11
  ApiKeyBudgetScopeRestResponse$inboundSchema,
12
12
  } from "./apikeybudgetscoperestresponse.js";
13
+ import {
14
+ FactoryBudgetScopeRestResponse,
15
+ FactoryBudgetScopeRestResponse$inboundSchema,
16
+ } from "./factorybudgetscoperestresponse.js";
13
17
  import {
14
18
  IdentityBudgetScopeRestResponse,
15
19
  IdentityBudgetScopeRestResponse$inboundSchema,
@@ -35,7 +39,7 @@ import {
35
39
  * BudgetScope is a closed oneof. Exactly one variant must be set. The
36
40
  *
37
41
  * @remarks
38
- * six variants are ordered by enforcement precedence (most specific to
42
+ * variants are ordered by enforcement precedence (most specific to
39
43
  * most general) and mirror the BudgetScopeKind filter enum.
40
44
  */
41
45
  export type BudgetScopeRestResponse = {
@@ -76,6 +80,13 @@ export type BudgetScopeRestResponse = {
76
80
  * models), rather than an internal identifier.
77
81
  */
78
82
  model?: ModelBudgetScopeRestResponse | undefined;
83
+ /**
84
+ * Per-factory cap. Matches requests whose api key carries the label
85
+ *
86
+ * @remarks
87
+ * `factory=<factory_id>` (keys minted for agent sessions of that factory).
88
+ */
89
+ factory?: FactoryBudgetScopeRestResponse | undefined;
79
90
  };
80
91
 
81
92
  /** @internal */
@@ -90,6 +101,7 @@ export const BudgetScopeRestResponse$inboundSchema: z.ZodType<
90
101
  apiKey: ApiKeyBudgetScopeRestResponse$inboundSchema.optional(),
91
102
  provider: ProviderBudgetScope$inboundSchema.optional(),
92
103
  model: ModelBudgetScopeRestResponse$inboundSchema.optional(),
104
+ factory: FactoryBudgetScopeRestResponse$inboundSchema.optional(),
93
105
  });
94
106
 
95
107
  export function budgetScopeRestResponseFromJSON(
@@ -0,0 +1,27 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ export type ClearAnnotationQueueResponse = {};
11
+
12
+ /** @internal */
13
+ export const ClearAnnotationQueueResponse$inboundSchema: z.ZodType<
14
+ ClearAnnotationQueueResponse,
15
+ z.ZodTypeDef,
16
+ unknown
17
+ > = z.object({});
18
+
19
+ export function clearAnnotationQueueResponseFromJSON(
20
+ jsonString: string,
21
+ ): SafeParseResult<ClearAnnotationQueueResponse, SDKValidationError> {
22
+ return safeParse(
23
+ jsonString,
24
+ (x) => ClearAnnotationQueueResponse$inboundSchema.parse(JSON.parse(x)),
25
+ `Failed to parse 'ClearAnnotationQueueResponse' from JSON`,
26
+ );
27
+ }
@@ -0,0 +1,54 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+
8
+ export type CreateAnnotationQueueRequest = {
9
+ /**
10
+ * Required. The display name of the annotation queue.
11
+ */
12
+ displayName: string;
13
+ /**
14
+ * Required. The description of the annotation queue.
15
+ */
16
+ description: string;
17
+ /**
18
+ * Required. The project to link this annotation queue to.
19
+ */
20
+ projectId: string;
21
+ };
22
+
23
+ /** @internal */
24
+ export type CreateAnnotationQueueRequest$Outbound = {
25
+ display_name: string;
26
+ description: string;
27
+ project_id: string;
28
+ };
29
+
30
+ /** @internal */
31
+ export const CreateAnnotationQueueRequest$outboundSchema: z.ZodType<
32
+ CreateAnnotationQueueRequest$Outbound,
33
+ z.ZodTypeDef,
34
+ CreateAnnotationQueueRequest
35
+ > = z.object({
36
+ displayName: z.string(),
37
+ description: z.string(),
38
+ projectId: z.string(),
39
+ }).transform((v) => {
40
+ return remap$(v, {
41
+ displayName: "display_name",
42
+ projectId: "project_id",
43
+ });
44
+ });
45
+
46
+ export function createAnnotationQueueRequestToJSON(
47
+ createAnnotationQueueRequest: CreateAnnotationQueueRequest,
48
+ ): string {
49
+ return JSON.stringify(
50
+ CreateAnnotationQueueRequest$outboundSchema.parse(
51
+ createAnnotationQueueRequest,
52
+ ),
53
+ );
54
+ }
@@ -63,6 +63,13 @@ export type CreateApiKeyRequest = {
63
63
  * restriction. See McpAccess for the deny_all / allow-list semantics.
64
64
  */
65
65
  mcpAccess?: McpAccess | undefined;
66
+ /**
67
+ * Optional attribution labels (at most 10; keys `^[a-z0-9_.-]{1,32}$`,
68
+ *
69
+ * @remarks
70
+ * values up to 64 characters). See ApiKey.labels.
71
+ */
72
+ labels?: { [k: string]: string } | undefined;
66
73
  };
67
74
 
68
75
  /** @internal */
@@ -74,6 +81,7 @@ export type CreateApiKeyRequest$Outbound = {
74
81
  access?: { [k: string]: string } | undefined;
75
82
  expires_at?: string | undefined;
76
83
  mcp_access?: McpAccess$Outbound | undefined;
84
+ labels?: { [k: string]: string } | undefined;
77
85
  };
78
86
 
79
87
  /** @internal */
@@ -89,6 +97,7 @@ export const CreateApiKeyRequest$outboundSchema: z.ZodType<
89
97
  access: z.record(AccessLevel$outboundSchema).optional(),
90
98
  expiresAt: z.date().transform(v => v.toISOString()).optional(),
91
99
  mcpAccess: McpAccess$outboundSchema.optional(),
100
+ labels: z.record(z.string()).optional(),
92
101
  }).transform((v) => {
93
102
  return remap$(v, {
94
103
  projectScope: "project_scope",
@@ -0,0 +1,27 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ export type DeleteAnnotationQueueResponse = {};
11
+
12
+ /** @internal */
13
+ export const DeleteAnnotationQueueResponse$inboundSchema: z.ZodType<
14
+ DeleteAnnotationQueueResponse,
15
+ z.ZodTypeDef,
16
+ unknown
17
+ > = z.object({});
18
+
19
+ export function deleteAnnotationQueueResponseFromJSON(
20
+ jsonString: string,
21
+ ): SafeParseResult<DeleteAnnotationQueueResponse, SDKValidationError> {
22
+ return safeParse(
23
+ jsonString,
24
+ (x) => DeleteAnnotationQueueResponse$inboundSchema.parse(JSON.parse(x)),
25
+ `Failed to parse 'DeleteAnnotationQueueResponse' from JSON`,
26
+ );
27
+ }
@@ -0,0 +1,27 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ export type DeleteEvaluatorResponse = {};
11
+
12
+ /** @internal */
13
+ export const DeleteEvaluatorResponse$inboundSchema: z.ZodType<
14
+ DeleteEvaluatorResponse,
15
+ z.ZodTypeDef,
16
+ unknown
17
+ > = z.object({});
18
+
19
+ export function deleteEvaluatorResponseFromJSON(
20
+ jsonString: string,
21
+ ): SafeParseResult<DeleteEvaluatorResponse, SDKValidationError> {
22
+ return safeParse(
23
+ jsonString,
24
+ (x) => DeleteEvaluatorResponse$inboundSchema.parse(JSON.parse(x)),
25
+ `Failed to parse 'DeleteEvaluatorResponse' from JSON`,
26
+ );
27
+ }
@@ -0,0 +1,50 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ export type Document = {};
11
+
12
+ export type EvaluatorDocumentResponse = {
13
+ document?: Document | undefined;
14
+ };
15
+
16
+ /** @internal */
17
+ export const Document$inboundSchema: z.ZodType<
18
+ Document,
19
+ z.ZodTypeDef,
20
+ unknown
21
+ > = z.object({});
22
+
23
+ export function documentFromJSON(
24
+ jsonString: string,
25
+ ): SafeParseResult<Document, SDKValidationError> {
26
+ return safeParse(
27
+ jsonString,
28
+ (x) => Document$inboundSchema.parse(JSON.parse(x)),
29
+ `Failed to parse 'Document' from JSON`,
30
+ );
31
+ }
32
+
33
+ /** @internal */
34
+ export const EvaluatorDocumentResponse$inboundSchema: z.ZodType<
35
+ EvaluatorDocumentResponse,
36
+ z.ZodTypeDef,
37
+ unknown
38
+ > = z.object({
39
+ document: z.lazy(() => Document$inboundSchema).optional(),
40
+ });
41
+
42
+ export function evaluatorDocumentResponseFromJSON(
43
+ jsonString: string,
44
+ ): SafeParseResult<EvaluatorDocumentResponse, SDKValidationError> {
45
+ return safeParse(
46
+ jsonString,
47
+ (x) => EvaluatorDocumentResponse$inboundSchema.parse(JSON.parse(x)),
48
+ `Failed to parse 'EvaluatorDocumentResponse' from JSON`,
49
+ );
50
+ }
@@ -0,0 +1,66 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ /**
12
+ * Per-factory cap. Matches requests whose api key carries the label
13
+ *
14
+ * @remarks
15
+ * `factory=<factory_id>` (keys minted for agent sessions of that factory).
16
+ */
17
+ export type FactoryBudgetScope = {
18
+ factoryId: string;
19
+ };
20
+
21
+ /** @internal */
22
+ export const FactoryBudgetScope$inboundSchema: z.ZodType<
23
+ FactoryBudgetScope,
24
+ z.ZodTypeDef,
25
+ unknown
26
+ > = z.object({
27
+ factory_id: z.string(),
28
+ }).transform((v) => {
29
+ return remap$(v, {
30
+ "factory_id": "factoryId",
31
+ });
32
+ });
33
+ /** @internal */
34
+ export type FactoryBudgetScope$Outbound = {
35
+ factory_id: string;
36
+ };
37
+
38
+ /** @internal */
39
+ export const FactoryBudgetScope$outboundSchema: z.ZodType<
40
+ FactoryBudgetScope$Outbound,
41
+ z.ZodTypeDef,
42
+ FactoryBudgetScope
43
+ > = z.object({
44
+ factoryId: z.string(),
45
+ }).transform((v) => {
46
+ return remap$(v, {
47
+ factoryId: "factory_id",
48
+ });
49
+ });
50
+
51
+ export function factoryBudgetScopeToJSON(
52
+ factoryBudgetScope: FactoryBudgetScope,
53
+ ): string {
54
+ return JSON.stringify(
55
+ FactoryBudgetScope$outboundSchema.parse(factoryBudgetScope),
56
+ );
57
+ }
58
+ export function factoryBudgetScopeFromJSON(
59
+ jsonString: string,
60
+ ): SafeParseResult<FactoryBudgetScope, SDKValidationError> {
61
+ return safeParse(
62
+ jsonString,
63
+ (x) => FactoryBudgetScope$inboundSchema.parse(JSON.parse(x)),
64
+ `Failed to parse 'FactoryBudgetScope' from JSON`,
65
+ );
66
+ }
@@ -0,0 +1,37 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ /**
11
+ * Per-factory cap. Matches requests whose api key carries the label
12
+ *
13
+ * @remarks
14
+ * `factory=<factory_id>` (keys minted for agent sessions of that factory).
15
+ */
16
+ export type FactoryBudgetScopeRestResponse = {
17
+ factoryId: string;
18
+ };
19
+
20
+ /** @internal */
21
+ export const FactoryBudgetScopeRestResponse$inboundSchema: z.ZodType<
22
+ FactoryBudgetScopeRestResponse,
23
+ z.ZodTypeDef,
24
+ unknown
25
+ > = z.object({
26
+ factoryId: z.string(),
27
+ });
28
+
29
+ export function factoryBudgetScopeRestResponseFromJSON(
30
+ jsonString: string,
31
+ ): SafeParseResult<FactoryBudgetScopeRestResponse, SDKValidationError> {
32
+ return safeParse(
33
+ jsonString,
34
+ (x) => FactoryBudgetScopeRestResponse$inboundSchema.parse(JSON.parse(x)),
35
+ `Failed to parse 'FactoryBudgetScopeRestResponse' from JSON`,
36
+ );
37
+ }
@@ -4,6 +4,34 @@
4
4
 
5
5
  import * as z from "zod/v3";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
+
9
+ /**
10
+ * Whether the agent may only read this file system, or also write to it.
11
+ */
12
+ export const AccessMode = {
13
+ ReadOnly: "read_only",
14
+ ReadWrite: "read_write",
15
+ } as const;
16
+ /**
17
+ * Whether the agent may only read this file system, or also write to it.
18
+ */
19
+ export type AccessMode = ClosedEnum<typeof AccessMode>;
20
+
21
+ export type Configuration = {
22
+ /**
23
+ * The id of the file system to attach.
24
+ */
25
+ fileSystemId?: string | undefined;
26
+ /**
27
+ * The key of the file system to attach.
28
+ */
29
+ fileSystemKey?: string | undefined;
30
+ /**
31
+ * Whether the agent may only read this file system, or also write to it.
32
+ */
33
+ accessMode?: AccessMode | undefined;
34
+ };
7
35
 
8
36
  /**
9
37
  * Attaches a persistent file system to the agent, named by file_system_id or file_system_key in the configuration. The agent may only read it unless the configured access_mode is read_write.
@@ -14,17 +42,46 @@ export type FileSystemToolInput = {
14
42
  * Whether this tool requires approval before execution
15
43
  */
16
44
  requiresApproval?: boolean | undefined;
17
- /**
18
- * Static tool configuration set at design time. Merged over LLM-provided arguments at execution time.
19
- */
20
- configuration?: { [k: string]: any } | undefined;
45
+ configuration: Configuration;
21
46
  };
22
47
 
48
+ /** @internal */
49
+ export const AccessMode$outboundSchema: z.ZodNativeEnum<typeof AccessMode> = z
50
+ .nativeEnum(AccessMode);
51
+
52
+ /** @internal */
53
+ export type Configuration$Outbound = {
54
+ file_system_id?: string | undefined;
55
+ file_system_key?: string | undefined;
56
+ access_mode: string;
57
+ };
58
+
59
+ /** @internal */
60
+ export const Configuration$outboundSchema: z.ZodType<
61
+ Configuration$Outbound,
62
+ z.ZodTypeDef,
63
+ Configuration
64
+ > = z.object({
65
+ fileSystemId: z.string().optional(),
66
+ fileSystemKey: z.string().optional(),
67
+ accessMode: AccessMode$outboundSchema.default("read_only"),
68
+ }).transform((v) => {
69
+ return remap$(v, {
70
+ fileSystemId: "file_system_id",
71
+ fileSystemKey: "file_system_key",
72
+ accessMode: "access_mode",
73
+ });
74
+ });
75
+
76
+ export function configurationToJSON(configuration: Configuration): string {
77
+ return JSON.stringify(Configuration$outboundSchema.parse(configuration));
78
+ }
79
+
23
80
  /** @internal */
24
81
  export type FileSystemToolInput$Outbound = {
25
82
  type: "file_system";
26
83
  requires_approval?: boolean | undefined;
27
- configuration?: { [k: string]: any } | undefined;
84
+ configuration: Configuration$Outbound;
28
85
  };
29
86
 
30
87
  /** @internal */
@@ -35,7 +92,7 @@ export const FileSystemToolInput$outboundSchema: z.ZodType<
35
92
  > = z.object({
36
93
  type: z.literal("file_system"),
37
94
  requiresApproval: z.boolean().optional(),
38
- configuration: z.record(z.any()).optional(),
95
+ configuration: z.lazy(() => Configuration$outboundSchema),
39
96
  }).transform((v) => {
40
97
  return remap$(v, {
41
98
  requiresApproval: "requires_approval",
@@ -0,0 +1,58 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ export type GetEvaluatorVersionResponseDocument = {};
11
+
12
+ /**
13
+ * A dedicated message (not a reuse of EvaluatorDocumentResponse): the field
14
+ *
15
+ * @remarks
16
+ * carries a version-activity envelope, not an evaluator document.
17
+ */
18
+ export type GetEvaluatorVersionResponse = {
19
+ document?: GetEvaluatorVersionResponseDocument | undefined;
20
+ };
21
+
22
+ /** @internal */
23
+ export const GetEvaluatorVersionResponseDocument$inboundSchema: z.ZodType<
24
+ GetEvaluatorVersionResponseDocument,
25
+ z.ZodTypeDef,
26
+ unknown
27
+ > = z.object({});
28
+
29
+ export function getEvaluatorVersionResponseDocumentFromJSON(
30
+ jsonString: string,
31
+ ): SafeParseResult<GetEvaluatorVersionResponseDocument, SDKValidationError> {
32
+ return safeParse(
33
+ jsonString,
34
+ (x) =>
35
+ GetEvaluatorVersionResponseDocument$inboundSchema.parse(JSON.parse(x)),
36
+ `Failed to parse 'GetEvaluatorVersionResponseDocument' from JSON`,
37
+ );
38
+ }
39
+
40
+ /** @internal */
41
+ export const GetEvaluatorVersionResponse$inboundSchema: z.ZodType<
42
+ GetEvaluatorVersionResponse,
43
+ z.ZodTypeDef,
44
+ unknown
45
+ > = z.object({
46
+ document: z.lazy(() => GetEvaluatorVersionResponseDocument$inboundSchema)
47
+ .optional(),
48
+ });
49
+
50
+ export function getEvaluatorVersionResponseFromJSON(
51
+ jsonString: string,
52
+ ): SafeParseResult<GetEvaluatorVersionResponse, SDKValidationError> {
53
+ return safeParse(
54
+ jsonString,
55
+ (x) => GetEvaluatorVersionResponse$inboundSchema.parse(JSON.parse(x)),
56
+ `Failed to parse 'GetEvaluatorVersionResponse' from JSON`,
57
+ );
58
+ }