feat(walkthrough): build the change walkthrough in a spawned agent session

Replace the fixed, stop-based walkthrough with an agent-built one. Every
request (Generate, Update, Regenerate, /walkthrough, the multi-run button
and the agent's open_walkthrough) now spawns a separate walkthrough
session. That session reads the diff through a new walkthrough_changes
action, writes one self-contained HTML file into a Manager-owned
directory, and calls publish_walkthrough; the panel renders the file in a
sandboxed frame shared with the inline artifact card and the file browser
HTML preview.

Publication marks the walkthrough ready while execution is tracked
separately, so Stop, the 15-minute limit, polling, refine gating and
interruption when the target session is deleted follow the agent instead
of the first publish. One diff copy is reused per run. Regenerate
interrupts the previous session and removes its output directory.

Walkthrough sessions are kept and listed, with their completion and error
push notifications muted. The stop pipeline, its wire schemas and the
concurrency limiter it used are removed.
This commit is contained in:
Chris Scott committed 2026-10-16 03:58:31 +00:00
1 parent be874ee07c
commit 0b637cadf4
42 files changed
+3648 -4998

No files matched your search

@@ -77,16 +77,6 @@ describe('generateTextWithTimeout', () => {
expect(calls[0]?.input.model).toEqual({ providerID: 'openai', id: 'gpt-5-mini' })
})
it('forwards the model when provided without reading the catalog', async () => {
const { client, calls, modelList } = makeClient(async () => ({ text: 'hello' }))
const model: ModelRef = { providerID: 'anthropic', id: 'claude-sonnet-4' }
await generateTextWithTimeout(client, { prompt: 'write', model }, 1000)
expect(calls[0]?.input).toEqual({ prompt: 'write', model })
expect(modelList).not.toHaveBeenCalled()
})
it('rejects with GenerateTextTimeoutError and aborts the request after the timeout', async () => {
vi.useFakeTimers()
const { client, calls } = makeClient(() => new Promise<never>(() => {}))