refactor: isolate runtime contracts and enforce import boundaries (#6166)

* test: enforce Python import ownership boundaries

* test: protect client import boundaries and rehome shared UI contracts

* refactor: remove gateway and client dependency inversions

* fix: detect dynamic imports in conditional expressions

* refactor(tools): keep configuration contracts with their owners

* docs: keep design guidance focused on ownership and checks

* fix: preserve default threaded turn delivery
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-13 13:56:28 +08:00
1 parent cd2a863710
commit 328e933d36
162 files changed
+3449 -1888

No files matched your search

@@ -1,6 +1,8 @@
import importlib.util
import io
import json
import posixpath
import shlex
import tarfile
from pathlib import Path
@@ -37,3 +39,10 @@ def test_tui_source_archive_preserves_shared_module_import_path():
assert "nanobot-tui-source/packages/client-events/notifications.ts" in names
assert "nanobot-tui-source/tui/bun.lock" in names
assert "nanobot-tui-source/LICENSE" in names
package = archive.extractfile("nanobot-tui-source/tui/package.json")
assert package is not None
scripts = json.load(package)["scripts"]
for command in ("check:imports", "test:imports"):
entrypoint = next(arg for arg in shlex.split(scripts[command]) if arg.endswith(".mjs"))
archived_path = posixpath.normpath(f"nanobot-tui-source/tui/{entrypoint}")
assert archived_path in names