feat(observatory): cache sealed camera and TGS replay on Core

This commit is contained in:
DCCONSTRUCTIONS
2026-09-03 13:15:07 +03:00
parent 3ea8d987a7
commit 27979854a7
6 changed files with 907 additions and 2 deletions
+17
View File
@@ -54,6 +54,7 @@ from k1link.observatory.portable_queue_binding import (
PortableQueueBindingError,
PortableRecordedQueueBindingService,
)
from k1link.observatory.portable_replay import PortableReplayService
from k1link.observatory.portable_result_cache import PortableResultCache
from k1link.observatory.portable_result_contract import (
PortableCalculationProfileRegistry,
@@ -212,6 +213,7 @@ from k1link.web.plugin_runtime import (
PluginRuntimeUnavailableError,
)
from k1link.web.polygon_api import build_polygon_router, configured_polygon_runs_root
from k1link.web.portable_replay_api import build_portable_replay_router
from k1link.web.runtime_diagnostics import configure_scanner_diagnostics
from k1link.web.runtime_readiness import (
BackgroundReconcilerReadiness,
@@ -1053,6 +1055,21 @@ async def device_plugin_events(websocket: WebSocket, plugin_id: str) -> None:
await websocket.close(code=1011, reason="Device plugin state stream failed")
if session_artifact_gateway is not None and _ffmpeg is not None:
app.include_router(
build_portable_replay_router(
PortableReplayService(
view=PortableResultViewService(
sessions=session_store, artifacts=session_artifact_gateway.store
),
data_dir=session_store.data_dir,
media=session_recorded_media_inspector,
recording_source=_canonical_lab_recording_source,
ffmpeg_path=_ffmpeg,
)
)
)
for legacy_router in plugin_environment.legacy_routers:
app.include_router(legacy_router)