@happyvertical/smrt-ingestion 0.74.7 → 0.75.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/manifest.json +1 -1
- package/dist/models.js +1 -1
- package/dist/models.js.map +1 -1
- package/dist/smrt-knowledge.json +4 -4
- package/package.json +14 -14
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.74.7","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}`));
|
|
4
|
+
ObjectRegistry.registerPackageManifest(JSON.parse(`{"version":"1.0.0","timestamp":0,"packageName":"@happyvertical/smrt-ingestion","packageVersion":"0.75.0","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;
|