feat(voice): specialize prompt for Isfahan Industrial Parks, emit source excerpts, and bound generation

- Specialize voice assistant identity and agent system prompt for «شرکت شهرک‌های صنعتی اصفهان» (English instructions with Persian proper names)
- Emit bounded chunk text excerpts (up to 2000 chars) and identify primary_source in realtime sources events
- Bound OpenAI output generation via OPENAI_REALTIME_MAX_OUTPUT_TOKENS and add answer_limited event
- Handle old-turn search cancellation safely on turn supersession
- Add end-to-end search tracing pipeline and diagnostic CLI
- Add database organization title and settings update script
This commit is contained in:
amirhosein mazaheri
2026-10-12 17:35:28 +03:30
parent f14166a89f
commit 117fda7cc9
29 changed files with 1476 additions and 67 deletions
+9
View File
@@ -22,3 +22,12 @@ assert.throws(()=>display.apply({...event('t5','user','x'),text:7}),/INVALID/);
display.reset(); assert.equal(display.rows.size,0);
for(let n=0;n<512;n++) display.apply(event('t'+n,'user','x'));
assert.throws(()=>display.apply(event('overflow','user','x')),/CAPACITY/);
display.reset();
display.apply(event('limited','assistant','prefix'));
assert.equal(display.apply({type:'answer_limited',turn_ref:'limited',reason:'output_token_limit'}).status,'limited');
assert.equal(display.apply(event('limited','assistant','exact generated text','limited')).text,'exact generated text');
assert.equal(display.apply(event('limited','assistant','late','completed')).status,'limited');
assert.equal(display.apply({type:'turn_interrupted',turn_ref:'limited'}).status,'interrupted');
assert.equal(display.apply(event('limited','assistant','late','limited')).status,'interrupted');
assert.throws(()=>display.apply(event('bad','user','x','limited')),/INVALID/);