-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
204 lines (180 loc) · 7.86 KB
/
Copy pathpyproject.toml
File metadata and controls
204 lines (180 loc) · 7.86 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
[project]
name = "finecode"
dynamic = ["version"]
description = ""
authors = [{ name = "Vladyslav Hnatiuk", email = "aders1234@gmail.com" }]
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"loguru==0.7.*",
"filelock==3.18.*",
"tomlkit==0.11.*",
"watchdog==4.0.*",
"click==8.1.*",
"finecode_extension_api~=0.4.0a0",
"finecode_extension_runner~=0.4.0a0",
"fine_format~=0.1.0a0",
"fine_envs~=0.1.0a0",
"fine_inspect_code~=0.1.0a0",
"fine_semantic_tokens~=0.1.0a0",
"fine_inlay_hints~=0.1.0a0",
"finecode_jsonrpc~=0.1.0a0",
"ordered-set==4.1.*",
"fine_python_uv~=0.1.0a0",
"culsans==0.11.*",
"cattrs==26.1.*",
"lsprotocol==2025.0.0"
]
[project.scripts]
finecode = "finecode.cli:cli"
[dependency-groups]
dev_workspace = [
# Some packages have no version, because they are always installed as editables
"finecode",
"finecode_dev_common_preset",
"fine_system_setup",
"fine_docs_markdown",
"finecode_httpclient~=0.1.0a1",
"debugpy==1.8.*",
"opentelemetry-sdk==1.41.*",
"opentelemetry-exporter-otlp-proto-grpc==1.41.*",
"opentelemetry-instrumentation==0.62.*"
]
dev = ["psutil==7.2.*", "debugpy==1.8.*"]
[build-system]
requires = ["setuptools>=64", "setuptools-scm>=8"]
build-backend = "setuptools.build_meta"
[tool.finecode]
presets = [{ source = "finecode_dev_common_preset" }, { source = "fine_docs_markdown" }, { source = "fine_system_setup" }]
[tool.finecode.action.setup_system]
handlers = [
{ name = "install_claude_code", source = "fine_system_claude_code.InstallClaudeCodeHandler", env = "dev_workspace", dependencies = [
"fine_system_claude_code~=0.1.0a0",
] },
]
[tool.finecode.env.testing]
interpreters = ["cpython@3.11", "cpython@3.12", "cpython@3.13", "cpython@3.14"] # generated by sync_toolchains from requires-python -- run sync_toolchains to update
[tool.importlinter]
root_package = "finecode"
include_external_packages = true
contract_types = ["domain_purity: fine_python_import_linter.contracts.DomainPurityContract"]
# NOTE (KG conformance project, Part A — 2026-06-10): the original `wm-layered` contract
# referenced `finecode.lsp_server.services` (only exception classes) and `finecode.domain`
# (no such module — the real domain is `finecode.wm_server.domain`), so it could not run.
# Corrected below to the documented WM stack (docs/guides/wm-server-internals.md) and the
# subsystem relationship in docs/architecture.md. PENDING HUMAN SIGN-OFF.
# WM server internal stack. Source: docs/guides/wm-server-internals.md layer diagram
# ("Dependencies flow strictly downward. Upper layers may import from lower ones, never
# the reverse."). domain/errors/context grouped (they are the pure-data bottom and import
# one another, e.g. context -> domain).
[[tool.importlinter.contracts]]
id = "wm-layered"
name = "WM server layered architecture"
type = "layers"
containers = ["finecode.wm_server"]
layers = [
"wm_server",
"_api_handlers",
"services",
"runner",
"config",
"domain : errors : context",
]
# Client subsystems sit above the WM server core; clients import the core, never the
# reverse, and are independent of each other. Source: docs/architecture.md (subsystems
# table: LSP/MCP/CLI are clients of WM).
[[tool.importlinter.contracts]]
id = "wm-subsystems-layered"
name = "WM client subsystems sit above the WM server core"
type = "layers"
containers = ["finecode"]
layers = [
"lsp_server | mcp_server | cli_app",
"wm_server",
]
# The WM server core must not import its client subsystems (explicit forbidden form of the
# direction enforced above). Verified no such imports exist today.
[[tool.importlinter.contracts]]
id = "wm-core-no-client-imports"
name = "WM server core must not import client subsystems"
type = "forbidden"
source_modules = ["finecode.wm_server"]
forbidden_modules = [
"finecode.lsp_server",
"finecode.mcp_server",
"finecode.cli_app",
]
# lsprotocol types must stay confined to the LSP server subsystem. The original contract
# ignored `finecode.runner.runner_client` (no such module) and `lsp_server.lsp_server`;
# since then the LSP code was refactored into `lsp_server/endpoints/*`, which legitimately
# use lsprotocol. Ignores updated to the real LSP-boundary importers. PENDING SIGN-OFF.
[[tool.importlinter.contracts]]
id = "wm-use-runner-client"
name = "lsprotocol types confined to the LSP server subsystem"
type = "forbidden"
source_modules = ["finecode"]
forbidden_modules = ["lsprotocol"]
ignore_imports = [
"finecode.lsp_server.lsp_server -> lsprotocol",
"finecode.lsp_server.endpoints.diagnostics -> lsprotocol",
"finecode.lsp_server.endpoints.code_actions -> lsprotocol",
"finecode.lsp_server.endpoints.code_lens -> lsprotocol",
"finecode.lsp_server.endpoints.document_sync -> lsprotocol",
"finecode.lsp_server.endpoints.formatting -> lsprotocol",
"finecode.lsp_server.endpoints.inlay_hints -> lsprotocol",
]
# errors.py and domain.py are wm-layered's pure-data bottom in the sense that matters
# here: they only ever hold data types and exceptions, with no legitimate reason to
# reference infrastructure. context.py is deliberately excluded even though wm-layered
# groups it with them — WorkspaceContext is the WM's shared *mutable* state and by design
# holds live handles to running infrastructure (e.g. runner_io_thread: AsyncIOThread,
# ws_projects_extension_runners: dict[..., ExtensionRunnerInfo]). wm-layered's grouping is
# about import *direction* (doesn't import upward); this contract is about *purity*
# (references nothing but itself + stdlib) — those are different properties that happen to
# coincide for errors.py/domain.py but not for context.py.
#
# This is stricter than a forbidden-list of specific infra packages (e.g. finecode_jsonrpc):
# it catches ANY future infrastructure dependency automatically, rather than needing this
# contract updated every time a new one is introduced. A domain exception that imports a
# transport package (to carry e.g. a wire-protocol code) couples the domain to one specific
# protocol and makes the exception meaningless outside that boundary — that mapping belongs
# at the actual dispatch boundary (wm_server.py), which is already infrastructure-aware. See
# "Generality in comments, docstrings, and messages" / "Layered exception translation" in
# docs/guides/developing-finecode.md.
[[tool.importlinter.contracts]]
id = "wm-domain-purity"
name = "WM domain layer depends only on itself and the standard library"
type = "domain_purity"
domain_modules = [
"finecode.wm_server.errors",
"finecode.wm_server.domain",
]
# Pre-existing debt, out of scope for the contract that introduced this rule — real
# wm-layered direction violations (domain, the bottom layer, importing config, a layer
# above it) and a judgment call on whether a small utility/collections library counts as
# "infrastructure" for this purpose. Flagged for separate cleanup, not silently allowed.
ignore_imports = [
"finecode.wm_server.domain -> finecode.wm_server.config.config_models",
"finecode.wm_server.domain -> ordered_set",
]
[tool.setuptools_scm]
version_file = "src/finecode/_version.py"
[tool.setuptools.package-dir]
"" = "src"
[tool.setuptools.packages.find]
where = ["src"]
[tool.finecode.action.get_src_artifact_version]
source = "fine_src_artifacts.GetSrcArtifactVersionAction"
handlers_mode = "replace"
handlers = [
{ name = 'get_src_artifact_version_setuptools_scm', source = 'fine_python_setuptools_scm.GetSrcArtifactVersionSetuptoolsScmHandler', env = "dev_no_runtime", dependencies = [
"fine_python_setuptools_scm~=0.1.0a1",
] },
]
[tool.finecode.action.serve_wal_explorer_from_store]
source = "fine_wal_events.ServeWalExplorerFromStoreAction"
handlers = [
{ name = "serve_wal_explorer_from_store", source = "fine_wal_explorer.ServeWalExplorerFromStoreHandler", env = "wal_explorer", dependencies = [
"fine_wal_explorer~=0.1.0a0",
] },
]