Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
327 lines (312 loc) · 12.1 KB
/
Copy pathpyproject.toml
File metadata and controls
327 lines (312 loc) · 12.1 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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "OpenJarvis"
dynamic = ["version"]
description = "OpenJarvis — modular AI assistant backend with composable intelligence primitives"
readme = "README.md"
# Upper bound: numpy 2.2.x (pinned transitively via datasets/pandas) ships no
# cp314 Windows wheel, so under Python 3.14 uv would compile numpy from source
# (Meson) and fail on Windows boxes without a C toolchain (#350). Cap to the
# range that has prebuilt wheels; matches the classifiers (3.11–3.13).
requires-python = ">=3.11,<3.14"
license = {text = "Apache-2.0"}
authors = [
{name = "Open Jarvis Contributors"},
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dependencies = [
# Security floors for dependencies already used by the core integrations.
"aiohttp>=3.14.4",
"click>=8",
"croniter>=2.0",
"datasets>=5.0.1",
"ddgs>=9.11.4",
"httpx>=0.27",
"filelock>=4.2.1",
"fsspec>=2026.6.0",
"lxml>=6.1.0",
"multidict>=6.9.1",
"openai>=1.30",
"nvidia-ml-py>=12.560.30",
"posthog>=3.0",
# Process identity and descendant cleanup for the source-checkout GUI.
"psutil>=5.9",
"python-telegram-bot>=22.8",
"rich>=13",
"pygments>=2.20.0",
"requests>=2.33.0",
"urllib3>=2.8.0",
"tomlkit>=0.12",
# IANA time-zone fallback for Windows and minimal container images.
"tzdata>=2025.3",
"websockets>=15.0.1",
]
[project.optional-dependencies]
dev = [
"maturin>=1.12.6",
"pytest>=8",
"pytest-asyncio>=0.24",
"pytest-cov>=5",
"pytest-xdist>=3",
"respx>=0.22",
"ruff>=0.4",
"pre-commit>=3.0",
]
inference-mlx = ["mlx-lm>=0.31.1; sys_platform == 'darwin'"]
# 0.32 fixes the 0.31 security advisories while retaining the PyTorch 2.13 stack.
inference-vllm = ["vllm>=0.32.0"]
inference-cloud = [
"openai>=1.30",
"anthropic>=0.30",
]
inference-google = [
"google-genai>=1.0",
]
# Exact security pin covering the LiteLLM command-injection advisories.
# Avoid 1.82.7/1.82.8, which were affected by the March supply-chain incident.
inference-litellm = ["litellm==1.109.1"]
inference-gemma = ["pygemma>=0.1.3"]
tools-search = [
"tavily-python>=0.3",
"ddgs>=9.11.4",
]
memory-faiss = [
"faiss-cpu>=1.7",
"sentence-transformers>=2.2",
"numpy>=1.24",
]
memory-colbert = [
"colbert-ai>=0.2",
"torch>=2.0",
]
memory-pdf = ["pdfplumber>=0.10"]
memory-bm25 = ["rank-bm25>=0.2.2"]
server = [
"fastapi>=0.110",
"uvicorn>=0.30",
"pydantic>=2.0",
"python-multipart>=0.0.9",
]
desktop = [
"fastapi>=0.110",
"uvicorn>=0.30",
"pydantic>=2.0",
"python-multipart>=0.0.9",
"faster-whisper>=1.0",
# faster-whisper 1.2.1 passes metadata_errors to av.open(), which PyAV 19 removed (#1077).
"av>=11,<19",
# 1.24+ dropped macOS x86_64 wheels (arm64-only from 1.24.0 on), leaving
# Intel Macs with no installable wheel; 1.23.2 is the last universal one.
"onnxruntime<1.24; sys_platform == 'darwin' and platform_machine == 'x86_64'",
"numpy>=1.24",
"sounddevice>=0.5",
"soundfile>=0.12",
]
# Local neural TTS. Kokoro pulls spacy/misaki for G2P; espeak-ng must also be
# present on PATH (brew install espeak-ng) for out-of-dictionary words.
voice = [
"kokoro>=0.9",
"soundfile>=0.12",
"sounddevice>=0.5", # play_wav / record_until_silence in speech/voice_io.py
"numpy>=1.24",
]
openhands = ["openhands-sdk>=1.0; python_version >= '3.12'"]
# Apple Foundation Models (on-device AFM 3). Needs an Apple Silicon Mac on
# macOS 26+ with Apple Intelligence enabled. The SDK compiles Swift bindings
# at install time, so a full Xcode is required -- Command Line Tools alone
# fail:
# DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer \
# uv pip install -e '.[afm]'
# 0.2.1 is the floor: it added SystemLanguageModel.context_size and
# token_count, which the engine uses for token accounting.
afm = ["apple-fm-sdk>=0.2.1; sys_platform == 'darwin'"]
gpu-metrics = ["pynvml>=12.0"]
energy-amd = ["amdsmi>=6.1"]
# `zeus-ml[apple]` was the previous spelling and never worked: zeus-ml has no
# `apple` extra, and its `zeus.device.soc` package (which wraps this library)
# landed on master after the last zeus release, so no published zeus-ml
# contains it. Depend on the underlying IOReport extension directly.
energy-apple = ["zeus-apple-silicon>=1.1.0; sys_platform == 'darwin'"]
energy-all = [
"pynvml>=12.0",
"amdsmi>=6.1",
"zeus-apple-silicon>=1.1.0; sys_platform == 'darwin'",
]
orchestrator-training = ["torch>=2.0", "transformers>=4.40"]
learning-dspy = ["dspy>=3.5.0"]
learning-gepa = ["gepa>=0.1"]
channel-telegram = ["python-telegram-bot>=21.0"]
channel-discord = ["discord.py>=2.3"]
channel-slack = ["slack-sdk>=3.27"]
channel-line = ["line-bot-sdk>=3.0"]
channel-viber = ["viberbot>=1.0"]
channel-messenger = ["pymessenger>=0.0.7"]
channel-reddit = ["praw>=7.0"]
channel-mastodon = ["Mastodon.py>=1.8"]
channel-xmpp = ["slixmpp>=1.8"]
channel-rocketchat = ["rocketchat-API>=1.30"]
channel-zulip = ["zulip>=0.9"]
channel-twitter = ["httpx>=0.27"]
channel-twitch = ["twitchio>=2.6"]
channel-nostr = ["pynostr>=0.6"]
channel-twilio = ["twilio>=9.0"]
channel-gmail = [
"google-api-python-client>=2.0",
"google-auth-oauthlib>=1.0",
"google-auth-httplib2>=0.2",
]
browser = ["playwright>=1.40"]
media = ["openai>=1.30"]
mining-pearl-vllm = ["docker>=7.0", "httpx>=0.27"]
pdf = ["pdfplumber>=0.10"]
# Kept as a compatibility extra for existing install commands. Cron support is
# a core scheduler contract now, so croniter is also installed unconditionally.
scheduler = ["croniter>=2.0"]
security-signing = ["cryptography>=43"]
sandbox-wasm = ["wasmtime>=25"]
sandbox-docker = ["docker>=7.0"]
dashboard = ["textual>=0.80"]
speech = [
"faster-whisper>=1.0",
# faster-whisper 1.2.1 passes metadata_errors to av.open(), which PyAV 19 removed (#1077).
"av>=11,<19",
# Same Intel Mac floor as the desktop extra above.
"onnxruntime<1.24; sys_platform == 'darwin' and platform_machine == 'x86_64'",
"numpy>=1.24",
"sounddevice>=0.5",
"soundfile>=0.12",
]
speech-deepgram = ["deepgram-sdk>=3.0"]
eval-wandb = ["wandb>=0.17"]
eval-sheets = ["gspread>=6.0", "google-auth>=2.0"]
mining-pearl-cpu = [
# Pearl Python packages (py-pearl-mining, miner-base, pearl-gateway) are
# not on PyPI yet. They are installed at first `mine init` via the
# build-from-pin path in src/openjarvis/mining/_install.py:build_from_pin().
# When Pearl publishes wheels, replace the line below with version pins.
#
# The extra remains as a feature-flag namespace so users can run
# `uv sync --extra mining-pearl-cpu` to opt-in (it succeeds with no
# additional resolution today; the actual install happens on demand).
]
framework-comparison = ["polars>=1.0"]
docs = [
"mkdocs>=1.6",
"mkdocs-material>=9.5",
"mkdocstrings[python]>=0.25",
"mkdocs-gen-files>=0.5",
"mkdocs-literate-nav>=0.6",
]
[project.urls]
Homepage = "https://github.com/open-jarvis/OpenJarvis"
Documentation = "https://open-jarvis.github.io/OpenJarvis/"
Repository = "https://github.com/open-jarvis/OpenJarvis"
Issues = "https://github.com/open-jarvis/OpenJarvis/issues"
[project.scripts]
jarvis = "openjarvis.cli:main"
openjarvis-eval = "openjarvis.evals.cli:main"
# Version is derived from git tags by hatch-vcs (see #526). For source/editable
# checkouts this yields the true `git describe` version (e.g. 1.0.3.dev109+g<sha>)
# rather than a stale static string. CI release builds override this with
# SETUPTOOLS_SCM_PRETEND_VERSION so the published version equals the pushed tag.
#
# setuptools_scm cannot bump custom `.devN` tags (only `.dev0`), so the autotag
# `vX.Y.Z.devN` tags are deliberately EXCLUDED from version derivation here; the
# base is taken from the latest plain release tag (vX.Y.Z) and the dev distance
# is computed from commit count since that release.
[tool.hatch.version]
source = "vcs"
[tool.hatch.version.raw-options]
tag_regex = '^v(?P<version>[0-9]+\.[0-9]+\.[0-9]+)$'
git_describe_command = [
"git", "describe", "--dirty", "--tags", "--long",
"--match", "v[0-9]*", "--exclude", "*dev*", "--exclude", "*rc*", "--exclude", "desktop-*",
]
# Builds without a git checkout (e.g. the `COPY src/ src/` Docker stages, which
# never include .git) can't run `git describe`. Without a fallback that would
# hard-fail the build. Mirror the runtime sentinel in src/openjarvis/__init__.py.
# Such builds can inject the real version via SETUPTOOLS_SCM_PRETEND_VERSION.
fallback_version = "0.0.0+unknown"
[tool.uv.sources]
openjarvis-rust = { path = "rust/crates/openjarvis-python" }
[tool.hatch.build.targets.sdist]
# Tauri release bundles carry these executables; Python source distributions
# must not duplicate platform binaries on every PyPI release.
exclude = [
"/desktop/src-tauri/binaries",
"/frontend/src-tauri/binaries",
]
# The publishing workflow builds this UI before packaging. Keep its generated
# files even though the directory is intentionally ignored by Git.
artifacts = ["/src/openjarvis/server/static/**"]
[tool.hatch.build.targets.wheel]
packages = ["src/openjarvis"]
artifacts = ["/src/openjarvis/server/static/**"]
exclude = [
"/src/openjarvis/agents/claude_code_runner",
]
[tool.hatch.build.targets.wheel.force-include]
"src/openjarvis/agents/claude_code_runner/index.mjs" = "_node_modules/claude_code_runner/index.mjs"
"src/openjarvis/agents/claude_code_runner/package.json" = "_node_modules/claude_code_runner/package.json"
"src/openjarvis/channels/whatsapp_baileys_bridge" = "_node_modules/whatsapp_baileys_bridge"
"scripts/install" = "_install_scripts"
"deploy/windows" = "_deploy/windows"
# Starter presets for `jarvis init --preset` live outside the package in the
# source tree; bundle a copy so installed wheels can find them.
"configs/openjarvis/examples" = "openjarvis/presets"
[tool.pytest.ini_options]
testpaths = ["tests"]
markers = [
"amd: requires AMD GPU",
"apple: requires Apple Silicon",
"cloud: requires cloud API keys",
"docker: requires a working Docker daemon (no GPU required)",
"live: requires running inference engine",
"macos15: requires macOS 15+ (Sequoia) for Apple FM",
"live_channel: requires real channel credentials (env vars)",
"nvidia: requires NVIDIA GPU",
"slow: long-running test",
"hub: downloads real datasets from the HuggingFace Hub at runtime; excluded from the default CI lane (run with -m hub)",
"live_external: requires HERMES_AGENT_PATH and OPENCLAW_PATH; spawns real foreign-framework subprocesses",
"modal: requires Modal token + network; runs real swebench harness on Modal",
]
[tool.ruff]
target-version = "py310"
src = ["src", "tests"]
[tool.ruff.lint]
select = ["E", "F", "I", "W"]
[tool.ruff.lint.per-file-ignores]
"src/openjarvis/evals/datasets/*.py" = ["E501"]
"src/openjarvis/evals/scorers/*.py" = ["E501"]
# hybrid/ is research code with long prompt strings and paradigm-specific
# config dicts — same relaxation as evals research code above. The ``**`` glob
# also covers subpackages (e.g. hybrid/skillorchestra/), which the prior
# ``hybrid/*.py`` glob missed.
"src/openjarvis/agents/hybrid/**/*.py" = ["E501"]
# research_loop.py carries long prompt strings too (documented in CLAUDE.md);
# the ignore was missing here.
"src/openjarvis/agents/research_loop.py" = ["E501"]
[dependency-groups]
dev = [
"maturin>=1.12.6",
]
# openjarvis_rust is the native PyO3 extension, built from the local Rust
# workspace. It lives in a uv dependency group (PEP 735) — not the published
# `desktop` extra — so `uv sync --group desktop-native` builds it from source
# for the desktop app, while `pip install openjarvis[desktop]` from PyPI does
# NOT try to resolve openjarvis-rust from PyPI, where it isn't published
# (dependency groups are excluded from wheel metadata). See #584 / #615.
desktop-native = [
"openjarvis-rust",
]