@plasius/learning 0.2.21 → 0.2.22

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/README.md CHANGED
@@ -7,22 +7,39 @@ The package does **not** provide HTTP handlers, persistence, authentication, Tok
7
7
  ## Junior Coder catalog
8
8
 
9
9
  The initial immutable catalog is exported as
10
- `JUNIOR_CODER_ROBOT_RESCUE_PATH_V1`. The current uniformly priced pilot
11
- catalog is exported as `JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_1`, with
12
- `JUNIOR_CODER_ROBOT_RESCUE_PATH_CURRENT` available to adapters that
13
- intentionally follow published successors. Each contains 19 independently
14
- sellable, self-contained project modules:
10
+ `JUNIOR_CODER_ROBOT_RESCUE_PATH_V1`, and its uniformly priced successor remains
11
+ available as `JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_1`. Path `1.2.0` upgrades Road
12
+ Hopper Rally; path `1.3.0` is exported as
13
+ `JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_3` and selected by
14
+ `JUNIOR_CODER_ROBOT_RESCUE_PATH_CURRENT`. It also upgrades Paddle Pulse to
15
+ module `2.0.0`; the other seventeen modules retain their prior immutable
16
+ versions. Each path
17
+ contains 19 independently sellable, self-contained project modules:
15
18
 
16
19
  - 8 original arcade game modules;
17
20
  - 5 simulator-backed robotics modules;
18
21
  - 3 constrained Vibe Coding modules;
19
22
  - 3 web application modules.
20
23
 
21
- Both catalogs remain in `pilot-grant-only` commercial state. The immutable
22
- `1.1.0` modules each cost 50 Tokens (50,000 subunits), carrying a
24
+ All catalogs remain in `pilot-grant-only` commercial state. The immutable
25
+ `1.1.0` modules, Road Hopper Rally `2.0.0` and Paddle Pulse `2.0.0` each cost 50 Tokens (50,000 subunits), carrying a
23
26
  non-redeemable £5 reference value. Price metadata is not authorization to
24
27
  enable public checkout.
25
28
 
29
+ Road Hopper Rally `2.0.0` is a 450-minute, six-mission catalog record whose
30
+ 54-stage course, starter project, deterministic runtime, original assets and
31
+ assessment definitions live in `@plasius/learning-road-hopper-rally@1.0.0`.
32
+ The catalog pins the exact `ROAD_HOPPER_RALLY_COURSE_V2` export and its canonical
33
+ SHA-256 digest through `ExternalLearningContentReferenceV1`; it does not import
34
+ or bundle the executable content package.
35
+
36
+ Paddle Pulse `2.0.0` is a 360-minute, six-mission catalog record whose 54-stage
37
+ course, declarative program contracts, deterministic 60 Hz engine and protected
38
+ assessment live in `@plasius/learning-paddle-pulse@0.1.0`. The catalog pins the
39
+ exact `PADDLE_PULSE_MODULE_V2` export, schema `2` and canonical SHA-256 digest
40
+ without importing the package. Paddle Pulse `1.1.0` and its mission-authoring
41
+ export remain available unchanged.
42
+
26
43
  ## Install
27
44
 
28
45
  ```bash
@@ -40,6 +57,20 @@ import {
40
57
  assertValidLearningPath(JUNIOR_CODER_ROBOT_RESCUE_PATH_CURRENT);
41
58
  ```
42
59
 
60
+ Consumers resolving external course content must verify all five reference
61
+ fields before use:
62
+
63
+ ```ts
64
+ import {
65
+ ROAD_HOPPER_RALLY_EXTERNAL_CONTENT_V1,
66
+ isExternalLearningContentReferenceV1,
67
+ } from "@plasius/learning";
68
+
69
+ if (!isExternalLearningContentReferenceV1(ROAD_HOPPER_RALLY_EXTERNAL_CONTENT_V1)) {
70
+ throw new Error("Invalid external learning content reference");
71
+ }
72
+ ```
73
+
43
74
  ## Calculate an assessment
44
75
 
45
76
  ```ts
@@ -303,6 +334,8 @@ assertValidMissionAuthoringBundle(
303
334
  ## Contract rules
304
335
 
305
336
  - Published IDs and versions are immutable.
337
+ - External course content uses exact package and export names, a stable semantic
338
+ version and a lower-case canonical SHA-256 digest; version ranges are invalid.
306
339
  - Reference prices are product-copy metadata and never create cash redemption
307
340
  rights.
308
341
  - A module entitlement must bind to an exact module version.
package/dist/index.cjs CHANGED
@@ -28,18 +28,25 @@ __export(index_exports, {
28
28
  CONTEXTUAL_VOICE_SUGGESTED_ACTIONS_V1: () => CONTEXTUAL_VOICE_SUGGESTED_ACTIONS_V1,
29
29
  CREATURE_CARE_DASHBOARD_MISSION_ONE_AUTHORING_V1: () => CREATURE_CARE_DASHBOARD_MISSION_ONE_AUTHORING_V1,
30
30
  DANCE_ROVER_MISSION_ONE_AUTHORING_V1: () => DANCE_ROVER_MISSION_ONE_AUTHORING_V1,
31
+ EXTERNAL_LEARNING_CONTENT_REFERENCE_VERSION_V1: () => EXTERNAL_LEARNING_CONTENT_REFERENCE_VERSION_V1,
31
32
  JUNIOR_CODER_MISSION_STAGE_ORDER_V1: () => JUNIOR_CODER_MISSION_STAGE_ORDER_V1,
32
33
  JUNIOR_CODER_MODULE_PRICE_V1_1: () => JUNIOR_CODER_MODULE_PRICE_V1_1,
34
+ JUNIOR_CODER_PADDLE_PULSE_V2: () => JUNIOR_CODER_PADDLE_PULSE_V2,
35
+ JUNIOR_CODER_ROAD_HOPPER_RALLY_V2: () => JUNIOR_CODER_ROAD_HOPPER_RALLY_V2,
33
36
  JUNIOR_CODER_ROBOT_RESCUE_PATH_CURRENT: () => JUNIOR_CODER_ROBOT_RESCUE_PATH_CURRENT,
34
37
  JUNIOR_CODER_ROBOT_RESCUE_PATH_V1: () => JUNIOR_CODER_ROBOT_RESCUE_PATH_V1,
35
38
  JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_1: () => JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_1,
39
+ JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_2: () => JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_2,
40
+ JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_3: () => JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_3,
36
41
  METEOR_SHIELD_MISSION_ONE_AUTHORING_V1: () => METEOR_SHIELD_MISSION_ONE_AUTHORING_V1,
37
42
  MISSION_AUTHORING_CONTRACT_VERSION_V1: () => MISSION_AUTHORING_CONTRACT_VERSION_V1,
38
43
  OBSTACLE_EXPLORER_MISSION_ONE_AUTHORING_V1: () => OBSTACLE_EXPLORER_MISSION_ONE_AUTHORING_V1,
44
+ PADDLE_PULSE_EXTERNAL_CONTENT_V1: () => PADDLE_PULSE_EXTERNAL_CONTENT_V1,
39
45
  PADDLE_PULSE_MISSION_ONE_AUTHORING_V1: () => PADDLE_PULSE_MISSION_ONE_AUTHORING_V1,
40
46
  PIXEL_TRAIL_CHALLENGE_MISSION_ONE_AUTHORING_V1: () => PIXEL_TRAIL_CHALLENGE_MISSION_ONE_AUTHORING_V1,
41
47
  RAINBOW_RESCUE_ROVER_MISSION_ONE_AUTHORING_V1: () => RAINBOW_RESCUE_ROVER_MISSION_ONE_AUTHORING_V1,
42
48
  RESCUE_CREW_COMMANDER_MISSION_ONE_AUTHORING_V1: () => RESCUE_CREW_COMMANDER_MISSION_ONE_AUTHORING_V1,
49
+ ROAD_HOPPER_RALLY_EXTERNAL_CONTENT_V1: () => ROAD_HOPPER_RALLY_EXTERNAL_CONTENT_V1,
43
50
  ROAD_HOPPER_RALLY_MISSION_ONE_AUTHORING_V1: () => ROAD_HOPPER_RALLY_MISSION_ONE_AUTHORING_V1,
44
51
  ROBOT_MAZE_DASH_MISSION_ONE_AUTHORING_V1: () => ROBOT_MAZE_DASH_MISSION_ONE_AUTHORING_V1,
45
52
  ROBOT_MISSION_CONTROL_MISSION_ONE_AUTHORING_V1: () => ROBOT_MISSION_CONTROL_MISSION_ONE_AUTHORING_V1,
@@ -67,6 +74,7 @@ __export(index_exports, {
67
74
  assertValidStaticProjectSnapshot: () => assertValidStaticProjectSnapshot,
68
75
  assertValidVoiceHelpAvailability: () => assertValidVoiceHelpAvailability,
69
76
  calculateAssessment: () => calculateAssessment,
77
+ isExternalLearningContentReferenceV1: () => isExternalLearningContentReferenceV1,
70
78
  validateAssessmentRubric: () => validateAssessmentRubric,
71
79
  validateLearningPath: () => validateLearningPath,
72
80
  validateMissionAuthoringBundle: () => validateMissionAuthoringBundle,
@@ -644,9 +652,250 @@ var JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_1 = {
644
652
  }
645
653
  }))
646
654
  };
647
- var JUNIOR_CODER_ROBOT_RESCUE_PATH_CURRENT = JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_1;
655
+ var ROAD_HOPPER_RALLY_EXTERNAL_CONTENT_V1 = Object.freeze({
656
+ packageName: "@plasius/learning-road-hopper-rally",
657
+ packageVersion: "1.0.0",
658
+ exportName: "ROAD_HOPPER_RALLY_COURSE_V2",
659
+ schemaVersion: "2",
660
+ sha256: "1a20741beba028004e0be527d05aae2b2881082d3b578e0d62308a59bf1323f0"
661
+ });
662
+ var roadHopperV1_1 = JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_1.modules.find(
663
+ (entry) => entry.id === "junior-coder.road-hopper-rally"
664
+ );
665
+ var ROAD_HOPPER_RALLY_V2_MISSIONS = [
666
+ {
667
+ id: "board",
668
+ title: "Build the Rally Board",
669
+ concepts: ["coordinate grids", "arrays", "entity state", "rendering"],
670
+ statement: "Create the road, median, river and five distinct home bays in board.js.",
671
+ sideAdventure: "Design an original high-contrast board palette without changing its mechanics."
672
+ },
673
+ {
674
+ id: "hopper",
675
+ title: "Move the Hopper",
676
+ concepts: ["events", "bounded movement", "keyboard input", "touch input", "respawning"],
677
+ statement: "Implement four-direction tile movement, bounds, equivalent inputs and respawning in hopper.js.",
678
+ sideAdventure: "Add an accessible movement status phrase for every successful hop."
679
+ },
680
+ {
681
+ id: "traffic",
682
+ title: "Create Rally Traffic",
683
+ concepts: ["spawning", "fixed-step updates", "wrapping", "collision detection", "difficulty"],
684
+ statement: "Implement five deterministic traffic lanes, collisions, lives and difficulty in traffic.js.",
685
+ sideAdventure: "Invent an original vehicle type while preserving the entity and collision limits."
686
+ },
687
+ {
688
+ id: "river",
689
+ title: "Cross the Moving River",
690
+ concepts: ["moving platforms", "carrying", "hazards", "state machines", "off-screen bounds"],
691
+ statement: "Implement logs, carrying, water deaths, diving platforms and edge hazards in river.js.",
692
+ sideAdventure: "Create an original visual warning for a platform that is about to dive."
693
+ },
694
+ {
695
+ id: "rules",
696
+ title: "Add Rally Rules",
697
+ concepts: ["timers", "lives", "scoring", "bonuses", "levels", "game over"],
698
+ statement: "Implement homes, occupied and blocked bays, timer, scoring, bonuses and level progression in rules.js.",
699
+ sideAdventure: "Tune a practice-speed preset that keeps every rule deterministic."
700
+ },
701
+ {
702
+ id: "game",
703
+ title: "Complete Road Hopper Rally",
704
+ concepts: ["system assembly", "pause and restart", "alternating players", "audio", "accessibility", "testing"],
705
+ statement: "Assemble the systems, accessibility modes and alternating-player finale in game.js, then pass the protected challenge.",
706
+ sideAdventure: "Polish the finished game with original captions, visual cues and reduced-motion feedback."
707
+ }
708
+ ];
709
+ var JUNIOR_CODER_ROAD_HOPPER_RALLY_V2 = {
710
+ ...roadHopperV1_1,
711
+ version: "2.0.0",
712
+ contentRevision: "2026-08-11.1",
713
+ summary: "Recreate the systems behind a classic road-and-river crossing game using original Road Hopper Rally code, art, audio and presentation.",
714
+ estimatedMinutes: 450,
715
+ tools: [
716
+ "JavaScript",
717
+ "QuickJS sandbox",
718
+ "Deterministic 30 Hz engine",
719
+ "Road Hopper renderer"
720
+ ],
721
+ concepts: [
722
+ "coordinates",
723
+ "arrays and entity state",
724
+ "events and input",
725
+ "fixed-step update and render",
726
+ "spawning and movement",
727
+ "collision detection",
728
+ "state machines",
729
+ "timers, lives and scoring",
730
+ "difficulty progression",
731
+ "audio integration",
732
+ "debugging",
733
+ "deterministic testing"
734
+ ],
735
+ missions: ROAD_HOPPER_RALLY_V2_MISSIONS.map((missionDefinition, index) => ({
736
+ id: `road-hopper-rally-mission-${index + 1}-${missionDefinition.id}`,
737
+ title: missionDefinition.title,
738
+ estimatedMinutes: 75,
739
+ concepts: [...missionDefinition.concepts],
740
+ goals: [
741
+ {
742
+ id: `road-hopper-rally-v2-${missionDefinition.id}`,
743
+ statement: missionDefinition.statement,
744
+ evidence: "assessment"
745
+ }
746
+ ],
747
+ sideAdventure: missionDefinition.sideAdventure
748
+ })),
749
+ assessment: {
750
+ version: "2.0.0",
751
+ completionScore: 80,
752
+ criteria: [
753
+ { id: "road-hopper-v2-structure", label: "All six bounded JavaScript files compile and assemble.", dimension: "structure", points: 20, mandatory: true, visibility: "visible" },
754
+ { id: "road-hopper-v2-road", label: "Board, input and traffic behaviours pass deterministic scenarios.", dimension: "behaviour", points: 15, mandatory: true, visibility: "visible" },
755
+ { id: "road-hopper-v2-river", label: "River platforms, carrying and hazards pass deterministic scenarios.", dimension: "behaviour", points: 15, mandatory: true, visibility: "visible" },
756
+ { id: "road-hopper-v2-rules", label: "Homes, timer, lives, scoring, bonuses and levels behave correctly.", dimension: "behaviour", points: 20, mandatory: true, visibility: "visible" },
757
+ { id: "road-hopper-v2-final", label: "The complete game passes the server-only protected final challenge.", dimension: "resilience", points: 20, mandatory: true, visibility: "protected" },
758
+ { id: "road-hopper-v2-safety", label: "The project stays within the sandbox, resource and privacy boundaries.", dimension: "safety", points: 10, mandatory: true, visibility: "visible" }
759
+ ]
760
+ },
761
+ badges: [
762
+ {
763
+ id: "road-hopper-rally-v2-complete",
764
+ title: "Road Hopper Rally Champion",
765
+ evidence: "module-score",
766
+ tradeable: false,
767
+ tokenConvertible: false
768
+ }
769
+ ],
770
+ externalContent: ROAD_HOPPER_RALLY_EXTERNAL_CONTENT_V1
771
+ };
772
+ var JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_2 = {
773
+ ...JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_1,
774
+ version: "1.2.0",
775
+ modules: JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_1.modules.map((entry) => entry.id === JUNIOR_CODER_ROAD_HOPPER_RALLY_V2.id ? JUNIOR_CODER_ROAD_HOPPER_RALLY_V2 : entry)
776
+ };
777
+ var PADDLE_PULSE_EXTERNAL_CONTENT_V1 = Object.freeze({
778
+ packageName: "@plasius/learning-paddle-pulse",
779
+ packageVersion: "0.1.0",
780
+ exportName: "PADDLE_PULSE_MODULE_V2",
781
+ schemaVersion: "2",
782
+ sha256: "19f3666bdb523a3faf069341b0bc748996b3db282f89171e3c9f0a373a8c8f7e"
783
+ });
784
+ var paddlePulseV1_1 = JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_1.modules.find(
785
+ (entry) => entry.id === "junior-coder.paddle-pulse"
786
+ );
787
+ var PADDLE_PULSE_V2_MISSIONS = [
788
+ {
789
+ id: "court-coordinates",
790
+ title: "Court & Coordinates",
791
+ concepts: ["coordinates", "canvas primitives", "game loops", "bounds"],
792
+ statement: "Build a responsive 640 \xD7 480 logical court with a bounded paddle and ball.",
793
+ sideAdventure: "Create an original high-contrast court palette without changing its geometry."
794
+ },
795
+ {
796
+ id: "paddle-controls",
797
+ title: "Paddle Controls",
798
+ concepts: ["input state", "Pointer Events", "keyboard input", "clamping"],
799
+ statement: "Implement equivalent Arrow/A/D and direct horizontal pointer-drag controls.",
800
+ sideAdventure: "Add a semantic movement trace that does not rely on animation."
801
+ },
802
+ {
803
+ id: "ball-motion",
804
+ title: "Ball Motion & Bounces",
805
+ concepts: ["velocity", "fixed timesteps", "reflection", "contact normals", "paddle angles"],
806
+ statement: "Implement deterministic ball motion plus controlled wall and paddle reflections.",
807
+ sideAdventure: "Design a reduced-motion trajectory inspector for one rally."
808
+ },
809
+ {
810
+ id: "bricks-collisions",
811
+ title: "Bricks & Collisions",
812
+ concepts: ["arrays", "loops", "brick grids", "AABB collision", "resolution"],
813
+ statement: "Create an original brick grid whose bricks score once and disappear on impact.",
814
+ sideAdventure: "Invent a new visual brick pattern using the same bounded collision rules."
815
+ },
816
+ {
817
+ id: "score-lives-states",
818
+ title: "Score, Lives & States",
819
+ concepts: ["state machines", "invariants", "scoring", "lives", "HUD state"],
820
+ statement: "Implement serve, pause, life loss, level clear, game over, score and HUD states.",
821
+ sideAdventure: "Add a printable state-transition table for a facilitator or screen-reader user."
822
+ },
823
+ {
824
+ id: "levels-final-game",
825
+ title: "Levels, Sound & Final Game",
826
+ concepts: ["level data", "difficulty", "responsive rendering", "accessible audio", "testing"],
827
+ statement: "Assemble multiple original levels, optional generated cues and the integrated final game.",
828
+ sideAdventure: "After completion, add an optional original power-up without changing core assessment."
829
+ }
830
+ ];
831
+ var JUNIOR_CODER_PADDLE_PULSE_V2 = {
832
+ ...paddlePulseV1_1,
833
+ version: "2.0.0",
834
+ contentRevision: "2026-08-11.1",
835
+ summary: "Build an original Plasius brick-breaker while learning rendering, equivalent input, deterministic physics, collisions, score, lives, states, levels, accessible sound and testing.",
836
+ estimatedMinutes: 360,
837
+ tools: [
838
+ "JavaScript",
839
+ "QuickJS sandbox",
840
+ "Deterministic 60 Hz engine",
841
+ "Responsive Paddle Pulse renderer"
842
+ ],
843
+ concepts: [
844
+ "coordinates and rendering",
845
+ "game loops and fixed timesteps",
846
+ "keyboard and pointer input",
847
+ "velocity and reflection",
848
+ "collision detection and resolution",
849
+ "arrays and brick grids",
850
+ "scoring, lives and state machines",
851
+ "level data and difficulty",
852
+ "accessible generated audio",
853
+ "debugging and deterministic testing"
854
+ ],
855
+ missions: PADDLE_PULSE_V2_MISSIONS.map((missionDefinition, index) => ({
856
+ id: `paddle-pulse-mission-${index + 1}-${missionDefinition.id}`,
857
+ title: missionDefinition.title,
858
+ estimatedMinutes: 60,
859
+ concepts: [...missionDefinition.concepts],
860
+ goals: [{
861
+ id: `paddle-pulse-v2-${missionDefinition.id}`,
862
+ statement: missionDefinition.statement,
863
+ evidence: "assessment"
864
+ }],
865
+ sideAdventure: missionDefinition.sideAdventure
866
+ })),
867
+ assessment: {
868
+ version: "2.0.0",
869
+ completionScore: 80,
870
+ criteria: [
871
+ { id: "paddle-pulse-v2-court", label: "The logical court, paddle and initial scene are finite, responsive and bounded.", dimension: "structure", points: 20, mandatory: false, visibility: "visible" },
872
+ { id: "paddle-pulse-v2-controls", label: "Keyboard and pointer paths produce equivalent clamped paddle input.", dimension: "behaviour", points: 15, mandatory: false, visibility: "visible" },
873
+ { id: "paddle-pulse-v2-motion", label: "Ball motion and wall/paddle reflections pass deterministic trajectories.", dimension: "behaviour", points: 15, mandatory: false, visibility: "visible" },
874
+ { id: "paddle-pulse-v2-bricks", label: "Brick face, corner and adjacent impacts resolve without double-scoring.", dimension: "behaviour", points: 20, mandatory: false, visibility: "visible" },
875
+ { id: "paddle-pulse-v2-states", label: "Score, lives, serve, pause, level-clear and game-over transitions preserve invariants.", dimension: "resilience", points: 10, mandatory: false, visibility: "visible" },
876
+ { id: "paddle-pulse-v2-final", label: "Multiple original levels and the integrated game pass protected deterministic scenarios.", dimension: "resilience", points: 10, mandatory: false, visibility: "protected" },
877
+ { id: "paddle-pulse-v2-safety", label: "Source, commands, runtime resources and assessment remain inside sandbox limits.", dimension: "safety", points: 10, mandatory: true, visibility: "visible" }
878
+ ]
879
+ },
880
+ badges: [
881
+ { id: "paddle-pulse-v2-court-builder", title: "Court Builder", evidence: "mission-score", tradeable: false, tokenConvertible: false },
882
+ { id: "paddle-pulse-v2-paddle-pilot", title: "Paddle Pilot", evidence: "mission-score", tradeable: false, tokenConvertible: false },
883
+ { id: "paddle-pulse-v2-rally-master", title: "Rally Master", evidence: "mission-score", tradeable: false, tokenConvertible: false },
884
+ { id: "paddle-pulse-v2-brick-breaker", title: "Brick Breaker", evidence: "mission-score", tradeable: false, tokenConvertible: false },
885
+ { id: "paddle-pulse-v2-game-keeper", title: "Game Keeper", evidence: "mission-score", tradeable: false, tokenConvertible: false },
886
+ { id: "paddle-pulse-v2-complete", title: "Paddle Pulse Champion", evidence: "module-score", tradeable: false, tokenConvertible: false }
887
+ ],
888
+ externalContent: PADDLE_PULSE_EXTERNAL_CONTENT_V1
889
+ };
890
+ var JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_3 = {
891
+ ...JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_2,
892
+ version: "1.3.0",
893
+ modules: JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_2.modules.map((entry) => entry.id === JUNIOR_CODER_PADDLE_PULSE_V2.id ? JUNIOR_CODER_PADDLE_PULSE_V2 : entry)
894
+ };
895
+ var JUNIOR_CODER_ROBOT_RESCUE_PATH_CURRENT = JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_3;
648
896
 
649
897
  // src/contracts.ts
898
+ var EXTERNAL_LEARNING_CONTENT_REFERENCE_VERSION_V1 = "1";
650
899
  var MISSION_AUTHORING_CONTRACT_VERSION_V1 = "1.0.0";
651
900
 
652
901
  // src/contextual-help.ts
@@ -6838,6 +7087,16 @@ var ROAD_HOPPER_RALLY_MISSION_ONE_AUTHORING_V1 = {
6838
7087
 
6839
7088
  // src/validation.ts
6840
7089
  var CANONICAL_TOKEN_SUBUNITS = /^(0|[1-9][0-9]*)$/u;
7090
+ var EXACT_PACKAGE_NAME = /^@plasius\/[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/u;
7091
+ var EXACT_SEMVER = /^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$/u;
7092
+ var EXPORT_NAME = /^[A-Za-z_$][A-Za-z0-9_$]*$/u;
7093
+ var CONTENT_SCHEMA_VERSION = /^(0|[1-9][0-9]*)$/u;
7094
+ var SHA256 = /^[a-f0-9]{64}$/u;
7095
+ function isExternalLearningContentReferenceV1(value) {
7096
+ if (typeof value !== "object" || value === null) return false;
7097
+ const candidate = value;
7098
+ return Object.keys(value).length === 5 && typeof candidate.packageName === "string" && EXACT_PACKAGE_NAME.test(candidate.packageName) && typeof candidate.packageVersion === "string" && EXACT_SEMVER.test(candidate.packageVersion) && typeof candidate.exportName === "string" && EXPORT_NAME.test(candidate.exportName) && typeof candidate.schemaVersion === "string" && CONTENT_SCHEMA_VERSION.test(candidate.schemaVersion) && typeof candidate.sha256 === "string" && SHA256.test(candidate.sha256);
7099
+ }
6841
7100
  function issue(code, message, path, moduleId) {
6842
7101
  return { code, message, path, ...moduleId ? { moduleId } : {} };
6843
7102
  }
@@ -6952,6 +7211,17 @@ function validateModule(module3, moduleIndex) {
6952
7211
  )
6953
7212
  );
6954
7213
  }
7214
+ const externalContent = module3.externalContent;
7215
+ if (externalContent && !isExternalLearningContentReferenceV1(externalContent)) {
7216
+ issues.push(
7217
+ issue(
7218
+ "invalid-external-content-reference",
7219
+ "External content must use an exact @plasius package, stable semantic version, named export, schema version and lower-case SHA-256 digest.",
7220
+ `${base}.externalContent`,
7221
+ module3.id
7222
+ )
7223
+ );
7224
+ }
6955
7225
  return issues;
6956
7226
  }
6957
7227
  function validateLearningPath(path) {
@@ -7002,18 +7272,25 @@ ${summary}`);
7002
7272
  CONTEXTUAL_VOICE_SUGGESTED_ACTIONS_V1,
7003
7273
  CREATURE_CARE_DASHBOARD_MISSION_ONE_AUTHORING_V1,
7004
7274
  DANCE_ROVER_MISSION_ONE_AUTHORING_V1,
7275
+ EXTERNAL_LEARNING_CONTENT_REFERENCE_VERSION_V1,
7005
7276
  JUNIOR_CODER_MISSION_STAGE_ORDER_V1,
7006
7277
  JUNIOR_CODER_MODULE_PRICE_V1_1,
7278
+ JUNIOR_CODER_PADDLE_PULSE_V2,
7279
+ JUNIOR_CODER_ROAD_HOPPER_RALLY_V2,
7007
7280
  JUNIOR_CODER_ROBOT_RESCUE_PATH_CURRENT,
7008
7281
  JUNIOR_CODER_ROBOT_RESCUE_PATH_V1,
7009
7282
  JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_1,
7283
+ JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_2,
7284
+ JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_3,
7010
7285
  METEOR_SHIELD_MISSION_ONE_AUTHORING_V1,
7011
7286
  MISSION_AUTHORING_CONTRACT_VERSION_V1,
7012
7287
  OBSTACLE_EXPLORER_MISSION_ONE_AUTHORING_V1,
7288
+ PADDLE_PULSE_EXTERNAL_CONTENT_V1,
7013
7289
  PADDLE_PULSE_MISSION_ONE_AUTHORING_V1,
7014
7290
  PIXEL_TRAIL_CHALLENGE_MISSION_ONE_AUTHORING_V1,
7015
7291
  RAINBOW_RESCUE_ROVER_MISSION_ONE_AUTHORING_V1,
7016
7292
  RESCUE_CREW_COMMANDER_MISSION_ONE_AUTHORING_V1,
7293
+ ROAD_HOPPER_RALLY_EXTERNAL_CONTENT_V1,
7017
7294
  ROAD_HOPPER_RALLY_MISSION_ONE_AUTHORING_V1,
7018
7295
  ROBOT_MAZE_DASH_MISSION_ONE_AUTHORING_V1,
7019
7296
  ROBOT_MISSION_CONTROL_MISSION_ONE_AUTHORING_V1,
@@ -7041,6 +7318,7 @@ ${summary}`);
7041
7318
  assertValidStaticProjectSnapshot,
7042
7319
  assertValidVoiceHelpAvailability,
7043
7320
  calculateAssessment,
7321
+ isExternalLearningContentReferenceV1,
7044
7322
  validateAssessmentRubric,
7045
7323
  validateLearningPath,
7046
7324
  validateMissionAuthoringBundle,