@happyvertical/smrt-education 0.57.35 → 0.57.37

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 LessonCollection, A as WorkbookFeedbackRelease, B as CatalogServic
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.35","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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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: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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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}},"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":[],"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 \\"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"}},"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"]}],"version":"fafc1daf"},"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 \\"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"}},"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"]}],"version":"fafc1daf"},"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":[],"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":[],"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":[],"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.37","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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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: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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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":[],"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}},"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":[],"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 \\"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"}},"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"]}],"version":"fafc1daf"},"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 \\"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"}},"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"]}],"version":"fafc1daf"},"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":[],"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":[],"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":[],"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 = {