-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
176 lines (161 loc) · 6.49 KB
/
Copy pathpyproject.toml
File metadata and controls
176 lines (161 loc) · 6.49 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "agent-observability-trace-cli"
version = "0.1.9"
description = "AI agent observability with deterministic record/replay — capture any LangGraph or OpenAI Agents SDK run, replay it offline at zero API cost."
readme = "README.md"
license = {text = "Apache-2.0"}
requires-python = ">=3.10"
authors = [
{name = "Rudrendu Paul"},
{name = "Sourav Nandy"},
]
keywords = ["agents", "observability", "tracing", "llm", "langgraph", "openai", "replay", "debugging"]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Debuggers",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
dependencies = [
"httpx>=0.27",
"rich>=13.0",
]
[project.optional-dependencies]
autogen = ["autogen-agentchat>=0.4", "autogen-ext[openai]>=0.4"]
langgraph = ["langgraph>=1.0.10", "langchain-core>=0.3"]
langchain = ["langchain-core>=0.3"]
mcp = ["mcp>=1.28.1"]
openai-agents = ["openai-agents>=0.0.3"]
crewai = ["crewai>=1.0.0"]
llama-index = ["llama-index-core>=0.14"]
pydantic-ai = ["pydantic-ai>=2.0"]
haystack = ["haystack-ai>=3.0.0"]
agno = ["agno>=2.7"]
google-genai = ["google-genai>=2.0", "langchain-google-genai>=4.0"]
otlp = ["opentelemetry-exporter-otlp-proto-grpc>=1.25"]
requests = ["requests>=2.31"]
groq = ["groq>=0.9"]
grpc = ["grpcio>=1.60"]
aiohttp = ["aiohttp>=3.14.3"]
botocore = ["boto3>=1.34"]
realtime = ["websockets>=13.0"]
dev = [
"pytest>=8.0",
"pytest-benchmark[histogram]>=4.0",
"pytest-cov>=5.0",
"pytest-asyncio>=0.23",
"pytest-env>=1.0",
"mypy>=1.10",
"ruff>=0.5",
"pre-commit>=3.7",
"requests>=2.31",
"types-requests>=2.31",
"respx>=0.21", # httpx mocking for unit tests
"groq>=0.9", # verifies the httpx interceptor against the real Groq SDK
"grpcio>=1.60", # gRPC interceptor unit tests
"grpcio-tools>=1.60", # protoc, to compile the test-only echo.proto fixture
"aiohttp>=3.14.3",
"aioresponses>=0.7", # aiohttp mocking for unit tests
"boto3>=1.34", # AWS SDK — botocore interceptor unit tests
"websockets>=13.0", # WebSocket interceptor unit tests
"mcp>=1.28.1", # MCP stdio-transport interceptor unit tests
"langchain-core>=0.3", # generic LangChain callback integration unit tests
"langchain-classic>=1.0", # classic Chain/BaseMemory integration tests (#6761)
]
[project.urls]
Homepage = "https://github.com/RudrenduPaul/agent-observability"
Documentation = "https://github.com/RudrenduPaul/agent-observability/blob/main/docs/getting-started.md"
Repository = "https://github.com/RudrenduPaul/agent-observability"
"Bug Tracker" = "https://github.com/RudrenduPaul/agent-observability/issues"
Changelog = "https://github.com/RudrenduPaul/agent-observability/blob/main/CHANGELOG.md"
"Author - Rudrendu Paul" = "https://github.com/RudrenduPaul"
"Author - Sourav Nandy" = "https://github.com/Sourav-nandy-ai"
[project.scripts]
agent-trace = "agent_trace._cli:main"
[tool.hatch.build.targets.wheel]
packages = ["src/agent_trace"]
[tool.ruff]
target-version = "py310"
line-length = 88
src = ["src"]
[tool.ruff.lint]
select = ["E", "F", "B", "I", "N", "UP", "S", "PL", "RUF", "ANN"]
ignore = [
"S101", # assert is fine in tests
"ANN401", # Any is sometimes unavoidable in interop code
"PLR0913", # too many arguments — integration callbacks have many
"PLR2004", # magic values are fine in tests/benchmarks
"PLC0415", # lazy imports inside functions are intentional for optional deps
"B010", # setattr with constant name is intentional to bypass mypy method-assign checks
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S", "PLR2004", "ANN", "F841", "E741", "B017", "B905", "RUF059", "E402", "E501"]
"benchmarks/*" = ["S", "PLR2004", "ANN", "N806"]
"examples/*" = ["S", "ANN"]
# Generated by the gRPC Python protocol compiler plugin (DO NOT EDIT) — method
# names mirror the .proto RPC definitions verbatim and must stay PascalCase to
# match the actual wire contract, so N802 doesn't apply.
"tests/unit/grpc_fixtures/echo_pb2_grpc.py" = ["N802"]
[tool.mypy]
strict = true
python_version = "3.10"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_any_generics = true
no_implicit_optional = true
mypy_path = "src"
[[tool.mypy.overrides]]
module = ["langchain_core.*", "opentelemetry.*", "agents.*", "boto3.*", "google", "google.cloud.*", "crewai.*", "llama_index.*", "pydantic.*", "pydantic_ai.*", "haystack.*", "grpc.*", "google.protobuf.*", "botocore.*", "mcp.*", "anyio.*", "google.genai.*", "langgraph.*", "agno.*"]
ignore_missing_imports = true
[[tool.mypy.overrides]]
# AgentTraceHook subclasses agents.lifecycle.RunHooksBase (required at
# runtime -- Runner.run() does an isinstance() check). Whether that import
# resolves to a real class or to Any (via ignore_missing_imports above)
# depends on whether the openai-agents extra is installed in the mypy run;
# the `# type: ignore[misc]` this needs in the "not installed" case reports
# as unused in the "installed" case. Disable that specific warning for just
# this module rather than for the whole codebase.
module = ["agent_trace.integrations.openai_agents"]
warn_unused_ignores = false
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
markers = [
"integration: marks tests as integration tests (require real APIs — deselect with -m 'not integration')",
"slow: marks tests as slow-running",
]
addopts = "--strict-markers"
env = [
"AGENT_TRACE_NETWORK_GUARD=1",
]
[tool.coverage.run]
source = ["src/agent_trace"]
omit = [
"*/integrations/*", # covered by integration tests
"*/_cli.py", # CLI entry point, tested separately via subprocess
"*/exporters/otlp.py", # requires optional opentelemetry package
]
[tool.coverage.report]
fail_under = 80
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"raise NotImplementedError",
"\\.\\.\\.",
]
[tool.uv]
# crewai (crewai extra) pins json-repair~=0.25.2, which is GHSA-xf7x-x43h-rpqh
# (unbounded CPU DoS via circular $ref). Force the patched release instead.
override-dependencies = ["json-repair>=0.60.1"]