@allbluecn/database 0.12.3 → 0.13.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.
@@ -11542,7 +11542,9 @@ export const ChatThreadScalarFieldEnum = {
11542
11542
  createdAt: 'createdAt',
11543
11543
  updatedAt: 'updatedAt',
11544
11544
  agentId: 'agentId',
11545
- workspaceId: 'workspaceId'
11545
+ workspaceId: 'workspaceId',
11546
+ engine: 'engine',
11547
+ localCwd: 'localCwd'
11546
11548
  } as const
11547
11549
 
11548
11550
  export type ChatThreadScalarFieldEnum = (typeof ChatThreadScalarFieldEnum)[keyof typeof ChatThreadScalarFieldEnum]
@@ -397,7 +397,9 @@ export const ChatThreadScalarFieldEnum = {
397
397
  createdAt: 'createdAt',
398
398
  updatedAt: 'updatedAt',
399
399
  agentId: 'agentId',
400
- workspaceId: 'workspaceId'
400
+ workspaceId: 'workspaceId',
401
+ engine: 'engine',
402
+ localCwd: 'localCwd'
401
403
  } as const
402
404
 
403
405
  export type ChatThreadScalarFieldEnum = (typeof ChatThreadScalarFieldEnum)[keyof typeof ChatThreadScalarFieldEnum]
@@ -34,6 +34,8 @@ export type ChatThreadMinAggregateOutputType = {
34
34
  updatedAt: Date | null
35
35
  agentId: string | null
36
36
  workspaceId: string | null
37
+ engine: string | null
38
+ localCwd: string | null
37
39
  }
38
40
 
39
41
  export type ChatThreadMaxAggregateOutputType = {
@@ -46,6 +48,8 @@ export type ChatThreadMaxAggregateOutputType = {
46
48
  updatedAt: Date | null
47
49
  agentId: string | null
48
50
  workspaceId: string | null
51
+ engine: string | null
52
+ localCwd: string | null
49
53
  }
50
54
 
51
55
  export type ChatThreadCountAggregateOutputType = {
@@ -58,6 +62,8 @@ export type ChatThreadCountAggregateOutputType = {
58
62
  updatedAt: number
59
63
  agentId: number
60
64
  workspaceId: number
65
+ engine: number
66
+ localCwd: number
61
67
  _all: number
62
68
  }
63
69
 
@@ -72,6 +78,8 @@ export type ChatThreadMinAggregateInputType = {
72
78
  updatedAt?: true
73
79
  agentId?: true
74
80
  workspaceId?: true
81
+ engine?: true
82
+ localCwd?: true
75
83
  }
76
84
 
77
85
  export type ChatThreadMaxAggregateInputType = {
@@ -84,6 +92,8 @@ export type ChatThreadMaxAggregateInputType = {
84
92
  updatedAt?: true
85
93
  agentId?: true
86
94
  workspaceId?: true
95
+ engine?: true
96
+ localCwd?: true
87
97
  }
88
98
 
89
99
  export type ChatThreadCountAggregateInputType = {
@@ -96,6 +106,8 @@ export type ChatThreadCountAggregateInputType = {
96
106
  updatedAt?: true
97
107
  agentId?: true
98
108
  workspaceId?: true
109
+ engine?: true
110
+ localCwd?: true
99
111
  _all?: true
100
112
  }
101
113
 
@@ -181,6 +193,8 @@ export type ChatThreadGroupByOutputType = {
181
193
  updatedAt: Date
182
194
  agentId: string | null
183
195
  workspaceId: string | null
196
+ engine: string
197
+ localCwd: string | null
184
198
  _count: ChatThreadCountAggregateOutputType | null
185
199
  _min: ChatThreadMinAggregateOutputType | null
186
200
  _max: ChatThreadMaxAggregateOutputType | null
@@ -214,6 +228,8 @@ export type ChatThreadWhereInput = {
214
228
  updatedAt?: Prisma.DateTimeFilter<"ChatThread"> | Date | string
215
229
  agentId?: Prisma.StringNullableFilter<"ChatThread"> | string | null
216
230
  workspaceId?: Prisma.StringNullableFilter<"ChatThread"> | string | null
231
+ engine?: Prisma.StringFilter<"ChatThread"> | string
232
+ localCwd?: Prisma.StringNullableFilter<"ChatThread"> | string | null
217
233
  user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
218
234
  messages?: Prisma.ChatMessageListRelationFilter
219
235
  runs?: Prisma.ChatRunListRelationFilter
@@ -233,6 +249,8 @@ export type ChatThreadOrderByWithRelationInput = {
233
249
  updatedAt?: Prisma.SortOrder
234
250
  agentId?: Prisma.SortOrderInput | Prisma.SortOrder
235
251
  workspaceId?: Prisma.SortOrderInput | Prisma.SortOrder
252
+ engine?: Prisma.SortOrder
253
+ localCwd?: Prisma.SortOrderInput | Prisma.SortOrder
236
254
  user?: Prisma.UserOrderByWithRelationInput
237
255
  messages?: Prisma.ChatMessageOrderByRelationAggregateInput
238
256
  runs?: Prisma.ChatRunOrderByRelationAggregateInput
@@ -255,6 +273,8 @@ export type ChatThreadWhereUniqueInput = Prisma.AtLeast<{
255
273
  updatedAt?: Prisma.DateTimeFilter<"ChatThread"> | Date | string
256
274
  agentId?: Prisma.StringNullableFilter<"ChatThread"> | string | null
257
275
  workspaceId?: Prisma.StringNullableFilter<"ChatThread"> | string | null
276
+ engine?: Prisma.StringFilter<"ChatThread"> | string
277
+ localCwd?: Prisma.StringNullableFilter<"ChatThread"> | string | null
258
278
  user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
259
279
  messages?: Prisma.ChatMessageListRelationFilter
260
280
  runs?: Prisma.ChatRunListRelationFilter
@@ -274,6 +294,8 @@ export type ChatThreadOrderByWithAggregationInput = {
274
294
  updatedAt?: Prisma.SortOrder
275
295
  agentId?: Prisma.SortOrderInput | Prisma.SortOrder
276
296
  workspaceId?: Prisma.SortOrderInput | Prisma.SortOrder
297
+ engine?: Prisma.SortOrder
298
+ localCwd?: Prisma.SortOrderInput | Prisma.SortOrder
277
299
  _count?: Prisma.ChatThreadCountOrderByAggregateInput
278
300
  _max?: Prisma.ChatThreadMaxOrderByAggregateInput
279
301
  _min?: Prisma.ChatThreadMinOrderByAggregateInput
@@ -292,6 +314,8 @@ export type ChatThreadScalarWhereWithAggregatesInput = {
292
314
  updatedAt?: Prisma.DateTimeWithAggregatesFilter<"ChatThread"> | Date | string
293
315
  agentId?: Prisma.StringNullableWithAggregatesFilter<"ChatThread"> | string | null
294
316
  workspaceId?: Prisma.StringNullableWithAggregatesFilter<"ChatThread"> | string | null
317
+ engine?: Prisma.StringWithAggregatesFilter<"ChatThread"> | string
318
+ localCwd?: Prisma.StringNullableWithAggregatesFilter<"ChatThread"> | string | null
295
319
  }
296
320
 
297
321
  export type ChatThreadCreateInput = {
@@ -301,6 +325,8 @@ export type ChatThreadCreateInput = {
301
325
  sandboxPolicy?: string
302
326
  createdAt?: Date | string
303
327
  updatedAt?: Date | string
328
+ engine?: string
329
+ localCwd?: string | null
304
330
  user: Prisma.UserCreateNestedOneWithoutChatThreadsInput
305
331
  messages?: Prisma.ChatMessageCreateNestedManyWithoutThreadInput
306
332
  runs?: Prisma.ChatRunCreateNestedManyWithoutThreadInput
@@ -320,6 +346,8 @@ export type ChatThreadUncheckedCreateInput = {
320
346
  updatedAt?: Date | string
321
347
  agentId?: string | null
322
348
  workspaceId?: string | null
349
+ engine?: string
350
+ localCwd?: string | null
323
351
  messages?: Prisma.ChatMessageUncheckedCreateNestedManyWithoutThreadInput
324
352
  runs?: Prisma.ChatRunUncheckedCreateNestedManyWithoutThreadInput
325
353
  interrupts?: Prisma.ChatInterruptUncheckedCreateNestedManyWithoutThreadInput
@@ -333,6 +361,8 @@ export type ChatThreadUpdateInput = {
333
361
  sandboxPolicy?: Prisma.StringFieldUpdateOperationsInput | string
334
362
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
335
363
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
364
+ engine?: Prisma.StringFieldUpdateOperationsInput | string
365
+ localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
336
366
  user?: Prisma.UserUpdateOneRequiredWithoutChatThreadsNestedInput
337
367
  messages?: Prisma.ChatMessageUpdateManyWithoutThreadNestedInput
338
368
  runs?: Prisma.ChatRunUpdateManyWithoutThreadNestedInput
@@ -352,6 +382,8 @@ export type ChatThreadUncheckedUpdateInput = {
352
382
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
353
383
  agentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
354
384
  workspaceId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
385
+ engine?: Prisma.StringFieldUpdateOperationsInput | string
386
+ localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
355
387
  messages?: Prisma.ChatMessageUncheckedUpdateManyWithoutThreadNestedInput
356
388
  runs?: Prisma.ChatRunUncheckedUpdateManyWithoutThreadNestedInput
357
389
  interrupts?: Prisma.ChatInterruptUncheckedUpdateManyWithoutThreadNestedInput
@@ -368,6 +400,8 @@ export type ChatThreadCreateManyInput = {
368
400
  updatedAt?: Date | string
369
401
  agentId?: string | null
370
402
  workspaceId?: string | null
403
+ engine?: string
404
+ localCwd?: string | null
371
405
  }
372
406
 
373
407
  export type ChatThreadUpdateManyMutationInput = {
@@ -377,6 +411,8 @@ export type ChatThreadUpdateManyMutationInput = {
377
411
  sandboxPolicy?: Prisma.StringFieldUpdateOperationsInput | string
378
412
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
379
413
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
414
+ engine?: Prisma.StringFieldUpdateOperationsInput | string
415
+ localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
380
416
  }
381
417
 
382
418
  export type ChatThreadUncheckedUpdateManyInput = {
@@ -389,6 +425,8 @@ export type ChatThreadUncheckedUpdateManyInput = {
389
425
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
390
426
  agentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
391
427
  workspaceId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
428
+ engine?: Prisma.StringFieldUpdateOperationsInput | string
429
+ localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
392
430
  }
393
431
 
394
432
  export type ChatThreadListRelationFilter = {
@@ -411,6 +449,8 @@ export type ChatThreadCountOrderByAggregateInput = {
411
449
  updatedAt?: Prisma.SortOrder
412
450
  agentId?: Prisma.SortOrder
413
451
  workspaceId?: Prisma.SortOrder
452
+ engine?: Prisma.SortOrder
453
+ localCwd?: Prisma.SortOrder
414
454
  }
415
455
 
416
456
  export type ChatThreadMaxOrderByAggregateInput = {
@@ -423,6 +463,8 @@ export type ChatThreadMaxOrderByAggregateInput = {
423
463
  updatedAt?: Prisma.SortOrder
424
464
  agentId?: Prisma.SortOrder
425
465
  workspaceId?: Prisma.SortOrder
466
+ engine?: Prisma.SortOrder
467
+ localCwd?: Prisma.SortOrder
426
468
  }
427
469
 
428
470
  export type ChatThreadMinOrderByAggregateInput = {
@@ -435,6 +477,8 @@ export type ChatThreadMinOrderByAggregateInput = {
435
477
  updatedAt?: Prisma.SortOrder
436
478
  agentId?: Prisma.SortOrder
437
479
  workspaceId?: Prisma.SortOrder
480
+ engine?: Prisma.SortOrder
481
+ localCwd?: Prisma.SortOrder
438
482
  }
439
483
 
440
484
  export type ChatThreadScalarRelationFilter = {
@@ -631,6 +675,8 @@ export type ChatThreadCreateWithoutUserInput = {
631
675
  sandboxPolicy?: string
632
676
  createdAt?: Date | string
633
677
  updatedAt?: Date | string
678
+ engine?: string
679
+ localCwd?: string | null
634
680
  messages?: Prisma.ChatMessageCreateNestedManyWithoutThreadInput
635
681
  runs?: Prisma.ChatRunCreateNestedManyWithoutThreadInput
636
682
  interrupts?: Prisma.ChatInterruptCreateNestedManyWithoutThreadInput
@@ -648,6 +694,8 @@ export type ChatThreadUncheckedCreateWithoutUserInput = {
648
694
  updatedAt?: Date | string
649
695
  agentId?: string | null
650
696
  workspaceId?: string | null
697
+ engine?: string
698
+ localCwd?: string | null
651
699
  messages?: Prisma.ChatMessageUncheckedCreateNestedManyWithoutThreadInput
652
700
  runs?: Prisma.ChatRunUncheckedCreateNestedManyWithoutThreadInput
653
701
  interrupts?: Prisma.ChatInterruptUncheckedCreateNestedManyWithoutThreadInput
@@ -693,6 +741,8 @@ export type ChatThreadScalarWhereInput = {
693
741
  updatedAt?: Prisma.DateTimeFilter<"ChatThread"> | Date | string
694
742
  agentId?: Prisma.StringNullableFilter<"ChatThread"> | string | null
695
743
  workspaceId?: Prisma.StringNullableFilter<"ChatThread"> | string | null
744
+ engine?: Prisma.StringFilter<"ChatThread"> | string
745
+ localCwd?: Prisma.StringNullableFilter<"ChatThread"> | string | null
696
746
  }
697
747
 
698
748
  export type ChatThreadCreateWithoutMessagesInput = {
@@ -702,6 +752,8 @@ export type ChatThreadCreateWithoutMessagesInput = {
702
752
  sandboxPolicy?: string
703
753
  createdAt?: Date | string
704
754
  updatedAt?: Date | string
755
+ engine?: string
756
+ localCwd?: string | null
705
757
  user: Prisma.UserCreateNestedOneWithoutChatThreadsInput
706
758
  runs?: Prisma.ChatRunCreateNestedManyWithoutThreadInput
707
759
  interrupts?: Prisma.ChatInterruptCreateNestedManyWithoutThreadInput
@@ -720,6 +772,8 @@ export type ChatThreadUncheckedCreateWithoutMessagesInput = {
720
772
  updatedAt?: Date | string
721
773
  agentId?: string | null
722
774
  workspaceId?: string | null
775
+ engine?: string
776
+ localCwd?: string | null
723
777
  runs?: Prisma.ChatRunUncheckedCreateNestedManyWithoutThreadInput
724
778
  interrupts?: Prisma.ChatInterruptUncheckedCreateNestedManyWithoutThreadInput
725
779
  generations?: Prisma.GenerationRunUncheckedCreateNestedManyWithoutThreadInput
@@ -748,6 +802,8 @@ export type ChatThreadUpdateWithoutMessagesInput = {
748
802
  sandboxPolicy?: Prisma.StringFieldUpdateOperationsInput | string
749
803
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
750
804
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
805
+ engine?: Prisma.StringFieldUpdateOperationsInput | string
806
+ localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
751
807
  user?: Prisma.UserUpdateOneRequiredWithoutChatThreadsNestedInput
752
808
  runs?: Prisma.ChatRunUpdateManyWithoutThreadNestedInput
753
809
  interrupts?: Prisma.ChatInterruptUpdateManyWithoutThreadNestedInput
@@ -766,6 +822,8 @@ export type ChatThreadUncheckedUpdateWithoutMessagesInput = {
766
822
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
767
823
  agentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
768
824
  workspaceId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
825
+ engine?: Prisma.StringFieldUpdateOperationsInput | string
826
+ localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
769
827
  runs?: Prisma.ChatRunUncheckedUpdateManyWithoutThreadNestedInput
770
828
  interrupts?: Prisma.ChatInterruptUncheckedUpdateManyWithoutThreadNestedInput
771
829
  generations?: Prisma.GenerationRunUncheckedUpdateManyWithoutThreadNestedInput
@@ -778,6 +836,8 @@ export type ChatThreadCreateWithoutRunsInput = {
778
836
  sandboxPolicy?: string
779
837
  createdAt?: Date | string
780
838
  updatedAt?: Date | string
839
+ engine?: string
840
+ localCwd?: string | null
781
841
  user: Prisma.UserCreateNestedOneWithoutChatThreadsInput
782
842
  messages?: Prisma.ChatMessageCreateNestedManyWithoutThreadInput
783
843
  interrupts?: Prisma.ChatInterruptCreateNestedManyWithoutThreadInput
@@ -796,6 +856,8 @@ export type ChatThreadUncheckedCreateWithoutRunsInput = {
796
856
  updatedAt?: Date | string
797
857
  agentId?: string | null
798
858
  workspaceId?: string | null
859
+ engine?: string
860
+ localCwd?: string | null
799
861
  messages?: Prisma.ChatMessageUncheckedCreateNestedManyWithoutThreadInput
800
862
  interrupts?: Prisma.ChatInterruptUncheckedCreateNestedManyWithoutThreadInput
801
863
  generations?: Prisma.GenerationRunUncheckedCreateNestedManyWithoutThreadInput
@@ -824,6 +886,8 @@ export type ChatThreadUpdateWithoutRunsInput = {
824
886
  sandboxPolicy?: Prisma.StringFieldUpdateOperationsInput | string
825
887
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
826
888
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
889
+ engine?: Prisma.StringFieldUpdateOperationsInput | string
890
+ localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
827
891
  user?: Prisma.UserUpdateOneRequiredWithoutChatThreadsNestedInput
828
892
  messages?: Prisma.ChatMessageUpdateManyWithoutThreadNestedInput
829
893
  interrupts?: Prisma.ChatInterruptUpdateManyWithoutThreadNestedInput
@@ -842,6 +906,8 @@ export type ChatThreadUncheckedUpdateWithoutRunsInput = {
842
906
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
843
907
  agentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
844
908
  workspaceId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
909
+ engine?: Prisma.StringFieldUpdateOperationsInput | string
910
+ localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
845
911
  messages?: Prisma.ChatMessageUncheckedUpdateManyWithoutThreadNestedInput
846
912
  interrupts?: Prisma.ChatInterruptUncheckedUpdateManyWithoutThreadNestedInput
847
913
  generations?: Prisma.GenerationRunUncheckedUpdateManyWithoutThreadNestedInput
@@ -854,6 +920,8 @@ export type ChatThreadCreateWithoutInterruptsInput = {
854
920
  sandboxPolicy?: string
855
921
  createdAt?: Date | string
856
922
  updatedAt?: Date | string
923
+ engine?: string
924
+ localCwd?: string | null
857
925
  user: Prisma.UserCreateNestedOneWithoutChatThreadsInput
858
926
  messages?: Prisma.ChatMessageCreateNestedManyWithoutThreadInput
859
927
  runs?: Prisma.ChatRunCreateNestedManyWithoutThreadInput
@@ -872,6 +940,8 @@ export type ChatThreadUncheckedCreateWithoutInterruptsInput = {
872
940
  updatedAt?: Date | string
873
941
  agentId?: string | null
874
942
  workspaceId?: string | null
943
+ engine?: string
944
+ localCwd?: string | null
875
945
  messages?: Prisma.ChatMessageUncheckedCreateNestedManyWithoutThreadInput
876
946
  runs?: Prisma.ChatRunUncheckedCreateNestedManyWithoutThreadInput
877
947
  generations?: Prisma.GenerationRunUncheckedCreateNestedManyWithoutThreadInput
@@ -900,6 +970,8 @@ export type ChatThreadUpdateWithoutInterruptsInput = {
900
970
  sandboxPolicy?: Prisma.StringFieldUpdateOperationsInput | string
901
971
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
902
972
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
973
+ engine?: Prisma.StringFieldUpdateOperationsInput | string
974
+ localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
903
975
  user?: Prisma.UserUpdateOneRequiredWithoutChatThreadsNestedInput
904
976
  messages?: Prisma.ChatMessageUpdateManyWithoutThreadNestedInput
905
977
  runs?: Prisma.ChatRunUpdateManyWithoutThreadNestedInput
@@ -918,6 +990,8 @@ export type ChatThreadUncheckedUpdateWithoutInterruptsInput = {
918
990
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
919
991
  agentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
920
992
  workspaceId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
993
+ engine?: Prisma.StringFieldUpdateOperationsInput | string
994
+ localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
921
995
  messages?: Prisma.ChatMessageUncheckedUpdateManyWithoutThreadNestedInput
922
996
  runs?: Prisma.ChatRunUncheckedUpdateManyWithoutThreadNestedInput
923
997
  generations?: Prisma.GenerationRunUncheckedUpdateManyWithoutThreadNestedInput
@@ -930,6 +1004,8 @@ export type ChatThreadCreateWithoutGenerationsInput = {
930
1004
  sandboxPolicy?: string
931
1005
  createdAt?: Date | string
932
1006
  updatedAt?: Date | string
1007
+ engine?: string
1008
+ localCwd?: string | null
933
1009
  user: Prisma.UserCreateNestedOneWithoutChatThreadsInput
934
1010
  messages?: Prisma.ChatMessageCreateNestedManyWithoutThreadInput
935
1011
  runs?: Prisma.ChatRunCreateNestedManyWithoutThreadInput
@@ -948,6 +1024,8 @@ export type ChatThreadUncheckedCreateWithoutGenerationsInput = {
948
1024
  updatedAt?: Date | string
949
1025
  agentId?: string | null
950
1026
  workspaceId?: string | null
1027
+ engine?: string
1028
+ localCwd?: string | null
951
1029
  messages?: Prisma.ChatMessageUncheckedCreateNestedManyWithoutThreadInput
952
1030
  runs?: Prisma.ChatRunUncheckedCreateNestedManyWithoutThreadInput
953
1031
  interrupts?: Prisma.ChatInterruptUncheckedCreateNestedManyWithoutThreadInput
@@ -976,6 +1054,8 @@ export type ChatThreadUpdateWithoutGenerationsInput = {
976
1054
  sandboxPolicy?: Prisma.StringFieldUpdateOperationsInput | string
977
1055
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
978
1056
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
1057
+ engine?: Prisma.StringFieldUpdateOperationsInput | string
1058
+ localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
979
1059
  user?: Prisma.UserUpdateOneRequiredWithoutChatThreadsNestedInput
980
1060
  messages?: Prisma.ChatMessageUpdateManyWithoutThreadNestedInput
981
1061
  runs?: Prisma.ChatRunUpdateManyWithoutThreadNestedInput
@@ -994,6 +1074,8 @@ export type ChatThreadUncheckedUpdateWithoutGenerationsInput = {
994
1074
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
995
1075
  agentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
996
1076
  workspaceId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1077
+ engine?: Prisma.StringFieldUpdateOperationsInput | string
1078
+ localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
997
1079
  messages?: Prisma.ChatMessageUncheckedUpdateManyWithoutThreadNestedInput
998
1080
  runs?: Prisma.ChatRunUncheckedUpdateManyWithoutThreadNestedInput
999
1081
  interrupts?: Prisma.ChatInterruptUncheckedUpdateManyWithoutThreadNestedInput
@@ -1006,6 +1088,8 @@ export type ChatThreadCreateWithoutAgentInput = {
1006
1088
  sandboxPolicy?: string
1007
1089
  createdAt?: Date | string
1008
1090
  updatedAt?: Date | string
1091
+ engine?: string
1092
+ localCwd?: string | null
1009
1093
  user: Prisma.UserCreateNestedOneWithoutChatThreadsInput
1010
1094
  messages?: Prisma.ChatMessageCreateNestedManyWithoutThreadInput
1011
1095
  runs?: Prisma.ChatRunCreateNestedManyWithoutThreadInput
@@ -1023,6 +1107,8 @@ export type ChatThreadUncheckedCreateWithoutAgentInput = {
1023
1107
  createdAt?: Date | string
1024
1108
  updatedAt?: Date | string
1025
1109
  workspaceId?: string | null
1110
+ engine?: string
1111
+ localCwd?: string | null
1026
1112
  messages?: Prisma.ChatMessageUncheckedCreateNestedManyWithoutThreadInput
1027
1113
  runs?: Prisma.ChatRunUncheckedCreateNestedManyWithoutThreadInput
1028
1114
  interrupts?: Prisma.ChatInterruptUncheckedCreateNestedManyWithoutThreadInput
@@ -1062,6 +1148,8 @@ export type ChatThreadCreateWithoutWorkspaceInput = {
1062
1148
  sandboxPolicy?: string
1063
1149
  createdAt?: Date | string
1064
1150
  updatedAt?: Date | string
1151
+ engine?: string
1152
+ localCwd?: string | null
1065
1153
  user: Prisma.UserCreateNestedOneWithoutChatThreadsInput
1066
1154
  messages?: Prisma.ChatMessageCreateNestedManyWithoutThreadInput
1067
1155
  runs?: Prisma.ChatRunCreateNestedManyWithoutThreadInput
@@ -1079,6 +1167,8 @@ export type ChatThreadUncheckedCreateWithoutWorkspaceInput = {
1079
1167
  createdAt?: Date | string
1080
1168
  updatedAt?: Date | string
1081
1169
  agentId?: string | null
1170
+ engine?: string
1171
+ localCwd?: string | null
1082
1172
  messages?: Prisma.ChatMessageUncheckedCreateNestedManyWithoutThreadInput
1083
1173
  runs?: Prisma.ChatRunUncheckedCreateNestedManyWithoutThreadInput
1084
1174
  interrupts?: Prisma.ChatInterruptUncheckedCreateNestedManyWithoutThreadInput
@@ -1120,6 +1210,8 @@ export type ChatThreadCreateManyUserInput = {
1120
1210
  updatedAt?: Date | string
1121
1211
  agentId?: string | null
1122
1212
  workspaceId?: string | null
1213
+ engine?: string
1214
+ localCwd?: string | null
1123
1215
  }
1124
1216
 
1125
1217
  export type ChatThreadUpdateWithoutUserInput = {
@@ -1129,6 +1221,8 @@ export type ChatThreadUpdateWithoutUserInput = {
1129
1221
  sandboxPolicy?: Prisma.StringFieldUpdateOperationsInput | string
1130
1222
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
1131
1223
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
1224
+ engine?: Prisma.StringFieldUpdateOperationsInput | string
1225
+ localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1132
1226
  messages?: Prisma.ChatMessageUpdateManyWithoutThreadNestedInput
1133
1227
  runs?: Prisma.ChatRunUpdateManyWithoutThreadNestedInput
1134
1228
  interrupts?: Prisma.ChatInterruptUpdateManyWithoutThreadNestedInput
@@ -1146,6 +1240,8 @@ export type ChatThreadUncheckedUpdateWithoutUserInput = {
1146
1240
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
1147
1241
  agentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1148
1242
  workspaceId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1243
+ engine?: Prisma.StringFieldUpdateOperationsInput | string
1244
+ localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1149
1245
  messages?: Prisma.ChatMessageUncheckedUpdateManyWithoutThreadNestedInput
1150
1246
  runs?: Prisma.ChatRunUncheckedUpdateManyWithoutThreadNestedInput
1151
1247
  interrupts?: Prisma.ChatInterruptUncheckedUpdateManyWithoutThreadNestedInput
@@ -1161,6 +1257,8 @@ export type ChatThreadUncheckedUpdateManyWithoutUserInput = {
1161
1257
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
1162
1258
  agentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1163
1259
  workspaceId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1260
+ engine?: Prisma.StringFieldUpdateOperationsInput | string
1261
+ localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1164
1262
  }
1165
1263
 
1166
1264
  export type ChatThreadCreateManyAgentInput = {
@@ -1172,6 +1270,8 @@ export type ChatThreadCreateManyAgentInput = {
1172
1270
  createdAt?: Date | string
1173
1271
  updatedAt?: Date | string
1174
1272
  workspaceId?: string | null
1273
+ engine?: string
1274
+ localCwd?: string | null
1175
1275
  }
1176
1276
 
1177
1277
  export type ChatThreadUpdateWithoutAgentInput = {
@@ -1181,6 +1281,8 @@ export type ChatThreadUpdateWithoutAgentInput = {
1181
1281
  sandboxPolicy?: Prisma.StringFieldUpdateOperationsInput | string
1182
1282
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
1183
1283
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
1284
+ engine?: Prisma.StringFieldUpdateOperationsInput | string
1285
+ localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1184
1286
  user?: Prisma.UserUpdateOneRequiredWithoutChatThreadsNestedInput
1185
1287
  messages?: Prisma.ChatMessageUpdateManyWithoutThreadNestedInput
1186
1288
  runs?: Prisma.ChatRunUpdateManyWithoutThreadNestedInput
@@ -1198,6 +1300,8 @@ export type ChatThreadUncheckedUpdateWithoutAgentInput = {
1198
1300
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
1199
1301
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
1200
1302
  workspaceId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1303
+ engine?: Prisma.StringFieldUpdateOperationsInput | string
1304
+ localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1201
1305
  messages?: Prisma.ChatMessageUncheckedUpdateManyWithoutThreadNestedInput
1202
1306
  runs?: Prisma.ChatRunUncheckedUpdateManyWithoutThreadNestedInput
1203
1307
  interrupts?: Prisma.ChatInterruptUncheckedUpdateManyWithoutThreadNestedInput
@@ -1213,6 +1317,8 @@ export type ChatThreadUncheckedUpdateManyWithoutAgentInput = {
1213
1317
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
1214
1318
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
1215
1319
  workspaceId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1320
+ engine?: Prisma.StringFieldUpdateOperationsInput | string
1321
+ localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1216
1322
  }
1217
1323
 
1218
1324
  export type ChatThreadCreateManyWorkspaceInput = {
@@ -1224,6 +1330,8 @@ export type ChatThreadCreateManyWorkspaceInput = {
1224
1330
  createdAt?: Date | string
1225
1331
  updatedAt?: Date | string
1226
1332
  agentId?: string | null
1333
+ engine?: string
1334
+ localCwd?: string | null
1227
1335
  }
1228
1336
 
1229
1337
  export type ChatThreadUpdateWithoutWorkspaceInput = {
@@ -1233,6 +1341,8 @@ export type ChatThreadUpdateWithoutWorkspaceInput = {
1233
1341
  sandboxPolicy?: Prisma.StringFieldUpdateOperationsInput | string
1234
1342
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
1235
1343
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
1344
+ engine?: Prisma.StringFieldUpdateOperationsInput | string
1345
+ localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1236
1346
  user?: Prisma.UserUpdateOneRequiredWithoutChatThreadsNestedInput
1237
1347
  messages?: Prisma.ChatMessageUpdateManyWithoutThreadNestedInput
1238
1348
  runs?: Prisma.ChatRunUpdateManyWithoutThreadNestedInput
@@ -1250,6 +1360,8 @@ export type ChatThreadUncheckedUpdateWithoutWorkspaceInput = {
1250
1360
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
1251
1361
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
1252
1362
  agentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1363
+ engine?: Prisma.StringFieldUpdateOperationsInput | string
1364
+ localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1253
1365
  messages?: Prisma.ChatMessageUncheckedUpdateManyWithoutThreadNestedInput
1254
1366
  runs?: Prisma.ChatRunUncheckedUpdateManyWithoutThreadNestedInput
1255
1367
  interrupts?: Prisma.ChatInterruptUncheckedUpdateManyWithoutThreadNestedInput
@@ -1265,6 +1377,8 @@ export type ChatThreadUncheckedUpdateManyWithoutWorkspaceInput = {
1265
1377
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
1266
1378
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
1267
1379
  agentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1380
+ engine?: Prisma.StringFieldUpdateOperationsInput | string
1381
+ localCwd?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1268
1382
  }
1269
1383
 
1270
1384
 
@@ -1335,6 +1449,8 @@ export type ChatThreadSelect<ExtArgs extends runtime.Types.Extensions.InternalAr
1335
1449
  updatedAt?: boolean
1336
1450
  agentId?: boolean
1337
1451
  workspaceId?: boolean
1452
+ engine?: boolean
1453
+ localCwd?: boolean
1338
1454
  user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
1339
1455
  messages?: boolean | Prisma.ChatThread$messagesArgs<ExtArgs>
1340
1456
  runs?: boolean | Prisma.ChatThread$runsArgs<ExtArgs>
@@ -1355,6 +1471,8 @@ export type ChatThreadSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Ex
1355
1471
  updatedAt?: boolean
1356
1472
  agentId?: boolean
1357
1473
  workspaceId?: boolean
1474
+ engine?: boolean
1475
+ localCwd?: boolean
1358
1476
  user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
1359
1477
  agent?: boolean | Prisma.ChatThread$agentArgs<ExtArgs>
1360
1478
  workspace?: boolean | Prisma.ChatThread$workspaceArgs<ExtArgs>
@@ -1370,6 +1488,8 @@ export type ChatThreadSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Ex
1370
1488
  updatedAt?: boolean
1371
1489
  agentId?: boolean
1372
1490
  workspaceId?: boolean
1491
+ engine?: boolean
1492
+ localCwd?: boolean
1373
1493
  user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
1374
1494
  agent?: boolean | Prisma.ChatThread$agentArgs<ExtArgs>
1375
1495
  workspace?: boolean | Prisma.ChatThread$workspaceArgs<ExtArgs>
@@ -1385,9 +1505,11 @@ export type ChatThreadSelectScalar = {
1385
1505
  updatedAt?: boolean
1386
1506
  agentId?: boolean
1387
1507
  workspaceId?: boolean
1508
+ engine?: boolean
1509
+ localCwd?: boolean
1388
1510
  }
1389
1511
 
1390
- 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", ExtArgs["result"]["chatThread"]>
1512
+ 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", ExtArgs["result"]["chatThread"]>
1391
1513
  export type ChatThreadInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1392
1514
  user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
1393
1515
  messages?: boolean | Prisma.ChatThread$messagesArgs<ExtArgs>
@@ -1430,6 +1552,14 @@ export type $ChatThreadPayload<ExtArgs extends runtime.Types.Extensions.Internal
1430
1552
  updatedAt: Date
1431
1553
  agentId: string | null
1432
1554
  workspaceId: string | null
1555
+ /**
1556
+ * 执行引擎:cloud(服务端模型)/ local(桌面 pi 本地 Agent,只读四件套)
1557
+ */
1558
+ engine: string
1559
+ /**
1560
+ * 本地 Agent 的授权工作目录(engine=local 时必填;仅桌面壳)
1561
+ */
1562
+ localCwd: string | null
1433
1563
  }, ExtArgs["result"]["chatThread"]>
1434
1564
  composites: {}
1435
1565
  }
@@ -1869,6 +1999,8 @@ export interface ChatThreadFieldRefs {
1869
1999
  readonly updatedAt: Prisma.FieldRef<"ChatThread", 'DateTime'>
1870
2000
  readonly agentId: Prisma.FieldRef<"ChatThread", 'String'>
1871
2001
  readonly workspaceId: Prisma.FieldRef<"ChatThread", 'String'>
2002
+ readonly engine: Prisma.FieldRef<"ChatThread", 'String'>
2003
+ readonly localCwd: Prisma.FieldRef<"ChatThread", 'String'>
1872
2004
  }
1873
2005
 
1874
2006
 
@@ -0,0 +1,4 @@
1
+ -- 桌面本地 Agent(pi)收编进 Harness:线程级执行引擎与本地工作目录
2
+ -- 既有线程默认 cloud(服务端模型),桌面端可新建 engine=local 的线程。
3
+ ALTER TABLE "chat_threads" ADD COLUMN "engine" TEXT NOT NULL DEFAULT 'cloud';
4
+ ALTER TABLE "chat_threads" ADD COLUMN "localCwd" TEXT;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allbluecn/database",
3
- "version": "0.12.3",
3
+ "version": "0.13.0",
4
4
  "license": "AGPL-3.0-or-later",
5
5
  "type": "module",
6
6
  "main": "./index.ts",
package/schema.prisma CHANGED
@@ -363,6 +363,10 @@ model ChatThread {
363
363
  agent UserAgent? @relation(fields: [agentId], references: [id], onDelete: SetNull)
364
364
  workspaceId String?
365
365
  workspace HarnessWorkspace? @relation(fields: [workspaceId], references: [id], onDelete: SetNull)
366
+ /// 执行引擎:cloud(服务端模型)/ local(桌面 pi 本地 Agent,只读四件套)
367
+ engine String @default("cloud")
368
+ /// 本地 Agent 的授权工作目录(engine=local 时必填;仅桌面壳)
369
+ localCwd String?
366
370
 
367
371
  @@index([userId, updatedAt])
368
372
  @@map("chat_threads")