Refactor project structure and enhance backend integration
- Expanded package inclusion in `pyproject.toml` to support new modules. - Introduced new `adapters` and `protocol` packages for better organization. - Added backend adapter implementations for control plane integration. - Updated main application imports to reflect new package structure. - Removed deprecated core components and adjusted documentation accordingly. - Enhanced architecture documentation to clarify the new runtime and integration layers.
This commit is contained in:
1
engine/runtime/session/__init__.py
Normal file
1
engine/runtime/session/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""Runtime session package."""
|
||||
10
engine/runtime/session/lifecycle.py
Normal file
10
engine/runtime/session/lifecycle.py
Normal file
@@ -0,0 +1,10 @@
|
||||
"""Lifecycle helper utilities for runtime sessions."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import datetime, timezone
|
||||
|
||||
|
||||
def utc_now_iso() -> str:
|
||||
"""Return current UTC timestamp in ISO 8601 format."""
|
||||
return datetime.now(timezone.utc).isoformat()
|
||||
1229
engine/runtime/session/manager.py
Normal file
1229
engine/runtime/session/manager.py
Normal file
File diff suppressed because it is too large
Load Diff
9
engine/runtime/session/metadata.py
Normal file
9
engine/runtime/session/metadata.py
Normal file
@@ -0,0 +1,9 @@
|
||||
"""Metadata helpers extracted from session manager."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import re
|
||||
from typing import Pattern
|
||||
|
||||
DYNAMIC_VARIABLE_KEY_RE: Pattern[str] = re.compile(r"^[a-zA-Z_][a-zA-Z0-9_]{0,63}$")
|
||||
DYNAMIC_VARIABLE_PLACEHOLDER_RE: Pattern[str] = re.compile(r"\{\{\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*\}\}")
|
||||
12
engine/runtime/session/workflow_bridge.py
Normal file
12
engine/runtime/session/workflow_bridge.py
Normal file
@@ -0,0 +1,12 @@
|
||||
"""Workflow bridge helpers for runtime session orchestration."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Optional
|
||||
|
||||
from workflow.runner import WorkflowRunner
|
||||
|
||||
|
||||
def has_active_workflow(workflow_runner: Optional[WorkflowRunner]) -> bool:
|
||||
"""Return whether a workflow runner exists and has a current node."""
|
||||
return bool(workflow_runner and workflow_runner.current_node is not None)
|
||||
Reference in New Issue
Block a user