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 +86 -0
- cairntir/__main__.py +8 -0
- cairntir/cli.py +661 -0
- cairntir/config.py +28 -0
- cairntir/contracts.py +102 -0
- cairntir/daemon/__init__.py +28 -0
- cairntir/daemon/__main__.py +34 -0
- cairntir/daemon/capture.py +99 -0
- cairntir/daemon/spool.py +119 -0
- cairntir/errors.py +66 -0
- cairntir/impl/__init__.py +33 -0
- cairntir/mcp/__init__.py +11 -0
- cairntir/mcp/backend.py +165 -0
- cairntir/mcp/server.py +158 -0
- cairntir/memory/__init__.py +41 -0
- cairntir/memory/belief.py +94 -0
- cairntir/memory/consolidate.py +197 -0
- cairntir/memory/embeddings.py +120 -0
- cairntir/memory/retrieval.py +95 -0
- cairntir/memory/store.py +417 -0
- cairntir/memory/taxonomy.py +108 -0
- cairntir/portable.py +347 -0
- cairntir/py.typed +0 -0
- cairntir/reason/__init__.py +36 -0
- cairntir/reason/loop.py +157 -0
- cairntir/reason/model.py +76 -0
- cairntir/reason/ports.py +94 -0
- cairntir/skills/__init__.py +38 -0
- cairntir/skills/crucible.md +223 -0
- cairntir/skills/quality.md +157 -0
- cairntir/skills/reason.md +168 -0
- cairntir-1.0.0.dist-info/METADATA +352 -0
- cairntir-1.0.0.dist-info/RECORD +36 -0
- cairntir-1.0.0.dist-info/WHEEL +4 -0
- cairntir-1.0.0.dist-info/entry_points.txt +2 -0
- cairntir-1.0.0.dist-info/licenses/LICENSE +21 -0
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
|
+
]
|