v0.2.0-alpha: DOM capture, all three output slices, lead gates
- Extension DOM mode: auth-context serializer — inlines CSS + images as data URLs, freezes form state, masks [data-dp-mask], strips scripts (R3 client) - API: extractDataUrls rewrites large inline resources into content-addressed assets (R3 server; verified 939KB inline -> 82-byte row + served asset) - Lead-gate steps: config on step, player overlay form blocks advance, submits to leads endpoint (editor toggle + MCP set_lead_gate) - Step-guide export (v2 slice): authed markdown + public HTML at /p/:token/guide - Video export (v3 slice, v0): ffmpeg slideshow of image steps + optional narration mux; DOM rasterization deferred to Chromium service (R4) - Editor: reorder arrows, embed-code copy, guide link, video export - REST reorder endpoint; MCP surface now 13 tools (export_guide, set_lead_gate, render_video) - ffmpeg added to runtime image E2E verified incl. R3 extraction round-trip, lead_gate in public JSON, guide renders, MCP agent exported guide + rendered video.
This commit is contained in:
parent
9b09f14916
commit
a535e15253
18 changed files with 541 additions and 22 deletions
|
|
@ -1,11 +1,17 @@
|
|||
// Screenshot-flow capture: on each click in the recorded tab, grab a screenshot
|
||||
// plus the click position, building image Steps with pre-placed hotspots.
|
||||
let recording = { active: false, tabId: null, steps: [] };
|
||||
let recording = { active: false, tabId: null, mode: "screenshot", steps: [] };
|
||||
|
||||
chrome.runtime.onMessage.addListener((msg, sender, sendResponse) => {
|
||||
if (msg.type === "start") {
|
||||
recording = { active: true, tabId: msg.tabId, steps: [] };
|
||||
chrome.scripting.executeScript({ target: { tabId: msg.tabId }, files: ["content.js"] });
|
||||
recording = { active: true, tabId: msg.tabId, mode: msg.mode || "screenshot", steps: [] };
|
||||
chrome.scripting.executeScript({
|
||||
target: { tabId: msg.tabId },
|
||||
files: [recording.mode === "dom" ? "dom-content.js" : "content.js"],
|
||||
});
|
||||
sendResponse({ ok: true });
|
||||
} else if (msg.type === "domstep" && recording.active && sender.tab?.id === recording.tabId) {
|
||||
recording.steps.push({ html: msg.html, xPct: msg.xPct, yPct: msg.yPct });
|
||||
sendResponse({ ok: true });
|
||||
} else if (msg.type === "click" && recording.active && sender.tab?.id === recording.tabId) {
|
||||
chrome.tabs.captureVisibleTab({ format: "png" }, (dataUrl) => {
|
||||
|
|
@ -17,7 +23,7 @@ chrome.runtime.onMessage.addListener((msg, sender, sendResponse) => {
|
|||
sendResponse({ active: recording.active, count: recording.steps.length });
|
||||
} else if (msg.type === "stop") {
|
||||
recording.active = false;
|
||||
sendResponse({ steps: recording.steps });
|
||||
sendResponse({ steps: recording.steps, mode: recording.mode });
|
||||
} else if (msg.type === "discard") {
|
||||
recording = { active: false, tabId: null, steps: [] };
|
||||
sendResponse({ ok: true });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue