@cyber-dash-tech/revela 0.17.10 → 0.17.11
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 +17 -3
- package/README.zh-CN.md +17 -3
- package/lib/refine/prompt-bridge.ts +25 -1
- package/package.json +1 -1
- package/plugins/revela/.codex-plugin/plugin.json +1 -1
- package/plugins/revela/.mcp.json +1 -1
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" />
|
|
@@ -31,14 +31,28 @@ To install globally, add the same entry to `~/.config/opencode/opencode.json`.
|
|
|
31
31
|
|
|
32
32
|
### Codex
|
|
33
33
|
|
|
34
|
+
Requirements:
|
|
35
|
+
|
|
36
|
+
- The Codex CLI must be installed and the `codex` command must be available in your shell.
|
|
37
|
+
- Your environment must be able to run `npx`; Revela uses `npx -y @cyber-dash-tech/revela@0.17.11 mcp` to start the MCP server.
|
|
38
|
+
- For interactive Review actions, `codex exec` must also work because the Review UI uses it for Insight and Comment/Apply Fix requests.
|
|
39
|
+
|
|
40
|
+
Optional preflight:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
codex --version
|
|
44
|
+
codex exec --help
|
|
45
|
+
npx --version
|
|
46
|
+
```
|
|
47
|
+
|
|
34
48
|
Install Revela through the Codex Git marketplace:
|
|
35
49
|
|
|
36
50
|
```bash
|
|
37
|
-
codex plugin marketplace add https://github.com/cyber-dash-tech/revela --ref v0.17.
|
|
51
|
+
codex plugin marketplace add https://github.com/cyber-dash-tech/revela --ref v0.17.11
|
|
38
52
|
codex plugin add revela@revela
|
|
39
53
|
```
|
|
40
54
|
|
|
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.
|
|
55
|
+
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.11 mcp` so npm can fetch the published package and its dependencies.
|
|
42
56
|
|
|
43
57
|
You do not need to run `bun install` inside the Codex marketplace clone.
|
|
44
58
|
|
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" />
|
|
@@ -31,14 +31,28 @@ Revela 可在 [OpenCode](https://opencode.ai) 和 Codex 中使用,把来源材
|
|
|
31
31
|
|
|
32
32
|
### Codex
|
|
33
33
|
|
|
34
|
+
环境要求:
|
|
35
|
+
|
|
36
|
+
- 需要已安装 Codex CLI,并且 shell 中可以执行 `codex`。
|
|
37
|
+
- 环境中需要可以执行 `npx`;Revela 会用 `npx -y @cyber-dash-tech/revela@0.17.11 mcp` 启动 MCP server。
|
|
38
|
+
- 如果使用 Review UI 的 Insight、Comment 或 Apply Fix,需要 `codex exec` 可用。
|
|
39
|
+
|
|
40
|
+
可选的安装前检查:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
codex --version
|
|
44
|
+
codex exec --help
|
|
45
|
+
npx --version
|
|
46
|
+
```
|
|
47
|
+
|
|
34
48
|
通过 Codex Git marketplace 安装 Revela:
|
|
35
49
|
|
|
36
50
|
```bash
|
|
37
|
-
codex plugin marketplace add https://github.com/cyber-dash-tech/revela --ref v0.17.
|
|
51
|
+
codex plugin marketplace add https://github.com/cyber-dash-tech/revela --ref v0.17.11
|
|
38
52
|
codex plugin add revela@revela
|
|
39
53
|
```
|
|
40
54
|
|
|
41
|
-
Git marketplace 安装的是 Codex plugin 壳、skills、hooks 和 MCP 配置。Codex 第一次启动 Revela MCP server 时,会运行 `npx -y @cyber-dash-tech/revela@0.17.
|
|
55
|
+
Git marketplace 安装的是 Codex plugin 壳、skills、hooks 和 MCP 配置。Codex 第一次启动 Revela MCP server 时,会运行 `npx -y @cyber-dash-tech/revela@0.17.11 mcp`,由 npm 获取已发布 package 及其 dependencies。
|
|
42
56
|
|
|
43
57
|
不需要在 Codex marketplace clone 里运行 `bun install`。
|
|
44
58
|
|
|
@@ -29,9 +29,11 @@ export interface CodexExecRunResult {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
export type CodexExecRunner = (input: {
|
|
32
|
+
action: ReviewPromptAction
|
|
32
33
|
prompt: string
|
|
33
34
|
workspaceRoot: string
|
|
34
35
|
timeoutMs: number
|
|
36
|
+
sandboxMode: "read-only" | "workspace-write"
|
|
35
37
|
}) => Promise<CodexExecRunResult>
|
|
36
38
|
|
|
37
39
|
export function createOpenCodeReviewPromptBridge(client: any, sessionID: string): ReviewPromptBridge {
|
|
@@ -65,10 +67,13 @@ export function createCodexExecReviewPromptBridge(options: {
|
|
|
65
67
|
return {
|
|
66
68
|
kind: "codex-exec",
|
|
67
69
|
async send(input) {
|
|
70
|
+
const sandboxMode = input.action === "comment" ? "workspace-write" : "read-only"
|
|
68
71
|
const output = await runner({
|
|
72
|
+
action: input.action,
|
|
69
73
|
prompt: input.prompt,
|
|
70
74
|
workspaceRoot: input.workspaceRoot,
|
|
71
75
|
timeoutMs: input.timeoutMs ?? timeoutMs,
|
|
76
|
+
sandboxMode,
|
|
72
77
|
})
|
|
73
78
|
const raw = [output.stdout, output.stderr].filter(Boolean).join("\n")
|
|
74
79
|
if (output.exitCode !== 0) {
|
|
@@ -79,6 +84,14 @@ export function createCodexExecReviewPromptBridge(options: {
|
|
|
79
84
|
raw,
|
|
80
85
|
}
|
|
81
86
|
}
|
|
87
|
+
if (input.action === "comment" && isCodexWriteBlocked(raw)) {
|
|
88
|
+
return {
|
|
89
|
+
ok: false,
|
|
90
|
+
status: "failed",
|
|
91
|
+
error: "codex exec could not write the deck because its sandbox blocked file changes.",
|
|
92
|
+
raw,
|
|
93
|
+
}
|
|
94
|
+
}
|
|
82
95
|
if (input.action === "comment") return { ok: true, status: "completed", raw }
|
|
83
96
|
const result = extractInspectionResult(output.stdout)
|
|
84
97
|
if (!result) {
|
|
@@ -95,12 +108,14 @@ export function createCodexExecReviewPromptBridge(options: {
|
|
|
95
108
|
}
|
|
96
109
|
|
|
97
110
|
async function runCodexExec(input: {
|
|
111
|
+
action: ReviewPromptAction
|
|
98
112
|
prompt: string
|
|
99
113
|
workspaceRoot: string
|
|
100
114
|
timeoutMs: number
|
|
115
|
+
sandboxMode: "read-only" | "workspace-write"
|
|
101
116
|
}): Promise<CodexExecRunResult> {
|
|
102
117
|
return new Promise((resolve) => {
|
|
103
|
-
const child = spawn("codex", ["exec", "--json", "--ephemeral", "-C", input.workspaceRoot, input.prompt], {
|
|
118
|
+
const child = spawn("codex", ["exec", "--json", "--ephemeral", "--sandbox", input.sandboxMode, "-C", input.workspaceRoot, input.prompt], {
|
|
104
119
|
stdio: ["ignore", "pipe", "pipe"],
|
|
105
120
|
})
|
|
106
121
|
let stdout = ""
|
|
@@ -130,6 +145,15 @@ async function runCodexExec(input: {
|
|
|
130
145
|
})
|
|
131
146
|
}
|
|
132
147
|
|
|
148
|
+
function isCodexWriteBlocked(raw: string): boolean {
|
|
149
|
+
const text = raw.toLowerCase()
|
|
150
|
+
return (
|
|
151
|
+
(text.includes("patch rejected") && text.includes("read-only sandbox")) ||
|
|
152
|
+
text.includes("writing is blocked by read-only sandbox") ||
|
|
153
|
+
text.includes("blocked by read-only sandbox")
|
|
154
|
+
)
|
|
155
|
+
}
|
|
156
|
+
|
|
133
157
|
function extractInspectionResult(stdout: string): InspectionResult | undefined {
|
|
134
158
|
const direct = parseJson(stdout)
|
|
135
159
|
const fromDirect = findInspectionResult(direct)
|
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.20260524145000",
|
|
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",
|