agentforge-memory-postgres 0.2.4__py3-none-any.whl → 0.3.1__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.
@@ -11,9 +11,17 @@ sync `psycopg`, in agent code paths.
11
11
 
12
12
  from __future__ import annotations
13
13
 
14
+ # Version is sourced from the installed distribution metadata so it can
15
+ # never drift from pyproject.toml (bug-024).
16
+ from importlib.metadata import PackageNotFoundError as _PkgNotFound
17
+ from importlib.metadata import version as _dist_version
18
+
14
19
  from agentforge_memory_postgres.memory import PostgresMemoryStore
15
20
  from agentforge_memory_postgres.vector import PostgresVectorStore
16
21
 
17
- __version__ = "0.2.3"
22
+ try:
23
+ __version__ = _dist_version("agentforge-memory-postgres")
24
+ except _PkgNotFound: # pragma: no cover - source tree without installed metadata
25
+ __version__ = "0.0.0+unknown"
18
26
 
19
27
  __all__ = ["PostgresMemoryStore", "PostgresVectorStore", "__version__"]
@@ -76,6 +76,21 @@ class PostgresMemoryStore(MemoryStore):
76
76
  pool = await asyncpg.create_pool(dsn=dsn, min_size=min_size, max_size=max_size)
77
77
  return cls(runner=_AsyncpgPoolRunner(pool))
78
78
 
79
+ @classmethod
80
+ async def from_config(
81
+ cls,
82
+ *,
83
+ dsn: str,
84
+ min_size: int = 1,
85
+ max_size: int = 10,
86
+ ) -> Self: # pragma: no cover — exercised only with `-m live`.
87
+ """Build from a `modules.memory.config` block (bug-022).
88
+
89
+ Async config-driven factory matching the framework convention;
90
+ delegates to `from_dsn`.
91
+ """
92
+ return await cls.from_dsn(dsn, min_size=min_size, max_size=max_size)
93
+
79
94
  async def __aenter__(self) -> Self:
80
95
  return self
81
96
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentforge-memory-postgres
3
- Version: 0.2.4
3
+ Version: 0.3.1
4
4
  Summary: Postgres + pgvector-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: asyncpg>=0.30
25
25
  Requires-Dist: pgvector>=0.3
26
26
  Description-Content-Type: text/markdown
@@ -1,15 +1,15 @@
1
- agentforge_memory_postgres/__init__.py,sha256=liNKxye7Ytd3JJmOZu3_njqM59UDjSl-9r_2ACK1ASI,676
1
+ agentforge_memory_postgres/__init__.py,sha256=CdWjE-kT6nSWJTT7Qlx0XOPShGgaKryoV6DL511H7XM,1079
2
2
  agentforge_memory_postgres/_migrator.py,sha256=1IbtqvtUFRWhVX-3tbkAi-Jw8pKcuFfa_zkfVXx0W3o,5374
3
3
  agentforge_memory_postgres/_runner.py,sha256=BtFTmDjJelNhfUIcDmVUgu3ojzfv92TGcO49Ea8TjD8,4994
4
- agentforge_memory_postgres/memory.py,sha256=5rL_wT0Qct8Gl5mmCMXjwQi0Je5S2g1woEX_7t_p7ec,9765
4
+ agentforge_memory_postgres/memory.py,sha256=cYoF7mpDYK7zaiQKXtcFtfj1szym_A0Muayvfy6oE48,10236
5
5
  agentforge_memory_postgres/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  agentforge_memory_postgres/vector.py,sha256=vF46PdYENZFYc60LTnVTgOfM1bEmyIZZXyUEq1SgecM,10323
7
7
  agentforge_memory_postgres/migrations/0000_migrations_table.sql,sha256=VoCG5tsQp7pBTaLXqshq2NwB-Tf-jh2gjQi8jxx9ec0,201
8
8
  agentforge_memory_postgres/migrations/0001_initial.sql,sha256=sjcximXWjCitCTvZcF6asKvq3xIGzig35smioEwcuUM,491
9
9
  agentforge_memory_postgres/migrations/vector/0000_migrations_table.sql,sha256=VoCG5tsQp7pBTaLXqshq2NwB-Tf-jh2gjQi8jxx9ec0,201
10
10
  agentforge_memory_postgres/migrations/vector/0100_vectors.sql,sha256=exodIYuVSclbmgpZKgBD0HRjHu99sa-OhCYPJdMcIt8,575
11
- agentforge_memory_postgres-0.2.4.dist-info/METADATA,sha256=9OBF3v5uom4unMxsSFU4GiaWHFmTW_65piNUvj0EO6U,3643
12
- agentforge_memory_postgres-0.2.4.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
13
- agentforge_memory_postgres-0.2.4.dist-info/entry_points.txt,sha256=LQBCkv2EKz3L2dsQgTKPbrh7AYq4KjL5HlPPXpvA5O4,178
14
- agentforge_memory_postgres-0.2.4.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
15
- agentforge_memory_postgres-0.2.4.dist-info/RECORD,,
11
+ agentforge_memory_postgres-0.3.1.dist-info/METADATA,sha256=EUiaJLcekDJNT43gKqh65PBdnxfVZsMX-6UXsVYwL8M,3643
12
+ agentforge_memory_postgres-0.3.1.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
13
+ agentforge_memory_postgres-0.3.1.dist-info/entry_points.txt,sha256=LQBCkv2EKz3L2dsQgTKPbrh7AYq4KjL5HlPPXpvA5O4,178
14
+ agentforge_memory_postgres-0.3.1.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
15
+ agentforge_memory_postgres-0.3.1.dist-info/RECORD,,