@lssm/module.learning-journey 0.0.0-canary-20251217063201 → 0.0.0-canary-20251217073102

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 (156) hide show
  1. package/dist/contracts/index.js +6 -1
  2. package/dist/contracts/models.d.ts +118 -118
  3. package/dist/contracts/models.js +389 -1
  4. package/dist/contracts/onboarding.d.ts +167 -167
  5. package/dist/contracts/onboarding.js +404 -1
  6. package/dist/contracts/operations.d.ts +70 -70
  7. package/dist/contracts/operations.js +151 -1
  8. package/dist/contracts/shared.js +5 -1
  9. package/dist/docs/index.js +1 -1
  10. package/dist/docs/learning-journey.docblock.js +61 -5
  11. package/dist/engines/index.js +5 -1
  12. package/dist/engines/srs.js +219 -1
  13. package/dist/engines/streak.js +193 -1
  14. package/dist/engines/xp.js +212 -1
  15. package/dist/entities/ai.d.ts +200 -200
  16. package/dist/entities/ai.js +376 -1
  17. package/dist/entities/course.d.ts +150 -150
  18. package/dist/entities/course.js +316 -1
  19. package/dist/entities/flashcard.d.ts +145 -145
  20. package/dist/entities/flashcard.js +249 -1
  21. package/dist/entities/gamification.d.ts +198 -198
  22. package/dist/entities/gamification.js +392 -1
  23. package/dist/entities/index.d.ts +605 -605
  24. package/dist/entities/index.js +44 -1
  25. package/dist/entities/learner.d.ts +192 -192
  26. package/dist/entities/learner.js +365 -1
  27. package/dist/entities/onboarding.d.ts +165 -165
  28. package/dist/entities/onboarding.js +307 -1
  29. package/dist/entities/quiz.d.ts +185 -185
  30. package/dist/entities/quiz.js +370 -1
  31. package/dist/events.d.ts +213 -213
  32. package/dist/events.js +583 -1
  33. package/dist/index.js +22 -1
  34. package/dist/learning-journey.feature.js +148 -1
  35. package/dist/libs/contracts/dist/capabilities/openbanking.js +88 -1
  36. package/dist/libs/contracts/dist/client/index.js +5 -1
  37. package/dist/libs/contracts/dist/client/react/feature-render.js +2 -1
  38. package/dist/libs/contracts/dist/client/react/form-render.js +4 -1
  39. package/dist/libs/contracts/dist/client/react/index.js +4 -1
  40. package/dist/libs/contracts/dist/contract-registry/index.js +1 -1
  41. package/dist/libs/contracts/dist/contract-registry/schemas.js +60 -1
  42. package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +16 -76
  43. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +16 -350
  44. package/dist/libs/contracts/dist/docs/index.js +29 -1
  45. package/dist/libs/contracts/dist/docs/presentations.js +71 -1
  46. package/dist/libs/contracts/dist/docs/registry.js +44 -1
  47. package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +16 -383
  48. package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +16 -68
  49. package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +16 -140
  50. package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +16 -86
  51. package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +16 -1
  52. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +24 -2
  53. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +21 -2
  54. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +16 -213
  55. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +73 -5
  56. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +37 -1
  57. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +16 -1
  58. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +20 -262
  59. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +48 -1
  60. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +24 -2
  61. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +23 -2
  62. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +25 -16
  63. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +67 -1
  64. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +22 -2
  65. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +40 -36
  66. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +47 -1
  67. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +23 -2
  68. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +36 -3
  69. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +20 -1
  70. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +36 -3
  71. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +20 -1
  72. package/dist/libs/contracts/dist/events.js +10 -1
  73. package/dist/libs/contracts/dist/experiments/evaluator.js +1 -1
  74. package/dist/libs/contracts/dist/index.js +71 -1
  75. package/dist/libs/contracts/dist/install.js +2 -1
  76. package/dist/libs/contracts/dist/integrations/contracts.js +377 -1
  77. package/dist/libs/contracts/dist/integrations/index.js +18 -1
  78. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +228 -1
  79. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +159 -1
  80. package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +3 -1
  81. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +210 -1
  82. package/dist/libs/contracts/dist/integrations/openbanking/models.js +242 -1
  83. package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +13 -1
  84. package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +52 -1
  85. package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +75 -1
  86. package/dist/libs/contracts/dist/integrations/providers/gmail.js +87 -1
  87. package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +66 -1
  88. package/dist/libs/contracts/dist/integrations/providers/index.js +11 -1
  89. package/dist/libs/contracts/dist/integrations/providers/mistral.js +68 -1
  90. package/dist/libs/contracts/dist/integrations/providers/postmark.js +68 -1
  91. package/dist/libs/contracts/dist/integrations/providers/powens.js +116 -1
  92. package/dist/libs/contracts/dist/integrations/providers/qdrant.js +73 -1
  93. package/dist/libs/contracts/dist/integrations/providers/registry.js +10 -1
  94. package/dist/libs/contracts/dist/integrations/providers/stripe.js +83 -1
  95. package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +61 -1
  96. package/dist/libs/contracts/dist/jsonschema.js +1 -1
  97. package/dist/libs/contracts/dist/knowledge/contracts.js +306 -1
  98. package/dist/libs/contracts/dist/knowledge/index.js +7 -1
  99. package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +34 -1
  100. package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +34 -1
  101. package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +38 -1
  102. package/dist/libs/contracts/dist/knowledge/spaces/index.js +6 -1
  103. package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +34 -1
  104. package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +37 -1
  105. package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +34 -1
  106. package/dist/libs/contracts/dist/llm/exporters.js +19 -1
  107. package/dist/libs/contracts/dist/llm/index.js +2 -1
  108. package/dist/libs/contracts/dist/llm/prompts.js +1 -1
  109. package/dist/libs/contracts/dist/onboarding-base.js +196 -1
  110. package/dist/libs/contracts/dist/openapi.js +1 -1
  111. package/dist/libs/contracts/dist/ownership.js +21 -1
  112. package/dist/libs/contracts/dist/presentations.js +1 -1
  113. package/dist/libs/contracts/dist/presentations.v2.js +11 -1
  114. package/dist/libs/contracts/dist/prompt.js +1 -1
  115. package/dist/libs/contracts/dist/promptRegistry.js +1 -1
  116. package/dist/libs/contracts/dist/regenerator/index.js +1 -1
  117. package/dist/libs/contracts/dist/regenerator/service.js +6 -1
  118. package/dist/libs/contracts/dist/registry.js +2 -1
  119. package/dist/libs/contracts/dist/resources.js +1 -1
  120. package/dist/libs/contracts/dist/schema/dist/EnumType.js +2 -1
  121. package/dist/libs/contracts/dist/schema/dist/FieldType.js +49 -1
  122. package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +236 -1
  123. package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +34 -1
  124. package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +1 -1
  125. package/dist/libs/contracts/dist/schema/dist/entity/index.js +2 -1
  126. package/dist/libs/contracts/dist/schema/dist/entity/types.js +1 -1
  127. package/dist/libs/contracts/dist/schema/dist/index.js +6 -1
  128. package/dist/libs/contracts/dist/server/graphql-pothos.js +6 -1
  129. package/dist/libs/contracts/dist/server/index.js +8 -1
  130. package/dist/libs/contracts/dist/server/mcp/createMcpServer.js +4 -1
  131. package/dist/libs/contracts/dist/server/mcp/registerPresentations.js +2 -1
  132. package/dist/libs/contracts/dist/server/mcp/registerPrompts.js +1 -1
  133. package/dist/libs/contracts/dist/server/mcp/registerResources.js +2 -1
  134. package/dist/libs/contracts/dist/server/mcp/registerTools.js +1 -1
  135. package/dist/libs/contracts/dist/server/provider-mcp.js +1 -1
  136. package/dist/libs/contracts/dist/server/rest-elysia.js +1 -1
  137. package/dist/libs/contracts/dist/server/rest-express.js +1 -1
  138. package/dist/libs/contracts/dist/server/rest-generic.js +1 -1
  139. package/dist/libs/contracts/dist/server/rest-next-app.js +1 -1
  140. package/dist/libs/contracts/dist/server/rest-next-pages.js +1 -1
  141. package/dist/libs/contracts/dist/spec.js +34 -1
  142. package/dist/libs/contracts/dist/telemetry/index.js +1 -1
  143. package/dist/libs/contracts/dist/telemetry/tracker.js +1 -1
  144. package/dist/libs/contracts/dist/tests/index.js +1 -1
  145. package/dist/libs/contracts/dist/tests/runner.js +2 -1
  146. package/dist/libs/contracts/dist/workflow/index.js +1 -1
  147. package/dist/libs/contracts/dist/workflow/runner.js +1 -1
  148. package/dist/libs/schema/dist/EnumType.js +2 -1
  149. package/dist/libs/schema/dist/FieldType.js +49 -1
  150. package/dist/libs/schema/dist/ScalarTypeEnum.js +236 -1
  151. package/dist/libs/schema/dist/SchemaModel.js +39 -1
  152. package/dist/libs/schema/dist/entity/defineEntity.js +236 -1
  153. package/dist/libs/schema/dist/entity/index.js +2 -1
  154. package/dist/libs/schema/dist/entity/types.js +1 -1
  155. package/dist/libs/schema/dist/index.js +6 -1
  156. package/package.json +5 -5
@@ -1,138 +1,138 @@
1
- import * as _lssm_lib_schema557 from "@lssm/lib.schema";
1
+ import * as _lssm_lib_schema1372 from "@lssm/lib.schema";
2
2
  import * as _lssm_lib_contracts31 from "@lssm/lib.contracts";
3
3
 
4
4
  //#region src/contracts/operations.d.ts
5
5
  /**
6
6
  * Enroll in a course.
7
7
  */
8
- declare const EnrollInCourseContract: _lssm_lib_contracts31.ContractSpec<_lssm_lib_schema557.SchemaModel<{
8
+ declare const EnrollInCourseContract: _lssm_lib_contracts31.ContractSpec<_lssm_lib_schema1372.SchemaModel<{
9
9
  courseId: {
10
- type: _lssm_lib_schema557.FieldType<string, string>;
10
+ type: _lssm_lib_schema1372.FieldType<string, string>;
11
11
  isOptional: false;
12
12
  };
13
- }>, _lssm_lib_schema557.SchemaModel<{
13
+ }>, _lssm_lib_schema1372.SchemaModel<{
14
14
  id: {
15
- type: _lssm_lib_schema557.FieldType<string, string>;
15
+ type: _lssm_lib_schema1372.FieldType<string, string>;
16
16
  isOptional: false;
17
17
  };
18
18
  learnerId: {
19
- type: _lssm_lib_schema557.FieldType<string, string>;
19
+ type: _lssm_lib_schema1372.FieldType<string, string>;
20
20
  isOptional: false;
21
21
  };
22
22
  courseId: {
23
- type: _lssm_lib_schema557.FieldType<string, string>;
23
+ type: _lssm_lib_schema1372.FieldType<string, string>;
24
24
  isOptional: false;
25
25
  };
26
26
  status: {
27
- type: _lssm_lib_schema557.FieldType<string, string>;
27
+ type: _lssm_lib_schema1372.FieldType<string, string>;
28
28
  isOptional: false;
29
29
  };
30
30
  progress: {
31
- type: _lssm_lib_schema557.FieldType<number, number>;
31
+ type: _lssm_lib_schema1372.FieldType<number, number>;
32
32
  isOptional: false;
33
33
  };
34
34
  startedAt: {
35
- type: _lssm_lib_schema557.FieldType<Date, string>;
35
+ type: _lssm_lib_schema1372.FieldType<Date, string>;
36
36
  isOptional: true;
37
37
  };
38
38
  completedAt: {
39
- type: _lssm_lib_schema557.FieldType<Date, string>;
39
+ type: _lssm_lib_schema1372.FieldType<Date, string>;
40
40
  isOptional: true;
41
41
  };
42
42
  }>, undefined>;
43
43
  /**
44
44
  * Complete a lesson.
45
45
  */
46
- declare const CompleteLessonContract: _lssm_lib_contracts31.ContractSpec<_lssm_lib_schema557.SchemaModel<{
46
+ declare const CompleteLessonContract: _lssm_lib_contracts31.ContractSpec<_lssm_lib_schema1372.SchemaModel<{
47
47
  lessonId: {
48
- type: _lssm_lib_schema557.FieldType<string, string>;
48
+ type: _lssm_lib_schema1372.FieldType<string, string>;
49
49
  isOptional: false;
50
50
  };
51
51
  score: {
52
- type: _lssm_lib_schema557.FieldType<number, number>;
52
+ type: _lssm_lib_schema1372.FieldType<number, number>;
53
53
  isOptional: true;
54
54
  };
55
55
  timeSpent: {
56
- type: _lssm_lib_schema557.FieldType<number, number>;
56
+ type: _lssm_lib_schema1372.FieldType<number, number>;
57
57
  isOptional: false;
58
58
  };
59
- }>, _lssm_lib_schema557.SchemaModel<{
59
+ }>, _lssm_lib_schema1372.SchemaModel<{
60
60
  success: {
61
- type: _lssm_lib_schema557.FieldType<boolean, boolean>;
61
+ type: _lssm_lib_schema1372.FieldType<boolean, boolean>;
62
62
  isOptional: false;
63
63
  };
64
64
  xpEarned: {
65
- type: _lssm_lib_schema557.FieldType<number, number>;
65
+ type: _lssm_lib_schema1372.FieldType<number, number>;
66
66
  isOptional: true;
67
67
  };
68
68
  }>, undefined>;
69
69
  /**
70
70
  * Submit a card review.
71
71
  */
72
- declare const SubmitCardReviewContract: _lssm_lib_contracts31.ContractSpec<_lssm_lib_schema557.SchemaModel<{
72
+ declare const SubmitCardReviewContract: _lssm_lib_contracts31.ContractSpec<_lssm_lib_schema1372.SchemaModel<{
73
73
  cardId: {
74
- type: _lssm_lib_schema557.FieldType<string, string>;
74
+ type: _lssm_lib_schema1372.FieldType<string, string>;
75
75
  isOptional: false;
76
76
  };
77
77
  rating: {
78
- type: _lssm_lib_schema557.FieldType<string, string>;
78
+ type: _lssm_lib_schema1372.FieldType<string, string>;
79
79
  isOptional: false;
80
80
  };
81
81
  responseTimeMs: {
82
- type: _lssm_lib_schema557.FieldType<number, number>;
82
+ type: _lssm_lib_schema1372.FieldType<number, number>;
83
83
  isOptional: true;
84
84
  };
85
- }>, _lssm_lib_schema557.SchemaModel<{
85
+ }>, _lssm_lib_schema1372.SchemaModel<{
86
86
  success: {
87
- type: _lssm_lib_schema557.FieldType<boolean, boolean>;
87
+ type: _lssm_lib_schema1372.FieldType<boolean, boolean>;
88
88
  isOptional: false;
89
89
  };
90
90
  xpEarned: {
91
- type: _lssm_lib_schema557.FieldType<number, number>;
91
+ type: _lssm_lib_schema1372.FieldType<number, number>;
92
92
  isOptional: true;
93
93
  };
94
94
  }>, undefined>;
95
95
  /**
96
96
  * Get cards due for review.
97
97
  */
98
- declare const GetDueCardsContract: _lssm_lib_contracts31.ContractSpec<_lssm_lib_schema557.SchemaModel<{
98
+ declare const GetDueCardsContract: _lssm_lib_contracts31.ContractSpec<_lssm_lib_schema1372.SchemaModel<{
99
99
  deckId: {
100
- type: _lssm_lib_schema557.FieldType<string, string>;
100
+ type: _lssm_lib_schema1372.FieldType<string, string>;
101
101
  isOptional: true;
102
102
  };
103
103
  limit: {
104
- type: _lssm_lib_schema557.FieldType<number, number>;
104
+ type: _lssm_lib_schema1372.FieldType<number, number>;
105
105
  isOptional: true;
106
106
  };
107
- }>, _lssm_lib_schema557.SchemaModel<{
107
+ }>, _lssm_lib_schema1372.SchemaModel<{
108
108
  cards: {
109
- type: _lssm_lib_schema557.SchemaModel<{
109
+ type: _lssm_lib_schema1372.SchemaModel<{
110
110
  id: {
111
- type: _lssm_lib_schema557.FieldType<string, string>;
111
+ type: _lssm_lib_schema1372.FieldType<string, string>;
112
112
  isOptional: false;
113
113
  };
114
114
  deckId: {
115
- type: _lssm_lib_schema557.FieldType<string, string>;
115
+ type: _lssm_lib_schema1372.FieldType<string, string>;
116
116
  isOptional: false;
117
117
  };
118
118
  front: {
119
- type: _lssm_lib_schema557.FieldType<string, string>;
119
+ type: _lssm_lib_schema1372.FieldType<string, string>;
120
120
  isOptional: false;
121
121
  };
122
122
  back: {
123
- type: _lssm_lib_schema557.FieldType<string, string>;
123
+ type: _lssm_lib_schema1372.FieldType<string, string>;
124
124
  isOptional: false;
125
125
  };
126
126
  hints: {
127
- type: _lssm_lib_schema557.FieldType<unknown, unknown>;
127
+ type: _lssm_lib_schema1372.FieldType<unknown, unknown>;
128
128
  isOptional: true;
129
129
  };
130
130
  isDue: {
131
- type: _lssm_lib_schema557.FieldType<boolean, boolean>;
131
+ type: _lssm_lib_schema1372.FieldType<boolean, boolean>;
132
132
  isOptional: false;
133
133
  };
134
134
  nextReviewAt: {
135
- type: _lssm_lib_schema557.FieldType<Date, string>;
135
+ type: _lssm_lib_schema1372.FieldType<Date, string>;
136
136
  isOptional: true;
137
137
  };
138
138
  }>;
@@ -140,96 +140,96 @@ declare const GetDueCardsContract: _lssm_lib_contracts31.ContractSpec<_lssm_lib_
140
140
  isOptional: false;
141
141
  };
142
142
  total: {
143
- type: _lssm_lib_schema557.FieldType<number, number>;
143
+ type: _lssm_lib_schema1372.FieldType<number, number>;
144
144
  isOptional: false;
145
145
  };
146
146
  }>, undefined>;
147
147
  /**
148
148
  * Get learner dashboard.
149
149
  */
150
- declare const GetLearnerDashboardContract: _lssm_lib_contracts31.ContractSpec<_lssm_lib_schema557.SchemaModel<{
150
+ declare const GetLearnerDashboardContract: _lssm_lib_contracts31.ContractSpec<_lssm_lib_schema1372.SchemaModel<{
151
151
  learnerId: {
152
- type: _lssm_lib_schema557.FieldType<string, string>;
152
+ type: _lssm_lib_schema1372.FieldType<string, string>;
153
153
  isOptional: true;
154
154
  };
155
- }>, _lssm_lib_schema557.SchemaModel<{
155
+ }>, _lssm_lib_schema1372.SchemaModel<{
156
156
  learner: {
157
- type: _lssm_lib_schema557.SchemaModel<{
157
+ type: _lssm_lib_schema1372.SchemaModel<{
158
158
  id: {
159
- type: _lssm_lib_schema557.FieldType<string, string>;
159
+ type: _lssm_lib_schema1372.FieldType<string, string>;
160
160
  isOptional: false;
161
161
  };
162
162
  userId: {
163
- type: _lssm_lib_schema557.FieldType<string, string>;
163
+ type: _lssm_lib_schema1372.FieldType<string, string>;
164
164
  isOptional: false;
165
165
  };
166
166
  displayName: {
167
- type: _lssm_lib_schema557.FieldType<string, string>;
167
+ type: _lssm_lib_schema1372.FieldType<string, string>;
168
168
  isOptional: true;
169
169
  };
170
170
  level: {
171
- type: _lssm_lib_schema557.FieldType<number, number>;
171
+ type: _lssm_lib_schema1372.FieldType<number, number>;
172
172
  isOptional: false;
173
173
  };
174
174
  totalXp: {
175
- type: _lssm_lib_schema557.FieldType<number, number>;
175
+ type: _lssm_lib_schema1372.FieldType<number, number>;
176
176
  isOptional: false;
177
177
  };
178
178
  currentStreak: {
179
- type: _lssm_lib_schema557.FieldType<number, number>;
179
+ type: _lssm_lib_schema1372.FieldType<number, number>;
180
180
  isOptional: false;
181
181
  };
182
182
  longestStreak: {
183
- type: _lssm_lib_schema557.FieldType<number, number>;
183
+ type: _lssm_lib_schema1372.FieldType<number, number>;
184
184
  isOptional: false;
185
185
  };
186
186
  createdAt: {
187
- type: _lssm_lib_schema557.FieldType<Date, string>;
187
+ type: _lssm_lib_schema1372.FieldType<Date, string>;
188
188
  isOptional: false;
189
189
  };
190
190
  }>;
191
191
  isOptional: false;
192
192
  };
193
193
  currentStreak: {
194
- type: _lssm_lib_schema557.FieldType<number, number>;
194
+ type: _lssm_lib_schema1372.FieldType<number, number>;
195
195
  isOptional: false;
196
196
  };
197
197
  dailyXpGoal: {
198
- type: _lssm_lib_schema557.FieldType<number, number>;
198
+ type: _lssm_lib_schema1372.FieldType<number, number>;
199
199
  isOptional: false;
200
200
  };
201
201
  dailyXpProgress: {
202
- type: _lssm_lib_schema557.FieldType<number, number>;
202
+ type: _lssm_lib_schema1372.FieldType<number, number>;
203
203
  isOptional: false;
204
204
  };
205
205
  activeEnrollments: {
206
- type: _lssm_lib_schema557.SchemaModel<{
206
+ type: _lssm_lib_schema1372.SchemaModel<{
207
207
  id: {
208
- type: _lssm_lib_schema557.FieldType<string, string>;
208
+ type: _lssm_lib_schema1372.FieldType<string, string>;
209
209
  isOptional: false;
210
210
  };
211
211
  learnerId: {
212
- type: _lssm_lib_schema557.FieldType<string, string>;
212
+ type: _lssm_lib_schema1372.FieldType<string, string>;
213
213
  isOptional: false;
214
214
  };
215
215
  courseId: {
216
- type: _lssm_lib_schema557.FieldType<string, string>;
216
+ type: _lssm_lib_schema1372.FieldType<string, string>;
217
217
  isOptional: false;
218
218
  };
219
219
  status: {
220
- type: _lssm_lib_schema557.FieldType<string, string>;
220
+ type: _lssm_lib_schema1372.FieldType<string, string>;
221
221
  isOptional: false;
222
222
  };
223
223
  progress: {
224
- type: _lssm_lib_schema557.FieldType<number, number>;
224
+ type: _lssm_lib_schema1372.FieldType<number, number>;
225
225
  isOptional: false;
226
226
  };
227
227
  startedAt: {
228
- type: _lssm_lib_schema557.FieldType<Date, string>;
228
+ type: _lssm_lib_schema1372.FieldType<Date, string>;
229
229
  isOptional: true;
230
230
  };
231
231
  completedAt: {
232
- type: _lssm_lib_schema557.FieldType<Date, string>;
232
+ type: _lssm_lib_schema1372.FieldType<Date, string>;
233
233
  isOptional: true;
234
234
  };
235
235
  }>;
@@ -237,33 +237,33 @@ declare const GetLearnerDashboardContract: _lssm_lib_contracts31.ContractSpec<_l
237
237
  isOptional: false;
238
238
  };
239
239
  recentAchievements: {
240
- type: _lssm_lib_schema557.SchemaModel<{
240
+ type: _lssm_lib_schema1372.SchemaModel<{
241
241
  id: {
242
- type: _lssm_lib_schema557.FieldType<string, string>;
242
+ type: _lssm_lib_schema1372.FieldType<string, string>;
243
243
  isOptional: false;
244
244
  };
245
245
  key: {
246
- type: _lssm_lib_schema557.FieldType<string, string>;
246
+ type: _lssm_lib_schema1372.FieldType<string, string>;
247
247
  isOptional: false;
248
248
  };
249
249
  name: {
250
- type: _lssm_lib_schema557.FieldType<string, string>;
250
+ type: _lssm_lib_schema1372.FieldType<string, string>;
251
251
  isOptional: false;
252
252
  };
253
253
  description: {
254
- type: _lssm_lib_schema557.FieldType<string, string>;
254
+ type: _lssm_lib_schema1372.FieldType<string, string>;
255
255
  isOptional: false;
256
256
  };
257
257
  icon: {
258
- type: _lssm_lib_schema557.FieldType<string, string>;
258
+ type: _lssm_lib_schema1372.FieldType<string, string>;
259
259
  isOptional: true;
260
260
  };
261
261
  xpReward: {
262
- type: _lssm_lib_schema557.FieldType<number, number>;
262
+ type: _lssm_lib_schema1372.FieldType<number, number>;
263
263
  isOptional: false;
264
264
  };
265
265
  unlockedAt: {
266
- type: _lssm_lib_schema557.FieldType<Date, string>;
266
+ type: _lssm_lib_schema1372.FieldType<Date, string>;
267
267
  isOptional: true;
268
268
  };
269
269
  }>;
@@ -271,7 +271,7 @@ declare const GetLearnerDashboardContract: _lssm_lib_contracts31.ContractSpec<_l
271
271
  isOptional: false;
272
272
  };
273
273
  dueCardCount: {
274
- type: _lssm_lib_schema557.FieldType<number, number>;
274
+ type: _lssm_lib_schema1372.FieldType<number, number>;
275
275
  isOptional: false;
276
276
  };
277
277
  }>, undefined>;
@@ -1 +1,151 @@
1
- import{n as e,t}from"../libs/contracts/dist/spec.js";import"../libs/contracts/dist/index.js";import{LEARNING_JOURNEY_OWNERS as n}from"./shared.js";import{CompleteLessonInput as r,EnrollInCourseInput as i,EnrollmentModel as a,GetDueCardsInput as o,GetDueCardsOutput as s,GetLearnerDashboardInput as c,LearnerDashboardModel as l,SubmitCardReviewInput as u,SuccessOutput as d}from"./models.js";const f=t({meta:{name:`learning.enroll`,version:1,stability:`stable`,owners:[...n],tags:[`learning`,`enrollment`],description:`Enroll in a course.`,goal:`Start learning a new course.`,context:`Called when a learner wants to start a course.`},io:{input:i,output:a,errors:{COURSE_NOT_FOUND:{description:`Course does not exist`,http:404,gqlCode:`COURSE_NOT_FOUND`,when:`Course ID is invalid`},ALREADY_ENROLLED:{description:`Already enrolled in course`,http:409,gqlCode:`ALREADY_ENROLLED`,when:`Learner is already enrolled`}}},policy:{auth:`user`}}),p=t({meta:{name:`learning.completeLesson`,version:1,stability:`stable`,owners:[...n],tags:[`learning`,`progress`],description:`Mark a lesson as completed.`,goal:`Record lesson completion and earn XP.`,context:`Called when a learner finishes a lesson.`},io:{input:r,output:d,errors:{LESSON_NOT_FOUND:{description:`Lesson does not exist`,http:404,gqlCode:`LESSON_NOT_FOUND`,when:`Lesson ID is invalid`},NOT_ENROLLED:{description:`Not enrolled in course`,http:403,gqlCode:`NOT_ENROLLED`,when:`Learner is not enrolled in the course`}}},policy:{auth:`user`}}),m=t({meta:{name:`learning.submitCardReview`,version:1,stability:`stable`,owners:[...n],tags:[`learning`,`flashcards`],description:`Submit a flashcard review.`,goal:`Record review and update SRS schedule.`,context:`Called when reviewing flashcards.`},io:{input:u,output:d,errors:{CARD_NOT_FOUND:{description:`Card does not exist`,http:404,gqlCode:`CARD_NOT_FOUND`,when:`Card ID is invalid`},INVALID_RATING:{description:`Invalid rating`,http:400,gqlCode:`INVALID_RATING`,when:`Rating must be AGAIN, HARD, GOOD, or EASY`}}},policy:{auth:`user`}}),h=e({meta:{name:`learning.getDueCards`,version:1,stability:`stable`,owners:[...n],tags:[`learning`,`flashcards`],description:`Get flashcards due for review.`,goal:`Get the next batch of cards to review.`,context:`Called when starting a review session.`},io:{input:o,output:s},policy:{auth:`user`}}),g=e({meta:{name:`learning.getDashboard`,version:1,stability:`stable`,owners:[...n],tags:[`learning`,`dashboard`],description:`Get learner dashboard data.`,goal:`Display learner progress and stats.`,context:`Called when viewing the learning dashboard.`},io:{input:c,output:l},policy:{auth:`user`}});export{p as CompleteLessonContract,f as EnrollInCourseContract,h as GetDueCardsContract,g as GetLearnerDashboardContract,m as SubmitCardReviewContract};
1
+ import { defineCommand, defineQuery } from "../libs/contracts/dist/spec.js";
2
+ import "../libs/contracts/dist/index.js";
3
+ import { LEARNING_JOURNEY_OWNERS } from "./shared.js";
4
+ import { CompleteLessonInput, EnrollInCourseInput, EnrollmentModel, GetDueCardsInput, GetDueCardsOutput, GetLearnerDashboardInput, LearnerDashboardModel, SubmitCardReviewInput, SuccessOutput } from "./models.js";
5
+
6
+ //#region src/contracts/operations.ts
7
+ /**
8
+ * Enroll in a course.
9
+ */
10
+ const EnrollInCourseContract = defineCommand({
11
+ meta: {
12
+ name: "learning.enroll",
13
+ version: 1,
14
+ stability: "stable",
15
+ owners: [...LEARNING_JOURNEY_OWNERS],
16
+ tags: ["learning", "enrollment"],
17
+ description: "Enroll in a course.",
18
+ goal: "Start learning a new course.",
19
+ context: "Called when a learner wants to start a course."
20
+ },
21
+ io: {
22
+ input: EnrollInCourseInput,
23
+ output: EnrollmentModel,
24
+ errors: {
25
+ COURSE_NOT_FOUND: {
26
+ description: "Course does not exist",
27
+ http: 404,
28
+ gqlCode: "COURSE_NOT_FOUND",
29
+ when: "Course ID is invalid"
30
+ },
31
+ ALREADY_ENROLLED: {
32
+ description: "Already enrolled in course",
33
+ http: 409,
34
+ gqlCode: "ALREADY_ENROLLED",
35
+ when: "Learner is already enrolled"
36
+ }
37
+ }
38
+ },
39
+ policy: { auth: "user" }
40
+ });
41
+ /**
42
+ * Complete a lesson.
43
+ */
44
+ const CompleteLessonContract = defineCommand({
45
+ meta: {
46
+ name: "learning.completeLesson",
47
+ version: 1,
48
+ stability: "stable",
49
+ owners: [...LEARNING_JOURNEY_OWNERS],
50
+ tags: ["learning", "progress"],
51
+ description: "Mark a lesson as completed.",
52
+ goal: "Record lesson completion and earn XP.",
53
+ context: "Called when a learner finishes a lesson."
54
+ },
55
+ io: {
56
+ input: CompleteLessonInput,
57
+ output: SuccessOutput,
58
+ errors: {
59
+ LESSON_NOT_FOUND: {
60
+ description: "Lesson does not exist",
61
+ http: 404,
62
+ gqlCode: "LESSON_NOT_FOUND",
63
+ when: "Lesson ID is invalid"
64
+ },
65
+ NOT_ENROLLED: {
66
+ description: "Not enrolled in course",
67
+ http: 403,
68
+ gqlCode: "NOT_ENROLLED",
69
+ when: "Learner is not enrolled in the course"
70
+ }
71
+ }
72
+ },
73
+ policy: { auth: "user" }
74
+ });
75
+ /**
76
+ * Submit a card review.
77
+ */
78
+ const SubmitCardReviewContract = defineCommand({
79
+ meta: {
80
+ name: "learning.submitCardReview",
81
+ version: 1,
82
+ stability: "stable",
83
+ owners: [...LEARNING_JOURNEY_OWNERS],
84
+ tags: ["learning", "flashcards"],
85
+ description: "Submit a flashcard review.",
86
+ goal: "Record review and update SRS schedule.",
87
+ context: "Called when reviewing flashcards."
88
+ },
89
+ io: {
90
+ input: SubmitCardReviewInput,
91
+ output: SuccessOutput,
92
+ errors: {
93
+ CARD_NOT_FOUND: {
94
+ description: "Card does not exist",
95
+ http: 404,
96
+ gqlCode: "CARD_NOT_FOUND",
97
+ when: "Card ID is invalid"
98
+ },
99
+ INVALID_RATING: {
100
+ description: "Invalid rating",
101
+ http: 400,
102
+ gqlCode: "INVALID_RATING",
103
+ when: "Rating must be AGAIN, HARD, GOOD, or EASY"
104
+ }
105
+ }
106
+ },
107
+ policy: { auth: "user" }
108
+ });
109
+ /**
110
+ * Get cards due for review.
111
+ */
112
+ const GetDueCardsContract = defineQuery({
113
+ meta: {
114
+ name: "learning.getDueCards",
115
+ version: 1,
116
+ stability: "stable",
117
+ owners: [...LEARNING_JOURNEY_OWNERS],
118
+ tags: ["learning", "flashcards"],
119
+ description: "Get flashcards due for review.",
120
+ goal: "Get the next batch of cards to review.",
121
+ context: "Called when starting a review session."
122
+ },
123
+ io: {
124
+ input: GetDueCardsInput,
125
+ output: GetDueCardsOutput
126
+ },
127
+ policy: { auth: "user" }
128
+ });
129
+ /**
130
+ * Get learner dashboard.
131
+ */
132
+ const GetLearnerDashboardContract = defineQuery({
133
+ meta: {
134
+ name: "learning.getDashboard",
135
+ version: 1,
136
+ stability: "stable",
137
+ owners: [...LEARNING_JOURNEY_OWNERS],
138
+ tags: ["learning", "dashboard"],
139
+ description: "Get learner dashboard data.",
140
+ goal: "Display learner progress and stats.",
141
+ context: "Called when viewing the learning dashboard."
142
+ },
143
+ io: {
144
+ input: GetLearnerDashboardInput,
145
+ output: LearnerDashboardModel
146
+ },
147
+ policy: { auth: "user" }
148
+ });
149
+
150
+ //#endregion
151
+ export { CompleteLessonContract, EnrollInCourseContract, GetDueCardsContract, GetLearnerDashboardContract, SubmitCardReviewContract };
@@ -1 +1,5 @@
1
- const e=[`modules.learning-journey`];export{e as LEARNING_JOURNEY_OWNERS};
1
+ //#region src/contracts/shared.ts
2
+ const LEARNING_JOURNEY_OWNERS = ["modules.learning-journey"];
3
+
4
+ //#endregion
5
+ export { LEARNING_JOURNEY_OWNERS };
@@ -1 +1 @@
1
- import"./learning-journey.docblock.js";
1
+ import "./learning-journey.docblock.js";
@@ -1,4 +1,22 @@
1
- import{a as e}from"../libs/contracts/dist/docs/registry.js";import"../libs/contracts/dist/docs/index.js";e([{id:`docs.learning-journey.engine`,title:`Learning Journey Engine`,summary:`Tracks learners, tracks/modules/steps, progress, quizzes, streaks, XP, and AI coaching hooks for product-integrated onboarding.`,kind:`reference`,visibility:`public`,route:`/docs/learning-journey/engine`,tags:[`learning`,`onboarding`,`journey`,`education`],body:`## Capabilities
1
+ import { registerDocBlocks } from "../libs/contracts/dist/docs/registry.js";
2
+ import "../libs/contracts/dist/docs/index.js";
3
+
4
+ //#region src/docs/learning-journey.docblock.ts
5
+ registerDocBlocks([
6
+ {
7
+ id: "docs.learning-journey.engine",
8
+ title: "Learning Journey Engine",
9
+ summary: "Tracks learners, tracks/modules/steps, progress, quizzes, streaks, XP, and AI coaching hooks for product-integrated onboarding.",
10
+ kind: "reference",
11
+ visibility: "public",
12
+ route: "/docs/learning-journey/engine",
13
+ tags: [
14
+ "learning",
15
+ "onboarding",
16
+ "journey",
17
+ "education"
18
+ ],
19
+ body: `## Capabilities
2
20
 
3
21
  - **Entities**: Learner, Track, Module, Step, Progress, Quiz, Flashcard, AI Coach, Gamification (XP, streaks, badges).
4
22
  - **Contracts**: enroll/resume/advance steps, complete quizzes, record streaks, assign XP, fetch progress dashboards, onboarding list/progress/recordEvent.
@@ -42,7 +60,17 @@ const updated = streak.compute({ lastActiveAt: new Date(), today: new Date() });
42
60
  - Avoid storing PII in content; keep org/user scoping for multi-tenant isolation.
43
61
  - Emit analytics and audit logs for completions; respect \`prefers-reduced-motion\` in UIs consuming these specs.
44
62
  - Track completion bonuses: \`completionXpBonus\`, \`completionBadgeKey\`, optional \`streakHoursWindow\` + \`streakBonusXp\`.
45
- `},{id:`docs.learning-journey.goal`,title:`Learning Journey — Goal`,summary:`Why the learning journey engine exists and the outcomes it targets.`,kind:`goal`,visibility:`public`,route:`/docs/learning-journey/goal`,tags:[`learning`,`goal`],body:`## Why it matters
63
+ `
64
+ },
65
+ {
66
+ id: "docs.learning-journey.goal",
67
+ title: "Learning Journey — Goal",
68
+ summary: "Why the learning journey engine exists and the outcomes it targets.",
69
+ kind: "goal",
70
+ visibility: "public",
71
+ route: "/docs/learning-journey/goal",
72
+ tags: ["learning", "goal"],
73
+ body: `## Why it matters
46
74
  - Provides a regenerable onboarding/education engine tied to product signals.
47
75
  - Keeps tracks, steps, quizzes, and gamification consistent across surfaces.
48
76
 
@@ -52,7 +80,17 @@ const updated = streak.compute({ lastActiveAt: new Date(), today: new Date() });
52
80
 
53
81
  ## Success criteria
54
82
  - Journey changes regenerate UI/API/events without drift.
55
- - Analytics/audit hooks exist for completions and streaks.`},{id:`docs.learning-journey.usage`,title:`Learning Journey — Usage`,summary:`How to compose, bind, and regenerate journeys safely.`,kind:`usage`,visibility:`public`,route:`/docs/learning-journey/usage`,tags:[`learning`,`usage`],body:`## Setup
83
+ - Analytics/audit hooks exist for completions and streaks.`
84
+ },
85
+ {
86
+ id: "docs.learning-journey.usage",
87
+ title: "Learning Journey — Usage",
88
+ summary: "How to compose, bind, and regenerate journeys safely.",
89
+ kind: "usage",
90
+ visibility: "public",
91
+ route: "/docs/learning-journey/usage",
92
+ tags: ["learning", "usage"],
93
+ body: `## Setup
56
94
  1) Include \`learningJourneyEntities\` in schema composition.
57
95
  2) Register contracts/events from \`@lssm/module.learning-journey\`.
58
96
  3) Bind steps to real product events (e.g., deal.created, run.completed).
@@ -65,7 +103,21 @@ const updated = streak.compute({ lastActiveAt: new Date(), today: new Date() });
65
103
  ## Guardrails
66
104
  - Avoid hardcoded progression; keep engines declarative.
67
105
  - Emit analytics/audit for completions; respect user locale/accessibility in presentations.
68
- - Keep content free of PII; scope learners by org/tenant.`},{id:`docs.learning-journey.constraints`,title:`Learning Journey — Constraints & Safety`,summary:`Internal guardrails for progression, telemetry, and regeneration semantics.`,kind:`reference`,visibility:`internal`,route:`/docs/learning-journey/constraints`,tags:[`learning`,`constraints`,`internal`],body:`## Constraints
106
+ - Keep content free of PII; scope learners by org/tenant.`
107
+ },
108
+ {
109
+ id: "docs.learning-journey.constraints",
110
+ title: "Learning Journey — Constraints & Safety",
111
+ summary: "Internal guardrails for progression, telemetry, and regeneration semantics.",
112
+ kind: "reference",
113
+ visibility: "internal",
114
+ route: "/docs/learning-journey/constraints",
115
+ tags: [
116
+ "learning",
117
+ "constraints",
118
+ "internal"
119
+ ],
120
+ body: `## Constraints
69
121
  - Progression (tracks/modules/steps) and engines (SRS, streaks, XP) must stay declarative in spec.
70
122
  - Events to emit: learner.enrolled, step.completed, quiz.scored, streak.reset, xp.awarded.
71
123
  - Regeneration should not change scoring/streak rules without explicit spec change.
@@ -77,4 +129,8 @@ const updated = streak.compute({ lastActiveAt: new Date(), today: new Date() });
77
129
  ## Verification
78
130
  - Add fixtures for streak/XP rule changes and quiz scoring.
79
131
  - Ensure Notifications/Audit wiring persists for completions; analytics emitted for progress.
80
- - Use Feature Flags to trial new tracks or reward rules; default safe/off.`}]);
132
+ - Use Feature Flags to trial new tracks or reward rules; default safe/off.`
133
+ }
134
+ ]);
135
+
136
+ //#endregion
@@ -1 +1,5 @@
1
- import{DEFAULT_SRS_CONFIG as e,SRSEngine as t,srsEngine as n}from"./srs.js";import{DEFAULT_XP_CONFIG as r,XPEngine as i,xpEngine as a}from"./xp.js";import{DEFAULT_STREAK_CONFIG as o,StreakEngine as s,streakEngine as c}from"./streak.js";export{e as DEFAULT_SRS_CONFIG,o as DEFAULT_STREAK_CONFIG,r as DEFAULT_XP_CONFIG,t as SRSEngine,s as StreakEngine,i as XPEngine,n as srsEngine,c as streakEngine,a as xpEngine};
1
+ import { DEFAULT_SRS_CONFIG, SRSEngine, srsEngine } from "./srs.js";
2
+ import { DEFAULT_XP_CONFIG, XPEngine, xpEngine } from "./xp.js";
3
+ import { DEFAULT_STREAK_CONFIG, StreakEngine, streakEngine } from "./streak.js";
4
+
5
+ export { DEFAULT_SRS_CONFIG, DEFAULT_STREAK_CONFIG, DEFAULT_XP_CONFIG, SRSEngine, StreakEngine, XPEngine, srsEngine, streakEngine, xpEngine };