dirsql-plugin-embeddings 0.1.8__tar.gz → 0.1.10__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 (22) hide show
  1. {dirsql_plugin_embeddings-0.1.8 → dirsql_plugin_embeddings-0.1.10}/PKG-INFO +14 -12
  2. {dirsql_plugin_embeddings-0.1.8 → dirsql_plugin_embeddings-0.1.10}/README.md +12 -11
  3. dirsql_plugin_embeddings-0.1.10/e2e-attestations/fix-754-discovery-ext-resolution.json +7 -0
  4. {dirsql_plugin_embeddings-0.1.8 → dirsql_plugin_embeddings-0.1.10}/pyproject.toml +6 -1
  5. {dirsql_plugin_embeddings-0.1.8 → dirsql_plugin_embeddings-0.1.10}/src/dirsql_plugin_embeddings/dirsql.toml +5 -5
  6. dirsql_plugin_embeddings-0.1.8/e2e-attestations/claude-706-widen-glob.json +0 -7
  7. {dirsql_plugin_embeddings-0.1.8 → dirsql_plugin_embeddings-0.1.10}/.gitignore +0 -0
  8. {dirsql_plugin_embeddings-0.1.8 → dirsql_plugin_embeddings-0.1.10}/src/dirsql_plugin_embeddings/__init__.py +0 -0
  9. {dirsql_plugin_embeddings-0.1.8 → dirsql_plugin_embeddings-0.1.10}/src/dirsql_plugin_embeddings/cache.py +0 -0
  10. {dirsql_plugin_embeddings-0.1.8 → dirsql_plugin_embeddings-0.1.10}/src/dirsql_plugin_embeddings/config.py +0 -0
  11. {dirsql_plugin_embeddings-0.1.8 → dirsql_plugin_embeddings-0.1.10}/src/dirsql_plugin_embeddings/embedder.py +0 -0
  12. {dirsql_plugin_embeddings-0.1.8 → dirsql_plugin_embeddings-0.1.10}/src/dirsql_plugin_embeddings/on_file/__init__.py +0 -0
  13. {dirsql_plugin_embeddings-0.1.8 → dirsql_plugin_embeddings-0.1.10}/src/dirsql_plugin_embeddings/on_file/build_rows.py +0 -0
  14. {dirsql_plugin_embeddings-0.1.8 → dirsql_plugin_embeddings-0.1.10}/src/dirsql_plugin_embeddings/on_file/on_file.py +0 -0
  15. {dirsql_plugin_embeddings-0.1.8 → dirsql_plugin_embeddings-0.1.10}/src/dirsql_plugin_embeddings/on_file/read_content.py +0 -0
  16. {dirsql_plugin_embeddings-0.1.8 → dirsql_plugin_embeddings-0.1.10}/src/dirsql_plugin_embeddings/on_file/read_pdf.py +0 -0
  17. {dirsql_plugin_embeddings-0.1.8 → dirsql_plugin_embeddings-0.1.10}/src/dirsql_plugin_embeddings/on_file/read_text.py +0 -0
  18. {dirsql_plugin_embeddings-0.1.8 → dirsql_plugin_embeddings-0.1.10}/src/dirsql_plugin_embeddings/pre_query.py +0 -0
  19. {dirsql_plugin_embeddings-0.1.8 → dirsql_plugin_embeddings-0.1.10}/testing-conventions.toml +0 -0
  20. {dirsql_plugin_embeddings-0.1.8 → dirsql_plugin_embeddings-0.1.10}/tests/conftest.py +0 -0
  21. {dirsql_plugin_embeddings-0.1.8 → dirsql_plugin_embeddings-0.1.10}/tests/e2e/__init__.py +0 -0
  22. {dirsql_plugin_embeddings-0.1.8 → dirsql_plugin_embeddings-0.1.10}/tests/integration/__init__.py +0 -0
@@ -1,10 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dirsql-plugin-embeddings
3
- Version: 0.1.8
3
+ Version: 0.1.10
4
4
  Summary: First-party dirsql plugin: semantic search via an OpenAI-compatible embeddings endpoint.
5
5
  Requires-Python: >=3.10
6
6
  Requires-Dist: cachetta>=0.6.15
7
7
  Requires-Dist: pypdf>=6
8
+ Requires-Dist: sqlite-vec>=0.1
8
9
  Description-Content-Type: text/markdown
9
10
 
10
11
  # dirsql-plugin-embeddings
@@ -44,17 +45,18 @@ and embedded like any other document. The extension check is case-insensitive
44
45
  (`.PDF` is a PDF), though the glob above is not — globset matches case-sensitively,
45
46
  so an uppercase-suffixed file needs its own `glob` entry to be picked up at all.
46
47
 
47
- The glob is an allowlist rather than `**/*` for a reason worth knowing: a hook
48
- that exits non-zero aborts the entire scan
49
- ([dirsql#697](https://github.com/thekevinscott/dirsql/issues/697)), and reading a
50
- PNG as UTF-8 does exactly that. Matching everything would mean one image anywhere
51
- under the root produces no index at all, so the list stays limited to what the
52
- plugin can actually read.
53
-
54
- A PDF that cannot be parsed aborts the scan rather than being skipped: the hook
55
- exits non-zero and dirsql reports the path and the pypdf reason. A *scanned*,
56
- image-only PDF is not a failure pypdf yields no text, and the file is indexed
57
- with an empty `text`, exactly like an empty `.md`.
48
+ The glob is an allowlist rather than `**/*` on cost, not correctness. Every
49
+ matched file costs a hook subprocess, and every file the plugin can decode costs
50
+ a billed embedding call — so pointing `**/*` at a tree containing `node_modules`
51
+ or `.git` makes for a slow and expensive scan. The list is what is worth
52
+ embedding; widening it trades money for recall.
53
+
54
+ A file the plugin cannot read is skipped, not fatal. The hook exits non-zero,
55
+ dirsql names the file on stderr and carries on indexing the rest, and the run
56
+ exits `23` "completed, some files skipped". From the SDK the same information
57
+ is on `scan_failures()` / `scanFailures()`. A *scanned*, image-only PDF is not a
58
+ failure at all: pypdf yields no text, and the file is indexed with an empty
59
+ `text`, exactly like an empty `.md`.
58
60
 
59
61
  ## Configuration
60
62
 
@@ -35,17 +35,18 @@ and embedded like any other document. The extension check is case-insensitive
35
35
  (`.PDF` is a PDF), though the glob above is not — globset matches case-sensitively,
36
36
  so an uppercase-suffixed file needs its own `glob` entry to be picked up at all.
37
37
 
38
- The glob is an allowlist rather than `**/*` for a reason worth knowing: a hook
39
- that exits non-zero aborts the entire scan
40
- ([dirsql#697](https://github.com/thekevinscott/dirsql/issues/697)), and reading a
41
- PNG as UTF-8 does exactly that. Matching everything would mean one image anywhere
42
- under the root produces no index at all, so the list stays limited to what the
43
- plugin can actually read.
44
-
45
- A PDF that cannot be parsed aborts the scan rather than being skipped: the hook
46
- exits non-zero and dirsql reports the path and the pypdf reason. A *scanned*,
47
- image-only PDF is not a failure pypdf yields no text, and the file is indexed
48
- with an empty `text`, exactly like an empty `.md`.
38
+ The glob is an allowlist rather than `**/*` on cost, not correctness. Every
39
+ matched file costs a hook subprocess, and every file the plugin can decode costs
40
+ a billed embedding call — so pointing `**/*` at a tree containing `node_modules`
41
+ or `.git` makes for a slow and expensive scan. The list is what is worth
42
+ embedding; widening it trades money for recall.
43
+
44
+ A file the plugin cannot read is skipped, not fatal. The hook exits non-zero,
45
+ dirsql names the file on stderr and carries on indexing the rest, and the run
46
+ exits `23` "completed, some files skipped". From the SDK the same information
47
+ is on `scan_failures()` / `scanFailures()`. A *scanned*, image-only PDF is not a
48
+ failure at all: pypdf yields no text, and the file is indexed with an empty
49
+ `text`, exactly like an empty `.md`.
49
50
 
50
51
  ## Configuration
51
52
 
@@ -0,0 +1,7 @@
1
+ {
2
+ "command": "uv run --with-editable . --with-editable ../../packages/python python -m pytest tests/e2e -q",
3
+ "ran_at": 1785779437,
4
+ "exit_code": 0,
5
+ "commit": "0aa15ed8c10f6a0f9937f3121ffa8074eac9e7bb",
6
+ "branch": "fix/754-discovery-ext-resolution"
7
+ }
@@ -18,7 +18,12 @@ requires-python = ">=3.10"
18
18
  # cachetta >=0.6.15 is load-bearing, not a nicety: every earlier release
19
19
  # declares `requires-python >=3.12`, which would drag this package's floor up
20
20
  # with it. 0.6.15 lowered cachetta's own floor to `>=3.10`, matching ours.
21
- dependencies = ["pypdf>=6", "cachetta>=0.6.15"]
21
+ # sqlite-vec is a runtime dependency, not a docs suggestion: the shipped
22
+ # dirsql.toml fragment declares `path = "sqlite_vec"`, which the launcher can
23
+ # only resolve when the package is installed. Declaring it here makes the
24
+ # quickstart (`uvx --with dirsql-plugin-embeddings dirsql`) work without a
25
+ # separate `--with sqlite-vec`.
26
+ dependencies = ["pypdf>=6", "cachetta>=0.6.15", "sqlite-vec>=0.1"]
22
27
 
23
28
  [tool.hatch.version]
24
29
  source = "vcs"
@@ -16,11 +16,11 @@ entrypoint = "sqlite3_vec_init"
16
16
  # rewrites those to `*`, but only when the braces hold a bare identifier, so a
17
17
  # comma-separated list reaches globset intact.
18
18
  #
19
- # An allowlist rather than `**/*`, and not for tidiness: a hook that fails takes
20
- # the whole scan down (dirsql#697), and reading a PNG as UTF-8 fails. Matching
21
- # everything would mean one image anywhere under the root yields no index at
22
- # all. The list is therefore what `read_content` can actually read -- prose, not
23
- # source -- and widening it is safe only as far as that stays true.
19
+ # An allowlist rather than `**/*` because every matched file costs a hook
20
+ # subprocess and, for anything `read_content` can decode, a billed embedding
21
+ # call. Pointed at a tree holding `node_modules` or `.git`, `**/*` is a slow
22
+ # and expensive scan, not a broken one -- unreadable files are skipped. So the
23
+ # list is what is worth embedding, and widening it trades money for recall.
24
24
  [[table]]
25
25
  ddl = "CREATE TABLE documents (path TEXT, text TEXT, embedding TEXT)"
26
26
  glob = "**/*.{md,markdown,mdx,rst,txt,pdf}"
@@ -1,7 +0,0 @@
1
- {
2
- "command": "uv run --with sqlite-vec --with-editable . --with-editable ../../packages/python python -m pytest tests/e2e -x -q",
3
- "ran_at": 1785339217,
4
- "exit_code": 0,
5
- "commit": "f96d82085395d4e38bd74992a6ae3c7b029d5f60",
6
- "branch": "claude/706-widen-glob"
7
- }