-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathpyproject.toml
More file actions
207 lines (196 loc) · 7.67 KB
/
Copy pathpyproject.toml
File metadata and controls
207 lines (196 loc) · 7.67 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
[project]
name = "agentixx"
version = "0.2.7"
description = "The universal bridge between agents and environments (import as `agentix`)"
readme = "README.md"
requires-python = ">=3.11"
license = { text = "MIT" }
authors = [{ name = "Agentix maintainers" }]
urls = { Homepage = "https://github.com/Agentix-Project/Agentix" }
dependencies = [
"fastapi>=0.115",
"uvicorn[standard]>=0.30",
"pydantic>=2.0",
"python-multipart>=0.0.9",
"httpx>=0.27",
# Streams, bidi, and log subscription share one Socket.IO connection.
# The same package is both client and server.
"python-socketio[asyncio-client]>=5.11",
# Wire codec — msgpack for all RPC frames + Socket.IO event payloads.
# Cross-language, no base64 overhead, native bytes, extension types
# for ndarray + pydantic models.
"msgpack>=1.0",
# Dev-side CLI (`agentix build`). Click owns argument parsing and
# per-subcommand `--help`; the CLI modules stay free of routing
# boilerplate. Already a transitive dep of uvicorn[standard], so the
# explicit pin only documents intent.
"click>=8.1",
]
[project.optional-dependencies]
dev = [
"pytest>=8",
"pytest-asyncio>=0.23",
"pytest-cov>=7.1",
"ruff>=0.6",
"pyright>=1.1.380",
]
[project.scripts]
# Dev-side CLI: `agentix build`.
# Subcommands live in `agentix.cli`. The CLI is intentionally thin —
# most logic is in the submodules so they can also be imported directly.
agentix = "agentix.cli:main"
# Runtime entry point is NOT a console_script: bundles are booted by
# `/nix/runtime/bootstrap.sh` (shipped from `agentix/builder/bootstrap.sh`).
# Some task images (e.g. swebench) inject their own Python-related env;
# bootstrap.sh scrubs `sys.path` inside an inline `python -c` *before*
# importing uvicorn / agentix, so the bundle venv isn't shadowed.
# SandboxProvider backends, agents, datasets, and runtime integrations ship
# in their own wheels. Runtime integrations are normal Python dependencies
# installed into the bundle.
# pip install agentix-provider-docker # registers `docker` and `podman`
# pip install agentix-provider-daytona # registers `daytona`
# pip install agentix-provider-e2b # registers `e2b`
# pip install agentix-agent-claude-code # provides `agentix.agents.claude_code`
# pip install agentix-agent-mini-swe-agent # provides `agentix.agents.mini_swe_agent`
# pip install agentix-dataset-swe # provides `agentix.plugins.datasets.swe`
# pip install agentix-runtime-basic # registers `bash`, `files`
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["agentix"]
# `agentix build` ships its in-container builder assets (Dockerfile,
# bundle-build.sh, flake.nix, flake.lock) under `agentix/builder/`;
# hatchling includes non-.py files in packages automatically.
# ── monorepo workspace ────────────────────────────────────────────
# The core (`agentixx`, this file) plus the plugins under `plugins/`
# form one uv workspace. `uv sync` installs every member editable into
# one venv — edit any file and it's live, no commit/push/publish.
#
# Dependency ownership is still explicit: each member keeps its own
# `pyproject.toml` + dependency list, so plugin deps stay attached to
# the plugin that needs them.
#
# `examples/*` are deliberately NOT members. Each example is a standalone
# project that path-depends on the workspace (editable), so it still
# sees core edits live without a release step.
[tool.uv.workspace]
members = [
"plugins/abridge",
"plugins/runner",
"plugins/runtime-basic",
"plugins/tito",
"plugins/trace-otel",
"plugins/agents/*",
"plugins/datasets/*",
"plugins/providers/*",
]
# `examples/*` are standalone projects, not members — each has its own
# lock and path-depends on the workspace. Excluding them lets `uv lock`
# run inside an example without uv claiming it as a stray member.
exclude = ["examples/*"]
[tool.ruff]
line-length = 120
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "I", "W", "UP"]
[tool.pyright]
# Strict mode is the goal; raise this gradually. Today's basic mode
# catches the obvious mistakes without drowning in advisory diagnostics.
#
# Scope: shipped library code only — the core (`agentix`) and the
# plugin packages. Tests and cookbook examples are intentionally
# NOT type-checked; they take liberties (loose `pickle.loads`, deep
# `None`-narrowing) that aren't worth fighting pyright over.
include = [
"agentix",
"plugins/abridge/agentix",
"plugins/runner/src",
"plugins/agents/claude-code/src",
"plugins/agents/mini-swe-agent/src",
"plugins/agents/qwen-code/src",
"plugins/datasets/swebench/src",
"plugins/providers/apptainer/agentix",
"plugins/providers/cape/agentix",
"plugins/providers/docker/agentix",
"plugins/providers/daytona/agentix",
"plugins/providers/e2b/agentix",
"plugins/providers/uv/agentix",
"plugins/runtime-basic/agentix",
"plugins/tito/agentix",
"plugins/trace-otel/agentix",
]
exclude = ["**/__pycache__", "**/.venv", ".venv", "**/build"]
# `agentix` is a pkgutil namespace package — the core lives here, the
# plugins contribute siblings: `agentix/bridge/` from `plugins/abridge/`,
# `agentix/provider/<backend>.py` from each `plugins/providers/*`,
# `agentix/agents/*`, `agentix/plugins/datasets/*`, and `agentix/{bash,files}/`
# from `plugins/runtime-basic/`. `extraPaths` lets pyright resolve those
# statically (it doesn't run `pkgutil.extend_path`).
extraPaths = [
"plugins/abridge",
"plugins/runner/src",
"plugins/agents/claude-code/src",
"plugins/agents/mini-swe-agent/src",
"plugins/agents/qwen-code/src",
"plugins/datasets/swebench/src",
"plugins/providers/apptainer",
"plugins/providers/cape",
"plugins/providers/docker",
"plugins/providers/daytona",
"plugins/providers/e2b",
"plugins/providers/uv",
"plugins/runtime-basic",
"plugins/tito",
"plugins/trace-otel",
]
typeCheckingMode = "basic"
# venv lives on local disk (the repo is on a slow FUSE mount); `.venv`
# is a symlink to it. pyright follows the symlink for third-party stubs.
venvPath = "."
venv = ".venv"
reportMissingImports = "error"
reportUndefinedVariable = "error"
reportGeneralTypeIssues = "warning"
[tool.pytest.ini_options]
asyncio_mode = "auto"
pythonpath = ["."]
python_files = ["test_*.py"]
# `e2e` tests build a real bundle image (need docker, take minutes).
# `addopts` excludes them by default — the `e2e` CI job runs them with
# `-m e2e`, which overrides this.
markers = [
"e2e: builds a real bundle image — needs docker, slow",
"network: downloads a real tokenizer from the Hugging Face Hub — skips cleanly offline",
]
# Coverage runs against `agentix` and the plugin packages; the
# subprocess worker (`agentix/runtime/server/worker/process.py`) is
# tracked separately because it executes in a child process and the
# main pytest run cannot instrument it.
addopts = [
"-m",
"not e2e",
"--cov=agentix",
"--cov-report=term-missing",
]
[tool.coverage.run]
branch = true
parallel = true
# The subprocess worker boots into its own Python interpreter; without
# explicit subprocess support coverage shows it as 0% even though the
# subprocess tests do exercise it. Tracking it as a separate run keeps
# the main report honest.
omit = [
"agentix/runtime/server/worker/process.py",
"agentix/runtime/server/worker/__main__.py",
"agentix/cli/__main__.py",
]
[tool.coverage.report]
show_missing = true
skip_empty = true
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]