3tears-agent-knowledge 0.76.0__tar.gz → 0.78.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.
- {3tears_agent_knowledge-0.76.0 → 3tears_agent_knowledge-0.78.0}/PKG-INFO +7 -7
- {3tears_agent_knowledge-0.76.0 → 3tears_agent_knowledge-0.78.0}/pyproject.toml +7 -7
- {3tears_agent_knowledge-0.76.0 → 3tears_agent_knowledge-0.78.0}/src/threetears/agent/knowledge/__init__.py +1 -2
- {3tears_agent_knowledge-0.76.0 → 3tears_agent_knowledge-0.78.0}/src/threetears/agent/knowledge/collections.py +7 -7
- {3tears_agent_knowledge-0.76.0 → 3tears_agent_knowledge-0.78.0}/tests/test_collections.py +29 -0
- {3tears_agent_knowledge-0.76.0 → 3tears_agent_knowledge-0.78.0}/.gitignore +0 -0
- {3tears_agent_knowledge-0.76.0 → 3tears_agent_knowledge-0.78.0}/LICENSE +0 -0
- {3tears_agent_knowledge-0.76.0 → 3tears_agent_knowledge-0.78.0}/README.md +0 -0
- {3tears_agent_knowledge-0.76.0 → 3tears_agent_knowledge-0.78.0}/src/threetears/agent/knowledge/entities.py +0 -0
- {3tears_agent_knowledge-0.76.0 → 3tears_agent_knowledge-0.78.0}/src/threetears/agent/knowledge/integration.py +0 -0
- {3tears_agent_knowledge-0.76.0 → 3tears_agent_knowledge-0.78.0}/src/threetears/agent/knowledge/middleware.py +0 -0
- {3tears_agent_knowledge-0.76.0 → 3tears_agent_knowledge-0.78.0}/src/threetears/agent/knowledge/py.typed +0 -0
- {3tears_agent_knowledge-0.76.0 → 3tears_agent_knowledge-0.78.0}/tests/test_integration.py +0 -0
- {3tears_agent_knowledge-0.76.0 → 3tears_agent_knowledge-0.78.0}/tests/test_knowledge_injection_middleware.py +0 -0
- {3tears_agent_knowledge-0.76.0 → 3tears_agent_knowledge-0.78.0}/tests/test_lazy_init.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: 3tears-agent-knowledge
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.78.0
|
|
4
4
|
Summary: Governed-knowledge retrieval + injection for LLM agents -- concepts, playbook entries, three-scope shadow merge, and before_model middleware
|
|
5
5
|
Project-URL: Repository, https://github.com/pacepace/3tears
|
|
6
6
|
Author: pace
|
|
@@ -15,12 +15,12 @@ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
|
15
15
|
Classifier: Topic :: Software Development :: Libraries
|
|
16
16
|
Classifier: Typing :: Typed
|
|
17
17
|
Requires-Python: >=3.14
|
|
18
|
-
Requires-Dist: 3tears-agent-acl<0.
|
|
19
|
-
Requires-Dist: 3tears-agent-memory<0.
|
|
20
|
-
Requires-Dist: 3tears-langgraph<0.
|
|
21
|
-
Requires-Dist: 3tears-nats<0.
|
|
22
|
-
Requires-Dist: 3tears-observe<0.
|
|
23
|
-
Requires-Dist: 3tears<0.
|
|
18
|
+
Requires-Dist: 3tears-agent-acl<0.79.0,>=0.78.0
|
|
19
|
+
Requires-Dist: 3tears-agent-memory<0.79.0,>=0.78.0
|
|
20
|
+
Requires-Dist: 3tears-langgraph<0.79.0,>=0.78.0
|
|
21
|
+
Requires-Dist: 3tears-nats<0.79.0,>=0.78.0
|
|
22
|
+
Requires-Dist: 3tears-observe<0.79.0,>=0.78.0
|
|
23
|
+
Requires-Dist: 3tears<0.79.0,>=0.78.0
|
|
24
24
|
Requires-Dist: langchain-core
|
|
25
25
|
Requires-Dist: langchain>=1.0
|
|
26
26
|
Requires-Dist: langgraph>=1.0
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "3tears-agent-knowledge"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.78.0"
|
|
8
8
|
description = "Governed-knowledge retrieval + injection for LLM agents -- concepts, playbook entries, three-scope shadow merge, and before_model middleware"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.14"
|
|
@@ -22,12 +22,12 @@ classifiers = [
|
|
|
22
22
|
"Typing :: Typed",
|
|
23
23
|
]
|
|
24
24
|
dependencies = [
|
|
25
|
-
"3tears>=0.
|
|
26
|
-
"3tears-agent-acl>=0.
|
|
27
|
-
"3tears-agent-memory>=0.
|
|
28
|
-
"3tears-langgraph>=0.
|
|
29
|
-
"3tears-nats>=0.
|
|
30
|
-
"3tears-observe>=0.
|
|
25
|
+
"3tears>=0.78.0,<0.79.0",
|
|
26
|
+
"3tears-agent-acl>=0.78.0,<0.79.0",
|
|
27
|
+
"3tears-agent-memory>=0.78.0,<0.79.0",
|
|
28
|
+
"3tears-langgraph>=0.78.0,<0.79.0",
|
|
29
|
+
"3tears-nats>=0.78.0,<0.79.0",
|
|
30
|
+
"3tears-observe>=0.78.0,<0.79.0",
|
|
31
31
|
"pgvector",
|
|
32
32
|
"langchain-core",
|
|
33
33
|
"langchain>=1.0",
|
|
@@ -16,6 +16,7 @@ from __future__ import annotations
|
|
|
16
16
|
# where the package isn't installed via importlib.metadata (e.g. running directly
|
|
17
17
|
# from a checked-out source tree without ``uv sync``); the fallback keeps imports
|
|
18
18
|
# working but reports ``unknown`` rather than crashing.
|
|
19
|
+
from importlib import import_module
|
|
19
20
|
from importlib.metadata import PackageNotFoundError as _PackageNotFoundError
|
|
20
21
|
from importlib.metadata import version as _version
|
|
21
22
|
from typing import TYPE_CHECKING
|
|
@@ -91,8 +92,6 @@ def __getattr__(name: str) -> object:
|
|
|
91
92
|
entry = _LAZY.get(name)
|
|
92
93
|
if entry is None:
|
|
93
94
|
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
94
|
-
from importlib import import_module
|
|
95
|
-
|
|
96
95
|
module_name, attr = entry
|
|
97
96
|
value: object = getattr(import_module(module_name), attr)
|
|
98
97
|
globals()[name] = value
|
|
@@ -307,13 +307,13 @@ class PlaybookEntryCollection(SchemaBackedCollection[PlaybookEntryEntity]):
|
|
|
307
307
|
Column("playbook_id", UUID_TYPE),
|
|
308
308
|
Column("customer_id", UUID_TYPE, nullable=True),
|
|
309
309
|
Column("user_id", UUID_TYPE, nullable=True),
|
|
310
|
-
Column("visibility", STRING_TYPE),
|
|
310
|
+
Column("visibility", STRING_TYPE, server_default="'private'"),
|
|
311
311
|
Column("origin_entry_id", UUID_TYPE, nullable=True),
|
|
312
312
|
Column("title", STRING_TYPE),
|
|
313
313
|
Column("body", STRING_TYPE),
|
|
314
|
-
Column("tags", JSONB_TYPE),
|
|
314
|
+
Column("tags", JSONB_TYPE, server_default="'[]'::jsonb"),
|
|
315
315
|
Column("datasource_id", UUID_TYPE),
|
|
316
|
-
Column("always_inject", BOOL_TYPE),
|
|
316
|
+
Column("always_inject", BOOL_TYPE, server_default="false"),
|
|
317
317
|
# draft lifecycle + turn provenance (knowledge-task-06 / v019).
|
|
318
318
|
# ``status`` carries ``server_default='active'`` so the agent never
|
|
319
319
|
# has to name it (the agent never WRITES this table -- the hub
|
|
@@ -540,17 +540,17 @@ class ConceptCollection(SchemaBackedCollection[ConceptEntity]):
|
|
|
540
540
|
Column("id", UUID_TYPE),
|
|
541
541
|
Column("customer_id", UUID_TYPE, nullable=True),
|
|
542
542
|
Column("user_id", UUID_TYPE, nullable=True),
|
|
543
|
-
Column("visibility", STRING_TYPE),
|
|
543
|
+
Column("visibility", STRING_TYPE, server_default="'private'"),
|
|
544
544
|
Column("origin_concept_id", UUID_TYPE, nullable=True),
|
|
545
545
|
Column("name", STRING_TYPE),
|
|
546
|
-
Column("aliases", JSONB_TYPE),
|
|
546
|
+
Column("aliases", JSONB_TYPE, server_default="'[]'::jsonb"),
|
|
547
547
|
Column("definition", STRING_TYPE),
|
|
548
548
|
Column("datasource_id", UUID_TYPE),
|
|
549
549
|
Column("datasource_table_id", UUID_TYPE, nullable=True),
|
|
550
550
|
Column("sql_fragment", STRING_TYPE, nullable=True),
|
|
551
551
|
Column("caveats", STRING_TYPE, nullable=True),
|
|
552
|
-
Column("tags", JSONB_TYPE),
|
|
553
|
-
Column("always_inject", BOOL_TYPE),
|
|
552
|
+
Column("tags", JSONB_TYPE, server_default="'[]'::jsonb"),
|
|
553
|
+
Column("always_inject", BOOL_TYPE, server_default="false"),
|
|
554
554
|
# draft lifecycle + turn provenance (knowledge-task-06 / v019).
|
|
555
555
|
# ``status`` carries ``server_default='active'`` (the agent never
|
|
556
556
|
# writes this table; the hub emitter does). declaring the columns
|
|
@@ -484,3 +484,32 @@ class TestAScanIsDroppedWhenAnAccessTableItDependsOnChanges:
|
|
|
484
484
|
await coll.list_visible_to_user(user_id, customer_scope=customer_scope)
|
|
485
485
|
|
|
486
486
|
assert cache.drop_for_table(table) == 1, f"a change to {table} left the cached scan in place"
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
class TestSchemasDeclareTheHubTablesDefaults:
|
|
490
|
+
"""the schemas carry every default the hub migrates onto ``concepts`` and ``playbook_entries``.
|
|
491
|
+
|
|
492
|
+
Found by the hub's live tier-parity gate: a default the schema does not declare is a column a
|
|
493
|
+
save that leaves it out lets the database fill, without reading the stored value back, so every
|
|
494
|
+
tier cached the row without it. ``embedding`` and ``playbook_entries.enforcement`` are deliberately
|
|
495
|
+
not owned by these collections and stay out of the schemas.
|
|
496
|
+
"""
|
|
497
|
+
|
|
498
|
+
def test_concepts(self) -> None:
|
|
499
|
+
defaults = {column.name: column.server_default for column in ConceptCollection.schema.columns}
|
|
500
|
+
assert {name: defaults[name] for name in ("visibility", "aliases", "tags", "always_inject")} == {
|
|
501
|
+
"visibility": "'private'",
|
|
502
|
+
"aliases": "'[]'::jsonb",
|
|
503
|
+
"tags": "'[]'::jsonb",
|
|
504
|
+
"always_inject": "false",
|
|
505
|
+
}
|
|
506
|
+
assert "embedding" not in defaults
|
|
507
|
+
|
|
508
|
+
def test_playbook_entries(self) -> None:
|
|
509
|
+
defaults = {column.name: column.server_default for column in PlaybookEntryCollection.schema.columns}
|
|
510
|
+
assert {name: defaults[name] for name in ("visibility", "tags", "always_inject")} == {
|
|
511
|
+
"visibility": "'private'",
|
|
512
|
+
"tags": "'[]'::jsonb",
|
|
513
|
+
"always_inject": "false",
|
|
514
|
+
}
|
|
515
|
+
assert "embedding" not in defaults and "enforcement" not in defaults
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|