Skip to main content

Shared pure-Python logic for Nauro: parsing, validation, context assembly, constants.

Project description

nauro-core

Shared pure-Python library for the Nauro ecosystem. Provides parsing, validation, context assembly, and constants used by both the Nauro CLI and the remote MCP server.

Installation

pip install nauro-core

What's inside

  • decision_model — the Pydantic Decision model plus compiled regexes and parse_decision/format_decision for the Nauro markdown protocol (decision titles, metadata fields, section headers)
  • constants — limits, thresholds, valid values, file paths shared across all Nauro surfaces
  • parsing — pure markdown→data helpers: extract_stack_summary, decisions_summary_lines (decision parsing lives in decision_model.parse_decision, which returns a validated Decision)
  • contextbuild_l0/build_l1/build_l2 context assembly from pre-loaded files and parsed decisions
  • validation — structural screening, hash dedup, BM25 similarity for decision conflict detection

Design principles

  • No I/O — no filesystem, no network; callers inject pre-loaded data. Runtime dependencies are compute-only (BM25, parsing, validation); embeddings are an optional extra (nauro-core[embeddings])
  • Function injection — callers pass pre-loaded data (files: dict[str, str], decisions: list[dict]); nauro-core never reads files or calls APIs
  • Import isolation — enforced via import-linter: nauro-core cannot import from nauro or mcp_server

Usage

from nauro_core import parse_decision, build_l0, compute_hash

# Parse a decision markdown file
decision = parse_decision(markdown_content, "042-use-s3.md")

# Build L0 context from pre-loaded files
context = build_l0(files={"state.md": state, "stack.md": stack}, decisions=decisions)

# Check for duplicate decisions
hash_val = compute_hash(title="Use S3 for storage", rationale="...")

License

Apache 2.0

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

nauro_core-1.0.0.tar.gz (156.2 kB view details)

Uploaded Source

Built Distribution

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

nauro_core-1.0.0-py3-none-any.whl (99.6 kB view details)

Uploaded Python 3

File details

Details for the file nauro_core-1.0.0.tar.gz.

File metadata

  • Download URL: nauro_core-1.0.0.tar.gz
  • Upload date:
  • Size: 156.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nauro_core-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c5ad4e46abcb2b7e9fcb36fcf880c7b2e62e7eeefb3a2da2f8f6b4b6a4d18902
MD5 51a8f545334f7e5850efb366c338782a
BLAKE2b-256 a7a9edf6fe5e1a66de45ba10a8d43010c718398fea387904236ce9d58f5c7f9a

See more details on using hashes here.

Provenance

The following attestation bundles were made for nauro_core-1.0.0.tar.gz:

Publisher: publish-nauro-core.yml on Nauro-AI/nauro

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nauro_core-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: nauro_core-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 99.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nauro_core-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7913e6b5989f8166a93dad8025477e4e1a1c575aeef5fbe713fb460ab03645aa
MD5 7182c4c80f2596cc28db0d4a28455cc2
BLAKE2b-256 6784d17ce61374ee4068f386826f39562aa0cbe0419de66f586fcc431f39282c

See more details on using hashes here.

Provenance

The following attestation bundles were made for nauro_core-1.0.0-py3-none-any.whl:

Publisher: publish-nauro-core.yml on Nauro-AI/nauro

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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