[Feat] Render widgets in Fast session transcripts - #1707
Conversation
|
No new commits or code issues since the last review. See task
Reviewed 5ef77ee |
|
Resolved all review findings. 7eb643cf makes the widget guard measure persisted pretty JSON. 6be05f4a and 31d3ecef ship sanitizer dependencies through API externals and the standalone runtime tree. c722012d reads the DOMPurify version through its exported runtime entry instead of the blocked package subpath. Focused tests, API build/typecheck, runtime and parity expressions, lint, fast typechecks, and knip passed. Docker target execution was unavailable because this sandbox has no Docker daemon. |
daniel-lxs
left a comment
There was a problem hiding this comment.
Tested locally. Fast widget rendering, host-theme bridging, fixed-canvas sizing guidance, and shared worker/Fast contracts are verified.
What changed
show_widgetnative tool to Fast sessions.dompurifyandjsdomexternal to the API bundle and ships matching versions in the standalone API runtime dependency tree.textFallbackto Slack and Discord; raw HTML remains confined to the web transcript.Why this change was made
Fast agents could not use the first-party presentational widget capability already available to task sessions. Sharing the sanitizer and renderer avoids security drift and a second Fast-specific UI path, while explicit API externals keep the sanitizer dependencies resolvable in both development and shipped runtime builds.
Impact
Fast sessions can now display status cards, tables, plans, and other safe presentational HTML inline in the web transcript. Third-party or unmarked native tool output cannot opt into widget rendering, oversized widgets fail cleanly instead of persisting truncated invalid JSON, and the API bundle loads the sanitizer from its declared runtime dependency tree.
Validation
@roomote/apibuild and typecheck passed; the built bundle retains external imports fordompurifyandjsdom, and both resolve from the API and standalone runtime dependency directories.3.4.13from both dependency trees by resolving the exported runtime entry, without requiring the blockeddompurify/package.jsonsubpath.pnpm lintand pre-push checks passed.build-apitarget could not run because this sandbox has no Docker daemon;pnpm deployment:validatecompleted compose-shape validation before hitting the same daemon limitation.Ollamawas unreachable), so no screenshot is attached.