@happyvertical/smrt-education 0.0.0-stage → 0.56.2

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.
Files changed (41) hide show
  1. package/AGENTS.md +32 -0
  2. package/CLAUDE.md +1 -0
  3. package/LICENSE +7 -0
  4. package/README.md +139 -2
  5. package/agents/catalog-service.md +45 -0
  6. package/agents/learner-service.md +101 -0
  7. package/agents/source-import.md +63 -0
  8. package/agents/submission-service.md +122 -0
  9. package/dist/__smrt-register__.d.ts +2 -0
  10. package/dist/__smrt-register__.d.ts.map +1 -0
  11. package/dist/catalog-service.d.ts +50 -0
  12. package/dist/catalog-service.d.ts.map +1 -0
  13. package/dist/catalog.d.ts +72 -0
  14. package/dist/catalog.d.ts.map +1 -0
  15. package/dist/collections.d.ts +70 -0
  16. package/dist/collections.d.ts.map +1 -0
  17. package/dist/course-source.d.ts +25 -0
  18. package/dist/course-source.d.ts.map +1 -0
  19. package/dist/index.d.ts +24 -0
  20. package/dist/index.d.ts.map +1 -0
  21. package/dist/index.js +24733 -0
  22. package/dist/index.js.map +1 -0
  23. package/dist/learner-service.d.ts +95 -0
  24. package/dist/learner-service.d.ts.map +1 -0
  25. package/dist/learners.d.ts +58 -0
  26. package/dist/learners.d.ts.map +1 -0
  27. package/dist/lesson-assets.d.ts +12 -0
  28. package/dist/lesson-assets.d.ts.map +1 -0
  29. package/dist/manifest.json +9484 -0
  30. package/dist/recipes.d.ts +50 -0
  31. package/dist/recipes.d.ts.map +1 -0
  32. package/dist/smrt-knowledge.json +3600 -0
  33. package/dist/source-import-service.d.ts +50 -0
  34. package/dist/source-import-service.d.ts.map +1 -0
  35. package/dist/sources/easy-peasy-parser.d.ts +23 -0
  36. package/dist/sources/easy-peasy-parser.d.ts.map +1 -0
  37. package/dist/submission-service.d.ts +110 -0
  38. package/dist/submission-service.d.ts.map +1 -0
  39. package/dist/submissions.d.ts +70 -0
  40. package/dist/submissions.d.ts.map +1 -0
  41. package/package.json +64 -3
@@ -0,0 +1,50 @@
1
+ import type { DatabaseInterface } from '@happyvertical/sql';
2
+ import { type SourceSharing } from './course-source.js';
3
+ export interface SourceImportRequest {
4
+ tenantId: string;
5
+ actorUserId: string;
6
+ sourceId: string;
7
+ /** Host-stable identity, independent of the page's current URL. */
8
+ courseRef: string;
9
+ pageUrl: string;
10
+ destination: 'private' | 'group';
11
+ }
12
+ export interface SourceImportAuthorization {
13
+ action: 'education.source.import';
14
+ actorTenantId: string;
15
+ actorUserId: string;
16
+ sourceId: string;
17
+ sourceSharing: SourceSharing;
18
+ destination: 'private' | 'group';
19
+ licenseEvidence: string;
20
+ }
21
+ export type SourceImportAuthorizer = (request: SourceImportAuthorization) => boolean | Promise<boolean>;
22
+ export interface EasyPeasyRegistration {
23
+ /** Supplied by host configuration after its operator accepts the source terms. */
24
+ termsAccepted: true;
25
+ /** Must honor redirect:error and bound response size/time. Never fetch PDFs. */
26
+ fetchPage: (url: string, options: {
27
+ redirect: 'error';
28
+ }) => Promise<{
29
+ html: string;
30
+ url: string;
31
+ }>;
32
+ }
33
+ export interface SourceImportResult {
34
+ courseId: string;
35
+ lessonIds: string[];
36
+ /** Source-hosted packet link, returned without fetching or persisting its content. */
37
+ packetUrl?: string;
38
+ }
39
+ /** Opt-in, pointer-only import. Host authorization defines family/group roles. */
40
+ export declare class SourceImportService {
41
+ private readonly db;
42
+ private readonly authorize;
43
+ private easyPeasy?;
44
+ constructor(db: DatabaseInterface, authorize: SourceImportAuthorizer);
45
+ registerEasyPeasy(registration: EasyPeasyRegistration): void;
46
+ private actor;
47
+ private source;
48
+ importCourse(input: SourceImportRequest): Promise<SourceImportResult>;
49
+ }
50
+ //# sourceMappingURL=source-import-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source-import-service.d.ts","sourceRoot":"","sources":["../src/source-import-service.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAW5D,OAAO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,CAAkC;gBAEjC,EAAE,EAAE,iBAAiB,EACrB,SAAS,EAAE,sBAAsB;IAGpD,iBAAiB,CAAC,YAAY,EAAE,qBAAqB,GAAG,IAAI;IAc5D,OAAO,CAAC,KAAK;YAsBC,MAAM;IAwCd,YAAY,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,kBAAkB,CAAC;CA6J5E"}
@@ -0,0 +1,23 @@
1
+ /** A pointer-only representation of an Easy Peasy lesson. */
2
+ export interface ParsedSourceLesson {
3
+ day: number;
4
+ title: string;
5
+ externalRef: string;
6
+ externalUrl: string;
7
+ worksheet: boolean;
8
+ printableUrl?: string;
9
+ }
10
+ export interface ParsedSourceCourse {
11
+ title: string;
12
+ lessons: ParsedSourceLesson[];
13
+ packetUrl?: string;
14
+ }
15
+ /**
16
+ * Resolve and constrain source URLs before either fetching or retaining them.
17
+ * Easy Peasy links must remain HTTPS links to the source site; imported data
18
+ * must never become an open redirect or a pointer to a third-party PDF.
19
+ */
20
+ export declare function validateEasyPeasyUrl(value: string, baseUrl?: string): string;
21
+ /** Parse only the course title, day pointers, and source-hosted printable links. */
22
+ export declare function parseEasyPeasyPage(html: string, pageUrl: string): ParsedSourceCourse;
23
+ //# sourceMappingURL=easy-peasy-parser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"easy-peasy-parser.d.ts","sourceRoot":"","sources":["../../src/sources/easy-peasy-parser.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAOD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAY5E;AAiLD,oFAAoF;AACpF,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,GACd,kBAAkB,CA+CpB"}
@@ -0,0 +1,110 @@
1
+ import { type AssetRuntimeOptions } from '@happyvertical/smrt-assets';
2
+ import type { DatabaseInterface } from '@happyvertical/sql';
3
+ import type { CatalogAuthorizer } from './catalog-service.js';
4
+ import { type LearnerAuthorizer, type LearnerRequest, LearnerService } from './learner-service.js';
5
+ import type { Grade, Submission } from './submissions.js';
6
+ /** A single captured page. No model patches or pre-existing asset IDs are accepted. */
7
+ export interface SubmissionPage {
8
+ name: string;
9
+ mimeType: 'image/jpeg' | 'image/png' | 'image/webp' | 'application/pdf';
10
+ data: Buffer;
11
+ }
12
+ export interface SubmissionAssetClaim {
13
+ enrollmentId: string;
14
+ tenantId: string;
15
+ actorUserId: string;
16
+ learnerId: string;
17
+ submissionId: string;
18
+ assetId: string;
19
+ expiresAt: Date;
20
+ }
21
+ /** Server configuration; never populate this from request JSON. */
22
+ export interface SubmissionServiceOptions {
23
+ storage: AssetRuntimeOptions['storage'];
24
+ storeOptions?: AssetRuntimeOptions['storeOptions'];
25
+ /** Sign a short-lived route claim. Its serving endpoint must verify every claim. */
26
+ signAsset?: (claim: Readonly<SubmissionAssetClaim>) => Promise<string>;
27
+ }
28
+ export type SubmissionView = Readonly<{
29
+ id: string;
30
+ learnerId: string;
31
+ lessonId: string;
32
+ progressId: string;
33
+ status: Submission['status'];
34
+ submittedAt: Date;
35
+ notes: string;
36
+ pages: ReadonlyArray<{
37
+ assetId: string;
38
+ sortOrder: number;
39
+ }>;
40
+ grade: null | {
41
+ id: string;
42
+ graderKind: Grade['graderKind'];
43
+ score: number | null;
44
+ feedback: string;
45
+ };
46
+ }>;
47
+ type LessonRequest = LearnerRequest & {
48
+ enrollmentId: string;
49
+ lessonId: string;
50
+ };
51
+ type SubmissionRequest = LearnerRequest & {
52
+ enrollmentId: string;
53
+ submissionId: string;
54
+ };
55
+ /** Failure includes fresh asset identities only, for explicit storage reconciliation. */
56
+ export declare class SubmissionStorageCleanupError extends Error {
57
+ readonly assetIds: readonly string[];
58
+ constructor(assetIds: readonly string[], cause: unknown);
59
+ }
60
+ /** Actor-bound capture, private packets, and authoritative guardian review. */
61
+ export declare class SubmissionService extends LearnerService {
62
+ private readonly options;
63
+ private resources;
64
+ private runtime;
65
+ constructor(db: DatabaseInterface, authorize: LearnerAuthorizer, authorizeCatalog: CatalogAuthorizer, options: SubmissionServiceOptions);
66
+ protected createTransactionService(db: DatabaseInterface): this;
67
+ protected rollbackResources(cause: unknown, rootDb: DatabaseInterface): Promise<void>;
68
+ private assets;
69
+ private storePage;
70
+ private validatePages;
71
+ private progress;
72
+ private requireSubmission;
73
+ private view;
74
+ captureSubmission(request: LessonRequest & {
75
+ requestKey: string;
76
+ pages: readonly SubmissionPage[];
77
+ notes?: string;
78
+ }): Promise<SubmissionView>;
79
+ getSubmission(request: SubmissionRequest): Promise<SubmissionView>;
80
+ private grade;
81
+ reviewSubmission(request: SubmissionRequest & {
82
+ score?: number | null;
83
+ feedback?: string;
84
+ }): Promise<SubmissionView>;
85
+ attestLesson(request: LessonRequest & {
86
+ score?: number | null;
87
+ feedback?: string;
88
+ }): Promise<SubmissionView>;
89
+ signSubmissionAsset(request: SubmissionRequest & {
90
+ assetId: string;
91
+ }): Promise<{
92
+ url: string;
93
+ expiresAt: Date;
94
+ }>;
95
+ /** Extract inclusive one-based, disjoint ranges into private worksheet PDFs. */
96
+ splitWorksheetPacket(request: LearnerRequest & {
97
+ courseId: string;
98
+ data: Buffer;
99
+ ranges: readonly {
100
+ lessonId: string;
101
+ firstPage: number;
102
+ lastPage: number;
103
+ }[];
104
+ }): Promise<ReadonlyArray<{
105
+ lessonId: string;
106
+ assetId: string;
107
+ }>>;
108
+ }
109
+ export {};
110
+ //# sourceMappingURL=submission-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"submission-service.d.ts","sourceRoot":"","sources":["../src/submission-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,mBAAmB,EAGzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAU9D,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,cAAc,EACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE1D,uFAAuF;AACvF,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,YAAY,GAAG,WAAW,GAAG,YAAY,GAAG,iBAAiB,CAAC;IACxE,IAAI,EAAE,MAAM,CAAC;CACd;AACD,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB;AACD,mEAAmE;AACnE,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;IACxC,YAAY,CAAC,EAAE,mBAAmB,CAAC,cAAc,CAAC,CAAC;IACnD,oFAAoF;IACpF,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,oBAAoB,CAAC,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CACxE;AACD,MAAM,MAAM,cAAc,GAAG,QAAQ,C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AE,MAAM,CAAC;SAClB,EAAE,CAAC;KACL,GACA,OAAO,CAAC,aAAa,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CA4FjE"}
@@ -0,0 +1,70 @@
1
+ import { SmrtObject } from '@happyvertical/smrt-core';
2
+ export type SubmissionStatus = 'captured' | 'extracting' | 'needs_review' | 'graded' | 'rejected';
3
+ export type ExternalCompletionReporter = 'learner' | 'guardian' | 'source';
4
+ export type SubmissionAssetRelationship = 'page' | 'attachment';
5
+ export type GraderKind = 'auto' | 'ai' | 'guardian' | 'instructor';
6
+ /** Evidence that a learner completed one progress item. */
7
+ export declare class Submission extends SmrtObject {
8
+ tenantId: string;
9
+ learnerId: string;
10
+ lessonId: string;
11
+ progressId: string;
12
+ submittedAt: Date;
13
+ status: SubmissionStatus;
14
+ notes: string;
15
+ /** Service-owned idempotency key for one capture request on this progress. */
16
+ captureKey: string;
17
+ /** Service-owned content digest used to detect changed retry payloads. */
18
+ captureDigest: string;
19
+ constructor(options?: Record<string, unknown>);
20
+ save(): Promise<this>;
21
+ }
22
+ /** Photos or scans of work submitted for review. */
23
+ export declare class ScannedSubmission extends Submission {
24
+ pageCount: number;
25
+ ocrText: string;
26
+ extracted: string;
27
+ constructor(options?: Record<string, unknown>);
28
+ getExtracted(): Record<string, unknown>;
29
+ setExtracted(value: Record<string, unknown>): void;
30
+ save(): Promise<this>;
31
+ }
32
+ /** Completion reported by the learner, guardian, or external source. */
33
+ export declare class ExternalCompletion extends Submission {
34
+ reportedBy: ExternalCompletionReporter;
35
+ evidenceUrl: string;
36
+ reportedScore: number;
37
+ constructor(options?: Record<string, unknown>);
38
+ save(): Promise<this>;
39
+ }
40
+ /** A guardian's statement that work was completed. */
41
+ export declare class Attestation extends Submission {
42
+ }
43
+ /** The tenant-owned files attached to a submission. */
44
+ export declare class SubmissionAsset extends SmrtObject {
45
+ tenantId: string;
46
+ submissionId: string;
47
+ assetId: string;
48
+ relationship: SubmissionAssetRelationship;
49
+ sortOrder: number;
50
+ constructor(options?: Record<string, unknown>);
51
+ save(): Promise<this>;
52
+ }
53
+ /** An assessment of a submission; the service selects the authoritative grade. */
54
+ export declare class Grade extends SmrtObject {
55
+ tenantId: string;
56
+ submissionId: string;
57
+ graderKind: GraderKind;
58
+ graderProfileId: string | null;
59
+ score: number | null;
60
+ pointsEarned: number | null;
61
+ pointsPossible: number | null;
62
+ rubricResults: string;
63
+ feedback: string;
64
+ gradedAt: Date;
65
+ constructor(options?: Record<string, unknown>);
66
+ getRubricResults(): Record<string, unknown>;
67
+ setRubricResults(value: Record<string, unknown>): void;
68
+ save(): Promise<this>;
69
+ }
70
+ //# sourceMappingURL=submissions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"submissions.d.ts","sourceRoot":"","sources":["../src/submissions.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,UAAU,EAEX,MAAM,0BAA0B,CAAC;AAiElC,MAAM,MAAM,gBAAgB,GACxB,UAAU,GACV,YAAY,GACZ,cAAc,GACd,QAAQ,GACR,UAAU,CAAC;AACf,MAAM,MAAM,0BAA0B,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAC;AAC3E,MAAM,MAAM,2BAA2B,GAAG,MAAM,GAAG,YAAY,CAAC;AAChE,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,IAAI,GAAG,UAAU,GAAG,YAAY,CAAC;AAEnE,2DAA2D;AAC3D,qBAEa,UAAW,SAAQ,UAAU;IAC5B,QAAQ,SAAM;IACiB,SAAS,SAAM;IAChB,QAAQ,SAAM;IACN,UAAU,SAAM;IAClE,WAAW,OAAc;IACzB,MAAM,EAAE,gBAAgB,CAAc;IACtC,KAAK,SAAM;IACX,8EAA8E;IAC9E,UAAU,SAAM;IAChB,0EAA0E;IAC1E,aAAa,SAAM;gBAEP,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM;IAKlC,IAAI,IAAI,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ACd,QAAQ,OAAc;gBAEV,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM;IAKjD,gBAAgB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAI3C,gBAAgB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAIvC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CA0BrC"}
package/package.json CHANGED
@@ -1,6 +1,67 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-education",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.56.2",
4
+ "smrtJsdoc": "strict",
5
+ "description": "Tenant-aware learning catalog models and authorized catalog access for SMRT",
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "files": [
10
+ "dist",
11
+ "CLAUDE.md",
12
+ "AGENTS.md",
13
+ "agents"
14
+ ],
15
+ "exports": {
16
+ ".": {
17
+ "types": "./dist/index.d.ts",
18
+ "import": "./dist/index.js"
19
+ },
20
+ "./manifest": "./dist/manifest.json",
21
+ "./manifest.json": "./dist/manifest.json"
22
+ },
23
+ "dependencies": {
24
+ "@happyvertical/smrt-assets": "0.56.2",
25
+ "@happyvertical/smrt-core": "0.56.2",
26
+ "@happyvertical/smrt-profiles": "0.56.2",
27
+ "@happyvertical/smrt-tenancy": "0.56.2",
28
+ "@happyvertical/smrt-users": "0.56.2",
29
+ "@happyvertical/sql": "^0.103.7",
30
+ "pdf-lib": "1.17.1"
31
+ },
32
+ "devDependencies": {
33
+ "@happyvertical/smrt-vitest": "0.56.2",
34
+ "@types/node": "24.13.6",
35
+ "typescript": "6.0.3",
36
+ "vite": "8.1.4",
37
+ "vitest": "4.1.10"
38
+ },
39
+ "keywords": [
40
+ "smrt",
41
+ "education",
42
+ "courses",
43
+ "catalog"
44
+ ],
45
+ "author": "HappyVertical",
46
+ "license": "MIT",
47
+ "publishConfig": {
48
+ "registry": "https://registry.npmjs.org",
49
+ "access": "public"
50
+ },
51
+ "repository": {
52
+ "type": "git",
53
+ "url": "https://github.com/happyvertical/smrt.git",
54
+ "directory": "packages/education"
55
+ },
56
+ "scripts": {
57
+ "build": "vite build --mode library",
58
+ "build:watch": "vite build --mode library --watch",
59
+ "clean": "rm -rf dist",
60
+ "dev": "vite dev",
61
+ "test": "vitest run",
62
+ "test:postgres": "node ../../scripts/run-with-ci-postgres.mjs -- pnpm exec vitest run optional.test.ts",
63
+ "test:watch": "vitest",
64
+ "typecheck": "tsc --noEmit -p tsconfig.json",
65
+ "verify:pack": "node ../../scripts/verify-package-types-exports.js ."
66
+ }
6
67
  }