Skip to content

v0.4.0-alpha.2

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 28 Oct 15:44
· 28 commits to main since this release
cab3b74

Added

  • Two policy file keys bound how hard one caller can lean on the kernel. maxPendingApprovals (default 64) is how many approval challenges one caller may have open at once: awaiting a decision and not expired. maxCallsPerMinute (default 1200) 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_capabilities publishes both under policy, with pendingApprovals, the caller's own open count. See flood limits.
  • melra tasks and the console's task list group pending approvals that ask for the same operation: melra tasks says 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/tasks returns the groups as approvalGroups, of challenges not yet expired.
  • A GovBench case, approval.flood, holds that a caller at maxPendingApprovals is issued no further challenge.
  • melra doctor ends with a protection line 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_capabilities reports the same in policy.approvals (in_band, out_of_band, or none under unsafe-local) and policy.sandbox (the sandbox, none, or off).
  • 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 verify checks 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 head prints the last link to keep outside MELRA's reach, and melra 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 write must leave exactly the bytes it sent (file_hash, in either encoding), a mkdir a directory (directory_exists), a delete nothing at its path (file_absent), a move nothing at its source and an entry at its destination (file_absent, file_present), and a memory delete no record with that id in its scope (memory_absent). Terminal, browser, HTTP and desktop effects, a memory put and a memory clear get none, and a move's content is not checked. The plan response and the task list them as kernelChecks, with a written file's hash masked on the stored row; receipts and certificates record what they found as kernelEvidence, apart from the caller's evidence, and the certificate's digest covers it. directory_exists, file_present and memory_absent are 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 --exclusive and --client hermes --exclusive take the agent's own tools away through the switch each one documents, in the config file the melra entry goes in: OpenClaw's tools.deny gets 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_turn and github_publish; Hermes's agent.disabled_toolsets gets 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 in apps/cli/src/harness.ts. With --write the 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-run prints it, and the melra entry gets MELRA_HARNESS_TOOLS=1, as for Claude Code. --managed stays Claude Code's only. See OpenClaw's and Hermes Agent's tools.
  • melra doctor adds a harness line for OpenClaw and for Hermes wherever melra is configured for them, and its JSON a nativeTools entry: whether the agent's own exec or terminal is 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, bash read as exec, and a * pattern against tool names only, never group names. It warns while one is present and never fails.
  • CI's framework-examples job runs the official MCP SDK snippets in examples/frameworks against 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 own package.json and lockfile pin, the Python SDK from a hashed requirements.txt. The LangChain, OpenAI Agents SDK and Vercel AI SDK snippets take --no-model to 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 launch keeps, in INSTALLATION and melra 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 --exclusive is the way to keep them.

Changed

  • Breaking: melra_plan, the harness tools, melra run and a workflow advance refuse a request needing approval while its caller already has maxPendingApprovals challenges 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 maxCallsPerMinute fails with rate_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. candidateCount says 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.service now caps MELRA and the commands it runs at TasksMax=512 and MemoryMax=2G together; 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 version in 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 uid account where the policy file names sandbox.user): a policy file without sandbox.use means if-available there, not off. 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 the network trait (under bubblewrap, Unix sockets on the filesystem stay reachable); under uid it 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 test and npm run carry no trait), and in either sandbox git add and git commit in a worktree whose git directory is outside the workspace. Git may make symbolic links there, as if sandbox.symlinks named it: without them a clone exits 0 with each link checked out as a plain file and core.symlinks=false written 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_cache MELRA sets (see Fixed), which outranks a project .npmrc setting cache: an offline install from a cache seeded there now fails with ENOTCACHED. --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 partial even when every declared predicate held, where it used to end verified_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, ends partial too, 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 task recovery_required instead 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_exists and file_present are now built-in verifier types (two of the kernel's own checks), so createMelraRuntime refuses an evidenceVerifiers entry of either type (verifier_type_taken:<type>) and the runtime does not start. Rename such a verifier, and the custom predicates that name it.

Fixed

  • In the Seatbelt and bubblewrap sandboxes npm pack, and npm installs from a tarball or a registry, failed with EPERM on npm's cache under home, and pnpm put its store in the workspace. Each command now gets npm_config_cache and PNPM_HOME in a private folder MELRA makes in temp at its first command and removes when its process exits, a hangup included, though not after a SIGKILL.
  • file_absent on 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 ended partial.

Security

  • The qs floor in the root pnpm.overrides rises 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.service caps 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 write melra.sqlite can do that without the key, and the next start of MELRA seals what is left again, as it then is, so verify passes; it counts those links as swept, and names the first that follows a link sealed when written as late, 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 with payload.key, leaves no mark. A head kept, after the record in question was sealed, where MELRA's user cannot write shows each of these.