[project] name = "muse" version = "0.2.0rc12" description = "Muse — domain-agnostic version control for multidimensional state" readme = "README.md" license = {text = "MIT"} requires-python = ">=3.14" dependencies = [ "typer>=0.25.1", # Binary wire protocol — eliminates base64 overhead for object transfers. "msgpack>=1.1.2", # zstd compression for at-rest snapshot storage — ~3× smaller than raw msgpack # on real manifests; self-describing via 4-byte magic so old files remain readable. "zstandard>=0.25.0", # Ed25519 + secp256k1 key operations (CFFI + OpenSSL bindings, FIPS-validated). "cryptography>=48.0.0", # keccak256 for EVM/AVAX address derivation. pycryptodome is the standard # Python crypto library with FIPS-grade hash primitives including Keccak. "pycryptodome>=3.23.0", # secp256k1 signing, recovery, and EVM address derivation — Ethereum Foundation. # Wraps cryptography/coincurve under the hood; no hand-written EC math anywhere. "eth-keys>=0.7.0", "mido>=1.3.3", "defusedxml>=0.7.1", # tree-sitter engine — always required; grammars are optional extras below. # Used by GitHub Copilot, VS Code, Neovim, and Zed — the industry standard. "tree-sitter>=0.25.2", # BIP39 mnemonic generation and validation — industry standard word list. "mnemonic>=0.21", # OS keychain integration — mnemonics stored in Keychain / SecretService / encrypted file. # Never in plaintext TOML. Set MUSE_KEYCHAIN_BACKEND=disabled for CI/test environments. "keyring>=25.7.0", "keyrings.alt>=5.0.2", # HTTP client — used by transport.py and push for hub communication. # [http2] installs the h2 package required for HTTP/2 multiplexing (clone, fetch, push). "httpx[http2]>=0.28.1", ] [project.scripts] muse = "muse.cli.app:main" [project.optional-dependencies] # ── Language bundles ───────────────────────────────────────────────────────── # Install only the grammars you need. Every adapter degrades gracefully to # file-level tracking when its grammar is absent — nothing breaks, you just # lose symbol-level diffs for that language. # # pip install muse[web] # JS, TS, CSS, HTML # pip install muse[go] # Go # pip install muse[rust] # Rust # pip install muse[jvm] # Java, Kotlin # pip install muse[systems] # C, C++, C# # pip install muse[ruby] # Ruby # pip install muse[prose] # Markdown # pip install muse[shell] # Bash, sh, zsh (via tree-sitter-bash) # pip install muse[all] # every grammar above # # Swift is intentionally excluded from [all] — py-tree-sitter-swift must be # built from source and requires Xcode CLT. Install it manually if needed: # pip install py-tree-sitter-swift web = [ "tree-sitter-javascript>=0.25.0", "tree-sitter-typescript>=0.23.2", "tree-sitter-css>=0.25.0", "tree-sitter-scss>=1.0.0", "tree-sitter-html>=0.23.2", ] go = [ "tree-sitter-go>=0.25.0", ] rust = [ "tree-sitter-rust>=0.24.0", ] jvm = [ "tree-sitter-java>=0.23.5", "tree-sitter-kotlin>=1.1.0", ] systems = [ "tree-sitter-c>=0.24.1", "tree-sitter-cpp>=0.23.4", "tree-sitter-c-sharp>=0.23.1", ] ruby = [ "tree-sitter-ruby>=0.23.1", ] prose = [ "tree-sitter-markdown>=0.5.1", ] shell = [ # Covers bash, sh, and zsh (zsh is a strict superset of bash at the AST level). "tree-sitter-bash>=0.23.3", ] all = [ "muse[web]", "muse[go]", "muse[rust]", "muse[jvm]", "muse[systems]", "muse[ruby]", "muse[prose]", "muse[shell]", ] dev = [ "pytest>=9.0.3", "pytest-asyncio>=1.3.0", "pytest-cov>=7.1.0", # Structured per-test JSON report consumed by muse code test's summary. # Without this, muse code test --all shows 0/0/0/0 because stream mode # cannot capture pytest's stdout — the JSON report is written to a file # and read after the subprocess exits, independent of streaming. "pytest-json-report>=1.5.0", "anyio>=4.13.0", "mypy>=1.20.0", "hypothesis>=6.152.0", "types-defusedxml>=0.7.0.20260504", ] [build-system] requires = ["hatchling>=1.29.0"] build-backend = "hatchling.build" [tool.pytest.ini_options] asyncio_mode = "auto" testpaths = ["tests"] cache_dir = "/tmp/pytest_cache" addopts = "-v --tb=short -m 'not midi'" markers = [ "slow: marks tests as slow (stress / large-repo scenarios)", "perf: marks tests as performance benchmarks with timing budgets", "midi: marks tests for the midi domain (disabled until midi rollout)", "timeout: per-test wall-clock timeout in seconds", ] [tool.coverage.run] source = ["muse"] omit = [ # Hub/remote authentication — future feature, requires network fixtures "muse/cli/config.py", # MIDI binary parser — requires MIDI fixture files to test meaningfully "muse/cli/midi_parser.py", # Backward-compat re-export shim — trivially thin wrapper "muse/cli/models.py", ] [tool.coverage.report] exclude_lines = [ "pragma: no cover", "if TYPE_CHECKING:", "raise NotImplementedError", ] [tool.mypy] python_version = "3.14" strict = true explicit_package_bases = true namespace_packages = true warn_unreachable = true show_error_codes = true # Exclude deferred files not yet ported to the strict typed surface. exclude = [ "muse/plugins/music/services/", "muse/cli/commands/emotion_diff\\.py", "muse/cli/commands/groove_check\\.py", ] [[tool.mypy.overrides]] module = ["tests.*"] disallow_untyped_decorators = false disallow_untyped_defs = false disallow_incomplete_defs = false [[tool.mypy.overrides]] module = ["mido"] ignore_missing_imports = true [[tool.mypy.overrides]] module = ["msgpack"] ignore_missing_imports = true [[tool.mypy.overrides]] # tree-sitter and its grammar packages ship compiled C extensions. The core # package (tree_sitter) provides py.typed stubs when run via `python -m mypy` # from the project venv, but a globally-installed mypy cannot resolve them. # Grammar packages never ship stubs. Marking all of them ignore_missing_imports # keeps both invocation styles green; the venv mypy still validates our usage # against the stubs when they are findable (CI). module = [ "tree_sitter", "tree_sitter_javascript", "tree_sitter_typescript", "tree_sitter_java", "tree_sitter_go", "tree_sitter_rust", "tree_sitter_c", "tree_sitter_cpp", "tree_sitter_c_sharp", "tree_sitter_ruby", "tree_sitter_kotlin", "tree_sitter_markdown", "tree_sitter_html", "tree_sitter_css", "py_tree_sitter_swift", ] ignore_missing_imports = true [tool.hatch.build.targets.wheel] packages = ["muse"] [tool.hatch.build.targets.sdist] exclude = [ ".muse/", ".hypothesis/", ".pytest_cache/", ".mypy_cache/", ".ruff_cache/", "tests/", "tools/", "docs/", "completions/", "out/", "*.tar.gz", "AGENTS.md", "CLAUDE.md", ".cursorrules", "EXTREME_STRESS_PLAN.md", ]