ragleap-agents 0.6.0
Design: #963 (with the executed-before-pause amendment from the outside review by renezander030). Nested approvals: a pause anywhere in the delegation tree appears at the top-level run as one pending approval. Opt-in.
Behaviour changes (read first)
- None by default.
nested_approvalisFalseunless you set it, so a child that reaches an approval still stops withapproval_not_availableas in 0.5.x. make_delegate_toolnow returns aDelegateTool(aToolsubclass, exported) that holds itschildrenand thenested_approvalflag. Code that only calls it as aToolis unaffected.ANSWER_CAPmoved toragleap_agents.agent(it is still importable fromragleap_agents.delegate).
Added
make_delegate_tool(..., nested_approval=False). WithTrue, a child's pause bubbles up: the top run'spendingshows the child's realtool,argumentsandforced, plusvia(the path: agent and run id at each level) anddelegate(the top run's own delegate call). Code that readspending["tool"]andpending["arguments"]keeps working.allow_outboundstays a separate, explicit switch.- One
resume(run_id, {call_id: bool}, scope=...)on the top run decides it. It first checks every run on the path read-only (exists, exactly the same scope, awaiting approval, same call id, tool, arguments and signature, and a consistentvia), then claims the deepest run first withsave_if_status, then each parent. Approve: the action runs exactly once and the parent continues; a second pause deeper in the tree bubbles up again. Reject: the whole tree ends rejected and the action never runs. executed_before_pauseon the parent's rejected delegate step: agent, run id, tool, capped arguments and status of every step a child run on the path had already run (executed or error), up to 20 entries,truncatedif more. These effects are not undone. A child run that cannot be read back is listed asunavailable; the tree still ends rejected.- Every child run keeps the parent's scope, and resume refuses a child run of any other scope. The resumed action runs with the right depth, scope, taint and shared budget counters. Audit:
approval.requestedandapproval.decidedcarryvia_depthat each level (ids, tool names and sizes, never text). scripts/mutation_check.pynow has 30 mutations for the nested approvals, besides the 34 for 0.5.1 (64 in total, all killed on Python 3.10 and 3.12). One more candidate was dropped as an equivalent mutant: theMAX_VIAlength check in_load_chain(a via longer than the depth ceiling cannot match a real child run, so an earlier check refuses it anyway).
Does not defend
- Who may approve stays the caller's business;
decided_byis not verified. - Every agent in the tree needs a store that survives until the decision. With in-memory stores a restart loses the child run: an approval fails closed, a rejection still closes the top run.
- A crash between a claim and the end of the call leaves runs at
running(no recovery in this release). A store withoutsave_if_statusis not atomic across processes. - A child that waits forever keeps the tree awaiting; timeouts are the caller's policy.
- Compensation for effects a child already produced belongs to the owner of that tool.
Not verified
No real model provider (all tests use a scripted model; scripts/live_delegate.py is not extended in this release); Windows and macOS; store files on network file systems.
Verified (after publishing)
- Both file hashes match the PyPI JSON.
- The wheel's
.pyfiles are identical to the source at the tag. - A clean install works; the 289 tests from the source tree pass against the installed wheel (Python 3.12, sandbox).
- Provenance of both files decoded and matched.
Provenance
- PyPI upload: 2026-11-24 04:17 UTC. Tag
ragleap-agents-v0.6.0on commit5d58844d2228b313ebc6919e0a7f6bbbda5ec665. - Wheel sha256
d4279ac42d3e9a76a2ffb710d4eca830f053d0faa40a532fac2c7033e2a3ba11 - Source archive sha256
ae923c1dbe138f31953a0da0242733672d0d48a86ecc92f1375c9a6e18170c28 - Both files carry a PyPI provenance record: publisher GitHub
ragleap/ragleap-core, workflowrelease.yml, environmentpypi; the digests match. - No independent security review has been done.