pyt3client 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024, Philipp Temminghoff
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
@@ -0,0 +1,178 @@
1
+ Metadata-Version: 2.4
2
+ Name: pyt3client
3
+ Version: 0.1.0
4
+ Summary: Thin, typed Python client for T3 Code environments (via their MCP endpoint)
5
+ Keywords: t3code,mcp,agents,orchestration
6
+ Author: Philipp Temminghoff
7
+ Author-email: Philipp Temminghoff <philipptemminghoff@googlemail.com>
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Framework :: Pydantic
12
+ Classifier: Framework :: Pydantic :: 2
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3 :: Only
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Topic :: Documentation
21
+ Classifier: Topic :: Software Development
22
+ Classifier: Topic :: Utilities
23
+ Classifier: Typing :: Typed
24
+ Requires-Dist: pydantic>=2.11
25
+ Requires-Dist: httpx>=0.27
26
+ Requires-Dist: typer>=0.12 ; extra == 'cli'
27
+ Requires-Python: >=3.13
28
+ Project-URL: Code coverage, https://app.codecov.io/gh/phil65/pyt3client
29
+ Project-URL: Discussions, https://github.com/phil65/pyt3client/discussions
30
+ Project-URL: Documentation, https://phil65.github.io/pyt3client/
31
+ Project-URL: Issues, https://github.com/phil65/pyt3client/issues
32
+ Project-URL: Source, https://github.com/phil65/pyt3client
33
+ Provides-Extra: cli
34
+ Description-Content-Type: text/markdown
35
+
36
+ # pyt3client
37
+
38
+ [![PyPI License](https://img.shields.io/pypi/l/pyt3client.svg)](https://pypi.org/project/pyt3client/)
39
+ [![Package status](https://img.shields.io/pypi/status/pyt3client.svg)](https://pypi.org/project/pyt3client/)
40
+ [![Monthly downloads](https://img.shields.io/pypi/dm/pyt3client.svg)](https://pypi.org/project/pyt3client/)
41
+ [![Distribution format](https://img.shields.io/pypi/format/pyt3client.svg)](https://pypi.org/project/pyt3client/)
42
+ [![Wheel availability](https://img.shields.io/pypi/wheel/pyt3client.svg)](https://pypi.org/project/pyt3client/)
43
+ [![Python version](https://img.shields.io/pypi/pyversions/pyt3client.svg)](https://pypi.org/project/pyt3client/)
44
+ [![Implementation](https://img.shields.io/pypi/implementation/pyt3client.svg)](https://pypi.org/project/pyt3client/)
45
+ [![Releases](https://img.shields.io/github/downloads/phil65/pyt3client/total.svg)](https://github.com/phil65/pyt3client/releases)
46
+ [![Github Contributors](https://img.shields.io/github/contributors/phil65/pyt3client)](https://github.com/phil65/pyt3client/graphs/contributors)
47
+ [![Github Discussions](https://img.shields.io/github/discussions/phil65/pyt3client)](https://github.com/phil65/pyt3client/discussions)
48
+ [![Github Forks](https://img.shields.io/github/forks/phil65/pyt3client)](https://github.com/phil65/pyt3client/forks)
49
+ [![Github Issues](https://img.shields.io/github/issues/phil65/pyt3client)](https://github.com/phil65/pyt3client/issues)
50
+ [![Github Issues](https://img.shields.io/github/issues-pr/phil65/pyt3client)](https://github.com/phil65/pyt3client/pulls)
51
+ [![Github Watchers](https://img.shields.io/github/watchers/phil65/pyt3client)](https://github.com/phil65/pyt3client/watchers)
52
+ [![Github Stars](https://img.shields.io/github/stars/phil65/pyt3client)](https://github.com/phil65/pyt3client/stars)
53
+ [![Github Repository size](https://img.shields.io/github/repo-size/phil65/pyt3client)](https://github.com/phil65/pyt3client)
54
+ [![Github last commit](https://img.shields.io/github/last-commit/phil65/pyt3client)](https://github.com/phil65/pyt3client/commits)
55
+ [![Github release date](https://img.shields.io/github/release-date/phil65/pyt3client)](https://github.com/phil65/pyt3client/releases)
56
+ [![Github language count](https://img.shields.io/github/languages/count/phil65/pyt3client)](https://github.com/phil65/pyt3client)
57
+ [![Github commits this month](https://img.shields.io/github/commit-activity/m/phil65/pyt3client)](https://github.com/phil65/pyt3client)
58
+ [![Package status](https://codecov.io/gh/phil65/pyt3client/branch/main/graph/badge.svg)](https://codecov.io/gh/phil65/pyt3client/)
59
+ [![PyUp](https://pyup.io/repos/github/phil65/pyt3client/shield.svg)](https://pyup.io/repos/github/phil65/pyt3client/)
60
+
61
+ [Read the documentation!](https://phil65.github.io/pyt3client/)
62
+
63
+ Thin, typed Python client for [T3 Code](https://github.com/pingdotgg/t3code)
64
+ environments. It drives T3 Code's threads, projects and agents from Python through
65
+ the environment's MCP endpoint (`/mcp`), the interface T3 Code offers outside agents.
66
+
67
+ - **Headless sign-in.** `pair()` turns a one-time pairing code into a 30-day token,
68
+ without a browser.
69
+ - **Fully typed.** Every one of the server's ~50 tools has generated Pydantic input
70
+ and output models, taken from the JSON Schemas a real server advertises.
71
+ - **Small.** It depends only on `httpx` and `pydantic`.
72
+
73
+ ## Quickstart
74
+
75
+ On the machine running T3 Code, create a pairing code:
76
+
77
+ ```bash
78
+ t3 auth pairing create # or in the app: Settings -> Sharing & access
79
+ ```
80
+
81
+ ```python
82
+ import asyncio
83
+
84
+ from pyt3client import T3Client, pair
85
+ from pyt3client.models.tools import (
86
+ ORCHESTRATOR_CAPABILITIES,
87
+ THREAD_LAUNCH,
88
+ THREAD_READ,
89
+ ModelSelection,
90
+ ThreadLaunchInput,
91
+ ThreadReadInput,
92
+ )
93
+
94
+
95
+ async def main() -> None:
96
+ # One time: spend the pairing code. Persist `credentials` (it is a pydantic model).
97
+ credentials = await pair("http://127.0.0.1:3773", "PAIRING-CODE", access="auto")
98
+
99
+ async with T3Client.from_credentials(credentials) as t3:
100
+ caps = await t3.call(ORCHESTRATOR_CAPABILITIES)
101
+ provider = caps.providers[0]
102
+ launched = await t3.call(
103
+ THREAD_LAUNCH,
104
+ ThreadLaunchInput(
105
+ project_id="<project id>",
106
+ title="Find slow tests",
107
+ message="Find why the test suite is slow.",
108
+ model_selection=ModelSelection(
109
+ instance_id=provider.provider_instance_id, model=provider.models[0].id
110
+ ),
111
+ ),
112
+ )
113
+ done = await t3.wait_for_thread(launched.thread_id, run_id=launched.run_id)
114
+ transcript = await t3.call(THREAD_READ, ThreadReadInput(thread_id=launched.thread_id))
115
+ print(done.status, [item.text for item in transcript.items])
116
+
117
+
118
+ asyncio.run(main())
119
+ ```
120
+
121
+ Refusals raise `T3ToolError` with the server's code (for example `thread_not_found`
122
+ or `capability_denied`). For a tool newer than the bundled models, use
123
+ `t3.call_raw(name, arguments)`.
124
+
125
+ ## Command line: `pyt3`
126
+
127
+ T3 Code's own `t3` CLI only works on the machine running the server. `pyt3`
128
+ signs in once and then drives any environment it can reach, such as a homelab
129
+ box over Tailscale or a VPS over T3 Connect.
130
+
131
+ ```bash
132
+ pip install "pyt3client[cli]"
133
+
134
+ pyt3 login https://box.tailnet.ts.net:3773 PAIRING-CODE --name box
135
+ pyt3 models # providers, models, options
136
+ pyt3 start /srv/app "Find why the tests are slow" \
137
+ --provider claudeAgent --model claude-haiku-5-5 --wait
138
+ pyt3 threads # or --search, --status, --project
139
+ echo "Now fix it" | pyt3 send <thread-id> - --wait
140
+ pyt3 show <thread-id> # state + latest messages
141
+ pyt3 pending <thread-id> # questions the agent waits on
142
+ pyt3 answer <thread-id> <request-id> color=red
143
+ pyt3 interrupt <thread-id>
144
+ ```
145
+
146
+ `start` takes a project id or any folder inside a project. Relative paths resolve
147
+ against your shell, which only makes sense when the server runs on this machine.
148
+ Every command takes `--json`. With several saved environments, pick one with
149
+ `--env <alias>` or `PYT3_ENV`.
150
+
151
+ `start`, `send --wait` and `wait` exit like upstream `t3 thread --wait`:
152
+ 0 when the run completed, 1 when it failed (or on any error), 2 when the agent
153
+ waits for an answer or approval, and 3 when `--timeout` ran out.
154
+
155
+ Tokens are saved in `$XDG_CONFIG_HOME/pyt3client/credentials.json` (mode 0600).
156
+ `pyt3 envs` lists them without the tokens. `pyt3 logout` forgets one; revoke it in
157
+ T3 Code under Settings -> Sharing & access.
158
+
159
+ ## Access levels
160
+
161
+ `pair(..., access=...)` picks what the client may do. A thread the client starts
162
+ or steers can never run above this level. To narrow it further for one client, pass
163
+ `T3Client(..., mode_limit=("approval-required", "plan"))`.
164
+
165
+ | Level | Can |
166
+ |---|---|
167
+ | `read-only` | read projects, threads, providers, models |
168
+ | `approval-required` … `auto` | also start, message, wait for and stop threads |
169
+ | `full-access` | also create, update and delete projects |
170
+
171
+ Use `https`, `localhost` or Tailscale HTTPS addresses. Over plain `http` on a LAN,
172
+ the pairing code and token travel unencrypted.
173
+
174
+ ## Development
175
+
176
+ See [CLAUDE.md](CLAUDE.md) for the upstream map: where each protocol detail lives
177
+ in the t3code repository, how the models are generated, and how to test against an
178
+ isolated server.
@@ -0,0 +1,143 @@
1
+ # pyt3client
2
+
3
+ [![PyPI License](https://img.shields.io/pypi/l/pyt3client.svg)](https://pypi.org/project/pyt3client/)
4
+ [![Package status](https://img.shields.io/pypi/status/pyt3client.svg)](https://pypi.org/project/pyt3client/)
5
+ [![Monthly downloads](https://img.shields.io/pypi/dm/pyt3client.svg)](https://pypi.org/project/pyt3client/)
6
+ [![Distribution format](https://img.shields.io/pypi/format/pyt3client.svg)](https://pypi.org/project/pyt3client/)
7
+ [![Wheel availability](https://img.shields.io/pypi/wheel/pyt3client.svg)](https://pypi.org/project/pyt3client/)
8
+ [![Python version](https://img.shields.io/pypi/pyversions/pyt3client.svg)](https://pypi.org/project/pyt3client/)
9
+ [![Implementation](https://img.shields.io/pypi/implementation/pyt3client.svg)](https://pypi.org/project/pyt3client/)
10
+ [![Releases](https://img.shields.io/github/downloads/phil65/pyt3client/total.svg)](https://github.com/phil65/pyt3client/releases)
11
+ [![Github Contributors](https://img.shields.io/github/contributors/phil65/pyt3client)](https://github.com/phil65/pyt3client/graphs/contributors)
12
+ [![Github Discussions](https://img.shields.io/github/discussions/phil65/pyt3client)](https://github.com/phil65/pyt3client/discussions)
13
+ [![Github Forks](https://img.shields.io/github/forks/phil65/pyt3client)](https://github.com/phil65/pyt3client/forks)
14
+ [![Github Issues](https://img.shields.io/github/issues/phil65/pyt3client)](https://github.com/phil65/pyt3client/issues)
15
+ [![Github Issues](https://img.shields.io/github/issues-pr/phil65/pyt3client)](https://github.com/phil65/pyt3client/pulls)
16
+ [![Github Watchers](https://img.shields.io/github/watchers/phil65/pyt3client)](https://github.com/phil65/pyt3client/watchers)
17
+ [![Github Stars](https://img.shields.io/github/stars/phil65/pyt3client)](https://github.com/phil65/pyt3client/stars)
18
+ [![Github Repository size](https://img.shields.io/github/repo-size/phil65/pyt3client)](https://github.com/phil65/pyt3client)
19
+ [![Github last commit](https://img.shields.io/github/last-commit/phil65/pyt3client)](https://github.com/phil65/pyt3client/commits)
20
+ [![Github release date](https://img.shields.io/github/release-date/phil65/pyt3client)](https://github.com/phil65/pyt3client/releases)
21
+ [![Github language count](https://img.shields.io/github/languages/count/phil65/pyt3client)](https://github.com/phil65/pyt3client)
22
+ [![Github commits this month](https://img.shields.io/github/commit-activity/m/phil65/pyt3client)](https://github.com/phil65/pyt3client)
23
+ [![Package status](https://codecov.io/gh/phil65/pyt3client/branch/main/graph/badge.svg)](https://codecov.io/gh/phil65/pyt3client/)
24
+ [![PyUp](https://pyup.io/repos/github/phil65/pyt3client/shield.svg)](https://pyup.io/repos/github/phil65/pyt3client/)
25
+
26
+ [Read the documentation!](https://phil65.github.io/pyt3client/)
27
+
28
+ Thin, typed Python client for [T3 Code](https://github.com/pingdotgg/t3code)
29
+ environments. It drives T3 Code's threads, projects and agents from Python through
30
+ the environment's MCP endpoint (`/mcp`), the interface T3 Code offers outside agents.
31
+
32
+ - **Headless sign-in.** `pair()` turns a one-time pairing code into a 30-day token,
33
+ without a browser.
34
+ - **Fully typed.** Every one of the server's ~50 tools has generated Pydantic input
35
+ and output models, taken from the JSON Schemas a real server advertises.
36
+ - **Small.** It depends only on `httpx` and `pydantic`.
37
+
38
+ ## Quickstart
39
+
40
+ On the machine running T3 Code, create a pairing code:
41
+
42
+ ```bash
43
+ t3 auth pairing create # or in the app: Settings -> Sharing & access
44
+ ```
45
+
46
+ ```python
47
+ import asyncio
48
+
49
+ from pyt3client import T3Client, pair
50
+ from pyt3client.models.tools import (
51
+ ORCHESTRATOR_CAPABILITIES,
52
+ THREAD_LAUNCH,
53
+ THREAD_READ,
54
+ ModelSelection,
55
+ ThreadLaunchInput,
56
+ ThreadReadInput,
57
+ )
58
+
59
+
60
+ async def main() -> None:
61
+ # One time: spend the pairing code. Persist `credentials` (it is a pydantic model).
62
+ credentials = await pair("http://127.0.0.1:3773", "PAIRING-CODE", access="auto")
63
+
64
+ async with T3Client.from_credentials(credentials) as t3:
65
+ caps = await t3.call(ORCHESTRATOR_CAPABILITIES)
66
+ provider = caps.providers[0]
67
+ launched = await t3.call(
68
+ THREAD_LAUNCH,
69
+ ThreadLaunchInput(
70
+ project_id="<project id>",
71
+ title="Find slow tests",
72
+ message="Find why the test suite is slow.",
73
+ model_selection=ModelSelection(
74
+ instance_id=provider.provider_instance_id, model=provider.models[0].id
75
+ ),
76
+ ),
77
+ )
78
+ done = await t3.wait_for_thread(launched.thread_id, run_id=launched.run_id)
79
+ transcript = await t3.call(THREAD_READ, ThreadReadInput(thread_id=launched.thread_id))
80
+ print(done.status, [item.text for item in transcript.items])
81
+
82
+
83
+ asyncio.run(main())
84
+ ```
85
+
86
+ Refusals raise `T3ToolError` with the server's code (for example `thread_not_found`
87
+ or `capability_denied`). For a tool newer than the bundled models, use
88
+ `t3.call_raw(name, arguments)`.
89
+
90
+ ## Command line: `pyt3`
91
+
92
+ T3 Code's own `t3` CLI only works on the machine running the server. `pyt3`
93
+ signs in once and then drives any environment it can reach, such as a homelab
94
+ box over Tailscale or a VPS over T3 Connect.
95
+
96
+ ```bash
97
+ pip install "pyt3client[cli]"
98
+
99
+ pyt3 login https://box.tailnet.ts.net:3773 PAIRING-CODE --name box
100
+ pyt3 models # providers, models, options
101
+ pyt3 start /srv/app "Find why the tests are slow" \
102
+ --provider claudeAgent --model claude-haiku-5-5 --wait
103
+ pyt3 threads # or --search, --status, --project
104
+ echo "Now fix it" | pyt3 send <thread-id> - --wait
105
+ pyt3 show <thread-id> # state + latest messages
106
+ pyt3 pending <thread-id> # questions the agent waits on
107
+ pyt3 answer <thread-id> <request-id> color=red
108
+ pyt3 interrupt <thread-id>
109
+ ```
110
+
111
+ `start` takes a project id or any folder inside a project. Relative paths resolve
112
+ against your shell, which only makes sense when the server runs on this machine.
113
+ Every command takes `--json`. With several saved environments, pick one with
114
+ `--env <alias>` or `PYT3_ENV`.
115
+
116
+ `start`, `send --wait` and `wait` exit like upstream `t3 thread --wait`:
117
+ 0 when the run completed, 1 when it failed (or on any error), 2 when the agent
118
+ waits for an answer or approval, and 3 when `--timeout` ran out.
119
+
120
+ Tokens are saved in `$XDG_CONFIG_HOME/pyt3client/credentials.json` (mode 0600).
121
+ `pyt3 envs` lists them without the tokens. `pyt3 logout` forgets one; revoke it in
122
+ T3 Code under Settings -> Sharing & access.
123
+
124
+ ## Access levels
125
+
126
+ `pair(..., access=...)` picks what the client may do. A thread the client starts
127
+ or steers can never run above this level. To narrow it further for one client, pass
128
+ `T3Client(..., mode_limit=("approval-required", "plan"))`.
129
+
130
+ | Level | Can |
131
+ |---|---|
132
+ | `read-only` | read projects, threads, providers, models |
133
+ | `approval-required` … `auto` | also start, message, wait for and stop threads |
134
+ | `full-access` | also create, update and delete projects |
135
+
136
+ Use `https`, `localhost` or Tailscale HTTPS addresses. Over plain `http` on a LAN,
137
+ the pairing code and token travel unencrypted.
138
+
139
+ ## Development
140
+
141
+ See [CLAUDE.md](CLAUDE.md) for the upstream map: where each protocol detail lives
142
+ in the t3code repository, how the models are generated, and how to test against an
143
+ isolated server.
@@ -0,0 +1,304 @@
1
+ [project]
2
+ name = "pyt3client"
3
+ version = "0.1.0"
4
+ description = "Thin, typed Python client for T3 Code environments (via their MCP endpoint)"
5
+ readme = "README.md"
6
+ requires-python = ">=3.13"
7
+ license = "MIT"
8
+ license-files = ["LICENSE"]
9
+ keywords = [
10
+ "t3code",
11
+ "mcp",
12
+ "agents",
13
+ "orchestration",
14
+ ]
15
+ classifiers = [
16
+ "Development Status :: 4 - Beta",
17
+ "Framework :: Pydantic",
18
+ "Framework :: Pydantic :: 2",
19
+ "Intended Audience :: Developers",
20
+ "Operating System :: OS Independent",
21
+ "Programming Language :: Python :: 3",
22
+ "Programming Language :: Python :: 3 :: Only",
23
+ "Programming Language :: Python :: 3.12",
24
+ "Programming Language :: Python :: 3.13",
25
+ "Programming Language :: Python :: 3.14",
26
+ "Topic :: Documentation",
27
+ "Topic :: Software Development",
28
+ "Topic :: Utilities",
29
+ "Typing :: Typed",
30
+ ]
31
+ dependencies = [
32
+ "pydantic>=2.11",
33
+ "httpx>=0.27",
34
+ ]
35
+
36
+ [[project.authors]]
37
+ name = "Philipp Temminghoff"
38
+ email = "philipptemminghoff@googlemail.com"
39
+
40
+ [project.optional-dependencies]
41
+ cli = ["typer>=0.12"]
42
+
43
+ [project.scripts]
44
+ pyt3 = "pyt3client.cli:app"
45
+
46
+ [project.urls]
47
+ "Code coverage" = "https://app.codecov.io/gh/phil65/pyt3client"
48
+ Discussions = "https://github.com/phil65/pyt3client/discussions"
49
+ Documentation = "https://phil65.github.io/pyt3client/"
50
+ Issues = "https://github.com/phil65/pyt3client/issues"
51
+ Source = "https://github.com/phil65/pyt3client"
52
+
53
+ [dependency-groups]
54
+ dev = [
55
+ "deptry",
56
+ "devtools",
57
+ "pyreadline3",
58
+ "pytest",
59
+ "pytest-cov",
60
+ "pytest-asyncio",
61
+ "typer>=0.12",
62
+ ]
63
+ benchmark = ["pyinstrument"]
64
+ docs = [
65
+ "mkdocs-material",
66
+ "mkdocs-mknodes",
67
+ ]
68
+ lint = [
69
+ "ruff",
70
+ "ty",
71
+ ]
72
+ codegen = ["datamodel-code-generator>=0.99"]
73
+
74
+ [build-system]
75
+ requires = ["uv_build>=0.8.22"]
76
+ build-backend = "uv_build"
77
+
78
+ [tool.coverage.report]
79
+ exclude_lines = [
80
+ "pragma: no cover",
81
+ "if TYPE_CHECKING:",
82
+ "@overload",
83
+ "except ImportError",
84
+ 'if __name__ == "__main__":',
85
+ ]
86
+
87
+ [tool.mknodes]
88
+ allowed-commit-types = [
89
+ "fix",
90
+ "feat",
91
+ "refactor",
92
+ "docs",
93
+ "test",
94
+ "build",
95
+ "chore",
96
+ ]
97
+ docstring-style = "google"
98
+
99
+ [tool.pyright]
100
+ venvPath = "."
101
+ venv = ".venv"
102
+ pythonVersion = "3.13"
103
+ pythonPlatform = "All"
104
+ typeCheckingMode = "basic"
105
+ deprecateTypingAliases = true
106
+ reportMissingTypeStubs = false
107
+ reportUnusedCallResult = false
108
+ reportUnknownVariableType = false
109
+ reportAny = false
110
+ reportImplicitOverride = false
111
+ reportUnusedFunction = false
112
+ reportImplicitStringConcatenation = false
113
+ reportIgnoreCommentWithoutRule = false
114
+ reportUnannotatedClassAttribute = false
115
+ reportSelfClsParameterName = false
116
+ reportPrivateImportUsage = false
117
+
118
+ [tool.pytest]
119
+ log_cli = true
120
+ log_date_format = "%Y-%m-%d %H:%M:%S"
121
+ log_format = "%(asctime)s %(levelname)s %(message)s"
122
+ minversion = "9.0"
123
+ testpaths = ["tests/"]
124
+ asyncio_mode = "auto"
125
+ asyncio_default_fixture_loop_scope = "module"
126
+ asyncio_default_test_loop_scope = "module"
127
+ markers = ["integration: needs a running T3 Code server (T3_URL, T3_PAIRING_CODE); skipped otherwise"]
128
+
129
+ [tool.ruff]
130
+ line-length = 100
131
+ extend-exclude = ["docs"]
132
+ target-version = "py313"
133
+
134
+ [tool.ruff.lint]
135
+ future-annotations = true
136
+ select = [
137
+ "A",
138
+ "B",
139
+ "BLE",
140
+ "C",
141
+ "C4",
142
+ "COM",
143
+ "D",
144
+ "E",
145
+ "EM",
146
+ "EXE",
147
+ "F",
148
+ "FA",
149
+ "FLY",
150
+ "G",
151
+ "I",
152
+ "ICN",
153
+ "INP",
154
+ "INT",
155
+ "ISC",
156
+ "N",
157
+ "PERF",
158
+ "PIE",
159
+ "PLE",
160
+ "PLC",
161
+ "PLR",
162
+ "PT",
163
+ "PTH",
164
+ "PYI",
165
+ "Q",
166
+ "RET",
167
+ "RSE",
168
+ "RUF",
169
+ "SIM",
170
+ "SLF",
171
+ "SLOT",
172
+ "T10",
173
+ "TC",
174
+ "TID",
175
+ "TRY",
176
+ "UP",
177
+ "W",
178
+ "YTT",
179
+ ]
180
+ ignore = [
181
+ "C408",
182
+ "B905",
183
+ "C901",
184
+ "COM812",
185
+ "D100",
186
+ "D101",
187
+ "D102",
188
+ "D103",
189
+ "D104",
190
+ "D105",
191
+ "D106",
192
+ "D107",
193
+ "D203",
194
+ "D204",
195
+ "D213",
196
+ "D215",
197
+ "D400",
198
+ "D401",
199
+ "D404",
200
+ "D406",
201
+ "D407",
202
+ "D408",
203
+ "D409",
204
+ "D413",
205
+ "EM101",
206
+ "EM102",
207
+ "ISC001",
208
+ "PLC0415",
209
+ "PLR0912",
210
+ "PLR0913",
211
+ "PLR0915",
212
+ "SLF001",
213
+ "TRY003",
214
+ "TC006",
215
+ ]
216
+
217
+ [tool.ruff.lint.flake8-quotes]
218
+ docstring-quotes = "double"
219
+
220
+ [tool.ruff.lint.flake8-type-checking]
221
+ runtime-evaluated-base-classes = [
222
+ "pydantic.BaseModel",
223
+ "sqlalchemy.orm.DeclarativeBase",
224
+ "schemez.Schema",
225
+ "sqlmodel.SQLModel",
226
+ ]
227
+ runtime-evaluated-decorators = [
228
+ "pydantic.validate_call",
229
+ "fastapi.FastAPI.get",
230
+ "fastapi.FastAPI.post",
231
+ "fastmcp.FastMCP.tool",
232
+ "typer.Typer.command",
233
+ ]
234
+
235
+ [tool.ruff.lint.isort]
236
+ lines-after-imports = 2
237
+ force-sort-within-sections = true
238
+ combine-as-imports = true
239
+
240
+ [tool.ruff.lint.mccabe]
241
+ max-complexity = 15
242
+
243
+ [tool.ruff.lint.per-file-ignores]
244
+ "__init__.py" = [
245
+ "E402",
246
+ "I001",
247
+ ]
248
+ "scripts/*" = ["INP001"]
249
+ "*tests/*" = [
250
+ "D100",
251
+ "PLR2004",
252
+ ]
253
+ "src/pyt3client/cli/app.py" = ["PLR0917"]
254
+ "src/pyt3client/models/tools.py" = [
255
+ "D",
256
+ "E501",
257
+ "N815",
258
+ "RUF",
259
+ "UP",
260
+ "TC",
261
+ "PIE790",
262
+ "PYI051",
263
+ ]
264
+
265
+ [tool.ruff.format]
266
+ preview = true
267
+
268
+ [tool.ty.environment]
269
+ python-version = "3.13"
270
+ python-platform = "all"
271
+
272
+ [tool.ty.src]
273
+ include = ["src"]
274
+
275
+ [tool.ty.analysis]
276
+ allowed-unresolved-imports = []
277
+
278
+ [tool.ty.rules]
279
+ incompatible-mutable-override = "ignore"
280
+
281
+ [tool.uv]
282
+ default-groups = [
283
+ "dev",
284
+ "lint",
285
+ "docs",
286
+ ]
287
+
288
+ [tool.uv.build-backend]
289
+ wheel-exclude = [
290
+ ".mypy_cache/**",
291
+ "__pycache__/**",
292
+ "*.pyc",
293
+ "*.pyo",
294
+ ".pytest_cache/**",
295
+ ".ruff_cache/**",
296
+ ]
297
+ source-exclude = [
298
+ ".mypy_cache/**",
299
+ "__pycache__/**",
300
+ "*.pyc",
301
+ "*.pyo",
302
+ ".pytest_cache/**",
303
+ ".ruff_cache/**",
304
+ ]