oclaw/tests/test_memory_tool_aliases.py
oliver 420abac9f1 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>
2026-05-13 14:51:17 +08:00

26 lines
894 B
Python

from __future__ import annotations
from runtime.tools.catalog import materialize_tool_specs
def test_memory_tools_only_expose_canonical_names() -> None:
specs = materialize_tool_specs(expert="memory")
names = {str(x.name or "") for x in specs}
assert "memory_wiki_status" in names
assert "memory_wiki_get" in names
assert "memory_wiki_search" in names
assert "memory_wiki_lint" in names
assert "memory_wiki_apply" in names
assert all(not str(x).startswith("memory_curator_") for x in names)
def test_generalist_also_exposes_memory_wiki_tools() -> None:
specs = materialize_tool_specs(expert="generalist")
names = {str(x.name or "") for x in specs}
assert "memory_wiki_status" in names
assert "memory_wiki_get" in names
assert "memory_wiki_search" in names
assert "memory_wiki_lint" in names
assert "memory_wiki_apply" in names