Skip to main content

Arguments

Output

The job. While it is live, next names the call to make next. Once it has ended, stop says to stop calling get_job.
  • Pass wait_seconds to wait until the job asks a question or finishes. If the wait ends first, call again. Each answer’s next names the exact call to make next.
  • Each next suggests its wait_seconds: 30 seconds for a run, 30 seconds to 4 minutes for a build, longer as it goes on, and 4 minutes for a repair or a long run. Waiting longer is fine. A caller whose server receives webhooks can create one with call_pomerado_api with operation “webhooks.create” to learn when a job asks a question or ends, instead of polling.
  • Each time a build’s build.now.label changes, show the user its progress as a text bar: the position of build.stage in build.stages, then build.now.label, such as [######----] 3/5 Exploring the site.
  • Never ask for a password in chat. When a job needs a login, a code or an approval, give the user its input_request’s answer_url and keep waiting here, with wait_past set to that request’s id.
  • When a job asks any other question (input_request), follow its next: answer it yourself with answer_job if your task already settles it, otherwise ask your user and answer with theirs, or, when your user chose to answer on a form, give them its answer_url; then keep following the job with get_job. A browser_handoff question is never answered with answer_job: send your user its answer_url, where a person finishes the step in the job’s live browser and marks it done, and keep following the job. Unanswered, a question expires after 10 minutes, a browser_handoff after 30 minutes; it fails a run and can pause or end a build.
  • Keep calling until a reply says the job has ended, and keep the connection open. A question expires 10 minutes after it is asked, a browser_handoff 30 minutes. A job you stop following can fail on it. Never start the same job again.
  • When a run’s tool breaks, the run returns with maintenance.status repairing while Pomerado fixes the tool. Don’t cancel it. Keep calling get_job, and keep the connection open, until the repair ends.
  • A result is handed out once; include_result false reads the job without using it up.
  • Status needs_input with error credentials_rejected means the website rejected the saved login. The job waits up to 60 minutes for the user to correct it on the page its next names, then resumes. Don’t resubmit it.
  • A finished build names its tool as tool_id. Run it with run_website_tool, or run_read_only_website_tool when its effect is read.
Effect: Reads only; changes nothing.