05 The executor protocol (if you write your own executor)

You normally don't need this, because plugin-host.js does it for you.

  GET  /api/plugin-jobs/claim?plugin=<name>   -> {"id":3,"claim":7,"action":"x","args":{...}}  or {"id":0}
  POST /api/plugin-jobs/complete  {"id":3,"claim":7,"ok":true,"result":{...}}  -> {"ok":true}
                                   409 {"error":"stale claim"} when the lease expired and someone else re-claimed
‹ PreviousReader file (.txt)Next ›