toolframe-llms-txt 0.2.1__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.
@@ -0,0 +1,59 @@
1
+ name: Python CI
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+ workflow_dispatch:
7
+ workflow_call:
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ # This workflow is also called by publish.yml. Do not give it a concurrency
13
+ # group that can cancel its caller.
14
+ jobs:
15
+ validate:
16
+ name: Validate Python package
17
+ runs-on: ubuntu-24.04
18
+ timeout-minutes: 20
19
+ steps:
20
+ - name: Check out this revision
21
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
22
+ with:
23
+ ref: ${{ github.sha }}
24
+ path: toolframe-llms-txt
25
+ persist-credentials: false
26
+
27
+ - name: Check out pinned SDK
28
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
29
+ with:
30
+ repository: ${{ vars.TOOLFRAME_REPOSITORY_OWNER || github.repository_owner }}/toolframe-sdk
31
+ token: ${{ secrets.TOOLFRAME_READ_TOKEN || github.token }}
32
+ ref: ef91b609137a5fe7bae8e0c893e74b096ff06ffe
33
+ path: toolframe-sdk
34
+ persist-credentials: false
35
+
36
+ - name: Set up Python
37
+ uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
38
+ with:
39
+ python-version: '3.14.7'
40
+
41
+ - name: Set up uv
42
+ uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
43
+ with:
44
+ version: '0.12.8'
45
+ enable-cache: false
46
+
47
+ - name: Run isolated local validation
48
+ working-directory: toolframe-llms-txt
49
+ run: bash scripts/ci.sh ../toolframe-sdk "$RUNNER_TEMP/toolframe-llms-txt-dist"
50
+
51
+ - name: Save validated distributions
52
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
53
+ with:
54
+ name: python-distributions
55
+ path: |
56
+ ${{ runner.temp }}/toolframe-llms-txt-dist/*.whl
57
+ ${{ runner.temp }}/toolframe-llms-txt-dist/*.tar.gz
58
+ if-no-files-found: error
59
+ retention-days: 7
@@ -0,0 +1,73 @@
1
+ name: Publish Python package
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ repository:
7
+ description: Package index
8
+ type: choice
9
+ required: true
10
+ default: testpypi
11
+ options:
12
+ - testpypi
13
+ - pypi
14
+
15
+ permissions:
16
+ contents: read
17
+
18
+ concurrency:
19
+ group: publish-${{ github.ref }}-${{ inputs.repository }}
20
+ cancel-in-progress: false
21
+
22
+ jobs:
23
+ check-release:
24
+ name: Require a matching version tag
25
+ runs-on: ubuntu-24.04
26
+ timeout-minutes: 5
27
+ steps:
28
+ - name: Check out this revision
29
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
30
+ with:
31
+ ref: ${{ github.sha }}
32
+ persist-credentials: false
33
+
34
+ - name: Set up Python
35
+ uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
36
+ with:
37
+ python-version: '3.14.7'
38
+
39
+ - name: Check tag against project version
40
+ env:
41
+ PUBLISH_REPOSITORY: ${{ inputs.repository }}
42
+ run: python scripts/check_release.py "$GITHUB_REF"
43
+
44
+ validate:
45
+ name: Validate the release revision
46
+ needs: check-release
47
+ uses: ./.github/workflows/ci.yml
48
+ secrets: inherit
49
+ permissions:
50
+ contents: read
51
+
52
+ publish:
53
+ name: Publish validated distributions
54
+ needs: validate
55
+ runs-on: ubuntu-24.04
56
+ timeout-minutes: 10
57
+ environment:
58
+ name: ${{ inputs.repository }}
59
+ url: ${{ inputs.repository == 'testpypi' && 'https://test.pypi.org/p/toolframe-llms-txt' || 'https://pypi.org/p/toolframe-llms-txt' }}
60
+ permissions:
61
+ id-token: write
62
+ steps:
63
+ - name: Download distributions from this run
64
+ uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
65
+ with:
66
+ name: python-distributions
67
+ path: dist
68
+
69
+ - name: Publish with Trusted Publishing
70
+ uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
71
+ with:
72
+ repository-url: ${{ inputs.repository == 'testpypi' && 'https://test.pypi.org/legacy/' || 'https://upload.pypi.org/legacy/' }}
73
+ packages-dir: dist/
@@ -0,0 +1,17 @@
1
+ .venv/
2
+ __pycache__/
3
+ *.py[cod]
4
+ .pytest_cache/
5
+ .ruff_cache/
6
+ dist/
7
+ *.egg-info/
8
+ .coverage
9
+ .DS_Store
10
+ /build/
11
+ /.coverage
12
+ /htmlcov/
13
+
14
+ # Local working documents, issue state, and development worktrees.
15
+ /.local/
16
+ /.issues/
17
+ /.worktrees/
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,2 @@
1
+ toolframe-llms-txt
2
+ Copyright 2026 byfb
@@ -0,0 +1,74 @@
1
+ Metadata-Version: 2.5
2
+ Name: toolframe-llms-txt
3
+ Version: 0.2.1
4
+ Summary: Standalone llms.txt provider for Toolframe
5
+ Project-URL: Homepage, https://github.com/toolframe/toolframe-llms-txt
6
+ Project-URL: Repository, https://github.com/toolframe/toolframe-llms-txt
7
+ Project-URL: Documentation, https://github.com/toolframe/toolframe-llms-txt#readme
8
+ Project-URL: Issues, https://github.com/toolframe/toolframe-llms-txt/issues
9
+ Author-email: byfb <62798989+byfb@users.noreply.github.com>
10
+ License-Expression: Apache-2.0
11
+ License-File: LICENSE
12
+ License-File: NOTICE
13
+ Requires-Python: >=3.14
14
+ Requires-Dist: starlette==1.6.0
15
+ Requires-Dist: toolframe-sdk<0.4,>=0.2
16
+ Requires-Dist: uvicorn==0.42.0
17
+ Description-Content-Type: text/markdown
18
+
19
+ # Toolframe llms.txt provider
20
+
21
+ `toolframe-llms-txt` is the standalone Toolframe provider for serving the
22
+ selected set of `llms.document` resources. The provider owns the public
23
+ `/llms.txt` index and the linked `/llms/{owner}/{document}.md` documents; it
24
+ serves document text supplied in `OwnedResource.content` and never opens a
25
+ package path or scans a filesystem at request time.
26
+
27
+ ## Install
28
+
29
+ Install the provider into a running [Toolframe application](https://github.com/toolframe/toolframe-core#readme):
30
+
31
+ ```sh
32
+ toolframe --home APP plugin add pypi:toolframe-llms-txt==0.2.1 --enable
33
+ ```
34
+
35
+ Core resolves dependencies and manages the provider's isolated Python environment.
36
+ The Entry Register template already includes this provider.
37
+
38
+ Each `prepare` call validates and stages a complete immutable document set for
39
+ its epoch. Staging and aborting leave the current HTTP responses unchanged.
40
+ `commit` atomically selects one staged epoch, replacing the index and its
41
+ documents together. A later epoch can contain fewer or no documents, which
42
+ withdraws entries from the live provider. Other staged epochs remain available
43
+ until they are committed or aborted.
44
+
45
+ The optional `intro` configuration string is placed before the deterministic,
46
+ owner and document ID sorted link list.
47
+
48
+ From this directory, install the development environment and run the checks:
49
+
50
+ ```sh
51
+ uv sync --group dev
52
+ uv run pytest -q
53
+ uv run ruff check src tests
54
+ uv run ruff format --check src tests
55
+ uv build --wheel
56
+ ```
57
+
58
+ For the complete, isolated CI check (including sdist/wheel metadata, licenses,
59
+ real dependency installation, and installed-wheel HTTP checks), run:
60
+
61
+ ```sh
62
+ bash scripts/ci.sh
63
+ ```
64
+
65
+ This requires Python 3.14.7, uv 0.12.8, and a sibling `toolframe-sdk` Git
66
+ checkout containing the pinned SDK revision. It leaves the working development
67
+ environment untouched. See [CI and publishing](docs/ci.md) for the dependency
68
+ pin, workflow triggers, release commands, and required external setup.
69
+
70
+ For release validation and Trusted Publisher setup, see [releasing](docs/releasing.md).
71
+
72
+ ## License
73
+
74
+ Licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) and [NOTICE](NOTICE).
@@ -0,0 +1,56 @@
1
+ # Toolframe llms.txt provider
2
+
3
+ `toolframe-llms-txt` is the standalone Toolframe provider for serving the
4
+ selected set of `llms.document` resources. The provider owns the public
5
+ `/llms.txt` index and the linked `/llms/{owner}/{document}.md` documents; it
6
+ serves document text supplied in `OwnedResource.content` and never opens a
7
+ package path or scans a filesystem at request time.
8
+
9
+ ## Install
10
+
11
+ Install the provider into a running [Toolframe application](https://github.com/toolframe/toolframe-core#readme):
12
+
13
+ ```sh
14
+ toolframe --home APP plugin add pypi:toolframe-llms-txt==0.2.1 --enable
15
+ ```
16
+
17
+ Core resolves dependencies and manages the provider's isolated Python environment.
18
+ The Entry Register template already includes this provider.
19
+
20
+ Each `prepare` call validates and stages a complete immutable document set for
21
+ its epoch. Staging and aborting leave the current HTTP responses unchanged.
22
+ `commit` atomically selects one staged epoch, replacing the index and its
23
+ documents together. A later epoch can contain fewer or no documents, which
24
+ withdraws entries from the live provider. Other staged epochs remain available
25
+ until they are committed or aborted.
26
+
27
+ The optional `intro` configuration string is placed before the deterministic,
28
+ owner and document ID sorted link list.
29
+
30
+ From this directory, install the development environment and run the checks:
31
+
32
+ ```sh
33
+ uv sync --group dev
34
+ uv run pytest -q
35
+ uv run ruff check src tests
36
+ uv run ruff format --check src tests
37
+ uv build --wheel
38
+ ```
39
+
40
+ For the complete, isolated CI check (including sdist/wheel metadata, licenses,
41
+ real dependency installation, and installed-wheel HTTP checks), run:
42
+
43
+ ```sh
44
+ bash scripts/ci.sh
45
+ ```
46
+
47
+ This requires Python 3.14.7, uv 0.12.8, and a sibling `toolframe-sdk` Git
48
+ checkout containing the pinned SDK revision. It leaves the working development
49
+ environment untouched. See [CI and publishing](docs/ci.md) for the dependency
50
+ pin, workflow triggers, release commands, and required external setup.
51
+
52
+ For release validation and Trusted Publisher setup, see [releasing](docs/releasing.md).
53
+
54
+ ## License
55
+
56
+ Licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) and [NOTICE](NOTICE).
@@ -0,0 +1,93 @@
1
+ # CI and publishing
2
+
3
+ ## Local validation
4
+
5
+ Install Python 3.14.7 and uv 0.12.8, then run from this repository:
6
+
7
+ ```sh
8
+ bash scripts/ci.sh
9
+ ```
10
+
11
+ The SDK source defaults to `../toolframe-sdk`. It must be a Git checkout that
12
+ contains commit `ef91b609137a5fe7bae8e0c893e74b096ff06ffe`. The script uses
13
+ `git archive` of that exact commit, so concurrent or uncommitted SDK changes do
14
+ not affect this validation. To choose another checkout or retain the validated
15
+ distributions, pass paths explicitly:
16
+
17
+ ```sh
18
+ bash scripts/ci.sh /path/to/toolframe-sdk /tmp/new-llms-txt-distributions
19
+ ```
20
+
21
+ The output directory must not exist. Relative output paths are relative to this
22
+ repository. `CI_KEEP_TEMP=1 bash scripts/ci.sh` retains the temporary workspace
23
+ and prints its path for inspection; otherwise it is removed on exit.
24
+
25
+ Every run starts with a fresh workspace, uv cache, development environment,
26
+ dependency wheel directory, and runtime environment. It copies the current
27
+ provider sources without `.venv`, `dist`, or caches and exports the SDK pin.
28
+ Neither repository's existing development environment or lockfile is changed.
29
+ The checks are:
30
+
31
+ 1. `uv sync --locked --group dev` with Python 3.14.7.
32
+ 2. `ruff check src tests scripts`, `ruff format --check src tests scripts`,
33
+ `bash -n scripts/ci.sh`, and the existing `pytest -q` provider suite.
34
+ 3. `uv build --no-sources` for the sdist and wheel. With no format selection,
35
+ uv builds the wheel from that sdist.
36
+ 4. `twine==7.0.0 check --strict` on both artifacts. Twine 7 supports the
37
+ Metadata-Version 2.5 emitted by the current build backend; 6.2.0 rejects it.
38
+ 5. A new SDK wheel built from the pinned sources with `uv build --no-sources
39
+ --wheel`, then an empty virtual environment receiving both explicit wheels
40
+ with normal dependency resolution and `uv pip check`. Starlette, uvicorn,
41
+ Pydantic, JSON Schema, and their runtime dependencies are actually installed.
42
+ 6. `python -I scripts/check_wheel.py` outside the source tree verifies the
43
+ installed version, plugin entry point, imports from the runtime environment,
44
+ and exact `LICENSE`/`NOTICE` contents in both distributions. A real localhost
45
+ HTTP server checks the empty index, staging, commit, document content and
46
+ MIME types, withdrawal/404 responses, and shutdown using runtime packages
47
+ plus the standard library only.
48
+
49
+ The script fails at the first unsuccessful check. It does not use `--no-deps`,
50
+ skip existing tests, or publish anything. Index access is required even if a
51
+ developer already has packages cached. `PYTHON_VERSION` may explicitly override
52
+ the local interpreter request; GitHub uses 3.14.7.
53
+
54
+ To check workflow and shell syntax locally, install
55
+ [actionlint](https://github.com/rhysd/actionlint) 1.7.12 and run:
56
+
57
+ ```sh
58
+ actionlint .github/workflows/ci.yml .github/workflows/publish.yml
59
+ bash -n scripts/ci.sh
60
+ git diff --check
61
+ ```
62
+
63
+ ## GitHub workflows
64
+
65
+ `ci.yml` runs on pushes, pull requests, manual dispatch, and calls from the
66
+ publish workflow. It uses `ubuntu-24.04`, Python 3.14.7, uv 0.12.8, read-only
67
+ repository permissions, SHA-pinned actions, a 20-minute timeout, and the same
68
+ local script. Only successfully validated provider distributions are uploaded
69
+ as the `python-distributions` artifact, retained for seven days. The SDK wheel
70
+ is a validation dependency and is not part of that upload.
71
+
72
+ The required sibling checkout is
73
+ `${TOOLFRAME_REPOSITORY_OWNER}/toolframe-sdk`, where the repository variable
74
+ `TOOLFRAME_REPOSITORY_OWNER` defaults to `github.repository_owner`. In a fork PR
75
+ run on the upstream repository, this is the upstream owner, never the PR
76
+ author's owner. The SDK checkout is fixed to the full commit above. There is
77
+ no `pull_request_target` execution or shared reusable-workflow concurrency
78
+ group that could cancel the publish caller.
79
+
80
+ `publish.yml` runs only on manual dispatch. Its `repository` input selects
81
+ `testpypi` (default) or `pypi`. It first requires `GITHUB_REF` to equal
82
+ `refs/tags/v<project.version>` exactly; branch runs and mismatched tags fail.
83
+ The release guard also rejects any index input other than those two choices.
84
+ It calls CI from the same workflow revision and checks out `github.sha`, then
85
+ downloads the artifacts from that run without rebuilding them. Only the final
86
+ job has `id-token: write`, uses the selected GitHub environment, and invokes
87
+ the PyPA publishing action with the appropriate index URL. Publication runs
88
+ for the same tag and index queue without cancelling one another.
89
+
90
+ ## Publication
91
+
92
+ See [releasing](releasing.md) for dependency order, private repository access,
93
+ Trusted Publisher bindings, version tags and consumer installation checks.
@@ -0,0 +1,59 @@
1
+ # Releasing toolframe-llms-txt
2
+
3
+ The distribution name is `toolframe-llms-txt`; its current version is `0.2.1`.
4
+ Release tags must exactly match `v<project.version>`. Ordinary CI never uploads
5
+ packages. The manual `publish.yml` workflow reruns validation and publishes only
6
+ artifacts produced by that successful run.
7
+
8
+ ## Validate
9
+
10
+ Run the repository's existing validation workflow; its local commands and
11
+ integration coverage are described in [CI](ci.md).
12
+
13
+ Publish `toolframe-sdk==0.3.0` first. The coordinated order and native CLI channels are documented in
14
+ [Toolframe's release guide](https://github.com/toolframe/toolframe-core/blob/main/docs/releasing.md).
15
+
16
+ ## Trusted Publishers
17
+
18
+ Create GitHub environments named `testpypi` and `pypi`. On each corresponding
19
+ package index, configure a normal or pending Trusted Publisher with these values:
20
+
21
+ | Field | Value |
22
+ | --- | --- |
23
+ | Project | `toolframe-llms-txt` |
24
+ | GitHub owner | `toolframe` |
25
+ | GitHub repository | `toolframe-llms-txt` |
26
+ | Workflow filename | `publish.yml` |
27
+ | Environment | `testpypi` or `pypi`, matching the index |
28
+
29
+ If publishing from another owner, use that actual owner in the publisher binding.
30
+ Follow [PyPI's Trusted Publishing guide](https://docs.pypi.org/trusted-publishers/using-a-publisher/).
31
+ Only the publishing job receives `id-token: write`; no PyPI API-token secret is
32
+ needed. Configure environment reviewers and release-tag protections as appropriate.
33
+
34
+ Jobs that fetch sibling repositories support the optional read-only
35
+ `TOOLFRAME_READ_TOKEN` GitHub secret. It must be able to read those repositories
36
+ while they are private. Public siblings require no extra token; secrets are not
37
+ available to untrusted fork PRs. `TOOLFRAME_REPOSITORY_OWNER` overrides the trusted
38
+ sibling owner where the workflow exposes that variable.
39
+
40
+ ## Publish and verify
41
+
42
+ After the release commit and matching tag are available remotely, manually run
43
+ `publish.yml` at `v0.2.1`, selecting `testpypi` first and then `pypi`.
44
+ A branch or mismatched tag is rejected. Downloaded files are the artifacts from
45
+ that run; the publishing job does not rebuild them. Published files cannot be
46
+ replaced under the same version.
47
+
48
+ After PyPI publication, verify a clean installation:
49
+
50
+ ```sh
51
+ uv venv --python 3.14.7 build/consumer
52
+ uv pip install --python build/consumer/bin/python 'toolframe-llms-txt==0.2.1'
53
+ uv pip check --python build/consumer/bin/python
54
+ ```
55
+
56
+ TestPyPI does not mirror dependencies. Test the specific artifact against an
57
+ explicit dependency source; a local or TestPyPI check alone does not demonstrate
58
+ that production PyPI resolution works. Keep logs, hashes and exact revisions in
59
+ CI artifacts or ignored local evidence directories.