mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-16 23:00:44 +08:00
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:
parent
7941b27f58
commit
420abac9f1
405 changed files with 1316 additions and 1345 deletions
|
|
@ -4,11 +4,11 @@ from pathlib import Path
|
|||
|
||||
import pytest
|
||||
|
||||
from oclaw.runtime.skills import workspace_skills_layout_signature
|
||||
from oclaw.runtime.system_prompt import build_oclaw_executor_system_prompt
|
||||
from oclaw.runtime.types import OclawMemoryContext
|
||||
from oclaw.platform.persistence.sqlite_store import SqliteStore
|
||||
from oclaw.runtime.tools.base import ToolRegistry, ToolSpec
|
||||
from runtime.skills import workspace_skills_layout_signature
|
||||
from runtime.system_prompt import build_oclaw_executor_system_prompt
|
||||
from runtime.types import OclawMemoryContext
|
||||
from svc.persistence.sqlite_store import SqliteStore
|
||||
from runtime.tools.base import ToolRegistry, ToolSpec
|
||||
|
||||
|
||||
def _spec(name: str) -> ToolSpec:
|
||||
|
|
@ -70,7 +70,7 @@ def test_build_oclaw_executor_system_prompt_with_tools_has_skills(tmp_path: Path
|
|||
|
||||
|
||||
def test_executor_static_prompt_cache_invalidates_on_settings_change(monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
from oclaw.runtime import system_prompt as sp
|
||||
from runtime import system_prompt as sp
|
||||
|
||||
class DummyStore:
|
||||
def __init__(self) -> None:
|
||||
|
|
@ -143,7 +143,7 @@ def test_workspace_skills_layout_signature_changes_on_skill_md_edit(monkeypatch:
|
|||
|
||||
|
||||
def test_executor_static_prompt_cache_invalidates_on_workspace_skills_layout_change(monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
from oclaw.runtime import system_prompt as sp
|
||||
from runtime import system_prompt as sp
|
||||
|
||||
class DummyStore:
|
||||
def get_setting(self, key: str) -> str:
|
||||
|
|
@ -204,7 +204,7 @@ def test_executor_static_prompt_cache_invalidates_on_workspace_skills_layout_cha
|
|||
|
||||
|
||||
def test_executor_static_prompt_cache_invalidates_on_skill_role_binding_change(monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
from oclaw.runtime import system_prompt as sp
|
||||
from runtime import system_prompt as sp
|
||||
|
||||
class DummyStore:
|
||||
def __init__(self) -> None:
|
||||
|
|
@ -265,7 +265,7 @@ def test_executor_static_prompt_cache_invalidates_on_skill_role_binding_change(m
|
|||
|
||||
|
||||
def test_executor_static_prompt_cache_invalidates_on_workspace_revision_change(monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
from oclaw.runtime import system_prompt as sp
|
||||
from runtime import system_prompt as sp
|
||||
|
||||
class DummyStore:
|
||||
def get_setting(self, key: str) -> str:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue