@itkoren/sqmd 0.1.0
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.
- package/CHANGELOG.md +46 -0
- package/LICENSE +21 -0
- package/README.md +1052 -0
- package/dist/api/app.d.ts +14 -0
- package/dist/api/app.d.ts.map +1 -0
- package/dist/api/app.js +32 -0
- package/dist/api/app.js.map +1 -0
- package/dist/api/middleware.d.ts +5 -0
- package/dist/api/middleware.d.ts.map +1 -0
- package/dist/api/middleware.js +37 -0
- package/dist/api/middleware.js.map +1 -0
- package/dist/api/models.d.ts +178 -0
- package/dist/api/models.d.ts.map +1 -0
- package/dist/api/models.js +39 -0
- package/dist/api/models.js.map +1 -0
- package/dist/api/routes/documents.d.ts +4 -0
- package/dist/api/routes/documents.d.ts.map +1 -0
- package/dist/api/routes/documents.js +92 -0
- package/dist/api/routes/documents.js.map +1 -0
- package/dist/api/routes/health.d.ts +6 -0
- package/dist/api/routes/health.d.ts.map +1 -0
- package/dist/api/routes/health.js +38 -0
- package/dist/api/routes/health.js.map +1 -0
- package/dist/api/routes/index.d.ts +5 -0
- package/dist/api/routes/index.d.ts.map +1 -0
- package/dist/api/routes/index.js +83 -0
- package/dist/api/routes/index.js.map +1 -0
- package/dist/api/routes/search.d.ts +6 -0
- package/dist/api/routes/search.d.ts.map +1 -0
- package/dist/api/routes/search.js +104 -0
- package/dist/api/routes/search.js.map +1 -0
- package/dist/config/loader.d.ts +4 -0
- package/dist/config/loader.d.ts.map +1 -0
- package/dist/config/loader.js +144 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/schema.d.ts +298 -0
- package/dist/config/schema.d.ts.map +1 -0
- package/dist/config/schema.js +50 -0
- package/dist/config/schema.js.map +1 -0
- package/dist/embeddings/ollama.d.ts +14 -0
- package/dist/embeddings/ollama.d.ts.map +1 -0
- package/dist/embeddings/ollama.js +46 -0
- package/dist/embeddings/ollama.js.map +1 -0
- package/dist/embeddings/transformers.d.ts +14 -0
- package/dist/embeddings/transformers.d.ts.map +1 -0
- package/dist/embeddings/transformers.js +64 -0
- package/dist/embeddings/transformers.js.map +1 -0
- package/dist/embeddings/types.d.ts +6 -0
- package/dist/embeddings/types.d.ts.map +1 -0
- package/dist/embeddings/types.js +2 -0
- package/dist/embeddings/types.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +233 -0
- package/dist/index.js.map +1 -0
- package/dist/ingestion/chunker.d.ts +21 -0
- package/dist/ingestion/chunker.d.ts.map +1 -0
- package/dist/ingestion/chunker.js +117 -0
- package/dist/ingestion/chunker.js.map +1 -0
- package/dist/ingestion/fingerprint.d.ts +6 -0
- package/dist/ingestion/fingerprint.d.ts.map +1 -0
- package/dist/ingestion/fingerprint.js +17 -0
- package/dist/ingestion/fingerprint.js.map +1 -0
- package/dist/ingestion/parser.d.ts +16 -0
- package/dist/ingestion/parser.d.ts.map +1 -0
- package/dist/ingestion/parser.js +98 -0
- package/dist/ingestion/parser.js.map +1 -0
- package/dist/ingestion/pipeline.d.ts +32 -0
- package/dist/ingestion/pipeline.d.ts.map +1 -0
- package/dist/ingestion/pipeline.js +191 -0
- package/dist/ingestion/pipeline.js.map +1 -0
- package/dist/ingestion/scanner.d.ts +2 -0
- package/dist/ingestion/scanner.d.ts.map +1 -0
- package/dist/ingestion/scanner.js +54 -0
- package/dist/ingestion/scanner.js.map +1 -0
- package/dist/mcp/server.d.ts +8 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +73 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tools.d.ts +6 -0
- package/dist/mcp/tools.d.ts.map +1 -0
- package/dist/mcp/tools.js +276 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/rag/context-builder.d.ts +3 -0
- package/dist/rag/context-builder.d.ts.map +1 -0
- package/dist/rag/context-builder.js +27 -0
- package/dist/rag/context-builder.js.map +1 -0
- package/dist/rag/prompt-templates.d.ts +5 -0
- package/dist/rag/prompt-templates.d.ts.map +1 -0
- package/dist/rag/prompt-templates.js +41 -0
- package/dist/rag/prompt-templates.js.map +1 -0
- package/dist/search/hybrid.d.ts +14 -0
- package/dist/search/hybrid.d.ts.map +1 -0
- package/dist/search/hybrid.js +58 -0
- package/dist/search/hybrid.js.map +1 -0
- package/dist/search/query.d.ts +4 -0
- package/dist/search/query.d.ts.map +1 -0
- package/dist/search/query.js +23 -0
- package/dist/search/query.js.map +1 -0
- package/dist/search/reranker.d.ts +11 -0
- package/dist/search/reranker.d.ts.map +1 -0
- package/dist/search/reranker.js +44 -0
- package/dist/search/reranker.js.map +1 -0
- package/dist/store/db.d.ts +11 -0
- package/dist/store/db.d.ts.map +1 -0
- package/dist/store/db.js +75 -0
- package/dist/store/db.js.map +1 -0
- package/dist/store/reader.d.ts +8 -0
- package/dist/store/reader.d.ts.map +1 -0
- package/dist/store/reader.js +122 -0
- package/dist/store/reader.js.map +1 -0
- package/dist/store/schema.d.ts +39 -0
- package/dist/store/schema.d.ts.map +1 -0
- package/dist/store/schema.js +33 -0
- package/dist/store/schema.js.map +1 -0
- package/dist/store/writer.d.ts +6 -0
- package/dist/store/writer.d.ts.map +1 -0
- package/dist/store/writer.js +43 -0
- package/dist/store/writer.js.map +1 -0
- package/dist/watcher/daemon.d.ts +5 -0
- package/dist/watcher/daemon.d.ts.map +1 -0
- package/dist/watcher/daemon.js +43 -0
- package/dist/watcher/daemon.js.map +1 -0
- package/dist/watcher/handler.d.ts +14 -0
- package/dist/watcher/handler.d.ts.map +1 -0
- package/dist/watcher/handler.js +82 -0
- package/dist/watcher/handler.js.map +1 -0
- package/package.json +56 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## [Unreleased]
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
### Deprecated
|
|
19
|
+
|
|
20
|
+
### Removed
|
|
21
|
+
|
|
22
|
+
### Security
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## [0.1.0] - 2026-03-17
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
- Local semantic search engine for Markdown files (`sqmd` CLI)
|
|
30
|
+
- Ingestion pipeline: directory scanner, remark-based Markdown parser, token-aware chunker with configurable overlap
|
|
31
|
+
- Content fingerprinting via SHA-256 (`hashFile`, `hashPath`) for incremental re-indexing
|
|
32
|
+
- LanceDB vector store with Apache Arrow schema (`ChunkRecord`, `FileRecord`)
|
|
33
|
+
- HuggingFace Transformers local embeddings with nomic-embed-text asymmetric prefix support (`search_query:` / `search_document:`)
|
|
34
|
+
- Ollama embedding backend alternative
|
|
35
|
+
- Hybrid search combining vector similarity and BM25 full-text search
|
|
36
|
+
- Cross-encoder reranker (`CrossEncoderReranker`) using `@huggingface/transformers` text-classification pipeline
|
|
37
|
+
- REST API via Hono + `@hono/node-server` (search, documents, index status/trigger, health endpoints)
|
|
38
|
+
- MCP server integration for tool-based access
|
|
39
|
+
- File watcher daemon using chokidar for live re-indexing
|
|
40
|
+
- RAG context builder with token-budget capping and attribution (Source / Section / Lines)
|
|
41
|
+
- RAG prompt templates (`ragSystemPrompt`, `formatResults`, `buildRagPrompt`)
|
|
42
|
+
- YAML configuration with Zod validation and env-var overrides
|
|
43
|
+
- Biome 1.9 for lint + format (`npm run check`)
|
|
44
|
+
- Vitest 2.x test suite with workspace projects (`unit` / `integration`) and v8 coverage (80% thresholds)
|
|
45
|
+
- GitHub Actions CI workflow (push/PR: type-check → lint → test → coverage → build)
|
|
46
|
+
- GitHub Actions release workflow (tag `v*.*.*`: test → build → GitHub Release → npm publish with provenance)
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 George Liu (eva2000)
|
|
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.
|