@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.
- package/AGENTS.md +35 -0
- package/CLAUDE.md +1 -0
- package/EXTRACTION.md +120 -0
- package/LICENSE +7 -0
- package/PROPOSALS.md +173 -0
- package/README.md +150 -2
- package/agents/execution.md +132 -0
- package/dist/__smrt-register__.d.ts +2 -0
- package/dist/__smrt-register__.d.ts.map +1 -0
- package/dist/chunks/execution-C6HJvl9e.js +7667 -0
- package/dist/chunks/execution-C6HJvl9e.js.map +1 -0
- package/dist/chunks/execution-internal-DWteDHM2.js +7 -0
- package/dist/chunks/execution-internal-DWteDHM2.js.map +1 -0
- package/dist/chunks/extraction-bseWZuWN.js +293 -0
- package/dist/chunks/extraction-bseWZuWN.js.map +1 -0
- package/dist/chunks/extraction-providers-C66ADDVe.js +433 -0
- package/dist/chunks/extraction-providers-C66ADDVe.js.map +1 -0
- package/dist/dto.d.ts +54 -0
- package/dist/dto.d.ts.map +1 -0
- package/dist/dto.js +0 -0
- package/dist/execution-contracts.d.ts +131 -0
- package/dist/execution-contracts.d.ts.map +1 -0
- package/dist/execution-dto.d.ts +70 -0
- package/dist/execution-dto.d.ts.map +1 -0
- package/dist/execution-internal.d.ts +7 -0
- package/dist/execution-internal.d.ts.map +1 -0
- package/dist/execution.d.ts +64 -0
- package/dist/execution.d.ts.map +1 -0
- package/dist/execution.js +2 -0
- package/dist/extraction-providers.d.ts +35 -0
- package/dist/extraction-providers.d.ts.map +1 -0
- package/dist/extraction-types.d.ts +94 -0
- package/dist/extraction-types.d.ts.map +1 -0
- package/dist/extraction-worker.d.ts +2 -0
- package/dist/extraction-worker.d.ts.map +1 -0
- package/dist/extraction-worker.js +81 -0
- package/dist/extraction-worker.js.map +1 -0
- package/dist/extraction.d.ts +49 -0
- package/dist/extraction.d.ts.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/manifest.json +4091 -0
- package/dist/models.d.ts +186 -0
- package/dist/models.d.ts.map +1 -0
- package/dist/models.js +923 -0
- package/dist/models.js.map +1 -0
- package/dist/policy.d.ts +46 -0
- package/dist/policy.d.ts.map +1 -0
- package/dist/proposal-contracts.d.ts +85 -0
- package/dist/proposal-contracts.d.ts.map +1 -0
- package/dist/proposal-dto.d.ts +120 -0
- package/dist/proposal-dto.d.ts.map +1 -0
- package/dist/proposal-sdk.d.ts +12 -0
- package/dist/proposal-sdk.d.ts.map +1 -0
- package/dist/proposal-validation.d.ts +188 -0
- package/dist/proposal-validation.d.ts.map +1 -0
- package/dist/proposals.d.ts +41 -0
- package/dist/proposals.d.ts.map +1 -0
- package/dist/proposals.js +865 -0
- package/dist/proposals.js.map +1 -0
- package/dist/server.d.ts +200 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +1588 -0
- package/dist/server.js.map +1 -0
- package/dist/smrt-knowledge.json +1621 -0
- package/dist/sources/common.d.ts +32 -0
- package/dist/sources/common.d.ts.map +1 -0
- package/dist/sources/email.d.ts +40 -0
- package/dist/sources/email.d.ts.map +1 -0
- package/dist/sources/http.d.ts +30 -0
- package/dist/sources/http.d.ts.map +1 -0
- package/dist/sources/index.d.ts +8 -0
- package/dist/sources/index.d.ts.map +1 -0
- package/dist/sources/watch-folder.d.ts +27 -0
- package/dist/sources/watch-folder.d.ts.map +1 -0
- package/package.json +86 -3
|
@@ -0,0 +1,1621 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"sensitiveFieldsExcluded": true,
|
|
4
|
+
"generatedAt": "1970-01-01T00:00:00.000Z",
|
|
5
|
+
"packageName": "@happyvertical/smrt-ingestion",
|
|
6
|
+
"packageVersion": "0.55.6",
|
|
7
|
+
"sourceManifestPath": "dist/manifest.json",
|
|
8
|
+
"agentDocPath": "AGENTS.md",
|
|
9
|
+
"sourceHashes": {
|
|
10
|
+
"manifest": "d79161b90fb56e63e5d88658a58943c662f26d49e400466664c457508a429fdb",
|
|
11
|
+
"packageJson": "7d352d56fcd07a61126e99cadc33dfc5f2a33c63a16aa053793241e03c593173",
|
|
12
|
+
"agents": "641b3e98116c5eb0c6b4dec127beaeacd293fe87e0ed98d2d07d8ed264fe36b6",
|
|
13
|
+
"moduleDoc:agents/execution.md": "6153206adeea46fee1be57ccc01d171621ffb3dc3a754b3634bfe2ce367e8416",
|
|
14
|
+
"moduleDoc:README.md": "8c22e7879e7d7caaedd87de59e7603192d909b8a8d60c15496afac179fb39f13",
|
|
15
|
+
"moduleDoc:EXTRACTION.md": "b735a25a7be75f3a13f3f9e92b0c25834c1394835c16ccd73a076d5720c14243",
|
|
16
|
+
"moduleDoc:PROPOSALS.md": "3accad9430e917e65319b7b7708d5c1df277eea7eaa0490df913cf361e80b7bc",
|
|
17
|
+
"agentSurface:src/test-support/execution.ts": "80a8d4661f6f09091d7c20d5a825de129a8e1acbda20984d87dc42cdec557d59",
|
|
18
|
+
"agentSurface:src/test-support/proposals.ts": "ab304c4e83e326c382bdb2b68d00f951b7707543041270c99fab0801302db842"
|
|
19
|
+
},
|
|
20
|
+
"exports": [
|
|
21
|
+
".",
|
|
22
|
+
"./dto",
|
|
23
|
+
"./execution",
|
|
24
|
+
"./manifest",
|
|
25
|
+
"./manifest.json",
|
|
26
|
+
"./models",
|
|
27
|
+
"./proposals",
|
|
28
|
+
"./server"
|
|
29
|
+
],
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@happyvertical/smrt-core": "workspace:*",
|
|
32
|
+
"@happyvertical/smrt-types": "workspace:*",
|
|
33
|
+
"@happyvertical/smrt-tenancy": "workspace:*",
|
|
34
|
+
"@happyvertical/smrt-assets": "workspace:*",
|
|
35
|
+
"@happyvertical/smrt-jobs": "workspace:*",
|
|
36
|
+
"@happyvertical/sql": "catalog:",
|
|
37
|
+
"@happyvertical/pdf": "catalog:",
|
|
38
|
+
"@happyvertical/ocr": "catalog:",
|
|
39
|
+
"@happyvertical/speech": "catalog:",
|
|
40
|
+
"@happyvertical/ai": "catalog:",
|
|
41
|
+
"sharp": "catalog:",
|
|
42
|
+
"@happyvertical/smrt-agents": "workspace:*",
|
|
43
|
+
"@happyvertical/smrt-playbooks": "workspace:*",
|
|
44
|
+
"ajv": "8.20.0",
|
|
45
|
+
"@happyvertical/smrt-vitest": "workspace:*",
|
|
46
|
+
"@types/node": "24.13.6",
|
|
47
|
+
"typescript": "6.0.3",
|
|
48
|
+
"vite": "8.1.4",
|
|
49
|
+
"vitest": "4.1.10",
|
|
50
|
+
"@happyvertical/smrt-content": "workspace:*",
|
|
51
|
+
"@happyvertical/smrt-users": "workspace:*"
|
|
52
|
+
},
|
|
53
|
+
"smrtDependencies": [
|
|
54
|
+
"@happyvertical/smrt-agents",
|
|
55
|
+
"@happyvertical/smrt-assets",
|
|
56
|
+
"@happyvertical/smrt-content",
|
|
57
|
+
"@happyvertical/smrt-core",
|
|
58
|
+
"@happyvertical/smrt-jobs",
|
|
59
|
+
"@happyvertical/smrt-playbooks",
|
|
60
|
+
"@happyvertical/smrt-tenancy",
|
|
61
|
+
"@happyvertical/smrt-types",
|
|
62
|
+
"@happyvertical/smrt-users",
|
|
63
|
+
"@happyvertical/smrt-vitest"
|
|
64
|
+
],
|
|
65
|
+
"sdkDependencies": [
|
|
66
|
+
"@happyvertical/ai",
|
|
67
|
+
"@happyvertical/ocr",
|
|
68
|
+
"@happyvertical/pdf",
|
|
69
|
+
"@happyvertical/sql"
|
|
70
|
+
],
|
|
71
|
+
"tags": [
|
|
72
|
+
"cross-package"
|
|
73
|
+
],
|
|
74
|
+
"risks": [
|
|
75
|
+
"cross-package-refs:1",
|
|
76
|
+
"sensitive-fields-excluded"
|
|
77
|
+
],
|
|
78
|
+
"objects": [
|
|
79
|
+
{
|
|
80
|
+
"name": "IntakeItem",
|
|
81
|
+
"qualifiedName": "@happyvertical/smrt-ingestion:IntakeItem",
|
|
82
|
+
"collection": "intakeitems",
|
|
83
|
+
"tableName": "intake_items",
|
|
84
|
+
"packageName": "@happyvertical/smrt-ingestion",
|
|
85
|
+
"extends": "SmrtObject",
|
|
86
|
+
"fields": [
|
|
87
|
+
{
|
|
88
|
+
"name": "tenantId",
|
|
89
|
+
"type": "text",
|
|
90
|
+
"required": true,
|
|
91
|
+
"columnType": "UUID"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"name": "confidentialScopeId",
|
|
95
|
+
"type": "text",
|
|
96
|
+
"required": true,
|
|
97
|
+
"columnType": "TEXT"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": "sourceId",
|
|
101
|
+
"type": "text",
|
|
102
|
+
"required": true,
|
|
103
|
+
"columnType": "TEXT"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"name": "sourceVersion",
|
|
107
|
+
"type": "text",
|
|
108
|
+
"required": true,
|
|
109
|
+
"columnType": "TEXT"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"name": "deliveryKey",
|
|
113
|
+
"type": "text",
|
|
114
|
+
"required": true,
|
|
115
|
+
"columnType": "TEXT"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"name": "payloadDigest",
|
|
119
|
+
"type": "text",
|
|
120
|
+
"required": true,
|
|
121
|
+
"columnType": "TEXT"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "scopeDigest",
|
|
125
|
+
"type": "text",
|
|
126
|
+
"required": true,
|
|
127
|
+
"columnType": "TEXT"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"name": "receiptState",
|
|
131
|
+
"type": "text",
|
|
132
|
+
"required": true,
|
|
133
|
+
"columnType": "TEXT"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"name": "processingState",
|
|
137
|
+
"type": "text",
|
|
138
|
+
"required": true,
|
|
139
|
+
"columnType": "TEXT"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": "visibility",
|
|
143
|
+
"type": "text",
|
|
144
|
+
"required": true,
|
|
145
|
+
"columnType": "TEXT"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"name": "receiptVersion",
|
|
149
|
+
"type": "integer",
|
|
150
|
+
"required": true,
|
|
151
|
+
"columnType": "INTEGER"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"name": "analysisRevision",
|
|
155
|
+
"type": "integer",
|
|
156
|
+
"required": true,
|
|
157
|
+
"columnType": "INTEGER"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"name": "fence",
|
|
161
|
+
"type": "integer",
|
|
162
|
+
"required": true,
|
|
163
|
+
"columnType": "INTEGER"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"name": "leaseToken",
|
|
167
|
+
"type": "text",
|
|
168
|
+
"required": true,
|
|
169
|
+
"columnType": "TEXT"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"name": "leaseUntil",
|
|
173
|
+
"type": "datetime",
|
|
174
|
+
"required": false,
|
|
175
|
+
"columnType": "TIMESTAMP"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"name": "expiresAt",
|
|
179
|
+
"type": "datetime",
|
|
180
|
+
"required": true,
|
|
181
|
+
"columnType": "TIMESTAMP"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": "replayUntil",
|
|
185
|
+
"type": "datetime",
|
|
186
|
+
"required": true,
|
|
187
|
+
"columnType": "TIMESTAMP"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"name": "cancelled",
|
|
191
|
+
"type": "boolean",
|
|
192
|
+
"required": true,
|
|
193
|
+
"columnType": "BOOLEAN"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"name": "traceId",
|
|
197
|
+
"type": "text",
|
|
198
|
+
"required": true,
|
|
199
|
+
"columnType": "TEXT"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"name": "data",
|
|
203
|
+
"type": "json",
|
|
204
|
+
"required": true,
|
|
205
|
+
"columnType": "JSON"
|
|
206
|
+
}
|
|
207
|
+
],
|
|
208
|
+
"relationships": [],
|
|
209
|
+
"methods": [
|
|
210
|
+
"getData"
|
|
211
|
+
],
|
|
212
|
+
"methodSignatures": [
|
|
213
|
+
{
|
|
214
|
+
"name": "getData",
|
|
215
|
+
"returns": "Record<string, unknown>"
|
|
216
|
+
}
|
|
217
|
+
],
|
|
218
|
+
"tenant": {
|
|
219
|
+
"scoped": true,
|
|
220
|
+
"mode": "required",
|
|
221
|
+
"field": "tenantId"
|
|
222
|
+
},
|
|
223
|
+
"conflictColumns": [
|
|
224
|
+
"tenant_id",
|
|
225
|
+
"source_id",
|
|
226
|
+
"delivery_key"
|
|
227
|
+
],
|
|
228
|
+
"surfaces": [],
|
|
229
|
+
"withheldSurfaces": [
|
|
230
|
+
{
|
|
231
|
+
"kind": "api",
|
|
232
|
+
"operation": "getData",
|
|
233
|
+
"code": "api-disabled",
|
|
234
|
+
"reason": "api is disabled",
|
|
235
|
+
"objectName": "@happyvertical/smrt-ingestion:IntakeItem"
|
|
236
|
+
}
|
|
237
|
+
],
|
|
238
|
+
"relationshipFeatures": [
|
|
239
|
+
"uuidColumns"
|
|
240
|
+
],
|
|
241
|
+
"tags": [],
|
|
242
|
+
"risks": []
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"name": "IntakeEvidence",
|
|
246
|
+
"qualifiedName": "@happyvertical/smrt-ingestion:IntakeEvidence",
|
|
247
|
+
"collection": "intakeevidences",
|
|
248
|
+
"tableName": "intake_evidence",
|
|
249
|
+
"packageName": "@happyvertical/smrt-ingestion",
|
|
250
|
+
"extends": "SmrtObject",
|
|
251
|
+
"fields": [
|
|
252
|
+
{
|
|
253
|
+
"name": "tenantId",
|
|
254
|
+
"type": "text",
|
|
255
|
+
"required": true,
|
|
256
|
+
"columnType": "UUID"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"name": "confidentialScopeId",
|
|
260
|
+
"type": "text",
|
|
261
|
+
"required": true,
|
|
262
|
+
"columnType": "TEXT"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"name": "itemId",
|
|
266
|
+
"type": "foreignKey",
|
|
267
|
+
"required": true,
|
|
268
|
+
"related": "IntakeItem",
|
|
269
|
+
"columnType": "UUID"
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"name": "partId",
|
|
273
|
+
"type": "text",
|
|
274
|
+
"required": true,
|
|
275
|
+
"columnType": "TEXT"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"name": "parentEvidenceId",
|
|
279
|
+
"type": "foreignKey",
|
|
280
|
+
"required": false,
|
|
281
|
+
"related": "IntakeEvidence",
|
|
282
|
+
"columnType": "UUID"
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"name": "assetId",
|
|
286
|
+
"type": "crossPackageRef",
|
|
287
|
+
"required": false,
|
|
288
|
+
"related": "@happyvertical/smrt-assets:Asset",
|
|
289
|
+
"columnType": "UUID"
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"name": "state",
|
|
293
|
+
"type": "text",
|
|
294
|
+
"required": true,
|
|
295
|
+
"columnType": "TEXT"
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"name": "contentHash",
|
|
299
|
+
"type": "text",
|
|
300
|
+
"required": true,
|
|
301
|
+
"columnType": "TEXT"
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"name": "byteLength",
|
|
305
|
+
"type": "integer",
|
|
306
|
+
"required": true,
|
|
307
|
+
"columnType": "INTEGER"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"name": "mediaType",
|
|
311
|
+
"type": "text",
|
|
312
|
+
"required": true,
|
|
313
|
+
"columnType": "TEXT"
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"name": "sourceUri",
|
|
317
|
+
"type": "text",
|
|
318
|
+
"required": true,
|
|
319
|
+
"columnType": "TEXT"
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"name": "data",
|
|
323
|
+
"type": "json",
|
|
324
|
+
"required": true,
|
|
325
|
+
"columnType": "JSON"
|
|
326
|
+
}
|
|
327
|
+
],
|
|
328
|
+
"relationships": [
|
|
329
|
+
{
|
|
330
|
+
"name": "itemId",
|
|
331
|
+
"type": "foreignKey",
|
|
332
|
+
"required": true,
|
|
333
|
+
"related": "IntakeItem",
|
|
334
|
+
"columnType": "UUID"
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"name": "parentEvidenceId",
|
|
338
|
+
"type": "foreignKey",
|
|
339
|
+
"required": false,
|
|
340
|
+
"related": "IntakeEvidence",
|
|
341
|
+
"columnType": "UUID"
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"name": "assetId",
|
|
345
|
+
"type": "crossPackageRef",
|
|
346
|
+
"required": false,
|
|
347
|
+
"related": "@happyvertical/smrt-assets:Asset",
|
|
348
|
+
"columnType": "UUID"
|
|
349
|
+
}
|
|
350
|
+
],
|
|
351
|
+
"methods": [
|
|
352
|
+
"getData"
|
|
353
|
+
],
|
|
354
|
+
"methodSignatures": [
|
|
355
|
+
{
|
|
356
|
+
"name": "getData",
|
|
357
|
+
"returns": "Record<string, unknown>"
|
|
358
|
+
}
|
|
359
|
+
],
|
|
360
|
+
"tenant": {
|
|
361
|
+
"scoped": true,
|
|
362
|
+
"mode": "required",
|
|
363
|
+
"field": "tenantId"
|
|
364
|
+
},
|
|
365
|
+
"conflictColumns": [
|
|
366
|
+
"tenant_id",
|
|
367
|
+
"item_id",
|
|
368
|
+
"part_id"
|
|
369
|
+
],
|
|
370
|
+
"surfaces": [],
|
|
371
|
+
"withheldSurfaces": [
|
|
372
|
+
{
|
|
373
|
+
"kind": "api",
|
|
374
|
+
"operation": "getData",
|
|
375
|
+
"code": "api-disabled",
|
|
376
|
+
"reason": "api is disabled",
|
|
377
|
+
"objectName": "@happyvertical/smrt-ingestion:IntakeEvidence"
|
|
378
|
+
}
|
|
379
|
+
],
|
|
380
|
+
"relationshipFeatures": [
|
|
381
|
+
"crossPackageRef",
|
|
382
|
+
"foreignKey",
|
|
383
|
+
"uuidColumns"
|
|
384
|
+
],
|
|
385
|
+
"tags": [],
|
|
386
|
+
"risks": []
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"name": "IntakeAnalysis",
|
|
390
|
+
"qualifiedName": "@happyvertical/smrt-ingestion:IntakeAnalysis",
|
|
391
|
+
"collection": "intakeanalysises",
|
|
392
|
+
"tableName": "intake_analyses",
|
|
393
|
+
"packageName": "@happyvertical/smrt-ingestion",
|
|
394
|
+
"extends": "SmrtObject",
|
|
395
|
+
"fields": [
|
|
396
|
+
{
|
|
397
|
+
"name": "tenantId",
|
|
398
|
+
"type": "text",
|
|
399
|
+
"required": true,
|
|
400
|
+
"columnType": "UUID"
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
"name": "confidentialScopeId",
|
|
404
|
+
"type": "text",
|
|
405
|
+
"required": true,
|
|
406
|
+
"columnType": "TEXT"
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
"name": "itemId",
|
|
410
|
+
"type": "foreignKey",
|
|
411
|
+
"required": true,
|
|
412
|
+
"related": "IntakeItem",
|
|
413
|
+
"columnType": "UUID"
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
"name": "revision",
|
|
417
|
+
"type": "integer",
|
|
418
|
+
"required": true,
|
|
419
|
+
"columnType": "INTEGER"
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
"name": "fence",
|
|
423
|
+
"type": "integer",
|
|
424
|
+
"required": true,
|
|
425
|
+
"columnType": "INTEGER"
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
"name": "attemptNumber",
|
|
429
|
+
"type": "integer",
|
|
430
|
+
"required": true,
|
|
431
|
+
"columnType": "INTEGER"
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
"name": "currentAttemptId",
|
|
435
|
+
"type": "foreignKey",
|
|
436
|
+
"required": false,
|
|
437
|
+
"related": "IntakeAnalysisAttempt",
|
|
438
|
+
"columnType": "UUID"
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
"name": "state",
|
|
442
|
+
"type": "text",
|
|
443
|
+
"required": true,
|
|
444
|
+
"columnType": "TEXT"
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
"name": "inputDigest",
|
|
448
|
+
"type": "text",
|
|
449
|
+
"required": true,
|
|
450
|
+
"columnType": "TEXT"
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
"name": "data",
|
|
454
|
+
"type": "json",
|
|
455
|
+
"required": true,
|
|
456
|
+
"columnType": "JSON"
|
|
457
|
+
}
|
|
458
|
+
],
|
|
459
|
+
"relationships": [
|
|
460
|
+
{
|
|
461
|
+
"name": "itemId",
|
|
462
|
+
"type": "foreignKey",
|
|
463
|
+
"required": true,
|
|
464
|
+
"related": "IntakeItem",
|
|
465
|
+
"columnType": "UUID"
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
"name": "currentAttemptId",
|
|
469
|
+
"type": "foreignKey",
|
|
470
|
+
"required": false,
|
|
471
|
+
"related": "IntakeAnalysisAttempt",
|
|
472
|
+
"columnType": "UUID"
|
|
473
|
+
}
|
|
474
|
+
],
|
|
475
|
+
"methods": [
|
|
476
|
+
"getData"
|
|
477
|
+
],
|
|
478
|
+
"methodSignatures": [
|
|
479
|
+
{
|
|
480
|
+
"name": "getData",
|
|
481
|
+
"returns": "Record<string, unknown>"
|
|
482
|
+
}
|
|
483
|
+
],
|
|
484
|
+
"tenant": {
|
|
485
|
+
"scoped": true,
|
|
486
|
+
"mode": "required",
|
|
487
|
+
"field": "tenantId"
|
|
488
|
+
},
|
|
489
|
+
"conflictColumns": [
|
|
490
|
+
"tenant_id",
|
|
491
|
+
"item_id",
|
|
492
|
+
"revision"
|
|
493
|
+
],
|
|
494
|
+
"surfaces": [],
|
|
495
|
+
"withheldSurfaces": [
|
|
496
|
+
{
|
|
497
|
+
"kind": "api",
|
|
498
|
+
"operation": "getData",
|
|
499
|
+
"code": "api-disabled",
|
|
500
|
+
"reason": "api is disabled",
|
|
501
|
+
"objectName": "@happyvertical/smrt-ingestion:IntakeAnalysis"
|
|
502
|
+
}
|
|
503
|
+
],
|
|
504
|
+
"relationshipFeatures": [
|
|
505
|
+
"foreignKey",
|
|
506
|
+
"uuidColumns"
|
|
507
|
+
],
|
|
508
|
+
"tags": [],
|
|
509
|
+
"risks": []
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
"name": "IntakeAnalysisAttempt",
|
|
513
|
+
"qualifiedName": "@happyvertical/smrt-ingestion:IntakeAnalysisAttempt",
|
|
514
|
+
"collection": "intakeanalysisattempts",
|
|
515
|
+
"tableName": "intake_analysis_attempts",
|
|
516
|
+
"packageName": "@happyvertical/smrt-ingestion",
|
|
517
|
+
"extends": "SmrtObject",
|
|
518
|
+
"fields": [
|
|
519
|
+
{
|
|
520
|
+
"name": "tenantId",
|
|
521
|
+
"type": "text",
|
|
522
|
+
"required": true,
|
|
523
|
+
"columnType": "UUID"
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
"name": "confidentialScopeId",
|
|
527
|
+
"type": "text",
|
|
528
|
+
"required": true,
|
|
529
|
+
"columnType": "TEXT"
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
"name": "itemId",
|
|
533
|
+
"type": "foreignKey",
|
|
534
|
+
"required": true,
|
|
535
|
+
"related": "IntakeItem",
|
|
536
|
+
"columnType": "UUID"
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
"name": "analysisId",
|
|
540
|
+
"type": "foreignKey",
|
|
541
|
+
"required": true,
|
|
542
|
+
"related": "IntakeAnalysis",
|
|
543
|
+
"columnType": "UUID"
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
"name": "attemptNumber",
|
|
547
|
+
"type": "integer",
|
|
548
|
+
"required": true,
|
|
549
|
+
"columnType": "INTEGER"
|
|
550
|
+
},
|
|
551
|
+
{
|
|
552
|
+
"name": "fence",
|
|
553
|
+
"type": "integer",
|
|
554
|
+
"required": true,
|
|
555
|
+
"columnType": "INTEGER"
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
"name": "state",
|
|
559
|
+
"type": "text",
|
|
560
|
+
"required": true,
|
|
561
|
+
"columnType": "TEXT"
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
"name": "leaseToken",
|
|
565
|
+
"type": "text",
|
|
566
|
+
"required": true,
|
|
567
|
+
"columnType": "TEXT"
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
"name": "leaseUntil",
|
|
571
|
+
"type": "datetime",
|
|
572
|
+
"required": false,
|
|
573
|
+
"columnType": "TIMESTAMP"
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
"name": "outputDigest",
|
|
577
|
+
"type": "text",
|
|
578
|
+
"required": true,
|
|
579
|
+
"columnType": "TEXT"
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
"name": "safeError",
|
|
583
|
+
"type": "text",
|
|
584
|
+
"required": true,
|
|
585
|
+
"columnType": "TEXT"
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
"name": "confidence",
|
|
589
|
+
"type": "decimal",
|
|
590
|
+
"required": false,
|
|
591
|
+
"columnType": "REAL"
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
"name": "data",
|
|
595
|
+
"type": "json",
|
|
596
|
+
"required": true,
|
|
597
|
+
"columnType": "JSON"
|
|
598
|
+
}
|
|
599
|
+
],
|
|
600
|
+
"relationships": [
|
|
601
|
+
{
|
|
602
|
+
"name": "itemId",
|
|
603
|
+
"type": "foreignKey",
|
|
604
|
+
"required": true,
|
|
605
|
+
"related": "IntakeItem",
|
|
606
|
+
"columnType": "UUID"
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
"name": "analysisId",
|
|
610
|
+
"type": "foreignKey",
|
|
611
|
+
"required": true,
|
|
612
|
+
"related": "IntakeAnalysis",
|
|
613
|
+
"columnType": "UUID"
|
|
614
|
+
}
|
|
615
|
+
],
|
|
616
|
+
"methods": [
|
|
617
|
+
"getData"
|
|
618
|
+
],
|
|
619
|
+
"methodSignatures": [
|
|
620
|
+
{
|
|
621
|
+
"name": "getData",
|
|
622
|
+
"returns": "Record<string, unknown>"
|
|
623
|
+
}
|
|
624
|
+
],
|
|
625
|
+
"tenant": {
|
|
626
|
+
"scoped": true,
|
|
627
|
+
"mode": "required",
|
|
628
|
+
"field": "tenantId"
|
|
629
|
+
},
|
|
630
|
+
"conflictColumns": [
|
|
631
|
+
"tenant_id",
|
|
632
|
+
"analysis_id",
|
|
633
|
+
"attempt_number"
|
|
634
|
+
],
|
|
635
|
+
"surfaces": [],
|
|
636
|
+
"withheldSurfaces": [
|
|
637
|
+
{
|
|
638
|
+
"kind": "api",
|
|
639
|
+
"operation": "getData",
|
|
640
|
+
"code": "api-disabled",
|
|
641
|
+
"reason": "api is disabled",
|
|
642
|
+
"objectName": "@happyvertical/smrt-ingestion:IntakeAnalysisAttempt"
|
|
643
|
+
}
|
|
644
|
+
],
|
|
645
|
+
"relationshipFeatures": [
|
|
646
|
+
"foreignKey",
|
|
647
|
+
"uuidColumns"
|
|
648
|
+
],
|
|
649
|
+
"tags": [],
|
|
650
|
+
"risks": []
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
"name": "IntakePlan",
|
|
654
|
+
"qualifiedName": "@happyvertical/smrt-ingestion:IntakePlan",
|
|
655
|
+
"collection": "intakeplans",
|
|
656
|
+
"tableName": "intake_plans",
|
|
657
|
+
"packageName": "@happyvertical/smrt-ingestion",
|
|
658
|
+
"extends": "SmrtObject",
|
|
659
|
+
"fields": [
|
|
660
|
+
{
|
|
661
|
+
"name": "tenantId",
|
|
662
|
+
"type": "text",
|
|
663
|
+
"required": true,
|
|
664
|
+
"columnType": "UUID"
|
|
665
|
+
},
|
|
666
|
+
{
|
|
667
|
+
"name": "confidentialScopeId",
|
|
668
|
+
"type": "text",
|
|
669
|
+
"required": true,
|
|
670
|
+
"columnType": "TEXT"
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
"name": "itemId",
|
|
674
|
+
"type": "foreignKey",
|
|
675
|
+
"required": true,
|
|
676
|
+
"related": "IntakeItem",
|
|
677
|
+
"columnType": "UUID"
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
"name": "planKey",
|
|
681
|
+
"type": "text",
|
|
682
|
+
"required": true,
|
|
683
|
+
"columnType": "TEXT"
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
"name": "revision",
|
|
687
|
+
"type": "integer",
|
|
688
|
+
"required": true,
|
|
689
|
+
"columnType": "INTEGER"
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
"name": "digest",
|
|
693
|
+
"type": "text",
|
|
694
|
+
"required": true,
|
|
695
|
+
"columnType": "TEXT"
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
"name": "data",
|
|
699
|
+
"type": "json",
|
|
700
|
+
"required": true,
|
|
701
|
+
"columnType": "JSON"
|
|
702
|
+
}
|
|
703
|
+
],
|
|
704
|
+
"relationships": [
|
|
705
|
+
{
|
|
706
|
+
"name": "itemId",
|
|
707
|
+
"type": "foreignKey",
|
|
708
|
+
"required": true,
|
|
709
|
+
"related": "IntakeItem",
|
|
710
|
+
"columnType": "UUID"
|
|
711
|
+
}
|
|
712
|
+
],
|
|
713
|
+
"methods": [
|
|
714
|
+
"getData"
|
|
715
|
+
],
|
|
716
|
+
"methodSignatures": [
|
|
717
|
+
{
|
|
718
|
+
"name": "getData",
|
|
719
|
+
"returns": "Record<string, unknown>"
|
|
720
|
+
}
|
|
721
|
+
],
|
|
722
|
+
"tenant": {
|
|
723
|
+
"scoped": true,
|
|
724
|
+
"mode": "required",
|
|
725
|
+
"field": "tenantId"
|
|
726
|
+
},
|
|
727
|
+
"conflictColumns": [
|
|
728
|
+
"tenant_id",
|
|
729
|
+
"item_id",
|
|
730
|
+
"plan_key",
|
|
731
|
+
"revision"
|
|
732
|
+
],
|
|
733
|
+
"surfaces": [],
|
|
734
|
+
"withheldSurfaces": [
|
|
735
|
+
{
|
|
736
|
+
"kind": "api",
|
|
737
|
+
"operation": "getData",
|
|
738
|
+
"code": "api-disabled",
|
|
739
|
+
"reason": "api is disabled",
|
|
740
|
+
"objectName": "@happyvertical/smrt-ingestion:IntakePlan"
|
|
741
|
+
}
|
|
742
|
+
],
|
|
743
|
+
"relationshipFeatures": [
|
|
744
|
+
"foreignKey",
|
|
745
|
+
"uuidColumns"
|
|
746
|
+
],
|
|
747
|
+
"tags": [],
|
|
748
|
+
"risks": []
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
"name": "IntakeAction",
|
|
752
|
+
"qualifiedName": "@happyvertical/smrt-ingestion:IntakeAction",
|
|
753
|
+
"collection": "intakeactions",
|
|
754
|
+
"tableName": "intake_actions",
|
|
755
|
+
"packageName": "@happyvertical/smrt-ingestion",
|
|
756
|
+
"extends": "SmrtObject",
|
|
757
|
+
"fields": [
|
|
758
|
+
{
|
|
759
|
+
"name": "tenantId",
|
|
760
|
+
"type": "text",
|
|
761
|
+
"required": true,
|
|
762
|
+
"columnType": "UUID"
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
"name": "confidentialScopeId",
|
|
766
|
+
"type": "text",
|
|
767
|
+
"required": true,
|
|
768
|
+
"columnType": "TEXT"
|
|
769
|
+
},
|
|
770
|
+
{
|
|
771
|
+
"name": "itemId",
|
|
772
|
+
"type": "foreignKey",
|
|
773
|
+
"required": true,
|
|
774
|
+
"related": "IntakeItem",
|
|
775
|
+
"columnType": "UUID"
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
"name": "actionKey",
|
|
779
|
+
"type": "text",
|
|
780
|
+
"required": true,
|
|
781
|
+
"columnType": "TEXT"
|
|
782
|
+
},
|
|
783
|
+
{
|
|
784
|
+
"name": "state",
|
|
785
|
+
"type": "text",
|
|
786
|
+
"required": true,
|
|
787
|
+
"columnType": "TEXT"
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
"name": "proposalRevision",
|
|
791
|
+
"type": "integer",
|
|
792
|
+
"required": true,
|
|
793
|
+
"columnType": "INTEGER"
|
|
794
|
+
},
|
|
795
|
+
{
|
|
796
|
+
"name": "reviewVersion",
|
|
797
|
+
"type": "integer",
|
|
798
|
+
"required": true,
|
|
799
|
+
"columnType": "INTEGER"
|
|
800
|
+
},
|
|
801
|
+
{
|
|
802
|
+
"name": "executionAttempt",
|
|
803
|
+
"type": "integer",
|
|
804
|
+
"required": true,
|
|
805
|
+
"columnType": "INTEGER"
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
"name": "fence",
|
|
809
|
+
"type": "integer",
|
|
810
|
+
"required": true,
|
|
811
|
+
"columnType": "INTEGER"
|
|
812
|
+
},
|
|
813
|
+
{
|
|
814
|
+
"name": "resultDigest",
|
|
815
|
+
"type": "text",
|
|
816
|
+
"required": true,
|
|
817
|
+
"columnType": "TEXT"
|
|
818
|
+
},
|
|
819
|
+
{
|
|
820
|
+
"name": "data",
|
|
821
|
+
"type": "json",
|
|
822
|
+
"required": true,
|
|
823
|
+
"columnType": "JSON"
|
|
824
|
+
}
|
|
825
|
+
],
|
|
826
|
+
"relationships": [
|
|
827
|
+
{
|
|
828
|
+
"name": "itemId",
|
|
829
|
+
"type": "foreignKey",
|
|
830
|
+
"required": true,
|
|
831
|
+
"related": "IntakeItem",
|
|
832
|
+
"columnType": "UUID"
|
|
833
|
+
}
|
|
834
|
+
],
|
|
835
|
+
"methods": [
|
|
836
|
+
"getData"
|
|
837
|
+
],
|
|
838
|
+
"methodSignatures": [
|
|
839
|
+
{
|
|
840
|
+
"name": "getData",
|
|
841
|
+
"returns": "Record<string, unknown>"
|
|
842
|
+
}
|
|
843
|
+
],
|
|
844
|
+
"tenant": {
|
|
845
|
+
"scoped": true,
|
|
846
|
+
"mode": "required",
|
|
847
|
+
"field": "tenantId"
|
|
848
|
+
},
|
|
849
|
+
"conflictColumns": [
|
|
850
|
+
"tenant_id",
|
|
851
|
+
"item_id",
|
|
852
|
+
"action_key"
|
|
853
|
+
],
|
|
854
|
+
"surfaces": [],
|
|
855
|
+
"withheldSurfaces": [
|
|
856
|
+
{
|
|
857
|
+
"kind": "api",
|
|
858
|
+
"operation": "getData",
|
|
859
|
+
"code": "api-disabled",
|
|
860
|
+
"reason": "api is disabled",
|
|
861
|
+
"objectName": "@happyvertical/smrt-ingestion:IntakeAction"
|
|
862
|
+
}
|
|
863
|
+
],
|
|
864
|
+
"relationshipFeatures": [
|
|
865
|
+
"foreignKey",
|
|
866
|
+
"uuidColumns"
|
|
867
|
+
],
|
|
868
|
+
"tags": [],
|
|
869
|
+
"risks": []
|
|
870
|
+
},
|
|
871
|
+
{
|
|
872
|
+
"name": "IntakeProposal",
|
|
873
|
+
"qualifiedName": "@happyvertical/smrt-ingestion:IntakeProposal",
|
|
874
|
+
"collection": "intakeproposals",
|
|
875
|
+
"tableName": "intake_proposals",
|
|
876
|
+
"packageName": "@happyvertical/smrt-ingestion",
|
|
877
|
+
"extends": "SmrtObject",
|
|
878
|
+
"fields": [
|
|
879
|
+
{
|
|
880
|
+
"name": "tenantId",
|
|
881
|
+
"type": "text",
|
|
882
|
+
"required": true,
|
|
883
|
+
"columnType": "UUID"
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
"name": "confidentialScopeId",
|
|
887
|
+
"type": "text",
|
|
888
|
+
"required": true,
|
|
889
|
+
"columnType": "TEXT"
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
"name": "itemId",
|
|
893
|
+
"type": "foreignKey",
|
|
894
|
+
"required": true,
|
|
895
|
+
"related": "IntakeItem",
|
|
896
|
+
"columnType": "UUID"
|
|
897
|
+
},
|
|
898
|
+
{
|
|
899
|
+
"name": "actionId",
|
|
900
|
+
"type": "foreignKey",
|
|
901
|
+
"required": true,
|
|
902
|
+
"related": "IntakeAction",
|
|
903
|
+
"columnType": "UUID"
|
|
904
|
+
},
|
|
905
|
+
{
|
|
906
|
+
"name": "analysisId",
|
|
907
|
+
"type": "foreignKey",
|
|
908
|
+
"required": true,
|
|
909
|
+
"related": "IntakeAnalysis",
|
|
910
|
+
"columnType": "UUID"
|
|
911
|
+
},
|
|
912
|
+
{
|
|
913
|
+
"name": "analysisAttemptId",
|
|
914
|
+
"type": "foreignKey",
|
|
915
|
+
"required": true,
|
|
916
|
+
"related": "IntakeAnalysisAttempt",
|
|
917
|
+
"columnType": "UUID"
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
"name": "revision",
|
|
921
|
+
"type": "integer",
|
|
922
|
+
"required": true,
|
|
923
|
+
"columnType": "INTEGER"
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
"name": "bindingHash",
|
|
927
|
+
"type": "text",
|
|
928
|
+
"required": true,
|
|
929
|
+
"columnType": "TEXT"
|
|
930
|
+
},
|
|
931
|
+
{
|
|
932
|
+
"name": "data",
|
|
933
|
+
"type": "json",
|
|
934
|
+
"required": true,
|
|
935
|
+
"columnType": "JSON"
|
|
936
|
+
}
|
|
937
|
+
],
|
|
938
|
+
"relationships": [
|
|
939
|
+
{
|
|
940
|
+
"name": "itemId",
|
|
941
|
+
"type": "foreignKey",
|
|
942
|
+
"required": true,
|
|
943
|
+
"related": "IntakeItem",
|
|
944
|
+
"columnType": "UUID"
|
|
945
|
+
},
|
|
946
|
+
{
|
|
947
|
+
"name": "actionId",
|
|
948
|
+
"type": "foreignKey",
|
|
949
|
+
"required": true,
|
|
950
|
+
"related": "IntakeAction",
|
|
951
|
+
"columnType": "UUID"
|
|
952
|
+
},
|
|
953
|
+
{
|
|
954
|
+
"name": "analysisId",
|
|
955
|
+
"type": "foreignKey",
|
|
956
|
+
"required": true,
|
|
957
|
+
"related": "IntakeAnalysis",
|
|
958
|
+
"columnType": "UUID"
|
|
959
|
+
},
|
|
960
|
+
{
|
|
961
|
+
"name": "analysisAttemptId",
|
|
962
|
+
"type": "foreignKey",
|
|
963
|
+
"required": true,
|
|
964
|
+
"related": "IntakeAnalysisAttempt",
|
|
965
|
+
"columnType": "UUID"
|
|
966
|
+
}
|
|
967
|
+
],
|
|
968
|
+
"methods": [
|
|
969
|
+
"getData"
|
|
970
|
+
],
|
|
971
|
+
"methodSignatures": [
|
|
972
|
+
{
|
|
973
|
+
"name": "getData",
|
|
974
|
+
"returns": "Record<string, unknown>"
|
|
975
|
+
}
|
|
976
|
+
],
|
|
977
|
+
"tenant": {
|
|
978
|
+
"scoped": true,
|
|
979
|
+
"mode": "required",
|
|
980
|
+
"field": "tenantId"
|
|
981
|
+
},
|
|
982
|
+
"conflictColumns": [
|
|
983
|
+
"tenant_id",
|
|
984
|
+
"action_id",
|
|
985
|
+
"revision"
|
|
986
|
+
],
|
|
987
|
+
"surfaces": [],
|
|
988
|
+
"withheldSurfaces": [
|
|
989
|
+
{
|
|
990
|
+
"kind": "api",
|
|
991
|
+
"operation": "getData",
|
|
992
|
+
"code": "api-disabled",
|
|
993
|
+
"reason": "api is disabled",
|
|
994
|
+
"objectName": "@happyvertical/smrt-ingestion:IntakeProposal"
|
|
995
|
+
}
|
|
996
|
+
],
|
|
997
|
+
"relationshipFeatures": [
|
|
998
|
+
"foreignKey",
|
|
999
|
+
"uuidColumns"
|
|
1000
|
+
],
|
|
1001
|
+
"tags": [],
|
|
1002
|
+
"risks": []
|
|
1003
|
+
},
|
|
1004
|
+
{
|
|
1005
|
+
"name": "IntakeReviewDecision",
|
|
1006
|
+
"qualifiedName": "@happyvertical/smrt-ingestion:IntakeReviewDecision",
|
|
1007
|
+
"collection": "intakereviewdecisions",
|
|
1008
|
+
"tableName": "intake_review_decisions",
|
|
1009
|
+
"packageName": "@happyvertical/smrt-ingestion",
|
|
1010
|
+
"extends": "SmrtObject",
|
|
1011
|
+
"fields": [
|
|
1012
|
+
{
|
|
1013
|
+
"name": "tenantId",
|
|
1014
|
+
"type": "text",
|
|
1015
|
+
"required": true,
|
|
1016
|
+
"columnType": "UUID"
|
|
1017
|
+
},
|
|
1018
|
+
{
|
|
1019
|
+
"name": "confidentialScopeId",
|
|
1020
|
+
"type": "text",
|
|
1021
|
+
"required": true,
|
|
1022
|
+
"columnType": "TEXT"
|
|
1023
|
+
},
|
|
1024
|
+
{
|
|
1025
|
+
"name": "itemId",
|
|
1026
|
+
"type": "foreignKey",
|
|
1027
|
+
"required": true,
|
|
1028
|
+
"related": "IntakeItem",
|
|
1029
|
+
"columnType": "UUID"
|
|
1030
|
+
},
|
|
1031
|
+
{
|
|
1032
|
+
"name": "actionId",
|
|
1033
|
+
"type": "foreignKey",
|
|
1034
|
+
"required": true,
|
|
1035
|
+
"related": "IntakeAction",
|
|
1036
|
+
"columnType": "UUID"
|
|
1037
|
+
},
|
|
1038
|
+
{
|
|
1039
|
+
"name": "proposalId",
|
|
1040
|
+
"type": "foreignKey",
|
|
1041
|
+
"required": true,
|
|
1042
|
+
"related": "IntakeProposal",
|
|
1043
|
+
"columnType": "UUID"
|
|
1044
|
+
},
|
|
1045
|
+
{
|
|
1046
|
+
"name": "reviewVersion",
|
|
1047
|
+
"type": "integer",
|
|
1048
|
+
"required": true,
|
|
1049
|
+
"columnType": "INTEGER"
|
|
1050
|
+
},
|
|
1051
|
+
{
|
|
1052
|
+
"name": "bindingHash",
|
|
1053
|
+
"type": "text",
|
|
1054
|
+
"required": true,
|
|
1055
|
+
"columnType": "TEXT"
|
|
1056
|
+
},
|
|
1057
|
+
{
|
|
1058
|
+
"name": "decision",
|
|
1059
|
+
"type": "text",
|
|
1060
|
+
"required": true,
|
|
1061
|
+
"columnType": "TEXT"
|
|
1062
|
+
},
|
|
1063
|
+
{
|
|
1064
|
+
"name": "data",
|
|
1065
|
+
"type": "json",
|
|
1066
|
+
"required": true,
|
|
1067
|
+
"columnType": "JSON"
|
|
1068
|
+
}
|
|
1069
|
+
],
|
|
1070
|
+
"relationships": [
|
|
1071
|
+
{
|
|
1072
|
+
"name": "itemId",
|
|
1073
|
+
"type": "foreignKey",
|
|
1074
|
+
"required": true,
|
|
1075
|
+
"related": "IntakeItem",
|
|
1076
|
+
"columnType": "UUID"
|
|
1077
|
+
},
|
|
1078
|
+
{
|
|
1079
|
+
"name": "actionId",
|
|
1080
|
+
"type": "foreignKey",
|
|
1081
|
+
"required": true,
|
|
1082
|
+
"related": "IntakeAction",
|
|
1083
|
+
"columnType": "UUID"
|
|
1084
|
+
},
|
|
1085
|
+
{
|
|
1086
|
+
"name": "proposalId",
|
|
1087
|
+
"type": "foreignKey",
|
|
1088
|
+
"required": true,
|
|
1089
|
+
"related": "IntakeProposal",
|
|
1090
|
+
"columnType": "UUID"
|
|
1091
|
+
}
|
|
1092
|
+
],
|
|
1093
|
+
"methods": [
|
|
1094
|
+
"getData"
|
|
1095
|
+
],
|
|
1096
|
+
"methodSignatures": [
|
|
1097
|
+
{
|
|
1098
|
+
"name": "getData",
|
|
1099
|
+
"returns": "Record<string, unknown>"
|
|
1100
|
+
}
|
|
1101
|
+
],
|
|
1102
|
+
"tenant": {
|
|
1103
|
+
"scoped": true,
|
|
1104
|
+
"mode": "required",
|
|
1105
|
+
"field": "tenantId"
|
|
1106
|
+
},
|
|
1107
|
+
"conflictColumns": [
|
|
1108
|
+
"tenant_id",
|
|
1109
|
+
"action_id",
|
|
1110
|
+
"review_version"
|
|
1111
|
+
],
|
|
1112
|
+
"surfaces": [],
|
|
1113
|
+
"withheldSurfaces": [
|
|
1114
|
+
{
|
|
1115
|
+
"kind": "api",
|
|
1116
|
+
"operation": "getData",
|
|
1117
|
+
"code": "api-disabled",
|
|
1118
|
+
"reason": "api is disabled",
|
|
1119
|
+
"objectName": "@happyvertical/smrt-ingestion:IntakeReviewDecision"
|
|
1120
|
+
}
|
|
1121
|
+
],
|
|
1122
|
+
"relationshipFeatures": [
|
|
1123
|
+
"foreignKey",
|
|
1124
|
+
"uuidColumns"
|
|
1125
|
+
],
|
|
1126
|
+
"tags": [],
|
|
1127
|
+
"risks": []
|
|
1128
|
+
},
|
|
1129
|
+
{
|
|
1130
|
+
"name": "IntakeExecution",
|
|
1131
|
+
"qualifiedName": "@happyvertical/smrt-ingestion:IntakeExecution",
|
|
1132
|
+
"collection": "intakeexecutions",
|
|
1133
|
+
"tableName": "intake_executions",
|
|
1134
|
+
"packageName": "@happyvertical/smrt-ingestion",
|
|
1135
|
+
"extends": "SmrtObject",
|
|
1136
|
+
"fields": [
|
|
1137
|
+
{
|
|
1138
|
+
"name": "tenantId",
|
|
1139
|
+
"type": "text",
|
|
1140
|
+
"required": true,
|
|
1141
|
+
"columnType": "UUID"
|
|
1142
|
+
},
|
|
1143
|
+
{
|
|
1144
|
+
"name": "confidentialScopeId",
|
|
1145
|
+
"type": "text",
|
|
1146
|
+
"required": true,
|
|
1147
|
+
"columnType": "TEXT"
|
|
1148
|
+
},
|
|
1149
|
+
{
|
|
1150
|
+
"name": "itemId",
|
|
1151
|
+
"type": "foreignKey",
|
|
1152
|
+
"required": true,
|
|
1153
|
+
"related": "IntakeItem",
|
|
1154
|
+
"columnType": "UUID"
|
|
1155
|
+
},
|
|
1156
|
+
{
|
|
1157
|
+
"name": "actionId",
|
|
1158
|
+
"type": "foreignKey",
|
|
1159
|
+
"required": true,
|
|
1160
|
+
"related": "IntakeAction",
|
|
1161
|
+
"columnType": "UUID"
|
|
1162
|
+
},
|
|
1163
|
+
{
|
|
1164
|
+
"name": "attemptNumber",
|
|
1165
|
+
"type": "integer",
|
|
1166
|
+
"required": true,
|
|
1167
|
+
"columnType": "INTEGER"
|
|
1168
|
+
},
|
|
1169
|
+
{
|
|
1170
|
+
"name": "fence",
|
|
1171
|
+
"type": "integer",
|
|
1172
|
+
"required": true,
|
|
1173
|
+
"columnType": "INTEGER"
|
|
1174
|
+
},
|
|
1175
|
+
{
|
|
1176
|
+
"name": "state",
|
|
1177
|
+
"type": "text",
|
|
1178
|
+
"required": true,
|
|
1179
|
+
"columnType": "TEXT"
|
|
1180
|
+
},
|
|
1181
|
+
{
|
|
1182
|
+
"name": "bindingHash",
|
|
1183
|
+
"type": "text",
|
|
1184
|
+
"required": true,
|
|
1185
|
+
"columnType": "TEXT"
|
|
1186
|
+
},
|
|
1187
|
+
{
|
|
1188
|
+
"name": "resultDigest",
|
|
1189
|
+
"type": "text",
|
|
1190
|
+
"required": true,
|
|
1191
|
+
"columnType": "TEXT"
|
|
1192
|
+
},
|
|
1193
|
+
{
|
|
1194
|
+
"name": "idempotencyKey",
|
|
1195
|
+
"type": "text",
|
|
1196
|
+
"required": true,
|
|
1197
|
+
"columnType": "TEXT"
|
|
1198
|
+
},
|
|
1199
|
+
{
|
|
1200
|
+
"name": "data",
|
|
1201
|
+
"type": "json",
|
|
1202
|
+
"required": true,
|
|
1203
|
+
"columnType": "JSON"
|
|
1204
|
+
}
|
|
1205
|
+
],
|
|
1206
|
+
"relationships": [
|
|
1207
|
+
{
|
|
1208
|
+
"name": "itemId",
|
|
1209
|
+
"type": "foreignKey",
|
|
1210
|
+
"required": true,
|
|
1211
|
+
"related": "IntakeItem",
|
|
1212
|
+
"columnType": "UUID"
|
|
1213
|
+
},
|
|
1214
|
+
{
|
|
1215
|
+
"name": "actionId",
|
|
1216
|
+
"type": "foreignKey",
|
|
1217
|
+
"required": true,
|
|
1218
|
+
"related": "IntakeAction",
|
|
1219
|
+
"columnType": "UUID"
|
|
1220
|
+
}
|
|
1221
|
+
],
|
|
1222
|
+
"methods": [
|
|
1223
|
+
"getData"
|
|
1224
|
+
],
|
|
1225
|
+
"methodSignatures": [
|
|
1226
|
+
{
|
|
1227
|
+
"name": "getData",
|
|
1228
|
+
"returns": "Record<string, unknown>"
|
|
1229
|
+
}
|
|
1230
|
+
],
|
|
1231
|
+
"tenant": {
|
|
1232
|
+
"scoped": true,
|
|
1233
|
+
"mode": "required",
|
|
1234
|
+
"field": "tenantId"
|
|
1235
|
+
},
|
|
1236
|
+
"conflictColumns": [
|
|
1237
|
+
"tenant_id",
|
|
1238
|
+
"action_id",
|
|
1239
|
+
"attempt_number"
|
|
1240
|
+
],
|
|
1241
|
+
"surfaces": [],
|
|
1242
|
+
"withheldSurfaces": [
|
|
1243
|
+
{
|
|
1244
|
+
"kind": "api",
|
|
1245
|
+
"operation": "getData",
|
|
1246
|
+
"code": "api-disabled",
|
|
1247
|
+
"reason": "api is disabled",
|
|
1248
|
+
"objectName": "@happyvertical/smrt-ingestion:IntakeExecution"
|
|
1249
|
+
}
|
|
1250
|
+
],
|
|
1251
|
+
"relationshipFeatures": [
|
|
1252
|
+
"foreignKey",
|
|
1253
|
+
"uuidColumns"
|
|
1254
|
+
],
|
|
1255
|
+
"tags": [],
|
|
1256
|
+
"risks": []
|
|
1257
|
+
},
|
|
1258
|
+
{
|
|
1259
|
+
"name": "IntakeFeedback",
|
|
1260
|
+
"qualifiedName": "@happyvertical/smrt-ingestion:IntakeFeedback",
|
|
1261
|
+
"collection": "intakefeedbacks",
|
|
1262
|
+
"tableName": "intake_feedback",
|
|
1263
|
+
"packageName": "@happyvertical/smrt-ingestion",
|
|
1264
|
+
"extends": "SmrtObject",
|
|
1265
|
+
"fields": [
|
|
1266
|
+
{
|
|
1267
|
+
"name": "tenantId",
|
|
1268
|
+
"type": "text",
|
|
1269
|
+
"required": true,
|
|
1270
|
+
"columnType": "UUID"
|
|
1271
|
+
},
|
|
1272
|
+
{
|
|
1273
|
+
"name": "confidentialScopeId",
|
|
1274
|
+
"type": "text",
|
|
1275
|
+
"required": true,
|
|
1276
|
+
"columnType": "TEXT"
|
|
1277
|
+
},
|
|
1278
|
+
{
|
|
1279
|
+
"name": "itemId",
|
|
1280
|
+
"type": "foreignKey",
|
|
1281
|
+
"required": true,
|
|
1282
|
+
"related": "IntakeItem",
|
|
1283
|
+
"columnType": "UUID"
|
|
1284
|
+
},
|
|
1285
|
+
{
|
|
1286
|
+
"name": "requestKey",
|
|
1287
|
+
"type": "text",
|
|
1288
|
+
"required": true,
|
|
1289
|
+
"columnType": "TEXT"
|
|
1290
|
+
},
|
|
1291
|
+
{
|
|
1292
|
+
"name": "supersedesId",
|
|
1293
|
+
"type": "foreignKey",
|
|
1294
|
+
"required": false,
|
|
1295
|
+
"related": "IntakeFeedback",
|
|
1296
|
+
"columnType": "UUID"
|
|
1297
|
+
},
|
|
1298
|
+
{
|
|
1299
|
+
"name": "kind",
|
|
1300
|
+
"type": "text",
|
|
1301
|
+
"required": true,
|
|
1302
|
+
"columnType": "TEXT"
|
|
1303
|
+
},
|
|
1304
|
+
{
|
|
1305
|
+
"name": "data",
|
|
1306
|
+
"type": "json",
|
|
1307
|
+
"required": true,
|
|
1308
|
+
"columnType": "JSON"
|
|
1309
|
+
}
|
|
1310
|
+
],
|
|
1311
|
+
"relationships": [
|
|
1312
|
+
{
|
|
1313
|
+
"name": "itemId",
|
|
1314
|
+
"type": "foreignKey",
|
|
1315
|
+
"required": true,
|
|
1316
|
+
"related": "IntakeItem",
|
|
1317
|
+
"columnType": "UUID"
|
|
1318
|
+
},
|
|
1319
|
+
{
|
|
1320
|
+
"name": "supersedesId",
|
|
1321
|
+
"type": "foreignKey",
|
|
1322
|
+
"required": false,
|
|
1323
|
+
"related": "IntakeFeedback",
|
|
1324
|
+
"columnType": "UUID"
|
|
1325
|
+
}
|
|
1326
|
+
],
|
|
1327
|
+
"methods": [
|
|
1328
|
+
"getData"
|
|
1329
|
+
],
|
|
1330
|
+
"methodSignatures": [
|
|
1331
|
+
{
|
|
1332
|
+
"name": "getData",
|
|
1333
|
+
"returns": "Record<string, unknown>"
|
|
1334
|
+
}
|
|
1335
|
+
],
|
|
1336
|
+
"tenant": {
|
|
1337
|
+
"scoped": true,
|
|
1338
|
+
"mode": "required",
|
|
1339
|
+
"field": "tenantId"
|
|
1340
|
+
},
|
|
1341
|
+
"conflictColumns": [
|
|
1342
|
+
"tenant_id",
|
|
1343
|
+
"item_id",
|
|
1344
|
+
"request_key"
|
|
1345
|
+
],
|
|
1346
|
+
"surfaces": [],
|
|
1347
|
+
"withheldSurfaces": [
|
|
1348
|
+
{
|
|
1349
|
+
"kind": "api",
|
|
1350
|
+
"operation": "getData",
|
|
1351
|
+
"code": "api-disabled",
|
|
1352
|
+
"reason": "api is disabled",
|
|
1353
|
+
"objectName": "@happyvertical/smrt-ingestion:IntakeFeedback"
|
|
1354
|
+
}
|
|
1355
|
+
],
|
|
1356
|
+
"relationshipFeatures": [
|
|
1357
|
+
"foreignKey",
|
|
1358
|
+
"uuidColumns"
|
|
1359
|
+
],
|
|
1360
|
+
"tags": [],
|
|
1361
|
+
"risks": []
|
|
1362
|
+
},
|
|
1363
|
+
{
|
|
1364
|
+
"name": "IntakeDispatch",
|
|
1365
|
+
"qualifiedName": "@happyvertical/smrt-ingestion:IntakeDispatch",
|
|
1366
|
+
"collection": "intakedispatches",
|
|
1367
|
+
"tableName": "intake_dispatches",
|
|
1368
|
+
"packageName": "@happyvertical/smrt-ingestion",
|
|
1369
|
+
"extends": "SmrtObject",
|
|
1370
|
+
"fields": [
|
|
1371
|
+
{
|
|
1372
|
+
"name": "tenantId",
|
|
1373
|
+
"type": "text",
|
|
1374
|
+
"required": true,
|
|
1375
|
+
"columnType": "UUID"
|
|
1376
|
+
},
|
|
1377
|
+
{
|
|
1378
|
+
"name": "confidentialScopeId",
|
|
1379
|
+
"type": "text",
|
|
1380
|
+
"required": true,
|
|
1381
|
+
"columnType": "TEXT"
|
|
1382
|
+
},
|
|
1383
|
+
{
|
|
1384
|
+
"name": "itemId",
|
|
1385
|
+
"type": "foreignKey",
|
|
1386
|
+
"required": true,
|
|
1387
|
+
"related": "IntakeItem",
|
|
1388
|
+
"columnType": "UUID"
|
|
1389
|
+
},
|
|
1390
|
+
{
|
|
1391
|
+
"name": "stage",
|
|
1392
|
+
"type": "text",
|
|
1393
|
+
"required": true,
|
|
1394
|
+
"columnType": "TEXT"
|
|
1395
|
+
},
|
|
1396
|
+
{
|
|
1397
|
+
"name": "revision",
|
|
1398
|
+
"type": "integer",
|
|
1399
|
+
"required": true,
|
|
1400
|
+
"columnType": "INTEGER"
|
|
1401
|
+
},
|
|
1402
|
+
{
|
|
1403
|
+
"name": "state",
|
|
1404
|
+
"type": "text",
|
|
1405
|
+
"required": true,
|
|
1406
|
+
"columnType": "TEXT"
|
|
1407
|
+
},
|
|
1408
|
+
{
|
|
1409
|
+
"name": "jobId",
|
|
1410
|
+
"type": "text",
|
|
1411
|
+
"required": true,
|
|
1412
|
+
"columnType": "TEXT"
|
|
1413
|
+
},
|
|
1414
|
+
{
|
|
1415
|
+
"name": "deliveries",
|
|
1416
|
+
"type": "integer",
|
|
1417
|
+
"required": true,
|
|
1418
|
+
"columnType": "INTEGER"
|
|
1419
|
+
},
|
|
1420
|
+
{
|
|
1421
|
+
"name": "data",
|
|
1422
|
+
"type": "json",
|
|
1423
|
+
"required": true,
|
|
1424
|
+
"columnType": "JSON"
|
|
1425
|
+
}
|
|
1426
|
+
],
|
|
1427
|
+
"relationships": [
|
|
1428
|
+
{
|
|
1429
|
+
"name": "itemId",
|
|
1430
|
+
"type": "foreignKey",
|
|
1431
|
+
"required": true,
|
|
1432
|
+
"related": "IntakeItem",
|
|
1433
|
+
"columnType": "UUID"
|
|
1434
|
+
}
|
|
1435
|
+
],
|
|
1436
|
+
"methods": [
|
|
1437
|
+
"getData"
|
|
1438
|
+
],
|
|
1439
|
+
"methodSignatures": [
|
|
1440
|
+
{
|
|
1441
|
+
"name": "getData",
|
|
1442
|
+
"returns": "Record<string, unknown>"
|
|
1443
|
+
}
|
|
1444
|
+
],
|
|
1445
|
+
"tenant": {
|
|
1446
|
+
"scoped": true,
|
|
1447
|
+
"mode": "required",
|
|
1448
|
+
"field": "tenantId"
|
|
1449
|
+
},
|
|
1450
|
+
"conflictColumns": [
|
|
1451
|
+
"tenant_id",
|
|
1452
|
+
"item_id",
|
|
1453
|
+
"stage",
|
|
1454
|
+
"revision"
|
|
1455
|
+
],
|
|
1456
|
+
"surfaces": [],
|
|
1457
|
+
"withheldSurfaces": [
|
|
1458
|
+
{
|
|
1459
|
+
"kind": "api",
|
|
1460
|
+
"operation": "getData",
|
|
1461
|
+
"code": "api-disabled",
|
|
1462
|
+
"reason": "api is disabled",
|
|
1463
|
+
"objectName": "@happyvertical/smrt-ingestion:IntakeDispatch"
|
|
1464
|
+
}
|
|
1465
|
+
],
|
|
1466
|
+
"relationshipFeatures": [
|
|
1467
|
+
"foreignKey",
|
|
1468
|
+
"uuidColumns"
|
|
1469
|
+
],
|
|
1470
|
+
"tags": [],
|
|
1471
|
+
"risks": []
|
|
1472
|
+
},
|
|
1473
|
+
{
|
|
1474
|
+
"name": "IntakeDeletion",
|
|
1475
|
+
"qualifiedName": "@happyvertical/smrt-ingestion:IntakeDeletion",
|
|
1476
|
+
"collection": "intakedeletions",
|
|
1477
|
+
"tableName": "intake_deletions",
|
|
1478
|
+
"packageName": "@happyvertical/smrt-ingestion",
|
|
1479
|
+
"extends": "SmrtObject",
|
|
1480
|
+
"fields": [
|
|
1481
|
+
{
|
|
1482
|
+
"name": "tenantId",
|
|
1483
|
+
"type": "text",
|
|
1484
|
+
"required": true,
|
|
1485
|
+
"columnType": "UUID"
|
|
1486
|
+
},
|
|
1487
|
+
{
|
|
1488
|
+
"name": "confidentialScopeId",
|
|
1489
|
+
"type": "text",
|
|
1490
|
+
"required": true,
|
|
1491
|
+
"columnType": "TEXT"
|
|
1492
|
+
},
|
|
1493
|
+
{
|
|
1494
|
+
"name": "itemId",
|
|
1495
|
+
"type": "foreignKey",
|
|
1496
|
+
"required": true,
|
|
1497
|
+
"related": "IntakeItem",
|
|
1498
|
+
"columnType": "UUID"
|
|
1499
|
+
},
|
|
1500
|
+
{
|
|
1501
|
+
"name": "state",
|
|
1502
|
+
"type": "text",
|
|
1503
|
+
"required": true,
|
|
1504
|
+
"columnType": "TEXT"
|
|
1505
|
+
},
|
|
1506
|
+
{
|
|
1507
|
+
"name": "data",
|
|
1508
|
+
"type": "json",
|
|
1509
|
+
"required": true,
|
|
1510
|
+
"columnType": "JSON"
|
|
1511
|
+
}
|
|
1512
|
+
],
|
|
1513
|
+
"relationships": [
|
|
1514
|
+
{
|
|
1515
|
+
"name": "itemId",
|
|
1516
|
+
"type": "foreignKey",
|
|
1517
|
+
"required": true,
|
|
1518
|
+
"related": "IntakeItem",
|
|
1519
|
+
"columnType": "UUID"
|
|
1520
|
+
}
|
|
1521
|
+
],
|
|
1522
|
+
"methods": [
|
|
1523
|
+
"getData"
|
|
1524
|
+
],
|
|
1525
|
+
"methodSignatures": [
|
|
1526
|
+
{
|
|
1527
|
+
"name": "getData",
|
|
1528
|
+
"returns": "Record<string, unknown>"
|
|
1529
|
+
}
|
|
1530
|
+
],
|
|
1531
|
+
"tenant": {
|
|
1532
|
+
"scoped": true,
|
|
1533
|
+
"mode": "required",
|
|
1534
|
+
"field": "tenantId"
|
|
1535
|
+
},
|
|
1536
|
+
"conflictColumns": [
|
|
1537
|
+
"tenant_id",
|
|
1538
|
+
"item_id"
|
|
1539
|
+
],
|
|
1540
|
+
"surfaces": [],
|
|
1541
|
+
"withheldSurfaces": [
|
|
1542
|
+
{
|
|
1543
|
+
"kind": "api",
|
|
1544
|
+
"operation": "getData",
|
|
1545
|
+
"code": "api-disabled",
|
|
1546
|
+
"reason": "api is disabled",
|
|
1547
|
+
"objectName": "@happyvertical/smrt-ingestion:IntakeDeletion"
|
|
1548
|
+
}
|
|
1549
|
+
],
|
|
1550
|
+
"relationshipFeatures": [
|
|
1551
|
+
"foreignKey",
|
|
1552
|
+
"uuidColumns"
|
|
1553
|
+
],
|
|
1554
|
+
"tags": [],
|
|
1555
|
+
"risks": []
|
|
1556
|
+
}
|
|
1557
|
+
],
|
|
1558
|
+
"surfaces": [],
|
|
1559
|
+
"prompts": [],
|
|
1560
|
+
"relationshipsV2": {
|
|
1561
|
+
"foreignKeyFields": 21,
|
|
1562
|
+
"crossPackageRefFields": 1,
|
|
1563
|
+
"junctionCollections": 0,
|
|
1564
|
+
"hierarchicalObjects": 0,
|
|
1565
|
+
"polymorphicAssociations": 0,
|
|
1566
|
+
"uuidColumns": 46
|
|
1567
|
+
},
|
|
1568
|
+
"agentDoc": "# @happyvertical/smrt-ingestion\n\nDurable foundation for ADR 0004. `src/models.ts` owns all ingestion tables;\n`src/server.ts` owns authenticated service boundaries and lifecycle primitives.\n`src/execution.ts` owns authoritative review/apply and imports server-only principals.\nSee [execution integration](agents/execution.md) for host transaction guarantees,\ncatalog contracts, deployment dependencies and continuation bindings.\nRoot, `/models`, and `/dto` remain browser-safe; provider/network/filesystem code\nbelongs under `/server`. Generated REST/CLI/MCP model mutation is disabled.\n\nSee [README.md](README.md) for host integration and recovery/deletion operation.\nSee [EXTRACTION.md](EXTRACTION.md) for extraction contracts, provider isolation\nrequirements and corpus validation.\nSee [PROPOSALS.md](PROPOSALS.md) for the optional server-only proposal stage,\ncurrent catalog/candidate authority and immutable source pinning.\n\nAll records require tenant and confidential scope. Hosts create service scopes\nfrom authenticated sessions; source metadata is never authority. Every read and\nwrite rechecks the host scope predicate. Analysis input revisions, attempts,\nproposals, decisions, executions and feedback are append-only except documented\nstate projections and retention redaction. Terminal actions outlive job cleanup.\n\nOnly SQLite and PostgreSQL are supported. Deploy manifest migrations before\nstarting services; runtime performs no application DDL. Storage planning and\npreservation use AssetRuntime/AssetStore public methods. Blob I/O and queue\nsubmission never run inside ingestion database transactions.\n\nValidation: `pnpm test`, `pnpm test:postgres`, `pnpm test:providers`, `pnpm typecheck`, `pnpm build`.\nThe PostgreSQL command provisions a real database and fails if unavailable.\nBuild includes browser import validation. The provider lane exercises local SDK\nadapters and process isolation, without claiming live remote recognition quality.\nThe component/e2e/evaluation\ncommands are reserved by ADR 0004 and fail explicitly until their owning children\nsupply real suites.\nSee ../../docs/test-matrix/3670-ingestion-foundation.md for behavior coverage.\n",
|
|
1569
|
+
"moduleDocs": [
|
|
1570
|
+
{
|
|
1571
|
+
"path": "agents/execution.md",
|
|
1572
|
+
"module": "execution",
|
|
1573
|
+
"content": "# Review and execution integration\n\n`/execution` exports `IntakeExecutionService`, handler/host types, policy\nresolution, binding digests and `continueIntakeReview`. `IngestionService` exposes\nthese operations when its optional `execution` configuration is present. Its\nloader is lazy: importing `/server` alone does not import the principal stack.\n`/dto` exposes execution messages using type-only exports. No generated REST,\nCLI or MCP mutation endpoint is enabled; applications authenticate their own\nservice surface and create `IngestionScope` from the session.\n\n## Catalog and authority\n\nApplications supply a trusted `IntakeExecutionOptions.handlers` catalog.\n`OperationHandler` has qualified ID, immutable version, description, object JSON\nschemas for arguments/results, allowlisted `resultModels`, `validate`, `preview`,\na registered `{model, action, version}` operation and explicit effect/idempotency/\nopen-world capability declaration. Preview returns display, exact normalized\narguments and target revision preconditions. There is no arbitrary tool execution\nor expression evaluation. Reviewer display wraps application fields under `preview`\nand symbolic metadata under `dependencies`; plan steps additionally wrap that\nobject under `step` alongside the plan preview. Application display keys cannot\noverwrite framework metadata or be silently overwritten by it. A version change\nrequires a new preview and approval.\n`PlanHandler` references a real registered playbook key and resolved definition\nhash; expansion contains only ordered operation handlers and typed earlier-step\nresult references. Discovery/proposal generation consumes this catalog rather\nthan creating another registry. Semantic model output is never host configuration.\n\nAuthenticated receipt context captures `capturedCeiling.execution` with principal\nID and permission/handler/operation ceilings. The execution host's `authorize`\nresolves current grants and application/tenant/source/(optional request) policy\non the supplied executor, checking the active requester and confidential scope.\nLists intersect, budgets minimize, review requirements OR, and disabled policy\nwins. Policy versions must change when policy semantics change. Normal operation\nrequires human review; machine authorization requires explicit evaluated opt-ins\nat all three authority layers and remains separate provenance from human review.\nThe reference handlers always require review; no evaluation claim is made here.\n\n`mutationBoundary: 'serialized'` is an explicit host guarantee, not an inferred\nproperty of a permissions array: grant revocation must serialize with the supplied\ntransaction, or the owning mutation must revalidate under its own lock. The host\nmust implement that guarantee before enabling handlers. `assertTarget` similarly\nlocks current tenant/confidential ownership and revision against concurrent\nwriters using the supplied executor. The reference host demonstrates a scoped\nrow lock before public `Contents` reads. A current `PrincipalRun` intersects live\npermissions with the captured ceiling and checks the exact registered collection\noperation at every effect. No `runOnce` atomicity is assumed.\n\n## Durable review and effects\n\nPreview appends a proposal bound to exact analysis attempt/evidence, handler,\narguments, policy and target preconditions. Decision requests use unique durable\nrequest IDs; reusing an ID with changed content is rejected. First valid review\nwins under the item lock. Corrections append a new revision; reject/defer remain\nnon-executable. Plan corrections use re-expansion. Human decisions expire and\nlive authority is checked again before each step. Raw foundation proposals cannot\nbypass execution's schema, preview, evidence and approval verification.\n\nDatabase handlers must use `context.db` for every domain effect and must perform\nno external I/O. Domain result and successful execution commit together. A domain savepoint rolls failed effects\nback while preserving the item lock and atomically consuming the retry attempt. Completed\nactions survive job cleanup and evidence retention; expired originals leave a\nminimal result digest tombstone, preventing a second effect. Active result reads\nrecheck host visibility and result target ownership.\n\nExternal handlers reserve a stable action idempotency key before submission.\nTimeout, process death or ambiguous outcome requires reconciliation; an expired\nlease never means permission to resend. `reconcile` must return authoritative\n`succeeded`, `not_applied` or `unknown`. `not_applied` is safe only when the provider\ncan exclude a late acceptance of the original send; uncertainty stays `unknown`.\nThe same key is reused after a conclusive non-application. Cancellation prevents\npending work but cannot retract a send already issued. Applications must arrange\nprovider reconciliation before privacy retention removes the binding; a redacted\nunknown action fails closed and cannot automatically execute again.\n\nEach plan step has a stable action identity. Completed steps are immutable and\nreturn their original result. Symbolic record IDs bind to exact earlier proposal\nrevision, successful result digest/model and target revision; they cannot point\nacross items or form cycles. Failed dependent steps never repeat predecessors.\nThe plan preview and target preconditions are part of its digest and visible in\neach step review; changed preview/preconditions require a fresh review.\nAbort/continue follows the pinned public playbook definition, with fresh authority\nat every step.\n\n`continueIntakeReview` uses the existing jobs continuation context. Applications\ncreate tasks with owner, tenant and exact `{recordId, revision, inputKey}` binding\nand configure `authorizeMcpTask` to revalidate it. A continuation answer only wakes\nthe task; the service reloads the authoritative decision. Waiting persists without\nan occupied worker and survives runner restart.\n\n## Deployment and evidence\n\nApply normal manifest migrations before runtime. Execution imports the public\nagents/users principal stack, which registers profiles including `ProfileAsset`;\nexecution-enabled hosts must migrate their dependency graph (including profile\nasset joins used by asset deletion). `/server` receipt-only imports register none\nof these additional models. Content is not a runtime dependency of ingestion.\n`reference/handlers.ts` is an application/test fixture, excluded from published\nentries and declarations; importing it deliberately adds Content and its asset\njoins, whose migrations the application then owns. No runtime DDL is performed.\n\nReal SQLite and PostgreSQL execution suites exercise the public Content draft and\nattachment APIs, transaction rollback, actor/context denials, simultaneous applies\nand reviewers, retention replay, external process death and actual TaskRunner\nrestart. See the issue 3674 test matrix for the complete release evidence mapping.\n\n## Layered retention and request automation\n\nEvery automation-bearing policy layer, including an optional request layer, must\nmatch the evaluated version. An absent request automation block adds no evaluator\nrestriction; it cannot replace the three required application/tenant/source opt-ins.\n\nAuthorized execution-policy access monotonically narrows the existing intake\nexpiry to `min(existing expires_at, item.created_at + resolved retentionMs)`.\nThe anchor is receipt creation, never review, retry or replay time. A longer later\npolicy never extends a recorded deadline. This hard maximum applies to the whole\nintake item: the existing `sweepRetention` protocol removes retained originals and\nderivatives, preserving replay identities. No second expiry column or hidden clock\nis introduced, and no blob I/O occurs in an execution transaction.\n\nAt an observed expired deadline, execution reads/completions erase proposal,\ndecision, execution, plan, action and feedback payloads under the item lock. Review\nreads return existing identity/hash fields with `state: 'expired'` and empty\n`display`; completed action replay returns its digest-only tombstone. Failed writes, including ordinary validation/CAS/policy rejection and domain\nsavepoint rollback, cannot roll back an already-authorized retention ceiling or\nredaction. Restoring a recorded authorized maximum needs no new content-read grant;\nlater revocation cannot undo it. Initial denied authorization records no intent.\nCompleted replay checks the deadline again after target authorization\ncallbacks before returning cached content. Proposal publication and automatic\nauthorization also recheck after preview/evaluator callbacks, before publishing\nretained proposal or decision payloads. Unknown\nexternal outcomes remain unknown/reconcile-only, never eligible for blind resend.\n"
|
|
1574
|
+
},
|
|
1575
|
+
{
|
|
1576
|
+
"path": "README.md",
|
|
1577
|
+
"module": "README",
|
|
1578
|
+
"content": "# @happyvertical/smrt-ingestion\n\nDurable receipt, evidence, analysis attempts and action-journal foundations for\n[ADR 0004](../../docs/adr/0004-application-aware-ingestion.md).\n\nThe root, `/models` and `/dto` entry points are browser-safe. Import\n`IngestionService` from `/server` in trusted host code. Generated REST, CLI and\nMCP access to the persistence models is disabled; hosts expose authorized DTO\nmethods through their authenticated application transport.\n\nBefore starting a service, deploy the package manifest through the public s-m-r-t\nmigration APIs or `smrt db:migrate`. `assertReady()` only checks existing tables.\nSQLite and PostgreSQL are supported; other engines fail construction.\n\nA host supplies a database, AssetRuntime, authenticated tenant/actor/confidential\nscope, a live authorization callback, a registered jobs target, and an idempotent\n`purgeDerived` callback for host-owned previews, retrieval indexes and caches.\nThe authorization callback receives the captured ceiling and the current\ntransaction executor; it must intersect current grants with that ceiling. Never\nconstruct the scope, retention policy or budgets from incoming document labels.\n\n`receive` accepts bounded original byte buffers, with stable source part IDs,\nparent relationships and optional upstream identity/version. Source adapters own\nstreaming and upstream snapshot retrieval. Receipt identity is tenant + source +\ndelivery key; changing bytes or authenticated scope conflicts. Content equality\nin a different conversation does not deduplicate an arrival. The returned item\nID and version are safe acknowledgment data, never a storage URL.\n\nStorage intents contain a stable asset ID and a public AssetStore-planned URI\nbefore byte I/O. Preservation verifies existing bytes instead of replacing them.\nA receipt becomes ready only after every part is durable and its dispatch intent\ncommits. A source retries the same receive call after failure or lost\nacknowledgment. Hosts schedule `repairDispatches` after restart and periodically;\nit repairs missing/failed queue submissions through SmrtJobCollection. The host\njob restores the captured scope and calls the analysis lifecycle methods. Run\nTaskRunner with the `ingestion` queue enabled.\n\n`analyze` appends immutable input/configuration revisions. `claimAnalysis` uses\nleases, monotonic fences and attempt budgets; `completeAnalysis` rejects expired\nor superseded workers. Terminal attempt output/provenance is preserved. Queue\nsubmission budgets also stop repeated handler failures in visible\n`needs_attention`. Reprocessing does not mint actions. `createAction`,\n`publishProposal` and `appendPlan` persist explicit intentions and exact attempt\nbindings for the later review/execution layer. They do not approve or apply\nbusiness operations. Decision/execution/feedback models are persistence\nfoundations; policy, handler expansion, review and business apply belong to the\nlater epic children.\n\n`expire` revokes access and pending work before removing bytes and calling\n`purgeDerived`. Interrupted deletion is retried by `repairDeletions` and\n`sweepRetention`. Minimal receipt/action identities remain, including successful\naction result digests; all content-bearing journal payloads are redacted. Private\ncleanup locators remain in deletion tombstones so repeated sweeps can remove a\nlate stale writer's orphan bytes even after the asset owner row is gone. Source\nadapters must enforce their configured delivery-age cutoff; expired replay IDs\nnever become fresh work. Continue running the cleanup sweep for the retained\nstorage namespace. Upstream source mutation/deletion cannot change copied\noriginals; explicit privacy deletion revokes every ingestion-derived payload and\nrequires host cache/index purge.\n\nSee [EXTRACTION.md](EXTRACTION.md) for bounded extraction, lease-bound input\nsnapshots, provider isolation requirements and the extraction corpus.\n\nValidation commands are `pnpm test`, `pnpm test:postgres`, `pnpm test:providers`, `pnpm typecheck` and\n`pnpm build` (including built browser import inspection). The PostgreSQL lane\nrequires the repository's configured database service and never silently skips.\nThe provider lane exercises local SDK adapters and process isolation; it does not\nclaim live remote recognition quality. Component, e2e and evaluation command names are reserved by the ADR and\nexplicitly unavailable until their owning children deliver the corresponding\ncapability. See the [behavior matrix](../../docs/test-matrix/3670-ingestion-foundation.md).\n\n## Authoritative review and execution\n\nConfigure `IngestionOptions.execution` for policy, immutable previews, authenticated\ndecisions and idempotent domain execution. See [execution integration](agents/execution.md)\nfor the public handler catalog, required host authorization/target locks, deployment\nmigrations and jobs continuation integration. The maintained application reference\nin `reference/handlers.ts` creates draft ContentDocuments and attaches retained\nevidence through public domain APIs; it is not a published runtime adapter.\n\n## Configured source adapters\n\nThe server entry exports `createSourceDeliveryHandler`, `EmailSourceAdapter`,\n`WatchFolderSourceAdapter`, and `createVendorWebhookHandler`. Construct a\n`SourceBinding` from authenticated host configuration: enabled flag, scoped\n`IngestionService`, stable source ID/version, captured authority ceiling,\nretention policy, allowed media types and receipt limits. Re-resolve this binding\nwhen grants/configuration change. Source payloads never supply authority.\n\nThe reference POST handler authenticates before reading bytes and requires\n`Idempotency-Key`. JSON accepts exactly `capturedAt` and one of `text`,\n`structured`, or `reference: { owner: 'asset'|'message', id, version }`.\nThe host's `snapshotReference` must authorize current ownership and return copied\nbytes; an absent snapshot fails rather than acknowledging a mutable locator.\nMultipart accepts one `file` plus `captureId` (equal to the idempotency key),\n`capturedAt`, `captureSource` (`camera`, `native_picker`, `audio`, `document`), and optional\nlowercase SHA-256 `sha256`. This reuses mobile's durable UUID Idempotency-Key,\nMIME-bearing file part and explicit capture metadata convention. Captures retain\noriginal bytes and a parent metadata evidence record. Configure both the wire\nlimit `maxRequestBytes` and receipt `maxBytes`/`maxParts`; include\n`application/json` in the media allowlist for capture/email metadata. Signature\nchecks cover PDF, TIFF, PNG/JPEG/WebP and WAV/Ogg/WebM/MP3/MP4 audio; signature\nacceptance promises preservation, not extraction support or codec validity.\n\nEmail is explicitly opt-in per configured account. `EmailSourceAdapter` takes a\n`readMessage` callback compatible with the messages owner's\n`EmailAccount.readIntakeMessage(providerLookup, maxBytes, imapIdentity?)` snapshot.\nThe provider lookup is Gmail message ID, POP3 UIDL, or IMAP RFC Message-ID; it\nis separate from the delivery dedupe key. IMAP requires `{ folder, uidValidity,\nuid }`: the method selects the mailbox and verifies UIDVALIDITY and returned UID.\nAmbiguous sender IDs resolving to another UID fail explicitly. That method connects,\nfetches the full message including actual attachment bytes, copies the bytes,\nand disconnects. Metadata-only attachments fail explicitly. It never reads an\nattachment path supplied by a provider. A host lists provider deliveries using a\nstable account-specific locator (for IMAP include folder, UIDVALIDITY and UID),\nan explicit revision, and an opaque resumable checkpoint. Same locator/revision\nwith changed bytes conflicts; an explicit new revision creates a new receipt.\nDo not use sender-controlled RFC Message-ID as the sole transport identity.\n`receiveBatch` processes in order and stops at the first failure. The host owns\ndurable checkpoint storage and commits its `acknowledge` callback only after the\nadapter has received accepted/duplicate. If checkpoint persistence fails, retry\nreturns the original receipt. Message/thread/attachment relationships are copied;\ncredentials and arbitrary headers are excluded. The ordinary `syncFrom` metadata\nsync remains separate; `hasAttachments` is never proof of byte preservation.\n\nWatch-folder intake polls only an explicitly configured existing private local\ndirectory. Producers should close their files, preferably publishing with atomic\nrename. Two unchanged size/inode/mtime/ctime observations separated by\n`stabilityMs` are required, and the interval runs again after claim/restart.\nA private `.ingestion-claims/<UUID>/claim.json` intent is synced before atomically\nrenaming the original into that directory. Keep the directory on one filesystem,\nunder the host's ownership; symlink inputs are refused. A file descriptor still\nheld by an uncooperative producer can write after any stability window, so the\nproducer close/publish protocol is required for immutable input. Accepted or\nduplicate receipts move the entire claim to `.ingestion-processed`; do not delete\nclaims to retry. Polling recovers persisted UUIDs after process death, so receipt\nreplay deduplicates ready-without-ack. `failure.json` and poll results expose safe\ncategories while originals remain available. Intent directories without an\noriginal mean death before claim or a competing poll won; the producer original\nhas not been removed. Operators may remove these empty intents after confirming\nno active importer. Keep processed originals according to the host's retention\npolicy. This adapter does not watch arbitrary paths or start background loops.\n\nVendor webhooks use a host `verify(request, originalBytes)` callback after bounded\nraw-body reading. The callback must verify signature, delivery time/replay window\nand account ownership, then return trusted binding and durable delivery identity.\nNo vendor implementation or hardware driver is selected. All adapters invoke\nonly receipt preservation, never domain writes, AI tools or external actions.\n\nSee [PROPOSALS.md](PROPOSALS.md) for bounded application catalog discovery, durable\ninterpretation revisions, optional typed decisions and explicit generated preview.\n"
|
|
1579
|
+
},
|
|
1580
|
+
{
|
|
1581
|
+
"path": "EXTRACTION.md",
|
|
1582
|
+
"module": "EXTRACTION",
|
|
1583
|
+
"content": "# Extraction adapters\n\n`@happyvertical/smrt-ingestion/server` exports `createSDKExtractionAdapter`,\n`extractAnalysis`, extraction types, and `proposeDocumentSplits`. Root and DTO\nexports remain browser-safe. No extraction result authorizes a business action.\n\nHosts construct the SDK adapter with explicit provider/model/version identities\n(`unknown` for unavailable model/version), credential-bearing SDK options, and\n`nativeMemoryIsolation: 'host-enforced'`. This last setting is an assertion by\ntrusted deployment configuration, never a source/body/client option. Deploy the\nprovider child under an OS/container native-memory ceiling. Node's heap limit\ncannot bound native allocations, and PDF's renderer has no pre-render pixel\nlimit. Without that host guarantee, adapter construction refuses to run. A\nconfigured provider must be pinned, not `auto`; OCR fallback is disabled so\ncapability provenance cannot silently change. Identity objects are projected onto\nexactly `provider`, `model`, and `version`, each a required nonblank string. Extra\nhost fields never enter capability or segment identities, including through\ntrusted custom adapter results at the publication boundary.\n\nThe adapter forks one disposable Node process per retained part. Deadline or\ncancellation kills it (and its process group on POSIX); provider stdout/stderr\nare discarded. Calls are sequential and bounded by input bytes, page count,\nimage decode pixels, serialized output, vision tokens, elapsed time and Node\nheap. Native memory remains the host boundary described above. Remote compute\nalready accepted by a provider may continue/bill after the local process dies.\nDo not interpret a local cancellation as remote billing cancellation.\n\nPersist `{extraction: {configurationRevision, limits}}` using `service.analyze`,\nthen claim its lease. Call `extractAnalysis(service, lease, adapter, options)`\nwith exactly that revision and limits. The service reloads the immutable input\nsnapshot and rechecks current processing authority before each provider and\nbefore publication. The production child requests a parent-side authorization\nhandshake before each PDF/OCR/vision/speech operation, including calls on later\npages. Denial kills the child; already transmitted material cannot be recalled.\nCustom trusted adapters must await `request.beforeProviderCall` before every\nprovider invocation. Bytes are read through the service's integrity-checked\nreader; revoked, expired, foreign-scope, forged and stale leases fail closed.\nA retry keeps the same analysis input revision; changed provider/model/options\nmust use a new configuration revision and `analyze` request key. Credentials are\nnever placed in persisted configuration or provider identity.\n\nResults retain the original evidence ID/hash/part/parent references. Ordered\nsegments form whole-document context; extraction does not split originals into\nbusiness records. Valid UTF-8 JSON, text and HTML remain literal source text (render HTML\nonly through an application sanitizer). JSON syntax is validated without rewriting\nits source text; malformed JSON or UTF-8 fails extraction. PDF text is extracted one page at a\ntime, falling back to actual rendered-page OCR for empty pages. Embedded text\nis not evidence that every visual element was understood. TIFF is actually\ndecoded page-by-page with sharp to PNG; each result cites its original TIFF page.\nAnimated non-TIFF images are unsupported. Ordinary image OCR and scene vision\nare separately configured. Speech uses source-level text unless actual segment\ntimestamps are returned; absent speech confidence calibration is unknown.\n\nConfidence and boxes are explicitly null unless an OCR provider advertises and\nreturns them. Unlimited-OCR's synthetic common confidence is always discarded,\neven if an injected capability claims otherwise. Measured OCR values retain an\nunknown calibration label; they are not routing certainty or approval. Boxes\nare in decoded image pixels, attached only to that actual page/source. No tables\nare invented: the current PDF/OCR text APIs do not supply a table contract.\n\nThe persisted receipt's `maxOutputBytes`, exposed by `getAnalysisInput`, bounds\nthe complete serialized analysis envelope across all parts, including provenance,\ncapabilities, usage, and failure metadata. Extraction reserves room for a `limit`\noutcome and retains fitting earlier parts/segments when the aggregate is too\nlarge. Top-level `truncated` and `omittedEvidenceCount` identify publication\nomissions; per-result omissions retain every discarded segment's exact page or\ntime location. Existing errors and omitted ranges survive trimming unchanged.\nIf those diagnostic records cannot fit, the entire result is omitted rather than\npublishing an incomplete account of its known failures. If the ceiling\ncannot fit the minimum result envelope, no provider runs: `failAnalysis` records\nonly a fixed safe category and terminal lifecycle state, with no provider output\nor output digest. That service-owned failure accounting is outside the provider\npayload budget; `completeAnalysis` never accepts an oversized result.\n\nPartial page results survive later failures or process timeout. Warnings and\nomitted page/source references remain inspectable. `unsupported_type` covers\nvideo, unconfigured media and encrypted PDF; corrupt decoder failures without a\nsafe typed SDK category are `unavailable`, never raw exception strings. A host\ncan repair/reconfigure and create a fresh analysis without rewriting originals.\n`proposeDocumentSplits` produces a hashed, versioned, non-executable grouping of\nobserved pages; overlap, unordered groups and nonexistent pages are rejected.\n\n## Evidence and limitations\n\n`pnpm --filter @happyvertical/smrt-ingestion test:providers` runs actual local PDF\nSDK extraction, actual sharp multipage TIFF decoding, and packaged process/HTTP\nadapter lifecycle tests. The local speech server tests adapter transport and\ntermination, not transcription quality. The tiny TIFF fixture proves IFD/page\nmapping, not fax OCR accuracy. `extraction.test.ts` injects deterministic SDK\nboundaries for mixed/scanned PDF, Unlimited-OCR, camera observations, message\nattachments, audio timestamps and malformed/partial output. These fixtures are\nnot real remote-provider integrations and are not the ADR evaluation corpus.\n\nNo live Unlimited-OCR, speech recognition or vision quality run is claimed.\nNo recorded-human-audio recognition accuracy, real camera-scene quality,\ncalibrated confidence, table extraction, or automatic-action acceptance is\nestablished by these tests. Deployment owners must run the intended provider,\nmodel and representative retained corpus before making those claims. The\n[behavior matrix](../../docs/test-matrix/3672-ingestion-extraction.md) records the\nrelease commands and authority obligations.\n\nThe versioned on-disk corpus manifest records exact hashes for valid embedded,\nraster and mixed PDFs, two-page TIFF, a synthetic camera-format JPEG, a valid\nPCM WAV recording of a generated tone, email text, corrupt PDF and unsupported\nvideo. The tone is not human speech; the illustrated scene is not a photograph.\nReal local HTTP fixture runs execute Unlimited-OCR's installed SDK and speech\ntransport against deterministic responses/timeouts. They verify adapters, not\nremote models. Unlimited-OCR 0.61.6 rejects valid encoded images smaller than\n100 bytes; ingestion reports `unavailable` without altering them. This owning\nSDK defect is tracked in [happyvertical/ocr#143](https://github.com/happyvertical/ocr/issues/143).\n\nEach capability record explicitly reports `truncation` and `usage` as `unknown`\nor `reported`. Unlimited-OCR's current SDK discards upstream `finish_reason`\nand token usage, so both are `unknown` even for nonempty output. Downstream\nrules must not interpret `status: 'complete'` or `truncated: false` as proof of\nuntruncated OCR: they describe completed input processing and *detected*\ntruncation only. The adapter never bypasses the SDK to recover hidden fields.\nThe missing SDK metadata is tracked in [happyvertical/ocr#144](https://github.com/happyvertical/ocr/issues/144).\nAI vision retains reported truncation when supplied by its SDK. Missing provider\ncost is unknown, not zero; no cost estimate is invented.\n"
|
|
1584
|
+
},
|
|
1585
|
+
{
|
|
1586
|
+
"path": "PROPOSALS.md",
|
|
1587
|
+
"module": "PROPOSALS",
|
|
1588
|
+
"content": "# Application-aware proposal generation\n\n`@happyvertical/smrt-ingestion/proposals` is server-only. Configure\n`IngestionOptions.proposals` and the existing `execution.handlers` catalog.\nHandlers opt into discovery with `discovery.mediaTypes`, `references`, and an\noptional `candidates` callback. There is one catalog: the same operation or\nordered playbook adapter is discovered, validated, previewed, and later applied\nby the execution service. Generation never approves or applies.\n\n## Discovery and authority\n\n`listHandlers(itemId)` returns a bounded detached catalog. The owning execution\nservice checks the current principal, captured permissions/handler/operation\nceiling, policy, confidential scope, public registered operation facts, and\nordered playbook definition. Every configured provider must occur in the current\npolicy's `providers` allowlist. Missing grants remove handlers before model input.\nAn authorized catalog larger than the configured bound is rejected; the host must\nnarrow it explicitly instead of relying on silent truncation.\n\n`findCandidates({itemId,handlerId,handlerVersion,query,limit})` returns\n`{items,truncated}`. Its trusted handler callback receives `HandlerContext` with\nthe authorized transaction executor. Query by tenant and confidential scope\n**before** selecting, ranking, or building labels. Use a bounded query (often\n`limit + 1`) and report `hasMore`. The service projects candidate identity, model,\nrevision and label, then checks every target with the owning execution callback.\nThere are no hidden counts or pagination tokens. Truncated discovery forces\n`needs_review` and cannot enter generated preview.\n\nCompleted generation reload checks process authority, the current attempt, and\nowner/candidate visibility in the same final transaction. Database-backed grant\ncallbacks must use the supplied executor. The owning retention lifecycle encloses\nthat transaction so a denied read cannot roll back an authorized shorter privacy\nceiling; restoration starts only after the outer transaction has rolled back.\n\nCandidate callbacks perform bounded database reads only: no provider I/O, network,\nor domain mutations. Target locks and existing retention enforcement remain\nowned by execution. Hosts configure their database's statement deadlines; an\narbitrary trusted callback is not a sandbox. Each existing-record argument must\nbe a declared top-level `references` field of kind `candidate` with its qualified\nmodel, or `evidence`. Closed JSON argument schemas are required. The host owns\nthat declaration and its target authorization semantics.\n\n## Durable stages\n\n1. Complete extraction through the existing analysis ledger.\n2. Call `prepareGeneration(itemId, extractionAttemptId)`. It reads the current\n completed/partial immutable extraction and returns configuration with\n `stage: 'interpret'`, pinned source attempt/revision/input/output/evidence\n digests, prompt/configuration/catalog/provider versions, limits and thresholds.\n3. Pass that configuration to `analyze(itemId, configuration, requestKey)` and\n claim its new revision with `claimAnalysis`.\n4. The host's existing job callback routes on the frozen `configuration.stage`:\n extraction invokes `extractAnalysis`; interpretation invokes\n `generateProposals(lease)`.\n5. Reload the current completed generation using `getCompletedAnalysis(itemId)`,\n or pass an explicit attempt ID to additionally reject stale client state.\n Queued/running revisions never return an older completed attempt.\n\nA generation revision does not rewrite terminal extraction. Reprocessing starts\nwith a new extraction revision, followed by interpretation, while the host keeps\nthe same business intention keys. An interrupted still-current generation lease\ncan be retried; terminal generation output remains immutable. `getGenerationInput`\nreads historical extraction only through the current generation lease and its\nfrozen source pin. It verifies same-item scope, immutable hashes, durable evidence,\nand current process permission before returning detached data. The source must be\nthe immediately preceding revision, so an intervening reprocess invalidates a\nprepared generation. Completed generation reads additionally recheck current\ncatalog and target visibility before disclosing persisted candidate labels.\nExpired, cancelled, revoked, retried or superseded workers cannot read or publish late output. The\ncurrent lease and each offered handler/candidate are rechecked immediately before\neach outbound generative/decision boundary and before publication.\n\n## Providers and validation\n\n`createSDKProposalGenerator(client, identity, {maxTokens,timeoutMs})` uses an\nexisting AI SDK `chat` client. It sends a fixed system instruction and separate\nJSON evidence/catalog data, requests JSON, supplies cancellation and bounds, uses\nno tools or continuation, and rejects known truncation or tool calls,\nunexpected models, malformed JSON and oversized output. Configure SDK clients\nwithout automatic retry that would bypass application boundary checks. The\nadapter's public identity is exactly provider/model/version; credentials and raw\nprovider errors are never provenance.\n\nA trusted custom `ProposalGenerator` must likewise honor cancellation, bound its\nresponse, and explicitly declare validated `complete` or `unknown` completion.\nThe SDK currently normalizes missing/unknown finish reasons to `stop`\n([owning SDK follow-up](https://github.com/happyvertical/sdk/issues/1381)), so its\nadapter conservatively declares `unknown`, persisted as\n`generation_completion_unknown`. Otherwise valid suggestions remain available\nfor human preview; automatic eligibility always remains false. The service\ndeadline aborts requests and prevents late publication; it does not claim to terminate computation at a remote\nprovider or isolate native allocations. Extractor process limits remain separate.\n\nModel output can contain only offered handler versions, schema-valid arguments,\nretained evidence locations and offered alternative handler/candidate keys.\nCandidate IDs must occur in the offered set, and evidence IDs in retained source\nresults. Unknown enums, invented IDs, extra authority/tool/approval fields and\nmalformed structures fail closed. Missing required top-level fields are retained\nas `missingFields`, with `needs_review`; values are never invented to satisfy a\nschema. Observed page/time/source granularity is preserved. Logical scan splits\nuse `proposeDocumentSplits`; originals and hashes remain intact.\n\n`createSDKProposalDecisionClient(client)` adapts an existing SDK client’s optional\ncapability without changing its errors or protocol. Optional `decision` uses public core `executeDecision` and the existing SDK\npredicate, choice, score and batch contracts. Supported-effect predicates,\nhandler classification, candidate entity matching, and action ambiguity/risk\nare distinct questions. Their validated probabilities and provenance are stored\nseparately from generative provenance and unknown OCR certainty. The complete\nserialized decision request, including suggestions and questions, must fit the\nminimum configured/current policy byte ceiling before capability probing and\nagain before deciding. A policy change between these boundaries fails closed.\nTies, support probability or selected-handler confidence below\n`minimumDecisionProbability`, and actually incomplete extraction require review.\nUnknown provider\ncompletion metadata is preserved as `source_completion_unknown`; it does not\nblock otherwise schema-valid **human** preview or imply completeness. Automatic\naction eligibility remains false. An unconfigured decision path\nis recorded explicitly. Configured errors produce a durable safe failure outcome;\nthey never silently switch to a generative decision fallback.\n\nOutput records zero, one or multiple suggestions, alternatives, missing fields,\nsource links, proposed splits, versions, allowlisted usage, warnings and explicit\n`unknown`, `ambiguous`, `no_action`, `needs_review` or `provider_error` outcomes.\n`automaticActionEligible` is always false. Provider input/output and the complete\nserialized persisted envelope are bounded by configuration, live policy and the\nreceipt ceiling. Oversized output becomes a bounded review/limit result; when\nno safe envelope fits, the owning service records fixed `failAnalysis` metadata\noutside the provider payload budget without retaining provider output.\n\n## Explicit preview and stable intentions\n\nThe host chooses persisted suggestion indexes and calls:\n\n```ts\nawait service.previewGeneratedProposals({\n itemId,\n attemptId: generationAttemptId,\n selections: [{\n index: 0,\n intentionKey: 'document:meeting-2026-10-09',\n expectedRevision: 0,\n requestId: 'review-request-1',\n }],\n});\n```\n\n`intentionKey` is the host's stable business-intention identity across generation\nrevisions. Never derive a fresh key from model output, suggestion order or a retry.\nSelections must reference current persisted validated `ready_for_review` output.\nEach batch requires distinct suggestion indexes and intention keys; duplicate\nindexes are rejected before any operation or plan preview is written.\nThe service rechecks current catalog/schema/target/source provenance, then calls\nthe existing operation or plan preview. Each result still requires the ordinary\nhuman review and execution APIs. Reprocessing creates no new business identity;\nsuccessful-action replay protection stays with execution.\n\n## Evidence and limits\n\nThe test matrix is `docs/test-matrix/3673-ingestion-proposals.md`. SQLite and real\nPostgreSQL suites exercise authority, revisions, abstention, hostile output,\ncompound proposals, split provenance and reviewed domain effects. The upload\nreference composes authenticated multipart delivery of a generated embedded-text\nPDF through the actual packaged PDF child, durable interpretation, and the existing\nordered ContentDocument draft/retained-asset plan. It checks duplicate delivery,\nunauthenticated and foreign-tenant denial, explicit approval of both steps,\nidempotent execution replay, page provenance, and unchanged original bytes.\nThe compound-email case uses a declared messages-owner snapshot fixture.\n\nLocal HTTP fixtures execute the actual AI SDK transport and cancellation contract.\nGenerative responses and the separate injected PDF split boundaries establish\ndeterministic orchestration, not model accuracy or OCR quality. No held-out routing\nevaluation or automatic approval is claimed. Missing/unknown AI completion remains\nexplicit under [SDK #1381](https://github.com/happyvertical/sdk/issues/1381).\n"
|
|
1589
|
+
}
|
|
1590
|
+
],
|
|
1591
|
+
"agentSurface": {
|
|
1592
|
+
"intents": [],
|
|
1593
|
+
"playbooks": [],
|
|
1594
|
+
"diagnostics": [
|
|
1595
|
+
{
|
|
1596
|
+
"code": "not-module-scope",
|
|
1597
|
+
"helper": "definePlaybook",
|
|
1598
|
+
"message": "`definePlaybook()` must be called at module scope to be emitted into the manifest and knowledge graph. A declaration the scanner cannot read without evaluating it is not emittable — use `useWebMcpTool` for a tool set derived from computed or fetched data.",
|
|
1599
|
+
"line": 316,
|
|
1600
|
+
"column": 7,
|
|
1601
|
+
"sourceFile": "src/test-support/execution.ts"
|
|
1602
|
+
},
|
|
1603
|
+
{
|
|
1604
|
+
"code": "not-module-scope",
|
|
1605
|
+
"helper": "definePlaybook",
|
|
1606
|
+
"message": "`definePlaybook()` must be called at module scope to be emitted into the manifest and knowledge graph. A declaration the scanner cannot read without evaluating it is not emittable — use `useWebMcpTool` for a tool set derived from computed or fetched data.",
|
|
1607
|
+
"line": 1761,
|
|
1608
|
+
"column": 9,
|
|
1609
|
+
"sourceFile": "src/test-support/execution.ts"
|
|
1610
|
+
},
|
|
1611
|
+
{
|
|
1612
|
+
"code": "not-module-scope",
|
|
1613
|
+
"helper": "definePlaybook",
|
|
1614
|
+
"message": "`definePlaybook()` must be called at module scope to be emitted into the manifest and knowledge graph. A declaration the scanner cannot read without evaluating it is not emittable — use `useWebMcpTool` for a tool set derived from computed or fetched data.",
|
|
1615
|
+
"line": 1535,
|
|
1616
|
+
"column": 7,
|
|
1617
|
+
"sourceFile": "src/test-support/proposals.ts"
|
|
1618
|
+
}
|
|
1619
|
+
]
|
|
1620
|
+
}
|
|
1621
|
+
}
|