Merge main into feat/voice-core

Keeps the voice-core prompt rules and adds main's world-query and
vessels-vs-visuals rules; the tool catalog wraps the deixis-aware runner.

Also fixes two things the branch had before the merge:
- Live voice could not start: OpenAI rejects track_entity's top-level
  anyOf. Model-facing tools now omit top-level combinators; the runner
  and benchmark still require a query or a referent.
- The Contacts-centred analyst answer dropped the viewport coverage note.
This commit is contained in:
Bilawal Sidhu committed 2026-10-03 23:30:02 -07:00
commit e7cb9b02b5
191 files changed
+20005 -1450

No files matched your search

+41
View File
@@ -31,6 +31,7 @@ import {
readStoredVoiceLimits,
writeStoredVoiceTier,
writeStoredVoiceLimits,
withToolCatalog,
} from './gevRealtime.js';
import { createVoiceCostTracker } from './voiceCost.js';
@@ -3725,3 +3726,43 @@ test('a claimed Space hold barges in on the assistant; a short tap never does',
const testPlaceSearch = () => createStandalonePlaceSearch({ resolveApiKey: () => globalThis.window?.__GOOGLE_MAPS_API_KEY__ });
function createGevActionRunner(options) { return createActionRunner({ placeSearch: testPlaceSearch(), ...options }); }
function controlRadio(viewer, manager, args, options) { return runControlRadio(viewer, manager, args, { placeSearch: testPlaceSearch(), ...options }); }
test('voice runs app actions itself and other tools through the catalog', async () => {
const actions = [];
const runner = async (name, args) => {
actions.push([name, args]);
return { ok: true, action: name };
};
const calls = [];
let loads = 0;
const catalog = {
get: (name) => (name === 'get_wind' ? { name } : undefined),
async call(name, args, options) {
calls.push([name, args, options.signal]);
return { summary: 'Calm.', data: { calm: true } };
},
};
const run = withToolCatalog(runner, async () => {
loads += 1;
return catalog;
});
const signal = new AbortController().signal;
assert.deepEqual(await run('zoom_to_globe', {}), {
ok: true,
action: 'zoom_to_globe',
});
assert.equal(loads, 0);
assert.deepEqual(
await run('get_wind', { location: { place: 'Oslo' } }, { signal }),
{ ok: true, tool: 'get_wind', summary: 'Calm.', data: { calm: true } },
);
assert.deepEqual(calls, [
['get_wind', { location: { place: 'Oslo' } }, signal],
]);
await run('not_a_tool', {});
assert.deepEqual(
actions.map(([name]) => name),
['zoom_to_globe', 'not_a_tool'],
);
assert.equal(withToolCatalog(runner, undefined), runner);
});