Open-source AI penetration testing tool to find and fix your app’s vulnerabilities.
Python agentsai-hackingai-penetration-testingai-pentestingai-securityartificial-intelligencebug-bountycode-qualityctf-toolscybersecuritycybersecurity-toolsethical-hackinghackingllm-securityoffensive-securitypenetration-testingpentesting-toolsred-teamingsecuritysecurity-automation
refactor: move strix/viewer under strix/interface
Ahmed Allamd1e8225d5f96
diff --git a/.gitignore b/.gitignoreindex 2e4e4e61..cc938c29 100644--- a/.gitignore+++ b/.gitignore@@ -1,8 +1,8 @@# Node / local-viewer SPA source (the built bundle in-# strix/viewer/static/ is committed and shipped; do not ignore it)+# strix/interface/viewer/static/ is committed and shipped; do not ignore it)node_modules/-strix/viewer/frontend/node_modules/-strix/viewer/frontend/.vite/+strix/interface/viewer/frontend/node_modules/+strix/interface/viewer/frontend/.vite/# Python__pycache__/diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 20cb009a..7c7498c3 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -102,16 +102,16 @@ We welcome feature ideas! Please:## 🖥️ Local viewer SPA`strix view` serves a prebuilt web UI whose source lives in-`strix/viewer/frontend/` (a Vite + React project) and whose built output is-committed to `strix/viewer/static/` and shipped in the package. End users never-run a JS build. If you change anything under `strix/viewer/frontend/`, rebuild+`strix/interface/viewer/frontend/` (a Vite + React project) and whose built output is+committed to `strix/interface/viewer/static/` and shipped in the package. End users never+run a JS build. If you change anything under `strix/interface/viewer/frontend/`, rebuildand commit the output:```bash-make viewer # or: cd strix/viewer/frontend && npm ci && npm run build+make viewer # or: cd strix/interface/viewer/frontend && npm ci && npm run build```-Commit both the source change and the regenerated `strix/viewer/static/`.+Commit both the source change and the regenerated `strix/interface/viewer/static/`.## 🤝 Communitydiff --git a/Makefile b/Makefileindex 656c0346..da240367 100644--- a/Makefile+++ b/Makefile@@ -69,8 +69,8 @@ clean:viewer:@echo "🖥️ Building the local-viewer SPA..."- cd strix/viewer/frontend && npm ci && npm run build- @echo "✅ Viewer built to strix/viewer/static/ (commit the changes)."+ cd strix/interface/viewer/frontend && npm ci && npm run build+ @echo "✅ Viewer built to strix/interface/viewer/static/ (commit the changes)."dev: format lint type-check@echo "✅ Development cycle complete!"diff --git a/pyproject.toml b/pyproject.tomlindex 2aae0541..6944dd28 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -79,10 +79,10 @@ build-backend = "hatchling.build"[tool.hatch.build.targets.wheel]packages = ["strix"]-# The prebuilt viewer bundle under strix/viewer/static/ ships automatically+# The prebuilt viewer bundle under strix/interface/viewer/static/ ships automatically# (hatchling includes non-.py files under the package). The Vite SOURCE lives-# under the package dir too (strix/viewer/frontend/) but must never ship in the wheel.-exclude = ["strix/viewer/frontend", "strix/viewer/frontend/**"]+# under the package dir too (strix/interface/viewer/frontend/) but must never ship in the wheel.+exclude = ["strix/interface/viewer/frontend", "strix/interface/viewer/frontend/**"]# ============================================================================# Type Checking Configuration@@ -222,10 +222,10 @@ ignore = ["tests/test_codex_streaming.py" = ["N802"]"tests/test_report_pdf.py" = ["S105", "S106"]# Stdlib HTTP handler overrides (do_GET/do_POST) and lazy imports that avoid a-# circular dependency with strix.telemetry / strix.viewer.report_pdf.-"strix/viewer/server.py" = ["N802", "PLC0415"]+# circular dependency with strix.telemetry / strix.interface.viewer.report_pdf.+"strix/interface/viewer/server.py" = ["N802", "PLC0415"]# Lazy telemetry import to avoid importing PostHog before the viewer starts.-"strix/viewer/cli.py" = ["PLC0415"]+"strix/interface/viewer/cli.py" = ["PLC0415"]# Lazy imports inside functions to avoid circular dependency with# strix.telemetry / strix.report.dedupe / cvss."strix/tools/notes/tools.py" = ["PLC0415", "TC002"]diff --git a/strix.spec b/strix.specindex 7c94cca6..19e39b37 100644--- a/strix.spec+++ b/strix.spec@@ -26,7 +26,7 @@ for tcss_file in strix_root.rglob('*.tcss'):datas.append((str(tcss_file), str(rel_path.parent)))# Prebuilt local-viewer SPA (served by `strix view`).-viewer_static = strix_root / 'viewer' / 'static'+viewer_static = strix_root / 'interface' / 'viewer' / 'static'for asset in viewer_static.rglob('*'):if asset.is_file():rel_path = asset.relative_to(project_root)@@ -158,12 +158,12 @@ hiddenimports = ['strix.report.dedupe','strix.report.state','strix.report.writer',- 'strix.viewer',- 'strix.viewer.auth',- 'strix.viewer.cli',- 'strix.viewer.report_pdf',- 'strix.viewer.server',- 'strix.viewer.transcript',+ 'strix.interface.viewer',+ 'strix.interface.viewer.auth',+ 'strix.interface.viewer.cli',+ 'strix.interface.viewer.report_pdf',+ 'strix.interface.viewer.server',+ 'strix.interface.viewer.transcript',# PDF report generation + encryption'reportlab',diff --git a/strix/interface/main.py b/strix/interface/main.pyindex 8ca10009..3a569717 100644--- a/strix/interface/main.py+++ b/strix/interface/main.py@@ -952,7 +952,7 @@ def main() -> None:# `strix view [<run>]` is a viewer-only subcommand, dispatched before the# scan argument parser (which requires a target) and before any scan setup.if len(sys.argv) > 1 and sys.argv[1] == "view":- from strix.viewer.cli import run_view+ from strix.interface.viewer.cli import run_viewrun_view(sys.argv[2:])returndiff --git a/strix/interface/tui/app.py b/strix/interface/tui/app.pyindex 21a45b9f..28d3ef08 100644--- a/strix/interface/tui/app.py+++ b/strix/interface/tui/app.py@@ -1862,7 +1862,7 @@ class StrixTUIApp(App): # type: ignore[misc]webbrowser.open(self._viewer_url)returntry:- from strix.viewer.server import authorized_url, bundle_is_built, serve+ from strix.interface.viewer.server import authorized_url, bundle_is_built, serveif not bundle_is_built():self._set_viewer_cta("[#eab308]Viewer UI not built[/]")diff --git a/strix/viewer/__init__.py b/strix/interface/viewer/__init__.pysimilarity index 84%rename from strix/viewer/__init__.pyrename to strix/interface/viewer/__init__.pyindex 5a0842a7..0e48bb28 100644--- a/strix/viewer/__init__.py+++ b/strix/interface/viewer/__init__.py@@ -6,7 +6,7 @@ directly from the run's on-disk files. No cloud dependency, no file picker.from __future__ import annotations-from strix.viewer.server import serve+from strix.interface.viewer.server import serve__all__ = ["serve"]diff --git a/strix/viewer/auth.py b/strix/interface/viewer/auth.pysimilarity index 98%rename from strix/viewer/auth.pyrename to strix/interface/viewer/auth.pyindex c25d12b6..a330ed25 100644--- a/strix/viewer/auth.py+++ b/strix/interface/viewer/auth.py@@ -4,7 +4,7 @@ The local viewer proxies email verification and encrypted-report delivery tothe Strix relay (``STRIX_APP_URL``). The browser never talks to the relaydirectly, and the report password generated locally is never sent to it.-State lives in ``~/.strix/viewer-auth.json`` (0600). ``is_verified`` is a local+State lives in ``~/.strix/interface/viewer-auth.json`` (0600). ``is_verified`` is a localflag that unlocks browsing the run history list; the relay still enforces tokenexpiry when a report is actually sent."""@@ -155,7 +155,7 @@ def _post_json(path: str, payload: dict[str, Any], *, timeout: int) -> tuple[intmethod="POST",)try:- with urllib.request.urlopen(request, timeout=timeout) as response: # noqa: S310+ with urllib.request.urlopen(request, timeout=timeout) as response: # noqa: S310 # nosec B310return response.status, _parse_body(response.read())except urllib.error.HTTPError as exc:return exc.code, _parse_body(exc.read())diff --git a/strix/viewer/cli.py b/strix/interface/viewer/cli.pysimilarity index 94%rename from strix/viewer/cli.pyrename to strix/interface/viewer/cli.pyindex 4a3f4d22..efef1efd 100644--- a/strix/viewer/cli.py+++ b/strix/interface/viewer/cli.py@@ -16,8 +16,8 @@ from strix.core.paths import (run_record_path,runs_base_dir,)-from strix.viewer.server import authorized_url, bundle_is_built, serve-from strix.viewer.transcript import read_run_summary+from strix.interface.viewer.server import authorized_url, bundle_is_built, serve+from strix.interface.viewer.transcript import read_run_summaryif TYPE_CHECKING:@@ -58,7 +58,7 @@ def run_view(argv: list[str]) -> None:if not bundle_is_built():console.print("[bold red]Viewer UI is not built.[/]\n"- "Build it with: [cyan]cd strix/viewer/frontend && npm ci && npm run build[/]"+ "Build it with: [cyan]cd strix/interface/viewer/frontend && npm ci && npm run build[/]")raise SystemExit(1)diff --git a/strix/viewer/frontend/index.html b/strix/interface/viewer/frontend/index.htmlsimilarity index 100%rename from strix/viewer/frontend/index.htmlrename to strix/interface/viewer/frontend/index.htmldiff --git a/strix/viewer/frontend/package-lock.json b/strix/interface/viewer/frontend/package-lock.jsonsimilarity index 100%rename from strix/viewer/frontend/package-lock.jsonrename to strix/interface/viewer/frontend/package-lock.jsondiff --git a/strix/viewer/frontend/package.json b/strix/interface/viewer/frontend/package.jsonsimilarity index 100%rename from strix/viewer/frontend/package.jsonrename to strix/interface/viewer/frontend/package.jsondiff --git a/strix/viewer/frontend/public/logo.png b/strix/interface/viewer/frontend/public/logo.pngsimilarity index 100%rename from strix/viewer/frontend/public/logo.pngrename to strix/interface/viewer/frontend/public/logo.pngdiff --git a/strix/viewer/frontend/src/App.tsx b/strix/interface/viewer/frontend/src/App.tsxsimilarity index 100%rename from strix/viewer/frontend/src/App.tsxrename to strix/interface/viewer/frontend/src/App.tsxdiff --git a/strix/viewer/frontend/src/components/AddRepositoryDialog.tsx b/strix/interface/viewer/frontend/src/components/AddRepositoryDialog.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/AddRepositoryDialog.tsxrename to strix/interface/viewer/frontend/src/components/AddRepositoryDialog.tsxdiff --git a/strix/viewer/frontend/src/components/EmailReportView.tsx b/strix/interface/viewer/frontend/src/components/EmailReportView.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/EmailReportView.tsxrename to strix/interface/viewer/frontend/src/components/EmailReportView.tsxdiff --git a/strix/viewer/frontend/src/components/EmailVerifyInline.tsx b/strix/interface/viewer/frontend/src/components/EmailVerifyInline.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/EmailVerifyInline.tsxrename to strix/interface/viewer/frontend/src/components/EmailVerifyInline.tsxdiff --git a/strix/viewer/frontend/src/components/FeedbackView.tsx b/strix/interface/viewer/frontend/src/components/FeedbackView.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/FeedbackView.tsxrename to strix/interface/viewer/frontend/src/components/FeedbackView.tsxdiff --git a/strix/viewer/frontend/src/components/IssueSeveritySummary.tsx b/strix/interface/viewer/frontend/src/components/IssueSeveritySummary.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/IssueSeveritySummary.tsxrename to strix/interface/viewer/frontend/src/components/IssueSeveritySummary.tsxdiff --git a/strix/viewer/frontend/src/components/PastRunsView.tsx b/strix/interface/viewer/frontend/src/components/PastRunsView.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/PastRunsView.tsxrename to strix/interface/viewer/frontend/src/components/PastRunsView.tsxdiff --git a/strix/viewer/frontend/src/components/ProCta.tsx b/strix/interface/viewer/frontend/src/components/ProCta.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/ProCta.tsxrename to strix/interface/viewer/frontend/src/components/ProCta.tsxdiff --git a/strix/viewer/frontend/src/components/RunDetails.tsx b/strix/interface/viewer/frontend/src/components/RunDetails.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/RunDetails.tsxrename to strix/interface/viewer/frontend/src/components/RunDetails.tsxdiff --git a/strix/viewer/frontend/src/components/Sidebar.tsx b/strix/interface/viewer/frontend/src/components/Sidebar.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/Sidebar.tsxrename to strix/interface/viewer/frontend/src/components/Sidebar.tsxdiff --git a/strix/viewer/frontend/src/components/TrustToast.tsx b/strix/interface/viewer/frontend/src/components/TrustToast.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/TrustToast.tsxrename to strix/interface/viewer/frontend/src/components/TrustToast.tsxdiff --git a/strix/viewer/frontend/src/components/UpgradeModal.tsx b/strix/interface/viewer/frontend/src/components/UpgradeModal.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/UpgradeModal.tsxrename to strix/interface/viewer/frontend/src/components/UpgradeModal.tsxdiff --git a/strix/viewer/frontend/src/components/live/AgentDetailModal.tsx b/strix/interface/viewer/frontend/src/components/live/AgentDetailModal.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/live/AgentDetailModal.tsxrename to strix/interface/viewer/frontend/src/components/live/AgentDetailModal.tsxdiff --git a/strix/viewer/frontend/src/components/live/AgentGraph.tsx b/strix/interface/viewer/frontend/src/components/live/AgentGraph.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/live/AgentGraph.tsxrename to strix/interface/viewer/frontend/src/components/live/AgentGraph.tsxdiff --git a/strix/viewer/frontend/src/components/live/AgentNode.tsx b/strix/interface/viewer/frontend/src/components/live/AgentNode.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/live/AgentNode.tsxrename to strix/interface/viewer/frontend/src/components/live/AgentNode.tsxdiff --git a/strix/viewer/frontend/src/components/live/AgentTranscript.tsx b/strix/interface/viewer/frontend/src/components/live/AgentTranscript.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/live/AgentTranscript.tsxrename to strix/interface/viewer/frontend/src/components/live/AgentTranscript.tsxdiff --git a/strix/viewer/frontend/src/components/live/GraphSkeleton.tsx b/strix/interface/viewer/frontend/src/components/live/GraphSkeleton.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/live/GraphSkeleton.tsxrename to strix/interface/viewer/frontend/src/components/live/GraphSkeleton.tsxdiff --git a/strix/viewer/frontend/src/components/live/ScanPromptComposer.tsx b/strix/interface/viewer/frontend/src/components/live/ScanPromptComposer.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/live/ScanPromptComposer.tsxrename to strix/interface/viewer/frontend/src/components/live/ScanPromptComposer.tsxdiff --git a/strix/viewer/frontend/src/components/live/tool-renderers/AgentCommsRenderer.tsx b/strix/interface/viewer/frontend/src/components/live/tool-renderers/AgentCommsRenderer.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/live/tool-renderers/AgentCommsRenderer.tsxrename to strix/interface/viewer/frontend/src/components/live/tool-renderers/AgentCommsRenderer.tsxdiff --git a/strix/viewer/frontend/src/components/live/tool-renderers/ApplyPatchRenderer.tsx b/strix/interface/viewer/frontend/src/components/live/tool-renderers/ApplyPatchRenderer.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/live/tool-renderers/ApplyPatchRenderer.tsxrename to strix/interface/viewer/frontend/src/components/live/tool-renderers/ApplyPatchRenderer.tsxdiff --git a/strix/viewer/frontend/src/components/live/tool-renderers/BrowserRenderer.tsx b/strix/interface/viewer/frontend/src/components/live/tool-renderers/BrowserRenderer.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/live/tool-renderers/BrowserRenderer.tsxrename to strix/interface/viewer/frontend/src/components/live/tool-renderers/BrowserRenderer.tsxdiff --git a/strix/viewer/frontend/src/components/live/tool-renderers/ChatBubble.tsx b/strix/interface/viewer/frontend/src/components/live/tool-renderers/ChatBubble.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/live/tool-renderers/ChatBubble.tsxrename to strix/interface/viewer/frontend/src/components/live/tool-renderers/ChatBubble.tsxdiff --git a/strix/viewer/frontend/src/components/live/tool-renderers/FallbackRenderer.tsx b/strix/interface/viewer/frontend/src/components/live/tool-renderers/FallbackRenderer.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/live/tool-renderers/FallbackRenderer.tsxrename to strix/interface/viewer/frontend/src/components/live/tool-renderers/FallbackRenderer.tsxdiff --git a/strix/viewer/frontend/src/components/live/tool-renderers/FileEditRenderer.tsx b/strix/interface/viewer/frontend/src/components/live/tool-renderers/FileEditRenderer.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/live/tool-renderers/FileEditRenderer.tsxrename to strix/interface/viewer/frontend/src/components/live/tool-renderers/FileEditRenderer.tsxdiff --git a/strix/viewer/frontend/src/components/live/tool-renderers/FinishRenderer.tsx b/strix/interface/viewer/frontend/src/components/live/tool-renderers/FinishRenderer.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/live/tool-renderers/FinishRenderer.tsxrename to strix/interface/viewer/frontend/src/components/live/tool-renderers/FinishRenderer.tsxdiff --git a/strix/viewer/frontend/src/components/live/tool-renderers/LoadSkillRenderer.tsx b/strix/interface/viewer/frontend/src/components/live/tool-renderers/LoadSkillRenderer.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/live/tool-renderers/LoadSkillRenderer.tsxrename to strix/interface/viewer/frontend/src/components/live/tool-renderers/LoadSkillRenderer.tsxdiff --git a/strix/viewer/frontend/src/components/live/tool-renderers/Markdown.tsx b/strix/interface/viewer/frontend/src/components/live/tool-renderers/Markdown.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/live/tool-renderers/Markdown.tsxrename to strix/interface/viewer/frontend/src/components/live/tool-renderers/Markdown.tsxdiff --git a/strix/viewer/frontend/src/components/live/tool-renderers/NotesRenderer.tsx b/strix/interface/viewer/frontend/src/components/live/tool-renderers/NotesRenderer.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/live/tool-renderers/NotesRenderer.tsxrename to strix/interface/viewer/frontend/src/components/live/tool-renderers/NotesRenderer.tsxdiff --git a/strix/viewer/frontend/src/components/live/tool-renderers/ProxyRenderer.tsx b/strix/interface/viewer/frontend/src/components/live/tool-renderers/ProxyRenderer.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/live/tool-renderers/ProxyRenderer.tsxrename to strix/interface/viewer/frontend/src/components/live/tool-renderers/ProxyRenderer.tsxdiff --git a/strix/viewer/frontend/src/components/live/tool-renderers/PythonRenderer.tsx b/strix/interface/viewer/frontend/src/components/live/tool-renderers/PythonRenderer.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/live/tool-renderers/PythonRenderer.tsxrename to strix/interface/viewer/frontend/src/components/live/tool-renderers/PythonRenderer.tsxdiff --git a/strix/viewer/frontend/src/components/live/tool-renderers/ScanInfoRenderer.tsx b/strix/interface/viewer/frontend/src/components/live/tool-renderers/ScanInfoRenderer.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/live/tool-renderers/ScanInfoRenderer.tsxrename to strix/interface/viewer/frontend/src/components/live/tool-renderers/ScanInfoRenderer.tsxdiff --git a/strix/viewer/frontend/src/components/live/tool-renderers/TerminalRenderer.tsx b/strix/interface/viewer/frontend/src/components/live/tool-renderers/TerminalRenderer.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/live/tool-renderers/TerminalRenderer.tsxrename to strix/interface/viewer/frontend/src/components/live/tool-renderers/TerminalRenderer.tsxdiff --git a/strix/viewer/frontend/src/components/live/tool-renderers/ThinkRenderer.tsx b/strix/interface/viewer/frontend/src/components/live/tool-renderers/ThinkRenderer.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/live/tool-renderers/ThinkRenderer.tsxrename to strix/interface/viewer/frontend/src/components/live/tool-renderers/ThinkRenderer.tsxdiff --git a/strix/viewer/frontend/src/components/live/tool-renderers/TodoRenderer.tsx b/strix/interface/viewer/frontend/src/components/live/tool-renderers/TodoRenderer.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/live/tool-renderers/TodoRenderer.tsxrename to strix/interface/viewer/frontend/src/components/live/tool-renderers/TodoRenderer.tsxdiff --git a/strix/viewer/frontend/src/components/live/tool-renderers/ToolCard.tsx b/strix/interface/viewer/frontend/src/components/live/tool-renderers/ToolCard.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/live/tool-renderers/ToolCard.tsxrename to strix/interface/viewer/frontend/src/components/live/tool-renderers/ToolCard.tsxdiff --git a/strix/viewer/frontend/src/components/live/tool-renderers/ViewImageRenderer.tsx b/strix/interface/viewer/frontend/src/components/live/tool-renderers/ViewImageRenderer.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/live/tool-renderers/ViewImageRenderer.tsxrename to strix/interface/viewer/frontend/src/components/live/tool-renderers/ViewImageRenderer.tsxdiff --git a/strix/viewer/frontend/src/components/live/tool-renderers/VulnReportRenderer.tsx b/strix/interface/viewer/frontend/src/components/live/tool-renderers/VulnReportRenderer.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/live/tool-renderers/VulnReportRenderer.tsxrename to strix/interface/viewer/frontend/src/components/live/tool-renderers/VulnReportRenderer.tsxdiff --git a/strix/viewer/frontend/src/components/live/tool-renderers/WebSearchRenderer.tsx b/strix/interface/viewer/frontend/src/components/live/tool-renderers/WebSearchRenderer.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/live/tool-renderers/WebSearchRenderer.tsxrename to strix/interface/viewer/frontend/src/components/live/tool-renderers/WebSearchRenderer.tsxdiff --git a/strix/viewer/frontend/src/components/live/tool-renderers/index.ts b/strix/interface/viewer/frontend/src/components/live/tool-renderers/index.tssimilarity index 100%rename from strix/viewer/frontend/src/components/live/tool-renderers/index.tsrename to strix/interface/viewer/frontend/src/components/live/tool-renderers/index.tsdiff --git a/strix/viewer/frontend/src/components/live/tool-renderers/utils.ts b/strix/interface/viewer/frontend/src/components/live/tool-renderers/utils.tssimilarity index 100%rename from strix/viewer/frontend/src/components/live/tool-renderers/utils.tsrename to strix/interface/viewer/frontend/src/components/live/tool-renderers/utils.tsdiff --git a/strix/viewer/frontend/src/components/vulnerability/CodeDiffBlock.tsx b/strix/interface/viewer/frontend/src/components/vulnerability/CodeDiffBlock.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/vulnerability/CodeDiffBlock.tsxrename to strix/interface/viewer/frontend/src/components/vulnerability/CodeDiffBlock.tsxdiff --git a/strix/viewer/frontend/src/components/vulnerability/ContentSection.tsx b/strix/interface/viewer/frontend/src/components/vulnerability/ContentSection.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/vulnerability/ContentSection.tsxrename to strix/interface/viewer/frontend/src/components/vulnerability/ContentSection.tsxdiff --git a/strix/viewer/frontend/src/components/vulnerability/IssueSidebar.tsx b/strix/interface/viewer/frontend/src/components/vulnerability/IssueSidebar.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/vulnerability/IssueSidebar.tsxrename to strix/interface/viewer/frontend/src/components/vulnerability/IssueSidebar.tsxdiff --git a/strix/viewer/frontend/src/components/vulnerability/MdCodeBlock.tsx b/strix/interface/viewer/frontend/src/components/vulnerability/MdCodeBlock.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/vulnerability/MdCodeBlock.tsxrename to strix/interface/viewer/frontend/src/components/vulnerability/MdCodeBlock.tsxdiff --git a/strix/viewer/frontend/src/components/vulnerability/PocBlock.tsx b/strix/interface/viewer/frontend/src/components/vulnerability/PocBlock.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/vulnerability/PocBlock.tsxrename to strix/interface/viewer/frontend/src/components/vulnerability/PocBlock.tsxdiff --git a/strix/viewer/frontend/src/components/vulnerability/VulnerabilityDetail.tsx b/strix/interface/viewer/frontend/src/components/vulnerability/VulnerabilityDetail.tsxsimilarity index 100%rename from strix/viewer/frontend/src/components/vulnerability/VulnerabilityDetail.tsxrename to strix/interface/viewer/frontend/src/components/vulnerability/VulnerabilityDetail.tsxdiff --git a/strix/viewer/frontend/src/data/serverSource.ts b/strix/interface/viewer/frontend/src/data/serverSource.tssimilarity index 100%rename from strix/viewer/frontend/src/data/serverSource.tsrename to strix/interface/viewer/frontend/src/data/serverSource.tsdiff --git a/strix/viewer/frontend/src/index.css b/strix/interface/viewer/frontend/src/index.csssimilarity index 100%rename from strix/viewer/frontend/src/index.cssrename to strix/interface/viewer/frontend/src/index.cssdiff --git a/strix/viewer/frontend/src/lib/cta.ts b/strix/interface/viewer/frontend/src/lib/cta.tssimilarity index 100%rename from strix/viewer/frontend/src/lib/cta.tsrename to strix/interface/viewer/frontend/src/lib/cta.tsdiff --git a/strix/viewer/frontend/src/lib/display-number.ts b/strix/interface/viewer/frontend/src/lib/display-number.tssimilarity index 100%rename from strix/viewer/frontend/src/lib/display-number.tsrename to strix/interface/viewer/frontend/src/lib/display-number.tsdiff --git a/strix/viewer/frontend/src/lib/fenced-code.ts b/strix/interface/viewer/frontend/src/lib/fenced-code.tssimilarity index 100%rename from strix/viewer/frontend/src/lib/fenced-code.tsrename to strix/interface/viewer/frontend/src/lib/fenced-code.tsdiff --git a/strix/viewer/frontend/src/lib/hljs.ts b/strix/interface/viewer/frontend/src/lib/hljs.tssimilarity index 100%rename from strix/viewer/frontend/src/lib/hljs.tsrename to strix/interface/viewer/frontend/src/lib/hljs.tsdiff --git a/strix/viewer/frontend/src/lib/local-run-parser.ts b/strix/interface/viewer/frontend/src/lib/local-run-parser.tssimilarity index 100%rename from strix/viewer/frontend/src/lib/local-run-parser.tsrename to strix/interface/viewer/frontend/src/lib/local-run-parser.tsdiff --git a/strix/viewer/frontend/src/lib/target-utils.ts b/strix/interface/viewer/frontend/src/lib/target-utils.tssimilarity index 100%rename from strix/viewer/frontend/src/lib/target-utils.tsrename to strix/interface/viewer/frontend/src/lib/target-utils.tsdiff --git a/strix/viewer/frontend/src/lib/utils.ts b/strix/interface/viewer/frontend/src/lib/utils.tssimilarity index 100%rename from strix/viewer/frontend/src/lib/utils.tsrename to strix/interface/viewer/frontend/src/lib/utils.tsdiff --git a/strix/viewer/frontend/src/lib/vulnerability-utils.ts b/strix/interface/viewer/frontend/src/lib/vulnerability-utils.tssimilarity index 100%rename from strix/viewer/frontend/src/lib/vulnerability-utils.tsrename to strix/interface/viewer/frontend/src/lib/vulnerability-utils.tsdiff --git a/strix/viewer/frontend/src/main.tsx b/strix/interface/viewer/frontend/src/main.tsxsimilarity index 100%rename from strix/viewer/frontend/src/main.tsxrename to strix/interface/viewer/frontend/src/main.tsxdiff --git a/strix/viewer/frontend/src/stores/auth.ts b/strix/interface/viewer/frontend/src/stores/auth.tssimilarity index 100%rename from strix/viewer/frontend/src/stores/auth.tsrename to strix/interface/viewer/frontend/src/stores/auth.tsdiff --git a/strix/viewer/frontend/src/types/events.ts b/strix/interface/viewer/frontend/src/types/events.tssimilarity index 100%rename from strix/viewer/frontend/src/types/events.tsrename to strix/interface/viewer/frontend/src/types/events.tsdiff --git a/strix/viewer/frontend/src/types/issues.ts b/strix/interface/viewer/frontend/src/types/issues.tssimilarity index 100%rename from strix/viewer/frontend/src/types/issues.tsrename to strix/interface/viewer/frontend/src/types/issues.tsdiff --git a/strix/viewer/frontend/tsconfig.json b/strix/interface/viewer/frontend/tsconfig.jsonsimilarity index 100%rename from strix/viewer/frontend/tsconfig.jsonrename to strix/interface/viewer/frontend/tsconfig.jsondiff --git a/strix/viewer/frontend/vite.config.ts b/strix/interface/viewer/frontend/vite.config.tssimilarity index 87%rename from strix/viewer/frontend/vite.config.tsrename to strix/interface/viewer/frontend/vite.config.tsindex 696fbb84..a7704a8f 100644--- a/strix/viewer/frontend/vite.config.ts+++ b/strix/interface/viewer/frontend/vite.config.ts@@ -5,7 +5,7 @@ import { fileURLToPath, URL } from "node:url";// The viewer is served as static files by a stdlib Python server on an// arbitrary ephemeral port, so all asset URLs must be relative (base: "./").-// The build output is committed at strix/viewer/static and shipped.+// The build output is committed at strix/interface/viewer/static and shipped.export default defineConfig({base: "./",plugins: [react(), tailwindcss()],diff --git a/strix/viewer/report_pdf.py b/strix/interface/viewer/report_pdf.pysimilarity index 99%rename from strix/viewer/report_pdf.pyrename to strix/interface/viewer/report_pdf.pyindex c3b011c9..951fb668 100644--- a/strix/viewer/report_pdf.py+++ b/strix/interface/viewer/report_pdf.py@@ -38,7 +38,7 @@ from reportlab.platypus import (TableStyle,)-from strix.viewer.transcript import (+from strix.interface.viewer.transcript import (primary_target,read_run_summary,read_vulnerabilities,diff --git a/strix/viewer/server.py b/strix/interface/viewer/server.pysimilarity index 99%rename from strix/viewer/server.pyrename to strix/interface/viewer/server.pyindex 77cee58d..1b5d0e9d 100644--- a/strix/viewer/server.py+++ b/strix/interface/viewer/server.py@@ -27,8 +27,8 @@ from typing import TYPE_CHECKING, Anyfrom urllib.parse import parse_qs, unquote, urlencode, urlsplitfrom strix.core.paths import run_record_path-from strix.viewer import auth-from strix.viewer.transcript import (+from strix.interface.viewer import auth+from strix.interface.viewer.transcript import (build_run_state,primary_target,read_report_markdown,@@ -367,7 +367,7 @@ def _make_handler(state: _ViewerState) -> type[BaseHTTPRequestHandler]:self._send_json(HTTPStatus.CONFLICT, {"error": "run_not_finished"})return- from strix.viewer.report_pdf import build_encrypted_report+ from strix.interface.viewer.report_pdf import build_encrypted_reportpdf_bytes, password, filename = build_encrypted_report(run_dir)run_name = str(summary.get("run_name") or run_dir.name)diff --git a/strix/viewer/static/assets/index-Dd1cyttN.js b/strix/interface/viewer/static/assets/index-Dd1cyttN.jssimilarity index 100%rename from strix/viewer/static/assets/index-Dd1cyttN.jsrename to strix/interface/viewer/static/assets/index-Dd1cyttN.jsdiff --git a/strix/viewer/static/assets/index-vV8wxCG6.css b/strix/interface/viewer/static/assets/index-vV8wxCG6.csssimilarity index 100%rename from strix/viewer/static/assets/index-vV8wxCG6.cssrename to strix/interface/viewer/static/assets/index-vV8wxCG6.cssdiff --git a/strix/viewer/static/index.html b/strix/interface/viewer/static/index.htmlsimilarity index 100%rename from strix/viewer/static/index.htmlrename to strix/interface/viewer/static/index.htmldiff --git a/strix/viewer/static/logo.png b/strix/interface/viewer/static/logo.pngsimilarity index 100%rename from strix/viewer/static/logo.pngrename to strix/interface/viewer/static/logo.pngdiff --git a/strix/viewer/transcript.py b/strix/interface/viewer/transcript.pysimilarity index 95%rename from strix/viewer/transcript.pyrename to strix/interface/viewer/transcript.pyindex 3f287168..0011315c 100644--- a/strix/viewer/transcript.py+++ b/strix/interface/viewer/transcript.py@@ -44,8 +44,8 @@ def build_run_state(run_dir: Path) -> dict[str, Any]:Reuses the Textual-free ``TuiLiveView`` projection so the viewer and the TUIshare one parser for ``agents.json`` + ``agents.db`` and never drift."""- # Imported lazily so importing strix.viewer does not eagerly pull the TUI.- from strix.interface.tui.live_view import TuiLiveView # noqa: PLC0415+ # Imported lazily so importing strix.interface.viewer does not eagerly pull the TUI.+ from strix.interface.tui.live_view import TuiLiveViewview = TuiLiveView()view.hydrate_from_run_dir(run_dir)diff --git a/tests/test_fenced_code.py b/tests/test_fenced_code.pyindex bef2b8ae..be3b473c 100644--- a/tests/test_fenced_code.py+++ b/tests/test_fenced_code.py@@ -4,13 +4,13 @@ from __future__ import annotationsfrom pygments.lexers import BashLexer, PythonLexer+from strix.interface.viewer.report_pdf import _strip_code_fencefrom strix.report.writer import (guess_language_name,parse_fenced_code,resolve_lexer,safe_fence,)-from strix.viewer.report_pdf import _strip_code_fencedef test_parse_fenced_code_extracts_language_and_body() -> None:diff --git a/tests/test_report_pdf.py b/tests/test_report_pdf.pyindex dc76ecef..305ad33f 100644--- a/tests/test_report_pdf.py+++ b/tests/test_report_pdf.py@@ -10,7 +10,7 @@ import pytestfrom pypdf import PdfReaderfrom pypdf.errors import WrongPasswordError-from strix.viewer.report_pdf import (+from strix.interface.viewer.report_pdf import (build_encrypted_report,encrypt_pdf,generate_password,@@ -91,7 +91,7 @@ def test_wrong_password_is_rejected(tmp_path: Path) -> None:run_dir = _make_run(tmp_path)encrypted = encrypt_pdf(generate_report_pdf(run_dir), "correct-horse-battery")with pytest.raises(WrongPasswordError):- PdfReader(BytesIO(encrypted), password="not-the-password")+ PdfReader(BytesIO(encrypted), password="not-the-password") # nosec B106def test_build_encrypted_report(tmp_path: Path) -> None:diff --git a/tests/test_viewer.py b/tests/test_viewer.pyindex 00fec4f1..faa306f6 100644--- a/tests/test_viewer.py+++ b/tests/test_viewer.py@@ -1,4 +1,4 @@-"""Tests for the local run viewer (strix.viewer) and its path helpers."""+"""Tests for the local run viewer (strix.interface.viewer) and its path helpers."""from __future__ import annotations@@ -9,8 +9,8 @@ import urllib.requestfrom typing import TYPE_CHECKINGfrom strix.core.paths import latest_run_dir, runs_base_dir-from strix.viewer.server import serve-from strix.viewer.transcript import (+from strix.interface.viewer.server import serve+from strix.interface.viewer.transcript import (build_run_state,read_report_markdown,read_run_summary,@@ -89,7 +89,7 @@ def test_build_run_state_from_agents_json(tmp_path: Path) -> None:def _get(url: str, *, cookie: str | None = None) -> tuple[int, str, bytes]:headers = {"Cookie": cookie} if cookie else {}req = urllib.request.Request(url, headers=headers) # noqa: S310 - localhost test server- with urllib.request.urlopen(req) as resp: # noqa: S310 - localhost test server+ with urllib.request.urlopen(req) as resp: # noqa: S310 - localhost test server # nosec B310return resp.status, resp.headers.get("Content-Type", ""), resp.read()@@ -100,7 +100,7 @@ def test_server_serves_api_and_static(tmp_path: Path, monkeypatch: pytest.Monkey(assets / "assets").mkdir(parents=True)(assets / "index.html").write_text("<!doctype html><div id=root></div>", encoding="utf-8")(assets / "assets" / "app.js").write_text("console.log(1)", encoding="utf-8")- monkeypatch.setattr("strix.viewer.server.bundle_dir", lambda: assets)+ monkeypatch.setattr("strix.interface.viewer.server.bundle_dir", lambda: assets)httpd, url, _ = serve(run_dir, open_browser=False)try:@@ -132,7 +132,7 @@ def test_server_event_endpoint_forwards_cta(assets = tmp_path / "bundle"assets.mkdir()(assets / "index.html").write_text("x", encoding="utf-8")- monkeypatch.setattr("strix.viewer.server.bundle_dir", lambda: assets)+ monkeypatch.setattr("strix.interface.viewer.server.bundle_dir", lambda: assets)seen: list[tuple[str, str | None]] = []monkeypatch.setattr(@@ -148,7 +148,7 @@ def test_server_event_endpoint_forwards_cta(req = urllib.request.Request( # noqa: S310 - localhost test serverf"{url}/api/event", data=body, headers={"Content-Type": "application/json"})- with urllib.request.urlopen(req) as resp: # noqa: S310+ with urllib.request.urlopen(req) as resp: # noqa: S310 # nosec B310assert resp.status == 204assert seen == [("PR reviews", "sidebar_nav")]finally:@@ -163,7 +163,7 @@ def test_server_event_endpoint_forwards_email_funnel(assets = tmp_path / "bundle"assets.mkdir()(assets / "index.html").write_text("x", encoding="utf-8")- monkeypatch.setattr("strix.viewer.server.bundle_dir", lambda: assets)+ monkeypatch.setattr("strix.interface.viewer.server.bundle_dir", lambda: assets)seen: list[tuple[str, str | None]] = []monkeypatch.setattr(@@ -183,7 +183,7 @@ def test_server_event_endpoint_forwards_email_funnel(data=json.dumps(payload).encode(),headers={"Content-Type": "application/json"},)- with urllib.request.urlopen(req) as resp: # noqa: S310+ with urllib.request.urlopen(req) as resp: # noqa: S310 # nosec B310assert resp.status == 204assert seen == expectedfinally:@@ -207,7 +207,7 @@ def test_server_event_endpoint_forwards_agent_steered(data=json.dumps({"event": "agent_steered"}).encode(),headers={"Content-Type": "application/json"},)- with urllib.request.urlopen(req) as resp: # noqa: S310+ with urllib.request.urlopen(req) as resp: # noqa: S310 # nosec B310assert resp.status == 204assert seen == [True]finally:@@ -222,7 +222,7 @@ def test_feedback_records_telemetry_on_success(_bundle(tmp_path, monkeypatch)sent: list[bool] = []- monkeypatch.setattr("strix.viewer.auth.feedback_submit", lambda *_a: None)+ monkeypatch.setattr("strix.interface.viewer.auth.feedback_submit", lambda *_a: None)monkeypatch.setattr("strix.telemetry.posthog.viewer_feedback_submitted", lambda: sent.append(True))@@ -257,7 +257,7 @@ def _post(url + path, data=json.dumps(payload).encode(), headers=headers, method="POST")try:- with urllib.request.urlopen(req) as resp: # noqa: S310+ with urllib.request.urlopen(req) as resp: # noqa: S310 # nosec B310return resp.status, resp.read()except urllib.error.HTTPError as exc:return exc.code, exc.read()@@ -266,7 +266,7 @@ def _post(def _session_cookie(url: str, token: str) -> str:"""Bootstrap a session via the tokened URL and return its ``name=value`` cookie."""bootstrap = f"{url}/?token={token}"- with urllib.request.urlopen(bootstrap) as resp: # noqa: S310 - localhost test server+ with urllib.request.urlopen(bootstrap) as resp: # noqa: S310 - localhost test server # nosec B310raw = str(resp.headers.get("Set-Cookie", ""))return raw.split(";", 1)[0]@@ -275,7 +275,7 @@ def _get_status(url: str, *, cookie: str | None = None) -> int:headers = {"Cookie": cookie} if cookie else {}req = urllib.request.Request(url, headers=headers) # noqa: S310 - localhost test servertry:- with urllib.request.urlopen(req) as resp: # noqa: S310+ with urllib.request.urlopen(req) as resp: # noqa: S310 # nosec B310return int(resp.status)except urllib.error.HTTPError as exc:return int(exc.code)@@ -285,7 +285,7 @@ def _bundle(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:assets = tmp_path / "bundle"assets.mkdir()(assets / "index.html").write_text("<!doctype html><div id=root></div>", encoding="utf-8")- monkeypatch.setattr("strix.viewer.server.bundle_dir", lambda: assets)+ monkeypatch.setattr("strix.interface.viewer.server.bundle_dir", lambda: assets)def test_capability_issued_only_for_tokened_bootstrap(@@ -296,26 +296,26 @@ def test_capability_issued_only_for_tokened_bootstrap((assets / "assets").mkdir(parents=True)(assets / "index.html").write_text("<!doctype html>index", encoding="utf-8")(assets / "assets" / "app.js").write_text("1", encoding="utf-8")- monkeypatch.setattr("strix.viewer.server.bundle_dir", lambda: assets)+ monkeypatch.setattr("strix.interface.viewer.server.bundle_dir", lambda: assets)httpd, url, token = serve(run_dir, open_browser=False)try:# A bare index load -- all a reachable client can do -- hands out nothing.- with urllib.request.urlopen(url + "/") as resp: # noqa: S310+ with urllib.request.urlopen(url + "/") as resp: # noqa: S310 # nosec B310assert resp.headers.get("Set-Cookie") is None# A wrong token is likewise refused the capability.- with urllib.request.urlopen(f"{url}/?token=wrong") as resp: # noqa: S310+ with urllib.request.urlopen(f"{url}/?token=wrong") as resp: # noqa: S310 # nosec B310assert resp.headers.get("Set-Cookie") is None# Only the correct bootstrap token mints the session cookie.- with urllib.request.urlopen(f"{url}/?token={token}") as resp: # noqa: S310+ with urllib.request.urlopen(f"{url}/?token={token}") as resp: # noqa: S310 # nosec B310cookie = str(resp.headers.get("Set-Cookie", ""))assert "strix_viewer_session=" in cookieassert "HttpOnly" in cookie and "SameSite=Strict" in cookie# Static assets never carry it.- with urllib.request.urlopen(url + "/assets/app.js") as resp: # noqa: S310+ with urllib.request.urlopen(url + "/assets/app.js") as resp: # noqa: S310 # nosec B310assert resp.headers.get("Set-Cookie") is Nonefinally:httpd.shutdown()@@ -338,7 +338,7 @@ def test_unauthorized_client_cannot_acquire_capability(try:# A direct network client can reach the page but is handed no capability,# so replaying an empty/guessed cookie cannot steer a live scan.- with urllib.request.urlopen(url + "/") as resp: # noqa: S310+ with urllib.request.urlopen(url + "/") as resp: # noqa: S310 # nosec B310assert resp.headers.get("Set-Cookie") is Nonestatus, _ = _post(url,@@ -356,9 +356,11 @@ def test_unauthorized_client_cannot_acquire_capability(def test_auth_status_reflects_expiry(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:run_dir = _make_run(tmp_path, "status", status="running", end_time=None)_bundle(tmp_path, monkeypatch)- monkeypatch.setattr("strix.viewer.auth.read_auth", lambda: {"email": "[email protected]", "token": "t"})+ monkeypatch.setattr(+ "strix.interface.viewer.auth.read_auth", lambda: {"email": "[email protected]", "token": "t"}+ )verified = {"value": True}- monkeypatch.setattr("strix.viewer.auth.is_verified", lambda: verified["value"])+ monkeypatch.setattr("strix.interface.viewer.auth.is_verified", lambda: verified["value"])httpd, url, token = serve(run_dir, open_browser=False)try:@@ -384,7 +386,7 @@ def test_auth_mutations_require_session(tmp_path: Path, monkeypatch: pytest.Monkrun_dir = _make_run(tmp_path, "authmut", status="running", end_time=None)_bundle(tmp_path, monkeypatch)forgotten = {"value": False}- monkeypatch.setattr("strix.viewer.auth.forget", lambda: forgotten.update(value=True))+ monkeypatch.setattr("strix.interface.viewer.auth.forget", lambda: forgotten.update(value=True))httpd, url, _ = serve(run_dir, open_browser=False)try:@@ -432,7 +434,9 @@ def test_report_send_requires_session_cookie(_bundle(tmp_path, monkeypatch)# A verified machine token exists, but that alone must not authorize a caller.- monkeypatch.setattr("strix.viewer.auth.read_auth", lambda: {"email": "[email protected]", "token": "t"})+ monkeypatch.setattr(+ "strix.interface.viewer.auth.read_auth", lambda: {"email": "[email protected]", "token": "t"}+ )httpd, url, token = serve(run_dir, open_browser=False)try:@@ -456,7 +460,9 @@ def test_report_send_rejects_live_run(tmp_path: Path, monkeypatch: pytest.Monkey# fail closed even for a verified, session-holding caller.run_dir = _make_run(tmp_path, "live", status="running", end_time=None)_bundle(tmp_path, monkeypatch)- monkeypatch.setattr("strix.viewer.auth.read_auth", lambda: {"email": "[email protected]", "token": "t"})+ monkeypatch.setattr(+ "strix.interface.viewer.auth.read_auth", lambda: {"email": "[email protected]", "token": "t"}+ )httpd, url, token = serve(run_dir, open_browser=False)try:@@ -475,7 +481,7 @@ def test_historical_run_data_requires_verification(_bundle(tmp_path, monkeypatch)verified = {"value": False}- monkeypatch.setattr("strix.viewer.auth.is_verified", lambda: verified["value"])+ monkeypatch.setattr("strix.interface.viewer.auth.is_verified", lambda: verified["value"])httpd, url, token = serve(launched, open_browser=False)try:@@ -509,12 +515,12 @@ def test_runs_list_requires_session_and_verification(_make_run(tmp_path, "other", status="completed", end_time="2026-01-01T00:00:00Z")_bundle(tmp_path, monkeypatch)- monkeypatch.setattr("strix.viewer.auth.is_verified", lambda: True)+ monkeypatch.setattr("strix.interface.viewer.auth.is_verified", lambda: True)def _runs(cookie: str | None) -> dict[str, object]:headers = {"Cookie": cookie} if cookie else {}req = urllib.request.Request(f"{url}/api/runs", headers=headers) # noqa: S310- with urllib.request.urlopen(req) as resp: # noqa: S310 - localhost test server+ with urllib.request.urlopen(req) as resp: # noqa: S310 - localhost test server # nosec B310return dict(json.loads(resp.read()))httpd, url, token = serve(launched, open_browser=False)@@ -543,7 +549,7 @@ def test_server_rejects_path_traversal(tmp_path: Path, monkeypatch: pytest.Monkeassets = tmp_path / "bundle"assets.mkdir()(assets / "index.html").write_text("<!doctype html>index", encoding="utf-8")- monkeypatch.setattr("strix.viewer.server.bundle_dir", lambda: assets)+ monkeypatch.setattr("strix.interface.viewer.server.bundle_dir", lambda: assets)httpd, url, _ = serve(run_dir, open_browser=False)try:diff --git a/tests/test_viewer_auth.py b/tests/test_viewer_auth.pyindex 049f80a2..662f84f1 100644--- a/tests/test_viewer_auth.py+++ b/tests/test_viewer_auth.py@@ -8,7 +8,7 @@ from typing import TYPE_CHECKING, Anyimport pytest-from strix.viewer import auth+from strix.interface.viewer import authdef _iso(delta: timedelta) -> str:@@ -30,7 +30,7 @@ def test_write_read_forget_roundtrip() -> None:assert auth.read_auth() is Noneassert auth.is_verified() is False- auth.write_auth(email="[email protected]", token="tok-123", verified_at=_iso(timedelta(days=30)))+ auth.write_auth(email="[email protected]", token="tok-123", verified_at=_iso(timedelta(days=30))) # nosec B106record = auth.read_auth()assert record is not None@@ -47,23 +47,23 @@ def test_write_read_forget_roundtrip() -> None:def test_is_verified_enforces_expiry() -> None:# An expired record still reads back, but no longer unlocks history.- auth.write_auth(email="[email protected]", token="t", verified_at=_iso(timedelta(hours=-1)))+ auth.write_auth(email="[email protected]", token="t", verified_at=_iso(timedelta(hours=-1))) # nosec B106assert auth.read_auth() is not Noneassert auth.is_verified() is False# A future expiry unlocks it.- auth.write_auth(email="[email protected]", token="t", verified_at=_iso(timedelta(hours=1)))+ auth.write_auth(email="[email protected]", token="t", verified_at=_iso(timedelta(hours=1))) # nosec B106assert auth.is_verified() is Truedef test_is_verified_fails_closed_when_expiry_absent_or_unparseable() -> None:# No/blank expiry: fail closed rather than unlocking history forever.- auth.write_auth(email="[email protected]", token="t", verified_at="")+ auth.write_auth(email="[email protected]", token="t", verified_at="") # nosec B106assert auth.read_auth() is not Noneassert auth.is_verified() is False# Garbage expiry likewise requires re-verification.- auth.write_auth(email="[email protected]", token="t", verified_at="not-a-date")+ auth.write_auth(email="[email protected]", token="t", verified_at="not-a-date") # nosec B106assert auth.is_verified() is False@@ -73,9 +73,9 @@ def test_is_verified_accepts_epoch_expiry() -> None:past = (datetime.now(UTC) - timedelta(hours=1)).timestamp()# As a numeric string (how write_auth persists it).- auth.write_auth(email="[email protected]", token="t", verified_at=str(future))+ auth.write_auth(email="[email protected]", token="t", verified_at=str(future)) # nosec B106assert auth.is_verified() is True- auth.write_auth(email="[email protected]", token="t", verified_at=str(past))+ auth.write_auth(email="[email protected]", token="t", verified_at=str(past)) # nosec B106assert auth.is_verified() is False# As a raw JSON number, if a record is written that way.@@ -87,7 +87,7 @@ def test_is_verified_accepts_epoch_expiry() -> None:def test_write_auth_is_0600() -> None:- auth.write_auth(email="[email protected]", token="t", verified_at="")+ auth.write_auth(email="[email protected]", token="t", verified_at="") # nosec B106mode = stat.S_IMODE(auth.AUTH_PATH.stat().st_mode)assert mode == 0o600diff --git a/tests/test_viewer_runs_gating.py b/tests/test_viewer_runs_gating.pyindex 380e2c9c..81780437 100644--- a/tests/test_viewer_runs_gating.py+++ b/tests/test_viewer_runs_gating.py@@ -5,7 +5,7 @@ from __future__ import annotationsimport jsonfrom typing import TYPE_CHECKING-from strix.viewer.server import build_runs_payload, resolve_run_dir+from strix.interface.viewer.server import build_runs_payload, resolve_run_dirif TYPE_CHECKING: