rayhpeng 9d0a42c1fb refactor(runtime): restructure runs module with new execution architecture
Major refactoring of deerflow/runtime/:
- runs/callbacks/ - new callback system (builder, events, title, tokens)
- runs/internal/ - execution internals (executor, supervisor, stream_logic, registry)
- runs/internal/execution/ - execution artifacts and events handling
- runs/facade.py - high-level run facade
- runs/observer.py - run observation protocol
- runs/types.py - type definitions
- runs/store/ - simplified store interfaces (create, delete, query, event)

Refactor stream_bridge/:
- Replace old providers with contract.py and exceptions.py
- Remove async_provider.py, base.py, memory.py

Add documentation:
- README.md and README_zh.md for runtime module

Remove deprecated:
- manager.py moved to internal/
- worker.py, schemas.py
- user_context.py

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-22 11:28:01 +08:00

49 lines
1.0 KiB
Python

"""Public runs API."""
from .facade import RunsFacade
from .internal.manager import RunManager
from .observer import (
CallbackObserver,
CompositeObserver,
LifecycleEventType,
NullObserver,
ObserverBinding,
ObserverLike,
RunEventCallback,
RunLifecycleEvent,
RunObserver,
RunResult,
ensure_observer,
)
from .store import RunCreateStore, RunDeleteStore, RunEventStore, RunQueryStore
from .types import CancelAction, RunRecord, RunScope, RunSpec, RunStatus, WaitResult
__all__ = [
# facade
"RunsFacade",
"RunManager",
"RunCreateStore",
"RunDeleteStore",
"RunEventStore",
"RunQueryStore",
# hooks
"CallbackObserver",
"CompositeObserver",
"LifecycleEventType",
"NullObserver",
"ObserverBinding",
"ObserverLike",
"RunEventCallback",
"RunLifecycleEvent",
"RunObserver",
"RunResult",
"ensure_observer",
# types
"CancelAction",
"RunRecord",
"RunScope",
"RunSpec",
"WaitResult",
"RunStatus",
]