Skip to main content

Behavioral Specification Language toolkit: parser, validator, formatter, linter

Project description

bsl-lang

Behavioral Specification Language toolkit: parser, validator, formatter, linter

CI PyPI version Python versions License

Part of the AumOS open-source agent infrastructure portfolio.


Features

  • Formal EBNF grammar for agent behavior specifications — behavior, invariant, degrades_to, and composition blocks with must/must_not/should/may modal 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, and diff subcommands 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bsl_lang-0.1.0.tar.gz (107.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bsl_lang-0.1.0-py3-none-any.whl (75.0 kB view details)

Uploaded Python 3

File details

Details for the file bsl_lang-0.1.0.tar.gz.

File metadata

  • Download URL: bsl_lang-0.1.0.tar.gz
  • Upload date:
  • Size: 107.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for bsl_lang-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c4880605f94b6acef9cda7fee9ea583d4f8bbed3b4f95e88efd641993ab5c023
MD5 28b3b2ad6d47aaf248f47301e3f3bfa8
BLAKE2b-256 49cc87615ddf2fef3ee82024735bf0c2039ea507c4c16c405a76b573d49f70db

See more details on using hashes here.

File details

Details for the file bsl_lang-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: bsl_lang-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 75.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for bsl_lang-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ce8bc09653f2fe0d998e7fc0a2d52736b646946673cc73dfe45ff504559cc71d
MD5 694e78029ff990e42aab659de898ecc0
BLAKE2b-256 4560f6cb4bb7cd09836c0b1139ae4d833e616077efd971794725659b6d315e32

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page