diff --git a/AGENTS.md b/AGENTS.md index b1f3d2a..9d04394 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,8 +1,9 @@ # Repository operating rules -This repository investigates an owner-controlled XGRIDS/LixelKity K1 as a -black-box sensor. Preserve the device, the Mac, the working LAN, and raw -evidence. +NODEDC MISSION CORE is a vendor-neutral mission-control monorepo. Its first +real device plugin investigates an owner-controlled XGRIDS/LixelKity K1 as a +black-box sensor. Preserve the device, the host, the working LAN, raw evidence, +and the boundary between Mission Core and vendor-specific integration code. ## Non-negotiable safety boundaries diff --git a/README.md b/README.md index 86d8fdd..fc05ee9 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,22 @@ -# NDC XGRIDS K1 Connector +# NODEDC MISSION CORE -Pre-production research project for connecting an owner-controlled -XGRIDS/LixelKity K1 to a Mac without LixelGO, firmware changes, device opening, -or speculative writes. +NODEDC MISSION CORE is the vendor-neutral control, observation, mission-planning, +recording, and integration platform for NODEDC autonomous systems. This +repository is the canonical early-stage monorepo: it contains the Mission Core +Control Station, the current local control plane, shared contracts as they are +extracted, and device plugins. -Current status: live proof completed on firmware 3.0.2. The Mac provisioned the -K1 onto an existing LAN without LixelGO, connected to its MQTT broker, captured -the scan-correlated point-cloud and pose streams, and decoded both successfully. -The repository also contains a local React control console, an automatic Rerun -gRPC bridge for the verified point-cloud and trajectory streams, and a -self-hosted Rerun Web Viewer embedded in that console. The former Foxglove -bridge remains only as a legacy regression module. +The first proven hardware vertical is the XGRIDS/LixelKity K1 plugin. On firmware +3.0.2 the host provisions the scanner onto an existing LAN without LixelGO, +connects to its MQTT broker, durably captures the raw stream, decodes point cloud +and pose, and renders the real cloud plus trajectory through an embedded +self-hosted Rerun Web Viewer. The former Foxglove bridge remains only as a +legacy regression module. + +The repository is intentionally migrating in stages. The current `src/k1link` +package is the compatibility implementation of the first plugin path; vendor +transport and codecs will move behind `plugins/xgrids-k1` and the Mission Core +Plugin SDK without changing the verified wire protocol or raw evidence format. The repository now contains one narrowly gated state-changing command: `ble wifi-configure`. It accepts only the reviewed firmware-3 provisioning @@ -18,7 +24,7 @@ profile and requires explicit `--confirm-write`; the Wi-Fi password is collected through a hidden local macOS dialog. MQTT capture and decoding are read-only. Nothing changes router settings, firmware or global Python packages. -## Available stand +## Verified XGRIDS K1 stand - one XGRIDS/LixelKity K1; - one Apple Silicon MacBook running macOS; @@ -51,15 +57,15 @@ This does not install Python packages globally and does not modify neighboring repositories. ```bash -cd /Users/dcconstructions/Downloads/mnt/NODEDC/NDC_xgrids-k1-connector +cd /Users/dcconstructions/Downloads/mnt/NODEDC/NODEDC_MISSION_CORE uv sync --group dev uv run k1link doctor uv run pytest ``` -## NODE.DC Control Station and visualization adapters +## Mission Core Control Station and visualization adapters -The browser application is now a universal NODE.DC Control Station rather than +The browser application is the universal Mission Core Control Station rather than a K1-specific Foxglove launcher. Its fixed shell contains six architectural sections — Center, Fleet, Observation, Missions, Data and System — while the K1 BLE/Wi-Fi/live workflow remains isolated as the first real device adapter. @@ -69,7 +75,7 @@ repository root: ```bash uv sync --group dev -cd apps/k1-viewer +cd apps/control-station npm install npm run typecheck npm run build @@ -86,7 +92,7 @@ Physical K1 scanning is still started and stopped by the verified double-click; the connector publishes no modeling command. The Observation spatial workspace embeds the open-source Rerun Web Viewer -inside the NODE.DC shell. It can open a compatible RRD file over HTTP(S) or a +inside the Mission Core shell. It can open a compatible RRD file over HTTP(S) or a Rerun gRPC/proxy source such as `rerun+http://127.0.0.1:9876/proxy`. It does not use an external hosted viewer UI. @@ -118,7 +124,7 @@ The old Foxglove implementation is retained only in live/replay runtime does not start it or use TCP 8765. The [live viewer runbook](docs/06_K1_LIVE_VIEWER.md) records the active Rerun path and its timing/security boundaries; the frontend contract is documented in -[`apps/k1-viewer/README.md`](apps/k1-viewer/README.md). +[`apps/control-station/README.md`](apps/control-station/README.md). The FastAPI application and credential endpoint bind to loopback, but the Rerun gRPC server currently binds TCP 9876 on all network interfaces even though its @@ -170,6 +176,8 @@ present. - [Reviewed BLE Wi-Fi profile](docs/04_K1_WIFI_PROVISIONING_PROFILE.md) - [Verified MQTT stream profile](docs/05_K1_MQTT_STREAM_PROFILE.md) - [Live console and embedded Rerun runbook](docs/06_K1_LIVE_VIEWER.md) +- [Mission Core monorepo and plugin boundary](docs/07_MISSION_CORE_MONOREPO.md) +- [Monorepo architecture decision](docs/adr/0002-mission-core-monorepo.md) - [Redacted live lab report](docs/lab/001_K1_LIVE_MQTT_20260715.redacted.md) - [Session manifest schema](schemas/session-manifest.schema.json) - [Reference input provenance](docs/reference/README.md) diff --git a/apps/README.md b/apps/README.md new file mode 100644 index 0000000..673afc4 --- /dev/null +++ b/apps/README.md @@ -0,0 +1,7 @@ +# Mission Core applications + +- `control-station/` — the current browser operator application. + +Applications consume Mission Core contracts and capabilities. Device-specific +transport and codecs belong under `plugins/`, not inside application routing +or navigation. diff --git a/apps/k1-viewer/.env.example b/apps/control-station/.env.example similarity index 100% rename from apps/k1-viewer/.env.example rename to apps/control-station/.env.example diff --git a/apps/k1-viewer/.gitignore b/apps/control-station/.gitignore similarity index 100% rename from apps/k1-viewer/.gitignore rename to apps/control-station/.gitignore diff --git a/apps/k1-viewer/README.md b/apps/control-station/README.md similarity index 95% rename from apps/k1-viewer/README.md rename to apps/control-station/README.md index c803ecd..5796f08 100644 --- a/apps/k1-viewer/README.md +++ b/apps/control-station/README.md @@ -1,6 +1,6 @@ -# Пункт управления NODE.DC +# NODEDC MISSION CORE · Control Station -Универсальный браузерный пункт управления NODE.DC на React 19, TypeScript и +Универсальный браузерный пункт управления Mission Core на React 19, TypeScript и Vite. Приложение задаёт общую операторскую оболочку для аппаратов, сенсоров, наблюдения, миссий и записей. XGRIDS/LixelKity K1 является первым реальным device adapter, но структура интерфейса от него не зависит. @@ -15,7 +15,7 @@ device adapter, но структура интерфейса от него не | Контур | Состояние | Что это означает | | --- | --- | --- | -| NODE.DC fixed shell | Реализован | Header, навигация по разделам, рабочая поверхность, окна и инспекторы работают в одном приложении. | +| Mission Core fixed shell | Реализован | Header, навигация по разделам, рабочая поверхность, окна и инспекторы работают в одном приложении. | | Локальный control plane | Реализован | React получает состояние и выполняет операции через FastAPI REST и WebSocket на loopback. | | K1 BLE → Wi-Fi | Реализован | Реальный BLE-поиск всех видимых устройств и одна подтверждённая provisioning-запись выбранному устройству. | | K1 live/replay MQTT | Реализован | Read-only приём, raw-first сохранение, декодирование облака точек и позы, реальные метрики. | @@ -40,9 +40,9 @@ K1 MQTT :1883, read-only └── gRPC/proxy TCP 9876 └── rerun_grpc_url в REST/WebSocket state └── встроенный @rerun-io/web-viewer - └── пространственная сцена NODE.DC + └── пространственная сцена Mission Core -React Control Station ←→ REST /api/* + WebSocket /api/events +Mission Core Control Station ←→ REST /api/* + WebSocket /api/events FastAPI на 127.0.0.1:8000 CoreBluetooth + live/replay runtime ``` @@ -62,7 +62,7 @@ viewer остаются активны, а следующая сессия сб Shell собран из локальных NODE.DC UI packages и сохраняет одну структуру для всех функциональных модулей: -1. `AppHeader` — марка NODE.DC, выбор архитектурного раздела и состояние +1. `AppHeader` — марка NODEDC MISSION CORE, выбор архитектурного раздела и состояние локального backend. 2. `AdminNavigationPanel` — контекст аппарата и список рабочих поверхностей выбранного раздела. @@ -105,10 +105,10 @@ layout пока остаются интерфейсным контрактом. Канонический путь от корня репозитория: ```bash -cd /Users/dcconstructions/Downloads/mnt/NODEDC/NDC_xgrids-k1-connector +cd /Users/dcconstructions/Downloads/mnt/NODEDC/NODEDC_MISSION_CORE uv sync --group dev -cd apps/k1-viewer +cd apps/control-station npm install npm run typecheck npm run build @@ -125,7 +125,7 @@ Wi-Fi. Для разработки интерфейса после запуска backend: ```bash -cd apps/k1-viewer +cd apps/control-station npm run dev ``` @@ -136,7 +136,7 @@ Vite слушает `http://127.0.0.1:5173` и проксирует `/api` и `/ ## Операторский путь для текущего K1 adapter -1. Запустить `uv run k1link serve` и открыть Control Station. +1. Запустить `uv run k1link serve` и открыть Mission Core Control Station. 2. Выбрать **Парк → Локальное устройство**. 3. Включить K1, дождаться стабильного индикатора и подтвердить это в форме. 4. Нажать **Показать все BLE-устройства**. Интерфейс показывает полный результат @@ -230,7 +230,7 @@ Custom timeline, переключатель 2D/3D/карты, семантиче ## Safety и чувствительные данные -- Control Station и credential endpoint доступны только на loopback. +- Mission Core Control Station и credential endpoint доступны только на loopback. - Исключение: Rerun gRPC/proxy на TCP 9876 сейчас слушает все сетевые интерфейсы, хотя автоматически возвращаемый URL содержит `127.0.0.1`. На нём нет connector-level authentication или TLS. Этот порт допустим только в доверенной @@ -250,7 +250,7 @@ Custom timeline, переключатель 2D/3D/карты, семантиче доказанный timestamp сенсора K1 и не photon-to-screen latency. - Панорамный камерный поток в наблюдавшихся MQTT report topics отсутствует; текущая Rerun-сцена содержит только облако точек и позу/траекторию, а - операционные метрики отображаются внешней оболочкой Control Station. + операционные метрики отображаются внешней оболочкой Mission Core. - `sessions/` игнорируется Git и может содержать адреса, идентификаторы, траекторию и карту помещения. В репозиторий попадают только redacted manifests и безопасная документация. diff --git a/apps/k1-viewer/index.html b/apps/control-station/index.html similarity index 59% rename from apps/k1-viewer/index.html rename to apps/control-station/index.html index 2fc70f4..9ca8acb 100644 --- a/apps/k1-viewer/index.html +++ b/apps/control-station/index.html @@ -5,10 +5,10 @@ - NODE.DC · Пункт управления + NODEDC MISSION CORE
diff --git a/apps/k1-viewer/package-lock.json b/apps/control-station/package-lock.json similarity index 99% rename from apps/k1-viewer/package-lock.json rename to apps/control-station/package-lock.json index 0154174..9f4cb6c 100644 --- a/apps/k1-viewer/package-lock.json +++ b/apps/control-station/package-lock.json @@ -1,11 +1,11 @@ { - "name": "@nodedc/k1-viewer", + "name": "@nodedc/mission-core-control-station", "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "@nodedc/k1-viewer", + "name": "@nodedc/mission-core-control-station", "version": "0.1.0", "dependencies": { "@nodedc/tokens": "file:../../../NODEDC_DESIGN_GUIDELINE/packages/tokens", diff --git a/apps/k1-viewer/package.json b/apps/control-station/package.json similarity index 94% rename from apps/k1-viewer/package.json rename to apps/control-station/package.json index 0a30468..fc1c2c4 100644 --- a/apps/k1-viewer/package.json +++ b/apps/control-station/package.json @@ -1,5 +1,5 @@ { - "name": "@nodedc/k1-viewer", + "name": "@nodedc/mission-core-control-station", "version": "0.1.0", "private": true, "type": "module", diff --git a/apps/k1-viewer/public/nodedc-logo.svg b/apps/control-station/public/nodedc-logo.svg similarity index 100% rename from apps/k1-viewer/public/nodedc-logo.svg rename to apps/control-station/public/nodedc-logo.svg diff --git a/apps/k1-viewer/public/nodedc-mark.svg b/apps/control-station/public/nodedc-mark.svg similarity index 100% rename from apps/k1-viewer/public/nodedc-mark.svg rename to apps/control-station/public/nodedc-mark.svg diff --git a/apps/k1-viewer/src/App.tsx b/apps/control-station/src/App.tsx similarity index 99% rename from apps/k1-viewer/src/App.tsx rename to apps/control-station/src/App.tsx index 47b18f1..8830013 100644 --- a/apps/k1-viewer/src/App.tsx +++ b/apps/control-station/src/App.tsx @@ -254,11 +254,11 @@ export default function App() { const header = ( } - brandLabel="NODE.DC" - left={ПУНКТ УПРАВЛЕНИЯ} + brandLabel="NODEDC MISSION CORE" + left={MISSION CORE} center={ <> - +
- {root?.eyebrow ?? "NODE.DC / ПУНКТ УПРАВЛЕНИЯ"} -

{root?.title ?? "Пункт управления"}

+ {root?.eyebrow ?? "NODEDC / MISSION CORE"} +

{root?.title ?? "Mission Core"}

{root?.statement ?? "Наблюдение, планирование и корректировка миссий в одной модульной рабочей области."} diff --git a/apps/k1-viewer/src/components/MetricCard.tsx b/apps/control-station/src/components/MetricCard.tsx similarity index 100% rename from apps/k1-viewer/src/components/MetricCard.tsx rename to apps/control-station/src/components/MetricCard.tsx diff --git a/apps/k1-viewer/src/components/RerunViewport.tsx b/apps/control-station/src/components/RerunViewport.tsx similarity index 100% rename from apps/k1-viewer/src/components/RerunViewport.tsx rename to apps/control-station/src/components/RerunViewport.tsx diff --git a/apps/k1-viewer/src/main.tsx b/apps/control-station/src/main.tsx similarity index 100% rename from apps/k1-viewer/src/main.tsx rename to apps/control-station/src/main.tsx diff --git a/apps/k1-viewer/src/messages.ts b/apps/control-station/src/messages.ts similarity index 100% rename from apps/k1-viewer/src/messages.ts rename to apps/control-station/src/messages.ts diff --git a/apps/k1-viewer/src/presentation.ts b/apps/control-station/src/presentation.ts similarity index 100% rename from apps/k1-viewer/src/presentation.ts rename to apps/control-station/src/presentation.ts diff --git a/apps/k1-viewer/src/productModel.ts b/apps/control-station/src/productModel.ts similarity index 100% rename from apps/k1-viewer/src/productModel.ts rename to apps/control-station/src/productModel.ts diff --git a/apps/k1-viewer/src/sceneSettings.ts b/apps/control-station/src/sceneSettings.ts similarity index 100% rename from apps/k1-viewer/src/sceneSettings.ts rename to apps/control-station/src/sceneSettings.ts diff --git a/apps/k1-viewer/src/styles.css b/apps/control-station/src/styles.css similarity index 100% rename from apps/k1-viewer/src/styles.css rename to apps/control-station/src/styles.css diff --git a/apps/k1-viewer/src/styles/base.css b/apps/control-station/src/styles/base.css similarity index 100% rename from apps/k1-viewer/src/styles/base.css rename to apps/control-station/src/styles/base.css diff --git a/apps/k1-viewer/src/styles/device.css b/apps/control-station/src/styles/device.css similarity index 100% rename from apps/k1-viewer/src/styles/device.css rename to apps/control-station/src/styles/device.css diff --git a/apps/k1-viewer/src/styles/responsive.css b/apps/control-station/src/styles/responsive.css similarity index 100% rename from apps/k1-viewer/src/styles/responsive.css rename to apps/control-station/src/styles/responsive.css diff --git a/apps/k1-viewer/src/styles/scene-windows.css b/apps/control-station/src/styles/scene-windows.css similarity index 100% rename from apps/k1-viewer/src/styles/scene-windows.css rename to apps/control-station/src/styles/scene-windows.css diff --git a/apps/k1-viewer/src/styles/shell.css b/apps/control-station/src/styles/shell.css similarity index 100% rename from apps/k1-viewer/src/styles/shell.css rename to apps/control-station/src/styles/shell.css diff --git a/apps/k1-viewer/src/styles/spatial.css b/apps/control-station/src/styles/spatial.css similarity index 100% rename from apps/k1-viewer/src/styles/spatial.css rename to apps/control-station/src/styles/spatial.css diff --git a/apps/k1-viewer/src/styles/workspaces.css b/apps/control-station/src/styles/workspaces.css similarity index 100% rename from apps/k1-viewer/src/styles/workspaces.css rename to apps/control-station/src/styles/workspaces.css diff --git a/apps/k1-viewer/src/useK1Console.ts b/apps/control-station/src/useK1Console.ts similarity index 100% rename from apps/k1-viewer/src/useK1Console.ts rename to apps/control-station/src/useK1Console.ts diff --git a/apps/k1-viewer/src/workspaces/DeviceWorkspace.tsx b/apps/control-station/src/workspaces/DeviceWorkspace.tsx similarity index 100% rename from apps/k1-viewer/src/workspaces/DeviceWorkspace.tsx rename to apps/control-station/src/workspaces/DeviceWorkspace.tsx diff --git a/apps/k1-viewer/src/workspaces/Workspaces.tsx b/apps/control-station/src/workspaces/Workspaces.tsx similarity index 100% rename from apps/k1-viewer/src/workspaces/Workspaces.tsx rename to apps/control-station/src/workspaces/Workspaces.tsx diff --git a/apps/k1-viewer/tsconfig.app.json b/apps/control-station/tsconfig.app.json similarity index 100% rename from apps/k1-viewer/tsconfig.app.json rename to apps/control-station/tsconfig.app.json diff --git a/apps/k1-viewer/tsconfig.json b/apps/control-station/tsconfig.json similarity index 100% rename from apps/k1-viewer/tsconfig.json rename to apps/control-station/tsconfig.json diff --git a/apps/k1-viewer/tsconfig.node.json b/apps/control-station/tsconfig.node.json similarity index 100% rename from apps/k1-viewer/tsconfig.node.json rename to apps/control-station/tsconfig.node.json diff --git a/apps/k1-viewer/vite.config.ts b/apps/control-station/vite.config.ts similarity index 100% rename from apps/k1-viewer/vite.config.ts rename to apps/control-station/vite.config.ts diff --git a/docs/06_K1_LIVE_VIEWER.md b/docs/06_K1_LIVE_VIEWER.md index 3c1681a..59b392b 100644 --- a/docs/06_K1_LIVE_VIEWER.md +++ b/docs/06_K1_LIVE_VIEWER.md @@ -30,7 +30,7 @@ Rerun gRPC/proxy on TCP 9876 +--> rerun_grpc_url in REST/WebSocket state | v -self-hosted @rerun-io/web-viewer inside NODE.DC Control Station +self-hosted @rerun-io/web-viewer inside Mission Core Control Station React console <-- REST + WebSocket state --> FastAPI on 127.0.0.1:8000 ``` @@ -52,7 +52,7 @@ Prerequisites are the repository-local Python environment and Node.js 20.19+ or ```bash uv sync --group dev -cd apps/k1-viewer +cd apps/control-station npm install npm run typecheck npm run build @@ -121,7 +121,7 @@ does not publish an application request or modeling command. On the first live or replay session, `RerunBridge`: -- creates an explicit `RecordingStream("nodedc_device_spatial")`; +- creates an explicit `RecordingStream("nodedc_mission_core_spatial")`; - installs the default spatial blueprint; - starts the gRPC/proxy server on TCP 9876 with a 512 MiB late-client buffer; - reports `rerun+http://127.0.0.1:9876/proxy` only after the server is ready; diff --git a/docs/07_MISSION_CORE_MONOREPO.md b/docs/07_MISSION_CORE_MONOREPO.md new file mode 100644 index 0000000..7ed82fa --- /dev/null +++ b/docs/07_MISSION_CORE_MONOREPO.md @@ -0,0 +1,39 @@ +# NODEDC MISSION CORE monorepo + +This document maps the renamed repository to the target Mission Core +architecture without claiming that unfinished package boundaries already +exist. + +## Current layout + +| Path | Current responsibility | Target responsibility | +| --- | --- | --- | +| `apps/control-station/` | React shell, device workflow, spatial scene | Vendor-neutral operator application | +| `src/k1link/web/` | Local FastAPI control plane and K1 session orchestration | Generic host APIs plus plugin supervisor | +| `src/k1link/viewer/` | Replay runtime and Rerun adapter | Canonical scene sink and presentation adapter | +| `src/k1link/ble/` | K1 BLE discovery and reviewed provisioning | `plugins/xgrids-k1` | +| `src/k1link/mqtt/` | Raw-first K1 MQTT capture | `plugins/xgrids-k1` behind EvidenceStore | +| `src/k1link/protocol/` | Firmware-scoped K1 codecs | `plugins/xgrids-k1` | +| `packages/plugin-sdk/` | Contract placeholder | Versioned manifests, capabilities, lifecycle, schemas | +| `plugins/xgrids-k1/` | Extraction boundary and documentation | Independently versioned device plugin | + +## Extraction order + +1. Define canonical PointCloud, Pose, DeviceStatus, RawEnvelope, and metrics + contracts in the Plugin SDK. +2. Make Rerun consume canonical frames rather than K1 MQTT topics. +3. Extract codecs and replay parity fixtures. +4. Extract raw capture with fault isolation between evidence and preview. +5. Extract BLE/Wi-Fi provisioning and MQTT into a least-privilege edge worker. +6. Replace K1-specific host routes and state with plugin/device-session APIs. +7. Drive the connection wizard from plugin capabilities and schemas. +8. Re-run native replay and the physical BLE → Wi-Fi → MQTT → scene acceptance. + +## Invariants + +- Raw evidence is durable before preview work. +- Mission Core starts when the XGRIDS plugin is absent or disabled. +- The plugin cannot add global navigation or arbitrary CSS. +- Vendor writes and commands require declared capabilities and operator gates. +- The visualization engine can be replaced without changing device plugins. +- Real captures and credentials remain outside Git. diff --git a/docs/adr/0002-mission-core-monorepo.md b/docs/adr/0002-mission-core-monorepo.md new file mode 100644 index 0000000..7f3871f --- /dev/null +++ b/docs/adr/0002-mission-core-monorepo.md @@ -0,0 +1,59 @@ +# ADR 0002: NODEDC MISSION CORE monorepo + +- Status: accepted +- Date: 2026-07-16 + +## Context + +The repository began as a focused XGRIDS/LixelKity K1 connector and then gained +a vendor-neutral control-station shell, local control plane, replay runtime, and +embedded spatial viewer. The K1 vertical is proven on real hardware, but its +names and implementation are still coupled to the host. + +## Decision + +The product, repository, and local root are named NODEDC MISSION CORE. The +canonical Git path is `SILVER/NODEDC_MISSION_CORE`, and the local checkout is +`NODEDC_MISSION_CORE`. + +Mission Core remains one monorepo while the first plugin contract stabilizes: + +```text +apps/control-station/ browser operator application +packages/plugin-sdk/ shared plugin contracts and host interfaces +plugins/xgrids-k1/ XGRIDS/LixelKity K1 device plugin +src/k1link/ transitional compatibility implementation +docs/ architecture, runbooks, ADRs, and redacted evidence +``` + +An independent plugin does not require an independent Git repository at this +stage. The XGRIDS plugin must have an explicit package/runtime boundary, +manifest, capabilities, tests, and no ownership of Mission Core navigation. +It can be split into another repository later without changing host contracts. + +The Rerun integration is a replaceable presentation adapter. It is not the +Mission Core data bus, session database, or device protocol. + +## Compatibility boundary + +The rename does not alter these proven interfaces: + +- Python import namespace and CLI `k1link`; +- native `.k1mqtt` framing and `K1MQTT` magic; +- provisioning profile `xgrids-k1-fw3-wifi-v1`; +- K1 MQTT topics and firmware-scoped protobuf/LZ4 codecs; +- current `k1_ip`, `K1Metrics`, and `useK1Console` compatibility fields; +- schema v1 `$id`, which remains an immutable legacy identifier. + +Those names move or change only during the plugin-extraction milestone with +explicit migration and regression tests. + +## Consequences + +- Product branding, repository metadata, frontend application path, API title, + and Rerun recording identity use Mission Core naming now. +- The existing K1 implementation remains operational while contracts are + extracted incrementally. +- Core must eventually boot without the XGRIDS plugin. +- Plugin failure must not terminate the Mission Core host or raw evidence plane. +- A future repository split remains possible after Plugin SDK v1 is stable. diff --git a/packages/plugin-sdk/README.md b/packages/plugin-sdk/README.md new file mode 100644 index 0000000..2a17997 --- /dev/null +++ b/packages/plugin-sdk/README.md @@ -0,0 +1,18 @@ +# Mission Core Plugin SDK + +This directory reserves the versioned host/plugin contract. It is not yet a +published SDK and must not be treated as an implemented runtime. + +The first contract will define: + +- plugin manifest, version compatibility, firmware profiles, and permissions; +- discovery candidates and opaque device references; +- provisioning requests using secret references; +- device-session lifecycle and health; +- EvidenceStore handles and raw-artifact lineage; +- canonical PointCloud, Pose, DeviceStatus, and metrics envelopes; +- SceneSink and event interfaces; +- capability-driven UI contribution data without plugin-owned layout. + +The XGRIDS K1 extraction is the first acceptance test. A synthetic reference +plugin will verify that no K1 names or protocol assumptions remain in core. diff --git a/plugins/xgrids-k1/README.md b/plugins/xgrids-k1/README.md new file mode 100644 index 0000000..26459a4 --- /dev/null +++ b/plugins/xgrids-k1/README.md @@ -0,0 +1,26 @@ +# XGRIDS / LixelKity K1 plugin + +This directory is the target package boundary for the first Mission Core device +plugin. The verified implementation remains temporarily in `src/k1link` so the +real-device path stays operational during extraction. + +The plugin owns: + +- BLE discovery hints and K1 GATT metadata; +- the reviewed firmware-3 Wi-Fi provisioning profile; +- K1 LAN status and private-address validation; +- subscribe-only MQTT transport and report-topic allowlist; +- native `.k1mqtt` capture; +- firmware-scoped protobuf/LZ4 and legacy codecs; +- normalization of K1 point cloud, pose, status, health, and artifacts; +- K1-specific operator instructions and compatibility tests. + +The plugin does not own: + +- Mission Core navigation, fleet, missions, users, roles, or audit; +- the generic spatial scene or Rerun Web Viewer; +- platform storage, remote transport, or other devices. + +Until extraction is complete, `src/k1link` is the compatibility source of +truth and every move into this package must preserve replay and real-device +acceptance. diff --git a/pyproject.toml b/pyproject.toml index c2510c3..6e3aa69 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,9 +3,9 @@ requires = ["hatchling>=1.27,<2"] build-backend = "hatchling.build" [project] -name = "ndc-xgrids-k1-connector" +name = "nodedc-mission-core" version = "0.1.0" -description = "macOS-first, evidence-led research tooling for an XGRIDS Lixel K1" +description = "NODEDC Mission Core monorepo for mission control, spatial observation, and device plugins" readme = "README.md" requires-python = ">=3.12,<3.13" license = { text = "Proprietary" } diff --git a/schemas/session-manifest.schema.json b/schemas/session-manifest.schema.json index 72e0997..137fea8 100644 --- a/schemas/session-manifest.schema.json +++ b/schemas/session-manifest.schema.json @@ -1,6 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://git.dcserve.ru/SILVER/NDC_xgrids-k1-connector/schemas/session-manifest.schema.json", + "$comment": "The legacy v1 schema identifier is intentionally immutable after the repository rename to NODEDC_MISSION_CORE.", "title": "K1 laboratory session manifest", "type": "object", "additionalProperties": false, diff --git a/src/k1link/__init__.py b/src/k1link/__init__.py index ee4620f..1a9005c 100644 --- a/src/k1link/__init__.py +++ b/src/k1link/__init__.py @@ -1,3 +1,3 @@ -"""NDC XGRIDS K1 connector research tooling.""" +"""Mission Core runtime with the transitional XGRIDS K1 compatibility adapter.""" __version__ = "0.1.0" diff --git a/src/k1link/cli.py b/src/k1link/cli.py index 5eb1897..2550229 100644 --- a/src/k1link/cli.py +++ b/src/k1link/cli.py @@ -208,15 +208,15 @@ def serve_console( typer.Option(min=1024, max=65535, help="Loopback HTTP port for the local console."), ] = 8000, ) -> None: - """Serve the built K1 console and local-only control API on loopback.""" - frontend = Path(__file__).resolve().parents[2] / "apps" / "k1-viewer" / "dist" + """Serve the built Mission Core Control Station and loopback control API.""" + frontend = Path(__file__).resolve().parents[2] / "apps" / "control-station" / "dist" if not frontend.is_dir(): console.print( "[red]Frontend build is missing.[/red] Run npm install && npm run build " - "inside apps/k1-viewer." + "inside apps/control-station." ) raise typer.Exit(code=2) - console.print(f"K1 Live Console: http://127.0.0.1:{port}") + console.print(f"NODEDC MISSION CORE: http://127.0.0.1:{port}") console.print("The credential endpoint is bound to this Mac only.") uvicorn.run( "k1link.web.app:app", diff --git a/src/k1link/viewer/foxglove_bridge.py b/src/k1link/viewer/foxglove_bridge.py index ef92982..2049b0d 100644 --- a/src/k1link/viewer/foxglove_bridge.py +++ b/src/k1link/viewer/foxglove_bridge.py @@ -171,7 +171,7 @@ class FoxgloveBridge: ) -> None: self.metrics = metrics or BridgeMetrics() self._server = foxglove.start_server( - name="NODE.DC K1 live bridge", + name="Mission Core K1 legacy bridge", host=host, port=port, message_backlog_size=32, diff --git a/src/k1link/viewer/rerun_bridge.py b/src/k1link/viewer/rerun_bridge.py index 81d296a..f4e2c34 100644 --- a/src/k1link/viewer/rerun_bridge.py +++ b/src/k1link/viewer/rerun_bridge.py @@ -74,7 +74,7 @@ class RerunBridge: self._settings_provider = settings_provider or RerunSceneSettings self._settings = self._settings_provider() self._recording = (recording_factory or rr.RecordingStream)( - "nodedc_device_spatial" + "nodedc_mission_core_spatial" ) blueprint = _blueprint(self._settings) self._url = self._recording.serve_grpc( diff --git a/src/k1link/web/__init__.py b/src/k1link/web/__init__.py index f56acf8..0b1301a 100644 --- a/src/k1link/web/__init__.py +++ b/src/k1link/web/__init__.py @@ -1 +1 @@ -"""Local-only control API for the K1 live console.""" +"""Local Mission Core control plane with the transitional XGRIDS adapter.""" diff --git a/src/k1link/web/app.py b/src/k1link/web/app.py index c0ab206..ca38473 100644 --- a/src/k1link/web/app.py +++ b/src/k1link/web/app.py @@ -261,7 +261,7 @@ async def app_lifespan(_: FastAPI) -> AsyncIterator[None]: app = FastAPI( - title="NODE.DC Device Control API", + title="NODEDC Mission Core API", version=__version__, docs_url="/api/docs", redoc_url=None, @@ -275,7 +275,7 @@ def health() -> dict[str, Any]: return { "ok": True, "status": "ok", - "service": "k1-live-console", + "service": "mission-core-control-plane", "version": __version__, } @@ -341,7 +341,7 @@ async def events(websocket: WebSocket) -> None: return -frontend_dist = REPOSITORY_ROOT / "apps" / "k1-viewer" / "dist" +frontend_dist = REPOSITORY_ROOT / "apps" / "control-station" / "dist" if frontend_dist.is_dir(): app.mount("/", StaticFiles(directory=frontend_dist, html=True), name="frontend") diff --git a/uv.lock b/uv.lock index 5b5d8da..cc93a09 100644 --- a/uv.lock +++ b/uv.lock @@ -269,7 +269,7 @@ wheels = [ ] [[package]] -name = "ndc-xgrids-k1-connector" +name = "nodedc-mission-core" version = "0.1.0" source = { editable = "." } dependencies = [