@cyber-dash-tech/revela 0.1.16 → 0.2.0
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 +87 -90
- package/README.zh-CN.md +90 -93
- package/lib/commands/help.ts +2 -1
- package/lib/commands/pptx.ts +75 -0
- package/lib/pptx/export.ts +974 -0
- package/package.json +2 -1
- package/plugin.ts +5 -0
package/README.md
CHANGED
|
@@ -2,36 +2,38 @@
|
|
|
2
2
|
|
|
3
3
|
**English** | [中文](README.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/@cyber-dash-tech/revela) [](LICENSE) [](https://www.npmjs.com/package/@cyber-dash-tech/revela) [](LICENSE) [](tests/) [](https://opencode.ai) [](https://bun.sh)
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
8
|
<img src="assets/img/logo.png" alt="Revela" width="800" />
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
11
|
Revela is an [OpenCode](https://opencode.ai) plugin that turns your current agent into an HTML slide deck generator.
|
|
12
|
-
Enable it for
|
|
12
|
+
Enable it for the current session, assign a presentation task, and the agent can research, structure, write, QA, and export a deck.
|
|
13
13
|
|
|
14
|
-
**[Live Demo — The AI Power Shift](https://cyber-dash-tech.github.io/revela/assets/html/ai-power-shift.html)**
|
|
14
|
+
**[Live Demo — The AI Power Shift](https://cyber-dash-tech.github.io/revela/assets/html/ai-power-shift.html)**
|
|
15
15
|
|
|
16
16
|
---
|
|
17
17
|
|
|
18
|
-
## What
|
|
18
|
+
## What It Does
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
- injects a presentation-specific system prompt into your current agent with `/revela enable`
|
|
21
|
+
- builds that prompt from 3 layers: core skill, active domain, active design
|
|
22
|
+
- supports workspace document discovery plus transparent extraction for `.pdf`, `.docx`, `.pptx`, and `.xlsx`
|
|
23
|
+
- runs automatic layout QA whenever the agent writes `decks/*.html`
|
|
24
|
+
- exports finished decks to PDF and editable PPTX
|
|
25
|
+
- switches designs and domains locally with zero LLM cost
|
|
21
26
|
|
|
22
|
-
|
|
23
|
-
- the prompt is built from 3 layers: core skill, active domain, active design
|
|
24
|
-
- the agent can scan workspace files, delegate web research, generate HTML slides, and run layout QA automatically
|
|
25
|
-
- design and domain switching happen locally and rebuild the active prompt immediately
|
|
27
|
+
Revela is a mode, not a separate agent.
|
|
26
28
|
|
|
27
29
|
---
|
|
28
30
|
|
|
29
31
|
## Requirements
|
|
30
32
|
|
|
31
33
|
- [OpenCode](https://opencode.ai)
|
|
32
|
-
- Bun runtime
|
|
33
|
-
- [Google Chrome](https://www.google.com/chrome/) or Chromium for
|
|
34
|
-
- Git
|
|
34
|
+
- Bun runtime `>= 1.0.0`
|
|
35
|
+
- [Google Chrome](https://www.google.com/chrome/) or Chromium for QA, PDF export, and PPTX export
|
|
36
|
+
- Git if you install from source
|
|
35
37
|
|
|
36
38
|
---
|
|
37
39
|
|
|
@@ -48,19 +50,13 @@ Add `@cyber-dash-tech/revela` to the `plugin` array in `opencode.json`:
|
|
|
48
50
|
}
|
|
49
51
|
```
|
|
50
52
|
|
|
51
|
-
Restart OpenCode.
|
|
53
|
+
Restart OpenCode.
|
|
52
54
|
|
|
53
|
-
To install globally, add the same
|
|
55
|
+
To install globally, add the same entry to `~/.config/opencode/opencode.json`.
|
|
54
56
|
|
|
55
57
|
### Local wrapper install
|
|
56
58
|
|
|
57
|
-
Use this when
|
|
58
|
-
|
|
59
|
-
- Bun plugin install is blocked or unreliable
|
|
60
|
-
- you are on a mainland China network
|
|
61
|
-
- you want to run Revela from a local checkout
|
|
62
|
-
|
|
63
|
-
From source:
|
|
59
|
+
Use this when Bun-based plugin install is blocked, unreliable, or you want to run from a local checkout.
|
|
64
60
|
|
|
65
61
|
```bash
|
|
66
62
|
git clone https://github.com/cyber-dash-tech/revela
|
|
@@ -74,41 +70,44 @@ Create `~/.config/opencode/plugins/revela.js`:
|
|
|
74
70
|
export { default } from "/absolute/path/to/revela/index.ts";
|
|
75
71
|
```
|
|
76
72
|
|
|
77
|
-
If you use the local wrapper route,
|
|
73
|
+
If you use the local wrapper route, remove any `@cyber-dash-tech/revela` entry from `opencode.json`, otherwise OpenCode may still try Bun installation.
|
|
78
74
|
|
|
79
75
|
### China mainland note
|
|
80
76
|
|
|
81
|
-
OpenCode's npm plugin installer uses Bun and may ignore npm mirror
|
|
77
|
+
OpenCode's npm plugin installer uses Bun and may ignore npm mirror settings. If direct installation fails, prefer the local wrapper method.
|
|
82
78
|
|
|
83
79
|
---
|
|
84
80
|
|
|
85
81
|
## Quick Start
|
|
86
82
|
|
|
87
|
-
|
|
83
|
+
Enable Revela in the current session:
|
|
88
84
|
|
|
89
|
-
```
|
|
90
|
-
|
|
85
|
+
```text
|
|
86
|
+
/revela enable
|
|
91
87
|
```
|
|
92
88
|
|
|
93
|
-
|
|
89
|
+
Optionally switch design or domain:
|
|
94
90
|
|
|
95
91
|
```text
|
|
96
|
-
/revela
|
|
92
|
+
/revela designs
|
|
93
|
+
/revela designs summit
|
|
94
|
+
/revela domains deeptech-investment
|
|
97
95
|
```
|
|
98
96
|
|
|
99
|
-
Then give the agent a
|
|
97
|
+
Then give the agent a deck task:
|
|
100
98
|
|
|
101
99
|
```text
|
|
102
|
-
Create a 6-slide HTML deck on humanoid robotics supply chains.
|
|
100
|
+
Create a 6-slide HTML deck on humanoid robotics supply chains. Cite the main market drivers, use the active design faithfully, and save the result to decks/humanoid-robotics.html.
|
|
103
101
|
```
|
|
104
102
|
|
|
105
|
-
Export
|
|
103
|
+
Export when needed:
|
|
106
104
|
|
|
107
105
|
```text
|
|
108
106
|
/revela pdf decks/humanoid-robotics.html
|
|
107
|
+
/revela pptx decks/humanoid-robotics.html
|
|
109
108
|
```
|
|
110
109
|
|
|
111
|
-
Disable
|
|
110
|
+
Disable presentation mode when done:
|
|
112
111
|
|
|
113
112
|
```text
|
|
114
113
|
/revela disable
|
|
@@ -134,9 +133,10 @@ Disable Revela and return the current agent to normal mode:
|
|
|
134
133
|
/revela domains-rm <name> remove an installed domain
|
|
135
134
|
|
|
136
135
|
/revela pdf <file> export an HTML deck to PDF in the same directory
|
|
136
|
+
/revela pptx <file> export an HTML deck to editable PPTX in the same directory
|
|
137
137
|
```
|
|
138
138
|
|
|
139
|
-
All `/revela` commands
|
|
139
|
+
All `/revela` commands run locally with zero LLM cost.
|
|
140
140
|
|
|
141
141
|
---
|
|
142
142
|
|
|
@@ -146,11 +146,12 @@ When Revela is enabled, it appends a generated prompt to the current agent's sys
|
|
|
146
146
|
|
|
147
147
|
That prompt is built from 3 layers:
|
|
148
148
|
|
|
149
|
-
1. `skill/SKILL.md`
|
|
150
|
-
2. active domain
|
|
151
|
-
3. active design
|
|
149
|
+
1. `skill/SKILL.md` - the core slide-generation workflow
|
|
150
|
+
2. active domain - domain-specific report structure and terminology
|
|
151
|
+
3. active design - visual system, layouts, components, and chart rules
|
|
152
152
|
|
|
153
|
-
|
|
153
|
+
Persistent preferences live in `~/.config/revela/config.json`.
|
|
154
|
+
The enabled or disabled state is session-level only.
|
|
154
155
|
|
|
155
156
|
---
|
|
156
157
|
|
|
@@ -159,60 +160,54 @@ The current design and domain are persisted in `~/.config/revela/config.json`. T
|
|
|
159
160
|
When Revela is enabled, the agent can use:
|
|
160
161
|
|
|
161
162
|
- `revela-workspace-scan` to discover PDFs, Office files, CSVs, Markdown, and text files in the workspace
|
|
162
|
-
- the `revela-research` subagent
|
|
163
|
-
- `revela-research-save` to write
|
|
163
|
+
- the `revela-research` subagent for targeted web research
|
|
164
|
+
- `revela-research-save` to write structured findings into `researches/<topic>/`
|
|
165
|
+
|
|
166
|
+
Supported document extraction paths:
|
|
164
167
|
|
|
165
|
-
|
|
168
|
+
- `@` reference or pasted file in chat
|
|
169
|
+
- `read` tool access while Revela is enabled
|
|
170
|
+
|
|
171
|
+
Supported extracted file types:
|
|
166
172
|
|
|
167
173
|
- `.pdf`
|
|
168
174
|
- `.docx`
|
|
169
175
|
- `.pptx`
|
|
170
176
|
- `.xlsx`
|
|
171
177
|
|
|
172
|
-
|
|
178
|
+
This extraction is transparent to the main agent.
|
|
173
179
|
|
|
174
180
|
---
|
|
175
181
|
|
|
176
182
|
## Layout QA And Compliance
|
|
177
183
|
|
|
178
|
-
Every time the agent writes `decks/*.html`, Revela
|
|
179
|
-
The
|
|
184
|
+
Every time the agent writes `decks/*.html`, Revela runs an automatic Puppeteer-based QA pass at `1920x1080`.
|
|
185
|
+
The report is returned immediately so the agent can fix problems before moving on.
|
|
180
186
|
|
|
181
187
|
Current QA dimensions:
|
|
182
188
|
|
|
183
189
|
| Dimension | What it checks |
|
|
184
190
|
|---|---|
|
|
185
191
|
| `overflow` | Elements extending outside the slide canvas |
|
|
186
|
-
| `balance` | Sparse slides,
|
|
192
|
+
| `balance` | Sparse slides, centroid drift, and bottom-gap issues |
|
|
187
193
|
| `symmetry` | Side-by-side column imbalance in height or density |
|
|
188
194
|
| `rhythm` | Irregular vertical spacing between stacked siblings |
|
|
189
195
|
| `compliance` | Unknown design classes and novel CSS rules outside the active design vocabulary |
|
|
190
196
|
|
|
191
|
-
|
|
197
|
+
Each slide must declare `slide-qa="true"` or `slide-qa="false"`.
|
|
192
198
|
|
|
193
|
-
- use `slide-qa="true"` for content-heavy slides that should undergo full
|
|
199
|
+
- use `slide-qa="true"` for content-heavy slides that should undergo full QA
|
|
194
200
|
- use `slide-qa="false"` for structural slides such as cover, TOC, quote, summary, or closing pages
|
|
195
201
|
|
|
196
|
-
Compliance is part of the generation loop, not a soft suggestion. If the agent introduces classes or CSS rules that are not defined by the active design, QA flags them and the file should be corrected.
|
|
197
|
-
|
|
198
202
|
You can also run QA manually with the `revela-qa` tool.
|
|
199
203
|
|
|
200
204
|
---
|
|
201
205
|
|
|
202
|
-
##
|
|
203
|
-
|
|
204
|
-
Switch designs with `/revela designs <name>`.
|
|
205
|
-
|
|
206
|
-
| Name | Description | Preview |
|
|
207
|
-
|---|---|---|
|
|
208
|
-
| `aurora` | Dark executive style with structured information density and ECharts-ready data visualization patterns |  |
|
|
209
|
-
| `summit` | Editorial annual-report style for image-rich narrative slides and restrained business storytelling |  |
|
|
210
|
-
|
|
211
|
-
---
|
|
206
|
+
## Designs And Domains
|
|
212
207
|
|
|
213
|
-
|
|
208
|
+
Use `/revela designs` and `/revela domains` to inspect what is installed in your environment.
|
|
214
209
|
|
|
215
|
-
|
|
210
|
+
Bundled domains in this repository:
|
|
216
211
|
|
|
217
212
|
| Name | Description |
|
|
218
213
|
|---|---|
|
|
@@ -220,6 +215,13 @@ Switch domains with `/revela domains <name>`.
|
|
|
220
215
|
| `deeptech-investment` | VC and investment analysis: market sizing, technical readiness, moat, and investment thesis |
|
|
221
216
|
| `consulting` | Strategic consulting: go/no-go decisions, strategy design, and belief-change reporting |
|
|
222
217
|
|
|
218
|
+
Repository design examples:
|
|
219
|
+
|
|
220
|
+
| Name | Description | Preview |
|
|
221
|
+
|---|---|---|
|
|
222
|
+
| `summit` | Editorial annual-report style for image-rich narrative slides and restrained business storytelling |  |
|
|
223
|
+
| `monet` | Light, serif-led visual system for quieter, art-directed business storytelling | `DESIGN.md` included in repo |
|
|
224
|
+
|
|
223
225
|
---
|
|
224
226
|
|
|
225
227
|
## Custom Designs
|
|
@@ -235,43 +237,31 @@ version: 1.0.0
|
|
|
235
237
|
---
|
|
236
238
|
```
|
|
237
239
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
### Marker system
|
|
241
|
-
|
|
242
|
-
For larger designs, use the current marker format:
|
|
240
|
+
For larger designs, use the marker system:
|
|
243
241
|
|
|
244
242
|
```html
|
|
245
243
|
<!-- @design:foundation:start -->
|
|
246
|
-
|
|
244
|
+
Foundation rules
|
|
247
245
|
<!-- @design:foundation:end -->
|
|
248
246
|
|
|
249
247
|
<!-- @design:rules:start -->
|
|
250
|
-
|
|
248
|
+
Design rules
|
|
251
249
|
<!-- @design:rules:end -->
|
|
252
250
|
|
|
253
251
|
<!-- @design:layouts:start -->
|
|
254
252
|
<!-- @layout:cover:start qa=false -->
|
|
255
|
-
Layout details
|
|
253
|
+
Layout details
|
|
256
254
|
<!-- @layout:cover:end -->
|
|
257
|
-
|
|
258
|
-
<!-- @layout:two-col:start qa=true -->
|
|
259
|
-
Layout details...
|
|
260
|
-
<!-- @layout:two-col:end -->
|
|
261
255
|
<!-- @design:layouts:end -->
|
|
262
256
|
|
|
263
257
|
<!-- @design:components:start -->
|
|
264
258
|
<!-- @component:card:start -->
|
|
265
|
-
Component
|
|
259
|
+
Component details
|
|
266
260
|
<!-- @component:card:end -->
|
|
267
|
-
|
|
268
|
-
<!-- @component:stat-card:start -->
|
|
269
|
-
Component HTML + CSS...
|
|
270
|
-
<!-- @component:stat-card:end -->
|
|
271
261
|
<!-- @design:components:end -->
|
|
272
262
|
|
|
273
263
|
<!-- @design:chart-rules:start -->
|
|
274
|
-
Chart
|
|
264
|
+
Chart rules
|
|
275
265
|
<!-- @design:chart-rules:end -->
|
|
276
266
|
```
|
|
277
267
|
|
|
@@ -282,11 +272,7 @@ Prompt injection behavior:
|
|
|
282
272
|
|
|
283
273
|
If a design has no markers, Revela falls back to injecting the full `DESIGN.md` body.
|
|
284
274
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
Revela extracts the allowed CSS class vocabulary from your design and uses it during QA compliance checks. If the agent invents a class or defines a CSS rule outside that vocabulary, QA reports it.
|
|
288
|
-
|
|
289
|
-
### Install a custom design
|
|
275
|
+
Install a custom design:
|
|
290
276
|
|
|
291
277
|
```text
|
|
292
278
|
/revela designs-add github:your-org/your-design
|
|
@@ -298,7 +284,7 @@ Revela extracts the allowed CSS class vocabulary from your design and uses it du
|
|
|
298
284
|
|
|
299
285
|
## Custom Domains
|
|
300
286
|
|
|
301
|
-
A custom domain is a folder containing `INDUSTRY.md
|
|
287
|
+
A custom domain is a folder containing `INDUSTRY.md`.
|
|
302
288
|
|
|
303
289
|
```text
|
|
304
290
|
/revela domains-add github:your-org/your-domain
|
|
@@ -308,21 +294,32 @@ A custom domain is a folder containing `INDUSTRY.md` with frontmatter metadata s
|
|
|
308
294
|
|
|
309
295
|
---
|
|
310
296
|
|
|
311
|
-
##
|
|
297
|
+
## Export
|
|
312
298
|
|
|
313
|
-
|
|
299
|
+
PDF export:
|
|
314
300
|
|
|
315
301
|
```text
|
|
316
302
|
/revela pdf decks/my-deck.html
|
|
317
303
|
```
|
|
318
304
|
|
|
319
|
-
|
|
305
|
+
Editable PPTX export:
|
|
306
|
+
|
|
307
|
+
```text
|
|
308
|
+
/revela pptx decks/my-deck.html
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
Both commands write output beside the source HTML deck.
|
|
320
312
|
|
|
321
313
|
---
|
|
322
314
|
|
|
323
|
-
##
|
|
315
|
+
## Development
|
|
316
|
+
|
|
317
|
+
```bash
|
|
318
|
+
bun test
|
|
319
|
+
bun run typecheck
|
|
320
|
+
```
|
|
324
321
|
|
|
325
|
-
|
|
322
|
+
Enable verbose logs with:
|
|
326
323
|
|
|
327
324
|
```bash
|
|
328
325
|
REVELA_DEBUG=1 opencode
|
|
@@ -332,4 +329,4 @@ REVELA_DEBUG=1 opencode
|
|
|
332
329
|
|
|
333
330
|
## License
|
|
334
331
|
|
|
335
|
-
MIT
|
|
332
|
+
MIT - see [LICENSE](LICENSE)
|