@cyber-dash-tech/revela 0.17.7 → 0.17.9
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 +62 -6
- package/README.zh-CN.md +62 -6
- package/package.json +1 -1
- package/plugins/revela/.codex-plugin/plugin.json +1 -1
- package/plugins/revela/.mcp.json +1 -1
- package/plugins/revela/mcp/runtime-resolver.ts +38 -4
- package/plugins/revela/skills/revela-make-deck/SKILL.md +18 -6
- package/plugins/revela/skills/revela-review-deck/SKILL.md +9 -0
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
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="560" />
|
|
@@ -34,13 +34,13 @@ To install globally, add the same entry to `~/.config/opencode/opencode.json`.
|
|
|
34
34
|
Install Revela through the Codex Git marketplace:
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
|
-
codex plugin marketplace add https://github.com/cyber-dash-tech/revela --ref
|
|
37
|
+
codex plugin marketplace add https://github.com/cyber-dash-tech/revela --ref v0.17.9
|
|
38
38
|
codex plugin add revela@revela
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
Install from the full repository ref. Do not use a sparse checkout limited to `plugins/revela`; the Codex plugin resolves the shared runtime, built-in designs, and domains from the repository snapshot.
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
Start a new Codex thread after installing so Codex loads the Revela skills, MCP tools, and hooks.
|
|
44
44
|
|
|
45
45
|
## Built-In Designs
|
|
46
46
|
|
|
@@ -84,11 +84,67 @@ In Codex, ask Revela to list or switch domains; the active domain guides narrati
|
|
|
84
84
|
|
|
85
85
|
## Quick Start
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
Use these prompts in Codex from the workspace that contains your source materials.
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
1. Choose the narrative domain before authoring so Revela frames the audience, decision, risks, and objections for your context.
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
```text
|
|
92
|
+
revela, use consulting as the domain.
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
2. Choose the deck design before rendering so generated artifacts use the intended visual language.
|
|
96
|
+
|
|
97
|
+
```text
|
|
98
|
+
revela, use summit as the design.
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
3. Initialize the narrative from local materials. Init grounds the narrative in the workspace and surfaces gaps; it does not replace the research step.
|
|
102
|
+
|
|
103
|
+
```text
|
|
104
|
+
revela, help me init this workspace from the local materials.
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
4. Research the gaps and bind only source-supported evidence into the narrative.
|
|
108
|
+
|
|
109
|
+
```text
|
|
110
|
+
revela, research the current gaps and bind only source-supported evidence.
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
5. Read Story before rendering to inspect the claim flow, evidence support, caveats, unsupported scope, and open gaps.
|
|
114
|
+
|
|
115
|
+
```text
|
|
116
|
+
revela, show me the Story before we make the deck.
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
6. Create or update the deck plan before generating HTML so slide order, chapter structure, evidence trace, caveats, and visual intent are explicit.
|
|
120
|
+
|
|
121
|
+
```text
|
|
122
|
+
revela, create or update the deck plan before generating HTML.
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
7. Make an HTML deck from the current deck plan and canonical narrative.
|
|
126
|
+
|
|
127
|
+
```text
|
|
128
|
+
revela, make the deck from the current deck plan and narrative.
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
8. Review the generated deck for traceability, diagnostics, and targeted edits.
|
|
132
|
+
|
|
133
|
+
```text
|
|
134
|
+
revela, review the generated deck.
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
9. Export a PDF after deck QA passes.
|
|
138
|
+
|
|
139
|
+
```text
|
|
140
|
+
revela, export the deck to PDF.
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
10. Export an editable PPTX after deck QA passes.
|
|
144
|
+
|
|
145
|
+
```text
|
|
146
|
+
revela, export the deck to PPTX.
|
|
147
|
+
```
|
|
92
148
|
|
|
93
149
|
## Review A Deck
|
|
94
150
|
|
package/README.zh-CN.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.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="560" />
|
|
@@ -34,13 +34,13 @@ Revela 可在 [OpenCode](https://opencode.ai) 和 Codex 中使用,把来源材
|
|
|
34
34
|
通过 Codex Git marketplace 安装 Revela:
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
|
-
codex plugin marketplace add https://github.com/cyber-dash-tech/revela --ref
|
|
37
|
+
codex plugin marketplace add https://github.com/cyber-dash-tech/revela --ref v0.17.9
|
|
38
38
|
codex plugin add revela@revela
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
请从完整仓库 ref 安装。不要使用仅包含 `plugins/revela` 的 sparse checkout;Codex plugin 会从仓库快照中解析 shared runtime、内置 designs 和 domains。
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
安装后开启一个新的 Codex thread,让 Codex 加载 Revela 的 skills、MCP tools 和 hooks。
|
|
44
44
|
|
|
45
45
|
## 内置设计
|
|
46
46
|
|
|
@@ -84,11 +84,67 @@ Domain 提供特定场景的叙事 guidance,例如 consulting、product 或 in
|
|
|
84
84
|
|
|
85
85
|
## Quick Start
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
在包含来源材料的 workspace 中打开 Codex,然后按下面步骤逐条发送 prompt。
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
1. 先选择 domain,让 Revela 按你的沟通场景 framing 受众、决策、风险和潜在质疑。
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
```text
|
|
92
|
+
revela,use consulting as domain.
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
2. 再选择 design,让后续生成的 deck 使用指定视觉风格。
|
|
96
|
+
|
|
97
|
+
```text
|
|
98
|
+
revela,use summit as design.
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
3. 从本地材料初始化 narrative。Init 负责基于 workspace 做 grounding 并暴露 gap;它不替代 research 步骤。
|
|
102
|
+
|
|
103
|
+
```text
|
|
104
|
+
revela,帮我 init 这个 workspace,先读本地材料。
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
4. 针对 gap 做 research,并且只把来源明确支持的 evidence 绑定回 narrative。
|
|
108
|
+
|
|
109
|
+
```text
|
|
110
|
+
revela,research 当前 gaps,只绑定 source-supported evidence。
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
5. 生成 deck 前先读 Story,检查 claim flow、证据支撑、caveats、unsupported scope 和 open gaps。
|
|
114
|
+
|
|
115
|
+
```text
|
|
116
|
+
revela,先给我看 Story,再 make deck。
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
6. 先创建或更新 deck plan,明确 slide 顺序、章节结构、evidence trace、caveats 和 visual intent,再生成 HTML。
|
|
120
|
+
|
|
121
|
+
```text
|
|
122
|
+
revela,生成 HTML 前先 create or update deck plan。
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
7. 基于当前 deck plan 和 canonical narrative 生成 HTML deck。
|
|
126
|
+
|
|
127
|
+
```text
|
|
128
|
+
revela,基于当前 deck plan 和 narrative make deck。
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
8. Review 生成后的 deck,检查 traceability、diagnostics,并做定向修改。
|
|
132
|
+
|
|
133
|
+
```text
|
|
134
|
+
revela,review 生成好的 deck。
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
9. QA 通过后导出 PDF。
|
|
138
|
+
|
|
139
|
+
```text
|
|
140
|
+
revela,把 deck export 成 PDF。
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
10. QA 通过后导出可编辑 PPTX。
|
|
144
|
+
|
|
145
|
+
```text
|
|
146
|
+
revela,把 deck export 成 PPTX。
|
|
147
|
+
```
|
|
92
148
|
|
|
93
149
|
## Review Deck
|
|
94
150
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "revela",
|
|
3
|
-
"version": "0.1.0+codex.
|
|
3
|
+
"version": "0.1.0+codex.20260524121829",
|
|
4
4
|
"description": "Use Revela in Codex to build trusted, traceable narrative decision artifacts from local sources and research.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "cyber-dash-tech",
|
package/plugins/revela/.mcp.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"command": "bun",
|
|
5
5
|
"args": [
|
|
6
6
|
"--eval",
|
|
7
|
-
"const fs = await import('fs');\nconst path = await import('path');\nconst { pathToFileURL } = await import('url');\nconst candidates = [];\nconst home = process.env.HOME || '';\nconst marketplaceNames = ['revela', 'revela-local'];\ncandidates.push(path.resolve(process.cwd(), 'bin/revela.ts'));\nconst configPath = path.join(home, '.codex', 'config.toml');\nif (fs.existsSync(configPath)) {\n const text = fs.readFileSync(configPath, 'utf-8');\n const sections = text.split(/\\n(?=\\s*\\[)/);\n for (const marketplaceName of marketplaceNames) {\n const section = sections.find((item) => item.trimStart().startsWith(`[marketplaces.${marketplaceName}]`));\n const match = section?.match(/^\\s*source\\s*=\\s*\"([^\"]+)\"/m);\n if (match) candidates.push(path.join(match[1], 'bin/revela.ts'));\n }\n}\nfor (const marketplaceName of marketplaceNames) {\n const cacheRoot = path.join(home, '.codex', 'plugins', 'cache', marketplaceName, 'revela');\n if (fs.existsSync(cacheRoot)) {\n for (const version of fs.readdirSync(cacheRoot).sort().reverse()) candidates.push(path.join(cacheRoot, version, 'bin/revela.ts'));\n }\n}\nconst cli = candidates.find((candidate) => fs.existsSync(candidate));\nif (!cli) {\n console.error(`Could not locate Revela CLI. Checked: ${candidates.join(', ')}`);\n process.exit(1);\n}\nprocess.env.REVELA_CLI_COMMAND = 'mcp';\nawait import(pathToFileURL(cli).href);"
|
|
7
|
+
"const fs = await import('fs');\nconst path = await import('path');\nconst { pathToFileURL } = await import('url');\nconst candidates = [];\nconst home = process.env.HOME || '';\nconst marketplaceNames = ['revela', 'revela-local'];\ncandidates.push(path.resolve(process.cwd(), 'bin/revela.ts'));\nconst configPath = path.join(home, '.codex', 'config.toml');\nif (fs.existsSync(configPath)) {\n const text = fs.readFileSync(configPath, 'utf-8');\n const sections = text.split(/\\n(?=\\s*\\[)/);\n for (const marketplaceName of marketplaceNames) {\n const section = sections.find((item) => item.trimStart().startsWith(`[marketplaces.${marketplaceName}]`));\n const match = section?.match(/^\\s*source\\s*=\\s*\"([^\"]+)\"/m);\n if (match && !/^[a-z][a-z0-9+.-]*:\\/\\//i.test(match[1])) candidates.push(path.join(match[1], 'bin/revela.ts'));\n }\n}\nfor (const marketplaceName of marketplaceNames) {\n candidates.push(path.join(home, '.codex', '.tmp', 'marketplaces', marketplaceName, 'bin/revela.ts'));\n}\nfor (const marketplaceName of marketplaceNames) {\n const cacheRoot = path.join(home, '.codex', 'plugins', 'cache', marketplaceName, 'revela');\n if (fs.existsSync(cacheRoot)) {\n for (const version of fs.readdirSync(cacheRoot).sort().reverse()) candidates.push(path.join(cacheRoot, version, 'bin/revela.ts'));\n }\n}\nconst cli = candidates.find((candidate) => fs.existsSync(candidate));\nif (!cli) {\n console.error(`Could not locate Revela CLI. Checked: ${candidates.join(', ')}`);\n process.exit(1);\n}\nprocess.env.REVELA_CLI_COMMAND = 'mcp';\nawait import(pathToFileURL(cli).href);"
|
|
8
8
|
]
|
|
9
9
|
}
|
|
10
10
|
}
|
|
@@ -33,14 +33,27 @@ export function resolveRevelaRuntime(options: ResolveRuntimeOptions): ResolveRun
|
|
|
33
33
|
|
|
34
34
|
const marketplaceName = marketplaceNameFromPluginRoot(pluginRoot)
|
|
35
35
|
if (marketplaceName) {
|
|
36
|
-
const
|
|
36
|
+
const homeDir = options.homeDir ?? env.HOME
|
|
37
|
+
const source = marketplaceSourceFromCodexConfig(marketplaceName, homeDir)
|
|
37
38
|
if (source) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
if (looksLikeLocalPath(source)) {
|
|
40
|
+
const result = runtimeAt(source, "codex-marketplace", diagnostics)
|
|
41
|
+
if (result.ok) return result
|
|
42
|
+
diagnostics.push(`Marketplace ${marketplaceName} local source did not contain lib/runtime/index.ts: ${source}`)
|
|
43
|
+
} else {
|
|
44
|
+
diagnostics.push(`Marketplace ${marketplaceName} source is not a local path: ${source}`)
|
|
45
|
+
}
|
|
41
46
|
} else {
|
|
42
47
|
diagnostics.push(`Marketplace ${marketplaceName} was not found in Codex config.`)
|
|
43
48
|
}
|
|
49
|
+
const clone = marketplaceCloneRoot(marketplaceName, homeDir)
|
|
50
|
+
if (clone) {
|
|
51
|
+
const result = fullRepoRuntimeAt(clone, "codex-marketplace", diagnostics)
|
|
52
|
+
if (result.ok) return result
|
|
53
|
+
diagnostics.push(`Marketplace ${marketplaceName} clone did not contain a complete Revela runtime: ${clone}`)
|
|
54
|
+
} else {
|
|
55
|
+
diagnostics.push(`Marketplace ${marketplaceName} clone was not found in Codex temp marketplaces.`)
|
|
56
|
+
}
|
|
44
57
|
} else {
|
|
45
58
|
diagnostics.push(`Could not infer marketplace name from plugin root: ${pluginRoot}`)
|
|
46
59
|
}
|
|
@@ -60,6 +73,17 @@ function runtimeAt(root: string, source: ResolveRuntimeResult["source"], diagnos
|
|
|
60
73
|
: { ok: false, source: "missing", diagnostics }
|
|
61
74
|
}
|
|
62
75
|
|
|
76
|
+
function fullRepoRuntimeAt(root: string, source: ResolveRuntimeResult["source"], diagnostics: string[]): ResolveRuntimeResult {
|
|
77
|
+
const repoRoot = resolve(root)
|
|
78
|
+
const runtimePath = join(repoRoot, "lib", "runtime", "index.ts")
|
|
79
|
+
const hasRuntime = existsSync(runtimePath)
|
|
80
|
+
const hasDesigns = existsSync(join(repoRoot, "designs"))
|
|
81
|
+
const hasDomains = existsSync(join(repoRoot, "domains"))
|
|
82
|
+
return hasRuntime && hasDesigns && hasDomains
|
|
83
|
+
? { ok: true, repoRoot, runtimePath, source, diagnostics }
|
|
84
|
+
: { ok: false, source: "missing", diagnostics }
|
|
85
|
+
}
|
|
86
|
+
|
|
63
87
|
function findSourceCheckoutRoot(pluginRoot: string): string | undefined {
|
|
64
88
|
let current = resolve(pluginRoot)
|
|
65
89
|
for (let i = 0; i < 6; i++) {
|
|
@@ -95,6 +119,16 @@ function marketplaceSourceFromCodexConfig(marketplaceName: string, homeDir: stri
|
|
|
95
119
|
return match?.[1]
|
|
96
120
|
}
|
|
97
121
|
|
|
122
|
+
function marketplaceCloneRoot(marketplaceName: string, homeDir: string | undefined): string | undefined {
|
|
123
|
+
if (!homeDir) return undefined
|
|
124
|
+
const candidate = join(homeDir, ".codex", ".tmp", "marketplaces", marketplaceName)
|
|
125
|
+
return existsSync(candidate) ? candidate : undefined
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
function looksLikeLocalPath(source: string): boolean {
|
|
129
|
+
return !/^[a-z][a-z0-9+.-]*:\/\//i.test(source)
|
|
130
|
+
}
|
|
131
|
+
|
|
98
132
|
function sectionBody(text: string, sectionName: string): string | undefined {
|
|
99
133
|
const lines = text.split(/\r?\n/)
|
|
100
134
|
const header = `[${sectionName}]`
|
|
@@ -18,12 +18,24 @@ Use this skill when the user asks to make, generate, or update a Revela deck.
|
|
|
18
18
|
|
|
19
19
|
1. Call `revela_compile_narrative` and `revela_markdown_qa`.
|
|
20
20
|
2. Report narrative and Markdown diagnostics, but treat only malformed/unsafe files and technical artifact validity as hard blockers.
|
|
21
|
-
3. Call `revela_read_deck_plan
|
|
22
|
-
4.
|
|
23
|
-
5.
|
|
24
|
-
6.
|
|
25
|
-
7.
|
|
26
|
-
8.
|
|
21
|
+
3. Call `revela_read_deck_plan` as the required deck-plan preflight before any HTML generation.
|
|
22
|
+
4. If `deck-plan/` is missing or incomplete, author or repair `deck-plan/index.md` and `deck-plan/slides/*.md` before calling `revela_create_deck_foundation`.
|
|
23
|
+
5. Report deck-plan diagnostics before artifact generation, including stale narrative hashes, missing slide projections, missing evidence trace, caveats, or malformed plan files.
|
|
24
|
+
6. Do not start HTML generation from narrative alone unless the user explicitly asks for a throwaway diagnostic smoke deck.
|
|
25
|
+
7. For new HTML files, call `revela_create_deck_foundation`.
|
|
26
|
+
8. Read active design guidance with `revela_design_list` and `revela_design_read` when choosing layouts/components. If the user asks to switch designs persistently, call `revela_design_activate`; if they ask for a one-off design, read that design by name and pass `designName` to `revela_create_deck_foundation`.
|
|
27
|
+
9. Patch slides into the foundation between Revela slide markers. Preserve positive 1-based `data-slide-index` values.
|
|
28
|
+
10. Generate chapter by chapter. Keep the HTML valid after each write.
|
|
29
|
+
11. After every HTML write, call `revela_run_deck_qa` and repair hard errors before review or export.
|
|
30
|
+
|
|
31
|
+
## Generated Visual Assets
|
|
32
|
+
|
|
33
|
+
- Codex may use the `imagegen` skill for deck-level visual assets when a slide's visual intent calls for an image or diagram and no suitable workspace/source asset exists.
|
|
34
|
+
- Prefer `imagegen` for flow diagrams, framework diagrams, process visuals, system relationship maps, journey maps, before/after schematics, conceptual illustrations, abstract heroes, chapter dividers, background textures, non-evidence metaphor visuals, and visual drafts.
|
|
35
|
+
- Do not use generated images for source evidence, factual screenshots, real people, real places, real products, logos, data charts, tables, or visuals that need verifiable factual accuracy.
|
|
36
|
+
- If the visual needs exact editable text, precise data, axes, code, tables, or strict structure, build it with HTML/CSS, ECharts, or `data-table` instead of `imagegen`.
|
|
37
|
+
- Generated images are artifact-level visuals only. Do not treat them as evidence, source materials, quote support, or factual proof.
|
|
38
|
+
- If a generated image is referenced by deck HTML, move or copy the final asset into the workspace, preferably under `assets/<topic>/media/` or the project's existing asset directory. Deck HTML must reference a workspace-relative local path, never Codex's default generated-image path.
|
|
27
39
|
|
|
28
40
|
## QA Repair Loop
|
|
29
41
|
|
|
@@ -19,6 +19,15 @@ Use this skill when the user asks to review, inspect, diagnose, or refine a gene
|
|
|
19
19
|
8. Separate technical blockers from narrative/evidence diagnostics.
|
|
20
20
|
9. Pure visual/layout/export fixes may patch artifacts directly when the user asks for a change. Meaning changes must update `revela-narrative/` first.
|
|
21
21
|
|
|
22
|
+
## Generated Visual Assets
|
|
23
|
+
|
|
24
|
+
- For Review Comment or Apply Fix requests such as adding an image, replacing a cover visual, creating a concept illustration, making a media block visual, or turning a slide idea into a flow/framework diagram, Codex may use the `imagegen` skill.
|
|
25
|
+
- Prefer `imagegen` for flow diagrams, framework diagrams, process visuals, system relationship maps, journey maps, before/after schematics, conceptual illustrations, abstract heroes, chapter dividers, background textures, non-evidence metaphor visuals, and visual drafts.
|
|
26
|
+
- Do not use generated images for source evidence, factual screenshots, real people, real places, real products, logos, data charts, tables, or visuals that need verifiable factual accuracy. Use workspace/source assets instead, or report the missing asset.
|
|
27
|
+
- If the visual needs exact editable text, precise data, axes, code, tables, or strict structure, patch the deck with HTML/CSS, ECharts, or `data-table` instead of `imagegen`.
|
|
28
|
+
- Generated images are artifact-level visual patches only. Do not add them to evidence, source materials, narrative support, or factual trace.
|
|
29
|
+
- If a generated image is referenced by deck HTML, move or copy the final asset into the workspace, preferably under `assets/<topic>/media/` or the project's existing asset directory. Deck HTML must reference a workspace-relative local path, never Codex's default generated-image path.
|
|
30
|
+
|
|
22
31
|
## QA Notes
|
|
23
32
|
|
|
24
33
|
- `revela_review_deck_read` is read-only: it must not mutate deck HTML, `revela-narrative/`, `deck-plan/`, assets, or compatibility state.
|