@karmaniverous/jeeves-watcher 0.16.3 → 0.17.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/README.md +29 -1
- package/dist/cli/jeeves-watcher/index-BAJ-z4d0.js +6249 -0
- package/dist/cli/jeeves-watcher/index.js +67 -6240
- package/dist/index.d.ts +8 -3
- package/dist/index.js +1075 -1015
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -2,17 +2,45 @@
|
|
|
2
2
|
|
|
3
3
|
Filesystem watcher that keeps a [Qdrant](https://qdrant.tech/) vector store in sync with document changes. Extract text from files, chunk it, generate embeddings, and query your documents with semantic search.
|
|
4
4
|
|
|
5
|
+
## Requirements
|
|
6
|
+
|
|
7
|
+
- **Node.js** ≥ 22
|
|
8
|
+
|
|
5
9
|
## Features
|
|
6
10
|
|
|
7
11
|
- **Filesystem watching** — monitors directories for file changes via [chokidar](https://github.com/paulmillr/chokidar)
|
|
8
12
|
- **Multi-format extraction** — PDF, HTML, DOCX, Markdown, plain text, and more
|
|
9
13
|
- **Configurable chunking** — token-based text splitting with overlap control
|
|
10
|
-
- **Embedding providers** — Gemini
|
|
14
|
+
- **Embedding providers** — Gemini (default) or mock (for testing); extensible via provider registry
|
|
11
15
|
- **Qdrant sync** — automatic upsert/delete keeps the vector store current
|
|
12
16
|
- **Rules engine** — glob-based inference rules for metadata enrichment
|
|
13
17
|
- **REST API** — Fastify server for search, status, config, and management
|
|
14
18
|
- **CLI** — `jeeves-watcher init`, `validate`, `start`, and more
|
|
15
19
|
|
|
20
|
+
## JsonMap Built-in Helpers
|
|
21
|
+
|
|
22
|
+
The following helpers are available in every JsonMap `lib` context:
|
|
23
|
+
|
|
24
|
+
| Helper | Description |
|
|
25
|
+
|--------|-------------|
|
|
26
|
+
| `split(str, sep)` | Split a string into an array |
|
|
27
|
+
| `slice(arr, start, end?)` | Slice an array |
|
|
28
|
+
| `join(arr, sep)` | Join an array into a string |
|
|
29
|
+
| `toLowerCase(str)` | Lowercase a string |
|
|
30
|
+
| `replace(str, search, replacement)` | String replacement |
|
|
31
|
+
| `get(obj, path)` | Dot-path property access |
|
|
32
|
+
| `lookupJson(filePath, key, field?)` | Load a JSON file and look up a value by key |
|
|
33
|
+
| `mapLookup(filePath, keys, field)` | Map keys through a JSON lookup, collecting a field from each |
|
|
34
|
+
| `fetchSiblings(filePath, options?)` | Extract text from neighboring files for contextual embedding |
|
|
35
|
+
|
|
36
|
+
### `fetchSiblings`
|
|
37
|
+
|
|
38
|
+
Retrieves extracted text from sibling files in the same directory, useful for contextual embedding (e.g., injecting surrounding email thread messages).
|
|
39
|
+
|
|
40
|
+
**Options:** `{ before?: number (default 3), after?: number (default 1), sort?: "name" | "mtime" (default "name") }`
|
|
41
|
+
|
|
42
|
+
Returns `string[]` of extracted text. Files that fail extraction are silently skipped.
|
|
43
|
+
|
|
16
44
|
## Install
|
|
17
45
|
|
|
18
46
|
```bash
|