Skip to content

Ariadne and Theseus inventory ​

Setup pass: 11 September 2026. A1–A5 and parent A0 (#143) landed 17 September 2026. T1–T8 and parent T0 (#149) landed 17 September 2026. This page is still the inventory, not a claim that OA-AT-maps is done. OA-AT-unlock and OA-AT-ops are done (17 September 2026).

Durable tally of the Hansel / Gretel (Ariadne) hospital navigation POC versus what SafeCall has, and the Theseus field / ops gaps that T1–T8 filled. 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. Click-level sittings: Ariadne operator close-out, Theseus operator close-out. Issue fetch/close rules: GitLab issues.

Locked decisions ​

  • Current mobile/ became Ariadne (ariadne/). 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.
  • Lab pairing URL is https://safecall-lab.sourcectl.com. That host is not Keryx {public_base}.

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 ariadne/ (was mobile/) as SafeCall Nav, then renamed Ariadne
AriadneShipped Gretel brand (cz.wantok.ariadne)Same Gretel trees (Android label / bundle id)ariadne/. Display and Dart package Ariadne. Store IDs com.sourcectl.ariadne (Android and iOS). Never cz.wantok.ariadne.
TheseusNew Wantok field / ops apptheseus/theseus/

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 4A–4D 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.

Ariadne today (ariadne/) ​

App identity: Dart package ariadne, display “Ariadne”, launcher Ariadne, store title Ariadne Indoor Navigation. Android and iOS IDs are com.sourcectl.ariadne. Never claim cz.wantok.ariadne. If Apple refuses the iOS App ID, fall back to com.sourcectl.ariadneapp in a follow-up — do not invent the suffix in source until that happens.

PathRole
ariadne/lib/main.dartApp shell
ariadne/lib/screens/home_screen.dartURL, QR / key, sync, location pick
ariadne/lib/screens/qr_scanner_screen.dart{ url, mobile_key }
ariadne/lib/screens/navigation_screen.dartMap, BLE pose, pathfind, survey
ariadne/lib/core/positioning.dartRSSI → meters × floor px/m + Cramer; fingerprint k-NN
ariadne/lib/core/navigation_graph.dartDijkstra + edge projection
ariadne/lib/services/ble_scanner.dartWTK_ scan, 50-sample RSSI buffer
ariadne/lib/game/navigation_game.dartFlame renderer; live heading + pin fallback
ariadne/lib/core/heading.dartDevice heading + floor compass_angle (Gretel wrap)
ariadne/lib/core/map_scale.dartHansel map_scale + ruler_width → pixels/meter
ariadne/lib/models/navigation_data.dartBundle / floor / node / edge / beacon

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

Algorithm transfer (Gretel → SafeCall) ​

CapabilityGretel / Ariadne POCAriadne (ariadne/) 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_angleA2: heading.dart + FlutterCompass; pin when no compassLanded (A2 / #145)
map_scale / ruler / originIn JSON; unused at runtimeA3: map_scale + ruler_width → px/m on 3+ RSSI path; origin unusedLanded (A3 / #146; origin unused)
End-user vs deployment mapServer had bothPrefer cached floor_{id}_enduser.png; else deployment PNGLanded (A3 / #146)
Corridor graphactive_regions → paths (convert_coords.js) + beacon connectionsA4: import_hansel_project.ts → nodes/edges (20 px H/V snap; connections skipped)Landed (A4 / #147)
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 (A2 landed): GretaPlayer in /Users/tmin/Code/active/gretel/lib/main.dart combines device heading with per-floor compass_angle. Ariadne does the same in ariadne/lib/core/heading.dart.

Gretel path conversion (A4 landed): /Users/tmin/Code/archive/old_safecall_files/legacy/hansel/back/convert_coords.js maps active_regions line segments → paths. Import the already-converted CEDR server project.json with server/scripts/import_hansel_project.ts. How-to: Hansel import. Replay walk-through: POC replay.

Theseus vs Hansel vs current admin ​

Theseus goalLegacy HanselSafeCall todayGap
Pair to an installDeploy app JWT + hardcoded HNSL URLTheseus field QR (th_, write-scoped) plus Nav QR (read key) and Keryx QR (ntfy subscribe)Landed (T3 / #152). Do not reuse server_mobile_api_key
Pick a map / floorProject + floor list in editorTheseus snapshot catalog after pair; web Navigation + MapsLanded (T6 / #155)
Find nearby beacons while walkingPhone was Gretel (scan only). Hansel deploy scanned printed MAC / holder QRsTheseus phone BLE (WTK_). Gateway ID still ranks gateways that hear a MAC via MQTT adv4Landed (T7 / #156). Gatify is a later optional add-on
Confirm beacon on mapPixi drag in desktop editor; deploy only binds MAC / holderTheseus walk-up hear + tap-to-confirm; web Navigation can still drag beaconsLanded (T7 / #156)
Create routesDraw H/V active_regions; form-based beacon connectionsTheseus add/connect + POST /theseus/floor/:id/graph; web node/edge tools remainLanded (T8 / #157 via T5)
Wantok-only accessusers.json operators + JWT on /deploy; editor WS had no authTheseus layer-1 unlock (PHC, not a customer-box role). Roles stay admin / user / maintenance / api (lib/src/roles.ts)Landed (T2 / #151). Identity does not live on the customer box. NAS PHC OA-AT-unlock done 17 September 2026
Ops notificationsNoneTheseus foreground safecall-ops inbox. Publisher {binary_name}-ops / safecall-ops. Excluded from Keryx QR / /featuresLanded (T4 / #153). Subscribe token OA-AT-ops done 17 September 2026

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 (current) ​

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 (landed; A1–A5 closed; rasters still OA-AT-maps)
A1Ariadne POC parity#144Rename mobile/ → ariadne/ (landed); no behavior change
A2Ariadne POC parity#145Live compass + floor compass_angle (landed)
A3Ariadne POC parity#146map_scale / origin + show end-user map (landed; origin unused)
A4Ariadne POC parity#147Hansel project.json → floors / beacons / nodes / edges (landed)
A5Ariadne POC parity#148POC replay operator packet (landed; rasters still OA-AT-maps)
T0Theseus Wantok access#149Parent (landed; T1–T8 closed; OA-AT-unlock and OA-AT-ops done; maps still operator-actions)
T1Theseus Wantok access#150Scaffold theseus/ (landed)
T2Theseus Wantok access#151Layer-1 Wantok unlock (landed; NAS PHC OA-AT-unlock done 17 September 2026)
T3Theseus Wantok access#152Site-pairing QR (layer 2) (landed)
T4Theseus Wantok access#153safecall-ops inbox (landed; subscribe token OA-AT-ops done 17 September 2026)
T5Theseus site commissioning#154Server field APIs + guard_theseus (landed)
T6Theseus site commissioning#155Pick location / floor / map (landed)
T7Theseus site commissioning#156BLE discover + confirm on map (landed)
T8Theseus site commissioning#157Field route authoring (landed)

Intentionally deferred ​

  • Theseus public App Store / Play GTM.
  • Claiming Gretel store ids cz.wantok.ariadne (source IDs are com.sourcectl.ariadne).
  • 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) ​

Navigation app: ariadne/ and docs/ariadne/. Keryx product docs: docs/keryx/ (GTM remains docs/gtm/keryx/).

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)
Theseus field HTTPserver/src/theseus.ts (guard_theseus); Flutter theseus/
ntfy opsserver/src/ntfy.ts (ntfy_publish_ops_health), server/src/ntfy_topics.ts
Keryx QRserver/src/keryx_ntfy.ts
Roleslib/src/roles.ts
Importserver/scripts/import_hansel_project.ts (server/src/hansel_import.ts)