local pm = require'pm' local ws = assert(http.websocket("wss://citrons.xyz/ws-echo/rebecca")) function main() print("listening") while true do local msg = ws.receive() local parsed = assert(textutils.unserializeJSON(msg)) if parsed.msg then print("got msg",parsed.msg) -- more sophisticated cmds later, maybe local pkgname = parsed.msg pm.dl(pkgname) multishell.run(pkgname..'.lua') end end end local ok, err = pcall(main) if not ok then print(err) end print("all done")