ravensight-playtest 0.13.0 → 0.13.2

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/src/run/tools.js CHANGED
@@ -102,6 +102,22 @@ const thought = {
102
102
  description: 'One to three sentences in the persona voice, first person. Never break character here.'
103
103
  };
104
104
 
105
+ /**
106
+ * The playtester's own answer about its last input, carried on its next tool call (./intent.js): whether the screen it led to
107
+ * shows what it expected, and what it shows instead. The runner holds every input with an expectation to it, and an input that
108
+ * misses the same result twice in a row is not sent a third time.
109
+ */
110
+ const intentCheck = {
111
+ type: 'string',
112
+ enum: ['met', 'missed'],
113
+ description: 'Your LAST input, held against the screen it led to: "met" when this screen shows what you expected of it, "missed" when it does not. Give it on your first tool call after an input you gave expect for.'
114
+ };
115
+
116
+ const instead = {
117
+ type: 'string',
118
+ description: 'When intent_check is missed: what the screen shows instead, copied as drawn, at most 12 words.'
119
+ };
120
+
105
121
  const note = {
106
122
  type: 'object',
107
123
  description: 'Optional: something worth recording at this step. Engineer voice, not persona voice. Use it for anything surprising, frustrating, delightful, broken or confusing.',
@@ -143,7 +159,7 @@ export function dragTool(name = 'drag') {
143
159
  return {
144
160
  name,
145
161
  description: DRAG_DESCRIPTION,
146
- input_schema: { type: 'object', additionalProperties: false, properties: { ...dragProperties, expect, mood, thought_in_character: thought, note } }
162
+ input_schema: { type: 'object', additionalProperties: false, properties: { ...dragProperties, expect, mood, thought_in_character: thought, note, intent_check: intentCheck, instead } }
147
163
  };
148
164
  }
149
165
 
@@ -161,7 +177,9 @@ export const HOVER_TOOL = {
161
177
  expect,
162
178
  mood,
163
179
  thought_in_character: thought,
164
- note
180
+ note,
181
+ intent_check: intentCheck,
182
+ instead
165
183
  }
166
184
  }
167
185
  };
@@ -183,7 +201,9 @@ export const SCROLL_TOOL = {
183
201
  expect,
184
202
  mood,
185
203
  thought_in_character: thought,
186
- note
204
+ note,
205
+ intent_check: intentCheck,
206
+ instead
187
207
  }
188
208
  }
189
209
  };
@@ -202,7 +222,9 @@ export const SELECT_TOOL = {
202
222
  expect,
203
223
  mood,
204
224
  thought_in_character: thought,
205
- note
225
+ note,
226
+ intent_check: intentCheck,
227
+ instead
206
228
  }
207
229
  }
208
230
  };
@@ -224,7 +246,9 @@ export const PINCH_TOOL = {
224
246
  expect,
225
247
  mood,
226
248
  thought_in_character: thought,
227
- note
249
+ note,
250
+ intent_check: intentCheck,
251
+ instead
228
252
  }
229
253
  }
230
254
  };
@@ -243,7 +267,9 @@ export const GAMEPAD_TOOL = {
243
267
  expect,
244
268
  mood,
245
269
  thought_in_character: thought,
246
- note
270
+ note,
271
+ intent_check: intentCheck,
272
+ instead
247
273
  }
248
274
  }
249
275
  };
@@ -313,7 +339,7 @@ export const PLAY_TOOLS = Object.freeze([
313
339
  input_schema: {
314
340
  type: 'object',
315
341
  additionalProperties: false,
316
- properties: { thought_in_character: thought, note }
342
+ properties: { thought_in_character: thought, note, intent_check: intentCheck, instead }
317
343
  }
318
344
  },
319
345
  {
@@ -333,7 +359,9 @@ export const PLAY_TOOLS = Object.freeze([
333
359
  expect,
334
360
  mood,
335
361
  thought_in_character: thought,
336
- note
362
+ note,
363
+ intent_check: intentCheck,
364
+ instead
337
365
  }
338
366
  }
339
367
  },
@@ -353,7 +381,9 @@ export const PLAY_TOOLS = Object.freeze([
353
381
  expect,
354
382
  mood,
355
383
  thought_in_character: thought,
356
- note
384
+ note,
385
+ intent_check: intentCheck,
386
+ instead
357
387
  }
358
388
  }
359
389
  },
@@ -388,7 +418,9 @@ export const PLAY_TOOLS = Object.freeze([
388
418
  expect,
389
419
  mood,
390
420
  thought_in_character: thought,
391
- note
421
+ note,
422
+ intent_check: intentCheck,
423
+ instead
392
424
  }
393
425
  }
394
426
  },
@@ -402,7 +434,9 @@ export const PLAY_TOOLS = Object.freeze([
402
434
  properties: {
403
435
  url: { type: 'string' },
404
436
  thought_in_character: thought,
405
- note
437
+ note,
438
+ intent_check: intentCheck,
439
+ instead
406
440
  }
407
441
  }
408
442
  },
@@ -416,7 +450,9 @@ export const PLAY_TOOLS = Object.freeze([
416
450
  properties: {
417
451
  ms: { type: 'integer', minimum: 0 },
418
452
  thought_in_character: thought,
419
- note
453
+ note,
454
+ intent_check: intentCheck,
455
+ instead
420
456
  }
421
457
  }
422
458
  },
@@ -431,7 +467,9 @@ export const PLAY_TOOLS = Object.freeze([
431
467
  name: { type: 'string', description: 'a short slug, such as title-screen or level-2-softlock' },
432
468
  reason: { type: 'string' },
433
469
  thought_in_character: thought,
434
- note
470
+ note,
471
+ intent_check: intentCheck,
472
+ instead
435
473
  }
436
474
  }
437
475
  }
@@ -784,7 +822,7 @@ export async function executeTool({ driver, toolUse, onNote, onScreenshot, stale
784
822
  const prefix = (outcome.ok
785
823
  ? `${outcome.detail ? `${outcome.detail}\n` : ''}${outcome.changed ? '' : 'That did not change the screen.\n'}`
786
824
  : `That did not work: ${outcome.error}\n`)
787
- + (expected && outcome.ok ? `You expected: ${expected}. Check the screen below against that before your next action; if it is not what happened, say so in a note.\n` : '');
825
+ + (expected && outcome.ok ? `You expected: ${expected}. Check the screen below against that, and say on your next tool call whether it shows it: intent_check "met", or "missed" with instead: what it shows, copied as drawn.\n` : '');
788
826
  return {
789
827
  result: observationResult(toolUse.id, observation, prefix, !outcome.ok),
790
828
  observation,