aethergraph 0.1.0a2__py3-none-any.whl → 0.1.0a4__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.
- aethergraph/__main__.py +3 -0
- aethergraph/api/v1/artifacts.py +23 -4
- aethergraph/api/v1/schemas.py +7 -0
- aethergraph/api/v1/session.py +123 -4
- aethergraph/config/config.py +2 -0
- aethergraph/config/search.py +49 -0
- aethergraph/contracts/services/channel.py +18 -1
- aethergraph/contracts/services/execution.py +58 -0
- aethergraph/contracts/services/llm.py +26 -0
- aethergraph/contracts/services/memory.py +10 -4
- aethergraph/contracts/services/planning.py +53 -0
- aethergraph/contracts/storage/event_log.py +8 -0
- aethergraph/contracts/storage/search_backend.py +47 -0
- aethergraph/contracts/storage/vector_index.py +73 -0
- aethergraph/core/graph/action_spec.py +76 -0
- aethergraph/core/graph/graph_fn.py +75 -2
- aethergraph/core/graph/graphify.py +74 -2
- aethergraph/core/runtime/graph_runner.py +2 -1
- aethergraph/core/runtime/node_context.py +66 -3
- aethergraph/core/runtime/node_services.py +8 -0
- aethergraph/core/runtime/run_manager.py +263 -271
- aethergraph/core/runtime/run_types.py +54 -1
- aethergraph/core/runtime/runtime_env.py +35 -14
- aethergraph/core/runtime/runtime_services.py +308 -18
- aethergraph/plugins/agents/default_chat_agent.py +266 -74
- aethergraph/plugins/agents/default_chat_agent_v2.py +487 -0
- aethergraph/plugins/channel/adapters/webui.py +69 -21
- aethergraph/plugins/channel/routes/webui_routes.py +8 -48
- aethergraph/runtime/__init__.py +12 -0
- aethergraph/server/app_factory.py +10 -1
- aethergraph/server/ui_static/assets/index-CFktGdbW.js +4913 -0
- aethergraph/server/ui_static/assets/index-DcfkFlTA.css +1 -0
- aethergraph/server/ui_static/index.html +2 -2
- aethergraph/services/artifacts/facade.py +157 -21
- aethergraph/services/artifacts/types.py +35 -0
- aethergraph/services/artifacts/utils.py +42 -0
- aethergraph/services/channel/channel_bus.py +3 -1
- aethergraph/services/channel/event_hub copy.py +55 -0
- aethergraph/services/channel/event_hub.py +81 -0
- aethergraph/services/channel/factory.py +3 -2
- aethergraph/services/channel/session.py +709 -74
- aethergraph/services/container/default_container.py +69 -7
- aethergraph/services/execution/__init__.py +0 -0
- aethergraph/services/execution/local_python.py +118 -0
- aethergraph/services/indices/__init__.py +0 -0
- aethergraph/services/indices/global_indices.py +21 -0
- aethergraph/services/indices/scoped_indices.py +292 -0
- aethergraph/services/llm/generic_client.py +342 -46
- aethergraph/services/llm/generic_embed_client.py +359 -0
- aethergraph/services/llm/types.py +3 -1
- aethergraph/services/memory/distillers/llm_long_term.py +60 -109
- aethergraph/services/memory/distillers/llm_long_term_v1.py +180 -0
- aethergraph/services/memory/distillers/llm_meta_summary.py +57 -266
- aethergraph/services/memory/distillers/llm_meta_summary_v1.py +342 -0
- aethergraph/services/memory/distillers/long_term.py +48 -131
- aethergraph/services/memory/distillers/long_term_v1.py +170 -0
- aethergraph/services/memory/facade/chat.py +18 -8
- aethergraph/services/memory/facade/core.py +159 -19
- aethergraph/services/memory/facade/distillation.py +86 -31
- aethergraph/services/memory/facade/retrieval.py +100 -1
- aethergraph/services/memory/factory.py +4 -1
- aethergraph/services/planning/__init__.py +0 -0
- aethergraph/services/planning/action_catalog.py +271 -0
- aethergraph/services/planning/bindings.py +56 -0
- aethergraph/services/planning/dependency_index.py +65 -0
- aethergraph/services/planning/flow_validator.py +263 -0
- aethergraph/services/planning/graph_io_adapter.py +150 -0
- aethergraph/services/planning/input_parser.py +312 -0
- aethergraph/services/planning/missing_inputs.py +28 -0
- aethergraph/services/planning/node_planner.py +613 -0
- aethergraph/services/planning/orchestrator.py +112 -0
- aethergraph/services/planning/plan_executor.py +506 -0
- aethergraph/services/planning/plan_types.py +321 -0
- aethergraph/services/planning/planner.py +617 -0
- aethergraph/services/planning/planner_service.py +369 -0
- aethergraph/services/planning/planning_context_builder.py +43 -0
- aethergraph/services/planning/quick_actions.py +29 -0
- aethergraph/services/planning/routers/__init__.py +0 -0
- aethergraph/services/planning/routers/simple_router.py +26 -0
- aethergraph/services/rag/facade.py +0 -3
- aethergraph/services/scope/scope.py +30 -30
- aethergraph/services/scope/scope_factory.py +15 -7
- aethergraph/services/skills/__init__.py +0 -0
- aethergraph/services/skills/skill_registry.py +465 -0
- aethergraph/services/skills/skills.py +220 -0
- aethergraph/services/skills/utils.py +194 -0
- aethergraph/storage/artifacts/artifact_index_jsonl.py +16 -10
- aethergraph/storage/artifacts/artifact_index_sqlite.py +12 -2
- aethergraph/storage/docstore/sqlite_doc_sync.py +1 -1
- aethergraph/storage/memory/event_persist.py +42 -2
- aethergraph/storage/memory/fs_persist.py +32 -2
- aethergraph/storage/search_backend/__init__.py +0 -0
- aethergraph/storage/search_backend/generic_vector_backend.py +230 -0
- aethergraph/storage/search_backend/null_backend.py +34 -0
- aethergraph/storage/search_backend/sqlite_lexical_backend.py +387 -0
- aethergraph/storage/search_backend/utils.py +31 -0
- aethergraph/storage/search_factory.py +75 -0
- aethergraph/storage/vector_index/faiss_index.py +72 -4
- aethergraph/storage/vector_index/sqlite_index.py +521 -52
- aethergraph/storage/vector_index/sqlite_index_vanila.py +311 -0
- aethergraph/storage/vector_index/utils.py +22 -0
- {aethergraph-0.1.0a2.dist-info → aethergraph-0.1.0a4.dist-info}/METADATA +1 -1
- {aethergraph-0.1.0a2.dist-info → aethergraph-0.1.0a4.dist-info}/RECORD +108 -64
- {aethergraph-0.1.0a2.dist-info → aethergraph-0.1.0a4.dist-info}/WHEEL +1 -1
- aethergraph/plugins/agents/default_chat_agent copy.py +0 -90
- aethergraph/server/ui_static/assets/index-BR5GtXcZ.css +0 -1
- aethergraph/server/ui_static/assets/index-CQ0HZZ83.js +0 -400
- aethergraph/services/eventhub/event_hub.py +0 -76
- aethergraph/services/llm/generic_client copy.py +0 -691
- aethergraph/services/prompts/file_store.py +0 -41
- {aethergraph-0.1.0a2.dist-info → aethergraph-0.1.0a4.dist-info}/entry_points.txt +0 -0
- {aethergraph-0.1.0a2.dist-info → aethergraph-0.1.0a4.dist-info}/licenses/LICENSE +0 -0
- {aethergraph-0.1.0a2.dist-info → aethergraph-0.1.0a4.dist-info}/licenses/NOTICE +0 -0
- {aethergraph-0.1.0a2.dist-info → aethergraph-0.1.0a4.dist-info}/top_level.txt +0 -0
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from collections import defaultdict
|
|
4
|
-
from collections.abc import Awaitable, Callable
|
|
5
|
-
|
|
6
|
-
Subscriber = Callable[[dict], Awaitable[None]]
|
|
7
|
-
|
|
8
|
-
"""
|
|
9
|
-
Lightweight in-memory pub/sub hub for UI events.
|
|
10
|
-
|
|
11
|
-
This sits *alongside* EventLog:
|
|
12
|
-
|
|
13
|
-
- EventLog = durable storage (what HTTP polling uses)
|
|
14
|
-
- EventHub = transient fan-out for live WebSocket subscribers
|
|
15
|
-
|
|
16
|
-
Later:
|
|
17
|
-
- You can swap this for Redis/Kafka/etc without changing the adapters.
|
|
18
|
-
"""
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
class EventHub:
|
|
22
|
-
"""
|
|
23
|
-
Pub/sub keyed by (scope_id, kind).
|
|
24
|
-
|
|
25
|
-
For example:
|
|
26
|
-
scope_id="session:abc123", kind="session_chat"
|
|
27
|
-
scope_id="run:xyz456", kind="run_channel"
|
|
28
|
-
"""
|
|
29
|
-
|
|
30
|
-
def __init__(self) -> None:
|
|
31
|
-
# (scope_id, kind) -> set of async callbacks
|
|
32
|
-
self._subs: dict[tuple[str, str], set[Subscriber]] = defaultdict(set)
|
|
33
|
-
|
|
34
|
-
def subscribe(self, scope_id: str, kind: str, cb: Subscriber) -> None:
|
|
35
|
-
"""Register a callback that should receive new rows for this (scope, kind)."""
|
|
36
|
-
self._subs[(scope_id, kind)].add(cb)
|
|
37
|
-
|
|
38
|
-
def unsubscribe(self, scope_id: str, kind: str, cb: Subscriber) -> None:
|
|
39
|
-
"""Remove a previously registered callback."""
|
|
40
|
-
key = (scope_id, kind)
|
|
41
|
-
subs = self._subs.get(key)
|
|
42
|
-
if not subs:
|
|
43
|
-
return
|
|
44
|
-
subs.discard(cb)
|
|
45
|
-
if not subs:
|
|
46
|
-
# Optional: cleanup empty sets
|
|
47
|
-
self._subs.pop(key, None)
|
|
48
|
-
|
|
49
|
-
async def broadcast(self, row: dict) -> None:
|
|
50
|
-
"""
|
|
51
|
-
Push a new EventLog row to all subscribers.
|
|
52
|
-
|
|
53
|
-
Expected row schema:
|
|
54
|
-
{
|
|
55
|
-
"id": str,
|
|
56
|
-
"ts": float,
|
|
57
|
-
"scope_id": str,
|
|
58
|
-
"kind": str,
|
|
59
|
-
"payload": {...},
|
|
60
|
-
}
|
|
61
|
-
"""
|
|
62
|
-
scope_id = row.get("scope_id")
|
|
63
|
-
kind = row.get("kind")
|
|
64
|
-
if not scope_id or not kind:
|
|
65
|
-
return
|
|
66
|
-
|
|
67
|
-
# Snapshot to avoid mutation during iteration
|
|
68
|
-
subs = list(self._subs.get((scope_id, kind), []))
|
|
69
|
-
|
|
70
|
-
for cb in subs:
|
|
71
|
-
try:
|
|
72
|
-
await cb(row)
|
|
73
|
-
except Exception:
|
|
74
|
-
# TODO: log error; maybe drop the subscriber if repeatedly failing
|
|
75
|
-
# For now, we ignore to avoid breaking others.
|
|
76
|
-
continue
|