-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpyproject.toml
More file actions
228 lines (208 loc) · 6.79 KB
/
Copy pathpyproject.toml
File metadata and controls
228 lines (208 loc) · 6.79 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
[project]
name = "pythinker-code"
version = "0.57.0"
description = "Pythinker — an agentic CLI developed by Pythoughts-labs."
readme = "README.md"
requires-python = ">=3.12"
license = "Apache-2.0"
license-files = ["LICENSE", "NOTICE"]
authors = [{ name = "Pythoughts-labs", email = "hello@pythoughts.com" }]
keywords = ["cli", "agent", "ai", "coding-assistant", "llm", "claude", "openai", "terminal"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Software Development",
"Topic :: Software Development :: Code Generators",
"Topic :: Utilities",
]
dependencies = [
"agent-client-protocol==0.10.1",
"aiofiles>=24.0,<26.0",
"aiohttp==3.14.1",
"typer==0.26.7",
"pythinker-core[contrib]==1.2.0",
# notify-py (via batrachian-toad) caps loguru at <=0.6.0 on 3.14+.
"loguru>=0.6.0,<0.7",
"prompt-toolkit==3.0.52",
"pillow==12.2.0",
"pyyaml==6.0.3",
"rich==15.0.0",
"certifi>=2025.10.5",
"pyperclip==1.11.0",
# Pinned: click 8.4.x regresses pyright (`click.Option` typed partially
# unknown, ~95 errors in `make check`). Unpin once that type regression is
# fixed upstream. Mirrored as a Dependabot ignore in .github/dependabot.yml.
"click==8.3.0",
"streamingjson==0.0.5",
"trafilatura==2.0.0",
# lxml is used by trafilatura/htmldate/justext; keep pinned for binary wheels.
"lxml==6.1.1",
"tenacity==9.1.4",
"fastmcp==3.2.0",
"pydantic==2.13.4",
"httpx[socks]==0.28.1",
"pythinker-host==1.0.0",
"pythinker-review==0.1.0",
"batrachian-toad==0.5.23; python_version >= \"3.14\"",
"tomlkit==0.15.0",
"jinja2==3.1.6",
"pyobjc-framework-cocoa>=12.1 ; sys_platform == 'darwin'",
"fastapi>=0.115.0",
"uvicorn[standard]>=0.32.0",
"scalar-fastapi>=1.8.2",
"websockets>=14.0",
"keyring>=25.7.0",
"setproctitle>=1.3.0",
# Telemetry: Sentry-protocol error reporting (Bugsink) + OTLP traces/logs/metrics (SigNoz).
# Both default to pythinker-operated endpoints; opt out with PYTHINKER_DISABLE_TELEMETRY=1.
"sentry-sdk>=2.20,<3",
"opentelemetry-api>=1.30,<2",
"opentelemetry-sdk>=1.30,<2",
"opentelemetry-exporter-otlp-proto-http>=1.30,<2",
]
[dependency-groups]
dev = [
"pyinstaller==6.18.0",
"inline-snapshot[black]>=0.31.1",
"pyright>=1.1.409",
"ty>=0.0.9",
"pytest>=9.0.3",
"pytest-asyncio>=1.3.0",
"pytest-cov>=6.0",
# Pure-Python VT100/xterm emulator: PTY UI tests feed raw terminal bytes to
# a virtual screen so they can assert on the *rendered* frame (catching
# incomplete-erase "ghost" rows), not just the byte stream.
"pyte>=0.8.2",
# Pinned: ruff 0.15's formatter reflow fails `make check`. Unpin once the
# formatting churn is resolved. Mirrored as a Dependabot ignore in
# .github/dependabot.yml.
"ruff>=0.14.10,<0.15",
]
[build-system]
requires = ["uv_build>=0.8.5,<0.12.0"]
build-backend = "uv_build"
[tool.uv.build-backend]
module-name = ["pythinker_code"]
source-exclude = ["examples/**/*", "tests/**/*", "src/pythinker_code/deps/**/*"]
[tool.uv.workspace]
members = [
"packages/pythinker-core",
"packages/pythinker-host",
"packages/pythinker-review",
"sdks/pythinker-sdk",
]
[tool.uv.sources]
pythinker-core = { workspace = true }
pythinker-host = { workspace = true }
pythinker-review = { workspace = true }
pythinker-code = { workspace = true }
[project.scripts]
pythinker = "pythinker_code.__main__:main"
pythinker-code = "pythinker_code.__main__:main"
[project.urls]
Homepage = "https://github.com/Pythoughts-labs/pythinker-code"
Repository = "https://github.com/Pythoughts-labs/pythinker-code"
Issues = "https://github.com/Pythoughts-labs/pythinker-code/issues"
Changelog = "https://github.com/Pythoughts-labs/pythinker-code/blob/main/CHANGELOG.md"
Documentation = "https://github.com/Pythoughts-labs/pythinker-code#readme"
[tool.ruff]
line-length = 100
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # Pyflakes
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
"I", # isort
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["E501"]
"tests_e2e/**/*.py" = ["E501"]
"src/pythinker_code/web/api/**/*.py" = ["B008"] # FastAPI Depends() is standard usage
[tool.pyright]
typeCheckingMode = "standard"
pythonVersion = "3.14"
include = [
"src/**/*.py",
"tests/**/*.py",
"tests_ai/scripts/**/*.py",
"tests_e2e/**/*.py",
]
strict = ["src/pythinker_code/**/*.py"]
[tool.ty.environment]
python-version = "3.14"
[tool.ty.src]
include = [
"src/**/*.py",
"tests/**/*.py",
"tests_ai/scripts/**/*.py",
"tests_e2e/**/*.py",
]
# ty is still advisory in this workspace. Keep it quiet until the project opts
# into fixing/enforcing its diagnostics separately from the pyright gate.
[tool.ty.rules]
call-non-callable = "ignore"
invalid-argument-type = "ignore"
invalid-assignment = "ignore"
invalid-await = "ignore"
invalid-return-type = "ignore"
possibly-missing-submodule = "ignore"
redundant-cast = "ignore"
unresolved-attribute = "ignore"
[tool.typos.files]
extend-exclude = ["pythinker.spec", "pyinstaller.py"]
[tool.typos.default]
# Git commit SHAs cited in planning docs (e.g. e067caf5, 6daa6b7c) trip the
# dictionary on hex substrings ("caf"->"calf", "daa"->"data"). Ignore any bare
# hex token so future SHA references don't each need their own allowlist entry.
extend-ignore-re = [
'\b[0-9a-f]{7,40}\b',
# The `mis-` prefix in "mis-scoped" / "mis-cited"; the bare `mis` token is
# otherwise flagged as miss/mist.
'\bmis-[a-z]+\b',
]
[tool.typos.default.extend-words]
datas = "datas"
Seeked = "Seeked"
seeked = "seeked"
iterm = "iterm"
# Verbatim pyright CLI output ("0 informations") quoted in docs.
informations = "informations"
# Project/domain-specific names and generated IDs.
reviewr = "reviewr"
fnd = "fnd"
edn = "edn"
Encrypter = "Encrypter"
# Hex session IDs (e.g. 06ba6c38) contain "ba".
ba = "ba"
uest = "uest"
# Verb stems in the unfinished-intent detection regex (soul/pythinkersoul.py)
# match word prefixes ("prepar" → prepare/preparing); kept as bare stems on
# purpose so they cover every inflection.
prepar = "prepar"
generat = "generat"
provid = "provid"
updat = "updat"
examin = "examin"
continu = "continu"
[tool.coverage.run]
source_pkgs = ["pythinker_code"]
branch = true
relative_files = true
[tool.coverage.report]
show_missing = true
skip_empty = true
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"raise NotImplementedError",
"@(abc\\.)?abstractmethod",
"\\.\\.\\.",
]