docsif 0.1.0__py3-none-any.whl

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 (86) hide show
  1. docsif-0.1.0.dist-info/METADATA +393 -0
  2. docsif-0.1.0.dist-info/RECORD +86 -0
  3. docsif-0.1.0.dist-info/WHEEL +4 -0
  4. docsif-0.1.0.dist-info/entry_points.txt +3 -0
  5. docsif-0.1.0.dist-info/licenses/LICENSE +21 -0
  6. sif/__init__.py +24 -0
  7. sif/_version.py +3 -0
  8. sif/cli/__init__.py +11 -0
  9. sif/cli/commands/__init__.py +18 -0
  10. sif/cli/commands/bench.py +148 -0
  11. sif/cli/commands/collection.py +360 -0
  12. sif/cli/commands/context.py +154 -0
  13. sif/cli/commands/get.py +200 -0
  14. sif/cli/commands/index.py +294 -0
  15. sif/cli/commands/ls.py +67 -0
  16. sif/cli/commands/mcp.py +93 -0
  17. sif/cli/commands/pull.py +111 -0
  18. sif/cli/commands/search.py +574 -0
  19. sif/cli/config.py +206 -0
  20. sif/cli/formatters.py +269 -0
  21. sif/cli/main.py +205 -0
  22. sif/config/__init__.py +30 -0
  23. sif/config/constants.py +52 -0
  24. sif/config/settings.py +217 -0
  25. sif/core/__init__.py +21 -0
  26. sif/core/collection.py +161 -0
  27. sif/core/context.py +167 -0
  28. sif/core/document.py +125 -0
  29. sif/core/models.py +298 -0
  30. sif/database/__init__.py +23 -0
  31. sif/database/connection.py +139 -0
  32. sif/database/database.py +136 -0
  33. sif/database/migrations.py +187 -0
  34. sif/database/repositories.py +500 -0
  35. sif/database/repository.py +171 -0
  36. sif/database/schema.py +362 -0
  37. sif/embedding/__init__.py +22 -0
  38. sif/embedding/cache.py +196 -0
  39. sif/embedding/embedder.py +328 -0
  40. sif/embedding/factory.py +92 -0
  41. sif/embedding/manager.py +200 -0
  42. sif/embedding/model.py +126 -0
  43. sif/indexing/__init__.py +21 -0
  44. sif/indexing/chunker.py +226 -0
  45. sif/indexing/indexer.py +226 -0
  46. sif/indexing/parser.py +192 -0
  47. sif/indexing/scanner.py +148 -0
  48. sif/indexing/watcher.py +156 -0
  49. sif/mcp/README.md +258 -0
  50. sif/mcp/__init__.py +9 -0
  51. sif/mcp/claude_desktop_config.json +16 -0
  52. sif/mcp/cli.py +92 -0
  53. sif/mcp/protocol.py +336 -0
  54. sif/mcp/server.py +433 -0
  55. sif/mcp/server_http.py +54 -0
  56. sif/mcp/test_mcp.py +108 -0
  57. sif/mcp/tools.py +497 -0
  58. sif/mcp/transport_http.py +424 -0
  59. sif/mcp/transport_stdio.py +292 -0
  60. sif/mcp_server/__init__.py +26 -0
  61. sif/mcp_server/handlers.py +68 -0
  62. sif/mcp_server/server.py +58 -0
  63. sif/mcp_server/tools.py +216 -0
  64. sif/mcp_server/transport.py +221 -0
  65. sif/models/__init__.py +70 -0
  66. sif/models/collection.py +51 -0
  67. sif/models/context.py +45 -0
  68. sif/models/document.py +76 -0
  69. sif/models/download.py +208 -0
  70. sif/models/embedding.py +71 -0
  71. sif/models/search.py +92 -0
  72. sif/search/__init__.py +22 -0
  73. sif/search/benchmark.py +110 -0
  74. sif/search/bm25.py +216 -0
  75. sif/search/expansion.py +157 -0
  76. sif/search/hybrid.py +323 -0
  77. sif/search/rerank.py +390 -0
  78. sif/search/rrf.py +186 -0
  79. sif/search/snippets.py +130 -0
  80. sif/search/strategy.py +97 -0
  81. sif/search/vector.py +177 -0
  82. sif/utils/__init__.py +26 -0
  83. sif/utils/logging.py +143 -0
  84. sif/utils/paths.py +82 -0
  85. sif/utils/progress.py +83 -0
  86. sif/utils/text.py +128 -0
@@ -0,0 +1,393 @@
1
+ Metadata-Version: 2.4
2
+ Name: docsif
3
+ Version: 0.1.0
4
+ Summary: DocSIF - Local hybrid search engine for personal knowledge bases
5
+ Project-URL: Homepage, https://github.com/zhangtaolab/sif
6
+ Project-URL: Documentation, https://sif.readthedocs.io
7
+ Project-URL: Repository, https://github.com/zhangtaolab/sif
8
+ Author: ZhangTao Lab
9
+ License: MIT
10
+ License-File: LICENSE
11
+ Keywords: cli,docsif,documents,indexing,search,sif,vector-search
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ Classifier: Topic :: Utilities
22
+ Requires-Python: >=3.9
23
+ Requires-Dist: click>=8.0.0
24
+ Requires-Dist: fastapi>=0.100.0
25
+ Requires-Dist: numpy>=1.24.0
26
+ Requires-Dist: platformdirs>=3.0.0
27
+ Requires-Dist: pydantic-settings>=2.0.0
28
+ Requires-Dist: pydantic>=2.0.0
29
+ Requires-Dist: python-frontmatter>=1.0.0
30
+ Requires-Dist: rich>=13.0.0
31
+ Requires-Dist: sqlite-vec>=0.1.9
32
+ Requires-Dist: uvicorn>=0.20.0
33
+ Requires-Dist: watchdog>=3.0.0
34
+ Provides-Extra: all
35
+ Requires-Dist: llama-cpp-python>=0.2.0; extra == 'all'
36
+ Requires-Dist: modelscope>=1.36.0; extra == 'all'
37
+ Requires-Dist: numpy>=1.24.0; extra == 'all'
38
+ Requires-Dist: sentence-transformers>=2.2.0; extra == 'all'
39
+ Provides-Extra: dev
40
+ Requires-Dist: black>=23.0.0; extra == 'dev'
41
+ Requires-Dist: mypy>=1.0.0; extra == 'dev'
42
+ Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
43
+ Requires-Dist: pytest>=7.0.0; extra == 'dev'
44
+ Requires-Dist: ruff>=0.1.0; extra == 'dev'
45
+ Provides-Extra: embed
46
+ Requires-Dist: modelscope>=1.36.0; extra == 'embed'
47
+ Requires-Dist: numpy>=1.24.0; extra == 'embed'
48
+ Requires-Dist: sentence-transformers>=2.2.0; extra == 'embed'
49
+ Description-Content-Type: text/markdown
50
+
51
+ # SIF
52
+
53
+ [![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
54
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
55
+ [![Code style: ruff](https://img.shields.io/badge/code%20style-ruff-000000.svg)](https://github.com/astral-sh/ruff)
56
+
57
+ SIF is a local CLI search engine for indexing and searching markdown documents. It provides powerful full-text and semantic search capabilities while keeping all data on your machine.
58
+
59
+ ## Features
60
+
61
+ - **Full-Text Search**: BM25 ranking via SQLite FTS5
62
+ - **Semantic Search**: Vector similarity using configurable embeddings
63
+ - **Hybrid Search**: Combines BM25 and vector search with RRF fusion
64
+ - **Query Expansion**: Automatic query enhancement via pseudo-relevance feedback
65
+ - **Result Reranking**: Cross-encoder reranking with Qwen3-Reranker
66
+ - **MCP Server**: Model Context Protocol support for AI assistants (stdio + HTTP)
67
+ - **Local-First**: All data stays on your machine
68
+ - **Multiple Backends**: sentence-transformers, llama-cpp-python, OpenAI-compatible API, ModelScope
69
+
70
+ ## Quick Start
71
+
72
+ ### Installation
73
+
74
+ ```bash
75
+ pip install sif
76
+ ```
77
+
78
+ For full functionality including embeddings:
79
+
80
+ ```bash
81
+ pip install "sif[all]"
82
+ ```
83
+
84
+ ### Basic Usage
85
+
86
+ ```bash
87
+ # Add a collection
88
+ sif collection add ~/Documents/notes --name my-notes
89
+
90
+ # Index your documents
91
+ sif index update --collection my-notes
92
+
93
+ # Search
94
+ sif search query "python decorators"
95
+ ```
96
+
97
+ ## Installation
98
+
99
+ ### From PyPI (Recommended)
100
+
101
+ ```bash
102
+ pip install sif
103
+ ```
104
+
105
+ ### From Source
106
+
107
+ ```bash
108
+ git clone https://github.com/zhangtaolab/sif.git
109
+ cd sif
110
+ pip install -e ".[dev]"
111
+ ```
112
+
113
+ ### Using pipx
114
+
115
+ ```bash
116
+ pipx install sif
117
+ ```
118
+
119
+ ## Usage
120
+
121
+ ### Collection Management
122
+
123
+ ```bash
124
+ # List all collections
125
+ sif collection list
126
+
127
+ # Add a new collection
128
+ sif collection add ~/Work/docs --name work-docs --description "Work documentation"
129
+
130
+ # Show collection details
131
+ sif collection show my-notes
132
+
133
+ # Rename a collection
134
+ sif collection rename my-notes personal-notes
135
+
136
+ # Delete a collection
137
+ sif collection remove old-collection --force
138
+ ```
139
+
140
+ ### Context Management
141
+
142
+ Add descriptive context to improve search relevance:
143
+
144
+ ```bash
145
+ # Add context to a collection
146
+ sif context add collection my-notes "These are my personal notes about programming and technology."
147
+
148
+ # Add global context
149
+ sif context add global global "I am a software engineer interested in Python and machine learning."
150
+
151
+ # List all context
152
+ sif context list
153
+ ```
154
+
155
+ ### Indexing
156
+
157
+ ```bash
158
+ # Update the index
159
+ sif index update --collection my-notes
160
+
161
+ # Force full reindex
162
+ sif index update --collection my-notes --force
163
+
164
+ # Show indexing status
165
+ sif status
166
+ ```
167
+
168
+ ### Search
169
+
170
+ ```bash
171
+ # Basic search
172
+ sif search query "python decorators"
173
+
174
+ # Search in specific collection
175
+ sif search query "python decorators" -c my-notes
176
+
177
+ # BM25 keyword search
178
+ sif search search "python decorators"
179
+
180
+ # Limit results
181
+ sif search query "python decorators" --limit 20
182
+
183
+ # Search with explanation
184
+ sif search query "AI" --explain
185
+ ```
186
+
187
+ ### MCP Server
188
+
189
+ Start the MCP server for integration with AI assistants:
190
+
191
+ ```bash
192
+ # Start with stdio transport (default)
193
+ sif mcp stdio
194
+
195
+ # Start with HTTP transport
196
+ sif mcp http --port 8080
197
+ ```
198
+
199
+ Configure in Claude Desktop:
200
+
201
+ ```json
202
+ {
203
+ "mcpServers": {
204
+ "sif": {
205
+ "command": "sif",
206
+ "args": ["mcp", "stdio"]
207
+ }
208
+ }
209
+ }
210
+ ```
211
+
212
+ ## Configuration
213
+
214
+ SIF can be configured via environment variables or a `.env` file:
215
+
216
+ ```bash
217
+ # Database location
218
+ SIF_DB_PATH=~/.local/share/sif/sif.db
219
+
220
+ # Embedding model
221
+ SIF_MODEL_NAME=Qwen/Qwen3-Embedding-0.6B
222
+ SIF_MODEL_PATH=~/models/embedding.gguf
223
+
224
+ # Chunking settings
225
+ SIF_CHUNK_SIZE=512
226
+ SIF_CHUNK_OVERLAP=128
227
+
228
+ # Logging
229
+ SIF_LOG_LEVEL=INFO
230
+
231
+ # MCP server
232
+ SIF_MCP_HOST=127.0.0.1
233
+ SIF_MCP_PORT=8080
234
+ ```
235
+
236
+ ## Architecture
237
+
238
+ SIF follows a layered architecture with clean separation of concerns:
239
+
240
+ ```
241
+ ┌─────────────────────────────────────────────────────────────┐
242
+ │ Presentation Layer │
243
+ │ ┌──────────────┐ ┌──────────────┐ ┌──────────────────┐ │
244
+ │ │ CLI │ │ MCP Server │ │ API (Future) │ │
245
+ │ └──────────────┘ └──────────────┘ └──────────────────┘ │
246
+ ├─────────────────────────────────────────────────────────────┤
247
+ │ Application Layer │
248
+ │ ┌──────────────┐ ┌──────────────┐ ┌──────────────────┐ │
249
+ │ │ Collection │ │ Index │ │ Search │ │
250
+ │ │ Manager │ │ Service │ │ Service │ │
251
+ │ └──────────────┘ └──────────────┘ └──────────────────┘ │
252
+ ├─────────────────────────────────────────────────────────────┤
253
+ │ Domain Layer │
254
+ │ ┌──────────────┐ ┌──────────────┐ ┌──────────────────┐ │
255
+ │ │ Collection │ │ Document │ │ Context │ │
256
+ │ │ Entity │ │ Entity │ │ Entity │ │
257
+ │ └──────────────┘ └──────────────┘ └──────────────────┘ │
258
+ ├─────────────────────────────────────────────────────────────┤
259
+ │ Infrastructure Layer │
260
+ │ ┌──────────────┐ ┌──────────────┐ ┌──────────────────┐ │
261
+ │ │ Repository │ │ Embedding │ │ Database │ │
262
+ │ │ (SQLite) │ │ Model │ │ Connection │ │
263
+ │ └──────────────┘ └──────────────┘ └──────────────────┘ │
264
+ └─────────────────────────────────────────────────────────────┘
265
+ ```
266
+
267
+ See [docs/architecture.md](docs/architecture.md) for detailed architecture documentation.
268
+
269
+ ## Documentation
270
+
271
+ - [Installation Guide](docs/installation.md) - Detailed installation instructions
272
+ - [Configuration](docs/configuration.md) - Configuration options
273
+ - [Quick Start](docs/quickstart.md) - Get started quickly
274
+ - [CLI Reference](docs/cli-reference.md) - Complete CLI documentation
275
+ - [API Reference](docs/api-reference.md) - Python API documentation
276
+ - [Architecture](docs/architecture.md) - System architecture
277
+ - [MCP Server](docs/mcp-server.md) - MCP server documentation
278
+ - [Search Algorithms](docs/search-algorithms.md) - Search algorithm details
279
+ - [Development Guide](docs/development.md) - Development setup
280
+ - [Contributing](docs/contributing.md) - Contribution guidelines
281
+
282
+ ## Search Algorithms
283
+
284
+ ### BM25 (Full-Text Search)
285
+
286
+ BM25 is a probabilistic ranking function that scores documents based on term frequency and inverse document frequency.
287
+
288
+ **Parameters:**
289
+ - `k1`: Controls term frequency saturation (default: 1.5)
290
+ - `b`: Controls document length normalization (default: 0.75)
291
+
292
+ ### Vector Search
293
+
294
+ Vector search uses embeddings to find semantically similar documents, even if they don't share exact keywords.
295
+
296
+ **Supported Models:**
297
+ - Sentence Transformers
298
+ - GGUF models via llama-cpp-python
299
+ - OpenAI-compatible API
300
+ - ModelScope Hub
301
+
302
+ ### Hybrid Search
303
+
304
+ Hybrid search combines BM25 and vector search using Reciprocal Rank Fusion (RRF):
305
+
306
+ ```
307
+ RRF_score(d) = Σ 1 / (k + rank_i(d))
308
+ ```
309
+
310
+ Where `k` is a constant (default: 60) and `rank_i(d)` is the rank of document `d` in result set `i`.
311
+
312
+ ## Development
313
+
314
+ ### Setup
315
+
316
+ ```bash
317
+ # Clone the repository
318
+ git clone https://github.com/zhangtaolab/sif.git
319
+ cd sif
320
+
321
+ # Create virtual environment
322
+ python -m venv venv
323
+ source venv/bin/activate # On Windows: venv\Scripts\activate
324
+
325
+ # Install in development mode
326
+ pip install -e ".[dev]"
327
+
328
+ # Install pre-commit hooks
329
+ pre-commit install
330
+ ```
331
+
332
+ ### Running Tests
333
+
334
+ ```bash
335
+ # Run all tests
336
+ pytest
337
+
338
+ # Run with coverage
339
+ pytest --cov=sif
340
+
341
+ # Run specific test category
342
+ pytest -m unit
343
+ pytest -m integration
344
+ ```
345
+
346
+ ### Code Quality
347
+
348
+ ```bash
349
+ # Format code
350
+ ruff format .
351
+
352
+ # Lint code
353
+ ruff check .
354
+
355
+ # Type checking
356
+ mypy src/sif
357
+ ```
358
+
359
+ ## Roadmap
360
+
361
+ - [ ] Web UI (browser-based search interface)
362
+ - [ ] Plugin system for custom parsers
363
+ - [ ] Multi-language support
364
+ - [ ] REST API
365
+ - [ ] Query suggestions
366
+ - [ ] File system watching for auto-indexing
367
+
368
+ ## Contributing
369
+
370
+ Contributions are welcome! Please see [CONTRIBUTING.md](docs/contributing.md) for guidelines.
371
+
372
+ 1. Fork the repository
373
+ 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
374
+ 3. Commit your changes (`git commit -m 'feat: add amazing feature'`)
375
+ 4. Push to the branch (`git push origin feature/amazing-feature`)
376
+ 5. Open a Pull Request
377
+
378
+ ## License
379
+
380
+ MIT License - see [LICENSE](LICENSE) for details.
381
+
382
+ ## Acknowledgments
383
+
384
+ SIF is a Python reimplementation of the original TypeScript QMD (Query Markup Documents) project.
385
+
386
+ ## Support
387
+
388
+ - GitHub Issues: [github.com/zhangtaolab/sif/issues](https://github.com/zhangtaolab/sif/issues)
389
+ - GitHub Discussions: [github.com/zhangtaolab/sif/discussions](https://github.com/zhangtaolab/sif/discussions)
390
+
391
+ ---
392
+
393
+ **Happy searching!**
@@ -0,0 +1,86 @@
1
+ sif/__init__.py,sha256=3rwQNU8LU9ugfzBbHWxkpyidc43o9KJ3bURfCmoV2yM,458
2
+ sif/_version.py,sha256=AwdNLGUs8VqGOE5kuEfDJ2Nv24hVqlNW8j8BPe1RGm0,58
3
+ sif/cli/__init__.py,sha256=jmTQN8bmizcadtrTNDDRfv3335zg__GoHL1bZpaZjKc,292
4
+ sif/cli/config.py,sha256=l57AtMhKR5uBWLueY1FVfazds6MmvPWPyb3-J6My-1s,6088
5
+ sif/cli/formatters.py,sha256=NDVujCEk6VxQWGYK7awRxWOHEt9IImyaZVYAlTSD_pE,8378
6
+ sif/cli/main.py,sha256=JBB4S4dkO-_QLzMpP4eFlvM7calqORGTSqlZD6gKp6I,6586
7
+ sif/cli/commands/__init__.py,sha256=tlRnN4-QqqnjsYJ6BuuKYY9t1vYV10uHbiOYj21xqrY,453
8
+ sif/cli/commands/bench.py,sha256=mcFg5YhNEkZ9wubUMQhcCyg8Ry8mypyM4PNJhcRdpMM,4792
9
+ sif/cli/commands/collection.py,sha256=ZcOr9cEoukiHDYBO8UoZqjdYJl6MQzQlIt7Tdf8BErU,11918
10
+ sif/cli/commands/context.py,sha256=kCLAdwhL0c8sJE1blHYy_ILUvvRPwRS4pr3vagwCyAA,4700
11
+ sif/cli/commands/get.py,sha256=jb4qRSSO8Tx81099yTOO3SlU5EEmrTGOZk_LUXzfb7g,6416
12
+ sif/cli/commands/index.py,sha256=OmoMo51uqxGmK6tJocjub7LCVjln_Y1HbmZX41_Ppuk,10713
13
+ sif/cli/commands/ls.py,sha256=nUyIuVEtFf2WDmRngpyo0eYCBfWJNTYMxi-WbMTxqaQ,1999
14
+ sif/cli/commands/mcp.py,sha256=RdnVOs24m_Cj2-bm4OFqjDQCJWrs15uzRnsaxOatEzI,2877
15
+ sif/cli/commands/pull.py,sha256=qBj6QneCdhwnNkA_oyz1nYs_Dy48gQ_W6DwKES5iTz8,3535
16
+ sif/cli/commands/search.py,sha256=bZxDKjhjv8acjH_gXCE7s4PNp9CDsualOQPrRiBb6Vw,20384
17
+ sif/config/__init__.py,sha256=ejY5TIo8tIqYy65dPm-qEW93QZ2bD1GKpnwH93uPVPA,636
18
+ sif/config/constants.py,sha256=538lqVBBvtICDhBK8E-5wgN1yuFF1uwuri_e_crDgzg,1109
19
+ sif/config/settings.py,sha256=4a4MryZpMSIL-ofrmypVxk2lMNyfRjpAgW3JoE4WLu4,6447
20
+ sif/core/__init__.py,sha256=E7rs-b3IZFKFC25NHhyVXqZbQGtgxn5Itqr-I6YuoBU,554
21
+ sif/core/collection.py,sha256=8dD0sO2aV73o-TDWsD5v2JwojTazNXZ0uTrMt9vqWiU,5295
22
+ sif/core/context.py,sha256=biKENZWtDQbEg0htTmCcZrdXrvfSNIr49SYMxoMLPtc,5344
23
+ sif/core/document.py,sha256=FuLRNlaZSxr-NgSQDmEkRiAWNnLq3TMgzwXZ-iQarF0,3701
24
+ sif/core/models.py,sha256=Ky79yfT4vsMl7i87zZ3FXQTluu1Nh3gZ1nBt-RvTZGc,9165
25
+ sif/database/__init__.py,sha256=Gah38xubmK9NzRgEf8qnygebqT3YK70zQ7pmIdKmPrc,562
26
+ sif/database/connection.py,sha256=TLsyAQfmRc6m4VhVnKWYAGH9uEoQEKbp9Ai6m7GZQuU,4203
27
+ sif/database/database.py,sha256=tidDRFXVBe2SPucmOA3mQgt2dJUGFX-nkQuYw0yEO_s,4325
28
+ sif/database/migrations.py,sha256=r5_ZDs6PIHqKeIm9uT5OdCk2sRG65Jl8J8N86adXydM,5473
29
+ sif/database/repositories.py,sha256=swcrUHcn6oJCb4Ly68SpdaSZgtUfPsVIZEZq43R-SFw,18289
30
+ sif/database/repository.py,sha256=PqhJGwTCxJSUtE6Vn2nM9YHO0j3LKfn2B7iFUz8PtDA,4429
31
+ sif/database/schema.py,sha256=bHk_UOmWlHHsJ6WgDn_t6LZ1ZLMBpHUd3g7cuBHl6t4,13072
32
+ sif/embedding/__init__.py,sha256=gPV79-fY4QmcYahJyNXpSbqF1QiSF6X2EbOC21739F0,607
33
+ sif/embedding/cache.py,sha256=VTV_vKlxr0LH3oLMV4svEiA2gsSmV1lRucCwiI0bB5A,5905
34
+ sif/embedding/embedder.py,sha256=-n8mqsHV_qY7rvRppk0bmuZe6WD0YjWwy2jVXG59Zdo,9776
35
+ sif/embedding/factory.py,sha256=kJYZcI5VUbkheNnQKDz-9Ljd2Pb63u8pJ8iwng0DO74,2998
36
+ sif/embedding/manager.py,sha256=pjQjDBf3Fb4jNGdF0Ybb6lk459aZEkXpfsEtHGJZIK0,6563
37
+ sif/embedding/model.py,sha256=YmBpk_09drLC8RjowtpPlE_rXNVqD2GXNo6M0I9qnJ8,3100
38
+ sif/indexing/__init__.py,sha256=9jhOnffd1oKgNSKPswNDltJsywJaORC5kyT3ygy3ASE,501
39
+ sif/indexing/chunker.py,sha256=wWukciTsfLMlMzVeR-2xITwovXWtsSlYSoscI10Mgu0,7013
40
+ sif/indexing/indexer.py,sha256=BH4Ng_TAifP-1a4sjvmAC3gLNjZv9z3Rh30oX6PD7a8,6928
41
+ sif/indexing/parser.py,sha256=OCSH-gaJhngO2OTPX0qS66PGVIfD2oorAq3jeeuJA7E,4898
42
+ sif/indexing/scanner.py,sha256=CMTICLCxcs1t9DO39cUddbj1vWNmnCCchZmZc1tRKyU,3915
43
+ sif/indexing/watcher.py,sha256=NZ1F22gRFIqzcU47lw960GvYL102FhoPQtNYrepPKXM,4593
44
+ sif/mcp/README.md,sha256=J9ZWfZKWim2EkJO36WwdLJrG1DiklU4UfzKfL85Dh7M,4510
45
+ sif/mcp/__init__.py,sha256=aXs9Hemf7zijNn4Iqzntc7AGUhigih0zHNAgW1nFhTo,160
46
+ sif/mcp/claude_desktop_config.json,sha256=RndD8tRC5gh4uNRfPdjofxqXs3EgKImRjp--Rwv2Utc,307
47
+ sif/mcp/cli.py,sha256=mEpmVAIYvfYLcIBzCVht-noWdlLpMbtV1XxAII7HZ9k,2384
48
+ sif/mcp/protocol.py,sha256=EZeb7_P8vuZfPmgm--mftF6NPRJvuJkEwwIwVX5xuxQ,8444
49
+ sif/mcp/server.py,sha256=LuyqaMwqUjYdi7gZwSlDncmexhNi10YM2mwk1HWDkfE,15999
50
+ sif/mcp/server_http.py,sha256=op_Xc_9LT0lKYewoHyJnjNwY7D_JL0deyqOrlisrBIg,1570
51
+ sif/mcp/test_mcp.py,sha256=TLWyMhnbYocraSRn7WAkQNWbdjFQNKAPqEfstCqvjLo,3060
52
+ sif/mcp/tools.py,sha256=7p8TmsWH4Z5zXPrlZzGmueVg7VQJHpd2azqsPLBmZI4,18180
53
+ sif/mcp/transport_http.py,sha256=eU4j1OTxmxclYQKFxedhDeliS9ccKTHFgEHqREmdB4c,14243
54
+ sif/mcp/transport_stdio.py,sha256=4xWpA3lhRum1t-IJ52ySINhBJ-oDS1Vrm8k8AC9VCnI,9034
55
+ sif/mcp_server/__init__.py,sha256=PRzpILwrCbhMh50kPYTblN64332NFmJ5zHreeSr6pG4,702
56
+ sif/mcp_server/handlers.py,sha256=KMJDUAtt0ouL1riM1enet6wTJ3dADcdOZFcefs4lUKU,1292
57
+ sif/mcp_server/server.py,sha256=xzNFt6tIWE-jyT16nHcImXxRRo2KWvKXQ7efUKhEsl8,1588
58
+ sif/mcp_server/tools.py,sha256=vwO9gw-KgRZ7P79O_H7-y9lYWyCwClBoKI339GfJqsc,6192
59
+ sif/mcp_server/transport.py,sha256=orH73Oh-hlOCzcnknk68yfcjhTLfQuO6FxPooe3aAKw,6252
60
+ sif/models/__init__.py,sha256=isLsDbFLFBw42NjgBi6uf32Je5qpnBW0s_GJNhVipLU,1467
61
+ sif/models/collection.py,sha256=0iz6he8XhGn3glFQKXTWSReUVzPnCRMr2UjPmQvWyOM,1822
62
+ sif/models/context.py,sha256=7Qv3OKQqNXNZNksCq-zRku9X9SJ19CotkfLsDRxGC5g,1157
63
+ sif/models/document.py,sha256=ChP8rczoEZsgdN-_fVoKs7FaaH6_Dp5me2LNh28lcL8,2376
64
+ sif/models/download.py,sha256=LZ5JIWN_TjGxo_cisX9TNXaEK8F42vze8oUqTeCYrqQ,6109
65
+ sif/models/embedding.py,sha256=8xM9SVgg-HeWVx5JtTWB1kaHb3uI-9K9TuN9w31fUP0,2389
66
+ sif/models/search.py,sha256=T0oGX3OF6ITN54ztcBrLUQ8ddq5oUVWnS-K_RRNK2M4,3127
67
+ sif/search/__init__.py,sha256=lziaoLJboDgIc1VIrnftZqdfKDhqjqrZTYahb9c7ar4,569
68
+ sif/search/benchmark.py,sha256=D-FKTBHA4NBUmmXHchkGgQejzCYWtdK_OHG745aBPxE,3738
69
+ sif/search/bm25.py,sha256=mKr4-zKagc247uqEBnLRoq8F-74-DrOiq9-cjLRlXvM,7254
70
+ sif/search/expansion.py,sha256=zHwnAYhZYXQVXUX_ffRl0uxDmo5qIexqh1JDbGO9UTU,5080
71
+ sif/search/hybrid.py,sha256=H65Y4J5KQ3lhvTYjKS_ueApVpP0crE_TDV5z8aztFek,12715
72
+ sif/search/rerank.py,sha256=4tl_6Yqb9_1hekvP4cuwRl4mSwxIPbkqHeKRTMuK3Zs,14153
73
+ sif/search/rrf.py,sha256=xnObwa4THmelDnuStvpYKl6LG91liwKpqH30MlehCWM,6957
74
+ sif/search/snippets.py,sha256=jDR94jcY0F8NtC96USDg_hi7QGI6-xP3aSlOWLnQXmU,4361
75
+ sif/search/strategy.py,sha256=rRWDMaGnQDYHJVlYk1W9GqtBMX1f6eYsxREXGaQtU4M,2362
76
+ sif/search/vector.py,sha256=TWnjoSQR32urBSj6-qXJMrOpHIx9sO2ZgfnS4pjm6L8,6026
77
+ sif/utils/__init__.py,sha256=WPDg_KFwj_epO9fRHT_pMJDREZ7TVIqt8kVIdLtOtSg,641
78
+ sif/utils/logging.py,sha256=0ZHldcUO8SQYwr5JFtLzLsW3pfAj5slNjMLHkRZZlCQ,3699
79
+ sif/utils/paths.py,sha256=FZLSf413YtQXmOFaMGDyiDf7pLHtKjqj8ezz5HSkJLY,1776
80
+ sif/utils/progress.py,sha256=ofJ9umXjNbvh0xhZFBXOx7GqEwoHz2TOsEV6EAK8wjE,2331
81
+ sif/utils/text.py,sha256=xbN3T7wOZXjrA0sWpE7bFkA4c3JRMzVltKmzgRqRlLY,3008
82
+ docsif-0.1.0.dist-info/METADATA,sha256=HjW1NH4ybbSeDiuEh9BZd-fE6EmiLFem4aie8KZ63a0,12183
83
+ docsif-0.1.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
84
+ docsif-0.1.0.dist-info/entry_points.txt,sha256=w6eTR5yfU2Dhp-KwvDY7q9B1pai8-6blTb81gmm01jc,69
85
+ docsif-0.1.0.dist-info/licenses/LICENSE,sha256=ukn5eo02db-OjdUKS5Go3Ha8V7AAkeRLag83rpcJB2w,1077
86
+ docsif-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.29.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ docsif = sif.cli.main:main
3
+ sif = sif.cli.main:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 DocSift 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.
sif/__init__.py ADDED
@@ -0,0 +1,24 @@
1
+ """SIF - Search / Index / Find - Local document search engine."""
2
+
3
+ __version__ = "0.1.0"
4
+ __author__ = "SIF Team"
5
+ __description__ = "Local document search engine (SIF: Search / Index / Find)"
6
+
7
+ from sif.core.models import (
8
+ Collection,
9
+ Document,
10
+ DocumentChunk,
11
+ PathContext,
12
+ SearchOptions,
13
+ SearchResult,
14
+ )
15
+
16
+
17
+ __all__ = [
18
+ "Collection",
19
+ "Document",
20
+ "DocumentChunk",
21
+ "PathContext",
22
+ "SearchOptions",
23
+ "SearchResult",
24
+ ]
sif/_version.py ADDED
@@ -0,0 +1,3 @@
1
+ """Version information for SIF."""
2
+
3
+ __version__ = "0.1.0"
sif/cli/__init__.py ADDED
@@ -0,0 +1,11 @@
1
+ """
2
+ SIF CLI - Document indexing and search tool.
3
+
4
+ A powerful CLI tool for managing document collections, indexing content,
5
+ and performing intelligent searches using both keyword and vector-based approaches.
6
+ """
7
+
8
+ __version__ = "0.1.0"
9
+ __author__ = "SIF Team"
10
+
11
+ __all__ = ["__version__", "cli"]
@@ -0,0 +1,18 @@
1
+ """CLI commands package."""
2
+
3
+ from sif.cli.commands.collection import collection_group
4
+ from sif.cli.commands.context import context_group
5
+ from sif.cli.commands.get import get_group
6
+ from sif.cli.commands.index import index_group
7
+ from sif.cli.commands.mcp import mcp_group
8
+ from sif.cli.commands.search import search_group
9
+
10
+
11
+ __all__ = [
12
+ "collection_group",
13
+ "context_group",
14
+ "get_group",
15
+ "index_group",
16
+ "mcp_group",
17
+ "search_group",
18
+ ]