You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
v0.48.0 — stop and follow a run, shape how commands start, binaries
Stop a run: execute(code, { signal }) settles the run with an error when the signal aborts, fires ctx.signal for every action still running, and ends their commands. See Stop a run. (#112)
Follow a run: execute(code, { onOutput }) receives what actions write while they run, as { plugin, action, path, text }. A promise it returns holds the command's output back until it settles. bash.run, node.run and powershell.run are followed with no change to those packages. See Follow a run. (#112)
Shape how commands start: a host passes spawnHook(command, call) to Codemode.create() or fromProject() and changes the program, arguments, working directory and environment of every command an action starts, or refuses it. See Shape how commands start. (#110)
Binaries: a package declares the programs it needs in package.json under codemode.binaries, with a download and a checksum per platform. The host installs them with codemode binaries install, and an action runs one with runBinary(ctx, name, args). See Binaries. (#108, #110)
A command is asked to end before it is killed: on timeout, abort and a signal to the host, a command's process group and every process it started get SIGTERM, then SIGKILL 5 seconds later. A process that left the group with setsid() is reached too. (#113)
Breaking Changes
syncExec, ExecOptions, ExecResult and OutputParser are removed from @shiftlabs/codemode/utils/cli. Use runProgram(ctx, program, args, options). See Run a program. (#111)
The bundled docker plugin no longer passes the whole host environment to docker. It passes PATH, HOME, the proxy and certificate variables, and every DOCKER_* variable. (#111)
commandPath(name) reads PATH itself and starts no program. It answers undefined for a name with a slash in it, skips empty PATH entries, and never searches the working directory. (#111)
A call that is aborted or times out settles once its command's processes are gone, which can take up to 5 seconds longer for a command that does not end on SIGTERM. (#113)
A background process left by a shell that has already exited is no longer killed when the call's timeout passes. It keeps running, as it does after a command that returns. (#113)
The runline names keep working in this release and stop in 0.49.0, one release later than 0.47.0 announced. See Migrating from runline. (#114)
Added
ctx.output(text), for an action that hands the host output while it runs. (#112)
runProgram and runBinary in @shiftlabs/codemode/utils/cli, which run a program with an argument list and answer stdout, stderr and exitCode. The program gets a short list of the host's environment and the variables the call names. (#111)
ctx.binary(name), the path of a binary the plugin declares. (#108, #110)
codemode binaries list, install, remove and entry, and BinaryManager for a host that installs them itself. (#108, #110)
env on a shell plugin's connection, variables added to every command it runs. (#110)
Changed
Local MCP servers inherit the proxy and certificate variables of the host. (#110)
A host process that is interrupted asks its commands to end and waits for them. A second interrupt kills them at once. (#113)
Fixed
A package or binary install command that outlives its timeout is reported as failed, including one that exits cleanly when asked to end. (#113)