-
-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathpyproject.toml
More file actions
506 lines (474 loc) · 13 KB
/
pyproject.toml
File metadata and controls
506 lines (474 loc) · 13 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
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
#:tombi schema.strict = false
[project]
name = "agentpool"
version = "2.9.18"
description = "Pydantic-AI based Multi-Agent Framework with YAML-based Agents, Teams, Workflows & Extended ACP / AGUI integration"
readme = "README.md"
requires-python = ">=3.13"
license = "MIT"
license-files = ["LICENSE"]
authors = [
{ name = "Philipp Temminghoff", email = "philipptemminghoff@googlemail.com" },
]
keywords = []
classifiers = [
"Development Status :: 4 - Beta",
"Framework :: Pydantic",
"Framework :: Pydantic :: 2",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Documentation",
"Topic :: Internet",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development",
"Topic :: Utilities",
"Typing :: Typed",
]
dependencies = [
"alembic>=1.16.5",
"anyenv[httpx]>=0.3.0",
"bashkit>=0.1.11",
"clawd-code-sdk>=0.1.36",
# "clawd-code-sdk@git+https://github.com/phil65/claude-agent-sdk-python.git@efbaa798",
"codexed>=0.0.1",
"docler>=1.0.3",
"docstring-parser>=0.17.0",
"epregistry",
"evented>=1.0.5",
"exxec>=0.1.0",
"fastapi",
"fastmcp>=2.12.4",
"fsspec",
"httpx",
"jinja2",
"jinjarope",
"keyring>=25.6.0",
"llmling-models>=1.4.1",
"logfire[fastapi]",
"mcp>=1.2.0",
"pillow>=11.3.0",
"platformdirs",
"promptantic>=0.4.5",
"psygnal>=0.11.1",
"py-key-value-aio[disk]",
"pydantic>=2.10.0",
"pydantic-ai-slim[openai,google,anthropic,mistral,retries]>=1.0.0",
# Only add below (Copier)
"pydantic-monty>=0.0.11",
"pydocket>=0.16.1",
"python-dotenv>=1.0.1",
"rich",
"ripgrep-rs>=0.3.0", # Supports free-threaded Python 3.13+ (Linux only for now)
"schemez[codegen]",
# "schemez @ file:///home/phil65/dev/oss/schemez",
"searchly[all]>=2.0.1",
"slashed>=0.1.0",
"sqlalchemy[aiosqlite]",
"sqlmodel>=0.0.22",
"structlog>=25.5.0",
"sublime-search>=0.3.1",
"tokonomics>=0.1.2",
"toprompt>=0.0.1",
"typer",
"upathtools[httpx]>=0.1.0",
"uvicorn[standard]",
"watchfiles>=1.1.1",
"websockets>=15.0",
"yamling>=2.0.2",
]
[project.urls]
"Code coverage" = "https://app.codecov.io/gh/phil65/agentpool"
Discussions = "https://github.com/phil65/agentpool/discussions"
Documentation = "https://phil65.github.io/agentpool/"
Issues = "https://github.com/phil65/agentpool/issues"
Source = "https://github.com/phil65/agentpool"
[project.scripts]
acp-bridge = "acp.bridge.__main__:main"
agentpool = "agentpool_cli.__main__:cli"
agentpool-db = "agentpool_storage.sql_provider.cli:main"
[project.entry-points."fsspec.specs"]
acp = "acp.filesystem:ACPFileSystem"
[project.entry-points."jinjarope.environment"]
agentpool = "agentpool.utils:setup_env"
[project.entry-points."universal_pathlib.implementations"]
acp = "acp.filesystem:ACPPath"
[project.optional-dependencies]
a2a = ["fasta2a", "starlette"] # A2A Server
ag-ui = ["ag-ui-protocol>=0.1.10"] # Ag-UI Agents
bot = [
"python-telegram-bot[socks]>=21.0",
"slack-sdk>=3.26.0",
"slackify-markdown>=0.2.0",
"croniter>=2.0.0",
] # Chat channel integrations (Telegram, Slack, Discord, etc.)
braintrust = ["braintrust", "autoevals"] # Braintrust Prompt Hub
clipboard = ["copykitten"] # Clipboard functionality
coding = [
"rustworkx>=0.17.1",
"grep-ast",
"tree-sitter-language-pack==1.6.2",
"ast-grep-py>=0.40.0",
"tree-sitter>=0.25.2",
"tree-sitter-python>=0.25.0",
"tree-sitter-c>=0.24.1",
"tree-sitter-javascript>=0.25.0",
"tree-sitter>=0.25.2",
"tree-sitter-typescript>=0.23.0",
"tree-sitter-cpp>=0.23.0",
"tree-sitter-rust>=0.23.0",
"tree-sitter-go>=0.23.0",
"tree-sitter-json>=0.24.0",
"tree-sitter-yaml>=0.6.0",
] # Packages to allow coding functionality
composio = ["composio"] # Composio toolsets
events = ["evented[all]"] # Event triggers for agents
# git = ["fsspec[git]"] # Git support (disabled: cffi doesn't support free-threaded 3.13)
langfuse = ["langfuse"] # Langfuse Prompt Hub
markitdown = [
"markitdown; python_version < '3.14'"
] # MarkItDown Media Converter
mcp-discovery = [
"fastembed>=0.7.4; python_version < '3.14'",
"lancedb==0.30.0; python_version < '3.14'",
"pyarrow>=19.0.0; python_version < '3.14'",
] # MCP Discovery Toolset with semantic search
mcp_run = ["mcpx-py>=0.7.0"] # MCP.run Toolset
notifications = ["apprise>=1.9.5"] # Notification Toolset
promptlayer = ["promptlayer"] # PromptLayer Prompt Hub
tiktoken = ["tiktoken"] # Exact token counting
tts = [
"anyvoice[tts-edge,openai]>=0.0.2"
] # Text-to-Speech using AnyVoice (disabled: cffi doesn't support free-threaded 3.13)
zed = ["zstandard>=0.23.0"] # Zed IDE storage provider
[dependency-groups]
dev = [
"check-jsonschema>=0.35.0",
"devtools",
"fastembed>=0.7.4; python_version < '3.14'",
"lancedb==0.30.0; python_version < '3.14'",
"openapi_spec_validator",
"pyinstaller>=6.17.0",
"pyreadline3",
"pytest",
# Only add below (Copier)
"pytest-asyncio>=0.24.0",
"pytest-cov",
# "pytest-pretty>=1.3.0",
"pytest-rerunfailures>=16.1",
"pytest-timeout>=2.4.0",
"pytest-xdist",
"syrupy>=4.0.0",
"ty>=0.0.23",
]
benchmark = ["pyinstrument"]
docs = [
"beautifulsoup4>=4.14.3",
"json-schema-for-humans>=1.0.0",
"mkdocs-material",
"mknodes",
# Only add below (Copier)
]
lint = [
"mypy[faster-cache]",
"ruff",
"types-PyYAML",
"types-Pygments",
"types-croniter",
"types-jsonschema>=4.25.1.20251009",
# Only add below (Copier)
]
[build-system]
requires = ["uv_build>=0.8.22"]
build-backend = "uv_build"
[tool.coverage.run]
source = ["src"]
branch = true
parallel = true
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"@overload",
"except ImportError",
'if __name__ == "__main__":',
]
show_missing = true
skip_covered = true
[tool.logfire]
ignore_no_config = true
[tool.mknodes]
allowed-commit-types = [
"fix",
"feat",
"refactor",
"docs",
"test",
"build",
"chore",
]
docstring-style = "google"
[tool.mypy]
python_version = "3.13"
pretty = true
strict = true
check_untyped_defs = true
exclude = ["venv/", ".venv/"]
plugins = ["pydantic.mypy"]
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
# warn_unreachable = true
strict_equality = true
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false
disallow_untyped_calls = false
disallow_incomplete_defs = false
disable_error_code = [
"no-untyped-def",
"no-untyped-call",
"no-any-return",
"unused-ignore"
]
[[tool.mypy.overrides]]
module = ["fsspec.*"]
ignore_missing_imports = true
[tool.pytest]
addopts = ["-m", "not slow and not acp_snapshot"]
filterwarnings = [
"ignore::DeprecationWarning:psygnal.*",
"ignore::DeprecationWarning:pydantic.*:",
"ignore::DeprecationWarning:typer.*",
]
log_cli = true
log_date_format = "%Y-%m-%d %H:%M:%S"
log_format = "%(asctime)s %(levelname)s %(message)s"
log_level = "ERROR"
markers = [
"acp_snapshot: marks tests as ACP snapshot tests (excluded by default)",
"asyncio: mark test as async",
"integration: marks tests as integration tests",
"slow: marks tests as slow",
"unit: marks tests as unit tests",
]
minversion = "9.0"
python_files = ["test_*.py"]
pythonpath = ["src"]
testpaths = ["tests"]
timeout = "180"
asyncio_default_fixture_loop_scope = "function"
asyncio_mode = "auto"
[tool.ruff]
line-length = 100
extend-exclude = ["docs"]
target-version = "py313"
[tool.ruff.lint]
future-annotations = true
select = [
"A", # Flake8-builtins
# "ANN", # Flake8-Annotations
# "ASYNC", # Flake8-Async
# "ARG", # # Flake8-Unused-Arguments
"B", # flake8-bugbear
"BLE", # Flake8-blind-except
"C",
"C4", # flake8-comprehensions
# "C90", # MCCabe
"COM", # Flake8-commas
# "CPY", # Copyright-related rules
"D", # PyDocStyle
# "DTZ", # Flake8- Datetimez
"E", # PyCodeStyle Error
"EM", # flake8-errmsg
# "ERA", # Eradicate
"EXE", # flake8-executable
"F", # PyFlakes
"FA", # flake8-future-annotations
# "FBT", # flake8-boolean-trap
# "FIX", # flake8-fixme
"FLY", # flynt
"G", # flake8-logging-format
"I", # ISort
"ICN", # Flake8-import-conventions
"INP", # flake8-no-pep420
"INT", # flake8-gettext
"ISC", # flake8-implicit-str-concat
"N", # pep8-naming
# "NPY", # numpy-specific rules
# "PD", # pandas-vet
"PERF", # perflint
# "PGH", # pygrep-hooks
"PIE", # flake8-pie
"PLE", # PyLint Error
"PLC", # PyLint convention
"PLW", # PyLint Warning
"PLR", # PyLint refactor
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"PYI", # flake8-pyi
"Q", # flake8-quotes
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # ruff-specific rules
# "S", # flake8-bandit
"SIM", # flake8-simplify
"SLF", # flake8-self
"SLOT", # flake8-slots
# "T",
# "TD", # flake8-todos
"T10", # flake8-debugger
# "T20", # flake8-print
"TC", # flake8-type-checking
"TID", # flake8-tidy-imports
"TRY", # tryceratops
"UP", # PyUpgrade
"W", # PyCodeStyle warning
"YTT", # flake8-2020
]
ignore = [
"C408", # Unnecessary {obj_type} call (rewrite as a literal)
"C901", # {name} is too complex ({complexity} > {max_complexity})
"COM812",
# "CPY001", # Missing copyright notice at top of file
"D100", # Missing docstring in public module
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D105", # Missing docstring in magic method
"D107", # Missing docstring in __init__
"D203", # 1 blank line required before class docstring
"D204", # 1 blank line required after class docstring
"D213", # Multi-line docstring summary should start at the second line
"D401", # First line of docstring should be in imperative mood: "{first_line}"
"D408", # Section underline should be in the line following the section's name ("{name}")
"D413", # Missing blank line after last section ("{name}")
"EM101", # Exception must not use a string literal, assign to variable first
"EM102", # Exception must not use an f-string literal, assign to variable first
"ISC001",
"PLC0415",
"PLR0912", # Too many branches
"PLR0913", # Too many arguments to function call
# "PLR2004", # Magic values instead of named consts
"SLF001", # Private member accessed
"TRY003", # Avoid specifying long messages outside the exception class
"TC006", # runtime-cast-value
]
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
[tool.ruff.lint.flake8-type-checking]
runtime-evaluated-base-classes = [
"pydantic.BaseModel",
"sqlalchemy.orm.DeclarativeBase",
"schemez.Schema",
"acp.base.Schema",
"sqlmodel.SQLModel",
]
runtime-evaluated-decorators = [
"pydantic.validate_call",
"fastapi.FastAPI.get",
"fastapi.FastAPI.post",
"fastapi.APIRouter.get",
"fastapi.APIRouter.post",
"fastapi.APIRouter.put",
"fastapi.APIRouter.delete",
"fastapi.APIRouter.patch",
"fastmcp.FastMCP.tool",
"typer.Typer.command",
]
[tool.ruff.lint.isort]
lines-after-imports = 2
# lines-between-types = 1
# atomic = true
force-sort-within-sections = true
combine-as-imports = true
[tool.ruff.lint.mccabe]
max-complexity = 15
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402", "I001"]
"scripts/*" = ["INP001"]
"*tests/*" = ["D100", "PLR2004"]
"docs/examples/**/*.py" = [
"TC001",
] # Examples don't need TYPE_CHECKING imports
[tool.ruff.format]
preview = true
[tool.ty]
[tool.ty.src]
exclude = []
[tool.ty.environment]
python-version = "3.13"
python-platform = "all"
[tool.ty.rules]
unused-type-ignore-comment = "ignore"
invalid-type-form = "ignore"
not-subscriptable = "ignore"
possibly-missing-import = "warn"
division-by-zero = "warn"
[tool.uv]
default-groups = ["dev", "lint", "docs"]
constraint-dependencies = ["extism-sys<1.13.0"]
# exclude-newer = "1 day"
# [tool.uv.exclude-newer-package] # exclude self-maintained
# codexed = "0 days"
# clawd-code-sdk = "0 days"
# docler = "0 days"
# epregistry = "0 days"
# anyenv = "0 days"
# exxec = "0 days"
# mknodes = "0 days"
# tokonomics = "0 days"
# toprompt = "0 days"
# yamling = "0 days"
# sublime-search = "0 days"
# ripgrep-rs = "0 days"
# slashed = "0 days"
# searchly = "0 days"
# schemez = "0 days"
# upathtools = "0 days"
# promptantic = "0 days"
# llmling-models = "0 days"
# jinjarope = "0 days"
# evented = "0 days"
[tool.uv.build-backend]
module-name = [
"agentpool",
"agentpool_config",
"agentpool_cli",
"agentpool_commands",
"agentpool_storage",
"agentpool_prompts",
"agentpool_server",
"agentpool_toolsets",
"acp",
"opencode_sdk",
"pi_sdk",
]
wheel-exclude = [
".mypy_cache/**",
"__pycache__/**",
"*.pyc",
"*.pyo",
".pytest_cache/**",
".ruff_cache/**",
]
source-exclude = [
".mypy_cache/**",
"__pycache__/**",
"*.pyc",
"*.pyo",
".pytest_cache/**",
".ruff_cache/**",
]
# [tool.uv.sources]
# exxec = { path = "../exxec", editable = true }
# schemez = { path = "../schemez", editable = true }