RagLeap
ragleap-agents · release notes

ragleap-agents v0.5.1

ragleap-agents 0.5.1: tenant scope for runs, approvals and audit

Design: #1395. Code: PR #1411. Date fix: PR #1415. A security fix for shared multi-tenant use. Additive: a caller who passes no scope sees no change except the two items under Behaviour changes.

The gap this fixes (reproduced with the released 0.5.0 from PyPI)

One shared Agent and one shared state store. Tenant A's run paused for approval. Tenant B knew only the run id, called resume(run_id, {call_id: True}), and the tool executed with A's arguments. run() and resume() had no tenant argument, the store was keyed by run id alone, and the run id was 48 bits. Single-tenant use was not affected. If you run one agent for several tenants with 0.5.0, upgrade and pass a scope.

Behaviour changes (read first)

  • New run ids are 22-character URL-safe tokens (128 bits) instead of 12 hex characters. Code that assumed 12 hex characters breaks. Old ids still load and resume.
  • New dependency: ragleap-security>=0.2.0 (standard library only, same project).
  • RunContext has a new scope field (default None). With a scope given, a damaged stored state raises "unknown run" like an unknown run.

What is new

  • run(task, *, scope=None, tainted=False) and resume(run_id, decisions, *, scope=None). A run saves its scope; resume only continues it for exactly the same scope, every part. A wrong scope, an unknown run and a damaged state raise the same ResumeError("unknown run"). A run made with a scope cannot be resumed without one and the other way round.
  • Agent(..., require_scope=True), audit=AuditLog(...) (ids, tool names and sizes, never text), rate_limiter=RateLimiter(...) (per scope, before any model call). Sub-agents inherit the parent's scope.

What this does not defend

  • The caller must pass the right scope; the library does not log users in. A tool that reads another tenant's data by itself is not stopped.
  • A shared store file shows every tenant to anyone with access to the file; use one store per tenant for stronger separation.
  • An in-memory rate limiter is lost on restart. No independent security review has happened.

Verified (real output)

  • GitHub CI: 55 of 55 checks passed on the code PR and on the date-fix PR.
  • VPS (Python 3.10.12, SQLite 3.37.2, ragleap-security 0.2.0 and ragleap-tools 0.5.1 from PyPI): 251 tests passed. Sandbox: 251 on Python 3.12.3 and 3.10.20.
  • Mutation check (new script, covers only the 0.5.1 changes): 34 of 34 killed on Python 3.12.3 and 3.10.20.
  • From PyPI: the wheel's 6 Python files are identical to the source at the tag; the cross-tenant attack is refused with the published wheel; a paused run written by the real released 0.5.0 still resumes without a scope and is refused with one; the 251 tests from the source archive pass against the installed wheel.

Not verified

  • Windows and macOS. A real model provider (all tests use a scripted model). Store files on network file systems. The mutation run on the VPS.

Provenance

  • Tag ragleap-agents-v0.5.1 on a79100c. Uploaded to PyPI 2026-11-14T08:29:53 UTC by the Release workflow (environment pypi).
  • Wheel sha256 4b8c4def6df2923d1e2071e56b874da9f81a20d737642705e73c1a90e93113d4
  • Source archive sha256 88a4ac9428e263d255c0600a6bda7e7cda2a4192a97c2ec42e5623e7dcf61438
  • The provenance records of the wheel and of the source archive were decoded: repository ragleap/ragleap-core, workflow release.yml, environment pypi, digests identical to the files.
View on GitHub Package page All releases
← v0.5.0

Release notes mirrored from GitHub Releases.