learngraph 0.1.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.
Files changed (93) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +25 -0
  3. package/dist/cjs/education/index.js +18 -0
  4. package/dist/cjs/education/index.js.map +1 -0
  5. package/dist/cjs/graph/index.js +14 -0
  6. package/dist/cjs/graph/index.js.map +1 -0
  7. package/dist/cjs/index.js +61 -0
  8. package/dist/cjs/index.js.map +1 -0
  9. package/dist/cjs/llm/index.js +12 -0
  10. package/dist/cjs/llm/index.js.map +1 -0
  11. package/dist/cjs/parsers/index.js +11 -0
  12. package/dist/cjs/parsers/index.js.map +1 -0
  13. package/dist/cjs/query/index.js +12 -0
  14. package/dist/cjs/query/index.js.map +1 -0
  15. package/dist/cjs/storage/index.js +12 -0
  16. package/dist/cjs/storage/index.js.map +1 -0
  17. package/dist/cjs/types/bloom.js +174 -0
  18. package/dist/cjs/types/bloom.js.map +1 -0
  19. package/dist/cjs/types/edge.js +42 -0
  20. package/dist/cjs/types/edge.js.map +1 -0
  21. package/dist/cjs/types/graph.js +8 -0
  22. package/dist/cjs/types/graph.js.map +1 -0
  23. package/dist/cjs/types/index.js +32 -0
  24. package/dist/cjs/types/index.js.map +1 -0
  25. package/dist/cjs/types/mastery.js +31 -0
  26. package/dist/cjs/types/mastery.js.map +1 -0
  27. package/dist/cjs/types/query.js +3 -0
  28. package/dist/cjs/types/query.js.map +1 -0
  29. package/dist/cjs/types/skill.js +38 -0
  30. package/dist/cjs/types/skill.js.map +1 -0
  31. package/dist/cjs/types/storage.js +3 -0
  32. package/dist/cjs/types/storage.js.map +1 -0
  33. package/dist/esm/education/index.js +12 -0
  34. package/dist/esm/education/index.js.map +1 -0
  35. package/dist/esm/graph/index.js +10 -0
  36. package/dist/esm/graph/index.js.map +1 -0
  37. package/dist/esm/index.js +44 -0
  38. package/dist/esm/index.js.map +1 -0
  39. package/dist/esm/llm/index.js +12 -0
  40. package/dist/esm/llm/index.js.map +1 -0
  41. package/dist/esm/parsers/index.js +11 -0
  42. package/dist/esm/parsers/index.js.map +1 -0
  43. package/dist/esm/query/index.js +11 -0
  44. package/dist/esm/query/index.js.map +1 -0
  45. package/dist/esm/storage/index.js +11 -0
  46. package/dist/esm/storage/index.js.map +1 -0
  47. package/dist/esm/types/bloom.js +168 -0
  48. package/dist/esm/types/bloom.js.map +1 -0
  49. package/dist/esm/types/edge.js +36 -0
  50. package/dist/esm/types/edge.js.map +1 -0
  51. package/dist/esm/types/graph.js +5 -0
  52. package/dist/esm/types/graph.js.map +1 -0
  53. package/dist/esm/types/index.js +11 -0
  54. package/dist/esm/types/index.js.map +1 -0
  55. package/dist/esm/types/mastery.js +26 -0
  56. package/dist/esm/types/mastery.js.map +1 -0
  57. package/dist/esm/types/query.js +2 -0
  58. package/dist/esm/types/query.js.map +1 -0
  59. package/dist/esm/types/skill.js +32 -0
  60. package/dist/esm/types/skill.js.map +1 -0
  61. package/dist/esm/types/storage.js +2 -0
  62. package/dist/esm/types/storage.js.map +1 -0
  63. package/dist/types/education/index.d.ts +8 -0
  64. package/dist/types/education/index.d.ts.map +1 -0
  65. package/dist/types/graph/index.d.ts +8 -0
  66. package/dist/types/graph/index.d.ts.map +1 -0
  67. package/dist/types/index.d.ts +38 -0
  68. package/dist/types/index.d.ts.map +1 -0
  69. package/dist/types/llm/index.d.ts +6 -0
  70. package/dist/types/llm/index.d.ts.map +1 -0
  71. package/dist/types/parsers/index.d.ts +6 -0
  72. package/dist/types/parsers/index.d.ts.map +1 -0
  73. package/dist/types/query/index.d.ts +7 -0
  74. package/dist/types/query/index.d.ts.map +1 -0
  75. package/dist/types/storage/index.d.ts +7 -0
  76. package/dist/types/storage/index.d.ts.map +1 -0
  77. package/dist/types/types/bloom.d.ts +33 -0
  78. package/dist/types/types/bloom.d.ts.map +1 -0
  79. package/dist/types/types/edge.d.ts +80 -0
  80. package/dist/types/types/edge.d.ts.map +1 -0
  81. package/dist/types/types/graph.d.ts +99 -0
  82. package/dist/types/types/graph.d.ts.map +1 -0
  83. package/dist/types/types/index.d.ts +18 -0
  84. package/dist/types/types/index.d.ts.map +1 -0
  85. package/dist/types/types/mastery.d.ts +89 -0
  86. package/dist/types/types/mastery.d.ts.map +1 -0
  87. package/dist/types/types/query.d.ts +155 -0
  88. package/dist/types/types/query.d.ts.map +1 -0
  89. package/dist/types/types/skill.d.ts +107 -0
  90. package/dist/types/types/skill.d.ts.map +1 -0
  91. package/dist/types/types/storage.d.ts +214 -0
  92. package/dist/types/types/storage.d.ts.map +1 -0
  93. package/package.json +149 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 LearnGraph Team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,25 @@
1
+ # jali
2
+
3
+ AI-powered educational knowledge graph infrastructure.
4
+
5
+ See the [main README](../../README.md) for full documentation.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install learngraph
11
+ ```
12
+
13
+ ## Quick Start
14
+
15
+ ```typescript
16
+ import { createSkillId, type SkillNode, detectBloomLevel } from 'learngraph';
17
+
18
+ // Detect Bloom's level from a learning objective
19
+ const level = detectBloomLevel('Calculate the derivative of a polynomial');
20
+ console.log(level); // 'apply'
21
+ ```
22
+
23
+ ## License
24
+
25
+ MIT
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ /**
3
+ * Educational psychology algorithms
4
+ *
5
+ * @packageDocumentation
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.masteryGap = exports.hasMastery = exports.MASTERY_THRESHOLDS = void 0;
9
+ var mastery_js_1 = require("../types/mastery.js");
10
+ Object.defineProperty(exports, "MASTERY_THRESHOLDS", { enumerable: true, get: function () { return mastery_js_1.MASTERY_THRESHOLDS; } });
11
+ Object.defineProperty(exports, "hasMastery", { enumerable: true, get: function () { return mastery_js_1.hasMastery; } });
12
+ Object.defineProperty(exports, "masteryGap", { enumerable: true, get: function () { return mastery_js_1.masteryGap; } });
13
+ // Educational algorithms will be implemented in Phase 7
14
+ // export { BKTEngine } from './bkt.js';
15
+ // export { IRTEngine } from './irt.js';
16
+ // export { EffectSizeCalculator } from './effect-size.js';
17
+ // export { DiagnosticEngine } from './diagnostic.js';
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/education/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAKH,kDAAiF;AAAxE,gHAAA,kBAAkB,OAAA;AAAE,wGAAA,UAAU,OAAA;AAAE,wGAAA,UAAU,OAAA;AAEnD,wDAAwD;AACxD,wCAAwC;AACxC,wCAAwC;AACxC,2DAA2D;AAC3D,sDAAsD"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /**
3
+ * Graph construction and validation
4
+ *
5
+ * @packageDocumentation
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.GRAPH_VERSION = void 0;
9
+ var graph_js_1 = require("../types/graph.js");
10
+ Object.defineProperty(exports, "GRAPH_VERSION", { enumerable: true, get: function () { return graph_js_1.GRAPH_VERSION; } });
11
+ // Graph builders will be implemented in Phase 5
12
+ // export { GraphBuilder } from './builder.js';
13
+ // export { GraphValidator } from './validator.js';
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/graph/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAYH,8CAAkD;AAAzC,yGAAA,aAAa,OAAA;AAEtB,gDAAgD;AAChD,+CAA+C;AAC/C,mDAAmD"}
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ /**
3
+ * LearnGraph (jali) - AI-powered educational knowledge graph infrastructure
4
+ *
5
+ * Decompose curricula into skill graphs with learning science built in.
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * import { createSkillId, type SkillNode, type GraphStorage } from 'learngraph';
10
+ *
11
+ * // Define a skill
12
+ * const skill: SkillNode = {
13
+ * id: createSkillId('add-fractions'),
14
+ * name: 'Add Fractions',
15
+ * description: 'Add fractions with like and unlike denominators',
16
+ * bloomLevel: 'apply',
17
+ * difficulty: 0.4,
18
+ * isThresholdConcept: false,
19
+ * masteryThreshold: 0.8,
20
+ * estimatedMinutes: 30,
21
+ * tags: ['mathematics', 'fractions'],
22
+ * metadata: {},
23
+ * createdAt: new Date().toISOString(),
24
+ * updatedAt: new Date().toISOString(),
25
+ * };
26
+ * ```
27
+ *
28
+ * @packageDocumentation
29
+ */
30
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
31
+ if (k2 === undefined) k2 = k;
32
+ var desc = Object.getOwnPropertyDescriptor(m, k);
33
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
34
+ desc = { enumerable: true, get: function() { return m[k]; } };
35
+ }
36
+ Object.defineProperty(o, k2, desc);
37
+ }) : (function(o, m, k, k2) {
38
+ if (k2 === undefined) k2 = k;
39
+ o[k2] = m[k];
40
+ }));
41
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
42
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
43
+ };
44
+ Object.defineProperty(exports, "__esModule", { value: true });
45
+ exports.PACKAGE_NAME = exports.VERSION = void 0;
46
+ // ─────────────────────────────────────────────────────────────────────────────
47
+ // Core Types
48
+ // ─────────────────────────────────────────────────────────────────────────────
49
+ __exportStar(require("./types/index.js"), exports);
50
+ // ─────────────────────────────────────────────────────────────────────────────
51
+ // Package Metadata
52
+ // ─────────────────────────────────────────────────────────────────────────────
53
+ /**
54
+ * Package version
55
+ */
56
+ exports.VERSION = '0.1.0';
57
+ /**
58
+ * Package name
59
+ */
60
+ exports.PACKAGE_NAME = 'learngraph';
61
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;;;;;;;;;;;;;;;;;AAEH,gFAAgF;AAChF,aAAa;AACb,gFAAgF;AAChF,mDAAiC;AAEjC,gFAAgF;AAChF,mBAAmB;AACnB,gFAAgF;AAEhF;;GAEG;AACU,QAAA,OAAO,GAAG,OAAO,CAAC;AAE/B;;GAEG;AACU,QAAA,YAAY,GAAG,YAAY,CAAC"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ /**
3
+ * LLM integration for skill extraction and prerequisite inference
4
+ *
5
+ * @packageDocumentation
6
+ */
7
+ // LLM integration will be implemented in Phase 4
8
+ // export { LLMOrchestrator } from './orchestrator.js';
9
+ // export { OpenAIAdapter } from './adapters/openai.js';
10
+ // export { AnthropicAdapter } from './adapters/anthropic.js';
11
+ // export { OllamaAdapter } from './adapters/ollama.js';
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/llm/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,iDAAiD;AACjD,uDAAuD;AACvD,wDAAwD;AACxD,8DAA8D;AAC9D,wDAAwD"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ /**
3
+ * Content parsers for educational materials
4
+ *
5
+ * @packageDocumentation
6
+ */
7
+ // Parsers will be implemented in Phase 3
8
+ // export { SyllabusParser } from './syllabus.js';
9
+ // export { ChapterParser } from './chapter.js';
10
+ // export { ObjectiveParser } from './objective.js';
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/parsers/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,yCAAyC;AACzC,kDAAkD;AAClD,gDAAgD;AAChD,oDAAoD"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ /**
3
+ * Query and traversal engines
4
+ *
5
+ * @packageDocumentation
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ // Query engines will be implemented in Phase 6
9
+ // export { ZPDCalculator } from './zpd.js';
10
+ // export { PathGenerator } from './path.js';
11
+ // export { SkillQueryBuilder } from './builder.js';
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/query/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAmBH,+CAA+C;AAC/C,4CAA4C;AAC5C,6CAA6C;AAC7C,oDAAoD"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ /**
3
+ * Graph storage adapters
4
+ *
5
+ * @packageDocumentation
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ // Storage adapters will be implemented in Phase 2
9
+ // export { Neo4jStorage } from './neo4j.js';
10
+ // export { LevelGraphStorage } from './levelgraph.js';
11
+ // export { MemoryStorage } from './memory.js';
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/storage/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAeH,kDAAkD;AAClD,6CAA6C;AAC7C,uDAAuD;AACvD,+CAA+C"}
@@ -0,0 +1,174 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BLOOM_VERBS = exports.BLOOM_LEVEL_ORDER = void 0;
4
+ exports.detectBloomLevel = detectBloomLevel;
5
+ exports.compareBloomLevels = compareBloomLevels;
6
+ exports.meetsBloomThreshold = meetsBloomThreshold;
7
+ /**
8
+ * Numeric mapping for Bloom's levels (1-6 scale)
9
+ */
10
+ exports.BLOOM_LEVEL_ORDER = {
11
+ remember: 1,
12
+ understand: 2,
13
+ apply: 3,
14
+ analyze: 4,
15
+ evaluate: 5,
16
+ create: 6,
17
+ };
18
+ /**
19
+ * Bloom's taxonomy action verbs for each level
20
+ * Used for automatic classification from learning objectives
21
+ */
22
+ exports.BLOOM_VERBS = {
23
+ remember: [
24
+ 'define',
25
+ 'describe',
26
+ 'identify',
27
+ 'label',
28
+ 'list',
29
+ 'match',
30
+ 'name',
31
+ 'outline',
32
+ 'recall',
33
+ 'recognize',
34
+ 'reproduce',
35
+ 'select',
36
+ 'state',
37
+ 'memorize',
38
+ 'repeat',
39
+ ],
40
+ understand: [
41
+ 'classify',
42
+ 'compare',
43
+ 'contrast',
44
+ 'demonstrate',
45
+ 'explain',
46
+ 'extend',
47
+ 'illustrate',
48
+ 'infer',
49
+ 'interpret',
50
+ 'paraphrase',
51
+ 'predict',
52
+ 'summarize',
53
+ 'translate',
54
+ 'discuss',
55
+ 'distinguish',
56
+ ],
57
+ apply: [
58
+ 'apply',
59
+ 'calculate',
60
+ 'change',
61
+ 'complete',
62
+ 'compute',
63
+ 'construct',
64
+ 'demonstrate',
65
+ 'discover',
66
+ 'manipulate',
67
+ 'modify',
68
+ 'operate',
69
+ 'predict',
70
+ 'prepare',
71
+ 'produce',
72
+ 'solve',
73
+ 'use',
74
+ 'implement',
75
+ 'execute',
76
+ ],
77
+ analyze: [
78
+ 'analyze',
79
+ 'break down',
80
+ 'categorize',
81
+ 'compare',
82
+ 'contrast',
83
+ 'deconstruct',
84
+ 'differentiate',
85
+ 'discriminate',
86
+ 'distinguish',
87
+ 'examine',
88
+ 'experiment',
89
+ 'identify',
90
+ 'infer',
91
+ 'organize',
92
+ 'test',
93
+ 'investigate',
94
+ ],
95
+ evaluate: [
96
+ 'appraise',
97
+ 'argue',
98
+ 'assess',
99
+ 'choose',
100
+ 'conclude',
101
+ 'critique',
102
+ 'decide',
103
+ 'defend',
104
+ 'evaluate',
105
+ 'judge',
106
+ 'justify',
107
+ 'prioritize',
108
+ 'rank',
109
+ 'rate',
110
+ 'recommend',
111
+ 'support',
112
+ 'value',
113
+ ],
114
+ create: [
115
+ 'assemble',
116
+ 'compose',
117
+ 'construct',
118
+ 'create',
119
+ 'design',
120
+ 'develop',
121
+ 'devise',
122
+ 'formulate',
123
+ 'generate',
124
+ 'hypothesize',
125
+ 'invent',
126
+ 'plan',
127
+ 'produce',
128
+ 'write',
129
+ 'synthesize',
130
+ 'integrate',
131
+ ],
132
+ };
133
+ /**
134
+ * Detect Bloom's level from text (typically a learning objective)
135
+ * Returns the first matching level based on verb detection
136
+ */
137
+ function detectBloomLevel(text) {
138
+ const lowerText = text.toLowerCase().trim();
139
+ // Check each level from highest to lowest (prefer higher classification)
140
+ const levels = [
141
+ 'create',
142
+ 'evaluate',
143
+ 'analyze',
144
+ 'apply',
145
+ 'understand',
146
+ 'remember',
147
+ ];
148
+ for (const level of levels) {
149
+ const verbs = exports.BLOOM_VERBS[level];
150
+ for (const verb of verbs) {
151
+ // Check if text starts with verb or contains "to {verb}"
152
+ if (lowerText.startsWith(verb) ||
153
+ lowerText.startsWith(`to ${verb}`) ||
154
+ lowerText.includes(` ${verb} `)) {
155
+ return level;
156
+ }
157
+ }
158
+ }
159
+ return null;
160
+ }
161
+ /**
162
+ * Compare two Bloom's levels
163
+ * Returns negative if a < b, positive if a > b, 0 if equal
164
+ */
165
+ function compareBloomLevels(a, b) {
166
+ return exports.BLOOM_LEVEL_ORDER[a] - exports.BLOOM_LEVEL_ORDER[b];
167
+ }
168
+ /**
169
+ * Check if a Bloom's level meets a minimum threshold
170
+ */
171
+ function meetsBloomThreshold(level, minimum) {
172
+ return exports.BLOOM_LEVEL_ORDER[level] >= exports.BLOOM_LEVEL_ORDER[minimum];
173
+ }
174
+ //# sourceMappingURL=bloom.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bloom.js","sourceRoot":"","sources":["../../../src/types/bloom.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EDGE_STRENGTH_THRESHOLDS = void 0;
4
+ exports.createEdgeId = createEdgeId;
5
+ exports.isValidEdgeStrength = isValidEdgeStrength;
6
+ exports.suggestEdgeType = suggestEdgeType;
7
+ /**
8
+ * Create a typed EdgeId from a string
9
+ */
10
+ function createEdgeId(id) {
11
+ return id;
12
+ }
13
+ /**
14
+ * Default edge strength thresholds
15
+ */
16
+ exports.EDGE_STRENGTH_THRESHOLDS = {
17
+ /** Minimum strength to be considered a meaningful dependency */
18
+ minimum: 0.3,
19
+ /** Strength threshold for "hard" prerequisites */
20
+ hard: 0.8,
21
+ /** Strength threshold for "soft" prerequisites */
22
+ soft: 0.5,
23
+ };
24
+ /**
25
+ * Validate an edge strength is in valid range
26
+ */
27
+ function isValidEdgeStrength(strength) {
28
+ return strength >= 0 && strength <= 1;
29
+ }
30
+ /**
31
+ * Suggest edge type based on strength
32
+ */
33
+ function suggestEdgeType(strength) {
34
+ if (strength >= exports.EDGE_STRENGTH_THRESHOLDS.hard) {
35
+ return 'hard';
36
+ }
37
+ if (strength >= exports.EDGE_STRENGTH_THRESHOLDS.soft) {
38
+ return 'soft';
39
+ }
40
+ return 'recommended';
41
+ }
42
+ //# sourceMappingURL=edge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edge.js","sourceRoot":"","sources":["../../../src/types/edge.ts"],"names":[],"mappings":";;;AAUA,oCAEC;AA4ED,kDAEC;AAKD,0CAQC;AAhGD;;GAEG;AACH,SAAgB,YAAY,CAAC,EAAU;IACrC,OAAO,EAAY,CAAC;AACtB,CAAC;AA6DD;;GAEG;AACU,QAAA,wBAAwB,GAAG;IACtC,gEAAgE;IAChE,OAAO,EAAE,GAAG;IACZ,kDAAkD;IAClD,IAAI,EAAE,GAAG;IACT,kDAAkD;IAClD,IAAI,EAAE,GAAG;CACD,CAAC;AAEX;;GAEG;AACH,SAAgB,mBAAmB,CAAC,QAAgB;IAClD,OAAO,QAAQ,IAAI,CAAC,IAAI,QAAQ,IAAI,CAAC,CAAC;AACxC,CAAC;AAED;;GAEG;AACH,SAAgB,eAAe,CAAC,QAAgB;IAC9C,IAAI,QAAQ,IAAI,gCAAwB,CAAC,IAAI,EAAE,CAAC;QAC9C,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,IAAI,QAAQ,IAAI,gCAAwB,CAAC,IAAI,EAAE,CAAC;QAC9C,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,OAAO,aAAa,CAAC;AACvB,CAAC"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GRAPH_VERSION = void 0;
4
+ /**
5
+ * Current graph version for exports
6
+ */
7
+ exports.GRAPH_VERSION = '1.0.0';
8
+ //# sourceMappingURL=graph.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graph.js","sourceRoot":"","sources":["../../../src/types/graph.ts"],"names":[],"mappings":";;;AAmIA;;GAEG;AACU,QAAA,aAAa,GAAG,OAAO,CAAC"}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ /**
3
+ * Core type definitions for LearnGraph (jali)
4
+ *
5
+ * @packageDocumentation
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.GRAPH_VERSION = exports.masteryGap = exports.hasMastery = exports.MASTERY_THRESHOLDS = exports.suggestEdgeType = exports.isValidEdgeStrength = exports.EDGE_STRENGTH_THRESHOLDS = exports.createEdgeId = exports.isValidMasteryThreshold = exports.isValidDifficulty = exports.THRESHOLD_CONCEPT_MASTERY = exports.SKILL_DEFAULTS = exports.createSkillId = exports.meetsBloomThreshold = exports.compareBloomLevels = exports.detectBloomLevel = exports.BLOOM_VERBS = exports.BLOOM_LEVEL_ORDER = void 0;
9
+ var bloom_js_1 = require("./bloom.js");
10
+ Object.defineProperty(exports, "BLOOM_LEVEL_ORDER", { enumerable: true, get: function () { return bloom_js_1.BLOOM_LEVEL_ORDER; } });
11
+ Object.defineProperty(exports, "BLOOM_VERBS", { enumerable: true, get: function () { return bloom_js_1.BLOOM_VERBS; } });
12
+ Object.defineProperty(exports, "detectBloomLevel", { enumerable: true, get: function () { return bloom_js_1.detectBloomLevel; } });
13
+ Object.defineProperty(exports, "compareBloomLevels", { enumerable: true, get: function () { return bloom_js_1.compareBloomLevels; } });
14
+ Object.defineProperty(exports, "meetsBloomThreshold", { enumerable: true, get: function () { return bloom_js_1.meetsBloomThreshold; } });
15
+ var skill_js_1 = require("./skill.js");
16
+ Object.defineProperty(exports, "createSkillId", { enumerable: true, get: function () { return skill_js_1.createSkillId; } });
17
+ Object.defineProperty(exports, "SKILL_DEFAULTS", { enumerable: true, get: function () { return skill_js_1.SKILL_DEFAULTS; } });
18
+ Object.defineProperty(exports, "THRESHOLD_CONCEPT_MASTERY", { enumerable: true, get: function () { return skill_js_1.THRESHOLD_CONCEPT_MASTERY; } });
19
+ Object.defineProperty(exports, "isValidDifficulty", { enumerable: true, get: function () { return skill_js_1.isValidDifficulty; } });
20
+ Object.defineProperty(exports, "isValidMasteryThreshold", { enumerable: true, get: function () { return skill_js_1.isValidMasteryThreshold; } });
21
+ var edge_js_1 = require("./edge.js");
22
+ Object.defineProperty(exports, "createEdgeId", { enumerable: true, get: function () { return edge_js_1.createEdgeId; } });
23
+ Object.defineProperty(exports, "EDGE_STRENGTH_THRESHOLDS", { enumerable: true, get: function () { return edge_js_1.EDGE_STRENGTH_THRESHOLDS; } });
24
+ Object.defineProperty(exports, "isValidEdgeStrength", { enumerable: true, get: function () { return edge_js_1.isValidEdgeStrength; } });
25
+ Object.defineProperty(exports, "suggestEdgeType", { enumerable: true, get: function () { return edge_js_1.suggestEdgeType; } });
26
+ var mastery_js_1 = require("./mastery.js");
27
+ Object.defineProperty(exports, "MASTERY_THRESHOLDS", { enumerable: true, get: function () { return mastery_js_1.MASTERY_THRESHOLDS; } });
28
+ Object.defineProperty(exports, "hasMastery", { enumerable: true, get: function () { return mastery_js_1.hasMastery; } });
29
+ Object.defineProperty(exports, "masteryGap", { enumerable: true, get: function () { return mastery_js_1.masteryGap; } });
30
+ var graph_js_1 = require("./graph.js");
31
+ Object.defineProperty(exports, "GRAPH_VERSION", { enumerable: true, get: function () { return graph_js_1.GRAPH_VERSION; } });
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAMH,uCAMoB;AALlB,6GAAA,iBAAiB,OAAA;AACjB,uGAAA,WAAW,OAAA;AACX,4GAAA,gBAAgB,OAAA;AAChB,8GAAA,kBAAkB,OAAA;AAClB,+GAAA,mBAAmB,OAAA;AAOrB,uCAMoB;AALlB,yGAAA,aAAa,OAAA;AACb,0GAAA,cAAc,OAAA;AACd,qHAAA,yBAAyB,OAAA;AACzB,6GAAA,iBAAiB,OAAA;AACjB,mHAAA,uBAAuB,OAAA;AAOzB,qCAKmB;AAJjB,uGAAA,YAAY,OAAA;AACZ,mHAAA,wBAAwB,OAAA;AACxB,8GAAA,mBAAmB,OAAA;AACnB,0GAAA,eAAe,OAAA;AAOjB,2CAA0E;AAAjE,gHAAA,kBAAkB,OAAA;AAAE,wGAAA,UAAU,OAAA;AAAE,wGAAA,UAAU,OAAA;AAanD,uCAA2C;AAAlC,yGAAA,aAAa,OAAA"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MASTERY_THRESHOLDS = void 0;
4
+ exports.hasMastery = hasMastery;
5
+ exports.masteryGap = masteryGap;
6
+ /**
7
+ * Mastery threshold values
8
+ */
9
+ exports.MASTERY_THRESHOLDS = {
10
+ /** Default mastery threshold for standard skills */
11
+ default: 0.8,
12
+ /** Mastery threshold for threshold concepts */
13
+ thresholdConcept: 0.9,
14
+ /** Minimum mastery to be considered "learned" */
15
+ minimum: 0.5,
16
+ /** High mastery for expert-level */
17
+ expert: 0.95,
18
+ };
19
+ /**
20
+ * Check if mastery level meets threshold
21
+ */
22
+ function hasMastery(mastery, threshold = exports.MASTERY_THRESHOLDS.default) {
23
+ return mastery >= threshold;
24
+ }
25
+ /**
26
+ * Calculate mastery gap (how much more is needed)
27
+ */
28
+ function masteryGap(current, threshold = exports.MASTERY_THRESHOLDS.default) {
29
+ return Math.max(0, threshold - current);
30
+ }
31
+ //# sourceMappingURL=mastery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mastery.js","sourceRoot":"","sources":["../../../src/types/mastery.ts"],"names":[],"mappings":";;;AAwGA,gCAEC;AAKD,gCAEC;AA1BD;;GAEG;AACU,QAAA,kBAAkB,GAAG;IAChC,oDAAoD;IACpD,OAAO,EAAE,GAAG;IACZ,+CAA+C;IAC/C,gBAAgB,EAAE,GAAG;IACrB,iDAAiD;IACjD,OAAO,EAAE,GAAG;IACZ,oCAAoC;IACpC,MAAM,EAAE,IAAI;CACJ,CAAC;AAEX;;GAEG;AACH,SAAgB,UAAU,CAAC,OAAe,EAAE,YAAoB,0BAAkB,CAAC,OAAO;IACxF,OAAO,OAAO,IAAI,SAAS,CAAC;AAC9B,CAAC;AAED;;GAEG;AACH,SAAgB,UAAU,CAAC,OAAe,EAAE,YAAoB,0BAAkB,CAAC,OAAO;IACxF,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC,CAAC;AAC1C,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/types/query.ts"],"names":[],"mappings":""}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.THRESHOLD_CONCEPT_MASTERY = exports.SKILL_DEFAULTS = void 0;
4
+ exports.createSkillId = createSkillId;
5
+ exports.isValidDifficulty = isValidDifficulty;
6
+ exports.isValidMasteryThreshold = isValidMasteryThreshold;
7
+ /**
8
+ * Create a typed SkillId from a string
9
+ */
10
+ function createSkillId(id) {
11
+ return id;
12
+ }
13
+ /**
14
+ * Default values for optional skill fields
15
+ */
16
+ exports.SKILL_DEFAULTS = {
17
+ masteryThreshold: 0.8,
18
+ isThresholdConcept: false,
19
+ tags: [],
20
+ metadata: {},
21
+ };
22
+ /**
23
+ * Mastery threshold for threshold concepts
24
+ */
25
+ exports.THRESHOLD_CONCEPT_MASTERY = 0.9;
26
+ /**
27
+ * Validate a difficulty value is in valid range
28
+ */
29
+ function isValidDifficulty(difficulty) {
30
+ return difficulty >= 0 && difficulty <= 1;
31
+ }
32
+ /**
33
+ * Validate a mastery threshold is in valid range
34
+ */
35
+ function isValidMasteryThreshold(threshold) {
36
+ return threshold >= 0 && threshold <= 1;
37
+ }
38
+ //# sourceMappingURL=skill.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill.js","sourceRoot":"","sources":["../../../src/types/skill.ts"],"names":[],"mappings":";;;AAUA,sCAEC;AAuHD,8CAEC;AAKD,0DAEC;AArID;;GAEG;AACH,SAAgB,aAAa,CAAC,EAAU;IACtC,OAAO,EAAa,CAAC;AACvB,CAAC;AAkGD;;GAEG;AACU,QAAA,cAAc,GAGvB;IACF,gBAAgB,EAAE,GAAG;IACrB,kBAAkB,EAAE,KAAK;IACzB,IAAI,EAAE,EAAE;IACR,QAAQ,EAAE,EAAE;CACJ,CAAC;AAEX;;GAEG;AACU,QAAA,yBAAyB,GAAG,GAAG,CAAC;AAE7C;;GAEG;AACH,SAAgB,iBAAiB,CAAC,UAAkB;IAClD,OAAO,UAAU,IAAI,CAAC,IAAI,UAAU,IAAI,CAAC,CAAC;AAC5C,CAAC;AAED;;GAEG;AACH,SAAgB,uBAAuB,CAAC,SAAiB;IACvD,OAAO,SAAS,IAAI,CAAC,IAAI,SAAS,IAAI,CAAC,CAAC;AAC1C,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=storage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../src/types/storage.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Educational psychology algorithms
3
+ *
4
+ * @packageDocumentation
5
+ */
6
+ export { MASTERY_THRESHOLDS, hasMastery, masteryGap } from '../types/mastery.js';
7
+ // Educational algorithms will be implemented in Phase 7
8
+ // export { BKTEngine } from './bkt.js';
9
+ // export { IRTEngine } from './irt.js';
10
+ // export { EffectSizeCalculator } from './effect-size.js';
11
+ // export { DiagnosticEngine } from './diagnostic.js';
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/education/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjF,wDAAwD;AACxD,wCAAwC;AACxC,wCAAwC;AACxC,2DAA2D;AAC3D,sDAAsD"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Graph construction and validation
3
+ *
4
+ * @packageDocumentation
5
+ */
6
+ export { GRAPH_VERSION } from '../types/graph.js';
7
+ // Graph builders will be implemented in Phase 5
8
+ // export { GraphBuilder } from './builder.js';
9
+ // export { GraphValidator } from './validator.js';
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/graph/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAYH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,gDAAgD;AAChD,+CAA+C;AAC/C,mDAAmD"}