pyrtfs 0.1.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.
Files changed (60) hide show
  1. pyrtfs-0.1.1/.editorconfig +20 -0
  2. pyrtfs-0.1.1/.gitattributes +19 -0
  3. pyrtfs-0.1.1/.github/CODEOWNERS +3 -0
  4. pyrtfs-0.1.1/.github/ISSUE_TEMPLATE/bug_report.yml +36 -0
  5. pyrtfs-0.1.1/.github/ISSUE_TEMPLATE/config.yaml +5 -0
  6. pyrtfs-0.1.1/.github/ISSUE_TEMPLATE/feature_request.yml +19 -0
  7. pyrtfs-0.1.1/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +20 -0
  8. pyrtfs-0.1.1/.github/dependabot.yml +13 -0
  9. pyrtfs-0.1.1/.github/workflows/ci.yml +37 -0
  10. pyrtfs-0.1.1/.github/workflows/release-please.yml +94 -0
  11. pyrtfs-0.1.1/.gitignore +32 -0
  12. pyrtfs-0.1.1/.markdownlint.json +8 -0
  13. pyrtfs-0.1.1/.release-please-manifest.json +3 -0
  14. pyrtfs-0.1.1/CHANGELOG.md +43 -0
  15. pyrtfs-0.1.1/CONTRIBUTING.md +51 -0
  16. pyrtfs-0.1.1/LICENSE +17 -0
  17. pyrtfs-0.1.1/Makefile +70 -0
  18. pyrtfs-0.1.1/PKG-INFO +366 -0
  19. pyrtfs-0.1.1/README.md +321 -0
  20. pyrtfs-0.1.1/ROADMAP.md +28 -0
  21. pyrtfs-0.1.1/SECURITY.md +31 -0
  22. pyrtfs-0.1.1/assets/logo.svg +55 -0
  23. pyrtfs-0.1.1/pyproject.toml +79 -0
  24. pyrtfs-0.1.1/release-please-config.json +30 -0
  25. pyrtfs-0.1.1/src/rtfs/__init__.py +46 -0
  26. pyrtfs-0.1.1/src/rtfs/cli/main.py +302 -0
  27. pyrtfs-0.1.1/src/rtfs/core/aggregator.py +193 -0
  28. pyrtfs-0.1.1/src/rtfs/core/cache/__init__.py +28 -0
  29. pyrtfs-0.1.1/src/rtfs/core/cache/base.py +66 -0
  30. pyrtfs-0.1.1/src/rtfs/core/cache/disk.py +46 -0
  31. pyrtfs-0.1.1/src/rtfs/core/cache/factory.py +48 -0
  32. pyrtfs-0.1.1/src/rtfs/core/cache/memory.py +36 -0
  33. pyrtfs-0.1.1/src/rtfs/core/cache/null.py +17 -0
  34. pyrtfs-0.1.1/src/rtfs/core/cache/redis.py +56 -0
  35. pyrtfs-0.1.1/src/rtfs/core/http.py +171 -0
  36. pyrtfs-0.1.1/src/rtfs/core/models.py +89 -0
  37. pyrtfs-0.1.1/src/rtfs/exporters/fountain_exp.py +50 -0
  38. pyrtfs-0.1.1/src/rtfs/exporters/json_exp.py +8 -0
  39. pyrtfs-0.1.1/src/rtfs/exporters/stats_exp.py +96 -0
  40. pyrtfs-0.1.1/src/rtfs/mcp/__init__.py +23 -0
  41. pyrtfs-0.1.1/src/rtfs/mcp/server.py +386 -0
  42. pyrtfs-0.1.1/src/rtfs/parsers/base.py +234 -0
  43. pyrtfs-0.1.1/src/rtfs/parsers/html_screenplay.py +127 -0
  44. pyrtfs-0.1.1/src/rtfs/parsers/pdf_screenplay.py +181 -0
  45. pyrtfs-0.1.1/src/rtfs/parsers/transcript.py +100 -0
  46. pyrtfs-0.1.1/src/rtfs/providers/base.py +81 -0
  47. pyrtfs-0.1.1/src/rtfs/providers/imsdb.py +137 -0
  48. pyrtfs-0.1.1/src/rtfs/providers/scriptslug.py +154 -0
  49. pyrtfs-0.1.1/src/rtfs/providers/subslikescript.py +111 -0
  50. pyrtfs-0.1.1/src/rtfs/providers/tvwriting.py +114 -0
  51. pyrtfs-0.1.1/tests/fixtures/sample_imsdb.html +32 -0
  52. pyrtfs-0.1.1/tests/test_aggregator.py +138 -0
  53. pyrtfs-0.1.1/tests/test_cache.py +149 -0
  54. pyrtfs-0.1.1/tests/test_cli.py +133 -0
  55. pyrtfs-0.1.1/tests/test_exporters.py +106 -0
  56. pyrtfs-0.1.1/tests/test_http.py +127 -0
  57. pyrtfs-0.1.1/tests/test_mcp.py +231 -0
  58. pyrtfs-0.1.1/tests/test_parsers.py +300 -0
  59. pyrtfs-0.1.1/tests/test_providers.py +173 -0
  60. pyrtfs-0.1.1/tests/test_security.py +146 -0
@@ -0,0 +1,20 @@
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
+ max_line_length = 100
14
+
15
+ [*.md]
16
+ trim_trailing_whitespace = false
17
+
18
+ [Makefile]
19
+ indent_style = tab
20
+
@@ -0,0 +1,19 @@
1
+ * text=auto eol=lf
2
+ *.py text eol=lf
3
+ *.md text eol=lf
4
+ *.toml text eol=lf
5
+ *.yml text eol=lf
6
+ *.yaml text eol=lf
7
+ *.json text eol=lf
8
+ *.html text eol=lf
9
+ *.pdf binary
10
+
11
+ .github export-ignore
12
+ .gitignore export-ignore
13
+ .gitattributes export-ignore
14
+ .editorconfig export-ignore
15
+ .markdownlint.json export-ignore
16
+ .release-please-manifest.json export-ignore
17
+ release-please-config.json export-ignore
18
+ Makefile export-ignore
19
+ tests export-ignore
@@ -0,0 +1,3 @@
1
+ * @AtaCanYmc
2
+ /.github/ @AtaCanYmc
3
+ /SECURITY.md @AtaCanYmc
@@ -0,0 +1,36 @@
1
+ name: Bug Report
2
+ description: Report a parser regression, provider failure, or CLI defect.
3
+ title: "[Bug]: "
4
+ labels: ["bug"]
5
+ body:
6
+ - type: textarea
7
+ id: reproduction
8
+ attributes:
9
+ label: Reproduction Command or Code
10
+ description: Provide the exact CLI invocation or Python snippet that triggers the failure.
11
+ placeholder: |
12
+ rtfs get "The Matrix" --source imsdb --format json
13
+ validations:
14
+ required: true
15
+ - type: textarea
16
+ id: expected
17
+ attributes:
18
+ label: Expected Behavior
19
+ description: State what the parser, provider, or exporter should produce.
20
+ validations:
21
+ required: true
22
+ - type: textarea
23
+ id: actual
24
+ attributes:
25
+ label: Actual Output / Traceback
26
+ description: Paste the error output or malformed AST fragment.
27
+ validations:
28
+ required: true
29
+ - type: input
30
+ id: environment
31
+ attributes:
32
+ label: Environment
33
+ description: OS, Python version, and rtfs version.
34
+ placeholder: "macOS 15, Python 3.12, rtfs 0.1.0"
35
+ validations:
36
+ required: true
@@ -0,0 +1,5 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Security Vulnerability Report
4
+ url: https://github.com/AtaCanYmc/rtfs/security/advisories/new
5
+ about: Report a security vulnerability privately according to SECURITY.md.
@@ -0,0 +1,19 @@
1
+ name: Feature Request
2
+ description: Propose a new script provider, parser capability, or export format.
3
+ title: "[Feature]: "
4
+ labels: ["enhancement"]
5
+ body:
6
+ - type: textarea
7
+ id: problem
8
+ attributes:
9
+ label: Technical Problem or Use Case
10
+ description: Describe the missing source, layout edge case, or export target.
11
+ validations:
12
+ required: true
13
+ - type: textarea
14
+ id: proposal
15
+ attributes:
16
+ label: Proposed Implementation
17
+ description: Specify which modules in src/rtfs/ would change and how.
18
+ validations:
19
+ required: true
@@ -0,0 +1,20 @@
1
+ ## Summary
2
+
3
+ State the purpose of this change in one or two declarative sentences.
4
+
5
+ ## Changes
6
+
7
+ - `src/rtfs/...`: Describe the modification.
8
+
9
+ ## Verification
10
+
11
+ ```bash
12
+ .venv/bin/ruff check .
13
+ .venv/bin/pytest -v
14
+ ```
15
+
16
+ ## Checklist
17
+
18
+ - [ ] Commit messages follow Conventional Commits (`feat:`, `fix:`, `refactor:`, `test:`, `docs:`).
19
+ - [ ] All unit tests pass offline without live network requests.
20
+ - [ ] `ruff check .` reports zero errors.
@@ -0,0 +1,13 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "pip"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
7
+ open-pull-requests-limit: 5
8
+
9
+ - package-ecosystem: "github-actions"
10
+ directory: "/"
11
+ schedule:
12
+ interval: "weekly"
13
+ open-pull-requests-limit: 5
@@ -0,0 +1,37 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: ["main"]
6
+ pull_request:
7
+ branches: ["main"]
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ lint-and-test:
14
+ runs-on: ubuntu-latest
15
+ strategy:
16
+ fail-fast: false
17
+ matrix:
18
+ python-version: ["3.11", "3.12", "3.13"]
19
+
20
+ steps:
21
+ - name: Checkout repository
22
+ uses: actions/checkout@v7
23
+
24
+ - name: Install uv
25
+ uses: astral-sh/setup-uv@v7
26
+
27
+ - name: Set up Python ${{ matrix.python-version }}
28
+ run: uv python install ${{ matrix.python-version }}
29
+
30
+ - name: Install dependencies
31
+ run: uv venv --python ${{ matrix.python-version }} && uv pip install -e ".[dev]" --python .venv/bin/python
32
+
33
+ - name: Run Ruff linter
34
+ run: .venv/bin/ruff check .
35
+
36
+ - name: Run Pytest suite
37
+ run: .venv/bin/pytest -v
@@ -0,0 +1,94 @@
1
+ name: Release Please & PyPI Publish
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ permissions:
9
+ contents: write
10
+ pull-requests: write
11
+
12
+ jobs:
13
+ release-please:
14
+ name: Release Please PR & Tag
15
+ runs-on: ubuntu-latest
16
+ outputs:
17
+ release_created: ${{ steps.release.outputs.release_created }}
18
+ tag_name: ${{ steps.release.outputs.tag_name }}
19
+ version: ${{ steps.release.outputs.version }}
20
+ steps:
21
+ - name: Run googleapis/release-please-action
22
+ id: release
23
+ uses: googleapis/release-please-action@v4
24
+ with:
25
+ token: ${{ secrets.GITHUB_TOKEN }}
26
+ config-file: release-please-config.json
27
+ manifest-file: .release-please-manifest.json
28
+
29
+ build:
30
+ name: Verify, Build Wheel/SDist & Upload to GitHub Release
31
+ needs: release-please
32
+ if: ${{ needs.release-please.outputs.release_created == 'true' }}
33
+ runs-on: ubuntu-latest
34
+ permissions:
35
+ contents: write
36
+ steps:
37
+ - name: Checkout released tag
38
+ uses: actions/checkout@v4
39
+ with:
40
+ ref: ${{ needs.release-please.outputs.tag_name }}
41
+
42
+ - name: Install uv
43
+ uses: astral-sh/setup-uv@v4
44
+
45
+ - name: Set up Python 3.12
46
+ run: uv python install 3.12
47
+
48
+ - name: Verify lint and test suite before packaging
49
+ run: |
50
+ uv venv --python 3.12
51
+ uv pip install -e ".[all,dev]" --python .venv/bin/python
52
+ .venv/bin/ruff check .
53
+ .venv/bin/pytest -v
54
+
55
+ - name: Build wheel and sdist
56
+ run: uv build
57
+
58
+ - name: Upload distribution artifacts for PyPI job
59
+ uses: actions/upload-artifact@v4
60
+ with:
61
+ name: python-package-distributions
62
+ path: dist/
63
+ retention-days: 5
64
+
65
+ - name: Attach wheel and sdist to GitHub Release
66
+ env:
67
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68
+ run: gh release upload "${{ needs.release-please.outputs.tag_name }}" dist/* --clobber
69
+
70
+ publish-pypi:
71
+ name: Publish to PyPI via OIDC Trusted Publisher
72
+ needs:
73
+ - release-please
74
+ - build
75
+ if: ${{ needs.release-please.outputs.release_created == 'true' }}
76
+ runs-on: ubuntu-latest
77
+ environment:
78
+ name: pypi
79
+ url: https://pypi.org/p/pyrtfs
80
+ permissions:
81
+ id-token: write
82
+ contents: read
83
+ steps:
84
+ - name: Download built distribution artifacts
85
+ uses: actions/download-artifact@v4
86
+ with:
87
+ name: python-package-distributions
88
+ path: dist/
89
+
90
+ - name: Publish package distributions to PyPI
91
+ uses: pypa/gh-action-pypi-publish@release/v1
92
+ with:
93
+ packages-dir: dist/
94
+ attestations: true
@@ -0,0 +1,32 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # Virtual environments
7
+ .venv/
8
+ venv/
9
+ ENV/
10
+
11
+ # Distribution / packaging
12
+ build/
13
+ dist/
14
+ *.egg-info/
15
+ .eggs/
16
+
17
+ # Testing & linting caches
18
+ .pytest_cache/
19
+ .ruff_cache/
20
+ .mypy_cache/
21
+ .coverage
22
+ htmlcov/
23
+
24
+ # IDEs & OS metadata
25
+ .idea/
26
+ .vscode/
27
+ .DS_Store
28
+
29
+ # Environment & secrets
30
+ .env
31
+ .env.*
32
+ !.env.example
@@ -0,0 +1,8 @@
1
+ {
2
+ "default": true,
3
+ "MD013": false,
4
+ "MD033": {
5
+ "allowed_elements": ["details", "summary", "br", "p", "div", "img", "h1"]
6
+ },
7
+ "MD041": false
8
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.1"
3
+ }
@@ -0,0 +1,43 @@
1
+ # Changelog
2
+
3
+ ## [0.1.1](https://github.com/AtaCanYmc/rtfs/compare/v0.1.0...v0.1.1) (2026-11-21)
4
+
5
+
6
+ ### Features
7
+
8
+ * add logo SVG and update README with logo and description ([2f9e13f](https://github.com/AtaCanYmc/rtfs/commit/2f9e13f61cc0153efaeb27d4d65dd146ef072cc3))
9
+ * add Makefile, changelog, and release configuration files ([a9d5579](https://github.com/AtaCanYmc/rtfs/commit/a9d55793127620bb0882b32b949d940fe48e9dce))
10
+ * implement caching mechanism with multiple backends and update related components ([a105a6a](https://github.com/AtaCanYmc/rtfs/commit/a105a6aa7c15e024641022a80cb80c7cb0211dbc))
11
+ * **mcp:** add FastMCP server implementation with screenplay tools and CLI command ([633b7ef](https://github.com/AtaCanYmc/rtfs/commit/633b7ef4325bf77cb166e256d5e77153db205a31))
12
+ * rename package from rtfs to pyrtfs and update installation instructions ([b8b3253](https://github.com/AtaCanYmc/rtfs/commit/b8b3253b8eb7017f0b8db5ca14a0170d4e924a9f))
13
+ * update project metadata in pyproject.toml and release-please.yml ([6c1a14b](https://github.com/AtaCanYmc/rtfs/commit/6c1a14b583b602fd8166f1608b07503b33049311))
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * **security:** enforce SSRF/redirect guards, provider host allowlists, PDF page cap, and 0700 cache dir ([62bfe0e](https://github.com/AtaCanYmc/rtfs/commit/62bfe0e7abd4c62089302ae226b9a28f5ed465ea))
19
+
20
+
21
+ ### Documentation
22
+
23
+ * **roadmap:** update v0.1.0 completed cache and security items and upcoming milestones ([4ab6471](https://github.com/AtaCanYmc/rtfs/commit/4ab6471d3854f1ac83afcdc23feba9fa4ea56efd))
24
+
25
+ ## 0.1.0 (2026-11-21)
26
+
27
+ ### Features
28
+
29
+ * Canonical Pydantic v2 strict AST (`ScriptDocument`, `Scene`, `Action`, `Dialogue`, `Transition`).
30
+ * Coordinate-clustering PDF screenplay parser via PyMuPDF (`PdfScreenplayParser`).
31
+ * Indentation and `<b>`-tag HTML screenplay parser via Selectolax Lexbor (`HtmlScreenplayParser`).
32
+ * Plain-text and HTML fallback transcript parser (`TranscriptParser`).
33
+ * Parallel multi-provider search (`imsdb`, `scriptslug`, `tvwriting`, `subslikescript`) with `rapidfuzz` ranking.
34
+ * Pluggable async `CacheBackend` layer (`disk://`, `redis://`, `rediss://`, `memory://`, `none://`).
35
+ * Progressive-disclosure FastMCP server (`rtfs mcp`) with bounded scene range and dialogue filtering tools.
36
+ * JSON, Fountain, plain-text, and character/scene analytics exporters.
37
+ * Typer + Rich CLI (`rtfs search`, `rtfs get`, `rtfs stats`, `rtfs mcp`).
38
+
39
+ ### Security
40
+
41
+ * SSRF and redirect target validation in `HttpClient` blocking loopback, private, and link-local hosts.
42
+ * Provider domain allowlists (`BaseProvider.resolve_allowed_url`) and bounded PDF page iteration (`max_pages=500`).
43
+ * Restrictive `0700` permissions on local disk cache directory creation.
@@ -0,0 +1,51 @@
1
+ # Contributing to rtfs
2
+
3
+ ## Environment Setup
4
+
5
+ 1. Clone the repository and create a Python 3.11+ virtual environment:
6
+
7
+ ```bash
8
+ git clone https://github.com/AtaCanYmc/rtfs.git
9
+ cd rtfs
10
+ uv venv --python 3.11
11
+ uv pip install -e ".[dev]" --python .venv/bin/python
12
+ ```
13
+
14
+ 2. Run the verification suite before making changes:
15
+
16
+ ```bash
17
+ .venv/bin/ruff check .
18
+ .venv/bin/pytest -v
19
+ ```
20
+
21
+ ## Branch Naming & Commit Messages
22
+
23
+ Use descriptive branch names prefixed by change category:
24
+
25
+ - `feat/<scope>` for new providers, parsers, or CLI flags
26
+ - `fix/<scope>` for bug fixes in parsing or scraping
27
+ - `test/<scope>` for test fixtures and coverage additions
28
+ - `docs/<scope>` for documentation updates
29
+
30
+ Follow the Conventional Commits specification for all commit messages:
31
+
32
+ ```text
33
+ <type>(<scope>): <concise summary in imperative mood>
34
+ ```
35
+
36
+ Allowed types: `feat`, `fix`, `refactor`, `test`, `docs`, `ci`, `chore`.
37
+
38
+ ## Adding a Provider
39
+
40
+ 1. Subclass `BaseProvider` in `src/rtfs/providers/`.
41
+ 2. Implement `async def search(self, query: str) -> list[SearchResult]` and `async def fetch_raw(self, result: SearchResult) -> RawScript`.
42
+ 3. Route all network calls through `self.http` (`HttpClient`) so per-host rate limiting and exponential backoff apply.
43
+ 4. Register the provider in `ScriptAggregator` and add priority weighting in `SOURCE_PRIORITY_BONUS`.
44
+ 5. Add offline unit tests in `tests/test_aggregator.py`.
45
+
46
+ ## Pull Request Checklist
47
+
48
+ - [ ] `.venv/bin/ruff check .` exits with code 0.
49
+ - [ ] `.venv/bin/pytest -v` passes all unit tests.
50
+ - [ ] No live network calls occur during unit test execution.
51
+ - [ ] Public models in `src/rtfs/core/models.py` retain `ConfigDict(strict=True)`.
pyrtfs-0.1.1/LICENSE ADDED
@@ -0,0 +1,17 @@
1
+ GNU AFFERO GENERAL PUBLIC LICENSE
2
+ Version 3, 19 November 2007
3
+
4
+ Copyright (c) 2026 AtaCanYmc
5
+
6
+ This program is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU Affero General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ This program is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU Affero General Public License for more details.
15
+
16
+ You should have received a copy of the GNU Affero General Public License
17
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
pyrtfs-0.1.1/Makefile ADDED
@@ -0,0 +1,70 @@
1
+ .DEFAULT_GOAL := help
2
+ SHELL := /bin/bash
3
+
4
+ PYTHON ?= .venv/bin/python
5
+ RUFF ?= .venv/bin/ruff
6
+ PYTEST ?= .venv/bin/pytest
7
+ RTFS ?= .venv/bin/rtfs
8
+ UV ?= uv
9
+
10
+ CACHE_DIR ?= $(HOME)/.cache/rtfs
11
+ MCP_HOST ?= 127.0.0.1
12
+ MCP_PORT ?= 8000
13
+
14
+ .PHONY: help venv install install-redis install-mcp install-all \
15
+ lint format format-check test test-fast check \
16
+ mcp-stdio mcp-sse cache-clear build clean
17
+
18
+ help: ## Display available Make targets
19
+ @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n\nTargets:\n"} /^[a-zA-Z0-9_-]+:.*?##/ { printf " \033[36m%-16s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST)
20
+
21
+ venv: ## Create local Python virtual environment (.venv)
22
+ @test -d .venv || $(UV) venv
23
+
24
+ install: venv ## Install rtfs in editable mode with dev dependencies
25
+ $(UV) pip install -e ".[dev]" --python $(PYTHON)
26
+
27
+ install-redis: venv ## Install rtfs with Redis cache extra and dev dependencies
28
+ $(UV) pip install -e ".[redis,dev]" --python $(PYTHON)
29
+
30
+ install-mcp: venv ## Install rtfs with FastMCP server extra and dev dependencies
31
+ $(UV) pip install -e ".[mcp,dev]" --python $(PYTHON)
32
+
33
+ install-all: venv ## Install rtfs with all optional extras (redis, mcp, dev)
34
+ $(UV) pip install -e ".[all,dev]" --python $(PYTHON)
35
+
36
+ lint: ## Run Ruff linter across the repository
37
+ $(RUFF) check .
38
+
39
+ format: ## Auto-fix lint issues and format code with Ruff
40
+ $(RUFF) check --fix .
41
+ $(RUFF) format .
42
+
43
+ format-check: ## Check code formatting without modifying files
44
+ $(RUFF) format --check .
45
+
46
+ test: ## Run full pytest suite with verbose output
47
+ $(PYTEST) -v
48
+
49
+ test-fast: ## Run pytest suite stopping on first failure
50
+ $(PYTEST) -x -q
51
+
52
+ check: lint test ## Run all quality gates (ruff check + pytest)
53
+
54
+ mcp-stdio: ## Run the FastMCP server over stdio transport
55
+ $(RTFS) mcp --transport stdio
56
+
57
+ mcp-sse: ## Run the FastMCP server over SSE transport (MCP_HOST, MCP_PORT)
58
+ $(RTFS) mcp --transport sse --host $(MCP_HOST) --port $(MCP_PORT)
59
+
60
+ cache-clear: ## Clear the local SQLite disk cache (~/.cache/rtfs)
61
+ rm -rf $(CACHE_DIR)
62
+ @echo "Cleared disk cache at $(CACHE_DIR)"
63
+
64
+ build: ## Build wheel and sdist packages into dist/
65
+ $(UV) build
66
+
67
+ clean: ## Remove build artifacts, pytest/ruff caches, and bytecode
68
+ rm -rf build/ dist/ *.egg-info src/*.egg-info .pytest_cache/ .ruff_cache/ .mypy_cache/ .coverage htmlcov/
69
+ find . -type d -name "__pycache__" -prune -exec rm -rf {} +
70
+ find . -type f -name "*.py[co]" -delete