@happyvertical/smrt-education 0.57.39 → 0.57.41

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
@@ -1,8 +1,8 @@
1
- import { $ as EnrollmentCollection, A as WorkbookFeedbackRelease, At as Exercise, B as FamilyIntakeAsset, C as WorkbookAssessmentRevision, Ct as Curriculum, D as WorkbookCollection, Dt as AuthoredCourse, E as WorkbookAttemptCollection, Et as LessonProgress, F as WorkbookAssessmentValidationError, Ft as Worksheet, G as familyIntakeScopeId, H as FamilyIntakeCollection, I as aggregateWorkbookQuestions, J as AttestationCollection, K as CatalogAuthorizationError, L as validateWorkbookAssessment, M as WorkbookWorkFiling, Mt as Lesson, N as WorkbookWorkFilingCollection, Nt as Reading, O as WorkbookFeedbackDelivery, Ot as Course, P as WORKBOOK_MATH_VOCABULARY, Pt as Video, Q as CurriculumCollection, R as workbookAggregateFeedback, S as WorkbookActivityCollection, St as LessonAsset, T as WorkbookAttempt, Tt as Learner, U as FamilyIntakeDecision, V as FamilyIntakeAssetCollection, W as FamilyIntakeDecisionCollection, X as CourseCollection, Y as AuthoredCourseCollection, Z as CourseSectionCollection, _ as WorkbookWorkflowRequiredError, _t as Grade, a as WorkbookContextRevisionCollection, at as LessonAssetCollection, b as Workbook, bt as SubmissionAsset, c as WorkbookPhotoDecision, ct as ReadingCollection, d as WorkbookPhotoIntakeCollection, dt as SubmissionCollection, et as ExerciseCollection, f as validateWorkbookPhotoIdentification, ft as SubmissionIntakeBindingCollection, g as SubmissionStorageCleanupError, gt as ExternalCompletion, h as SubmissionService, ht as Attestation, i as WorkbookContextRevision, it as LearnerCollection, j as WorkbookFeedbackReleaseCollection, jt as ExternalCourse, k as WorkbookFeedbackDeliveryCollection, kt as CourseSection, l as WorkbookPhotoDecisionCollection, lt as ScannedSubmissionCollection, m as normalizeWorkbookAnswerRegions, mt as WorksheetCollection, nt as ExternalCourseCollection, o as WorkbookPhotoAsset, ot as LessonCollection, p as normalizeWorkbookObservedLayout, pt as VideoCollection, q as CatalogService, r as WorkbookService, rt as GradeCollection, s as WorkbookPhotoAssetCollection, st as LessonProgressCollection, t as WorkbookPhotoService, tt as ExternalCompletionCollection, u as WorkbookPhotoIntake, ut as SubmissionAssetCollection, v as LearnerAuthorizationError, vt as ScannedSubmission, w as WorkbookAssessmentRevisionCollection, wt as Enrollment, x as WorkbookActivity, xt as SubmissionIntakeBinding, y as LearnerService, yt as Submission, z as FamilyIntake } from "./chunks/workbook-photo-service-DCmqeWLd.js";
2
- import { ObjectRegistry, SmrtCollection, SmrtObject, SmrtRecipe, field, foreignKey, isEmbeddedDatabase, isPostgresDatabase, smrt, withEmbeddedWriteQueue } from "@happyvertical/smrt-core";
1
+ import { $ as CourseCollection, A as WorkbookFeedbackDelivery, At as AuthoredCourse, B as validateWorkbookAssessment, C as WorkbookActivity, Ct as SubmissionAsset, D as WorkbookAttempt, Dt as Enrollment, E as WorkbookAssessmentRevisionCollection, Et as Curriculum, F as WorkbookWorkFilingCollection, Ft as Lesson, G as FamilyIntakeCollection, H as FamilyIntake, I as WORKBOOK_MATH_VOCABULARY, It as Reading, J as familyIntakeScopeId, K as FamilyIntakeDecision, L as WorkbookAssessmentValidationError, Lt as Video, M as WorkbookFeedbackRelease, Mt as CourseSection, N as WorkbookFeedbackReleaseCollection, Nt as Exercise, O as WorkbookAttemptCollection, Ot as Learner, P as WorkbookWorkFiling, Pt as ExternalCourse, Q as AuthoredCourseCollection, R as WorkbookCompletionConflictError, Rt as Worksheet, S as Workbook, St as Submission, T as WorkbookAssessmentRevision, Tt as LessonAsset, U as FamilyIntakeAsset, V as workbookAggregateFeedback, W as FamilyIntakeAssetCollection, X as CatalogService, Y as CatalogAuthorizationError, Z as AttestationCollection, _ as WorkbookWorkflowRequiredError, _t as WorksheetCollection, a as WorkbookContextRevisionCollection, at as ExternalCourseCollection, b as WorkbookCompletionDecision, bt as Grade, c as WorkbookPhotoDecision, ct as LessonAssetCollection, d as WorkbookPhotoIntakeCollection, dt as ReadingCollection, et as CourseSectionCollection, f as validateWorkbookPhotoIdentification, ft as ScannedSubmissionCollection, g as SubmissionStorageCleanupError, gt as VideoCollection, h as SubmissionService, ht as SubmissionIntakeBindingCollection, i as WorkbookContextRevision, it as ExternalCompletionCollection, j as WorkbookFeedbackDeliveryCollection, jt as Course, k as WorkbookCollection, kt as LessonProgress, l as WorkbookPhotoDecisionCollection, lt as LessonCollection, m as normalizeWorkbookAnswerRegions, mt as SubmissionCollection, nt as EnrollmentCollection, o as WorkbookPhotoAsset, ot as GradeCollection, p as normalizeWorkbookObservedLayout, pt as SubmissionAssetCollection, q as FamilyIntakeDecisionCollection, r as WorkbookService, rt as ExerciseCollection, s as WorkbookPhotoAssetCollection, st as LearnerCollection, t as WorkbookPhotoService, tt as CurriculumCollection, u as WorkbookPhotoIntake, ut as LessonProgressCollection, v as LearnerAuthorizationError, vt as Attestation, w as WorkbookActivityCollection, wt as SubmissionIntakeBinding, x as WorkbookCompletionDecisionCollection, xt as ScannedSubmission, y as LearnerService, yt as ExternalCompletion, z as aggregateWorkbookQuestions } from "./chunks/workbook-photo-service-D5DUgh-C.js";
2
+ import { ObjectRegistry, SmrtCollection, SmrtObject, SmrtRecipe, crossPackageRef, 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.39","objects":{"@happyvertical/smrt-education:CatalogProviderCollection":{"name":"catalogprovidercollection","className":"CatalogProviderCollection","qualifiedName":"@happyvertical/smrt-education:CatalogProviderCollection","collection":"catalogproviders","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"CatalogProvider","exportName":"CatalogProviderCollection","collectionExportName":"CatalogProviderCollectionCollection","schema":{"tableName":"catalog_providers","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_providers\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"provider_id\\" TEXT NOT NULL,\\n \\"name\\" TEXT NOT NULL,\\n \\"active\\" BOOLEAN NOT NULL DEFAULT TRUE\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"provider_id":{"type":"TEXT","notNull":true,"unique":false},"name":{"type":"TEXT","notNull":true,"unique":false},"active":{"type":"BOOLEAN","notNull":true,"unique":false,"default":true}},"indexes":[{"name":"catalog_providers_slug_context_idx","columns":["slug","context"],"unique":true},{"name":"catalog_providers_created_at_idx","columns":["created_at"]}],"version":"f35557a4"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogResourceCollection":{"name":"catalogresourcecollection","className":"CatalogResourceCollection","qualifiedName":"@happyvertical/smrt-education:CatalogResourceCollection","collection":"catalogresources","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"CatalogResource","exportName":"CatalogResourceCollection","collectionExportName":"CatalogResourceCollectionCollection","schema":{"tableName":"catalog_resources","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_resources\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"provider_id\\" TEXT NOT NULL,\\n \\"stable_id\\" TEXT NOT NULL,\\n \\"revision\\" TEXT NOT NULL,\\n \\"canonical_url\\" TEXT,\\n \\"title\\" TEXT NOT NULL,\\n \\"supplied_description\\" TEXT,\\n \\"author\\" TEXT,\\n \\"subjects\\" TEXT,\\n \\"grades\\" TEXT,\\n \\"language\\" TEXT,\\n \\"resource_type\\" TEXT,\\n \\"parent_stable_id\\" TEXT,\\n \\"available_formats\\" TEXT,\\n \\"representation\\" TEXT,\\n \\"preview\\" TEXT,\\n \\"license_evidence\\" TEXT,\\n \\"license_state\\" TEXT DEFAULT 'unknown',\\n \\"visibility\\" TEXT DEFAULT 'catalog',\\n \\"last_seen_run_id\\" TEXT,\\n \\"withdrawn_at\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"provider_id":{"type":"TEXT","notNull":true,"unique":false},"stable_id":{"type":"TEXT","notNull":true,"unique":false},"revision":{"type":"TEXT","notNull":true,"unique":false},"canonical_url":{"type":"TEXT","notNull":false,"unique":false},"title":{"type":"TEXT","notNull":true,"unique":false},"supplied_description":{"type":"TEXT","notNull":false,"unique":false},"author":{"type":"TEXT","notNull":false,"unique":false},"subjects":{"type":"TEXT","notNull":false,"unique":false},"grades":{"type":"TEXT","notNull":false,"unique":false},"language":{"type":"TEXT","notNull":false,"unique":false},"resource_type":{"type":"TEXT","notNull":false,"unique":false},"parent_stable_id":{"type":"TEXT","notNull":false,"unique":false},"available_formats":{"type":"TEXT","notNull":false,"unique":false},"representation":{"type":"TEXT","notNull":false,"unique":false},"preview":{"type":"TEXT","notNull":false,"unique":false},"license_evidence":{"type":"TEXT","notNull":false,"unique":false},"license_state":{"type":"TEXT","notNull":false,"unique":false,"default":"unknown"},"visibility":{"type":"TEXT","notNull":false,"unique":false,"default":"catalog"},"last_seen_run_id":{"type":"TEXT","notNull":false,"unique":false},"withdrawn_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"catalog_resources_slug_context_idx","columns":["slug","context"],"unique":true},{"name":"catalog_resources_created_at_idx","columns":["created_at"]}],"version":"6ea66f0d"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogSyncStateCollection":{"name":"catalogsyncstatecollection","className":"CatalogSyncStateCollection","qualifiedName":"@happyvertical/smrt-education:CatalogSyncStateCollection","collection":"catalogsyncstates","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"CatalogSyncState","exportName":"CatalogSyncStateCollection","collectionExportName":"CatalogSyncStateCollectionCollection","schema":{"tableName":"catalog_sync_states","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_sync_states\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"provider_id\\" TEXT NOT NULL,\\n \\"cursor\\" TEXT,\\n \\"run_id\\" TEXT,\\n \\"complete\\" BOOLEAN NOT NULL DEFAULT FALSE,\\n \\"paused\\" BOOLEAN NOT NULL DEFAULT FALSE,\\n \\"pause_reason\\" TEXT,\\n \\"imported_count\\" INTEGER NOT NULL DEFAULT 0,\\n \\"failures\\" TEXT,\\n \\"last_successful_at\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"provider_id":{"type":"TEXT","notNull":true,"unique":false},"cursor":{"type":"TEXT","notNull":false,"unique":false},"run_id":{"type":"TEXT","notNull":false,"unique":false},"complete":{"type":"BOOLEAN","notNull":true,"unique":false,"default":false},"paused":{"type":"BOOLEAN","notNull":true,"unique":false,"default":false},"pause_reason":{"type":"TEXT","notNull":false,"unique":false},"imported_count":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"failures":{"type":"TEXT","notNull":false,"unique":false},"last_successful_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"catalog_sync_states_slug_context_idx","columns":["slug","context"],"unique":true},{"name":"catalog_sync_states_created_at_idx","columns":["created_at"]}],"version":"52dc3ee1"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogSelectionCollection":{"name":"catalogselectioncollection","className":"CatalogSelectionCollection","qualifiedName":"@happyvertical/smrt-education:CatalogSelectionCollection","collection":"catalogselections","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"CatalogSelection","exportName":"CatalogSelectionCollection","collectionExportName":"CatalogSelectionCollectionCollection","schema":{"tableName":"catalog_selections","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_selections\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"resource_id\\" UUID NOT NULL,\\n \\"selected_by_user_id\\" TEXT NOT NULL,\\n \\"selected_revision\\" TEXT NOT NULL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"resource_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"catalog_resources","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"selected_by_user_id":{"type":"TEXT","notNull":true,"unique":false},"selected_revision":{"type":"TEXT","notNull":true,"unique":false}},"indexes":[{"name":"catalog_selections_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"catalog_selections_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"catalog_selections_resource_id_idx","columns":["resource_id"]}],"version":"c6b02eb9"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogAcquisitionCollection":{"name":"catalogacquisitioncollection","className":"CatalogAcquisitionCollection","qualifiedName":"@happyvertical/smrt-education:CatalogAcquisitionCollection","collection":"catalogacquisitions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"CatalogAcquisition","exportName":"CatalogAcquisitionCollection","collectionExportName":"CatalogAcquisitionCollectionCollection","schema":{"tableName":"catalog_acquisitions","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_acquisitions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"resource_id\\" UUID NOT NULL,\\n \\"selection_id\\" UUID NOT NULL,\\n \\"revision\\" TEXT NOT NULL,\\n \\"format\\" TEXT NOT NULL,\\n \\"sha256\\" TEXT NOT NULL,\\n \\"attribution\\" TEXT,\\n \\"notices\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"resource_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"catalog_resources","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"selection_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"catalog_selections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"revision":{"type":"TEXT","notNull":true,"unique":false},"format":{"type":"TEXT","notNull":true,"unique":false},"sha256":{"type":"TEXT","notNull":true,"unique":false},"attribution":{"type":"TEXT","notNull":false,"unique":false},"notices":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"catalog_acquisitions_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"catalog_acquisitions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"catalog_acquisitions_resource_id_idx","columns":["resource_id"]},{"name":"catalog_acquisitions_selection_id_idx","columns":["selection_id"]}],"version":"ee9c5add"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogProvider":{"name":"catalogprovider","className":"CatalogProvider","qualifiedName":"@happyvertical/smrt-education:CatalogProvider","collection":"catalogproviders","description":"Globally visible provider registration. Hosts configure adapters and credentials out of band.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-models.ts","packageName":"@happyvertical/smrt-education","fields":{"providerId":{"type":"text","required":true,"_meta":{"required":true}},"name":{"type":"text","required":true,"_meta":{"required":true}},"active":{"type":"boolean","required":true,"default":true}},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtObject","exportName":"CatalogProvider","collectionExportName":"CatalogProviderCollection","displayLabelField":"name","validationRules":[{"field":"providerId","rule":"required","fieldType":"text"},{"field":"name","rule":"required","fieldType":"text"},{"field":"active","rule":"required","fieldType":"boolean"}],"schema":{"tableName":"catalog_providers","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_providers\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"provider_id\\" TEXT NOT NULL,\\n \\"name\\" TEXT NOT NULL,\\n \\"active\\" BOOLEAN NOT NULL DEFAULT TRUE\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"provider_id":{"type":"TEXT","notNull":true,"unique":false},"name":{"type":"TEXT","notNull":true,"unique":false},"active":{"type":"BOOLEAN","notNull":true,"unique":false,"default":true}},"indexes":[{"name":"catalog_providers_slug_context_idx","columns":["slug","context"],"unique":true},{"name":"catalog_providers_created_at_idx","columns":["created_at"]}],"version":"f35557a4"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogResource":{"name":"catalogresource","className":"CatalogResource","qualifiedName":"@happyvertical/smrt-education:CatalogResource","collection":"catalogresources","description":"A provider-native record. Rows are intentionally not merged across providers.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-models.ts","packageName":"@happyvertical/smrt-education","fields":{"providerId":{"type":"text","required":true,"_meta":{"required":true}},"stableId":{"type":"text","required":true,"_meta":{"required":true}},"revision":{"type":"text","required":true,"_meta":{"required":true}},"canonicalUrl":{"type":"text","required":false},"title":{"type":"text","required":true,"_meta":{"required":true}},"suppliedDescription":{"type":"text","required":false},"author":{"type":"text","required":false},"subjects":{"type":"text","required":false},"grades":{"type":"text","required":false},"language":{"type":"text","required":false},"resourceType":{"type":"text","required":false},"parentStableId":{"type":"text","required":false},"availableFormats":{"type":"text","required":false},"representation":{"type":"text","required":false},"preview":{"type":"text","required":false},"licenseEvidence":{"type":"text","required":false},"licenseState":{"type":"text","required":false,"default":"unknown","enum":["verified","unknown","conflicting","restricted"]},"visibility":{"type":"text","required":false,"default":"catalog","enum":["catalog","teacher"]},"lastSeenRunId":{"type":"text","required":false},"withdrawnAt":{"type":"text","required":false}},"methods":{"getPreview":{"name":"getPreview","async":false,"parameters":[],"returnType":"CatalogPreview | undefined","isStatic":false,"isPublic":true},"setPreview":{"name":"setPreview","async":false,"parameters":[{"name":"value","type":"CatalogPreview | undefined","optional":false,"unionBranches":[{"type":"CatalogPreview"},{"type":"undefined"}]}],"returnType":"void","isStatic":false,"isPublic":true},"getRepresentation":{"name":"getRepresentation","async":false,"parameters":[],"returnType":"CatalogResourceRepresentation | undefined","isStatic":false,"isPublic":true},"setRepresentation":{"name":"setRepresentation","async":false,"parameters":[{"name":"value","type":"CatalogResourceRepresentation | undefined","optional":false,"unionBranches":[{"type":"CatalogResourceRepresentation"},{"type":"undefined"}]}],"returnType":"void","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtObject","exportName":"CatalogResource","collectionExportName":"CatalogResourceCollection","displayLabelField":"title","validationRules":[{"field":"providerId","rule":"required","fieldType":"text"},{"field":"stableId","rule":"required","fieldType":"text"},{"field":"revision","rule":"required","fieldType":"text"},{"field":"title","rule":"required","fieldType":"text"}],"schema":{"tableName":"catalog_resources","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_resources\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"provider_id\\" TEXT NOT NULL,\\n \\"stable_id\\" TEXT NOT NULL,\\n \\"revision\\" TEXT NOT NULL,\\n \\"canonical_url\\" TEXT,\\n \\"title\\" TEXT NOT NULL,\\n \\"supplied_description\\" TEXT,\\n \\"author\\" TEXT,\\n \\"subjects\\" TEXT,\\n \\"grades\\" TEXT,\\n \\"language\\" TEXT,\\n \\"resource_type\\" TEXT,\\n \\"parent_stable_id\\" TEXT,\\n \\"available_formats\\" TEXT,\\n \\"representation\\" TEXT,\\n \\"preview\\" TEXT,\\n \\"license_evidence\\" TEXT,\\n \\"license_state\\" TEXT DEFAULT 'unknown',\\n \\"visibility\\" TEXT DEFAULT 'catalog',\\n \\"last_seen_run_id\\" TEXT,\\n \\"withdrawn_at\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"provider_id":{"type":"TEXT","notNull":true,"unique":false},"stable_id":{"type":"TEXT","notNull":true,"unique":false},"revision":{"type":"TEXT","notNull":true,"unique":false},"canonical_url":{"type":"TEXT","notNull":false,"unique":false},"title":{"type":"TEXT","notNull":true,"unique":false},"supplied_description":{"type":"TEXT","notNull":false,"unique":false},"author":{"type":"TEXT","notNull":false,"unique":false},"subjects":{"type":"TEXT","notNull":false,"unique":false},"grades":{"type":"TEXT","notNull":false,"unique":false},"language":{"type":"TEXT","notNull":false,"unique":false},"resource_type":{"type":"TEXT","notNull":false,"unique":false},"parent_stable_id":{"type":"TEXT","notNull":false,"unique":false},"available_formats":{"type":"TEXT","notNull":false,"unique":false},"representation":{"type":"TEXT","notNull":false,"unique":false},"preview":{"type":"TEXT","notNull":false,"unique":false},"license_evidence":{"type":"TEXT","notNull":false,"unique":false},"license_state":{"type":"TEXT","notNull":false,"unique":false,"default":"unknown"},"visibility":{"type":"TEXT","notNull":false,"unique":false,"default":"catalog"},"last_seen_run_id":{"type":"TEXT","notNull":false,"unique":false},"withdrawn_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"catalog_resources_slug_context_idx","columns":["slug","context"],"unique":true},{"name":"catalog_resources_created_at_idx","columns":["created_at"]}],"version":"6ea66f0d"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogSyncState":{"name":"catalogsyncstate","className":"CatalogSyncState","qualifiedName":"@happyvertical/smrt-education:CatalogSyncState","collection":"catalogsyncstates","description":"Durable per-provider enumeration state. A failed or partial feed is never complete.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-models.ts","packageName":"@happyvertical/smrt-education","fields":{"providerId":{"type":"text","required":true,"_meta":{"required":true}},"cursor":{"type":"text","required":false},"runId":{"type":"text","required":false},"complete":{"type":"boolean","required":true,"default":false},"paused":{"type":"boolean","required":true,"default":false},"pauseReason":{"type":"text","required":false},"importedCount":{"type":"integer","required":true,"default":0},"failures":{"type":"text","required":false},"lastSuccessfulAt":{"type":"text","required":false}},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtObject","exportName":"CatalogSyncState","collectionExportName":"CatalogSyncStateCollection","validationRules":[{"field":"providerId","rule":"required","fieldType":"text"},{"field":"complete","rule":"required","fieldType":"boolean"},{"field":"paused","rule":"required","fieldType":"boolean"},{"field":"importedCount","rule":"required","fieldType":"integer"}],"schema":{"tableName":"catalog_sync_states","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_sync_states\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"provider_id\\" TEXT NOT NULL,\\n \\"cursor\\" TEXT,\\n \\"run_id\\" TEXT,\\n \\"complete\\" BOOLEAN NOT NULL DEFAULT FALSE,\\n \\"paused\\" BOOLEAN NOT NULL DEFAULT FALSE,\\n \\"pause_reason\\" TEXT,\\n \\"imported_count\\" INTEGER NOT NULL DEFAULT 0,\\n \\"failures\\" TEXT,\\n \\"last_successful_at\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"provider_id":{"type":"TEXT","notNull":true,"unique":false},"cursor":{"type":"TEXT","notNull":false,"unique":false},"run_id":{"type":"TEXT","notNull":false,"unique":false},"complete":{"type":"BOOLEAN","notNull":true,"unique":false,"default":false},"paused":{"type":"BOOLEAN","notNull":true,"unique":false,"default":false},"pause_reason":{"type":"TEXT","notNull":false,"unique":false},"imported_count":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"failures":{"type":"TEXT","notNull":false,"unique":false},"last_successful_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"catalog_sync_states_slug_context_idx","columns":["slug","context"],"unique":true},{"name":"catalog_sync_states_created_at_idx","columns":["created_at"]}],"version":"52dc3ee1"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogSelection":{"name":"catalogselection","className":"CatalogSelection","qualifiedName":"@happyvertical/smrt-education:CatalogSelection","collection":"catalogselections","description":"Tenant-owned intent to use a metadata record, distinct from acquiring bytes.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"resourceId":{"type":"foreignKey","required":true,"related":"CatalogResource","_meta":{"required":true}},"selectedByUserId":{"type":"text","required":true,"_meta":{"required":true}},"selectedRevision":{"type":"text","required":true,"_meta":{"required":true}}},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"CatalogSelection","collectionExportName":"CatalogSelectionCollection","validationRules":[{"field":"resourceId","rule":"required","fieldType":"foreignKey"},{"field":"selectedByUserId","rule":"required","fieldType":"text"},{"field":"selectedRevision","rule":"required","fieldType":"text"}],"schema":{"tableName":"catalog_selections","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_selections\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"resource_id\\" UUID NOT NULL,\\n \\"selected_by_user_id\\" TEXT NOT NULL,\\n \\"selected_revision\\" TEXT NOT NULL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"resource_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"catalog_resources","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"selected_by_user_id":{"type":"TEXT","notNull":true,"unique":false},"selected_revision":{"type":"TEXT","notNull":true,"unique":false}},"indexes":[{"name":"catalog_selections_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"catalog_selections_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"catalog_selections_resource_id_idx","columns":["resource_id"]}],"version":"c6b02eb9"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogAcquisition":{"name":"catalogacquisition","className":"CatalogAcquisition","qualifiedName":"@happyvertical/smrt-education:CatalogAcquisition","collection":"catalogacquisitions","description":"A pinned, tenant-owned acquisition record. Bytes belong in a host storage service.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"resourceId":{"type":"foreignKey","required":true,"related":"CatalogResource","_meta":{"required":true}},"selectionId":{"type":"foreignKey","required":true,"related":"CatalogSelection","_meta":{"required":true}},"revision":{"type":"text","required":true,"_meta":{"required":true}},"format":{"type":"text","required":true,"_meta":{"required":true}},"sha256":{"type":"text","required":true,"_meta":{"required":true}},"attribution":{"type":"text","required":false},"notices":{"type":"text","required":false}},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"CatalogAcquisition","collectionExportName":"CatalogAcquisitionCollection","validationRules":[{"field":"resourceId","rule":"required","fieldType":"foreignKey"},{"field":"selectionId","rule":"required","fieldType":"foreignKey"},{"field":"revision","rule":"required","fieldType":"text"},{"field":"format","rule":"required","fieldType":"text"},{"field":"sha256","rule":"required","fieldType":"text"}],"schema":{"tableName":"catalog_acquisitions","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_acquisitions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"resource_id\\" UUID NOT NULL,\\n \\"selection_id\\" UUID NOT NULL,\\n \\"revision\\" TEXT NOT NULL,\\n \\"format\\" TEXT NOT NULL,\\n \\"sha256\\" TEXT NOT NULL,\\n \\"attribution\\" TEXT,\\n \\"notices\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"resource_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"catalog_resources","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"selection_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"catalog_selections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"revision":{"type":"TEXT","notNull":true,"unique":false},"format":{"type":"TEXT","notNull":true,"unique":false},"sha256":{"type":"TEXT","notNull":true,"unique":false},"attribution":{"type":"TEXT","notNull":false,"unique":false},"notices":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"catalog_acquisitions_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"catalog_acquisitions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"catalog_acquisitions_resource_id_idx","columns":["resource_id"]},{"name":"catalog_acquisitions_selection_id_idx","columns":["selection_id"]}],"version":"ee9c5add"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Course":{"name":"course","className":"Course","qualifiedName":"@happyvertical/smrt-education:Course","collection":"courses","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true,"mode":"optional","field":"tenantId","allowSuperAdminBypass":false}}},"title":{"type":"text","required":true,"_meta":{"required":true}},"summary":{"type":"text","required":false},"description":{"type":"text","required":false},"sourceKey":{"type":"text","required":false},"sourceUrl":{"type":"text","required":false},"sourceRef":{"type":"text","required":false},"license":{"type":"text","required":false},"licenseKind":{"type":"text","required":false,"default":"own-work","enum":["own-work","open-license","personal-use-copy","licensed-for-sharing"]},"licenseNote":{"type":"text","required":false},"attestedBy":{"type":"text","required":false},"subject":{"type":"text","required":false},"tags":{"type":"text","required":false},"levelMin":{"type":"integer","required":true,"default":0},"levelMax":{"type":"integer","required":true,"default":0},"difficulty":{"type":"decimal","required":true,"default":0},"estimatedMinutes":{"type":"integer","required":true,"default":0},"modality":{"type":"text","required":false,"default":"online","enum":["online","printable","kit","video","game","mixed"]},"status":{"type":"text","required":false,"default":"draft","enum":["draft","published","archived"]}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableStrategy":"sti","api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"optional"},"conflictColumns":["tenant_id","slug","context","_meta_type"]},"extends":"SmrtObject","exportName":"Course","collectionExportName":"CourseCollection","displayLabelField":"title","validationRules":[{"field":"title","rule":"required","fieldType":"text"},{"field":"levelMin","rule":"required","fieldType":"integer"},{"field":"levelMax","rule":"required","fieldType":"integer"},{"field":"difficulty","rule":"required","fieldType":"decimal"},{"field":"estimatedMinutes","rule":"required","fieldType":"integer"}],"schema":{"tableName":"courses","ddl":"CREATE TABLE IF NOT EXISTS \\"courses\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"summary\\" TEXT,\\n \\"description\\" TEXT,\\n \\"source_key\\" TEXT,\\n \\"source_url\\" TEXT,\\n \\"source_ref\\" TEXT,\\n \\"license\\" TEXT,\\n \\"license_kind\\" TEXT DEFAULT 'own-work',\\n \\"license_note\\" TEXT,\\n \\"attested_by\\" TEXT,\\n \\"subject\\" TEXT,\\n \\"tags\\" TEXT,\\n \\"level_min\\" INTEGER DEFAULT 0,\\n \\"level_max\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"status\\" TEXT DEFAULT 'draft'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"title":{"type":"TEXT","notNull":false},"summary":{"type":"TEXT","notNull":false},"description":{"type":"TEXT","notNull":false},"source_key":{"type":"TEXT","notNull":false},"source_url":{"type":"TEXT","notNull":false},"source_ref":{"type":"TEXT","notNull":false},"license":{"type":"TEXT","notNull":false},"license_kind":{"type":"TEXT","notNull":false,"default":"own-work"},"license_note":{"type":"TEXT","notNull":false},"attested_by":{"type":"TEXT","notNull":false},"subject":{"type":"TEXT","notNull":false},"tags":{"type":"TEXT","notNull":false},"level_min":{"type":"INTEGER","notNull":false,"default":0},"level_max":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"status":{"type":"TEXT","notNull":false,"default":"draft"}},"indexes":[{"name":"courses_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"courses_meta_type_idx","columns":["_meta_type"]},{"name":"courses_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"88cc23ab"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:ExternalCourse":{"name":"externalcourse","className":"ExternalCourse","qualifiedName":"@happyvertical/smrt-education:ExternalCourse","collection":"courses","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true}}},"title":{"type":"text","required":true,"_meta":{"required":true}},"summary":{"type":"text","required":false},"description":{"type":"text","required":false},"sourceKey":{"type":"text","required":false},"sourceUrl":{"type":"text","required":false},"sourceRef":{"type":"text","required":false},"license":{"type":"text","required":false},"licenseKind":{"type":"text","required":false,"default":"own-work","enum":["own-work","open-license","personal-use-copy","licensed-for-sharing"]},"licenseNote":{"type":"text","required":false},"attestedBy":{"type":"text","required":false},"subject":{"type":"text","required":false},"tags":{"type":"text","required":false},"levelMin":{"type":"integer","required":true,"default":0},"levelMax":{"type":"integer","required":true,"default":0},"difficulty":{"type":"decimal","required":true,"default":0},"estimatedMinutes":{"type":"integer","required":true,"default":0},"modality":{"type":"text","required":false,"default":"online","enum":["online","printable","kit","video","game","mixed"]},"status":{"type":"text","required":false,"default":"draft","enum":["draft","published","archived"]}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"courses","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Course","exportName":"ExternalCourse","collectionExportName":"ExternalCourseCollection","displayLabelField":"title","validationRules":[{"field":"title","rule":"required","fieldType":"text"},{"field":"levelMin","rule":"required","fieldType":"integer"},{"field":"levelMax","rule":"required","fieldType":"integer"},{"field":"difficulty","rule":"required","fieldType":"decimal"},{"field":"estimatedMinutes","rule":"required","fieldType":"integer"}],"schema":{"tableName":"courses","ddl":"CREATE TABLE IF NOT EXISTS \\"courses\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"summary\\" TEXT,\\n \\"description\\" TEXT,\\n \\"source_key\\" TEXT,\\n \\"source_url\\" TEXT,\\n \\"source_ref\\" TEXT,\\n \\"license\\" TEXT,\\n \\"license_kind\\" TEXT DEFAULT 'own-work',\\n \\"license_note\\" TEXT,\\n \\"attested_by\\" TEXT,\\n \\"subject\\" TEXT,\\n \\"tags\\" TEXT,\\n \\"level_min\\" INTEGER DEFAULT 0,\\n \\"level_max\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"status\\" TEXT DEFAULT 'draft'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"title":{"type":"TEXT","notNull":false},"summary":{"type":"TEXT","notNull":false},"description":{"type":"TEXT","notNull":false},"source_key":{"type":"TEXT","notNull":false},"source_url":{"type":"TEXT","notNull":false},"source_ref":{"type":"TEXT","notNull":false},"license":{"type":"TEXT","notNull":false},"license_kind":{"type":"TEXT","notNull":false,"default":"own-work"},"license_note":{"type":"TEXT","notNull":false},"attested_by":{"type":"TEXT","notNull":false},"subject":{"type":"TEXT","notNull":false},"tags":{"type":"TEXT","notNull":false},"level_min":{"type":"INTEGER","notNull":false,"default":0},"level_max":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"status":{"type":"TEXT","notNull":false,"default":"draft"}},"indexes":[{"name":"courses_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"courses_meta_type_idx","columns":["_meta_type"]},{"name":"courses_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"88cc23ab"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:AuthoredCourse":{"name":"authoredcourse","className":"AuthoredCourse","qualifiedName":"@happyvertical/smrt-education:AuthoredCourse","collection":"courses","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true}}},"title":{"type":"text","required":true,"_meta":{"required":true}},"summary":{"type":"text","required":false},"description":{"type":"text","required":false},"sourceKey":{"type":"text","required":false},"sourceUrl":{"type":"text","required":false},"sourceRef":{"type":"text","required":false},"license":{"type":"text","required":false},"licenseKind":{"type":"text","required":false,"default":"own-work","enum":["own-work","open-license","personal-use-copy","licensed-for-sharing"]},"licenseNote":{"type":"text","required":false},"attestedBy":{"type":"text","required":false},"subject":{"type":"text","required":false},"tags":{"type":"text","required":false},"levelMin":{"type":"integer","required":true,"default":0},"levelMax":{"type":"integer","required":true,"default":0},"difficulty":{"type":"decimal","required":true,"default":0},"estimatedMinutes":{"type":"integer","required":true,"default":0},"modality":{"type":"text","required":false,"default":"online","enum":["online","printable","kit","video","game","mixed"]},"status":{"type":"text","required":false,"default":"draft","enum":["draft","published","archived"]}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"courses","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Course","exportName":"AuthoredCourse","collectionExportName":"AuthoredCourseCollection","displayLabelField":"title","validationRules":[{"field":"title","rule":"required","fieldType":"text"},{"field":"levelMin","rule":"required","fieldType":"integer"},{"field":"levelMax","rule":"required","fieldType":"integer"},{"field":"difficulty","rule":"required","fieldType":"decimal"},{"field":"estimatedMinutes","rule":"required","fieldType":"integer"}],"schema":{"tableName":"courses","ddl":"CREATE TABLE IF NOT EXISTS \\"courses\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"summary\\" TEXT,\\n \\"description\\" TEXT,\\n \\"source_key\\" TEXT,\\n \\"source_url\\" TEXT,\\n \\"source_ref\\" TEXT,\\n \\"license\\" TEXT,\\n \\"license_kind\\" TEXT DEFAULT 'own-work',\\n \\"license_note\\" TEXT,\\n \\"attested_by\\" TEXT,\\n \\"subject\\" TEXT,\\n \\"tags\\" TEXT,\\n \\"level_min\\" INTEGER DEFAULT 0,\\n \\"level_max\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"status\\" TEXT DEFAULT 'draft'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"title":{"type":"TEXT","notNull":false},"summary":{"type":"TEXT","notNull":false},"description":{"type":"TEXT","notNull":false},"source_key":{"type":"TEXT","notNull":false},"source_url":{"type":"TEXT","notNull":false},"source_ref":{"type":"TEXT","notNull":false},"license":{"type":"TEXT","notNull":false},"license_kind":{"type":"TEXT","notNull":false,"default":"own-work"},"license_note":{"type":"TEXT","notNull":false},"attested_by":{"type":"TEXT","notNull":false},"subject":{"type":"TEXT","notNull":false},"tags":{"type":"TEXT","notNull":false},"level_min":{"type":"INTEGER","notNull":false,"default":0},"level_max":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"status":{"type":"TEXT","notNull":false,"default":"draft"}},"indexes":[{"name":"courses_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"courses_meta_type_idx","columns":["_meta_type"]},{"name":"courses_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"88cc23ab"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CourseSection":{"name":"coursesection","className":"CourseSection","qualifiedName":"@happyvertical/smrt-education:CourseSection","collection":"coursesections","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true,"mode":"optional","field":"tenantId","allowSuperAdminBypass":false}}},"courseId":{"type":"foreignKey","required":true,"related":"Course","_meta":{"required":true}},"title":{"type":"text","required":true,"_meta":{"required":true}},"sortOrder":{"type":"integer","required":true,"default":0}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"optional"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"CourseSection","collectionExportName":"CourseSectionCollection","displayLabelField":"title","validationRules":[{"field":"courseId","rule":"required","fieldType":"foreignKey"},{"field":"title","rule":"required","fieldType":"text"},{"field":"sortOrder","rule":"required","fieldType":"integer"}],"schema":{"tableName":"course_sections","ddl":"CREATE TABLE IF NOT EXISTS \\"course_sections\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"course_id\\" UUID NOT NULL,\\n \\"title\\" TEXT NOT NULL,\\n \\"sort_order\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false,"unique":false},"course_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"courses","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":true,"unique":false},"sort_order":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"course_sections_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true,"nullsNotDistinct":true},{"name":"course_sections_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"course_sections_course_id_idx","columns":["course_id"]}],"version":"e20480d7"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Lesson":{"name":"lesson","className":"Lesson","qualifiedName":"@happyvertical/smrt-education:Lesson","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true,"mode":"optional","field":"tenantId","allowSuperAdminBypass":false}}},"sectionId":{"type":"foreignKey","required":true,"related":"CourseSection","_meta":{"required":true}},"title":{"type":"text","required":true,"_meta":{"required":true}},"body":{"type":"text","required":false},"sortOrder":{"type":"integer","required":true,"default":0},"estimatedMinutes":{"type":"integer","required":true,"default":0},"difficulty":{"type":"decimal","required":true,"default":0},"modality":{"type":"text","required":false,"default":"online","enum":["online","printable","kit","video","game","mixed"]},"completionRule":{"type":"text","required":false,"default":"attest","enum":["attest","submit","score","external"]},"externalRef":{"type":"text","required":false},"externalUrl":{"type":"text","required":false}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableStrategy":"sti","api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"optional"},"conflictColumns":["tenant_id","slug","context","_meta_type"]},"extends":"SmrtObject","exportName":"Lesson","collectionExportName":"LessonCollection","displayLabelField":"title","validationRules":[{"field":"sectionId","rule":"required","fieldType":"foreignKey"},{"field":"title","rule":"required","fieldType":"text"},{"field":"sortOrder","rule":"required","fieldType":"integer"},{"field":"estimatedMinutes","rule":"required","fieldType":"integer"},{"field":"difficulty","rule":"required","fieldType":"decimal"}],"schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"092df043"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Reading":{"name":"reading","className":"Reading","qualifiedName":"@happyvertical/smrt-education:Reading","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true}}},"sectionId":{"type":"foreignKey","required":true,"related":"CourseSection","_meta":{"required":true}},"title":{"type":"text","required":true,"_meta":{"required":true}},"body":{"type":"text","required":false},"sortOrder":{"type":"integer","required":true,"default":0},"estimatedMinutes":{"type":"integer","required":true,"default":0},"difficulty":{"type":"decimal","required":true,"default":0},"modality":{"type":"text","required":false,"default":"online","enum":["online","printable","kit","video","game","mixed"]},"completionRule":{"type":"text","required":false,"default":"attest","enum":["attest","submit","score","external"]},"externalRef":{"type":"text","required":false},"externalUrl":{"type":"text","required":false}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"lessons","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Lesson","exportName":"Reading","collectionExportName":"ReadingCollection","displayLabelField":"title","validationRules":[{"field":"sectionId","rule":"required","fieldType":"foreignKey"},{"field":"title","rule":"required","fieldType":"text"},{"field":"sortOrder","rule":"required","fieldType":"integer"},{"field":"estimatedMinutes","rule":"required","fieldType":"integer"},{"field":"difficulty","rule":"required","fieldType":"decimal"}],"schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"9d8b6fcd"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Video":{"name":"video","className":"Video","qualifiedName":"@happyvertical/smrt-education:Video","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true}}},"sectionId":{"type":"foreignKey","required":true,"related":"CourseSection","_meta":{"required":true}},"title":{"type":"text","required":true,"_meta":{"required":true}},"body":{"type":"text","required":false},"sortOrder":{"type":"integer","required":true,"default":0},"estimatedMinutes":{"type":"integer","required":true,"default":0},"difficulty":{"type":"decimal","required":true,"default":0},"modality":{"type":"text","required":false,"default":"online","enum":["online","printable","kit","video","game","mixed"]},"completionRule":{"type":"text","required":false,"default":"attest","enum":["attest","submit","score","external"]},"externalRef":{"type":"text","required":false},"externalUrl":{"type":"text","required":false},"videoUrl":{"type":"text","required":false}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"lessons","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Lesson","exportName":"Video","collectionExportName":"VideoCollection","displayLabelField":"title","validationRules":[{"field":"sectionId","rule":"required","fieldType":"foreignKey"},{"field":"title","rule":"required","fieldType":"text"},{"field":"sortOrder","rule":"required","fieldType":"integer"},{"field":"estimatedMinutes","rule":"required","fieldType":"integer"},{"field":"difficulty","rule":"required","fieldType":"decimal"}],"schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"9e0ef984"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Worksheet":{"name":"worksheet","className":"Worksheet","qualifiedName":"@happyvertical/smrt-education:Worksheet","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true}}},"sectionId":{"type":"foreignKey","required":true,"related":"CourseSection","_meta":{"required":true}},"title":{"type":"text","required":true,"_meta":{"required":true}},"body":{"type":"text","required":false},"sortOrder":{"type":"integer","required":true,"default":0},"estimatedMinutes":{"type":"integer","required":true,"default":0},"difficulty":{"type":"decimal","required":true,"default":0},"modality":{"type":"text","required":false,"default":"online","enum":["online","printable","kit","video","game","mixed"]},"completionRule":{"type":"text","required":false,"default":"submit","enum":["attest","submit","score","external"]},"externalRef":{"type":"text","required":false},"externalUrl":{"type":"text","required":false},"printableUrl":{"type":"text","required":false},"answerUrl":{"type":"text","required":false},"pages":{"type":"integer","required":true,"default":0}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"lessons","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Lesson","exportName":"Worksheet","collectionExportName":"WorksheetCollection","displayLabelField":"title","validationRules":[{"field":"sectionId","rule":"required","fieldType":"foreignKey"},{"field":"title","rule":"required","fieldType":"text"},{"field":"sortOrder","rule":"required","fieldType":"integer"},{"field":"estimatedMinutes","rule":"required","fieldType":"integer"},{"field":"difficulty","rule":"required","fieldType":"decimal"},{"field":"pages","rule":"required","fieldType":"integer"}],"schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"10976938"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Exercise":{"name":"exercise","className":"Exercise","qualifiedName":"@happyvertical/smrt-education:Exercise","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true}}},"sectionId":{"type":"foreignKey","required":true,"related":"CourseSection","_meta":{"required":true}},"title":{"type":"text","required":true,"_meta":{"required":true}},"body":{"type":"text","required":false},"sortOrder":{"type":"integer","required":true,"default":0},"estimatedMinutes":{"type":"integer","required":true,"default":0},"difficulty":{"type":"decimal","required":true,"default":0},"modality":{"type":"text","required":false,"default":"online","enum":["online","printable","kit","video","game","mixed"]},"completionRule":{"type":"text","required":false,"default":"attest","enum":["attest","submit","score","external"]},"externalRef":{"type":"text","required":false},"externalUrl":{"type":"text","required":false}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"lessons","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Lesson","exportName":"Exercise","collectionExportName":"ExerciseCollection","displayLabelField":"title","validationRules":[{"field":"sectionId","rule":"required","fieldType":"foreignKey"},{"field":"title","rule":"required","fieldType":"text"},{"field":"sortOrder","rule":"required","fieldType":"integer"},{"field":"estimatedMinutes","rule":"required","fieldType":"integer"},{"field":"difficulty","rule":"required","fieldType":"decimal"}],"schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"145eadbe"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CourseCollection":{"name":"coursecollection","className":"CourseCollection","qualifiedName":"@happyvertical/smrt-education:CourseCollection","collection":"courses","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Course","exportName":"CourseCollection","collectionExportName":"CourseCollectionCollection","schema":{"tableName":"courses","ddl":"CREATE TABLE IF NOT EXISTS \\"courses\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"summary\\" TEXT,\\n \\"description\\" TEXT,\\n \\"source_key\\" TEXT,\\n \\"source_url\\" TEXT,\\n \\"source_ref\\" TEXT,\\n \\"license\\" TEXT,\\n \\"license_kind\\" TEXT DEFAULT 'own-work',\\n \\"license_note\\" TEXT,\\n \\"attested_by\\" TEXT,\\n \\"subject\\" TEXT,\\n \\"tags\\" TEXT,\\n \\"level_min\\" INTEGER DEFAULT 0,\\n \\"level_max\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"status\\" TEXT DEFAULT 'draft'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"title":{"type":"TEXT","notNull":false},"summary":{"type":"TEXT","notNull":false},"description":{"type":"TEXT","notNull":false},"source_key":{"type":"TEXT","notNull":false},"source_url":{"type":"TEXT","notNull":false},"source_ref":{"type":"TEXT","notNull":false},"license":{"type":"TEXT","notNull":false},"license_kind":{"type":"TEXT","notNull":false,"default":"own-work"},"license_note":{"type":"TEXT","notNull":false},"attested_by":{"type":"TEXT","notNull":false},"subject":{"type":"TEXT","notNull":false},"tags":{"type":"TEXT","notNull":false},"level_min":{"type":"INTEGER","notNull":false,"default":0},"level_max":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"status":{"type":"TEXT","notNull":false,"default":"draft"}},"indexes":[{"name":"courses_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"courses_meta_type_idx","columns":["_meta_type"]},{"name":"courses_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"88cc23ab"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:ExternalCourseCollection":{"name":"externalcoursecollection","className":"ExternalCourseCollection","qualifiedName":"@happyvertical/smrt-education:ExternalCourseCollection","collection":"courses","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"courses","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"ExternalCourse","exportName":"ExternalCourseCollection","collectionExportName":"ExternalCourseCollectionCollection","schema":{"tableName":"courses","ddl":"CREATE TABLE IF NOT EXISTS \\"courses\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"summary\\" TEXT,\\n \\"description\\" TEXT,\\n \\"source_key\\" TEXT,\\n \\"source_url\\" TEXT,\\n \\"source_ref\\" TEXT,\\n \\"license\\" TEXT,\\n \\"license_kind\\" TEXT DEFAULT 'own-work',\\n \\"license_note\\" TEXT,\\n \\"attested_by\\" TEXT,\\n \\"subject\\" TEXT,\\n \\"tags\\" TEXT,\\n \\"level_min\\" INTEGER DEFAULT 0,\\n \\"level_max\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"status\\" TEXT DEFAULT 'draft'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"title":{"type":"TEXT","notNull":false},"summary":{"type":"TEXT","notNull":false},"description":{"type":"TEXT","notNull":false},"source_key":{"type":"TEXT","notNull":false},"source_url":{"type":"TEXT","notNull":false},"source_ref":{"type":"TEXT","notNull":false},"license":{"type":"TEXT","notNull":false},"license_kind":{"type":"TEXT","notNull":false,"default":"own-work"},"license_note":{"type":"TEXT","notNull":false},"attested_by":{"type":"TEXT","notNull":false},"subject":{"type":"TEXT","notNull":false},"tags":{"type":"TEXT","notNull":false},"level_min":{"type":"INTEGER","notNull":false,"default":0},"level_max":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"status":{"type":"TEXT","notNull":false,"default":"draft"}},"indexes":[{"name":"courses_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"courses_meta_type_idx","columns":["_meta_type"]},{"name":"courses_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"88cc23ab"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:AuthoredCourseCollection":{"name":"authoredcoursecollection","className":"AuthoredCourseCollection","qualifiedName":"@happyvertical/smrt-education:AuthoredCourseCollection","collection":"courses","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"courses","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"AuthoredCourse","exportName":"AuthoredCourseCollection","collectionExportName":"AuthoredCourseCollectionCollection","schema":{"tableName":"courses","ddl":"CREATE TABLE IF NOT EXISTS \\"courses\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"summary\\" TEXT,\\n \\"description\\" TEXT,\\n \\"source_key\\" TEXT,\\n \\"source_url\\" TEXT,\\n \\"source_ref\\" TEXT,\\n \\"license\\" TEXT,\\n \\"license_kind\\" TEXT DEFAULT 'own-work',\\n \\"license_note\\" TEXT,\\n \\"attested_by\\" TEXT,\\n \\"subject\\" TEXT,\\n \\"tags\\" TEXT,\\n \\"level_min\\" INTEGER DEFAULT 0,\\n \\"level_max\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"status\\" TEXT DEFAULT 'draft'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"title":{"type":"TEXT","notNull":false},"summary":{"type":"TEXT","notNull":false},"description":{"type":"TEXT","notNull":false},"source_key":{"type":"TEXT","notNull":false},"source_url":{"type":"TEXT","notNull":false},"source_ref":{"type":"TEXT","notNull":false},"license":{"type":"TEXT","notNull":false},"license_kind":{"type":"TEXT","notNull":false,"default":"own-work"},"license_note":{"type":"TEXT","notNull":false},"attested_by":{"type":"TEXT","notNull":false},"subject":{"type":"TEXT","notNull":false},"tags":{"type":"TEXT","notNull":false},"level_min":{"type":"INTEGER","notNull":false,"default":0},"level_max":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"status":{"type":"TEXT","notNull":false,"default":"draft"}},"indexes":[{"name":"courses_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"courses_meta_type_idx","columns":["_meta_type"]},{"name":"courses_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"88cc23ab"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CourseSectionCollection":{"name":"coursesectioncollection","className":"CourseSectionCollection","qualifiedName":"@happyvertical/smrt-education:CourseSectionCollection","collection":"coursesections","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"CourseSection","exportName":"CourseSectionCollection","collectionExportName":"CourseSectionCollectionCollection","schema":{"tableName":"course_sections","ddl":"CREATE TABLE IF NOT EXISTS \\"course_sections\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"course_id\\" UUID NOT NULL,\\n \\"title\\" TEXT NOT NULL,\\n \\"sort_order\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false,"unique":false},"course_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"courses","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":true,"unique":false},"sort_order":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"course_sections_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true,"nullsNotDistinct":true},{"name":"course_sections_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"course_sections_course_id_idx","columns":["course_id"]}],"version":"e20480d7"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:LessonCollection":{"name":"lessoncollection","className":"LessonCollection","qualifiedName":"@happyvertical/smrt-education:LessonCollection","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Lesson","exportName":"LessonCollection","collectionExportName":"LessonCollectionCollection","schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"092df043"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:ReadingCollection":{"name":"readingcollection","className":"ReadingCollection","qualifiedName":"@happyvertical/smrt-education:ReadingCollection","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"lessons","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Reading","exportName":"ReadingCollection","collectionExportName":"ReadingCollectionCollection","schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"9d8b6fcd"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:VideoCollection":{"name":"videocollection","className":"VideoCollection","qualifiedName":"@happyvertical/smrt-education:VideoCollection","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"lessons","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Video","exportName":"VideoCollection","collectionExportName":"VideoCollectionCollection","schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"9e0ef984"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorksheetCollection":{"name":"worksheetcollection","className":"WorksheetCollection","qualifiedName":"@happyvertical/smrt-education:WorksheetCollection","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"lessons","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Worksheet","exportName":"WorksheetCollection","collectionExportName":"WorksheetCollectionCollection","schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"10976938"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:ExerciseCollection":{"name":"exercisecollection","className":"ExerciseCollection","qualifiedName":"@happyvertical/smrt-education:ExerciseCollection","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"lessons","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Exercise","exportName":"ExerciseCollection","collectionExportName":"ExerciseCollectionCollection","schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"145eadbe"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:LessonAssetCollection":{"name":"lessonassetcollection","className":"LessonAssetCollection","qualifiedName":"@happyvertical/smrt-education:LessonAssetCollection","collection":"lessonassets","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{"byRight":{"name":"byRight","async":true,"parameters":[{"name":"rightId","type":"string","optional":false},{"name":"opts","type":"JunctionFilterOptions","optional":true}],"returnType":"Promise<TItem[]>","isStatic":false,"isPublic":true},"byLeft":{"name":"byLeft","async":true,"parameters":[{"name":"leftId","type":"string","optional":false},{"name":"opts","type":"JunctionFilterOptions","optional":true}],"returnType":"Promise<TItem[]>","isStatic":false,"isPublic":true},"attach":{"name":"attach","async":true,"parameters":[{"name":"leftId","type":"string","optional":false},{"name":"rightId","type":"string","optional":false},{"name":"opts","type":"JunctionAttachOptions","optional":true}],"returnType":"Promise<TItem>","isStatic":false,"isPublic":true},"detach":{"name":"detach","async":true,"parameters":[{"name":"leftId","type":"string","optional":false},{"name":"rightId","type":"string","optional":false},{"name":"opts","type":"JunctionFilterOptions","optional":true}],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"setLinks":{"name":"setLinks","async":true,"parameters":[{"name":"leftId","type":"string","optional":false},{"name":"rightIds","type":"string[]","optional":false},{"name":"opts","type":"JunctionAttachOptions","optional":true}],"returnType":"Promise<void>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"lesson_assets","api":false,"mcp":false,"cli":false},"extends":"SmrtJunction","extendsTypeArg":"LessonAsset","exportName":"LessonAssetCollection","collectionExportName":"LessonAssetCollectionCollection","schema":{"tableName":"lesson_assets","ddl":"CREATE TABLE IF NOT EXISTS \\"lesson_assets\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"lesson_id\\" UUID NOT NULL,\\n \\"asset_id\\" UUID NOT NULL,\\n \\"relationship\\" TEXT NOT NULL DEFAULT 'attachment',\\n \\"sort_order\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false,"unique":false},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"relationship":{"type":"TEXT","notNull":true,"unique":false,"default":"attachment"},"sort_order":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"lesson_assets_tenant_id_lesson_id_idx","columns":["tenant_id","lesson_id","asset_id","relationship"],"unique":true,"nullsNotDistinct":true},{"name":"lesson_assets_slug_context_idx","columns":["slug","context"]},{"name":"lesson_assets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lesson_assets_lesson_id_idx","columns":["lesson_id"]},{"name":"lesson_assets_asset_id_idx","columns":["asset_id"]}],"version":"d96385c6"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:LearnerCollection":{"name":"learnercollection","className":"LearnerCollection","qualifiedName":"@happyvertical/smrt-education:LearnerCollection","collection":"learners","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Learner","exportName":"LearnerCollection","collectionExportName":"LearnerCollectionCollection","schema":{"tableName":"learners","ddl":"CREATE TABLE IF NOT EXISTS \\"learners\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"user_id\\" UUID NOT NULL,\\n \\"profile_id\\" UUID NOT NULL,\\n \\"display_name\\" TEXT,\\n \\"birth_date\\" TIMESTAMP,\\n \\"level\\" INTEGER NOT NULL DEFAULT 0,\\n \\"settings\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"user_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"display_name":{"type":"TEXT","notNull":false,"unique":false},"birth_date":{"type":"TIMESTAMP","notNull":false,"unique":false},"level":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"settings":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"learners_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"learners_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"learners_user_id_idx","columns":["user_id"]},{"name":"learners_profile_id_idx","columns":["profile_id"]}],"version":"ca9907b5"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CurriculumCollection":{"name":"curriculumcollection","className":"CurriculumCollection","qualifiedName":"@happyvertical/smrt-education:CurriculumCollection","collection":"curriculums","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"curricula","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Curriculum","exportName":"CurriculumCollection","collectionExportName":"CurriculumCollectionCollection","schema":{"tableName":"curricula","ddl":"CREATE TABLE IF NOT EXISTS \\"curricula\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"title\\" TEXT NOT NULL,\\n \\"starts_on\\" TIMESTAMP,\\n \\"ends_on\\" TIMESTAMP,\\n \\"status\\" TEXT DEFAULT 'planned'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":true,"unique":false},"starts_on":{"type":"TIMESTAMP","notNull":false,"unique":false},"ends_on":{"type":"TIMESTAMP","notNull":false,"unique":false},"status":{"type":"TEXT","notNull":false,"unique":false,"default":"planned"}},"indexes":[{"name":"curricula_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"curricula_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"curricula_learner_id_idx","columns":["learner_id"]}],"version":"b7e90cbd"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:EnrollmentCollection":{"name":"enrollmentcollection","className":"EnrollmentCollection","qualifiedName":"@happyvertical/smrt-education:EnrollmentCollection","collection":"enrollments","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Enrollment","exportName":"EnrollmentCollection","collectionExportName":"EnrollmentCollectionCollection","schema":{"tableName":"enrollments","ddl":"CREATE TABLE IF NOT EXISTS \\"enrollments\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"curriculum_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"course_id\\" UUID NOT NULL,\\n \\"status\\" TEXT DEFAULT 'planned',\\n \\"started_at\\" TIMESTAMP,\\n \\"completed_at\\" TIMESTAMP,\\n \\"target_minutes_per_week\\" INTEGER NOT NULL DEFAULT 0,\\n \\"sort_order\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"curriculum_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"curricula","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"course_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"courses","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"status":{"type":"TEXT","notNull":false,"unique":false,"default":"planned"},"started_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"completed_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"target_minutes_per_week":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"sort_order":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"enrollments_tenant_id_curriculum_id_idx","columns":["tenant_id","curriculum_id","course_id"],"unique":true},{"name":"enrollments_slug_context_idx","columns":["slug","context"]},{"name":"enrollments_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"enrollments_curriculum_id_idx","columns":["curriculum_id"]},{"name":"enrollments_learner_id_idx","columns":["learner_id"]},{"name":"enrollments_course_id_idx","columns":["course_id"]}],"version":"2a34b5ee"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:LessonProgressCollection":{"name":"lessonprogresscollection","className":"LessonProgressCollection","qualifiedName":"@happyvertical/smrt-education:LessonProgressCollection","collection":"lessonprogresses","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"lesson_progress","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"LessonProgress","exportName":"LessonProgressCollection","collectionExportName":"LessonProgressCollectionCollection","schema":{"tableName":"lesson_progress","ddl":"CREATE TABLE IF NOT EXISTS \\"lesson_progress\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"enrollment_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"lesson_id\\" UUID NOT NULL,\\n \\"status\\" TEXT DEFAULT 'not_started',\\n \\"started_at\\" TIMESTAMP,\\n \\"completed_at\\" TIMESTAMP,\\n \\"time_spent_seconds\\" INTEGER NOT NULL DEFAULT 0,\\n \\"attempts\\" INTEGER NOT NULL DEFAULT 0,\\n \\"best_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"enrollment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"enrollments","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"status":{"type":"TEXT","notNull":false,"unique":false,"default":"not_started"},"started_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"completed_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"time_spent_seconds":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"attempts":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"best_score":{"type":"REAL","notNull":false,"unique":false}},"indexes":[{"name":"lesson_progress_tenant_id_enrollment_id_idx","columns":["tenant_id","enrollment_id","lesson_id"],"unique":true},{"name":"lesson_progress_slug_context_idx","columns":["slug","context"]},{"name":"lesson_progress_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lesson_progress_enrollment_id_idx","columns":["enrollment_id"]},{"name":"lesson_progress_learner_id_idx","columns":["learner_id"]},{"name":"lesson_progress_lesson_id_idx","columns":["lesson_id"]}],"version":"36704fbd"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:SubmissionCollection":{"name":"submissioncollection","className":"SubmissionCollection","qualifiedName":"@happyvertical/smrt-education:SubmissionCollection","collection":"submissions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Submission","exportName":"SubmissionCollection","collectionExportName":"SubmissionCollectionCollection","schema":{"tableName":"submissions","ddl":"CREATE TABLE IF NOT EXISTS \\"submissions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"learner_id\\" UUID,\\n \\"lesson_id\\" UUID,\\n \\"progress_id\\" UUID,\\n \\"submitted_at\\" TEXT,\\n \\"status\\" TEXT DEFAULT 'captured',\\n \\"notes\\" TEXT,\\n \\"capture_key\\" TEXT,\\n \\"capture_digest\\" TEXT,\\n \\"kind\\" TEXT DEFAULT 'completed_work',\\n \\"previous_submission_id\\" UUID,\\n \\"intake_item_id\\" TEXT,\\n \\"page_count\\" INTEGER DEFAULT 0,\\n \\"ocr_text\\" TEXT,\\n \\"extracted\\" TEXT,\\n \\"reported_by\\" TEXT DEFAULT 'learner',\\n \\"evidence_url\\" TEXT,\\n \\"reported_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"progress_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lesson_progress","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submitted_at":{"type":"TEXT","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"captured"},"notes":{"type":"TEXT","notNull":false},"capture_key":{"type":"TEXT","notNull":false},"capture_digest":{"type":"TEXT","notNull":false},"kind":{"type":"TEXT","notNull":false,"default":"completed_work"},"previous_submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_item_id":{"type":"TEXT","notNull":false},"page_count":{"type":"INTEGER","notNull":false,"default":0},"ocr_text":{"type":"TEXT","notNull":false},"extracted":{"type":"TEXT","notNull":false},"reported_by":{"type":"TEXT","notNull":false,"default":"learner"},"evidence_url":{"type":"TEXT","notNull":false},"reported_score":{"type":"REAL","notNull":false}},"indexes":[{"name":"submissions_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"submissions_meta_type_idx","columns":["_meta_type"]},{"name":"submissions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submissions_learner_id_idx","columns":["learner_id"]},{"name":"submissions_lesson_id_idx","columns":["lesson_id"]},{"name":"submissions_progress_id_idx","columns":["progress_id"]},{"name":"submissions_previous_submission_id_idx","columns":["previous_submission_id"]}],"version":"27a21ab4"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:SubmissionIntakeBindingCollection":{"name":"submissionintakebindingcollection","className":"SubmissionIntakeBindingCollection","qualifiedName":"@happyvertical/smrt-education:SubmissionIntakeBindingCollection","collection":"submissionintakebindings","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"submission_intake_bindings","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"SubmissionIntakeBinding","exportName":"SubmissionIntakeBindingCollection","collectionExportName":"SubmissionIntakeBindingCollectionCollection","schema":{"tableName":"submission_intake_bindings","ddl":"CREATE TABLE IF NOT EXISTS \\"submission_intake_bindings\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"intake_item_id\\" TEXT NOT NULL,\\n \\"submission_id\\" UUID NOT NULL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"intake_item_id":{"type":"TEXT","notNull":true,"unique":false},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}}},"indexes":[{"name":"submission_intake_bindings_tenant_id_intake_item_id_idx","columns":["tenant_id","intake_item_id"],"unique":true},{"name":"submission_intake_bindings_slug_context_idx","columns":["slug","context"]},{"name":"submission_intake_bindings_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submission_intake_bindings_submission_id_idx","columns":["submission_id"]}],"version":"7102c909"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:ScannedSubmissionCollection":{"name":"scannedsubmissioncollection","className":"ScannedSubmissionCollection","qualifiedName":"@happyvertical/smrt-education:ScannedSubmissionCollection","collection":"submissions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"submissions","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"ScannedSubmission","exportName":"ScannedSubmissionCollection","collectionExportName":"ScannedSubmissionCollectionCollection","schema":{"tableName":"submissions","ddl":"CREATE TABLE IF NOT EXISTS \\"submissions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"learner_id\\" UUID,\\n \\"lesson_id\\" UUID,\\n \\"progress_id\\" UUID,\\n \\"submitted_at\\" TEXT,\\n \\"status\\" TEXT DEFAULT 'captured',\\n \\"notes\\" TEXT,\\n \\"capture_key\\" TEXT,\\n \\"capture_digest\\" TEXT,\\n \\"kind\\" TEXT DEFAULT 'completed_work',\\n \\"previous_submission_id\\" UUID,\\n \\"intake_item_id\\" TEXT,\\n \\"page_count\\" INTEGER DEFAULT 0,\\n \\"ocr_text\\" TEXT,\\n \\"extracted\\" TEXT,\\n \\"reported_by\\" TEXT DEFAULT 'learner',\\n \\"evidence_url\\" TEXT,\\n \\"reported_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"progress_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lesson_progress","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submitted_at":{"type":"TEXT","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"captured"},"notes":{"type":"TEXT","notNull":false},"capture_key":{"type":"TEXT","notNull":false},"capture_digest":{"type":"TEXT","notNull":false},"kind":{"type":"TEXT","notNull":false,"default":"completed_work"},"previous_submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_item_id":{"type":"TEXT","notNull":false},"page_count":{"type":"INTEGER","notNull":false,"default":0},"ocr_text":{"type":"TEXT","notNull":false},"extracted":{"type":"TEXT","notNull":false},"reported_by":{"type":"TEXT","notNull":false,"default":"learner"},"evidence_url":{"type":"TEXT","notNull":false},"reported_score":{"type":"REAL","notNull":false}},"indexes":[{"name":"submissions_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"submissions_meta_type_idx","columns":["_meta_type"]},{"name":"submissions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submissions_learner_id_idx","columns":["learner_id"]},{"name":"submissions_lesson_id_idx","columns":["lesson_id"]},{"name":"submissions_progress_id_idx","columns":["progress_id"]},{"name":"submissions_previous_submission_id_idx","columns":["previous_submission_id"]}],"version":"7c394510"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:ExternalCompletionCollection":{"name":"externalcompletioncollection","className":"ExternalCompletionCollection","qualifiedName":"@happyvertical/smrt-education:ExternalCompletionCollection","collection":"submissions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"submissions","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"ExternalCompletion","exportName":"ExternalCompletionCollection","collectionExportName":"ExternalCompletionCollectionCollection","schema":{"tableName":"submissions","ddl":"CREATE TABLE IF NOT EXISTS \\"submissions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"learner_id\\" UUID,\\n \\"lesson_id\\" UUID,\\n \\"progress_id\\" UUID,\\n \\"submitted_at\\" TEXT,\\n \\"status\\" TEXT DEFAULT 'captured',\\n \\"notes\\" TEXT,\\n \\"capture_key\\" TEXT,\\n \\"capture_digest\\" TEXT,\\n \\"kind\\" TEXT DEFAULT 'completed_work',\\n \\"previous_submission_id\\" UUID,\\n \\"intake_item_id\\" TEXT,\\n \\"page_count\\" INTEGER DEFAULT 0,\\n \\"ocr_text\\" TEXT,\\n \\"extracted\\" TEXT,\\n \\"reported_by\\" TEXT DEFAULT 'learner',\\n \\"evidence_url\\" TEXT,\\n \\"reported_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"progress_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lesson_progress","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submitted_at":{"type":"TEXT","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"captured"},"notes":{"type":"TEXT","notNull":false},"capture_key":{"type":"TEXT","notNull":false},"capture_digest":{"type":"TEXT","notNull":false},"kind":{"type":"TEXT","notNull":false,"default":"completed_work"},"previous_submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_item_id":{"type":"TEXT","notNull":false},"page_count":{"type":"INTEGER","notNull":false,"default":0},"ocr_text":{"type":"TEXT","notNull":false},"extracted":{"type":"TEXT","notNull":false},"reported_by":{"type":"TEXT","notNull":false,"default":"learner"},"evidence_url":{"type":"TEXT","notNull":false},"reported_score":{"type":"REAL","notNull":false}},"indexes":[{"name":"submissions_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"submissions_meta_type_idx","columns":["_meta_type"]},{"name":"submissions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submissions_learner_id_idx","columns":["learner_id"]},{"name":"submissions_lesson_id_idx","columns":["lesson_id"]},{"name":"submissions_progress_id_idx","columns":["progress_id"]},{"name":"submissions_previous_submission_id_idx","columns":["previous_submission_id"]}],"version":"eff3715d"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:AttestationCollection":{"name":"attestationcollection","className":"AttestationCollection","qualifiedName":"@happyvertical/smrt-education:AttestationCollection","collection":"submissions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"submissions","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Attestation","exportName":"AttestationCollection","collectionExportName":"AttestationCollectionCollection","schema":{"tableName":"submissions","ddl":"CREATE TABLE IF NOT EXISTS \\"submissions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"learner_id\\" UUID,\\n \\"lesson_id\\" UUID,\\n \\"progress_id\\" UUID,\\n \\"submitted_at\\" TEXT,\\n \\"status\\" TEXT DEFAULT 'captured',\\n \\"notes\\" TEXT,\\n \\"capture_key\\" TEXT,\\n \\"capture_digest\\" TEXT,\\n \\"kind\\" TEXT DEFAULT 'completed_work',\\n \\"previous_submission_id\\" UUID,\\n \\"intake_item_id\\" TEXT,\\n \\"page_count\\" INTEGER DEFAULT 0,\\n \\"ocr_text\\" TEXT,\\n \\"extracted\\" TEXT,\\n \\"reported_by\\" TEXT DEFAULT 'learner',\\n \\"evidence_url\\" TEXT,\\n \\"reported_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"progress_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lesson_progress","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submitted_at":{"type":"TEXT","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"captured"},"notes":{"type":"TEXT","notNull":false},"capture_key":{"type":"TEXT","notNull":false},"capture_digest":{"type":"TEXT","notNull":false},"kind":{"type":"TEXT","notNull":false,"default":"completed_work"},"previous_submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_item_id":{"type":"TEXT","notNull":false},"page_count":{"type":"INTEGER","notNull":false,"default":0},"ocr_text":{"type":"TEXT","notNull":false},"extracted":{"type":"TEXT","notNull":false},"reported_by":{"type":"TEXT","notNull":false,"default":"learner"},"evidence_url":{"type":"TEXT","notNull":false},"reported_score":{"type":"REAL","notNull":false}},"indexes":[{"name":"submissions_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"submissions_meta_type_idx","columns":["_meta_type"]},{"name":"submissions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submissions_learner_id_idx","columns":["learner_id"]},{"name":"submissions_lesson_id_idx","columns":["lesson_id"]},{"name":"submissions_progress_id_idx","columns":["progress_id"]},{"name":"submissions_previous_submission_id_idx","columns":["previous_submission_id"]}],"version":"4f3230a3"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:GradeCollection":{"name":"gradecollection","className":"GradeCollection","qualifiedName":"@happyvertical/smrt-education:GradeCollection","collection":"grades","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Grade","exportName":"GradeCollection","collectionExportName":"GradeCollectionCollection","schema":{"tableName":"grades","ddl":"CREATE TABLE IF NOT EXISTS \\"grades\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"submission_id\\" UUID NOT NULL,\\n \\"grader_kind\\" TEXT NOT NULL DEFAULT 'auto',\\n \\"grader_profile_id\\" UUID,\\n \\"score\\" REAL,\\n \\"points_earned\\" INTEGER,\\n \\"points_possible\\" INTEGER,\\n \\"rubric_results\\" TEXT,\\n \\"feedback\\" TEXT,\\n \\"graded_at\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"grader_kind":{"type":"TEXT","notNull":true,"unique":false,"default":"auto"},"grader_profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"score":{"type":"REAL","notNull":false,"unique":false},"points_earned":{"type":"INTEGER","notNull":false,"unique":false},"points_possible":{"type":"INTEGER","notNull":false,"unique":false},"rubric_results":{"type":"TEXT","notNull":false,"unique":false},"feedback":{"type":"TEXT","notNull":false,"unique":false},"graded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"grades_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"grades_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"grades_submission_id_idx","columns":["submission_id"]},{"name":"grades_grader_profile_id_idx","columns":["grader_profile_id"]}],"version":"7d629fec"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:SubmissionAssetCollection":{"name":"submissionassetcollection","className":"SubmissionAssetCollection","qualifiedName":"@happyvertical/smrt-education:SubmissionAssetCollection","collection":"submissionassets","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{"byRight":{"name":"byRight","async":true,"parameters":[{"name":"rightId","type":"string","optional":false},{"name":"opts","type":"JunctionFilterOptions","optional":true}],"returnType":"Promise<TItem[]>","isStatic":false,"isPublic":true},"byLeft":{"name":"byLeft","async":true,"parameters":[{"name":"leftId","type":"string","optional":false},{"name":"opts","type":"JunctionFilterOptions","optional":true}],"returnType":"Promise<TItem[]>","isStatic":false,"isPublic":true},"attach":{"name":"attach","async":true,"parameters":[{"name":"leftId","type":"string","optional":false},{"name":"rightId","type":"string","optional":false},{"name":"opts","type":"JunctionAttachOptions","optional":true}],"returnType":"Promise<TItem>","isStatic":false,"isPublic":true},"detach":{"name":"detach","async":true,"parameters":[{"name":"leftId","type":"string","optional":false},{"name":"rightId","type":"string","optional":false},{"name":"opts","type":"JunctionFilterOptions","optional":true}],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"setLinks":{"name":"setLinks","async":true,"parameters":[{"name":"leftId","type":"string","optional":false},{"name":"rightIds","type":"string[]","optional":false},{"name":"opts","type":"JunctionAttachOptions","optional":true}],"returnType":"Promise<void>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"submission_assets","api":false,"mcp":false,"cli":false},"extends":"SmrtJunction","extendsTypeArg":"SubmissionAsset","exportName":"SubmissionAssetCollection","collectionExportName":"SubmissionAssetCollectionCollection","schema":{"tableName":"submission_assets","ddl":"CREATE TABLE IF NOT EXISTS \\"submission_assets\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"submission_id\\" UUID NOT NULL,\\n \\"asset_id\\" UUID NOT NULL,\\n \\"relationship\\" TEXT NOT NULL DEFAULT 'page',\\n \\"sort_order\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"relationship":{"type":"TEXT","notNull":true,"unique":false,"default":"page"},"sort_order":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"submission_assets_tenant_id_submission_id_idx","columns":["tenant_id","submission_id","asset_id","relationship"],"unique":true},{"name":"submission_assets_slug_context_idx","columns":["slug","context"]},{"name":"submission_assets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submission_assets_submission_id_idx","columns":["submission_id"]},{"name":"submission_assets_asset_id_idx","columns":["asset_id"]}],"version":"d9b61c8a"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CourseSource":{"name":"coursesource","className":"CourseSource","qualifiedName":"@happyvertical/smrt-education:CourseSource","collection":"coursesources","description":"Host-managed source policy; deliberately has no generated CRUD surface.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/course-source.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"key":{"type":"text","required":true,"_meta":{"required":true}},"name":{"type":"text","required":true,"_meta":{"required":true}},"kind":{"type":"text","required":false,"default":"adapter","enum":["manual","url","adapter"]},"adapterKey":{"type":"text","required":false},"config":{"type":"text","required":false},"sharing":{"type":"text","required":false,"default":"private","enum":["private","group","global"]}},"methods":{"getConfig":{"name":"getConfig","async":false,"parameters":[],"returnType":"CourseSourceConfig","isStatic":false,"isPublic":true},"setConfig":{"name":"setConfig","async":false,"parameters":[{"name":"value","type":"CourseSourceConfig","optional":false}],"returnType":"void","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"cli":false,"mcp":false,"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"CourseSource","collectionExportName":"CourseSourceCollection","displayLabelField":"name","validationRules":[{"field":"key","rule":"required","fieldType":"text"},{"field":"name","rule":"required","fieldType":"text"}],"schema":{"tableName":"course_sources","ddl":"CREATE TABLE IF NOT EXISTS \\"course_sources\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"key\\" TEXT NOT NULL,\\n \\"name\\" TEXT NOT NULL,\\n \\"kind\\" TEXT DEFAULT 'adapter',\\n \\"adapter_key\\" TEXT,\\n \\"config\\" TEXT,\\n \\"sharing\\" TEXT DEFAULT 'private'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"key":{"type":"TEXT","notNull":true,"unique":false},"name":{"type":"TEXT","notNull":true,"unique":false},"kind":{"type":"TEXT","notNull":false,"unique":false,"default":"adapter"},"adapter_key":{"type":"TEXT","notNull":false,"unique":false},"config":{"type":"TEXT","notNull":false,"unique":false},"sharing":{"type":"TEXT","notNull":false,"unique":false,"default":"private"}},"indexes":[{"name":"course_sources_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"course_sources_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"98177eb3"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CourseSourceCollection":{"name":"coursesourcecollection","className":"CourseSourceCollection","qualifiedName":"@happyvertical/smrt-education:CourseSourceCollection","collection":"coursesources","filePath":"/home/runner/work/smrt/smrt/packages/education/src/course-source.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"CourseSource","exportName":"CourseSourceCollection","collectionExportName":"CourseSourceCollectionCollection","schema":{"tableName":"course_sources","ddl":"CREATE TABLE IF NOT EXISTS \\"course_sources\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"key\\" TEXT NOT NULL,\\n \\"name\\" TEXT NOT NULL,\\n \\"kind\\" TEXT DEFAULT 'adapter',\\n \\"adapter_key\\" TEXT,\\n \\"config\\" TEXT,\\n \\"sharing\\" TEXT DEFAULT 'private'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"key":{"type":"TEXT","notNull":true,"unique":false},"name":{"type":"TEXT","notNull":true,"unique":false},"kind":{"type":"TEXT","notNull":false,"unique":false,"default":"adapter"},"adapter_key":{"type":"TEXT","notNull":false,"unique":false},"config":{"type":"TEXT","notNull":false,"unique":false},"sharing":{"type":"TEXT","notNull":false,"unique":false,"default":"private"}},"indexes":[{"name":"course_sources_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"course_sources_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"98177eb3"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:FamilyIntake":{"name":"familyintake","className":"FamilyIntake","qualifiedName":"@happyvertical/smrt-education:FamilyIntake","collection":"familyintakes","description":"Family-owned receipt, independent of learner attribution and ingestion expiry.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/family-intake-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"itemId":{"type":"text","required":false},"actorUserId":{"type":"text","required":false},"ownerProfileId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-profiles:Profile"},"contentDigest":{"type":"text","required":false},"sourceJson":{"type":"text","required":false,"_meta":{}}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true},"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"family_intakes","conflictColumns":["tenant_id","item_id"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"FamilyIntake","collectionExportName":"FamilyIntakeCollection","validationRules":[],"schema":{"tableName":"family_intakes","ddl":"CREATE TABLE IF NOT EXISTS \\"family_intakes\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"item_id\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"owner_profile_id\\" UUID,\\n \\"content_digest\\" TEXT,\\n \\"source_json\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"item_id":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"owner_profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"content_digest":{"type":"TEXT","notNull":false,"unique":false},"source_json":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"family_intakes_tenant_id_item_id_idx","columns":["tenant_id","item_id"],"unique":true,"nullsNotDistinct":true},{"name":"family_intakes_slug_context_idx","columns":["slug","context"]},{"name":"family_intakes_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"family_intakes_owner_profile_id_idx","columns":["owner_profile_id"]}],"version":"2577578b"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:FamilyIntakeCollection":{"name":"familyintakecollection","className":"FamilyIntakeCollection","qualifiedName":"@happyvertical/smrt-education:FamilyIntakeCollection","collection":"familyintakes","filePath":"/home/runner/work/smrt/smrt/packages/education/src/family-intake-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"family_intakes","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"FamilyIntake","exportName":"FamilyIntakeCollection","collectionExportName":"FamilyIntakeCollectionCollection","schema":{"tableName":"family_intakes","ddl":"CREATE TABLE IF NOT EXISTS \\"family_intakes\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"item_id\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"owner_profile_id\\" UUID,\\n \\"content_digest\\" TEXT,\\n \\"source_json\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"item_id":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"owner_profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"content_digest":{"type":"TEXT","notNull":false,"unique":false},"source_json":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"family_intakes_tenant_id_item_id_idx","columns":["tenant_id","item_id"],"unique":true,"nullsNotDistinct":true},{"name":"family_intakes_slug_context_idx","columns":["slug","context"]},{"name":"family_intakes_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"family_intakes_owner_profile_id_idx","columns":["owner_profile_id"]}],"version":"2577578b"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:FamilyIntakeAsset":{"name":"familyintakeasset","className":"FamilyIntakeAsset","qualifiedName":"@happyvertical/smrt-education:FamilyIntakeAsset","collection":"familyintakeassets","description":"Sole family owner join; adoption borrows this exact immutable original.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/family-intake-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"intakeId":{"type":"foreignKey","required":true,"related":"FamilyIntake","_meta":{"required":true}},"assetId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-assets:Asset"},"name":{"type":"text","required":false},"mimeType":{"type":"text","required":false},"sha256":{"type":"text","required":false},"position":{"type":"integer","required":true,"default":0}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true},"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"family_intake_assets","conflictColumns":["tenant_id","intake_id","asset_id"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"FamilyIntakeAsset","collectionExportName":"FamilyIntakeAssetCollection","displayLabelField":"name","validationRules":[{"field":"intakeId","rule":"required","fieldType":"foreignKey"},{"field":"position","rule":"required","fieldType":"integer"}],"schema":{"tableName":"family_intake_assets","ddl":"CREATE TABLE IF NOT EXISTS \\"family_intake_assets\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"intake_id\\" UUID NOT NULL,\\n \\"asset_id\\" UUID,\\n \\"name\\" TEXT,\\n \\"mime_type\\" TEXT,\\n \\"sha256\\" TEXT,\\n \\"position\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"family_intakes","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"name":{"type":"TEXT","notNull":false,"unique":false},"mime_type":{"type":"TEXT","notNull":false,"unique":false},"sha256":{"type":"TEXT","notNull":false,"unique":false},"position":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"family_intake_assets_tenant_id_intake_id_idx","columns":["tenant_id","intake_id","asset_id"],"unique":true,"nullsNotDistinct":true},{"name":"family_intake_assets_slug_context_idx","columns":["slug","context"]},{"name":"family_intake_assets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"family_intake_assets_intake_id_idx","columns":["intake_id"]},{"name":"family_intake_assets_asset_id_idx","columns":["asset_id"]}],"version":"3811d126"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:FamilyIntakeAssetCollection":{"name":"familyintakeassetcollection","className":"FamilyIntakeAssetCollection","qualifiedName":"@happyvertical/smrt-education:FamilyIntakeAssetCollection","collection":"familyintakeassets","filePath":"/home/runner/work/smrt/smrt/packages/education/src/family-intake-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"family_intake_assets","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"FamilyIntakeAsset","exportName":"FamilyIntakeAssetCollection","collectionExportName":"FamilyIntakeAssetCollectionCollection","schema":{"tableName":"family_intake_assets","ddl":"CREATE TABLE IF NOT EXISTS \\"family_intake_assets\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"intake_id\\" UUID NOT NULL,\\n \\"asset_id\\" UUID,\\n \\"name\\" TEXT,\\n \\"mime_type\\" TEXT,\\n \\"sha256\\" TEXT,\\n \\"position\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"family_intakes","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"name":{"type":"TEXT","notNull":false,"unique":false},"mime_type":{"type":"TEXT","notNull":false,"unique":false},"sha256":{"type":"TEXT","notNull":false,"unique":false},"position":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"family_intake_assets_tenant_id_intake_id_idx","columns":["tenant_id","intake_id","asset_id"],"unique":true,"nullsNotDistinct":true},{"name":"family_intake_assets_slug_context_idx","columns":["slug","context"]},{"name":"family_intake_assets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"family_intake_assets_intake_id_idx","columns":["intake_id"]},{"name":"family_intake_assets_asset_id_idx","columns":["asset_id"]}],"version":"3811d126"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:FamilyIntakeDecision":{"name":"familyintakedecision","className":"FamilyIntakeDecision","qualifiedName":"@happyvertical/smrt-education:FamilyIntakeDecision","collection":"familyintakedecisions","description":"Append-only attribution/adoption audit; no marks or learning outcomes.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/family-intake-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"intakeId":{"type":"foreignKey","required":true,"related":"FamilyIntake","_meta":{"required":true}},"requestKey":{"type":"text","required":false},"sequence":{"type":"integer","required":true,"default":0},"actorUserId":{"type":"text","required":false},"bodyJson":{"type":"text","required":false,"_meta":{}}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true},"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"family_intake_decisions","conflictColumns":["tenant_id","intake_id","request_key"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"FamilyIntakeDecision","collectionExportName":"FamilyIntakeDecisionCollection","validationRules":[{"field":"intakeId","rule":"required","fieldType":"foreignKey"},{"field":"sequence","rule":"required","fieldType":"integer"}],"schema":{"tableName":"family_intake_decisions","ddl":"CREATE TABLE IF NOT EXISTS \\"family_intake_decisions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"intake_id\\" UUID NOT NULL,\\n \\"request_key\\" TEXT,\\n \\"sequence\\" INTEGER NOT NULL DEFAULT 0,\\n \\"actor_user_id\\" TEXT,\\n \\"body_json\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"family_intakes","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":false,"unique":false},"sequence":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"body_json":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"family_intake_decisions_tenant_id_intake_id_idx","columns":["tenant_id","intake_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"family_intake_decisions_slug_context_idx","columns":["slug","context"]},{"name":"family_intake_decisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"family_intake_decisions_intake_id_idx","columns":["intake_id"]}],"version":"08875c81"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:FamilyIntakeDecisionCollection":{"name":"familyintakedecisioncollection","className":"FamilyIntakeDecisionCollection","qualifiedName":"@happyvertical/smrt-education:FamilyIntakeDecisionCollection","collection":"familyintakedecisions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/family-intake-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"family_intake_decisions","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"FamilyIntakeDecision","exportName":"FamilyIntakeDecisionCollection","collectionExportName":"FamilyIntakeDecisionCollectionCollection","schema":{"tableName":"family_intake_decisions","ddl":"CREATE TABLE IF NOT EXISTS \\"family_intake_decisions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"intake_id\\" UUID NOT NULL,\\n \\"request_key\\" TEXT,\\n \\"sequence\\" INTEGER NOT NULL DEFAULT 0,\\n \\"actor_user_id\\" TEXT,\\n \\"body_json\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"family_intakes","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":false,"unique":false},"sequence":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"body_json":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"family_intake_decisions_tenant_id_intake_id_idx","columns":["tenant_id","intake_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"family_intake_decisions_slug_context_idx","columns":["slug","context"]},{"name":"family_intake_decisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"family_intake_decisions_intake_id_idx","columns":["intake_id"]}],"version":"08875c81"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Learner":{"name":"learner","className":"Learner","qualifiedName":"@happyvertical/smrt-education:Learner","collection":"learners","description":"A learner is a real user/profile identity with active family membership.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/learners.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"userId":{"type":"crossPackageRef","required":true,"related":"@happyvertical/smrt-users:User"},"profileId":{"type":"crossPackageRef","required":true,"related":"@happyvertical/smrt-profiles:Profile"},"displayName":{"type":"text","required":false},"birthDate":{"type":"datetime","required":false},"level":{"type":"integer","required":true,"default":0},"settings":{"type":"text","required":false}},"methods":{"getSettings":{"name":"getSettings","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true},"setSettings":{"name":"setSettings","async":false,"parameters":[{"name":"value","type":"Record<string, unknown>","optional":false}],"returnType":"void","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"Learner","collectionExportName":"LearnerCollection","validationRules":[{"field":"userId","rule":"required","fieldType":"crossPackageRef"},{"field":"profileId","rule":"required","fieldType":"crossPackageRef"},{"field":"level","rule":"required","fieldType":"integer"}],"schema":{"tableName":"learners","ddl":"CREATE TABLE IF NOT EXISTS \\"learners\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"user_id\\" UUID NOT NULL,\\n \\"profile_id\\" UUID NOT NULL,\\n \\"display_name\\" TEXT,\\n \\"birth_date\\" TIMESTAMP,\\n \\"level\\" INTEGER NOT NULL DEFAULT 0,\\n \\"settings\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"user_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"display_name":{"type":"TEXT","notNull":false,"unique":false},"birth_date":{"type":"TIMESTAMP","notNull":false,"unique":false},"level":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"settings":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"learners_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"learners_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"learners_user_id_idx","columns":["user_id"]},{"name":"learners_profile_id_idx","columns":["profile_id"]}],"version":"ca9907b5"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Curriculum":{"name":"curriculum","className":"Curriculum","qualifiedName":"@happyvertical/smrt-education:Curriculum","collection":"curriculums","description":"A distinct plan retains its own enrollment history.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/learners.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"title":{"type":"text","required":true,"_meta":{"required":true}},"startsOn":{"type":"datetime","required":false},"endsOn":{"type":"datetime","required":false},"status":{"type":"text","required":false,"default":"planned","enum":["planned","active","completed","archived"]}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"tableName":"curricula","tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"Curriculum","collectionExportName":"CurriculumCollection","displayLabelField":"title","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"title","rule":"required","fieldType":"text"}],"schema":{"tableName":"curricula","ddl":"CREATE TABLE IF NOT EXISTS \\"curricula\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"title\\" TEXT NOT NULL,\\n \\"starts_on\\" TIMESTAMP,\\n \\"ends_on\\" TIMESTAMP,\\n \\"status\\" TEXT DEFAULT 'planned'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":true,"unique":false},"starts_on":{"type":"TIMESTAMP","notNull":false,"unique":false},"ends_on":{"type":"TIMESTAMP","notNull":false,"unique":false},"status":{"type":"TEXT","notNull":false,"unique":false,"default":"planned"}},"indexes":[{"name":"curricula_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"curricula_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"curricula_learner_id_idx","columns":["learner_id"]}],"version":"b7e90cbd"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Enrollment":{"name":"enrollment","className":"Enrollment","qualifiedName":"@happyvertical/smrt-education:Enrollment","collection":"enrollments","description":"One course in one curriculum; a new curriculum means a new enrollment.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/learners.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"curriculumId":{"type":"foreignKey","required":true,"related":"Curriculum","_meta":{"required":true}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"courseId":{"type":"foreignKey","required":true,"related":"Course","_meta":{"required":true}},"status":{"type":"text","required":false,"default":"planned","enum":["planned","active","paused","completed","dropped"]},"startedAt":{"type":"datetime","required":false},"completedAt":{"type":"datetime","required":false},"targetMinutesPerWeek":{"type":"integer","required":true,"default":0},"sortOrder":{"type":"integer","required":true,"default":0}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"conflictColumns":["tenant_id","curriculum_id","course_id"],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"Enrollment","collectionExportName":"EnrollmentCollection","validationRules":[{"field":"curriculumId","rule":"required","fieldType":"foreignKey"},{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"courseId","rule":"required","fieldType":"foreignKey"},{"field":"targetMinutesPerWeek","rule":"required","fieldType":"integer"},{"field":"sortOrder","rule":"required","fieldType":"integer"}],"schema":{"tableName":"enrollments","ddl":"CREATE TABLE IF NOT EXISTS \\"enrollments\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"curriculum_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"course_id\\" UUID NOT NULL,\\n \\"status\\" TEXT DEFAULT 'planned',\\n \\"started_at\\" TIMESTAMP,\\n \\"completed_at\\" TIMESTAMP,\\n \\"target_minutes_per_week\\" INTEGER NOT NULL DEFAULT 0,\\n \\"sort_order\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"curriculum_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"curricula","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"course_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"courses","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"status":{"type":"TEXT","notNull":false,"unique":false,"default":"planned"},"started_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"completed_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"target_minutes_per_week":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"sort_order":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"enrollments_tenant_id_curriculum_id_idx","columns":["tenant_id","curriculum_id","course_id"],"unique":true},{"name":"enrollments_slug_context_idx","columns":["slug","context"]},{"name":"enrollments_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"enrollments_curriculum_id_idx","columns":["curriculum_id"]},{"name":"enrollments_learner_id_idx","columns":["learner_id"]},{"name":"enrollments_course_id_idx","columns":["course_id"]}],"version":"2a34b5ee"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:LessonProgress":{"name":"lessonprogress","className":"LessonProgress","qualifiedName":"@happyvertical/smrt-education:LessonProgress","collection":"lessonprogresses","description":"Progress identity is enrollment + lesson, never learner + lesson.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/learners.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"enrollmentId":{"type":"foreignKey","required":true,"related":"Enrollment","_meta":{"required":true}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"lessonId":{"type":"foreignKey","required":true,"related":"Lesson","_meta":{"required":true}},"status":{"type":"text","required":false,"default":"not_started","enum":["not_started","in_progress","submitted","needs_review","complete","skipped"]},"startedAt":{"type":"datetime","required":false},"completedAt":{"type":"datetime","required":false},"timeSpentSeconds":{"type":"integer","required":true,"default":0},"attempts":{"type":"integer","required":true,"default":0},"bestScore":{"type":"decimal","required":false,"_meta":{"nullable":true}}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"tableName":"lesson_progress","conflictColumns":["tenant_id","enrollment_id","lesson_id"],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"LessonProgress","collectionExportName":"LessonProgressCollection","validationRules":[{"field":"enrollmentId","rule":"required","fieldType":"foreignKey"},{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"lessonId","rule":"required","fieldType":"foreignKey"},{"field":"timeSpentSeconds","rule":"required","fieldType":"integer"},{"field":"attempts","rule":"required","fieldType":"integer"}],"schema":{"tableName":"lesson_progress","ddl":"CREATE TABLE IF NOT EXISTS \\"lesson_progress\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"enrollment_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"lesson_id\\" UUID NOT NULL,\\n \\"status\\" TEXT DEFAULT 'not_started',\\n \\"started_at\\" TIMESTAMP,\\n \\"completed_at\\" TIMESTAMP,\\n \\"time_spent_seconds\\" INTEGER NOT NULL DEFAULT 0,\\n \\"attempts\\" INTEGER NOT NULL DEFAULT 0,\\n \\"best_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"enrollment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"enrollments","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"status":{"type":"TEXT","notNull":false,"unique":false,"default":"not_started"},"started_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"completed_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"time_spent_seconds":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"attempts":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"best_score":{"type":"REAL","notNull":false,"unique":false}},"indexes":[{"name":"lesson_progress_tenant_id_enrollment_id_idx","columns":["tenant_id","enrollment_id","lesson_id"],"unique":true},{"name":"lesson_progress_slug_context_idx","columns":["slug","context"]},{"name":"lesson_progress_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lesson_progress_enrollment_id_idx","columns":["enrollment_id"]},{"name":"lesson_progress_learner_id_idx","columns":["learner_id"]},{"name":"lesson_progress_lesson_id_idx","columns":["lesson_id"]}],"version":"36704fbd"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:LessonAsset":{"name":"lessonasset","className":"LessonAsset","qualifiedName":"@happyvertical/smrt-education:LessonAsset","collection":"lessonassets","filePath":"/home/runner/work/smrt/smrt/packages/education/src/lesson-assets.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true,"mode":"optional","field":"tenantId","allowSuperAdminBypass":false}}},"lessonId":{"type":"foreignKey","required":true,"related":"Lesson","_meta":{"required":true}},"assetId":{"type":"crossPackageRef","required":true,"related":"@happyvertical/smrt-assets:Asset"},"relationship":{"type":"text","required":true,"default":"attachment","_meta":{"required":true},"enum":["printable","answer-key","video","attachment"]},"sortOrder":{"type":"integer","required":true,"default":0}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"lesson_assets","conflictColumns":["tenant_id","lesson_id","asset_id","relationship"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"optional"}},"extends":"SmrtObject","exportName":"LessonAsset","collectionExportName":"LessonAssetCollection","validationRules":[{"field":"lessonId","rule":"required","fieldType":"foreignKey"},{"field":"assetId","rule":"required","fieldType":"crossPackageRef"},{"field":"relationship","rule":"required","fieldType":"text"},{"field":"sortOrder","rule":"required","fieldType":"integer"}],"schema":{"tableName":"lesson_assets","ddl":"CREATE TABLE IF NOT EXISTS \\"lesson_assets\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"lesson_id\\" UUID NOT NULL,\\n \\"asset_id\\" UUID NOT NULL,\\n \\"relationship\\" TEXT NOT NULL DEFAULT 'attachment',\\n \\"sort_order\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false,"unique":false},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"relationship":{"type":"TEXT","notNull":true,"unique":false,"default":"attachment"},"sort_order":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"lesson_assets_tenant_id_lesson_id_idx","columns":["tenant_id","lesson_id","asset_id","relationship"],"unique":true,"nullsNotDistinct":true},{"name":"lesson_assets_slug_context_idx","columns":["slug","context"]},{"name":"lesson_assets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lesson_assets_lesson_id_idx","columns":["lesson_id"]},{"name":"lesson_assets_asset_id_idx","columns":["asset_id"]}],"version":"d96385c6"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Submission":{"name":"submission","className":"Submission","qualifiedName":"@happyvertical/smrt-education:Submission","collection":"submissions","description":"Evidence that a learner completed one progress item.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/submissions.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"lessonId":{"type":"foreignKey","required":true,"related":"Lesson","_meta":{"required":true}},"progressId":{"type":"foreignKey","required":true,"related":"LessonProgress","_meta":{"required":true}},"submittedAt":{"type":"text","required":false},"status":{"type":"text","required":false,"default":"captured","enum":["captured","extracting","needs_review","graded","rejected"]},"notes":{"type":"text","required":false},"captureKey":{"type":"text","required":false},"captureDigest":{"type":"text","required":false},"kind":{"type":"text","required":true,"default":"completed_work","_meta":{"required":true},"enum":["blank_reference","completed_work"]},"previousSubmissionId":{"type":"foreignKey","required":false,"related":"Submission","_meta":{"nullable":true}},"intakeItemId":{"type":"text","required":false,"_meta":{"nullable":true}}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableStrategy":"sti","api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context","_meta_type"]},"extends":"SmrtObject","exportName":"Submission","collectionExportName":"SubmissionCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"lessonId","rule":"required","fieldType":"foreignKey"},{"field":"progressId","rule":"required","fieldType":"foreignKey"},{"field":"kind","rule":"required","fieldType":"text"}],"schema":{"tableName":"submissions","ddl":"CREATE TABLE IF NOT EXISTS \\"submissions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"learner_id\\" UUID,\\n \\"lesson_id\\" UUID,\\n \\"progress_id\\" UUID,\\n \\"submitted_at\\" TEXT,\\n \\"status\\" TEXT DEFAULT 'captured',\\n \\"notes\\" TEXT,\\n \\"capture_key\\" TEXT,\\n \\"capture_digest\\" TEXT,\\n \\"kind\\" TEXT DEFAULT 'completed_work',\\n \\"previous_submission_id\\" UUID,\\n \\"intake_item_id\\" TEXT,\\n \\"page_count\\" INTEGER DEFAULT 0,\\n \\"ocr_text\\" TEXT,\\n \\"extracted\\" TEXT,\\n \\"reported_by\\" TEXT DEFAULT 'learner',\\n \\"evidence_url\\" TEXT,\\n \\"reported_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"progress_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lesson_progress","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submitted_at":{"type":"TEXT","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"captured"},"notes":{"type":"TEXT","notNull":false},"capture_key":{"type":"TEXT","notNull":false},"capture_digest":{"type":"TEXT","notNull":false},"kind":{"type":"TEXT","notNull":false,"default":"completed_work"},"previous_submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_item_id":{"type":"TEXT","notNull":false},"page_count":{"type":"INTEGER","notNull":false,"default":0},"ocr_text":{"type":"TEXT","notNull":false},"extracted":{"type":"TEXT","notNull":false},"reported_by":{"type":"TEXT","notNull":false,"default":"learner"},"evidence_url":{"type":"TEXT","notNull":false},"reported_score":{"type":"REAL","notNull":false}},"indexes":[{"name":"submissions_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"submissions_meta_type_idx","columns":["_meta_type"]},{"name":"submissions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submissions_learner_id_idx","columns":["learner_id"]},{"name":"submissions_lesson_id_idx","columns":["lesson_id"]},{"name":"submissions_progress_id_idx","columns":["progress_id"]},{"name":"submissions_previous_submission_id_idx","columns":["previous_submission_id"]}],"version":"27a21ab4"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:SubmissionIntakeBinding":{"name":"submissionintakebinding","className":"SubmissionIntakeBinding","qualifiedName":"@happyvertical/smrt-education:SubmissionIntakeBinding","collection":"submissionintakebindings","description":"Durable tenant/item claim for trusted ingestion receipts. This separate table keeps ordinary uploads (which have no intake item) out of the uniqueness key.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/submissions.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"intakeItemId":{"type":"text","required":true,"_meta":{"required":true}},"submissionId":{"type":"foreignKey","required":true,"related":"Submission","_meta":{"required":true}}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"submission_intake_bindings","api":false,"mcp":false,"cli":false,"conflictColumns":["tenant_id","intake_item_id"],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"SubmissionIntakeBinding","collectionExportName":"SubmissionIntakeBindingCollection","validationRules":[{"field":"intakeItemId","rule":"required","fieldType":"text"},{"field":"submissionId","rule":"required","fieldType":"foreignKey"}],"schema":{"tableName":"submission_intake_bindings","ddl":"CREATE TABLE IF NOT EXISTS \\"submission_intake_bindings\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"intake_item_id\\" TEXT NOT NULL,\\n \\"submission_id\\" UUID NOT NULL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"intake_item_id":{"type":"TEXT","notNull":true,"unique":false},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}}},"indexes":[{"name":"submission_intake_bindings_tenant_id_intake_item_id_idx","columns":["tenant_id","intake_item_id"],"unique":true},{"name":"submission_intake_bindings_slug_context_idx","columns":["slug","context"]},{"name":"submission_intake_bindings_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submission_intake_bindings_submission_id_idx","columns":["submission_id"]}],"version":"7102c909"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:ScannedSubmission":{"name":"scannedsubmission","className":"ScannedSubmission","qualifiedName":"@happyvertical/smrt-education:ScannedSubmission","collection":"submissions","description":"Photos or scans of work submitted for review.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/submissions.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"lessonId":{"type":"foreignKey","required":true,"related":"Lesson","_meta":{"required":true}},"progressId":{"type":"foreignKey","required":true,"related":"LessonProgress","_meta":{"required":true}},"submittedAt":{"type":"text","required":false},"status":{"type":"text","required":false,"default":"captured","enum":["captured","extracting","needs_review","graded","rejected"]},"notes":{"type":"text","required":false},"captureKey":{"type":"text","required":false},"captureDigest":{"type":"text","required":false},"kind":{"type":"text","required":true,"default":"completed_work","_meta":{"required":true},"enum":["blank_reference","completed_work"]},"previousSubmissionId":{"type":"foreignKey","required":false,"related":"Submission","_meta":{"nullable":true}},"intakeItemId":{"type":"text","required":false,"_meta":{"nullable":true}},"pageCount":{"type":"integer","required":true,"default":0},"ocrText":{"type":"text","required":false},"extracted":{"type":"text","required":false}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true},"getExtracted":{"name":"getExtracted","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true},"setExtracted":{"name":"setExtracted","async":false,"parameters":[{"name":"value","type":"Record<string, unknown>","optional":false}],"returnType":"void","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"submissions","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Submission","exportName":"ScannedSubmission","collectionExportName":"ScannedSubmissionCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"lessonId","rule":"required","fieldType":"foreignKey"},{"field":"progressId","rule":"required","fieldType":"foreignKey"},{"field":"kind","rule":"required","fieldType":"text"},{"field":"pageCount","rule":"required","fieldType":"integer"}],"schema":{"tableName":"submissions","ddl":"CREATE TABLE IF NOT EXISTS \\"submissions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"learner_id\\" UUID,\\n \\"lesson_id\\" UUID,\\n \\"progress_id\\" UUID,\\n \\"submitted_at\\" TEXT,\\n \\"status\\" TEXT DEFAULT 'captured',\\n \\"notes\\" TEXT,\\n \\"capture_key\\" TEXT,\\n \\"capture_digest\\" TEXT,\\n \\"kind\\" TEXT DEFAULT 'completed_work',\\n \\"previous_submission_id\\" UUID,\\n \\"intake_item_id\\" TEXT,\\n \\"page_count\\" INTEGER DEFAULT 0,\\n \\"ocr_text\\" TEXT,\\n \\"extracted\\" TEXT,\\n \\"reported_by\\" TEXT DEFAULT 'learner',\\n \\"evidence_url\\" TEXT,\\n \\"reported_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"progress_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lesson_progress","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submitted_at":{"type":"TEXT","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"captured"},"notes":{"type":"TEXT","notNull":false},"capture_key":{"type":"TEXT","notNull":false},"capture_digest":{"type":"TEXT","notNull":false},"kind":{"type":"TEXT","notNull":false,"default":"completed_work"},"previous_submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_item_id":{"type":"TEXT","notNull":false},"page_count":{"type":"INTEGER","notNull":false,"default":0},"ocr_text":{"type":"TEXT","notNull":false},"extracted":{"type":"TEXT","notNull":false},"reported_by":{"type":"TEXT","notNull":false,"default":"learner"},"evidence_url":{"type":"TEXT","notNull":false},"reported_score":{"type":"REAL","notNull":false}},"indexes":[{"name":"submissions_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"submissions_meta_type_idx","columns":["_meta_type"]},{"name":"submissions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submissions_learner_id_idx","columns":["learner_id"]},{"name":"submissions_lesson_id_idx","columns":["lesson_id"]},{"name":"submissions_progress_id_idx","columns":["progress_id"]},{"name":"submissions_previous_submission_id_idx","columns":["previous_submission_id"]}],"version":"7c394510"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:ExternalCompletion":{"name":"externalcompletion","className":"ExternalCompletion","qualifiedName":"@happyvertical/smrt-education:ExternalCompletion","collection":"submissions","description":"Completion reported by the learner, guardian, or external source.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/submissions.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"lessonId":{"type":"foreignKey","required":true,"related":"Lesson","_meta":{"required":true}},"progressId":{"type":"foreignKey","required":true,"related":"LessonProgress","_meta":{"required":true}},"submittedAt":{"type":"text","required":false},"status":{"type":"text","required":false,"default":"captured","enum":["captured","extracting","needs_review","graded","rejected"]},"notes":{"type":"text","required":false},"captureKey":{"type":"text","required":false},"captureDigest":{"type":"text","required":false},"kind":{"type":"text","required":true,"default":"completed_work","_meta":{"required":true},"enum":["blank_reference","completed_work"]},"previousSubmissionId":{"type":"foreignKey","required":false,"related":"Submission","_meta":{"nullable":true}},"intakeItemId":{"type":"text","required":false,"_meta":{"nullable":true}},"reportedBy":{"type":"text","required":false,"default":"learner","enum":["learner","guardian","source"]},"evidenceUrl":{"type":"text","required":false},"reportedScore":{"type":"decimal","required":false,"_meta":{}}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"submissions","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Submission","exportName":"ExternalCompletion","collectionExportName":"ExternalCompletionCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"lessonId","rule":"required","fieldType":"foreignKey"},{"field":"progressId","rule":"required","fieldType":"foreignKey"},{"field":"kind","rule":"required","fieldType":"text"}],"schema":{"tableName":"submissions","ddl":"CREATE TABLE IF NOT EXISTS \\"submissions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"learner_id\\" UUID,\\n \\"lesson_id\\" UUID,\\n \\"progress_id\\" UUID,\\n \\"submitted_at\\" TEXT,\\n \\"status\\" TEXT DEFAULT 'captured',\\n \\"notes\\" TEXT,\\n \\"capture_key\\" TEXT,\\n \\"capture_digest\\" TEXT,\\n \\"kind\\" TEXT DEFAULT 'completed_work',\\n \\"previous_submission_id\\" UUID,\\n \\"intake_item_id\\" TEXT,\\n \\"page_count\\" INTEGER DEFAULT 0,\\n \\"ocr_text\\" TEXT,\\n \\"extracted\\" TEXT,\\n \\"reported_by\\" TEXT DEFAULT 'learner',\\n \\"evidence_url\\" TEXT,\\n \\"reported_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"progress_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lesson_progress","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submitted_at":{"type":"TEXT","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"captured"},"notes":{"type":"TEXT","notNull":false},"capture_key":{"type":"TEXT","notNull":false},"capture_digest":{"type":"TEXT","notNull":false},"kind":{"type":"TEXT","notNull":false,"default":"completed_work"},"previous_submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_item_id":{"type":"TEXT","notNull":false},"page_count":{"type":"INTEGER","notNull":false,"default":0},"ocr_text":{"type":"TEXT","notNull":false},"extracted":{"type":"TEXT","notNull":false},"reported_by":{"type":"TEXT","notNull":false,"default":"learner"},"evidence_url":{"type":"TEXT","notNull":false},"reported_score":{"type":"REAL","notNull":false}},"indexes":[{"name":"submissions_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"submissions_meta_type_idx","columns":["_meta_type"]},{"name":"submissions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submissions_learner_id_idx","columns":["learner_id"]},{"name":"submissions_lesson_id_idx","columns":["lesson_id"]},{"name":"submissions_progress_id_idx","columns":["progress_id"]},{"name":"submissions_previous_submission_id_idx","columns":["previous_submission_id"]}],"version":"eff3715d"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Attestation":{"name":"attestation","className":"Attestation","qualifiedName":"@happyvertical/smrt-education:Attestation","collection":"submissions","description":"A guardian's statement that work was completed.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/submissions.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"lessonId":{"type":"foreignKey","required":true,"related":"Lesson","_meta":{"required":true}},"progressId":{"type":"foreignKey","required":true,"related":"LessonProgress","_meta":{"required":true}},"submittedAt":{"type":"text","required":false},"status":{"type":"text","required":false,"default":"captured","enum":["captured","extracting","needs_review","graded","rejected"]},"notes":{"type":"text","required":false},"captureKey":{"type":"text","required":false},"captureDigest":{"type":"text","required":false},"kind":{"type":"text","required":true,"default":"completed_work","_meta":{"required":true},"enum":["blank_reference","completed_work"]},"previousSubmissionId":{"type":"foreignKey","required":false,"related":"Submission","_meta":{"nullable":true}},"intakeItemId":{"type":"text","required":false,"_meta":{"nullable":true}}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"submissions","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Submission","exportName":"Attestation","collectionExportName":"AttestationCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"lessonId","rule":"required","fieldType":"foreignKey"},{"field":"progressId","rule":"required","fieldType":"foreignKey"},{"field":"kind","rule":"required","fieldType":"text"}],"schema":{"tableName":"submissions","ddl":"CREATE TABLE IF NOT EXISTS \\"submissions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"learner_id\\" UUID,\\n \\"lesson_id\\" UUID,\\n \\"progress_id\\" UUID,\\n \\"submitted_at\\" TEXT,\\n \\"status\\" TEXT DEFAULT 'captured',\\n \\"notes\\" TEXT,\\n \\"capture_key\\" TEXT,\\n \\"capture_digest\\" TEXT,\\n \\"kind\\" TEXT DEFAULT 'completed_work',\\n \\"previous_submission_id\\" UUID,\\n \\"intake_item_id\\" TEXT,\\n \\"page_count\\" INTEGER DEFAULT 0,\\n \\"ocr_text\\" TEXT,\\n \\"extracted\\" TEXT,\\n \\"reported_by\\" TEXT DEFAULT 'learner',\\n \\"evidence_url\\" TEXT,\\n \\"reported_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"progress_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lesson_progress","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submitted_at":{"type":"TEXT","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"captured"},"notes":{"type":"TEXT","notNull":false},"capture_key":{"type":"TEXT","notNull":false},"capture_digest":{"type":"TEXT","notNull":false},"kind":{"type":"TEXT","notNull":false,"default":"completed_work"},"previous_submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_item_id":{"type":"TEXT","notNull":false},"page_count":{"type":"INTEGER","notNull":false,"default":0},"ocr_text":{"type":"TEXT","notNull":false},"extracted":{"type":"TEXT","notNull":false},"reported_by":{"type":"TEXT","notNull":false,"default":"learner"},"evidence_url":{"type":"TEXT","notNull":false},"reported_score":{"type":"REAL","notNull":false}},"indexes":[{"name":"submissions_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"submissions_meta_type_idx","columns":["_meta_type"]},{"name":"submissions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submissions_learner_id_idx","columns":["learner_id"]},{"name":"submissions_lesson_id_idx","columns":["lesson_id"]},{"name":"submissions_progress_id_idx","columns":["progress_id"]},{"name":"submissions_previous_submission_id_idx","columns":["previous_submission_id"]}],"version":"4f3230a3"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:SubmissionAsset":{"name":"submissionasset","className":"SubmissionAsset","qualifiedName":"@happyvertical/smrt-education:SubmissionAsset","collection":"submissionassets","description":"The tenant-owned files attached to a submission.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/submissions.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"submissionId":{"type":"foreignKey","required":true,"related":"Submission","_meta":{"required":true}},"assetId":{"type":"crossPackageRef","required":true,"related":"@happyvertical/smrt-assets:Asset"},"relationship":{"type":"text","required":true,"default":"page","_meta":{"required":true},"enum":["page","attachment"]},"sortOrder":{"type":"integer","required":true,"default":0}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"submission_assets","conflictColumns":["tenant_id","submission_id","asset_id","relationship"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"SubmissionAsset","collectionExportName":"SubmissionAssetCollection","validationRules":[{"field":"submissionId","rule":"required","fieldType":"foreignKey"},{"field":"assetId","rule":"required","fieldType":"crossPackageRef"},{"field":"relationship","rule":"required","fieldType":"text"},{"field":"sortOrder","rule":"required","fieldType":"integer"}],"schema":{"tableName":"submission_assets","ddl":"CREATE TABLE IF NOT EXISTS \\"submission_assets\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"submission_id\\" UUID NOT NULL,\\n \\"asset_id\\" UUID NOT NULL,\\n \\"relationship\\" TEXT NOT NULL DEFAULT 'page',\\n \\"sort_order\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"relationship":{"type":"TEXT","notNull":true,"unique":false,"default":"page"},"sort_order":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"submission_assets_tenant_id_submission_id_idx","columns":["tenant_id","submission_id","asset_id","relationship"],"unique":true},{"name":"submission_assets_slug_context_idx","columns":["slug","context"]},{"name":"submission_assets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submission_assets_submission_id_idx","columns":["submission_id"]},{"name":"submission_assets_asset_id_idx","columns":["asset_id"]}],"version":"d9b61c8a"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Grade":{"name":"grade","className":"Grade","qualifiedName":"@happyvertical/smrt-education:Grade","collection":"grades","description":"An assessment of a submission; the service selects the authoritative grade.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/submissions.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"submissionId":{"type":"foreignKey","required":true,"related":"Submission","_meta":{"required":true}},"graderKind":{"type":"text","required":true,"default":"auto","_meta":{"required":true},"enum":["auto","ai","guardian","instructor"]},"graderProfileId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-profiles:Profile","_meta":{"nullable":true}},"score":{"type":"decimal","required":false,"_meta":{"nullable":true}},"pointsEarned":{"type":"integer","required":false,"_meta":{"nullable":true}},"pointsPossible":{"type":"integer","required":false,"_meta":{"nullable":true}},"rubricResults":{"type":"text","required":false},"feedback":{"type":"text","required":false},"gradedAt":{"type":"text","required":false}},"methods":{"getRubricResults":{"name":"getRubricResults","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true},"setRubricResults":{"name":"setRubricResults","async":false,"parameters":[{"name":"value","type":"Record<string, unknown>","optional":false}],"returnType":"void","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"Grade","collectionExportName":"GradeCollection","validationRules":[{"field":"submissionId","rule":"required","fieldType":"foreignKey"},{"field":"graderKind","rule":"required","fieldType":"text"}],"schema":{"tableName":"grades","ddl":"CREATE TABLE IF NOT EXISTS \\"grades\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"submission_id\\" UUID NOT NULL,\\n \\"grader_kind\\" TEXT NOT NULL DEFAULT 'auto',\\n \\"grader_profile_id\\" UUID,\\n \\"score\\" REAL,\\n \\"points_earned\\" INTEGER,\\n \\"points_possible\\" INTEGER,\\n \\"rubric_results\\" TEXT,\\n \\"feedback\\" TEXT,\\n \\"graded_at\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"grader_kind":{"type":"TEXT","notNull":true,"unique":false,"default":"auto"},"grader_profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"score":{"type":"REAL","notNull":false,"unique":false},"points_earned":{"type":"INTEGER","notNull":false,"unique":false},"points_possible":{"type":"INTEGER","notNull":false,"unique":false},"rubric_results":{"type":"TEXT","notNull":false,"unique":false},"feedback":{"type":"TEXT","notNull":false,"unique":false},"graded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"grades_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"grades_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"grades_submission_id_idx","columns":["submission_id"]},{"name":"grades_grader_profile_id_idx","columns":["grader_profile_id"]}],"version":"7d629fec"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Workbook":{"name":"workbook","className":"Workbook","qualifiedName":"@happyvertical/smrt-education:Workbook","collection":"workbooks","description":"Education-owned private workbook record. Mutations go through WorkbookService.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"workbookKey":{"type":"text","required":false},"title":{"type":"text","required":false},"edition":{"type":"text","required":false},"reviewRequired":{"type":"boolean","required":true,"default":true},"policyVersion":{"type":"integer","required":true,"default":1}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbooks","conflictColumns":["tenant_id","learner_id","workbook_key"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"Workbook","collectionExportName":"WorkbookCollection","displayLabelField":"title","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"reviewRequired","rule":"required","fieldType":"boolean"},{"field":"policyVersion","rule":"required","fieldType":"integer"}],"schema":{"tableName":"workbooks","ddl":"CREATE TABLE IF NOT EXISTS \\"workbooks\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"workbook_key\\" TEXT,\\n \\"title\\" TEXT,\\n \\"edition\\" TEXT,\\n \\"review_required\\" BOOLEAN NOT NULL DEFAULT TRUE,\\n \\"policy_version\\" INTEGER NOT NULL DEFAULT 1\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"workbook_key":{"type":"TEXT","notNull":false,"unique":false},"title":{"type":"TEXT","notNull":false,"unique":false},"edition":{"type":"TEXT","notNull":false,"unique":false},"review_required":{"type":"BOOLEAN","notNull":true,"unique":false,"default":true},"policy_version":{"type":"INTEGER","notNull":true,"unique":false,"default":1}},"indexes":[{"name":"workbooks_tenant_id_learner_id_idx","columns":["tenant_id","learner_id","workbook_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbooks_slug_context_idx","columns":["slug","context"]},{"name":"workbooks_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbooks_learner_id_idx","columns":["learner_id"]}],"version":"a5b56a39"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookCollection":{"name":"workbookcollection","className":"WorkbookCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookCollection","collection":"workbooks","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbooks","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Workbook","exportName":"WorkbookCollection","collectionExportName":"WorkbookCollectionCollection","schema":{"tableName":"workbooks","ddl":"CREATE TABLE IF NOT EXISTS \\"workbooks\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"workbook_key\\" TEXT,\\n \\"title\\" TEXT,\\n \\"edition\\" TEXT,\\n \\"review_required\\" BOOLEAN NOT NULL DEFAULT TRUE,\\n \\"policy_version\\" INTEGER NOT NULL DEFAULT 1\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"workbook_key":{"type":"TEXT","notNull":false,"unique":false},"title":{"type":"TEXT","notNull":false,"unique":false},"edition":{"type":"TEXT","notNull":false,"unique":false},"review_required":{"type":"BOOLEAN","notNull":true,"unique":false,"default":true},"policy_version":{"type":"INTEGER","notNull":true,"unique":false,"default":1}},"indexes":[{"name":"workbooks_tenant_id_learner_id_idx","columns":["tenant_id","learner_id","workbook_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbooks_slug_context_idx","columns":["slug","context"]},{"name":"workbooks_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbooks_learner_id_idx","columns":["learner_id"]}],"version":"a5b56a39"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookActivity":{"name":"workbookactivity","className":"WorkbookActivity","qualifiedName":"@happyvertical/smrt-education:WorkbookActivity","collection":"workbookactivities","description":"Education-owned private workbook record. Mutations go through WorkbookService.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"workbookId":{"type":"foreignKey","required":false,"related":"Workbook","_meta":{"nullable":true}},"captureKind":{"type":"text","required":true,"default":"identified","_meta":{"required":true,"default":"identified"}},"photoIntakeId":{"type":"foreignKey","required":false,"related":"WorkbookPhotoIntake","_meta":{"nullable":true}},"enrollmentId":{"type":"foreignKey","required":true,"related":"Enrollment","_meta":{"required":true}},"lessonId":{"type":"foreignKey","required":true,"related":"Lesson","_meta":{"required":true}},"pageKey":{"type":"text","required":false},"pageLabel":{"type":"text","required":false}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_activities","conflictColumns":["tenant_id","workbook_id","page_key"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookActivity","collectionExportName":"WorkbookActivityCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"captureKind","rule":"required","fieldType":"text"},{"field":"enrollmentId","rule":"required","fieldType":"foreignKey"},{"field":"lessonId","rule":"required","fieldType":"foreignKey"}],"schema":{"tableName":"workbook_activities","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_activities\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"workbook_id\\" UUID,\\n \\"capture_kind\\" TEXT NOT NULL DEFAULT 'identified',\\n \\"photo_intake_id\\" UUID,\\n \\"enrollment_id\\" UUID NOT NULL,\\n \\"lesson_id\\" UUID NOT NULL,\\n \\"page_key\\" TEXT,\\n \\"page_label\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"workbook_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbooks","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"capture_kind":{"type":"TEXT","notNull":true,"unique":false,"default":"identified"},"photo_intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_photo_intakes","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"enrollment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"enrollments","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"page_key":{"type":"TEXT","notNull":false,"unique":false},"page_label":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_activities_tenant_id_workbook_id_idx","columns":["tenant_id","workbook_id","page_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_activities_slug_context_idx","columns":["slug","context"]},{"name":"workbook_activities_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_activities_learner_id_idx","columns":["learner_id"]},{"name":"workbook_activities_workbook_id_idx","columns":["workbook_id"]},{"name":"workbook_activities_photo_intake_id_idx","columns":["photo_intake_id"]},{"name":"workbook_activities_enrollment_id_idx","columns":["enrollment_id"]},{"name":"workbook_activities_lesson_id_idx","columns":["lesson_id"]}],"version":"320c8eb0"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookActivityCollection":{"name":"workbookactivitycollection","className":"WorkbookActivityCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookActivityCollection","collection":"workbookactivities","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_activities","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookActivity","exportName":"WorkbookActivityCollection","collectionExportName":"WorkbookActivityCollectionCollection","schema":{"tableName":"workbook_activities","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_activities\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"workbook_id\\" UUID,\\n \\"capture_kind\\" TEXT NOT NULL DEFAULT 'identified',\\n \\"photo_intake_id\\" UUID,\\n \\"enrollment_id\\" UUID NOT NULL,\\n \\"lesson_id\\" UUID NOT NULL,\\n \\"page_key\\" TEXT,\\n \\"page_label\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"workbook_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbooks","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"capture_kind":{"type":"TEXT","notNull":true,"unique":false,"default":"identified"},"photo_intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_photo_intakes","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"enrollment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"enrollments","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"page_key":{"type":"TEXT","notNull":false,"unique":false},"page_label":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_activities_tenant_id_workbook_id_idx","columns":["tenant_id","workbook_id","page_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_activities_slug_context_idx","columns":["slug","context"]},{"name":"workbook_activities_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_activities_learner_id_idx","columns":["learner_id"]},{"name":"workbook_activities_workbook_id_idx","columns":["workbook_id"]},{"name":"workbook_activities_photo_intake_id_idx","columns":["photo_intake_id"]},{"name":"workbook_activities_enrollment_id_idx","columns":["enrollment_id"]},{"name":"workbook_activities_lesson_id_idx","columns":["lesson_id"]}],"version":"320c8eb0"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookWorkFiling":{"name":"workbookworkfiling","className":"WorkbookWorkFiling","qualifiedName":"@happyvertical/smrt-education:WorkbookWorkFiling","collection":"workbookworkfilings","description":"Append-only association; the source work unit and its routing never move.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"sourceActivityId":{"type":"foreignKey","required":true,"related":"WorkbookActivity","_meta":{"required":true}},"workbookId":{"type":"foreignKey","required":true,"related":"Workbook","_meta":{"required":true}},"canonicalActivityId":{"type":"foreignKey","required":false,"related":"WorkbookActivity","_meta":{"nullable":true}},"previousRevisionId":{"type":"foreignKey","required":false,"related":"WorkbookWorkFiling","_meta":{"nullable":true}},"actorUserId":{"type":"text","required":false},"requestKey":{"type":"text","required":false},"reason":{"type":"text","required":false},"digest":{"type":"text","required":false}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_work_filings","conflictColumns":["tenant_id","source_activity_id","request_key"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookWorkFiling","collectionExportName":"WorkbookWorkFilingCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"sourceActivityId","rule":"required","fieldType":"foreignKey"},{"field":"workbookId","rule":"required","fieldType":"foreignKey"}],"schema":{"tableName":"workbook_work_filings","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_work_filings\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"source_activity_id\\" UUID NOT NULL,\\n \\"workbook_id\\" UUID NOT NULL,\\n \\"canonical_activity_id\\" UUID,\\n \\"previous_revision_id\\" UUID,\\n \\"actor_user_id\\" TEXT,\\n \\"request_key\\" TEXT,\\n \\"reason\\" TEXT,\\n \\"digest\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"source_activity_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_activities","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"workbook_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbooks","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"canonical_activity_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_activities","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"previous_revision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_work_filings","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"request_key":{"type":"TEXT","notNull":false,"unique":false},"reason":{"type":"TEXT","notNull":false,"unique":false},"digest":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_work_filings_tenant_id_source_activity_id_idx","columns":["tenant_id","source_activity_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_work_filings_slug_context_idx","columns":["slug","context"]},{"name":"workbook_work_filings_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_work_filings_learner_id_idx","columns":["learner_id"]},{"name":"workbook_work_filings_source_activity_id_idx","columns":["source_activity_id"]},{"name":"workbook_work_filings_workbook_id_idx","columns":["workbook_id"]},{"name":"workbook_work_filings_canonical_activity_id_idx","columns":["canonical_activity_id"]},{"name":"workbook_work_filings_previous_revision_id_idx","columns":["previous_revision_id"]}],"version":"03e989a0"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookWorkFilingCollection":{"name":"workbookworkfilingcollection","className":"WorkbookWorkFilingCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookWorkFilingCollection","collection":"workbookworkfilings","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_work_filings","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookWorkFiling","exportName":"WorkbookWorkFilingCollection","collectionExportName":"WorkbookWorkFilingCollectionCollection","schema":{"tableName":"workbook_work_filings","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_work_filings\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"source_activity_id\\" UUID NOT NULL,\\n \\"workbook_id\\" UUID NOT NULL,\\n \\"canonical_activity_id\\" UUID,\\n \\"previous_revision_id\\" UUID,\\n \\"actor_user_id\\" TEXT,\\n \\"request_key\\" TEXT,\\n \\"reason\\" TEXT,\\n \\"digest\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"source_activity_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_activities","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"workbook_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbooks","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"canonical_activity_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_activities","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"previous_revision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_work_filings","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"request_key":{"type":"TEXT","notNull":false,"unique":false},"reason":{"type":"TEXT","notNull":false,"unique":false},"digest":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_work_filings_tenant_id_source_activity_id_idx","columns":["tenant_id","source_activity_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_work_filings_slug_context_idx","columns":["slug","context"]},{"name":"workbook_work_filings_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_work_filings_learner_id_idx","columns":["learner_id"]},{"name":"workbook_work_filings_source_activity_id_idx","columns":["source_activity_id"]},{"name":"workbook_work_filings_workbook_id_idx","columns":["workbook_id"]},{"name":"workbook_work_filings_canonical_activity_id_idx","columns":["canonical_activity_id"]},{"name":"workbook_work_filings_previous_revision_id_idx","columns":["previous_revision_id"]}],"version":"03e989a0"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookAttempt":{"name":"workbookattempt","className":"WorkbookAttempt","qualifiedName":"@happyvertical/smrt-education:WorkbookAttempt","collection":"workbookattempts","description":"Education-owned private workbook record. Mutations go through WorkbookService.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"activityId":{"type":"foreignKey","required":true,"related":"WorkbookActivity","_meta":{"required":true}},"submissionId":{"type":"foreignKey","required":true,"related":"Submission","_meta":{"required":true}},"previousAttemptId":{"type":"foreignKey","required":false,"related":"WorkbookAttempt","_meta":{"nullable":true}},"capturedAt":{"type":"text","required":false},"episodeId":{"type":"text","required":false},"reviewRequired":{"type":"boolean","required":true,"default":true},"policyVersion":{"type":"integer","required":true,"default":1},"assistance":{"type":"text","required":false},"actorUserId":{"type":"text","required":false},"sourceHashes":{"type":"text","required":false,"_meta":{}}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_attempts","conflictColumns":["tenant_id","submission_id"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookAttempt","collectionExportName":"WorkbookAttemptCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"activityId","rule":"required","fieldType":"foreignKey"},{"field":"submissionId","rule":"required","fieldType":"foreignKey"},{"field":"reviewRequired","rule":"required","fieldType":"boolean"},{"field":"policyVersion","rule":"required","fieldType":"integer"}],"schema":{"tableName":"workbook_attempts","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_attempts\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"activity_id\\" UUID NOT NULL,\\n \\"submission_id\\" UUID NOT NULL,\\n \\"previous_attempt_id\\" UUID,\\n \\"captured_at\\" TEXT,\\n \\"episode_id\\" TEXT,\\n \\"review_required\\" BOOLEAN NOT NULL DEFAULT TRUE,\\n \\"policy_version\\" INTEGER NOT NULL DEFAULT 1,\\n \\"assistance\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"source_hashes\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"activity_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_activities","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"previous_attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"captured_at":{"type":"TEXT","notNull":false,"unique":false},"episode_id":{"type":"TEXT","notNull":false,"unique":false},"review_required":{"type":"BOOLEAN","notNull":true,"unique":false,"default":true},"policy_version":{"type":"INTEGER","notNull":true,"unique":false,"default":1},"assistance":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"source_hashes":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_attempts_tenant_id_submission_id_idx","columns":["tenant_id","submission_id"],"unique":true},{"name":"workbook_attempts_slug_context_idx","columns":["slug","context"]},{"name":"workbook_attempts_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_attempts_learner_id_idx","columns":["learner_id"]},{"name":"workbook_attempts_activity_id_idx","columns":["activity_id"]},{"name":"workbook_attempts_submission_id_idx","columns":["submission_id"]},{"name":"workbook_attempts_previous_attempt_id_idx","columns":["previous_attempt_id"]}],"version":"bd9cdd9f"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookAttemptCollection":{"name":"workbookattemptcollection","className":"WorkbookAttemptCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookAttemptCollection","collection":"workbookattempts","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_attempts","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookAttempt","exportName":"WorkbookAttemptCollection","collectionExportName":"WorkbookAttemptCollectionCollection","schema":{"tableName":"workbook_attempts","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_attempts\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"activity_id\\" UUID NOT NULL,\\n \\"submission_id\\" UUID NOT NULL,\\n \\"previous_attempt_id\\" UUID,\\n \\"captured_at\\" TEXT,\\n \\"episode_id\\" TEXT,\\n \\"review_required\\" BOOLEAN NOT NULL DEFAULT TRUE,\\n \\"policy_version\\" INTEGER NOT NULL DEFAULT 1,\\n \\"assistance\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"source_hashes\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"activity_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_activities","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"previous_attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"captured_at":{"type":"TEXT","notNull":false,"unique":false},"episode_id":{"type":"TEXT","notNull":false,"unique":false},"review_required":{"type":"BOOLEAN","notNull":true,"unique":false,"default":true},"policy_version":{"type":"INTEGER","notNull":true,"unique":false,"default":1},"assistance":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"source_hashes":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_attempts_tenant_id_submission_id_idx","columns":["tenant_id","submission_id"],"unique":true},{"name":"workbook_attempts_slug_context_idx","columns":["slug","context"]},{"name":"workbook_attempts_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_attempts_learner_id_idx","columns":["learner_id"]},{"name":"workbook_attempts_activity_id_idx","columns":["activity_id"]},{"name":"workbook_attempts_submission_id_idx","columns":["submission_id"]},{"name":"workbook_attempts_previous_attempt_id_idx","columns":["previous_attempt_id"]}],"version":"bd9cdd9f"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookAssessmentRevision":{"name":"workbookassessmentrevision","className":"WorkbookAssessmentRevision","qualifiedName":"@happyvertical/smrt-education:WorkbookAssessmentRevision","collection":"workbookassessmentrevisions","description":"Education-owned private workbook record. Mutations go through WorkbookService.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"attemptId":{"type":"foreignKey","required":true,"related":"WorkbookAttempt","_meta":{"required":true}},"requestKey":{"type":"text","required":false},"requestDigest":{"type":"text","required":false},"kind":{"type":"text","required":false},"actorUserId":{"type":"text","required":false},"sourceRevisionId":{"type":"foreignKey","required":false,"related":"WorkbookAssessmentRevision","_meta":{"nullable":true}},"decisionReason":{"type":"text","required":false},"supersedesId":{"type":"foreignKey","required":false,"related":"WorkbookAssessmentRevision","_meta":{"nullable":true}},"assessmentJson":{"type":"text","required":false,"_meta":{}},"recordedAt":{"type":"text","required":false}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_assessment_revisions","conflictColumns":["tenant_id","attempt_id","request_key"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookAssessmentRevision","collectionExportName":"WorkbookAssessmentRevisionCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"attemptId","rule":"required","fieldType":"foreignKey"}],"schema":{"tableName":"workbook_assessment_revisions","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_assessment_revisions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"attempt_id\\" UUID NOT NULL,\\n \\"request_key\\" TEXT,\\n \\"request_digest\\" TEXT,\\n \\"kind\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"source_revision_id\\" UUID,\\n \\"decision_reason\\" TEXT,\\n \\"supersedes_id\\" UUID,\\n \\"assessment_json\\" TEXT,\\n \\"recorded_at\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":false,"unique":false},"request_digest":{"type":"TEXT","notNull":false,"unique":false},"kind":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"source_revision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"decision_reason":{"type":"TEXT","notNull":false,"unique":false},"supersedes_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"assessment_json":{"type":"TEXT","notNull":false,"unique":false},"recorded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_assessment_revisions_tenant_id_attempt_id_idx","columns":["tenant_id","attempt_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_assessment_revisions_slug_context_idx","columns":["slug","context"]},{"name":"workbook_assessment_revisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_assessment_revisions_learner_id_idx","columns":["learner_id"]},{"name":"workbook_assessment_revisions_attempt_id_idx","columns":["attempt_id"]},{"name":"workbook_assessment_revisions_source_revision_id_idx","columns":["source_revision_id"]},{"name":"workbook_assessment_revisions_supersedes_id_idx","columns":["supersedes_id"]}],"version":"94b2bd33"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookAssessmentRevisionCollection":{"name":"workbookassessmentrevisioncollection","className":"WorkbookAssessmentRevisionCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookAssessmentRevisionCollection","collection":"workbookassessmentrevisions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_assessment_revisions","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookAssessmentRevision","exportName":"WorkbookAssessmentRevisionCollection","collectionExportName":"WorkbookAssessmentRevisionCollectionCollection","schema":{"tableName":"workbook_assessment_revisions","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_assessment_revisions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"attempt_id\\" UUID NOT NULL,\\n \\"request_key\\" TEXT,\\n \\"request_digest\\" TEXT,\\n \\"kind\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"source_revision_id\\" UUID,\\n \\"decision_reason\\" TEXT,\\n \\"supersedes_id\\" UUID,\\n \\"assessment_json\\" TEXT,\\n \\"recorded_at\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":false,"unique":false},"request_digest":{"type":"TEXT","notNull":false,"unique":false},"kind":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"source_revision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"decision_reason":{"type":"TEXT","notNull":false,"unique":false},"supersedes_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"assessment_json":{"type":"TEXT","notNull":false,"unique":false},"recorded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_assessment_revisions_tenant_id_attempt_id_idx","columns":["tenant_id","attempt_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_assessment_revisions_slug_context_idx","columns":["slug","context"]},{"name":"workbook_assessment_revisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_assessment_revisions_learner_id_idx","columns":["learner_id"]},{"name":"workbook_assessment_revisions_attempt_id_idx","columns":["attempt_id"]},{"name":"workbook_assessment_revisions_source_revision_id_idx","columns":["source_revision_id"]},{"name":"workbook_assessment_revisions_supersedes_id_idx","columns":["supersedes_id"]}],"version":"94b2bd33"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookFeedbackRelease":{"name":"workbookfeedbackrelease","className":"WorkbookFeedbackRelease","qualifiedName":"@happyvertical/smrt-education:WorkbookFeedbackRelease","collection":"workbookfeedbackreleases","description":"Education-owned private workbook record. Mutations go through WorkbookService.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"attemptId":{"type":"foreignKey","required":true,"related":"WorkbookAttempt","_meta":{"required":true}},"revisionId":{"type":"foreignKey","required":true,"related":"WorkbookAssessmentRevision","_meta":{"required":true}},"expectedHeadId":{"type":"foreignKey","required":false,"related":"WorkbookAssessmentRevision","_meta":{"nullable":true}},"requestKey":{"type":"text","required":false},"actorUserId":{"type":"text","required":false},"recordedAt":{"type":"text","required":false}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_feedback_releases","conflictColumns":["tenant_id","attempt_id","request_key"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookFeedbackRelease","collectionExportName":"WorkbookFeedbackReleaseCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"attemptId","rule":"required","fieldType":"foreignKey"},{"field":"revisionId","rule":"required","fieldType":"foreignKey"}],"schema":{"tableName":"workbook_feedback_releases","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_feedback_releases\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"attempt_id\\" UUID NOT NULL,\\n \\"revision_id\\" UUID NOT NULL,\\n \\"expected_head_id\\" UUID,\\n \\"request_key\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"recorded_at\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"revision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"expected_head_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"recorded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_feedback_releases_tenant_id_attempt_id_idx","columns":["tenant_id","attempt_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_feedback_releases_slug_context_idx","columns":["slug","context"]},{"name":"workbook_feedback_releases_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_feedback_releases_learner_id_idx","columns":["learner_id"]},{"name":"workbook_feedback_releases_attempt_id_idx","columns":["attempt_id"]},{"name":"workbook_feedback_releases_revision_id_idx","columns":["revision_id"]},{"name":"workbook_feedback_releases_expected_head_id_idx","columns":["expected_head_id"]}],"version":"ebe23baf"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookFeedbackReleaseCollection":{"name":"workbookfeedbackreleasecollection","className":"WorkbookFeedbackReleaseCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookFeedbackReleaseCollection","collection":"workbookfeedbackreleases","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_feedback_releases","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookFeedbackRelease","exportName":"WorkbookFeedbackReleaseCollection","collectionExportName":"WorkbookFeedbackReleaseCollectionCollection","schema":{"tableName":"workbook_feedback_releases","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_feedback_releases\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"attempt_id\\" UUID NOT NULL,\\n \\"revision_id\\" UUID NOT NULL,\\n \\"expected_head_id\\" UUID,\\n \\"request_key\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"recorded_at\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"revision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"expected_head_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"recorded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_feedback_releases_tenant_id_attempt_id_idx","columns":["tenant_id","attempt_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_feedback_releases_slug_context_idx","columns":["slug","context"]},{"name":"workbook_feedback_releases_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_feedback_releases_learner_id_idx","columns":["learner_id"]},{"name":"workbook_feedback_releases_attempt_id_idx","columns":["attempt_id"]},{"name":"workbook_feedback_releases_revision_id_idx","columns":["revision_id"]},{"name":"workbook_feedback_releases_expected_head_id_idx","columns":["expected_head_id"]}],"version":"ebe23baf"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookFeedbackDelivery":{"name":"workbookfeedbackdelivery","className":"WorkbookFeedbackDelivery","qualifiedName":"@happyvertical/smrt-education:WorkbookFeedbackDelivery","collection":"workbookfeedbackdeliveries","description":"Authenticated delivery acknowledgment; this does not assert comprehension.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"attemptId":{"type":"foreignKey","required":true,"related":"WorkbookAttempt","_meta":{"required":true}},"revisionId":{"type":"foreignKey","required":true,"related":"WorkbookAssessmentRevision","_meta":{"required":true}},"actorUserId":{"type":"text","required":false},"requestKey":{"type":"text","required":false},"recordedAt":{"type":"text","required":false}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true},"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_feedback_deliveries","conflictColumns":["tenant_id","attempt_id","actor_user_id","revision_id"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookFeedbackDelivery","collectionExportName":"WorkbookFeedbackDeliveryCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"attemptId","rule":"required","fieldType":"foreignKey"},{"field":"revisionId","rule":"required","fieldType":"foreignKey"}],"schema":{"tableName":"workbook_feedback_deliveries","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_feedback_deliveries\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"attempt_id\\" UUID NOT NULL,\\n \\"revision_id\\" UUID NOT NULL,\\n \\"actor_user_id\\" TEXT,\\n \\"request_key\\" TEXT,\\n \\"recorded_at\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"revision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"request_key":{"type":"TEXT","notNull":false,"unique":false},"recorded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_feedback_deliveries_tenant_id_attempt_id_idx","columns":["tenant_id","attempt_id","actor_user_id","revision_id"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_feedback_deliveries_slug_context_idx","columns":["slug","context"]},{"name":"workbook_feedback_deliveries_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_feedback_deliveries_learner_id_idx","columns":["learner_id"]},{"name":"workbook_feedback_deliveries_attempt_id_idx","columns":["attempt_id"]},{"name":"workbook_feedback_deliveries_revision_id_idx","columns":["revision_id"]}],"version":"37bfd434"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookFeedbackDeliveryCollection":{"name":"workbookfeedbackdeliverycollection","className":"WorkbookFeedbackDeliveryCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookFeedbackDeliveryCollection","collection":"workbookfeedbackdeliveries","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_feedback_deliveries","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookFeedbackDelivery","exportName":"WorkbookFeedbackDeliveryCollection","collectionExportName":"WorkbookFeedbackDeliveryCollectionCollection","schema":{"tableName":"workbook_feedback_deliveries","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_feedback_deliveries\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"attempt_id\\" UUID NOT NULL,\\n \\"revision_id\\" UUID NOT NULL,\\n \\"actor_user_id\\" TEXT,\\n \\"request_key\\" TEXT,\\n \\"recorded_at\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"revision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"request_key":{"type":"TEXT","notNull":false,"unique":false},"recorded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_feedback_deliveries_tenant_id_attempt_id_idx","columns":["tenant_id","attempt_id","actor_user_id","revision_id"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_feedback_deliveries_slug_context_idx","columns":["slug","context"]},{"name":"workbook_feedback_deliveries_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_feedback_deliveries_learner_id_idx","columns":["learner_id"]},{"name":"workbook_feedback_deliveries_attempt_id_idx","columns":["attempt_id"]},{"name":"workbook_feedback_deliveries_revision_id_idx","columns":["revision_id"]}],"version":"37bfd434"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookPhotoIntake":{"name":"workbookphotointake","className":"WorkbookPhotoIntake","qualifiedName":"@happyvertical/smrt-education:WorkbookPhotoIntake","collection":"workbookphotointakes","description":"Durable receipt before any course, enrollment or activity exists.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-photo-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"familyIntakeId":{"type":"foreignKey","required":false,"related":"FamilyIntake"},"itemId":{"type":"text","required":false},"actorUserId":{"type":"text","required":false},"contentDigest":{"type":"text","required":false}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_photo_intakes","conflictColumns":["tenant_id","item_id"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookPhotoIntake","collectionExportName":"WorkbookPhotoIntakeCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"}],"schema":{"tableName":"workbook_photo_intakes","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_photo_intakes\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"family_intake_id\\" UUID,\\n \\"item_id\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"content_digest\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"family_intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"family_intakes","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"item_id":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"content_digest":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_photo_intakes_tenant_id_item_id_idx","columns":["tenant_id","item_id"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_photo_intakes_slug_context_idx","columns":["slug","context"]},{"name":"workbook_photo_intakes_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_photo_intakes_learner_id_idx","columns":["learner_id"]},{"name":"workbook_photo_intakes_family_intake_id_idx","columns":["family_intake_id"]}],"version":"288020f4"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookPhotoIntakeCollection":{"name":"workbookphotointakecollection","className":"WorkbookPhotoIntakeCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookPhotoIntakeCollection","collection":"workbookphotointakes","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-photo-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_photo_intakes","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookPhotoIntake","exportName":"WorkbookPhotoIntakeCollection","collectionExportName":"WorkbookPhotoIntakeCollectionCollection","schema":{"tableName":"workbook_photo_intakes","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_photo_intakes\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"family_intake_id\\" UUID,\\n \\"item_id\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"content_digest\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"family_intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"family_intakes","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"item_id":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"content_digest":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_photo_intakes_tenant_id_item_id_idx","columns":["tenant_id","item_id"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_photo_intakes_slug_context_idx","columns":["slug","context"]},{"name":"workbook_photo_intakes_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_photo_intakes_learner_id_idx","columns":["learner_id"]},{"name":"workbook_photo_intakes_family_intake_id_idx","columns":["family_intake_id"]}],"version":"288020f4"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookPhotoAsset":{"name":"workbookphotoasset","className":"WorkbookPhotoAsset","qualifiedName":"@happyvertical/smrt-education:WorkbookPhotoAsset","collection":"workbookphotoassets","description":"Sole owner join for original photo intake files.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-photo-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"intakeId":{"type":"foreignKey","required":true,"related":"WorkbookPhotoIntake","_meta":{"required":true}},"assetId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-assets:Asset"},"name":{"type":"text","required":false},"mimeType":{"type":"text","required":false},"sha256":{"type":"text","required":false},"position":{"type":"integer","required":true,"default":0}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_photo_assets","conflictColumns":["tenant_id","intake_id","asset_id"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookPhotoAsset","collectionExportName":"WorkbookPhotoAssetCollection","displayLabelField":"name","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"intakeId","rule":"required","fieldType":"foreignKey"},{"field":"position","rule":"required","fieldType":"integer"}],"schema":{"tableName":"workbook_photo_assets","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_photo_assets\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"intake_id\\" UUID NOT NULL,\\n \\"asset_id\\" UUID,\\n \\"name\\" TEXT,\\n \\"mime_type\\" TEXT,\\n \\"sha256\\" TEXT,\\n \\"position\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_photo_intakes","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"name":{"type":"TEXT","notNull":false,"unique":false},"mime_type":{"type":"TEXT","notNull":false,"unique":false},"sha256":{"type":"TEXT","notNull":false,"unique":false},"position":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"workbook_photo_assets_tenant_id_intake_id_idx","columns":["tenant_id","intake_id","asset_id"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_photo_assets_slug_context_idx","columns":["slug","context"]},{"name":"workbook_photo_assets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_photo_assets_learner_id_idx","columns":["learner_id"]},{"name":"workbook_photo_assets_intake_id_idx","columns":["intake_id"]},{"name":"workbook_photo_assets_asset_id_idx","columns":["asset_id"]}],"version":"9d49acb2"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookPhotoAssetCollection":{"name":"workbookphotoassetcollection","className":"WorkbookPhotoAssetCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookPhotoAssetCollection","collection":"workbookphotoassets","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-photo-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_photo_assets","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookPhotoAsset","exportName":"WorkbookPhotoAssetCollection","collectionExportName":"WorkbookPhotoAssetCollectionCollection","schema":{"tableName":"workbook_photo_assets","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_photo_assets\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"intake_id\\" UUID NOT NULL,\\n \\"asset_id\\" UUID,\\n \\"name\\" TEXT,\\n \\"mime_type\\" TEXT,\\n \\"sha256\\" TEXT,\\n \\"position\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_photo_intakes","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"name":{"type":"TEXT","notNull":false,"unique":false},"mime_type":{"type":"TEXT","notNull":false,"unique":false},"sha256":{"type":"TEXT","notNull":false,"unique":false},"position":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"workbook_photo_assets_tenant_id_intake_id_idx","columns":["tenant_id","intake_id","asset_id"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_photo_assets_slug_context_idx","columns":["slug","context"]},{"name":"workbook_photo_assets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_photo_assets_learner_id_idx","columns":["learner_id"]},{"name":"workbook_photo_assets_intake_id_idx","columns":["intake_id"]},{"name":"workbook_photo_assets_asset_id_idx","columns":["asset_id"]}],"version":"9d49acb2"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookPhotoDecision":{"name":"workbookphotodecision","className":"WorkbookPhotoDecision","qualifiedName":"@happyvertical/smrt-education:WorkbookPhotoDecision","collection":"workbookphotodecisions","description":"Immutable provider/guardian/capture decision, retaining provenance and retry key.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-photo-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"intakeId":{"type":"foreignKey","required":true,"related":"WorkbookPhotoIntake","_meta":{"required":true}},"requestKey":{"type":"text","required":false},"sequence":{"type":"integer","required":true,"default":0},"actorUserId":{"type":"text","required":false},"bodyJson":{"type":"text","required":false,"_meta":{}}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_photo_decisions","conflictColumns":["tenant_id","intake_id","request_key"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookPhotoDecision","collectionExportName":"WorkbookPhotoDecisionCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"intakeId","rule":"required","fieldType":"foreignKey"},{"field":"sequence","rule":"required","fieldType":"integer"}],"schema":{"tableName":"workbook_photo_decisions","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_photo_decisions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"intake_id\\" UUID NOT NULL,\\n \\"request_key\\" TEXT,\\n \\"sequence\\" INTEGER NOT NULL DEFAULT 0,\\n \\"actor_user_id\\" TEXT,\\n \\"body_json\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_photo_intakes","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":false,"unique":false},"sequence":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"body_json":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_photo_decisions_tenant_id_intake_id_idx","columns":["tenant_id","intake_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_photo_decisions_slug_context_idx","columns":["slug","context"]},{"name":"workbook_photo_decisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_photo_decisions_learner_id_idx","columns":["learner_id"]},{"name":"workbook_photo_decisions_intake_id_idx","columns":["intake_id"]}],"version":"4c8b4e5f"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookPhotoDecisionCollection":{"name":"workbookphotodecisioncollection","className":"WorkbookPhotoDecisionCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookPhotoDecisionCollection","collection":"workbookphotodecisions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-photo-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_photo_decisions","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookPhotoDecision","exportName":"WorkbookPhotoDecisionCollection","collectionExportName":"WorkbookPhotoDecisionCollectionCollection","schema":{"tableName":"workbook_photo_decisions","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_photo_decisions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"intake_id\\" UUID NOT NULL,\\n \\"request_key\\" TEXT,\\n \\"sequence\\" INTEGER NOT NULL DEFAULT 0,\\n \\"actor_user_id\\" TEXT,\\n \\"body_json\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_photo_intakes","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":false,"unique":false},"sequence":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"body_json":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_photo_decisions_tenant_id_intake_id_idx","columns":["tenant_id","intake_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_photo_decisions_slug_context_idx","columns":["slug","context"]},{"name":"workbook_photo_decisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_photo_decisions_learner_id_idx","columns":["learner_id"]},{"name":"workbook_photo_decisions_intake_id_idx","columns":["intake_id"]}],"version":"4c8b4e5f"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookContextRevision":{"name":"workbookcontextrevision","className":"WorkbookContextRevision","qualifiedName":"@happyvertical/smrt-education:WorkbookContextRevision","collection":"workbookcontextrevisions","description":"Versioned contextual metadata; never edits Workbook identity or learning evidence.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-photo-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"workbookId":{"type":"foreignKey","required":true,"related":"Workbook","_meta":{"required":true}},"decisionId":{"type":"foreignKey","required":true,"related":"WorkbookPhotoDecision","_meta":{"required":true}},"metadataJson":{"type":"text","required":false,"_meta":{}}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_context_revisions","conflictColumns":["tenant_id","decision_id"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookContextRevision","collectionExportName":"WorkbookContextRevisionCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"workbookId","rule":"required","fieldType":"foreignKey"},{"field":"decisionId","rule":"required","fieldType":"foreignKey"}],"schema":{"tableName":"workbook_context_revisions","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_context_revisions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"workbook_id\\" UUID NOT NULL,\\n \\"decision_id\\" UUID NOT NULL,\\n \\"metadata_json\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"workbook_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbooks","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"decision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_photo_decisions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"metadata_json":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_context_revisions_tenant_id_decision_id_idx","columns":["tenant_id","decision_id"],"unique":true},{"name":"workbook_context_revisions_slug_context_idx","columns":["slug","context"]},{"name":"workbook_context_revisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_context_revisions_learner_id_idx","columns":["learner_id"]},{"name":"workbook_context_revisions_workbook_id_idx","columns":["workbook_id"]},{"name":"workbook_context_revisions_decision_id_idx","columns":["decision_id"]}],"version":"b1e8b4dc"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookContextRevisionCollection":{"name":"workbookcontextrevisioncollection","className":"WorkbookContextRevisionCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookContextRevisionCollection","collection":"workbookcontextrevisions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-photo-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_context_revisions","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookContextRevision","exportName":"WorkbookContextRevisionCollection","collectionExportName":"WorkbookContextRevisionCollectionCollection","schema":{"tableName":"workbook_context_revisions","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_context_revisions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"workbook_id\\" UUID NOT NULL,\\n \\"decision_id\\" UUID NOT NULL,\\n \\"metadata_json\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"workbook_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbooks","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"decision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_photo_decisions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"metadata_json":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_context_revisions_tenant_id_decision_id_idx","columns":["tenant_id","decision_id"],"unique":true},{"name":"workbook_context_revisions_slug_context_idx","columns":["slug","context"]},{"name":"workbook_context_revisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_context_revisions_learner_id_idx","columns":["learner_id"]},{"name":"workbook_context_revisions_workbook_id_idx","columns":["workbook_id"]},{"name":"workbook_context_revisions_decision_id_idx","columns":["decision_id"]}],"version":"b1e8b4dc"},"importPath":"@happyvertical/smrt-education"}},"moduleType":"smrt","recipes":[{"id":"education.catalog","className":"EducationCatalogRecipe","label":"Course catalog","summary":"Organize courses, sections, lessons, and their authorized learning materials.","synonyms":["courses","lessons","curriculum catalog"],"models":["@happyvertical/smrt-education:Course","@happyvertical/smrt-education:CourseSection","@happyvertical/smrt-education:Lesson","@happyvertical/smrt-education:LessonAsset"],"nav":[{"label":"Courses","model":"@happyvertical/smrt-education:Course","icon":"folder","description":"Courses available to this family.","noun":"course"}],"requires":[],"section":{"id":"education","label":"Education","icon":"folder","description":"Courses and lessons for learning."},"help":{"markdown":"# Course catalog\\n\\nManage courses, their sections, and lessons. Private family copies and answer\\nkeys remain visible only through the application\u2019s authorized catalog service.\\n","fieldRefs":[]},"runtime":"both","demo":{"mode":"server","reasons":["Needs a server because its package depends on @happyvertical/smrt-agents, @happyvertical/smrt-jobs, @happyvertical/smrt-profiles, @happyvertical/smrt-reports, @happyvertical/smrt-secrets, @happyvertical/smrt-tenancy, @happyvertical/smrt-users, which do not build for a browser (#3615, #3617, #3624, #3625, #3626, #3627)."]}},{"id":"education.learner","className":"EducationLearnerRecipe","label":"Learners","summary":"Plan learner curricula and retain enrollment-scoped progress.","synonyms":["learners","enrollments","learning progress"],"models":["@happyvertical/smrt-education:Learner","@happyvertical/smrt-education:Curriculum","@happyvertical/smrt-education:Enrollment","@happyvertical/smrt-education:LessonProgress"],"nav":[{"label":"Learners","model":"@happyvertical/smrt-education:Learner","icon":"users","description":"Authorized learners in this family.","noun":"learner"}],"requires":[],"section":{"id":"education","label":"Education","icon":"folder","description":"Courses and lessons for learning."},"help":{"markdown":"# Learners\\n\\nUse \`LearnerService\` in an authenticated exact-tenant context to read a learner,\\nplan a curriculum as an authorized guardian, enroll in a visible course, and\\nstart a lesson. Recipe metadata does not expose model CRUD. Hosts authenticate\\nusers, provision family membership, and validate guardian ProfileRelationship\\ntypes and effective terms. See \`agents/learner-service.md\` for the boundary.\\n","fieldRefs":[]},"runtime":"both","demo":{"mode":"server","reasons":["Needs a server because its package depends on @happyvertical/smrt-agents, @happyvertical/smrt-jobs, @happyvertical/smrt-profiles, @happyvertical/smrt-reports, @happyvertical/smrt-secrets, @happyvertical/smrt-tenancy, @happyvertical/smrt-users, which do not build for a browser (#3615, #3617, #3624, #3625, #3626, #3627)."]}}],"smrtDependencies":["@happyvertical/smrt-assets","@happyvertical/smrt-core","@happyvertical/smrt-ingestion","@happyvertical/smrt-profiles","@happyvertical/smrt-tenancy","@happyvertical/smrt-users"],"browser":{"status":"server-only","issues":["#3615","#3617","#3624","#3625","#3626","#3627"],"via":["@happyvertical/smrt-agents","@happyvertical/smrt-jobs","@happyvertical/smrt-profiles","@happyvertical/smrt-reports","@happyvertical/smrt-secrets","@happyvertical/smrt-tenancy","@happyvertical/smrt-users"]},"stampsConstructors":true}`));
5
+ ObjectRegistry.registerPackageManifest(JSON.parse(`{"version":"1.0.0","timestamp":0,"packageName":"@happyvertical/smrt-education","packageVersion":"0.57.41","objects":{"@happyvertical/smrt-education:CatalogProviderCollection":{"name":"catalogprovidercollection","className":"CatalogProviderCollection","qualifiedName":"@happyvertical/smrt-education:CatalogProviderCollection","collection":"catalogproviders","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"CatalogProvider","exportName":"CatalogProviderCollection","collectionExportName":"CatalogProviderCollectionCollection","schema":{"tableName":"catalog_providers","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_providers\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"provider_id\\" TEXT NOT NULL,\\n \\"name\\" TEXT NOT NULL,\\n \\"active\\" BOOLEAN NOT NULL DEFAULT TRUE\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"provider_id":{"type":"TEXT","notNull":true,"unique":false},"name":{"type":"TEXT","notNull":true,"unique":false},"active":{"type":"BOOLEAN","notNull":true,"unique":false,"default":true}},"indexes":[{"name":"catalog_providers_slug_context_idx","columns":["slug","context"],"unique":true},{"name":"catalog_providers_created_at_idx","columns":["created_at"]}],"version":"f35557a4"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogResourceCollection":{"name":"catalogresourcecollection","className":"CatalogResourceCollection","qualifiedName":"@happyvertical/smrt-education:CatalogResourceCollection","collection":"catalogresources","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"CatalogResource","exportName":"CatalogResourceCollection","collectionExportName":"CatalogResourceCollectionCollection","schema":{"tableName":"catalog_resources","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_resources\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"provider_id\\" TEXT NOT NULL,\\n \\"stable_id\\" TEXT NOT NULL,\\n \\"revision\\" TEXT NOT NULL,\\n \\"canonical_url\\" TEXT,\\n \\"title\\" TEXT NOT NULL,\\n \\"supplied_description\\" TEXT,\\n \\"author\\" TEXT,\\n \\"subjects\\" TEXT,\\n \\"grades\\" TEXT,\\n \\"language\\" TEXT,\\n \\"resource_type\\" TEXT,\\n \\"parent_stable_id\\" TEXT,\\n \\"available_formats\\" TEXT,\\n \\"representation\\" TEXT,\\n \\"preview\\" TEXT,\\n \\"license_evidence\\" TEXT,\\n \\"license_state\\" TEXT DEFAULT 'unknown',\\n \\"visibility\\" TEXT DEFAULT 'catalog',\\n \\"last_seen_run_id\\" TEXT,\\n \\"withdrawn_at\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"provider_id":{"type":"TEXT","notNull":true,"unique":false},"stable_id":{"type":"TEXT","notNull":true,"unique":false},"revision":{"type":"TEXT","notNull":true,"unique":false},"canonical_url":{"type":"TEXT","notNull":false,"unique":false},"title":{"type":"TEXT","notNull":true,"unique":false},"supplied_description":{"type":"TEXT","notNull":false,"unique":false},"author":{"type":"TEXT","notNull":false,"unique":false},"subjects":{"type":"TEXT","notNull":false,"unique":false},"grades":{"type":"TEXT","notNull":false,"unique":false},"language":{"type":"TEXT","notNull":false,"unique":false},"resource_type":{"type":"TEXT","notNull":false,"unique":false},"parent_stable_id":{"type":"TEXT","notNull":false,"unique":false},"available_formats":{"type":"TEXT","notNull":false,"unique":false},"representation":{"type":"TEXT","notNull":false,"unique":false},"preview":{"type":"TEXT","notNull":false,"unique":false},"license_evidence":{"type":"TEXT","notNull":false,"unique":false},"license_state":{"type":"TEXT","notNull":false,"unique":false,"default":"unknown"},"visibility":{"type":"TEXT","notNull":false,"unique":false,"default":"catalog"},"last_seen_run_id":{"type":"TEXT","notNull":false,"unique":false},"withdrawn_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"catalog_resources_slug_context_idx","columns":["slug","context"],"unique":true},{"name":"catalog_resources_created_at_idx","columns":["created_at"]}],"version":"6ea66f0d"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogSyncStateCollection":{"name":"catalogsyncstatecollection","className":"CatalogSyncStateCollection","qualifiedName":"@happyvertical/smrt-education:CatalogSyncStateCollection","collection":"catalogsyncstates","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"CatalogSyncState","exportName":"CatalogSyncStateCollection","collectionExportName":"CatalogSyncStateCollectionCollection","schema":{"tableName":"catalog_sync_states","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_sync_states\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"provider_id\\" TEXT NOT NULL,\\n \\"cursor\\" TEXT,\\n \\"run_id\\" TEXT,\\n \\"complete\\" BOOLEAN NOT NULL DEFAULT FALSE,\\n \\"paused\\" BOOLEAN NOT NULL DEFAULT FALSE,\\n \\"pause_reason\\" TEXT,\\n \\"imported_count\\" INTEGER NOT NULL DEFAULT 0,\\n \\"failures\\" TEXT,\\n \\"last_successful_at\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"provider_id":{"type":"TEXT","notNull":true,"unique":false},"cursor":{"type":"TEXT","notNull":false,"unique":false},"run_id":{"type":"TEXT","notNull":false,"unique":false},"complete":{"type":"BOOLEAN","notNull":true,"unique":false,"default":false},"paused":{"type":"BOOLEAN","notNull":true,"unique":false,"default":false},"pause_reason":{"type":"TEXT","notNull":false,"unique":false},"imported_count":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"failures":{"type":"TEXT","notNull":false,"unique":false},"last_successful_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"catalog_sync_states_slug_context_idx","columns":["slug","context"],"unique":true},{"name":"catalog_sync_states_created_at_idx","columns":["created_at"]}],"version":"52dc3ee1"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogSelectionCollection":{"name":"catalogselectioncollection","className":"CatalogSelectionCollection","qualifiedName":"@happyvertical/smrt-education:CatalogSelectionCollection","collection":"catalogselections","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"CatalogSelection","exportName":"CatalogSelectionCollection","collectionExportName":"CatalogSelectionCollectionCollection","schema":{"tableName":"catalog_selections","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_selections\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"resource_id\\" UUID NOT NULL,\\n \\"selected_by_user_id\\" TEXT NOT NULL,\\n \\"selected_revision\\" TEXT NOT NULL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"resource_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"catalog_resources","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"selected_by_user_id":{"type":"TEXT","notNull":true,"unique":false},"selected_revision":{"type":"TEXT","notNull":true,"unique":false}},"indexes":[{"name":"catalog_selections_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"catalog_selections_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"catalog_selections_resource_id_idx","columns":["resource_id"]}],"version":"c6b02eb9"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogAcquisitionCollection":{"name":"catalogacquisitioncollection","className":"CatalogAcquisitionCollection","qualifiedName":"@happyvertical/smrt-education:CatalogAcquisitionCollection","collection":"catalogacquisitions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"CatalogAcquisition","exportName":"CatalogAcquisitionCollection","collectionExportName":"CatalogAcquisitionCollectionCollection","schema":{"tableName":"catalog_acquisitions","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_acquisitions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"resource_id\\" UUID NOT NULL,\\n \\"selection_id\\" UUID NOT NULL,\\n \\"revision\\" TEXT NOT NULL,\\n \\"format\\" TEXT NOT NULL,\\n \\"sha256\\" TEXT NOT NULL,\\n \\"attribution\\" TEXT,\\n \\"notices\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"resource_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"catalog_resources","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"selection_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"catalog_selections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"revision":{"type":"TEXT","notNull":true,"unique":false},"format":{"type":"TEXT","notNull":true,"unique":false},"sha256":{"type":"TEXT","notNull":true,"unique":false},"attribution":{"type":"TEXT","notNull":false,"unique":false},"notices":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"catalog_acquisitions_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"catalog_acquisitions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"catalog_acquisitions_resource_id_idx","columns":["resource_id"]},{"name":"catalog_acquisitions_selection_id_idx","columns":["selection_id"]}],"version":"ee9c5add"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogProvider":{"name":"catalogprovider","className":"CatalogProvider","qualifiedName":"@happyvertical/smrt-education:CatalogProvider","collection":"catalogproviders","description":"Globally visible provider registration. Hosts configure adapters and credentials out of band.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-models.ts","packageName":"@happyvertical/smrt-education","fields":{"providerId":{"type":"text","required":true,"_meta":{"required":true}},"name":{"type":"text","required":true,"_meta":{"required":true}},"active":{"type":"boolean","required":true,"default":true}},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtObject","exportName":"CatalogProvider","collectionExportName":"CatalogProviderCollection","displayLabelField":"name","validationRules":[{"field":"providerId","rule":"required","fieldType":"text"},{"field":"name","rule":"required","fieldType":"text"},{"field":"active","rule":"required","fieldType":"boolean"}],"schema":{"tableName":"catalog_providers","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_providers\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"provider_id\\" TEXT NOT NULL,\\n \\"name\\" TEXT NOT NULL,\\n \\"active\\" BOOLEAN NOT NULL DEFAULT TRUE\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"provider_id":{"type":"TEXT","notNull":true,"unique":false},"name":{"type":"TEXT","notNull":true,"unique":false},"active":{"type":"BOOLEAN","notNull":true,"unique":false,"default":true}},"indexes":[{"name":"catalog_providers_slug_context_idx","columns":["slug","context"],"unique":true},{"name":"catalog_providers_created_at_idx","columns":["created_at"]}],"version":"f35557a4"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogResource":{"name":"catalogresource","className":"CatalogResource","qualifiedName":"@happyvertical/smrt-education:CatalogResource","collection":"catalogresources","description":"A provider-native record. Rows are intentionally not merged across providers.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-models.ts","packageName":"@happyvertical/smrt-education","fields":{"providerId":{"type":"text","required":true,"_meta":{"required":true}},"stableId":{"type":"text","required":true,"_meta":{"required":true}},"revision":{"type":"text","required":true,"_meta":{"required":true}},"canonicalUrl":{"type":"text","required":false},"title":{"type":"text","required":true,"_meta":{"required":true}},"suppliedDescription":{"type":"text","required":false},"author":{"type":"text","required":false},"subjects":{"type":"text","required":false},"grades":{"type":"text","required":false},"language":{"type":"text","required":false},"resourceType":{"type":"text","required":false},"parentStableId":{"type":"text","required":false},"availableFormats":{"type":"text","required":false},"representation":{"type":"text","required":false},"preview":{"type":"text","required":false},"licenseEvidence":{"type":"text","required":false},"licenseState":{"type":"text","required":false,"default":"unknown","enum":["verified","unknown","conflicting","restricted"]},"visibility":{"type":"text","required":false,"default":"catalog","enum":["catalog","teacher"]},"lastSeenRunId":{"type":"text","required":false},"withdrawnAt":{"type":"text","required":false}},"methods":{"getPreview":{"name":"getPreview","async":false,"parameters":[],"returnType":"CatalogPreview | undefined","isStatic":false,"isPublic":true},"setPreview":{"name":"setPreview","async":false,"parameters":[{"name":"value","type":"CatalogPreview | undefined","optional":false,"unionBranches":[{"type":"CatalogPreview"},{"type":"undefined"}]}],"returnType":"void","isStatic":false,"isPublic":true},"getRepresentation":{"name":"getRepresentation","async":false,"parameters":[],"returnType":"CatalogResourceRepresentation | undefined","isStatic":false,"isPublic":true},"setRepresentation":{"name":"setRepresentation","async":false,"parameters":[{"name":"value","type":"CatalogResourceRepresentation | undefined","optional":false,"unionBranches":[{"type":"CatalogResourceRepresentation"},{"type":"undefined"}]}],"returnType":"void","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtObject","exportName":"CatalogResource","collectionExportName":"CatalogResourceCollection","displayLabelField":"title","validationRules":[{"field":"providerId","rule":"required","fieldType":"text"},{"field":"stableId","rule":"required","fieldType":"text"},{"field":"revision","rule":"required","fieldType":"text"},{"field":"title","rule":"required","fieldType":"text"}],"schema":{"tableName":"catalog_resources","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_resources\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"provider_id\\" TEXT NOT NULL,\\n \\"stable_id\\" TEXT NOT NULL,\\n \\"revision\\" TEXT NOT NULL,\\n \\"canonical_url\\" TEXT,\\n \\"title\\" TEXT NOT NULL,\\n \\"supplied_description\\" TEXT,\\n \\"author\\" TEXT,\\n \\"subjects\\" TEXT,\\n \\"grades\\" TEXT,\\n \\"language\\" TEXT,\\n \\"resource_type\\" TEXT,\\n \\"parent_stable_id\\" TEXT,\\n \\"available_formats\\" TEXT,\\n \\"representation\\" TEXT,\\n \\"preview\\" TEXT,\\n \\"license_evidence\\" TEXT,\\n \\"license_state\\" TEXT DEFAULT 'unknown',\\n \\"visibility\\" TEXT DEFAULT 'catalog',\\n \\"last_seen_run_id\\" TEXT,\\n \\"withdrawn_at\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"provider_id":{"type":"TEXT","notNull":true,"unique":false},"stable_id":{"type":"TEXT","notNull":true,"unique":false},"revision":{"type":"TEXT","notNull":true,"unique":false},"canonical_url":{"type":"TEXT","notNull":false,"unique":false},"title":{"type":"TEXT","notNull":true,"unique":false},"supplied_description":{"type":"TEXT","notNull":false,"unique":false},"author":{"type":"TEXT","notNull":false,"unique":false},"subjects":{"type":"TEXT","notNull":false,"unique":false},"grades":{"type":"TEXT","notNull":false,"unique":false},"language":{"type":"TEXT","notNull":false,"unique":false},"resource_type":{"type":"TEXT","notNull":false,"unique":false},"parent_stable_id":{"type":"TEXT","notNull":false,"unique":false},"available_formats":{"type":"TEXT","notNull":false,"unique":false},"representation":{"type":"TEXT","notNull":false,"unique":false},"preview":{"type":"TEXT","notNull":false,"unique":false},"license_evidence":{"type":"TEXT","notNull":false,"unique":false},"license_state":{"type":"TEXT","notNull":false,"unique":false,"default":"unknown"},"visibility":{"type":"TEXT","notNull":false,"unique":false,"default":"catalog"},"last_seen_run_id":{"type":"TEXT","notNull":false,"unique":false},"withdrawn_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"catalog_resources_slug_context_idx","columns":["slug","context"],"unique":true},{"name":"catalog_resources_created_at_idx","columns":["created_at"]}],"version":"6ea66f0d"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogSyncState":{"name":"catalogsyncstate","className":"CatalogSyncState","qualifiedName":"@happyvertical/smrt-education:CatalogSyncState","collection":"catalogsyncstates","description":"Durable per-provider enumeration state. A failed or partial feed is never complete.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-models.ts","packageName":"@happyvertical/smrt-education","fields":{"providerId":{"type":"text","required":true,"_meta":{"required":true}},"cursor":{"type":"text","required":false},"runId":{"type":"text","required":false},"complete":{"type":"boolean","required":true,"default":false},"paused":{"type":"boolean","required":true,"default":false},"pauseReason":{"type":"text","required":false},"importedCount":{"type":"integer","required":true,"default":0},"failures":{"type":"text","required":false},"lastSuccessfulAt":{"type":"text","required":false}},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtObject","exportName":"CatalogSyncState","collectionExportName":"CatalogSyncStateCollection","validationRules":[{"field":"providerId","rule":"required","fieldType":"text"},{"field":"complete","rule":"required","fieldType":"boolean"},{"field":"paused","rule":"required","fieldType":"boolean"},{"field":"importedCount","rule":"required","fieldType":"integer"}],"schema":{"tableName":"catalog_sync_states","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_sync_states\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"provider_id\\" TEXT NOT NULL,\\n \\"cursor\\" TEXT,\\n \\"run_id\\" TEXT,\\n \\"complete\\" BOOLEAN NOT NULL DEFAULT FALSE,\\n \\"paused\\" BOOLEAN NOT NULL DEFAULT FALSE,\\n \\"pause_reason\\" TEXT,\\n \\"imported_count\\" INTEGER NOT NULL DEFAULT 0,\\n \\"failures\\" TEXT,\\n \\"last_successful_at\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"provider_id":{"type":"TEXT","notNull":true,"unique":false},"cursor":{"type":"TEXT","notNull":false,"unique":false},"run_id":{"type":"TEXT","notNull":false,"unique":false},"complete":{"type":"BOOLEAN","notNull":true,"unique":false,"default":false},"paused":{"type":"BOOLEAN","notNull":true,"unique":false,"default":false},"pause_reason":{"type":"TEXT","notNull":false,"unique":false},"imported_count":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"failures":{"type":"TEXT","notNull":false,"unique":false},"last_successful_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"catalog_sync_states_slug_context_idx","columns":["slug","context"],"unique":true},{"name":"catalog_sync_states_created_at_idx","columns":["created_at"]}],"version":"52dc3ee1"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogSelection":{"name":"catalogselection","className":"CatalogSelection","qualifiedName":"@happyvertical/smrt-education:CatalogSelection","collection":"catalogselections","description":"Tenant-owned intent to use a metadata record, distinct from acquiring bytes.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"resourceId":{"type":"foreignKey","required":true,"related":"CatalogResource","_meta":{"required":true}},"selectedByUserId":{"type":"text","required":true,"_meta":{"required":true}},"selectedRevision":{"type":"text","required":true,"_meta":{"required":true}}},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"CatalogSelection","collectionExportName":"CatalogSelectionCollection","validationRules":[{"field":"resourceId","rule":"required","fieldType":"foreignKey"},{"field":"selectedByUserId","rule":"required","fieldType":"text"},{"field":"selectedRevision","rule":"required","fieldType":"text"}],"schema":{"tableName":"catalog_selections","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_selections\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"resource_id\\" UUID NOT NULL,\\n \\"selected_by_user_id\\" TEXT NOT NULL,\\n \\"selected_revision\\" TEXT NOT NULL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"resource_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"catalog_resources","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"selected_by_user_id":{"type":"TEXT","notNull":true,"unique":false},"selected_revision":{"type":"TEXT","notNull":true,"unique":false}},"indexes":[{"name":"catalog_selections_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"catalog_selections_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"catalog_selections_resource_id_idx","columns":["resource_id"]}],"version":"c6b02eb9"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CatalogAcquisition":{"name":"catalogacquisition","className":"CatalogAcquisition","qualifiedName":"@happyvertical/smrt-education:CatalogAcquisition","collection":"catalogacquisitions","description":"A pinned, tenant-owned acquisition record. Bytes belong in a host storage service.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"resourceId":{"type":"foreignKey","required":true,"related":"CatalogResource","_meta":{"required":true}},"selectionId":{"type":"foreignKey","required":true,"related":"CatalogSelection","_meta":{"required":true}},"revision":{"type":"text","required":true,"_meta":{"required":true}},"format":{"type":"text","required":true,"_meta":{"required":true}},"sha256":{"type":"text","required":true,"_meta":{"required":true}},"attribution":{"type":"text","required":false},"notices":{"type":"text","required":false}},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"CatalogAcquisition","collectionExportName":"CatalogAcquisitionCollection","validationRules":[{"field":"resourceId","rule":"required","fieldType":"foreignKey"},{"field":"selectionId","rule":"required","fieldType":"foreignKey"},{"field":"revision","rule":"required","fieldType":"text"},{"field":"format","rule":"required","fieldType":"text"},{"field":"sha256","rule":"required","fieldType":"text"}],"schema":{"tableName":"catalog_acquisitions","ddl":"CREATE TABLE IF NOT EXISTS \\"catalog_acquisitions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"resource_id\\" UUID NOT NULL,\\n \\"selection_id\\" UUID NOT NULL,\\n \\"revision\\" TEXT NOT NULL,\\n \\"format\\" TEXT NOT NULL,\\n \\"sha256\\" TEXT NOT NULL,\\n \\"attribution\\" TEXT,\\n \\"notices\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"resource_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"catalog_resources","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"selection_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"catalog_selections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"revision":{"type":"TEXT","notNull":true,"unique":false},"format":{"type":"TEXT","notNull":true,"unique":false},"sha256":{"type":"TEXT","notNull":true,"unique":false},"attribution":{"type":"TEXT","notNull":false,"unique":false},"notices":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"catalog_acquisitions_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"catalog_acquisitions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"catalog_acquisitions_resource_id_idx","columns":["resource_id"]},{"name":"catalog_acquisitions_selection_id_idx","columns":["selection_id"]}],"version":"ee9c5add"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Course":{"name":"course","className":"Course","qualifiedName":"@happyvertical/smrt-education:Course","collection":"courses","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true,"mode":"optional","field":"tenantId","allowSuperAdminBypass":false}}},"title":{"type":"text","required":true,"_meta":{"required":true}},"summary":{"type":"text","required":false},"description":{"type":"text","required":false},"sourceKey":{"type":"text","required":false},"sourceUrl":{"type":"text","required":false},"sourceRef":{"type":"text","required":false},"license":{"type":"text","required":false},"licenseKind":{"type":"text","required":false,"default":"own-work","enum":["own-work","open-license","personal-use-copy","licensed-for-sharing"]},"licenseNote":{"type":"text","required":false},"attestedBy":{"type":"text","required":false},"subject":{"type":"text","required":false},"tags":{"type":"text","required":false},"levelMin":{"type":"integer","required":true,"default":0},"levelMax":{"type":"integer","required":true,"default":0},"difficulty":{"type":"decimal","required":true,"default":0},"estimatedMinutes":{"type":"integer","required":true,"default":0},"modality":{"type":"text","required":false,"default":"online","enum":["online","printable","kit","video","game","mixed"]},"status":{"type":"text","required":false,"default":"draft","enum":["draft","published","archived"]}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableStrategy":"sti","api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"optional"},"conflictColumns":["tenant_id","slug","context","_meta_type"]},"extends":"SmrtObject","exportName":"Course","collectionExportName":"CourseCollection","displayLabelField":"title","validationRules":[{"field":"title","rule":"required","fieldType":"text"},{"field":"levelMin","rule":"required","fieldType":"integer"},{"field":"levelMax","rule":"required","fieldType":"integer"},{"field":"difficulty","rule":"required","fieldType":"decimal"},{"field":"estimatedMinutes","rule":"required","fieldType":"integer"}],"schema":{"tableName":"courses","ddl":"CREATE TABLE IF NOT EXISTS \\"courses\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"summary\\" TEXT,\\n \\"description\\" TEXT,\\n \\"source_key\\" TEXT,\\n \\"source_url\\" TEXT,\\n \\"source_ref\\" TEXT,\\n \\"license\\" TEXT,\\n \\"license_kind\\" TEXT DEFAULT 'own-work',\\n \\"license_note\\" TEXT,\\n \\"attested_by\\" TEXT,\\n \\"subject\\" TEXT,\\n \\"tags\\" TEXT,\\n \\"level_min\\" INTEGER DEFAULT 0,\\n \\"level_max\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"status\\" TEXT DEFAULT 'draft'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"title":{"type":"TEXT","notNull":false},"summary":{"type":"TEXT","notNull":false},"description":{"type":"TEXT","notNull":false},"source_key":{"type":"TEXT","notNull":false},"source_url":{"type":"TEXT","notNull":false},"source_ref":{"type":"TEXT","notNull":false},"license":{"type":"TEXT","notNull":false},"license_kind":{"type":"TEXT","notNull":false,"default":"own-work"},"license_note":{"type":"TEXT","notNull":false},"attested_by":{"type":"TEXT","notNull":false},"subject":{"type":"TEXT","notNull":false},"tags":{"type":"TEXT","notNull":false},"level_min":{"type":"INTEGER","notNull":false,"default":0},"level_max":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"status":{"type":"TEXT","notNull":false,"default":"draft"}},"indexes":[{"name":"courses_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"courses_meta_type_idx","columns":["_meta_type"]},{"name":"courses_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"88cc23ab"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:ExternalCourse":{"name":"externalcourse","className":"ExternalCourse","qualifiedName":"@happyvertical/smrt-education:ExternalCourse","collection":"courses","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true}}},"title":{"type":"text","required":true,"_meta":{"required":true}},"summary":{"type":"text","required":false},"description":{"type":"text","required":false},"sourceKey":{"type":"text","required":false},"sourceUrl":{"type":"text","required":false},"sourceRef":{"type":"text","required":false},"license":{"type":"text","required":false},"licenseKind":{"type":"text","required":false,"default":"own-work","enum":["own-work","open-license","personal-use-copy","licensed-for-sharing"]},"licenseNote":{"type":"text","required":false},"attestedBy":{"type":"text","required":false},"subject":{"type":"text","required":false},"tags":{"type":"text","required":false},"levelMin":{"type":"integer","required":true,"default":0},"levelMax":{"type":"integer","required":true,"default":0},"difficulty":{"type":"decimal","required":true,"default":0},"estimatedMinutes":{"type":"integer","required":true,"default":0},"modality":{"type":"text","required":false,"default":"online","enum":["online","printable","kit","video","game","mixed"]},"status":{"type":"text","required":false,"default":"draft","enum":["draft","published","archived"]}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"courses","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Course","exportName":"ExternalCourse","collectionExportName":"ExternalCourseCollection","displayLabelField":"title","validationRules":[{"field":"title","rule":"required","fieldType":"text"},{"field":"levelMin","rule":"required","fieldType":"integer"},{"field":"levelMax","rule":"required","fieldType":"integer"},{"field":"difficulty","rule":"required","fieldType":"decimal"},{"field":"estimatedMinutes","rule":"required","fieldType":"integer"}],"schema":{"tableName":"courses","ddl":"CREATE TABLE IF NOT EXISTS \\"courses\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"summary\\" TEXT,\\n \\"description\\" TEXT,\\n \\"source_key\\" TEXT,\\n \\"source_url\\" TEXT,\\n \\"source_ref\\" TEXT,\\n \\"license\\" TEXT,\\n \\"license_kind\\" TEXT DEFAULT 'own-work',\\n \\"license_note\\" TEXT,\\n \\"attested_by\\" TEXT,\\n \\"subject\\" TEXT,\\n \\"tags\\" TEXT,\\n \\"level_min\\" INTEGER DEFAULT 0,\\n \\"level_max\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"status\\" TEXT DEFAULT 'draft'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"title":{"type":"TEXT","notNull":false},"summary":{"type":"TEXT","notNull":false},"description":{"type":"TEXT","notNull":false},"source_key":{"type":"TEXT","notNull":false},"source_url":{"type":"TEXT","notNull":false},"source_ref":{"type":"TEXT","notNull":false},"license":{"type":"TEXT","notNull":false},"license_kind":{"type":"TEXT","notNull":false,"default":"own-work"},"license_note":{"type":"TEXT","notNull":false},"attested_by":{"type":"TEXT","notNull":false},"subject":{"type":"TEXT","notNull":false},"tags":{"type":"TEXT","notNull":false},"level_min":{"type":"INTEGER","notNull":false,"default":0},"level_max":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"status":{"type":"TEXT","notNull":false,"default":"draft"}},"indexes":[{"name":"courses_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"courses_meta_type_idx","columns":["_meta_type"]},{"name":"courses_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"88cc23ab"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:AuthoredCourse":{"name":"authoredcourse","className":"AuthoredCourse","qualifiedName":"@happyvertical/smrt-education:AuthoredCourse","collection":"courses","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true}}},"title":{"type":"text","required":true,"_meta":{"required":true}},"summary":{"type":"text","required":false},"description":{"type":"text","required":false},"sourceKey":{"type":"text","required":false},"sourceUrl":{"type":"text","required":false},"sourceRef":{"type":"text","required":false},"license":{"type":"text","required":false},"licenseKind":{"type":"text","required":false,"default":"own-work","enum":["own-work","open-license","personal-use-copy","licensed-for-sharing"]},"licenseNote":{"type":"text","required":false},"attestedBy":{"type":"text","required":false},"subject":{"type":"text","required":false},"tags":{"type":"text","required":false},"levelMin":{"type":"integer","required":true,"default":0},"levelMax":{"type":"integer","required":true,"default":0},"difficulty":{"type":"decimal","required":true,"default":0},"estimatedMinutes":{"type":"integer","required":true,"default":0},"modality":{"type":"text","required":false,"default":"online","enum":["online","printable","kit","video","game","mixed"]},"status":{"type":"text","required":false,"default":"draft","enum":["draft","published","archived"]}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"courses","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Course","exportName":"AuthoredCourse","collectionExportName":"AuthoredCourseCollection","displayLabelField":"title","validationRules":[{"field":"title","rule":"required","fieldType":"text"},{"field":"levelMin","rule":"required","fieldType":"integer"},{"field":"levelMax","rule":"required","fieldType":"integer"},{"field":"difficulty","rule":"required","fieldType":"decimal"},{"field":"estimatedMinutes","rule":"required","fieldType":"integer"}],"schema":{"tableName":"courses","ddl":"CREATE TABLE IF NOT EXISTS \\"courses\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"summary\\" TEXT,\\n \\"description\\" TEXT,\\n \\"source_key\\" TEXT,\\n \\"source_url\\" TEXT,\\n \\"source_ref\\" TEXT,\\n \\"license\\" TEXT,\\n \\"license_kind\\" TEXT DEFAULT 'own-work',\\n \\"license_note\\" TEXT,\\n \\"attested_by\\" TEXT,\\n \\"subject\\" TEXT,\\n \\"tags\\" TEXT,\\n \\"level_min\\" INTEGER DEFAULT 0,\\n \\"level_max\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"status\\" TEXT DEFAULT 'draft'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"title":{"type":"TEXT","notNull":false},"summary":{"type":"TEXT","notNull":false},"description":{"type":"TEXT","notNull":false},"source_key":{"type":"TEXT","notNull":false},"source_url":{"type":"TEXT","notNull":false},"source_ref":{"type":"TEXT","notNull":false},"license":{"type":"TEXT","notNull":false},"license_kind":{"type":"TEXT","notNull":false,"default":"own-work"},"license_note":{"type":"TEXT","notNull":false},"attested_by":{"type":"TEXT","notNull":false},"subject":{"type":"TEXT","notNull":false},"tags":{"type":"TEXT","notNull":false},"level_min":{"type":"INTEGER","notNull":false,"default":0},"level_max":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"status":{"type":"TEXT","notNull":false,"default":"draft"}},"indexes":[{"name":"courses_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"courses_meta_type_idx","columns":["_meta_type"]},{"name":"courses_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"88cc23ab"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CourseSection":{"name":"coursesection","className":"CourseSection","qualifiedName":"@happyvertical/smrt-education:CourseSection","collection":"coursesections","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true,"mode":"optional","field":"tenantId","allowSuperAdminBypass":false}}},"courseId":{"type":"foreignKey","required":true,"related":"Course","_meta":{"required":true}},"title":{"type":"text","required":true,"_meta":{"required":true}},"sortOrder":{"type":"integer","required":true,"default":0}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"optional"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"CourseSection","collectionExportName":"CourseSectionCollection","displayLabelField":"title","validationRules":[{"field":"courseId","rule":"required","fieldType":"foreignKey"},{"field":"title","rule":"required","fieldType":"text"},{"field":"sortOrder","rule":"required","fieldType":"integer"}],"schema":{"tableName":"course_sections","ddl":"CREATE TABLE IF NOT EXISTS \\"course_sections\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"course_id\\" UUID NOT NULL,\\n \\"title\\" TEXT NOT NULL,\\n \\"sort_order\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false,"unique":false},"course_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"courses","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":true,"unique":false},"sort_order":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"course_sections_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true,"nullsNotDistinct":true},{"name":"course_sections_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"course_sections_course_id_idx","columns":["course_id"]}],"version":"e20480d7"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Lesson":{"name":"lesson","className":"Lesson","qualifiedName":"@happyvertical/smrt-education:Lesson","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true,"mode":"optional","field":"tenantId","allowSuperAdminBypass":false}}},"sectionId":{"type":"foreignKey","required":true,"related":"CourseSection","_meta":{"required":true}},"title":{"type":"text","required":true,"_meta":{"required":true}},"body":{"type":"text","required":false},"sortOrder":{"type":"integer","required":true,"default":0},"estimatedMinutes":{"type":"integer","required":true,"default":0},"difficulty":{"type":"decimal","required":true,"default":0},"modality":{"type":"text","required":false,"default":"online","enum":["online","printable","kit","video","game","mixed"]},"completionRule":{"type":"text","required":false,"default":"attest","enum":["attest","submit","score","external"]},"externalRef":{"type":"text","required":false},"externalUrl":{"type":"text","required":false}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableStrategy":"sti","api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"optional"},"conflictColumns":["tenant_id","slug","context","_meta_type"]},"extends":"SmrtObject","exportName":"Lesson","collectionExportName":"LessonCollection","displayLabelField":"title","validationRules":[{"field":"sectionId","rule":"required","fieldType":"foreignKey"},{"field":"title","rule":"required","fieldType":"text"},{"field":"sortOrder","rule":"required","fieldType":"integer"},{"field":"estimatedMinutes","rule":"required","fieldType":"integer"},{"field":"difficulty","rule":"required","fieldType":"decimal"}],"schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"092df043"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Reading":{"name":"reading","className":"Reading","qualifiedName":"@happyvertical/smrt-education:Reading","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true}}},"sectionId":{"type":"foreignKey","required":true,"related":"CourseSection","_meta":{"required":true}},"title":{"type":"text","required":true,"_meta":{"required":true}},"body":{"type":"text","required":false},"sortOrder":{"type":"integer","required":true,"default":0},"estimatedMinutes":{"type":"integer","required":true,"default":0},"difficulty":{"type":"decimal","required":true,"default":0},"modality":{"type":"text","required":false,"default":"online","enum":["online","printable","kit","video","game","mixed"]},"completionRule":{"type":"text","required":false,"default":"attest","enum":["attest","submit","score","external"]},"externalRef":{"type":"text","required":false},"externalUrl":{"type":"text","required":false}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"lessons","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Lesson","exportName":"Reading","collectionExportName":"ReadingCollection","displayLabelField":"title","validationRules":[{"field":"sectionId","rule":"required","fieldType":"foreignKey"},{"field":"title","rule":"required","fieldType":"text"},{"field":"sortOrder","rule":"required","fieldType":"integer"},{"field":"estimatedMinutes","rule":"required","fieldType":"integer"},{"field":"difficulty","rule":"required","fieldType":"decimal"}],"schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"9d8b6fcd"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Video":{"name":"video","className":"Video","qualifiedName":"@happyvertical/smrt-education:Video","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true}}},"sectionId":{"type":"foreignKey","required":true,"related":"CourseSection","_meta":{"required":true}},"title":{"type":"text","required":true,"_meta":{"required":true}},"body":{"type":"text","required":false},"sortOrder":{"type":"integer","required":true,"default":0},"estimatedMinutes":{"type":"integer","required":true,"default":0},"difficulty":{"type":"decimal","required":true,"default":0},"modality":{"type":"text","required":false,"default":"online","enum":["online","printable","kit","video","game","mixed"]},"completionRule":{"type":"text","required":false,"default":"attest","enum":["attest","submit","score","external"]},"externalRef":{"type":"text","required":false},"externalUrl":{"type":"text","required":false},"videoUrl":{"type":"text","required":false}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"lessons","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Lesson","exportName":"Video","collectionExportName":"VideoCollection","displayLabelField":"title","validationRules":[{"field":"sectionId","rule":"required","fieldType":"foreignKey"},{"field":"title","rule":"required","fieldType":"text"},{"field":"sortOrder","rule":"required","fieldType":"integer"},{"field":"estimatedMinutes","rule":"required","fieldType":"integer"},{"field":"difficulty","rule":"required","fieldType":"decimal"}],"schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"9e0ef984"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Worksheet":{"name":"worksheet","className":"Worksheet","qualifiedName":"@happyvertical/smrt-education:Worksheet","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true}}},"sectionId":{"type":"foreignKey","required":true,"related":"CourseSection","_meta":{"required":true}},"title":{"type":"text","required":true,"_meta":{"required":true}},"body":{"type":"text","required":false},"sortOrder":{"type":"integer","required":true,"default":0},"estimatedMinutes":{"type":"integer","required":true,"default":0},"difficulty":{"type":"decimal","required":true,"default":0},"modality":{"type":"text","required":false,"default":"online","enum":["online","printable","kit","video","game","mixed"]},"completionRule":{"type":"text","required":false,"default":"submit","enum":["attest","submit","score","external"]},"externalRef":{"type":"text","required":false},"externalUrl":{"type":"text","required":false},"printableUrl":{"type":"text","required":false},"answerUrl":{"type":"text","required":false},"pages":{"type":"integer","required":true,"default":0}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"lessons","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Lesson","exportName":"Worksheet","collectionExportName":"WorksheetCollection","displayLabelField":"title","validationRules":[{"field":"sectionId","rule":"required","fieldType":"foreignKey"},{"field":"title","rule":"required","fieldType":"text"},{"field":"sortOrder","rule":"required","fieldType":"integer"},{"field":"estimatedMinutes","rule":"required","fieldType":"integer"},{"field":"difficulty","rule":"required","fieldType":"decimal"},{"field":"pages","rule":"required","fieldType":"integer"}],"schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"10976938"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Exercise":{"name":"exercise","className":"Exercise","qualifiedName":"@happyvertical/smrt-education:Exercise","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/catalog.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true}}},"sectionId":{"type":"foreignKey","required":true,"related":"CourseSection","_meta":{"required":true}},"title":{"type":"text","required":true,"_meta":{"required":true}},"body":{"type":"text","required":false},"sortOrder":{"type":"integer","required":true,"default":0},"estimatedMinutes":{"type":"integer","required":true,"default":0},"difficulty":{"type":"decimal","required":true,"default":0},"modality":{"type":"text","required":false,"default":"online","enum":["online","printable","kit","video","game","mixed"]},"completionRule":{"type":"text","required":false,"default":"attest","enum":["attest","submit","score","external"]},"externalRef":{"type":"text","required":false},"externalUrl":{"type":"text","required":false}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"lessons","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Lesson","exportName":"Exercise","collectionExportName":"ExerciseCollection","displayLabelField":"title","validationRules":[{"field":"sectionId","rule":"required","fieldType":"foreignKey"},{"field":"title","rule":"required","fieldType":"text"},{"field":"sortOrder","rule":"required","fieldType":"integer"},{"field":"estimatedMinutes","rule":"required","fieldType":"integer"},{"field":"difficulty","rule":"required","fieldType":"decimal"}],"schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"145eadbe"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CourseCollection":{"name":"coursecollection","className":"CourseCollection","qualifiedName":"@happyvertical/smrt-education:CourseCollection","collection":"courses","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Course","exportName":"CourseCollection","collectionExportName":"CourseCollectionCollection","schema":{"tableName":"courses","ddl":"CREATE TABLE IF NOT EXISTS \\"courses\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"summary\\" TEXT,\\n \\"description\\" TEXT,\\n \\"source_key\\" TEXT,\\n \\"source_url\\" TEXT,\\n \\"source_ref\\" TEXT,\\n \\"license\\" TEXT,\\n \\"license_kind\\" TEXT DEFAULT 'own-work',\\n \\"license_note\\" TEXT,\\n \\"attested_by\\" TEXT,\\n \\"subject\\" TEXT,\\n \\"tags\\" TEXT,\\n \\"level_min\\" INTEGER DEFAULT 0,\\n \\"level_max\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"status\\" TEXT DEFAULT 'draft'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"title":{"type":"TEXT","notNull":false},"summary":{"type":"TEXT","notNull":false},"description":{"type":"TEXT","notNull":false},"source_key":{"type":"TEXT","notNull":false},"source_url":{"type":"TEXT","notNull":false},"source_ref":{"type":"TEXT","notNull":false},"license":{"type":"TEXT","notNull":false},"license_kind":{"type":"TEXT","notNull":false,"default":"own-work"},"license_note":{"type":"TEXT","notNull":false},"attested_by":{"type":"TEXT","notNull":false},"subject":{"type":"TEXT","notNull":false},"tags":{"type":"TEXT","notNull":false},"level_min":{"type":"INTEGER","notNull":false,"default":0},"level_max":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"status":{"type":"TEXT","notNull":false,"default":"draft"}},"indexes":[{"name":"courses_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"courses_meta_type_idx","columns":["_meta_type"]},{"name":"courses_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"88cc23ab"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:ExternalCourseCollection":{"name":"externalcoursecollection","className":"ExternalCourseCollection","qualifiedName":"@happyvertical/smrt-education:ExternalCourseCollection","collection":"courses","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"courses","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"ExternalCourse","exportName":"ExternalCourseCollection","collectionExportName":"ExternalCourseCollectionCollection","schema":{"tableName":"courses","ddl":"CREATE TABLE IF NOT EXISTS \\"courses\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"summary\\" TEXT,\\n \\"description\\" TEXT,\\n \\"source_key\\" TEXT,\\n \\"source_url\\" TEXT,\\n \\"source_ref\\" TEXT,\\n \\"license\\" TEXT,\\n \\"license_kind\\" TEXT DEFAULT 'own-work',\\n \\"license_note\\" TEXT,\\n \\"attested_by\\" TEXT,\\n \\"subject\\" TEXT,\\n \\"tags\\" TEXT,\\n \\"level_min\\" INTEGER DEFAULT 0,\\n \\"level_max\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"status\\" TEXT DEFAULT 'draft'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"title":{"type":"TEXT","notNull":false},"summary":{"type":"TEXT","notNull":false},"description":{"type":"TEXT","notNull":false},"source_key":{"type":"TEXT","notNull":false},"source_url":{"type":"TEXT","notNull":false},"source_ref":{"type":"TEXT","notNull":false},"license":{"type":"TEXT","notNull":false},"license_kind":{"type":"TEXT","notNull":false,"default":"own-work"},"license_note":{"type":"TEXT","notNull":false},"attested_by":{"type":"TEXT","notNull":false},"subject":{"type":"TEXT","notNull":false},"tags":{"type":"TEXT","notNull":false},"level_min":{"type":"INTEGER","notNull":false,"default":0},"level_max":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"status":{"type":"TEXT","notNull":false,"default":"draft"}},"indexes":[{"name":"courses_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"courses_meta_type_idx","columns":["_meta_type"]},{"name":"courses_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"88cc23ab"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:AuthoredCourseCollection":{"name":"authoredcoursecollection","className":"AuthoredCourseCollection","qualifiedName":"@happyvertical/smrt-education:AuthoredCourseCollection","collection":"courses","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"courses","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"AuthoredCourse","exportName":"AuthoredCourseCollection","collectionExportName":"AuthoredCourseCollectionCollection","schema":{"tableName":"courses","ddl":"CREATE TABLE IF NOT EXISTS \\"courses\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"summary\\" TEXT,\\n \\"description\\" TEXT,\\n \\"source_key\\" TEXT,\\n \\"source_url\\" TEXT,\\n \\"source_ref\\" TEXT,\\n \\"license\\" TEXT,\\n \\"license_kind\\" TEXT DEFAULT 'own-work',\\n \\"license_note\\" TEXT,\\n \\"attested_by\\" TEXT,\\n \\"subject\\" TEXT,\\n \\"tags\\" TEXT,\\n \\"level_min\\" INTEGER DEFAULT 0,\\n \\"level_max\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"status\\" TEXT DEFAULT 'draft'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"title":{"type":"TEXT","notNull":false},"summary":{"type":"TEXT","notNull":false},"description":{"type":"TEXT","notNull":false},"source_key":{"type":"TEXT","notNull":false},"source_url":{"type":"TEXT","notNull":false},"source_ref":{"type":"TEXT","notNull":false},"license":{"type":"TEXT","notNull":false},"license_kind":{"type":"TEXT","notNull":false,"default":"own-work"},"license_note":{"type":"TEXT","notNull":false},"attested_by":{"type":"TEXT","notNull":false},"subject":{"type":"TEXT","notNull":false},"tags":{"type":"TEXT","notNull":false},"level_min":{"type":"INTEGER","notNull":false,"default":0},"level_max":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"status":{"type":"TEXT","notNull":false,"default":"draft"}},"indexes":[{"name":"courses_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"courses_meta_type_idx","columns":["_meta_type"]},{"name":"courses_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"88cc23ab"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CourseSectionCollection":{"name":"coursesectioncollection","className":"CourseSectionCollection","qualifiedName":"@happyvertical/smrt-education:CourseSectionCollection","collection":"coursesections","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"CourseSection","exportName":"CourseSectionCollection","collectionExportName":"CourseSectionCollectionCollection","schema":{"tableName":"course_sections","ddl":"CREATE TABLE IF NOT EXISTS \\"course_sections\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"course_id\\" UUID NOT NULL,\\n \\"title\\" TEXT NOT NULL,\\n \\"sort_order\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false,"unique":false},"course_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"courses","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":true,"unique":false},"sort_order":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"course_sections_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true,"nullsNotDistinct":true},{"name":"course_sections_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"course_sections_course_id_idx","columns":["course_id"]}],"version":"e20480d7"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:LessonCollection":{"name":"lessoncollection","className":"LessonCollection","qualifiedName":"@happyvertical/smrt-education:LessonCollection","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Lesson","exportName":"LessonCollection","collectionExportName":"LessonCollectionCollection","schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"092df043"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:ReadingCollection":{"name":"readingcollection","className":"ReadingCollection","qualifiedName":"@happyvertical/smrt-education:ReadingCollection","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"lessons","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Reading","exportName":"ReadingCollection","collectionExportName":"ReadingCollectionCollection","schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"9d8b6fcd"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:VideoCollection":{"name":"videocollection","className":"VideoCollection","qualifiedName":"@happyvertical/smrt-education:VideoCollection","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"lessons","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Video","exportName":"VideoCollection","collectionExportName":"VideoCollectionCollection","schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"9e0ef984"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorksheetCollection":{"name":"worksheetcollection","className":"WorksheetCollection","qualifiedName":"@happyvertical/smrt-education:WorksheetCollection","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"lessons","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Worksheet","exportName":"WorksheetCollection","collectionExportName":"WorksheetCollectionCollection","schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"10976938"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:ExerciseCollection":{"name":"exercisecollection","className":"ExerciseCollection","qualifiedName":"@happyvertical/smrt-education:ExerciseCollection","collection":"lessons","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"lessons","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Exercise","exportName":"ExerciseCollection","collectionExportName":"ExerciseCollectionCollection","schema":{"tableName":"lessons","ddl":"CREATE TABLE IF NOT EXISTS \\"lessons\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"section_id\\" UUID,\\n \\"title\\" TEXT,\\n \\"body\\" TEXT,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"estimated_minutes\\" INTEGER DEFAULT 0,\\n \\"difficulty\\" REAL DEFAULT 0,\\n \\"modality\\" TEXT DEFAULT 'online',\\n \\"completion_rule\\" TEXT DEFAULT 'attest',\\n \\"external_ref\\" TEXT,\\n \\"external_url\\" TEXT,\\n \\"video_url\\" TEXT,\\n \\"printable_url\\" TEXT,\\n \\"answer_url\\" TEXT,\\n \\"pages\\" INTEGER DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"section_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"course_sections","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":false},"body":{"type":"TEXT","notNull":false},"sort_order":{"type":"INTEGER","notNull":false,"default":0},"estimated_minutes":{"type":"INTEGER","notNull":false,"default":0},"difficulty":{"type":"REAL","notNull":false,"default":0},"modality":{"type":"TEXT","notNull":false,"default":"online"},"completion_rule":{"type":"TEXT","notNull":false,"default":"attest"},"external_ref":{"type":"TEXT","notNull":false},"external_url":{"type":"TEXT","notNull":false},"video_url":{"type":"TEXT","notNull":false},"printable_url":{"type":"TEXT","notNull":false},"answer_url":{"type":"TEXT","notNull":false},"pages":{"type":"INTEGER","notNull":false,"default":0}},"indexes":[{"name":"lessons_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"lessons_meta_type_idx","columns":["_meta_type"]},{"name":"lessons_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lessons_section_id_idx","columns":["section_id"]}],"version":"145eadbe"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:LessonAssetCollection":{"name":"lessonassetcollection","className":"LessonAssetCollection","qualifiedName":"@happyvertical/smrt-education:LessonAssetCollection","collection":"lessonassets","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{"byRight":{"name":"byRight","async":true,"parameters":[{"name":"rightId","type":"string","optional":false},{"name":"opts","type":"JunctionFilterOptions","optional":true}],"returnType":"Promise<TItem[]>","isStatic":false,"isPublic":true},"byLeft":{"name":"byLeft","async":true,"parameters":[{"name":"leftId","type":"string","optional":false},{"name":"opts","type":"JunctionFilterOptions","optional":true}],"returnType":"Promise<TItem[]>","isStatic":false,"isPublic":true},"attach":{"name":"attach","async":true,"parameters":[{"name":"leftId","type":"string","optional":false},{"name":"rightId","type":"string","optional":false},{"name":"opts","type":"JunctionAttachOptions","optional":true}],"returnType":"Promise<TItem>","isStatic":false,"isPublic":true},"detach":{"name":"detach","async":true,"parameters":[{"name":"leftId","type":"string","optional":false},{"name":"rightId","type":"string","optional":false},{"name":"opts","type":"JunctionFilterOptions","optional":true}],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"setLinks":{"name":"setLinks","async":true,"parameters":[{"name":"leftId","type":"string","optional":false},{"name":"rightIds","type":"string[]","optional":false},{"name":"opts","type":"JunctionAttachOptions","optional":true}],"returnType":"Promise<void>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"lesson_assets","api":false,"mcp":false,"cli":false},"extends":"SmrtJunction","extendsTypeArg":"LessonAsset","exportName":"LessonAssetCollection","collectionExportName":"LessonAssetCollectionCollection","schema":{"tableName":"lesson_assets","ddl":"CREATE TABLE IF NOT EXISTS \\"lesson_assets\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"lesson_id\\" UUID NOT NULL,\\n \\"asset_id\\" UUID NOT NULL,\\n \\"relationship\\" TEXT NOT NULL DEFAULT 'attachment',\\n \\"sort_order\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false,"unique":false},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"relationship":{"type":"TEXT","notNull":true,"unique":false,"default":"attachment"},"sort_order":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"lesson_assets_tenant_id_lesson_id_idx","columns":["tenant_id","lesson_id","asset_id","relationship"],"unique":true,"nullsNotDistinct":true},{"name":"lesson_assets_slug_context_idx","columns":["slug","context"]},{"name":"lesson_assets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lesson_assets_lesson_id_idx","columns":["lesson_id"]},{"name":"lesson_assets_asset_id_idx","columns":["asset_id"]}],"version":"d96385c6"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:LearnerCollection":{"name":"learnercollection","className":"LearnerCollection","qualifiedName":"@happyvertical/smrt-education:LearnerCollection","collection":"learners","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Learner","exportName":"LearnerCollection","collectionExportName":"LearnerCollectionCollection","schema":{"tableName":"learners","ddl":"CREATE TABLE IF NOT EXISTS \\"learners\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"user_id\\" UUID NOT NULL,\\n \\"profile_id\\" UUID NOT NULL,\\n \\"display_name\\" TEXT,\\n \\"birth_date\\" TIMESTAMP,\\n \\"level\\" INTEGER NOT NULL DEFAULT 0,\\n \\"settings\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"user_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"display_name":{"type":"TEXT","notNull":false,"unique":false},"birth_date":{"type":"TIMESTAMP","notNull":false,"unique":false},"level":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"settings":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"learners_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"learners_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"learners_user_id_idx","columns":["user_id"]},{"name":"learners_profile_id_idx","columns":["profile_id"]}],"version":"ca9907b5"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CurriculumCollection":{"name":"curriculumcollection","className":"CurriculumCollection","qualifiedName":"@happyvertical/smrt-education:CurriculumCollection","collection":"curriculums","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"curricula","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Curriculum","exportName":"CurriculumCollection","collectionExportName":"CurriculumCollectionCollection","schema":{"tableName":"curricula","ddl":"CREATE TABLE IF NOT EXISTS \\"curricula\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"title\\" TEXT NOT NULL,\\n \\"starts_on\\" TIMESTAMP,\\n \\"ends_on\\" TIMESTAMP,\\n \\"status\\" TEXT DEFAULT 'planned'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":true,"unique":false},"starts_on":{"type":"TIMESTAMP","notNull":false,"unique":false},"ends_on":{"type":"TIMESTAMP","notNull":false,"unique":false},"status":{"type":"TEXT","notNull":false,"unique":false,"default":"planned"}},"indexes":[{"name":"curricula_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"curricula_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"curricula_learner_id_idx","columns":["learner_id"]}],"version":"b7e90cbd"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:EnrollmentCollection":{"name":"enrollmentcollection","className":"EnrollmentCollection","qualifiedName":"@happyvertical/smrt-education:EnrollmentCollection","collection":"enrollments","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Enrollment","exportName":"EnrollmentCollection","collectionExportName":"EnrollmentCollectionCollection","schema":{"tableName":"enrollments","ddl":"CREATE TABLE IF NOT EXISTS \\"enrollments\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"curriculum_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"course_id\\" UUID NOT NULL,\\n \\"status\\" TEXT DEFAULT 'planned',\\n \\"started_at\\" TIMESTAMP,\\n \\"completed_at\\" TIMESTAMP,\\n \\"target_minutes_per_week\\" INTEGER NOT NULL DEFAULT 0,\\n \\"sort_order\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"curriculum_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"curricula","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"course_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"courses","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"status":{"type":"TEXT","notNull":false,"unique":false,"default":"planned"},"started_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"completed_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"target_minutes_per_week":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"sort_order":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"enrollments_tenant_id_curriculum_id_idx","columns":["tenant_id","curriculum_id","course_id"],"unique":true},{"name":"enrollments_slug_context_idx","columns":["slug","context"]},{"name":"enrollments_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"enrollments_curriculum_id_idx","columns":["curriculum_id"]},{"name":"enrollments_learner_id_idx","columns":["learner_id"]},{"name":"enrollments_course_id_idx","columns":["course_id"]}],"version":"2a34b5ee"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:LessonProgressCollection":{"name":"lessonprogresscollection","className":"LessonProgressCollection","qualifiedName":"@happyvertical/smrt-education:LessonProgressCollection","collection":"lessonprogresses","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"lesson_progress","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"LessonProgress","exportName":"LessonProgressCollection","collectionExportName":"LessonProgressCollectionCollection","schema":{"tableName":"lesson_progress","ddl":"CREATE TABLE IF NOT EXISTS \\"lesson_progress\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"enrollment_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"lesson_id\\" UUID NOT NULL,\\n \\"status\\" TEXT DEFAULT 'not_started',\\n \\"started_at\\" TIMESTAMP,\\n \\"completed_at\\" TIMESTAMP,\\n \\"time_spent_seconds\\" INTEGER NOT NULL DEFAULT 0,\\n \\"attempts\\" INTEGER NOT NULL DEFAULT 0,\\n \\"best_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"enrollment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"enrollments","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"status":{"type":"TEXT","notNull":false,"unique":false,"default":"not_started"},"started_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"completed_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"time_spent_seconds":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"attempts":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"best_score":{"type":"REAL","notNull":false,"unique":false}},"indexes":[{"name":"lesson_progress_tenant_id_enrollment_id_idx","columns":["tenant_id","enrollment_id","lesson_id"],"unique":true},{"name":"lesson_progress_slug_context_idx","columns":["slug","context"]},{"name":"lesson_progress_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lesson_progress_enrollment_id_idx","columns":["enrollment_id"]},{"name":"lesson_progress_learner_id_idx","columns":["learner_id"]},{"name":"lesson_progress_lesson_id_idx","columns":["lesson_id"]}],"version":"36704fbd"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:SubmissionCollection":{"name":"submissioncollection","className":"SubmissionCollection","qualifiedName":"@happyvertical/smrt-education:SubmissionCollection","collection":"submissions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Submission","exportName":"SubmissionCollection","collectionExportName":"SubmissionCollectionCollection","schema":{"tableName":"submissions","ddl":"CREATE TABLE IF NOT EXISTS \\"submissions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"learner_id\\" UUID,\\n \\"lesson_id\\" UUID,\\n \\"progress_id\\" UUID,\\n \\"submitted_at\\" TEXT,\\n \\"status\\" TEXT DEFAULT 'captured',\\n \\"notes\\" TEXT,\\n \\"capture_key\\" TEXT,\\n \\"capture_digest\\" TEXT,\\n \\"kind\\" TEXT DEFAULT 'completed_work',\\n \\"previous_submission_id\\" UUID,\\n \\"intake_item_id\\" TEXT,\\n \\"page_count\\" INTEGER DEFAULT 0,\\n \\"ocr_text\\" TEXT,\\n \\"extracted\\" TEXT,\\n \\"reported_by\\" TEXT DEFAULT 'learner',\\n \\"evidence_url\\" TEXT,\\n \\"reported_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"progress_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lesson_progress","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submitted_at":{"type":"TEXT","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"captured"},"notes":{"type":"TEXT","notNull":false},"capture_key":{"type":"TEXT","notNull":false},"capture_digest":{"type":"TEXT","notNull":false},"kind":{"type":"TEXT","notNull":false,"default":"completed_work"},"previous_submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_item_id":{"type":"TEXT","notNull":false},"page_count":{"type":"INTEGER","notNull":false,"default":0},"ocr_text":{"type":"TEXT","notNull":false},"extracted":{"type":"TEXT","notNull":false},"reported_by":{"type":"TEXT","notNull":false,"default":"learner"},"evidence_url":{"type":"TEXT","notNull":false},"reported_score":{"type":"REAL","notNull":false}},"indexes":[{"name":"submissions_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"submissions_meta_type_idx","columns":["_meta_type"]},{"name":"submissions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submissions_learner_id_idx","columns":["learner_id"]},{"name":"submissions_lesson_id_idx","columns":["lesson_id"]},{"name":"submissions_progress_id_idx","columns":["progress_id"]},{"name":"submissions_previous_submission_id_idx","columns":["previous_submission_id"]}],"version":"27a21ab4"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:SubmissionIntakeBindingCollection":{"name":"submissionintakebindingcollection","className":"SubmissionIntakeBindingCollection","qualifiedName":"@happyvertical/smrt-education:SubmissionIntakeBindingCollection","collection":"submissionintakebindings","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"submission_intake_bindings","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"SubmissionIntakeBinding","exportName":"SubmissionIntakeBindingCollection","collectionExportName":"SubmissionIntakeBindingCollectionCollection","schema":{"tableName":"submission_intake_bindings","ddl":"CREATE TABLE IF NOT EXISTS \\"submission_intake_bindings\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"intake_item_id\\" TEXT NOT NULL,\\n \\"submission_id\\" UUID NOT NULL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"intake_item_id":{"type":"TEXT","notNull":true,"unique":false},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}}},"indexes":[{"name":"submission_intake_bindings_tenant_id_intake_item_id_idx","columns":["tenant_id","intake_item_id"],"unique":true},{"name":"submission_intake_bindings_slug_context_idx","columns":["slug","context"]},{"name":"submission_intake_bindings_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submission_intake_bindings_submission_id_idx","columns":["submission_id"]}],"version":"7102c909"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:ScannedSubmissionCollection":{"name":"scannedsubmissioncollection","className":"ScannedSubmissionCollection","qualifiedName":"@happyvertical/smrt-education:ScannedSubmissionCollection","collection":"submissions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"submissions","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"ScannedSubmission","exportName":"ScannedSubmissionCollection","collectionExportName":"ScannedSubmissionCollectionCollection","schema":{"tableName":"submissions","ddl":"CREATE TABLE IF NOT EXISTS \\"submissions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"learner_id\\" UUID,\\n \\"lesson_id\\" UUID,\\n \\"progress_id\\" UUID,\\n \\"submitted_at\\" TEXT,\\n \\"status\\" TEXT DEFAULT 'captured',\\n \\"notes\\" TEXT,\\n \\"capture_key\\" TEXT,\\n \\"capture_digest\\" TEXT,\\n \\"kind\\" TEXT DEFAULT 'completed_work',\\n \\"previous_submission_id\\" UUID,\\n \\"intake_item_id\\" TEXT,\\n \\"page_count\\" INTEGER DEFAULT 0,\\n \\"ocr_text\\" TEXT,\\n \\"extracted\\" TEXT,\\n \\"reported_by\\" TEXT DEFAULT 'learner',\\n \\"evidence_url\\" TEXT,\\n \\"reported_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"progress_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lesson_progress","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submitted_at":{"type":"TEXT","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"captured"},"notes":{"type":"TEXT","notNull":false},"capture_key":{"type":"TEXT","notNull":false},"capture_digest":{"type":"TEXT","notNull":false},"kind":{"type":"TEXT","notNull":false,"default":"completed_work"},"previous_submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_item_id":{"type":"TEXT","notNull":false},"page_count":{"type":"INTEGER","notNull":false,"default":0},"ocr_text":{"type":"TEXT","notNull":false},"extracted":{"type":"TEXT","notNull":false},"reported_by":{"type":"TEXT","notNull":false,"default":"learner"},"evidence_url":{"type":"TEXT","notNull":false},"reported_score":{"type":"REAL","notNull":false}},"indexes":[{"name":"submissions_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"submissions_meta_type_idx","columns":["_meta_type"]},{"name":"submissions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submissions_learner_id_idx","columns":["learner_id"]},{"name":"submissions_lesson_id_idx","columns":["lesson_id"]},{"name":"submissions_progress_id_idx","columns":["progress_id"]},{"name":"submissions_previous_submission_id_idx","columns":["previous_submission_id"]}],"version":"7c394510"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:ExternalCompletionCollection":{"name":"externalcompletioncollection","className":"ExternalCompletionCollection","qualifiedName":"@happyvertical/smrt-education:ExternalCompletionCollection","collection":"submissions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"submissions","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"ExternalCompletion","exportName":"ExternalCompletionCollection","collectionExportName":"ExternalCompletionCollectionCollection","schema":{"tableName":"submissions","ddl":"CREATE TABLE IF NOT EXISTS \\"submissions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"learner_id\\" UUID,\\n \\"lesson_id\\" UUID,\\n \\"progress_id\\" UUID,\\n \\"submitted_at\\" TEXT,\\n \\"status\\" TEXT DEFAULT 'captured',\\n \\"notes\\" TEXT,\\n \\"capture_key\\" TEXT,\\n \\"capture_digest\\" TEXT,\\n \\"kind\\" TEXT DEFAULT 'completed_work',\\n \\"previous_submission_id\\" UUID,\\n \\"intake_item_id\\" TEXT,\\n \\"page_count\\" INTEGER DEFAULT 0,\\n \\"ocr_text\\" TEXT,\\n \\"extracted\\" TEXT,\\n \\"reported_by\\" TEXT DEFAULT 'learner',\\n \\"evidence_url\\" TEXT,\\n \\"reported_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"progress_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lesson_progress","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submitted_at":{"type":"TEXT","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"captured"},"notes":{"type":"TEXT","notNull":false},"capture_key":{"type":"TEXT","notNull":false},"capture_digest":{"type":"TEXT","notNull":false},"kind":{"type":"TEXT","notNull":false,"default":"completed_work"},"previous_submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_item_id":{"type":"TEXT","notNull":false},"page_count":{"type":"INTEGER","notNull":false,"default":0},"ocr_text":{"type":"TEXT","notNull":false},"extracted":{"type":"TEXT","notNull":false},"reported_by":{"type":"TEXT","notNull":false,"default":"learner"},"evidence_url":{"type":"TEXT","notNull":false},"reported_score":{"type":"REAL","notNull":false}},"indexes":[{"name":"submissions_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"submissions_meta_type_idx","columns":["_meta_type"]},{"name":"submissions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submissions_learner_id_idx","columns":["learner_id"]},{"name":"submissions_lesson_id_idx","columns":["lesson_id"]},{"name":"submissions_progress_id_idx","columns":["progress_id"]},{"name":"submissions_previous_submission_id_idx","columns":["previous_submission_id"]}],"version":"eff3715d"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:AttestationCollection":{"name":"attestationcollection","className":"AttestationCollection","qualifiedName":"@happyvertical/smrt-education:AttestationCollection","collection":"submissions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"submissions","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Attestation","exportName":"AttestationCollection","collectionExportName":"AttestationCollectionCollection","schema":{"tableName":"submissions","ddl":"CREATE TABLE IF NOT EXISTS \\"submissions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"learner_id\\" UUID,\\n \\"lesson_id\\" UUID,\\n \\"progress_id\\" UUID,\\n \\"submitted_at\\" TEXT,\\n \\"status\\" TEXT DEFAULT 'captured',\\n \\"notes\\" TEXT,\\n \\"capture_key\\" TEXT,\\n \\"capture_digest\\" TEXT,\\n \\"kind\\" TEXT DEFAULT 'completed_work',\\n \\"previous_submission_id\\" UUID,\\n \\"intake_item_id\\" TEXT,\\n \\"page_count\\" INTEGER DEFAULT 0,\\n \\"ocr_text\\" TEXT,\\n \\"extracted\\" TEXT,\\n \\"reported_by\\" TEXT DEFAULT 'learner',\\n \\"evidence_url\\" TEXT,\\n \\"reported_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"progress_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lesson_progress","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submitted_at":{"type":"TEXT","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"captured"},"notes":{"type":"TEXT","notNull":false},"capture_key":{"type":"TEXT","notNull":false},"capture_digest":{"type":"TEXT","notNull":false},"kind":{"type":"TEXT","notNull":false,"default":"completed_work"},"previous_submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_item_id":{"type":"TEXT","notNull":false},"page_count":{"type":"INTEGER","notNull":false,"default":0},"ocr_text":{"type":"TEXT","notNull":false},"extracted":{"type":"TEXT","notNull":false},"reported_by":{"type":"TEXT","notNull":false,"default":"learner"},"evidence_url":{"type":"TEXT","notNull":false},"reported_score":{"type":"REAL","notNull":false}},"indexes":[{"name":"submissions_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"submissions_meta_type_idx","columns":["_meta_type"]},{"name":"submissions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submissions_learner_id_idx","columns":["learner_id"]},{"name":"submissions_lesson_id_idx","columns":["lesson_id"]},{"name":"submissions_progress_id_idx","columns":["progress_id"]},{"name":"submissions_previous_submission_id_idx","columns":["previous_submission_id"]}],"version":"4f3230a3"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:GradeCollection":{"name":"gradecollection","className":"GradeCollection","qualifiedName":"@happyvertical/smrt-education:GradeCollection","collection":"grades","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Grade","exportName":"GradeCollection","collectionExportName":"GradeCollectionCollection","schema":{"tableName":"grades","ddl":"CREATE TABLE IF NOT EXISTS \\"grades\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"submission_id\\" UUID NOT NULL,\\n \\"grader_kind\\" TEXT NOT NULL DEFAULT 'auto',\\n \\"grader_profile_id\\" UUID,\\n \\"score\\" REAL,\\n \\"points_earned\\" INTEGER,\\n \\"points_possible\\" INTEGER,\\n \\"rubric_results\\" TEXT,\\n \\"feedback\\" TEXT,\\n \\"graded_at\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"grader_kind":{"type":"TEXT","notNull":true,"unique":false,"default":"auto"},"grader_profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"score":{"type":"REAL","notNull":false,"unique":false},"points_earned":{"type":"INTEGER","notNull":false,"unique":false},"points_possible":{"type":"INTEGER","notNull":false,"unique":false},"rubric_results":{"type":"TEXT","notNull":false,"unique":false},"feedback":{"type":"TEXT","notNull":false,"unique":false},"graded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"grades_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"grades_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"grades_submission_id_idx","columns":["submission_id"]},{"name":"grades_grader_profile_id_idx","columns":["grader_profile_id"]}],"version":"7d629fec"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:SubmissionAssetCollection":{"name":"submissionassetcollection","className":"SubmissionAssetCollection","qualifiedName":"@happyvertical/smrt-education:SubmissionAssetCollection","collection":"submissionassets","filePath":"/home/runner/work/smrt/smrt/packages/education/src/collections.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{"byRight":{"name":"byRight","async":true,"parameters":[{"name":"rightId","type":"string","optional":false},{"name":"opts","type":"JunctionFilterOptions","optional":true}],"returnType":"Promise<TItem[]>","isStatic":false,"isPublic":true},"byLeft":{"name":"byLeft","async":true,"parameters":[{"name":"leftId","type":"string","optional":false},{"name":"opts","type":"JunctionFilterOptions","optional":true}],"returnType":"Promise<TItem[]>","isStatic":false,"isPublic":true},"attach":{"name":"attach","async":true,"parameters":[{"name":"leftId","type":"string","optional":false},{"name":"rightId","type":"string","optional":false},{"name":"opts","type":"JunctionAttachOptions","optional":true}],"returnType":"Promise<TItem>","isStatic":false,"isPublic":true},"detach":{"name":"detach","async":true,"parameters":[{"name":"leftId","type":"string","optional":false},{"name":"rightId","type":"string","optional":false},{"name":"opts","type":"JunctionFilterOptions","optional":true}],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"setLinks":{"name":"setLinks","async":true,"parameters":[{"name":"leftId","type":"string","optional":false},{"name":"rightIds","type":"string[]","optional":false},{"name":"opts","type":"JunctionAttachOptions","optional":true}],"returnType":"Promise<void>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"submission_assets","api":false,"mcp":false,"cli":false},"extends":"SmrtJunction","extendsTypeArg":"SubmissionAsset","exportName":"SubmissionAssetCollection","collectionExportName":"SubmissionAssetCollectionCollection","schema":{"tableName":"submission_assets","ddl":"CREATE TABLE IF NOT EXISTS \\"submission_assets\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"submission_id\\" UUID NOT NULL,\\n \\"asset_id\\" UUID NOT NULL,\\n \\"relationship\\" TEXT NOT NULL DEFAULT 'page',\\n \\"sort_order\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"relationship":{"type":"TEXT","notNull":true,"unique":false,"default":"page"},"sort_order":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"submission_assets_tenant_id_submission_id_idx","columns":["tenant_id","submission_id","asset_id","relationship"],"unique":true},{"name":"submission_assets_slug_context_idx","columns":["slug","context"]},{"name":"submission_assets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submission_assets_submission_id_idx","columns":["submission_id"]},{"name":"submission_assets_asset_id_idx","columns":["asset_id"]}],"version":"d9b61c8a"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CourseSource":{"name":"coursesource","className":"CourseSource","qualifiedName":"@happyvertical/smrt-education:CourseSource","collection":"coursesources","description":"Host-managed source policy; deliberately has no generated CRUD surface.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/course-source.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"key":{"type":"text","required":true,"_meta":{"required":true}},"name":{"type":"text","required":true,"_meta":{"required":true}},"kind":{"type":"text","required":false,"default":"adapter","enum":["manual","url","adapter"]},"adapterKey":{"type":"text","required":false},"config":{"type":"text","required":false},"sharing":{"type":"text","required":false,"default":"private","enum":["private","group","global"]}},"methods":{"getConfig":{"name":"getConfig","async":false,"parameters":[],"returnType":"CourseSourceConfig","isStatic":false,"isPublic":true},"setConfig":{"name":"setConfig","async":false,"parameters":[{"name":"value","type":"CourseSourceConfig","optional":false}],"returnType":"void","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"cli":false,"mcp":false,"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"CourseSource","collectionExportName":"CourseSourceCollection","displayLabelField":"name","validationRules":[{"field":"key","rule":"required","fieldType":"text"},{"field":"name","rule":"required","fieldType":"text"}],"schema":{"tableName":"course_sources","ddl":"CREATE TABLE IF NOT EXISTS \\"course_sources\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"key\\" TEXT NOT NULL,\\n \\"name\\" TEXT NOT NULL,\\n \\"kind\\" TEXT DEFAULT 'adapter',\\n \\"adapter_key\\" TEXT,\\n \\"config\\" TEXT,\\n \\"sharing\\" TEXT DEFAULT 'private'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"key":{"type":"TEXT","notNull":true,"unique":false},"name":{"type":"TEXT","notNull":true,"unique":false},"kind":{"type":"TEXT","notNull":false,"unique":false,"default":"adapter"},"adapter_key":{"type":"TEXT","notNull":false,"unique":false},"config":{"type":"TEXT","notNull":false,"unique":false},"sharing":{"type":"TEXT","notNull":false,"unique":false,"default":"private"}},"indexes":[{"name":"course_sources_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"course_sources_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"98177eb3"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:CourseSourceCollection":{"name":"coursesourcecollection","className":"CourseSourceCollection","qualifiedName":"@happyvertical/smrt-education:CourseSourceCollection","collection":"coursesources","filePath":"/home/runner/work/smrt/smrt/packages/education/src/course-source.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"CourseSource","exportName":"CourseSourceCollection","collectionExportName":"CourseSourceCollectionCollection","schema":{"tableName":"course_sources","ddl":"CREATE TABLE IF NOT EXISTS \\"course_sources\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"key\\" TEXT NOT NULL,\\n \\"name\\" TEXT NOT NULL,\\n \\"kind\\" TEXT DEFAULT 'adapter',\\n \\"adapter_key\\" TEXT,\\n \\"config\\" TEXT,\\n \\"sharing\\" TEXT DEFAULT 'private'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"key":{"type":"TEXT","notNull":true,"unique":false},"name":{"type":"TEXT","notNull":true,"unique":false},"kind":{"type":"TEXT","notNull":false,"unique":false,"default":"adapter"},"adapter_key":{"type":"TEXT","notNull":false,"unique":false},"config":{"type":"TEXT","notNull":false,"unique":false},"sharing":{"type":"TEXT","notNull":false,"unique":false,"default":"private"}},"indexes":[{"name":"course_sources_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"course_sources_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"98177eb3"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:EnrollmentParentNote":{"name":"enrollmentparentnote","className":"EnrollmentParentNote","qualifiedName":"@happyvertical/smrt-education:EnrollmentParentNote","collection":"enrollmentparentnotes","description":"Private guardian annotations, separate from learning and assessment history.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/enrollment-notes.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}},"authorUserId":{"type":"crossPackageRef","required":true,"related":"@happyvertical/smrt-users:User"},"authorLabel":{"type":"text","required":false},"text":{"type":"text","required":false},"requestKey":{"type":"text","required":false},"recordedAt":{"type":"text","required":false}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"tableName":"enrollment_parent_notes","conflictColumns":["tenant_id","enrollment_id","request_key"],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"EnrollmentParentNote","collectionExportName":"EnrollmentParentNoteCollection","validationRules":[{"field":"enrollmentId","rule":"required","fieldType":"foreignKey"},{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"authorUserId","rule":"required","fieldType":"crossPackageRef"}],"schema":{"tableName":"enrollment_parent_notes","ddl":"CREATE TABLE IF NOT EXISTS \\"enrollment_parent_notes\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"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 \\"author_user_id\\" UUID NOT NULL,\\n \\"author_label\\" TEXT,\\n \\"text\\" 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},"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"}},"author_user_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"author_label":{"type":"TEXT","notNull":false,"unique":false},"text":{"type":"TEXT","notNull":false,"unique":false},"request_key":{"type":"TEXT","notNull":false,"unique":false},"recorded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"enrollment_parent_notes_tenant_id_enrollment_id_idx","columns":["tenant_id","enrollment_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"enrollment_parent_notes_slug_context_idx","columns":["slug","context"]},{"name":"enrollment_parent_notes_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"enrollment_parent_notes_enrollment_id_idx","columns":["enrollment_id"]},{"name":"enrollment_parent_notes_learner_id_idx","columns":["learner_id"]},{"name":"enrollment_parent_notes_author_user_id_idx","columns":["author_user_id"]}],"version":"f8d2db23"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:EnrollmentParentNoteCollection":{"name":"enrollmentparentnotecollection","className":"EnrollmentParentNoteCollection","qualifiedName":"@happyvertical/smrt-education:EnrollmentParentNoteCollection","collection":"enrollmentparentnotes","filePath":"/home/runner/work/smrt/smrt/packages/education/src/enrollment-notes.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"enrollment_parent_notes","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"EnrollmentParentNote","exportName":"EnrollmentParentNoteCollection","collectionExportName":"EnrollmentParentNoteCollectionCollection","schema":{"tableName":"enrollment_parent_notes","ddl":"CREATE TABLE IF NOT EXISTS \\"enrollment_parent_notes\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"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 \\"author_user_id\\" UUID NOT NULL,\\n \\"author_label\\" TEXT,\\n \\"text\\" 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},"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"}},"author_user_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"author_label":{"type":"TEXT","notNull":false,"unique":false},"text":{"type":"TEXT","notNull":false,"unique":false},"request_key":{"type":"TEXT","notNull":false,"unique":false},"recorded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"enrollment_parent_notes_tenant_id_enrollment_id_idx","columns":["tenant_id","enrollment_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"enrollment_parent_notes_slug_context_idx","columns":["slug","context"]},{"name":"enrollment_parent_notes_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"enrollment_parent_notes_enrollment_id_idx","columns":["enrollment_id"]},{"name":"enrollment_parent_notes_learner_id_idx","columns":["learner_id"]},{"name":"enrollment_parent_notes_author_user_id_idx","columns":["author_user_id"]}],"version":"f8d2db23"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:FamilyIntake":{"name":"familyintake","className":"FamilyIntake","qualifiedName":"@happyvertical/smrt-education:FamilyIntake","collection":"familyintakes","description":"Family-owned receipt, independent of learner attribution and ingestion expiry.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/family-intake-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"itemId":{"type":"text","required":false},"actorUserId":{"type":"text","required":false},"ownerProfileId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-profiles:Profile"},"contentDigest":{"type":"text","required":false},"sourceJson":{"type":"text","required":false,"_meta":{}}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true},"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"family_intakes","conflictColumns":["tenant_id","item_id"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"FamilyIntake","collectionExportName":"FamilyIntakeCollection","validationRules":[],"schema":{"tableName":"family_intakes","ddl":"CREATE TABLE IF NOT EXISTS \\"family_intakes\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"item_id\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"owner_profile_id\\" UUID,\\n \\"content_digest\\" TEXT,\\n \\"source_json\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"item_id":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"owner_profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"content_digest":{"type":"TEXT","notNull":false,"unique":false},"source_json":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"family_intakes_tenant_id_item_id_idx","columns":["tenant_id","item_id"],"unique":true,"nullsNotDistinct":true},{"name":"family_intakes_slug_context_idx","columns":["slug","context"]},{"name":"family_intakes_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"family_intakes_owner_profile_id_idx","columns":["owner_profile_id"]}],"version":"2577578b"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:FamilyIntakeCollection":{"name":"familyintakecollection","className":"FamilyIntakeCollection","qualifiedName":"@happyvertical/smrt-education:FamilyIntakeCollection","collection":"familyintakes","filePath":"/home/runner/work/smrt/smrt/packages/education/src/family-intake-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"family_intakes","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"FamilyIntake","exportName":"FamilyIntakeCollection","collectionExportName":"FamilyIntakeCollectionCollection","schema":{"tableName":"family_intakes","ddl":"CREATE TABLE IF NOT EXISTS \\"family_intakes\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"item_id\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"owner_profile_id\\" UUID,\\n \\"content_digest\\" TEXT,\\n \\"source_json\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"item_id":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"owner_profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"content_digest":{"type":"TEXT","notNull":false,"unique":false},"source_json":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"family_intakes_tenant_id_item_id_idx","columns":["tenant_id","item_id"],"unique":true,"nullsNotDistinct":true},{"name":"family_intakes_slug_context_idx","columns":["slug","context"]},{"name":"family_intakes_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"family_intakes_owner_profile_id_idx","columns":["owner_profile_id"]}],"version":"2577578b"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:FamilyIntakeAsset":{"name":"familyintakeasset","className":"FamilyIntakeAsset","qualifiedName":"@happyvertical/smrt-education:FamilyIntakeAsset","collection":"familyintakeassets","description":"Sole family owner join; adoption borrows this exact immutable original.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/family-intake-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"intakeId":{"type":"foreignKey","required":true,"related":"FamilyIntake","_meta":{"required":true}},"assetId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-assets:Asset"},"name":{"type":"text","required":false},"mimeType":{"type":"text","required":false},"sha256":{"type":"text","required":false},"position":{"type":"integer","required":true,"default":0}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true},"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"family_intake_assets","conflictColumns":["tenant_id","intake_id","asset_id"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"FamilyIntakeAsset","collectionExportName":"FamilyIntakeAssetCollection","displayLabelField":"name","validationRules":[{"field":"intakeId","rule":"required","fieldType":"foreignKey"},{"field":"position","rule":"required","fieldType":"integer"}],"schema":{"tableName":"family_intake_assets","ddl":"CREATE TABLE IF NOT EXISTS \\"family_intake_assets\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"intake_id\\" UUID NOT NULL,\\n \\"asset_id\\" UUID,\\n \\"name\\" TEXT,\\n \\"mime_type\\" TEXT,\\n \\"sha256\\" TEXT,\\n \\"position\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"family_intakes","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"name":{"type":"TEXT","notNull":false,"unique":false},"mime_type":{"type":"TEXT","notNull":false,"unique":false},"sha256":{"type":"TEXT","notNull":false,"unique":false},"position":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"family_intake_assets_tenant_id_intake_id_idx","columns":["tenant_id","intake_id","asset_id"],"unique":true,"nullsNotDistinct":true},{"name":"family_intake_assets_slug_context_idx","columns":["slug","context"]},{"name":"family_intake_assets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"family_intake_assets_intake_id_idx","columns":["intake_id"]},{"name":"family_intake_assets_asset_id_idx","columns":["asset_id"]}],"version":"3811d126"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:FamilyIntakeAssetCollection":{"name":"familyintakeassetcollection","className":"FamilyIntakeAssetCollection","qualifiedName":"@happyvertical/smrt-education:FamilyIntakeAssetCollection","collection":"familyintakeassets","filePath":"/home/runner/work/smrt/smrt/packages/education/src/family-intake-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"family_intake_assets","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"FamilyIntakeAsset","exportName":"FamilyIntakeAssetCollection","collectionExportName":"FamilyIntakeAssetCollectionCollection","schema":{"tableName":"family_intake_assets","ddl":"CREATE TABLE IF NOT EXISTS \\"family_intake_assets\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"intake_id\\" UUID NOT NULL,\\n \\"asset_id\\" UUID,\\n \\"name\\" TEXT,\\n \\"mime_type\\" TEXT,\\n \\"sha256\\" TEXT,\\n \\"position\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"family_intakes","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"name":{"type":"TEXT","notNull":false,"unique":false},"mime_type":{"type":"TEXT","notNull":false,"unique":false},"sha256":{"type":"TEXT","notNull":false,"unique":false},"position":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"family_intake_assets_tenant_id_intake_id_idx","columns":["tenant_id","intake_id","asset_id"],"unique":true,"nullsNotDistinct":true},{"name":"family_intake_assets_slug_context_idx","columns":["slug","context"]},{"name":"family_intake_assets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"family_intake_assets_intake_id_idx","columns":["intake_id"]},{"name":"family_intake_assets_asset_id_idx","columns":["asset_id"]}],"version":"3811d126"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:FamilyIntakeDecision":{"name":"familyintakedecision","className":"FamilyIntakeDecision","qualifiedName":"@happyvertical/smrt-education:FamilyIntakeDecision","collection":"familyintakedecisions","description":"Append-only attribution/adoption audit; no marks or learning outcomes.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/family-intake-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"intakeId":{"type":"foreignKey","required":true,"related":"FamilyIntake","_meta":{"required":true}},"requestKey":{"type":"text","required":false},"sequence":{"type":"integer","required":true,"default":0},"actorUserId":{"type":"text","required":false},"bodyJson":{"type":"text","required":false,"_meta":{}}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true},"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"family_intake_decisions","conflictColumns":["tenant_id","intake_id","request_key"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"FamilyIntakeDecision","collectionExportName":"FamilyIntakeDecisionCollection","validationRules":[{"field":"intakeId","rule":"required","fieldType":"foreignKey"},{"field":"sequence","rule":"required","fieldType":"integer"}],"schema":{"tableName":"family_intake_decisions","ddl":"CREATE TABLE IF NOT EXISTS \\"family_intake_decisions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"intake_id\\" UUID NOT NULL,\\n \\"request_key\\" TEXT,\\n \\"sequence\\" INTEGER NOT NULL DEFAULT 0,\\n \\"actor_user_id\\" TEXT,\\n \\"body_json\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"family_intakes","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":false,"unique":false},"sequence":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"body_json":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"family_intake_decisions_tenant_id_intake_id_idx","columns":["tenant_id","intake_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"family_intake_decisions_slug_context_idx","columns":["slug","context"]},{"name":"family_intake_decisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"family_intake_decisions_intake_id_idx","columns":["intake_id"]}],"version":"08875c81"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:FamilyIntakeDecisionCollection":{"name":"familyintakedecisioncollection","className":"FamilyIntakeDecisionCollection","qualifiedName":"@happyvertical/smrt-education:FamilyIntakeDecisionCollection","collection":"familyintakedecisions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/family-intake-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"family_intake_decisions","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"FamilyIntakeDecision","exportName":"FamilyIntakeDecisionCollection","collectionExportName":"FamilyIntakeDecisionCollectionCollection","schema":{"tableName":"family_intake_decisions","ddl":"CREATE TABLE IF NOT EXISTS \\"family_intake_decisions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"intake_id\\" UUID NOT NULL,\\n \\"request_key\\" TEXT,\\n \\"sequence\\" INTEGER NOT NULL DEFAULT 0,\\n \\"actor_user_id\\" TEXT,\\n \\"body_json\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"family_intakes","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":false,"unique":false},"sequence":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"body_json":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"family_intake_decisions_tenant_id_intake_id_idx","columns":["tenant_id","intake_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"family_intake_decisions_slug_context_idx","columns":["slug","context"]},{"name":"family_intake_decisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"family_intake_decisions_intake_id_idx","columns":["intake_id"]}],"version":"08875c81"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Learner":{"name":"learner","className":"Learner","qualifiedName":"@happyvertical/smrt-education:Learner","collection":"learners","description":"A learner is a real user/profile identity with active family membership.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/learners.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"userId":{"type":"crossPackageRef","required":true,"related":"@happyvertical/smrt-users:User"},"profileId":{"type":"crossPackageRef","required":true,"related":"@happyvertical/smrt-profiles:Profile"},"displayName":{"type":"text","required":false},"birthDate":{"type":"datetime","required":false},"level":{"type":"integer","required":true,"default":0},"settings":{"type":"text","required":false}},"methods":{"getSettings":{"name":"getSettings","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true},"setSettings":{"name":"setSettings","async":false,"parameters":[{"name":"value","type":"Record<string, unknown>","optional":false}],"returnType":"void","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"Learner","collectionExportName":"LearnerCollection","validationRules":[{"field":"userId","rule":"required","fieldType":"crossPackageRef"},{"field":"profileId","rule":"required","fieldType":"crossPackageRef"},{"field":"level","rule":"required","fieldType":"integer"}],"schema":{"tableName":"learners","ddl":"CREATE TABLE IF NOT EXISTS \\"learners\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"user_id\\" UUID NOT NULL,\\n \\"profile_id\\" UUID NOT NULL,\\n \\"display_name\\" TEXT,\\n \\"birth_date\\" TIMESTAMP,\\n \\"level\\" INTEGER NOT NULL DEFAULT 0,\\n \\"settings\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"user_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"display_name":{"type":"TEXT","notNull":false,"unique":false},"birth_date":{"type":"TIMESTAMP","notNull":false,"unique":false},"level":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"settings":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"learners_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"learners_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"learners_user_id_idx","columns":["user_id"]},{"name":"learners_profile_id_idx","columns":["profile_id"]}],"version":"ca9907b5"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Curriculum":{"name":"curriculum","className":"Curriculum","qualifiedName":"@happyvertical/smrt-education:Curriculum","collection":"curriculums","description":"A distinct plan retains its own enrollment history.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/learners.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"title":{"type":"text","required":true,"_meta":{"required":true}},"startsOn":{"type":"datetime","required":false},"endsOn":{"type":"datetime","required":false},"status":{"type":"text","required":false,"default":"planned","enum":["planned","active","completed","archived"]}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"tableName":"curricula","tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"Curriculum","collectionExportName":"CurriculumCollection","displayLabelField":"title","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"title","rule":"required","fieldType":"text"}],"schema":{"tableName":"curricula","ddl":"CREATE TABLE IF NOT EXISTS \\"curricula\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"title\\" TEXT NOT NULL,\\n \\"starts_on\\" TIMESTAMP,\\n \\"ends_on\\" TIMESTAMP,\\n \\"status\\" TEXT DEFAULT 'planned'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"title":{"type":"TEXT","notNull":true,"unique":false},"starts_on":{"type":"TIMESTAMP","notNull":false,"unique":false},"ends_on":{"type":"TIMESTAMP","notNull":false,"unique":false},"status":{"type":"TEXT","notNull":false,"unique":false,"default":"planned"}},"indexes":[{"name":"curricula_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"curricula_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"curricula_learner_id_idx","columns":["learner_id"]}],"version":"b7e90cbd"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Enrollment":{"name":"enrollment","className":"Enrollment","qualifiedName":"@happyvertical/smrt-education:Enrollment","collection":"enrollments","description":"One course in one curriculum; a new curriculum means a new enrollment.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/learners.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"curriculumId":{"type":"foreignKey","required":true,"related":"Curriculum","_meta":{"required":true}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"courseId":{"type":"foreignKey","required":true,"related":"Course","_meta":{"required":true}},"status":{"type":"text","required":false,"default":"planned","enum":["planned","active","paused","completed","dropped"]},"startedAt":{"type":"datetime","required":false},"completedAt":{"type":"datetime","required":false},"targetMinutesPerWeek":{"type":"integer","required":true,"default":0},"sortOrder":{"type":"integer","required":true,"default":0}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"conflictColumns":["tenant_id","curriculum_id","course_id"],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"Enrollment","collectionExportName":"EnrollmentCollection","validationRules":[{"field":"curriculumId","rule":"required","fieldType":"foreignKey"},{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"courseId","rule":"required","fieldType":"foreignKey"},{"field":"targetMinutesPerWeek","rule":"required","fieldType":"integer"},{"field":"sortOrder","rule":"required","fieldType":"integer"}],"schema":{"tableName":"enrollments","ddl":"CREATE TABLE IF NOT EXISTS \\"enrollments\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"curriculum_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"course_id\\" UUID NOT NULL,\\n \\"status\\" TEXT DEFAULT 'planned',\\n \\"started_at\\" TIMESTAMP,\\n \\"completed_at\\" TIMESTAMP,\\n \\"target_minutes_per_week\\" INTEGER NOT NULL DEFAULT 0,\\n \\"sort_order\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"curriculum_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"curricula","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"course_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"courses","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"status":{"type":"TEXT","notNull":false,"unique":false,"default":"planned"},"started_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"completed_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"target_minutes_per_week":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"sort_order":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"enrollments_tenant_id_curriculum_id_idx","columns":["tenant_id","curriculum_id","course_id"],"unique":true},{"name":"enrollments_slug_context_idx","columns":["slug","context"]},{"name":"enrollments_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"enrollments_curriculum_id_idx","columns":["curriculum_id"]},{"name":"enrollments_learner_id_idx","columns":["learner_id"]},{"name":"enrollments_course_id_idx","columns":["course_id"]}],"version":"2a34b5ee"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:LessonProgress":{"name":"lessonprogress","className":"LessonProgress","qualifiedName":"@happyvertical/smrt-education:LessonProgress","collection":"lessonprogresses","description":"Progress identity is enrollment + lesson, never learner + lesson.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/learners.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"enrollmentId":{"type":"foreignKey","required":true,"related":"Enrollment","_meta":{"required":true}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"lessonId":{"type":"foreignKey","required":true,"related":"Lesson","_meta":{"required":true}},"status":{"type":"text","required":false,"default":"not_started","enum":["not_started","in_progress","submitted","needs_review","complete","skipped"]},"startedAt":{"type":"datetime","required":false},"completedAt":{"type":"datetime","required":false},"timeSpentSeconds":{"type":"integer","required":true,"default":0},"attempts":{"type":"integer","required":true,"default":0},"bestScore":{"type":"decimal","required":false,"_meta":{"nullable":true}}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"tableName":"lesson_progress","conflictColumns":["tenant_id","enrollment_id","lesson_id"],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"LessonProgress","collectionExportName":"LessonProgressCollection","validationRules":[{"field":"enrollmentId","rule":"required","fieldType":"foreignKey"},{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"lessonId","rule":"required","fieldType":"foreignKey"},{"field":"timeSpentSeconds","rule":"required","fieldType":"integer"},{"field":"attempts","rule":"required","fieldType":"integer"}],"schema":{"tableName":"lesson_progress","ddl":"CREATE TABLE IF NOT EXISTS \\"lesson_progress\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"enrollment_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"lesson_id\\" UUID NOT NULL,\\n \\"status\\" TEXT DEFAULT 'not_started',\\n \\"started_at\\" TIMESTAMP,\\n \\"completed_at\\" TIMESTAMP,\\n \\"time_spent_seconds\\" INTEGER NOT NULL DEFAULT 0,\\n \\"attempts\\" INTEGER NOT NULL DEFAULT 0,\\n \\"best_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"enrollment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"enrollments","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"status":{"type":"TEXT","notNull":false,"unique":false,"default":"not_started"},"started_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"completed_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"time_spent_seconds":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"attempts":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"best_score":{"type":"REAL","notNull":false,"unique":false}},"indexes":[{"name":"lesson_progress_tenant_id_enrollment_id_idx","columns":["tenant_id","enrollment_id","lesson_id"],"unique":true},{"name":"lesson_progress_slug_context_idx","columns":["slug","context"]},{"name":"lesson_progress_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lesson_progress_enrollment_id_idx","columns":["enrollment_id"]},{"name":"lesson_progress_learner_id_idx","columns":["learner_id"]},{"name":"lesson_progress_lesson_id_idx","columns":["lesson_id"]}],"version":"36704fbd"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:LessonAsset":{"name":"lessonasset","className":"LessonAsset","qualifiedName":"@happyvertical/smrt-education:LessonAsset","collection":"lessonassets","filePath":"/home/runner/work/smrt/smrt/packages/education/src/lesson-assets.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true,"mode":"optional","field":"tenantId","allowSuperAdminBypass":false}}},"lessonId":{"type":"foreignKey","required":true,"related":"Lesson","_meta":{"required":true}},"assetId":{"type":"crossPackageRef","required":true,"related":"@happyvertical/smrt-assets:Asset"},"relationship":{"type":"text","required":true,"default":"attachment","_meta":{"required":true},"enum":["printable","answer-key","video","attachment"]},"sortOrder":{"type":"integer","required":true,"default":0}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"lesson_assets","conflictColumns":["tenant_id","lesson_id","asset_id","relationship"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"optional"}},"extends":"SmrtObject","exportName":"LessonAsset","collectionExportName":"LessonAssetCollection","validationRules":[{"field":"lessonId","rule":"required","fieldType":"foreignKey"},{"field":"assetId","rule":"required","fieldType":"crossPackageRef"},{"field":"relationship","rule":"required","fieldType":"text"},{"field":"sortOrder","rule":"required","fieldType":"integer"}],"schema":{"tableName":"lesson_assets","ddl":"CREATE TABLE IF NOT EXISTS \\"lesson_assets\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"lesson_id\\" UUID NOT NULL,\\n \\"asset_id\\" UUID NOT NULL,\\n \\"relationship\\" TEXT NOT NULL DEFAULT 'attachment',\\n \\"sort_order\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false,"unique":false},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"relationship":{"type":"TEXT","notNull":true,"unique":false,"default":"attachment"},"sort_order":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"lesson_assets_tenant_id_lesson_id_idx","columns":["tenant_id","lesson_id","asset_id","relationship"],"unique":true,"nullsNotDistinct":true},{"name":"lesson_assets_slug_context_idx","columns":["slug","context"]},{"name":"lesson_assets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"lesson_assets_lesson_id_idx","columns":["lesson_id"]},{"name":"lesson_assets_asset_id_idx","columns":["asset_id"]}],"version":"d96385c6"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Submission":{"name":"submission","className":"Submission","qualifiedName":"@happyvertical/smrt-education:Submission","collection":"submissions","description":"Evidence that a learner completed one progress item.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/submissions.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"lessonId":{"type":"foreignKey","required":true,"related":"Lesson","_meta":{"required":true}},"progressId":{"type":"foreignKey","required":true,"related":"LessonProgress","_meta":{"required":true}},"submittedAt":{"type":"text","required":false},"status":{"type":"text","required":false,"default":"captured","enum":["captured","extracting","needs_review","graded","rejected"]},"notes":{"type":"text","required":false},"captureKey":{"type":"text","required":false},"captureDigest":{"type":"text","required":false},"kind":{"type":"text","required":true,"default":"completed_work","_meta":{"required":true},"enum":["blank_reference","completed_work"]},"previousSubmissionId":{"type":"foreignKey","required":false,"related":"Submission","_meta":{"nullable":true}},"intakeItemId":{"type":"text","required":false,"_meta":{"nullable":true}}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableStrategy":"sti","api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context","_meta_type"]},"extends":"SmrtObject","exportName":"Submission","collectionExportName":"SubmissionCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"lessonId","rule":"required","fieldType":"foreignKey"},{"field":"progressId","rule":"required","fieldType":"foreignKey"},{"field":"kind","rule":"required","fieldType":"text"}],"schema":{"tableName":"submissions","ddl":"CREATE TABLE IF NOT EXISTS \\"submissions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"learner_id\\" UUID,\\n \\"lesson_id\\" UUID,\\n \\"progress_id\\" UUID,\\n \\"submitted_at\\" TEXT,\\n \\"status\\" TEXT DEFAULT 'captured',\\n \\"notes\\" TEXT,\\n \\"capture_key\\" TEXT,\\n \\"capture_digest\\" TEXT,\\n \\"kind\\" TEXT DEFAULT 'completed_work',\\n \\"previous_submission_id\\" UUID,\\n \\"intake_item_id\\" TEXT,\\n \\"page_count\\" INTEGER DEFAULT 0,\\n \\"ocr_text\\" TEXT,\\n \\"extracted\\" TEXT,\\n \\"reported_by\\" TEXT DEFAULT 'learner',\\n \\"evidence_url\\" TEXT,\\n \\"reported_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"progress_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lesson_progress","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submitted_at":{"type":"TEXT","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"captured"},"notes":{"type":"TEXT","notNull":false},"capture_key":{"type":"TEXT","notNull":false},"capture_digest":{"type":"TEXT","notNull":false},"kind":{"type":"TEXT","notNull":false,"default":"completed_work"},"previous_submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_item_id":{"type":"TEXT","notNull":false},"page_count":{"type":"INTEGER","notNull":false,"default":0},"ocr_text":{"type":"TEXT","notNull":false},"extracted":{"type":"TEXT","notNull":false},"reported_by":{"type":"TEXT","notNull":false,"default":"learner"},"evidence_url":{"type":"TEXT","notNull":false},"reported_score":{"type":"REAL","notNull":false}},"indexes":[{"name":"submissions_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"submissions_meta_type_idx","columns":["_meta_type"]},{"name":"submissions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submissions_learner_id_idx","columns":["learner_id"]},{"name":"submissions_lesson_id_idx","columns":["lesson_id"]},{"name":"submissions_progress_id_idx","columns":["progress_id"]},{"name":"submissions_previous_submission_id_idx","columns":["previous_submission_id"]}],"version":"27a21ab4"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:SubmissionIntakeBinding":{"name":"submissionintakebinding","className":"SubmissionIntakeBinding","qualifiedName":"@happyvertical/smrt-education:SubmissionIntakeBinding","collection":"submissionintakebindings","description":"Durable tenant/item claim for trusted ingestion receipts. This separate table keeps ordinary uploads (which have no intake item) out of the uniqueness key.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/submissions.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"intakeItemId":{"type":"text","required":true,"_meta":{"required":true}},"submissionId":{"type":"foreignKey","required":true,"related":"Submission","_meta":{"required":true}}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"submission_intake_bindings","api":false,"mcp":false,"cli":false,"conflictColumns":["tenant_id","intake_item_id"],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"SubmissionIntakeBinding","collectionExportName":"SubmissionIntakeBindingCollection","validationRules":[{"field":"intakeItemId","rule":"required","fieldType":"text"},{"field":"submissionId","rule":"required","fieldType":"foreignKey"}],"schema":{"tableName":"submission_intake_bindings","ddl":"CREATE TABLE IF NOT EXISTS \\"submission_intake_bindings\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"intake_item_id\\" TEXT NOT NULL,\\n \\"submission_id\\" UUID NOT NULL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"intake_item_id":{"type":"TEXT","notNull":true,"unique":false},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}}},"indexes":[{"name":"submission_intake_bindings_tenant_id_intake_item_id_idx","columns":["tenant_id","intake_item_id"],"unique":true},{"name":"submission_intake_bindings_slug_context_idx","columns":["slug","context"]},{"name":"submission_intake_bindings_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submission_intake_bindings_submission_id_idx","columns":["submission_id"]}],"version":"7102c909"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:ScannedSubmission":{"name":"scannedsubmission","className":"ScannedSubmission","qualifiedName":"@happyvertical/smrt-education:ScannedSubmission","collection":"submissions","description":"Photos or scans of work submitted for review.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/submissions.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"lessonId":{"type":"foreignKey","required":true,"related":"Lesson","_meta":{"required":true}},"progressId":{"type":"foreignKey","required":true,"related":"LessonProgress","_meta":{"required":true}},"submittedAt":{"type":"text","required":false},"status":{"type":"text","required":false,"default":"captured","enum":["captured","extracting","needs_review","graded","rejected"]},"notes":{"type":"text","required":false},"captureKey":{"type":"text","required":false},"captureDigest":{"type":"text","required":false},"kind":{"type":"text","required":true,"default":"completed_work","_meta":{"required":true},"enum":["blank_reference","completed_work"]},"previousSubmissionId":{"type":"foreignKey","required":false,"related":"Submission","_meta":{"nullable":true}},"intakeItemId":{"type":"text","required":false,"_meta":{"nullable":true}},"pageCount":{"type":"integer","required":true,"default":0},"ocrText":{"type":"text","required":false},"extracted":{"type":"text","required":false}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true},"getExtracted":{"name":"getExtracted","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true},"setExtracted":{"name":"setExtracted","async":false,"parameters":[{"name":"value","type":"Record<string, unknown>","optional":false}],"returnType":"void","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"submissions","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Submission","exportName":"ScannedSubmission","collectionExportName":"ScannedSubmissionCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"lessonId","rule":"required","fieldType":"foreignKey"},{"field":"progressId","rule":"required","fieldType":"foreignKey"},{"field":"kind","rule":"required","fieldType":"text"},{"field":"pageCount","rule":"required","fieldType":"integer"}],"schema":{"tableName":"submissions","ddl":"CREATE TABLE IF NOT EXISTS \\"submissions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"learner_id\\" UUID,\\n \\"lesson_id\\" UUID,\\n \\"progress_id\\" UUID,\\n \\"submitted_at\\" TEXT,\\n \\"status\\" TEXT DEFAULT 'captured',\\n \\"notes\\" TEXT,\\n \\"capture_key\\" TEXT,\\n \\"capture_digest\\" TEXT,\\n \\"kind\\" TEXT DEFAULT 'completed_work',\\n \\"previous_submission_id\\" UUID,\\n \\"intake_item_id\\" TEXT,\\n \\"page_count\\" INTEGER DEFAULT 0,\\n \\"ocr_text\\" TEXT,\\n \\"extracted\\" TEXT,\\n \\"reported_by\\" TEXT DEFAULT 'learner',\\n \\"evidence_url\\" TEXT,\\n \\"reported_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"progress_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lesson_progress","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submitted_at":{"type":"TEXT","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"captured"},"notes":{"type":"TEXT","notNull":false},"capture_key":{"type":"TEXT","notNull":false},"capture_digest":{"type":"TEXT","notNull":false},"kind":{"type":"TEXT","notNull":false,"default":"completed_work"},"previous_submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_item_id":{"type":"TEXT","notNull":false},"page_count":{"type":"INTEGER","notNull":false,"default":0},"ocr_text":{"type":"TEXT","notNull":false},"extracted":{"type":"TEXT","notNull":false},"reported_by":{"type":"TEXT","notNull":false,"default":"learner"},"evidence_url":{"type":"TEXT","notNull":false},"reported_score":{"type":"REAL","notNull":false}},"indexes":[{"name":"submissions_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"submissions_meta_type_idx","columns":["_meta_type"]},{"name":"submissions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submissions_learner_id_idx","columns":["learner_id"]},{"name":"submissions_lesson_id_idx","columns":["lesson_id"]},{"name":"submissions_progress_id_idx","columns":["progress_id"]},{"name":"submissions_previous_submission_id_idx","columns":["previous_submission_id"]}],"version":"7c394510"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:ExternalCompletion":{"name":"externalcompletion","className":"ExternalCompletion","qualifiedName":"@happyvertical/smrt-education:ExternalCompletion","collection":"submissions","description":"Completion reported by the learner, guardian, or external source.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/submissions.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"lessonId":{"type":"foreignKey","required":true,"related":"Lesson","_meta":{"required":true}},"progressId":{"type":"foreignKey","required":true,"related":"LessonProgress","_meta":{"required":true}},"submittedAt":{"type":"text","required":false},"status":{"type":"text","required":false,"default":"captured","enum":["captured","extracting","needs_review","graded","rejected"]},"notes":{"type":"text","required":false},"captureKey":{"type":"text","required":false},"captureDigest":{"type":"text","required":false},"kind":{"type":"text","required":true,"default":"completed_work","_meta":{"required":true},"enum":["blank_reference","completed_work"]},"previousSubmissionId":{"type":"foreignKey","required":false,"related":"Submission","_meta":{"nullable":true}},"intakeItemId":{"type":"text","required":false,"_meta":{"nullable":true}},"reportedBy":{"type":"text","required":false,"default":"learner","enum":["learner","guardian","source"]},"evidenceUrl":{"type":"text","required":false},"reportedScore":{"type":"decimal","required":false,"_meta":{}}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"submissions","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Submission","exportName":"ExternalCompletion","collectionExportName":"ExternalCompletionCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"lessonId","rule":"required","fieldType":"foreignKey"},{"field":"progressId","rule":"required","fieldType":"foreignKey"},{"field":"kind","rule":"required","fieldType":"text"}],"schema":{"tableName":"submissions","ddl":"CREATE TABLE IF NOT EXISTS \\"submissions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"learner_id\\" UUID,\\n \\"lesson_id\\" UUID,\\n \\"progress_id\\" UUID,\\n \\"submitted_at\\" TEXT,\\n \\"status\\" TEXT DEFAULT 'captured',\\n \\"notes\\" TEXT,\\n \\"capture_key\\" TEXT,\\n \\"capture_digest\\" TEXT,\\n \\"kind\\" TEXT DEFAULT 'completed_work',\\n \\"previous_submission_id\\" UUID,\\n \\"intake_item_id\\" TEXT,\\n \\"page_count\\" INTEGER DEFAULT 0,\\n \\"ocr_text\\" TEXT,\\n \\"extracted\\" TEXT,\\n \\"reported_by\\" TEXT DEFAULT 'learner',\\n \\"evidence_url\\" TEXT,\\n \\"reported_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"progress_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lesson_progress","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submitted_at":{"type":"TEXT","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"captured"},"notes":{"type":"TEXT","notNull":false},"capture_key":{"type":"TEXT","notNull":false},"capture_digest":{"type":"TEXT","notNull":false},"kind":{"type":"TEXT","notNull":false,"default":"completed_work"},"previous_submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_item_id":{"type":"TEXT","notNull":false},"page_count":{"type":"INTEGER","notNull":false,"default":0},"ocr_text":{"type":"TEXT","notNull":false},"extracted":{"type":"TEXT","notNull":false},"reported_by":{"type":"TEXT","notNull":false,"default":"learner"},"evidence_url":{"type":"TEXT","notNull":false},"reported_score":{"type":"REAL","notNull":false}},"indexes":[{"name":"submissions_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"submissions_meta_type_idx","columns":["_meta_type"]},{"name":"submissions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submissions_learner_id_idx","columns":["learner_id"]},{"name":"submissions_lesson_id_idx","columns":["lesson_id"]},{"name":"submissions_progress_id_idx","columns":["progress_id"]},{"name":"submissions_previous_submission_id_idx","columns":["previous_submission_id"]}],"version":"eff3715d"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Attestation":{"name":"attestation","className":"Attestation","qualifiedName":"@happyvertical/smrt-education:Attestation","collection":"submissions","description":"A guardian's statement that work was completed.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/submissions.ts","packageName":"@happyvertical/smrt-education","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"lessonId":{"type":"foreignKey","required":true,"related":"Lesson","_meta":{"required":true}},"progressId":{"type":"foreignKey","required":true,"related":"LessonProgress","_meta":{"required":true}},"submittedAt":{"type":"text","required":false},"status":{"type":"text","required":false,"default":"captured","enum":["captured","extracting","needs_review","graded","rejected"]},"notes":{"type":"text","required":false},"captureKey":{"type":"text","required":false},"captureDigest":{"type":"text","required":false},"kind":{"type":"text","required":true,"default":"completed_work","_meta":{"required":true},"enum":["blank_reference","completed_work"]},"previousSubmissionId":{"type":"foreignKey","required":false,"related":"Submission","_meta":{"nullable":true}},"intakeItemId":{"type":"text","required":false,"_meta":{"nullable":true}}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"submissions","api":false,"mcp":false,"cli":false,"tableStrategy":"sti"},"extends":"Submission","exportName":"Attestation","collectionExportName":"AttestationCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"lessonId","rule":"required","fieldType":"foreignKey"},{"field":"progressId","rule":"required","fieldType":"foreignKey"},{"field":"kind","rule":"required","fieldType":"text"}],"schema":{"tableName":"submissions","ddl":"CREATE TABLE IF NOT EXISTS \\"submissions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"learner_id\\" UUID,\\n \\"lesson_id\\" UUID,\\n \\"progress_id\\" UUID,\\n \\"submitted_at\\" TEXT,\\n \\"status\\" TEXT DEFAULT 'captured',\\n \\"notes\\" TEXT,\\n \\"capture_key\\" TEXT,\\n \\"capture_digest\\" TEXT,\\n \\"kind\\" TEXT DEFAULT 'completed_work',\\n \\"previous_submission_id\\" UUID,\\n \\"intake_item_id\\" TEXT,\\n \\"page_count\\" INTEGER DEFAULT 0,\\n \\"ocr_text\\" TEXT,\\n \\"extracted\\" TEXT,\\n \\"reported_by\\" TEXT DEFAULT 'learner',\\n \\"evidence_url\\" TEXT,\\n \\"reported_score\\" REAL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"progress_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"lesson_progress","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submitted_at":{"type":"TEXT","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"captured"},"notes":{"type":"TEXT","notNull":false},"capture_key":{"type":"TEXT","notNull":false},"capture_digest":{"type":"TEXT","notNull":false},"kind":{"type":"TEXT","notNull":false,"default":"completed_work"},"previous_submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_item_id":{"type":"TEXT","notNull":false},"page_count":{"type":"INTEGER","notNull":false,"default":0},"ocr_text":{"type":"TEXT","notNull":false},"extracted":{"type":"TEXT","notNull":false},"reported_by":{"type":"TEXT","notNull":false,"default":"learner"},"evidence_url":{"type":"TEXT","notNull":false},"reported_score":{"type":"REAL","notNull":false}},"indexes":[{"name":"submissions_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"submissions_meta_type_idx","columns":["_meta_type"]},{"name":"submissions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submissions_learner_id_idx","columns":["learner_id"]},{"name":"submissions_lesson_id_idx","columns":["lesson_id"]},{"name":"submissions_progress_id_idx","columns":["progress_id"]},{"name":"submissions_previous_submission_id_idx","columns":["previous_submission_id"]}],"version":"4f3230a3"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:SubmissionAsset":{"name":"submissionasset","className":"SubmissionAsset","qualifiedName":"@happyvertical/smrt-education:SubmissionAsset","collection":"submissionassets","description":"The tenant-owned files attached to a submission.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/submissions.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"submissionId":{"type":"foreignKey","required":true,"related":"Submission","_meta":{"required":true}},"assetId":{"type":"crossPackageRef","required":true,"related":"@happyvertical/smrt-assets:Asset"},"relationship":{"type":"text","required":true,"default":"page","_meta":{"required":true},"enum":["page","attachment"]},"sortOrder":{"type":"integer","required":true,"default":0}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"submission_assets","conflictColumns":["tenant_id","submission_id","asset_id","relationship"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"SubmissionAsset","collectionExportName":"SubmissionAssetCollection","validationRules":[{"field":"submissionId","rule":"required","fieldType":"foreignKey"},{"field":"assetId","rule":"required","fieldType":"crossPackageRef"},{"field":"relationship","rule":"required","fieldType":"text"},{"field":"sortOrder","rule":"required","fieldType":"integer"}],"schema":{"tableName":"submission_assets","ddl":"CREATE TABLE IF NOT EXISTS \\"submission_assets\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"submission_id\\" UUID NOT NULL,\\n \\"asset_id\\" UUID NOT NULL,\\n \\"relationship\\" TEXT NOT NULL DEFAULT 'page',\\n \\"sort_order\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"relationship":{"type":"TEXT","notNull":true,"unique":false,"default":"page"},"sort_order":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"submission_assets_tenant_id_submission_id_idx","columns":["tenant_id","submission_id","asset_id","relationship"],"unique":true},{"name":"submission_assets_slug_context_idx","columns":["slug","context"]},{"name":"submission_assets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"submission_assets_submission_id_idx","columns":["submission_id"]},{"name":"submission_assets_asset_id_idx","columns":["asset_id"]}],"version":"d9b61c8a"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Grade":{"name":"grade","className":"Grade","qualifiedName":"@happyvertical/smrt-education:Grade","collection":"grades","description":"An assessment of a submission; the service selects the authoritative grade.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/submissions.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"submissionId":{"type":"foreignKey","required":true,"related":"Submission","_meta":{"required":true}},"graderKind":{"type":"text","required":true,"default":"auto","_meta":{"required":true},"enum":["auto","ai","guardian","instructor"]},"graderProfileId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-profiles:Profile","_meta":{"nullable":true}},"score":{"type":"decimal","required":false,"_meta":{"nullable":true}},"pointsEarned":{"type":"integer","required":false,"_meta":{"nullable":true}},"pointsPossible":{"type":"integer","required":false,"_meta":{"nullable":true}},"rubricResults":{"type":"text","required":false},"feedback":{"type":"text","required":false},"gradedAt":{"type":"text","required":false}},"methods":{"getRubricResults":{"name":"getRubricResults","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true},"setRubricResults":{"name":"setRubricResults","async":false,"parameters":[{"name":"value","type":"Record<string, unknown>","optional":false}],"returnType":"void","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"Grade","collectionExportName":"GradeCollection","validationRules":[{"field":"submissionId","rule":"required","fieldType":"foreignKey"},{"field":"graderKind","rule":"required","fieldType":"text"}],"schema":{"tableName":"grades","ddl":"CREATE TABLE IF NOT EXISTS \\"grades\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"submission_id\\" UUID NOT NULL,\\n \\"grader_kind\\" TEXT NOT NULL DEFAULT 'auto',\\n \\"grader_profile_id\\" UUID,\\n \\"score\\" REAL,\\n \\"points_earned\\" INTEGER,\\n \\"points_possible\\" INTEGER,\\n \\"rubric_results\\" TEXT,\\n \\"feedback\\" TEXT,\\n \\"graded_at\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"grader_kind":{"type":"TEXT","notNull":true,"unique":false,"default":"auto"},"grader_profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"score":{"type":"REAL","notNull":false,"unique":false},"points_earned":{"type":"INTEGER","notNull":false,"unique":false},"points_possible":{"type":"INTEGER","notNull":false,"unique":false},"rubric_results":{"type":"TEXT","notNull":false,"unique":false},"feedback":{"type":"TEXT","notNull":false,"unique":false},"graded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"grades_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"grades_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"grades_submission_id_idx","columns":["submission_id"]},{"name":"grades_grader_profile_id_idx","columns":["grader_profile_id"]}],"version":"7d629fec"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookCompletionDecision":{"name":"workbookcompletiondecision","className":"WorkbookCompletionDecision","qualifiedName":"@happyvertical/smrt-education:WorkbookCompletionDecision","collection":"workbookcompletiondecisions","description":"Immutable parent judgment; assessment and feedback release remain independent.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-completion.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}},"attemptId":{"type":"foreignKey","required":true,"related":"WorkbookAttempt","_meta":{"required":true}},"submissionId":{"type":"foreignKey","required":true,"related":"Submission","_meta":{"required":true}},"feedbackHeadId":{"type":"foreignKey","required":false,"related":"WorkbookAssessmentRevision","_meta":{"nullable":true}},"actorUserId":{"type":"crossPackageRef","required":true,"related":"@happyvertical/smrt-users:User"},"requestKey":{"type":"text","required":false},"recordedAt":{"type":"text","required":false}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":false,"mcp":false,"cli":false,"tableName":"workbook_completion_decisions","conflictColumns":["tenant_id","activity_id","request_key"],"indexes":[{"name":"workbook_completion_decisions_attempt_unique","columns":["tenantId","activityId","attemptId"],"unique":true}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookCompletionDecision","collectionExportName":"WorkbookCompletionDecisionCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"activityId","rule":"required","fieldType":"foreignKey"},{"field":"attemptId","rule":"required","fieldType":"foreignKey"},{"field":"submissionId","rule":"required","fieldType":"foreignKey"},{"field":"actorUserId","rule":"required","fieldType":"crossPackageRef"}],"schema":{"tableName":"workbook_completion_decisions","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_completion_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 \\"activity_id\\" UUID NOT NULL,\\n \\"attempt_id\\" UUID NOT NULL,\\n \\"submission_id\\" UUID NOT NULL,\\n \\"feedback_head_id\\" UUID,\\n \\"actor_user_id\\" UUID NOT NULL,\\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"}},"activity_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_activities","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"feedback_head_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"actor_user_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"request_key":{"type":"TEXT","notNull":false,"unique":false},"recorded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_completion_decisions_tenant_id_activity_id_idx","columns":["tenant_id","activity_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_completion_decisions_slug_context_idx","columns":["slug","context"]},{"name":"workbook_completion_decisions_attempt_unique","columns":["tenant_id","activity_id","attempt_id"],"unique":true},{"name":"workbook_completion_decisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_completion_decisions_learner_id_idx","columns":["learner_id"]},{"name":"workbook_completion_decisions_activity_id_idx","columns":["activity_id"]},{"name":"workbook_completion_decisions_attempt_id_idx","columns":["attempt_id"]},{"name":"workbook_completion_decisions_submission_id_idx","columns":["submission_id"]},{"name":"workbook_completion_decisions_feedback_head_id_idx","columns":["feedback_head_id"]},{"name":"workbook_completion_decisions_actor_user_id_idx","columns":["actor_user_id"]}],"version":"c6015700"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookCompletionDecisionCollection":{"name":"workbookcompletiondecisioncollection","className":"WorkbookCompletionDecisionCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookCompletionDecisionCollection","collection":"workbookcompletiondecisions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-completion.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_completion_decisions","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookCompletionDecision","exportName":"WorkbookCompletionDecisionCollection","collectionExportName":"WorkbookCompletionDecisionCollectionCollection","schema":{"tableName":"workbook_completion_decisions","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_completion_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 \\"activity_id\\" UUID NOT NULL,\\n \\"attempt_id\\" UUID NOT NULL,\\n \\"submission_id\\" UUID NOT NULL,\\n \\"feedback_head_id\\" UUID,\\n \\"actor_user_id\\" UUID NOT NULL,\\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"}},"activity_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_activities","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"feedback_head_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"actor_user_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"request_key":{"type":"TEXT","notNull":false,"unique":false},"recorded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_completion_decisions_tenant_id_activity_id_idx","columns":["tenant_id","activity_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_completion_decisions_slug_context_idx","columns":["slug","context"]},{"name":"workbook_completion_decisions_attempt_unique","columns":["tenant_id","activity_id","attempt_id"],"unique":true},{"name":"workbook_completion_decisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_completion_decisions_learner_id_idx","columns":["learner_id"]},{"name":"workbook_completion_decisions_activity_id_idx","columns":["activity_id"]},{"name":"workbook_completion_decisions_attempt_id_idx","columns":["attempt_id"]},{"name":"workbook_completion_decisions_submission_id_idx","columns":["submission_id"]},{"name":"workbook_completion_decisions_feedback_head_id_idx","columns":["feedback_head_id"]},{"name":"workbook_completion_decisions_actor_user_id_idx","columns":["actor_user_id"]}],"version":"c6015700"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:Workbook":{"name":"workbook","className":"Workbook","qualifiedName":"@happyvertical/smrt-education:Workbook","collection":"workbooks","description":"Education-owned private workbook record. Mutations go through WorkbookService.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"workbookKey":{"type":"text","required":false},"title":{"type":"text","required":false},"edition":{"type":"text","required":false},"reviewRequired":{"type":"boolean","required":true,"default":true},"policyVersion":{"type":"integer","required":true,"default":1}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbooks","conflictColumns":["tenant_id","learner_id","workbook_key"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"Workbook","collectionExportName":"WorkbookCollection","displayLabelField":"title","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"reviewRequired","rule":"required","fieldType":"boolean"},{"field":"policyVersion","rule":"required","fieldType":"integer"}],"schema":{"tableName":"workbooks","ddl":"CREATE TABLE IF NOT EXISTS \\"workbooks\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"workbook_key\\" TEXT,\\n \\"title\\" TEXT,\\n \\"edition\\" TEXT,\\n \\"review_required\\" BOOLEAN NOT NULL DEFAULT TRUE,\\n \\"policy_version\\" INTEGER NOT NULL DEFAULT 1\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"workbook_key":{"type":"TEXT","notNull":false,"unique":false},"title":{"type":"TEXT","notNull":false,"unique":false},"edition":{"type":"TEXT","notNull":false,"unique":false},"review_required":{"type":"BOOLEAN","notNull":true,"unique":false,"default":true},"policy_version":{"type":"INTEGER","notNull":true,"unique":false,"default":1}},"indexes":[{"name":"workbooks_tenant_id_learner_id_idx","columns":["tenant_id","learner_id","workbook_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbooks_slug_context_idx","columns":["slug","context"]},{"name":"workbooks_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbooks_learner_id_idx","columns":["learner_id"]}],"version":"a5b56a39"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookCollection":{"name":"workbookcollection","className":"WorkbookCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookCollection","collection":"workbooks","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbooks","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Workbook","exportName":"WorkbookCollection","collectionExportName":"WorkbookCollectionCollection","schema":{"tableName":"workbooks","ddl":"CREATE TABLE IF NOT EXISTS \\"workbooks\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"workbook_key\\" TEXT,\\n \\"title\\" TEXT,\\n \\"edition\\" TEXT,\\n \\"review_required\\" BOOLEAN NOT NULL DEFAULT TRUE,\\n \\"policy_version\\" INTEGER NOT NULL DEFAULT 1\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"workbook_key":{"type":"TEXT","notNull":false,"unique":false},"title":{"type":"TEXT","notNull":false,"unique":false},"edition":{"type":"TEXT","notNull":false,"unique":false},"review_required":{"type":"BOOLEAN","notNull":true,"unique":false,"default":true},"policy_version":{"type":"INTEGER","notNull":true,"unique":false,"default":1}},"indexes":[{"name":"workbooks_tenant_id_learner_id_idx","columns":["tenant_id","learner_id","workbook_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbooks_slug_context_idx","columns":["slug","context"]},{"name":"workbooks_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbooks_learner_id_idx","columns":["learner_id"]}],"version":"a5b56a39"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookActivity":{"name":"workbookactivity","className":"WorkbookActivity","qualifiedName":"@happyvertical/smrt-education:WorkbookActivity","collection":"workbookactivities","description":"Education-owned private workbook record. Mutations go through WorkbookService.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"workbookId":{"type":"foreignKey","required":false,"related":"Workbook","_meta":{"nullable":true}},"captureKind":{"type":"text","required":true,"default":"identified","_meta":{"required":true,"default":"identified"}},"photoIntakeId":{"type":"foreignKey","required":false,"related":"WorkbookPhotoIntake","_meta":{"nullable":true}},"enrollmentId":{"type":"foreignKey","required":true,"related":"Enrollment","_meta":{"required":true}},"lessonId":{"type":"foreignKey","required":true,"related":"Lesson","_meta":{"required":true}},"pageKey":{"type":"text","required":false},"pageLabel":{"type":"text","required":false}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_activities","conflictColumns":["tenant_id","workbook_id","page_key"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookActivity","collectionExportName":"WorkbookActivityCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"captureKind","rule":"required","fieldType":"text"},{"field":"enrollmentId","rule":"required","fieldType":"foreignKey"},{"field":"lessonId","rule":"required","fieldType":"foreignKey"}],"schema":{"tableName":"workbook_activities","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_activities\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"workbook_id\\" UUID,\\n \\"capture_kind\\" TEXT NOT NULL DEFAULT 'identified',\\n \\"photo_intake_id\\" UUID,\\n \\"enrollment_id\\" UUID NOT NULL,\\n \\"lesson_id\\" UUID NOT NULL,\\n \\"page_key\\" TEXT,\\n \\"page_label\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"workbook_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbooks","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"capture_kind":{"type":"TEXT","notNull":true,"unique":false,"default":"identified"},"photo_intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_photo_intakes","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"enrollment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"enrollments","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"page_key":{"type":"TEXT","notNull":false,"unique":false},"page_label":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_activities_tenant_id_workbook_id_idx","columns":["tenant_id","workbook_id","page_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_activities_slug_context_idx","columns":["slug","context"]},{"name":"workbook_activities_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_activities_learner_id_idx","columns":["learner_id"]},{"name":"workbook_activities_workbook_id_idx","columns":["workbook_id"]},{"name":"workbook_activities_photo_intake_id_idx","columns":["photo_intake_id"]},{"name":"workbook_activities_enrollment_id_idx","columns":["enrollment_id"]},{"name":"workbook_activities_lesson_id_idx","columns":["lesson_id"]}],"version":"320c8eb0"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookActivityCollection":{"name":"workbookactivitycollection","className":"WorkbookActivityCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookActivityCollection","collection":"workbookactivities","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_activities","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookActivity","exportName":"WorkbookActivityCollection","collectionExportName":"WorkbookActivityCollectionCollection","schema":{"tableName":"workbook_activities","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_activities\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"workbook_id\\" UUID,\\n \\"capture_kind\\" TEXT NOT NULL DEFAULT 'identified',\\n \\"photo_intake_id\\" UUID,\\n \\"enrollment_id\\" UUID NOT NULL,\\n \\"lesson_id\\" UUID NOT NULL,\\n \\"page_key\\" TEXT,\\n \\"page_label\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"workbook_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbooks","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"capture_kind":{"type":"TEXT","notNull":true,"unique":false,"default":"identified"},"photo_intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_photo_intakes","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"enrollment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"enrollments","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"lesson_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"lessons","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"page_key":{"type":"TEXT","notNull":false,"unique":false},"page_label":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_activities_tenant_id_workbook_id_idx","columns":["tenant_id","workbook_id","page_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_activities_slug_context_idx","columns":["slug","context"]},{"name":"workbook_activities_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_activities_learner_id_idx","columns":["learner_id"]},{"name":"workbook_activities_workbook_id_idx","columns":["workbook_id"]},{"name":"workbook_activities_photo_intake_id_idx","columns":["photo_intake_id"]},{"name":"workbook_activities_enrollment_id_idx","columns":["enrollment_id"]},{"name":"workbook_activities_lesson_id_idx","columns":["lesson_id"]}],"version":"320c8eb0"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookWorkFiling":{"name":"workbookworkfiling","className":"WorkbookWorkFiling","qualifiedName":"@happyvertical/smrt-education:WorkbookWorkFiling","collection":"workbookworkfilings","description":"Append-only association; the source work unit and its routing never move.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"sourceActivityId":{"type":"foreignKey","required":true,"related":"WorkbookActivity","_meta":{"required":true}},"workbookId":{"type":"foreignKey","required":true,"related":"Workbook","_meta":{"required":true}},"canonicalActivityId":{"type":"foreignKey","required":false,"related":"WorkbookActivity","_meta":{"nullable":true}},"previousRevisionId":{"type":"foreignKey","required":false,"related":"WorkbookWorkFiling","_meta":{"nullable":true}},"actorUserId":{"type":"text","required":false},"requestKey":{"type":"text","required":false},"reason":{"type":"text","required":false},"digest":{"type":"text","required":false}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_work_filings","conflictColumns":["tenant_id","source_activity_id","request_key"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookWorkFiling","collectionExportName":"WorkbookWorkFilingCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"sourceActivityId","rule":"required","fieldType":"foreignKey"},{"field":"workbookId","rule":"required","fieldType":"foreignKey"}],"schema":{"tableName":"workbook_work_filings","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_work_filings\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"source_activity_id\\" UUID NOT NULL,\\n \\"workbook_id\\" UUID NOT NULL,\\n \\"canonical_activity_id\\" UUID,\\n \\"previous_revision_id\\" UUID,\\n \\"actor_user_id\\" TEXT,\\n \\"request_key\\" TEXT,\\n \\"reason\\" TEXT,\\n \\"digest\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"source_activity_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_activities","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"workbook_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbooks","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"canonical_activity_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_activities","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"previous_revision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_work_filings","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"request_key":{"type":"TEXT","notNull":false,"unique":false},"reason":{"type":"TEXT","notNull":false,"unique":false},"digest":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_work_filings_tenant_id_source_activity_id_idx","columns":["tenant_id","source_activity_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_work_filings_slug_context_idx","columns":["slug","context"]},{"name":"workbook_work_filings_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_work_filings_learner_id_idx","columns":["learner_id"]},{"name":"workbook_work_filings_source_activity_id_idx","columns":["source_activity_id"]},{"name":"workbook_work_filings_workbook_id_idx","columns":["workbook_id"]},{"name":"workbook_work_filings_canonical_activity_id_idx","columns":["canonical_activity_id"]},{"name":"workbook_work_filings_previous_revision_id_idx","columns":["previous_revision_id"]}],"version":"03e989a0"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookWorkFilingCollection":{"name":"workbookworkfilingcollection","className":"WorkbookWorkFilingCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookWorkFilingCollection","collection":"workbookworkfilings","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_work_filings","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookWorkFiling","exportName":"WorkbookWorkFilingCollection","collectionExportName":"WorkbookWorkFilingCollectionCollection","schema":{"tableName":"workbook_work_filings","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_work_filings\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"source_activity_id\\" UUID NOT NULL,\\n \\"workbook_id\\" UUID NOT NULL,\\n \\"canonical_activity_id\\" UUID,\\n \\"previous_revision_id\\" UUID,\\n \\"actor_user_id\\" TEXT,\\n \\"request_key\\" TEXT,\\n \\"reason\\" TEXT,\\n \\"digest\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"source_activity_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_activities","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"workbook_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbooks","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"canonical_activity_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_activities","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"previous_revision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_work_filings","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"request_key":{"type":"TEXT","notNull":false,"unique":false},"reason":{"type":"TEXT","notNull":false,"unique":false},"digest":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_work_filings_tenant_id_source_activity_id_idx","columns":["tenant_id","source_activity_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_work_filings_slug_context_idx","columns":["slug","context"]},{"name":"workbook_work_filings_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_work_filings_learner_id_idx","columns":["learner_id"]},{"name":"workbook_work_filings_source_activity_id_idx","columns":["source_activity_id"]},{"name":"workbook_work_filings_workbook_id_idx","columns":["workbook_id"]},{"name":"workbook_work_filings_canonical_activity_id_idx","columns":["canonical_activity_id"]},{"name":"workbook_work_filings_previous_revision_id_idx","columns":["previous_revision_id"]}],"version":"03e989a0"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookAttempt":{"name":"workbookattempt","className":"WorkbookAttempt","qualifiedName":"@happyvertical/smrt-education:WorkbookAttempt","collection":"workbookattempts","description":"Education-owned private workbook record. Mutations go through WorkbookService.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"activityId":{"type":"foreignKey","required":true,"related":"WorkbookActivity","_meta":{"required":true}},"submissionId":{"type":"foreignKey","required":true,"related":"Submission","_meta":{"required":true}},"previousAttemptId":{"type":"foreignKey","required":false,"related":"WorkbookAttempt","_meta":{"nullable":true}},"capturedAt":{"type":"text","required":false},"episodeId":{"type":"text","required":false},"reviewRequired":{"type":"boolean","required":true,"default":true},"policyVersion":{"type":"integer","required":true,"default":1},"assistance":{"type":"text","required":false},"actorUserId":{"type":"text","required":false},"sourceHashes":{"type":"text","required":false,"_meta":{}}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_attempts","conflictColumns":["tenant_id","submission_id"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookAttempt","collectionExportName":"WorkbookAttemptCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"activityId","rule":"required","fieldType":"foreignKey"},{"field":"submissionId","rule":"required","fieldType":"foreignKey"},{"field":"reviewRequired","rule":"required","fieldType":"boolean"},{"field":"policyVersion","rule":"required","fieldType":"integer"}],"schema":{"tableName":"workbook_attempts","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_attempts\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"activity_id\\" UUID NOT NULL,\\n \\"submission_id\\" UUID NOT NULL,\\n \\"previous_attempt_id\\" UUID,\\n \\"captured_at\\" TEXT,\\n \\"episode_id\\" TEXT,\\n \\"review_required\\" BOOLEAN NOT NULL DEFAULT TRUE,\\n \\"policy_version\\" INTEGER NOT NULL DEFAULT 1,\\n \\"assistance\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"source_hashes\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"activity_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_activities","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"previous_attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"captured_at":{"type":"TEXT","notNull":false,"unique":false},"episode_id":{"type":"TEXT","notNull":false,"unique":false},"review_required":{"type":"BOOLEAN","notNull":true,"unique":false,"default":true},"policy_version":{"type":"INTEGER","notNull":true,"unique":false,"default":1},"assistance":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"source_hashes":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_attempts_tenant_id_submission_id_idx","columns":["tenant_id","submission_id"],"unique":true},{"name":"workbook_attempts_slug_context_idx","columns":["slug","context"]},{"name":"workbook_attempts_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_attempts_learner_id_idx","columns":["learner_id"]},{"name":"workbook_attempts_activity_id_idx","columns":["activity_id"]},{"name":"workbook_attempts_submission_id_idx","columns":["submission_id"]},{"name":"workbook_attempts_previous_attempt_id_idx","columns":["previous_attempt_id"]}],"version":"bd9cdd9f"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookAttemptCollection":{"name":"workbookattemptcollection","className":"WorkbookAttemptCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookAttemptCollection","collection":"workbookattempts","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_attempts","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookAttempt","exportName":"WorkbookAttemptCollection","collectionExportName":"WorkbookAttemptCollectionCollection","schema":{"tableName":"workbook_attempts","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_attempts\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"activity_id\\" UUID NOT NULL,\\n \\"submission_id\\" UUID NOT NULL,\\n \\"previous_attempt_id\\" UUID,\\n \\"captured_at\\" TEXT,\\n \\"episode_id\\" TEXT,\\n \\"review_required\\" BOOLEAN NOT NULL DEFAULT TRUE,\\n \\"policy_version\\" INTEGER NOT NULL DEFAULT 1,\\n \\"assistance\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"source_hashes\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"activity_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_activities","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"submission_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"submissions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"previous_attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"captured_at":{"type":"TEXT","notNull":false,"unique":false},"episode_id":{"type":"TEXT","notNull":false,"unique":false},"review_required":{"type":"BOOLEAN","notNull":true,"unique":false,"default":true},"policy_version":{"type":"INTEGER","notNull":true,"unique":false,"default":1},"assistance":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"source_hashes":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_attempts_tenant_id_submission_id_idx","columns":["tenant_id","submission_id"],"unique":true},{"name":"workbook_attempts_slug_context_idx","columns":["slug","context"]},{"name":"workbook_attempts_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_attempts_learner_id_idx","columns":["learner_id"]},{"name":"workbook_attempts_activity_id_idx","columns":["activity_id"]},{"name":"workbook_attempts_submission_id_idx","columns":["submission_id"]},{"name":"workbook_attempts_previous_attempt_id_idx","columns":["previous_attempt_id"]}],"version":"bd9cdd9f"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookAssessmentRevision":{"name":"workbookassessmentrevision","className":"WorkbookAssessmentRevision","qualifiedName":"@happyvertical/smrt-education:WorkbookAssessmentRevision","collection":"workbookassessmentrevisions","description":"Education-owned private workbook record. Mutations go through WorkbookService.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"attemptId":{"type":"foreignKey","required":true,"related":"WorkbookAttempt","_meta":{"required":true}},"requestKey":{"type":"text","required":false},"requestDigest":{"type":"text","required":false},"kind":{"type":"text","required":false},"actorUserId":{"type":"text","required":false},"sourceRevisionId":{"type":"foreignKey","required":false,"related":"WorkbookAssessmentRevision","_meta":{"nullable":true}},"decisionReason":{"type":"text","required":false},"supersedesId":{"type":"foreignKey","required":false,"related":"WorkbookAssessmentRevision","_meta":{"nullable":true}},"assessmentJson":{"type":"text","required":false,"_meta":{}},"recordedAt":{"type":"text","required":false}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_assessment_revisions","conflictColumns":["tenant_id","attempt_id","request_key"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookAssessmentRevision","collectionExportName":"WorkbookAssessmentRevisionCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"attemptId","rule":"required","fieldType":"foreignKey"}],"schema":{"tableName":"workbook_assessment_revisions","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_assessment_revisions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"attempt_id\\" UUID NOT NULL,\\n \\"request_key\\" TEXT,\\n \\"request_digest\\" TEXT,\\n \\"kind\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"source_revision_id\\" UUID,\\n \\"decision_reason\\" TEXT,\\n \\"supersedes_id\\" UUID,\\n \\"assessment_json\\" TEXT,\\n \\"recorded_at\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":false,"unique":false},"request_digest":{"type":"TEXT","notNull":false,"unique":false},"kind":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"source_revision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"decision_reason":{"type":"TEXT","notNull":false,"unique":false},"supersedes_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"assessment_json":{"type":"TEXT","notNull":false,"unique":false},"recorded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_assessment_revisions_tenant_id_attempt_id_idx","columns":["tenant_id","attempt_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_assessment_revisions_slug_context_idx","columns":["slug","context"]},{"name":"workbook_assessment_revisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_assessment_revisions_learner_id_idx","columns":["learner_id"]},{"name":"workbook_assessment_revisions_attempt_id_idx","columns":["attempt_id"]},{"name":"workbook_assessment_revisions_source_revision_id_idx","columns":["source_revision_id"]},{"name":"workbook_assessment_revisions_supersedes_id_idx","columns":["supersedes_id"]}],"version":"94b2bd33"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookAssessmentRevisionCollection":{"name":"workbookassessmentrevisioncollection","className":"WorkbookAssessmentRevisionCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookAssessmentRevisionCollection","collection":"workbookassessmentrevisions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_assessment_revisions","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookAssessmentRevision","exportName":"WorkbookAssessmentRevisionCollection","collectionExportName":"WorkbookAssessmentRevisionCollectionCollection","schema":{"tableName":"workbook_assessment_revisions","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_assessment_revisions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"attempt_id\\" UUID NOT NULL,\\n \\"request_key\\" TEXT,\\n \\"request_digest\\" TEXT,\\n \\"kind\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"source_revision_id\\" UUID,\\n \\"decision_reason\\" TEXT,\\n \\"supersedes_id\\" UUID,\\n \\"assessment_json\\" TEXT,\\n \\"recorded_at\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":false,"unique":false},"request_digest":{"type":"TEXT","notNull":false,"unique":false},"kind":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"source_revision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"decision_reason":{"type":"TEXT","notNull":false,"unique":false},"supersedes_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"assessment_json":{"type":"TEXT","notNull":false,"unique":false},"recorded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_assessment_revisions_tenant_id_attempt_id_idx","columns":["tenant_id","attempt_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_assessment_revisions_slug_context_idx","columns":["slug","context"]},{"name":"workbook_assessment_revisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_assessment_revisions_learner_id_idx","columns":["learner_id"]},{"name":"workbook_assessment_revisions_attempt_id_idx","columns":["attempt_id"]},{"name":"workbook_assessment_revisions_source_revision_id_idx","columns":["source_revision_id"]},{"name":"workbook_assessment_revisions_supersedes_id_idx","columns":["supersedes_id"]}],"version":"94b2bd33"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookFeedbackRelease":{"name":"workbookfeedbackrelease","className":"WorkbookFeedbackRelease","qualifiedName":"@happyvertical/smrt-education:WorkbookFeedbackRelease","collection":"workbookfeedbackreleases","description":"Education-owned private workbook record. Mutations go through WorkbookService.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"attemptId":{"type":"foreignKey","required":true,"related":"WorkbookAttempt","_meta":{"required":true}},"revisionId":{"type":"foreignKey","required":true,"related":"WorkbookAssessmentRevision","_meta":{"required":true}},"expectedHeadId":{"type":"foreignKey","required":false,"related":"WorkbookAssessmentRevision","_meta":{"nullable":true}},"requestKey":{"type":"text","required":false},"actorUserId":{"type":"text","required":false},"recordedAt":{"type":"text","required":false}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_feedback_releases","conflictColumns":["tenant_id","attempt_id","request_key"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookFeedbackRelease","collectionExportName":"WorkbookFeedbackReleaseCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"attemptId","rule":"required","fieldType":"foreignKey"},{"field":"revisionId","rule":"required","fieldType":"foreignKey"}],"schema":{"tableName":"workbook_feedback_releases","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_feedback_releases\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"attempt_id\\" UUID NOT NULL,\\n \\"revision_id\\" UUID NOT NULL,\\n \\"expected_head_id\\" UUID,\\n \\"request_key\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"recorded_at\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"revision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"expected_head_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"recorded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_feedback_releases_tenant_id_attempt_id_idx","columns":["tenant_id","attempt_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_feedback_releases_slug_context_idx","columns":["slug","context"]},{"name":"workbook_feedback_releases_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_feedback_releases_learner_id_idx","columns":["learner_id"]},{"name":"workbook_feedback_releases_attempt_id_idx","columns":["attempt_id"]},{"name":"workbook_feedback_releases_revision_id_idx","columns":["revision_id"]},{"name":"workbook_feedback_releases_expected_head_id_idx","columns":["expected_head_id"]}],"version":"ebe23baf"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookFeedbackReleaseCollection":{"name":"workbookfeedbackreleasecollection","className":"WorkbookFeedbackReleaseCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookFeedbackReleaseCollection","collection":"workbookfeedbackreleases","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_feedback_releases","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookFeedbackRelease","exportName":"WorkbookFeedbackReleaseCollection","collectionExportName":"WorkbookFeedbackReleaseCollectionCollection","schema":{"tableName":"workbook_feedback_releases","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_feedback_releases\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"attempt_id\\" UUID NOT NULL,\\n \\"revision_id\\" UUID NOT NULL,\\n \\"expected_head_id\\" UUID,\\n \\"request_key\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"recorded_at\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"revision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"expected_head_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"recorded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_feedback_releases_tenant_id_attempt_id_idx","columns":["tenant_id","attempt_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_feedback_releases_slug_context_idx","columns":["slug","context"]},{"name":"workbook_feedback_releases_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_feedback_releases_learner_id_idx","columns":["learner_id"]},{"name":"workbook_feedback_releases_attempt_id_idx","columns":["attempt_id"]},{"name":"workbook_feedback_releases_revision_id_idx","columns":["revision_id"]},{"name":"workbook_feedback_releases_expected_head_id_idx","columns":["expected_head_id"]}],"version":"ebe23baf"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookFeedbackDelivery":{"name":"workbookfeedbackdelivery","className":"WorkbookFeedbackDelivery","qualifiedName":"@happyvertical/smrt-education:WorkbookFeedbackDelivery","collection":"workbookfeedbackdeliveries","description":"Authenticated delivery acknowledgment; this does not assert comprehension.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"attemptId":{"type":"foreignKey","required":true,"related":"WorkbookAttempt","_meta":{"required":true}},"revisionId":{"type":"foreignKey","required":true,"related":"WorkbookAssessmentRevision","_meta":{"required":true}},"actorUserId":{"type":"text","required":false},"requestKey":{"type":"text","required":false},"recordedAt":{"type":"text","required":false}},"methods":{"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true},"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_feedback_deliveries","conflictColumns":["tenant_id","attempt_id","actor_user_id","revision_id"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookFeedbackDelivery","collectionExportName":"WorkbookFeedbackDeliveryCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"attemptId","rule":"required","fieldType":"foreignKey"},{"field":"revisionId","rule":"required","fieldType":"foreignKey"}],"schema":{"tableName":"workbook_feedback_deliveries","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_feedback_deliveries\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"attempt_id\\" UUID NOT NULL,\\n \\"revision_id\\" UUID NOT NULL,\\n \\"actor_user_id\\" TEXT,\\n \\"request_key\\" TEXT,\\n \\"recorded_at\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"revision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"request_key":{"type":"TEXT","notNull":false,"unique":false},"recorded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_feedback_deliveries_tenant_id_attempt_id_idx","columns":["tenant_id","attempt_id","actor_user_id","revision_id"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_feedback_deliveries_slug_context_idx","columns":["slug","context"]},{"name":"workbook_feedback_deliveries_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_feedback_deliveries_learner_id_idx","columns":["learner_id"]},{"name":"workbook_feedback_deliveries_attempt_id_idx","columns":["attempt_id"]},{"name":"workbook_feedback_deliveries_revision_id_idx","columns":["revision_id"]}],"version":"37bfd434"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookFeedbackDeliveryCollection":{"name":"workbookfeedbackdeliverycollection","className":"WorkbookFeedbackDeliveryCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookFeedbackDeliveryCollection","collection":"workbookfeedbackdeliveries","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_feedback_deliveries","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookFeedbackDelivery","exportName":"WorkbookFeedbackDeliveryCollection","collectionExportName":"WorkbookFeedbackDeliveryCollectionCollection","schema":{"tableName":"workbook_feedback_deliveries","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_feedback_deliveries\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"attempt_id\\" UUID NOT NULL,\\n \\"revision_id\\" UUID NOT NULL,\\n \\"actor_user_id\\" TEXT,\\n \\"request_key\\" TEXT,\\n \\"recorded_at\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_attempts","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"revision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_assessment_revisions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"request_key":{"type":"TEXT","notNull":false,"unique":false},"recorded_at":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_feedback_deliveries_tenant_id_attempt_id_idx","columns":["tenant_id","attempt_id","actor_user_id","revision_id"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_feedback_deliveries_slug_context_idx","columns":["slug","context"]},{"name":"workbook_feedback_deliveries_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_feedback_deliveries_learner_id_idx","columns":["learner_id"]},{"name":"workbook_feedback_deliveries_attempt_id_idx","columns":["attempt_id"]},{"name":"workbook_feedback_deliveries_revision_id_idx","columns":["revision_id"]}],"version":"37bfd434"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookPhotoIntake":{"name":"workbookphotointake","className":"WorkbookPhotoIntake","qualifiedName":"@happyvertical/smrt-education:WorkbookPhotoIntake","collection":"workbookphotointakes","description":"Durable receipt before any course, enrollment or activity exists.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-photo-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"familyIntakeId":{"type":"foreignKey","required":false,"related":"FamilyIntake"},"itemId":{"type":"text","required":false},"actorUserId":{"type":"text","required":false},"contentDigest":{"type":"text","required":false}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_photo_intakes","conflictColumns":["tenant_id","item_id"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookPhotoIntake","collectionExportName":"WorkbookPhotoIntakeCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"}],"schema":{"tableName":"workbook_photo_intakes","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_photo_intakes\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"family_intake_id\\" UUID,\\n \\"item_id\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"content_digest\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"family_intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"family_intakes","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"item_id":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"content_digest":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_photo_intakes_tenant_id_item_id_idx","columns":["tenant_id","item_id"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_photo_intakes_slug_context_idx","columns":["slug","context"]},{"name":"workbook_photo_intakes_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_photo_intakes_learner_id_idx","columns":["learner_id"]},{"name":"workbook_photo_intakes_family_intake_id_idx","columns":["family_intake_id"]}],"version":"288020f4"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookPhotoIntakeCollection":{"name":"workbookphotointakecollection","className":"WorkbookPhotoIntakeCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookPhotoIntakeCollection","collection":"workbookphotointakes","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-photo-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_photo_intakes","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookPhotoIntake","exportName":"WorkbookPhotoIntakeCollection","collectionExportName":"WorkbookPhotoIntakeCollectionCollection","schema":{"tableName":"workbook_photo_intakes","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_photo_intakes\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"family_intake_id\\" UUID,\\n \\"item_id\\" TEXT,\\n \\"actor_user_id\\" TEXT,\\n \\"content_digest\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"family_intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"family_intakes","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"item_id":{"type":"TEXT","notNull":false,"unique":false},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"content_digest":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_photo_intakes_tenant_id_item_id_idx","columns":["tenant_id","item_id"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_photo_intakes_slug_context_idx","columns":["slug","context"]},{"name":"workbook_photo_intakes_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_photo_intakes_learner_id_idx","columns":["learner_id"]},{"name":"workbook_photo_intakes_family_intake_id_idx","columns":["family_intake_id"]}],"version":"288020f4"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookPhotoAsset":{"name":"workbookphotoasset","className":"WorkbookPhotoAsset","qualifiedName":"@happyvertical/smrt-education:WorkbookPhotoAsset","collection":"workbookphotoassets","description":"Sole owner join for original photo intake files.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-photo-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"intakeId":{"type":"foreignKey","required":true,"related":"WorkbookPhotoIntake","_meta":{"required":true}},"assetId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-assets:Asset"},"name":{"type":"text","required":false},"mimeType":{"type":"text","required":false},"sha256":{"type":"text","required":false},"position":{"type":"integer","required":true,"default":0}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_photo_assets","conflictColumns":["tenant_id","intake_id","asset_id"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookPhotoAsset","collectionExportName":"WorkbookPhotoAssetCollection","displayLabelField":"name","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"intakeId","rule":"required","fieldType":"foreignKey"},{"field":"position","rule":"required","fieldType":"integer"}],"schema":{"tableName":"workbook_photo_assets","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_photo_assets\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"intake_id\\" UUID NOT NULL,\\n \\"asset_id\\" UUID,\\n \\"name\\" TEXT,\\n \\"mime_type\\" TEXT,\\n \\"sha256\\" TEXT,\\n \\"position\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_photo_intakes","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"name":{"type":"TEXT","notNull":false,"unique":false},"mime_type":{"type":"TEXT","notNull":false,"unique":false},"sha256":{"type":"TEXT","notNull":false,"unique":false},"position":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"workbook_photo_assets_tenant_id_intake_id_idx","columns":["tenant_id","intake_id","asset_id"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_photo_assets_slug_context_idx","columns":["slug","context"]},{"name":"workbook_photo_assets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_photo_assets_learner_id_idx","columns":["learner_id"]},{"name":"workbook_photo_assets_intake_id_idx","columns":["intake_id"]},{"name":"workbook_photo_assets_asset_id_idx","columns":["asset_id"]}],"version":"9d49acb2"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookPhotoAssetCollection":{"name":"workbookphotoassetcollection","className":"WorkbookPhotoAssetCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookPhotoAssetCollection","collection":"workbookphotoassets","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-photo-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_photo_assets","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookPhotoAsset","exportName":"WorkbookPhotoAssetCollection","collectionExportName":"WorkbookPhotoAssetCollectionCollection","schema":{"tableName":"workbook_photo_assets","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_photo_assets\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"intake_id\\" UUID NOT NULL,\\n \\"asset_id\\" UUID,\\n \\"name\\" TEXT,\\n \\"mime_type\\" TEXT,\\n \\"sha256\\" TEXT,\\n \\"position\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_photo_intakes","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"name":{"type":"TEXT","notNull":false,"unique":false},"mime_type":{"type":"TEXT","notNull":false,"unique":false},"sha256":{"type":"TEXT","notNull":false,"unique":false},"position":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"workbook_photo_assets_tenant_id_intake_id_idx","columns":["tenant_id","intake_id","asset_id"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_photo_assets_slug_context_idx","columns":["slug","context"]},{"name":"workbook_photo_assets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_photo_assets_learner_id_idx","columns":["learner_id"]},{"name":"workbook_photo_assets_intake_id_idx","columns":["intake_id"]},{"name":"workbook_photo_assets_asset_id_idx","columns":["asset_id"]}],"version":"9d49acb2"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookPhotoDecision":{"name":"workbookphotodecision","className":"WorkbookPhotoDecision","qualifiedName":"@happyvertical/smrt-education:WorkbookPhotoDecision","collection":"workbookphotodecisions","description":"Immutable provider/guardian/capture decision, retaining provenance and retry key.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-photo-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"intakeId":{"type":"foreignKey","required":true,"related":"WorkbookPhotoIntake","_meta":{"required":true}},"requestKey":{"type":"text","required":false},"sequence":{"type":"integer","required":true,"default":0},"actorUserId":{"type":"text","required":false},"bodyJson":{"type":"text","required":false,"_meta":{}}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_photo_decisions","conflictColumns":["tenant_id","intake_id","request_key"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookPhotoDecision","collectionExportName":"WorkbookPhotoDecisionCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"intakeId","rule":"required","fieldType":"foreignKey"},{"field":"sequence","rule":"required","fieldType":"integer"}],"schema":{"tableName":"workbook_photo_decisions","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_photo_decisions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"intake_id\\" UUID NOT NULL,\\n \\"request_key\\" TEXT,\\n \\"sequence\\" INTEGER NOT NULL DEFAULT 0,\\n \\"actor_user_id\\" TEXT,\\n \\"body_json\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_photo_intakes","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":false,"unique":false},"sequence":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"body_json":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_photo_decisions_tenant_id_intake_id_idx","columns":["tenant_id","intake_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_photo_decisions_slug_context_idx","columns":["slug","context"]},{"name":"workbook_photo_decisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_photo_decisions_learner_id_idx","columns":["learner_id"]},{"name":"workbook_photo_decisions_intake_id_idx","columns":["intake_id"]}],"version":"4c8b4e5f"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookPhotoDecisionCollection":{"name":"workbookphotodecisioncollection","className":"WorkbookPhotoDecisionCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookPhotoDecisionCollection","collection":"workbookphotodecisions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-photo-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_photo_decisions","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookPhotoDecision","exportName":"WorkbookPhotoDecisionCollection","collectionExportName":"WorkbookPhotoDecisionCollectionCollection","schema":{"tableName":"workbook_photo_decisions","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_photo_decisions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"intake_id\\" UUID NOT NULL,\\n \\"request_key\\" TEXT,\\n \\"sequence\\" INTEGER NOT NULL DEFAULT 0,\\n \\"actor_user_id\\" TEXT,\\n \\"body_json\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"intake_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_photo_intakes","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":false,"unique":false},"sequence":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"actor_user_id":{"type":"TEXT","notNull":false,"unique":false},"body_json":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_photo_decisions_tenant_id_intake_id_idx","columns":["tenant_id","intake_id","request_key"],"unique":true,"nullsNotDistinct":true},{"name":"workbook_photo_decisions_slug_context_idx","columns":["slug","context"]},{"name":"workbook_photo_decisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_photo_decisions_learner_id_idx","columns":["learner_id"]},{"name":"workbook_photo_decisions_intake_id_idx","columns":["intake_id"]}],"version":"4c8b4e5f"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookContextRevision":{"name":"workbookcontextrevision","className":"WorkbookContextRevision","qualifiedName":"@happyvertical/smrt-education:WorkbookContextRevision","collection":"workbookcontextrevisions","description":"Versioned contextual metadata; never edits Workbook identity or learning evidence.","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-photo-models.ts","packageName":"@happyvertical/smrt-education","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"learnerId":{"type":"foreignKey","required":true,"related":"Learner","_meta":{"required":true}},"workbookId":{"type":"foreignKey","required":true,"related":"Workbook","_meta":{"required":true}},"decisionId":{"type":"foreignKey","required":true,"related":"WorkbookPhotoDecision","_meta":{"required":true}},"metadataJson":{"type":"text","required":false,"_meta":{}}},"methods":{"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true},"save":{"name":"save","async":true,"parameters":[{"name":"options","type":"SmrtSaveOptions","optional":true}],"returnType":"Promise<this>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"workbook_context_revisions","conflictColumns":["tenant_id","decision_id"],"api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"WorkbookContextRevision","collectionExportName":"WorkbookContextRevisionCollection","validationRules":[{"field":"learnerId","rule":"required","fieldType":"foreignKey"},{"field":"workbookId","rule":"required","fieldType":"foreignKey"},{"field":"decisionId","rule":"required","fieldType":"foreignKey"}],"schema":{"tableName":"workbook_context_revisions","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_context_revisions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"workbook_id\\" UUID NOT NULL,\\n \\"decision_id\\" UUID NOT NULL,\\n \\"metadata_json\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"workbook_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbooks","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"decision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_photo_decisions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"metadata_json":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_context_revisions_tenant_id_decision_id_idx","columns":["tenant_id","decision_id"],"unique":true},{"name":"workbook_context_revisions_slug_context_idx","columns":["slug","context"]},{"name":"workbook_context_revisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_context_revisions_learner_id_idx","columns":["learner_id"]},{"name":"workbook_context_revisions_workbook_id_idx","columns":["workbook_id"]},{"name":"workbook_context_revisions_decision_id_idx","columns":["decision_id"]}],"version":"b1e8b4dc"},"importPath":"@happyvertical/smrt-education"},"@happyvertical/smrt-education:WorkbookContextRevisionCollection":{"name":"workbookcontextrevisioncollection","className":"WorkbookContextRevisionCollection","qualifiedName":"@happyvertical/smrt-education:WorkbookContextRevisionCollection","collection":"workbookcontextrevisions","filePath":"/home/runner/work/smrt/smrt/packages/education/src/workbook-photo-models.ts","packageName":"@happyvertical/smrt-education","fields":{},"methods":{},"decoratorConfig":{"tableName":"workbook_context_revisions","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"WorkbookContextRevision","exportName":"WorkbookContextRevisionCollection","collectionExportName":"WorkbookContextRevisionCollectionCollection","schema":{"tableName":"workbook_context_revisions","ddl":"CREATE TABLE IF NOT EXISTS \\"workbook_context_revisions\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"learner_id\\" UUID NOT NULL,\\n \\"workbook_id\\" UUID NOT NULL,\\n \\"decision_id\\" UUID NOT NULL,\\n \\"metadata_json\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"learner_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"learners","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"workbook_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbooks","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"decision_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"workbook_photo_decisions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"metadata_json":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"workbook_context_revisions_tenant_id_decision_id_idx","columns":["tenant_id","decision_id"],"unique":true},{"name":"workbook_context_revisions_slug_context_idx","columns":["slug","context"]},{"name":"workbook_context_revisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"workbook_context_revisions_learner_id_idx","columns":["learner_id"]},{"name":"workbook_context_revisions_workbook_id_idx","columns":["workbook_id"]},{"name":"workbook_context_revisions_decision_id_idx","columns":["decision_id"]}],"version":"b1e8b4dc"},"importPath":"@happyvertical/smrt-education"}},"moduleType":"smrt","recipes":[{"id":"education.catalog","className":"EducationCatalogRecipe","label":"Course catalog","summary":"Organize courses, sections, lessons, and their authorized learning materials.","synonyms":["courses","lessons","curriculum catalog"],"models":["@happyvertical/smrt-education:Course","@happyvertical/smrt-education:CourseSection","@happyvertical/smrt-education:Lesson","@happyvertical/smrt-education:LessonAsset"],"nav":[{"label":"Courses","model":"@happyvertical/smrt-education:Course","icon":"folder","description":"Courses available to this family.","noun":"course"}],"requires":[],"section":{"id":"education","label":"Education","icon":"folder","description":"Courses and lessons for learning."},"help":{"markdown":"# Course catalog\\n\\nManage courses, their sections, and lessons. Private family copies and answer\\nkeys remain visible only through the application\u2019s authorized catalog service.\\n","fieldRefs":[]},"runtime":"both","demo":{"mode":"server","reasons":["Needs a server because its package depends on @happyvertical/smrt-agents, @happyvertical/smrt-jobs, @happyvertical/smrt-profiles, @happyvertical/smrt-reports, @happyvertical/smrt-secrets, @happyvertical/smrt-tenancy, @happyvertical/smrt-users, which do not build for a browser (#3615, #3617, #3624, #3625, #3626, #3627)."]}},{"id":"education.learner","className":"EducationLearnerRecipe","label":"Learners","summary":"Plan learner curricula and retain enrollment-scoped progress.","synonyms":["learners","enrollments","learning progress"],"models":["@happyvertical/smrt-education:Learner","@happyvertical/smrt-education:Curriculum","@happyvertical/smrt-education:Enrollment","@happyvertical/smrt-education:LessonProgress"],"nav":[{"label":"Learners","model":"@happyvertical/smrt-education:Learner","icon":"users","description":"Authorized learners in this family.","noun":"learner"}],"requires":[],"section":{"id":"education","label":"Education","icon":"folder","description":"Courses and lessons for learning."},"help":{"markdown":"# Learners\\n\\nUse \`LearnerService\` in an authenticated exact-tenant context to read a learner,\\nplan a curriculum as an authorized guardian, enroll in a visible course, and\\nstart a lesson. Recipe metadata does not expose model CRUD. Hosts authenticate\\nusers, provision family membership, and validate guardian ProfileRelationship\\ntypes and effective terms. See \`agents/learner-service.md\` for the boundary.\\n","fieldRefs":[]},"runtime":"both","demo":{"mode":"server","reasons":["Needs a server because its package depends on @happyvertical/smrt-agents, @happyvertical/smrt-jobs, @happyvertical/smrt-profiles, @happyvertical/smrt-reports, @happyvertical/smrt-secrets, @happyvertical/smrt-tenancy, @happyvertical/smrt-users, which do not build for a browser (#3615, #3617, #3624, #3625, #3626, #3627)."]}}],"smrtDependencies":["@happyvertical/smrt-assets","@happyvertical/smrt-core","@happyvertical/smrt-ingestion","@happyvertical/smrt-profiles","@happyvertical/smrt-tenancy","@happyvertical/smrt-users"],"browser":{"status":"server-only","issues":["#3615","#3617","#3624","#3625","#3626","#3627"],"via":["@happyvertical/smrt-agents","@happyvertical/smrt-jobs","@happyvertical/smrt-profiles","@happyvertical/smrt-reports","@happyvertical/smrt-secrets","@happyvertical/smrt-tenancy","@happyvertical/smrt-users"]},"stampsConstructors":true}`));
6
6
  //#endregion
7
7
  //#region src/catalog-capability.ts
8
8
  var CATALOG_REPRESENTATION_MEDIA_TYPES = {
@@ -406,21 +406,21 @@ var CatalogPreviewService = class {
406
406
  };
407
407
  //#endregion
408
408
  //#region src/catalog-models.ts
409
- var __defProp$1 = Object.defineProperty;
410
- var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
411
- var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, {
409
+ var __defProp$2 = Object.defineProperty;
410
+ var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
411
+ var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, {
412
412
  enumerable: true,
413
413
  configurable: true,
414
414
  writable: true,
415
415
  value
416
416
  }) : obj[key] = value;
417
- var __decorateClass$1 = (decorators, target, key, kind) => {
418
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target;
417
+ var __decorateClass$2 = (decorators, target, key, kind) => {
418
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$2(target, key) : target;
419
419
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
420
- if (kind && result) __defProp$1(target, key, result);
420
+ if (kind && result) __defProp$2(target, key, result);
421
421
  return result;
422
422
  };
423
- var __publicField$1 = (obj, key, value) => __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
423
+ var __publicField$2 = (obj, key, value) => __defNormalProp$2(obj, typeof key !== "symbol" ? key + "" : key, value);
424
424
  var closed = {
425
425
  api: false,
426
426
  mcp: false,
@@ -431,10 +431,10 @@ var CatalogProvider = class extends SmrtObject {
431
431
  name = "";
432
432
  active = true;
433
433
  };
434
- __publicField$1(CatalogProvider, "__smrtPackage__", "@happyvertical/smrt-education");
435
- __decorateClass$1([field({ required: true })], CatalogProvider.prototype, "providerId", 2);
436
- __decorateClass$1([field({ required: true })], CatalogProvider.prototype, "name", 2);
437
- CatalogProvider = __decorateClass$1([smrt({ ...closed })], CatalogProvider);
434
+ __publicField$2(CatalogProvider, "__smrtPackage__", "@happyvertical/smrt-education");
435
+ __decorateClass$2([field({ required: true })], CatalogProvider.prototype, "providerId", 2);
436
+ __decorateClass$2([field({ required: true })], CatalogProvider.prototype, "name", 2);
437
+ CatalogProvider = __decorateClass$2([smrt({ ...closed })], CatalogProvider);
438
438
  var CatalogResource = class extends SmrtObject {
439
439
  providerId = "";
440
440
  stableId = "";
@@ -473,12 +473,12 @@ var CatalogResource = class extends SmrtObject {
473
473
  lastSeenRunId = "";
474
474
  withdrawnAt = "";
475
475
  };
476
- __publicField$1(CatalogResource, "__smrtPackage__", "@happyvertical/smrt-education");
477
- __decorateClass$1([field({ required: true })], CatalogResource.prototype, "providerId", 2);
478
- __decorateClass$1([field({ required: true })], CatalogResource.prototype, "stableId", 2);
479
- __decorateClass$1([field({ required: true })], CatalogResource.prototype, "revision", 2);
480
- __decorateClass$1([field({ required: true })], CatalogResource.prototype, "title", 2);
481
- CatalogResource = __decorateClass$1([smrt({ ...closed })], CatalogResource);
476
+ __publicField$2(CatalogResource, "__smrtPackage__", "@happyvertical/smrt-education");
477
+ __decorateClass$2([field({ required: true })], CatalogResource.prototype, "providerId", 2);
478
+ __decorateClass$2([field({ required: true })], CatalogResource.prototype, "stableId", 2);
479
+ __decorateClass$2([field({ required: true })], CatalogResource.prototype, "revision", 2);
480
+ __decorateClass$2([field({ required: true })], CatalogResource.prototype, "title", 2);
481
+ CatalogResource = __decorateClass$2([smrt({ ...closed })], CatalogResource);
482
482
  var CatalogSyncState = class extends SmrtObject {
483
483
  providerId = "";
484
484
  cursor = "";
@@ -491,21 +491,21 @@ var CatalogSyncState = class extends SmrtObject {
491
491
  failures = "[]";
492
492
  lastSuccessfulAt = "";
493
493
  };
494
- __publicField$1(CatalogSyncState, "__smrtPackage__", "@happyvertical/smrt-education");
495
- __decorateClass$1([field({ required: true })], CatalogSyncState.prototype, "providerId", 2);
496
- CatalogSyncState = __decorateClass$1([smrt({ ...closed })], CatalogSyncState);
494
+ __publicField$2(CatalogSyncState, "__smrtPackage__", "@happyvertical/smrt-education");
495
+ __decorateClass$2([field({ required: true })], CatalogSyncState.prototype, "providerId", 2);
496
+ CatalogSyncState = __decorateClass$2([smrt({ ...closed })], CatalogSyncState);
497
497
  var CatalogSelection = class extends SmrtObject {
498
498
  tenantId = "";
499
499
  resourceId = "";
500
500
  selectedByUserId = "";
501
501
  selectedRevision = "";
502
502
  };
503
- __publicField$1(CatalogSelection, "__smrtPackage__", "@happyvertical/smrt-education");
504
- __decorateClass$1([tenantId()], CatalogSelection.prototype, "tenantId", 2);
505
- __decorateClass$1([foreignKey("CatalogResource", { required: true })], CatalogSelection.prototype, "resourceId", 2);
506
- __decorateClass$1([field({ required: true })], CatalogSelection.prototype, "selectedByUserId", 2);
507
- __decorateClass$1([field({ required: true })], CatalogSelection.prototype, "selectedRevision", 2);
508
- CatalogSelection = __decorateClass$1([TenantScoped({ mode: "required" }), smrt({ ...closed })], CatalogSelection);
503
+ __publicField$2(CatalogSelection, "__smrtPackage__", "@happyvertical/smrt-education");
504
+ __decorateClass$2([tenantId()], CatalogSelection.prototype, "tenantId", 2);
505
+ __decorateClass$2([foreignKey("CatalogResource", { required: true })], CatalogSelection.prototype, "resourceId", 2);
506
+ __decorateClass$2([field({ required: true })], CatalogSelection.prototype, "selectedByUserId", 2);
507
+ __decorateClass$2([field({ required: true })], CatalogSelection.prototype, "selectedRevision", 2);
508
+ CatalogSelection = __decorateClass$2([TenantScoped({ mode: "required" }), smrt({ ...closed })], CatalogSelection);
509
509
  var CatalogAcquisition = class extends SmrtObject {
510
510
  tenantId = "";
511
511
  resourceId = "";
@@ -516,14 +516,14 @@ var CatalogAcquisition = class extends SmrtObject {
516
516
  attribution = "";
517
517
  notices = "";
518
518
  };
519
- __publicField$1(CatalogAcquisition, "__smrtPackage__", "@happyvertical/smrt-education");
520
- __decorateClass$1([tenantId()], CatalogAcquisition.prototype, "tenantId", 2);
521
- __decorateClass$1([foreignKey("CatalogResource", { required: true })], CatalogAcquisition.prototype, "resourceId", 2);
522
- __decorateClass$1([foreignKey("CatalogSelection", { required: true })], CatalogAcquisition.prototype, "selectionId", 2);
523
- __decorateClass$1([field({ required: true })], CatalogAcquisition.prototype, "revision", 2);
524
- __decorateClass$1([field({ required: true })], CatalogAcquisition.prototype, "format", 2);
525
- __decorateClass$1([field({ required: true })], CatalogAcquisition.prototype, "sha256", 2);
526
- CatalogAcquisition = __decorateClass$1([TenantScoped({ mode: "required" }), smrt({ ...closed })], CatalogAcquisition);
519
+ __publicField$2(CatalogAcquisition, "__smrtPackage__", "@happyvertical/smrt-education");
520
+ __decorateClass$2([tenantId()], CatalogAcquisition.prototype, "tenantId", 2);
521
+ __decorateClass$2([foreignKey("CatalogResource", { required: true })], CatalogAcquisition.prototype, "resourceId", 2);
522
+ __decorateClass$2([foreignKey("CatalogSelection", { required: true })], CatalogAcquisition.prototype, "selectionId", 2);
523
+ __decorateClass$2([field({ required: true })], CatalogAcquisition.prototype, "revision", 2);
524
+ __decorateClass$2([field({ required: true })], CatalogAcquisition.prototype, "format", 2);
525
+ __decorateClass$2([field({ required: true })], CatalogAcquisition.prototype, "sha256", 2);
526
+ CatalogAcquisition = __decorateClass$2([TenantScoped({ mode: "required" }), smrt({ ...closed })], CatalogAcquisition);
527
527
  //#endregion
528
528
  //#region src/catalog-collections.ts
529
529
  var CatalogProviderCollection = class extends SmrtCollection {
@@ -1075,21 +1075,21 @@ var CatalogSyncService = class {
1075
1075
  };
1076
1076
  //#endregion
1077
1077
  //#region src/course-source.ts
1078
- var __defProp = Object.defineProperty;
1079
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
1080
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
1078
+ var __defProp$1 = Object.defineProperty;
1079
+ var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
1080
+ var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, {
1081
1081
  enumerable: true,
1082
1082
  configurable: true,
1083
1083
  writable: true,
1084
1084
  value
1085
1085
  }) : obj[key] = value;
1086
- var __decorateClass = (decorators, target, key, kind) => {
1087
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
1086
+ var __decorateClass$1 = (decorators, target, key, kind) => {
1087
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target;
1088
1088
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
1089
- if (kind && result) __defProp(target, key, result);
1089
+ if (kind && result) __defProp$1(target, key, result);
1090
1090
  return result;
1091
1091
  };
1092
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
1092
+ var __publicField$1 = (obj, key, value) => __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
1093
1093
  var CourseSource = class extends SmrtObject {
1094
1094
  tenantId = "";
1095
1095
  key = "";
@@ -1133,11 +1133,11 @@ var CourseSource = class extends SmrtObject {
1133
1133
  return super.save(options);
1134
1134
  }
1135
1135
  };
1136
- __publicField(CourseSource, "__smrtPackage__", "@happyvertical/smrt-education");
1137
- __decorateClass([tenantId()], CourseSource.prototype, "tenantId", 2);
1138
- __decorateClass([field({ required: true })], CourseSource.prototype, "key", 2);
1139
- __decorateClass([field({ required: true })], CourseSource.prototype, "name", 2);
1140
- CourseSource = __decorateClass([TenantScoped({ mode: "required" }), smrt({
1136
+ __publicField$1(CourseSource, "__smrtPackage__", "@happyvertical/smrt-education");
1137
+ __decorateClass$1([tenantId()], CourseSource.prototype, "tenantId", 2);
1138
+ __decorateClass$1([field({ required: true })], CourseSource.prototype, "key", 2);
1139
+ __decorateClass$1([field({ required: true })], CourseSource.prototype, "name", 2);
1140
+ CourseSource = __decorateClass$1([TenantScoped({ mode: "required" }), smrt({
1141
1141
  api: false,
1142
1142
  cli: false,
1143
1143
  mcp: false
@@ -1146,6 +1146,89 @@ var CourseSourceCollection = class extends SmrtCollection {
1146
1146
  static _itemClass = CourseSource;
1147
1147
  };
1148
1148
  //#endregion
1149
+ //#region src/enrollment-notes.ts
1150
+ var __defProp = Object.defineProperty;
1151
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
1152
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
1153
+ enumerable: true,
1154
+ configurable: true,
1155
+ writable: true,
1156
+ value
1157
+ }) : obj[key] = value;
1158
+ var __decorateClass = (decorators, target, key, kind) => {
1159
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
1160
+ for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
1161
+ if (kind && result) __defProp(target, key, result);
1162
+ return result;
1163
+ };
1164
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
1165
+ var ENROLLMENT_NOTE_MAX_LENGTH = 4e3;
1166
+ function hasControlCharacters(value, allowWhitespace) {
1167
+ return Array.from(value).some((character) => {
1168
+ const code = character.charCodeAt(0);
1169
+ return (code < 32 || code === 127) && !(allowWhitespace && [
1170
+ 9,
1171
+ 10,
1172
+ 13
1173
+ ].includes(code));
1174
+ });
1175
+ }
1176
+ function validateEnrollmentNote(text, requestKey) {
1177
+ if (typeof text !== "string" || !text.trim() || text.length > 4e3 || hasControlCharacters(text, true)) throw new Error("Enrollment note requires bounded plain text");
1178
+ if (typeof requestKey !== "string" || !requestKey.trim() || requestKey.length > 200 || hasControlCharacters(requestKey, false)) throw new Error("Enrollment note requires a bounded request key");
1179
+ }
1180
+ var EnrollmentParentNote = class extends SmrtObject {
1181
+ tenantId = "";
1182
+ enrollmentId = "";
1183
+ learnerId = "";
1184
+ authorUserId = "";
1185
+ authorLabel = "Parent";
1186
+ text = "";
1187
+ requestKey = "";
1188
+ recordedAt = /* @__PURE__ */ new Date();
1189
+ constructor(options = {}) {
1190
+ super(options);
1191
+ for (const [key, value] of Object.entries(options)) if (Object.hasOwn(this, key)) this[key] = value;
1192
+ }
1193
+ async delete() {
1194
+ throw new Error("Enrollment parent notes are immutable");
1195
+ }
1196
+ async save(options) {
1197
+ if (this.id && await this.db.get(this.tableName, { id: this.id })) throw new Error("Enrollment parent notes are immutable");
1198
+ validateEnrollmentNote(this.text, this.requestKey);
1199
+ if (!this.tenantId || !this.authorUserId || typeof this.authorLabel !== "string" || !this.authorLabel.trim() || this.authorLabel.length > 200 || !(this.recordedAt instanceof Date) || !Number.isFinite(this.recordedAt.getTime()) || !await this.db.get("enrollments", {
1200
+ id: this.enrollmentId,
1201
+ learner_id: this.learnerId,
1202
+ tenant_id: this.tenantId
1203
+ }) || !await this.db.get("memberships", {
1204
+ user_id: this.authorUserId,
1205
+ tenant_id: this.tenantId,
1206
+ status: "active"
1207
+ })) throw new Error("Enrollment note ownership mismatch");
1208
+ this.requireInsertOnSave();
1209
+ return super.save(options);
1210
+ }
1211
+ };
1212
+ __publicField(EnrollmentParentNote, "__smrtPackage__", "@happyvertical/smrt-education");
1213
+ __decorateClass([tenantId()], EnrollmentParentNote.prototype, "tenantId", 2);
1214
+ __decorateClass([foreignKey("Enrollment", { required: true })], EnrollmentParentNote.prototype, "enrollmentId", 2);
1215
+ __decorateClass([foreignKey("Learner", { required: true })], EnrollmentParentNote.prototype, "learnerId", 2);
1216
+ __decorateClass([crossPackageRef("@happyvertical/smrt-users:User", { required: true })], EnrollmentParentNote.prototype, "authorUserId", 2);
1217
+ EnrollmentParentNote = __decorateClass([TenantScoped({ mode: "required" }), smrt({
1218
+ api: false,
1219
+ mcp: false,
1220
+ cli: false,
1221
+ tableName: "enrollment_parent_notes",
1222
+ conflictColumns: [
1223
+ "tenant_id",
1224
+ "enrollment_id",
1225
+ "request_key"
1226
+ ]
1227
+ })], EnrollmentParentNote);
1228
+ var EnrollmentParentNoteCollection = class extends SmrtCollection {
1229
+ static _itemClass = EnrollmentParentNote;
1230
+ };
1231
+ //#endregion
1149
1232
  //#region src/sources/illustrative-mathematics-parser.ts
1150
1233
  var host = "im.kendallhunt.com";
1151
1234
  function text(value) {
@@ -1719,6 +1802,170 @@ async function importEasyPeasyGrade4Theme(service, request) {
1719
1802
  };
1720
1803
  }
1721
1804
  //#endregion
1805
+ //#region src/enrollment-note-service.ts
1806
+ function noteView(row) {
1807
+ return {
1808
+ id: String(row.id),
1809
+ enrollmentId: row.enrollmentId,
1810
+ learnerId: row.learnerId,
1811
+ text: row.text,
1812
+ authorUserId: row.authorUserId,
1813
+ authorLabel: row.authorLabel,
1814
+ createdAt: new Date(row.recordedAt)
1815
+ };
1816
+ }
1817
+ var EnrollmentNoteService = class EnrollmentNoteService extends LearnerService {
1818
+ createTransactionService(db) {
1819
+ return new EnrollmentNoteService(db, this.authorize, this.authorizeCatalog);
1820
+ }
1821
+ async listEnrollmentNotes(request) {
1822
+ await this.requireEnrollment(request, "education.learner.notes.read");
1823
+ return (await (await EnrollmentParentNoteCollection.create({ db: this.db })).list({ where: {
1824
+ tenantId: request.tenantId,
1825
+ enrollmentId: request.enrollmentId,
1826
+ learnerId: request.learnerId
1827
+ } })).map(noteView).sort((a, b) => {
1828
+ return a.createdAt.getTime() - b.createdAt.getTime() || a.id.localeCompare(b.id);
1829
+ });
1830
+ }
1831
+ async addEnrollmentNote(request) {
1832
+ return this.mutate(async (service) => {
1833
+ const enrollment = await service.requireEnrollment(request, "education.learner.notes.add");
1834
+ validateEnrollmentNote(request.text, request.requestKey);
1835
+ await service.lock("enrollments", request.enrollmentId, request.tenantId);
1836
+ const notes = await EnrollmentParentNoteCollection.create({ db: service.db });
1837
+ const existing = await notes.get({
1838
+ tenantId: request.tenantId,
1839
+ enrollmentId: String(enrollment.id),
1840
+ requestKey: request.requestKey
1841
+ }, { cache: false });
1842
+ if (existing) {
1843
+ if (existing.learnerId !== enrollment.learnerId || existing.text !== request.text) throw new Error("Enrollment note retry changed its content");
1844
+ return noteView(existing);
1845
+ }
1846
+ const actor = await service.db.get("users", { id: request.actorUserId });
1847
+ const profile = actor?.profile_id ? await service.db.get("profiles", { id: actor.profile_id }) : null;
1848
+ const authorLabel = (typeof profile?.name === "string" ? profile.name.trim().slice(0, 200) : "") || "Parent";
1849
+ return noteView(await notes.create({
1850
+ tenantId: request.tenantId,
1851
+ enrollmentId: String(enrollment.id),
1852
+ learnerId: enrollment.learnerId,
1853
+ text: request.text,
1854
+ requestKey: request.requestKey,
1855
+ authorUserId: request.actorUserId,
1856
+ authorLabel,
1857
+ recordedAt: /* @__PURE__ */ new Date(),
1858
+ _insertOnly: true
1859
+ }));
1860
+ });
1861
+ }
1862
+ };
1863
+ //#endregion
1864
+ //#region src/learner-plan-service.ts
1865
+ function safeSourceUrl(value) {
1866
+ try {
1867
+ const url = new URL(value);
1868
+ return url.protocol === "https:" && !url.username && !url.password ? url.href : void 0;
1869
+ } catch {
1870
+ return;
1871
+ }
1872
+ }
1873
+ var LearnerPlanService = class LearnerPlanService extends EnrollmentNoteService {
1874
+ createTransactionService(db) {
1875
+ return new LearnerPlanService(db, this.authorize, this.authorizeCatalog);
1876
+ }
1877
+ async listPlan(request) {
1878
+ const learner = await this.requireActor(request, "education.learner.read");
1879
+ const enrollments = await (await EnrollmentCollection.create({ db: this.db })).list({
1880
+ where: {
1881
+ tenantId: request.tenantId,
1882
+ learnerId: String(learner.id)
1883
+ },
1884
+ orderBy: ["sortOrder ASC", "id ASC"]
1885
+ });
1886
+ return Promise.all(enrollments.map((row) => this.getEnrollmentPlan({
1887
+ ...request,
1888
+ enrollmentId: String(row.id)
1889
+ })));
1890
+ }
1891
+ async getEnrollmentPlan(request) {
1892
+ const row = await this.requireEnrollment(request, "education.learner.read");
1893
+ const enrollment = {
1894
+ id: String(row.id),
1895
+ learnerId: row.learnerId,
1896
+ curriculumId: row.curriculumId,
1897
+ courseId: row.courseId,
1898
+ status: row.status
1899
+ };
1900
+ const unavailable = {
1901
+ enrollment,
1902
+ availability: "unavailable",
1903
+ course: null,
1904
+ lessons: [],
1905
+ nextActionableLessonId: null,
1906
+ awaitingReviewLessonIds: [],
1907
+ progressEvidence: null
1908
+ };
1909
+ let catalog;
1910
+ try {
1911
+ catalog = await this.catalog(request, row.courseId);
1912
+ } catch (error) {
1913
+ if (error instanceof LearnerAuthorizationError || error instanceof CatalogAuthorizationError) return unavailable;
1914
+ throw error;
1915
+ }
1916
+ const progress = await (await LessonProgressCollection.create({ db: this.db })).list({ where: {
1917
+ tenantId: request.tenantId,
1918
+ learnerId: request.learnerId,
1919
+ enrollmentId: String(row.id)
1920
+ } });
1921
+ const byLesson = new Map(progress.map((value) => [value.lessonId, value]));
1922
+ const lessons = await Promise.all(catalog.sections.flatMap((section) => section.lessons.map(async ({ lesson }) => {
1923
+ const lessonId = String(lesson.id);
1924
+ const activity = await this.findWorkbookActivity(request, {
1925
+ enrollmentId: String(row.id),
1926
+ lessonId
1927
+ });
1928
+ const current = byLesson.get(lessonId);
1929
+ const requiresOnlineResource = catalog.course.modality === "online" || lesson.constructor.name === "Video";
1930
+ const sourceUrl = requiresOnlineResource ? safeSourceUrl(lesson.externalUrl) : void 0;
1931
+ return {
1932
+ lesson: {
1933
+ id: lessonId,
1934
+ title: lesson.title,
1935
+ kind: lesson.constructor.name,
1936
+ requiresOnlineResource,
1937
+ ...sourceUrl ? { sourceUrl } : {},
1938
+ ...activity?.id ? { workbookActivityId: String(activity.id) } : {}
1939
+ },
1940
+ progress: current ? await this.projectProgress(request, current) : null
1941
+ };
1942
+ })));
1943
+ let evidence = null;
1944
+ for (const { lesson, progress: current } of lessons) for (const [kind, at] of [["started", current?.startedAt], ["completed", current?.completedAt]]) if (at instanceof Date && Number.isFinite(at.getTime()) && (!evidence || at.getTime() > evidence.at.getTime())) evidence = {
1945
+ kind,
1946
+ at: new Date(at),
1947
+ lessonId: lesson.id
1948
+ };
1949
+ const actionable = ["active", "planned"].includes(row.status) ? lessons.find((value) => (!value.lesson.requiresOnlineResource || Boolean(value.lesson.sourceUrl)) && (!value.progress || ["not_started", "in_progress"].includes(value.progress.status))) : void 0;
1950
+ return {
1951
+ enrollment,
1952
+ availability: "available",
1953
+ course: {
1954
+ id: String(catalog.course.id),
1955
+ title: catalog.course.title,
1956
+ subject: catalog.course.subject,
1957
+ summary: catalog.course.summary,
1958
+ modality: catalog.course.modality,
1959
+ sourceKey: catalog.course.sourceKey
1960
+ },
1961
+ lessons,
1962
+ nextActionableLessonId: actionable?.lesson.id ?? null,
1963
+ awaitingReviewLessonIds: lessons.filter((value) => value.progress && ["submitted", "needs_review"].includes(value.progress.status)).map((value) => value.lesson.id),
1964
+ progressEvidence: evidence
1965
+ };
1966
+ }
1967
+ };
1968
+ //#endregion
1722
1969
  //#region src/recipes.ts
1723
1970
  var EducationCatalogRecipe = class extends SmrtRecipe {
1724
1971
  static id = "education.catalog";
@@ -3263,6 +3510,6 @@ Original first-edition ${format.toUpperCase()}; no changes made. License: ${IM_L
3263
3510
  };
3264
3511
  }
3265
3512
  //#endregion
3266
- export { Attestation, AttestationCollection, AuthoredCourse, AuthoredCourseCollection, CATALOG_PREVIEW_MAX_BYTES, CATALOG_PREVIEW_MAX_DIMENSION, CatalogAcquisition, CatalogAcquisitionCollection, CatalogAcquisitionService, CatalogAuthorizationError, CatalogDatabaseSyncStore, CatalogMaterializationService, CatalogPolicy, CatalogPreviewService, CatalogProvider, CatalogProviderCollection, CatalogReadService, CatalogRepresentationError, CatalogResource, CatalogResourceCollection, CatalogSelection, CatalogSelectionCollection, CatalogService, CatalogSyncService, CatalogSyncState, CatalogSyncStateCollection, Course, CourseCollection, CourseSection, CourseSectionCollection, CourseSource, CourseSourceCollection, Curriculum, CurriculumCollection, DRIVE_CURRICULUM_SEED_ROOTS, EducationCatalogRecipe, EducationLearnerRecipe, Enrollment, EnrollmentCollection, Exercise, ExerciseCollection, ExternalCompletion, ExternalCompletionCollection, ExternalCourse, ExternalCourseCollection, FamilyIntake, FamilyIntakeAsset, FamilyIntakeAssetCollection, FamilyIntakeCollection, FamilyIntakeDecision, FamilyIntakeDecisionCollection, GoogleDriveCurriculumAdapter, Grade, GradeCollection, Learner, LearnerAuthorizationError, LearnerCollection, LearnerService, Lesson, LessonAsset, LessonAssetCollection, LessonCollection, LessonProgress, LessonProgressCollection, Reading, ReadingCollection, ScannedSubmission, ScannedSubmissionCollection, SourceImportService, Submission, SubmissionAsset, SubmissionAssetCollection, SubmissionCollection, SubmissionIntakeBinding, SubmissionIntakeBindingCollection, SubmissionService, SubmissionStorageCleanupError, Video, VideoCollection, WORKBOOK_MATH_VOCABULARY, Workbook, WorkbookActivity, WorkbookActivityCollection, WorkbookAssessmentRevision, WorkbookAssessmentRevisionCollection, WorkbookAssessmentValidationError, WorkbookAttempt, WorkbookAttemptCollection, WorkbookCollection, WorkbookContextRevision, WorkbookContextRevisionCollection, WorkbookFeedbackDelivery, WorkbookFeedbackDeliveryCollection, WorkbookFeedbackRelease, WorkbookFeedbackReleaseCollection, WorkbookPhotoAsset, WorkbookPhotoAssetCollection, WorkbookPhotoDecision, WorkbookPhotoDecisionCollection, WorkbookPhotoIntake, WorkbookPhotoIntakeCollection, WorkbookPhotoService, WorkbookService, WorkbookWorkFiling, WorkbookWorkFilingCollection, WorkbookWorkflowRequiredError, Worksheet, WorksheetCollection, aggregateWorkbookQuestions, catalogPreviewFor, createCk12Adapter, createIllustrativeMathematicsAdapter, createOerCommonsAdapter, createOerCommonsRssAdapter, createPublicIllustrativeMathematicsFirstEditionAdapter, createPublicIllustrativeMathematicsK5Adapter, easyPeasyGrade4Courses, easyPeasyGrade4Themes, evaluateCatalogAcquisitionCapability, familyIntakeScopeId, grade4Courses, grade4Theme, importEasyPeasyGrade4Course, importEasyPeasyGrade4Theme, normalizeCatalogPreview, normalizeCatalogRepresentation, normalizeWorkbookAnswerRegions, normalizeWorkbookObservedLayout, parseEasyPeasyPage, parseIllustrativeMathematicsK5Index, parseOerCommonsRssFeed, providerFeedRequirements, validateEasyPeasyUrl, validateWorkbookAssessment, validateWorkbookPhotoIdentification, workbookAggregateFeedback };
3513
+ export { Attestation, AttestationCollection, AuthoredCourse, AuthoredCourseCollection, CATALOG_PREVIEW_MAX_BYTES, CATALOG_PREVIEW_MAX_DIMENSION, CatalogAcquisition, CatalogAcquisitionCollection, CatalogAcquisitionService, CatalogAuthorizationError, CatalogDatabaseSyncStore, CatalogMaterializationService, CatalogPolicy, CatalogPreviewService, CatalogProvider, CatalogProviderCollection, CatalogReadService, CatalogRepresentationError, CatalogResource, CatalogResourceCollection, CatalogSelection, CatalogSelectionCollection, CatalogService, CatalogSyncService, CatalogSyncState, CatalogSyncStateCollection, Course, CourseCollection, CourseSection, CourseSectionCollection, CourseSource, CourseSourceCollection, Curriculum, CurriculumCollection, DRIVE_CURRICULUM_SEED_ROOTS, ENROLLMENT_NOTE_MAX_LENGTH, EducationCatalogRecipe, EducationLearnerRecipe, Enrollment, EnrollmentCollection, EnrollmentParentNote, EnrollmentParentNoteCollection, Exercise, ExerciseCollection, ExternalCompletion, ExternalCompletionCollection, ExternalCourse, ExternalCourseCollection, FamilyIntake, FamilyIntakeAsset, FamilyIntakeAssetCollection, FamilyIntakeCollection, FamilyIntakeDecision, FamilyIntakeDecisionCollection, GoogleDriveCurriculumAdapter, Grade, GradeCollection, Learner, LearnerAuthorizationError, LearnerCollection, LearnerPlanService, LearnerService, Lesson, LessonAsset, LessonAssetCollection, LessonCollection, LessonProgress, LessonProgressCollection, Reading, ReadingCollection, ScannedSubmission, ScannedSubmissionCollection, SourceImportService, Submission, SubmissionAsset, SubmissionAssetCollection, SubmissionCollection, SubmissionIntakeBinding, SubmissionIntakeBindingCollection, SubmissionService, SubmissionStorageCleanupError, Video, VideoCollection, WORKBOOK_MATH_VOCABULARY, Workbook, WorkbookActivity, WorkbookActivityCollection, WorkbookAssessmentRevision, WorkbookAssessmentRevisionCollection, WorkbookAssessmentValidationError, WorkbookAttempt, WorkbookAttemptCollection, WorkbookCollection, WorkbookCompletionConflictError, WorkbookCompletionDecision, WorkbookCompletionDecisionCollection, WorkbookContextRevision, WorkbookContextRevisionCollection, WorkbookFeedbackDelivery, WorkbookFeedbackDeliveryCollection, WorkbookFeedbackRelease, WorkbookFeedbackReleaseCollection, WorkbookPhotoAsset, WorkbookPhotoAssetCollection, WorkbookPhotoDecision, WorkbookPhotoDecisionCollection, WorkbookPhotoIntake, WorkbookPhotoIntakeCollection, WorkbookPhotoService, WorkbookService, WorkbookWorkFiling, WorkbookWorkFilingCollection, WorkbookWorkflowRequiredError, Worksheet, WorksheetCollection, aggregateWorkbookQuestions, catalogPreviewFor, createCk12Adapter, createIllustrativeMathematicsAdapter, createOerCommonsAdapter, createOerCommonsRssAdapter, createPublicIllustrativeMathematicsFirstEditionAdapter, createPublicIllustrativeMathematicsK5Adapter, easyPeasyGrade4Courses, easyPeasyGrade4Themes, evaluateCatalogAcquisitionCapability, familyIntakeScopeId, grade4Courses, grade4Theme, importEasyPeasyGrade4Course, importEasyPeasyGrade4Theme, normalizeCatalogPreview, normalizeCatalogRepresentation, normalizeWorkbookAnswerRegions, normalizeWorkbookObservedLayout, parseEasyPeasyPage, parseIllustrativeMathematicsK5Index, parseOerCommonsRssFeed, providerFeedRequirements, validateEasyPeasyUrl, validateEnrollmentNote, validateWorkbookAssessment, validateWorkbookPhotoIdentification, workbookAggregateFeedback };
3267
3514
 
3268
3515
  //# sourceMappingURL=index.js.map