@@ -68,6 +68,7 @@ export class JarvisDaemon extends EventEmitter {
|
||||
const reply = await job;
|
||||
this.telemetry.record('llm', startedAt, { success: true });
|
||||
const spoken = spokenReply(reply);
|
||||
if (!spoken) { this.setState('LISTENING'); return ''; }
|
||||
this._beginSpeech(); this.lastReply = spoken; this.emit('Reply', spoken); this._speakReply(spoken); return spoken;
|
||||
} catch (error) {
|
||||
this.telemetry.record('llm', Date.now(), { success: false }); this.emit('Error', 'QVAC', error.message); this.voice.cancel(); this.setState('ARMED'); throw error;
|
||||
@@ -86,6 +87,9 @@ export class JarvisDaemon extends EventEmitter {
|
||||
this.setState('ARMED');
|
||||
this.emit('ContextReset');
|
||||
}
|
||||
confirmPermission(jobId, toolCallId, decision) {
|
||||
this.harness.session?.permit?.(String(jobId || ''), String(toolCallId || ''), String(decision || 'deny'));
|
||||
}
|
||||
_beginSpeech() {
|
||||
try {
|
||||
if (this.voice.state === 'ARMED' || this.voice.state === 'SLEEPING') this.voice.wake();
|
||||
|
||||
Reference in New Issue
Block a user