Repository navigation
feat(controller): prompt starts its task as a background job (#254) - #258
Merged
Merged
Conversation
Member
Author
|
Ran it for real on a libvirt VM (Hornet pool VM,
Not checked live: the PR description says a running job's tmux session shows up in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #254.
What
boxery prompt NAME "TASK"now startspi -p TASKas a background job (the same mechanism asrun --bg), instead of a hand-rolled tmux session with a log file. So the job commands work on agent tasks:Before, the same command printed
started task-… on demo — watch: boxery attach demo pi task-… log: boxery run demo cat .boxery/task-….log, and none ofjob ls|logs|wait|killcould see the task. Waiting for one meant polling the log for a[boxery] task finishedline by hand.(The transcript above shows the output format the tests assert; I did not run this against a live VM.)
Behavior changes
promptprints a job id (job-…) and thejob wait/job logs -fcommands, not a tmux session name and a log path.~/project/.boxery/task-*.logand noattach NAME pi task-…for a prompt task any more. The output is the job's log (job logs).pi -pis non-interactive and prints its answer when it finishes, so attaching showed nothing more than the log did.agent lslists it asjob-…. (From the helper code; not observed on a live VM.)llm:grant pre-check (needPiGrant) still runs first, and the task text reaches pi byte-for-byte as one argument (it now travels as the job's base64 argv, so there is no quoting to get wrong). The child still runs in~/project.Not in this PR
prompt --wait.Tests
test/jobs.test.mjs: new end-to-end test with the real CLI and VM helper against the fake VM.promptstarts a job whose log is pi's output,job waitexits with pi's status (a stubpiexits 7),job lslists it, the task is one argv word, and the cwd is~/project.test/cli-families.test.mjs: the two prompt tests now decode the job's argv instead of the old tmux script.test/shell/common/controller-local.sh: the "started" and "log hint" cases become "starts a job" and "runspi -pwith the task as one argument".docs/cli.md, and two comments intest/parity.test.mjsupdated.npm test(533 passed, 1 skipped),npm run lint,npm run typecheck,npm run docs:cli(no diff) andnpm run test:shellpass.Developed with an AI agent assistant and reviewed by me.