@plasius/learning 0.2.6 → 0.2.8

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
@@ -65,10 +65,12 @@ import {
65
65
  JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_1,
66
66
  METEOR_SHIELD_MISSION_ONE_AUTHORING_V1,
67
67
  PADDLE_PULSE_MISSION_ONE_AUTHORING_V1,
68
+ PIXEL_TRAIL_CHALLENGE_MISSION_ONE_AUTHORING_V1,
68
69
  RESCUE_CREW_COMMANDER_MISSION_ONE_AUTHORING_V1,
69
70
  ROAD_HOPPER_RALLY_MISSION_ONE_AUTHORING_V1,
70
71
  ROBOT_MAZE_DASH_MISSION_ONE_AUTHORING_V1,
71
72
  SKYWING_SPRINT_MISSION_ONE_AUTHORING_V1,
73
+ STAR_DEFENDER_SQUADRON_MISSION_ONE_AUTHORING_V1,
72
74
  assertValidMissionAuthoringBundle,
73
75
  } from "@plasius/learning";
74
76
 
@@ -90,6 +92,12 @@ const meteorShield = JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_1.modules.find(
90
92
  const rescueCrewCommander = JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_1.modules.find(
91
93
  (module) => module.slug === "rescue-crew-commander",
92
94
  );
95
+ const pixelTrailChallenge = JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_1.modules.find(
96
+ (module) => module.slug === "pixel-trail-challenge",
97
+ );
98
+ const starDefenderSquadron = JUNIOR_CODER_ROBOT_RESCUE_PATH_V1_1.modules.find(
99
+ (module) => module.slug === "star-defender-squadron",
100
+ );
93
101
 
94
102
  if (
95
103
  !roadHopper ||
@@ -97,7 +105,9 @@ if (
97
105
  !skywing ||
98
106
  !paddlePulse ||
99
107
  !meteorShield ||
100
- !rescueCrewCommander
108
+ !rescueCrewCommander ||
109
+ !pixelTrailChallenge ||
110
+ !starDefenderSquadron
101
111
  ) {
102
112
  throw new Error("Junior Coder module is missing");
103
113
  }
@@ -126,6 +136,14 @@ assertValidMissionAuthoringBundle(
126
136
  RESCUE_CREW_COMMANDER_MISSION_ONE_AUTHORING_V1,
127
137
  rescueCrewCommander,
128
138
  );
139
+ assertValidMissionAuthoringBundle(
140
+ PIXEL_TRAIL_CHALLENGE_MISSION_ONE_AUTHORING_V1,
141
+ pixelTrailChallenge,
142
+ );
143
+ assertValidMissionAuthoringBundle(
144
+ STAR_DEFENDER_SQUADRON_MISSION_ONE_AUTHORING_V1,
145
+ starDefenderSquadron,
146
+ );
129
147
  ```
130
148
 
131
149
  ## Contract rules
package/dist/index.cjs CHANGED
@@ -28,10 +28,12 @@ __export(index_exports, {
28
28
  METEOR_SHIELD_MISSION_ONE_AUTHORING_V1: () => METEOR_SHIELD_MISSION_ONE_AUTHORING_V1,
29
29
  MISSION_AUTHORING_CONTRACT_VERSION_V1: () => MISSION_AUTHORING_CONTRACT_VERSION_V1,
30
30
  PADDLE_PULSE_MISSION_ONE_AUTHORING_V1: () => PADDLE_PULSE_MISSION_ONE_AUTHORING_V1,
31
+ PIXEL_TRAIL_CHALLENGE_MISSION_ONE_AUTHORING_V1: () => PIXEL_TRAIL_CHALLENGE_MISSION_ONE_AUTHORING_V1,
31
32
  RESCUE_CREW_COMMANDER_MISSION_ONE_AUTHORING_V1: () => RESCUE_CREW_COMMANDER_MISSION_ONE_AUTHORING_V1,
32
33
  ROAD_HOPPER_RALLY_MISSION_ONE_AUTHORING_V1: () => ROAD_HOPPER_RALLY_MISSION_ONE_AUTHORING_V1,
33
34
  ROBOT_MAZE_DASH_MISSION_ONE_AUTHORING_V1: () => ROBOT_MAZE_DASH_MISSION_ONE_AUTHORING_V1,
34
35
  SKYWING_SPRINT_MISSION_ONE_AUTHORING_V1: () => SKYWING_SPRINT_MISSION_ONE_AUTHORING_V1,
36
+ STAR_DEFENDER_SQUADRON_MISSION_ONE_AUTHORING_V1: () => STAR_DEFENDER_SQUADRON_MISSION_ONE_AUTHORING_V1,
35
37
  assertValidLearningPath: () => assertValidLearningPath,
36
38
  assertValidMissionAuthoringBundle: () => assertValidMissionAuthoringBundle,
37
39
  calculateAssessment: () => calculateAssessment,
@@ -1785,6 +1787,446 @@ var PADDLE_PULSE_MISSION_ONE_AUTHORING_V1 = {
1785
1787
  ]
1786
1788
  }
1787
1789
  };
1790
+ var PIXEL_TRAIL_CHALLENGE_MISSION_ONE_AUTHORING_V1 = {
1791
+ version: MISSION_AUTHORING_CONTRACT_VERSION_V1,
1792
+ moduleId: "junior-coder.pixel-trail-challenge",
1793
+ moduleVersion: "1.1.0",
1794
+ missionId: "pixel-trail-challenge-mission-1",
1795
+ learner: {
1796
+ estimatedMinutes: 20,
1797
+ stages: [
1798
+ {
1799
+ kind: "learn",
1800
+ instruction: "Read what set_direction(), set_trail_limit() and place_energy_orb() do in the private Python preview.",
1801
+ artifactIds: ["pixel-trail-challenge-m1-art"]
1802
+ },
1803
+ {
1804
+ kind: "predict",
1805
+ instruction: "Predict the next grid square and how the trail list will change after one move.",
1806
+ artifactIds: []
1807
+ },
1808
+ {
1809
+ kind: "build",
1810
+ instruction: "Adjust the three documented Python calls so the pixel follows a safe trail toward the energy orb.",
1811
+ artifactIds: ["pixel-trail-challenge-m1-code"]
1812
+ },
1813
+ {
1814
+ kind: "run",
1815
+ instruction: "Use the Run action button to start the private grid preview.",
1816
+ artifactIds: ["pixel-trail-challenge-m1-code"]
1817
+ },
1818
+ {
1819
+ kind: "assess",
1820
+ instruction: "Run the visible and protected deterministic trail checks.",
1821
+ artifactIds: []
1822
+ },
1823
+ {
1824
+ kind: "inspect",
1825
+ instruction: "Compare the highlighted Python line with the first goal that did not pass.",
1826
+ artifactIds: []
1827
+ },
1828
+ {
1829
+ kind: "fix",
1830
+ instruction: "Change one direction, trail or orb setting, run again and inspect the position and list-length telemetry.",
1831
+ artifactIds: ["pixel-trail-challenge-m1-code"]
1832
+ },
1833
+ {
1834
+ kind: "explain",
1835
+ instruction: "Explain how the direction changed the position and why the trail list kept only recent squares.",
1836
+ artifactIds: []
1837
+ },
1838
+ {
1839
+ kind: "reward",
1840
+ instruction: "Collect the evidence-bound badge when the score and private-runtime safety check pass.",
1841
+ artifactIds: []
1842
+ }
1843
+ ],
1844
+ readinessChecks: [
1845
+ {
1846
+ id: "pixel-trail-challenge-m1-find-direction",
1847
+ prompt: "Point to the Python call that chooses the pixel's next direction.",
1848
+ scored: false
1849
+ }
1850
+ ],
1851
+ artifacts: [
1852
+ {
1853
+ id: "pixel-trail-challenge-m1-code",
1854
+ kind: "starter-code",
1855
+ audience: "learner",
1856
+ solutionBearing: false
1857
+ },
1858
+ {
1859
+ id: "pixel-trail-challenge-m1-art",
1860
+ kind: "starter-assets",
1861
+ audience: "learner",
1862
+ solutionBearing: false
1863
+ },
1864
+ {
1865
+ id: "pixel-trail-challenge-m1-printable",
1866
+ kind: "printable",
1867
+ audience: "learner",
1868
+ solutionBearing: false
1869
+ }
1870
+ ],
1871
+ goals: [
1872
+ {
1873
+ id: "pixel-trail-challenge-m1-starts",
1874
+ statement: "The Python settings are valid and the private grid preview starts.",
1875
+ visibility: "visible",
1876
+ criterionIds: ["pixel-trail-challenge-build"],
1877
+ completionRequired: true,
1878
+ aiRequired: false
1879
+ },
1880
+ {
1881
+ id: "pixel-trail-challenge-m1-safe-trail",
1882
+ statement: "The pixel moves in the chosen direction, keeps a bounded trail list and reaches the energy orb.",
1883
+ visibility: "visible",
1884
+ criterionIds: [
1885
+ "pixel-trail-challenge-goal-one",
1886
+ "pixel-trail-challenge-goal-two"
1887
+ ],
1888
+ completionRequired: true,
1889
+ aiRequired: false
1890
+ },
1891
+ {
1892
+ id: "pixel-trail-challenge-m1-private-runtime",
1893
+ statement: "The program stays inside the private Python worker and host-provided grid API.",
1894
+ visibility: "visible",
1895
+ criterionIds: ["pixel-trail-challenge-safety"],
1896
+ completionRequired: true,
1897
+ aiRequired: false
1898
+ }
1899
+ ],
1900
+ interactions: [
1901
+ {
1902
+ id: "pixel-trail-challenge-m1-run-control",
1903
+ description: "Start the private Python grid simulation.",
1904
+ primaryMode: "pointer",
1905
+ alternativeIds: ["pixel-trail-challenge-m1-keyboard-run"]
1906
+ },
1907
+ {
1908
+ id: "pixel-trail-challenge-m1-direction-control",
1909
+ description: "Change the active movement direction with labelled arrow controls or arrow keys.",
1910
+ primaryMode: "keyboard",
1911
+ alternativeIds: []
1912
+ },
1913
+ {
1914
+ id: "pixel-trail-challenge-m1-trail-motion",
1915
+ description: "Observe the pixel, recent trail squares and energy orb on the grid.",
1916
+ primaryMode: "motion",
1917
+ alternativeIds: ["pixel-trail-challenge-m1-telemetry"]
1918
+ }
1919
+ ],
1920
+ accessibilityAlternatives: [
1921
+ {
1922
+ id: "pixel-trail-challenge-m1-keyboard-run",
1923
+ modes: ["keyboard"],
1924
+ equivalentOutcome: true,
1925
+ description: "Press Enter or Space on the play-icon Run button to start the same preview."
1926
+ },
1927
+ {
1928
+ id: "pixel-trail-challenge-m1-telemetry",
1929
+ modes: ["text", "shape", "reduced-motion"],
1930
+ equivalentOutcome: true,
1931
+ description: "Read row, column, direction, trail length and orb status without animation or colour dependence."
1932
+ }
1933
+ ],
1934
+ evidenceRequirements: [
1935
+ {
1936
+ id: "pixel-trail-challenge-m1-assessment",
1937
+ goalIds: [
1938
+ "pixel-trail-challenge-m1-starts",
1939
+ "pixel-trail-challenge-m1-safe-trail",
1940
+ "pixel-trail-challenge-m1-private-runtime"
1941
+ ],
1942
+ kind: "assessment-result",
1943
+ retention: "entitlement",
1944
+ containsPersonalData: false
1945
+ },
1946
+ {
1947
+ id: "pixel-trail-challenge-m1-explanation",
1948
+ goalIds: ["pixel-trail-challenge-m1-safe-trail"],
1949
+ kind: "learner-explanation",
1950
+ retention: "attempt",
1951
+ containsPersonalData: false
1952
+ }
1953
+ ],
1954
+ sideAdventures: [
1955
+ {
1956
+ id: "pixel-trail-challenge-m1-remix",
1957
+ prompt: "Invent an original energy-orb symbol and describe a new safe grid rule for collecting it.",
1958
+ completionRequired: false
1959
+ }
1960
+ ],
1961
+ rewardBindings: [
1962
+ {
1963
+ id: "pixel-trail-challenge-m1-badge",
1964
+ badgeId: "pixel-trail-challenge-mission-complete",
1965
+ goalIds: [
1966
+ "pixel-trail-challenge-m1-starts",
1967
+ "pixel-trail-challenge-m1-safe-trail",
1968
+ "pixel-trail-challenge-m1-private-runtime"
1969
+ ],
1970
+ deterministic: true,
1971
+ random: false,
1972
+ tokenConvertible: false
1973
+ }
1974
+ ]
1975
+ },
1976
+ facilitator: {
1977
+ artifacts: [
1978
+ {
1979
+ id: "pixel-trail-challenge-m1-answer-key",
1980
+ kind: "answer-key",
1981
+ audience: "facilitator",
1982
+ solutionBearing: true
1983
+ },
1984
+ {
1985
+ id: "pixel-trail-challenge-m1-protected-tests",
1986
+ kind: "protected-test",
1987
+ audience: "facilitator",
1988
+ solutionBearing: true
1989
+ }
1990
+ ],
1991
+ protectedGoals: [
1992
+ {
1993
+ id: "pixel-trail-challenge-m1-protected-resilience",
1994
+ statement: "The worker rejects invalid directions, clamps trail capacity and terminates bounded grid simulations before list or collision abuse.",
1995
+ visibility: "protected",
1996
+ criterionIds: [
1997
+ "pixel-trail-challenge-edge-one",
1998
+ "pixel-trail-challenge-edge-two"
1999
+ ],
2000
+ completionRequired: false,
2001
+ aiRequired: false
2002
+ }
2003
+ ],
2004
+ prompts: [
2005
+ "Ask the learner to predict the next row and column before suggesting a Python edit.",
2006
+ "Use the function reference and visible telemetry; never reveal protected coordinates, numeric targets or expected source fragments."
2007
+ ]
2008
+ }
2009
+ };
2010
+ var STAR_DEFENDER_SQUADRON_MISSION_ONE_AUTHORING_V1 = {
2011
+ version: MISSION_AUTHORING_CONTRACT_VERSION_V1,
2012
+ moduleId: "junior-coder.star-defender-squadron",
2013
+ moduleVersion: "1.1.0",
2014
+ missionId: "star-defender-squadron-mission-1",
2015
+ learner: {
2016
+ estimatedMinutes: 20,
2017
+ stages: [
2018
+ {
2019
+ kind: "learn",
2020
+ instruction: "Read what createSquadron(), setRescueWave(), setShieldHealth() and launchRescueBeam() do in the private JavaScript preview.",
2021
+ artifactIds: ["star-defender-squadron-m1-art"]
2022
+ },
2023
+ {
2024
+ kind: "predict",
2025
+ instruction: "Predict where the squadron and rescue beam will travel, and which health value will change after the wave.",
2026
+ artifactIds: []
2027
+ },
2028
+ {
2029
+ kind: "build",
2030
+ instruction: "Adjust the four documented JavaScript calls so the original squadron launches a safe rescue wave.",
2031
+ artifactIds: ["star-defender-squadron-m1-code"]
2032
+ },
2033
+ {
2034
+ kind: "run",
2035
+ instruction: "Use the Run action button to start the private Star Defender preview.",
2036
+ artifactIds: ["star-defender-squadron-m1-code"]
2037
+ },
2038
+ {
2039
+ kind: "assess",
2040
+ instruction: "Run the visible and protected deterministic squadron checks.",
2041
+ artifactIds: []
2042
+ },
2043
+ {
2044
+ kind: "inspect",
2045
+ instruction: "Compare the highlighted JavaScript line with the first mission goal that did not pass.",
2046
+ artifactIds: []
2047
+ },
2048
+ {
2049
+ kind: "fix",
2050
+ instruction: "Change one squadron, wave, shield or beam setting, then rerun and inspect the entity and health telemetry.",
2051
+ artifactIds: ["star-defender-squadron-m1-code"]
2052
+ },
2053
+ {
2054
+ kind: "explain",
2055
+ instruction: "Explain how the wave pattern moved the entities and how shields protected the rescue mission.",
2056
+ artifactIds: []
2057
+ },
2058
+ {
2059
+ kind: "reward",
2060
+ instruction: "Collect the evidence-bound badge when the score and private-runtime safety check pass.",
2061
+ artifactIds: []
2062
+ }
2063
+ ],
2064
+ readinessChecks: [
2065
+ {
2066
+ id: "star-defender-squadron-m1-find-wave",
2067
+ prompt: "Point to the JavaScript call that chooses the rescue-wave pattern.",
2068
+ scored: false
2069
+ }
2070
+ ],
2071
+ artifacts: [
2072
+ {
2073
+ id: "star-defender-squadron-m1-code",
2074
+ kind: "starter-code",
2075
+ audience: "learner",
2076
+ solutionBearing: false
2077
+ },
2078
+ {
2079
+ id: "star-defender-squadron-m1-art",
2080
+ kind: "starter-assets",
2081
+ audience: "learner",
2082
+ solutionBearing: false
2083
+ },
2084
+ {
2085
+ id: "star-defender-squadron-m1-printable",
2086
+ kind: "printable",
2087
+ audience: "learner",
2088
+ solutionBearing: false
2089
+ }
2090
+ ],
2091
+ goals: [
2092
+ {
2093
+ id: "star-defender-squadron-m1-starts",
2094
+ statement: "The JavaScript settings are valid and the private squadron preview starts.",
2095
+ visibility: "visible",
2096
+ criterionIds: ["star-defender-squadron-build"],
2097
+ completionRequired: true,
2098
+ aiRequired: false
2099
+ },
2100
+ {
2101
+ id: "star-defender-squadron-m1-rescue-wave",
2102
+ statement: "The original squadron follows the chosen pattern, keeps safe shield health and launches a rescue beam.",
2103
+ visibility: "visible",
2104
+ criterionIds: [
2105
+ "star-defender-squadron-goal-one",
2106
+ "star-defender-squadron-goal-two"
2107
+ ],
2108
+ completionRequired: true,
2109
+ aiRequired: false
2110
+ },
2111
+ {
2112
+ id: "star-defender-squadron-m1-private-runtime",
2113
+ statement: "The program stays inside the private JavaScript worker and host-provided space-rescue API.",
2114
+ visibility: "visible",
2115
+ criterionIds: ["star-defender-squadron-safety"],
2116
+ completionRequired: true,
2117
+ aiRequired: false
2118
+ }
2119
+ ],
2120
+ interactions: [
2121
+ {
2122
+ id: "star-defender-squadron-m1-run-control",
2123
+ description: "Start the private JavaScript squadron simulation.",
2124
+ primaryMode: "pointer",
2125
+ alternativeIds: ["star-defender-squadron-m1-keyboard-run"]
2126
+ },
2127
+ {
2128
+ id: "star-defender-squadron-m1-code-control",
2129
+ description: "Edit the documented squadron, wave, shield and beam calls.",
2130
+ primaryMode: "keyboard",
2131
+ alternativeIds: []
2132
+ },
2133
+ {
2134
+ id: "star-defender-squadron-m1-wave-motion",
2135
+ description: "Observe squadron entities, wave paths, shields and the rescue beam.",
2136
+ primaryMode: "motion",
2137
+ alternativeIds: ["star-defender-squadron-m1-telemetry"]
2138
+ }
2139
+ ],
2140
+ accessibilityAlternatives: [
2141
+ {
2142
+ id: "star-defender-squadron-m1-keyboard-run",
2143
+ modes: ["keyboard"],
2144
+ equivalentOutcome: true,
2145
+ description: "Press Enter or Space on the play-icon Run button to start the same preview."
2146
+ },
2147
+ {
2148
+ id: "star-defender-squadron-m1-telemetry",
2149
+ modes: ["text", "shape", "reduced-motion"],
2150
+ equivalentOutcome: true,
2151
+ description: "Read entity count, pattern, shield health, beam state and rescue result without animation or colour dependence."
2152
+ }
2153
+ ],
2154
+ evidenceRequirements: [
2155
+ {
2156
+ id: "star-defender-squadron-m1-assessment",
2157
+ goalIds: [
2158
+ "star-defender-squadron-m1-starts",
2159
+ "star-defender-squadron-m1-rescue-wave",
2160
+ "star-defender-squadron-m1-private-runtime"
2161
+ ],
2162
+ kind: "assessment-result",
2163
+ retention: "entitlement",
2164
+ containsPersonalData: false
2165
+ },
2166
+ {
2167
+ id: "star-defender-squadron-m1-explanation",
2168
+ goalIds: ["star-defender-squadron-m1-rescue-wave"],
2169
+ kind: "learner-explanation",
2170
+ retention: "attempt",
2171
+ containsPersonalData: false
2172
+ }
2173
+ ],
2174
+ sideAdventures: [
2175
+ {
2176
+ id: "star-defender-squadron-m1-remix",
2177
+ prompt: "Invent an original rescue-squadron emblem and describe a new safe wave pattern for a later level.",
2178
+ completionRequired: false
2179
+ }
2180
+ ],
2181
+ rewardBindings: [
2182
+ {
2183
+ id: "star-defender-squadron-m1-badge",
2184
+ badgeId: "star-defender-squadron-mission-complete",
2185
+ goalIds: [
2186
+ "star-defender-squadron-m1-starts",
2187
+ "star-defender-squadron-m1-rescue-wave",
2188
+ "star-defender-squadron-m1-private-runtime"
2189
+ ],
2190
+ deterministic: true,
2191
+ random: false,
2192
+ tokenConvertible: false
2193
+ }
2194
+ ]
2195
+ },
2196
+ facilitator: {
2197
+ artifacts: [
2198
+ {
2199
+ id: "star-defender-squadron-m1-answer-key",
2200
+ kind: "answer-key",
2201
+ audience: "facilitator",
2202
+ solutionBearing: true
2203
+ },
2204
+ {
2205
+ id: "star-defender-squadron-m1-protected-tests",
2206
+ kind: "protected-test",
2207
+ audience: "facilitator",
2208
+ solutionBearing: true
2209
+ }
2210
+ ],
2211
+ protectedGoals: [
2212
+ {
2213
+ id: "star-defender-squadron-m1-protected-resilience",
2214
+ statement: "The worker rejects invalid entity, pattern, health and projectile settings and terminates bounded wave simulations.",
2215
+ visibility: "protected",
2216
+ criterionIds: [
2217
+ "star-defender-squadron-edge-one",
2218
+ "star-defender-squadron-edge-two"
2219
+ ],
2220
+ completionRequired: false,
2221
+ aiRequired: false
2222
+ }
2223
+ ],
2224
+ prompts: [
2225
+ "Ask the learner to predict the squadron path and shield change before suggesting a JavaScript edit.",
2226
+ "Use the function reference and visible telemetry; never reveal protected numeric targets, pattern answers or expected source fragments."
2227
+ ]
2228
+ }
2229
+ };
1788
2230
  var RESCUE_CREW_COMMANDER_MISSION_ONE_AUTHORING_V1 = {
1789
2231
  version: MISSION_AUTHORING_CONTRACT_VERSION_V1,
1790
2232
  moduleId: "junior-coder.rescue-crew-commander",
@@ -2588,10 +3030,12 @@ ${summary}`);
2588
3030
  METEOR_SHIELD_MISSION_ONE_AUTHORING_V1,
2589
3031
  MISSION_AUTHORING_CONTRACT_VERSION_V1,
2590
3032
  PADDLE_PULSE_MISSION_ONE_AUTHORING_V1,
3033
+ PIXEL_TRAIL_CHALLENGE_MISSION_ONE_AUTHORING_V1,
2591
3034
  RESCUE_CREW_COMMANDER_MISSION_ONE_AUTHORING_V1,
2592
3035
  ROAD_HOPPER_RALLY_MISSION_ONE_AUTHORING_V1,
2593
3036
  ROBOT_MAZE_DASH_MISSION_ONE_AUTHORING_V1,
2594
3037
  SKYWING_SPRINT_MISSION_ONE_AUTHORING_V1,
3038
+ STAR_DEFENDER_SQUADRON_MISSION_ONE_AUTHORING_V1,
2595
3039
  assertValidLearningPath,
2596
3040
  assertValidMissionAuthoringBundle,
2597
3041
  calculateAssessment,