-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathpyproject.toml
More file actions
152 lines (138 loc) · 4.81 KB
/
Copy pathpyproject.toml
File metadata and controls
152 lines (138 loc) · 4.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
[project]
name = "brainlayer"
version = "1.5.2"
description = "Persistent memory MCP server for AI agents — 13 tools, semantic search, knowledge graph, on-device SQLite"
license = {text = "Apache-2.0"}
readme = "README.md"
authors = [{name = "Etan Heyman"}]
keywords = ["mcp", "memory", "knowledge-graph", "ai-agent", "claude", "semantic-search", "sqlite-vec", "embeddings"]
requires-python = ">=3.11"
dependencies = [
# Vector DB (sqlite-vec via APSW)
"apsw>=3.45.0",
"sqlite-vec>=0.1.3", # CVE-2024-46488 fixed in 0.1.3
# Embeddings (local bge-large-en-v1.5)
"sentence-transformers>=2.2.0",
# MCP server
"mcp>=2.0.0,<3.0.0",
"jsonschema>=4.20.0", # MCP v2 low-level handlers require explicit schema validation
# CLI
"typer>=0.9.0",
"rich>=13.0.0",
# Utils
"pydantic>=2.0.0",
"orjson>=3.9.0", # Fast JSON for JSONL parsing
"pyyaml>=6.0", # Chat-tags config
"numpy>=1.22,<3.0", # For sentence-transformers
"scikit-learn>=1.0.0", # K-means for cluster-based sampling
"spacy>=3.7,<4.0", # NER for PII sanitization (en_core_web_sm model)
"requests>=2.28.0", # HTTP calls to Ollama for enrichment
"google-api-python-client>=2.0.0", # Daily DB backup upload to Google Drive
"google-auth>=2.0.0", # OAuth refresh for Google Drive backups
"ranx>=0.3.20", # IR evaluation metrics + significance testing
"abydos>=0.5.0", # Beider-Morse phonetic matching for cross-script entity aliases
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
[project.optional-dependencies]
cloud = [
"google-genai>=1.0.0", # Gemini Batch API for cloud backfill (new SDK)
]
brain = [
"igraph>=0.11.0", # Graph operations + Leiden via leidenalg
"leidenalg>=0.10.0", # Leiden community detection (replaces graspologic)
"umap-learn>=0.5.0", # UMAP 3D layout
"faiss-cpu>=1.7.0", # Fast approximate nearest-neighbor search
]
youtube = [
"yt-dlp>=2024.1.0", # YouTube video metadata + subtitle download
"youtube-transcript-api>=1.2.4", # Primary transcript API (instance-based)
"certifi", # SSL certificates for macOS
]
ast = [
"tree-sitter-languages>=1.9.0", # Better code chunking (falls back to line-based if unavailable)
]
kg = [
"gliner>=0.2.20", # GLiNER multi-lingual NER (209M params, EN+HE)
]
style = [
"chromadb>=0.4.0", # ChromaDB vector store (alternative to sqlite-vec)
]
telemetry = [
"axiom-py>=0.10.0", # Axiom observability (optional — degrades gracefully)
]
dev = [
"deepchecks>=0.19.1",
"google-genai>=1.0.0",
"numpy<2",
"pytest>=7.0.0",
"pytest-asyncio>=0.21.0",
"ruff>=0.1.0",
"scikit-learn<1.6",
"setuptools>=70.0.0,<81",
"tiktoken>=0.7.0",
"umap-learn>=0.5.0",
]
docs = [
"mkdocs-material>=9.5.0",
]
[project.urls]
Homepage = "https://brainlayer.etanheyman.com"
Repository = "https://github.com/EtanHey/brainlayer"
Documentation = "https://etanhey.github.io/brainlayer"
Issues = "https://github.com/EtanHey/brainlayer/issues"
[project.scripts]
brainlayer = "brainlayer.cli:app"
brainlayer-mcp = "brainlayer.mcp:serve"
brainlayer-mcp-stdio-bridge = "brainlayer.mcp_stdio_bridge:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.ruff]
line-length = 120
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "I", "W"]
ignore = ["E402", "E501", "E741", "F821", "F841"]
per-file-ignores = {"src/brainlayer/cli/__init__.py" = ["F401"]}
[tool.pytest.ini_options]
asyncio_mode = "auto"
pythonpath = ["src"]
markers = [
"engine: pure-library engine tests (excludes CLI, dashboard, BrainBar, launchd, and root orchestration surfaces)",
"integration: tests that need the real production DB (268K+ chunks)",
"live: tests that need the live production DB or mutable local hooks state",
"slow: tests that load ML models or take >30s",
]
[tool.hatch.build.targets.wheel]
packages = ["src/brainlayer"]
exclude = [
"src/brainlayer/dashboard",
]
[tool.hatch.build.targets.wheel.force-include]
"scripts/launchd" = "brainlayer/launchd"
"scripts/hotlane_brainbar_daemon.py" = "brainlayer/launchd/hotlane_brainbar_daemon.py"
"scripts/tier0-watchdog.sh" = "brainlayer/launchd/tier0-watchdog.sh"
[tool.hatch.build.targets.sdist]
only-include = [
"src/brainlayer",
"scripts/launchd",
"scripts/hotlane_brainbar_daemon.py",
"scripts/tier0-watchdog.sh",
"README.md",
"LICENSE",
"server.json",
]
exclude = [
"docs.local/**",
"brain-bar/docs.local/**",
"src/brainlayer/dashboard/**",
]