mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-10 14:13:15 +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,36 +2,36 @@ from __future__ import annotations
|
|||
|
||||
from typing import Any
|
||||
|
||||
from oclaw.interfaces.gateway.server_methods.agent import agent_handlers
|
||||
from oclaw.interfaces.gateway.server_methods.agents import agents_handlers
|
||||
from oclaw.interfaces.gateway.server_methods.chat import chat_handlers
|
||||
from oclaw.interfaces.gateway.server_methods.send import send_handlers
|
||||
from oclaw.interfaces.gateway.server_methods.image import image_handlers
|
||||
from oclaw.interfaces.gateway.server_methods.skills import skills_handlers
|
||||
from oclaw.interfaces.gateway.server_methods.system import system_handlers
|
||||
from oclaw.interfaces.gateway.server_methods.cron import cron_handlers
|
||||
from oclaw.interfaces.gateway.server_methods.devices import device_handlers
|
||||
from oclaw.interfaces.gateway.server_methods.models import models_handlers
|
||||
from oclaw.interfaces.gateway.server_methods.models_auth_status import (
|
||||
from interfaces.gateway.server_methods.agent import agent_handlers
|
||||
from interfaces.gateway.server_methods.agents import agents_handlers
|
||||
from interfaces.gateway.server_methods.chat import chat_handlers
|
||||
from interfaces.gateway.server_methods.send import send_handlers
|
||||
from interfaces.gateway.server_methods.image import image_handlers
|
||||
from interfaces.gateway.server_methods.skills import skills_handlers
|
||||
from interfaces.gateway.server_methods.system import system_handlers
|
||||
from interfaces.gateway.server_methods.cron import cron_handlers
|
||||
from interfaces.gateway.server_methods.devices import device_handlers
|
||||
from interfaces.gateway.server_methods.models import models_handlers
|
||||
from interfaces.gateway.server_methods.models_auth_status import (
|
||||
invalidate_model_auth_status_cache,
|
||||
models_auth_status_handlers,
|
||||
)
|
||||
from oclaw.interfaces.gateway.server_methods.push import push_handlers
|
||||
from oclaw.interfaces.gateway.server_methods.channels import channels_handlers
|
||||
from oclaw.interfaces.gateway.server_methods.update import update_handlers
|
||||
from oclaw.interfaces.gateway.server_methods.voicewake import voicewake_handlers
|
||||
from oclaw.interfaces.gateway.server_methods.wizard import wizard_handlers
|
||||
from oclaw.interfaces.gateway.server_methods.tts import tts_handlers
|
||||
from oclaw.interfaces.gateway.server_methods.web import web_handlers
|
||||
from oclaw.interfaces.gateway.server_methods.tools_catalog import tools_catalog_handlers
|
||||
from oclaw.interfaces.gateway.server_methods.tools_effective import tools_effective_handlers
|
||||
from oclaw.interfaces.gateway.server_methods.talk import talk_handlers
|
||||
from oclaw.interfaces.gateway.server_methods.usage import usage_handlers
|
||||
from oclaw.interfaces.gateway.server_methods.exec_approvals import exec_approvals_handlers
|
||||
from oclaw.interfaces.gateway.server_methods.nodes_pending import node_pending_handlers
|
||||
from oclaw.interfaces.gateway.server_methods.nodes import node_handlers
|
||||
from oclaw.interfaces.gateway.server_methods.sessions import sessions_handlers
|
||||
from oclaw.interfaces.gateway.server_methods.doctor import doctor_handlers
|
||||
from interfaces.gateway.server_methods.push import push_handlers
|
||||
from interfaces.gateway.server_methods.channels import channels_handlers
|
||||
from interfaces.gateway.server_methods.update import update_handlers
|
||||
from interfaces.gateway.server_methods.voicewake import voicewake_handlers
|
||||
from interfaces.gateway.server_methods.wizard import wizard_handlers
|
||||
from interfaces.gateway.server_methods.tts import tts_handlers
|
||||
from interfaces.gateway.server_methods.web import web_handlers
|
||||
from interfaces.gateway.server_methods.tools_catalog import tools_catalog_handlers
|
||||
from interfaces.gateway.server_methods.tools_effective import tools_effective_handlers
|
||||
from interfaces.gateway.server_methods.talk import talk_handlers
|
||||
from interfaces.gateway.server_methods.usage import usage_handlers
|
||||
from interfaces.gateway.server_methods.exec_approvals import exec_approvals_handlers
|
||||
from interfaces.gateway.server_methods.nodes_pending import node_pending_handlers
|
||||
from interfaces.gateway.server_methods.nodes import node_handlers
|
||||
from interfaces.gateway.server_methods.sessions import sessions_handlers
|
||||
from interfaces.gateway.server_methods.doctor import doctor_handlers
|
||||
|
||||
|
||||
def _call(handler, *, params: dict[str, Any], context: dict[str, Any] | None = None, client: dict[str, Any] | None = None):
|
||||
|
|
@ -310,7 +310,7 @@ def test_cron_add_and_run_fallback() -> None:
|
|||
|
||||
def test_image_generate_falls_back_to_registered_openai_provider() -> None:
|
||||
# Get providers via plugin load, then inject into gateway context.
|
||||
from oclaw.interfaces.gateway.server_plugins import load_gateway_plugins
|
||||
from interfaces.gateway.server_plugins import load_gateway_plugins
|
||||
|
||||
plugin_out = load_gateway_plugins(
|
||||
cfg={"plugins": {"enabled": ["openai"]}},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue