@discovery-tree/runner 0.1.5 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +22 -2
  2. package/dist/cli.js +1051 -774
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -123,8 +123,23 @@ could not do it. What it may do without asking:
123
123
  request Discovery Tree opened from its branch, its checks and review comments. They run as
124
124
  your `gh` login and can read whatever it can. Install the [GitHub CLI](https://cli.github.com)
125
125
  and run `gh auth login` for them to work; `doctor` checks.
126
+ Also on it, what an agent needs to start a dev server and check it: `cd`, `sleep`, `lsof`
127
+ and `TaskStop` (stops a command started with the Bash tool's background option). The agent
128
+ checks the server with `node -e "fetch('http://localhost:<port>/', …)"` (60-second timeout), which the `node` rule
129
+ already allows; there is no `curl` rule, because none keeps `curl` local (a second URL,
130
+ userinfo, `-x`, `--resolve`, `-K`). Not `kill`: the process holding a port may be yours; the
131
+ agent is told to use another port. A server started this way ends with the Claude Code
132
+ process (at most `idleTimeoutMinutes` after the last turn, or when the runner stops): Claude
133
+ Code runs in a process group of its own, and the runner ends what is left in it however
134
+ Claude Code exited. An interrupted turn leaves it running (unless Claude Code does not
135
+ answer the interrupt and the SIGINT the runner then sends ends it). It can be left running
136
+ only if it moves itself out of that group (`setsid`, a daemon), if the runner itself is
137
+ killed with SIGKILL (or the computer loses power), or on Windows, where there are no
138
+ process groups, when Claude Code exits on its own and leaves it behind.
126
139
  Left off on purpose: `WebFetch` and `WebSearch` (the easiest way for a manipulated agent to
127
- send data out), `find` (`-exec`), `sed`, `cp`, `mv` (they can write anywhere; the Edit and
140
+ send data out), `curl`, `kill`, `docker` and `sudo` (to start a database: run it
141
+ yourself beforehand, or add `"Bash(docker compose *)"` to `extraAllowedTools`; Docker access
142
+ is close to root on most machines), `find` (`-exec`), `sed`, `cp`, `mv` (they can write anywhere; the Edit and
128
143
  Write tools cover changes in the worktree), `git push` (the runner pushes) and `gh` commands
129
144
  that change GitHub, `gh api` included (Discovery Tree opens the pull request). Add, say,
130
145
  `"Bash(gh pr comment *)"` to `extraAllowedTools` if you want the agent to reply on its pull
@@ -192,7 +207,12 @@ url."git@my-alias:".insteadOf "git@github.com:"`), which git applies after the r
192
207
  4. At the end of every turn the runner commits anything left uncommitted
193
208
  (`git add -A && git commit`, only if the worktree is dirty) and runs
194
209
  `git push -u origin HEAD:<workBranch>` when the branch has commits on top of its base. Discovery
195
- Tree opens the pull request from that branch.
210
+ Tree opens the pull request from that branch with its GitHub App. When the app is not installed
211
+ on the repository, Discovery Tree asks the runner to open it instead, as you: after the push the
212
+ runner runs `gh pr create` (or finds the pull request already open with `gh pr list`), titled
213
+ after the task, with the agent's final message as its description. That needs the
214
+ [GitHub CLI](https://cli.github.com) signed in (`gh auth login`); without it the turn says why,
215
+ and you open the pull request from the branch yourself.
196
216
  5. When Discovery Tree closes the session, the worktree is removed (`git worktree remove --force`).
197
217
  The branch stays, locally and on the remote.
198
218