feat(interactive): worker launch-spec for embedded ConPTY sessions

Adds InteractiveLaunchSpecService + GetInteractiveLaunchSpec hub method that
prepares a task worktree (session-skills seeding, run env) and returns a
LaunchSpec {cwd,exe,args,env} for a UI-hosted ConPTY terminal. Reuses
ISessionSkillSeeder, TaskRunner.UnionSkillNames, and WindowsTerminalLauncher
resume-arg/resolve logic. Guards mirror ResumeTaskInTerminal; a never-run task
yields a fresh-start spec instead of an error.
This commit is contained in:
mika kuns
2026-07-23 16:47:15 +02:00
parent d91ad2d635
commit 1245e75902
11 changed files with 408 additions and 3 deletions
@@ -0,0 +1,10 @@
namespace ClaudeDo.Worker.Runner;
public interface IInteractiveLaunchSpecService
{
/// <summary>Builds a LaunchSpec for opening an interactive session in an existing task's
/// worktree. Throws KeyNotFoundException if the task doesn't exist, InvalidOperationException
/// if it's Running/Queued or has no usable worktree. A task that has never run (no persisted
/// SessionId) is not an error -- the spec omits --resume for a fresh start.</summary>
Task<LaunchSpec> BuildForTaskAsync(string taskId, CancellationToken ct);
}