@plasius/learning 0.1.0 → 0.2.1

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/index.d.ts CHANGED
@@ -118,9 +118,18 @@ interface ModuleAgentFeedbackV1 {
118
118
  scoreAuthority: "deterministic-assessment";
119
119
  }
120
120
  /** Ordinary Token subunits used as a pilot shadow or fixed price. */
121
+ interface ModuleReferencePriceV1 {
122
+ /** Reference copy only; this is never a cash balance or redemption promise. */
123
+ currency: "GBP";
124
+ /** Canonical GBP minor units. */
125
+ minorUnits: string;
126
+ basis: "nominal-reference";
127
+ cashRedemptionAllowed: false;
128
+ }
121
129
  interface ModulePricingV1 {
122
130
  state: CommercialStateV1;
123
131
  tokenSubunits: string;
132
+ referencePrice?: ModuleReferencePriceV1;
124
133
  includesMaterials: true;
125
134
  includesAssessmentRetries: true;
126
135
  includesAgents: true;
@@ -173,7 +182,7 @@ interface ModuleEntitlementV1 {
173
182
  subjectAccountId: string;
174
183
  moduleId: string;
175
184
  moduleVersion: string;
176
- source: "pilot-grant" | "module-allowance-purchase" | "support-grant";
185
+ source: "pilot-grant" | "module-allowance-purchase" | "support-grant" | "admin-test-grant";
177
186
  state: "pending" | "active" | "revoked";
178
187
  economyTransactionId?: string;
179
188
  grantedAt: string;
@@ -209,8 +218,105 @@ interface PublishedStaticProjectSnapshotV1 {
209
218
  state: "pending-review" | "published" | "expired" | "unpublished";
210
219
  expiresAt: string;
211
220
  }
221
+ /** Canonical learner journey shared by interactive and printable adapters. */
222
+ declare const MISSION_AUTHORING_CONTRACT_VERSION_V1: "1.0.0";
223
+ type MissionStageKindV1 = "learn" | "predict" | "build" | "run" | "assess" | "inspect" | "fix" | "explain" | "reward";
224
+ type MissionArtifactKindV1 = "starter-code" | "starter-assets" | "sample-data" | "printable" | "facilitator-note" | "answer-key" | "protected-test";
225
+ /** Metadata only: storage and authorized delivery remain adapter concerns. */
226
+ interface MissionArtifactReferenceV1 {
227
+ id: string;
228
+ kind: MissionArtifactKindV1;
229
+ audience: CourseMaterialAudienceV1;
230
+ solutionBearing: boolean;
231
+ }
232
+ interface MissionReadinessCheckV1 {
233
+ id: string;
234
+ prompt: string;
235
+ scored: false;
236
+ }
237
+ interface MissionStageCardV1 {
238
+ kind: MissionStageKindV1;
239
+ instruction: string;
240
+ artifactIds: string[];
241
+ }
242
+ interface MissionAuthoringGoalV1 {
243
+ id: string;
244
+ statement: string;
245
+ visibility: "visible" | "protected";
246
+ criterionIds: string[];
247
+ completionRequired: boolean;
248
+ aiRequired: boolean;
249
+ }
250
+ type MissionInteractionModeV1 = "keyboard" | "pointer" | "drag" | "audio" | "colour" | "motion" | "text" | "shape" | "symbol" | "reduced-motion";
251
+ interface MissionInteractionRequirementV1 {
252
+ id: string;
253
+ description: string;
254
+ primaryMode: MissionInteractionModeV1;
255
+ alternativeIds: string[];
256
+ }
257
+ interface MissionAccessibilityAlternativeV1 {
258
+ id: string;
259
+ modes: MissionInteractionModeV1[];
260
+ equivalentOutcome: true;
261
+ description: string;
262
+ }
263
+ type MissionEvidenceKindV1 = "assessment-result" | "learner-explanation" | "project-snapshot" | "adult-signoff";
264
+ type MissionEvidenceRetentionV1 = "attempt" | "entitlement" | "adult-signoff";
265
+ interface MissionEvidenceRequirementV1 {
266
+ id: string;
267
+ goalIds: string[];
268
+ kind: MissionEvidenceKindV1;
269
+ retention: MissionEvidenceRetentionV1;
270
+ containsPersonalData: false;
271
+ }
272
+ interface MissionSideAdventureV1 {
273
+ id: string;
274
+ prompt: string;
275
+ completionRequired: false;
276
+ }
277
+ interface MissionRewardBindingV1 {
278
+ id: string;
279
+ badgeId: string;
280
+ goalIds: string[];
281
+ deterministic: true;
282
+ random: false;
283
+ tokenConvertible: false;
284
+ }
285
+ /** The only mission projection safe to return to a learner. */
286
+ interface LearnerMissionAuthoringV1 {
287
+ estimatedMinutes: number;
288
+ stages: MissionStageCardV1[];
289
+ readinessChecks: MissionReadinessCheckV1[];
290
+ artifacts: MissionArtifactReferenceV1[];
291
+ goals: MissionAuthoringGoalV1[];
292
+ interactions: MissionInteractionRequirementV1[];
293
+ accessibilityAlternatives: MissionAccessibilityAlternativeV1[];
294
+ evidenceRequirements: MissionEvidenceRequirementV1[];
295
+ sideAdventures: MissionSideAdventureV1[];
296
+ rewardBindings: MissionRewardBindingV1[];
297
+ }
298
+ /** Protected authoring data must never be projected through learner APIs. */
299
+ interface FacilitatorMissionAuthoringV1 {
300
+ artifacts: MissionArtifactReferenceV1[];
301
+ protectedGoals: MissionAuthoringGoalV1[];
302
+ prompts: string[];
303
+ }
304
+ /** Additive authoring detail keyed to one immutable catalog mission. */
305
+ interface MissionAuthoringBundleV1 {
306
+ version: string;
307
+ moduleId: string;
308
+ moduleVersion: string;
309
+ missionId: string;
310
+ learner: LearnerMissionAuthoringV1;
311
+ facilitator: FacilitatorMissionAuthoringV1;
312
+ }
313
+ interface MissionAuthoringValidationIssueV1 {
314
+ code: "bundle-version-mismatch" | "module-reference-mismatch" | "mission-reference-mismatch" | "invalid-duration" | "missing-stage" | "duplicate-stage" | "stage-order" | "missing-readiness-check" | "scored-readiness-check" | "missing-starter-artifact" | "learner-artifact-leak" | "facilitator-artifact-leak" | "unknown-artifact" | "duplicate-id" | "missing-visible-goal" | "missing-protected-goal" | "invalid-goal-projection" | "duplicate-goal-id" | "unknown-criterion" | "criterion-visibility-mismatch" | "rubric-total" | "rubric-dimension-total" | "duplicate-criterion-id" | "missing-mandatory-safety" | "missing-safety-evidence" | "ai-dependent-completion" | "inaccessible-interaction" | "unknown-accessibility-alternative" | "non-equivalent-accessibility-alternative" | "missing-evidence" | "unknown-evidence-goal" | "personal-data-evidence" | "missing-side-adventure" | "mandatory-side-adventure" | "invalid-reward";
315
+ message: string;
316
+ path: string;
317
+ }
212
318
  interface LearningValidationIssueV1 {
213
- code: "duplicate-module-id" | "duplicate-module-slug" | "module-not-self-contained" | "paid-prerequisite" | "missing-materials" | "facilitator-material-leak" | "learner-material-leak" | "invalid-token-subunits" | "rubric-total" | "rubric-dimension-total" | "duplicate-criterion-id" | "missing-mandatory-safety" | "missing-hardware-items" | "invalid-agent-authority" | "missing-missions";
319
+ code: "duplicate-module-id" | "duplicate-module-slug" | "module-not-self-contained" | "paid-prerequisite" | "missing-materials" | "facilitator-material-leak" | "learner-material-leak" | "invalid-token-subunits" | "invalid-reference-price" | "rubric-total" | "rubric-dimension-total" | "duplicate-criterion-id" | "missing-mandatory-safety" | "missing-hardware-items" | "invalid-agent-authority" | "missing-missions";
214
320
  message: string;
215
321
  moduleId?: string;
216
322
  path: string;
@@ -222,12 +328,51 @@ interface LearningValidationIssueV1 {
222
328
  */
223
329
  declare function calculateAssessment(rubric: AssessmentRubricV1, results: AssessmentCheckResultV1[]): AssessmentResultV1;
224
330
 
331
+ /**
332
+ * Uniform price for the immutable 1.1.0 pilot catalog.
333
+ *
334
+ * The GBP value is product-copy reference metadata under the published
335
+ * 10p-per-Token economy reference rate. It does not create redemption rights.
336
+ */
337
+ declare const JUNIOR_CODER_MODULE_PRICE_V1_1: Readonly<{
338
+ tokenSubunits: "50000";
339
+ referencePrice: Readonly<{
340
+ currency: "GBP";
341
+ minorUnits: "500";
342
+ basis: "nominal-reference";
343
+ cashRedemptionAllowed: false;
344
+ }>;
345
+ }>;
225
346
  /** Initial immutable Junior Coder path manifest for pilot grants and shadow pricing. */
226
347
  declare const JUNIOR_CODER_ROBOT_RESCUE_PATH_V1: LearningPathVersionV1;
348
+ /**
349
+ * Uniformly priced successor to the immutable 1.0.0 pilot catalog.
350
+ *
351
+ * All modules remain independently sellable and retain their existing content,
352
+ * manifests and safeguards. The new module and path versions bind the new price
353
+ * without altering previously published records.
354
+ */
355
+ declare const JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_1: LearningPathVersionV1;
356
+ /** Current pilot catalog for server adapters that intentionally follow releases. */
357
+ declare const JUNIOR_CODER_ROBOT_RESCUE_PATH_CURRENT: LearningPathVersionV1;
358
+
359
+ /** Validate the deterministic 20/50/20/10 assessment authority. */
360
+ declare function validateAssessmentRubric(rubric: AssessmentRubricV1, path?: string, moduleId?: string): LearningValidationIssueV1[];
361
+
362
+ declare const JUNIOR_CODER_MISSION_STAGE_ORDER_V1: readonly ["learn", "predict", "build", "run", "assess", "inspect", "fix", "explain", "reward"];
363
+ /**
364
+ * Validate learner/facilitator authoring against one immutable catalog module.
365
+ * The complete issue set is returned so authoring tools can fix errors in one pass.
366
+ */
367
+ declare function validateMissionAuthoringBundle(bundle: MissionAuthoringBundleV1, module: LearningModuleVersionV1): MissionAuthoringValidationIssueV1[];
368
+ /** Fail fast for CI and immutable authoring registration. */
369
+ declare function assertValidMissionAuthoringBundle(bundle: MissionAuthoringBundleV1, module: LearningModuleVersionV1): void;
370
+ /** Original first-mission exemplar; no protected content appears in learner data. */
371
+ declare const ROAD_HOPPER_RALLY_MISSION_ONE_AUTHORING_V1: MissionAuthoringBundleV1;
227
372
 
228
373
  /** Return every catalog issue without throwing, suitable for authoring tools. */
229
374
  declare function validateLearningPath(path: LearningPathVersionV1): LearningValidationIssueV1[];
230
375
  /** Fail fast when a path is not safe to publish or consume. */
231
376
  declare function assertValidLearningPath(path: LearningPathVersionV1): void;
232
377
 
233
- export { type AssessmentCheckResultV1, type AssessmentCriterionV1, type AssessmentDimensionV1, type AssessmentResultV1, type AssessmentRubricV1, type AttemptEvidenceV1, type BadgeDefinitionV1, type CommercialStateV1, type CourseMaterialAudienceV1, type CourseMaterialKindV1, type CourseMaterialV1, type CourseMaterialsManifestV1, type GuardianAiConsentV1, type HardwareItemV1, type HardwareModeV1, type HardwareRequirementManifestV1, type HardwareVerificationStatusV1, JUNIOR_CODER_ROBOT_RESCUE_PATH_V1, type LearningGoalV1, type LearningModuleVersionV1, type LearningPathVersionV1, type LearningValidationIssueV1, type MissionV1, type ModuleAgentDefinitionV1, type ModuleAgentFeedbackV1, type ModuleAgentRoleV1, type ModuleCategoryV1, type ModuleEntitlementV1, type ModulePricingV1, type PublishedStaticProjectSnapshotV1, type ScoreBandV1, assertValidLearningPath, calculateAssessment, validateLearningPath };
378
+ export { type AssessmentCheckResultV1, type AssessmentCriterionV1, type AssessmentDimensionV1, type AssessmentResultV1, type AssessmentRubricV1, type AttemptEvidenceV1, type BadgeDefinitionV1, type CommercialStateV1, type CourseMaterialAudienceV1, type CourseMaterialKindV1, type CourseMaterialV1, type CourseMaterialsManifestV1, type FacilitatorMissionAuthoringV1, type GuardianAiConsentV1, type HardwareItemV1, type HardwareModeV1, type HardwareRequirementManifestV1, type HardwareVerificationStatusV1, JUNIOR_CODER_MISSION_STAGE_ORDER_V1, JUNIOR_CODER_MODULE_PRICE_V1_1, JUNIOR_CODER_ROBOT_RESCUE_PATH_CURRENT, JUNIOR_CODER_ROBOT_RESCUE_PATH_V1, JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_1, type LearnerMissionAuthoringV1, type LearningGoalV1, type LearningModuleVersionV1, type LearningPathVersionV1, type LearningValidationIssueV1, MISSION_AUTHORING_CONTRACT_VERSION_V1, type MissionAccessibilityAlternativeV1, type MissionArtifactKindV1, type MissionArtifactReferenceV1, type MissionAuthoringBundleV1, type MissionAuthoringGoalV1, type MissionAuthoringValidationIssueV1, type MissionEvidenceKindV1, type MissionEvidenceRequirementV1, type MissionEvidenceRetentionV1, type MissionInteractionModeV1, type MissionInteractionRequirementV1, type MissionReadinessCheckV1, type MissionRewardBindingV1, type MissionSideAdventureV1, type MissionStageCardV1, type MissionStageKindV1, type MissionV1, type ModuleAgentDefinitionV1, type ModuleAgentFeedbackV1, type ModuleAgentRoleV1, type ModuleCategoryV1, type ModuleEntitlementV1, type ModulePricingV1, type ModuleReferencePriceV1, type PublishedStaticProjectSnapshotV1, ROAD_HOPPER_RALLY_MISSION_ONE_AUTHORING_V1, type ScoreBandV1, assertValidLearningPath, assertValidMissionAuthoringBundle, calculateAssessment, validateAssessmentRubric, validateLearningPath, validateMissionAuthoringBundle };