sqac 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.
sqac/__init__.py ADDED
@@ -0,0 +1,99 @@
1
+ """SQAC — hot-swappable VSA memory cartridges.
2
+
3
+ Public API:
4
+ SqacStore — hybrid exact + fuzzy memory store
5
+ ContextOffloader — ephemeral turn bucket (observe/save/recall)
6
+ CartridgeRack — named cartridges + kind-based routing
7
+ BSCEncoder — zero-dependency binary spatter-code encoder
8
+ read/write — .sqac binary format v1
9
+ extract_project_units / build_store / track_once / track
10
+ — project auto-build and realtime tracking
11
+ """
12
+
13
+ from .autobuild import (
14
+ build_store,
15
+ extract_project_units,
16
+ track,
17
+ track_once,
18
+ _sync_rack,
19
+ )
20
+ from .continuity import ContinuityStore, bootstrap_packet, detect_host, server_instructions
21
+ from .dms import DMS, UtilityWeights
22
+ from .encoder import BSCEncoder
23
+ from .format import CartridgeHeader, read_cartridge, write_cartridge
24
+ from .offloader import ContextOffloader
25
+ from .rack import CartridgeRack, GradedExchange, RackError, graduation_pass
26
+ from .store import (
27
+ KIND_DOC,
28
+ KIND_FACT,
29
+ KIND_GENERIC,
30
+ KIND_NAMES,
31
+ KIND_SKILL,
32
+ KIND_TURN,
33
+ Hit,
34
+ SqacStore,
35
+ resolve_kind,
36
+ )
37
+
38
+ __version__ = "0.1.0"
39
+
40
+ _KVCACHE_NAMES = frozenset(
41
+ {
42
+ "KVEstimate",
43
+ "estimate_sparse_recall",
44
+ "estimate_sweep",
45
+ "known_models",
46
+ "kv_bytes_per_token",
47
+ "model_kv_bytes_per_token",
48
+ "table",
49
+ }
50
+ )
51
+
52
+
53
+ def __getattr__(name: str):
54
+ """Lazily import sqac.kvcache names so `python -m sqac.kvcache` stays clean
55
+ (eager import would pre-load the submodule and trigger a benign CPython
56
+ 'found in sys.modules' RuntimeWarning)."""
57
+ if name in _KVCACHE_NAMES:
58
+ from . import kvcache
59
+
60
+ return getattr(kvcache, name)
61
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
62
+
63
+ __all__ = [
64
+ "SqacStore",
65
+ "ContextOffloader",
66
+ "CartridgeRack",
67
+ "BSCEncoder",
68
+ "DMS",
69
+ "UtilityWeights",
70
+ "KVEstimate",
71
+ "estimate_sparse_recall",
72
+ "estimate_sweep",
73
+ "known_models",
74
+ "kv_bytes_per_token",
75
+ "model_kv_bytes_per_token",
76
+ "CartridgeHeader",
77
+ "read_cartridge",
78
+ "write_cartridge",
79
+ "GradedExchange",
80
+ "RackError",
81
+ "graduation_pass",
82
+ "KIND_DOC",
83
+ "KIND_FACT",
84
+ "KIND_SKILL",
85
+ "KIND_TURN",
86
+ "KIND_GENERIC",
87
+ "KIND_NAMES",
88
+ "Hit",
89
+ "resolve_kind",
90
+ "extract_project_units",
91
+ "build_store",
92
+ "track_once",
93
+ "track",
94
+ "_sync_rack",
95
+ "ContinuityStore",
96
+ "bootstrap_packet",
97
+ "detect_host",
98
+ "server_instructions",
99
+ ]
sqac/__main__.py ADDED
@@ -0,0 +1,4 @@
1
+ """Allow ``python -m sqac`` to work."""
2
+ from .cli import main
3
+
4
+ raise SystemExit(main())