Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
191 lines (176 loc) · 8.88 KB
/
Copy pathpyproject.toml
File metadata and controls
191 lines (176 loc) · 8.88 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
[project]
name = "marshal-agents"
version = "0.6.0"
description = "Orchestration engine for driving a fleet of headless coding agents (Cursor, OpenCode, Codex, Antigravity, Claude Code) from one driver via MCP + Skills"
readme = "README.md"
requires-python = ">=3.11"
license = "MIT"
authors = [{ name = "chiruu12" }]
keywords = [
"agents",
"orchestration",
"mcp",
"cursor",
"opencode",
"codex",
"antigravity",
"claude-code",
"headless",
"coding-agent",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Build Tools",
"Operating System :: POSIX",
"Typing :: Typed",
]
dependencies = [
"jsonschema>=4.26.0",
"pydantic>=2.13.4",
"pyyaml>=6.0",
]
# Distribution name is `marshal` when that name is free on PyPI; fallback is
# `marshal-orchestrator`. The IMPORT package is always `marshal_engine` — a
# top-level package literally named `marshal` would shadow the stdlib builtin.
[project.optional-dependencies]
mcp = ["mcp>=2.0.0"]
dev = [
"pytest>=8",
"ruff>=0.15.20",
"mypy>=1.11",
"types-PyYAML>=6",
"pytest-cov>=5",
]
[project.scripts]
marshal = "marshal_engine.interfaces.cli:main"
[project.urls]
Homepage = "https://github.com/chiruu12/marshal"
Repository = "https://github.com/chiruu12/marshal"
Issues = "https://github.com/chiruu12/marshal/issues"
Changelog = "https://github.com/chiruu12/marshal/blob/main/CHANGELOG.md"
[build-system]
# Pinned: the build backend is resolved at build time, NOT from uv.lock (which tracks runtime deps),
# so an unconstrained backend makes the published artifact non-reproducible.
requires = ["hatchling>=1.27,<2"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
# Wheel ships only the import package (incl. py.typed).
packages = ["src/marshal_engine"]
[tool.hatch.build.targets.sdist]
# Rebuild needs src/, tests/, lockfile, and project metadata. Keep local IDE /
# runtime paths out of the tarball (they are gitignored or not part of the package).
exclude = [
"/.cursor",
"/.marshal",
"/teams",
"/marshal-runs",
"/dist",
"/build",
]
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
# Stated explicitly rather than inherited. Ruff's DEFAULT rule set is not a stable contract - 0.16
# widened it, and a routine lockfile bump turned the commit gate red with ~280 findings across 20
# rules that no one had chosen. Pinning the set means a ruff upgrade changes ruff, and adopting a
# new rule is its own reviewed commit. These four are the set the codebase was in fact linted
# against; broadening it is tracked separately.
select = [
"E4", "E7", "E9", "F",
# Adopted deliberately (#239), one family at a time rather than by inheriting a default.
# PLW1510: `subprocess.run` without an explicit `check=`. This codebase shells out constantly
# and every call site here already inspects `returncode`; stating it stops the next one from
# relying on a default that differs from what the surrounding code does.
"PLW1510",
# RUF012: a mutable class attribute needs `ClassVar`. Every hit here was a deliberate
# class-level table (permission maps, a process-shared registry), so the annotation states
# intent that was previously only implied - and keeps the next one from being an accidental
# shared default (#239).
"RUF012",
# UP017: `datetime.timezone.utc` -> `datetime.UTC`. Adopted because it is a pure alias on the
# 3.11 floor this project already targets, so the rewrite cannot change behaviour - it only
# settles which spelling the codebase uses, which was previously split between the two (#239).
"UP017",
# UP035/UP037: deprecated typing imports, and annotations quoted for a forward reference that
# `from __future__ import annotations` already makes unnecessary. Both are mechanical and
# autofixable, and neither changes what the code does (#239).
"UP035", "UP037",
# Two pyupgrade rules are deliberately NOT adopted, recorded here so they are not re-litigated:
# UP042 (`class X(str, Enum)` -> `StrEnum`) changes behaviour. `str()` of a `str, Enum` member
# gives `X.a`; of a `StrEnum` member it gives `a`. These enums are serialized to the ledger,
# the MCP surface, and persisted run records, so that is a wire-format change wearing a
# lint's clothing - it needs its own PR with migration thought, not a sweep.
# UP031 (`%`-format) fires on three code-generation strings that use `%r` precisely because
# they need repr-quoting of a path into a generated script. The rewrite is ruff-unsafe and
# buys nothing.
# Mechanical cleanups, all autofixable and none behaviour-changing (#239): implicit string
# concat inside a collection literal (where a missing comma silently merges two items rather
# than erroring), `str()` inside an f-string, indexing the first element of a freshly built
# list, chained `startswith`, and Yoda conditions.
"ISC004", "RUF010", "RUF015", "PIE810", "SIM300",
# S110: `try`/`except`/`pass`. The existing sites are deliberate and already carry a `noqa`
# explaining why the failure must not propagate; they gain an `S110` code. Adopted for what it
# catches NEXT - a silent swallow added without that reasoning.
"S110",
# Declined, recorded so they are not re-litigated:
# PLC0414 (`import X as X`) would break the build. Those aliases are the explicit re-export
# idiom mypy strict's `no_implicit_reexport` requires; removing them was tried and produced
# 7 `does not explicitly export attribute` errors across service, workspaces, formatting,
# inspect, state, and logs. The published import paths depend on them.
# TRY004 (prefer `TypeError` for a type check) would split one function's error contract in
# two. `parse_structured` raises `ValueError` for every other malformed-input case; making
# the not-a-dict branch raise `TypeError` means a caller catching `ValueError` around a
# parse silently stops catching one of its failures.
# SIM105 (`contextlib.suppress`) over the deliberate swallows this codebase documents inline
# trades a commented reason for a context manager that reads as incidental.
# FLY002 (`"sep".join([...])` of literals -> one string) makes the test fixtures worse: the
# opencode fixtures are a `"\n".join` of one JSON protocol event per line, and collapsing
# them into a single 300-character literal hides the thing the fixture exists to show.
# I001: import-block sorting. Pure formatting - adopted because unsorted imports are a standing
# source of diff noise, where two PRs touching neighbouring imports collide over ordering rather
# than content. Destroys no information, unlike RUF100 (see #239).
"I001",
# RUF100 (unused `noqa`) is declined, and the audit behind that is #282. It cannot tell a
# stale suppression from a deliberate one, because it calls a `noqa` for a rule outside
# `select` "unused" - and nearly every suppression in this codebase is exactly that: a
# BLE001/ANN001/ARG001/SIM115/S310 code carrying a written reason for a rule we have not
# adopted. Autofixing would delete those reasons and, worse, un-suppress each site the day
# its rule IS adopted, so the adoption PR would land pre-broken. Run it as an audit instead
# (`ruff check --extend-select RUF100`) and read only the findings that say `unused:`
# rather than `non-enabled:` - those are the genuinely dead ones. Note that `--select
# RUF100` on its own is the wrong command: it REPLACES the rule set, so every suppression
# in the file reports as unused and the audit tells you nothing.
]
[tool.mypy]
python_version = "3.11"
strict = true
files = ["src"]
[[tool.mypy.overrides]]
module = "mcp.*"
ignore_missing_imports = true
[tool.pytest.ini_options]
# Only ever collect the real suite. Live agent runs drop git worktrees (full repo copies,
# tests included) under marshal-runs/ and .marshal/; without this, pytest discovers those
# duplicate test modules and collection explodes.
testpaths = ["tests"]
norecursedirs = ["marshal-runs", ".marshal", ".venv", "tmp", "build", "dist"]
# Coverage is opt-in via a flag (CI passes --cov) so a bare local `pytest -q` stays fast; this
# block just configures what gets measured and how it's reported when the flag is on.
[tool.coverage.run]
source = ["src/marshal_engine"]
omit = ["*/__main__.py"]
[tool.coverage.report]
show_missing = true
# The whole package is measured; the floor is enforced in CI via --cov-fail-under (see ci.yml).
precision = 0
[dependency-groups]
dev = [
"types-jsonschema>=4.26.0.20260518",
]