refactor: root-package imports (svc/runtime/interfaces) and fix PYTHONPATH

- Rename platform/ to svc/ to avoid shadowing stdlib platform.
- Replace from oclaw.* with from svc/runtime/interfaces; update -m CLI paths.
- tests/conftest: prepend repo root to sys.path (no parent-folder package name).
- CI: paths and offline_eval script under repo root.
- Ops scripts: PYTHONPATH must be repo root for python -m runtime.* (fixes gateway/WhatsApp sidecar startup).
- Fix default oclaw.json path in tabular/file attachment limits; stabilize attachment test config.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-05-13 14:51:17 +08:00
parent 7941b27f58
commit 420abac9f1
405 changed files with 1316 additions and 1345 deletions

View file

@ -2,7 +2,7 @@ from __future__ import annotations
from typing import Any
from oclaw.runtime.agents.agent_scope import resolve_agent_id_from_session_key, resolve_session_agent_id
from runtime.agents.agent_scope import resolve_agent_id_from_session_key, resolve_session_agent_id
from .shared_types import GatewayRequestHandlers
from .validation import error_shape

View file

@ -1,6 +1,6 @@
"""Compatibility bridge to the new oclaw dispatcher."""
from oclaw.interfaces.gateway.dispatcher import build_gateway_method_handlers, method_names
from interfaces.gateway.dispatcher import build_gateway_method_handlers, method_names
__all__ = ["build_gateway_method_handlers", "method_names"]

View file

@ -4,7 +4,7 @@ import importlib.util
from pathlib import Path
from typing import Any, Callable
from oclaw.platform.config.runtime_paths import runtime_extensions_root
from svc.config.runtime_paths import runtime_extensions_root
from .shared_types import GatewayRequestHandlers
from .validation import error_shape

View file

@ -2,7 +2,7 @@ from __future__ import annotations
from typing import Any
from oclaw.runtime.agents.agent_scope import resolve_default_agent_id
from runtime.agents.agent_scope import resolve_default_agent_id
from .shared_types import GatewayRequestHandlers
from .telegram_send_normalize import normalize_transport_target_for_channel

View file

@ -3,14 +3,14 @@ from __future__ import annotations
import json
from typing import Any
from oclaw.runtime.skill_installer import (
from runtime.skill_installer import (
create_skill_from_template,
install_skill_from_local_dir,
install_skill_from_registry_archive,
list_skills_with_status,
set_skill_enabled,
)
from oclaw.runtime.skills import discover_workspace_skill_manifests, load_skill_manifest
from runtime.skills import discover_workspace_skill_manifests, load_skill_manifest
from .shared_types import GatewayRequestHandlers
from .validation import error_shape

View file

@ -2,7 +2,7 @@ from __future__ import annotations
from typing import Any
from oclaw.runtime.extensions.telegram import (
from runtime.extensions.telegram import (
normalize_telegram_messaging_target,
parse_telegram_reply_to_message_id,
parse_telegram_target,