Repository navigation
Added
- praetore-mcp: a report of each
wrapsession. When a session ends
(the client or the server closes, or SIGINT/SIGTERM on macOS and Linux)
and it recorded at least one receipt,wrapwrites
DIR/reports/session-<start UTC>-<id>.jsonand.pdf. The JSON has a
header (praetore-mcp version, agent, server, mode, seq range, the heads
of the receipts and approval journals at close, the result ofverify)
and the session's receipts, each one the journal line copied byte for
byte. The PDF shows the same session for a person: PRÆTOR TECHNOLOGIES
wordmark, local time with UTC next to it, summary (ALLOW, DENY, held,
approved, expired), the calls (time, tool, decision, rule, short reason),
the approvals with the approver key id and time, the result ofverify,
both heads and the SHA-256 of the JSON. Ifverifyfails the first page
saysVERIFY FAILEDand both files are still written. The report is a
view: it signs nothing and does not change the journal; if it cannot be
written the reason goes to stderr and the exit code and every decision
stay the same.wrap --no-reportandreport = falsein
DIR/config.toml(new, optional file) turn it off.
praetore-mcp report [--dir DIR] [--session ID | --last]writes a new
report of a session from the journal as it is now (exit code 1 if it
says verify failed): a new pair,
session-<start UTC>-<id>.regen-<now UTC>.jsonand.pdf, next to the
original, withregenerated_fromin its header. The report written at
close is never replaced. The session's approval records are copied from
the approval journal byte for byte; if it cannot be read, the header and
the PDF say so. The PDF is written in Rust withpdf-writer(MIT OR
Apache-2.0; adds no other crate to the lockfile), with no network access
and no external process. - praetore-mcp: session reports in the dashboard. A new Sessions view
(Spanish, English, Portuguese) lists the reports inDIR/reports/, newest
first: session id, agent, server, mode, open and close time (local and
UTC), the decisions and, apart, the approval statuses, the result of
verify, and buttons to download the PDF and the JSON (with the JSON's
SHA-256). The pairsreportwrote later are grouped under the report they
came from.GET /reports/<file>serves a file only when its name is
exactly a report file name, it opens without following a symlink as a
regular file with a single link, owned by the dashboard's user, its real
path is inDIR/reports/and its content is a report (a JSON with the
report schema; a PDF that starts with%PDFand whose JSON passes the
same checks); anything else gets 404, a file over 64 MiB 413 (not read),
any method but GET 405. While the
page is open, a new session shows up on the next refresh with a "Report
ready" notice. At close,wrapprints, after the report path, the
command that starts the dashboard on the home with--port 8787
(absolute and quoted) and the linkhttp://127.0.0.1:8787/#/sessions/<id>,
saying that on another port the page is#/sessions/<id>there. In the
approval history and in the Live list, an approved or rejected call
shows the time of the person's decision from the approval journal
(approval_decided_aton the held rows of/api/state), noted as such.
The Sessions view lists a file only whenGET /reports/serves it. The Live caption says how many rows
it shows and since when. The dashboard still
writes nothing: it does not write, regenerate or sign a report. The view
signs nothing, does not prove that a person reviewed a session, and is
tamper-evident only against an external copy of the heads.
Changed
-
praetore-mcp: the dashboard refuses a request whose
Originis not
its own (http://127.0.0.1:PORTorhttp://localhost:PORT), with 403,
on top of theHostcheck. -
praetore-mcp: the report header names the build.
praetore_mcp_version
(JSON) and the PDF header are the version for a release build and
<version>-dev+<short commit>(or<version>-dev) for any other build.
A release build is only one whose commit carries the exact tag
v<crate version>, or one built withPRAETORE_MCP_RELEASE=1. The
commit comes from git only when the repository found is this one;
otherwise fromPRAETORE_MCP_BUILD_COMMIT, or none.praetore-mcp --versionprints the same build version. CI fails a tag that is not
v<crate version>, a tag build that does not print exactly
praetore-mcp <crate version>, any other build that does not print
exactlypraetore-mcp <crate version>-dev+<commit>, and a binary that
cannot run on the runner (Rosetta 2 is installed for x86_64 on Apple
silicon). The end-to-end smoke test compares--versionwith the crate
version (cargo metadata, or--expect-version), prereleases included. -
praetore-mcp: the decision tiles of the report PDF are two fixed rows.
The first counts decisions, one per call, from the receipts (ALLOW, DENY,
HELD, FORWARDED, WOULD ASK); the second, labeled apart, counts the
approval status of the held calls (APPROVED, REJECTED, PENDING,
EXPIRED). Every tile is shown, 0 included, so HELD and PENDING no longer
read as two events of the same call. -
praetore-mcp: with reports on,
wrapwrites the report before it ends
by SIGINT or SIGTERM (macOS and Linux). Before, the signal endedwrap
at once. Now, when the session report is on,wrapwaits up to 300 ms
for the server to end, forwards the signal to it, waits up to 2 s more,
kills it if it is still running, writes the report, and then ends by that
same signal, so the parent still seeswrapterminated by SIGINT or
SIGTERM, as in 0.3.5. A second signal ends it at once without the report.
With--no-reportorreport = falseno handler is installed and the
signal endswrapat once, as in 0.3.5. A signal that was ignored when
wrapstarted stays ignored.
Fixed
-
praetore-mcp: an approval that expired undecided reads Expired.
Before, the dashboard's Live view showed such a call as waiting for a
decision while "To decide" listed nothing. The server now labels a held
call nobody decidedexpiredonce itsexpires_athas passed (or
cannot be read, as forapprove), and lists to decide only the calls it
labelspending, from the same map. The drawing, the Live list, the
approval history and the drawer show Vencida / Expired / Vencida, and
praetore-mcp receiptsshowsexpired. The session report uses the same
rule, so a pending call whoseexpires_atcannot be read is Expired
there too (before, it stayed Pending), and so doapprove,rejectand
holding the same call again.praetore-mcp approvalsprints
expired: run the agent again so the call is held againfor such a call
in place of itsapproveandrejectcommands. The journal and the
signed receipts are unchanged. -
praetore-mcp: printed commands run when the binary is not on
PATH.
Theapproveandrejectcommands in the tool error of a held call, in
approvalsand in the dashboard, and the commands thatinit(its
allow-all warning included),policy check,policy allow,
policy coverageand the not-initialized errors print, start with the
absolute path of the running binary (std::env::current_exe,
canonicalized, so a symlink such as~/.local/bin/praetore-mcpprints
the file it points to) and always pass--diras an absolute path, also
for the default home, both single-quoted for a POSIX shell ('written
as'\''). The not-initialized notes ofinstallstill say
praetore-mcp init. Before, they started with
praetore-mcp, and a binary extracted to a folder offPATHanswered
"command not found". If the binary's path cannot be read the commands
start withpraetore-mcp, as before. The dashboard shows and copies the
strings the server sends, unchanged. On Windows nothing changes. -
praetore-mcp: approval expiry is shown in local time, with what is
left.approvals,approveand the dashboard show the expiry in local
time with UTC beside it and the time left (in 9 min 40 s); the tool
error of a held call adds that line afterExpires (UTC). After an
approval,approveprints the time to retry before.approveon an
expired call says so before it asks for the confirmation code
(this approval expired at HH:MM (local time) / HH:MM UTC; run the agent again so the call is held again) and signs nothing; its exit code stays
2. The dashboard marks an approval that expired before any retry ran as
expired, apart from one that was approved and executed (receiptsshows
approve by KEY, expired unusedorapprove by KEY, executed once).
Approval is unchanged: bound to the exact call, single use, the same
TTL, decided only in a terminal; the dashboard stays read-only. -
praetore-mcp: a decided approval id is not handed out again after a
crash.approveandrejectappend the decision to the approval
journal and then remove the pending file. If the process stopped between
the two, holding the same call again reused the decided id, so a
rejected call stayed held under it until it expired. A pending file
whose id already has a decision is now removed and the call is held with
a new id. A rejected id still never runs, and an approved id runs at
most once. -
praetore-mcp: the report PDF says
1 RECEIPTfor a session with one
receipt (it said1 RECEIPTS).
Internal
- praetore-mcp: clippy keeps
Expiry::atfor display only, a test refuses
an allow of that lint anywhere in the crate, and new tests cover a
signal while the report is written and the fixes above.