Updates
Rolling release / release (push) Successful in 9m26s

This commit is contained in:
2026-09-11 21:21:26 -04:00
parent b39a60132a
commit 9e76928045
10 changed files with 315 additions and 63 deletions
+28
View File
@@ -68,6 +68,34 @@ test('harness bridge recovers streamed text when final envelope is empty after a
assert.equal(reply.text, 'Your computer is ready.');
});
test('ask with no spoken text after tools returns to listening without a Reply', async () => {
const daemon = new JarvisDaemon();
daemon.harness = { ask: async () => ({ ok: true, text: '', reason: 'stop' }), cancel() {}, close: async () => {} };
daemon.voiceLoop = null;
const replies = [];
daemon.on('Reply', (text) => replies.push(text));
try {
const result = await daemon.ask('status');
assert.equal(result, '');
assert.deepEqual(replies, []);
assert.equal(daemon.state, 'LISTENING');
} finally {
await daemon.close();
}
});
test('confirmPermission forwards Allow/Deny to the harness session', async () => {
const daemon = new JarvisDaemon();
const calls = [];
daemon.harness = { session: { permit(...args) { calls.push(args); } }, cancel() {}, close: async () => {} };
try {
daemon.confirmPermission('job-1', 'call-9', 'allow');
assert.deepEqual(calls, [['job-1', 'call-9', 'allow']]);
} finally {
await daemon.close();
}
});
test('harness bridge resetContext disposes the current conversation', async () => {
let cancelled = false; let disposed = false;
const bridge = Object.create(HarnessBridge.prototype);