@@ -24,6 +24,7 @@ export async function serveOnSessionBus(daemon) {
|
||||
PushToTalk(pressed) { daemon.setPushToTalk?.(Boolean(pressed)); }
|
||||
async Say(text) { await daemon.say?.(text); }
|
||||
async Ask(text) { await daemon.ask(text); }
|
||||
async ResetContext() { await daemon.resetContext(); }
|
||||
Cancel() { daemon.cancel(); }
|
||||
SetMode(mode) { daemon.mode = mode; daemon.emit('ModeChanged', mode); }
|
||||
GetState() { return daemon.state; }
|
||||
@@ -66,6 +67,7 @@ export async function serveOnSessionBus(daemon) {
|
||||
PushToTalk: { inSignature: 'b', outSignature: '', method: 'PushToTalk' },
|
||||
Say: { inSignature: 's', outSignature: '', method: 'Say' },
|
||||
Ask: { inSignature: 's', outSignature: '', method: 'Ask' },
|
||||
ResetContext: { inSignature: '', outSignature: '', method: 'ResetContext' },
|
||||
Cancel: { inSignature: '', outSignature: '', method: 'Cancel' },
|
||||
SetMode: { inSignature: 's', outSignature: '', method: 'SetMode' },
|
||||
GetState: { inSignature: '', outSignature: 's', method: 'GetState' },
|
||||
@@ -82,6 +84,7 @@ export async function serveOnSessionBus(daemon) {
|
||||
},
|
||||
signals: {
|
||||
StateChanged: { signature: 's' },
|
||||
ContextReset: { signature: '' },
|
||||
Reply: { signature: 's' },
|
||||
Token: { signature: 's' },
|
||||
Error: { signature: 'ss' },
|
||||
@@ -139,7 +142,7 @@ export async function serveOnSessionBus(daemon) {
|
||||
daemon.on('Token', (token) => iface.Token(token));
|
||||
daemon.on('Error', (code, message) => iface.Error(code, message));
|
||||
daemon.on('ConfirmationRequired', (event) => iface.ConfirmationRequired(event?.tool || 'action', JSON.stringify(event?.args || {}), event?.pattern || 'explicit confirmation required'));
|
||||
for (const signal of ['WakeHeard', 'PartialTranscript', 'FinalTranscript', 'SpeakingLevel', 'ListeningLevel', 'ChipOffered', 'JobProgress', 'ComputerStep', 'ComputerHighlight', 'Thinking', 'ToolCall', 'ToolResult']) {
|
||||
for (const signal of ['ContextReset', 'WakeHeard', 'PartialTranscript', 'FinalTranscript', 'SpeakingLevel', 'ListeningLevel', 'ChipOffered', 'JobProgress', 'ComputerStep', 'ComputerHighlight', 'Thinking', 'ToolCall', 'ToolResult']) {
|
||||
daemon.on(signal, (...args) => iface[signal](...args));
|
||||
}
|
||||
return bus;
|
||||
|
||||
Reference in New Issue
Block a user