Skip to main content

Module person

Module person 

Source
Expand description

Commands run for a person from an interface that confirmed them.

  • run: the person’s own command, a fix speccoder printed (npm install, git add … && git commit …). It runs in the project folder, in the OS sandbox with the network on and without the variables speccoder treats as secret, for ten minutes at most.
  • speccoder: one of speccoder’s own commands that has no action of its own (speccoder run --ignore-checklists): this binary, with no time limit, its result read back as the job’s.

Each runs in a process group of its own: a stop ends it and everything it started, and the job always ends. Output is masked and streamed line by line. Which argvs may run is the interface’s to prove (the web host runs only the ones it issued); this module never decides that.

Enums§

Stream
Which stream a line came from.

Constants§

TIMEOUT
How long the person’s own command may run.

Functions§

open_terminal
Opens a terminal of the person’s own at root (macOS: Terminal; elsewhere $TERMINAL, else x-terminal-emulator).
run
Runs the person’s own argvs in root, one after the other while each succeeds, each line of output handed to line (masked). Ends early, with everything it started, when cancel turns true or after timeout.
sandboxed
Whether the person’s commands run in an OS sandbox here: there is one, and the speccoder binary that starts them in it.
shown
The argvs as a shell reads them.
speccoder
Runs speccoder itself with args in root, as a job: no time limit, a stop asks it to stop (as ctrl-c would) before it is killed. Its standard error goes to line; its result, read from --json, is the job’s. Err: it gave none (it could not start, or was stopped first).