Browser & computer use
Jev-based local-first gesture and gaze media-control agent with guarded page-close intent.
const baseUrl = (process.env.TYPESAFE_BASE_URL ?? "https://api.typesafe.ai").replace(The link points at the commit we read, so the line number still holds.
These question sets are lifted from this project's source exactly as written.
from server/decision-policy.ts:93
actionchoiceChoose exactly one media-control action from the supplied options.
none — No intentional supported command is currently present.pause — A stable, confident Open_Palm gesture requests that playback pause.play — A stable, confident Closed_Fist gesture requests that playback continue.speed_up — A stable, confident Thumb_Up gesture requests faster playback.slow_down — A stable, confident Thumb_Down gesture requests slower playback.close_page — A calibrated gaze has continuously remained on the top-right close target for the full dwell period, and the safety state explicitly allows closing.close_intenttrue/falseIs there strong evidence of an intentional page-close request? It is true only when gaze calibration exists, the continuous dwell completed, and safety.allowClose is true.
intentional_controltrue/falseDoes the structured sensor state show a deliberate, stable command from the person, rather than a transient pose or ambiguous observation?
signal_qualityscoreRate whether the current sensor evidence is reliable enough for an embodied controller to act on immediately.
0 — Unreliable: missing, unstable, or contradictory evidence1 — Ambiguous: plausible evidence but meaningful uncertainty remains2 — Reliable: stable, confident, and internally consistent evidenceimport { experimental_evaluate as evaluate } from 'ai';
const { answers } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
action: { type: 'choice', instructions: 'Choose exactly one media-control action from the supplied options.',
criteria: { none: 'No intentional supported command is currently present.', pause: 'A stable, confident Open_Palm gesture requests that playback pause.', play: 'A stable, confident Closed_Fist gesture requests that playback continue.', speed_up: 'A stable, confident Thumb_Up gesture requests faster playback.', slow_down: 'A stable, confident Thumb_Down gesture requests slower playback.', close_page: 'A calibrated gaze has continuously remained on the top-right close target for the full dwell period, and the safety state explicitly allows closing.' } },
close_intent: { type: 'boolean', instructions: 'Is there strong evidence of an intentional page-close request? It is true only when gaze calibration exists, the continuous dwell completed, and safety.allowClose is true.' },
intentional_control: { type: 'boolean', instructions: 'Does the structured sensor state show a deliberate, stable command from the person, rather than a transient pose or ambiguous observation?' },
signal_quality: { type: 'score', instructions: 'Rate whether the current sensor evidence is reliable enough for an embodied controller to act on immediately.',
criteria: ['Unreliable: missing, unstable, or contradictory evidence', 'Ambiguous: plausible evidence but meaningful uncertainty remains', 'Reliable: stable, confident, and internally consistent evidence'] },
},
});