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.2.0.tar.gz (159.5 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.2.0-py3-none-any.whl (116.8 kB view details)

Uploaded Python 3

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

Hashes for bsl_lang-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1326d0adb18d9e18e812cbe180b918b70afdd64b9a2be29dfc3793efba08cfdc
MD5 c933aad44f2556cf1ed683d480e61066
BLAKE2b-256 c7d86f7cb634f61a45b4a528957876ce346c433b6adbaf7ba46d2ee91dae49e6

See more details on using hashes here.

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

Hashes for bsl_lang-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 79cb259029669fe12b012205f5a56adc2530e9783e796ded95444dfe1e421c82
MD5 54d228a053fb700c22b4333e51d73658
BLAKE2b-256 1a08ee36297e850e266c7c13f12774d0b49026aabdc79399ed7a680fd6617e5f

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