mainfast 0.1.3 → 0.2.0

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.
package/LICENSE CHANGED
@@ -1,21 +1,105 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Mainfast authors
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.
1
+ # Functional Source License, Version 1.1, ALv2 Future License
2
+
3
+ ## Abbreviation
4
+
5
+ FSL-1.1-ALv2
6
+
7
+ ## Notice
8
+
9
+ Copyright 2026 Siva Koza d.o.o.
10
+
11
+ ## Terms and Conditions
12
+
13
+ ### Licensor ("We")
14
+
15
+ The party offering the Software under these Terms and Conditions.
16
+
17
+ ### The Software
18
+
19
+ The "Software" is each version of the software that we make available under
20
+ these Terms and Conditions, as indicated by our inclusion of these Terms and
21
+ Conditions with the Software.
22
+
23
+ ### License Grant
24
+
25
+ Subject to your compliance with this License Grant and the Patents,
26
+ Redistribution and Trademark clauses below, we hereby grant you the right to
27
+ use, copy, modify, create derivative works, publicly perform, publicly display
28
+ and redistribute the Software for any Permitted Purpose identified below.
29
+
30
+ ### Permitted Purpose
31
+
32
+ A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
33
+ means making the Software available to others in a commercial product or
34
+ service that:
35
+
36
+ 1. substitutes for the Software;
37
+
38
+ 2. substitutes for any other product or service we offer using the Software
39
+ that exists as of the date we make the Software available; or
40
+
41
+ 3. offers the same or substantially similar functionality as the Software.
42
+
43
+ Permitted Purposes specifically include using the Software:
44
+
45
+ 1. for your internal use and access;
46
+
47
+ 2. for non-commercial education;
48
+
49
+ 3. for non-commercial research; and
50
+
51
+ 4. in connection with professional services that you provide to a licensee
52
+ using the Software in accordance with these Terms and Conditions.
53
+
54
+ ### Patents
55
+
56
+ To the extent your use for a Permitted Purpose would necessarily infringe our
57
+ patents, the license grant above includes a license under our patents. If you
58
+ make a claim against any party that the Software infringes or contributes to
59
+ the infringement of any patent, then your patent license to the Software ends
60
+ immediately.
61
+
62
+ ### Redistribution
63
+
64
+ The Terms and Conditions apply to all copies, modifications and derivatives of
65
+ the Software.
66
+
67
+ If you redistribute any copies, modifications or derivatives of the Software,
68
+ you must include a copy of or a link to these Terms and Conditions and not
69
+ remove any copyright notices provided in or with the Software.
70
+
71
+ ### Disclaimer
72
+
73
+ THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
74
+ IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
75
+ PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
76
+
77
+ IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
78
+ SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
79
+ EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
80
+
81
+ ### Trademarks
82
+
83
+ Except for displaying the License Details and identifying us as the origin of
84
+ the Software, you have no right under these Terms and Conditions to use our
85
+ trademarks, trade names, service marks or product names.
86
+
87
+ ## Grant of Future License
88
+
89
+ We hereby irrevocably grant you an additional license to use the Software under
90
+ the Apache License, Version 2.0 that is effective on the second anniversary of
91
+ the date we make the Software available. On or after that date, you may use the
92
+ Software under the Apache License, Version 2.0, in which case the following
93
+ will apply:
94
+
95
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
96
+ this file except in compliance with the License.
97
+
98
+ You may obtain a copy of the License at
99
+
100
+ http://www.apache.org/licenses/LICENSE-2.0
101
+
102
+ Unless required by applicable law or agreed to in writing, software distributed
103
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
104
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
105
+ specific language governing permissions and limitations under the License.
package/README.md CHANGED
@@ -17,7 +17,9 @@ token comes only from `GITHUB_TOKEN` or `GH_TOKEN` and is never printed.
17
17
 
18
18
  ## MCP
19
19
 
20
- `mainfast mcp` is an MCP server over stdio, with the tools `init`, `doctor`, `check` and `audit`:
20
+ `mainfast mcp` is an MCP server over stdio, with the tools `init`, `doctor`, `check` and `audit`.
21
+ It needs no key. In Claude Code: `claude mcp add mainfast -- npx -y mainfast mcp`. Cursor and most
22
+ other clients:
21
23
 
22
24
  ```json
23
25
  {
@@ -27,4 +29,7 @@ token comes only from `GITHUB_TOKEN` or `GH_TOKEN` and is never printed.
27
29
  }
28
30
  ```
29
31
 
32
+ VS Code, Codex and tokens: [docs/mcp.md](https://github.com/mainfast/mainfast/blob/main/docs/mcp.md).
33
+ Copy-paste prompts for coding agents: [prompts/](https://github.com/mainfast/mainfast/tree/main/prompts).
34
+
30
35
  Report problems in [GitHub issues](https://github.com/mainfast/mainfast/issues).
package/dist/mainfast.cjs CHANGED
@@ -14595,9 +14595,9 @@ var import_node_child_process = require("node:child_process");
14595
14595
  // package.json
14596
14596
  var package_default = {
14597
14597
  name: "mainfast",
14598
- version: "0.1.3",
14598
+ version: "0.2.0",
14599
14599
  description: "Set up and run Mainfast, GitHub checks that stop merges from silently breaking main. CLI and MCP server.",
14600
- license: "MIT",
14600
+ license: "FSL-1.1-ALv2",
14601
14601
  author: "Mainfast authors",
14602
14602
  type: "module",
14603
14603
  engines: {
@@ -14694,13 +14694,14 @@ var import_yaml = __toESM(require_dist(), 1);
14694
14694
 
14695
14695
  // ../brand.json
14696
14696
  var brand_default = {
14697
- _comment: "Single source of every brand string in the Mainfast suite. Edit here, then run `npm run brand:sync` at the suite root: it rewrites each package's action.yml, package.json, plugin.json and example workflows. TypeScript reads this file directly through @mainfast/shared/brand. Prose (README.md, docs/, SKILL.md) is not rewritten: grep for the old value after a rename. `npm run brand:check` (and test/brand.test.ts) fails when a generated file drifts.",
14697
+ _comment: "Single source of every brand string in the Mainfast suite. Edit here, then run `npm run brand:sync` at the suite root: it rewrites each package's action.yml, package.json, LICENSE pointer and example workflows. TypeScript reads this file directly through @mainfast/shared/brand. Prose (README.md, docs/, prompts/) is not rewritten: grep for the old value after a rename. `npm run brand:check` (and test/brand.test.ts) fails when a generated file drifts.",
14698
14698
  suite: {
14699
14699
  name: "Mainfast",
14700
14700
  version: "0.1.0",
14701
14701
  author: "Mainfast authors",
14702
14702
  copyrightYear: "2026",
14703
- license: "MIT",
14703
+ license: "FSL-1.1-ALv2",
14704
+ licenseUrl: "https://github.com/mainfast/mainfast/blob/main/LICENSE",
14704
14705
  githubOrg: "mainfast",
14705
14706
  githubRepo: "mainfast",
14706
14707
  homepageUrl: "https://github.com/mainfast/mainfast",
@@ -14713,26 +14714,7 @@ var brand_default = {
14713
14714
  configFile: ".mainfast.yml",
14714
14715
  configFileAlt: ".mainfast.yaml",
14715
14716
  schemaUrl: "https://raw.githubusercontent.com/mainfast/mainfast/main/schema/mainfast.schema.json",
14716
- envPrefix: "MAINFAST",
14717
- licenseEnv: "MAINFAST_LICENSE",
14718
- plan: {
14719
- freeActiveContributors: 5,
14720
- windowDays: 30,
14721
- proPricePerContributorMonth: "$4",
14722
- _benefitIds: "Polar license-key benefit id of each plan: a key whose benefit_id is `pro` is Mainfast Pro; `free` is the optional free key (registered user, not Pro).",
14723
- benefitIds: {
14724
- free: "656e762a-ec6e-4e94-b7fd-f7ff879061ca",
14725
- pro: "ea9b4fcb-3659-404e-bb62-9bec84fb119a"
14726
- }
14727
- },
14728
- polar: {
14729
- _comment: "License keys are checked with Polar's public customer-portal endpoint POST {api}/v1/customer-portal/license-keys/validate {key, organization_id}: no merchant secret. These are the live Polar values. While organizationId is all zeros no key is sent anywhere. apiEnv / orgEnv override both, e.g. the sandbox.",
14730
- api: "https://api.polar.sh",
14731
- organizationId: "3a0d763f-8fac-4df0-898a-a59eb60d3506",
14732
- apiEnv: "MAINFAST_POLAR_API",
14733
- orgEnv: "MAINFAST_POLAR_ORG",
14734
- timeoutMs: 3e3
14735
- }
14717
+ envPrefix: "MAINFAST"
14736
14718
  },
14737
14719
  products: {
14738
14720
  intact: {
@@ -15085,7 +15067,7 @@ var package_default2 = {
15085
15067
  version: "0.1.0",
15086
15068
  private: true,
15087
15069
  description: "Mainfast Evidence: proof, not review, for pull requests written by coding agents.",
15088
- license: "MIT",
15070
+ license: "FSL-1.1-ALv2",
15089
15071
  author: "Mainfast authors",
15090
15072
  type: "module",
15091
15073
  engines: {
@@ -16153,11 +16135,12 @@ var AGENT_CATALOG = [
16153
16135
  bodyMarkers: [/\b(?:app|preview)\.devin\.ai\/sessions\//i, /\blink to devin run\b/i]
16154
16136
  },
16155
16137
  {
16156
- id: "dawnpatch",
16157
- name: "Dawnpatch",
16158
- logins: ["dawnpatch[bot]"],
16159
- branchPrefixes: ["dawnpatch/"],
16160
- trailers: [/^co-authored-by:\s*dawnpatch\b/im],
16138
+ // Dawnfix (formerly Dawnpatch): its fix job opens draft PRs from `dawnfix/<fingerprint>` branches.
16139
+ id: "dawnfix",
16140
+ name: "Dawnfix",
16141
+ logins: ["dawnfix[bot]", "dawnpatch[bot]"],
16142
+ branchPrefixes: ["dawnfix/", "dawnpatch/"],
16143
+ trailers: [/^co-authored-by:\s*(?:dawnfix|dawnpatch)\b/im],
16161
16144
  emails: [],
16162
16145
  bodyMarkers: []
16163
16146
  },
@@ -16632,7 +16615,7 @@ var FLAG_FIXES = {
16632
16615
  // ../evidence/src/github/api.ts
16633
16616
  var enc2 = encodeURIComponent;
16634
16617
  var RestClient = class {
16635
- /** The shared transport, for callers that need plain REST (the plan gate). */
16618
+ /** The shared transport, for callers that need plain REST. */
16636
16619
  gh;
16637
16620
  constructor(token, opts = {}) {
16638
16621
  this.gh = new GitHub({ token, apiUrl: opts.baseUrl ?? DEFAULT_API_URL, userAgent: USER_AGENT, fetch: opts.fetch });
@@ -18483,7 +18466,7 @@ var package_default3 = {
18483
18466
  version: "0.1.0",
18484
18467
  private: true,
18485
18468
  description: "Mainfast Intact: prove merge commits did not silently drop changes from main.",
18486
- license: "MIT",
18469
+ license: "FSL-1.1-ALv2",
18487
18470
  author: "Mainfast authors",
18488
18471
  type: "module",
18489
18472
  engines: {
@@ -18879,7 +18862,7 @@ var package_default4 = {
18879
18862
  version: "0.1.0",
18880
18863
  private: true,
18881
18864
  description: "Mainfast Migrations: database migration guard.",
18882
- license: "MIT",
18865
+ license: "FSL-1.1-ALv2",
18883
18866
  author: "Mainfast authors",
18884
18867
  type: "module",
18885
18868
  engines: {
@@ -20372,7 +20355,7 @@ var package_default5 = {
20372
20355
  version: "0.1.0",
20373
20356
  private: true,
20374
20357
  description: "Mainfast Owners: CODEOWNERS drift check.",
20375
- license: "MIT",
20358
+ license: "FSL-1.1-ALv2",
20376
20359
  author: "Mainfast authors",
20377
20360
  type: "module",
20378
20361
  engines: {
@@ -21133,7 +21116,7 @@ var package_default6 = {
21133
21116
  version: "0.1.0",
21134
21117
  private: true,
21135
21118
  description: "Mainfast Rollcall: required-check integrity audit.",
21136
- license: "MIT",
21119
+ license: "FSL-1.1-ALv2",
21137
21120
  author: "Mainfast authors",
21138
21121
  type: "module",
21139
21122
  engines: {
@@ -22167,19 +22150,94 @@ var import_node_fs11 = require("node:fs");
22167
22150
  var import_node_path8 = require("node:path");
22168
22151
 
22169
22152
  // raw:../evidence/examples/workflows/evidence.yml
22170
- var evidence_default = '# Copy to .github/workflows/mainfast-evidence.yml.\n#\n# Two jobs on purpose:\n# - pr (pull_request, same-repository PRs): re-evaluates on every push, edit and label change.\n# Runs with the PR\'s own workflow file and an ordinary token; checks out the PR head only to\n# diff it locally (nothing from it is run).\n# - ci (workflow_run): re-evaluates once your CI finishes, so "tests ran on THIS sha" sees the\n# final result, and gives fork PRs a card. workflow_run always runs THIS file from the default\n# branch with a write token, so it never checks out or runs PR code: the diff, the policy\n# (.mainfast.yml at the PR\'s base commit) and the checks all come from the API. The coverage\n# artifact is data the PR\'s CI run produced: parsed, never executed.\n# Make the "Mainfast Evidence" check required in your ruleset to gate merges on it.\n# Never put ${{ github.event.* }} text (branch names, titles, commit messages) into a `run:` step.\nname: Evidence\n\non:\n pull_request:\n types: [opened, synchronize, reopened, edited, labeled, unlabeled, ready_for_review]\n workflow_run:\n workflows: [CI] # the name of your test workflow\n types: [completed]\n\npermissions: {}\n\njobs:\n pr:\n # Fork PRs get a read-only token here and could not post; the ci job covers them.\n if: github.event_name == \'pull_request\' && github.event.pull_request.head.repo.full_name == github.repository\n runs-on: ubuntu-latest\n permissions:\n contents: read\n checks: write\n pull-requests: write\n statuses: read # commit statuses (e.g. ci/circleci: \u2026) count as checks\n concurrency:\n group: evidence-pr-${{ github.event.pull_request.number }}\n cancel-in-progress: true\n steps:\n - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0\n with:\n fetch-depth: 0 # full history: local diff without GitHub\'s patch truncation, plus git-ai notes\n ref: ${{ github.event.pull_request.head.sha }}\n # credentials stay so the Action can fetch refs/notes/ai (git-ai) in a private repo\n - uses: mainfast/evidence@v0\n with:\n # license: ${{ secrets.MAINFAST_LICENSE }} # Pro: private repos with more than 5 active contributors\n # Give CI a few minutes so the first card is not "no tests ran".\n wait-for-checks: "600"\n\n ci:\n if: github.event_name == \'workflow_run\'\n runs-on: ubuntu-latest\n permissions:\n contents: read\n checks: write\n pull-requests: write\n statuses: read # commit statuses (e.g. ci/circleci: \u2026) count as checks\n actions: read # download the coverage artifact from the CI run\n concurrency:\n group: evidence-ci-${{ github.event.workflow_run.head_sha }}\n cancel-in-progress: true\n steps:\n # No actions/checkout: this job holds a write token, so PR code never lands on its disk.\n # Optional: changed-line coverage from the CI run\'s artifact (data only).\n - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2\n continue-on-error: true\n with:\n name: coverage\n path: coverage\n run-id: ${{ github.event.workflow_run.id }}\n github-token: ${{ github.token }}\n\n - uses: mainfast/evidence@v0\n with:\n # license: ${{ secrets.MAINFAST_LICENSE }}\n coverage-files: coverage/lcov.info\n local-diff: "false" # no checkout in this job: the diff comes from the API\n';
22153
+ var evidence_default = `# Copy to .github/workflows/mainfast-evidence.yml.
22154
+ #
22155
+ # Two jobs on purpose:
22156
+ # - pr (pull_request, same-repository PRs): re-evaluates on every push, edit and label change.
22157
+ # Runs with the PR's own workflow file and an ordinary token; checks out the PR head only to
22158
+ # diff it locally (nothing from it is run).
22159
+ # - ci (workflow_run): re-evaluates once your CI finishes, so "tests ran on THIS sha" sees the
22160
+ # final result, and gives fork PRs a card. workflow_run always runs THIS file from the default
22161
+ # branch with a write token, so it never checks out or runs PR code: the diff, the policy
22162
+ # (.mainfast.yml at the PR's base commit) and the checks all come from the API. The coverage
22163
+ # artifact is data the PR's CI run produced: parsed, never executed.
22164
+ # Make the "Mainfast Evidence" check required in your ruleset to gate merges on it.
22165
+ # Never put \${{ github.event.* }} text (branch names, titles, commit messages) into a \`run:\` step.
22166
+ name: Evidence
22167
+
22168
+ on:
22169
+ pull_request:
22170
+ types: [opened, synchronize, reopened, edited, labeled, unlabeled, ready_for_review]
22171
+ workflow_run:
22172
+ workflows: [CI] # the name of your test workflow
22173
+ types: [completed]
22174
+
22175
+ permissions: {}
22176
+
22177
+ jobs:
22178
+ pr:
22179
+ # Fork PRs get a read-only token here and could not post; the ci job covers them.
22180
+ if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
22181
+ runs-on: ubuntu-latest
22182
+ permissions:
22183
+ contents: read
22184
+ checks: write
22185
+ pull-requests: write
22186
+ statuses: read # commit statuses (e.g. ci/circleci: \u2026) count as checks
22187
+ concurrency:
22188
+ group: evidence-pr-\${{ github.event.pull_request.number }}
22189
+ cancel-in-progress: true
22190
+ steps:
22191
+ - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
22192
+ with:
22193
+ fetch-depth: 0 # full history: local diff without GitHub's patch truncation, plus git-ai notes
22194
+ ref: \${{ github.event.pull_request.head.sha }}
22195
+ # credentials stay so the Action can fetch refs/notes/ai (git-ai) in a private repo
22196
+ - uses: mainfast/evidence@v0
22197
+ with:
22198
+ # Give CI a few minutes so the first card is not "no tests ran".
22199
+ wait-for-checks: "600"
22200
+
22201
+ ci:
22202
+ if: github.event_name == 'workflow_run'
22203
+ runs-on: ubuntu-latest
22204
+ permissions:
22205
+ contents: read
22206
+ checks: write
22207
+ pull-requests: write
22208
+ statuses: read # commit statuses (e.g. ci/circleci: \u2026) count as checks
22209
+ actions: read # download the coverage artifact from the CI run
22210
+ concurrency:
22211
+ group: evidence-ci-\${{ github.event.workflow_run.head_sha }}
22212
+ cancel-in-progress: true
22213
+ steps:
22214
+ # No actions/checkout: this job holds a write token, so PR code never lands on its disk.
22215
+ # Optional: changed-line coverage from the CI run's artifact (data only).
22216
+ - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
22217
+ continue-on-error: true
22218
+ with:
22219
+ name: coverage
22220
+ path: coverage
22221
+ run-id: \${{ github.event.workflow_run.id }}
22222
+ github-token: \${{ github.token }}
22223
+
22224
+ - uses: mainfast/evidence@v0
22225
+ with:
22226
+ coverage-files: coverage/lcov.info
22227
+ local-diff: "false" # no checkout in this job: the diff comes from the API
22228
+ `;
22171
22229
 
22172
22230
  // raw:../intact/examples/mainfast-intact.yml
22173
- var mainfast_intact_default = "# Copy to .github/workflows/mainfast-intact.yml\nname: Mainfast Intact\n\non:\n pull_request:\n push:\n branches-ignore:\n - main # your default branch: PR merges into it are clean by construction\n\npermissions:\n contents: read\n checks: write # optional: without it the action reports via job summary + annotations\n\njobs:\n intact:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0\n with:\n fetch-depth: 0 # the check needs both parents and the merge base\n ref: ${{ github.event.pull_request.head.sha || github.sha }}\n - uses: mainfast/intact@v0\n # Report-only by default. To fail the job, uncomment `with:` and `fail-on:` (error fails\n # on dropped changes; warning also fails on evil merges and partial drops).\n # with:\n # fail-on: warning\n # license: ${{ secrets.MAINFAST_LICENSE }} # Pro: private repos with more than 5 active contributors\n";
22231
+ var mainfast_intact_default = "# Copy to .github/workflows/mainfast-intact.yml\nname: Mainfast Intact\n\non:\n pull_request:\n push:\n branches-ignore:\n - main # your default branch: PR merges into it are clean by construction\n\npermissions:\n contents: read\n checks: write # optional: without it the action reports via job summary + annotations\n\njobs:\n intact:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0\n with:\n fetch-depth: 0 # the check needs both parents and the merge base\n ref: ${{ github.event.pull_request.head.sha || github.sha }}\n - uses: mainfast/intact@v0\n # Report-only by default. To fail the job, uncomment `with:` and `fail-on:` (error fails\n # on dropped changes; warning also fails on evil merges and partial drops).\n # with:\n # fail-on: warning\n";
22174
22232
 
22175
22233
  // raw:../migrations/examples/mainfast-migrations.yml
22176
- var mainfast_migrations_default = '# Copy to .github/workflows/mainfast-migrations.yml.\n#\n# pull_request: checks this PR\'s migrations against the current main.\n# push to main: re-checks every open PR, because main moving can make a clean PR stale.\n# Both set the commit status `mainfast/migrations` on the PR head (failure = stale, success = clean).\n# Only that status blocks a merge, and only once branch protection (or a ruleset) requires it:\n# Settings > Branches > main > Require status checks > add "mainfast/migrations".\nname: Mainfast Migrations\non:\n pull_request:\n push:\n branches: [main]\n\npermissions:\n contents: read\n pull-requests: write # sticky comment + stale label on PRs\n statuses: write # the blocking mainfast/migrations commit status\n\nconcurrency:\n group: mainfast-migrations-${{ github.event.pull_request.number || github.ref }}\n cancel-in-progress: true\n\njobs:\n migrations:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0\n with:\n fetch-depth: 0 # the merge-base must be reachable\n - uses: mainfast/migrations@v0\n # with:\n # status: false # no commit status: comment + label only (then nothing blocks the merge)\n # license: ${{ secrets.MAINFAST_LICENSE }} # Pro: private repos with more than 5 active contributors\n';
22234
+ var mainfast_migrations_default = '# Copy to .github/workflows/mainfast-migrations.yml.\n#\n# pull_request: checks this PR\'s migrations against the current main.\n# push to main: re-checks every open PR, because main moving can make a clean PR stale.\n# Both set the commit status `mainfast/migrations` on the PR head (failure = stale, success = clean).\n# Only that status blocks a merge, and only once branch protection (or a ruleset) requires it:\n# Settings > Branches > main > Require status checks > add "mainfast/migrations".\nname: Mainfast Migrations\non:\n pull_request:\n push:\n branches: [main]\n\npermissions:\n contents: read\n pull-requests: write # sticky comment + stale label on PRs\n statuses: write # the blocking mainfast/migrations commit status\n\nconcurrency:\n group: mainfast-migrations-${{ github.event.pull_request.number || github.ref }}\n cancel-in-progress: true\n\njobs:\n migrations:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0\n with:\n fetch-depth: 0 # the merge-base must be reachable\n - uses: mainfast/migrations@v0\n # with:\n # status: false # no commit status: comment + label only (then nothing blocks the merge)\n';
22177
22235
 
22178
22236
  // raw:../owners/examples/owners.yml
22179
- var owners_default = "# Copy to .github/workflows/mainfast-owners.yml.\n# No checkout step: Owners reads CODEOWNERS, .mainfast.yml and the tree through the API at the\n# right refs (the PR's base branch, the PR's head when it edits CODEOWNERS, the default branch\n# for the weekly audit), never from a checkout.\nname: Code owners\non:\n pull_request: # changed files judged with the base CODEOWNERS; a CODEOWNERS edit is linted on its own\n schedule:\n - cron: \"23 6 * * 1\" # weekly full audit, with dormant owners (180 days by default)\n workflow_dispatch:\n\npermissions:\n contents: read # CODEOWNERS, .mainfast.yml, git tree\n pull-requests: write # PR files + the one sticky comment\n\nconcurrency:\n group: mainfast-owners-${{ github.event.pull_request.number || github.ref }}\n cancel-in-progress: true\n\njobs:\n owners:\n runs-on: ubuntu-latest\n steps:\n - uses: mainfast/owners@v0\n with:\n # Optional: org membership, team existence and team access. GITHUB_TOKEN cannot read\n # them; a fine-grained token (or GitHub App token) with Organization > Members: read\n # can. Without it those checks are skipped with one note. Never used on fork PRs.\n org-token: ${{ secrets.MAINFAST_OWNERS_ORG_TOKEN }}\n # license: ${{ secrets.MAINFAST_LICENSE }} # Pro: private repos with more than 5 active contributors\n";
22237
+ var owners_default = "# Copy to .github/workflows/mainfast-owners.yml.\n# No checkout step: Owners reads CODEOWNERS, .mainfast.yml and the tree through the API at the\n# right refs (the PR's base branch, the PR's head when it edits CODEOWNERS, the default branch\n# for the weekly audit), never from a checkout.\nname: Code owners\non:\n pull_request: # changed files judged with the base CODEOWNERS; a CODEOWNERS edit is linted on its own\n schedule:\n - cron: \"23 6 * * 1\" # weekly full audit, with dormant owners (180 days by default)\n workflow_dispatch:\n\npermissions:\n contents: read # CODEOWNERS, .mainfast.yml, git tree\n pull-requests: write # PR files + the one sticky comment\n\nconcurrency:\n group: mainfast-owners-${{ github.event.pull_request.number || github.ref }}\n cancel-in-progress: true\n\njobs:\n owners:\n runs-on: ubuntu-latest\n steps:\n - uses: mainfast/owners@v0\n with:\n # Optional: org membership, team existence and team access. GITHUB_TOKEN cannot read\n # them; a fine-grained token (or GitHub App token) with Organization > Members: read\n # can. Without it those checks are skipped with one note. Never used on fork PRs.\n org-token: ${{ secrets.MAINFAST_OWNERS_ORG_TOKEN }}\n";
22180
22238
 
22181
22239
  // raw:../rollcall/examples/rollcall.yml
22182
- var rollcall_default = '# Copy to .github/workflows/mainfast-rollcall.yml.\n# No checkout step: Rollcall reads .mainfast.yml (default branch) and .github/workflows (audited\n# branch) through the API, so a manual run from any branch audits exactly what the schedule does.\nname: Required-check audit\non:\n schedule:\n - cron: "17 6 * * 1" # Mondays: also catches ruleset changes, which trigger no workflow event\n workflow_dispatch: # run it by hand after editing a ruleset\n branch_protection_rule: # classic branch protection created / edited / deleted\n push:\n branches: [main]\n paths: [".github/workflows/**", ".mainfast.yml"]\n\npermissions:\n contents: read # .mainfast.yml, workflow files, "Get a branch" (classic required checks)\n pull-requests: read # the merged and open PRs to sample\n statuses: read # commit statuses on each sampled PR head\n checks: write # read check runs, post the Rollcall check run\n issues: write # the one tracking issue\n\nconcurrency:\n group: mainfast-rollcall\n cancel-in-progress: true\n\njobs:\n rollcall:\n runs-on: ubuntu-latest\n steps:\n - uses: mainfast/rollcall@v0\n with:\n # license: ${{ secrets.MAINFAST_LICENSE }} # Pro: private repos with more than 5 active contributors\n pulls: 30\n';
22240
+ var rollcall_default = '# Copy to .github/workflows/mainfast-rollcall.yml.\n# No checkout step: Rollcall reads .mainfast.yml (default branch) and .github/workflows (audited\n# branch) through the API, so a manual run from any branch audits exactly what the schedule does.\nname: Required-check audit\non:\n schedule:\n - cron: "17 6 * * 1" # Mondays: also catches ruleset changes, which trigger no workflow event\n workflow_dispatch: # run it by hand after editing a ruleset\n branch_protection_rule: # classic branch protection created / edited / deleted\n push:\n branches: [main]\n paths: [".github/workflows/**", ".mainfast.yml"]\n\npermissions:\n contents: read # .mainfast.yml, workflow files, "Get a branch" (classic required checks)\n pull-requests: read # the merged and open PRs to sample\n statuses: read # commit statuses on each sampled PR head\n checks: write # read check runs, post the Rollcall check run\n issues: write # the one tracking issue\n\nconcurrency:\n group: mainfast-rollcall\n cancel-in-progress: true\n\njobs:\n rollcall:\n runs-on: ubuntu-latest\n steps:\n - uses: mainfast/rollcall@v0\n with:\n pulls: 30\n';
22183
22241
 
22184
22242
  // src/templates.ts
22185
22243
  var WORKFLOWS = { intact: mainfast_intact_default, migrations: mainfast_migrations_default, rollcall: rollcall_default, owners: owners_default, evidence: evidence_default };
@@ -22254,7 +22312,7 @@ function runInit(opts) {
22254
22312
  "",
22255
22313
  "Next:",
22256
22314
  ...steps.map((s) => `- ${s}`),
22257
- `- Optional: the hosted GitHub App runs these without workflow files: ${hostedAppUrl()}`
22315
+ `- Optional, for organizations: ${SUITE.name} Enterprise, the hosted GitHub App, runs these without workflow files and adds a dashboard and alerts: ${SUITE.pricingUrl}`
22258
22316
  ];
22259
22317
  return { exitCode: 0, json, text: lines.join("\n") };
22260
22318
  }
@@ -32354,7 +32412,7 @@ ${HELP2[""]}`);
32354
32412
  return 2;
32355
32413
  }
32356
32414
  } catch (e) {
32357
- const message = redact(e instanceof Error ? e.message : String(e));
32415
+ const message = redact(e instanceof Error ? e.message : String(e)).replace(/^(?:mainfast: )+/, "");
32358
32416
  process.stderr.write(`mainfast: ${message}
32359
32417
  `);
32360
32418
  if (json) process.stdout.write(`${JSON.stringify({ schema: SCHEMA, command, ok: false, error: message }, null, 2)}
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "mainfast",
3
- "version": "0.1.3",
3
+ "version": "0.2.0",
4
4
  "description": "Set up and run Mainfast, GitHub checks that stop merges from silently breaking main. CLI and MCP server.",
5
- "license": "MIT",
5
+ "license": "FSL-1.1-ALv2",
6
6
  "author": "Mainfast authors",
7
7
  "type": "module",
8
8
  "engines": {