From c7fbe3991b4caa77c9f0a1242a7cbdd4d63ac98f Mon Sep 17 00:00:00 2001 From: kina0630 Date: Sun, 14 Jun 2026 11:15:11 +0800 Subject: [PATCH] refactor(layout): phase2 rewrite call sites to new paths, remove shims --- .../action_safety/validation_feedback.py | 2 +- .../src/coding_agent/adapter_types.py | 6 ---- .../src/coding_agent/agent_identity.py | 6 ---- .../src/coding_agent/agent_observability.py | 6 ---- coding-agent/src/coding_agent/app.py | 6 ---- .../src/coding_agent/approval/interactions.py | 2 +- coding-agent/src/coding_agent/bee/launch.py | 6 ++-- coding-agent/src/coding_agent/bee/runtime.py | 2 +- .../src/coding_agent/bee/template_pack.py | 2 +- .../src/coding_agent/bee/workspace.py | 2 +- .../src/coding_agent/bee_command_bridge.py | 6 ---- coding-agent/src/coding_agent/bee_launch.py | 6 ---- coding-agent/src/coding_agent/bee_runtime.py | 6 ---- .../src/coding_agent/bee_template_pack.py | 6 ---- .../src/coding_agent/bee_workspace.py | 6 ---- .../src/coding_agent/cli/acp_command.py | 2 +- .../src/coding_agent/cli/local_runtime.py | 6 ++-- coding-agent/src/coding_agent/cli/main.py | 6 ++-- .../src/coding_agent/cli/remote_commands.py | 4 +-- .../src/coding_agent/cli/stats_command.py | 2 +- coding-agent/src/coding_agent/context_pack.py | 6 ---- coding-agent/src/coding_agent/core/app.py | 2 +- .../src/coding_agent/events/display.py | 2 +- .../src/coding_agent/events/replay.py | 2 +- .../src/coding_agent/executors/external.py | 4 +-- .../src/coding_agent/external_executor.py | 4 --- .../src/coding_agent/local_durable_store.py | 4 --- .../src/coding_agent/local_storage.py | 6 ---- coding-agent/src/coding_agent/metrics.py | 6 ---- .../src/coding_agent/pg_durable_store.py | 4 --- coding-agent/src/coding_agent/plugins/kb.py | 2 +- .../src/coding_agent/plugins/memory.py | 2 +- .../src/coding_agent/plugins/metrics.py | 2 +- .../src/coding_agent/plugins/storage.py | 2 +- .../src/coding_agent/recall_context.py | 6 ---- .../src/coding_agent/recall_evaluation.py | 6 ---- .../src/coding_agent/remote/worker.py | 4 +-- .../coding_agent/runs/attached_executor.py | 2 +- coding-agent/src/coding_agent/runs/cancel.py | 2 +- .../src/coding_agent/runs/lifecycle.py | 4 +-- .../src/coding_agent/runs/metadata.py | 2 +- .../src/coding_agent/runs/observation.py | 4 +-- .../src/coding_agent/runs/persistence.py | 2 +- coding-agent/src/coding_agent/runs/query.py | 2 +- .../src/coding_agent/runs/recovery.py | 2 +- coding-agent/src/coding_agent/runs/resume.py | 2 +- .../src/coding_agent/runs/runtime_events.py | 2 +- .../src/coding_agent/runs/scheduled.py | 6 ++-- .../src/coding_agent/runtime_store.py | 6 ---- .../src/coding_agent/scheduled_runs.py | 4 --- .../src/coding_agent/server/http_server.py | 20 ++++++------ .../coding_agent/server/session_manager.py | 10 +++--- .../src/coding_agent/storage_migration.py | 4 --- .../src/coding_agent/stores/durable_local.py | 2 +- .../src/coding_agent/stores/durable_pg.py | 2 +- .../src/coding_agent/stores/migration.py | 2 +- .../src/coding_agent/tools/subagent.py | 4 +-- .../src/coding_agent/topic_lifecycle.py | 6 ---- coding-agent/src/coding_agent/topic_memory.py | 6 ---- .../src/coding_agent/topic_provenance.py | 6 ---- .../src/coding_agent/topic_range_index.py | 6 ---- coding-agent/src/coding_agent/topic_recall.py | 6 ---- coding-agent/src/coding_agent/topic_store.py | 6 ---- .../src/coding_agent/topics/memory.py | 2 +- .../src/coding_agent/workspace_archive.py | 6 ---- .../tests/cli/test_entrypoint_contract.py | 2 +- coding-agent/tests/cli/test_local_runtime.py | 2 +- coding-agent/tests/cli/test_remote_client.py | 32 +++++++++---------- .../test_docker_workspace_provider.py | 2 +- ...test_docker_workspace_provider_transfer.py | 2 +- .../environment/test_workspace_archive.py | 2 +- .../tests/coding_agent/test_adapter_types.py | 2 +- .../coding_agent/test_agent_observability.py | 4 +-- .../test_approval_interactions.py | 2 +- .../coding_agent/test_bee_command_bridge.py | 4 +-- .../tests/coding_agent/test_bee_launch.py | 10 +++--- .../tests/coding_agent/test_bee_runtime.py | 6 ++-- .../coding_agent/test_bee_template_pack.py | 2 +- .../test_bee_template_pack_smoke.py | 12 +++---- .../tests/coding_agent/test_bee_workspace.py | 2 +- .../tests/coding_agent/test_bootstrap.py | 2 +- .../tests/coding_agent/test_cli_pipeline.py | 2 +- .../tests/coding_agent/test_context_pack.py | 2 +- .../test_cross_topic_memory_smoke.py | 10 +++--- .../tests/coding_agent/test_display_events.py | 2 +- .../coding_agent/test_external_executor.py | 6 ++-- .../test_external_executor_smoke.py | 6 ++-- .../coding_agent/test_jsonl_runtime_store.py | 2 +- .../tests/coding_agent/test_memory_review.py | 2 +- .../coding_agent/test_pg_durable_fencing.py | 4 +-- .../coding_agent/test_pg_runtime_store.py | 2 +- .../coding_agent/test_pipeline_adapter.py | 2 +- .../tests/coding_agent/test_recall_context.py | 8 ++--- .../coding_agent/test_recall_evaluation.py | 8 ++--- .../test_release_observability_contract.py | 2 +- .../tests/coding_agent/test_run_lifecycle.py | 4 +-- .../test_runtime_attached_executor_service.py | 2 +- .../test_runtime_cancel_service.py | 2 +- .../test_runtime_event_replay_service.py | 2 +- .../test_runtime_observation_service.py | 2 +- .../test_runtime_query_service.py | 2 +- .../test_runtime_resume_service.py | 2 +- .../test_runtime_run_persistence.py | 2 +- .../coding_agent/test_runtime_run_recovery.py | 2 +- .../test_runtime_store_contracts.py | 2 +- .../coding_agent/test_runtime_turn_service.py | 4 +-- .../test_runtime_wire_event_recorder.py | 2 +- .../tests/coding_agent/test_scheduled_runs.py | 6 ++-- .../test_sqlite_local_durable_fencing.py | 6 ++-- .../coding_agent/test_sqlite_runtime_store.py | 2 +- .../test_sqlite_storage_migration.py | 2 +- .../coding_agent/test_topic_layer_smoke.py | 8 ++--- .../coding_agent/test_topic_lifecycle.py | 6 ++-- .../tests/coding_agent/test_topic_memory.py | 6 ++-- .../coding_agent/test_topic_provenance.py | 4 +-- .../coding_agent/test_topic_range_index.py | 4 +-- .../tests/coding_agent/test_topic_recall.py | 4 +-- .../tests/coding_agent/test_topic_store.py | 2 +- .../tests/coding_agent/tools/test_subagent.py | 2 +- coding-agent/tests/conftest.py | 2 +- .../tests/dogfood/test_local_dogfood_run.py | 2 +- .../dogfood/test_workspace_provider_demo.py | 2 +- .../integration/test_durable_runtime_smoke.py | 4 +-- .../tests/integration/test_pipeline_e2e.py | 2 +- .../tests/ui/test_developer_console.py | 12 +++---- coding-agent/tests/ui/test_http_server.py | 6 ++-- .../ui/test_session_manager_public_api.py | 10 +++--- .../tests/ui/test_session_manager_runtime.py | 6 ++-- coding-agent/tests/unit/core/test_metrics.py | 2 +- 129 files changed, 202 insertions(+), 354 deletions(-) delete mode 100644 coding-agent/src/coding_agent/adapter_types.py delete mode 100644 coding-agent/src/coding_agent/agent_identity.py delete mode 100644 coding-agent/src/coding_agent/agent_observability.py delete mode 100644 coding-agent/src/coding_agent/app.py delete mode 100644 coding-agent/src/coding_agent/bee_command_bridge.py delete mode 100644 coding-agent/src/coding_agent/bee_launch.py delete mode 100644 coding-agent/src/coding_agent/bee_runtime.py delete mode 100644 coding-agent/src/coding_agent/bee_template_pack.py delete mode 100644 coding-agent/src/coding_agent/bee_workspace.py delete mode 100644 coding-agent/src/coding_agent/context_pack.py delete mode 100644 coding-agent/src/coding_agent/external_executor.py delete mode 100644 coding-agent/src/coding_agent/local_durable_store.py delete mode 100644 coding-agent/src/coding_agent/local_storage.py delete mode 100644 coding-agent/src/coding_agent/metrics.py delete mode 100644 coding-agent/src/coding_agent/pg_durable_store.py delete mode 100644 coding-agent/src/coding_agent/recall_context.py delete mode 100644 coding-agent/src/coding_agent/recall_evaluation.py delete mode 100644 coding-agent/src/coding_agent/runtime_store.py delete mode 100644 coding-agent/src/coding_agent/scheduled_runs.py delete mode 100644 coding-agent/src/coding_agent/storage_migration.py delete mode 100644 coding-agent/src/coding_agent/topic_lifecycle.py delete mode 100644 coding-agent/src/coding_agent/topic_memory.py delete mode 100644 coding-agent/src/coding_agent/topic_provenance.py delete mode 100644 coding-agent/src/coding_agent/topic_range_index.py delete mode 100644 coding-agent/src/coding_agent/topic_recall.py delete mode 100644 coding-agent/src/coding_agent/topic_store.py delete mode 100644 coding-agent/src/coding_agent/workspace_archive.py diff --git a/coding-agent/src/coding_agent/action_safety/validation_feedback.py b/coding-agent/src/coding_agent/action_safety/validation_feedback.py index f75223fb0..6c764bf2c 100644 --- a/coding-agent/src/coding_agent/action_safety/validation_feedback.py +++ b/coding-agent/src/coding_agent/action_safety/validation_feedback.py @@ -1,7 +1,7 @@ from __future__ import annotations import hashlib -from coding_agent.context_pack import ( +from coding_agent.topics.context_pack import ( ContextPack, ContextPackItem, ContextPackRenderer, diff --git a/coding-agent/src/coding_agent/adapter_types.py b/coding-agent/src/coding_agent/adapter_types.py deleted file mode 100644 index 8551d16f4..000000000 --- a/coding-agent/src/coding_agent/adapter_types.py +++ /dev/null @@ -1,6 +0,0 @@ -"""Deprecated import location. Moved to coding_agent.adapter.types.""" - -import sys as _sys -from coding_agent.adapter import types as _moved - -_sys.modules[__name__] = _moved diff --git a/coding-agent/src/coding_agent/agent_identity.py b/coding-agent/src/coding_agent/agent_identity.py deleted file mode 100644 index 288666cb7..000000000 --- a/coding-agent/src/coding_agent/agent_identity.py +++ /dev/null @@ -1,6 +0,0 @@ -"""Deprecated import location. Moved to coding_agent.core.agent_identity.""" - -import sys as _sys -from coding_agent.core import agent_identity as _moved - -_sys.modules[__name__] = _moved diff --git a/coding-agent/src/coding_agent/agent_observability.py b/coding-agent/src/coding_agent/agent_observability.py deleted file mode 100644 index 6ceb36af6..000000000 --- a/coding-agent/src/coding_agent/agent_observability.py +++ /dev/null @@ -1,6 +0,0 @@ -"""Deprecated import location. Moved to coding_agent.observability.agent.""" - -import sys as _sys -from coding_agent.observability import agent as _moved - -_sys.modules[__name__] = _moved diff --git a/coding-agent/src/coding_agent/app.py b/coding-agent/src/coding_agent/app.py deleted file mode 100644 index 55a549548..000000000 --- a/coding-agent/src/coding_agent/app.py +++ /dev/null @@ -1,6 +0,0 @@ -"""Deprecated import location. Moved to coding_agent.core.app.""" - -import sys as _sys -from coding_agent.core import app as _moved - -_sys.modules[__name__] = _moved diff --git a/coding-agent/src/coding_agent/approval/interactions.py b/coding-agent/src/coding_agent/approval/interactions.py index c80d1c983..02f61f875 100644 --- a/coding-agent/src/coding_agent/approval/interactions.py +++ b/coding-agent/src/coding_agent/approval/interactions.py @@ -7,7 +7,7 @@ from math import isfinite from typing import Protocol, cast -from coding_agent.runtime_store import ( +from coding_agent.stores.runtime_store import ( AgentInteractionRecord, JSONObject, JSONValue, diff --git a/coding-agent/src/coding_agent/bee/launch.py b/coding-agent/src/coding_agent/bee/launch.py index 1715f96e0..73086e8f8 100644 --- a/coding-agent/src/coding_agent/bee/launch.py +++ b/coding-agent/src/coding_agent/bee/launch.py @@ -32,9 +32,9 @@ write_bee_workspace_run_artifacts, ) from coding_agent.observability import record_bee_launch_metric -from coding_agent.scheduled_runs import ScheduledLaunchIntent, ScheduleTriggerRecord -from coding_agent.topic_lifecycle import TopicLifecycle -from coding_agent.topic_store import JSONObject, JSONValue, TopicRecord +from coding_agent.runs.scheduled import ScheduledLaunchIntent, ScheduleTriggerRecord +from coding_agent.topics.lifecycle import TopicLifecycle +from coding_agent.topics.store import JSONObject, JSONValue, TopicRecord BeeLaunchSource = str BeeLaunchStatus = str diff --git a/coding-agent/src/coding_agent/bee/runtime.py b/coding-agent/src/coding_agent/bee/runtime.py index 5b65494bd..77f22e5f7 100644 --- a/coding-agent/src/coding_agent/bee/runtime.py +++ b/coding-agent/src/coding_agent/bee/runtime.py @@ -15,7 +15,7 @@ from agentkit.storage.pg import AsyncPGPool, PGPool from agentkit.tape.anchor import Anchor from agentkit.tape.tape import Tape -from coding_agent.topic_store import ( +from coding_agent.topics.store import ( JSONObject, JSONValue, TopicAnchorRecord, diff --git a/coding-agent/src/coding_agent/bee/template_pack.py b/coding-agent/src/coding_agent/bee/template_pack.py index 302a51c37..49f7d5d97 100644 --- a/coding-agent/src/coding_agent/bee/template_pack.py +++ b/coding-agent/src/coding_agent/bee/template_pack.py @@ -26,7 +26,7 @@ load_bee_workspace_command_intents, load_bee_workspace_template, ) -from coding_agent.topic_store import JSONObject +from coding_agent.topics.store import JSONObject _MANIFEST_CANDIDATES: Final[tuple[tuple[str, str], ...]] = ( ("bee-pack.yaml", "yaml"), diff --git a/coding-agent/src/coding_agent/bee/workspace.py b/coding-agent/src/coding_agent/bee/workspace.py index a63e6dc8a..fb74aeb02 100644 --- a/coding-agent/src/coding_agent/bee/workspace.py +++ b/coding-agent/src/coding_agent/bee/workspace.py @@ -15,7 +15,7 @@ import yaml from coding_agent.bee.runtime import BeeTaskManifest, parse_bee_task_manifest -from coding_agent.topic_store import JSONObject +from coding_agent.topics.store import JSONObject _BEE_DIR: Final[str] = ".bee" _TEMPLATES_DIR: Final[str] = "templates" diff --git a/coding-agent/src/coding_agent/bee_command_bridge.py b/coding-agent/src/coding_agent/bee_command_bridge.py deleted file mode 100644 index aa71f7c53..000000000 --- a/coding-agent/src/coding_agent/bee_command_bridge.py +++ /dev/null @@ -1,6 +0,0 @@ -"""Deprecated import location. Moved to coding_agent.bee.command_bridge.""" - -import sys as _sys -from coding_agent.bee import command_bridge as _moved - -_sys.modules[__name__] = _moved diff --git a/coding-agent/src/coding_agent/bee_launch.py b/coding-agent/src/coding_agent/bee_launch.py deleted file mode 100644 index 3962dbb03..000000000 --- a/coding-agent/src/coding_agent/bee_launch.py +++ /dev/null @@ -1,6 +0,0 @@ -"""Deprecated import location. Moved to coding_agent.bee.launch.""" - -import sys as _sys -from coding_agent.bee import launch as _moved - -_sys.modules[__name__] = _moved diff --git a/coding-agent/src/coding_agent/bee_runtime.py b/coding-agent/src/coding_agent/bee_runtime.py deleted file mode 100644 index cf041d594..000000000 --- a/coding-agent/src/coding_agent/bee_runtime.py +++ /dev/null @@ -1,6 +0,0 @@ -"""Deprecated import location. Moved to coding_agent.bee.runtime.""" - -import sys as _sys -from coding_agent.bee import runtime as _moved - -_sys.modules[__name__] = _moved diff --git a/coding-agent/src/coding_agent/bee_template_pack.py b/coding-agent/src/coding_agent/bee_template_pack.py deleted file mode 100644 index 733b5fff6..000000000 --- a/coding-agent/src/coding_agent/bee_template_pack.py +++ /dev/null @@ -1,6 +0,0 @@ -"""Deprecated import location. Moved to coding_agent.bee.template_pack.""" - -import sys as _sys -from coding_agent.bee import template_pack as _moved - -_sys.modules[__name__] = _moved diff --git a/coding-agent/src/coding_agent/bee_workspace.py b/coding-agent/src/coding_agent/bee_workspace.py deleted file mode 100644 index 10cb45bbf..000000000 --- a/coding-agent/src/coding_agent/bee_workspace.py +++ /dev/null @@ -1,6 +0,0 @@ -"""Deprecated import location. Moved to coding_agent.bee.workspace.""" - -import sys as _sys -from coding_agent.bee import workspace as _moved - -_sys.modules[__name__] = _moved diff --git a/coding-agent/src/coding_agent/cli/acp_command.py b/coding-agent/src/coding_agent/cli/acp_command.py index 2268f61d1..195dde932 100644 --- a/coding-agent/src/coding_agent/cli/acp_command.py +++ b/coding-agent/src/coding_agent/cli/acp_command.py @@ -11,7 +11,7 @@ from coding_agent.acp import AcpServer, AcpMode, run_stdio from coding_agent.approval import ApprovalPolicy from coding_agent.cli.local_runtime import create_local_cli_session_manager -from coding_agent.local_storage import ( +from coding_agent.stores.local import ( local_data_dir, local_sqlite_path, local_sqlite_storage_config, diff --git a/coding-agent/src/coding_agent/cli/local_runtime.py b/coding-agent/src/coding_agent/cli/local_runtime.py index d62d98198..e0a0f2041 100644 --- a/coding-agent/src/coding_agent/cli/local_runtime.py +++ b/coding-agent/src/coding_agent/cli/local_runtime.py @@ -12,8 +12,8 @@ from coding_agent.adapter import PipelineAdapter from coding_agent.core.config import Config from coding_agent.runs import UNSET, UnsetType -from coding_agent.local_storage import local_sqlite_storage_config -from coding_agent.local_storage import local_sqlite_path_from_storage_config +from coding_agent.stores.local import local_sqlite_storage_config +from coding_agent.stores.local import local_sqlite_path_from_storage_config from coding_agent.server.session_manager import SessionManager from coding_agent.server.stores.session_owner_store import SQLiteSessionOwnerStore @@ -360,7 +360,7 @@ def create_local_cli_session_manager( def create_agent(*args: Any, **kwargs: Any) -> tuple[Any, Any]: - return importlib.import_module("coding_agent.app").create_agent(*args, **kwargs) + return importlib.import_module("coding_agent.core.app").create_agent(*args, **kwargs) def create_local_cli_runtime(config: Config, consumer: Any) -> LocalCliRuntime: diff --git a/coding-agent/src/coding_agent/cli/main.py b/coding-agent/src/coding_agent/cli/main.py index 8e8db71b4..ea49a2c25 100644 --- a/coding-agent/src/coding_agent/cli/main.py +++ b/coding-agent/src/coding_agent/cli/main.py @@ -13,7 +13,7 @@ import click -from coding_agent.app import create_agent, create_child_pipeline # noqa: F401 +from coding_agent.core.app import create_agent, create_child_pipeline # noqa: F401 from coding_agent.cli.acp_command import acp from coding_agent.cli.kb_commands import kb from coding_agent.cli.oauth_commands import oauth_cli @@ -30,8 +30,8 @@ create_local_cli_session_manager, local_cli_session_origin, ) -from coding_agent.storage_migration import migrate_legacy_storage_to_sqlite -from coding_agent.local_storage import local_sqlite_storage_config +from coding_agent.stores.migration import migrate_legacy_storage_to_sqlite +from coding_agent.stores.local import local_sqlite_storage_config from coding_agent.ui.headless import HeadlessConsumer from coding_agent.ui.rich_tui import CodingAgentTUI from coding_agent.wire.protocol import TurnEnd, WireMessage diff --git a/coding-agent/src/coding_agent/cli/remote_commands.py b/coding-agent/src/coding_agent/cli/remote_commands.py index 8e62993fc..f96906682 100644 --- a/coding-agent/src/coding_agent/cli/remote_commands.py +++ b/coding-agent/src/coding_agent/cli/remote_commands.py @@ -201,7 +201,7 @@ def _remote_run_once( get_remote, stream_prompt, ) - from coding_agent.workspace_archive import ( + from coding_agent.environment.archive import ( create_workspace_archive_base64, ) @@ -1528,7 +1528,7 @@ def _download_and_restore_workspace( download_workspace_archive, download_workspace_manifest, ) - from coding_agent.workspace_archive import extract_workspace_archive_base64 + from coding_agent.environment.archive import extract_workspace_archive_base64 manifest = download_workspace_manifest( base_url=base_url, diff --git a/coding-agent/src/coding_agent/cli/stats_command.py b/coding-agent/src/coding_agent/cli/stats_command.py index 151680144..3f455a925 100644 --- a/coding-agent/src/coding_agent/cli/stats_command.py +++ b/coding-agent/src/coding_agent/cli/stats_command.py @@ -10,7 +10,7 @@ @click.option("--session", "-s", help="Session ID (default: last)") def stats(session: str | None): """Show session statistics.""" - from coding_agent.metrics import collector + from coding_agent.observability.metrics import collector if not session: # Use last session diff --git a/coding-agent/src/coding_agent/context_pack.py b/coding-agent/src/coding_agent/context_pack.py deleted file mode 100644 index 5617f18ba..000000000 --- a/coding-agent/src/coding_agent/context_pack.py +++ /dev/null @@ -1,6 +0,0 @@ -"""Deprecated import location. Moved to coding_agent.topics.context_pack.""" -import sys as _sys - -from coding_agent.topics import context_pack as _moved - -_sys.modules[__name__] = _moved diff --git a/coding-agent/src/coding_agent/core/app.py b/coding-agent/src/coding_agent/core/app.py index 7a1e49e9b..07ab5cd68 100644 --- a/coding-agent/src/coding_agent/core/app.py +++ b/coding-agent/src/coding_agent/core/app.py @@ -37,7 +37,7 @@ from coding_agent.plugins.storage import StoragePlugin from coding_agent.plugins.summarizer import SummarizerPlugin from coding_agent.subagents.coordinator import ChildWorkerCoordinator -from coding_agent.topic_memory import MemoryReviewStore +from coding_agent.topics.memory import MemoryReviewStore from coding_agent.tools.web_search import create_web_search_backend ToolFilter = Any diff --git a/coding-agent/src/coding_agent/events/display.py b/coding-agent/src/coding_agent/events/display.py index 4e8be31c8..1767c607a 100644 --- a/coding-agent/src/coding_agent/events/display.py +++ b/coding-agent/src/coding_agent/events/display.py @@ -7,7 +7,7 @@ import uuid from typing import Literal, cast -from coding_agent.runtime_store import JSONObject, JSONValue, RuntimeEventRecord +from coding_agent.stores.runtime_store import JSONObject, JSONValue, RuntimeEventRecord DisplayEventKind = Literal[ "assistant_text_delta", diff --git a/coding-agent/src/coding_agent/events/replay.py b/coding-agent/src/coding_agent/events/replay.py index 0559252b6..238cc2c6b 100644 --- a/coding-agent/src/coding_agent/events/replay.py +++ b/coding-agent/src/coding_agent/events/replay.py @@ -2,7 +2,7 @@ from dataclasses import dataclass -from coding_agent.runtime_store import RuntimeEventRecord +from coding_agent.stores.runtime_store import RuntimeEventRecord from coding_agent.stores import RuntimeEventStore from .display import DisplayEvent, project_runtime_events_to_display diff --git a/coding-agent/src/coding_agent/executors/external.py b/coding-agent/src/coding_agent/executors/external.py index 237c8192d..5079656bd 100644 --- a/coding-agent/src/coding_agent/executors/external.py +++ b/coding-agent/src/coding_agent/executors/external.py @@ -18,12 +18,12 @@ from agentkit.storage.pg import AsyncPGPool, PGPool from coding_agent.action_safety.approval_routing import ActionApprovalRoute from coding_agent.action_safety.command_policy import CommandPolicyDecision -from coding_agent.bee_command_bridge import ( +from coding_agent.bee.command_bridge import ( BeeCommandIntentPlan, BeeNodeCompletionEvidence, is_authorized_bee_command_plan, ) -from coding_agent.topic_store import JSONObject, JSONValue +from coding_agent.topics.store import JSONObject, JSONValue ExecutorKind = str ExecutorRunStatus = str diff --git a/coding-agent/src/coding_agent/external_executor.py b/coding-agent/src/coding_agent/external_executor.py deleted file mode 100644 index eb9432951..000000000 --- a/coding-agent/src/coding_agent/external_executor.py +++ /dev/null @@ -1,4 +0,0 @@ -"""Deprecated import location. Moved to coding_agent.executors.external.""" -import sys as _sys -from coding_agent.executors import external as _moved -_sys.modules[__name__] = _moved diff --git a/coding-agent/src/coding_agent/local_durable_store.py b/coding-agent/src/coding_agent/local_durable_store.py deleted file mode 100644 index 447c04bc7..000000000 --- a/coding-agent/src/coding_agent/local_durable_store.py +++ /dev/null @@ -1,4 +0,0 @@ -"""Deprecated import location. Moved to coding_agent.stores.durable_local.""" -import sys as _sys -from coding_agent.stores import durable_local as _moved -_sys.modules[__name__] = _moved diff --git a/coding-agent/src/coding_agent/local_storage.py b/coding-agent/src/coding_agent/local_storage.py deleted file mode 100644 index 1bd06fbf6..000000000 --- a/coding-agent/src/coding_agent/local_storage.py +++ /dev/null @@ -1,6 +0,0 @@ -"""Deprecated import location. Moved to coding_agent.stores.local.""" -import sys as _sys - -from coding_agent.stores import local as _moved - -_sys.modules[__name__] = _moved diff --git a/coding-agent/src/coding_agent/metrics.py b/coding-agent/src/coding_agent/metrics.py deleted file mode 100644 index c07652d24..000000000 --- a/coding-agent/src/coding_agent/metrics.py +++ /dev/null @@ -1,6 +0,0 @@ -"""Deprecated import location. Moved to coding_agent.observability.metrics.""" - -import sys as _sys -from coding_agent.observability import metrics as _moved - -_sys.modules[__name__] = _moved diff --git a/coding-agent/src/coding_agent/pg_durable_store.py b/coding-agent/src/coding_agent/pg_durable_store.py deleted file mode 100644 index 70f010e98..000000000 --- a/coding-agent/src/coding_agent/pg_durable_store.py +++ /dev/null @@ -1,4 +0,0 @@ -"""Deprecated import location. Moved to coding_agent.stores.durable_pg.""" -import sys as _sys -from coding_agent.stores import durable_pg as _moved -_sys.modules[__name__] = _moved diff --git a/coding-agent/src/coding_agent/plugins/kb.py b/coding-agent/src/coding_agent/plugins/kb.py index c53521ce8..327a62699 100644 --- a/coding-agent/src/coding_agent/plugins/kb.py +++ b/coding-agent/src/coding_agent/plugins/kb.py @@ -9,7 +9,7 @@ from agentkit.observability import ObservationSink, record_span from agentkit.tape.tape import Tape -from coding_agent.context_pack import ( +from coding_agent.topics.context_pack import ( ContextPack, ContextPackItem, ContextPackRenderer, diff --git a/coding-agent/src/coding_agent/plugins/memory.py b/coding-agent/src/coding_agent/plugins/memory.py index 565401e8c..a55d4a5e8 100644 --- a/coding-agent/src/coding_agent/plugins/memory.py +++ b/coding-agent/src/coding_agent/plugins/memory.py @@ -23,7 +23,7 @@ from agentkit.directive.types import MemoryRecord from agentkit.tape.models import Entry from agentkit.tape.tape import Tape -from coding_agent.context_pack import ( +from coding_agent.topics.context_pack import ( ContextPack, ContextPackItem, ContextPackRenderer, diff --git a/coding-agent/src/coding_agent/plugins/metrics.py b/coding-agent/src/coding_agent/plugins/metrics.py index cb4d825c2..8150670e0 100644 --- a/coding-agent/src/coding_agent/plugins/metrics.py +++ b/coding-agent/src/coding_agent/plugins/metrics.py @@ -6,7 +6,7 @@ from collections import defaultdict from typing import Any, Callable -from coding_agent.agent_identity import effective_agent_id, legacy_agent_id_str +from coding_agent.core.agent_identity import effective_agent_id, legacy_agent_id_str class SessionMetricsPlugin: diff --git a/coding-agent/src/coding_agent/plugins/storage.py b/coding-agent/src/coding_agent/plugins/storage.py index 3210c6c64..a4cc4d568 100644 --- a/coding-agent/src/coding_agent/plugins/storage.py +++ b/coding-agent/src/coding_agent/plugins/storage.py @@ -19,7 +19,7 @@ from agentkit.storage.session import FileSessionStore from agentkit.storage.sqlite import SQLiteTapeStore from agentkit.tape.store import ForkTapeStore -from coding_agent.local_storage import local_sqlite_path_from_storage_config +from coding_agent.stores.local import local_sqlite_path_from_storage_config def _load_pg_types() -> tuple[Any, Any, Any, Any]: diff --git a/coding-agent/src/coding_agent/recall_context.py b/coding-agent/src/coding_agent/recall_context.py deleted file mode 100644 index 40ec44502..000000000 --- a/coding-agent/src/coding_agent/recall_context.py +++ /dev/null @@ -1,6 +0,0 @@ -"""Deprecated import location. Moved to coding_agent.topics.recall_context.""" -import sys as _sys - -from coding_agent.topics import recall_context as _moved - -_sys.modules[__name__] = _moved diff --git a/coding-agent/src/coding_agent/recall_evaluation.py b/coding-agent/src/coding_agent/recall_evaluation.py deleted file mode 100644 index 00f21c7ee..000000000 --- a/coding-agent/src/coding_agent/recall_evaluation.py +++ /dev/null @@ -1,6 +0,0 @@ -"""Deprecated import location. Moved to coding_agent.topics.recall_evaluation.""" -import sys as _sys - -from coding_agent.topics import recall_evaluation as _moved - -_sys.modules[__name__] = _moved diff --git a/coding-agent/src/coding_agent/remote/worker.py b/coding-agent/src/coding_agent/remote/worker.py index fc1fbd6bf..83edba4a1 100644 --- a/coding-agent/src/coding_agent/remote/worker.py +++ b/coding-agent/src/coding_agent/remote/worker.py @@ -15,8 +15,8 @@ from agentkit.observability import ObservationSink, record_span from coding_agent.adapter import PipelineAdapter -from coding_agent.app import create_agent -from coding_agent.adapter_types import TurnOutcome +from coding_agent.core.app import create_agent +from coding_agent.adapter.types import TurnOutcome from coding_agent.ui.headless import HeadlessConsumer from coding_agent.wire.protocol import ( ApprovalRequest, diff --git a/coding-agent/src/coding_agent/runs/attached_executor.py b/coding-agent/src/coding_agent/runs/attached_executor.py index 40c9ab69c..503ec3b75 100644 --- a/coding-agent/src/coding_agent/runs/attached_executor.py +++ b/coding-agent/src/coding_agent/runs/attached_executor.py @@ -8,7 +8,7 @@ from datetime import UTC, datetime, timedelta from typing import Any, AsyncContextManager, Protocol, cast -from coding_agent.runtime_store import AgentRunRecord, JSONObject, RuntimeEventRecord +from coding_agent.stores.runtime_store import AgentRunRecord, JSONObject, RuntimeEventRecord from coding_agent.stores import RuntimeRunStore from .lifecycle import RuntimeRunResumeContext diff --git a/coding-agent/src/coding_agent/runs/cancel.py b/coding-agent/src/coding_agent/runs/cancel.py index e32af072c..8887af620 100644 --- a/coding-agent/src/coding_agent/runs/cancel.py +++ b/coding-agent/src/coding_agent/runs/cancel.py @@ -8,7 +8,7 @@ from datetime import UTC, datetime from typing import Any, Literal, Protocol, cast -from coding_agent.runtime_store import AgentRunRecord, JSONObject +from coding_agent.stores.runtime_store import AgentRunRecord, JSONObject from coding_agent.stores import RuntimeRunLifecycleStore diff --git a/coding-agent/src/coding_agent/runs/lifecycle.py b/coding-agent/src/coding_agent/runs/lifecycle.py index 7eb163d89..adcf1e751 100644 --- a/coding-agent/src/coding_agent/runs/lifecycle.py +++ b/coding-agent/src/coding_agent/runs/lifecycle.py @@ -8,8 +8,8 @@ from types import TracebackType from typing import Any, Protocol, cast -from coding_agent.adapter_types import StopReason, TurnOutcome -from coding_agent.runtime_store import AgentRunRecord, JSONObject +from coding_agent.adapter.types import StopReason, TurnOutcome +from coding_agent.stores.runtime_store import AgentRunRecord, JSONObject from coding_agent.stores import RuntimeRunLifecycleStore RuntimeRunStore = RuntimeRunLifecycleStore diff --git a/coding-agent/src/coding_agent/runs/metadata.py b/coding-agent/src/coding_agent/runs/metadata.py index 84c01954b..1d3511321 100644 --- a/coding-agent/src/coding_agent/runs/metadata.py +++ b/coding-agent/src/coding_agent/runs/metadata.py @@ -3,7 +3,7 @@ from dataclasses import dataclass from typing import Protocol, cast -from coding_agent.runtime_store import JSONObject, JSONValue +from coding_agent.stores.runtime_store import JSONObject, JSONValue from .lifecycle import RuntimeRunResumeContext from .target import ( diff --git a/coding-agent/src/coding_agent/runs/observation.py b/coding-agent/src/coding_agent/runs/observation.py index 60bb4527f..5648ca17e 100644 --- a/coding-agent/src/coding_agent/runs/observation.py +++ b/coding-agent/src/coding_agent/runs/observation.py @@ -6,12 +6,12 @@ from agentkit.observability import ObservationSink from agentkit.tape.extract import TurnTrace, extract_turns -from coding_agent.agent_observability import ( +from coding_agent.observability.agent import ( AgentObservationRecorder, AgentObservationStatus, AgentObservationStore, ) -from coding_agent.runtime_store import JSONObject +from coding_agent.stores.runtime_store import JSONObject from coding_agent.runs.lifecycle import RuntimeRunResumeContext from coding_agent.runs.target import ( RunTarget, diff --git a/coding-agent/src/coding_agent/runs/persistence.py b/coding-agent/src/coding_agent/runs/persistence.py index 6705818c9..bbfe23a0f 100644 --- a/coding-agent/src/coding_agent/runs/persistence.py +++ b/coding-agent/src/coding_agent/runs/persistence.py @@ -7,7 +7,7 @@ from math import isfinite from typing import Any, Protocol, cast -from coding_agent.runtime_store import JSONObject, JSONValue, RunMessageSnapshotRecord +from coding_agent.stores.runtime_store import JSONObject, JSONValue, RunMessageSnapshotRecord from coding_agent.stores import RuntimeCheckpointStore, RuntimeRunLifecycleStore from .lifecycle import ( diff --git a/coding-agent/src/coding_agent/runs/query.py b/coding-agent/src/coding_agent/runs/query.py index 21dd2313e..3f45e279b 100644 --- a/coding-agent/src/coding_agent/runs/query.py +++ b/coding-agent/src/coding_agent/runs/query.py @@ -7,7 +7,7 @@ from agentkit.checkpoint.models import CheckpointMeta from coding_agent.events import DisplayEvent, RuntimeEventReplayService -from coding_agent.runtime_store import ( +from coding_agent.stores.runtime_store import ( AgentInteractionRecord, AgentRunRecord, RunMessageSnapshotRecord, diff --git a/coding-agent/src/coding_agent/runs/recovery.py b/coding-agent/src/coding_agent/runs/recovery.py index ce19014a2..f004f4b14 100644 --- a/coding-agent/src/coding_agent/runs/recovery.py +++ b/coding-agent/src/coding_agent/runs/recovery.py @@ -5,7 +5,7 @@ from datetime import UTC, datetime from typing import cast -from coding_agent.runtime_store import AgentRunRecord, JSONObject +from coding_agent.stores.runtime_store import AgentRunRecord, JSONObject from coding_agent.stores import RuntimeRunRecoveryStore STALE_RUNTIME_RUN_ERROR = "runtime run was still running during startup recovery" diff --git a/coding-agent/src/coding_agent/runs/resume.py b/coding-agent/src/coding_agent/runs/resume.py index f12d5512d..c2591bc4a 100644 --- a/coding-agent/src/coding_agent/runs/resume.py +++ b/coding-agent/src/coding_agent/runs/resume.py @@ -9,7 +9,7 @@ from agentkit.checkpoint.models import CheckpointMeta from agentkit.tape.models import Anchor -from coding_agent.runtime_store import ( +from coding_agent.stores.runtime_store import ( AgentRunRecord, JSONObject, RunMessageSnapshotRecord, diff --git a/coding-agent/src/coding_agent/runs/runtime_events.py b/coding-agent/src/coding_agent/runs/runtime_events.py index b9f183cc3..6fde9d85c 100644 --- a/coding-agent/src/coding_agent/runs/runtime_events.py +++ b/coding-agent/src/coding_agent/runs/runtime_events.py @@ -8,7 +8,7 @@ from math import isfinite from typing import Protocol, cast -from coding_agent.runtime_store import ( +from coding_agent.stores.runtime_store import ( AgentRunRecord, JSONObject, JSONValue, diff --git a/coding-agent/src/coding_agent/runs/scheduled.py b/coding-agent/src/coding_agent/runs/scheduled.py index 11e73e19c..f5fccb63f 100644 --- a/coding-agent/src/coding_agent/runs/scheduled.py +++ b/coding-agent/src/coding_agent/runs/scheduled.py @@ -9,9 +9,9 @@ from agentkit.storage.pg import AsyncPGPool, PGPool from agentkit.tape.tape import Tape -from coding_agent.topic_lifecycle import TopicLifecycle -from coding_agent.topic_store import JSONObject -from coding_agent.topic_store import TopicRecord +from coding_agent.topics.lifecycle import TopicLifecycle +from coding_agent.topics.store import JSONObject +from coding_agent.topics.store import TopicRecord ScheduleStatus = str SignalStatus = str diff --git a/coding-agent/src/coding_agent/runtime_store.py b/coding-agent/src/coding_agent/runtime_store.py deleted file mode 100644 index 0a4c5948d..000000000 --- a/coding-agent/src/coding_agent/runtime_store.py +++ /dev/null @@ -1,6 +0,0 @@ -"""Deprecated import location. Moved to coding_agent.stores.runtime_store.""" -import sys as _sys - -from coding_agent.stores import runtime_store as _moved - -_sys.modules[__name__] = _moved diff --git a/coding-agent/src/coding_agent/scheduled_runs.py b/coding-agent/src/coding_agent/scheduled_runs.py deleted file mode 100644 index 22beee6ed..000000000 --- a/coding-agent/src/coding_agent/scheduled_runs.py +++ /dev/null @@ -1,4 +0,0 @@ -"""Deprecated import location. Moved to coding_agent.runs.scheduled.""" -import sys as _sys -from coding_agent.runs import scheduled as _moved -_sys.modules[__name__] = _moved diff --git a/coding-agent/src/coding_agent/server/http_server.py b/coding-agent/src/coding_agent/server/http_server.py index 1fe903205..77e3f20c2 100644 --- a/coding-agent/src/coding_agent/server/http_server.py +++ b/coding-agent/src/coding_agent/server/http_server.py @@ -36,14 +36,14 @@ from agentkit.tape.extract import ToolCallRecord, TurnTrace, extract_turns from agentkit.tape.tape import Tape from coding_agent.approval import ApprovalPolicy -from coding_agent.bee_launch import BeeLaunchRecord, PGBeeLaunchStore -from coding_agent.bee_template_pack import ( +from coding_agent.bee.launch import BeeLaunchRecord, PGBeeLaunchStore +from coding_agent.bee.template_pack import ( BeePackRegistry, BeeTemplatePackSource, build_bee_pack_dry_run_plan, validate_bee_pack_compatibility, ) -from coding_agent.bee_workspace import ( +from coding_agent.bee.workspace import ( BeeWorkspaceCommandIntent, BeeWorkspaceRunArtifactRecord, BeeWorkspaceTemplate, @@ -75,7 +75,7 @@ workspace_patch_from_config, workspace_provider_capabilities_from_config, ) -from coding_agent.external_executor import ExecutorRunRecord, PGExecutorRunStore +from coding_agent.executors.external import ExecutorRunRecord, PGExecutorRunStore from coding_agent.observability import ( prometheus_metrics_text, record_bee_pack_dry_run_metric, @@ -83,24 +83,24 @@ record_bee_pack_validation_metric, record_http_request_metric, ) -from coding_agent.runtime_store import ( +from coding_agent.stores.runtime_store import ( AgentInteractionRecord, AgentRunRecord, JSONObject, RunMessageSnapshotRecord, RuntimeEventRecord, ) -from coding_agent.local_storage import local_sqlite_path_from_storage_config -from coding_agent.local_storage import local_sqlite_storage_config -from coding_agent.local_storage import storage_has_any_sqlite_backend +from coding_agent.stores.local import local_sqlite_path_from_storage_config +from coding_agent.stores.local import local_sqlite_storage_config +from coding_agent.stores.local import storage_has_any_sqlite_backend from coding_agent.events import DisplayEvent, DisplayEventStreamProjector -from coding_agent.scheduled_runs import ( +from coding_agent.runs.scheduled import ( PGScheduledRunStore, ProactiveSignalRecord, ScheduleRecord, ScheduleTriggerRecord, ) -from coding_agent.topic_store import ( +from coding_agent.topics.store import ( PGTopicStore, TopicAnchorRecord, TopicCostRecord, diff --git a/coding-agent/src/coding_agent/server/session_manager.py b/coding-agent/src/coding_agent/server/session_manager.py index 109022b17..b84cfea1f 100644 --- a/coding-agent/src/coding_agent/server/session_manager.py +++ b/coding-agent/src/coding_agent/server/session_manager.py @@ -36,7 +36,7 @@ from agentkit.tape.models import Anchor from agentkit.tape.tape import Tape from coding_agent.adapter import PipelineAdapter -from coding_agent.agent_observability import ( +from coding_agent.observability.agent import ( AgentObservationStore, JsonlAgentObservationStore, ) @@ -49,7 +49,7 @@ ) from coding_agent.approval.store import ApprovalStore from coding_agent.core import config as core_config -from coding_agent.local_storage import ( +from coding_agent.stores.local import ( DURABLE_STORAGE_BACKEND_KEYS, DURABLE_STORAGE_PATH_KEYS, durable_storage_backend_values, @@ -58,13 +58,13 @@ normalize_storage_path, with_local_sqlite_bundle_paths, ) -from coding_agent.local_durable_store import ( +from coding_agent.stores.durable_local import ( FencedSQLiteCheckpointStore, FencedSQLiteRuntimeStore, FencedSQLiteTapeStore, SQLiteLocalDurableStore, ) -from coding_agent.pg_durable_store import ( +from coding_agent.stores.durable_pg import ( FencedPGCheckpointStore, FencedPGRuntimeStore, FencedPGTapeStore, @@ -72,7 +72,7 @@ ) from coding_agent.plugins.storage import JSONLTapeStore from coding_agent.providers.base import ToolSchema -from coding_agent.runtime_store import ( +from coding_agent.stores.runtime_store import ( AgentInteractionRecord, AgentRunRecord, JSONLRuntimeStore, diff --git a/coding-agent/src/coding_agent/storage_migration.py b/coding-agent/src/coding_agent/storage_migration.py deleted file mode 100644 index 4dbfb8571..000000000 --- a/coding-agent/src/coding_agent/storage_migration.py +++ /dev/null @@ -1,4 +0,0 @@ -"""Deprecated import location. Moved to coding_agent.stores.migration.""" -import sys as _sys -from coding_agent.stores import migration as _moved -_sys.modules[__name__] = _moved diff --git a/coding-agent/src/coding_agent/stores/durable_local.py b/coding-agent/src/coding_agent/stores/durable_local.py index e80b378f6..500a88bd3 100644 --- a/coding-agent/src/coding_agent/stores/durable_local.py +++ b/coding-agent/src/coding_agent/stores/durable_local.py @@ -21,7 +21,7 @@ _optional_entry_str, ) -from coding_agent.runtime_store import ( +from coding_agent.stores.runtime_store import ( AgentRunRecord, AgentInteractionRecord, RuntimeEventRecord, diff --git a/coding-agent/src/coding_agent/stores/durable_pg.py b/coding-agent/src/coding_agent/stores/durable_pg.py index 07f7b83ef..1caa0365d 100644 --- a/coding-agent/src/coding_agent/stores/durable_pg.py +++ b/coding-agent/src/coding_agent/stores/durable_pg.py @@ -14,7 +14,7 @@ ) from agentkit.storage.protocols import TapeInfo, TapeSearchResult -from coding_agent.runtime_store import ( +from coding_agent.stores.runtime_store import ( AgentInteractionRecord, AgentRunRecord, JSONObject, diff --git a/coding-agent/src/coding_agent/stores/migration.py b/coding-agent/src/coding_agent/stores/migration.py index 63ff3c5ac..81f2ba0d5 100644 --- a/coding-agent/src/coding_agent/stores/migration.py +++ b/coding-agent/src/coding_agent/stores/migration.py @@ -7,7 +7,7 @@ from agentkit.storage.checkpoint_fs import FSCheckpointStore from agentkit.storage.sqlite import SQLiteCheckpointStore, SQLiteTapeStore -from coding_agent.local_storage import local_sqlite_path +from coding_agent.stores.local import local_sqlite_path @dataclass(frozen=True) diff --git a/coding-agent/src/coding_agent/tools/subagent.py b/coding-agent/src/coding_agent/tools/subagent.py index 0ec9b6308..b1bcf3015 100644 --- a/coding-agent/src/coding_agent/tools/subagent.py +++ b/coding-agent/src/coding_agent/tools/subagent.py @@ -15,8 +15,8 @@ from agentkit.tools import tool from coding_agent.adapter import PipelineAdapter -from coding_agent.adapter_types import StopReason, TurnOutcome -from coding_agent.agent_identity import effective_agent_id, legacy_agent_id_str +from coding_agent.adapter.types import StopReason, TurnOutcome +from coding_agent.core.agent_identity import effective_agent_id, legacy_agent_id_str from coding_agent.wire.protocol import ToolCallDelta, WireMessage diff --git a/coding-agent/src/coding_agent/topic_lifecycle.py b/coding-agent/src/coding_agent/topic_lifecycle.py deleted file mode 100644 index 8c3e4a6fb..000000000 --- a/coding-agent/src/coding_agent/topic_lifecycle.py +++ /dev/null @@ -1,6 +0,0 @@ -"""Deprecated import location. Moved to coding_agent.topics.lifecycle.""" -import sys as _sys - -from coding_agent.topics import lifecycle as _moved - -_sys.modules[__name__] = _moved diff --git a/coding-agent/src/coding_agent/topic_memory.py b/coding-agent/src/coding_agent/topic_memory.py deleted file mode 100644 index 7db3a0666..000000000 --- a/coding-agent/src/coding_agent/topic_memory.py +++ /dev/null @@ -1,6 +0,0 @@ -"""Deprecated import location. Moved to coding_agent.topics.memory.""" -import sys as _sys - -from coding_agent.topics import memory as _moved - -_sys.modules[__name__] = _moved diff --git a/coding-agent/src/coding_agent/topic_provenance.py b/coding-agent/src/coding_agent/topic_provenance.py deleted file mode 100644 index 6cd90c554..000000000 --- a/coding-agent/src/coding_agent/topic_provenance.py +++ /dev/null @@ -1,6 +0,0 @@ -"""Deprecated import location. Moved to coding_agent.topics.provenance.""" -import sys as _sys - -from coding_agent.topics import provenance as _moved - -_sys.modules[__name__] = _moved diff --git a/coding-agent/src/coding_agent/topic_range_index.py b/coding-agent/src/coding_agent/topic_range_index.py deleted file mode 100644 index a70195693..000000000 --- a/coding-agent/src/coding_agent/topic_range_index.py +++ /dev/null @@ -1,6 +0,0 @@ -"""Deprecated import location. Moved to coding_agent.topics.range_index.""" -import sys as _sys - -from coding_agent.topics import range_index as _moved - -_sys.modules[__name__] = _moved diff --git a/coding-agent/src/coding_agent/topic_recall.py b/coding-agent/src/coding_agent/topic_recall.py deleted file mode 100644 index af6074458..000000000 --- a/coding-agent/src/coding_agent/topic_recall.py +++ /dev/null @@ -1,6 +0,0 @@ -"""Deprecated import location. Moved to coding_agent.topics.recall.""" -import sys as _sys - -from coding_agent.topics import recall as _moved - -_sys.modules[__name__] = _moved diff --git a/coding-agent/src/coding_agent/topic_store.py b/coding-agent/src/coding_agent/topic_store.py deleted file mode 100644 index a13e8de80..000000000 --- a/coding-agent/src/coding_agent/topic_store.py +++ /dev/null @@ -1,6 +0,0 @@ -"""Deprecated import location. Moved to coding_agent.topics.store.""" -import sys as _sys - -from coding_agent.topics import store as _moved - -_sys.modules[__name__] = _moved diff --git a/coding-agent/src/coding_agent/topics/memory.py b/coding-agent/src/coding_agent/topics/memory.py index d64c56554..48d4cd240 100644 --- a/coding-agent/src/coding_agent/topics/memory.py +++ b/coding-agent/src/coding_agent/topics/memory.py @@ -9,7 +9,7 @@ from tempfile import NamedTemporaryFile from typing import Any -from coding_agent.bee_workspace import BeeWorkspaceRunArtifacts +from coding_agent.bee.workspace import BeeWorkspaceRunArtifacts from coding_agent.topics.context_pack import ( ContextPack, ContextPackItem, diff --git a/coding-agent/src/coding_agent/workspace_archive.py b/coding-agent/src/coding_agent/workspace_archive.py deleted file mode 100644 index 0c098ca18..000000000 --- a/coding-agent/src/coding_agent/workspace_archive.py +++ /dev/null @@ -1,6 +0,0 @@ -"""Deprecated import location. Moved to coding_agent.environment.archive.""" -import sys as _sys - -from coding_agent.environment import archive as _moved - -_sys.modules[__name__] = _moved diff --git a/coding-agent/tests/cli/test_entrypoint_contract.py b/coding-agent/tests/cli/test_entrypoint_contract.py index fd7549949..00ee429bd 100644 --- a/coding-agent/tests/cli/test_entrypoint_contract.py +++ b/coding-agent/tests/cli/test_entrypoint_contract.py @@ -815,7 +815,7 @@ def test_storage_migrate_sqlite_command_reports_counts( monkeypatch: pytest.MonkeyPatch, ) -> None: from coding_agent.cli import main as cli_main - from coding_agent.storage_migration import ( + from coding_agent.stores.migration import ( LegacySQLiteMigrationReport, StoreMigrationReport, ) diff --git a/coding-agent/tests/cli/test_local_runtime.py b/coding-agent/tests/cli/test_local_runtime.py index 1ce3f2ec8..d7151a9ce 100644 --- a/coding-agent/tests/cli/test_local_runtime.py +++ b/coding-agent/tests/cli/test_local_runtime.py @@ -4,7 +4,7 @@ from types import SimpleNamespace from coding_agent.cli.local_runtime import ServerBackedLocalCliSessionManager -from coding_agent.local_storage import local_sqlite_storage_config +from coding_agent.stores.local import local_sqlite_storage_config class FakeManagedSession: diff --git a/coding-agent/tests/cli/test_remote_client.py b/coding-agent/tests/cli/test_remote_client.py index 85fce0edf..63fe069f2 100644 --- a/coding-agent/tests/cli/test_remote_client.py +++ b/coding-agent/tests/cli/test_remote_client.py @@ -1514,7 +1514,7 @@ async def test_attached_executor_records_agent_phase_span( tmp_path: Path, monkeypatch: pytest.MonkeyPatch, ) -> None: - from coding_agent.adapter_types import StopReason, TurnOutcome + from coding_agent.adapter.types import StopReason, TurnOutcome from coding_agent.remote import worker as remote_worker sink = RecordingObservationSink() @@ -2952,7 +2952,7 @@ def get(self, path: str) -> _RemoteFakeResponse: monkeypatch.setattr("coding_agent.remote.client.httpx.Client", FakeClient) monkeypatch.setattr( - "coding_agent.workspace_archive.extract_workspace_archive_base64", + "coding_agent.environment.archive.extract_workspace_archive_base64", lambda repo_path_arg, archive_base64: applied.append( (repo_path_arg, archive_base64) ), @@ -3861,7 +3861,7 @@ def fake_stream_prompt( monkeypatch.setattr("coding_agent.remote.client.httpx.Client", FakeClient) monkeypatch.setattr("coding_agent.remote.client.stream_prompt", fake_stream_prompt) monkeypatch.setattr( - "coding_agent.workspace_archive.create_workspace_archive_base64", + "coding_agent.environment.archive.create_workspace_archive_base64", lambda path: "archive-encoded", ) @@ -3887,7 +3887,7 @@ def fake_download_workspace_manifest( fake_download_workspace_manifest, ) monkeypatch.setattr( - "coding_agent.workspace_archive.extract_workspace_archive_base64", + "coding_agent.environment.archive.extract_workspace_archive_base64", lambda repo_path_arg, archive_base64: applied.append( (repo_path_arg, archive_base64) ), @@ -4019,11 +4019,11 @@ def fake_stream_prompt( monkeypatch.setattr("coding_agent.remote.client.httpx.Client", FakeClient) monkeypatch.setattr("coding_agent.remote.client.stream_prompt", fake_stream_prompt) monkeypatch.setattr( - "coding_agent.workspace_archive.create_workspace_archive_base64", + "coding_agent.environment.archive.create_workspace_archive_base64", lambda path: "archive-encoded", ) monkeypatch.setattr( - "coding_agent.workspace_archive.extract_workspace_archive_base64", + "coding_agent.environment.archive.extract_workspace_archive_base64", lambda repo_path_arg, archive_base64: applied.append( (repo_path_arg, archive_base64) ), @@ -4138,7 +4138,7 @@ def fail_archive(path: Path) -> str: monkeypatch.setattr("coding_agent.remote.client.httpx.Client", FakeClient) monkeypatch.setattr("coding_agent.remote.client.stream_prompt", fake_stream_prompt) monkeypatch.setattr( - "coding_agent.workspace_archive.create_workspace_archive_base64", + "coding_agent.environment.archive.create_workspace_archive_base64", fail_archive, ) @@ -4332,7 +4332,7 @@ def fake_stream_prompt( monkeypatch.setattr("coding_agent.remote.client.httpx.Client", FakeClient) monkeypatch.setattr("coding_agent.remote.client.stream_prompt", fake_stream_prompt) monkeypatch.setattr( - "coding_agent.workspace_archive.create_workspace_archive_base64", + "coding_agent.environment.archive.create_workspace_archive_base64", lambda path: "archive-encoded", ) @@ -4443,7 +4443,7 @@ def fake_download_workspace_manifest( monkeypatch.setattr("coding_agent.remote.client.httpx.Client", FakeClient) monkeypatch.setattr("coding_agent.remote.client.stream_prompt", fake_stream_prompt) monkeypatch.setattr( - "coding_agent.workspace_archive.create_workspace_archive_base64", + "coding_agent.environment.archive.create_workspace_archive_base64", lambda path: "archive-encoded", ) monkeypatch.setattr( @@ -4455,7 +4455,7 @@ def fake_download_workspace_manifest( fake_download_workspace_manifest, ) monkeypatch.setattr( - "coding_agent.workspace_archive.extract_workspace_archive_base64", + "coding_agent.environment.archive.extract_workspace_archive_base64", lambda repo_path_arg, archive_base64: applied.append( (repo_path_arg, archive_base64) ), @@ -4569,7 +4569,7 @@ def failing_stream_prompt( "coding_agent.remote.client.stream_prompt", failing_stream_prompt ) monkeypatch.setattr( - "coding_agent.workspace_archive.create_workspace_archive_base64", + "coding_agent.environment.archive.create_workspace_archive_base64", lambda path: "archive-encoded", ) monkeypatch.setattr( @@ -4588,7 +4588,7 @@ def fake_download_workspace_manifest( fake_download_workspace_manifest, ) monkeypatch.setattr( - "coding_agent.workspace_archive.extract_workspace_archive_base64", + "coding_agent.environment.archive.extract_workspace_archive_base64", lambda repo_path_arg, archive_base64: applied.append( (repo_path_arg, archive_base64) ), @@ -4713,7 +4713,7 @@ def failing_extract(repo_path_arg: Path, archive_base64: str) -> None: monkeypatch.setattr("coding_agent.remote.client.httpx.Client", FakeClient) monkeypatch.setattr("coding_agent.remote.client.stream_prompt", fake_stream_prompt) monkeypatch.setattr( - "coding_agent.workspace_archive.create_workspace_archive_base64", + "coding_agent.environment.archive.create_workspace_archive_base64", lambda path: "archive-encoded", ) monkeypatch.setattr( @@ -4732,7 +4732,7 @@ def fake_download_workspace_manifest( fake_download_workspace_manifest, ) monkeypatch.setattr( - "coding_agent.workspace_archive.extract_workspace_archive_base64", + "coding_agent.environment.archive.extract_workspace_archive_base64", failing_extract, ) @@ -4864,7 +4864,7 @@ def fake_download_workspace_manifest( "coding_agent.remote.client.stream_prompt", failing_stream_prompt ) monkeypatch.setattr( - "coding_agent.workspace_archive.create_workspace_archive_base64", + "coding_agent.environment.archive.create_workspace_archive_base64", lambda path: "archive-encoded", ) monkeypatch.setattr( @@ -4876,7 +4876,7 @@ def fake_download_workspace_manifest( fake_download_workspace_manifest, ) monkeypatch.setattr( - "coding_agent.workspace_archive.extract_workspace_archive_base64", + "coding_agent.environment.archive.extract_workspace_archive_base64", lambda repo_path_arg, archive_base64: (_ for _ in ()).throw( OSError("extract failed") ), diff --git a/coding-agent/tests/coding_agent/environment/test_docker_workspace_provider.py b/coding-agent/tests/coding_agent/environment/test_docker_workspace_provider.py index ca64dc993..95f52e287 100644 --- a/coding-agent/tests/coding_agent/environment/test_docker_workspace_provider.py +++ b/coding-agent/tests/coding_agent/environment/test_docker_workspace_provider.py @@ -22,7 +22,7 @@ provision_cloud_binding_from_config, ) from coding_agent.runs import CloudWorkspaceRef -from coding_agent.workspace_archive import create_workspace_archive_base64 +from coding_agent.environment.archive import create_workspace_archive_base64 TIMEOUT_SENTINEL_PREFIX = "__CODING_AGENT_DOCKER_TIMEOUT__:" diff --git a/coding-agent/tests/coding_agent/environment/test_docker_workspace_provider_transfer.py b/coding-agent/tests/coding_agent/environment/test_docker_workspace_provider_transfer.py index 3e56513a2..491543a7b 100644 --- a/coding-agent/tests/coding_agent/environment/test_docker_workspace_provider_transfer.py +++ b/coding-agent/tests/coding_agent/environment/test_docker_workspace_provider_transfer.py @@ -8,7 +8,7 @@ import_workspace_archive_from_config, provision_cloud_binding_from_config, ) -from coding_agent.workspace_archive import ( +from coding_agent.environment.archive import ( create_workspace_archive_base64, extract_workspace_archive_base64, ) diff --git a/coding-agent/tests/coding_agent/environment/test_workspace_archive.py b/coding-agent/tests/coding_agent/environment/test_workspace_archive.py index 022a21722..0aed62096 100644 --- a/coding-agent/tests/coding_agent/environment/test_workspace_archive.py +++ b/coding-agent/tests/coding_agent/environment/test_workspace_archive.py @@ -10,7 +10,7 @@ import pytest -from coding_agent.workspace_archive import ( +from coding_agent.environment.archive import ( create_workspace_archive_base64, extract_workspace_archive_base64, ) diff --git a/coding-agent/tests/coding_agent/test_adapter_types.py b/coding-agent/tests/coding_agent/test_adapter_types.py index ce5e3e6f7..0865f100f 100644 --- a/coding-agent/tests/coding_agent/test_adapter_types.py +++ b/coding-agent/tests/coding_agent/test_adapter_types.py @@ -1,7 +1,7 @@ """Tests for adapter_types module.""" import pytest -from coding_agent.adapter_types import TurnOutcome, StopReason +from coding_agent.adapter.types import TurnOutcome, StopReason class TestStopReasonEnum: diff --git a/coding-agent/tests/coding_agent/test_agent_observability.py b/coding-agent/tests/coding_agent/test_agent_observability.py index 4faed934c..4f18674cd 100644 --- a/coding-agent/tests/coding_agent/test_agent_observability.py +++ b/coding-agent/tests/coding_agent/test_agent_observability.py @@ -6,7 +6,7 @@ from agentkit.observability import SpanRecord from agentkit.tape.extract import ToolCallRecord, TurnTrace -from coding_agent.agent_observability import ( +from coding_agent.observability.agent import ( AgentObservationRecorder, JsonlAgentObservationStore, sanitized_turn_projection, @@ -356,7 +356,7 @@ def fake_time() -> float: clock["now"] += 5.0 return value - monkeypatch.setattr("coding_agent.agent_observability.time.time", fake_time) + monkeypatch.setattr("coding_agent.observability.agent.time.time", fake_time) store = JsonlAgentObservationStore(tmp_path) sink = RecordingSink() diff --git a/coding-agent/tests/coding_agent/test_approval_interactions.py b/coding-agent/tests/coding_agent/test_approval_interactions.py index 8ad110711..a5d7da98e 100644 --- a/coding-agent/tests/coding_agent/test_approval_interactions.py +++ b/coding-agent/tests/coding_agent/test_approval_interactions.py @@ -6,7 +6,7 @@ import pytest from coding_agent.approval import ApprovalInteractionService -from coding_agent.runtime_store import AgentInteractionRecord, JSONObject +from coding_agent.stores.runtime_store import AgentInteractionRecord, JSONObject from coding_agent.wire.protocol import ApprovalRequest, ApprovalResponse, ToolCallDelta diff --git a/coding-agent/tests/coding_agent/test_bee_command_bridge.py b/coding-agent/tests/coding_agent/test_bee_command_bridge.py index cb266d8f2..4ad59a5bf 100644 --- a/coding-agent/tests/coding_agent/test_bee_command_bridge.py +++ b/coding-agent/tests/coding_agent/test_bee_command_bridge.py @@ -7,14 +7,14 @@ from agentkit.observability import SpanRecord from coding_agent.action_safety import ValidationStatus -from coding_agent.bee_command_bridge import ( +from coding_agent.bee.command_bridge import ( BeeNodeCompletionEvidence, complete_bee_node_from_bridge_result, plan_bee_command_intent, resolve_bee_command_intent, run_bee_validation_node, ) -from coding_agent.bee_workspace import ( +from coding_agent.bee.workspace import ( build_bee_manifest_from_workspace_template, load_bee_workspace_template, ) diff --git a/coding-agent/tests/coding_agent/test_bee_launch.py b/coding-agent/tests/coding_agent/test_bee_launch.py index 85f520e5c..98d9ce577 100644 --- a/coding-agent/tests/coding_agent/test_bee_launch.py +++ b/coding-agent/tests/coding_agent/test_bee_launch.py @@ -8,7 +8,7 @@ import pytest from agentkit.tape.tape import Tape -from coding_agent.bee_launch import ( +from coding_agent.bee.launch import ( BeeInputBinding, BeeTaskLifecycleController, BeeLaunchOrchestrator, @@ -20,11 +20,11 @@ ScheduledBeeLaunchOrchestrator, build_bee_launch_plan, ) -from coding_agent.bee_runtime import BeeNodeRecord, BeeTaskLifecycle, BeeTaskRecord +from coding_agent.bee.runtime import BeeNodeRecord, BeeTaskLifecycle, BeeTaskRecord from coding_agent.observability import prometheus_metrics_text, reset_prometheus_metrics -from coding_agent.scheduled_runs import ScheduledLaunchIntent, ScheduleTriggerRecord -from coding_agent.topic_lifecycle import TopicLifecycle -from coding_agent.topic_store import JSONObject, TopicAnchorRecord, TopicRecord +from coding_agent.runs.scheduled import ScheduledLaunchIntent, ScheduleTriggerRecord +from coding_agent.topics.lifecycle import TopicLifecycle +from coding_agent.topics.store import JSONObject, TopicAnchorRecord, TopicRecord class FakeBeeLaunchPool: diff --git a/coding-agent/tests/coding_agent/test_bee_runtime.py b/coding-agent/tests/coding_agent/test_bee_runtime.py index 55629fe98..62ff9eeae 100644 --- a/coding-agent/tests/coding_agent/test_bee_runtime.py +++ b/coding-agent/tests/coding_agent/test_bee_runtime.py @@ -8,7 +8,7 @@ from agentkit.observability import SpanRecord from agentkit.tape.tape import Tape -from coding_agent.bee_runtime import ( +from coding_agent.bee.runtime import ( BEE_TASK_ABORTED, BEE_TASK_FINALIZED, BEE_TASK_STARTED, @@ -31,8 +31,8 @@ ConsoleBeePage, render_console_bee_page, ) -from coding_agent.topic_lifecycle import find_topic_anchors -from coding_agent.topic_store import JSONObject, TopicAnchorRecord, TopicRecord +from coding_agent.topics.lifecycle import find_topic_anchors +from coding_agent.topics.store import JSONObject, TopicAnchorRecord, TopicRecord class FakeBeePool: diff --git a/coding-agent/tests/coding_agent/test_bee_template_pack.py b/coding-agent/tests/coding_agent/test_bee_template_pack.py index 849176da3..2e1e9c0e1 100644 --- a/coding-agent/tests/coding_agent/test_bee_template_pack.py +++ b/coding-agent/tests/coding_agent/test_bee_template_pack.py @@ -5,7 +5,7 @@ import pytest -from coding_agent.bee_template_pack import ( +from coding_agent.bee.template_pack import ( BeePackCompatibilityFinding, BeePackCompatibilityReport, BeePackRegistry, diff --git a/coding-agent/tests/coding_agent/test_bee_template_pack_smoke.py b/coding-agent/tests/coding_agent/test_bee_template_pack_smoke.py index c79294faa..e1503ea7b 100644 --- a/coding-agent/tests/coding_agent/test_bee_template_pack_smoke.py +++ b/coding-agent/tests/coding_agent/test_bee_template_pack_smoke.py @@ -3,26 +3,26 @@ from datetime import UTC, datetime from pathlib import Path -from coding_agent.bee_template_pack import ( +from coding_agent.bee.template_pack import ( BeePackRegistry, BeeTemplatePackSource, build_bee_pack_dry_run_plan, load_bee_template_pack, validate_bee_pack_compatibility, ) -from coding_agent.bee_workspace import ( +from coding_agent.bee.workspace import ( BeeWorkspaceRunArtifacts, BeeWorkspaceRunNode, ) from coding_agent.observability import PrometheusMetricsRecorder -from coding_agent.recall_context import TopicRecallPlanner, TopicRecallPlannerInput -from coding_agent.topic_memory import ( +from coding_agent.topics.recall_context import TopicRecallPlanner, TopicRecallPlannerInput +from coding_agent.topics.memory import ( MEMORY_REFERENCE_MODE, MemoryReviewStore, propose_memory_candidates_from_bee_artifacts, ) -from coding_agent.topic_range_index import TopicRangeIndex -from coding_agent.topic_store import TopicRecord +from coding_agent.topics.range_index import TopicRangeIndex +from coding_agent.topics.store import TopicRecord from coding_agent.server.developer_console import ( ConsoleBeePackCompatibilitySummary, ConsoleBeePackDryRunSummary, diff --git a/coding-agent/tests/coding_agent/test_bee_workspace.py b/coding-agent/tests/coding_agent/test_bee_workspace.py index 2d93e5533..738d0d8c0 100644 --- a/coding-agent/tests/coding_agent/test_bee_workspace.py +++ b/coding-agent/tests/coding_agent/test_bee_workspace.py @@ -6,7 +6,7 @@ import pytest from agentkit.observability import SpanRecord -from coding_agent.bee_workspace import ( +from coding_agent.bee.workspace import ( BeeWorkspaceExecutorRunArtifact, BeeWorkspaceRunArtifacts, BeeWorkspaceRunNode, diff --git a/coding-agent/tests/coding_agent/test_bootstrap.py b/coding-agent/tests/coding_agent/test_bootstrap.py index b1ea4da34..d530237b3 100644 --- a/coding-agent/tests/coding_agent/test_bootstrap.py +++ b/coding-agent/tests/coding_agent/test_bootstrap.py @@ -18,7 +18,7 @@ CompositeObservationSink, PrometheusMetricsObservationSink, ) -from coding_agent.topic_memory import MemoryReviewStore +from coding_agent.topics.memory import MemoryReviewStore class NonLocalEnvironment: diff --git a/coding-agent/tests/coding_agent/test_cli_pipeline.py b/coding-agent/tests/coding_agent/test_cli_pipeline.py index 33dbdcbb5..90f5314b1 100644 --- a/coding-agent/tests/coding_agent/test_cli_pipeline.py +++ b/coding-agent/tests/coding_agent/test_cli_pipeline.py @@ -11,7 +11,7 @@ from click.testing import CliRunner from coding_agent.adapter import PipelineAdapter -from coding_agent.adapter_types import StopReason, TurnOutcome +from coding_agent.adapter.types import StopReason, TurnOutcome # --------------------------------------------------------------------------- diff --git a/coding-agent/tests/coding_agent/test_context_pack.py b/coding-agent/tests/coding_agent/test_context_pack.py index 606936adb..2ccabf2d7 100644 --- a/coding-agent/tests/coding_agent/test_context_pack.py +++ b/coding-agent/tests/coding_agent/test_context_pack.py @@ -1,6 +1,6 @@ import json -from coding_agent.context_pack import ( +from coding_agent.topics.context_pack import ( ContextPack, ContextPackItem, ContextPackRenderer, diff --git a/coding-agent/tests/coding_agent/test_cross_topic_memory_smoke.py b/coding-agent/tests/coding_agent/test_cross_topic_memory_smoke.py index 333759601..f4c6ea769 100644 --- a/coding-agent/tests/coding_agent/test_cross_topic_memory_smoke.py +++ b/coding-agent/tests/coding_agent/test_cross_topic_memory_smoke.py @@ -4,24 +4,24 @@ from agentkit.tape.tape import Tape -from coding_agent.bee_workspace import ( +from coding_agent.bee.workspace import ( BeeWorkspaceExecutorRunArtifact, BeeWorkspaceRunArtifacts, BeeWorkspaceRunNode, ) from coding_agent.observability import PrometheusMetricsRecorder -from coding_agent.recall_context import ( +from coding_agent.topics.recall_context import ( TopicRecallPlanner, TopicRecallPlannerInput, recall_context_pack, record_recall_plan, ) -from coding_agent.topic_memory import ( +from coding_agent.topics.memory import ( MemoryReviewStore, propose_memory_candidates_from_bee_artifacts, ) -from coding_agent.topic_range_index import TopicRangeIndex -from coding_agent.topic_store import TopicRecallLinkRecord, TopicRecord +from coding_agent.topics.range_index import TopicRangeIndex +from coding_agent.topics.store import TopicRecallLinkRecord, TopicRecord from coding_agent.server.developer_console import ( ConsoleMemoryReviewSummary, ConsoleMemorySummary, diff --git a/coding-agent/tests/coding_agent/test_display_events.py b/coding-agent/tests/coding_agent/test_display_events.py index a5e911231..aabf5e313 100644 --- a/coding-agent/tests/coding_agent/test_display_events.py +++ b/coding-agent/tests/coding_agent/test_display_events.py @@ -8,7 +8,7 @@ project_runtime_event_to_display, project_wire_sse_event_to_display, ) -from coding_agent.runtime_store import RuntimeEventRecord +from coding_agent.stores.runtime_store import RuntimeEventRecord def _runtime_event( diff --git a/coding-agent/tests/coding_agent/test_external_executor.py b/coding-agent/tests/coding_agent/test_external_executor.py index 4d9f4ea87..a2cc7c2ed 100644 --- a/coding-agent/tests/coding_agent/test_external_executor.py +++ b/coding-agent/tests/coding_agent/test_external_executor.py @@ -7,15 +7,15 @@ import pytest -from coding_agent.bee_command_bridge import ( +from coding_agent.bee.command_bridge import ( complete_bee_node_from_bridge_result, plan_bee_command_intent, ) -from coding_agent.bee_workspace import ( +from coding_agent.bee.workspace import ( build_bee_manifest_from_workspace_template, load_bee_workspace_template, ) -from coding_agent.external_executor import ( +from coding_agent.executors.external import ( ArgoWorkflowExecutorAdapter, DockerExecutorAdapter, ExecutorCapability, diff --git a/coding-agent/tests/coding_agent/test_external_executor_smoke.py b/coding-agent/tests/coding_agent/test_external_executor_smoke.py index a84495fc4..6a027ca3c 100644 --- a/coding-agent/tests/coding_agent/test_external_executor_smoke.py +++ b/coding-agent/tests/coding_agent/test_external_executor_smoke.py @@ -7,11 +7,11 @@ import pytest -from coding_agent.bee_command_bridge import ( +from coding_agent.bee.command_bridge import ( complete_bee_node_from_bridge_result, plan_bee_command_intent, ) -from coding_agent.bee_workspace import ( +from coding_agent.bee.workspace import ( BeeWorkspaceExecutorRunArtifact, BeeWorkspaceRunArtifacts, BeeWorkspaceRunNode, @@ -19,7 +19,7 @@ load_bee_workspace_template, write_bee_workspace_run_artifacts, ) -from coding_agent.external_executor import ( +from coding_agent.executors.external import ( ArgoWorkflowExecutorAdapter, DockerExecutorAdapter, ExecutorEvidence, diff --git a/coding-agent/tests/coding_agent/test_jsonl_runtime_store.py b/coding-agent/tests/coding_agent/test_jsonl_runtime_store.py index 3a7799df4..0c9fb7fed 100644 --- a/coding-agent/tests/coding_agent/test_jsonl_runtime_store.py +++ b/coding-agent/tests/coding_agent/test_jsonl_runtime_store.py @@ -4,7 +4,7 @@ import pytest -from coding_agent.runtime_store import ( +from coding_agent.stores.runtime_store import ( AgentRunRecord, JSONLRuntimeStore, RuntimeEventRecord, diff --git a/coding-agent/tests/coding_agent/test_memory_review.py b/coding-agent/tests/coding_agent/test_memory_review.py index 414c9effd..dcdf5d72f 100644 --- a/coding-agent/tests/coding_agent/test_memory_review.py +++ b/coding-agent/tests/coding_agent/test_memory_review.py @@ -5,7 +5,7 @@ import pytest -from coding_agent.topic_memory import ( +from coding_agent.topics.memory import ( MemoryReviewStore, TopicDerivedMemoryCandidate, accepted_memory_context_messages, diff --git a/coding-agent/tests/coding_agent/test_pg_durable_fencing.py b/coding-agent/tests/coding_agent/test_pg_durable_fencing.py index 8831e4520..85f414e8d 100644 --- a/coding-agent/tests/coding_agent/test_pg_durable_fencing.py +++ b/coding-agent/tests/coding_agent/test_pg_durable_fencing.py @@ -8,13 +8,13 @@ from agentkit.checkpoint.models import CheckpointMeta, CheckpointSnapshot -from coding_agent.pg_durable_store import ( +from coding_agent.stores.durable_pg import ( FencedPGCheckpointStore, FencedPGRuntimeStore, FencedPGTapeStore, PGDurableStore, ) -from coding_agent.runtime_store import ( +from coding_agent.stores.runtime_store import ( AgentInteractionRecord, AgentRunRecord, RunMessageSnapshotRecord, diff --git a/coding-agent/tests/coding_agent/test_pg_runtime_store.py b/coding-agent/tests/coding_agent/test_pg_runtime_store.py index 72365fe0b..476fba9c0 100644 --- a/coding-agent/tests/coding_agent/test_pg_runtime_store.py +++ b/coding-agent/tests/coding_agent/test_pg_runtime_store.py @@ -6,7 +6,7 @@ import pytest from agentkit.storage.pg import AsyncPGPool, PGPool -from coding_agent.runtime_store import ( +from coding_agent.stores.runtime_store import ( AgentInteractionRecord, AgentRunRecord, PGRuntimeStore, diff --git a/coding-agent/tests/coding_agent/test_pipeline_adapter.py b/coding-agent/tests/coding_agent/test_pipeline_adapter.py index ce63a0564..d2f764089 100644 --- a/coding-agent/tests/coding_agent/test_pipeline_adapter.py +++ b/coding-agent/tests/coding_agent/test_pipeline_adapter.py @@ -21,7 +21,7 @@ from agentkit.tape.models import Entry from coding_agent.adapter import PipelineAdapter -from coding_agent.adapter_types import StopReason, TurnOutcome +from coding_agent.adapter.types import StopReason, TurnOutcome from coding_agent.plugins.metrics import SessionMetricsPlugin from coding_agent.server.stores.session_owner_store import SessionOwnershipConflictError from coding_agent.wire.protocol import ( diff --git a/coding-agent/tests/coding_agent/test_recall_context.py b/coding-agent/tests/coding_agent/test_recall_context.py index 139c5aef1..6b4268152 100644 --- a/coding-agent/tests/coding_agent/test_recall_context.py +++ b/coding-agent/tests/coding_agent/test_recall_context.py @@ -5,7 +5,7 @@ import pytest from agentkit.tape.tape import Tape -from coding_agent.recall_context import ( +from coding_agent.topics.recall_context import ( TopicRecallPlanner, TopicRecallPlannerInput, build_topic_recall_query, @@ -13,12 +13,12 @@ recall_context_pack, record_recall_plan, ) -from coding_agent.topic_memory import ( +from coding_agent.topics.memory import ( MemoryReviewStore, propose_memory_candidate_from_topic, ) -from coding_agent.topic_range_index import TopicRangeIndex -from coding_agent.topic_store import TopicRecallLinkRecord, TopicRecord +from coding_agent.topics.range_index import TopicRangeIndex +from coding_agent.topics.store import TopicRecallLinkRecord, TopicRecord class FakeRecallStore: diff --git a/coding-agent/tests/coding_agent/test_recall_evaluation.py b/coding-agent/tests/coding_agent/test_recall_evaluation.py index 2efb78cfe..708f9feae 100644 --- a/coding-agent/tests/coding_agent/test_recall_evaluation.py +++ b/coding-agent/tests/coding_agent/test_recall_evaluation.py @@ -3,17 +3,17 @@ import json from datetime import UTC, datetime -from coding_agent.recall_evaluation import ( +from coding_agent.topics.recall_evaluation import ( RecallEvalCase, RecallEvalVariant, evaluate_recall_variants, ) -from coding_agent.topic_memory import ( +from coding_agent.topics.memory import ( MemoryReviewStore, propose_memory_candidate_from_topic, ) -from coding_agent.topic_range_index import TopicRangeIndex -from coding_agent.topic_store import TopicRecord +from coding_agent.topics.range_index import TopicRangeIndex +from coding_agent.topics.store import TopicRecord def test_recall_eval_report_compares_all_recall_variants() -> None: diff --git a/coding-agent/tests/coding_agent/test_release_observability_contract.py b/coding-agent/tests/coding_agent/test_release_observability_contract.py index 477cfd6b0..27a4f3ea4 100644 --- a/coding-agent/tests/coding_agent/test_release_observability_contract.py +++ b/coding-agent/tests/coding_agent/test_release_observability_contract.py @@ -16,7 +16,7 @@ ActionObservation, ActionObservationStatus, ) -from coding_agent.context_pack import ContextPack, ContextPackItem, ContextPackSection +from coding_agent.topics.context_pack import ContextPack, ContextPackItem, ContextPackSection from coding_agent.kb import DocumentChunk, KBSearchResult from coding_agent.observability import OtlpHttpObservationSink from coding_agent.plugins.kb import ( diff --git a/coding-agent/tests/coding_agent/test_run_lifecycle.py b/coding-agent/tests/coding_agent/test_run_lifecycle.py index dfd09b486..c96cc54c5 100644 --- a/coding-agent/tests/coding_agent/test_run_lifecycle.py +++ b/coding-agent/tests/coding_agent/test_run_lifecycle.py @@ -7,8 +7,8 @@ import pytest -from coding_agent.adapter_types import StopReason, TurnOutcome -from coding_agent.runtime_store import AgentRunRecord, JSONObject +from coding_agent.adapter.types import StopReason, TurnOutcome +from coding_agent.stores.runtime_store import AgentRunRecord, JSONObject from coding_agent.runs import ( RuntimeCloser, RuntimeRunLifecycle, diff --git a/coding-agent/tests/coding_agent/test_runtime_attached_executor_service.py b/coding-agent/tests/coding_agent/test_runtime_attached_executor_service.py index 699fcb511..b26c4eb2b 100644 --- a/coding-agent/tests/coding_agent/test_runtime_attached_executor_service.py +++ b/coding-agent/tests/coding_agent/test_runtime_attached_executor_service.py @@ -6,7 +6,7 @@ import pytest from coding_agent.approval import ApprovalPolicy -from coding_agent.runtime_store import AgentRunRecord, JSONObject, RuntimeEventRecord +from coding_agent.stores.runtime_store import AgentRunRecord, JSONObject, RuntimeEventRecord from coding_agent.runs import ( ExternalWorkerExecutorRef, ExternalWorkerWorkspaceRef, diff --git a/coding-agent/tests/coding_agent/test_runtime_cancel_service.py b/coding-agent/tests/coding_agent/test_runtime_cancel_service.py index e3d31533d..1682d5e03 100644 --- a/coding-agent/tests/coding_agent/test_runtime_cancel_service.py +++ b/coding-agent/tests/coding_agent/test_runtime_cancel_service.py @@ -6,7 +6,7 @@ import pytest -from coding_agent.runtime_store import AgentRunRecord, JSONObject +from coding_agent.stores.runtime_store import AgentRunRecord, JSONObject from coding_agent.runs import ( RuntimeCancelObservationFinalizer, RuntimeCancelOrchestrationService, diff --git a/coding-agent/tests/coding_agent/test_runtime_event_replay_service.py b/coding-agent/tests/coding_agent/test_runtime_event_replay_service.py index cf53ec074..a62312801 100644 --- a/coding-agent/tests/coding_agent/test_runtime_event_replay_service.py +++ b/coding-agent/tests/coding_agent/test_runtime_event_replay_service.py @@ -5,7 +5,7 @@ import pytest from coding_agent.events import RuntimeEventReplayService -from coding_agent.runtime_store import RuntimeEventRecord +from coding_agent.stores.runtime_store import RuntimeEventRecord class FakeRuntimeEventStore: diff --git a/coding-agent/tests/coding_agent/test_runtime_observation_service.py b/coding-agent/tests/coding_agent/test_runtime_observation_service.py index 0a30c8b12..e14eb57da 100644 --- a/coding-agent/tests/coding_agent/test_runtime_observation_service.py +++ b/coding-agent/tests/coding_agent/test_runtime_observation_service.py @@ -2,7 +2,7 @@ from dataclasses import dataclass, field -from coding_agent.agent_observability import AgentObservationEvent +from coding_agent.observability.agent import AgentObservationEvent from coding_agent.runs import ( IsolationPolicy, LocalDaemonExecutorRef, diff --git a/coding-agent/tests/coding_agent/test_runtime_query_service.py b/coding-agent/tests/coding_agent/test_runtime_query_service.py index 9e4509b46..d25f84f91 100644 --- a/coding-agent/tests/coding_agent/test_runtime_query_service.py +++ b/coding-agent/tests/coding_agent/test_runtime_query_service.py @@ -7,7 +7,7 @@ from agentkit.checkpoint.models import CheckpointMeta -from coding_agent.runtime_store import ( +from coding_agent.stores.runtime_store import ( AgentInteractionRecord, AgentRunRecord, RunMessageSnapshotRecord, diff --git a/coding-agent/tests/coding_agent/test_runtime_resume_service.py b/coding-agent/tests/coding_agent/test_runtime_resume_service.py index 168924544..befb28599 100644 --- a/coding-agent/tests/coding_agent/test_runtime_resume_service.py +++ b/coding-agent/tests/coding_agent/test_runtime_resume_service.py @@ -8,7 +8,7 @@ from agentkit.checkpoint.models import CheckpointMeta from agentkit.tape.models import Entry -from coding_agent.runtime_store import AgentRunRecord, RunMessageSnapshotRecord +from coding_agent.stores.runtime_store import AgentRunRecord, RunMessageSnapshotRecord from coding_agent.runs import ( RuntimeResumeOrchestrationService, RuntimeResumeService, diff --git a/coding-agent/tests/coding_agent/test_runtime_run_persistence.py b/coding-agent/tests/coding_agent/test_runtime_run_persistence.py index 4ed41e174..dfcdf99bf 100644 --- a/coding-agent/tests/coding_agent/test_runtime_run_persistence.py +++ b/coding-agent/tests/coding_agent/test_runtime_run_persistence.py @@ -8,7 +8,7 @@ import pytest -from coding_agent.runtime_store import ( +from coding_agent.stores.runtime_store import ( AgentRunRecord, JSONObject, RunMessageSnapshotRecord, diff --git a/coding-agent/tests/coding_agent/test_runtime_run_recovery.py b/coding-agent/tests/coding_agent/test_runtime_run_recovery.py index 07ef291cd..5693b16bf 100644 --- a/coding-agent/tests/coding_agent/test_runtime_run_recovery.py +++ b/coding-agent/tests/coding_agent/test_runtime_run_recovery.py @@ -4,7 +4,7 @@ import pytest -from coding_agent.runtime_store import AgentRunRecord, JSONObject +from coding_agent.stores.runtime_store import AgentRunRecord, JSONObject from coding_agent.runs import RuntimeRunRecoveryService from coding_agent.runs.recovery import ( STALE_RUNTIME_RUN_ERROR, diff --git a/coding-agent/tests/coding_agent/test_runtime_store_contracts.py b/coding-agent/tests/coding_agent/test_runtime_store_contracts.py index 81a01120d..20ff188af 100644 --- a/coding-agent/tests/coding_agent/test_runtime_store_contracts.py +++ b/coding-agent/tests/coding_agent/test_runtime_store_contracts.py @@ -2,7 +2,7 @@ from typing import Any, cast -from coding_agent.runtime_store import ( +from coding_agent.stores.runtime_store import ( JSONLRuntimeStore, PGRuntimeStore, SQLiteRuntimeStore, diff --git a/coding-agent/tests/coding_agent/test_runtime_turn_service.py b/coding-agent/tests/coding_agent/test_runtime_turn_service.py index 01fad62da..692a00798 100644 --- a/coding-agent/tests/coding_agent/test_runtime_turn_service.py +++ b/coding-agent/tests/coding_agent/test_runtime_turn_service.py @@ -8,12 +8,12 @@ from agentkit.tools import FatalToolExecutionError -from coding_agent.adapter_types import StopReason, TurnOutcome +from coding_agent.adapter.types import StopReason, TurnOutcome from coding_agent.executors.local_daemon import ( LocalDaemonRuntimeBinding, LocalDaemonRuntimeExecution, ) -from coding_agent.runtime_store import AgentRunRecord, JSONObject +from coding_agent.stores.runtime_store import AgentRunRecord, JSONObject from coding_agent.runs import ( IsolationPolicy, LocalDaemonExecutorRef, diff --git a/coding-agent/tests/coding_agent/test_runtime_wire_event_recorder.py b/coding-agent/tests/coding_agent/test_runtime_wire_event_recorder.py index 9e5e5fa9b..b7d4ec165 100644 --- a/coding-agent/tests/coding_agent/test_runtime_wire_event_recorder.py +++ b/coding-agent/tests/coding_agent/test_runtime_wire_event_recorder.py @@ -14,7 +14,7 @@ RunTarget, RuntimeWireEventRecorder, ) -from coding_agent.runtime_store import AgentRunRecord, RuntimeEventRecord +from coding_agent.stores.runtime_store import AgentRunRecord, RuntimeEventRecord from coding_agent.wire.protocol import StreamDelta diff --git a/coding-agent/tests/coding_agent/test_scheduled_runs.py b/coding-agent/tests/coding_agent/test_scheduled_runs.py index f8d99af13..a96fb9780 100644 --- a/coding-agent/tests/coding_agent/test_scheduled_runs.py +++ b/coding-agent/tests/coding_agent/test_scheduled_runs.py @@ -13,7 +13,7 @@ PrometheusMetricsObservationSink, PrometheusMetricsRecorder, ) -from coding_agent.scheduled_runs import ( +from coding_agent.runs.scheduled import ( PGScheduledRunStore, ProactiveSignalPlanner, ProactiveSignalRecord, @@ -23,8 +23,8 @@ ScheduledRunLaunchPreparer, ScheduledRunPlanner, ) -from coding_agent.topic_lifecycle import TopicLifecycle -from coding_agent.topic_store import JSONObject, TopicAnchorRecord, TopicRecord +from coding_agent.topics.lifecycle import TopicLifecycle +from coding_agent.topics.store import JSONObject, TopicAnchorRecord, TopicRecord from coding_agent.server.developer_console import ( ConsoleProactiveSignalSummary, ConsoleScheduleSummary, diff --git a/coding-agent/tests/coding_agent/test_sqlite_local_durable_fencing.py b/coding-agent/tests/coding_agent/test_sqlite_local_durable_fencing.py index 26b422796..b25d7aab1 100644 --- a/coding-agent/tests/coding_agent/test_sqlite_local_durable_fencing.py +++ b/coding-agent/tests/coding_agent/test_sqlite_local_durable_fencing.py @@ -9,9 +9,9 @@ from agentkit.checkpoint.models import CheckpointMeta, CheckpointSnapshot from agentkit.checkpoint import CheckpointService from agentkit.errors import ConfigError -from coding_agent.local_durable_store import SQLiteLocalDurableStore -from coding_agent.local_storage import local_sqlite_path, local_sqlite_storage_config -from coding_agent.runtime_store import AgentRunRecord, RuntimeEventRecord +from coding_agent.stores.durable_local import SQLiteLocalDurableStore +from coding_agent.stores.local import local_sqlite_path, local_sqlite_storage_config +from coding_agent.stores.runtime_store import AgentRunRecord, RuntimeEventRecord from coding_agent.server.session_manager import SessionManager from coding_agent.server.stores.session_owner_store import ( SQLiteSessionOwnerStore, diff --git a/coding-agent/tests/coding_agent/test_sqlite_runtime_store.py b/coding-agent/tests/coding_agent/test_sqlite_runtime_store.py index 0a4f0a997..b20c5e9e1 100644 --- a/coding-agent/tests/coding_agent/test_sqlite_runtime_store.py +++ b/coding-agent/tests/coding_agent/test_sqlite_runtime_store.py @@ -4,7 +4,7 @@ import pytest -from coding_agent.runtime_store import ( +from coding_agent.stores.runtime_store import ( AgentInteractionRecord, AgentRunRecord, RuntimeEventRecord, diff --git a/coding-agent/tests/coding_agent/test_sqlite_storage_migration.py b/coding-agent/tests/coding_agent/test_sqlite_storage_migration.py index 67b7d4eeb..1ba19dc91 100644 --- a/coding-agent/tests/coding_agent/test_sqlite_storage_migration.py +++ b/coding-agent/tests/coding_agent/test_sqlite_storage_migration.py @@ -9,7 +9,7 @@ from agentkit.checkpoint.models import CheckpointMeta, CheckpointSnapshot from agentkit.storage.checkpoint_fs import FSCheckpointStore from agentkit.storage.sqlite import SQLiteCheckpointStore, SQLiteTapeStore -from coding_agent.storage_migration import ( +from coding_agent.stores.migration import ( migrate_fs_checkpoints_to_sqlite, migrate_jsonl_tapes_to_sqlite, migrate_legacy_storage_to_sqlite, diff --git a/coding-agent/tests/coding_agent/test_topic_layer_smoke.py b/coding-agent/tests/coding_agent/test_topic_layer_smoke.py index 6a1cb959c..b9a92fb38 100644 --- a/coding-agent/tests/coding_agent/test_topic_layer_smoke.py +++ b/coding-agent/tests/coding_agent/test_topic_layer_smoke.py @@ -12,26 +12,26 @@ PrometheusMetricsObservationSink, PrometheusMetricsRecorder, ) -from coding_agent.topic_lifecycle import ( +from coding_agent.topics.lifecycle import ( TOPIC_FINALIZED, TOPIC_INITIAL, TopicLifecycle, find_topic_anchors, topic_range_entries, ) -from coding_agent.topic_provenance import ( +from coding_agent.topics.provenance import ( topic_cost_delta, topic_eval_provenance, topic_memory_provenance, topic_metric_attributes, ) -from coding_agent.topic_recall import ( +from coding_agent.topics.recall import ( RECALL_ANCHOR, recall_topic_summaries, record_topic_recall, topic_recall_context_pack, ) -from coding_agent.topic_store import ( +from coding_agent.topics.store import ( JSONObject, TopicAnchorRecord, TopicCostRecord, diff --git a/coding-agent/tests/coding_agent/test_topic_lifecycle.py b/coding-agent/tests/coding_agent/test_topic_lifecycle.py index d30a70636..d666fa8e0 100644 --- a/coding-agent/tests/coding_agent/test_topic_lifecycle.py +++ b/coding-agent/tests/coding_agent/test_topic_lifecycle.py @@ -8,7 +8,7 @@ from agentkit.tape.anchor import Anchor from agentkit.tape.models import Entry from agentkit.tape.tape import Tape -from coding_agent.topic_lifecycle import ( +from coding_agent.topics.lifecycle import ( TOPIC_ABORTED, TOPIC_FINALIZED, TOPIC_INITIAL, @@ -16,8 +16,8 @@ find_topic_anchors, topic_range_entries, ) -from coding_agent.topic_memory import MemoryReviewStore -from coding_agent.topic_store import ( +from coding_agent.topics.memory import MemoryReviewStore +from coding_agent.topics.store import ( JSONObject, TopicAnchorRecord, TopicRecord, diff --git a/coding-agent/tests/coding_agent/test_topic_memory.py b/coding-agent/tests/coding_agent/test_topic_memory.py index d911e1799..6462051b2 100644 --- a/coding-agent/tests/coding_agent/test_topic_memory.py +++ b/coding-agent/tests/coding_agent/test_topic_memory.py @@ -2,18 +2,18 @@ from datetime import UTC, datetime -from coding_agent.bee_workspace import ( +from coding_agent.bee.workspace import ( BeeWorkspaceExecutorRunArtifact, BeeWorkspaceRunArtifacts, BeeWorkspaceRunNode, ) -from coding_agent.topic_memory import ( +from coding_agent.topics.memory import ( MEMORY_CANDIDATE_STATUS, MEMORY_REFERENCE_MODE, propose_memory_candidate_from_topic, propose_memory_candidates_from_bee_artifacts, ) -from coding_agent.topic_store import TopicRecord +from coding_agent.topics.store import TopicRecord def test_topic_finalization_creates_memory_candidate_with_provenance() -> None: diff --git a/coding-agent/tests/coding_agent/test_topic_provenance.py b/coding-agent/tests/coding_agent/test_topic_provenance.py index b01e9c04b..d6f89105e 100644 --- a/coding-agent/tests/coding_agent/test_topic_provenance.py +++ b/coding-agent/tests/coding_agent/test_topic_provenance.py @@ -4,7 +4,7 @@ import pytest -from coding_agent.topic_provenance import ( +from coding_agent.topics.provenance import ( TopicEntryRange, topic_cost_delta, topic_entry_range, @@ -13,7 +13,7 @@ topic_metric_attributes, update_topic_cost, ) -from coding_agent.topic_store import TopicCostRecord, TopicRecord +from coding_agent.topics.store import TopicCostRecord, TopicRecord class FakeTopicCostStore: diff --git a/coding-agent/tests/coding_agent/test_topic_range_index.py b/coding-agent/tests/coding_agent/test_topic_range_index.py index 5b36f8e80..010346853 100644 --- a/coding-agent/tests/coding_agent/test_topic_range_index.py +++ b/coding-agent/tests/coding_agent/test_topic_range_index.py @@ -4,11 +4,11 @@ import pytest -from coding_agent.topic_range_index import ( +from coding_agent.topics.range_index import ( TopicRangeIndex, TopicRangeSearchQuery, ) -from coding_agent.topic_store import TopicRecord +from coding_agent.topics.store import TopicRecord def test_topic_range_index_indexes_finalized_topic_and_searches_text() -> None: diff --git a/coding-agent/tests/coding_agent/test_topic_recall.py b/coding-agent/tests/coding_agent/test_topic_recall.py index 0cc467c73..e681e012a 100644 --- a/coding-agent/tests/coding_agent/test_topic_recall.py +++ b/coding-agent/tests/coding_agent/test_topic_recall.py @@ -5,7 +5,7 @@ import pytest from agentkit.tape.tape import Tape -from coding_agent.topic_recall import ( +from coding_agent.topics.recall import ( RECALL_ANCHOR, RecalledTopic, recall_topic_summaries, @@ -13,7 +13,7 @@ topic_recall_context_messages, topic_recall_context_pack, ) -from coding_agent.topic_store import TopicRecallLinkRecord, TopicRecord +from coding_agent.topics.store import TopicRecallLinkRecord, TopicRecord class FakeRecallStore: diff --git a/coding-agent/tests/coding_agent/test_topic_store.py b/coding-agent/tests/coding_agent/test_topic_store.py index 97e915ef2..206a2cd6d 100644 --- a/coding-agent/tests/coding_agent/test_topic_store.py +++ b/coding-agent/tests/coding_agent/test_topic_store.py @@ -6,7 +6,7 @@ import pytest from agentkit.storage.pg import AsyncPGPool, PGPool -from coding_agent.topic_store import ( +from coding_agent.topics.store import ( PGTopicStore, TopicAnchorRecord, TopicCostRecord, diff --git a/coding-agent/tests/coding_agent/tools/test_subagent.py b/coding-agent/tests/coding_agent/tools/test_subagent.py index bc2e6140d..c29db8afe 100644 --- a/coding-agent/tests/coding_agent/tools/test_subagent.py +++ b/coding-agent/tests/coding_agent/tools/test_subagent.py @@ -15,7 +15,7 @@ from agentkit.tape.tape import Tape from agentkit.tools import FatalToolExecutionError from agentkit.tools import ToolCallRequest, Toolset -from coding_agent.adapter_types import StopReason, TurnOutcome +from coding_agent.adapter.types import StopReason, TurnOutcome from coding_agent.__main__ import create_agent, create_child_pipeline from coding_agent.environment import CloudCommandResult, CloudEnvironment, LocalEnvironment from coding_agent.plugins.core_tools import CoreToolsPlugin diff --git a/coding-agent/tests/conftest.py b/coding-agent/tests/conftest.py index ad6e7310c..3233aa381 100644 --- a/coding-agent/tests/conftest.py +++ b/coding-agent/tests/conftest.py @@ -8,7 +8,7 @@ import pytest import coding_agent.server.http_server as http_server -from coding_agent.local_storage import local_sqlite_storage_config +from coding_agent.stores.local import local_sqlite_storage_config from coding_agent.observability import reset_prometheus_metrics from coding_agent.server.session_manager import SessionManager diff --git a/coding-agent/tests/dogfood/test_local_dogfood_run.py b/coding-agent/tests/dogfood/test_local_dogfood_run.py index 59479cd2b..141351413 100644 --- a/coding-agent/tests/dogfood/test_local_dogfood_run.py +++ b/coding-agent/tests/dogfood/test_local_dogfood_run.py @@ -8,7 +8,7 @@ import pytest from httpx import ASGITransport, AsyncClient -from coding_agent.runtime_store import ( +from coding_agent.stores.runtime_store import ( AgentInteractionRecord, AgentRunRecord, RunMessageSnapshotRecord, diff --git a/coding-agent/tests/dogfood/test_workspace_provider_demo.py b/coding-agent/tests/dogfood/test_workspace_provider_demo.py index b8c82f2cd..c7380db9f 100644 --- a/coding-agent/tests/dogfood/test_workspace_provider_demo.py +++ b/coding-agent/tests/dogfood/test_workspace_provider_demo.py @@ -12,7 +12,7 @@ from coding_agent.environment import CloudCommandResult, WorkspaceProviderCapabilities from coding_agent.observability import prometheus_metrics_text, reset_prometheus_metrics from coding_agent.plugins.core_tools import CoreToolsPlugin -from coding_agent.runtime_store import ( +from coding_agent.stores.runtime_store import ( AgentInteractionRecord, AgentRunRecord, RunMessageSnapshotRecord, diff --git a/coding-agent/tests/integration/test_durable_runtime_smoke.py b/coding-agent/tests/integration/test_durable_runtime_smoke.py index 833d6cf0c..9851eba6b 100644 --- a/coding-agent/tests/integration/test_durable_runtime_smoke.py +++ b/coding-agent/tests/integration/test_durable_runtime_smoke.py @@ -17,9 +17,9 @@ from agentkit.runtime.context import AgentRunContext from agentkit.storage.pg import PGTapeStore from agentkit.tape.tape import Tape -from coding_agent.adapter_types import StopReason, TurnOutcome +from coding_agent.adapter.types import StopReason, TurnOutcome from coding_agent.observability import OtlpHttpObservationSink -from coding_agent.runtime_store import ( +from coding_agent.stores.runtime_store import ( AgentInteractionRecord, AgentRunRecord, JSONObject, diff --git a/coding-agent/tests/integration/test_pipeline_e2e.py b/coding-agent/tests/integration/test_pipeline_e2e.py index 47434818f..0720fce59 100644 --- a/coding-agent/tests/integration/test_pipeline_e2e.py +++ b/coding-agent/tests/integration/test_pipeline_e2e.py @@ -16,7 +16,7 @@ from coding_agent.__main__ import create_agent from coding_agent.adapter import PipelineAdapter -from coding_agent.adapter_types import StopReason, TurnOutcome +from coding_agent.adapter.types import StopReason, TurnOutcome from coding_agent.evaluation import build_test_cases, load_tape_entries from coding_agent.wire.protocol import ( StreamDelta, diff --git a/coding-agent/tests/ui/test_developer_console.py b/coding-agent/tests/ui/test_developer_console.py index 8428af26d..d10e8edff 100644 --- a/coding-agent/tests/ui/test_developer_console.py +++ b/coding-agent/tests/ui/test_developer_console.py @@ -9,28 +9,28 @@ from httpx import ASGITransport, AsyncClient from agentkit.storage.protocols import TapeInfo, TapeSearchResult -from coding_agent.bee_launch import BeeLaunchRecord -from coding_agent.bee_workspace import ( +from coding_agent.bee.launch import BeeLaunchRecord +from coding_agent.bee.workspace import ( BeeWorkspaceRunArtifacts, BeeWorkspaceRunNode, write_bee_workspace_run_artifacts, ) from coding_agent.core.config import settings from coding_agent.environment import WorkspaceProviderCapabilities -from coding_agent.external_executor import ExecutorRunRecord +from coding_agent.executors.external import ExecutorRunRecord from coding_agent.observability import prometheus_metrics_text, reset_prometheus_metrics -from coding_agent.runtime_store import ( +from coding_agent.stores.runtime_store import ( AgentInteractionRecord, AgentRunRecord, RunMessageSnapshotRecord, RuntimeEventRecord, ) -from coding_agent.scheduled_runs import ( +from coding_agent.runs.scheduled import ( ProactiveSignalRecord, ScheduleRecord, ScheduleTriggerRecord, ) -from coding_agent.topic_store import ( +from coding_agent.topics.store import ( TopicAnchorRecord, TopicCostRecord, TopicRecallLinkRecord, diff --git a/coding-agent/tests/ui/test_http_server.py b/coding-agent/tests/ui/test_http_server.py index 1eecac2fe..420a150da 100644 --- a/coding-agent/tests/ui/test_http_server.py +++ b/coding-agent/tests/ui/test_http_server.py @@ -33,12 +33,12 @@ from agentkit.tape.tape import Tape from agentkit.tools import FatalToolExecutionError -from coding_agent.adapter_types import StopReason, TurnOutcome +from coding_agent.adapter.types import StopReason, TurnOutcome from coding_agent.approval import ApprovalPolicy from coding_agent.approval.store import ApprovalStore from coding_agent.core.config import settings from coding_agent.environment import CloudCommandResult, CloudEnvironment -from coding_agent.runtime_store import ( +from coding_agent.stores.runtime_store import ( AgentInteractionRecord, AgentRunRecord, RunMessageSnapshotRecord, @@ -96,7 +96,7 @@ TurnStatusDelta, TurnEnd, ) -from coding_agent.local_storage import local_sqlite_storage_config +from coding_agent.stores.local import local_sqlite_storage_config def _local_run_target(path: Path | str) -> RunTarget: diff --git a/coding-agent/tests/ui/test_session_manager_public_api.py b/coding-agent/tests/ui/test_session_manager_public_api.py index 2202e5300..bf9180b47 100644 --- a/coding-agent/tests/ui/test_session_manager_public_api.py +++ b/coding-agent/tests/ui/test_session_manager_public_api.py @@ -568,7 +568,7 @@ def __init__(self, *, pool: FakePGPool) -> None: def test_session_manager_disables_runtime_store_by_default() -> None: manager = SessionManager() - from coding_agent.runtime_store import SQLiteRuntimeStore + from coding_agent.stores.runtime_store import SQLiteRuntimeStore assert isinstance(manager._runtime_store, SQLiteRuntimeStore) assert ( @@ -586,7 +586,7 @@ def test_session_manager_uses_single_local_sqlite_bundle_by_default( monkeypatch, ) -> None: from agentkit.storage.sqlite import SQLiteCheckpointStore, SQLiteTapeStore - from coding_agent.runtime_store import SQLiteRuntimeStore + from coding_agent.stores.runtime_store import SQLiteRuntimeStore from coding_agent.server.stores.session_store import SQLiteSessionStore monkeypatch.setenv("AGENT_DATA_DIR", str(tmp_path)) @@ -737,7 +737,7 @@ def __init__(self, *, pool: FakePGPool) -> None: def test_session_manager_creates_jsonl_runtime_store_when_storage_config_requests_jsonl( tmp_path, ) -> None: - from coding_agent.runtime_store import JSONLRuntimeStore + from coding_agent.stores.runtime_store import JSONLRuntimeStore manager = SessionManager( storage_config={ @@ -752,7 +752,7 @@ def test_session_manager_creates_jsonl_runtime_store_when_storage_config_request def test_session_manager_creates_sqlite_runtime_store_when_storage_config_requests_sqlite( tmp_path, ) -> None: - from coding_agent.runtime_store import SQLiteRuntimeStore + from coding_agent.stores.runtime_store import SQLiteRuntimeStore manager = SessionManager( storage_config={ @@ -803,7 +803,7 @@ async def test_file_session_and_jsonl_runtime_store_reopen_resume_metadata( ) -> None: from datetime import UTC - from coding_agent.runtime_store import AgentRunRecord + from coding_agent.stores.runtime_store import AgentRunRecord storage_config = { "http_session_backend": "fs", diff --git a/coding-agent/tests/ui/test_session_manager_runtime.py b/coding-agent/tests/ui/test_session_manager_runtime.py index 4c7a1390b..09711ae40 100644 --- a/coding-agent/tests/ui/test_session_manager_runtime.py +++ b/coding-agent/tests/ui/test_session_manager_runtime.py @@ -16,8 +16,8 @@ from agentkit.tools import FatalToolExecutionError from agentkit.tape.models import Entry from agentkit.tape.tape import Tape -from coding_agent.adapter_types import StopReason, TurnOutcome -from coding_agent.agent_observability import JsonlAgentObservationStore +from coding_agent.adapter.types import StopReason, TurnOutcome +from coding_agent.observability.agent import JsonlAgentObservationStore from coding_agent.approval import ApprovalPolicy from coding_agent.environment import ( CloudCommandResult, @@ -34,7 +34,7 @@ LocalDaemonRuntimeResult, RunExecutorTargetError, ) -from coding_agent.runtime_store import ( +from coding_agent.stores.runtime_store import ( AgentInteractionRecord, AgentRunRecord, RunMessageSnapshotRecord, diff --git a/coding-agent/tests/unit/core/test_metrics.py b/coding-agent/tests/unit/core/test_metrics.py index 4389f3ee9..9a2d628a7 100644 --- a/coding-agent/tests/unit/core/test_metrics.py +++ b/coding-agent/tests/unit/core/test_metrics.py @@ -3,7 +3,7 @@ import pytest import time -from coding_agent.metrics import SessionMetrics, MetricsCollector, collector +from coding_agent.observability.metrics import SessionMetrics, MetricsCollector, collector class TestSessionMetrics: