agentforge-memory-sqlite 0.2.4__tar.gz → 0.3.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.
Files changed (16) hide show
  1. {agentforge_memory_sqlite-0.2.4 → agentforge_memory_sqlite-0.3.1}/.gitignore +10 -0
  2. {agentforge_memory_sqlite-0.2.4 → agentforge_memory_sqlite-0.3.1}/PKG-INFO +2 -2
  3. {agentforge_memory_sqlite-0.2.4 → agentforge_memory_sqlite-0.3.1}/pyproject.toml +2 -2
  4. {agentforge_memory_sqlite-0.2.4 → agentforge_memory_sqlite-0.3.1}/src/agentforge_memory_sqlite/__init__.py +9 -1
  5. {agentforge_memory_sqlite-0.2.4 → agentforge_memory_sqlite-0.3.1}/src/agentforge_memory_sqlite/memory.py +12 -0
  6. {agentforge_memory_sqlite-0.2.4 → agentforge_memory_sqlite-0.3.1}/tests/unit/test_memory.py +13 -0
  7. {agentforge_memory_sqlite-0.2.4 → agentforge_memory_sqlite-0.3.1}/LICENSE +0 -0
  8. {agentforge_memory_sqlite-0.2.4 → agentforge_memory_sqlite-0.3.1}/README.md +0 -0
  9. {agentforge_memory_sqlite-0.2.4 → agentforge_memory_sqlite-0.3.1}/src/agentforge_memory_sqlite/_migrator.py +0 -0
  10. {agentforge_memory_sqlite-0.2.4 → agentforge_memory_sqlite-0.3.1}/src/agentforge_memory_sqlite/migrations/0000_migrations_table.sql +0 -0
  11. {agentforge_memory_sqlite-0.2.4 → agentforge_memory_sqlite-0.3.1}/src/agentforge_memory_sqlite/migrations/0001_initial.sql +0 -0
  12. {agentforge_memory_sqlite-0.2.4 → agentforge_memory_sqlite-0.3.1}/src/agentforge_memory_sqlite/migrations/0002_fts5.sql +0 -0
  13. {agentforge_memory_sqlite-0.2.4 → agentforge_memory_sqlite-0.3.1}/src/agentforge_memory_sqlite/py.typed +0 -0
  14. {agentforge_memory_sqlite-0.2.4 → agentforge_memory_sqlite-0.3.1}/src/agentforge_memory_sqlite/vector.py +0 -0
  15. {agentforge_memory_sqlite-0.2.4 → agentforge_memory_sqlite-0.3.1}/tests/unit/test_sqlite_migrator.py +0 -0
  16. {agentforge_memory_sqlite-0.2.4 → agentforge_memory_sqlite-0.3.1}/tests/unit/test_vector.py +0 -0
@@ -47,3 +47,13 @@ Thumbs.db
47
47
  # Project-local
48
48
  *.local
49
49
  .agentforge-state/.session-cache
50
+
51
+ # AI-assistant working state — local session tracking, not part of
52
+ # the published project. The process docs under .claude/ (standards,
53
+ # checklists, CLAUDE.md) are intentionally kept tracked; only the
54
+ # churny per-session state files are ignored.
55
+ .claude/state/
56
+
57
+ # Launch / go-to-market drafts — local-only marketing material,
58
+ # never published to the repo.
59
+ launch/
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentforge-memory-sqlite
3
- Version: 0.2.4
3
+ Version: 0.3.1
4
4
  Summary: SQLite-backed MemoryStore and VectorStore for AgentForge
5
5
  Project-URL: Homepage, https://github.com/Scaffoldic/agentforge-py
6
6
  Project-URL: Repository, https://github.com/Scaffoldic/agentforge-py
@@ -20,7 +20,7 @@ Classifier: Topic :: Database
20
20
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
21
  Classifier: Typing :: Typed
22
22
  Requires-Python: >=3.13
23
- Requires-Dist: agentforge-core~=0.2.4
23
+ Requires-Dist: agentforge-core~=0.3.1
24
24
  Requires-Dist: aiosqlite>=0.20
25
25
  Description-Content-Type: text/markdown
26
26
 
@@ -10,7 +10,7 @@
10
10
 
11
11
  [project]
12
12
  name = "agentforge-memory-sqlite"
13
- version = "0.2.4"
13
+ version = "0.3.1"
14
14
  description = "SQLite-backed MemoryStore and VectorStore for AgentForge"
15
15
  readme = "README.md"
16
16
  requires-python = ">=3.13"
@@ -32,7 +32,7 @@ classifiers = [
32
32
  ]
33
33
 
34
34
  dependencies = [
35
- "agentforge-core ~= 0.2.4",
35
+ "agentforge-core ~= 0.3.1",
36
36
  "aiosqlite>=0.20",
37
37
  ]
38
38
 
@@ -9,9 +9,17 @@ blocking stdlib `sqlite3`, in agent code paths.
9
9
 
10
10
  from __future__ import annotations
11
11
 
12
+ # Version is sourced from the installed distribution metadata so it can
13
+ # never drift from pyproject.toml (bug-024).
14
+ from importlib.metadata import PackageNotFoundError as _PkgNotFound
15
+ from importlib.metadata import version as _dist_version
16
+
12
17
  from agentforge_memory_sqlite.memory import SqliteMemoryStore
13
18
  from agentforge_memory_sqlite.vector import SqliteVectorStore
14
19
 
15
- __version__ = "0.2.3"
20
+ try:
21
+ __version__ = _dist_version("agentforge-memory-sqlite")
22
+ except _PkgNotFound: # pragma: no cover - source tree without installed metadata
23
+ __version__ = "0.0.0+unknown"
16
24
 
17
25
  __all__ = ["SqliteMemoryStore", "SqliteVectorStore", "__version__"]
@@ -56,6 +56,18 @@ class SqliteMemoryStore(MemoryStore):
56
56
  await SqliteMigrator(connection).apply_pending()
57
57
  return cls(connection=connection)
58
58
 
59
+ @classmethod
60
+ async def from_config(cls, *, path: str | Path) -> SqliteMemoryStore:
61
+ """Build from a `modules.memory.config` block (bug-022).
62
+
63
+ The framework's config-driven module convention: every module
64
+ type exposes a `from_config` factory so `build_*_from_config`
65
+ can instantiate it from YAML. Memory construction is async
66
+ (it opens a connection), so unlike the sync `from_config` on
67
+ stateless modules this one is a coroutine.
68
+ """
69
+ return await cls.from_path(path)
70
+
59
71
  def migrator(self) -> SqliteMigrator:
60
72
  """Return a `SqliteMigrator` configured against the
61
73
  package's bundled migrations directory (feat-024)."""
@@ -33,6 +33,19 @@ async def test_passes_memory_conformance_suite() -> None:
33
33
  await store.close()
34
34
 
35
35
 
36
+ @pytest.mark.asyncio
37
+ async def test_from_config_builds_a_live_store() -> None:
38
+ """bug-022: `from_config` is the config-driven factory the CLI's
39
+ `build_memory_from_config` uses. It must return a live store."""
40
+ store = await SqliteMemoryStore.from_config(path=":memory:")
41
+ try:
42
+ claim = Claim(run_id="r1", project="p", agent="a", category="c", payload={"x": 1})
43
+ claim_id = await store.put(claim)
44
+ assert (await store.get(claim_id)) is not None
45
+ finally:
46
+ await store.close()
47
+
48
+
36
49
  # ---- Lifecycle ----
37
50
 
38
51