markpact-pololu

Runtime model

Flow i Markpact nie wiedzą, czy runtime to ESP32, ESP32-P4, RPi3, Windows czy Linux. Wspólny kontrakt to URI call envelope — patrz URI-ROUTER.md.

Mapa paczek (centrum urisys): urisys/docs/MESH.md.

{
  "uri": "stepper://tic-t249/axis/x/command/move-relative",
  "payload": {"steps": 100, "speed_sps": 200, "accel_sps2": 100},
  "context": {"approved": true, "dry_run": true, "environment": "mock"}
}

Warstwy

flowchart LR
  MP[Markpact]
  US[urisys]
  UR[urirouter]
  TR[transport]
  RT[runtime]
  DR[driver]

  MP --> US --> UR --> TR --> RT --> DR
Plik / paczka Rola
markpacts/*.markpact.md capability, policy, flow
urisys orchestracja, flow runner
urirouter resolver YAML, delegate HTTP/MQTT
uricore local dispatch gdy transport=local
profiles/targets.yaml deployment profiles (ops)
profiles/urisys.runtime.*.yaml resolver (make resolver)
profiles/stepper.payload.schema.yaml wspólny payload stepper

Materializacja kodu

src/web
  HTML/JS → HTTP fetch lub MQTT over WebSocket (tellmesh/tic-t249, legacy uritic/…)

src/firmware/esp32-i2c-http-mqtt
  HTTP/MQTT → Pololu Tic Arduino library → I²C → Tic T249

src/firmware/esp32p4-usb-http-mqtt
  HTTP/MQTT → ESP-IDF USB Host → Tic T249

src/host (uritic-host)
  HTTP/MQTT → ticcmd → USB → Tic T249

Orchestracja urisys

export TELLMESH_ROOT=~/github/tellmesh
pip install -e $TELLMESH_ROOT/urirouter -e $TELLMESH_ROOT/uricore
./scripts/run-urisys-flow.sh tic-t249-hybrid-pc-esp32

Resolver ładowany z profiles/edge.config.yaml (resolver_path względem katalogu profiles/).

Plan refaktoryzacji: REFACTORING.md.