Behavioral Specification Language toolkit: parser, validator, formatter, linter
Project description
bsl-lang
Behavioral Specification Language toolkit: parser, validator, formatter, linter
Part of the AumOS open-source agent infrastructure portfolio.
Features
- Formal EBNF grammar for agent behavior specifications —
behavior,invariant,degrades_to, andcompositionblocks withmust/must_not/should/maymodal constraints - Hand-written recursive-descent parser that produces a typed AST (
AgentSpec,BehaviorDecl,InvariantDecl, and expression nodes) with source-span tracking - Semantic validator with configurable rule sets and strict mode that promotes warnings to errors for CI gating
- AST serializer with round-trip JSON Schema output so specs can be consumed by external tooling
- Canonical formatter that enforces clause ordering within behavior and invariant blocks, preserving comments
- Linter with naming, completeness, and consistency rule sets (extensible via custom rule callables)
- CLI with
validate,fmt,lint, anddiffsubcommands for use in pre-commit hooks and CI pipelines
Quick Start
Install from PyPI:
pip install bsl-lang
Verify the installation:
bsl-lang version
Basic usage:
import bsl
# See examples/01_quickstart.py for a working example
Documentation
Enterprise Upgrade
For production deployments requiring SLA-backed support and advanced integrations, contact the maintainers or see the commercial extensions documentation.
Contributing
Contributions are welcome. Please read CONTRIBUTING.md before opening a pull request.
License
Apache 2.0 — see LICENSE for full terms.
Part of AumOS — open-source agent infrastructure.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bsl_lang-0.2.0.tar.gz.
File metadata
- Download URL: bsl_lang-0.2.0.tar.gz
- Upload date:
- Size: 159.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1326d0adb18d9e18e812cbe180b918b70afdd64b9a2be29dfc3793efba08cfdc
|
|
| MD5 |
c933aad44f2556cf1ed683d480e61066
|
|
| BLAKE2b-256 |
c7d86f7cb634f61a45b4a528957876ce346c433b6adbaf7ba46d2ee91dae49e6
|
File details
Details for the file bsl_lang-0.2.0-py3-none-any.whl.
File metadata
- Download URL: bsl_lang-0.2.0-py3-none-any.whl
- Upload date:
- Size: 116.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79cb259029669fe12b012205f5a56adc2530e9783e796ded95444dfe1e421c82
|
|
| MD5 |
54d228a053fb700c22b4333e51d73658
|
|
| BLAKE2b-256 |
1a08ee36297e850e266c7c13f12774d0b49026aabdc79399ed7a680fd6617e5f
|