docs-haven 0.1.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 (38) hide show
  1. docs_haven-0.1.0/.github/CODEOWNERS +8 -0
  2. docs_haven-0.1.0/.github/FUNDING.yml +15 -0
  3. docs_haven-0.1.0/.github/ISSUE_TEMPLATE/bug_report.yml +44 -0
  4. docs_haven-0.1.0/.github/ISSUE_TEMPLATE/feature_request.yml +33 -0
  5. docs_haven-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +19 -0
  6. docs_haven-0.1.0/.github/dependabot.yml +10 -0
  7. docs_haven-0.1.0/.github/labeler.yml +25 -0
  8. docs_haven-0.1.0/.github/release-drafter.yml +59 -0
  9. docs_haven-0.1.0/.github/workflows/auto-label.yml +17 -0
  10. docs_haven-0.1.0/.github/workflows/auto-merge-dependabot.yml +24 -0
  11. docs_haven-0.1.0/.github/workflows/ci.yml +80 -0
  12. docs_haven-0.1.0/.github/workflows/detect-secrets.yml +21 -0
  13. docs_haven-0.1.0/.github/workflows/release-drafter.yml +22 -0
  14. docs_haven-0.1.0/.github/workflows/stale.yml +24 -0
  15. docs_haven-0.1.0/.gitignore +22 -0
  16. docs_haven-0.1.0/CHANGELOG.md +25 -0
  17. docs_haven-0.1.0/CODE_OF_CONDUCT.md +41 -0
  18. docs_haven-0.1.0/CONTRIBUTING.md +47 -0
  19. docs_haven-0.1.0/LICENSE +21 -0
  20. docs_haven-0.1.0/PKG-INFO +344 -0
  21. docs_haven-0.1.0/README.md +314 -0
  22. docs_haven-0.1.0/SECURITY.md +37 -0
  23. docs_haven-0.1.0/conflicts.py +131 -0
  24. docs_haven-0.1.0/docs/api/mcp-tools.md +159 -0
  25. docs_haven-0.1.0/docs/architecture/overview.md +80 -0
  26. docs_haven-0.1.0/docs/examples/search.md +67 -0
  27. docs_haven-0.1.0/docs/examples/sync.md +54 -0
  28. docs_haven-0.1.0/docs/getting-started/installation.md +30 -0
  29. docs_haven-0.1.0/docs/getting-started/quickstart.md +55 -0
  30. docs_haven-0.1.0/pyproject.toml +74 -0
  31. docs_haven-0.1.0/server.py +219 -0
  32. docs_haven-0.1.0/storage.py +462 -0
  33. docs_haven-0.1.0/sync.py +179 -0
  34. docs_haven-0.1.0/tests/test_conflicts.py +72 -0
  35. docs_haven-0.1.0/tests/test_storage.py +163 -0
  36. docs_haven-0.1.0/tests/test_sync.py +70 -0
  37. docs_haven-0.1.0/tests/test_uri.py +54 -0
  38. docs_haven-0.1.0/uri.py +124 -0
@@ -0,0 +1,8 @@
1
+ # Default owner for everything in the repo
2
+ * @Cipher208
3
+
4
+ # Python source
5
+ *.py @Cipher208
6
+
7
+ # CI/CD
8
+ .github/ @Cipher208
@@ -0,0 +1,15 @@
1
+ # These are supported funding model platforms
2
+
3
+ github: Cipher208
4
+ # patreon:
5
+ # open_collective:
6
+ # ko_fi:
7
+ # tidelift:
8
+ # community_bridge:
9
+ # liberapay:
10
+ # issuehunt:
11
+ # otechie:
12
+ # lfx_crowdfunding:
13
+ # polar:
14
+ # buy_me_a_coffee:
15
+ # custom:
@@ -0,0 +1,44 @@
1
+ name: Bug Report
2
+ description: Report a bug in DocsHaven
3
+ title: "[Bug]: "
4
+ labels: ["bug"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ Thanks for taking the time to report a bug!
10
+ - type: textarea
11
+ id: description
12
+ attributes:
13
+ label: Describe the bug
14
+ description: A clear and concise description of what the bug is.
15
+ validations:
16
+ required: true
17
+ - type: textarea
18
+ id: reproduce
19
+ attributes:
20
+ label: To reproduce
21
+ description: Steps to reproduce the behavior.
22
+ placeholder: |
23
+ 1. Install docs-haven
24
+ 2. Run '...'
25
+ 3. See error
26
+ validations:
27
+ required: true
28
+ - type: textarea
29
+ id: expected
30
+ attributes:
31
+ label: Expected behavior
32
+ description: What you expected to happen.
33
+ validations:
34
+ required: true
35
+ - type: textarea
36
+ id: environment
37
+ attributes:
38
+ label: Environment
39
+ description: |
40
+ - OS: [e.g., Ubuntu 22.04]
41
+ - Python version: [e.g., 3.12]
42
+ - docs-haven version: [e.g., 0.1.0]
43
+ validations:
44
+ required: true
@@ -0,0 +1,33 @@
1
+ name: Feature Request
2
+ description: Suggest a new feature for DocsHaven
3
+ title: "[Feature]: "
4
+ labels: ["enhancement"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ Thanks for suggesting a feature!
10
+ - type: textarea
11
+ id: problem
12
+ attributes:
13
+ label: Problem
14
+ description: What problem does this feature solve?
15
+ validations:
16
+ required: true
17
+ - type: textarea
18
+ id: solution
19
+ attributes:
20
+ label: Proposed solution
21
+ description: Describe the solution you'd like.
22
+ validations:
23
+ required: true
24
+ - type: textarea
25
+ id: alternatives
26
+ attributes:
27
+ label: Alternatives considered
28
+ description: Any alternative solutions or features you've considered.
29
+ - type: textarea
30
+ id: context
31
+ attributes:
32
+ label: Additional context
33
+ description: Any other context about the feature request.
@@ -0,0 +1,19 @@
1
+ ## Summary
2
+
3
+ <!-- What does this PR do? Why is it needed? -->
4
+
5
+ ## Changes
6
+
7
+ <!-- Bullet list of key changes -->
8
+
9
+ ## Checklist
10
+
11
+ - [ ] Tests pass locally (`pytest tests/ -v`)
12
+ - [ ] Lint passes (`ruff check .`)
13
+ - [ ] New code has tests
14
+ - [ ] Documentation updated (if applicable)
15
+ - [ ] No breaking changes (or documented in summary)
16
+
17
+ ## Related Issues
18
+
19
+ <!-- Closes #123 -->
@@ -0,0 +1,10 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "pip"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
7
+ - package-ecosystem: "github-actions"
8
+ directory: "/"
9
+ schedule:
10
+ interval: "weekly"
@@ -0,0 +1,25 @@
1
+ labels:
2
+ - label: "bug"
3
+ paths:
4
+ - "**/*.py"
5
+ title:
6
+ - regex: "\\bfix(es|ed)?\\b"
7
+ - regex: "\\bbug\\b"
8
+
9
+ - label: "dependencies"
10
+ paths:
11
+ - "pyproject.toml"
12
+ - "requirements*.txt"
13
+
14
+ - label: "ci"
15
+ paths:
16
+ - ".github/**"
17
+
18
+ - label: "documentation"
19
+ paths:
20
+ - "**/*.md"
21
+ - "docs/**"
22
+
23
+ - label: "tests"
24
+ paths:
25
+ - "tests/**"
@@ -0,0 +1,59 @@
1
+ name-template: 'v$RESOLVED_VERSION'
2
+ tag-template: 'v$RESOLVED_VERSION'
3
+
4
+ categories:
5
+ - title: '🚀 Features'
6
+ labels:
7
+ - 'feature'
8
+ - 'enhancement'
9
+ - title: '🐛 Bug Fixes'
10
+ labels:
11
+ - 'fix'
12
+ - 'bugfix'
13
+ - 'bug'
14
+ - title: '🧰 Maintenance'
15
+ labels:
16
+ - 'chore'
17
+ - 'dependencies'
18
+ - 'ci'
19
+ - title: '📖 Documentation'
20
+ labels:
21
+ - 'documentation'
22
+ - 'docs'
23
+ - title: '🧪 Tests'
24
+ labels:
25
+ - 'tests'
26
+ - 'testing'
27
+
28
+ change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
29
+ change-title-escapes: '\<*_&'
30
+ no-changes-template: 'No changes.'
31
+
32
+ version-resolver:
33
+ major:
34
+ labels:
35
+ - 'major'
36
+ minor:
37
+ labels:
38
+ - 'minor'
39
+ - 'feature'
40
+ - 'enhancement'
41
+ patch:
42
+ labels:
43
+ - 'patch'
44
+ - 'fix'
45
+ - 'bugfix'
46
+ - 'bug'
47
+ - 'chore'
48
+ - 'dependencies'
49
+ - 'ci'
50
+ default: patch
51
+
52
+ template: |
53
+ ## Changes
54
+
55
+ $CHANGES
56
+
57
+ ## Contributors
58
+
59
+ $CONTRIBUTORS
@@ -0,0 +1,17 @@
1
+ name: Auto Label
2
+
3
+ on:
4
+ pull_request:
5
+ types: [opened, synchronize, reopened]
6
+
7
+ permissions:
8
+ contents: read
9
+ pull-requests: write
10
+
11
+ jobs:
12
+ label:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/labeler@v5
16
+ with:
17
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,24 @@
1
+ name: Auto-merge Dependabot PRs
2
+
3
+ on: pull_request
4
+
5
+ permissions:
6
+ contents: write
7
+ pull-requests: write
8
+
9
+ jobs:
10
+ dependabot:
11
+ runs-on: ubuntu-latest
12
+ if: github.actor == 'dependabot[bot]'
13
+ steps:
14
+ - name: Dependabot metadata
15
+ id: metadata
16
+ uses: dependabot/fetch-metadata@v2
17
+ with:
18
+ github-token: ${{ secrets.GITHUB_TOKEN }}
19
+ - name: Auto-merge minor and patch updates
20
+ if: steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch'
21
+ run: gh pr merge --auto --squash "$PR_URL"
22
+ env:
23
+ PR_URL: ${{ github.event.pull_request.html_url }}
24
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,80 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ concurrency:
10
+ group: ${{ github.workflow }}-${{ github.ref }}
11
+ cancel-in-progress: true
12
+
13
+ permissions:
14
+ contents: read
15
+ security-events: write
16
+
17
+ jobs:
18
+ lint:
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+ - uses: actions/setup-python@v5
23
+ with:
24
+ python-version: "3.12"
25
+ cache: "pip"
26
+ - run: pip install ruff
27
+ - run: ruff check .
28
+ - run: ruff format --check .
29
+
30
+ typecheck:
31
+ runs-on: ubuntu-latest
32
+ steps:
33
+ - uses: actions/checkout@v4
34
+ - uses: actions/setup-python@v5
35
+ with:
36
+ python-version: "3.12"
37
+ cache: "pip"
38
+ - run: pip install -e ".[test]" mypy
39
+ - run: python -m mypy uri.py storage.py sync.py conflicts.py server.py --ignore-missing-imports
40
+
41
+ test:
42
+ runs-on: ubuntu-latest
43
+ strategy:
44
+ fail-fast: false
45
+ matrix:
46
+ python-version: ["3.10", "3.11", "3.12", "3.13"]
47
+ steps:
48
+ - uses: actions/checkout@v4
49
+ - uses: actions/setup-python@v5
50
+ with:
51
+ python-version: ${{ matrix.python-version }}
52
+ cache: "pip"
53
+ - run: pip install -e ".[test]"
54
+ - run: pytest tests/ -v --tb=long --timeout=30
55
+
56
+ build:
57
+ runs-on: ubuntu-latest
58
+ steps:
59
+ - uses: actions/checkout@v4
60
+ - uses: actions/setup-python@v5
61
+ with:
62
+ python-version: "3.12"
63
+ cache: "pip"
64
+ - run: pip install build
65
+ - run: python -m build
66
+ - uses: actions/upload-artifact@v4
67
+ with:
68
+ name: dist
69
+ path: dist/
70
+
71
+ audit:
72
+ runs-on: ubuntu-latest
73
+ steps:
74
+ - uses: actions/checkout@v4
75
+ - uses: actions/setup-python@v5
76
+ with:
77
+ python-version: "3.12"
78
+ cache: "pip"
79
+ - run: pip install pip-audit
80
+ - run: pip-audit --strict --desc --skip-editable
@@ -0,0 +1,21 @@
1
+ name: Detect Secrets
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ detect-secrets:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ with:
18
+ fetch-depth: 0
19
+ - uses: gitleaks/gitleaks-action@v2
20
+ env:
21
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,22 @@
1
+ name: Release Drafter
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ types: [opened, reopened, synchronize]
8
+
9
+ permissions:
10
+ contents: read
11
+ pull-requests: write
12
+
13
+ jobs:
14
+ update_release_draft:
15
+ runs-on: ubuntu-latest
16
+ permissions:
17
+ contents: write
18
+ pull-requests: write
19
+ steps:
20
+ - uses: release-drafter/release-drafter@v6
21
+ env:
22
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,24 @@
1
+ name: Stale Issues and PRs
2
+
3
+ on:
4
+ schedule:
5
+ - cron: "0 0 * * *"
6
+
7
+ permissions:
8
+ issues: write
9
+ pull-requests: write
10
+
11
+ jobs:
12
+ stale:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/stale@v9
16
+ with:
17
+ stale-issue-message: "This issue has been automatically marked as stale because it has not had activity in 30 days. It will be closed in 7 days if no further activity occurs."
18
+ stale-pr-message: "This PR has been automatically marked as stale because it has not had activity in 30 days. It will be closed in 7 days if no further activity occurs."
19
+ days-before-stale: 30
20
+ days-before-close: 7
21
+ stale-issue-label: "stale"
22
+ stale-pr-label: "stale"
23
+ exempt-issue-labels: "pinned,security,bug"
24
+ exempt-pr-labels: "pinned,security"
@@ -0,0 +1,22 @@
1
+ __pycache__/
2
+ *.pyc
3
+ *.pyo
4
+ .venv/
5
+ venv/
6
+ *.egg-info/
7
+ dist/
8
+ build/
9
+ *.db
10
+ *.db-journal
11
+ *.db-wal
12
+ *.db-shm
13
+ .cache/
14
+ .pytest_cache/
15
+ .mypy_cache/
16
+ .ruff_cache/
17
+ .docshaven/
18
+ .docshaven-sync/
19
+ .env
20
+ .env.*
21
+ *.log
22
+ .repowise/
@@ -0,0 +1,25 @@
1
+ # Changelog
2
+
3
+ All notable changes to DocsHaven will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this project adheres to [Semantic Versioning](https://semver.org/).
6
+
7
+ ## [0.1.0] - 2026-07-16
8
+
9
+ ### Added
10
+ - SQLite FTS5 search engine (replaces QMD dependency)
11
+ - BM25 full-text search with LIKE fallback
12
+ - Auto strategy selection (fts/hybrid by query length)
13
+ - Document chunking for better search precision
14
+ - Type-aware result boosting
15
+ - URI routing (core://, ref://, guide://, lib://, src://, test://, note://)
16
+ - Git sync with compressed chunks (no merge conflicts)
17
+ - Conflict detection when adding documents
18
+ - MCP server with 15 tools
19
+ - MIT license
20
+ - pytest test suite
21
+
22
+ ### Changed
23
+ - Storage backend: QMD → SQLite FTS5 (zero external dependencies)
24
+ - Search: FTS5 + LIKE fallback (pattern from mcp-ariel-memory)
25
+ - Conflicts: now uses Storage.search() instead of QMD CLI
@@ -0,0 +1,41 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to a positive environment:
15
+
16
+ * Using welcoming and inclusive language
17
+ * Being respectful of differing viewpoints and experiences
18
+ * Gracefully accepting constructive criticism
19
+ * Focusing on what is best for the community
20
+ * Showing empathy towards other community members
21
+
22
+ Examples of unacceptable behavior:
23
+
24
+ * The use of sexualized language or imagery and unwelcome sexual attention
25
+ * Trolling, insulting or derogatory comments, and personal or political attacks
26
+ * Public or private harassment
27
+ * Publishing others' private information without explicit permission
28
+ * Other conduct which could reasonably be considered inappropriate in a professional setting
29
+
30
+ ## Enforcement
31
+
32
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
33
+ reported to the project maintainer. All complaints will be reviewed and
34
+ investigated and will result in a response that is deemed necessary and
35
+ appropriate to the circumstances.
36
+
37
+ ## Attribution
38
+
39
+ This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org),
40
+ version 2.0, available at
41
+ https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
@@ -0,0 +1,47 @@
1
+ # Contributing to DocsHaven
2
+
3
+ Thank you for your interest in contributing!
4
+
5
+ ## Development Setup
6
+
7
+ ```bash
8
+ git clone https://github.com/Cipher208/docs-haven.git
9
+ cd docs-haven
10
+ pip install -e ".[test]"
11
+ ```
12
+
13
+ ## Running Tests
14
+
15
+ ```bash
16
+ pytest tests/ -v
17
+ ```
18
+
19
+ ## Code Quality
20
+
21
+ ```bash
22
+ ruff check .
23
+ ruff format --check .
24
+ mypy uri.py storage.py sync.py conflicts.py server.py --ignore-missing-imports
25
+ ```
26
+
27
+ ## Pull Request Process
28
+
29
+ 1. Fork the repository
30
+ 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
31
+ 3. Make your changes
32
+ 4. Run tests (`pytest tests/ -v`)
33
+ 5. Run linting (`ruff check .`)
34
+ 6. Commit your changes (`git commit -m 'Add amazing feature'`)
35
+ 7. Push to the branch (`git push origin feature/amazing-feature`)
36
+ 8. Open a Pull Request
37
+
38
+ ## Code Style
39
+
40
+ - Use ruff for linting and formatting
41
+ - Follow PEP 8
42
+ - Add docstrings to public functions
43
+ - Keep functions focused and small
44
+
45
+ ## Reporting Issues
46
+
47
+ Use the [GitHub issue tracker](https://github.com/Cipher208/docs-haven/issues) to report bugs or request features.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 DocsHaven Contributors
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.