From 993ecae82ddf0b19185e8e99e4468a1788e181c4 Mon Sep 17 00:00:00 2001 From: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> Date: Sat, 21 Nov 2026 21:57:16 +0800 Subject: [PATCH] refactor(chat): move ACP, endpoint, and provider leaves under loopx.chat and ratchet module budget Implements the next monorepo-distribution-split-v0 (#5072) M1 internal leaf migration batch without permanent top-level compatibility shims: - Move loopx/chat_acp.py -> loopx/chat/acp.py - Move loopx/chat_endpoints.py -> loopx/chat/endpoints.py - Move loopx/chat_providers.py -> loopx/chat/providers.py - Update internal relative imports, callers, tests, smokes, layout guards, and kiro_cli_goal_mode references - Ratchet tests/architecture/top_level_module_budget.json from 122 to 119 at baseline 00f47ed364819d9866846ff200ef56fa604f0cdf Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> --- examples/loopx-chat-acp-adapter-smoke.py | 4 ++-- examples/loopx-chat-provider-adapters-smoke.py | 2 +- examples/loopx-chat-server-smoke.py | 2 +- .../first-goal-agent-unavailable.mjs | 2 +- loopx/capabilities/native_chat/model_settings.py | 6 +++--- loopx/{chat_acp.py => chat/acp.py} | 4 ++-- loopx/{chat_endpoints.py => chat/endpoints.py} | 6 +++--- loopx/{chat_providers.py => chat/providers.py} | 4 ++-- loopx/chat/session_open.py | 4 ++-- loopx/chat_runtime.py | 2 +- loopx/cli_commands/support_control_chat_endpoint.py | 2 +- loopx/kiro_cli_goal_mode/README.md | 2 +- loopx/kiro_cli_goal_mode/__init__.py | 2 +- tests/architecture/top_level_module_budget.json | 4 ++-- tests/test_atomic_write_modes.py | 3 ++- tests/test_chat_acp_startup_timeout.py | 4 ++-- tests/test_chat_agent.py | 2 +- tests/test_chat_agent_model_http.py | 6 +++--- tests/test_chat_codex_defaults.py | 2 +- tests/test_chat_goal_workspace_selection.py | 2 +- tests/test_chat_internal_module_layout.py | 9 +++++++++ tests/test_chat_long_running.py | 3 ++- tests/test_chat_path_redaction.py | 2 +- tests/test_chat_reasoning_selection.py | 8 ++++---- tests/test_kiro_cli_host_surface.py | 2 +- 25 files changed, 50 insertions(+), 39 deletions(-) rename loopx/{chat_acp.py => chat/acp.py} (99%) rename loopx/{chat_endpoints.py => chat/endpoints.py} (98%) rename loopx/{chat_providers.py => chat/providers.py} (99%) diff --git a/examples/loopx-chat-acp-adapter-smoke.py b/examples/loopx-chat-acp-adapter-smoke.py index c27df124c8..933bc62188 100644 --- a/examples/loopx-chat-acp-adapter-smoke.py +++ b/examples/loopx-chat-acp-adapter-smoke.py @@ -14,9 +14,9 @@ REPO_ROOT = Path(__file__).resolve().parents[1] sys.path.insert(0, str(REPO_ROOT)) -from loopx.chat_acp import ACPStdioAdapter # noqa: E402 +from loopx.chat.acp import ACPStdioAdapter # noqa: E402 from loopx.chat_agent import CodexChatAgentError # noqa: E402 -from loopx.chat_endpoints import AgentEndpointRegistry # noqa: E402 +from loopx.chat.endpoints import AgentEndpointRegistry # noqa: E402 from loopx.chat_runtime import ChatRuntimeController # noqa: E402 from loopx.chat_store import ChatSessionStore # noqa: E402 from loopx.kiro_cli_goal_mode import KIRO_CLI_CHAT_AGENT_ID # noqa: E402 diff --git a/examples/loopx-chat-provider-adapters-smoke.py b/examples/loopx-chat-provider-adapters-smoke.py index d9c414b740..a1bd803bd5 100644 --- a/examples/loopx-chat-provider-adapters-smoke.py +++ b/examples/loopx-chat-provider-adapters-smoke.py @@ -13,7 +13,7 @@ REPO_ROOT = Path(__file__).resolve().parents[1] sys.path.insert(0, str(REPO_ROOT)) -from loopx.chat_providers import ( # noqa: E402 +from loopx.chat.providers import ( # noqa: E402 ClaudeCodeAdapter, DirectModelAdapter, _execute_read_only_tool, diff --git a/examples/loopx-chat-server-smoke.py b/examples/loopx-chat-server-smoke.py index 8240d0283d..4457105fa6 100644 --- a/examples/loopx-chat-server-smoke.py +++ b/examples/loopx-chat-server-smoke.py @@ -221,7 +221,7 @@ def main() -> None: ChatHTTPServer, ChatRequestHandler, ) - from loopx.chat_endpoints import AgentEndpointRegistry + from loopx.chat.endpoints import AgentEndpointRegistry from loopx.chat_manager import manager_executor_endpoint_default try: diff --git a/examples/personal-workspace-browser/first-goal-agent-unavailable.mjs b/examples/personal-workspace-browser/first-goal-agent-unavailable.mjs index 8c301d46f6..15167ed2bb 100644 --- a/examples/personal-workspace-browser/first-goal-agent-unavailable.mjs +++ b/examples/personal-workspace-browser/first-goal-agent-unavailable.mjs @@ -131,7 +131,7 @@ async function realRemoteMapping({ browser, collectCoverage, url, locale }) { const register = mapped => execFileSync(python, ["-c", ` import json, sys from pathlib import Path -from loopx.chat_endpoints import AgentEndpointRegistry +from loopx.chat.endpoints import AgentEndpointRegistry runtime, binary, project, mapped = sys.argv[1:] endpoint = {"agent_id":"remote-first", "display_name":"Remote fixture", "command":[binary], "location":"remote"} if mapped == "yes": endpoint["workspace_mapping"] = [{"local_root":project,"agent_root":"/synthetic/workspace"}] diff --git a/loopx/capabilities/native_chat/model_settings.py b/loopx/capabilities/native_chat/model_settings.py index 127b6aecbd..ddfa716c79 100644 --- a/loopx/capabilities/native_chat/model_settings.py +++ b/loopx/capabilities/native_chat/model_settings.py @@ -106,7 +106,7 @@ def inspect_agent_model_options(controller: ChatRuntimeController, agent_id: str The temporary upstream session is closed before returning. """ from ...chat_agent import CodexChatAgentError, agent_endpoint_error - from ... import chat_providers as providers + from ...chat import providers from .machine_defaults import codex_profile_home, load_codex_chat_defaults capability = next((row for row in controller.capabilities() if row["agent_id"] == agent_id), None) if capability is None or not capability.get("available"): @@ -184,7 +184,7 @@ def configure_session_model(controller: ChatRuntimeController, session_id: str, owner confirms the requested settings on the same upstream thread. """ from ...chat_agent import CodexChatAgentError - from ... import chat_providers as providers + from ...chat import providers from . import codex_context model = normalize_agent_model_id(model) if effort is not None: @@ -219,7 +219,7 @@ def configure_session_model(controller: ChatRuntimeController, session_id: str, def observed_model_settings(adapter: ChatRuntimeAdapter, requested_effort: str | None = None, requested_model: str | None = None) -> dict[str, Any]: - from ...chat_acp import ACPStdioAdapter + from ...chat.acp import ACPStdioAdapter from .antigravity_adapter import AntigravityAdapter from .codex_adapter import CodexAppServerAdapter from ...chat_agent import CodexChatAgentError diff --git a/loopx/chat_acp.py b/loopx/chat/acp.py similarity index 99% rename from loopx/chat_acp.py rename to loopx/chat/acp.py index d46382c717..3918a6faf3 100644 --- a/loopx/chat_acp.py +++ b/loopx/chat/acp.py @@ -12,7 +12,7 @@ import time from typing import Any, Callable -from .chat import ( +from ..chat import ( CHAT_REVIEW_CLOSE_TAG, CHAT_REVIEW_OPEN_TAG, VisibleResponseStreamFilter, @@ -20,7 +20,7 @@ parse_agent_response, redact_local_paths, ) -from .chat_agent import ( +from ..chat_agent import ( CodexChatAgentError, CodexChatTimeoutError, _host_tool_gate, diff --git a/loopx/chat_endpoints.py b/loopx/chat/endpoints.py similarity index 98% rename from loopx/chat_endpoints.py rename to loopx/chat/endpoints.py index ca6254f509..8a8fc8a399 100644 --- a/loopx/chat_endpoints.py +++ b/loopx/chat/endpoints.py @@ -10,9 +10,9 @@ import shutil from typing import Any -from .chat_store import utc_now -from .file_lock import exclusive_file_lock, write_json_atomic -from .kiro_cli_goal_mode import KIRO_CLI_CHAT_AGENT_ID +from ..chat_store import utc_now +from ..file_lock import exclusive_file_lock, write_json_atomic +from ..kiro_cli_goal_mode import KIRO_CLI_CHAT_AGENT_ID CHAT_ENDPOINT_REGISTRY_SCHEMA_VERSION = "loopx_chat_endpoint_registry_v1" diff --git a/loopx/chat_providers.py b/loopx/chat/providers.py similarity index 99% rename from loopx/chat_providers.py rename to loopx/chat/providers.py index f23c97e34f..d148467d69 100644 --- a/loopx/chat_providers.py +++ b/loopx/chat/providers.py @@ -13,8 +13,8 @@ from urllib import request import uuid -from .chat import VisibleResponseStreamFilter, _turn_prompt, parse_agent_response -from .chat_agent import CodexChatAgentError, _host_tool_gate +from ..chat import VisibleResponseStreamFilter, _turn_prompt, parse_agent_response +from ..chat_agent import CodexChatAgentError, _host_tool_gate EventSink = Callable[[str, dict[str, Any]], None] diff --git a/loopx/chat/session_open.py b/loopx/chat/session_open.py index 615baf76d7..daa1f5d42b 100644 --- a/loopx/chat/session_open.py +++ b/loopx/chat/session_open.py @@ -48,7 +48,7 @@ require_managed_agent_session, ) from ..capabilities.steward_executor import allocation as alloc -from ..chat_acp import ACPStdioAdapter +from .acp import ACPStdioAdapter from ..chat_agent import CodexChatAgentError, agent_endpoint_error from ..chat_codex_goal import UPSTREAM_MODE as CODEX_GOAL_CHAT_MODE from ..chat_manager import ( @@ -60,7 +60,7 @@ open_manager_session, steward_machine_defaults, ) -from ..chat_providers import ClaudeCodeAdapter, direct_model_from_environment +from .providers import ClaudeCodeAdapter, direct_model_from_environment from ..chat_store import ( CHAT_SESSION_MODE_ATTACHED, TERMINAL_TURN_STATES, diff --git a/loopx/chat_runtime.py b/loopx/chat_runtime.py index 38f79259ee..d84a4778bc 100644 --- a/loopx/chat_runtime.py +++ b/loopx/chat_runtime.py @@ -46,7 +46,7 @@ ) from .chat_dsh import DshChatAdapter as DshChatAdapter from .chat.endpoint_catalog import builtin_chat_endpoints -from .chat_endpoints import AgentEndpointRegistry +from .chat.endpoints import AgentEndpointRegistry from .control_plane.chat_turn_acceptance import managed_turn_recovery_allowed from .file_lock import ( LOCK_HOLDER_DEAD, LOCK_HOLDER_LIVE, LOCK_HOLDER_RELEASED, diff --git a/loopx/cli_commands/support_control_chat_endpoint.py b/loopx/cli_commands/support_control_chat_endpoint.py index 6ebf233603..916b035a2a 100644 --- a/loopx/cli_commands/support_control_chat_endpoint.py +++ b/loopx/cli_commands/support_control_chat_endpoint.py @@ -5,7 +5,7 @@ from collections.abc import Callable from pathlib import Path -from ..chat_endpoints import AgentEndpointRegistry +from ..chat.endpoints import AgentEndpointRegistry from ..history import load_registry from ..paths import resolve_runtime_root diff --git a/loopx/kiro_cli_goal_mode/README.md b/loopx/kiro_cli_goal_mode/README.md index ac61115848..827219a3c8 100644 --- a/loopx/kiro_cli_goal_mode/README.md +++ b/loopx/kiro_cli_goal_mode/README.md @@ -158,7 +158,7 @@ and the `loopx` entry only while it still matches what LoopX wrote. Kiro CLI also ships an ACP agent (`kiro-cli acp`), so `loopx dashboard` and `loopx chat` list **Kiro CLI** as a built-in Agent alongside Codex and Claude -Code. It reuses `loopx.chat_acp.ACPStdioAdapter` rather than a second +Code. It reuses `loopx.chat.acp.ACPStdioAdapter` rather than a second transport: probed on 2.21.1, the host answers `initialize` with `protocolVersion: 1` and `loadSession: true`, and `session/new` returns a session id, which is exactly what that adapter expects. diff --git a/loopx/kiro_cli_goal_mode/__init__.py b/loopx/kiro_cli_goal_mode/__init__.py index 1fd97fa680..e0d88958ca 100644 --- a/loopx/kiro_cli_goal_mode/__init__.py +++ b/loopx/kiro_cli_goal_mode/__init__.py @@ -27,7 +27,7 @@ # `kiro-cli acp` starts the host as an Agent Client Protocol agent over stdio. # Probed on 2.21.1: it answers `initialize` with protocolVersion 1 and # `loadSession: true`, and `session/new` returns a session id — exactly the -# shape `loopx.chat_acp.ACPStdioAdapter` already speaks, so LoopX Chat and the +# shape `loopx.chat.acp.ACPStdioAdapter` already speaks, so LoopX Chat and the # dashboard reach Kiro CLI through that adapter instead of a second transport. # # The argv carries no `--trust-all-tools`: LoopX Chat answers every ACP diff --git a/tests/architecture/top_level_module_budget.json b/tests/architecture/top_level_module_budget.json index 7a507492e8..996075a485 100644 --- a/tests/architecture/top_level_module_budget.json +++ b/tests/architecture/top_level_module_budget.json @@ -1,6 +1,6 @@ { "schema": "loopx_top_level_module_budget_v0", - "baseline_commit": "41ea75e89892ed88d0ae543e97e31aad0a181c47", - "max_top_level_modules": 122, + "baseline_commit": "00f47ed364819d9866846ff200ef56fa604f0cdf", + "max_top_level_modules": 119, "allowlist": ["__init__.py", "entrypoint.py", "cli.py"] } diff --git a/tests/test_atomic_write_modes.py b/tests/test_atomic_write_modes.py index ff6b364894..16ac26173e 100644 --- a/tests/test_atomic_write_modes.py +++ b/tests/test_atomic_write_modes.py @@ -15,7 +15,8 @@ import pytest -from loopx import chat_endpoints, chat_store, file_lock +from loopx import chat_store, file_lock +from loopx.chat import endpoints as chat_endpoints from loopx.extensions.lark import private_json from loopx.kunluncode_goal_mode.context import read_binding, write_binding from loopx.registry import atomic_write_json diff --git a/tests/test_chat_acp_startup_timeout.py b/tests/test_chat_acp_startup_timeout.py index 8b6e7cec68..d130c4830a 100644 --- a/tests/test_chat_acp_startup_timeout.py +++ b/tests/test_chat_acp_startup_timeout.py @@ -7,8 +7,8 @@ import pytest -from loopx.chat_acp import ACP_INITIALIZE_TIMEOUT_DEFAULT_SEC, ACPStdioAdapter -from loopx.chat_endpoints import AgentEndpointRegistry +from loopx.chat.acp import ACP_INITIALIZE_TIMEOUT_DEFAULT_SEC, ACPStdioAdapter +from loopx.chat.endpoints import AgentEndpointRegistry from loopx.chat_runtime import ChatRuntimeController from loopx.chat_store import ChatSessionStore diff --git a/tests/test_chat_agent.py b/tests/test_chat_agent.py index 7b58db3c4a..a0f711fcb4 100644 --- a/tests/test_chat_agent.py +++ b/tests/test_chat_agent.py @@ -18,7 +18,7 @@ import loopx.chat as chat import loopx.chat_agent as chat_agent -import loopx.chat_providers as chat_providers +import loopx.chat.providers as chat_providers import loopx.chat_runtime as chat_runtime import pytest diff --git a/tests/test_chat_agent_model_http.py b/tests/test_chat_agent_model_http.py index fe28206b79..7f9c3bb3eb 100644 --- a/tests/test_chat_agent_model_http.py +++ b/tests/test_chat_agent_model_http.py @@ -24,7 +24,7 @@ def current_session_settings(tmp_path, monkeypatch): monkeypatch.setattr(chat_server.ChatRequestHandler, "_registry_and_goal", lambda *_: ({}, {})) monkeypatch.setattr(chat_server, "_goal_public_context", lambda *_: { "project": tmp_path, "objective": "Keep this conversation.", "title": "Fixture"}) - monkeypatch.setattr("loopx.chat_providers.codex_model_options", lambda *_args, **_kwargs: { + monkeypatch.setattr("loopx.chat.providers.codex_model_options", lambda *_args, **_kwargs: { "options": [{"value": "first", "reasoning_efforts": ["low", "high"]}, {"value": "second", "reasoning_efforts": ["low", "high"]}]}) session = store.create_session(goal_id="fixture", agent_id="codex", adapter_kind="codex_app_server", @@ -173,7 +173,7 @@ def test_current_session_settings_do_not_modify_a_session_closed_during_catalog_ def catalog(*_args, **_kwargs): store.update_session(session["session_id"], status="closed") return {"options": [{"value": "second", "reasoning_efforts": ["low", "high"]}]} - monkeypatch.setattr("loopx.chat_providers.codex_model_options", catalog) + monkeypatch.setattr("loopx.chat.providers.codex_model_options", catalog) status, _ = post({"agent_model_id": "second", "agent_reasoning_effort": "high"}) assert status == 404 saved = store.load_session(session["session_id"]) @@ -185,7 +185,7 @@ def test_current_session_settings_failure_preserves_previous_values(current_sess store, session, post = current_session_settings before = store.load_session(session["session_id"]) if failure == "unavailable": - monkeypatch.setattr("loopx.chat_providers.codex_model_options", lambda *_a, **_kw: None) + monkeypatch.setattr("loopx.chat.providers.codex_model_options", lambda *_a, **_kw: None) else: monkeypatch.setattr(store, "update_session", lambda *_a, **_kw: (_ for _ in ()).throw(OSError("write refused"))) status, _ = post({"agent_model_id": "second", "agent_reasoning_effort": "high"}) diff --git a/tests/test_chat_codex_defaults.py b/tests/test_chat_codex_defaults.py index 30f538eb9c..4f9cdc119c 100644 --- a/tests/test_chat_codex_defaults.py +++ b/tests/test_chat_codex_defaults.py @@ -157,7 +157,7 @@ def test_model_effort_and_speed_are_separate_and_reversible_defaults(tmp_path, m def test_goal_codex_defaults_follow_chat_settings_when_coordination_uses_a_separate_root(tmp_path, monkeypatch): - from loopx import chat_providers + from loopx.chat import providers as chat_providers coordination = tmp_path / "coordination" registry = tmp_path / "registry.json" diff --git a/tests/test_chat_goal_workspace_selection.py b/tests/test_chat_goal_workspace_selection.py index 98e7b9df26..08b85bfb5d 100644 --- a/tests/test_chat_goal_workspace_selection.py +++ b/tests/test_chat_goal_workspace_selection.py @@ -454,7 +454,7 @@ def test_available_first_agent_retains_its_real_eligibility_refusal(tmp_path, re import threading from loopx.chat_actions import goal_workspace_ref - from loopx.chat_endpoints import AgentEndpointRegistry + from loopx.chat.endpoints import AgentEndpointRegistry from loopx.chat_runtime import ChatRuntimeController from loopx.chat_server import ChatHTTPServer, ChatRequestHandler from loopx.chat_store import ChatSessionStore diff --git a/tests/test_chat_internal_module_layout.py b/tests/test_chat_internal_module_layout.py index 967aa71221..a16fb16023 100644 --- a/tests/test_chat_internal_module_layout.py +++ b/tests/test_chat_internal_module_layout.py @@ -6,11 +6,14 @@ from pathlib import Path import loopx.chat as public_chat +from loopx.chat.acp import ACPStdioAdapter from loopx.chat.automation_cadence_api import AutomationCadenceRequestMixin +from loopx.chat.endpoints import AgentEndpointRegistry from loopx.chat.event_cache import ChatEventCache from loopx.chat.goal_configuration_api import GoalConfigurationRequestMixin from loopx.chat.machine_configuration_api import MachineConfigurationRequestMixin from loopx.chat.monitor_actions import ChatMonitorActionMixin +from loopx.chat.providers import ClaudeCodeAdapter from loopx.chat.session_open import open_chat_session from loopx.chat.ssh_source_api import SshSourceRequestMixin from loopx.chat.status_api import ChatStatusRequestMixin, goal_read_runtime_root @@ -23,10 +26,12 @@ def test_chat_internal_helpers_load_below_the_public_chat_namespace() -> None: namespace_root = Path(public_chat.__file__).with_suffix("").resolve() assert [Path(entry).resolve() for entry in public_chat.__path__] == [namespace_root] + assert ACPStdioAdapter.__module__ == "loopx.chat.acp" assert ( AutomationCadenceRequestMixin.__module__ == "loopx.chat.automation_cadence_api" ) + assert AgentEndpointRegistry.__module__ == "loopx.chat.endpoints" assert ChatEventCache.__module__ == "loopx.chat.event_cache" assert GoalConfigurationRequestMixin.__module__ == "loopx.chat.goal_configuration_api" assert ( @@ -34,6 +39,7 @@ def test_chat_internal_helpers_load_below_the_public_chat_namespace() -> None: == "loopx.chat.machine_configuration_api" ) assert ChatMonitorActionMixin.__module__ == "loopx.chat.monitor_actions" + assert ClaudeCodeAdapter.__module__ == "loopx.chat.providers" assert open_chat_session.__module__ == "loopx.chat.session_open" assert SshSourceRequestMixin.__module__ == "loopx.chat.ssh_source_api" assert ChatTodoActionMixin.__module__ == "loopx.chat.todo_actions" @@ -44,6 +50,9 @@ def test_chat_internal_helpers_load_below_the_public_chat_namespace() -> None: def test_chat_internal_helpers_have_no_top_level_compatibility_shims() -> None: for old_module in ( + "loopx.chat_acp", + "loopx.chat_endpoints", + "loopx.chat_providers", "loopx.chat_status_api", "loopx.chat_event_cache", "loopx.chat_automation_cadence_api", diff --git a/tests/test_chat_long_running.py b/tests/test_chat_long_running.py index 71d3fe8bc5..42649804dd 100644 --- a/tests/test_chat_long_running.py +++ b/tests/test_chat_long_running.py @@ -5,7 +5,8 @@ import pytest -from loopx import chat_agent, chat_acp +from loopx import chat_agent +from loopx.chat import acp as chat_acp from loopx.chat_store import ChatSessionStore from loopx.cli import build_parser from loopx.cli_commands.support_control_chat import chat_server_options diff --git a/tests/test_chat_path_redaction.py b/tests/test_chat_path_redaction.py index d3ee6f9b67..e08a2317e4 100644 --- a/tests/test_chat_path_redaction.py +++ b/tests/test_chat_path_redaction.py @@ -17,7 +17,7 @@ redact_local_paths, redact_response_markdown, ) -from loopx.chat_acp import ACPStdioAdapter +from loopx.chat.acp import ACPStdioAdapter from loopx.chat.status_api import ChatStatusRequestMixin diff --git a/tests/test_chat_reasoning_selection.py b/tests/test_chat_reasoning_selection.py index db9b5c5101..8cb289a4cf 100644 --- a/tests/test_chat_reasoning_selection.py +++ b/tests/test_chat_reasoning_selection.py @@ -7,10 +7,10 @@ import pytest -from loopx.chat_acp import ACPStdioAdapter +from loopx.chat.acp import ACPStdioAdapter from loopx.chat_agent import CodexChatAgentError -from loopx.chat_providers import codex_model_options -from loopx.chat_endpoints import AgentEndpointRegistry +from loopx.chat.providers import codex_model_options +from loopx.chat.endpoints import AgentEndpointRegistry from loopx.chat_runtime import ChatRuntimeController from loopx.chat_store import ChatSessionStore from test_chat_ordinary_project import ordinary # noqa: F401 @@ -229,7 +229,7 @@ def test_acp_restart_records_provider_restored_settings_instead_of_failing(tmp_p def test_codex_catalog_failure_is_retryable_without_inventing_current_model(tmp_path, monkeypatch): runtime = ChatRuntimeController(store=ChatSessionStore(tmp_path / "runtime"), codex_bin="fixture") monkeypatch.setattr(runtime, "capabilities", lambda: [{"agent_id": "codex", "available": True}]) - monkeypatch.setattr("loopx.chat_providers.codex_model_options", lambda *_args, **_kwargs: None) + monkeypatch.setattr("loopx.chat.providers.codex_model_options", lambda *_args, **_kwargs: None) try: with pytest.raises(CodexChatAgentError) as error: runtime.inspect_agent_model_options("codex", work_dir=tmp_path) diff --git a/tests/test_kiro_cli_host_surface.py b/tests/test_kiro_cli_host_surface.py index b067160290..9eac681460 100644 --- a/tests/test_kiro_cli_host_surface.py +++ b/tests/test_kiro_cli_host_surface.py @@ -28,7 +28,7 @@ PROJECT_SKILL_SURFACES, ) from loopx.chat_actions import ChatActionService -from loopx.chat_endpoints import RESERVED_AGENT_IDS, AgentEndpointRegistry +from loopx.chat.endpoints import RESERVED_AGENT_IDS, AgentEndpointRegistry from loopx.chat_runtime import ChatRuntimeController from loopx.chat_store import ChatSessionStore from loopx.cli_commands._host_thread import (