coderClaw

Location command (nodes)

TL;DR

Why a selector (not just a switch)

OS permissions are multi-level. We can expose a selector in-app, but the OS still decides the actual grant.

Selector in UI drives our requested mode; actual grant lives in OS settings.

Settings model

Per node device:

UI behavior:

Permissions mapping (node.permissions)

Optional. macOS node reports location via the permissions map; iOS/Android may omit it.

Command: location.get

Called via node.invoke.

Params (suggested):

{
  "timeoutMs": 10000,
  "maxAgeMs": 15000,
  "desiredAccuracy": "coarse|balanced|precise"
}

Response payload:

{
  "lat": 48.20849,
  "lon": 16.37208,
  "accuracyMeters": 12.5,
  "altitudeMeters": 182.0,
  "speedMps": 0.0,
  "headingDeg": 270.0,
  "timestamp": "2026-01-03T12:34:56.000Z",
  "isPrecise": true,
  "source": "gps|wifi|cell|unknown"
}

Errors (stable codes):

Background behavior (future)

Goal: model can request location even when node is backgrounded, but only when:

Push-triggered flow (future):

  1. Gateway sends a push to the node (silent push or FCM data).
  2. Node wakes briefly and requests location from the device.
  3. Node forwards payload to Gateway.

Notes:

Model/tooling integration

UX copy (suggested)