fix(contextual): inject date_context + language in run_contextual_stream

Use _build_system_prompt helper so the contextual agent gets the
same system-prompt slots as home/floating runners — most importantly
{date_context} so the agent can reason about due dates when
creating/updating tasks.

Also makes the session_id contract on run_contextual_stream explicit
(was reading via context['_debug']) and tightens the tool-list test.
This commit is contained in:
Roberto
2026-05-14 21:17:54 +02:00
parent 2b71469e86
commit 5e42b2abb1
2 changed files with 16 additions and 7 deletions

View File

@@ -70,5 +70,7 @@ async def test_run_contextual_stream_includes_scope_block(monkeypatch):
"at least one entity-create tool must be present"
)
assert "create_timeline" in names, "create_timeline tool must be included"
# Note edit tools must NOT be exposed.
assert "propose_note_edit" not in names, "propose_note_edit must be excluded"