urml-validator 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- urml_validator/__init__.py +39 -0
- urml_validator/_version.py +9 -0
- urml_validator/cli.py +1254 -0
- urml_validator/errors.py +173 -0
- urml_validator/init_templates.py +990 -0
- urml_validator/policies/__init__.py +6 -0
- urml_validator/policies/us_federal_default.yaml +94 -0
- urml_validator/policy_engine.py +314 -0
- urml_validator/py.typed +0 -0
- urml_validator/schema_export.py +110 -0
- urml_validator/schemas/__init__.py +15 -0
- urml_validator/schemas/common.py +112 -0
- urml_validator/schemas/composition.py +215 -0
- urml_validator/schemas/connectivity.py +168 -0
- urml_validator/schemas/envelope.py +100 -0
- urml_validator/schemas/manifest.py +333 -0
- urml_validator/schemas/policy.py +147 -0
- urml_validator/schemas/primitives.py +528 -0
- urml_validator/schemas/program.py +47 -0
- urml_validator/validator.py +2036 -0
- urml_validator-0.1.0.dist-info/METADATA +206 -0
- urml_validator-0.1.0.dist-info/RECORD +24 -0
- urml_validator-0.1.0.dist-info/WHEEL +4 -0
- urml_validator-0.1.0.dist-info/entry_points.txt +2 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"""urml_validator — static verification engine for the Universal Robot Language.
|
|
2
|
+
|
|
3
|
+
This package is the reference Python implementation of the URML validator.
|
|
4
|
+
It owns the schema definitions for Layer-1 (capability manifest), Layer-2
|
|
5
|
+
(intent primitives), and Layer-3 (behavior composition), plus the four-pass
|
|
6
|
+
validator that checks a URML program against a manifest and a safety envelope
|
|
7
|
+
before execution.
|
|
8
|
+
|
|
9
|
+
The schemas are the source of truth; JSON Schema is exported on demand for
|
|
10
|
+
non-Python consumers (the LLM bridge prompt contract, etc.).
|
|
11
|
+
|
|
12
|
+
Stability: 0.1.0. The schemas track the RFC-0002 vocabulary; the
|
|
13
|
+
five-pass validator and `urml` CLI are shipped, and the namespaced
|
|
14
|
+
error codes in `errors.py` are a stable public API.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
from urml_validator._version import __version__
|
|
18
|
+
from urml_validator.errors import ErrorCode, ValidationError, ValidationResult
|
|
19
|
+
from urml_validator.policy_engine import evaluate_policy
|
|
20
|
+
from urml_validator.schema_export import export_all_schemas, export_schema, write_schemas
|
|
21
|
+
from urml_validator.schemas.policy import Policy, PolicyRule
|
|
22
|
+
from urml_validator.schemas.program import URMLProgram
|
|
23
|
+
from urml_validator.validator import DEFAULT_POLICY, validate
|
|
24
|
+
|
|
25
|
+
__all__ = [
|
|
26
|
+
"DEFAULT_POLICY",
|
|
27
|
+
"ErrorCode",
|
|
28
|
+
"Policy",
|
|
29
|
+
"PolicyRule",
|
|
30
|
+
"URMLProgram",
|
|
31
|
+
"ValidationError",
|
|
32
|
+
"ValidationResult",
|
|
33
|
+
"__version__",
|
|
34
|
+
"evaluate_policy",
|
|
35
|
+
"export_all_schemas",
|
|
36
|
+
"export_schema",
|
|
37
|
+
"validate",
|
|
38
|
+
"write_schemas",
|
|
39
|
+
]
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"""Single source of truth for `__version__`.
|
|
2
|
+
|
|
3
|
+
Kept in its own module so the package's submodules can import the version
|
|
4
|
+
string without triggering circular imports through `__init__.py`.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
__version__: str = "0.1.0"
|