Files
ClaudeDo/src/ClaudeDo.Worker/Runner/Interfaces/IClaudeStreamTransport.cs
T
Mika Kuns d8a043fae7 feat(worker): persistent streaming Claude session + live session registry
StreamingClaudeSession drives claude --input-format stream-json over a kept-
open stdin: sends user messages, interrupts the in-flight turn via the verified
control_request protocol, and tracks turn state from result events (treating an
interrupt-aborted error_during_execution result as turn-ended). IClaudeStreamTransport
abstracts the process I/O so it is unit-tested with a fake (no real claude).
LiveSessionRegistry maps taskId -> live session for the hub to route into.

Backs the upcoming in-app interactive sessions; autonomous task execution untouched.
2026-06-26 16:11:52 +02:00

12 lines
405 B
C#

namespace ClaudeDo.Worker.Runner.Interfaces;
public interface IClaudeStreamTransport : IAsyncDisposable
{
Task StartAsync(IReadOnlyList<string> args, string workingDirectory, CancellationToken ct);
Task WriteLineAsync(string jsonLine, CancellationToken ct);
event Func<string, Task>? LineReceived;
event Func<string, Task>? StderrReceived;
void Kill();
Task WaitForExitAsync();
}