Skip to content
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
90d920c
feat(html-output-mode): HTML deck output with reveal.js (phase 1) (#440)
ShotaroKataoka Oct 29, 2026
7c895b3
Merge remote-tracking branch 'origin/main' into dev/html-output
ShotaroKataoka Oct 29, 2026
62883d1
✨ feat(html-output-mode): cloud support for HTML decks (phase 2) (#444)
ShotaroKataoka Oct 29, 2026
d621bf5
fix(html-output-mode): phase 2 review follow-ups (#445)
ShotaroKataoka Oct 29, 2026
1333e13
✨ feat(html-output-mode): slide scripts with ECharts and D3 (phase 3)…
ShotaroKataoka Oct 30, 2026
cc84e1e
📚 docs(html-output-mode): lead HTML decks with interaction, not revea…
ShotaroKataoka Oct 30, 2026
de5e202
🐛 fix(html-output-mode): report skipped JS checks, stop at navigation…
ShotaroKataoka Oct 30, 2026
23436df
🐛 fix(html-output-mode): open external links in a new tab, print temp…
ShotaroKataoka Oct 30, 2026
3c7570b
🐛 fix(html-output-mode): fill the area around HTML slides with the sl…
ShotaroKataoka Oct 30, 2026
40098df
feat(html-output-mode): phase 4 — browser check, layout warnings and …
ShotaroKataoka Oct 30, 2026
bf2d828
♻️ refactor(html-output-mode): slim down the HTML deck guidance, form…
ShotaroKataoka Oct 30, 2026
9d4a7ac
🔀 chore: merge main into dev/html-output (#466)
ShotaroKataoka Oct 30, 2026
a43b1d2
🐛 fix(html-output-mode): pre-merge review fixes (#1–#16) and final E2…
ShotaroKataoka Oct 31, 2026
d375e8b
🔀 chore: merge main into dev/html-output (ancestry only)
ShotaroKataoka Oct 31, 2026
919d3a4
🔀 chore: merge main into dev/html-output (ancestry only) (#468)
ShotaroKataoka Oct 31, 2026
c799669
🔒 fix(html-output-mode): script-tag regexes accept any end-tag form (…
ShotaroKataoka Oct 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .ash.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ global_settings:
catalog (search_assets names). Vector geometry, not credentials.
expiration: "2027-09-27"

- rule_id: "SECRET-BASE64-HIGH-ENTROPY-STRING"
path: "tests/test_html_csp.py"
reason: >
SPEAKER_VIEW_HASH_6_0_2 pins the public CSP sha256 hash of the reveal.js 6.0.2
speaker-view script, so a vendor update that changes the script fails the test.
A digest of public code, not a credential.
expiration: "2027-10-31"

# --- CFn Custom Resource: urlopen to pre-signed ResponseURL ---
# Standard pattern for CloudFormation custom resources.
# The URL is the CFn-provided ResponseURL, not user-controlled.
Expand Down
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Vendored files are checked against upstream SHA256SUMS; keep their bytes unchanged on checkout.
sdpm/vendor/** -text
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
- uses: astral-sh/setup-uv@v10.3.2
- name: Lint
run: uv run ruff check sdpm/ servers/ shared/ api/ agent/
- name: Vendored files match the manifest
run: cd sdpm/vendor && sha256sum -c SHA256SUMS
- name: Test
run: uv run pytest tests/ -v --cov=sdpm --cov-report=term

Expand All @@ -38,6 +40,26 @@ jobs:
- name: Smoke test local MCP server
run: uv run python scripts/smoke_local.py

# The HTML browser check against a real Chrome: network block, popups, WebRTC
# removal, layout measurement and the speaker view under the deck CSP. The
# fixture fails (not skips) when no browser is found.
browser:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.12"
- uses: astral-sh/setup-uv@v10.3.2
- name: Allow Chrome's sandbox (Ubuntu 24.04 restricts unprivileged user namespaces)
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
- name: Real-browser tests
env:
SDPM_TEST_BROWSER: "1"
SDPM_BROWSER: google-chrome
run: google-chrome --version && command -v lsof && uv run pytest tests/test_html_browser_check.py -k real_browser -v -rs

web-ui:
runs-on: ubuntu-latest
steps:
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,9 @@ output/
desktop/src-tauri/gen/schemas/acl-manifests.json
desktop/src-tauri/gen/schemas/desktop-schema.json
desktop/src-tauri/gen/schemas/macOS-schema.json

# git worktrees created by agent workflows
.worktrees/
# agent workflow scratch (plans, reviews, verification evidence); plugins/ stays tracked
.agents/*
!.agents/plugins/
29 changes: 20 additions & 9 deletions .kiro/steering/principles.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ The SPEC agent handles user dialogue (Phase 1). Composer agents handle slide gen
(Phase 2+3) via the `compose_slides` tool (Agents as Tools pattern).

Role and procedure text lives in `sdpm/references/workflows/<role>.md` (orchestrator,
composer, style, translate) and reaches MCP clients through the role's entry tool
(`start_presentation` / `start_composing` / `start_style` / `start_translation`), which also
returns what that role reads first (`sdpm.entry`).
composer, style, translate; the composer's html mode in `composer-html.md`) and reaches MCP
clients through the role's entry tool (`start_presentation` / `start_composing` /
`start_style` / `start_translation`), which also returns what that role reads first
(`sdpm.entry`).
Client-side files are thin wiring (composer sub-agent registration) that name a role
document without restating it. The L4 agent fetches role documents through the same
port (`Source.mcp("start_*", pick="static.workflow")` in `agent/modes/`); only transport-specific
Expand Down Expand Up @@ -55,20 +56,30 @@ Rules that follow from this:
hexagonal purity for one less abstraction — acceptable while there is a
single cloud backend. Revisit only if a second backend appears.
4. **Role documents are content, not client config** ("server-driven behavior").
Each role (orchestrator, composer, style, translate) has exactly one document,
`sdpm/references/workflows/<role>.md`, served through the port via
the role's `start_*` entry tool. Entry points (the `sdpm-*` prompts, ACP agent
Each role (orchestrator, composer, style, translate) has exactly one document per
mode, `sdpm/references/workflows/<role>.md`, served through the port via
the role's `start_*` entry tool. The composer has two modes, pptx (`composer.md`) and
html (`composer-html.md`); the spawner chooses the mode through the entry tool argument
(`start_composing(..., mode=…)`) at dispatch time — never inferred from deck contents —
and the entry tool's `static` part depends only on the mode. Entry points (the `sdpm-*` prompts, ACP agent
definitions, `SKILL.md`, server instructions) only ever name a role document — they
never restate or duplicate its content. Nothing else lives on the client side: a client
holds the one line that starts the server, written by `sdpm register`.

Role assignment is a dispatch-time decision, not a discovery-time one: a
spawner (the orchestrator delegating to a composer, a prompt dispatching a
role, a client picking a mode) tells the spawned agent which role to load in
its first instruction. The agent then calls `start_<role>(...)`
itself. There is no docstring heuristic to infer role from arguments, and no
role, a client picking a mode) tells the spawned agent which role — and, for the
composer, which mode — to load in its first instruction. The agent then calls
`start_<role>(...)` itself, passing the mode as an argument. There is no docstring heuristic to infer role from arguments, and no
case where a role's text is embedded into a system prompt instead of fetched
— every consumer, including the L4 agent, fetches live.

Writing role documents and guides: state what the agent can do (its tools and their
range) and what it should do, in positive form rather than "X is not Y" / "do not X";
give no concrete examples or form-to-interaction tables (models copy them); leave out
what a check already stops (static checks, CSP, browser check) — the warning itself
says how to fix it. Format-specific notes for the orchestrator come from
`init_deck_workspace` (`format_notes`), keeping `orchestrator.md` format-neutral.
5. **Change-locality goal** — the structure is optimised so that:
prompt changes touch only `sdpm/references/workflows/`; engine changes touch only
`sdpm/sdpm/engine/`; a new MCP client touches only the client table in
Expand Down
11 changes: 7 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ docs/ Documentation
are peers. `sdpm.tools` defines every MCP tool once — names, schemas,
docstrings, logic — and both servers register those functions directly. Role and
procedure text is content, not client config: `sdpm/references/workflows/<role>.md`
(orchestrator, composer, style, translate) is the single definition for each role,
delivered to any MCP client by the `start_*` entry tools (`start_presentation`,
(orchestrator, composer, style, translate) is the single definition for each role — one
document per mode for the composer (`composer.md` for pptx, `composer-html.md` for html),
the mode chosen by the spawner through `start_composing(..., mode=…)` — delivered to any MCP client by the `start_*` entry tools (`start_presentation`,
`start_composing`, `start_style`, `start_translation`), each of which also returns what
that role reads first. Nothing lives on the client side: `sdpm register`
(`servers/local/client_config.py`) writes the one line that starts the server into each
Expand All @@ -75,8 +76,10 @@ See [Architecture](docs/en/architecture.md).
## Conventions

- Engine source of truth: `sdpm/sdpm/` — servers must stay thin binds of `sdpm.tools`
- Role + procedure text lives only in `sdpm/references/workflows/<role>.md`; `SKILL.md`,
the ACP agent definitions and server instructions are dispatch/environment only
- Role + procedure text lives only in `sdpm/references/workflows/<role>.md`, one document
per mode (composer: `composer.md` / `composer-html.md`, chosen by the spawner via
`start_composing`'s `mode` argument); `SKILL.md`, the ACP agent definitions and server
instructions are dispatch/environment only
- Client configuration is generated, never hand-written: one template in
`servers/local/client_config.py` (absolute `uv` + absolute checkout, no launcher, no
`PATH`), rendered per client; `tests/test_client_config.py` guards it. Both launchers
Expand Down
47 changes: 47 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,59 @@ Entries before v0.5.0 were written retroactively as summaries.

### Added

- **HTML output mode.** A deck can be a browser presentation instead of a PPTX, locally and
on the AWS stack. Ask for an HTML / browser deck, write `@format:html`, or use the
**Build as HTML** pill (「HTML で作成」) on the first chat screen (also in the `/` picker's
**Format** section; PPTX stays the default). The deck gets `deck.json`
`outputFormat: "html"` (`init_deck_workspace(name, output_format="html")`, which also
returns `format_notes`, the `html-deck` guide), and composers are dispatched with
`start_composing(deck_id, assigned_slugs, mode="html")`, which returns the HTML composer
document, the template's converted layouts and the deck's shared `deck.css`. HTML decks
choose a template and style as PPTX decks do (`apply_style(deck_id, style, template)`);
template decorations are converted to SVG when LibreOffice and poppler are installed.
Each slide is an HTML fragment under `slides/`; `run_python` assembles them into one
offline `output.html` on reveal.js 6 with speaker notes (`S` opens the speaker view), and
every image is embedded. Slides may run inline scripts, with Apache ECharts 6.1.0 and D3
7.9.0 embedded only in decks that declare them (`<section data-libs="echarts d3">`); all
three libraries are vendored under `sdpm/vendor/` with their licenses and a checksum
manifest checked in CI. `output.html` carries a Content-Security-Policy that allows only
the engine's scripts and each slide's inline scripts by sha256 hash, plus `data:` images,
fonts and media (`connect-src 'none'`, no-referrer), and every external link opens in a new
tab. Static checks cover structure, layouts and placeholders, fonts, `deck.css`, embedded
sizes, CSP-blocked constructs and scripts that reach outside the deck (`script-external`:
navigation, new tabs, external URLs, WebRTC). After each build that changes slides, the
browser check opens those slides in a browser (locally headless Chrome or Edge, in the
cloud AWS AgentCore Browser) with network requests blocked and WebRTC disabled before slide
code runs, reports layout findings (`overlap`, `overflow`, `outside-region`,
`decoration-overlap`) and JS errors as warnings (`browser_check` in the result;
`SDPM_BROWSER=none` turns it off), and leaves a PNG per slide (`preview_files` locally,
`get_preview` in the cloud). A skipped, stopped or unfinished check is reported as such,
never as clean. In the Web UI an HTML deck plays in a sandboxed in-app player with
**Present** (new tab, link valid for 4 hours), **PDF** (print view, template backgrounds
included) and **HTML** (download `output.html`); slides whose scripts reach outside the
deck are listed in a warning next to Present / Download, on shared decks too. Thumbnails
are static per-slide HTML in `sandbox=""` iframes; the local Web UI has one **Open**
button. Sharing and public decks work as for PPTX; HTML files live under `html/` in the
deck bucket and are served only through presigned URLs. The CLI gains `generate_html
<deck>`. Translation, PPTX import, hand-edit sync, `code_to_slide` and the local
`generate_pptx` refuse HTML decks with a message, and an invalid `deck.json`
`outputFormat` stops every build. New dependency: `websockets`. The local Web UI dev
servers (`npm run dev`, `npm run dev:local`) now listen on 127.0.0.1 only. PPTX behaviour
is unchanged and the MCP tool count stays at 20. Deploy: SdpmData, SdpmRuntime,
SdpmAgent, SdpmWebUi and the Web UI.
- **Claude Haiku 5.5** is a selectable model (`global.anthropic.claude-haiku-5-5`) for
both Chat and Create. It uses the extended-thinking profile (no `temperature`; Bedrock
rejects 0.1 with "temperature is deprecated"), with prompt caching enabled, and is
listed in the example config's Recommended group. Unlike Haiku 4.5 it is not
excluded from the Create picker.

### Changed

- **AgentCore runtime role.** The MCP runtime role gains
`bedrock-agentcore:StartBrowserSession`, `StopBrowserSession` and
`ConnectBrowserAutomationStream` on `arn:aws:bedrock-agentcore:<region>:aws:browser/aws.browser.v1`
only.

### Removed

- **Python 3.10 is no longer supported (breaking).** `requires-python` is now `>=3.11`
Expand Down
38 changes: 36 additions & 2 deletions THIRD-PARTY-LICENSES
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
This project does not include any third-party code or assets that require attribution
beyond the dependencies listed in pyproject.toml / package.json.
This project includes the following third-party code, copied verbatim:

reveal.js 6.0.2
https://github.com/hakimel/reveal.js
License: MIT
Copyright (C) 2011-2026 Hakim El Hattab, http://hakim.se, and reveal.js contributors
Location: sdpm/vendor/revealjs/ (full license text in sdpm/vendor/revealjs/LICENSE)

marked 17.x (bundled by reveal.js into sdpm/vendor/revealjs/plugin/notes.js)
https://github.com/markedjs/marked
License: MIT
Copyright (c) 2018+, MarkedJS (https://github.com/markedjs/)
Copyright (c) 2011-2018, Christopher Jeffrey (https://github.com/chjj/)

Apache ECharts 6.1.0
https://github.com/apache/echarts
License: Apache-2.0
NOTICE:
Apache ECharts
Copyright 2017-2026 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (https://www.apache.org/).
Includes parts of d3, License: BSD-3-Clause (sdpm/vendor/echarts/licenses/LICENSE-d3)
Location: sdpm/vendor/echarts/ (full license text in sdpm/vendor/echarts/LICENSE)

D3 7.9.0
https://github.com/d3/d3
License: ISC
Copyright 2010-2023 Mike Bostock
Location: sdpm/vendor/d3/ (full license text in sdpm/vendor/d3/LICENSE)

Generated HTML decks (output.html) always embed reveal.js and marked, and embed
ECharts / D3 only when a slide declares them, each preceded by its license notice.

Beyond that, the project relies only on the dependencies listed in
pyproject.toml / package.json.

All third-party dependencies are installed at build time and are subject to their
respective licenses.
18 changes: 18 additions & 0 deletions agent/modes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,23 @@ def _orchestrator(*wiring: Part, use_composer: bool = True, **overrides) -> Mode
allowed_tools=_DECK_TOOLS,
)

# HTML composer: the html mode of the same entry tool (composer-html workflow +
# slide HTML spec). compose_slides picks it for decks with outputFormat html.
_HTML_COMPOSER = ModeConfig(
parts=[
Part(
Source.mcp("start_composing", {"mode": "html"}, pick="static.workflow"),
target="system", label="workflow:composer-html",
),
Part(
Source.mcp("start_composing", {"mode": "html"}, pick="static.slide_spec"),
target="system", label="slide-html-spec",
),
],
use_composer=False,
allowed_tools=_DECK_TOOLS,
)

_STYLE_CREATOR = ModeConfig(
parts=[
_COMMON_LANGUAGE,
Expand All @@ -131,5 +148,6 @@ def _orchestrator(*wiring: Part, use_composer: bool = True, **overrides) -> Mode
"vibe": _ORCHESTRATOR_FAST,
"spec": _ORCHESTRATOR_DIALOGUE,
"composer": _COMPOSER,
"html_composer": _HTML_COMPOSER,
"style_creator": _STYLE_CREATOR,
}
Loading
Loading