-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
248 lines (239 loc) · 12.5 KB
/
Copy pathpyproject.toml
File metadata and controls
248 lines (239 loc) · 12.5 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "agent-assembly"
version = "0.0.1rc6"
description = "Python SDK for AI Agent Assembly - A governance-native runtime for AI agents"
authors = [{ name = "Agent Assembly Team", email = "team@agent-assembly.dev" }]
requires-python = ">=3.12,<4.0"
readme = "README.md"
license = { file = "LICENSE" }
keywords = ["ai-agent", "governance", "mcp", "assembly", "runtime", "policy"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"License :: OSI Approved :: MIT License",
# AAASM-4648: this package ships platform-specific native (Rust-extension)
# wheels for macOS and Linux only — no Windows wheel is built. The prior
# "Operating System :: OS Independent" classifier was false and led Windows
# users to a from-source build that requires a Rust/maturin toolchain. List
# the OSes we actually publish wheels for instead.
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
dependencies = [
# AAASM-4518: floor held at the true minimum 2.0 — the SDK only uses
# BaseModel/Field/model_dump, all stable since pydantic 2.0. AAASM-4434 raised
# this to >=2.13.4 by pinning the floor to the then-resolved version, which made
# agent-assembly un-co-installable with CrewAI (caps pydantic<2.13) and Semantic
# Kernel (caps <2.12) — a framework-compat regression vs rc.3. Keep the floor at
# what the code needs, not what the lockfile happened to resolve to.
"pydantic>=2.0.0,<3.0.0",
"httpx>=0.27.0,<1.0.0",
"typing-extensions>=4.16.0",
# AAASM-1654 (PR-E): OpControlSubscriber consumes PolicyService.OpControlStream
# via gRPC. AAASM-4518: floor restored to rc.3's >=1.66. AAASM-4434 raised it to
# >=1.82.1 to mirror the then-resolved version — an over-tighten, not a real
# minimum required by the SDK.
"grpcio>=1.66,<2",
# AAASM-4518: floor restored to rc.3's >=5 so agent-assembly can co-install with
# AutoGen (autogen-core>=0.7.5 caps protobuf<5.30). AAASM-4434 raised this to
# >=6.33.6 by pinning the floor to the then-resolved version, which made rc.4
# unresolvable with AutoGen — a framework-compat regression vs rc.3.
#
# CAVEAT (pre-existing, NOT introduced by this change): the checked-in gRPC stubs
# under agent_assembly/proto/ are protobuf gencode 6.31.1 and require a protobuf
# 6.x RUNTIME (>=6.31.1) to import — protobuf 5.x raises a VersionError. Those
# stubs are imported only by the optional OpControl gRPC transport
# (agent_assembly/op_control.py), never at package-import time, so mainstream
# framework quick-starts (which don't use that transport) run fine under protobuf
# 5.x — exactly as they did on rc.3, which also shipped 6.31.1 gencode under a
# >=5 floor since 2026-05-21. A user who needs the OpControl gRPC path must have
# protobuf>=6.31.1. Regenerating the stubs at 5.x gencode to make protobuf 5.x
# fully runtime-safe is a separate concern, not this compat fix.
#
# dev/test note: a bare `uv lock` still resolves protobuf to 6.33.6 because the
# dev-only pydantic-ai logfire extra caps protobuf<7.0 (via opentelemetry-proto);
# that transitive dev-time ceiling is independent of this runtime floor.
"protobuf>=5,<8",
]
[project.optional-dependencies]
# Triggers the platform wheel that bundles the aasm sidecar binary at
# agent_assembly/bin/aasm. Empty list — selection is purely by the
# platform-tagged wheel that maturin produces, not by extra deps.
runtime = []
# Catch-all alias for users who want the full SDK + runtime install.
all = ["agent-assembly[runtime]"]
[project.scripts]
aasm = "agent_assembly.cli.main:main"
[project.urls]
Homepage = "https://github.com/ai-agent-assembly/python-sdk"
Repository = "https://github.com/ai-agent-assembly/python-sdk"
[dependency-groups]
dev = [
"coverage~=7.15",
"python-dotenv>=1.0.1,<2",
# AAASM-1654 (PR-E): grpcio-tools provides protoc + Python plugin used by
# scripts/gen_proto.py to regenerate agent_assembly/proto/*_pb2*.py from
# the sibling agent-assembly/proto/ checkout.
# AAASM-4434 (dependency completeness re-audit): resolves to 1.81.1, not raw
# PyPI latest (1.82.1). Not a stale-resolution bug — grpcio-tools 1.82.1
# requires protobuf>=7.35.1, which conflicts with the protobuf<7.0 ceiling
# forced transitively by pydantic-ai's logfire extra (see the protobuf
# comment under [project].dependencies for the full evidence chain).
# Re-audit alongside protobuf once that transitive ceiling lifts.
"grpcio-tools>=1.81.1,<2",
{ include-group = "lint" },
{ include-group = "test" },
]
lint = [
"ruff>=0.15.21",
"mypy>=2.2.0,<3",
]
test = [
"pytest>=9.1.1,<10",
"pytest-cov>=7.1.0,<8",
"pytest-rerunfailures>=16.4,<17",
"pytest-asyncio>=1.4.0,<2",
"pytest-benchmark>=5.2.3,<6",
# AAASM-2943: dev/test-only (NOT a runtime dependency). Installing the
# framework lets the `importorskip`-guarded Pydantic AI integration tests
# run in CI (the `dev` group includes `test`, and the integration-test job
# installs `dev`), so the function-tool governance regression is actually
# exercised instead of skipped.
# AAASM-4434: floor raised 0.3.0 -> 2.0.0 — with an unbounded floor, `uv lock
# --upgrade` resolved pydantic-ai down to 0.7.2 rather than latest, because an
# unconstrained solve found a cheaper-to-satisfy graph at that older version.
# Raising the floor forces resolution to latest stable, which is verified
# compatible (protobuf still resolves within our >=5,<8 range, just at
# 6.33.6 instead of 7.x).
# AAASM-4434 (manifest transparency follow-up): floor tightened again to the
# exact resolved version (2.9.0) so the manifest doesn't understate what's
# actually locked.
"pydantic-ai>=2.9.0",
# AAASM-3528: dev/test-only (NOT a runtime dependency). The shipped OpenAI
# Agents framework is the top-level `agents` package (NOT `openai.agents`),
# and a tool runs via its per-instance `on_invoke_tool` coroutine (NOT a
# `FunctionTool.__call__`). Installing it lets the `importorskip`-guarded
# integration test drive a real tool call, so a regression to the old
# fail-open no-op patch is actually caught instead of silently skipped.
# AAASM-4434 (manifest transparency follow-up): floor tightened from the
# wide-open 0.1.0 to the exact resolved version (0.18.2) so the manifest
# doesn't understate what's actually locked.
"openai-agents>=0.18.2",
# AAASM-3539: dev/test-only (NOT a runtime dependency). smolagents routes
# every tool execution through `smolagents.tools.Tool.__call__` (which calls
# `self.forward`); installing it lets the `importorskip`-guarded adapter
# tests drive a real `Tool` subclass, so a regression to a fail-open no-op
# patch is caught (deny must block `forward`) instead of silently skipped.
# AAASM-4434 (manifest transparency follow-up): floor tightened from the
# wide-open 1.0.0 to the exact resolved version (1.26.0) so the manifest
# doesn't understate what's actually locked. Upper bound <2.0.0 unchanged.
"smolagents>=1.26.0,<2.0.0",
# AAASM-3537: dev/test-only (NOT a runtime dependency). Agno (formerly
# Phidata) runs every function-tool body through
# `agno.tools.function.FunctionCall.execute` / `aexecute`. Installing it lets
# the `importorskip`-guarded integration test drive a real `FunctionCall`, so
# the negative-control deny test fails if the patch ever regresses to a no-op
# instead of being silently skipped.
# AAASM-4434 (manifest transparency follow-up): floor tightened from the
# wide-open 2.0.0 to the exact resolved version (2.7.2) so the manifest
# doesn't understate what's actually locked.
"agno>=2.7.2",
# AAASM-3536: dev/test-only (NOT a runtime dependency). LlamaIndex routes
# tool execution through the concrete `FunctionTool.call` / `acall` methods;
# installing it lets the `importorskip`-guarded governance tests drive a
# real `FunctionTool` so a regression to a fail-open no-op patch is caught
# rather than silently skipped.
# AAASM-4169: llama-index-core pulls `nltk` transitively, and nltk <=3.9.4
# carries a URL-encoded path-traversal in `nltk.data.load()` (Dependabot #27,
# HIGH). Accepted-risk, NOT runtime-exploitable: nltk is dev/test-only (never
# in `[project].dependencies` nor the published wheel), is never imported by
# `agent_assembly/`, and the vulnerable `nltk.data.load` path is never invoked
# by the SDK or its tests. No upstream fix exists (3.9.4 is the latest release;
# `first_patched_version: none`), so no lock upgrade removes it. Tracked in
# AAASM-4169; Dependabot #27 recommended for dismissal as dev/test-only.
# AAASM-4434 (manifest transparency follow-up): floor tightened from the
# wide-open 0.10.0 to the exact resolved version (0.14.23) so the manifest
# doesn't understate what's actually locked.
"llama-index-core>=0.14.23",
# AAASM-4434: dev/test-only (NOT a runtime dependency). The LangGraph adapter
# (agent_assembly/adapters/langgraph/) never hard-imports langgraph — it
# reflectively loads `langgraph.graph.state.StateGraph` via importlib and
# structurally duck-types compiled-graph node maps and ToolNode so it degrades
# gracefully when the framework isn't installed. That resilience previously
# meant the patch was never exercised against a *real* langgraph install.
# Pinning latest stable here lets the `importorskip`-guarded real-package test
# (test/integration/test_langgraph_real_package_smoke.py) actually compile and
# invoke a real StateGraph, proving the reflection-based patch still matches
# LangGraph 1.x's current API surface instead of only mocked SimpleNamespaces.
"langgraph>=1.2.9,<2",
]
pre-commit-ci = [
"pre-commit>=4.6.0,<5",
"pylint>=4.0.6,<5",
{ include-group = "lint" },
]
# AAASM-4034: dev/test-only (NOT a runtime dependency) and DELIBERATELY excluded
# from `default-groups`. The default suite must stay langchain-free so the
# existing callback-delegation tests keep exercising the empty
# `_FallbackBaseCallbackHandler` fallback. Installing `langchain-core` swaps the
# real `langchain_core.callbacks.BaseCallbackHandler` in as the base of
# `AssemblyCallbackHandler`, which lets the `importorskip`-guarded contract test
# prove the AAASM-4014 `__getattr__` never shadows or synthesizes a real
# LangChain callback-contract member. Run it with:
# uv sync --group langchain-test
# .venv/bin/python -m pytest test/unit/adapters/langchain/test_getattr_contract_with_langchain.py
langchain-test = [
{ include-group = "test" },
"langchain-core>=1.4.9,<1.6.0",
]
docs = [
"mkdocs>=1.6.0,<2",
"mkdocs-material>=9.5.0,<10",
"mkdocstrings>=1.0.5,<2",
"mkdocstrings-python>=2.0.5,<3",
"mike>=2.1.0,<3",
"mkdocs-autorefs>=1.4.4,<2",
"mkdocs-git-revision-date-localized-plugin>=1.5.3,<2",
"mkdocs-git-authors-plugin>=0.9.0,<1",
# AAASM-4308: shared metadata macros for docs pages. Docs-only — MUST NOT
# be added to `[project].dependencies` (runtime install stays lean).
# AAASM-4434 (manifest transparency follow-up): floor tightened from the
# wide-open 1 to the exact resolved version (1.5.0) so the manifest
# doesn't understate what's actually locked.
"mkdocs-macros-plugin>=1.5.0,<2",
]
[tool.uv]
default-groups = [
"dev",
"pre-commit-ci",
]
[tool.maturin]
manifest-path = "native/aa-ffi-python/Cargo.toml"
module-name = "agent_assembly._core"
python-source = "."
bindings = "pyo3"
features = ["pyo3/extension-module"]
# aasm sidecar binary is placed at agent_assembly/bin/aasm by the release
# workflow before `maturin build`; runtime.py's find_aasm_binary() resolves
# WHEEL_BUNDLED_BIN to that same path at import time.
include = [
{ path = "agent_assembly/bin/aasm", format = "wheel" },
{ path = "agent_assembly/bin/aasm.exe", format = "wheel" },
]
[tool.hatch.build.targets.sdist]
include = ["agent_assembly/"]
packages = ["agent_assembly"]
#artifacts = ["agent_assembly/py.typed"]
[tool.hatch.build.targets.wheel]
include = ["agent_assembly/"]
packages = ["agent_assembly"]
#artifacts = ["agent_assembly/py.typed"]