Appearance
Ariadne and Theseus inventory
Setup pass: 11 September 2026. Planning only — this page does not claim implementation is done.
Durable tally of the Hansel / Gretel (Ariadne) hospital navigation POC versus what SafeCall already has, and the gaps Theseus must fill. Implementers should read this instead of re-searching the legacy trees.
GitLab tracking lives in the Ariadne / Theseus roadmap (parents #143, #149). Human / secret-store steps live in operator actions. Issue fetch/close rules: GitLab issues.
Locked decisions
- Current
mobile/becomes Ariadne (rename/evolve). The repo end state isariadne/+theseus/and nomobile/. - Theseus is a new Flutter app (same stack as Keryx / Ariadne: BLE, camera, ntfy).
- Theseus auth is two-layer: Wantok staff unlock first, then per-site SafeCall QR pairing.
- Keryx stays the client-admin alert app. Theseus does not replace Keryx and does not subscribe to staff categories. It owns
safecall-opsonly. - Theseus is Wantok-internal (no public-store GTM clone of Keryx). Ariadne store launch is out of this program; first Ariadne exit is POC replay.
- Navigation graph stays SafeCall nodes/edges. Hansel
active_regions/pathsare import sources, not a second runtime model. - Do not commit hospital floor plans,
mar.json, passwords, or pairing tokens.
Names and where the old code is
| Name | What it was | On this Mac | In safecall today |
|---|---|---|---|
| Hansel | Wantok web toolchain: Pixi editor, QR field deploy, project.json store | /Users/tmin/Code/archive/old_safecall_files/legacy/hansel (canonical data + maps); copy in /Users/tmin/Code/active/wantok/hansel | Reimplemented as web Navigation editor + server bundle APIs. No field deploy app. |
| Gretel | Flutter repo / package name | /Users/tmin/Code/active/gretel ≡ archive legacy/gretel (last commit 2025-12-11) | Ported into mobile/ as SafeCall Nav (safecall_nav) |
| Ariadne | Shipped Gretel brand (cz.wantok.ariadne) | Same Gretel trees (Android label / bundle id) | Name unused. App is still “SafeCall Navigation” |
| Theseus | New Wantok field / ops app | Nowhere | Nowhere |
Do not treat these as sources:
/Users/tmin/Code/active/assimilator/hansel— aborted SQLite/JWT rewrite;db/hansel.dbhas no tables..cursor/plans/navigation_system_migration_99812b4c.plan.mdpointed atlegacy/gretel/inside this repo. That path was never committed here.
Hospital POC data (stay on disk; never git):
- AKESO-CEDR (hardcoded Gretel project id): 7 floors, quadrant names
4A–4Don 4. NP. Server-format JSON withpathsplus maps under Hanselserver/projects/AKESO-CEDR/andback/projects/AKESO-CEDR/images/. - Multiscan 999 (Pardubice) sample in Gretel
lib/project.json(editor format, emptypaths). - SafeCall once had
server/scripts/mar.json(same CEDR export); removed in06bc9123. Maps were never in this repo.
SafeCall mobile today (mobile/)
App identity: package safecall_nav, display “SafeCall Navigation”, Android com.safecall.safecall_nav, iOS com.safecall.safecallNav.
| Path | Role |
|---|---|
mobile/lib/main.dart | App shell |
mobile/lib/screens/home_screen.dart | URL, QR / key, sync, location pick |
mobile/lib/screens/qr_scanner_screen.dart | { url, mobile_key } |
mobile/lib/screens/navigation_screen.dart | Map, BLE pose, pathfind, survey |
mobile/lib/core/positioning.dart | RSSI → distance + Cramer trilateration; fingerprint k-NN |
mobile/lib/core/navigation_graph.dart | Dijkstra + edge projection |
mobile/lib/services/ble_scanner.dart | WTK_ scan, 50-sample RSSI buffer |
mobile/lib/game/navigation_game.dart | Flame renderer (heading parameter exists) |
mobile/lib/models/navigation_data.dart | Bundle / floor / node / edge / beacon |
Notifications are not in mobile/. They live in keryx/.
Algorithm transfer (Gretel → SafeCall)
| Capability | Gretel / Ariadne POC | SafeCall mobile/ now | Gap for Ariadne POC replay |
|---|---|---|---|
| WTK_ BLE scan + RSSI buffer | Yes (100 samples) | Yes (50 samples) | None — keep SafeCall |
| 1-beacon snap / 2-beacon midpoint | Yes | Yes | None |
| 3+ trilateration | Code exists; never sets distance from RSSI | Path-loss _rssiToDistance + Cramer | Keep SafeCall — do not restore broken Gretel math |
| Live magnetometer heading | Yes: FlutterCompass + per-floor compass_angle | Dependency present; navigation_screen.dart always passes 0 | Must port |
map_scale / ruler / origin | In JSON; unused at runtime | Parsed; unused | Should apply for real-world pose |
| End-user vs deployment map | Server had both | Downloads end-user PNG; never shown | Show end-user map in Ariadne |
| Corridor graph | active_regions → paths (convert_coords.js) + beacon connections | Explicit nodes / edges from web editor | Need import, not a second model |
| Path-follow animation | Player walks the polyline | Snap-to-edge only | Nice-to-have, not POC-blocking |
| Multi-floor auto transition | Attempted; marked broken | Floor picker only | Out of first Ariadne milestone |
| Particle / Kalman / PDR | No | No | Not in this program |
| Fingerprint / Wi‑Fi k-NN | No | POC + scripts/ml/fingerprint_train.ts | Keep as-is; not required for hospital POC |
| QR onboarding | No (hardcoded AKESO-CEDR + wantok.minitsios.com/hnsl) | Yes: { url, mobile_key } | Keep SafeCall QR |
Gretel compass math (port in A2): GretaPlayer in /Users/tmin/Code/active/gretel/lib/main.dart combines device heading with per-floor compass_angle.
Gretel path conversion (import in A4): /Users/tmin/Code/archive/old_safecall_files/legacy/hansel/back/convert_coords.js maps active_regions line segments → paths. SafeCall already has server/scripts/import_navigation_beacons.ts (mar.json beacons/floors only; no nodes/edges).
Theseus vs Hansel vs current admin
| Theseus goal | Legacy Hansel | SafeCall today | Gap |
|---|---|---|---|
| Pair to an install | Deploy app JWT + hardcoded HNSL URL | Nav QR (read key) + Keryx QR (ntfy subscribe) | Theseus field QR (write-scoped). Do not reuse server_mobile_api_key |
| Pick a map / floor | Project + floor list in editor | Web Navigation + Maps; mobile snapshot / catalog | Theseus must consume snapshot after pair |
| Find nearby beacons while walking | Phone was Gretel (scan only). Hansel deploy scanned printed MAC / holder QRs | Gateway ID (web/src/admin/tools/gateway-id/) ranks gateways that hear a MAC via MQTT adv4 | Field app uses phone BLE. Gatify is a later optional add-on |
| Confirm beacon on map | Pixi drag in desktop editor; deploy only binds MAC / holder | Web Navigation can drag beacons | No walk-up, hear, tap-to-confirm write path from a phone |
| Create routes | Draw H/V active_regions; form-based beacon connections | Web node/edge tools + POST /floor/:id/graph | No mobile graph authoring |
| Wantok-only access | users.json operators + JWT on /deploy; editor WS had no auth | Roles: admin / user / maintenance / api only (lib/src/roles.ts) | Layer-1 identity cannot live on the customer box |
| Ops notifications | None | Publisher exists: {binary_name}-ops / safecall-ops. Excluded from Keryx QR / /features | No in-app Wantok inbox |
Reuse for Theseus ops: keryx/lib/services/ntfy_stream_service.dart and the SafeCall alert-record parser. Topic inventory: ntfy topics. Do not put safecall-ops on a Keryx QR.
Hansel deploy (front/deploy.js) is a printed-MAC / holder-QR wizard. That is a different job than “hear a beacon and confirm it on the map.”
Target architecture (later implementation)
Wantok unlock (Theseus, layer 1)
│
▼
Site Theseus QR (Mobile Access) ──► field token + origin
│
├── GET navigation snapshot / maps
├── POST beacon confirm + graph write
└── ntfy subscribe safecall-ops (Wantok creds, not site QR)
Ariadne ── mobile key QR ──► same snapshot / maps (read-only)Work-item map (256k-sized)
Codes match GitLab titles. Full descriptions and iids are on the roadmap.
| Code | Milestone | Item | One-window job |
|---|---|---|---|
| A0 | Ariadne POC parity | #143 | Parent |
| A1 | Ariadne POC parity | #144 | Rename mobile/ → ariadne/; no behavior change |
| A2 | Ariadne POC parity | #145 | Live compass + floor compass_angle |
| A3 | Ariadne POC parity | #146 | map_scale / origin + show end-user map |
| A4 | Ariadne POC parity | #147 | Hansel project.json → floors / beacons / nodes / edges |
| A5 | Ariadne POC parity | #148 | POC replay operator packet (no product code) |
| T0 | Theseus Wantok access | #149 | Parent (spans commissioning) |
| T1 | Theseus Wantok access | #150 | Scaffold theseus/ |
| T2 | Theseus Wantok access | #151 | Layer-1 Wantok unlock |
| T3 | Theseus Wantok access | #152 | Site-pairing QR (layer 2) |
| T4 | Theseus Wantok access | #153 | safecall-ops inbox |
| T5 | Theseus site commissioning | #154 | Server field APIs + guard_theseus (new module, not more http.ts) |
| T6 | Theseus site commissioning | #155 | Pick location / floor / map |
| T7 | Theseus site commissioning | #156 | BLE discover + confirm on map |
| T8 | Theseus site commissioning | #157 | Field route authoring |
Intentionally deferred
- Theseus public App Store / Play GTM.
- Claiming Gretel store ids
cz.wantok.ariadnein the rename item (A1 changes display / dart package only; store ids are a later decision). - Hansel printed-MAC deploy wizard.
- Central Wantok backend that proxies all customer installs.
- New SafeCall
wantokuser role on customer boxes. - Path-follow animation, auto floor change, fingerprint promotion.
- Extracting a shared Dart package between Ariadne and Theseus.
- Committing CEDR / Multiscan rasters or
mar.json.
Key SafeCall files (current names)
Until A1 lands, navigation app paths stay under mobile/. After A1, read ariadne/ and docs/ariadne/.
| Area | Paths |
|---|---|
| Nav editor | web/src/admin/pages/navigation.ts |
| Mobile Access QR | web/src/admin/tools/mobile-access/ |
| Gateway ID | web/src/admin/tools/gateway-id/ |
| Navigation HTTP | server/src/routes/http.ts (guard_navigation, guard_navigation_mobile_key) |
| ntfy ops | server/src/ntfy.ts (ntfy_publish_ops_health), server/src/ntfy_topics.ts |
| Keryx QR | server/src/keryx_ntfy.ts |
| Roles | lib/src/roles.ts |
| Import stub | server/scripts/import_navigation_beacons.ts |