@deepintel-ltd/farmpro-contracts 1.0.4 → 1.2.0
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/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -1
- package/dist/routes/agents.routes.d.ts +520 -0
- package/dist/routes/agents.routes.d.ts.map +1 -0
- package/dist/routes/agents.routes.js +36 -0
- package/dist/routes/categories.routes.d.ts +426 -129
- package/dist/routes/categories.routes.d.ts.map +1 -1
- package/dist/routes/categories.routes.js +13 -40
- package/dist/routes/field-monitoring.routes.d.ts +405 -0
- package/dist/routes/field-monitoring.routes.d.ts.map +1 -0
- package/dist/routes/field-monitoring.routes.js +93 -0
- package/dist/routes/index.d.ts +6 -0
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/index.js +4 -0
- package/dist/routes/tasks.routes.d.ts +7 -7
- package/dist/schemas/agents.schemas.d.ts +352 -0
- package/dist/schemas/agents.schemas.d.ts.map +1 -0
- package/dist/schemas/agents.schemas.js +42 -0
- package/dist/schemas/categories.schemas.d.ts +1 -35
- package/dist/schemas/categories.schemas.d.ts.map +1 -1
- package/dist/schemas/categories.schemas.js +3 -7
- package/dist/schemas/field-monitoring.schemas.d.ts +216 -0
- package/dist/schemas/field-monitoring.schemas.d.ts.map +1 -0
- package/dist/schemas/field-monitoring.schemas.js +92 -0
- package/dist/schemas/tasks.schemas.d.ts +8 -8
- package/dist/schemas/tasks.schemas.js +1 -1
- package/package.json +1 -1
|
@@ -525,7 +525,7 @@ export declare const tasksRouter: {
|
|
|
525
525
|
fieldId: z.ZodString;
|
|
526
526
|
date: z.ZodString;
|
|
527
527
|
status: z.ZodOptional<z.ZodDefault<z.ZodEnum<["pending", "in-progress", "completed", "cancelled"]>>>;
|
|
528
|
-
category: z.
|
|
528
|
+
category: z.ZodString;
|
|
529
529
|
inventoryItemId: z.ZodOptional<z.ZodString>;
|
|
530
530
|
plannedQuantity: z.ZodOptional<z.ZodNumber>;
|
|
531
531
|
assignedTo: z.ZodOptional<z.ZodString>;
|
|
@@ -534,8 +534,8 @@ export declare const tasksRouter: {
|
|
|
534
534
|
date: string;
|
|
535
535
|
title: string;
|
|
536
536
|
fieldId: string;
|
|
537
|
+
category: string;
|
|
537
538
|
status?: "pending" | "in-progress" | "completed" | "cancelled" | undefined;
|
|
538
|
-
category?: string | undefined;
|
|
539
539
|
inventoryItemId?: string | undefined;
|
|
540
540
|
plannedQuantity?: number | undefined;
|
|
541
541
|
assignedTo?: string | undefined;
|
|
@@ -544,8 +544,8 @@ export declare const tasksRouter: {
|
|
|
544
544
|
date: string;
|
|
545
545
|
title: string;
|
|
546
546
|
fieldId: string;
|
|
547
|
+
category: string;
|
|
547
548
|
status?: "pending" | "in-progress" | "completed" | "cancelled" | undefined;
|
|
548
|
-
category?: string | undefined;
|
|
549
549
|
inventoryItemId?: string | undefined;
|
|
550
550
|
plannedQuantity?: number | undefined;
|
|
551
551
|
assignedTo?: string | undefined;
|
|
@@ -557,8 +557,8 @@ export declare const tasksRouter: {
|
|
|
557
557
|
date: string;
|
|
558
558
|
title: string;
|
|
559
559
|
fieldId: string;
|
|
560
|
+
category: string;
|
|
560
561
|
status?: "pending" | "in-progress" | "completed" | "cancelled" | undefined;
|
|
561
|
-
category?: string | undefined;
|
|
562
562
|
inventoryItemId?: string | undefined;
|
|
563
563
|
plannedQuantity?: number | undefined;
|
|
564
564
|
assignedTo?: string | undefined;
|
|
@@ -570,8 +570,8 @@ export declare const tasksRouter: {
|
|
|
570
570
|
date: string;
|
|
571
571
|
title: string;
|
|
572
572
|
fieldId: string;
|
|
573
|
+
category: string;
|
|
573
574
|
status?: "pending" | "in-progress" | "completed" | "cancelled" | undefined;
|
|
574
|
-
category?: string | undefined;
|
|
575
575
|
inventoryItemId?: string | undefined;
|
|
576
576
|
plannedQuantity?: number | undefined;
|
|
577
577
|
assignedTo?: string | undefined;
|
|
@@ -585,8 +585,8 @@ export declare const tasksRouter: {
|
|
|
585
585
|
date: string;
|
|
586
586
|
title: string;
|
|
587
587
|
fieldId: string;
|
|
588
|
+
category: string;
|
|
588
589
|
status?: "pending" | "in-progress" | "completed" | "cancelled" | undefined;
|
|
589
|
-
category?: string | undefined;
|
|
590
590
|
inventoryItemId?: string | undefined;
|
|
591
591
|
plannedQuantity?: number | undefined;
|
|
592
592
|
assignedTo?: string | undefined;
|
|
@@ -600,8 +600,8 @@ export declare const tasksRouter: {
|
|
|
600
600
|
date: string;
|
|
601
601
|
title: string;
|
|
602
602
|
fieldId: string;
|
|
603
|
+
category: string;
|
|
603
604
|
status?: "pending" | "in-progress" | "completed" | "cancelled" | undefined;
|
|
604
|
-
category?: string | undefined;
|
|
605
605
|
inventoryItemId?: string | undefined;
|
|
606
606
|
plannedQuantity?: number | undefined;
|
|
607
607
|
assignedTo?: string | undefined;
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Agents schemas - JSON:API compliant
|
|
4
|
+
*/
|
|
5
|
+
export declare const messageRoleSchema: z.ZodEnum<["user", "assistant"]>;
|
|
6
|
+
export declare const conversationMessageSchema: z.ZodObject<{
|
|
7
|
+
role: z.ZodEnum<["user", "assistant"]>;
|
|
8
|
+
content: z.ZodString;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
role: "user" | "assistant";
|
|
11
|
+
content: string;
|
|
12
|
+
}, {
|
|
13
|
+
role: "user" | "assistant";
|
|
14
|
+
content: string;
|
|
15
|
+
}>;
|
|
16
|
+
export declare const toolCallResultSchema: z.ZodObject<{
|
|
17
|
+
tool: z.ZodString;
|
|
18
|
+
result: z.ZodUnknown;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
tool: string;
|
|
21
|
+
result?: unknown;
|
|
22
|
+
}, {
|
|
23
|
+
tool: string;
|
|
24
|
+
result?: unknown;
|
|
25
|
+
}>;
|
|
26
|
+
export declare const chatRequestAttributesSchema: z.ZodObject<{
|
|
27
|
+
message: z.ZodString;
|
|
28
|
+
farmId: z.ZodOptional<z.ZodString>;
|
|
29
|
+
conversationId: z.ZodOptional<z.ZodString>;
|
|
30
|
+
conversationHistory: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
31
|
+
role: z.ZodEnum<["user", "assistant"]>;
|
|
32
|
+
content: z.ZodString;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
role: "user" | "assistant";
|
|
35
|
+
content: string;
|
|
36
|
+
}, {
|
|
37
|
+
role: "user" | "assistant";
|
|
38
|
+
content: string;
|
|
39
|
+
}>, "many">>;
|
|
40
|
+
}, "strip", z.ZodTypeAny, {
|
|
41
|
+
message: string;
|
|
42
|
+
farmId?: string | undefined;
|
|
43
|
+
conversationId?: string | undefined;
|
|
44
|
+
conversationHistory?: {
|
|
45
|
+
role: "user" | "assistant";
|
|
46
|
+
content: string;
|
|
47
|
+
}[] | undefined;
|
|
48
|
+
}, {
|
|
49
|
+
message: string;
|
|
50
|
+
farmId?: string | undefined;
|
|
51
|
+
conversationId?: string | undefined;
|
|
52
|
+
conversationHistory?: {
|
|
53
|
+
role: "user" | "assistant";
|
|
54
|
+
content: string;
|
|
55
|
+
}[] | undefined;
|
|
56
|
+
}>;
|
|
57
|
+
export declare const chatRequestSchema: z.ZodObject<{
|
|
58
|
+
type: z.ZodLiteral<"agent-chat-requests">;
|
|
59
|
+
attributes: z.ZodObject<{
|
|
60
|
+
message: z.ZodString;
|
|
61
|
+
farmId: z.ZodOptional<z.ZodString>;
|
|
62
|
+
conversationId: z.ZodOptional<z.ZodString>;
|
|
63
|
+
conversationHistory: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
64
|
+
role: z.ZodEnum<["user", "assistant"]>;
|
|
65
|
+
content: z.ZodString;
|
|
66
|
+
}, "strip", z.ZodTypeAny, {
|
|
67
|
+
role: "user" | "assistant";
|
|
68
|
+
content: string;
|
|
69
|
+
}, {
|
|
70
|
+
role: "user" | "assistant";
|
|
71
|
+
content: string;
|
|
72
|
+
}>, "many">>;
|
|
73
|
+
}, "strip", z.ZodTypeAny, {
|
|
74
|
+
message: string;
|
|
75
|
+
farmId?: string | undefined;
|
|
76
|
+
conversationId?: string | undefined;
|
|
77
|
+
conversationHistory?: {
|
|
78
|
+
role: "user" | "assistant";
|
|
79
|
+
content: string;
|
|
80
|
+
}[] | undefined;
|
|
81
|
+
}, {
|
|
82
|
+
message: string;
|
|
83
|
+
farmId?: string | undefined;
|
|
84
|
+
conversationId?: string | undefined;
|
|
85
|
+
conversationHistory?: {
|
|
86
|
+
role: "user" | "assistant";
|
|
87
|
+
content: string;
|
|
88
|
+
}[] | undefined;
|
|
89
|
+
}>;
|
|
90
|
+
}, "strip", z.ZodTypeAny, {
|
|
91
|
+
type: "agent-chat-requests";
|
|
92
|
+
attributes: {
|
|
93
|
+
message: string;
|
|
94
|
+
farmId?: string | undefined;
|
|
95
|
+
conversationId?: string | undefined;
|
|
96
|
+
conversationHistory?: {
|
|
97
|
+
role: "user" | "assistant";
|
|
98
|
+
content: string;
|
|
99
|
+
}[] | undefined;
|
|
100
|
+
};
|
|
101
|
+
}, {
|
|
102
|
+
type: "agent-chat-requests";
|
|
103
|
+
attributes: {
|
|
104
|
+
message: string;
|
|
105
|
+
farmId?: string | undefined;
|
|
106
|
+
conversationId?: string | undefined;
|
|
107
|
+
conversationHistory?: {
|
|
108
|
+
role: "user" | "assistant";
|
|
109
|
+
content: string;
|
|
110
|
+
}[] | undefined;
|
|
111
|
+
};
|
|
112
|
+
}>;
|
|
113
|
+
export declare const agentChatResponseAttributesSchema: z.ZodObject<{
|
|
114
|
+
response: z.ZodString;
|
|
115
|
+
toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
116
|
+
tool: z.ZodString;
|
|
117
|
+
result: z.ZodUnknown;
|
|
118
|
+
}, "strip", z.ZodTypeAny, {
|
|
119
|
+
tool: string;
|
|
120
|
+
result?: unknown;
|
|
121
|
+
}, {
|
|
122
|
+
tool: string;
|
|
123
|
+
result?: unknown;
|
|
124
|
+
}>, "many">>;
|
|
125
|
+
conversationId: z.ZodString;
|
|
126
|
+
}, "strip", z.ZodTypeAny, {
|
|
127
|
+
conversationId: string;
|
|
128
|
+
response: string;
|
|
129
|
+
toolCalls?: {
|
|
130
|
+
tool: string;
|
|
131
|
+
result?: unknown;
|
|
132
|
+
}[] | undefined;
|
|
133
|
+
}, {
|
|
134
|
+
conversationId: string;
|
|
135
|
+
response: string;
|
|
136
|
+
toolCalls?: {
|
|
137
|
+
tool: string;
|
|
138
|
+
result?: unknown;
|
|
139
|
+
}[] | undefined;
|
|
140
|
+
}>;
|
|
141
|
+
export declare const agentChatResponseResourceSchema: z.ZodObject<{
|
|
142
|
+
type: z.ZodLiteral<string>;
|
|
143
|
+
id: z.ZodString;
|
|
144
|
+
attributes: z.ZodObject<{
|
|
145
|
+
response: z.ZodString;
|
|
146
|
+
toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
147
|
+
tool: z.ZodString;
|
|
148
|
+
result: z.ZodUnknown;
|
|
149
|
+
}, "strip", z.ZodTypeAny, {
|
|
150
|
+
tool: string;
|
|
151
|
+
result?: unknown;
|
|
152
|
+
}, {
|
|
153
|
+
tool: string;
|
|
154
|
+
result?: unknown;
|
|
155
|
+
}>, "many">>;
|
|
156
|
+
conversationId: z.ZodString;
|
|
157
|
+
}, "strip", z.ZodTypeAny, {
|
|
158
|
+
conversationId: string;
|
|
159
|
+
response: string;
|
|
160
|
+
toolCalls?: {
|
|
161
|
+
tool: string;
|
|
162
|
+
result?: unknown;
|
|
163
|
+
}[] | undefined;
|
|
164
|
+
}, {
|
|
165
|
+
conversationId: string;
|
|
166
|
+
response: string;
|
|
167
|
+
toolCalls?: {
|
|
168
|
+
tool: string;
|
|
169
|
+
result?: unknown;
|
|
170
|
+
}[] | undefined;
|
|
171
|
+
}>;
|
|
172
|
+
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
173
|
+
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
174
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
175
|
+
}, "strip", z.ZodTypeAny, {
|
|
176
|
+
type: string;
|
|
177
|
+
id: string;
|
|
178
|
+
attributes: {
|
|
179
|
+
conversationId: string;
|
|
180
|
+
response: string;
|
|
181
|
+
toolCalls?: {
|
|
182
|
+
tool: string;
|
|
183
|
+
result?: unknown;
|
|
184
|
+
}[] | undefined;
|
|
185
|
+
};
|
|
186
|
+
relationships?: Record<string, unknown> | undefined;
|
|
187
|
+
links?: Record<string, string> | undefined;
|
|
188
|
+
meta?: Record<string, unknown> | undefined;
|
|
189
|
+
}, {
|
|
190
|
+
type: string;
|
|
191
|
+
id: string;
|
|
192
|
+
attributes: {
|
|
193
|
+
conversationId: string;
|
|
194
|
+
response: string;
|
|
195
|
+
toolCalls?: {
|
|
196
|
+
tool: string;
|
|
197
|
+
result?: unknown;
|
|
198
|
+
}[] | undefined;
|
|
199
|
+
};
|
|
200
|
+
relationships?: Record<string, unknown> | undefined;
|
|
201
|
+
links?: Record<string, string> | undefined;
|
|
202
|
+
meta?: Record<string, unknown> | undefined;
|
|
203
|
+
}>;
|
|
204
|
+
export declare const agentChatResponseSchema: z.ZodObject<{
|
|
205
|
+
data: z.ZodObject<{
|
|
206
|
+
type: z.ZodLiteral<string>;
|
|
207
|
+
id: z.ZodString;
|
|
208
|
+
attributes: z.ZodObject<{
|
|
209
|
+
response: z.ZodString;
|
|
210
|
+
toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
211
|
+
tool: z.ZodString;
|
|
212
|
+
result: z.ZodUnknown;
|
|
213
|
+
}, "strip", z.ZodTypeAny, {
|
|
214
|
+
tool: string;
|
|
215
|
+
result?: unknown;
|
|
216
|
+
}, {
|
|
217
|
+
tool: string;
|
|
218
|
+
result?: unknown;
|
|
219
|
+
}>, "many">>;
|
|
220
|
+
conversationId: z.ZodString;
|
|
221
|
+
}, "strip", z.ZodTypeAny, {
|
|
222
|
+
conversationId: string;
|
|
223
|
+
response: string;
|
|
224
|
+
toolCalls?: {
|
|
225
|
+
tool: string;
|
|
226
|
+
result?: unknown;
|
|
227
|
+
}[] | undefined;
|
|
228
|
+
}, {
|
|
229
|
+
conversationId: string;
|
|
230
|
+
response: string;
|
|
231
|
+
toolCalls?: {
|
|
232
|
+
tool: string;
|
|
233
|
+
result?: unknown;
|
|
234
|
+
}[] | undefined;
|
|
235
|
+
}>;
|
|
236
|
+
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
237
|
+
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
238
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
239
|
+
}, "strip", z.ZodTypeAny, {
|
|
240
|
+
type: string;
|
|
241
|
+
id: string;
|
|
242
|
+
attributes: {
|
|
243
|
+
conversationId: string;
|
|
244
|
+
response: string;
|
|
245
|
+
toolCalls?: {
|
|
246
|
+
tool: string;
|
|
247
|
+
result?: unknown;
|
|
248
|
+
}[] | undefined;
|
|
249
|
+
};
|
|
250
|
+
relationships?: Record<string, unknown> | undefined;
|
|
251
|
+
links?: Record<string, string> | undefined;
|
|
252
|
+
meta?: Record<string, unknown> | undefined;
|
|
253
|
+
}, {
|
|
254
|
+
type: string;
|
|
255
|
+
id: string;
|
|
256
|
+
attributes: {
|
|
257
|
+
conversationId: string;
|
|
258
|
+
response: string;
|
|
259
|
+
toolCalls?: {
|
|
260
|
+
tool: string;
|
|
261
|
+
result?: unknown;
|
|
262
|
+
}[] | undefined;
|
|
263
|
+
};
|
|
264
|
+
relationships?: Record<string, unknown> | undefined;
|
|
265
|
+
links?: Record<string, string> | undefined;
|
|
266
|
+
meta?: Record<string, unknown> | undefined;
|
|
267
|
+
}>;
|
|
268
|
+
included: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
269
|
+
type: z.ZodString;
|
|
270
|
+
id: z.ZodString;
|
|
271
|
+
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
272
|
+
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
273
|
+
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
274
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
275
|
+
}, "strip", z.ZodTypeAny, {
|
|
276
|
+
type: string;
|
|
277
|
+
id: string;
|
|
278
|
+
attributes?: Record<string, unknown> | undefined;
|
|
279
|
+
relationships?: Record<string, unknown> | undefined;
|
|
280
|
+
links?: Record<string, string> | undefined;
|
|
281
|
+
meta?: Record<string, unknown> | undefined;
|
|
282
|
+
}, {
|
|
283
|
+
type: string;
|
|
284
|
+
id: string;
|
|
285
|
+
attributes?: Record<string, unknown> | undefined;
|
|
286
|
+
relationships?: Record<string, unknown> | undefined;
|
|
287
|
+
links?: Record<string, string> | undefined;
|
|
288
|
+
meta?: Record<string, unknown> | undefined;
|
|
289
|
+
}>, "many">>;
|
|
290
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
291
|
+
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
292
|
+
}, "strip", z.ZodTypeAny, {
|
|
293
|
+
data: {
|
|
294
|
+
type: string;
|
|
295
|
+
id: string;
|
|
296
|
+
attributes: {
|
|
297
|
+
conversationId: string;
|
|
298
|
+
response: string;
|
|
299
|
+
toolCalls?: {
|
|
300
|
+
tool: string;
|
|
301
|
+
result?: unknown;
|
|
302
|
+
}[] | undefined;
|
|
303
|
+
};
|
|
304
|
+
relationships?: Record<string, unknown> | undefined;
|
|
305
|
+
links?: Record<string, string> | undefined;
|
|
306
|
+
meta?: Record<string, unknown> | undefined;
|
|
307
|
+
};
|
|
308
|
+
links?: Record<string, string> | undefined;
|
|
309
|
+
meta?: Record<string, unknown> | undefined;
|
|
310
|
+
included?: {
|
|
311
|
+
type: string;
|
|
312
|
+
id: string;
|
|
313
|
+
attributes?: Record<string, unknown> | undefined;
|
|
314
|
+
relationships?: Record<string, unknown> | undefined;
|
|
315
|
+
links?: Record<string, string> | undefined;
|
|
316
|
+
meta?: Record<string, unknown> | undefined;
|
|
317
|
+
}[] | undefined;
|
|
318
|
+
}, {
|
|
319
|
+
data: {
|
|
320
|
+
type: string;
|
|
321
|
+
id: string;
|
|
322
|
+
attributes: {
|
|
323
|
+
conversationId: string;
|
|
324
|
+
response: string;
|
|
325
|
+
toolCalls?: {
|
|
326
|
+
tool: string;
|
|
327
|
+
result?: unknown;
|
|
328
|
+
}[] | undefined;
|
|
329
|
+
};
|
|
330
|
+
relationships?: Record<string, unknown> | undefined;
|
|
331
|
+
links?: Record<string, string> | undefined;
|
|
332
|
+
meta?: Record<string, unknown> | undefined;
|
|
333
|
+
};
|
|
334
|
+
links?: Record<string, string> | undefined;
|
|
335
|
+
meta?: Record<string, unknown> | undefined;
|
|
336
|
+
included?: {
|
|
337
|
+
type: string;
|
|
338
|
+
id: string;
|
|
339
|
+
attributes?: Record<string, unknown> | undefined;
|
|
340
|
+
relationships?: Record<string, unknown> | undefined;
|
|
341
|
+
links?: Record<string, string> | undefined;
|
|
342
|
+
meta?: Record<string, unknown> | undefined;
|
|
343
|
+
}[] | undefined;
|
|
344
|
+
}>;
|
|
345
|
+
export type MessageRole = z.infer<typeof messageRoleSchema>;
|
|
346
|
+
export type ConversationMessage = z.infer<typeof conversationMessageSchema>;
|
|
347
|
+
export type ToolCallResult = z.infer<typeof toolCallResultSchema>;
|
|
348
|
+
export type ChatRequestAttributes = z.infer<typeof chatRequestAttributesSchema>;
|
|
349
|
+
export type ChatRequestInput = z.infer<typeof chatRequestSchema>;
|
|
350
|
+
export type AgentChatResponseAttributes = z.infer<typeof agentChatResponseAttributesSchema>;
|
|
351
|
+
export type AgentChatResponse = z.infer<typeof agentChatResponseSchema>;
|
|
352
|
+
//# sourceMappingURL=agents.schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/agents.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;GAEG;AAGH,eAAO,MAAM,iBAAiB,kCAAgC,CAAC;AAG/D,eAAO,MAAM,yBAAyB;;;;;;;;;EAGpC,CAAC;AAGH,eAAO,MAAM,oBAAoB;;;;;;;;;EAG/B,CAAC;AAGH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKtC,CAAC;AAGH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG5B,CAAC;AAGH,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI5C,CAAC;AAGH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG3C,CAAC;AAGF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEnC,CAAC;AAGF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AACjE,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAC5F,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.agentChatResponseSchema = exports.agentChatResponseResourceSchema = exports.agentChatResponseAttributesSchema = exports.chatRequestSchema = exports.chatRequestAttributesSchema = exports.toolCallResultSchema = exports.conversationMessageSchema = exports.messageRoleSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const common_schemas_1 = require("./common.schemas");
|
|
6
|
+
/**
|
|
7
|
+
* Agents schemas - JSON:API compliant
|
|
8
|
+
*/
|
|
9
|
+
// Conversation message role enum
|
|
10
|
+
exports.messageRoleSchema = zod_1.z.enum(['user', 'assistant']);
|
|
11
|
+
// Conversation message schema
|
|
12
|
+
exports.conversationMessageSchema = zod_1.z.object({
|
|
13
|
+
role: exports.messageRoleSchema,
|
|
14
|
+
content: zod_1.z.string().min(1),
|
|
15
|
+
});
|
|
16
|
+
// Tool call result schema
|
|
17
|
+
exports.toolCallResultSchema = zod_1.z.object({
|
|
18
|
+
tool: zod_1.z.string(),
|
|
19
|
+
result: zod_1.z.unknown(), // Tool results can be any shape
|
|
20
|
+
});
|
|
21
|
+
// Chat request attributes schema
|
|
22
|
+
exports.chatRequestAttributesSchema = zod_1.z.object({
|
|
23
|
+
message: zod_1.z.string().min(1).max(5000),
|
|
24
|
+
farmId: zod_1.z.string().uuid().optional(),
|
|
25
|
+
conversationId: zod_1.z.string().uuid().optional(), // Continue existing conversation
|
|
26
|
+
conversationHistory: zod_1.z.array(exports.conversationMessageSchema).optional(),
|
|
27
|
+
});
|
|
28
|
+
// Chat request input (JSON:API format)
|
|
29
|
+
exports.chatRequestSchema = zod_1.z.object({
|
|
30
|
+
type: zod_1.z.literal('agent-chat-requests'),
|
|
31
|
+
attributes: exports.chatRequestAttributesSchema,
|
|
32
|
+
});
|
|
33
|
+
// Agent chat response attributes schema
|
|
34
|
+
exports.agentChatResponseAttributesSchema = zod_1.z.object({
|
|
35
|
+
response: zod_1.z.string(),
|
|
36
|
+
toolCalls: zod_1.z.array(exports.toolCallResultSchema).optional(),
|
|
37
|
+
conversationId: zod_1.z.string().uuid(), // Return conversation ID for continuing
|
|
38
|
+
});
|
|
39
|
+
// Agent chat response resource (JSON:API resource object)
|
|
40
|
+
exports.agentChatResponseResourceSchema = (0, common_schemas_1.createJsonApiResourceSchema)('agent-chat-responses', exports.agentChatResponseAttributesSchema);
|
|
41
|
+
// Agent chat response (JSON:API single response)
|
|
42
|
+
exports.agentChatResponseSchema = (0, common_schemas_1.jsonApiSingleResponseSchema)(exports.agentChatResponseResourceSchema);
|