@veruna/api-contracts 1.1.30 → 1.1.32

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 (26) hide show
  1. package/build/tsconfig.tsbuildinfo +1 -1
  2. package/build/v1/ai-model/schemas/api-provider.enum.d.ts +2 -1
  3. package/build/v1/ai-model/schemas/api-provider.enum.js +1 -0
  4. package/build/v1/ai-model/schemas/api-provider.enum.js.map +1 -1
  5. package/build/v1/chat/commands/create-reg-chat.command.d.ts +47 -0
  6. package/build/v1/chat/commands/create-unreg-chat.command.d.ts +47 -0
  7. package/build/v1/chat/commands/update-chat-title.command.d.ts +47 -0
  8. package/build/v1/chat/commands/update-chat.command.d.ts +47 -0
  9. package/build/v1/chat/queries/get-last-active-chat.query.d.ts +47 -0
  10. package/build/v1/chat/queries/get-reg-chat.query.d.ts +47 -0
  11. package/build/v1/chat/queries/get-unreg-chat.query.d.ts +47 -0
  12. package/build/v1/chat/schemas/chat-with-messages-response.schema.d.ts +47 -0
  13. package/build/v1/message/schemas/message-response.schema.d.ts +47 -0
  14. package/build/v1/message/schemas/message-step-response.schema.d.ts +188 -0
  15. package/build/v1/message/schemas/message-step-response.schema.js +3 -0
  16. package/build/v1/message/schemas/message-step-response.schema.js.map +1 -1
  17. package/build/v1/message/schemas/step-chunk-metadata.schema.d.ts +8 -9
  18. package/build/v1/message/schemas/step-chunk-metadata.schema.js +6 -37
  19. package/build/v1/message/schemas/step-chunk-metadata.schema.js.map +1 -1
  20. package/build/v1/tool/sandbox/index.d.ts +1 -0
  21. package/build/v1/tool/sandbox/index.js +1 -0
  22. package/build/v1/tool/sandbox/index.js.map +1 -1
  23. package/build/v1/tool/sandbox/primitive-completion.schema.d.ts +135 -0
  24. package/build/v1/tool/sandbox/primitive-completion.schema.js +74 -0
  25. package/build/v1/tool/sandbox/primitive-completion.schema.js.map +1 -0
  26. package/package.json +1 -1
@@ -37,6 +37,53 @@ export declare const CodeExecutionStepContentResponseSchema: z.ZodObject<{
37
37
  }, z.core.$strip>>;
38
38
  sessionReused: z.ZodBoolean;
39
39
  timedOut: z.ZodBoolean;
40
+ primitive: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
41
+ type: z.ZodLiteral<import("../..").SandboxPrimitiveType.BASH>;
42
+ }, z.core.$strip>, z.ZodObject<{
43
+ type: z.ZodLiteral<import("../..").SandboxPrimitiveType.CREATE_FILE>;
44
+ path: z.ZodString;
45
+ totalLines: z.ZodNumber;
46
+ bytesWritten: z.ZodNumber;
47
+ overwrite: z.ZodBoolean;
48
+ preview: z.ZodObject<{
49
+ lines: z.ZodArray<z.ZodString>;
50
+ truncated: z.ZodBoolean;
51
+ }, z.core.$strip>;
52
+ }, z.core.$strip>, z.ZodObject<{
53
+ type: z.ZodLiteral<import("../..").SandboxPrimitiveType.STR_REPLACE>;
54
+ path: z.ZodString;
55
+ linesAdded: z.ZodNumber;
56
+ linesRemoved: z.ZodNumber;
57
+ linesBefore: z.ZodNumber;
58
+ linesAfter: z.ZodNumber;
59
+ hunk: z.ZodObject<{
60
+ startLine: z.ZodNumber;
61
+ contextBefore: z.ZodArray<z.ZodString>;
62
+ oldLines: z.ZodArray<z.ZodString>;
63
+ newLines: z.ZodArray<z.ZodString>;
64
+ contextAfter: z.ZodArray<z.ZodString>;
65
+ truncated: z.ZodBoolean;
66
+ }, z.core.$strip>;
67
+ }, z.core.$strip>, z.ZodObject<{
68
+ type: z.ZodLiteral<import("../..").SandboxPrimitiveType.VIEW>;
69
+ path: z.ZodString;
70
+ view: z.ZodDiscriminatedUnion<[z.ZodObject<{
71
+ type: z.ZodLiteral<import("../..").SandboxViewKind.DIRECTORY>;
72
+ entryCount: z.ZodNumber;
73
+ }, z.core.$strip>, z.ZodObject<{
74
+ type: z.ZodLiteral<import("../..").SandboxViewKind.TEXT>;
75
+ startLine: z.ZodNumber;
76
+ endLine: z.ZodNumber;
77
+ totalLines: z.ZodNumber;
78
+ truncated: z.ZodBoolean;
79
+ }, z.core.$strip>, z.ZodObject<{
80
+ type: z.ZodLiteral<import("../..").SandboxViewKind.IMAGE>;
81
+ }, z.core.$strip>, z.ZodObject<{
82
+ type: z.ZodLiteral<import("../..").SandboxViewKind.PDF>;
83
+ pagesShown: z.ZodNumber;
84
+ }, z.core.$strip>], "type">;
85
+ }, z.core.$strip>], "type">>;
86
+ description: z.ZodOptional<z.ZodString>;
40
87
  }, z.core.$strip>;
41
88
  export declare const StepContentResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
42
89
  content: z.ZodString;
@@ -66,6 +113,53 @@ export declare const StepContentResponseSchema: z.ZodUnion<readonly [z.ZodObject
66
113
  }, z.core.$strip>>;
67
114
  sessionReused: z.ZodBoolean;
68
115
  timedOut: z.ZodBoolean;
116
+ primitive: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
117
+ type: z.ZodLiteral<import("../..").SandboxPrimitiveType.BASH>;
118
+ }, z.core.$strip>, z.ZodObject<{
119
+ type: z.ZodLiteral<import("../..").SandboxPrimitiveType.CREATE_FILE>;
120
+ path: z.ZodString;
121
+ totalLines: z.ZodNumber;
122
+ bytesWritten: z.ZodNumber;
123
+ overwrite: z.ZodBoolean;
124
+ preview: z.ZodObject<{
125
+ lines: z.ZodArray<z.ZodString>;
126
+ truncated: z.ZodBoolean;
127
+ }, z.core.$strip>;
128
+ }, z.core.$strip>, z.ZodObject<{
129
+ type: z.ZodLiteral<import("../..").SandboxPrimitiveType.STR_REPLACE>;
130
+ path: z.ZodString;
131
+ linesAdded: z.ZodNumber;
132
+ linesRemoved: z.ZodNumber;
133
+ linesBefore: z.ZodNumber;
134
+ linesAfter: z.ZodNumber;
135
+ hunk: z.ZodObject<{
136
+ startLine: z.ZodNumber;
137
+ contextBefore: z.ZodArray<z.ZodString>;
138
+ oldLines: z.ZodArray<z.ZodString>;
139
+ newLines: z.ZodArray<z.ZodString>;
140
+ contextAfter: z.ZodArray<z.ZodString>;
141
+ truncated: z.ZodBoolean;
142
+ }, z.core.$strip>;
143
+ }, z.core.$strip>, z.ZodObject<{
144
+ type: z.ZodLiteral<import("../..").SandboxPrimitiveType.VIEW>;
145
+ path: z.ZodString;
146
+ view: z.ZodDiscriminatedUnion<[z.ZodObject<{
147
+ type: z.ZodLiteral<import("../..").SandboxViewKind.DIRECTORY>;
148
+ entryCount: z.ZodNumber;
149
+ }, z.core.$strip>, z.ZodObject<{
150
+ type: z.ZodLiteral<import("../..").SandboxViewKind.TEXT>;
151
+ startLine: z.ZodNumber;
152
+ endLine: z.ZodNumber;
153
+ totalLines: z.ZodNumber;
154
+ truncated: z.ZodBoolean;
155
+ }, z.core.$strip>, z.ZodObject<{
156
+ type: z.ZodLiteral<import("../..").SandboxViewKind.IMAGE>;
157
+ }, z.core.$strip>, z.ZodObject<{
158
+ type: z.ZodLiteral<import("../..").SandboxViewKind.PDF>;
159
+ pagesShown: z.ZodNumber;
160
+ }, z.core.$strip>], "type">;
161
+ }, z.core.$strip>], "type">>;
162
+ description: z.ZodOptional<z.ZodString>;
69
163
  }, z.core.$strip>]>;
70
164
  export declare const MessageStepResponseSchema: z.ZodObject<{
71
165
  uuid: z.ZodString;
@@ -99,6 +193,53 @@ export declare const MessageStepResponseSchema: z.ZodObject<{
99
193
  }, z.core.$strip>>;
100
194
  sessionReused: z.ZodBoolean;
101
195
  timedOut: z.ZodBoolean;
196
+ primitive: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
197
+ type: z.ZodLiteral<import("../..").SandboxPrimitiveType.BASH>;
198
+ }, z.core.$strip>, z.ZodObject<{
199
+ type: z.ZodLiteral<import("../..").SandboxPrimitiveType.CREATE_FILE>;
200
+ path: z.ZodString;
201
+ totalLines: z.ZodNumber;
202
+ bytesWritten: z.ZodNumber;
203
+ overwrite: z.ZodBoolean;
204
+ preview: z.ZodObject<{
205
+ lines: z.ZodArray<z.ZodString>;
206
+ truncated: z.ZodBoolean;
207
+ }, z.core.$strip>;
208
+ }, z.core.$strip>, z.ZodObject<{
209
+ type: z.ZodLiteral<import("../..").SandboxPrimitiveType.STR_REPLACE>;
210
+ path: z.ZodString;
211
+ linesAdded: z.ZodNumber;
212
+ linesRemoved: z.ZodNumber;
213
+ linesBefore: z.ZodNumber;
214
+ linesAfter: z.ZodNumber;
215
+ hunk: z.ZodObject<{
216
+ startLine: z.ZodNumber;
217
+ contextBefore: z.ZodArray<z.ZodString>;
218
+ oldLines: z.ZodArray<z.ZodString>;
219
+ newLines: z.ZodArray<z.ZodString>;
220
+ contextAfter: z.ZodArray<z.ZodString>;
221
+ truncated: z.ZodBoolean;
222
+ }, z.core.$strip>;
223
+ }, z.core.$strip>, z.ZodObject<{
224
+ type: z.ZodLiteral<import("../..").SandboxPrimitiveType.VIEW>;
225
+ path: z.ZodString;
226
+ view: z.ZodDiscriminatedUnion<[z.ZodObject<{
227
+ type: z.ZodLiteral<import("../..").SandboxViewKind.DIRECTORY>;
228
+ entryCount: z.ZodNumber;
229
+ }, z.core.$strip>, z.ZodObject<{
230
+ type: z.ZodLiteral<import("../..").SandboxViewKind.TEXT>;
231
+ startLine: z.ZodNumber;
232
+ endLine: z.ZodNumber;
233
+ totalLines: z.ZodNumber;
234
+ truncated: z.ZodBoolean;
235
+ }, z.core.$strip>, z.ZodObject<{
236
+ type: z.ZodLiteral<import("../..").SandboxViewKind.IMAGE>;
237
+ }, z.core.$strip>, z.ZodObject<{
238
+ type: z.ZodLiteral<import("../..").SandboxViewKind.PDF>;
239
+ pagesShown: z.ZodNumber;
240
+ }, z.core.$strip>], "type">;
241
+ }, z.core.$strip>], "type">>;
242
+ description: z.ZodOptional<z.ZodString>;
102
243
  }, z.core.$strip>]>>;
103
244
  showInUi: z.ZodBoolean;
104
245
  startedAt: z.ZodNullable<z.ZodString>;
@@ -144,6 +285,53 @@ export declare const MessageStepsResponseSchema: z.ZodArray<z.ZodObject<{
144
285
  }, z.core.$strip>>;
145
286
  sessionReused: z.ZodBoolean;
146
287
  timedOut: z.ZodBoolean;
288
+ primitive: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
289
+ type: z.ZodLiteral<import("../..").SandboxPrimitiveType.BASH>;
290
+ }, z.core.$strip>, z.ZodObject<{
291
+ type: z.ZodLiteral<import("../..").SandboxPrimitiveType.CREATE_FILE>;
292
+ path: z.ZodString;
293
+ totalLines: z.ZodNumber;
294
+ bytesWritten: z.ZodNumber;
295
+ overwrite: z.ZodBoolean;
296
+ preview: z.ZodObject<{
297
+ lines: z.ZodArray<z.ZodString>;
298
+ truncated: z.ZodBoolean;
299
+ }, z.core.$strip>;
300
+ }, z.core.$strip>, z.ZodObject<{
301
+ type: z.ZodLiteral<import("../..").SandboxPrimitiveType.STR_REPLACE>;
302
+ path: z.ZodString;
303
+ linesAdded: z.ZodNumber;
304
+ linesRemoved: z.ZodNumber;
305
+ linesBefore: z.ZodNumber;
306
+ linesAfter: z.ZodNumber;
307
+ hunk: z.ZodObject<{
308
+ startLine: z.ZodNumber;
309
+ contextBefore: z.ZodArray<z.ZodString>;
310
+ oldLines: z.ZodArray<z.ZodString>;
311
+ newLines: z.ZodArray<z.ZodString>;
312
+ contextAfter: z.ZodArray<z.ZodString>;
313
+ truncated: z.ZodBoolean;
314
+ }, z.core.$strip>;
315
+ }, z.core.$strip>, z.ZodObject<{
316
+ type: z.ZodLiteral<import("../..").SandboxPrimitiveType.VIEW>;
317
+ path: z.ZodString;
318
+ view: z.ZodDiscriminatedUnion<[z.ZodObject<{
319
+ type: z.ZodLiteral<import("../..").SandboxViewKind.DIRECTORY>;
320
+ entryCount: z.ZodNumber;
321
+ }, z.core.$strip>, z.ZodObject<{
322
+ type: z.ZodLiteral<import("../..").SandboxViewKind.TEXT>;
323
+ startLine: z.ZodNumber;
324
+ endLine: z.ZodNumber;
325
+ totalLines: z.ZodNumber;
326
+ truncated: z.ZodBoolean;
327
+ }, z.core.$strip>, z.ZodObject<{
328
+ type: z.ZodLiteral<import("../..").SandboxViewKind.IMAGE>;
329
+ }, z.core.$strip>, z.ZodObject<{
330
+ type: z.ZodLiteral<import("../..").SandboxViewKind.PDF>;
331
+ pagesShown: z.ZodNumber;
332
+ }, z.core.$strip>], "type">;
333
+ }, z.core.$strip>], "type">>;
334
+ description: z.ZodOptional<z.ZodString>;
147
335
  }, z.core.$strip>]>>;
148
336
  showInUi: z.ZodBoolean;
149
337
  startedAt: z.ZodNullable<z.ZodString>;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MessageStepsResponseSchema = exports.MessageStepResponseSchema = exports.StepContentResponseSchema = exports.CodeExecutionStepContentResponseSchema = exports.UploadStepContentSchema = exports.ImageGenStepContentSchema = exports.WebSearchStepContentSchema = exports.WebSearchCitationSchema = exports.TextStepContentSchema = void 0;
4
4
  const zod_1 = require("zod");
5
+ const primitive_completion_schema_1 = require("../../tool/sandbox/primitive-completion.schema");
5
6
  const generation_step_schema_1 = require("./generation-step.schema");
6
7
  exports.TextStepContentSchema = zod_1.z.object({
7
8
  content: zod_1.z.string(),
@@ -38,6 +39,8 @@ exports.CodeExecutionStepContentResponseSchema = zod_1.z.object({
38
39
  })),
39
40
  sessionReused: zod_1.z.boolean(),
40
41
  timedOut: zod_1.z.boolean(),
42
+ primitive: primitive_completion_schema_1.SandboxPrimitiveCompletionSchema.optional(),
43
+ description: zod_1.z.string().optional(),
41
44
  });
42
45
  exports.StepContentResponseSchema = zod_1.z.union([
43
46
  exports.TextStepContentSchema,
@@ -1 +1 @@
1
- {"version":3,"file":"message-step-response.schema.js","sourceRoot":"","sources":["../../../../v1/message/schemas/message-step-response.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,qEAAiF;AAKpE,QAAA,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1C,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC;AAKU,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5C,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE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AE;CACxB,CAAC,CAAC;AAKU,QAAA,yBAAyB,GAAG,OAAC,CAAC,KAAK,CAAC;IAC7C,6BAAqB;IACrB,kCAA0B;IAC1B,iCAAyB;IACzB,+BAAuB;IACvB,8CAAsC;CACzC,CAAC,CAAC;AAMU,QAAA,yBAAyB,GAAG,OAAC,CAAC,MAAM,CAAC;IAE9C,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAEvB,IAAI,EAAE,OAAC,CAAC,UAAU,CAAC,2CAAkB,CAAC;IAEtC,MAAM,EAAE,OAAC,CAAC,UAAU,CAAC,0CAAiB,CAAC;IAEvC,OAAO,EAAE,iCAAyB,CAAC,QAAQ,EAAE;IAE7C,QAAQ,EAAE,OAAC,CAAC,OAAO,EAAE;IAErB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAEhC,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC;AAcU,QAAA,0BAA0B,GAAG,OAAC,CAAC,KAAK,CAAC,iCAAyB,CAAC,CAAC"}
1
+ {"version":3,"file":"message-step-response.schema.js","sourceRoot":"","sources":["../../../../v1/message/schemas/message-step-response.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,gGAAkG;AAClG,qEAAiF;AAKpE,QAAA,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1C,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC;AAKU,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5C,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC;AAKU,QAAA,0BAA0B,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,OAAO,EAAE,OAAC,CAAC,KAAK,C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qB;IACrB,kCAA0B;IAC1B,iCAAyB;IACzB,+BAAuB;IACvB,8CAAsC;CACzC,CAAC,CAAC;AAMU,QAAA,yBAAyB,GAAG,OAAC,CAAC,MAAM,CAAC;IAE9C,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAEvB,IAAI,EAAE,OAAC,CAAC,UAAU,CAAC,2CAAkB,CAAC;IAEtC,MAAM,EAAE,OAAC,CAAC,UAAU,CAAC,0CAAiB,CAAC;IAEvC,OAAO,EAAE,iCAAyB,CAAC,QAAQ,EAAE;IAE7C,QAAQ,EAAE,OAAC,CAAC,OAAO,EAAE;IAErB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAEhC,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC;AAcU,QAAA,0BAA0B,GAAG,OAAC,CAAC,KAAK,CAAC,iCAAyB,CAAC,CAAC"}
@@ -1,6 +1,5 @@
1
1
  import { z } from 'zod';
2
2
  import { SandboxPrimitiveType } from '../../tool/sandbox/sandbox-primitive-type.enum';
3
- import { SandboxViewKind } from '../../tool/sandbox/sandbox-view-kind.enum';
4
3
  export declare const STEP_CHUNK_LINE_MAX_LENGTH = 4096;
5
4
  export declare const STEP_CHUNK_LINES_MAX_ITEMS = 1024;
6
5
  export declare enum StepChunkKind {
@@ -58,18 +57,18 @@ export declare const ViewChunkMetadataSchema: z.ZodObject<{
58
57
  kind: z.ZodLiteral<StepChunkKind.VIEW>;
59
58
  path: z.ZodString;
60
59
  view: z.ZodDiscriminatedUnion<[z.ZodObject<{
61
- type: z.ZodLiteral<SandboxViewKind.DIRECTORY>;
60
+ type: z.ZodLiteral<import("../..").SandboxViewKind.DIRECTORY>;
62
61
  entryCount: z.ZodNumber;
63
62
  }, z.core.$strip>, z.ZodObject<{
64
- type: z.ZodLiteral<SandboxViewKind.TEXT>;
63
+ type: z.ZodLiteral<import("../..").SandboxViewKind.TEXT>;
65
64
  startLine: z.ZodNumber;
66
65
  endLine: z.ZodNumber;
67
66
  totalLines: z.ZodNumber;
68
67
  truncated: z.ZodBoolean;
69
68
  }, z.core.$strip>, z.ZodObject<{
70
- type: z.ZodLiteral<SandboxViewKind.IMAGE>;
69
+ type: z.ZodLiteral<import("../..").SandboxViewKind.IMAGE>;
71
70
  }, z.core.$strip>, z.ZodObject<{
72
- type: z.ZodLiteral<SandboxViewKind.PDF>;
71
+ type: z.ZodLiteral<import("../..").SandboxViewKind.PDF>;
73
72
  pagesShown: z.ZodNumber;
74
73
  }, z.core.$strip>], "type">;
75
74
  }, z.core.$strip>;
@@ -111,18 +110,18 @@ export declare const StepChunkMetadataSchema: z.ZodDiscriminatedUnion<[z.ZodObje
111
110
  kind: z.ZodLiteral<StepChunkKind.VIEW>;
112
111
  path: z.ZodString;
113
112
  view: z.ZodDiscriminatedUnion<[z.ZodObject<{
114
- type: z.ZodLiteral<SandboxViewKind.DIRECTORY>;
113
+ type: z.ZodLiteral<import("../..").SandboxViewKind.DIRECTORY>;
115
114
  entryCount: z.ZodNumber;
116
115
  }, z.core.$strip>, z.ZodObject<{
117
- type: z.ZodLiteral<SandboxViewKind.TEXT>;
116
+ type: z.ZodLiteral<import("../..").SandboxViewKind.TEXT>;
118
117
  startLine: z.ZodNumber;
119
118
  endLine: z.ZodNumber;
120
119
  totalLines: z.ZodNumber;
121
120
  truncated: z.ZodBoolean;
122
121
  }, z.core.$strip>, z.ZodObject<{
123
- type: z.ZodLiteral<SandboxViewKind.IMAGE>;
122
+ type: z.ZodLiteral<import("../..").SandboxViewKind.IMAGE>;
124
123
  }, z.core.$strip>, z.ZodObject<{
125
- type: z.ZodLiteral<SandboxViewKind.PDF>;
124
+ type: z.ZodLiteral<import("../..").SandboxViewKind.PDF>;
126
125
  pagesShown: z.ZodNumber;
127
126
  }, z.core.$strip>], "type">;
128
127
  }, z.core.$strip>], "kind">;
@@ -2,12 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StepChunkMetadataSchema = exports.ViewChunkMetadataSchema = exports.StrReplaceChunkMetadataSchema = exports.CreateFileChunkMetadataSchema = exports.BashChunkMetadataSchema = exports.DescribeChunkMetadataSchema = exports.ArgsChunkMetadataSchema = exports.BashChunkStream = exports.StepChunkKind = exports.STEP_CHUNK_LINES_MAX_ITEMS = exports.STEP_CHUNK_LINE_MAX_LENGTH = void 0;
4
4
  const zod_1 = require("zod");
5
+ const primitive_completion_schema_1 = require("../../tool/sandbox/primitive-completion.schema");
5
6
  const sandbox_primitive_type_enum_1 = require("../../tool/sandbox/sandbox-primitive-type.enum");
6
- const sandbox_view_kind_enum_1 = require("../../tool/sandbox/sandbox-view-kind.enum");
7
- exports.STEP_CHUNK_LINE_MAX_LENGTH = 4096;
8
- exports.STEP_CHUNK_LINES_MAX_ITEMS = 1024;
9
- const chunkLineSchema = zod_1.z.string().max(exports.STEP_CHUNK_LINE_MAX_LENGTH);
10
- const chunkLinesSchema = zod_1.z.array(chunkLineSchema).max(exports.STEP_CHUNK_LINES_MAX_ITEMS);
7
+ exports.STEP_CHUNK_LINE_MAX_LENGTH = primitive_completion_schema_1.SANDBOX_CHUNK_LINE_MAX_LENGTH;
8
+ exports.STEP_CHUNK_LINES_MAX_ITEMS = primitive_completion_schema_1.SANDBOX_CHUNK_LINES_MAX_ITEMS;
11
9
  var StepChunkKind;
12
10
  (function (StepChunkKind) {
13
11
  StepChunkKind["ARGS"] = "args";
@@ -40,10 +38,7 @@ exports.CreateFileChunkMetadataSchema = zod_1.z.object({
40
38
  totalLines: zod_1.z.number().int().nonnegative(),
41
39
  bytesWritten: zod_1.z.number().int().nonnegative(),
42
40
  overwrite: zod_1.z.boolean(),
43
- preview: zod_1.z.object({
44
- lines: chunkLinesSchema,
45
- truncated: zod_1.z.boolean(),
46
- }),
41
+ preview: primitive_completion_schema_1.FilePreviewSchema,
47
42
  });
48
43
  exports.StrReplaceChunkMetadataSchema = zod_1.z.object({
49
44
  kind: zod_1.z.literal(StepChunkKind.STR_REPLACE),
@@ -52,38 +47,12 @@ exports.StrReplaceChunkMetadataSchema = zod_1.z.object({
52
47
  linesRemoved: zod_1.z.number().int().nonnegative(),
53
48
  linesBefore: zod_1.z.number().int().nonnegative(),
54
49
  linesAfter: zod_1.z.number().int().nonnegative(),
55
- hunk: zod_1.z.object({
56
- startLine: zod_1.z.number().int().positive(),
57
- contextBefore: chunkLinesSchema,
58
- oldLines: chunkLinesSchema,
59
- newLines: chunkLinesSchema,
60
- contextAfter: chunkLinesSchema,
61
- truncated: zod_1.z.boolean(),
62
- }),
50
+ hunk: primitive_completion_schema_1.StrReplaceHunkSchema,
63
51
  });
64
52
  exports.ViewChunkMetadataSchema = zod_1.z.object({
65
53
  kind: zod_1.z.literal(StepChunkKind.VIEW),
66
54
  path: zod_1.z.string().min(1).max(4096),
67
- view: zod_1.z.discriminatedUnion('type', [
68
- zod_1.z.object({
69
- type: zod_1.z.literal(sandbox_view_kind_enum_1.SandboxViewKind.DIRECTORY),
70
- entryCount: zod_1.z.number().int().nonnegative(),
71
- }),
72
- zod_1.z.object({
73
- type: zod_1.z.literal(sandbox_view_kind_enum_1.SandboxViewKind.TEXT),
74
- startLine: zod_1.z.number().int().positive(),
75
- endLine: zod_1.z.number().int().nonnegative(),
76
- totalLines: zod_1.z.number().int().nonnegative(),
77
- truncated: zod_1.z.boolean(),
78
- }),
79
- zod_1.z.object({
80
- type: zod_1.z.literal(sandbox_view_kind_enum_1.SandboxViewKind.IMAGE),
81
- }),
82
- zod_1.z.object({
83
- type: zod_1.z.literal(sandbox_view_kind_enum_1.SandboxViewKind.PDF),
84
- pagesShown: zod_1.z.number().int().nonnegative(),
85
- }),
86
- ]),
55
+ view: primitive_completion_schema_1.SandboxViewDataSchema,
87
56
  });
88
57
  exports.StepChunkMetadataSchema = zod_1.z.discriminatedUnion('kind', [
89
58
  exports.ArgsChunkMetadataSchema,
@@ -1 +1 @@
1
- {"version":3,"file":"step-chunk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C,CAAC,OAAO,CAAC,wCAAe,CAAC,GAAG,CAAC;YACpC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;SAC7C,CAAC;KACL,CAAC;CACL,CAAC,CAAC;AAMU,QAAA,uBAAuB,GAAG,OAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IAChE,+BAAuB;IACvB,mCAA2B;IAC3B,+BAAuB;IACvB,qCAA6B;IAC7B,qCAA6B;IAC7B,+BAAuB;CAC1B,CAAC,CAAC"}
1
+ {"version":3,"file":"step-chunk-metadata.schema.js","sourceRoot":"","sources":["../../../../v1/message/schemas/step-chunk-metadata.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,gGAMwD;AACxD,gGAAsF;AAOzE,QAAA,0BAA0B,GAAG,2DAA6B,CAAC;AAK3D,QAAA,0BAA0B,GAAG,2DAA6B,CAAC;AAcxE,IAAY,aAOX;AAPD,WAAY,aAAa;IACrB,8BAAa,CAAA;IACb,sCAAqB,CAAA;IACrB,8BAAa,CAAA;IACb,4CAA2B,CAAA;IAC3B,4CAA2B,CAAA;IAC3B,8BAAa,CAAA;AACjB,CAAC,EAPW,aAAa,6BAAb,aAAa,QAOxB;AAKD,IAAY,eAGX;AAHD,WAAY,eAAe;IACvB,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;AACrB,CAAC,EAHW,eAAe,+BAAf,eAAe,QAG1B;AAYY,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5C,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC;IACnC,aAAa,EAAE,OAAC,CAAC,UAAU,CAAC,kDAAoB,CAAC;CACpD,CAAC,CAAC;AAaU,QAAA,2BAA2B,GAAG,OAAC,CAAC,MAAM,CAAC;IAChD,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC;IACvC,aAAa,EAAE,OAAC,CAA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EAAE;IAC1C,IAAI,EAAE,kDAAoB;CAC7B,CAAC,CAAC;AAUU,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5C,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC;IACnC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC;IACjC,IAAI,EAAE,mDAAqB;CAC9B,CAAC,CAAC;AAMU,QAAA,uBAAuB,GAAG,OAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IAChE,+BAAuB;IACvB,mCAA2B;IAC3B,+BAAuB;IACvB,qCAA6B;IAC7B,qCAA6B;IAC7B,+BAAuB;CAC1B,CAAC,CAAC"}
@@ -4,3 +4,4 @@ export * from './code-execution-outcome-kind.enum';
4
4
  export * from './sandbox-primitive-type.enum';
5
5
  export * from './sandbox-view-kind.enum';
6
6
  export * from './sandbox.errors';
7
+ export * from './primitive-completion.schema';
@@ -20,4 +20,5 @@ __exportStar(require("./code-execution-outcome-kind.enum"), exports);
20
20
  __exportStar(require("./sandbox-primitive-type.enum"), exports);
21
21
  __exportStar(require("./sandbox-view-kind.enum"), exports);
22
22
  __exportStar(require("./sandbox.errors"), exports);
23
+ __exportStar(require("./primitive-completion.schema"), exports);
23
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../v1/tool/sandbox/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,iEAA+C;AAC/C,qEAAmD;AACnD,gEAA8C;AAC9C,2DAAyC;AACzC,mDAAiC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../v1/tool/sandbox/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,iEAA+C;AAC/C,qEAAmD;AACnD,gEAA8C;AAC9C,2DAAyC;AACzC,mDAAiC;AACjC,gEAA8C"}
@@ -0,0 +1,135 @@
1
+ import { z } from 'zod';
2
+ import { SandboxPrimitiveType } from './sandbox-primitive-type.enum';
3
+ import { SandboxViewKind } from './sandbox-view-kind.enum';
4
+ export declare const SANDBOX_CHUNK_LINE_MAX_LENGTH = 4096;
5
+ export declare const SANDBOX_CHUNK_LINES_MAX_ITEMS = 1024;
6
+ export declare const FilePreviewSchema: z.ZodObject<{
7
+ lines: z.ZodArray<z.ZodString>;
8
+ truncated: z.ZodBoolean;
9
+ }, z.core.$strip>;
10
+ export declare const StrReplaceHunkSchema: z.ZodObject<{
11
+ startLine: z.ZodNumber;
12
+ contextBefore: z.ZodArray<z.ZodString>;
13
+ oldLines: z.ZodArray<z.ZodString>;
14
+ newLines: z.ZodArray<z.ZodString>;
15
+ contextAfter: z.ZodArray<z.ZodString>;
16
+ truncated: z.ZodBoolean;
17
+ }, z.core.$strip>;
18
+ export declare const SandboxViewDataSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
19
+ type: z.ZodLiteral<SandboxViewKind.DIRECTORY>;
20
+ entryCount: z.ZodNumber;
21
+ }, z.core.$strip>, z.ZodObject<{
22
+ type: z.ZodLiteral<SandboxViewKind.TEXT>;
23
+ startLine: z.ZodNumber;
24
+ endLine: z.ZodNumber;
25
+ totalLines: z.ZodNumber;
26
+ truncated: z.ZodBoolean;
27
+ }, z.core.$strip>, z.ZodObject<{
28
+ type: z.ZodLiteral<SandboxViewKind.IMAGE>;
29
+ }, z.core.$strip>, z.ZodObject<{
30
+ type: z.ZodLiteral<SandboxViewKind.PDF>;
31
+ pagesShown: z.ZodNumber;
32
+ }, z.core.$strip>], "type">;
33
+ export declare const BashCompletionSchema: z.ZodObject<{
34
+ type: z.ZodLiteral<SandboxPrimitiveType.BASH>;
35
+ }, z.core.$strip>;
36
+ export declare const CreateFileCompletionSchema: z.ZodObject<{
37
+ type: z.ZodLiteral<SandboxPrimitiveType.CREATE_FILE>;
38
+ path: z.ZodString;
39
+ totalLines: z.ZodNumber;
40
+ bytesWritten: z.ZodNumber;
41
+ overwrite: z.ZodBoolean;
42
+ preview: z.ZodObject<{
43
+ lines: z.ZodArray<z.ZodString>;
44
+ truncated: z.ZodBoolean;
45
+ }, z.core.$strip>;
46
+ }, z.core.$strip>;
47
+ export declare const StrReplaceCompletionSchema: z.ZodObject<{
48
+ type: z.ZodLiteral<SandboxPrimitiveType.STR_REPLACE>;
49
+ path: z.ZodString;
50
+ linesAdded: z.ZodNumber;
51
+ linesRemoved: z.ZodNumber;
52
+ linesBefore: z.ZodNumber;
53
+ linesAfter: z.ZodNumber;
54
+ hunk: z.ZodObject<{
55
+ startLine: z.ZodNumber;
56
+ contextBefore: z.ZodArray<z.ZodString>;
57
+ oldLines: z.ZodArray<z.ZodString>;
58
+ newLines: z.ZodArray<z.ZodString>;
59
+ contextAfter: z.ZodArray<z.ZodString>;
60
+ truncated: z.ZodBoolean;
61
+ }, z.core.$strip>;
62
+ }, z.core.$strip>;
63
+ export declare const ViewCompletionSchema: z.ZodObject<{
64
+ type: z.ZodLiteral<SandboxPrimitiveType.VIEW>;
65
+ path: z.ZodString;
66
+ view: z.ZodDiscriminatedUnion<[z.ZodObject<{
67
+ type: z.ZodLiteral<SandboxViewKind.DIRECTORY>;
68
+ entryCount: z.ZodNumber;
69
+ }, z.core.$strip>, z.ZodObject<{
70
+ type: z.ZodLiteral<SandboxViewKind.TEXT>;
71
+ startLine: z.ZodNumber;
72
+ endLine: z.ZodNumber;
73
+ totalLines: z.ZodNumber;
74
+ truncated: z.ZodBoolean;
75
+ }, z.core.$strip>, z.ZodObject<{
76
+ type: z.ZodLiteral<SandboxViewKind.IMAGE>;
77
+ }, z.core.$strip>, z.ZodObject<{
78
+ type: z.ZodLiteral<SandboxViewKind.PDF>;
79
+ pagesShown: z.ZodNumber;
80
+ }, z.core.$strip>], "type">;
81
+ }, z.core.$strip>;
82
+ export declare const SandboxPrimitiveCompletionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
83
+ type: z.ZodLiteral<SandboxPrimitiveType.BASH>;
84
+ }, z.core.$strip>, z.ZodObject<{
85
+ type: z.ZodLiteral<SandboxPrimitiveType.CREATE_FILE>;
86
+ path: z.ZodString;
87
+ totalLines: z.ZodNumber;
88
+ bytesWritten: z.ZodNumber;
89
+ overwrite: z.ZodBoolean;
90
+ preview: z.ZodObject<{
91
+ lines: z.ZodArray<z.ZodString>;
92
+ truncated: z.ZodBoolean;
93
+ }, z.core.$strip>;
94
+ }, z.core.$strip>, z.ZodObject<{
95
+ type: z.ZodLiteral<SandboxPrimitiveType.STR_REPLACE>;
96
+ path: z.ZodString;
97
+ linesAdded: z.ZodNumber;
98
+ linesRemoved: z.ZodNumber;
99
+ linesBefore: z.ZodNumber;
100
+ linesAfter: z.ZodNumber;
101
+ hunk: z.ZodObject<{
102
+ startLine: z.ZodNumber;
103
+ contextBefore: z.ZodArray<z.ZodString>;
104
+ oldLines: z.ZodArray<z.ZodString>;
105
+ newLines: z.ZodArray<z.ZodString>;
106
+ contextAfter: z.ZodArray<z.ZodString>;
107
+ truncated: z.ZodBoolean;
108
+ }, z.core.$strip>;
109
+ }, z.core.$strip>, z.ZodObject<{
110
+ type: z.ZodLiteral<SandboxPrimitiveType.VIEW>;
111
+ path: z.ZodString;
112
+ view: z.ZodDiscriminatedUnion<[z.ZodObject<{
113
+ type: z.ZodLiteral<SandboxViewKind.DIRECTORY>;
114
+ entryCount: z.ZodNumber;
115
+ }, z.core.$strip>, z.ZodObject<{
116
+ type: z.ZodLiteral<SandboxViewKind.TEXT>;
117
+ startLine: z.ZodNumber;
118
+ endLine: z.ZodNumber;
119
+ totalLines: z.ZodNumber;
120
+ truncated: z.ZodBoolean;
121
+ }, z.core.$strip>, z.ZodObject<{
122
+ type: z.ZodLiteral<SandboxViewKind.IMAGE>;
123
+ }, z.core.$strip>, z.ZodObject<{
124
+ type: z.ZodLiteral<SandboxViewKind.PDF>;
125
+ pagesShown: z.ZodNumber;
126
+ }, z.core.$strip>], "type">;
127
+ }, z.core.$strip>], "type">;
128
+ export type FilePreview = z.infer<typeof FilePreviewSchema>;
129
+ export type StrReplaceHunk = z.infer<typeof StrReplaceHunkSchema>;
130
+ export type SandboxViewData = z.infer<typeof SandboxViewDataSchema>;
131
+ export type BashCompletion = z.infer<typeof BashCompletionSchema>;
132
+ export type CreateFileCompletion = z.infer<typeof CreateFileCompletionSchema>;
133
+ export type StrReplaceCompletion = z.infer<typeof StrReplaceCompletionSchema>;
134
+ export type ViewCompletion = z.infer<typeof ViewCompletionSchema>;
135
+ export type SandboxPrimitiveCompletion = z.infer<typeof SandboxPrimitiveCompletionSchema>;
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SandboxPrimitiveCompletionSchema = exports.ViewCompletionSchema = exports.StrReplaceCompletionSchema = exports.CreateFileCompletionSchema = exports.BashCompletionSchema = exports.SandboxViewDataSchema = exports.StrReplaceHunkSchema = exports.FilePreviewSchema = exports.SANDBOX_CHUNK_LINES_MAX_ITEMS = exports.SANDBOX_CHUNK_LINE_MAX_LENGTH = void 0;
4
+ const zod_1 = require("zod");
5
+ const sandbox_primitive_type_enum_1 = require("./sandbox-primitive-type.enum");
6
+ const sandbox_view_kind_enum_1 = require("./sandbox-view-kind.enum");
7
+ exports.SANDBOX_CHUNK_LINE_MAX_LENGTH = 4096;
8
+ exports.SANDBOX_CHUNK_LINES_MAX_ITEMS = 1024;
9
+ const sandboxLineSchema = zod_1.z.string().max(exports.SANDBOX_CHUNK_LINE_MAX_LENGTH);
10
+ const sandboxLinesSchema = zod_1.z.array(sandboxLineSchema).max(exports.SANDBOX_CHUNK_LINES_MAX_ITEMS);
11
+ exports.FilePreviewSchema = zod_1.z.object({
12
+ lines: sandboxLinesSchema,
13
+ truncated: zod_1.z.boolean(),
14
+ });
15
+ exports.StrReplaceHunkSchema = zod_1.z.object({
16
+ startLine: zod_1.z.number().int().positive(),
17
+ contextBefore: sandboxLinesSchema,
18
+ oldLines: sandboxLinesSchema,
19
+ newLines: sandboxLinesSchema,
20
+ contextAfter: sandboxLinesSchema,
21
+ truncated: zod_1.z.boolean(),
22
+ });
23
+ exports.SandboxViewDataSchema = zod_1.z.discriminatedUnion('type', [
24
+ zod_1.z.object({
25
+ type: zod_1.z.literal(sandbox_view_kind_enum_1.SandboxViewKind.DIRECTORY),
26
+ entryCount: zod_1.z.number().int().nonnegative(),
27
+ }),
28
+ zod_1.z.object({
29
+ type: zod_1.z.literal(sandbox_view_kind_enum_1.SandboxViewKind.TEXT),
30
+ startLine: zod_1.z.number().int().positive(),
31
+ endLine: zod_1.z.number().int().nonnegative(),
32
+ totalLines: zod_1.z.number().int().nonnegative(),
33
+ truncated: zod_1.z.boolean(),
34
+ }),
35
+ zod_1.z.object({
36
+ type: zod_1.z.literal(sandbox_view_kind_enum_1.SandboxViewKind.IMAGE),
37
+ }),
38
+ zod_1.z.object({
39
+ type: zod_1.z.literal(sandbox_view_kind_enum_1.SandboxViewKind.PDF),
40
+ pagesShown: zod_1.z.number().int().nonnegative(),
41
+ }),
42
+ ]);
43
+ exports.BashCompletionSchema = zod_1.z.object({
44
+ type: zod_1.z.literal(sandbox_primitive_type_enum_1.SandboxPrimitiveType.BASH),
45
+ });
46
+ exports.CreateFileCompletionSchema = zod_1.z.object({
47
+ type: zod_1.z.literal(sandbox_primitive_type_enum_1.SandboxPrimitiveType.CREATE_FILE),
48
+ path: zod_1.z.string().min(1).max(4096),
49
+ totalLines: zod_1.z.number().int().nonnegative(),
50
+ bytesWritten: zod_1.z.number().int().nonnegative(),
51
+ overwrite: zod_1.z.boolean(),
52
+ preview: exports.FilePreviewSchema,
53
+ });
54
+ exports.StrReplaceCompletionSchema = zod_1.z.object({
55
+ type: zod_1.z.literal(sandbox_primitive_type_enum_1.SandboxPrimitiveType.STR_REPLACE),
56
+ path: zod_1.z.string().min(1).max(4096),
57
+ linesAdded: zod_1.z.number().int().nonnegative(),
58
+ linesRemoved: zod_1.z.number().int().nonnegative(),
59
+ linesBefore: zod_1.z.number().int().nonnegative(),
60
+ linesAfter: zod_1.z.number().int().nonnegative(),
61
+ hunk: exports.StrReplaceHunkSchema,
62
+ });
63
+ exports.ViewCompletionSchema = zod_1.z.object({
64
+ type: zod_1.z.literal(sandbox_primitive_type_enum_1.SandboxPrimitiveType.VIEW),
65
+ path: zod_1.z.string().min(1).max(4096),
66
+ view: exports.SandboxViewDataSchema,
67
+ });
68
+ exports.SandboxPrimitiveCompletionSchema = zod_1.z.discriminatedUnion('type', [
69
+ exports.BashCompletionSchema,
70
+ exports.CreateFileCompletionSchema,
71
+ exports.StrReplaceCompletionSchema,
72
+ exports.ViewCompletionSchema,
73
+ ]);
74
+ //# sourceMappingURL=primitive-completion.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"primitive-completion.schema.js","sourceRoot":"","sources":["../../../../v1/tool/sandbox/primitive-completion.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,+EAAqE;AACrE,qEAA2D;AAO9C,QAAA,6BAA6B,GAAG,IAAI,CAAC;AAMrC,QAAA,6BAA6B,GAAG,IAAI,CAAC;AAElD,MAAM,iBAAiB,GAAG,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,qCAA6B,CAAC,CAAC;AACxE,MAAM,kBAAkB,GAAG,OAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,GAAG,CAAC,qCAA6B,CAAC,CAAC;AAM5E,QAAA,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC;IACtC,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,OAAC,CAAC,OAAO,EAAE;CACzB,CAAC,CAAC;AAWU,QAAA,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IACzC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACtC,aAAa,EAAE,kBAAkB;IACjC,QAAQ,EAAE,kBAAkB;I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,CAAC,IAAI,CAAC;IACjC,IAAI,EAAE,6BAAqB;CAC9B,CAAC,CAAC;AAEU,QAAA,gCAAgC,GAAG,OAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IACzE,4BAAoB;IACpB,kCAA0B;IAC1B,kCAA0B;IAC1B,4BAAoB;CACvB,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veruna/api-contracts",
3
- "version": "1.1.30",
3
+ "version": "1.1.32",
4
4
  "description": "API contracts for Veruna project - Zod schemas, types, and paths",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",