@allbluecn/database 0.14.1 → 0.14.3

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.
@@ -20,10 +20,20 @@ export type ChatThreadModel = runtime.Types.Result.DefaultSelection<Prisma.$Chat
20
20
 
21
21
  export type AggregateChatThread = {
22
22
  _count: ChatThreadCountAggregateOutputType | null
23
+ _avg: ChatThreadAvgAggregateOutputType | null
24
+ _sum: ChatThreadSumAggregateOutputType | null
23
25
  _min: ChatThreadMinAggregateOutputType | null
24
26
  _max: ChatThreadMaxAggregateOutputType | null
25
27
  }
26
28
 
29
+ export type ChatThreadAvgAggregateOutputType = {
30
+ indexRevision: number | null
31
+ }
32
+
33
+ export type ChatThreadSumAggregateOutputType = {
34
+ indexRevision: number | null
35
+ }
36
+
27
37
  export type ChatThreadMinAggregateOutputType = {
28
38
  id: string | null
29
39
  userId: string | null
@@ -37,6 +47,7 @@ export type ChatThreadMinAggregateOutputType = {
37
47
  engine: string | null
38
48
  localCwd: string | null
39
49
  localAgentId: string | null
50
+ indexRevision: number | null
40
51
  }
41
52
 
42
53
  export type ChatThreadMaxAggregateOutputType = {
@@ -52,6 +63,7 @@ export type ChatThreadMaxAggregateOutputType = {
52
63
  engine: string | null
53
64
  localCwd: string | null
54
65
  localAgentId: string | null
66
+ indexRevision: number | null
55
67
  }
56
68
 
57
69
  export type ChatThreadCountAggregateOutputType = {
@@ -67,10 +79,20 @@ export type ChatThreadCountAggregateOutputType = {
67
79
  engine: number
68
80
  localCwd: number
69
81
  localAgentId: number
82
+ indexRevision: number
83
+ indexMetadata: number
70
84
  _all: number
71
85
  }
72
86
 
73
87
 
88
+ export type ChatThreadAvgAggregateInputType = {
89
+ indexRevision?: true
90
+ }
91
+
92
+ export type ChatThreadSumAggregateInputType = {
93
+ indexRevision?: true
94
+ }
95
+
74
96
  export type ChatThreadMinAggregateInputType = {
75
97
  id?: true
76
98
  userId?: true
@@ -84,6 +106,7 @@ export type ChatThreadMinAggregateInputType = {
84
106
  engine?: true
85
107
  localCwd?: true
86
108
  localAgentId?: true
109
+ indexRevision?: true
87
110
  }
88
111
 
89
112
  export type ChatThreadMaxAggregateInputType = {
@@ -99,6 +122,7 @@ export type ChatThreadMaxAggregateInputType = {
99
122
  engine?: true
100
123
  localCwd?: true
101
124
  localAgentId?: true
125
+ indexRevision?: true
102
126
  }
103
127
 
104
128
  export type ChatThreadCountAggregateInputType = {
@@ -114,6 +138,8 @@ export type ChatThreadCountAggregateInputType = {
114
138
  engine?: true
115
139
  localCwd?: true
116
140
  localAgentId?: true
141
+ indexRevision?: true
142
+ indexMetadata?: true
117
143
  _all?: true
118
144
  }
119
145
 
@@ -152,6 +178,18 @@ export type ChatThreadAggregateArgs<ExtArgs extends runtime.Types.Extensions.Int
152
178
  * Count returned ChatThreads
153
179
  **/
154
180
  _count?: true | ChatThreadCountAggregateInputType
181
+ /**
182
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
183
+ *
184
+ * Select which fields to average
185
+ **/
186
+ _avg?: ChatThreadAvgAggregateInputType
187
+ /**
188
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
189
+ *
190
+ * Select which fields to sum
191
+ **/
192
+ _sum?: ChatThreadSumAggregateInputType
155
193
  /**
156
194
  * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
157
195
  *
@@ -185,6 +223,8 @@ export type ChatThreadGroupByArgs<ExtArgs extends runtime.Types.Extensions.Inter
185
223
  take?: number
186
224
  skip?: number
187
225
  _count?: ChatThreadCountAggregateInputType | true
226
+ _avg?: ChatThreadAvgAggregateInputType
227
+ _sum?: ChatThreadSumAggregateInputType
188
228
  _min?: ChatThreadMinAggregateInputType
189
229
  _max?: ChatThreadMaxAggregateInputType
190
230
  }
@@ -202,7 +242,11 @@ export type ChatThreadGroupByOutputType = {
202
242
  engine: string
203
243
  localCwd: string | null
204
244
  localAgentId: string | null
245
+ indexRevision: number
246
+ indexMetadata: runtime.JsonValue | null
205
247
  _count: ChatThreadCountAggregateOutputType | null
248
+ _avg: ChatThreadAvgAggregateOutputType | null
249
+ _sum: ChatThreadSumAggregateOutputType | null
206
250
  _min: ChatThreadMinAggregateOutputType | null
207
251
  _max: ChatThreadMaxAggregateOutputType | null
208
252
  }
@@ -238,6 +282,8 @@ export type ChatThreadWhereInput = {
238
282
  engine?: Prisma.StringFilter<"ChatThread"> | string
239
283
  localCwd?: Prisma.StringNullableFilter<"ChatThread"> | string | null
240
284
  localAgentId?: Prisma.StringNullableFilter<"ChatThread"> | string | null
285
+ indexRevision?: Prisma.IntFilter<"ChatThread"> | number
286
+ indexMetadata?: Prisma.JsonNullableFilter<"ChatThread">
241
287
  user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
242
288
  messages?: Prisma.ChatMessageListRelationFilter
243
289
  runs?: Prisma.ChatRunListRelationFilter
@@ -260,6 +306,8 @@ export type ChatThreadOrderByWithRelationInput = {
260
306
  engine?: Prisma.SortOrder
261
307
  localCwd?: Prisma.SortOrderInput | Prisma.SortOrder
262
308
  localAgentId?: Prisma.SortOrderInput | Prisma.SortOrder
309
+ indexRevision?: Prisma.SortOrder
310
+ indexMetadata?: Prisma.SortOrderInput | Prisma.SortOrder
263
311
  user?: Prisma.UserOrderByWithRelationInput
264
312
  messages?: Prisma.ChatMessageOrderByRelationAggregateInput
265
313
  runs?: Prisma.ChatRunOrderByRelationAggregateInput
@@ -285,6 +333,8 @@ export type ChatThreadWhereUniqueInput = Prisma.AtLeast<{
285
333
  engine?: Prisma.StringFilter<"ChatThread"> | string
286
334
  localCwd?: Prisma.StringNullableFilter<"ChatThread"> | string | null
287
335
  localAgentId?: Prisma.StringNullableFilter<"ChatThread"> | string | null
336
+ indexRevision?: Prisma.IntFilter<"ChatThread"> | number
337
+ indexMetadata?: Prisma.JsonNullableFilter<"ChatThread">
288
338
  user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
289
339
  messages?: Prisma.ChatMessageListRelationFilter
290
340
  runs?: Prisma.ChatRunListRelationFilter
@@ -307,9 +357,13 @@ export type ChatThreadOrderByWithAggregationInput = {
307
357
  engine?: Prisma.SortOrder
308
358
  localCwd?: Prisma.SortOrderInput | Prisma.SortOrder
309
359
  localAgentId?: Prisma.SortOrderInput | Prisma.SortOrder
360
+ indexRevision?: Prisma.SortOrder
361
+ indexMetadata?: Prisma.SortOrderInput | Prisma.SortOrder
310
362
  _count?: Prisma.ChatThreadCountOrderByAggregateInput
363
+ _avg?: Prisma.ChatThreadAvgOrderByAggregateInput
311
364
  _max?: Prisma.ChatThreadMaxOrderByAggregateInput
312
365
  _min?: Prisma.ChatThreadMinOrderByAggregateInput
366
+ _sum?: Prisma.ChatThreadSumOrderByAggregateInput
313
367
  }
314
368
 
315
369
  export type ChatThreadScalarWhereWithAggregatesInput = {
@@ -328,6 +382,8 @@ export type ChatThreadScalarWhereWithAggregatesInput = {
328
382
  engine?: Prisma.StringWithAggregatesFilter<"ChatThread"> | string
329
383
  localCwd?: Prisma.StringNullableWithAggregatesFilter<"ChatThread"> | string | null
330
384
  localAgentId?: Prisma.StringNullableWithAggregatesFilter<"ChatThread"> | string | null
385
+ indexRevision?: Prisma.IntWithAggregatesFilter<"ChatThread"> | number
386
+ indexMetadata?: Prisma.JsonNullableWithAggregatesFilter<"ChatThread">
331
387
  }
332
388
 
333
389
  export type ChatThreadCreateInput = {
@@ -340,6 +396,8 @@ export type ChatThreadCreateInput = {
340
396
  engine?: string
341
397
  localCwd?: string | null
342
398
  localAgentId?: string | null
399
+ indexRevision?: number
400
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
343
401
  user: Prisma.UserCreateNestedOneWithoutChatThreadsInput
344
402
  messages?: Prisma.ChatMessageCreateNestedManyWithoutThreadInput
345
403
  runs?: Prisma.ChatRunCreateNestedManyWithoutThreadInput
@@ -362,6 +420,8 @@ export type ChatThreadUncheckedCreateInput = {
362
420
  engine?: string
363
421
  localCwd?: string | null
364
422
  localAgentId?: string | null
423
+ indexRevision?: number
424
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
365
425
  messages?: Prisma.ChatMessageUncheckedCreateNestedManyWithoutThreadInput
366
426
  runs?: Prisma.ChatRunUncheckedCreateNestedManyWithoutThreadInput
367
427
  interrupts?: Prisma.ChatInterruptUncheckedCreateNestedManyWithoutThreadInput
@@ -378,6 +438,8 @@ export type ChatThreadUpdateInput = {
378
438
  engine?: Prisma.StringFieldUpdateOperationsInput | string
379
439
  localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
380
440
  localAgentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
441
+ indexRevision?: Prisma.IntFieldUpdateOperationsInput | number
442
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
381
443
  user?: Prisma.UserUpdateOneRequiredWithoutChatThreadsNestedInput
382
444
  messages?: Prisma.ChatMessageUpdateManyWithoutThreadNestedInput
383
445
  runs?: Prisma.ChatRunUpdateManyWithoutThreadNestedInput
@@ -400,6 +462,8 @@ export type ChatThreadUncheckedUpdateInput = {
400
462
  engine?: Prisma.StringFieldUpdateOperationsInput | string
401
463
  localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
402
464
  localAgentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
465
+ indexRevision?: Prisma.IntFieldUpdateOperationsInput | number
466
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
403
467
  messages?: Prisma.ChatMessageUncheckedUpdateManyWithoutThreadNestedInput
404
468
  runs?: Prisma.ChatRunUncheckedUpdateManyWithoutThreadNestedInput
405
469
  interrupts?: Prisma.ChatInterruptUncheckedUpdateManyWithoutThreadNestedInput
@@ -419,6 +483,8 @@ export type ChatThreadCreateManyInput = {
419
483
  engine?: string
420
484
  localCwd?: string | null
421
485
  localAgentId?: string | null
486
+ indexRevision?: number
487
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
422
488
  }
423
489
 
424
490
  export type ChatThreadUpdateManyMutationInput = {
@@ -431,6 +497,8 @@ export type ChatThreadUpdateManyMutationInput = {
431
497
  engine?: Prisma.StringFieldUpdateOperationsInput | string
432
498
  localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
433
499
  localAgentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
500
+ indexRevision?: Prisma.IntFieldUpdateOperationsInput | number
501
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
434
502
  }
435
503
 
436
504
  export type ChatThreadUncheckedUpdateManyInput = {
@@ -446,6 +514,8 @@ export type ChatThreadUncheckedUpdateManyInput = {
446
514
  engine?: Prisma.StringFieldUpdateOperationsInput | string
447
515
  localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
448
516
  localAgentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
517
+ indexRevision?: Prisma.IntFieldUpdateOperationsInput | number
518
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
449
519
  }
450
520
 
451
521
  export type ChatThreadListRelationFilter = {
@@ -471,6 +541,12 @@ export type ChatThreadCountOrderByAggregateInput = {
471
541
  engine?: Prisma.SortOrder
472
542
  localCwd?: Prisma.SortOrder
473
543
  localAgentId?: Prisma.SortOrder
544
+ indexRevision?: Prisma.SortOrder
545
+ indexMetadata?: Prisma.SortOrder
546
+ }
547
+
548
+ export type ChatThreadAvgOrderByAggregateInput = {
549
+ indexRevision?: Prisma.SortOrder
474
550
  }
475
551
 
476
552
  export type ChatThreadMaxOrderByAggregateInput = {
@@ -486,6 +562,7 @@ export type ChatThreadMaxOrderByAggregateInput = {
486
562
  engine?: Prisma.SortOrder
487
563
  localCwd?: Prisma.SortOrder
488
564
  localAgentId?: Prisma.SortOrder
565
+ indexRevision?: Prisma.SortOrder
489
566
  }
490
567
 
491
568
  export type ChatThreadMinOrderByAggregateInput = {
@@ -501,6 +578,11 @@ export type ChatThreadMinOrderByAggregateInput = {
501
578
  engine?: Prisma.SortOrder
502
579
  localCwd?: Prisma.SortOrder
503
580
  localAgentId?: Prisma.SortOrder
581
+ indexRevision?: Prisma.SortOrder
582
+ }
583
+
584
+ export type ChatThreadSumOrderByAggregateInput = {
585
+ indexRevision?: Prisma.SortOrder
504
586
  }
505
587
 
506
588
  export type ChatThreadScalarRelationFilter = {
@@ -700,6 +782,8 @@ export type ChatThreadCreateWithoutUserInput = {
700
782
  engine?: string
701
783
  localCwd?: string | null
702
784
  localAgentId?: string | null
785
+ indexRevision?: number
786
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
703
787
  messages?: Prisma.ChatMessageCreateNestedManyWithoutThreadInput
704
788
  runs?: Prisma.ChatRunCreateNestedManyWithoutThreadInput
705
789
  interrupts?: Prisma.ChatInterruptCreateNestedManyWithoutThreadInput
@@ -720,6 +804,8 @@ export type ChatThreadUncheckedCreateWithoutUserInput = {
720
804
  engine?: string
721
805
  localCwd?: string | null
722
806
  localAgentId?: string | null
807
+ indexRevision?: number
808
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
723
809
  messages?: Prisma.ChatMessageUncheckedCreateNestedManyWithoutThreadInput
724
810
  runs?: Prisma.ChatRunUncheckedCreateNestedManyWithoutThreadInput
725
811
  interrupts?: Prisma.ChatInterruptUncheckedCreateNestedManyWithoutThreadInput
@@ -768,6 +854,8 @@ export type ChatThreadScalarWhereInput = {
768
854
  engine?: Prisma.StringFilter<"ChatThread"> | string
769
855
  localCwd?: Prisma.StringNullableFilter<"ChatThread"> | string | null
770
856
  localAgentId?: Prisma.StringNullableFilter<"ChatThread"> | string | null
857
+ indexRevision?: Prisma.IntFilter<"ChatThread"> | number
858
+ indexMetadata?: Prisma.JsonNullableFilter<"ChatThread">
771
859
  }
772
860
 
773
861
  export type ChatThreadCreateWithoutMessagesInput = {
@@ -780,6 +868,8 @@ export type ChatThreadCreateWithoutMessagesInput = {
780
868
  engine?: string
781
869
  localCwd?: string | null
782
870
  localAgentId?: string | null
871
+ indexRevision?: number
872
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
783
873
  user: Prisma.UserCreateNestedOneWithoutChatThreadsInput
784
874
  runs?: Prisma.ChatRunCreateNestedManyWithoutThreadInput
785
875
  interrupts?: Prisma.ChatInterruptCreateNestedManyWithoutThreadInput
@@ -801,6 +891,8 @@ export type ChatThreadUncheckedCreateWithoutMessagesInput = {
801
891
  engine?: string
802
892
  localCwd?: string | null
803
893
  localAgentId?: string | null
894
+ indexRevision?: number
895
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
804
896
  runs?: Prisma.ChatRunUncheckedCreateNestedManyWithoutThreadInput
805
897
  interrupts?: Prisma.ChatInterruptUncheckedCreateNestedManyWithoutThreadInput
806
898
  generations?: Prisma.GenerationRunUncheckedCreateNestedManyWithoutThreadInput
@@ -832,6 +924,8 @@ export type ChatThreadUpdateWithoutMessagesInput = {
832
924
  engine?: Prisma.StringFieldUpdateOperationsInput | string
833
925
  localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
834
926
  localAgentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
927
+ indexRevision?: Prisma.IntFieldUpdateOperationsInput | number
928
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
835
929
  user?: Prisma.UserUpdateOneRequiredWithoutChatThreadsNestedInput
836
930
  runs?: Prisma.ChatRunUpdateManyWithoutThreadNestedInput
837
931
  interrupts?: Prisma.ChatInterruptUpdateManyWithoutThreadNestedInput
@@ -853,6 +947,8 @@ export type ChatThreadUncheckedUpdateWithoutMessagesInput = {
853
947
  engine?: Prisma.StringFieldUpdateOperationsInput | string
854
948
  localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
855
949
  localAgentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
950
+ indexRevision?: Prisma.IntFieldUpdateOperationsInput | number
951
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
856
952
  runs?: Prisma.ChatRunUncheckedUpdateManyWithoutThreadNestedInput
857
953
  interrupts?: Prisma.ChatInterruptUncheckedUpdateManyWithoutThreadNestedInput
858
954
  generations?: Prisma.GenerationRunUncheckedUpdateManyWithoutThreadNestedInput
@@ -868,6 +964,8 @@ export type ChatThreadCreateWithoutRunsInput = {
868
964
  engine?: string
869
965
  localCwd?: string | null
870
966
  localAgentId?: string | null
967
+ indexRevision?: number
968
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
871
969
  user: Prisma.UserCreateNestedOneWithoutChatThreadsInput
872
970
  messages?: Prisma.ChatMessageCreateNestedManyWithoutThreadInput
873
971
  interrupts?: Prisma.ChatInterruptCreateNestedManyWithoutThreadInput
@@ -889,6 +987,8 @@ export type ChatThreadUncheckedCreateWithoutRunsInput = {
889
987
  engine?: string
890
988
  localCwd?: string | null
891
989
  localAgentId?: string | null
990
+ indexRevision?: number
991
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
892
992
  messages?: Prisma.ChatMessageUncheckedCreateNestedManyWithoutThreadInput
893
993
  interrupts?: Prisma.ChatInterruptUncheckedCreateNestedManyWithoutThreadInput
894
994
  generations?: Prisma.GenerationRunUncheckedCreateNestedManyWithoutThreadInput
@@ -920,6 +1020,8 @@ export type ChatThreadUpdateWithoutRunsInput = {
920
1020
  engine?: Prisma.StringFieldUpdateOperationsInput | string
921
1021
  localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
922
1022
  localAgentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1023
+ indexRevision?: Prisma.IntFieldUpdateOperationsInput | number
1024
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
923
1025
  user?: Prisma.UserUpdateOneRequiredWithoutChatThreadsNestedInput
924
1026
  messages?: Prisma.ChatMessageUpdateManyWithoutThreadNestedInput
925
1027
  interrupts?: Prisma.ChatInterruptUpdateManyWithoutThreadNestedInput
@@ -941,6 +1043,8 @@ export type ChatThreadUncheckedUpdateWithoutRunsInput = {
941
1043
  engine?: Prisma.StringFieldUpdateOperationsInput | string
942
1044
  localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
943
1045
  localAgentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1046
+ indexRevision?: Prisma.IntFieldUpdateOperationsInput | number
1047
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
944
1048
  messages?: Prisma.ChatMessageUncheckedUpdateManyWithoutThreadNestedInput
945
1049
  interrupts?: Prisma.ChatInterruptUncheckedUpdateManyWithoutThreadNestedInput
946
1050
  generations?: Prisma.GenerationRunUncheckedUpdateManyWithoutThreadNestedInput
@@ -956,6 +1060,8 @@ export type ChatThreadCreateWithoutInterruptsInput = {
956
1060
  engine?: string
957
1061
  localCwd?: string | null
958
1062
  localAgentId?: string | null
1063
+ indexRevision?: number
1064
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
959
1065
  user: Prisma.UserCreateNestedOneWithoutChatThreadsInput
960
1066
  messages?: Prisma.ChatMessageCreateNestedManyWithoutThreadInput
961
1067
  runs?: Prisma.ChatRunCreateNestedManyWithoutThreadInput
@@ -977,6 +1083,8 @@ export type ChatThreadUncheckedCreateWithoutInterruptsInput = {
977
1083
  engine?: string
978
1084
  localCwd?: string | null
979
1085
  localAgentId?: string | null
1086
+ indexRevision?: number
1087
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
980
1088
  messages?: Prisma.ChatMessageUncheckedCreateNestedManyWithoutThreadInput
981
1089
  runs?: Prisma.ChatRunUncheckedCreateNestedManyWithoutThreadInput
982
1090
  generations?: Prisma.GenerationRunUncheckedCreateNestedManyWithoutThreadInput
@@ -1008,6 +1116,8 @@ export type ChatThreadUpdateWithoutInterruptsInput = {
1008
1116
  engine?: Prisma.StringFieldUpdateOperationsInput | string
1009
1117
  localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1010
1118
  localAgentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1119
+ indexRevision?: Prisma.IntFieldUpdateOperationsInput | number
1120
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
1011
1121
  user?: Prisma.UserUpdateOneRequiredWithoutChatThreadsNestedInput
1012
1122
  messages?: Prisma.ChatMessageUpdateManyWithoutThreadNestedInput
1013
1123
  runs?: Prisma.ChatRunUpdateManyWithoutThreadNestedInput
@@ -1029,6 +1139,8 @@ export type ChatThreadUncheckedUpdateWithoutInterruptsInput = {
1029
1139
  engine?: Prisma.StringFieldUpdateOperationsInput | string
1030
1140
  localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1031
1141
  localAgentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1142
+ indexRevision?: Prisma.IntFieldUpdateOperationsInput | number
1143
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
1032
1144
  messages?: Prisma.ChatMessageUncheckedUpdateManyWithoutThreadNestedInput
1033
1145
  runs?: Prisma.ChatRunUncheckedUpdateManyWithoutThreadNestedInput
1034
1146
  generations?: Prisma.GenerationRunUncheckedUpdateManyWithoutThreadNestedInput
@@ -1044,6 +1156,8 @@ export type ChatThreadCreateWithoutGenerationsInput = {
1044
1156
  engine?: string
1045
1157
  localCwd?: string | null
1046
1158
  localAgentId?: string | null
1159
+ indexRevision?: number
1160
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
1047
1161
  user: Prisma.UserCreateNestedOneWithoutChatThreadsInput
1048
1162
  messages?: Prisma.ChatMessageCreateNestedManyWithoutThreadInput
1049
1163
  runs?: Prisma.ChatRunCreateNestedManyWithoutThreadInput
@@ -1065,6 +1179,8 @@ export type ChatThreadUncheckedCreateWithoutGenerationsInput = {
1065
1179
  engine?: string
1066
1180
  localCwd?: string | null
1067
1181
  localAgentId?: string | null
1182
+ indexRevision?: number
1183
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
1068
1184
  messages?: Prisma.ChatMessageUncheckedCreateNestedManyWithoutThreadInput
1069
1185
  runs?: Prisma.ChatRunUncheckedCreateNestedManyWithoutThreadInput
1070
1186
  interrupts?: Prisma.ChatInterruptUncheckedCreateNestedManyWithoutThreadInput
@@ -1096,6 +1212,8 @@ export type ChatThreadUpdateWithoutGenerationsInput = {
1096
1212
  engine?: Prisma.StringFieldUpdateOperationsInput | string
1097
1213
  localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1098
1214
  localAgentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1215
+ indexRevision?: Prisma.IntFieldUpdateOperationsInput | number
1216
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
1099
1217
  user?: Prisma.UserUpdateOneRequiredWithoutChatThreadsNestedInput
1100
1218
  messages?: Prisma.ChatMessageUpdateManyWithoutThreadNestedInput
1101
1219
  runs?: Prisma.ChatRunUpdateManyWithoutThreadNestedInput
@@ -1117,6 +1235,8 @@ export type ChatThreadUncheckedUpdateWithoutGenerationsInput = {
1117
1235
  engine?: Prisma.StringFieldUpdateOperationsInput | string
1118
1236
  localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1119
1237
  localAgentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1238
+ indexRevision?: Prisma.IntFieldUpdateOperationsInput | number
1239
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
1120
1240
  messages?: Prisma.ChatMessageUncheckedUpdateManyWithoutThreadNestedInput
1121
1241
  runs?: Prisma.ChatRunUncheckedUpdateManyWithoutThreadNestedInput
1122
1242
  interrupts?: Prisma.ChatInterruptUncheckedUpdateManyWithoutThreadNestedInput
@@ -1132,6 +1252,8 @@ export type ChatThreadCreateWithoutAgentInput = {
1132
1252
  engine?: string
1133
1253
  localCwd?: string | null
1134
1254
  localAgentId?: string | null
1255
+ indexRevision?: number
1256
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
1135
1257
  user: Prisma.UserCreateNestedOneWithoutChatThreadsInput
1136
1258
  messages?: Prisma.ChatMessageCreateNestedManyWithoutThreadInput
1137
1259
  runs?: Prisma.ChatRunCreateNestedManyWithoutThreadInput
@@ -1152,6 +1274,8 @@ export type ChatThreadUncheckedCreateWithoutAgentInput = {
1152
1274
  engine?: string
1153
1275
  localCwd?: string | null
1154
1276
  localAgentId?: string | null
1277
+ indexRevision?: number
1278
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
1155
1279
  messages?: Prisma.ChatMessageUncheckedCreateNestedManyWithoutThreadInput
1156
1280
  runs?: Prisma.ChatRunUncheckedCreateNestedManyWithoutThreadInput
1157
1281
  interrupts?: Prisma.ChatInterruptUncheckedCreateNestedManyWithoutThreadInput
@@ -1194,6 +1318,8 @@ export type ChatThreadCreateWithoutWorkspaceInput = {
1194
1318
  engine?: string
1195
1319
  localCwd?: string | null
1196
1320
  localAgentId?: string | null
1321
+ indexRevision?: number
1322
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
1197
1323
  user: Prisma.UserCreateNestedOneWithoutChatThreadsInput
1198
1324
  messages?: Prisma.ChatMessageCreateNestedManyWithoutThreadInput
1199
1325
  runs?: Prisma.ChatRunCreateNestedManyWithoutThreadInput
@@ -1214,6 +1340,8 @@ export type ChatThreadUncheckedCreateWithoutWorkspaceInput = {
1214
1340
  engine?: string
1215
1341
  localCwd?: string | null
1216
1342
  localAgentId?: string | null
1343
+ indexRevision?: number
1344
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
1217
1345
  messages?: Prisma.ChatMessageUncheckedCreateNestedManyWithoutThreadInput
1218
1346
  runs?: Prisma.ChatRunUncheckedCreateNestedManyWithoutThreadInput
1219
1347
  interrupts?: Prisma.ChatInterruptUncheckedCreateNestedManyWithoutThreadInput
@@ -1258,6 +1386,8 @@ export type ChatThreadCreateManyUserInput = {
1258
1386
  engine?: string
1259
1387
  localCwd?: string | null
1260
1388
  localAgentId?: string | null
1389
+ indexRevision?: number
1390
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
1261
1391
  }
1262
1392
 
1263
1393
  export type ChatThreadUpdateWithoutUserInput = {
@@ -1270,6 +1400,8 @@ export type ChatThreadUpdateWithoutUserInput = {
1270
1400
  engine?: Prisma.StringFieldUpdateOperationsInput | string
1271
1401
  localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1272
1402
  localAgentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1403
+ indexRevision?: Prisma.IntFieldUpdateOperationsInput | number
1404
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
1273
1405
  messages?: Prisma.ChatMessageUpdateManyWithoutThreadNestedInput
1274
1406
  runs?: Prisma.ChatRunUpdateManyWithoutThreadNestedInput
1275
1407
  interrupts?: Prisma.ChatInterruptUpdateManyWithoutThreadNestedInput
@@ -1290,6 +1422,8 @@ export type ChatThreadUncheckedUpdateWithoutUserInput = {
1290
1422
  engine?: Prisma.StringFieldUpdateOperationsInput | string
1291
1423
  localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1292
1424
  localAgentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1425
+ indexRevision?: Prisma.IntFieldUpdateOperationsInput | number
1426
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
1293
1427
  messages?: Prisma.ChatMessageUncheckedUpdateManyWithoutThreadNestedInput
1294
1428
  runs?: Prisma.ChatRunUncheckedUpdateManyWithoutThreadNestedInput
1295
1429
  interrupts?: Prisma.ChatInterruptUncheckedUpdateManyWithoutThreadNestedInput
@@ -1308,6 +1442,8 @@ export type ChatThreadUncheckedUpdateManyWithoutUserInput = {
1308
1442
  engine?: Prisma.StringFieldUpdateOperationsInput | string
1309
1443
  localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1310
1444
  localAgentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1445
+ indexRevision?: Prisma.IntFieldUpdateOperationsInput | number
1446
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
1311
1447
  }
1312
1448
 
1313
1449
  export type ChatThreadCreateManyAgentInput = {
@@ -1322,6 +1458,8 @@ export type ChatThreadCreateManyAgentInput = {
1322
1458
  engine?: string
1323
1459
  localCwd?: string | null
1324
1460
  localAgentId?: string | null
1461
+ indexRevision?: number
1462
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
1325
1463
  }
1326
1464
 
1327
1465
  export type ChatThreadUpdateWithoutAgentInput = {
@@ -1334,6 +1472,8 @@ export type ChatThreadUpdateWithoutAgentInput = {
1334
1472
  engine?: Prisma.StringFieldUpdateOperationsInput | string
1335
1473
  localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1336
1474
  localAgentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1475
+ indexRevision?: Prisma.IntFieldUpdateOperationsInput | number
1476
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
1337
1477
  user?: Prisma.UserUpdateOneRequiredWithoutChatThreadsNestedInput
1338
1478
  messages?: Prisma.ChatMessageUpdateManyWithoutThreadNestedInput
1339
1479
  runs?: Prisma.ChatRunUpdateManyWithoutThreadNestedInput
@@ -1354,6 +1494,8 @@ export type ChatThreadUncheckedUpdateWithoutAgentInput = {
1354
1494
  engine?: Prisma.StringFieldUpdateOperationsInput | string
1355
1495
  localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1356
1496
  localAgentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1497
+ indexRevision?: Prisma.IntFieldUpdateOperationsInput | number
1498
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
1357
1499
  messages?: Prisma.ChatMessageUncheckedUpdateManyWithoutThreadNestedInput
1358
1500
  runs?: Prisma.ChatRunUncheckedUpdateManyWithoutThreadNestedInput
1359
1501
  interrupts?: Prisma.ChatInterruptUncheckedUpdateManyWithoutThreadNestedInput
@@ -1372,6 +1514,8 @@ export type ChatThreadUncheckedUpdateManyWithoutAgentInput = {
1372
1514
  engine?: Prisma.StringFieldUpdateOperationsInput | string
1373
1515
  localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1374
1516
  localAgentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1517
+ indexRevision?: Prisma.IntFieldUpdateOperationsInput | number
1518
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
1375
1519
  }
1376
1520
 
1377
1521
  export type ChatThreadCreateManyWorkspaceInput = {
@@ -1386,6 +1530,8 @@ export type ChatThreadCreateManyWorkspaceInput = {
1386
1530
  engine?: string
1387
1531
  localCwd?: string | null
1388
1532
  localAgentId?: string | null
1533
+ indexRevision?: number
1534
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
1389
1535
  }
1390
1536
 
1391
1537
  export type ChatThreadUpdateWithoutWorkspaceInput = {
@@ -1398,6 +1544,8 @@ export type ChatThreadUpdateWithoutWorkspaceInput = {
1398
1544
  engine?: Prisma.StringFieldUpdateOperationsInput | string
1399
1545
  localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1400
1546
  localAgentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1547
+ indexRevision?: Prisma.IntFieldUpdateOperationsInput | number
1548
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
1401
1549
  user?: Prisma.UserUpdateOneRequiredWithoutChatThreadsNestedInput
1402
1550
  messages?: Prisma.ChatMessageUpdateManyWithoutThreadNestedInput
1403
1551
  runs?: Prisma.ChatRunUpdateManyWithoutThreadNestedInput
@@ -1418,6 +1566,8 @@ export type ChatThreadUncheckedUpdateWithoutWorkspaceInput = {
1418
1566
  engine?: Prisma.StringFieldUpdateOperationsInput | string
1419
1567
  localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1420
1568
  localAgentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1569
+ indexRevision?: Prisma.IntFieldUpdateOperationsInput | number
1570
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
1421
1571
  messages?: Prisma.ChatMessageUncheckedUpdateManyWithoutThreadNestedInput
1422
1572
  runs?: Prisma.ChatRunUncheckedUpdateManyWithoutThreadNestedInput
1423
1573
  interrupts?: Prisma.ChatInterruptUncheckedUpdateManyWithoutThreadNestedInput
@@ -1436,6 +1586,8 @@ export type ChatThreadUncheckedUpdateManyWithoutWorkspaceInput = {
1436
1586
  engine?: Prisma.StringFieldUpdateOperationsInput | string
1437
1587
  localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1438
1588
  localAgentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1589
+ indexRevision?: Prisma.IntFieldUpdateOperationsInput | number
1590
+ indexMetadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
1439
1591
  }
1440
1592
 
1441
1593
 
@@ -1509,6 +1661,8 @@ export type ChatThreadSelect<ExtArgs extends runtime.Types.Extensions.InternalAr
1509
1661
  engine?: boolean
1510
1662
  localCwd?: boolean
1511
1663
  localAgentId?: boolean
1664
+ indexRevision?: boolean
1665
+ indexMetadata?: boolean
1512
1666
  user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
1513
1667
  messages?: boolean | Prisma.ChatThread$messagesArgs<ExtArgs>
1514
1668
  runs?: boolean | Prisma.ChatThread$runsArgs<ExtArgs>
@@ -1532,6 +1686,8 @@ export type ChatThreadSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Ex
1532
1686
  engine?: boolean
1533
1687
  localCwd?: boolean
1534
1688
  localAgentId?: boolean
1689
+ indexRevision?: boolean
1690
+ indexMetadata?: boolean
1535
1691
  user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
1536
1692
  agent?: boolean | Prisma.ChatThread$agentArgs<ExtArgs>
1537
1693
  workspace?: boolean | Prisma.ChatThread$workspaceArgs<ExtArgs>
@@ -1550,6 +1706,8 @@ export type ChatThreadSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Ex
1550
1706
  engine?: boolean
1551
1707
  localCwd?: boolean
1552
1708
  localAgentId?: boolean
1709
+ indexRevision?: boolean
1710
+ indexMetadata?: boolean
1553
1711
  user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
1554
1712
  agent?: boolean | Prisma.ChatThread$agentArgs<ExtArgs>
1555
1713
  workspace?: boolean | Prisma.ChatThread$workspaceArgs<ExtArgs>
@@ -1568,9 +1726,11 @@ export type ChatThreadSelectScalar = {
1568
1726
  engine?: boolean
1569
1727
  localCwd?: boolean
1570
1728
  localAgentId?: boolean
1729
+ indexRevision?: boolean
1730
+ indexMetadata?: boolean
1571
1731
  }
1572
1732
 
1573
- export type ChatThreadOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "userId" | "title" | "isArchived" | "sandboxPolicy" | "createdAt" | "updatedAt" | "agentId" | "workspaceId" | "engine" | "localCwd" | "localAgentId", ExtArgs["result"]["chatThread"]>
1733
+ export type ChatThreadOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "userId" | "title" | "isArchived" | "sandboxPolicy" | "createdAt" | "updatedAt" | "agentId" | "workspaceId" | "engine" | "localCwd" | "localAgentId" | "indexRevision" | "indexMetadata", ExtArgs["result"]["chatThread"]>
1574
1734
  export type ChatThreadInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1575
1735
  user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
1576
1736
  messages?: boolean | Prisma.ChatThread$messagesArgs<ExtArgs>
@@ -1622,9 +1782,19 @@ export type $ChatThreadPayload<ExtArgs extends runtime.Types.Extensions.Internal
1622
1782
  */
1623
1783
  localCwd: string | null
1624
1784
  /**
1625
- * 本地 agent 选择(engine=local 时):'pi'(内置引擎,null 视同)/ 'acp:<catalogId>'
1785
+ * 本地 agent 选择(engine=local 时):'acp:<catalogId>';null = 未选择
1786
+ * (pi 内置引擎已剥离,T3.1/#643——存量 'pi' 行为脏数据,按 D13 手动清理)
1626
1787
  */
1627
1788
  localAgentId: string | null
1789
+ /**
1790
+ * harness 会话桥接预留(Phase 2 T2.7):会话索引 CAS 版本号与扩展元数据。
1791
+ * 注意:conformance 级 SessionIndexStore 载体是独立表 HarnessSession(见该模型注释,
1792
+ * 因官方 testkit 要求同 threadId 跨 tenant 两条 entry + members 可空 + epoch ms 精确
1793
+ * round-trip,ChatThread 单列主键 + userId NOT NULL + DateTime 无法满足);
1794
+ * 此二列供 Phase 2 侧栏 conversations serverFn 与 harness 会话桥接时做乐观并发与扩展字段。
1795
+ */
1796
+ indexRevision: number
1797
+ indexMetadata: runtime.JsonValue | null
1628
1798
  }, ExtArgs["result"]["chatThread"]>
1629
1799
  composites: {}
1630
1800
  }
@@ -2067,6 +2237,8 @@ export interface ChatThreadFieldRefs {
2067
2237
  readonly engine: Prisma.FieldRef<"ChatThread", 'String'>
2068
2238
  readonly localCwd: Prisma.FieldRef<"ChatThread", 'String'>
2069
2239
  readonly localAgentId: Prisma.FieldRef<"ChatThread", 'String'>
2240
+ readonly indexRevision: Prisma.FieldRef<"ChatThread", 'Int'>
2241
+ readonly indexMetadata: Prisma.FieldRef<"ChatThread", 'Json'>
2070
2242
  }
2071
2243
 
2072
2244