-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
182 lines (172 loc) · 6.41 KB
/
Copy pathpyproject.toml
File metadata and controls
182 lines (172 loc) · 6.41 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
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[project]
name = "leanflow-agent"
version = "0.3.0"
description = "LeanFlow is a Lean AI for Math shell shipped through the standalone leanflow CLI and native runtime."
readme = "README.md"
requires-python = ">=3.11"
authors = [{ name = "LeanFlow contributors" }]
license = { text = "Apache-2.0" }
dependencies = [
"anthropic>=0.39.0",
"fire",
"httpx",
"jinja2",
"lean-probe>=0.3.0,<0.4",
"openai",
"prompt_toolkit",
"pydantic>=2.0",
"python-dotenv",
"pyyaml",
"requests",
"rich",
"ruamel.yaml>=0.18.10",
"tenacity",
]
[project.optional-dependencies]
dev = ["pytest", "pytest-asyncio", "pytest-xdist", "mcp>=1.2.0", "black>=24", "ruff>=0.6", "mypy>=1.11"]
mcp = ["mcp>=1.2.0"]
pty = [
"ptyprocess>=0.7.0; sys_platform != 'win32'",
"pywinpty>=2.0.0; sys_platform == 'win32'",
]
web = ["firecrawl-py"]
lean-explore = ["lean-explore[local]"]
local-vllm = ["vllm>=0.8.0"]
all = [
"leanflow-agent[dev]",
"leanflow-agent[mcp]",
"leanflow-agent[pty]",
"leanflow-agent[web]",
"leanflow-agent[lean-explore]",
]
[project.scripts]
leanflow = "leanflow_cli.main:main"
leanflow-agent = "leanflow_agent:main"
[tool.setuptools]
py-modules = [
"leanflow_agent",
"run_agent",
"model_tools",
"toolsets",
"utils",
]
[tool.setuptools.packages.find]
include = ["agent", "agent.*", "core", "core.*", "leanflow_cli", "leanflow_cli.*", "tools", "tools.*"]
[tool.pytest.ini_options]
testpaths = ["tests"]
markers = [
"integration: marks tests requiring external services (API keys, Modal, etc.)",
]
addopts = "-m 'not integration' -n auto"
[tool.ruff]
target-version = "py311"
line-length = 100
# Vendored / third-party trees we never lint or format (Lean toolchain caches, mathlib test
# fixtures, opt-in security skill scripts, both project venvs).
extend-exclude = [
"testdata",
"optional-skills",
"**/.lake/**",
".venv",
".leanflow-venv",
]
# Black is the code formatter (https://github.com/psf/black). Run `black .` before committing;
# CI runs `black --check .`. Ruff is used for linting + import-sorting only, not formatting.
[tool.black]
line-length = 100
target-version = ["py311"]
extend-exclude = '''/(testdata|optional-skills|\.venv|\.leanflow-venv|.*/\.lake)/'''
[tool.ruff.lint]
# select = the enforced rule families: pyflakes (F — undefined names, redefinitions, f-string
# misuse), import-sorting (I), and pyupgrade (UP — PEP585/604 modernization). Run `ruff check .`.
select = ["F", "I", "UP"]
# F401 (unused-import) is ENFORCED: genuinely-dead imports must be removed. The few deliberate
# re-exports / dynamic-access points that ruff cannot see (patch targets like run_agent.OpenAI and
# tools...terminal_tool._interrupt_event, the run_agent lazy-import surface, and the leaf-module
# re-export hubs pinned by the *_reexports_are_identical tests) each carry an explicit `# noqa: F401`.
# F841 (unused-variable): a handful of occurrences, not safely auto-fixable (may hide bugs).
# UP035/UP022/UP042: behavior-sensitive manual modernizations (StrEnum, subprocess capture_output).
ignore = ["F841", "UP035", "UP022", "UP042"]
[tool.mypy]
python_version = "3.11"
follow_imports = "silent"
ignore_missing_imports = true
# Incremental gate: ONLY these files are type-checked. The list grows each phase as
# modules are extracted/cleaned. mypy needs explicit targets — overrides alone do not select.
files = [
"core/constants.py",
"core/utils.py",
"agent/display/log_formatting.py",
"agent/runtime/workflow_events.py",
"agent/runtime/runtime_helpers.py",
"agent/providers/auxiliary_adapters.py",
"agent/providers/auxiliary_rcp.py",
"agent/providers/auxiliary_nous.py",
"agent/providers/model_capabilities.py",
"agent/execution/command_safety.py",
"agent/accounting/token_accounting.py",
"agent/execution/interrupt_controller.py",
"agent/display/output_manager.py",
"agent/prompting/prompt_manager.py",
"agent/providers/provider_client.py",
"agent/prompting/reasoning_processor.py",
"agent/prompting/response_normalizer.py",
"agent/providers/anthropic_messages.py",
"agent/execution/collaborator_resolvers.py",
"tools/response.py",
"tools/implementations/lean_experts.py",
"tools/implementations/lean_patch.py",
"agent/runtime/managed_run.py",
"leanflow_cli/native/native_config.py",
"leanflow_cli/native/native_lean_files.py",
"leanflow_cli/lean/lean_diagnostics.py",
"leanflow_cli/lean/lean_attempt_helpers.py",
"leanflow_cli/lean/lean_declarations.py",
"leanflow_cli/lean/lean_lemma_suggest.py",
"leanflow_cli/lean/lean_proof_context_local.py",
"leanflow_cli/lean/lean_backend.py",
"leanflow_cli/lean/lean_models.py",
"leanflow_cli/lean/lean_worker_dispatch.py",
"leanflow_cli/lean/lean_diagnostic_feedback.py",
"leanflow_cli/lean/lean_search_providers.py",
"leanflow_cli/lean/lean_automation.py",
"leanflow_cli/lean/lean_sorry_stats.py",
"leanflow_cli/lean/lean_parsing.py",
"leanflow_cli/lean/lean_module_paths.py",
"leanflow_cli/native/native_checkpoints.py",
"leanflow_cli/native/native_state.py",
"leanflow_cli/workflows/queue_edit_guard.py",
"leanflow_cli/workflows/queue_models.py",
"leanflow_cli/workflows/queue_item_predicates.py",
"leanflow_cli/formalization/formalization_document_runner.py",
"leanflow_cli/formalization/formalization_generated_lean.py",
"leanflow_cli/formalization/document_extraction.py",
"leanflow_cli/formalization/formalization_markdown.py",
"leanflow_cli/formalization/formalization_models.py",
"leanflow_cli/formalization/formalization_tex_discovery.py",
"leanflow_cli/workflows/manager_verification.py",
"leanflow_cli/native/native_utils.py",
"leanflow_cli/workflows/activity_preview.py",
"leanflow_cli/proof_state_builder.py",
"leanflow_cli/workflows/project_prove_manager.py",
"leanflow_cli/workflows/verification_review.py",
"leanflow_cli/cli/cli_handlers.py",
"leanflow_cli/cli/shell_ui.py",
"leanflow_cli/cli/loogle_local.py",
"tools/mcp/mcp_transport.py",
"tools/mcp/mcp_sampling.py",
"tools/mcp/mcp_config.py",
"agent/prompting/prompt_caching.py",
"agent/accounting/usage_pricing.py",
"agent/accounting/redact.py",
"leanflow_cli/runtime/branding.py",
"leanflow_cli/runtime/env_loader.py",
"leanflow_cli/lean/lean_workflow_specs.py",
"tools/utilities/interrupt.py",
"tools/utilities/debug_helpers.py",
"leanflow_cli/workflows/workflow_state_paths.py",
"leanflow_cli/workflows/workflow_json_io.py",
]