provared 0.8.0 → 0.8.1
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 +665 -0
- package/README.md +118 -14
- package/docs/guide.md +3 -3
- package/docs/threat-model.md +12 -6
- package/package.json +1 -1
- package/src/der.js +7 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,670 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.8.1 (21 November 2026)
|
|
4
|
+
|
|
5
|
+
Version 0.8.1 changes how the library reads one kind of time and what the signing page will sign. A time in a time-stamp, or in its service's certificates, written in the long form with a year from 0000 to 0099, is now read as the year written; both libraries, JavaScript and Python, refused it before. What changes for a user: such a time-stamp now goes on to the later checks, so 0.8.1 refuses it as `stamp-invalid` (dated outside its service's certificate), where earlier versions refused it as `stamp-bad-data`; and five stored answers in the shared test files changed. The signing page, in this repository, now refuses to sign a permission, asked for by another page, that starts more than 300 seconds after the device's clock, and warns where the device's clock looks behind. No signed byte, label or field's meaning changes, and nothing else in the library changes. A reader in this repository of another project's receipts (not published) now reads such years in the same way, as its entry below says.
|
|
6
|
+
|
|
7
|
+
- **Versions.** The library is 0.8.1, in `package.json` and `python/pyproject.toml`. `examples/frameworks/package-lock.json` gives the library's version as 0.8.1. No range changes: the Hermes plugin's `provared>=0.4.0,<0.9` still takes 0.8.1, and the test workflow's check of that bound passes. The README, the guide, the Python README and three pages say 0.8.1. The guide gives the checking page's new fingerprint, `486471a5b8f3108d08acaacb96d7c27ceeecf95b93bce8e47721b8872a9b1bbc`, since the checker in it changed.
|
|
8
|
+
|
|
9
|
+
- **A time in a time-stamp or in its service's certificates, written
|
|
10
|
+
in the long form (GeneralizedTime) with a year from 0000 to 0099, is
|
|
11
|
+
now read as the year written** (`timeOf` in `src/der.js`, `time_of`
|
|
12
|
+
in `python/src/provared/der.py`). Before, both libraries refused it
|
|
13
|
+
(`stamp-bad-data`, "a time names a moment that does not exist"): in
|
|
14
|
+
JavaScript because `Date.UTC` reads a year from 0 to 99 as 1900 to
|
|
15
|
+
1999, so that the date did not come back as it went in, and in
|
|
16
|
+
Python to match. The format description never stated that refusal,
|
|
17
|
+
and a checker written from it alone reads such a year; the
|
|
18
|
+
description is unchanged, and the libraries and the shared test
|
|
19
|
+
files now agree with it. JavaScript sets the date with
|
|
20
|
+
`setUTCFullYear`, which takes every year as given; Python no longer
|
|
21
|
+
refuses a year below 100. A date that does not exist in those years
|
|
22
|
+
(29 February 0099, a thirteenth month, hour 24) is refused as in any
|
|
23
|
+
other year. The short form (UTCTime) names 1950 to 2049, as before.
|
|
24
|
+
- **What a checker now answers.** Such a time goes on to the rules
|
|
25
|
+
that follow the reading of it (format description, section 21.2). A
|
|
26
|
+
time-stamp that states a time in the year 0050, under a certificate
|
|
27
|
+
in force from 2026 to 2036, was refused as `stamp-bad-data`; it is
|
|
28
|
+
now refused as `stamp-invalid`, "A time-stamp is dated outside the
|
|
29
|
+
time its service's certificate was in force." No case in the shared
|
|
30
|
+
test files, and no test here, has such a time-stamp pass: for that,
|
|
31
|
+
a trusted service's certificates would have to be in force in those
|
|
32
|
+
years.
|
|
33
|
+
- **Shared test files whose stored answers changed** (five, against
|
|
34
|
+
the files before this change; each new answer is the one the library
|
|
35
|
+
gives): `test-vectors/stamps.json`, case 59, "statement: a time in
|
|
36
|
+
the year 50": refused `stamp-bad-data` before, refused
|
|
37
|
+
`stamp-invalid` now, with the words above.
|
|
38
|
+
`test-vectors/der-times.json`, four cases, each refused
|
|
39
|
+
`stamp-bad-data` before and read now, in milliseconds since 1970:
|
|
40
|
+
`00000101000000Z` -62167219200000; `00500101000000Z`
|
|
41
|
+
-60589296000000; `00990101000000Z` -59042995200000;
|
|
42
|
+
`00991231235959Z` -59011459201000.
|
|
43
|
+
- **Shared test files with more cases.** `der-times.json` gains six
|
|
44
|
+
(61 before, 67 now). Three are read: `00010101000000Z`
|
|
45
|
+
-62135596800000; `00960229000000Z` -59132592000000;
|
|
46
|
+
`00991231235959.5Z` -59011459200500. Three are refused in those
|
|
47
|
+
years as in any other: 29 February 0099, a thirteenth month in 0050,
|
|
48
|
+
and hour 24 in 0050.
|
|
49
|
+
`test-vectors/times.json` gains seven cases (18 before, 25 now) for a
|
|
50
|
+
record's own time (`parseTime`, `parse_time`; format description,
|
|
51
|
+
section 3.6), which was and is the year it says in both libraries:
|
|
52
|
+
the last second of 0000, the first of 0001, 0050, 29 February 0096
|
|
53
|
+
(a leap year), 29 February 0099 (not one), the last second of 0099
|
|
54
|
+
and the first of 0100.
|
|
55
|
+
- **Tests.** `test/timestamp.test.mjs` (one test) and
|
|
56
|
+
`python/tests/test_small_years.py` (one) hold the reading of those
|
|
57
|
+
years and the dates still refused; both fail on the earlier code.
|
|
58
|
+
`test/encoding.test.mjs` (one) and the second test of the Python
|
|
59
|
+
file hold a record's own time, and pass on the earlier code too.
|
|
60
|
+
- **The signing page sets its own limit on a start**
|
|
61
|
+
(`startRefusal` in `page/sign-page.js`). A review of the hand-over
|
|
62
|
+
(3 November 2026) found that the five-minute rule rests on the clock
|
|
63
|
+
of the device the person signs on, and that the signing page set no
|
|
64
|
+
limit of its own on a start: it signed whatever start the page that
|
|
65
|
+
asked gave it. Now a permission another page asks for (`#request=`,
|
|
66
|
+
kind `permission` or `renewal`) is not signed where it starts more
|
|
67
|
+
than 300 seconds (the allowance between clocks the format uses, and
|
|
68
|
+
the one by which the recorder beside Claude Code refuses a renewal
|
|
69
|
+
handed over, `starts-later`) after this device's clock at the press
|
|
70
|
+
of Sign. It is checked at every press, on what was read and is about
|
|
71
|
+
to be signed, before any warning is shown or a passkey asked, and
|
|
72
|
+
the page says why. The limit covers such requests only. A link with
|
|
73
|
+
`#permission=` carries its own start, which the page takes as the
|
|
74
|
+
link gives it (`readStartingPermission`), and that way of signing
|
|
75
|
+
has no limit on the start, as before: it is meant for a permission
|
|
76
|
+
kept as a file. A start that is not a time is left to the format's
|
|
77
|
+
own check, as before.
|
|
78
|
+
- **The signing page warns where this device's clock looks behind**
|
|
79
|
+
(`clockWarning`). Where a request carries an earlier permission
|
|
80
|
+
(a renewal or a cancellation), whose passkey signature the page has
|
|
81
|
+
checked, and by this device's clock that permission will not start
|
|
82
|
+
for more than 300 seconds yet, either it has not started or the
|
|
83
|
+
clock is behind: the page shows a warning with the others, and signs
|
|
84
|
+
only once the person presses again. Nothing signed changes: a
|
|
85
|
+
cancellation is dated by the same clock as before.
|
|
86
|
+
- **The recorder's README** (`integrations/claude-code/README.md`,
|
|
87
|
+
"Limits") said that the signing page sets no limit of its own on the
|
|
88
|
+
start. It now says what the page in this repository does, that the
|
|
89
|
+
limit covers requests (`#request=`) only, that a link with
|
|
90
|
+
`#permission=` carries its own start and has no such limit, that the
|
|
91
|
+
limit is measured by the signing device's clock, and that a copy of
|
|
92
|
+
the page from before this change (the one served at
|
|
93
|
+
https://sign.prova.red, until it is brought up to date) sets none.
|
|
94
|
+
- **The reader of another project's receipts**
|
|
95
|
+
(`integrations/agent-middleware/judge.mjs`, `parseAmwTime`; not
|
|
96
|
+
published) reads a time in the years 0000 to 0099 as the year
|
|
97
|
+
written, for the same reason and in the same way (`setUTCFullYear`
|
|
98
|
+
in place of `Date.UTC`). **This changes what it answers:** a receipt
|
|
99
|
+
dated in those years was "Not compared: the receipt's time cannot be
|
|
100
|
+
read"; it is now compared, and one outside the permission's period
|
|
101
|
+
is found `outside-valid-time`. A date that does not exist in those
|
|
102
|
+
years is still a time that cannot be read. One test
|
|
103
|
+
(`integrations/agent-middleware/test/judge.test.mjs`), which fails
|
|
104
|
+
on the earlier code.
|
|
105
|
+
- **What these two do not do.** Both read the same clock, the signing
|
|
106
|
+
device's. A clock that is ahead is not noticed, and with such a
|
|
107
|
+
clock a start that far ahead of the true time is still signed. A
|
|
108
|
+
request with no earlier permission gives the page nothing to compare
|
|
109
|
+
the clock with. The page asks no one the time, and sends nothing
|
|
110
|
+
anywhere, as before.
|
|
111
|
+
- **Tests** (`test/sign-start.test.mjs`, seven): the limit at 300
|
|
112
|
+
seconds and one second past it, for both kinds; no limit with no
|
|
113
|
+
request; a start that is not a time; the warning at the same two
|
|
114
|
+
points, and with a clock a year behind; the warning's words the same
|
|
115
|
+
from one press to the next; and, read from the page's own text, that
|
|
116
|
+
the limit comes before the warnings and the passkey, and that both
|
|
117
|
+
signing buttons work the warning out. In a browser with a virtual
|
|
118
|
+
passkey (`test/sign-window.test.mjs`, one test, skipped where there
|
|
119
|
+
is no browser): a renewal that starts ten minutes ahead is not
|
|
120
|
+
signed, no warning is shown, nothing goes back and the passkey is
|
|
121
|
+
not asked; and with a clock a day behind, a cancellation's first
|
|
122
|
+
press shows the warning and signs nothing, and the second signs.
|
|
123
|
+
|
|
124
|
+
## Not yet released
|
|
125
|
+
|
|
126
|
+
- **The site and the READMEs after `provared-mcp-executor` 0.4.2.** The
|
|
127
|
+
home page, "Provared in plain words", "Over the limit", the top-level
|
|
128
|
+
README and the executor's README tell readers to use 0.4.2 or later
|
|
129
|
+
and link to the security advisory GHSA-q53c-6wvv-gfj8; the home page's
|
|
130
|
+
"What is new" names 0.4.0, 0.4.1 and 0.4.2, and its status line gives
|
|
131
|
+
the guard's version beside the library's. The pages, the READMEs and
|
|
132
|
+
the descriptions of the recorder beside Claude Code (`package.json`,
|
|
133
|
+
the plugin's `plugin.json` and the marketplace) no longer say it
|
|
134
|
+
records every tool call: eight tools, those in `NOT_RECORDED` in
|
|
135
|
+
`integrations/claude-code/actions.mjs`, are not recorded, and the
|
|
136
|
+
README names them. Its README says the plugin installs library 0.8.0
|
|
137
|
+
from its lockfile, where it said 0.6.0. The executor's README says the
|
|
138
|
+
MCP Registry lists 0.4.2. The record page and its generator, tools/make-record-page.mjs, name the eighth tool left out, the end of the conversation. No other code changes.
|
|
139
|
+
- **`provared-mcp-executor` 0.4.2 (15 November 2026): a security fix for
|
|
140
|
+
two weaknesses. In front of a tool server whose JSON reader ignores
|
|
141
|
+
capitals, or of one that ends a line at a bare carriage return, an
|
|
142
|
+
agent could have a tool call run that the executor never checked, with
|
|
143
|
+
no receipt; in front of the first, also a tool other than the one its
|
|
144
|
+
receipt names, or a change that a rule on content forbids. 0.4.2
|
|
145
|
+
refuses the messages that did the first, and writes every message to
|
|
146
|
+
the server as one line, which ends the second. Every version from 0.1.0
|
|
147
|
+
to 0.4.1 has both weaknesses.**
|
|
148
|
+
- **The second weakness: one message read as several lines.** The
|
|
149
|
+
executor ends a line at a line feed alone. Some readers end one at a
|
|
150
|
+
bare carriage return too: `node:readline` does (and at U+2028 and
|
|
151
|
+
U+2029), and so does a text reader with universal newlines. Python's
|
|
152
|
+
`io.TextIOWrapper` reads that way unless told otherwise; the official
|
|
153
|
+
Python SDK's stdio server reads through one; and Python opens its
|
|
154
|
+
standard input that way on Windows. JSON allows a carriage return
|
|
155
|
+
between its values. So one line of the agent's,
|
|
156
|
+
`{"jsonrpc":"2.0","id":"outer","method":"ping","params":{"a":[<CR>{"jsonrpc":"2.0","id":"hidden","method":"tools/call","params":{"name":"order","arguments":{"total":999999}}}<CR>]}}`,
|
|
157
|
+
was a `ping` to the executor, which passed it on with no check, and
|
|
158
|
+
three lines to such a server, the second a call of `order` for
|
|
159
|
+
999,999: it ran, with no receipt and no denial, and its answer came
|
|
160
|
+
back to the agent. A text argument with U+2028 in it reached a server
|
|
161
|
+
that reads with `node:readline` as two lines, was not answered, and
|
|
162
|
+
was recorded as "outcome not known". **Who was exposed:** anyone who
|
|
163
|
+
runs the executor on stdio in front of a tool server that ends a line
|
|
164
|
+
at a bare carriage return. A server that ends a line at a line feed
|
|
165
|
+
alone is not affected. Servers built on the official Python SDK read
|
|
166
|
+
standard input through `io.TextIOWrapper`, so they end a line at a
|
|
167
|
+
bare carriage return; other servers have not been checked. Over HTTP
|
|
168
|
+
the executor sends the upstream a body, not lines,
|
|
169
|
+
and is not affected. **What 0.4.2 does** (`oneLine` in
|
|
170
|
+
`mcp-executor/jsonrpc.mjs`, used by `toServer` in
|
|
171
|
+
`mcp-executor/executor.mjs`; `mcp-executor/DESIGN.md`, X248): every
|
|
172
|
+
message written to the server's standard input is first made one
|
|
173
|
+
line, and is still the same JSON: a line feed or a carriage return
|
|
174
|
+
between its values becomes a space, and U+0085, U+2028 and U+2029 in
|
|
175
|
+
a text are written as their JSON escapes. This makes it one line for
|
|
176
|
+
a reader that takes the bytes as UTF-8. A reader that takes them as
|
|
177
|
+
another encoding may still cut a line inside a character beyond
|
|
178
|
+
ASCII; such a cut falls inside a text, where quotation marks are
|
|
179
|
+
escaped, so it can spoil a message and cannot hide a call. `oneLine`
|
|
180
|
+
is a new export of `provared-mcp-executor/jsonrpc`. **Tests:**
|
|
181
|
+
`mcp-executor/test/lines.test.mjs` sends such messages in front of
|
|
182
|
+
the made-up server reading each of the two ways (`FAKE_LINE_ENDS` in
|
|
183
|
+
`test/fake-server.mjs`); both of those tests fail without the fix.
|
|
184
|
+
The demonstration's made-up server (`demo/server.mjs`) still reads
|
|
185
|
+
with `node:readline`; behind the executor it is now sent one line
|
|
186
|
+
for each message.
|
|
187
|
+
- **The first weakness: what was weak.** The executor reads member names exactly. Some
|
|
188
|
+
JSON readers do not: the standard JSON reader of the Go language
|
|
189
|
+
takes `Method` for `method` and `Name` for `name` in the fields it
|
|
190
|
+
knows, the later one winning. A message with both was therefore one
|
|
191
|
+
message to the executor and another to such a server. A review ran
|
|
192
|
+
three, in front of a made-up server that reads names that way:
|
|
193
|
+
`{"method":"ping","Method":"tools/call", ...}` was a ping to the
|
|
194
|
+
executor, which passed it on with no check, no receipt and no
|
|
195
|
+
denial, and a tool call to the server, which ran it;
|
|
196
|
+
`{"method":"notifications/initialized","Method":"tools/call","ID":13, ...}`
|
|
197
|
+
likewise; and `{"name":"echo","Name":"order","arguments":{},"Arguments":{"total":999999}}`
|
|
198
|
+
was checked, receipted and countersigned as `echo` with no
|
|
199
|
+
arguments, and run as `order` for 999,999. **A rule on the content
|
|
200
|
+
of a change could be skipped the same way.** A rule reads the
|
|
201
|
+
arguments by the names it is given. With the README's own example
|
|
202
|
+
rules, `write_file` with `{"Path":"config/settings.json","content":"{\"scan\":true}"}`
|
|
203
|
+
was let through and receipted as an allowed change: the rule's
|
|
204
|
+
`when` found no `path`, so the rule did not apply, and such a server
|
|
205
|
+
read `Path` as `path` and wrote the file with the scan on. An
|
|
206
|
+
`edit_file` of `settings.json` under `Path`, and a lone `"SCAN": true`
|
|
207
|
+
inside the content, passed in the same way. Rules on content came
|
|
208
|
+
with 0.2.0, and every version from then to 0.4.1 does this.
|
|
209
|
+
- **Who was exposed.** Anyone who runs the executor, on stdio or over
|
|
210
|
+
HTTP, in front of a tool server whose JSON reader ignores capitals
|
|
211
|
+
in member names. A server that reads names exactly, as the JSON
|
|
212
|
+
readers of Node.js and Python do, is not affected. Servers built on
|
|
213
|
+
the official Go SDK before 1.3.1 ignore capitals
|
|
214
|
+
(GHSA-wvj2-96wp-fq3f); other servers have not been checked. Every
|
|
215
|
+
version from 0.1.0 to 0.4.1 has the weakness: `readMessage` in
|
|
216
|
+
`mcp-executor/jsonrpc.mjs` has looked only for a name given twice
|
|
217
|
+
exactly since the first version.
|
|
218
|
+
- **What 0.4.2 does** (`readMessage` in `mcp-executor/jsonrpc.mjs`,
|
|
219
|
+
`handleCall` and `filteredList` in `mcp-executor/executor.mjs`;
|
|
220
|
+
`mcp-executor/DESIGN.md`, X241). A message with a member at its top
|
|
221
|
+
level other than `jsonrpc`, `id`, `method`, `params`, `result` and
|
|
222
|
+
`error`, written exactly so, is refused, from the agent and from the
|
|
223
|
+
server. A message of the agent's is refused where its `params` hold,
|
|
224
|
+
in one object at any depth, two names that differ only in capitals
|
|
225
|
+
(or in the long s for `s`, or the Kelvin sign for `k`); where a
|
|
226
|
+
`tools/call` writes `name`, `arguments` or `_meta` in other
|
|
227
|
+
capitals, or a `notifications/cancelled` writes `requestId` so; and
|
|
228
|
+
where the `_meta` of a `tools/call` writes `red.prova/call-id` or
|
|
229
|
+
`traceparent` in other capitals. The agent is answered with the
|
|
230
|
+
error -32600, as for a member name given twice, and nothing is sent
|
|
231
|
+
to the server. A server's answer with such a member at its top level
|
|
232
|
+
is treated as any line the executor cannot read: the receipt says
|
|
233
|
+
the answer could not be read and names no result. In a `tools/list`
|
|
234
|
+
answer that the executor filters, a tool with a second name in other
|
|
235
|
+
capitals is not shown, and a second list (`Tools`) is left out.
|
|
236
|
+
- **What 0.4.2 does for the rules on content** (`unreadableAt` and
|
|
237
|
+
`holds` in `mcp-executor/rules.mjs`; DESIGN.md, X249). Where a rule
|
|
238
|
+
reads a pointer, in its `when` or its `test`, and an object on the
|
|
239
|
+
way holds a member that is the pointer's name in other capitals and
|
|
240
|
+
is not written as the rule reads it, the call is refused as
|
|
241
|
+
`content-unreadable`, with a denial: `Path` where the rule reads
|
|
242
|
+
`/path`, `SCAN` in the content where it reads `/scan`. So is a call
|
|
243
|
+
where the way to the pointer stops, with names still to follow, at a
|
|
244
|
+
value that is neither an object nor a list: a rule that tests
|
|
245
|
+
`/debug` in `options` refused `{"options":{"debug":true}}` and let
|
|
246
|
+
through `{"options":"{\"debug\":true}"}`, a text that a server may
|
|
247
|
+
read as the object. Such a value was taken for absent before.
|
|
248
|
+
- **The reading never ends the executor** (`foldedInParams` and
|
|
249
|
+
`readMessage` in `mcp-executor/jsonrpc.mjs`; DESIGN.md, X250). The
|
|
250
|
+
check for names in other capitals walks the message's text as it
|
|
251
|
+
came, and calls nothing that calls itself. And a message nested more
|
|
252
|
+
than 256 levels deep is not read at all (`MAX_DEPTH`): the agent's
|
|
253
|
+
is refused with -32600 under its id; the server's is treated as any
|
|
254
|
+
line the executor cannot read, so that a call's receipt says its
|
|
255
|
+
answer could not be read. A list of tools that the executor is to
|
|
256
|
+
filter (`hideUnlisted`) and cannot read, where it can match the
|
|
257
|
+
answer to the request, is no longer handed to the agent as it was,
|
|
258
|
+
which showed it the tools the executor is to hide: the request is
|
|
259
|
+
answered with the error -32603 under its id, and the log says
|
|
260
|
+
`tools-list-not-read`. That is, on stdio, a line whose one top-level
|
|
261
|
+
id is the request's; over HTTP, a JSON body, or an event under the
|
|
262
|
+
request's id. A list the executor cannot match to its request is
|
|
263
|
+
still handed on as it was, and the request is not answered
|
|
264
|
+
(DESIGN.md, X250): on stdio a line with an id given twice, no id or
|
|
265
|
+
a null one, a list of messages (a batch), or a byte order mark
|
|
266
|
+
before the message; over HTTP an event with no id, under another id,
|
|
267
|
+
or holding a list of messages. A tool shown so is still refused when
|
|
268
|
+
it is called, unless the settings forward such calls (`unlisted`).
|
|
269
|
+
Over HTTP the upstream's own error answer to `tools/list` goes on as
|
|
270
|
+
it is, with its status, under the request's id, another or a null
|
|
271
|
+
one, where the body is an error answer and nothing more
|
|
272
|
+
(`errorAnswer` in `mcp-executor/jsonrpc.mjs`; DESIGN.md, X260): a
|
|
273
|
+
server may refuse a request it could not read, or a session it does
|
|
274
|
+
not know, with a 400 or a 404 and an error under a null id. And
|
|
275
|
+
where the executor writes its own error in place of an upstream's
|
|
276
|
+
answer, it is sent as `application/json; charset=utf-8` with
|
|
277
|
+
`cache-control: no-store`, and not under the upstream's content type
|
|
278
|
+
or its word on caching (`test/list.test.mjs`, 14 tests, on stdio and
|
|
279
|
+
over HTTP as a JSON body and as an event stream). Before, one deep
|
|
280
|
+
answer of the server's ended the
|
|
281
|
+
executor: its error, or its list of tools, which the executor writes
|
|
282
|
+
out afresh, overflowed the stack (run). An agent's deep cancellation
|
|
283
|
+
of a call in flight, written afresh in the same way, ended it too
|
|
284
|
+
(run in the review's re-check: 0.4.1 ends at `executor.mjs:1214`).
|
|
285
|
+
(As first built for 0.4.2,
|
|
286
|
+
and never released, the check for names did the same on any line
|
|
287
|
+
5,000 levels deep.) What changes for a caller: a message deeper than
|
|
288
|
+
256 levels, which 0.4.1 passed on where it was not a call, is
|
|
289
|
+
refused. The two older refusals, for a member name given
|
|
290
|
+
twice and for a whole number beyond 2^53 - 1, are now answered under
|
|
291
|
+
the request's id where it can be found; before, under no id, so that
|
|
292
|
+
a client on stdio waited out its own timeout.
|
|
293
|
+
- **What changes for a caller.** Arguments with two names in one
|
|
294
|
+
object that differ only in capitals (`path` and `PATH`) are now
|
|
295
|
+
refused in every call, with -32600 and no denial; before, they were
|
|
296
|
+
refused, with a denial, only where a rule read the amount or the
|
|
297
|
+
content from the arguments. A call that a rule on content cannot read
|
|
298
|
+
exactly, in the two ways above, is now refused where it was let
|
|
299
|
+
through. That takes in a structure written as null where a rule
|
|
300
|
+
reads inside it: `{"options": null}` is refused as
|
|
301
|
+
`content-unreadable` where a rule tests `/debug` in `options`, while
|
|
302
|
+
`{"options": {}}` is taken as before, and a member that is not there
|
|
303
|
+
at all is still absent. `misspelt`, `foldedInParams`, `oneLine`,
|
|
304
|
+
`deeperThan`, `errorAnswer` and
|
|
305
|
+
`MAX_DEPTH` are new exports of `provared-mcp-executor/jsonrpc`, and `unreadableAt` of
|
|
306
|
+
`provared-mcp-executor/rules`.
|
|
307
|
+
- **What it does not cover.** The folding is that of capitals and a
|
|
308
|
+
little wider: it also makes one of the long s and `s`, the Kelvin
|
|
309
|
+
sign and `k`, the sharp s and `ss`, the dotless i, the dotted capital
|
|
310
|
+
I and `i`, and the ligatures and their letters, so that `Masse` and
|
|
311
|
+
`Maße` in one object are refused too. It errs on the side of
|
|
312
|
+
refusing. A reader that takes two names for one in some other way is
|
|
313
|
+
not covered. A rule on content sees a name in other capitals only on
|
|
314
|
+
the way to a pointer it reads: a rule that tests `/scan` does not see
|
|
315
|
+
`SCAN` in an object it does not walk through. A list that is asked
|
|
316
|
+
for a member by name is still taken as having none.
|
|
317
|
+
- **Tests.** `mcp-executor/test/names.test.mjs` sends eleven such
|
|
318
|
+
messages on stdio and over HTTP, in front of the made-up servers
|
|
319
|
+
reading names without regard to capitals (`FAKE_FOLD` in
|
|
320
|
+
`test/fake-server.mjs`, `foldNames()` in `test/fake-http-server.mjs`),
|
|
321
|
+
and reads each server's own record of what it ran; each of its five
|
|
322
|
+
tests fails without the fix. Two older tests that expected a denial
|
|
323
|
+
for such arguments now expect the error. Two new tests in
|
|
324
|
+
`test/content-rules.test.mjs` run the rules' cases, the first in
|
|
325
|
+
front of the made-up server that ignores capitals; and
|
|
326
|
+
`test/deep.test.mjs` (5 tests) sends 200,000 levels of nesting each
|
|
327
|
+
way on stdio and over HTTP (the agent's requests, a call and a
|
|
328
|
+
cancellation; the server's result, error, list of tools and
|
|
329
|
+
notification), and reads the ids of the older refusals; an
|
|
330
|
+
older test that expected such a refusal under no id now expects the
|
|
331
|
+
request's. `test/list.test.mjs` (14 tests) also holds what stays: a
|
|
332
|
+
list the executor cannot match to its request is handed on, in five
|
|
333
|
+
ways on stdio and three as an event. The review's re-check took 14
|
|
334
|
+
parts of these fixes out, one at a time, and a test failed for 12.
|
|
335
|
+
For two, no test fails in the code as it stands, since the limit on
|
|
336
|
+
nesting now comes first: the check for names in other capitals
|
|
337
|
+
walking the text (`foldedInParams` in `readMessage`), which was the
|
|
338
|
+
fix for a deep line before the limit was there and is a second layer
|
|
339
|
+
behind it now; and the catch-all in `readMessage`, which no line is
|
|
340
|
+
known to reach. The nine parts of the two changes over HTTP (X260)
|
|
341
|
+
were each undone once, and a test failed for each.
|
|
342
|
+
- **Versions.** 0.4.2 in `mcp-executor/package.json` and
|
|
343
|
+
`mcp-executor/server.json` (both fields).
|
|
344
|
+
|
|
345
|
+
- **The threat model, corrected on time-stamps.** Two places in
|
|
346
|
+
`docs/threat-model.md` said an outside time-stamp settles a stub's
|
|
347
|
+
date. It shows only that the stub existed by the stamp's time: it catches
|
|
348
|
+
forward dating, not back dating. No code changes.
|
|
349
|
+
|
|
350
|
+
- **`provared-mcp-executor` 0.4.1 (11 November 2026, on npm and the MCP Registry):
|
|
351
|
+
`demo --stdio`, for an MCP client or a directory's inspector.** A
|
|
352
|
+
directory that builds the package in a container and lists its tools
|
|
353
|
+
has no passkey and no settings to give it. What changes, in
|
|
354
|
+
`mcp-executor/`:
|
|
355
|
+
- **`provared-mcp-executor demo --stdio`** makes the same new
|
|
356
|
+
temporary folder, settings, keys and stand-in permission as `demo`,
|
|
357
|
+
with the same code (`prepareDemo` in `demo.mjs`, which `demo` now
|
|
358
|
+
uses too), runs `check`, and then runs the executor over stdio in
|
|
359
|
+
front of the made-up server, as `stdio` does (`runStdio` in `bin.mjs`,
|
|
360
|
+
which `stdio` now uses too), until its input closes. Its standard
|
|
361
|
+
output carries MCP messages only. On its standard error it says, in
|
|
362
|
+
one line, that this is a demonstration under a development stand-in
|
|
363
|
+
whose records prove nothing about anyone, when its permission ends
|
|
364
|
+
(after which every call is refused until it is started again), and
|
|
365
|
+
where the book is; the executor's own JSON lines follow. It writes nothing outside that
|
|
366
|
+
folder. `stdio` with settings of a person's own works as before.
|
|
367
|
+
- **`demo` refuses any argument but `--stdio`**, and then writes
|
|
368
|
+
nothing; 0.4.0 took no notice of one.
|
|
369
|
+
- **The made-up server's tools** (`demo/server.mjs`) begin their
|
|
370
|
+
descriptions with "Demonstration only: a made-up tool", and `add`
|
|
371
|
+
describes its two arguments.
|
|
372
|
+
- **Tests** (`test/newcomer.test.mjs`): `demo --stdio`, started as a
|
|
373
|
+
client starts it, answers `initialize` and `tools/list` with the two
|
|
374
|
+
tools, lets `echo "hello"` through, refuses `echo` with the word
|
|
375
|
+
"password" with the denial text, puts nothing but MCP messages on its
|
|
376
|
+
standard output and one line for a person on its standard error,
|
|
377
|
+
ends with code 0 when its input closes, and leaves a book that checks
|
|
378
|
+
clean (intact, fully checked, within the permission, no problem found)
|
|
379
|
+
in the folder it names; and `demo` with another argument is
|
|
380
|
+
refused.
|
|
381
|
+
- **The README** says what `demo --stdio` is for, under the paragraph
|
|
382
|
+
on `demo`.
|
|
383
|
+
- **Versions.** 0.4.1 in `package.json`, `server.json` (both fields)
|
|
384
|
+
and the command's `--version`; the `npm pack` file name in the README.
|
|
385
|
+
The library range stays `^0.7.0`.
|
|
386
|
+
- **Choices.** The permission lasts one hour, as for `demo`, since the
|
|
387
|
+
preparation is the same; a client that needs longer starts it again.
|
|
388
|
+
The line for a person is plain text, not JSON, since a person reads
|
|
389
|
+
it; it starts "provared-mcp-executor:", as the line
|
|
390
|
+
from `keys` does. `demo` refuses an unknown argument, as `init` does,
|
|
391
|
+
so that a mistyped `--stdio` does not run the other demonstration and
|
|
392
|
+
print text on the standard output.
|
|
393
|
+
|
|
394
|
+
- **`provared-mcp-executor` 0.4.0 (11 November 2026): the
|
|
395
|
+
first five minutes, with no passkey.** A trial from a fresh install of
|
|
396
|
+
0.3.0, following only the README, found that nothing could be seen to
|
|
397
|
+
work without a passkey. What changes, in `mcp-executor/`:
|
|
398
|
+
- **`provared-mcp-executor demo`** (`demo.mjs`): in a new folder of its
|
|
399
|
+
own in the system's temporary folder, which it names at the start and
|
|
400
|
+
leaves in place, it writes settings, makes the keys with the
|
|
401
|
+
executor's own `keys` command, has the library's development
|
|
402
|
+
stand-in for a passkey sign a permission (its issuer's name ends with
|
|
403
|
+
"(development)"; it proves nothing about anyone, and the output says
|
|
404
|
+
so at the start and the end), runs `check`, starts `stdio` in front of
|
|
405
|
+
the made-up tool server, sends `echo "hello"`, which is let through,
|
|
406
|
+
and `echo` with the word "password", which a rule on content refuses,
|
|
407
|
+
and checks the book with the library's checker. It writes nothing
|
|
408
|
+
anywhere else, and ends with exit code 0 only where each step went as
|
|
409
|
+
it should. `demo/server.mjs` and `demo/content-rules.json` are now in
|
|
410
|
+
the npm package, for this command; the rest of `demo/` is not.
|
|
411
|
+
- **`provared-mcp-executor init`** copies `executor.example.json` and
|
|
412
|
+
`content-rules.example.json` into the current folder as
|
|
413
|
+
`executor.json` and `content-rules.json` (`init --http`: the HTTP
|
|
414
|
+
executor's, as `executor-http.json`), says what to fill in next, and
|
|
415
|
+
writes nothing if either file is already there.
|
|
416
|
+
- **The example settings** mark what a person must fill in as a text
|
|
417
|
+
wholly in angle brackets: the server's program, its folder and its
|
|
418
|
+
credential file (they named a `files-server.mjs` and a
|
|
419
|
+
`secrets/files-token` that no one has), the upstream's credential
|
|
420
|
+
file, the passkey's thumbprint and the agents' secret hashes. They
|
|
421
|
+
give `edit_file` and `apply_patch` a rule in `tools`, since the
|
|
422
|
+
example rules on content name them.
|
|
423
|
+
- **`check` lists every problem it can find on its own in one run**:
|
|
424
|
+
the settings, each placeholder left, the server's program and folder
|
|
425
|
+
(a `server.cwd` that does not exist is now a problem), each
|
|
426
|
+
credential, the rules file, each key file (a missing one with the
|
|
427
|
+
command that makes it) and each slip. Only where none is found does it
|
|
428
|
+
hold the slips against the keys and the rules, as a start does; that
|
|
429
|
+
part stops at the first difference, as a start does.
|
|
430
|
+
- **`keys` reads and checks everything before it writes**: the
|
|
431
|
+
settings, the rules file, every key file already there, and that the
|
|
432
|
+
folder of each file it would write can be made (no file stands where a
|
|
433
|
+
folder would be); `--out` may not name a key file. 0.3.0 made the
|
|
434
|
+
executor's key file and then stopped on a missing rules file. A write
|
|
435
|
+
can still fail after these checks (a full disk, a folder it may not
|
|
436
|
+
write in), and leave the files written before it. It no longer needs the
|
|
437
|
+
passkey's thumbprint, which is known only once the person has signed,
|
|
438
|
+
or the agents' secret hashes, which it does not use. It prints the same JSON as before, and one line on
|
|
439
|
+
the standard error saying what to do with it; `--out <file>` writes the
|
|
440
|
+
JSON to a new file instead, making its folder where needed, as it makes
|
|
441
|
+
the key folders.
|
|
442
|
+
- **One warning set aside**: the command (`bin.mjs`, through
|
|
443
|
+
`quiet.mjs`) does not print Node.js's notice that its ML-DSA-87
|
|
444
|
+
signing is experimental, and prints every other warning, the notice
|
|
445
|
+
about SLH-DSA included. The library and code that imports the
|
|
446
|
+
executor set nothing aside.
|
|
447
|
+
- **`provared-mcp-executor --version`** prints the version.
|
|
448
|
+
- **The README** opens with a quick start (`demo` first, then `init`,
|
|
449
|
+
`keys` and `check`), says where the example files are and why the
|
|
450
|
+
ML-DSA-87 notice appears, gives the steps in an order that works,
|
|
451
|
+
marks what is only in the repository, and says that the MCP Registry
|
|
452
|
+
listed 0.2.0 as its latest version when it was looked at on
|
|
453
|
+
11 November 2026.
|
|
454
|
+
- **Versions.** 0.4.0 in `package.json`, `server.json` and the
|
|
455
|
+
command's `--version`. The library range stays `^0.7.0`.
|
|
456
|
+
`demo/package.json`, which installs the published 0.2.0 for the
|
|
457
|
+
repository's other demonstration, is unchanged.
|
|
458
|
+
- **Choices.** The demonstration's folder is left in place, so that the
|
|
459
|
+
book can be looked at, and its permission lasts one hour, since it is
|
|
460
|
+
used once. `init` copies into the current folder only and has no way
|
|
461
|
+
to overwrite. A placeholder is one of the six texts in angle brackets
|
|
462
|
+
in the two example files, word for word, so that no value of a
|
|
463
|
+
person's own is taken for one. Where a slip's folder does not exist,
|
|
464
|
+
`check` says to make it (`init --http` writes no `slips/`), so that
|
|
465
|
+
`init` writes only its two files. The line from `keys` goes to the standard error, so that what it
|
|
466
|
+
prints on the standard output stays JSON, which `demo/start.mjs`
|
|
467
|
+
reads. `--out` makes a new file only. Only a warning of the type
|
|
468
|
+
`ExperimentalWarning` whose text begins "The ML-DSA-87 Web Crypto API
|
|
469
|
+
algorithm is an experimental feature" is set aside, by wrapping
|
|
470
|
+
`process.emitWarning` in the command alone.
|
|
471
|
+
- **Tests**: `test/newcomer.test.mjs`, thirteen tests: `demo`,
|
|
472
|
+
`init`, the examples agreeing with each other, `check` listing every
|
|
473
|
+
problem (stdio and HTTP), the placeholders and the wording of
|
|
474
|
+
`check`'s messages, `keys` reading and checking all it needs before
|
|
475
|
+
it writes and needing no thumbprint, `--out` making its folder, the
|
|
476
|
+
warning set aside and no other, the version, and the package holding
|
|
477
|
+
every file the command loads.
|
|
478
|
+
- A workflow, started by hand, publishes the guard's listing on the MCP Registry with GitHub's identity token for the run (.github/workflows/mcp-registry.yml).
|
|
479
|
+
- **A new package, `provared-connect` 0.1.0 (`connect/`): the connection by one line.** A person copies one line from a book's page in the Provared application and runs `npx --logs-max=0 provared-connect <line>` on the agent's computer; the recorder beside the agent is connected, with no file saved or moved by the person. The command checks the line (its prefix, version and every field), saves the connection beside the recorder where only its owner can read it (mode 0600; on Windows the access list set with `icacls` to the user alone, before anything is written), and starts the uploader in the background with the file's name, never the line, so the secret is in no long-running command line and in no log the package writes (`--logs-max=0` keeps it out of npm's own debug log; the shell's history may still hold it, and the README says so). The same line again changes nothing; a line from a new key of the same book replaces the connection and restarts the uploader; a connection file that cannot be read as one is never taken for none; a refusal names no value from the line. The uploader and the hand-over that used to live in the application moved into the package, with their tests, and run as before with `--connection <file>`; the uploader reads the connection file with the command's checks. The line's format and the choices made (numbered 1059 to 1081) are in `connect/README.md`. 131 tests pass, with the recorder beside Claude Code from the same commit; the six findings of a first independent review by an AI reviewer are fixed, each held by a test.
|
|
480
|
+
- **The recorder beside Claude Code, as a plugin, installs library 0.8.0.** `integrations/claude-code/package.json` asks for `provared` `^0.8.0` (0.8.0 or later, before 0.9.0), where it asked for `>=0.6.0 <0.8.0`, and its lockfile installs 0.8.0, where it installed 0.6.0. The published `provared-claude-code` 0.1.0 is unchanged. Its README says so. The plugin's 18 tests pass.
|
|
481
|
+
- **The home page** says what is new in 0.8.0.
|
|
482
|
+
- **An example: an agent with a shell, kept from the tool server's
|
|
483
|
+
credential** (`mcp-executor/recipes/agent-with-a-shell/`, not in the npm
|
|
484
|
+
package). `run.sh` puts the agent, the guard (0.3.0 from npm) and a
|
|
485
|
+
stand-in tool server in three Docker containers on one computer, the
|
|
486
|
+
link to the guard encrypted by a small TLS proxy, and prints seven
|
|
487
|
+
checks; all passed with Docker Desktop on Windows. Not tried on separate
|
|
488
|
+
computers. The top README, the home page and the package README point
|
|
489
|
+
to it, where they said no tested recipe was written.
|
|
490
|
+
- **`provared-mcp-executor` 0.3.0 runs over HTTP, for several agents**
|
|
491
|
+
(on npm since 7 November 2026). `provared-mcp-executor http
|
|
492
|
+
--config executor-http.json` runs the executor as a Streamable HTTP MCP
|
|
493
|
+
server in front of one upstream HTTP MCP server. Each agent signs in with
|
|
494
|
+
a secret of its own (`Authorization: Bearer <secret>`; the settings hold
|
|
495
|
+
its SHA-256, which `provared-mcp-executor secret` prints) and has its own
|
|
496
|
+
slip, keys, book and copy; through the executor, one agent cannot write
|
|
497
|
+
to, read from or act under another's, though an agent that can read the
|
|
498
|
+
executor's files is not held by this. The agent's `Authorization` header
|
|
499
|
+
is removed and the upstream's bearer token, read from a file, is added;
|
|
500
|
+
the executor sends an agent the token in no header, body, error or log:
|
|
501
|
+
the upstream's headers come back by allow-list, its refusal of the token
|
|
502
|
+
and any redirection are not relayed, and the token's text is replaced
|
|
503
|
+
wherever it would appear in what an agent is sent. That holds for the
|
|
504
|
+
token as it is in the file, and only for what passes through the
|
|
505
|
+
executor: a token the upstream encodes or splits is not seen, and an
|
|
506
|
+
agent that can read the executor's files, or reach the upstream another
|
|
507
|
+
way, has it. One message per POST, read as strictly as a line
|
|
508
|
+
on stdio; the answer as JSON or as a stream of events forwarded as they
|
|
509
|
+
arrive, with the response under the executor's id as the outcome; legacy
|
|
510
|
+
sessions pass through, each bound to the agent that opened it; the agent
|
|
511
|
+
closing its stream cancels the call on the 2026-07-28 revision, which
|
|
512
|
+
is recorded as not known; `MCP-Protocol-Version`, `Mcp-Method`,
|
|
513
|
+
`Mcp-Name` and `Mcp-Param-*` headers must agree with the body, and a
|
|
514
|
+
mismatch is refused with -32020. An `Origin` is refused unless the settings
|
|
515
|
+
allow it, and the executor listens on 127.0.0.1 by default. The rules,
|
|
516
|
+
the check, the documents, the countersignature and the copy are the same
|
|
517
|
+
code as on stdio (`callCore` in `executor.mjs`), and the check still
|
|
518
|
+
happens before anything reaches the upstream; the stdio path behaves as it did, its handling of a call now in the
|
|
519
|
+
shared `callCore`, and its 70 tests pass as they were. `check`, `keys` and
|
|
520
|
+
`compare --agent <name>` read the HTTP settings too. New files
|
|
521
|
+
`mcp-executor/http.mjs`, `executor-http.example.json`,
|
|
522
|
+
`test/http.test.mjs`, `test/http-cli.test.mjs`, `test/fake-http-server.mjs`
|
|
523
|
+
and `test/http-world.mjs`; `DESIGN.md` sections 2, 10, 12 and choices
|
|
524
|
+
X101 to X112; the README's "Over HTTP, for several agents".
|
|
525
|
+
- **The HTTP executor after an independent review by an AI reviewer** (`mcp-executor/http.mjs`; part of 0.3.0). An agent that reads nothing of a stream no longer makes
|
|
526
|
+
the executor buffer the upstream without bound: the upstream is paused
|
|
527
|
+
until the agent drains, and an agent whose connection does not take what
|
|
528
|
+
is waiting within `timeout` is cut off (X113). Sessions are capped for each agent (1,000), so an
|
|
529
|
+
agent can evict only its own (X114). A stop on request (SIGINT,
|
|
530
|
+
SIGTERM, `close()`) settles a call in flight as the executor's stop
|
|
531
|
+
(`EXECUTOR_STOPPED`, the first sentence of `OUTCOME_UNKNOWN`), writes
|
|
532
|
+
its receipt and answers the agent before closing the connections, where
|
|
533
|
+
it blamed the agent before (X115). A 4xx with a JSON-RPC error under the
|
|
534
|
+
call's id is the call's outcome, relayed scrubbed with its status, where
|
|
535
|
+
it was "outcome not known" (X116). `Mcp-Param-*` is compared with the
|
|
536
|
+
call's argument at the `inputSchema` property the upstream's `tools/list`
|
|
537
|
+
annotates `x-mcp-header`, decoded from the Base64 form, and `Mcp-Method`
|
|
538
|
+
and `Mcp-Name` with the body's method and name; a mismatch or a header
|
|
539
|
+
the executor cannot check is refused with 400 and -32020, and absence is
|
|
540
|
+
never refused (X110 rewritten, X117). On a legacy session the agent's
|
|
541
|
+
`notifications/cancelled` is sent on under the upstream's id for the
|
|
542
|
+
call, and a disconnection alone is not a cancellation (X111 rewritten).
|
|
543
|
+
The four upstream headers that come back are scrubbed (X118); the
|
|
544
|
+
reading of a POST body has a time limit (408; X119); the test script
|
|
545
|
+
ends the run when the tests do. Each of the transport's defences in
|
|
546
|
+
depth now has a test that fails without it; the one that cannot be told
|
|
547
|
+
apart from Node's own behaviour (`up.complete`) is named as redundant.
|
|
548
|
+
New file `test/signal-wrapper.mjs`; the stdio path behaves as it did.
|
|
549
|
+
- **The HTTP executor after a re-check** (`mcp-executor/http.mjs`; part of 0.3.0). `Mcp-Name` is compared with `params.uri` on a
|
|
550
|
+
`resources/read`, where a correct header was refused before, and with
|
|
551
|
+
`params.name` on a `tools/call` or `prompts/get`, as the specification's
|
|
552
|
+
table says; on any other method it is refused with 400 and -32020, as a
|
|
553
|
+
message with no such field always was, where a `params.name` that agreed
|
|
554
|
+
used to pass (X110). An `Mcp-Param-*` header against a number in the body
|
|
555
|
+
is compared as a number, exactly and only in JSON's form of a number, so
|
|
556
|
+
`42.0` agrees with 42, which it did not, and `0x2A`, an empty value and
|
|
557
|
+
`Infinity` do not (X110). The log and receipt text "nothing read for N
|
|
558
|
+
ms" claimed more than the code does, and now says what happens: an agent
|
|
559
|
+
whose connection does not take what the executor has waiting within
|
|
560
|
+
`timeout` is cut, and a very slow reader can be cut too; the code is as it
|
|
561
|
+
was, and a new test shows the slow reader cut (README, X107, X113). X117
|
|
562
|
+
said the executor generates no mirrored header and that a request of only
|
|
563
|
+
a body goes on as it is, where the body's protocol version goes on as
|
|
564
|
+
`MCP-Protocol-Version`; it now says so, and that `Mcp-Method`, `Mcp-Name`
|
|
565
|
+
and `Mcp-Param-*` are never generated. The 503 to a new request during a
|
|
566
|
+
stop has a test that fails without it. The redundant `up.complete` check
|
|
567
|
+
is gone: a short body ends in the `error` and `aborted` handlers, never
|
|
568
|
+
at `end`. X113 says how narrowly `BACKLOG_LIMIT` can be reached. The
|
|
569
|
+
README and section 10 state a limit that was not stated: a JSON answer
|
|
570
|
+
nobody reads is held after its slot is freed, up to 16 MiB for each
|
|
571
|
+
connection, until the connection closes.
|
|
572
|
+
|
|
573
|
+
- **The recorder's README states more limits of records handed over,**
|
|
574
|
+
from a review of 3 November 2026: the 300-second rule rests on the clock
|
|
575
|
+
of the device the person signs on, and on the application's page, since
|
|
576
|
+
the signing page sets no limit on a start; a start refused as
|
|
577
|
+
`starts-later` is remembered in memory only, so "refused for good" is
|
|
578
|
+
corrected; a clock more than about six minutes ahead has a renewal from
|
|
579
|
+
the application refused if it is handed over soon after the press. The message for a
|
|
580
|
+
`held-cancellations.json` the recorder cannot take now says to take out
|
|
581
|
+
only the others where the file also holds one the person signed.
|
|
582
|
+
|
|
583
|
+
- **The recorder beside Claude Code takes records handed over from the
|
|
584
|
+
application** (`integrations/claude-code`, not published; the library
|
|
585
|
+
is unchanged). A renewal or a cancellation the person signed in the
|
|
586
|
+
application's signing window, and the application kept with the book,
|
|
587
|
+
sealed, is handed to the recorder by the application's uploader through
|
|
588
|
+
the feed, with no file carried by hand: `POST /hand-over`, proved as
|
|
589
|
+
every question of the feed is, and over every byte of the body as well,
|
|
590
|
+
under a label of its own. Before any byte of the body is read, the
|
|
591
|
+
recorder checks the length it states (`Content-Length`, at most 256 KiB;
|
|
592
|
+
411 without one) and the form of the proof's headers in a conversation
|
|
593
|
+
it began; at most four are taken on at once, counted from before the
|
|
594
|
+
body is read, and a body not whole within 10 seconds is let go. The
|
|
595
|
+
recorder checks each record itself and answers with a code
|
|
596
|
+
(`taken`, `already`, `held` or `refused`, with a reason). Each must
|
|
597
|
+
have been signed at https://sign.prova.red, or where
|
|
598
|
+
`PROVARED_CLAUDE_CODE_SIGNING_ORIGIN` says (`other-signing-address`). A
|
|
599
|
+
renewal is taken as `renew` takes one without `--new-passkey`, and is
|
|
600
|
+
never one the recorder held before, nor one that starts before the
|
|
601
|
+
permission in force, nor one that starts before any cancellation the
|
|
602
|
+
recorder holds, in a book or held beside it (`before-cancellation`), so
|
|
603
|
+
that a record held back and handed over late cannot start the agent
|
|
604
|
+
again. A renewal from a passkey the recorder does not trust is refused,
|
|
605
|
+
never added; the refused permission waits in `waiting-permissions.json`,
|
|
606
|
+
and `admit-passkey <thumbprint>` for a passkey never trusted shows it in
|
|
607
|
+
full and takes it, with its passkey, only once the person types `yes`
|
|
608
|
+
on that computer (with nothing waiting from that passkey, it admits
|
|
609
|
+
nothing). A cancellation is taken only for the permission in force:
|
|
610
|
+
every call under it is refused at once, and the cancellation and the
|
|
611
|
+
agent's acknowledgement are written into the book (the library's
|
|
612
|
+
`add`); handed over again, it changes nothing and gives back the same
|
|
613
|
+
acknowledgement. One dated ahead of the clock is held beside the book and
|
|
614
|
+
kept in `held-cancellations.json`, which is given to the writer at each
|
|
615
|
+
start, so a restart does not lose it; one more than 24 hours ahead is
|
|
616
|
+
refused (`too-far-ahead`). A renewal while one is held is taken only if
|
|
617
|
+
it starts after its date (`cancellation-held`, also for `renew`), and the
|
|
618
|
+
cancellation stays held. While the permission in force is cancelled, or
|
|
619
|
+
a cancellation is held, no new book is started; `status` says
|
|
620
|
+
`cancelled`. A cancellation of a permission a later one replaced is
|
|
621
|
+
refused (`not-in-force`: the agent acts under the later permission,
|
|
622
|
+
which this does not stop). A permission refused with a passkey not on
|
|
623
|
+
the list now carries a code (`passkey-not-trusted` and the others, on
|
|
624
|
+
the error). What changes for a user: `retire-passkey` on a passkey not
|
|
625
|
+
on the list says "not on the list of passkeys this recorder trusts", and
|
|
626
|
+
a record handed over must name the signing page's address. Tests:
|
|
627
|
+
`test/handover.test.mjs`.
|
|
628
|
+
|
|
629
|
+
- **Records handed over: the fixes of a second review** (the recorder
|
|
630
|
+
beside Claude Code, not published). A permission does not say when it
|
|
631
|
+
was signed, so: a renewal handed over that starts more than 300 seconds
|
|
632
|
+
(the allowance between clocks the format uses) ahead of the recorder's
|
|
633
|
+
clock is refused (`starts-later`, a new code, checked before its
|
|
634
|
+
passkey, so such a one never waits; handed over again it is still
|
|
635
|
+
refused while the recorder runs, within the limits its README states); and `before-cancellation` now refuses
|
|
636
|
+
a renewal that starts less than 300 seconds after any cancellation the
|
|
637
|
+
recorder holds, where it refused one that started before it. With the
|
|
638
|
+
application's own rule (a renewal it sends starts no more than 300
|
|
639
|
+
seconds after the press of Sign), and where the clocks agree, a renewal
|
|
640
|
+
signed before a cancellation is refused whatever start the application
|
|
641
|
+
allows, and one signed after it, starting 300 seconds after it, is
|
|
642
|
+
taken; no permission handed over starts sooner than five minutes after
|
|
643
|
+
the cancellation's date.
|
|
644
|
+
`admit-passkey <thumbprint>` for a passkey never trusted no longer takes
|
|
645
|
+
the permission through the plain `renew`: it asks the running recorder
|
|
646
|
+
(a new route, `POST /admit`) to run every check a record handed over
|
|
647
|
+
goes through, with that one passkey admitted for that one permission,
|
|
648
|
+
and it refuses while the recorder is stopped. Before, a renewal from the
|
|
649
|
+
person's new passkey that waited from before a cancellation was taken
|
|
650
|
+
after it, and the agent acted again. A waiting permission that fails a
|
|
651
|
+
check is dropped from the list and said; the rest are shown with the
|
|
652
|
+
thumbprint worked out from each permission, the one that starts latest
|
|
653
|
+
first, and that one is taken on `yes`. `waiting-permissions.json` keeps
|
|
654
|
+
at most one permission for each passkey, the one that starts latest,
|
|
655
|
+
so that whoever hands records over cannot choose which of the person's
|
|
656
|
+
is shown. A cancellation handed over is taken whatever address the
|
|
657
|
+
permission it cancels was signed at, where it was refused for the
|
|
658
|
+
signing-address setting: it only takes away, and it checks against the
|
|
659
|
+
permission's own passkey and address. A `held-cancellations.json` that
|
|
660
|
+
holds a cancellation the recorder cannot take stops the start with a
|
|
661
|
+
message that names the file and what to do. The time the feed waits for
|
|
662
|
+
the body of a record handed over can be shortened for tests
|
|
663
|
+
(`handOverReadMs`). What changes for a user: a renewal handed over must
|
|
664
|
+
now start between 300 seconds after the latest cancellation and 300
|
|
665
|
+
seconds after the recorder's clock; `admit-passkey` for a passkey never
|
|
666
|
+
trusted needs the recorder running. Tests: `test/handover.test.mjs`.
|
|
667
|
+
|
|
3
668
|
## 0.8.0 (1 November 2026)
|
|
4
669
|
|
|
5
670
|
Version 0.8.0 changes the library's browser part, `src/passkey-browser.js`, which a web page uses to have a person sign with a passkey. A new function, `signChallengeWithChosenPasskey`, lets a page whose browser has forgotten which passkey signed before ask the device to offer the passkeys it holds for the website; the page must then check what comes back against the key it expects. Every signing function now also says which passkey signed (`credentialId`). What changes for a user: every other signing function now refuses, before the device is asked, a passkey that does not name its identifier as text of at least one character, with a `PasskeyError` of code `cancelled` and the words "No passkey was named, so nothing was signed." A missing or non-text identifier already failed with that code, with other words; a passkey whose identifier was empty text was handed to the device, and now throws instead. The signing page uses all this to open as a small window for another page (the Provared application), sign a new permission, a renewal or a cancellation there, and hand the record back; the signing page is served at sign.prova.red and is not in the npm package. Nothing else in the library changes: no record's bytes, no rule of the checker, nothing in the Python version but its version number, so a book checks with 0.8.0 exactly as with 0.7.0. Beside the library, in this repository, with entries in the list below: `provared-mcp-executor` 0.2.0, with rules on the content of a tool call, already published on npm on 1 November 2026; and a reader of Agent Middleware's receipts, `provared-agent-middleware`, not published. The framework packages `provared-langchain` and `pydantic-ai-provared` stay at 0.2.0, unchanged.
|
package/README.md
CHANGED
|
@@ -2,15 +2,114 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://scorecard.dev/viewer/?uri=github.com/provared/provared)
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
A guard for an AI agent's tools: it holds the tools' credentials in
|
|
6
|
+
place of the agent, and stops any tool call that the person did not
|
|
7
|
+
allow in a permission they signed with a passkey.
|
|
8
|
+
|
|
9
|
+
The guard, [provared-mcp-executor](mcp-executor/README.md), stands
|
|
10
|
+
between the agent and a tool server that speaks the Model Context
|
|
11
|
+
Protocol (MCP), the common way for AI agents to reach tools. It holds
|
|
12
|
+
the tool server's credential in place of the agent, and refuses a call
|
|
13
|
+
the permission does not allow before the call reaches the tool. It can
|
|
14
|
+
also test what a call would change, for example which paths a file tool
|
|
15
|
+
may touch. It starts a tool server itself on the same computer, for one
|
|
16
|
+
agent (MCP's "stdio" transport), or, from version 0.3.0, stands in front
|
|
17
|
+
of one reached over the network (MCP over HTTP, the protocol of the web),
|
|
18
|
+
for several agents, each with its own secret, permission and record.
|
|
19
|
+
|
|
20
|
+
The record follows from it. For each call it lets through, the guard
|
|
21
|
+
writes a signed receipt and countersigns it with keys of its own; for a
|
|
22
|
+
call the permission does not allow, a signed note of the refusal (a
|
|
23
|
+
denial). Anyone can check these records later, on their own computer,
|
|
24
|
+
with the free checker.
|
|
25
|
+
|
|
26
|
+
**What it does not do yet.** One guard stands in front of one tool
|
|
27
|
+
server, and over the network the credential it holds is a bearer token
|
|
28
|
+
read from a file. Over HTTP it has been tried with the official MCP
|
|
29
|
+
software on protocol version 2025-11-25 only, with every program on one
|
|
30
|
+
computer; on the newer 2026-07-28 it has met only a test server of its
|
|
31
|
+
own. The agents' secrets travel in the clear unless something else
|
|
32
|
+
encrypts the connection to the guard, and so does the tool server's
|
|
33
|
+
credential if the tool server is reached by plain HTTP. Sealing the
|
|
34
|
+
record and keys held in a key service are designed but not built. And it
|
|
35
|
+
proves nothing about a tool the agent can reach without
|
|
36
|
+
it: the tool's credential must be taken away from the agent. It keeps
|
|
37
|
+
the credential, and its own keys, from the agent only where the agent
|
|
38
|
+
cannot read the guard's files: an agent with a shell or file tools that
|
|
39
|
+
runs as the same computer user can read them. So run the guard under a separate user account that the agent cannot
|
|
40
|
+
use, or give the agent no shell or file tools. Over HTTP the guard can also
|
|
41
|
+
run apart from the agent, where the agent cannot read the guard's files:
|
|
42
|
+
[an example](mcp-executor/recipes/agent-with-a-shell/README.md) puts them
|
|
43
|
+
in separate Docker containers on one computer, and its seven checks passed
|
|
44
|
+
with Docker Desktop on Windows; on separate computers it has not been
|
|
45
|
+
tried.
|
|
10
46
|
|
|
11
47
|
*Evidence, not a verdict.* A record shows what was signed and by which
|
|
12
48
|
keys. People decide what it means.
|
|
13
49
|
|
|
50
|
+
```
|
|
51
|
+
npm install -g provared-mcp-executor # Node.js 24.7 or later
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**Use version 0.4.2 or later.** Every earlier version, 0.1.0 to 0.4.1,
|
|
55
|
+
has two weaknesses: in front of some tool servers, an agent could have a
|
|
56
|
+
tool run that the guard never checked. Version 0.4.2, published on
|
|
57
|
+
15 November 2026, fixes both, and npm marks the earlier versions as
|
|
58
|
+
deprecated. [The security advisory](https://github.com/provared/provared/security/advisories/GHSA-q53c-6wvv-gfj8)
|
|
59
|
+
says which servers are affected and what to check.
|
|
60
|
+
|
|
61
|
+
[Its README](mcp-executor/README.md) sets it up in five steps: write its
|
|
62
|
+
settings, make its keys, sign the permission with a passkey at
|
|
63
|
+
https://sign.prova.red, check the settings, and name the guard in the
|
|
64
|
+
agent's MCP client where the tool server was named. For a client whose
|
|
65
|
+
settings are JSON:
|
|
66
|
+
|
|
67
|
+
```json
|
|
68
|
+
{
|
|
69
|
+
"mcpServers": {
|
|
70
|
+
"files": {
|
|
71
|
+
"command": "provared-mcp-executor",
|
|
72
|
+
"args": ["stdio", "--config", "/etc/provared-mcp/files/executor.json"]
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
To see it work first, with no passkey and no settings,
|
|
79
|
+
`provared-mcp-executor demo` (from version 0.4.0) runs the guard in front
|
|
80
|
+
of a made-up tool server in a new temporary folder, lets one call through,
|
|
81
|
+
refuses one and checks the book, under a permission signed by a
|
|
82
|
+
development stand-in, not a person, so its records prove nothing about
|
|
83
|
+
anyone; then
|
|
84
|
+
`provared-mcp-executor init` copies the example settings into the current
|
|
85
|
+
folder. The guard is listed in the
|
|
86
|
+
official MCP Registry as `io.github.provared/mcp-executor`. "Executor"
|
|
87
|
+
is the Internet-Draft's word for software, other than the agent, that
|
|
88
|
+
acts for it and refuses what the permission does not allow.
|
|
89
|
+
|
|
90
|
+
## Other ways to record an agent
|
|
91
|
+
|
|
92
|
+
The guard is one way to put an agent's actions behind a signed
|
|
93
|
+
permission. The others write the same kind of record, read by the same
|
|
94
|
+
checker:
|
|
95
|
+
|
|
96
|
+
- **The library**, in JavaScript or Python, for an agent you write
|
|
97
|
+
yourself: each action is checked against the permission first and
|
|
98
|
+
receipted after (see "A first record of your own", below).
|
|
99
|
+
- **[The recorder beside Claude Code](integrations/claude-code/README.md)**
|
|
100
|
+
(`provared-claude-code`, also a Claude Code plugin), which checks
|
|
101
|
+
Claude Code's tool calls and receipts each one taken. Eight tools that
|
|
102
|
+
only talk to the person or change what the model itself holds, such as
|
|
103
|
+
AskUserQuestion and TodoWrite, are not recorded.
|
|
104
|
+
- **Packages for two Python agent frameworks**, LangChain and Pydantic
|
|
105
|
+
AI, and [an example](examples/frameworks/) for the Vercel AI SDK.
|
|
106
|
+
- **[The gateway](gateway/README.md)**, for agents that act through web
|
|
107
|
+
interfaces: it stands in front of each system an agent uses, holds
|
|
108
|
+
that system's credential and receipts each call. In the repository,
|
|
109
|
+
not yet on npm.
|
|
110
|
+
|
|
111
|
+
## The checker, and the sample record
|
|
112
|
+
|
|
14
113
|
```
|
|
15
114
|
npm install provared # Node.js 24.7 or later, no dependencies
|
|
16
115
|
pip install provared # Python 3.11 or later, one dependency
|
|
@@ -146,10 +245,11 @@ each part protects against, is in
|
|
|
146
245
|
- **Two programs beside an agent, each on npm with its own README:**
|
|
147
246
|
[the recorder beside Claude Code](integrations/claude-code/README.md)
|
|
148
247
|
(`npm install -g provared-claude-code`, also installable as a Claude
|
|
149
|
-
Code plugin), which checks and receipts
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
248
|
+
Code plugin), which checks and receipts Claude Code's tool calls,
|
|
249
|
+
except eight that only talk to the person or change what the model
|
|
250
|
+
itself holds; and [the executor for MCP tool servers](mcp-executor/README.md)
|
|
251
|
+
(`npm install -g provared-mcp-executor`), which stands between agents and a tool server, holds the server's
|
|
252
|
+
credential, and countersigns
|
|
153
253
|
each receipt with keys of its own.
|
|
154
254
|
- **[The pages at prova.red](https://prova.red/)**: the checker's answer
|
|
155
255
|
for the sample record, a worked example for developers, and the same
|
|
@@ -171,12 +271,16 @@ each part protects against, is in
|
|
|
171
271
|
|
|
172
272
|
## Status
|
|
173
273
|
|
|
174
|
-
**
|
|
274
|
+
**The library at version 0.8.1 and the guard at 0.4.2, both drafts.**
|
|
275
|
+
Published as they are, by one author in their
|
|
175
276
|
own time, built with AI tools since 3 October 2026; fixes as time
|
|
176
|
-
allows. The code has been through more than 80 rounds of review by AI
|
|
177
|
-
each
|
|
178
|
-
of what to look at
|
|
179
|
-
|
|
277
|
+
allows. The code has been through more than 80 rounds of review by AI
|
|
278
|
+
reviewers, each a fresh session given the code, the documents and a
|
|
279
|
+
brief of what to look at. Until 7 November 2026 each reviewer likely
|
|
280
|
+
also had the author's private planning notes loaded, so could see the
|
|
281
|
+
author's reasoning; since then reviewers start without them. Every
|
|
282
|
+
fault was fixed, or stated as a limit, and kept as a test. No person
|
|
283
|
+
other than the author has reviewed it yet.
|
|
180
284
|
That is an invitation. The format may still change.
|
|
181
285
|
Every published version stays on npm and the Python Package Index, so a
|
|
182
286
|
record made with one version can always be checked by that version.
|
package/docs/guide.md
CHANGED
|
@@ -6,7 +6,7 @@ Everything about the format, the library, the checker, the stub writer beside an
|
|
|
6
6
|
|
|
7
7
|
## Status
|
|
8
8
|
|
|
9
|
-
**Version 0.8.
|
|
9
|
+
**Version 0.8.1, a draft.** Published as it is, by one author in their
|
|
10
10
|
own time; fixes as time allows. The format may still change, so do not
|
|
11
11
|
rely on a draft record staying checkable.
|
|
12
12
|
|
|
@@ -153,9 +153,9 @@ be loaded from anywhere. The tool prints the file's SHA-256 fingerprint,
|
|
|
153
153
|
so that a copy can be compared with it. (Tried on 8 October 2026 in the
|
|
154
154
|
three browser builds this repository is tested with, and on 13 October
|
|
155
155
|
2026 in Chrome 155, Edge 155 and Brave 155.) The file for
|
|
156
|
-
version 0.8.
|
|
156
|
+
version 0.8.1 is attached to the release on GitHub. Its SHA-256
|
|
157
157
|
fingerprint is
|
|
158
|
-
`
|
|
158
|
+
`486471a5b8f3108d08acaacb96d7c27ceeecf95b93bce8e47721b8872a9b1bbc`.
|
|
159
159
|
|
|
160
160
|
**Run the demonstration in a browser.**
|
|
161
161
|
|
package/docs/threat-model.md
CHANGED
|
@@ -270,10 +270,13 @@ disagree about. Totals are added as whole numbers of any size.
|
|
|
270
270
|
- **An agent that names its action falsely.** A stub says what the agent
|
|
271
271
|
says it did. An agent that deletes data and writes "read" is caught
|
|
272
272
|
only by the other side's records.
|
|
273
|
-
- **Periods rest on the times in stubs**, which are the agent's own word
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
273
|
+
- **Periods rest on the times in stubs**, which are the agent's own word.
|
|
274
|
+
An outside time-stamp you trust shows only that a stub existed by the
|
|
275
|
+
stamp's time: a stub dated later than that is reported
|
|
276
|
+
(`dated-after-stamp`), an earlier date is not. An agent can write a
|
|
277
|
+
false earlier time, back to the date of the stub before it in its
|
|
278
|
+
chain, to stay inside a period. A total over the whole life of the
|
|
279
|
+
slip does not have this weakness.
|
|
277
280
|
- **An approval shows that the passkey approved.** It does not show that
|
|
278
281
|
the person read what they approved, and against A9 it shows nothing.
|
|
279
282
|
An approval can be signed after the action: only an outside
|
|
@@ -311,8 +314,11 @@ disagree about. Totals are added as whole numbers of any size.
|
|
|
311
314
|
seconds from that clock either way; nothing is written that is dated
|
|
312
315
|
more than 300 seconds ahead of it. The clock is the device's own, or
|
|
313
316
|
the one the caller gives. A wrong clock gives wrong dates, and `record`
|
|
314
|
-
writes any earlier date the caller states:
|
|
315
|
-
|
|
317
|
+
writes any earlier date the caller states: a stub's date is the
|
|
318
|
+
agent's own word. An outside time-stamp that covers it shows only that
|
|
319
|
+
the stub existed by the stamp's time: a later date is reported
|
|
320
|
+
(`dated-after-stamp`), an earlier one is not. It catches forward
|
|
321
|
+
dating, not back dating.
|
|
316
322
|
- **What the stub writer is handed** (the request, an approval, what the
|
|
317
323
|
other side hands back) is copied when it is handed over, and the copy
|
|
318
324
|
is what is checked and written. `record` hands a stub to the other
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "provared",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Proof of what an AI agent was allowed to do, and what it then did. A passkey-signed permission with limits a machine can check, a signed receipt for each action, and a free checker. Evidence, not a verdict.",
|
|
5
5
|
"author": "Pavel Izmaylov",
|
|
6
6
|
"license": "Apache-2.0 AND CC-BY-4.0",
|
package/src/der.js
CHANGED
|
@@ -137,7 +137,13 @@ export function timeOf(bytes, element) {
|
|
|
137
137
|
}
|
|
138
138
|
if (!m) throw badStamp('a time is not written in the form DER allows.');
|
|
139
139
|
const [, y, mo, d, h, mi, s] = m.map(Number);
|
|
140
|
-
|
|
140
|
+
// The year is the year written, the years 0000 to 0099 too. Date.UTC
|
|
141
|
+
// reads a year from 0 to 99 as 1900 to 1999, so the date is set with
|
|
142
|
+
// setUTCFullYear, which takes every year as it is given.
|
|
143
|
+
const date = new Date(0);
|
|
144
|
+
date.setUTCFullYear(y, mo - 1, d);
|
|
145
|
+
date.setUTCHours(h, mi, s, 0);
|
|
146
|
+
const ms = date.getTime() + (m[7] ? Math.floor(Number('0.' + m[7]) * 1000) : 0);
|
|
141
147
|
const check = new Date(ms);
|
|
142
148
|
if (check.getUTCFullYear() !== y || check.getUTCMonth() !== mo - 1 || check.getUTCDate() !== d || h > 23 || mi > 59 || s > 59) {
|
|
143
149
|
throw badStamp('a time names a moment that does not exist.');
|