@deepintel-ltd/farmpro-contracts 1.2.0 → 1.2.1

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.
@@ -516,5 +516,530 @@ export declare const agentsRouter: {
516
516
  }>;
517
517
  };
518
518
  };
519
+ getConversationHistory: {
520
+ pathParams: z.ZodObject<{
521
+ conversationId: z.ZodString;
522
+ }, "strip", z.ZodTypeAny, {
523
+ conversationId: string;
524
+ }, {
525
+ conversationId: string;
526
+ }>;
527
+ query: z.ZodObject<{
528
+ limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
529
+ }, "strip", z.ZodTypeAny, {
530
+ limit: number;
531
+ }, {
532
+ limit?: number | undefined;
533
+ }>;
534
+ summary: "Get conversation history";
535
+ description: "Retrieve the message history for a specific conversation";
536
+ method: "GET";
537
+ path: "/agents/agronomics/conversations/:conversationId/history";
538
+ responses: {
539
+ 200: z.ZodObject<{
540
+ data: z.ZodObject<{
541
+ type: z.ZodLiteral<string>;
542
+ id: z.ZodString;
543
+ attributes: z.ZodObject<{
544
+ messages: z.ZodArray<z.ZodObject<{
545
+ role: z.ZodEnum<["user", "assistant"]>;
546
+ content: z.ZodString;
547
+ createdAt: z.ZodOptional<z.ZodString>;
548
+ }, "strip", z.ZodTypeAny, {
549
+ role: "user" | "assistant";
550
+ content: string;
551
+ createdAt?: string | undefined;
552
+ }, {
553
+ role: "user" | "assistant";
554
+ content: string;
555
+ createdAt?: string | undefined;
556
+ }>, "many">;
557
+ conversationId: z.ZodString;
558
+ }, "strip", z.ZodTypeAny, {
559
+ conversationId: string;
560
+ messages: {
561
+ role: "user" | "assistant";
562
+ content: string;
563
+ createdAt?: string | undefined;
564
+ }[];
565
+ }, {
566
+ conversationId: string;
567
+ messages: {
568
+ role: "user" | "assistant";
569
+ content: string;
570
+ createdAt?: string | undefined;
571
+ }[];
572
+ }>;
573
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
574
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
575
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
576
+ }, "strip", z.ZodTypeAny, {
577
+ type: string;
578
+ id: string;
579
+ attributes: {
580
+ conversationId: string;
581
+ messages: {
582
+ role: "user" | "assistant";
583
+ content: string;
584
+ createdAt?: string | undefined;
585
+ }[];
586
+ };
587
+ relationships?: Record<string, unknown> | undefined;
588
+ links?: Record<string, string> | undefined;
589
+ meta?: Record<string, unknown> | undefined;
590
+ }, {
591
+ type: string;
592
+ id: string;
593
+ attributes: {
594
+ conversationId: string;
595
+ messages: {
596
+ role: "user" | "assistant";
597
+ content: string;
598
+ createdAt?: string | undefined;
599
+ }[];
600
+ };
601
+ relationships?: Record<string, unknown> | undefined;
602
+ links?: Record<string, string> | undefined;
603
+ meta?: Record<string, unknown> | undefined;
604
+ }>;
605
+ included: z.ZodOptional<z.ZodArray<z.ZodObject<{
606
+ type: z.ZodString;
607
+ id: z.ZodString;
608
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
609
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
610
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
611
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
612
+ }, "strip", z.ZodTypeAny, {
613
+ type: string;
614
+ id: string;
615
+ attributes?: Record<string, unknown> | undefined;
616
+ relationships?: Record<string, unknown> | undefined;
617
+ links?: Record<string, string> | undefined;
618
+ meta?: Record<string, unknown> | undefined;
619
+ }, {
620
+ type: string;
621
+ id: string;
622
+ attributes?: Record<string, unknown> | undefined;
623
+ relationships?: Record<string, unknown> | undefined;
624
+ links?: Record<string, string> | undefined;
625
+ meta?: Record<string, unknown> | undefined;
626
+ }>, "many">>;
627
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
628
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
629
+ }, "strip", z.ZodTypeAny, {
630
+ data: {
631
+ type: string;
632
+ id: string;
633
+ attributes: {
634
+ conversationId: string;
635
+ messages: {
636
+ role: "user" | "assistant";
637
+ content: string;
638
+ createdAt?: string | undefined;
639
+ }[];
640
+ };
641
+ relationships?: Record<string, unknown> | undefined;
642
+ links?: Record<string, string> | undefined;
643
+ meta?: Record<string, unknown> | undefined;
644
+ };
645
+ links?: Record<string, string> | undefined;
646
+ meta?: Record<string, unknown> | undefined;
647
+ included?: {
648
+ type: string;
649
+ id: string;
650
+ attributes?: Record<string, unknown> | undefined;
651
+ relationships?: Record<string, unknown> | undefined;
652
+ links?: Record<string, string> | undefined;
653
+ meta?: Record<string, unknown> | undefined;
654
+ }[] | undefined;
655
+ }, {
656
+ data: {
657
+ type: string;
658
+ id: string;
659
+ attributes: {
660
+ conversationId: string;
661
+ messages: {
662
+ role: "user" | "assistant";
663
+ content: string;
664
+ createdAt?: string | undefined;
665
+ }[];
666
+ };
667
+ relationships?: Record<string, unknown> | undefined;
668
+ links?: Record<string, string> | undefined;
669
+ meta?: Record<string, unknown> | undefined;
670
+ };
671
+ links?: Record<string, string> | undefined;
672
+ meta?: Record<string, unknown> | undefined;
673
+ included?: {
674
+ type: string;
675
+ id: string;
676
+ attributes?: Record<string, unknown> | undefined;
677
+ relationships?: Record<string, unknown> | undefined;
678
+ links?: Record<string, string> | undefined;
679
+ meta?: Record<string, unknown> | undefined;
680
+ }[] | undefined;
681
+ }>;
682
+ 400: z.ZodObject<{
683
+ errors: z.ZodArray<z.ZodObject<{
684
+ id: z.ZodOptional<z.ZodString>;
685
+ links: z.ZodOptional<z.ZodObject<{
686
+ about: z.ZodOptional<z.ZodString>;
687
+ }, "strip", z.ZodTypeAny, {
688
+ about?: string | undefined;
689
+ }, {
690
+ about?: string | undefined;
691
+ }>>;
692
+ status: z.ZodOptional<z.ZodString>;
693
+ code: z.ZodOptional<z.ZodString>;
694
+ title: z.ZodOptional<z.ZodString>;
695
+ detail: z.ZodOptional<z.ZodString>;
696
+ source: z.ZodOptional<z.ZodObject<{
697
+ pointer: z.ZodOptional<z.ZodString>;
698
+ parameter: z.ZodOptional<z.ZodString>;
699
+ }, "strip", z.ZodTypeAny, {
700
+ pointer?: string | undefined;
701
+ parameter?: string | undefined;
702
+ }, {
703
+ pointer?: string | undefined;
704
+ parameter?: string | undefined;
705
+ }>>;
706
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
707
+ }, "strip", z.ZodTypeAny, {
708
+ status?: string | undefined;
709
+ code?: string | undefined;
710
+ id?: string | undefined;
711
+ links?: {
712
+ about?: string | undefined;
713
+ } | undefined;
714
+ meta?: Record<string, unknown> | undefined;
715
+ title?: string | undefined;
716
+ detail?: string | undefined;
717
+ source?: {
718
+ pointer?: string | undefined;
719
+ parameter?: string | undefined;
720
+ } | undefined;
721
+ }, {
722
+ status?: string | undefined;
723
+ code?: string | undefined;
724
+ id?: string | undefined;
725
+ links?: {
726
+ about?: string | undefined;
727
+ } | undefined;
728
+ meta?: Record<string, unknown> | undefined;
729
+ title?: string | undefined;
730
+ detail?: string | undefined;
731
+ source?: {
732
+ pointer?: string | undefined;
733
+ parameter?: string | undefined;
734
+ } | undefined;
735
+ }>, "many">;
736
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
737
+ }, "strip", z.ZodTypeAny, {
738
+ errors: {
739
+ status?: string | undefined;
740
+ code?: string | undefined;
741
+ id?: string | undefined;
742
+ links?: {
743
+ about?: string | undefined;
744
+ } | undefined;
745
+ meta?: Record<string, unknown> | undefined;
746
+ title?: string | undefined;
747
+ detail?: string | undefined;
748
+ source?: {
749
+ pointer?: string | undefined;
750
+ parameter?: string | undefined;
751
+ } | undefined;
752
+ }[];
753
+ meta?: Record<string, unknown> | undefined;
754
+ }, {
755
+ errors: {
756
+ status?: string | undefined;
757
+ code?: string | undefined;
758
+ id?: string | undefined;
759
+ links?: {
760
+ about?: string | undefined;
761
+ } | undefined;
762
+ meta?: Record<string, unknown> | undefined;
763
+ title?: string | undefined;
764
+ detail?: string | undefined;
765
+ source?: {
766
+ pointer?: string | undefined;
767
+ parameter?: string | undefined;
768
+ } | undefined;
769
+ }[];
770
+ meta?: Record<string, unknown> | undefined;
771
+ }>;
772
+ 401: z.ZodObject<{
773
+ errors: z.ZodArray<z.ZodObject<{
774
+ id: z.ZodOptional<z.ZodString>;
775
+ links: z.ZodOptional<z.ZodObject<{
776
+ about: z.ZodOptional<z.ZodString>;
777
+ }, "strip", z.ZodTypeAny, {
778
+ about?: string | undefined;
779
+ }, {
780
+ about?: string | undefined;
781
+ }>>;
782
+ status: z.ZodOptional<z.ZodString>;
783
+ code: z.ZodOptional<z.ZodString>;
784
+ title: z.ZodOptional<z.ZodString>;
785
+ detail: z.ZodOptional<z.ZodString>;
786
+ source: z.ZodOptional<z.ZodObject<{
787
+ pointer: z.ZodOptional<z.ZodString>;
788
+ parameter: z.ZodOptional<z.ZodString>;
789
+ }, "strip", z.ZodTypeAny, {
790
+ pointer?: string | undefined;
791
+ parameter?: string | undefined;
792
+ }, {
793
+ pointer?: string | undefined;
794
+ parameter?: string | undefined;
795
+ }>>;
796
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
797
+ }, "strip", z.ZodTypeAny, {
798
+ status?: string | undefined;
799
+ code?: string | undefined;
800
+ id?: string | undefined;
801
+ links?: {
802
+ about?: string | undefined;
803
+ } | undefined;
804
+ meta?: Record<string, unknown> | undefined;
805
+ title?: string | undefined;
806
+ detail?: string | undefined;
807
+ source?: {
808
+ pointer?: string | undefined;
809
+ parameter?: string | undefined;
810
+ } | undefined;
811
+ }, {
812
+ status?: string | undefined;
813
+ code?: string | undefined;
814
+ id?: string | undefined;
815
+ links?: {
816
+ about?: string | undefined;
817
+ } | undefined;
818
+ meta?: Record<string, unknown> | undefined;
819
+ title?: string | undefined;
820
+ detail?: string | undefined;
821
+ source?: {
822
+ pointer?: string | undefined;
823
+ parameter?: string | undefined;
824
+ } | undefined;
825
+ }>, "many">;
826
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
827
+ }, "strip", z.ZodTypeAny, {
828
+ errors: {
829
+ status?: string | undefined;
830
+ code?: string | undefined;
831
+ id?: string | undefined;
832
+ links?: {
833
+ about?: string | undefined;
834
+ } | undefined;
835
+ meta?: Record<string, unknown> | undefined;
836
+ title?: string | undefined;
837
+ detail?: string | undefined;
838
+ source?: {
839
+ pointer?: string | undefined;
840
+ parameter?: string | undefined;
841
+ } | undefined;
842
+ }[];
843
+ meta?: Record<string, unknown> | undefined;
844
+ }, {
845
+ errors: {
846
+ status?: string | undefined;
847
+ code?: string | undefined;
848
+ id?: string | undefined;
849
+ links?: {
850
+ about?: string | undefined;
851
+ } | undefined;
852
+ meta?: Record<string, unknown> | undefined;
853
+ title?: string | undefined;
854
+ detail?: string | undefined;
855
+ source?: {
856
+ pointer?: string | undefined;
857
+ parameter?: string | undefined;
858
+ } | undefined;
859
+ }[];
860
+ meta?: Record<string, unknown> | undefined;
861
+ }>;
862
+ 404: z.ZodObject<{
863
+ errors: z.ZodArray<z.ZodObject<{
864
+ id: z.ZodOptional<z.ZodString>;
865
+ links: z.ZodOptional<z.ZodObject<{
866
+ about: z.ZodOptional<z.ZodString>;
867
+ }, "strip", z.ZodTypeAny, {
868
+ about?: string | undefined;
869
+ }, {
870
+ about?: string | undefined;
871
+ }>>;
872
+ status: z.ZodOptional<z.ZodString>;
873
+ code: z.ZodOptional<z.ZodString>;
874
+ title: z.ZodOptional<z.ZodString>;
875
+ detail: z.ZodOptional<z.ZodString>;
876
+ source: z.ZodOptional<z.ZodObject<{
877
+ pointer: z.ZodOptional<z.ZodString>;
878
+ parameter: z.ZodOptional<z.ZodString>;
879
+ }, "strip", z.ZodTypeAny, {
880
+ pointer?: string | undefined;
881
+ parameter?: string | undefined;
882
+ }, {
883
+ pointer?: string | undefined;
884
+ parameter?: string | undefined;
885
+ }>>;
886
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
887
+ }, "strip", z.ZodTypeAny, {
888
+ status?: string | undefined;
889
+ code?: string | undefined;
890
+ id?: string | undefined;
891
+ links?: {
892
+ about?: string | undefined;
893
+ } | undefined;
894
+ meta?: Record<string, unknown> | undefined;
895
+ title?: string | undefined;
896
+ detail?: string | undefined;
897
+ source?: {
898
+ pointer?: string | undefined;
899
+ parameter?: string | undefined;
900
+ } | undefined;
901
+ }, {
902
+ status?: string | undefined;
903
+ code?: string | undefined;
904
+ id?: string | undefined;
905
+ links?: {
906
+ about?: string | undefined;
907
+ } | undefined;
908
+ meta?: Record<string, unknown> | undefined;
909
+ title?: string | undefined;
910
+ detail?: string | undefined;
911
+ source?: {
912
+ pointer?: string | undefined;
913
+ parameter?: string | undefined;
914
+ } | undefined;
915
+ }>, "many">;
916
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
917
+ }, "strip", z.ZodTypeAny, {
918
+ errors: {
919
+ status?: string | undefined;
920
+ code?: string | undefined;
921
+ id?: string | undefined;
922
+ links?: {
923
+ about?: string | undefined;
924
+ } | undefined;
925
+ meta?: Record<string, unknown> | undefined;
926
+ title?: string | undefined;
927
+ detail?: string | undefined;
928
+ source?: {
929
+ pointer?: string | undefined;
930
+ parameter?: string | undefined;
931
+ } | undefined;
932
+ }[];
933
+ meta?: Record<string, unknown> | undefined;
934
+ }, {
935
+ errors: {
936
+ status?: string | undefined;
937
+ code?: string | undefined;
938
+ id?: string | undefined;
939
+ links?: {
940
+ about?: string | undefined;
941
+ } | undefined;
942
+ meta?: Record<string, unknown> | undefined;
943
+ title?: string | undefined;
944
+ detail?: string | undefined;
945
+ source?: {
946
+ pointer?: string | undefined;
947
+ parameter?: string | undefined;
948
+ } | undefined;
949
+ }[];
950
+ meta?: Record<string, unknown> | undefined;
951
+ }>;
952
+ 500: z.ZodObject<{
953
+ errors: z.ZodArray<z.ZodObject<{
954
+ id: z.ZodOptional<z.ZodString>;
955
+ links: z.ZodOptional<z.ZodObject<{
956
+ about: z.ZodOptional<z.ZodString>;
957
+ }, "strip", z.ZodTypeAny, {
958
+ about?: string | undefined;
959
+ }, {
960
+ about?: string | undefined;
961
+ }>>;
962
+ status: z.ZodOptional<z.ZodString>;
963
+ code: z.ZodOptional<z.ZodString>;
964
+ title: z.ZodOptional<z.ZodString>;
965
+ detail: z.ZodOptional<z.ZodString>;
966
+ source: z.ZodOptional<z.ZodObject<{
967
+ pointer: z.ZodOptional<z.ZodString>;
968
+ parameter: z.ZodOptional<z.ZodString>;
969
+ }, "strip", z.ZodTypeAny, {
970
+ pointer?: string | undefined;
971
+ parameter?: string | undefined;
972
+ }, {
973
+ pointer?: string | undefined;
974
+ parameter?: string | undefined;
975
+ }>>;
976
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
977
+ }, "strip", z.ZodTypeAny, {
978
+ status?: string | undefined;
979
+ code?: string | undefined;
980
+ id?: string | undefined;
981
+ links?: {
982
+ about?: string | undefined;
983
+ } | undefined;
984
+ meta?: Record<string, unknown> | undefined;
985
+ title?: string | undefined;
986
+ detail?: string | undefined;
987
+ source?: {
988
+ pointer?: string | undefined;
989
+ parameter?: string | undefined;
990
+ } | undefined;
991
+ }, {
992
+ status?: string | undefined;
993
+ code?: string | undefined;
994
+ id?: string | undefined;
995
+ links?: {
996
+ about?: string | undefined;
997
+ } | undefined;
998
+ meta?: Record<string, unknown> | undefined;
999
+ title?: string | undefined;
1000
+ detail?: string | undefined;
1001
+ source?: {
1002
+ pointer?: string | undefined;
1003
+ parameter?: string | undefined;
1004
+ } | undefined;
1005
+ }>, "many">;
1006
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1007
+ }, "strip", z.ZodTypeAny, {
1008
+ errors: {
1009
+ status?: string | undefined;
1010
+ code?: string | undefined;
1011
+ id?: string | undefined;
1012
+ links?: {
1013
+ about?: string | undefined;
1014
+ } | undefined;
1015
+ meta?: Record<string, unknown> | undefined;
1016
+ title?: string | undefined;
1017
+ detail?: string | undefined;
1018
+ source?: {
1019
+ pointer?: string | undefined;
1020
+ parameter?: string | undefined;
1021
+ } | undefined;
1022
+ }[];
1023
+ meta?: Record<string, unknown> | undefined;
1024
+ }, {
1025
+ errors: {
1026
+ status?: string | undefined;
1027
+ code?: string | undefined;
1028
+ id?: string | undefined;
1029
+ links?: {
1030
+ about?: string | undefined;
1031
+ } | undefined;
1032
+ meta?: Record<string, unknown> | undefined;
1033
+ title?: string | undefined;
1034
+ detail?: string | undefined;
1035
+ source?: {
1036
+ pointer?: string | undefined;
1037
+ parameter?: string | undefined;
1038
+ } | undefined;
1039
+ }[];
1040
+ meta?: Record<string, unknown> | undefined;
1041
+ }>;
1042
+ };
1043
+ };
519
1044
  };
520
1045
  //# sourceMappingURL=agents.routes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"agents.routes.d.ts","sourceRoot":"","sources":["../../src/routes/agents.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+CvB,CAAC"}
@@ -33,4 +33,24 @@ exports.agentsRouter = c.router({
33
33
  },
34
34
  },
35
35
  },
36
+ // Get conversation history
37
+ getConversationHistory: {
38
+ method: 'GET',
39
+ path: '/agents/agronomics/conversations/:conversationId/history',
40
+ pathParams: zod_1.z.object({
41
+ conversationId: zod_1.z.string().uuid(),
42
+ }),
43
+ query: zod_1.z.object({
44
+ limit: zod_1.z.coerce.number().int().min(1).max(100).optional().default(50),
45
+ }),
46
+ responses: {
47
+ 200: agents_schemas_1.conversationHistoryResponseSchema,
48
+ 400: common_schemas_1.jsonApiErrorResponseSchema,
49
+ 401: common_schemas_1.jsonApiErrorResponseSchema,
50
+ 404: common_schemas_1.jsonApiErrorResponseSchema,
51
+ 500: common_schemas_1.jsonApiErrorResponseSchema,
52
+ },
53
+ summary: 'Get conversation history',
54
+ description: 'Retrieve the message history for a specific conversation',
55
+ },
36
56
  });
@@ -342,11 +342,265 @@ export declare const agentChatResponseSchema: z.ZodObject<{
342
342
  meta?: Record<string, unknown> | undefined;
343
343
  }[] | undefined;
344
344
  }>;
345
+ export declare const conversationHistoryMessageSchema: z.ZodObject<{
346
+ role: z.ZodEnum<["user", "assistant"]>;
347
+ content: z.ZodString;
348
+ createdAt: z.ZodOptional<z.ZodString>;
349
+ }, "strip", z.ZodTypeAny, {
350
+ role: "user" | "assistant";
351
+ content: string;
352
+ createdAt?: string | undefined;
353
+ }, {
354
+ role: "user" | "assistant";
355
+ content: string;
356
+ createdAt?: string | undefined;
357
+ }>;
358
+ export declare const conversationHistoryAttributesSchema: z.ZodObject<{
359
+ messages: z.ZodArray<z.ZodObject<{
360
+ role: z.ZodEnum<["user", "assistant"]>;
361
+ content: z.ZodString;
362
+ createdAt: z.ZodOptional<z.ZodString>;
363
+ }, "strip", z.ZodTypeAny, {
364
+ role: "user" | "assistant";
365
+ content: string;
366
+ createdAt?: string | undefined;
367
+ }, {
368
+ role: "user" | "assistant";
369
+ content: string;
370
+ createdAt?: string | undefined;
371
+ }>, "many">;
372
+ conversationId: z.ZodString;
373
+ }, "strip", z.ZodTypeAny, {
374
+ conversationId: string;
375
+ messages: {
376
+ role: "user" | "assistant";
377
+ content: string;
378
+ createdAt?: string | undefined;
379
+ }[];
380
+ }, {
381
+ conversationId: string;
382
+ messages: {
383
+ role: "user" | "assistant";
384
+ content: string;
385
+ createdAt?: string | undefined;
386
+ }[];
387
+ }>;
388
+ export declare const conversationHistoryResourceSchema: z.ZodObject<{
389
+ type: z.ZodLiteral<string>;
390
+ id: z.ZodString;
391
+ attributes: z.ZodObject<{
392
+ messages: z.ZodArray<z.ZodObject<{
393
+ role: z.ZodEnum<["user", "assistant"]>;
394
+ content: z.ZodString;
395
+ createdAt: z.ZodOptional<z.ZodString>;
396
+ }, "strip", z.ZodTypeAny, {
397
+ role: "user" | "assistant";
398
+ content: string;
399
+ createdAt?: string | undefined;
400
+ }, {
401
+ role: "user" | "assistant";
402
+ content: string;
403
+ createdAt?: string | undefined;
404
+ }>, "many">;
405
+ conversationId: z.ZodString;
406
+ }, "strip", z.ZodTypeAny, {
407
+ conversationId: string;
408
+ messages: {
409
+ role: "user" | "assistant";
410
+ content: string;
411
+ createdAt?: string | undefined;
412
+ }[];
413
+ }, {
414
+ conversationId: string;
415
+ messages: {
416
+ role: "user" | "assistant";
417
+ content: string;
418
+ createdAt?: string | undefined;
419
+ }[];
420
+ }>;
421
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
422
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
423
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
424
+ }, "strip", z.ZodTypeAny, {
425
+ type: string;
426
+ id: string;
427
+ attributes: {
428
+ conversationId: string;
429
+ messages: {
430
+ role: "user" | "assistant";
431
+ content: string;
432
+ createdAt?: string | undefined;
433
+ }[];
434
+ };
435
+ relationships?: Record<string, unknown> | undefined;
436
+ links?: Record<string, string> | undefined;
437
+ meta?: Record<string, unknown> | undefined;
438
+ }, {
439
+ type: string;
440
+ id: string;
441
+ attributes: {
442
+ conversationId: string;
443
+ messages: {
444
+ role: "user" | "assistant";
445
+ content: string;
446
+ createdAt?: string | undefined;
447
+ }[];
448
+ };
449
+ relationships?: Record<string, unknown> | undefined;
450
+ links?: Record<string, string> | undefined;
451
+ meta?: Record<string, unknown> | undefined;
452
+ }>;
453
+ export declare const conversationHistoryResponseSchema: z.ZodObject<{
454
+ data: z.ZodObject<{
455
+ type: z.ZodLiteral<string>;
456
+ id: z.ZodString;
457
+ attributes: z.ZodObject<{
458
+ messages: z.ZodArray<z.ZodObject<{
459
+ role: z.ZodEnum<["user", "assistant"]>;
460
+ content: z.ZodString;
461
+ createdAt: z.ZodOptional<z.ZodString>;
462
+ }, "strip", z.ZodTypeAny, {
463
+ role: "user" | "assistant";
464
+ content: string;
465
+ createdAt?: string | undefined;
466
+ }, {
467
+ role: "user" | "assistant";
468
+ content: string;
469
+ createdAt?: string | undefined;
470
+ }>, "many">;
471
+ conversationId: z.ZodString;
472
+ }, "strip", z.ZodTypeAny, {
473
+ conversationId: string;
474
+ messages: {
475
+ role: "user" | "assistant";
476
+ content: string;
477
+ createdAt?: string | undefined;
478
+ }[];
479
+ }, {
480
+ conversationId: string;
481
+ messages: {
482
+ role: "user" | "assistant";
483
+ content: string;
484
+ createdAt?: string | undefined;
485
+ }[];
486
+ }>;
487
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
488
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
489
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
490
+ }, "strip", z.ZodTypeAny, {
491
+ type: string;
492
+ id: string;
493
+ attributes: {
494
+ conversationId: string;
495
+ messages: {
496
+ role: "user" | "assistant";
497
+ content: string;
498
+ createdAt?: string | undefined;
499
+ }[];
500
+ };
501
+ relationships?: Record<string, unknown> | undefined;
502
+ links?: Record<string, string> | undefined;
503
+ meta?: Record<string, unknown> | undefined;
504
+ }, {
505
+ type: string;
506
+ id: string;
507
+ attributes: {
508
+ conversationId: string;
509
+ messages: {
510
+ role: "user" | "assistant";
511
+ content: string;
512
+ createdAt?: string | undefined;
513
+ }[];
514
+ };
515
+ relationships?: Record<string, unknown> | undefined;
516
+ links?: Record<string, string> | undefined;
517
+ meta?: Record<string, unknown> | undefined;
518
+ }>;
519
+ included: z.ZodOptional<z.ZodArray<z.ZodObject<{
520
+ type: z.ZodString;
521
+ id: z.ZodString;
522
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
523
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
524
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
525
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
526
+ }, "strip", z.ZodTypeAny, {
527
+ type: string;
528
+ id: string;
529
+ attributes?: Record<string, unknown> | undefined;
530
+ relationships?: Record<string, unknown> | undefined;
531
+ links?: Record<string, string> | undefined;
532
+ meta?: Record<string, unknown> | undefined;
533
+ }, {
534
+ type: string;
535
+ id: string;
536
+ attributes?: Record<string, unknown> | undefined;
537
+ relationships?: Record<string, unknown> | undefined;
538
+ links?: Record<string, string> | undefined;
539
+ meta?: Record<string, unknown> | undefined;
540
+ }>, "many">>;
541
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
542
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
543
+ }, "strip", z.ZodTypeAny, {
544
+ data: {
545
+ type: string;
546
+ id: string;
547
+ attributes: {
548
+ conversationId: string;
549
+ messages: {
550
+ role: "user" | "assistant";
551
+ content: string;
552
+ createdAt?: string | undefined;
553
+ }[];
554
+ };
555
+ relationships?: Record<string, unknown> | undefined;
556
+ links?: Record<string, string> | undefined;
557
+ meta?: Record<string, unknown> | undefined;
558
+ };
559
+ links?: Record<string, string> | undefined;
560
+ meta?: Record<string, unknown> | undefined;
561
+ included?: {
562
+ type: string;
563
+ id: string;
564
+ attributes?: Record<string, unknown> | undefined;
565
+ relationships?: Record<string, unknown> | undefined;
566
+ links?: Record<string, string> | undefined;
567
+ meta?: Record<string, unknown> | undefined;
568
+ }[] | undefined;
569
+ }, {
570
+ data: {
571
+ type: string;
572
+ id: string;
573
+ attributes: {
574
+ conversationId: string;
575
+ messages: {
576
+ role: "user" | "assistant";
577
+ content: string;
578
+ createdAt?: string | undefined;
579
+ }[];
580
+ };
581
+ relationships?: Record<string, unknown> | undefined;
582
+ links?: Record<string, string> | undefined;
583
+ meta?: Record<string, unknown> | undefined;
584
+ };
585
+ links?: Record<string, string> | undefined;
586
+ meta?: Record<string, unknown> | undefined;
587
+ included?: {
588
+ type: string;
589
+ id: string;
590
+ attributes?: Record<string, unknown> | undefined;
591
+ relationships?: Record<string, unknown> | undefined;
592
+ links?: Record<string, string> | undefined;
593
+ meta?: Record<string, unknown> | undefined;
594
+ }[] | undefined;
595
+ }>;
345
596
  export type MessageRole = z.infer<typeof messageRoleSchema>;
346
597
  export type ConversationMessage = z.infer<typeof conversationMessageSchema>;
598
+ export type ConversationHistoryMessage = z.infer<typeof conversationHistoryMessageSchema>;
347
599
  export type ToolCallResult = z.infer<typeof toolCallResultSchema>;
348
600
  export type ChatRequestAttributes = z.infer<typeof chatRequestAttributesSchema>;
349
601
  export type ChatRequestInput = z.infer<typeof chatRequestSchema>;
350
602
  export type AgentChatResponseAttributes = z.infer<typeof agentChatResponseAttributesSchema>;
351
603
  export type AgentChatResponse = z.infer<typeof agentChatResponseSchema>;
604
+ export type ConversationHistoryAttributes = z.infer<typeof conversationHistoryAttributesSchema>;
605
+ export type ConversationHistoryResponse = z.infer<typeof conversationHistoryResponseSchema>;
352
606
  //# sourceMappingURL=agents.schemas.d.ts.map
@@ -1 +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,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C,OAAO,mCAAmC,CAAC,CAAC;AAChG,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
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;
3
+ exports.conversationHistoryResponseSchema = exports.conversationHistoryResourceSchema = exports.conversationHistoryAttributesSchema = exports.conversationHistoryMessageSchema = exports.agentChatResponseSchema = exports.agentChatResponseResourceSchema = exports.agentChatResponseAttributesSchema = exports.chatRequestSchema = exports.chatRequestAttributesSchema = exports.toolCallResultSchema = exports.conversationMessageSchema = exports.messageRoleSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const common_schemas_1 = require("./common.schemas");
6
6
  /**
@@ -40,3 +40,18 @@ exports.agentChatResponseAttributesSchema = zod_1.z.object({
40
40
  exports.agentChatResponseResourceSchema = (0, common_schemas_1.createJsonApiResourceSchema)('agent-chat-responses', exports.agentChatResponseAttributesSchema);
41
41
  // Agent chat response (JSON:API single response)
42
42
  exports.agentChatResponseSchema = (0, common_schemas_1.jsonApiSingleResponseSchema)(exports.agentChatResponseResourceSchema);
43
+ // Conversation history message schema (with timestamp)
44
+ exports.conversationHistoryMessageSchema = zod_1.z.object({
45
+ role: exports.messageRoleSchema,
46
+ content: zod_1.z.string(),
47
+ createdAt: zod_1.z.string().datetime().optional(),
48
+ });
49
+ // Conversation history response attributes
50
+ exports.conversationHistoryAttributesSchema = zod_1.z.object({
51
+ messages: zod_1.z.array(exports.conversationHistoryMessageSchema),
52
+ conversationId: zod_1.z.string().uuid(),
53
+ });
54
+ // Conversation history resource
55
+ exports.conversationHistoryResourceSchema = (0, common_schemas_1.createJsonApiResourceSchema)('conversation-histories', exports.conversationHistoryAttributesSchema);
56
+ // Conversation history response
57
+ exports.conversationHistoryResponseSchema = (0, common_schemas_1.jsonApiSingleResponseSchema)(exports.conversationHistoryResourceSchema);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepintel-ltd/farmpro-contracts",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Type-safe API contracts for FarmPro API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",