@happyvertical/smrt-education 0.57.38 → 0.57.40

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/index.js CHANGED
@@ -2,7 +2,7 @@ import { $ as EnrollmentCollection, A as WorkbookFeedbackRelease, At as Exercise
2
2
  import { ObjectRegistry, SmrtCollection, SmrtObject, SmrtRecipe, field, foreignKey, isEmbeddedDatabase, isPostgresDatabase, smrt, withEmbeddedWriteQueue } from "@happyvertical/smrt-core";
3
3
  import { TenantScoped, getCurrentTenant, tenantId } from "@happyvertical/smrt-tenancy";
4
4
  //#region src/__smrt-register__.ts
5
- ObjectRegistry.registerPackageManifest(JSON.parse(`{"version":"1.0.0","timestamp":0,"packageName":"@happyvertical/smrt-education","packageVersion":"0.57.38","objects":{"@happyvertical/smrt-education:CatalogProviderCollection":{"name":"catalogprovidercollection","className":"CatalogProviderCollection","qualifiedName":"@happyvertical/smrt-education:CatalogProviderCollection","collection":"catalogproviders","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"CatalogProvider","exportName":"CatalogProviderCollection","collectionExportName":"CatalogProviderCollectionCollection","schema":{"tableName":"catalog_providers","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_providers\\" (\\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 \\"provider_id\\" TEXT NOT NULL,\\n \\"name\\" TEXT NOT NULL,\\n \\"active\\" BOOLEAN NOT NULL DEFAULT TRUE\\n);","columns":{"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"},"provider_id":{"type":"TEXT","notNull":true,"unique":false},"name":{"type":"TEXT","notNull":true,"unique":false},"active":{"type":"BOOLEAN","notNull":true,"unique":false,"default":true}},"indexes":[{"name":"catalog_providers_slug_context_idx","columns":["slug","context"],"unique":true},{"name":"catalog_providers_created_at_idx","columns":["created_at"]}],"version":"f35557a4"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogResourceCollection":{"name":"catalogresourcecollection","className":"CatalogResourceCollection","qualifiedName":"@happyvertical/smrt-education:CatalogResourceCollection","collection":"catalogresources","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"CatalogResource","exportName":"CatalogResourceCollection","collectionExportName":"CatalogResourceCollectionCollection","schema":{"tableName":"catalog_resources","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_resources\\" (\\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 \\"provider_id\\" TEXT NOT NULL,\\n \\"stable_id\\" TEXT NOT NULL,\\n \\"revision\\" TEXT NOT NULL,\\n \\"canonical_url\\" TEXT,\\n \\"title\\" TEXT NOT NULL,\\n \\"supplied_description\\" TEXT,\\n \\"author\\" TEXT,\\n \\"subjects\\" TEXT,\\n \\"grades\\" TEXT,\\n \\"language\\" TEXT,\\n \\"resource_type\\" TEXT,\\n \\"parent_stable_id\\" TEXT,\\n \\"available_formats\\" TEXT,\\n \\"representation\\" TEXT,\\n \\"license_evidence\\" TEXT,\\n \\"license_state\\" TEXT DEFAULT 'unknown',\\n \\"visibility\\" TEXT DEFAULT 'catalog',\\n \\"last_seen_run_id\\" TEXT,\\n \\"withdrawn_at\\" TEXT\\n);","columns":{"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"},"provider_id":{"type":"TEXT","notNull":true,"unique":false},"stable_id":{"type":"TEXT","notNull":true,"unique":false},"revision":{"type":"TEXT","notNull":true,"unique":false},"canonical_url":{"type":"TEXT","notNull":false,"unique":false},"title":{"type":"TEXT","notNull":true,"unique":false},"supplied_description":{"type":"TEXT","notNull":false,"unique":false},"author":{"type":"TEXT","notNull":false,"unique":false},"subjects":{"type":"TEXT","notNull":false,"unique":false},"grades":{"type":"TEXT","notNull":false,"unique":false},"language":{"type":"TEXT","notNull":false,"unique":false},"resource_type":{"type":"TEXT","notNull":false,"unique":false},"parent_stable_id":{"type":"TEXT","notNull":false,"unique":false},"available_formats":{"type":"TEXT","notNull":false,"unique":false},"representation":{"type":"TEXT","notNull":false,"unique":false},"license_evidence":{"type":"TEXT","notNull":false,"unique":false},"license_state":{"type":"TEXT","notNull":false,"unique":false,"default":"unknown"},"visibility":{"type":"TEXT","notNull":false,"unique":false,"default":"catalog"},"last_seen_run_id":{"type":"TEXT","notNull":false,"unique":false},"withdrawn_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"catalog_resources_slug_context_idx","columns":["slug","context"],"unique":true},{"name":"catalog_resources_created_at_idx","columns":["created_at"]}],"version":"e75f6bd0"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogSyncStateCollection":{"name":"catalogsyncstatecollection","className":"CatalogSyncStateCollection","qualifiedName":"@happyvertical/smrt-education:CatalogSyncStateCollection","collection":"catalogsyncstates","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"CatalogSyncState","exportName":"CatalogSyncStateCollection","collectionExportName":"CatalogSyncStateCollectionCollection","schema":{"tableName":"catalog_sync_states","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_sync_states\\" (\\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 \\"provider_id\\" TEXT NOT NULL,\\n \\"cursor\\" TEXT,\\n \\"run_id\\" TEXT,\\n \\"complete\\" BOOLEAN NOT NULL DEFAULT FALSE,\\n \\"paused\\" BOOLEAN NOT NULL DEFAULT FALSE,\\n \\"pause_reason\\" TEXT,\\n \\"imported_count\\" INTEGER NOT NULL DEFAULT 0,\\n \\"failures\\" TEXT,\\n \\"last_successful_at\\" TEXT\\n);","columns":{"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"},"provider_id":{"type":"TEXT","notNull":true,"unique":false},"cursor":{"type":"TEXT","notNull":false,"unique":false},"run_id":{"type":"TEXT","notNull":false,"unique":false},"complete":{"type":"BOOLEAN","notNull":true,"unique":false,"default":false},"paused":{"type":"BOOLEAN","notNull":true,"unique":false,"default":false},"pause_reason":{"type":"TEXT","notNull":false,"unique":false},"imported_count":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"failures":{"type":"TEXT","notNull":false,"unique":false},"last_successful_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"catalog_sync_states_slug_context_idx","columns":["slug","context"],"unique":true},{"name":"catalog_sync_states_created_at_idx","columns":["created_at"]}],"version":"52dc3ee1"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogSelectionCollection":{"name":"catalogselectioncollection","className":"CatalogSelectionCollection","qualifiedName":"@happyvertical/smrt-education:CatalogSelectionCollection","collection":"catalogselections","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"CatalogSelection","exportName":"CatalogSelectionCollection","collectionExportName":"CatalogSelectionCollectionCollection","schema":{"tableName":"catalog_selections","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_selections\\" (\\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 \\"resource_id\\" UUID NOT NULL,\\n \\"selected_by_user_id\\" TEXT NOT NULL,\\n \\"selected_revision\\" TEXT NOT NULL\\n);","columns":{"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},"resource_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"catalog_resources","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"selected_by_user_id":{"type":"TEXT","notNull":true,"unique":false},"selected_revision":{"type":"TEXT","notNull":true,"unique":false}},"indexes":[{"name":"catalog_selections_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"catalog_selections_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"catalog_selections_resource_id_idx","columns":["resource_id"]}],"version":"c6b02eb9"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogAcquisitionCollection":{"name":"catalogacquisitioncollection","className":"CatalogAcquisitionCollection","qualifiedName":"@happyvertical/smrt-education:CatalogAcquisitionCollection","collection":"catalogacquisitions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"CatalogAcquisition","exportName":"CatalogAcquisitionCollection","collectionExportName":"CatalogAcquisitionCollectionCollection","schema":{"tableName":"catalog_acquisitions","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_acquisitions\\" (\\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 \\"resource_id\\" UUID NOT NULL,\\n \\"selection_id\\" UUID NOT NULL,\\n \\"revision\\" TEXT NOT NULL,\\n \\"format\\" TEXT NOT NULL,\\n \\"sha256\\" TEXT NOT NULL,\\n \\"attribution\\" TEXT,\\n \\"notices\\" TEXT\\n);","columns":{"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},"resource_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"catalog_resources","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"selection_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"catalog_selections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"revision":{"type":"TEXT","notNull":true,"unique":false},"format":{"type":"TEXT","notNull":true,"unique":false},"sha256":{"type":"TEXT","notNull":true,"unique":false},"attribution":{"type":"TEXT","notNull":false,"unique":false},"notices":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"catalog_acquisitions_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"catalog_acquisitions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"catalog_acquisitions_resource_id_idx","columns":["resource_id"]},{"name":"catalog_acquisitions_selection_id_idx","columns":["selection_id"]}],"version":"ee9c5add"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogProvider":{"name":"catalogprovider","className":"CatalogProvider","qualifiedName":"@happyvertical/smrt-education:CatalogProvider","collection":"catalogproviders","description":"Globally visible provider registration. Hosts configure adapters and credentials out of band.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-models.ts","packageName":"@happyvertical/smrt-education","fields":{"providerId":{"type":"text","required":true,"_meta":{"required":true}},"name":{"type":"text","required":true,"_meta":{"required":true}},"active":{"type":"boolean","required":true,"default":true}},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtObject","exportName":"CatalogProvider","collectionExportName":"CatalogProviderCollection","displayLabelField":"name","validationRules":[{"field":"providerId","rule":"required","fieldType":"text"},{"field":"name","rule":"required","fieldType":"text"},{"field":"active","rule":"required","fieldType":"boolean"}],"schema":{"tableName":"catalog_providers","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_providers\\" (\\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 \\"provider_id\\" TEXT NOT NULL,\\n \\"name\\" TEXT NOT NULL,\\n \\"active\\" BOOLEAN NOT NULL DEFAULT TRUE\\n);","columns":{"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"},"provider_id":{"type":"TEXT","notNull":true,"unique":false},"name":{"type":"TEXT","notNull":true,"unique":false},"active":{"type":"BOOLEAN","notNull":true,"unique":false,"default":true}},"indexes":[{"name":"catalog_providers_slug_context_idx","columns":["slug","context"],"unique":true},{"name":"catalog_providers_created_at_idx","columns":["created_at"]}],"version":"f35557a4"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogResource":{"name":"catalogresource","className":"CatalogResource","qualifiedName":"@happyvertical/smrt-education:CatalogResource","collection":"catalogresources","description":"A provider-native record. Rows are intentionally not merged across providers.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-models.ts","packageName":"@happyvertical/smrt-education","fields":{"providerId":{"type":"text","required":true,"_meta":{"required":true}},"stableId":{"type":"text","required":true,"_meta":{"required":true}},"revision":{"type":"text","required":true,"_meta":{"required":true}},"canonicalUrl":{"type":"text","required":false},"title":{"type":"text","required":true,"_meta":{"required":true}},"suppliedDescription":{"type":"text","required":false},"author":{"type":"text","required":false},"subjects":{"type":"text","required":false},"grades":{"type":"text","required":false},"language":{"type":"text","required":false},"resourceType":{"type":"text","required":false},"parentStableId":{"type":"text","required":false},"availableFormats":{"type":"text","required":false},"representation":{"type":"text","required":false},"licenseEvidence":{"type":"text","required":false},"licenseState":{"type":"text","required":false,"default":"unknown","enum":["verified","unknown","conflicting","restricted"]},"visibility":{"type":"text","required":false,"default":"catalog","enum":["catalog","teacher"]},"lastSeenRunId":{"type":"text","required":false},"withdrawnAt":{"type":"text","required":false}},"methods":{"getRepresentation":{"name":"getRepresentation","async":false,"parameters":[],"returnType":"CatalogResourceRepresentation | undefined","isStatic":false,"isPublic":true},"setRepresentation":{"name":"setRepresentation","async":false,"parameters":[{"name":"value","type":"CatalogResourceRepresentation | undefined","optional":false,"unionBranches":[{"type":"CatalogResourceRepresentation"},{"type":"undefined"}]}],"returnType":"void","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtObject","exportName":"CatalogResource","collectionExportName":"CatalogResourceCollection","displayLabelField":"title","validationRules":[{"field":"providerId","rule":"required","fieldType":"text"},{"field":"stableId","rule":"required","fieldType":"text"},{"field":"revision","rule":"required","fieldType":"text"},{"field":"title","rule":"required","fieldType":"text"}],"schema":{"tableName":"catalog_resources","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_resources\\" (\\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 \\"provider_id\\" TEXT NOT NULL,\\n \\"stable_id\\" TEXT NOT NULL,\\n \\"revision\\" TEXT NOT NULL,\\n \\"canonical_url\\" TEXT,\\n \\"title\\" TEXT NOT NULL,\\n \\"supplied_description\\" TEXT,\\n \\"author\\" TEXT,\\n \\"subjects\\" TEXT,\\n \\"grades\\" TEXT,\\n \\"language\\" TEXT,\\n \\"resource_type\\" TEXT,\\n \\"parent_stable_id\\" TEXT,\\n \\"available_formats\\" TEXT,\\n \\"representation\\" TEXT,\\n \\"license_evidence\\" TEXT,\\n \\"license_state\\" TEXT DEFAULT 'unknown',\\n \\"visibility\\" TEXT DEFAULT 'catalog',\\n \\"last_seen_run_id\\" TEXT,\\n \\"withdrawn_at\\" TEXT\\n);","columns":{"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"},"provider_id":{"type":"TEXT","notNull":true,"unique":false},"stable_id":{"type":"TEXT","notNull":true,"unique":false},"revision":{"type":"TEXT","notNull":true,"unique":false},"canonical_url":{"type":"TEXT","notNull":false,"unique":false},"title":{"type":"TEXT","notNull":true,"unique":false},"supplied_description":{"type":"TEXT","notNull":false,"unique":false},"author":{"type":"TEXT","notNull":false,"unique":false},"subjects":{"type":"TEXT","notNull":false,"unique":false},"grades":{"type":"TEXT","notNull":false,"unique":false},"language":{"type":"TEXT","notNull":false,"unique":false},"resource_type":{"type":"TEXT","notNull":false,"unique":false},"parent_stable_id":{"type":"TEXT","notNull":false,"unique":false},"available_formats":{"type":"TEXT","notNull":false,"unique":false},"representation":{"type":"TEXT","notNull":false,"unique":false},"license_evidence":{"type":"TEXT","notNull":false,"unique":false},"license_state":{"type":"TEXT","notNull":false,"unique":false,"default":"unknown"},"visibility":{"type":"TEXT","notNull":false,"unique":false,"default":"catalog"},"last_seen_run_id":{"type":"TEXT","notNull":false,"unique":false},"withdrawn_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"catalog_resources_slug_context_idx","columns":["slug","context"],"unique":true},{"name":"catalog_resources_created_at_idx","columns":["created_at"]}],"version":"e75f6bd0"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogSyncState":{"name":"catalogsyncstate","className":"CatalogSyncState","qualifiedName":"@happyvertical/smrt-education:CatalogSyncState","collection":"catalogsyncstates","description":"Durable per-provider enumeration state. A failed or partial feed is never complete.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-models.ts","packageName":"@happyvertical/smrt-education","fields":{"providerId":{"type":"text","required":true,"_meta":{"required":true}},"cursor":{"type":"text","required":false},"runId":{"type":"text","required":false},"complete":{"type":"boolean","required":true,"default":false},"paused":{"type":"boolean","required":true,"default":false},"pauseReason":{"type":"text","required":false},"importedCount":{"type":"integer","required":true,"default":0},"failures":{"type":"text","required":false},"lastSuccessfulAt":{"type":"text","required":false}},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtObject","exportName":"CatalogSyncState","collectionExportName":"CatalogSyncStateCollection","validationRules":[{"field":"providerId","rule":"required","fieldType":"text"},{"field":"complete","rule":"required","fieldType":"boolean"},{"field":"paused","rule":"required","fieldType":"boolean"},{"field":"importedCount","rule":"required","fieldType":"integer"}],"schema":{"tableName":"catalog_sync_states","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_sync_states\\" (\\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 \\"provider_id\\" TEXT NOT NULL,\\n \\"cursor\\" TEXT,\\n \\"run_id\\" TEXT,\\n \\"complete\\" BOOLEAN NOT NULL DEFAULT FALSE,\\n \\"paused\\" BOOLEAN NOT NULL DEFAULT FALSE,\\n \\"pause_reason\\" TEXT,\\n \\"imported_count\\" INTEGER NOT NULL DEFAULT 0,\\n \\"failures\\" TEXT,\\n \\"last_successful_at\\" TEXT\\n);","columns":{"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"},"provider_id":{"type":"TEXT","notNull":true,"unique":false},"cursor":{"type":"TEXT","notNull":false,"unique":false},"run_id":{"type":"TEXT","notNull":false,"unique":false},"complete":{"type":"BOOLEAN","notNull":true,"unique":false,"default":false},"paused":{"type":"BOOLEAN","notNull":true,"unique":false,"default":false},"pause_reason":{"type":"TEXT","notNull":false,"unique":false},"imported_count":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"failures":{"type":"TEXT","notNull":false,"unique":false},"last_successful_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"catalog_sync_states_slug_context_idx","columns":["slug","context"],"unique":true},{"name":"catalog_sync_states_created_at_idx","columns":["created_at"]}],"version":"52dc3ee1"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogSelection":{"name":"catalogselection","className":"CatalogSelection","qualifiedName":"@happyvertical/smrt-education:CatalogSelection","collection":"catalogselections","description":"Tenant-owned intent to use a metadata record, distinct from acquiring bytes.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"resourceId":{"type":"foreignKey","required":true,"related":"CatalogResource","_meta":{"required":true}},"selectedByUserId":{"type":"text","required":true,"_meta":{"required":true}},"selectedRevision":{"type":"text","required":true,"_meta":{"required":true}}},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"CatalogSelection","collectionExportName":"CatalogSelectionCollection","validationRules":[{"field":"resourceId","rule":"required","fieldType":"foreignKey"},{"field":"selectedByUserId","rule":"required","fieldType":"text"},{"field":"selectedRevision","rule":"required","fieldType":"text"}],"schema":{"tableName":"catalog_selections","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_selections\\" (\\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 \\"resource_id\\" UUID NOT NULL,\\n \\"selected_by_user_id\\" TEXT NOT NULL,\\n \\"selected_revision\\" TEXT NOT NULL\\n);","columns":{"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},"resource_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"catalog_resources","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"selected_by_user_id":{"type":"TEXT","notNull":true,"unique":false},"selected_revision":{"type":"TEXT","notNull":true,"unique":false}},"indexes":[{"name":"catalog_selections_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"catalog_selections_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"catalog_selections_resource_id_idx","columns":["resource_id"]}],"version":"c6b02eb9"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogAcquisition":{"name":"catalogacquisition","className":"CatalogAcquisition","qualifiedName":"@happyvertical/smrt-education:CatalogAcquisition","collection":"catalogacquisitions","description":"A pinned, tenant-owned acquisition record. Bytes belong in a host storage service.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"resourceId":{"type":"foreignKey","required":true,"related":"CatalogResource","_meta":{"required":true}},"selectionId":{"type":"foreignKey","required":true,"related":"CatalogSelection","_meta":{"required":true}},"revision":{"type":"text","required":true,"_meta":{"required":true}},"format":{"type":"text","required":true,"_meta":{"required":true}},"sha256":{"type":"text","required":true,"_meta":{"required":true}},"attribution":{"type":"text","required":false},"notices":{"type":"text","required":false}},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"CatalogAcquisition","collectionExportName":"CatalogAcquisitionCollection","validationRules":[{"field":"resourceId","rule":"required","fieldType":"foreignKey"},{"field":"selectionId","rule":"required","fieldType":"foreignKey"},{"field":"revision","rule":"required","fieldType":"text"},{"field":"format","rule":"required","fieldType":"text"},{"field":"sha256","rule":"required","fieldType":"text"}],"schema":{"tableName":"catalog_acquisitions","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_acquisitions\\" (\\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 \\"resource_id\\" UUID NOT NULL,\\n \\"selection_id\\" UUID NOT NULL,\\n \\"revision\\" TEXT NOT NULL,\\n \\"format\\" TEXT NOT NULL,\\n \\"sha256\\" TEXT NOT NULL,\\n \\"attribution\\" TEXT,\\n \\"notices\\" TEXT\\n);","columns":{"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},"resource_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"catalog_resources","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"selection_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"catalog_selections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"revision":{"type":"TEXT","notNull":true,"unique":false},"format":{"type":"TEXT","notNull":true,"unique":false},"sha256":{"type":"TEXT","notNull":true,"unique":false},"attribution":{"type":"TEXT","notNull":false,"unique":false},"notices":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"catalog_acquisitions_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"catalog_acquisitions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"catalog_acquisitions_resource_id_idx","columns":["resource_id"]},{"name":"catalog_acquisitions_selection_id_idx","columns":["selection_id"]}],"version":"ee9c5add"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Course":{"name":"course","className":"Course","qualifiedName":"@happyvertical/smrt-education:Course","collection":"courses","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true,"mode":"optional","field":"tenantId","allowSuperAdminBypass":false}}},"title":{"type":"text","required":true,"_meta":{"required":true}},"summary":{"type":"text","required":false},"description":{"type":"text","required":false},"sourceKey":{"type":"text","required":false},"sourceUrl":{"type":"text","required":false},"sourceRef":{"type":"text","required":false},"license":{"type":"text","required":false},"licenseKind":{"type":"text","required":false,"default":"own-work","enum":["own-work","open-license","personal-use-copy","licensed-for-sharing"]},"licenseNote":{"type":"text","required":false},"attestedBy":{"type":"text","required":false},"subject":{"type":"text","required":false},"tags":{"type":"text","required":false},"levelMin":{"type":"integer","required":true,"default":0},"levelMax":{"type":"integer","required":true,"default":0},"difficulty":{"type":"decimal","required":true,"default":0},"estimatedMinutes":{"type":"integer","required":true,"default":0},"modality":{"type":"text","required":false,"default":"online","enum":["online","printable","kit","video","game","mixed"]},"status":{"type":"text","required":false,"default":"draft","enum":["draft","published","archived"]}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableStrategy":"sti","api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"optional"},"conflictColumns":["tenant_id","slug","context","_meta_type"]},"extends":"SmrtObject","exportName":"Course","collectionExportName":"CourseCollection","displayLabelField":"title","validationRules":[{"field":"title","rule":"required","fieldType":"text"},{"field":"levelMin","rule":"required","fieldType":"integer"},{"field":"levelMax","rule":"required","fieldType":"integer"},{"field":"difficulty","rule":"required","fieldType":"decimal"},{"field":"estimatedMinutes","rule":"required","fieldType":"integer"}],"schema":{"tableName":"courses","ddl":"CREATE TABLE IF NOT EXISTS \\"courses\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"summary\\" TEXT,\\n \\"description\\" TEXT,\\n \\"source_key\\" TEXT,\\n \\"source_url\\" TEXT,\\n \\"source_ref\\" TEXT,\\n \\"license\\" TEXT,\\n \\"license_kind\\" TEXT DEFAULT 'own-work',\\n \\"license_note\\" TEXT,\\n \\"attested_by\\" TEXT,\\n \\"subject\\" TEXT,\\n \\"tags\\" TEXT,\\n \\"level_min\\" INTEGER DEFAULT 0,\\n \\"level_max\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"status\\" TEXT DEFAULT 'draft'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"title":{"type":"TEXT","notNull":false},"summary":{"type":"TEXT","notNull":false},"description":{"type":"TEXT","notNull":false},"source_key":{"type":"TEXT","notNull":false},"source_url":{"type":"TEXT","notNull":false},"source_ref":{"type":"TEXT","notNull":false},"license":{"type":"TEXT","notNull":false},"license_kind":{"type":"TEXT","notNull":false,"default":"own-work"},"license_note":{"type":"TEXT","notNull":false},"attested_by":{"type":"TEXT","notNull":false},"subject":{"type":"TEXT","notNull":false},"tags":{"type":"TEXT","notNull":false},"level_min":{"type":"INTEGER","notNull":false,"default":0},"level_max":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"status":{"type":"TEXT","notNull":false,"default":"draft"}},"indexes":[{"name":"courses_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"courses_meta_type_idx","columns":["_meta_type"]},{"name":"courses_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"88cc23ab"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:ExternalCourse":{"name":"externalcourse","className":"ExternalCourse","qualifiedName":"@happyvertical/smrt-education:ExternalCourse","collection":"courses","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true}}},"title":{"type":"text","required":true,"_meta":{"required":true}},"summary":{"type":"text","required":false},"description":{"type":"text","required":false},"sourceKey":{"type":"text","required":false},"sourceUrl":{"type":"text","required":false},"sourceRef":{"type":"text","required":false},"license":{"type":"text","required":false},"licenseKind":{"type":"text","required":false,"default":"own-work","enum":["own-work","open-license","personal-use-copy","licensed-for-sharing"]},"licenseNote":{"type":"text","required":false},"attestedBy":{"type":"text","required":false},"subject":{"type":"text","required":false},"tags":{"type":"text","required":false},"levelMin":{"type":"integer","required":true,"default":0},"levelMax":{"type":"integer","required":true,"default":0},"difficulty":{"type":"decimal","required":true,"default":0},"estimatedMinutes":{"type":"integer","required":true,"default":0},"modality":{"type":"text","required":false,"default":"online","enum":["online","printable","kit","video","game","mixed"]},"status":{"type":"text","required":false,"default":"draft","enum":["draft","published","archived"]}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"courses","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Course","exportName":"ExternalCourse","collectionExportName":"ExternalCourseCollection","displayLabelField":"title","validationRules":[{"field":"title","rule":"required","fieldType":"text"},{"field":"levelMin","rule":"required","fieldType":"integer"},{"field":"levelMax","rule":"required","fieldType":"integer"},{"field":"difficulty","rule":"required","fieldType":"decimal"},{"field":"estimatedMinutes","rule":"required","fieldType":"integer"}],"schema":{"tableName":"courses","ddl":"CREATE TABLE IF NOT EXISTS \\"courses\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"summary\\" TEXT,\\n \\"description\\" TEXT,\\n \\"source_key\\" TEXT,\\n \\"source_url\\" TEXT,\\n \\"source_ref\\" TEXT,\\n \\"license\\" TEXT,\\n \\"license_kind\\" TEXT DEFAULT 'own-work',\\n \\"license_note\\" TEXT,\\n \\"attested_by\\" TEXT,\\n \\"subject\\" TEXT,\\n \\"tags\\" TEXT,\\n \\"level_min\\" INTEGER DEFAULT 0,\\n \\"level_max\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"status\\" TEXT DEFAULT 'draft'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"title":{"type":"TEXT","notNull":false},"summary":{"type":"TEXT","notNull":false},"description":{"type":"TEXT","notNull":false},"source_key":{"type":"TEXT","notNull":false},"source_url":{"type":"TEXT","notNull":false},"source_ref":{"type":"TEXT","notNull":false},"license":{"type":"TEXT","notNull":false},"license_kind":{"type":"TEXT","notNull":false,"default":"own-work"},"license_note":{"type":"TEXT","notNull":false},"attested_by":{"type":"TEXT","notNull":false},"subject":{"type":"TEXT","notNull":false},"tags":{"type":"TEXT","notNull":false},"level_min":{"type":"INTEGER","notNull":false,"default":0},"level_max":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"status":{"type":"TEXT","notNull":false,"default":"draft"}},"indexes":[{"name":"courses_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"courses_meta_type_idx","columns":["_meta_type"]},{"name":"courses_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"88cc23ab"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:AuthoredCourse":{"name":"authoredcourse","className":"AuthoredCourse","qualifiedName":"@happyvertical/smrt-education:AuthoredCourse","collection":"courses","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true}}},"title":{"type":"text","required":true,"_meta":{"required":true}},"summary":{"type":"text","required":false},"description":{"type":"text","required":false},"sourceKey":{"type":"text","required":false},"sourceUrl":{"type":"text","required":false},"sourceRef":{"type":"text","required":false},"license":{"type":"text","required":false},"licenseKind":{"type":"text","required":false,"default":"own-work","enum":["own-work","open-license","personal-use-copy","licensed-for-sharing"]},"licenseNote":{"type":"text","required":false},"attestedBy":{"type":"text","required":false},"subject":{"type":"text","required":false},"tags":{"type":"text","required":false},"levelMin":{"type":"integer","required":true,"default":0},"levelMax":{"type":"integer","required":true,"default":0},"difficulty":{"type":"decimal","required":true,"default":0},"estimatedMinutes":{"type":"integer","required":true,"default":0},"modality":{"type":"text","required":false,"default":"online","enum":["online","printable","kit","video","game","mixed"]},"status":{"type":"text","required":false,"default":"draft","enum":["draft","published","archived"]}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"courses","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Course","exportName":"AuthoredCourse","collectionExportName":"AuthoredCourseCollection","displayLabelField":"title","validationRules":[{"field":"title","rule":"required","fieldType":"text"},{"field":"levelMin","rule":"required","fieldType":"integer"},{"field":"levelMax","rule":"required","fieldType":"integer"},{"field":"difficulty","rule":"required","fieldType":"decimal"},{"field":"estimatedMinutes","rule":"required","fieldType":"integer"}],"schema":{"tableName":"courses","ddl":"CREATE TABLE IF NOT EXISTS \\"courses\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"summary\\" TEXT,\\n \\"description\\" TEXT,\\n \\"source_key\\" TEXT,\\n \\"source_url\\" TEXT,\\n \\"source_ref\\" TEXT,\\n \\"license\\" TEXT,\\n \\"license_kind\\" TEXT DEFAULT 'own-work',\\n \\"license_note\\" TEXT,\\n \\"attested_by\\" TEXT,\\n \\"subject\\" TEXT,\\n \\"tags\\" TEXT,\\n \\"level_min\\" INTEGER DEFAULT 0,\\n \\"level_max\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"status\\" TEXT DEFAULT 'draft'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"title":{"type":"TEXT","notNull":false},"summary":{"type":"TEXT","notNull":false},"description":{"type":"TEXT","notNull":false},"source_key":{"type":"TEXT","notNull":false},"source_url":{"type":"TEXT","notNull":false},"source_ref":{"type":"TEXT","notNull":false},"license":{"type":"TEXT","notNull":false},"license_kind":{"type":"TEXT","notNull":false,"default":"own-work"},"license_note":{"type":"TEXT","notNull":false},"attested_by":{"type":"TEXT","notNull":false},"subject":{"type":"TEXT","notNull":false},"tags":{"type":"TEXT","notNull":false},"level_min":{"type":"INTEGER","notNull":false,"default":0},"level_max":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"status":{"type":"TEXT","notNull":false,"default":"draft"}},"indexes":[{"name":"courses_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"courses_meta_type_idx","columns":["_meta_type"]},{"name":"courses_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"88cc23ab"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CourseSection":{"name":"coursesection","className":"CourseSection","qualifiedName":"@happyvertical/smrt-education:CourseSection","collection":"coursesections","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true,"mode":"optional","field":"tenantId","allowSuperAdminBypass":false}}},"courseId":{"type":"foreignKey","required":true,"related":"Course","_meta":{"required":true}},"title":{"type":"text","required":true,"_meta":{"required":true}},"sortOrder":{"type":"integer","required":true,"default":0}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"optional"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"CourseSection","collectionExportName":"CourseSectionCollection","displayLabelField":"title","validationRules":[{"field":"courseId","rule":"required","fieldType":"foreignKey"},{"field":"title","rule":"required","fieldType":"text"},{"field":"sortOrder","rule":"required","fieldType":"integer"}],"schema":{"tableName":"course_sections","ddl":"CREATE TABLE IF NOT EXISTS \\"course_sections\\" (\\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,\\n \\"course_id\\" UUID NOT NULL,\\n \\"title\\" TEXT NOT NULL,\\n \\"sort_order\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"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":false,"unique":false},"course_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"courses","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":true,"unique":false},"sort_order":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"course_sections_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true,"nullsNotDistinct":true},{"name":"course_sections_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"course_sections_course_id_idx","columns":["course_id"]}],"version":"e20480d7"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Lesson":{"name":"lesson","className":"Lesson","qualifiedName":"@happyvertical/smrt-education:Lesson","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true,"mode":"optional","field":"tenantId","allowSuperAdminBypass":false}}},"sectionId":{"type":"foreignKey","required":true,"related":"CourseSection","_meta":{"required":true}},"title":{"type":"text","required":true,"_meta":{"required":true}},"body":{"type":"text","required":false},"sortOrder":{"type":"integer","required":true,"default":0},"estimatedMinutes":{"type":"integer","required":true,"default":0},"difficulty":{"type":"decimal","required":true,"default":0},"modality":{"type":"text","required":false,"default":"online","enum":["online","printable","kit","video","game","mixed"]},"completionRule":{"type":"text","required":false,"default":"attest","enum":["attest","submit","score","external"]},"externalRef":{"type":"text","required":false},"externalUrl":{"type":"text","required":false}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableStrategy":"sti","api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"optional"},"conflictColumns":["tenant_id","slug","context","_meta_type"]},"extends":"SmrtObject","exportName":"Lesson","collectionExportName":"LessonCollection","displayLabelField":"title","validationRules":[{"field":"sectionId","rule":"required","fieldType":"foreignKey"},{"field":"title","rule":"required","fieldType":"text"},{"field":"sortOrder","rule":"required","fieldType":"integer"},{"field":"estimatedMinutes","rule":"required","fieldType":"integer"},{"field":"difficulty","rule":"required","fieldType":"decimal"}],"schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"092df043"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Reading":{"name":"reading","className":"Reading","qualifiedName":"@happyvertical/smrt-education:Reading","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true}}},"sectionId":{"type":"foreignKey","required":true,"related":"CourseSection","_meta":{"required":true}},"title":{"type":"text","required":true,"_meta":{"required":true}},"body":{"type":"text","required":false},"sortOrder":{"type":"integer","required":true,"default":0},"estimatedMinutes":{"type":"integer","required":true,"default":0},"difficulty":{"type":"decimal","required":true,"default":0},"modality":{"type":"text","required":false,"default":"online","enum":["online","printable","kit","video","game","mixed"]},"completionRule":{"type":"text","required":false,"default":"attest","enum":["attest","submit","score","external"]},"externalRef":{"type":"text","required":false},"externalUrl":{"type":"text","required":false}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"lessons","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Lesson","exportName":"Reading","collectionExportName":"ReadingCollection","displayLabelField":"title","validationRules":[{"field":"sectionId","rule":"required","fieldType":"foreignKey"},{"field":"title","rule":"required","fieldType":"text"},{"field":"sortOrder","rule":"required","fieldType":"integer"},{"field":"estimatedMinutes","rule":"required","fieldType":"integer"},{"field":"difficulty","rule":"required","fieldType":"decimal"}],"schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"9d8b6fcd"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Video":{"name":"video","className":"Video","qualifiedName":"@happyvertical/smrt-education:Video","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true}}},"sectionId":{"type":"foreignKey","required":true,"related":"CourseSection","_meta":{"required":true}},"title":{"type":"text","required":true,"_meta":{"required":true}},"body":{"type":"text","required":false},"sortOrder":{"type":"integer","required":true,"default":0},"estimatedMinutes":{"type":"integer","required":true,"default":0},"difficulty":{"type":"decimal","required":true,"default":0},"modality":{"type":"text","required":false,"default":"online","enum":["online","printable","kit","video","game","mixed"]},"completionRule":{"type":"text","required":false,"default":"attest","enum":["attest","submit","score","external"]},"externalRef":{"type":"text","required":false},"externalUrl":{"type":"text","required":false},"videoUrl":{"type":"text","required":false}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"lessons","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Lesson","exportName":"Video","collectionExportName":"VideoCollection","displayLabelField":"title","validationRules":[{"field":"sectionId","rule":"required","fieldType":"foreignKey"},{"field":"title","rule":"required","fieldType":"text"},{"field":"sortOrder","rule":"required","fieldType":"integer"},{"field":"estimatedMinutes","rule":"required","fieldType":"integer"},{"field":"difficulty","rule":"required","fieldType":"decimal"}],"schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"9e0ef984"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Worksheet":{"name":"worksheet","className":"Worksheet","qualifiedName":"@happyvertical/smrt-education:Worksheet","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true}}},"sectionId":{"type":"foreignKey","required":true,"related":"CourseSection","_meta":{"required":true}},"title":{"type":"text","required":true,"_meta":{"required":true}},"body":{"type":"text","required":false},"sortOrder":{"type":"integer","required":true,"default":0},"estimatedMinutes":{"type":"integer","required":true,"default":0},"difficulty":{"type":"decimal","required":true,"default":0},"modality":{"type":"text","required":false,"default":"online","enum":["online","printable","kit","video","game","mixed"]},"completionRule":{"type":"text","required":false,"default":"submit","enum":["attest","submit","score","external"]},"externalRef":{"type":"text","required":false},"externalUrl":{"type":"text","required":false},"printableUrl":{"type":"text","required":false},"answerUrl":{"type":"text","required":false},"pages":{"type":"integer","required":true,"default":0}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"lessons","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Lesson","exportName":"Worksheet","collectionExportName":"WorksheetCollection","displayLabelField":"title","validationRules":[{"field":"sectionId","rule":"required","fieldType":"foreignKey"},{"field":"title","rule":"required","fieldType":"text"},{"field":"sortOrder","rule":"required","fieldType":"integer"},{"field":"estimatedMinutes","rule":"required","fieldType":"integer"},{"field":"difficulty","rule":"required","fieldType":"decimal"},{"field":"pages","rule":"required","fieldType":"integer"}],"schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"10976938"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Exercise":{"name":"exercise","className":"Exercise","qualifiedName":"@happyvertical/smrt-education:Exercise","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true}}},"sectionId":{"type":"foreignKey","required":true,"related":"CourseSection","_meta":{"required":true}},"title":{"type":"text","required":true,"_meta":{"required":true}},"body":{"type":"text","required":false},"sortOrder":{"type":"integer","required":true,"default":0},"estimatedMinutes":{"type":"integer","required":true,"default":0},"difficulty":{"type":"decimal","required":true,"default":0},"modality":{"type":"text","required":false,"default":"online","enum":["online","printable","kit","video","game","mixed"]},"completionRule":{"type":"text","required":false,"default":"attest","enum":["attest","submit","score","external"]},"externalRef":{"type":"text","required":false},"externalUrl":{"type":"text","required":false}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"lessons","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Lesson","exportName":"Exercise","collectionExportName":"ExerciseCollection","displayLabelField":"title","validationRules":[{"field":"sectionId","rule":"required","fieldType":"foreignKey"},{"field":"title","rule":"required","fieldType":"text"},{"field":"sortOrder","rule":"required","fieldType":"integer"},{"field":"estimatedMinutes","rule":"required","fieldType":"integer"},{"field":"difficulty","rule":"required","fieldType":"decimal"}],"schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"145eadbe"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CourseCollection":{"name":"coursecollection","className":"CourseCollection","qualifiedName":"@happyvertical/smrt-education:CourseCollection","collection":"courses","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Course","exportName":"CourseCollection","collectionExportName":"CourseCollectionCollection","schema":{"tableName":"courses","ddl":"CREATE TABLE IF NOT EXISTS \\"courses\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"summary\\" TEXT,\\n \\"description\\" TEXT,\\n \\"source_key\\" TEXT,\\n \\"source_url\\" TEXT,\\n \\"source_ref\\" TEXT,\\n \\"license\\" TEXT,\\n \\"license_kind\\" TEXT DEFAULT 'own-work',\\n \\"license_note\\" TEXT,\\n \\"attested_by\\" TEXT,\\n \\"subject\\" TEXT,\\n \\"tags\\" TEXT,\\n \\"level_min\\" INTEGER DEFAULT 0,\\n \\"level_max\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"status\\" TEXT DEFAULT 'draft'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"title":{"type":"TEXT","notNull":false},"summary":{"type":"TEXT","notNull":false},"description":{"type":"TEXT","notNull":false},"source_key":{"type":"TEXT","notNull":false},"source_url":{"type":"TEXT","notNull":false},"source_ref":{"type":"TEXT","notNull":false},"license":{"type":"TEXT","notNull":false},"license_kind":{"type":"TEXT","notNull":false,"default":"own-work"},"license_note":{"type":"TEXT","notNull":false},"attested_by":{"type":"TEXT","notNull":false},"subject":{"type":"TEXT","notNull":false},"tags":{"type":"TEXT","notNull":false},"level_min":{"type":"INTEGER","notNull":false,"default":0},"level_max":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"status":{"type":"TEXT","notNull":false,"default":"draft"}},"indexes":[{"name":"courses_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"courses_meta_type_idx","columns":["_meta_type"]},{"name":"courses_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"88cc23ab"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:ExternalCourseCollection":{"name":"externalcoursecollection","className":"ExternalCourseCollection","qualifiedName":"@happyvertical/smrt-education:ExternalCourseCollection","collection":"courses","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"courses","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"ExternalCourse","exportName":"ExternalCourseCollection","collectionExportName":"ExternalCourseCollectionCollection","schema":{"tableName":"courses","ddl":"CREATE TABLE IF NOT EXISTS \\"courses\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"summary\\" TEXT,\\n \\"description\\" TEXT,\\n \\"source_key\\" TEXT,\\n \\"source_url\\" TEXT,\\n \\"source_ref\\" TEXT,\\n \\"license\\" TEXT,\\n \\"license_kind\\" TEXT DEFAULT 'own-work',\\n \\"license_note\\" TEXT,\\n \\"attested_by\\" TEXT,\\n \\"subject\\" TEXT,\\n \\"tags\\" TEXT,\\n \\"level_min\\" INTEGER DEFAULT 0,\\n \\"level_max\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"status\\" TEXT DEFAULT 'draft'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"title":{"type":"TEXT","notNull":false},"summary":{"type":"TEXT","notNull":false},"description":{"type":"TEXT","notNull":false},"source_key":{"type":"TEXT","notNull":false},"source_url":{"type":"TEXT","notNull":false},"source_ref":{"type":"TEXT","notNull":false},"license":{"type":"TEXT","notNull":false},"license_kind":{"type":"TEXT","notNull":false,"default":"own-work"},"license_note":{"type":"TEXT","notNull":false},"attested_by":{"type":"TEXT","notNull":false},"subject":{"type":"TEXT","notNull":false},"tags":{"type":"TEXT","notNull":false},"level_min":{"type":"INTEGER","notNull":false,"default":0},"level_max":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"status":{"type":"TEXT","notNull":false,"default":"draft"}},"indexes":[{"name":"courses_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"courses_meta_type_idx","columns":["_meta_type"]},{"name":"courses_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"88cc23ab"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:AuthoredCourseCollection":{"name":"authoredcoursecollection","className":"AuthoredCourseCollection","qualifiedName":"@happyvertical/smrt-education:AuthoredCourseCollection","collection":"courses","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"courses","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"AuthoredCourse","exportName":"AuthoredCourseCollection","collectionExportName":"AuthoredCourseCollectionCollection","schema":{"tableName":"courses","ddl":"CREATE TABLE IF NOT EXISTS \\"courses\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"summary\\" TEXT,\\n \\"description\\" TEXT,\\n \\"source_key\\" TEXT,\\n \\"source_url\\" TEXT,\\n \\"source_ref\\" TEXT,\\n \\"license\\" TEXT,\\n \\"license_kind\\" TEXT DEFAULT 'own-work',\\n \\"license_note\\" TEXT,\\n \\"attested_by\\" TEXT,\\n \\"subject\\" TEXT,\\n \\"tags\\" TEXT,\\n \\"level_min\\" INTEGER DEFAULT 0,\\n \\"level_max\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"status\\" TEXT DEFAULT 'draft'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"title":{"type":"TEXT","notNull":false},"summary":{"type":"TEXT","notNull":false},"description":{"type":"TEXT","notNull":false},"source_key":{"type":"TEXT","notNull":false},"source_url":{"type":"TEXT","notNull":false},"source_ref":{"type":"TEXT","notNull":false},"license":{"type":"TEXT","notNull":false},"license_kind":{"type":"TEXT","notNull":false,"default":"own-work"},"license_note":{"type":"TEXT","notNull":false},"attested_by":{"type":"TEXT","notNull":false},"subject":{"type":"TEXT","notNull":false},"tags":{"type":"TEXT","notNull":false},"level_min":{"type":"INTEGER","notNull":false,"default":0},"level_max":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"status":{"type":"TEXT","notNull":false,"default":"draft"}},"indexes":[{"name":"courses_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"courses_meta_type_idx","columns":["_meta_type"]},{"name":"courses_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"88cc23ab"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CourseSectionCollection":{"name":"coursesectioncollection","className":"CourseSectionCollection","qualifiedName":"@happyvertical/smrt-education:CourseSectionCollection","collection":"coursesections","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"CourseSection","exportName":"CourseSectionCollection","collectionExportName":"CourseSectionCollectionCollection","schema":{"tableName":"course_sections","ddl":"CREATE TABLE IF NOT EXISTS \\"course_sections\\" (\\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,\\n \\"course_id\\" UUID NOT NULL,\\n \\"title\\" TEXT NOT NULL,\\n \\"sort_order\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"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":false,"unique":false},"course_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"courses","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":true,"unique":false},"sort_order":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"course_sections_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true,"nullsNotDistinct":true},{"name":"course_sections_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"course_sections_course_id_idx","columns":["course_id"]}],"version":"e20480d7"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:LessonCollection":{"name":"lessoncollection","className":"LessonCollection","qualifiedName":"@happyvertical/smrt-education:LessonCollection","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Lesson","exportName":"LessonCollection","collectionExportName":"LessonCollectionCollection","schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"092df043"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:ReadingCollection":{"name":"readingcollection","className":"ReadingCollection","qualifiedName":"@happyvertical/smrt-education:ReadingCollection","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"lessons","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Reading","exportName":"ReadingCollection","collectionExportName":"ReadingCollectionCollection","schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"9d8b6fcd"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:VideoCollection":{"name":"videocollection","className":"VideoCollection","qualifiedName":"@happyvertical/smrt-education:VideoCollection","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"lessons","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Video","exportName":"VideoCollection","collectionExportName":"VideoCollectionCollection","schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"9e0ef984"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorksheetCollection":{"name":"worksheetcollection","className":"WorksheetCollection","qualifiedName":"@happyvertical/smrt-education:WorksheetCollection","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"lessons","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Worksheet","exportName":"WorksheetCollection","collectionExportName":"WorksheetCollectionCollection","schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"10976938"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:ExerciseCollection":{"name":"exercisecollection","className":"ExerciseCollection","qualifiedName":"@happyvertical/smrt-education:ExerciseCollection","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"lessons","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Exercise","exportName":"ExerciseCollection","collectionExportName":"ExerciseCollectionCollection","schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"145eadbe"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:LessonAssetCollection":{"name":"lessonassetcollection","className":"LessonAssetCollection","qualifiedName":"@happyvertical/smrt-education:LessonAssetCollection","collection":"lessonassets","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{"byRight":{"name":"byRight","async":true,"parameters":[{"name":"rightId","type":"string","optional":false},{"name":"opts","type":"JunctionFilterOptions","optional":true}],"returnType":"Promise<TItem[]>","isStatic":false,"isPublic":true},"byLeft":{"name":"byLeft","async":true,"parameters":[{"name":"leftId","type":"string","optional":false},{"name":"opts","type":"JunctionFilterOptions","optional":true}],"returnType":"Promise<TItem[]>","isStatic":false,"isPublic":true},"attach":{"name":"attach","async":true,"parameters":[{"name":"leftId","type":"string","optional":false},{"name":"rightId","type":"string","optional":false},{"name":"opts","type":"JunctionAttachOptions","optional":true}],"returnType":"Promise<TItem>","isStatic":false,"isPublic":true},"detach":{"name":"detach","async":true,"parameters":[{"name":"leftId","type":"string","optional":false},{"name":"rightId","type":"string","optional":false},{"name":"opts","type":"JunctionFilterOptions","optional":true}],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"setLinks":{"name":"setLinks","async":true,"parameters":[{"name":"leftId","type":"string","optional":false},{"name":"rightIds","type":"string[]","optional":false},{"name":"opts","type":"JunctionAttachOptions","optional":true}],"returnType":"Promise<void>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"lesson_assets","api":false,"mcp":false,"cli":false},"extends":"SmrtJunction","extendsTypeArg":"LessonAsset","exportName":"LessonAssetCollection","collectionExportName":"LessonAssetCollectionCollection","schema":{"tableName":"lesson_assets","ddl":"CREATE TABLE IF NOT EXISTS \\"lesson_assets\\" (\\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,\\n \\"lesson_id\\" UUID NOT NULL,\\n \\"asset_id\\" UUID NOT NULL,\\n \\"relationship\\" TEXT NOT NULL DEFAULT 'attachment',\\n \\"sort_order\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"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":false,"unique":false},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"relationship":{"type":"TEXT","notNull":true,"unique":false,"default":"attachment"},"sort_order":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"lesson_assets_tenant_id_lesson_id_idx","columns":["tenant_id","lesson_id","asset_id","relationship"],"unique":true,"nullsNotDistinct":true},{"name":"lesson_assets_slug_context_idx","columns":["slug","context"]},{"name":"lesson_assets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lesson_assets_lesson_id_idx","columns":["lesson_id"]},{"name":"lesson_assets_asset_id_idx","columns":["asset_id"]}],"version":"d96385c6"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:LearnerCollection":{"name":"learnercollection","className":"LearnerCollection","qualifiedName":"@happyvertical/smrt-education:LearnerCollection","collection":"learners","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Learner","exportName":"LearnerCollection","collectionExportName":"LearnerCollectionCollection","schema":{"tableName":"learners","ddl":"CREATE TABLE IF NOT EXISTS \\"learners\\" (\\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 \\"user_id\\" UUID NOT NULL,\\n \\"profile_id\\" UUID NOT NULL,\\n \\"display_name\\" TEXT,\\n \\"birth_date\\" TIMESTAMP,\\n \\"level\\" INTEGER NOT NULL DEFAULT 0,\\n \\"settings\\" TEXT\\n);","columns":{"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},"user_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"display_name":{"type":"TEXT","notNull":false,"unique":false},"birth_date":{"type":"TIMESTAMP","notNull":false,"unique":false},"level":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"settings":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"learners_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"learners_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"learners_user_id_idx","columns":["user_id"]},{"name":"learners_profile_id_idx","columns":["profile_id"]}],"version":"ca9907b5"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CurriculumCollection":{"name":"curriculumcollection","className":"CurriculumCollection","qualifiedName":"@happyvertical/smrt-education:CurriculumCollection","collection":"curriculums","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"curricula","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Curriculum","exportName":"CurriculumCollection","collectionExportName":"CurriculumCollectionCollection","schema":{"tableName":"curricula","ddl":"CREATE TABLE IF NOT EXISTS \\"curricula\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"title\\" TEXT NOT NULL,\\n \\"starts_on\\" TIMESTAMP,\\n \\"ends_on\\" TIMESTAMP,\\n \\"status\\" TEXT DEFAULT 'planned'\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":true,"unique":false},"starts_on":{"type":"TIMESTAMP","notNull":false,"unique":false},"ends_on":{"type":"TIMESTAMP","notNull":false,"unique":false},"status":{"type":"TEXT","notNull":false,"unique":false,"default":"planned"}},"indexes":[{"name":"curricula_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"curricula_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"curricula_learner_id_idx","columns":["learner_id"]}],"version":"b7e90cbd"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:EnrollmentCollection":{"name":"enrollmentcollection","className":"EnrollmentCollection","qualifiedName":"@happyvertical/smrt-education:EnrollmentCollection","collection":"enrollments","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Enrollment","exportName":"EnrollmentCollection","collectionExportName":"EnrollmentCollectionCollection","schema":{"tableName":"enrollments","ddl":"CREATE TABLE IF NOT EXISTS \\"enrollments\\" (\\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 \\"curriculum_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"course_id\\" UUID NOT NULL,\\n \\"status\\" TEXT DEFAULT 'planned',\\n \\"started_at\\" TIMESTAMP,\\n \\"completed_at\\" TIMESTAMP,\\n \\"target_minutes_per_week\\" INTEGER NOT NULL DEFAULT 0,\\n \\"sort_order\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"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},"curriculum_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"curricula","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"course_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"courses","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"status":{"type":"TEXT","notNull":false,"unique":false,"default":"planned"},"started_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"completed_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"target_minutes_per_week":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"sort_order":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"enrollments_tenant_id_curriculum_id_idx","columns":["tenant_id","curriculum_id","course_id"],"unique":true},{"name":"enrollments_slug_context_idx","columns":["slug","context"]},{"name":"enrollments_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"enrollments_curriculum_id_idx","columns":["curriculum_id"]},{"name":"enrollments_learner_id_idx","columns":["learner_id"]},{"name":"enrollments_course_id_idx","columns":["course_id"]}],"version":"2a34b5ee"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:LessonProgressCollection":{"name":"lessonprogresscollection","className":"LessonProgressCollection","qualifiedName":"@happyvertical/smrt-education:LessonProgressCollection","collection":"lessonprogresses","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"lesson_progress","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"LessonProgress","exportName":"LessonProgressCollection","collectionExportName":"LessonProgressCollectionCollection","schema":{"tableName":"lesson_progress","ddl":"CREATE TABLE IF NOT EXISTS \\"lesson_progress\\" (\\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 \\"enrollment_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"lesson_id\\" UUID NOT NULL,\\n \\"status\\" TEXT DEFAULT 'not_started',\\n \\"started_at\\" TIMESTAMP,\\n \\"completed_at\\" TIMESTAMP,\\n \\"time_spent_seconds\\" INTEGER NOT NULL DEFAULT 0,\\n \\"attempts\\" INTEGER NOT NULL DEFAULT 0,\\n \\"best_score\\" REAL\\n);","columns":{"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},"enrollment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"enrollments","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"status":{"type":"TEXT","notNull":false,"unique":false,"default":"not_started"},"started_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"completed_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"time_spent_seconds":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"attempts":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"best_score":{"type":"REAL","notNull":false,"unique":false}},"indexes":[{"name":"lesson_progress_tenant_id_enrollment_id_idx","columns":["tenant_id","enrollment_id","lesson_id"],"unique":true},{"name":"lesson_progress_slug_context_idx","columns":["slug","context"]},{"name":"lesson_progress_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lesson_progress_enrollment_id_idx","columns":["enrollment_id"]},{"name":"lesson_progress_learner_id_idx","columns":["learner_id"]},{"name":"lesson_progress_lesson_id_idx","columns":["lesson_id"]}],"version":"36704fbd"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:SubmissionCollection":{"name":"submissioncollection","className":"SubmissionCollection","qualifiedName":"@happyvertical/smrt-education:SubmissionCollection","collection":"submissions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Submission","exportName":"SubmissionCollection","collectionExportName":"SubmissionCollectionCollection","schema":{"tableName":"submissions","ddl":"CREATE TABLE IF NOT EXISTS \\"submissions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"learner_id\\" UUID,\\n \\"lesson_id\\" UUID,\\n \\"progress_id\\" UUID,\\n \\"submitted_at\\" TEXT,\\n \\"status\\" TEXT DEFAULT 'captured',\\n \\"notes\\" TEXT,\\n \\"capture_key\\" TEXT,\\n \\"capture_digest\\" TEXT,\\n \\"kind\\" TEXT DEFAULT 'completed_work',\\n \\"previous_submission_id\\" UUID,\\n \\"intake_item_id\\" TEXT,\\n \\"page_count\\" INTEGER DEFAULT 0,\\n \\"ocr_text\\" TEXT,\\n \\"extracted\\" TEXT,\\n \\"reported_by\\" TEXT DEFAULT 'learner',\\n \\"evidence_url\\" TEXT,\\n \\"reported_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"progress_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lesson_progress","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submitted_at":{"type":"TEXT","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"captured"},"notes":{"type":"TEXT","notNull":false},"capture_key":{"type":"TEXT","notNull":false},"capture_digest":{"type":"TEXT","notNull":false},"kind":{"type":"TEXT","notNull":false,"default":"completed_work"},"previous_submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_item_id":{"type":"TEXT","notNull":false},"page_count":{"type":"INTEGER","notNull":false,"default":0},"ocr_text":{"type":"TEXT","notNull":false},"extracted":{"type":"TEXT","notNull":false},"reported_by":{"type":"TEXT","notNull":false,"default":"learner"},"evidence_url":{"type":"TEXT","notNull":false},"reported_score":{"type":"REAL","notNull":false}},"indexes":[{"name":"submissions_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"submissions_meta_type_idx","columns":["_meta_type"]},{"name":"submissions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submissions_learner_id_idx","columns":["learner_id"]},{"name":"submissions_lesson_id_idx","columns":["lesson_id"]},{"name":"submissions_progress_id_idx","columns":["progress_id"]},{"name":"submissions_previous_submission_id_idx","columns":["previous_submission_id"]}],"version":"27a21ab4"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:SubmissionIntakeBindingCollection":{"name":"submissionintakebindingcollection","className":"SubmissionIntakeBindingCollection","qualifiedName":"@happyvertical/smrt-education:SubmissionIntakeBindingCollection","collection":"submissionintakebindings","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"submission_intake_bindings","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"SubmissionIntakeBinding","exportName":"SubmissionIntakeBindingCollection","collectionExportName":"SubmissionIntakeBindingCollectionCollection","schema":{"tableName":"submission_intake_bindings","ddl":"CREATE TABLE IF NOT EXISTS \\"submission_intake_bindings\\" (\\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 \\"intake_item_id\\" TEXT NOT NULL,\\n \\"submission_id\\" UUID NOT NULL\\n);","columns":{"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},"intake_item_id":{"type":"TEXT","notNull":true,"unique":false},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}}},"indexes":[{"name":"submission_intake_bindings_tenant_id_intake_item_id_idx","columns":["tenant_id","intake_item_id"],"unique":true},{"name":"submission_intake_bindings_slug_context_idx","columns":["slug","context"]},{"name":"submission_intake_bindings_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submission_intake_bindings_submission_id_idx","columns":["submission_id"]}],"version":"7102c909"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:ScannedSubmissionCollection":{"name":"scannedsubmissioncollection","className":"ScannedSubmissionCollection","qualifiedName":"@happyvertical/smrt-education:ScannedSubmissionCollection","collection":"submissions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"submissions","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"ScannedSubmission","exportName":"ScannedSubmissionCollection","collectionExportName":"ScannedSubmissionCollectionCollection","schema":{"tableName":"submissions","ddl":"CREATE TABLE IF NOT EXISTS \\"submissions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"learner_id\\" UUID,\\n \\"lesson_id\\" UUID,\\n \\"progress_id\\" UUID,\\n \\"submitted_at\\" TEXT,\\n \\"status\\" TEXT DEFAULT 'captured',\\n \\"notes\\" TEXT,\\n \\"capture_key\\" TEXT,\\n \\"capture_digest\\" TEXT,\\n \\"kind\\" TEXT DEFAULT 'completed_work',\\n \\"previous_submission_id\\" UUID,\\n \\"intake_item_id\\" TEXT,\\n \\"page_count\\" INTEGER DEFAULT 0,\\n \\"ocr_text\\" TEXT,\\n \\"extracted\\" TEXT,\\n \\"reported_by\\" TEXT DEFAULT 'learner',\\n \\"evidence_url\\" TEXT,\\n \\"reported_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"progress_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lesson_progress","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submitted_at":{"type":"TEXT","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"captured"},"notes":{"type":"TEXT","notNull":false},"capture_key":{"type":"TEXT","notNull":false},"capture_digest":{"type":"TEXT","notNull":false},"kind":{"type":"TEXT","notNull":false,"default":"completed_work"},"previous_submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_item_id":{"type":"TEXT","notNull":false},"page_count":{"type":"INTEGER","notNull":false,"default":0},"ocr_text":{"type":"TEXT","notNull":false},"extracted":{"type":"TEXT","notNull":false},"reported_by":{"type":"TEXT","notNull":false,"default":"learner"},"evidence_url":{"type":"TEXT","notNull":false},"reported_score":{"type":"REAL","notNull":false}},"indexes":[{"name":"submissions_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"submissions_meta_type_idx","columns":["_meta_type"]},{"name":"submissions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submissions_learner_id_idx","columns":["learner_id"]},{"name":"submissions_lesson_id_idx","columns":["lesson_id"]},{"name":"submissions_progress_id_idx","columns":["progress_id"]},{"name":"submissions_previous_submission_id_idx","columns":["previous_submission_id"]}],"version":"7c394510"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:ExternalCompletionCollection":{"name":"externalcompletioncollection","className":"ExternalCompletionCollection","qualifiedName":"@happyvertical/smrt-education:ExternalCompletionCollection","collection":"submissions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"submissions","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"ExternalCompletion","exportName":"ExternalCompletionCollection","collectionExportName":"ExternalCompletionCollectionCollection","schema":{"tableName":"submissions","ddl":"CREATE TABLE IF NOT EXISTS \\"submissions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"learner_id\\" UUID,\\n \\"lesson_id\\" UUID,\\n \\"progress_id\\" UUID,\\n \\"submitted_at\\" TEXT,\\n \\"status\\" TEXT DEFAULT 'captured',\\n \\"notes\\" TEXT,\\n \\"capture_key\\" TEXT,\\n \\"capture_digest\\" TEXT,\\n \\"kind\\" TEXT DEFAULT 'completed_work',\\n \\"previous_submission_id\\" UUID,\\n \\"intake_item_id\\" TEXT,\\n \\"page_count\\" INTEGER DEFAULT 0,\\n \\"ocr_text\\" TEXT,\\n \\"extracted\\" TEXT,\\n \\"reported_by\\" TEXT DEFAULT 'learner',\\n \\"evidence_url\\" TEXT,\\n \\"reported_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"progress_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lesson_progress","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submitted_at":{"type":"TEXT","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"captured"},"notes":{"type":"TEXT","notNull":false},"capture_key":{"type":"TEXT","notNull":false},"capture_digest":{"type":"TEXT","notNull":false},"kind":{"type":"TEXT","notNull":false,"default":"completed_work"},"previous_submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_item_id":{"type":"TEXT","notNull":false},"page_count":{"type":"INTEGER","notNull":false,"default":0},"ocr_text":{"type":"TEXT","notNull":false},"extracted":{"type":"TEXT","notNull":false},"reported_by":{"type":"TEXT","notNull":false,"default":"learner"},"evidence_url":{"type":"TEXT","notNull":false},"reported_score":{"type":"REAL","notNull":false}},"indexes":[{"name":"submissions_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"submissions_meta_type_idx","columns":["_meta_type"]},{"name":"submissions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submissions_learner_id_idx","columns":["learner_id"]},{"name":"submissions_lesson_id_idx","columns":["lesson_id"]},{"name":"submissions_progress_id_idx","columns":["progress_id"]},{"name":"submissions_previous_submission_id_idx","columns":["previous_submission_id"]}],"version":"eff3715d"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:AttestationCollection":{"name":"attestationcollection","className":"AttestationCollection","qualifiedName":"@happyvertical/smrt-education:AttestationCollection","collection":"submissions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"submissions","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Attestation","exportName":"AttestationCollection","collectionExportName":"AttestationCollectionCollection","schema":{"tableName":"submissions","ddl":"CREATE TABLE IF NOT EXISTS \\"submissions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"learner_id\\" UUID,\\n \\"lesson_id\\" UUID,\\n \\"progress_id\\" UUID,\\n \\"submitted_at\\" TEXT,\\n \\"status\\" TEXT DEFAULT 'captured',\\n \\"notes\\" TEXT,\\n \\"capture_key\\" TEXT,\\n \\"capture_digest\\" TEXT,\\n \\"kind\\" TEXT DEFAULT 'completed_work',\\n \\"previous_submission_id\\" UUID,\\n \\"intake_item_id\\" TEXT,\\n \\"page_count\\" INTEGER DEFAULT 0,\\n \\"ocr_text\\" TEXT,\\n \\"extracted\\" TEXT,\\n \\"reported_by\\" TEXT DEFAULT 'learner',\\n \\"evidence_url\\" TEXT,\\n \\"reported_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"progress_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lesson_progress","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submitted_at":{"type":"TEXT","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"captured"},"notes":{"type":"TEXT","notNull":false},"capture_key":{"type":"TEXT","notNull":false},"capture_digest":{"type":"TEXT","notNull":false},"kind":{"type":"TEXT","notNull":false,"default":"completed_work"},"previous_submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_item_id":{"type":"TEXT","notNull":false},"page_count":{"type":"INTEGER","notNull":false,"default":0},"ocr_text":{"type":"TEXT","notNull":false},"extracted":{"type":"TEXT","notNull":false},"reported_by":{"type":"TEXT","notNull":false,"default":"learner"},"evidence_url":{"type":"TEXT","notNull":false},"reported_score":{"type":"REAL","notNull":false}},"indexes":[{"name":"submissions_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"submissions_meta_type_idx","columns":["_meta_type"]},{"name":"submissions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submissions_learner_id_idx","columns":["learner_id"]},{"name":"submissions_lesson_id_idx","columns":["lesson_id"]},{"name":"submissions_progress_id_idx","columns":["progress_id"]},{"name":"submissions_previous_submission_id_idx","columns":["previous_submission_id"]}],"version":"4f3230a3"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:GradeCollection":{"name":"gradecollection","className":"GradeCollection","qualifiedName":"@happyvertical/smrt-education:GradeCollection","collection":"grades","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Grade","exportName":"GradeCollection","collectionExportName":"GradeCollectionCollection","schema":{"tableName":"grades","ddl":"CREATE TABLE IF NOT EXISTS \\"grades\\" (\\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 \\"submission_id\\" UUID NOT NULL,\\n \\"grader_kind\\" TEXT NOT NULL DEFAULT 'auto',\\n \\"grader_profile_id\\" UUID,\\n \\"score\\" REAL,\\n \\"points_earned\\" INTEGER,\\n \\"points_possible\\" INTEGER,\\n \\"rubric_results\\" TEXT,\\n \\"feedback\\" TEXT,\\n \\"graded_at\\" TEXT\\n);","columns":{"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},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"grader_kind":{"type":"TEXT","notNull":true,"unique":false,"default":"auto"},"grader_profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"score":{"type":"REAL","notNull":false,"unique":false},"points_earned":{"type":"INTEGER","notNull":false,"unique":false},"points_possible":{"type":"INTEGER","notNull":false,"unique":false},"rubric_results":{"type":"TEXT","notNull":false,"unique":false},"feedback":{"type":"TEXT","notNull":false,"unique":false},"graded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"grades_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"grades_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"grades_submission_id_idx","columns":["submission_id"]},{"name":"grades_grader_profile_id_idx","columns":["grader_profile_id"]}],"version":"7d629fec"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:SubmissionAssetCollection":{"name":"submissionassetcollection","className":"SubmissionAssetCollection","qualifiedName":"@happyvertical/smrt-education:SubmissionAssetCollection","collection":"submissionassets","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{"byRight":{"name":"byRight","async":true,"parameters":[{"name":"rightId","type":"string","optional":false},{"name":"opts","type":"JunctionFilterOptions","optional":true}],"returnType":"Promise<TItem[]>","isStatic":false,"isPublic":true},"byLeft":{"name":"byLeft","async":true,"parameters":[{"name":"leftId","type":"string","optional":false},{"name":"opts","type":"JunctionFilterOptions","optional":true}],"returnType":"Promise<TItem[]>","isStatic":false,"isPublic":true},"attach":{"name":"attach","async":true,"parameters":[{"name":"leftId","type":"string","optional":false},{"name":"rightId","type":"string","optional":false},{"name":"opts","type":"JunctionAttachOptions","optional":true}],"returnType":"Promise<TItem>","isStatic":false,"isPublic":true},"detach":{"name":"detach","async":true,"parameters":[{"name":"leftId","type":"string","optional":false},{"name":"rightId","type":"string","optional":false},{"name":"opts","type":"JunctionFilterOptions","optional":true}],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"setLinks":{"name":"setLinks","async":true,"parameters":[{"name":"leftId","type":"string","optional":false},{"name":"rightIds","type":"string[]","optional":false},{"name":"opts","type":"JunctionAttachOptions","optional":true}],"returnType":"Promise<void>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"submission_assets","api":false,"mcp":false,"cli":false},"extends":"SmrtJunction","extendsTypeArg":"SubmissionAsset","exportName":"SubmissionAssetCollection","collectionExportName":"SubmissionAssetCollectionCollection","schema":{"tableName":"submission_assets","ddl":"CREATE TABLE IF NOT EXISTS \\"submission_assets\\" (\\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 \\"submission_id\\" UUID NOT NULL,\\n \\"asset_id\\" UUID NOT NULL,\\n \\"relationship\\" TEXT NOT NULL DEFAULT 'page',\\n \\"sort_order\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"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},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"relationship":{"type":"TEXT","notNull":true,"unique":false,"default":"page"},"sort_order":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"submission_assets_tenant_id_submission_id_idx","columns":["tenant_id","submission_id","asset_id","relationship"],"unique":true},{"name":"submission_assets_slug_context_idx","columns":["slug","context"]},{"name":"submission_assets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submission_assets_submission_id_idx","columns":["submission_id"]},{"name":"submission_assets_asset_id_idx","columns":["asset_id"]}],"version":"d9b61c8a"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CourseSource":{"name":"coursesource","className":"CourseSource","qualifiedName":"@happyvertical/smrt-education:CourseSource","collection":"coursesources","description":"Host-managed source policy; deliberately has no generated CRUD surface.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/course-source.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"key":{"type":"text","required":true,"_meta":{"required":true}},"name":{"type":"text","required":true,"_meta":{"required":true}},"kind":{"type":"text","required":false,"default":"adapter","enum":["manual","url","adapter"]},"adapterKey":{"type":"text","required":false},"config":{"type":"text","required":false},"sharing":{"type":"text","required":false,"default":"private","enum":["private","group","global"]}},"methods":{"getConfig":{"name":"getConfig","async":false,"parameters":[],"returnType":"CourseSourceConfig","isStatic":false,"isPublic":true},"setConfig":{"name":"setConfig","async":false,"parameters":[{"name":"value","type":"CourseSourceConfig","optional":false}],"returnType":"void","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"cli":false,"mcp":false,"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"CourseSource","collectionExportName":"CourseSourceCollection","displayLabelField":"name","validationRules":[{"field":"key","rule":"required","fieldType":"text"},{"field":"name","rule":"required","fieldType":"text"}],"schema":{"tableName":"course_sources","ddl":"CREATE TABLE IF NOT EXISTS \\"course_sources\\" (\\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 \\"key\\" TEXT NOT NULL,\\n \\"name\\" TEXT NOT NULL,\\n \\"kind\\" TEXT DEFAULT 'adapter',\\n \\"adapter_key\\" TEXT,\\n \\"config\\" TEXT,\\n \\"sharing\\" TEXT DEFAULT 'private'\\n);","columns":{"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},"key":{"type":"TEXT","notNull":true,"unique":false},"name":{"type":"TEXT","notNull":true,"unique":false},"kind":{"type":"TEXT","notNull":false,"unique":false,"default":"adapter"},"adapter_key":{"type":"TEXT","notNull":false,"unique":false},"config":{"type":"TEXT","notNull":false,"unique":false},"sharing":{"type":"TEXT","notNull":false,"unique":false,"default":"private"}},"indexes":[{"name":"course_sources_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"course_sources_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"98177eb3"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CourseSourceCollection":{"name":"coursesourcecollection","className":"CourseSourceCollection","qualifiedName":"@happyvertical/smrt-education:CourseSourceCollection","collection":"coursesources","filePath":"/home/runner/work/smrt/smrt/packages/education/src/course-source.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"CourseSource","exportName":"CourseSourceCollection","collectionExportName":"CourseSourceCollectionCollection","schema":{"tableName":"course_sources","ddl":"CREATE TABLE IF NOT EXISTS \\"course_sources\\" (\\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 \\"key\\" TEXT NOT NULL,\\n \\"name\\" TEXT NOT NULL,\\n \\"kind\\" TEXT DEFAULT 'adapter',\\n \\"adapter_key\\" TEXT,\\n \\"config\\" TEXT,\\n \\"sharing\\" TEXT DEFAULT 'private'\\n);","columns":{"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},"key":{"type":"TEXT","notNull":true,"unique":false},"name":{"type":"TEXT","notNull":true,"unique":false},"kind":{"type":"TEXT","notNull":false,"unique":false,"default":"adapter"},"adapter_key":{"type":"TEXT","notNull":false,"unique":false},"config":{"type":"TEXT","notNull":false,"unique":false},"sharing":{"type":"TEXT","notNull":false,"unique":false,"default":"private"}},"indexes":[{"name":"course_sources_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"course_sources_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"98177eb3"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:FamilyIntake":{"name":"familyintake","className":"FamilyIntake","qualifiedName":"@happyvertical/smrt-education:FamilyIntake","collection":"familyintakes","description":"Family-owned receipt, independent of learner attribution and ingestion expiry.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/family-intake-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"itemId":{"type":"text","required":false},"actorUserId":{"type":"text","required":false},"ownerProfileId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-profiles:Profile"},"contentDigest":{"type":"text","required":false},"sourceJson":{"type":"text","required":false,"_meta":{}}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true},"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"family_intakes","conflictColumns":["tenant_id","item_id"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"FamilyIntake","collectionExportName":"FamilyIntakeCollection","validationRules":[],"schema":{"tableName":"family_intakes","ddl":"CREATE TABLE IF NOT EXISTS \\"family_intakes\\" (\\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 \\"item_id\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"owner_profile_id\\" UUID,\\n \\"content_digest\\" TEXT,\\n \\"source_json\\" TEXT\\n);","columns":{"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},"item_id":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"owner_profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"content_digest":{"type":"TEXT","notNull":false,"unique":false},"source_json":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"family_intakes_tenant_id_item_id_idx","columns":["tenant_id","item_id"],"unique":true,"nullsNotDistinct":true},{"name":"family_intakes_slug_context_idx","columns":["slug","context"]},{"name":"family_intakes_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"family_intakes_owner_profile_id_idx","columns":["owner_profile_id"]}],"version":"2577578b"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:FamilyIntakeCollection":{"name":"familyintakecollection","className":"FamilyIntakeCollection","qualifiedName":"@happyvertical/smrt-education:FamilyIntakeCollection","collection":"familyintakes","filePath":"/home/runner/work/smrt/smrt/packages/education/src/family-intake-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"family_intakes","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"FamilyIntake","exportName":"FamilyIntakeCollection","collectionExportName":"FamilyIntakeCollectionCollection","schema":{"tableName":"family_intakes","ddl":"CREATE TABLE IF NOT EXISTS \\"family_intakes\\" (\\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 \\"item_id\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"owner_profile_id\\" UUID,\\n \\"content_digest\\" TEXT,\\n \\"source_json\\" TEXT\\n);","columns":{"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},"item_id":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"owner_profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"content_digest":{"type":"TEXT","notNull":false,"unique":false},"source_json":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"family_intakes_tenant_id_item_id_idx","columns":["tenant_id","item_id"],"unique":true,"nullsNotDistinct":true},{"name":"family_intakes_slug_context_idx","columns":["slug","context"]},{"name":"family_intakes_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"family_intakes_owner_profile_id_idx","columns":["owner_profile_id"]}],"version":"2577578b"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:FamilyIntakeAsset":{"name":"familyintakeasset","className":"FamilyIntakeAsset","qualifiedName":"@happyvertical/smrt-education:FamilyIntakeAsset","collection":"familyintakeassets","description":"Sole family owner join; adoption borrows this exact immutable original.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/family-intake-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"intakeId":{"type":"foreignKey","required":true,"related":"FamilyIntake","_meta":{"required":true}},"assetId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-assets:Asset"},"name":{"type":"text","required":false},"mimeType":{"type":"text","required":false},"sha256":{"type":"text","required":false},"position":{"type":"integer","required":true,"default":0}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true},"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"family_intake_assets","conflictColumns":["tenant_id","intake_id","asset_id"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"FamilyIntakeAsset","collectionExportName":"FamilyIntakeAssetCollection","displayLabelField":"name","validationRules":[{"field":"intakeId","rule":"required","fieldType":"foreignKey"},{"field":"position","rule":"required","fieldType":"integer"}],"schema":{"tableName":"family_intake_assets","ddl":"CREATE TABLE IF NOT EXISTS \\"family_intake_assets\\" (\\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 \\"intake_id\\" UUID NOT NULL,\\n \\"asset_id\\" UUID,\\n \\"name\\" TEXT,\\n \\"mime_type\\" TEXT,\\n \\"sha256\\" TEXT,\\n \\"position\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"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},"intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"family_intakes","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"name":{"type":"TEXT","notNull":false,"unique":false},"mime_type":{"type":"TEXT","notNull":false,"unique":false},"sha256":{"type":"TEXT","notNull":false,"unique":false},"position":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"family_intake_assets_tenant_id_intake_id_idx","columns":["tenant_id","intake_id","asset_id"],"unique":true,"nullsNotDistinct":true},{"name":"family_intake_assets_slug_context_idx","columns":["slug","context"]},{"name":"family_intake_assets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"family_intake_assets_intake_id_idx","columns":["intake_id"]},{"name":"family_intake_assets_asset_id_idx","columns":["asset_id"]}],"version":"3811d126"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:FamilyIntakeAssetCollection":{"name":"familyintakeassetcollection","className":"FamilyIntakeAssetCollection","qualifiedName":"@happyvertical/smrt-education:FamilyIntakeAssetCollection","collection":"familyintakeassets","filePath":"/home/runner/work/smrt/smrt/packages/education/src/family-intake-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"family_intake_assets","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"FamilyIntakeAsset","exportName":"FamilyIntakeAssetCollection","collectionExportName":"FamilyIntakeAssetCollectionCollection","schema":{"tableName":"family_intake_assets","ddl":"CREATE TABLE IF NOT EXISTS \\"family_intake_assets\\" (\\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 \\"intake_id\\" UUID NOT NULL,\\n \\"asset_id\\" UUID,\\n \\"name\\" TEXT,\\n \\"mime_type\\" TEXT,\\n \\"sha256\\" TEXT,\\n \\"position\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"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},"intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"family_intakes","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"name":{"type":"TEXT","notNull":false,"unique":false},"mime_type":{"type":"TEXT","notNull":false,"unique":false},"sha256":{"type":"TEXT","notNull":false,"unique":false},"position":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"family_intake_assets_tenant_id_intake_id_idx","columns":["tenant_id","intake_id","asset_id"],"unique":true,"nullsNotDistinct":true},{"name":"family_intake_assets_slug_context_idx","columns":["slug","context"]},{"name":"family_intake_assets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"family_intake_assets_intake_id_idx","columns":["intake_id"]},{"name":"family_intake_assets_asset_id_idx","columns":["asset_id"]}],"version":"3811d126"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:FamilyIntakeDecision":{"name":"familyintakedecision","className":"FamilyIntakeDecision","qualifiedName":"@happyvertical/smrt-education:FamilyIntakeDecision","collection":"familyintakedecisions","description":"Append-only attribution/adoption audit; no marks or learning outcomes.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/family-intake-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"intakeId":{"type":"foreignKey","required":true,"related":"FamilyIntake","_meta":{"required":true}},"requestKey":{"type":"text","required":false},"sequence":{"type":"integer","required":true,"default":0},"actorUserId":{"type":"text","required":false},"bodyJson":{"type":"text","required":false,"_meta":{}}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true},"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"family_intake_decisions","conflictColumns":["tenant_id","intake_id","request_key"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"FamilyIntakeDecision","collectionExportName":"FamilyIntakeDecisionCollection","validationRules":[{"field":"intakeId","rule":"required","fieldType":"foreignKey"},{"field":"sequence","rule":"required","fieldType":"integer"}],"schema":{"tableName":"family_intake_decisions","ddl":"CREATE TABLE IF NOT EXISTS \\"family_intake_decisions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"intake_id\\" UUID NOT NULL,\\n \\"request_key\\" TEXT,\\n \\"sequence\\" INTEGER NOT NULL DEFAULT 0,\\n \\"actor_user_id\\" TEXT,\\n \\"body_json\\" TEXT\\n);","columns":{"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},"intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"family_intakes","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":false,"unique":false},"sequence":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"body_json":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"family_intake_decisions_tenant_id_intake_id_idx","columns":["tenant_id","intake_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"family_intake_decisions_slug_context_idx","columns":["slug","context"]},{"name":"family_intake_decisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"family_intake_decisions_intake_id_idx","columns":["intake_id"]}],"version":"08875c81"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:FamilyIntakeDecisionCollection":{"name":"familyintakedecisioncollection","className":"FamilyIntakeDecisionCollection","qualifiedName":"@happyvertical/smrt-education:FamilyIntakeDecisionCollection","collection":"familyintakedecisions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/family-intake-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"family_intake_decisions","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"FamilyIntakeDecision","exportName":"FamilyIntakeDecisionCollection","collectionExportName":"FamilyIntakeDecisionCollectionCollection","schema":{"tableName":"family_intake_decisions","ddl":"CREATE TABLE IF NOT EXISTS \\"family_intake_decisions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"intake_id\\" UUID NOT NULL,\\n \\"request_key\\" TEXT,\\n \\"sequence\\" INTEGER NOT NULL DEFAULT 0,\\n \\"actor_user_id\\" TEXT,\\n \\"body_json\\" TEXT\\n);","columns":{"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},"intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"family_intakes","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":false,"unique":false},"sequence":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"body_json":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"family_intake_decisions_tenant_id_intake_id_idx","columns":["tenant_id","intake_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"family_intake_decisions_slug_context_idx","columns":["slug","context"]},{"name":"family_intake_decisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"family_intake_decisions_intake_id_idx","columns":["intake_id"]}],"version":"08875c81"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Learner":{"name":"learner","className":"Learner","qualifiedName":"@happyvertical/smrt-education:Learner","collection":"learners","description":"A learner is a real user/profile identity with active family membership.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/learners.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"userId":{"type":"crossPackageRef","required":true,"related":"@happyvertical/smrt-users:User"},"profileId":{"type":"crossPackageRef","required":true,"related":"@happyvertical/smrt-profiles:Profile"},"displayName":{"type":"text","required":false},"birthDate":{"type":"datetime","required":false},"level":{"type":"integer","required":true,"default":0},"settings":{"type":"text","required":false}},"methods":{"getSettings":{"name":"getSettings","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true},"setSettings":{"name":"setSettings","async":false,"parameters":[{"name":"value","type":"Record<string, unknown>","optional":false}],"returnType":"void","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"Learner","collectionExportName":"LearnerCollection","validationRules":[{"field":"userId","rule":"required","fieldType":"crossPackageRef"},{"field":"profileId","rule":"required","fieldType":"crossPackageRef"},{"field":"level","rule":"required","fieldType":"integer"}],"schema":{"tableName":"learners","ddl":"CREATE TABLE IF NOT EXISTS \\"learners\\" (\\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 \\"user_id\\" UUID NOT NULL,\\n \\"profile_id\\" UUID NOT NULL,\\n \\"display_name\\" TEXT,\\n \\"birth_date\\" TIMESTAMP,\\n \\"level\\" INTEGER NOT NULL DEFAULT 0,\\n \\"settings\\" TEXT\\n);","columns":{"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},"user_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"display_name":{"type":"TEXT","notNull":false,"unique":false},"birth_date":{"type":"TIMESTAMP","notNull":false,"unique":false},"level":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"settings":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"learners_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"learners_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"learners_user_id_idx","columns":["user_id"]},{"name":"learners_profile_id_idx","columns":["profile_id"]}],"version":"ca9907b5"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Curriculum":{"name":"curriculum","className":"Curriculum","qualifiedName":"@happyvertical/smrt-education:Curriculum","collection":"curriculums","description":"A distinct plan retains its own enrollment history.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/learners.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"title":{"type":"text","required":true,"_meta":{"required":true}},"startsOn":{"type":"datetime","required":false},"endsOn":{"type":"datetime","required":false},"status":{"type":"text","required":false,"default":"planned","enum":["planned","active","completed","archived"]}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"tableName":"curricula","tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"Curriculum","collectionExportName":"CurriculumCollection","displayLabelField":"title","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"title","rule":"required","fieldType":"text"}],"schema":{"tableName":"curricula","ddl":"CREATE TABLE IF NOT EXISTS \\"curricula\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"title\\" TEXT NOT NULL,\\n \\"starts_on\\" TIMESTAMP,\\n \\"ends_on\\" TIMESTAMP,\\n \\"status\\" TEXT DEFAULT 'planned'\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":true,"unique":false},"starts_on":{"type":"TIMESTAMP","notNull":false,"unique":false},"ends_on":{"type":"TIMESTAMP","notNull":false,"unique":false},"status":{"type":"TEXT","notNull":false,"unique":false,"default":"planned"}},"indexes":[{"name":"curricula_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"curricula_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"curricula_learner_id_idx","columns":["learner_id"]}],"version":"b7e90cbd"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Enrollment":{"name":"enrollment","className":"Enrollment","qualifiedName":"@happyvertical/smrt-education:Enrollment","collection":"enrollments","description":"One course in one curriculum; a new curriculum means a new enrollment.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/learners.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"curriculumId":{"type":"foreignKey","required":true,"related":"Curriculum","_meta":{"required":true}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"courseId":{"type":"foreignKey","required":true,"related":"Course","_meta":{"required":true}},"status":{"type":"text","required":false,"default":"planned","enum":["planned","active","paused","completed","dropped"]},"startedAt":{"type":"datetime","required":false},"completedAt":{"type":"datetime","required":false},"targetMinutesPerWeek":{"type":"integer","required":true,"default":0},"sortOrder":{"type":"integer","required":true,"default":0}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"conflictColumns":["tenant_id","curriculum_id","course_id"],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"Enrollment","collectionExportName":"EnrollmentCollection","validationRules":[{"field":"curriculumId","rule":"required","fieldType":"foreignKey"},{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"courseId","rule":"required","fieldType":"foreignKey"},{"field":"targetMinutesPerWeek","rule":"required","fieldType":"integer"},{"field":"sortOrder","rule":"required","fieldType":"integer"}],"schema":{"tableName":"enrollments","ddl":"CREATE TABLE IF NOT EXISTS \\"enrollments\\" (\\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 \\"curriculum_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"course_id\\" UUID NOT NULL,\\n \\"status\\" TEXT DEFAULT 'planned',\\n \\"started_at\\" TIMESTAMP,\\n \\"completed_at\\" TIMESTAMP,\\n \\"target_minutes_per_week\\" INTEGER NOT NULL DEFAULT 0,\\n \\"sort_order\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"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},"curriculum_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"curricula","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"course_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"courses","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"status":{"type":"TEXT","notNull":false,"unique":false,"default":"planned"},"started_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"completed_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"target_minutes_per_week":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"sort_order":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"enrollments_tenant_id_curriculum_id_idx","columns":["tenant_id","curriculum_id","course_id"],"unique":true},{"name":"enrollments_slug_context_idx","columns":["slug","context"]},{"name":"enrollments_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"enrollments_curriculum_id_idx","columns":["curriculum_id"]},{"name":"enrollments_learner_id_idx","columns":["learner_id"]},{"name":"enrollments_course_id_idx","columns":["course_id"]}],"version":"2a34b5ee"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:LessonProgress":{"name":"lessonprogress","className":"LessonProgress","qualifiedName":"@happyvertical/smrt-education:LessonProgress","collection":"lessonprogresses","description":"Progress identity is enrollment + lesson, never learner + lesson.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/learners.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"enrollmentId":{"type":"foreignKey","required":true,"related":"Enrollment","_meta":{"required":true}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"lessonId":{"type":"foreignKey","required":true,"related":"Lesson","_meta":{"required":true}},"status":{"type":"text","required":false,"default":"not_started","enum":["not_started","in_progress","submitted","needs_review","complete","skipped"]},"startedAt":{"type":"datetime","required":false},"completedAt":{"type":"datetime","required":false},"timeSpentSeconds":{"type":"integer","required":true,"default":0},"attempts":{"type":"integer","required":true,"default":0},"bestScore":{"type":"decimal","required":false,"_meta":{"nullable":true}}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"tableName":"lesson_progress","conflictColumns":["tenant_id","enrollment_id","lesson_id"],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"LessonProgress","collectionExportName":"LessonProgressCollection","validationRules":[{"field":"enrollmentId","rule":"required","fieldType":"foreignKey"},{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"lessonId","rule":"required","fieldType":"foreignKey"},{"field":"timeSpentSeconds","rule":"required","fieldType":"integer"},{"field":"attempts","rule":"required","fieldType":"integer"}],"schema":{"tableName":"lesson_progress","ddl":"CREATE TABLE IF NOT EXISTS \\"lesson_progress\\" (\\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 \\"enrollment_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"lesson_id\\" UUID NOT NULL,\\n \\"status\\" TEXT DEFAULT 'not_started',\\n \\"started_at\\" TIMESTAMP,\\n \\"completed_at\\" TIMESTAMP,\\n \\"time_spent_seconds\\" INTEGER NOT NULL DEFAULT 0,\\n \\"attempts\\" INTEGER NOT NULL DEFAULT 0,\\n \\"best_score\\" REAL\\n);","columns":{"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},"enrollment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"enrollments","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"status":{"type":"TEXT","notNull":false,"unique":false,"default":"not_started"},"started_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"completed_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"time_spent_seconds":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"attempts":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"best_score":{"type":"REAL","notNull":false,"unique":false}},"indexes":[{"name":"lesson_progress_tenant_id_enrollment_id_idx","columns":["tenant_id","enrollment_id","lesson_id"],"unique":true},{"name":"lesson_progress_slug_context_idx","columns":["slug","context"]},{"name":"lesson_progress_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lesson_progress_enrollment_id_idx","columns":["enrollment_id"]},{"name":"lesson_progress_learner_id_idx","columns":["learner_id"]},{"name":"lesson_progress_lesson_id_idx","columns":["lesson_id"]}],"version":"36704fbd"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:LessonAsset":{"name":"lessonasset","className":"LessonAsset","qualifiedName":"@happyvertical/smrt-education:LessonAsset","collection":"lessonassets","filePath":"/home/runner/work/smrt/smrt/packages/education/src/lesson-assets.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true,"mode":"optional","field":"tenantId","allowSuperAdminBypass":false}}},"lessonId":{"type":"foreignKey","required":true,"related":"Lesson","_meta":{"required":true}},"assetId":{"type":"crossPackageRef","required":true,"related":"@happyvertical/smrt-assets:Asset"},"relationship":{"type":"text","required":true,"default":"attachment","_meta":{"required":true},"enum":["printable","answer-key","video","attachment"]},"sortOrder":{"type":"integer","required":true,"default":0}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"lesson_assets","conflictColumns":["tenant_id","lesson_id","asset_id","relationship"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"optional"}},"extends":"SmrtObject","exportName":"LessonAsset","collectionExportName":"LessonAssetCollection","validationRules":[{"field":"lessonId","rule":"required","fieldType":"foreignKey"},{"field":"assetId","rule":"required","fieldType":"crossPackageRef"},{"field":"relationship","rule":"required","fieldType":"text"},{"field":"sortOrder","rule":"required","fieldType":"integer"}],"schema":{"tableName":"lesson_assets","ddl":"CREATE TABLE IF NOT EXISTS \\"lesson_assets\\" (\\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,\\n \\"lesson_id\\" UUID NOT NULL,\\n \\"asset_id\\" UUID NOT NULL,\\n \\"relationship\\" TEXT NOT NULL DEFAULT 'attachment',\\n \\"sort_order\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"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":false,"unique":false},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"relationship":{"type":"TEXT","notNull":true,"unique":false,"default":"attachment"},"sort_order":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"lesson_assets_tenant_id_lesson_id_idx","columns":["tenant_id","lesson_id","asset_id","relationship"],"unique":true,"nullsNotDistinct":true},{"name":"lesson_assets_slug_context_idx","columns":["slug","context"]},{"name":"lesson_assets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lesson_assets_lesson_id_idx","columns":["lesson_id"]},{"name":"lesson_assets_asset_id_idx","columns":["asset_id"]}],"version":"d96385c6"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Submission":{"name":"submission","className":"Submission","qualifiedName":"@happyvertical/smrt-education:Submission","collection":"submissions","description":"Evidence that a learner completed one progress item.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/submissions.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"lessonId":{"type":"foreignKey","required":true,"related":"Lesson","_meta":{"required":true}},"progressId":{"type":"foreignKey","required":true,"related":"LessonProgress","_meta":{"required":true}},"submittedAt":{"type":"text","required":false},"status":{"type":"text","required":false,"default":"captured","enum":["captured","extracting","needs_review","graded","rejected"]},"notes":{"type":"text","required":false},"captureKey":{"type":"text","required":false},"captureDigest":{"type":"text","required":false},"kind":{"type":"text","required":true,"default":"completed_work","_meta":{"required":true},"enum":["blank_reference","completed_work"]},"previousSubmissionId":{"type":"foreignKey","required":false,"related":"Submission","_meta":{"nullable":true}},"intakeItemId":{"type":"text","required":false,"_meta":{"nullable":true}}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableStrategy":"sti","api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context","_meta_type"]},"extends":"SmrtObject","exportName":"Submission","collectionExportName":"SubmissionCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"lessonId","rule":"required","fieldType":"foreignKey"},{"field":"progressId","rule":"required","fieldType":"foreignKey"},{"field":"kind","rule":"required","fieldType":"text"}],"schema":{"tableName":"submissions","ddl":"CREATE TABLE IF NOT EXISTS \\"submissions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"learner_id\\" UUID,\\n \\"lesson_id\\" UUID,\\n \\"progress_id\\" UUID,\\n \\"submitted_at\\" TEXT,\\n \\"status\\" TEXT DEFAULT 'captured',\\n \\"notes\\" TEXT,\\n \\"capture_key\\" TEXT,\\n \\"capture_digest\\" TEXT,\\n \\"kind\\" TEXT DEFAULT 'completed_work',\\n \\"previous_submission_id\\" UUID,\\n \\"intake_item_id\\" TEXT,\\n \\"page_count\\" INTEGER DEFAULT 0,\\n \\"ocr_text\\" TEXT,\\n \\"extracted\\" TEXT,\\n \\"reported_by\\" TEXT DEFAULT 'learner',\\n \\"evidence_url\\" TEXT,\\n \\"reported_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"progress_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lesson_progress","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submitted_at":{"type":"TEXT","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"captured"},"notes":{"type":"TEXT","notNull":false},"capture_key":{"type":"TEXT","notNull":false},"capture_digest":{"type":"TEXT","notNull":false},"kind":{"type":"TEXT","notNull":false,"default":"completed_work"},"previous_submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_item_id":{"type":"TEXT","notNull":false},"page_count":{"type":"INTEGER","notNull":false,"default":0},"ocr_text":{"type":"TEXT","notNull":false},"extracted":{"type":"TEXT","notNull":false},"reported_by":{"type":"TEXT","notNull":false,"default":"learner"},"evidence_url":{"type":"TEXT","notNull":false},"reported_score":{"type":"REAL","notNull":false}},"indexes":[{"name":"submissions_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"submissions_meta_type_idx","columns":["_meta_type"]},{"name":"submissions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submissions_learner_id_idx","columns":["learner_id"]},{"name":"submissions_lesson_id_idx","columns":["lesson_id"]},{"name":"submissions_progress_id_idx","columns":["progress_id"]},{"name":"submissions_previous_submission_id_idx","columns":["previous_submission_id"]}],"version":"27a21ab4"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:SubmissionIntakeBinding":{"name":"submissionintakebinding","className":"SubmissionIntakeBinding","qualifiedName":"@happyvertical/smrt-education:SubmissionIntakeBinding","collection":"submissionintakebindings","description":"Durable tenant/item claim for trusted ingestion receipts. This separate table keeps ordinary uploads (which have no intake item) out of the uniqueness key.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/submissions.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"intakeItemId":{"type":"text","required":true,"_meta":{"required":true}},"submissionId":{"type":"foreignKey","required":true,"related":"Submission","_meta":{"required":true}}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"submission_intake_bindings","api":false,"mcp":false,"cli":false,"conflictColumns":["tenant_id","intake_item_id"],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"SubmissionIntakeBinding","collectionExportName":"SubmissionIntakeBindingCollection","validationRules":[{"field":"intakeItemId","rule":"required","fieldType":"text"},{"field":"submissionId","rule":"required","fieldType":"foreignKey"}],"schema":{"tableName":"submission_intake_bindings","ddl":"CREATE TABLE IF NOT EXISTS \\"submission_intake_bindings\\" (\\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 \\"intake_item_id\\" TEXT NOT NULL,\\n \\"submission_id\\" UUID NOT NULL\\n);","columns":{"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},"intake_item_id":{"type":"TEXT","notNull":true,"unique":false},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}}},"indexes":[{"name":"submission_intake_bindings_tenant_id_intake_item_id_idx","columns":["tenant_id","intake_item_id"],"unique":true},{"name":"submission_intake_bindings_slug_context_idx","columns":["slug","context"]},{"name":"submission_intake_bindings_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submission_intake_bindings_submission_id_idx","columns":["submission_id"]}],"version":"7102c909"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:ScannedSubmission":{"name":"scannedsubmission","className":"ScannedSubmission","qualifiedName":"@happyvertical/smrt-education:ScannedSubmission","collection":"submissions","description":"Photos or scans of work submitted for review.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/submissions.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"lessonId":{"type":"foreignKey","required":true,"related":"Lesson","_meta":{"required":true}},"progressId":{"type":"foreignKey","required":true,"related":"LessonProgress","_meta":{"required":true}},"submittedAt":{"type":"text","required":false},"status":{"type":"text","required":false,"default":"captured","enum":["captured","extracting","needs_review","graded","rejected"]},"notes":{"type":"text","required":false},"captureKey":{"type":"text","required":false},"captureDigest":{"type":"text","required":false},"kind":{"type":"text","required":true,"default":"completed_work","_meta":{"required":true},"enum":["blank_reference","completed_work"]},"previousSubmissionId":{"type":"foreignKey","required":false,"related":"Submission","_meta":{"nullable":true}},"intakeItemId":{"type":"text","required":false,"_meta":{"nullable":true}},"pageCount":{"type":"integer","required":true,"default":0},"ocrText":{"type":"text","required":false},"extracted":{"type":"text","required":false}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true},"getExtracted":{"name":"getExtracted","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true},"setExtracted":{"name":"setExtracted","async":false,"parameters":[{"name":"value","type":"Record<string, unknown>","optional":false}],"returnType":"void","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"submissions","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Submission","exportName":"ScannedSubmission","collectionExportName":"ScannedSubmissionCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"lessonId","rule":"required","fieldType":"foreignKey"},{"field":"progressId","rule":"required","fieldType":"foreignKey"},{"field":"kind","rule":"required","fieldType":"text"},{"field":"pageCount","rule":"required","fieldType":"integer"}],"schema":{"tableName":"submissions","ddl":"CREATE TABLE IF NOT EXISTS \\"submissions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"learner_id\\" UUID,\\n \\"lesson_id\\" UUID,\\n \\"progress_id\\" UUID,\\n \\"submitted_at\\" TEXT,\\n \\"status\\" TEXT DEFAULT 'captured',\\n \\"notes\\" TEXT,\\n \\"capture_key\\" TEXT,\\n \\"capture_digest\\" TEXT,\\n \\"kind\\" TEXT DEFAULT 'completed_work',\\n \\"previous_submission_id\\" UUID,\\n \\"intake_item_id\\" TEXT,\\n \\"page_count\\" INTEGER DEFAULT 0,\\n \\"ocr_text\\" TEXT,\\n \\"extracted\\" TEXT,\\n \\"reported_by\\" TEXT DEFAULT 'learner',\\n \\"evidence_url\\" TEXT,\\n \\"reported_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"progress_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lesson_progress","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submitted_at":{"type":"TEXT","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"captured"},"notes":{"type":"TEXT","notNull":false},"capture_key":{"type":"TEXT","notNull":false},"capture_digest":{"type":"TEXT","notNull":false},"kind":{"type":"TEXT","notNull":false,"default":"completed_work"},"previous_submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_item_id":{"type":"TEXT","notNull":false},"page_count":{"type":"INTEGER","notNull":false,"default":0},"ocr_text":{"type":"TEXT","notNull":false},"extracted":{"type":"TEXT","notNull":false},"reported_by":{"type":"TEXT","notNull":false,"default":"learner"},"evidence_url":{"type":"TEXT","notNull":false},"reported_score":{"type":"REAL","notNull":false}},"indexes":[{"name":"submissions_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"submissions_meta_type_idx","columns":["_meta_type"]},{"name":"submissions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submissions_learner_id_idx","columns":["learner_id"]},{"name":"submissions_lesson_id_idx","columns":["lesson_id"]},{"name":"submissions_progress_id_idx","columns":["progress_id"]},{"name":"submissions_previous_submission_id_idx","columns":["previous_submission_id"]}],"version":"7c394510"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:ExternalCompletion":{"name":"externalcompletion","className":"ExternalCompletion","qualifiedName":"@happyvertical/smrt-education:ExternalCompletion","collection":"submissions","description":"Completion reported by the learner, guardian, or external source.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/submissions.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"lessonId":{"type":"foreignKey","required":true,"related":"Lesson","_meta":{"required":true}},"progressId":{"type":"foreignKey","required":true,"related":"LessonProgress","_meta":{"required":true}},"submittedAt":{"type":"text","required":false},"status":{"type":"text","required":false,"default":"captured","enum":["captured","extracting","needs_review","graded","rejected"]},"notes":{"type":"text","required":false},"captureKey":{"type":"text","required":false},"captureDigest":{"type":"text","required":false},"kind":{"type":"text","required":true,"default":"completed_work","_meta":{"required":true},"enum":["blank_reference","completed_work"]},"previousSubmissionId":{"type":"foreignKey","required":false,"related":"Submission","_meta":{"nullable":true}},"intakeItemId":{"type":"text","required":false,"_meta":{"nullable":true}},"reportedBy":{"type":"text","required":false,"default":"learner","enum":["learner","guardian","source"]},"evidenceUrl":{"type":"text","required":false},"reportedScore":{"type":"decimal","required":false,"_meta":{}}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"submissions","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Submission","exportName":"ExternalCompletion","collectionExportName":"ExternalCompletionCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"lessonId","rule":"required","fieldType":"foreignKey"},{"field":"progressId","rule":"required","fieldType":"foreignKey"},{"field":"kind","rule":"required","fieldType":"text"}],"schema":{"tableName":"submissions","ddl":"CREATE TABLE IF NOT EXISTS \\"submissions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"learner_id\\" UUID,\\n \\"lesson_id\\" UUID,\\n \\"progress_id\\" UUID,\\n \\"submitted_at\\" TEXT,\\n \\"status\\" TEXT DEFAULT 'captured',\\n \\"notes\\" TEXT,\\n \\"capture_key\\" TEXT,\\n \\"capture_digest\\" TEXT,\\n \\"kind\\" TEXT DEFAULT 'completed_work',\\n \\"previous_submission_id\\" UUID,\\n \\"intake_item_id\\" TEXT,\\n \\"page_count\\" INTEGER DEFAULT 0,\\n \\"ocr_text\\" TEXT,\\n \\"extracted\\" TEXT,\\n \\"reported_by\\" TEXT DEFAULT 'learner',\\n \\"evidence_url\\" TEXT,\\n \\"reported_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"progress_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lesson_progress","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submitted_at":{"type":"TEXT","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"captured"},"notes":{"type":"TEXT","notNull":false},"capture_key":{"type":"TEXT","notNull":false},"capture_digest":{"type":"TEXT","notNull":false},"kind":{"type":"TEXT","notNull":false,"default":"completed_work"},"previous_submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_item_id":{"type":"TEXT","notNull":false},"page_count":{"type":"INTEGER","notNull":false,"default":0},"ocr_text":{"type":"TEXT","notNull":false},"extracted":{"type":"TEXT","notNull":false},"reported_by":{"type":"TEXT","notNull":false,"default":"learner"},"evidence_url":{"type":"TEXT","notNull":false},"reported_score":{"type":"REAL","notNull":false}},"indexes":[{"name":"submissions_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"submissions_meta_type_idx","columns":["_meta_type"]},{"name":"submissions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submissions_learner_id_idx","columns":["learner_id"]},{"name":"submissions_lesson_id_idx","columns":["lesson_id"]},{"name":"submissions_progress_id_idx","columns":["progress_id"]},{"name":"submissions_previous_submission_id_idx","columns":["previous_submission_id"]}],"version":"eff3715d"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Attestation":{"name":"attestation","className":"Attestation","qualifiedName":"@happyvertical/smrt-education:Attestation","collection":"submissions","description":"A guardian's statement that work was completed.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/submissions.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"lessonId":{"type":"foreignKey","required":true,"related":"Lesson","_meta":{"required":true}},"progressId":{"type":"foreignKey","required":true,"related":"LessonProgress","_meta":{"required":true}},"submittedAt":{"type":"text","required":false},"status":{"type":"text","required":false,"default":"captured","enum":["captured","extracting","needs_review","graded","rejected"]},"notes":{"type":"text","required":false},"captureKey":{"type":"text","required":false},"captureDigest":{"type":"text","required":false},"kind":{"type":"text","required":true,"default":"completed_work","_meta":{"required":true},"enum":["blank_reference","completed_work"]},"previousSubmissionId":{"type":"foreignKey","required":false,"related":"Submission","_meta":{"nullable":true}},"intakeItemId":{"type":"text","required":false,"_meta":{"nullable":true}}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"submissions","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Submission","exportName":"Attestation","collectionExportName":"AttestationCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"lessonId","rule":"required","fieldType":"foreignKey"},{"field":"progressId","rule":"required","fieldType":"foreignKey"},{"field":"kind","rule":"required","fieldType":"text"}],"schema":{"tableName":"submissions","ddl":"CREATE TABLE IF NOT EXISTS \\"submissions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"learner_id\\" UUID,\\n \\"lesson_id\\" UUID,\\n \\"progress_id\\" UUID,\\n \\"submitted_at\\" TEXT,\\n \\"status\\" TEXT DEFAULT 'captured',\\n \\"notes\\" TEXT,\\n \\"capture_key\\" TEXT,\\n \\"capture_digest\\" TEXT,\\n \\"kind\\" TEXT DEFAULT 'completed_work',\\n \\"previous_submission_id\\" UUID,\\n \\"intake_item_id\\" TEXT,\\n \\"page_count\\" INTEGER DEFAULT 0,\\n \\"ocr_text\\" TEXT,\\n \\"extracted\\" TEXT,\\n \\"reported_by\\" TEXT DEFAULT 'learner',\\n \\"evidence_url\\" TEXT,\\n \\"reported_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"progress_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lesson_progress","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submitted_at":{"type":"TEXT","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"captured"},"notes":{"type":"TEXT","notNull":false},"capture_key":{"type":"TEXT","notNull":false},"capture_digest":{"type":"TEXT","notNull":false},"kind":{"type":"TEXT","notNull":false,"default":"completed_work"},"previous_submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_item_id":{"type":"TEXT","notNull":false},"page_count":{"type":"INTEGER","notNull":false,"default":0},"ocr_text":{"type":"TEXT","notNull":false},"extracted":{"type":"TEXT","notNull":false},"reported_by":{"type":"TEXT","notNull":false,"default":"learner"},"evidence_url":{"type":"TEXT","notNull":false},"reported_score":{"type":"REAL","notNull":false}},"indexes":[{"name":"submissions_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"submissions_meta_type_idx","columns":["_meta_type"]},{"name":"submissions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submissions_learner_id_idx","columns":["learner_id"]},{"name":"submissions_lesson_id_idx","columns":["lesson_id"]},{"name":"submissions_progress_id_idx","columns":["progress_id"]},{"name":"submissions_previous_submission_id_idx","columns":["previous_submission_id"]}],"version":"4f3230a3"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:SubmissionAsset":{"name":"submissionasset","className":"SubmissionAsset","qualifiedName":"@happyvertical/smrt-education:SubmissionAsset","collection":"submissionassets","description":"The tenant-owned files attached to a submission.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/submissions.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"submissionId":{"type":"foreignKey","required":true,"related":"Submission","_meta":{"required":true}},"assetId":{"type":"crossPackageRef","required":true,"related":"@happyvertical/smrt-assets:Asset"},"relationship":{"type":"text","required":true,"default":"page","_meta":{"required":true},"enum":["page","attachment"]},"sortOrder":{"type":"integer","required":true,"default":0}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"submission_assets","conflictColumns":["tenant_id","submission_id","asset_id","relationship"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"SubmissionAsset","collectionExportName":"SubmissionAssetCollection","validationRules":[{"field":"submissionId","rule":"required","fieldType":"foreignKey"},{"field":"assetId","rule":"required","fieldType":"crossPackageRef"},{"field":"relationship","rule":"required","fieldType":"text"},{"field":"sortOrder","rule":"required","fieldType":"integer"}],"schema":{"tableName":"submission_assets","ddl":"CREATE TABLE IF NOT EXISTS \\"submission_assets\\" (\\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 \\"submission_id\\" UUID NOT NULL,\\n \\"asset_id\\" UUID NOT NULL,\\n \\"relationship\\" TEXT NOT NULL DEFAULT 'page',\\n \\"sort_order\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"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},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"relationship":{"type":"TEXT","notNull":true,"unique":false,"default":"page"},"sort_order":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"submission_assets_tenant_id_submission_id_idx","columns":["tenant_id","submission_id","asset_id","relationship"],"unique":true},{"name":"submission_assets_slug_context_idx","columns":["slug","context"]},{"name":"submission_assets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submission_assets_submission_id_idx","columns":["submission_id"]},{"name":"submission_assets_asset_id_idx","columns":["asset_id"]}],"version":"d9b61c8a"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Grade":{"name":"grade","className":"Grade","qualifiedName":"@happyvertical/smrt-education:Grade","collection":"grades","description":"An assessment of a submission; the service selects the authoritative grade.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/submissions.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"submissionId":{"type":"foreignKey","required":true,"related":"Submission","_meta":{"required":true}},"graderKind":{"type":"text","required":true,"default":"auto","_meta":{"required":true},"enum":["auto","ai","guardian","instructor"]},"graderProfileId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-profiles:Profile","_meta":{"nullable":true}},"score":{"type":"decimal","required":false,"_meta":{"nullable":true}},"pointsEarned":{"type":"integer","required":false,"_meta":{"nullable":true}},"pointsPossible":{"type":"integer","required":false,"_meta":{"nullable":true}},"rubricResults":{"type":"text","required":false},"feedback":{"type":"text","required":false},"gradedAt":{"type":"text","required":false}},"methods":{"getRubricResults":{"name":"getRubricResults","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true},"setRubricResults":{"name":"setRubricResults","async":false,"parameters":[{"name":"value","type":"Record<string, unknown>","optional":false}],"returnType":"void","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"Grade","collectionExportName":"GradeCollection","validationRules":[{"field":"submissionId","rule":"required","fieldType":"foreignKey"},{"field":"graderKind","rule":"required","fieldType":"text"}],"schema":{"tableName":"grades","ddl":"CREATE TABLE IF NOT EXISTS \\"grades\\" (\\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 \\"submission_id\\" UUID NOT NULL,\\n \\"grader_kind\\" TEXT NOT NULL DEFAULT 'auto',\\n \\"grader_profile_id\\" UUID,\\n \\"score\\" REAL,\\n \\"points_earned\\" INTEGER,\\n \\"points_possible\\" INTEGER,\\n \\"rubric_results\\" TEXT,\\n \\"feedback\\" TEXT,\\n \\"graded_at\\" TEXT\\n);","columns":{"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},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"grader_kind":{"type":"TEXT","notNull":true,"unique":false,"default":"auto"},"grader_profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"score":{"type":"REAL","notNull":false,"unique":false},"points_earned":{"type":"INTEGER","notNull":false,"unique":false},"points_possible":{"type":"INTEGER","notNull":false,"unique":false},"rubric_results":{"type":"TEXT","notNull":false,"unique":false},"feedback":{"type":"TEXT","notNull":false,"unique":false},"graded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"grades_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"grades_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"grades_submission_id_idx","columns":["submission_id"]},{"name":"grades_grader_profile_id_idx","columns":["grader_profile_id"]}],"version":"7d629fec"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Workbook":{"name":"workbook","className":"Workbook","qualifiedName":"@happyvertical/smrt-education:Workbook","collection":"workbooks","description":"Education-owned private workbook record. Mutations go through WorkbookService.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"workbookKey":{"type":"text","required":false},"title":{"type":"text","required":false},"edition":{"type":"text","required":false},"reviewRequired":{"type":"boolean","required":true,"default":true},"policyVersion":{"type":"integer","required":true,"default":1}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbooks","conflictColumns":["tenant_id","learner_id","workbook_key"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"Workbook","collectionExportName":"WorkbookCollection","displayLabelField":"title","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"reviewRequired","rule":"required","fieldType":"boolean"},{"field":"policyVersion","rule":"required","fieldType":"integer"}],"schema":{"tableName":"workbooks","ddl":"CREATE TABLE IF NOT EXISTS \\"workbooks\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"workbook_key\\" TEXT,\\n \\"title\\" TEXT,\\n \\"edition\\" TEXT,\\n \\"review_required\\" BOOLEAN NOT NULL DEFAULT TRUE,\\n \\"policy_version\\" INTEGER NOT NULL DEFAULT 1\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"workbook_key":{"type":"TEXT","notNull":false,"unique":false},"title":{"type":"TEXT","notNull":false,"unique":false},"edition":{"type":"TEXT","notNull":false,"unique":false},"review_required":{"type":"BOOLEAN","notNull":true,"unique":false,"default":true},"policy_version":{"type":"INTEGER","notNull":true,"unique":false,"default":1}},"indexes":[{"name":"workbooks_tenant_id_learner_id_idx","columns":["tenant_id","learner_id","workbook_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbooks_slug_context_idx","columns":["slug","context"]},{"name":"workbooks_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbooks_learner_id_idx","columns":["learner_id"]}],"version":"a5b56a39"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookCollection":{"name":"workbookcollection","className":"WorkbookCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookCollection","collection":"workbooks","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbooks","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Workbook","exportName":"WorkbookCollection","collectionExportName":"WorkbookCollectionCollection","schema":{"tableName":"workbooks","ddl":"CREATE TABLE IF NOT EXISTS \\"workbooks\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"workbook_key\\" TEXT,\\n \\"title\\" TEXT,\\n \\"edition\\" TEXT,\\n \\"review_required\\" BOOLEAN NOT NULL DEFAULT TRUE,\\n \\"policy_version\\" INTEGER NOT NULL DEFAULT 1\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"workbook_key":{"type":"TEXT","notNull":false,"unique":false},"title":{"type":"TEXT","notNull":false,"unique":false},"edition":{"type":"TEXT","notNull":false,"unique":false},"review_required":{"type":"BOOLEAN","notNull":true,"unique":false,"default":true},"policy_version":{"type":"INTEGER","notNull":true,"unique":false,"default":1}},"indexes":[{"name":"workbooks_tenant_id_learner_id_idx","columns":["tenant_id","learner_id","workbook_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbooks_slug_context_idx","columns":["slug","context"]},{"name":"workbooks_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbooks_learner_id_idx","columns":["learner_id"]}],"version":"a5b56a39"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookActivity":{"name":"workbookactivity","className":"WorkbookActivity","qualifiedName":"@happyvertical/smrt-education:WorkbookActivity","collection":"workbookactivities","description":"Education-owned private workbook record. Mutations go through WorkbookService.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"workbookId":{"type":"foreignKey","required":false,"related":"Workbook","_meta":{"nullable":true}},"captureKind":{"type":"text","required":true,"default":"identified","_meta":{"required":true,"default":"identified"}},"photoIntakeId":{"type":"foreignKey","required":false,"related":"WorkbookPhotoIntake","_meta":{"nullable":true}},"enrollmentId":{"type":"foreignKey","required":true,"related":"Enrollment","_meta":{"required":true}},"lessonId":{"type":"foreignKey","required":true,"related":"Lesson","_meta":{"required":true}},"pageKey":{"type":"text","required":false},"pageLabel":{"type":"text","required":false}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_activities","conflictColumns":["tenant_id","workbook_id","page_key"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookActivity","collectionExportName":"WorkbookActivityCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"captureKind","rule":"required","fieldType":"text"},{"field":"enrollmentId","rule":"required","fieldType":"foreignKey"},{"field":"lessonId","rule":"required","fieldType":"foreignKey"}],"schema":{"tableName":"workbook_activities","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_activities\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"workbook_id\\" UUID,\\n \\"capture_kind\\" TEXT NOT NULL DEFAULT 'identified',\\n \\"photo_intake_id\\" UUID,\\n \\"enrollment_id\\" UUID NOT NULL,\\n \\"lesson_id\\" UUID NOT NULL,\\n \\"page_key\\" TEXT,\\n \\"page_label\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"workbook_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbooks","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"capture_kind":{"type":"TEXT","notNull":true,"unique":false,"default":"identified"},"photo_intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_photo_intakes","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"enrollment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"enrollments","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"page_key":{"type":"TEXT","notNull":false,"unique":false},"page_label":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_activities_tenant_id_workbook_id_idx","columns":["tenant_id","workbook_id","page_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_activities_slug_context_idx","columns":["slug","context"]},{"name":"workbook_activities_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_activities_learner_id_idx","columns":["learner_id"]},{"name":"workbook_activities_workbook_id_idx","columns":["workbook_id"]},{"name":"workbook_activities_photo_intake_id_idx","columns":["photo_intake_id"]},{"name":"workbook_activities_enrollment_id_idx","columns":["enrollment_id"]},{"name":"workbook_activities_lesson_id_idx","columns":["lesson_id"]}],"version":"320c8eb0"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookActivityCollection":{"name":"workbookactivitycollection","className":"WorkbookActivityCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookActivityCollection","collection":"workbookactivities","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_activities","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookActivity","exportName":"WorkbookActivityCollection","collectionExportName":"WorkbookActivityCollectionCollection","schema":{"tableName":"workbook_activities","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_activities\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"workbook_id\\" UUID,\\n \\"capture_kind\\" TEXT NOT NULL DEFAULT 'identified',\\n \\"photo_intake_id\\" UUID,\\n \\"enrollment_id\\" UUID NOT NULL,\\n \\"lesson_id\\" UUID NOT NULL,\\n \\"page_key\\" TEXT,\\n \\"page_label\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"workbook_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbooks","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"capture_kind":{"type":"TEXT","notNull":true,"unique":false,"default":"identified"},"photo_intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_photo_intakes","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"enrollment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"enrollments","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"page_key":{"type":"TEXT","notNull":false,"unique":false},"page_label":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_activities_tenant_id_workbook_id_idx","columns":["tenant_id","workbook_id","page_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_activities_slug_context_idx","columns":["slug","context"]},{"name":"workbook_activities_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_activities_learner_id_idx","columns":["learner_id"]},{"name":"workbook_activities_workbook_id_idx","columns":["workbook_id"]},{"name":"workbook_activities_photo_intake_id_idx","columns":["photo_intake_id"]},{"name":"workbook_activities_enrollment_id_idx","columns":["enrollment_id"]},{"name":"workbook_activities_lesson_id_idx","columns":["lesson_id"]}],"version":"320c8eb0"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookWorkFiling":{"name":"workbookworkfiling","className":"WorkbookWorkFiling","qualifiedName":"@happyvertical/smrt-education:WorkbookWorkFiling","collection":"workbookworkfilings","description":"Append-only association; the source work unit and its routing never move.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"sourceActivityId":{"type":"foreignKey","required":true,"related":"WorkbookActivity","_meta":{"required":true}},"workbookId":{"type":"foreignKey","required":true,"related":"Workbook","_meta":{"required":true}},"canonicalActivityId":{"type":"foreignKey","required":false,"related":"WorkbookActivity","_meta":{"nullable":true}},"previousRevisionId":{"type":"foreignKey","required":false,"related":"WorkbookWorkFiling","_meta":{"nullable":true}},"actorUserId":{"type":"text","required":false},"requestKey":{"type":"text","required":false},"reason":{"type":"text","required":false},"digest":{"type":"text","required":false}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_work_filings","conflictColumns":["tenant_id","source_activity_id","request_key"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookWorkFiling","collectionExportName":"WorkbookWorkFilingCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"sourceActivityId","rule":"required","fieldType":"foreignKey"},{"field":"workbookId","rule":"required","fieldType":"foreignKey"}],"schema":{"tableName":"workbook_work_filings","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_work_filings\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"source_activity_id\\" UUID NOT NULL,\\n \\"workbook_id\\" UUID NOT NULL,\\n \\"canonical_activity_id\\" UUID,\\n \\"previous_revision_id\\" UUID,\\n \\"actor_user_id\\" TEXT,\\n \\"request_key\\" TEXT,\\n \\"reason\\" TEXT,\\n \\"digest\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"source_activity_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_activities","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"workbook_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbooks","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"canonical_activity_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_activities","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"previous_revision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_work_filings","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"request_key":{"type":"TEXT","notNull":false,"unique":false},"reason":{"type":"TEXT","notNull":false,"unique":false},"digest":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_work_filings_tenant_id_source_activity_id_idx","columns":["tenant_id","source_activity_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_work_filings_slug_context_idx","columns":["slug","context"]},{"name":"workbook_work_filings_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_work_filings_learner_id_idx","columns":["learner_id"]},{"name":"workbook_work_filings_source_activity_id_idx","columns":["source_activity_id"]},{"name":"workbook_work_filings_workbook_id_idx","columns":["workbook_id"]},{"name":"workbook_work_filings_canonical_activity_id_idx","columns":["canonical_activity_id"]},{"name":"workbook_work_filings_previous_revision_id_idx","columns":["previous_revision_id"]}],"version":"03e989a0"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookWorkFilingCollection":{"name":"workbookworkfilingcollection","className":"WorkbookWorkFilingCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookWorkFilingCollection","collection":"workbookworkfilings","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_work_filings","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookWorkFiling","exportName":"WorkbookWorkFilingCollection","collectionExportName":"WorkbookWorkFilingCollectionCollection","schema":{"tableName":"workbook_work_filings","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_work_filings\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"source_activity_id\\" UUID NOT NULL,\\n \\"workbook_id\\" UUID NOT NULL,\\n \\"canonical_activity_id\\" UUID,\\n \\"previous_revision_id\\" UUID,\\n \\"actor_user_id\\" TEXT,\\n \\"request_key\\" TEXT,\\n \\"reason\\" TEXT,\\n \\"digest\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"source_activity_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_activities","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"workbook_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbooks","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"canonical_activity_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_activities","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"previous_revision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_work_filings","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"request_key":{"type":"TEXT","notNull":false,"unique":false},"reason":{"type":"TEXT","notNull":false,"unique":false},"digest":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_work_filings_tenant_id_source_activity_id_idx","columns":["tenant_id","source_activity_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_work_filings_slug_context_idx","columns":["slug","context"]},{"name":"workbook_work_filings_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_work_filings_learner_id_idx","columns":["learner_id"]},{"name":"workbook_work_filings_source_activity_id_idx","columns":["source_activity_id"]},{"name":"workbook_work_filings_workbook_id_idx","columns":["workbook_id"]},{"name":"workbook_work_filings_canonical_activity_id_idx","columns":["canonical_activity_id"]},{"name":"workbook_work_filings_previous_revision_id_idx","columns":["previous_revision_id"]}],"version":"03e989a0"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookAttempt":{"name":"workbookattempt","className":"WorkbookAttempt","qualifiedName":"@happyvertical/smrt-education:WorkbookAttempt","collection":"workbookattempts","description":"Education-owned private workbook record. Mutations go through WorkbookService.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"activityId":{"type":"foreignKey","required":true,"related":"WorkbookActivity","_meta":{"required":true}},"submissionId":{"type":"foreignKey","required":true,"related":"Submission","_meta":{"required":true}},"previousAttemptId":{"type":"foreignKey","required":false,"related":"WorkbookAttempt","_meta":{"nullable":true}},"capturedAt":{"type":"text","required":false},"episodeId":{"type":"text","required":false},"reviewRequired":{"type":"boolean","required":true,"default":true},"policyVersion":{"type":"integer","required":true,"default":1},"assistance":{"type":"text","required":false},"actorUserId":{"type":"text","required":false},"sourceHashes":{"type":"text","required":false,"_meta":{}}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_attempts","conflictColumns":["tenant_id","submission_id"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookAttempt","collectionExportName":"WorkbookAttemptCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"activityId","rule":"required","fieldType":"foreignKey"},{"field":"submissionId","rule":"required","fieldType":"foreignKey"},{"field":"reviewRequired","rule":"required","fieldType":"boolean"},{"field":"policyVersion","rule":"required","fieldType":"integer"}],"schema":{"tableName":"workbook_attempts","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_attempts\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"activity_id\\" UUID NOT NULL,\\n \\"submission_id\\" UUID NOT NULL,\\n \\"previous_attempt_id\\" UUID,\\n \\"captured_at\\" TEXT,\\n \\"episode_id\\" TEXT,\\n \\"review_required\\" BOOLEAN NOT NULL DEFAULT TRUE,\\n \\"policy_version\\" INTEGER NOT NULL DEFAULT 1,\\n \\"assistance\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"source_hashes\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"activity_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_activities","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"previous_attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"captured_at":{"type":"TEXT","notNull":false,"unique":false},"episode_id":{"type":"TEXT","notNull":false,"unique":false},"review_required":{"type":"BOOLEAN","notNull":true,"unique":false,"default":true},"policy_version":{"type":"INTEGER","notNull":true,"unique":false,"default":1},"assistance":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"source_hashes":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_attempts_tenant_id_submission_id_idx","columns":["tenant_id","submission_id"],"unique":true},{"name":"workbook_attempts_slug_context_idx","columns":["slug","context"]},{"name":"workbook_attempts_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_attempts_learner_id_idx","columns":["learner_id"]},{"name":"workbook_attempts_activity_id_idx","columns":["activity_id"]},{"name":"workbook_attempts_submission_id_idx","columns":["submission_id"]},{"name":"workbook_attempts_previous_attempt_id_idx","columns":["previous_attempt_id"]}],"version":"bd9cdd9f"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookAttemptCollection":{"name":"workbookattemptcollection","className":"WorkbookAttemptCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookAttemptCollection","collection":"workbookattempts","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_attempts","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookAttempt","exportName":"WorkbookAttemptCollection","collectionExportName":"WorkbookAttemptCollectionCollection","schema":{"tableName":"workbook_attempts","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_attempts\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"activity_id\\" UUID NOT NULL,\\n \\"submission_id\\" UUID NOT NULL,\\n \\"previous_attempt_id\\" UUID,\\n \\"captured_at\\" TEXT,\\n \\"episode_id\\" TEXT,\\n \\"review_required\\" BOOLEAN NOT NULL DEFAULT TRUE,\\n \\"policy_version\\" INTEGER NOT NULL DEFAULT 1,\\n \\"assistance\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"source_hashes\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"activity_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_activities","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"previous_attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"captured_at":{"type":"TEXT","notNull":false,"unique":false},"episode_id":{"type":"TEXT","notNull":false,"unique":false},"review_required":{"type":"BOOLEAN","notNull":true,"unique":false,"default":true},"policy_version":{"type":"INTEGER","notNull":true,"unique":false,"default":1},"assistance":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"source_hashes":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_attempts_tenant_id_submission_id_idx","columns":["tenant_id","submission_id"],"unique":true},{"name":"workbook_attempts_slug_context_idx","columns":["slug","context"]},{"name":"workbook_attempts_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_attempts_learner_id_idx","columns":["learner_id"]},{"name":"workbook_attempts_activity_id_idx","columns":["activity_id"]},{"name":"workbook_attempts_submission_id_idx","columns":["submission_id"]},{"name":"workbook_attempts_previous_attempt_id_idx","columns":["previous_attempt_id"]}],"version":"bd9cdd9f"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookAssessmentRevision":{"name":"workbookassessmentrevision","className":"WorkbookAssessmentRevision","qualifiedName":"@happyvertical/smrt-education:WorkbookAssessmentRevision","collection":"workbookassessmentrevisions","description":"Education-owned private workbook record. Mutations go through WorkbookService.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"attemptId":{"type":"foreignKey","required":true,"related":"WorkbookAttempt","_meta":{"required":true}},"requestKey":{"type":"text","required":false},"requestDigest":{"type":"text","required":false},"kind":{"type":"text","required":false},"actorUserId":{"type":"text","required":false},"sourceRevisionId":{"type":"foreignKey","required":false,"related":"WorkbookAssessmentRevision","_meta":{"nullable":true}},"decisionReason":{"type":"text","required":false},"supersedesId":{"type":"foreignKey","required":false,"related":"WorkbookAssessmentRevision","_meta":{"nullable":true}},"assessmentJson":{"type":"text","required":false,"_meta":{}},"recordedAt":{"type":"text","required":false}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_assessment_revisions","conflictColumns":["tenant_id","attempt_id","request_key"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookAssessmentRevision","collectionExportName":"WorkbookAssessmentRevisionCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"attemptId","rule":"required","fieldType":"foreignKey"}],"schema":{"tableName":"workbook_assessment_revisions","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_assessment_revisions\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"attempt_id\\" UUID NOT NULL,\\n \\"request_key\\" TEXT,\\n \\"request_digest\\" TEXT,\\n \\"kind\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"source_revision_id\\" UUID,\\n \\"decision_reason\\" TEXT,\\n \\"supersedes_id\\" UUID,\\n \\"assessment_json\\" TEXT,\\n \\"recorded_at\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":false,"unique":false},"request_digest":{"type":"TEXT","notNull":false,"unique":false},"kind":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"source_revision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"decision_reason":{"type":"TEXT","notNull":false,"unique":false},"supersedes_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"assessment_json":{"type":"TEXT","notNull":false,"unique":false},"recorded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_assessment_revisions_tenant_id_attempt_id_idx","columns":["tenant_id","attempt_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_assessment_revisions_slug_context_idx","columns":["slug","context"]},{"name":"workbook_assessment_revisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_assessment_revisions_learner_id_idx","columns":["learner_id"]},{"name":"workbook_assessment_revisions_attempt_id_idx","columns":["attempt_id"]},{"name":"workbook_assessment_revisions_source_revision_id_idx","columns":["source_revision_id"]},{"name":"workbook_assessment_revisions_supersedes_id_idx","columns":["supersedes_id"]}],"version":"94b2bd33"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookAssessmentRevisionCollection":{"name":"workbookassessmentrevisioncollection","className":"WorkbookAssessmentRevisionCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookAssessmentRevisionCollection","collection":"workbookassessmentrevisions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_assessment_revisions","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookAssessmentRevision","exportName":"WorkbookAssessmentRevisionCollection","collectionExportName":"WorkbookAssessmentRevisionCollectionCollection","schema":{"tableName":"workbook_assessment_revisions","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_assessment_revisions\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"attempt_id\\" UUID NOT NULL,\\n \\"request_key\\" TEXT,\\n \\"request_digest\\" TEXT,\\n \\"kind\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"source_revision_id\\" UUID,\\n \\"decision_reason\\" TEXT,\\n \\"supersedes_id\\" UUID,\\n \\"assessment_json\\" TEXT,\\n \\"recorded_at\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":false,"unique":false},"request_digest":{"type":"TEXT","notNull":false,"unique":false},"kind":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"source_revision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"decision_reason":{"type":"TEXT","notNull":false,"unique":false},"supersedes_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"assessment_json":{"type":"TEXT","notNull":false,"unique":false},"recorded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_assessment_revisions_tenant_id_attempt_id_idx","columns":["tenant_id","attempt_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_assessment_revisions_slug_context_idx","columns":["slug","context"]},{"name":"workbook_assessment_revisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_assessment_revisions_learner_id_idx","columns":["learner_id"]},{"name":"workbook_assessment_revisions_attempt_id_idx","columns":["attempt_id"]},{"name":"workbook_assessment_revisions_source_revision_id_idx","columns":["source_revision_id"]},{"name":"workbook_assessment_revisions_supersedes_id_idx","columns":["supersedes_id"]}],"version":"94b2bd33"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookFeedbackRelease":{"name":"workbookfeedbackrelease","className":"WorkbookFeedbackRelease","qualifiedName":"@happyvertical/smrt-education:WorkbookFeedbackRelease","collection":"workbookfeedbackreleases","description":"Education-owned private workbook record. Mutations go through WorkbookService.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"attemptId":{"type":"foreignKey","required":true,"related":"WorkbookAttempt","_meta":{"required":true}},"revisionId":{"type":"foreignKey","required":true,"related":"WorkbookAssessmentRevision","_meta":{"required":true}},"expectedHeadId":{"type":"foreignKey","required":false,"related":"WorkbookAssessmentRevision","_meta":{"nullable":true}},"requestKey":{"type":"text","required":false},"actorUserId":{"type":"text","required":false},"recordedAt":{"type":"text","required":false}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_feedback_releases","conflictColumns":["tenant_id","attempt_id","request_key"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookFeedbackRelease","collectionExportName":"WorkbookFeedbackReleaseCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"attemptId","rule":"required","fieldType":"foreignKey"},{"field":"revisionId","rule":"required","fieldType":"foreignKey"}],"schema":{"tableName":"workbook_feedback_releases","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_feedback_releases\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"attempt_id\\" UUID NOT NULL,\\n \\"revision_id\\" UUID NOT NULL,\\n \\"expected_head_id\\" UUID,\\n \\"request_key\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"recorded_at\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"revision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"expected_head_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"recorded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_feedback_releases_tenant_id_attempt_id_idx","columns":["tenant_id","attempt_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_feedback_releases_slug_context_idx","columns":["slug","context"]},{"name":"workbook_feedback_releases_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_feedback_releases_learner_id_idx","columns":["learner_id"]},{"name":"workbook_feedback_releases_attempt_id_idx","columns":["attempt_id"]},{"name":"workbook_feedback_releases_revision_id_idx","columns":["revision_id"]},{"name":"workbook_feedback_releases_expected_head_id_idx","columns":["expected_head_id"]}],"version":"ebe23baf"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookFeedbackReleaseCollection":{"name":"workbookfeedbackreleasecollection","className":"WorkbookFeedbackReleaseCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookFeedbackReleaseCollection","collection":"workbookfeedbackreleases","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_feedback_releases","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookFeedbackRelease","exportName":"WorkbookFeedbackReleaseCollection","collectionExportName":"WorkbookFeedbackReleaseCollectionCollection","schema":{"tableName":"workbook_feedback_releases","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_feedback_releases\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"attempt_id\\" UUID NOT NULL,\\n \\"revision_id\\" UUID NOT NULL,\\n \\"expected_head_id\\" UUID,\\n \\"request_key\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"recorded_at\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"revision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"expected_head_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"recorded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_feedback_releases_tenant_id_attempt_id_idx","columns":["tenant_id","attempt_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_feedback_releases_slug_context_idx","columns":["slug","context"]},{"name":"workbook_feedback_releases_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_feedback_releases_learner_id_idx","columns":["learner_id"]},{"name":"workbook_feedback_releases_attempt_id_idx","columns":["attempt_id"]},{"name":"workbook_feedback_releases_revision_id_idx","columns":["revision_id"]},{"name":"workbook_feedback_releases_expected_head_id_idx","columns":["expected_head_id"]}],"version":"ebe23baf"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookFeedbackDelivery":{"name":"workbookfeedbackdelivery","className":"WorkbookFeedbackDelivery","qualifiedName":"@happyvertical/smrt-education:WorkbookFeedbackDelivery","collection":"workbookfeedbackdeliveries","description":"Authenticated delivery acknowledgment; this does not assert comprehension.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"attemptId":{"type":"foreignKey","required":true,"related":"WorkbookAttempt","_meta":{"required":true}},"revisionId":{"type":"foreignKey","required":true,"related":"WorkbookAssessmentRevision","_meta":{"required":true}},"actorUserId":{"type":"text","required":false},"requestKey":{"type":"text","required":false},"recordedAt":{"type":"text","required":false}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true},"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_feedback_deliveries","conflictColumns":["tenant_id","attempt_id","actor_user_id","revision_id"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookFeedbackDelivery","collectionExportName":"WorkbookFeedbackDeliveryCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"attemptId","rule":"required","fieldType":"foreignKey"},{"field":"revisionId","rule":"required","fieldType":"foreignKey"}],"schema":{"tableName":"workbook_feedback_deliveries","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_feedback_deliveries\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"attempt_id\\" UUID NOT NULL,\\n \\"revision_id\\" UUID NOT NULL,\\n \\"actor_user_id\\" TEXT,\\n \\"request_key\\" TEXT,\\n \\"recorded_at\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"revision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"request_key":{"type":"TEXT","notNull":false,"unique":false},"recorded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_feedback_deliveries_tenant_id_attempt_id_idx","columns":["tenant_id","attempt_id","actor_user_id","revision_id"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_feedback_deliveries_slug_context_idx","columns":["slug","context"]},{"name":"workbook_feedback_deliveries_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_feedback_deliveries_learner_id_idx","columns":["learner_id"]},{"name":"workbook_feedback_deliveries_attempt_id_idx","columns":["attempt_id"]},{"name":"workbook_feedback_deliveries_revision_id_idx","columns":["revision_id"]}],"version":"37bfd434"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookFeedbackDeliveryCollection":{"name":"workbookfeedbackdeliverycollection","className":"WorkbookFeedbackDeliveryCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookFeedbackDeliveryCollection","collection":"workbookfeedbackdeliveries","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_feedback_deliveries","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookFeedbackDelivery","exportName":"WorkbookFeedbackDeliveryCollection","collectionExportName":"WorkbookFeedbackDeliveryCollectionCollection","schema":{"tableName":"workbook_feedback_deliveries","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_feedback_deliveries\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"attempt_id\\" UUID NOT NULL,\\n \\"revision_id\\" UUID NOT NULL,\\n \\"actor_user_id\\" TEXT,\\n \\"request_key\\" TEXT,\\n \\"recorded_at\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"revision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"request_key":{"type":"TEXT","notNull":false,"unique":false},"recorded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_feedback_deliveries_tenant_id_attempt_id_idx","columns":["tenant_id","attempt_id","actor_user_id","revision_id"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_feedback_deliveries_slug_context_idx","columns":["slug","context"]},{"name":"workbook_feedback_deliveries_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_feedback_deliveries_learner_id_idx","columns":["learner_id"]},{"name":"workbook_feedback_deliveries_attempt_id_idx","columns":["attempt_id"]},{"name":"workbook_feedback_deliveries_revision_id_idx","columns":["revision_id"]}],"version":"37bfd434"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookPhotoIntake":{"name":"workbookphotointake","className":"WorkbookPhotoIntake","qualifiedName":"@happyvertical/smrt-education:WorkbookPhotoIntake","collection":"workbookphotointakes","description":"Durable receipt before any course, enrollment or activity exists.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-photo-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"familyIntakeId":{"type":"foreignKey","required":false,"related":"FamilyIntake"},"itemId":{"type":"text","required":false},"actorUserId":{"type":"text","required":false},"contentDigest":{"type":"text","required":false}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_photo_intakes","conflictColumns":["tenant_id","item_id"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookPhotoIntake","collectionExportName":"WorkbookPhotoIntakeCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"}],"schema":{"tableName":"workbook_photo_intakes","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_photo_intakes\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"family_intake_id\\" UUID,\\n \\"item_id\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"content_digest\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"family_intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"family_intakes","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"item_id":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"content_digest":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_photo_intakes_tenant_id_item_id_idx","columns":["tenant_id","item_id"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_photo_intakes_slug_context_idx","columns":["slug","context"]},{"name":"workbook_photo_intakes_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_photo_intakes_learner_id_idx","columns":["learner_id"]},{"name":"workbook_photo_intakes_family_intake_id_idx","columns":["family_intake_id"]}],"version":"288020f4"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookPhotoIntakeCollection":{"name":"workbookphotointakecollection","className":"WorkbookPhotoIntakeCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookPhotoIntakeCollection","collection":"workbookphotointakes","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-photo-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_photo_intakes","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookPhotoIntake","exportName":"WorkbookPhotoIntakeCollection","collectionExportName":"WorkbookPhotoIntakeCollectionCollection","schema":{"tableName":"workbook_photo_intakes","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_photo_intakes\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"family_intake_id\\" UUID,\\n \\"item_id\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"content_digest\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"family_intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"family_intakes","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"item_id":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"content_digest":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_photo_intakes_tenant_id_item_id_idx","columns":["tenant_id","item_id"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_photo_intakes_slug_context_idx","columns":["slug","context"]},{"name":"workbook_photo_intakes_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_photo_intakes_learner_id_idx","columns":["learner_id"]},{"name":"workbook_photo_intakes_family_intake_id_idx","columns":["family_intake_id"]}],"version":"288020f4"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookPhotoAsset":{"name":"workbookphotoasset","className":"WorkbookPhotoAsset","qualifiedName":"@happyvertical/smrt-education:WorkbookPhotoAsset","collection":"workbookphotoassets","description":"Sole owner join for original photo intake files.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-photo-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"intakeId":{"type":"foreignKey","required":true,"related":"WorkbookPhotoIntake","_meta":{"required":true}},"assetId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-assets:Asset"},"name":{"type":"text","required":false},"mimeType":{"type":"text","required":false},"sha256":{"type":"text","required":false},"position":{"type":"integer","required":true,"default":0}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_photo_assets","conflictColumns":["tenant_id","intake_id","asset_id"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookPhotoAsset","collectionExportName":"WorkbookPhotoAssetCollection","displayLabelField":"name","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"intakeId","rule":"required","fieldType":"foreignKey"},{"field":"position","rule":"required","fieldType":"integer"}],"schema":{"tableName":"workbook_photo_assets","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_photo_assets\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"intake_id\\" UUID NOT NULL,\\n \\"asset_id\\" UUID,\\n \\"name\\" TEXT,\\n \\"mime_type\\" TEXT,\\n \\"sha256\\" TEXT,\\n \\"position\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_photo_intakes","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"name":{"type":"TEXT","notNull":false,"unique":false},"mime_type":{"type":"TEXT","notNull":false,"unique":false},"sha256":{"type":"TEXT","notNull":false,"unique":false},"position":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"workbook_photo_assets_tenant_id_intake_id_idx","columns":["tenant_id","intake_id","asset_id"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_photo_assets_slug_context_idx","columns":["slug","context"]},{"name":"workbook_photo_assets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_photo_assets_learner_id_idx","columns":["learner_id"]},{"name":"workbook_photo_assets_intake_id_idx","columns":["intake_id"]},{"name":"workbook_photo_assets_asset_id_idx","columns":["asset_id"]}],"version":"9d49acb2"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookPhotoAssetCollection":{"name":"workbookphotoassetcollection","className":"WorkbookPhotoAssetCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookPhotoAssetCollection","collection":"workbookphotoassets","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-photo-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_photo_assets","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookPhotoAsset","exportName":"WorkbookPhotoAssetCollection","collectionExportName":"WorkbookPhotoAssetCollectionCollection","schema":{"tableName":"workbook_photo_assets","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_photo_assets\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"intake_id\\" UUID NOT NULL,\\n \\"asset_id\\" UUID,\\n \\"name\\" TEXT,\\n \\"mime_type\\" TEXT,\\n \\"sha256\\" TEXT,\\n \\"position\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_photo_intakes","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"name":{"type":"TEXT","notNull":false,"unique":false},"mime_type":{"type":"TEXT","notNull":false,"unique":false},"sha256":{"type":"TEXT","notNull":false,"unique":false},"position":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"workbook_photo_assets_tenant_id_intake_id_idx","columns":["tenant_id","intake_id","asset_id"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_photo_assets_slug_context_idx","columns":["slug","context"]},{"name":"workbook_photo_assets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_photo_assets_learner_id_idx","columns":["learner_id"]},{"name":"workbook_photo_assets_intake_id_idx","columns":["intake_id"]},{"name":"workbook_photo_assets_asset_id_idx","columns":["asset_id"]}],"version":"9d49acb2"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookPhotoDecision":{"name":"workbookphotodecision","className":"WorkbookPhotoDecision","qualifiedName":"@happyvertical/smrt-education:WorkbookPhotoDecision","collection":"workbookphotodecisions","description":"Immutable provider/guardian/capture decision, retaining provenance and retry key.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-photo-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"intakeId":{"type":"foreignKey","required":true,"related":"WorkbookPhotoIntake","_meta":{"required":true}},"requestKey":{"type":"text","required":false},"sequence":{"type":"integer","required":true,"default":0},"actorUserId":{"type":"text","required":false},"bodyJson":{"type":"text","required":false,"_meta":{}}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_photo_decisions","conflictColumns":["tenant_id","intake_id","request_key"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookPhotoDecision","collectionExportName":"WorkbookPhotoDecisionCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"intakeId","rule":"required","fieldType":"foreignKey"},{"field":"sequence","rule":"required","fieldType":"integer"}],"schema":{"tableName":"workbook_photo_decisions","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_photo_decisions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"intake_id\\" UUID NOT NULL,\\n \\"request_key\\" TEXT,\\n \\"sequence\\" INTEGER NOT NULL DEFAULT 0,\\n \\"actor_user_id\\" TEXT,\\n \\"body_json\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_photo_intakes","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":false,"unique":false},"sequence":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"body_json":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_photo_decisions_tenant_id_intake_id_idx","columns":["tenant_id","intake_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_photo_decisions_slug_context_idx","columns":["slug","context"]},{"name":"workbook_photo_decisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_photo_decisions_learner_id_idx","columns":["learner_id"]},{"name":"workbook_photo_decisions_intake_id_idx","columns":["intake_id"]}],"version":"4c8b4e5f"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookPhotoDecisionCollection":{"name":"workbookphotodecisioncollection","className":"WorkbookPhotoDecisionCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookPhotoDecisionCollection","collection":"workbookphotodecisions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-photo-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_photo_decisions","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookPhotoDecision","exportName":"WorkbookPhotoDecisionCollection","collectionExportName":"WorkbookPhotoDecisionCollectionCollection","schema":{"tableName":"workbook_photo_decisions","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_photo_decisions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"intake_id\\" UUID NOT NULL,\\n \\"request_key\\" TEXT,\\n \\"sequence\\" INTEGER NOT NULL DEFAULT 0,\\n \\"actor_user_id\\" TEXT,\\n \\"body_json\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_photo_intakes","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":false,"unique":false},"sequence":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"body_json":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_photo_decisions_tenant_id_intake_id_idx","columns":["tenant_id","intake_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_photo_decisions_slug_context_idx","columns":["slug","context"]},{"name":"workbook_photo_decisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_photo_decisions_learner_id_idx","columns":["learner_id"]},{"name":"workbook_photo_decisions_intake_id_idx","columns":["intake_id"]}],"version":"4c8b4e5f"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookContextRevision":{"name":"workbookcontextrevision","className":"WorkbookContextRevision","qualifiedName":"@happyvertical/smrt-education:WorkbookContextRevision","collection":"workbookcontextrevisions","description":"Versioned contextual metadata; never edits Workbook identity or learning evidence.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-photo-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"workbookId":{"type":"foreignKey","required":true,"related":"Workbook","_meta":{"required":true}},"decisionId":{"type":"foreignKey","required":true,"related":"WorkbookPhotoDecision","_meta":{"required":true}},"metadataJson":{"type":"text","required":false,"_meta":{}}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_context_revisions","conflictColumns":["tenant_id","decision_id"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookContextRevision","collectionExportName":"WorkbookContextRevisionCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"workbookId","rule":"required","fieldType":"foreignKey"},{"field":"decisionId","rule":"required","fieldType":"foreignKey"}],"schema":{"tableName":"workbook_context_revisions","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_context_revisions\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"workbook_id\\" UUID NOT NULL,\\n \\"decision_id\\" UUID NOT NULL,\\n \\"metadata_json\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"workbook_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbooks","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"decision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_photo_decisions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"metadata_json":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_context_revisions_tenant_id_decision_id_idx","columns":["tenant_id","decision_id"],"unique":true},{"name":"workbook_context_revisions_slug_context_idx","columns":["slug","context"]},{"name":"workbook_context_revisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_context_revisions_learner_id_idx","columns":["learner_id"]},{"name":"workbook_context_revisions_workbook_id_idx","columns":["workbook_id"]},{"name":"workbook_context_revisions_decision_id_idx","columns":["decision_id"]}],"version":"b1e8b4dc"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookContextRevisionCollection":{"name":"workbookcontextrevisioncollection","className":"WorkbookContextRevisionCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookContextRevisionCollection","collection":"workbookcontextrevisions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-photo-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_context_revisions","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookContextRevision","exportName":"WorkbookContextRevisionCollection","collectionExportName":"WorkbookContextRevisionCollectionCollection","schema":{"tableName":"workbook_context_revisions","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_context_revisions\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"workbook_id\\" UUID NOT NULL,\\n \\"decision_id\\" UUID NOT NULL,\\n \\"metadata_json\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"workbook_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbooks","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"decision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_photo_decisions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"metadata_json":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_context_revisions_tenant_id_decision_id_idx","columns":["tenant_id","decision_id"],"unique":true},{"name":"workbook_context_revisions_slug_context_idx","columns":["slug","context"]},{"name":"workbook_context_revisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_context_revisions_learner_id_idx","columns":["learner_id"]},{"name":"workbook_context_revisions_workbook_id_idx","columns":["workbook_id"]},{"name":"workbook_context_revisions_decision_id_idx","columns":["decision_id"]}],"version":"b1e8b4dc"},"importPath":"@happyvertical/smrt-education"}},"moduleType":"smrt","recipes":[{"id":"education.catalog","className":"EducationCatalogRecipe","label":"Course catalog","summary":"Organize courses, sections, lessons, and their authorized learning materials.","synonyms":["courses","lessons","curriculum catalog"],"models":["@happyvertical/smrt-education:Course","@happyvertical/smrt-education:CourseSection","@happyvertical/smrt-education:Lesson","@happyvertical/smrt-education:LessonAsset"],"nav":[{"label":"Courses","model":"@happyvertical/smrt-education:Course","icon":"folder","description":"Courses available to this family.","noun":"course"}],"requires":[],"section":{"id":"education","label":"Education","icon":"folder","description":"Courses and lessons for learning."},"help":{"markdown":"# Course catalog\\n\\nManage courses, their sections, and lessons. Private family copies and answer\\nkeys remain visible only through the application\u2019s authorized catalog service.\\n","fieldRefs":[]},"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":"education.learner","className":"EducationLearnerRecipe","label":"Learners","summary":"Plan learner curricula and retain enrollment-scoped progress.","synonyms":["learners","enrollments","learning progress"],"models":["@happyvertical/smrt-education:Learner","@happyvertical/smrt-education:Curriculum","@happyvertical/smrt-education:Enrollment","@happyvertical/smrt-education:LessonProgress"],"nav":[{"label":"Learners","model":"@happyvertical/smrt-education:Learner","icon":"users","description":"Authorized learners in this family.","noun":"learner"}],"requires":[],"section":{"id":"education","label":"Education","icon":"folder","description":"Courses and lessons for learning."},"help":{"markdown":"# Learners\\n\\nUse \`LearnerService\` in an authenticated exact-tenant context to read a learner,\\nplan a curriculum as an authorized guardian, enroll in a visible course, and\\nstart a lesson. Recipe metadata does not expose model CRUD. Hosts authenticate\\nusers, provision family membership, and validate guardian ProfileRelationship\\ntypes and effective terms. See \`agents/learner-service.md\` for the boundary.\\n","fieldRefs":[]},"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-assets","@happyvertical/smrt-core","@happyvertical/smrt-ingestion","@happyvertical/smrt-profiles","@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
+ ObjectRegistry.registerPackageManifest(JSON.parse(`{"version":"1.0.0","timestamp":0,"packageName":"@happyvertical/smrt-education","packageVersion":"0.57.40","objects":{"@happyvertical/smrt-education:CatalogProviderCollection":{"name":"catalogprovidercollection","className":"CatalogProviderCollection","qualifiedName":"@happyvertical/smrt-education:CatalogProviderCollection","collection":"catalogproviders","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"CatalogProvider","exportName":"CatalogProviderCollection","collectionExportName":"CatalogProviderCollectionCollection","schema":{"tableName":"catalog_providers","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_providers\\" (\\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 \\"provider_id\\" TEXT NOT NULL,\\n \\"name\\" TEXT NOT NULL,\\n \\"active\\" BOOLEAN NOT NULL DEFAULT TRUE\\n);","columns":{"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"},"provider_id":{"type":"TEXT","notNull":true,"unique":false},"name":{"type":"TEXT","notNull":true,"unique":false},"active":{"type":"BOOLEAN","notNull":true,"unique":false,"default":true}},"indexes":[{"name":"catalog_providers_slug_context_idx","columns":["slug","context"],"unique":true},{"name":"catalog_providers_created_at_idx","columns":["created_at"]}],"version":"f35557a4"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogResourceCollection":{"name":"catalogresourcecollection","className":"CatalogResourceCollection","qualifiedName":"@happyvertical/smrt-education:CatalogResourceCollection","collection":"catalogresources","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"CatalogResource","exportName":"CatalogResourceCollection","collectionExportName":"CatalogResourceCollectionCollection","schema":{"tableName":"catalog_resources","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_resources\\" (\\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 \\"provider_id\\" TEXT NOT NULL,\\n \\"stable_id\\" TEXT NOT NULL,\\n \\"revision\\" TEXT NOT NULL,\\n \\"canonical_url\\" TEXT,\\n \\"title\\" TEXT NOT NULL,\\n \\"supplied_description\\" TEXT,\\n \\"author\\" TEXT,\\n \\"subjects\\" TEXT,\\n \\"grades\\" TEXT,\\n \\"language\\" TEXT,\\n \\"resource_type\\" TEXT,\\n \\"parent_stable_id\\" TEXT,\\n \\"available_formats\\" TEXT,\\n \\"representation\\" TEXT,\\n \\"preview\\" TEXT,\\n \\"license_evidence\\" TEXT,\\n \\"license_state\\" TEXT DEFAULT 'unknown',\\n \\"visibility\\" TEXT DEFAULT 'catalog',\\n \\"last_seen_run_id\\" TEXT,\\n \\"withdrawn_at\\" TEXT\\n);","columns":{"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"},"provider_id":{"type":"TEXT","notNull":true,"unique":false},"stable_id":{"type":"TEXT","notNull":true,"unique":false},"revision":{"type":"TEXT","notNull":true,"unique":false},"canonical_url":{"type":"TEXT","notNull":false,"unique":false},"title":{"type":"TEXT","notNull":true,"unique":false},"supplied_description":{"type":"TEXT","notNull":false,"unique":false},"author":{"type":"TEXT","notNull":false,"unique":false},"subjects":{"type":"TEXT","notNull":false,"unique":false},"grades":{"type":"TEXT","notNull":false,"unique":false},"language":{"type":"TEXT","notNull":false,"unique":false},"resource_type":{"type":"TEXT","notNull":false,"unique":false},"parent_stable_id":{"type":"TEXT","notNull":false,"unique":false},"available_formats":{"type":"TEXT","notNull":false,"unique":false},"representation":{"type":"TEXT","notNull":false,"unique":false},"preview":{"type":"TEXT","notNull":false,"unique":false},"license_evidence":{"type":"TEXT","notNull":false,"unique":false},"license_state":{"type":"TEXT","notNull":false,"unique":false,"default":"unknown"},"visibility":{"type":"TEXT","notNull":false,"unique":false,"default":"catalog"},"last_seen_run_id":{"type":"TEXT","notNull":false,"unique":false},"withdrawn_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"catalog_resources_slug_context_idx","columns":["slug","context"],"unique":true},{"name":"catalog_resources_created_at_idx","columns":["created_at"]}],"version":"6ea66f0d"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogSyncStateCollection":{"name":"catalogsyncstatecollection","className":"CatalogSyncStateCollection","qualifiedName":"@happyvertical/smrt-education:CatalogSyncStateCollection","collection":"catalogsyncstates","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"CatalogSyncState","exportName":"CatalogSyncStateCollection","collectionExportName":"CatalogSyncStateCollectionCollection","schema":{"tableName":"catalog_sync_states","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_sync_states\\" (\\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 \\"provider_id\\" TEXT NOT NULL,\\n \\"cursor\\" TEXT,\\n \\"run_id\\" TEXT,\\n \\"complete\\" BOOLEAN NOT NULL DEFAULT FALSE,\\n \\"paused\\" BOOLEAN NOT NULL DEFAULT FALSE,\\n \\"pause_reason\\" TEXT,\\n \\"imported_count\\" INTEGER NOT NULL DEFAULT 0,\\n \\"failures\\" TEXT,\\n \\"last_successful_at\\" TEXT\\n);","columns":{"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"},"provider_id":{"type":"TEXT","notNull":true,"unique":false},"cursor":{"type":"TEXT","notNull":false,"unique":false},"run_id":{"type":"TEXT","notNull":false,"unique":false},"complete":{"type":"BOOLEAN","notNull":true,"unique":false,"default":false},"paused":{"type":"BOOLEAN","notNull":true,"unique":false,"default":false},"pause_reason":{"type":"TEXT","notNull":false,"unique":false},"imported_count":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"failures":{"type":"TEXT","notNull":false,"unique":false},"last_successful_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"catalog_sync_states_slug_context_idx","columns":["slug","context"],"unique":true},{"name":"catalog_sync_states_created_at_idx","columns":["created_at"]}],"version":"52dc3ee1"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogSelectionCollection":{"name":"catalogselectioncollection","className":"CatalogSelectionCollection","qualifiedName":"@happyvertical/smrt-education:CatalogSelectionCollection","collection":"catalogselections","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"CatalogSelection","exportName":"CatalogSelectionCollection","collectionExportName":"CatalogSelectionCollectionCollection","schema":{"tableName":"catalog_selections","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_selections\\" (\\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 \\"resource_id\\" UUID NOT NULL,\\n \\"selected_by_user_id\\" TEXT NOT NULL,\\n \\"selected_revision\\" TEXT NOT NULL\\n);","columns":{"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},"resource_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"catalog_resources","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"selected_by_user_id":{"type":"TEXT","notNull":true,"unique":false},"selected_revision":{"type":"TEXT","notNull":true,"unique":false}},"indexes":[{"name":"catalog_selections_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"catalog_selections_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"catalog_selections_resource_id_idx","columns":["resource_id"]}],"version":"c6b02eb9"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogAcquisitionCollection":{"name":"catalogacquisitioncollection","className":"CatalogAcquisitionCollection","qualifiedName":"@happyvertical/smrt-education:CatalogAcquisitionCollection","collection":"catalogacquisitions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"CatalogAcquisition","exportName":"CatalogAcquisitionCollection","collectionExportName":"CatalogAcquisitionCollectionCollection","schema":{"tableName":"catalog_acquisitions","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_acquisitions\\" (\\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 \\"resource_id\\" UUID NOT NULL,\\n \\"selection_id\\" UUID NOT NULL,\\n \\"revision\\" TEXT NOT NULL,\\n \\"format\\" TEXT NOT NULL,\\n \\"sha256\\" TEXT NOT NULL,\\n \\"attribution\\" TEXT,\\n \\"notices\\" TEXT\\n);","columns":{"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},"resource_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"catalog_resources","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"selection_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"catalog_selections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"revision":{"type":"TEXT","notNull":true,"unique":false},"format":{"type":"TEXT","notNull":true,"unique":false},"sha256":{"type":"TEXT","notNull":true,"unique":false},"attribution":{"type":"TEXT","notNull":false,"unique":false},"notices":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"catalog_acquisitions_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"catalog_acquisitions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"catalog_acquisitions_resource_id_idx","columns":["resource_id"]},{"name":"catalog_acquisitions_selection_id_idx","columns":["selection_id"]}],"version":"ee9c5add"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogProvider":{"name":"catalogprovider","className":"CatalogProvider","qualifiedName":"@happyvertical/smrt-education:CatalogProvider","collection":"catalogproviders","description":"Globally visible provider registration. Hosts configure adapters and credentials out of band.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-models.ts","packageName":"@happyvertical/smrt-education","fields":{"providerId":{"type":"text","required":true,"_meta":{"required":true}},"name":{"type":"text","required":true,"_meta":{"required":true}},"active":{"type":"boolean","required":true,"default":true}},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtObject","exportName":"CatalogProvider","collectionExportName":"CatalogProviderCollection","displayLabelField":"name","validationRules":[{"field":"providerId","rule":"required","fieldType":"text"},{"field":"name","rule":"required","fieldType":"text"},{"field":"active","rule":"required","fieldType":"boolean"}],"schema":{"tableName":"catalog_providers","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_providers\\" (\\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 \\"provider_id\\" TEXT NOT NULL,\\n \\"name\\" TEXT NOT NULL,\\n \\"active\\" BOOLEAN NOT NULL DEFAULT TRUE\\n);","columns":{"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"},"provider_id":{"type":"TEXT","notNull":true,"unique":false},"name":{"type":"TEXT","notNull":true,"unique":false},"active":{"type":"BOOLEAN","notNull":true,"unique":false,"default":true}},"indexes":[{"name":"catalog_providers_slug_context_idx","columns":["slug","context"],"unique":true},{"name":"catalog_providers_created_at_idx","columns":["created_at"]}],"version":"f35557a4"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogResource":{"name":"catalogresource","className":"CatalogResource","qualifiedName":"@happyvertical/smrt-education:CatalogResource","collection":"catalogresources","description":"A provider-native record. Rows are intentionally not merged across providers.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-models.ts","packageName":"@happyvertical/smrt-education","fields":{"providerId":{"type":"text","required":true,"_meta":{"required":true}},"stableId":{"type":"text","required":true,"_meta":{"required":true}},"revision":{"type":"text","required":true,"_meta":{"required":true}},"canonicalUrl":{"type":"text","required":false},"title":{"type":"text","required":true,"_meta":{"required":true}},"suppliedDescription":{"type":"text","required":false},"author":{"type":"text","required":false},"subjects":{"type":"text","required":false},"grades":{"type":"text","required":false},"language":{"type":"text","required":false},"resourceType":{"type":"text","required":false},"parentStableId":{"type":"text","required":false},"availableFormats":{"type":"text","required":false},"representation":{"type":"text","required":false},"preview":{"type":"text","required":false},"licenseEvidence":{"type":"text","required":false},"licenseState":{"type":"text","required":false,"default":"unknown","enum":["verified","unknown","conflicting","restricted"]},"visibility":{"type":"text","required":false,"default":"catalog","enum":["catalog","teacher"]},"lastSeenRunId":{"type":"text","required":false},"withdrawnAt":{"type":"text","required":false}},"methods":{"getPreview":{"name":"getPreview","async":false,"parameters":[],"returnType":"CatalogPreview | undefined","isStatic":false,"isPublic":true},"setPreview":{"name":"setPreview","async":false,"parameters":[{"name":"value","type":"CatalogPreview | undefined","optional":false,"unionBranches":[{"type":"CatalogPreview"},{"type":"undefined"}]}],"returnType":"void","isStatic":false,"isPublic":true},"getRepresentation":{"name":"getRepresentation","async":false,"parameters":[],"returnType":"CatalogResourceRepresentation | undefined","isStatic":false,"isPublic":true},"setRepresentation":{"name":"setRepresentation","async":false,"parameters":[{"name":"value","type":"CatalogResourceRepresentation | undefined","optional":false,"unionBranches":[{"type":"CatalogResourceRepresentation"},{"type":"undefined"}]}],"returnType":"void","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtObject","exportName":"CatalogResource","collectionExportName":"CatalogResourceCollection","displayLabelField":"title","validationRules":[{"field":"providerId","rule":"required","fieldType":"text"},{"field":"stableId","rule":"required","fieldType":"text"},{"field":"revision","rule":"required","fieldType":"text"},{"field":"title","rule":"required","fieldType":"text"}],"schema":{"tableName":"catalog_resources","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_resources\\" (\\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 \\"provider_id\\" TEXT NOT NULL,\\n \\"stable_id\\" TEXT NOT NULL,\\n \\"revision\\" TEXT NOT NULL,\\n \\"canonical_url\\" TEXT,\\n \\"title\\" TEXT NOT NULL,\\n \\"supplied_description\\" TEXT,\\n \\"author\\" TEXT,\\n \\"subjects\\" TEXT,\\n \\"grades\\" TEXT,\\n \\"language\\" TEXT,\\n \\"resource_type\\" TEXT,\\n \\"parent_stable_id\\" TEXT,\\n \\"available_formats\\" TEXT,\\n \\"representation\\" TEXT,\\n \\"preview\\" TEXT,\\n \\"license_evidence\\" TEXT,\\n \\"license_state\\" TEXT DEFAULT 'unknown',\\n \\"visibility\\" TEXT DEFAULT 'catalog',\\n \\"last_seen_run_id\\" TEXT,\\n \\"withdrawn_at\\" TEXT\\n);","columns":{"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"},"provider_id":{"type":"TEXT","notNull":true,"unique":false},"stable_id":{"type":"TEXT","notNull":true,"unique":false},"revision":{"type":"TEXT","notNull":true,"unique":false},"canonical_url":{"type":"TEXT","notNull":false,"unique":false},"title":{"type":"TEXT","notNull":true,"unique":false},"supplied_description":{"type":"TEXT","notNull":false,"unique":false},"author":{"type":"TEXT","notNull":false,"unique":false},"subjects":{"type":"TEXT","notNull":false,"unique":false},"grades":{"type":"TEXT","notNull":false,"unique":false},"language":{"type":"TEXT","notNull":false,"unique":false},"resource_type":{"type":"TEXT","notNull":false,"unique":false},"parent_stable_id":{"type":"TEXT","notNull":false,"unique":false},"available_formats":{"type":"TEXT","notNull":false,"unique":false},"representation":{"type":"TEXT","notNull":false,"unique":false},"preview":{"type":"TEXT","notNull":false,"unique":false},"license_evidence":{"type":"TEXT","notNull":false,"unique":false},"license_state":{"type":"TEXT","notNull":false,"unique":false,"default":"unknown"},"visibility":{"type":"TEXT","notNull":false,"unique":false,"default":"catalog"},"last_seen_run_id":{"type":"TEXT","notNull":false,"unique":false},"withdrawn_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"catalog_resources_slug_context_idx","columns":["slug","context"],"unique":true},{"name":"catalog_resources_created_at_idx","columns":["created_at"]}],"version":"6ea66f0d"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogSyncState":{"name":"catalogsyncstate","className":"CatalogSyncState","qualifiedName":"@happyvertical/smrt-education:CatalogSyncState","collection":"catalogsyncstates","description":"Durable per-provider enumeration state. A failed or partial feed is never complete.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-models.ts","packageName":"@happyvertical/smrt-education","fields":{"providerId":{"type":"text","required":true,"_meta":{"required":true}},"cursor":{"type":"text","required":false},"runId":{"type":"text","required":false},"complete":{"type":"boolean","required":true,"default":false},"paused":{"type":"boolean","required":true,"default":false},"pauseReason":{"type":"text","required":false},"importedCount":{"type":"integer","required":true,"default":0},"failures":{"type":"text","required":false},"lastSuccessfulAt":{"type":"text","required":false}},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtObject","exportName":"CatalogSyncState","collectionExportName":"CatalogSyncStateCollection","validationRules":[{"field":"providerId","rule":"required","fieldType":"text"},{"field":"complete","rule":"required","fieldType":"boolean"},{"field":"paused","rule":"required","fieldType":"boolean"},{"field":"importedCount","rule":"required","fieldType":"integer"}],"schema":{"tableName":"catalog_sync_states","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_sync_states\\" (\\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 \\"provider_id\\" TEXT NOT NULL,\\n \\"cursor\\" TEXT,\\n \\"run_id\\" TEXT,\\n \\"complete\\" BOOLEAN NOT NULL DEFAULT FALSE,\\n \\"paused\\" BOOLEAN NOT NULL DEFAULT FALSE,\\n \\"pause_reason\\" TEXT,\\n \\"imported_count\\" INTEGER NOT NULL DEFAULT 0,\\n \\"failures\\" TEXT,\\n \\"last_successful_at\\" TEXT\\n);","columns":{"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"},"provider_id":{"type":"TEXT","notNull":true,"unique":false},"cursor":{"type":"TEXT","notNull":false,"unique":false},"run_id":{"type":"TEXT","notNull":false,"unique":false},"complete":{"type":"BOOLEAN","notNull":true,"unique":false,"default":false},"paused":{"type":"BOOLEAN","notNull":true,"unique":false,"default":false},"pause_reason":{"type":"TEXT","notNull":false,"unique":false},"imported_count":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"failures":{"type":"TEXT","notNull":false,"unique":false},"last_successful_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"catalog_sync_states_slug_context_idx","columns":["slug","context"],"unique":true},{"name":"catalog_sync_states_created_at_idx","columns":["created_at"]}],"version":"52dc3ee1"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogSelection":{"name":"catalogselection","className":"CatalogSelection","qualifiedName":"@happyvertical/smrt-education:CatalogSelection","collection":"catalogselections","description":"Tenant-owned intent to use a metadata record, distinct from acquiring bytes.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"resourceId":{"type":"foreignKey","required":true,"related":"CatalogResource","_meta":{"required":true}},"selectedByUserId":{"type":"text","required":true,"_meta":{"required":true}},"selectedRevision":{"type":"text","required":true,"_meta":{"required":true}}},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"CatalogSelection","collectionExportName":"CatalogSelectionCollection","validationRules":[{"field":"resourceId","rule":"required","fieldType":"foreignKey"},{"field":"selectedByUserId","rule":"required","fieldType":"text"},{"field":"selectedRevision","rule":"required","fieldType":"text"}],"schema":{"tableName":"catalog_selections","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_selections\\" (\\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 \\"resource_id\\" UUID NOT NULL,\\n \\"selected_by_user_id\\" TEXT NOT NULL,\\n \\"selected_revision\\" TEXT NOT NULL\\n);","columns":{"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},"resource_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"catalog_resources","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"selected_by_user_id":{"type":"TEXT","notNull":true,"unique":false},"selected_revision":{"type":"TEXT","notNull":true,"unique":false}},"indexes":[{"name":"catalog_selections_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"catalog_selections_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"catalog_selections_resource_id_idx","columns":["resource_id"]}],"version":"c6b02eb9"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogAcquisition":{"name":"catalogacquisition","className":"CatalogAcquisition","qualifiedName":"@happyvertical/smrt-education:CatalogAcquisition","collection":"catalogacquisitions","description":"A pinned, tenant-owned acquisition record. Bytes belong in a host storage service.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"resourceId":{"type":"foreignKey","required":true,"related":"CatalogResource","_meta":{"required":true}},"selectionId":{"type":"foreignKey","required":true,"related":"CatalogSelection","_meta":{"required":true}},"revision":{"type":"text","required":true,"_meta":{"required":true}},"format":{"type":"text","required":true,"_meta":{"required":true}},"sha256":{"type":"text","required":true,"_meta":{"required":true}},"attribution":{"type":"text","required":false},"notices":{"type":"text","required":false}},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"CatalogAcquisition","collectionExportName":"CatalogAcquisitionCollection","validationRules":[{"field":"resourceId","rule":"required","fieldType":"foreignKey"},{"field":"selectionId","rule":"required","fieldType":"foreignKey"},{"field":"revision","rule":"required","fieldType":"text"},{"field":"format","rule":"required","fieldType":"text"},{"field":"sha256","rule":"required","fieldType":"text"}],"schema":{"tableName":"catalog_acquisitions","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_acquisitions\\" (\\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 \\"resource_id\\" UUID NOT NULL,\\n \\"selection_id\\" UUID NOT NULL,\\n \\"revision\\" TEXT NOT NULL,\\n \\"format\\" TEXT NOT NULL,\\n \\"sha256\\" TEXT NOT NULL,\\n \\"attribution\\" TEXT,\\n \\"notices\\" TEXT\\n);","columns":{"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},"resource_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"catalog_resources","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"selection_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"catalog_selections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"revision":{"type":"TEXT","notNull":true,"unique":false},"format":{"type":"TEXT","notNull":true,"unique":false},"sha256":{"type":"TEXT","notNull":true,"unique":false},"attribution":{"type":"TEXT","notNull":false,"unique":false},"notices":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"catalog_acquisitions_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"catalog_acquisitions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"catalog_acquisitions_resource_id_idx","columns":["resource_id"]},{"name":"catalog_acquisitions_selection_id_idx","columns":["selection_id"]}],"version":"ee9c5add"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Course":{"name":"course","className":"Course","qualifiedName":"@happyvertical/smrt-education:Course","collection":"courses","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true,"mode":"optional","field":"tenantId","allowSuperAdminBypass":false}}},"title":{"type":"text","required":true,"_meta":{"required":true}},"summary":{"type":"text","required":false},"description":{"type":"text","required":false},"sourceKey":{"type":"text","required":false},"sourceUrl":{"type":"text","required":false},"sourceRef":{"type":"text","required":false},"license":{"type":"text","required":false},"licenseKind":{"type":"text","required":false,"default":"own-work","enum":["own-work","open-license","personal-use-copy","licensed-for-sharing"]},"licenseNote":{"type":"text","required":false},"attestedBy":{"type":"text","required":false},"subject":{"type":"text","required":false},"tags":{"type":"text","required":false},"levelMin":{"type":"integer","required":true,"default":0},"levelMax":{"type":"integer","required":true,"default":0},"difficulty":{"type":"decimal","required":true,"default":0},"estimatedMinutes":{"type":"integer","required":true,"default":0},"modality":{"type":"text","required":false,"default":"online","enum":["online","printable","kit","video","game","mixed"]},"status":{"type":"text","required":false,"default":"draft","enum":["draft","published","archived"]}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableStrategy":"sti","api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"optional"},"conflictColumns":["tenant_id","slug","context","_meta_type"]},"extends":"SmrtObject","exportName":"Course","collectionExportName":"CourseCollection","displayLabelField":"title","validationRules":[{"field":"title","rule":"required","fieldType":"text"},{"field":"levelMin","rule":"required","fieldType":"integer"},{"field":"levelMax","rule":"required","fieldType":"integer"},{"field":"difficulty","rule":"required","fieldType":"decimal"},{"field":"estimatedMinutes","rule":"required","fieldType":"integer"}],"schema":{"tableName":"courses","ddl":"CREATE TABLE IF NOT EXISTS \\"courses\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"summary\\" TEXT,\\n \\"description\\" TEXT,\\n \\"source_key\\" TEXT,\\n \\"source_url\\" TEXT,\\n \\"source_ref\\" TEXT,\\n \\"license\\" TEXT,\\n \\"license_kind\\" TEXT DEFAULT 'own-work',\\n \\"license_note\\" TEXT,\\n \\"attested_by\\" TEXT,\\n \\"subject\\" TEXT,\\n \\"tags\\" TEXT,\\n \\"level_min\\" INTEGER DEFAULT 0,\\n \\"level_max\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"status\\" TEXT DEFAULT 'draft'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"title":{"type":"TEXT","notNull":false},"summary":{"type":"TEXT","notNull":false},"description":{"type":"TEXT","notNull":false},"source_key":{"type":"TEXT","notNull":false},"source_url":{"type":"TEXT","notNull":false},"source_ref":{"type":"TEXT","notNull":false},"license":{"type":"TEXT","notNull":false},"license_kind":{"type":"TEXT","notNull":false,"default":"own-work"},"license_note":{"type":"TEXT","notNull":false},"attested_by":{"type":"TEXT","notNull":false},"subject":{"type":"TEXT","notNull":false},"tags":{"type":"TEXT","notNull":false},"level_min":{"type":"INTEGER","notNull":false,"default":0},"level_max":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"status":{"type":"TEXT","notNull":false,"default":"draft"}},"indexes":[{"name":"courses_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"courses_meta_type_idx","columns":["_meta_type"]},{"name":"courses_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"88cc23ab"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:ExternalCourse":{"name":"externalcourse","className":"ExternalCourse","qualifiedName":"@happyvertical/smrt-education:ExternalCourse","collection":"courses","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true}}},"title":{"type":"text","required":true,"_meta":{"required":true}},"summary":{"type":"text","required":false},"description":{"type":"text","required":false},"sourceKey":{"type":"text","required":false},"sourceUrl":{"type":"text","required":false},"sourceRef":{"type":"text","required":false},"license":{"type":"text","required":false},"licenseKind":{"type":"text","required":false,"default":"own-work","enum":["own-work","open-license","personal-use-copy","licensed-for-sharing"]},"licenseNote":{"type":"text","required":false},"attestedBy":{"type":"text","required":false},"subject":{"type":"text","required":false},"tags":{"type":"text","required":false},"levelMin":{"type":"integer","required":true,"default":0},"levelMax":{"type":"integer","required":true,"default":0},"difficulty":{"type":"decimal","required":true,"default":0},"estimatedMinutes":{"type":"integer","required":true,"default":0},"modality":{"type":"text","required":false,"default":"online","enum":["online","printable","kit","video","game","mixed"]},"status":{"type":"text","required":false,"default":"draft","enum":["draft","published","archived"]}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"courses","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Course","exportName":"ExternalCourse","collectionExportName":"ExternalCourseCollection","displayLabelField":"title","validationRules":[{"field":"title","rule":"required","fieldType":"text"},{"field":"levelMin","rule":"required","fieldType":"integer"},{"field":"levelMax","rule":"required","fieldType":"integer"},{"field":"difficulty","rule":"required","fieldType":"decimal"},{"field":"estimatedMinutes","rule":"required","fieldType":"integer"}],"schema":{"tableName":"courses","ddl":"CREATE TABLE IF NOT EXISTS \\"courses\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"summary\\" TEXT,\\n \\"description\\" TEXT,\\n \\"source_key\\" TEXT,\\n \\"source_url\\" TEXT,\\n \\"source_ref\\" TEXT,\\n \\"license\\" TEXT,\\n \\"license_kind\\" TEXT DEFAULT 'own-work',\\n \\"license_note\\" TEXT,\\n \\"attested_by\\" TEXT,\\n \\"subject\\" TEXT,\\n \\"tags\\" TEXT,\\n \\"level_min\\" INTEGER DEFAULT 0,\\n \\"level_max\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"status\\" TEXT DEFAULT 'draft'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"title":{"type":"TEXT","notNull":false},"summary":{"type":"TEXT","notNull":false},"description":{"type":"TEXT","notNull":false},"source_key":{"type":"TEXT","notNull":false},"source_url":{"type":"TEXT","notNull":false},"source_ref":{"type":"TEXT","notNull":false},"license":{"type":"TEXT","notNull":false},"license_kind":{"type":"TEXT","notNull":false,"default":"own-work"},"license_note":{"type":"TEXT","notNull":false},"attested_by":{"type":"TEXT","notNull":false},"subject":{"type":"TEXT","notNull":false},"tags":{"type":"TEXT","notNull":false},"level_min":{"type":"INTEGER","notNull":false,"default":0},"level_max":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"status":{"type":"TEXT","notNull":false,"default":"draft"}},"indexes":[{"name":"courses_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"courses_meta_type_idx","columns":["_meta_type"]},{"name":"courses_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"88cc23ab"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:AuthoredCourse":{"name":"authoredcourse","className":"AuthoredCourse","qualifiedName":"@happyvertical/smrt-education:AuthoredCourse","collection":"courses","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true}}},"title":{"type":"text","required":true,"_meta":{"required":true}},"summary":{"type":"text","required":false},"description":{"type":"text","required":false},"sourceKey":{"type":"text","required":false},"sourceUrl":{"type":"text","required":false},"sourceRef":{"type":"text","required":false},"license":{"type":"text","required":false},"licenseKind":{"type":"text","required":false,"default":"own-work","enum":["own-work","open-license","personal-use-copy","licensed-for-sharing"]},"licenseNote":{"type":"text","required":false},"attestedBy":{"type":"text","required":false},"subject":{"type":"text","required":false},"tags":{"type":"text","required":false},"levelMin":{"type":"integer","required":true,"default":0},"levelMax":{"type":"integer","required":true,"default":0},"difficulty":{"type":"decimal","required":true,"default":0},"estimatedMinutes":{"type":"integer","required":true,"default":0},"modality":{"type":"text","required":false,"default":"online","enum":["online","printable","kit","video","game","mixed"]},"status":{"type":"text","required":false,"default":"draft","enum":["draft","published","archived"]}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"courses","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Course","exportName":"AuthoredCourse","collectionExportName":"AuthoredCourseCollection","displayLabelField":"title","validationRules":[{"field":"title","rule":"required","fieldType":"text"},{"field":"levelMin","rule":"required","fieldType":"integer"},{"field":"levelMax","rule":"required","fieldType":"integer"},{"field":"difficulty","rule":"required","fieldType":"decimal"},{"field":"estimatedMinutes","rule":"required","fieldType":"integer"}],"schema":{"tableName":"courses","ddl":"CREATE TABLE IF NOT EXISTS \\"courses\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"summary\\" TEXT,\\n \\"description\\" TEXT,\\n \\"source_key\\" TEXT,\\n \\"source_url\\" TEXT,\\n \\"source_ref\\" TEXT,\\n \\"license\\" TEXT,\\n \\"license_kind\\" TEXT DEFAULT 'own-work',\\n \\"license_note\\" TEXT,\\n \\"attested_by\\" TEXT,\\n \\"subject\\" TEXT,\\n \\"tags\\" TEXT,\\n \\"level_min\\" INTEGER DEFAULT 0,\\n \\"level_max\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"status\\" TEXT DEFAULT 'draft'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"title":{"type":"TEXT","notNull":false},"summary":{"type":"TEXT","notNull":false},"description":{"type":"TEXT","notNull":false},"source_key":{"type":"TEXT","notNull":false},"source_url":{"type":"TEXT","notNull":false},"source_ref":{"type":"TEXT","notNull":false},"license":{"type":"TEXT","notNull":false},"license_kind":{"type":"TEXT","notNull":false,"default":"own-work"},"license_note":{"type":"TEXT","notNull":false},"attested_by":{"type":"TEXT","notNull":false},"subject":{"type":"TEXT","notNull":false},"tags":{"type":"TEXT","notNull":false},"level_min":{"type":"INTEGER","notNull":false,"default":0},"level_max":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"status":{"type":"TEXT","notNull":false,"default":"draft"}},"indexes":[{"name":"courses_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"courses_meta_type_idx","columns":["_meta_type"]},{"name":"courses_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"88cc23ab"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CourseSection":{"name":"coursesection","className":"CourseSection","qualifiedName":"@happyvertical/smrt-education:CourseSection","collection":"coursesections","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true,"mode":"optional","field":"tenantId","allowSuperAdminBypass":false}}},"courseId":{"type":"foreignKey","required":true,"related":"Course","_meta":{"required":true}},"title":{"type":"text","required":true,"_meta":{"required":true}},"sortOrder":{"type":"integer","required":true,"default":0}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"optional"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"CourseSection","collectionExportName":"CourseSectionCollection","displayLabelField":"title","validationRules":[{"field":"courseId","rule":"required","fieldType":"foreignKey"},{"field":"title","rule":"required","fieldType":"text"},{"field":"sortOrder","rule":"required","fieldType":"integer"}],"schema":{"tableName":"course_sections","ddl":"CREATE TABLE IF NOT EXISTS \\"course_sections\\" (\\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,\\n \\"course_id\\" UUID NOT NULL,\\n \\"title\\" TEXT NOT NULL,\\n \\"sort_order\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"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":false,"unique":false},"course_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"courses","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":true,"unique":false},"sort_order":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"course_sections_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true,"nullsNotDistinct":true},{"name":"course_sections_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"course_sections_course_id_idx","columns":["course_id"]}],"version":"e20480d7"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Lesson":{"name":"lesson","className":"Lesson","qualifiedName":"@happyvertical/smrt-education:Lesson","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true,"mode":"optional","field":"tenantId","allowSuperAdminBypass":false}}},"sectionId":{"type":"foreignKey","required":true,"related":"CourseSection","_meta":{"required":true}},"title":{"type":"text","required":true,"_meta":{"required":true}},"body":{"type":"text","required":false},"sortOrder":{"type":"integer","required":true,"default":0},"estimatedMinutes":{"type":"integer","required":true,"default":0},"difficulty":{"type":"decimal","required":true,"default":0},"modality":{"type":"text","required":false,"default":"online","enum":["online","printable","kit","video","game","mixed"]},"completionRule":{"type":"text","required":false,"default":"attest","enum":["attest","submit","score","external"]},"externalRef":{"type":"text","required":false},"externalUrl":{"type":"text","required":false}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableStrategy":"sti","api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"optional"},"conflictColumns":["tenant_id","slug","context","_meta_type"]},"extends":"SmrtObject","exportName":"Lesson","collectionExportName":"LessonCollection","displayLabelField":"title","validationRules":[{"field":"sectionId","rule":"required","fieldType":"foreignKey"},{"field":"title","rule":"required","fieldType":"text"},{"field":"sortOrder","rule":"required","fieldType":"integer"},{"field":"estimatedMinutes","rule":"required","fieldType":"integer"},{"field":"difficulty","rule":"required","fieldType":"decimal"}],"schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"092df043"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Reading":{"name":"reading","className":"Reading","qualifiedName":"@happyvertical/smrt-education:Reading","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true}}},"sectionId":{"type":"foreignKey","required":true,"related":"CourseSection","_meta":{"required":true}},"title":{"type":"text","required":true,"_meta":{"required":true}},"body":{"type":"text","required":false},"sortOrder":{"type":"integer","required":true,"default":0},"estimatedMinutes":{"type":"integer","required":true,"default":0},"difficulty":{"type":"decimal","required":true,"default":0},"modality":{"type":"text","required":false,"default":"online","enum":["online","printable","kit","video","game","mixed"]},"completionRule":{"type":"text","required":false,"default":"attest","enum":["attest","submit","score","external"]},"externalRef":{"type":"text","required":false},"externalUrl":{"type":"text","required":false}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"lessons","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Lesson","exportName":"Reading","collectionExportName":"ReadingCollection","displayLabelField":"title","validationRules":[{"field":"sectionId","rule":"required","fieldType":"foreignKey"},{"field":"title","rule":"required","fieldType":"text"},{"field":"sortOrder","rule":"required","fieldType":"integer"},{"field":"estimatedMinutes","rule":"required","fieldType":"integer"},{"field":"difficulty","rule":"required","fieldType":"decimal"}],"schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"9d8b6fcd"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Video":{"name":"video","className":"Video","qualifiedName":"@happyvertical/smrt-education:Video","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true}}},"sectionId":{"type":"foreignKey","required":true,"related":"CourseSection","_meta":{"required":true}},"title":{"type":"text","required":true,"_meta":{"required":true}},"body":{"type":"text","required":false},"sortOrder":{"type":"integer","required":true,"default":0},"estimatedMinutes":{"type":"integer","required":true,"default":0},"difficulty":{"type":"decimal","required":true,"default":0},"modality":{"type":"text","required":false,"default":"online","enum":["online","printable","kit","video","game","mixed"]},"completionRule":{"type":"text","required":false,"default":"attest","enum":["attest","submit","score","external"]},"externalRef":{"type":"text","required":false},"externalUrl":{"type":"text","required":false},"videoUrl":{"type":"text","required":false}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"lessons","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Lesson","exportName":"Video","collectionExportName":"VideoCollection","displayLabelField":"title","validationRules":[{"field":"sectionId","rule":"required","fieldType":"foreignKey"},{"field":"title","rule":"required","fieldType":"text"},{"field":"sortOrder","rule":"required","fieldType":"integer"},{"field":"estimatedMinutes","rule":"required","fieldType":"integer"},{"field":"difficulty","rule":"required","fieldType":"decimal"}],"schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"9e0ef984"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Worksheet":{"name":"worksheet","className":"Worksheet","qualifiedName":"@happyvertical/smrt-education:Worksheet","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true}}},"sectionId":{"type":"foreignKey","required":true,"related":"CourseSection","_meta":{"required":true}},"title":{"type":"text","required":true,"_meta":{"required":true}},"body":{"type":"text","required":false},"sortOrder":{"type":"integer","required":true,"default":0},"estimatedMinutes":{"type":"integer","required":true,"default":0},"difficulty":{"type":"decimal","required":true,"default":0},"modality":{"type":"text","required":false,"default":"online","enum":["online","printable","kit","video","game","mixed"]},"completionRule":{"type":"text","required":false,"default":"submit","enum":["attest","submit","score","external"]},"externalRef":{"type":"text","required":false},"externalUrl":{"type":"text","required":false},"printableUrl":{"type":"text","required":false},"answerUrl":{"type":"text","required":false},"pages":{"type":"integer","required":true,"default":0}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"lessons","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Lesson","exportName":"Worksheet","collectionExportName":"WorksheetCollection","displayLabelField":"title","validationRules":[{"field":"sectionId","rule":"required","fieldType":"foreignKey"},{"field":"title","rule":"required","fieldType":"text"},{"field":"sortOrder","rule":"required","fieldType":"integer"},{"field":"estimatedMinutes","rule":"required","fieldType":"integer"},{"field":"difficulty","rule":"required","fieldType":"decimal"},{"field":"pages","rule":"required","fieldType":"integer"}],"schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"10976938"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Exercise":{"name":"exercise","className":"Exercise","qualifiedName":"@happyvertical/smrt-education:Exercise","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true}}},"sectionId":{"type":"foreignKey","required":true,"related":"CourseSection","_meta":{"required":true}},"title":{"type":"text","required":true,"_meta":{"required":true}},"body":{"type":"text","required":false},"sortOrder":{"type":"integer","required":true,"default":0},"estimatedMinutes":{"type":"integer","required":true,"default":0},"difficulty":{"type":"decimal","required":true,"default":0},"modality":{"type":"text","required":false,"default":"online","enum":["online","printable","kit","video","game","mixed"]},"completionRule":{"type":"text","required":false,"default":"attest","enum":["attest","submit","score","external"]},"externalRef":{"type":"text","required":false},"externalUrl":{"type":"text","required":false}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"lessons","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Lesson","exportName":"Exercise","collectionExportName":"ExerciseCollection","displayLabelField":"title","validationRules":[{"field":"sectionId","rule":"required","fieldType":"foreignKey"},{"field":"title","rule":"required","fieldType":"text"},{"field":"sortOrder","rule":"required","fieldType":"integer"},{"field":"estimatedMinutes","rule":"required","fieldType":"integer"},{"field":"difficulty","rule":"required","fieldType":"decimal"}],"schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"145eadbe"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CourseCollection":{"name":"coursecollection","className":"CourseCollection","qualifiedName":"@happyvertical/smrt-education:CourseCollection","collection":"courses","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Course","exportName":"CourseCollection","collectionExportName":"CourseCollectionCollection","schema":{"tableName":"courses","ddl":"CREATE TABLE IF NOT EXISTS \\"courses\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"summary\\" TEXT,\\n \\"description\\" TEXT,\\n \\"source_key\\" TEXT,\\n \\"source_url\\" TEXT,\\n \\"source_ref\\" TEXT,\\n \\"license\\" TEXT,\\n \\"license_kind\\" TEXT DEFAULT 'own-work',\\n \\"license_note\\" TEXT,\\n \\"attested_by\\" TEXT,\\n \\"subject\\" TEXT,\\n \\"tags\\" TEXT,\\n \\"level_min\\" INTEGER DEFAULT 0,\\n \\"level_max\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"status\\" TEXT DEFAULT 'draft'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"title":{"type":"TEXT","notNull":false},"summary":{"type":"TEXT","notNull":false},"description":{"type":"TEXT","notNull":false},"source_key":{"type":"TEXT","notNull":false},"source_url":{"type":"TEXT","notNull":false},"source_ref":{"type":"TEXT","notNull":false},"license":{"type":"TEXT","notNull":false},"license_kind":{"type":"TEXT","notNull":false,"default":"own-work"},"license_note":{"type":"TEXT","notNull":false},"attested_by":{"type":"TEXT","notNull":false},"subject":{"type":"TEXT","notNull":false},"tags":{"type":"TEXT","notNull":false},"level_min":{"type":"INTEGER","notNull":false,"default":0},"level_max":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"status":{"type":"TEXT","notNull":false,"default":"draft"}},"indexes":[{"name":"courses_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"courses_meta_type_idx","columns":["_meta_type"]},{"name":"courses_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"88cc23ab"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:ExternalCourseCollection":{"name":"externalcoursecollection","className":"ExternalCourseCollection","qualifiedName":"@happyvertical/smrt-education:ExternalCourseCollection","collection":"courses","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"courses","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"ExternalCourse","exportName":"ExternalCourseCollection","collectionExportName":"ExternalCourseCollectionCollection","schema":{"tableName":"courses","ddl":"CREATE TABLE IF NOT EXISTS \\"courses\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"summary\\" TEXT,\\n \\"description\\" TEXT,\\n \\"source_key\\" TEXT,\\n \\"source_url\\" TEXT,\\n \\"source_ref\\" TEXT,\\n \\"license\\" TEXT,\\n \\"license_kind\\" TEXT DEFAULT 'own-work',\\n \\"license_note\\" TEXT,\\n \\"attested_by\\" TEXT,\\n \\"subject\\" TEXT,\\n \\"tags\\" TEXT,\\n \\"level_min\\" INTEGER DEFAULT 0,\\n \\"level_max\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"status\\" TEXT DEFAULT 'draft'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"title":{"type":"TEXT","notNull":false},"summary":{"type":"TEXT","notNull":false},"description":{"type":"TEXT","notNull":false},"source_key":{"type":"TEXT","notNull":false},"source_url":{"type":"TEXT","notNull":false},"source_ref":{"type":"TEXT","notNull":false},"license":{"type":"TEXT","notNull":false},"license_kind":{"type":"TEXT","notNull":false,"default":"own-work"},"license_note":{"type":"TEXT","notNull":false},"attested_by":{"type":"TEXT","notNull":false},"subject":{"type":"TEXT","notNull":false},"tags":{"type":"TEXT","notNull":false},"level_min":{"type":"INTEGER","notNull":false,"default":0},"level_max":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"status":{"type":"TEXT","notNull":false,"default":"draft"}},"indexes":[{"name":"courses_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"courses_meta_type_idx","columns":["_meta_type"]},{"name":"courses_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"88cc23ab"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:AuthoredCourseCollection":{"name":"authoredcoursecollection","className":"AuthoredCourseCollection","qualifiedName":"@happyvertical/smrt-education:AuthoredCourseCollection","collection":"courses","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"courses","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"AuthoredCourse","exportName":"AuthoredCourseCollection","collectionExportName":"AuthoredCourseCollectionCollection","schema":{"tableName":"courses","ddl":"CREATE TABLE IF NOT EXISTS \\"courses\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"summary\\" TEXT,\\n \\"description\\" TEXT,\\n \\"source_key\\" TEXT,\\n \\"source_url\\" TEXT,\\n \\"source_ref\\" TEXT,\\n \\"license\\" TEXT,\\n \\"license_kind\\" TEXT DEFAULT 'own-work',\\n \\"license_note\\" TEXT,\\n \\"attested_by\\" TEXT,\\n \\"subject\\" TEXT,\\n \\"tags\\" TEXT,\\n \\"level_min\\" INTEGER DEFAULT 0,\\n \\"level_max\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"status\\" TEXT DEFAULT 'draft'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"title":{"type":"TEXT","notNull":false},"summary":{"type":"TEXT","notNull":false},"description":{"type":"TEXT","notNull":false},"source_key":{"type":"TEXT","notNull":false},"source_url":{"type":"TEXT","notNull":false},"source_ref":{"type":"TEXT","notNull":false},"license":{"type":"TEXT","notNull":false},"license_kind":{"type":"TEXT","notNull":false,"default":"own-work"},"license_note":{"type":"TEXT","notNull":false},"attested_by":{"type":"TEXT","notNull":false},"subject":{"type":"TEXT","notNull":false},"tags":{"type":"TEXT","notNull":false},"level_min":{"type":"INTEGER","notNull":false,"default":0},"level_max":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"status":{"type":"TEXT","notNull":false,"default":"draft"}},"indexes":[{"name":"courses_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"courses_meta_type_idx","columns":["_meta_type"]},{"name":"courses_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"88cc23ab"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CourseSectionCollection":{"name":"coursesectioncollection","className":"CourseSectionCollection","qualifiedName":"@happyvertical/smrt-education:CourseSectionCollection","collection":"coursesections","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"CourseSection","exportName":"CourseSectionCollection","collectionExportName":"CourseSectionCollectionCollection","schema":{"tableName":"course_sections","ddl":"CREATE TABLE IF NOT EXISTS \\"course_sections\\" (\\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,\\n \\"course_id\\" UUID NOT NULL,\\n \\"title\\" TEXT NOT NULL,\\n \\"sort_order\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"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":false,"unique":false},"course_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"courses","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":true,"unique":false},"sort_order":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"course_sections_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true,"nullsNotDistinct":true},{"name":"course_sections_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"course_sections_course_id_idx","columns":["course_id"]}],"version":"e20480d7"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:LessonCollection":{"name":"lessoncollection","className":"LessonCollection","qualifiedName":"@happyvertical/smrt-education:LessonCollection","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Lesson","exportName":"LessonCollection","collectionExportName":"LessonCollectionCollection","schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"092df043"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:ReadingCollection":{"name":"readingcollection","className":"ReadingCollection","qualifiedName":"@happyvertical/smrt-education:ReadingCollection","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"lessons","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Reading","exportName":"ReadingCollection","collectionExportName":"ReadingCollectionCollection","schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"9d8b6fcd"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:VideoCollection":{"name":"videocollection","className":"VideoCollection","qualifiedName":"@happyvertical/smrt-education:VideoCollection","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"lessons","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Video","exportName":"VideoCollection","collectionExportName":"VideoCollectionCollection","schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"9e0ef984"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorksheetCollection":{"name":"worksheetcollection","className":"WorksheetCollection","qualifiedName":"@happyvertical/smrt-education:WorksheetCollection","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"lessons","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Worksheet","exportName":"WorksheetCollection","collectionExportName":"WorksheetCollectionCollection","schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"10976938"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:ExerciseCollection":{"name":"exercisecollection","className":"ExerciseCollection","qualifiedName":"@happyvertical/smrt-education:ExerciseCollection","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"lessons","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Exercise","exportName":"ExerciseCollection","collectionExportName":"ExerciseCollectionCollection","schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"145eadbe"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:LessonAssetCollection":{"name":"lessonassetcollection","className":"LessonAssetCollection","qualifiedName":"@happyvertical/smrt-education:LessonAssetCollection","collection":"lessonassets","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{"byRight":{"name":"byRight","async":true,"parameters":[{"name":"rightId","type":"string","optional":false},{"name":"opts","type":"JunctionFilterOptions","optional":true}],"returnType":"Promise<TItem[]>","isStatic":false,"isPublic":true},"byLeft":{"name":"byLeft","async":true,"parameters":[{"name":"leftId","type":"string","optional":false},{"name":"opts","type":"JunctionFilterOptions","optional":true}],"returnType":"Promise<TItem[]>","isStatic":false,"isPublic":true},"attach":{"name":"attach","async":true,"parameters":[{"name":"leftId","type":"string","optional":false},{"name":"rightId","type":"string","optional":false},{"name":"opts","type":"JunctionAttachOptions","optional":true}],"returnType":"Promise<TItem>","isStatic":false,"isPublic":true},"detach":{"name":"detach","async":true,"parameters":[{"name":"leftId","type":"string","optional":false},{"name":"rightId","type":"string","optional":false},{"name":"opts","type":"JunctionFilterOptions","optional":true}],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"setLinks":{"name":"setLinks","async":true,"parameters":[{"name":"leftId","type":"string","optional":false},{"name":"rightIds","type":"string[]","optional":false},{"name":"opts","type":"JunctionAttachOptions","optional":true}],"returnType":"Promise<void>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"lesson_assets","api":false,"mcp":false,"cli":false},"extends":"SmrtJunction","extendsTypeArg":"LessonAsset","exportName":"LessonAssetCollection","collectionExportName":"LessonAssetCollectionCollection","schema":{"tableName":"lesson_assets","ddl":"CREATE TABLE IF NOT EXISTS \\"lesson_assets\\" (\\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,\\n \\"lesson_id\\" UUID NOT NULL,\\n \\"asset_id\\" UUID NOT NULL,\\n \\"relationship\\" TEXT NOT NULL DEFAULT 'attachment',\\n \\"sort_order\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"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":false,"unique":false},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"relationship":{"type":"TEXT","notNull":true,"unique":false,"default":"attachment"},"sort_order":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"lesson_assets_tenant_id_lesson_id_idx","columns":["tenant_id","lesson_id","asset_id","relationship"],"unique":true,"nullsNotDistinct":true},{"name":"lesson_assets_slug_context_idx","columns":["slug","context"]},{"name":"lesson_assets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lesson_assets_lesson_id_idx","columns":["lesson_id"]},{"name":"lesson_assets_asset_id_idx","columns":["asset_id"]}],"version":"d96385c6"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:LearnerCollection":{"name":"learnercollection","className":"LearnerCollection","qualifiedName":"@happyvertical/smrt-education:LearnerCollection","collection":"learners","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Learner","exportName":"LearnerCollection","collectionExportName":"LearnerCollectionCollection","schema":{"tableName":"learners","ddl":"CREATE TABLE IF NOT EXISTS \\"learners\\" (\\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 \\"user_id\\" UUID NOT NULL,\\n \\"profile_id\\" UUID NOT NULL,\\n \\"display_name\\" TEXT,\\n \\"birth_date\\" TIMESTAMP,\\n \\"level\\" INTEGER NOT NULL DEFAULT 0,\\n \\"settings\\" TEXT\\n);","columns":{"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},"user_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"display_name":{"type":"TEXT","notNull":false,"unique":false},"birth_date":{"type":"TIMESTAMP","notNull":false,"unique":false},"level":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"settings":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"learners_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"learners_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"learners_user_id_idx","columns":["user_id"]},{"name":"learners_profile_id_idx","columns":["profile_id"]}],"version":"ca9907b5"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CurriculumCollection":{"name":"curriculumcollection","className":"CurriculumCollection","qualifiedName":"@happyvertical/smrt-education:CurriculumCollection","collection":"curriculums","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"curricula","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Curriculum","exportName":"CurriculumCollection","collectionExportName":"CurriculumCollectionCollection","schema":{"tableName":"curricula","ddl":"CREATE TABLE IF NOT EXISTS \\"curricula\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"title\\" TEXT NOT NULL,\\n \\"starts_on\\" TIMESTAMP,\\n \\"ends_on\\" TIMESTAMP,\\n \\"status\\" TEXT DEFAULT 'planned'\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":true,"unique":false},"starts_on":{"type":"TIMESTAMP","notNull":false,"unique":false},"ends_on":{"type":"TIMESTAMP","notNull":false,"unique":false},"status":{"type":"TEXT","notNull":false,"unique":false,"default":"planned"}},"indexes":[{"name":"curricula_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"curricula_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"curricula_learner_id_idx","columns":["learner_id"]}],"version":"b7e90cbd"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:EnrollmentCollection":{"name":"enrollmentcollection","className":"EnrollmentCollection","qualifiedName":"@happyvertical/smrt-education:EnrollmentCollection","collection":"enrollments","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Enrollment","exportName":"EnrollmentCollection","collectionExportName":"EnrollmentCollectionCollection","schema":{"tableName":"enrollments","ddl":"CREATE TABLE IF NOT EXISTS \\"enrollments\\" (\\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 \\"curriculum_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"course_id\\" UUID NOT NULL,\\n \\"status\\" TEXT DEFAULT 'planned',\\n \\"started_at\\" TIMESTAMP,\\n \\"completed_at\\" TIMESTAMP,\\n \\"target_minutes_per_week\\" INTEGER NOT NULL DEFAULT 0,\\n \\"sort_order\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"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},"curriculum_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"curricula","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"course_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"courses","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"status":{"type":"TEXT","notNull":false,"unique":false,"default":"planned"},"started_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"completed_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"target_minutes_per_week":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"sort_order":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"enrollments_tenant_id_curriculum_id_idx","columns":["tenant_id","curriculum_id","course_id"],"unique":true},{"name":"enrollments_slug_context_idx","columns":["slug","context"]},{"name":"enrollments_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"enrollments_curriculum_id_idx","columns":["curriculum_id"]},{"name":"enrollments_learner_id_idx","columns":["learner_id"]},{"name":"enrollments_course_id_idx","columns":["course_id"]}],"version":"2a34b5ee"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:LessonProgressCollection":{"name":"lessonprogresscollection","className":"LessonProgressCollection","qualifiedName":"@happyvertical/smrt-education:LessonProgressCollection","collection":"lessonprogresses","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"lesson_progress","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"LessonProgress","exportName":"LessonProgressCollection","collectionExportName":"LessonProgressCollectionCollection","schema":{"tableName":"lesson_progress","ddl":"CREATE TABLE IF NOT EXISTS \\"lesson_progress\\" (\\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 \\"enrollment_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"lesson_id\\" UUID NOT NULL,\\n \\"status\\" TEXT DEFAULT 'not_started',\\n \\"started_at\\" TIMESTAMP,\\n \\"completed_at\\" TIMESTAMP,\\n \\"time_spent_seconds\\" INTEGER NOT NULL DEFAULT 0,\\n \\"attempts\\" INTEGER NOT NULL DEFAULT 0,\\n \\"best_score\\" REAL\\n);","columns":{"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},"enrollment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"enrollments","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"status":{"type":"TEXT","notNull":false,"unique":false,"default":"not_started"},"started_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"completed_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"time_spent_seconds":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"attempts":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"best_score":{"type":"REAL","notNull":false,"unique":false}},"indexes":[{"name":"lesson_progress_tenant_id_enrollment_id_idx","columns":["tenant_id","enrollment_id","lesson_id"],"unique":true},{"name":"lesson_progress_slug_context_idx","columns":["slug","context"]},{"name":"lesson_progress_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lesson_progress_enrollment_id_idx","columns":["enrollment_id"]},{"name":"lesson_progress_learner_id_idx","columns":["learner_id"]},{"name":"lesson_progress_lesson_id_idx","columns":["lesson_id"]}],"version":"36704fbd"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:SubmissionCollection":{"name":"submissioncollection","className":"SubmissionCollection","qualifiedName":"@happyvertical/smrt-education:SubmissionCollection","collection":"submissions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Submission","exportName":"SubmissionCollection","collectionExportName":"SubmissionCollectionCollection","schema":{"tableName":"submissions","ddl":"CREATE TABLE IF NOT EXISTS \\"submissions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"learner_id\\" UUID,\\n \\"lesson_id\\" UUID,\\n \\"progress_id\\" UUID,\\n \\"submitted_at\\" TEXT,\\n \\"status\\" TEXT DEFAULT 'captured',\\n \\"notes\\" TEXT,\\n \\"capture_key\\" TEXT,\\n \\"capture_digest\\" TEXT,\\n \\"kind\\" TEXT DEFAULT 'completed_work',\\n \\"previous_submission_id\\" UUID,\\n \\"intake_item_id\\" TEXT,\\n \\"page_count\\" INTEGER DEFAULT 0,\\n \\"ocr_text\\" TEXT,\\n \\"extracted\\" TEXT,\\n \\"reported_by\\" TEXT DEFAULT 'learner',\\n \\"evidence_url\\" TEXT,\\n \\"reported_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"progress_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lesson_progress","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submitted_at":{"type":"TEXT","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"captured"},"notes":{"type":"TEXT","notNull":false},"capture_key":{"type":"TEXT","notNull":false},"capture_digest":{"type":"TEXT","notNull":false},"kind":{"type":"TEXT","notNull":false,"default":"completed_work"},"previous_submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_item_id":{"type":"TEXT","notNull":false},"page_count":{"type":"INTEGER","notNull":false,"default":0},"ocr_text":{"type":"TEXT","notNull":false},"extracted":{"type":"TEXT","notNull":false},"reported_by":{"type":"TEXT","notNull":false,"default":"learner"},"evidence_url":{"type":"TEXT","notNull":false},"reported_score":{"type":"REAL","notNull":false}},"indexes":[{"name":"submissions_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"submissions_meta_type_idx","columns":["_meta_type"]},{"name":"submissions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submissions_learner_id_idx","columns":["learner_id"]},{"name":"submissions_lesson_id_idx","columns":["lesson_id"]},{"name":"submissions_progress_id_idx","columns":["progress_id"]},{"name":"submissions_previous_submission_id_idx","columns":["previous_submission_id"]}],"version":"27a21ab4"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:SubmissionIntakeBindingCollection":{"name":"submissionintakebindingcollection","className":"SubmissionIntakeBindingCollection","qualifiedName":"@happyvertical/smrt-education:SubmissionIntakeBindingCollection","collection":"submissionintakebindings","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"submission_intake_bindings","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"SubmissionIntakeBinding","exportName":"SubmissionIntakeBindingCollection","collectionExportName":"SubmissionIntakeBindingCollectionCollection","schema":{"tableName":"submission_intake_bindings","ddl":"CREATE TABLE IF NOT EXISTS \\"submission_intake_bindings\\" (\\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 \\"intake_item_id\\" TEXT NOT NULL,\\n \\"submission_id\\" UUID NOT NULL\\n);","columns":{"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},"intake_item_id":{"type":"TEXT","notNull":true,"unique":false},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}}},"indexes":[{"name":"submission_intake_bindings_tenant_id_intake_item_id_idx","columns":["tenant_id","intake_item_id"],"unique":true},{"name":"submission_intake_bindings_slug_context_idx","columns":["slug","context"]},{"name":"submission_intake_bindings_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submission_intake_bindings_submission_id_idx","columns":["submission_id"]}],"version":"7102c909"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:ScannedSubmissionCollection":{"name":"scannedsubmissioncollection","className":"ScannedSubmissionCollection","qualifiedName":"@happyvertical/smrt-education:ScannedSubmissionCollection","collection":"submissions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"submissions","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"ScannedSubmission","exportName":"ScannedSubmissionCollection","collectionExportName":"ScannedSubmissionCollectionCollection","schema":{"tableName":"submissions","ddl":"CREATE TABLE IF NOT EXISTS \\"submissions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"learner_id\\" UUID,\\n \\"lesson_id\\" UUID,\\n \\"progress_id\\" UUID,\\n \\"submitted_at\\" TEXT,\\n \\"status\\" TEXT DEFAULT 'captured',\\n \\"notes\\" TEXT,\\n \\"capture_key\\" TEXT,\\n \\"capture_digest\\" TEXT,\\n \\"kind\\" TEXT DEFAULT 'completed_work',\\n \\"previous_submission_id\\" UUID,\\n \\"intake_item_id\\" TEXT,\\n \\"page_count\\" INTEGER DEFAULT 0,\\n \\"ocr_text\\" TEXT,\\n \\"extracted\\" TEXT,\\n \\"reported_by\\" TEXT DEFAULT 'learner',\\n \\"evidence_url\\" TEXT,\\n \\"reported_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"progress_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lesson_progress","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submitted_at":{"type":"TEXT","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"captured"},"notes":{"type":"TEXT","notNull":false},"capture_key":{"type":"TEXT","notNull":false},"capture_digest":{"type":"TEXT","notNull":false},"kind":{"type":"TEXT","notNull":false,"default":"completed_work"},"previous_submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_item_id":{"type":"TEXT","notNull":false},"page_count":{"type":"INTEGER","notNull":false,"default":0},"ocr_text":{"type":"TEXT","notNull":false},"extracted":{"type":"TEXT","notNull":false},"reported_by":{"type":"TEXT","notNull":false,"default":"learner"},"evidence_url":{"type":"TEXT","notNull":false},"reported_score":{"type":"REAL","notNull":false}},"indexes":[{"name":"submissions_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"submissions_meta_type_idx","columns":["_meta_type"]},{"name":"submissions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submissions_learner_id_idx","columns":["learner_id"]},{"name":"submissions_lesson_id_idx","columns":["lesson_id"]},{"name":"submissions_progress_id_idx","columns":["progress_id"]},{"name":"submissions_previous_submission_id_idx","columns":["previous_submission_id"]}],"version":"7c394510"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:ExternalCompletionCollection":{"name":"externalcompletioncollection","className":"ExternalCompletionCollection","qualifiedName":"@happyvertical/smrt-education:ExternalCompletionCollection","collection":"submissions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"submissions","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"ExternalCompletion","exportName":"ExternalCompletionCollection","collectionExportName":"ExternalCompletionCollectionCollection","schema":{"tableName":"submissions","ddl":"CREATE TABLE IF NOT EXISTS \\"submissions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"learner_id\\" UUID,\\n \\"lesson_id\\" UUID,\\n \\"progress_id\\" UUID,\\n \\"submitted_at\\" TEXT,\\n \\"status\\" TEXT DEFAULT 'captured',\\n \\"notes\\" TEXT,\\n \\"capture_key\\" TEXT,\\n \\"capture_digest\\" TEXT,\\n \\"kind\\" TEXT DEFAULT 'completed_work',\\n \\"previous_submission_id\\" UUID,\\n \\"intake_item_id\\" TEXT,\\n \\"page_count\\" INTEGER DEFAULT 0,\\n \\"ocr_text\\" TEXT,\\n \\"extracted\\" TEXT,\\n \\"reported_by\\" TEXT DEFAULT 'learner',\\n \\"evidence_url\\" TEXT,\\n \\"reported_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"progress_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lesson_progress","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submitted_at":{"type":"TEXT","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"captured"},"notes":{"type":"TEXT","notNull":false},"capture_key":{"type":"TEXT","notNull":false},"capture_digest":{"type":"TEXT","notNull":false},"kind":{"type":"TEXT","notNull":false,"default":"completed_work"},"previous_submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_item_id":{"type":"TEXT","notNull":false},"page_count":{"type":"INTEGER","notNull":false,"default":0},"ocr_text":{"type":"TEXT","notNull":false},"extracted":{"type":"TEXT","notNull":false},"reported_by":{"type":"TEXT","notNull":false,"default":"learner"},"evidence_url":{"type":"TEXT","notNull":false},"reported_score":{"type":"REAL","notNull":false}},"indexes":[{"name":"submissions_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"submissions_meta_type_idx","columns":["_meta_type"]},{"name":"submissions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submissions_learner_id_idx","columns":["learner_id"]},{"name":"submissions_lesson_id_idx","columns":["lesson_id"]},{"name":"submissions_progress_id_idx","columns":["progress_id"]},{"name":"submissions_previous_submission_id_idx","columns":["previous_submission_id"]}],"version":"eff3715d"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:AttestationCollection":{"name":"attestationcollection","className":"AttestationCollection","qualifiedName":"@happyvertical/smrt-education:AttestationCollection","collection":"submissions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"submissions","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Attestation","exportName":"AttestationCollection","collectionExportName":"AttestationCollectionCollection","schema":{"tableName":"submissions","ddl":"CREATE TABLE IF NOT EXISTS \\"submissions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"learner_id\\" UUID,\\n \\"lesson_id\\" UUID,\\n \\"progress_id\\" UUID,\\n \\"submitted_at\\" TEXT,\\n \\"status\\" TEXT DEFAULT 'captured',\\n \\"notes\\" TEXT,\\n \\"capture_key\\" TEXT,\\n \\"capture_digest\\" TEXT,\\n \\"kind\\" TEXT DEFAULT 'completed_work',\\n \\"previous_submission_id\\" UUID,\\n \\"intake_item_id\\" TEXT,\\n \\"page_count\\" INTEGER DEFAULT 0,\\n \\"ocr_text\\" TEXT,\\n \\"extracted\\" TEXT,\\n \\"reported_by\\" TEXT DEFAULT 'learner',\\n \\"evidence_url\\" TEXT,\\n \\"reported_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"progress_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lesson_progress","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submitted_at":{"type":"TEXT","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"captured"},"notes":{"type":"TEXT","notNull":false},"capture_key":{"type":"TEXT","notNull":false},"capture_digest":{"type":"TEXT","notNull":false},"kind":{"type":"TEXT","notNull":false,"default":"completed_work"},"previous_submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_item_id":{"type":"TEXT","notNull":false},"page_count":{"type":"INTEGER","notNull":false,"default":0},"ocr_text":{"type":"TEXT","notNull":false},"extracted":{"type":"TEXT","notNull":false},"reported_by":{"type":"TEXT","notNull":false,"default":"learner"},"evidence_url":{"type":"TEXT","notNull":false},"reported_score":{"type":"REAL","notNull":false}},"indexes":[{"name":"submissions_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"submissions_meta_type_idx","columns":["_meta_type"]},{"name":"submissions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submissions_learner_id_idx","columns":["learner_id"]},{"name":"submissions_lesson_id_idx","columns":["lesson_id"]},{"name":"submissions_progress_id_idx","columns":["progress_id"]},{"name":"submissions_previous_submission_id_idx","columns":["previous_submission_id"]}],"version":"4f3230a3"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:GradeCollection":{"name":"gradecollection","className":"GradeCollection","qualifiedName":"@happyvertical/smrt-education:GradeCollection","collection":"grades","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Grade","exportName":"GradeCollection","collectionExportName":"GradeCollectionCollection","schema":{"tableName":"grades","ddl":"CREATE TABLE IF NOT EXISTS \\"grades\\" (\\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 \\"submission_id\\" UUID NOT NULL,\\n \\"grader_kind\\" TEXT NOT NULL DEFAULT 'auto',\\n \\"grader_profile_id\\" UUID,\\n \\"score\\" REAL,\\n \\"points_earned\\" INTEGER,\\n \\"points_possible\\" INTEGER,\\n \\"rubric_results\\" TEXT,\\n \\"feedback\\" TEXT,\\n \\"graded_at\\" TEXT\\n);","columns":{"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},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"grader_kind":{"type":"TEXT","notNull":true,"unique":false,"default":"auto"},"grader_profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"score":{"type":"REAL","notNull":false,"unique":false},"points_earned":{"type":"INTEGER","notNull":false,"unique":false},"points_possible":{"type":"INTEGER","notNull":false,"unique":false},"rubric_results":{"type":"TEXT","notNull":false,"unique":false},"feedback":{"type":"TEXT","notNull":false,"unique":false},"graded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"grades_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"grades_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"grades_submission_id_idx","columns":["submission_id"]},{"name":"grades_grader_profile_id_idx","columns":["grader_profile_id"]}],"version":"7d629fec"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:SubmissionAssetCollection":{"name":"submissionassetcollection","className":"SubmissionAssetCollection","qualifiedName":"@happyvertical/smrt-education:SubmissionAssetCollection","collection":"submissionassets","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{"byRight":{"name":"byRight","async":true,"parameters":[{"name":"rightId","type":"string","optional":false},{"name":"opts","type":"JunctionFilterOptions","optional":true}],"returnType":"Promise<TItem[]>","isStatic":false,"isPublic":true},"byLeft":{"name":"byLeft","async":true,"parameters":[{"name":"leftId","type":"string","optional":false},{"name":"opts","type":"JunctionFilterOptions","optional":true}],"returnType":"Promise<TItem[]>","isStatic":false,"isPublic":true},"attach":{"name":"attach","async":true,"parameters":[{"name":"leftId","type":"string","optional":false},{"name":"rightId","type":"string","optional":false},{"name":"opts","type":"JunctionAttachOptions","optional":true}],"returnType":"Promise<TItem>","isStatic":false,"isPublic":true},"detach":{"name":"detach","async":true,"parameters":[{"name":"leftId","type":"string","optional":false},{"name":"rightId","type":"string","optional":false},{"name":"opts","type":"JunctionFilterOptions","optional":true}],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"setLinks":{"name":"setLinks","async":true,"parameters":[{"name":"leftId","type":"string","optional":false},{"name":"rightIds","type":"string[]","optional":false},{"name":"opts","type":"JunctionAttachOptions","optional":true}],"returnType":"Promise<void>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"submission_assets","api":false,"mcp":false,"cli":false},"extends":"SmrtJunction","extendsTypeArg":"SubmissionAsset","exportName":"SubmissionAssetCollection","collectionExportName":"SubmissionAssetCollectionCollection","schema":{"tableName":"submission_assets","ddl":"CREATE TABLE IF NOT EXISTS \\"submission_assets\\" (\\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 \\"submission_id\\" UUID NOT NULL,\\n \\"asset_id\\" UUID NOT NULL,\\n \\"relationship\\" TEXT NOT NULL DEFAULT 'page',\\n \\"sort_order\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"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},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"relationship":{"type":"TEXT","notNull":true,"unique":false,"default":"page"},"sort_order":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"submission_assets_tenant_id_submission_id_idx","columns":["tenant_id","submission_id","asset_id","relationship"],"unique":true},{"name":"submission_assets_slug_context_idx","columns":["slug","context"]},{"name":"submission_assets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submission_assets_submission_id_idx","columns":["submission_id"]},{"name":"submission_assets_asset_id_idx","columns":["asset_id"]}],"version":"d9b61c8a"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CourseSource":{"name":"coursesource","className":"CourseSource","qualifiedName":"@happyvertical/smrt-education:CourseSource","collection":"coursesources","description":"Host-managed source policy; deliberately has no generated CRUD surface.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/course-source.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"key":{"type":"text","required":true,"_meta":{"required":true}},"name":{"type":"text","required":true,"_meta":{"required":true}},"kind":{"type":"text","required":false,"default":"adapter","enum":["manual","url","adapter"]},"adapterKey":{"type":"text","required":false},"config":{"type":"text","required":false},"sharing":{"type":"text","required":false,"default":"private","enum":["private","group","global"]}},"methods":{"getConfig":{"name":"getConfig","async":false,"parameters":[],"returnType":"CourseSourceConfig","isStatic":false,"isPublic":true},"setConfig":{"name":"setConfig","async":false,"parameters":[{"name":"value","type":"CourseSourceConfig","optional":false}],"returnType":"void","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"cli":false,"mcp":false,"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"CourseSource","collectionExportName":"CourseSourceCollection","displayLabelField":"name","validationRules":[{"field":"key","rule":"required","fieldType":"text"},{"field":"name","rule":"required","fieldType":"text"}],"schema":{"tableName":"course_sources","ddl":"CREATE TABLE IF NOT EXISTS \\"course_sources\\" (\\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 \\"key\\" TEXT NOT NULL,\\n \\"name\\" TEXT NOT NULL,\\n \\"kind\\" TEXT DEFAULT 'adapter',\\n \\"adapter_key\\" TEXT,\\n \\"config\\" TEXT,\\n \\"sharing\\" TEXT DEFAULT 'private'\\n);","columns":{"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},"key":{"type":"TEXT","notNull":true,"unique":false},"name":{"type":"TEXT","notNull":true,"unique":false},"kind":{"type":"TEXT","notNull":false,"unique":false,"default":"adapter"},"adapter_key":{"type":"TEXT","notNull":false,"unique":false},"config":{"type":"TEXT","notNull":false,"unique":false},"sharing":{"type":"TEXT","notNull":false,"unique":false,"default":"private"}},"indexes":[{"name":"course_sources_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"course_sources_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"98177eb3"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CourseSourceCollection":{"name":"coursesourcecollection","className":"CourseSourceCollection","qualifiedName":"@happyvertical/smrt-education:CourseSourceCollection","collection":"coursesources","filePath":"/home/runner/work/smrt/smrt/packages/education/src/course-source.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"CourseSource","exportName":"CourseSourceCollection","collectionExportName":"CourseSourceCollectionCollection","schema":{"tableName":"course_sources","ddl":"CREATE TABLE IF NOT EXISTS \\"course_sources\\" (\\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 \\"key\\" TEXT NOT NULL,\\n \\"name\\" TEXT NOT NULL,\\n \\"kind\\" TEXT DEFAULT 'adapter',\\n \\"adapter_key\\" TEXT,\\n \\"config\\" TEXT,\\n \\"sharing\\" TEXT DEFAULT 'private'\\n);","columns":{"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},"key":{"type":"TEXT","notNull":true,"unique":false},"name":{"type":"TEXT","notNull":true,"unique":false},"kind":{"type":"TEXT","notNull":false,"unique":false,"default":"adapter"},"adapter_key":{"type":"TEXT","notNull":false,"unique":false},"config":{"type":"TEXT","notNull":false,"unique":false},"sharing":{"type":"TEXT","notNull":false,"unique":false,"default":"private"}},"indexes":[{"name":"course_sources_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"course_sources_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"98177eb3"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:FamilyIntake":{"name":"familyintake","className":"FamilyIntake","qualifiedName":"@happyvertical/smrt-education:FamilyIntake","collection":"familyintakes","description":"Family-owned receipt, independent of learner attribution and ingestion expiry.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/family-intake-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"itemId":{"type":"text","required":false},"actorUserId":{"type":"text","required":false},"ownerProfileId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-profiles:Profile"},"contentDigest":{"type":"text","required":false},"sourceJson":{"type":"text","required":false,"_meta":{}}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true},"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"family_intakes","conflictColumns":["tenant_id","item_id"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"FamilyIntake","collectionExportName":"FamilyIntakeCollection","validationRules":[],"schema":{"tableName":"family_intakes","ddl":"CREATE TABLE IF NOT EXISTS \\"family_intakes\\" (\\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 \\"item_id\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"owner_profile_id\\" UUID,\\n \\"content_digest\\" TEXT,\\n \\"source_json\\" TEXT\\n);","columns":{"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},"item_id":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"owner_profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"content_digest":{"type":"TEXT","notNull":false,"unique":false},"source_json":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"family_intakes_tenant_id_item_id_idx","columns":["tenant_id","item_id"],"unique":true,"nullsNotDistinct":true},{"name":"family_intakes_slug_context_idx","columns":["slug","context"]},{"name":"family_intakes_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"family_intakes_owner_profile_id_idx","columns":["owner_profile_id"]}],"version":"2577578b"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:FamilyIntakeCollection":{"name":"familyintakecollection","className":"FamilyIntakeCollection","qualifiedName":"@happyvertical/smrt-education:FamilyIntakeCollection","collection":"familyintakes","filePath":"/home/runner/work/smrt/smrt/packages/education/src/family-intake-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"family_intakes","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"FamilyIntake","exportName":"FamilyIntakeCollection","collectionExportName":"FamilyIntakeCollectionCollection","schema":{"tableName":"family_intakes","ddl":"CREATE TABLE IF NOT EXISTS \\"family_intakes\\" (\\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 \\"item_id\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"owner_profile_id\\" UUID,\\n \\"content_digest\\" TEXT,\\n \\"source_json\\" TEXT\\n);","columns":{"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},"item_id":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"owner_profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"content_digest":{"type":"TEXT","notNull":false,"unique":false},"source_json":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"family_intakes_tenant_id_item_id_idx","columns":["tenant_id","item_id"],"unique":true,"nullsNotDistinct":true},{"name":"family_intakes_slug_context_idx","columns":["slug","context"]},{"name":"family_intakes_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"family_intakes_owner_profile_id_idx","columns":["owner_profile_id"]}],"version":"2577578b"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:FamilyIntakeAsset":{"name":"familyintakeasset","className":"FamilyIntakeAsset","qualifiedName":"@happyvertical/smrt-education:FamilyIntakeAsset","collection":"familyintakeassets","description":"Sole family owner join; adoption borrows this exact immutable original.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/family-intake-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"intakeId":{"type":"foreignKey","required":true,"related":"FamilyIntake","_meta":{"required":true}},"assetId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-assets:Asset"},"name":{"type":"text","required":false},"mimeType":{"type":"text","required":false},"sha256":{"type":"text","required":false},"position":{"type":"integer","required":true,"default":0}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true},"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"family_intake_assets","conflictColumns":["tenant_id","intake_id","asset_id"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"FamilyIntakeAsset","collectionExportName":"FamilyIntakeAssetCollection","displayLabelField":"name","validationRules":[{"field":"intakeId","rule":"required","fieldType":"foreignKey"},{"field":"position","rule":"required","fieldType":"integer"}],"schema":{"tableName":"family_intake_assets","ddl":"CREATE TABLE IF NOT EXISTS \\"family_intake_assets\\" (\\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 \\"intake_id\\" UUID NOT NULL,\\n \\"asset_id\\" UUID,\\n \\"name\\" TEXT,\\n \\"mime_type\\" TEXT,\\n \\"sha256\\" TEXT,\\n \\"position\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"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},"intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"family_intakes","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"name":{"type":"TEXT","notNull":false,"unique":false},"mime_type":{"type":"TEXT","notNull":false,"unique":false},"sha256":{"type":"TEXT","notNull":false,"unique":false},"position":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"family_intake_assets_tenant_id_intake_id_idx","columns":["tenant_id","intake_id","asset_id"],"unique":true,"nullsNotDistinct":true},{"name":"family_intake_assets_slug_context_idx","columns":["slug","context"]},{"name":"family_intake_assets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"family_intake_assets_intake_id_idx","columns":["intake_id"]},{"name":"family_intake_assets_asset_id_idx","columns":["asset_id"]}],"version":"3811d126"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:FamilyIntakeAssetCollection":{"name":"familyintakeassetcollection","className":"FamilyIntakeAssetCollection","qualifiedName":"@happyvertical/smrt-education:FamilyIntakeAssetCollection","collection":"familyintakeassets","filePath":"/home/runner/work/smrt/smrt/packages/education/src/family-intake-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"family_intake_assets","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"FamilyIntakeAsset","exportName":"FamilyIntakeAssetCollection","collectionExportName":"FamilyIntakeAssetCollectionCollection","schema":{"tableName":"family_intake_assets","ddl":"CREATE TABLE IF NOT EXISTS \\"family_intake_assets\\" (\\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 \\"intake_id\\" UUID NOT NULL,\\n \\"asset_id\\" UUID,\\n \\"name\\" TEXT,\\n \\"mime_type\\" TEXT,\\n \\"sha256\\" TEXT,\\n \\"position\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"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},"intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"family_intakes","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"name":{"type":"TEXT","notNull":false,"unique":false},"mime_type":{"type":"TEXT","notNull":false,"unique":false},"sha256":{"type":"TEXT","notNull":false,"unique":false},"position":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"family_intake_assets_tenant_id_intake_id_idx","columns":["tenant_id","intake_id","asset_id"],"unique":true,"nullsNotDistinct":true},{"name":"family_intake_assets_slug_context_idx","columns":["slug","context"]},{"name":"family_intake_assets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"family_intake_assets_intake_id_idx","columns":["intake_id"]},{"name":"family_intake_assets_asset_id_idx","columns":["asset_id"]}],"version":"3811d126"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:FamilyIntakeDecision":{"name":"familyintakedecision","className":"FamilyIntakeDecision","qualifiedName":"@happyvertical/smrt-education:FamilyIntakeDecision","collection":"familyintakedecisions","description":"Append-only attribution/adoption audit; no marks or learning outcomes.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/family-intake-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"intakeId":{"type":"foreignKey","required":true,"related":"FamilyIntake","_meta":{"required":true}},"requestKey":{"type":"text","required":false},"sequence":{"type":"integer","required":true,"default":0},"actorUserId":{"type":"text","required":false},"bodyJson":{"type":"text","required":false,"_meta":{}}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true},"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"family_intake_decisions","conflictColumns":["tenant_id","intake_id","request_key"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"FamilyIntakeDecision","collectionExportName":"FamilyIntakeDecisionCollection","validationRules":[{"field":"intakeId","rule":"required","fieldType":"foreignKey"},{"field":"sequence","rule":"required","fieldType":"integer"}],"schema":{"tableName":"family_intake_decisions","ddl":"CREATE TABLE IF NOT EXISTS \\"family_intake_decisions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"intake_id\\" UUID NOT NULL,\\n \\"request_key\\" TEXT,\\n \\"sequence\\" INTEGER NOT NULL DEFAULT 0,\\n \\"actor_user_id\\" TEXT,\\n \\"body_json\\" TEXT\\n);","columns":{"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},"intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"family_intakes","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":false,"unique":false},"sequence":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"body_json":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"family_intake_decisions_tenant_id_intake_id_idx","columns":["tenant_id","intake_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"family_intake_decisions_slug_context_idx","columns":["slug","context"]},{"name":"family_intake_decisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"family_intake_decisions_intake_id_idx","columns":["intake_id"]}],"version":"08875c81"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:FamilyIntakeDecisionCollection":{"name":"familyintakedecisioncollection","className":"FamilyIntakeDecisionCollection","qualifiedName":"@happyvertical/smrt-education:FamilyIntakeDecisionCollection","collection":"familyintakedecisions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/family-intake-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"family_intake_decisions","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"FamilyIntakeDecision","exportName":"FamilyIntakeDecisionCollection","collectionExportName":"FamilyIntakeDecisionCollectionCollection","schema":{"tableName":"family_intake_decisions","ddl":"CREATE TABLE IF NOT EXISTS \\"family_intake_decisions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"intake_id\\" UUID NOT NULL,\\n \\"request_key\\" TEXT,\\n \\"sequence\\" INTEGER NOT NULL DEFAULT 0,\\n \\"actor_user_id\\" TEXT,\\n \\"body_json\\" TEXT\\n);","columns":{"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},"intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"family_intakes","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":false,"unique":false},"sequence":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"body_json":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"family_intake_decisions_tenant_id_intake_id_idx","columns":["tenant_id","intake_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"family_intake_decisions_slug_context_idx","columns":["slug","context"]},{"name":"family_intake_decisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"family_intake_decisions_intake_id_idx","columns":["intake_id"]}],"version":"08875c81"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Learner":{"name":"learner","className":"Learner","qualifiedName":"@happyvertical/smrt-education:Learner","collection":"learners","description":"A learner is a real user/profile identity with active family membership.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/learners.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"userId":{"type":"crossPackageRef","required":true,"related":"@happyvertical/smrt-users:User"},"profileId":{"type":"crossPackageRef","required":true,"related":"@happyvertical/smrt-profiles:Profile"},"displayName":{"type":"text","required":false},"birthDate":{"type":"datetime","required":false},"level":{"type":"integer","required":true,"default":0},"settings":{"type":"text","required":false}},"methods":{"getSettings":{"name":"getSettings","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true},"setSettings":{"name":"setSettings","async":false,"parameters":[{"name":"value","type":"Record<string, unknown>","optional":false}],"returnType":"void","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"Learner","collectionExportName":"LearnerCollection","validationRules":[{"field":"userId","rule":"required","fieldType":"crossPackageRef"},{"field":"profileId","rule":"required","fieldType":"crossPackageRef"},{"field":"level","rule":"required","fieldType":"integer"}],"schema":{"tableName":"learners","ddl":"CREATE TABLE IF NOT EXISTS \\"learners\\" (\\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 \\"user_id\\" UUID NOT NULL,\\n \\"profile_id\\" UUID NOT NULL,\\n \\"display_name\\" TEXT,\\n \\"birth_date\\" TIMESTAMP,\\n \\"level\\" INTEGER NOT NULL DEFAULT 0,\\n \\"settings\\" TEXT\\n);","columns":{"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},"user_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"display_name":{"type":"TEXT","notNull":false,"unique":false},"birth_date":{"type":"TIMESTAMP","notNull":false,"unique":false},"level":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"settings":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"learners_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"learners_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"learners_user_id_idx","columns":["user_id"]},{"name":"learners_profile_id_idx","columns":["profile_id"]}],"version":"ca9907b5"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Curriculum":{"name":"curriculum","className":"Curriculum","qualifiedName":"@happyvertical/smrt-education:Curriculum","collection":"curriculums","description":"A distinct plan retains its own enrollment history.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/learners.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"title":{"type":"text","required":true,"_meta":{"required":true}},"startsOn":{"type":"datetime","required":false},"endsOn":{"type":"datetime","required":false},"status":{"type":"text","required":false,"default":"planned","enum":["planned","active","completed","archived"]}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"tableName":"curricula","tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"Curriculum","collectionExportName":"CurriculumCollection","displayLabelField":"title","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"title","rule":"required","fieldType":"text"}],"schema":{"tableName":"curricula","ddl":"CREATE TABLE IF NOT EXISTS \\"curricula\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"title\\" TEXT NOT NULL,\\n \\"starts_on\\" TIMESTAMP,\\n \\"ends_on\\" TIMESTAMP,\\n \\"status\\" TEXT DEFAULT 'planned'\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":true,"unique":false},"starts_on":{"type":"TIMESTAMP","notNull":false,"unique":false},"ends_on":{"type":"TIMESTAMP","notNull":false,"unique":false},"status":{"type":"TEXT","notNull":false,"unique":false,"default":"planned"}},"indexes":[{"name":"curricula_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"curricula_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"curricula_learner_id_idx","columns":["learner_id"]}],"version":"b7e90cbd"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Enrollment":{"name":"enrollment","className":"Enrollment","qualifiedName":"@happyvertical/smrt-education:Enrollment","collection":"enrollments","description":"One course in one curriculum; a new curriculum means a new enrollment.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/learners.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"curriculumId":{"type":"foreignKey","required":true,"related":"Curriculum","_meta":{"required":true}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"courseId":{"type":"foreignKey","required":true,"related":"Course","_meta":{"required":true}},"status":{"type":"text","required":false,"default":"planned","enum":["planned","active","paused","completed","dropped"]},"startedAt":{"type":"datetime","required":false},"completedAt":{"type":"datetime","required":false},"targetMinutesPerWeek":{"type":"integer","required":true,"default":0},"sortOrder":{"type":"integer","required":true,"default":0}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"conflictColumns":["tenant_id","curriculum_id","course_id"],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"Enrollment","collectionExportName":"EnrollmentCollection","validationRules":[{"field":"curriculumId","rule":"required","fieldType":"foreignKey"},{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"courseId","rule":"required","fieldType":"foreignKey"},{"field":"targetMinutesPerWeek","rule":"required","fieldType":"integer"},{"field":"sortOrder","rule":"required","fieldType":"integer"}],"schema":{"tableName":"enrollments","ddl":"CREATE TABLE IF NOT EXISTS \\"enrollments\\" (\\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 \\"curriculum_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"course_id\\" UUID NOT NULL,\\n \\"status\\" TEXT DEFAULT 'planned',\\n \\"started_at\\" TIMESTAMP,\\n \\"completed_at\\" TIMESTAMP,\\n \\"target_minutes_per_week\\" INTEGER NOT NULL DEFAULT 0,\\n \\"sort_order\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"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},"curriculum_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"curricula","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"course_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"courses","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"status":{"type":"TEXT","notNull":false,"unique":false,"default":"planned"},"started_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"completed_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"target_minutes_per_week":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"sort_order":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"enrollments_tenant_id_curriculum_id_idx","columns":["tenant_id","curriculum_id","course_id"],"unique":true},{"name":"enrollments_slug_context_idx","columns":["slug","context"]},{"name":"enrollments_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"enrollments_curriculum_id_idx","columns":["curriculum_id"]},{"name":"enrollments_learner_id_idx","columns":["learner_id"]},{"name":"enrollments_course_id_idx","columns":["course_id"]}],"version":"2a34b5ee"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:LessonProgress":{"name":"lessonprogress","className":"LessonProgress","qualifiedName":"@happyvertical/smrt-education:LessonProgress","collection":"lessonprogresses","description":"Progress identity is enrollment + lesson, never learner + lesson.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/learners.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"enrollmentId":{"type":"foreignKey","required":true,"related":"Enrollment","_meta":{"required":true}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"lessonId":{"type":"foreignKey","required":true,"related":"Lesson","_meta":{"required":true}},"status":{"type":"text","required":false,"default":"not_started","enum":["not_started","in_progress","submitted","needs_review","complete","skipped"]},"startedAt":{"type":"datetime","required":false},"completedAt":{"type":"datetime","required":false},"timeSpentSeconds":{"type":"integer","required":true,"default":0},"attempts":{"type":"integer","required":true,"default":0},"bestScore":{"type":"decimal","required":false,"_meta":{"nullable":true}}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"tableName":"lesson_progress","conflictColumns":["tenant_id","enrollment_id","lesson_id"],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"LessonProgress","collectionExportName":"LessonProgressCollection","validationRules":[{"field":"enrollmentId","rule":"required","fieldType":"foreignKey"},{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"lessonId","rule":"required","fieldType":"foreignKey"},{"field":"timeSpentSeconds","rule":"required","fieldType":"integer"},{"field":"attempts","rule":"required","fieldType":"integer"}],"schema":{"tableName":"lesson_progress","ddl":"CREATE TABLE IF NOT EXISTS \\"lesson_progress\\" (\\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 \\"enrollment_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"lesson_id\\" UUID NOT NULL,\\n \\"status\\" TEXT DEFAULT 'not_started',\\n \\"started_at\\" TIMESTAMP,\\n \\"completed_at\\" TIMESTAMP,\\n \\"time_spent_seconds\\" INTEGER NOT NULL DEFAULT 0,\\n \\"attempts\\" INTEGER NOT NULL DEFAULT 0,\\n \\"best_score\\" REAL\\n);","columns":{"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},"enrollment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"enrollments","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"status":{"type":"TEXT","notNull":false,"unique":false,"default":"not_started"},"started_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"completed_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"time_spent_seconds":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"attempts":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"best_score":{"type":"REAL","notNull":false,"unique":false}},"indexes":[{"name":"lesson_progress_tenant_id_enrollment_id_idx","columns":["tenant_id","enrollment_id","lesson_id"],"unique":true},{"name":"lesson_progress_slug_context_idx","columns":["slug","context"]},{"name":"lesson_progress_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lesson_progress_enrollment_id_idx","columns":["enrollment_id"]},{"name":"lesson_progress_learner_id_idx","columns":["learner_id"]},{"name":"lesson_progress_lesson_id_idx","columns":["lesson_id"]}],"version":"36704fbd"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:LessonAsset":{"name":"lessonasset","className":"LessonAsset","qualifiedName":"@happyvertical/smrt-education:LessonAsset","collection":"lessonassets","filePath":"/home/runner/work/smrt/smrt/packages/education/src/lesson-assets.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true,"mode":"optional","field":"tenantId","allowSuperAdminBypass":false}}},"lessonId":{"type":"foreignKey","required":true,"related":"Lesson","_meta":{"required":true}},"assetId":{"type":"crossPackageRef","required":true,"related":"@happyvertical/smrt-assets:Asset"},"relationship":{"type":"text","required":true,"default":"attachment","_meta":{"required":true},"enum":["printable","answer-key","video","attachment"]},"sortOrder":{"type":"integer","required":true,"default":0}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"lesson_assets","conflictColumns":["tenant_id","lesson_id","asset_id","relationship"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"optional"}},"extends":"SmrtObject","exportName":"LessonAsset","collectionExportName":"LessonAssetCollection","validationRules":[{"field":"lessonId","rule":"required","fieldType":"foreignKey"},{"field":"assetId","rule":"required","fieldType":"crossPackageRef"},{"field":"relationship","rule":"required","fieldType":"text"},{"field":"sortOrder","rule":"required","fieldType":"integer"}],"schema":{"tableName":"lesson_assets","ddl":"CREATE TABLE IF NOT EXISTS \\"lesson_assets\\" (\\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,\\n \\"lesson_id\\" UUID NOT NULL,\\n \\"asset_id\\" UUID NOT NULL,\\n \\"relationship\\" TEXT NOT NULL DEFAULT 'attachment',\\n \\"sort_order\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"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":false,"unique":false},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"relationship":{"type":"TEXT","notNull":true,"unique":false,"default":"attachment"},"sort_order":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"lesson_assets_tenant_id_lesson_id_idx","columns":["tenant_id","lesson_id","asset_id","relationship"],"unique":true,"nullsNotDistinct":true},{"name":"lesson_assets_slug_context_idx","columns":["slug","context"]},{"name":"lesson_assets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lesson_assets_lesson_id_idx","columns":["lesson_id"]},{"name":"lesson_assets_asset_id_idx","columns":["asset_id"]}],"version":"d96385c6"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Submission":{"name":"submission","className":"Submission","qualifiedName":"@happyvertical/smrt-education:Submission","collection":"submissions","description":"Evidence that a learner completed one progress item.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/submissions.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"lessonId":{"type":"foreignKey","required":true,"related":"Lesson","_meta":{"required":true}},"progressId":{"type":"foreignKey","required":true,"related":"LessonProgress","_meta":{"required":true}},"submittedAt":{"type":"text","required":false},"status":{"type":"text","required":false,"default":"captured","enum":["captured","extracting","needs_review","graded","rejected"]},"notes":{"type":"text","required":false},"captureKey":{"type":"text","required":false},"captureDigest":{"type":"text","required":false},"kind":{"type":"text","required":true,"default":"completed_work","_meta":{"required":true},"enum":["blank_reference","completed_work"]},"previousSubmissionId":{"type":"foreignKey","required":false,"related":"Submission","_meta":{"nullable":true}},"intakeItemId":{"type":"text","required":false,"_meta":{"nullable":true}}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableStrategy":"sti","api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context","_meta_type"]},"extends":"SmrtObject","exportName":"Submission","collectionExportName":"SubmissionCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"lessonId","rule":"required","fieldType":"foreignKey"},{"field":"progressId","rule":"required","fieldType":"foreignKey"},{"field":"kind","rule":"required","fieldType":"text"}],"schema":{"tableName":"submissions","ddl":"CREATE TABLE IF NOT EXISTS \\"submissions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"learner_id\\" UUID,\\n \\"lesson_id\\" UUID,\\n \\"progress_id\\" UUID,\\n \\"submitted_at\\" TEXT,\\n \\"status\\" TEXT DEFAULT 'captured',\\n \\"notes\\" TEXT,\\n \\"capture_key\\" TEXT,\\n \\"capture_digest\\" TEXT,\\n \\"kind\\" TEXT DEFAULT 'completed_work',\\n \\"previous_submission_id\\" UUID,\\n \\"intake_item_id\\" TEXT,\\n \\"page_count\\" INTEGER DEFAULT 0,\\n \\"ocr_text\\" TEXT,\\n \\"extracted\\" TEXT,\\n \\"reported_by\\" TEXT DEFAULT 'learner',\\n \\"evidence_url\\" TEXT,\\n \\"reported_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"progress_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lesson_progress","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submitted_at":{"type":"TEXT","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"captured"},"notes":{"type":"TEXT","notNull":false},"capture_key":{"type":"TEXT","notNull":false},"capture_digest":{"type":"TEXT","notNull":false},"kind":{"type":"TEXT","notNull":false,"default":"completed_work"},"previous_submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_item_id":{"type":"TEXT","notNull":false},"page_count":{"type":"INTEGER","notNull":false,"default":0},"ocr_text":{"type":"TEXT","notNull":false},"extracted":{"type":"TEXT","notNull":false},"reported_by":{"type":"TEXT","notNull":false,"default":"learner"},"evidence_url":{"type":"TEXT","notNull":false},"reported_score":{"type":"REAL","notNull":false}},"indexes":[{"name":"submissions_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"submissions_meta_type_idx","columns":["_meta_type"]},{"name":"submissions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submissions_learner_id_idx","columns":["learner_id"]},{"name":"submissions_lesson_id_idx","columns":["lesson_id"]},{"name":"submissions_progress_id_idx","columns":["progress_id"]},{"name":"submissions_previous_submission_id_idx","columns":["previous_submission_id"]}],"version":"27a21ab4"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:SubmissionIntakeBinding":{"name":"submissionintakebinding","className":"SubmissionIntakeBinding","qualifiedName":"@happyvertical/smrt-education:SubmissionIntakeBinding","collection":"submissionintakebindings","description":"Durable tenant/item claim for trusted ingestion receipts. This separate table keeps ordinary uploads (which have no intake item) out of the uniqueness key.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/submissions.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"intakeItemId":{"type":"text","required":true,"_meta":{"required":true}},"submissionId":{"type":"foreignKey","required":true,"related":"Submission","_meta":{"required":true}}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"submission_intake_bindings","api":false,"mcp":false,"cli":false,"conflictColumns":["tenant_id","intake_item_id"],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"SubmissionIntakeBinding","collectionExportName":"SubmissionIntakeBindingCollection","validationRules":[{"field":"intakeItemId","rule":"required","fieldType":"text"},{"field":"submissionId","rule":"required","fieldType":"foreignKey"}],"schema":{"tableName":"submission_intake_bindings","ddl":"CREATE TABLE IF NOT EXISTS \\"submission_intake_bindings\\" (\\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 \\"intake_item_id\\" TEXT NOT NULL,\\n \\"submission_id\\" UUID NOT NULL\\n);","columns":{"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},"intake_item_id":{"type":"TEXT","notNull":true,"unique":false},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}}},"indexes":[{"name":"submission_intake_bindings_tenant_id_intake_item_id_idx","columns":["tenant_id","intake_item_id"],"unique":true},{"name":"submission_intake_bindings_slug_context_idx","columns":["slug","context"]},{"name":"submission_intake_bindings_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submission_intake_bindings_submission_id_idx","columns":["submission_id"]}],"version":"7102c909"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:ScannedSubmission":{"name":"scannedsubmission","className":"ScannedSubmission","qualifiedName":"@happyvertical/smrt-education:ScannedSubmission","collection":"submissions","description":"Photos or scans of work submitted for review.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/submissions.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"lessonId":{"type":"foreignKey","required":true,"related":"Lesson","_meta":{"required":true}},"progressId":{"type":"foreignKey","required":true,"related":"LessonProgress","_meta":{"required":true}},"submittedAt":{"type":"text","required":false},"status":{"type":"text","required":false,"default":"captured","enum":["captured","extracting","needs_review","graded","rejected"]},"notes":{"type":"text","required":false},"captureKey":{"type":"text","required":false},"captureDigest":{"type":"text","required":false},"kind":{"type":"text","required":true,"default":"completed_work","_meta":{"required":true},"enum":["blank_reference","completed_work"]},"previousSubmissionId":{"type":"foreignKey","required":false,"related":"Submission","_meta":{"nullable":true}},"intakeItemId":{"type":"text","required":false,"_meta":{"nullable":true}},"pageCount":{"type":"integer","required":true,"default":0},"ocrText":{"type":"text","required":false},"extracted":{"type":"text","required":false}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true},"getExtracted":{"name":"getExtracted","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true},"setExtracted":{"name":"setExtracted","async":false,"parameters":[{"name":"value","type":"Record<string, unknown>","optional":false}],"returnType":"void","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"submissions","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Submission","exportName":"ScannedSubmission","collectionExportName":"ScannedSubmissionCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"lessonId","rule":"required","fieldType":"foreignKey"},{"field":"progressId","rule":"required","fieldType":"foreignKey"},{"field":"kind","rule":"required","fieldType":"text"},{"field":"pageCount","rule":"required","fieldType":"integer"}],"schema":{"tableName":"submissions","ddl":"CREATE TABLE IF NOT EXISTS \\"submissions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"learner_id\\" UUID,\\n \\"lesson_id\\" UUID,\\n \\"progress_id\\" UUID,\\n \\"submitted_at\\" TEXT,\\n \\"status\\" TEXT DEFAULT 'captured',\\n \\"notes\\" TEXT,\\n \\"capture_key\\" TEXT,\\n \\"capture_digest\\" TEXT,\\n \\"kind\\" TEXT DEFAULT 'completed_work',\\n \\"previous_submission_id\\" UUID,\\n \\"intake_item_id\\" TEXT,\\n \\"page_count\\" INTEGER DEFAULT 0,\\n \\"ocr_text\\" TEXT,\\n \\"extracted\\" TEXT,\\n \\"reported_by\\" TEXT DEFAULT 'learner',\\n \\"evidence_url\\" TEXT,\\n \\"reported_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"progress_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lesson_progress","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submitted_at":{"type":"TEXT","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"captured"},"notes":{"type":"TEXT","notNull":false},"capture_key":{"type":"TEXT","notNull":false},"capture_digest":{"type":"TEXT","notNull":false},"kind":{"type":"TEXT","notNull":false,"default":"completed_work"},"previous_submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_item_id":{"type":"TEXT","notNull":false},"page_count":{"type":"INTEGER","notNull":false,"default":0},"ocr_text":{"type":"TEXT","notNull":false},"extracted":{"type":"TEXT","notNull":false},"reported_by":{"type":"TEXT","notNull":false,"default":"learner"},"evidence_url":{"type":"TEXT","notNull":false},"reported_score":{"type":"REAL","notNull":false}},"indexes":[{"name":"submissions_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"submissions_meta_type_idx","columns":["_meta_type"]},{"name":"submissions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submissions_learner_id_idx","columns":["learner_id"]},{"name":"submissions_lesson_id_idx","columns":["lesson_id"]},{"name":"submissions_progress_id_idx","columns":["progress_id"]},{"name":"submissions_previous_submission_id_idx","columns":["previous_submission_id"]}],"version":"7c394510"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:ExternalCompletion":{"name":"externalcompletion","className":"ExternalCompletion","qualifiedName":"@happyvertical/smrt-education:ExternalCompletion","collection":"submissions","description":"Completion reported by the learner, guardian, or external source.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/submissions.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"lessonId":{"type":"foreignKey","required":true,"related":"Lesson","_meta":{"required":true}},"progressId":{"type":"foreignKey","required":true,"related":"LessonProgress","_meta":{"required":true}},"submittedAt":{"type":"text","required":false},"status":{"type":"text","required":false,"default":"captured","enum":["captured","extracting","needs_review","graded","rejected"]},"notes":{"type":"text","required":false},"captureKey":{"type":"text","required":false},"captureDigest":{"type":"text","required":false},"kind":{"type":"text","required":true,"default":"completed_work","_meta":{"required":true},"enum":["blank_reference","completed_work"]},"previousSubmissionId":{"type":"foreignKey","required":false,"related":"Submission","_meta":{"nullable":true}},"intakeItemId":{"type":"text","required":false,"_meta":{"nullable":true}},"reportedBy":{"type":"text","required":false,"default":"learner","enum":["learner","guardian","source"]},"evidenceUrl":{"type":"text","required":false},"reportedScore":{"type":"decimal","required":false,"_meta":{}}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"submissions","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Submission","exportName":"ExternalCompletion","collectionExportName":"ExternalCompletionCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"lessonId","rule":"required","fieldType":"foreignKey"},{"field":"progressId","rule":"required","fieldType":"foreignKey"},{"field":"kind","rule":"required","fieldType":"text"}],"schema":{"tableName":"submissions","ddl":"CREATE TABLE IF NOT EXISTS \\"submissions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"learner_id\\" UUID,\\n \\"lesson_id\\" UUID,\\n \\"progress_id\\" UUID,\\n \\"submitted_at\\" TEXT,\\n \\"status\\" TEXT DEFAULT 'captured',\\n \\"notes\\" TEXT,\\n \\"capture_key\\" TEXT,\\n \\"capture_digest\\" TEXT,\\n \\"kind\\" TEXT DEFAULT 'completed_work',\\n \\"previous_submission_id\\" UUID,\\n \\"intake_item_id\\" TEXT,\\n \\"page_count\\" INTEGER DEFAULT 0,\\n \\"ocr_text\\" TEXT,\\n \\"extracted\\" TEXT,\\n \\"reported_by\\" TEXT DEFAULT 'learner',\\n \\"evidence_url\\" TEXT,\\n \\"reported_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"progress_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lesson_progress","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submitted_at":{"type":"TEXT","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"captured"},"notes":{"type":"TEXT","notNull":false},"capture_key":{"type":"TEXT","notNull":false},"capture_digest":{"type":"TEXT","notNull":false},"kind":{"type":"TEXT","notNull":false,"default":"completed_work"},"previous_submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_item_id":{"type":"TEXT","notNull":false},"page_count":{"type":"INTEGER","notNull":false,"default":0},"ocr_text":{"type":"TEXT","notNull":false},"extracted":{"type":"TEXT","notNull":false},"reported_by":{"type":"TEXT","notNull":false,"default":"learner"},"evidence_url":{"type":"TEXT","notNull":false},"reported_score":{"type":"REAL","notNull":false}},"indexes":[{"name":"submissions_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"submissions_meta_type_idx","columns":["_meta_type"]},{"name":"submissions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submissions_learner_id_idx","columns":["learner_id"]},{"name":"submissions_lesson_id_idx","columns":["lesson_id"]},{"name":"submissions_progress_id_idx","columns":["progress_id"]},{"name":"submissions_previous_submission_id_idx","columns":["previous_submission_id"]}],"version":"eff3715d"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Attestation":{"name":"attestation","className":"Attestation","qualifiedName":"@happyvertical/smrt-education:Attestation","collection":"submissions","description":"A guardian's statement that work was completed.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/submissions.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"lessonId":{"type":"foreignKey","required":true,"related":"Lesson","_meta":{"required":true}},"progressId":{"type":"foreignKey","required":true,"related":"LessonProgress","_meta":{"required":true}},"submittedAt":{"type":"text","required":false},"status":{"type":"text","required":false,"default":"captured","enum":["captured","extracting","needs_review","graded","rejected"]},"notes":{"type":"text","required":false},"captureKey":{"type":"text","required":false},"captureDigest":{"type":"text","required":false},"kind":{"type":"text","required":true,"default":"completed_work","_meta":{"required":true},"enum":["blank_reference","completed_work"]},"previousSubmissionId":{"type":"foreignKey","required":false,"related":"Submission","_meta":{"nullable":true}},"intakeItemId":{"type":"text","required":false,"_meta":{"nullable":true}}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"submissions","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Submission","exportName":"Attestation","collectionExportName":"AttestationCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"lessonId","rule":"required","fieldType":"foreignKey"},{"field":"progressId","rule":"required","fieldType":"foreignKey"},{"field":"kind","rule":"required","fieldType":"text"}],"schema":{"tableName":"submissions","ddl":"CREATE TABLE IF NOT EXISTS \\"submissions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"learner_id\\" UUID,\\n \\"lesson_id\\" UUID,\\n \\"progress_id\\" UUID,\\n \\"submitted_at\\" TEXT,\\n \\"status\\" TEXT DEFAULT 'captured',\\n \\"notes\\" TEXT,\\n \\"capture_key\\" TEXT,\\n \\"capture_digest\\" TEXT,\\n \\"kind\\" TEXT DEFAULT 'completed_work',\\n \\"previous_submission_id\\" UUID,\\n \\"intake_item_id\\" TEXT,\\n \\"page_count\\" INTEGER DEFAULT 0,\\n \\"ocr_text\\" TEXT,\\n \\"extracted\\" TEXT,\\n \\"reported_by\\" TEXT DEFAULT 'learner',\\n \\"evidence_url\\" TEXT,\\n \\"reported_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"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":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"progress_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lesson_progress","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submitted_at":{"type":"TEXT","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"captured"},"notes":{"type":"TEXT","notNull":false},"capture_key":{"type":"TEXT","notNull":false},"capture_digest":{"type":"TEXT","notNull":false},"kind":{"type":"TEXT","notNull":false,"default":"completed_work"},"previous_submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_item_id":{"type":"TEXT","notNull":false},"page_count":{"type":"INTEGER","notNull":false,"default":0},"ocr_text":{"type":"TEXT","notNull":false},"extracted":{"type":"TEXT","notNull":false},"reported_by":{"type":"TEXT","notNull":false,"default":"learner"},"evidence_url":{"type":"TEXT","notNull":false},"reported_score":{"type":"REAL","notNull":false}},"indexes":[{"name":"submissions_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"submissions_meta_type_idx","columns":["_meta_type"]},{"name":"submissions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submissions_learner_id_idx","columns":["learner_id"]},{"name":"submissions_lesson_id_idx","columns":["lesson_id"]},{"name":"submissions_progress_id_idx","columns":["progress_id"]},{"name":"submissions_previous_submission_id_idx","columns":["previous_submission_id"]}],"version":"4f3230a3"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:SubmissionAsset":{"name":"submissionasset","className":"SubmissionAsset","qualifiedName":"@happyvertical/smrt-education:SubmissionAsset","collection":"submissionassets","description":"The tenant-owned files attached to a submission.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/submissions.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"submissionId":{"type":"foreignKey","required":true,"related":"Submission","_meta":{"required":true}},"assetId":{"type":"crossPackageRef","required":true,"related":"@happyvertical/smrt-assets:Asset"},"relationship":{"type":"text","required":true,"default":"page","_meta":{"required":true},"enum":["page","attachment"]},"sortOrder":{"type":"integer","required":true,"default":0}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"submission_assets","conflictColumns":["tenant_id","submission_id","asset_id","relationship"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"SubmissionAsset","collectionExportName":"SubmissionAssetCollection","validationRules":[{"field":"submissionId","rule":"required","fieldType":"foreignKey"},{"field":"assetId","rule":"required","fieldType":"crossPackageRef"},{"field":"relationship","rule":"required","fieldType":"text"},{"field":"sortOrder","rule":"required","fieldType":"integer"}],"schema":{"tableName":"submission_assets","ddl":"CREATE TABLE IF NOT EXISTS \\"submission_assets\\" (\\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 \\"submission_id\\" UUID NOT NULL,\\n \\"asset_id\\" UUID NOT NULL,\\n \\"relationship\\" TEXT NOT NULL DEFAULT 'page',\\n \\"sort_order\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"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},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"relationship":{"type":"TEXT","notNull":true,"unique":false,"default":"page"},"sort_order":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"submission_assets_tenant_id_submission_id_idx","columns":["tenant_id","submission_id","asset_id","relationship"],"unique":true},{"name":"submission_assets_slug_context_idx","columns":["slug","context"]},{"name":"submission_assets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submission_assets_submission_id_idx","columns":["submission_id"]},{"name":"submission_assets_asset_id_idx","columns":["asset_id"]}],"version":"d9b61c8a"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Grade":{"name":"grade","className":"Grade","qualifiedName":"@happyvertical/smrt-education:Grade","collection":"grades","description":"An assessment of a submission; the service selects the authoritative grade.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/submissions.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"submissionId":{"type":"foreignKey","required":true,"related":"Submission","_meta":{"required":true}},"graderKind":{"type":"text","required":true,"default":"auto","_meta":{"required":true},"enum":["auto","ai","guardian","instructor"]},"graderProfileId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-profiles:Profile","_meta":{"nullable":true}},"score":{"type":"decimal","required":false,"_meta":{"nullable":true}},"pointsEarned":{"type":"integer","required":false,"_meta":{"nullable":true}},"pointsPossible":{"type":"integer","required":false,"_meta":{"nullable":true}},"rubricResults":{"type":"text","required":false},"feedback":{"type":"text","required":false},"gradedAt":{"type":"text","required":false}},"methods":{"getRubricResults":{"name":"getRubricResults","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true},"setRubricResults":{"name":"setRubricResults","async":false,"parameters":[{"name":"value","type":"Record<string, unknown>","optional":false}],"returnType":"void","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"Grade","collectionExportName":"GradeCollection","validationRules":[{"field":"submissionId","rule":"required","fieldType":"foreignKey"},{"field":"graderKind","rule":"required","fieldType":"text"}],"schema":{"tableName":"grades","ddl":"CREATE TABLE IF NOT EXISTS \\"grades\\" (\\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 \\"submission_id\\" UUID NOT NULL,\\n \\"grader_kind\\" TEXT NOT NULL DEFAULT 'auto',\\n \\"grader_profile_id\\" UUID,\\n \\"score\\" REAL,\\n \\"points_earned\\" INTEGER,\\n \\"points_possible\\" INTEGER,\\n \\"rubric_results\\" TEXT,\\n \\"feedback\\" TEXT,\\n \\"graded_at\\" TEXT\\n);","columns":{"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},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"grader_kind":{"type":"TEXT","notNull":true,"unique":false,"default":"auto"},"grader_profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"score":{"type":"REAL","notNull":false,"unique":false},"points_earned":{"type":"INTEGER","notNull":false,"unique":false},"points_possible":{"type":"INTEGER","notNull":false,"unique":false},"rubric_results":{"type":"TEXT","notNull":false,"unique":false},"feedback":{"type":"TEXT","notNull":false,"unique":false},"graded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"grades_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"grades_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"grades_submission_id_idx","columns":["submission_id"]},{"name":"grades_grader_profile_id_idx","columns":["grader_profile_id"]}],"version":"7d629fec"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Workbook":{"name":"workbook","className":"Workbook","qualifiedName":"@happyvertical/smrt-education:Workbook","collection":"workbooks","description":"Education-owned private workbook record. Mutations go through WorkbookService.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"workbookKey":{"type":"text","required":false},"title":{"type":"text","required":false},"edition":{"type":"text","required":false},"reviewRequired":{"type":"boolean","required":true,"default":true},"policyVersion":{"type":"integer","required":true,"default":1}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbooks","conflictColumns":["tenant_id","learner_id","workbook_key"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"Workbook","collectionExportName":"WorkbookCollection","displayLabelField":"title","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"reviewRequired","rule":"required","fieldType":"boolean"},{"field":"policyVersion","rule":"required","fieldType":"integer"}],"schema":{"tableName":"workbooks","ddl":"CREATE TABLE IF NOT EXISTS \\"workbooks\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"workbook_key\\" TEXT,\\n \\"title\\" TEXT,\\n \\"edition\\" TEXT,\\n \\"review_required\\" BOOLEAN NOT NULL DEFAULT TRUE,\\n \\"policy_version\\" INTEGER NOT NULL DEFAULT 1\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"workbook_key":{"type":"TEXT","notNull":false,"unique":false},"title":{"type":"TEXT","notNull":false,"unique":false},"edition":{"type":"TEXT","notNull":false,"unique":false},"review_required":{"type":"BOOLEAN","notNull":true,"unique":false,"default":true},"policy_version":{"type":"INTEGER","notNull":true,"unique":false,"default":1}},"indexes":[{"name":"workbooks_tenant_id_learner_id_idx","columns":["tenant_id","learner_id","workbook_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbooks_slug_context_idx","columns":["slug","context"]},{"name":"workbooks_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbooks_learner_id_idx","columns":["learner_id"]}],"version":"a5b56a39"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookCollection":{"name":"workbookcollection","className":"WorkbookCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookCollection","collection":"workbooks","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbooks","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Workbook","exportName":"WorkbookCollection","collectionExportName":"WorkbookCollectionCollection","schema":{"tableName":"workbooks","ddl":"CREATE TABLE IF NOT EXISTS \\"workbooks\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"workbook_key\\" TEXT,\\n \\"title\\" TEXT,\\n \\"edition\\" TEXT,\\n \\"review_required\\" BOOLEAN NOT NULL DEFAULT TRUE,\\n \\"policy_version\\" INTEGER NOT NULL DEFAULT 1\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"workbook_key":{"type":"TEXT","notNull":false,"unique":false},"title":{"type":"TEXT","notNull":false,"unique":false},"edition":{"type":"TEXT","notNull":false,"unique":false},"review_required":{"type":"BOOLEAN","notNull":true,"unique":false,"default":true},"policy_version":{"type":"INTEGER","notNull":true,"unique":false,"default":1}},"indexes":[{"name":"workbooks_tenant_id_learner_id_idx","columns":["tenant_id","learner_id","workbook_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbooks_slug_context_idx","columns":["slug","context"]},{"name":"workbooks_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbooks_learner_id_idx","columns":["learner_id"]}],"version":"a5b56a39"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookActivity":{"name":"workbookactivity","className":"WorkbookActivity","qualifiedName":"@happyvertical/smrt-education:WorkbookActivity","collection":"workbookactivities","description":"Education-owned private workbook record. Mutations go through WorkbookService.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"workbookId":{"type":"foreignKey","required":false,"related":"Workbook","_meta":{"nullable":true}},"captureKind":{"type":"text","required":true,"default":"identified","_meta":{"required":true,"default":"identified"}},"photoIntakeId":{"type":"foreignKey","required":false,"related":"WorkbookPhotoIntake","_meta":{"nullable":true}},"enrollmentId":{"type":"foreignKey","required":true,"related":"Enrollment","_meta":{"required":true}},"lessonId":{"type":"foreignKey","required":true,"related":"Lesson","_meta":{"required":true}},"pageKey":{"type":"text","required":false},"pageLabel":{"type":"text","required":false}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_activities","conflictColumns":["tenant_id","workbook_id","page_key"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookActivity","collectionExportName":"WorkbookActivityCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"captureKind","rule":"required","fieldType":"text"},{"field":"enrollmentId","rule":"required","fieldType":"foreignKey"},{"field":"lessonId","rule":"required","fieldType":"foreignKey"}],"schema":{"tableName":"workbook_activities","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_activities\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"workbook_id\\" UUID,\\n \\"capture_kind\\" TEXT NOT NULL DEFAULT 'identified',\\n \\"photo_intake_id\\" UUID,\\n \\"enrollment_id\\" UUID NOT NULL,\\n \\"lesson_id\\" UUID NOT NULL,\\n \\"page_key\\" TEXT,\\n \\"page_label\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"workbook_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbooks","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"capture_kind":{"type":"TEXT","notNull":true,"unique":false,"default":"identified"},"photo_intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_photo_intakes","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"enrollment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"enrollments","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"page_key":{"type":"TEXT","notNull":false,"unique":false},"page_label":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_activities_tenant_id_workbook_id_idx","columns":["tenant_id","workbook_id","page_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_activities_slug_context_idx","columns":["slug","context"]},{"name":"workbook_activities_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_activities_learner_id_idx","columns":["learner_id"]},{"name":"workbook_activities_workbook_id_idx","columns":["workbook_id"]},{"name":"workbook_activities_photo_intake_id_idx","columns":["photo_intake_id"]},{"name":"workbook_activities_enrollment_id_idx","columns":["enrollment_id"]},{"name":"workbook_activities_lesson_id_idx","columns":["lesson_id"]}],"version":"320c8eb0"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookActivityCollection":{"name":"workbookactivitycollection","className":"WorkbookActivityCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookActivityCollection","collection":"workbookactivities","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_activities","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookActivity","exportName":"WorkbookActivityCollection","collectionExportName":"WorkbookActivityCollectionCollection","schema":{"tableName":"workbook_activities","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_activities\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"workbook_id\\" UUID,\\n \\"capture_kind\\" TEXT NOT NULL DEFAULT 'identified',\\n \\"photo_intake_id\\" UUID,\\n \\"enrollment_id\\" UUID NOT NULL,\\n \\"lesson_id\\" UUID NOT NULL,\\n \\"page_key\\" TEXT,\\n \\"page_label\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"workbook_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbooks","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"capture_kind":{"type":"TEXT","notNull":true,"unique":false,"default":"identified"},"photo_intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_photo_intakes","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"enrollment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"enrollments","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"page_key":{"type":"TEXT","notNull":false,"unique":false},"page_label":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_activities_tenant_id_workbook_id_idx","columns":["tenant_id","workbook_id","page_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_activities_slug_context_idx","columns":["slug","context"]},{"name":"workbook_activities_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_activities_learner_id_idx","columns":["learner_id"]},{"name":"workbook_activities_workbook_id_idx","columns":["workbook_id"]},{"name":"workbook_activities_photo_intake_id_idx","columns":["photo_intake_id"]},{"name":"workbook_activities_enrollment_id_idx","columns":["enrollment_id"]},{"name":"workbook_activities_lesson_id_idx","columns":["lesson_id"]}],"version":"320c8eb0"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookWorkFiling":{"name":"workbookworkfiling","className":"WorkbookWorkFiling","qualifiedName":"@happyvertical/smrt-education:WorkbookWorkFiling","collection":"workbookworkfilings","description":"Append-only association; the source work unit and its routing never move.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"sourceActivityId":{"type":"foreignKey","required":true,"related":"WorkbookActivity","_meta":{"required":true}},"workbookId":{"type":"foreignKey","required":true,"related":"Workbook","_meta":{"required":true}},"canonicalActivityId":{"type":"foreignKey","required":false,"related":"WorkbookActivity","_meta":{"nullable":true}},"previousRevisionId":{"type":"foreignKey","required":false,"related":"WorkbookWorkFiling","_meta":{"nullable":true}},"actorUserId":{"type":"text","required":false},"requestKey":{"type":"text","required":false},"reason":{"type":"text","required":false},"digest":{"type":"text","required":false}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_work_filings","conflictColumns":["tenant_id","source_activity_id","request_key"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookWorkFiling","collectionExportName":"WorkbookWorkFilingCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"sourceActivityId","rule":"required","fieldType":"foreignKey"},{"field":"workbookId","rule":"required","fieldType":"foreignKey"}],"schema":{"tableName":"workbook_work_filings","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_work_filings\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"source_activity_id\\" UUID NOT NULL,\\n \\"workbook_id\\" UUID NOT NULL,\\n \\"canonical_activity_id\\" UUID,\\n \\"previous_revision_id\\" UUID,\\n \\"actor_user_id\\" TEXT,\\n \\"request_key\\" TEXT,\\n \\"reason\\" TEXT,\\n \\"digest\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"source_activity_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_activities","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"workbook_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbooks","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"canonical_activity_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_activities","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"previous_revision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_work_filings","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"request_key":{"type":"TEXT","notNull":false,"unique":false},"reason":{"type":"TEXT","notNull":false,"unique":false},"digest":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_work_filings_tenant_id_source_activity_id_idx","columns":["tenant_id","source_activity_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_work_filings_slug_context_idx","columns":["slug","context"]},{"name":"workbook_work_filings_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_work_filings_learner_id_idx","columns":["learner_id"]},{"name":"workbook_work_filings_source_activity_id_idx","columns":["source_activity_id"]},{"name":"workbook_work_filings_workbook_id_idx","columns":["workbook_id"]},{"name":"workbook_work_filings_canonical_activity_id_idx","columns":["canonical_activity_id"]},{"name":"workbook_work_filings_previous_revision_id_idx","columns":["previous_revision_id"]}],"version":"03e989a0"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookWorkFilingCollection":{"name":"workbookworkfilingcollection","className":"WorkbookWorkFilingCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookWorkFilingCollection","collection":"workbookworkfilings","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_work_filings","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookWorkFiling","exportName":"WorkbookWorkFilingCollection","collectionExportName":"WorkbookWorkFilingCollectionCollection","schema":{"tableName":"workbook_work_filings","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_work_filings\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"source_activity_id\\" UUID NOT NULL,\\n \\"workbook_id\\" UUID NOT NULL,\\n \\"canonical_activity_id\\" UUID,\\n \\"previous_revision_id\\" UUID,\\n \\"actor_user_id\\" TEXT,\\n \\"request_key\\" TEXT,\\n \\"reason\\" TEXT,\\n \\"digest\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"source_activity_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_activities","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"workbook_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbooks","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"canonical_activity_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_activities","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"previous_revision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_work_filings","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"request_key":{"type":"TEXT","notNull":false,"unique":false},"reason":{"type":"TEXT","notNull":false,"unique":false},"digest":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_work_filings_tenant_id_source_activity_id_idx","columns":["tenant_id","source_activity_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_work_filings_slug_context_idx","columns":["slug","context"]},{"name":"workbook_work_filings_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_work_filings_learner_id_idx","columns":["learner_id"]},{"name":"workbook_work_filings_source_activity_id_idx","columns":["source_activity_id"]},{"name":"workbook_work_filings_workbook_id_idx","columns":["workbook_id"]},{"name":"workbook_work_filings_canonical_activity_id_idx","columns":["canonical_activity_id"]},{"name":"workbook_work_filings_previous_revision_id_idx","columns":["previous_revision_id"]}],"version":"03e989a0"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookAttempt":{"name":"workbookattempt","className":"WorkbookAttempt","qualifiedName":"@happyvertical/smrt-education:WorkbookAttempt","collection":"workbookattempts","description":"Education-owned private workbook record. Mutations go through WorkbookService.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"activityId":{"type":"foreignKey","required":true,"related":"WorkbookActivity","_meta":{"required":true}},"submissionId":{"type":"foreignKey","required":true,"related":"Submission","_meta":{"required":true}},"previousAttemptId":{"type":"foreignKey","required":false,"related":"WorkbookAttempt","_meta":{"nullable":true}},"capturedAt":{"type":"text","required":false},"episodeId":{"type":"text","required":false},"reviewRequired":{"type":"boolean","required":true,"default":true},"policyVersion":{"type":"integer","required":true,"default":1},"assistance":{"type":"text","required":false},"actorUserId":{"type":"text","required":false},"sourceHashes":{"type":"text","required":false,"_meta":{}}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_attempts","conflictColumns":["tenant_id","submission_id"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookAttempt","collectionExportName":"WorkbookAttemptCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"activityId","rule":"required","fieldType":"foreignKey"},{"field":"submissionId","rule":"required","fieldType":"foreignKey"},{"field":"reviewRequired","rule":"required","fieldType":"boolean"},{"field":"policyVersion","rule":"required","fieldType":"integer"}],"schema":{"tableName":"workbook_attempts","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_attempts\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"activity_id\\" UUID NOT NULL,\\n \\"submission_id\\" UUID NOT NULL,\\n \\"previous_attempt_id\\" UUID,\\n \\"captured_at\\" TEXT,\\n \\"episode_id\\" TEXT,\\n \\"review_required\\" BOOLEAN NOT NULL DEFAULT TRUE,\\n \\"policy_version\\" INTEGER NOT NULL DEFAULT 1,\\n \\"assistance\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"source_hashes\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"activity_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_activities","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"previous_attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"captured_at":{"type":"TEXT","notNull":false,"unique":false},"episode_id":{"type":"TEXT","notNull":false,"unique":false},"review_required":{"type":"BOOLEAN","notNull":true,"unique":false,"default":true},"policy_version":{"type":"INTEGER","notNull":true,"unique":false,"default":1},"assistance":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"source_hashes":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_attempts_tenant_id_submission_id_idx","columns":["tenant_id","submission_id"],"unique":true},{"name":"workbook_attempts_slug_context_idx","columns":["slug","context"]},{"name":"workbook_attempts_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_attempts_learner_id_idx","columns":["learner_id"]},{"name":"workbook_attempts_activity_id_idx","columns":["activity_id"]},{"name":"workbook_attempts_submission_id_idx","columns":["submission_id"]},{"name":"workbook_attempts_previous_attempt_id_idx","columns":["previous_attempt_id"]}],"version":"bd9cdd9f"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookAttemptCollection":{"name":"workbookattemptcollection","className":"WorkbookAttemptCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookAttemptCollection","collection":"workbookattempts","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_attempts","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookAttempt","exportName":"WorkbookAttemptCollection","collectionExportName":"WorkbookAttemptCollectionCollection","schema":{"tableName":"workbook_attempts","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_attempts\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"activity_id\\" UUID NOT NULL,\\n \\"submission_id\\" UUID NOT NULL,\\n \\"previous_attempt_id\\" UUID,\\n \\"captured_at\\" TEXT,\\n \\"episode_id\\" TEXT,\\n \\"review_required\\" BOOLEAN NOT NULL DEFAULT TRUE,\\n \\"policy_version\\" INTEGER NOT NULL DEFAULT 1,\\n \\"assistance\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"source_hashes\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"activity_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_activities","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"previous_attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"captured_at":{"type":"TEXT","notNull":false,"unique":false},"episode_id":{"type":"TEXT","notNull":false,"unique":false},"review_required":{"type":"BOOLEAN","notNull":true,"unique":false,"default":true},"policy_version":{"type":"INTEGER","notNull":true,"unique":false,"default":1},"assistance":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"source_hashes":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_attempts_tenant_id_submission_id_idx","columns":["tenant_id","submission_id"],"unique":true},{"name":"workbook_attempts_slug_context_idx","columns":["slug","context"]},{"name":"workbook_attempts_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_attempts_learner_id_idx","columns":["learner_id"]},{"name":"workbook_attempts_activity_id_idx","columns":["activity_id"]},{"name":"workbook_attempts_submission_id_idx","columns":["submission_id"]},{"name":"workbook_attempts_previous_attempt_id_idx","columns":["previous_attempt_id"]}],"version":"bd9cdd9f"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookAssessmentRevision":{"name":"workbookassessmentrevision","className":"WorkbookAssessmentRevision","qualifiedName":"@happyvertical/smrt-education:WorkbookAssessmentRevision","collection":"workbookassessmentrevisions","description":"Education-owned private workbook record. Mutations go through WorkbookService.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"attemptId":{"type":"foreignKey","required":true,"related":"WorkbookAttempt","_meta":{"required":true}},"requestKey":{"type":"text","required":false},"requestDigest":{"type":"text","required":false},"kind":{"type":"text","required":false},"actorUserId":{"type":"text","required":false},"sourceRevisionId":{"type":"foreignKey","required":false,"related":"WorkbookAssessmentRevision","_meta":{"nullable":true}},"decisionReason":{"type":"text","required":false},"supersedesId":{"type":"foreignKey","required":false,"related":"WorkbookAssessmentRevision","_meta":{"nullable":true}},"assessmentJson":{"type":"text","required":false,"_meta":{}},"recordedAt":{"type":"text","required":false}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_assessment_revisions","conflictColumns":["tenant_id","attempt_id","request_key"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookAssessmentRevision","collectionExportName":"WorkbookAssessmentRevisionCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"attemptId","rule":"required","fieldType":"foreignKey"}],"schema":{"tableName":"workbook_assessment_revisions","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_assessment_revisions\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"attempt_id\\" UUID NOT NULL,\\n \\"request_key\\" TEXT,\\n \\"request_digest\\" TEXT,\\n \\"kind\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"source_revision_id\\" UUID,\\n \\"decision_reason\\" TEXT,\\n \\"supersedes_id\\" UUID,\\n \\"assessment_json\\" TEXT,\\n \\"recorded_at\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":false,"unique":false},"request_digest":{"type":"TEXT","notNull":false,"unique":false},"kind":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"source_revision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"decision_reason":{"type":"TEXT","notNull":false,"unique":false},"supersedes_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"assessment_json":{"type":"TEXT","notNull":false,"unique":false},"recorded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_assessment_revisions_tenant_id_attempt_id_idx","columns":["tenant_id","attempt_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_assessment_revisions_slug_context_idx","columns":["slug","context"]},{"name":"workbook_assessment_revisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_assessment_revisions_learner_id_idx","columns":["learner_id"]},{"name":"workbook_assessment_revisions_attempt_id_idx","columns":["attempt_id"]},{"name":"workbook_assessment_revisions_source_revision_id_idx","columns":["source_revision_id"]},{"name":"workbook_assessment_revisions_supersedes_id_idx","columns":["supersedes_id"]}],"version":"94b2bd33"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookAssessmentRevisionCollection":{"name":"workbookassessmentrevisioncollection","className":"WorkbookAssessmentRevisionCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookAssessmentRevisionCollection","collection":"workbookassessmentrevisions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_assessment_revisions","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookAssessmentRevision","exportName":"WorkbookAssessmentRevisionCollection","collectionExportName":"WorkbookAssessmentRevisionCollectionCollection","schema":{"tableName":"workbook_assessment_revisions","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_assessment_revisions\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"attempt_id\\" UUID NOT NULL,\\n \\"request_key\\" TEXT,\\n \\"request_digest\\" TEXT,\\n \\"kind\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"source_revision_id\\" UUID,\\n \\"decision_reason\\" TEXT,\\n \\"supersedes_id\\" UUID,\\n \\"assessment_json\\" TEXT,\\n \\"recorded_at\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":false,"unique":false},"request_digest":{"type":"TEXT","notNull":false,"unique":false},"kind":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"source_revision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"decision_reason":{"type":"TEXT","notNull":false,"unique":false},"supersedes_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"assessment_json":{"type":"TEXT","notNull":false,"unique":false},"recorded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_assessment_revisions_tenant_id_attempt_id_idx","columns":["tenant_id","attempt_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_assessment_revisions_slug_context_idx","columns":["slug","context"]},{"name":"workbook_assessment_revisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_assessment_revisions_learner_id_idx","columns":["learner_id"]},{"name":"workbook_assessment_revisions_attempt_id_idx","columns":["attempt_id"]},{"name":"workbook_assessment_revisions_source_revision_id_idx","columns":["source_revision_id"]},{"name":"workbook_assessment_revisions_supersedes_id_idx","columns":["supersedes_id"]}],"version":"94b2bd33"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookFeedbackRelease":{"name":"workbookfeedbackrelease","className":"WorkbookFeedbackRelease","qualifiedName":"@happyvertical/smrt-education:WorkbookFeedbackRelease","collection":"workbookfeedbackreleases","description":"Education-owned private workbook record. Mutations go through WorkbookService.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"attemptId":{"type":"foreignKey","required":true,"related":"WorkbookAttempt","_meta":{"required":true}},"revisionId":{"type":"foreignKey","required":true,"related":"WorkbookAssessmentRevision","_meta":{"required":true}},"expectedHeadId":{"type":"foreignKey","required":false,"related":"WorkbookAssessmentRevision","_meta":{"nullable":true}},"requestKey":{"type":"text","required":false},"actorUserId":{"type":"text","required":false},"recordedAt":{"type":"text","required":false}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_feedback_releases","conflictColumns":["tenant_id","attempt_id","request_key"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookFeedbackRelease","collectionExportName":"WorkbookFeedbackReleaseCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"attemptId","rule":"required","fieldType":"foreignKey"},{"field":"revisionId","rule":"required","fieldType":"foreignKey"}],"schema":{"tableName":"workbook_feedback_releases","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_feedback_releases\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"attempt_id\\" UUID NOT NULL,\\n \\"revision_id\\" UUID NOT NULL,\\n \\"expected_head_id\\" UUID,\\n \\"request_key\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"recorded_at\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"revision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"expected_head_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"recorded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_feedback_releases_tenant_id_attempt_id_idx","columns":["tenant_id","attempt_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_feedback_releases_slug_context_idx","columns":["slug","context"]},{"name":"workbook_feedback_releases_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_feedback_releases_learner_id_idx","columns":["learner_id"]},{"name":"workbook_feedback_releases_attempt_id_idx","columns":["attempt_id"]},{"name":"workbook_feedback_releases_revision_id_idx","columns":["revision_id"]},{"name":"workbook_feedback_releases_expected_head_id_idx","columns":["expected_head_id"]}],"version":"ebe23baf"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookFeedbackReleaseCollection":{"name":"workbookfeedbackreleasecollection","className":"WorkbookFeedbackReleaseCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookFeedbackReleaseCollection","collection":"workbookfeedbackreleases","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_feedback_releases","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookFeedbackRelease","exportName":"WorkbookFeedbackReleaseCollection","collectionExportName":"WorkbookFeedbackReleaseCollectionCollection","schema":{"tableName":"workbook_feedback_releases","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_feedback_releases\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"attempt_id\\" UUID NOT NULL,\\n \\"revision_id\\" UUID NOT NULL,\\n \\"expected_head_id\\" UUID,\\n \\"request_key\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"recorded_at\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"revision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"expected_head_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"recorded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_feedback_releases_tenant_id_attempt_id_idx","columns":["tenant_id","attempt_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_feedback_releases_slug_context_idx","columns":["slug","context"]},{"name":"workbook_feedback_releases_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_feedback_releases_learner_id_idx","columns":["learner_id"]},{"name":"workbook_feedback_releases_attempt_id_idx","columns":["attempt_id"]},{"name":"workbook_feedback_releases_revision_id_idx","columns":["revision_id"]},{"name":"workbook_feedback_releases_expected_head_id_idx","columns":["expected_head_id"]}],"version":"ebe23baf"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookFeedbackDelivery":{"name":"workbookfeedbackdelivery","className":"WorkbookFeedbackDelivery","qualifiedName":"@happyvertical/smrt-education:WorkbookFeedbackDelivery","collection":"workbookfeedbackdeliveries","description":"Authenticated delivery acknowledgment; this does not assert comprehension.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"attemptId":{"type":"foreignKey","required":true,"related":"WorkbookAttempt","_meta":{"required":true}},"revisionId":{"type":"foreignKey","required":true,"related":"WorkbookAssessmentRevision","_meta":{"required":true}},"actorUserId":{"type":"text","required":false},"requestKey":{"type":"text","required":false},"recordedAt":{"type":"text","required":false}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true},"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_feedback_deliveries","conflictColumns":["tenant_id","attempt_id","actor_user_id","revision_id"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookFeedbackDelivery","collectionExportName":"WorkbookFeedbackDeliveryCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"attemptId","rule":"required","fieldType":"foreignKey"},{"field":"revisionId","rule":"required","fieldType":"foreignKey"}],"schema":{"tableName":"workbook_feedback_deliveries","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_feedback_deliveries\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"attempt_id\\" UUID NOT NULL,\\n \\"revision_id\\" UUID NOT NULL,\\n \\"actor_user_id\\" TEXT,\\n \\"request_key\\" TEXT,\\n \\"recorded_at\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"revision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"request_key":{"type":"TEXT","notNull":false,"unique":false},"recorded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_feedback_deliveries_tenant_id_attempt_id_idx","columns":["tenant_id","attempt_id","actor_user_id","revision_id"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_feedback_deliveries_slug_context_idx","columns":["slug","context"]},{"name":"workbook_feedback_deliveries_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_feedback_deliveries_learner_id_idx","columns":["learner_id"]},{"name":"workbook_feedback_deliveries_attempt_id_idx","columns":["attempt_id"]},{"name":"workbook_feedback_deliveries_revision_id_idx","columns":["revision_id"]}],"version":"37bfd434"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookFeedbackDeliveryCollection":{"name":"workbookfeedbackdeliverycollection","className":"WorkbookFeedbackDeliveryCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookFeedbackDeliveryCollection","collection":"workbookfeedbackdeliveries","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_feedback_deliveries","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookFeedbackDelivery","exportName":"WorkbookFeedbackDeliveryCollection","collectionExportName":"WorkbookFeedbackDeliveryCollectionCollection","schema":{"tableName":"workbook_feedback_deliveries","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_feedback_deliveries\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"attempt_id\\" UUID NOT NULL,\\n \\"revision_id\\" UUID NOT NULL,\\n \\"actor_user_id\\" TEXT,\\n \\"request_key\\" TEXT,\\n \\"recorded_at\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"revision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"request_key":{"type":"TEXT","notNull":false,"unique":false},"recorded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_feedback_deliveries_tenant_id_attempt_id_idx","columns":["tenant_id","attempt_id","actor_user_id","revision_id"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_feedback_deliveries_slug_context_idx","columns":["slug","context"]},{"name":"workbook_feedback_deliveries_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_feedback_deliveries_learner_id_idx","columns":["learner_id"]},{"name":"workbook_feedback_deliveries_attempt_id_idx","columns":["attempt_id"]},{"name":"workbook_feedback_deliveries_revision_id_idx","columns":["revision_id"]}],"version":"37bfd434"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookPhotoIntake":{"name":"workbookphotointake","className":"WorkbookPhotoIntake","qualifiedName":"@happyvertical/smrt-education:WorkbookPhotoIntake","collection":"workbookphotointakes","description":"Durable receipt before any course, enrollment or activity exists.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-photo-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"familyIntakeId":{"type":"foreignKey","required":false,"related":"FamilyIntake"},"itemId":{"type":"text","required":false},"actorUserId":{"type":"text","required":false},"contentDigest":{"type":"text","required":false}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_photo_intakes","conflictColumns":["tenant_id","item_id"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookPhotoIntake","collectionExportName":"WorkbookPhotoIntakeCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"}],"schema":{"tableName":"workbook_photo_intakes","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_photo_intakes\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"family_intake_id\\" UUID,\\n \\"item_id\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"content_digest\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"family_intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"family_intakes","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"item_id":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"content_digest":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_photo_intakes_tenant_id_item_id_idx","columns":["tenant_id","item_id"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_photo_intakes_slug_context_idx","columns":["slug","context"]},{"name":"workbook_photo_intakes_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_photo_intakes_learner_id_idx","columns":["learner_id"]},{"name":"workbook_photo_intakes_family_intake_id_idx","columns":["family_intake_id"]}],"version":"288020f4"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookPhotoIntakeCollection":{"name":"workbookphotointakecollection","className":"WorkbookPhotoIntakeCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookPhotoIntakeCollection","collection":"workbookphotointakes","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-photo-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_photo_intakes","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookPhotoIntake","exportName":"WorkbookPhotoIntakeCollection","collectionExportName":"WorkbookPhotoIntakeCollectionCollection","schema":{"tableName":"workbook_photo_intakes","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_photo_intakes\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"family_intake_id\\" UUID,\\n \\"item_id\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"content_digest\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"family_intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"family_intakes","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"item_id":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"content_digest":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_photo_intakes_tenant_id_item_id_idx","columns":["tenant_id","item_id"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_photo_intakes_slug_context_idx","columns":["slug","context"]},{"name":"workbook_photo_intakes_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_photo_intakes_learner_id_idx","columns":["learner_id"]},{"name":"workbook_photo_intakes_family_intake_id_idx","columns":["family_intake_id"]}],"version":"288020f4"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookPhotoAsset":{"name":"workbookphotoasset","className":"WorkbookPhotoAsset","qualifiedName":"@happyvertical/smrt-education:WorkbookPhotoAsset","collection":"workbookphotoassets","description":"Sole owner join for original photo intake files.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-photo-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"intakeId":{"type":"foreignKey","required":true,"related":"WorkbookPhotoIntake","_meta":{"required":true}},"assetId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-assets:Asset"},"name":{"type":"text","required":false},"mimeType":{"type":"text","required":false},"sha256":{"type":"text","required":false},"position":{"type":"integer","required":true,"default":0}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_photo_assets","conflictColumns":["tenant_id","intake_id","asset_id"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookPhotoAsset","collectionExportName":"WorkbookPhotoAssetCollection","displayLabelField":"name","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"intakeId","rule":"required","fieldType":"foreignKey"},{"field":"position","rule":"required","fieldType":"integer"}],"schema":{"tableName":"workbook_photo_assets","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_photo_assets\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"intake_id\\" UUID NOT NULL,\\n \\"asset_id\\" UUID,\\n \\"name\\" TEXT,\\n \\"mime_type\\" TEXT,\\n \\"sha256\\" TEXT,\\n \\"position\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_photo_intakes","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"name":{"type":"TEXT","notNull":false,"unique":false},"mime_type":{"type":"TEXT","notNull":false,"unique":false},"sha256":{"type":"TEXT","notNull":false,"unique":false},"position":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"workbook_photo_assets_tenant_id_intake_id_idx","columns":["tenant_id","intake_id","asset_id"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_photo_assets_slug_context_idx","columns":["slug","context"]},{"name":"workbook_photo_assets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_photo_assets_learner_id_idx","columns":["learner_id"]},{"name":"workbook_photo_assets_intake_id_idx","columns":["intake_id"]},{"name":"workbook_photo_assets_asset_id_idx","columns":["asset_id"]}],"version":"9d49acb2"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookPhotoAssetCollection":{"name":"workbookphotoassetcollection","className":"WorkbookPhotoAssetCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookPhotoAssetCollection","collection":"workbookphotoassets","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-photo-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_photo_assets","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookPhotoAsset","exportName":"WorkbookPhotoAssetCollection","collectionExportName":"WorkbookPhotoAssetCollectionCollection","schema":{"tableName":"workbook_photo_assets","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_photo_assets\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"intake_id\\" UUID NOT NULL,\\n \\"asset_id\\" UUID,\\n \\"name\\" TEXT,\\n \\"mime_type\\" TEXT,\\n \\"sha256\\" TEXT,\\n \\"position\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_photo_intakes","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"name":{"type":"TEXT","notNull":false,"unique":false},"mime_type":{"type":"TEXT","notNull":false,"unique":false},"sha256":{"type":"TEXT","notNull":false,"unique":false},"position":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"workbook_photo_assets_tenant_id_intake_id_idx","columns":["tenant_id","intake_id","asset_id"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_photo_assets_slug_context_idx","columns":["slug","context"]},{"name":"workbook_photo_assets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_photo_assets_learner_id_idx","columns":["learner_id"]},{"name":"workbook_photo_assets_intake_id_idx","columns":["intake_id"]},{"name":"workbook_photo_assets_asset_id_idx","columns":["asset_id"]}],"version":"9d49acb2"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookPhotoDecision":{"name":"workbookphotodecision","className":"WorkbookPhotoDecision","qualifiedName":"@happyvertical/smrt-education:WorkbookPhotoDecision","collection":"workbookphotodecisions","description":"Immutable provider/guardian/capture decision, retaining provenance and retry key.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-photo-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"intakeId":{"type":"foreignKey","required":true,"related":"WorkbookPhotoIntake","_meta":{"required":true}},"requestKey":{"type":"text","required":false},"sequence":{"type":"integer","required":true,"default":0},"actorUserId":{"type":"text","required":false},"bodyJson":{"type":"text","required":false,"_meta":{}}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_photo_decisions","conflictColumns":["tenant_id","intake_id","request_key"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookPhotoDecision","collectionExportName":"WorkbookPhotoDecisionCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"intakeId","rule":"required","fieldType":"foreignKey"},{"field":"sequence","rule":"required","fieldType":"integer"}],"schema":{"tableName":"workbook_photo_decisions","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_photo_decisions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"intake_id\\" UUID NOT NULL,\\n \\"request_key\\" TEXT,\\n \\"sequence\\" INTEGER NOT NULL DEFAULT 0,\\n \\"actor_user_id\\" TEXT,\\n \\"body_json\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_photo_intakes","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":false,"unique":false},"sequence":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"body_json":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_photo_decisions_tenant_id_intake_id_idx","columns":["tenant_id","intake_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_photo_decisions_slug_context_idx","columns":["slug","context"]},{"name":"workbook_photo_decisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_photo_decisions_learner_id_idx","columns":["learner_id"]},{"name":"workbook_photo_decisions_intake_id_idx","columns":["intake_id"]}],"version":"4c8b4e5f"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookPhotoDecisionCollection":{"name":"workbookphotodecisioncollection","className":"WorkbookPhotoDecisionCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookPhotoDecisionCollection","collection":"workbookphotodecisions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-photo-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_photo_decisions","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookPhotoDecision","exportName":"WorkbookPhotoDecisionCollection","collectionExportName":"WorkbookPhotoDecisionCollectionCollection","schema":{"tableName":"workbook_photo_decisions","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_photo_decisions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"intake_id\\" UUID NOT NULL,\\n \\"request_key\\" TEXT,\\n \\"sequence\\" INTEGER NOT NULL DEFAULT 0,\\n \\"actor_user_id\\" TEXT,\\n \\"body_json\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_photo_intakes","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":false,"unique":false},"sequence":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"body_json":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_photo_decisions_tenant_id_intake_id_idx","columns":["tenant_id","intake_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_photo_decisions_slug_context_idx","columns":["slug","context"]},{"name":"workbook_photo_decisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_photo_decisions_learner_id_idx","columns":["learner_id"]},{"name":"workbook_photo_decisions_intake_id_idx","columns":["intake_id"]}],"version":"4c8b4e5f"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookContextRevision":{"name":"workbookcontextrevision","className":"WorkbookContextRevision","qualifiedName":"@happyvertical/smrt-education:WorkbookContextRevision","collection":"workbookcontextrevisions","description":"Versioned contextual metadata; never edits Workbook identity or learning evidence.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-photo-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"workbookId":{"type":"foreignKey","required":true,"related":"Workbook","_meta":{"required":true}},"decisionId":{"type":"foreignKey","required":true,"related":"WorkbookPhotoDecision","_meta":{"required":true}},"metadataJson":{"type":"text","required":false,"_meta":{}}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_context_revisions","conflictColumns":["tenant_id","decision_id"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookContextRevision","collectionExportName":"WorkbookContextRevisionCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"workbookId","rule":"required","fieldType":"foreignKey"},{"field":"decisionId","rule":"required","fieldType":"foreignKey"}],"schema":{"tableName":"workbook_context_revisions","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_context_revisions\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"workbook_id\\" UUID NOT NULL,\\n \\"decision_id\\" UUID NOT NULL,\\n \\"metadata_json\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"workbook_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbooks","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"decision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_photo_decisions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"metadata_json":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_context_revisions_tenant_id_decision_id_idx","columns":["tenant_id","decision_id"],"unique":true},{"name":"workbook_context_revisions_slug_context_idx","columns":["slug","context"]},{"name":"workbook_context_revisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_context_revisions_learner_id_idx","columns":["learner_id"]},{"name":"workbook_context_revisions_workbook_id_idx","columns":["workbook_id"]},{"name":"workbook_context_revisions_decision_id_idx","columns":["decision_id"]}],"version":"b1e8b4dc"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookContextRevisionCollection":{"name":"workbookcontextrevisioncollection","className":"WorkbookContextRevisionCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookContextRevisionCollection","collection":"workbookcontextrevisions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-photo-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_context_revisions","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookContextRevision","exportName":"WorkbookContextRevisionCollection","collectionExportName":"WorkbookContextRevisionCollectionCollection","schema":{"tableName":"workbook_context_revisions","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_context_revisions\\" (\\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 \\"learner_id\\" UUID NOT NULL,\\n \\"workbook_id\\" UUID NOT NULL,\\n \\"decision_id\\" UUID NOT NULL,\\n \\"metadata_json\\" TEXT\\n);","columns":{"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},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"workbook_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbooks","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"decision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_photo_decisions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"metadata_json":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_context_revisions_tenant_id_decision_id_idx","columns":["tenant_id","decision_id"],"unique":true},{"name":"workbook_context_revisions_slug_context_idx","columns":["slug","context"]},{"name":"workbook_context_revisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_context_revisions_learner_id_idx","columns":["learner_id"]},{"name":"workbook_context_revisions_workbook_id_idx","columns":["workbook_id"]},{"name":"workbook_context_revisions_decision_id_idx","columns":["decision_id"]}],"version":"b1e8b4dc"},"importPath":"@happyvertical/smrt-education"}},"moduleType":"smrt","recipes":[{"id":"education.catalog","className":"EducationCatalogRecipe","label":"Course catalog","summary":"Organize courses, sections, lessons, and their authorized learning materials.","synonyms":["courses","lessons","curriculum catalog"],"models":["@happyvertical/smrt-education:Course","@happyvertical/smrt-education:CourseSection","@happyvertical/smrt-education:Lesson","@happyvertical/smrt-education:LessonAsset"],"nav":[{"label":"Courses","model":"@happyvertical/smrt-education:Course","icon":"folder","description":"Courses available to this family.","noun":"course"}],"requires":[],"section":{"id":"education","label":"Education","icon":"folder","description":"Courses and lessons for learning."},"help":{"markdown":"# Course catalog\\n\\nManage courses, their sections, and lessons. Private family copies and answer\\nkeys remain visible only through the application\u2019s authorized catalog service.\\n","fieldRefs":[]},"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":"education.learner","className":"EducationLearnerRecipe","label":"Learners","summary":"Plan learner curricula and retain enrollment-scoped progress.","synonyms":["learners","enrollments","learning progress"],"models":["@happyvertical/smrt-education:Learner","@happyvertical/smrt-education:Curriculum","@happyvertical/smrt-education:Enrollment","@happyvertical/smrt-education:LessonProgress"],"nav":[{"label":"Learners","model":"@happyvertical/smrt-education:Learner","icon":"users","description":"Authorized learners in this family.","noun":"learner"}],"requires":[],"section":{"id":"education","label":"Education","icon":"folder","description":"Courses and lessons for learning."},"help":{"markdown":"# Learners\\n\\nUse \`LearnerService\` in an authenticated exact-tenant context to read a learner,\\nplan a curriculum as an authorized guardian, enroll in a visible course, and\\nstart a lesson. Recipe metadata does not expose model CRUD. Hosts authenticate\\nusers, provision family membership, and validate guardian ProfileRelationship\\ntypes and effective terms. See \`agents/learner-service.md\` for the boundary.\\n","fieldRefs":[]},"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-assets","@happyvertical/smrt-core","@happyvertical/smrt-ingestion","@happyvertical/smrt-profiles","@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}`));
6
6
  //#endregion
7
7
  //#region src/catalog-capability.ts
8
8
  var CATALOG_REPRESENTATION_MEDIA_TYPES = {
@@ -234,6 +234,177 @@ var CatalogAcquisitionService = class {
234
234
  }
235
235
  };
236
236
  //#endregion
237
+ //#region src/catalog-preview.ts
238
+ var CATALOG_PREVIEW_MAX_BYTES = 2 * 1024 * 1024;
239
+ var CATALOG_PREVIEW_MAX_DIMENSION = 4096;
240
+ function normalizeCatalogPreview(value) {
241
+ try {
242
+ const x = typeof value === "string" ? JSON.parse(value) : value;
243
+ if (!x || x.providerId !== "illustrative-mathematics" || typeof x.stableId !== "string" || !x.stableId || x.stableId.length > 1e3 || typeof x.revision !== "string" || !x.revision || x.revision.length > 1e3 || typeof x.reference !== "string" || !/^[a-zA-Z0-9]{20,64}$/.test(x.reference) || x.mediaType !== "image/png" || !Number.isSafeInteger(x.byteLength) || x.byteLength < 24 || x.byteLength > 2097152 || ![x.width, x.height].every((n) => Number.isSafeInteger(n) && n > 0 && n <= 4096) || typeof x.sha256 !== "string" || !/^[a-f0-9]{64}$/.test(x.sha256) || typeof x.alt !== "string" || !x.alt || x.alt.length > 2e3 || x.rights?.state !== "verified" || x.rights.identifier !== "CC-BY-4.0" || typeof x.rights.attribution !== "string" || !x.rights.attribution || x.rights.attribution.length > 4e3 || typeof x.rights.sourceUrl !== "string" || typeof x.rights.retrievedAt !== "string" || !Number.isFinite(Date.parse(x.rights.retrievedAt)) || x.rights.expiresAt !== void 0 && (typeof x.rights.expiresAt !== "string" || !Number.isFinite(Date.parse(x.rights.expiresAt)))) return void 0;
244
+ const source = new URL(x.rights.sourceUrl);
245
+ if (source.origin !== "https://im.kendallhunt.com" || source.search || source.hash || source.username || source.password || !/^\/k5(?:_es)?\/families\/(kindergarten|grade-[1-5])\/unit-[1-9][0-9]?\/family-materials\.html$/.test(source.pathname)) return void 0;
246
+ return {
247
+ providerId: x.providerId,
248
+ stableId: x.stableId,
249
+ revision: x.revision,
250
+ reference: x.reference,
251
+ mediaType: x.mediaType,
252
+ width: x.width,
253
+ height: x.height,
254
+ byteLength: x.byteLength,
255
+ sha256: x.sha256,
256
+ alt: x.alt,
257
+ rights: {
258
+ state: "verified",
259
+ identifier: "CC-BY-4.0",
260
+ sourceUrl: source.href,
261
+ attribution: x.rights.attribution,
262
+ retrievedAt: x.rights.retrievedAt,
263
+ ...x.rights.expiresAt ? { expiresAt: x.rights.expiresAt } : {}
264
+ }
265
+ };
266
+ } catch {
267
+ return;
268
+ }
269
+ }
270
+ function catalogPreviewFor(record, now = Date.now()) {
271
+ const preview = normalizeCatalogPreview(record.preview);
272
+ return preview && preview.providerId === record.providerId && preview.stableId === record.stableId && preview.revision === record.revision && (!preview.rights.expiresAt || Date.parse(preview.rights.expiresAt) > now) ? preview : void 0;
273
+ }
274
+ function catalogPreviewPngDimensions(bytes) {
275
+ const host = typeof process === "undefined" ? void 0 : process.getBuiltinModule?.("node:zlib");
276
+ if (!host) throw new Error("Catalog preview verification requires a Node host.");
277
+ const { crc32, inflateSync } = host;
278
+ if (bytes.length < 24 || bytes.length > 2097152 || ![
279
+ 137,
280
+ 80,
281
+ 78,
282
+ 71,
283
+ 13,
284
+ 10,
285
+ 26,
286
+ 10,
287
+ 0,
288
+ 0,
289
+ 0,
290
+ 13,
291
+ 73,
292
+ 72,
293
+ 68,
294
+ 82
295
+ ].every((n, i) => bytes[i] === n)) throw new Error("Invalid catalog preview PNG.");
296
+ const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
297
+ const width = view.getUint32(16), height = view.getUint32(20);
298
+ if (![width, height].every((n) => n > 0 && n <= 4096)) throw new Error("Catalog preview dimensions exceed bounds.");
299
+ const channels = bytes[25] === 2 ? 3 : bytes[25] === 6 ? 4 : 0;
300
+ if (bytes.length < 45 || bytes[24] !== 8 || !channels || bytes[26] !== 0 || bytes[27] !== 0 || bytes[28] !== 0) throw new Error("Unsupported catalog preview PNG encoding.");
301
+ const compressed = [];
302
+ let offset = 8;
303
+ let ended = false;
304
+ let idatEnded = false;
305
+ while (offset + 12 <= bytes.length) {
306
+ const length = view.getUint32(offset);
307
+ if (length > bytes.length - offset - 12) throw new Error("Truncated catalog preview PNG chunk.");
308
+ const type = String.fromCharCode(...bytes.subarray(offset + 4, offset + 8));
309
+ const end = offset + 12 + length;
310
+ if (!/^[a-zA-Z]{2}[A-Z][a-zA-Z]$/.test(type) || crc32(bytes.subarray(offset + 4, end - 4)) !== view.getUint32(end - 4)) throw new Error("Invalid catalog preview PNG chunk.");
311
+ if (type === "IHDR") {
312
+ if (offset !== 8 || length !== 13) throw new Error("Invalid catalog preview PNG header.");
313
+ } else if (type === "IDAT") {
314
+ if (idatEnded) throw new Error("Invalid catalog preview PNG image ordering.");
315
+ compressed.push(bytes.subarray(offset + 8, end - 4));
316
+ } else {
317
+ if (compressed.length) idatEnded = true;
318
+ if (type === "IEND") {
319
+ if (length || end !== bytes.length) throw new Error("Invalid catalog preview PNG ending.");
320
+ ended = true;
321
+ } else if (type === "PLTE") {
322
+ if (compressed.length || !length || length > 768 || length % 3) throw new Error("Invalid catalog preview PNG palette.");
323
+ } else if (/^[A-Z]/.test(type) || [
324
+ "acTL",
325
+ "fcTL",
326
+ "fdAT"
327
+ ].includes(type)) throw new Error("Unsupported catalog preview PNG chunk.");
328
+ }
329
+ offset = end;
330
+ }
331
+ if (!ended || offset !== bytes.length || !compressed.length) throw new Error("Incomplete catalog preview PNG.");
332
+ const stride = width * channels + 1;
333
+ const raw = inflateSync(Buffer.concat(compressed), { maxOutputLength: stride * height });
334
+ if (raw.length !== stride * height) throw new Error("Invalid catalog preview PNG pixel data.");
335
+ for (let row = 0; row < height; row++) if (raw[row * stride] > 4) throw new Error("Invalid catalog preview PNG filter.");
336
+ return {
337
+ width,
338
+ height
339
+ };
340
+ }
341
+ var CatalogPreviewService = class {
342
+ constructor(store, loader) {
343
+ this.store = store;
344
+ this.loader = loader;
345
+ }
346
+ store;
347
+ loader;
348
+ cache = /* @__PURE__ */ new Map();
349
+ cacheBytes = 0;
350
+ async serve(input) {
351
+ const unavailable = () => new Response(null, {
352
+ status: 404,
353
+ headers: { "cache-control": "no-store" }
354
+ });
355
+ const { actor } = input;
356
+ if (!actor.tenantId?.trim() || !actor.actorUserId?.trim()) return unavailable();
357
+ const record = await this.store.getResource(input.resourceId, actor);
358
+ if (!record || record.id !== input.resourceId || record.withdrawnAt || record.revision !== input.revision || !new CatalogPolicy().canView(record, actor) || await this.store.authorize(actor, record) !== true) return unavailable();
359
+ const preview = catalogPreviewFor(record);
360
+ if (!preview) return unavailable();
361
+ const key = preview.sha256;
362
+ const now = Date.now();
363
+ for (const [id, entry] of this.cache) if (entry.until <= now) {
364
+ this.cache.delete(id);
365
+ this.cacheBytes -= entry.bytes.length;
366
+ }
367
+ const cached = this.cache.get(key);
368
+ if (cached && (cached.bytes.length !== preview.byteLength || cached.width !== preview.width || cached.height !== preview.height)) return unavailable();
369
+ let bytes = cached?.bytes;
370
+ if (!bytes) try {
371
+ bytes = await this.loader.loadPreview(preview);
372
+ const dimensions = catalogPreviewPngDimensions(bytes);
373
+ const hash = Buffer.from(await globalThis.crypto.subtle.digest("SHA-256", Uint8Array.from(bytes))).toString("hex");
374
+ if (bytes.length !== preview.byteLength || dimensions.width !== preview.width || dimensions.height !== preview.height || hash !== preview.sha256) return unavailable();
375
+ if (!catalogPreviewFor(record)) return unavailable();
376
+ bytes = Uint8Array.from(bytes);
377
+ const replaced = this.cache.get(key);
378
+ if (replaced) {
379
+ this.cache.delete(key);
380
+ this.cacheBytes -= replaced.bytes.length;
381
+ }
382
+ while (this.cacheBytes + bytes.length > 16 * 1024 * 1024) {
383
+ const first = this.cache.entries().next().value;
384
+ if (!first) break;
385
+ this.cache.delete(first[0]);
386
+ this.cacheBytes -= first[1].bytes.length;
387
+ }
388
+ this.cache.set(key, {
389
+ bytes,
390
+ ...dimensions,
391
+ until: Math.min(now + 6e4, preview.rights.expiresAt ? Date.parse(preview.rights.expiresAt) : Infinity)
392
+ });
393
+ this.cacheBytes += bytes.length;
394
+ } catch {
395
+ return unavailable();
396
+ }
397
+ if (!catalogPreviewFor(record)) return unavailable();
398
+ return new Response(Uint8Array.from(bytes), { headers: {
399
+ "content-type": "image/png",
400
+ "content-length": String(bytes.length),
401
+ "cache-control": "private, no-store",
402
+ "x-content-type-options": "nosniff",
403
+ "content-security-policy": "default-src 'none'; sandbox"
404
+ } });
405
+ }
406
+ };
407
+ //#endregion
237
408
  //#region src/catalog-models.ts
238
409
  var __defProp$1 = Object.defineProperty;
239
410
  var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
@@ -280,6 +451,15 @@ var CatalogResource = class extends SmrtObject {
280
451
  availableFormats = "[]";
281
452
  /** Serialized observed representation; JSON null is legacy absence. */
282
453
  representation = "null";
454
+ /** Exact revision-bound publisher preview, not an original or private asset grant. */
455
+ preview = "null";
456
+ getPreview() {
457
+ return normalizeCatalogPreview(this.preview);
458
+ }
459
+ setPreview(value) {
460
+ if (value !== void 0 && !normalizeCatalogPreview(value)) throw new Error("Invalid catalog preview metadata.");
461
+ this.preview = JSON.stringify(normalizeCatalogPreview(value) ?? null);
462
+ }
283
463
  getRepresentation() {
284
464
  return normalizeCatalogRepresentation(this.representation);
285
465
  }
@@ -435,6 +615,19 @@ var CatalogDatabaseSyncStore = class {
435
615
  limit: 2
436
616
  });
437
617
  if (rows.length > 1) throw new Error("Catalog provider record identity is ambiguous.");
618
+ let preview = catalogPreviewFor(record, Number.NEGATIVE_INFINITY);
619
+ if (record.preview !== void 0 && !preview) throw new Error("Invalid catalog preview metadata.");
620
+ const previousPreview = rows[0]?.getPreview();
621
+ if (rows[0]?.revision === record.revision && previousPreview) {
622
+ if (!preview || JSON.stringify({
623
+ ...preview,
624
+ rights: {
625
+ ...preview.rights,
626
+ retrievedAt: previousPreview.rights.retrievedAt
627
+ }
628
+ }) !== JSON.stringify(previousPreview)) throw new Error("Catalog preview is immutable within a source revision.");
629
+ preview = previousPreview;
630
+ }
438
631
  const fields = {
439
632
  providerId: record.providerId,
440
633
  stableId: record.stableId,
@@ -450,6 +643,7 @@ var CatalogDatabaseSyncStore = class {
450
643
  parentStableId: record.parentStableId ?? "",
451
644
  availableFormats: json(record.availableFormats ?? []),
452
645
  representation: json(normalizeCatalogRepresentation(record.representation)),
646
+ preview: json(preview),
453
647
  licenseEvidence: json(record.licenseEvidence),
454
648
  licenseState: record.licenseEvidence.state,
455
649
  visibility: record.visibility,
@@ -622,11 +816,12 @@ var CatalogReadService = class {
622
816
  policy;
623
817
  async search(actor, filter = {}) {
624
818
  if (!actor.tenantId.trim() || !actor.actorUserId.trim()) throw new Error("Trusted tenant and actor identity are required.");
625
- return (await this.store.search(filter)).filter((record) => this.policy.canView(record, actor)).map((record) => this.view(record));
819
+ return (await this.store.search(filter)).filter((record) => !record.withdrawnAt && this.policy.canView(record, actor)).map((record) => this.view(record));
626
820
  }
627
821
  view(record) {
628
822
  const { licenseEvidence } = record;
629
823
  const representation = normalizeCatalogRepresentation(record.representation);
824
+ const preview = catalogPreviewFor(record);
630
825
  return {
631
826
  id: record.id,
632
827
  providerId: record.providerId,
@@ -643,6 +838,7 @@ var CatalogReadService = class {
643
838
  ...record.parentStableId ? { parentStableId: record.parentStableId } : {},
644
839
  ...record.availableFormats ? { availableFormats: [...record.availableFormats] } : {},
645
840
  ...representation ? { representation } : {},
841
+ ...preview ? { preview } : {},
646
842
  license: {
647
843
  state: licenseEvidence.state,
648
844
  ...licenseEvidence.identifier ? { identifier: licenseEvidence.identifier } : {},
@@ -2643,7 +2839,29 @@ function parseImFirstEditionPage(rawHtml, path) {
2643
2839
  if (rootChild || courseChild || unitChild || familyMaterialsChild) children.add(child.path);
2644
2840
  }
2645
2841
  if (children.size > 128 || artifacts.size > 128) throw new Error("First-edition page exceeds hierarchy/artifact bound.");
2842
+ let previewImage;
2843
+ const main = /<main\b[^>]*>([\s\S]*?)<\/main>/i.exec(html)?.[1] ?? "";
2844
+ if (licensed && attribution && page.audience === "families" && page.band.startsWith("k5") && page.leaf === "family-materials" && !/attribution|copyright|licensed|credits?|©|all rights reserved/i.test(imText(main))) for (const figure of main.matchAll(/<figure\b([^>]*)>([\s\S]*?)<\/figure>/gi)) {
2845
+ if (!/class=["'][^"']*\bembedded-content-image-file\b/i.test(figure[1]) || !/data-record-model=["']ImageFile["']/i.test(figure[1])) continue;
2846
+ const caption = /<figcaption\b[^>]*>([\s\S]*?)<\/figcaption>/i.exec(figure[2]);
2847
+ if (!caption || imText(caption[1])) continue;
2848
+ const image = /<img\b([^>]*)>/i.exec(figure[2])?.[1] ?? "";
2849
+ const src = /\bsrc=["']([^"']+)["']/i.exec(image)?.[1];
2850
+ const alt = imText(/\balt=["']([^"']+)["']/i.exec(image)?.[1] ?? "");
2851
+ if (!src || !/\b(chart|diagram|number line|graph|table|tally)\b/i.test(alt) || /logo|photo|portrait|©|copyright|credit|license/i.test(alt)) continue;
2852
+ try {
2853
+ const id = imAssetId(new URL(src));
2854
+ if (id) {
2855
+ previewImage = {
2856
+ id,
2857
+ alt
2858
+ };
2859
+ break;
2860
+ }
2861
+ } catch {}
2862
+ }
2646
2863
  return {
2864
+ ...previewImage ? { previewImage } : {},
2647
2865
  children: [...children],
2648
2866
  artifacts: [...artifacts.values()],
2649
2867
  exclusions,
@@ -2744,7 +2962,7 @@ function createPublicIllustrativeMathematicsFirstEditionAdapter(config = {}) {
2744
2962
  const timeout = config.timeoutMs ?? 2e4;
2745
2963
  const pdfCap = config.maxPdfBytes ?? 32 * 1024 * 1024;
2746
2964
  if (!Number.isSafeInteger(timeout) || timeout < 1 || timeout > 6e4 || !Number.isSafeInteger(pdfCap) || pdfCap < 5 || pdfCap > 64 * 1024 * 1024) throw new Error("Invalid first-edition request bounds.");
2747
- async function operation(run) {
2965
+ async function operation(run, deadline = timeout) {
2748
2966
  const controller = new AbortController();
2749
2967
  let timer;
2750
2968
  try {
@@ -2771,7 +2989,7 @@ function createPublicIllustrativeMathematicsFirstEditionAdapter(config = {}) {
2771
2989
  timer = setTimeout(() => {
2772
2990
  controller.abort();
2773
2991
  reject(/* @__PURE__ */ new Error("First-edition operation timed out."));
2774
- }, timeout);
2992
+ }, deadline);
2775
2993
  })]);
2776
2994
  } finally {
2777
2995
  if (timer) clearTimeout(timer);
@@ -2792,6 +3010,18 @@ function createPublicIllustrativeMathematicsFirstEditionAdapter(config = {}) {
2792
3010
  };
2793
3011
  }
2794
3012
  return {
3013
+ async loadPreview(value) {
3014
+ const preview = normalizeCatalogPreview(value);
3015
+ if (!preview || preview.rights.expiresAt && Date.parse(preview.rights.expiresAt) <= Date.now()) throw new Error("Invalid or expired preview.");
3016
+ return operation(async (request) => {
3017
+ const response = await request(IM_ASSET_ORIGIN + "/" + preview.reference, "GET", { accept: "image/png" });
3018
+ if (response.headers.get("content-type")?.split(";")[0].trim().toLowerCase() !== "image/png") {
3019
+ await response.body?.cancel();
3020
+ throw new Error("Preview is not PNG.");
3021
+ }
3022
+ return readBody(response, CATALOG_PREVIEW_MAX_BYTES);
3023
+ });
3024
+ },
2795
3025
  async enumerate(input) {
2796
3026
  let state;
2797
3027
  try {
@@ -2808,7 +3038,8 @@ function createPublicIllustrativeMathematicsFirstEditionAdapter(config = {}) {
2808
3038
  };
2809
3039
  }
2810
3040
  try {
2811
- return await operation(async (request) => {
3041
+ const started = performance.now();
3042
+ const { result, candidate } = await operation(async (request) => {
2812
3043
  const path = state.todo[0];
2813
3044
  const { parsed, revision } = await html(request, path);
2814
3045
  if (state.pageRevision && state.pageRevision !== revision) throw new Error("Metadata changed during cursor traversal; restart this sync generation.");
@@ -2937,12 +3168,57 @@ Original first-edition ${format.toUpperCase()}; no changes made. License: ${IM_L
2937
3168
  message: "Public first-edition official CMS artifact links with observed PDF/ZIP/DOCX representations explicitly labeled for students/families on official K5/MS/HS teacher/family course, unit, resources and lesson preparation pages, including linked Spanish counterparts and Algebra 1 Supports. HTML-only lessons, external-host artifacts, teacher/login and unknown-role material are excluded; unknown MIME is retained with acquisition denied; malformed MIME or invalid validators pause enumeration; AccessIM/v.360 is excluded."
2938
3169
  });
2939
3170
  return {
2940
- records: records.sort((a, b) => a.stableId.localeCompare(b.stableId)),
2941
- complete: next.todo.length === 0,
2942
- ...next.todo.length ? { nextCursor: encode(next) } : {},
2943
- policyExclusions
3171
+ result: {
3172
+ records: records.sort((a, b) => a.stableId.localeCompare(b.stableId)),
3173
+ complete: next.todo.length === 0,
3174
+ ...next.todo.length ? { nextCursor: encode(next) } : {},
3175
+ policyExclusions
3176
+ },
3177
+ candidate: state.offset === 0 && page.course && parsed.previewImage ? {
3178
+ ...parsed.previewImage,
3179
+ path,
3180
+ revision,
3181
+ attribution: parsed.attribution
3182
+ } : void 0
2944
3183
  };
2945
3184
  });
3185
+ const previewBudget = Math.min(2e3, Math.floor(timeout / 4), Math.floor(timeout - (performance.now() - started)));
3186
+ if (candidate && previewBudget > 0) try {
3187
+ const bytes = await operation(async (request) => {
3188
+ const response = await request(`${IM_ASSET_ORIGIN}/${candidate.id}`, "GET", { accept: "image/png" });
3189
+ if (response.headers.get("content-type")?.split(";")[0].trim().toLowerCase() !== "image/png") {
3190
+ await response.body?.cancel();
3191
+ throw new Error("Preview is not PNG.");
3192
+ }
3193
+ return readBody(response, CATALOG_PREVIEW_MAX_BYTES);
3194
+ }, previewBudget);
3195
+ const dimensions = catalogPreviewPngDimensions(bytes);
3196
+ const hash = await sha256(bytes);
3197
+ const preview = {
3198
+ providerId: PROVIDER,
3199
+ stableId: imStableId(candidate.path),
3200
+ revision: `${candidate.revision}:${hash}`,
3201
+ reference: candidate.id,
3202
+ mediaType: "image/png",
3203
+ ...dimensions,
3204
+ byteLength: bytes.length,
3205
+ sha256: hash,
3206
+ alt: candidate.alt,
3207
+ rights: {
3208
+ state: "verified",
3209
+ identifier: "CC-BY-4.0",
3210
+ sourceUrl: IM_ORIGIN + candidate.path,
3211
+ attribution: candidate.attribution,
3212
+ retrievedAt: (/* @__PURE__ */ new Date()).toISOString()
3213
+ }
3214
+ };
3215
+ const record = result.records.find((record2) => record2.stableId === preview.stableId);
3216
+ if (record) {
3217
+ record.revision = preview.revision;
3218
+ record.preview = preview;
3219
+ }
3220
+ } catch {}
3221
+ return result;
2946
3222
  } catch (error) {
2947
3223
  return {
2948
3224
  records: [],
@@ -2987,6 +3263,6 @@ Original first-edition ${format.toUpperCase()}; no changes made. License: ${IM_L
2987
3263
  };
2988
3264
  }
2989
3265
  //#endregion
2990
- export { Attestation, AttestationCollection, AuthoredCourse, AuthoredCourseCollection, CatalogAcquisition, CatalogAcquisitionCollection, CatalogAcquisitionService, CatalogAuthorizationError, CatalogDatabaseSyncStore, CatalogMaterializationService, CatalogPolicy, CatalogProvider, CatalogProviderCollection, CatalogReadService, CatalogRepresentationError, CatalogResource, CatalogResourceCollection, CatalogSelection, CatalogSelectionCollection, CatalogService, CatalogSyncService, CatalogSyncState, CatalogSyncStateCollection, Course, CourseCollection, CourseSection, CourseSectionCollection, CourseSource, CourseSourceCollection, Curriculum, CurriculumCollection, DRIVE_CURRICULUM_SEED_ROOTS, EducationCatalogRecipe, EducationLearnerRecipe, Enrollment, EnrollmentCollection, Exercise, ExerciseCollection, ExternalCompletion, ExternalCompletionCollection, ExternalCourse, ExternalCourseCollection, FamilyIntake, FamilyIntakeAsset, FamilyIntakeAssetCollection, FamilyIntakeCollection, FamilyIntakeDecision, FamilyIntakeDecisionCollection, GoogleDriveCurriculumAdapter, Grade, GradeCollection, Learner, LearnerAuthorizationError, LearnerCollection, LearnerService, Lesson, LessonAsset, LessonAssetCollection, LessonCollection, LessonProgress, LessonProgressCollection, Reading, ReadingCollection, ScannedSubmission, ScannedSubmissionCollection, SourceImportService, Submission, SubmissionAsset, SubmissionAssetCollection, SubmissionCollection, SubmissionIntakeBinding, SubmissionIntakeBindingCollection, SubmissionService, SubmissionStorageCleanupError, Video, VideoCollection, WORKBOOK_MATH_VOCABULARY, Workbook, WorkbookActivity, WorkbookActivityCollection, WorkbookAssessmentRevision, WorkbookAssessmentRevisionCollection, WorkbookAssessmentValidationError, WorkbookAttempt, WorkbookAttemptCollection, WorkbookCollection, WorkbookContextRevision, WorkbookContextRevisionCollection, WorkbookFeedbackDelivery, WorkbookFeedbackDeliveryCollection, WorkbookFeedbackRelease, WorkbookFeedbackReleaseCollection, WorkbookPhotoAsset, WorkbookPhotoAssetCollection, WorkbookPhotoDecision, WorkbookPhotoDecisionCollection, WorkbookPhotoIntake, WorkbookPhotoIntakeCollection, WorkbookPhotoService, WorkbookService, WorkbookWorkFiling, WorkbookWorkFilingCollection, WorkbookWorkflowRequiredError, Worksheet, WorksheetCollection, aggregateWorkbookQuestions, createCk12Adapter, createIllustrativeMathematicsAdapter, createOerCommonsAdapter, createOerCommonsRssAdapter, createPublicIllustrativeMathematicsFirstEditionAdapter, createPublicIllustrativeMathematicsK5Adapter, easyPeasyGrade4Courses, easyPeasyGrade4Themes, evaluateCatalogAcquisitionCapability, familyIntakeScopeId, grade4Courses, grade4Theme, importEasyPeasyGrade4Course, importEasyPeasyGrade4Theme, normalizeCatalogRepresentation, normalizeWorkbookAnswerRegions, normalizeWorkbookObservedLayout, parseEasyPeasyPage, parseIllustrativeMathematicsK5Index, parseOerCommonsRssFeed, providerFeedRequirements, validateEasyPeasyUrl, validateWorkbookAssessment, validateWorkbookPhotoIdentification, workbookAggregateFeedback };
3266
+ export { Attestation, AttestationCollection, AuthoredCourse, AuthoredCourseCollection, CATALOG_PREVIEW_MAX_BYTES, CATALOG_PREVIEW_MAX_DIMENSION, CatalogAcquisition, CatalogAcquisitionCollection, CatalogAcquisitionService, CatalogAuthorizationError, CatalogDatabaseSyncStore, CatalogMaterializationService, CatalogPolicy, CatalogPreviewService, CatalogProvider, CatalogProviderCollection, CatalogReadService, CatalogRepresentationError, CatalogResource, CatalogResourceCollection, CatalogSelection, CatalogSelectionCollection, CatalogService, CatalogSyncService, CatalogSyncState, CatalogSyncStateCollection, Course, CourseCollection, CourseSection, CourseSectionCollection, CourseSource, CourseSourceCollection, Curriculum, CurriculumCollection, DRIVE_CURRICULUM_SEED_ROOTS, EducationCatalogRecipe, EducationLearnerRecipe, Enrollment, EnrollmentCollection, Exercise, ExerciseCollection, ExternalCompletion, ExternalCompletionCollection, ExternalCourse, ExternalCourseCollection, FamilyIntake, FamilyIntakeAsset, FamilyIntakeAssetCollection, FamilyIntakeCollection, FamilyIntakeDecision, FamilyIntakeDecisionCollection, GoogleDriveCurriculumAdapter, Grade, GradeCollection, Learner, LearnerAuthorizationError, LearnerCollection, LearnerService, Lesson, LessonAsset, LessonAssetCollection, LessonCollection, LessonProgress, LessonProgressCollection, Reading, ReadingCollection, ScannedSubmission, ScannedSubmissionCollection, SourceImportService, Submission, SubmissionAsset, SubmissionAssetCollection, SubmissionCollection, SubmissionIntakeBinding, SubmissionIntakeBindingCollection, SubmissionService, SubmissionStorageCleanupError, Video, VideoCollection, WORKBOOK_MATH_VOCABULARY, Workbook, WorkbookActivity, WorkbookActivityCollection, WorkbookAssessmentRevision, WorkbookAssessmentRevisionCollection, WorkbookAssessmentValidationError, WorkbookAttempt, WorkbookAttemptCollection, WorkbookCollection, WorkbookContextRevision, WorkbookContextRevisionCollection, WorkbookFeedbackDelivery, WorkbookFeedbackDeliveryCollection, WorkbookFeedbackRelease, WorkbookFeedbackReleaseCollection, WorkbookPhotoAsset, WorkbookPhotoAssetCollection, WorkbookPhotoDecision, WorkbookPhotoDecisionCollection, WorkbookPhotoIntake, WorkbookPhotoIntakeCollection, WorkbookPhotoService, WorkbookService, WorkbookWorkFiling, WorkbookWorkFilingCollection, WorkbookWorkflowRequiredError, Worksheet, WorksheetCollection, aggregateWorkbookQuestions, catalogPreviewFor, createCk12Adapter, createIllustrativeMathematicsAdapter, createOerCommonsAdapter, createOerCommonsRssAdapter, createPublicIllustrativeMathematicsFirstEditionAdapter, createPublicIllustrativeMathematicsK5Adapter, easyPeasyGrade4Courses, easyPeasyGrade4Themes, evaluateCatalogAcquisitionCapability, familyIntakeScopeId, grade4Courses, grade4Theme, importEasyPeasyGrade4Course, importEasyPeasyGrade4Theme, normalizeCatalogPreview, normalizeCatalogRepresentation, normalizeWorkbookAnswerRegions, normalizeWorkbookObservedLayout, parseEasyPeasyPage, parseIllustrativeMathematicsK5Index, parseOerCommonsRssFeed, providerFeedRequirements, validateEasyPeasyUrl, validateWorkbookAssessment, validateWorkbookPhotoIdentification, workbookAggregateFeedback };
2991
3267
 
2992
3268
  //# sourceMappingURL=index.js.map