* refactor(agent_harness): inject the investigation runner instead of a module global
* docs(agent_harness): pass the investigation runner in the embedding examples
* docs(api): document OpenSRE as teammate, daily recipes, and unattended loops (#4894)
* docs(api): accept action-only turns in success guard
The previous guard required result.answered (LLM produced a run), which
rejects valid action-only turns where tools handle the request without
calling the LLM. The correct condition is:
(answered OR executed_success_count > 0) AND NOT cancelled
- answered: conversational LLM produced a response
- executed_success_count > 0: action tools handled the turn successfully
- not cancelled: host did not cancel/timeout the turn
On a failed action-LLM call, executed_success_count is 0 (action_driver
L1070), so error prose is still excluded. The cancelled guard prevents
forwarding timeout/stop text as a valid digest.
Closes the review finding that the documented recipe aborts on a
successful handled_without_llm route.
* docs(api): use final_intent for action-handled turns in success guard
Fixes the result guard semantics across all turn routes:
- Conversational answers (LLM runs) set result.answered.
- Action-only turns (handled directly by tools/commands without an LLM)
complete with result.final_intent == 'cli_agent_handled'.
- Failed turns (e.g. provider errors, or action succeeded but LLM answer
failed) and host-cancelled turns (result.cancelled) are rejected so
diagnostic error prose is never delivered as successful output.
* docs(api): guard against action-phase LLM failures in success check
Refines the action success check:
- Conversational answers check result.answered.
- Action-only turns require result.action_result.handled,
not result.action_result.has_unhandled_clause, and
result.action_result.accounting_status == 'completed'.
- Action-phase LLM failures (which set accounting_status='not_run' and
has_unhandled_clause=True) are strictly rejected so failure prose is
never forwarded as successful output.
* docs(api): add Python API goal embed recipe and register in docs.json (#4897)
* docs(api): update Python API recipe to use canonical SessionManager and session state (#4897)
* docs(api): add reasoning client to production integration recipe (#4897)
* docs(api): document canonical AgentSession, configure_process, and chat_until_goal recipes (#4897)
* docs(api): fix session startup reference and use canonical AgentSession.start (#4897)
* docs(api): clarify goal completion outcomes
- align the explicit goal condition with the full checklist\n- document paused as a terminal return state for the loop
---------
Co-authored-by: muddlebee <anweshknayak@gmail.com>