@digimakers/core 0.1.4 → 0.3.20
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/agents/code-formatter.d.ts +2 -0
- package/dist/agents/code-formatter.d.ts.map +1 -0
- package/dist/agents/code-formatter.js +23 -0
- package/dist/agents/code-formatter.js.map +1 -0
- package/dist/docling-cleaner/cleaner.py +34 -0
- package/dist/docling-cleaner/pyproject.toml +10 -0
- package/dist/docling-cleaner/uv.lock +2077 -0
- package/dist/index.d.ts +2 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -5
- package/dist/index.js.map +1 -1
- package/dist/parsing/docling-parser.d.ts +17 -0
- package/dist/parsing/docling-parser.d.ts.map +1 -0
- package/dist/parsing/docling-parser.js +109 -0
- package/dist/parsing/docling-parser.js.map +1 -0
- package/dist/parsing/docling-runners.d.ts +2 -0
- package/dist/parsing/docling-runners.d.ts.map +1 -0
- package/dist/parsing/docling-runners.js +85 -0
- package/dist/parsing/docling-runners.js.map +1 -0
- package/dist/parsing/docx-parser.d.ts +2 -2
- package/dist/parsing/docx-parser.d.ts.map +1 -1
- package/dist/parsing/docx-parser.js +130 -37
- package/dist/parsing/docx-parser.js.map +1 -1
- package/dist/parsing/footer-parser.d.ts +7 -0
- package/dist/parsing/footer-parser.d.ts.map +1 -0
- package/dist/parsing/footer-parser.js +49 -0
- package/dist/parsing/footer-parser.js.map +1 -0
- package/dist/parsing/index.d.ts +3 -0
- package/dist/parsing/index.d.ts.map +1 -1
- package/dist/parsing/index.js +2 -0
- package/dist/parsing/index.js.map +1 -1
- package/dist/parsing/normalise.d.ts +3 -0
- package/dist/parsing/normalise.d.ts.map +1 -0
- package/dist/parsing/normalise.js +52 -0
- package/dist/parsing/normalise.js.map +1 -0
- package/dist/parsing/post-processors.d.ts +6 -0
- package/dist/parsing/post-processors.d.ts.map +1 -0
- package/dist/parsing/post-processors.js +217 -0
- package/dist/parsing/post-processors.js.map +1 -0
- package/dist/parsing/prompts.d.ts +5 -0
- package/dist/parsing/prompts.d.ts.map +1 -0
- package/dist/parsing/prompts.js +24 -0
- package/dist/parsing/prompts.js.map +1 -0
- package/dist/pdf-generator.d.ts +18 -6
- package/dist/pdf-generator.d.ts.map +1 -1
- package/dist/pdf-generator.js +80 -70
- package/dist/pdf-generator.js.map +1 -1
- package/dist/sample-data.d.ts +2 -2
- package/dist/sample-data.d.ts.map +1 -1
- package/dist/sample-data.js +16 -10
- package/dist/sample-data.js.map +1 -1
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +1 -1
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/lesson.d.ts +404 -44
- package/dist/schemas/lesson.d.ts.map +1 -1
- package/dist/schemas/lesson.js +117 -34
- package/dist/schemas/lesson.js.map +1 -1
- package/package.json +6 -3
package/dist/schemas/lesson.js
CHANGED
|
@@ -1,17 +1,29 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { normaliseText } from '../parsing/normalise.js';
|
|
3
|
+
export const languageEnum = z.enum([
|
|
4
|
+
'none',
|
|
5
|
+
'scratch',
|
|
6
|
+
'small-basic',
|
|
7
|
+
'javascript or html or css',
|
|
8
|
+
'python',
|
|
9
|
+
'java',
|
|
10
|
+
'c',
|
|
11
|
+
]);
|
|
12
|
+
// NOTE: Fields with no describe() are assigned using rule-based logic.
|
|
13
|
+
// Reusable pieces that are apart of the standard lesson
|
|
14
|
+
export const ImageSlotSchema = z.object({
|
|
15
|
+
id: z.string(),
|
|
16
|
+
base64: z.string().optional(),
|
|
5
17
|
});
|
|
6
18
|
export const StepsWithCodeBlockSchema = z.object({
|
|
7
|
-
codeBlock: z.string().describe('The code block that students have to write to get started'),
|
|
8
|
-
codeBlockLanguage: z
|
|
9
|
-
.enum(['none', 'small-basic', 'javascript or html or css', 'python', 'java', 'c'])
|
|
10
|
-
.default('small-basic')
|
|
11
|
-
.describe('The programming language used in the code block. Detect from syntax, "none" if unsure'),
|
|
12
19
|
steps: z
|
|
13
20
|
.array(z.string())
|
|
14
|
-
.describe('The steps listed above the code block but below the "Add your code header
|
|
21
|
+
.describe('The steps listed above the code block but below the "Add your code" header text'),
|
|
22
|
+
codeBlock: z
|
|
23
|
+
.string()
|
|
24
|
+
.nullable()
|
|
25
|
+
.default(null)
|
|
26
|
+
.describe('The code block that students have to write to get started (white-space and new-lines preserved)'),
|
|
15
27
|
});
|
|
16
28
|
export const ChallengeSchema = z.object({
|
|
17
29
|
name: z
|
|
@@ -19,7 +31,11 @@ export const ChallengeSchema = z.object({
|
|
|
19
31
|
.describe('The name of the specific challenge, excluding the "- New Project" text'),
|
|
20
32
|
task: z
|
|
21
33
|
.string()
|
|
22
|
-
.describe('The task for the challenge, explained as a requirement or feature to add'),
|
|
34
|
+
.describe('The task for the challenge, explained as a requirement or feature to add, there could be a hint, if it is definitely not code but plain english, include it'),
|
|
35
|
+
hintCode: z
|
|
36
|
+
.string()
|
|
37
|
+
.nullable()
|
|
38
|
+
.describe('Code that gives a hint on how to complete the challenge (only code allowed, perserve whitespace and add line breaks)'),
|
|
23
39
|
});
|
|
24
40
|
export const NewProjectSchema = z.object({
|
|
25
41
|
name: z
|
|
@@ -29,7 +45,11 @@ export const NewProjectSchema = z.object({
|
|
|
29
45
|
.string()
|
|
30
46
|
.describe('The task for the new project, explained as a requirement or new feature to add'),
|
|
31
47
|
});
|
|
32
|
-
|
|
48
|
+
// Representation of any lesson that digimaker provides, dynamic fields that
|
|
49
|
+
// account for all possible variations of input.
|
|
50
|
+
// Programming text-based lessons
|
|
51
|
+
export const ProgrammingLessonSchema = z.object({
|
|
52
|
+
lessonType: z.literal('text-based (programming) lesson'),
|
|
33
53
|
topic: z
|
|
34
54
|
.string()
|
|
35
55
|
.describe('The main topic/category of the lesson (e.g., "Decisions", "Loops", "Variables")'),
|
|
@@ -38,40 +58,103 @@ export const ParsedLessonSchema = z.object({
|
|
|
38
58
|
.describe('The name of the project being built (e.g., "Crossy Road", "Space Invaders")'),
|
|
39
59
|
description: z
|
|
40
60
|
.string()
|
|
41
|
-
.describe('A brief description explaining the programming concept being taught')
|
|
61
|
+
.describe('A brief description explaining the programming concept being taught')
|
|
62
|
+
.transform((val) => {
|
|
63
|
+
return normaliseText(val) ?? val;
|
|
64
|
+
}),
|
|
42
65
|
projectExplainer: z.string().describe('Explanation of what will be built in this lesson'),
|
|
43
|
-
|
|
44
|
-
.
|
|
66
|
+
programmingLanguage: languageEnum
|
|
67
|
+
.default('none')
|
|
68
|
+
.describe('The programming language used in this lesson, figurable through code visible or wording'),
|
|
69
|
+
prefaceImageSlots: z
|
|
70
|
+
.array(ImageSlotSchema)
|
|
45
71
|
.nullable()
|
|
46
|
-
.
|
|
47
|
-
.describe('Reference to the main project image if present'),
|
|
72
|
+
.describe('Image slots for the preface, before the "Get Ready" section'),
|
|
48
73
|
getReadySection: z
|
|
49
74
|
.array(z.string())
|
|
50
75
|
.describe('List of setup steps to prepare for the project (adding sprites, backdrops, etc.)'),
|
|
51
|
-
addYourCodeSection: z
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
]),
|
|
76
|
+
addYourCodeSection: z
|
|
77
|
+
.array(StepsWithCodeBlockSchema)
|
|
78
|
+
.describe('Multiple steps with a code block directly following each, or some without a code block. If there is only one step provide it as an array with one item')
|
|
79
|
+
.nullable()
|
|
80
|
+
.describe('Section that guides students on adding the base code. Null only when it is a debugging lesson'),
|
|
57
81
|
tryItOutSection: z
|
|
58
82
|
.array(z.string())
|
|
59
83
|
.nullable()
|
|
60
|
-
.
|
|
61
|
-
.describe('Steps to test the project after coding'),
|
|
84
|
+
.describe('Steps to test the project after coding. Null only when it is a debugging lesson'),
|
|
62
85
|
challengeSection: z
|
|
63
86
|
.array(ChallengeSchema)
|
|
64
|
-
.describe('Challenge tasks for students to extend the project'),
|
|
65
|
-
newProject: NewProjectSchema.describe('Suggestion for a new project or extension activity'),
|
|
66
|
-
testYourself: z
|
|
67
|
-
.string()
|
|
68
87
|
.nullable()
|
|
69
|
-
.
|
|
70
|
-
|
|
71
|
-
|
|
88
|
+
.describe('Challenge tasks for students to extend the project. Null only when it is a debugging lesson'),
|
|
89
|
+
newProject: NewProjectSchema.nullable().describe('Suggestion for a new project or extension activity. Null only when it is a debugging lesson'),
|
|
90
|
+
testYourself: z.string().nullable(),
|
|
91
|
+
funFact: z.string().nullable().describe('An interesting fact related to the lesson topic'),
|
|
92
|
+
}); // LLM version of the same schema
|
|
93
|
+
const StandardLessonLLMSchema = ProgrammingLessonSchema.omit({
|
|
94
|
+
prefaceImageSlots: true,
|
|
95
|
+
testYourself: true,
|
|
96
|
+
});
|
|
97
|
+
// Scratch lessons
|
|
98
|
+
export const StepWithImageSchema = z.object({
|
|
99
|
+
step: z.string().describe('The instruction text for this step'),
|
|
100
|
+
imageSlot: ImageSlotSchema.nullable().default(null),
|
|
101
|
+
});
|
|
102
|
+
export const ScratchLessonSchema = ProgrammingLessonSchema.extend({
|
|
103
|
+
lessonType: z.literal('block-based (scratch) lesson'),
|
|
104
|
+
addYourCodeSection: z.array(StepWithImageSchema),
|
|
105
|
+
}); // LLM version of the same schema
|
|
106
|
+
const StepWithImageLLMSchema = StepWithImageSchema.omit({ imageSlot: true });
|
|
107
|
+
export const ScratchLessonLLMSchema = ScratchLessonSchema.extend({
|
|
108
|
+
addYourCodeSection: z.array(StepWithImageLLMSchema).describe('Step-by-step coding instructions'),
|
|
109
|
+
}).omit({
|
|
110
|
+
prefaceImageSlots: true,
|
|
111
|
+
});
|
|
112
|
+
// Dbugging lessons
|
|
113
|
+
export const DebugStepSchema = z.object({
|
|
114
|
+
linkToCode: z.url().describe('URL link to the static content'),
|
|
115
|
+
issue: z
|
|
72
116
|
.string()
|
|
73
|
-
.
|
|
74
|
-
|
|
75
|
-
|
|
117
|
+
.describe('The issue that must be fixed, preserve all original paragraph breaks and newlines'),
|
|
118
|
+
});
|
|
119
|
+
export const DebugLessonSchema = ProgrammingLessonSchema.extend({
|
|
120
|
+
lessonType: z.literal('debugging lesson'),
|
|
121
|
+
debugSection: z.array(DebugStepSchema).describe('Content found under the "Debug" headre'),
|
|
122
|
+
}).omit({
|
|
123
|
+
projectExplainer: true,
|
|
124
|
+
addYourCodeSection: true,
|
|
125
|
+
tryItOutSection: true,
|
|
126
|
+
challengeSection: true,
|
|
127
|
+
newProject: true,
|
|
128
|
+
testYourself: true,
|
|
129
|
+
funFact: true,
|
|
130
|
+
}); // LLM version of the same schema
|
|
131
|
+
export const DebugLessonLLMSchema = DebugLessonSchema.omit({
|
|
132
|
+
prefaceImageSlots: true,
|
|
76
133
|
});
|
|
134
|
+
export const LessonSchema = z.discriminatedUnion('lessonType', [
|
|
135
|
+
ProgrammingLessonSchema,
|
|
136
|
+
ScratchLessonSchema,
|
|
137
|
+
DebugLessonSchema,
|
|
138
|
+
]);
|
|
139
|
+
// The fields that the LLM will not be able to see at all, when generating
|
|
140
|
+
// These are populated with rule based logic
|
|
141
|
+
const StandardLessonLLMSchemaNoType = StandardLessonLLMSchema.omit({
|
|
142
|
+
lessonType: true,
|
|
143
|
+
}).describe('Use this for text-based programming lessons (Python, JS, Java, etc.) that follow a standard "Add your code" and "Challenge" flow.');
|
|
144
|
+
const ScratchLessonLLMSchemaNoType = ScratchLessonLLMSchema.omit({
|
|
145
|
+
lessonType: true,
|
|
146
|
+
}).describe('Use this ONLY for Scratch/block-based lessons where instructions are tied to visual steps rather than raw code blocks.');
|
|
147
|
+
const DebugLessonLLMSchemaNoType = DebugLessonLLMSchema.omit({
|
|
148
|
+
lessonType: true,
|
|
149
|
+
}).describe('Use this for debugging exercises where the goal is to fix an existing issues rather than building one from scratch.');
|
|
150
|
+
export const LessonLLMSchema = z.union([
|
|
151
|
+
StandardLessonLLMSchemaNoType,
|
|
152
|
+
ScratchLessonLLMSchemaNoType,
|
|
153
|
+
DebugLessonLLMSchemaNoType,
|
|
154
|
+
]);
|
|
155
|
+
export const LessonLLMSchemaWithoutLanguage = z.union([
|
|
156
|
+
StandardLessonLLMSchemaNoType.omit({ programmingLanguage: true }),
|
|
157
|
+
ScratchLessonLLMSchemaNoType.omit({ programmingLanguage: true }),
|
|
158
|
+
DebugLessonLLMSchemaNoType.omit({ programmingLanguage: true }),
|
|
159
|
+
]);
|
|
77
160
|
//# sourceMappingURL=lesson.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lesson.js","sourceRoot":"","sources":["../../src/schemas/lesson.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"lesson.js","sourceRoot":"","sources":["../../src/schemas/lesson.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAsB,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE5E,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,IAAI,CAAC;IACjC,MAAM;IACN,SAAS;IACT,aAAa;IACb,2BAA2B;IAC3B,QAAQ;IACR,MAAM;IACN,GAAG;CACJ,CAAC,CAAC;AAEH,uEAAuE;AAEvE,wDAAwD;AACxD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,KAAK,EAAE,CAAC;SACL,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;SACjB,QAAQ,CAAC,iFAAiF,CAAC;IAC9F,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,OAAO,CAAC,IAAI,CAAC;SACb,QAAQ,C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4
|
"description": "Core library for Digimaker - docx to PDF conversion",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -16,12 +16,13 @@
|
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
|
-
"build": "tsc",
|
|
19
|
+
"build": "tsc && node scripts/copy-docling.js",
|
|
20
20
|
"dev": "tsc --watch",
|
|
21
21
|
"clean": "rm -rf dist"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@ai-sdk/google": "^3.0.10",
|
|
25
|
+
"@digimakers/docling-cleaner": "^1.2.20",
|
|
25
26
|
"ai": "6.0.39",
|
|
26
27
|
"dotenv": "^17.2.3",
|
|
27
28
|
"express": "5.2.1",
|
|
@@ -29,6 +30,7 @@
|
|
|
29
30
|
"pino": "^10.2.0",
|
|
30
31
|
"pino-pretty": "^13.1.3",
|
|
31
32
|
"puppeteer": "24.35.0",
|
|
33
|
+
"word-extractor": "^1.0.4",
|
|
32
34
|
"zod": "4.3.5"
|
|
33
35
|
},
|
|
34
36
|
"devDependencies": {
|
|
@@ -37,7 +39,8 @@
|
|
|
37
39
|
"typescript": "^5.5.0"
|
|
38
40
|
},
|
|
39
41
|
"files": [
|
|
40
|
-
"dist/**/*"
|
|
42
|
+
"dist/**/*",
|
|
43
|
+
"dist/docling-cleaner/**/*"
|
|
41
44
|
],
|
|
42
45
|
"license": "MIT",
|
|
43
46
|
"repository": {
|