Repository navigation
v0.3.0-alpha.21
Pre-release
Pre-release
·
60 commits
to main
since this release
Changed
- Breaking: In enforced mode a
gitcall whose first argument is the subcommandbranch,diff,log,rev-parse,show,statusortaguses 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 asnot a git repository, even for a read an operator approved: pointMELRA_WORKSPACEat the repository's top level. The call is refused withterminal_git_repository_outside_workspacewhere a.gitbetween 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 withterminal_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 othergitcommands (commit,checkout, ...), are unchanged. - Breaking: A memory
list,searchorclearis matched against capability grants as<scope>:<action>:*, whatever key or id it names, so only a grant covering the whole scope covers it, and aputwithsupersedesIdneeds its grant to cover<scope>:put:<supersedesId>as well. A grant scoped to keys used to cover both. - Breaking:
forbiddenEffects: ["mutate"]also refuses adestructiveeffect (a filedelete, a memorydeleteorclear) in every mode, unsafe-local included, counting it as a mutation the way"mutations": "deny"already does. Forbiddingdestructivealone is unchanged. A terminal command or HTTP request that deletes is a mutation, as before, so only forbiddingmutateexcludes it; theforbiddenEffectsdescription, CAPABILITIES.md and INSTALLATION.md now say which operations each label covers. - Breaking:
POST /oauth/registerrefuses a request that carries anOriginheader (403 origin_not_allowed) and one whoseContent-Typeis notapplication/json(415 json_required). An MCP client registering from its own process sendsContent-Type: application/jsonand noOrigin, 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_clientorworkflow_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_executeno 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 modemelra_workflow_controlno longer resumes a run an operator halted withmelra workflow pauseorsuspend(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,suspendandresumenow recordMELRA_APPROVERas who acted, and fail on a value it does not accept. - Breaking: In enforced mode an HTTP
GETorHEAD, or a browsernavigateortab_new, to a public host thatallowedDomainsadmits only through"*", the default, plans asconfirmwith reasonnetwork_read_unlisted_hostand 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_matchesevidence or reconciliation is read from a host only"*"admits, or takes its host from the result, also plans asconfirmwith reasonnetwork_read_unlisted_host. A workflowcondition,untilordelegationcheck like that is refused withworkflow_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
GETorHEADthat carriescontentis a mutation in every mode, so it is never retried andforbiddenEffects: ["mutate"]excludes it, and outside unsafe-local mode it needs evidence and an approval like any other; withoutcontentit 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_KEYwhoseMELRA_HOMEholds sealed task or workflow payloads but nopayload.keyis refused withpayload_key_missing, and a start whose key, from either source, cannot open the sealed payload it samples is refused withpayload_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 thancannot rollback - no transaction is active. - INSTALLATION.md now says to run
melra approve,consoleorjudgewith the server'sMELRA_PAYLOAD_KEYwhen it sets one, andmelra helpsays so forconsole(#417).
Security
- In enforced mode a
gitread no longer reaches a repository outside the workspace, such as one enclosing it or one its.gitor 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 --openno 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 asopenUrl. 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.