Repository navigation
refactor(agent_runs): move agent chat entry out of inference - #462
Merged
Merged
Conversation
Adds integration tests covering the browser module's core flows so regressions in page navigation and interaction handling are caught early. The tests exercise the module end to end against a local fixture rather than mocking the underlying driver. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Introduce a browser module in openhuman-core to provide the foundation for browser automation capabilities. The module is added as a new file with no existing behavior modified. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Introduce a browser module in openhuman-core to provide the foundation for browser automation capabilities. The module is added as a new file with no existing behavior modified. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Reformatted three assertions in the HTTPS scheme refusal test to wrap their arguments across multiple lines. The change is purely cosmetic and keeps the test behaviour identical. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
…e-error-page fix(browser): report Chrome's error page as a failed load, not a policy refusal
…-8092-266-agent-entry
The agent chat turn implementation and its tests now live under agent_runs/agent_chat as session_turn, leaving the inference host_runtime ops module without the chat turn code. This is a relocation with no behaviour change. Auto-committed-on: dragonfly
The turn guard helpers and the full agent_chat module were removed from the host runtime ops, leaving only agent_chat_simple re-exported. The guards now live in the agent_runs agent_chat module, so the host runtime no longer carries the prompt enforcement, model override, cwd resolution, and origin logic. Auto-committed-on: dragonfly
Introduce a new agent_chat module under agent_runs to host the chat handling logic for agent runs. Auto-committed-on: dragonfly
Dropped the `agent_chat_simple` helper and its test module since nothing calls it, and widened the shared guard helpers to `pub(crate)` so they remain reachable from sibling modules. Also pointed `session_turn` at the `guards` module directly instead of the old `turn_guards` path. Auto-committed-on: dragonfly
Turn guard helpers now live under agent_runs::agent_chat::guards instead of a host_runtime ops submodule, and the duplicate session turn test module was dropped. This consolidates the guard logic with the chat code that owns it so the inference layer no longer carries a parallel copy. Auto-committed-on: dragonfly
Extracted the AgentChatParams struct out of the RPC schema layer into a dedicated params module under agent_chat, so the chat turn code and the controller schema share one definition instead of duplicating it. Also wired up the session turn test module and dropped an unused provider import. Auto-committed-on: dragonfly
Auto-committed-on: dragonfly
The simple agent chat controller now deserializes into InferenceAgentChatParams and reads its fields through the common sub-struct, aligning it with the shared inference parameter shape. Auto-committed-on: dragonfly
The `inference.agent_chat` and `inference.agent_chat_simple` controllers now live under the agent_runs module and are registered through the new `INFERENCE_AGENT_CHAT` group, keeping chat turn handling alongside the rest of the agent run surfaces. Auto-committed-on: dragonfly
Dropped the INFERENCE_AGENT_CHAT constant and its re-export since nothing references it anymore, keeping the inference schema module free of dead public API. Auto-committed-on: dragonfly
The agent chat entry points and AgentChatEnv are now public under agent_runs::agent_chat, and all callers in the embed crate and tests were updated to import from there instead of the old inference::host_runtime::ops path. Auto-committed-on: dragonfly
Moved the agent_chat_for, AgentChatEnv, AgentChatTarget, and effective_agent_chat_origin imports to the top of the test module instead of importing them inside individual test functions, so the tests share one import block and reference the types without repeated local use statements. Auto-committed-on: dragonfly
The turn dispatch now imports the agent chat helpers from the agent_runs module instead of the inference host runtime ops path, and the related doc comments were updated to match the new ownership. This keeps the embed facade aligned with where the controller actually lives. Auto-committed-on: dragonfly
…modules Relocated the AgentChatReply type and its RPC envelope logic out of session_turn into a new envelope module, and moved the agent chat controller and schema tests into their own test files. This keeps the turn logic lean and groups the wire-format and controller coverage where they belong. Auto-committed-on: dragonfly
Extracted the AgentChatReply type out of session_turn into a dedicated envelope module and re-exported it from there, keeping the public API unchanged while giving the reply type a clearer home. Auto-committed-on: dragonfly
…dule Moved the host attachment staging logic out of the session turn handler into a dedicated attachments module so the turn flow stays readable. The README now points at the relocated agent_chat entry point. Auto-committed-on: dragonfly
The README now points agent chat entry points and controllers at their new homes under agent_runs, and drops the removed turn_guards and agent_chat ops modules from the runtime map. Auto-committed-on: dragonfly
The session turn module doc no longer mentions the simple no-tools variant, and imports were reordered. Added a missing serde::Deserialize import in schemas. Auto-committed-on: dragonfly
The coverage matrix and extraction plan now point at the relocated agent chat session turn tests and module, keeping the documented paths in sync with the code. Auto-committed-on: dragonfly
Reformatted the agent chat controllers, schemas, and related inference and embed modules to satisfy rustfmt, wrapping long struct literals and function signatures and reordering imports. No behaviour changes. Auto-committed-on: dragonfly
Combine the three inference controller lists into a single vector before pushing them into the registry, replacing the repeated push calls with one. This keeps the registration logic simpler without changing which controllers are registered. Auto-committed-on: dragonfly
Reformatted the inference controller registration code to satisfy rustfmt line-length rules. No behaviour change. Auto-committed-on: dragonfly
Added a comment explaining that agent-owned chat controllers keep inference's capability group and contract order and are appended before the local runtime's speech controllers. Auto-committed-on: dragonfly
…ions Expanded the input and output documentation for the inference agent_chat controller so callers can see how cwd roots the agent's tools and what the response payload contains, including when checkpoint is present. Added a test asserting agent_id stays optional and route fields remain type-validated, and moved the test module declaration to the end of the file. Auto-committed-on: dragonfly
Removes the `all_controller_schemas` helper and its re-exports from the agent chat module, since nothing consumed it. Also fixes a rustdoc link in the reply envelope so the `last_turn_hit_cap` reference resolves. Auto-committed-on: dragonfly
The agent chat session turn logic moved to a new module, so the recorded paths and line numbers in the runtime boundary and SaaS ambient baselines were refreshed to match. The turn origin helper now lives under security. Auto-committed-on: dragonfly
Reformatted the re-export of the registered controllers alias into one line without changing what is exported. Auto-committed-on: dragonfly
Point the end-to-end test at the relocated agent_chat module so it compiles against the new module layout. Auto-committed-on: dragonfly
Relocated the `agent_chat_for` target and unknown-agent tests from the host runtime ops tests into the session turn tests, and replaced the turn-origin helper tests with a shared config helper. The host runtime suite no longer carries agent-chat coverage, keeping each test module next to the code it exercises. Auto-committed-on: dragonfly
The envelope serialization tests were relocated from session_turn_tests.rs into a new envelope_tests.rs module, leaving the session turn tests focused on their own behaviour. Auto-committed-on: dragonfly
Added tests for common and inference agent chat parameter decoding, including error paths and the optional agent id, and wired up the envelope and guards test modules. Guard helpers were narrowed to module visibility and the now-unused test imports in host runtime ops were dropped. Auto-committed-on: dragonfly
Reformatted the deserialization assertion in the agent id defaults test so the JSON literal and expect call fit on fewer lines. No test behaviour changed. Auto-committed-on: dragonfly
Expanded the doc comment on the INFERENCE_AGENT_CHAT constant to explain how the controller's namespace and function combine into the wire method name and why host facades reference the constant instead of hardcoding the string. Auto-committed-on: dragonfly
…rollers The suite now discovers the four local runtime and two agent-owned chat controllers through all_registered_controllers filtered by the inference namespace instead of the dedicated local helper, so the pinned wire method names reflect the full registry. Doc comments were updated to match. Auto-committed-on: dragonfly
…pc_raw_coverage_e2e.rs Auto-committed-on: dragonfly
The turn tests now resolve the `inference.agent_chat` schema through `openhuman_core::core::all::all_registered_controllers` instead of the removed `inference::host_runtime` helper, matching the core module move. The README reference was updated to point at the new `agent_runs::agent_chat` location. Auto-committed-on: dragonfly
…line Auto-committed-on: dragonfly
This was referenced Oct 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves agent-chat entry handling, guards, schemas, and controller ownership into core
agent_runs, while preserving both inference wire controllers and ordinaryagent.chatparameter behavior. Embed turn callers now import the relocated entry directly.Validation: full inference run passed 629 tests; all 28 moved agent-chat tests passed; embed focused tests passed 3;
pnpm rust:layoutpassed with 28 schema owners; strict core default/product, embed, and CLI checks passed; root/app checks andpnpm docs:checkpassed. Product CLI all-target validation reports the expected selection advisory fortinydocs_linked_e2eandtinymcp_storage_smoke_e2e; root default-feature validation also skips gated targets.The broad
agent_runs --liblane remains 92 passed / 1 failed: the unchangedcancel_unknown_task_is_a_noop_falsetest fails against the operator profile’s corrupt SQLite layout when run in the suite. The exact test passes alone in the isolated workspace. Six relevant source files are byte-identical to the starting head and canonical main, so this is documented as a shared-process test-isolation limitation.Scanner findings are 43 pre-existing leaf sites, including two move-only baseline paths; final union audit is pending. The PR diff includes two browser files already identical to canonical main, alongside 37 leaf paths.
Refs #266.
Part of tinyhumansai#8092.