overseer v2 5 (real tools)

This commit is contained in:
legop3
2026-05-03 23:57:36 -04:00
parent 7eb33c9af2
commit 5e2c836cf2
18 changed files with 277 additions and 44 deletions
@@ -8,6 +8,13 @@ function toStateUpdate({ mode, homeAssistantState, neatoState, liftState, roster
lines.push(`lights_locked_on: ${homeAssistantState?.lightPolicy?.lockedOn ? 'yes' : 'no'}`);
lines.push(`lift: ${liftState?.connected ? 'connected' : 'offline'} busy=${liftState?.busy ? 'yes' : 'no'}`);
lines.push(`neato: ${neatoState?.connected ? 'connected' : 'offline'} state=${neatoState?.telemetry?.robotState || 'unknown'}`);
const entities = Array.isArray(homeAssistantState?.entities) ? homeAssistantState.entities : [];
if (entities.length) {
lines.push('home_assistant_entities:');
entities.slice(0, 24).forEach((entity) => {
lines.push(`- ${entity.id} (${entity.type || 'entity'}) state=${entity.state || 'unknown'} available=${entity.available ? 'yes' : 'no'}`);
});
}
const roverLines = (Array.isArray(roster) ? roster : []).slice(0, 6).map((rover) => {
const roverId = rover?.id || 'unknown';
const driver = rover?.driverNickname || 'none';
@@ -60,7 +67,7 @@ function buildModelMessages({ systemPrompt, stateUpdate, conversationMessages, a
messages.push({
role: 'user',
content:
'Respond with JSON only: {"decision":"SKIP|CHAT|ACTION|ACTION+CHAT","chat":"optional text","actions":[{"tool":"tool_id","args":{}}]}. Use action tool ids only.',
'Use tool calls when needed. If no tool is needed, either respond with one short chat line or SKIP.',
});
return messages;
}