aethergraph 0.1.0a3__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.
Files changed (113) hide show
  1. aethergraph/api/v1/artifacts.py +23 -4
  2. aethergraph/api/v1/schemas.py +7 -0
  3. aethergraph/api/v1/session.py +123 -4
  4. aethergraph/config/config.py +2 -0
  5. aethergraph/config/search.py +49 -0
  6. aethergraph/contracts/services/channel.py +18 -1
  7. aethergraph/contracts/services/execution.py +58 -0
  8. aethergraph/contracts/services/llm.py +26 -0
  9. aethergraph/contracts/services/memory.py +10 -4
  10. aethergraph/contracts/services/planning.py +53 -0
  11. aethergraph/contracts/storage/event_log.py +8 -0
  12. aethergraph/contracts/storage/search_backend.py +47 -0
  13. aethergraph/contracts/storage/vector_index.py +73 -0
  14. aethergraph/core/graph/action_spec.py +76 -0
  15. aethergraph/core/graph/graph_fn.py +75 -2
  16. aethergraph/core/graph/graphify.py +74 -2
  17. aethergraph/core/runtime/graph_runner.py +2 -1
  18. aethergraph/core/runtime/node_context.py +66 -3
  19. aethergraph/core/runtime/node_services.py +8 -0
  20. aethergraph/core/runtime/run_manager.py +263 -271
  21. aethergraph/core/runtime/run_types.py +54 -1
  22. aethergraph/core/runtime/runtime_env.py +35 -14
  23. aethergraph/core/runtime/runtime_services.py +308 -18
  24. aethergraph/plugins/agents/default_chat_agent.py +266 -74
  25. aethergraph/plugins/agents/default_chat_agent_v2.py +487 -0
  26. aethergraph/plugins/channel/adapters/webui.py +69 -21
  27. aethergraph/plugins/channel/routes/webui_routes.py +8 -48
  28. aethergraph/runtime/__init__.py +12 -0
  29. aethergraph/server/app_factory.py +3 -0
  30. aethergraph/server/ui_static/assets/index-CFktGdbW.js +4913 -0
  31. aethergraph/server/ui_static/assets/index-DcfkFlTA.css +1 -0
  32. aethergraph/server/ui_static/index.html +2 -2
  33. aethergraph/services/artifacts/facade.py +157 -21
  34. aethergraph/services/artifacts/types.py +35 -0
  35. aethergraph/services/artifacts/utils.py +42 -0
  36. aethergraph/services/channel/channel_bus.py +3 -1
  37. aethergraph/services/channel/event_hub copy.py +55 -0
  38. aethergraph/services/channel/event_hub.py +81 -0
  39. aethergraph/services/channel/factory.py +3 -2
  40. aethergraph/services/channel/session.py +709 -74
  41. aethergraph/services/container/default_container.py +69 -7
  42. aethergraph/services/execution/__init__.py +0 -0
  43. aethergraph/services/execution/local_python.py +118 -0
  44. aethergraph/services/indices/__init__.py +0 -0
  45. aethergraph/services/indices/global_indices.py +21 -0
  46. aethergraph/services/indices/scoped_indices.py +292 -0
  47. aethergraph/services/llm/generic_client.py +342 -46
  48. aethergraph/services/llm/generic_embed_client.py +359 -0
  49. aethergraph/services/llm/types.py +3 -1
  50. aethergraph/services/memory/distillers/llm_long_term.py +60 -109
  51. aethergraph/services/memory/distillers/llm_long_term_v1.py +180 -0
  52. aethergraph/services/memory/distillers/llm_meta_summary.py +57 -266
  53. aethergraph/services/memory/distillers/llm_meta_summary_v1.py +342 -0
  54. aethergraph/services/memory/distillers/long_term.py +48 -131
  55. aethergraph/services/memory/distillers/long_term_v1.py +170 -0
  56. aethergraph/services/memory/facade/chat.py +18 -8
  57. aethergraph/services/memory/facade/core.py +159 -19
  58. aethergraph/services/memory/facade/distillation.py +86 -31
  59. aethergraph/services/memory/facade/retrieval.py +100 -1
  60. aethergraph/services/memory/factory.py +4 -1
  61. aethergraph/services/planning/__init__.py +0 -0
  62. aethergraph/services/planning/action_catalog.py +271 -0
  63. aethergraph/services/planning/bindings.py +56 -0
  64. aethergraph/services/planning/dependency_index.py +65 -0
  65. aethergraph/services/planning/flow_validator.py +263 -0
  66. aethergraph/services/planning/graph_io_adapter.py +150 -0
  67. aethergraph/services/planning/input_parser.py +312 -0
  68. aethergraph/services/planning/missing_inputs.py +28 -0
  69. aethergraph/services/planning/node_planner.py +613 -0
  70. aethergraph/services/planning/orchestrator.py +112 -0
  71. aethergraph/services/planning/plan_executor.py +506 -0
  72. aethergraph/services/planning/plan_types.py +321 -0
  73. aethergraph/services/planning/planner.py +617 -0
  74. aethergraph/services/planning/planner_service.py +369 -0
  75. aethergraph/services/planning/planning_context_builder.py +43 -0
  76. aethergraph/services/planning/quick_actions.py +29 -0
  77. aethergraph/services/planning/routers/__init__.py +0 -0
  78. aethergraph/services/planning/routers/simple_router.py +26 -0
  79. aethergraph/services/rag/facade.py +0 -3
  80. aethergraph/services/scope/scope.py +30 -30
  81. aethergraph/services/scope/scope_factory.py +15 -7
  82. aethergraph/services/skills/__init__.py +0 -0
  83. aethergraph/services/skills/skill_registry.py +465 -0
  84. aethergraph/services/skills/skills.py +220 -0
  85. aethergraph/services/skills/utils.py +194 -0
  86. aethergraph/storage/artifacts/artifact_index_jsonl.py +16 -10
  87. aethergraph/storage/artifacts/artifact_index_sqlite.py +12 -2
  88. aethergraph/storage/docstore/sqlite_doc_sync.py +1 -1
  89. aethergraph/storage/memory/event_persist.py +42 -2
  90. aethergraph/storage/memory/fs_persist.py +32 -2
  91. aethergraph/storage/search_backend/__init__.py +0 -0
  92. aethergraph/storage/search_backend/generic_vector_backend.py +230 -0
  93. aethergraph/storage/search_backend/null_backend.py +34 -0
  94. aethergraph/storage/search_backend/sqlite_lexical_backend.py +387 -0
  95. aethergraph/storage/search_backend/utils.py +31 -0
  96. aethergraph/storage/search_factory.py +75 -0
  97. aethergraph/storage/vector_index/faiss_index.py +72 -4
  98. aethergraph/storage/vector_index/sqlite_index.py +521 -52
  99. aethergraph/storage/vector_index/sqlite_index_vanila.py +311 -0
  100. aethergraph/storage/vector_index/utils.py +22 -0
  101. {aethergraph-0.1.0a3.dist-info → aethergraph-0.1.0a4.dist-info}/METADATA +1 -1
  102. {aethergraph-0.1.0a3.dist-info → aethergraph-0.1.0a4.dist-info}/RECORD +107 -63
  103. {aethergraph-0.1.0a3.dist-info → aethergraph-0.1.0a4.dist-info}/WHEEL +1 -1
  104. aethergraph/plugins/agents/default_chat_agent copy.py +0 -90
  105. aethergraph/server/ui_static/assets/index-BR5GtXcZ.css +0 -1
  106. aethergraph/server/ui_static/assets/index-CQ0HZZ83.js +0 -400
  107. aethergraph/services/eventhub/event_hub.py +0 -76
  108. aethergraph/services/llm/generic_client copy.py +0 -691
  109. aethergraph/services/prompts/file_store.py +0 -41
  110. {aethergraph-0.1.0a3.dist-info → aethergraph-0.1.0a4.dist-info}/entry_points.txt +0 -0
  111. {aethergraph-0.1.0a3.dist-info → aethergraph-0.1.0a4.dist-info}/licenses/LICENSE +0 -0
  112. {aethergraph-0.1.0a3.dist-info → aethergraph-0.1.0a4.dist-info}/licenses/NOTICE +0 -0
  113. {aethergraph-0.1.0a3.dist-info → aethergraph-0.1.0a4.dist-info}/top_level.txt +0 -0
@@ -125,47 +125,6 @@ async def run_channel_incoming(
125
125
  raise HTTPException(status_code=500, detail=str(e)) from e
126
126
 
127
127
 
128
- async def _save_upload_as_artifact_deprecated(
129
- container, upload: UploadFile, session_id: str, identity: RequestIdentity
130
- ) -> str:
131
- """
132
- Streams upload to disk, saves as artifact, returns URI.
133
- """
134
- filename = upload.filename or "unknown"
135
- ext = ""
136
- if "." in filename:
137
- ext = f".{filename.split('.')[-1]}"
138
-
139
- # 1. Plan Staging
140
- tmp_path = await container.artifacts.plan_staging_path(
141
- planned_ext=f"_{uuid.uuid4().hex[:6]}{ext}"
142
- )
143
-
144
- # 2. Save Bytes
145
- with open(tmp_path, "wb") as buffer:
146
- shutil.copyfileobj(upload.file, buffer)
147
-
148
- # 3. Register Artifact
149
- artifact = await container.artifacts.save_file(
150
- path=tmp_path,
151
- kind="upload",
152
- run_id=f"session:{session_id}",
153
- graph_id="chat",
154
- node_id="user_input",
155
- tool_name="web.upload",
156
- tool_version="1.0.0",
157
- labels={
158
- "source": "web_chat",
159
- "original_name": filename,
160
- "session_id": session_id,
161
- "content_type": upload.content_type,
162
- },
163
- )
164
-
165
- # Return URI
166
- return getattr(artifact, "uri", None) or getattr(artifact, "path", None)
167
-
168
-
169
128
  async def _save_upload_as_artifact(
170
129
  container: Any,
171
130
  upload: UploadFile,
@@ -210,8 +169,8 @@ async def _save_upload_as_artifact(
210
169
  node_id="user_upload",
211
170
  tool_name="web.upload",
212
171
  tool_version="1.0.0",
213
- store=container.artifacts,
214
- index=container.artifact_index,
172
+ art_store=container.artifacts,
173
+ art_index=container.artifact_index,
215
174
  scope=scope,
216
175
  )
217
176
 
@@ -227,8 +186,9 @@ async def _save_upload_as_artifact(
227
186
  },
228
187
  )
229
188
 
230
- # Return URI (or local path fallback)
231
- return getattr(artifact, "uri", None) or getattr(artifact, "path", None)
189
+ return artifact
190
+ # # Return URI (or local path fallback)
191
+ # return getattr(artifact, "uri", None) or getattr(artifact, "path", None)
232
192
 
233
193
 
234
194
  @router.post("/sessions/{session_id}/chat/incoming")
@@ -274,15 +234,15 @@ async def session_chat_incoming(
274
234
  # 3. Process files -> IncomingFile (and save as artifacts)
275
235
  incoming_files: list[IncomingFile] = []
276
236
  for upload in files:
277
- uri = await _save_upload_as_artifact(container, upload, session_id, identity)
237
+ artifact = await _save_upload_as_artifact(container, upload, session_id, identity)
278
238
  incoming_files.append(
279
239
  IncomingFile(
280
240
  id=str(uuid.uuid4()),
281
241
  name=upload.filename,
282
242
  mimetype=upload.content_type,
283
243
  size=getattr(upload, "size", None),
284
- url=None,
285
- uri=uri,
244
+ url=f"/api/v1/artifacts/{artifact.artifact_id}/content",
245
+ uri=artifact.artifact_id, # 👈 use artifact_id here
286
246
  extra={
287
247
  "source": "web_upload",
288
248
  "session_id": session_id,
@@ -21,6 +21,8 @@ from aethergraph.core.runtime.runtime_services import (
21
21
  # llm service helpers
22
22
  get_llm_service,
23
23
  get_mcp_service,
24
+ # skill service helpers
25
+ get_skill_registry,
24
26
  # general service management
25
27
  install_services,
26
28
  list_ext_context_services,
@@ -30,6 +32,10 @@ from aethergraph.core.runtime.runtime_services import (
30
32
  register_context_service,
31
33
  register_llm_client,
32
34
  register_mcp_client,
35
+ register_skill,
36
+ register_skill_file,
37
+ register_skill_inline,
38
+ register_skills_from_path,
33
39
  set_channel_alias,
34
40
  set_default_channel,
35
41
  # mcp service helpers
@@ -54,6 +60,12 @@ __all__ = [
54
60
  "register_llm_client",
55
61
  "set_rag_llm_client",
56
62
  "set_rag_index_backend",
63
+ # skill service helpers
64
+ "get_skill_registry",
65
+ "register_skill",
66
+ "register_skill_file",
67
+ "register_skill_inline",
68
+ "register_skills_from_path",
57
69
  # logger service helpers
58
70
  "current_logger_factory",
59
71
  # external context service helpers
@@ -31,6 +31,7 @@ from aethergraph.core.runtime.runtime_services import install_services
31
31
  # import built-in agents and plugins to register them
32
32
  from aethergraph.plugins.agents.default_chat_agent import * # noqa: F403
33
33
 
34
+ # from aethergraph.plugins.agents.default_chat_agent_v2 import * # noqa: F403
34
35
  # channel routes
35
36
  from aethergraph.server.loading import GraphLoader, LoadSpec
36
37
  from aethergraph.services.container.default_container import build_default_container
@@ -218,6 +219,8 @@ def _load_user_graphs_from_env() -> None:
218
219
  if report.errors:
219
220
  for e in report.errors:
220
221
  print(f"⚠️ [worker load error] {e.source}: {e.error}")
222
+ if e.traceback:
223
+ print(e.traceback)
221
224
 
222
225
 
223
226
  def create_app_from_env() -> FastAPI: