runStream abstract method

Stream<MissionEvent> runStream(
  1. Mission mission, {
  2. String? systemPrompt,
  3. LlmClient? llmClient,
  4. ToolInvoker? invokeTool,
})

Streams typed events for mission. The kernel orchestrates the tool registry + hooks around this call and supplies:

  • systemPrompt — composed by SystemPromptComposer from the playbook and the registry tool manifests (FR-006). Implementations MUST use it as the system message of the loop.
  • llmClient — the client wired by AgentRuntimePlugin (FR-007). The loop owns the completion calls; the kernel makes none itself.
  • invokeTool — hook-gated tool invocation (FR-010). Implementations MUST route tool calls through it rather than calling McpTool.invoke directly.

Implementation

Stream<MissionEvent> runStream(
  Mission mission, {
  String? systemPrompt,
  LlmClient? llmClient,
  ToolInvoker? invokeTool,
});