Repository navigation
v0.4.0-alpha.2
Pre-release
Pre-release
·
28 commits
to main
since this release
Added
- Two policy file keys bound how hard one caller can lean on the kernel.
maxPendingApprovals(default64) is how many approval challenges one caller may have open at once: awaiting a decision and not expired.maxCallsPerMinute(default1200) is how many MCP tool calls one client may make in a minute, as a token bucket that holds that many and refills at that rate, one per authenticated client and one for the operator's token or a stdio session.melra_capabilitiespublishes both underpolicy, withpendingApprovals, the caller's own open count. See flood limits. melra tasksand the console's task list group pending approvals that ask for the same operation:melra taskssays how many and names each one under its approval count, and the console lists them together with the count on each row. Nothing is hidden./api/tasksreturns the groups asapprovalGroups, of challenges not yet expired.- A GovBench case,
approval.flood, holds that a caller atmaxPendingApprovalsis issued no further challenge. melra doctorends with aprotectionline saying what guards an effect on this machine: who may approve a change (in developer mode the agent, with the phrase its own plan response carries, so an approval is a record, not a boundary; in enforced mode only an operator, out of band), the sandbox commands run in or that they have MELRA's own rights, and, where doctor can read Claude Code's settings, which of its own shell, file and web tools they leave it, and which OpenClaw or Hermes configs leave theirs. It warns under unsafe-local, and in enforced mode where commands run without a sandbox or Claude Code, OpenClaw or Hermes keeps tools of its own.melra_capabilitiesreports the same inpolicy.approvals(in_band,out_of_band, ornoneunder unsafe-local) andpolicy.sandbox(the sandbox,none, oroff).- A record chain (migration 9): every receipt, every version of a certificate, and every workflow event, approval decision and denial, refused answer, grant draw and idempotency commit is sealed, in the transaction that writes it, by a link that is an HMAC-SHA256 of the link before, the record's digest and whether a later start sealed it instead, under a key derived from the payload key.
melra audit verifychecks every link and sealed record from the database opened read-only, and exits 1 naming the first break, rows not sealed yet included; it also counts the links a start sealed (swept) and names the first of them that follows a link sealed when written (late).melra audit headprints the last link to keep outside MELRA's reach, andmelra audit verify --head <sequence>:<link>checks that the chain still passes through it. What an older MELRA sharing the home writes is sealed at the next start of this version. Task rows and workflow runs, which change as a task or run moves, are not chained. See verify the records. - Kernel checks: for an operation whose end state the request itself fixes, MELRA derives checks of its own at planning and makes them after the effect, whatever the caller declared. A file
writemust leave exactly the bytes it sent (file_hash, in either encoding), amkdira directory (directory_exists), adeletenothing at its path (file_absent), amovenothing at its source and an entry at its destination (file_absent,file_present), and a memorydeleteno record with that id in its scope (memory_absent). Terminal, browser, HTTP and desktop effects, a memoryputand a memoryclearget none, and a move's content is not checked. The plan response and the task list them askernelChecks, with a written file's hash masked on the stored row; receipts and certificates record what they found askernelEvidence, apart from the caller'sevidence, and the certificate's digest covers it.directory_exists,file_presentandmemory_absentare the kernel's alone: a request cannot declare them. The console shows these checks apart from the agent's evidence. See kernel checks. melra setup --client openclaw --exclusiveand--client hermes --exclusivetake the agent's own tools away through the switch each one documents, in the config file the melra entry goes in: OpenClaw'stools.denygets its runtime group (exec, process, code_execution),write,edit,apply_patch, its web, ui, nodes, automation (automations, gateway, plugins, openclaw) and messaging groups,sessions_create,sessions_spawn,sessions_send,conversations_send,conversations_turnandgithub_publish; Hermes'sagent.disabled_toolsetsgets the terminal, code_execution, file, browser, computer_use, web, x_search, cronjob, delegation, connections and catalog toolsets. Both lists are pinned to each agent's documentation and source, linked inapps/cli/src/harness.ts. With--writethe names are added as a union to what the list already holds, the rest of the file is kept as for the melra entry, and the old file is saved as.bak;--dry-runprints it, and the melra entry getsMELRA_HARNESS_TOOLS=1, as for Claude Code.--managedstays Claude Code's only. See OpenClaw's and Hermes Agent's tools.melra doctoradds aharnessline for OpenClaw and for Hermes wherever melra is configured for them, and its JSON anativeToolsentry: whether the agent's ownexecorterminalis still enabled, each name on the list as removed or present, and the file's SHA-256, matching OpenClaw's names as OpenClaw does: ignoring case,bashread asexec, and a*pattern against tool names only, never group names. It warns while one is present and never fails.- CI's
framework-examplesjob runs the official MCP SDK snippets inexamples/frameworksagainst the built CLI over stdio, with no model, and fails unless each gets MELRA's capabilities back: the TypeScript SDK at the exact version that folder's ownpackage.jsonand lockfile pin, the Python SDK from a hashedrequirements.txt. The LangChain, OpenAI Agents SDK and Vercel AI SDK snippets take--no-modelto do only the same MCP part, and stay documented only. The README's integration table says how far each client has been tested. - What
melra launchkeeps, in INSTALLATION andmelra help: your login and managed settings, and none of your user, project or local settings files, so no hook, permission rule or other key in one can hand a tool back;setup --exclusiveis the way to keep them.
Changed
- Breaking:
melra_plan, the harness tools,melra runand a workflow advance refuse a request needing approval while its caller already hasmaxPendingApprovalschallenges open (too_many_pending_approvals, naming the cap and how to make room), before any task is written. An approval, deny, cancel or expiry makes room. A workflow step refused this way, a compensation or a challenge due to be asked again after expiry included, waits for a later advance. - Breaking: an MCP tool call past
maxCallsPerMinutefails withrate_limited, saying in how many milliseconds to retry, over stdio, loopback HTTP and the Unix socket alike. Every call counts, one naming an unknown tool or failing its input schema too. The operator's CLI commands, which read and write the store directly, are not counted. - Breaking: a memory search stops reading candidates once their keys, values and tags pass 4,000,000 characters together, newest first, as well as at 5,000 records, so a scope of large records no longer fills the heap on every query.
candidateCountsays how many it ranked. A record past the budget is not ranked, so in a scope of large records a search can miss an older match it used to return. An index on scope and update time lets SQLite read them newest first, where it sorted the whole scope before returning one; a home gains it when MELRA next opens it. - Breaking:
examples/deploy/systemd/melra.servicenow caps MELRA and the commands it runs atTasksMax=512andMemoryMax=2Gtogether; raise them in the unit if your tasks need more. - The single executable carries V8's compiled code for the CLI, so it starts in about half the time (
melra versionin about 120 ms rather than 220 ms on an Apple Silicon Mac). Two builds of one commit now differ in bytes. - Breaking: developer mode now runs every terminal command in the per-command OS sandbox wherever one works (Seatbelt on macOS, bubblewrap on Linux, or the
uidaccount where the policy file namessandbox.user): a policy file withoutsandbox.usemeansif-availablethere, notoff. Under Seatbelt and bubblewrap an approved command can then no longer write outside the workspace and temp, read MELRA's files or the login files MELRA lists (see INSTALLATION), or reach the network without thenetworktrait (under bubblewrap, Unix sockets on the filesystem stay reachable); underuidit can no longer read MELRA's files or those logins. Under Seatbelt that also stops a test suite or dev server that opens a loopback port (npm testandnpm runcarry no trait), and in either sandboxgit addandgit commitin a worktree whose git directory is outside the workspace. Git may make symbolic links there, as ifsandbox.symlinksnamed it: without them a clone exits 0 with each link checked out as a plain file andcore.symlinks=falsewritten into the repository. Where none works, developer mode starts without one as before, and its receipts now say"sandbox": "none"."sandbox": {"use": "off"}in the policy file restores the old behaviour. Enforced mode is unchanged. See per-command sandbox. - Breaking: in the Seatbelt and bubblewrap sandboxes, in either mode, npm takes its cache from the
npm_config_cacheMELRA sets (see Fixed), which outranks a project.npmrcsettingcache: an offline install from a cache seeded there now fails withENOTCACHED.--cache <dir>on the command line still wins. - Breaking: a file write, mkdir, delete or move, or a memory delete, whose end state is not the one requested now ends
partialeven when every declared predicate held, where it used to endverified_success: a write whose file holds other bytes by the time MELRA looks, say, or an adapter that reports a change it did not make. A write to a file MELRA cannot read back, such as one kept write-only, endspartialtoo, since a check it cannot make does not pass, and so, on a disk that ignores case, does a move that only changes the case of a non-ASCII letter in the name of a file with another hard link, since MELRA cannot tell that the old spelling now reaches only the renamed entry. Recovery that observes an interrupted change again leaves such a taskrecovery_requiredinstead of settling it as verified, and a reconciliation whose predicates hold while a kernel check fails leaves it there too (reconciliation_kernel_check_failed). Kernel checks do not count as the evidence a mutation must declare, so what planning refuses is unchanged. - Breaking:
directory_existsandfile_presentare now built-in verifier types (two of the kernel's own checks), socreateMelraRuntimerefuses anevidenceVerifiersentry of either type (verifier_type_taken:<type>) and the runtime does not start. Rename such a verifier, and thecustompredicates that name it.
Fixed
- In the Seatbelt and bubblewrap sandboxes
npm pack, and npm installs from a tarball or a registry, failed withEPERMon npm's cache under home, and pnpm put its store in the workspace. Each command now getsnpm_config_cacheandPNPM_HOMEin a private folder MELRA makes in temp at its first command and removes when its process exits, a hangup included, though not after aSIGKILL. file_absenton the source of a move that changed only the case of ASCII letters in the name of a file with another hard link, on a disk that ignores case, now passes once its directory no longer lists the old spelling; it failed, and the move endedpartial.
Security
- The
qsfloor in the rootpnpm.overridesrises to 6.16.1, for a moderate denial-of-service advisory reaching MELRA through the MCP SDK's express. - An agent can no longer fill the operator's approval queue with near-identical challenges, which pushes a person towards approving without reading, and tool calls are rate limited per client, as the MCP specification asks.
examples/deploy/systemd/melra.servicecaps the processes and memory MELRA and every command it runs use together (TasksMax=512,MemoryMax=2G), as the container pair already did, and its smoke runs under them.- In developer mode, where the agent can approve its own changes, what an approved command reaches is now bounded by the per-command sandbox wherever one works, instead of every right MELRA's OS user has.
- The package-manager caches under home stay closed to commands: installs outside the sandbox trust them, so a command that could write there could change what later runs outside it.
- Records an effect leaves are tamper-evident: changing or removing a sealed one, even with the database triggers dropped, or adding a link without the home's key, fails
melra audit verify, unless the record's link and every later one are removed too. Anyone who can writemelra.sqlitecan do that without the key, and the next start of MELRA seals what is left again, as it then is, soverifypasses; it counts those links asswept, and names the first that follows a link sealed when written aslate, which an older MELRA writing beside this one leaves as well. A row inserted without the key, or stored in place of MELRA's by a trigger added to the file, is sealed the same way at the next start: a write seals only a record holding exactly what it wrote. Removing the newest records with their links, or rebuilding the chain withpayload.key, leaves no mark. A head kept, after the record in question was sealed, where MELRA's user cannot write shows each of these.