codebuff 1.0.168 → 1.0.169

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.
@@ -1,311 +0,0 @@
1
- import { z } from 'zod';
2
- declare const MessageContentObjectSchema: z.ZodUnion<[z.ZodObject<{
3
- type: z.ZodLiteral<"text">;
4
- text: z.ZodString;
5
- cache_control: z.ZodOptional<z.ZodObject<{
6
- type: z.ZodLiteral<"ephemeral">;
7
- }, "strip", z.ZodTypeAny, {
8
- type: "ephemeral";
9
- }, {
10
- type: "ephemeral";
11
- }>>;
12
- }, "strip", z.ZodTypeAny, {
13
- type: "text";
14
- text: string;
15
- cache_control?: {
16
- type: "ephemeral";
17
- } | undefined;
18
- }, {
19
- type: "text";
20
- text: string;
21
- cache_control?: {
22
- type: "ephemeral";
23
- } | undefined;
24
- }>, z.ZodObject<{
25
- type: z.ZodLiteral<"tool_use">;
26
- id: z.ZodString;
27
- name: z.ZodString;
28
- input: z.ZodRecord<z.ZodString, z.ZodAny>;
29
- cache_control: z.ZodOptional<z.ZodObject<{
30
- type: z.ZodLiteral<"ephemeral">;
31
- }, "strip", z.ZodTypeAny, {
32
- type: "ephemeral";
33
- }, {
34
- type: "ephemeral";
35
- }>>;
36
- }, "strip", z.ZodTypeAny, {
37
- type: "tool_use";
38
- id: string;
39
- name: string;
40
- input: Record<string, any>;
41
- cache_control?: {
42
- type: "ephemeral";
43
- } | undefined;
44
- }, {
45
- type: "tool_use";
46
- id: string;
47
- name: string;
48
- input: Record<string, any>;
49
- cache_control?: {
50
- type: "ephemeral";
51
- } | undefined;
52
- }>, z.ZodObject<{
53
- type: z.ZodLiteral<"tool_result">;
54
- tool_use_id: z.ZodString;
55
- content: z.ZodString;
56
- cache_control: z.ZodOptional<z.ZodObject<{
57
- type: z.ZodLiteral<"ephemeral">;
58
- }, "strip", z.ZodTypeAny, {
59
- type: "ephemeral";
60
- }, {
61
- type: "ephemeral";
62
- }>>;
63
- }, "strip", z.ZodTypeAny, {
64
- type: "tool_result";
65
- content: string;
66
- tool_use_id: string;
67
- cache_control?: {
68
- type: "ephemeral";
69
- } | undefined;
70
- }, {
71
- type: "tool_result";
72
- content: string;
73
- tool_use_id: string;
74
- cache_control?: {
75
- type: "ephemeral";
76
- } | undefined;
77
- }>, z.ZodObject<{
78
- type: z.ZodLiteral<"image">;
79
- source: z.ZodObject<{
80
- type: z.ZodLiteral<"base64">;
81
- media_type: z.ZodLiteral<"image/jpeg">;
82
- data: z.ZodString;
83
- }, "strip", z.ZodTypeAny, {
84
- type: "base64";
85
- media_type: "image/jpeg";
86
- data: string;
87
- }, {
88
- type: "base64";
89
- media_type: "image/jpeg";
90
- data: string;
91
- }>;
92
- cache_control: z.ZodOptional<z.ZodObject<{
93
- type: z.ZodLiteral<"ephemeral">;
94
- }, "strip", z.ZodTypeAny, {
95
- type: "ephemeral";
96
- }, {
97
- type: "ephemeral";
98
- }>>;
99
- }, "strip", z.ZodTypeAny, {
100
- type: "image";
101
- source: {
102
- type: "base64";
103
- media_type: "image/jpeg";
104
- data: string;
105
- };
106
- cache_control?: {
107
- type: "ephemeral";
108
- } | undefined;
109
- }, {
110
- type: "image";
111
- source: {
112
- type: "base64";
113
- media_type: "image/jpeg";
114
- data: string;
115
- };
116
- cache_control?: {
117
- type: "ephemeral";
118
- } | undefined;
119
- }>]>;
120
- export declare const MessageSchema: z.ZodObject<{
121
- role: z.ZodUnion<[z.ZodLiteral<"user">, z.ZodLiteral<"assistant">]>;
122
- content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodObject<{
123
- type: z.ZodLiteral<"text">;
124
- text: z.ZodString;
125
- cache_control: z.ZodOptional<z.ZodObject<{
126
- type: z.ZodLiteral<"ephemeral">;
127
- }, "strip", z.ZodTypeAny, {
128
- type: "ephemeral";
129
- }, {
130
- type: "ephemeral";
131
- }>>;
132
- }, "strip", z.ZodTypeAny, {
133
- type: "text";
134
- text: string;
135
- cache_control?: {
136
- type: "ephemeral";
137
- } | undefined;
138
- }, {
139
- type: "text";
140
- text: string;
141
- cache_control?: {
142
- type: "ephemeral";
143
- } | undefined;
144
- }>, z.ZodObject<{
145
- type: z.ZodLiteral<"tool_use">;
146
- id: z.ZodString;
147
- name: z.ZodString;
148
- input: z.ZodRecord<z.ZodString, z.ZodAny>;
149
- cache_control: z.ZodOptional<z.ZodObject<{
150
- type: z.ZodLiteral<"ephemeral">;
151
- }, "strip", z.ZodTypeAny, {
152
- type: "ephemeral";
153
- }, {
154
- type: "ephemeral";
155
- }>>;
156
- }, "strip", z.ZodTypeAny, {
157
- type: "tool_use";
158
- id: string;
159
- name: string;
160
- input: Record<string, any>;
161
- cache_control?: {
162
- type: "ephemeral";
163
- } | undefined;
164
- }, {
165
- type: "tool_use";
166
- id: string;
167
- name: string;
168
- input: Record<string, any>;
169
- cache_control?: {
170
- type: "ephemeral";
171
- } | undefined;
172
- }>, z.ZodObject<{
173
- type: z.ZodLiteral<"tool_result">;
174
- tool_use_id: z.ZodString;
175
- content: z.ZodString;
176
- cache_control: z.ZodOptional<z.ZodObject<{
177
- type: z.ZodLiteral<"ephemeral">;
178
- }, "strip", z.ZodTypeAny, {
179
- type: "ephemeral";
180
- }, {
181
- type: "ephemeral";
182
- }>>;
183
- }, "strip", z.ZodTypeAny, {
184
- type: "tool_result";
185
- content: string;
186
- tool_use_id: string;
187
- cache_control?: {
188
- type: "ephemeral";
189
- } | undefined;
190
- }, {
191
- type: "tool_result";
192
- content: string;
193
- tool_use_id: string;
194
- cache_control?: {
195
- type: "ephemeral";
196
- } | undefined;
197
- }>, z.ZodObject<{
198
- type: z.ZodLiteral<"image">;
199
- source: z.ZodObject<{
200
- type: z.ZodLiteral<"base64">;
201
- media_type: z.ZodLiteral<"image/jpeg">;
202
- data: z.ZodString;
203
- }, "strip", z.ZodTypeAny, {
204
- type: "base64";
205
- media_type: "image/jpeg";
206
- data: string;
207
- }, {
208
- type: "base64";
209
- media_type: "image/jpeg";
210
- data: string;
211
- }>;
212
- cache_control: z.ZodOptional<z.ZodObject<{
213
- type: z.ZodLiteral<"ephemeral">;
214
- }, "strip", z.ZodTypeAny, {
215
- type: "ephemeral";
216
- }, {
217
- type: "ephemeral";
218
- }>>;
219
- }, "strip", z.ZodTypeAny, {
220
- type: "image";
221
- source: {
222
- type: "base64";
223
- media_type: "image/jpeg";
224
- data: string;
225
- };
226
- cache_control?: {
227
- type: "ephemeral";
228
- } | undefined;
229
- }, {
230
- type: "image";
231
- source: {
232
- type: "base64";
233
- media_type: "image/jpeg";
234
- data: string;
235
- };
236
- cache_control?: {
237
- type: "ephemeral";
238
- } | undefined;
239
- }>]>, "many">]>;
240
- }, "strip", z.ZodTypeAny, {
241
- role: "user" | "assistant";
242
- content: string | ({
243
- type: "text";
244
- text: string;
245
- cache_control?: {
246
- type: "ephemeral";
247
- } | undefined;
248
- } | {
249
- type: "tool_use";
250
- id: string;
251
- name: string;
252
- input: Record<string, any>;
253
- cache_control?: {
254
- type: "ephemeral";
255
- } | undefined;
256
- } | {
257
- type: "tool_result";
258
- content: string;
259
- tool_use_id: string;
260
- cache_control?: {
261
- type: "ephemeral";
262
- } | undefined;
263
- } | {
264
- type: "image";
265
- source: {
266
- type: "base64";
267
- media_type: "image/jpeg";
268
- data: string;
269
- };
270
- cache_control?: {
271
- type: "ephemeral";
272
- } | undefined;
273
- })[];
274
- }, {
275
- role: "user" | "assistant";
276
- content: string | ({
277
- type: "text";
278
- text: string;
279
- cache_control?: {
280
- type: "ephemeral";
281
- } | undefined;
282
- } | {
283
- type: "tool_use";
284
- id: string;
285
- name: string;
286
- input: Record<string, any>;
287
- cache_control?: {
288
- type: "ephemeral";
289
- } | undefined;
290
- } | {
291
- type: "tool_result";
292
- content: string;
293
- tool_use_id: string;
294
- cache_control?: {
295
- type: "ephemeral";
296
- } | undefined;
297
- } | {
298
- type: "image";
299
- source: {
300
- type: "base64";
301
- media_type: "image/jpeg";
302
- data: string;
303
- };
304
- cache_control?: {
305
- type: "ephemeral";
306
- } | undefined;
307
- })[];
308
- }>;
309
- export type Message = z.infer<typeof MessageSchema>;
310
- export type MessageContentObject = z.infer<typeof MessageContentObjectSchema>;
311
- export {};
@@ -1,54 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MessageSchema = void 0;
4
- const zod_1 = require("zod");
5
- const MessageContentObjectSchema = zod_1.z.union([
6
- zod_1.z.object({
7
- type: zod_1.z.literal('text'),
8
- text: zod_1.z.string(),
9
- cache_control: zod_1.z
10
- .object({
11
- type: zod_1.z.literal('ephemeral'),
12
- })
13
- .optional(),
14
- }),
15
- zod_1.z.object({
16
- type: zod_1.z.literal('tool_use'),
17
- id: zod_1.z.string(),
18
- name: zod_1.z.string(),
19
- input: zod_1.z.record(zod_1.z.string(), zod_1.z.any()),
20
- cache_control: zod_1.z
21
- .object({
22
- type: zod_1.z.literal('ephemeral'),
23
- })
24
- .optional(),
25
- }),
26
- zod_1.z.object({
27
- type: zod_1.z.literal('tool_result'),
28
- tool_use_id: zod_1.z.string(),
29
- content: zod_1.z.string(),
30
- cache_control: zod_1.z
31
- .object({
32
- type: zod_1.z.literal('ephemeral'),
33
- })
34
- .optional(),
35
- }),
36
- zod_1.z.object({
37
- type: zod_1.z.literal('image'),
38
- source: zod_1.z.object({
39
- type: zod_1.z.literal('base64'),
40
- media_type: zod_1.z.literal('image/jpeg'),
41
- data: zod_1.z.string(),
42
- }),
43
- cache_control: zod_1.z
44
- .object({
45
- type: zod_1.z.literal('ephemeral'),
46
- })
47
- .optional(),
48
- }),
49
- ]);
50
- exports.MessageSchema = zod_1.z.object({
51
- role: zod_1.z.union([zod_1.z.literal('user'), zod_1.z.literal('assistant')]),
52
- content: zod_1.z.union([zod_1.z.string(), zod_1.z.array(MessageContentObjectSchema)]),
53
- });
54
- //# sourceMappingURL=message.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"message.js","sourceRoot":"","sources":["../../src/types/message.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;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O,CAAC,YAAY,CAAC;YACnC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;SACjB,CAAC;QACF,aAAa,EAAE,OAAC;aACb,MAAM,CAAC;YACN,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,WAAW,CAAC;SAC7B,CAAC;aACD,QAAQ,EAAE;KACd,CAAC;CACH,CAAC,CAAA;AAEW,QAAA,aAAa,GAAG,OAAC,CAAC,MAAM,CAAC;IACpC,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,OAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;IAC1D,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC,CAAC;CACpE,CAAC,CAAA"}
@@ -1,5 +0,0 @@
1
- export type RawToolCall = {
2
- name: string;
3
- id: string;
4
- parameters: Record<string, any>;
5
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=tools.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/types/tools.ts"],"names":[],"mappings":""}