Skip to content

Commit 91d1ce0

Browse files
committed
ref: Replace ProgressEvent with DomainFragment streaming model
Retire the ProgressEvent union in favor of DomainFragment types that share the `kind` discriminator with their corresponding final domain result, so streaming partial updates and final results are part of the same model family and no longer require a separate UI event model at the tool layer. Introduce `src/types/domain-fragments.ts` for tool-level fragments (invocation, build/test/run stages, compiler diagnostics, etc.) and `src/types/runtime-status.ts` for infrastructure-level status fragments. Renderers translate fragments to presentation output, keeping tools free of rendering concerns. Add a `raw` render strategy plus `src/rendering/render-items.ts` to stream transcript-kind fragments (process-command, process-line) straight to stderr while still rendering the final domain result on stdout. Extract app lifecycle and app-query domain shapes into dedicated modules (`utils/app-lifecycle-results.ts`, `utils/app-query-results.ts`) and add `utils/transcript-context.ts` for shared transcript hooks. Migrate every MCP tool, daemon path, CLI renderer, and test fixture to the fragment model, rename `getEvents`/`renderEvents` to `getFragments`/`renderFragments`, and drop the now-unused `tool-error-handling.ts`, `tool-event-builders.ts`, and `types/progress-events.ts`. Remove the outdated `DOMAIN_RESULT_OUTPUT_ARCHITECTURE.md` doc and the two smoke tests (`e2e-mcp-doctor`, `e2e-mcp-simulator`) superseded by snapshot coverage.
1 parent b54ded4 commit 91d1ce0

144 files changed

Lines changed: 3182 additions & 4731 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/dev/DOMAIN_RESULT_OUTPUT_ARCHITECTURE.md

Lines changed: 0 additions & 387 deletions
This file was deleted.

0 commit comments

Comments
 (0)