@discovery-tree/runner 0.1.10 → 0.1.11
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.
- package/README.md +16 -7
- package/dist/cli.js +1130 -116
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -54,7 +54,8 @@ banner. Check it.
|
|
|
54
54
|
|
|
55
55
|
The runner only makes outbound HTTPS requests to the Discovery Tree server: a heartbeat every
|
|
56
56
|
15 seconds, a long poll for commands, and posts of session events. Nothing listens on a port.
|
|
57
|
-
|
|
57
|
+
There is one heartbeat and one poll per runner, however many sessions it runs. Heartbeats that
|
|
58
|
+
fail are retried less and less often, with jitter, up to every two minutes. If the server limits the command polls (HTTP 429) the runner waits a few seconds, with jitter,
|
|
58
59
|
and polls again; if it refuses a batch of session events as too large (HTTP 413) the runner
|
|
59
60
|
logs it, drops that batch and carries on.
|
|
60
61
|
|
|
@@ -106,8 +107,14 @@ Environment variables: `DT_SERVER_URL` (server), `DT_RUNNER_TOKEN` (token; overr
|
|
|
106
107
|
|
|
107
108
|
**With the default settings, the agent can run arbitrary code on your computer as you.** The
|
|
108
109
|
runner runs an AI agent with your user's access. Nobody is at the keyboard to answer Claude
|
|
109
|
-
Code's permission prompts, so
|
|
110
|
-
|
|
110
|
+
Code's permission prompts, so the runner relays each one to Discovery Tree and holds the tool
|
|
111
|
+
call until you allow or deny it there. Only you, the run's owner, can answer. "Always allow"
|
|
112
|
+
allows that tool by name, whatever its input (all `Bash` commands, say), for the rest of the run.
|
|
113
|
+
A request nobody answers is denied when the turn ends, is interrupted, or after 30 minutes. With
|
|
114
|
+
a Claude Code too old to relay prompts (no `--permission-prompt-tool`), or a Discovery Tree
|
|
115
|
+
server that does not ask for it, anything that would prompt is denied and the agent reports that
|
|
116
|
+
it could not do it. Deny rules (below) are applied before Claude Code asks, so what they deny is
|
|
117
|
+
never offered to you. What it may do without asking:
|
|
111
118
|
|
|
112
119
|
- **`permissionMode: "acceptEdits"`** (default): file edits inside the worktree are allowed.
|
|
113
120
|
- **The allow-list** (`DEFAULT_ALLOWED_TOOLS` in `src/config.ts`): the file tools (`Read`,
|
|
@@ -131,11 +138,13 @@ could not do it. What it may do without asking:
|
|
|
131
138
|
agent is told to use another port. A server started this way ends with the Claude Code
|
|
132
139
|
process (at most `idleTimeoutMinutes` after the last turn, or when the runner stops): Claude
|
|
133
140
|
Code runs in a process group of its own, and the runner ends what is left in it however
|
|
134
|
-
Claude Code exited.
|
|
141
|
+
Claude Code exited. On Windows, which has no process groups, the runner instead looks up
|
|
142
|
+
every process descended from the exited Claude Code (by parent process id) and ends it with
|
|
143
|
+
`taskkill /T /F`. An interrupted turn leaves it running (unless Claude Code does not
|
|
135
144
|
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
|
|
137
|
-
|
|
138
|
-
|
|
145
|
+
only if it moves itself out of that group (`setsid`, a daemon; on Windows, a process whose
|
|
146
|
+
parent exited before Claude Code did), or if the runner itself is killed with SIGKILL or
|
|
147
|
+
from Task Manager (or the computer loses power).
|
|
139
148
|
Left off on purpose: `WebFetch` and `WebSearch` (the easiest way for a manipulated agent to
|
|
140
149
|
send data out), `curl`, `kill`, `docker` and `sudo` (to start a database: run it
|
|
141
150
|
yourself beforehand, or add `"Bash(docker compose *)"` to `extraAllowedTools`; Docker access
|