doxastica 0.1.0__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.
- doxastica-0.1.0/LICENSE +21 -0
- doxastica-0.1.0/PKG-INFO +70 -0
- doxastica-0.1.0/README.md +45 -0
- doxastica-0.1.0/pyproject.toml +84 -0
- doxastica-0.1.0/src/doxastica/__init__.py +37 -0
- doxastica-0.1.0/src/doxastica/backends/__init__.py +17 -0
- doxastica-0.1.0/src/doxastica/backends/ladybug.py +565 -0
- doxastica-0.1.0/src/doxastica/backends/memory.py +226 -0
- doxastica-0.1.0/src/doxastica/core.py +678 -0
- doxastica-0.1.0/src/doxastica/errors.py +22 -0
- doxastica-0.1.0/src/doxastica/models.py +128 -0
- doxastica-0.1.0/src/doxastica/ports.py +130 -0
- doxastica-0.1.0/src/doxastica/protocol.py +165 -0
- doxastica-0.1.0/src/doxastica/py.typed +0 -0
doxastica-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Paul Garner
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
doxastica-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: doxastica
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Graph-native AGM belief-revision core (Kumiho M0)
|
|
5
|
+
Keywords: belief-revision,agm,kumiho,graph,epistemic,memory
|
|
6
|
+
Author: Anentropic
|
|
7
|
+
Author-email: Anentropic <ego@anentropic.com>
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
13
|
+
Classifier: Typing :: Typed
|
|
14
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
15
|
+
Requires-Dist: pydantic>=2.11,<3
|
|
16
|
+
Requires-Dist: doxastica[ladybug] ; extra == 'all'
|
|
17
|
+
Requires-Dist: ladybug>=0.17,<0.18 ; extra == 'ladybug'
|
|
18
|
+
Requires-Python: >=3.14
|
|
19
|
+
Project-URL: Homepage, https://github.com/anentropic/doxastica
|
|
20
|
+
Project-URL: Documentation, https://anentropic.github.io/doxastica/
|
|
21
|
+
Project-URL: Repository, https://github.com/anentropic/doxastica
|
|
22
|
+
Provides-Extra: all
|
|
23
|
+
Provides-Extra: ladybug
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
# doxastica
|
|
27
|
+
|
|
28
|
+
A standalone **reference implementation of Kumiho** ([arXiv 2603.17244](https://arxiv.org/abs/2603.17244), Young Bin Park) —
|
|
29
|
+
a graph-native AGM belief-revision core — with one deliberate **multi-scope** extension
|
|
30
|
+
(Kumiho is single-agent) and one deliberate exclusion (**no recovery**; AGM *recovery* is
|
|
31
|
+
dropped in favour of superseded-chain semantics). Zero narrative concepts; correctness is
|
|
32
|
+
*provable*, with AGM/Hansson postulates verified mechanically as a backend conformance suite.
|
|
33
|
+
|
|
34
|
+
## What it is
|
|
35
|
+
|
|
36
|
+
doxastica is a standalone, append-only belief-revision library. It has **no game, narrative,
|
|
37
|
+
or LLM concepts inside it** — only scopes, beliefs, and revisions behind a clean
|
|
38
|
+
`BeliefStore` protocol. Revision is forward-only: no operation removes or rewrites a stored
|
|
39
|
+
`BeliefState`; superseded states stay on the chain. The library ships a working in-memory AGM
|
|
40
|
+
core that depends on `pydantic` alone, with the LadybugDB graph backend available as an
|
|
41
|
+
optional extra.
|
|
42
|
+
|
|
43
|
+
## Installation
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# Core (in-memory AGM engine, pydantic only)
|
|
47
|
+
pip install doxastica
|
|
48
|
+
|
|
49
|
+
# With the LadybugDB reference backend
|
|
50
|
+
pip install doxastica[ladybug]
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Or with [uv](https://docs.astral.sh/uv/):
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
uv add doxastica
|
|
57
|
+
uv add 'doxastica[ladybug]'
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
The base install ships a fully working in-memory belief-revision core. The `[ladybug]` extra
|
|
61
|
+
adds the LadybugDB-backed reference backend behind the same `BeliefStore` protocol.
|
|
62
|
+
|
|
63
|
+
## Quick Start
|
|
64
|
+
|
|
65
|
+
See the [Quick Start in the documentation](https://anentropic.github.io/doxastica/) for a
|
|
66
|
+
runnable first program using `MemoryCore(InMemoryBackend())`.
|
|
67
|
+
|
|
68
|
+
## License
|
|
69
|
+
|
|
70
|
+
MIT. See [LICENSE](LICENSE).
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# doxastica
|
|
2
|
+
|
|
3
|
+
A standalone **reference implementation of Kumiho** ([arXiv 2603.17244](https://arxiv.org/abs/2603.17244), Young Bin Park) —
|
|
4
|
+
a graph-native AGM belief-revision core — with one deliberate **multi-scope** extension
|
|
5
|
+
(Kumiho is single-agent) and one deliberate exclusion (**no recovery**; AGM *recovery* is
|
|
6
|
+
dropped in favour of superseded-chain semantics). Zero narrative concepts; correctness is
|
|
7
|
+
*provable*, with AGM/Hansson postulates verified mechanically as a backend conformance suite.
|
|
8
|
+
|
|
9
|
+
## What it is
|
|
10
|
+
|
|
11
|
+
doxastica is a standalone, append-only belief-revision library. It has **no game, narrative,
|
|
12
|
+
or LLM concepts inside it** — only scopes, beliefs, and revisions behind a clean
|
|
13
|
+
`BeliefStore` protocol. Revision is forward-only: no operation removes or rewrites a stored
|
|
14
|
+
`BeliefState`; superseded states stay on the chain. The library ships a working in-memory AGM
|
|
15
|
+
core that depends on `pydantic` alone, with the LadybugDB graph backend available as an
|
|
16
|
+
optional extra.
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# Core (in-memory AGM engine, pydantic only)
|
|
22
|
+
pip install doxastica
|
|
23
|
+
|
|
24
|
+
# With the LadybugDB reference backend
|
|
25
|
+
pip install doxastica[ladybug]
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Or with [uv](https://docs.astral.sh/uv/):
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
uv add doxastica
|
|
32
|
+
uv add 'doxastica[ladybug]'
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The base install ships a fully working in-memory belief-revision core. The `[ladybug]` extra
|
|
36
|
+
adds the LadybugDB-backed reference backend behind the same `BeliefStore` protocol.
|
|
37
|
+
|
|
38
|
+
## Quick Start
|
|
39
|
+
|
|
40
|
+
See the [Quick Start in the documentation](https://anentropic.github.io/doxastica/) for a
|
|
41
|
+
runnable first program using `MemoryCore(InMemoryBackend())`.
|
|
42
|
+
|
|
43
|
+
## License
|
|
44
|
+
|
|
45
|
+
MIT. See [LICENSE](LICENSE).
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "doxastica"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Graph-native AGM belief-revision core (Kumiho M0)"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
authors = [
|
|
7
|
+
{ name = "Anentropic", email = "ego@anentropic.com" }
|
|
8
|
+
]
|
|
9
|
+
requires-python = ">=3.14"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
license-files = ["LICENSE"]
|
|
12
|
+
keywords = ["belief-revision", "agm", "kumiho", "graph", "epistemic", "memory"]
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Development Status :: 4 - Beta",
|
|
15
|
+
"License :: OSI Approved :: MIT License",
|
|
16
|
+
"Programming Language :: Python :: 3.14",
|
|
17
|
+
"Typing :: Typed",
|
|
18
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
19
|
+
]
|
|
20
|
+
dependencies = [
|
|
21
|
+
"pydantic>=2.11,<3",
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
[project.urls]
|
|
25
|
+
Homepage = "https://github.com/anentropic/doxastica"
|
|
26
|
+
Documentation = "https://anentropic.github.io/doxastica/"
|
|
27
|
+
Repository = "https://github.com/anentropic/doxastica"
|
|
28
|
+
|
|
29
|
+
[project.optional-dependencies]
|
|
30
|
+
# D-03 (Option B): pydantic is the sole REQUIRED runtime dep; ladybug is the
|
|
31
|
+
# reference-backend extra behind the Phase-1 BackendPort seam. `pip install doxastica`
|
|
32
|
+
# yields a working in-memory AGM core with zero ladybug install; `[ladybug]` adds the
|
|
33
|
+
# reference backend.
|
|
34
|
+
ladybug = ["ladybug>=0.17,<0.18"]
|
|
35
|
+
all = ["doxastica[ladybug]"]
|
|
36
|
+
# future backends slot in here as extras, e.g. neo4j = [...], surrealdb = [...]
|
|
37
|
+
|
|
38
|
+
[build-system]
|
|
39
|
+
requires = ["uv_build>=0.9.18,<1.0.0"]
|
|
40
|
+
build-backend = "uv_build"
|
|
41
|
+
|
|
42
|
+
[dependency-groups]
|
|
43
|
+
dev = [
|
|
44
|
+
"basedpyright>=1.38.0",
|
|
45
|
+
"hypothesis>=6.155",
|
|
46
|
+
"ipython>=9.10.0",
|
|
47
|
+
"pdbpp>=0.12.0.post1",
|
|
48
|
+
"pytest>=8.0.0",
|
|
49
|
+
"pytest-cov>=6.0.0",
|
|
50
|
+
"ruff>=0.15.1",
|
|
51
|
+
]
|
|
52
|
+
docs = [
|
|
53
|
+
"mkdocs>=1.6.0",
|
|
54
|
+
"mkdocs-material>=9.7.0",
|
|
55
|
+
"mkdocstrings[python]>=0.26.0",
|
|
56
|
+
"mkdocs-gen-files>=0.5.0",
|
|
57
|
+
"mkdocs-literate-nav>=0.6.0",
|
|
58
|
+
"mkdocs-section-index>=0.3.0",
|
|
59
|
+
]
|
|
60
|
+
|
|
61
|
+
[tool.pyright]
|
|
62
|
+
pythonVersion = "3.14"
|
|
63
|
+
typeCheckingMode = "strict"
|
|
64
|
+
include = ["src", "tests"]
|
|
65
|
+
reportPrivateUsage = false
|
|
66
|
+
|
|
67
|
+
[tool.ruff]
|
|
68
|
+
target-version = "py314"
|
|
69
|
+
line-length = 100
|
|
70
|
+
src = ["src"]
|
|
71
|
+
|
|
72
|
+
[tool.ruff.lint]
|
|
73
|
+
select = ["E", "F", "W", "I", "UP", "B", "SIM", "TCH", "D"]
|
|
74
|
+
ignore = [
|
|
75
|
+
"D1", # don't require docstrings everywhere
|
|
76
|
+
"D202", # allow blank line after docstring (common in tests)
|
|
77
|
+
"D203", # conflicts with D211 (no blank line before class docstring)
|
|
78
|
+
"D212", # conflicts with D213 (multiline summary on second line)
|
|
79
|
+
"D401", # imperative mood is awkward for dunder methods
|
|
80
|
+
"D413", # blank line after last section not required
|
|
81
|
+
]
|
|
82
|
+
|
|
83
|
+
[tool.pytest.ini_options]
|
|
84
|
+
addopts = "-v"
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"""Graph-native AGM belief-revision core (Kumiho M0)."""
|
|
2
|
+
|
|
3
|
+
from doxastica.backends.memory import InMemoryBackend
|
|
4
|
+
from doxastica.core import MemoryCore
|
|
5
|
+
from doxastica.errors import (
|
|
6
|
+
BackendDependencyError,
|
|
7
|
+
DoxasticaError,
|
|
8
|
+
WorldScopeContractionError,
|
|
9
|
+
)
|
|
10
|
+
from doxastica.models import (
|
|
11
|
+
WORLD_SCOPE_ID,
|
|
12
|
+
Belief,
|
|
13
|
+
BeliefFilter,
|
|
14
|
+
BeliefState,
|
|
15
|
+
EdgeType,
|
|
16
|
+
ImpactResult,
|
|
17
|
+
Scope,
|
|
18
|
+
Status,
|
|
19
|
+
)
|
|
20
|
+
from doxastica.protocol import BeliefStore
|
|
21
|
+
|
|
22
|
+
__all__ = [
|
|
23
|
+
"BackendDependencyError",
|
|
24
|
+
"Belief",
|
|
25
|
+
"BeliefFilter",
|
|
26
|
+
"BeliefState",
|
|
27
|
+
"BeliefStore",
|
|
28
|
+
"DoxasticaError",
|
|
29
|
+
"EdgeType",
|
|
30
|
+
"ImpactResult",
|
|
31
|
+
"InMemoryBackend",
|
|
32
|
+
"MemoryCore",
|
|
33
|
+
"Scope",
|
|
34
|
+
"Status",
|
|
35
|
+
"WORLD_SCOPE_ID",
|
|
36
|
+
"WorldScopeContractionError",
|
|
37
|
+
]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Backend adapters behind the ``BackendPort`` seam (Phase 2).
|
|
3
|
+
|
|
4
|
+
This subpackage holds the concrete implementations of the internal LPG-primitive
|
|
5
|
+
:class:`doxastica.ports.BackendPort`. Per the driver-isolation discipline (D-02), this
|
|
6
|
+
``__init__`` re-exports ONLY the zero-dependency :class:`InMemoryBackend` — it MUST NEVER
|
|
7
|
+
``from .ladybug import ...``. Doing so would chain-load the optional ``ladybug`` driver on
|
|
8
|
+
every ``import doxastica.backends``, defeating the isolation the seam exists to provide.
|
|
9
|
+
The driver-backed adapter is imported directly by the caller from
|
|
10
|
+
``doxastica.backends.ladybug`` (``LadybugBackend.open(...)`` / ``.from_connection(...)``)
|
|
11
|
+
and injected into ``MemoryCore`` — pure DI, so ``MemoryCore`` itself stays driver-blind and
|
|
12
|
+
never names or imports a backend.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
from doxastica.backends.memory import InMemoryBackend
|
|
16
|
+
|
|
17
|
+
__all__ = ["InMemoryBackend"]
|