@runsnative/mcp-server 0.5.0 → 0.5.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.
@@ -136,7 +136,7 @@ console.log('\nget_foundation');
136
136
  console.log('\nlistFoundations');
137
137
  {
138
138
  const foundations = await listFoundations();
139
- check('returns 7 foundations', () => assert(foundations.length === 7, `expected 7 foundations, got ${foundations.length}`));
139
+ check('returns 8 foundations', () => assert(foundations.length === 8, `expected 8 foundations, got ${foundations.length}`));
140
140
  check('includes color', () => assert(foundations.some((f) => f.foundation === 'color'), 'missing color'));
141
141
  check('includes typography', () => assert(foundations.some((f) => f.foundation === 'typography'), 'missing typography'));
142
142
  check('each foundation has title and description', () => {
@@ -214,7 +214,7 @@ console.log('\nlist_exercises');
214
214
  {
215
215
  const ready = await listExerciseMeta(false);
216
216
  const all = await listExerciseMeta(true);
217
- check('returns all three ready exercises', () => assert(ready.length === 3, `expected 3 ready exercises, got ${ready.length}`));
217
+ check('returns all four ready exercises', () => assert(ready.length === 4, `expected 4 ready exercises, got ${ready.length}`));
218
218
  check('each exercise has required fields', () => {
219
219
  for (const ex of ready) {
220
220
  assert(typeof ex.name === 'string' && ex.name.length > 0, `exercise missing name`);
@@ -284,6 +284,40 @@ console.log('\nget_step');
284
284
  });
285
285
  }
286
286
  // ---------------------------------------------------------------------------
287
+ // Coached exercise slice — live-session binding (JUNE-625)
288
+ //
289
+ // migrate-to-runsnative step 5 gained a "Coached Mode" section that drives
290
+ // the bridge's set_theme on the learner's own linked session; step 7
291
+ // verifies the result via get_marker_capture. Regression guard: the coached
292
+ // content must exist, name the correct bridge tools, and the exercise's
293
+ // step count must have grown to 7 without disturbing steps 1-6.
294
+ // ---------------------------------------------------------------------------
295
+ console.log('\ncoached exercise slice (JUNE-625)');
296
+ {
297
+ const detail = await getExerciseDetail('migrate-to-runsnative');
298
+ check('migrate-to-runsnative now has 7 steps', () => assert(detail.steps.length === 7, `expected 7 steps, got ${detail.steps.length}`));
299
+ const step5 = await getExerciseStep('migrate-to-runsnative', 5);
300
+ check('step 5 documents Coached Mode', () => assert(step5.content.includes('Coached Mode'), 'missing Coached Mode section'));
301
+ check('step 5 names set_theme', () => assert(step5.content.includes('set_theme'), 'missing set_theme reference'));
302
+ check('step 5 links to /ai/linked-session', () => assert(step5.content.includes('/ai/linked-session'), 'missing linked-session doc link'));
303
+ const step7 = await getExerciseStep('migrate-to-runsnative', 7);
304
+ check('step 7 returned with content', () => {
305
+ assert(step7.step === 7, `expected step 7, got ${step7.step}`);
306
+ assert(step7.title === 'Prove the live change (if linked)', `expected title match, got ${step7.title}`);
307
+ });
308
+ check('step 7 names get_marker_capture', () => assert(step7.content.includes('get_marker_capture'), 'missing get_marker_capture reference'));
309
+ check('step 7 is opt-in (skip guidance present)', () => assert(/skip/i.test(step7.content), 'missing skip-if-not-linked guidance'));
310
+ check('step 8 out-of-range throws RangeError', async () => {
311
+ try {
312
+ await getExerciseStep('migrate-to-runsnative', 8);
313
+ throw new Error('should have thrown');
314
+ }
315
+ catch (err) {
316
+ assert(err instanceof RangeError, `expected RangeError, got ${err.constructor.name}`);
317
+ }
318
+ });
319
+ }
320
+ // ---------------------------------------------------------------------------
287
321
  // Exercise ↔ live-site wiring (RUN-354)
288
322
  //
289
323
  // Regression guard for the RUN-326 defect class: exercises that referenced
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runsnative/mcp-server",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist/"