Commit Graph
3 Commits
Author SHA1 Message Date
Ubuntu 15fa287e1b fix(session): turn-deadline TTL separate from idle TTL
build-and-push / build (push) Successful in 3m55s
Long thinking-heavy turns (multi-image vision extraction) legitimately
run >120s without emitting chunks; the idle TTL killed cursor-agent
mid-turn, surfacing to HTTP clients as an empty assistant turn.

- TURN_DEADLINE_MS (default 900s) applies while a prompt is in flight;
  SESSION_TTL_MS (idle, 120s) applies between turns
- _touchTimer() re-arms on every session/update (chunks, thoughts)
- _finishTurn clears _promptInFlight and re-arms the idle TTL

Verified with the real 11-photo TTN replay that previously died with
'LLM stream returned empty assistant turn' after mid-turn TTL kills.
2026-09-27 13:43:58 +00:00
Ubuntu b467998ba4 feat(api): enforce OpenAI tool_choice contract (required/named/none)
build-and-push / build (push) Successful in 4m59s
- normalizeToolChoice maps OpenAI tool_choice values to internal shapes
- required/named: prepend a mandatory-tool directive block; buffer text
  deltas and only flush when a tool call actually arrives; on plain-text
  turn, retry in-process with a nudge block (max 2 retries) instead of
  emitting the violating text (streaming + non-streaming paths)
- none: prepend a no-tools directive
- unit tests for all new mapping/directive helpers (32 passing)

Verified live against cursor-agent ACP with model=auto: image+required
yields clean tool_calls chunks with no text pollution; follow-up turns
resolve parked MCP tool calls and retry on invalid observations.
2026-09-27 12:02:40 +00:00
Ubuntu 57ea555684 fix(flux): ImagePolicy numerical order asc for run_number tags
Was stuck on 1-* while 5-* existed in DCR; align with onboarding howto.
2026-09-24 08:19:09 +00:00