@learnpack/learnpack 5.0.363 → 5.0.365

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.
@@ -1,84 +1,87 @@
1
- export interface SyncNotification {
2
- id: string; // UUID unique identifier
3
- sourceLanguage: string; // Language code from which sync will occur
4
- createdAt: number; // Creation timestamp
5
- updatedAt: number; // Last update timestamp
6
- status: "pending" | "processing" | "completed" | "partial" | "error";
7
- processingLastUpdate?: number; // Last update timestamp during processing
8
- error?: {
9
- message: string;
10
- code: string;
11
- timestamp: number;
12
- };
13
- syncProgress?: {
14
- totalLanguages: number;
15
- completedLanguages: string[]; // Array of completed language codes (no race conditions)
16
- currentLanguage?: string;
17
- failedLanguages?: Array<{
18
- code: string;
19
- error: string;
20
- }>;
21
- };
22
- }
23
-
24
- export interface Lesson {
25
- id: string;
26
- uid: string;
27
- title: string;
28
- type: "READ" | "CODE" | "QUIZ";
29
- description: string;
30
- duration?: number;
31
- generated?: boolean;
32
- status?: "PENDING" | "GENERATING" | "DONE" | "ERROR";
33
- initialContent?: string;
34
- translations?: {
35
- [key: string]: {
36
- completionId: number;
37
- startedAt: number;
38
- completedAt?: number;
39
- error?: boolean;
40
- // --- description fields (per language) ---
41
- // The step description is a projection derived from the README content;
42
- // it lives here (source of truth) and is projected into package-manifest.json.
43
- description?: string | null;
44
- descriptionStatus?: "generated" | "pending" | "error" | "none";
45
- sourceContentHash?: string; // SHA-256 of the normalized README it was generated from
46
- sourceSimHash?: string; // SimHash-64 (hex) used for the significance threshold
47
- descriptionPromptVersion?: number;
48
- descriptionSource?: "auto" | "human";
49
- };
50
- };
51
- syncNotifications?: SyncNotification[];
52
- }
53
-
54
- export interface ParsedLink {
55
- name: string;
56
- text: string;
57
- }
58
-
59
- export type TDifficulty = "easy" | "beginner" | "intermediate" | "hard";
60
-
61
- export type FormState = {
62
- description: string;
63
- duration: number;
64
- hasContentIndex: boolean;
65
- difficulty: TDifficulty;
66
- contentIndex: string;
67
- language?: string;
68
- technologies?: string[];
69
- isCompleted: boolean;
70
- variables: string[];
71
- currentStep: string;
72
- title: string;
73
- purpose: string;
74
- slug: string;
75
- };
76
-
77
- export type Syllabus = {
78
- lessons: Lesson[];
79
- courseInfo: FormState;
80
- feedback?: string;
81
- generationMode?: "next-three" | "continue-with-all";
82
- used_components?: { [componentName: string]: number };
83
- // sources: ParsedLink[]
84
- };
1
+ export interface SyncNotification {
2
+ id: string; // UUID unique identifier
3
+ sourceLanguage: string; // Language code from which sync will occur
4
+ createdAt: number; // Creation timestamp
5
+ updatedAt: number; // Last update timestamp
6
+ status: "pending" | "processing" | "completed" | "partial" | "error";
7
+ processingLastUpdate?: number; // Last update timestamp during processing
8
+ error?: {
9
+ message: string;
10
+ code: string;
11
+ timestamp: number;
12
+ };
13
+ syncProgress?: {
14
+ totalLanguages: number;
15
+ completedLanguages: string[]; // Array of completed language codes (no race conditions)
16
+ currentLanguage?: string;
17
+ failedLanguages?: Array<{
18
+ code: string;
19
+ error: string;
20
+ }>;
21
+ };
22
+ }
23
+
24
+ export interface Lesson {
25
+ id: string;
26
+ uid: string;
27
+ title: string;
28
+ type: "READ" | "CODE" | "QUIZ";
29
+ description: string;
30
+ duration?: number;
31
+ generated?: boolean;
32
+ status?: "PENDING" | "GENERATING" | "DONE" | "ERROR";
33
+ initialContent?: string;
34
+ translations?: {
35
+ [key: string]: {
36
+ completionId: number;
37
+ startedAt: number;
38
+ completedAt?: number;
39
+ error?: boolean;
40
+ // Automatic retries of the current generation phase, capped by
41
+ // MAX_AUTO_RETRIES in utils/generationRetry.ts.
42
+ autoRetries?: number;
43
+ // --- description fields (per language) ---
44
+ // The step description is a projection derived from the README content;
45
+ // it lives here (source of truth) and is projected into package-manifest.json.
46
+ description?: string | null;
47
+ descriptionStatus?: "generated" | "pending" | "error" | "none";
48
+ sourceContentHash?: string; // SHA-256 of the normalized README it was generated from
49
+ sourceSimHash?: string; // SimHash-64 (hex) used for the significance threshold
50
+ descriptionPromptVersion?: number;
51
+ descriptionSource?: "auto" | "human";
52
+ };
53
+ };
54
+ syncNotifications?: SyncNotification[];
55
+ }
56
+
57
+ export interface ParsedLink {
58
+ name: string;
59
+ text: string;
60
+ }
61
+
62
+ export type TDifficulty = "easy" | "beginner" | "intermediate" | "hard";
63
+
64
+ export type FormState = {
65
+ description: string;
66
+ duration: number;
67
+ hasContentIndex: boolean;
68
+ difficulty: TDifficulty;
69
+ contentIndex: string;
70
+ language?: string;
71
+ technologies?: string[];
72
+ isCompleted: boolean;
73
+ variables: string[];
74
+ currentStep: string;
75
+ title: string;
76
+ purpose: string;
77
+ slug: string;
78
+ };
79
+
80
+ export type Syllabus = {
81
+ lessons: Lesson[];
82
+ courseInfo: FormState;
83
+ feedback?: string;
84
+ generationMode?: "next-three" | "continue-with-all";
85
+ used_components?: { [componentName: string]: number };
86
+ // sources: ParsedLink[]
87
+ };