Skip to content

PRÆTORE v0.3.6

Latest

Choose a tag to compare

@github-actions github-actions released this 16 Nov 23:47
· 188 commits to main since this release
27ceddb

Added

  • praetore-mcp: a report of each wrap session. When a session ends
    (the client or the server closes, or SIGINT/SIGTERM on macOS and Linux)
    and it recorded at least one receipt, wrap writes
    DIR/reports/session-<start UTC>-<id>.json and .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 of verify)
    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 of verify,
    both heads and the SHA-256 of the JSON. If verify fails the first page
    says VERIFY FAILED and 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-report and report = false in
    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>.json and .pdf, next to the
    original, with regenerated_from in 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 with pdf-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 in DIR/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 pairs report wrote 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 in DIR/reports/ and its content is a report (a JSON with the
    report schema; a PDF that starts with %PDF and 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, wrap prints, after the report path, the
    command that starts the dashboard on the home with --port 8787
    (absolute and quoted) and the link http://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_at on the held rows of /api/state), noted as such.
    The Sessions view lists a file only when GET /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 Origin is not
    its own
    (http://127.0.0.1:PORT or http://localhost:PORT), with 403,
    on top of the Host check.

  • 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 with PRAETORE_MCP_RELEASE=1. The
    commit comes from git only when the repository found is this one;
    otherwise from PRAETORE_MCP_BUILD_COMMIT, or none. praetore-mcp --version prints 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
    exactly praetore-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 --version with 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, wrap writes the report before it ends
    by SIGINT or SIGTERM (macOS and Linux).
    Before, the signal ended wrap
    at once. Now, when the session report is on, wrap waits 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 sees wrap terminated by SIGINT or
    SIGTERM, as in 0.3.5. A second signal ends it at once without the report.
    With --no-report or report = false no handler is installed and the
    signal ends wrap at once, as in 0.3.5. A signal that was ignored when
    wrap started 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 decided expired once its expires_at has passed (or
    cannot be read, as for approve), and lists to decide only the calls it
    labels pending, from the same map. The drawing, the Live list, the
    approval history and the drawer show Vencida / Expired / Vencida, and
    praetore-mcp receipts shows expired. The session report uses the same
    rule, so a pending call whose expires_at cannot be read is Expired
    there too (before, it stayed Pending), and so do approve, reject and
    holding the same call again. praetore-mcp approvals prints
    expired: run the agent again so the call is held again for such a call
    in place of its approve and reject commands. The journal and the
    signed receipts are unchanged.

  • praetore-mcp: printed commands run when the binary is not on PATH.
    The approve and reject commands in the tool error of a held call, in
    approvals and in the dashboard, and the commands that init (its
    allow-all warning included), policy check, policy allow,
    policy coverage and 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-mcp prints
    the file it points to) and always pass --dir as an absolute path, also
    for the default home, both single-quoted for a POSIX shell (' written
    as '\''). The not-initialized notes of install still say
    praetore-mcp init. Before, they started with
    praetore-mcp, and a binary extracted to a folder off PATH answered
    "command not found". If the binary's path cannot be read the commands
    start with praetore-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, approve and 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 after Expires (UTC). After an
    approval, approve prints the time to retry before. approve on 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 (receipts shows
    approve by KEY, expired unused or approve 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.
    approve and reject append 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 RECEIPT for a session with one
    receipt (it said 1 RECEIPTS).

Internal

  • praetore-mcp: clippy keeps Expiry::at for 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.