aft-mcp 2026.11.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.
Files changed (72) hide show
  1. aft_mcp-2026.11.0/.dockerignore +9 -0
  2. aft_mcp-2026.11.0/.editorconfig +15 -0
  3. aft_mcp-2026.11.0/.env.example +83 -0
  4. aft_mcp-2026.11.0/.gitattributes +3 -0
  5. aft_mcp-2026.11.0/.github/ISSUE_TEMPLATE/bug_report.yml +91 -0
  6. aft_mcp-2026.11.0/.github/ISSUE_TEMPLATE/config.yml +8 -0
  7. aft_mcp-2026.11.0/.github/ISSUE_TEMPLATE/documentation.yml +27 -0
  8. aft_mcp-2026.11.0/.github/ISSUE_TEMPLATE/feature_request.yml +47 -0
  9. aft_mcp-2026.11.0/.github/actions/image-tags/action.yml +39 -0
  10. aft_mcp-2026.11.0/.github/labeller.yml +42 -0
  11. aft_mcp-2026.11.0/.github/pull_request_template.md +49 -0
  12. aft_mcp-2026.11.0/.github/release.yml +34 -0
  13. aft_mcp-2026.11.0/.github/renovate.json +168 -0
  14. aft_mcp-2026.11.0/.github/workflows/autofix.yml +60 -0
  15. aft_mcp-2026.11.0/.github/workflows/build.yml +94 -0
  16. aft_mcp-2026.11.0/.github/workflows/ci.yml +189 -0
  17. aft_mcp-2026.11.0/.github/workflows/pr-labeller.yml +119 -0
  18. aft_mcp-2026.11.0/.github/workflows/publish.yml +512 -0
  19. aft_mcp-2026.11.0/.github/workflows/release.yml +303 -0
  20. aft_mcp-2026.11.0/.gitignore +163 -0
  21. aft_mcp-2026.11.0/.pre-commit-config.yaml +116 -0
  22. aft_mcp-2026.11.0/.python-version +1 -0
  23. aft_mcp-2026.11.0/AGENTS.md +66 -0
  24. aft_mcp-2026.11.0/CLAUDE.md +1 -0
  25. aft_mcp-2026.11.0/CODE_OF_CONDUCT.md +83 -0
  26. aft_mcp-2026.11.0/CONTRIBUTING.md +262 -0
  27. aft_mcp-2026.11.0/Dockerfile +117 -0
  28. aft_mcp-2026.11.0/LICENSE +21 -0
  29. aft_mcp-2026.11.0/PKG-INFO +126 -0
  30. aft_mcp-2026.11.0/README.md +112 -0
  31. aft_mcp-2026.11.0/SECURITY.md +49 -0
  32. aft_mcp-2026.11.0/SUPPORT.md +11 -0
  33. aft_mcp-2026.11.0/deploy/ssh-broker/aft-mcp-broker +31 -0
  34. aft_mcp-2026.11.0/docker-bake.hcl +64 -0
  35. aft_mcp-2026.11.0/docs/access.md +90 -0
  36. aft_mcp-2026.11.0/docs/clients.md +152 -0
  37. aft_mcp-2026.11.0/docs/docker.md +147 -0
  38. aft_mcp-2026.11.0/docs/remote.md +165 -0
  39. aft_mcp-2026.11.0/docs/settings.md +58 -0
  40. aft_mcp-2026.11.0/pyproject.toml +194 -0
  41. aft_mcp-2026.11.0/scripts/compare_package_metadata.py +118 -0
  42. aft_mcp-2026.11.0/scripts/image_tags.py +80 -0
  43. aft_mcp-2026.11.0/scripts/no_push_to_main.py +40 -0
  44. aft_mcp-2026.11.0/scripts/settings_reference.py +377 -0
  45. aft_mcp-2026.11.0/src/aft_mcp/__init__.py +5 -0
  46. aft_mcp-2026.11.0/src/aft_mcp/__main__.py +5 -0
  47. aft_mcp-2026.11.0/src/aft_mcp/_tracking.py +161 -0
  48. aft_mcp-2026.11.0/src/aft_mcp/_types.py +17 -0
  49. aft_mcp-2026.11.0/src/aft_mcp/audit.py +285 -0
  50. aft_mcp-2026.11.0/src/aft_mcp/board_guard.py +282 -0
  51. aft_mcp-2026.11.0/src/aft_mcp/cli.py +221 -0
  52. aft_mcp-2026.11.0/src/aft_mcp/server.py +267 -0
  53. aft_mcp-2026.11.0/src/aft_mcp/settings.py +546 -0
  54. aft_mcp-2026.11.0/src/aft_mcp/swagger_convert.py +399 -0
  55. aft_mcp-2026.11.0/tests/broker/Dockerfile +30 -0
  56. aft_mcp-2026.11.0/tests/broker/entrypoint.sh +20 -0
  57. aft_mcp-2026.11.0/tests/conftest.py +187 -0
  58. aft_mcp-2026.11.0/tests/support.py +27 -0
  59. aft_mcp-2026.11.0/tests/test_audit.py +337 -0
  60. aft_mcp-2026.11.0/tests/test_board_guard.py +398 -0
  61. aft_mcp-2026.11.0/tests/test_broker.py +356 -0
  62. aft_mcp-2026.11.0/tests/test_cli.py +292 -0
  63. aft_mcp-2026.11.0/tests/test_compare_package_metadata.py +105 -0
  64. aft_mcp-2026.11.0/tests/test_image_tags.py +115 -0
  65. aft_mcp-2026.11.0/tests/test_mcp.py +497 -0
  66. aft_mcp-2026.11.0/tests/test_scripts.py +42 -0
  67. aft_mcp-2026.11.0/tests/test_server.py +516 -0
  68. aft_mcp-2026.11.0/tests/test_settings.py +542 -0
  69. aft_mcp-2026.11.0/tests/test_settings_reference.py +182 -0
  70. aft_mcp-2026.11.0/tests/test_settings_tracking.py +313 -0
  71. aft_mcp-2026.11.0/tests/test_swagger_convert.py +450 -0
  72. aft_mcp-2026.11.0/uv.lock +1639 -0
@@ -0,0 +1,9 @@
1
+ # Only what the image is built from; everything else, .env included, stays out.
2
+ *
3
+ !.python-version
4
+ !pyproject.toml
5
+ !uv.lock
6
+ !README.md
7
+ !LICENSE
8
+ !src/
9
+ src/**/__pycache__
@@ -0,0 +1,15 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ insert_final_newline = true
7
+ trim_trailing_whitespace = true
8
+ indent_style = space
9
+ indent_size = 2
10
+
11
+ [*.py]
12
+ indent_size = 4
13
+
14
+ [*.md]
15
+ trim_trailing_whitespace = false
@@ -0,0 +1,83 @@
1
+ # aft-mcp settings. Generated by `uv run poe settings-docs`; do not edit.
2
+ # Copy to ~/.config/aft-mcp/.env (or a file named by AFT_MCP_ENV_FILE)
3
+ # and fill in the settings that aren't commented out.
4
+ # Every variable is described in docs/settings.md.
5
+
6
+ # --- Connecting to AFT ---
7
+
8
+ # Base URL the generated tools call. It must use https unless AFT_MCP_ALLOW_INSECURE is
9
+ # set.
10
+ # Allowed: http:// or https://.
11
+ # Required: yes.
12
+ AFT_MCP_BASE_URL=https://aft.example.com
13
+
14
+ # URL of AFT's Swagger 2.0 or OpenAPI spec, which the tools are built from. Unset, it is
15
+ # api/apispec.json under AFT_MCP_BASE_URL. It must be on the same host and port as
16
+ # AFT_MCP_BASE_URL, and so must any redirect it follows.
17
+ # Allowed: http:// or https://.
18
+ # AFT_MCP_SPEC_URL=https://aft.example.com/api/apispec.json
19
+
20
+ # Load the spec from this local file instead of AFT_MCP_SPEC_URL.
21
+ # AFT_MCP_SPEC_FILE=
22
+
23
+ # Request timeout in seconds, for the spec and every tool call.
24
+ # Allowed: more than 0.
25
+ # AFT_MCP_TIMEOUT=30
26
+
27
+ # Allow http:// for AFT_MCP_BASE_URL and AFT_MCP_SPEC_URL, for an AFT on a trusted
28
+ # network or VPN. The credentials are then sent unencrypted, and the server warns about
29
+ # it on every start.
30
+ # AFT_MCP_ALLOW_INSECURE=false
31
+
32
+ # --- Signing in ---
33
+
34
+ # AFT API token, sent as Authorization: Bearer (recommended). Create it on an API-only
35
+ # user; set this, or both AFT_MCP_USERNAME and AFT_MCP_PASSWORD. It is never shown in
36
+ # reprs, logs or errors.
37
+ # Allowed: not empty.
38
+ # Sensitive: no value is written here.
39
+ # AFT_MCP_TOKEN=
40
+
41
+ # AFT account email or username, sent as HTTP basic auth, for AFT versions without API
42
+ # tokens. Needs AFT_MCP_PASSWORD; not with AFT_MCP_TOKEN. Use a dedicated user for the
43
+ # agent, not your own account.
44
+ # Allowed: not empty.
45
+ # AFT_MCP_USERNAME=agent@example.com
46
+
47
+ # Password of the AFT_MCP_USERNAME account. It is never shown in reprs, logs or errors.
48
+ # Allowed: not empty.
49
+ # Sensitive: no value is written here.
50
+ # AFT_MCP_PASSWORD=
51
+
52
+ # --- What the tools may do ---
53
+
54
+ # Expose only the safe reads, so no tool can change anything.
55
+ # AFT_MCP_READ_ONLY=false
56
+
57
+ # Only let the tools reach these boards; unset allows every board the AFT user can see.
58
+ # Allowed: each more than 0.
59
+ # AFT_MCP_BOARD_IDS=12,15
60
+
61
+ # A short name for this AFT instance, such as prod or test. It is added to the server's
62
+ # name and instructions, so the agent knows which instance it is changing, and to every
63
+ # log line.
64
+ # AFT_MCP_INSTANCE=prod
65
+
66
+ # --- Logging ---
67
+
68
+ # How the log is written: logfmt lines, or one JSON object per line for log pipelines.
69
+ # Allowed: logfmt or json.
70
+ # AFT_MCP_LOG_FORMAT=json
71
+
72
+ # Write the log to stderr. Over SSH, stderr goes back to the client, so a server can set
73
+ # this to false and keep the log in syslog instead.
74
+ # AFT_MCP_LOG_STDERR=true
75
+
76
+ # Also send the log to the local syslog (/dev/log), so a server keeps the audit trail
77
+ # itself. A missing socket stops the server.
78
+ # AFT_MCP_LOG_SYSLOG=false
79
+
80
+ # Syslog facility for the log; auth or authpriv puts it next to sshd's lines.
81
+ # Allowed: user or auth or authpriv or daemon or local0 or local1 or local2 or local3 or
82
+ # local4 or local5 or local6 or local7.
83
+ # AFT_MCP_LOG_SYSLOG_FACILITY=auth
@@ -0,0 +1,3 @@
1
+ # Normalise all text files to LF in the repository, regardless of the checking-out
2
+ # platform or a contributor's core.autocrlf setting.
3
+ * text=auto eol=lf
@@ -0,0 +1,91 @@
1
+ name: Bug report
2
+ description: Report incorrect or unexpected behaviour in aft-mcp
3
+ title: "[bug] "
4
+ type: Bug
5
+ labels:
6
+ - bug
7
+ body:
8
+ - type: markdown
9
+ attributes:
10
+ value: |
11
+ Thanks for taking the time to report a bug.
12
+
13
+ **Do not paste the contents of your `.env`**, passwords, or anything else from it. For security issues, do not open a public issue; use the private reporting link in `SECURITY.md` instead.
14
+
15
+ - type: textarea
16
+ id: description
17
+ attributes:
18
+ label: Describe the bug
19
+ description: A clear and concise description of the problem.
20
+ validations:
21
+ required: true
22
+
23
+ - type: textarea
24
+ id: steps
25
+ attributes:
26
+ label: Steps to reproduce
27
+ description: The prompt or tool call that triggers it, and what you did before.
28
+ placeholder: |
29
+ 1. Start the server with `uv run aft-mcp`
30
+ 2. Call `get_boards` from Claude Code
31
+ 3. ...
32
+ validations:
33
+ required: true
34
+
35
+ - type: textarea
36
+ id: expected
37
+ attributes:
38
+ label: Expected behaviour
39
+ validations:
40
+ required: true
41
+
42
+ - type: textarea
43
+ id: actual
44
+ attributes:
45
+ label: Actual behaviour
46
+ description: Include any error message or traceback, with credentials and URLs removed.
47
+ render: text
48
+ validations:
49
+ required: true
50
+
51
+ - type: input
52
+ id: tool
53
+ attributes:
54
+ label: Tool involved
55
+ description: The MCP tool name, if the bug is in one tool.
56
+ placeholder: e.g. patch_cards_by_card_id
57
+
58
+ - type: input
59
+ id: aft-mcp-version
60
+ attributes:
61
+ label: aft-mcp version or commit
62
+ placeholder: e.g. 0.1.0 or a1b2c3d
63
+ validations:
64
+ required: true
65
+
66
+ - type: input
67
+ id: aft-version
68
+ attributes:
69
+ label: AFT version
70
+ description: The version of the AFT instance the server talks to, if you know it.
71
+
72
+ - type: input
73
+ id: client
74
+ attributes:
75
+ label: MCP client
76
+ placeholder: e.g. Claude Code 2.3, Claude Desktop, Agent SDK
77
+ validations:
78
+ required: true
79
+
80
+ - type: input
81
+ id: environment
82
+ attributes:
83
+ label: Python version and operating system
84
+ placeholder: e.g. Python 3.14.1 on Windows 11
85
+ validations:
86
+ required: true
87
+
88
+ - type: textarea
89
+ id: context
90
+ attributes:
91
+ label: Additional context
@@ -0,0 +1,8 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Report a security vulnerability
4
+ url: https://github.com/samcorky/aft-mcp/security/advisories/new
5
+ about: Please report security issues privately, not as a public issue.
6
+ - name: A problem with AFT itself
7
+ url: https://github.com/sjefferson99/aft/issues
8
+ about: Bugs in the AFT application or its API belong in the AFT repository.
@@ -0,0 +1,27 @@
1
+ name: Documentation
2
+ description: Report something missing, wrong or unclear in the documentation
3
+ title: "[docs] "
4
+ type: Task
5
+ labels:
6
+ - documentation
7
+ body:
8
+ - type: input
9
+ id: location
10
+ attributes:
11
+ label: Where
12
+ description: The file and section, or a link.
13
+ placeholder: e.g. docs/clients.md, "Claude Desktop"
14
+ validations:
15
+ required: true
16
+
17
+ - type: textarea
18
+ id: problem
19
+ attributes:
20
+ label: What is wrong or missing
21
+ validations:
22
+ required: true
23
+
24
+ - type: textarea
25
+ id: suggestion
26
+ attributes:
27
+ label: Suggested change
@@ -0,0 +1,47 @@
1
+ name: Feature request
2
+ description: Suggest an improvement or new capability for aft-mcp
3
+ title: "[feature] "
4
+ type: Feature
5
+ labels:
6
+ - enhancement
7
+ body:
8
+ - type: markdown
9
+ attributes:
10
+ value: |
11
+ Thanks for suggesting an improvement.
12
+
13
+ Asking for a new **write** tool? Say whether the change can be undone through the MCP server. The server only exposes writes that are reversible, or that are clearly safe to undo in the AFT UI (see "What is exposed" in the README).
14
+
15
+ - type: textarea
16
+ id: summary
17
+ attributes:
18
+ label: Summary
19
+ description: A clear and concise description of the feature.
20
+ validations:
21
+ required: true
22
+
23
+ - type: textarea
24
+ id: motivation
25
+ attributes:
26
+ label: Motivation
27
+ description: What problem does this solve, or what would an agent be able to do?
28
+ validations:
29
+ required: true
30
+
31
+ - type: textarea
32
+ id: proposal
33
+ attributes:
34
+ label: Proposed solution
35
+ description: The behaviour you would like, and the AFT API endpoints involved if you know them.
36
+ validations:
37
+ required: true
38
+
39
+ - type: textarea
40
+ id: alternatives
41
+ attributes:
42
+ label: Alternatives considered
43
+
44
+ - type: textarea
45
+ id: context
46
+ attributes:
47
+ label: Additional context
@@ -0,0 +1,39 @@
1
+ # Ported from menagerist's image-tags action.
2
+ name: Image tags
3
+ description: >-
4
+ Work out the version tags of the Docker image for a release tag: the full version, the
5
+ month and year tags, and latest, each moved only when no newer release covers it. One
6
+ place for the rules, used to publish the tags and to preview them. The caller needs
7
+ the repository checked out with its full history and tags, and uv installed.
8
+
9
+ inputs:
10
+ tag:
11
+ description: The release tag, for example v2026.11.0 or v2026.11.0.post1.
12
+ required: true
13
+
14
+ outputs:
15
+ tags:
16
+ description: The partial tags as type=raw lines for docker/metadata-action.
17
+ value: ${{ steps.tags.outputs.tags }}
18
+ preview:
19
+ description: Every version tag the release publishes, comma separated, for display.
20
+ value: ${{ steps.tags.outputs.preview }}
21
+ held:
22
+ description: Tags the release must not move because a newer release covers them.
23
+ value: ${{ steps.tags.outputs.held }}
24
+
25
+ runs:
26
+ using: composite
27
+ steps:
28
+ # calver-scm reads the tag against the project's scheme and the repository's tags, so
29
+ # a tag it rejects, or a shallow clone, fails the step (pipefail) rather than moving
30
+ # latest without knowing what is newer. image_tags.py maps the scopes to image tags.
31
+ - name: Work out the tags
32
+ id: tags
33
+ shell: bash
34
+ env:
35
+ TAG: ${{ inputs.tag }}
36
+ run: |
37
+ set -o pipefail
38
+ uv run --locked --only-group release calver-scm --json parse "$TAG" --tag --against-repo \
39
+ | uv run --script scripts/image_tags.py
@@ -0,0 +1,42 @@
1
+ # Labels by changed paths, applied by pr-labeller.yml. Labels from the pull request
2
+ # title prefix are applied by the same workflow; labels are only ever added.
3
+ # Area labels say where a change is, not what kind of change it is, so they do not
4
+ # count towards the "at least one label" check and are not in release.yml.
5
+ "area: server":
6
+ - changed-files:
7
+ - any-glob-to-any-file:
8
+ - "src/aft_mcp/server.py"
9
+ - "src/aft_mcp/settings.py"
10
+ - "src/aft_mcp/board_guard.py"
11
+ - "src/aft_mcp/audit.py"
12
+
13
+ "area: converter":
14
+ - changed-files:
15
+ - any-glob-to-any-file:
16
+ - "src/aft_mcp/swagger_convert.py"
17
+
18
+ documentation:
19
+ - changed-files:
20
+ - any-glob-to-any-file:
21
+ - "**/*.md"
22
+ - ".github/ISSUE_TEMPLATE/**"
23
+
24
+ tests:
25
+ - changed-files:
26
+ - any-glob-to-any-file:
27
+ - "tests/**"
28
+
29
+ CI/CD:
30
+ - changed-files:
31
+ - any-glob-to-any-file:
32
+ - ".github/workflows/**"
33
+ - ".pre-commit-config.yaml"
34
+
35
+ # Only when every changed file is a manifest or lock file, so a feature that adds a
36
+ # dependency is not filed under Dependencies.
37
+ dependencies:
38
+ - changed-files:
39
+ - all-globs-to-all-files:
40
+ - "uv.lock"
41
+ - "pyproject.toml"
42
+ - ".github/renovate.json"
@@ -0,0 +1,49 @@
1
+ <!--
2
+ Give the pull request a Conventional Commits title, for example `feat: add a tool
3
+ for card labels` or `fix(converter): keep nullable on refs`. The labeller uses it to
4
+ group the release notes (see "Labels" in CONTRIBUTING.md).
5
+ -->
6
+
7
+ ## Description
8
+
9
+ <!-- What this changes and why. -->
10
+
11
+ Closes #
12
+
13
+ ## What's breaking
14
+
15
+ <!--
16
+ Delete this section unless the change breaks something people rely on, such as a
17
+ setting, a tool's name or how the server is started. Say what breaks and what to
18
+ change. The heading adds the breaking-change label, which puts the pull request
19
+ under "Breaking changes" in the release notes.
20
+ -->
21
+
22
+ ## Type of change
23
+
24
+ - [ ] Bug fix (non-breaking change that resolves an issue)
25
+ - [ ] New feature (non-breaking change that adds functionality)
26
+ - [ ] Breaking change (changes behaviour people rely on, such as a tool's name)
27
+ - [ ] Documentation
28
+ - [ ] Refactor or internal change (no behaviour change)
29
+ - [ ] Dependency or CI update
30
+
31
+ ## Checklist
32
+
33
+ - [ ] The hooks pass: `uv run poe hooks`.
34
+ - [ ] `uv run poe check` passes (ruff, mypy and pytest, with coverage at 100%).
35
+ - [ ] I have added or updated tests for the changed behaviour.
36
+ - [ ] I have updated the README where behaviour or configuration changed.
37
+ - [ ] No credentials, `.env` contents or private URLs are included.
38
+
39
+ ### Changes to what is exposed
40
+
41
+ <!-- Delete this section if the pull request does not touch ALLOWED_WRITES or SIDE_EFFECT_GET_PATTERNS. -->
42
+
43
+ - [ ] Every new write can be undone through the MCP server, or the README says it cannot.
44
+ - [ ] No `DELETE` route and no board-level write (create, rename, owner, public link, import) is exposed.
45
+ - [ ] The README's "What is exposed" section and the reviewed snapshots in `tests/test_server.py` are updated.
46
+
47
+ ## Testing notes
48
+
49
+ <!-- How a reviewer can check it, for example the tools to call against a test AFT board. -->
@@ -0,0 +1,34 @@
1
+ # Groups the generated release notes (the "Generate release notes" button, or
2
+ # `gh release create --generate-notes`) by pull request label. A pull request appears
3
+ # under the first category it matches, so the order matters. Labels are applied by
4
+ # pr-labeller.yml and Renovate; see "Labels" in CONTRIBUTING.md.
5
+ changelog:
6
+ exclude:
7
+ labels:
8
+ - skip-release-notes
9
+ categories:
10
+ - title: Breaking changes
11
+ labels:
12
+ - breaking-change
13
+ - title: Security
14
+ labels:
15
+ - security
16
+ - title: Enhancements
17
+ labels:
18
+ - enhancement
19
+ - performance
20
+ - title: Bug fixes
21
+ labels:
22
+ - bug
23
+ - title: Dependencies
24
+ labels:
25
+ - dependencies
26
+ - title: Housekeeping
27
+ labels:
28
+ - maintenance
29
+ - tests
30
+ - CI/CD
31
+ - documentation
32
+ - title: Other changes
33
+ labels:
34
+ - "*"
@@ -0,0 +1,168 @@
1
+ {
2
+ "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
+ "extends": [
4
+ "config:recommended",
5
+ ":dependencyDashboard",
6
+ ":semanticCommits",
7
+ ":automergeStableNonMajor",
8
+ ":automergeRequireAllStatusChecks",
9
+ ":configMigration",
10
+ ":enableVulnerabilityAlertsWithLabel(security)",
11
+ ":label(dependencies)",
12
+ ":maintainLockFilesWeekly",
13
+ ":rebaseStalePrs",
14
+ "helpers:pinGitHubActionDigests",
15
+ "security:minimumReleaseAgePypi"
16
+ ],
17
+ "internalChecksFilter": "strict",
18
+ "vulnerabilityAlerts": {
19
+ "minimumReleaseAge": null
20
+ },
21
+ "dependencyDashboard": {
22
+ "header": "This issue lists Renovate updates and detected dependencies; the [Dependency Dashboard](https://docs.renovatebot.com/key-concepts/dashboard/) docs explain the layout.\n\n**How we use Renovate**\n\n- Updates are raised before 9am (London) on Mondays. Security fixes are raised at any time, labelled `security`, and skip the release-age wait.\n- A new PyPI release is only proposed once it has been out for a while, so a bad release that gets pulled soon after publishing never reaches a pull request.\n- Minor, patch and digest updates automerge once every required check passes. Python dependencies, GitHub Actions, pre-commit hooks and the Docker images are each grouped into one pull request.\n- Major updates, the Python version and lock file maintenance need a manual review. The `requires-python` floor is never moved by Renovate.\n- Each rule in `.github/renovate.json` has a `description` that says why it exists.",
23
+ "footer": "See \"Dependencies\" in [CONTRIBUTING.md](https://github.com/samcorky/aft-mcp/blob/main/CONTRIBUTING.md) for how these rules are kept."
24
+ },
25
+ "enabledManagers": [
26
+ "pep621",
27
+ "github-actions",
28
+ "pre-commit",
29
+ "dockerfile",
30
+ "pyenv"
31
+ ],
32
+ "prHourlyLimit": 5,
33
+ "prConcurrentLimit": 5,
34
+ "schedule": [
35
+ "before 9am on Monday"
36
+ ],
37
+ "timezone": "Europe/London",
38
+ "packageRules": [
39
+ {
40
+ "description": "Dashboard headings, one per area of the repository (as in menagerist). They only change how the Dependency Dashboard is laid out.",
41
+ "matchManagers": [
42
+ "pep621"
43
+ ],
44
+ "dependencyDashboardCategory": "Python dependencies"
45
+ },
46
+ {
47
+ "description": "Dashboard heading for CI and tooling.",
48
+ "matchManagers": [
49
+ "github-actions",
50
+ "pre-commit"
51
+ ],
52
+ "dependencyDashboardCategory": "CI and tooling"
53
+ },
54
+ {
55
+ "description": "Dashboard heading for the Docker images.",
56
+ "matchManagers": [
57
+ "dockerfile"
58
+ ],
59
+ "dependencyDashboardCategory": "Docker images"
60
+ },
61
+ {
62
+ "description": "Dashboard heading for the Python version.",
63
+ "matchManagers": [
64
+ "pyenv"
65
+ ],
66
+ "dependencyDashboardCategory": "Python version"
67
+ },
68
+ {
69
+ "description": "Python dependencies: one PR for every non-major update.",
70
+ "matchManagers": [
71
+ "pep621"
72
+ ],
73
+ "matchUpdateTypes": [
74
+ "minor",
75
+ "patch"
76
+ ],
77
+ "groupName": "Python dependencies",
78
+ "semanticCommitType": "chore",
79
+ "semanticCommitScope": "deps"
80
+ },
81
+ {
82
+ "description": "GitHub Actions: grouped, with a ci type so the labeller files them under CI/CD.",
83
+ "matchManagers": [
84
+ "github-actions"
85
+ ],
86
+ "matchUpdateTypes": [
87
+ "minor",
88
+ "patch",
89
+ "digest"
90
+ ],
91
+ "groupName": "GitHub Actions",
92
+ "semanticCommitType": "ci",
93
+ "semanticCommitScope": "deps"
94
+ },
95
+ {
96
+ "description": "pre-commit hooks: grouped, keeping the frozen SHA pins.",
97
+ "matchManagers": [
98
+ "pre-commit"
99
+ ],
100
+ "matchUpdateTypes": [
101
+ "minor",
102
+ "patch",
103
+ "digest"
104
+ ],
105
+ "groupName": "pre-commit hooks",
106
+ "semanticCommitType": "ci",
107
+ "semanticCommitScope": "deps"
108
+ },
109
+ {
110
+ "description": "Docker images (Dockerfile: debian, distroless, uv): digest and patch bumps grouped and automerged once the image build and smoke test pass. Images are pinned by tag and digest.",
111
+ "matchManagers": [
112
+ "dockerfile"
113
+ ],
114
+ "matchUpdateTypes": [
115
+ "patch",
116
+ "digest",
117
+ "pin",
118
+ "pinDigest"
119
+ ],
120
+ "groupName": "Docker images",
121
+ "semanticCommitType": "build",
122
+ "semanticCommitScope": "deps"
123
+ },
124
+ {
125
+ "description": "uv in the Dockerfile: any update, grouped with the other images and automerged once CI's image build and smoke test pass.",
126
+ "matchManagers": [
127
+ "dockerfile"
128
+ ],
129
+ "matchPackageNames": [
130
+ "ghcr.io/astral-sh/uv"
131
+ ],
132
+ "groupName": "Docker images",
133
+ "semanticCommitType": "build",
134
+ "semanticCommitScope": "deps"
135
+ },
136
+ {
137
+ "description": "hatchling, hatch-vcs and calver-scm sit in build-system.requires and in the release group; move them together (as in menagerist).",
138
+ "matchManagers": [
139
+ "pep621"
140
+ ],
141
+ "matchPackageNames": [
142
+ "hatchling",
143
+ "hatch-vcs",
144
+ "calver-scm"
145
+ ],
146
+ "groupName": "Python build system",
147
+ "semanticCommitType": "build",
148
+ "semanticCommitScope": "deps"
149
+ },
150
+ {
151
+ "description": "The Python version (.python-version), which CI, the image and local development use, in one pull request reviewed by hand. The requires-python floor stays where it is, as in calver-scm, and CI keeps testing it.",
152
+ "matchManagers": [
153
+ "pyenv"
154
+ ],
155
+ "matchPackageNames": [
156
+ "python"
157
+ ],
158
+ "groupName": "Python interpreter",
159
+ "automerge": false,
160
+ "semanticCommitType": "build",
161
+ "semanticCommitScope": "deps",
162
+ "labels": [
163
+ "dependencies",
164
+ "python-version"
165
+ ]
166
+ }
167
+ ]
168
+ }
@@ -0,0 +1,60 @@
1
+ name: autofix.ci # needed by autofix.ci to securely identify the workflow
2
+
3
+ # Runs the pre-commit hooks on every pull request. Fixes the hooks make (whitespace,
4
+ # formatting, JSON layout) are pushed back as a commit by the autofix.ci app, then
5
+ # every hook is checked again, so this job fails on anything it could not fix.
6
+ # autofix.ci never edits files under .github/workflows, so fix those by hand.
7
+ on:
8
+ pull_request:
9
+
10
+ concurrency:
11
+ group: ${{ github.workflow }}-${{ github.ref }}
12
+ cancel-in-progress: true
13
+
14
+ permissions:
15
+ contents: read
16
+
17
+ env:
18
+ UV_LOCKED: "1"
19
+
20
+ jobs:
21
+ autofix:
22
+ name: "Hooks: prek (autofix)"
23
+ runs-on: ubuntu-latest
24
+ timeout-minutes: 15
25
+ env:
26
+ # Covered by ci.yml.
27
+ SKIP: mypy,pytest,no-push-to-main
28
+
29
+ steps:
30
+ - name: Checkout code
31
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
32
+
33
+ - name: Install uv
34
+ uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
35
+ with:
36
+ enable-cache: true
37
+
38
+ - name: Set up Python
39
+ run: uv python install
40
+
41
+ - name: Install dependencies
42
+ run: uv sync --dev
43
+
44
+ - name: Cache the hook environments
45
+ uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
46
+ with:
47
+ path: ~/.cache/prek
48
+ key: prek-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }}
49
+
50
+ - name: Apply hook fixes
51
+ # A hook that rewrites a file exits non-zero; autofix.ci commits the rewrites.
52
+ run: uv run prek run --all-files || true
53
+
54
+ - name: Push fixes
55
+ uses: autofix-ci/action@c5b2d67aa2274e7b5a18224e8171550871fc7e4a # v1.3.4
56
+ with:
57
+ commit-message: "style: apply hook fixes"
58
+
59
+ - name: Check hooks
60
+ run: uv run prek run --all-files