@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.
- package/lib/commands/serve.js +482 -286
- package/lib/models/creator.d.ts +1 -0
- package/lib/utils/continueGeneration.d.ts +65 -0
- package/lib/utils/continueGeneration.js +82 -0
- package/lib/utils/generationRetry.d.ts +48 -0
- package/lib/utils/generationRetry.js +81 -0
- package/lib/utils/interactivity/componentsGuide.d.ts +50 -0
- package/lib/utils/interactivity/componentsGuide.js +193 -0
- package/lib/utils/interactivity/interactivityPlan.d.ts +20 -0
- package/lib/utils/interactivity/interactivityPlan.js +33 -0
- package/lib/utils/interactivity/structuredComponents.d.ts +34 -0
- package/lib/utils/interactivity/structuredComponents.js +792 -0
- package/lib/utils/rigoActions.d.ts +5 -2
- package/lib/utils/rigoActions.js +5 -3
- package/package.json +1 -1
- package/src/commands/serve.ts +720 -408
- package/src/models/creator.ts +87 -84
- package/src/ui/_app/app.js +130 -72
- package/src/ui/app.tar.gz +0 -0
- package/src/utils/continueGeneration.ts +108 -0
- package/src/utils/generationRetry.ts +100 -0
- package/src/utils/interactivity/componentsGuide.ts +294 -0
- package/src/utils/interactivity/interactivityPlan.ts +57 -0
- package/src/utils/interactivity/structuredComponents.ts +1004 -0
- package/src/utils/rigoActions.ts +8 -3
package/src/models/creator.ts
CHANGED
|
@@ -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
|
-
//
|
|
41
|
-
//
|
|
42
|
-
|
|
43
|
-
description
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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
|
+
};
|