@useanvil/claude-code 0.8.0 → 0.9.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/CHANGELOG.md +254 -3
- package/dist/claude-conditions.js +12 -12
- package/dist/claude-helpers.js +10 -10
- package/dist/claude-hook-core.js +84 -82
- package/dist/claude-hook.js +34 -32
- package/dist/claude-meter.js +55 -35
- package/dist/claude-powershell.cjs +29 -29
- package/dist/claude-sync.js +25 -23
- package/dist/cli/claude-main.js +8243 -1588
- package/docs/coding-agents/YOUR-RULES.md +293 -49
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,260 @@ All notable changes to `@useanvil/sdk` are documented here. The format follows
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/), and this project adheres to
|
|
5
5
|
[Semantic Versioning](https://semver.org/).
|
|
6
6
|
|
|
7
|
-
## [
|
|
7
|
+
## [0.9.0] — Anvil for Claude Code: folder locks, smart spend, a second opinion, and rules read in your own words
|
|
8
|
+
|
|
9
|
+
A rule on a folder now locks it. `model: smart` runs Sonnet with Opus advising, and `second opinion:` sends Claude to
|
|
10
|
+
the advisor before a risky action. `rules import` enforces 73% of the rules real CLAUDE.md files write (0.8.1: 43%), and
|
|
11
|
+
the rules box reads back what you type before it saves. What missed its bar stays off; it is listed at the end, with
|
|
12
|
+
how to try it.
|
|
13
|
+
|
|
14
|
+
### Anvil for Claude Code: say a second opinion or smart spend in your own words (UI pass)
|
|
15
|
+
|
|
16
|
+
- **Say a second opinion or smart spend in your own words.** `rules add` and the rules box read "get a second opinion
|
|
17
|
+
before deploys" as `second opinion: deploys` and "use Sonnet with Opus advising" as `model: smart`, show the line with
|
|
18
|
+
the words it was read from, and save it on yes. Before, both were misread into a weaker rule (`watch: deploys`, a watch
|
|
19
|
+
on paid compute) or refused. Who approves decides: "ask me before deploys" stays a hold. "Use opus for deploys" is a
|
|
20
|
+
model rule, "never use opus" is `model: never opus`, "keep spending under $50 a day" a budget. A line that mentions
|
|
21
|
+
the advisor or Opus that Anvil can't place is offered the exact line, never saved as a watch; where your Claude Code is
|
|
22
|
+
here it reads such a line first (the form only, never a kind your words don't name). The rules box adds both lines,
|
|
23
|
+
typed exactly too; `rules import` lists such a CLAUDE.md line with the command that adds it.
|
|
24
|
+
- **`anvil claude --help` has rows for locks, smart spend and the advisor**, and the guide's section on them reads
|
|
25
|
+
examples first. Adding a hold on deploys, publishing, database changes or pushes to main suggests a second opinion
|
|
26
|
+
once per kind.
|
|
27
|
+
|
|
28
|
+
### Anvil for Claude Code: a folder rule locks the folder, `model: smart`, and a second opinion before a risky action
|
|
29
|
+
|
|
30
|
+
- **A rule on a folder locks it.** `block: edits to ~/Documents/` is now kept twice: the hook blocks every write it can
|
|
31
|
+
read, and Claude Code's own sandbox makes the operating system refuse a Bash write there it can't (a script that
|
|
32
|
+
builds its path while it runs). Nothing to turn on: Anvil writes the sandbox block only where a rule names a plain
|
|
33
|
+
path (network, localhost, Docker and `gh` as before), merged with the person's own and taken out byte for byte by
|
|
34
|
+
`off`. A lock never ends an approval prompt: the block turns Claude Code's auto-allow off and adds no folder to the
|
|
35
|
+
sandbox's write list (Claude Code takes one as leave to change files there unasked), so every command asks or runs as
|
|
36
|
+
it would without the rule, in every mode; a write outside the project is rerun outside the sandbox, asked as any
|
|
37
|
+
command is. A rerun right after a refusal on a lock is held. Proof names the rule (`locked by your rule`); the
|
|
38
|
+
screens say `locked`, `partly locked` or `held by Anvil, not locked`, with why: on Linux, which of bubblewrap and
|
|
39
|
+
socat is missing (or that Ubuntu's AppArmor stops bubblewrap), and in a project whose own settings turn the sandbox
|
|
40
|
+
off, or set a sandbox Anvil's network settings widen, that it does.
|
|
41
|
+
- **`model: smart`: Sonnet works, Opus advises.** Writes `model` and `advisorModel` into Claude Code's settings for new
|
|
42
|
+
sessions and gives the person's own back when the line goes. `/anvil` and the status line say `advisor: Opus · on`,
|
|
43
|
+
or the one reason it is off. The desktop app starts every session on the model picked in it, before any setting:
|
|
44
|
+
there smart can't make Sonnet work, and the screens say so (the advisor still reaches it). Suggested in one line with
|
|
45
|
+
a `budget:` or `model:` line and the budget's 80% note, never switched on for you.
|
|
46
|
+
- **`second opinion: deploys`** (any kind): the first such action in a task is refused, and Claude told to ask the
|
|
47
|
+
advisor first ("if it advises against it, don't rerun: tell the user"). The rerun runs only once Claude Code's own
|
|
48
|
+
record of the session shows the advisor asked and answering after the refusal; a rerun without it is refused once
|
|
49
|
+
more, then held for your OK. Each thread (a helper agent, the main session) is its own. In the terminal, which writes
|
|
50
|
+
Claude's reply only after Anvil checks the call, and with no advisor, each such action waits for your OK. In ten live
|
|
51
|
+
runs every rerun after the advisor's answer ran; in two told never to ask it, each rerun was held. Proof says
|
|
52
|
+
`advisor asked, then let through` or `rerun without the advisor: held`, and the pause is no stop.
|
|
53
|
+
- **Budgets come before a second opinion spends.** Before Claude is sent to the advisor (the first refusal, a rerun sent
|
|
54
|
+
back, the terminal's hold that asks it), Anvil prices the call: the advisor reads the whole conversation uncached
|
|
55
|
+
(about $0.64 at 150K tokens with Opus advising). A budget already spent, or one that call would pass with what's
|
|
56
|
+
running, holds the action by the budget instead, says the price, and tells Claude not to ask the advisor.
|
|
57
|
+
- **Smart spend says the truth when the advisor never attaches.** No screen says `advisor: Opus · on` before a
|
|
58
|
+
session shows it (`set: seen at your next session`). A session that began after the line was added and came without
|
|
59
|
+
the advisor (Claude Code's rollout, the account's credits, a telemetry setting) shows it, and every screen then says
|
|
60
|
+
lastingly that smart runs Sonnet alone, with how to have your own model back; never switched back for you.
|
|
61
|
+
`DISABLE_TELEMETRY`, `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` (any value), `CLAUDE_CODE_DISABLE_FEATURE_FLAGS` and
|
|
62
|
+
`DISABLE_GROWTHBOOK` are named where they keep it off (measured live). `rules add "model: smart"` says what it
|
|
63
|
+
replaced when yours was stronger, and a project's own `model` is said where it wins.
|
|
64
|
+
- **A model Anvil has no price for never turns a dollar budget off.** It is priced at the newest of its family, else the
|
|
65
|
+
most expensive Anvil knows, and every total, hold, Proof's Spend line and `report` say so ("estimated at Opus 5.5's
|
|
66
|
+
prices"). Where Claude Code's own cost record covers it, Claude Code's figure stands.
|
|
67
|
+
- **The meter counts the advisor**, once per reply, at its own model's rates, so budgets include it: Anvil's estimate
|
|
68
|
+
matched Claude Code's own total to the micro-dollar on a real session ($0.1977597). Proof's Spend line and `report`
|
|
69
|
+
say its share.
|
|
70
|
+
|
|
71
|
+
### Anvil for Claude Code: the model guard reads the model twice, and is heard everywhere it can be
|
|
72
|
+
|
|
73
|
+
- **Two readings of the model.** Every reply Claude Code writes names the model that answered it and the request it
|
|
74
|
+
answers; over 30 days on the build machine it agreed with the request line on 149,743 of 149,743 replies. A call a
|
|
75
|
+
model rule names is now judged on both: in the desktop app and a headless run Anvil waits for the call's own reply
|
|
76
|
+
(half a second at most), and that reply is compared wherever it sits. In the terminal, where the reply comes after the
|
|
77
|
+
check, a request line written right after another with no reply between (a forged line's mark) must name the same
|
|
78
|
+
model unless a change is recorded or heard between (a message of yours, `/model`, a fallback, plan mode); after a
|
|
79
|
+
reply the request alone is read, since the model changes between
|
|
80
|
+
replies in ways Claude Code records nowhere first. Two that differ hold the call and say so. A reply the API
|
|
81
|
+
answered on another model (a fallback, on the call's own reply) is judged by that model; a model id Anvil can't
|
|
82
|
+
read (a cloud's profile, a gateway's alias) by the model the reply names; a request line Claude Code skipped, by
|
|
83
|
+
the reply (when it is the call's own, or a change is recorded since: one forged reply can't set the line aside).
|
|
84
|
+
With no request line
|
|
85
|
+
the reply is read on Claude Code 2.1.304 and later (the record turned off); before it, only in the desktop app and
|
|
86
|
+
headless runs.
|
|
87
|
+
- **A rule that can't hear the model says so everywhere.** Where nothing records the model, the call isn't held, and
|
|
88
|
+
every call the rule names, the rules screen, Home and the status line say Anvil can't hear it, for a week. A model
|
|
89
|
+
this release doesn't know is said on the screens too ("can't tell the model").
|
|
90
|
+
- **Claude's writes to its own session files are held**, from the first call: a redirect, `tee`, `sed -i`, `cp` or `mv`
|
|
91
|
+
onto one, `rm`, a pattern of them, a variable an `ls` or `find` over the projects folder fills, a writer `xargs` or
|
|
92
|
+
`find -exec` hands them, `node -e` or `python -c` naming one, building its path from the home folder or handed it,
|
|
93
|
+
`sh -c` handed one by position,
|
|
94
|
+
an archive unpacked into their folder, and the Write and Edit tools. Memory notes, reading, copying out and month-old
|
|
95
|
+
housekeeping stay open. On 0.8.1 none of 27 such write forms was held as a change to Anvil. Code or a script that
|
|
96
|
+
finds the file itself can still write it.
|
|
97
|
+
- **The plugin refuses a message and a switch on a model your rules say never**, as `anvil-claude on` does: a message
|
|
98
|
+
entry, and a model-switch entry in a file of its own, since Claude Code 2.1.250 and older drop a plugin's whole hooks
|
|
99
|
+
file over an event they don't know. Where `on`'s own entries run too, the plugin steps aside for those events.
|
|
100
|
+
- **An older Claude Code no longer switches the newer entries off for every other one.** Every Claude Code from 2.1.153
|
|
101
|
+
on skips a settings entry for an event it doesn't know, so `on` writes the message, switch and helper entries from
|
|
102
|
+
2.1.153 (was 2.1.318). `on` and Home name each Claude Code too old to hear an event, and Home updates it on a key;
|
|
103
|
+
one updated elsewhere is seen by the next `anvil-claude`, which writes the newer entries.
|
|
104
|
+
- **Two model rules no one model can meet are said when the second is added**, including a project's guard that wins
|
|
105
|
+
only some of your guard's kinds.
|
|
106
|
+
- **`release:verify` checks the model guard's records against a real Claude Code** (one `claude -p` on Haiku, about
|
|
107
|
+
$0.002): it fails the release if request lines or reply models stop being written, or if it can't run, unless
|
|
108
|
+
`--skip-contract` is passed, and then it says "skipped".
|
|
109
|
+
### Anvil for Claude Code: caps count what actually ran
|
|
110
|
+
|
|
111
|
+
- **Every capped action in a command line counts.** `vercel --prod && vercel --prod` is 2 deploys; so is the pair
|
|
112
|
+
joined by `;`, `&` or `||`, inside `bash -c` or `ssh`, or a literal list. A line that would cross a cap partway is
|
|
113
|
+
held whole and says what it adds ("1 used today + 2 in this call"). What can't be counted is held, saying so: a line
|
|
114
|
+
of 16 actions or more, a line that repeats an action a number of times Anvil can't read (`{1..50}`, `$(…)`, `while`,
|
|
115
|
+
`xargs`, `find -exec`, `watch`, a function written `name() { … }` that calls itself; also inside quoted code a shell
|
|
116
|
+
runs, as in `bash -c '…'`), and an MCP tool's shell line of several commands. Other runners (`fd --exec`,
|
|
117
|
+
`pnpm -r exec`) count as written. Paid compute counts each start at the line's largest figures. Replay counts count
|
|
118
|
+
and money caps the same way.
|
|
119
|
+
- **A money cap adds each amount once.** Two Stripe refunds on one line ($500 and $700) counted $2,400; they count
|
|
120
|
+
$1,200.
|
|
121
|
+
- **A call Claude Code itself refused gives its place back:** a No at its prompt (probed live in the terminal and
|
|
122
|
+
headless; the desktop app's refusals carry the same fields in its session files), a deny by a permission rule or
|
|
123
|
+
another hook, or auto mode's refusal. It is read from the fields Claude
|
|
124
|
+
Code writes on a refusal, never from the result's words, which a command can print; only where Claude Code can still
|
|
125
|
+
refuse (not under Bypass); a helper's call in its own file. Each waiting count is read before the next tool call of
|
|
126
|
+
its own session runs (and at other sessions' calls, up to 4 more session files a check for places given back and 4
|
|
127
|
+
for counts), so a call that ran is settled as run before a later call of its session could change its record; the
|
|
128
|
+
place comes back at the refused call's own thread's next call. A place given back is checked again for 6 hours and
|
|
129
|
+
counts again if another result for the call appears. A command whose output printed the refusal's words used to free
|
|
130
|
+
the place of an Anvil hold it was allowed past; it no longer does.
|
|
131
|
+
- **Two limits on one cap line are two caps.** `cap: 2 deploys a day and 1 an hour` counts each, and a hold names the
|
|
132
|
+
one reached. `sync` no longer refuses the line.
|
|
133
|
+
- **Numbers in words.** "at most one hundred deploys a day" read as a cap of 1, and "1,000" as 1; both read as written
|
|
134
|
+
now, and so do "a hundred", "a dozen" and "twenty-five". Money in words is refused, never counted as calls. "never
|
|
135
|
+
more than a hundred Stripe refunds a day" offers the cap, as "…100…" does, where it offered a block on every refund.
|
|
136
|
+
|
|
137
|
+
### Anvil for Claude Code: a clearer held notice on macOS
|
|
138
|
+
|
|
139
|
+
- **The notice for a held call reads in three lines, one job each**: `🔹 Anvil 🔹 needs your OK`, then
|
|
140
|
+
`Held: pushes to main`, then `Allow once: run anvil claude allow in a terminal.`
|
|
141
|
+
|
|
142
|
+
### Anvil for Claude Code: `rules import` turns more of your CLAUDE.md into real rules
|
|
143
|
+
|
|
144
|
+
- **On by default: your Claude Code reads each CLAUDE.md line and writes the rule it asks for**, in the same words
|
|
145
|
+
`rules.md` uses. Anvil then checks each rule against the line's own words before offering it:
|
|
146
|
+
- a kind needs its words in the line;
|
|
147
|
+
- a file or folder must be named in the line, and the rule uses the line's spelling;
|
|
148
|
+
- "ask first", "avoid" and "only after CI passes" give a hold, never a block; "even if asked" stays a block.
|
|
149
|
+
- **What Anvil can't enforce yet is listed as "Not covered yet"**: "only commit when I ask", "don't run the build".
|
|
150
|
+
Plain guidance is no longer listed beside it.
|
|
151
|
+
- **On 200 real CLAUDE.md files** it enforced 73% of the rules written there (0.8.1: 43%). It also got 85% of the files
|
|
152
|
+
that ask for a rule fully right (0.8.1: 52%).
|
|
153
|
+
- It adds a little more noise to files that ask for none: about one over-broad or wrong rule in 160 such files.
|
|
154
|
+
- The measure and its numbers: `docs/coding-agents/IMPORT-MEASURE-POOL5-RESULT.md`.
|
|
155
|
+
- **To read as 0.8.1 did:** `ANVIL_IMPORT_BRIEF=0`. With `--no-model`, or no Claude Code installed, nothing changes:
|
|
156
|
+
Anvil's own matcher reads the lines.
|
|
157
|
+
|
|
158
|
+
### Anvil for Claude Code: the rules box reads back what you type, part by part
|
|
159
|
+
|
|
160
|
+
- **On where Claude Code is installed.** Enter reads what you typed back before anything is saved: "Block deploys.
|
|
161
|
+
Publishes too." is two rules, and a part Anvil can't make a rule of is listed as "Not covered yet" beside your own
|
|
162
|
+
words. Enter again adds the rules (e edits, a adds one). The box reads each part; your Claude Code reads only the
|
|
163
|
+
parts it can't (Haiku, through your own login).
|
|
164
|
+
- **On two fresh sealed sets it read 71 and 68 of 90 right**, against 40 and 32 for 0.8.1's box, and left 8 parts of
|
|
165
|
+
180 unsaid against 31. It misses its round's own bar (79 of 90, none unsaid); it ships for the gain.
|
|
166
|
+
- **To type as 0.8.1 did:** `ANVIL_READBACK=0`. With no Claude Code, or `--no-model`, nothing changes. The rewrite
|
|
167
|
+
step, tab, and round 2's held reading stay off (`ANVIL_REWRITE_STEP=1` tries them).
|
|
168
|
+
|
|
169
|
+
### The policy server's change log is written before it answers
|
|
170
|
+
|
|
171
|
+
- **A save, a version, a delete or an approval decision now answers after its change-log row is written.** Seven
|
|
172
|
+
routes sent the 200 first, so a change log read on the next request (the dashboard's activity feed) could miss the
|
|
173
|
+
row. A log that can't be written still never fails the request; it is logged, as before.
|
|
174
|
+
|
|
175
|
+
### Anvil for Claude Code: the read-back, round 3 (IMPROVEMENTS-TO-90)
|
|
176
|
+
|
|
177
|
+
- **Held, not on yet: the rest of round 3** (the rules box's read-back is on: its own entry above). It missed its
|
|
178
|
+
bars, so it stays off and Anvil imports as above. `ANVIL_REWRITE_STEP=1` turns it on to try it:
|
|
179
|
+
- **`rules import` reads each CLAUDE.md line back, as the rules box does.** What it can't enforce is listed under "Not covered
|
|
180
|
+
yet", where it stays in your CLAUDE.md; a long list shows six and folds the rest (`--show-not-covered` lists all); a
|
|
181
|
+
line naming a file not to be edited gives the rule on that file. On 60 fresh real CLAUDE.md files it showed 95.7%
|
|
182
|
+
of their rule lines and hid none weaker, but 60–76.5% of the rules it offered were right (the bar is 85%).
|
|
183
|
+
- **Its check of a rewrite reads each amount at its currency's own precision**: BHD 1.234 and 1.231 are two amounts,
|
|
184
|
+
yen whole, dollars and euros to the cent as before.
|
|
185
|
+
|
|
186
|
+
### Anvil for Claude Code: reading what you type, round 2 (IMPROVEMENTS-TO-90)
|
|
187
|
+
|
|
188
|
+
- **Held, not on yet: everything round 2 built.** It missed its bars, so it stays off and Anvil reads and imports as
|
|
189
|
+
above. `ANVIL_REWRITE_STEP=1` turns it on to try it:
|
|
190
|
+
- **Words that only look like an action name none in the rules box.** "Publishes to our blog" is no package publish,
|
|
191
|
+
"kill a customer's subscription" no process kill, "database migrations" no database destroy. Held after a review
|
|
192
|
+
found it can lose an action said beside them.
|
|
193
|
+
- **The rules box's rewrite step answers in fields**, each quoting your own words. Anvil composes the rule, and a
|
|
194
|
+
guard checks every field against what you wrote. On two fresh sealed sets it read 81 and 67 of 90 plain-speech rules
|
|
195
|
+
right (the bar is 79 each, and the second had one softer rule).
|
|
196
|
+
- **`rules import` asks Sonnet and reads rules on files a CLAUDE.md line names.** On 40 fresh real CLAUDE.md files
|
|
197
|
+
it found 55–65% of their rules (the bar is 90%).
|
|
198
|
+
|
|
199
|
+
### Anvil for Claude Code: importing your CLAUDE.md (IMPROVEMENTS-TO-90, part A)
|
|
200
|
+
|
|
201
|
+
- **`rules import` ends with one choice: `↵ hold these N now · w watch first · q save nothing`.** Enter writes each
|
|
202
|
+
rule's own `block:` or `hold:` line, in force at once; `w` writes `watch:` lines; `q` saves nothing. Before, a yes
|
|
203
|
+
wrote `watch:` lines only, and nothing was held until `enforce`. With no terminal it saves nothing and says how;
|
|
204
|
+
`--yes` still writes `watch:` lines (a script never holds unasked). Anvil's validator checks the rules before it asks.
|
|
205
|
+
- **Each rule is shown beside its CLAUDE.md line as rules.md makes of it**, as `sync` shows it:
|
|
206
|
+
`→ block: force push · blocks every force-push`, or `▲ hold: deploying to production · holds deploys to production`
|
|
207
|
+
with its catch ("a deploy that doesn't say where it goes waits for your OK too"). A line rules.md can't take as
|
|
208
|
+
written ("Never push to main in the upstream repo.": name the repository) is shown `?` with rules.md's reason and
|
|
209
|
+
takes the closest rule (`block: push-main`), as the rules box offers one: never said to hold as written.
|
|
210
|
+
- **Each rule once.** The same words on two lines are added once, with the stronger verb; a rule on a whole kind covers
|
|
211
|
+
a narrower one of the same verb ("Ask before deploying." beside "Ask before deploying to production."), and the
|
|
212
|
+
skipped line names the one that covers it; a line that gives a block and a hold adds both. One already in rules.md is
|
|
213
|
+
never added again, and one there with a weaker verb is named ("already in ~/.anvil/rules.md as watch: change it there
|
|
214
|
+
to block it").
|
|
215
|
+
- **A count typed on a whole kind offers the cap.** "never more than 100 deploys a day" was read as `block: deploys`,
|
|
216
|
+
every deploy blocked; the rules box now answers as it does for an app's count: a rule doesn't count, a cap does,
|
|
217
|
+
`cap: at most 100 deploys a day`. A line written by hand in rules.md keeps its rule.
|
|
218
|
+
- **Home offers the import:** "Import N rules from your CLAUDE.md", when a CLAUDE.md here has rules Anvil can hold and
|
|
219
|
+
your rules.md has none.
|
|
220
|
+
- **Held, not on yet: your Claude Code rewriting what the rules box can't say, and the box reading CLAUDE.md lines.**
|
|
221
|
+
On fresh sealed sets the rewrite step read 66 and 32 of 90 plain-speech rules right (the bar is 79; none lost, none
|
|
222
|
+
softer), and the box's reading of 40 real CLAUDE.md files found 31.6% of their rules (the bar is 90%). Both stay off;
|
|
223
|
+
`ANVIL_REWRITE_STEP=1` turns them on to try them.
|
|
224
|
+
|
|
225
|
+
## [0.8.1] — Anvil for Claude Code: a security review's fixes
|
|
226
|
+
|
|
227
|
+
A review of Anvil for Claude Code and the hosted routes it syncs to (2026-11-23) looked for every way the agent could
|
|
228
|
+
switch Anvil off, approve itself, or show a person something other than what they approve. Each fix below has a test
|
|
229
|
+
that fails on 0.8.0.
|
|
230
|
+
|
|
231
|
+
- **A copy or an unpack into the home folder is a change to Anvil's own controls.** `ditto -x -k payload.zip ~`,
|
|
232
|
+
`python3 -m zipfile -e a.zip ~`, `rsync -a dir/ ~/` and `cp -R dir/. ~` could replace Anvil's hook unseen, in every
|
|
233
|
+
mode. They are held by the always-on floor now; copying one folder by its own name (`cp -R dir ~`) still runs.
|
|
234
|
+
- **A block stays a block.** A command named like one of JavaScript's built-ins (`toString; rm -rf ~`) crashed the
|
|
235
|
+
check, and the block became a hold one Yes released. So did a 13,000-deep JSON body read by an amount rule.
|
|
236
|
+
- **Anvil answers before Claude Code gives up on it.** A named pipe called `.gitattributes`, a 200 MB patch, or an
|
|
237
|
+
amount 110,000 digits long kept the hook past Claude Code's 5 s limit, and the plugin then ran the command. Those are
|
|
238
|
+
held at once now, and the plugin's hook fails closed, as `anvil-claude on`'s does.
|
|
239
|
+
- **Only you can approve or switch Anvil off.** A command left running after the session (a Makefile or a git hook
|
|
240
|
+
with `nohup … /usr/bin/time anvil-claude ghost all &`, or a terminal made by `script`) passed as you. Now the program
|
|
241
|
+
it runs under must be your terminal: an app, ssh, tmux or a terminal emulator.
|
|
242
|
+
- **An OK is for that exact call.** An OK for an edit or an MCP call released a different edit of the same file
|
|
243
|
+
(`disableAllHooks`); now it releases only what was held. Bash holds work as before.
|
|
244
|
+
- **What you approve is what runs.** A held command, a file name or an MCP argument could carry terminal escapes that
|
|
245
|
+
drew a different command in the list you approve from, or wrote your clipboard. Such characters are shown, never
|
|
246
|
+
acted on, everywhere Anvil prints them, and a rules.md line that has one is never applied.
|
|
247
|
+
- **A project's rules.md is applied by `sync` only.** The rules screen applied a cloned repository's never-applied
|
|
248
|
+
`.anvil/rules.md` on Enter without showing it. Enter now applies only your own file's edits; a project's file goes
|
|
249
|
+
through `sync`, which shows every line.
|
|
250
|
+
- **`anvil-claude status` runs nothing a repository wrote.** In a clone whose `.claude/settings.local.json` named
|
|
251
|
+
Anvil's hook, `status` ran that file's command to test it.
|
|
252
|
+
- **Secrets stay out of reports and the hold list:** `aws ssm put-parameter --value`, `az keyvault secret set`,
|
|
253
|
+
`twine -p`, `echo … | sudo -S`, `--password-stdin`, httpie headers, `anv_`, `hf_`, `dop_v1_` and PyPI tokens.
|
|
254
|
+
- **Your workspace key goes only over https** (or to a local test address), and never comes back in an error.
|
|
255
|
+
- **The hook's own git calls run no program a repository configures** (fsmonitor, git hooks).
|
|
256
|
+
- **The dashboard shows what a workspace key sends as text.** A decision's action, key and reason were rendered as
|
|
257
|
+
HTML in two views; markup sent with any key ran in the owner's dashboard. Values the ledger can't hold (a NUL, an
|
|
258
|
+
amount over 2,147,483,647, a time in year 9999) are refused with a 400 instead of jamming the ledger queue.
|
|
259
|
+
|
|
260
|
+
## [0.8.0] — Anvil for Claude Code: budgets, helper and model rules, and every screen says what each can do
|
|
8
261
|
|
|
9
262
|
### Anvil for Claude Code on Windows: built, in testing (2026-11-19)
|
|
10
263
|
|
|
@@ -28,8 +281,6 @@ All notable changes to `@useanvil/sdk` are documented here. The format follows
|
|
|
28
281
|
- **macOS and Linux judge as before:** every one of this Mac's 143,211 real Claude Code calls since Oct 1 is judged
|
|
29
282
|
the same by the branch and its base (`scripts/coding-agents/windows-posix-equivalence.mts`).
|
|
30
283
|
|
|
31
|
-
## [0.8.0] — Anvil for Claude Code: budgets, helper and model rules, and every screen says what each can do
|
|
32
|
-
|
|
33
284
|
### The rules box never reads a line turned around (2026-11-19)
|
|
34
285
|
|
|
35
286
|
Found by three independent attacks (on a rewrite step that was then held: its sealed sets missed the bar). Each was a
|