Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions loopx/chat_completed_todos.py → loopx/chat/completed_todos.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
from time import monotonic
from urllib.parse import parse_qs, urlparse

from .paths import resolve_runtime_root
from .capabilities.native_chat.project_context import coordination_runtime_root
from .status_server import is_loopback_host
from ..paths import resolve_runtime_root
from ..capabilities.native_chat.project_context import coordination_runtime_root
from ..status_server import is_loopback_host


def _goal_result_candidates(*, runtime_root, goal_id):
"""Snapshot bounded metadata; exact acceptance is checked per requested page."""
from .control_plane.coordination.local_authority import read_canonical_todos_if_promoted
from ..control_plane.coordination.local_authority import read_canonical_todos_if_promoted

payload = read_canonical_todos_if_promoted(runtime_root=runtime_root, goal_id=goal_id)
if payload is None:
Expand All @@ -42,7 +42,7 @@ def _goal_result_candidates(*, runtime_root, goal_id):


def _verify_goal_result_page(*, page, registry_path, runtime_root, goal_id):
from .control_plane.todos.completion_result import read_completion_result
from ..control_plane.todos.completion_result import read_completion_result

rows = []
unavailable_todo_ids = []
Expand Down Expand Up @@ -159,7 +159,7 @@ def _goal_results(self) -> None:
self._send_error("Goal results could not be loaded.", status=503)

def _goal_result(self, todo_id: str) -> None:
from .control_plane.todos.completion_result import read_completion_result
from ..control_plane.todos.completion_result import read_completion_result

goal_id = parse_qs(urlparse(self.path).query).get("goal_id", [""])[0]
try:
Expand All @@ -182,7 +182,7 @@ def _goal_result(self, todo_id: str) -> None:
def _completed_todos(self) -> None:
# This loopback-only workspace read preserves task text and evidence.
# Select display fields without returning the authority's internal metadata.
from .control_plane.todos.list_readback import list_goal_todos
from ..control_plane.todos.list_readback import list_goal_todos

if not self._require_loopback_origin():
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

from typing import Any

from .control_plane.goals.configure_goal_service import configure_goal_with_global_sync
from .capabilities.multi_subagent import (
from ..control_plane.goals.configure_goal_service import configure_goal_with_global_sync
from ..capabilities.multi_subagent import (
apply_codex_subagent_capacity,
plan_codex_subagent_capacity,
public_codex_host_capacity,
)
from .control_plane.todos.contract import normalize_todo_task_domain
from .status_server import configure_goal_preview_id
from .orchestration import subagent_model_configuration_options
from ..control_plane.todos.contract import normalize_todo_task_domain
from ..status_server import configure_goal_preview_id
from ..orchestration import subagent_model_configuration_options


CHAT_GOAL_SUBAGENT_DRY_RUN_PATH = "/api/chat/goal-subagents/dry-run"
Expand Down
4 changes: 2 additions & 2 deletions loopx/chat_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
)
from .chat_actions import ChatActionService, ProtectedActionGate, goal_workspace_labels, goal_workspace_ref
from .chat_action_store import ACTION_KINDS, ActionConflictError, ChatActionStore
from .chat_goal_subagent_api import (
from .chat.goal_subagent_api import (
GoalSubagentConfigurationRequestMixin,
add_goal_subagent_capability,
add_goal_subagent_routes,
Expand Down Expand Up @@ -101,7 +101,7 @@
default_extension_state_file,
resolve_extension_activation,
)
from .chat_completed_todos import CompletedTodoPages, CompletedTodoRequestMixin
from .chat.completed_todos import CompletedTodoPages, CompletedTodoRequestMixin
from .presentation.explore_results_api import ExploreResultsRequestMixin
from .presentation.research_analysis_api import RESEARCH_ANALYSIS_PATH, ResearchAnalysisRequestMixin
from .presentation.goal_source_routing import GOAL_SOURCE_LINKS_PATH, GoalSourceRequestMixin
Expand Down
2 changes: 1 addition & 1 deletion loopx/chat_status_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from urllib.parse import parse_qs, urlparse

from .chat import redact_local_paths
from .chat_goal_subagent_api import goal_subagent_configuration_enabled
from .chat.goal_subagent_api import goal_subagent_configuration_enabled
from .chat.workspace_directory import workspace_goal_directory
from .codex_app_thread_activity import (
codex_delivery_expectations,
Expand Down
2 changes: 1 addition & 1 deletion loopx/control_plane/status/goal_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from urllib.request import HTTPRedirectHandler, Request, build_opener

from ..content_digest import BARE_SHA256_PATTERN
from ...chat_completed_todos import CompletedTodoPages
from ...chat.completed_todos import CompletedTodoPages
from ...status_server import is_loopback_host
from .ssh_host_catalog import configured_ssh_host_aliases

Expand Down
2 changes: 1 addition & 1 deletion tests/architecture/top_level_module_budget.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"schema": "loopx_top_level_module_budget_v0",
"baseline_commit": "a4483aaece5bc74ec3f969fd067229487022401b",
"max_top_level_modules": 132,
"max_top_level_modules": 130,
"allowlist": ["__init__.py", "entrypoint.py", "cli.py"]
}
2 changes: 1 addition & 1 deletion tests/capabilities/test_codex_subagent_host_capacity.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from loopx.control_plane.goals.configure_goal_service import (
configure_goal_with_global_sync,
)
from loopx.chat_goal_subagent_api import GoalSubagentConfigurationRequestMixin
from loopx.chat.goal_subagent_api import GoalSubagentConfigurationRequestMixin
from loopx.file_lock import exclusive_cross_runtime_file_lock
from loopx.paths import global_registry_path

Expand Down
2 changes: 1 addition & 1 deletion tests/control_plane/test_subagent_model_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def test_capability_model_rejects_non_string_inputs(config: dict) -> None:
def test_goal_drawer_preview_binding_and_model_roundtrip(registry: Path) -> None:
from types import SimpleNamespace

from loopx.chat_goal_subagent_api import GoalSubagentConfigurationRequestMixin
from loopx.chat.goal_subagent_api import GoalSubagentConfigurationRequestMixin

class Handler(GoalSubagentConfigurationRequestMixin):
def __init__(self) -> None:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_chat_completed_todos.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import pytest

from loopx.chat_completed_todos import CompletedTodoPages, _verify_goal_result_page
from loopx.chat.completed_todos import CompletedTodoPages, _verify_goal_result_page
from loopx.chat_server import ChatHTTPServer, ChatRequestHandler
from loopx.control_plane.todos.contract import encode_metadata_value

Expand Down Expand Up @@ -127,7 +127,7 @@ def test_snapshot_expiry_starts_when_loading_finishes(monkeypatch):
pages = CompletedTodoPages()
pages.ttl_seconds = 1
clock = [0]
monkeypatch.setattr("loopx.chat_completed_todos.monotonic", lambda: clock[0])
monkeypatch.setattr("loopx.chat.completed_todos.monotonic", lambda: clock[0])
rows = [{"todo_id": f"todo_{index}"} for index in range(41)]

def load():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_managed_research_team.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from loopx.control_plane.goals.acceptance import ( # noqa: E402
configure_goal_acceptance, inspect_goal_acceptance, verify_goal_acceptance,
)
from loopx.chat_completed_todos import ( # noqa: E402
from loopx.chat.completed_todos import ( # noqa: E402
CompletedTodoPages, _goal_result_candidates, _verify_goal_result_page,
)
from loopx.chat_server import ChatHTTPServer, ChatRequestHandler # noqa: E402
Expand Down
Loading