Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
187 lines (171 loc) · 9.59 KB
/
Copy pathpyproject.toml
File metadata and controls
187 lines (171 loc) · 9.59 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
[build-system]
requires = ["setuptools>=64", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "kirocrew"
version = "0.13.0"
description = "Personal AI agent that runs locally — chat via CLI, dashboard, desktop app, or messaging channels like Slack and Discord"
readme = "README.md"
# macOS (x86_64 + arm64) and Linux (x86_64 + aarch64), CPython 3.12-3.13.
# Must be declared in this [project] table: when it exists, setuptools reads
# requires-python from here (not setup.cfg), and an absent value makes the
# build backend raise SpecifierSet(None) -> TypeError during wheel builds.
requires-python = ">=3.12"
# optional-dependencies must be listed here too: the extras live in setup.cfg
# ([options.extras_require]), and once a [project] table exists setuptools
# ignores setup.cfg metadata unless the field is declared dynamic. Omitting it
# silently drops every extra — `pip install -e ".[dev]"` then reports
# "does not provide the extra 'dev'" and installs no test tooling.
dynamic = ["dependencies", "optional-dependencies"]
[project.urls]
Homepage = "https://github.com/kirodotdev/KiroCrew"
[project.scripts]
kirocrew = "kiro_crew._bootstrap:main"
[dependency-groups]
# Pinned dev tool versions for reproducible CI. Bump as needed.
dev = [
"pytest==9.0.3",
"pytest-xdist==3.5.0",
"pytest-timeout==2.2.0",
# 0.21.2: the first release whose async-fixture wrapper runs under
# pytest >= 8.2 (0.20.3 reads the removed FixtureDef.unittest). Later lines
# rework event-loop scoping, which the conftest floor has not migrated to.
"pytest-asyncio==0.21.2",
"hypothesis==6.98.10",
"coverage==7.10.6",
"pytest-cov>=5",
# Duration-balanced test sharding across parallel CI jobs (--splits/--group).
"pytest-split==0.11.0",
"flake8==7.1.0",
"mypy==1.14.1",
"black==26.10.1",
"isort==6.0.0",
# Keep CI on a pinned version of the runtime config validator. The runtime
# dependency is declared separately in setup.cfg so packaged installs do
# not silently skip schema checks when dev extras are absent.
"jsonschema==4.26.0",
# Same shape as jsonschema above, and the same reason. PyJWT ships in the
# optional `teams` extra, which CI never installs, so `test_teams_client.py`'s
# module-level `pytest.importorskip("jwt")` silently skipped the WHOLE file --
# every test of the inbound Bot Framework token gate (signature, audience,
# issuer, expiry, the serviceUrl-claim binding, replay drop, in-flight
# shedding). That is the channel's entire trust boundary, and a skip scores as
# a pass, so the gate looked covered while nothing exercised it. Declared here
# so those tests actually run; the runtime dependency stays optional, because
# a user who does not enable Teams should not carry a crypto library.
"PyJWT[crypto]==2.15.0",
# Test-only, NOT a runtime dependency. test_transcribe_ffmpeg.py's pin-completeness
# test imports imageio_ffmpeg._definitions.FNAME_PER_PLATFORM to derive the
# authoritative bundled-decoder filename set; without the package installed the
# test would importorskip and silently pass, which is the "green while checking
# nothing" shape that test exists to end. imageio_ffmpeg stays a packaging and
# runtime concern for the desktop bundle, NOT a core install_requires. Pinned to
# the exact version the desktop matrix ships (packaging/build-desktop.sh).
"imageio-ffmpeg==0.6.0",
# Python vulnerability audit, pinned like every other tool here and installed
# by the SAME `--group dev` step, which is what makes the audit reproducible:
# the step this replaces ran `pip install pip-audit` with no version, so two
# runs a week apart could disagree about the same tree and nobody could tell a
# new advisory from a new tool. No audit tool was declared anywhere in the
# repository, so there was no existing one to reuse; pip-audit is PyPA's own
# and is the tool the removed step used, which keeps the choice boring.
"pip-audit==2.10.1",
# Test-only, and ONLY for the MicroVM lane:
#
# test_cloud_microvm_contract.py reads botocore's INSTALLED lambda-microvms
# service model and asserts the routes, required members and state enum the
# lane is written against still match it. That is the one failure a hand-written
# fake cannot notice about itself, and it costs no AWS call and no credential.
#
# Not a runtime dependency: the lane's own AWS calls go through the `aws` CLI
# seam in cloud/aws.py like every other lane's, so the product does not gain a
# second AWS-call style.
#
# The version matters rather than merely being bounded: the crew image's own
# apps/builtins/aws_control/crew/runtime/container/requirements.txt pins
# boto3==1.35.99, which predates the lambda-microvms service model entirely.
# A venv carrying both resolutions lands on the older one and the contract
# test has no model to read. CI keeps them apart -- only the
# backend-test-crew-container lane installs the image's runtime pins, and it
# runs only container_tests/ -- and the contract test FAILS rather than skips
# when it finds botocore present but ignorant of the service, so a local venv
# that mixed them says so instead of reporting a pass.
"boto3==1.43.108",
# Transitive via black and pip-audit, pinned here because it is a pytest11
# plugin publisher. platformdirs 4.12.0 declares an entry point at
# platformdirs.pytest_plugin; pytest imports every pytest11 entry point at
# startup, and on the Windows runners that import raises, which is fatal
# before collection. setup.cfg refuses the plugin for pytest runs that read
# this repository's config, but the suite also spawns NESTED pytest
# processes that deliberately suppress that config -- stripping
# PYTEST_ADDOPTS or passing `-o addopts=` is what makes them able to test
# pytest behaviour in isolation -- so no config or environment lever
# reaches them. Constraining the resolved version is the one lever that
# does, because no process in the environment can then see the entry point.
"platformdirs<4.12",
]
[tool.black]
line-length = 100
# force-exclude (not extend-exclude): formatter hooks pass explicit file paths
# to black, and only force-exclude is honored for explicit paths. Vendored
# third-party code must never be reformatted (keeps diffs against upstream
# wheels clean for upgrades). test/workflows/malicious/ is the B9 adversarial
# workflow corpus — hostile scripts kept as DATA (loaded by
# test_workflows_malicious.py, never collected or imported); reformatting
# attack payloads would alter the very byte patterns they exist to probe.
force-exclude = "/_vendor/|/test/workflows/malicious/"
[tool.isort]
# `tests` covers the builtin apps' own test packages (e.g.
# src/kiro_crew/apps/builtins/code_review_sage/tests), imported as
# `from tests.fixtures import ...` with the app dir as the sys.path root.
# isort used to infer first-party from the repo-root tests/ directory; that
# directory was removed in #6577, so the classification is pinned explicitly.
known_first_party = ["kiro_crew", "tests"]
# required for compatibility with black:
profile = "black"
# To maintain consistency with other settings
line_length = 100
# skip + skip_glob: isort's skip_glob alone is not honored when a formatter
# hook passes explicit file paths with --filter-files unset; filter both ways.
skip_glob = ["**/_vendor/*", "src/kiro_crew/_vendor/*"]
extend_skip = ["_vendor"]
[tool.mypy]
mypy_path = "src"
# Keep the blocking gate host-independent. CI type-checks the Linux deployment
# surface, while mypy otherwise selects typeshed from the developer's host and
# reports guarded POSIX APIs as missing when this same command runs on Windows.
platform = "linux"
# See https://mypy.readthedocs.io/en/latest/config_file.html for more mypy options.
# Enables the type-checker on the interior of functions without type annotations.
check_untyped_defs = true
# Displaying specific error codes makes it easier to silence specific errors
# See also https://mypy.readthedocs.io/en/latest/error_codes.html
show_error_codes = true
# Show source code snippets and location markers in error messages
pretty = true
# Suppresses errors about packages which do not implement type-hint sharing.
# See also https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports.
ignore_missing_imports = true
# Vendored third-party code (llama-cpp-python) — never type-check it. The
# exclude matches _vendor anywhere (src/ and build output trees alike).
#
# goal-ledger-conductor/scripts/accept_eval.py is a byte-identical copy of
# goal-conductor/scripts/accept_eval.py (the builtin-skill scope gate refuses a
# symlink), and two top-level modules named ``accept_eval`` make mypy stop with
# "Duplicate module named" before checking anything. The copy is excluded and the
# original is checked; test_ledger_conductor_agent.py pins the two byte-identical,
# so nothing type-checked is lost.
exclude = ['/_vendor/', 'goal-ledger-conductor/scripts/accept_eval[.]py$']
[[tool.mypy.overrides]]
# _vendor has no __init__.py (it is a sys.path root), so mypy may resolve the
# vendored files as either kiro_crew._vendor.* or top-level llama_cpp.* /
# diskcache depending on invocation — suppress both spellings.
module = ["kiro_crew._vendor.*", "llama_cpp", "llama_cpp.*", "diskcache"]
ignore_errors = true
follow_imports = "skip"
[[tool.mypy.overrides]]
# neonize is the optional [whatsapp] extra; CI runs mypy without it installed,
# so its imports must resolve the same way (Any) on machines that DO have it.
module = ["neonize", "neonize.*"]
ignore_missing_imports = true
follow_imports = "skip"