mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-17 17:03:22 +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
|
|
@ -2,7 +2,7 @@ from __future__ import annotations
|
|||
|
||||
from pathlib import Path
|
||||
|
||||
from oclaw.platform.config.paths import PROJECT_ROOT
|
||||
from svc.config.paths import PROJECT_ROOT
|
||||
|
||||
|
||||
_PROMPT_CRITICAL_FILES = (
|
||||
|
|
@ -13,8 +13,8 @@ _PROMPT_CRITICAL_FILES = (
|
|||
"runtime/memory_stage.py",
|
||||
"runtime/project_context_prompt.py",
|
||||
"runtime/chat/agent_errors.py",
|
||||
"platform/llm/image_ocr_client.py",
|
||||
"platform/llm/image_legacy_client.py",
|
||||
"svc/llm/image_ocr_client.py",
|
||||
"svc/llm/image_legacy_client.py",
|
||||
"runtime/gateway.py",
|
||||
)
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ def test_prompt_critical_paths_use_prompt_templates() -> None:
|
|||
or "render_prompt_for_lang(" in text
|
||||
or "render_runtime_prompt(" in text
|
||||
), (
|
||||
f"{rel} must use oclaw.runtime.prompt_templates (Markdown under runtime/workspaces/_system)"
|
||||
f"{rel} must use runtime.prompt_templates (Markdown under runtime/workspaces/_system)"
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue