@allbluecn/database 0.14.3 → 0.14.5
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.
- package/generated/internal/class.ts +4 -4
- package/generated/internal/prismaNamespace.ts +10 -0
- package/generated/internal/prismaNamespaceBrowser.ts +10 -0
- package/generated/models/CodeSnippet.ts +222 -7
- package/generated/models/HarnessWorkspace.ts +130 -1
- package/migrations/20261111110000_code_snippet_origin/migration.sql +19 -0
- package/migrations/20261114000000_harness_workspace_local_cloud_columns/migration.sql +10 -0
- package/package.json +1 -1
- package/schema.prisma +40 -11
|
@@ -29,6 +29,9 @@ export type HarnessWorkspaceMinAggregateOutputType = {
|
|
|
29
29
|
name: string | null
|
|
30
30
|
ownerId: string | null
|
|
31
31
|
kind: string | null
|
|
32
|
+
localPath: string | null
|
|
33
|
+
cloudOfId: string | null
|
|
34
|
+
lastSyncedAt: Date | null
|
|
32
35
|
createdAt: Date | null
|
|
33
36
|
updatedAt: Date | null
|
|
34
37
|
}
|
|
@@ -38,6 +41,9 @@ export type HarnessWorkspaceMaxAggregateOutputType = {
|
|
|
38
41
|
name: string | null
|
|
39
42
|
ownerId: string | null
|
|
40
43
|
kind: string | null
|
|
44
|
+
localPath: string | null
|
|
45
|
+
cloudOfId: string | null
|
|
46
|
+
lastSyncedAt: Date | null
|
|
41
47
|
createdAt: Date | null
|
|
42
48
|
updatedAt: Date | null
|
|
43
49
|
}
|
|
@@ -47,6 +53,9 @@ export type HarnessWorkspaceCountAggregateOutputType = {
|
|
|
47
53
|
name: number
|
|
48
54
|
ownerId: number
|
|
49
55
|
kind: number
|
|
56
|
+
localPath: number
|
|
57
|
+
cloudOfId: number
|
|
58
|
+
lastSyncedAt: number
|
|
50
59
|
createdAt: number
|
|
51
60
|
updatedAt: number
|
|
52
61
|
_all: number
|
|
@@ -58,6 +67,9 @@ export type HarnessWorkspaceMinAggregateInputType = {
|
|
|
58
67
|
name?: true
|
|
59
68
|
ownerId?: true
|
|
60
69
|
kind?: true
|
|
70
|
+
localPath?: true
|
|
71
|
+
cloudOfId?: true
|
|
72
|
+
lastSyncedAt?: true
|
|
61
73
|
createdAt?: true
|
|
62
74
|
updatedAt?: true
|
|
63
75
|
}
|
|
@@ -67,6 +79,9 @@ export type HarnessWorkspaceMaxAggregateInputType = {
|
|
|
67
79
|
name?: true
|
|
68
80
|
ownerId?: true
|
|
69
81
|
kind?: true
|
|
82
|
+
localPath?: true
|
|
83
|
+
cloudOfId?: true
|
|
84
|
+
lastSyncedAt?: true
|
|
70
85
|
createdAt?: true
|
|
71
86
|
updatedAt?: true
|
|
72
87
|
}
|
|
@@ -76,6 +91,9 @@ export type HarnessWorkspaceCountAggregateInputType = {
|
|
|
76
91
|
name?: true
|
|
77
92
|
ownerId?: true
|
|
78
93
|
kind?: true
|
|
94
|
+
localPath?: true
|
|
95
|
+
cloudOfId?: true
|
|
96
|
+
lastSyncedAt?: true
|
|
79
97
|
createdAt?: true
|
|
80
98
|
updatedAt?: true
|
|
81
99
|
_all?: true
|
|
@@ -158,6 +176,9 @@ export type HarnessWorkspaceGroupByOutputType = {
|
|
|
158
176
|
name: string
|
|
159
177
|
ownerId: string
|
|
160
178
|
kind: string
|
|
179
|
+
localPath: string | null
|
|
180
|
+
cloudOfId: string | null
|
|
181
|
+
lastSyncedAt: Date | null
|
|
161
182
|
createdAt: Date
|
|
162
183
|
updatedAt: Date
|
|
163
184
|
_count: HarnessWorkspaceCountAggregateOutputType | null
|
|
@@ -188,6 +209,9 @@ export type HarnessWorkspaceWhereInput = {
|
|
|
188
209
|
name?: Prisma.StringFilter<"HarnessWorkspace"> | string
|
|
189
210
|
ownerId?: Prisma.StringFilter<"HarnessWorkspace"> | string
|
|
190
211
|
kind?: Prisma.StringFilter<"HarnessWorkspace"> | string
|
|
212
|
+
localPath?: Prisma.StringNullableFilter<"HarnessWorkspace"> | string | null
|
|
213
|
+
cloudOfId?: Prisma.StringNullableFilter<"HarnessWorkspace"> | string | null
|
|
214
|
+
lastSyncedAt?: Prisma.DateTimeNullableFilter<"HarnessWorkspace"> | Date | string | null
|
|
191
215
|
createdAt?: Prisma.DateTimeFilter<"HarnessWorkspace"> | Date | string
|
|
192
216
|
updatedAt?: Prisma.DateTimeFilter<"HarnessWorkspace"> | Date | string
|
|
193
217
|
owner?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
|
|
@@ -200,6 +224,9 @@ export type HarnessWorkspaceOrderByWithRelationInput = {
|
|
|
200
224
|
name?: Prisma.SortOrder
|
|
201
225
|
ownerId?: Prisma.SortOrder
|
|
202
226
|
kind?: Prisma.SortOrder
|
|
227
|
+
localPath?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
228
|
+
cloudOfId?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
229
|
+
lastSyncedAt?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
203
230
|
createdAt?: Prisma.SortOrder
|
|
204
231
|
updatedAt?: Prisma.SortOrder
|
|
205
232
|
owner?: Prisma.UserOrderByWithRelationInput
|
|
@@ -215,6 +242,9 @@ export type HarnessWorkspaceWhereUniqueInput = Prisma.AtLeast<{
|
|
|
215
242
|
name?: Prisma.StringFilter<"HarnessWorkspace"> | string
|
|
216
243
|
ownerId?: Prisma.StringFilter<"HarnessWorkspace"> | string
|
|
217
244
|
kind?: Prisma.StringFilter<"HarnessWorkspace"> | string
|
|
245
|
+
localPath?: Prisma.StringNullableFilter<"HarnessWorkspace"> | string | null
|
|
246
|
+
cloudOfId?: Prisma.StringNullableFilter<"HarnessWorkspace"> | string | null
|
|
247
|
+
lastSyncedAt?: Prisma.DateTimeNullableFilter<"HarnessWorkspace"> | Date | string | null
|
|
218
248
|
createdAt?: Prisma.DateTimeFilter<"HarnessWorkspace"> | Date | string
|
|
219
249
|
updatedAt?: Prisma.DateTimeFilter<"HarnessWorkspace"> | Date | string
|
|
220
250
|
owner?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
|
|
@@ -227,6 +257,9 @@ export type HarnessWorkspaceOrderByWithAggregationInput = {
|
|
|
227
257
|
name?: Prisma.SortOrder
|
|
228
258
|
ownerId?: Prisma.SortOrder
|
|
229
259
|
kind?: Prisma.SortOrder
|
|
260
|
+
localPath?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
261
|
+
cloudOfId?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
262
|
+
lastSyncedAt?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
230
263
|
createdAt?: Prisma.SortOrder
|
|
231
264
|
updatedAt?: Prisma.SortOrder
|
|
232
265
|
_count?: Prisma.HarnessWorkspaceCountOrderByAggregateInput
|
|
@@ -242,6 +275,9 @@ export type HarnessWorkspaceScalarWhereWithAggregatesInput = {
|
|
|
242
275
|
name?: Prisma.StringWithAggregatesFilter<"HarnessWorkspace"> | string
|
|
243
276
|
ownerId?: Prisma.StringWithAggregatesFilter<"HarnessWorkspace"> | string
|
|
244
277
|
kind?: Prisma.StringWithAggregatesFilter<"HarnessWorkspace"> | string
|
|
278
|
+
localPath?: Prisma.StringNullableWithAggregatesFilter<"HarnessWorkspace"> | string | null
|
|
279
|
+
cloudOfId?: Prisma.StringNullableWithAggregatesFilter<"HarnessWorkspace"> | string | null
|
|
280
|
+
lastSyncedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"HarnessWorkspace"> | Date | string | null
|
|
245
281
|
createdAt?: Prisma.DateTimeWithAggregatesFilter<"HarnessWorkspace"> | Date | string
|
|
246
282
|
updatedAt?: Prisma.DateTimeWithAggregatesFilter<"HarnessWorkspace"> | Date | string
|
|
247
283
|
}
|
|
@@ -250,6 +286,9 @@ export type HarnessWorkspaceCreateInput = {
|
|
|
250
286
|
id?: string
|
|
251
287
|
name: string
|
|
252
288
|
kind?: string
|
|
289
|
+
localPath?: string | null
|
|
290
|
+
cloudOfId?: string | null
|
|
291
|
+
lastSyncedAt?: Date | string | null
|
|
253
292
|
createdAt?: Date | string
|
|
254
293
|
updatedAt?: Date | string
|
|
255
294
|
owner: Prisma.UserCreateNestedOneWithoutHarnessWorkspacesInput
|
|
@@ -262,6 +301,9 @@ export type HarnessWorkspaceUncheckedCreateInput = {
|
|
|
262
301
|
name: string
|
|
263
302
|
ownerId: string
|
|
264
303
|
kind?: string
|
|
304
|
+
localPath?: string | null
|
|
305
|
+
cloudOfId?: string | null
|
|
306
|
+
lastSyncedAt?: Date | string | null
|
|
265
307
|
createdAt?: Date | string
|
|
266
308
|
updatedAt?: Date | string
|
|
267
309
|
files?: Prisma.WorkspaceFileUncheckedCreateNestedManyWithoutWorkspaceInput
|
|
@@ -272,6 +314,9 @@ export type HarnessWorkspaceUpdateInput = {
|
|
|
272
314
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
273
315
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
|
274
316
|
kind?: Prisma.StringFieldUpdateOperationsInput | string
|
|
317
|
+
localPath?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
318
|
+
cloudOfId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
319
|
+
lastSyncedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
275
320
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
276
321
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
277
322
|
owner?: Prisma.UserUpdateOneRequiredWithoutHarnessWorkspacesNestedInput
|
|
@@ -284,6 +329,9 @@ export type HarnessWorkspaceUncheckedUpdateInput = {
|
|
|
284
329
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
|
285
330
|
ownerId?: Prisma.StringFieldUpdateOperationsInput | string
|
|
286
331
|
kind?: Prisma.StringFieldUpdateOperationsInput | string
|
|
332
|
+
localPath?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
333
|
+
cloudOfId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
334
|
+
lastSyncedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
287
335
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
288
336
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
289
337
|
files?: Prisma.WorkspaceFileUncheckedUpdateManyWithoutWorkspaceNestedInput
|
|
@@ -295,6 +343,9 @@ export type HarnessWorkspaceCreateManyInput = {
|
|
|
295
343
|
name: string
|
|
296
344
|
ownerId: string
|
|
297
345
|
kind?: string
|
|
346
|
+
localPath?: string | null
|
|
347
|
+
cloudOfId?: string | null
|
|
348
|
+
lastSyncedAt?: Date | string | null
|
|
298
349
|
createdAt?: Date | string
|
|
299
350
|
updatedAt?: Date | string
|
|
300
351
|
}
|
|
@@ -303,6 +354,9 @@ export type HarnessWorkspaceUpdateManyMutationInput = {
|
|
|
303
354
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
304
355
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
|
305
356
|
kind?: Prisma.StringFieldUpdateOperationsInput | string
|
|
357
|
+
localPath?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
358
|
+
cloudOfId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
359
|
+
lastSyncedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
306
360
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
307
361
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
308
362
|
}
|
|
@@ -312,6 +366,9 @@ export type HarnessWorkspaceUncheckedUpdateManyInput = {
|
|
|
312
366
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
|
313
367
|
ownerId?: Prisma.StringFieldUpdateOperationsInput | string
|
|
314
368
|
kind?: Prisma.StringFieldUpdateOperationsInput | string
|
|
369
|
+
localPath?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
370
|
+
cloudOfId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
371
|
+
lastSyncedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
315
372
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
316
373
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
317
374
|
}
|
|
@@ -336,6 +393,9 @@ export type HarnessWorkspaceCountOrderByAggregateInput = {
|
|
|
336
393
|
name?: Prisma.SortOrder
|
|
337
394
|
ownerId?: Prisma.SortOrder
|
|
338
395
|
kind?: Prisma.SortOrder
|
|
396
|
+
localPath?: Prisma.SortOrder
|
|
397
|
+
cloudOfId?: Prisma.SortOrder
|
|
398
|
+
lastSyncedAt?: Prisma.SortOrder
|
|
339
399
|
createdAt?: Prisma.SortOrder
|
|
340
400
|
updatedAt?: Prisma.SortOrder
|
|
341
401
|
}
|
|
@@ -345,6 +405,9 @@ export type HarnessWorkspaceMaxOrderByAggregateInput = {
|
|
|
345
405
|
name?: Prisma.SortOrder
|
|
346
406
|
ownerId?: Prisma.SortOrder
|
|
347
407
|
kind?: Prisma.SortOrder
|
|
408
|
+
localPath?: Prisma.SortOrder
|
|
409
|
+
cloudOfId?: Prisma.SortOrder
|
|
410
|
+
lastSyncedAt?: Prisma.SortOrder
|
|
348
411
|
createdAt?: Prisma.SortOrder
|
|
349
412
|
updatedAt?: Prisma.SortOrder
|
|
350
413
|
}
|
|
@@ -354,6 +417,9 @@ export type HarnessWorkspaceMinOrderByAggregateInput = {
|
|
|
354
417
|
name?: Prisma.SortOrder
|
|
355
418
|
ownerId?: Prisma.SortOrder
|
|
356
419
|
kind?: Prisma.SortOrder
|
|
420
|
+
localPath?: Prisma.SortOrder
|
|
421
|
+
cloudOfId?: Prisma.SortOrder
|
|
422
|
+
lastSyncedAt?: Prisma.SortOrder
|
|
357
423
|
createdAt?: Prisma.SortOrder
|
|
358
424
|
updatedAt?: Prisma.SortOrder
|
|
359
425
|
}
|
|
@@ -439,6 +505,9 @@ export type HarnessWorkspaceCreateWithoutOwnerInput = {
|
|
|
439
505
|
id?: string
|
|
440
506
|
name: string
|
|
441
507
|
kind?: string
|
|
508
|
+
localPath?: string | null
|
|
509
|
+
cloudOfId?: string | null
|
|
510
|
+
lastSyncedAt?: Date | string | null
|
|
442
511
|
createdAt?: Date | string
|
|
443
512
|
updatedAt?: Date | string
|
|
444
513
|
files?: Prisma.WorkspaceFileCreateNestedManyWithoutWorkspaceInput
|
|
@@ -449,6 +518,9 @@ export type HarnessWorkspaceUncheckedCreateWithoutOwnerInput = {
|
|
|
449
518
|
id?: string
|
|
450
519
|
name: string
|
|
451
520
|
kind?: string
|
|
521
|
+
localPath?: string | null
|
|
522
|
+
cloudOfId?: string | null
|
|
523
|
+
lastSyncedAt?: Date | string | null
|
|
452
524
|
createdAt?: Date | string
|
|
453
525
|
updatedAt?: Date | string
|
|
454
526
|
files?: Prisma.WorkspaceFileUncheckedCreateNestedManyWithoutWorkspaceInput
|
|
@@ -489,6 +561,9 @@ export type HarnessWorkspaceScalarWhereInput = {
|
|
|
489
561
|
name?: Prisma.StringFilter<"HarnessWorkspace"> | string
|
|
490
562
|
ownerId?: Prisma.StringFilter<"HarnessWorkspace"> | string
|
|
491
563
|
kind?: Prisma.StringFilter<"HarnessWorkspace"> | string
|
|
564
|
+
localPath?: Prisma.StringNullableFilter<"HarnessWorkspace"> | string | null
|
|
565
|
+
cloudOfId?: Prisma.StringNullableFilter<"HarnessWorkspace"> | string | null
|
|
566
|
+
lastSyncedAt?: Prisma.DateTimeNullableFilter<"HarnessWorkspace"> | Date | string | null
|
|
492
567
|
createdAt?: Prisma.DateTimeFilter<"HarnessWorkspace"> | Date | string
|
|
493
568
|
updatedAt?: Prisma.DateTimeFilter<"HarnessWorkspace"> | Date | string
|
|
494
569
|
}
|
|
@@ -497,6 +572,9 @@ export type HarnessWorkspaceCreateWithoutThreadsInput = {
|
|
|
497
572
|
id?: string
|
|
498
573
|
name: string
|
|
499
574
|
kind?: string
|
|
575
|
+
localPath?: string | null
|
|
576
|
+
cloudOfId?: string | null
|
|
577
|
+
lastSyncedAt?: Date | string | null
|
|
500
578
|
createdAt?: Date | string
|
|
501
579
|
updatedAt?: Date | string
|
|
502
580
|
owner: Prisma.UserCreateNestedOneWithoutHarnessWorkspacesInput
|
|
@@ -508,6 +586,9 @@ export type HarnessWorkspaceUncheckedCreateWithoutThreadsInput = {
|
|
|
508
586
|
name: string
|
|
509
587
|
ownerId: string
|
|
510
588
|
kind?: string
|
|
589
|
+
localPath?: string | null
|
|
590
|
+
cloudOfId?: string | null
|
|
591
|
+
lastSyncedAt?: Date | string | null
|
|
511
592
|
createdAt?: Date | string
|
|
512
593
|
updatedAt?: Date | string
|
|
513
594
|
files?: Prisma.WorkspaceFileUncheckedCreateNestedManyWithoutWorkspaceInput
|
|
@@ -533,6 +614,9 @@ export type HarnessWorkspaceUpdateWithoutThreadsInput = {
|
|
|
533
614
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
534
615
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
|
535
616
|
kind?: Prisma.StringFieldUpdateOperationsInput | string
|
|
617
|
+
localPath?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
618
|
+
cloudOfId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
619
|
+
lastSyncedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
536
620
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
537
621
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
538
622
|
owner?: Prisma.UserUpdateOneRequiredWithoutHarnessWorkspacesNestedInput
|
|
@@ -544,6 +628,9 @@ export type HarnessWorkspaceUncheckedUpdateWithoutThreadsInput = {
|
|
|
544
628
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
|
545
629
|
ownerId?: Prisma.StringFieldUpdateOperationsInput | string
|
|
546
630
|
kind?: Prisma.StringFieldUpdateOperationsInput | string
|
|
631
|
+
localPath?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
632
|
+
cloudOfId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
633
|
+
lastSyncedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
547
634
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
548
635
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
549
636
|
files?: Prisma.WorkspaceFileUncheckedUpdateManyWithoutWorkspaceNestedInput
|
|
@@ -553,6 +640,9 @@ export type HarnessWorkspaceCreateWithoutFilesInput = {
|
|
|
553
640
|
id?: string
|
|
554
641
|
name: string
|
|
555
642
|
kind?: string
|
|
643
|
+
localPath?: string | null
|
|
644
|
+
cloudOfId?: string | null
|
|
645
|
+
lastSyncedAt?: Date | string | null
|
|
556
646
|
createdAt?: Date | string
|
|
557
647
|
updatedAt?: Date | string
|
|
558
648
|
owner: Prisma.UserCreateNestedOneWithoutHarnessWorkspacesInput
|
|
@@ -564,6 +654,9 @@ export type HarnessWorkspaceUncheckedCreateWithoutFilesInput = {
|
|
|
564
654
|
name: string
|
|
565
655
|
ownerId: string
|
|
566
656
|
kind?: string
|
|
657
|
+
localPath?: string | null
|
|
658
|
+
cloudOfId?: string | null
|
|
659
|
+
lastSyncedAt?: Date | string | null
|
|
567
660
|
createdAt?: Date | string
|
|
568
661
|
updatedAt?: Date | string
|
|
569
662
|
threads?: Prisma.ChatThreadUncheckedCreateNestedManyWithoutWorkspaceInput
|
|
@@ -589,6 +682,9 @@ export type HarnessWorkspaceUpdateWithoutFilesInput = {
|
|
|
589
682
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
590
683
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
|
591
684
|
kind?: Prisma.StringFieldUpdateOperationsInput | string
|
|
685
|
+
localPath?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
686
|
+
cloudOfId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
687
|
+
lastSyncedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
592
688
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
593
689
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
594
690
|
owner?: Prisma.UserUpdateOneRequiredWithoutHarnessWorkspacesNestedInput
|
|
@@ -600,6 +696,9 @@ export type HarnessWorkspaceUncheckedUpdateWithoutFilesInput = {
|
|
|
600
696
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
|
601
697
|
ownerId?: Prisma.StringFieldUpdateOperationsInput | string
|
|
602
698
|
kind?: Prisma.StringFieldUpdateOperationsInput | string
|
|
699
|
+
localPath?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
700
|
+
cloudOfId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
701
|
+
lastSyncedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
603
702
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
604
703
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
605
704
|
threads?: Prisma.ChatThreadUncheckedUpdateManyWithoutWorkspaceNestedInput
|
|
@@ -609,6 +708,9 @@ export type HarnessWorkspaceCreateManyOwnerInput = {
|
|
|
609
708
|
id?: string
|
|
610
709
|
name: string
|
|
611
710
|
kind?: string
|
|
711
|
+
localPath?: string | null
|
|
712
|
+
cloudOfId?: string | null
|
|
713
|
+
lastSyncedAt?: Date | string | null
|
|
612
714
|
createdAt?: Date | string
|
|
613
715
|
updatedAt?: Date | string
|
|
614
716
|
}
|
|
@@ -617,6 +719,9 @@ export type HarnessWorkspaceUpdateWithoutOwnerInput = {
|
|
|
617
719
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
618
720
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
|
619
721
|
kind?: Prisma.StringFieldUpdateOperationsInput | string
|
|
722
|
+
localPath?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
723
|
+
cloudOfId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
724
|
+
lastSyncedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
620
725
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
621
726
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
622
727
|
files?: Prisma.WorkspaceFileUpdateManyWithoutWorkspaceNestedInput
|
|
@@ -627,6 +732,9 @@ export type HarnessWorkspaceUncheckedUpdateWithoutOwnerInput = {
|
|
|
627
732
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
628
733
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
|
629
734
|
kind?: Prisma.StringFieldUpdateOperationsInput | string
|
|
735
|
+
localPath?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
736
|
+
cloudOfId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
737
|
+
lastSyncedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
630
738
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
631
739
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
632
740
|
files?: Prisma.WorkspaceFileUncheckedUpdateManyWithoutWorkspaceNestedInput
|
|
@@ -637,6 +745,9 @@ export type HarnessWorkspaceUncheckedUpdateManyWithoutOwnerInput = {
|
|
|
637
745
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
638
746
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
|
639
747
|
kind?: Prisma.StringFieldUpdateOperationsInput | string
|
|
748
|
+
localPath?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
749
|
+
cloudOfId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
750
|
+
lastSyncedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
640
751
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
641
752
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
642
753
|
}
|
|
@@ -686,6 +797,9 @@ export type HarnessWorkspaceSelect<ExtArgs extends runtime.Types.Extensions.Inte
|
|
|
686
797
|
name?: boolean
|
|
687
798
|
ownerId?: boolean
|
|
688
799
|
kind?: boolean
|
|
800
|
+
localPath?: boolean
|
|
801
|
+
cloudOfId?: boolean
|
|
802
|
+
lastSyncedAt?: boolean
|
|
689
803
|
createdAt?: boolean
|
|
690
804
|
updatedAt?: boolean
|
|
691
805
|
owner?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
|
@@ -699,6 +813,9 @@ export type HarnessWorkspaceSelectCreateManyAndReturn<ExtArgs extends runtime.Ty
|
|
|
699
813
|
name?: boolean
|
|
700
814
|
ownerId?: boolean
|
|
701
815
|
kind?: boolean
|
|
816
|
+
localPath?: boolean
|
|
817
|
+
cloudOfId?: boolean
|
|
818
|
+
lastSyncedAt?: boolean
|
|
702
819
|
createdAt?: boolean
|
|
703
820
|
updatedAt?: boolean
|
|
704
821
|
owner?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
|
@@ -709,6 +826,9 @@ export type HarnessWorkspaceSelectUpdateManyAndReturn<ExtArgs extends runtime.Ty
|
|
|
709
826
|
name?: boolean
|
|
710
827
|
ownerId?: boolean
|
|
711
828
|
kind?: boolean
|
|
829
|
+
localPath?: boolean
|
|
830
|
+
cloudOfId?: boolean
|
|
831
|
+
lastSyncedAt?: boolean
|
|
712
832
|
createdAt?: boolean
|
|
713
833
|
updatedAt?: boolean
|
|
714
834
|
owner?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
|
@@ -719,11 +839,14 @@ export type HarnessWorkspaceSelectScalar = {
|
|
|
719
839
|
name?: boolean
|
|
720
840
|
ownerId?: boolean
|
|
721
841
|
kind?: boolean
|
|
842
|
+
localPath?: boolean
|
|
843
|
+
cloudOfId?: boolean
|
|
844
|
+
lastSyncedAt?: boolean
|
|
722
845
|
createdAt?: boolean
|
|
723
846
|
updatedAt?: boolean
|
|
724
847
|
}
|
|
725
848
|
|
|
726
|
-
export type HarnessWorkspaceOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "ownerId" | "kind" | "createdAt" | "updatedAt", ExtArgs["result"]["harnessWorkspace"]>
|
|
849
|
+
export type HarnessWorkspaceOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "ownerId" | "kind" | "localPath" | "cloudOfId" | "lastSyncedAt" | "createdAt" | "updatedAt", ExtArgs["result"]["harnessWorkspace"]>
|
|
727
850
|
export type HarnessWorkspaceInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
728
851
|
owner?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
|
729
852
|
files?: boolean | Prisma.HarnessWorkspace$filesArgs<ExtArgs>
|
|
@@ -749,6 +872,9 @@ export type $HarnessWorkspacePayload<ExtArgs extends runtime.Types.Extensions.In
|
|
|
749
872
|
name: string
|
|
750
873
|
ownerId: string
|
|
751
874
|
kind: string
|
|
875
|
+
localPath: string | null
|
|
876
|
+
cloudOfId: string | null
|
|
877
|
+
lastSyncedAt: Date | null
|
|
752
878
|
createdAt: Date
|
|
753
879
|
updatedAt: Date
|
|
754
880
|
}, ExtArgs["result"]["harnessWorkspace"]>
|
|
@@ -1181,6 +1307,9 @@ export interface HarnessWorkspaceFieldRefs {
|
|
|
1181
1307
|
readonly name: Prisma.FieldRef<"HarnessWorkspace", 'String'>
|
|
1182
1308
|
readonly ownerId: Prisma.FieldRef<"HarnessWorkspace", 'String'>
|
|
1183
1309
|
readonly kind: Prisma.FieldRef<"HarnessWorkspace", 'String'>
|
|
1310
|
+
readonly localPath: Prisma.FieldRef<"HarnessWorkspace", 'String'>
|
|
1311
|
+
readonly cloudOfId: Prisma.FieldRef<"HarnessWorkspace", 'String'>
|
|
1312
|
+
readonly lastSyncedAt: Prisma.FieldRef<"HarnessWorkspace", 'DateTime'>
|
|
1184
1313
|
readonly createdAt: Prisma.FieldRef<"HarnessWorkspace", 'DateTime'>
|
|
1185
1314
|
readonly updatedAt: Prisma.FieldRef<"HarnessWorkspace", 'DateTime'>
|
|
1186
1315
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
-- CodeSnippet 对齐官方 Snippet(@tanstack/ai-code-mode-snippets 1.0.0,
|
|
2
|
+
-- T5.3 裁决③):origin 写入方分流 + 官方 SnippetStorage 契约所需字段直映射。
|
|
3
|
+
-- 存量行均为用户创建,origin 默认 'user';user 片段的 inputSchema 权威源仍是
|
|
4
|
+
-- params(加载层经 buildSnippetInputSchema 派生),列留默认 '{}' 占位。
|
|
5
|
+
|
|
6
|
+
-- AlterTable
|
|
7
|
+
ALTER TABLE "code_snippets" ADD COLUMN "origin" TEXT NOT NULL DEFAULT 'user';
|
|
8
|
+
ALTER TABLE "code_snippets" ADD COLUMN "inputSchema" JSONB NOT NULL DEFAULT '{}';
|
|
9
|
+
ALTER TABLE "code_snippets" ADD COLUMN "outputSchema" JSONB NOT NULL DEFAULT '{}';
|
|
10
|
+
ALTER TABLE "code_snippets" ADD COLUMN "usageHints" JSONB NOT NULL DEFAULT '[]';
|
|
11
|
+
ALTER TABLE "code_snippets" ADD COLUMN "dependsOn" JSONB NOT NULL DEFAULT '[]';
|
|
12
|
+
ALTER TABLE "code_snippets" ADD COLUMN "trustLevel" TEXT NOT NULL DEFAULT 'untrusted';
|
|
13
|
+
ALTER TABLE "code_snippets" ADD COLUMN "stats" JSONB NOT NULL DEFAULT '{"executions":0,"successRate":0}';
|
|
14
|
+
|
|
15
|
+
-- model 片段无标题(register_snippet 不提供 title),列补空串默认
|
|
16
|
+
ALTER TABLE "code_snippets" ALTER COLUMN "title" SET DEFAULT '';
|
|
17
|
+
|
|
18
|
+
-- CreateIndex
|
|
19
|
+
CREATE INDEX "code_snippets_userId_origin_isDeleted_idx" ON "code_snippets"("userId", "origin", "isDeleted");
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
-- HarnessWorkspace 本地优先:本地目录映射与按需上云(v3 设计 §2.2)
|
|
2
|
+
-- 三列均可空、无默认值变更,老数据零迁移、桌面 pglite 同方言自动继承。
|
|
3
|
+
|
|
4
|
+
ALTER TABLE "harness_workspaces" ADD COLUMN "localPath" TEXT;
|
|
5
|
+
ALTER TABLE "harness_workspaces" ADD COLUMN "cloudOfId" TEXT;
|
|
6
|
+
ALTER TABLE "harness_workspaces" ADD COLUMN "lastSyncedAt" TIMESTAMP(3);
|
|
7
|
+
|
|
8
|
+
-- cloudOfId 指向同表另一行(本地行 → 其云端镜像),自环禁止
|
|
9
|
+
ALTER TABLE "harness_workspaces" ADD CONSTRAINT "harness_workspaces_cloudOfId_fkey"
|
|
10
|
+
FOREIGN KEY ("cloudOfId") REFERENCES "harness_workspaces"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
package/package.json
CHANGED
package/schema.prisma
CHANGED
|
@@ -2467,23 +2467,48 @@ model IterationAutoSchedule {
|
|
|
2467
2467
|
// 编排模式可复用片段:用户保存的跨请求编排逻辑。运行时经 getSnippetBindings
|
|
2468
2468
|
// 暴露为 snippet_<name> 绑定,片段函数体在嵌套沙箱内执行并可调用 external_* 工具。
|
|
2469
2469
|
// 片段本身不豁免归属校验,execute 只在服务端执行,不进客户端 bundle。
|
|
2470
|
+
//
|
|
2471
|
+
// 与官方 Snippet(@tanstack/ai-code-mode-snippets 1.0.0)的字段映射——
|
|
2472
|
+
// 本表同时是官方 SnippetStorage 契约(snippet-storage.server.ts)的持久层:
|
|
2473
|
+
// id/name/description/code/createdAt/updatedAt → 同名列直映射;
|
|
2474
|
+
// origin → 官方 Snippet 无此字段,本仓扩展:写入方分流('user'=用户
|
|
2475
|
+
// UI/serverFn 写入,'model'=register_snippet 写入),创建后
|
|
2476
|
+
// 不可变(更新必须同 origin,防覆盖见 snippet-storage.server.ts);
|
|
2477
|
+
// inputSchema → 官方 JSON Schema。user 片段的权威源是 params(执行绑定经
|
|
2478
|
+
// buildSnippetInputSchema(params) 派生,本列留默认 "{}");
|
|
2479
|
+
// model 片段由 register_snippet 落官方 schema;
|
|
2480
|
+
// outputSchema/usageHints/dependsOn/trustLevel/stats → 官方 Snippet 直映射
|
|
2481
|
+
// (stats = { executions, successRate },updateStats 定向更新);
|
|
2482
|
+
// title → 官方无此字段,本仓 UI 扩展(model 片段缺省 "");
|
|
2483
|
+
// params/enabled/isDeleted → 本仓自有(enabled/isDeleted 维持既有过滤语义)。
|
|
2484
|
+
// code 形态按 origin 分流:user 片段是存量「函数体 + args 变量」格式(参数经
|
|
2485
|
+
// const args = <JSON> 注入),model 片段是官方「函数体 + input 变量」格式
|
|
2486
|
+
// (const input = <JSON> 注入)——执行包装层按 origin 选注入变量名。
|
|
2470
2487
|
model CodeSnippet {
|
|
2471
|
-
id
|
|
2472
|
-
userId
|
|
2473
|
-
name
|
|
2474
|
-
title
|
|
2475
|
-
description
|
|
2476
|
-
params
|
|
2477
|
-
code
|
|
2478
|
-
enabled
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2488
|
+
id String @id @default(cuid())
|
|
2489
|
+
userId String
|
|
2490
|
+
name String
|
|
2491
|
+
title String @default("")
|
|
2492
|
+
description String
|
|
2493
|
+
params Json @default("{}")
|
|
2494
|
+
code String @db.Text
|
|
2495
|
+
enabled Boolean @default(true)
|
|
2496
|
+
origin String @default("user")
|
|
2497
|
+
inputSchema Json @default("{}")
|
|
2498
|
+
outputSchema Json @default("{}")
|
|
2499
|
+
usageHints Json @default("[]")
|
|
2500
|
+
dependsOn Json @default("[]")
|
|
2501
|
+
trustLevel String @default("untrusted")
|
|
2502
|
+
stats Json @default("{\"executions\":0,\"successRate\":0}")
|
|
2503
|
+
createdAt DateTime @default(now())
|
|
2504
|
+
updatedAt DateTime @updatedAt
|
|
2505
|
+
isDeleted Boolean @default(false)
|
|
2482
2506
|
|
|
2483
2507
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
2484
2508
|
|
|
2485
2509
|
@@unique([userId, name])
|
|
2486
2510
|
@@index([userId, enabled, isDeleted])
|
|
2511
|
+
@@index([userId, origin, isDeleted])
|
|
2487
2512
|
@@map("code_snippets")
|
|
2488
2513
|
}
|
|
2489
2514
|
|
|
@@ -2526,6 +2551,10 @@ model HarnessWorkspace {
|
|
|
2526
2551
|
name String
|
|
2527
2552
|
ownerId String
|
|
2528
2553
|
kind String @default("cloud") // "cloud" | "local-meta"(本地挂载只存元数据)
|
|
2554
|
+
// 本地优先:本地目录映射与按需上云(v3 设计 §2.2)。三列均可空,老数据零迁移。
|
|
2555
|
+
localPath String? // 仅 local-meta:本地目录绝对路径(FS realpath 规范化)
|
|
2556
|
+
cloudOfId String? // local-meta 行指向其云端镜像 cloud 行(P4 按需上云建立;自环禁止)
|
|
2557
|
+
lastSyncedAt DateTime? // 最近一次上云快照时间(映射态展示)
|
|
2529
2558
|
createdAt DateTime @default(now())
|
|
2530
2559
|
updatedAt DateTime @updatedAt
|
|
2531
2560
|
|