@happyvertical/smrt-education 0.57.52 → 0.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +12 -7
- package/README.md +36 -2
- package/agents/course-work-design.md +144 -0
- package/agents/group-sharing.md +5 -1
- package/agents/learner-plan.md +3 -3
- package/agents/learner-service.md +1 -1
- package/agents/lesson-materials.md +52 -0
- package/agents/{workbook-service.md → lesson-work-service.md} +164 -95
- package/agents/{workbook-test-matrix.md → lesson-work-test-matrix.md} +3 -3
- package/agents/photo-intake.md +37 -50
- package/agents/question-records.md +1 -1
- package/agents/submission-service.md +22 -6
- package/dist/catalog-service.d.ts +1 -1
- package/dist/catalog-service.d.ts.map +1 -1
- package/dist/catalog.d.ts +11 -0
- package/dist/catalog.d.ts.map +1 -1
- package/dist/chunks/{workbook-photo-service-BtMQsbhq.js → workbook-photo-service-COtyQL1y.js} +5927 -4963
- package/dist/chunks/workbook-photo-service-COtyQL1y.js.map +1 -0
- package/dist/course-authoring-contracts.d.ts +5 -1
- package/dist/course-authoring-contracts.d.ts.map +1 -1
- package/dist/course-authoring-service.d.ts.map +1 -1
- package/dist/course-work-migration.d.ts +27 -0
- package/dist/course-work-migration.d.ts.map +1 -0
- package/dist/group-sharing-contracts.d.ts +3 -3
- package/dist/group-sharing-contracts.d.ts.map +1 -1
- package/dist/group-sharing-policy.d.ts +4 -4
- package/dist/group-sharing-policy.d.ts.map +1 -1
- package/dist/group-sharing-reader.d.ts.map +1 -1
- package/dist/index.d.ts +13 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +351 -36
- package/dist/index.js.map +1 -1
- package/dist/ingestion.d.ts +12 -11
- package/dist/ingestion.d.ts.map +1 -1
- package/dist/ingestion.js +63 -56
- package/dist/ingestion.js.map +1 -1
- package/dist/learner-plan-service.d.ts +1 -1
- package/dist/learner-plan-service.d.ts.map +1 -1
- package/dist/learner-service.d.ts +19 -5
- package/dist/learner-service.d.ts.map +1 -1
- package/dist/lesson-assets.d.ts +66 -2
- package/dist/lesson-assets.d.ts.map +1 -1
- package/dist/lesson-pages.d.ts +36 -0
- package/dist/lesson-pages.d.ts.map +1 -0
- package/dist/{workbook-completion.d.ts → lesson-work-completion.d.ts} +10 -10
- package/dist/lesson-work-completion.d.ts.map +1 -0
- package/dist/{workbook-contracts.d.ts → lesson-work-contracts.d.ts} +100 -52
- package/dist/lesson-work-contracts.d.ts.map +1 -0
- package/dist/lesson-work-models.d.ts +118 -0
- package/dist/lesson-work-models.d.ts.map +1 -0
- package/dist/lesson-work-service.d.ts +239 -0
- package/dist/lesson-work-service.d.ts.map +1 -0
- package/dist/manifest.json +6504 -5419
- package/dist/smrt-knowledge.json +2147 -1744
- package/dist/submission-service.d.ts +135 -5
- package/dist/submission-service.d.ts.map +1 -1
- package/dist/submissions.d.ts +2 -0
- package/dist/submissions.d.ts.map +1 -1
- package/dist/work-answer-regions.d.ts +11 -0
- package/dist/work-answer-regions.d.ts.map +1 -0
- package/dist/work-layout.d.ts +13 -0
- package/dist/work-layout.d.ts.map +1 -0
- package/dist/workbook-photo-contracts.d.ts +9 -7
- package/dist/workbook-photo-contracts.d.ts.map +1 -1
- package/dist/workbook-photo-ingestion.d.ts +1 -1
- package/dist/workbook-photo-ingestion.d.ts.map +1 -1
- package/dist/workbook-photo-models.d.ts +5 -5
- package/dist/workbook-photo-models.d.ts.map +1 -1
- package/dist/workbook-photo-service.d.ts +13 -10
- package/dist/workbook-photo-service.d.ts.map +1 -1
- package/package.json +8 -8
- package/dist/chunks/workbook-photo-service-BtMQsbhq.js.map +0 -1
- package/dist/workbook-answer-regions.d.ts +0 -11
- package/dist/workbook-answer-regions.d.ts.map +0 -1
- package/dist/workbook-completion.d.ts.map +0 -1
- package/dist/workbook-contracts.d.ts.map +0 -1
- package/dist/workbook-layout.d.ts +0 -13
- package/dist/workbook-layout.d.ts.map +0 -1
- package/dist/workbook-models.d.ts +0 -129
- package/dist/workbook-models.d.ts.map +0 -1
- package/dist/workbook-service.d.ts +0 -163
- package/dist/workbook-service.d.ts.map +0 -1
|
@@ -16,6 +16,21 @@ PostgreSQL enrollment lock. No runtime schema creation occurs.
|
|
|
16
16
|
|
|
17
17
|
## Capture and grading
|
|
18
18
|
|
|
19
|
+
Every completed-work capture and correction is lesson work: the same transaction
|
|
20
|
+
records the learner's `LessonActivity` for the enrollment and lesson and one
|
|
21
|
+
immutable `WorkAttempt` bound to the submission (a correction continues its
|
|
22
|
+
predecessor's episode); see [lesson work](lesson-work-service.md#one-pipeline).
|
|
23
|
+
The lesson work tables are therefore required; a host without them gets
|
|
24
|
+
`LearnerHistoryUnavailableError`. Book and loose-page work is refused here with
|
|
25
|
+
`LessonWorkWorkflowRequiredError`; call `assertOrdinarySubmissionScope` before
|
|
26
|
+
creating a generic intake receipt.
|
|
27
|
+
|
|
28
|
+
Each page may carry a `pageKey` (1-200 printable characters, distinct within the
|
|
29
|
+
capture; default `p<position>`). Submission views list `pages` with their
|
|
30
|
+
`pageKey`; older rows read as `p<sortOrder+1>`. A correction (`resubmitSubmission`)
|
|
31
|
+
may carry only the pages it replaces; the attempt view folds the versions, while
|
|
32
|
+
each grade stays bound to the submission it was given on (#4613).
|
|
33
|
+
|
|
19
34
|
`captureSubmission` takes the learner request, `enrollmentId`, `lessonId`, a
|
|
20
35
|
nonempty stable `requestKey`, and `pages` containing `name`, `mimeType` and Buffer
|
|
21
36
|
`data`. Each upload becomes a fresh Asset owned by the learner's profile and
|
|
@@ -45,12 +60,13 @@ non-authoritative Grade until guardian review.
|
|
|
45
60
|
`reviewSubmission` accepts an existing authorized submission and optional score
|
|
46
61
|
and feedback. `attestLesson` creates/reuses an Attestation for a matching progress
|
|
47
62
|
item without requiring uploads. Both require a verified guardian and create a
|
|
48
|
-
new guardian Grade and set submission to `graded`.
|
|
49
|
-
becomes `complete
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
63
|
+
new guardian Grade and set submission to `graded`. On an ordinary lesson the
|
|
64
|
+
progress becomes `complete` and the grade on the current attempt is recorded as
|
|
65
|
+
that attempt's lesson work completion decision. Book and loose-page work (its
|
|
66
|
+
course has a book key, or it is unfiled photo work) instead uses its explicit
|
|
67
|
+
parent completion decision; grading alone leaves it in progress, including through
|
|
68
|
+
a plain SubmissionService instance. The authoritative activity and course decide
|
|
69
|
+
this, never a caller flag.
|
|
54
70
|
`attestOwnLesson({ enrollmentId, lessonId, policyBasis, notes? })` is the
|
|
55
71
|
learner's own "I read it" / "I watched it" for `SELF_ATTESTABLE_LESSON_KINDS`
|
|
56
72
|
(Reading, Video) under `education.learner.attest-own`. Any other actor is
|
|
@@ -2,7 +2,7 @@ import type { TenantCollection } from '@happyvertical/smrt-users';
|
|
|
2
2
|
import type { DatabaseInterface } from '@happyvertical/sql';
|
|
3
3
|
import type { Course, CourseSection, Lesson } from './catalog.js';
|
|
4
4
|
import type { CourseCollection, CourseSectionCollection, LessonAssetCollection, LessonCollection } from './collections.js';
|
|
5
|
-
import type
|
|
5
|
+
import { type LessonAsset } from './lesson-assets.js';
|
|
6
6
|
/** The application-owned decision that permits a catalog view for one tenant. */
|
|
7
7
|
export type TenantCatalogReadScope = TenantCollection['withTenantCatalogReadScope'];
|
|
8
8
|
export type CatalogActorContext = Parameters<Parameters<TenantCatalogReadScope>[0]['authorize']>[0];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog-service.d.ts","sourceRoot":"","sources":["../src/catalog-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,KAAK,EACV,gBAAgB,EAChB,uBAAuB,EACvB,qBAAqB,EACrB,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;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B;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,KAAK,CAAC;QACd,OAAO,EAAE,aAAa,CAAC;QACvB,OAAO,EAAE,KAAK,CAAC;YAAE,MAAM,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,WAAW,EAAE,CAAA;SAAE,CAAC,CAAC;KAC3D,CAAC,CAAC;CACJ;AAED,qBAAa,yBAA0B,SAAQ,KAAK;;CAKnD;AAUD;;;;GAIG;AACH,qBAAa,cAAc;IAEvB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAIxB,OAAO,CAAC,QAAQ,CAAC,SAAS;gBART,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EAAE,uBAAuB,EACjC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,qBAAqB,EAC7B,OAAO,EAAE,IAAI,CAC5B,gBAAgB,EAChB,4BAA4B,CAC7B,EACgB,SAAS,EAAE,iBAAiB;IAE/C,OAAO,CAAC,QAAQ;IAWhB,OAAO,CAAC,gBAAgB;IAKlB,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAuDjE,wFAAwF;IAClF,aAAa,CACjB,OAAO,EAAE,kBAAkB,GAAG;QAC5B,QAAQ,EAAE,MAAM,CAAC;QACjB,iBAAiB,CAAC,EAAE,OAAO,CAAC;KAC7B,GACA,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;CAqErC"}
|
package/dist/catalog.d.ts
CHANGED
|
@@ -23,6 +23,17 @@ export declare class Course extends SmrtObject {
|
|
|
23
23
|
estimatedMinutes: number;
|
|
24
24
|
modality: CourseModality;
|
|
25
25
|
status: CourseStatus;
|
|
26
|
+
/**
|
|
27
|
+
* Optional physical-book identity: '' means the course is not a book. A
|
|
28
|
+
* family holds at most one course per book key; the key never changes.
|
|
29
|
+
*/
|
|
30
|
+
bookKey: string;
|
|
31
|
+
/** Printed edition of the book; '' means unknown. */
|
|
32
|
+
bookEdition: string;
|
|
33
|
+
/** Course work policy: learners see AI marks only after a guardian release. */
|
|
34
|
+
workReviewRequired: boolean;
|
|
35
|
+
/** Compare-and-swap version of the work policy; captures snapshot it. */
|
|
36
|
+
workPolicyVersion: number;
|
|
26
37
|
constructor(options?: Record<string, unknown>);
|
|
27
38
|
/** A personal copy remains pinned to its original family and license. */
|
|
28
39
|
save(options?: SmrtSaveOptions): Promise<this>;
|
package/dist/catalog.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../src/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,UAAU,EACV,KAAK,eAAe,EAErB,MAAM,0BAA0B,CAAC;AAGlC,MAAM,MAAM,iBAAiB,GACzB,UAAU,GACV,cAAc,GACd,mBAAmB,GACnB,sBAAsB,CAAC;AAC3B,MAAM,MAAM,cAAc,GACtB,QAAQ,GACR,WAAW,GACX,KAAK,GACL,OAAO,GACP,MAAM,GACN,OAAO,CAAC;AACZ,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,WAAW,GAAG,UAAU,CAAC;AAC9D,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,CAAC;AAwB9E,qBAEa,MAAO,SAAQ,UAAU;IACN,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;IAClC,KAAK,SAAM;IACtC,OAAO,SAAM;IACb,WAAW,SAAM;IACjB,SAAS,SAAY;IACrB,SAAS,SAAM;IACf,SAAS,SAAM;IACf,OAAO,SAAM;IACb,WAAW,EAAE,iBAAiB,CAAc;IAC5C,WAAW,SAAM;IACjB,UAAU,SAAM;IAChB,OAAO,SAAM;IACb,IAAI,SAAM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