@happyvertical/smrt-ingestion 0.0.0-stage → 0.55.6

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.
Files changed (77) hide show
  1. package/AGENTS.md +35 -0
  2. package/CLAUDE.md +1 -0
  3. package/EXTRACTION.md +120 -0
  4. package/LICENSE +7 -0
  5. package/PROPOSALS.md +173 -0
  6. package/README.md +150 -2
  7. package/agents/execution.md +132 -0
  8. package/dist/__smrt-register__.d.ts +2 -0
  9. package/dist/__smrt-register__.d.ts.map +1 -0
  10. package/dist/chunks/execution-C6HJvl9e.js +7667 -0
  11. package/dist/chunks/execution-C6HJvl9e.js.map +1 -0
  12. package/dist/chunks/execution-internal-DWteDHM2.js +7 -0
  13. package/dist/chunks/execution-internal-DWteDHM2.js.map +1 -0
  14. package/dist/chunks/extraction-bseWZuWN.js +293 -0
  15. package/dist/chunks/extraction-bseWZuWN.js.map +1 -0
  16. package/dist/chunks/extraction-providers-C66ADDVe.js +433 -0
  17. package/dist/chunks/extraction-providers-C66ADDVe.js.map +1 -0
  18. package/dist/dto.d.ts +54 -0
  19. package/dist/dto.d.ts.map +1 -0
  20. package/dist/dto.js +0 -0
  21. package/dist/execution-contracts.d.ts +131 -0
  22. package/dist/execution-contracts.d.ts.map +1 -0
  23. package/dist/execution-dto.d.ts +70 -0
  24. package/dist/execution-dto.d.ts.map +1 -0
  25. package/dist/execution-internal.d.ts +7 -0
  26. package/dist/execution-internal.d.ts.map +1 -0
  27. package/dist/execution.d.ts +64 -0
  28. package/dist/execution.d.ts.map +1 -0
  29. package/dist/execution.js +2 -0
  30. package/dist/extraction-providers.d.ts +35 -0
  31. package/dist/extraction-providers.d.ts.map +1 -0
  32. package/dist/extraction-types.d.ts +94 -0
  33. package/dist/extraction-types.d.ts.map +1 -0
  34. package/dist/extraction-worker.d.ts +2 -0
  35. package/dist/extraction-worker.d.ts.map +1 -0
  36. package/dist/extraction-worker.js +81 -0
  37. package/dist/extraction-worker.js.map +1 -0
  38. package/dist/extraction.d.ts +49 -0
  39. package/dist/extraction.d.ts.map +1 -0
  40. package/dist/index.d.ts +4 -0
  41. package/dist/index.d.ts.map +1 -0
  42. package/dist/index.js +3 -0
  43. package/dist/manifest.json +4091 -0
  44. package/dist/models.d.ts +186 -0
  45. package/dist/models.d.ts.map +1 -0
  46. package/dist/models.js +923 -0
  47. package/dist/models.js.map +1 -0
  48. package/dist/policy.d.ts +46 -0
  49. package/dist/policy.d.ts.map +1 -0
  50. package/dist/proposal-contracts.d.ts +85 -0
  51. package/dist/proposal-contracts.d.ts.map +1 -0
  52. package/dist/proposal-dto.d.ts +120 -0
  53. package/dist/proposal-dto.d.ts.map +1 -0
  54. package/dist/proposal-sdk.d.ts +12 -0
  55. package/dist/proposal-sdk.d.ts.map +1 -0
  56. package/dist/proposal-validation.d.ts +188 -0
  57. package/dist/proposal-validation.d.ts.map +1 -0
  58. package/dist/proposals.d.ts +41 -0
  59. package/dist/proposals.d.ts.map +1 -0
  60. package/dist/proposals.js +865 -0
  61. package/dist/proposals.js.map +1 -0
  62. package/dist/server.d.ts +200 -0
  63. package/dist/server.d.ts.map +1 -0
  64. package/dist/server.js +1588 -0
  65. package/dist/server.js.map +1 -0
  66. package/dist/smrt-knowledge.json +1621 -0
  67. package/dist/sources/common.d.ts +32 -0
  68. package/dist/sources/common.d.ts.map +1 -0
  69. package/dist/sources/email.d.ts +40 -0
  70. package/dist/sources/email.d.ts.map +1 -0
  71. package/dist/sources/http.d.ts +30 -0
  72. package/dist/sources/http.d.ts.map +1 -0
  73. package/dist/sources/index.d.ts +8 -0
  74. package/dist/sources/index.d.ts.map +1 -0
  75. package/dist/sources/watch-folder.d.ts +27 -0
  76. package/dist/sources/watch-folder.d.ts.map +1 -0
  77. package/package.json +86 -3
@@ -0,0 +1,4091 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "timestamp": 0,
4
+ "packageName": "@happyvertical/smrt-ingestion",
5
+ "packageVersion": "0.55.6",
6
+ "objects": {
7
+ "@happyvertical/smrt-ingestion:IntakeItem": {
8
+ "name": "intakeitem",
9
+ "className": "IntakeItem",
10
+ "qualifiedName": "@happyvertical/smrt-ingestion:IntakeItem",
11
+ "collection": "intakeitems",
12
+ "filePath": "/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts",
13
+ "packageName": "@happyvertical/smrt-ingestion",
14
+ "fields": {
15
+ "tenantId": {
16
+ "type": "text",
17
+ "required": true,
18
+ "_meta": {
19
+ "sqlType": "UUID",
20
+ "__tenancy": {
21
+ "isTenantIdField": true,
22
+ "autoFilter": true,
23
+ "required": true,
24
+ "autoPopulate": true,
25
+ "nullable": false,
26
+ "mode": "required",
27
+ "field": "tenantId",
28
+ "allowSuperAdminBypass": false
29
+ }
30
+ }
31
+ },
32
+ "confidentialScopeId": {
33
+ "type": "text",
34
+ "required": true,
35
+ "_meta": {
36
+ "required": true
37
+ }
38
+ },
39
+ "sourceId": {
40
+ "type": "text",
41
+ "required": true,
42
+ "_meta": {
43
+ "required": true
44
+ }
45
+ },
46
+ "sourceVersion": {
47
+ "type": "text",
48
+ "required": true,
49
+ "_meta": {
50
+ "required": true
51
+ }
52
+ },
53
+ "deliveryKey": {
54
+ "type": "text",
55
+ "required": true,
56
+ "_meta": {
57
+ "required": true
58
+ }
59
+ },
60
+ "payloadDigest": {
61
+ "type": "text",
62
+ "required": true,
63
+ "_meta": {
64
+ "required": true
65
+ }
66
+ },
67
+ "scopeDigest": {
68
+ "type": "text",
69
+ "required": true,
70
+ "_meta": {
71
+ "required": true
72
+ }
73
+ },
74
+ "receiptState": {
75
+ "type": "text",
76
+ "required": true,
77
+ "_meta": {
78
+ "required": true
79
+ }
80
+ },
81
+ "processingState": {
82
+ "type": "text",
83
+ "required": true,
84
+ "_meta": {
85
+ "required": true
86
+ }
87
+ },
88
+ "visibility": {
89
+ "type": "text",
90
+ "required": true,
91
+ "_meta": {
92
+ "required": true
93
+ }
94
+ },
95
+ "receiptVersion": {
96
+ "type": "integer",
97
+ "required": true,
98
+ "_meta": {
99
+ "required": true
100
+ }
101
+ },
102
+ "analysisRevision": {
103
+ "type": "integer",
104
+ "required": true,
105
+ "_meta": {
106
+ "required": true
107
+ }
108
+ },
109
+ "fence": {
110
+ "type": "integer",
111
+ "required": true,
112
+ "_meta": {
113
+ "required": true
114
+ }
115
+ },
116
+ "leaseToken": {
117
+ "type": "text",
118
+ "required": true,
119
+ "_meta": {
120
+ "required": true
121
+ }
122
+ },
123
+ "leaseUntil": {
124
+ "type": "datetime",
125
+ "required": false,
126
+ "_meta": {
127
+ "nullable": true
128
+ }
129
+ },
130
+ "expiresAt": {
131
+ "type": "datetime",
132
+ "required": true,
133
+ "_meta": {
134
+ "required": true
135
+ }
136
+ },
137
+ "replayUntil": {
138
+ "type": "datetime",
139
+ "required": true,
140
+ "_meta": {
141
+ "required": true
142
+ }
143
+ },
144
+ "cancelled": {
145
+ "type": "boolean",
146
+ "required": true,
147
+ "_meta": {
148
+ "required": true
149
+ }
150
+ },
151
+ "traceId": {
152
+ "type": "text",
153
+ "required": true,
154
+ "_meta": {
155
+ "required": true
156
+ }
157
+ },
158
+ "data": {
159
+ "type": "json",
160
+ "required": true,
161
+ "_meta": {
162
+ "required": true
163
+ }
164
+ }
165
+ },
166
+ "methods": {
167
+ "getData": {
168
+ "name": "getData",
169
+ "async": false,
170
+ "parameters": [],
171
+ "returnType": "Record<string, unknown>",
172
+ "isStatic": false,
173
+ "isPublic": true
174
+ }
175
+ },
176
+ "decoratorConfig": {
177
+ "tableName": "intake_items",
178
+ "conflictColumns": [
179
+ "tenant_id",
180
+ "source_id",
181
+ "delivery_key"
182
+ ],
183
+ "api": false,
184
+ "cli": false,
185
+ "mcp": false,
186
+ "indexes": [
187
+ {
188
+ "name": "intake_items_scope_idx",
189
+ "columns": [
190
+ "tenantId",
191
+ "confidentialScopeId"
192
+ ]
193
+ },
194
+ {
195
+ "name": "intake_items_expiry_idx",
196
+ "columns": [
197
+ "tenantId",
198
+ "expiresAt"
199
+ ]
200
+ },
201
+ {
202
+ "name": "intake_items_receipt_idx",
203
+ "columns": [
204
+ "tenantId",
205
+ "receiptState",
206
+ "leaseUntil"
207
+ ]
208
+ }
209
+ ],
210
+ "tenantScoped": {
211
+ "mode": "required"
212
+ }
213
+ },
214
+ "extends": "SmrtObject",
215
+ "exportName": "IntakeItem",
216
+ "collectionExportName": "IntakeItemCollection",
217
+ "validationRules": [
218
+ {
219
+ "field": "confidentialScopeId",
220
+ "rule": "required",
221
+ "fieldType": "text"
222
+ },
223
+ {
224
+ "field": "sourceId",
225
+ "rule": "required",
226
+ "fieldType": "text"
227
+ },
228
+ {
229
+ "field": "sourceVersion",
230
+ "rule": "required",
231
+ "fieldType": "text"
232
+ },
233
+ {
234
+ "field": "deliveryKey",
235
+ "rule": "required",
236
+ "fieldType": "text"
237
+ },
238
+ {
239
+ "field": "payloadDigest",
240
+ "rule": "required",
241
+ "fieldType": "text"
242
+ },
243
+ {
244
+ "field": "scopeDigest",
245
+ "rule": "required",
246
+ "fieldType": "text"
247
+ },
248
+ {
249
+ "field": "receiptState",
250
+ "rule": "required",
251
+ "fieldType": "text"
252
+ },
253
+ {
254
+ "field": "processingState",
255
+ "rule": "required",
256
+ "fieldType": "text"
257
+ },
258
+ {
259
+ "field": "visibility",
260
+ "rule": "required",
261
+ "fieldType": "text"
262
+ },
263
+ {
264
+ "field": "receiptVersion",
265
+ "rule": "required",
266
+ "fieldType": "integer"
267
+ },
268
+ {
269
+ "field": "analysisRevision",
270
+ "rule": "required",
271
+ "fieldType": "integer"
272
+ },
273
+ {
274
+ "field": "fence",
275
+ "rule": "required",
276
+ "fieldType": "integer"
277
+ },
278
+ {
279
+ "field": "leaseToken",
280
+ "rule": "required",
281
+ "fieldType": "text"
282
+ },
283
+ {
284
+ "field": "expiresAt",
285
+ "rule": "required",
286
+ "fieldType": "datetime"
287
+ },
288
+ {
289
+ "field": "replayUntil",
290
+ "rule": "required",
291
+ "fieldType": "datetime"
292
+ },
293
+ {
294
+ "field": "cancelled",
295
+ "rule": "required",
296
+ "fieldType": "boolean"
297
+ },
298
+ {
299
+ "field": "traceId",
300
+ "rule": "required",
301
+ "fieldType": "text"
302
+ },
303
+ {
304
+ "field": "data",
305
+ "rule": "required",
306
+ "fieldType": "json"
307
+ }
308
+ ],
309
+ "schema": {
310
+ "tableName": "intake_items",
311
+ "ddl": "CREATE TABLE IF NOT EXISTS \"intake_items\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"confidential_scope_id\" TEXT NOT NULL,\n \"source_id\" TEXT NOT NULL,\n \"source_version\" TEXT NOT NULL,\n \"delivery_key\" TEXT NOT NULL,\n \"payload_digest\" TEXT NOT NULL,\n \"scope_digest\" TEXT NOT NULL,\n \"receipt_state\" TEXT NOT NULL,\n \"processing_state\" TEXT NOT NULL,\n \"visibility\" TEXT NOT NULL,\n \"receipt_version\" INTEGER NOT NULL,\n \"analysis_revision\" INTEGER NOT NULL,\n \"fence\" INTEGER NOT NULL,\n \"lease_token\" TEXT NOT NULL,\n \"lease_until\" TIMESTAMP,\n \"expires_at\" TIMESTAMP NOT NULL,\n \"replay_until\" TIMESTAMP NOT NULL,\n \"cancelled\" BOOLEAN NOT NULL,\n \"trace_id\" TEXT NOT NULL,\n \"data\" JSON NOT NULL\n);",
312
+ "columns": {
313
+ "id": {
314
+ "type": "UUID",
315
+ "primaryKey": true,
316
+ "referenceKind": "id",
317
+ "notNull": true
318
+ },
319
+ "slug": {
320
+ "type": "TEXT",
321
+ "notNull": true
322
+ },
323
+ "context": {
324
+ "type": "TEXT",
325
+ "notNull": true,
326
+ "default": ""
327
+ },
328
+ "created_at": {
329
+ "type": "TIMESTAMP",
330
+ "notNull": true,
331
+ "default": "current_timestamp"
332
+ },
333
+ "updated_at": {
334
+ "type": "TIMESTAMP",
335
+ "notNull": true,
336
+ "default": "current_timestamp"
337
+ },
338
+ "tenant_id": {
339
+ "type": "UUID",
340
+ "referenceKind": "tenantId",
341
+ "notNull": true,
342
+ "unique": false
343
+ },
344
+ "confidential_scope_id": {
345
+ "type": "TEXT",
346
+ "notNull": true,
347
+ "unique": false
348
+ },
349
+ "source_id": {
350
+ "type": "TEXT",
351
+ "notNull": true,
352
+ "unique": false
353
+ },
354
+ "source_version": {
355
+ "type": "TEXT",
356
+ "notNull": true,
357
+ "unique": false
358
+ },
359
+ "delivery_key": {
360
+ "type": "TEXT",
361
+ "notNull": true,
362
+ "unique": false
363
+ },
364
+ "payload_digest": {
365
+ "type": "TEXT",
366
+ "notNull": true,
367
+ "unique": false
368
+ },
369
+ "scope_digest": {
370
+ "type": "TEXT",
371
+ "notNull": true,
372
+ "unique": false
373
+ },
374
+ "receipt_state": {
375
+ "type": "TEXT",
376
+ "notNull": true,
377
+ "unique": false
378
+ },
379
+ "processing_state": {
380
+ "type": "TEXT",
381
+ "notNull": true,
382
+ "unique": false
383
+ },
384
+ "visibility": {
385
+ "type": "TEXT",
386
+ "notNull": true,
387
+ "unique": false
388
+ },
389
+ "receipt_version": {
390
+ "type": "INTEGER",
391
+ "notNull": true,
392
+ "unique": false
393
+ },
394
+ "analysis_revision": {
395
+ "type": "INTEGER",
396
+ "notNull": true,
397
+ "unique": false
398
+ },
399
+ "fence": {
400
+ "type": "INTEGER",
401
+ "notNull": true,
402
+ "unique": false
403
+ },
404
+ "lease_token": {
405
+ "type": "TEXT",
406
+ "notNull": true,
407
+ "unique": false
408
+ },
409
+ "lease_until": {
410
+ "type": "TIMESTAMP",
411
+ "notNull": false,
412
+ "unique": false
413
+ },
414
+ "expires_at": {
415
+ "type": "TIMESTAMP",
416
+ "notNull": true,
417
+ "unique": false
418
+ },
419
+ "replay_until": {
420
+ "type": "TIMESTAMP",
421
+ "notNull": true,
422
+ "unique": false
423
+ },
424
+ "cancelled": {
425
+ "type": "BOOLEAN",
426
+ "notNull": true,
427
+ "unique": false
428
+ },
429
+ "trace_id": {
430
+ "type": "TEXT",
431
+ "notNull": true,
432
+ "unique": false
433
+ },
434
+ "data": {
435
+ "type": "JSON",
436
+ "notNull": true,
437
+ "unique": false
438
+ }
439
+ },
440
+ "indexes": [
441
+ {
442
+ "name": "intake_items_tenant_id_source_id_idx",
443
+ "columns": [
444
+ "tenant_id",
445
+ "source_id",
446
+ "delivery_key"
447
+ ],
448
+ "unique": true
449
+ },
450
+ {
451
+ "name": "intake_items_slug_context_idx",
452
+ "columns": [
453
+ "slug",
454
+ "context"
455
+ ]
456
+ },
457
+ {
458
+ "name": "intake_items_scope_idx",
459
+ "columns": [
460
+ "tenant_id",
461
+ "confidential_scope_id"
462
+ ]
463
+ },
464
+ {
465
+ "name": "intake_items_expiry_idx",
466
+ "columns": [
467
+ "tenant_id",
468
+ "expires_at"
469
+ ]
470
+ },
471
+ {
472
+ "name": "intake_items_receipt_idx",
473
+ "columns": [
474
+ "tenant_id",
475
+ "receipt_state",
476
+ "lease_until"
477
+ ]
478
+ },
479
+ {
480
+ "name": "intake_items_tenant_id_created_at_idx",
481
+ "columns": [
482
+ "tenant_id",
483
+ "created_at"
484
+ ]
485
+ }
486
+ ],
487
+ "version": "c1267254"
488
+ },
489
+ "importPath": "@happyvertical/smrt-ingestion/models"
490
+ },
491
+ "@happyvertical/smrt-ingestion:IntakeEvidence": {
492
+ "name": "intakeevidence",
493
+ "className": "IntakeEvidence",
494
+ "qualifiedName": "@happyvertical/smrt-ingestion:IntakeEvidence",
495
+ "collection": "intakeevidences",
496
+ "filePath": "/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts",
497
+ "packageName": "@happyvertical/smrt-ingestion",
498
+ "fields": {
499
+ "tenantId": {
500
+ "type": "text",
501
+ "required": true,
502
+ "_meta": {
503
+ "sqlType": "UUID",
504
+ "__tenancy": {
505
+ "isTenantIdField": true,
506
+ "autoFilter": true,
507
+ "required": true,
508
+ "autoPopulate": true,
509
+ "nullable": false,
510
+ "mode": "required",
511
+ "field": "tenantId",
512
+ "allowSuperAdminBypass": false
513
+ }
514
+ }
515
+ },
516
+ "confidentialScopeId": {
517
+ "type": "text",
518
+ "required": true,
519
+ "_meta": {
520
+ "required": true
521
+ }
522
+ },
523
+ "itemId": {
524
+ "type": "foreignKey",
525
+ "required": true,
526
+ "related": "IntakeItem",
527
+ "_meta": {
528
+ "required": true
529
+ }
530
+ },
531
+ "partId": {
532
+ "type": "text",
533
+ "required": true,
534
+ "_meta": {
535
+ "required": true
536
+ }
537
+ },
538
+ "parentEvidenceId": {
539
+ "type": "foreignKey",
540
+ "required": false,
541
+ "related": "IntakeEvidence",
542
+ "_meta": {
543
+ "nullable": true
544
+ }
545
+ },
546
+ "assetId": {
547
+ "type": "crossPackageRef",
548
+ "required": false,
549
+ "related": "@happyvertical/smrt-assets:Asset",
550
+ "_meta": {
551
+ "nullable": true,
552
+ "onDelete": "SET NULL"
553
+ }
554
+ },
555
+ "state": {
556
+ "type": "text",
557
+ "required": true,
558
+ "_meta": {
559
+ "required": true
560
+ }
561
+ },
562
+ "contentHash": {
563
+ "type": "text",
564
+ "required": true,
565
+ "_meta": {
566
+ "required": true
567
+ }
568
+ },
569
+ "byteLength": {
570
+ "type": "integer",
571
+ "required": true,
572
+ "_meta": {
573
+ "required": true
574
+ }
575
+ },
576
+ "mediaType": {
577
+ "type": "text",
578
+ "required": true,
579
+ "_meta": {
580
+ "required": true
581
+ }
582
+ },
583
+ "sourceUri": {
584
+ "type": "text",
585
+ "required": true,
586
+ "_meta": {
587
+ "required": true
588
+ }
589
+ },
590
+ "data": {
591
+ "type": "json",
592
+ "required": true,
593
+ "_meta": {
594
+ "required": true
595
+ }
596
+ }
597
+ },
598
+ "methods": {
599
+ "getData": {
600
+ "name": "getData",
601
+ "async": false,
602
+ "parameters": [],
603
+ "returnType": "Record<string, unknown>",
604
+ "isStatic": false,
605
+ "isPublic": true
606
+ }
607
+ },
608
+ "decoratorConfig": {
609
+ "tableName": "intake_evidence",
610
+ "conflictColumns": [
611
+ "tenant_id",
612
+ "item_id",
613
+ "part_id"
614
+ ],
615
+ "api": false,
616
+ "cli": false,
617
+ "mcp": false,
618
+ "indexes": [
619
+ {
620
+ "name": "intake_evidence_scope_idx",
621
+ "columns": [
622
+ "tenantId",
623
+ "confidentialScopeId"
624
+ ]
625
+ },
626
+ {
627
+ "name": "intake_evidence_item_idx",
628
+ "columns": [
629
+ "tenantId",
630
+ "itemId"
631
+ ]
632
+ },
633
+ {
634
+ "name": "intake_evidence_state_idx",
635
+ "columns": [
636
+ "tenantId",
637
+ "state"
638
+ ]
639
+ }
640
+ ],
641
+ "tenantScoped": {
642
+ "mode": "required"
643
+ }
644
+ },
645
+ "extends": "SmrtObject",
646
+ "exportName": "IntakeEvidence",
647
+ "collectionExportName": "IntakeEvidenceCollection",
648
+ "validationRules": [
649
+ {
650
+ "field": "confidentialScopeId",
651
+ "rule": "required",
652
+ "fieldType": "text"
653
+ },
654
+ {
655
+ "field": "itemId",
656
+ "rule": "required",
657
+ "fieldType": "foreignKey"
658
+ },
659
+ {
660
+ "field": "partId",
661
+ "rule": "required",
662
+ "fieldType": "text"
663
+ },
664
+ {
665
+ "field": "state",
666
+ "rule": "required",
667
+ "fieldType": "text"
668
+ },
669
+ {
670
+ "field": "contentHash",
671
+ "rule": "required",
672
+ "fieldType": "text"
673
+ },
674
+ {
675
+ "field": "byteLength",
676
+ "rule": "required",
677
+ "fieldType": "integer"
678
+ },
679
+ {
680
+ "field": "mediaType",
681
+ "rule": "required",
682
+ "fieldType": "text"
683
+ },
684
+ {
685
+ "field": "sourceUri",
686
+ "rule": "required",
687
+ "fieldType": "text"
688
+ },
689
+ {
690
+ "field": "data",
691
+ "rule": "required",
692
+ "fieldType": "json"
693
+ }
694
+ ],
695
+ "schema": {
696
+ "tableName": "intake_evidence",
697
+ "ddl": "CREATE TABLE IF NOT EXISTS \"intake_evidence\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"confidential_scope_id\" TEXT NOT NULL,\n \"item_id\" UUID NOT NULL,\n \"part_id\" TEXT NOT NULL,\n \"parent_evidence_id\" UUID,\n \"asset_id\" UUID,\n \"state\" TEXT NOT NULL,\n \"content_hash\" TEXT NOT NULL,\n \"byte_length\" INTEGER NOT NULL,\n \"media_type\" TEXT NOT NULL,\n \"source_uri\" TEXT NOT NULL,\n \"data\" JSON NOT NULL\n);",
698
+ "columns": {
699
+ "id": {
700
+ "type": "UUID",
701
+ "primaryKey": true,
702
+ "referenceKind": "id",
703
+ "notNull": true
704
+ },
705
+ "slug": {
706
+ "type": "TEXT",
707
+ "notNull": true
708
+ },
709
+ "context": {
710
+ "type": "TEXT",
711
+ "notNull": true,
712
+ "default": ""
713
+ },
714
+ "created_at": {
715
+ "type": "TIMESTAMP",
716
+ "notNull": true,
717
+ "default": "current_timestamp"
718
+ },
719
+ "updated_at": {
720
+ "type": "TIMESTAMP",
721
+ "notNull": true,
722
+ "default": "current_timestamp"
723
+ },
724
+ "tenant_id": {
725
+ "type": "UUID",
726
+ "referenceKind": "tenantId",
727
+ "notNull": true,
728
+ "unique": false
729
+ },
730
+ "confidential_scope_id": {
731
+ "type": "TEXT",
732
+ "notNull": true,
733
+ "unique": false
734
+ },
735
+ "item_id": {
736
+ "type": "UUID",
737
+ "referenceKind": "foreignKey",
738
+ "notNull": true,
739
+ "unique": false,
740
+ "foreignKey": {
741
+ "table": "intake_items",
742
+ "column": "id",
743
+ "onDelete": "CASCADE",
744
+ "onUpdate": "CASCADE"
745
+ }
746
+ },
747
+ "part_id": {
748
+ "type": "TEXT",
749
+ "notNull": true,
750
+ "unique": false
751
+ },
752
+ "parent_evidence_id": {
753
+ "type": "UUID",
754
+ "referenceKind": "foreignKey",
755
+ "notNull": false,
756
+ "unique": false,
757
+ "foreignKey": {
758
+ "table": "intake_evidence",
759
+ "column": "id",
760
+ "onDelete": "NO ACTION",
761
+ "onUpdate": "CASCADE"
762
+ }
763
+ },
764
+ "asset_id": {
765
+ "type": "UUID",
766
+ "referenceKind": "crossPackageRef",
767
+ "notNull": false,
768
+ "unique": false
769
+ },
770
+ "state": {
771
+ "type": "TEXT",
772
+ "notNull": true,
773
+ "unique": false
774
+ },
775
+ "content_hash": {
776
+ "type": "TEXT",
777
+ "notNull": true,
778
+ "unique": false
779
+ },
780
+ "byte_length": {
781
+ "type": "INTEGER",
782
+ "notNull": true,
783
+ "unique": false
784
+ },
785
+ "media_type": {
786
+ "type": "TEXT",
787
+ "notNull": true,
788
+ "unique": false
789
+ },
790
+ "source_uri": {
791
+ "type": "TEXT",
792
+ "notNull": true,
793
+ "unique": false
794
+ },
795
+ "data": {
796
+ "type": "JSON",
797
+ "notNull": true,
798
+ "unique": false
799
+ }
800
+ },
801
+ "indexes": [
802
+ {
803
+ "name": "intake_evidence_tenant_id_item_id_idx",
804
+ "columns": [
805
+ "tenant_id",
806
+ "item_id",
807
+ "part_id"
808
+ ],
809
+ "unique": true
810
+ },
811
+ {
812
+ "name": "intake_evidence_slug_context_idx",
813
+ "columns": [
814
+ "slug",
815
+ "context"
816
+ ]
817
+ },
818
+ {
819
+ "name": "intake_evidence_scope_idx",
820
+ "columns": [
821
+ "tenant_id",
822
+ "confidential_scope_id"
823
+ ]
824
+ },
825
+ {
826
+ "name": "intake_evidence_item_idx",
827
+ "columns": [
828
+ "tenant_id",
829
+ "item_id"
830
+ ]
831
+ },
832
+ {
833
+ "name": "intake_evidence_state_idx",
834
+ "columns": [
835
+ "tenant_id",
836
+ "state"
837
+ ]
838
+ },
839
+ {
840
+ "name": "intake_evidence_tenant_id_created_at_idx",
841
+ "columns": [
842
+ "tenant_id",
843
+ "created_at"
844
+ ]
845
+ },
846
+ {
847
+ "name": "intake_evidence_item_id_idx",
848
+ "columns": [
849
+ "item_id"
850
+ ]
851
+ },
852
+ {
853
+ "name": "intake_evidence_parent_evidence_id_idx",
854
+ "columns": [
855
+ "parent_evidence_id"
856
+ ]
857
+ },
858
+ {
859
+ "name": "intake_evidence_asset_id_idx",
860
+ "columns": [
861
+ "asset_id"
862
+ ]
863
+ }
864
+ ],
865
+ "version": "503a292c"
866
+ },
867
+ "importPath": "@happyvertical/smrt-ingestion/models"
868
+ },
869
+ "@happyvertical/smrt-ingestion:IntakeAnalysis": {
870
+ "name": "intakeanalysis",
871
+ "className": "IntakeAnalysis",
872
+ "qualifiedName": "@happyvertical/smrt-ingestion:IntakeAnalysis",
873
+ "collection": "intakeanalysises",
874
+ "filePath": "/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts",
875
+ "packageName": "@happyvertical/smrt-ingestion",
876
+ "fields": {
877
+ "tenantId": {
878
+ "type": "text",
879
+ "required": true,
880
+ "_meta": {
881
+ "sqlType": "UUID",
882
+ "__tenancy": {
883
+ "isTenantIdField": true,
884
+ "autoFilter": true,
885
+ "required": true,
886
+ "autoPopulate": true,
887
+ "nullable": false,
888
+ "mode": "required",
889
+ "field": "tenantId",
890
+ "allowSuperAdminBypass": false
891
+ }
892
+ }
893
+ },
894
+ "confidentialScopeId": {
895
+ "type": "text",
896
+ "required": true,
897
+ "_meta": {
898
+ "required": true
899
+ }
900
+ },
901
+ "itemId": {
902
+ "type": "foreignKey",
903
+ "required": true,
904
+ "related": "IntakeItem",
905
+ "_meta": {
906
+ "required": true
907
+ }
908
+ },
909
+ "revision": {
910
+ "type": "integer",
911
+ "required": true,
912
+ "_meta": {
913
+ "required": true
914
+ }
915
+ },
916
+ "fence": {
917
+ "type": "integer",
918
+ "required": true,
919
+ "_meta": {
920
+ "required": true
921
+ }
922
+ },
923
+ "attemptNumber": {
924
+ "type": "integer",
925
+ "required": true,
926
+ "_meta": {
927
+ "required": true
928
+ }
929
+ },
930
+ "currentAttemptId": {
931
+ "type": "foreignKey",
932
+ "required": false,
933
+ "related": "IntakeAnalysisAttempt",
934
+ "_meta": {
935
+ "nullable": true
936
+ }
937
+ },
938
+ "state": {
939
+ "type": "text",
940
+ "required": true,
941
+ "_meta": {
942
+ "required": true
943
+ }
944
+ },
945
+ "inputDigest": {
946
+ "type": "text",
947
+ "required": true,
948
+ "_meta": {
949
+ "required": true
950
+ }
951
+ },
952
+ "data": {
953
+ "type": "json",
954
+ "required": true,
955
+ "_meta": {
956
+ "required": true
957
+ }
958
+ }
959
+ },
960
+ "methods": {
961
+ "getData": {
962
+ "name": "getData",
963
+ "async": false,
964
+ "parameters": [],
965
+ "returnType": "Record<string, unknown>",
966
+ "isStatic": false,
967
+ "isPublic": true
968
+ }
969
+ },
970
+ "decoratorConfig": {
971
+ "tableName": "intake_analyses",
972
+ "conflictColumns": [
973
+ "tenant_id",
974
+ "item_id",
975
+ "revision"
976
+ ],
977
+ "api": false,
978
+ "cli": false,
979
+ "mcp": false,
980
+ "indexes": [
981
+ {
982
+ "name": "intake_analyses_scope_idx",
983
+ "columns": [
984
+ "tenantId",
985
+ "confidentialScopeId"
986
+ ]
987
+ },
988
+ {
989
+ "name": "intake_analyses_item_idx",
990
+ "columns": [
991
+ "tenantId",
992
+ "itemId"
993
+ ]
994
+ },
995
+ {
996
+ "name": "intake_analyses_state_idx",
997
+ "columns": [
998
+ "tenantId",
999
+ "state"
1000
+ ]
1001
+ }
1002
+ ],
1003
+ "tenantScoped": {
1004
+ "mode": "required"
1005
+ }
1006
+ },
1007
+ "extends": "SmrtObject",
1008
+ "exportName": "IntakeAnalysis",
1009
+ "collectionExportName": "IntakeAnalysisCollection",
1010
+ "validationRules": [
1011
+ {
1012
+ "field": "confidentialScopeId",
1013
+ "rule": "required",
1014
+ "fieldType": "text"
1015
+ },
1016
+ {
1017
+ "field": "itemId",
1018
+ "rule": "required",
1019
+ "fieldType": "foreignKey"
1020
+ },
1021
+ {
1022
+ "field": "revision",
1023
+ "rule": "required",
1024
+ "fieldType": "integer"
1025
+ },
1026
+ {
1027
+ "field": "fence",
1028
+ "rule": "required",
1029
+ "fieldType": "integer"
1030
+ },
1031
+ {
1032
+ "field": "attemptNumber",
1033
+ "rule": "required",
1034
+ "fieldType": "integer"
1035
+ },
1036
+ {
1037
+ "field": "state",
1038
+ "rule": "required",
1039
+ "fieldType": "text"
1040
+ },
1041
+ {
1042
+ "field": "inputDigest",
1043
+ "rule": "required",
1044
+ "fieldType": "text"
1045
+ },
1046
+ {
1047
+ "field": "data",
1048
+ "rule": "required",
1049
+ "fieldType": "json"
1050
+ }
1051
+ ],
1052
+ "schema": {
1053
+ "tableName": "intake_analyses",
1054
+ "ddl": "CREATE TABLE IF NOT EXISTS \"intake_analyses\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"confidential_scope_id\" TEXT NOT NULL,\n \"item_id\" UUID NOT NULL,\n \"revision\" INTEGER NOT NULL,\n \"fence\" INTEGER NOT NULL,\n \"attempt_number\" INTEGER NOT NULL,\n \"current_attempt_id\" UUID,\n \"state\" TEXT NOT NULL,\n \"input_digest\" TEXT NOT NULL,\n \"data\" JSON NOT NULL\n);",
1055
+ "columns": {
1056
+ "id": {
1057
+ "type": "UUID",
1058
+ "primaryKey": true,
1059
+ "referenceKind": "id",
1060
+ "notNull": true
1061
+ },
1062
+ "slug": {
1063
+ "type": "TEXT",
1064
+ "notNull": true
1065
+ },
1066
+ "context": {
1067
+ "type": "TEXT",
1068
+ "notNull": true,
1069
+ "default": ""
1070
+ },
1071
+ "created_at": {
1072
+ "type": "TIMESTAMP",
1073
+ "notNull": true,
1074
+ "default": "current_timestamp"
1075
+ },
1076
+ "updated_at": {
1077
+ "type": "TIMESTAMP",
1078
+ "notNull": true,
1079
+ "default": "current_timestamp"
1080
+ },
1081
+ "tenant_id": {
1082
+ "type": "UUID",
1083
+ "referenceKind": "tenantId",
1084
+ "notNull": true,
1085
+ "unique": false
1086
+ },
1087
+ "confidential_scope_id": {
1088
+ "type": "TEXT",
1089
+ "notNull": true,
1090
+ "unique": false
1091
+ },
1092
+ "item_id": {
1093
+ "type": "UUID",
1094
+ "referenceKind": "foreignKey",
1095
+ "notNull": true,
1096
+ "unique": false,
1097
+ "foreignKey": {
1098
+ "table": "intake_items",
1099
+ "column": "id",
1100
+ "onDelete": "CASCADE",
1101
+ "onUpdate": "CASCADE"
1102
+ }
1103
+ },
1104
+ "revision": {
1105
+ "type": "INTEGER",
1106
+ "notNull": true,
1107
+ "unique": false
1108
+ },
1109
+ "fence": {
1110
+ "type": "INTEGER",
1111
+ "notNull": true,
1112
+ "unique": false
1113
+ },
1114
+ "attempt_number": {
1115
+ "type": "INTEGER",
1116
+ "notNull": true,
1117
+ "unique": false
1118
+ },
1119
+ "current_attempt_id": {
1120
+ "type": "UUID",
1121
+ "referenceKind": "foreignKey",
1122
+ "notNull": false,
1123
+ "unique": false,
1124
+ "foreignKey": {
1125
+ "table": "intake_analysis_attempts",
1126
+ "column": "id",
1127
+ "onDelete": "NO ACTION",
1128
+ "onUpdate": "CASCADE"
1129
+ }
1130
+ },
1131
+ "state": {
1132
+ "type": "TEXT",
1133
+ "notNull": true,
1134
+ "unique": false
1135
+ },
1136
+ "input_digest": {
1137
+ "type": "TEXT",
1138
+ "notNull": true,
1139
+ "unique": false
1140
+ },
1141
+ "data": {
1142
+ "type": "JSON",
1143
+ "notNull": true,
1144
+ "unique": false
1145
+ }
1146
+ },
1147
+ "indexes": [
1148
+ {
1149
+ "name": "intake_analyses_tenant_id_item_id_idx",
1150
+ "columns": [
1151
+ "tenant_id",
1152
+ "item_id",
1153
+ "revision"
1154
+ ],
1155
+ "unique": true
1156
+ },
1157
+ {
1158
+ "name": "intake_analyses_slug_context_idx",
1159
+ "columns": [
1160
+ "slug",
1161
+ "context"
1162
+ ]
1163
+ },
1164
+ {
1165
+ "name": "intake_analyses_scope_idx",
1166
+ "columns": [
1167
+ "tenant_id",
1168
+ "confidential_scope_id"
1169
+ ]
1170
+ },
1171
+ {
1172
+ "name": "intake_analyses_item_idx",
1173
+ "columns": [
1174
+ "tenant_id",
1175
+ "item_id"
1176
+ ]
1177
+ },
1178
+ {
1179
+ "name": "intake_analyses_state_idx",
1180
+ "columns": [
1181
+ "tenant_id",
1182
+ "state"
1183
+ ]
1184
+ },
1185
+ {
1186
+ "name": "intake_analyses_tenant_id_created_at_idx",
1187
+ "columns": [
1188
+ "tenant_id",
1189
+ "created_at"
1190
+ ]
1191
+ },
1192
+ {
1193
+ "name": "intake_analyses_item_id_idx",
1194
+ "columns": [
1195
+ "item_id"
1196
+ ]
1197
+ },
1198
+ {
1199
+ "name": "intake_analyses_current_attempt_id_idx",
1200
+ "columns": [
1201
+ "current_attempt_id"
1202
+ ]
1203
+ }
1204
+ ],
1205
+ "version": "7c76601a"
1206
+ },
1207
+ "importPath": "@happyvertical/smrt-ingestion/models"
1208
+ },
1209
+ "@happyvertical/smrt-ingestion:IntakeAnalysisAttempt": {
1210
+ "name": "intakeanalysisattempt",
1211
+ "className": "IntakeAnalysisAttempt",
1212
+ "qualifiedName": "@happyvertical/smrt-ingestion:IntakeAnalysisAttempt",
1213
+ "collection": "intakeanalysisattempts",
1214
+ "filePath": "/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts",
1215
+ "packageName": "@happyvertical/smrt-ingestion",
1216
+ "fields": {
1217
+ "tenantId": {
1218
+ "type": "text",
1219
+ "required": true,
1220
+ "_meta": {
1221
+ "sqlType": "UUID",
1222
+ "__tenancy": {
1223
+ "isTenantIdField": true,
1224
+ "autoFilter": true,
1225
+ "required": true,
1226
+ "autoPopulate": true,
1227
+ "nullable": false,
1228
+ "mode": "required",
1229
+ "field": "tenantId",
1230
+ "allowSuperAdminBypass": false
1231
+ }
1232
+ }
1233
+ },
1234
+ "confidentialScopeId": {
1235
+ "type": "text",
1236
+ "required": true,
1237
+ "_meta": {
1238
+ "required": true
1239
+ }
1240
+ },
1241
+ "itemId": {
1242
+ "type": "foreignKey",
1243
+ "required": true,
1244
+ "related": "IntakeItem",
1245
+ "_meta": {
1246
+ "required": true
1247
+ }
1248
+ },
1249
+ "analysisId": {
1250
+ "type": "foreignKey",
1251
+ "required": true,
1252
+ "related": "IntakeAnalysis",
1253
+ "_meta": {
1254
+ "required": true
1255
+ }
1256
+ },
1257
+ "attemptNumber": {
1258
+ "type": "integer",
1259
+ "required": true,
1260
+ "_meta": {
1261
+ "required": true
1262
+ }
1263
+ },
1264
+ "fence": {
1265
+ "type": "integer",
1266
+ "required": true,
1267
+ "_meta": {
1268
+ "required": true
1269
+ }
1270
+ },
1271
+ "state": {
1272
+ "type": "text",
1273
+ "required": true,
1274
+ "_meta": {
1275
+ "required": true
1276
+ }
1277
+ },
1278
+ "leaseToken": {
1279
+ "type": "text",
1280
+ "required": true,
1281
+ "_meta": {
1282
+ "required": true
1283
+ }
1284
+ },
1285
+ "leaseUntil": {
1286
+ "type": "datetime",
1287
+ "required": false,
1288
+ "_meta": {
1289
+ "nullable": true
1290
+ }
1291
+ },
1292
+ "outputDigest": {
1293
+ "type": "text",
1294
+ "required": true,
1295
+ "_meta": {
1296
+ "required": true
1297
+ }
1298
+ },
1299
+ "safeError": {
1300
+ "type": "text",
1301
+ "required": true,
1302
+ "_meta": {
1303
+ "required": true
1304
+ }
1305
+ },
1306
+ "confidence": {
1307
+ "type": "decimal",
1308
+ "required": false,
1309
+ "_meta": {
1310
+ "nullable": true
1311
+ }
1312
+ },
1313
+ "data": {
1314
+ "type": "json",
1315
+ "required": true,
1316
+ "_meta": {
1317
+ "required": true
1318
+ }
1319
+ }
1320
+ },
1321
+ "methods": {
1322
+ "getData": {
1323
+ "name": "getData",
1324
+ "async": false,
1325
+ "parameters": [],
1326
+ "returnType": "Record<string, unknown>",
1327
+ "isStatic": false,
1328
+ "isPublic": true
1329
+ }
1330
+ },
1331
+ "decoratorConfig": {
1332
+ "tableName": "intake_analysis_attempts",
1333
+ "conflictColumns": [
1334
+ "tenant_id",
1335
+ "analysis_id",
1336
+ "attempt_number"
1337
+ ],
1338
+ "api": false,
1339
+ "cli": false,
1340
+ "mcp": false,
1341
+ "indexes": [
1342
+ {
1343
+ "name": "intake_analysis_attempts_scope_idx",
1344
+ "columns": [
1345
+ "tenantId",
1346
+ "confidentialScopeId"
1347
+ ]
1348
+ },
1349
+ {
1350
+ "name": "intake_analysis_attempts_item_idx",
1351
+ "columns": [
1352
+ "tenantId",
1353
+ "itemId"
1354
+ ]
1355
+ },
1356
+ {
1357
+ "name": "intake_analysis_attempts_state_idx",
1358
+ "columns": [
1359
+ "tenantId",
1360
+ "state"
1361
+ ]
1362
+ }
1363
+ ],
1364
+ "tenantScoped": {
1365
+ "mode": "required"
1366
+ }
1367
+ },
1368
+ "extends": "SmrtObject",
1369
+ "exportName": "IntakeAnalysisAttempt",
1370
+ "collectionExportName": "IntakeAnalysisAttemptCollection",
1371
+ "validationRules": [
1372
+ {
1373
+ "field": "confidentialScopeId",
1374
+ "rule": "required",
1375
+ "fieldType": "text"
1376
+ },
1377
+ {
1378
+ "field": "itemId",
1379
+ "rule": "required",
1380
+ "fieldType": "foreignKey"
1381
+ },
1382
+ {
1383
+ "field": "analysisId",
1384
+ "rule": "required",
1385
+ "fieldType": "foreignKey"
1386
+ },
1387
+ {
1388
+ "field": "attemptNumber",
1389
+ "rule": "required",
1390
+ "fieldType": "integer"
1391
+ },
1392
+ {
1393
+ "field": "fence",
1394
+ "rule": "required",
1395
+ "fieldType": "integer"
1396
+ },
1397
+ {
1398
+ "field": "state",
1399
+ "rule": "required",
1400
+ "fieldType": "text"
1401
+ },
1402
+ {
1403
+ "field": "leaseToken",
1404
+ "rule": "required",
1405
+ "fieldType": "text"
1406
+ },
1407
+ {
1408
+ "field": "outputDigest",
1409
+ "rule": "required",
1410
+ "fieldType": "text"
1411
+ },
1412
+ {
1413
+ "field": "safeError",
1414
+ "rule": "required",
1415
+ "fieldType": "text"
1416
+ },
1417
+ {
1418
+ "field": "data",
1419
+ "rule": "required",
1420
+ "fieldType": "json"
1421
+ }
1422
+ ],
1423
+ "schema": {
1424
+ "tableName": "intake_analysis_attempts",
1425
+ "ddl": "CREATE TABLE IF NOT EXISTS \"intake_analysis_attempts\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"confidential_scope_id\" TEXT NOT NULL,\n \"item_id\" UUID NOT NULL,\n \"analysis_id\" UUID NOT NULL,\n \"attempt_number\" INTEGER NOT NULL,\n \"fence\" INTEGER NOT NULL,\n \"state\" TEXT NOT NULL,\n \"lease_token\" TEXT NOT NULL,\n \"lease_until\" TIMESTAMP,\n \"output_digest\" TEXT NOT NULL,\n \"safe_error\" TEXT NOT NULL,\n \"confidence\" REAL,\n \"data\" JSON NOT NULL\n);",
1426
+ "columns": {
1427
+ "id": {
1428
+ "type": "UUID",
1429
+ "primaryKey": true,
1430
+ "referenceKind": "id",
1431
+ "notNull": true
1432
+ },
1433
+ "slug": {
1434
+ "type": "TEXT",
1435
+ "notNull": true
1436
+ },
1437
+ "context": {
1438
+ "type": "TEXT",
1439
+ "notNull": true,
1440
+ "default": ""
1441
+ },
1442
+ "created_at": {
1443
+ "type": "TIMESTAMP",
1444
+ "notNull": true,
1445
+ "default": "current_timestamp"
1446
+ },
1447
+ "updated_at": {
1448
+ "type": "TIMESTAMP",
1449
+ "notNull": true,
1450
+ "default": "current_timestamp"
1451
+ },
1452
+ "tenant_id": {
1453
+ "type": "UUID",
1454
+ "referenceKind": "tenantId",
1455
+ "notNull": true,
1456
+ "unique": false
1457
+ },
1458
+ "confidential_scope_id": {
1459
+ "type": "TEXT",
1460
+ "notNull": true,
1461
+ "unique": false
1462
+ },
1463
+ "item_id": {
1464
+ "type": "UUID",
1465
+ "referenceKind": "foreignKey",
1466
+ "notNull": true,
1467
+ "unique": false,
1468
+ "foreignKey": {
1469
+ "table": "intake_items",
1470
+ "column": "id",
1471
+ "onDelete": "NO ACTION",
1472
+ "onUpdate": "CASCADE"
1473
+ }
1474
+ },
1475
+ "analysis_id": {
1476
+ "type": "UUID",
1477
+ "referenceKind": "foreignKey",
1478
+ "notNull": true,
1479
+ "unique": false,
1480
+ "foreignKey": {
1481
+ "table": "intake_analyses",
1482
+ "column": "id",
1483
+ "onDelete": "CASCADE",
1484
+ "onUpdate": "CASCADE"
1485
+ }
1486
+ },
1487
+ "attempt_number": {
1488
+ "type": "INTEGER",
1489
+ "notNull": true,
1490
+ "unique": false
1491
+ },
1492
+ "fence": {
1493
+ "type": "INTEGER",
1494
+ "notNull": true,
1495
+ "unique": false
1496
+ },
1497
+ "state": {
1498
+ "type": "TEXT",
1499
+ "notNull": true,
1500
+ "unique": false
1501
+ },
1502
+ "lease_token": {
1503
+ "type": "TEXT",
1504
+ "notNull": true,
1505
+ "unique": false
1506
+ },
1507
+ "lease_until": {
1508
+ "type": "TIMESTAMP",
1509
+ "notNull": false,
1510
+ "unique": false
1511
+ },
1512
+ "output_digest": {
1513
+ "type": "TEXT",
1514
+ "notNull": true,
1515
+ "unique": false
1516
+ },
1517
+ "safe_error": {
1518
+ "type": "TEXT",
1519
+ "notNull": true,
1520
+ "unique": false
1521
+ },
1522
+ "confidence": {
1523
+ "type": "REAL",
1524
+ "notNull": false,
1525
+ "unique": false
1526
+ },
1527
+ "data": {
1528
+ "type": "JSON",
1529
+ "notNull": true,
1530
+ "unique": false
1531
+ }
1532
+ },
1533
+ "indexes": [
1534
+ {
1535
+ "name": "intake_analysis_attempts_tenant_id_analysis_id_idx",
1536
+ "columns": [
1537
+ "tenant_id",
1538
+ "analysis_id",
1539
+ "attempt_number"
1540
+ ],
1541
+ "unique": true
1542
+ },
1543
+ {
1544
+ "name": "intake_analysis_attempts_slug_context_idx",
1545
+ "columns": [
1546
+ "slug",
1547
+ "context"
1548
+ ]
1549
+ },
1550
+ {
1551
+ "name": "intake_analysis_attempts_scope_idx",
1552
+ "columns": [
1553
+ "tenant_id",
1554
+ "confidential_scope_id"
1555
+ ]
1556
+ },
1557
+ {
1558
+ "name": "intake_analysis_attempts_item_idx",
1559
+ "columns": [
1560
+ "tenant_id",
1561
+ "item_id"
1562
+ ]
1563
+ },
1564
+ {
1565
+ "name": "intake_analysis_attempts_state_idx",
1566
+ "columns": [
1567
+ "tenant_id",
1568
+ "state"
1569
+ ]
1570
+ },
1571
+ {
1572
+ "name": "intake_analysis_attempts_tenant_id_created_at_idx",
1573
+ "columns": [
1574
+ "tenant_id",
1575
+ "created_at"
1576
+ ]
1577
+ },
1578
+ {
1579
+ "name": "intake_analysis_attempts_item_id_idx",
1580
+ "columns": [
1581
+ "item_id"
1582
+ ]
1583
+ },
1584
+ {
1585
+ "name": "intake_analysis_attempts_analysis_id_idx",
1586
+ "columns": [
1587
+ "analysis_id"
1588
+ ]
1589
+ }
1590
+ ],
1591
+ "version": "b51f7c2d"
1592
+ },
1593
+ "importPath": "@happyvertical/smrt-ingestion/models"
1594
+ },
1595
+ "@happyvertical/smrt-ingestion:IntakePlan": {
1596
+ "name": "intakeplan",
1597
+ "className": "IntakePlan",
1598
+ "qualifiedName": "@happyvertical/smrt-ingestion:IntakePlan",
1599
+ "collection": "intakeplans",
1600
+ "filePath": "/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts",
1601
+ "packageName": "@happyvertical/smrt-ingestion",
1602
+ "fields": {
1603
+ "tenantId": {
1604
+ "type": "text",
1605
+ "required": true,
1606
+ "_meta": {
1607
+ "sqlType": "UUID",
1608
+ "__tenancy": {
1609
+ "isTenantIdField": true,
1610
+ "autoFilter": true,
1611
+ "required": true,
1612
+ "autoPopulate": true,
1613
+ "nullable": false,
1614
+ "mode": "required",
1615
+ "field": "tenantId",
1616
+ "allowSuperAdminBypass": false
1617
+ }
1618
+ }
1619
+ },
1620
+ "confidentialScopeId": {
1621
+ "type": "text",
1622
+ "required": true,
1623
+ "_meta": {
1624
+ "required": true
1625
+ }
1626
+ },
1627
+ "itemId": {
1628
+ "type": "foreignKey",
1629
+ "required": true,
1630
+ "related": "IntakeItem",
1631
+ "_meta": {
1632
+ "required": true
1633
+ }
1634
+ },
1635
+ "planKey": {
1636
+ "type": "text",
1637
+ "required": true,
1638
+ "_meta": {
1639
+ "required": true
1640
+ }
1641
+ },
1642
+ "revision": {
1643
+ "type": "integer",
1644
+ "required": true,
1645
+ "_meta": {
1646
+ "required": true
1647
+ }
1648
+ },
1649
+ "digest": {
1650
+ "type": "text",
1651
+ "required": true,
1652
+ "_meta": {
1653
+ "required": true
1654
+ }
1655
+ },
1656
+ "data": {
1657
+ "type": "json",
1658
+ "required": true,
1659
+ "_meta": {
1660
+ "required": true
1661
+ }
1662
+ }
1663
+ },
1664
+ "methods": {
1665
+ "getData": {
1666
+ "name": "getData",
1667
+ "async": false,
1668
+ "parameters": [],
1669
+ "returnType": "Record<string, unknown>",
1670
+ "isStatic": false,
1671
+ "isPublic": true
1672
+ }
1673
+ },
1674
+ "decoratorConfig": {
1675
+ "tableName": "intake_plans",
1676
+ "conflictColumns": [
1677
+ "tenant_id",
1678
+ "item_id",
1679
+ "plan_key",
1680
+ "revision"
1681
+ ],
1682
+ "api": false,
1683
+ "cli": false,
1684
+ "mcp": false,
1685
+ "indexes": [
1686
+ {
1687
+ "name": "intake_plans_scope_idx",
1688
+ "columns": [
1689
+ "tenantId",
1690
+ "confidentialScopeId"
1691
+ ]
1692
+ },
1693
+ {
1694
+ "name": "intake_plans_item_idx",
1695
+ "columns": [
1696
+ "tenantId",
1697
+ "itemId"
1698
+ ]
1699
+ }
1700
+ ],
1701
+ "tenantScoped": {
1702
+ "mode": "required"
1703
+ }
1704
+ },
1705
+ "extends": "SmrtObject",
1706
+ "exportName": "IntakePlan",
1707
+ "collectionExportName": "IntakePlanCollection",
1708
+ "validationRules": [
1709
+ {
1710
+ "field": "confidentialScopeId",
1711
+ "rule": "required",
1712
+ "fieldType": "text"
1713
+ },
1714
+ {
1715
+ "field": "itemId",
1716
+ "rule": "required",
1717
+ "fieldType": "foreignKey"
1718
+ },
1719
+ {
1720
+ "field": "planKey",
1721
+ "rule": "required",
1722
+ "fieldType": "text"
1723
+ },
1724
+ {
1725
+ "field": "revision",
1726
+ "rule": "required",
1727
+ "fieldType": "integer"
1728
+ },
1729
+ {
1730
+ "field": "digest",
1731
+ "rule": "required",
1732
+ "fieldType": "text"
1733
+ },
1734
+ {
1735
+ "field": "data",
1736
+ "rule": "required",
1737
+ "fieldType": "json"
1738
+ }
1739
+ ],
1740
+ "schema": {
1741
+ "tableName": "intake_plans",
1742
+ "ddl": "CREATE TABLE IF NOT EXISTS \"intake_plans\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"confidential_scope_id\" TEXT NOT NULL,\n \"item_id\" UUID NOT NULL,\n \"plan_key\" TEXT NOT NULL,\n \"revision\" INTEGER NOT NULL,\n \"digest\" TEXT NOT NULL,\n \"data\" JSON NOT NULL\n);",
1743
+ "columns": {
1744
+ "id": {
1745
+ "type": "UUID",
1746
+ "primaryKey": true,
1747
+ "referenceKind": "id",
1748
+ "notNull": true
1749
+ },
1750
+ "slug": {
1751
+ "type": "TEXT",
1752
+ "notNull": true
1753
+ },
1754
+ "context": {
1755
+ "type": "TEXT",
1756
+ "notNull": true,
1757
+ "default": ""
1758
+ },
1759
+ "created_at": {
1760
+ "type": "TIMESTAMP",
1761
+ "notNull": true,
1762
+ "default": "current_timestamp"
1763
+ },
1764
+ "updated_at": {
1765
+ "type": "TIMESTAMP",
1766
+ "notNull": true,
1767
+ "default": "current_timestamp"
1768
+ },
1769
+ "tenant_id": {
1770
+ "type": "UUID",
1771
+ "referenceKind": "tenantId",
1772
+ "notNull": true,
1773
+ "unique": false
1774
+ },
1775
+ "confidential_scope_id": {
1776
+ "type": "TEXT",
1777
+ "notNull": true,
1778
+ "unique": false
1779
+ },
1780
+ "item_id": {
1781
+ "type": "UUID",
1782
+ "referenceKind": "foreignKey",
1783
+ "notNull": true,
1784
+ "unique": false,
1785
+ "foreignKey": {
1786
+ "table": "intake_items",
1787
+ "column": "id",
1788
+ "onDelete": "CASCADE",
1789
+ "onUpdate": "CASCADE"
1790
+ }
1791
+ },
1792
+ "plan_key": {
1793
+ "type": "TEXT",
1794
+ "notNull": true,
1795
+ "unique": false
1796
+ },
1797
+ "revision": {
1798
+ "type": "INTEGER",
1799
+ "notNull": true,
1800
+ "unique": false
1801
+ },
1802
+ "digest": {
1803
+ "type": "TEXT",
1804
+ "notNull": true,
1805
+ "unique": false
1806
+ },
1807
+ "data": {
1808
+ "type": "JSON",
1809
+ "notNull": true,
1810
+ "unique": false
1811
+ }
1812
+ },
1813
+ "indexes": [
1814
+ {
1815
+ "name": "intake_plans_tenant_id_item_id_idx",
1816
+ "columns": [
1817
+ "tenant_id",
1818
+ "item_id",
1819
+ "plan_key",
1820
+ "revision"
1821
+ ],
1822
+ "unique": true
1823
+ },
1824
+ {
1825
+ "name": "intake_plans_slug_context_idx",
1826
+ "columns": [
1827
+ "slug",
1828
+ "context"
1829
+ ]
1830
+ },
1831
+ {
1832
+ "name": "intake_plans_scope_idx",
1833
+ "columns": [
1834
+ "tenant_id",
1835
+ "confidential_scope_id"
1836
+ ]
1837
+ },
1838
+ {
1839
+ "name": "intake_plans_item_idx",
1840
+ "columns": [
1841
+ "tenant_id",
1842
+ "item_id"
1843
+ ]
1844
+ },
1845
+ {
1846
+ "name": "intake_plans_tenant_id_created_at_idx",
1847
+ "columns": [
1848
+ "tenant_id",
1849
+ "created_at"
1850
+ ]
1851
+ },
1852
+ {
1853
+ "name": "intake_plans_item_id_idx",
1854
+ "columns": [
1855
+ "item_id"
1856
+ ]
1857
+ }
1858
+ ],
1859
+ "version": "ade3ae21"
1860
+ },
1861
+ "importPath": "@happyvertical/smrt-ingestion/models"
1862
+ },
1863
+ "@happyvertical/smrt-ingestion:IntakeAction": {
1864
+ "name": "intakeaction",
1865
+ "className": "IntakeAction",
1866
+ "qualifiedName": "@happyvertical/smrt-ingestion:IntakeAction",
1867
+ "collection": "intakeactions",
1868
+ "filePath": "/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts",
1869
+ "packageName": "@happyvertical/smrt-ingestion",
1870
+ "fields": {
1871
+ "tenantId": {
1872
+ "type": "text",
1873
+ "required": true,
1874
+ "_meta": {
1875
+ "sqlType": "UUID",
1876
+ "__tenancy": {
1877
+ "isTenantIdField": true,
1878
+ "autoFilter": true,
1879
+ "required": true,
1880
+ "autoPopulate": true,
1881
+ "nullable": false,
1882
+ "mode": "required",
1883
+ "field": "tenantId",
1884
+ "allowSuperAdminBypass": false
1885
+ }
1886
+ }
1887
+ },
1888
+ "confidentialScopeId": {
1889
+ "type": "text",
1890
+ "required": true,
1891
+ "_meta": {
1892
+ "required": true
1893
+ }
1894
+ },
1895
+ "itemId": {
1896
+ "type": "foreignKey",
1897
+ "required": true,
1898
+ "related": "IntakeItem",
1899
+ "_meta": {
1900
+ "required": true
1901
+ }
1902
+ },
1903
+ "actionKey": {
1904
+ "type": "text",
1905
+ "required": true,
1906
+ "_meta": {
1907
+ "required": true
1908
+ }
1909
+ },
1910
+ "state": {
1911
+ "type": "text",
1912
+ "required": true,
1913
+ "_meta": {
1914
+ "required": true
1915
+ }
1916
+ },
1917
+ "proposalRevision": {
1918
+ "type": "integer",
1919
+ "required": true,
1920
+ "_meta": {
1921
+ "required": true
1922
+ }
1923
+ },
1924
+ "reviewVersion": {
1925
+ "type": "integer",
1926
+ "required": true,
1927
+ "_meta": {
1928
+ "required": true
1929
+ }
1930
+ },
1931
+ "executionAttempt": {
1932
+ "type": "integer",
1933
+ "required": true,
1934
+ "_meta": {
1935
+ "required": true
1936
+ }
1937
+ },
1938
+ "fence": {
1939
+ "type": "integer",
1940
+ "required": true,
1941
+ "_meta": {
1942
+ "required": true
1943
+ }
1944
+ },
1945
+ "resultDigest": {
1946
+ "type": "text",
1947
+ "required": true,
1948
+ "_meta": {
1949
+ "required": true
1950
+ }
1951
+ },
1952
+ "data": {
1953
+ "type": "json",
1954
+ "required": true,
1955
+ "_meta": {
1956
+ "required": true
1957
+ }
1958
+ }
1959
+ },
1960
+ "methods": {
1961
+ "getData": {
1962
+ "name": "getData",
1963
+ "async": false,
1964
+ "parameters": [],
1965
+ "returnType": "Record<string, unknown>",
1966
+ "isStatic": false,
1967
+ "isPublic": true
1968
+ }
1969
+ },
1970
+ "decoratorConfig": {
1971
+ "tableName": "intake_actions",
1972
+ "conflictColumns": [
1973
+ "tenant_id",
1974
+ "item_id",
1975
+ "action_key"
1976
+ ],
1977
+ "api": false,
1978
+ "cli": false,
1979
+ "mcp": false,
1980
+ "indexes": [
1981
+ {
1982
+ "name": "intake_actions_scope_idx",
1983
+ "columns": [
1984
+ "tenantId",
1985
+ "confidentialScopeId"
1986
+ ]
1987
+ },
1988
+ {
1989
+ "name": "intake_actions_item_idx",
1990
+ "columns": [
1991
+ "tenantId",
1992
+ "itemId"
1993
+ ]
1994
+ },
1995
+ {
1996
+ "name": "intake_actions_state_idx",
1997
+ "columns": [
1998
+ "tenantId",
1999
+ "state"
2000
+ ]
2001
+ }
2002
+ ],
2003
+ "tenantScoped": {
2004
+ "mode": "required"
2005
+ }
2006
+ },
2007
+ "extends": "SmrtObject",
2008
+ "exportName": "IntakeAction",
2009
+ "collectionExportName": "IntakeActionCollection",
2010
+ "validationRules": [
2011
+ {
2012
+ "field": "confidentialScopeId",
2013
+ "rule": "required",
2014
+ "fieldType": "text"
2015
+ },
2016
+ {
2017
+ "field": "itemId",
2018
+ "rule": "required",
2019
+ "fieldType": "foreignKey"
2020
+ },
2021
+ {
2022
+ "field": "actionKey",
2023
+ "rule": "required",
2024
+ "fieldType": "text"
2025
+ },
2026
+ {
2027
+ "field": "state",
2028
+ "rule": "required",
2029
+ "fieldType": "text"
2030
+ },
2031
+ {
2032
+ "field": "proposalRevision",
2033
+ "rule": "required",
2034
+ "fieldType": "integer"
2035
+ },
2036
+ {
2037
+ "field": "reviewVersion",
2038
+ "rule": "required",
2039
+ "fieldType": "integer"
2040
+ },
2041
+ {
2042
+ "field": "executionAttempt",
2043
+ "rule": "required",
2044
+ "fieldType": "integer"
2045
+ },
2046
+ {
2047
+ "field": "fence",
2048
+ "rule": "required",
2049
+ "fieldType": "integer"
2050
+ },
2051
+ {
2052
+ "field": "resultDigest",
2053
+ "rule": "required",
2054
+ "fieldType": "text"
2055
+ },
2056
+ {
2057
+ "field": "data",
2058
+ "rule": "required",
2059
+ "fieldType": "json"
2060
+ }
2061
+ ],
2062
+ "schema": {
2063
+ "tableName": "intake_actions",
2064
+ "ddl": "CREATE TABLE IF NOT EXISTS \"intake_actions\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"confidential_scope_id\" TEXT NOT NULL,\n \"item_id\" UUID NOT NULL,\n \"action_key\" TEXT NOT NULL,\n \"state\" TEXT NOT NULL,\n \"proposal_revision\" INTEGER NOT NULL,\n \"review_version\" INTEGER NOT NULL,\n \"execution_attempt\" INTEGER NOT NULL,\n \"fence\" INTEGER NOT NULL,\n \"result_digest\" TEXT NOT NULL,\n \"data\" JSON NOT NULL\n);",
2065
+ "columns": {
2066
+ "id": {
2067
+ "type": "UUID",
2068
+ "primaryKey": true,
2069
+ "referenceKind": "id",
2070
+ "notNull": true
2071
+ },
2072
+ "slug": {
2073
+ "type": "TEXT",
2074
+ "notNull": true
2075
+ },
2076
+ "context": {
2077
+ "type": "TEXT",
2078
+ "notNull": true,
2079
+ "default": ""
2080
+ },
2081
+ "created_at": {
2082
+ "type": "TIMESTAMP",
2083
+ "notNull": true,
2084
+ "default": "current_timestamp"
2085
+ },
2086
+ "updated_at": {
2087
+ "type": "TIMESTAMP",
2088
+ "notNull": true,
2089
+ "default": "current_timestamp"
2090
+ },
2091
+ "tenant_id": {
2092
+ "type": "UUID",
2093
+ "referenceKind": "tenantId",
2094
+ "notNull": true,
2095
+ "unique": false
2096
+ },
2097
+ "confidential_scope_id": {
2098
+ "type": "TEXT",
2099
+ "notNull": true,
2100
+ "unique": false
2101
+ },
2102
+ "item_id": {
2103
+ "type": "UUID",
2104
+ "referenceKind": "foreignKey",
2105
+ "notNull": true,
2106
+ "unique": false,
2107
+ "foreignKey": {
2108
+ "table": "intake_items",
2109
+ "column": "id",
2110
+ "onDelete": "CASCADE",
2111
+ "onUpdate": "CASCADE"
2112
+ }
2113
+ },
2114
+ "action_key": {
2115
+ "type": "TEXT",
2116
+ "notNull": true,
2117
+ "unique": false
2118
+ },
2119
+ "state": {
2120
+ "type": "TEXT",
2121
+ "notNull": true,
2122
+ "unique": false
2123
+ },
2124
+ "proposal_revision": {
2125
+ "type": "INTEGER",
2126
+ "notNull": true,
2127
+ "unique": false
2128
+ },
2129
+ "review_version": {
2130
+ "type": "INTEGER",
2131
+ "notNull": true,
2132
+ "unique": false
2133
+ },
2134
+ "execution_attempt": {
2135
+ "type": "INTEGER",
2136
+ "notNull": true,
2137
+ "unique": false
2138
+ },
2139
+ "fence": {
2140
+ "type": "INTEGER",
2141
+ "notNull": true,
2142
+ "unique": false
2143
+ },
2144
+ "result_digest": {
2145
+ "type": "TEXT",
2146
+ "notNull": true,
2147
+ "unique": false
2148
+ },
2149
+ "data": {
2150
+ "type": "JSON",
2151
+ "notNull": true,
2152
+ "unique": false
2153
+ }
2154
+ },
2155
+ "indexes": [
2156
+ {
2157
+ "name": "intake_actions_tenant_id_item_id_idx",
2158
+ "columns": [
2159
+ "tenant_id",
2160
+ "item_id",
2161
+ "action_key"
2162
+ ],
2163
+ "unique": true
2164
+ },
2165
+ {
2166
+ "name": "intake_actions_slug_context_idx",
2167
+ "columns": [
2168
+ "slug",
2169
+ "context"
2170
+ ]
2171
+ },
2172
+ {
2173
+ "name": "intake_actions_scope_idx",
2174
+ "columns": [
2175
+ "tenant_id",
2176
+ "confidential_scope_id"
2177
+ ]
2178
+ },
2179
+ {
2180
+ "name": "intake_actions_item_idx",
2181
+ "columns": [
2182
+ "tenant_id",
2183
+ "item_id"
2184
+ ]
2185
+ },
2186
+ {
2187
+ "name": "intake_actions_state_idx",
2188
+ "columns": [
2189
+ "tenant_id",
2190
+ "state"
2191
+ ]
2192
+ },
2193
+ {
2194
+ "name": "intake_actions_tenant_id_created_at_idx",
2195
+ "columns": [
2196
+ "tenant_id",
2197
+ "created_at"
2198
+ ]
2199
+ },
2200
+ {
2201
+ "name": "intake_actions_item_id_idx",
2202
+ "columns": [
2203
+ "item_id"
2204
+ ]
2205
+ }
2206
+ ],
2207
+ "version": "a6d52621"
2208
+ },
2209
+ "importPath": "@happyvertical/smrt-ingestion/models"
2210
+ },
2211
+ "@happyvertical/smrt-ingestion:IntakeProposal": {
2212
+ "name": "intakeproposal",
2213
+ "className": "IntakeProposal",
2214
+ "qualifiedName": "@happyvertical/smrt-ingestion:IntakeProposal",
2215
+ "collection": "intakeproposals",
2216
+ "filePath": "/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts",
2217
+ "packageName": "@happyvertical/smrt-ingestion",
2218
+ "fields": {
2219
+ "tenantId": {
2220
+ "type": "text",
2221
+ "required": true,
2222
+ "_meta": {
2223
+ "sqlType": "UUID",
2224
+ "__tenancy": {
2225
+ "isTenantIdField": true,
2226
+ "autoFilter": true,
2227
+ "required": true,
2228
+ "autoPopulate": true,
2229
+ "nullable": false,
2230
+ "mode": "required",
2231
+ "field": "tenantId",
2232
+ "allowSuperAdminBypass": false
2233
+ }
2234
+ }
2235
+ },
2236
+ "confidentialScopeId": {
2237
+ "type": "text",
2238
+ "required": true,
2239
+ "_meta": {
2240
+ "required": true
2241
+ }
2242
+ },
2243
+ "itemId": {
2244
+ "type": "foreignKey",
2245
+ "required": true,
2246
+ "related": "IntakeItem",
2247
+ "_meta": {
2248
+ "required": true
2249
+ }
2250
+ },
2251
+ "actionId": {
2252
+ "type": "foreignKey",
2253
+ "required": true,
2254
+ "related": "IntakeAction",
2255
+ "_meta": {
2256
+ "required": true
2257
+ }
2258
+ },
2259
+ "analysisId": {
2260
+ "type": "foreignKey",
2261
+ "required": true,
2262
+ "related": "IntakeAnalysis",
2263
+ "_meta": {
2264
+ "required": true
2265
+ }
2266
+ },
2267
+ "analysisAttemptId": {
2268
+ "type": "foreignKey",
2269
+ "required": true,
2270
+ "related": "IntakeAnalysisAttempt",
2271
+ "_meta": {
2272
+ "required": true
2273
+ }
2274
+ },
2275
+ "revision": {
2276
+ "type": "integer",
2277
+ "required": true,
2278
+ "_meta": {
2279
+ "required": true
2280
+ }
2281
+ },
2282
+ "bindingHash": {
2283
+ "type": "text",
2284
+ "required": true,
2285
+ "_meta": {
2286
+ "required": true
2287
+ }
2288
+ },
2289
+ "data": {
2290
+ "type": "json",
2291
+ "required": true,
2292
+ "_meta": {
2293
+ "required": true
2294
+ }
2295
+ }
2296
+ },
2297
+ "methods": {
2298
+ "getData": {
2299
+ "name": "getData",
2300
+ "async": false,
2301
+ "parameters": [],
2302
+ "returnType": "Record<string, unknown>",
2303
+ "isStatic": false,
2304
+ "isPublic": true
2305
+ }
2306
+ },
2307
+ "decoratorConfig": {
2308
+ "tableName": "intake_proposals",
2309
+ "conflictColumns": [
2310
+ "tenant_id",
2311
+ "action_id",
2312
+ "revision"
2313
+ ],
2314
+ "api": false,
2315
+ "cli": false,
2316
+ "mcp": false,
2317
+ "indexes": [
2318
+ {
2319
+ "name": "intake_proposals_scope_idx",
2320
+ "columns": [
2321
+ "tenantId",
2322
+ "confidentialScopeId"
2323
+ ]
2324
+ },
2325
+ {
2326
+ "name": "intake_proposals_item_idx",
2327
+ "columns": [
2328
+ "tenantId",
2329
+ "itemId"
2330
+ ]
2331
+ }
2332
+ ],
2333
+ "tenantScoped": {
2334
+ "mode": "required"
2335
+ }
2336
+ },
2337
+ "extends": "SmrtObject",
2338
+ "exportName": "IntakeProposal",
2339
+ "collectionExportName": "IntakeProposalCollection",
2340
+ "validationRules": [
2341
+ {
2342
+ "field": "confidentialScopeId",
2343
+ "rule": "required",
2344
+ "fieldType": "text"
2345
+ },
2346
+ {
2347
+ "field": "itemId",
2348
+ "rule": "required",
2349
+ "fieldType": "foreignKey"
2350
+ },
2351
+ {
2352
+ "field": "actionId",
2353
+ "rule": "required",
2354
+ "fieldType": "foreignKey"
2355
+ },
2356
+ {
2357
+ "field": "analysisId",
2358
+ "rule": "required",
2359
+ "fieldType": "foreignKey"
2360
+ },
2361
+ {
2362
+ "field": "analysisAttemptId",
2363
+ "rule": "required",
2364
+ "fieldType": "foreignKey"
2365
+ },
2366
+ {
2367
+ "field": "revision",
2368
+ "rule": "required",
2369
+ "fieldType": "integer"
2370
+ },
2371
+ {
2372
+ "field": "bindingHash",
2373
+ "rule": "required",
2374
+ "fieldType": "text"
2375
+ },
2376
+ {
2377
+ "field": "data",
2378
+ "rule": "required",
2379
+ "fieldType": "json"
2380
+ }
2381
+ ],
2382
+ "schema": {
2383
+ "tableName": "intake_proposals",
2384
+ "ddl": "CREATE TABLE IF NOT EXISTS \"intake_proposals\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"confidential_scope_id\" TEXT NOT NULL,\n \"item_id\" UUID NOT NULL,\n \"action_id\" UUID NOT NULL,\n \"analysis_id\" UUID NOT NULL,\n \"analysis_attempt_id\" UUID NOT NULL,\n \"revision\" INTEGER NOT NULL,\n \"binding_hash\" TEXT NOT NULL,\n \"data\" JSON NOT NULL\n);",
2385
+ "columns": {
2386
+ "id": {
2387
+ "type": "UUID",
2388
+ "primaryKey": true,
2389
+ "referenceKind": "id",
2390
+ "notNull": true
2391
+ },
2392
+ "slug": {
2393
+ "type": "TEXT",
2394
+ "notNull": true
2395
+ },
2396
+ "context": {
2397
+ "type": "TEXT",
2398
+ "notNull": true,
2399
+ "default": ""
2400
+ },
2401
+ "created_at": {
2402
+ "type": "TIMESTAMP",
2403
+ "notNull": true,
2404
+ "default": "current_timestamp"
2405
+ },
2406
+ "updated_at": {
2407
+ "type": "TIMESTAMP",
2408
+ "notNull": true,
2409
+ "default": "current_timestamp"
2410
+ },
2411
+ "tenant_id": {
2412
+ "type": "UUID",
2413
+ "referenceKind": "tenantId",
2414
+ "notNull": true,
2415
+ "unique": false
2416
+ },
2417
+ "confidential_scope_id": {
2418
+ "type": "TEXT",
2419
+ "notNull": true,
2420
+ "unique": false
2421
+ },
2422
+ "item_id": {
2423
+ "type": "UUID",
2424
+ "referenceKind": "foreignKey",
2425
+ "notNull": true,
2426
+ "unique": false,
2427
+ "foreignKey": {
2428
+ "table": "intake_items",
2429
+ "column": "id",
2430
+ "onDelete": "NO ACTION",
2431
+ "onUpdate": "CASCADE"
2432
+ }
2433
+ },
2434
+ "action_id": {
2435
+ "type": "UUID",
2436
+ "referenceKind": "foreignKey",
2437
+ "notNull": true,
2438
+ "unique": false,
2439
+ "foreignKey": {
2440
+ "table": "intake_actions",
2441
+ "column": "id",
2442
+ "onDelete": "CASCADE",
2443
+ "onUpdate": "CASCADE"
2444
+ }
2445
+ },
2446
+ "analysis_id": {
2447
+ "type": "UUID",
2448
+ "referenceKind": "foreignKey",
2449
+ "notNull": true,
2450
+ "unique": false,
2451
+ "foreignKey": {
2452
+ "table": "intake_analyses",
2453
+ "column": "id",
2454
+ "onDelete": "NO ACTION",
2455
+ "onUpdate": "CASCADE"
2456
+ }
2457
+ },
2458
+ "analysis_attempt_id": {
2459
+ "type": "UUID",
2460
+ "referenceKind": "foreignKey",
2461
+ "notNull": true,
2462
+ "unique": false,
2463
+ "foreignKey": {
2464
+ "table": "intake_analysis_attempts",
2465
+ "column": "id",
2466
+ "onDelete": "NO ACTION",
2467
+ "onUpdate": "CASCADE"
2468
+ }
2469
+ },
2470
+ "revision": {
2471
+ "type": "INTEGER",
2472
+ "notNull": true,
2473
+ "unique": false
2474
+ },
2475
+ "binding_hash": {
2476
+ "type": "TEXT",
2477
+ "notNull": true,
2478
+ "unique": false
2479
+ },
2480
+ "data": {
2481
+ "type": "JSON",
2482
+ "notNull": true,
2483
+ "unique": false
2484
+ }
2485
+ },
2486
+ "indexes": [
2487
+ {
2488
+ "name": "intake_proposals_tenant_id_action_id_idx",
2489
+ "columns": [
2490
+ "tenant_id",
2491
+ "action_id",
2492
+ "revision"
2493
+ ],
2494
+ "unique": true
2495
+ },
2496
+ {
2497
+ "name": "intake_proposals_slug_context_idx",
2498
+ "columns": [
2499
+ "slug",
2500
+ "context"
2501
+ ]
2502
+ },
2503
+ {
2504
+ "name": "intake_proposals_scope_idx",
2505
+ "columns": [
2506
+ "tenant_id",
2507
+ "confidential_scope_id"
2508
+ ]
2509
+ },
2510
+ {
2511
+ "name": "intake_proposals_item_idx",
2512
+ "columns": [
2513
+ "tenant_id",
2514
+ "item_id"
2515
+ ]
2516
+ },
2517
+ {
2518
+ "name": "intake_proposals_tenant_id_created_at_idx",
2519
+ "columns": [
2520
+ "tenant_id",
2521
+ "created_at"
2522
+ ]
2523
+ },
2524
+ {
2525
+ "name": "intake_proposals_item_id_idx",
2526
+ "columns": [
2527
+ "item_id"
2528
+ ]
2529
+ },
2530
+ {
2531
+ "name": "intake_proposals_action_id_idx",
2532
+ "columns": [
2533
+ "action_id"
2534
+ ]
2535
+ },
2536
+ {
2537
+ "name": "intake_proposals_analysis_id_idx",
2538
+ "columns": [
2539
+ "analysis_id"
2540
+ ]
2541
+ },
2542
+ {
2543
+ "name": "intake_proposals_analysis_attempt_id_idx",
2544
+ "columns": [
2545
+ "analysis_attempt_id"
2546
+ ]
2547
+ }
2548
+ ],
2549
+ "version": "fe602385"
2550
+ },
2551
+ "importPath": "@happyvertical/smrt-ingestion/models"
2552
+ },
2553
+ "@happyvertical/smrt-ingestion:IntakeReviewDecision": {
2554
+ "name": "intakereviewdecision",
2555
+ "className": "IntakeReviewDecision",
2556
+ "qualifiedName": "@happyvertical/smrt-ingestion:IntakeReviewDecision",
2557
+ "collection": "intakereviewdecisions",
2558
+ "filePath": "/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts",
2559
+ "packageName": "@happyvertical/smrt-ingestion",
2560
+ "fields": {
2561
+ "tenantId": {
2562
+ "type": "text",
2563
+ "required": true,
2564
+ "_meta": {
2565
+ "sqlType": "UUID",
2566
+ "__tenancy": {
2567
+ "isTenantIdField": true,
2568
+ "autoFilter": true,
2569
+ "required": true,
2570
+ "autoPopulate": true,
2571
+ "nullable": false,
2572
+ "mode": "required",
2573
+ "field": "tenantId",
2574
+ "allowSuperAdminBypass": false
2575
+ }
2576
+ }
2577
+ },
2578
+ "confidentialScopeId": {
2579
+ "type": "text",
2580
+ "required": true,
2581
+ "_meta": {
2582
+ "required": true
2583
+ }
2584
+ },
2585
+ "itemId": {
2586
+ "type": "foreignKey",
2587
+ "required": true,
2588
+ "related": "IntakeItem",
2589
+ "_meta": {
2590
+ "required": true
2591
+ }
2592
+ },
2593
+ "actionId": {
2594
+ "type": "foreignKey",
2595
+ "required": true,
2596
+ "related": "IntakeAction",
2597
+ "_meta": {
2598
+ "required": true
2599
+ }
2600
+ },
2601
+ "proposalId": {
2602
+ "type": "foreignKey",
2603
+ "required": true,
2604
+ "related": "IntakeProposal",
2605
+ "_meta": {
2606
+ "required": true
2607
+ }
2608
+ },
2609
+ "reviewVersion": {
2610
+ "type": "integer",
2611
+ "required": true,
2612
+ "_meta": {
2613
+ "required": true
2614
+ }
2615
+ },
2616
+ "bindingHash": {
2617
+ "type": "text",
2618
+ "required": true,
2619
+ "_meta": {
2620
+ "required": true
2621
+ }
2622
+ },
2623
+ "decision": {
2624
+ "type": "text",
2625
+ "required": true,
2626
+ "_meta": {
2627
+ "required": true
2628
+ }
2629
+ },
2630
+ "data": {
2631
+ "type": "json",
2632
+ "required": true,
2633
+ "_meta": {
2634
+ "required": true
2635
+ }
2636
+ }
2637
+ },
2638
+ "methods": {
2639
+ "getData": {
2640
+ "name": "getData",
2641
+ "async": false,
2642
+ "parameters": [],
2643
+ "returnType": "Record<string, unknown>",
2644
+ "isStatic": false,
2645
+ "isPublic": true
2646
+ }
2647
+ },
2648
+ "decoratorConfig": {
2649
+ "tableName": "intake_review_decisions",
2650
+ "conflictColumns": [
2651
+ "tenant_id",
2652
+ "action_id",
2653
+ "review_version"
2654
+ ],
2655
+ "api": false,
2656
+ "cli": false,
2657
+ "mcp": false,
2658
+ "indexes": [
2659
+ {
2660
+ "name": "intake_review_decisions_scope_idx",
2661
+ "columns": [
2662
+ "tenantId",
2663
+ "confidentialScopeId"
2664
+ ]
2665
+ },
2666
+ {
2667
+ "name": "intake_review_decisions_item_idx",
2668
+ "columns": [
2669
+ "tenantId",
2670
+ "itemId"
2671
+ ]
2672
+ }
2673
+ ],
2674
+ "tenantScoped": {
2675
+ "mode": "required"
2676
+ }
2677
+ },
2678
+ "extends": "SmrtObject",
2679
+ "exportName": "IntakeReviewDecision",
2680
+ "collectionExportName": "IntakeReviewDecisionCollection",
2681
+ "validationRules": [
2682
+ {
2683
+ "field": "confidentialScopeId",
2684
+ "rule": "required",
2685
+ "fieldType": "text"
2686
+ },
2687
+ {
2688
+ "field": "itemId",
2689
+ "rule": "required",
2690
+ "fieldType": "foreignKey"
2691
+ },
2692
+ {
2693
+ "field": "actionId",
2694
+ "rule": "required",
2695
+ "fieldType": "foreignKey"
2696
+ },
2697
+ {
2698
+ "field": "proposalId",
2699
+ "rule": "required",
2700
+ "fieldType": "foreignKey"
2701
+ },
2702
+ {
2703
+ "field": "reviewVersion",
2704
+ "rule": "required",
2705
+ "fieldType": "integer"
2706
+ },
2707
+ {
2708
+ "field": "bindingHash",
2709
+ "rule": "required",
2710
+ "fieldType": "text"
2711
+ },
2712
+ {
2713
+ "field": "decision",
2714
+ "rule": "required",
2715
+ "fieldType": "text"
2716
+ },
2717
+ {
2718
+ "field": "data",
2719
+ "rule": "required",
2720
+ "fieldType": "json"
2721
+ }
2722
+ ],
2723
+ "schema": {
2724
+ "tableName": "intake_review_decisions",
2725
+ "ddl": "CREATE TABLE IF NOT EXISTS \"intake_review_decisions\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"confidential_scope_id\" TEXT NOT NULL,\n \"item_id\" UUID NOT NULL,\n \"action_id\" UUID NOT NULL,\n \"proposal_id\" UUID NOT NULL,\n \"review_version\" INTEGER NOT NULL,\n \"binding_hash\" TEXT NOT NULL,\n \"decision\" TEXT NOT NULL,\n \"data\" JSON NOT NULL\n);",
2726
+ "columns": {
2727
+ "id": {
2728
+ "type": "UUID",
2729
+ "primaryKey": true,
2730
+ "referenceKind": "id",
2731
+ "notNull": true
2732
+ },
2733
+ "slug": {
2734
+ "type": "TEXT",
2735
+ "notNull": true
2736
+ },
2737
+ "context": {
2738
+ "type": "TEXT",
2739
+ "notNull": true,
2740
+ "default": ""
2741
+ },
2742
+ "created_at": {
2743
+ "type": "TIMESTAMP",
2744
+ "notNull": true,
2745
+ "default": "current_timestamp"
2746
+ },
2747
+ "updated_at": {
2748
+ "type": "TIMESTAMP",
2749
+ "notNull": true,
2750
+ "default": "current_timestamp"
2751
+ },
2752
+ "tenant_id": {
2753
+ "type": "UUID",
2754
+ "referenceKind": "tenantId",
2755
+ "notNull": true,
2756
+ "unique": false
2757
+ },
2758
+ "confidential_scope_id": {
2759
+ "type": "TEXT",
2760
+ "notNull": true,
2761
+ "unique": false
2762
+ },
2763
+ "item_id": {
2764
+ "type": "UUID",
2765
+ "referenceKind": "foreignKey",
2766
+ "notNull": true,
2767
+ "unique": false,
2768
+ "foreignKey": {
2769
+ "table": "intake_items",
2770
+ "column": "id",
2771
+ "onDelete": "NO ACTION",
2772
+ "onUpdate": "CASCADE"
2773
+ }
2774
+ },
2775
+ "action_id": {
2776
+ "type": "UUID",
2777
+ "referenceKind": "foreignKey",
2778
+ "notNull": true,
2779
+ "unique": false,
2780
+ "foreignKey": {
2781
+ "table": "intake_actions",
2782
+ "column": "id",
2783
+ "onDelete": "CASCADE",
2784
+ "onUpdate": "CASCADE"
2785
+ }
2786
+ },
2787
+ "proposal_id": {
2788
+ "type": "UUID",
2789
+ "referenceKind": "foreignKey",
2790
+ "notNull": true,
2791
+ "unique": false,
2792
+ "foreignKey": {
2793
+ "table": "intake_proposals",
2794
+ "column": "id",
2795
+ "onDelete": "NO ACTION",
2796
+ "onUpdate": "CASCADE"
2797
+ }
2798
+ },
2799
+ "review_version": {
2800
+ "type": "INTEGER",
2801
+ "notNull": true,
2802
+ "unique": false
2803
+ },
2804
+ "binding_hash": {
2805
+ "type": "TEXT",
2806
+ "notNull": true,
2807
+ "unique": false
2808
+ },
2809
+ "decision": {
2810
+ "type": "TEXT",
2811
+ "notNull": true,
2812
+ "unique": false
2813
+ },
2814
+ "data": {
2815
+ "type": "JSON",
2816
+ "notNull": true,
2817
+ "unique": false
2818
+ }
2819
+ },
2820
+ "indexes": [
2821
+ {
2822
+ "name": "intake_review_decisions_tenant_id_action_id_idx",
2823
+ "columns": [
2824
+ "tenant_id",
2825
+ "action_id",
2826
+ "review_version"
2827
+ ],
2828
+ "unique": true
2829
+ },
2830
+ {
2831
+ "name": "intake_review_decisions_slug_context_idx",
2832
+ "columns": [
2833
+ "slug",
2834
+ "context"
2835
+ ]
2836
+ },
2837
+ {
2838
+ "name": "intake_review_decisions_scope_idx",
2839
+ "columns": [
2840
+ "tenant_id",
2841
+ "confidential_scope_id"
2842
+ ]
2843
+ },
2844
+ {
2845
+ "name": "intake_review_decisions_item_idx",
2846
+ "columns": [
2847
+ "tenant_id",
2848
+ "item_id"
2849
+ ]
2850
+ },
2851
+ {
2852
+ "name": "intake_review_decisions_tenant_id_created_at_idx",
2853
+ "columns": [
2854
+ "tenant_id",
2855
+ "created_at"
2856
+ ]
2857
+ },
2858
+ {
2859
+ "name": "intake_review_decisions_item_id_idx",
2860
+ "columns": [
2861
+ "item_id"
2862
+ ]
2863
+ },
2864
+ {
2865
+ "name": "intake_review_decisions_action_id_idx",
2866
+ "columns": [
2867
+ "action_id"
2868
+ ]
2869
+ },
2870
+ {
2871
+ "name": "intake_review_decisions_proposal_id_idx",
2872
+ "columns": [
2873
+ "proposal_id"
2874
+ ]
2875
+ }
2876
+ ],
2877
+ "version": "80f24292"
2878
+ },
2879
+ "importPath": "@happyvertical/smrt-ingestion/models"
2880
+ },
2881
+ "@happyvertical/smrt-ingestion:IntakeExecution": {
2882
+ "name": "intakeexecution",
2883
+ "className": "IntakeExecution",
2884
+ "qualifiedName": "@happyvertical/smrt-ingestion:IntakeExecution",
2885
+ "collection": "intakeexecutions",
2886
+ "filePath": "/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts",
2887
+ "packageName": "@happyvertical/smrt-ingestion",
2888
+ "fields": {
2889
+ "tenantId": {
2890
+ "type": "text",
2891
+ "required": true,
2892
+ "_meta": {
2893
+ "sqlType": "UUID",
2894
+ "__tenancy": {
2895
+ "isTenantIdField": true,
2896
+ "autoFilter": true,
2897
+ "required": true,
2898
+ "autoPopulate": true,
2899
+ "nullable": false,
2900
+ "mode": "required",
2901
+ "field": "tenantId",
2902
+ "allowSuperAdminBypass": false
2903
+ }
2904
+ }
2905
+ },
2906
+ "confidentialScopeId": {
2907
+ "type": "text",
2908
+ "required": true,
2909
+ "_meta": {
2910
+ "required": true
2911
+ }
2912
+ },
2913
+ "itemId": {
2914
+ "type": "foreignKey",
2915
+ "required": true,
2916
+ "related": "IntakeItem",
2917
+ "_meta": {
2918
+ "required": true
2919
+ }
2920
+ },
2921
+ "actionId": {
2922
+ "type": "foreignKey",
2923
+ "required": true,
2924
+ "related": "IntakeAction",
2925
+ "_meta": {
2926
+ "required": true
2927
+ }
2928
+ },
2929
+ "attemptNumber": {
2930
+ "type": "integer",
2931
+ "required": true,
2932
+ "_meta": {
2933
+ "required": true
2934
+ }
2935
+ },
2936
+ "fence": {
2937
+ "type": "integer",
2938
+ "required": true,
2939
+ "_meta": {
2940
+ "required": true
2941
+ }
2942
+ },
2943
+ "state": {
2944
+ "type": "text",
2945
+ "required": true,
2946
+ "_meta": {
2947
+ "required": true
2948
+ }
2949
+ },
2950
+ "bindingHash": {
2951
+ "type": "text",
2952
+ "required": true,
2953
+ "_meta": {
2954
+ "required": true
2955
+ }
2956
+ },
2957
+ "resultDigest": {
2958
+ "type": "text",
2959
+ "required": true,
2960
+ "_meta": {
2961
+ "required": true
2962
+ }
2963
+ },
2964
+ "idempotencyKey": {
2965
+ "type": "text",
2966
+ "required": true,
2967
+ "_meta": {
2968
+ "required": true
2969
+ }
2970
+ },
2971
+ "data": {
2972
+ "type": "json",
2973
+ "required": true,
2974
+ "_meta": {
2975
+ "required": true
2976
+ }
2977
+ }
2978
+ },
2979
+ "methods": {
2980
+ "getData": {
2981
+ "name": "getData",
2982
+ "async": false,
2983
+ "parameters": [],
2984
+ "returnType": "Record<string, unknown>",
2985
+ "isStatic": false,
2986
+ "isPublic": true
2987
+ }
2988
+ },
2989
+ "decoratorConfig": {
2990
+ "tableName": "intake_executions",
2991
+ "conflictColumns": [
2992
+ "tenant_id",
2993
+ "action_id",
2994
+ "attempt_number"
2995
+ ],
2996
+ "api": false,
2997
+ "cli": false,
2998
+ "mcp": false,
2999
+ "indexes": [
3000
+ {
3001
+ "name": "intake_executions_scope_idx",
3002
+ "columns": [
3003
+ "tenantId",
3004
+ "confidentialScopeId"
3005
+ ]
3006
+ },
3007
+ {
3008
+ "name": "intake_executions_item_idx",
3009
+ "columns": [
3010
+ "tenantId",
3011
+ "itemId"
3012
+ ]
3013
+ },
3014
+ {
3015
+ "name": "intake_executions_state_idx",
3016
+ "columns": [
3017
+ "tenantId",
3018
+ "state"
3019
+ ]
3020
+ }
3021
+ ],
3022
+ "tenantScoped": {
3023
+ "mode": "required"
3024
+ }
3025
+ },
3026
+ "extends": "SmrtObject",
3027
+ "exportName": "IntakeExecution",
3028
+ "collectionExportName": "IntakeExecutionCollection",
3029
+ "validationRules": [
3030
+ {
3031
+ "field": "confidentialScopeId",
3032
+ "rule": "required",
3033
+ "fieldType": "text"
3034
+ },
3035
+ {
3036
+ "field": "itemId",
3037
+ "rule": "required",
3038
+ "fieldType": "foreignKey"
3039
+ },
3040
+ {
3041
+ "field": "actionId",
3042
+ "rule": "required",
3043
+ "fieldType": "foreignKey"
3044
+ },
3045
+ {
3046
+ "field": "attemptNumber",
3047
+ "rule": "required",
3048
+ "fieldType": "integer"
3049
+ },
3050
+ {
3051
+ "field": "fence",
3052
+ "rule": "required",
3053
+ "fieldType": "integer"
3054
+ },
3055
+ {
3056
+ "field": "state",
3057
+ "rule": "required",
3058
+ "fieldType": "text"
3059
+ },
3060
+ {
3061
+ "field": "bindingHash",
3062
+ "rule": "required",
3063
+ "fieldType": "text"
3064
+ },
3065
+ {
3066
+ "field": "resultDigest",
3067
+ "rule": "required",
3068
+ "fieldType": "text"
3069
+ },
3070
+ {
3071
+ "field": "idempotencyKey",
3072
+ "rule": "required",
3073
+ "fieldType": "text"
3074
+ },
3075
+ {
3076
+ "field": "data",
3077
+ "rule": "required",
3078
+ "fieldType": "json"
3079
+ }
3080
+ ],
3081
+ "schema": {
3082
+ "tableName": "intake_executions",
3083
+ "ddl": "CREATE TABLE IF NOT EXISTS \"intake_executions\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"confidential_scope_id\" TEXT NOT NULL,\n \"item_id\" UUID NOT NULL,\n \"action_id\" UUID NOT NULL,\n \"attempt_number\" INTEGER NOT NULL,\n \"fence\" INTEGER NOT NULL,\n \"state\" TEXT NOT NULL,\n \"binding_hash\" TEXT NOT NULL,\n \"result_digest\" TEXT NOT NULL,\n \"idempotency_key\" TEXT NOT NULL,\n \"data\" JSON NOT NULL\n);",
3084
+ "columns": {
3085
+ "id": {
3086
+ "type": "UUID",
3087
+ "primaryKey": true,
3088
+ "referenceKind": "id",
3089
+ "notNull": true
3090
+ },
3091
+ "slug": {
3092
+ "type": "TEXT",
3093
+ "notNull": true
3094
+ },
3095
+ "context": {
3096
+ "type": "TEXT",
3097
+ "notNull": true,
3098
+ "default": ""
3099
+ },
3100
+ "created_at": {
3101
+ "type": "TIMESTAMP",
3102
+ "notNull": true,
3103
+ "default": "current_timestamp"
3104
+ },
3105
+ "updated_at": {
3106
+ "type": "TIMESTAMP",
3107
+ "notNull": true,
3108
+ "default": "current_timestamp"
3109
+ },
3110
+ "tenant_id": {
3111
+ "type": "UUID",
3112
+ "referenceKind": "tenantId",
3113
+ "notNull": true,
3114
+ "unique": false
3115
+ },
3116
+ "confidential_scope_id": {
3117
+ "type": "TEXT",
3118
+ "notNull": true,
3119
+ "unique": false
3120
+ },
3121
+ "item_id": {
3122
+ "type": "UUID",
3123
+ "referenceKind": "foreignKey",
3124
+ "notNull": true,
3125
+ "unique": false,
3126
+ "foreignKey": {
3127
+ "table": "intake_items",
3128
+ "column": "id",
3129
+ "onDelete": "NO ACTION",
3130
+ "onUpdate": "CASCADE"
3131
+ }
3132
+ },
3133
+ "action_id": {
3134
+ "type": "UUID",
3135
+ "referenceKind": "foreignKey",
3136
+ "notNull": true,
3137
+ "unique": false,
3138
+ "foreignKey": {
3139
+ "table": "intake_actions",
3140
+ "column": "id",
3141
+ "onDelete": "CASCADE",
3142
+ "onUpdate": "CASCADE"
3143
+ }
3144
+ },
3145
+ "attempt_number": {
3146
+ "type": "INTEGER",
3147
+ "notNull": true,
3148
+ "unique": false
3149
+ },
3150
+ "fence": {
3151
+ "type": "INTEGER",
3152
+ "notNull": true,
3153
+ "unique": false
3154
+ },
3155
+ "state": {
3156
+ "type": "TEXT",
3157
+ "notNull": true,
3158
+ "unique": false
3159
+ },
3160
+ "binding_hash": {
3161
+ "type": "TEXT",
3162
+ "notNull": true,
3163
+ "unique": false
3164
+ },
3165
+ "result_digest": {
3166
+ "type": "TEXT",
3167
+ "notNull": true,
3168
+ "unique": false
3169
+ },
3170
+ "idempotency_key": {
3171
+ "type": "TEXT",
3172
+ "notNull": true,
3173
+ "unique": false
3174
+ },
3175
+ "data": {
3176
+ "type": "JSON",
3177
+ "notNull": true,
3178
+ "unique": false
3179
+ }
3180
+ },
3181
+ "indexes": [
3182
+ {
3183
+ "name": "intake_executions_tenant_id_action_id_idx",
3184
+ "columns": [
3185
+ "tenant_id",
3186
+ "action_id",
3187
+ "attempt_number"
3188
+ ],
3189
+ "unique": true
3190
+ },
3191
+ {
3192
+ "name": "intake_executions_slug_context_idx",
3193
+ "columns": [
3194
+ "slug",
3195
+ "context"
3196
+ ]
3197
+ },
3198
+ {
3199
+ "name": "intake_executions_scope_idx",
3200
+ "columns": [
3201
+ "tenant_id",
3202
+ "confidential_scope_id"
3203
+ ]
3204
+ },
3205
+ {
3206
+ "name": "intake_executions_item_idx",
3207
+ "columns": [
3208
+ "tenant_id",
3209
+ "item_id"
3210
+ ]
3211
+ },
3212
+ {
3213
+ "name": "intake_executions_state_idx",
3214
+ "columns": [
3215
+ "tenant_id",
3216
+ "state"
3217
+ ]
3218
+ },
3219
+ {
3220
+ "name": "intake_executions_tenant_id_created_at_idx",
3221
+ "columns": [
3222
+ "tenant_id",
3223
+ "created_at"
3224
+ ]
3225
+ },
3226
+ {
3227
+ "name": "intake_executions_item_id_idx",
3228
+ "columns": [
3229
+ "item_id"
3230
+ ]
3231
+ },
3232
+ {
3233
+ "name": "intake_executions_action_id_idx",
3234
+ "columns": [
3235
+ "action_id"
3236
+ ]
3237
+ }
3238
+ ],
3239
+ "version": "6a14ec3c"
3240
+ },
3241
+ "importPath": "@happyvertical/smrt-ingestion/models"
3242
+ },
3243
+ "@happyvertical/smrt-ingestion:IntakeFeedback": {
3244
+ "name": "intakefeedback",
3245
+ "className": "IntakeFeedback",
3246
+ "qualifiedName": "@happyvertical/smrt-ingestion:IntakeFeedback",
3247
+ "collection": "intakefeedbacks",
3248
+ "filePath": "/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts",
3249
+ "packageName": "@happyvertical/smrt-ingestion",
3250
+ "fields": {
3251
+ "tenantId": {
3252
+ "type": "text",
3253
+ "required": true,
3254
+ "_meta": {
3255
+ "sqlType": "UUID",
3256
+ "__tenancy": {
3257
+ "isTenantIdField": true,
3258
+ "autoFilter": true,
3259
+ "required": true,
3260
+ "autoPopulate": true,
3261
+ "nullable": false,
3262
+ "mode": "required",
3263
+ "field": "tenantId",
3264
+ "allowSuperAdminBypass": false
3265
+ }
3266
+ }
3267
+ },
3268
+ "confidentialScopeId": {
3269
+ "type": "text",
3270
+ "required": true,
3271
+ "_meta": {
3272
+ "required": true
3273
+ }
3274
+ },
3275
+ "itemId": {
3276
+ "type": "foreignKey",
3277
+ "required": true,
3278
+ "related": "IntakeItem",
3279
+ "_meta": {
3280
+ "required": true
3281
+ }
3282
+ },
3283
+ "requestKey": {
3284
+ "type": "text",
3285
+ "required": true,
3286
+ "_meta": {
3287
+ "required": true
3288
+ }
3289
+ },
3290
+ "supersedesId": {
3291
+ "type": "foreignKey",
3292
+ "required": false,
3293
+ "related": "IntakeFeedback",
3294
+ "_meta": {
3295
+ "nullable": true
3296
+ }
3297
+ },
3298
+ "kind": {
3299
+ "type": "text",
3300
+ "required": true,
3301
+ "_meta": {
3302
+ "required": true
3303
+ }
3304
+ },
3305
+ "data": {
3306
+ "type": "json",
3307
+ "required": true,
3308
+ "_meta": {
3309
+ "required": true
3310
+ }
3311
+ }
3312
+ },
3313
+ "methods": {
3314
+ "getData": {
3315
+ "name": "getData",
3316
+ "async": false,
3317
+ "parameters": [],
3318
+ "returnType": "Record<string, unknown>",
3319
+ "isStatic": false,
3320
+ "isPublic": true
3321
+ }
3322
+ },
3323
+ "decoratorConfig": {
3324
+ "tableName": "intake_feedback",
3325
+ "conflictColumns": [
3326
+ "tenant_id",
3327
+ "item_id",
3328
+ "request_key"
3329
+ ],
3330
+ "api": false,
3331
+ "cli": false,
3332
+ "mcp": false,
3333
+ "indexes": [
3334
+ {
3335
+ "name": "intake_feedback_scope_idx",
3336
+ "columns": [
3337
+ "tenantId",
3338
+ "confidentialScopeId"
3339
+ ]
3340
+ },
3341
+ {
3342
+ "name": "intake_feedback_item_idx",
3343
+ "columns": [
3344
+ "tenantId",
3345
+ "itemId"
3346
+ ]
3347
+ }
3348
+ ],
3349
+ "tenantScoped": {
3350
+ "mode": "required"
3351
+ }
3352
+ },
3353
+ "extends": "SmrtObject",
3354
+ "exportName": "IntakeFeedback",
3355
+ "collectionExportName": "IntakeFeedbackCollection",
3356
+ "validationRules": [
3357
+ {
3358
+ "field": "confidentialScopeId",
3359
+ "rule": "required",
3360
+ "fieldType": "text"
3361
+ },
3362
+ {
3363
+ "field": "itemId",
3364
+ "rule": "required",
3365
+ "fieldType": "foreignKey"
3366
+ },
3367
+ {
3368
+ "field": "requestKey",
3369
+ "rule": "required",
3370
+ "fieldType": "text"
3371
+ },
3372
+ {
3373
+ "field": "kind",
3374
+ "rule": "required",
3375
+ "fieldType": "text"
3376
+ },
3377
+ {
3378
+ "field": "data",
3379
+ "rule": "required",
3380
+ "fieldType": "json"
3381
+ }
3382
+ ],
3383
+ "schema": {
3384
+ "tableName": "intake_feedback",
3385
+ "ddl": "CREATE TABLE IF NOT EXISTS \"intake_feedback\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"confidential_scope_id\" TEXT NOT NULL,\n \"item_id\" UUID NOT NULL,\n \"request_key\" TEXT NOT NULL,\n \"supersedes_id\" UUID,\n \"kind\" TEXT NOT NULL,\n \"data\" JSON NOT NULL\n);",
3386
+ "columns": {
3387
+ "id": {
3388
+ "type": "UUID",
3389
+ "primaryKey": true,
3390
+ "referenceKind": "id",
3391
+ "notNull": true
3392
+ },
3393
+ "slug": {
3394
+ "type": "TEXT",
3395
+ "notNull": true
3396
+ },
3397
+ "context": {
3398
+ "type": "TEXT",
3399
+ "notNull": true,
3400
+ "default": ""
3401
+ },
3402
+ "created_at": {
3403
+ "type": "TIMESTAMP",
3404
+ "notNull": true,
3405
+ "default": "current_timestamp"
3406
+ },
3407
+ "updated_at": {
3408
+ "type": "TIMESTAMP",
3409
+ "notNull": true,
3410
+ "default": "current_timestamp"
3411
+ },
3412
+ "tenant_id": {
3413
+ "type": "UUID",
3414
+ "referenceKind": "tenantId",
3415
+ "notNull": true,
3416
+ "unique": false
3417
+ },
3418
+ "confidential_scope_id": {
3419
+ "type": "TEXT",
3420
+ "notNull": true,
3421
+ "unique": false
3422
+ },
3423
+ "item_id": {
3424
+ "type": "UUID",
3425
+ "referenceKind": "foreignKey",
3426
+ "notNull": true,
3427
+ "unique": false,
3428
+ "foreignKey": {
3429
+ "table": "intake_items",
3430
+ "column": "id",
3431
+ "onDelete": "CASCADE",
3432
+ "onUpdate": "CASCADE"
3433
+ }
3434
+ },
3435
+ "request_key": {
3436
+ "type": "TEXT",
3437
+ "notNull": true,
3438
+ "unique": false
3439
+ },
3440
+ "supersedes_id": {
3441
+ "type": "UUID",
3442
+ "referenceKind": "foreignKey",
3443
+ "notNull": false,
3444
+ "unique": false,
3445
+ "foreignKey": {
3446
+ "table": "intake_feedback",
3447
+ "column": "id",
3448
+ "onDelete": "NO ACTION",
3449
+ "onUpdate": "CASCADE"
3450
+ }
3451
+ },
3452
+ "kind": {
3453
+ "type": "TEXT",
3454
+ "notNull": true,
3455
+ "unique": false
3456
+ },
3457
+ "data": {
3458
+ "type": "JSON",
3459
+ "notNull": true,
3460
+ "unique": false
3461
+ }
3462
+ },
3463
+ "indexes": [
3464
+ {
3465
+ "name": "intake_feedback_tenant_id_item_id_idx",
3466
+ "columns": [
3467
+ "tenant_id",
3468
+ "item_id",
3469
+ "request_key"
3470
+ ],
3471
+ "unique": true
3472
+ },
3473
+ {
3474
+ "name": "intake_feedback_slug_context_idx",
3475
+ "columns": [
3476
+ "slug",
3477
+ "context"
3478
+ ]
3479
+ },
3480
+ {
3481
+ "name": "intake_feedback_scope_idx",
3482
+ "columns": [
3483
+ "tenant_id",
3484
+ "confidential_scope_id"
3485
+ ]
3486
+ },
3487
+ {
3488
+ "name": "intake_feedback_item_idx",
3489
+ "columns": [
3490
+ "tenant_id",
3491
+ "item_id"
3492
+ ]
3493
+ },
3494
+ {
3495
+ "name": "intake_feedback_tenant_id_created_at_idx",
3496
+ "columns": [
3497
+ "tenant_id",
3498
+ "created_at"
3499
+ ]
3500
+ },
3501
+ {
3502
+ "name": "intake_feedback_item_id_idx",
3503
+ "columns": [
3504
+ "item_id"
3505
+ ]
3506
+ },
3507
+ {
3508
+ "name": "intake_feedback_supersedes_id_idx",
3509
+ "columns": [
3510
+ "supersedes_id"
3511
+ ]
3512
+ }
3513
+ ],
3514
+ "version": "087279a0"
3515
+ },
3516
+ "importPath": "@happyvertical/smrt-ingestion/models"
3517
+ },
3518
+ "@happyvertical/smrt-ingestion:IntakeDispatch": {
3519
+ "name": "intakedispatch",
3520
+ "className": "IntakeDispatch",
3521
+ "qualifiedName": "@happyvertical/smrt-ingestion:IntakeDispatch",
3522
+ "collection": "intakedispatches",
3523
+ "filePath": "/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts",
3524
+ "packageName": "@happyvertical/smrt-ingestion",
3525
+ "fields": {
3526
+ "tenantId": {
3527
+ "type": "text",
3528
+ "required": true,
3529
+ "_meta": {
3530
+ "sqlType": "UUID",
3531
+ "__tenancy": {
3532
+ "isTenantIdField": true,
3533
+ "autoFilter": true,
3534
+ "required": true,
3535
+ "autoPopulate": true,
3536
+ "nullable": false,
3537
+ "mode": "required",
3538
+ "field": "tenantId",
3539
+ "allowSuperAdminBypass": false
3540
+ }
3541
+ }
3542
+ },
3543
+ "confidentialScopeId": {
3544
+ "type": "text",
3545
+ "required": true,
3546
+ "_meta": {
3547
+ "required": true
3548
+ }
3549
+ },
3550
+ "itemId": {
3551
+ "type": "foreignKey",
3552
+ "required": true,
3553
+ "related": "IntakeItem",
3554
+ "_meta": {
3555
+ "required": true
3556
+ }
3557
+ },
3558
+ "stage": {
3559
+ "type": "text",
3560
+ "required": true,
3561
+ "_meta": {
3562
+ "required": true
3563
+ }
3564
+ },
3565
+ "revision": {
3566
+ "type": "integer",
3567
+ "required": true,
3568
+ "_meta": {
3569
+ "required": true
3570
+ }
3571
+ },
3572
+ "state": {
3573
+ "type": "text",
3574
+ "required": true,
3575
+ "_meta": {
3576
+ "required": true
3577
+ }
3578
+ },
3579
+ "jobId": {
3580
+ "type": "text",
3581
+ "required": true,
3582
+ "_meta": {
3583
+ "required": true
3584
+ }
3585
+ },
3586
+ "deliveries": {
3587
+ "type": "integer",
3588
+ "required": true,
3589
+ "_meta": {
3590
+ "required": true
3591
+ }
3592
+ },
3593
+ "data": {
3594
+ "type": "json",
3595
+ "required": true,
3596
+ "_meta": {
3597
+ "required": true
3598
+ }
3599
+ }
3600
+ },
3601
+ "methods": {
3602
+ "getData": {
3603
+ "name": "getData",
3604
+ "async": false,
3605
+ "parameters": [],
3606
+ "returnType": "Record<string, unknown>",
3607
+ "isStatic": false,
3608
+ "isPublic": true
3609
+ }
3610
+ },
3611
+ "decoratorConfig": {
3612
+ "tableName": "intake_dispatches",
3613
+ "conflictColumns": [
3614
+ "tenant_id",
3615
+ "item_id",
3616
+ "stage",
3617
+ "revision"
3618
+ ],
3619
+ "api": false,
3620
+ "cli": false,
3621
+ "mcp": false,
3622
+ "indexes": [
3623
+ {
3624
+ "name": "intake_dispatches_scope_idx",
3625
+ "columns": [
3626
+ "tenantId",
3627
+ "confidentialScopeId"
3628
+ ]
3629
+ },
3630
+ {
3631
+ "name": "intake_dispatches_item_idx",
3632
+ "columns": [
3633
+ "tenantId",
3634
+ "itemId"
3635
+ ]
3636
+ },
3637
+ {
3638
+ "name": "intake_dispatches_state_idx",
3639
+ "columns": [
3640
+ "tenantId",
3641
+ "state"
3642
+ ]
3643
+ }
3644
+ ],
3645
+ "tenantScoped": {
3646
+ "mode": "required"
3647
+ }
3648
+ },
3649
+ "extends": "SmrtObject",
3650
+ "exportName": "IntakeDispatch",
3651
+ "collectionExportName": "IntakeDispatchCollection",
3652
+ "validationRules": [
3653
+ {
3654
+ "field": "confidentialScopeId",
3655
+ "rule": "required",
3656
+ "fieldType": "text"
3657
+ },
3658
+ {
3659
+ "field": "itemId",
3660
+ "rule": "required",
3661
+ "fieldType": "foreignKey"
3662
+ },
3663
+ {
3664
+ "field": "stage",
3665
+ "rule": "required",
3666
+ "fieldType": "text"
3667
+ },
3668
+ {
3669
+ "field": "revision",
3670
+ "rule": "required",
3671
+ "fieldType": "integer"
3672
+ },
3673
+ {
3674
+ "field": "state",
3675
+ "rule": "required",
3676
+ "fieldType": "text"
3677
+ },
3678
+ {
3679
+ "field": "jobId",
3680
+ "rule": "required",
3681
+ "fieldType": "text"
3682
+ },
3683
+ {
3684
+ "field": "deliveries",
3685
+ "rule": "required",
3686
+ "fieldType": "integer"
3687
+ },
3688
+ {
3689
+ "field": "data",
3690
+ "rule": "required",
3691
+ "fieldType": "json"
3692
+ }
3693
+ ],
3694
+ "schema": {
3695
+ "tableName": "intake_dispatches",
3696
+ "ddl": "CREATE TABLE IF NOT EXISTS \"intake_dispatches\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"confidential_scope_id\" TEXT NOT NULL,\n \"item_id\" UUID NOT NULL,\n \"stage\" TEXT NOT NULL,\n \"revision\" INTEGER NOT NULL,\n \"state\" TEXT NOT NULL,\n \"job_id\" TEXT NOT NULL,\n \"deliveries\" INTEGER NOT NULL,\n \"data\" JSON NOT NULL\n);",
3697
+ "columns": {
3698
+ "id": {
3699
+ "type": "UUID",
3700
+ "primaryKey": true,
3701
+ "referenceKind": "id",
3702
+ "notNull": true
3703
+ },
3704
+ "slug": {
3705
+ "type": "TEXT",
3706
+ "notNull": true
3707
+ },
3708
+ "context": {
3709
+ "type": "TEXT",
3710
+ "notNull": true,
3711
+ "default": ""
3712
+ },
3713
+ "created_at": {
3714
+ "type": "TIMESTAMP",
3715
+ "notNull": true,
3716
+ "default": "current_timestamp"
3717
+ },
3718
+ "updated_at": {
3719
+ "type": "TIMESTAMP",
3720
+ "notNull": true,
3721
+ "default": "current_timestamp"
3722
+ },
3723
+ "tenant_id": {
3724
+ "type": "UUID",
3725
+ "referenceKind": "tenantId",
3726
+ "notNull": true,
3727
+ "unique": false
3728
+ },
3729
+ "confidential_scope_id": {
3730
+ "type": "TEXT",
3731
+ "notNull": true,
3732
+ "unique": false
3733
+ },
3734
+ "item_id": {
3735
+ "type": "UUID",
3736
+ "referenceKind": "foreignKey",
3737
+ "notNull": true,
3738
+ "unique": false,
3739
+ "foreignKey": {
3740
+ "table": "intake_items",
3741
+ "column": "id",
3742
+ "onDelete": "CASCADE",
3743
+ "onUpdate": "CASCADE"
3744
+ }
3745
+ },
3746
+ "stage": {
3747
+ "type": "TEXT",
3748
+ "notNull": true,
3749
+ "unique": false
3750
+ },
3751
+ "revision": {
3752
+ "type": "INTEGER",
3753
+ "notNull": true,
3754
+ "unique": false
3755
+ },
3756
+ "state": {
3757
+ "type": "TEXT",
3758
+ "notNull": true,
3759
+ "unique": false
3760
+ },
3761
+ "job_id": {
3762
+ "type": "TEXT",
3763
+ "notNull": true,
3764
+ "unique": false
3765
+ },
3766
+ "deliveries": {
3767
+ "type": "INTEGER",
3768
+ "notNull": true,
3769
+ "unique": false
3770
+ },
3771
+ "data": {
3772
+ "type": "JSON",
3773
+ "notNull": true,
3774
+ "unique": false
3775
+ }
3776
+ },
3777
+ "indexes": [
3778
+ {
3779
+ "name": "intake_dispatches_tenant_id_item_id_idx",
3780
+ "columns": [
3781
+ "tenant_id",
3782
+ "item_id",
3783
+ "stage",
3784
+ "revision"
3785
+ ],
3786
+ "unique": true
3787
+ },
3788
+ {
3789
+ "name": "intake_dispatches_slug_context_idx",
3790
+ "columns": [
3791
+ "slug",
3792
+ "context"
3793
+ ]
3794
+ },
3795
+ {
3796
+ "name": "intake_dispatches_scope_idx",
3797
+ "columns": [
3798
+ "tenant_id",
3799
+ "confidential_scope_id"
3800
+ ]
3801
+ },
3802
+ {
3803
+ "name": "intake_dispatches_item_idx",
3804
+ "columns": [
3805
+ "tenant_id",
3806
+ "item_id"
3807
+ ]
3808
+ },
3809
+ {
3810
+ "name": "intake_dispatches_state_idx",
3811
+ "columns": [
3812
+ "tenant_id",
3813
+ "state"
3814
+ ]
3815
+ },
3816
+ {
3817
+ "name": "intake_dispatches_tenant_id_created_at_idx",
3818
+ "columns": [
3819
+ "tenant_id",
3820
+ "created_at"
3821
+ ]
3822
+ },
3823
+ {
3824
+ "name": "intake_dispatches_item_id_idx",
3825
+ "columns": [
3826
+ "item_id"
3827
+ ]
3828
+ }
3829
+ ],
3830
+ "version": "037a8ea3"
3831
+ },
3832
+ "importPath": "@happyvertical/smrt-ingestion/models"
3833
+ },
3834
+ "@happyvertical/smrt-ingestion:IntakeDeletion": {
3835
+ "name": "intakedeletion",
3836
+ "className": "IntakeDeletion",
3837
+ "qualifiedName": "@happyvertical/smrt-ingestion:IntakeDeletion",
3838
+ "collection": "intakedeletions",
3839
+ "filePath": "/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts",
3840
+ "packageName": "@happyvertical/smrt-ingestion",
3841
+ "fields": {
3842
+ "tenantId": {
3843
+ "type": "text",
3844
+ "required": true,
3845
+ "_meta": {
3846
+ "sqlType": "UUID",
3847
+ "__tenancy": {
3848
+ "isTenantIdField": true,
3849
+ "autoFilter": true,
3850
+ "required": true,
3851
+ "autoPopulate": true,
3852
+ "nullable": false,
3853
+ "mode": "required",
3854
+ "field": "tenantId",
3855
+ "allowSuperAdminBypass": false
3856
+ }
3857
+ }
3858
+ },
3859
+ "confidentialScopeId": {
3860
+ "type": "text",
3861
+ "required": true,
3862
+ "_meta": {
3863
+ "required": true
3864
+ }
3865
+ },
3866
+ "itemId": {
3867
+ "type": "foreignKey",
3868
+ "required": true,
3869
+ "related": "IntakeItem",
3870
+ "_meta": {
3871
+ "required": true
3872
+ }
3873
+ },
3874
+ "state": {
3875
+ "type": "text",
3876
+ "required": true,
3877
+ "_meta": {
3878
+ "required": true
3879
+ }
3880
+ },
3881
+ "data": {
3882
+ "type": "json",
3883
+ "required": true,
3884
+ "_meta": {
3885
+ "required": true
3886
+ }
3887
+ }
3888
+ },
3889
+ "methods": {
3890
+ "getData": {
3891
+ "name": "getData",
3892
+ "async": false,
3893
+ "parameters": [],
3894
+ "returnType": "Record<string, unknown>",
3895
+ "isStatic": false,
3896
+ "isPublic": true
3897
+ }
3898
+ },
3899
+ "decoratorConfig": {
3900
+ "tableName": "intake_deletions",
3901
+ "conflictColumns": [
3902
+ "tenant_id",
3903
+ "item_id"
3904
+ ],
3905
+ "api": false,
3906
+ "cli": false,
3907
+ "mcp": false,
3908
+ "indexes": [
3909
+ {
3910
+ "name": "intake_deletions_scope_idx",
3911
+ "columns": [
3912
+ "tenantId",
3913
+ "confidentialScopeId"
3914
+ ]
3915
+ },
3916
+ {
3917
+ "name": "intake_deletions_item_idx",
3918
+ "columns": [
3919
+ "tenantId",
3920
+ "itemId"
3921
+ ]
3922
+ },
3923
+ {
3924
+ "name": "intake_deletions_state_idx",
3925
+ "columns": [
3926
+ "tenantId",
3927
+ "state"
3928
+ ]
3929
+ }
3930
+ ],
3931
+ "tenantScoped": {
3932
+ "mode": "required"
3933
+ }
3934
+ },
3935
+ "extends": "SmrtObject",
3936
+ "exportName": "IntakeDeletion",
3937
+ "collectionExportName": "IntakeDeletionCollection",
3938
+ "validationRules": [
3939
+ {
3940
+ "field": "confidentialScopeId",
3941
+ "rule": "required",
3942
+ "fieldType": "text"
3943
+ },
3944
+ {
3945
+ "field": "itemId",
3946
+ "rule": "required",
3947
+ "fieldType": "foreignKey"
3948
+ },
3949
+ {
3950
+ "field": "state",
3951
+ "rule": "required",
3952
+ "fieldType": "text"
3953
+ },
3954
+ {
3955
+ "field": "data",
3956
+ "rule": "required",
3957
+ "fieldType": "json"
3958
+ }
3959
+ ],
3960
+ "schema": {
3961
+ "tableName": "intake_deletions",
3962
+ "ddl": "CREATE TABLE IF NOT EXISTS \"intake_deletions\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"confidential_scope_id\" TEXT NOT NULL,\n \"item_id\" UUID NOT NULL,\n \"state\" TEXT NOT NULL,\n \"data\" JSON NOT NULL\n);",
3963
+ "columns": {
3964
+ "id": {
3965
+ "type": "UUID",
3966
+ "primaryKey": true,
3967
+ "referenceKind": "id",
3968
+ "notNull": true
3969
+ },
3970
+ "slug": {
3971
+ "type": "TEXT",
3972
+ "notNull": true
3973
+ },
3974
+ "context": {
3975
+ "type": "TEXT",
3976
+ "notNull": true,
3977
+ "default": ""
3978
+ },
3979
+ "created_at": {
3980
+ "type": "TIMESTAMP",
3981
+ "notNull": true,
3982
+ "default": "current_timestamp"
3983
+ },
3984
+ "updated_at": {
3985
+ "type": "TIMESTAMP",
3986
+ "notNull": true,
3987
+ "default": "current_timestamp"
3988
+ },
3989
+ "tenant_id": {
3990
+ "type": "UUID",
3991
+ "referenceKind": "tenantId",
3992
+ "notNull": true,
3993
+ "unique": false
3994
+ },
3995
+ "confidential_scope_id": {
3996
+ "type": "TEXT",
3997
+ "notNull": true,
3998
+ "unique": false
3999
+ },
4000
+ "item_id": {
4001
+ "type": "UUID",
4002
+ "referenceKind": "foreignKey",
4003
+ "notNull": true,
4004
+ "unique": false,
4005
+ "foreignKey": {
4006
+ "table": "intake_items",
4007
+ "column": "id",
4008
+ "onDelete": "CASCADE",
4009
+ "onUpdate": "CASCADE"
4010
+ }
4011
+ },
4012
+ "state": {
4013
+ "type": "TEXT",
4014
+ "notNull": true,
4015
+ "unique": false
4016
+ },
4017
+ "data": {
4018
+ "type": "JSON",
4019
+ "notNull": true,
4020
+ "unique": false
4021
+ }
4022
+ },
4023
+ "indexes": [
4024
+ {
4025
+ "name": "intake_deletions_tenant_id_item_id_idx",
4026
+ "columns": [
4027
+ "tenant_id",
4028
+ "item_id"
4029
+ ],
4030
+ "unique": true
4031
+ },
4032
+ {
4033
+ "name": "intake_deletions_slug_context_idx",
4034
+ "columns": [
4035
+ "slug",
4036
+ "context"
4037
+ ]
4038
+ },
4039
+ {
4040
+ "name": "intake_deletions_scope_idx",
4041
+ "columns": [
4042
+ "tenant_id",
4043
+ "confidential_scope_id"
4044
+ ]
4045
+ },
4046
+ {
4047
+ "name": "intake_deletions_item_idx",
4048
+ "columns": [
4049
+ "tenant_id",
4050
+ "item_id"
4051
+ ]
4052
+ },
4053
+ {
4054
+ "name": "intake_deletions_state_idx",
4055
+ "columns": [
4056
+ "tenant_id",
4057
+ "state"
4058
+ ]
4059
+ },
4060
+ {
4061
+ "name": "intake_deletions_tenant_id_created_at_idx",
4062
+ "columns": [
4063
+ "tenant_id",
4064
+ "created_at"
4065
+ ]
4066
+ },
4067
+ {
4068
+ "name": "intake_deletions_item_id_idx",
4069
+ "columns": [
4070
+ "item_id"
4071
+ ]
4072
+ }
4073
+ ],
4074
+ "version": "474ffa09"
4075
+ },
4076
+ "importPath": "@happyvertical/smrt-ingestion/models"
4077
+ }
4078
+ },
4079
+ "moduleType": "smrt",
4080
+ "smrtDependencies": [
4081
+ "@happyvertical/smrt-agents",
4082
+ "@happyvertical/smrt-assets",
4083
+ "@happyvertical/smrt-content",
4084
+ "@happyvertical/smrt-core",
4085
+ "@happyvertical/smrt-jobs",
4086
+ "@happyvertical/smrt-playbooks",
4087
+ "@happyvertical/smrt-tenancy",
4088
+ "@happyvertical/smrt-users"
4089
+ ],
4090
+ "stampsConstructors": true
4091
+ }