@cyber-dash-tech/revela 0.1.14 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/README.zh-CN.md +5 -5
- package/designs/monet/DESIGN.md +2736 -0
- package/lib/commands/pdf.ts +2 -2
- package/package.json +2 -1
- package/plugin.ts +4 -4
- package/skill/SKILL.md +10 -10
- package/tools/qa.ts +2 -2
package/lib/commands/pdf.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Handler for `/revela pdf <file_path>` — exports an HTML slide deck to PDF.
|
|
5
5
|
*
|
|
6
6
|
* Output: same directory and base name as the input, with .pdf extension.
|
|
7
|
-
* Example:
|
|
7
|
+
* Example: decks/my-deck.html → decks/my-deck.pdf
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { resolve } from "path"
|
|
@@ -17,7 +17,7 @@ export async function handlePdf(
|
|
|
17
17
|
if (!filePath) {
|
|
18
18
|
await send(
|
|
19
19
|
"**Usage:** `/revela pdf <file_path>`\n\n" +
|
|
20
|
-
"Example: `/revela pdf
|
|
20
|
+
"Example: `/revela pdf decks/my-deck.html`"
|
|
21
21
|
)
|
|
22
22
|
return
|
|
23
23
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyber-dash-tech/revela",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"description": "OpenCode plugin that turns AI into an HTML slide deck generator",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.ts",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"skill/",
|
|
15
15
|
"designs/aurora/DESIGN.md",
|
|
16
16
|
"designs/summit/DESIGN.md",
|
|
17
|
+
"designs/monet/DESIGN.md",
|
|
17
18
|
"domains/general/INDUSTRY.md",
|
|
18
19
|
"domains/deeptech-investment/INDUSTRY.md",
|
|
19
20
|
"domains/consulting/INDUSTRY.md",
|
package/plugin.ts
CHANGED
|
@@ -343,7 +343,7 @@ const server: Plugin = (async (pluginCtx) => {
|
|
|
343
343
|
// Handles PDF and images — read tool succeeds with base64 attachment.
|
|
344
344
|
// PDF: extract text, remove base64. Images: jimp compress.
|
|
345
345
|
//
|
|
346
|
-
// Also handles: auto layout QA after writing
|
|
346
|
+
// Also handles: auto layout QA after writing decks/*.html
|
|
347
347
|
"tool.execute.after": async (input, output) => {
|
|
348
348
|
if (!ctx.enabled) return
|
|
349
349
|
|
|
@@ -360,11 +360,11 @@ const server: Plugin = (async (pluginCtx) => {
|
|
|
360
360
|
return
|
|
361
361
|
}
|
|
362
362
|
|
|
363
|
-
// ── Auto layout QA after writing
|
|
363
|
+
// ── Auto layout QA after writing decks/*.html ─────────────────────
|
|
364
364
|
if (input.tool === "write") {
|
|
365
365
|
const filePath: string = input.args?.filePath ?? ""
|
|
366
|
-
// Only trigger for HTML files inside a
|
|
367
|
-
if (!filePath.match(/
|
|
366
|
+
// Only trigger for HTML files inside a decks/ directory
|
|
367
|
+
if (!filePath.match(/decks\/[^/]+\.html$/)) return
|
|
368
368
|
|
|
369
369
|
try {
|
|
370
370
|
// Extract design's allowed class vocabulary for compliance checking
|
package/skill/SKILL.md
CHANGED
|
@@ -38,7 +38,7 @@ to Phase 1.5.
|
|
|
38
38
|
|
|
39
39
|
Once you have the user's answers, **derive the deck slug** from the topic:
|
|
40
40
|
lowercase, hyphens, no spaces (e.g. "AI Investment Shift" → `ai-investment-shift`).
|
|
41
|
-
Tell the user: "I'll save this deck as `
|
|
41
|
+
Tell the user: "I'll save this deck as `decks/{slug}.html`." They can correct the
|
|
42
42
|
name at this point.
|
|
43
43
|
|
|
44
44
|
### Phase 1.5 — Deck Initialization & Resume Check
|
|
@@ -65,7 +65,7 @@ After confirming the deck slug, check whether this deck has been worked on befor
|
|
|
65
65
|
- **c** → proceed to Phase 2 normally (full research)
|
|
66
66
|
|
|
67
67
|
All subsequent file paths in this session use the confirmed slug:
|
|
68
|
-
- Slides file: `
|
|
68
|
+
- Slides file: `decks/{slug}.html`
|
|
69
69
|
- Research dir: `researches/{slug}/`
|
|
70
70
|
|
|
71
71
|
### Phase 2 — Select Design
|
|
@@ -345,19 +345,19 @@ Then ask:
|
|
|
345
345
|
Once the fetch is complete, generate the complete HTML file in one shot.
|
|
346
346
|
|
|
347
347
|
- Output **only** the raw HTML — no markdown fences, no explanation before or after
|
|
348
|
-
- Create a `
|
|
349
|
-
- Write the file to `
|
|
348
|
+
- Create a `decks/` directory in the current working directory if it doesn't already exist
|
|
349
|
+
- Write the file to `decks/{slug}.html` using the deck slug confirmed in Phase 1.5
|
|
350
350
|
- The file must be completely self-contained (all CSS and JS inline)
|
|
351
351
|
|
|
352
352
|
### Phase 6 — Iterate
|
|
353
353
|
|
|
354
354
|
After generating, briefly tell the user:
|
|
355
|
-
- The filename you wrote (e.g. `
|
|
355
|
+
- The filename you wrote (e.g. `decks/ai-future.html`)
|
|
356
356
|
- How to navigate (arrow keys / swipe)
|
|
357
357
|
- One line invitation to request changes
|
|
358
358
|
|
|
359
359
|
For change requests: re-generate the **entire** file (don't patch). Apply the
|
|
360
|
-
change and silently overwrite the same `
|
|
360
|
+
change and silently overwrite the same `decks/{slug}.html` filename.
|
|
361
361
|
|
|
362
362
|
---
|
|
363
363
|
|
|
@@ -474,11 +474,11 @@ decorative fill patterns.
|
|
|
474
474
|
|
|
475
475
|
| Topic | Filename |
|
|
476
476
|
|-------|----------|
|
|
477
|
-
| "AI in Healthcare" | `
|
|
478
|
-
| "Q3 Sales Review" | `
|
|
479
|
-
| "Intro to Python" | `
|
|
477
|
+
| "AI in Healthcare" | `decks/ai-in-healthcare.html` |
|
|
478
|
+
| "Q3 Sales Review" | `decks/q3-sales-review.html` |
|
|
479
|
+
| "Intro to Python" | `decks/intro-to-python.html` |
|
|
480
480
|
|
|
481
|
-
Lowercase, hyphens, no spaces, `.html` extension. Always place files inside the `
|
|
481
|
+
Lowercase, hyphens, no spaces, `.html` extension. Always place files inside the `decks/` subdirectory.
|
|
482
482
|
|
|
483
483
|
---
|
|
484
484
|
|
package/tools/qa.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Exposed to the LLM so it can run layout checks after writing a slides file.
|
|
7
7
|
* Also called automatically by the tool.execute.after hook in plugin.ts
|
|
8
|
-
* when the LLM writes a file matching
|
|
8
|
+
* when the LLM writes a file matching decks/*.html.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import { tool } from "@opencode-ai/plugin"
|
|
@@ -21,7 +21,7 @@ export default tool({
|
|
|
21
21
|
"Checks for: canvas underfill (too much empty space), bottom whitespace, " +
|
|
22
22
|
"left-right column asymmetry, element overflow, and card height variance. " +
|
|
23
23
|
"Returns a structured report with specific issues and fix instructions. " +
|
|
24
|
-
"Call this after writing or editing any
|
|
24
|
+
"Call this after writing or editing any decks/*.html file to verify layout quality.",
|
|
25
25
|
args: {
|
|
26
26
|
file: tool.schema
|
|
27
27
|
.string()
|