xml-pipeline/bloxserver/runtime/__init__.py
dullfig a69eae79c5 Add FlowRunner - execution bridge for BloxServer flows
FlowRunner connects Flow domain model to xml-pipeline's StreamPump:

- Lifecycle management: start(), stop() with state tracking
- Flow → OrganismConfig conversion: nodes become listeners
- Trigger handling: webhook, schedule, manual triggers
- Message injection: inject() to specific nodes, trigger() by trigger ID
- Execution tracking: events log, status reporting, message counting

States: CREATED → STARTING → RUNNING → STOPPING → STOPPED (or ERROR)

Usage:
    runner = FlowRunner(flow)
    await runner.start()
    thread_id = await runner.trigger("webhook_id", payload)
    await runner.stop()

Known limitation: Tool nodes need adapter wrappers to convert
@tool decorator (ToolResult) to handler pattern (HandlerResponse).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 22:20:59 -08:00

13 lines
288 B
Python

"""
BloxServer Runtime — Flow execution engine.
This module bridges BloxServer flows to xml-pipeline's StreamPump.
"""
from bloxserver.runtime.flow_runner import FlowRunner, FlowRunnerState, ExecutionEvent
__all__ = [
"FlowRunner",
"FlowRunnerState",
"ExecutionEvent",
]