openvibers/openvibe.actor Commits

API page: a running task's desk (watch and take over) and needs_you on GET /api/v1/tasks/:id (#145)

OP OpenVibers committed 17 days ago · 4affc919a3 · 1 file, +1 −1

Changes

ddiff --git a/server/http/pages.js b/server/http/pages.js
iindex ecf02cc..a98cee1 100644
---- a/server/http/pages.js
++++ b/server/http/pages.js
@@@ -546,7 +546,7 @@ data: {"task_id":"tsk_…","seq":3,"kind":"output","agent":"openvibe-runtime","s
<li><strong>Anyone</strong>: <code>GET /api/v1/agents</code> and <code>POST /api/v1/route</code> need no token.</li></ul>
${table(['Route', 'Capability', 'What it does'], [
[html`<code>POST /api/v1/tasks</code>`, html`<code>actor.task.create</code>`, html`Create a task: <code>{ task, mode?, budget?: { per_task_usd, per_day_usd }, agent?, idempotency_key?, webhooks?: [{ url, events, secret_ref? }] }</code>. Answers 201 with the task (queued); with webhooks, also its <code>webhook_secret</code>, this once, unless every webhook names a project secret (<a href="#webhooks">webhooks</a>).`],
-- [html`<code>GET /api/v1/tasks/:id</code>`, html`<code>actor.task.read</code>`, 'The task: state, result, cost, explanation, error.'],
++ [html`<code>GET /api/v1/tasks/:id</code>`, html`<code>actor.task.read</code>`, html`The task: state, result, cost, explanation, error. While it runs on a desk of its own, <code>desk</code> (<code>url</code>: the person's page to watch it live and take it over; <code>kind</code>: <code>browser</code> or <code>desktop</code>); while it waits for its person to do a step there, <code>needs_you</code> (<code>what</code>, <code>url</code>).`],
[html`<code>GET /api/v1/tasks/:id/events</code>`, html`<code>actor.task.read</code>`, html`Server-sent events (<code>actor.task-event@1</code>): <code>state</code>, <code>output</code> (each step), <code>end</code>. Resumes with <code>Last-Event-ID</code>.`],
[html`<code>POST /api/v1/tasks/:id/cancel</code>`, html`<code>actor.task.create</code>`, 'Stop it. What was spent stays spent.'],
[html`<code>GET /api/v1/tasks</code>`, html`<code>actor.task.list</code>`, html`Your tasks, newest first; <code>?limit=</code>, <code>?before=</code> (the <code>next</code> cursor).`],