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

  • format — compiled regexes and parse/format functions 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 str → dict functions: parse_decision, parse_questions, extract_stack_summary, decisions_summary_lines
  • contextbuild_l0/build_l1/build_l2 context assembly from pre-loaded files and parsed decisions
  • validation — structural screening, hash dedup, Jaccard similarity for decision conflict detection
  • pendingPendingStore for the propose/confirm decision workflow

Design principles

  • Zero runtime dependencies — pure Python, no I/O, no filesystem, no network
  • 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-0.1.1.tar.gz (31.6 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-0.1.1-py3-none-any.whl (25.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for nauro_core-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f63905ebf9c392696a4abe7c8cfc24b75779bb32e854a773be7dd264542626a2
MD5 154e45450781f9f964b3f845ff001a23
BLAKE2b-256 5914beda5c5e28f62915c33782d8023b554472098a3408f97849599a6a55a3cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for nauro_core-0.1.1.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-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: nauro_core-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 25.8 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-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3081e0c864ed94f852f1cd92eb897f30d113e59611c7608714475bfc7c64c616
MD5 20d49fdbf838c5856d39a9f3012f9195
BLAKE2b-256 a36959fc7f2c4783b431de94ab8fb2e51b1a175a2e58fb4d62acd6c5e40bba96

See more details on using hashes here.

Provenance

The following attestation bundles were made for nauro_core-0.1.1-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