@orq-ai/node 4.10.16 → 4.10.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/encodings.js +12 -12
- package/lib/encodings.js.map +1 -1
- package/lib/env.d.ts.map +1 -1
- package/lib/env.js +3 -3
- package/lib/env.js.map +1 -1
- package/lib/event-streams.d.ts.map +1 -1
- package/lib/event-streams.js +28 -13
- package/lib/event-streams.js.map +1 -1
- package/lib/matchers.js +3 -3
- package/lib/matchers.js.map +1 -1
- package/lib/primitives.d.ts +1 -0
- package/lib/primitives.d.ts.map +1 -1
- package/lib/primitives.js +18 -0
- package/lib/primitives.js.map +1 -1
- package/models/components/reasoningpart.js +1 -1
- package/models/operations/createdataset.js +1 -1
- package/models/operations/createdatasetitem.js +4 -4
- package/models/operations/createdatasource.js +1 -1
- package/models/operations/createeval.js +16 -16
- package/models/operations/createtool.js +6 -6
- package/models/operations/getalltools.js +6 -6
- package/models/operations/getevals.js +16 -16
- package/models/operations/getv2humanevalsets.js +2 -2
- package/models/operations/getv2humanevalsetsid.js +2 -2
- package/models/operations/listdatasetdatapoints.js +4 -4
- package/models/operations/listdatasets.js +1 -1
- package/models/operations/listdatasources.js +1 -1
- package/models/operations/patchv2humanevalsetsid.js +2 -2
- package/models/operations/postv2feedbackevaluation.js +3 -3
- package/models/operations/postv2humanevalsets.js +2 -2
- package/models/operations/retrievedatapoint.js +4 -4
- package/models/operations/retrievedataset.js +1 -1
- package/models/operations/retrievedatasource.js +1 -1
- package/models/operations/retrievetool.js +6 -6
- package/models/operations/runagent.js +1 -1
- package/models/operations/streamrunagent.js +1 -1
- package/models/operations/updatedatapoint.js +4 -4
- package/models/operations/updatedataset.js +1 -1
- package/models/operations/updatedatasource.js +1 -1
- package/models/operations/updateeval.js +16 -16
- package/models/operations/updatetool.js +7 -7
- package/package.json +3 -3
- package/packages/orq-rc/src/funcs/budgetsCheck.ts +162 -0
- package/packages/orq-rc/src/funcs/budgetsCreate.ts +162 -0
- package/packages/orq-rc/src/funcs/budgetsDelete.ts +168 -0
- package/packages/orq-rc/src/funcs/budgetsGet.ts +168 -0
- package/packages/orq-rc/src/funcs/budgetsGetConsumption.ts +169 -0
- package/packages/orq-rc/src/funcs/budgetsList.ts +175 -0
- package/packages/orq-rc/src/funcs/budgetsResetConsumption.ts +174 -0
- package/packages/orq-rc/src/funcs/budgetsUpdate.ts +171 -0
- package/packages/orq-rc/src/lib/config.ts +3 -3
- package/packages/orq-rc/src/lib/encodings.ts +1 -1
- package/packages/orq-rc/src/lib/env.ts +7 -3
- package/packages/orq-rc/src/lib/event-streams.ts +31 -13
- package/packages/orq-rc/src/lib/matchers.ts +1 -1
- package/packages/orq-rc/src/lib/primitives.ts +16 -0
- package/packages/orq-rc/src/models/components/apikeybudgetscope.ts +66 -0
- package/packages/orq-rc/src/models/components/budget.ts +102 -0
- package/packages/orq-rc/src/models/components/budgetlimits.ts +76 -0
- package/packages/orq-rc/src/models/components/budgetmatch.ts +56 -0
- package/packages/orq-rc/src/models/components/budgetperiod.ts +23 -0
- package/packages/orq-rc/src/models/components/budgetrejection.ts +48 -0
- package/packages/orq-rc/src/models/components/budgetscope.ts +150 -0
- package/packages/orq-rc/src/models/components/budgetscopekind.ts +22 -0
- package/packages/orq-rc/src/models/components/checkbudgetsrequest.ts +111 -0
- package/packages/orq-rc/src/models/components/checkbudgetsresponse.ts +62 -0
- package/packages/orq-rc/src/models/components/createbudgetrequest.ts +109 -0
- package/packages/orq-rc/src/models/components/createbudgetresponse.ts +35 -0
- package/packages/orq-rc/src/models/components/deletebudgetresponse.ts +27 -0
- package/packages/orq-rc/src/models/components/dimensioninfo.ts +43 -0
- package/packages/orq-rc/src/models/components/getbudgetconsumptionresponse.ts +67 -0
- package/packages/orq-rc/src/models/components/getbudgetresponse.ts +35 -0
- package/packages/orq-rc/src/models/components/identity.ts +9 -9
- package/packages/orq-rc/src/models/components/identitybudgetscope.ts +66 -0
- package/packages/orq-rc/src/models/components/index.ts +27 -0
- package/packages/orq-rc/src/models/components/listbudgetsresponse.ts +53 -0
- package/packages/orq-rc/src/models/components/modelbudgetscope.ts +67 -0
- package/packages/orq-rc/src/models/components/projectbudgetscope.ts +63 -0
- package/packages/orq-rc/src/models/components/providerbudgetscope.ts +57 -0
- package/packages/orq-rc/src/models/components/ratelimit.ts +62 -0
- package/packages/orq-rc/src/models/components/reasoningpart.ts +1 -1
- package/packages/orq-rc/src/models/components/resetbudgetconsumptionrequest.ts +27 -0
- package/packages/orq-rc/src/models/components/resetbudgetconsumptionresponse.ts +38 -0
- package/packages/orq-rc/src/models/components/updatebudgetrequest.ts +94 -0
- package/packages/orq-rc/src/models/components/updatebudgetresponse.ts +35 -0
- package/packages/orq-rc/src/models/components/workspacebudgetscope.ts +46 -0
- package/packages/orq-rc/src/models/operations/budgetdelete.ts +39 -0
- package/packages/orq-rc/src/models/operations/budgetget.ts +39 -0
- package/packages/orq-rc/src/models/operations/budgetgetconsumption.ts +41 -0
- package/packages/orq-rc/src/models/operations/budgetlist.ts +102 -0
- package/packages/orq-rc/src/models/operations/budgetresetconsumption.ts +48 -0
- package/packages/orq-rc/src/models/operations/budgetupdate.ts +44 -0
- package/packages/orq-rc/src/models/operations/createdataset.ts +1 -1
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +4 -4
- package/packages/orq-rc/src/models/operations/createdatasource.ts +1 -1
- package/packages/orq-rc/src/models/operations/createeval.ts +16 -16
- package/packages/orq-rc/src/models/operations/creatememorystore.ts +5 -5
- package/packages/orq-rc/src/models/operations/createtool.ts +6 -6
- package/packages/orq-rc/src/models/operations/getallmemorystores.ts +2 -2
- package/packages/orq-rc/src/models/operations/getalltools.ts +6 -6
- package/packages/orq-rc/src/models/operations/getevals.ts +16 -16
- package/packages/orq-rc/src/models/operations/getv2humanevalsets.ts +2 -2
- package/packages/orq-rc/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/packages/orq-rc/src/models/operations/index.ts +6 -0
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +4 -4
- package/packages/orq-rc/src/models/operations/listdatasets.ts +1 -1
- package/packages/orq-rc/src/models/operations/listdatasources.ts +1 -1
- package/packages/orq-rc/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/packages/orq-rc/src/models/operations/postv2feedbackevaluation.ts +3 -3
- package/packages/orq-rc/src/models/operations/postv2humanevalsets.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +4 -4
- package/packages/orq-rc/src/models/operations/retrievedataset.ts +1 -1
- package/packages/orq-rc/src/models/operations/retrievedatasource.ts +1 -1
- package/packages/orq-rc/src/models/operations/retrievememorystore.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievetool.ts +6 -6
- package/packages/orq-rc/src/models/operations/runagent.ts +1 -1
- package/packages/orq-rc/src/models/operations/streamrunagent.ts +1 -1
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +4 -4
- package/packages/orq-rc/src/models/operations/updatedataset.ts +1 -1
- package/packages/orq-rc/src/models/operations/updatedatasource.ts +1 -1
- package/packages/orq-rc/src/models/operations/updateeval.ts +16 -16
- package/packages/orq-rc/src/models/operations/updatememorystore.ts +5 -5
- package/packages/orq-rc/src/models/operations/updatetool.ts +7 -7
- package/packages/orq-rc/src/sdk/budgets.ts +154 -0
- package/packages/orq-rc/src/sdk/feedback.ts +1 -4
- package/packages/orq-rc/src/sdk/sdk.ts +6 -0
- package/sdk/feedback.d.ts +1 -4
- package/sdk/feedback.d.ts.map +1 -1
- package/sdk/feedback.js +1 -4
- package/sdk/feedback.js.map +1 -1
- package/src/lib/config.ts +3 -3
- package/src/lib/encodings.ts +1 -1
- package/src/lib/env.ts +7 -3
- package/src/lib/event-streams.ts +31 -13
- package/src/lib/matchers.ts +1 -1
- package/src/lib/primitives.ts +16 -0
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/operations/createdataset.ts +1 -1
- package/src/models/operations/createdatasetitem.ts +4 -4
- package/src/models/operations/createdatasource.ts +1 -1
- package/src/models/operations/createeval.ts +16 -16
- package/src/models/operations/createtool.ts +6 -6
- package/src/models/operations/getalltools.ts +6 -6
- package/src/models/operations/getevals.ts +16 -16
- package/src/models/operations/getv2humanevalsets.ts +2 -2
- package/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +4 -4
- package/src/models/operations/listdatasets.ts +1 -1
- package/src/models/operations/listdatasources.ts +1 -1
- package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/src/models/operations/postv2feedbackevaluation.ts +3 -3
- package/src/models/operations/postv2humanevalsets.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +4 -4
- package/src/models/operations/retrievedataset.ts +1 -1
- package/src/models/operations/retrievedatasource.ts +1 -1
- package/src/models/operations/retrievetool.ts +6 -6
- package/src/models/operations/runagent.ts +1 -1
- package/src/models/operations/streamrunagent.ts +1 -1
- package/src/models/operations/updatedatapoint.ts +4 -4
- package/src/models/operations/updatedataset.ts +1 -1
- package/src/models/operations/updatedatasource.ts +1 -1
- package/src/models/operations/updateeval.ts +16 -16
- package/src/models/operations/updatetool.ts +7 -7
- package/src/sdk/feedback.ts +1 -4
- package/lib/dlv.d.ts +0 -14
- package/lib/dlv.d.ts.map +0 -1
- package/lib/dlv.js +0 -49
- package/lib/dlv.js.map +0 -1
- package/lib/is-plain-object.d.ts +0 -2
- package/lib/is-plain-object.d.ts.map +0 -1
- package/lib/is-plain-object.js +0 -41
- package/lib/is-plain-object.js.map +0 -1
- package/packages/orq-rc/src/lib/dlv.ts +0 -53
- package/packages/orq-rc/src/lib/is-plain-object.ts +0 -43
- package/src/lib/dlv.ts +0 -53
- package/src/lib/is-plain-object.ts +0 -43
|
@@ -1553,8 +1553,8 @@ export const ResponseBodyTypescript$inboundSchema: z.ZodType<
|
|
|
1553
1553
|
> = z.object({
|
|
1554
1554
|
_id: z.string(),
|
|
1555
1555
|
description: z.string(),
|
|
1556
|
-
created: z.string().default("2026-06-
|
|
1557
|
-
updated: z.string().default("2026-06-
|
|
1556
|
+
created: z.string().default("2026-06-12T11:25:40.656Z"),
|
|
1557
|
+
updated: z.string().default("2026-06-12T11:25:40.656Z"),
|
|
1558
1558
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
1559
1559
|
guardrail_config: z.nullable(
|
|
1560
1560
|
z.union([
|
|
@@ -1749,8 +1749,8 @@ export const ResponseBodyRagas$inboundSchema: z.ZodType<
|
|
|
1749
1749
|
> = z.object({
|
|
1750
1750
|
_id: z.string(),
|
|
1751
1751
|
description: z.string(),
|
|
1752
|
-
created: z.string().default("2026-06-
|
|
1753
|
-
updated: z.string().default("2026-06-
|
|
1752
|
+
created: z.string().default("2026-06-12T11:25:40.656Z"),
|
|
1753
|
+
updated: z.string().default("2026-06-12T11:25:40.656Z"),
|
|
1754
1754
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
1755
1755
|
guardrail_config: z.nullable(
|
|
1756
1756
|
z.union([
|
|
@@ -2608,8 +2608,8 @@ export const ResponseBodyFunction$inboundSchema: z.ZodType<
|
|
|
2608
2608
|
> = z.object({
|
|
2609
2609
|
_id: z.string(),
|
|
2610
2610
|
description: z.string(),
|
|
2611
|
-
created: z.string().default("2026-06-
|
|
2612
|
-
updated: z.string().default("2026-06-
|
|
2611
|
+
created: z.string().default("2026-06-12T11:25:40.656Z"),
|
|
2612
|
+
updated: z.string().default("2026-06-12T11:25:40.656Z"),
|
|
2613
2613
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
2614
2614
|
guardrail_config: z.nullable(
|
|
2615
2615
|
z.union([
|
|
@@ -2827,8 +2827,8 @@ export const UpdateEvalResponseBodyPython$inboundSchema: z.ZodType<
|
|
|
2827
2827
|
> = z.object({
|
|
2828
2828
|
_id: z.string(),
|
|
2829
2829
|
description: z.string(),
|
|
2830
|
-
created: z.string().default("2026-06-
|
|
2831
|
-
updated: z.string().default("2026-06-
|
|
2830
|
+
created: z.string().default("2026-06-12T11:25:40.656Z"),
|
|
2831
|
+
updated: z.string().default("2026-06-12T11:25:40.656Z"),
|
|
2832
2832
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
2833
2833
|
guardrail_config: z.nullable(
|
|
2834
2834
|
z.union([
|
|
@@ -2996,8 +2996,8 @@ export const ResponseBodyHTTP$inboundSchema: z.ZodType<
|
|
|
2996
2996
|
> = z.object({
|
|
2997
2997
|
_id: z.string(),
|
|
2998
2998
|
description: z.string(),
|
|
2999
|
-
created: z.string().default("2026-06-
|
|
3000
|
-
updated: z.string().default("2026-06-
|
|
2999
|
+
created: z.string().default("2026-06-12T11:25:40.656Z"),
|
|
3000
|
+
updated: z.string().default("2026-06-12T11:25:40.656Z"),
|
|
3001
3001
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
3002
3002
|
guardrail_config: z.nullable(
|
|
3003
3003
|
z.union([
|
|
@@ -3150,8 +3150,8 @@ export const ResponseBodyJSON$inboundSchema: z.ZodType<
|
|
|
3150
3150
|
> = z.object({
|
|
3151
3151
|
_id: z.string(),
|
|
3152
3152
|
description: z.string(),
|
|
3153
|
-
created: z.string().default("2026-06-
|
|
3154
|
-
updated: z.string().default("2026-06-
|
|
3153
|
+
created: z.string().default("2026-06-12T11:25:40.656Z"),
|
|
3154
|
+
updated: z.string().default("2026-06-12T11:25:40.656Z"),
|
|
3155
3155
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
3156
3156
|
guardrail_config: z.nullable(
|
|
3157
3157
|
z.union([
|
|
@@ -3513,8 +3513,8 @@ export const UpdateEvalLlm2$inboundSchema: z.ZodType<
|
|
|
3513
3513
|
> = z.object({
|
|
3514
3514
|
_id: z.string(),
|
|
3515
3515
|
description: z.string(),
|
|
3516
|
-
created: z.string().default("2026-06-
|
|
3517
|
-
updated: z.string().default("2026-06-
|
|
3516
|
+
created: z.string().default("2026-06-12T11:25:40.656Z"),
|
|
3517
|
+
updated: z.string().default("2026-06-12T11:25:40.656Z"),
|
|
3518
3518
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
3519
3519
|
guardrail_config: z.nullable(
|
|
3520
3520
|
z.union([
|
|
@@ -3726,8 +3726,8 @@ export const UpdateEvalLlm1$inboundSchema: z.ZodType<
|
|
|
3726
3726
|
> = z.object({
|
|
3727
3727
|
_id: z.string(),
|
|
3728
3728
|
description: z.string(),
|
|
3729
|
-
created: z.string().default("2026-06-
|
|
3730
|
-
updated: z.string().default("2026-06-
|
|
3729
|
+
created: z.string().default("2026-06-12T11:25:40.656Z"),
|
|
3730
|
+
updated: z.string().default("2026-06-12T11:25:40.656Z"),
|
|
3731
3731
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
3732
3732
|
guardrail_config: z.nullable(
|
|
3733
3733
|
z.union([
|
|
@@ -16,7 +16,7 @@ export type UpdateMemoryStoreRequestBody = {
|
|
|
16
16
|
/**
|
|
17
17
|
* The default time to live of every memory document created within the memory store. Useful to control if the documents in the memory should be store for short or long term.
|
|
18
18
|
*/
|
|
19
|
-
ttl?: number | undefined;
|
|
19
|
+
ttl?: number | null | undefined;
|
|
20
20
|
path?: string | undefined;
|
|
21
21
|
};
|
|
22
22
|
|
|
@@ -70,14 +70,14 @@ export type UpdateMemoryStoreResponseBody = {
|
|
|
70
70
|
/**
|
|
71
71
|
* The default time to live of every memory document created within the memory store. Useful to control if the documents in the memory should be store for short or long term.
|
|
72
72
|
*/
|
|
73
|
-
ttl?: number | undefined;
|
|
73
|
+
ttl?: number | null | undefined;
|
|
74
74
|
embeddingConfig: UpdateMemoryStoreEmbeddingConfig;
|
|
75
75
|
};
|
|
76
76
|
|
|
77
77
|
/** @internal */
|
|
78
78
|
export type UpdateMemoryStoreRequestBody$Outbound = {
|
|
79
79
|
description?: string | undefined;
|
|
80
|
-
ttl?: number | undefined;
|
|
80
|
+
ttl?: number | null | undefined;
|
|
81
81
|
path?: string | undefined;
|
|
82
82
|
};
|
|
83
83
|
|
|
@@ -88,7 +88,7 @@ export const UpdateMemoryStoreRequestBody$outboundSchema: z.ZodType<
|
|
|
88
88
|
UpdateMemoryStoreRequestBody
|
|
89
89
|
> = z.object({
|
|
90
90
|
description: z.string().optional(),
|
|
91
|
-
ttl: z.number().optional(),
|
|
91
|
+
ttl: z.nullable(z.number()).optional(),
|
|
92
92
|
path: z.string().optional(),
|
|
93
93
|
});
|
|
94
94
|
|
|
@@ -164,7 +164,7 @@ export const UpdateMemoryStoreResponseBody$inboundSchema: z.ZodType<
|
|
|
164
164
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
165
165
|
created: z.string(),
|
|
166
166
|
updated: z.string(),
|
|
167
|
-
ttl: z.number().optional(),
|
|
167
|
+
ttl: z.nullable(z.number()).optional(),
|
|
168
168
|
embedding_config: z.lazy(() =>
|
|
169
169
|
UpdateMemoryStoreEmbeddingConfig$inboundSchema
|
|
170
170
|
),
|
|
@@ -1472,7 +1472,7 @@ export const RequestBodyTools$outboundSchema: z.ZodType<
|
|
|
1472
1472
|
z.ZodTypeDef,
|
|
1473
1473
|
RequestBodyTools
|
|
1474
1474
|
> = z.object({
|
|
1475
|
-
id: z.string().default("
|
|
1475
|
+
id: z.string().default("01KTXSA2QF5T5X5WF6Y6M80QNV"),
|
|
1476
1476
|
name: z.string(),
|
|
1477
1477
|
description: z.string().optional(),
|
|
1478
1478
|
schema: z.lazy(() => UpdateToolRequestBodyToolsSchema$outboundSchema),
|
|
@@ -2193,7 +2193,7 @@ export const UpdateToolResponseBodyCodeExecutionTool$inboundSchema: z.ZodType<
|
|
|
2193
2193
|
z.ZodTypeDef,
|
|
2194
2194
|
unknown
|
|
2195
2195
|
> = z.object({
|
|
2196
|
-
_id: z.string().default("
|
|
2196
|
+
_id: z.string().default("tool_01KTXSA2Q78E0Q3KPGXGW22T1B"),
|
|
2197
2197
|
path: z.string(),
|
|
2198
2198
|
key: z.string(),
|
|
2199
2199
|
display_name: z.string().optional(),
|
|
@@ -2296,7 +2296,7 @@ export const UpdateToolResponseBodyTools$inboundSchema: z.ZodType<
|
|
|
2296
2296
|
z.ZodTypeDef,
|
|
2297
2297
|
unknown
|
|
2298
2298
|
> = z.object({
|
|
2299
|
-
id: z.string().default("
|
|
2299
|
+
id: z.string().default("01KTXSA2Q64KPDNZBJ8H80TX1M"),
|
|
2300
2300
|
name: z.string(),
|
|
2301
2301
|
description: z.string().optional(),
|
|
2302
2302
|
schema: z.lazy(() => UpdateToolResponseBodyToolsSchema$inboundSchema),
|
|
@@ -2354,7 +2354,7 @@ export const UpdateToolResponseBodyMCPTool$inboundSchema: z.ZodType<
|
|
|
2354
2354
|
z.ZodTypeDef,
|
|
2355
2355
|
unknown
|
|
2356
2356
|
> = z.object({
|
|
2357
|
-
_id: z.string().default("
|
|
2357
|
+
_id: z.string().default("tool_01KTXSA2Q5Z8SZTVS5THCESKNM"),
|
|
2358
2358
|
path: z.string(),
|
|
2359
2359
|
key: z.string(),
|
|
2360
2360
|
display_name: z.string().optional(),
|
|
@@ -2543,7 +2543,7 @@ export const UpdateToolResponseBodyHTTPTool$inboundSchema: z.ZodType<
|
|
|
2543
2543
|
z.ZodTypeDef,
|
|
2544
2544
|
unknown
|
|
2545
2545
|
> = z.object({
|
|
2546
|
-
_id: z.string().default("
|
|
2546
|
+
_id: z.string().default("tool_01KTXSA2Q2882WBEW3DFYWA9B8"),
|
|
2547
2547
|
path: z.string(),
|
|
2548
2548
|
key: z.string(),
|
|
2549
2549
|
display_name: z.string().optional(),
|
|
@@ -2638,7 +2638,7 @@ export const UpdateToolResponseBodyJSONSchemaTool$inboundSchema: z.ZodType<
|
|
|
2638
2638
|
z.ZodTypeDef,
|
|
2639
2639
|
unknown
|
|
2640
2640
|
> = z.object({
|
|
2641
|
-
_id: z.string().default("
|
|
2641
|
+
_id: z.string().default("tool_01KTXSA2Q07DAZNDK6XXPWFHBA"),
|
|
2642
2642
|
path: z.string(),
|
|
2643
2643
|
key: z.string(),
|
|
2644
2644
|
display_name: z.string().optional(),
|
|
@@ -2741,7 +2741,7 @@ export const UpdateToolResponseBodyFunctionTool$inboundSchema: z.ZodType<
|
|
|
2741
2741
|
z.ZodTypeDef,
|
|
2742
2742
|
unknown
|
|
2743
2743
|
> = z.object({
|
|
2744
|
-
_id: z.string().default("
|
|
2744
|
+
_id: z.string().default("tool_01KTXSA2PZSX6QAPC52HBPSDMR"),
|
|
2745
2745
|
path: z.string(),
|
|
2746
2746
|
key: z.string(),
|
|
2747
2747
|
display_name: z.string().optional(),
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { budgetsCheck } from "../funcs/budgetsCheck.js";
|
|
6
|
+
import { budgetsCreate } from "../funcs/budgetsCreate.js";
|
|
7
|
+
import { budgetsDelete } from "../funcs/budgetsDelete.js";
|
|
8
|
+
import { budgetsGet } from "../funcs/budgetsGet.js";
|
|
9
|
+
import { budgetsGetConsumption } from "../funcs/budgetsGetConsumption.js";
|
|
10
|
+
import { budgetsList } from "../funcs/budgetsList.js";
|
|
11
|
+
import { budgetsResetConsumption } from "../funcs/budgetsResetConsumption.js";
|
|
12
|
+
import { budgetsUpdate } from "../funcs/budgetsUpdate.js";
|
|
13
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
14
|
+
import * as components from "../models/components/index.js";
|
|
15
|
+
import * as operations from "../models/operations/index.js";
|
|
16
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
17
|
+
|
|
18
|
+
export class Budgets extends ClientSDK {
|
|
19
|
+
/**
|
|
20
|
+
* List budgets
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* Returns budgets visible to the current workspace, ordered by creation time with the newest first. Supports filtering by scope kind, scope target id, period, and active state, plus an optional free-text query that searches across denormalized target names via Typesense.
|
|
24
|
+
*/
|
|
25
|
+
async list(
|
|
26
|
+
request?: operations.BudgetListRequest | undefined,
|
|
27
|
+
options?: RequestOptions,
|
|
28
|
+
): Promise<components.ListBudgetsResponse> {
|
|
29
|
+
return unwrapAsync(budgetsList(
|
|
30
|
+
this,
|
|
31
|
+
request,
|
|
32
|
+
options,
|
|
33
|
+
));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Create a new budget
|
|
38
|
+
*
|
|
39
|
+
* @remarks
|
|
40
|
+
* Creates a new budget in the workspace. Exactly one scope variant must be set (workspace / project / identity / api_key / provider / model). At least one of `limits.amount`, `limits.token_limit`, or `rate_limit.requests_per_minute` MUST be provided. Uniqueness is enforced across (workspace_id, scope_kind, scope_target_id).
|
|
41
|
+
*/
|
|
42
|
+
async create(
|
|
43
|
+
request: components.CreateBudgetRequest,
|
|
44
|
+
options?: RequestOptions,
|
|
45
|
+
): Promise<components.CreateBudgetResponse> {
|
|
46
|
+
return unwrapAsync(budgetsCreate(
|
|
47
|
+
this,
|
|
48
|
+
request,
|
|
49
|
+
options,
|
|
50
|
+
));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Check budget enforcement
|
|
55
|
+
*
|
|
56
|
+
* @remarks
|
|
57
|
+
* Internal endpoint used by the gateway to resolve applicable budgets and check enforcement gates for a request. Returns allowed/rejected status with dimension info for rate-limit headers.
|
|
58
|
+
*/
|
|
59
|
+
async check(
|
|
60
|
+
request: components.CheckBudgetsRequest,
|
|
61
|
+
options?: RequestOptions,
|
|
62
|
+
): Promise<components.CheckBudgetsResponse> {
|
|
63
|
+
return unwrapAsync(budgetsCheck(
|
|
64
|
+
this,
|
|
65
|
+
request,
|
|
66
|
+
options,
|
|
67
|
+
));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Retrieve a budget
|
|
72
|
+
*
|
|
73
|
+
* @remarks
|
|
74
|
+
* Retrieves the metadata for an existing budget by its unique identifier. Returns `NotFound` when the budget does not exist in the caller's workspace.
|
|
75
|
+
*/
|
|
76
|
+
async get(
|
|
77
|
+
request: operations.BudgetGetRequest,
|
|
78
|
+
options?: RequestOptions,
|
|
79
|
+
): Promise<components.GetBudgetResponse> {
|
|
80
|
+
return unwrapAsync(budgetsGet(
|
|
81
|
+
this,
|
|
82
|
+
request,
|
|
83
|
+
options,
|
|
84
|
+
));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Delete a budget
|
|
89
|
+
*
|
|
90
|
+
* @remarks
|
|
91
|
+
* Permanently deletes a budget. Consumption counters in Redis for this budget are cleared immediately. The response body is empty on success.
|
|
92
|
+
*/
|
|
93
|
+
async delete(
|
|
94
|
+
request: operations.BudgetDeleteRequest,
|
|
95
|
+
options?: RequestOptions,
|
|
96
|
+
): Promise<components.DeleteBudgetResponse> {
|
|
97
|
+
return unwrapAsync(budgetsDelete(
|
|
98
|
+
this,
|
|
99
|
+
request,
|
|
100
|
+
options,
|
|
101
|
+
));
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Update a budget
|
|
106
|
+
*
|
|
107
|
+
* @remarks
|
|
108
|
+
* Updates mutable fields of a budget: limits, rate limit, activation, and expiration. The scope is immutable — to change a budget's target, delete and recreate it. Omitted fields keep their current values.
|
|
109
|
+
*/
|
|
110
|
+
async update(
|
|
111
|
+
request: operations.BudgetUpdateRequest,
|
|
112
|
+
options?: RequestOptions,
|
|
113
|
+
): Promise<components.UpdateBudgetResponse> {
|
|
114
|
+
return unwrapAsync(budgetsUpdate(
|
|
115
|
+
this,
|
|
116
|
+
request,
|
|
117
|
+
options,
|
|
118
|
+
));
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Get current-period consumption
|
|
123
|
+
*
|
|
124
|
+
* @remarks
|
|
125
|
+
* Returns the current-period cost, token, and per-minute request counters for the budget. Values reflect the live Redis state for the active period bucket.
|
|
126
|
+
*/
|
|
127
|
+
async getConsumption(
|
|
128
|
+
request: operations.BudgetGetConsumptionRequest,
|
|
129
|
+
options?: RequestOptions,
|
|
130
|
+
): Promise<components.GetBudgetConsumptionResponse> {
|
|
131
|
+
return unwrapAsync(budgetsGetConsumption(
|
|
132
|
+
this,
|
|
133
|
+
request,
|
|
134
|
+
options,
|
|
135
|
+
));
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Reset budget consumption
|
|
140
|
+
*
|
|
141
|
+
* @remarks
|
|
142
|
+
* Clears the current-period cost, token, and request counters for the budget. The budget record itself is preserved; only the Redis counters are reset.
|
|
143
|
+
*/
|
|
144
|
+
async resetConsumption(
|
|
145
|
+
request: operations.BudgetResetConsumptionRequest,
|
|
146
|
+
options?: RequestOptions,
|
|
147
|
+
): Promise<components.ResetBudgetConsumptionResponse> {
|
|
148
|
+
return unwrapAsync(budgetsResetConsumption(
|
|
149
|
+
this,
|
|
150
|
+
request,
|
|
151
|
+
options,
|
|
152
|
+
));
|
|
153
|
+
}
|
|
154
|
+
}
|
|
@@ -45,10 +45,7 @@ export class Feedback extends ClientSDK {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
|
-
* Create a
|
|
49
|
-
*
|
|
50
|
-
* @remarks
|
|
51
|
-
* Creates a new dataset in the specified project.
|
|
48
|
+
* Create a human review set
|
|
52
49
|
*/
|
|
53
50
|
async create(
|
|
54
51
|
request?: operations.PostV2FeedbackRequestBody | undefined,
|
|
@@ -6,6 +6,7 @@ import { ClientSDK } from "../lib/sdks.js";
|
|
|
6
6
|
import { Agents } from "./agents.js";
|
|
7
7
|
import { Annotations } from "./annotations.js";
|
|
8
8
|
import { ApiKeys } from "./apikeys.js";
|
|
9
|
+
import { Budgets } from "./budgets.js";
|
|
9
10
|
import { Chunking } from "./chunking.js";
|
|
10
11
|
import { Datasets } from "./datasets.js";
|
|
11
12
|
import { Deployments } from "./deployments.js";
|
|
@@ -126,6 +127,11 @@ export class Orq extends ClientSDK {
|
|
|
126
127
|
return (this._apiKeys ??= new ApiKeys(this._options));
|
|
127
128
|
}
|
|
128
129
|
|
|
130
|
+
private _budgets?: Budgets;
|
|
131
|
+
get budgets(): Budgets {
|
|
132
|
+
return (this._budgets ??= new Budgets(this._options));
|
|
133
|
+
}
|
|
134
|
+
|
|
129
135
|
private _files?: Files;
|
|
130
136
|
get files(): Files {
|
|
131
137
|
return (this._files ??= new Files(this._options));
|
package/sdk/feedback.d.ts
CHANGED
|
@@ -5,10 +5,7 @@ export declare class Feedback extends ClientSDK {
|
|
|
5
5
|
createEvaluation(request?: operations.PostV2FeedbackEvaluationRequestBody | undefined, options?: RequestOptions): Promise<void>;
|
|
6
6
|
remove(request?: operations.PostV2FeedbackRemoveRequestBody | undefined, options?: RequestOptions): Promise<operations.PostV2FeedbackRemoveResponseBody>;
|
|
7
7
|
/**
|
|
8
|
-
* Create a
|
|
9
|
-
*
|
|
10
|
-
* @remarks
|
|
11
|
-
* Creates a project in the current workspace. Projects are workspace-level containers for resources such as skills, deployments, datasets, rules, and related team access.
|
|
8
|
+
* Create a knowledge
|
|
12
9
|
*/
|
|
13
10
|
create(request?: operations.PostV2FeedbackRequestBody | undefined, options?: RequestOptions): Promise<operations.PostV2FeedbackResponseBody>;
|
|
14
11
|
}
|
package/sdk/feedback.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feedback.d.ts","sourceRoot":"","sources":["../src/sdk/feedback.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,QAAS,SAAQ,SAAS;IAC/B,gBAAgB,CACpB,OAAO,CAAC,EAAE,UAAU,CAAC,yCAAyC,GAAG,SAAS,EAC1E,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC;IAQV,gBAAgB,CACpB,OAAO,CAAC,EAAE,UAAU,CAAC,mCAAmC,GAAG,SAAS,EACpE,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC;IAQV,MAAM,CACV,OAAO,CAAC,EAAE,UAAU,CAAC,+BAA+B,GAAG,SAAS,EAChE,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,gCAAgC,CAAC;IAQvD
|
|
1
|
+
{"version":3,"file":"feedback.d.ts","sourceRoot":"","sources":["../src/sdk/feedback.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,QAAS,SAAQ,SAAS;IAC/B,gBAAgB,CACpB,OAAO,CAAC,EAAE,UAAU,CAAC,yCAAyC,GAAG,SAAS,EAC1E,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC;IAQV,gBAAgB,CACpB,OAAO,CAAC,EAAE,UAAU,CAAC,mCAAmC,GAAG,SAAS,EACpE,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC;IAQV,MAAM,CACV,OAAO,CAAC,EAAE,UAAU,CAAC,+BAA+B,GAAG,SAAS,EAChE,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,gCAAgC,CAAC;IAQvD;;OAEG;IACG,MAAM,CACV,OAAO,CAAC,EAAE,UAAU,CAAC,yBAAyB,GAAG,SAAS,EAC1D,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,0BAA0B,CAAC;CAOlD"}
|
package/sdk/feedback.js
CHANGED
|
@@ -21,10 +21,7 @@ class Feedback extends sdks_js_1.ClientSDK {
|
|
|
21
21
|
return (0, fp_js_1.unwrapAsync)((0, feedbackRemove_js_1.feedbackRemove)(this, request, options));
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
* Create a
|
|
25
|
-
*
|
|
26
|
-
* @remarks
|
|
27
|
-
* Creates a project in the current workspace. Projects are workspace-level containers for resources such as skills, deployments, datasets, rules, and related team access.
|
|
24
|
+
* Create a knowledge
|
|
28
25
|
*/
|
|
29
26
|
async create(request, options) {
|
|
30
27
|
return (0, fp_js_1.unwrapAsync)((0, feedbackCreate_js_1.feedbackCreate)(this, request, options));
|
package/sdk/feedback.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feedback.js","sourceRoot":"","sources":["../src/sdk/feedback.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,kEAA4D;AAC5D,sFAAgF;AAChF,kEAA4D;AAC5D,sFAAgF;AAChF,4CAA2D;AAE3D,0CAA6C;AAE7C,MAAa,QAAS,SAAQ,mBAAS;IACrC,KAAK,CAAC,gBAAgB,CACpB,OAA0E,EAC1E,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,sDAAwB,EACzC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,gBAAgB,CACpB,OAAoE,EACpE,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,sDAAwB,EACzC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CACV,OAAgE,EAChE,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kCAAc,EAC/B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"feedback.js","sourceRoot":"","sources":["../src/sdk/feedback.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,kEAA4D;AAC5D,sFAAgF;AAChF,kEAA4D;AAC5D,sFAAgF;AAChF,4CAA2D;AAE3D,0CAA6C;AAE7C,MAAa,QAAS,SAAQ,mBAAS;IACrC,KAAK,CAAC,gBAAgB,CACpB,OAA0E,EAC1E,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,sDAAwB,EACzC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,gBAAgB,CACpB,OAAoE,EACpE,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,sDAAwB,EACzC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CACV,OAAgE,EAChE,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kCAAc,EAC/B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CACV,OAA0D,EAC1D,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kCAAc,EAC/B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AA/CD,4BA+CC"}
|
package/src/lib/config.ts
CHANGED
|
@@ -58,7 +58,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
58
58
|
export const SDK_METADATA = {
|
|
59
59
|
language: "typescript",
|
|
60
60
|
openapiDocVersion: "2.0",
|
|
61
|
-
sdkVersion: "4.10.
|
|
62
|
-
genVersion: "2.
|
|
63
|
-
userAgent: "speakeasy-sdk/typescript 4.10.
|
|
61
|
+
sdkVersion: "4.10.18",
|
|
62
|
+
genVersion: "2.903.5",
|
|
63
|
+
userAgent: "speakeasy-sdk/typescript 4.10.18 2.903.5 2.0 @orq-ai/node",
|
|
64
64
|
} as const;
|
package/src/lib/encodings.ts
CHANGED
package/src/lib/env.ts
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
-
import { dlv } from "./dlv.js";
|
|
7
6
|
|
|
8
7
|
export interface Env {
|
|
9
8
|
ORQ_API_KEY?: string | undefined;
|
|
@@ -38,11 +37,16 @@ export function env(): Env {
|
|
|
38
37
|
return envMemo;
|
|
39
38
|
}
|
|
40
39
|
|
|
40
|
+
const globals = globalThis as {
|
|
41
|
+
Deno?: { env?: { toObject?: () => Record<string, string | undefined> } };
|
|
42
|
+
process?: { env?: Record<string, string | undefined> };
|
|
43
|
+
};
|
|
44
|
+
|
|
41
45
|
let envObject: Record<string, unknown> = {};
|
|
42
46
|
if (isDeno()) {
|
|
43
|
-
envObject =
|
|
47
|
+
envObject = globals.Deno?.env?.toObject?.() ?? {};
|
|
44
48
|
} else {
|
|
45
|
-
envObject =
|
|
49
|
+
envObject = globals.process?.env ?? {};
|
|
46
50
|
}
|
|
47
51
|
|
|
48
52
|
envMemo = envSchema.parse(envObject);
|
package/src/lib/event-streams.ts
CHANGED
|
@@ -26,22 +26,45 @@ export class EventStream<T extends SseMessage<unknown>>
|
|
|
26
26
|
opts?: { dataRequired?: boolean },
|
|
27
27
|
) {
|
|
28
28
|
const upstream = responseBody.getReader();
|
|
29
|
-
let buffer: Uint8Array = new Uint8Array();
|
|
29
|
+
let buffer: Uint8Array = new Uint8Array(4096);
|
|
30
|
+
let bufferLen = 0;
|
|
31
|
+
let searchStart = 0;
|
|
30
32
|
const state = { eventId: undefined as string | undefined };
|
|
31
33
|
const dataRequired = opts?.dataRequired ?? true;
|
|
32
34
|
super({
|
|
33
35
|
async pull(downstream) {
|
|
34
36
|
try {
|
|
35
37
|
while (true) {
|
|
36
|
-
const match = findBoundary(buffer);
|
|
38
|
+
const match = findBoundary(buffer, bufferLen, searchStart);
|
|
37
39
|
if (!match) {
|
|
40
|
+
// Bytes before the trailing MAX_BOUNDARY_LEN-1 were already
|
|
41
|
+
// scanned with full lookahead and cannot start a boundary even
|
|
42
|
+
// once more data arrives, so the next scan can skip them.
|
|
43
|
+
searchStart = Math.max(0, bufferLen - MAX_BOUNDARY_LEN + 1);
|
|
38
44
|
const chunk = await upstream.read();
|
|
39
45
|
if (chunk.done) return downstream.close();
|
|
40
|
-
|
|
46
|
+
if (bufferLen + chunk.value.length > buffer.length) {
|
|
47
|
+
const grown = new Uint8Array(
|
|
48
|
+
Math.max(buffer.length * 2, bufferLen + chunk.value.length),
|
|
49
|
+
);
|
|
50
|
+
grown.set(buffer.subarray(0, bufferLen));
|
|
51
|
+
buffer = grown;
|
|
52
|
+
}
|
|
53
|
+
buffer.set(chunk.value, bufferLen);
|
|
54
|
+
bufferLen += chunk.value.length;
|
|
41
55
|
continue;
|
|
42
56
|
}
|
|
43
57
|
const message = buffer.slice(0, match.index);
|
|
44
|
-
buffer
|
|
58
|
+
buffer.copyWithin(0, match.index + match.length, bufferLen);
|
|
59
|
+
bufferLen -= match.index + match.length;
|
|
60
|
+
if (buffer.length > 4096 && bufferLen <= buffer.length >> 2) {
|
|
61
|
+
// Release oversized capacity retained after an unusually large
|
|
62
|
+
// event so long-lived streams do not hold peak memory.
|
|
63
|
+
const shrunk = new Uint8Array(Math.max(4096, bufferLen * 2));
|
|
64
|
+
shrunk.set(buffer.subarray(0, bufferLen));
|
|
65
|
+
buffer = shrunk;
|
|
66
|
+
}
|
|
67
|
+
searchStart = 0;
|
|
45
68
|
const item = parseMessage(message, parse, state, dataRequired);
|
|
46
69
|
if (item && !item.done) return downstream.enqueue(item.value);
|
|
47
70
|
if (item?.done) {
|
|
@@ -89,13 +112,6 @@ export class EventStream<T extends SseMessage<unknown>>
|
|
|
89
112
|
}
|
|
90
113
|
}
|
|
91
114
|
|
|
92
|
-
function concatBuffer(a: Uint8Array, b: Uint8Array): Uint8Array {
|
|
93
|
-
const c = new Uint8Array(a.length + b.length);
|
|
94
|
-
c.set(a, 0);
|
|
95
|
-
c.set(b, a.length);
|
|
96
|
-
return c;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
115
|
const CR = 13;
|
|
100
116
|
const LF = 10;
|
|
101
117
|
const BOUNDARIES = [
|
|
@@ -108,12 +124,14 @@ const BOUNDARIES = [
|
|
|
108
124
|
[LF, CR], // \n\r
|
|
109
125
|
[LF, LF], // \n\n
|
|
110
126
|
];
|
|
127
|
+
const MAX_BOUNDARY_LEN = BOUNDARIES.reduce((m, b) => Math.max(m, b.length), 0);
|
|
111
128
|
|
|
112
129
|
function findBoundary(
|
|
113
130
|
buf: Uint8Array,
|
|
131
|
+
len: number,
|
|
132
|
+
from: number,
|
|
114
133
|
): { index: number; length: number } | null {
|
|
115
|
-
|
|
116
|
-
for (let i = 0; i < len; i++) {
|
|
134
|
+
for (let i = from; i < len; i++) {
|
|
117
135
|
if (buf[i] !== CR && buf[i] !== LF) continue;
|
|
118
136
|
for (const boundary of BOUNDARIES) {
|
|
119
137
|
if (i + boundary.length > len) continue;
|
package/src/lib/matchers.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { APIError } from "../models/errors/apierror.js";
|
|
|
6
6
|
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
7
7
|
import { ERR, OK, Result } from "../types/fp.js";
|
|
8
8
|
import { matchResponse, matchStatusCode, StatusCodePredicate } from "./http.js";
|
|
9
|
-
import { isPlainObject } from "./
|
|
9
|
+
import { isPlainObject } from "./primitives.js";
|
|
10
10
|
|
|
11
11
|
export type Encoding =
|
|
12
12
|
| "jsonl"
|
package/src/lib/primitives.ts
CHANGED
|
@@ -148,3 +148,19 @@ export function allRequired<V extends Record<string, unknown>>(
|
|
|
148
148
|
|
|
149
149
|
return v as ReturnType<typeof allRequired<V>>;
|
|
150
150
|
}
|
|
151
|
+
|
|
152
|
+
export function isPlainObject(
|
|
153
|
+
value: unknown,
|
|
154
|
+
): value is Record<string, unknown> {
|
|
155
|
+
if (value === null || typeof value !== "object") return false;
|
|
156
|
+
if (Object.prototype.toString.call(value) !== "[object Object]") return false;
|
|
157
|
+
const proto = Object.getPrototypeOf(value);
|
|
158
|
+
if (proto === null || proto === Object.prototype) return true;
|
|
159
|
+
// cross-realm plain objects (vm contexts, iframes) inherit from a
|
|
160
|
+
// different realm's Object.prototype, which itself has a null prototype
|
|
161
|
+
try {
|
|
162
|
+
return Object.getPrototypeOf(proto) === null;
|
|
163
|
+
} catch {
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
@@ -40,7 +40,7 @@ export const ReasoningPart$inboundSchema: z.ZodType<
|
|
|
40
40
|
z.ZodTypeDef,
|
|
41
41
|
unknown
|
|
42
42
|
> = z.object({
|
|
43
|
-
_id: z.string().default("
|
|
43
|
+
_id: z.string().default("reasoning_01kty25x1qxddav24r3934mxcb"),
|
|
44
44
|
metadata: z.record(z.any()).optional(),
|
|
45
45
|
kind: z.literal("reasoning"),
|
|
46
46
|
reasoning: z.string(),
|
|
@@ -138,7 +138,7 @@ export const CreateDatasetResponseBody$inboundSchema: z.ZodType<
|
|
|
138
138
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
139
139
|
.optional(),
|
|
140
140
|
updated: z.string().datetime({ offset: true }).default(
|
|
141
|
-
"2026-06-
|
|
141
|
+
"2026-06-12T14:00:38.443Z",
|
|
142
142
|
).transform(v => new Date(v)),
|
|
143
143
|
}).transform((v) => {
|
|
144
144
|
return remap$(v, {
|
|
@@ -2355,7 +2355,7 @@ export const Evaluations3$inboundSchema: z.ZodType<
|
|
|
2355
2355
|
),
|
|
2356
2356
|
reviewed_by_id: z.string(),
|
|
2357
2357
|
reviewed_at: z.string().datetime({ offset: true }).default(
|
|
2358
|
-
"2026-06-
|
|
2358
|
+
"2026-06-12T14:01:08.552Z",
|
|
2359
2359
|
).transform(v => new Date(v)),
|
|
2360
2360
|
type: z.literal("string_array"),
|
|
2361
2361
|
values: z.array(z.string()),
|
|
@@ -2400,7 +2400,7 @@ export const Evaluations2$inboundSchema: z.ZodType<
|
|
|
2400
2400
|
source: CreateDatasetItemEvaluationsSource$inboundSchema.default("orq"),
|
|
2401
2401
|
reviewed_by_id: z.string(),
|
|
2402
2402
|
reviewed_at: z.string().datetime({ offset: true }).default(
|
|
2403
|
-
"2026-06-
|
|
2403
|
+
"2026-06-12T14:01:08.551Z",
|
|
2404
2404
|
).transform(v => new Date(v)),
|
|
2405
2405
|
type: z.literal("number"),
|
|
2406
2406
|
value: z.number(),
|
|
@@ -2446,7 +2446,7 @@ export const Evaluations1$inboundSchema: z.ZodType<
|
|
|
2446
2446
|
source: EvaluationsSource$inboundSchema.default("orq"),
|
|
2447
2447
|
reviewed_by_id: z.string(),
|
|
2448
2448
|
reviewed_at: z.string().datetime({ offset: true }).default(
|
|
2449
|
-
"2026-06-
|
|
2449
|
+
"2026-06-12T14:01:08.551Z",
|
|
2450
2450
|
).transform(v => new Date(v)),
|
|
2451
2451
|
type: z.literal("string"),
|
|
2452
2452
|
value: z.string(),
|
|
@@ -2529,7 +2529,7 @@ export const CreateDatasetItemResponseBody$inboundSchema: z.ZodType<
|
|
|
2529
2529
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
2530
2530
|
.optional(),
|
|
2531
2531
|
updated: z.string().datetime({ offset: true }).default(
|
|
2532
|
-
"2026-06-
|
|
2532
|
+
"2026-06-12T14:00:38.443Z",
|
|
2533
2533
|
).transform(v => new Date(v)),
|
|
2534
2534
|
}).transform((v) => {
|
|
2535
2535
|
return remap$(v, {
|
|
@@ -409,7 +409,7 @@ export const CreateDatasourceResponseBody$inboundSchema: z.ZodType<
|
|
|
409
409
|
z.ZodTypeDef,
|
|
410
410
|
unknown
|
|
411
411
|
> = z.object({
|
|
412
|
-
_id: z.string().default("
|
|
412
|
+
_id: z.string().default("01KTY25XKYD90P2KXX8ZSWZPDC"),
|
|
413
413
|
display_name: z.string(),
|
|
414
414
|
description: z.nullable(z.string()).optional(),
|
|
415
415
|
status: CreateDatasourceStatus$inboundSchema,
|