scriptoria 0.6.0__tar.gz → 0.6.1__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.
- {scriptoria-0.6.0 → scriptoria-0.6.1}/PKG-INFO +1 -1
- {scriptoria-0.6.0 → scriptoria-0.6.1}/pyproject.toml +1 -1
- {scriptoria-0.6.0 → scriptoria-0.6.1}/src/scrip/__init__.py +1 -1
- {scriptoria-0.6.0 → scriptoria-0.6.1}/src/scrip/blocks.py +9 -11
- {scriptoria-0.6.0 → scriptoria-0.6.1}/uv.lock +1 -1
- {scriptoria-0.6.0 → scriptoria-0.6.1}/.gitignore +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/README.md +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/pyrightconfig.json +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/src/scrip/anchors.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/src/scrip/cli.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/src/scrip/embeddings.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/src/scrip/errors.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/src/scrip/facts.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/src/scrip/frontmatter.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/src/scrip/graph.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/src/scrip/hashing.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/src/scrip/ingest.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/src/scrip/lock.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/src/scrip/manifest.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/src/scrip/pageindex_adapter.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/src/scrip/query.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/src/scrip/retrieval.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/src/scrip/similar.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/tests/conftest.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/tests/test_anchor_cmd.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/tests/test_anchors.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/tests/test_blocks.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/tests/test_embeddings.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/tests/test_fact_cmd.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/tests/test_frontmatter.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/tests/test_graph_status.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/tests/test_hashing.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/tests/test_index_cmd.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/tests/test_ingest.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/tests/test_json_shapes.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/tests/test_lock.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/tests/test_manifest.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/tests/test_new_cmd.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/tests/test_pageindex_cmd.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/tests/test_query.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/tests/test_retrieval.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/tests/test_similar_cmd.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/tests/test_span_cmd.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/tests/test_stamp.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/tests/test_status_cmd.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/tests/test_unlock_cmd.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/tests/test_verify.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/tests/test_version.py +0 -0
- {scriptoria-0.6.0 → scriptoria-0.6.1}/tests/test_watch.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: scriptoria
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.1
|
|
4
4
|
Summary: Deterministic scriptorium-keeper (the `scrip` CLI): staleness, provenance integrity, and fact queries for an agent-compiled knowledge base
|
|
5
5
|
Project-URL: Homepage, https://github.com/coredipper/scriptorium
|
|
6
6
|
Project-URL: Changelog, https://github.com/coredipper/scriptorium/blob/main/CHANGELOG.md
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# Distribution name on PyPI is `scriptoria` (scrip/scriptorium were taken); the
|
|
3
3
|
# CLI command and the import package both remain `scrip`.
|
|
4
4
|
name = "scriptoria"
|
|
5
|
-
version = "0.6.
|
|
5
|
+
version = "0.6.1"
|
|
6
6
|
description = "Deterministic scriptorium-keeper (the `scrip` CLI): staleness, provenance integrity, and fact queries for an agent-compiled knowledge base"
|
|
7
7
|
readme = "README.md"
|
|
8
8
|
requires-python = ">=3.10"
|
|
@@ -13,7 +13,7 @@ from __future__ import annotations
|
|
|
13
13
|
|
|
14
14
|
from pathlib import Path
|
|
15
15
|
|
|
16
|
-
__version__ = "0.6.
|
|
16
|
+
__version__ = "0.6.1"
|
|
17
17
|
|
|
18
18
|
# --- canonical vault layout ------------------------------------------------
|
|
19
19
|
# ``root`` is the repo/instance root: the directory containing ``vault/``.
|
|
@@ -35,17 +35,13 @@ def _is_blank(line: str) -> bool:
|
|
|
35
35
|
|
|
36
36
|
def split_blocks(text: str) -> list[dict]:
|
|
37
37
|
"""Return a list of ``{"block_id", "span": [start, end], "hash"}``."""
|
|
38
|
-
#
|
|
39
|
-
|
|
38
|
+
# ⚡ Bolt: Single pass block segmentation to avoid intermediate O(N) allocation
|
|
39
|
+
ranges: list[list[int]] = [] # [start, end] per block
|
|
40
|
+
cur: list[int] | None = None
|
|
40
41
|
start = 0
|
|
42
|
+
|
|
41
43
|
for line in text.splitlines(keepends=True):
|
|
42
44
|
end = start + len(line)
|
|
43
|
-
spans.append((start, end, line))
|
|
44
|
-
start = end
|
|
45
|
-
|
|
46
|
-
ranges: list[list[int]] = [] # [start, end] per block
|
|
47
|
-
cur: list[int] | None = None
|
|
48
|
-
for s, e, line in spans:
|
|
49
45
|
if _is_blank(line):
|
|
50
46
|
if cur is not None:
|
|
51
47
|
ranges.append(cur)
|
|
@@ -54,12 +50,14 @@ def split_blocks(text: str) -> list[dict]:
|
|
|
54
50
|
if cur is not None:
|
|
55
51
|
ranges.append(cur)
|
|
56
52
|
cur = None
|
|
57
|
-
ranges.append([
|
|
53
|
+
ranges.append([start, end]) # a heading is its own block
|
|
58
54
|
else:
|
|
59
55
|
if cur is None:
|
|
60
|
-
cur = [
|
|
56
|
+
cur = [start, end]
|
|
61
57
|
else:
|
|
62
|
-
cur[1] =
|
|
58
|
+
cur[1] = end
|
|
59
|
+
start = end
|
|
60
|
+
|
|
63
61
|
if cur is not None:
|
|
64
62
|
ranges.append(cur)
|
|
65
63
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|