@happyvertical/smrt-ingestion 0.61.3 → 0.61.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/manifest.json +991 -507
- package/dist/models.d.ts.map +1 -1
- package/dist/models.js +173 -114
- package/dist/models.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +2 -2
- package/dist/server.js.map +1 -1
- package/dist/smrt-knowledge.json +17 -17
- package/package.json +17 -17
package/dist/models.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ObjectRegistry, SmrtObject, crossPackageRef, field, foreignKey, smrt } from "@happyvertical/smrt-core";
|
|
2
2
|
import { TenantScoped, tenantId } from "@happyvertical/smrt-tenancy";
|
|
3
3
|
//#region src/__smrt-register__.ts
|
|
4
|
-
ObjectRegistry.registerPackageManifest(JSON.parse(`{"version":"1.0.0","timestamp":0,"packageName":"@happyvertical/smrt-ingestion","packageVersion":"0.61.3","objects":{"@happyvertical/smrt-ingestion:IntakeItem":{"name":"intakeitem","className":"IntakeItem","qualifiedName":"@happyvertical/smrt-ingestion:IntakeItem","collection":"intakeitems","description":"Durable IntakeItem record; mutations belong to the server service.","filePath":"/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts","packageName":"@happyvertical/smrt-ingestion","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"confidentialScopeId":{"type":"text","required":true,"_meta":{"required":true}},"sourceId":{"type":"text","required":true,"_meta":{"required":true}},"sourceVersion":{"type":"text","required":true,"_meta":{"required":true}},"deliveryKey":{"type":"text","required":true,"_meta":{"required":true}},"payloadDigest":{"type":"text","required":true,"_meta":{"required":true}},"scopeDigest":{"type":"text","required":true,"_meta":{"required":true}},"receiptState":{"type":"text","required":true,"_meta":{"required":true}},"processingState":{"type":"text","required":true,"_meta":{"required":true}},"visibility":{"type":"text","required":true,"_meta":{"required":true}},"receiptVersion":{"type":"integer","required":true,"_meta":{"required":true}},"analysisRevision":{"type":"integer","required":true,"_meta":{"required":true}},"fence":{"type":"integer","required":true,"_meta":{"required":true}},"leaseToken":{"type":"text","required":true,"_meta":{"required":true}},"leaseUntil":{"type":"datetime","required":false,"_meta":{"nullable":true}},"expiresAt":{"type":"datetime","required":true,"_meta":{"required":true}},"replayUntil":{"type":"datetime","required":true,"_meta":{"required":true}},"cancelled":{"type":"boolean","required":true,"_meta":{"required":true}},"traceId":{"type":"text","required":true,"_meta":{"required":true}},"submitterId":{"type":"text","required":true,"default":"","_meta":{"required":true,"default":""}},"ownerKey":{"type":"text","required":true,"default":"","_meta":{"required":true,"default":""}},"data":{"type":"json","required":true,"_meta":{"required":true}}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_items","conflictColumns":["tenant_id","source_id","delivery_key"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_items_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_items_expiry_idx","columns":["tenantId","expiresAt"]},{"name":"intake_items_receipt_idx","columns":["tenantId","receiptState","leaseUntil"]},{"name":"intake_items_submitter_idx","columns":["tenantId","submitterId"]},{"name":"intake_items_owner_idx","columns":["tenantId","ownerKey"]},{"name":"intake_items_received_idx","columns":["tenantId","confidentialScopeId","createdAt","id"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeItem","collectionExportName":"IntakeItemCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"sourceId","rule":"required","fieldType":"text"},{"field":"sourceVersion","rule":"required","fieldType":"text"},{"field":"deliveryKey","rule":"required","fieldType":"text"},{"field":"payloadDigest","rule":"required","fieldType":"text"},{"field":"scopeDigest","rule":"required","fieldType":"text"},{"field":"receiptState","rule":"required","fieldType":"text"},{"field":"processingState","rule":"required","fieldType":"text"},{"field":"visibility","rule":"required","fieldType":"text"},{"field":"receiptVersion","rule":"required","fieldType":"integer"},{"field":"analysisRevision","rule":"required","fieldType":"integer"},{"field":"fence","rule":"required","fieldType":"integer"},{"field":"leaseToken","rule":"required","fieldType":"text"},{"field":"expiresAt","rule":"required","fieldType":"datetime"},{"field":"replayUntil","rule":"required","fieldType":"datetime"},{"field":"cancelled","rule":"required","fieldType":"boolean"},{"field":"traceId","rule":"required","fieldType":"text"},{"field":"submitterId","rule":"required","fieldType":"text"},{"field":"ownerKey","rule":"required","fieldType":"text"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_items","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_items\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\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 \\"submitter_id\\" TEXT NOT NULL DEFAULT '',\\n \\"owner_key\\" TEXT NOT NULL DEFAULT '',\\n \\"data\\" JSON NOT NULL\\n);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"source_id":{"type":"TEXT","notNull":true,"unique":false},"source_version":{"type":"TEXT","notNull":true,"unique":false},"delivery_key":{"type":"TEXT","notNull":true,"unique":false},"payload_digest":{"type":"TEXT","notNull":true,"unique":false},"scope_digest":{"type":"TEXT","notNull":true,"unique":false},"receipt_state":{"type":"TEXT","notNull":true,"unique":false},"processing_state":{"type":"TEXT","notNull":true,"unique":false},"visibility":{"type":"TEXT","notNull":true,"unique":false},"receipt_version":{"type":"INTEGER","notNull":true,"unique":false},"analysis_revision":{"type":"INTEGER","notNull":true,"unique":false},"fence":{"type":"INTEGER","notNull":true,"unique":false},"lease_token":{"type":"TEXT","notNull":true,"unique":false},"lease_until":{"type":"TIMESTAMP","notNull":false,"unique":false},"expires_at":{"type":"TIMESTAMP","notNull":true,"unique":false},"replay_until":{"type":"TIMESTAMP","notNull":true,"unique":false},"cancelled":{"type":"BOOLEAN","notNull":true,"unique":false},"trace_id":{"type":"TEXT","notNull":true,"unique":false},"submitter_id":{"type":"TEXT","notNull":true,"unique":false,"default":""},"owner_key":{"type":"TEXT","notNull":true,"unique":false,"default":""},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_items_tenant_id_source_id_idx","columns":["tenant_id","source_id","delivery_key"],"unique":true},{"name":"intake_items_slug_context_idx","columns":["slug","context"]},{"name":"intake_items_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_items_expiry_idx","columns":["tenant_id","expires_at"]},{"name":"intake_items_receipt_idx","columns":["tenant_id","receipt_state","lease_until"]},{"name":"intake_items_submitter_idx","columns":["tenant_id","submitter_id"]},{"name":"intake_items_owner_idx","columns":["tenant_id","owner_key"]},{"name":"intake_items_received_idx","columns":["tenant_id","confidential_scope_id","created_at","id"]},{"name":"intake_items_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"2d9cb693"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakeEvidence":{"name":"intakeevidence","className":"IntakeEvidence","qualifiedName":"@happyvertical/smrt-ingestion:IntakeEvidence","collection":"intakeevidences","description":"Durable IntakeEvidence record; mutations belong to the server service.","filePath":"/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts","packageName":"@happyvertical/smrt-ingestion","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"confidentialScopeId":{"type":"text","required":true,"_meta":{"required":true}},"itemId":{"type":"foreignKey","required":true,"related":"IntakeItem","_meta":{"required":true}},"partId":{"type":"text","required":true,"_meta":{"required":true}},"parentEvidenceId":{"type":"foreignKey","required":false,"related":"IntakeEvidence","_meta":{"nullable":true}},"assetId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-assets:Asset","_meta":{"nullable":true,"onDelete":"SET NULL"}},"state":{"type":"text","required":true,"_meta":{"required":true}},"contentHash":{"type":"text","required":true,"_meta":{"required":true}},"byteLength":{"type":"integer","required":true,"_meta":{"required":true}},"mediaType":{"type":"text","required":true,"_meta":{"required":true}},"sourceUri":{"type":"text","required":true,"_meta":{"required":true}},"data":{"type":"json","required":true,"_meta":{"required":true}}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_evidence","conflictColumns":["tenant_id","item_id","part_id"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_evidence_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_evidence_item_idx","columns":["tenantId","itemId"]},{"name":"intake_evidence_state_idx","columns":["tenantId","state"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeEvidence","collectionExportName":"IntakeEvidenceCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"partId","rule":"required","fieldType":"text"},{"field":"state","rule":"required","fieldType":"text"},{"field":"contentHash","rule":"required","fieldType":"text"},{"field":"byteLength","rule":"required","fieldType":"integer"},{"field":"mediaType","rule":"required","fieldType":"text"},{"field":"sourceUri","rule":"required","fieldType":"text"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_evidence","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_evidence\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\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);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"part_id":{"type":"TEXT","notNull":true,"unique":false},"parent_evidence_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"intake_evidence","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"state":{"type":"TEXT","notNull":true,"unique":false},"content_hash":{"type":"TEXT","notNull":true,"unique":false},"byte_length":{"type":"INTEGER","notNull":true,"unique":false},"media_type":{"type":"TEXT","notNull":true,"unique":false},"source_uri":{"type":"TEXT","notNull":true,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_evidence_tenant_id_item_id_idx","columns":["tenant_id","item_id","part_id"],"unique":true},{"name":"intake_evidence_slug_context_idx","columns":["slug","context"]},{"name":"intake_evidence_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_evidence_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_evidence_state_idx","columns":["tenant_id","state"]},{"name":"intake_evidence_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_evidence_item_id_idx","columns":["item_id"]},{"name":"intake_evidence_parent_evidence_id_idx","columns":["parent_evidence_id"]},{"name":"intake_evidence_asset_id_idx","columns":["asset_id"]}],"version":"41d279e4"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakeAnalysis":{"name":"intakeanalysis","className":"IntakeAnalysis","qualifiedName":"@happyvertical/smrt-ingestion:IntakeAnalysis","collection":"intakeanalysises","description":"Durable IntakeAnalysis record; mutations belong to the server service.","filePath":"/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts","packageName":"@happyvertical/smrt-ingestion","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"confidentialScopeId":{"type":"text","required":true,"_meta":{"required":true}},"itemId":{"type":"foreignKey","required":true,"related":"IntakeItem","_meta":{"required":true}},"revision":{"type":"integer","required":true,"_meta":{"required":true}},"fence":{"type":"integer","required":true,"_meta":{"required":true}},"attemptNumber":{"type":"integer","required":true,"_meta":{"required":true}},"currentAttemptId":{"type":"foreignKey","required":false,"related":"IntakeAnalysisAttempt","_meta":{"nullable":true}},"state":{"type":"text","required":true,"_meta":{"required":true}},"inputDigest":{"type":"text","required":true,"_meta":{"required":true}},"data":{"type":"json","required":true,"_meta":{"required":true}}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_analyses","conflictColumns":["tenant_id","item_id","revision"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_analyses_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_analyses_item_idx","columns":["tenantId","itemId"]},{"name":"intake_analyses_state_idx","columns":["tenantId","state"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeAnalysis","collectionExportName":"IntakeAnalysisCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"revision","rule":"required","fieldType":"integer"},{"field":"fence","rule":"required","fieldType":"integer"},{"field":"attemptNumber","rule":"required","fieldType":"integer"},{"field":"state","rule":"required","fieldType":"text"},{"field":"inputDigest","rule":"required","fieldType":"text"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_analyses","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_analyses\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\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);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"revision":{"type":"INTEGER","notNull":true,"unique":false},"fence":{"type":"INTEGER","notNull":true,"unique":false},"attempt_number":{"type":"INTEGER","notNull":true,"unique":false},"current_attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"intake_analysis_attempts","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"state":{"type":"TEXT","notNull":true,"unique":false},"input_digest":{"type":"TEXT","notNull":true,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_analyses_tenant_id_item_id_idx","columns":["tenant_id","item_id","revision"],"unique":true},{"name":"intake_analyses_slug_context_idx","columns":["slug","context"]},{"name":"intake_analyses_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_analyses_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_analyses_state_idx","columns":["tenant_id","state"]},{"name":"intake_analyses_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_analyses_item_id_idx","columns":["item_id"]},{"name":"intake_analyses_current_attempt_id_idx","columns":["current_attempt_id"]}],"version":"0e285327"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakeAnalysisAttempt":{"name":"intakeanalysisattempt","className":"IntakeAnalysisAttempt","qualifiedName":"@happyvertical/smrt-ingestion:IntakeAnalysisAttempt","collection":"intakeanalysisattempts","description":"Durable IntakeAnalysisAttempt record; mutations belong to the server service.","filePath":"/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts","packageName":"@happyvertical/smrt-ingestion","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"confidentialScopeId":{"type":"text","required":true,"_meta":{"required":true}},"itemId":{"type":"foreignKey","required":true,"related":"IntakeItem","_meta":{"required":true}},"analysisId":{"type":"foreignKey","required":true,"related":"IntakeAnalysis","_meta":{"required":true}},"attemptNumber":{"type":"integer","required":true,"_meta":{"required":true}},"fence":{"type":"integer","required":true,"_meta":{"required":true}},"state":{"type":"text","required":true,"_meta":{"required":true}},"leaseToken":{"type":"text","required":true,"_meta":{"required":true}},"leaseUntil":{"type":"datetime","required":false,"_meta":{"nullable":true}},"outputDigest":{"type":"text","required":true,"_meta":{"required":true}},"safeError":{"type":"text","required":true,"_meta":{"required":true}},"confidence":{"type":"decimal","required":false,"_meta":{"nullable":true}},"data":{"type":"json","required":true,"_meta":{"required":true}}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_analysis_attempts","conflictColumns":["tenant_id","analysis_id","attempt_number"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_analysis_attempts_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_analysis_attempts_item_idx","columns":["tenantId","itemId"]},{"name":"intake_analysis_attempts_state_idx","columns":["tenantId","state"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeAnalysisAttempt","collectionExportName":"IntakeAnalysisAttemptCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"analysisId","rule":"required","fieldType":"foreignKey"},{"field":"attemptNumber","rule":"required","fieldType":"integer"},{"field":"fence","rule":"required","fieldType":"integer"},{"field":"state","rule":"required","fieldType":"text"},{"field":"leaseToken","rule":"required","fieldType":"text"},{"field":"outputDigest","rule":"required","fieldType":"text"},{"field":"safeError","rule":"required","fieldType":"text"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_analysis_attempts","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_analysis_attempts\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\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);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"analysis_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_analyses","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"attempt_number":{"type":"INTEGER","notNull":true,"unique":false},"fence":{"type":"INTEGER","notNull":true,"unique":false},"state":{"type":"TEXT","notNull":true,"unique":false},"lease_token":{"type":"TEXT","notNull":true,"unique":false},"lease_until":{"type":"TIMESTAMP","notNull":false,"unique":false},"output_digest":{"type":"TEXT","notNull":true,"unique":false},"safe_error":{"type":"TEXT","notNull":true,"unique":false},"confidence":{"type":"REAL","notNull":false,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_analysis_attempts_tenant_id_analysis_id_idx","columns":["tenant_id","analysis_id","attempt_number"],"unique":true},{"name":"intake_analysis_attempts_slug_context_idx","columns":["slug","context"]},{"name":"intake_analysis_attempts_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_analysis_attempts_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_analysis_attempts_state_idx","columns":["tenant_id","state"]},{"name":"intake_analysis_attempts_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_analysis_attempts_item_id_idx","columns":["item_id"]},{"name":"intake_analysis_attempts_analysis_id_idx","columns":["analysis_id"]}],"version":"47007a82"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakePlan":{"name":"intakeplan","className":"IntakePlan","qualifiedName":"@happyvertical/smrt-ingestion:IntakePlan","collection":"intakeplans","description":"Durable IntakePlan record; mutations belong to the server service.","filePath":"/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts","packageName":"@happyvertical/smrt-ingestion","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"confidentialScopeId":{"type":"text","required":true,"_meta":{"required":true}},"itemId":{"type":"foreignKey","required":true,"related":"IntakeItem","_meta":{"required":true}},"planKey":{"type":"text","required":true,"_meta":{"required":true}},"revision":{"type":"integer","required":true,"_meta":{"required":true}},"digest":{"type":"text","required":true,"_meta":{"required":true}},"data":{"type":"json","required":true,"_meta":{"required":true}}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_plans","conflictColumns":["tenant_id","item_id","plan_key","revision"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_plans_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_plans_item_idx","columns":["tenantId","itemId"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakePlan","collectionExportName":"IntakePlanCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"planKey","rule":"required","fieldType":"text"},{"field":"revision","rule":"required","fieldType":"integer"},{"field":"digest","rule":"required","fieldType":"text"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_plans","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_plans\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\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);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"plan_key":{"type":"TEXT","notNull":true,"unique":false},"revision":{"type":"INTEGER","notNull":true,"unique":false},"digest":{"type":"TEXT","notNull":true,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_plans_tenant_id_item_id_idx","columns":["tenant_id","item_id","plan_key","revision"],"unique":true},{"name":"intake_plans_slug_context_idx","columns":["slug","context"]},{"name":"intake_plans_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_plans_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_plans_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_plans_item_id_idx","columns":["item_id"]}],"version":"2efbbcdc"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakeAction":{"name":"intakeaction","className":"IntakeAction","qualifiedName":"@happyvertical/smrt-ingestion:IntakeAction","collection":"intakeactions","description":"Durable IntakeAction record; mutations belong to the server service.","filePath":"/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts","packageName":"@happyvertical/smrt-ingestion","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"confidentialScopeId":{"type":"text","required":true,"_meta":{"required":true}},"itemId":{"type":"foreignKey","required":true,"related":"IntakeItem","_meta":{"required":true}},"actionKey":{"type":"text","required":true,"_meta":{"required":true}},"state":{"type":"text","required":true,"_meta":{"required":true}},"proposalRevision":{"type":"integer","required":true,"_meta":{"required":true}},"reviewVersion":{"type":"integer","required":true,"_meta":{"required":true}},"executionAttempt":{"type":"integer","required":true,"_meta":{"required":true}},"fence":{"type":"integer","required":true,"_meta":{"required":true}},"resultDigest":{"type":"text","required":true,"_meta":{"required":true}},"data":{"type":"json","required":true,"_meta":{"required":true}}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_actions","conflictColumns":["tenant_id","item_id","action_key"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_actions_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_actions_item_idx","columns":["tenantId","itemId"]},{"name":"intake_actions_state_idx","columns":["tenantId","state"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeAction","collectionExportName":"IntakeActionCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"actionKey","rule":"required","fieldType":"text"},{"field":"state","rule":"required","fieldType":"text"},{"field":"proposalRevision","rule":"required","fieldType":"integer"},{"field":"reviewVersion","rule":"required","fieldType":"integer"},{"field":"executionAttempt","rule":"required","fieldType":"integer"},{"field":"fence","rule":"required","fieldType":"integer"},{"field":"resultDigest","rule":"required","fieldType":"text"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_actions","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_actions\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\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);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"action_key":{"type":"TEXT","notNull":true,"unique":false},"state":{"type":"TEXT","notNull":true,"unique":false},"proposal_revision":{"type":"INTEGER","notNull":true,"unique":false},"review_version":{"type":"INTEGER","notNull":true,"unique":false},"execution_attempt":{"type":"INTEGER","notNull":true,"unique":false},"fence":{"type":"INTEGER","notNull":true,"unique":false},"result_digest":{"type":"TEXT","notNull":true,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_actions_tenant_id_item_id_idx","columns":["tenant_id","item_id","action_key"],"unique":true},{"name":"intake_actions_slug_context_idx","columns":["slug","context"]},{"name":"intake_actions_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_actions_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_actions_state_idx","columns":["tenant_id","state"]},{"name":"intake_actions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_actions_item_id_idx","columns":["item_id"]}],"version":"f6ceec91"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakeProposal":{"name":"intakeproposal","className":"IntakeProposal","qualifiedName":"@happyvertical/smrt-ingestion:IntakeProposal","collection":"intakeproposals","description":"Durable IntakeProposal record; mutations belong to the server service.","filePath":"/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts","packageName":"@happyvertical/smrt-ingestion","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"confidentialScopeId":{"type":"text","required":true,"_meta":{"required":true}},"itemId":{"type":"foreignKey","required":true,"related":"IntakeItem","_meta":{"required":true}},"actionId":{"type":"foreignKey","required":true,"related":"IntakeAction","_meta":{"required":true}},"analysisId":{"type":"foreignKey","required":true,"related":"IntakeAnalysis","_meta":{"required":true}},"analysisAttemptId":{"type":"foreignKey","required":true,"related":"IntakeAnalysisAttempt","_meta":{"required":true}},"revision":{"type":"integer","required":true,"_meta":{"required":true}},"bindingHash":{"type":"text","required":true,"_meta":{"required":true}},"data":{"type":"json","required":true,"_meta":{"required":true}}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_proposals","conflictColumns":["tenant_id","action_id","revision"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_proposals_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_proposals_item_idx","columns":["tenantId","itemId"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeProposal","collectionExportName":"IntakeProposalCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"actionId","rule":"required","fieldType":"foreignKey"},{"field":"analysisId","rule":"required","fieldType":"foreignKey"},{"field":"analysisAttemptId","rule":"required","fieldType":"foreignKey"},{"field":"revision","rule":"required","fieldType":"integer"},{"field":"bindingHash","rule":"required","fieldType":"text"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_proposals","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_proposals\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\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);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"action_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_actions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"analysis_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_analyses","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"analysis_attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_analysis_attempts","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"revision":{"type":"INTEGER","notNull":true,"unique":false},"binding_hash":{"type":"TEXT","notNull":true,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_proposals_tenant_id_action_id_idx","columns":["tenant_id","action_id","revision"],"unique":true},{"name":"intake_proposals_slug_context_idx","columns":["slug","context"]},{"name":"intake_proposals_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_proposals_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_proposals_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_proposals_item_id_idx","columns":["item_id"]},{"name":"intake_proposals_action_id_idx","columns":["action_id"]},{"name":"intake_proposals_analysis_id_idx","columns":["analysis_id"]},{"name":"intake_proposals_analysis_attempt_id_idx","columns":["analysis_attempt_id"]}],"version":"fb811c7c"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakeReviewDecision":{"name":"intakereviewdecision","className":"IntakeReviewDecision","qualifiedName":"@happyvertical/smrt-ingestion:IntakeReviewDecision","collection":"intakereviewdecisions","description":"Durable IntakeReviewDecision record; mutations belong to the server service.","filePath":"/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts","packageName":"@happyvertical/smrt-ingestion","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"confidentialScopeId":{"type":"text","required":true,"_meta":{"required":true}},"itemId":{"type":"foreignKey","required":true,"related":"IntakeItem","_meta":{"required":true}},"actionId":{"type":"foreignKey","required":true,"related":"IntakeAction","_meta":{"required":true}},"proposalId":{"type":"foreignKey","required":true,"related":"IntakeProposal","_meta":{"required":true}},"reviewVersion":{"type":"integer","required":true,"_meta":{"required":true}},"bindingHash":{"type":"text","required":true,"_meta":{"required":true}},"decision":{"type":"text","required":true,"_meta":{"required":true}},"data":{"type":"json","required":true,"_meta":{"required":true}}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_review_decisions","conflictColumns":["tenant_id","action_id","review_version"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_review_decisions_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_review_decisions_item_idx","columns":["tenantId","itemId"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeReviewDecision","collectionExportName":"IntakeReviewDecisionCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"actionId","rule":"required","fieldType":"foreignKey"},{"field":"proposalId","rule":"required","fieldType":"foreignKey"},{"field":"reviewVersion","rule":"required","fieldType":"integer"},{"field":"bindingHash","rule":"required","fieldType":"text"},{"field":"decision","rule":"required","fieldType":"text"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_review_decisions","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_review_decisions\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\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);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"action_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_actions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"proposal_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_proposals","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"review_version":{"type":"INTEGER","notNull":true,"unique":false},"binding_hash":{"type":"TEXT","notNull":true,"unique":false},"decision":{"type":"TEXT","notNull":true,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_review_decisions_tenant_id_action_id_idx","columns":["tenant_id","action_id","review_version"],"unique":true},{"name":"intake_review_decisions_slug_context_idx","columns":["slug","context"]},{"name":"intake_review_decisions_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_review_decisions_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_review_decisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_review_decisions_item_id_idx","columns":["item_id"]},{"name":"intake_review_decisions_action_id_idx","columns":["action_id"]},{"name":"intake_review_decisions_proposal_id_idx","columns":["proposal_id"]}],"version":"09abebd4"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakeExecution":{"name":"intakeexecution","className":"IntakeExecution","qualifiedName":"@happyvertical/smrt-ingestion:IntakeExecution","collection":"intakeexecutions","description":"Durable IntakeExecution record; mutations belong to the server service.","filePath":"/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts","packageName":"@happyvertical/smrt-ingestion","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"confidentialScopeId":{"type":"text","required":true,"_meta":{"required":true}},"itemId":{"type":"foreignKey","required":true,"related":"IntakeItem","_meta":{"required":true}},"actionId":{"type":"foreignKey","required":true,"related":"IntakeAction","_meta":{"required":true}},"attemptNumber":{"type":"integer","required":true,"_meta":{"required":true}},"fence":{"type":"integer","required":true,"_meta":{"required":true}},"state":{"type":"text","required":true,"_meta":{"required":true}},"bindingHash":{"type":"text","required":true,"_meta":{"required":true}},"resultDigest":{"type":"text","required":true,"_meta":{"required":true}},"idempotencyKey":{"type":"text","required":true,"_meta":{"required":true}},"data":{"type":"json","required":true,"_meta":{"required":true}}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_executions","conflictColumns":["tenant_id","action_id","attempt_number"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_executions_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_executions_item_idx","columns":["tenantId","itemId"]},{"name":"intake_executions_state_idx","columns":["tenantId","state"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeExecution","collectionExportName":"IntakeExecutionCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"actionId","rule":"required","fieldType":"foreignKey"},{"field":"attemptNumber","rule":"required","fieldType":"integer"},{"field":"fence","rule":"required","fieldType":"integer"},{"field":"state","rule":"required","fieldType":"text"},{"field":"bindingHash","rule":"required","fieldType":"text"},{"field":"resultDigest","rule":"required","fieldType":"text"},{"field":"idempotencyKey","rule":"required","fieldType":"text"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_executions","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_executions\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\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);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"action_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_actions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"attempt_number":{"type":"INTEGER","notNull":true,"unique":false},"fence":{"type":"INTEGER","notNull":true,"unique":false},"state":{"type":"TEXT","notNull":true,"unique":false},"binding_hash":{"type":"TEXT","notNull":true,"unique":false},"result_digest":{"type":"TEXT","notNull":true,"unique":false},"idempotency_key":{"type":"TEXT","notNull":true,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_executions_tenant_id_action_id_idx","columns":["tenant_id","action_id","attempt_number"],"unique":true},{"name":"intake_executions_slug_context_idx","columns":["slug","context"]},{"name":"intake_executions_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_executions_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_executions_state_idx","columns":["tenant_id","state"]},{"name":"intake_executions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_executions_item_id_idx","columns":["item_id"]},{"name":"intake_executions_action_id_idx","columns":["action_id"]}],"version":"89964fc0"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakeFeedback":{"name":"intakefeedback","className":"IntakeFeedback","qualifiedName":"@happyvertical/smrt-ingestion:IntakeFeedback","collection":"intakefeedbacks","description":"Durable IntakeFeedback record; mutations belong to the server service.","filePath":"/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts","packageName":"@happyvertical/smrt-ingestion","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"confidentialScopeId":{"type":"text","required":true,"_meta":{"required":true}},"itemId":{"type":"foreignKey","required":true,"related":"IntakeItem","_meta":{"required":true}},"requestKey":{"type":"text","required":true,"_meta":{"required":true}},"supersedesId":{"type":"foreignKey","required":false,"related":"IntakeFeedback","_meta":{"nullable":true}},"kind":{"type":"text","required":true,"_meta":{"required":true}},"data":{"type":"json","required":true,"_meta":{"required":true}}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_feedback","conflictColumns":["tenant_id","item_id","request_key"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_feedback_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_feedback_item_idx","columns":["tenantId","itemId"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeFeedback","collectionExportName":"IntakeFeedbackCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"requestKey","rule":"required","fieldType":"text"},{"field":"kind","rule":"required","fieldType":"text"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_feedback","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_feedback\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\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);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":true,"unique":false},"supersedes_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"intake_feedback","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"kind":{"type":"TEXT","notNull":true,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_feedback_tenant_id_item_id_idx","columns":["tenant_id","item_id","request_key"],"unique":true},{"name":"intake_feedback_slug_context_idx","columns":["slug","context"]},{"name":"intake_feedback_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_feedback_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_feedback_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_feedback_item_id_idx","columns":["item_id"]},{"name":"intake_feedback_supersedes_id_idx","columns":["supersedes_id"]}],"version":"861b4e22"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakeDispatch":{"name":"intakedispatch","className":"IntakeDispatch","qualifiedName":"@happyvertical/smrt-ingestion:IntakeDispatch","collection":"intakedispatches","description":"Durable IntakeDispatch record; mutations belong to the server service.","filePath":"/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts","packageName":"@happyvertical/smrt-ingestion","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"confidentialScopeId":{"type":"text","required":true,"_meta":{"required":true}},"itemId":{"type":"foreignKey","required":true,"related":"IntakeItem","_meta":{"required":true}},"stage":{"type":"text","required":true,"_meta":{"required":true}},"revision":{"type":"integer","required":true,"_meta":{"required":true}},"state":{"type":"text","required":true,"_meta":{"required":true}},"jobId":{"type":"text","required":true,"_meta":{"required":true}},"deliveries":{"type":"integer","required":true,"_meta":{"required":true}},"data":{"type":"json","required":true,"_meta":{"required":true}}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_dispatches","conflictColumns":["tenant_id","item_id","stage","revision"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_dispatches_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_dispatches_item_idx","columns":["tenantId","itemId"]},{"name":"intake_dispatches_state_idx","columns":["tenantId","state"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeDispatch","collectionExportName":"IntakeDispatchCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"stage","rule":"required","fieldType":"text"},{"field":"revision","rule":"required","fieldType":"integer"},{"field":"state","rule":"required","fieldType":"text"},{"field":"jobId","rule":"required","fieldType":"text"},{"field":"deliveries","rule":"required","fieldType":"integer"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_dispatches","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_dispatches\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\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);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"stage":{"type":"TEXT","notNull":true,"unique":false},"revision":{"type":"INTEGER","notNull":true,"unique":false},"state":{"type":"TEXT","notNull":true,"unique":false},"job_id":{"type":"TEXT","notNull":true,"unique":false},"deliveries":{"type":"INTEGER","notNull":true,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_dispatches_tenant_id_item_id_idx","columns":["tenant_id","item_id","stage","revision"],"unique":true},{"name":"intake_dispatches_slug_context_idx","columns":["slug","context"]},{"name":"intake_dispatches_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_dispatches_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_dispatches_state_idx","columns":["tenant_id","state"]},{"name":"intake_dispatches_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_dispatches_item_id_idx","columns":["item_id"]}],"version":"681b6eba"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakeDisposition":{"name":"intakedisposition","className":"IntakeDisposition","qualifiedName":"@happyvertical/smrt-ingestion:IntakeDisposition","collection":"intakedispositions","description":"Durable reviewer disposition for an item closed without an action; append-only.","filePath":"/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts","packageName":"@happyvertical/smrt-ingestion","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"confidentialScopeId":{"type":"text","required":true,"_meta":{"required":true}},"itemId":{"type":"foreignKey","required":true,"related":"IntakeItem","_meta":{"required":true}},"requestKey":{"type":"text","required":true,"_meta":{"required":true}},"disposition":{"type":"text","required":true,"_meta":{"required":true}},"data":{"type":"json","required":true,"_meta":{"required":true}}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_dispositions","conflictColumns":["tenant_id","item_id","request_key"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_dispositions_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_dispositions_item_idx","columns":["tenantId","itemId"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeDisposition","collectionExportName":"IntakeDispositionCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"requestKey","rule":"required","fieldType":"text"},{"field":"disposition","rule":"required","fieldType":"text"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_dispositions","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_dispositions\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\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 \\"disposition\\" TEXT NOT NULL,\\n \\"data\\" JSON NOT NULL\\n);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":true,"unique":false},"disposition":{"type":"TEXT","notNull":true,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_dispositions_tenant_id_item_id_idx","columns":["tenant_id","item_id","request_key"],"unique":true},{"name":"intake_dispositions_slug_context_idx","columns":["slug","context"]},{"name":"intake_dispositions_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_dispositions_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_dispositions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_dispositions_item_id_idx","columns":["item_id"]}],"version":"aa871865"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakeDeletion":{"name":"intakedeletion","className":"IntakeDeletion","qualifiedName":"@happyvertical/smrt-ingestion:IntakeDeletion","collection":"intakedeletions","description":"Durable IntakeDeletion record; mutations belong to the server service.","filePath":"/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts","packageName":"@happyvertical/smrt-ingestion","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"confidentialScopeId":{"type":"text","required":true,"_meta":{"required":true}},"itemId":{"type":"foreignKey","required":true,"related":"IntakeItem","_meta":{"required":true}},"state":{"type":"text","required":true,"_meta":{"required":true}},"data":{"type":"json","required":true,"_meta":{"required":true}}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_deletions","conflictColumns":["tenant_id","item_id"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_deletions_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_deletions_item_idx","columns":["tenantId","itemId"]},{"name":"intake_deletions_state_idx","columns":["tenantId","state"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeDeletion","collectionExportName":"IntakeDeletionCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"state","rule":"required","fieldType":"text"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_deletions","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_deletions\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\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);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"state":{"type":"TEXT","notNull":true,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_deletions_tenant_id_item_id_idx","columns":["tenant_id","item_id"],"unique":true},{"name":"intake_deletions_slug_context_idx","columns":["slug","context"]},{"name":"intake_deletions_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_deletions_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_deletions_state_idx","columns":["tenant_id","state"]},{"name":"intake_deletions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_deletions_item_id_idx","columns":["item_id"]}],"version":"97557271"},"importPath":"@happyvertical/smrt-ingestion/models"}},"moduleType":"smrt","recipes":[{"id":"ingestion.inbox","className":"IngestionInboxRecipe","label":"Ingestion inbox","summary":"Review incoming material and see which items need attention.","synonyms":["intake inbox","incoming documents","review queue"],"models":["@happyvertical/smrt-ingestion:IntakeItem","@happyvertical/smrt-ingestion:IntakeEvidence"],"nav":[],"requires":[],"group":{"id":"ingestion","label":"Ingestion","summary":"Review incoming material safely before it can change records."},"section":{"id":"ingestion","label":"Ingestion","icon":"archive","description":"Incoming material and its authenticated review workflow."},"help":{"markdown":"## Overview\\n\\nThe ingestion inbox is where an authenticated reviewer finds incoming material\\nthat needs attention. It keeps the original material and its related evidence\\ntogether, so a reviewer can understand what arrived before choosing a next\\nstep.\\n\\n## Tasks\\n\\n### Check items that need attention\\n\\n1. Open the ingestion inbox in an application that has configured an\\n authenticated review host.\\n2. Choose an item to inspect its evidence and current review state.\\n3. Open the item in Ingestion review when it has a proposed action.\\n\\n### Keep uncertain material for review\\n\\n1. Leave material in the inbox when there is not enough information to decide.\\n2. Return after the application has new information or a reviewer can make a\\n decision.\\n3. Do not treat an inbox item as permission to change another record.\\n\\n## Preview status\\n\\nThis recipe describes a preview workflow. The published evaluation did not meet\\nquality gates and did not establish safety, so automation remains disabled. It\\ndoes not configure a source, provider, generic record route, or automatic\\naction. Applications continue to use the scoped callbacks described in the\\ningestion review documentation.\\n","fieldRefs":[]},"surfaces":[{"kind":"route","path":"/ingestion/inbox","export":"@happyvertical/smrt-ingestion/svelte#IntakeInbox","label":"Ingestion inbox"}],"runtime":"both","demo":{"mode":"server","reasons":["Needs a server because its package depends on @happyvertical/smrt-agents, @happyvertical/smrt-jobs, @happyvertical/smrt-profiles, @happyvertical/smrt-reports, @happyvertical/smrt-secrets, @happyvertical/smrt-tenancy, @happyvertical/smrt-users, which do not build for a browser (#3615, #3617, #3624, #3625, #3626, #3627)."]}},{"id":"ingestion.review","className":"IngestionReviewRecipe","label":"Ingestion review","summary":"Inspect evidence and approve, change, reject, or defer proposed actions.","synonyms":["intake review","proposal review","human approval"],"models":["@happyvertical/smrt-ingestion:IntakeItem","@happyvertical/smrt-ingestion:IntakeEvidence","@happyvertical/smrt-ingestion:IntakeAnalysis","@happyvertical/smrt-ingestion:IntakeAction","@happyvertical/smrt-ingestion:IntakeReviewDecision"],"nav":[],"requires":[],"group":{"id":"ingestion","label":"Ingestion","summary":"Review incoming material safely before it can change records."},"section":{"id":"ingestion","label":"Ingestion","icon":"archive","description":"Incoming material and its authenticated review workflow."},"help":{"markdown":"## Overview\\n\\nIngestion review lets an authorized person inspect the evidence behind a\\nproposed action before it can affect another record. A decision is tied to the\\nspecific material and proposal that the reviewer saw.\\n\\n## Tasks\\n\\n### Review a proposed action\\n\\n1. Open an inbox item that has a proposed action.\\n2. Read the evidence and the proposed result in the authenticated review host.\\n3. Approve, change, reject, or defer the proposal according to the current\\n application policy.\\n\\n### Return to an item after it changes\\n\\n1. Refresh the review when the host indicates that the material or proposal has\\n changed.\\n2. Review the current proposal before making a decision.\\n3. Leave a proposal deferred when its evidence or destination is still\\n uncertain.\\n\\n## Preview status\\n\\nThis recipe describes a preview workflow. The published evaluation did not meet\\nquality gates and did not establish safety, so automation remains disabled. It\\ndoes not create a generic editing surface or enable automatic execution. A host\\nrechecks the reviewer, scope, and current proposal before it accepts a decision.\\n","fieldRefs":[]},"surfaces":[{"kind":"route","path":"/ingestion/review","export":"@happyvertical/smrt-ingestion/svelte#IntakeReview","label":"Ingestion review"}],"runtime":"both","demo":{"mode":"server","reasons":["Needs a server because its package depends on @happyvertical/smrt-agents, @happyvertical/smrt-jobs, @happyvertical/smrt-profiles, @happyvertical/smrt-reports, @happyvertical/smrt-secrets, @happyvertical/smrt-tenancy, @happyvertical/smrt-users, which do not build for a browser (#3615, #3617, #3624, #3625, #3626, #3627)."]}}],"smrtDependencies":["@happyvertical/smrt-agents","@happyvertical/smrt-assets","@happyvertical/smrt-content","@happyvertical/smrt-core","@happyvertical/smrt-jobs","@happyvertical/smrt-messages","@happyvertical/smrt-playbooks","@happyvertical/smrt-tenancy","@happyvertical/smrt-users"],"browser":{"status":"server-only","issues":["#3615","#3617","#3624","#3625","#3626","#3627"],"via":["@happyvertical/smrt-agents","@happyvertical/smrt-jobs","@happyvertical/smrt-profiles","@happyvertical/smrt-reports","@happyvertical/smrt-secrets","@happyvertical/smrt-tenancy","@happyvertical/smrt-users"]},"stampsConstructors":true}`));
|
|
4
|
+
ObjectRegistry.registerPackageManifest(JSON.parse(`{"version":"1.0.0","timestamp":0,"packageName":"@happyvertical/smrt-ingestion","packageVersion":"0.61.5","objects":{"@happyvertical/smrt-ingestion:IntakeItem":{"name":"intakeitem","className":"IntakeItem","qualifiedName":"@happyvertical/smrt-ingestion:IntakeItem","collection":"intakeitems","description":"Durable IntakeItem record; mutations belong to the server service.","filePath":"src/models.ts","packageName":"@happyvertical/smrt-ingestion","fields":{"tenantId":{"type":"text","_meta":{"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false},"__statedOptions":["sqlType","requiredFor","__tenancy"],"sqlType":"UUID","requiredFor":"tenant-scope"},"required":true},"confidentialScopeId":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"tenant-scope"},"required":true},"sourceId":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"identity"},"required":true},"sourceVersion":{"type":"text","_meta":{"__statedOptions":[]},"required":false},"deliveryKey":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"identity"},"required":true},"payloadDigest":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"idempotency"},"required":true},"scopeDigest":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"idempotency"},"required":true},"receiptState":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"workflow-state"},"required":true},"processingState":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"workflow-state"},"required":true},"visibility":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"workflow-state"},"required":true},"receiptVersion":{"type":"integer","_meta":{"__statedOptions":["required"],"required":true},"required":true},"analysisRevision":{"type":"integer","_meta":{"__statedOptions":["required"],"required":true},"required":true},"fence":{"type":"integer","_meta":{"__statedOptions":["required"],"required":true},"required":true},"leaseToken":{"type":"text","_meta":{"__statedOptions":[]},"required":false},"leaseUntil":{"type":"datetime","_meta":{"__statedOptions":["nullable","required"],"nullable":true,"required":false},"required":false},"expiresAt":{"type":"datetime","_meta":{"__statedOptions":["required"],"required":true},"required":true},"replayUntil":{"type":"datetime","_meta":{"__statedOptions":["required"],"required":true},"required":true},"cancelled":{"type":"boolean","_meta":{"__statedOptions":["required"],"required":true},"required":true},"traceId":{"type":"text","_meta":{"__statedOptions":[]},"required":false},"submitterId":{"type":"text","_meta":{"__statedOptions":["required","requiredFor","default"],"required":true,"default":"","requiredFor":"identity"},"required":true,"default":""},"ownerKey":{"type":"text","_meta":{"__statedOptions":["default"],"default":""},"required":false,"default":""},"data":{"type":"json","_meta":{"__statedOptions":["required"],"required":true},"required":true}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_items","conflictColumns":["tenant_id","source_id","delivery_key"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_items_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_items_expiry_idx","columns":["tenantId","expiresAt"]},{"name":"intake_items_receipt_idx","columns":["tenantId","receiptState","leaseUntil"]},{"name":"intake_items_submitter_idx","columns":["tenantId","submitterId"]},{"name":"intake_items_owner_idx","columns":["tenantId","ownerKey"]},{"name":"intake_items_received_idx","columns":["tenantId","confidentialScopeId","createdAt","id"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeItem","collectionExportName":"IntakeItemCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"sourceId","rule":"required","fieldType":"text"},{"field":"deliveryKey","rule":"required","fieldType":"text"},{"field":"payloadDigest","rule":"required","fieldType":"text"},{"field":"scopeDigest","rule":"required","fieldType":"text"},{"field":"receiptState","rule":"required","fieldType":"text"},{"field":"processingState","rule":"required","fieldType":"text"},{"field":"visibility","rule":"required","fieldType":"text"},{"field":"receiptVersion","rule":"required","fieldType":"integer"},{"field":"analysisRevision","rule":"required","fieldType":"integer"},{"field":"fence","rule":"required","fieldType":"integer"},{"field":"expiresAt","rule":"required","fieldType":"datetime"},{"field":"replayUntil","rule":"required","fieldType":"datetime"},{"field":"cancelled","rule":"required","fieldType":"boolean"},{"field":"submitterId","rule":"required","fieldType":"text"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_items","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_items\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\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,\\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,\\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,\\n \\"submitter_id\\" TEXT NOT NULL DEFAULT '',\\n \\"owner_key\\" TEXT DEFAULT '',\\n \\"data\\" JSON NOT NULL\\n);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"source_id":{"type":"TEXT","notNull":true,"unique":false},"source_version":{"type":"TEXT","notNull":false,"unique":false},"delivery_key":{"type":"TEXT","notNull":true,"unique":false},"payload_digest":{"type":"TEXT","notNull":true,"unique":false},"scope_digest":{"type":"TEXT","notNull":true,"unique":false},"receipt_state":{"type":"TEXT","notNull":true,"unique":false},"processing_state":{"type":"TEXT","notNull":true,"unique":false},"visibility":{"type":"TEXT","notNull":true,"unique":false},"receipt_version":{"type":"INTEGER","notNull":true,"unique":false},"analysis_revision":{"type":"INTEGER","notNull":true,"unique":false},"fence":{"type":"INTEGER","notNull":true,"unique":false},"lease_token":{"type":"TEXT","notNull":false,"unique":false},"lease_until":{"type":"TIMESTAMP","notNull":false,"unique":false},"expires_at":{"type":"TIMESTAMP","notNull":true,"unique":false},"replay_until":{"type":"TIMESTAMP","notNull":true,"unique":false},"cancelled":{"type":"BOOLEAN","notNull":true,"unique":false},"trace_id":{"type":"TEXT","notNull":false,"unique":false},"submitter_id":{"type":"TEXT","notNull":true,"unique":false,"default":""},"owner_key":{"type":"TEXT","notNull":false,"unique":false,"default":""},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_items_tenant_id_source_id_idx","columns":["tenant_id","source_id","delivery_key"],"unique":true},{"name":"intake_items_slug_context_idx","columns":["slug","context"]},{"name":"intake_items_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_items_expiry_idx","columns":["tenant_id","expires_at"]},{"name":"intake_items_receipt_idx","columns":["tenant_id","receipt_state","lease_until"]},{"name":"intake_items_submitter_idx","columns":["tenant_id","submitter_id"]},{"name":"intake_items_owner_idx","columns":["tenant_id","owner_key"]},{"name":"intake_items_received_idx","columns":["tenant_id","confidential_scope_id","created_at","id"]},{"name":"intake_items_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"97b97186"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakeEvidence":{"name":"intakeevidence","className":"IntakeEvidence","qualifiedName":"@happyvertical/smrt-ingestion:IntakeEvidence","collection":"intakeevidences","description":"Durable IntakeEvidence record; mutations belong to the server service.","filePath":"src/models.ts","packageName":"@happyvertical/smrt-ingestion","fields":{"tenantId":{"type":"text","_meta":{"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false},"__statedOptions":["sqlType","requiredFor","__tenancy"],"sqlType":"UUID","requiredFor":"tenant-scope"},"required":true},"confidentialScopeId":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"tenant-scope"},"required":true},"itemId":{"type":"foreignKey","_meta":{"__statedOptions":["required","requiredFor","related"],"required":true,"requiredFor":"identity"},"required":true,"related":"IntakeItem"},"partId":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"identity"},"required":true},"parentEvidenceId":{"type":"foreignKey","_meta":{"__statedOptions":["nullable","related","required"],"nullable":true,"required":false},"required":false,"related":"IntakeEvidence"},"assetId":{"type":"crossPackageRef","_meta":{"__statedOptions":["nullable","onDelete","related","required"],"nullable":true,"onDelete":"SET NULL","required":false},"required":false,"related":"@happyvertical/smrt-assets:Asset"},"state":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"workflow-state"},"required":true},"contentHash":{"type":"text","_meta":{"__statedOptions":[]},"required":false},"byteLength":{"type":"integer","_meta":{"__statedOptions":["required"],"required":true},"required":true},"mediaType":{"type":"text","_meta":{"__statedOptions":[]},"required":false},"sourceUri":{"type":"text","_meta":{"__statedOptions":[]},"required":false},"data":{"type":"json","_meta":{"__statedOptions":["required"],"required":true},"required":true}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_evidence","conflictColumns":["tenant_id","item_id","part_id"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_evidence_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_evidence_item_idx","columns":["tenantId","itemId"]},{"name":"intake_evidence_state_idx","columns":["tenantId","state"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeEvidence","collectionExportName":"IntakeEvidenceCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"partId","rule":"required","fieldType":"text"},{"field":"state","rule":"required","fieldType":"text"},{"field":"byteLength","rule":"required","fieldType":"integer"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_evidence","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_evidence\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\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,\\n \\"byte_length\\" INTEGER NOT NULL,\\n \\"media_type\\" TEXT,\\n \\"source_uri\\" TEXT,\\n \\"data\\" JSON NOT NULL\\n);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"part_id":{"type":"TEXT","notNull":true,"unique":false},"parent_evidence_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"intake_evidence","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"state":{"type":"TEXT","notNull":true,"unique":false},"content_hash":{"type":"TEXT","notNull":false,"unique":false},"byte_length":{"type":"INTEGER","notNull":true,"unique":false},"media_type":{"type":"TEXT","notNull":false,"unique":false},"source_uri":{"type":"TEXT","notNull":false,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_evidence_tenant_id_item_id_idx","columns":["tenant_id","item_id","part_id"],"unique":true},{"name":"intake_evidence_slug_context_idx","columns":["slug","context"]},{"name":"intake_evidence_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_evidence_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_evidence_state_idx","columns":["tenant_id","state"]},{"name":"intake_evidence_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_evidence_item_id_idx","columns":["item_id"]},{"name":"intake_evidence_parent_evidence_id_idx","columns":["parent_evidence_id"]},{"name":"intake_evidence_asset_id_idx","columns":["asset_id"]}],"version":"e1a663f0"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakeAnalysis":{"name":"intakeanalysis","className":"IntakeAnalysis","qualifiedName":"@happyvertical/smrt-ingestion:IntakeAnalysis","collection":"intakeanalysises","description":"Durable IntakeAnalysis record; mutations belong to the server service.","filePath":"src/models.ts","packageName":"@happyvertical/smrt-ingestion","fields":{"tenantId":{"type":"text","_meta":{"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false},"__statedOptions":["sqlType","requiredFor","__tenancy"],"sqlType":"UUID","requiredFor":"tenant-scope"},"required":true},"confidentialScopeId":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"tenant-scope"},"required":true},"itemId":{"type":"foreignKey","_meta":{"__statedOptions":["required","requiredFor","related"],"required":true,"requiredFor":"identity"},"required":true,"related":"IntakeItem"},"revision":{"type":"integer","_meta":{"__statedOptions":["required"],"required":true},"required":true},"fence":{"type":"integer","_meta":{"__statedOptions":["required"],"required":true},"required":true},"attemptNumber":{"type":"integer","_meta":{"__statedOptions":["required"],"required":true},"required":true},"currentAttemptId":{"type":"foreignKey","_meta":{"__statedOptions":["nullable","related","required"],"nullable":true,"required":false},"required":false,"related":"IntakeAnalysisAttempt"},"state":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"workflow-state"},"required":true},"inputDigest":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"integrity"},"required":true},"data":{"type":"json","_meta":{"__statedOptions":["required"],"required":true},"required":true}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_analyses","conflictColumns":["tenant_id","item_id","revision"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_analyses_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_analyses_item_idx","columns":["tenantId","itemId"]},{"name":"intake_analyses_state_idx","columns":["tenantId","state"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeAnalysis","collectionExportName":"IntakeAnalysisCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"revision","rule":"required","fieldType":"integer"},{"field":"fence","rule":"required","fieldType":"integer"},{"field":"attemptNumber","rule":"required","fieldType":"integer"},{"field":"state","rule":"required","fieldType":"text"},{"field":"inputDigest","rule":"required","fieldType":"text"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_analyses","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_analyses\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\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);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"revision":{"type":"INTEGER","notNull":true,"unique":false},"fence":{"type":"INTEGER","notNull":true,"unique":false},"attempt_number":{"type":"INTEGER","notNull":true,"unique":false},"current_attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"intake_analysis_attempts","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"state":{"type":"TEXT","notNull":true,"unique":false},"input_digest":{"type":"TEXT","notNull":true,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_analyses_tenant_id_item_id_idx","columns":["tenant_id","item_id","revision"],"unique":true},{"name":"intake_analyses_slug_context_idx","columns":["slug","context"]},{"name":"intake_analyses_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_analyses_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_analyses_state_idx","columns":["tenant_id","state"]},{"name":"intake_analyses_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_analyses_item_id_idx","columns":["item_id"]},{"name":"intake_analyses_current_attempt_id_idx","columns":["current_attempt_id"]}],"version":"0e285327"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakeAnalysisAttempt":{"name":"intakeanalysisattempt","className":"IntakeAnalysisAttempt","qualifiedName":"@happyvertical/smrt-ingestion:IntakeAnalysisAttempt","collection":"intakeanalysisattempts","description":"Durable IntakeAnalysisAttempt record; mutations belong to the server service.","filePath":"src/models.ts","packageName":"@happyvertical/smrt-ingestion","fields":{"tenantId":{"type":"text","_meta":{"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false},"__statedOptions":["sqlType","requiredFor","__tenancy"],"sqlType":"UUID","requiredFor":"tenant-scope"},"required":true},"confidentialScopeId":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"tenant-scope"},"required":true},"itemId":{"type":"foreignKey","_meta":{"__statedOptions":["required","requiredFor","related"],"required":true,"requiredFor":"identity"},"required":true,"related":"IntakeItem"},"analysisId":{"type":"foreignKey","_meta":{"__statedOptions":["required","requiredFor","related"],"required":true,"requiredFor":"identity"},"required":true,"related":"IntakeAnalysis"},"attemptNumber":{"type":"integer","_meta":{"__statedOptions":["required"],"required":true},"required":true},"fence":{"type":"integer","_meta":{"__statedOptions":["required"],"required":true},"required":true},"state":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"workflow-state"},"required":true},"leaseToken":{"type":"text","_meta":{"__statedOptions":[]},"required":false},"leaseUntil":{"type":"datetime","_meta":{"__statedOptions":["nullable","required"],"nullable":true,"required":false},"required":false},"outputDigest":{"type":"text","_meta":{"__statedOptions":[]},"required":false},"safeError":{"type":"text","_meta":{"__statedOptions":[]},"required":false},"confidence":{"type":"decimal","_meta":{"__statedOptions":["nullable","required"],"nullable":true,"required":false},"required":false},"data":{"type":"json","_meta":{"__statedOptions":["required"],"required":true},"required":true}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_analysis_attempts","conflictColumns":["tenant_id","analysis_id","attempt_number"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_analysis_attempts_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_analysis_attempts_item_idx","columns":["tenantId","itemId"]},{"name":"intake_analysis_attempts_state_idx","columns":["tenantId","state"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeAnalysisAttempt","collectionExportName":"IntakeAnalysisAttemptCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"analysisId","rule":"required","fieldType":"foreignKey"},{"field":"attemptNumber","rule":"required","fieldType":"integer"},{"field":"fence","rule":"required","fieldType":"integer"},{"field":"state","rule":"required","fieldType":"text"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_analysis_attempts","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_analysis_attempts\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\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,\\n \\"lease_until\\" TIMESTAMP,\\n \\"output_digest\\" TEXT,\\n \\"safe_error\\" TEXT,\\n \\"confidence\\" REAL,\\n \\"data\\" JSON NOT NULL\\n);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"analysis_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_analyses","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"attempt_number":{"type":"INTEGER","notNull":true,"unique":false},"fence":{"type":"INTEGER","notNull":true,"unique":false},"state":{"type":"TEXT","notNull":true,"unique":false},"lease_token":{"type":"TEXT","notNull":false,"unique":false},"lease_until":{"type":"TIMESTAMP","notNull":false,"unique":false},"output_digest":{"type":"TEXT","notNull":false,"unique":false},"safe_error":{"type":"TEXT","notNull":false,"unique":false},"confidence":{"type":"REAL","notNull":false,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_analysis_attempts_tenant_id_analysis_id_idx","columns":["tenant_id","analysis_id","attempt_number"],"unique":true},{"name":"intake_analysis_attempts_slug_context_idx","columns":["slug","context"]},{"name":"intake_analysis_attempts_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_analysis_attempts_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_analysis_attempts_state_idx","columns":["tenant_id","state"]},{"name":"intake_analysis_attempts_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_analysis_attempts_item_id_idx","columns":["item_id"]},{"name":"intake_analysis_attempts_analysis_id_idx","columns":["analysis_id"]}],"version":"f73a47d2"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakePlan":{"name":"intakeplan","className":"IntakePlan","qualifiedName":"@happyvertical/smrt-ingestion:IntakePlan","collection":"intakeplans","description":"Durable IntakePlan record; mutations belong to the server service.","filePath":"src/models.ts","packageName":"@happyvertical/smrt-ingestion","fields":{"tenantId":{"type":"text","_meta":{"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false},"__statedOptions":["sqlType","requiredFor","__tenancy"],"sqlType":"UUID","requiredFor":"tenant-scope"},"required":true},"confidentialScopeId":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"tenant-scope"},"required":true},"itemId":{"type":"foreignKey","_meta":{"__statedOptions":["required","requiredFor","related"],"required":true,"requiredFor":"identity"},"required":true,"related":"IntakeItem"},"planKey":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"identity"},"required":true},"revision":{"type":"integer","_meta":{"__statedOptions":["required"],"required":true},"required":true},"digest":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"idempotency"},"required":true},"data":{"type":"json","_meta":{"__statedOptions":["required"],"required":true},"required":true}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_plans","conflictColumns":["tenant_id","item_id","plan_key","revision"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_plans_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_plans_item_idx","columns":["tenantId","itemId"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakePlan","collectionExportName":"IntakePlanCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"planKey","rule":"required","fieldType":"text"},{"field":"revision","rule":"required","fieldType":"integer"},{"field":"digest","rule":"required","fieldType":"text"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_plans","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_plans\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\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);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"plan_key":{"type":"TEXT","notNull":true,"unique":false},"revision":{"type":"INTEGER","notNull":true,"unique":false},"digest":{"type":"TEXT","notNull":true,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_plans_tenant_id_item_id_idx","columns":["tenant_id","item_id","plan_key","revision"],"unique":true},{"name":"intake_plans_slug_context_idx","columns":["slug","context"]},{"name":"intake_plans_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_plans_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_plans_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_plans_item_id_idx","columns":["item_id"]}],"version":"2efbbcdc"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakeAction":{"name":"intakeaction","className":"IntakeAction","qualifiedName":"@happyvertical/smrt-ingestion:IntakeAction","collection":"intakeactions","description":"Durable IntakeAction record; mutations belong to the server service.","filePath":"src/models.ts","packageName":"@happyvertical/smrt-ingestion","fields":{"tenantId":{"type":"text","_meta":{"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false},"__statedOptions":["sqlType","requiredFor","__tenancy"],"sqlType":"UUID","requiredFor":"tenant-scope"},"required":true},"confidentialScopeId":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"tenant-scope"},"required":true},"itemId":{"type":"foreignKey","_meta":{"__statedOptions":["required","requiredFor","related"],"required":true,"requiredFor":"identity"},"required":true,"related":"IntakeItem"},"actionKey":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"identity"},"required":true},"state":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"workflow-state"},"required":true},"proposalRevision":{"type":"integer","_meta":{"__statedOptions":["required"],"required":true},"required":true},"reviewVersion":{"type":"integer","_meta":{"__statedOptions":["required"],"required":true},"required":true},"executionAttempt":{"type":"integer","_meta":{"__statedOptions":["required"],"required":true},"required":true},"fence":{"type":"integer","_meta":{"__statedOptions":["required"],"required":true},"required":true},"resultDigest":{"type":"text","_meta":{"__statedOptions":[]},"required":false},"data":{"type":"json","_meta":{"__statedOptions":["required"],"required":true},"required":true}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_actions","conflictColumns":["tenant_id","item_id","action_key"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_actions_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_actions_item_idx","columns":["tenantId","itemId"]},{"name":"intake_actions_state_idx","columns":["tenantId","state"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeAction","collectionExportName":"IntakeActionCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"actionKey","rule":"required","fieldType":"text"},{"field":"state","rule":"required","fieldType":"text"},{"field":"proposalRevision","rule":"required","fieldType":"integer"},{"field":"reviewVersion","rule":"required","fieldType":"integer"},{"field":"executionAttempt","rule":"required","fieldType":"integer"},{"field":"fence","rule":"required","fieldType":"integer"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_actions","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_actions\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\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,\\n \\"data\\" JSON NOT NULL\\n);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"action_key":{"type":"TEXT","notNull":true,"unique":false},"state":{"type":"TEXT","notNull":true,"unique":false},"proposal_revision":{"type":"INTEGER","notNull":true,"unique":false},"review_version":{"type":"INTEGER","notNull":true,"unique":false},"execution_attempt":{"type":"INTEGER","notNull":true,"unique":false},"fence":{"type":"INTEGER","notNull":true,"unique":false},"result_digest":{"type":"TEXT","notNull":false,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_actions_tenant_id_item_id_idx","columns":["tenant_id","item_id","action_key"],"unique":true},{"name":"intake_actions_slug_context_idx","columns":["slug","context"]},{"name":"intake_actions_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_actions_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_actions_state_idx","columns":["tenant_id","state"]},{"name":"intake_actions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_actions_item_id_idx","columns":["item_id"]}],"version":"fa6dec61"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakeProposal":{"name":"intakeproposal","className":"IntakeProposal","qualifiedName":"@happyvertical/smrt-ingestion:IntakeProposal","collection":"intakeproposals","description":"Durable IntakeProposal record; mutations belong to the server service.","filePath":"src/models.ts","packageName":"@happyvertical/smrt-ingestion","fields":{"tenantId":{"type":"text","_meta":{"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false},"__statedOptions":["sqlType","requiredFor","__tenancy"],"sqlType":"UUID","requiredFor":"tenant-scope"},"required":true},"confidentialScopeId":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"tenant-scope"},"required":true},"itemId":{"type":"foreignKey","_meta":{"__statedOptions":["required","requiredFor","related"],"required":true,"requiredFor":"identity"},"required":true,"related":"IntakeItem"},"actionId":{"type":"foreignKey","_meta":{"__statedOptions":["required","requiredFor","related"],"required":true,"requiredFor":"identity"},"required":true,"related":"IntakeAction"},"analysisId":{"type":"foreignKey","_meta":{"__statedOptions":["required","requiredFor","related"],"required":true,"requiredFor":"identity"},"required":true,"related":"IntakeAnalysis"},"analysisAttemptId":{"type":"foreignKey","_meta":{"__statedOptions":["required","requiredFor","related"],"required":true,"requiredFor":"identity"},"required":true,"related":"IntakeAnalysisAttempt"},"revision":{"type":"integer","_meta":{"__statedOptions":["required"],"required":true},"required":true},"bindingHash":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"integrity"},"required":true},"data":{"type":"json","_meta":{"__statedOptions":["required"],"required":true},"required":true}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_proposals","conflictColumns":["tenant_id","action_id","revision"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_proposals_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_proposals_item_idx","columns":["tenantId","itemId"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeProposal","collectionExportName":"IntakeProposalCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"actionId","rule":"required","fieldType":"foreignKey"},{"field":"analysisId","rule":"required","fieldType":"foreignKey"},{"field":"analysisAttemptId","rule":"required","fieldType":"foreignKey"},{"field":"revision","rule":"required","fieldType":"integer"},{"field":"bindingHash","rule":"required","fieldType":"text"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_proposals","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_proposals\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\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);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"action_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_actions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"analysis_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_analyses","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"analysis_attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_analysis_attempts","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"revision":{"type":"INTEGER","notNull":true,"unique":false},"binding_hash":{"type":"TEXT","notNull":true,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_proposals_tenant_id_action_id_idx","columns":["tenant_id","action_id","revision"],"unique":true},{"name":"intake_proposals_slug_context_idx","columns":["slug","context"]},{"name":"intake_proposals_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_proposals_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_proposals_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_proposals_item_id_idx","columns":["item_id"]},{"name":"intake_proposals_action_id_idx","columns":["action_id"]},{"name":"intake_proposals_analysis_id_idx","columns":["analysis_id"]},{"name":"intake_proposals_analysis_attempt_id_idx","columns":["analysis_attempt_id"]}],"version":"fb811c7c"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakeReviewDecision":{"name":"intakereviewdecision","className":"IntakeReviewDecision","qualifiedName":"@happyvertical/smrt-ingestion:IntakeReviewDecision","collection":"intakereviewdecisions","description":"Durable IntakeReviewDecision record; mutations belong to the server service.","filePath":"src/models.ts","packageName":"@happyvertical/smrt-ingestion","fields":{"tenantId":{"type":"text","_meta":{"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false},"__statedOptions":["sqlType","requiredFor","__tenancy"],"sqlType":"UUID","requiredFor":"tenant-scope"},"required":true},"confidentialScopeId":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"tenant-scope"},"required":true},"itemId":{"type":"foreignKey","_meta":{"__statedOptions":["required","requiredFor","related"],"required":true,"requiredFor":"identity"},"required":true,"related":"IntakeItem"},"actionId":{"type":"foreignKey","_meta":{"__statedOptions":["required","requiredFor","related"],"required":true,"requiredFor":"identity"},"required":true,"related":"IntakeAction"},"proposalId":{"type":"foreignKey","_meta":{"__statedOptions":["required","requiredFor","related"],"required":true,"requiredFor":"identity"},"required":true,"related":"IntakeProposal"},"reviewVersion":{"type":"integer","_meta":{"__statedOptions":["required"],"required":true},"required":true},"bindingHash":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"integrity"},"required":true},"decision":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"workflow-state"},"required":true},"data":{"type":"json","_meta":{"__statedOptions":["required"],"required":true},"required":true}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_review_decisions","conflictColumns":["tenant_id","action_id","review_version"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_review_decisions_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_review_decisions_item_idx","columns":["tenantId","itemId"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeReviewDecision","collectionExportName":"IntakeReviewDecisionCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"actionId","rule":"required","fieldType":"foreignKey"},{"field":"proposalId","rule":"required","fieldType":"foreignKey"},{"field":"reviewVersion","rule":"required","fieldType":"integer"},{"field":"bindingHash","rule":"required","fieldType":"text"},{"field":"decision","rule":"required","fieldType":"text"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_review_decisions","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_review_decisions\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\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);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"action_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_actions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"proposal_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_proposals","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"review_version":{"type":"INTEGER","notNull":true,"unique":false},"binding_hash":{"type":"TEXT","notNull":true,"unique":false},"decision":{"type":"TEXT","notNull":true,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_review_decisions_tenant_id_action_id_idx","columns":["tenant_id","action_id","review_version"],"unique":true},{"name":"intake_review_decisions_slug_context_idx","columns":["slug","context"]},{"name":"intake_review_decisions_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_review_decisions_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_review_decisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_review_decisions_item_id_idx","columns":["item_id"]},{"name":"intake_review_decisions_action_id_idx","columns":["action_id"]},{"name":"intake_review_decisions_proposal_id_idx","columns":["proposal_id"]}],"version":"09abebd4"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakeExecution":{"name":"intakeexecution","className":"IntakeExecution","qualifiedName":"@happyvertical/smrt-ingestion:IntakeExecution","collection":"intakeexecutions","description":"Durable IntakeExecution record; mutations belong to the server service.","filePath":"src/models.ts","packageName":"@happyvertical/smrt-ingestion","fields":{"tenantId":{"type":"text","_meta":{"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false},"__statedOptions":["sqlType","requiredFor","__tenancy"],"sqlType":"UUID","requiredFor":"tenant-scope"},"required":true},"confidentialScopeId":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"tenant-scope"},"required":true},"itemId":{"type":"foreignKey","_meta":{"__statedOptions":["required","requiredFor","related"],"required":true,"requiredFor":"identity"},"required":true,"related":"IntakeItem"},"actionId":{"type":"foreignKey","_meta":{"__statedOptions":["required","requiredFor","related"],"required":true,"requiredFor":"identity"},"required":true,"related":"IntakeAction"},"attemptNumber":{"type":"integer","_meta":{"__statedOptions":["required"],"required":true},"required":true},"fence":{"type":"integer","_meta":{"__statedOptions":["required"],"required":true},"required":true},"state":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"workflow-state"},"required":true},"bindingHash":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"integrity"},"required":true},"resultDigest":{"type":"text","_meta":{"__statedOptions":[]},"required":false},"idempotencyKey":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"idempotency"},"required":true},"data":{"type":"json","_meta":{"__statedOptions":["required"],"required":true},"required":true}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_executions","conflictColumns":["tenant_id","action_id","attempt_number"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_executions_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_executions_item_idx","columns":["tenantId","itemId"]},{"name":"intake_executions_state_idx","columns":["tenantId","state"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeExecution","collectionExportName":"IntakeExecutionCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"actionId","rule":"required","fieldType":"foreignKey"},{"field":"attemptNumber","rule":"required","fieldType":"integer"},{"field":"fence","rule":"required","fieldType":"integer"},{"field":"state","rule":"required","fieldType":"text"},{"field":"bindingHash","rule":"required","fieldType":"text"},{"field":"idempotencyKey","rule":"required","fieldType":"text"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_executions","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_executions\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\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,\\n \\"idempotency_key\\" TEXT NOT NULL,\\n \\"data\\" JSON NOT NULL\\n);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"action_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_actions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"attempt_number":{"type":"INTEGER","notNull":true,"unique":false},"fence":{"type":"INTEGER","notNull":true,"unique":false},"state":{"type":"TEXT","notNull":true,"unique":false},"binding_hash":{"type":"TEXT","notNull":true,"unique":false},"result_digest":{"type":"TEXT","notNull":false,"unique":false},"idempotency_key":{"type":"TEXT","notNull":true,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_executions_tenant_id_action_id_idx","columns":["tenant_id","action_id","attempt_number"],"unique":true},{"name":"intake_executions_slug_context_idx","columns":["slug","context"]},{"name":"intake_executions_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_executions_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_executions_state_idx","columns":["tenant_id","state"]},{"name":"intake_executions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_executions_item_id_idx","columns":["item_id"]},{"name":"intake_executions_action_id_idx","columns":["action_id"]}],"version":"36ae9dfd"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakeFeedback":{"name":"intakefeedback","className":"IntakeFeedback","qualifiedName":"@happyvertical/smrt-ingestion:IntakeFeedback","collection":"intakefeedbacks","description":"Durable IntakeFeedback record; mutations belong to the server service.","filePath":"src/models.ts","packageName":"@happyvertical/smrt-ingestion","fields":{"tenantId":{"type":"text","_meta":{"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false},"__statedOptions":["sqlType","requiredFor","__tenancy"],"sqlType":"UUID","requiredFor":"tenant-scope"},"required":true},"confidentialScopeId":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"tenant-scope"},"required":true},"itemId":{"type":"foreignKey","_meta":{"__statedOptions":["required","requiredFor","related"],"required":true,"requiredFor":"identity"},"required":true,"related":"IntakeItem"},"requestKey":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"identity"},"required":true},"supersedesId":{"type":"foreignKey","_meta":{"__statedOptions":["nullable","related","required"],"nullable":true,"required":false},"required":false,"related":"IntakeFeedback"},"kind":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"identity"},"required":true},"data":{"type":"json","_meta":{"__statedOptions":["required"],"required":true},"required":true}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_feedback","conflictColumns":["tenant_id","item_id","request_key"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_feedback_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_feedback_item_idx","columns":["tenantId","itemId"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeFeedback","collectionExportName":"IntakeFeedbackCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"requestKey","rule":"required","fieldType":"text"},{"field":"kind","rule":"required","fieldType":"text"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_feedback","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_feedback\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\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);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":true,"unique":false},"supersedes_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"intake_feedback","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"kind":{"type":"TEXT","notNull":true,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_feedback_tenant_id_item_id_idx","columns":["tenant_id","item_id","request_key"],"unique":true},{"name":"intake_feedback_slug_context_idx","columns":["slug","context"]},{"name":"intake_feedback_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_feedback_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_feedback_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_feedback_item_id_idx","columns":["item_id"]},{"name":"intake_feedback_supersedes_id_idx","columns":["supersedes_id"]}],"version":"861b4e22"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakeDispatch":{"name":"intakedispatch","className":"IntakeDispatch","qualifiedName":"@happyvertical/smrt-ingestion:IntakeDispatch","collection":"intakedispatches","description":"Durable IntakeDispatch record; mutations belong to the server service.","filePath":"src/models.ts","packageName":"@happyvertical/smrt-ingestion","fields":{"tenantId":{"type":"text","_meta":{"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false},"__statedOptions":["sqlType","requiredFor","__tenancy"],"sqlType":"UUID","requiredFor":"tenant-scope"},"required":true},"confidentialScopeId":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"tenant-scope"},"required":true},"itemId":{"type":"foreignKey","_meta":{"__statedOptions":["required","requiredFor","related"],"required":true,"requiredFor":"identity"},"required":true,"related":"IntakeItem"},"stage":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"identity"},"required":true},"revision":{"type":"integer","_meta":{"__statedOptions":["required"],"required":true},"required":true},"state":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"workflow-state"},"required":true},"jobId":{"type":"text","_meta":{"__statedOptions":[]},"required":false},"deliveries":{"type":"integer","_meta":{"__statedOptions":["required"],"required":true},"required":true},"data":{"type":"json","_meta":{"__statedOptions":["required"],"required":true},"required":true}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_dispatches","conflictColumns":["tenant_id","item_id","stage","revision"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_dispatches_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_dispatches_item_idx","columns":["tenantId","itemId"]},{"name":"intake_dispatches_state_idx","columns":["tenantId","state"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeDispatch","collectionExportName":"IntakeDispatchCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"stage","rule":"required","fieldType":"text"},{"field":"revision","rule":"required","fieldType":"integer"},{"field":"state","rule":"required","fieldType":"text"},{"field":"deliveries","rule":"required","fieldType":"integer"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_dispatches","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_dispatches\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\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,\\n \\"deliveries\\" INTEGER NOT NULL,\\n \\"data\\" JSON NOT NULL\\n);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"stage":{"type":"TEXT","notNull":true,"unique":false},"revision":{"type":"INTEGER","notNull":true,"unique":false},"state":{"type":"TEXT","notNull":true,"unique":false},"job_id":{"type":"TEXT","notNull":false,"unique":false},"deliveries":{"type":"INTEGER","notNull":true,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_dispatches_tenant_id_item_id_idx","columns":["tenant_id","item_id","stage","revision"],"unique":true},{"name":"intake_dispatches_slug_context_idx","columns":["slug","context"]},{"name":"intake_dispatches_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_dispatches_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_dispatches_state_idx","columns":["tenant_id","state"]},{"name":"intake_dispatches_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_dispatches_item_id_idx","columns":["item_id"]}],"version":"30a30db5"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakeDisposition":{"name":"intakedisposition","className":"IntakeDisposition","qualifiedName":"@happyvertical/smrt-ingestion:IntakeDisposition","collection":"intakedispositions","description":"Durable reviewer disposition for an item closed without an action; append-only.","filePath":"src/models.ts","packageName":"@happyvertical/smrt-ingestion","fields":{"tenantId":{"type":"text","_meta":{"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false},"__statedOptions":["sqlType","requiredFor","__tenancy"],"sqlType":"UUID","requiredFor":"tenant-scope"},"required":true},"confidentialScopeId":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"tenant-scope"},"required":true},"itemId":{"type":"foreignKey","_meta":{"__statedOptions":["required","requiredFor","related"],"required":true,"requiredFor":"identity"},"required":true,"related":"IntakeItem"},"requestKey":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"identity"},"required":true},"disposition":{"type":"text","_meta":{"__statedOptions":[]},"required":false},"data":{"type":"json","_meta":{"__statedOptions":["required"],"required":true},"required":true}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_dispositions","conflictColumns":["tenant_id","item_id","request_key"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_dispositions_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_dispositions_item_idx","columns":["tenantId","itemId"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeDisposition","collectionExportName":"IntakeDispositionCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"requestKey","rule":"required","fieldType":"text"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_dispositions","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_dispositions\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\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 \\"disposition\\" TEXT,\\n \\"data\\" JSON NOT NULL\\n);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":true,"unique":false},"disposition":{"type":"TEXT","notNull":false,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_dispositions_tenant_id_item_id_idx","columns":["tenant_id","item_id","request_key"],"unique":true},{"name":"intake_dispositions_slug_context_idx","columns":["slug","context"]},{"name":"intake_dispositions_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_dispositions_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_dispositions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_dispositions_item_id_idx","columns":["item_id"]}],"version":"92476dea"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakeDeletion":{"name":"intakedeletion","className":"IntakeDeletion","qualifiedName":"@happyvertical/smrt-ingestion:IntakeDeletion","collection":"intakedeletions","description":"Durable IntakeDeletion record; mutations belong to the server service.","filePath":"src/models.ts","packageName":"@happyvertical/smrt-ingestion","fields":{"tenantId":{"type":"text","_meta":{"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false},"__statedOptions":["sqlType","requiredFor","__tenancy"],"sqlType":"UUID","requiredFor":"tenant-scope"},"required":true},"confidentialScopeId":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"tenant-scope"},"required":true},"itemId":{"type":"foreignKey","_meta":{"__statedOptions":["required","requiredFor","related"],"required":true,"requiredFor":"identity"},"required":true,"related":"IntakeItem"},"state":{"type":"text","_meta":{"__statedOptions":["required","requiredFor"],"required":true,"requiredFor":"workflow-state"},"required":true},"data":{"type":"json","_meta":{"__statedOptions":["required"],"required":true},"required":true}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_deletions","conflictColumns":["tenant_id","item_id"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_deletions_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_deletions_item_idx","columns":["tenantId","itemId"]},{"name":"intake_deletions_state_idx","columns":["tenantId","state"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeDeletion","collectionExportName":"IntakeDeletionCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"state","rule":"required","fieldType":"text"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_deletions","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_deletions\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\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);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"state":{"type":"TEXT","notNull":true,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_deletions_tenant_id_item_id_idx","columns":["tenant_id","item_id"],"unique":true},{"name":"intake_deletions_slug_context_idx","columns":["slug","context"]},{"name":"intake_deletions_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_deletions_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_deletions_state_idx","columns":["tenant_id","state"]},{"name":"intake_deletions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_deletions_item_id_idx","columns":["item_id"]}],"version":"97557271"},"importPath":"@happyvertical/smrt-ingestion/models"}},"moduleType":"smrt","recipes":[{"id":"ingestion.inbox","className":"IngestionInboxRecipe","label":"Ingestion inbox","summary":"Review incoming material and see which items need attention.","synonyms":["intake inbox","incoming documents","review queue"],"models":["@happyvertical/smrt-ingestion:IntakeItem","@happyvertical/smrt-ingestion:IntakeEvidence"],"nav":[],"requires":[],"group":{"id":"ingestion","label":"Ingestion","summary":"Review incoming material safely before it can change records."},"section":{"id":"ingestion","label":"Ingestion","icon":"archive","description":"Incoming material and its authenticated review workflow."},"help":{"markdown":"## Overview\\n\\nThe ingestion inbox is where an authenticated reviewer finds incoming material\\nthat needs attention. It keeps the original material and its related evidence\\ntogether, so a reviewer can understand what arrived before choosing a next\\nstep.\\n\\n## Tasks\\n\\n### Check items that need attention\\n\\n1. Open the ingestion inbox in an application that has configured an\\n authenticated review host.\\n2. Choose an item to inspect its evidence and current review state.\\n3. Open the item in Ingestion review when it has a proposed action.\\n\\n### Keep uncertain material for review\\n\\n1. Leave material in the inbox when there is not enough information to decide.\\n2. Return after the application has new information or a reviewer can make a\\n decision.\\n3. Do not treat an inbox item as permission to change another record.\\n\\n## Preview status\\n\\nThis recipe describes a preview workflow. The published evaluation did not meet\\nquality gates and did not establish safety, so automation remains disabled. It\\ndoes not configure a source, provider, generic record route, or automatic\\naction. Applications continue to use the scoped callbacks described in the\\ningestion review documentation.\\n","fieldRefs":[]},"surfaces":[{"kind":"route","path":"/ingestion/inbox","export":"@happyvertical/smrt-ingestion/svelte#IntakeInbox","label":"Ingestion inbox"}],"runtime":"both","demo":{"mode":"server","reasons":["Needs a server because its package depends on @happyvertical/smrt-agents, @happyvertical/smrt-jobs, @happyvertical/smrt-profiles, @happyvertical/smrt-reports, @happyvertical/smrt-secrets, @happyvertical/smrt-tenancy, @happyvertical/smrt-users, which do not build for a browser (#3615, #3617, #3624, #3625, #3626, #3627)."]}},{"id":"ingestion.review","className":"IngestionReviewRecipe","label":"Ingestion review","summary":"Inspect evidence and approve, change, reject, or defer proposed actions.","synonyms":["intake review","proposal review","human approval"],"models":["@happyvertical/smrt-ingestion:IntakeItem","@happyvertical/smrt-ingestion:IntakeEvidence","@happyvertical/smrt-ingestion:IntakeAnalysis","@happyvertical/smrt-ingestion:IntakeAction","@happyvertical/smrt-ingestion:IntakeReviewDecision"],"nav":[],"requires":[],"group":{"id":"ingestion","label":"Ingestion","summary":"Review incoming material safely before it can change records."},"section":{"id":"ingestion","label":"Ingestion","icon":"archive","description":"Incoming material and its authenticated review workflow."},"help":{"markdown":"## Overview\\n\\nIngestion review lets an authorized person inspect the evidence behind a\\nproposed action before it can affect another record. A decision is tied to the\\nspecific material and proposal that the reviewer saw.\\n\\n## Tasks\\n\\n### Review a proposed action\\n\\n1. Open an inbox item that has a proposed action.\\n2. Read the evidence and the proposed result in the authenticated review host.\\n3. Approve, change, reject, or defer the proposal according to the current\\n application policy.\\n\\n### Return to an item after it changes\\n\\n1. Refresh the review when the host indicates that the material or proposal has\\n changed.\\n2. Review the current proposal before making a decision.\\n3. Leave a proposal deferred when its evidence or destination is still\\n uncertain.\\n\\n## Preview status\\n\\nThis recipe describes a preview workflow. The published evaluation did not meet\\nquality gates and did not establish safety, so automation remains disabled. It\\ndoes not create a generic editing surface or enable automatic execution. A host\\nrechecks the reviewer, scope, and current proposal before it accepts a decision.\\n","fieldRefs":[]},"surfaces":[{"kind":"route","path":"/ingestion/review","export":"@happyvertical/smrt-ingestion/svelte#IntakeReview","label":"Ingestion review"}],"runtime":"both","demo":{"mode":"server","reasons":["Needs a server because its package depends on @happyvertical/smrt-agents, @happyvertical/smrt-jobs, @happyvertical/smrt-profiles, @happyvertical/smrt-reports, @happyvertical/smrt-secrets, @happyvertical/smrt-tenancy, @happyvertical/smrt-users, which do not build for a browser (#3615, #3617, #3624, #3625, #3626, #3627)."]}}],"smrtDependencies":["@happyvertical/smrt-agents","@happyvertical/smrt-assets","@happyvertical/smrt-content","@happyvertical/smrt-core","@happyvertical/smrt-jobs","@happyvertical/smrt-messages","@happyvertical/smrt-playbooks","@happyvertical/smrt-tenancy","@happyvertical/smrt-users"],"browser":{"status":"server-only","issues":["#3615","#3617","#3624","#3625","#3626","#3627"],"via":["@happyvertical/smrt-agents","@happyvertical/smrt-jobs","@happyvertical/smrt-profiles","@happyvertical/smrt-reports","@happyvertical/smrt-secrets","@happyvertical/smrt-tenancy","@happyvertical/smrt-users"]},"stampsConstructors":true}`));
|
|
5
5
|
//#endregion
|
|
6
6
|
//#region src/models.ts
|
|
7
7
|
var __defProp = Object.defineProperty;
|
|
@@ -53,39 +53,44 @@ __publicField(IntakeItem, "__smrtPackage__", "@happyvertical/smrt-ingestion");
|
|
|
53
53
|
__decorateClass([tenantId()], IntakeItem.prototype, "tenantId", 2);
|
|
54
54
|
__decorateClass([field({
|
|
55
55
|
type: "text",
|
|
56
|
-
required: true
|
|
56
|
+
required: true,
|
|
57
|
+
requiredFor: "tenant-scope"
|
|
57
58
|
})], IntakeItem.prototype, "confidentialScopeId", 2);
|
|
58
59
|
__decorateClass([field({
|
|
59
60
|
type: "text",
|
|
60
|
-
required: true
|
|
61
|
+
required: true,
|
|
62
|
+
requiredFor: "identity"
|
|
61
63
|
})], IntakeItem.prototype, "sourceId", 2);
|
|
64
|
+
__decorateClass([field({ type: "text" })], IntakeItem.prototype, "sourceVersion", 2);
|
|
62
65
|
__decorateClass([field({
|
|
63
66
|
type: "text",
|
|
64
|
-
required: true
|
|
65
|
-
|
|
66
|
-
__decorateClass([field({
|
|
67
|
-
type: "text",
|
|
68
|
-
required: true
|
|
67
|
+
required: true,
|
|
68
|
+
requiredFor: "identity"
|
|
69
69
|
})], IntakeItem.prototype, "deliveryKey", 2);
|
|
70
70
|
__decorateClass([field({
|
|
71
71
|
type: "text",
|
|
72
|
-
required: true
|
|
72
|
+
required: true,
|
|
73
|
+
requiredFor: "idempotency"
|
|
73
74
|
})], IntakeItem.prototype, "payloadDigest", 2);
|
|
74
75
|
__decorateClass([field({
|
|
75
76
|
type: "text",
|
|
76
|
-
required: true
|
|
77
|
+
required: true,
|
|
78
|
+
requiredFor: "idempotency"
|
|
77
79
|
})], IntakeItem.prototype, "scopeDigest", 2);
|
|
78
80
|
__decorateClass([field({
|
|
79
81
|
type: "text",
|
|
80
|
-
required: true
|
|
82
|
+
required: true,
|
|
83
|
+
requiredFor: "workflow-state"
|
|
81
84
|
})], IntakeItem.prototype, "receiptState", 2);
|
|
82
85
|
__decorateClass([field({
|
|
83
86
|
type: "text",
|
|
84
|
-
required: true
|
|
87
|
+
required: true,
|
|
88
|
+
requiredFor: "workflow-state"
|
|
85
89
|
})], IntakeItem.prototype, "processingState", 2);
|
|
86
90
|
__decorateClass([field({
|
|
87
91
|
type: "text",
|
|
88
|
-
required: true
|
|
92
|
+
required: true,
|
|
93
|
+
requiredFor: "workflow-state"
|
|
89
94
|
})], IntakeItem.prototype, "visibility", 2);
|
|
90
95
|
__decorateClass([field({
|
|
91
96
|
type: "integer",
|
|
@@ -99,10 +104,7 @@ __decorateClass([field({
|
|
|
99
104
|
type: "integer",
|
|
100
105
|
required: true
|
|
101
106
|
})], IntakeItem.prototype, "fence", 2);
|
|
102
|
-
__decorateClass([field({
|
|
103
|
-
type: "text",
|
|
104
|
-
required: true
|
|
105
|
-
})], IntakeItem.prototype, "leaseToken", 2);
|
|
107
|
+
__decorateClass([field({ type: "text" })], IntakeItem.prototype, "leaseToken", 2);
|
|
106
108
|
__decorateClass([field({
|
|
107
109
|
type: "datetime",
|
|
108
110
|
nullable: true
|
|
@@ -119,18 +121,15 @@ __decorateClass([field({
|
|
|
119
121
|
type: "boolean",
|
|
120
122
|
required: true
|
|
121
123
|
})], IntakeItem.prototype, "cancelled", 2);
|
|
122
|
-
__decorateClass([field({
|
|
123
|
-
type: "text",
|
|
124
|
-
required: true
|
|
125
|
-
})], IntakeItem.prototype, "traceId", 2);
|
|
124
|
+
__decorateClass([field({ type: "text" })], IntakeItem.prototype, "traceId", 2);
|
|
126
125
|
__decorateClass([field({
|
|
127
126
|
type: "text",
|
|
128
127
|
required: true,
|
|
128
|
+
requiredFor: "identity",
|
|
129
129
|
default: ""
|
|
130
130
|
})], IntakeItem.prototype, "submitterId", 2);
|
|
131
131
|
__decorateClass([field({
|
|
132
132
|
type: "text",
|
|
133
|
-
required: true,
|
|
134
133
|
default: ""
|
|
135
134
|
})], IntakeItem.prototype, "ownerKey", 2);
|
|
136
135
|
__decorateClass([field({
|
|
@@ -207,12 +206,17 @@ __publicField(IntakeEvidence, "__smrtPackage__", "@happyvertical/smrt-ingestion"
|
|
|
207
206
|
__decorateClass([tenantId()], IntakeEvidence.prototype, "tenantId", 2);
|
|
208
207
|
__decorateClass([field({
|
|
209
208
|
type: "text",
|
|
210
|
-
required: true
|
|
209
|
+
required: true,
|
|
210
|
+
requiredFor: "tenant-scope"
|
|
211
211
|
})], IntakeEvidence.prototype, "confidentialScopeId", 2);
|
|
212
|
-
__decorateClass([foreignKey("IntakeItem", {
|
|
212
|
+
__decorateClass([foreignKey("IntakeItem", {
|
|
213
|
+
required: true,
|
|
214
|
+
requiredFor: "identity"
|
|
215
|
+
})], IntakeEvidence.prototype, "itemId", 2);
|
|
213
216
|
__decorateClass([field({
|
|
214
217
|
type: "text",
|
|
215
|
-
required: true
|
|
218
|
+
required: true,
|
|
219
|
+
requiredFor: "identity"
|
|
216
220
|
})], IntakeEvidence.prototype, "partId", 2);
|
|
217
221
|
__decorateClass([foreignKey("IntakeEvidence", { nullable: true })], IntakeEvidence.prototype, "parentEvidenceId", 2);
|
|
218
222
|
__decorateClass([crossPackageRef("@happyvertical/smrt-assets:Asset", {
|
|
@@ -221,24 +225,16 @@ __decorateClass([crossPackageRef("@happyvertical/smrt-assets:Asset", {
|
|
|
221
225
|
})], IntakeEvidence.prototype, "assetId", 2);
|
|
222
226
|
__decorateClass([field({
|
|
223
227
|
type: "text",
|
|
224
|
-
required: true
|
|
228
|
+
required: true,
|
|
229
|
+
requiredFor: "workflow-state"
|
|
225
230
|
})], IntakeEvidence.prototype, "state", 2);
|
|
226
|
-
__decorateClass([field({
|
|
227
|
-
type: "text",
|
|
228
|
-
required: true
|
|
229
|
-
})], IntakeEvidence.prototype, "contentHash", 2);
|
|
231
|
+
__decorateClass([field({ type: "text" })], IntakeEvidence.prototype, "contentHash", 2);
|
|
230
232
|
__decorateClass([field({
|
|
231
233
|
type: "integer",
|
|
232
234
|
required: true
|
|
233
235
|
})], IntakeEvidence.prototype, "byteLength", 2);
|
|
234
|
-
__decorateClass([field({
|
|
235
|
-
|
|
236
|
-
required: true
|
|
237
|
-
})], IntakeEvidence.prototype, "mediaType", 2);
|
|
238
|
-
__decorateClass([field({
|
|
239
|
-
type: "text",
|
|
240
|
-
required: true
|
|
241
|
-
})], IntakeEvidence.prototype, "sourceUri", 2);
|
|
236
|
+
__decorateClass([field({ type: "text" })], IntakeEvidence.prototype, "mediaType", 2);
|
|
237
|
+
__decorateClass([field({ type: "text" })], IntakeEvidence.prototype, "sourceUri", 2);
|
|
242
238
|
__decorateClass([field({
|
|
243
239
|
type: "json",
|
|
244
240
|
required: true
|
|
@@ -290,9 +286,13 @@ __publicField(IntakeAnalysis, "__smrtPackage__", "@happyvertical/smrt-ingestion"
|
|
|
290
286
|
__decorateClass([tenantId()], IntakeAnalysis.prototype, "tenantId", 2);
|
|
291
287
|
__decorateClass([field({
|
|
292
288
|
type: "text",
|
|
293
|
-
required: true
|
|
289
|
+
required: true,
|
|
290
|
+
requiredFor: "tenant-scope"
|
|
294
291
|
})], IntakeAnalysis.prototype, "confidentialScopeId", 2);
|
|
295
|
-
__decorateClass([foreignKey("IntakeItem", {
|
|
292
|
+
__decorateClass([foreignKey("IntakeItem", {
|
|
293
|
+
required: true,
|
|
294
|
+
requiredFor: "identity"
|
|
295
|
+
})], IntakeAnalysis.prototype, "itemId", 2);
|
|
296
296
|
__decorateClass([field({
|
|
297
297
|
type: "integer",
|
|
298
298
|
required: true
|
|
@@ -308,11 +308,13 @@ __decorateClass([field({
|
|
|
308
308
|
__decorateClass([foreignKey("IntakeAnalysisAttempt", { nullable: true })], IntakeAnalysis.prototype, "currentAttemptId", 2);
|
|
309
309
|
__decorateClass([field({
|
|
310
310
|
type: "text",
|
|
311
|
-
required: true
|
|
311
|
+
required: true,
|
|
312
|
+
requiredFor: "workflow-state"
|
|
312
313
|
})], IntakeAnalysis.prototype, "state", 2);
|
|
313
314
|
__decorateClass([field({
|
|
314
315
|
type: "text",
|
|
315
|
-
required: true
|
|
316
|
+
required: true,
|
|
317
|
+
requiredFor: "integrity"
|
|
316
318
|
})], IntakeAnalysis.prototype, "inputDigest", 2);
|
|
317
319
|
__decorateClass([field({
|
|
318
320
|
type: "json",
|
|
@@ -368,10 +370,17 @@ __publicField(IntakeAnalysisAttempt, "__smrtPackage__", "@happyvertical/smrt-ing
|
|
|
368
370
|
__decorateClass([tenantId()], IntakeAnalysisAttempt.prototype, "tenantId", 2);
|
|
369
371
|
__decorateClass([field({
|
|
370
372
|
type: "text",
|
|
371
|
-
required: true
|
|
373
|
+
required: true,
|
|
374
|
+
requiredFor: "tenant-scope"
|
|
372
375
|
})], IntakeAnalysisAttempt.prototype, "confidentialScopeId", 2);
|
|
373
|
-
__decorateClass([foreignKey("IntakeItem", {
|
|
374
|
-
|
|
376
|
+
__decorateClass([foreignKey("IntakeItem", {
|
|
377
|
+
required: true,
|
|
378
|
+
requiredFor: "identity"
|
|
379
|
+
})], IntakeAnalysisAttempt.prototype, "itemId", 2);
|
|
380
|
+
__decorateClass([foreignKey("IntakeAnalysis", {
|
|
381
|
+
required: true,
|
|
382
|
+
requiredFor: "identity"
|
|
383
|
+
})], IntakeAnalysisAttempt.prototype, "analysisId", 2);
|
|
375
384
|
__decorateClass([field({
|
|
376
385
|
type: "integer",
|
|
377
386
|
required: true
|
|
@@ -382,24 +391,16 @@ __decorateClass([field({
|
|
|
382
391
|
})], IntakeAnalysisAttempt.prototype, "fence", 2);
|
|
383
392
|
__decorateClass([field({
|
|
384
393
|
type: "text",
|
|
385
|
-
required: true
|
|
394
|
+
required: true,
|
|
395
|
+
requiredFor: "workflow-state"
|
|
386
396
|
})], IntakeAnalysisAttempt.prototype, "state", 2);
|
|
387
|
-
__decorateClass([field({
|
|
388
|
-
type: "text",
|
|
389
|
-
required: true
|
|
390
|
-
})], IntakeAnalysisAttempt.prototype, "leaseToken", 2);
|
|
397
|
+
__decorateClass([field({ type: "text" })], IntakeAnalysisAttempt.prototype, "leaseToken", 2);
|
|
391
398
|
__decorateClass([field({
|
|
392
399
|
type: "datetime",
|
|
393
400
|
nullable: true
|
|
394
401
|
})], IntakeAnalysisAttempt.prototype, "leaseUntil", 2);
|
|
395
|
-
__decorateClass([field({
|
|
396
|
-
|
|
397
|
-
required: true
|
|
398
|
-
})], IntakeAnalysisAttempt.prototype, "outputDigest", 2);
|
|
399
|
-
__decorateClass([field({
|
|
400
|
-
type: "text",
|
|
401
|
-
required: true
|
|
402
|
-
})], IntakeAnalysisAttempt.prototype, "safeError", 2);
|
|
402
|
+
__decorateClass([field({ type: "text" })], IntakeAnalysisAttempt.prototype, "outputDigest", 2);
|
|
403
|
+
__decorateClass([field({ type: "text" })], IntakeAnalysisAttempt.prototype, "safeError", 2);
|
|
403
404
|
__decorateClass([field({
|
|
404
405
|
type: "decimal",
|
|
405
406
|
nullable: true
|
|
@@ -452,12 +453,17 @@ __publicField(IntakePlan, "__smrtPackage__", "@happyvertical/smrt-ingestion");
|
|
|
452
453
|
__decorateClass([tenantId()], IntakePlan.prototype, "tenantId", 2);
|
|
453
454
|
__decorateClass([field({
|
|
454
455
|
type: "text",
|
|
455
|
-
required: true
|
|
456
|
+
required: true,
|
|
457
|
+
requiredFor: "tenant-scope"
|
|
456
458
|
})], IntakePlan.prototype, "confidentialScopeId", 2);
|
|
457
|
-
__decorateClass([foreignKey("IntakeItem", {
|
|
459
|
+
__decorateClass([foreignKey("IntakeItem", {
|
|
460
|
+
required: true,
|
|
461
|
+
requiredFor: "identity"
|
|
462
|
+
})], IntakePlan.prototype, "itemId", 2);
|
|
458
463
|
__decorateClass([field({
|
|
459
464
|
type: "text",
|
|
460
|
-
required: true
|
|
465
|
+
required: true,
|
|
466
|
+
requiredFor: "identity"
|
|
461
467
|
})], IntakePlan.prototype, "planKey", 2);
|
|
462
468
|
__decorateClass([field({
|
|
463
469
|
type: "integer",
|
|
@@ -465,7 +471,8 @@ __decorateClass([field({
|
|
|
465
471
|
})], IntakePlan.prototype, "revision", 2);
|
|
466
472
|
__decorateClass([field({
|
|
467
473
|
type: "text",
|
|
468
|
-
required: true
|
|
474
|
+
required: true,
|
|
475
|
+
requiredFor: "idempotency"
|
|
469
476
|
})], IntakePlan.prototype, "digest", 2);
|
|
470
477
|
__decorateClass([field({
|
|
471
478
|
type: "json",
|
|
@@ -513,16 +520,22 @@ __publicField(IntakeAction, "__smrtPackage__", "@happyvertical/smrt-ingestion");
|
|
|
513
520
|
__decorateClass([tenantId()], IntakeAction.prototype, "tenantId", 2);
|
|
514
521
|
__decorateClass([field({
|
|
515
522
|
type: "text",
|
|
516
|
-
required: true
|
|
523
|
+
required: true,
|
|
524
|
+
requiredFor: "tenant-scope"
|
|
517
525
|
})], IntakeAction.prototype, "confidentialScopeId", 2);
|
|
518
|
-
__decorateClass([foreignKey("IntakeItem", {
|
|
526
|
+
__decorateClass([foreignKey("IntakeItem", {
|
|
527
|
+
required: true,
|
|
528
|
+
requiredFor: "identity"
|
|
529
|
+
})], IntakeAction.prototype, "itemId", 2);
|
|
519
530
|
__decorateClass([field({
|
|
520
531
|
type: "text",
|
|
521
|
-
required: true
|
|
532
|
+
required: true,
|
|
533
|
+
requiredFor: "identity"
|
|
522
534
|
})], IntakeAction.prototype, "actionKey", 2);
|
|
523
535
|
__decorateClass([field({
|
|
524
536
|
type: "text",
|
|
525
|
-
required: true
|
|
537
|
+
required: true,
|
|
538
|
+
requiredFor: "workflow-state"
|
|
526
539
|
})], IntakeAction.prototype, "state", 2);
|
|
527
540
|
__decorateClass([field({
|
|
528
541
|
type: "integer",
|
|
@@ -540,10 +553,7 @@ __decorateClass([field({
|
|
|
540
553
|
type: "integer",
|
|
541
554
|
required: true
|
|
542
555
|
})], IntakeAction.prototype, "fence", 2);
|
|
543
|
-
__decorateClass([field({
|
|
544
|
-
type: "text",
|
|
545
|
-
required: true
|
|
546
|
-
})], IntakeAction.prototype, "resultDigest", 2);
|
|
556
|
+
__decorateClass([field({ type: "text" })], IntakeAction.prototype, "resultDigest", 2);
|
|
547
557
|
__decorateClass([field({
|
|
548
558
|
type: "json",
|
|
549
559
|
required: true
|
|
@@ -594,19 +604,33 @@ __publicField(IntakeProposal, "__smrtPackage__", "@happyvertical/smrt-ingestion"
|
|
|
594
604
|
__decorateClass([tenantId()], IntakeProposal.prototype, "tenantId", 2);
|
|
595
605
|
__decorateClass([field({
|
|
596
606
|
type: "text",
|
|
597
|
-
required: true
|
|
607
|
+
required: true,
|
|
608
|
+
requiredFor: "tenant-scope"
|
|
598
609
|
})], IntakeProposal.prototype, "confidentialScopeId", 2);
|
|
599
|
-
__decorateClass([foreignKey("IntakeItem", {
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
610
|
+
__decorateClass([foreignKey("IntakeItem", {
|
|
611
|
+
required: true,
|
|
612
|
+
requiredFor: "identity"
|
|
613
|
+
})], IntakeProposal.prototype, "itemId", 2);
|
|
614
|
+
__decorateClass([foreignKey("IntakeAction", {
|
|
615
|
+
required: true,
|
|
616
|
+
requiredFor: "identity"
|
|
617
|
+
})], IntakeProposal.prototype, "actionId", 2);
|
|
618
|
+
__decorateClass([foreignKey("IntakeAnalysis", {
|
|
619
|
+
required: true,
|
|
620
|
+
requiredFor: "identity"
|
|
621
|
+
})], IntakeProposal.prototype, "analysisId", 2);
|
|
622
|
+
__decorateClass([foreignKey("IntakeAnalysisAttempt", {
|
|
623
|
+
required: true,
|
|
624
|
+
requiredFor: "identity"
|
|
625
|
+
})], IntakeProposal.prototype, "analysisAttemptId", 2);
|
|
603
626
|
__decorateClass([field({
|
|
604
627
|
type: "integer",
|
|
605
628
|
required: true
|
|
606
629
|
})], IntakeProposal.prototype, "revision", 2);
|
|
607
630
|
__decorateClass([field({
|
|
608
631
|
type: "text",
|
|
609
|
-
required: true
|
|
632
|
+
required: true,
|
|
633
|
+
requiredFor: "integrity"
|
|
610
634
|
})], IntakeProposal.prototype, "bindingHash", 2);
|
|
611
635
|
__decorateClass([field({
|
|
612
636
|
type: "json",
|
|
@@ -651,22 +675,34 @@ __publicField(IntakeReviewDecision, "__smrtPackage__", "@happyvertical/smrt-inge
|
|
|
651
675
|
__decorateClass([tenantId()], IntakeReviewDecision.prototype, "tenantId", 2);
|
|
652
676
|
__decorateClass([field({
|
|
653
677
|
type: "text",
|
|
654
|
-
required: true
|
|
678
|
+
required: true,
|
|
679
|
+
requiredFor: "tenant-scope"
|
|
655
680
|
})], IntakeReviewDecision.prototype, "confidentialScopeId", 2);
|
|
656
|
-
__decorateClass([foreignKey("IntakeItem", {
|
|
657
|
-
|
|
658
|
-
|
|
681
|
+
__decorateClass([foreignKey("IntakeItem", {
|
|
682
|
+
required: true,
|
|
683
|
+
requiredFor: "identity"
|
|
684
|
+
})], IntakeReviewDecision.prototype, "itemId", 2);
|
|
685
|
+
__decorateClass([foreignKey("IntakeAction", {
|
|
686
|
+
required: true,
|
|
687
|
+
requiredFor: "identity"
|
|
688
|
+
})], IntakeReviewDecision.prototype, "actionId", 2);
|
|
689
|
+
__decorateClass([foreignKey("IntakeProposal", {
|
|
690
|
+
required: true,
|
|
691
|
+
requiredFor: "identity"
|
|
692
|
+
})], IntakeReviewDecision.prototype, "proposalId", 2);
|
|
659
693
|
__decorateClass([field({
|
|
660
694
|
type: "integer",
|
|
661
695
|
required: true
|
|
662
696
|
})], IntakeReviewDecision.prototype, "reviewVersion", 2);
|
|
663
697
|
__decorateClass([field({
|
|
664
698
|
type: "text",
|
|
665
|
-
required: true
|
|
699
|
+
required: true,
|
|
700
|
+
requiredFor: "integrity"
|
|
666
701
|
})], IntakeReviewDecision.prototype, "bindingHash", 2);
|
|
667
702
|
__decorateClass([field({
|
|
668
703
|
type: "text",
|
|
669
|
-
required: true
|
|
704
|
+
required: true,
|
|
705
|
+
requiredFor: "workflow-state"
|
|
670
706
|
})], IntakeReviewDecision.prototype, "decision", 2);
|
|
671
707
|
__decorateClass([field({
|
|
672
708
|
type: "json",
|
|
@@ -713,10 +749,17 @@ __publicField(IntakeExecution, "__smrtPackage__", "@happyvertical/smrt-ingestion
|
|
|
713
749
|
__decorateClass([tenantId()], IntakeExecution.prototype, "tenantId", 2);
|
|
714
750
|
__decorateClass([field({
|
|
715
751
|
type: "text",
|
|
716
|
-
required: true
|
|
752
|
+
required: true,
|
|
753
|
+
requiredFor: "tenant-scope"
|
|
717
754
|
})], IntakeExecution.prototype, "confidentialScopeId", 2);
|
|
718
|
-
__decorateClass([foreignKey("IntakeItem", {
|
|
719
|
-
|
|
755
|
+
__decorateClass([foreignKey("IntakeItem", {
|
|
756
|
+
required: true,
|
|
757
|
+
requiredFor: "identity"
|
|
758
|
+
})], IntakeExecution.prototype, "itemId", 2);
|
|
759
|
+
__decorateClass([foreignKey("IntakeAction", {
|
|
760
|
+
required: true,
|
|
761
|
+
requiredFor: "identity"
|
|
762
|
+
})], IntakeExecution.prototype, "actionId", 2);
|
|
720
763
|
__decorateClass([field({
|
|
721
764
|
type: "integer",
|
|
722
765
|
required: true
|
|
@@ -727,19 +770,19 @@ __decorateClass([field({
|
|
|
727
770
|
})], IntakeExecution.prototype, "fence", 2);
|
|
728
771
|
__decorateClass([field({
|
|
729
772
|
type: "text",
|
|
730
|
-
required: true
|
|
773
|
+
required: true,
|
|
774
|
+
requiredFor: "workflow-state"
|
|
731
775
|
})], IntakeExecution.prototype, "state", 2);
|
|
732
776
|
__decorateClass([field({
|
|
733
777
|
type: "text",
|
|
734
|
-
required: true
|
|
778
|
+
required: true,
|
|
779
|
+
requiredFor: "integrity"
|
|
735
780
|
})], IntakeExecution.prototype, "bindingHash", 2);
|
|
781
|
+
__decorateClass([field({ type: "text" })], IntakeExecution.prototype, "resultDigest", 2);
|
|
736
782
|
__decorateClass([field({
|
|
737
783
|
type: "text",
|
|
738
|
-
required: true
|
|
739
|
-
|
|
740
|
-
__decorateClass([field({
|
|
741
|
-
type: "text",
|
|
742
|
-
required: true
|
|
784
|
+
required: true,
|
|
785
|
+
requiredFor: "idempotency"
|
|
743
786
|
})], IntakeExecution.prototype, "idempotencyKey", 2);
|
|
744
787
|
__decorateClass([field({
|
|
745
788
|
type: "json",
|
|
@@ -789,17 +832,23 @@ __publicField(IntakeFeedback, "__smrtPackage__", "@happyvertical/smrt-ingestion"
|
|
|
789
832
|
__decorateClass([tenantId()], IntakeFeedback.prototype, "tenantId", 2);
|
|
790
833
|
__decorateClass([field({
|
|
791
834
|
type: "text",
|
|
792
|
-
required: true
|
|
835
|
+
required: true,
|
|
836
|
+
requiredFor: "tenant-scope"
|
|
793
837
|
})], IntakeFeedback.prototype, "confidentialScopeId", 2);
|
|
794
|
-
__decorateClass([foreignKey("IntakeItem", {
|
|
838
|
+
__decorateClass([foreignKey("IntakeItem", {
|
|
839
|
+
required: true,
|
|
840
|
+
requiredFor: "identity"
|
|
841
|
+
})], IntakeFeedback.prototype, "itemId", 2);
|
|
795
842
|
__decorateClass([field({
|
|
796
843
|
type: "text",
|
|
797
|
-
required: true
|
|
844
|
+
required: true,
|
|
845
|
+
requiredFor: "identity"
|
|
798
846
|
})], IntakeFeedback.prototype, "requestKey", 2);
|
|
799
847
|
__decorateClass([foreignKey("IntakeFeedback", { nullable: true })], IntakeFeedback.prototype, "supersedesId", 2);
|
|
800
848
|
__decorateClass([field({
|
|
801
849
|
type: "text",
|
|
802
|
-
required: true
|
|
850
|
+
required: true,
|
|
851
|
+
requiredFor: "identity"
|
|
803
852
|
})], IntakeFeedback.prototype, "kind", 2);
|
|
804
853
|
__decorateClass([field({
|
|
805
854
|
type: "json",
|
|
@@ -844,12 +893,17 @@ __publicField(IntakeDispatch, "__smrtPackage__", "@happyvertical/smrt-ingestion"
|
|
|
844
893
|
__decorateClass([tenantId()], IntakeDispatch.prototype, "tenantId", 2);
|
|
845
894
|
__decorateClass([field({
|
|
846
895
|
type: "text",
|
|
847
|
-
required: true
|
|
896
|
+
required: true,
|
|
897
|
+
requiredFor: "tenant-scope"
|
|
848
898
|
})], IntakeDispatch.prototype, "confidentialScopeId", 2);
|
|
849
|
-
__decorateClass([foreignKey("IntakeItem", {
|
|
899
|
+
__decorateClass([foreignKey("IntakeItem", {
|
|
900
|
+
required: true,
|
|
901
|
+
requiredFor: "identity"
|
|
902
|
+
})], IntakeDispatch.prototype, "itemId", 2);
|
|
850
903
|
__decorateClass([field({
|
|
851
904
|
type: "text",
|
|
852
|
-
required: true
|
|
905
|
+
required: true,
|
|
906
|
+
requiredFor: "identity"
|
|
853
907
|
})], IntakeDispatch.prototype, "stage", 2);
|
|
854
908
|
__decorateClass([field({
|
|
855
909
|
type: "integer",
|
|
@@ -857,12 +911,10 @@ __decorateClass([field({
|
|
|
857
911
|
})], IntakeDispatch.prototype, "revision", 2);
|
|
858
912
|
__decorateClass([field({
|
|
859
913
|
type: "text",
|
|
860
|
-
required: true
|
|
914
|
+
required: true,
|
|
915
|
+
requiredFor: "workflow-state"
|
|
861
916
|
})], IntakeDispatch.prototype, "state", 2);
|
|
862
|
-
__decorateClass([field({
|
|
863
|
-
type: "text",
|
|
864
|
-
required: true
|
|
865
|
-
})], IntakeDispatch.prototype, "jobId", 2);
|
|
917
|
+
__decorateClass([field({ type: "text" })], IntakeDispatch.prototype, "jobId", 2);
|
|
866
918
|
__decorateClass([field({
|
|
867
919
|
type: "integer",
|
|
868
920
|
required: true
|
|
@@ -915,17 +967,19 @@ __publicField(IntakeDisposition, "__smrtPackage__", "@happyvertical/smrt-ingesti
|
|
|
915
967
|
__decorateClass([tenantId()], IntakeDisposition.prototype, "tenantId", 2);
|
|
916
968
|
__decorateClass([field({
|
|
917
969
|
type: "text",
|
|
918
|
-
required: true
|
|
970
|
+
required: true,
|
|
971
|
+
requiredFor: "tenant-scope"
|
|
919
972
|
})], IntakeDisposition.prototype, "confidentialScopeId", 2);
|
|
920
|
-
__decorateClass([foreignKey("IntakeItem", {
|
|
973
|
+
__decorateClass([foreignKey("IntakeItem", {
|
|
974
|
+
required: true,
|
|
975
|
+
requiredFor: "identity"
|
|
976
|
+
})], IntakeDisposition.prototype, "itemId", 2);
|
|
921
977
|
__decorateClass([field({
|
|
922
978
|
type: "text",
|
|
923
|
-
required: true
|
|
979
|
+
required: true,
|
|
980
|
+
requiredFor: "identity"
|
|
924
981
|
})], IntakeDisposition.prototype, "requestKey", 2);
|
|
925
|
-
__decorateClass([field({
|
|
926
|
-
type: "text",
|
|
927
|
-
required: true
|
|
928
|
-
})], IntakeDisposition.prototype, "disposition", 2);
|
|
982
|
+
__decorateClass([field({ type: "text" })], IntakeDisposition.prototype, "disposition", 2);
|
|
929
983
|
__decorateClass([field({
|
|
930
984
|
type: "json",
|
|
931
985
|
required: true
|
|
@@ -965,12 +1019,17 @@ __publicField(IntakeDeletion, "__smrtPackage__", "@happyvertical/smrt-ingestion"
|
|
|
965
1019
|
__decorateClass([tenantId()], IntakeDeletion.prototype, "tenantId", 2);
|
|
966
1020
|
__decorateClass([field({
|
|
967
1021
|
type: "text",
|
|
968
|
-
required: true
|
|
1022
|
+
required: true,
|
|
1023
|
+
requiredFor: "tenant-scope"
|
|
969
1024
|
})], IntakeDeletion.prototype, "confidentialScopeId", 2);
|
|
970
|
-
__decorateClass([foreignKey("IntakeItem", {
|
|
1025
|
+
__decorateClass([foreignKey("IntakeItem", {
|
|
1026
|
+
required: true,
|
|
1027
|
+
requiredFor: "identity"
|
|
1028
|
+
})], IntakeDeletion.prototype, "itemId", 2);
|
|
971
1029
|
__decorateClass([field({
|
|
972
1030
|
type: "text",
|
|
973
|
-
required: true
|
|
1031
|
+
required: true,
|
|
1032
|
+
requiredFor: "workflow-state"
|
|
974
1033
|
})], IntakeDeletion.prototype, "state", 2);
|
|
975
1034
|
__decorateClass([field({
|
|
976
1035
|
type: "json",
|