feat: add DAVE adaptive synthetic persona
This commit is contained in:
@@ -28,6 +28,7 @@ test('first startup asks only for language before personal information', async (
|
||||
const { sent, onboarding } = setup();
|
||||
assert.equal(await onboarding.ensureStarted(), true);
|
||||
assert.equal(sent.length, 1);
|
||||
assert.match(sent[0].text, /DAVE/);
|
||||
assert.match(sent[0].text, /language|Sprache/i);
|
||||
assert.deepEqual(sent[0].options.replyMarkup.inline_keyboard[0].map(button => button.callback_data), [
|
||||
'security_language:de',
|
||||
|
||||
@@ -26,6 +26,8 @@ test('Telegram AI chat uses bounded history and current intelligence context', a
|
||||
assert.equal(await assistant.reply('Explain the implications in detail', { chatId: 42 }), 'Second answer');
|
||||
|
||||
assert.match(calls[0].systemPrompt, /untrusted evidence/i);
|
||||
assert.match(calls[0].systemPrompt, /Your name is DAVE/);
|
||||
assert.match(calls[0].systemPrompt, /ADAPTIVE WRITING STYLE/);
|
||||
assert.match(calls[0].userMessage, /risk-off/);
|
||||
assert.deepEqual(calls[0].options, { maxTokens: 1024, timeout: 120000 });
|
||||
assert.match(calls[1].userMessage, /User: What changed today\?/);
|
||||
|
||||
@@ -112,6 +112,9 @@ test('step exhaustion uses a final-only prompt and returns synthesized evidence'
|
||||
assert.equal(result.answer, 'The available evidence does not confirm the claim.');
|
||||
assert.match(prompts[1], /Tool use is finished and unavailable/);
|
||||
assert.doesNotMatch(prompts[1], /ALLOWLISTED TOOLS/);
|
||||
assert.match(prompts[0], /Your name is DAVE/);
|
||||
assert.match(prompts[0], /ADAPTIVE WRITING STYLE/);
|
||||
assert.match(prompts[1], /Your name is DAVE/);
|
||||
});
|
||||
|
||||
test('repeated tool calls during finalization fail closed without leaking protocol JSON', async () => {
|
||||
|
||||
Reference in New Issue
Block a user