Expand description
TaskLaunchService — the domain service that runs a Blueprint flow
to completion through the engine.
Responsibilities:
- Compile the Blueprint and link it into a
SpawnerAdapter(viaservice::linker::link, wrapped byEngineDispatcher::with_spawner). - Acquire an Operator session (via
engine.attach). - Run flow.ir’s
eval_async_externsthrough anEngineDispatcher(threading the service-heldcall_externregistry) and return the finalctx. - If any step fails (dispatcher error), the eval errors and the failure propagates as-is.
Callers on the Application layer never touch the engine directly —
bind, start_task, and eval_async all stay inside the Service.
A single-task-spawn API (calling start_task directly) is
deliberately absent here: a single spawn can be modeled as a
one-Step flow, and we do not want two interfaces for the same
shape.
Structs§
- Task
Input Spec - Canonical bag of Task-level fields (
project_root/work_dir/task_metadata) —TaskLaunchInput::task_input’s type. - Task
Launch Input - Input to
TaskLaunchService::launch. - Task
Launch Output - Result of a successful
TaskLaunchService::launchcall. - Task
Launch Service - Domain service that compiles, links, and runs a Blueprint’s flow to
completion through the
Engine. See the module doc for the full responsibility list.
Enums§
- Task
Launch Error - Failure modes of
TaskLaunchService::launch.
Functions§
- merge_
init_ ctx_ 3layer - Issue #19 ST4: 3-layer shallow-merge of the init-ctx cascade — BP
default → Task → Run (lowest to highest priority). Built by chaining
[
merge_init_ctx] twice rather than introducing a distinct 3-way merge algorithm, so the Run layer inherits exactly the same “shallow Object merge, non-Object fully replaces” rule [merge_init_ctx] already established for the BP/Task pair (see its doc for the full semantics).