Skip to content

v0.3.0-alpha.21

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 24 Oct 23:16
· 60 commits to main since this release
be68816

Changed

  • Breaking: In enforced mode a git call whose first argument is the subcommand branch, diff, log, rev-parse, show, status or tag uses only a repository inside the workspace, approved or not, one that creates a branch or tag included. git no longer looks for one above the workspace, so a workspace that is only a directory inside a larger repository reads as not a git repository, even for a read an operator approved: point MELRA_WORKSPACE at the repository's top level. The call is refused with terminal_git_repository_outside_workspace where a .git between where it runs and the workspace root leads out, as a link or as a gitfile (a linked worktree's, or a submodule's kept in an enclosing repository), or where a directory above the workspace has the path delimiter (:, ; on Windows) in its name, and with terminal_git_environment_not_allowed:<name> where its environment says where the repository is or hands git config. A bare repository is not found either, even inside the workspace: git finds one only through a .git (with git 2.38 or later). Developer mode, and other git commands (commit, checkout, ...), are unchanged.
  • Breaking: A memory list, search or clear is matched against capability grants as <scope>:<action>:*, whatever key or id it names, so only a grant covering the whole scope covers it, and a put with supersedesId needs its grant to cover <scope>:put:<supersedesId> as well. A grant scoped to keys used to cover both.
  • Breaking: forbiddenEffects: ["mutate"] also refuses a destructive effect (a file delete, a memory delete or clear) in every mode, unsafe-local included, counting it as a mutation the way "mutations": "deny" already does. Forbidding destructive alone is unchanged. A terminal command or HTTP request that deletes is a mutation, as before, so only forbidding mutate excludes it; the forbiddenEffects description, CAPABILITIES.md and INSTALLATION.md now say which operations each label covers.
  • Breaking: POST /oauth/register refuses a request that carries an Origin header (403 origin_not_allowed) and one whose Content-Type is not application/json (415 json_required). An MCP client registering from its own process sends Content-Type: application/json and no Origin, so it is unaffected.
  • Breaking: Over loopback HTTP, a client signed in with OAuth acts only on the tasks and workflow runs it planned: an id another client planned is refused with task_belongs_to_another_client or workflow_belongs_to_another_client, and /api/* and the console page answer the operator's token only (403 operator_token_required). The operator's token, stdio and the CLI are refused nothing, and a task or run planned before this release, like the steps such a run plans later, names no client and stays open to any caller.
  • Breaking: melra_execute no longer runs a workflow step's task while its run is paused or suspended, in any mode (workflow_halted:<status>): resume the run first. In enforced mode melra_workflow_control no longer resumes a run an operator halted with melra workflow pause or suspend (workflow_resume_needs_operator), whichever mode that command ran in; a halt only the agent made is still its own to lift, and developer mode is otherwise unchanged. melra workflow pause, suspend and resume now record MELRA_APPROVER as who acted, and fail on a value it does not accept.
  • Breaking: In enforced mode an HTTP GET or HEAD, or a browser navigate or tab_new, to a public host that allowedDomains admits only through "*", the default, plans as confirm with reason network_read_unlisted_host and runs once an operator approves it. A host an entry names, itself or as a parent domain, needs no approval. Developer mode is unchanged.
  • Breaking: In enforced mode a read whose http_resource_matches evidence or reconciliation is read from a host only "*" admits, or takes its host from the result, also plans as confirm with reason network_read_unlisted_host. A workflow condition, until or delegation check like that is refused with workflow_check_unlisted_host, at planning and again when an enforced process advances a run to it, so a run planned in developer mode does not send it either.
  • Breaking: An HTTP GET or HEAD that carries content is a mutation in every mode, so it is never retried and forbiddenEffects: ["mutate"] excludes it, and outside unsafe-local mode it needs evidence and an approval like any other; without content it is a read, as before.
  • Breaking: HTTP and browser destinations refuse an IPv6 address outside global unicast (2000::/3) and the special-purpose and transition blocks inside it, such as documentation, benchmarking, 6to4 and Teredo addresses. The IPv4-mapped and NAT64 forms are judged by the IPv4 address they carry, as before.
  • Breaking: A start without MELRA_PAYLOAD_KEY whose MELRA_HOME holds sealed task or workflow payloads but no payload.key is refused with payload_key_missing, and a start whose key, from either source, cannot open the sealed payload it samples is refused with payload_key_mismatch. Both name the fix: set the variable to the key they were sealed under, or restore the file. The first used to create a new key and carry on, the second to start and fail on each payload it read. A home with nothing sealed yet still gets its key created on first start (#417).

Fixed

  • Planning a task writes its record and its sealed request in one transaction (#416). A failed second write, such as on a full disk, used to leave a task that could never run, and a workflow step that took it up on every advance and failed with task_payload_not_found; now neither is written, and the next advance plans the step again.
  • A write that fails inside a transaction, as on a full disk, reports its own error, such as database or disk is full, rather than cannot rollback - no transaction is active.
  • INSTALLATION.md now says to run melra approve, console or judge with the server's MELRA_PAYLOAD_KEY when it sets one, and melra help says so for console (#417).

Security

  • In enforced mode a git read no longer reaches a repository outside the workspace, such as one enclosing it or one its .git or its environment points to: it is refused or finds no repository, so a read that needs no approval stays inside the workspace, as enforced mode promises.
  • A memory capability grant scoped to some keys no longer covers an action on the whole scope, or a write that hides a record the grant does not cover, so a grant's target, and what an approver is shown, names what the effect touches.
  • forbiddenEffects: ["mutate"] now keeps a task from deleting through file and memory operations too, including in unsafe-local mode, where the caller's own limits are the ones left.
  • melra serve --http --open no longer puts the standing HTTP token on the browser opener's command line, where other users of the machine can read it. The opener gets a link that opens the console once, within a minute of startup; the server exposes it as openUrl. Brought again, the link says it was already used (open_code_used), so an operator whose link was used first by someone else is told so; past the minute, or with a wrong code, it is refused (open_code_invalid). The Console URL printed on the operator's terminal still carries the token.
  • A web page open in the operator's browser can no longer register OAuth clients on a loopback HTTP server, so it cannot fill the client list or push out a client still waiting for approval.
  • A task or workflow run id is bound to the caller that planned it, so one approved OAuth client can no longer run, cancel, judge, advance, halt or read another client's tasks and runs, nor list them through the read API.
  • In enforced mode an operator's workflow pause or suspend now holds until an operator lifts it, including one made from a developer-mode shell or on a run the agent had already halted, and halt and resume events record who acted.
  • In enforced mode an HTTP read or browser navigation addressed to a host only "*" admits, or a read whose evidence is checked at one, waits for an operator's approval, and a workflow check that would read from one is refused. In every mode an HTTP read that sends content counts as the mutation it is, and outside unsafe-local mode is approved as one.
  • The network destination check counts an IPv6 address as public only inside global unicast, or as the IPv4-mapped or NAT64 form of a public IPv4 address, so special-purpose and legacy transition addresses, including those that embed an IPv4 address it would refuse, are refused as well.
  • Secret redaction in memory, terminal output and stored records, a task's goal and arguments included, now takes the whole value of a password, secret, token or API-key name bound with =>, := or ::=, compared with ==, given a quoted value with spaces (within 256 characters), or written as a YAML block scalar of one or more lines, blank lines between its lines included (for a token or API-key name, when the token is all of the first line), and of a password or secret name declared with a type of letters, digits, _, ., [], <> or |, up to 64 characters (password: str = ...). Comparing such a name with an empty '' or "" no longer lists a redaction.