cairntir 1.0.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.
cairntir/__init__.py ADDED
@@ -0,0 +1,86 @@
1
+ """Cairntir — memory-first reasoning layer for Claude Code.
2
+
3
+ Cairntir stores verbatim drawers of memory in a wing/room taxonomy
4
+ backed by sqlite-vec, exposes a 4-layer retrieval model, and provides
5
+ three skills (crucible, quality, reason) over MCP. Its mission is to
6
+ kill cross-chat AI amnesia.
7
+
8
+ ## The v1.0 contract
9
+
10
+ At v1.0 this package's ``__init__`` exposes **only** the stable seam:
11
+
12
+ * **Protocols** — :class:`Store`, :class:`EmbeddingProvider`, and the
13
+ four reason-loop ports (:class:`HypothesisProposer`,
14
+ :class:`ExperimentRunner`, :class:`BeliefStore`,
15
+ :class:`MemoryGateway`).
16
+ * **Frozen value types** — :class:`Drawer`, :class:`Layer`,
17
+ :class:`Hypothesis`, :class:`Experiment`, :class:`Outcome`,
18
+ :class:`BeliefUpdate`.
19
+ * **Typed exceptions** — everything defined in
20
+ :mod:`cairntir.errors`, plus :class:`CairntirDeprecationWarning`.
21
+ * ``__version__``.
22
+
23
+ Concrete implementations — ``DrawerStore``, ``HashEmbeddingProvider``,
24
+ ``SentenceTransformerProvider``, ``Retriever``, ``ReasonLoop`` — live
25
+ under :mod:`cairntir.impl` and reserve the right to change. The public
26
+ surface here is the thing you depend on if you want your code to
27
+ survive Cairntir's internal refactors.
28
+
29
+ See ``docs/manifesto.md`` for the why and ``docs/concept.md`` for the
30
+ what.
31
+ """
32
+
33
+ from __future__ import annotations
34
+
35
+ from cairntir.contracts import Store
36
+ from cairntir.errors import (
37
+ CairntirDeprecationWarning,
38
+ CairntirError,
39
+ ConfigError,
40
+ EmbeddingError,
41
+ ExternalUrlError,
42
+ MCPError,
43
+ MemoryStoreError,
44
+ PortableFormatError,
45
+ RetrievalError,
46
+ SkillError,
47
+ TaxonomyError,
48
+ )
49
+ from cairntir.memory.embeddings import EmbeddingProvider
50
+ from cairntir.memory.taxonomy import Drawer, Layer
51
+ from cairntir.reason.model import BeliefUpdate, Experiment, Hypothesis, Outcome
52
+ from cairntir.reason.ports import (
53
+ BeliefStore,
54
+ ExperimentRunner,
55
+ HypothesisProposer,
56
+ MemoryGateway,
57
+ )
58
+
59
+ __version__ = "1.0.0"
60
+
61
+ __all__ = [
62
+ "BeliefStore",
63
+ "BeliefUpdate",
64
+ "CairntirDeprecationWarning",
65
+ "CairntirError",
66
+ "ConfigError",
67
+ "Drawer",
68
+ "EmbeddingError",
69
+ "EmbeddingProvider",
70
+ "Experiment",
71
+ "ExperimentRunner",
72
+ "ExternalUrlError",
73
+ "Hypothesis",
74
+ "HypothesisProposer",
75
+ "Layer",
76
+ "MCPError",
77
+ "MemoryGateway",
78
+ "MemoryStoreError",
79
+ "Outcome",
80
+ "PortableFormatError",
81
+ "RetrievalError",
82
+ "SkillError",
83
+ "Store",
84
+ "TaxonomyError",
85
+ "__version__",
86
+ ]
cairntir/__main__.py ADDED
@@ -0,0 +1,8 @@
1
+ """Enable ``python -m cairntir`` invocation."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from cairntir.cli import main
6
+
7
+ if __name__ == "__main__":
8
+ main()