Repository navigation
wake-server 0.5.0
·
15 commits
to main
since this release
Added
- The server serves wake/v1's calls for devices that watch. An agent's owner adds a phone or a browser with a code
issueWatchCodemakes in your own interface, and the device lists the agent's runs and answers asks.wakeHandlerservesPOST /wake/v1/watchand the watch routes (runs, as server-sent events likepending,answer,places,watching,push,activity), with CORS for a browser. A place key opens none of them, and a watch key none of Wake's. plansays what an agent's plan includes. It is asked at each watch call. On a plan without devices, every watch route butwatchinganswers402 not-in-plan; withoutplan, everything is included.POST /wake/v1/waiting: Wake can say a run waits on its owner. The owner's devices see it, andforSubject,forOwnerandforScopeanswerwaiting: true.summontakesaskerName. The owner's devices show who asks.devices,forgetDeviceandalertTargets. An agent's devices for its owner to see and remove, and which of them want an alert, and how to reach each.
Changed
- New tables and columns: migrate before you deploy.
wake_watch_codesandwake_devicesare new, andwake_places.last_claim_at,wake_summonses.asker_nameandwake_summonses.waitingare added. drizzle-kit finds them,WAKE_TABLES_SQLrun again adds them, and on SQLiteWAKE_SQLITE_DEVICES_UPGRADEdoes, once. - A
WakeStoreof your own needs the device methods.insertWatchCode,useWatchCode,insertDevice,deviceByKeyHash,devicesOf,patchDeviceandlatestOf. - Pairing takes control characters out of a machine's name. A device shows the name as it reads.