duckhunt-runner 0.10.1 → 0.11.0
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 +138 -38
- package/dist/aws-env.d.ts +21 -0
- package/dist/aws-env.d.ts.map +1 -0
- package/dist/aws-env.js +80 -0
- package/dist/aws-env.js.map +1 -0
- package/dist/aws.d.ts.map +1 -1
- package/dist/aws.js +3 -2
- package/dist/aws.js.map +1 -1
- package/dist/claim.d.ts +11 -0
- package/dist/claim.d.ts.map +1 -1
- package/dist/claim.js +18 -0
- package/dist/claim.js.map +1 -1
- package/dist/claude-args.d.ts +5 -1
- package/dist/claude-args.d.ts.map +1 -1
- package/dist/claude-args.js +26 -7
- package/dist/claude-args.js.map +1 -1
- package/dist/config.d.ts +17 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +37 -2
- package/dist/config.js.map +1 -1
- package/dist/conversation-gc.d.ts +9 -2
- package/dist/conversation-gc.d.ts.map +1 -1
- package/dist/conversation-gc.js +13 -6
- package/dist/conversation-gc.js.map +1 -1
- package/dist/daemon.d.ts +9 -1
- package/dist/daemon.d.ts.map +1 -1
- package/dist/daemon.js +191 -41
- package/dist/daemon.js.map +1 -1
- package/dist/index.js +13 -5
- package/dist/index.js.map +1 -1
- package/dist/logout.d.ts +16 -0
- package/dist/logout.d.ts.map +1 -0
- package/dist/logout.js +78 -0
- package/dist/logout.js.map +1 -0
- package/dist/machine.d.ts +18 -0
- package/dist/machine.d.ts.map +1 -0
- package/dist/machine.js +52 -0
- package/dist/machine.js.map +1 -0
- package/dist/oauth.d.ts +4 -0
- package/dist/oauth.d.ts.map +1 -1
- package/dist/oauth.js +49 -4
- package/dist/oauth.js.map +1 -1
- package/dist/read-shell-guard.d.ts +32 -0
- package/dist/read-shell-guard.d.ts.map +1 -0
- package/dist/read-shell-guard.js +221 -0
- package/dist/read-shell-guard.js.map +1 -0
- package/dist/repos.d.ts.map +1 -1
- package/dist/repos.js +9 -3
- package/dist/repos.js.map +1 -1
- package/dist/run-mcp-config.d.ts +15 -0
- package/dist/run-mcp-config.d.ts.map +1 -0
- package/dist/run-mcp-config.js +83 -0
- package/dist/run-mcp-config.js.map +1 -0
- package/dist/secret-paths.d.ts +8 -0
- package/dist/secret-paths.d.ts.map +1 -0
- package/dist/secret-paths.js +77 -0
- package/dist/secret-paths.js.map +1 -0
- package/dist/server-state.d.ts +40 -0
- package/dist/server-state.d.ts.map +1 -0
- package/dist/server-state.js +76 -0
- package/dist/server-state.js.map +1 -0
- package/dist/status.d.ts +3 -0
- package/dist/status.d.ts.map +1 -1
- package/dist/status.js +50 -6
- package/dist/status.js.map +1 -1
- package/dist/worktree.d.ts +9 -0
- package/dist/worktree.d.ts.map +1 -1
- package/dist/worktree.js +14 -6
- package/dist/worktree.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ Local daemon for [duckhunt](https://duckhunt.info) agent runs.
|
|
|
5
5
|
When something needs investigating — a CloudWatch alarm, a failing check, an issue — duckhunt
|
|
6
6
|
queues an *agent run*. This daemon claims it and launches **Claude Code headless on your own
|
|
7
7
|
machine**, so the agent works with your Claude login, your git checkouts and your AWS CLI. It
|
|
8
|
-
|
|
8
|
+
answers in the run's conversation in duckhunt, which reaches you as a push notification.
|
|
9
9
|
|
|
10
10
|
You can also start a run yourself: the *Agents* page in duckhunt is a chat with an agent running
|
|
11
11
|
on this machine, in a checkout of one of your repos (see [Prompt runs](#prompt-runs)).
|
|
@@ -28,12 +28,14 @@ disk. With the progress feed on, it also receives what the agent says and one li
|
|
|
28
28
|
## Setup
|
|
29
29
|
|
|
30
30
|
```sh
|
|
31
|
-
npx duckhunt-runner login
|
|
32
|
-
npx duckhunt-runner repos discover ~/dev
|
|
33
|
-
npx duckhunt-runner start
|
|
31
|
+
npx duckhunt-runner@0.11.0 login
|
|
32
|
+
npx duckhunt-runner@0.11.0 repos discover ~/dev
|
|
33
|
+
npx duckhunt-runner@0.11.0 start
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
Pin the version: the daemon runs `claude -p` with a shell on your machine, so install the release you
|
|
37
|
+
mean to run (Settings → Agents → Machines shows the commands pinned to the version duckhunt
|
|
38
|
+
recommends). That is the whole thing. Step by step:
|
|
37
39
|
|
|
38
40
|
| Command | What it does |
|
|
39
41
|
| --- | --- |
|
|
@@ -42,14 +44,16 @@ That is the whole thing. Step by step:
|
|
|
42
44
|
| `repos list\|add\|remove` | Manage that map by hand: `repos add <workspace/slug> <path>`. `list` and `add` show each repo's health warnings (see below). |
|
|
43
45
|
| `aws add <accountId> <profile>` | Optional. Binds an AWS account id to a profile of your local AWS CLI, so the agent can read metrics, logs and resource state for that account. |
|
|
44
46
|
| `aws list\|remove` | Manage the AWS map. |
|
|
45
|
-
| `status` | Reports whether a daemon is running
|
|
47
|
+
| `status` | Reports whether a daemon is running, this machine's kit (Claude version, which credential it will use, AWS profiles and mapped repos) and what duckhunt last said about this machine (see [Machines](#machines-and-credentials)). Run this first when something does not work. |
|
|
48
|
+
| `logout` | Unpairs this machine from duckhunt and deletes its credential from the config file (0.11.0 or later; see [Machines](#machines-and-credentials)). |
|
|
46
49
|
| `start [--verbose]` | Starts the claim loop. |
|
|
47
50
|
|
|
48
|
-
Configuration lives in `~/.duckhunt-runner.json`. It holds the base URL, the OAuth credential,
|
|
49
|
-
repo and AWS maps, and optional defaults (`model`, `maxBudgetUsd`, `maxConcurrent`). Set `DUCKHUNT_RUNNER_CONFIG` to use
|
|
51
|
+
Configuration lives in `~/.duckhunt-runner.json`. It holds the base URL, the OAuth credential, this
|
|
52
|
+
machine's id, the repo and AWS maps, and optional defaults (`model`, `maxBudgetUsd`, `maxConcurrent`). Set `DUCKHUNT_RUNNER_CONFIG` to use
|
|
50
53
|
another file (a second account, a test instance) and `DUCKHUNT_RUNNER_HOME` to move the state
|
|
51
|
-
directory (`~/.duckhunt-runner`: the scratch directory, `--verbose` logs
|
|
52
|
-
|
|
54
|
+
directory (`~/.duckhunt-runner`: the scratch directory, `--verbose` logs, the daemon lock, the
|
|
55
|
+
per-run MCP configs and `server-state.json`, what duckhunt last said about this machine). `--version`
|
|
56
|
+
prints the daemon version.
|
|
53
57
|
|
|
54
58
|
The daemon does not need a restart after `login`, `repos`, `aws` or a hand edit of the file: it
|
|
55
59
|
rereads the config every few seconds, even while all its slots are busy. Each command, and the
|
|
@@ -60,8 +64,9 @@ daemon keeps the config it has and says so.
|
|
|
60
64
|
### Repo health
|
|
61
65
|
|
|
62
66
|
The daemon checks every mapped checkout when it starts and every 10 minutes, prints what changed,
|
|
63
|
-
and reports it to duckhunt, which shows it on the
|
|
64
|
-
you when a repo stops being usable. Only the repo key and a code travel,
|
|
67
|
+
and reports it to duckhunt, which shows it on the machine's row (Settings → Agents → Machines) and in
|
|
68
|
+
the repo picker and notifies you when a repo stops being usable. Only the repo key and a code travel,
|
|
69
|
+
never a path.
|
|
65
70
|
|
|
66
71
|
| Code | Meaning | Blocks runs |
|
|
67
72
|
| --- | --- | --- |
|
|
@@ -78,7 +83,7 @@ Duplicates are looked for among the siblings of each mapped checkout, one level
|
|
|
78
83
|
|
|
79
84
|
#### Fixing the map from duckhunt
|
|
80
85
|
|
|
81
|
-
The mapped-repos list on the
|
|
86
|
+
The mapped-repos list on the machine's row can remove a repo from this machine's map, or point it at
|
|
82
87
|
another folder when the daemon found more than one checkout of it (or found it somewhere else after
|
|
83
88
|
its folder disappeared). To make that choice possible, the daemon sends the **folder name** of each
|
|
84
89
|
candidate (with its parent only when two share a name), its branch, the age of its last commit and
|
|
@@ -91,7 +96,7 @@ daemon writes only that entry of its map to the config file, checks again and re
|
|
|
91
96
|
a few seconds.
|
|
92
97
|
|
|
93
98
|
To keep the map CLI-only on a machine, set `"remoteRepoEdits": false` under `defaults` in
|
|
94
|
-
`~/.duckhunt-runner.json`: the
|
|
99
|
+
`~/.duckhunt-runner.json`: the row then hides the controls.
|
|
95
100
|
|
|
96
101
|
### Keeping it running
|
|
97
102
|
|
|
@@ -104,8 +109,10 @@ already does for this — a `screen`/`tmux` session, a systemd user service, `la
|
|
|
104
109
|
Description=duckhunt runner
|
|
105
110
|
|
|
106
111
|
[Service]
|
|
107
|
-
ExecStart=/usr/bin/npx duckhunt-runner start
|
|
112
|
+
ExecStart=/usr/bin/npx duckhunt-runner@0.11.0 start
|
|
108
113
|
Restart=always
|
|
114
|
+
# 78: this machine was unpaired (or its credential expired); it needs a new `login`, not a restart.
|
|
115
|
+
RestartPreventExitStatus=78
|
|
109
116
|
|
|
110
117
|
[Install]
|
|
111
118
|
WantedBy=default.target
|
|
@@ -119,6 +126,39 @@ run while the daemon that holds it is alive; a lock left by a daemon that died,
|
|
|
119
126
|
reboot, is replaced. To run a
|
|
120
127
|
second account on the same machine, give it its own `DUCKHUNT_RUNNER_CONFIG` and `DUCKHUNT_RUNNER_HOME`.
|
|
121
128
|
|
|
129
|
+
### Machines and credentials
|
|
130
|
+
|
|
131
|
+
Each `login` registers a new credential, and duckhunt lists every machine you have paired under
|
|
132
|
+
Settings → Agents → Machines, where you can rename it, pause it, choose what it accepts
|
|
133
|
+
(conversations, unattended investigations or both), cap its slots and unpair it.
|
|
134
|
+
|
|
135
|
+
From 0.11.0 the daemon gives this machine a stable id (a random UUID, stored in the config file
|
|
136
|
+
together with the hostname it was created on) and announces it with every claim. Until the first
|
|
137
|
+
claim with a new credential, it also announces the client id that `login` replaced. When duckhunt
|
|
138
|
+
sees a known id from the same account, it **adopts** the existing machine: the new credential takes
|
|
139
|
+
over the machine's name, settings and conversations, the old credential is revoked, and no ghost
|
|
140
|
+
machine is left behind. Runs already in progress keep their MCP access: their per-run tokens are
|
|
141
|
+
only revoked when each step ends. Adoption never crosses accounts. A config file copied to another
|
|
142
|
+
host does not claim to be the original machine: `login` there creates a new id instead.
|
|
143
|
+
|
|
144
|
+
`duckhunt-runner logout` unpairs the machine from the machine itself: duckhunt revokes its
|
|
145
|
+
credential, deletes the machine and cancels the runs it had in progress (exactly what the × on its
|
|
146
|
+
row does), and the daemon deletes `clientId` and `refreshToken` from the config file. The maps,
|
|
147
|
+
defaults and machine id stay, so a later `login` pairs it again. Against a duckhunt that does not
|
|
148
|
+
know `logout` yet (404), or with a credential that was already dead, it only deletes the local one and
|
|
149
|
+
says so; a network or server error deletes nothing, so you can retry. A running daemon stops on its
|
|
150
|
+
next call.
|
|
151
|
+
|
|
152
|
+
When the credential is rejected (the machine was unpaired from duckhunt or with `logout`, or the
|
|
153
|
+
credential was revoked or expired), the daemon stops claiming, stops its runs and exits with code
|
|
154
|
+
**78** instead of retrying every few seconds. Run `login` again to pair it.
|
|
155
|
+
|
|
156
|
+
`status` prints what duckhunt said about this machine in the daemon's last claim, and how long ago:
|
|
157
|
+
its name in duckhunt, whether it is paused, what it accepts, its slot cap, why it is not getting work
|
|
158
|
+
(paused, no free slot, needs an update) and the worktrees kept with unsaved work. It never talks to
|
|
159
|
+
the server itself: refreshing the credential from a second process would rotate the running daemon's
|
|
160
|
+
token, which duckhunt treats as a replay.
|
|
161
|
+
|
|
122
162
|
### Parallel runs
|
|
123
163
|
|
|
124
164
|
By default the daemon works one run at a time. Set `defaults.maxConcurrent` in the config (1 to 8)
|
|
@@ -131,8 +171,8 @@ to run several at once; a running daemon picks it up within a few seconds:
|
|
|
131
171
|
Each Claude process takes a few hundred MB, and every parallel session draws on the same Claude plan
|
|
132
172
|
limits. A conversation never runs twice at once: duckhunt keeps it as a single run. What the runs
|
|
133
173
|
share on this machine takes turns: git operations on the same checkout (fetch, worktree
|
|
134
|
-
creation and cleanup),
|
|
135
|
-
|
|
174
|
+
creation and cleanup), conversations opened in the checkout itself, and prompt runs with the `edit`
|
|
175
|
+
profile and no repo (they share the scratch directory). A run waiting for its turn
|
|
136
176
|
still heartbeats and says so in its feed. The daemon reports its slot count, and Settings → Agents
|
|
137
177
|
shows how many are in use. Never run two daemons on the same config file: the credential rotates on
|
|
138
178
|
every refresh and duckhunt revokes it when it sees an old one again. `start` refuses a second daemon
|
|
@@ -143,10 +183,12 @@ on the same state directory; raise one daemon's slots instead.
|
|
|
143
183
|
1. **A run is queued** from duckhunt: the *investigate with agent* action on an entry, the same
|
|
144
184
|
button on an alert notification, or an automation rule with that action.
|
|
145
185
|
2. **The daemon claims it** and gets a prompt, a tool profile and a short-lived MCP token scoped to
|
|
146
|
-
that single run. It launches `claude -p` in the mapped checkout (or a scratch
|
|
147
|
-
alarm has no repo).
|
|
148
|
-
|
|
149
|
-
|
|
186
|
+
that single run. It launches `claude -p` in a worktree of the mapped checkout (or a scratch
|
|
187
|
+
directory when the alarm has no repo). An automation run is a `read` conversation like any other
|
|
188
|
+
(see [Prompt runs](#prompt-runs)), with an even smaller kit: no web, no memory, and no shell when
|
|
189
|
+
the rule may comment on the ticket.
|
|
190
|
+
3. **The agent investigates** and answers in the run's conversation, on the *Agents* page. You get a
|
|
191
|
+
push with a one-line summary on top and can reply to it straight from the notification.
|
|
150
192
|
4. **If it needs a decision from you**, it asks and ends its turn. Your answer resumes it in the
|
|
151
193
|
*same* Claude session, so nothing it had already found is lost.
|
|
152
194
|
|
|
@@ -159,10 +201,20 @@ run's token:
|
|
|
159
201
|
| --- | --- |
|
|
160
202
|
| Started automatically | Read only. |
|
|
161
203
|
| Born from an instruction of yours | Also write inside duckhunt (create tasks, snooze the inbox, label). |
|
|
162
|
-
| Born from a yes/no you confirmed | Also
|
|
204
|
+
| Born from a yes/no you confirmed | Also act outside duckhunt through its tools (comment on or move the ticket). |
|
|
163
205
|
|
|
164
206
|
So an unattended run can never change anything, and anything that leaves duckhunt needs you to have
|
|
165
|
-
said yes to that specific action, spelled out with the literal command.
|
|
207
|
+
said yes to that specific action, spelled out with the literal command. Changing AWS resources or
|
|
208
|
+
code is never part of that: the run proposes an `edit` conversation, which you review and launch.
|
|
209
|
+
|
|
210
|
+
#### AWS accounts (0.11.0 or later)
|
|
211
|
+
|
|
212
|
+
A run carries the AWS account of its entry. The daemon maps it to the profile you bound with
|
|
213
|
+
`aws add`. An account this machine does not map no longer falls back to your default profile, which
|
|
214
|
+
may belong to another account: the AWS CLI runs with empty config and credentials files of its own
|
|
215
|
+
(and no profile, no keys from the environment and no instance or container credentials), so every
|
|
216
|
+
call fails, and the run's feed says which account to map. duckhunt already omits the AWS read
|
|
217
|
+
patterns for an investigation whose account this machine does not announce; this is the second line.
|
|
166
218
|
|
|
167
219
|
## Prompt runs
|
|
168
220
|
|
|
@@ -206,9 +258,38 @@ pattern other than a read-only AWS CLI one:
|
|
|
206
258
|
- `Bash` rules in the `allow` list of your user settings (`~/.claude/settings.json`) would apply to
|
|
207
259
|
`read` conversations too, so the daemon mirrors them into the deny list for those runs. If that
|
|
208
260
|
file can't be read, a `read` conversation gets no shell at all.
|
|
261
|
+
- The shell can't leave the working directory, but inside it a recursive read doesn't honour the
|
|
262
|
+
`Read` deny list: `grep -R` follows symlinks, so a branch that commits a symlink to `~` or `/`
|
|
263
|
+
would let it read `~/.aws` or this daemon's config. The `Read`, `Grep` and `Glob` tools do honour
|
|
264
|
+
the deny list through symlinks. So before every step (0.10.2 or later) the daemon lists the
|
|
265
|
+
symlinks committed in the working directory (`git ls-files`, submodules included, plus the
|
|
266
|
+
daemon's own worktrees inside a checkout) and, if any of them points outside it (even one whose
|
|
267
|
+
target doesn't exist yet), runs that step without the shell and without the AWS CLI; a working
|
|
268
|
+
directory that contains your home or the daemon's state directory gets the same treatment, and so
|
|
269
|
+
does a checkout git can't list (or a daemon worktree inside it that is no longer a git worktree).
|
|
270
|
+
The feed says so with the count; the paths only go to the daemon's log. Symlinks that were never
|
|
271
|
+
committed or staged (untracked or ignored), nested clones that aren't submodules and the scratch
|
|
272
|
+
directory are your own local state, or the work of an `edit` step you confirmed, and aren't checked.
|
|
209
273
|
|
|
210
274
|
Older daemons keep the previous `read` profile: no shell.
|
|
211
275
|
|
|
276
|
+
#### Credential paths (0.11.0 or later)
|
|
277
|
+
|
|
278
|
+
duckhunt denies `Read` on a fixed list of home-relative credential paths in every `read` kit
|
|
279
|
+
(`~/.aws/**`, `~/.ssh/**`, `~/.duckhunt-runner.json`, `~/.claude/.credentials.json` and a few more),
|
|
280
|
+
because the server never learns your paths. The daemon adds the ones only this machine knows, without
|
|
281
|
+
sending them anywhere: its real config file (also when `DUCKHUNT_RUNNER_CONFIG` moves it), its state
|
|
282
|
+
directory (the logs, the lock, `server-state.json` and the run configs; not the scratch directory,
|
|
283
|
+
which is the working directory of runs without a repo), `$CLAUDE_CONFIG_DIR/.credentials.json`,
|
|
284
|
+
`AWS_SHARED_CREDENTIALS_FILE` and `AWS_CONFIG_FILE` when they are set, and the real path behind any
|
|
285
|
+
of the listed ones that is a symlink (dotfiles). A path that a Claude permission rule cannot express
|
|
286
|
+
(commas, brackets, wildcards) is skipped with a warning at startup.
|
|
287
|
+
|
|
288
|
+
Checked with Claude Code 2.1.296: `Read`, `Grep` and `Glob` honour these deny rules, through symlinks
|
|
289
|
+
and in recursive searches. The read-only shell approves nothing outside its working directory, and
|
|
290
|
+
inside it honours a denied path named directly but not a recursive read, which is why a committed
|
|
291
|
+
symlink that leaves the working directory takes the shell away for that step (see above).
|
|
292
|
+
|
|
212
293
|
#### Native memory (0.8.0 or later)
|
|
213
294
|
|
|
214
295
|
The daemon announces `native_memory` and the server stops denying `Edit` and `Write` outright for
|
|
@@ -218,9 +299,10 @@ session in that repo) and refuses every other path. The daemon still refuses a `
|
|
|
218
299
|
allows them.
|
|
219
300
|
|
|
220
301
|
- `Edit`/`Write` rules in the `allow` list of the settings a run loads would open more than that, so
|
|
221
|
-
the daemon mirrors them into the deny list: your user settings for `read` conversations
|
|
222
|
-
project and local settings for automation runs
|
|
223
|
-
denied outright (and the run
|
|
302
|
+
the daemon mirrors them into the deny list: your user settings for `read` conversations
|
|
303
|
+
(automation runs included); user, project and local settings for the legacy automation runs of an
|
|
304
|
+
older duckhunt. If a settings file can't be read, those tools are denied outright (and the run
|
|
305
|
+
gets no memory).
|
|
224
306
|
- Automation runs get no memory: they process alerts nobody reviewed, and whatever they wrote would load
|
|
225
307
|
into your later sessions. The server keeps denying `Edit` and `Write` for them; the daemon would still
|
|
226
308
|
mirror rules and re-deny both under `--dangerously-skip-permissions` if that ever changed.
|
|
@@ -236,13 +318,29 @@ conversation (with the identity check) linked to the one that proposed it. This
|
|
|
236
318
|
change.
|
|
237
319
|
|
|
238
320
|
Every prompt run uses `--strict-mcp-config`, so a `.mcp.json` in the checkout never loads.
|
|
239
|
-
Settings → Agents can force `read` for everything (read-only mode)
|
|
240
|
-
|
|
321
|
+
Settings → Agents can force `read` for everything (read-only mode), and Settings → Agents → Repos
|
|
322
|
+
per repo. Settings → Agents → Machines pauses all your agents or one machine, and chooses what each
|
|
323
|
+
machine accepts. Read-only mode applies to existing `edit` conversations from
|
|
241
324
|
their next step on. A per-repo `read` lock covers conversations on that repo; it is not a sandbox,
|
|
242
|
-
since an `edit` conversation on another repo (or none) still has a shell.
|
|
243
|
-
by the wall-clock limit chosen in Settings → Agents
|
|
244
|
-
|
|
245
|
-
|
|
325
|
+
since an `edit` conversation on another repo (or none) still has a shell. Conversations you start
|
|
326
|
+
have no turn or budget limit: each step is capped by the wall-clock limit chosen in Settings → Agents
|
|
327
|
+
(1 to 8 hours, 4 by default), and the model is your `defaults.model` (or the CLI default). Automation
|
|
328
|
+
runs keep 30 minutes per step and, from 0.11.0, their budget again when you pay with an API key
|
|
329
|
+
(`ANTHROPIC_API_KEY`) or set `defaults.maxBudgetUsd`.
|
|
330
|
+
`worktree: false` and `--dangerously-skip-permissions` in the repo map are deprecated (0.11.0) and go
|
|
331
|
+
away in 0.12.0: nothing a current duckhunt sends applies them, because every conversation, automation
|
|
332
|
+
runs included, is a prompt run with its own worktree (or the checkout, when you choose it). They only
|
|
333
|
+
affect the legacy automation runs an older duckhunt server queued; `repos add`, `repos list` and
|
|
334
|
+
`status` say they are ignored.
|
|
335
|
+
|
|
336
|
+
Each step's MCP config, which holds the run's token, is written to `~/.duckhunt-runner/run-config/`
|
|
337
|
+
(a `0700` directory, files `0600`) and deleted when the step ends; the daemon removes any left
|
|
338
|
+
behind by a daemon that died when it starts. Every run, `read` or `edit`, has `Read` denied on that
|
|
339
|
+
directory (Claude still loads its own `--mcp-config` from it), and no run's working directory is
|
|
340
|
+
inside it, so a `read` run can't read the token of a run in another slot. An `edit` run's shell
|
|
341
|
+
still could: it runs only after you confirm your identity. Daemons before 0.10.2 used the system
|
|
342
|
+
temp directory; from 0.11.0 the daemon removes, once when it starts, the ones they left there
|
|
343
|
+
(`duckhunt-runner-<run>-<hex>.json`, your own regular files only).
|
|
246
344
|
|
|
247
345
|
### One worktree per conversation
|
|
248
346
|
|
|
@@ -261,18 +359,20 @@ its whole process group; a late report from that step never closes the step that
|
|
|
261
359
|
At most every 30 minutes the daemon removes the worktrees of conversations that duckhunt reports as
|
|
262
360
|
closed, and any worktree unused for 7 days, skipping those of runs it is working on. It never removes one with
|
|
263
361
|
uncommitted changes or with commits that no branch or remote contains: those are kept and logged, and
|
|
264
|
-
you can remove them with `git worktree remove` when you are done.
|
|
265
|
-
|
|
362
|
+
you can remove them with `git worktree remove` when you are done. From 0.11.0 the daemon also tells
|
|
363
|
+
duckhunt how many changed files and unpushed commits each kept conversation worktree holds (counts
|
|
364
|
+
only, never paths), and the conversation shows it with a button that asks the agent to commit them.
|
|
365
|
+
Worktrees kept from failed automation runs (`run-<id>`) expire after the same 7 days.
|
|
266
366
|
|
|
267
367
|
### Working in the checkout instead
|
|
268
368
|
|
|
269
369
|
When you open a conversation you can choose `checkout` instead of `worktree` (0.6.0 or later). The
|
|
270
370
|
agent then works in your working copy as it is: your current branch and your uncommitted changes,
|
|
271
371
|
with no fetch and no branch switch; the branch picker does not apply. The choice holds for the whole
|
|
272
|
-
conversation. Conversations on the same checkout take turns
|
|
273
|
-
|
|
274
|
-
`.
|
|
275
|
-
|
|
372
|
+
conversation. Conversations on the same checkout take turns. In `edit`, Claude loads the checkout's
|
|
373
|
+
own settings, including the hooks in `.claude/settings.local.json` that a worktree never has. The
|
|
374
|
+
daemon adds `/.duckhunt/` to the checkout's `.git/info/exclude` so its worktrees never show up as
|
|
375
|
+
your changes.
|
|
276
376
|
|
|
277
377
|
### Progress feed
|
|
278
378
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type AwsAccountConfig } from './config.js';
|
|
2
|
+
/** la cuenta y región aws que trae el claim de un run (null = sin aws). */
|
|
3
|
+
export type RunAws = {
|
|
4
|
+
accountId: string | null;
|
|
5
|
+
region: string | null;
|
|
6
|
+
} | null;
|
|
7
|
+
/** env aws de un run y, si falló cerrado, la cuenta sin mapear (para el feed). */
|
|
8
|
+
export interface RunAwsEnv {
|
|
9
|
+
env: NodeJS.ProcessEnv;
|
|
10
|
+
unmapped: string | null;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* env del proceso claude con la aws del run: el perfil mapeado (y su región), o, con una cuenta sin
|
|
14
|
+
* mapear, la aws cli sin credenciales (emptyDir: el directorio con config y credentials vacíos). no muta `base`.
|
|
15
|
+
*/
|
|
16
|
+
export declare function runAwsEnv(base: NodeJS.ProcessEnv, aws: RunAws, map: Record<string, AwsAccountConfig>, emptyDir: () => string): RunAwsEnv;
|
|
17
|
+
/** crea el directorio de un run con la config y las credenciales de aws vacías (0700 / 0600). devuelve su ruta. */
|
|
18
|
+
export declare function writeEmptyAwsConfig(runId: number): string;
|
|
19
|
+
/** borra los directorios de aws vacía que dejó un daemon anterior. solo al arrancar, con el lock tomado. devuelve cuántos. */
|
|
20
|
+
export declare function clearRunAwsConfigs(): number;
|
|
21
|
+
//# sourceMappingURL=aws-env.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aws-env.d.ts","sourceRoot":"","sources":["../src/aws-env.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAgB,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AA0BlE,2EAA2E;AAC3E,MAAM,MAAM,MAAM,GAAG;IAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAAG,IAAI,CAAC;AAEhF,kFAAkF;AAClF,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;IACvB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,EAAE,QAAQ,EAAE,MAAM,MAAM,GAAG,SAAS,CAkBxI;AAED,mHAAmH;AACnH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKzD;AAED,8HAA8H;AAC9H,wBAAgB,kBAAkB,IAAI,MAAM,CAK3C"}
|
package/dist/aws-env.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// aws del proceso claude de un run: la cuenta del claim → el perfil que la mapea en esta máquina
|
|
2
|
+
// (`aws add`). desde 0.11.0 (capability aws_strict, t#465 P12) una cuenta que esta máquina NO mapea falla
|
|
3
|
+
// cerrado: AWS_CONFIG_FILE y AWS_SHARED_CREDENTIALS_FILE apuntan a ficheros vacíos del propio run, sin
|
|
4
|
+
// perfil, sin claves en el env y sin metadata de instancia o contenedor. antes caía en el perfil por
|
|
5
|
+
// defecto, que puede ser OTRA cuenta (el server ya no manda los patrones aws a una plantilla cuya cuenta
|
|
6
|
+
// no anuncia la máquina, t#465 P6; esto es la segunda línea, también para los prompt runs).
|
|
7
|
+
// decisiones:
|
|
8
|
+
// - los ficheros vacíos van en <runnerHome>/run-config/aws-<run>-<rand>/ (0700, como los mcp-config: ya
|
|
9
|
+
// negado a Read en todo kit) y se borran al cerrar el segmento; un run en edición podría escribir en
|
|
10
|
+
// ellos (`aws configure set`) y uno compartido contaminaría a otros runs. los que dejó un daemon muerto
|
|
11
|
+
// se borran al arrancar.
|
|
12
|
+
// - sin cuenta en el claim (o sin aws) nada cambia: el env del usuario tal cual, como siempre.
|
|
13
|
+
import crypto from 'node:crypto';
|
|
14
|
+
import fs from 'node:fs';
|
|
15
|
+
import path from 'node:path';
|
|
16
|
+
import { runConfigDir } from './config.js';
|
|
17
|
+
const AWS_EMPTY_PREFIX = 'aws-';
|
|
18
|
+
const AWS_EMPTY_RANDOM_BYTES = 4;
|
|
19
|
+
const AWS_EMPTY_DIR_MODE = 0o700;
|
|
20
|
+
const AWS_EMPTY_FILE_MODE = 0o600;
|
|
21
|
+
const AWS_CONFIG = 'config';
|
|
22
|
+
const AWS_CREDENTIALS = 'credentials';
|
|
23
|
+
// todo lo que daría credenciales a la aws cli sin los ficheros de config: perfiles, claves en el env,
|
|
24
|
+
// web identity y los endpoints de credenciales de contenedor.
|
|
25
|
+
const AWS_CREDENTIAL_VARS = [
|
|
26
|
+
'AWS_PROFILE',
|
|
27
|
+
'AWS_DEFAULT_PROFILE',
|
|
28
|
+
'AWS_ACCESS_KEY_ID',
|
|
29
|
+
'AWS_SECRET_ACCESS_KEY',
|
|
30
|
+
'AWS_SESSION_TOKEN',
|
|
31
|
+
'AWS_SECURITY_TOKEN',
|
|
32
|
+
'AWS_ROLE_ARN',
|
|
33
|
+
'AWS_ROLE_SESSION_NAME',
|
|
34
|
+
'AWS_WEB_IDENTITY_TOKEN_FILE',
|
|
35
|
+
'AWS_CONTAINER_CREDENTIALS_RELATIVE_URI',
|
|
36
|
+
'AWS_CONTAINER_CREDENTIALS_FULL_URI',
|
|
37
|
+
'AWS_CONTAINER_AUTHORIZATION_TOKEN',
|
|
38
|
+
'AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE',
|
|
39
|
+
];
|
|
40
|
+
/**
|
|
41
|
+
* env del proceso claude con la aws del run: el perfil mapeado (y su región), o, con una cuenta sin
|
|
42
|
+
* mapear, la aws cli sin credenciales (emptyDir: el directorio con config y credentials vacíos). no muta `base`.
|
|
43
|
+
*/
|
|
44
|
+
export function runAwsEnv(base, aws, map, emptyDir) {
|
|
45
|
+
const env = { ...base };
|
|
46
|
+
const accountId = aws?.accountId ?? null;
|
|
47
|
+
const account = accountId && Object.hasOwn(map, accountId) ? map[accountId] : undefined;
|
|
48
|
+
if (account) {
|
|
49
|
+
env.AWS_PROFILE = account.profile;
|
|
50
|
+
const region = account.region ?? aws?.region ?? undefined;
|
|
51
|
+
if (region)
|
|
52
|
+
env.AWS_DEFAULT_REGION = region;
|
|
53
|
+
return { env, unmapped: null };
|
|
54
|
+
}
|
|
55
|
+
if (aws?.region)
|
|
56
|
+
env.AWS_DEFAULT_REGION = aws.region;
|
|
57
|
+
if (!accountId)
|
|
58
|
+
return { env, unmapped: null };
|
|
59
|
+
const dir = emptyDir();
|
|
60
|
+
AWS_CREDENTIAL_VARS.forEach((key) => delete env[key]);
|
|
61
|
+
env.AWS_CONFIG_FILE = path.join(dir, AWS_CONFIG);
|
|
62
|
+
env.AWS_SHARED_CREDENTIALS_FILE = path.join(dir, AWS_CREDENTIALS);
|
|
63
|
+
env.AWS_EC2_METADATA_DISABLED = 'true';
|
|
64
|
+
return { env, unmapped: accountId };
|
|
65
|
+
}
|
|
66
|
+
/** crea el directorio de un run con la config y las credenciales de aws vacías (0700 / 0600). devuelve su ruta. */
|
|
67
|
+
export function writeEmptyAwsConfig(runId) {
|
|
68
|
+
const dir = path.join(runConfigDir(), `${AWS_EMPTY_PREFIX}${runId}-${crypto.randomBytes(AWS_EMPTY_RANDOM_BYTES).toString('hex')}`);
|
|
69
|
+
fs.mkdirSync(dir, { mode: AWS_EMPTY_DIR_MODE });
|
|
70
|
+
[AWS_CONFIG, AWS_CREDENTIALS].forEach((name) => fs.writeFileSync(path.join(dir, name), '', { mode: AWS_EMPTY_FILE_MODE, flag: 'wx' }));
|
|
71
|
+
return dir;
|
|
72
|
+
}
|
|
73
|
+
/** borra los directorios de aws vacía que dejó un daemon anterior. solo al arrancar, con el lock tomado. devuelve cuántos. */
|
|
74
|
+
export function clearRunAwsConfigs() {
|
|
75
|
+
const dir = runConfigDir();
|
|
76
|
+
const stale = fs.readdirSync(dir, { withFileTypes: true }).filter((d) => d.isDirectory() && d.name.startsWith(AWS_EMPTY_PREFIX));
|
|
77
|
+
stale.forEach((d) => fs.rmSync(path.join(dir, d.name), { recursive: true, force: true }));
|
|
78
|
+
return stale.length;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=aws-env.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aws-env.js","sourceRoot":"","sources":["../src/aws-env.ts"],"names":[],"mappings":"AAAA,iGAAiG;AACjG,0GAA0G;AAC1G,uGAAuG;AACvG,qGAAqG;AACrG,yGAAyG;AACzG,4FAA4F;AAC5F,cAAc;AACd,wGAAwG;AACxG,uGAAuG;AACvG,0GAA0G;AAC1G,2BAA2B;AAC3B,+FAA+F;AAE/F,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAyB,MAAM,aAAa,CAAC;AAElE,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAChC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACjC,MAAM,kBAAkB,GAAG,KAAK,CAAC;AACjC,MAAM,mBAAmB,GAAG,KAAK,CAAC;AAClC,MAAM,UAAU,GAAG,QAAQ,CAAC;AAC5B,MAAM,eAAe,GAAG,aAAa,CAAC;AACtC,sGAAsG;AACtG,8DAA8D;AAC9D,MAAM,mBAAmB,GAAG;IAC1B,aAAa;IACb,qBAAqB;IACrB,mBAAmB;IACnB,uBAAuB;IACvB,mBAAmB;IACnB,oBAAoB;IACpB,cAAc;IACd,uBAAuB;IACvB,6BAA6B;IAC7B,wCAAwC;IACxC,oCAAoC;IACpC,mCAAmC;IACnC,wCAAwC;CACzC,CAAC;AAWF;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,IAAuB,EAAE,GAAW,EAAE,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
|
1
|
-
{"version":3,"file":"aws.d.ts","sourceRoot":"","sources":["../src/aws.ts"],"names":[],"mappings":"AAcA,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"aws.d.ts","sourceRoot":"","sources":["../src/aws.ts"],"names":[],"mappings":"AAcA,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAmD/C"}
|
package/dist/aws.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// subcomandos `duckhunt-runner aws ...`: mapa id de cuenta aws → perfil local de la aws cli. el
|
|
2
2
|
// claim trae solo el id de cuenta (y región) de la conexión del entry; el daemon lo traduce a
|
|
3
3
|
// AWS_PROFILE/AWS_DEFAULT_REGION del proceso claude. el server nunca ve perfiles ni credenciales.
|
|
4
|
-
import { configPath,
|
|
4
|
+
import { configPath, loadStoredConfig, saveConfig } from './config.js';
|
|
5
5
|
const ACCOUNT_ID_RE = /^\d{12}$/;
|
|
6
6
|
const USAGE = `uso:
|
|
7
7
|
duckhunt-runner aws list
|
|
@@ -9,7 +9,8 @@ const USAGE = `uso:
|
|
|
9
9
|
duckhunt-runner aws remove <account-id>
|
|
10
10
|
`;
|
|
11
11
|
export function awsCommand(args) {
|
|
12
|
-
|
|
12
|
+
// sin credencial también (tras `logout` los mapas se quedan): solo se leen y escriben los mapas.
|
|
13
|
+
const cfg = loadStoredConfig();
|
|
13
14
|
if (!cfg) {
|
|
14
15
|
console.error('sin config: ejecuta `duckhunt-runner login <base-url>` primero');
|
|
15
16
|
process.exitCode = 1;
|
package/dist/aws.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aws.js","sourceRoot":"","sources":["../src/aws.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,8FAA8F;AAC9F,kGAAkG;AAElG,OAAO,EAAE,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"aws.js","sourceRo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CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACvH,OAAO,CAAC,GAAG,CAAC,uBAAuB,OAAO,EAAE,CAAC,CAAC;QAC9C,OAAO;IACT,CAAC;IAED,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACrB,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC"}
|
package/dist/claim.d.ts
CHANGED
|
@@ -6,6 +6,11 @@ export declare const RUNNER_CAPABILITY: {
|
|
|
6
6
|
readonly readShell: "read_shell";
|
|
7
7
|
readonly nativeMemory: "native_memory";
|
|
8
8
|
readonly repoEdit: "repo_edit";
|
|
9
|
+
readonly secretPaths: "secret_paths";
|
|
10
|
+
readonly seedBudget: "seed_budget";
|
|
11
|
+
readonly awsStrict: "aws_strict";
|
|
12
|
+
readonly worktreeReport: "worktree_report";
|
|
13
|
+
readonly logout: "logout";
|
|
9
14
|
};
|
|
10
15
|
export type RunnerCapability = (typeof RUNNER_CAPABILITY)[keyof typeof RUNNER_CAPABILITY];
|
|
11
16
|
export declare const RUN_ISOLATION: {
|
|
@@ -23,6 +28,11 @@ export declare const PROMPT_PROFILE: {
|
|
|
23
28
|
readonly edit: "edit";
|
|
24
29
|
};
|
|
25
30
|
export type PromptProfile = (typeof PROMPT_PROFILE)[keyof typeof PROMPT_PROFILE];
|
|
31
|
+
export declare const RUN_SEED: {
|
|
32
|
+
readonly template: "template";
|
|
33
|
+
readonly prompt: "prompt";
|
|
34
|
+
};
|
|
35
|
+
export type RunSeed = (typeof RUN_SEED)[keyof typeof RUN_SEED];
|
|
26
36
|
export declare const ALLOWED_PERMISSION_MODES: readonly string[];
|
|
27
37
|
export declare const EVENTS_DEFAULTS: {
|
|
28
38
|
readonly nextSeq: 1;
|
|
@@ -57,6 +67,7 @@ export interface ClaimedRun {
|
|
|
57
67
|
sessionId: string | null;
|
|
58
68
|
parentRunId: number | null;
|
|
59
69
|
profile: PromptProfile | null;
|
|
70
|
+
seed: RunSeed | null;
|
|
60
71
|
isolation: RunIsolation;
|
|
61
72
|
segment: number | null;
|
|
62
73
|
}
|
package/dist/claim.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claim.d.ts","sourceRoot":"","sources":["../src/claim.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"claim.d.ts","sourceRoot":"","sources":["../src/claim.ts"],"names":[],"mappings":"AA6BA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;CAkBpB,CAAC;AACX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAK1F,eAAO,MAAM,aAAa;;;CAGhB,CAAC;AACX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAE9E,eAAO,MAAM,QAAQ;;;;CAIX,CAAC;AAEX,eAAO,MAAM,cAAc;;;CAGjB,CAAC;AACX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAGjF,eAAO,MAAM,QAAQ;;;CAGX,CAAC;AACX,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,OAAO,QAAQ,CAAC,CAAC;AAI/D,eAAO,MAAM,wBAAwB,EAAE,SAAS,MAAM,EAAkD,CAAC;AAOzG,eAAO,MAAM,eAAe;;;;;;;CAOlB,CAAC;AAIX,eAAO,MAAM,SAAS,QAAqC,CAAC;AAE5D,eAAO,MAAM,sBAAsB,YAAY,CAAC;AAGhD,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EAAsC,CAAC;AAEzF,eAAO,MAA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AAE,UAAU,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAG9B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IACnD,cAAc,EAAE,MAAM,CAAC;IAEvB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IAEpB,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC;IAC5B,GAAG,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAE3E,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AASD,qGAAqG;AACrG,wBAAgB,UAAU,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAEtD;AAED,0FAA0F;AAC1F,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEzD;AASD,8GAA8G;AAC9G,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAGtD;AAED,sFAAsF;AACtF,eAAO,MAAM,QAAQ,GAAI,MAAM,MAAM,KAAG,OAAgC,CAAC;AAuBzE,+FAA+F;AAC/F,wBAAgB,UAAU,CAAC,GAAG,EAAE,OAAO,GAAG,aAAa,CAiFtD"}
|
package/dist/claim.js
CHANGED
|
@@ -18,6 +18,9 @@
|
|
|
18
18
|
// `aws s3 rm … --exclude list-x`) y sus lecturas que escriben un fichero local, negadas siempre.
|
|
19
19
|
// un bug o una deriva del server nunca le da a una lectura una shell que ejecute o escriba.
|
|
20
20
|
// - `run.segment` es la identidad del proceso: viaja de vuelta en heartbeat/progress/events/status.
|
|
21
|
+
// - `run.seed` (t#465 P6) dice si la conversación nació de una plantilla de investigación: con
|
|
22
|
+
// seed_budget (0.11.0) su presupuesto se aplica aunque viaje como prompt run (claude-args.ts). el bloque
|
|
23
|
+
// `runner` de un server >= t#465 P12 no es del run: lo lee server-state.ts, y parseClaim lo ignora.
|
|
21
24
|
// capacidades que el daemon anuncia en el claim. el server entrega kind=prompt solo a quien
|
|
22
25
|
// anuncia `prompt`, pide el feed de progreso solo a quien anuncia `events` y deja abrir una
|
|
23
26
|
// conversación en el checkout solo a quien anuncia `checkout` (>= 0.6.0), la shell de solo lectura
|
|
@@ -32,6 +35,15 @@ export const RUNNER_CAPABILITY = {
|
|
|
32
35
|
nativeMemory: 'native_memory',
|
|
33
36
|
// acepta cambios del mapa de repos pedidos desde duckhunt (repo-commands.ts); apagable en local.
|
|
34
37
|
repoEdit: 'repo_edit',
|
|
38
|
+
// 0.11.0 (t#465 P12): niega a Read las rutas reales de las credenciales de esta máquina en todo kit
|
|
39
|
+
// de lectura (secret-paths.ts), aplica el presupuesto a las plantillas (seed_budget), corre con la aws
|
|
40
|
+
// vacía una cuenta sin mapear (aws-env.ts), anuncia el trabajo que su gc conservó (keptWorktrees) y
|
|
41
|
+
// sabe desvincularse (`logout`, y lee el bloque runner del claim).
|
|
42
|
+
secretPaths: 'secret_paths',
|
|
43
|
+
seedBudget: 'seed_budget',
|
|
44
|
+
awsStrict: 'aws_strict',
|
|
45
|
+
worktreeReport: 'worktree_report',
|
|
46
|
+
logout: 'logout',
|
|
35
47
|
};
|
|
36
48
|
// dónde trabaja un prompt run con repo (lo elige el usuario al abrir la conversación): el worktree
|
|
37
49
|
// conv-<id> aislado o el checkout tal cual (su rama y sus cambios). ausente o desconocido = worktree,
|
|
@@ -49,6 +61,11 @@ export const PROMPT_PROFILE = {
|
|
|
49
61
|
read: 'read',
|
|
50
62
|
edit: 'edit',
|
|
51
63
|
};
|
|
64
|
+
// de qué nació la conversación (run.seed, t#465 P6): una plantilla de investigación o el texto de la persona.
|
|
65
|
+
export const RUN_SEED = {
|
|
66
|
+
template: 'template',
|
|
67
|
+
prompt: 'prompt',
|
|
68
|
+
};
|
|
52
69
|
// techo local de permission modes: el server manda dontAsk; bypassPermissions nunca se acepta
|
|
53
70
|
// desde fuera (el opt-in a saltarse permisos es solo local, `repos add --dangerously-skip-permissions`).
|
|
54
71
|
export const ALLOWED_PERMISSION_MODES = ['dontAsk', 'default', 'acceptEdits', 'plan'];
|
|
@@ -277,6 +294,7 @@ export function parseClaim(raw) {
|
|
|
277
294
|
sessionId,
|
|
278
295
|
parentRunId: posInt(r.parentRunId),
|
|
279
296
|
profile,
|
|
297
|
+
seed: r.seed === RUN_SEED.template || r.seed === RUN_SEED.prompt ? r.seed : null,
|
|
280
298
|
isolation: kind === RUN_KIND.prompt && r.isolation === RUN_ISOLATION.checkout ? RUN_ISOLATION.checkout : RUN_ISOLATION.worktree,
|
|
281
299
|
segment: posInt(r.segment),
|
|
282
300
|
},
|
package/dist/claim.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claim.js","sourceRoot":"","sources":["../src/claim.ts"],"names":[],"mappings":"AAAA,iGAAiG;AACjG,kGAAkG;AAClG,oGAAoG;AACpG,8EAA8E;AAC9E,cAAc;AACd,qGAAqG;AACrG,uFAAuF;AACvF,iFAAiF;AACjF,mGAAmG;AACnG,uGAAuG;AACvG,gHAAgH;AAChH,qGAAqG;AACrG,kGAAkG;AAClG,oGAAoG;AACpG,mFAAmF;AACnF,oGAAoG;AACpG,mGAAmG;AACnG,mGAAmG;AACnG,8FAA8F;AAC9F,oGAAoG;AAEpG,4FAA4F;AAC5F,4FAA4F;AAC5F,mGAAmG;AACnG,oGAAoG;AACpG,6FAA6F;AAC7F,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,GAAG,EAAE,KAAK;IACV,MAAM,EAAE,QAAQ;IA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AC,GAAG,CAAC,cAAc,CAAC;QACvC,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC;QACnB,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;QAC9B,cAAc;QACd,QAAQ,EAAE,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC;QACjC,YAAY,EAAE,SAAS,CAAC,GAAG,CAAC,YAAY,CAAC;QACzC,SAAS,EAAE,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,kBAAkB;QACtD,WAAW,EAAE,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,oBAAoB;QAC5D,MAAM,EAAE,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC;QAChC,GAAG,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE;QACzE,QAAQ;KACT,CAAC;AACJ,CAAC"}
|
package/dist/claude-args.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { type ClaimResponse, type PromptProfile } from './claim.js';
|
|
1
|
+
import { type ClaimResponse, type PromptProfile, type RunSeed } from './claim.js';
|
|
2
2
|
import type { OptionalFlag } from './claude.js';
|
|
3
3
|
export interface ClaudeArgsInput {
|
|
4
4
|
claim: Pick<ClaimResponse, 'tools' | 'permissionMode' | 'maxTurns' | 'maxBudgetUsd'> & {
|
|
5
5
|
run: {
|
|
6
6
|
kind: string;
|
|
7
7
|
profile: PromptProfile | null;
|
|
8
|
+
seed?: RunSeed | null;
|
|
8
9
|
};
|
|
9
10
|
};
|
|
10
11
|
prompt: string;
|
|
@@ -16,6 +17,9 @@ export interface ClaudeArgsInput {
|
|
|
16
17
|
skipPermissions: boolean;
|
|
17
18
|
payingWithApiKey: boolean;
|
|
18
19
|
mirroredDeny?: readonly string[];
|
|
20
|
+
runConfigDeny: readonly string[];
|
|
21
|
+
secretPathsDeny?: readonly string[];
|
|
22
|
+
withoutShell?: boolean;
|
|
19
23
|
}
|
|
20
24
|
/** flags sin los que el cli no puede cumplir un prompt run (el daemon solo anuncia `prompt` si los tiene todos). */
|
|
21
25
|
export declare const PROMPT_REQUIRED_FLAGS: readonly OptionalFlag[];
|