Metadata-Version: 2.4
Name: roguard-child-safety
Version: 9.0.0
Summary: Romanian and Ukrainian AI interaction testing, permission controls and guardrails
Author: RoGuard contributors
License-Expression: MIT
Project-URL: Homepage, https://github.com/xyz-rafael-xyz/roguard-child-safety
Project-URL: Repository, https://github.com/xyz-rafael-xyz/roguard-child-safety
Project-URL: Documentation, https://github.com/xyz-rafael-xyz/roguard-child-safety/blob/main/README.md
Project-URL: Issues, https://github.com/xyz-rafael-xyz/roguard-child-safety/issues
Keywords: child-safety,Romanian,Ukrainian,evaluation,guardrails
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
License-File: models/v9/NOTICE.txt
License-File: models/v9/licenses/Apache-2.0.txt
License-File: models/v9/licenses/Gemma-Prohibited-Use-Policy.txt
License-File: models/v9/licenses/Gemma-Terms.txt
License-File: models/v9/licenses/nli-UPSTREAM-LICENSE.txt
License-File: models/v9/licenses/ro-UPSTREAM-LICENSE
Provides-Extra: adapted
Requires-Dist: torch<3,>=2.6; extra == "adapted"
Requires-Dist: transformers<5,>=4.57; extra == "adapted"
Requires-Dist: numpy<3,>=1.26; extra == "adapted"
Requires-Dist: peft<1,>=0.13; extra == "adapted"
Provides-Extra: gateway
Requires-Dist: cryptography<51,>=44; extra == "gateway"
Requires-Dist: uvicorn<1,>=0.30; extra == "gateway"
Provides-Extra: observability
Requires-Dist: opentelemetry-sdk<2,>=1.30; extra == "observability"
Requires-Dist: opentelemetry-exporter-otlp-proto-http<2,>=1.30; extra == "observability"
Provides-Extra: semantic
Requires-Dist: torch<3,>=2.6; extra == "semantic"
Requires-Dist: transformers<5,>=4.57; extra == "semantic"
Requires-Dist: numpy<3,>=1.26; extra == "semantic"
Provides-Extra: train
Requires-Dist: numpy>=1.26; extra == "train"
Requires-Dist: pyyaml>=6; extra == "train"
Requires-Dist: torch>=2.3; extra == "train"
Requires-Dist: transformers<5,>=4.46; extra == "train"
Requires-Dist: peft<1,>=0.13; extra == "train"
Requires-Dist: accelerate<2,>=1; extra == "train"
Provides-Extra: mlx
Requires-Dist: mlx-lm<0.32,>=0.31.3; extra == "mlx"
Provides-Extra: fusion
Requires-Dist: torch<2.15,>=2.14; extra == "fusion"
Requires-Dist: transformers<5.18,>=5.17; extra == "fusion"
Requires-Dist: numpy<3,>=1.26; extra == "fusion"
Requires-Dist: mlx-lm<0.32,>=0.31.3; extra == "fusion"
Provides-Extra: gemma4
Requires-Dist: mlx==0.32.2; extra == "gemma4"
Requires-Dist: mlx-lm==0.31.3; extra == "gemma4"
Requires-Dist: transformers==5.17.0; extra == "gemma4"
Requires-Dist: tokenizers==0.23.2; extra == "gemma4"
Requires-Dist: huggingface-hub==1.33.0; extra == "gemma4"
Requires-Dist: numpy==2.5.3; extra == "gemma4"
Provides-Extra: test
Requires-Dist: pytest>=8; extra == "test"
Requires-Dist: jsonschema<5,>=4.23; extra == "test"
Provides-Extra: message-train
Requires-Dist: numpy<3,>=1.26; extra == "message-train"
Requires-Dist: scikit-learn<2,>=1.5; extra == "message-train"
Dynamic: license-file

# RoGuard — Romanian and Ukrainian interaction testing and guardrails

RoGuard combines local model review with explicit permission checks and a laboratory for fictional AI interactions. Developers can test whether a system preserves source restrictions, respects revocation, requests human review and still completes permitted tasks. The browser and CLI simulate actions; external execution requires separately configured host callbacks and live approval checks.

## Install

```sh
pip install --upgrade roguard-child-safety
```

The core toolkit has no runtime dependencies and supports Python 3.9–3.14 on macOS, Linux and Windows.

```sh
roguard-studio --reliability --open
roguard-studio --review --open
```

## V9 local model review

The optional v9 model proposes whether a Romanian or Ukrainian focal message needs review under the project's declared policy. It uses earlier turns to distinguish an ordinary topic change, a support signal and a revision of an earlier statement. Review is a proposal, not a finding that an event occurred or permission to contact anyone.

This model requires native Apple Silicon and Python 3.12 or later. In a separate virtual environment:

```sh
pip install --upgrade "roguard-child-safety[gemma4]"
roguard-fetch fetch
roguard-review --language ro --text "Mă ajuți să înțeleg exercițiul?"
roguard-review --language uk --text "Допоможеш розібратися із завданням?"
```

The explicit download fetches pinned, checksummed model files. The base is approximately 5.18 GB; subsequent inference is local. Keep disk space for the installed base and a verified private loading copy. For applications, load the model once and reuse it. [Installation, conversation input and Python API](https://github.com/xyz-rafael-xyz/roguard-child-safety/blob/main/docs/V9_MODEL.md).

The first neural evaluation of the reserved 600 synthetic cases passed the unchanged 99% recall and 5% false-review limits in both languages. The installed package also reproduced all 5,022 prior scores exactly. Those prior cases had zero missed concerns and two Romanian false alerts; all six language/group checks passed. Development selection used 6,341 cases and had zero errors across 14 groups.

| Language | Reserved cases | Missed concerns | False reviews | Recall | False-review rate |
|---|---:|---:|---:|---:|---:|
| Romanian | 300 | 0/150 | 0/150 | 100.00% | 0.00% |
| Ukrainian | 300 | 0/150 | 0/150 | 100.00% | 0.00% |

Measurements describe project-authored synthetic inputs. They do not establish accuracy on real children's messages or measured human benefit. Scores are not calibrated safety probabilities. A negative prediction cannot close a concern; an overlong input requests clarification, and malformed model output is rejected. The binary review task is qualified separately from the auxiliary interpretation heads.

## Decision assurance

V9 preserves complete supplied interpretation hypotheses, computes an optimal adaptive clarification tree under declared reviewer costs, and verifies reports bound to their context, model identities and policy. Romanian and Ukrainian question labels and a local clarification workspace are included. The guarantee applies to the supplied finite problem; it does not establish that the true interpretation is among the supplied hypotheses. [Assurance guide](https://github.com/xyz-rafael-xyz/roguard-child-safety/blob/main/docs/V9_ASSURANCE.md).

## Test an application

```sh
roguard-lab demo --language uk --family revocation --target stale
roguard-lab compare --language ro
roguard-lab suite --fail-on-failure
```

- Replay branching fictional scenarios against programmed references, recorded responses or an explicit Python adapter.
- Find the first failing step and reduce a scenario within a bounded replay budget.
- Preserve source restrictions through summaries, proposed memory and tool results.
- Minimize declared disclosure cost while covering required task fields.
- Compare permitted-task completion, unnecessary refusal and unauthorized proposals or deliveries.

Authenticated tenant APIs, encrypted durable permissions, one-attempt queued execution and metadata-only monitoring are available through optional integration extras. Host declarations and callback code remain trusted inputs. [Integration guide](https://github.com/xyz-rafael-xyz/roguard-child-safety/blob/main/docs/RELIABILITY.md).

## Retained experimental backends

The older Studio conversation, context and evidence screens retain their documented backends; they do not automatically use the new Gemma 4 model. The `semantic` and `adapted` extras require a different Transformers major version and belong in a separate environment from `gemma4`. Their historical model limitations remain documented. [Context workflow](https://github.com/xyz-rafael-xyz/roguard-child-safety/blob/main/docs/CONTEXT.md) · [Evidence workspace](https://github.com/xyz-rafael-xyz/roguard-child-safety/blob/main/docs/EVIDENCE.md).

[GitHub and full README](https://github.com/xyz-rafael-xyz/roguard-child-safety) · [Training method](https://github.com/xyz-rafael-xyz/roguard-child-safety/blob/main/docs/V9_SHARED_ATTENTION.md) · [Evaluation record](https://github.com/xyz-rafael-xyz/roguard-child-safety/blob/main/docs/V9_STABILIZATION.md)
