abstractgateway 0.1.0__py3-none-any.whl → 0.1.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.
Files changed (40) hide show
  1. abstractgateway/__init__.py +1 -2
  2. abstractgateway/__main__.py +7 -0
  3. abstractgateway/app.py +4 -4
  4. abstractgateway/cli.py +568 -8
  5. abstractgateway/config.py +15 -5
  6. abstractgateway/embeddings_config.py +45 -0
  7. abstractgateway/host_metrics.py +274 -0
  8. abstractgateway/hosts/bundle_host.py +528 -55
  9. abstractgateway/hosts/visualflow_host.py +30 -3
  10. abstractgateway/integrations/__init__.py +2 -0
  11. abstractgateway/integrations/email_bridge.py +782 -0
  12. abstractgateway/integrations/telegram_bridge.py +534 -0
  13. abstractgateway/maintenance/__init__.py +5 -0
  14. abstractgateway/maintenance/action_tokens.py +100 -0
  15. abstractgateway/maintenance/backlog_exec_runner.py +1592 -0
  16. abstractgateway/maintenance/backlog_parser.py +184 -0
  17. abstractgateway/maintenance/draft_generator.py +451 -0
  18. abstractgateway/maintenance/llm_assist.py +212 -0
  19. abstractgateway/maintenance/notifier.py +109 -0
  20. abstractgateway/maintenance/process_manager.py +1064 -0
  21. abstractgateway/maintenance/report_models.py +81 -0
  22. abstractgateway/maintenance/report_parser.py +219 -0
  23. abstractgateway/maintenance/text_similarity.py +123 -0
  24. abstractgateway/maintenance/triage.py +507 -0
  25. abstractgateway/maintenance/triage_queue.py +142 -0
  26. abstractgateway/migrate.py +155 -0
  27. abstractgateway/routes/__init__.py +2 -2
  28. abstractgateway/routes/gateway.py +10817 -179
  29. abstractgateway/routes/triage.py +118 -0
  30. abstractgateway/runner.py +689 -14
  31. abstractgateway/security/gateway_security.py +425 -110
  32. abstractgateway/service.py +213 -6
  33. abstractgateway/stores.py +64 -4
  34. abstractgateway/workflow_deprecations.py +225 -0
  35. abstractgateway-0.1.1.dist-info/METADATA +135 -0
  36. abstractgateway-0.1.1.dist-info/RECORD +40 -0
  37. abstractgateway-0.1.0.dist-info/METADATA +0 -101
  38. abstractgateway-0.1.0.dist-info/RECORD +0 -18
  39. {abstractgateway-0.1.0.dist-info → abstractgateway-0.1.1.dist-info}/WHEEL +0 -0
  40. {abstractgateway-0.1.0.dist-info → abstractgateway-0.1.1.dist-info}/entry_points.txt +0 -0
@@ -6,7 +6,7 @@ from dataclasses import dataclass
6
6
  from pathlib import Path
7
7
  from typing import Any, Dict, Optional
8
8
 
9
- from abstractruntime import Runtime
9
+ from abstractruntime import Runtime, persist_workflow_snapshot
10
10
 
11
11
 
12
12
  logger = logging.getLogger(__name__)
@@ -129,6 +129,7 @@ class VisualFlowGatewayHost:
129
129
  input_data: Dict[str, Any],
130
130
  actor_id: str = "gateway",
131
131
  bundle_id: Optional[str] = None,
132
+ session_id: Optional[str] = None,
132
133
  ) -> str:
133
134
  # bundle_id is ignored for VisualFlow sources (kept for API compatibility with bundle mode).
134
135
  del bundle_id
@@ -155,7 +156,34 @@ class VisualFlowGatewayHost:
155
156
  artifact_store=self._artifact_store,
156
157
  tool_executor=tool_executor,
157
158
  )
158
- return str(vis_runner.start(data, actor_id=actor_id))
159
+ sid = str(session_id).strip() if isinstance(session_id, str) and session_id.strip() else None
160
+ run_id = str(vis_runner.start(data, actor_id=actor_id, session_id=sid))
161
+
162
+ # Persist a workflow snapshot for reproducible replay (best-effort).
163
+ try:
164
+ flow_dict = None
165
+ try:
166
+ to_dump = getattr(visual_flow, "model_dump", None)
167
+ if callable(to_dump):
168
+ flow_dict = to_dump()
169
+ else:
170
+ flow_dict = dict(visual_flow) if isinstance(visual_flow, dict) else None
171
+ except Exception:
172
+ flow_dict = None
173
+ if isinstance(flow_dict, dict):
174
+ snapshot = {"kind": "visualflow_json", "flow_id": fid, "visualflow": flow_dict}
175
+ persist_workflow_snapshot(
176
+ run_store=self._run_store,
177
+ artifact_store=self._artifact_store,
178
+ run_id=str(run_id),
179
+ workflow_id=str(fid),
180
+ snapshot=snapshot,
181
+ format="visualflow_json",
182
+ )
183
+ except Exception:
184
+ pass
185
+
186
+ return run_id
159
187
 
160
188
  def runtime_and_workflow_for_run(self, run_id: str) -> tuple[Runtime, Any]:
161
189
  """Return (runtime, workflow_spec) for the given run, ensuring derived VisualFlow workflows are registered."""
@@ -210,4 +238,3 @@ class VisualFlowGatewayHost:
210
238
  if wf is None:
211
239
  raise KeyError(f"Workflow '{workflow_id}' not registered")
212
240
  return (runtime, wf)
213
-
@@ -0,0 +1,2 @@
1
+ """Optional external integrations for AbstractGateway."""
2
+