RagLeap
ragleap-tools · release notes

ragleap-tools v0.6.0

ragleap-tools 0.6.0 (2026-11-21). Alpha.

This release adds the first two building blocks of governed tool dispatch for hosts that serve several tenants. Nothing that existed before changes: Toolkit.call behaves as before.

Toolkit.prepare and Toolkit.run are the two halves of Toolkit.call. prepare(name, arguments) finds the tool, parses and size-checks the arguments and validates them, and returns the tool and its arguments, or the same failed ToolResult that call would return, without running the handler. run(tool, arguments) runs the handler of one of the toolkit's own tools with the same exception containment as call, and refuses a tool that is not in the toolkit and arguments that are not a dict of string keys. call is now prepare followed by run.

GovernedToolkit, in the new module ragleap_tools.governed and exported from the package, wraps a Toolkit for hosts that serve several tenants. Every call carries a Scope that the host has already established. The checks run in this order and the first failure stops the call: the scope must be exactly a Scope; the tool must exist and be named by the owner's allow_for(scope), which denies by default and gives an unknown tool and a tool that is not allowed the same refusal; the tenant's sliding-window RateLimit must have room; the arguments are validated; a tool named in require_approval needs approve(scope, tool, arguments) to return exactly True; then the handler runs. A raising or malformed allow_for or approve refuses the call. on_event receives one small dict per call attempt, never the arguments or the results. forget(tenant) drops a tenant's rate window. Scope is ragleap_security.Scope when the new optional extra security (ragleap-security) is installed, and an equivalent built-in class otherwise. The design, with the rejected alternatives, is in docs/design/governed-toolkit.md.

Verified before publishing. The full suite on the merged code, with the ingest extra, gave 525 passed and 1 skipped with the built-in Scope and 526 passed with ragleap-security 0.2.0 installed, on Python 3.10.12 and 3.12.3. Toolkit.call is unchanged by the split: 4,692 deterministic inputs gave identical results from the old and the new code. GovernedToolkit was run over 4,692 cases: 3,321 on existing tools matched the old Toolkit.call and 1,371 unknown or non-string tool names got "tool not available", with 0 mismatches and nothing raised. Deliberate-break (mutation) checks of the new code, run against the final test files, caught 22 of 22 mutants for prepare and run (one equivalent mutant, a redundant guard, was set aside) and 65 of 65 for GovernedToolkit. The built-in Scope has the same fields, key format and error messages as ragleap_security.Scope 0.2.0.

Verified after publishing, on 2026-11-21. The wheel and the sdist were published to TestPyPI and then to PyPI with the same SHA-256 hashes: wheel fc40b80372fa7584424d56ec7202235c2e3319817e0f25083caa47d90fcaa65a, sdist 9e856bfc19f3fd15772d9b5d8a555fe1f9829cc4b8760e2079926ae85be5e593. Downloaded from PyPI, the 18 source files of the wheel and every file of the sdist except the generated PKG-INFO are byte-identical to the merge commit 1ee9c42. pip install ragleap-tools==0.6.0 installed exactly the files of that wheel; pip check was clean with no extras, with the ingest extra, and with the ingest and security extras; a smoke test of GovernedToolkit from the installed package passed with and without ragleap-security; and the test files of the sdist, run against what pip installed, gave 525 passed and 1 skipped without ragleap-security and 526 passed with it, on Python 3.10.12 and again on 3.12.3. One independent rebuild from the merge commit on Python 3.12.3 produced files with the same SHA-256 hashes.

Not verified. GovernedToolkit has no network component, so there is no live check to report; it was not run inside a real host application or with a real LLM provider. Use with versions of ragleap-security other than 0.2.0 is not verified. Python 3.11 was not run by hand (CI covers 3.10 to 3.12), and 3.13 and 3.14 are not run at all yet.

Known limitations. It does not authenticate anybody: it trusts the Scope the host passes, so its isolation is only as strong as the host's own check of who the caller is. A toolkit shared by several tenants shares its tools' state (one file root, one API key per provider, one RagLeap instance), so build one toolkit per tenant; a per-tenant toolkit hub is not part of this release. The rate limit is kept per process, and a tenant's window is kept until forget(tenant) is called. Events go only to on_event; nothing is stored, and they are not tamper-evident.

View on GitHub Package page All releases
← v0.5.1

Release notes mirrored from GitHub Releases.