ragdex 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.
- ragdex-0.1.0/.claude/settings.local.json +84 -0
- ragdex-0.1.0/.github/ISSUE_TEMPLATE/bug_report.md +67 -0
- ragdex-0.1.0/.github/ISSUE_TEMPLATE/feature_request.md +69 -0
- ragdex-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +94 -0
- ragdex-0.1.0/.github/workflows/publish.yml +85 -0
- ragdex-0.1.0/.github/workflows/test.yml +52 -0
- ragdex-0.1.0/.github/workflows/test_package.yml +75 -0
- ragdex-0.1.0/.gitignore +98 -0
- ragdex-0.1.0/CHANGELOG.md +72 -0
- ragdex-0.1.0/CONTRIBUTING.md +236 -0
- ragdex-0.1.0/Claude.md +163 -0
- ragdex-0.1.0/LICENSE +36 -0
- ragdex-0.1.0/MANIFEST.in +42 -0
- ragdex-0.1.0/MULTI_DOCUMENT_SUPPORT_STATUS.md +72 -0
- ragdex-0.1.0/PKG-INFO +665 -0
- ragdex-0.1.0/PROJECT_STRUCTURE.md +333 -0
- ragdex-0.1.0/PYPI_PUBLICATION_PLAN.md +304 -0
- ragdex-0.1.0/QUICK_REFERENCE.md +301 -0
- ragdex-0.1.0/README.md +578 -0
- ragdex-0.1.0/SERVER_COMPARISON.md +59 -0
- ragdex-0.1.0/SETUP_INFO.md +69 -0
- ragdex-0.1.0/TESTPYPI_UPLOAD.md +135 -0
- ragdex-0.1.0/config/claude_desktop_config.json +18 -0
- ragdex-0.1.0/config/claude_desktop_config.json.template +18 -0
- ragdex-0.1.0/config/claude_desktop_config.json.template.old +18 -0
- ragdex-0.1.0/config/com.personal-library.index-monitor.plist +71 -0
- ragdex-0.1.0/config/com.personal-library.index-monitor.plist.template +71 -0
- ragdex-0.1.0/config/com.personal-library.webmonitor.plist +59 -0
- ragdex-0.1.0/config/com.personal-library.webmonitor.plist.template +59 -0
- ragdex-0.1.0/docs/ARCHITECTURE.md +702 -0
- ragdex-0.1.0/docs/LAUNCHAGENT_PERMISSIONS_SOLUTION.md +178 -0
- ragdex-0.1.0/docs/architecture.html +927 -0
- ragdex-0.1.0/docs/images/RAGMCPWebMonitor.png +0 -0
- ragdex-0.1.0/docs/images/README.md +26 -0
- ragdex-0.1.0/docs/parallel_processing_optimization_plan.md +285 -0
- ragdex-0.1.0/install_interactive_nonservicemode.sh +521 -0
- ragdex-0.1.0/pyproject.toml +75 -0
- ragdex-0.1.0/requirements.txt +26 -0
- ragdex-0.1.0/scripts/cleanup_failed_list.sh +74 -0
- ragdex-0.1.0/scripts/cleanup_ocr_cache.sh +56 -0
- ragdex-0.1.0/scripts/execute_fresh_indexing.sh +141 -0
- ragdex-0.1.0/scripts/generate_configs.sh +124 -0
- ragdex-0.1.0/scripts/index_monitor.sh +55 -0
- ragdex-0.1.0/scripts/index_monitor_service.sh +173 -0
- ragdex-0.1.0/scripts/indexing_status.sh +93 -0
- ragdex-0.1.0/scripts/install_service.sh +72 -0
- ragdex-0.1.0/scripts/install_webmonitor_service.sh +80 -0
- ragdex-0.1.0/scripts/manage_failed_docs.sh +187 -0
- ragdex-0.1.0/scripts/pause_indexing.sh +23 -0
- ragdex-0.1.0/scripts/process_ocr_candidates.sh +129 -0
- ragdex-0.1.0/scripts/resume_indexing.sh +31 -0
- ragdex-0.1.0/scripts/run.sh +263 -0
- ragdex-0.1.0/scripts/service_status.sh +132 -0
- ragdex-0.1.0/scripts/start_web_monitor.sh +68 -0
- ragdex-0.1.0/scripts/stop_monitor.sh +33 -0
- ragdex-0.1.0/scripts/stop_web_monitor.sh +31 -0
- ragdex-0.1.0/scripts/test_logs.sh +38 -0
- ragdex-0.1.0/scripts/uninstall_service.sh +59 -0
- ragdex-0.1.0/scripts/uninstall_webmonitor_service.sh +51 -0
- ragdex-0.1.0/scripts/view_mcp_logs.sh +90 -0
- ragdex-0.1.0/scripts/webmonitor_service.sh +35 -0
- ragdex-0.1.0/scripts/webmonitor_service_status.sh +87 -0
- ragdex-0.1.0/serviceInstall.sh +475 -0
- ragdex-0.1.0/src/personal_doc_library/__init__.py +14 -0
- ragdex-0.1.0/src/personal_doc_library/cli.py +101 -0
- ragdex-0.1.0/src/personal_doc_library/core/__init__.py +0 -0
- ragdex-0.1.0/src/personal_doc_library/core/config.py +126 -0
- ragdex-0.1.0/src/personal_doc_library/core/logging_config.py +149 -0
- ragdex-0.1.0/src/personal_doc_library/core/shared_rag.py +1921 -0
- ragdex-0.1.0/src/personal_doc_library/core/timeout_handler.py +316 -0
- ragdex-0.1.0/src/personal_doc_library/indexing/__init__.py +1 -0
- ragdex-0.1.0/src/personal_doc_library/indexing/clean_pdfs.py +244 -0
- ragdex-0.1.0/src/personal_doc_library/indexing/complete_indexing.py +199 -0
- ragdex-0.1.0/src/personal_doc_library/indexing/execute_indexing.py +169 -0
- ragdex-0.1.0/src/personal_doc_library/indexing/handle_large_pdf.py +241 -0
- ragdex-0.1.0/src/personal_doc_library/indexing/index_large_pdf_detailed.py +233 -0
- ragdex-0.1.0/src/personal_doc_library/indexing/index_monitor.py +774 -0
- ragdex-0.1.0/src/personal_doc_library/indexing/index_specific.py +99 -0
- ragdex-0.1.0/src/personal_doc_library/indexing/manage_failed_pdfs.py +124 -0
- ragdex-0.1.0/src/personal_doc_library/indexing/monitor_indexing.py +73 -0
- ragdex-0.1.0/src/personal_doc_library/monitoring/__init__.py +1 -0
- ragdex-0.1.0/src/personal_doc_library/monitoring/monitor_web_enhanced.py +1356 -0
- ragdex-0.1.0/src/personal_doc_library/servers/__init__.py +1 -0
- ragdex-0.1.0/src/personal_doc_library/servers/mcp_complete_server.py +1297 -0
- ragdex-0.1.0/src/personal_doc_library/utils/__init__.py +1 -0
- ragdex-0.1.0/src/personal_doc_library/utils/check_indexing_status.py +108 -0
- ragdex-0.1.0/src/personal_doc_library/utils/fallback_search.py +33 -0
- ragdex-0.1.0/src/personal_doc_library/utils/find_unindexed.py +60 -0
- ragdex-0.1.0/src/personal_doc_library/utils/fix_skipped_file.py +65 -0
- ragdex-0.1.0/src/personal_doc_library/utils/index_lock.py +164 -0
- ragdex-0.1.0/src/personal_doc_library/utils/ocr_manager.py +336 -0
- ragdex-0.1.0/src/personal_doc_library/utils/show_config.py +59 -0
- ragdex-0.1.0/src/personal_doc_library/utils/skip_and_continue.py +42 -0
- ragdex-0.1.0/test_mcp_features.py +72 -0
- ragdex-0.1.0/test_resources.py +73 -0
- ragdex-0.1.0/test_testpypi_install.sh +92 -0
- ragdex-0.1.0/upload_to_pypi.sh +83 -0
- ragdex-0.1.0/upload_to_testpypi.sh +73 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(export SPIRITUAL_LIBRARY_BOOKS_PATH=\"/Users/hpoliset/SpiritualLibrary\")",
|
|
5
|
+
"Bash(export SPIRITUAL_LIBRARY_DB_PATH=\"/Users/hpoliset/DocumentIndexerMCP/chroma_db\")",
|
|
6
|
+
"Bash(export SPIRITUAL_LIBRARY_LOGS_PATH=\"/Users/hpoliset/DocumentIndexerMCP/logs\")",
|
|
7
|
+
"Bash(./setup.sh:*)",
|
|
8
|
+
"Bash(cat:*)",
|
|
9
|
+
"Bash(./scripts/start_web_monitor.sh:*)",
|
|
10
|
+
"Bash(./scripts/indexing_status.sh:*)",
|
|
11
|
+
"Bash(./scripts/install_service.sh:*)",
|
|
12
|
+
"Bash(./scripts/service_status.sh:*)",
|
|
13
|
+
"Bash(source:*)",
|
|
14
|
+
"Bash(pip install:*)",
|
|
15
|
+
"Bash(./scripts/uninstall_service.sh:*)",
|
|
16
|
+
"Bash(ls:*)",
|
|
17
|
+
"Bash(kill:*)",
|
|
18
|
+
"Bash(mv:*)",
|
|
19
|
+
"Bash(log show:*)",
|
|
20
|
+
"Bash(brew install:*)",
|
|
21
|
+
"Bash(soffice:*)",
|
|
22
|
+
"Bash(grep:*)",
|
|
23
|
+
"Bash(chmod:*)",
|
|
24
|
+
"Bash(./scripts/manage_failed_docs.sh:*)",
|
|
25
|
+
"Bash(find:*)",
|
|
26
|
+
"Bash(python3:*)",
|
|
27
|
+
"Bash(pandoc:*)",
|
|
28
|
+
"Bash(echo:*)",
|
|
29
|
+
"Bash(./scripts/cleanup_failed_list.sh:*)",
|
|
30
|
+
"Bash(git add:*)",
|
|
31
|
+
"Bash(git commit:*)",
|
|
32
|
+
"Bash(./scripts/cleanup_ocr_cache.sh:*)",
|
|
33
|
+
"Bash(./scripts/run.sh:*)",
|
|
34
|
+
"Bash(export PERSONAL_LIBRARY_DOC_PATH=\"/Users/hpoliset/SpiritualLibrary\")",
|
|
35
|
+
"Bash(venv_mcp/bin/python -c \"from src.core.config import config; print(f''Books directory: {config.books_directory}'')\")",
|
|
36
|
+
"Bash(git push:*)",
|
|
37
|
+
"Bash(diff:*)",
|
|
38
|
+
"Bash(venv_mcp/bin/python:*)",
|
|
39
|
+
"Bash(timeout 5 venv_mcp/bin/python:*)",
|
|
40
|
+
"Bash(venv_mcp/bin/pip:*)",
|
|
41
|
+
"Bash(curl:*)",
|
|
42
|
+
"Bash(launchctl:*)",
|
|
43
|
+
"Bash(mkdir:*)",
|
|
44
|
+
"Bash(git remote set-url:*)",
|
|
45
|
+
"Bash(for:*)",
|
|
46
|
+
"Bash(do sed -i '' 's/com\\.spiritual-library/com.personal-library/g' \"$file\")",
|
|
47
|
+
"Bash(done)",
|
|
48
|
+
"Bash(sed:*)",
|
|
49
|
+
"Bash(git checkout:*)",
|
|
50
|
+
"Bash(git pull:*)",
|
|
51
|
+
"Bash(git branch:*)",
|
|
52
|
+
"Bash(git fetch:*)",
|
|
53
|
+
"Bash(gs:*)",
|
|
54
|
+
"Bash(./scripts/view_mcp_logs.sh:*)",
|
|
55
|
+
"Bash(pkill:*)",
|
|
56
|
+
"Bash(true)",
|
|
57
|
+
"Bash(rm:*)",
|
|
58
|
+
"WebSearch",
|
|
59
|
+
"Bash(export TOKENIZERS_PARALLELISM=false CHROMA_TELEMETRY=false ANONYMIZED_TELEMETRY=false)",
|
|
60
|
+
"Bash(/opt/homebrew/bin/python3.12:*)",
|
|
61
|
+
"Bash(venv_mcp_312/bin/python:*)",
|
|
62
|
+
"Bash(venv_mcp_312/bin/pip install --upgrade pip)",
|
|
63
|
+
"Bash(venv_mcp_312/bin/pip install:*)",
|
|
64
|
+
"Bash(do)",
|
|
65
|
+
"Bash(if grep -q \"venv_mcp/bin/python\" \"$file\")",
|
|
66
|
+
"Bash(then)",
|
|
67
|
+
"Bash(fi)",
|
|
68
|
+
"Bash(export PERSONAL_LIBRARY_DB_PATH=\"/Users/hpoliset/DocumentIndexerMCP/chroma_db\")",
|
|
69
|
+
"Bash(./scripts/update_claude_config.sh:*)",
|
|
70
|
+
"Bash(./scripts/install_webmonitor_service.sh:*)",
|
|
71
|
+
"Bash(./scripts/uninstall_webmonitor_service.sh:*)",
|
|
72
|
+
"Bash(sample:*)",
|
|
73
|
+
"Bash(open http://localhost:8888)",
|
|
74
|
+
"Bash(/tmp/monitor_indexing.sh:*)",
|
|
75
|
+
"Bash(venv_mcp/bin/pdlib-cli:*)",
|
|
76
|
+
"Bash(timeout 5 venv_mcp/bin/pdlib-mcp:*)",
|
|
77
|
+
"Bash(timeout:*)",
|
|
78
|
+
"Read(//Users/hpoliset/Library/Logs/Claude/**)",
|
|
79
|
+
"Read(//Users/hpoliset/Library/Application Support/Claude/**)",
|
|
80
|
+
"Bash(python test_mcp_features.py)"
|
|
81
|
+
],
|
|
82
|
+
"deny": []
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: '[BUG] '
|
|
5
|
+
labels: bug
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Bug Description
|
|
10
|
+
A clear and concise description of what the bug is.
|
|
11
|
+
|
|
12
|
+
## Steps to Reproduce
|
|
13
|
+
1. Go to '...'
|
|
14
|
+
2. Click on '....'
|
|
15
|
+
3. Scroll down to '....'
|
|
16
|
+
4. See error
|
|
17
|
+
|
|
18
|
+
## Expected Behavior
|
|
19
|
+
A clear and concise description of what you expected to happen.
|
|
20
|
+
|
|
21
|
+
## Actual Behavior
|
|
22
|
+
A clear and concise description of what actually happened.
|
|
23
|
+
|
|
24
|
+
## Environment
|
|
25
|
+
- OS: [e.g., macOS 14.0, Ubuntu 22.04]
|
|
26
|
+
- Python version: [e.g., 3.11.13]
|
|
27
|
+
- Architecture: [e.g., ARM64, x86_64]
|
|
28
|
+
- Claude Desktop version: [e.g., 0.11.6]
|
|
29
|
+
- Virtual environment: [e.g., venv_mcp, venv]
|
|
30
|
+
|
|
31
|
+
## Configuration
|
|
32
|
+
**Claude Desktop Config:**
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"mcpServers": {
|
|
36
|
+
// Your configuration here
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Logs
|
|
42
|
+
**MCP Server Logs:**
|
|
43
|
+
```
|
|
44
|
+
Paste relevant log entries from:
|
|
45
|
+
~/Library/Logs/Claude/mcp-server-spiritual-library.log
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**Server Output (if running manually):**
|
|
49
|
+
```
|
|
50
|
+
Paste output from ./run.sh or direct server execution
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Library Details
|
|
54
|
+
- Number of books: [e.g., 68]
|
|
55
|
+
- Total chunks indexed: [e.g., 38,485]
|
|
56
|
+
- Failed PDFs: [e.g., 0]
|
|
57
|
+
- ChromaDB size: [e.g., 55MB]
|
|
58
|
+
|
|
59
|
+
## Additional Context
|
|
60
|
+
Add any other context about the problem here, such as:
|
|
61
|
+
- Recent changes made
|
|
62
|
+
- When the issue started
|
|
63
|
+
- Specific books or searches that trigger the issue
|
|
64
|
+
- Screenshots if applicable
|
|
65
|
+
|
|
66
|
+
## Possible Solution
|
|
67
|
+
If you have ideas about what might be causing the issue or how to fix it, please describe them here.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest an idea for this project
|
|
4
|
+
title: '[FEATURE] '
|
|
5
|
+
labels: enhancement
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Feature Description
|
|
10
|
+
A clear and concise description of the feature you'd like to see.
|
|
11
|
+
|
|
12
|
+
## Use Case
|
|
13
|
+
Describe the problem this feature would solve or the use case it addresses.
|
|
14
|
+
|
|
15
|
+
## Proposed Solution
|
|
16
|
+
A clear and concise description of what you want to happen.
|
|
17
|
+
|
|
18
|
+
## Alternative Solutions
|
|
19
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
|
20
|
+
|
|
21
|
+
## Implementation Ideas
|
|
22
|
+
If you have ideas about how this could be implemented, please describe them:
|
|
23
|
+
|
|
24
|
+
### MCP Tool Addition
|
|
25
|
+
If this is a new MCP tool:
|
|
26
|
+
- Tool name: [e.g., `analyze_themes`]
|
|
27
|
+
- Input parameters: [e.g., `book_name`, `theme_type`]
|
|
28
|
+
- Expected output: [e.g., theme analysis with quotes]
|
|
29
|
+
|
|
30
|
+
### Backend Changes
|
|
31
|
+
If this requires backend changes:
|
|
32
|
+
- Component affected: [e.g., shared_rag.py, mcp_complete_server.py]
|
|
33
|
+
- New dependencies: [e.g., additional Python packages]
|
|
34
|
+
- Performance impact: [e.g., minimal, requires optimization]
|
|
35
|
+
|
|
36
|
+
## Priority
|
|
37
|
+
- [ ] Critical (blocks current functionality)
|
|
38
|
+
- [ ] High (significantly improves user experience)
|
|
39
|
+
- [ ] Medium (nice to have improvement)
|
|
40
|
+
- [ ] Low (minor enhancement)
|
|
41
|
+
|
|
42
|
+
## Complexity
|
|
43
|
+
- [ ] Simple (few lines of code)
|
|
44
|
+
- [ ] Medium (new function/method)
|
|
45
|
+
- [ ] Complex (new component/architecture change)
|
|
46
|
+
- [ ] Unknown
|
|
47
|
+
|
|
48
|
+
## Examples
|
|
49
|
+
Provide examples of how this feature would be used:
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
# Example code if applicable
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Claude interaction example:**
|
|
56
|
+
```
|
|
57
|
+
User: "Find themes about compassion across all books"
|
|
58
|
+
Claude: [uses new analyze_themes tool]
|
|
59
|
+
Response: "Found 3 main themes about compassion..."
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Additional Context
|
|
63
|
+
Add any other context, screenshots, or examples about the feature request here.
|
|
64
|
+
|
|
65
|
+
## Willingness to Contribute
|
|
66
|
+
- [ ] I would be willing to implement this feature
|
|
67
|
+
- [ ] I would be willing to help test this feature
|
|
68
|
+
- [ ] I would be willing to help document this feature
|
|
69
|
+
- [ ] I would prefer someone else implements this
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Pull Request
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
Brief description of the changes in this PR.
|
|
5
|
+
|
|
6
|
+
## Type of Change
|
|
7
|
+
- [ ] Bug fix (non-breaking change which fixes an issue)
|
|
8
|
+
- [ ] New feature (non-breaking change which adds functionality)
|
|
9
|
+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
|
10
|
+
- [ ] Documentation update
|
|
11
|
+
- [ ] Performance improvement
|
|
12
|
+
- [ ] Code refactoring
|
|
13
|
+
- [ ] Test addition/improvement
|
|
14
|
+
|
|
15
|
+
## Changes Made
|
|
16
|
+
-
|
|
17
|
+
-
|
|
18
|
+
-
|
|
19
|
+
|
|
20
|
+
## Testing
|
|
21
|
+
### Manual Testing
|
|
22
|
+
- [ ] Tested MCP server integration with Claude Desktop
|
|
23
|
+
- [ ] Tested search functionality with sample queries
|
|
24
|
+
- [ ] Tested new tools (if applicable)
|
|
25
|
+
- [ ] Tested on ARM64 (Apple Silicon)
|
|
26
|
+
- [ ] Tested on x86_64 (Intel)
|
|
27
|
+
|
|
28
|
+
### Automated Testing
|
|
29
|
+
- [ ] All existing tests pass
|
|
30
|
+
- [ ] Added tests for new functionality
|
|
31
|
+
- [ ] Linting passes (flake8)
|
|
32
|
+
- [ ] Formatting passes (black)
|
|
33
|
+
- [ ] Type checking passes (mypy)
|
|
34
|
+
|
|
35
|
+
## Environment Tested
|
|
36
|
+
- OS: [e.g., macOS 14.0]
|
|
37
|
+
- Python version: [e.g., 3.11.13]
|
|
38
|
+
- Architecture: [e.g., ARM64]
|
|
39
|
+
- Claude Desktop version: [e.g., 0.11.6]
|
|
40
|
+
|
|
41
|
+
## Performance Impact
|
|
42
|
+
- [ ] No performance impact
|
|
43
|
+
- [ ] Minor performance improvement
|
|
44
|
+
- [ ] Minor performance regression (justified)
|
|
45
|
+
- [ ] Significant performance change (explained below)
|
|
46
|
+
|
|
47
|
+
**Performance details:**
|
|
48
|
+
[If applicable, describe performance changes]
|
|
49
|
+
|
|
50
|
+
## Breaking Changes
|
|
51
|
+
- [ ] No breaking changes
|
|
52
|
+
- [ ] Breaking changes (described below)
|
|
53
|
+
|
|
54
|
+
**Breaking change details:**
|
|
55
|
+
[If applicable, describe what breaks and how to migrate]
|
|
56
|
+
|
|
57
|
+
## Documentation
|
|
58
|
+
- [ ] Updated README.md
|
|
59
|
+
- [ ] Updated CHANGELOG.md
|
|
60
|
+
- [ ] Updated CONTRIBUTING.md
|
|
61
|
+
- [ ] Updated code comments/docstrings
|
|
62
|
+
- [ ] No documentation changes needed
|
|
63
|
+
|
|
64
|
+
## Configuration Changes
|
|
65
|
+
- [ ] No configuration changes
|
|
66
|
+
- [ ] Updated requirements.txt
|
|
67
|
+
- [ ] Updated Claude Desktop config format
|
|
68
|
+
- [ ] Added new environment variables
|
|
69
|
+
|
|
70
|
+
**Configuration details:**
|
|
71
|
+
[If applicable, describe configuration changes]
|
|
72
|
+
|
|
73
|
+
## Related Issues
|
|
74
|
+
Fixes #[issue number]
|
|
75
|
+
Related to #[issue number]
|
|
76
|
+
|
|
77
|
+
## Screenshots (if applicable)
|
|
78
|
+
[Add screenshots of new features or UI changes]
|
|
79
|
+
|
|
80
|
+
## Deployment Notes
|
|
81
|
+
[Any special notes for deploying this change]
|
|
82
|
+
|
|
83
|
+
## Rollback Plan
|
|
84
|
+
[How to rollback this change if needed]
|
|
85
|
+
|
|
86
|
+
## Checklist
|
|
87
|
+
- [ ] My code follows the project's style guidelines
|
|
88
|
+
- [ ] I have performed a self-review of my own code
|
|
89
|
+
- [ ] I have commented my code, particularly in hard-to-understand areas
|
|
90
|
+
- [ ] I have made corresponding changes to the documentation
|
|
91
|
+
- [ ] My changes generate no new warnings
|
|
92
|
+
- [ ] I have added tests that prove my fix is effective or that my feature works
|
|
93
|
+
- [ ] New and existing unit tests pass locally with my changes
|
|
94
|
+
- [ ] Any dependent changes have been merged and published
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
inputs:
|
|
8
|
+
test_pypi:
|
|
9
|
+
description: 'Publish to TestPyPI instead of PyPI'
|
|
10
|
+
required: false
|
|
11
|
+
type: boolean
|
|
12
|
+
default: false
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
build:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Set up Python
|
|
21
|
+
uses: actions/setup-python@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: '3.11'
|
|
24
|
+
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: |
|
|
27
|
+
python -m pip install --upgrade pip
|
|
28
|
+
pip install build twine
|
|
29
|
+
|
|
30
|
+
- name: Build package
|
|
31
|
+
run: python -m build
|
|
32
|
+
|
|
33
|
+
- name: Check package
|
|
34
|
+
run: python -m twine check dist/*
|
|
35
|
+
|
|
36
|
+
- name: Upload artifacts
|
|
37
|
+
uses: actions/upload-artifact@v4
|
|
38
|
+
with:
|
|
39
|
+
name: dist
|
|
40
|
+
path: dist/
|
|
41
|
+
|
|
42
|
+
publish-testpypi:
|
|
43
|
+
if: github.event.inputs.test_pypi == 'true'
|
|
44
|
+
needs: build
|
|
45
|
+
runs-on: ubuntu-latest
|
|
46
|
+
environment:
|
|
47
|
+
name: testpypi
|
|
48
|
+
url: https://test.pypi.org/p/personal-doc-library
|
|
49
|
+
permissions:
|
|
50
|
+
id-token: write
|
|
51
|
+
|
|
52
|
+
steps:
|
|
53
|
+
- name: Download artifacts
|
|
54
|
+
uses: actions/download-artifact@v4
|
|
55
|
+
with:
|
|
56
|
+
name: dist
|
|
57
|
+
path: dist/
|
|
58
|
+
|
|
59
|
+
- name: Publish to TestPyPI
|
|
60
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
61
|
+
with:
|
|
62
|
+
repository-url: https://test.pypi.org/legacy/
|
|
63
|
+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
|
64
|
+
|
|
65
|
+
publish-pypi:
|
|
66
|
+
if: github.event_name == 'release' || github.event.inputs.test_pypi == 'false'
|
|
67
|
+
needs: build
|
|
68
|
+
runs-on: ubuntu-latest
|
|
69
|
+
environment:
|
|
70
|
+
name: pypi
|
|
71
|
+
url: https://pypi.org/p/personal-doc-library
|
|
72
|
+
permissions:
|
|
73
|
+
id-token: write
|
|
74
|
+
|
|
75
|
+
steps:
|
|
76
|
+
- name: Download artifacts
|
|
77
|
+
uses: actions/download-artifact@v4
|
|
78
|
+
with:
|
|
79
|
+
name: dist
|
|
80
|
+
path: dist/
|
|
81
|
+
|
|
82
|
+
- name: Publish to PyPI
|
|
83
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
84
|
+
with:
|
|
85
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main, develop ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main ]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ${{ matrix.os }}
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
os: [ubuntu-latest, macos-latest]
|
|
15
|
+
python-version: [3.9, 3.10, 3.11]
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
21
|
+
uses: actions/setup-python@v4
|
|
22
|
+
with:
|
|
23
|
+
python-version: ${{ matrix.python-version }}
|
|
24
|
+
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: |
|
|
27
|
+
python -m pip install --upgrade pip
|
|
28
|
+
pip install -r requirements.txt
|
|
29
|
+
pip install pytest black flake8 mypy
|
|
30
|
+
|
|
31
|
+
- name: Lint with flake8
|
|
32
|
+
run: |
|
|
33
|
+
# Stop build if there are Python syntax errors or undefined names
|
|
34
|
+
flake8 *.py --count --select=E9,F63,F7,F82 --show-source --statistics
|
|
35
|
+
# Exit-zero treats all errors as warnings
|
|
36
|
+
flake8 *.py --count --exit-zero --max-complexity=10 --max-line-length=100 --statistics
|
|
37
|
+
|
|
38
|
+
- name: Check formatting with black
|
|
39
|
+
run: |
|
|
40
|
+
black --check *.py
|
|
41
|
+
|
|
42
|
+
- name: Type check with mypy
|
|
43
|
+
run: |
|
|
44
|
+
mypy *.py --ignore-missing-imports
|
|
45
|
+
|
|
46
|
+
- name: Test with pytest (when tests are available)
|
|
47
|
+
run: |
|
|
48
|
+
if [ -d "tests" ]; then
|
|
49
|
+
pytest tests/ -v
|
|
50
|
+
else
|
|
51
|
+
echo "No tests directory found, skipping tests"
|
|
52
|
+
fi
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
name: Test Package with uv
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main, develop, pr-* ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main ]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
test:
|
|
12
|
+
runs-on: ${{ matrix.os }}
|
|
13
|
+
strategy:
|
|
14
|
+
fail-fast: false
|
|
15
|
+
matrix:
|
|
16
|
+
os: [ubuntu-latest, macos-latest]
|
|
17
|
+
python-version: ['3.10', '3.11', '3.12']
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
|
|
22
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
23
|
+
uses: actions/setup-python@v5
|
|
24
|
+
with:
|
|
25
|
+
python-version: ${{ matrix.python-version }}
|
|
26
|
+
|
|
27
|
+
- name: Install uv
|
|
28
|
+
run: |
|
|
29
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
30
|
+
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
|
31
|
+
|
|
32
|
+
- name: Create virtual environment
|
|
33
|
+
run: uv venv
|
|
34
|
+
|
|
35
|
+
- name: Install package with dependencies
|
|
36
|
+
run: |
|
|
37
|
+
uv pip install -e .
|
|
38
|
+
uv pip install pytest pytest-cov
|
|
39
|
+
|
|
40
|
+
- name: Test imports
|
|
41
|
+
run: |
|
|
42
|
+
uv run python -c "from personal_doc_library import __version__; print(f'Version: {__version__}')"
|
|
43
|
+
uv run python -c "from personal_doc_library.core.config import config; print('Config module loaded')"
|
|
44
|
+
uv run python -c "from personal_doc_library.cli import main; print('CLI module loaded')"
|
|
45
|
+
|
|
46
|
+
- name: Test CLI commands
|
|
47
|
+
run: |
|
|
48
|
+
uv run pdlib-cli --help
|
|
49
|
+
uv run pdlib-cli config
|
|
50
|
+
|
|
51
|
+
- name: Run test files
|
|
52
|
+
run: |
|
|
53
|
+
if [ -f "test_mcp_features.py" ]; then
|
|
54
|
+
uv run python test_mcp_features.py || echo "Test completed with status $?"
|
|
55
|
+
fi
|
|
56
|
+
if [ -f "test_resources.py" ]; then
|
|
57
|
+
uv run python test_resources.py || echo "Test completed with status $?"
|
|
58
|
+
fi
|
|
59
|
+
|
|
60
|
+
- name: Build package
|
|
61
|
+
run: |
|
|
62
|
+
uv pip install build
|
|
63
|
+
uv run python -m build
|
|
64
|
+
|
|
65
|
+
- name: Check package with twine
|
|
66
|
+
run: |
|
|
67
|
+
uv pip install twine
|
|
68
|
+
uv run python -m twine check dist/*
|
|
69
|
+
|
|
70
|
+
- name: List package contents
|
|
71
|
+
run: |
|
|
72
|
+
echo "=== Wheel contents ==="
|
|
73
|
+
unzip -l dist/*.whl | head -30
|
|
74
|
+
echo "=== Source dist contents ==="
|
|
75
|
+
tar -tzf dist/*.tar.gz | head -30
|
ragdex-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
.Python
|
|
7
|
+
env/
|
|
8
|
+
venv/
|
|
9
|
+
venv_mcp/
|
|
10
|
+
venv_mcp_x86_backup/
|
|
11
|
+
ENV/
|
|
12
|
+
env.bak/
|
|
13
|
+
venv.bak/
|
|
14
|
+
|
|
15
|
+
# IDE
|
|
16
|
+
.vscode/
|
|
17
|
+
.idea/
|
|
18
|
+
*.swp
|
|
19
|
+
*.swo
|
|
20
|
+
|
|
21
|
+
# macOS
|
|
22
|
+
.DS_Store
|
|
23
|
+
.AppleDouble
|
|
24
|
+
.LSOverride
|
|
25
|
+
|
|
26
|
+
# Logs
|
|
27
|
+
logs/
|
|
28
|
+
*.log
|
|
29
|
+
setup_log.txt
|
|
30
|
+
setup_summary.txt
|
|
31
|
+
index_monitor.log
|
|
32
|
+
|
|
33
|
+
# Database and vector stores
|
|
34
|
+
chroma_db/
|
|
35
|
+
src/core/chroma_db/
|
|
36
|
+
*.sqlite3
|
|
37
|
+
*.db
|
|
38
|
+
|
|
39
|
+
# Books and documents (user content)
|
|
40
|
+
books/
|
|
41
|
+
SpiritualLibrary/
|
|
42
|
+
|
|
43
|
+
# Temporary files
|
|
44
|
+
tmp/
|
|
45
|
+
temp/
|
|
46
|
+
*.tmp
|
|
47
|
+
*.temp
|
|
48
|
+
|
|
49
|
+
# Configuration files with sensitive data
|
|
50
|
+
config.json
|
|
51
|
+
secrets.json
|
|
52
|
+
claude_config.json
|
|
53
|
+
|
|
54
|
+
# Backup files
|
|
55
|
+
backup/
|
|
56
|
+
backup_*/
|
|
57
|
+
*.bak
|
|
58
|
+
|
|
59
|
+
# Cache
|
|
60
|
+
.cache/
|
|
61
|
+
*.cache
|
|
62
|
+
|
|
63
|
+
# OS generated files
|
|
64
|
+
Thumbs.db
|
|
65
|
+
ehthumbs.db
|
|
66
|
+
|
|
67
|
+
# Application specific
|
|
68
|
+
failed_pdfs.json
|
|
69
|
+
index_status.json
|
|
70
|
+
indexing_progress.json
|
|
71
|
+
book_index.json
|
|
72
|
+
|
|
73
|
+
# Service files (will be recreated)
|
|
74
|
+
*.pid
|
|
75
|
+
*.lock
|
|
76
|
+
|
|
77
|
+
# Environment variables (user-specific)
|
|
78
|
+
.env
|
|
79
|
+
.env.local
|
|
80
|
+
|
|
81
|
+
# Deprecated files
|
|
82
|
+
*.deprecated
|
|
83
|
+
|
|
84
|
+
# Editor temp files
|
|
85
|
+
*~
|
|
86
|
+
\#*\#
|
|
87
|
+
|
|
88
|
+
# Architecture documentation in root (now in docs/)
|
|
89
|
+
/architecture.html
|
|
90
|
+
|
|
91
|
+
# Temporary cleaned PDFs
|
|
92
|
+
*.cleaned
|
|
93
|
+
tmp_cleaned_pdfs/
|
|
94
|
+
|
|
95
|
+
# Old/deprecated scripts
|
|
96
|
+
scripts/setup-script.sh
|
|
97
|
+
scripts/run_enhanced_monitor.sh.ocr_cache/
|
|
98
|
+
.ocr_cache/
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the Spiritual Library MCP Server will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## [2.1.0] - 2025-07-05
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **New Content Tools**:
|
|
9
|
+
- `summarize_book` - Generate AI summaries of entire books
|
|
10
|
+
- `extract_quotes` - Find notable quotes on specific topics
|
|
11
|
+
- `daily_reading` - Get themed passages for daily practice
|
|
12
|
+
- `question_answer` - Ask direct questions about teachings
|
|
13
|
+
- **ARM64 Compatibility**: Full Apple Silicon support with dedicated `venv_mcp`
|
|
14
|
+
- **Lazy Initialization**: Fast MCP startup, RAG loads only when tools are used
|
|
15
|
+
- **Proper MCP Protocol Compliance**: Fixed initialization response format
|
|
16
|
+
- **Enhanced Error Handling**: Proper JSON-RPC error responses
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
- **Architecture Mismatch**: Resolved x86_64 vs ARM64 issues on Apple Silicon
|
|
20
|
+
- **Embedding Dimension Mismatch**: Restored original 768-dim `all-mpnet-base-v2` model
|
|
21
|
+
- **MCP Timeout Issues**: Lazy initialization prevents 6-second startup delay
|
|
22
|
+
- **Search Functionality**: Now returns actual results instead of 0 passages
|
|
23
|
+
- **Server Disconnection**: Proper protocol flow keeps connection alive
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
- **Embedding Model**: Switched from `all-MiniLM-L6-v2` (384-dim) to `all-mpnet-base-v2` (768-dim)
|
|
27
|
+
- **Virtual Environment**: Using `venv_mcp` with Homebrew Python for ARM64 compatibility
|
|
28
|
+
- **MCP Server Structure**: Complete rewrite with lazy loading and proper protocol handling
|
|
29
|
+
|
|
30
|
+
### Technical
|
|
31
|
+
- **Python Environment**: ARM64-native Python 3.11 via Homebrew
|
|
32
|
+
- **Vector Database**: ChromaDB with 768-dimensional embeddings
|
|
33
|
+
- **Performance**: ~1.75s search latency, supports synthesis across multiple sources
|
|
34
|
+
- **Monitoring**: Real-time web dashboard and comprehensive logging
|
|
35
|
+
|
|
36
|
+
## [2.0.0] - 2025-07-04
|
|
37
|
+
|
|
38
|
+
### Added
|
|
39
|
+
- **Hybrid Architecture**: Support for automatic, background, and manual indexing modes
|
|
40
|
+
- **Background Monitor Service**: Continuous monitoring with LaunchAgent support
|
|
41
|
+
- **Web Monitoring Interface**: Real-time status dashboard at localhost:8888
|
|
42
|
+
- **Enhanced Lock System**: File-based locking with stale detection and auto-cleanup
|
|
43
|
+
- **Automatic PDF Cleaning**: Ghostscript-based cleaning for problematic PDFs
|
|
44
|
+
- **Service Mode**: Install as system service with auto-restart capabilities
|
|
45
|
+
|
|
46
|
+
### Enhanced
|
|
47
|
+
- **Shared RAG System**: Common functionality between MCP server and background monitor
|
|
48
|
+
- **Error Recovery**: Automatic handling of corrupted or malformed PDFs
|
|
49
|
+
- **Content Categorization**: Improved classification into practice, energy_work, philosophy, general
|
|
50
|
+
- **Statistics Tracking**: Detailed library statistics and indexing history
|
|
51
|
+
|
|
52
|
+
## [1.0.0] - 2025-07-03
|
|
53
|
+
|
|
54
|
+
### Initial Release
|
|
55
|
+
- **Basic MCP Server**: Core Model Context Protocol implementation
|
|
56
|
+
- **RAG System**: PDF indexing with ChromaDB vector storage
|
|
57
|
+
- **Search Functionality**: Semantic search across spiritual library
|
|
58
|
+
- **Claude Integration**: Direct integration with Claude Desktop
|
|
59
|
+
- **PDF Processing**: Automatic text extraction and chunking
|
|
60
|
+
- **Synthesis Capabilities**: AI-powered synthesis across multiple sources
|
|
61
|
+
|
|
62
|
+
### Core Tools
|
|
63
|
+
- `search` - Semantic search with optional synthesis
|
|
64
|
+
- `find_practices` - Find specific spiritual practices
|
|
65
|
+
- `compare_perspectives` - Compare perspectives across sources
|
|
66
|
+
- `library_stats` - Get library statistics and indexing status
|
|
67
|
+
|
|
68
|
+
### Technical Foundation
|
|
69
|
+
- **Vector Storage**: ChromaDB with sentence-transformers embeddings
|
|
70
|
+
- **LLM Integration**: Ollama with llama3.1:70b model
|
|
71
|
+
- **PDF Processing**: PyPDF2 with recursive text splitting
|
|
72
|
+
- **Content Organization**: Metadata-based categorization system
|