@badger_badger/badger_hq 1.5.1 → 1.7.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.
@@ -59,6 +59,17 @@ type SourceRoute = z.infer<typeof SourceRoute>;
59
59
  declare const SOURCE_STATUS_VALUES: readonly ["active", "paused", "closed", "access_problem"];
60
60
  declare const SourceStatus: z.ZodEnum<["active", "paused", "closed", "access_problem"]>;
61
61
  type SourceStatus = z.infer<typeof SourceStatus>;
62
+ /**
63
+ * Why a person has to collect a source instead of a scraper. Set on a Monitor task's `target`.
64
+ * `no_collector` = the org has no scraper for the platform; `collector_full` = it has one but no free slot.
65
+ */
66
+ declare const ACCESS_ISSUE_VALUES: readonly ["login_required", "private", "bot_detection", "captcha", "geo_blocked", "rate_limited", "not_found", "no_collector", "collector_full", "other"];
67
+ declare const AccessIssue: z.ZodEnum<["login_required", "private", "bot_detection", "captcha", "geo_blocked", "rate_limited", "not_found", "no_collector", "collector_full", "other"]>;
68
+ type AccessIssue = z.infer<typeof AccessIssue>;
69
+ /** How a Monitor task's capture window is given: the last N days, or a fixed range. */
70
+ declare const CAPTURE_WINDOW_MODE_VALUES: readonly ["last_days", "range"];
71
+ declare const CaptureWindowMode: z.ZodEnum<["last_days", "range"]>;
72
+ type CaptureWindowMode = z.infer<typeof CaptureWindowMode>;
62
73
  declare const DISCOVERED_BY_TYPE_VALUES: readonly ["scout", "analyst", "agent", "client", "import"];
63
74
  declare const DiscoveredByType: z.ZodEnum<["scout", "analyst", "agent", "client", "import"]>;
64
75
  type DiscoveredByType = z.infer<typeof DiscoveredByType>;
@@ -113,6 +124,10 @@ type AgentSourceOutcome = z.infer<typeof AgentSourceOutcome>;
113
124
  declare const CAPTURE_STATUS_VALUES: readonly ["uploaded", "analyzing", "analyzed", "failed", "expired"];
114
125
  declare const CaptureStatus: z.ZodEnum<["uploaded", "analyzing", "analyzed", "failed", "expired"]>;
115
126
  type CaptureStatus = z.infer<typeof CaptureStatus>;
127
+ /** How an hours log was made: entered by the person, or worked out from their capture times. */
128
+ declare const HOURS_LOG_SOURCE_VALUES: readonly ["manual", "inferred"];
129
+ declare const HoursLogSource: z.ZodEnum<["manual", "inferred"]>;
130
+ type HoursLogSource = z.infer<typeof HoursLogSource>;
116
131
  /** Whether the read-only DOM text snapshot accompanied the screenshot. */
117
132
  declare const CAPTURE_DOM_STATUS_VALUES: readonly ["ok", "unavailable", "truncated"];
118
133
  declare const CaptureDomStatus: z.ZodEnum<["ok", "unavailable", "truncated"]>;
@@ -627,6 +642,66 @@ declare const TaskSchema: z.ZodObject<{
627
642
  } | undefined;
628
643
  emergency?: boolean | undefined;
629
644
  }>;
645
+ /** Monitor: the one source to collect. Discovery: optional source to search inside. */
646
+ target: z.ZodOptional<z.ZodObject<{
647
+ sourceId: z.ZodOptional<z.ZodString>;
648
+ platform: z.ZodEnum<["telegram", "facebook", "x", "tiktok", "instagram", "youtube", "whatsapp", "reddit", "discord", "linkedin", "threads", "vk", "snapchat", "web"]>;
649
+ url: z.ZodEffects<z.ZodString, string, string>;
650
+ label: z.ZodOptional<z.ZodString>;
651
+ accessIssue: z.ZodOptional<z.ZodEnum<["login_required", "private", "bot_detection", "captcha", "geo_blocked", "rate_limited", "not_found", "no_collector", "collector_full", "other"]>>;
652
+ note: z.ZodOptional<z.ZodString>;
653
+ }, "strip", z.ZodTypeAny, {
654
+ platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
655
+ url: string;
656
+ sourceId?: string | undefined;
657
+ label?: string | undefined;
658
+ accessIssue?: "login_required" | "private" | "bot_detection" | "captcha" | "geo_blocked" | "rate_limited" | "not_found" | "no_collector" | "collector_full" | "other" | undefined;
659
+ note?: string | undefined;
660
+ }, {
661
+ platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
662
+ url: string;
663
+ sourceId?: string | undefined;
664
+ label?: string | undefined;
665
+ accessIssue?: "login_required" | "private" | "bot_detection" | "captcha" | "geo_blocked" | "rate_limited" | "not_found" | "no_collector" | "collector_full" | "other" | undefined;
666
+ note?: string | undefined;
667
+ }>>;
668
+ /** Monitor: what to capture (last N days, or a fixed range). */
669
+ captureWindow: z.ZodOptional<z.ZodEffects<z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
670
+ mode: z.ZodLiteral<"last_days">;
671
+ days: z.ZodNumber;
672
+ }, "strip", z.ZodTypeAny, {
673
+ mode: "last_days";
674
+ days: number;
675
+ }, {
676
+ mode: "last_days";
677
+ days: number;
678
+ }>, z.ZodObject<{
679
+ mode: z.ZodLiteral<"range">;
680
+ start: z.ZodPipeline<z.ZodUnion<[z.ZodDate, z.ZodString]>, z.ZodDate>;
681
+ end: z.ZodPipeline<z.ZodUnion<[z.ZodDate, z.ZodString]>, z.ZodDate>;
682
+ }, "strip", z.ZodTypeAny, {
683
+ start: Date;
684
+ end: Date;
685
+ mode: "range";
686
+ }, {
687
+ start: string | Date;
688
+ end: string | Date;
689
+ mode: "range";
690
+ }>]>, {
691
+ mode: "last_days";
692
+ days: number;
693
+ } | {
694
+ start: Date;
695
+ end: Date;
696
+ mode: "range";
697
+ }, {
698
+ mode: "last_days";
699
+ days: number;
700
+ } | {
701
+ start: string | Date;
702
+ end: string | Date;
703
+ mode: "range";
704
+ }>>;
630
705
  status: z.ZodDefault<z.ZodEnum<["draft", "pending_approval", "approved", "in_progress", "paused", "done"]>>;
631
706
  approvedBy: z.ZodOptional<z.ZodString>;
632
707
  approvedAt: z.ZodOptional<z.ZodDate>;
@@ -667,6 +742,22 @@ declare const TaskSchema: z.ZodObject<{
667
742
  };
668
743
  version: number;
669
744
  deletedAt?: Date | undefined;
745
+ target?: {
746
+ platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
747
+ url: string;
748
+ sourceId?: string | undefined;
749
+ label?: string | undefined;
750
+ accessIssue?: "login_required" | "private" | "bot_detection" | "captcha" | "geo_blocked" | "rate_limited" | "not_found" | "no_collector" | "collector_full" | "other" | undefined;
751
+ note?: string | undefined;
752
+ } | undefined;
753
+ captureWindow?: {
754
+ mode: "last_days";
755
+ days: number;
756
+ } | {
757
+ start: Date;
758
+ end: Date;
759
+ mode: "range";
760
+ } | undefined;
670
761
  approvedBy?: string | undefined;
671
762
  approvedAt?: Date | undefined;
672
763
  doneBy?: string | undefined;
@@ -697,6 +788,22 @@ declare const TaskSchema: z.ZodObject<{
697
788
  deletedAt?: Date | undefined;
698
789
  keywords?: string[] | undefined;
699
790
  searchQueries?: string[] | undefined;
791
+ target?: {
792
+ platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
793
+ url: string;
794
+ sourceId?: string | undefined;
795
+ label?: string | undefined;
796
+ accessIssue?: "login_required" | "private" | "bot_detection" | "captcha" | "geo_blocked" | "rate_limited" | "not_found" | "no_collector" | "collector_full" | "other" | undefined;
797
+ note?: string | undefined;
798
+ } | undefined;
799
+ captureWindow?: {
800
+ mode: "last_days";
801
+ days: number;
802
+ } | {
803
+ start: string | Date;
804
+ end: string | Date;
805
+ mode: "range";
806
+ } | undefined;
700
807
  approvedBy?: string | undefined;
701
808
  approvedAt?: Date | undefined;
702
809
  doneBy?: string | undefined;
@@ -760,6 +867,66 @@ declare const TaskCreateSchema: z.ZodObject<Omit<{
760
867
  } | undefined;
761
868
  emergency?: boolean | undefined;
762
869
  }>;
870
+ /** Monitor: the one source to collect. Discovery: optional source to search inside. */
871
+ target: z.ZodOptional<z.ZodObject<{
872
+ sourceId: z.ZodOptional<z.ZodString>;
873
+ platform: z.ZodEnum<["telegram", "facebook", "x", "tiktok", "instagram", "youtube", "whatsapp", "reddit", "discord", "linkedin", "threads", "vk", "snapchat", "web"]>;
874
+ url: z.ZodEffects<z.ZodString, string, string>;
875
+ label: z.ZodOptional<z.ZodString>;
876
+ accessIssue: z.ZodOptional<z.ZodEnum<["login_required", "private", "bot_detection", "captcha", "geo_blocked", "rate_limited", "not_found", "no_collector", "collector_full", "other"]>>;
877
+ note: z.ZodOptional<z.ZodString>;
878
+ }, "strip", z.ZodTypeAny, {
879
+ platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
880
+ url: string;
881
+ sourceId?: string | undefined;
882
+ label?: string | undefined;
883
+ accessIssue?: "login_required" | "private" | "bot_detection" | "captcha" | "geo_blocked" | "rate_limited" | "not_found" | "no_collector" | "collector_full" | "other" | undefined;
884
+ note?: string | undefined;
885
+ }, {
886
+ platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
887
+ url: string;
888
+ sourceId?: string | undefined;
889
+ label?: string | undefined;
890
+ accessIssue?: "login_required" | "private" | "bot_detection" | "captcha" | "geo_blocked" | "rate_limited" | "not_found" | "no_collector" | "collector_full" | "other" | undefined;
891
+ note?: string | undefined;
892
+ }>>;
893
+ /** Monitor: what to capture (last N days, or a fixed range). */
894
+ captureWindow: z.ZodOptional<z.ZodEffects<z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
895
+ mode: z.ZodLiteral<"last_days">;
896
+ days: z.ZodNumber;
897
+ }, "strip", z.ZodTypeAny, {
898
+ mode: "last_days";
899
+ days: number;
900
+ }, {
901
+ mode: "last_days";
902
+ days: number;
903
+ }>, z.ZodObject<{
904
+ mode: z.ZodLiteral<"range">;
905
+ start: z.ZodPipeline<z.ZodUnion<[z.ZodDate, z.ZodString]>, z.ZodDate>;
906
+ end: z.ZodPipeline<z.ZodUnion<[z.ZodDate, z.ZodString]>, z.ZodDate>;
907
+ }, "strip", z.ZodTypeAny, {
908
+ start: Date;
909
+ end: Date;
910
+ mode: "range";
911
+ }, {
912
+ start: string | Date;
913
+ end: string | Date;
914
+ mode: "range";
915
+ }>]>, {
916
+ mode: "last_days";
917
+ days: number;
918
+ } | {
919
+ start: Date;
920
+ end: Date;
921
+ mode: "range";
922
+ }, {
923
+ mode: "last_days";
924
+ days: number;
925
+ } | {
926
+ start: string | Date;
927
+ end: string | Date;
928
+ mode: "range";
929
+ }>>;
763
930
  status: z.ZodDefault<z.ZodEnum<["draft", "pending_approval", "approved", "in_progress", "paused", "done"]>>;
764
931
  approvedBy: z.ZodOptional<z.ZodString>;
765
932
  approvedAt: z.ZodOptional<z.ZodDate>;
@@ -794,6 +961,22 @@ declare const TaskCreateSchema: z.ZodObject<Omit<{
794
961
  end: Date;
795
962
  } | undefined;
796
963
  };
964
+ target?: {
965
+ platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
966
+ url: string;
967
+ sourceId?: string | undefined;
968
+ label?: string | undefined;
969
+ accessIssue?: "login_required" | "private" | "bot_detection" | "captcha" | "geo_blocked" | "rate_limited" | "not_found" | "no_collector" | "collector_full" | "other" | undefined;
970
+ note?: string | undefined;
971
+ } | undefined;
972
+ captureWindow?: {
973
+ mode: "last_days";
974
+ days: number;
975
+ } | {
976
+ start: Date;
977
+ end: Date;
978
+ mode: "range";
979
+ } | undefined;
797
980
  }, {
798
981
  title: string;
799
982
  description: string;
@@ -815,6 +998,22 @@ declare const TaskCreateSchema: z.ZodObject<Omit<{
815
998
  status?: "draft" | "paused" | "pending_approval" | "approved" | "in_progress" | "done" | undefined;
816
999
  keywords?: string[] | undefined;
817
1000
  searchQueries?: string[] | undefined;
1001
+ target?: {
1002
+ platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
1003
+ url: string;
1004
+ sourceId?: string | undefined;
1005
+ label?: string | undefined;
1006
+ accessIssue?: "login_required" | "private" | "bot_detection" | "captcha" | "geo_blocked" | "rate_limited" | "not_found" | "no_collector" | "collector_full" | "other" | undefined;
1007
+ note?: string | undefined;
1008
+ } | undefined;
1009
+ captureWindow?: {
1010
+ mode: "last_days";
1011
+ days: number;
1012
+ } | {
1013
+ start: string | Date;
1014
+ end: string | Date;
1015
+ mode: "range";
1016
+ } | undefined;
818
1017
  }>;
819
1018
  declare const TaskUpdateSchema: z.ZodObject<{
820
1019
  status: z.ZodOptional<z.ZodDefault<z.ZodEnum<["draft", "pending_approval", "approved", "in_progress", "paused", "done"]>>>;
@@ -871,6 +1070,64 @@ declare const TaskUpdateSchema: z.ZodObject<{
871
1070
  } | undefined;
872
1071
  emergency?: boolean | undefined;
873
1072
  }>>;
1073
+ target: z.ZodOptional<z.ZodOptional<z.ZodObject<{
1074
+ sourceId: z.ZodOptional<z.ZodString>;
1075
+ platform: z.ZodEnum<["telegram", "facebook", "x", "tiktok", "instagram", "youtube", "whatsapp", "reddit", "discord", "linkedin", "threads", "vk", "snapchat", "web"]>;
1076
+ url: z.ZodEffects<z.ZodString, string, string>;
1077
+ label: z.ZodOptional<z.ZodString>;
1078
+ accessIssue: z.ZodOptional<z.ZodEnum<["login_required", "private", "bot_detection", "captcha", "geo_blocked", "rate_limited", "not_found", "no_collector", "collector_full", "other"]>>;
1079
+ note: z.ZodOptional<z.ZodString>;
1080
+ }, "strip", z.ZodTypeAny, {
1081
+ platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
1082
+ url: string;
1083
+ sourceId?: string | undefined;
1084
+ label?: string | undefined;
1085
+ accessIssue?: "login_required" | "private" | "bot_detection" | "captcha" | "geo_blocked" | "rate_limited" | "not_found" | "no_collector" | "collector_full" | "other" | undefined;
1086
+ note?: string | undefined;
1087
+ }, {
1088
+ platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
1089
+ url: string;
1090
+ sourceId?: string | undefined;
1091
+ label?: string | undefined;
1092
+ accessIssue?: "login_required" | "private" | "bot_detection" | "captcha" | "geo_blocked" | "rate_limited" | "not_found" | "no_collector" | "collector_full" | "other" | undefined;
1093
+ note?: string | undefined;
1094
+ }>>>;
1095
+ captureWindow: z.ZodOptional<z.ZodOptional<z.ZodEffects<z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
1096
+ mode: z.ZodLiteral<"last_days">;
1097
+ days: z.ZodNumber;
1098
+ }, "strip", z.ZodTypeAny, {
1099
+ mode: "last_days";
1100
+ days: number;
1101
+ }, {
1102
+ mode: "last_days";
1103
+ days: number;
1104
+ }>, z.ZodObject<{
1105
+ mode: z.ZodLiteral<"range">;
1106
+ start: z.ZodPipeline<z.ZodUnion<[z.ZodDate, z.ZodString]>, z.ZodDate>;
1107
+ end: z.ZodPipeline<z.ZodUnion<[z.ZodDate, z.ZodString]>, z.ZodDate>;
1108
+ }, "strip", z.ZodTypeAny, {
1109
+ start: Date;
1110
+ end: Date;
1111
+ mode: "range";
1112
+ }, {
1113
+ start: string | Date;
1114
+ end: string | Date;
1115
+ mode: "range";
1116
+ }>]>, {
1117
+ mode: "last_days";
1118
+ days: number;
1119
+ } | {
1120
+ start: Date;
1121
+ end: Date;
1122
+ mode: "range";
1123
+ }, {
1124
+ mode: "last_days";
1125
+ days: number;
1126
+ } | {
1127
+ start: string | Date;
1128
+ end: string | Date;
1129
+ mode: "range";
1130
+ }>>>;
874
1131
  }, "strip", z.ZodTypeAny, {
875
1132
  status?: "draft" | "paused" | "pending_approval" | "approved" | "in_progress" | "done" | undefined;
876
1133
  title?: string | undefined;
@@ -892,6 +1149,22 @@ declare const TaskUpdateSchema: z.ZodObject<{
892
1149
  end: Date;
893
1150
  } | undefined;
894
1151
  } | undefined;
1152
+ target?: {
1153
+ platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
1154
+ url: string;
1155
+ sourceId?: string | undefined;
1156
+ label?: string | undefined;
1157
+ accessIssue?: "login_required" | "private" | "bot_detection" | "captcha" | "geo_blocked" | "rate_limited" | "not_found" | "no_collector" | "collector_full" | "other" | undefined;
1158
+ note?: string | undefined;
1159
+ } | undefined;
1160
+ captureWindow?: {
1161
+ mode: "last_days";
1162
+ days: number;
1163
+ } | {
1164
+ start: Date;
1165
+ end: Date;
1166
+ mode: "range";
1167
+ } | undefined;
895
1168
  }, {
896
1169
  status?: "draft" | "paused" | "pending_approval" | "approved" | "in_progress" | "done" | undefined;
897
1170
  title?: string | undefined;
@@ -913,6 +1186,22 @@ declare const TaskUpdateSchema: z.ZodObject<{
913
1186
  } | undefined;
914
1187
  emergency?: boolean | undefined;
915
1188
  } | undefined;
1189
+ target?: {
1190
+ platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
1191
+ url: string;
1192
+ sourceId?: string | undefined;
1193
+ label?: string | undefined;
1194
+ accessIssue?: "login_required" | "private" | "bot_detection" | "captcha" | "geo_blocked" | "rate_limited" | "not_found" | "no_collector" | "collector_full" | "other" | undefined;
1195
+ note?: string | undefined;
1196
+ } | undefined;
1197
+ captureWindow?: {
1198
+ mode: "last_days";
1199
+ days: number;
1200
+ } | {
1201
+ start: string | Date;
1202
+ end: string | Date;
1203
+ mode: "range";
1204
+ } | undefined;
916
1205
  }>;
917
1206
  type Task = z.infer<typeof TaskSchema>;
918
1207
  type TaskCreate = z.infer<typeof TaskCreateSchema>;
@@ -1048,7 +1337,10 @@ type AssignmentCreate = z.infer<typeof AssignmentCreateSchema>;
1048
1337
  type AssignmentCreateInput = z.input<typeof AssignmentCreateSchema>;
1049
1338
  type AssignmentUpdate = z.infer<typeof AssignmentUpdateSchema>;
1050
1339
 
1051
- /** Scout hours, logged from the Chrome extension. */
1340
+ /**
1341
+ * Scout hours. `manual` rows were confirmed by the person; `inferred` rows are worked out by
1342
+ * agent-service from their capture times, one row per person + assignment + day.
1343
+ */
1052
1344
  declare const HoursLogSchema: z.ZodObject<{
1053
1345
  _id: z.ZodString;
1054
1346
  orgId: z.ZodString;
@@ -1057,6 +1349,8 @@ declare const HoursLogSchema: z.ZodObject<{
1057
1349
  minutes: z.ZodNumber;
1058
1350
  note: z.ZodString;
1059
1351
  date: z.ZodDate;
1352
+ assignmentId: z.ZodOptional<z.ZodString>;
1353
+ source: z.ZodOptional<z.ZodEnum<["manual", "inferred"]>>;
1060
1354
  } & {
1061
1355
  createdAt: z.ZodDate;
1062
1356
  updatedAt: z.ZodDate;
@@ -1068,22 +1362,26 @@ declare const HoursLogSchema: z.ZodObject<{
1068
1362
  _id: string;
1069
1363
  orgId: string;
1070
1364
  date: Date;
1365
+ note: string;
1071
1366
  taskId: string;
1072
1367
  scoutUserId: string;
1073
1368
  minutes: number;
1074
- note: string;
1075
1369
  deletedAt?: Date | undefined;
1370
+ source?: "manual" | "inferred" | undefined;
1371
+ assignmentId?: string | undefined;
1076
1372
  }, {
1077
1373
  createdAt: Date;
1078
1374
  updatedAt: Date;
1079
1375
  _id: string;
1080
1376
  orgId: string;
1081
1377
  date: Date;
1378
+ note: string;
1082
1379
  taskId: string;
1083
1380
  scoutUserId: string;
1084
1381
  minutes: number;
1085
- note: string;
1086
1382
  deletedAt?: Date | undefined;
1383
+ source?: "manual" | "inferred" | undefined;
1384
+ assignmentId?: string | undefined;
1087
1385
  }>;
1088
1386
  declare const HoursLogCreateSchema: z.ZodObject<Omit<{
1089
1387
  _id: z.ZodString;
@@ -1093,6 +1391,8 @@ declare const HoursLogCreateSchema: z.ZodObject<Omit<{
1093
1391
  minutes: z.ZodNumber;
1094
1392
  note: z.ZodString;
1095
1393
  date: z.ZodDate;
1394
+ assignmentId: z.ZodOptional<z.ZodString>;
1395
+ source: z.ZodOptional<z.ZodEnum<["manual", "inferred"]>>;
1096
1396
  } & {
1097
1397
  createdAt: z.ZodDate;
1098
1398
  updatedAt: z.ZodDate;
@@ -1100,30 +1400,40 @@ declare const HoursLogCreateSchema: z.ZodObject<Omit<{
1100
1400
  deletedAt: z.ZodOptional<z.ZodDate>;
1101
1401
  }, "createdAt" | "updatedAt" | "deletedAt" | "_id" | "orgId" | "scoutUserId">, "strip", z.ZodTypeAny, {
1102
1402
  date: Date;
1403
+ note: string;
1103
1404
  taskId: string;
1104
1405
  minutes: number;
1105
- note: string;
1406
+ source?: "manual" | "inferred" | undefined;
1407
+ assignmentId?: string | undefined;
1106
1408
  }, {
1107
1409
  date: Date;
1410
+ note: string;
1108
1411
  taskId: string;
1109
1412
  minutes: number;
1110
- note: string;
1413
+ source?: "manual" | "inferred" | undefined;
1414
+ assignmentId?: string | undefined;
1111
1415
  }>;
1112
1416
  declare const HoursLogUpdateSchema: z.ZodObject<{
1113
1417
  date: z.ZodOptional<z.ZodDate>;
1418
+ note: z.ZodOptional<z.ZodString>;
1114
1419
  taskId: z.ZodOptional<z.ZodString>;
1420
+ source: z.ZodOptional<z.ZodOptional<z.ZodEnum<["manual", "inferred"]>>>;
1115
1421
  minutes: z.ZodOptional<z.ZodNumber>;
1116
- note: z.ZodOptional<z.ZodString>;
1422
+ assignmentId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1117
1423
  }, "strip", z.ZodTypeAny, {
1118
1424
  date?: Date | undefined;
1425
+ note?: string | undefined;
1119
1426
  taskId?: string | undefined;
1427
+ source?: "manual" | "inferred" | undefined;
1120
1428
  minutes?: number | undefined;
1121
- note?: string | undefined;
1429
+ assignmentId?: string | undefined;
1122
1430
  }, {
1123
1431
  date?: Date | undefined;
1432
+ note?: string | undefined;
1124
1433
  taskId?: string | undefined;
1434
+ source?: "manual" | "inferred" | undefined;
1125
1435
  minutes?: number | undefined;
1126
- note?: string | undefined;
1436
+ assignmentId?: string | undefined;
1127
1437
  }>;
1128
1438
  type HoursLog = z.infer<typeof HoursLogSchema>;
1129
1439
  type HoursLogCreate = z.infer<typeof HoursLogCreateSchema>;
@@ -1266,25 +1576,25 @@ declare const ScoutProfileSchema: z.ZodObject<{
1266
1576
  platform: z.ZodEnum<["telegram", "facebook", "x", "tiktok", "instagram", "youtube", "whatsapp", "reddit", "discord", "linkedin", "threads", "vk", "snapchat", "web"]>;
1267
1577
  note: z.ZodString;
1268
1578
  }, "strip", z.ZodTypeAny, {
1269
- note: string;
1270
1579
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
1271
- }, {
1272
1580
  note: string;
1581
+ }, {
1273
1582
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
1583
+ note: string;
1274
1584
  }>, "many">>;
1275
1585
  }, "strip", z.ZodTypeAny, {
1276
1586
  platforms: ("telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web")[];
1277
1587
  all: boolean;
1278
1588
  special: {
1279
- note: string;
1280
1589
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
1590
+ note: string;
1281
1591
  }[];
1282
1592
  }, {
1283
1593
  platforms?: ("telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web")[] | undefined;
1284
1594
  all?: boolean | undefined;
1285
1595
  special?: {
1286
- note: string;
1287
1596
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
1597
+ note: string;
1288
1598
  }[] | undefined;
1289
1599
  }>>;
1290
1600
  profession: z.ZodOptional<z.ZodString>;
@@ -1311,8 +1621,8 @@ declare const ScoutProfileSchema: z.ZodObject<{
1311
1621
  platforms: ("telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web")[];
1312
1622
  all: boolean;
1313
1623
  special: {
1314
- note: string;
1315
1624
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
1625
+ note: string;
1316
1626
  }[];
1317
1627
  };
1318
1628
  userId: string;
@@ -1357,8 +1667,8 @@ declare const ScoutProfileSchema: z.ZodObject<{
1357
1667
  platforms?: ("telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web")[] | undefined;
1358
1668
  all?: boolean | undefined;
1359
1669
  special?: {
1360
- note: string;
1361
1670
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
1671
+ note: string;
1362
1672
  }[] | undefined;
1363
1673
  } | undefined;
1364
1674
  taskLimit?: number | undefined;
@@ -1403,25 +1713,25 @@ declare const ScoutProfileCreateSchema: z.ZodObject<{
1403
1713
  platform: z.ZodEnum<["telegram", "facebook", "x", "tiktok", "instagram", "youtube", "whatsapp", "reddit", "discord", "linkedin", "threads", "vk", "snapchat", "web"]>;
1404
1714
  note: z.ZodString;
1405
1715
  }, "strip", z.ZodTypeAny, {
1406
- note: string;
1407
1716
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
1408
- }, {
1409
1717
  note: string;
1718
+ }, {
1410
1719
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
1720
+ note: string;
1411
1721
  }>, "many">>;
1412
1722
  }, "strip", z.ZodTypeAny, {
1413
1723
  platforms: ("telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web")[];
1414
1724
  all: boolean;
1415
1725
  special: {
1416
- note: string;
1417
1726
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
1727
+ note: string;
1418
1728
  }[];
1419
1729
  }, {
1420
1730
  platforms?: ("telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web")[] | undefined;
1421
1731
  all?: boolean | undefined;
1422
1732
  special?: {
1423
- note: string;
1424
1733
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
1734
+ note: string;
1425
1735
  }[] | undefined;
1426
1736
  }>>;
1427
1737
  taskLimit: z.ZodOptional<z.ZodNumber>;
@@ -1461,8 +1771,8 @@ declare const ScoutProfileCreateSchema: z.ZodObject<{
1461
1771
  platforms: ("telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web")[];
1462
1772
  all: boolean;
1463
1773
  special: {
1464
- note: string;
1465
1774
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
1775
+ note: string;
1466
1776
  }[];
1467
1777
  };
1468
1778
  email: string;
@@ -1494,8 +1804,8 @@ declare const ScoutProfileCreateSchema: z.ZodObject<{
1494
1804
  platforms?: ("telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web")[] | undefined;
1495
1805
  all?: boolean | undefined;
1496
1806
  special?: {
1497
- note: string;
1498
1807
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
1808
+ note: string;
1499
1809
  }[] | undefined;
1500
1810
  } | undefined;
1501
1811
  taskLimit?: number | undefined;
@@ -1532,25 +1842,25 @@ declare const ScoutProfileUpdateSchema: z.ZodObject<{
1532
1842
  platform: z.ZodEnum<["telegram", "facebook", "x", "tiktok", "instagram", "youtube", "whatsapp", "reddit", "discord", "linkedin", "threads", "vk", "snapchat", "web"]>;
1533
1843
  note: z.ZodString;
1534
1844
  }, "strip", z.ZodTypeAny, {
1535
- note: string;
1536
1845
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
1537
- }, {
1538
1846
  note: string;
1847
+ }, {
1539
1848
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
1849
+ note: string;
1540
1850
  }>, "many">>;
1541
1851
  }, "strip", z.ZodTypeAny, {
1542
1852
  platforms: ("telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web")[];
1543
1853
  all: boolean;
1544
1854
  special: {
1545
- note: string;
1546
1855
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
1856
+ note: string;
1547
1857
  }[];
1548
1858
  }, {
1549
1859
  platforms?: ("telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web")[] | undefined;
1550
1860
  all?: boolean | undefined;
1551
1861
  special?: {
1552
- note: string;
1553
1862
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
1863
+ note: string;
1554
1864
  }[] | undefined;
1555
1865
  }>>>;
1556
1866
  taskLimit: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
@@ -1590,8 +1900,8 @@ declare const ScoutProfileUpdateSchema: z.ZodObject<{
1590
1900
  platforms: ("telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web")[];
1591
1901
  all: boolean;
1592
1902
  special: {
1593
- note: string;
1594
1903
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
1904
+ note: string;
1595
1905
  }[];
1596
1906
  } | undefined;
1597
1907
  taskLimit?: number | undefined;
@@ -1619,8 +1929,8 @@ declare const ScoutProfileUpdateSchema: z.ZodObject<{
1619
1929
  platforms?: ("telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web")[] | undefined;
1620
1930
  all?: boolean | undefined;
1621
1931
  special?: {
1622
- note: string;
1623
1932
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
1933
+ note: string;
1624
1934
  }[] | undefined;
1625
1935
  } | undefined;
1626
1936
  taskLimit?: number | undefined;
@@ -1714,25 +2024,25 @@ declare const AnalystProfileSchema: z.ZodObject<{
1714
2024
  platform: z.ZodEnum<["telegram", "facebook", "x", "tiktok", "instagram", "youtube", "whatsapp", "reddit", "discord", "linkedin", "threads", "vk", "snapchat", "web"]>;
1715
2025
  note: z.ZodString;
1716
2026
  }, "strip", z.ZodTypeAny, {
1717
- note: string;
1718
2027
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
1719
- }, {
1720
2028
  note: string;
2029
+ }, {
1721
2030
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
2031
+ note: string;
1722
2032
  }>, "many">>;
1723
2033
  }, "strip", z.ZodTypeAny, {
1724
2034
  platforms: ("telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web")[];
1725
2035
  all: boolean;
1726
2036
  special: {
1727
- note: string;
1728
2037
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
2038
+ note: string;
1729
2039
  }[];
1730
2040
  }, {
1731
2041
  platforms?: ("telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web")[] | undefined;
1732
2042
  all?: boolean | undefined;
1733
2043
  special?: {
1734
- note: string;
1735
2044
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
2045
+ note: string;
1736
2046
  }[] | undefined;
1737
2047
  }>>;
1738
2048
  profession: z.ZodOptional<z.ZodString>;
@@ -1759,8 +2069,8 @@ declare const AnalystProfileSchema: z.ZodObject<{
1759
2069
  platforms: ("telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web")[];
1760
2070
  all: boolean;
1761
2071
  special: {
1762
- note: string;
1763
2072
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
2073
+ note: string;
1764
2074
  }[];
1765
2075
  };
1766
2076
  userId: string;
@@ -1789,8 +2099,8 @@ declare const AnalystProfileSchema: z.ZodObject<{
1789
2099
  platforms?: ("telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web")[] | undefined;
1790
2100
  all?: boolean | undefined;
1791
2101
  special?: {
1792
- note: string;
1793
2102
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
2103
+ note: string;
1794
2104
  }[] | undefined;
1795
2105
  } | undefined;
1796
2106
  taskLimit?: number | undefined;
@@ -1820,25 +2130,25 @@ declare const AnalystProfileUpdateSchema: z.ZodObject<{
1820
2130
  platform: z.ZodEnum<["telegram", "facebook", "x", "tiktok", "instagram", "youtube", "whatsapp", "reddit", "discord", "linkedin", "threads", "vk", "snapchat", "web"]>;
1821
2131
  note: z.ZodString;
1822
2132
  }, "strip", z.ZodTypeAny, {
1823
- note: string;
1824
2133
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
1825
- }, {
1826
2134
  note: string;
2135
+ }, {
1827
2136
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
2137
+ note: string;
1828
2138
  }>, "many">>;
1829
2139
  }, "strip", z.ZodTypeAny, {
1830
2140
  platforms: ("telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web")[];
1831
2141
  all: boolean;
1832
2142
  special: {
1833
- note: string;
1834
2143
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
2144
+ note: string;
1835
2145
  }[];
1836
2146
  }, {
1837
2147
  platforms?: ("telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web")[] | undefined;
1838
2148
  all?: boolean | undefined;
1839
2149
  special?: {
1840
- note: string;
1841
2150
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
2151
+ note: string;
1842
2152
  }[] | undefined;
1843
2153
  }>>>;
1844
2154
  profession: z.ZodOptional<z.ZodOptional<z.ZodString>>;
@@ -1857,8 +2167,8 @@ declare const AnalystProfileUpdateSchema: z.ZodObject<{
1857
2167
  platforms: ("telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web")[];
1858
2168
  all: boolean;
1859
2169
  special: {
1860
- note: string;
1861
2170
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
2171
+ note: string;
1862
2172
  }[];
1863
2173
  } | undefined;
1864
2174
  taskLimit?: number | undefined;
@@ -1876,8 +2186,8 @@ declare const AnalystProfileUpdateSchema: z.ZodObject<{
1876
2186
  platforms?: ("telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web")[] | undefined;
1877
2187
  all?: boolean | undefined;
1878
2188
  special?: {
1879
- note: string;
1880
2189
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
2190
+ note: string;
1881
2191
  }[] | undefined;
1882
2192
  } | undefined;
1883
2193
  taskLimit?: number | undefined;
@@ -2105,6 +2415,8 @@ declare const SourceSchema: z.ZodObject<{
2105
2415
  }>;
2106
2416
  lastCollectedAt: z.ZodOptional<z.ZodDate>;
2107
2417
  nextVisitAt: z.ZodOptional<z.ZodDate>;
2418
+ /** Activity-based wait set by the last visit, before current urgency (see `effectiveDueAt`). */
2419
+ visitIntervalMs: z.ZodOptional<z.ZodNumber>;
2108
2420
  } & {
2109
2421
  createdAt: z.ZodDate;
2110
2422
  updatedAt: z.ZodDate;
@@ -2119,10 +2431,10 @@ declare const SourceSchema: z.ZodObject<{
2119
2431
  orgId: string;
2120
2432
  databaseId: string;
2121
2433
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
2434
+ url: string;
2122
2435
  tags: string[];
2123
2436
  missionIds: string[];
2124
2437
  taskIds: string[];
2125
- url: string;
2126
2438
  access: "public" | "gated";
2127
2439
  route: "monitor" | "scraper" | "waiting_for_scraper";
2128
2440
  discoveredBy: {
@@ -2140,6 +2452,7 @@ declare const SourceSchema: z.ZodObject<{
2140
2452
  } | undefined;
2141
2453
  lastCollectedAt?: Date | undefined;
2142
2454
  nextVisitAt?: Date | undefined;
2455
+ visitIntervalMs?: number | undefined;
2143
2456
  }, {
2144
2457
  type: "channel" | "group" | "profile" | "forum" | "site";
2145
2458
  createdAt: Date;
@@ -2170,6 +2483,7 @@ declare const SourceSchema: z.ZodObject<{
2170
2483
  } | undefined;
2171
2484
  lastCollectedAt?: Date | undefined;
2172
2485
  nextVisitAt?: Date | undefined;
2486
+ visitIntervalMs?: number | undefined;
2173
2487
  }>;
2174
2488
  declare const SourceCreateSchema: z.ZodObject<Omit<{
2175
2489
  _id: z.ZodString;
@@ -2214,19 +2528,21 @@ declare const SourceCreateSchema: z.ZodObject<Omit<{
2214
2528
  }>;
2215
2529
  lastCollectedAt: z.ZodOptional<z.ZodDate>;
2216
2530
  nextVisitAt: z.ZodOptional<z.ZodDate>;
2531
+ /** Activity-based wait set by the last visit, before current urgency (see `effectiveDueAt`). */
2532
+ visitIntervalMs: z.ZodOptional<z.ZodNumber>;
2217
2533
  } & {
2218
2534
  createdAt: z.ZodDate;
2219
2535
  updatedAt: z.ZodDate;
2220
2536
  } & {
2221
2537
  deletedAt: z.ZodOptional<z.ZodDate>;
2222
- }, "createdAt" | "updatedAt" | "deletedAt" | "_id" | "orgId" | "databaseId" | "discoveredBy" | "lastCollectedAt">, "strip", z.ZodTypeAny, {
2538
+ }, "createdAt" | "updatedAt" | "deletedAt" | "_id" | "orgId" | "databaseId" | "discoveredBy" | "lastCollectedAt" | "visitIntervalMs">, "strip", z.ZodTypeAny, {
2223
2539
  type: "channel" | "group" | "profile" | "forum" | "site";
2224
2540
  status: "active" | "paused" | "closed" | "access_problem";
2225
2541
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
2542
+ url: string;
2226
2543
  tags: string[];
2227
2544
  missionIds: string[];
2228
2545
  taskIds: string[];
2229
- url: string;
2230
2546
  access: "public" | "gated";
2231
2547
  route: "monitor" | "scraper" | "waiting_for_scraper";
2232
2548
  handle?: string | undefined;
@@ -2260,10 +2576,10 @@ declare const SourceUpdateSchema: z.ZodObject<{
2260
2576
  type: z.ZodOptional<z.ZodEnum<["channel", "group", "profile", "forum", "site"]>>;
2261
2577
  status: z.ZodOptional<z.ZodDefault<z.ZodEnum<["active", "paused", "closed", "access_problem"]>>>;
2262
2578
  platform: z.ZodOptional<z.ZodEnum<["telegram", "facebook", "x", "tiktok", "instagram", "youtube", "whatsapp", "reddit", "discord", "linkedin", "threads", "vk", "snapchat", "web"]>>;
2579
+ url: z.ZodOptional<z.ZodString>;
2263
2580
  tags: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
2264
2581
  missionIds: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
2265
2582
  taskIds: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
2266
- url: z.ZodOptional<z.ZodString>;
2267
2583
  handle: z.ZodOptional<z.ZodOptional<z.ZodString>>;
2268
2584
  access: z.ZodOptional<z.ZodEnum<["public", "gated"]>>;
2269
2585
  route: z.ZodOptional<z.ZodEnum<["scraper", "monitor", "waiting_for_scraper"]>>;
@@ -2286,10 +2602,10 @@ declare const SourceUpdateSchema: z.ZodObject<{
2286
2602
  type?: "channel" | "group" | "profile" | "forum" | "site" | undefined;
2287
2603
  status?: "active" | "paused" | "closed" | "access_problem" | undefined;
2288
2604
  platform?: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web" | undefined;
2605
+ url?: string | undefined;
2289
2606
  tags?: string[] | undefined;
2290
2607
  missionIds?: string[] | undefined;
2291
2608
  taskIds?: string[] | undefined;
2292
- url?: string | undefined;
2293
2609
  handle?: string | undefined;
2294
2610
  access?: "public" | "gated" | undefined;
2295
2611
  route?: "monitor" | "scraper" | "waiting_for_scraper" | undefined;
@@ -2304,10 +2620,10 @@ declare const SourceUpdateSchema: z.ZodObject<{
2304
2620
  type?: "channel" | "group" | "profile" | "forum" | "site" | undefined;
2305
2621
  status?: "active" | "paused" | "closed" | "access_problem" | undefined;
2306
2622
  platform?: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web" | undefined;
2623
+ url?: string | undefined;
2307
2624
  tags?: string[] | undefined;
2308
2625
  missionIds?: string[] | undefined;
2309
2626
  taskIds?: string[] | undefined;
2310
- url?: string | undefined;
2311
2627
  handle?: string | undefined;
2312
2628
  access?: "public" | "gated" | undefined;
2313
2629
  route?: "monitor" | "scraper" | "waiting_for_scraper" | undefined;
@@ -2650,9 +2966,9 @@ declare const DataItemSchema: z.ZodObject<{
2650
2966
  _id: string;
2651
2967
  orgId: string;
2652
2968
  databaseId: string;
2969
+ sourceId: string;
2653
2970
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
2654
2971
  missionIds: string[];
2655
- sourceId: string;
2656
2972
  collectedAt: Date;
2657
2973
  collector: {
2658
2974
  type: "scout" | "analyst" | "scraper" | "agent";
@@ -2683,8 +2999,8 @@ declare const DataItemSchema: z.ZodObject<{
2683
2999
  _id: string;
2684
3000
  orgId: string;
2685
3001
  databaseId: string;
2686
- platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
2687
3002
  sourceId: string;
3003
+ platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
2688
3004
  collectedAt: Date;
2689
3005
  collector: {
2690
3006
  type: "scout" | "analyst" | "scraper" | "agent";
@@ -2782,9 +3098,9 @@ declare const DataItemCreateSchema: z.ZodObject<Omit<{
2782
3098
  createdAt: z.ZodDate;
2783
3099
  updatedAt: z.ZodDate;
2784
3100
  }, "createdAt" | "updatedAt" | "_id" | "orgId" | "databaseId">, "strip", z.ZodTypeAny, {
3101
+ sourceId: string;
2785
3102
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
2786
3103
  missionIds: string[];
2787
- sourceId: string;
2788
3104
  collectedAt: Date;
2789
3105
  collector: {
2790
3106
  type: "scout" | "analyst" | "scraper" | "agent";
@@ -2810,8 +3126,8 @@ declare const DataItemCreateSchema: z.ZodObject<Omit<{
2810
3126
  priorityFlag?: boolean | undefined;
2811
3127
  contentHash?: string | undefined;
2812
3128
  }, {
2813
- platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
2814
3129
  sourceId: string;
3130
+ platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
2815
3131
  collectedAt: Date;
2816
3132
  collector: {
2817
3133
  type: "scout" | "analyst" | "scraper" | "agent";
@@ -2839,10 +3155,10 @@ declare const DataItemCreateSchema: z.ZodObject<Omit<{
2839
3155
  contentHash?: string | undefined;
2840
3156
  }>;
2841
3157
  declare const DataItemUpdateSchema: z.ZodObject<{
2842
- taskId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
3158
+ sourceId: z.ZodOptional<z.ZodString>;
2843
3159
  platform: z.ZodOptional<z.ZodEnum<["telegram", "facebook", "x", "tiktok", "instagram", "youtube", "whatsapp", "reddit", "discord", "linkedin", "threads", "vk", "snapchat", "web"]>>;
3160
+ taskId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
2844
3161
  missionIds: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
2845
- sourceId: z.ZodOptional<z.ZodString>;
2846
3162
  collectedAt: z.ZodOptional<z.ZodDate>;
2847
3163
  publishedAt: z.ZodOptional<z.ZodOptional<z.ZodDate>>;
2848
3164
  collector: z.ZodOptional<z.ZodObject<{
@@ -2898,10 +3214,10 @@ declare const DataItemUpdateSchema: z.ZodObject<{
2898
3214
  priorityFlag: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
2899
3215
  contentHash: z.ZodOptional<z.ZodOptional<z.ZodString>>;
2900
3216
  }, "strip", z.ZodTypeAny, {
2901
- taskId?: string | undefined;
3217
+ sourceId?: string | undefined;
2902
3218
  platform?: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web" | undefined;
3219
+ taskId?: string | undefined;
2903
3220
  missionIds?: string[] | undefined;
2904
- sourceId?: string | undefined;
2905
3221
  collectedAt?: Date | undefined;
2906
3222
  publishedAt?: Date | undefined;
2907
3223
  collector?: {
@@ -2926,10 +3242,10 @@ declare const DataItemUpdateSchema: z.ZodObject<{
2926
3242
  priorityFlag?: boolean | undefined;
2927
3243
  contentHash?: string | undefined;
2928
3244
  }, {
2929
- taskId?: string | undefined;
3245
+ sourceId?: string | undefined;
2930
3246
  platform?: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web" | undefined;
3247
+ taskId?: string | undefined;
2931
3248
  missionIds?: string[] | undefined;
2932
- sourceId?: string | undefined;
2933
3249
  collectedAt?: Date | undefined;
2934
3250
  publishedAt?: Date | undefined;
2935
3251
  collector?: {
@@ -2983,8 +3299,8 @@ declare const ScraperSchema: z.ZodObject<{
2983
3299
  _id: string;
2984
3300
  orgId: string;
2985
3301
  name: string;
2986
- version: string;
2987
3302
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
3303
+ version: string;
2988
3304
  sourceLimit: number;
2989
3305
  sourceCount: number;
2990
3306
  deletedAt?: Date | undefined;
@@ -2995,8 +3311,8 @@ declare const ScraperSchema: z.ZodObject<{
2995
3311
  _id: string;
2996
3312
  orgId: string;
2997
3313
  name: string;
2998
- version: string;
2999
3314
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
3315
+ version: string;
3000
3316
  sourceLimit: number;
3001
3317
  status?: "failed" | "deploying" | "running" | "degraded" | "stopped" | undefined;
3002
3318
  deletedAt?: Date | undefined;
@@ -3022,29 +3338,29 @@ declare const ScraperCreateSchema: z.ZodObject<Omit<{
3022
3338
  deletedAt: z.ZodOptional<z.ZodDate>;
3023
3339
  }, "status" | "createdAt" | "updatedAt" | "deletedAt" | "_id" | "orgId" | "sourceCount" | "deploymentId">, "strip", z.ZodTypeAny, {
3024
3340
  name: string;
3025
- version: string;
3026
3341
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
3342
+ version: string;
3027
3343
  sourceLimit: number;
3028
3344
  }, {
3029
3345
  name: string;
3030
- version: string;
3031
3346
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
3347
+ version: string;
3032
3348
  sourceLimit: number;
3033
3349
  }>;
3034
3350
  declare const ScraperUpdateSchema: z.ZodObject<{
3035
3351
  name: z.ZodOptional<z.ZodString>;
3036
- version: z.ZodOptional<z.ZodString>;
3037
3352
  platform: z.ZodOptional<z.ZodEnum<["telegram", "facebook", "x", "tiktok", "instagram", "youtube", "whatsapp", "reddit", "discord", "linkedin", "threads", "vk", "snapchat", "web"]>>;
3353
+ version: z.ZodOptional<z.ZodString>;
3038
3354
  sourceLimit: z.ZodOptional<z.ZodNumber>;
3039
3355
  }, "strip", z.ZodTypeAny, {
3040
3356
  name?: string | undefined;
3041
- version?: string | undefined;
3042
3357
  platform?: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web" | undefined;
3358
+ version?: string | undefined;
3043
3359
  sourceLimit?: number | undefined;
3044
3360
  }, {
3045
3361
  name?: string | undefined;
3046
- version?: string | undefined;
3047
3362
  platform?: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web" | undefined;
3363
+ version?: string | undefined;
3048
3364
  sourceLimit?: number | undefined;
3049
3365
  }>;
3050
3366
  type Scraper = z.infer<typeof ScraperSchema>;
@@ -3301,13 +3617,13 @@ declare const AuditLogSchema: z.ZodObject<{
3301
3617
  createdAt: Date;
3302
3618
  updatedAt: Date;
3303
3619
  _id: string;
3304
- actorUserId: string;
3305
- actingAsSystem: boolean;
3306
- action: string;
3307
3620
  target: {
3308
3621
  type: string;
3309
3622
  id: string;
3310
3623
  };
3624
+ actorUserId: string;
3625
+ actingAsSystem: boolean;
3626
+ action: string;
3311
3627
  deletedAt?: Date | undefined;
3312
3628
  orgId?: string | undefined;
3313
3629
  diff?: unknown;
@@ -3316,12 +3632,12 @@ declare const AuditLogSchema: z.ZodObject<{
3316
3632
  createdAt: Date;
3317
3633
  updatedAt: Date;
3318
3634
  _id: string;
3319
- actorUserId: string;
3320
- action: string;
3321
3635
  target: {
3322
3636
  type: string;
3323
3637
  id: string;
3324
3638
  };
3639
+ actorUserId: string;
3640
+ action: string;
3325
3641
  deletedAt?: Date | undefined;
3326
3642
  orgId?: string | undefined;
3327
3643
  actingAsSystem?: boolean | undefined;
@@ -3351,25 +3667,23 @@ declare const AuditLogCreateSchema: z.ZodObject<Omit<{
3351
3667
  } & {
3352
3668
  deletedAt: z.ZodOptional<z.ZodDate>;
3353
3669
  }, "at" | "createdAt" | "updatedAt" | "deletedAt" | "_id" | "orgId" | "actorUserId">, "strip", z.ZodTypeAny, {
3354
- actingAsSystem: boolean;
3355
- action: string;
3356
3670
  target: {
3357
3671
  type: string;
3358
3672
  id: string;
3359
3673
  };
3674
+ actingAsSystem: boolean;
3675
+ action: string;
3360
3676
  diff?: unknown;
3361
3677
  }, {
3362
- action: string;
3363
3678
  target: {
3364
3679
  type: string;
3365
3680
  id: string;
3366
3681
  };
3682
+ action: string;
3367
3683
  actingAsSystem?: boolean | undefined;
3368
3684
  diff?: unknown;
3369
3685
  }>;
3370
3686
  declare const AuditLogUpdateSchema: z.ZodObject<{
3371
- actingAsSystem: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
3372
- action: z.ZodOptional<z.ZodString>;
3373
3687
  target: z.ZodOptional<z.ZodObject<{
3374
3688
  type: z.ZodString;
3375
3689
  id: z.ZodString;
@@ -3380,22 +3694,24 @@ declare const AuditLogUpdateSchema: z.ZodObject<{
3380
3694
  type: string;
3381
3695
  id: string;
3382
3696
  }>>;
3697
+ actingAsSystem: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
3698
+ action: z.ZodOptional<z.ZodString>;
3383
3699
  diff: z.ZodOptional<z.ZodOptional<z.ZodUnknown>>;
3384
3700
  }, "strip", z.ZodTypeAny, {
3385
- actingAsSystem?: boolean | undefined;
3386
- action?: string | undefined;
3387
3701
  target?: {
3388
3702
  type: string;
3389
3703
  id: string;
3390
3704
  } | undefined;
3391
- diff?: unknown;
3392
- }, {
3393
3705
  actingAsSystem?: boolean | undefined;
3394
3706
  action?: string | undefined;
3395
- target?: {
3707
+ diff?: unknown;
3708
+ }, {
3709
+ target?: {
3396
3710
  type: string;
3397
3711
  id: string;
3398
3712
  } | undefined;
3713
+ actingAsSystem?: boolean | undefined;
3714
+ action?: string | undefined;
3399
3715
  diff?: unknown;
3400
3716
  }>;
3401
3717
  type AuditLog = z.infer<typeof AuditLogSchema>;
@@ -3515,6 +3831,23 @@ declare const AgentSessionSchema: z.ZodObject<{
3515
3831
  tokens?: number | undefined;
3516
3832
  costUsd?: number | undefined;
3517
3833
  }>>;
3834
+ /** The task's capture window as dates, fixed when the session started (`last_days` counted back from then). */
3835
+ captureWindow: z.ZodOptional<z.ZodEffects<z.ZodObject<{
3836
+ start: z.ZodDate;
3837
+ end: z.ZodDate;
3838
+ }, "strip", z.ZodTypeAny, {
3839
+ start: Date;
3840
+ end: Date;
3841
+ }, {
3842
+ start: Date;
3843
+ end: Date;
3844
+ }>, {
3845
+ start: Date;
3846
+ end: Date;
3847
+ }, {
3848
+ start: Date;
3849
+ end: Date;
3850
+ }>>;
3518
3851
  /** Mode-specific engine state (search plan cursor, monitor queue). Opaque to clients. */
3519
3852
  state: z.ZodOptional<z.ZodUnknown>;
3520
3853
  } & {
@@ -3526,11 +3859,11 @@ declare const AgentSessionSchema: z.ZodObject<{
3526
3859
  updatedAt: Date;
3527
3860
  _id: string;
3528
3861
  orgId: string;
3862
+ mode: "monitor" | "discovery";
3529
3863
  missionId: string;
3530
3864
  taskId: string;
3531
- userId: string;
3532
3865
  assignmentId: string;
3533
- mode: "monitor" | "discovery";
3866
+ userId: string;
3534
3867
  startedAt: Date;
3535
3868
  lastActivityAt: Date;
3536
3869
  activeMinutes: number;
@@ -3552,6 +3885,10 @@ declare const AgentSessionSchema: z.ZodObject<{
3552
3885
  tokens: number;
3553
3886
  costUsd: number;
3554
3887
  };
3888
+ captureWindow?: {
3889
+ start: Date;
3890
+ end: Date;
3891
+ } | undefined;
3555
3892
  endedAt?: Date | undefined;
3556
3893
  state?: unknown;
3557
3894
  }, {
@@ -3559,14 +3896,18 @@ declare const AgentSessionSchema: z.ZodObject<{
3559
3896
  updatedAt: Date;
3560
3897
  _id: string;
3561
3898
  orgId: string;
3899
+ mode: "monitor" | "discovery";
3562
3900
  missionId: string;
3563
3901
  taskId: string;
3564
- userId: string;
3565
3902
  assignmentId: string;
3566
- mode: "monitor" | "discovery";
3903
+ userId: string;
3567
3904
  startedAt: Date;
3568
3905
  lastActivityAt: Date;
3569
3906
  status?: "active" | "paused" | "ended" | undefined;
3907
+ captureWindow?: {
3908
+ start: Date;
3909
+ end: Date;
3910
+ } | undefined;
3570
3911
  endedAt?: Date | undefined;
3571
3912
  activeMinutes?: number | undefined;
3572
3913
  lastSeq?: number | undefined;
@@ -3652,6 +3993,23 @@ declare const AgentSessionCreateSchema: z.ZodObject<Omit<{
3652
3993
  tokens?: number | undefined;
3653
3994
  costUsd?: number | undefined;
3654
3995
  }>>;
3996
+ /** The task's capture window as dates, fixed when the session started (`last_days` counted back from then). */
3997
+ captureWindow: z.ZodOptional<z.ZodEffects<z.ZodObject<{
3998
+ start: z.ZodDate;
3999
+ end: z.ZodDate;
4000
+ }, "strip", z.ZodTypeAny, {
4001
+ start: Date;
4002
+ end: Date;
4003
+ }, {
4004
+ start: Date;
4005
+ end: Date;
4006
+ }>, {
4007
+ start: Date;
4008
+ end: Date;
4009
+ }, {
4010
+ start: Date;
4011
+ end: Date;
4012
+ }>>;
3655
4013
  /** Mode-specific engine state (search plan cursor, monitor queue). Opaque to clients. */
3656
4014
  state: z.ZodOptional<z.ZodUnknown>;
3657
4015
  } & {
@@ -3659,11 +4017,11 @@ declare const AgentSessionCreateSchema: z.ZodObject<Omit<{
3659
4017
  updatedAt: z.ZodDate;
3660
4018
  }, "createdAt" | "updatedAt" | "_id" | "orgId">, "strip", z.ZodTypeAny, {
3661
4019
  status: "active" | "paused" | "ended";
4020
+ mode: "monitor" | "discovery";
3662
4021
  missionId: string;
3663
4022
  taskId: string;
3664
- userId: string;
3665
4023
  assignmentId: string;
3666
- mode: "monitor" | "discovery";
4024
+ userId: string;
3667
4025
  startedAt: Date;
3668
4026
  lastActivityAt: Date;
3669
4027
  activeMinutes: number;
@@ -3685,17 +4043,25 @@ declare const AgentSessionCreateSchema: z.ZodObject<Omit<{
3685
4043
  tokens: number;
3686
4044
  costUsd: number;
3687
4045
  };
4046
+ captureWindow?: {
4047
+ start: Date;
4048
+ end: Date;
4049
+ } | undefined;
3688
4050
  endedAt?: Date | undefined;
3689
4051
  state?: unknown;
3690
4052
  }, {
4053
+ mode: "monitor" | "discovery";
3691
4054
  missionId: string;
3692
4055
  taskId: string;
3693
- userId: string;
3694
4056
  assignmentId: string;
3695
- mode: "monitor" | "discovery";
4057
+ userId: string;
3696
4058
  startedAt: Date;
3697
4059
  lastActivityAt: Date;
3698
4060
  status?: "active" | "paused" | "ended" | undefined;
4061
+ captureWindow?: {
4062
+ start: Date;
4063
+ end: Date;
4064
+ } | undefined;
3699
4065
  endedAt?: Date | undefined;
3700
4066
  activeMinutes?: number | undefined;
3701
4067
  lastSeq?: number | undefined;
@@ -3720,12 +4086,28 @@ declare const AgentSessionCreateSchema: z.ZodObject<Omit<{
3720
4086
  }>;
3721
4087
  declare const AgentSessionUpdateSchema: z.ZodObject<{
3722
4088
  status: z.ZodOptional<z.ZodDefault<z.ZodEnum<["active", "paused", "ended"]>>>;
4089
+ mode: z.ZodOptional<z.ZodEnum<["discovery", "monitor"]>>;
3723
4090
  missionId: z.ZodOptional<z.ZodString>;
4091
+ captureWindow: z.ZodOptional<z.ZodOptional<z.ZodEffects<z.ZodObject<{
4092
+ start: z.ZodDate;
4093
+ end: z.ZodDate;
4094
+ }, "strip", z.ZodTypeAny, {
4095
+ start: Date;
4096
+ end: Date;
4097
+ }, {
4098
+ start: Date;
4099
+ end: Date;
4100
+ }>, {
4101
+ start: Date;
4102
+ end: Date;
4103
+ }, {
4104
+ start: Date;
4105
+ end: Date;
4106
+ }>>>;
3724
4107
  taskId: z.ZodOptional<z.ZodString>;
3725
4108
  endedAt: z.ZodOptional<z.ZodOptional<z.ZodDate>>;
3726
- userId: z.ZodOptional<z.ZodString>;
3727
4109
  assignmentId: z.ZodOptional<z.ZodString>;
3728
- mode: z.ZodOptional<z.ZodEnum<["discovery", "monitor"]>>;
4110
+ userId: z.ZodOptional<z.ZodString>;
3729
4111
  startedAt: z.ZodOptional<z.ZodDate>;
3730
4112
  lastActivityAt: z.ZodOptional<z.ZodDate>;
3731
4113
  activeMinutes: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
@@ -3780,12 +4162,16 @@ declare const AgentSessionUpdateSchema: z.ZodObject<{
3780
4162
  state: z.ZodOptional<z.ZodOptional<z.ZodUnknown>>;
3781
4163
  }, "strip", z.ZodTypeAny, {
3782
4164
  status?: "active" | "paused" | "ended" | undefined;
4165
+ mode?: "monitor" | "discovery" | undefined;
3783
4166
  missionId?: string | undefined;
4167
+ captureWindow?: {
4168
+ start: Date;
4169
+ end: Date;
4170
+ } | undefined;
3784
4171
  taskId?: string | undefined;
3785
4172
  endedAt?: Date | undefined;
3786
- userId?: string | undefined;
3787
4173
  assignmentId?: string | undefined;
3788
- mode?: "monitor" | "discovery" | undefined;
4174
+ userId?: string | undefined;
3789
4175
  startedAt?: Date | undefined;
3790
4176
  lastActivityAt?: Date | undefined;
3791
4177
  activeMinutes?: number | undefined;
@@ -3810,12 +4196,16 @@ declare const AgentSessionUpdateSchema: z.ZodObject<{
3810
4196
  state?: unknown;
3811
4197
  }, {
3812
4198
  status?: "active" | "paused" | "ended" | undefined;
4199
+ mode?: "monitor" | "discovery" | undefined;
3813
4200
  missionId?: string | undefined;
4201
+ captureWindow?: {
4202
+ start: Date;
4203
+ end: Date;
4204
+ } | undefined;
3814
4205
  taskId?: string | undefined;
3815
4206
  endedAt?: Date | undefined;
3816
- userId?: string | undefined;
3817
4207
  assignmentId?: string | undefined;
3818
- mode?: "monitor" | "discovery" | undefined;
4208
+ userId?: string | undefined;
3819
4209
  startedAt?: Date | undefined;
3820
4210
  lastActivityAt?: Date | undefined;
3821
4211
  activeMinutes?: number | undefined;
@@ -3850,14 +4240,14 @@ declare const OpenLinkCardSchema: z.ZodObject<{
3850
4240
  label: z.ZodString;
3851
4241
  platform: z.ZodOptional<z.ZodEnum<["telegram", "facebook", "x", "tiktok", "instagram", "youtube", "whatsapp", "reddit", "discord", "linkedin", "threads", "vk", "snapchat", "web"]>>;
3852
4242
  }, "strip", z.ZodTypeAny, {
3853
- kind: "open_link";
3854
4243
  url: string;
3855
4244
  label: string;
4245
+ kind: "open_link";
3856
4246
  platform?: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web" | undefined;
3857
4247
  }, {
3858
- kind: "open_link";
3859
4248
  url: string;
3860
4249
  label: string;
4250
+ kind: "open_link";
3861
4251
  platform?: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web" | undefined;
3862
4252
  }>;
3863
4253
  declare const CapturePromptCardSchema: z.ZodObject<{
@@ -3880,20 +4270,20 @@ declare const SourceResultCardSchema: z.ZodObject<{
3880
4270
  score: z.ZodOptional<z.ZodNumber>;
3881
4271
  }, "strip", z.ZodTypeAny, {
3882
4272
  name: string;
3883
- kind: "source_result";
3884
4273
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
4274
+ kind: "source_result";
3885
4275
  outcome: "waiting_for_scraper" | "access_problem" | "to_scraper" | "to_monitor" | "known" | "dropped";
3886
4276
  reason: string;
3887
- score?: number | undefined;
3888
4277
  url?: string | undefined;
4278
+ score?: number | undefined;
3889
4279
  }, {
3890
4280
  name: string;
3891
- kind: "source_result";
3892
4281
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
4282
+ kind: "source_result";
3893
4283
  outcome: "waiting_for_scraper" | "access_problem" | "to_scraper" | "to_monitor" | "known" | "dropped";
3894
4284
  reason: string;
3895
- score?: number | undefined;
3896
4285
  url?: string | undefined;
4286
+ score?: number | undefined;
3897
4287
  }>;
3898
4288
  declare const ItemResultCardSchema: z.ZodObject<{
3899
4289
  kind: z.ZodLiteral<"item_result">;
@@ -3902,15 +4292,15 @@ declare const ItemResultCardSchema: z.ZodObject<{
3902
4292
  priority: z.ZodBoolean;
3903
4293
  publishedAt: z.ZodOptional<z.ZodDate>;
3904
4294
  }, "strip", z.ZodTypeAny, {
4295
+ platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
3905
4296
  priority: boolean;
3906
4297
  kind: "item_result";
3907
- platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
3908
4298
  excerpt: string;
3909
4299
  publishedAt?: Date | undefined;
3910
4300
  }, {
4301
+ platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
3911
4302
  priority: boolean;
3912
4303
  kind: "item_result";
3913
- platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
3914
4304
  excerpt: string;
3915
4305
  publishedAt?: Date | undefined;
3916
4306
  }>;
@@ -3918,11 +4308,11 @@ declare const QuickReplyOptionSchema: z.ZodObject<{
3918
4308
  id: z.ZodString;
3919
4309
  label: z.ZodString;
3920
4310
  }, "strip", z.ZodTypeAny, {
3921
- id: string;
3922
4311
  label: string;
3923
- }, {
3924
4312
  id: string;
4313
+ }, {
3925
4314
  label: string;
4315
+ id: string;
3926
4316
  }>;
3927
4317
  type QuickReplyOption = z.infer<typeof QuickReplyOptionSchema>;
3928
4318
  declare const QuickRepliesCardSchema: z.ZodObject<{
@@ -3932,23 +4322,23 @@ declare const QuickRepliesCardSchema: z.ZodObject<{
3932
4322
  id: z.ZodString;
3933
4323
  label: z.ZodString;
3934
4324
  }, "strip", z.ZodTypeAny, {
3935
- id: string;
3936
4325
  label: string;
3937
- }, {
3938
4326
  id: string;
4327
+ }, {
3939
4328
  label: string;
4329
+ id: string;
3940
4330
  }>, "many">;
3941
4331
  }, "strip", z.ZodTypeAny, {
3942
4332
  options: {
3943
- id: string;
3944
4333
  label: string;
4334
+ id: string;
3945
4335
  }[];
3946
4336
  kind: "quick_replies";
3947
4337
  questionId: string;
3948
4338
  }, {
3949
4339
  options: {
3950
- id: string;
3951
4340
  label: string;
4341
+ id: string;
3952
4342
  }[];
3953
4343
  kind: "quick_replies";
3954
4344
  questionId: string;
@@ -3958,13 +4348,13 @@ declare const HoursProposalCardSchema: z.ZodObject<{
3958
4348
  minutes: z.ZodNumber;
3959
4349
  note: z.ZodString;
3960
4350
  }, "strip", z.ZodTypeAny, {
4351
+ note: string;
3961
4352
  kind: "hours_proposal";
3962
4353
  minutes: number;
3963
- note: string;
3964
4354
  }, {
4355
+ note: string;
3965
4356
  kind: "hours_proposal";
3966
4357
  minutes: number;
3967
- note: string;
3968
4358
  }>;
3969
4359
  declare const CaptureThumbCardSchema: z.ZodObject<{
3970
4360
  kind: z.ZodLiteral<"capture_thumb">;
@@ -3982,14 +4372,14 @@ declare const AgentCardSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
3982
4372
  label: z.ZodString;
3983
4373
  platform: z.ZodOptional<z.ZodEnum<["telegram", "facebook", "x", "tiktok", "instagram", "youtube", "whatsapp", "reddit", "discord", "linkedin", "threads", "vk", "snapchat", "web"]>>;
3984
4374
  }, "strip", z.ZodTypeAny, {
3985
- kind: "open_link";
3986
4375
  url: string;
3987
4376
  label: string;
4377
+ kind: "open_link";
3988
4378
  platform?: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web" | undefined;
3989
4379
  }, {
3990
- kind: "open_link";
3991
4380
  url: string;
3992
4381
  label: string;
4382
+ kind: "open_link";
3993
4383
  platform?: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web" | undefined;
3994
4384
  }>, z.ZodObject<{
3995
4385
  kind: z.ZodLiteral<"capture_prompt">;
@@ -4010,20 +4400,20 @@ declare const AgentCardSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
4010
4400
  score: z.ZodOptional<z.ZodNumber>;
4011
4401
  }, "strip", z.ZodTypeAny, {
4012
4402
  name: string;
4013
- kind: "source_result";
4014
4403
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
4404
+ kind: "source_result";
4015
4405
  outcome: "waiting_for_scraper" | "access_problem" | "to_scraper" | "to_monitor" | "known" | "dropped";
4016
4406
  reason: string;
4017
- score?: number | undefined;
4018
4407
  url?: string | undefined;
4408
+ score?: number | undefined;
4019
4409
  }, {
4020
4410
  name: string;
4021
- kind: "source_result";
4022
4411
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
4412
+ kind: "source_result";
4023
4413
  outcome: "waiting_for_scraper" | "access_problem" | "to_scraper" | "to_monitor" | "known" | "dropped";
4024
4414
  reason: string;
4025
- score?: number | undefined;
4026
4415
  url?: string | undefined;
4416
+ score?: number | undefined;
4027
4417
  }>, z.ZodObject<{
4028
4418
  kind: z.ZodLiteral<"item_result">;
4029
4419
  excerpt: z.ZodString;
@@ -4031,15 +4421,15 @@ declare const AgentCardSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
4031
4421
  priority: z.ZodBoolean;
4032
4422
  publishedAt: z.ZodOptional<z.ZodDate>;
4033
4423
  }, "strip", z.ZodTypeAny, {
4424
+ platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
4034
4425
  priority: boolean;
4035
4426
  kind: "item_result";
4036
- platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
4037
4427
  excerpt: string;
4038
4428
  publishedAt?: Date | undefined;
4039
4429
  }, {
4430
+ platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
4040
4431
  priority: boolean;
4041
4432
  kind: "item_result";
4042
- platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
4043
4433
  excerpt: string;
4044
4434
  publishedAt?: Date | undefined;
4045
4435
  }>, z.ZodObject<{
@@ -4049,23 +4439,23 @@ declare const AgentCardSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
4049
4439
  id: z.ZodString;
4050
4440
  label: z.ZodString;
4051
4441
  }, "strip", z.ZodTypeAny, {
4052
- id: string;
4053
4442
  label: string;
4054
- }, {
4055
4443
  id: string;
4444
+ }, {
4056
4445
  label: string;
4446
+ id: string;
4057
4447
  }>, "many">;
4058
4448
  }, "strip", z.ZodTypeAny, {
4059
4449
  options: {
4060
- id: string;
4061
4450
  label: string;
4451
+ id: string;
4062
4452
  }[];
4063
4453
  kind: "quick_replies";
4064
4454
  questionId: string;
4065
4455
  }, {
4066
4456
  options: {
4067
- id: string;
4068
4457
  label: string;
4458
+ id: string;
4069
4459
  }[];
4070
4460
  kind: "quick_replies";
4071
4461
  questionId: string;
@@ -4074,13 +4464,13 @@ declare const AgentCardSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
4074
4464
  minutes: z.ZodNumber;
4075
4465
  note: z.ZodString;
4076
4466
  }, "strip", z.ZodTypeAny, {
4467
+ note: string;
4077
4468
  kind: "hours_proposal";
4078
4469
  minutes: number;
4079
- note: string;
4080
4470
  }, {
4471
+ note: string;
4081
4472
  kind: "hours_proposal";
4082
4473
  minutes: number;
4083
- note: string;
4084
4474
  }>, z.ZodObject<{
4085
4475
  kind: z.ZodLiteral<"capture_thumb">;
4086
4476
  captureId: z.ZodString;
@@ -4108,14 +4498,14 @@ declare const AgentMessageSchema: z.ZodObject<{
4108
4498
  label: z.ZodString;
4109
4499
  platform: z.ZodOptional<z.ZodEnum<["telegram", "facebook", "x", "tiktok", "instagram", "youtube", "whatsapp", "reddit", "discord", "linkedin", "threads", "vk", "snapchat", "web"]>>;
4110
4500
  }, "strip", z.ZodTypeAny, {
4111
- kind: "open_link";
4112
4501
  url: string;
4113
4502
  label: string;
4503
+ kind: "open_link";
4114
4504
  platform?: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web" | undefined;
4115
4505
  }, {
4116
- kind: "open_link";
4117
4506
  url: string;
4118
4507
  label: string;
4508
+ kind: "open_link";
4119
4509
  platform?: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web" | undefined;
4120
4510
  }>, z.ZodObject<{
4121
4511
  kind: z.ZodLiteral<"capture_prompt">;
@@ -4136,20 +4526,20 @@ declare const AgentMessageSchema: z.ZodObject<{
4136
4526
  score: z.ZodOptional<z.ZodNumber>;
4137
4527
  }, "strip", z.ZodTypeAny, {
4138
4528
  name: string;
4139
- kind: "source_result";
4140
4529
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
4530
+ kind: "source_result";
4141
4531
  outcome: "waiting_for_scraper" | "access_problem" | "to_scraper" | "to_monitor" | "known" | "dropped";
4142
4532
  reason: string;
4143
- score?: number | undefined;
4144
4533
  url?: string | undefined;
4534
+ score?: number | undefined;
4145
4535
  }, {
4146
4536
  name: string;
4147
- kind: "source_result";
4148
4537
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
4538
+ kind: "source_result";
4149
4539
  outcome: "waiting_for_scraper" | "access_problem" | "to_scraper" | "to_monitor" | "known" | "dropped";
4150
4540
  reason: string;
4151
- score?: number | undefined;
4152
4541
  url?: string | undefined;
4542
+ score?: number | undefined;
4153
4543
  }>, z.ZodObject<{
4154
4544
  kind: z.ZodLiteral<"item_result">;
4155
4545
  excerpt: z.ZodString;
@@ -4157,15 +4547,15 @@ declare const AgentMessageSchema: z.ZodObject<{
4157
4547
  priority: z.ZodBoolean;
4158
4548
  publishedAt: z.ZodOptional<z.ZodDate>;
4159
4549
  }, "strip", z.ZodTypeAny, {
4550
+ platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
4160
4551
  priority: boolean;
4161
4552
  kind: "item_result";
4162
- platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
4163
4553
  excerpt: string;
4164
4554
  publishedAt?: Date | undefined;
4165
4555
  }, {
4556
+ platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
4166
4557
  priority: boolean;
4167
4558
  kind: "item_result";
4168
- platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
4169
4559
  excerpt: string;
4170
4560
  publishedAt?: Date | undefined;
4171
4561
  }>, z.ZodObject<{
@@ -4175,23 +4565,23 @@ declare const AgentMessageSchema: z.ZodObject<{
4175
4565
  id: z.ZodString;
4176
4566
  label: z.ZodString;
4177
4567
  }, "strip", z.ZodTypeAny, {
4178
- id: string;
4179
4568
  label: string;
4180
- }, {
4181
4569
  id: string;
4570
+ }, {
4182
4571
  label: string;
4572
+ id: string;
4183
4573
  }>, "many">;
4184
4574
  }, "strip", z.ZodTypeAny, {
4185
4575
  options: {
4186
- id: string;
4187
4576
  label: string;
4577
+ id: string;
4188
4578
  }[];
4189
4579
  kind: "quick_replies";
4190
4580
  questionId: string;
4191
4581
  }, {
4192
4582
  options: {
4193
- id: string;
4194
4583
  label: string;
4584
+ id: string;
4195
4585
  }[];
4196
4586
  kind: "quick_replies";
4197
4587
  questionId: string;
@@ -4200,13 +4590,13 @@ declare const AgentMessageSchema: z.ZodObject<{
4200
4590
  minutes: z.ZodNumber;
4201
4591
  note: z.ZodString;
4202
4592
  }, "strip", z.ZodTypeAny, {
4593
+ note: string;
4203
4594
  kind: "hours_proposal";
4204
4595
  minutes: number;
4205
- note: string;
4206
4596
  }, {
4597
+ note: string;
4207
4598
  kind: "hours_proposal";
4208
4599
  minutes: number;
4209
- note: string;
4210
4600
  }>, z.ZodObject<{
4211
4601
  kind: z.ZodLiteral<"capture_thumb">;
4212
4602
  captureId: z.ZodString;
@@ -4231,38 +4621,38 @@ declare const AgentMessageSchema: z.ZodObject<{
4231
4621
  seq: number;
4232
4622
  role: "system" | "agent" | "person";
4233
4623
  cards: ({
4234
- kind: "open_link";
4235
4624
  url: string;
4236
4625
  label: string;
4626
+ kind: "open_link";
4237
4627
  platform?: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web" | undefined;
4238
4628
  } | {
4239
4629
  kind: "capture_prompt";
4240
4630
  hint: string;
4241
4631
  } | {
4242
4632
  name: string;
4243
- kind: "source_result";
4244
4633
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
4634
+ kind: "source_result";
4245
4635
  outcome: "waiting_for_scraper" | "access_problem" | "to_scraper" | "to_monitor" | "known" | "dropped";
4246
4636
  reason: string;
4247
- score?: number | undefined;
4248
4637
  url?: string | undefined;
4638
+ score?: number | undefined;
4249
4639
  } | {
4640
+ platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
4250
4641
  priority: boolean;
4251
4642
  kind: "item_result";
4252
- platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
4253
4643
  excerpt: string;
4254
4644
  publishedAt?: Date | undefined;
4255
4645
  } | {
4256
4646
  options: {
4257
- id: string;
4258
4647
  label: string;
4648
+ id: string;
4259
4649
  }[];
4260
4650
  kind: "quick_replies";
4261
4651
  questionId: string;
4262
4652
  } | {
4653
+ note: string;
4263
4654
  kind: "hours_proposal";
4264
4655
  minutes: number;
4265
- note: string;
4266
4656
  } | {
4267
4657
  kind: "capture_thumb";
4268
4658
  captureId: string;
@@ -4278,38 +4668,38 @@ declare const AgentMessageSchema: z.ZodObject<{
4278
4668
  seq: number;
4279
4669
  role: "system" | "agent" | "person";
4280
4670
  cards?: ({
4281
- kind: "open_link";
4282
4671
  url: string;
4283
4672
  label: string;
4673
+ kind: "open_link";
4284
4674
  platform?: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web" | undefined;
4285
4675
  } | {
4286
4676
  kind: "capture_prompt";
4287
4677
  hint: string;
4288
4678
  } | {
4289
4679
  name: string;
4290
- kind: "source_result";
4291
4680
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
4681
+ kind: "source_result";
4292
4682
  outcome: "waiting_for_scraper" | "access_problem" | "to_scraper" | "to_monitor" | "known" | "dropped";
4293
4683
  reason: string;
4294
- score?: number | undefined;
4295
4684
  url?: string | undefined;
4685
+ score?: number | undefined;
4296
4686
  } | {
4687
+ platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
4297
4688
  priority: boolean;
4298
4689
  kind: "item_result";
4299
- platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
4300
4690
  excerpt: string;
4301
4691
  publishedAt?: Date | undefined;
4302
4692
  } | {
4303
4693
  options: {
4304
- id: string;
4305
4694
  label: string;
4695
+ id: string;
4306
4696
  }[];
4307
4697
  kind: "quick_replies";
4308
4698
  questionId: string;
4309
4699
  } | {
4700
+ note: string;
4310
4701
  kind: "hours_proposal";
4311
4702
  minutes: number;
4312
- note: string;
4313
4703
  } | {
4314
4704
  kind: "capture_thumb";
4315
4705
  captureId: string;
@@ -4330,14 +4720,14 @@ declare const AgentMessageCreateSchema: z.ZodObject<Omit<{
4330
4720
  label: z.ZodString;
4331
4721
  platform: z.ZodOptional<z.ZodEnum<["telegram", "facebook", "x", "tiktok", "instagram", "youtube", "whatsapp", "reddit", "discord", "linkedin", "threads", "vk", "snapchat", "web"]>>;
4332
4722
  }, "strip", z.ZodTypeAny, {
4333
- kind: "open_link";
4334
4723
  url: string;
4335
4724
  label: string;
4725
+ kind: "open_link";
4336
4726
  platform?: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web" | undefined;
4337
4727
  }, {
4338
- kind: "open_link";
4339
4728
  url: string;
4340
4729
  label: string;
4730
+ kind: "open_link";
4341
4731
  platform?: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web" | undefined;
4342
4732
  }>, z.ZodObject<{
4343
4733
  kind: z.ZodLiteral<"capture_prompt">;
@@ -4358,20 +4748,20 @@ declare const AgentMessageCreateSchema: z.ZodObject<Omit<{
4358
4748
  score: z.ZodOptional<z.ZodNumber>;
4359
4749
  }, "strip", z.ZodTypeAny, {
4360
4750
  name: string;
4361
- kind: "source_result";
4362
4751
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
4752
+ kind: "source_result";
4363
4753
  outcome: "waiting_for_scraper" | "access_problem" | "to_scraper" | "to_monitor" | "known" | "dropped";
4364
4754
  reason: string;
4365
- score?: number | undefined;
4366
4755
  url?: string | undefined;
4756
+ score?: number | undefined;
4367
4757
  }, {
4368
4758
  name: string;
4369
- kind: "source_result";
4370
4759
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
4760
+ kind: "source_result";
4371
4761
  outcome: "waiting_for_scraper" | "access_problem" | "to_scraper" | "to_monitor" | "known" | "dropped";
4372
4762
  reason: string;
4373
- score?: number | undefined;
4374
4763
  url?: string | undefined;
4764
+ score?: number | undefined;
4375
4765
  }>, z.ZodObject<{
4376
4766
  kind: z.ZodLiteral<"item_result">;
4377
4767
  excerpt: z.ZodString;
@@ -4379,15 +4769,15 @@ declare const AgentMessageCreateSchema: z.ZodObject<Omit<{
4379
4769
  priority: z.ZodBoolean;
4380
4770
  publishedAt: z.ZodOptional<z.ZodDate>;
4381
4771
  }, "strip", z.ZodTypeAny, {
4772
+ platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
4382
4773
  priority: boolean;
4383
4774
  kind: "item_result";
4384
- platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
4385
4775
  excerpt: string;
4386
4776
  publishedAt?: Date | undefined;
4387
4777
  }, {
4778
+ platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
4388
4779
  priority: boolean;
4389
4780
  kind: "item_result";
4390
- platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
4391
4781
  excerpt: string;
4392
4782
  publishedAt?: Date | undefined;
4393
4783
  }>, z.ZodObject<{
@@ -4397,23 +4787,23 @@ declare const AgentMessageCreateSchema: z.ZodObject<Omit<{
4397
4787
  id: z.ZodString;
4398
4788
  label: z.ZodString;
4399
4789
  }, "strip", z.ZodTypeAny, {
4400
- id: string;
4401
4790
  label: string;
4402
- }, {
4403
4791
  id: string;
4792
+ }, {
4404
4793
  label: string;
4794
+ id: string;
4405
4795
  }>, "many">;
4406
4796
  }, "strip", z.ZodTypeAny, {
4407
4797
  options: {
4408
- id: string;
4409
4798
  label: string;
4799
+ id: string;
4410
4800
  }[];
4411
4801
  kind: "quick_replies";
4412
4802
  questionId: string;
4413
4803
  }, {
4414
4804
  options: {
4415
- id: string;
4416
4805
  label: string;
4806
+ id: string;
4417
4807
  }[];
4418
4808
  kind: "quick_replies";
4419
4809
  questionId: string;
@@ -4422,13 +4812,13 @@ declare const AgentMessageCreateSchema: z.ZodObject<Omit<{
4422
4812
  minutes: z.ZodNumber;
4423
4813
  note: z.ZodString;
4424
4814
  }, "strip", z.ZodTypeAny, {
4815
+ note: string;
4425
4816
  kind: "hours_proposal";
4426
4817
  minutes: number;
4427
- note: string;
4428
4818
  }, {
4819
+ note: string;
4429
4820
  kind: "hours_proposal";
4430
4821
  minutes: number;
4431
- note: string;
4432
4822
  }>, z.ZodObject<{
4433
4823
  kind: z.ZodLiteral<"capture_thumb">;
4434
4824
  captureId: z.ZodString;
@@ -4449,38 +4839,38 @@ declare const AgentMessageCreateSchema: z.ZodObject<Omit<{
4449
4839
  seq: number;
4450
4840
  role: "system" | "agent" | "person";
4451
4841
  cards: ({
4452
- kind: "open_link";
4453
4842
  url: string;
4454
4843
  label: string;
4844
+ kind: "open_link";
4455
4845
  platform?: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web" | undefined;
4456
4846
  } | {
4457
4847
  kind: "capture_prompt";
4458
4848
  hint: string;
4459
4849
  } | {
4460
4850
  name: string;
4461
- kind: "source_result";
4462
4851
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
4852
+ kind: "source_result";
4463
4853
  outcome: "waiting_for_scraper" | "access_problem" | "to_scraper" | "to_monitor" | "known" | "dropped";
4464
4854
  reason: string;
4465
- score?: number | undefined;
4466
4855
  url?: string | undefined;
4856
+ score?: number | undefined;
4467
4857
  } | {
4858
+ platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
4468
4859
  priority: boolean;
4469
4860
  kind: "item_result";
4470
- platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
4471
4861
  excerpt: string;
4472
4862
  publishedAt?: Date | undefined;
4473
4863
  } | {
4474
4864
  options: {
4475
- id: string;
4476
4865
  label: string;
4866
+ id: string;
4477
4867
  }[];
4478
4868
  kind: "quick_replies";
4479
4869
  questionId: string;
4480
4870
  } | {
4871
+ note: string;
4481
4872
  kind: "hours_proposal";
4482
4873
  minutes: number;
4483
- note: string;
4484
4874
  } | {
4485
4875
  kind: "capture_thumb";
4486
4876
  captureId: string;
@@ -4492,38 +4882,38 @@ declare const AgentMessageCreateSchema: z.ZodObject<Omit<{
4492
4882
  seq: number;
4493
4883
  role: "system" | "agent" | "person";
4494
4884
  cards?: ({
4495
- kind: "open_link";
4496
4885
  url: string;
4497
4886
  label: string;
4887
+ kind: "open_link";
4498
4888
  platform?: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web" | undefined;
4499
4889
  } | {
4500
4890
  kind: "capture_prompt";
4501
4891
  hint: string;
4502
4892
  } | {
4503
4893
  name: string;
4504
- kind: "source_result";
4505
4894
  platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
4895
+ kind: "source_result";
4506
4896
  outcome: "waiting_for_scraper" | "access_problem" | "to_scraper" | "to_monitor" | "known" | "dropped";
4507
4897
  reason: string;
4508
- score?: number | undefined;
4509
4898
  url?: string | undefined;
4899
+ score?: number | undefined;
4510
4900
  } | {
4901
+ platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
4511
4902
  priority: boolean;
4512
4903
  kind: "item_result";
4513
- platform: "telegram" | "facebook" | "x" | "tiktok" | "instagram" | "youtube" | "whatsapp" | "reddit" | "discord" | "linkedin" | "threads" | "vk" | "snapchat" | "web";
4514
4904
  excerpt: string;
4515
4905
  publishedAt?: Date | undefined;
4516
4906
  } | {
4517
4907
  options: {
4518
- id: string;
4519
4908
  label: string;
4909
+ id: string;
4520
4910
  }[];
4521
4911
  kind: "quick_replies";
4522
4912
  questionId: string;
4523
4913
  } | {
4914
+ note: string;
4524
4915
  kind: "hours_proposal";
4525
4916
  minutes: number;
4526
- note: string;
4527
4917
  } | {
4528
4918
  kind: "capture_thumb";
4529
4919
  captureId: string;
@@ -4601,7 +4991,14 @@ type CaptureDomSummary = z.infer<typeof CaptureDomSummarySchema>;
4601
4991
  declare const CaptureSchema: z.ZodObject<{
4602
4992
  _id: z.ZodString;
4603
4993
  orgId: z.ZodString;
4604
- sessionId: z.ZodString;
4994
+ /** Legacy: captures uploaded into a live session. Task-tagged captures have none. */
4995
+ sessionId: z.ZodOptional<z.ZodString>;
4996
+ /** The assignment (and so the task) the person sent this capture for. */
4997
+ assignmentId: z.ZodOptional<z.ZodString>;
4998
+ taskId: z.ZodOptional<z.ZodString>;
4999
+ missionId: z.ZodOptional<z.ZodString>;
5000
+ /** Who sent it; used to work out their hours. */
5001
+ userId: z.ZodOptional<z.ZodString>;
4605
5002
  /** From `chrome.tabs`, never from page content. */
4606
5003
  url: z.ZodString;
4607
5004
  title: z.ZodString;
@@ -4686,6 +5083,10 @@ declare const CaptureSchema: z.ZodObject<{
4686
5083
  /** Validated `vision_extract` output; shape depends on session mode. */
4687
5084
  analysis: z.ZodOptional<z.ZodUnknown>;
4688
5085
  error: z.ZodOptional<z.ZodString>;
5086
+ /** Analysis attempts by the capture worker; it gives up (`failed`) after a few. */
5087
+ attempts: z.ZodDefault<z.ZodNumber>;
5088
+ /** When the worker claimed it (`analyzing`); an old claim is taken over after a restart. */
5089
+ claimedAt: z.ZodOptional<z.ZodDate>;
4689
5090
  /** Blob deleted and status set to `expired` after this instant (CAPTURE_RETENTION_DAYS). */
4690
5091
  expiresAt: z.ZodDate;
4691
5092
  } & {
@@ -4697,9 +5098,8 @@ declare const CaptureSchema: z.ZodObject<{
4697
5098
  updatedAt: Date;
4698
5099
  _id: string;
4699
5100
  orgId: string;
4700
- title: string;
4701
5101
  url: string;
4702
- sessionId: string;
5102
+ title: string;
4703
5103
  capturedAt: Date;
4704
5104
  imageRef: {
4705
5105
  bucket: string;
@@ -4709,8 +5109,14 @@ declare const CaptureSchema: z.ZodObject<{
4709
5109
  };
4710
5110
  sha256: string;
4711
5111
  domStatus: "ok" | "unavailable" | "truncated";
5112
+ attempts: number;
4712
5113
  expiresAt: Date;
4713
5114
  error?: string | undefined;
5115
+ missionId?: string | undefined;
5116
+ taskId?: string | undefined;
5117
+ assignmentId?: string | undefined;
5118
+ userId?: string | undefined;
5119
+ sessionId?: string | undefined;
4714
5120
  region?: {
4715
5121
  x: number;
4716
5122
  y: number;
@@ -4733,14 +5139,14 @@ declare const CaptureSchema: z.ZodObject<{
4733
5139
  lang?: string | undefined;
4734
5140
  } | undefined;
4735
5141
  analysis?: unknown;
5142
+ claimedAt?: Date | undefined;
4736
5143
  }, {
4737
5144
  createdAt: Date;
4738
5145
  updatedAt: Date;
4739
5146
  _id: string;
4740
5147
  orgId: string;
4741
- title: string;
4742
5148
  url: string;
4743
- sessionId: string;
5149
+ title: string;
4744
5150
  capturedAt: Date;
4745
5151
  imageRef: {
4746
5152
  bucket: string;
@@ -4752,6 +5158,11 @@ declare const CaptureSchema: z.ZodObject<{
4752
5158
  expiresAt: Date;
4753
5159
  status?: "failed" | "uploaded" | "analyzing" | "analyzed" | "expired" | undefined;
4754
5160
  error?: string | undefined;
5161
+ missionId?: string | undefined;
5162
+ taskId?: string | undefined;
5163
+ assignmentId?: string | undefined;
5164
+ userId?: string | undefined;
5165
+ sessionId?: string | undefined;
4755
5166
  region?: {
4756
5167
  x: number;
4757
5168
  y: number;
@@ -4775,11 +5186,20 @@ declare const CaptureSchema: z.ZodObject<{
4775
5186
  lang?: string | undefined;
4776
5187
  } | undefined;
4777
5188
  analysis?: unknown;
5189
+ attempts?: number | undefined;
5190
+ claimedAt?: Date | undefined;
4778
5191
  }>;
4779
5192
  declare const CaptureCreateSchema: z.ZodObject<Omit<{
4780
5193
  _id: z.ZodString;
4781
5194
  orgId: z.ZodString;
4782
- sessionId: z.ZodString;
5195
+ /** Legacy: captures uploaded into a live session. Task-tagged captures have none. */
5196
+ sessionId: z.ZodOptional<z.ZodString>;
5197
+ /** The assignment (and so the task) the person sent this capture for. */
5198
+ assignmentId: z.ZodOptional<z.ZodString>;
5199
+ taskId: z.ZodOptional<z.ZodString>;
5200
+ missionId: z.ZodOptional<z.ZodString>;
5201
+ /** Who sent it; used to work out their hours. */
5202
+ userId: z.ZodOptional<z.ZodString>;
4783
5203
  /** From `chrome.tabs`, never from page content. */
4784
5204
  url: z.ZodString;
4785
5205
  title: z.ZodString;
@@ -4864,6 +5284,10 @@ declare const CaptureCreateSchema: z.ZodObject<Omit<{
4864
5284
  /** Validated `vision_extract` output; shape depends on session mode. */
4865
5285
  analysis: z.ZodOptional<z.ZodUnknown>;
4866
5286
  error: z.ZodOptional<z.ZodString>;
5287
+ /** Analysis attempts by the capture worker; it gives up (`failed`) after a few. */
5288
+ attempts: z.ZodDefault<z.ZodNumber>;
5289
+ /** When the worker claimed it (`analyzing`); an old claim is taken over after a restart. */
5290
+ claimedAt: z.ZodOptional<z.ZodDate>;
4867
5291
  /** Blob deleted and status set to `expired` after this instant (CAPTURE_RETENTION_DAYS). */
4868
5292
  expiresAt: z.ZodDate;
4869
5293
  } & {
@@ -4871,9 +5295,8 @@ declare const CaptureCreateSchema: z.ZodObject<Omit<{
4871
5295
  updatedAt: z.ZodDate;
4872
5296
  }, "createdAt" | "updatedAt" | "_id" | "orgId">, "strip", z.ZodTypeAny, {
4873
5297
  status: "failed" | "uploaded" | "analyzing" | "analyzed" | "expired";
4874
- title: string;
4875
5298
  url: string;
4876
- sessionId: string;
5299
+ title: string;
4877
5300
  capturedAt: Date;
4878
5301
  imageRef: {
4879
5302
  bucket: string;
@@ -4883,8 +5306,14 @@ declare const CaptureCreateSchema: z.ZodObject<Omit<{
4883
5306
  };
4884
5307
  sha256: string;
4885
5308
  domStatus: "ok" | "unavailable" | "truncated";
5309
+ attempts: number;
4886
5310
  expiresAt: Date;
4887
5311
  error?: string | undefined;
5312
+ missionId?: string | undefined;
5313
+ taskId?: string | undefined;
5314
+ assignmentId?: string | undefined;
5315
+ userId?: string | undefined;
5316
+ sessionId?: string | undefined;
4888
5317
  region?: {
4889
5318
  x: number;
4890
5319
  y: number;
@@ -4907,10 +5336,10 @@ declare const CaptureCreateSchema: z.ZodObject<Omit<{
4907
5336
  lang?: string | undefined;
4908
5337
  } | undefined;
4909
5338
  analysis?: unknown;
5339
+ claimedAt?: Date | undefined;
4910
5340
  }, {
4911
- title: string;
4912
5341
  url: string;
4913
- sessionId: string;
5342
+ title: string;
4914
5343
  capturedAt: Date;
4915
5344
  imageRef: {
4916
5345
  bucket: string;
@@ -4922,6 +5351,11 @@ declare const CaptureCreateSchema: z.ZodObject<Omit<{
4922
5351
  expiresAt: Date;
4923
5352
  status?: "failed" | "uploaded" | "analyzing" | "analyzed" | "expired" | undefined;
4924
5353
  error?: string | undefined;
5354
+ missionId?: string | undefined;
5355
+ taskId?: string | undefined;
5356
+ assignmentId?: string | undefined;
5357
+ userId?: string | undefined;
5358
+ sessionId?: string | undefined;
4925
5359
  region?: {
4926
5360
  x: number;
4927
5361
  y: number;
@@ -4945,6 +5379,8 @@ declare const CaptureCreateSchema: z.ZodObject<Omit<{
4945
5379
  lang?: string | undefined;
4946
5380
  } | undefined;
4947
5381
  analysis?: unknown;
5382
+ attempts?: number | undefined;
5383
+ claimedAt?: Date | undefined;
4948
5384
  }>;
4949
5385
  type Capture = z.infer<typeof CaptureSchema>;
4950
5386
  type CaptureCreate = z.infer<typeof CaptureCreateSchema>;
@@ -5152,8 +5588,8 @@ declare const CaptureDomSnapshotSchema: z.ZodObject<{
5152
5588
  truncated: z.ZodBoolean;
5153
5589
  }, "strip", z.ZodTypeAny, {
5154
5590
  truncated: boolean;
5155
- title: string;
5156
5591
  url: string;
5592
+ title: string;
5157
5593
  blocks: {
5158
5594
  text: string;
5159
5595
  tag: string;
@@ -5185,8 +5621,8 @@ declare const CaptureDomSnapshotSchema: z.ZodObject<{
5185
5621
  lang?: string | undefined;
5186
5622
  }, {
5187
5623
  truncated: boolean;
5188
- title: string;
5189
5624
  url: string;
5625
+ title: string;
5190
5626
  blocks: {
5191
5627
  text: string;
5192
5628
  tag: string;
@@ -5269,7 +5705,7 @@ declare const LlmCallSchema: z.ZodObject<{
5269
5705
  createdAt: Date;
5270
5706
  updatedAt: Date;
5271
5707
  _id: string;
5272
- outcome: "ok" | "invalid_output" | "timeout" | "rate_limited" | "server_error" | "safety_block" | "budget_exceeded" | "breaker_open" | "auth_error";
5708
+ outcome: "rate_limited" | "ok" | "invalid_output" | "timeout" | "server_error" | "safety_block" | "budget_exceeded" | "breaker_open" | "auth_error";
5273
5709
  capability: "plan" | "vision_extract" | "judge" | "chat";
5274
5710
  provider: "gemini" | "anthropic" | "openai";
5275
5711
  model: string;
@@ -5290,7 +5726,7 @@ declare const LlmCallSchema: z.ZodObject<{
5290
5726
  createdAt: Date;
5291
5727
  updatedAt: Date;
5292
5728
  _id: string;
5293
- outcome: "ok" | "invalid_output" | "timeout" | "rate_limited" | "server_error" | "safety_block" | "budget_exceeded" | "breaker_open" | "auth_error";
5729
+ outcome: "rate_limited" | "ok" | "invalid_output" | "timeout" | "server_error" | "safety_block" | "budget_exceeded" | "breaker_open" | "auth_error";
5294
5730
  capability: "plan" | "vision_extract" | "judge" | "chat";
5295
5731
  provider: "gemini" | "anthropic" | "openai";
5296
5732
  model: string;
@@ -5341,7 +5777,7 @@ declare const LlmCallCreateSchema: z.ZodObject<Omit<{
5341
5777
  createdAt: z.ZodDate;
5342
5778
  updatedAt: z.ZodDate;
5343
5779
  }, "createdAt" | "updatedAt" | "_id">, "strip", z.ZodTypeAny, {
5344
- outcome: "ok" | "invalid_output" | "timeout" | "rate_limited" | "server_error" | "safety_block" | "budget_exceeded" | "breaker_open" | "auth_error";
5780
+ outcome: "rate_limited" | "ok" | "invalid_output" | "timeout" | "server_error" | "safety_block" | "budget_exceeded" | "breaker_open" | "auth_error";
5345
5781
  capability: "plan" | "vision_extract" | "judge" | "chat";
5346
5782
  provider: "gemini" | "anthropic" | "openai";
5347
5783
  model: string;
@@ -5359,7 +5795,7 @@ declare const LlmCallCreateSchema: z.ZodObject<Omit<{
5359
5795
  costUsdEstimate?: number | undefined;
5360
5796
  errorCode?: string | undefined;
5361
5797
  }, {
5362
- outcome: "ok" | "invalid_output" | "timeout" | "rate_limited" | "server_error" | "safety_block" | "budget_exceeded" | "breaker_open" | "auth_error";
5798
+ outcome: "rate_limited" | "ok" | "invalid_output" | "timeout" | "server_error" | "safety_block" | "budget_exceeded" | "breaker_open" | "auth_error";
5363
5799
  capability: "plan" | "vision_extract" | "judge" | "chat";
5364
5800
  provider: "gemini" | "anthropic" | "openai";
5365
5801
  model: string;
@@ -5381,4 +5817,4 @@ type LlmCall = z.infer<typeof LlmCallSchema>;
5381
5817
  type LlmCallCreate = z.infer<typeof LlmCallCreateSchema>;
5382
5818
  type LlmCallCreateInput = z.input<typeof LlmCallCreateSchema>;
5383
5819
 
5384
- export { AuditLogSchema as $, AGENT_CARD_KIND_VALUES as A, type AgentSessionStats as B, AgentSessionStatsSchema as C, AgentSessionStatus as D, type AgentSessionUpdate as E, AgentSessionUpdateSchema as F, AgentSourceOutcome as G, type AnalystProfile as H, AnalystProfileSchema as I, type AnalystProfileUpdate as J, type AnalystProfileUpdateInput as K, AnalystProfileUpdateSchema as L, type AssigneeLoad as M, AssigneeLoadSchema as N, AssigneeType as O, type Assignment as P, type AssignmentCreate as Q, type AssignmentCreateInput as R, AssignmentCreateSchema as S, AssignmentSchema as T, AssignmentSource as U, AssignmentStatus as V, type AssignmentUpdate as W, AssignmentUpdateSchema as X, type AuditLog as Y, type AuditLogCreate as Z, AuditLogCreateSchema as _, AGENT_MESSAGE_KIND_VALUES as a, DeploymentStatus as a$, type AuditLogUpdate as a0, AuditLogUpdateSchema as a1, type AuditTarget as a2, AuditTargetSchema as a3, type BlobRef as a4, BlobRefSchema as a5, CAPTURE_DOM_STATUS_VALUES as a6, CAPTURE_STATUS_VALUES as a7, COLLECTIONS as a8, COLLECTOR_TYPE_VALUES as a9, DISCOVERED_BY_TYPE_VALUES as aA, type DataItem as aB, type DataItemContent as aC, DataItemContentSchema as aD, type DataItemCreate as aE, type DataItemCreateInput as aF, DataItemCreateSchema as aG, type DataItemEntity as aH, DataItemEntitySchema as aI, DataItemSchema as aJ, type DataItemUpdate as aK, DataItemUpdateSchema as aL, type Database as aM, DatabaseCollection as aN, type DatabaseCreate as aO, type DatabaseCreateInput as aP, DatabaseCreateSchema as aQ, DatabaseName as aR, DatabaseSchema as aS, DatabaseStatus as aT, type DatabaseUpdate as aU, DatabaseUpdateSchema as aV, type Deployment as aW, type DeploymentCreate as aX, DeploymentCreateSchema as aY, DeploymentKind as aZ, DeploymentSchema as a_, type Capture as aa, type CaptureCreate as ab, type CaptureCreateInput as ac, CaptureCreateSchema as ad, type CaptureDomSnapshot as ae, CaptureDomSnapshotSchema as af, CaptureDomStatus as ag, type CaptureDomSummary as ah, CaptureDomSummarySchema as ai, CapturePromptCardSchema as aj, type CaptureRegion as ak, CaptureRegionSchema as al, CaptureSchema as am, CaptureStatus as an, CaptureThumbCardSchema as ao, type CollectionName as ap, type Collector as aq, CollectorSchema as ar, CollectorType as as, ConnectionString as at, DATABASE_COLLECTION_VALUES as au, DATABASE_STATUS_VALUES as av, DEFAULT_ANALYST_TASK_LIMIT as aw, DEFAULT_SCOUT_TASK_LIMIT as ax, DEPLOYMENT_KIND_VALUES as ay, DEPLOYMENT_STATUS_VALUES as az, AGENT_MESSAGE_ROLE_VALUES as b, RATER_TYPE_VALUES as b$, type DeploymentStep as b0, DeploymentStepSchema as b1, type DeploymentUpdate as b2, DeploymentUpdateSchema as b3, type DiscoveredBy as b4, DiscoveredBySchema as b5, DiscoveredByType as b6, type DomBlock as b7, DomBlockSchema as b8, type DomLink as b9, type LlmUsage as bA, LlmUsageSchema as bB, LoadScope as bC, MAX_AGENT_MESSAGE_TEXT_LENGTH as bD, MAX_RATING_COMMENT_LENGTH as bE, MAX_SOURCE_IMPORT_ROW_ERRORS as bF, MISSION_PRIORITY_VALUES as bG, MISSION_STATUS_VALUES as bH, type Mission as bI, type MissionCreate as bJ, type MissionCreateInput as bK, MissionCreateSchema as bL, MissionPriority as bM, MissionSchema as bN, MissionStatus as bO, type MissionUpdate as bP, MissionUpdateSchema as bQ, OpenLinkCardSchema as bR, type OrgSettings as bS, OrgSettingsSchema as bT, type OrgSettingsUpdate as bU, OrgSettingsUpdateSchema as bV, PLATFORM_VALUES as bW, Platform as bX, QuickRepliesCardSchema as bY, type QuickReplyOption as bZ, QuickReplyOptionSchema as b_, DomLinkSchema as ba, type DomRect as bb, DomRectSchema as bc, Email as bd, GLOBAL_LOAD_SCOPE as be, type Geo as bf, GeoSchema as bg, type HoursLog as bh, type HoursLogCreate as bi, HoursLogCreateSchema as bj, HoursLogSchema as bk, type HoursLogUpdate as bl, HoursLogUpdateSchema as bm, HoursProposalCardSchema as bn, ItemResultCardSchema as bo, LLM_CAPABILITY_VALUES as bp, LLM_OUTCOME_VALUES as bq, LLM_PROVIDER_VALUES as br, type LlmCall as bs, type LlmCallCreate as bt, type LlmCallCreateInput as bu, LlmCallCreateSchema as bv, LlmCallSchema as bw, LlmCapability as bx, LlmOutcome as by, LlmProvider as bz, AGENT_SESSION_MODE_VALUES as c, SourceResultCardSchema as c$, REGION_MODE_VALUES as c0, RaterType as c1, RatingScore as c2, type RatingSummary as c3, RatingSummarySchema as c4, RegionMode as c5, SCOUT_STATUS_VALUES as c6, SCRAPER_STATUS_VALUES as c7, SOURCE_ACCESS_VALUES as c8, SOURCE_IMPORT_KIND_VALUES as c9, ScraperMetricSchema as cA, type ScraperMetricUpdate as cB, ScraperMetricUpdateSchema as cC, ScraperSchema as cD, ScraperStatus as cE, type ScraperUpdate as cF, ScraperUpdateSchema as cG, type Source as cH, SourceAccess as cI, type SourceCreate as cJ, type SourceCreateInput as cK, SourceCreateSchema as cL, type SourceImport as cM, type SourceImportCreate as cN, SourceImportCreateSchema as cO, SourceImportKind as cP, type SourceImportRowError as cQ, SourceImportRowErrorSchema as cR, SourceImportSchema as cS, SourceImportStatus as cT, type SourceImportSummary as cU, SourceImportSummarySchema as cV, type SourceImportUpdate as cW, SourceImportUpdateSchema as cX, SourceIntakeOutcome as cY, type SourceRating as cZ, SourceRatingSchema as c_, SOURCE_IMPORT_STATUS_VALUES as ca, SOURCE_INTAKE_OUTCOME_VALUES as cb, SOURCE_ROUTE_VALUES as cc, SOURCE_STATUS_VALUES as cd, SOURCE_TYPE_VALUES as ce, type ScoutProfile as cf, type ScoutProfileCreate as cg, type ScoutProfileCreateInput as ch, ScoutProfileCreateSchema as ci, ScoutProfileSchema as cj, type ScoutProfileUpdate as ck, type ScoutProfileUpdateInput as cl, ScoutProfileUpdateSchema as cm, type ScoutRating as cn, type ScoutRatingInput as co, ScoutRatingInputSchema as cp, ScoutRatingSchema as cq, type ScoutSelfUpdate as cr, ScoutSelfUpdateSchema as cs, ScoutStatus as ct, type Scraper as cu, type ScraperCreate as cv, ScraperCreateSchema as cw, type ScraperMetric as cx, type ScraperMetricCreate as cy, ScraperMetricCreateSchema as cz, AGENT_SESSION_STATUS_VALUES as d, SourceRoute as d0, SourceSchema as d1, SourceStatus as d2, SourceType as d3, type SourceUpdate as d4, SourceUpdateSchema as d5, type SystemRecommendation as d6, type SystemRecommendationInput as d7, SystemRecommendationInputSchema as d8, SystemRecommendationSchema as d9, TASK_KIND_VALUES as da, TASK_ORIGIN_VALUES as db, TASK_STATUS_VALUES as dc, type Task as dd, type TaskCreate as de, type TaskCreateInput as df, TaskCreateSchema as dg, TaskKind as dh, TaskOrigin as di, TaskSchema as dj, TaskStatus as dk, type TaskUpdate as dl, TaskUpdateSchema as dm, VETTING_STATUS_VALUES as dn, VettingStatus as dp, AGENT_SOURCE_OUTCOME_VALUES as e, ASSIGNEE_TYPE_VALUES as f, ASSIGNMENT_SOURCE_VALUES as g, ASSIGNMENT_STATUS_VALUES as h, type AgentCard as i, AgentCardKind as j, AgentCardSchema as k, type AgentMessage as l, type AgentMessageCreate as m, type AgentMessageCreateInput as n, AgentMessageCreateSchema as o, AgentMessageKind as p, AgentMessageRole as q, AgentMessageSchema as r, type AgentSession as s, type AgentSessionBudget as t, AgentSessionBudgetSchema as u, type AgentSessionCreate as v, type AgentSessionCreateInput as w, AgentSessionCreateSchema as x, AgentSessionMode as y, AgentSessionSchema as z };
5820
+ export { AssignmentUpdateSchema as $, ACCESS_ISSUE_VALUES as A, AgentSessionMode as B, AgentSessionSchema as C, type AgentSessionStats as D, AgentSessionStatsSchema as E, AgentSessionStatus as F, type AgentSessionUpdate as G, AgentSessionUpdateSchema as H, AgentSourceOutcome as I, type AnalystProfile as J, AnalystProfileSchema as K, type AnalystProfileUpdate as L, MissionPriority as M, type AnalystProfileUpdateInput as N, AnalystProfileUpdateSchema as O, type AssigneeLoad as P, AssigneeLoadSchema as Q, AssigneeType as R, SourceStatus as S, type Assignment as T, type AssignmentCreate as U, type AssignmentCreateInput as V, AssignmentCreateSchema as W, AssignmentSchema as X, AssignmentSource as Y, AssignmentStatus as Z, type AssignmentUpdate as _, AGENT_CARD_KIND_VALUES as a, DatabaseUpdateSchema as a$, type AuditLog as a0, type AuditLogCreate as a1, AuditLogCreateSchema as a2, AuditLogSchema as a3, type AuditLogUpdate as a4, AuditLogUpdateSchema as a5, type AuditTarget as a6, AuditTargetSchema as a7, type BlobRef as a8, BlobRefSchema as a9, DATABASE_COLLECTION_VALUES as aA, DATABASE_STATUS_VALUES as aB, DEFAULT_ANALYST_TASK_LIMIT as aC, DEFAULT_SCOUT_TASK_LIMIT as aD, DEPLOYMENT_KIND_VALUES as aE, DEPLOYMENT_STATUS_VALUES as aF, DISCOVERED_BY_TYPE_VALUES as aG, type DataItem as aH, type DataItemContent as aI, DataItemContentSchema as aJ, type DataItemCreate as aK, type DataItemCreateInput as aL, DataItemCreateSchema as aM, type DataItemEntity as aN, DataItemEntitySchema as aO, DataItemSchema as aP, type DataItemUpdate as aQ, DataItemUpdateSchema as aR, type Database as aS, DatabaseCollection as aT, type DatabaseCreate as aU, type DatabaseCreateInput as aV, DatabaseCreateSchema as aW, DatabaseName as aX, DatabaseSchema as aY, DatabaseStatus as aZ, type DatabaseUpdate as a_, CAPTURE_DOM_STATUS_VALUES as aa, CAPTURE_STATUS_VALUES as ab, CAPTURE_WINDOW_MODE_VALUES as ac, COLLECTIONS as ad, COLLECTOR_TYPE_VALUES as ae, type Capture as af, type CaptureCreate as ag, type CaptureCreateInput as ah, CaptureCreateSchema as ai, type CaptureDomSnapshot as aj, CaptureDomSnapshotSchema as ak, CaptureDomStatus as al, type CaptureDomSummary as am, CaptureDomSummarySchema as an, CapturePromptCardSchema as ao, type CaptureRegion as ap, CaptureRegionSchema as aq, CaptureSchema as ar, CaptureStatus as as, CaptureThumbCardSchema as at, CaptureWindowMode as au, type CollectionName as av, type Collector as aw, CollectorSchema as ax, CollectorType as ay, ConnectionString as az, AGENT_MESSAGE_KIND_VALUES as b, type OrgSettingsUpdate as b$, type Deployment as b0, type DeploymentCreate as b1, DeploymentCreateSchema as b2, DeploymentKind as b3, DeploymentSchema as b4, DeploymentStatus as b5, type DeploymentStep as b6, DeploymentStepSchema as b7, type DeploymentUpdate as b8, DeploymentUpdateSchema as b9, type LlmCall as bA, type LlmCallCreate as bB, type LlmCallCreateInput as bC, LlmCallCreateSchema as bD, LlmCallSchema as bE, LlmCapability as bF, LlmOutcome as bG, LlmProvider as bH, type LlmUsage as bI, LlmUsageSchema as bJ, LoadScope as bK, MAX_AGENT_MESSAGE_TEXT_LENGTH as bL, MAX_RATING_COMMENT_LENGTH as bM, MAX_SOURCE_IMPORT_ROW_ERRORS as bN, MISSION_PRIORITY_VALUES as bO, MISSION_STATUS_VALUES as bP, type Mission as bQ, type MissionCreate as bR, type MissionCreateInput as bS, MissionCreateSchema as bT, MissionSchema as bU, MissionStatus as bV, type MissionUpdate as bW, MissionUpdateSchema as bX, OpenLinkCardSchema as bY, type OrgSettings as bZ, OrgSettingsSchema as b_, type DiscoveredBy as ba, DiscoveredBySchema as bb, DiscoveredByType as bc, type DomBlock as bd, DomBlockSchema as be, type DomLink as bf, DomLinkSchema as bg, type DomRect as bh, DomRectSchema as bi, Email as bj, GLOBAL_LOAD_SCOPE as bk, type Geo as bl, GeoSchema as bm, HOURS_LOG_SOURCE_VALUES as bn, type HoursLog as bo, type HoursLogCreate as bp, HoursLogCreateSchema as bq, HoursLogSchema as br, HoursLogSource as bs, type HoursLogUpdate as bt, HoursLogUpdateSchema as bu, HoursProposalCardSchema as bv, ItemResultCardSchema as bw, LLM_CAPABILITY_VALUES as bx, LLM_OUTCOME_VALUES as by, LLM_PROVIDER_VALUES as bz, AGENT_MESSAGE_ROLE_VALUES as c, type SourceImportSummary as c$, OrgSettingsUpdateSchema as c0, PLATFORM_VALUES as c1, Platform as c2, QuickRepliesCardSchema as c3, type QuickReplyOption as c4, QuickReplyOptionSchema as c5, RATER_TYPE_VALUES as c6, REGION_MODE_VALUES as c7, RaterType as c8, RatingScore as c9, ScoutStatus as cA, type Scraper as cB, type ScraperCreate as cC, ScraperCreateSchema as cD, type ScraperMetric as cE, type ScraperMetricCreate as cF, ScraperMetricCreateSchema as cG, ScraperMetricSchema as cH, type ScraperMetricUpdate as cI, ScraperMetricUpdateSchema as cJ, ScraperSchema as cK, ScraperStatus as cL, type ScraperUpdate as cM, ScraperUpdateSchema as cN, type Source as cO, SourceAccess as cP, type SourceCreate as cQ, type SourceCreateInput as cR, SourceCreateSchema as cS, type SourceImport as cT, type SourceImportCreate as cU, SourceImportCreateSchema as cV, SourceImportKind as cW, type SourceImportRowError as cX, SourceImportRowErrorSchema as cY, SourceImportSchema as cZ, SourceImportStatus as c_, type RatingSummary as ca, RatingSummarySchema as cb, RegionMode as cc, SCOUT_STATUS_VALUES as cd, SCRAPER_STATUS_VALUES as ce, SOURCE_ACCESS_VALUES as cf, SOURCE_IMPORT_KIND_VALUES as cg, SOURCE_IMPORT_STATUS_VALUES as ch, SOURCE_INTAKE_OUTCOME_VALUES as ci, SOURCE_ROUTE_VALUES as cj, SOURCE_STATUS_VALUES as ck, SOURCE_TYPE_VALUES as cl, type ScoutProfile as cm, type ScoutProfileCreate as cn, type ScoutProfileCreateInput as co, ScoutProfileCreateSchema as cp, ScoutProfileSchema as cq, type ScoutProfileUpdate as cr, type ScoutProfileUpdateInput as cs, ScoutProfileUpdateSchema as ct, type ScoutRating as cu, type ScoutRatingInput as cv, ScoutRatingInputSchema as cw, ScoutRatingSchema as cx, type ScoutSelfUpdate as cy, ScoutSelfUpdateSchema as cz, AGENT_SESSION_MODE_VALUES as d, SourceImportSummarySchema as d0, type SourceImportUpdate as d1, SourceImportUpdateSchema as d2, SourceIntakeOutcome as d3, type SourceRating as d4, SourceRatingSchema as d5, SourceResultCardSchema as d6, SourceRoute as d7, SourceSchema as d8, SourceType as d9, type SourceUpdate as da, SourceUpdateSchema as db, type SystemRecommendation as dc, type SystemRecommendationInput as dd, SystemRecommendationInputSchema as de, SystemRecommendationSchema as df, TASK_KIND_VALUES as dg, TASK_ORIGIN_VALUES as dh, TASK_STATUS_VALUES as di, type Task as dj, type TaskCreate as dk, type TaskCreateInput as dl, TaskCreateSchema as dm, TaskKind as dn, TaskOrigin as dp, TaskSchema as dq, TaskStatus as dr, type TaskUpdate as ds, TaskUpdateSchema as dt, VETTING_STATUS_VALUES as du, VettingStatus as dv, AGENT_SESSION_STATUS_VALUES as e, AGENT_SOURCE_OUTCOME_VALUES as f, ASSIGNEE_TYPE_VALUES as g, ASSIGNMENT_SOURCE_VALUES as h, ASSIGNMENT_STATUS_VALUES as i, AccessIssue as j, type AgentCard as k, AgentCardKind as l, AgentCardSchema as m, type AgentMessage as n, type AgentMessageCreate as o, type AgentMessageCreateInput as p, AgentMessageCreateSchema as q, AgentMessageKind as r, AgentMessageRole as s, AgentMessageSchema as t, type AgentSession as u, type AgentSessionBudget as v, AgentSessionBudgetSchema as w, type AgentSessionCreate as x, type AgentSessionCreateInput as y, AgentSessionCreateSchema as z };