@discovery-tree/runner 0.1.20 → 0.1.21
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 +33 -10
- package/dist/cli.js +717 -94
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -290,16 +290,39 @@ reads Cursor's credential files: "signed in" is whatever `cursor-agent status` s
|
|
|
290
290
|
**`CURSOR_API_KEY` in the runner's environment makes the CLI sign in with that key** instead of
|
|
291
291
|
your `cursor-agent login`. `dt-runner doctor` and `dt-runner start` warn when it is set.
|
|
292
292
|
|
|
293
|
-
Headless, the Cursor CLI asks no questions:
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
293
|
+
Headless, the Cursor CLI asks no questions mid-turn: a shell command its permission rules (or
|
|
294
|
+
its auto-review) do not allow is rejected, because print mode cannot stop to ask. Each turn
|
|
295
|
+
passes `--trust` so a fresh session worktree is trusted without an interactive prompt, and
|
|
296
|
+
`--sandbox enabled` so commands and file writes stay in that worktree. Despite the sandbox, a
|
|
297
|
+
command the CLI's allow-list does not name can still be rejected (the CLI's default allow-list
|
|
298
|
+
is only `Shell(ls)`), so the runner does not count on the sandbox to let one through.
|
|
299
|
+
|
|
300
|
+
**A rejected shell command is offered in Discovery Tree** as a denial, with a rule in the CLI's
|
|
301
|
+
own syntax, which names a command by its first word: `.venv/bin/python scripts/x.py` offers
|
|
302
|
+
`Shell(.venv/bin/python)`. **Allow once** applies it for the rest of the run; **Always allow**
|
|
303
|
+
saves it for the repository, with Claude Code's rules (each agent reads only its own syntax).
|
|
304
|
+
Before each turn, the runner adds the run's and the repository's `Shell(...)` rules to the
|
|
305
|
+
worktree's `.cursor/cli.json` `permissions.allow`, the CLI's project-level rules, keeping the
|
|
306
|
+
repository's own entries. The file is kept out of what the agent commits (excluded from git, or
|
|
307
|
+
marked `skip-worktree` when the repository tracks it), and the agent cannot edit it: the CLI
|
|
308
|
+
refuses an agent's write to its permission files. The runner's other tool rules
|
|
309
|
+
(`allowedTools`, inherited rules) are Claude Code's and do not apply to Cursor. The CLI's
|
|
310
|
+
global rules (`~/.cursor/cli-config.json`) still apply, and a deny rule there or in the
|
|
311
|
+
repository's file is never overridden. The same `--sandbox` flag is passed when a turn continues
|
|
312
|
+
with `--resume`.
|
|
313
|
+
|
|
314
|
+
The CLI keeps network separate from that sandbox, and a turn has no network flag (only
|
|
315
|
+
`agent sandbox run --network`, which is not how a turn is started). The runner does not set
|
|
316
|
+
`sandbox.networkAccess` and does not edit `~/.cursor/cli-config.json`, so network stays at the
|
|
317
|
+
CLI's own setting. That defaults to `user_config_with_defaults`: the sandbox's built-in domain
|
|
318
|
+
allowlist plus anything in `sandbox.json`, not open network (`allow_all`). The workspace sandbox
|
|
319
|
+
also still allows its own temp directory (`/tmp` on Linux). `cursorForce` is what drops the
|
|
320
|
+
sandbox.
|
|
321
|
+
|
|
322
|
+
| Key | Default | Meaning |
|
|
323
|
+
| --------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
324
|
+
| `cursorSandbox` | `true` | Pass `--sandbox enabled` on every turn, a resumed one included. `false` passes `--sandbox disabled`: the allow-list decides again, and a command it does not name (Python included) is not run. |
|
|
325
|
+
| `cursorForce` | `false` | Pass `--force` as well. Cursor then runs commands and writes files without asking, on the whole computer, past the sandbox. `dt-runner start` warns when on. |
|
|
303
326
|
|
|
304
327
|
Interrupting a Cursor turn stops its process (and what it started); the next message resumes the
|
|
305
328
|
chat. Planning requests are still answered by Claude Code.
|