@cyber-dash-tech/revela 0.17.9 → 0.17.10
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 +4 -2
- package/README.zh-CN.md +4 -2
- package/lib/log.ts +33 -22
- package/lib/runtime/index.ts +16 -5
- package/package.json +1 -1
- package/plugins/revela/.mcp.json +2 -5
package/README.md
CHANGED
|
@@ -34,11 +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 v0.17.
|
|
37
|
+
codex plugin marketplace add https://github.com/cyber-dash-tech/revela --ref v0.17.10
|
|
38
38
|
codex plugin add revela@revela
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
The Git marketplace install provides the Codex plugin shell, skills, hooks, and MCP configuration. When Codex starts the Revela MCP server for the first time, it runs `npx -y @cyber-dash-tech/revela@0.17.10 mcp` so npm can fetch the published package and its dependencies.
|
|
42
|
+
|
|
43
|
+
You do not need to run `bun install` inside the Codex marketplace clone.
|
|
42
44
|
|
|
43
45
|
Start a new Codex thread after installing so Codex loads the Revela skills, MCP tools, and hooks.
|
|
44
46
|
|
package/README.zh-CN.md
CHANGED
|
@@ -34,11 +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 v0.17.
|
|
37
|
+
codex plugin marketplace add https://github.com/cyber-dash-tech/revela --ref v0.17.10
|
|
38
38
|
codex plugin add revela@revela
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
Git marketplace 安装的是 Codex plugin 壳、skills、hooks 和 MCP 配置。Codex 第一次启动 Revela MCP server 时,会运行 `npx -y @cyber-dash-tech/revela@0.17.10 mcp`,由 npm 获取已发布 package 及其 dependencies。
|
|
42
|
+
|
|
43
|
+
不需要在 Codex marketplace clone 里运行 `bun install`。
|
|
42
44
|
|
|
43
45
|
安装后开启一个新的 Codex thread,让 Codex 加载 Revela 的 skills、MCP tools 和 hooks。
|
|
44
46
|
|
package/lib/log.ts
CHANGED
|
@@ -1,28 +1,39 @@
|
|
|
1
|
-
import { Logger } from "tslog"
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
|
-
* Revela
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* Set REVELA_DEBUG=1 to enable debug-level output (minLevel 2).
|
|
10
|
-
* Default minLevel is 3 (info) in production.
|
|
2
|
+
* Revela logger facade.
|
|
3
|
+
* Keep this module dependency-free so lightweight runtime tools can load from
|
|
4
|
+
* Codex Git marketplace checkouts that do not have package dependencies
|
|
5
|
+
* installed. Logging is intentionally silent by default because Revela often
|
|
6
|
+
* runs over stdio protocols where stderr noise is user-visible.
|
|
11
7
|
*/
|
|
12
|
-
|
|
8
|
+
type LogMethod = (message?: unknown, ...args: unknown[]) => void
|
|
9
|
+
|
|
10
|
+
export interface RevelaLogger {
|
|
11
|
+
silly: LogMethod
|
|
12
|
+
trace: LogMethod
|
|
13
|
+
debug: LogMethod
|
|
14
|
+
info: LogMethod
|
|
15
|
+
warn: LogMethod
|
|
16
|
+
error: LogMethod
|
|
17
|
+
fatal: LogMethod
|
|
18
|
+
getSubLogger(input?: { name?: string }): RevelaLogger
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const noop: LogMethod = () => {}
|
|
22
|
+
|
|
23
|
+
function createNoopLogger(_name = "revela"): RevelaLogger {
|
|
24
|
+
return {
|
|
25
|
+
silly: noop,
|
|
26
|
+
trace: noop,
|
|
27
|
+
debug: noop,
|
|
28
|
+
info: noop,
|
|
29
|
+
warn: noop,
|
|
30
|
+
error: noop,
|
|
31
|
+
fatal: noop,
|
|
32
|
+
getSubLogger: (input?: { name?: string }) => createNoopLogger(input?.name),
|
|
33
|
+
}
|
|
34
|
+
}
|
|
13
35
|
|
|
14
|
-
export const log =
|
|
15
|
-
name: "revela",
|
|
16
|
-
minLevel,
|
|
17
|
-
type: "json",
|
|
18
|
-
hideLogPositionForProduction: true,
|
|
19
|
-
overwrite: {
|
|
20
|
-
transportJSON: (_logObj: unknown) => {
|
|
21
|
-
// Silenced: revela runs as an OpenCode plugin; writing to stderr
|
|
22
|
-
// pollutes the host terminal. Logs are intentionally suppressed.
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
})
|
|
36
|
+
export const log: RevelaLogger = createNoopLogger()
|
|
26
37
|
|
|
27
38
|
/**
|
|
28
39
|
* Create a child logger for a specific sub-module.
|
package/lib/runtime/index.ts
CHANGED
|
@@ -7,14 +7,10 @@ import { computeNarrativeHash } from "../narrative-state/hash"
|
|
|
7
7
|
import { compileNarrativeVault } from "../narrative-vault/compile"
|
|
8
8
|
import { runNarrativeMarkdownQa, type MarkdownQaOptions } from "../narrative-vault/markdown-qa"
|
|
9
9
|
import { readDeckPlanArtifact } from "../narrative-state/deck-plan-artifact"
|
|
10
|
-
import { exportToPdf } from "../pdf/export"
|
|
11
|
-
import { exportToPptx } from "../pptx/export"
|
|
12
|
-
import { assertExportQAPassed } from "../qa/export-gate"
|
|
13
|
-
import { formatArtifactQAReport, runArtifactQA } from "../qa/artifact"
|
|
14
10
|
import { extractDesignClasses } from "../design/designs"
|
|
15
11
|
import { recordRenderedArtifact, workspaceRelative } from "../workspace-state/rendered-artifacts"
|
|
12
|
+
import type { ReviewDeckOpenInput, ReviewDeckReadInput } from "./review"
|
|
16
13
|
export { bindResearchFindings, evaluateResearchFindings, researchSave, researchTargets } from "./research"
|
|
17
|
-
export { reviewDeckOpen, reviewDeckRead } from "./review"
|
|
18
14
|
export { storyRead } from "./story"
|
|
19
15
|
|
|
20
16
|
export interface RuntimeWorkspaceInput {
|
|
@@ -91,6 +87,7 @@ export function createDeckFoundation(input: RuntimeDeckFoundationInput) {
|
|
|
91
87
|
}
|
|
92
88
|
|
|
93
89
|
export async function runDeckQa(input: RuntimeFileInput) {
|
|
90
|
+
const { formatArtifactQAReport, runArtifactQA } = await import("../qa/artifact")
|
|
94
91
|
const workspaceRoot = root(input.workspaceRoot)
|
|
95
92
|
const filePath = resolve(workspaceRoot, input.file)
|
|
96
93
|
let vocabulary
|
|
@@ -113,6 +110,8 @@ export async function runDeckQa(input: RuntimeFileInput) {
|
|
|
113
110
|
}
|
|
114
111
|
|
|
115
112
|
export async function exportPdf(input: RuntimeFileInput) {
|
|
113
|
+
const { exportToPdf } = await import("../pdf/export")
|
|
114
|
+
const { assertExportQAPassed } = await import("../qa/export-gate")
|
|
116
115
|
const workspaceRoot = root(input.workspaceRoot)
|
|
117
116
|
const filePath = resolve(workspaceRoot, input.file)
|
|
118
117
|
await assertExportQAPassed(filePath, { workspaceRoot })
|
|
@@ -127,6 +126,8 @@ export async function exportPdf(input: RuntimeFileInput) {
|
|
|
127
126
|
}
|
|
128
127
|
|
|
129
128
|
export async function exportPptx(input: RuntimeFileInput & { speakerNotes?: Array<string | null | undefined> }) {
|
|
129
|
+
const { exportToPptx } = await import("../pptx/export")
|
|
130
|
+
const { assertExportQAPassed } = await import("../qa/export-gate")
|
|
130
131
|
const workspaceRoot = root(input.workspaceRoot)
|
|
131
132
|
const filePath = resolve(workspaceRoot, input.file)
|
|
132
133
|
await assertExportQAPassed(filePath, { workspaceRoot })
|
|
@@ -140,6 +141,16 @@ export async function exportPptx(input: RuntimeFileInput & { speakerNotes?: Arra
|
|
|
140
141
|
return { ok: true, ...result }
|
|
141
142
|
}
|
|
142
143
|
|
|
144
|
+
export async function reviewDeckRead(input: ReviewDeckReadInput) {
|
|
145
|
+
const review = await import("./review")
|
|
146
|
+
return review.reviewDeckRead(input)
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export async function reviewDeckOpen(input: ReviewDeckOpenInput) {
|
|
150
|
+
const review = await import("./review")
|
|
151
|
+
return review.reviewDeckOpen(input)
|
|
152
|
+
}
|
|
153
|
+
|
|
143
154
|
export function designList() {
|
|
144
155
|
seedBuiltinDesigns()
|
|
145
156
|
return {
|
package/package.json
CHANGED
package/plugins/revela/.mcp.json
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"mcpServers": {
|
|
3
3
|
"revela": {
|
|
4
|
-
"command": "
|
|
5
|
-
"args": [
|
|
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 && !/^[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
|
-
]
|
|
4
|
+
"command": "npx",
|
|
5
|
+
"args": ["-y", "@cyber-dash-tech/revela@0.17.10", "mcp"]
|
|
9
6
|
}
|
|
10
7
|
}
|
|
11
8
|
}
|