-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathpyproject.toml
More file actions
350 lines (336 loc) · 11.7 KB
/
Copy pathpyproject.toml
File metadata and controls
350 lines (336 loc) · 11.7 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
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
[project]
name = "use-agent-os"
version = "2026.9.9"
description = "Local-first agentic trading AI agent with on-device Pilot Router"
license = "Apache-2.0"
license-files = ["LICENSE", "NOTICE", "THIRD_PARTY_NOTICES.md"]
readme = "README.md"
authors = [
{ name = "AgentOS contributors" },
]
classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
]
keywords = ["agent", "llm", "mcp", "gateway", "router", "chatbot"]
requires-python = ">=3.12"
# Dependency bounds policy (#153). `uv.lock` protects contributors and CI, but a
# downstream `pip install use-agent-os` resolves fresh against PyPI and picks up
# whatever each package last published — including a major released an hour ago.
# So every declared dependency carries an upper bound at the first version its
# upstream is free to break in, measured from the version uv.lock pins:
#
# >=1.0 projects cap at the next MAJOR (rich 14.3.3 -> <15.0)
# 0.x projects cap at the next MINOR (typer 0.24.1 -> <0.25)
#
# The 0.x row is the whole reason this is spelled out. Under semver a 0.x minor
# is the breaking unit, so `typer<1.0` would wave through every 0.x release
# upstream cares to make. There is no 0.x exemption: a package numbered below
# 1.0 gets a minor cap even where we only touch it indirectly.
#
# Exemptions are for >=1.0 packages only, because a blanket cap on all 36 has its
# own cost: it makes AgentOS harder to co-install with anything else.
#
# structlog, html2text — CalVer. A cap expires by the calendar, not by a break.
# brotli, jinja2, pyyaml, cachetools, tomli-w
# — the surface we call (`safe_load`, `Template.render`,
# a TTLCache, a `dumps`) has not moved in years.
#
# Raising a floor, adding a dependency, or taking an exemption means updating
# `tests/test_packaging/test_pyproject_invariants.py` and re-running `uv lock`.
# That test recomputes both boundaries from uv.lock, so a cap that drifts off
# this rule fails CI instead of sitting unnoticed.
# See CONTRIBUTING.md → "Dependency Bounds".
dependencies = [
"starlette>=0.40,<2.0",
"python-multipart>=0.0.20,<0.1",
"uvicorn[standard]>=0.30,<0.43",
"pydantic>=2.0,<3.0",
"pydantic-settings>=2.0,<3.0",
"sqlmodel>=0.0.20,<0.1.0",
"anyio>=4.0,<5.0",
"httpx>=0.27,<0.29",
"mcp>=1.2.0,<2.0",
"brotli>=1.1",
"jinja2>=3.1",
"structlog>=24.0",
"typer>=0.12,<0.25",
"rich>=13.0,<15.0",
"websockets>=13.0,<17.0",
"aiosqlite>=0.20,<0.23",
"apscheduler>=3.10,<4.0",
"pyyaml>=6.0",
"sqlite-vec>=0.1,<0.2",
"html2text>=2024.2",
"readability-lxml>=0.8,<0.9",
"beautifulsoup4>=4.12,<5.0",
"cachetools>=5.3",
"pdfplumber>=0.11,<0.12",
"pillow>=10.0,<13.0",
"croniter>=2.0,<7.0",
"tomli-w>=1.0",
"yoyo-migrations>=8.2,<10.0",
"prompt-toolkit>=3.0,<4.0",
"questionary>=2.0,<3.0",
"python-docx>=1.1.0,<2.0",
"python-pptx>=1.0.0,<2.0",
"openpyxl>=3.1.0,<4.0",
"pypdf>=4.0.0,<7.0",
"reportlab>=4.0.0,<5.0",
"python-telegram-bot>=20.0,<23.0",
]
[project.urls]
Homepage = "https://github.com/use-agent-os/agent-os"
Repository = "https://github.com/use-agent-os/agent-os"
Issues = "https://github.com/use-agent-os/agent-os/issues"
Changelog = "https://github.com/use-agent-os/agent-os/blob/main/CHANGELOG.md"
[project.optional-dependencies]
# Extras reach a `pip install use-agent-os[...]` exactly like the base list, so the
# bounds policy above applies here too. `dev` is the one exception: it is contributor
# tooling pinned by uv.lock, never a downstream consumer surface.
dev = [
"pytest>=8.0",
"pytest-asyncio>=0.24",
"mypy>=1.10",
"ruff>=0.5",
]
memory = [
"tiktoken>=0.5,<0.13",
"jieba>=0.42,<0.43",
]
recommended = [
"tiktoken>=0.5,<0.13",
"jieba>=0.42,<0.43",
"numpy>=1.26,<3.0",
"onnxruntime>=1.17,<2.0",
"tokenizers>=0.15,<0.23",
]
# Just the local ML router deps, for installs that want the Pilot router
# without the rest of `recommended`.
ml-router = [
"numpy>=1.26,<3.0",
"onnxruntime>=1.17,<2.0",
# Pilot router (strategy="pilot-v1") builds features with a MiniLM tokenizer
# via _MiniLMEncoder; all three of numpy/onnxruntime/tokenizers must ship
# together in the router extras (spec §4.4), else pilot-v1 degrades on an
# ml-router-only install.
"tokenizers>=0.15,<0.23",
]
# External memory provider (Plan B). Optional: the mem0 provider layer is
# never imported unless `memory.provider.name = "mem0"` is set. Floor `0.1.70`
# is a conservative pin (offline at authoring time) — reconfirm against PyPI
# and mem0's config-dict schema when bumping. Ollama LLM/embedder + embedded
# Qdrant vector store come in transitively via mem0ai's own extras.
mem0 = ["mem0ai>=0.1.70,<3.0"]
document-extras = [
"weasyprint>=60.0,<69.0",
]
[project.scripts]
agentos = "agentos.cli.main:app"
gateway = "agentos.cli.main:gateway_app"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/agentos"]
artifacts = [
"src/agentos/gateway/static/dist/**",
]
exclude = [
"src/agentos/scheduler/templates/*.md",
"src/agentos/skills/bundled/**/THIRD_PARTY_NOTICES.md",
"src/agentos/skills/bundled/**/references/*.md",
"src/agentos/skills/exp/**",
]
[tool.hatch.build.targets.wheel.force-include]
"migrations/" = "agentos/_migrations/"
"src/agentos/skills/bundled/pptx/references/pptxgenjs.md" = "agentos/skills/bundled/pptx/references/pptxgenjs.md"
"src/agentos/skills/bundled/pptx/references/python_pptx.md" = "agentos/skills/bundled/pptx/references/python_pptx.md"
[tool.hatch.build.targets.sdist]
artifacts = [
"src/agentos/gateway/static/dist/**",
]
include = [
"/.dockerignore",
"/.env.example",
"/.gitattributes",
"/.github/**",
"/.gitignore",
"/AGENTS.md",
"/CHANGELOG.md",
"/CLAUDE.md",
"/CODE_OF_CONDUCT.md",
"/CONTRIBUTING.md",
"/Dockerfile",
"/Formula/**",
"/LICENSE",
"/MIGRATION.md",
"/NOTICE",
"/README.md",
"/README.product.md",
"/README.release.md",
"/RELEASES.md",
"/SECURITY.md",
"/SUPPORT.md",
"/THIRD_PARTY_NOTICES.md",
"/agentos.toml.example",
"/assets/**",
"/compose.yaml",
"/docs/**",
"/frontend/**",
"/install.ps1",
"/install.sh",
"/migrations/**",
"/pyproject.toml",
"/scripts/**",
"/service-units/**",
"/skills-lock.json",
"/src/**",
"/start.ps1",
"/start.sh",
"/tests/**",
"/uv.lock",
]
exclude = [
"/.agentos/**",
"/.claude/**",
"/.codegraph/**",
"/.codex/**",
"/.mypy_cache/**",
"/.omc/**",
"/.omx/**",
"/.pytest_cache/**",
"/.ruff_cache/**",
"/.venv/**",
"/build/**",
"/dist/**",
"/frontend/coverage/**",
"/frontend/node_modules/**",
"/htmlcov/**",
"/node_modules/**",
"**/__pycache__/**",
"**/*.pyc",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
norecursedirs = ["tests/_private", "tests/fixtures", ".omx", ".codex", ".claude"]
markers = [
"llm: marks tests that make real external model/provider API calls (deselect with '-m \"not llm\"')",
"llm_smoke: low-cost live LLM smoke tests",
"llm_costly: slower or more expensive live model/provider tests",
"llm_tools: live model tests that exercise tool calling",
"llm_embedding: live embedding/vector-provider tests",
"llm_reasoning: live reasoning-capable model tests",
"llm_gateway: live gateway/end-to-end runtime tests",
"llm_image: live image-generation model API tests",
"llm_router_acc: live multi-model routing accuracy tests",
"agent_context_boundary: agent context budget and compaction boundary tests",
"local_golden: local opt-in synthetic complex-task golden tests",
"webui_browser: real browser Web UI tests driven by Playwright",
"browser_engine: live tests driving a real agent-browser Chromium (needs the binary; deselect with '-m \"not browser_engine\"')",
"live_channel: marks tests that hit a real channel platform (deselect with '-m \"not live_channel\"')",
"slow: slow benchmark/perf tests, opt-in (deselect with '-m \"not slow\"')",
]
[tool.ruff]
target-version = "py312"
line-length = 100
[tool.ruff.lint]
select = ["E", "F", "I", "N", "W", "UP"]
[tool.ruff.lint.per-file-ignores]
# Media subprocess scripts: long lines hold argv arrays, ffmpeg filter
# graphs, Chinese error strings, and OpenRouter payload field comments
# meant to stay readable as one unit.
"src/agentos/skills/bundled/ai-video-script/scripts/*.py" = ["E501"]
"src/agentos/skills/bundled/nano-banana-pro/scripts/*.py" = ["E501"]
"src/agentos/skills/bundled/seedance-2-prompt/scripts/*.py" = ["E501"]
"src/agentos/skills/bundled/srt-from-script/scripts/*.py" = ["E501"]
"src/agentos/skills/bundled/subtitle-burner/scripts/*.py" = ["E501"]
"src/agentos/skills/bundled/text-file-read/scripts/*.py" = ["E501"]
"src/agentos/skills/bundled/title-card-image/scripts/*.py" = ["E501"]
"src/agentos/skills/bundled/video-merger/scripts/*.py" = ["E501"]
# video-merger src/ is vendored from upstream MIT-0 clawhub package; keep
# its Chinese docstrings + ffmpeg argv lines unwrapped.
"src/agentos/skills/bundled/video-merger/src/*.py" = ["E501", "F401"]
# gmgn-holder-analysis ships GMGN's upstream MIT analyzer verbatim; reformatting
# it would fork the file away from https://github.com/GMGNAI/gmgn-skills for no
# runtime gain.
"src/agentos/skills/bundled/gmgn-holder-analysis/scripts/*.py" = [
"E401",
"E501",
"E701",
"E702",
"F541",
"I001",
]
# Same bargain for the two wallet analyzers vendored from the same upstream:
# gmgn-wallet-score keeps GMGN's one-line-per-branch style, gmgn-wallet-analysis
# keeps its own naming and long report strings.
"src/agentos/skills/bundled/gmgn-wallet-score/scripts/*.py" = [
"E401",
"E501",
"E701",
"I001",
]
"src/agentos/skills/bundled/gmgn-wallet-analysis/scripts/*.py" = [
"E501",
"F401",
"N802",
"N806",
"N818",
"UP034",
]
"src/agentos/skills/bundled/video-still-animator/scripts/*.py" = ["E501"]
[tool.mypy]
python_version = "3.12"
warn_return_any = true
warn_unused_configs = true
exclude = [
"^src/agentos/memory/models/",
# Bundled router model asset directories (no first-party Python).
"^src/agentos/agentos_router/models/",
"^src/agentos/skills/bundled/.*/scripts/",
# video-merger ships an upstream MIT-0 library under src/; same
# treatment as the per-skill scripts/ trees.
"^src/agentos/skills/bundled/video-merger/src/",
]
[[tool.mypy.overrides]]
module = [
"botbuilder.*",
"cachetools.*",
"jieba",
"numpy.*",
"onnxruntime.*",
"readability.*",
"tiktoken.*",
"tokenizers.*",
"websockets.*",
"yaml.*",
"yoyo.*",
]
ignore_missing_imports = true
[dependency-groups]
dev = [
"laboratory>=1.0.2",
"syrupy>=5.1.0",
]
# Pilot router export/training deps. Dev-time only — used by
# scripts/pilot_router/* to download and INT8-export the locked MiniLM
# backbone. Runtime inference deps (onnxruntime, numpy, tokenizers) stay in
# the `recommended`/`ml-router` extras; promoting them is a later task.
# Later Pilot tasks extend this group with labeling/training libraries.
pilot-train = [
"optimum[onnxruntime]>=1.20",
"torch>=2.2",
"transformers>=4.40",
"scikit-learn>=1.8,<1.9",
"skl2onnx>=1.17",
# T5 corpus sampler: HF streaming, MinHash near-dup dedupe, language
# detection (WildChat carries language metadata; langdetect is the cheap
# fallback only). OpenRouter filter calls use the base-dep httpx.
"datasets>=2.19",
"datasketch>=1.6",
"langdetect>=1.0.9",
]