Repository navigation
✨ feat: HTML output mode (reveal.js) - #469
Merged
Merged
Conversation
* ✨ feat(html-output-mode): add deck.json outputFormat and init_deck_workspace(output_format) deck_output_format() / OUTPUT_FORMATS in engine/schema; validate_specs errors on a bad outputFormat and adds "outputFormat": "html" to the result only for HTML decks. api.init / init_deck_workspace / CLI init_deck_workspace --output-format write the field only for html; PPTX deck.json and check_specs results are unchanged. Verified: SDPM_AUTO_INSTALL_ASSETS=0 uv run pytest tests/test_deck_spec.py tests/test_tool_descriptions.py tests/test_entry_tools.py tests/test_cli_contract.py -q (83 passed) SPEC: 20261029-1619_html-output-mode Progress: tasks 4.1 (init part, outputFormat field) Next: FEAT-001 template conversion (tasks 1.1-1.6) * ✨ feat(html-output-mode): convert pptx templates to theme.css, template.json and decoration SVGs New core package sdpm/sdpm/engine/html/: textstyle.py resolves placeholder text styles through layout -> master placeholder -> txStyles -> defaultTextStyle; decorations.py computes decoration boxes/kinds and layout grounds from the XML and renders decoration-only SVGs via LibreOffice PDF + pdftocairo with a sentinel ground (stripped, together with the PDF page underlay); template.py builds theme.css / template.json, caches them per content hash and prefers the bundled artifacts. Missing LibreOffice/poppler only drops the decorations (decorations_status in the preview_unavailable shape). Bundled artifacts for blank-light / blank-dark under sdpm/templates/html/, generated by scripts/build_bundled_template_html.py (drift-guarded by tests). Verified: SDPM_AUTO_INSTALL_ASSETS=0 uv run pytest tests/test_deck_spec.py tests/test_html_template.py tests/test_architecture.py tests/test_entry_tools.py -q (175 passed, LO-gated render test ran locally); uv run make lint (clean); SDPM_AUTO_INSTALL_ASSETS=0 uv run pytest tests/ -q (1270 passed, 26 skipped) SPEC: 20261029-1619_html-output-mode Progress: tasks 1.1-1.6 (template conversion, bundled artifacts, tests) Next: FEAT-002 (reveal.js vendoring + HTML assembly) * ✨ feat(html-output-mode): assemble offline reveal.js output.html with static checks Vendor reveal.js 6.0.2 under sdpm/vendor/revealjs (MIT, update procedure in sdpm/vendor/README.md, VENDOR_DIR anchor, THIRD-PARTY-LICENSES entry). engine/html/assemble.py builds one self-contained output.html (style :root, theme.css, one decoration SVG background per used layout, deck.css once, slide styles nested under section[data-slug], inline SVG icons and data-URI images, slide-number/footer chrome, inline reveal.js + notes plugin). engine/html/check.py adds the browser-free checks (--fs-* lint for slides and deck.css, structure, data-layout, script, external-url, data-background, self-chrome, :root, data-slug) and the html preview note. sdpm.api gains generate_html / refresh_html; affected_slugs(..., html=True) treats specs/art-direction.html and deck.css as deck-wide. Verified: targeted pytest (html_assemble/check/api, render_scope) 79 passed; uv run make lint clean; full suite 1341 passed, 26 skipped. SPEC: 20261029-1619_html-output-mode Progress: tasks 2.1-2.4, 2.6, 3.1, 3.2, 3.4 (3.3 helper html_preview_unavailable) Next: FEAT-003 role documents (composer-html.md, slide-html-spec.md, orchestrator) * 📝 docs(html-output-mode): add composer-html role document and slide HTML guide Add workflows/composer-html.md (composer html mode, layout pass writes deck.css + frames + empty data-region boxes) and guides/slide-html-spec.md; orchestrator picks HTML only on explicit request / @Format:html and passes mode in the spawn prompt; ACP composer prompt and server instructions name start_composing(deck_id, assigned_slugs, mode); import-pptx, hand-edit-sync and translate say PPTX decks only; principles.md rule 4 and AGENTS.md describe one document per composer mode chosen by the spawner. composer.md is unchanged. Verified: pytest test_reference/test_acp_agent_definitions/ test_tool_descriptions/test_entry_tools/test_agent_modes 87 passed; make lint clean; full suite 1341 passed, 26 skipped. SPEC: 20261029-1619_html-output-mode Progress: tasks 2.5, 2.5b, 4.2 (plan step 9, FEAT-003) Next: FEAT-004 start_composing(mode) wiring, run_python HTML branch, guards * ✨ feat(html-output-mode): start_composing mode, run_python HTML branch and CLI generate_html start_composing(mode="pptx"|"html") picks the composer document and slide spec by mode; a mode that does not match deck.json outputFormat returns specs_ok=false with the deck's format. HTML payloads carry slide HTML, deck_css and template_html. The PPTX payload is byte-identical to main. generate_pptx, code_to_slide, start_translation and diff refuse HTML decks. Local run_python rebuilds output.html through sdpm.api.refresh_html for HTML decks; the CLI gains generate_html and start composing --mode, and measure / preview accept HTML decks. Verified: targeted pytest (entry_tools, run_python_semantics, cli_contract, tool_descriptions, acp_agent_definitions, agent_modes, architecture) 229 passed; uv run make lint clean; full suite 1358 passed, 26 skipped; servers/remote no diff. SPEC: 20261029-1619_html-output-mode Progress: tasks 3.3, 4.1, 4.3 (local; remote unchanged by design), 4.4 tests part Next: FEAT-005 docs (architecture.md tool table, CHANGELOG, en/ja) + validation * 📝 docs(html-output-mode): document HTML decks and record phase 1 validation Architecture tool table (start_composing mode, init_deck_workspace output_format, generate_pptx no-op on HTML decks), HTML deck sections in getting-started en/ja, HTML template conversion in custom-template, CHANGELOG [Unreleased] entry. .ash.yaml: suppress SECRET-HEX-HIGH-ENTROPY-STRING for the sourceHash content hash in sdpm/templates/html/*/template.json. Verified: uv run make lint (pass); SDPM_AUTO_INSTALL_ASSETS=0 uv run make test (1358 passed, 26 skipped); uv run python /tmp/sdpm-html-v1/run.py (V1/V3 all OK); ash scan --mode local --fail-on-findings exit 2 — only npm-audit findings on web-ui/infra package-lock.json, unchanged from main. SPEC: 20261029-1619_html-output-mode Progress: 4.4, 4.5, V1, V3, V4 done; V2 awaits manual browser check; V5 blocked by pre-existing npm-audit findings Next: phase 2 (cloud) * 🐛 fix(html-output-mode): position data-region boxes absolutely in output.html design.md §4 writes regions as `<div data-region="body" style="left:…;top:…">` without `position`; the assembler only made data-ph (theme.css) and chrome absolute, so such regions landed in normal flow. The deck rules now set `[data-sdpm-chrome],[data-region]{position:absolute}` (slide styles and inline style still override). slide-html-spec.md says so instead of asking composers to add it themselves. Verification (cross-FEAT integration, iteration 1): - uv run make lint: All checks passed - SDPM_AUTO_INSTALL_ASSETS=0 uv run make test: 1359 passed, 26 skipped (a pre-fix run under load average >120 had a timing flake in tests/test_webp_background.py; untouched remote code, passes alone x3) - SDPM_AUTO_INSTALL_ASSETS=0 uv run python /tmp/sdpm-html-v1/run.py (V1-V3): ALL CHECKS PASSED (blank-light 285067 B, blank-dark 285321 B, aws-brand-dark 886259 B; V3 reports every rule) - ash scan --mode local --fail-on-findings: exit 2, only npm-audit 89 findings in web-ui/infra package-lock.json (identical to main, accepted as pre-existing); bandit, checkov, semgrep, detect-secrets PASSED SPEC: 20261029-1619_html-output-mode Progress: cross-FEAT integration of FEAT-001..005 (tasks 2.2/2.5 seam) Next: review iteration; V2 manual browser check by the user * 🐛 fix(html-output-mode): hoist slide at-rules, lower placeholder specificity, embed all resource refs - Slide <style>: @keyframes/@font-face/@property/@counter-style are emitted outside the section[data-slug] nesting; keyframes renamed sdpm-<slug>-<name> with that slide's animation / animation-name values (style and inline) - parse_slide treats a nested <section> as a structure error, so the slide is skipped as slide-html-spec.md documents - theme.css placeholder rules use :where(section[data-layout=...]) (0,1,0): deck.css classes and slide styles now override them; CONVERTER_VERSION 2, bundled blank-light/blank-dark theme.css/template.json regenerated (SVGs unchanged) - local _build_snapshot watches slides/*.html only for HTML decks (PPTX path as main) - srcset, <object data>, <link href>, SVG <image href>/xlink:href and CSS image-set("...") strings are embedded; external-url check covers image-set() - load_slides_json_or_pptx HTML guard reads deck.json as UTF-8 - slide-html-spec.md: `&`, at-rule hoisting, override precedence, embedded positions Verification: - uv run make lint: pass - SDPM_AUTO_INSTALL_ASSETS=0 uv run make test: 1364 passed, 26 skipped - uv run python /tmp/sdpm-html-v1/run.py (V1-V3): ALL CHECKS PASSED - ash scan --mode local --fail-on-findings: exit 2, only the 89 pre-existing npm-audit findings in web-ui/infra lockfiles (identical to main, accepted); bandit, checkov, semgrep, detect-secrets PASSED SPEC: 20261029-1619_html-output-mode Progress: review findings 1-4, 6, 7 fixed; 5 recorded as a phase 2 prerequisite in tasks.md Next: V2 manual browser check (speaker view, ?print-pdf, offline) by the user * 🐛 fix(html-output-mode): keep deck SVGs inert, stop embedding linked CSS, warn on large output - Inline only assets: catalog icons; deck-relative SVG files stay data:image/svg+xml images (src, srcset, url(), poster), so their scripts, handlers and external refs never run - Do not embed <link rel=stylesheet>; check.py warns "put shared rules in deck.css" - Static checks: <iframe>/<frame>/<object>/<embed> (script), external url() in any attribute (SVG fill/filter...), javascript: in SVG animation to/from/values; foreignObject content tested - Size warnings: one embedded file over 5 MB, output.html over 25 MB (constants in assemble.py) - slide-html-spec.md: correct placeholder override precedence, drop <object data>/<link href> from embedded positions, document deck SVG handling and size warnings; CHANGELOG note Verification: - uv run make lint: All checks passed - SDPM_AUTO_INSTALL_ASSETS=0 uv run make test: 1383 passed, 26 skipped - SDPM_AUTO_INSTALL_ASSETS=0 uv run python /tmp/sdpm-html-v1/run.py: ALL CHECKS PASSED (V1/V3) - ash scan --mode local --fail-on-findings: exit 2, only npm-audit 89 in web-ui/infra node_modules lockfiles (unchanged from main, accepted in V5); 0 findings in own code SPEC: 20261029-1619_html-output-mode Progress: converge pass 3 — review pass 2 findings 1-3 fixed per user decisions; V2 confirmed by user Next: re-review; phase 2 (cloud, fail-closed assembly) * 🧹 cleanup(html-output-mode): drop notes that repeat what the code already reports Remove the "PPTX decks only" lines from translate.md, import-pptx.md and hand-edit-sync.md, the HTML sentence in the generate_pptx docstring and the architecture.md tool table: the refusals and the generate_pptx message say it at the point of need. Drop two redundant orchestrator.md phrases and shorten the deck.css missing-component procedure. SPEC: 20261029-1619_html-output-mode Progress: phase 1 PR #440 review cleanup Next: CI and review on PR #440 * 🐛 fix(html-output-mode): scan leading CSS comments linearly instead of a backtracking regex CodeQL py/redos flagged `\s*(?:/\*.*?\*/\s*)*@([\w-]+)` (DOTALL): on "/*" followed by many "*//*" and no "@" it backtracks exponentially. Skip whitespace and comments with a linear scan and match only `@name` with a regex. Adds a regression test with the CodeQL input. SPEC: 20261029-1619_html-output-mode Progress: PR #440 code-scanning fix Next: CI and review on PR #440 * ♻️ refactor(html-output-mode): convert templates on first use only, add vendored license notices - Drop the pre-converted artifacts under sdpm/templates/html/ and their build script and drift test. Every template, bundled or not, is converted on first use into the cache. The bundled blank templates draw nothing but placeholders, so their 22 committed decoration SVGs were empty. - Render decoration SVGs only for layouts that draw more than placeholders (shapes, or a baked ground). A template without any never calls LibreOffice and reports nothing. - Remove the .ash.yaml suppression that existed only for the committed template.json. - THIRD-PARTY-LICENSES lists marked, which reveal.js bundles into the notes plugin. output.html prefixes the reveal.js CSS and the notes plugin with their MIT notices. - Tests write template conversions to a temp cache instead of the checkout. SPEC: 20261029-1619_html-output-mode Progress: PR #440 review follow-ups (bundling, licenses) Next: CI and review on PR #440
* 🔒 feat(html-output-mode): CSP, static thumbnails and new checks for HTML decks - output.html: CSP meta right after <meta charset> (sha256 of reveal.js, notes plugin, config script and the speaker view notes.js writes; frame-src 'self'), then referrer no-referrer. Config script routes speaker-view receivers and print view through the URL fragment (#sdpm-receiver, #print-pdf) so presigned URLs keep their signed query. Vendored reveal.js unchanged. - preview/<slug>.html per built slide (script-src 'none', own section and CSS, fragments shown); stale ones removed, PNGs left alone; `previews` in generate_html / refresh_html results. - Static checks: javascript: inside SVG animation `values` (script), non-fragment <use href> (external-use), every <link rel=stylesheet> / @import incl. data: (external-url, the CSP blocks them). slide-html-spec.md rule table updated. - Core helpers for the cloud adapters: sdpm.engine.html.text.slide_text_summary, api.html_slide_texts, assemble.collect_refs + api.html_deck_refs, template_cache= on generate_html / refresh_html, entry.template_html_view, start_composing(template_html=), schema.new_deck_json / is_html_build_input. PPTX deck.json byte-identical. Verified: SDPM_AUTO_INSTALL_ASSETS=0 uv run pytest tests/test_html_csp.py tests/test_html_assemble.py tests/test_html_api.py tests/test_html_check.py tests/test_html_text.py tests/test_entry_tools.py tests/test_deck_spec.py -q -> 228 passed; uv run make lint -> All checks passed; SDPM_AUTO_INSTALL_ASSETS=0 uv run make test -> 1446 passed, 26 skipped. SPEC: 20261029-1619_html-output-mode Progress: phase 2 tasks 1.1-1.4 done (FEAT-001) Next: FEAT-002 remote MCP + L4 agent (tasks 2.1-2.4, 3.1-3.2) * ☁️ feat(html-output-mode): remote MCP and L4 agent support for HTML decks Remote MCP (tasks 2.1-2.4): - shared/html_artifacts.py: S3 key layout (html/{deck}/{uuid}.html, html/{deck}/preview/{slug}_{epoch}.html, template-html-cache/{key}/ allowlist) - init_deck_workspace(output_format) via new_deck_json; start_composing(mode) materialises slides/*.html + deck.css and passes template_html (S3 cache) - run_python: HTML decks rebuild output.html through sdpm.api.refresh_html, upload it under a new uuid key (text/html; charset=utf-8), point htmlS3Key at it, delete the superseded key, upload previews for affected / measured / missing slides with one epoch; PPTX post-processing untouched - generate_pptx: HTML decks finalize as HTML (all previews, record, thumbnailS3Key = slide 1, KB sync of the slides' text) - get_preview: HTML decks return a text note - template_html_cache: restore / persist the template conversion on S3 - tools/generate.py: materialize_template / materialize_assets factored out of _prepare_workspace (PPTX behaviour unchanged) L4 agent (tasks 3.1-3.2): - MODES["html_composer"] = start_composing(mode=html) static parts - compose_slides dispatches it for outputFormat html with mode html in the start_composing call and its replay; PPTX arguments unchanged - wiring/compose_report.md: cloud note for HTML decks Verification: - uv run pytest tests/test_html_artifacts.py tests/test_remote_html.py tests/test_mcp_generate.py tests/test_run_python_semantics.py tests/test_webp_background.py tests/test_tool_descriptions.py tests/test_entry_tools.py -q -> 138 passed - uv run pytest tests/test_agent_modes.py tests/test_compose_spec_guard.py tests/test_mcp_session_affinity.py -q -> 33 passed, 5 skipped (strands not installed) - uv run make lint -> All checks passed - SDPM_AUTO_INSTALL_ASSETS=0 uv run make test -> 1485 passed, 26 skipped SPEC: 20261029-1619_html-output-mode Progress: phase 2 tasks 1.1-1.4, 2.1-2.4, 3.1-3.2 done Next: FEAT-003 API Lambda presigned URLs + infra lifecycle (task 4.1) * 🔐 feat(html-output-mode): presigned HTML URLs and HTML-aware deck API - api/html_presign.py (new, pure): PURPOSES present=14400 / download=900, VIEW_EXPIRY=900, safe_download_name, presign_params (text/html; charset=utf-8, inline | attachment with ASCII + RFC 5987 names; only html/**.html keys), regional virtual-host SigV4 client factory, deck.json helpers. - api/index.py: GET /decks/<deck_id>/html?purpose=present|download (authorize read -> 403, bad purpose -> 400, no htmlS3Key -> 404, {url, expiresIn}); get_deck returns outputFormat/htmlUrl/slideSize and HTML previewUrls for HTML decks (PPTX path unchanged, helpers extracted); .html thumbnails and search hits resolve through S3 presign, never CloudFront. - infra/lib/data-stack.ts: template-html-cache/ lifecycle (30 d, noncurrent 7 d). No html/* CloudFront behaviour or OAC grant; Block Public Access unchanged. Verification: - uv run pytest tests/test_api_html_presign.py tests/test_html_artifacts.py tests/test_authz.py -q: 81 passed - uv run make lint: All checks passed - cd infra && npx tsc --noEmit: exit 0 (after npm@10.8.2 ci, lockfile untouched) - SDPM_AUTO_INSTALL_ASSETS=0 uv run make test: 1541 passed / 26 skipped SPEC: 20261029-1619_html-output-mode Progress: phase 2 task 4.1 API half (FEAT-003) Next: FEAT-004 Web UI + i18n (4.1 UI half, 4.2-4.5) * ✨ feat(html-output-mode): Web UI for HTML decks - Format choice: `@format:html` joins the slash-token grammar (kind "format", section order 2); the `/` picker gets a "Format" section with HTML (also offered when the template/style fetch fails); the input shows an "HTML ×" chip and sent messages an "HTML" chip. New HtmlFormatPill ("Build as HTML" / 「HTML で作成」) under ModeSelector on the initial screen: aria-pressed comes from the input text only and it toggles the token via the new ChatInputHandle.replaceText. ChatInput now reports every programmatic change (picker insert, example prompt, send reset) through onInputChange. PPTX (default) sends nothing. - Deck page: DeckDetail gains outputFormat / htmlUrl / slideSize and fetchHtmlUrl(deckId, purpose) calls GET /decks/{id}/html. For HTML decks the full view is HtmlDeckPlayer (iframe sandbox="allow-scripts allow-popups", allow="fullscreen *", referrerpolicy no-referrer; never allow-same-origin / allow-modals / allow-popups-to-escape-sandbox), the grid shows thumbnails, the header has a read-only HTML badge and Present / PDF (#print-pdf) in a new tab (about:blank opened in the click, opener nulled, then location.replace) and Download (window.location.assign of the attachment URL); local mode has one Open button (/api/open output.html). PPTX header and views unchanged. - Thumbnails: lib/preview.ts isHtmlPreview / previewIdentity; new HtmlSlideFrame (sandbox="", lazy, inert, scaled by ResizeObserver) used by SlideThumbnail, DeckCard and SearchResultsGrid for .html previews. useWorkspace / SlideCarousel change detection uses previewIdentity; htmlUrl is stabilised by path, and HTML URLs are re-taken after 10 min so a frame mounted later never gets an expired 15-minute presign (mounted frames keep their document while only the signature changes). - Local routes: decks/[id] lists HTML slides from slides/<slug>.html with preview/<slug>.html?v=<mtime>, htmlUrl output.html?v=<mtime>, outputFormat, slideSize; decks list falls back to the outline's first HTML preview and counts .html slides; preview route serves .html only for output.html (CSP "sandbox allow-scripts allow-popups") and preview/<slug>.html (CSP "sandbox"), text/html; charset=utf-8, nosniff, no-cache; any other .html is 404. PPTX branches unchanged. - Security (builder-security): `npm run dev`, `dev:local` and the Playwright web server now bind 127.0.0.1 (next dev defaulted to all interfaces; the local API routes have no auth). The installed launcher already used 127.0.0.1. - i18n: new keys in slashPicker, htmlFormatPill and carousel, en/ja parity. Verification: - cd web-ui && npx eslint src/ --quiet && npx tsc --noEmit && npm test && npm run build:cloud: all pass (vitest 47 files / 386 tests) - i18n parity one-liner: OK - npm run test:e2e: 1 passed (after `npx playwright install --only-shell chromium` for the lockfile's Playwright) - Loopback smoke (next dev on 127.0.0.1:3198, temp SDPM_DECK_ROOT): HTML deck JSON shape, CSP / nosniff headers, evil.html and slides/*.html 404, listener 127.0.0.1 only - package-lock.json untouched (npm@10.8.2 ci) SPEC: 20261029-1619_html-output-mode Progress: phase 2 tasks 4.1 (UI half) and 4.2-4.5 (FEAT-004) Next: FEAT-005 docs / CHANGELOG / V6-V7, then deploy-verify (deploy_webui.sh) * 📝 docs(html-output-mode): phase 2 cloud docs and changelog CHANGELOG [Unreleased] phase 2 entry (phase 1 remote sentence amended); getting-started en/ja Web UI HTML usage; architecture remote HTML tool table, S3 layout and HTML deck security model; remote README tool table. ash: replace the AWS docs example secret in test_api_html_presign with a dummy value; suppress the pinned reveal.js speaker-view CSP hash in tests/test_html_csp.py (.ash.yaml, reason + expiry). Verification (V6/V7): uv run make lint OK; SDPM_AUTO_INSTALL_ASSETS=0 uv run make test 1541 passed / 26 skipped; web-ui eslint, tsc, vitest 47 files / 386 tests, build:cloud OK; i18n parity OK; infra tsc OK; ash scan --mode local --fail-on-findings: only the 89 known npm-audit advisories remain. git diff 7c895b3 -- tests/ weakens no PPTX test. SPEC: 20261029-1619_html-output-mode Progress: phase 2 FEAT-001..005 done; V6, V7 ticked Next: deploy-verify (SdpmData, SdpmRuntime, SdpmAgent, SdpmWebUi, web-ui) and V1-V5 * 📝 docs(html-output-mode): name the HTML download button by its visible label The deck header's download button reads "HTML" (download icon), like the PPTX button reads "PPTX"; CHANGELOG and getting-started (en/ja) called it "Download HTML" / 「HTML をダウンロード」, which is only its aria-label. Cross-FEAT integration (FEAT-001..005), run on 26e8427 + this commit: - uv run make lint: OK - SDPM_AUTO_INSTALL_ASSETS=0 uv run make test: 1541 passed / 26 skipped - web-ui eslint --quiet, tsc --noEmit, vitest 47 files / 386 tests, build:cloud: OK; npm run test:e2e: 1 passed - i18n parity: OK; infra npx tsc --noEmit: OK - ash scan --mode local --fail-on-findings: exit 2, only the 89 known npm-audit advisories (bandit/checkov/detect-secrets/semgrep PASSED) SPEC: 20261029-1619_html-output-mode Progress: phase 2 FEAT-001..005 integrated; seams checked (deck record fields, get_deck HTML shape vs web-ui, preview key map, check_specs outputFormat -> compose_slides, KB slug ids -> search previews) Next: review, then deploy-verify (SdpmData, SdpmRuntime, SdpmAgent, SdpmWebUi, web-ui) and phase 2 V1-V5 * 🔒 fix(html-output-mode): address phase 2 review findings - check: report <meta http-equiv> in slides (rule script; refresh navigates the deck and no CSP directive stops it); hostile-deck and check tests, slide-html-spec rule table, CHANGELOG - api: route-level tests for GET /decks/{id}/html (403 before 400/404, regional inline/attachment presigns) and HTML / PPTX get_deck shapes, importing api/index.py with a powertools stand-in - remote: finalize deletes this run's previews before raising on a partial upload; cloud measure report header no longer says to open output.html; _deck_format logs its PPTX fallback; collaborator rebuild limitation (owner-only record lookup, as PPTX) documented in architecture.md - web-ui: thumbnail click / search jump open the HTML player at that slide (#/<index> on first load, reveal.js postMessage afterwards); deck list and search re-fetch HTML thumbnail signatures after 10 min while any are listed; HtmlSlideFrame takes a fresh signature until its frame has loaded; sent-message HTML chip goes through useTranslations Verification: uv run make lint OK; SDPM_AUTO_INSTALL_ASSETS=0 uv run make test 1555 passed / 26 skipped; web-ui eslint --quiet, tsc --noEmit, vitest 47 files / 390 tests, build:cloud OK; i18n parity OK; infra tsc --noEmit OK; ash scan --mode local --fail-on-findings: only the 89 known npm-audit advisories (bandit, checkov, detect-secrets, semgrep PASSED). SPEC: 20261029-1619_html-output-mode Progress: phase 2 review iteration 1 findings fixed (sdpm/references changed: redeploy SdpmData + SdpmRuntime) Next: re-review, then deploy-verify (SdpmData, SdpmRuntime, SdpmAgent, SdpmWebUi, Web UI) * 🐛 fix(html-output-mode): ship vendored reveal.js in the remote MCP image The deployed MCP runtime failed every HTML build (generate_pptx → finalize_html_deck → assemble_deck) with FileNotFoundError on /app/sdpm/vendor/revealjs/plugin/notes.js: the Dockerfile copied sdpm/references/ and sdpm/templates/ but not sdpm/vendor/. Found during the dev-account V1 check (decks 46a98b6c / 17427fc1 had slides but no output.html). Adds the COPY and a guard test on the Dockerfile. Ran: make lint (OK), uv run pytest tests/test_remote_html.py (23 passed), make test (1554 passed, 26 skipped). SPEC: 20261029-1619_html-output-mode Progress: V1-V5 deploy verification, fix for remote HTML build Next: redeploy SdpmRuntime, rebuild the two HTML decks, continue V1-V5 * 🔒 fix(html-output-mode): annotate validated semgrep sinks for the ASH scan PR #444's ASH scan failed on 6 HIGH semgrep findings in code added by this branch. All are reviewed false positives, annotated with the repo's existing `// nosemgrep: <rule> — reason` convention: - web-ui/src/app/api/decks/[id]/route.ts (5x path-join-resolve-traversal): `dp` comes from resolveDeckDir (allow-list + realpath), and every slug passes HTML_SLUG_RE before it reaches path.join. - web-ui/src/components/deck/HtmlDeckPlayer.tsx (wildcard-postmessage): the target is the opaque-origin sandboxed player iframe, so "*" is the only usable target origin; the payload is a slide index. Ran: semgrep with the two CI rule IDs on both files: 6 results with --disable-nosem (same lines as CI), 0 with suppressions; npx eslint on both files: OK. Comment-only change, so make test / web-ui tests not re-run. SPEC: 20261029-1619_html-output-mode Progress: CI scan fix for PR #444 Next: watch PR #444 CI to green
* 🐛 fix(html-output-mode): keep HTML previews in step with output.html and re-sign stale search thumbnails - Remote run_python now also deletes the previews of slides the build left out (e.g. a structure error). The previews then list exactly the slides output.html contains, so a grid click or search jump no longer lands one slide off. - useDeckList tracks when the deck lists and the search results were fetched. Search results survive a visit to a deck; on return their 15-minute presigned thumbnails are re-signed at once instead of 10 minutes later. - Tests: the remote preview pruning, the useDeckList re-sign clocks (fake timers), and the SlideCarousel HTML grid-click / search-jump player index. SPEC: 20261029-1619_html-output-mode Progress: phase 2 review follow-ups (3 low findings) Next: PR into dev/html-output * 🔧 config: ignore .worktrees/ created by agent workflows
…#455) * ✨ feat(html-output-mode): run slide scripts and embed ECharts / D3 in HTML decks - Inline classic slide <script>s are moved out of their sections and emitted after the notes plugin as __sdpmSlide("<slug>",function(section){…}); sdpm.engine.html.slide_js.SLIDE_HELPER runs each slide's functions once per section on ready / slidechanged / overviewshown / pdf-ready. <script src>, type="module" and other types stay in their section unhashed (CSP blocks them); _EMBED_ATTRS never embeds a script src. Previews drop every <script>. - Libraries named in <section data-libs> (echarts, d3) are embedded once per deck in fixed order, each preceded by a /*! … */ comment with its LICENSE (+ NOTICE and LICENSE-d3 for ECharts). Vendored verbatim from npm pack: ECharts 6.1.0, D3 7.9.0 (sdpm/vendor/README.md, THIRD-PARTY-LICENSES). - Every emitted script (engine, libraries, helper, slide scripts, config) plus the speaker view is hashed into script-src; no other CSP change. A deck without slide scripts or data-libs keeps exactly the three engine scripts. - AssembleResult gains line_map, libraries and slide_scripts; generate_html returns libraries. refresh_html's key set is unchanged. - Runtime image test: every vendored library / license file exists and no .dockerignore entry excludes it. Dockerfile comment updated. Verified: SDPM_AUTO_INSTALL_ASSETS=0 uv run pytest tests/test_html_assemble.py tests/test_html_csp.py tests/test_html_api.py tests/test_html_text.py tests/test_remote_html.py -q → 99 passed; uv run ruff check sdpm/ servers/ shared/ api/ agent/ → clean; SDPM_AUTO_INSTALL_ASSETS=0 uv run pytest tests/ -q → 1566 passed, 26 skipped; shasum -a 256 echarts.min.js b66b25ae…, d3.min.js f2094bbf… (match). Docker not installed locally: image not built. SPEC: 20261029-1619_html-output-mode Progress: phase 3 tasks 1.1, 1.2, 1.3, 3.1 (FEAT-001) Next: FEAT-002 static checks for slide scripts and the headless JS check * ✨ feat(html-output-mode): static checks and headless JS check for slide scripts - check.py: inline classic slide scripts are allowed; <script src> and non-classic types (module, JSON …) still report `script`, as do on*, javascript:, iframe/object/embed and meta http-equiv. New rules over the slide's classic script text (regex, comments included, one per slide): script-external (location, window.open / open(, top., http(s):// except XML namespace URIs, "//host"), library-unknown (data-libs value), library-undeclared (echarts. / d3. without the section's data-libs), script-eval (csvParse / tsvParse / dsvFormat().parse / eval / new Function), script-dom (getElementById, querySelector('#…'), DOMContentLoaded, load). - New sdpm.engine.html.jscheck (stdlib): find_browser (SDPM_BROWSER, macOS apps, Linux PATH, Windows Program Files / LOCALAPPDATA), js_check_enabled (SDPM_JS_CHECK), parse_console_log, attribute, check_js. Opens output.html#print-pdf&sdpm-check headless with --log-file, waits for sdpm-check:done, stops the browser and removes the profile. Network is cut (dead proxy incl. loopback, no DNS, no non-proxied UDP); no DevTools port. - _generate_html runs it when the deck has slide scripts: js_check {status, browser, seconds, note} and "<slug>: JS error: …" / "output.html: JS error (line N): …" warnings; refresh_html passes js_check through. Non-JS decks keep their result keys and launch nothing. - CLI prints "JS check: <status> (<browser>, <s> s)" or the note. Runtime image sets SDPM_JS_CHECK=0 (no browser). Tests: SDPM_JS_CHECK=0 autouse; test_html_jscheck.py with a fake browser and opt-in real-browser tests (SDPM_TEST_BROWSER=1), including a loopback-server no-network check. Verified: SDPM_AUTO_INSTALL_ASSETS=0 uv run pytest tests/test_html_check.py tests/test_html_jscheck.py tests/test_html_api.py tests/test_html_csp.py -q → 138 passed, 3 skipped; SDPM_TEST_BROWSER=1 … tests/test_html_jscheck.py → 18 passed (Chrome 156), and 18 passed with SDPM_BROWSER=Microsoft Edge; uv run ruff check sdpm/ servers/ shared/ api/ agent/ → clean; SDPM_AUTO_INSTALL_ASSETS=0 uv run pytest tests/ -q → 1602 passed, 29 skipped; ASH scan --mode local --fail-on-findings → exit 0. Manual control: without the isolation flags a loopback server received /leak; with them, no request. No leftover browser processes or profiles. SPEC: 20261029-1619_html-output-mode Progress: phase 3 tasks 1.4, 1.5 (FEAT-002) Next: FEAT-003 guide / composer-html / docs / CHANGELOG for slide scripts * 📝 docs(html-output-mode): slide scripts, ECharts and D3 in the HTML guide and docs - slide-html-spec.md: new Scripts section (how slide scripts run, data-libs echarts / d3 and their size, rules: section.querySelector, no load waits, Reveal.isPrintView, slidechanged, addEventListener, region px box, colour / font-size tokens, ECharts svg renderer, D3 csvParseRows; no network or navigation; thumbnails run no script) with ECharts, D3 and click examples. Not allowed and the Static checks table updated (script row; script-external, library-unknown, library-undeclared, script-eval, script-dom); new JS errors section on the headless check. - composer-html.md: scripts are allowed, pointing to slide_spec Scripts; JS errors are fixed like static-check warnings. - docs/en/architecture.md HTML Deck Security: CSP covers libraries and slide scripts by hash; navigation is warned, not blocked; the local JS check. - docs/en + docs/ja getting-started HTML decks: one bullet each. - CHANGELOG [Unreleased] Added: phase 3 (JavaScript) entry. No version bump. Verified: SDPM_AUTO_INSTALL_ASSETS=0 uv run pytest tests/test_reference.py tests/test_entry_tools.py tests/test_agent_modes.py -q → 69 passed; rule names in check.py's docstring vs the guide's Static checks table → 18 / 18, symmetric difference [] (the FEAT's one-liner regex also picked up docstring-wrapped lines and `fonts` / `ground` table rows from the guide's template_html table, so it was scoped to the two sections); uv run ruff check sdpm/ servers/ shared/ api/ agent/ → clean; SDPM_AUTO_INSTALL_ASSETS=0 uv run pytest tests/ -q → 1602 passed, 29 skipped. The three guide examples built as one deck with api.generate_html (SDPM_JS_CHECK=1) → 0 warnings, libraries [echarts, d3], js_check ok (Chrome, 3.0 s). SPEC: 20261029-1619_html-output-mode Progress: phase 3 task 2.1 and docs (FEAT-003) Next: dev deploy and browser verification of phase 3
…l.js (#457) The orchestrator only knew fragments and auto-animate, so asked for an interactive deck it answered in reveal.js terms. Describe HTML slides as web pages (scripts, ECharts / D3, click / hover / slider), use interaction where the content gains from it, and tell composers to build it with slide scripts rather than fragments. SPEC: 20261029-1619_html-output-mode Progress: orchestrator.md and composer-html.md updated Next: redeploy SdpmData + SdpmRuntime after merge
… (phase 3 follow-ups) (#458) - A JS check that does not run or finish now says so among the build warnings ("output.html: JS check skipped: …" / "stopped: …" / "did not finish …"). SDPM_JS_CHECK=0 (the cloud runtime image) returns js_check {status: skipped, note} instead of nothing, so run_python and generate_pptx in the cloud carry the note to the composer / L4 agent. composer-html.md and slide-html-spec.md tell the composer not to report a skipped check as clean. - The slide helper logs sdpm-check:navigated on pagehide in check mode; check_js stops there with status "navigated" and a warning (real Chrome 1.4 s, Edge 2.2 s instead of the 15 s timeout). The timeout note names navigation too. - check_js creates its temp profile inside the guarded block: an OSError from mkdtemp degrades to status "failed" with a note (it no longer raises). - test_runtime_image_turns_the_js_check_off asserts ENV SDPM_JS_CHECK=0 in servers/remote/Dockerfile; test_js_deck_reports_the_skipped_js_check covers the cloud run_python / generate_pptx warnings. PPTX untouched; MCP tool count 20. Checks: make lint (ruff clean); make test (1606 passed, 30 skipped); SDPM_TEST_BROWSER=1 test_html_jscheck.py + test_remote_html.py 50 passed (Chrome), real-browser tests 4 passed with SDPM_BROWSER=Edge; ash scan --mode local --fail-on-findings exit 0 (0 actionable). SPEC: 20261029-1619_html-output-mode Progress: phase 3 review low findings and the cloud "JS check skipped" gap fixed Next: deploy SdpmData + SdpmRuntime to dev and confirm the note reaches the agent; PR into dev/html-output
…late grounds in PDF (#459) Links: a link in a slide replaced the deck (and in the in-app player the site loaded sandboxed: origin null, no cookies). The assembler now gives every <a href="http(s)://..."> target="_blank" rel="noopener noreferrer" (_self/_parent/_top/empty -> _blank, named windows kept, other rel tokens kept, "opener" dropped); #... and other schemes are unchanged. The in-app player iframe and the local output.html route's CSP sandbox header add allow-popups-to-escape-sandbox (the header is intersected with the iframe sandbox, so both are needed locally). No allow-same-origin or allow-top-navigation: the deck stays an opaque-origin sandbox; only the popups it opens leave it, and those are an ordinary tab of the linked site. Thumbnails (sandbox="" / CSP sandbox) unchanged. No listener, storage or auth change. PDF root cause: reveal.js's print view (#print-pdf / ?print-pdf) moves each <section> into div.pdf-page, so the engine rule ".reveal .slides > section" (canvas size, ground, text colour) stopped matching; the section fell to reveal.css min-height:1px and its background-size:100% 100% ground SVG (gradient / picture) painted 1 px. Solid decks looked right only because reveal copies the viewport background (--sdpm-ground) onto each pdf-page; a layout-specific solid ground (blank-dark "Blank" #0A1628) printed as the master black. print-color-adjust was already exact. Fix: the rule also selects ".reveal .slides > .pdf-page > section". Verification: - uv run pytest tests/test_html_assemble.py: 2 new tests (link rewrite in deck and preview; print-view selector) - make lint: clean; make test: 1602 passed, 29 skipped - web-ui: npx eslint src/ --quiet, npx tsc --noEmit, npm test (395 passed), npm run build:cloud: all pass (npm ci only, lockfile untouched) - ash scan --mode local --fail-on-findings: exit 0, 0 actionable - Local Chrome (Playwright channel chrome), repro decks aws-brand-light (picture title ground), gradient p:bg, blank-dark: #print-pdf and ?print-pdf -> PDF -> PNG. Before: sections 1 px high, white pages. After: 1920x1080, gradient / picture grounds on every page, solid and #0A1628 correct. - Links in Chrome: output.html via file:// -> external link opens a new tab (https://example.com origin, opener null), deck stays; #/1 moves to slide 2. Player stand-in (iframe sandbox + 127.0.0.1 server sending the route's CSP header): old tokens -> new tab origin null, cookies throw; new tokens -> normal site, no opener. A deck-script window.open without noopener cannot navigate the app tab (opener.top.location SecurityError, old and new). Speaker view (S in the player) unchanged: about:blank. SPEC: 20261029-1619_html-output-mode Progress: external links new tab + print-view grounds fixed, tested locally Next: rebase onto origin/dev/html-output, open PR; redeploy SdpmData, SdpmRuntime and the Web UI after merge
…ide ground (#461) Root cause: reveal.js ran with margin 0.04, and the area outside the slide (that margin plus the letterbox when the window aspect differs from the deck's) showed .reveal-viewport's background, :root --sdpm-ground = deck.json defaultBackground (the style's --color-bg) or the master's solid colour or #FFFFFF. The layout's own ground and the template background drawn inside the slide never reached it. In the Web UI the player box already follows deck.json slideSize, so the in-app band was the margin alone. Fix: Reveal.initialize gets margin:0, and every deck <section> gets an engine-set data-background-color (letterbox_color: defaultBackground, else the layout's solid ground, else the theme background colour for gradient / picture grounds). It is set at assembly after the static checks, which run on the slide files, so the engine's value is never reported (composer-written data-background-* still is). Previews (thumbnails) do not carry it. template.json is unchanged, so CONVERTER_VERSION stays. No Web UI change. Checks: make lint clean; make test 1605 passed / 29 skipped; web-ui eslint --quiet, tsc --noEmit, npm test 395 passed, build:cloud ok; mcp_smoke on servers/local: 20 tools. Screenshots (headless Chrome, 4:3 and 16:9 windows, in-app stand-in, speaker view, #print-pdf, preview/<slug>.html) for aws-brand-light (picture ground), a gradient p:bg layout and blank-dark (solid, Blank #0A1628): .agents/tasks/sample-spec-driven-presentation-maker-fix-html-output-letterbox-2026-10-30/screenshots/{before,after}/ SPEC: 20261029-1619_html-output-mode Progress: white band around HTML slides fixed locally (engine assembly) Next: deploy SdpmRuntime to dev and check the in-app view; PR into dev/html-output
…PNG previews for HTML decks (#463) * ✨ feat(html-output-mode): warn on data-ph keys the layout does not have check_slide_html gets placeholders (layout -> data-ph keys and aliases) and the rule placeholder-unknown; _generate_html builds the map from template.json layouts. Verified: uv run make lint clean; SDPM_AUTO_INSTALL_ASSETS=0 uv run make test -> 1618 passed, 30 skipped. SPEC: 20261029-1619_html-output-mode Progress: phase 4 task 1.6 (static placeholder check) done Next: browser check over CDP (tasks 1.1-1.5) * ✨ feat(html-output-mode): check HTML slides in a browser over CDP — layout, JS errors, PNG New engine modules: cdp.py (sync websockets CDP client), browser.py (BrowserSource seam, register_browser_source, local headless Chrome / Edge on a random 127.0.0.1 DevTools port, resolve_browser: SDPM_BROWSER=none -> registered -> SDPM_BROWSER path -> auto -> skip note), layout_judge.py (overlap / overflow / outside-region / decoration-overlap, 4 px tolerance), browser_check.check_deck (setDocumentContent <= 10 MB, blob: above; print-view flag + finish() settle; measure; JS errors; 1280 px PNGs to preview/png/; navigation stop; deadline). generate_html(check_slides=...) / refresh_html (affected + measure_slides) report findings in warnings, diagnostics and the Checks: report; js_check -> browser_check; preview_files. jscheck.py and SDPM_JS_CHECK removed; websockets>=13 is the one new dependency (17.3). Verified: uv run make lint clean; SDPM_AUTO_INSTALL_ASSETS=0 uv run make test -> 1639 passed, 33 skipped; targeted HTML files -> 249 passed, 7 skipped; SDPM_TEST_BROWSER=1 tests/test_html_browser_check.py -> 16 passed with Chrome and with Edge. SPEC: 20261029-1619_html-output-mode Progress: phase 4 tasks 1.1 (local half), 1.2, 1.3, 1.4 (local), 1.5 done Next: AgentCore Browser source, cloud PNGs / get_preview, IAM (FEAT-002) * ✨ feat(html-output-mode): browser check and PNG previews in the cloud with AgentCore Browser The remote server registers an AgentCore Browser source (aws.browser.v1, SigV4-signed automation stream, session always stopped; boto3 client built on the first check) with the core browser seam. run_python uploads the check's PNGs to html/{deck}/png/{slug}_{epoch}.png, deletes superseded / stale ones, returns png_previews and logs one html_browser_check line with timings; get_preview returns those PNGs for HTML decks. finalize runs no check and drops PNGs of removed slides. SDPM_JS_CHECK=0 leaves the Dockerfile; the runtime role gets the four browser actions on aws.browser.v1 only. Verified: uv run make lint (clean); SDPM_AUTO_INSTALL_ASSETS=0 uv run make test (1651 passed, 33 skipped); FEAT-002 set (test_remote_browser, test_remote_html, test_html_artifacts, test_tool_descriptions) 69 passed; cd infra && npx tsc --noEmit (0). SPEC: 20261029-1619_html-output-mode Progress: phase 4 items 8-10 (tasks 1.1 cloud half, 1.4 cloud, 3.1) Next: FEAT-003 role documents, guide, docs, CHANGELOG (item 11) * 📝 docs(html-output-mode): composer flow with PNG previews and layout warnings Composer HTML document follows the PPTX flow (fix warnings, look at the PNG, next slug); slide-html-spec gains placeholder-unknown and a Browser check section; compose_report, architecture, getting-started (en/ja), remote README and CHANGELOG describe the browser check, PNG previews and the removal of SDPM_JS_CHECK. Verified: pytest test_entry_tools/test_agent_modes/test_html_check 151 passed; make lint clean; make test 1651 passed, 33 skipped. SPEC: 20261029-1619_html-output-mode Progress: phase 4 tasks 1.1-1.6, 2.1, 3.1 implemented (FEAT-001..003) Next: deploy SdpmData, SdpmRuntime, SdpmAgent to dev and run V1-V7 * ✅ test(html-output-mode): guard the runtime image against either browser-check switch The Dockerfile guard now rejects ENV SDPM_BROWSER as well as the removed phase-3 switch, so git grep SDPM_JS_CHECK finds only CHANGELOG history. Verified: uv run make lint clean; SDPM_AUTO_INSTALL_ASSETS=0 uv run make test 1651 passed / 33 skipped; SDPM_TEST_BROWSER=1 tests/test_html_browser_check.py 16 passed (Chrome); cd infra && npx tsc --noEmit 0; no boto3/botocore under sdpm/. SPEC: 20261029-1619_html-output-mode Progress: phase 4 FEAT-001..003 integrated; cross-FEAT verification green Next: review verdict, then deploy SdpmData / SdpmRuntime / SdpmAgent and V1-V7 * 🐛 fix(html-output-mode): keep parallel composers' PNGs, report the network block, tolerate vanished PNGs - refresh_html_deck deletes PNGs only of slides whose file is in this snapshot but did not build; a slug another composer wrote after the snapshot keeps its fresh PNG (removed slides still go at finalize). - check_deck records network_blocked; a rejected Network.setBlockedURLs is logged at WARNING and the html_browser_check line carries it. - get_html_preview returns the "No PNG for <slug> yet" line when a key disappears between listing and download. Verified: uv run make lint (clean); SDPM_AUTO_INSTALL_ASSETS=0 uv run make test (1652 passed, 33 skipped); SDPM_TEST_BROWSER=1 pytest tests/test_html_browser_check.py (16 passed, Chrome). SPEC: 20261029-1619_html-output-mode Progress: phase 4 review lows 1, 2, 4 addressed before the dev deploy Next: deploy SdpmData / SdpmRuntime / SdpmAgent and run V1–V7 * 🐛 fix(html-output-mode): check the first slide's script in the browser check On the check's about:blank / blob: page reveal.js's history.replaceState throws during start-up, so `ready` never fires and the slide shown first never ran its functions: a JS error there went unreported (found by V5 locally: a1 threw, no warning). Directly opened and in a sandboxed iframe the script does run, so the check did not mirror the user. Under #sdpm-check the helper now exposes __sdpmCheckRun(), which the check calls after Reveal.slide (idempotent per section). Verified: uv run make lint (clean); SDPM_AUTO_INSTALL_ASSETS=0 uv run make test (1652 passed, 34 skipped); SDPM_TEST_BROWSER=1 pytest tests/test_html_browser_check.py with Chrome (17 passed) and Edge (17 passed); local V1/V3/V4/V5 script (.agents/.../verify/local_verify.py). SPEC: 20261029-1619_html-output-mode Progress: phase 4 V1/V3/V4 local pass; V5 local found this defect Next: redeploy SdpmRuntime, V2/V5/V6 in the cloud * 🐛 fix(html-output-mode): fail the browser check closed when requests cannot be blocked - A browser that rejects Network.setBlockedURLs (AgentCore Browser has internet access) no longer loads the deck: the check fails and the build carries one `output.html: Browser check could not run (…): RuntimeError: could not block network requests, so no slide was run` warning, never silence or "clean". Tests: fake CDP that rejects the block (check result + refresh_html warning line) and an AgentCore source whose StartBrowserSession is denied (remote run_python line). - orchestrator.md still said "HTML decks have no previews: tell the user to open output.html" (the cloud agent log of the V2 run showed it in the role text); it now points at get_preview / <deck>/preview/png/ like PPTX and says an unchecked slide is not fine. - .gitignore: agent workflow scratch under .agents/ (plugins/ stays tracked: .agents/plugins/marketplace.json is in the repo). Verified: uv run make lint (clean); SDPM_AUTO_INSTALL_ASSETS=0 uv run make test (1655 passed, 34 skipped); SDPM_TEST_BROWSER=1 pytest tests/test_html_browser_check.py (19 passed, Chrome); test_entry_tools / test_agent_modes pass. SPEC: 20261029-1619_html-output-mode Progress: parent-approved review follow-up (network block) and .agents/ ignore Next: redeploy SdpmData + SdpmRuntime (references, engine), finish V2 / V7 * 🔒 fix(html-output-mode): drop the unused GetBrowserSession grant from the runtime role Nothing calls GetBrowserSession (agentcore_browser.py uses StartBrowserSession, StopBrowserSession and the automation stream), so the runtime role keeps only those three actions on the aws.browser.v1 ARN. CHANGELOG and architecture.md updated (architecture.md also says the check fails closed when the network block is rejected). No IAM test or snapshot exists for this statement. Verified: cd infra && npx tsc --noEmit (ok); uv run make lint (clean). SPEC: 20261029-1619_html-output-mode Progress: last review low finding (unused grant) resolved Next: redeploy SdpmRuntime, confirm the deployed statement, finish V2 / V7 * 🐛 fix(html-output-mode): never report a measured slug outside the deck as OK In the V2 cloud run the agent measured "checker-test" while the outline listed "cheker-test": nothing built or checked that slide, yet the measure report said "checker-test: OK" and there was no warning. A measured slug without an outline entry and slides/<slug>.html now gets "<slug>: not in the deck, so not checked — …" in the report and the warnings. Verified: uv run make lint (clean); SDPM_AUTO_INSTALL_ASSETS=0 uv run make test (1656 passed, 34 skipped). SPEC: 20261029-1619_html-output-mode Progress: V2 cloud run found this; broken-slide rerun next Next: redeploy SdpmRuntime, rerun the V2 broken slide * 🔒 fix(html-output-mode): block navigations in AgentCore Browser and check decks over 10 MB there Found by V4 / V2 in AgentCore Browser (probe: verify/cloud/block-probe.jsonl): - Network.setBlockedURLs (both forms) blocks subresources but lets a top-level navigation through: a slide script setting location.href to an https URL reached example.com from the cloud browser. The check stopped as "navigated", but the request had gone out. - Network.enable makes Chrome send each data: URL in full in Network.requestWillBeSent / responseReceived (11 MB for an 8 MB PNG); AgentCore Browser drops the automation stream on such a message, so a deck over 10 MB never became ready ("did not become ready within 30 s"). The check now fails every http(s) / ws(s) request through the Fetch domain (Fetch.enable patterns, Fetch.failRequest on requestPaused) and never enables Network. Targets the page opens are auto-attached paused (Target.setAutoAttach waitForDebuggerOnStart): pages are closed, frames and workers get the same block before they run. Paused requests and new targets are answered from the event hook as they arrive, with a new CdpConnection.post (fire and forget), so a paused navigation never stalls an awaited reply. Rejecting Fetch.enable / setAutoAttach still fails the check closed with one note. AgentCore Browser from this machine (verify/cloud/agentcore-engine-probe.json): 11.5 MB deck ok in 5.5 s with 2 PNGs; navigation paused + failed, status navigated; popup none opened (no user activation). Verified: uv run make lint (clean); SDPM_AUTO_INSTALL_ASSETS=0 uv run make test (1658 passed, 34 skipped); SDPM_TEST_BROWSER=1 pytest tests/test_html_browser_check.py with Chrome (20 passed) and Edge (20 passed). SPEC: 20261029-1619_html-output-mode Progress: V4 in AgentCore passes; cloud network block holds for navigations Next: redeploy SdpmRuntime, recheck V2 / V6 in the runtime, ash * 📝 fix(html-output-mode): log blocked requests and say a stopped navigation reached no site In the runtime recheck the agent read "a slide script navigated the page away" as "the navigation succeeded". The note now says the check blocks network requests, so the page reached no site, and the check records how many requests it failed (blocked_requests, in the result and in the html_browser_check log line next to network_blocked) so the runtime log shows the block took effect. Verified: uv run make lint (clean); SDPM_AUTO_INSTALL_ASSETS=0 uv run make test (1658 passed, 34 skipped); SDPM_TEST_BROWSER=1 pytest tests/test_html_browser_check.py with Chrome (20 passed) and Edge (20 passed; the navigation test asserts blocked_requests >= 1). SPEC: 20261029-1619_html-output-mode Progress: V2 runtime recheck after c23d5aa Next: redeploy SdpmRuntime, confirm blocked_requests in the runtime log * 🔒 fix(html-output-mode): mark the blocked-URL patterns for semgrep ASH (semgrep detect-insecure-websocket) flagged `ws://*` in the list of URL patterns the browser check fails via Fetch.failRequest. Nothing connects to them; annotate the line with the rule id and say what the list is. SPEC: 20261029-1619_html-output-mode Progress: PR #463 ASH false positive annotated Next: CI green, merge #463
…at notes from init_deck_workspace (#465) * 📝 docs(html-output-mode): slim the HTML deck guidance, format notes from init_deck_workspace - orchestrator.md is format-neutral: the HTML paragraph is gone (only how the format is chosen remains); `visual` describes what the audience sees and experiences, and points to the format_notes init_deck_workspace returns - init_deck_workspace returns format_notes (new guide html-deck) for HTML decks, locally and on the remote server (sdpm.entry.format_notes); PPTX gets no key. Tool count unchanged (20) - composer-html.md is procedure only; interaction / progressive builds / scripts merged into one item (build what visual and the brief ask for, with scripts where the presenter operates the slide) - slide-html-spec.md keeps the sdpm-specific contract and what a slide can use; the Static checks / Browser check tables and long chart examples are gone (one minimal skeleton). Static-check, structure, asset, layout and CSP warnings now carry their fix - principles.md rule 4: writing rules for role documents Word counts (wc -w), before → after: orchestrator.md 1539 → 1299 composer-html.md 1391 → 914 guides/slide-html-spec.md 2821 → 1244 (new guides/html-deck.md: 202) Verified: make lint (ruff: all checks passed); make test (1660 passed, 34 skipped); ash scan --mode local --fail-on-findings (passed, 0 actionable). SPEC: 20261029-1619_html-output-mode Progress: guidance slim-down implemented (docs, format_notes contract, warning fixes, steering rule) Next: deploy SdpmData + SdpmRuntime to dev and run the behavioural check (interactive HTML, plain HTML, PPTX) * 🐛 fix(html-output-mode): print HTML format_notes from the CLI init_deck_workspace The L1 CLI `init_deck_workspace` called sdpm.api.init directly and never printed the format notes the MCP tool returns, so a no-MCP agent building an HTML deck got none of the html-deck guidance. cmd_init now prints sdpm.entry.format_notes(output_format) under a `format_notes:` header when present (HTML only); PPTX output is unchanged. Tests cover both. Word counts (wc -w), before → after this commit (unchanged here): orchestrator.md 1299 → 1299, composer-html.md 914 → 914, slide-html-spec.md 1244 → 1244 (dev/html-output base: 1539 / 1391 / 2821). Verified: make lint (ruff) passed; make test 1662 passed, 34 skipped; ash scan --mode local --fail-on-findings passed (0 actionable). SPEC: 20261029-1619_html-output-mode Progress: review blocker L1-cli-format-notes fixed Next: re-review, then dev deploy and behavioural check * 📚 docs(html-output-mode): presenter's operating instructions go in the notes On dev the composers drew an "操作: …" line on every interactive slide, visible to the audience. Say once in the guide that the slide carries what the audience reads and the operating instructions go in the speaker notes. SPEC: 20261029-1619_html-output-mode Progress: guide note on operating instructions Next: redeploy SdpmData + SdpmRuntime
* build(deps): bump actions/setup-node from 7.0.0 to 7.1.0 (#432) Bumps [actions/setup-node](https://github.com/actions/setup-node) from 7.0.0 to 7.1.0. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](actions/setup-node@v7...v7.1.0) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: 7.1.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump mcp from 1.28.1 to 1.30.0 in /servers/local (#430) Bumps [mcp](https://github.com/modelcontextprotocol/python-sdk) from 1.28.1 to 1.30.0. - [Release notes](https://github.com/modelcontextprotocol/python-sdk/releases) - [Changelog](https://github.com/modelcontextprotocol/python-sdk/blob/main/RELEASE.md) - [Commits](modelcontextprotocol/python-sdk@v1.28.1...v1.30.0) --- updated-dependencies: - dependency-name: mcp dependency-version: 1.30.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Shotaro Kataoka <42331656+ShotaroKataoka@users.noreply.github.com> * build(deps): bump pyjwt from 2.13.0 to 2.15.0 (#421) Bumps [pyjwt](https://github.com/jpadilla/pyjwt) from 2.13.0 to 2.15.0. - [Release notes](https://github.com/jpadilla/pyjwt/releases) - [Changelog](https://github.com/jpadilla/pyjwt/blob/master/CHANGELOG.rst) - [Commits](jpadilla/pyjwt@2.13.0...2.15.0) --- updated-dependencies: - dependency-name: pyjwt dependency-version: 2.15.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Shotaro Kataoka <42331656+ShotaroKataoka@users.noreply.github.com> * build(deps): bump the infra-deps group across 1 directory with 3 updates (#422) Bumps the infra-deps group with 3 updates in the /infra directory: [aws-cdk-lib](https://github.com/aws/aws-cdk/tree/HEAD/packages/aws-cdk-lib), [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) and [aws-cdk](https://github.com/aws/aws-cdk-cli/tree/HEAD/packages/aws-cdk). Updates `aws-cdk-lib` from 2.270.0 to 2.272.0 - [Release notes](https://github.com/aws/aws-cdk/releases) - [Changelog](https://github.com/aws/aws-cdk/blob/main/CHANGELOG.v2.alpha.md) - [Commits](https://github.com/aws/aws-cdk/commits/v2.272.0/packages/aws-cdk-lib) Updates `@types/node` from 26.6.2 to 26.6.4 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `aws-cdk` from 2.1142.0 to 2.1144.0 - [Release notes](https://github.com/aws/aws-cdk-cli/releases) - [Commits](https://github.com/aws/aws-cdk-cli/commits/aws-cdk@v2.1144.0/packages/aws-cdk) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 26.6.3 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: infra-deps - dependency-name: aws-cdk dependency-version: 2.1143.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: infra-deps - dependency-name: aws-cdk-lib dependency-version: 2.271.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: infra-deps ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Shotaro Kataoka <42331656+ShotaroKataoka@users.noreply.github.com> * build(deps): bump the web-ui-majors group across 1 directory with 3 updates (#425) Bumps the web-ui-majors group with 3 updates in the /web-ui directory: [motion](https://github.com/motiondivision/motion), [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8) and [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest). Updates `motion` from 13.4.0 to 14.0.0 - [Changelog](https://github.com/motiondivision/motion/blob/main/CHANGELOG.md) - [Commits](motiondivision/motion@v13.4.0...v14.0.0) Updates `@vitest/coverage-v8` from 4.1.11 to 5.0.3 - [Release notes](https://github.com/vitest-dev/vitest/releases) - [Changelog](https://github.com/vitest-dev/vitest/blob/main/docs/releases.md) - [Commits](https://github.com/vitest-dev/vitest/commits/v5.0.3/packages/coverage-v8) Updates `vitest` from 4.1.11 to 5.0.3 - [Release notes](https://github.com/vitest-dev/vitest/releases) - [Changelog](https://github.com/vitest-dev/vitest/blob/main/docs/releases.md) - [Commits](https://github.com/vitest-dev/vitest/commits/v5.0.3/packages/vitest) --- updated-dependencies: - dependency-name: motion dependency-version: 14.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: web-ui-majors - dependency-name: "@vitest/coverage-v8" dependency-version: 5.0.3 dependency-type: direct:development update-type: version-update:semver-major dependency-group: web-ui-majors - dependency-name: vitest dependency-version: 5.0.3 dependency-type: direct:development update-type: version-update:semver-major dependency-group: web-ui-majors ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Shotaro Kataoka <42331656+ShotaroKataoka@users.noreply.github.com> * build(deps): bump astral-sh/setup-uv from 10.2.0 to 10.3.2 (#431) Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 10.2.0 to 10.3.2. - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](astral-sh/setup-uv@v10.2.0...v10.3.2) --- updated-dependencies: - dependency-name: astral-sh/setup-uv dependency-version: 10.3.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Shotaro Kataoka <42331656+ShotaroKataoka@users.noreply.github.com> * ⬆️ build(deps): relock servers/remote constraints (supersedes #439) (#447) Regenerated with uv pip compile --upgrade (Pillow held <13). #439 bumped opentelemetry-sdk to 1.45.1 while aws-opentelemetry-distro 0.21.0 pins opentelemetry-sdk==1.44.0, so container-deps could not resolve. * config(dependabot): group security updates per ecosystem (#446) * 🔧 config(dependabot): group security updates per ecosystem Security updates bypass version-update groups, so every alert opened its own PR against the same lockfile. Add an applies-to: security-updates group to each entry, a security-only entry for the root uv.lock, and group the github-actions version updates. * 🔧 config(dependabot): add cooldown to the root security-only entry * ⬆️ build(deps): batch web-ui security updates (#448) Supersedes #427 #428 #429 #434 #435 #436 #437 #438 #442 #443 (one PR per alert, all on the same lockfile). Also applies non-breaking npm audit fixes (body-parser, ip-address, qs). vite is declared as a devDependency because npm update cannot move it as a vitest-only transitive (arborist crash). Lockfile generated with npm 10.8.2. * build(deps): bump pyjwt from 2.13.0 to 2.15.0 in /servers/local (#418) Bumps [pyjwt](https://github.com/jpadilla/pyjwt) from 2.13.0 to 2.15.0. - [Release notes](https://github.com/jpadilla/pyjwt/releases) - [Changelog](https://github.com/jpadilla/pyjwt/blob/master/CHANGELOG.rst) - [Commits](jpadilla/pyjwt@2.13.0...2.15.0) --- updated-dependencies: - dependency-name: pyjwt dependency-version: 2.15.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Shotaro Kataoka <42331656+ShotaroKataoka@users.noreply.github.com> * build(deps): bump urllib3 from 2.7.0 to 2.8.0 (#417) Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.7.0 to 2.8.0. - [Release notes](https://github.com/urllib3/urllib3/releases) - [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst) - [Commits](urllib3/urllib3@2.7.0...2.8.0) --- updated-dependencies: - dependency-name: urllib3 dependency-version: 2.8.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Shotaro Kataoka <42331656+ShotaroKataoka@users.noreply.github.com> * build(deps): bump the infra-deps group in /infra with 3 updates (#449) Bumps the infra-deps group in /infra with 3 updates: [aws-cdk-lib](https://github.com/aws/aws-cdk/tree/HEAD/packages/aws-cdk-lib), [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) and [aws-cdk](https://github.com/aws/aws-cdk-cli/tree/HEAD/packages/aws-cdk). Updates `aws-cdk-lib` from 2.272.0 to 2.274.0 - [Release notes](https://github.com/aws/aws-cdk/releases) - [Changelog](https://github.com/aws/aws-cdk/blob/main/CHANGELOG.v2.alpha.md) - [Commits](https://github.com/aws/aws-cdk/commits/v2.274.0/packages/aws-cdk-lib) Updates `@types/node` from 26.6.4 to 26.6.5 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `aws-cdk` from 2.1144.0 to 2.1146.1 - [Release notes](https://github.com/aws/aws-cdk-cli/releases) - [Commits](https://github.com/aws/aws-cdk-cli/commits/aws-cdk@v2.1146.1/packages/aws-cdk) --- updated-dependencies: - dependency-name: aws-cdk-lib dependency-version: 2.274.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: infra-deps - dependency-name: "@types/node" dependency-version: 26.6.5 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: infra-deps - dependency-name: aws-cdk dependency-version: 2.1146.1 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: infra-deps ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Shotaro Kataoka <42331656+ShotaroKataoka@users.noreply.github.com> * build(deps): bump mcp from 1.29.0 to 1.30.0 (#453) Bumps [mcp](https://github.com/modelcontextprotocol/python-sdk) from 1.29.0 to 1.30.0. - [Release notes](https://github.com/modelcontextprotocol/python-sdk/releases) - [Changelog](https://github.com/modelcontextprotocol/python-sdk/blob/main/RELEASE.md) - [Commits](modelcontextprotocol/python-sdk@v1.29.0...v1.30.0) --- updated-dependencies: - dependency-name: mcp dependency-version: 1.30.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Shotaro Kataoka <42331656+ShotaroKataoka@users.noreply.github.com> * build(deps): bump certifi from 2026.6.17 to 2026.10.18 (#454) Bumps [certifi](https://github.com/certifi/python-certifi) from 2026.6.17 to 2026.10.18. - [Commits](certifi/python-certifi@2026.06.17...2026.10.18) --- updated-dependencies: - dependency-name: certifi dependency-version: 2026.10.18 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Shotaro Kataoka <42331656+ShotaroKataoka@users.noreply.github.com> * build(deps): web-ui minor/patch group (supersedes #450) (#456) * ⬆️ build(deps): web-ui minor/patch group on top of #448 (supersedes #450) #450 conflicted with #448 on package-lock.json and Dependabot did not act on @dependabot recreate. Same package.json targets as #450 (next and dompurify already newer on main); vitest moved with @vitest/coverage-v8. Lockfile generated with npm 10.8.2. * 🐛 fix(web-ui): clear OutlineView state timers on unmount announce/flashLanding set state from window.setTimeout without cleanup. After the dependency bump the 900ms flash timer fired after jsdom teardown in CI (ReferenceError: window is not defined from OutlineView.tsx:394). * ⬆️ build(deps): Pillow 13.0.0 and pypdf 6.21.4 (security) (#460) Pillow 12.3.0 carries open critical/high alerts fixed only in 13.0.0; pypdf 6.19.0 is below the 6.21.2 fix. Pillow 13 drops Python 3.10, so the locks fork: 3.10 keeps 12.3.0, >=3.11 gets 13.0.0. None of the APIs removed in 13.0 are used. servers/remote (Python 3.13 image) moves to 13. * 💥 chore(python): require Python 3.11+ (drop 3.10) (#462) Python 3.10 reached end of life in October 2026, and Pillow 13 dropped it, so the locks forked and 3.10 resolved to the vulnerable Pillow 12.3.0 (the Pillow Dependabot alerts stayed open after #460). Raise requires-python to >=3.11 everywhere, plus the mcpb runtime and docs. The relock only removes 3.10-only entries (pillow 12.3.0, exceptiongroup, tomli, rpds-py fork). * ⬆️ build(deps): certifi 2026.10.23 and mcp 1.30.0 (security) (#464) Clears the remaining open Python alerts: certifi (critical) in servers/local/uv.lock and mcp 1.29.0 (medium, fixed in 1.30.0) in the root uv.lock. No other versions change. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…E items (#467) * 🐛 fix(html-output-mode): stop every build on an invalid deck.json outputFormat An explicit invalid outputFormat (e.g. "htlm") no longer falls through to a PPTX build: the CLI exits 1, sdpm.tools.generate_pptx raises, local and remote run_python report errors.outputFormat and build nothing, remote generate_pptx / get_preview return the error. Absent/null still means PPTX; unreadable deck.json keeps the PPTX path. Verified: uv run pytest tests/test_cli_contract.py tests/test_run_python_semantics.py tests/test_remote_html.py tests/test_entry_tools.py -q (129 passed) SPEC: 20261029-1619_html-output-mode Progress: FEAT-001 item 1 (review #2) done Next: FEAT-001 item 2 (scroll overflow of free-positioned blocks) * 🐛 fix(html-output-mode): report scroll overflow of free-positioned blocks Free-positioned top-level blocks now get the content-larger-than-box overflow finding that placeholders, regions and region children already got. Verified: uv run pytest tests/test_html_layout_judge.py tests/test_html_browser_check.py -q (24 passed, 8 real-browser skipped) SPEC: 20261029-1619_html-output-mode Progress: FEAT-001 item 2 (review #6) done Next: FEAT-001 item 3 (decoration availability by the layouts that need a render) * 🐛 fix(html-output-mode): judge decoration availability by the layouts that need a render template_html_view counted SVGs against every layout, so a template whose layouts draw only placeholders (blank-light) or a complete cache with such layouts reported decorations as unavailable without LibreOffice. It now uses the converter's predicate, template.decorations_complete (renamed from _svgs_complete, now public). Verified: uv run pytest tests/test_entry_tools.py tests/test_html_template.py -q (57 passed; both new tests fail on the old code) SPEC: 20261029-1619_html-output-mode Progress: FEAT-001 item 3 (review #8) done Next: FEAT-001 item 4 (failed-render memo with a TTL) * 🐛 fix(html-output-mode): retry a failed decoration render after ten minutes The failed-render memo held for the whole process, so a transient LibreOffice failure in a long-lived server disabled decorations until restart. The memo now stores the failure time and is reused only within FAILED_RENDER_RETRY_S (600 s). Verified: uv run pytest tests/test_html_template.py -q (16 passed) SPEC: 20261029-1619_html-output-mode Progress: FEAT-001 item 4 (review #9) done; FEAT-001 complete Next: FEAT-002 (browser-check egress, real-browser tests, CI) * 🔒 fix(html-output-mode): disable WebRTC in the browser check before slide code runs The browser check blocked http(s)/ws(s) through Fetch, but WebRTC (STUN/TURN) bypasses Fetch and the deck CSP. An egress guard installed with Page.addScriptToEvaluateOnNewDocument (page and auto-attached iframe targets) removes the RTC constructors and WebTransport and makes window.open return null; a probe after the load (top, window[n] of a fresh iframe, contentWindow, srcdoc iframe, window.open) fails the check closed before any slide runs. network_blocked is now set only after the probe. script-external flags RTCPeerConnection and stun:/turn: URLs and carries per-diag kinds. Verified: ruff clean; pytest tests/test_html_check.py tests/test_html_browser_check.py tests/test_remote_html.py: 146 passed, 8 skipped; real-browser suite 8 passed (Chrome); guard removed -> probe fails closed (manual run). SPEC: 20261029-1619_html-output-mode Progress: FEAT-002 item 5 (review #3) done Next: real-browser tests for network block, popups, WebRTC, speaker view * ✅ test(html-output-mode): real-browser tests for network block, popups, WebRTC and the speaker view New opt-in tests: network requests stopped by the deck CSP and, with the CSP removed, failed by the Fetch block (blocked_requests >= 2); window.open does not stop the check; RTCPeerConnection unreachable from top, window[n], contentWindow and srcdoc frames; overflow of a free-positioned block; the speaker view's hashed script runs under the deck CSP. The real_browser marker now skips only without SDPM_TEST_BROWSER=1, and use_browser fails when no browser is found. Verified: SDPM_TEST_BROWSER=1 pytest -k real_browser: 13 passed (Chrome, macOS); without the variable: 14 passed, 13 skipped; ruff clean. SPEC: 20261029-1619_html-output-mode Progress: FEAT-002 item 6 (review #5, #11) done Next: CI browser job * 👷 ci(html-output-mode): run the real-browser tests on ubuntu with Chrome New `browser` job: ubuntu-latest with the runner's google-chrome, the AppArmor user-namespace restriction lifted for Chrome's sandbox, SDPM_TEST_BROWSER=1, `pytest tests/test_html_browser_check.py -k real_browser -v -rs`. The use_browser fixture fails when Chrome is missing, so the job cannot go green by skipping. Verified: ci.yml parses (yaml.safe_load), jobs include browser. SPEC: 20261029-1619_html-output-mode Progress: FEAT-002 item 7 (review #5) done Next: AgentCore Browser egress canary * ✅ test(html-output-mode): AgentCore Browser egress canary scripts/verify_agentcore_browser_egress.py runs the remote server's browser check (AgentCore Browser source + api.refresh_html) on a canary deck that looks for WebRTC in every reachable window, starts ICE gathering against a public STUN server, fetches/loads https://example.com and, with --dns-domain, emits dns-prefetch / preconnect hints to a one-off host. Exit 0 only when network_blocked is true, the rtc slide reported and no WebRTC / srflx was found. Verified (dev account, ap-northeast-1): status issues (CSP refusals of the net slide), network_blocked true, blocked_requests 0, "rtc: probed 5" with no "available"/"srflx", DNS egress not verified, PASS, exit 0. SPEC: 20261029-1619_html-output-mode Progress: FEAT-002 item 8 (review #3) done Next: FEAT-002 full verification * 🐛 fix(html-output-mode): publish an HTML refresh's previews and PNGs as one revision Each build's preview/PNG epoch is now a millisecond revision strictly above every listed epoch, so two builds in the same second no longer share or lose keys. A refresh that does not commit (failed preview upload or record update) deletes its own previews and PNGs, as finalize already did. Verified: uv run pytest tests/test_remote_html.py tests/test_html_artifacts.py tests/test_api_html_routes.py -q (66 passed); ruff clean. SPEC: 20261029-1619_html-output-mode Progress: FEAT-003 item 9 (review #1) done Next: FEAT-003 item 10 (clear template-resolution error) * 🐛 fix(html-output-mode): say how to fix an HTML deck whose template does not resolve prepare_html_workspace re-raises a template resolution ValueError naming the deck.json template and pointing at apply_style(deck_id, style, template); refresh_html_deck logs that case at info level without a traceback. Verified: uv run ruff check sdpm/ servers/ shared/ api/ agent/ (clean); uv run pytest tests/ -q (1681 passed, 39 skipped). SPEC: 20261029-1619_html-output-mode Progress: FEAT-003 items 9-10 done Next: FEAT-004 (exfiltration warning surfaced, Web UI fixes) * ✨ feat(html-output-mode): warn next to Present / Download when slide scripts reach outside The static check's script-external findings ({slug, kinds}) are returned by generate_html / refresh_html as script_external, written to the deck record as htmlScriptExternal at refresh and finalize (a clean build removes it), validated and exposed by GET /decks/{id} as scriptWarnings, and shown as an "External access" badge before Present / PDF / HTML in the cloud Web UI. The agent-facing run_python result (local and remote) leaves the key out; the warnings already name these slides. Verified: uv run ruff check (clean); uv run pytest tests/test_html_api.py tests/test_remote_html.py tests/test_api_html_routes.py -q (79 passed); npx vitest run src/components/deck/SlideCarousel.test.tsx (4 passed); npx tsc --noEmit (clean). SPEC: 20261029-1619_html-output-mode Progress: FEAT-004 item 11 (review #4) done Next: FEAT-004 item 12 (finalize label, compose lanes) * 🐛 fix(html-output-mode): label the HTML finalize step, settle compose lanes when the tool completes A DeckFormatContext carries the open deck's outputFormat to the chat; the generate_pptx row (full and compact) reads "Finalizing HTML deck" when the deck or the tool result is HTML. ComposeCard treats tool success as the end of every lane still starting/working, so no lane stays "Queued" and each shows its created count. Verified: npx vitest run src/components/chat (11 files, 79 passed; the new lane test fails without the ComposeCard change); npx tsc --noEmit (clean). SPEC: 20261029-1619_html-output-mode Progress: FEAT-004 item 12 (E2E c, d) done Next: FEAT-004 item 13 (local preview route test) * ✅ test(html-output-mode): sandbox headers of the local preview route Node-environment vitest for /api/preview/[...path] against a temp SDPM_DECK_ROOT: output.html gets "sandbox allow-scripts allow-popups allow-popups-to-escape-sandbox", preview/<slug>.html gets "sandbox", both with nosniff and text/html; other .html paths are 404, paths outside the deck 403, a PNG is image/png. Verified: uv run ruff check (clean); uv run pytest tests/ -q (1686 passed, 39 skipped); cd web-ui && npx eslint src/ --quiet && npx tsc --noEmit && npm test (50 files, 406 passed) && npm run build:cloud (ok); i18n parity OK. SPEC: 20261029-1619_html-output-mode Progress: FEAT-004 items 11-13 done Next: FEAT-005 (guidance, vendor manifest, docs, changelog) * 📚 docs(html-output-mode): restore the PPTX orchestrator instructions Restore "Do not transcribe the material:", "do not substitute — say so and ask", "and the material, not the style" and "Name the form, not the style's pattern or class (...)" with their original wording; the rest stays format-neutral. Verified: uv run pytest tests/test_entry_tools.py tests/test_agent_modes.py -q -> 66 passed SPEC: 20261029-1619_html-output-mode Progress: FEAT-005 item 14 (review #7) done Next: HTML guidance (template choice, operating steps in notes, icon contrast) * 📚 docs(html-output-mode): HTML decks choose a template; operating steps go in the notes html-deck.md: a Template bullet (choose one and pass it to apply_style; deck.json keeps it); visual names the control and its effect, the operating steps go in the speaker notes. composer-html.md: the slide shows the controls, the steps go in <aside class="notes">; the layout pass's frame, regions and deck.css are for what the audience reads. slide-html-spec.md: pick the icon variant (theme_filter) that contrasts with its background. Verified: uv run pytest tests/test_entry_tools.py tests/test_remote_html.py -q -> 85 passed SPEC: 20261029-1619_html-output-mode Progress: FEAT-005 item 15 (E2E a, b, icon contrast) done Next: sdpm/vendor checksum manifest checked in CI * 🔒 chore(html-output-mode): checksum manifest for sdpm/vendor, checked in CI sdpm/vendor/SHA256SUMS (sha256sum format, ./ paths) lists every vendored file; tests/test_vendor_checksums.py checks the listed set equals the files on disk and each digest matches; the CI python job runs `sha256sum -c SHA256SUMS`; sdpm/vendor/README.md documents regeneration. Verified: uv run pytest tests/test_vendor_checksums.py -q -> 2 passed; cd sdpm/vendor && shasum -a 256 -c SHA256SUMS -> 14 OK; ci.yml parses. SPEC: 20261029-1619_html-output-mode Progress: FEAT-005 item 16 (review #12) done Next: HTML Deck Security docs (accepted risks, browser-check egress) * 📚 docs(html-output-mode): accepted risks and browser-check egress in HTML Deck Security docs/en/architecture.md: the browser check's WebRTC / WebTransport guard and probe, what network_blocked means, the AgentCore canary result (DNS hints not proven blocked); script-external findings kept on the deck record and shown next to Present / Download, shared decks included; Accepted risks: the 4-hour Present bearer URL outliving unsharing and the single bucket origin with the controls that bound it. Verified: proofread against browser_check.py, api/index.py and FEAT-002's canary output; docs only, no code change. SPEC: 20261029-1619_html-output-mode Progress: FEAT-005 item 17 (review #3, #4, #14, #15) done Next: correct stale comments (#16) * 💡 docs(html-output-mode): correct comments left from earlier phases agentcore_browser.py: the runtime role has three browser actions; composer.py: compose_slides writes .json or .html slide files, and the finalize step is generate_pptx (PPTX or output.html); decks route: HTML decks keep browser-check PNGs under preview/png/, so the thumbnail is the static HTML preview. Verified: uv run pytest tests/test_agent_modes.py -q -> 25 passed; cd web-ui && npx tsc --noEmit -> clean SPEC: 20261029-1619_html-output-mode Progress: FEAT-005 item 18 (review #16) done Next: collapse the [Unreleased] HTML entries in CHANGELOG.md * 📚 docs(html-output-mode): collapse the [Unreleased] HTML entries into the net change One "HTML output mode" Added entry describes what ships (local + cloud, Web UI player / Present / PDF / HTML, CSP, scripts with ECharts / D3, browser_check with WebRTC disabled, PNG previews, external links in new tabs, script-external warning on the deck page, invalid outputFormat stops builds, tool count 20, PPTX unchanged, deploy list). The phase entries, the guidance and js_check Changed entries, the SDPM_JS_CHECK Removed entry and the HTML Fixed entries are gone; runtime role, Python 3.10, Haiku 5.5 and Security entries are kept. Verified: no SDPM_JS_CHECK / js_check in [Unreleased]. SPEC: 20261029-1619_html-output-mode Progress: FEAT-005 item 19 (review #13) done Next: whole-branch verification (item 20) * 🐛 fix(html-output-mode): finalize removes its previews when the record update fails refresh deletes an uncommitted run's previews and PNGs (1e3f5186), but finalize_html_deck only did so for a failed preview upload: a failed record update left the new-revision previews winning the key map over the record's older output.html. finalize now deletes this run's previews before re-raising. Verified: uv run ruff check sdpm/ servers/ shared/ api/ agent/ -> clean; uv run pytest tests/ -q -> 1689 passed, 39 skipped (new test_generate_pptx_record_failure_removes_this_runs_previews fails without the fix). SPEC: 20261029-1619_html-output-mode Progress: integration of FEAT-001..005; finalize matches refresh on uncommitted builds Next: integration review verdict * 📚 docs(html-output-mode): every visible text names the content; operating steps only in the notes Composers still drew operating instructions as captions, hint lines and the starting text of fields a control fills (E2E iteration 1: 4 of 10 scripted slides in fceb8dfc / b861428b). composer-html.md and slide-html-spec.md now say that every visible text, captions, labels and a field's starting text included, names the content, and that how to operate the slide is written only in <aside class="notes">. html-deck.md's review step sends such a slide back to its composer. Ran: uv run pytest -q tests/test_entry_tools.py tests/test_run_python_semantics.py (pass) SPEC: 20261029-1619_html-output-mode Progress: operating-instruction guidance tightened for composer and orchestrator review Next: redeploy to dev and re-run the final E2E * 📚 docs(html-output-mode): composer checks each icon against its background in the PNG E2E iteration 1 (9c52ea4c concept) again drew black icons on the dark aws-dark background. The composer's PNG check now names icon contrast and points to search_assets theme_filter for the other variant. Ran: make lint (pass); make test (1687 passed, 39 skipped) SPEC: 20261029-1619_html-output-mode Progress: icon-contrast guidance added to the composer's check step Next: redeploy to dev and re-run the final E2E * 🔒 chore(html-output-mode): suppress semgrep path-join finding in the preview route test fixture The CI ASH scan (semgrep, HIGH) flagged path.join(root, rel) in the test's write() helper. root is a mkdtemp directory and rel is a literal fixture path, so annotate it with the same nosemgrep comment the other tmpdir fixtures use. Test-only change; no runtime behaviour changes. Verified: npx vitest run src/app/api/preview -> 5 passed; ash --mode local --fail-on-findings -> exit 0 (semgrep/bandit/checkov/ detect-secrets PASSED). SPEC: 20261029-1619_html-output-mode Progress: CI scan job failure on PR #467 fixed Next: watch PR #467 checks until all green * 🐛 fix(html-output-mode): last low review items before merge - Icon guidance: theme_filter picks a light/dark variant; SVG icons without variants (Material) are recoloured with CSS fill - Remote _deck_format and tools._is_html_deck treat a non-object deck.json as PPTX - orchestrator.md: restore main's PPTX wording ("only when", visual definition) - .gitattributes: sdpm/vendor/** -text so vendor checksums hold on CRLF checkouts - architecture.md: unproven DNS hints in the cloud browser check as an accepted risk - template.py: fix the garbled comment above FAILED_RENDER_RETRY_S SPEC: 20261029-1619_html-output-mode Progress: PR #467 review low items closed Next: merge #467, then dev/html-output -> main
#466 brought main's content in as a squash commit, so main's commits were not ancestors of dev/html-output and a main PR would conflict. This merge records them as parents. The tree is identical to dev/html-output a43b1d2: both conflicts (CHANGELOG.md, servers/remote/constraints.txt) resolved to the dev/html-output side, which already holds main's changes. SPEC: 20261029-1619_html-output-mode Progress: dev/html-output contains main by ancestry Next: PR dev/html-output -> main
🔀 chore: merge main into dev/html-output (ancestry only)
This was referenced Oct 31, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the HTML output mode: a deck can be a browser presentation (reveal.js 6, one offline
output.html) instead of a PPTX, locally and on the AWS stack. The full user-facing description is the[Unreleased]→ Added entry inCHANGELOG.md.What lands
sdpm.engine.html(assembly, CSP with per-script sha256, static checks, browser check with network blocked and PNG previews, template → HTML conversion). reveal.js / ECharts / D3 are vendored undersdpm/vendor/, with a checksum manifest checked in CI.init_deck_workspace(..., output_format="html")returnsformat_notes;start_composing(..., mode="html")servescomposer-html.md. The tool count stays at 20.bedrock-agentcorebrowser actions, scoped toaws.browser.v1), HTML artifacts underhtml/served only via presigned URLs.Verification
make lint/make test(1693 passed / 39 skipped), CI green including the real-browser job, ASH local--fail-on-findingsexit 0.websocketsas an optional extra) left as is by decision.Known follow-ups (not in this PR)
fill="currentColor"needs a decision.Deploy
SdpmData, SdpmRuntime, SdpmAgent, SdpmWebUi and the Web UI (
scripts/deploy_webui.sh).