@deepintel-ltd/farmpro-contracts 1.27.0 → 1.27.2

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 (41) hide show
  1. package/dist/routes/agents.routes.d.ts +681 -12
  2. package/dist/routes/agents.routes.d.ts.map +1 -1
  3. package/dist/routes/agents.routes.js +21 -1
  4. package/dist/routes/commodity-deals.routes.d.ts +27 -27
  5. package/dist/routes/farms.routes.d.ts +46 -46
  6. package/dist/routes/field-observations.routes.d.ts +34 -34
  7. package/dist/routes/invoices.routes.d.ts +39 -39
  8. package/dist/routes/livestock-groups.routes.d.ts +27 -27
  9. package/dist/routes/livestock.routes.d.ts +21 -21
  10. package/dist/routes/market-intelligence.routes.d.ts +8 -8
  11. package/dist/routes/organizations.routes.d.ts +49 -0
  12. package/dist/routes/organizations.routes.d.ts.map +1 -1
  13. package/dist/routes/poultry.routes.d.ts +22 -22
  14. package/dist/routes/purchase-orders.routes.d.ts +9 -9
  15. package/dist/routes/subscriptions.routes.d.ts +8 -8
  16. package/dist/routes/tasks.routes.d.ts +90 -0
  17. package/dist/routes/tasks.routes.d.ts.map +1 -1
  18. package/dist/routes/tasks.routes.js +1 -0
  19. package/dist/routes/team-payments.routes.d.ts +36 -36
  20. package/dist/routes/trade-cash-events.routes.d.ts +39 -39
  21. package/dist/routes/waybills.routes.d.ts +39 -39
  22. package/dist/schemas/agents.schemas.d.ts +718 -12
  23. package/dist/schemas/agents.schemas.d.ts.map +1 -1
  24. package/dist/schemas/agents.schemas.js +41 -0
  25. package/dist/schemas/commodity-deals.schemas.d.ts +18 -18
  26. package/dist/schemas/farms.schemas.d.ts +51 -51
  27. package/dist/schemas/field-observations.schemas.d.ts +24 -24
  28. package/dist/schemas/invoices.schemas.d.ts +27 -27
  29. package/dist/schemas/livestock-groups.schemas.d.ts +20 -20
  30. package/dist/schemas/livestock.schemas.d.ts +18 -18
  31. package/dist/schemas/organizations.schemas.d.ts +42 -0
  32. package/dist/schemas/organizations.schemas.d.ts.map +1 -1
  33. package/dist/schemas/organizations.schemas.js +3 -0
  34. package/dist/schemas/purchase-orders.schemas.d.ts +9 -9
  35. package/dist/schemas/subscriptions.schemas.d.ts +6 -6
  36. package/dist/schemas/team-payments.schemas.d.ts +24 -24
  37. package/dist/schemas/trade-cash-events.schemas.d.ts +29 -27
  38. package/dist/schemas/trade-cash-events.schemas.d.ts.map +1 -1
  39. package/dist/schemas/trade-cash-events.schemas.js +1 -0
  40. package/dist/schemas/waybills.schemas.d.ts +27 -27
  41. package/package.json +1 -1
@@ -555,33 +555,97 @@ export declare const agentsRouter: {
555
555
  id: z.ZodString;
556
556
  attributes: z.ZodObject<{
557
557
  messages: z.ZodArray<z.ZodObject<{
558
+ id: z.ZodOptional<z.ZodString>;
558
559
  role: z.ZodEnum<["user", "assistant"]>;
559
560
  content: z.ZodString;
560
561
  createdAt: z.ZodOptional<z.ZodString>;
562
+ route: z.ZodOptional<z.ZodString>;
563
+ proposedActions: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
564
+ advisoryReports: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
561
565
  }, "strip", z.ZodTypeAny, {
562
566
  role: "user" | "assistant";
563
567
  content: string;
568
+ id?: string | undefined;
564
569
  createdAt?: string | undefined;
570
+ route?: string | undefined;
571
+ proposedActions?: Record<string, unknown>[] | undefined;
572
+ advisoryReports?: Record<string, unknown>[] | undefined;
565
573
  }, {
566
574
  role: "user" | "assistant";
567
575
  content: string;
576
+ id?: string | undefined;
568
577
  createdAt?: string | undefined;
578
+ route?: string | undefined;
579
+ proposedActions?: Record<string, unknown>[] | undefined;
580
+ advisoryReports?: Record<string, unknown>[] | undefined;
569
581
  }>, "many">;
570
582
  conversationId: z.ZodString;
583
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
584
+ pendingRun: z.ZodOptional<z.ZodNullable<z.ZodObject<{
585
+ message: z.ZodString;
586
+ route: z.ZodNullable<z.ZodString>;
587
+ startedAt: z.ZodString;
588
+ }, "strip", z.ZodTypeAny, {
589
+ message: string;
590
+ route: string | null;
591
+ startedAt: string;
592
+ }, {
593
+ message: string;
594
+ route: string | null;
595
+ startedAt: string;
596
+ }>>>;
597
+ lastRunError: z.ZodOptional<z.ZodNullable<z.ZodObject<{
598
+ message: z.ZodString;
599
+ at: z.ZodString;
600
+ }, "strip", z.ZodTypeAny, {
601
+ message: string;
602
+ at: string;
603
+ }, {
604
+ message: string;
605
+ at: string;
606
+ }>>>;
571
607
  }, "strip", z.ZodTypeAny, {
572
608
  conversationId: string;
573
609
  messages: {
574
610
  role: "user" | "assistant";
575
611
  content: string;
612
+ id?: string | undefined;
576
613
  createdAt?: string | undefined;
614
+ route?: string | undefined;
615
+ proposedActions?: Record<string, unknown>[] | undefined;
616
+ advisoryReports?: Record<string, unknown>[] | undefined;
577
617
  }[];
618
+ title?: string | null | undefined;
619
+ pendingRun?: {
620
+ message: string;
621
+ route: string | null;
622
+ startedAt: string;
623
+ } | null | undefined;
624
+ lastRunError?: {
625
+ message: string;
626
+ at: string;
627
+ } | null | undefined;
578
628
  }, {
579
629
  conversationId: string;
580
630
  messages: {
581
631
  role: "user" | "assistant";
582
632
  content: string;
633
+ id?: string | undefined;
583
634
  createdAt?: string | undefined;
635
+ route?: string | undefined;
636
+ proposedActions?: Record<string, unknown>[] | undefined;
637
+ advisoryReports?: Record<string, unknown>[] | undefined;
584
638
  }[];
639
+ title?: string | null | undefined;
640
+ pendingRun?: {
641
+ message: string;
642
+ route: string | null;
643
+ startedAt: string;
644
+ } | null | undefined;
645
+ lastRunError?: {
646
+ message: string;
647
+ at: string;
648
+ } | null | undefined;
585
649
  }>;
586
650
  relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
587
651
  links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -594,8 +658,22 @@ export declare const agentsRouter: {
594
658
  messages: {
595
659
  role: "user" | "assistant";
596
660
  content: string;
661
+ id?: string | undefined;
597
662
  createdAt?: string | undefined;
663
+ route?: string | undefined;
664
+ proposedActions?: Record<string, unknown>[] | undefined;
665
+ advisoryReports?: Record<string, unknown>[] | undefined;
598
666
  }[];
667
+ title?: string | null | undefined;
668
+ pendingRun?: {
669
+ message: string;
670
+ route: string | null;
671
+ startedAt: string;
672
+ } | null | undefined;
673
+ lastRunError?: {
674
+ message: string;
675
+ at: string;
676
+ } | null | undefined;
599
677
  };
600
678
  relationships?: Record<string, unknown> | undefined;
601
679
  links?: Record<string, string> | undefined;
@@ -608,8 +686,22 @@ export declare const agentsRouter: {
608
686
  messages: {
609
687
  role: "user" | "assistant";
610
688
  content: string;
689
+ id?: string | undefined;
611
690
  createdAt?: string | undefined;
691
+ route?: string | undefined;
692
+ proposedActions?: Record<string, unknown>[] | undefined;
693
+ advisoryReports?: Record<string, unknown>[] | undefined;
612
694
  }[];
695
+ title?: string | null | undefined;
696
+ pendingRun?: {
697
+ message: string;
698
+ route: string | null;
699
+ startedAt: string;
700
+ } | null | undefined;
701
+ lastRunError?: {
702
+ message: string;
703
+ at: string;
704
+ } | null | undefined;
613
705
  };
614
706
  relationships?: Record<string, unknown> | undefined;
615
707
  links?: Record<string, string> | undefined;
@@ -648,8 +740,22 @@ export declare const agentsRouter: {
648
740
  messages: {
649
741
  role: "user" | "assistant";
650
742
  content: string;
743
+ id?: string | undefined;
651
744
  createdAt?: string | undefined;
745
+ route?: string | undefined;
746
+ proposedActions?: Record<string, unknown>[] | undefined;
747
+ advisoryReports?: Record<string, unknown>[] | undefined;
652
748
  }[];
749
+ title?: string | null | undefined;
750
+ pendingRun?: {
751
+ message: string;
752
+ route: string | null;
753
+ startedAt: string;
754
+ } | null | undefined;
755
+ lastRunError?: {
756
+ message: string;
757
+ at: string;
758
+ } | null | undefined;
653
759
  };
654
760
  relationships?: Record<string, unknown> | undefined;
655
761
  links?: Record<string, string> | undefined;
@@ -674,8 +780,22 @@ export declare const agentsRouter: {
674
780
  messages: {
675
781
  role: "user" | "assistant";
676
782
  content: string;
783
+ id?: string | undefined;
677
784
  createdAt?: string | undefined;
785
+ route?: string | undefined;
786
+ proposedActions?: Record<string, unknown>[] | undefined;
787
+ advisoryReports?: Record<string, unknown>[] | undefined;
678
788
  }[];
789
+ title?: string | null | undefined;
790
+ pendingRun?: {
791
+ message: string;
792
+ route: string | null;
793
+ startedAt: string;
794
+ } | null | undefined;
795
+ lastRunError?: {
796
+ message: string;
797
+ at: string;
798
+ } | null | undefined;
679
799
  };
680
800
  relationships?: Record<string, unknown> | undefined;
681
801
  links?: Record<string, string> | undefined;
@@ -1091,6 +1211,31 @@ export declare const agentsRouter: {
1091
1211
  lastMessageAt: z.ZodNullable<z.ZodString>;
1092
1212
  createdAt: z.ZodString;
1093
1213
  updatedAt: z.ZodString;
1214
+ lastRoute: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1215
+ preview: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1216
+ pendingRun: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1217
+ message: z.ZodString;
1218
+ route: z.ZodNullable<z.ZodString>;
1219
+ startedAt: z.ZodString;
1220
+ }, "strip", z.ZodTypeAny, {
1221
+ message: string;
1222
+ route: string | null;
1223
+ startedAt: string;
1224
+ }, {
1225
+ message: string;
1226
+ route: string | null;
1227
+ startedAt: string;
1228
+ }>>>;
1229
+ lastRunError: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1230
+ message: z.ZodString;
1231
+ at: z.ZodString;
1232
+ }, "strip", z.ZodTypeAny, {
1233
+ message: string;
1234
+ at: string;
1235
+ }, {
1236
+ message: string;
1237
+ at: string;
1238
+ }>>>;
1094
1239
  }, "strip", z.ZodTypeAny, {
1095
1240
  id: string;
1096
1241
  title: string | null;
@@ -1100,6 +1245,17 @@ export declare const agentsRouter: {
1100
1245
  farmId: string | null;
1101
1246
  messageCount: number;
1102
1247
  lastMessageAt: string | null;
1248
+ pendingRun?: {
1249
+ message: string;
1250
+ route: string | null;
1251
+ startedAt: string;
1252
+ } | null | undefined;
1253
+ lastRunError?: {
1254
+ message: string;
1255
+ at: string;
1256
+ } | null | undefined;
1257
+ lastRoute?: string | null | undefined;
1258
+ preview?: string | null | undefined;
1103
1259
  }, {
1104
1260
  id: string;
1105
1261
  title: string | null;
@@ -1109,6 +1265,17 @@ export declare const agentsRouter: {
1109
1265
  farmId: string | null;
1110
1266
  messageCount: number;
1111
1267
  lastMessageAt: string | null;
1268
+ pendingRun?: {
1269
+ message: string;
1270
+ route: string | null;
1271
+ startedAt: string;
1272
+ } | null | undefined;
1273
+ lastRunError?: {
1274
+ message: string;
1275
+ at: string;
1276
+ } | null | undefined;
1277
+ lastRoute?: string | null | undefined;
1278
+ preview?: string | null | undefined;
1112
1279
  }>, "many">;
1113
1280
  total: z.ZodNumber;
1114
1281
  }, "strip", z.ZodTypeAny, {
@@ -1121,6 +1288,17 @@ export declare const agentsRouter: {
1121
1288
  farmId: string | null;
1122
1289
  messageCount: number;
1123
1290
  lastMessageAt: string | null;
1291
+ pendingRun?: {
1292
+ message: string;
1293
+ route: string | null;
1294
+ startedAt: string;
1295
+ } | null | undefined;
1296
+ lastRunError?: {
1297
+ message: string;
1298
+ at: string;
1299
+ } | null | undefined;
1300
+ lastRoute?: string | null | undefined;
1301
+ preview?: string | null | undefined;
1124
1302
  }[];
1125
1303
  total: number;
1126
1304
  }, {
@@ -1133,6 +1311,17 @@ export declare const agentsRouter: {
1133
1311
  farmId: string | null;
1134
1312
  messageCount: number;
1135
1313
  lastMessageAt: string | null;
1314
+ pendingRun?: {
1315
+ message: string;
1316
+ route: string | null;
1317
+ startedAt: string;
1318
+ } | null | undefined;
1319
+ lastRunError?: {
1320
+ message: string;
1321
+ at: string;
1322
+ } | null | undefined;
1323
+ lastRoute?: string | null | undefined;
1324
+ preview?: string | null | undefined;
1136
1325
  }[];
1137
1326
  total: number;
1138
1327
  }>;
@@ -1152,6 +1341,17 @@ export declare const agentsRouter: {
1152
1341
  farmId: string | null;
1153
1342
  messageCount: number;
1154
1343
  lastMessageAt: string | null;
1344
+ pendingRun?: {
1345
+ message: string;
1346
+ route: string | null;
1347
+ startedAt: string;
1348
+ } | null | undefined;
1349
+ lastRunError?: {
1350
+ message: string;
1351
+ at: string;
1352
+ } | null | undefined;
1353
+ lastRoute?: string | null | undefined;
1354
+ preview?: string | null | undefined;
1155
1355
  }[];
1156
1356
  total: number;
1157
1357
  };
@@ -1171,6 +1371,17 @@ export declare const agentsRouter: {
1171
1371
  farmId: string | null;
1172
1372
  messageCount: number;
1173
1373
  lastMessageAt: string | null;
1374
+ pendingRun?: {
1375
+ message: string;
1376
+ route: string | null;
1377
+ startedAt: string;
1378
+ } | null | undefined;
1379
+ lastRunError?: {
1380
+ message: string;
1381
+ at: string;
1382
+ } | null | undefined;
1383
+ lastRoute?: string | null | undefined;
1384
+ preview?: string | null | undefined;
1174
1385
  }[];
1175
1386
  total: number;
1176
1387
  };
@@ -1216,6 +1427,17 @@ export declare const agentsRouter: {
1216
1427
  farmId: string | null;
1217
1428
  messageCount: number;
1218
1429
  lastMessageAt: string | null;
1430
+ pendingRun?: {
1431
+ message: string;
1432
+ route: string | null;
1433
+ startedAt: string;
1434
+ } | null | undefined;
1435
+ lastRunError?: {
1436
+ message: string;
1437
+ at: string;
1438
+ } | null | undefined;
1439
+ lastRoute?: string | null | undefined;
1440
+ preview?: string | null | undefined;
1219
1441
  }[];
1220
1442
  total: number;
1221
1443
  };
@@ -1247,6 +1469,17 @@ export declare const agentsRouter: {
1247
1469
  farmId: string | null;
1248
1470
  messageCount: number;
1249
1471
  lastMessageAt: string | null;
1472
+ pendingRun?: {
1473
+ message: string;
1474
+ route: string | null;
1475
+ startedAt: string;
1476
+ } | null | undefined;
1477
+ lastRunError?: {
1478
+ message: string;
1479
+ at: string;
1480
+ } | null | undefined;
1481
+ lastRoute?: string | null | undefined;
1482
+ preview?: string | null | undefined;
1250
1483
  }[];
1251
1484
  total: number;
1252
1485
  };
@@ -2040,6 +2273,442 @@ export declare const agentsRouter: {
2040
2273
  }>;
2041
2274
  };
2042
2275
  };
2276
+ updateProposedActionStatus: {
2277
+ pathParams: z.ZodObject<{
2278
+ farmId: z.ZodString;
2279
+ conversationId: z.ZodString;
2280
+ actionId: z.ZodString;
2281
+ }, "strip", z.ZodTypeAny, {
2282
+ farmId: string;
2283
+ conversationId: string;
2284
+ actionId: string;
2285
+ }, {
2286
+ farmId: string;
2287
+ conversationId: string;
2288
+ actionId: string;
2289
+ }>;
2290
+ summary: "Accept or dismiss a proposed agent action";
2291
+ description: "Records the outcome of a supervised Farm Brain action so it shows as accepted/dismissed on every device. The client performs the action itself (create task, log expense…) before calling this.";
2292
+ method: "PATCH";
2293
+ body: z.ZodObject<{
2294
+ status: z.ZodEnum<["accepted", "dismissed"]>;
2295
+ }, "strip", z.ZodTypeAny, {
2296
+ status: "accepted" | "dismissed";
2297
+ }, {
2298
+ status: "accepted" | "dismissed";
2299
+ }>;
2300
+ path: "/farms/:farmId/agents/conversations/:conversationId/actions/:actionId";
2301
+ responses: {
2302
+ 200: z.ZodObject<{
2303
+ data: z.ZodObject<{
2304
+ type: z.ZodLiteral<"proposed-action-statuses">;
2305
+ id: z.ZodString;
2306
+ attributes: z.ZodObject<{
2307
+ conversationId: z.ZodString;
2308
+ status: z.ZodEnum<["accepted", "dismissed"]>;
2309
+ }, "strip", z.ZodTypeAny, {
2310
+ status: "accepted" | "dismissed";
2311
+ conversationId: string;
2312
+ }, {
2313
+ status: "accepted" | "dismissed";
2314
+ conversationId: string;
2315
+ }>;
2316
+ }, "strip", z.ZodTypeAny, {
2317
+ type: "proposed-action-statuses";
2318
+ id: string;
2319
+ attributes: {
2320
+ status: "accepted" | "dismissed";
2321
+ conversationId: string;
2322
+ };
2323
+ }, {
2324
+ type: "proposed-action-statuses";
2325
+ id: string;
2326
+ attributes: {
2327
+ status: "accepted" | "dismissed";
2328
+ conversationId: string;
2329
+ };
2330
+ }>;
2331
+ }, "strip", z.ZodTypeAny, {
2332
+ data: {
2333
+ type: "proposed-action-statuses";
2334
+ id: string;
2335
+ attributes: {
2336
+ status: "accepted" | "dismissed";
2337
+ conversationId: string;
2338
+ };
2339
+ };
2340
+ }, {
2341
+ data: {
2342
+ type: "proposed-action-statuses";
2343
+ id: string;
2344
+ attributes: {
2345
+ status: "accepted" | "dismissed";
2346
+ conversationId: string;
2347
+ };
2348
+ };
2349
+ }>;
2350
+ 400: z.ZodObject<{
2351
+ errors: z.ZodArray<z.ZodObject<{
2352
+ id: z.ZodOptional<z.ZodString>;
2353
+ links: z.ZodOptional<z.ZodObject<{
2354
+ about: z.ZodOptional<z.ZodString>;
2355
+ }, "strip", z.ZodTypeAny, {
2356
+ about?: string | undefined;
2357
+ }, {
2358
+ about?: string | undefined;
2359
+ }>>;
2360
+ status: z.ZodOptional<z.ZodString>;
2361
+ code: z.ZodOptional<z.ZodString>;
2362
+ title: z.ZodOptional<z.ZodString>;
2363
+ detail: z.ZodOptional<z.ZodString>;
2364
+ source: z.ZodOptional<z.ZodObject<{
2365
+ pointer: z.ZodOptional<z.ZodString>;
2366
+ parameter: z.ZodOptional<z.ZodString>;
2367
+ }, "strip", z.ZodTypeAny, {
2368
+ pointer?: string | undefined;
2369
+ parameter?: string | undefined;
2370
+ }, {
2371
+ pointer?: string | undefined;
2372
+ parameter?: string | undefined;
2373
+ }>>;
2374
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2375
+ }, "strip", z.ZodTypeAny, {
2376
+ status?: string | undefined;
2377
+ code?: string | undefined;
2378
+ id?: string | undefined;
2379
+ links?: {
2380
+ about?: string | undefined;
2381
+ } | undefined;
2382
+ meta?: Record<string, unknown> | undefined;
2383
+ title?: string | undefined;
2384
+ detail?: string | undefined;
2385
+ source?: {
2386
+ pointer?: string | undefined;
2387
+ parameter?: string | undefined;
2388
+ } | undefined;
2389
+ }, {
2390
+ status?: string | undefined;
2391
+ code?: string | undefined;
2392
+ id?: string | undefined;
2393
+ links?: {
2394
+ about?: string | undefined;
2395
+ } | undefined;
2396
+ meta?: Record<string, unknown> | undefined;
2397
+ title?: string | undefined;
2398
+ detail?: string | undefined;
2399
+ source?: {
2400
+ pointer?: string | undefined;
2401
+ parameter?: string | undefined;
2402
+ } | undefined;
2403
+ }>, "many">;
2404
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2405
+ }, "strip", z.ZodTypeAny, {
2406
+ errors: {
2407
+ status?: string | undefined;
2408
+ code?: string | undefined;
2409
+ id?: string | undefined;
2410
+ links?: {
2411
+ about?: string | undefined;
2412
+ } | undefined;
2413
+ meta?: Record<string, unknown> | undefined;
2414
+ title?: string | undefined;
2415
+ detail?: string | undefined;
2416
+ source?: {
2417
+ pointer?: string | undefined;
2418
+ parameter?: string | undefined;
2419
+ } | undefined;
2420
+ }[];
2421
+ meta?: Record<string, unknown> | undefined;
2422
+ }, {
2423
+ errors: {
2424
+ status?: string | undefined;
2425
+ code?: string | undefined;
2426
+ id?: string | undefined;
2427
+ links?: {
2428
+ about?: string | undefined;
2429
+ } | undefined;
2430
+ meta?: Record<string, unknown> | undefined;
2431
+ title?: string | undefined;
2432
+ detail?: string | undefined;
2433
+ source?: {
2434
+ pointer?: string | undefined;
2435
+ parameter?: string | undefined;
2436
+ } | undefined;
2437
+ }[];
2438
+ meta?: Record<string, unknown> | undefined;
2439
+ }>;
2440
+ 401: z.ZodObject<{
2441
+ errors: z.ZodArray<z.ZodObject<{
2442
+ id: z.ZodOptional<z.ZodString>;
2443
+ links: z.ZodOptional<z.ZodObject<{
2444
+ about: z.ZodOptional<z.ZodString>;
2445
+ }, "strip", z.ZodTypeAny, {
2446
+ about?: string | undefined;
2447
+ }, {
2448
+ about?: string | undefined;
2449
+ }>>;
2450
+ status: z.ZodOptional<z.ZodString>;
2451
+ code: z.ZodOptional<z.ZodString>;
2452
+ title: z.ZodOptional<z.ZodString>;
2453
+ detail: z.ZodOptional<z.ZodString>;
2454
+ source: z.ZodOptional<z.ZodObject<{
2455
+ pointer: z.ZodOptional<z.ZodString>;
2456
+ parameter: z.ZodOptional<z.ZodString>;
2457
+ }, "strip", z.ZodTypeAny, {
2458
+ pointer?: string | undefined;
2459
+ parameter?: string | undefined;
2460
+ }, {
2461
+ pointer?: string | undefined;
2462
+ parameter?: string | undefined;
2463
+ }>>;
2464
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2465
+ }, "strip", z.ZodTypeAny, {
2466
+ status?: string | undefined;
2467
+ code?: string | undefined;
2468
+ id?: string | undefined;
2469
+ links?: {
2470
+ about?: string | undefined;
2471
+ } | undefined;
2472
+ meta?: Record<string, unknown> | undefined;
2473
+ title?: string | undefined;
2474
+ detail?: string | undefined;
2475
+ source?: {
2476
+ pointer?: string | undefined;
2477
+ parameter?: string | undefined;
2478
+ } | undefined;
2479
+ }, {
2480
+ status?: string | undefined;
2481
+ code?: string | undefined;
2482
+ id?: string | undefined;
2483
+ links?: {
2484
+ about?: string | undefined;
2485
+ } | undefined;
2486
+ meta?: Record<string, unknown> | undefined;
2487
+ title?: string | undefined;
2488
+ detail?: string | undefined;
2489
+ source?: {
2490
+ pointer?: string | undefined;
2491
+ parameter?: string | undefined;
2492
+ } | undefined;
2493
+ }>, "many">;
2494
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2495
+ }, "strip", z.ZodTypeAny, {
2496
+ errors: {
2497
+ status?: string | undefined;
2498
+ code?: string | undefined;
2499
+ id?: string | undefined;
2500
+ links?: {
2501
+ about?: string | undefined;
2502
+ } | undefined;
2503
+ meta?: Record<string, unknown> | undefined;
2504
+ title?: string | undefined;
2505
+ detail?: string | undefined;
2506
+ source?: {
2507
+ pointer?: string | undefined;
2508
+ parameter?: string | undefined;
2509
+ } | undefined;
2510
+ }[];
2511
+ meta?: Record<string, unknown> | undefined;
2512
+ }, {
2513
+ errors: {
2514
+ status?: string | undefined;
2515
+ code?: string | undefined;
2516
+ id?: string | undefined;
2517
+ links?: {
2518
+ about?: string | undefined;
2519
+ } | undefined;
2520
+ meta?: Record<string, unknown> | undefined;
2521
+ title?: string | undefined;
2522
+ detail?: string | undefined;
2523
+ source?: {
2524
+ pointer?: string | undefined;
2525
+ parameter?: string | undefined;
2526
+ } | undefined;
2527
+ }[];
2528
+ meta?: Record<string, unknown> | undefined;
2529
+ }>;
2530
+ 404: z.ZodObject<{
2531
+ errors: z.ZodArray<z.ZodObject<{
2532
+ id: z.ZodOptional<z.ZodString>;
2533
+ links: z.ZodOptional<z.ZodObject<{
2534
+ about: z.ZodOptional<z.ZodString>;
2535
+ }, "strip", z.ZodTypeAny, {
2536
+ about?: string | undefined;
2537
+ }, {
2538
+ about?: string | undefined;
2539
+ }>>;
2540
+ status: z.ZodOptional<z.ZodString>;
2541
+ code: z.ZodOptional<z.ZodString>;
2542
+ title: z.ZodOptional<z.ZodString>;
2543
+ detail: z.ZodOptional<z.ZodString>;
2544
+ source: z.ZodOptional<z.ZodObject<{
2545
+ pointer: z.ZodOptional<z.ZodString>;
2546
+ parameter: z.ZodOptional<z.ZodString>;
2547
+ }, "strip", z.ZodTypeAny, {
2548
+ pointer?: string | undefined;
2549
+ parameter?: string | undefined;
2550
+ }, {
2551
+ pointer?: string | undefined;
2552
+ parameter?: string | undefined;
2553
+ }>>;
2554
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2555
+ }, "strip", z.ZodTypeAny, {
2556
+ status?: string | undefined;
2557
+ code?: string | undefined;
2558
+ id?: string | undefined;
2559
+ links?: {
2560
+ about?: string | undefined;
2561
+ } | undefined;
2562
+ meta?: Record<string, unknown> | undefined;
2563
+ title?: string | undefined;
2564
+ detail?: string | undefined;
2565
+ source?: {
2566
+ pointer?: string | undefined;
2567
+ parameter?: string | undefined;
2568
+ } | undefined;
2569
+ }, {
2570
+ status?: string | undefined;
2571
+ code?: string | undefined;
2572
+ id?: string | undefined;
2573
+ links?: {
2574
+ about?: string | undefined;
2575
+ } | undefined;
2576
+ meta?: Record<string, unknown> | undefined;
2577
+ title?: string | undefined;
2578
+ detail?: string | undefined;
2579
+ source?: {
2580
+ pointer?: string | undefined;
2581
+ parameter?: string | undefined;
2582
+ } | undefined;
2583
+ }>, "many">;
2584
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2585
+ }, "strip", z.ZodTypeAny, {
2586
+ errors: {
2587
+ status?: string | undefined;
2588
+ code?: string | undefined;
2589
+ id?: string | undefined;
2590
+ links?: {
2591
+ about?: string | undefined;
2592
+ } | undefined;
2593
+ meta?: Record<string, unknown> | undefined;
2594
+ title?: string | undefined;
2595
+ detail?: string | undefined;
2596
+ source?: {
2597
+ pointer?: string | undefined;
2598
+ parameter?: string | undefined;
2599
+ } | undefined;
2600
+ }[];
2601
+ meta?: Record<string, unknown> | undefined;
2602
+ }, {
2603
+ errors: {
2604
+ status?: string | undefined;
2605
+ code?: string | undefined;
2606
+ id?: string | undefined;
2607
+ links?: {
2608
+ about?: string | undefined;
2609
+ } | undefined;
2610
+ meta?: Record<string, unknown> | undefined;
2611
+ title?: string | undefined;
2612
+ detail?: string | undefined;
2613
+ source?: {
2614
+ pointer?: string | undefined;
2615
+ parameter?: string | undefined;
2616
+ } | undefined;
2617
+ }[];
2618
+ meta?: Record<string, unknown> | undefined;
2619
+ }>;
2620
+ 500: z.ZodObject<{
2621
+ errors: z.ZodArray<z.ZodObject<{
2622
+ id: z.ZodOptional<z.ZodString>;
2623
+ links: z.ZodOptional<z.ZodObject<{
2624
+ about: z.ZodOptional<z.ZodString>;
2625
+ }, "strip", z.ZodTypeAny, {
2626
+ about?: string | undefined;
2627
+ }, {
2628
+ about?: string | undefined;
2629
+ }>>;
2630
+ status: z.ZodOptional<z.ZodString>;
2631
+ code: z.ZodOptional<z.ZodString>;
2632
+ title: z.ZodOptional<z.ZodString>;
2633
+ detail: z.ZodOptional<z.ZodString>;
2634
+ source: z.ZodOptional<z.ZodObject<{
2635
+ pointer: z.ZodOptional<z.ZodString>;
2636
+ parameter: z.ZodOptional<z.ZodString>;
2637
+ }, "strip", z.ZodTypeAny, {
2638
+ pointer?: string | undefined;
2639
+ parameter?: string | undefined;
2640
+ }, {
2641
+ pointer?: string | undefined;
2642
+ parameter?: string | undefined;
2643
+ }>>;
2644
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2645
+ }, "strip", z.ZodTypeAny, {
2646
+ status?: string | undefined;
2647
+ code?: string | undefined;
2648
+ id?: string | undefined;
2649
+ links?: {
2650
+ about?: string | undefined;
2651
+ } | undefined;
2652
+ meta?: Record<string, unknown> | undefined;
2653
+ title?: string | undefined;
2654
+ detail?: string | undefined;
2655
+ source?: {
2656
+ pointer?: string | undefined;
2657
+ parameter?: string | undefined;
2658
+ } | undefined;
2659
+ }, {
2660
+ status?: string | undefined;
2661
+ code?: string | undefined;
2662
+ id?: string | undefined;
2663
+ links?: {
2664
+ about?: string | undefined;
2665
+ } | undefined;
2666
+ meta?: Record<string, unknown> | undefined;
2667
+ title?: string | undefined;
2668
+ detail?: string | undefined;
2669
+ source?: {
2670
+ pointer?: string | undefined;
2671
+ parameter?: string | undefined;
2672
+ } | undefined;
2673
+ }>, "many">;
2674
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2675
+ }, "strip", z.ZodTypeAny, {
2676
+ errors: {
2677
+ status?: string | undefined;
2678
+ code?: string | undefined;
2679
+ id?: string | undefined;
2680
+ links?: {
2681
+ about?: string | undefined;
2682
+ } | undefined;
2683
+ meta?: Record<string, unknown> | undefined;
2684
+ title?: string | undefined;
2685
+ detail?: string | undefined;
2686
+ source?: {
2687
+ pointer?: string | undefined;
2688
+ parameter?: string | undefined;
2689
+ } | undefined;
2690
+ }[];
2691
+ meta?: Record<string, unknown> | undefined;
2692
+ }, {
2693
+ errors: {
2694
+ status?: string | undefined;
2695
+ code?: string | undefined;
2696
+ id?: string | undefined;
2697
+ links?: {
2698
+ about?: string | undefined;
2699
+ } | undefined;
2700
+ meta?: Record<string, unknown> | undefined;
2701
+ title?: string | undefined;
2702
+ detail?: string | undefined;
2703
+ source?: {
2704
+ pointer?: string | undefined;
2705
+ parameter?: string | undefined;
2706
+ } | undefined;
2707
+ }[];
2708
+ meta?: Record<string, unknown> | undefined;
2709
+ }>;
2710
+ };
2711
+ };
2043
2712
  generateSurveyGeoJSON: {
2044
2713
  summary: "Generate GeoJSON from survey document";
2045
2714
  description: "Upload a survey document (PDF or image) and generate standardized GeoJSON. The agent intelligently extracts survey data, handles errors, and makes approximations when needed to create accurate geospatial boundaries.";
@@ -5044,7 +5713,6 @@ export declare const agentsRouter: {
5044
5713
  response: string;
5045
5714
  route: "general" | "agronomics" | "finance" | "operations";
5046
5715
  conversationId?: string | undefined;
5047
- modelUsed?: string | undefined;
5048
5716
  proposedActions?: {
5049
5717
  type: "create_task" | "log_expense" | "log_revenue" | "dismiss_alert" | "open_entity" | "record_planting" | "record_harvest" | "record_field_activity" | "end_season";
5050
5718
  id: string;
@@ -5052,11 +5720,11 @@ export declare const agentsRouter: {
5052
5720
  payload: Record<string, unknown>;
5053
5721
  requiresConfirmation: boolean;
5054
5722
  }[] | undefined;
5723
+ modelUsed?: string | undefined;
5055
5724
  }, {
5056
5725
  response: string;
5057
5726
  route: "general" | "agronomics" | "finance" | "operations";
5058
5727
  conversationId?: string | undefined;
5059
- modelUsed?: string | undefined;
5060
5728
  proposedActions?: {
5061
5729
  type: "create_task" | "log_expense" | "log_revenue" | "dismiss_alert" | "open_entity" | "record_planting" | "record_harvest" | "record_field_activity" | "end_season";
5062
5730
  id: string;
@@ -5064,6 +5732,7 @@ export declare const agentsRouter: {
5064
5732
  payload: Record<string, unknown>;
5065
5733
  requiresConfirmation?: boolean | undefined;
5066
5734
  }[] | undefined;
5735
+ modelUsed?: string | undefined;
5067
5736
  }>;
5068
5737
  }, "strip", z.ZodTypeAny, {
5069
5738
  type: "farm-brain-response";
@@ -5072,7 +5741,6 @@ export declare const agentsRouter: {
5072
5741
  response: string;
5073
5742
  route: "general" | "agronomics" | "finance" | "operations";
5074
5743
  conversationId?: string | undefined;
5075
- modelUsed?: string | undefined;
5076
5744
  proposedActions?: {
5077
5745
  type: "create_task" | "log_expense" | "log_revenue" | "dismiss_alert" | "open_entity" | "record_planting" | "record_harvest" | "record_field_activity" | "end_season";
5078
5746
  id: string;
@@ -5080,6 +5748,7 @@ export declare const agentsRouter: {
5080
5748
  payload: Record<string, unknown>;
5081
5749
  requiresConfirmation: boolean;
5082
5750
  }[] | undefined;
5751
+ modelUsed?: string | undefined;
5083
5752
  };
5084
5753
  }, {
5085
5754
  type: "farm-brain-response";
@@ -5088,7 +5757,6 @@ export declare const agentsRouter: {
5088
5757
  response: string;
5089
5758
  route: "general" | "agronomics" | "finance" | "operations";
5090
5759
  conversationId?: string | undefined;
5091
- modelUsed?: string | undefined;
5092
5760
  proposedActions?: {
5093
5761
  type: "create_task" | "log_expense" | "log_revenue" | "dismiss_alert" | "open_entity" | "record_planting" | "record_harvest" | "record_field_activity" | "end_season";
5094
5762
  id: string;
@@ -5096,6 +5764,7 @@ export declare const agentsRouter: {
5096
5764
  payload: Record<string, unknown>;
5097
5765
  requiresConfirmation?: boolean | undefined;
5098
5766
  }[] | undefined;
5767
+ modelUsed?: string | undefined;
5099
5768
  };
5100
5769
  }>;
5101
5770
  }, "strip", z.ZodTypeAny, {
@@ -5106,7 +5775,6 @@ export declare const agentsRouter: {
5106
5775
  response: string;
5107
5776
  route: "general" | "agronomics" | "finance" | "operations";
5108
5777
  conversationId?: string | undefined;
5109
- modelUsed?: string | undefined;
5110
5778
  proposedActions?: {
5111
5779
  type: "create_task" | "log_expense" | "log_revenue" | "dismiss_alert" | "open_entity" | "record_planting" | "record_harvest" | "record_field_activity" | "end_season";
5112
5780
  id: string;
@@ -5114,6 +5782,7 @@ export declare const agentsRouter: {
5114
5782
  payload: Record<string, unknown>;
5115
5783
  requiresConfirmation: boolean;
5116
5784
  }[] | undefined;
5785
+ modelUsed?: string | undefined;
5117
5786
  };
5118
5787
  };
5119
5788
  }, {
@@ -5124,7 +5793,6 @@ export declare const agentsRouter: {
5124
5793
  response: string;
5125
5794
  route: "general" | "agronomics" | "finance" | "operations";
5126
5795
  conversationId?: string | undefined;
5127
- modelUsed?: string | undefined;
5128
5796
  proposedActions?: {
5129
5797
  type: "create_task" | "log_expense" | "log_revenue" | "dismiss_alert" | "open_entity" | "record_planting" | "record_harvest" | "record_field_activity" | "end_season";
5130
5798
  id: string;
@@ -5132,6 +5800,7 @@ export declare const agentsRouter: {
5132
5800
  payload: Record<string, unknown>;
5133
5801
  requiresConfirmation?: boolean | undefined;
5134
5802
  }[] | undefined;
5803
+ modelUsed?: string | undefined;
5135
5804
  };
5136
5805
  };
5137
5806
  }>;
@@ -5725,7 +6394,6 @@ export declare const agentsRouter: {
5725
6394
  response: string;
5726
6395
  route: "general" | "agronomics" | "finance" | "operations";
5727
6396
  conversationId?: string | undefined;
5728
- modelUsed?: string | undefined;
5729
6397
  proposedActions?: {
5730
6398
  type: "create_task" | "log_expense" | "log_revenue" | "dismiss_alert" | "open_entity" | "record_planting" | "record_harvest" | "record_field_activity" | "end_season";
5731
6399
  id: string;
@@ -5733,12 +6401,12 @@ export declare const agentsRouter: {
5733
6401
  payload: Record<string, unknown>;
5734
6402
  requiresConfirmation: boolean;
5735
6403
  }[] | undefined;
6404
+ modelUsed?: string | undefined;
5736
6405
  }, {
5737
6406
  language: string;
5738
6407
  response: string;
5739
6408
  route: "general" | "agronomics" | "finance" | "operations";
5740
6409
  conversationId?: string | undefined;
5741
- modelUsed?: string | undefined;
5742
6410
  proposedActions?: {
5743
6411
  type: "create_task" | "log_expense" | "log_revenue" | "dismiss_alert" | "open_entity" | "record_planting" | "record_harvest" | "record_field_activity" | "end_season";
5744
6412
  id: string;
@@ -5746,6 +6414,7 @@ export declare const agentsRouter: {
5746
6414
  payload: Record<string, unknown>;
5747
6415
  requiresConfirmation?: boolean | undefined;
5748
6416
  }[] | undefined;
6417
+ modelUsed?: string | undefined;
5749
6418
  }>;
5750
6419
  }, "strip", z.ZodTypeAny, {
5751
6420
  type: "farm-brain-localized-response";
@@ -5755,7 +6424,6 @@ export declare const agentsRouter: {
5755
6424
  response: string;
5756
6425
  route: "general" | "agronomics" | "finance" | "operations";
5757
6426
  conversationId?: string | undefined;
5758
- modelUsed?: string | undefined;
5759
6427
  proposedActions?: {
5760
6428
  type: "create_task" | "log_expense" | "log_revenue" | "dismiss_alert" | "open_entity" | "record_planting" | "record_harvest" | "record_field_activity" | "end_season";
5761
6429
  id: string;
@@ -5763,6 +6431,7 @@ export declare const agentsRouter: {
5763
6431
  payload: Record<string, unknown>;
5764
6432
  requiresConfirmation: boolean;
5765
6433
  }[] | undefined;
6434
+ modelUsed?: string | undefined;
5766
6435
  };
5767
6436
  }, {
5768
6437
  type: "farm-brain-localized-response";
@@ -5772,7 +6441,6 @@ export declare const agentsRouter: {
5772
6441
  response: string;
5773
6442
  route: "general" | "agronomics" | "finance" | "operations";
5774
6443
  conversationId?: string | undefined;
5775
- modelUsed?: string | undefined;
5776
6444
  proposedActions?: {
5777
6445
  type: "create_task" | "log_expense" | "log_revenue" | "dismiss_alert" | "open_entity" | "record_planting" | "record_harvest" | "record_field_activity" | "end_season";
5778
6446
  id: string;
@@ -5780,6 +6448,7 @@ export declare const agentsRouter: {
5780
6448
  payload: Record<string, unknown>;
5781
6449
  requiresConfirmation?: boolean | undefined;
5782
6450
  }[] | undefined;
6451
+ modelUsed?: string | undefined;
5783
6452
  };
5784
6453
  }>;
5785
6454
  }, "strip", z.ZodTypeAny, {
@@ -5791,7 +6460,6 @@ export declare const agentsRouter: {
5791
6460
  response: string;
5792
6461
  route: "general" | "agronomics" | "finance" | "operations";
5793
6462
  conversationId?: string | undefined;
5794
- modelUsed?: string | undefined;
5795
6463
  proposedActions?: {
5796
6464
  type: "create_task" | "log_expense" | "log_revenue" | "dismiss_alert" | "open_entity" | "record_planting" | "record_harvest" | "record_field_activity" | "end_season";
5797
6465
  id: string;
@@ -5799,6 +6467,7 @@ export declare const agentsRouter: {
5799
6467
  payload: Record<string, unknown>;
5800
6468
  requiresConfirmation: boolean;
5801
6469
  }[] | undefined;
6470
+ modelUsed?: string | undefined;
5802
6471
  };
5803
6472
  };
5804
6473
  }, {
@@ -5810,7 +6479,6 @@ export declare const agentsRouter: {
5810
6479
  response: string;
5811
6480
  route: "general" | "agronomics" | "finance" | "operations";
5812
6481
  conversationId?: string | undefined;
5813
- modelUsed?: string | undefined;
5814
6482
  proposedActions?: {
5815
6483
  type: "create_task" | "log_expense" | "log_revenue" | "dismiss_alert" | "open_entity" | "record_planting" | "record_harvest" | "record_field_activity" | "end_season";
5816
6484
  id: string;
@@ -5818,6 +6486,7 @@ export declare const agentsRouter: {
5818
6486
  payload: Record<string, unknown>;
5819
6487
  requiresConfirmation?: boolean | undefined;
5820
6488
  }[] | undefined;
6489
+ modelUsed?: string | undefined;
5821
6490
  };
5822
6491
  };
5823
6492
  }>;