Skip to content

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 is ariadne/ + theseus/ and no mobile/.
  • 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-ops only.
  • 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 / paths are 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

NameWhat it wasOn this MacIn safecall today
HanselWantok 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/hanselReimplemented as web Navigation editor + server bundle APIs. No field deploy app.
GretelFlutter repo / package name/Users/tmin/Code/active/gretel ≡ archive legacy/gretel (last commit 2025-12-11)Ported into mobile/ as SafeCall Nav (safecall_nav)
AriadneShipped Gretel brand (cz.wantok.ariadne)Same Gretel trees (Android label / bundle id)Name unused. App is still “SafeCall Navigation”
TheseusNew Wantok field / ops appNowhereNowhere

Do not treat these as sources:

  • /Users/tmin/Code/active/assimilator/hansel — aborted SQLite/JWT rewrite; db/hansel.db has no tables.
  • .cursor/plans/navigation_system_migration_99812b4c.plan.md pointed at legacy/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 4A4D on 4. NP. Server-format JSON with paths plus maps under Hansel server/projects/AKESO-CEDR/ and back/projects/AKESO-CEDR/images/.
  • Multiscan 999 (Pardubice) sample in Gretel lib/project.json (editor format, empty paths).
  • SafeCall once had server/scripts/mar.json (same CEDR export); removed in 06bc9123. 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.

PathRole
mobile/lib/main.dartApp shell
mobile/lib/screens/home_screen.dartURL, QR / key, sync, location pick
mobile/lib/screens/qr_scanner_screen.dart{ url, mobile_key }
mobile/lib/screens/navigation_screen.dartMap, BLE pose, pathfind, survey
mobile/lib/core/positioning.dartRSSI → distance + Cramer trilateration; fingerprint k-NN
mobile/lib/core/navigation_graph.dartDijkstra + edge projection
mobile/lib/services/ble_scanner.dartWTK_ scan, 50-sample RSSI buffer
mobile/lib/game/navigation_game.dartFlame renderer (heading parameter exists)
mobile/lib/models/navigation_data.dartBundle / floor / node / edge / beacon

Notifications are not in mobile/. They live in keryx/.

Algorithm transfer (Gretel → SafeCall)

CapabilityGretel / Ariadne POCSafeCall mobile/ nowGap for Ariadne POC replay
WTK_ BLE scan + RSSI bufferYes (100 samples)Yes (50 samples)None — keep SafeCall
1-beacon snap / 2-beacon midpointYesYesNone
3+ trilaterationCode exists; never sets distance from RSSIPath-loss _rssiToDistance + CramerKeep SafeCall — do not restore broken Gretel math
Live magnetometer headingYes: FlutterCompass + per-floor compass_angleDependency present; navigation_screen.dart always passes 0Must port
map_scale / ruler / originIn JSON; unused at runtimeParsed; unusedShould apply for real-world pose
End-user vs deployment mapServer had bothDownloads end-user PNG; never shownShow end-user map in Ariadne
Corridor graphactive_regionspaths (convert_coords.js) + beacon connectionsExplicit nodes / edges from web editorNeed import, not a second model
Path-follow animationPlayer walks the polylineSnap-to-edge onlyNice-to-have, not POC-blocking
Multi-floor auto transitionAttempted; marked brokenFloor picker onlyOut of first Ariadne milestone
Particle / Kalman / PDRNoNoNot in this program
Fingerprint / Wi‑Fi k-NNNoPOC + scripts/ml/fingerprint_train.tsKeep as-is; not required for hospital POC
QR onboardingNo (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 goalLegacy HanselSafeCall todayGap
Pair to an installDeploy app JWT + hardcoded HNSL URLNav QR (read key) + Keryx QR (ntfy subscribe)Theseus field QR (write-scoped). Do not reuse server_mobile_api_key
Pick a map / floorProject + floor list in editorWeb Navigation + Maps; mobile snapshot / catalogTheseus must consume snapshot after pair
Find nearby beacons while walkingPhone was Gretel (scan only). Hansel deploy scanned printed MAC / holder QRsGateway ID (web/src/admin/tools/gateway-id/) ranks gateways that hear a MAC via MQTT adv4Field app uses phone BLE. Gatify is a later optional add-on
Confirm beacon on mapPixi drag in desktop editor; deploy only binds MAC / holderWeb Navigation can drag beaconsNo walk-up, hear, tap-to-confirm write path from a phone
Create routesDraw H/V active_regions; form-based beacon connectionsWeb node/edge tools + POST /floor/:id/graphNo mobile graph authoring
Wantok-only accessusers.json operators + JWT on /deploy; editor WS had no authRoles: admin / user / maintenance / api only (lib/src/roles.ts)Layer-1 identity cannot live on the customer box
Ops notificationsNonePublisher exists: {binary_name}-ops / safecall-ops. Excluded from Keryx QR / /featuresNo 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.

CodeMilestoneItemOne-window job
A0Ariadne POC parity#143Parent
A1Ariadne POC parity#144Rename mobile/ariadne/; no behavior change
A2Ariadne POC parity#145Live compass + floor compass_angle
A3Ariadne POC parity#146map_scale / origin + show end-user map
A4Ariadne POC parity#147Hansel project.json → floors / beacons / nodes / edges
A5Ariadne POC parity#148POC replay operator packet (no product code)
T0Theseus Wantok access#149Parent (spans commissioning)
T1Theseus Wantok access#150Scaffold theseus/
T2Theseus Wantok access#151Layer-1 Wantok unlock
T3Theseus Wantok access#152Site-pairing QR (layer 2)
T4Theseus Wantok access#153safecall-ops inbox
T5Theseus site commissioning#154Server field APIs + guard_theseus (new module, not more http.ts)
T6Theseus site commissioning#155Pick location / floor / map
T7Theseus site commissioning#156BLE discover + confirm on map
T8Theseus site commissioning#157Field route authoring

Intentionally deferred

  • Theseus public App Store / Play GTM.
  • Claiming Gretel store ids cz.wantok.ariadne in 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 wantok user 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/.

AreaPaths
Nav editorweb/src/admin/pages/navigation.ts
Mobile Access QRweb/src/admin/tools/mobile-access/
Gateway IDweb/src/admin/tools/gateway-id/
Navigation HTTPserver/src/routes/http.ts (guard_navigation, guard_navigation_mobile_key)
ntfy opsserver/src/ntfy.ts (ntfy_publish_ops_health), server/src/ntfy_topics.ts
Keryx QRserver/src/keryx_ntfy.ts
Roleslib/src/roles.ts
Import stubserver/scripts/import_navigation_beacons.ts