@cyber-dash-tech/revela 0.18.13 → 0.18.14

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 CHANGED
@@ -19,7 +19,7 @@ In your local workspace, Revela reviews materials, saves source-linked research,
19
19
  Requirements:
20
20
 
21
21
  - The Codex CLI must be installed and the `codex` command must be available in your shell.
22
- - Your environment must be able to run `npx`; Revela uses `npx -y @cyber-dash-tech/revela@0.18.13 mcp` to start the MCP server.
22
+ - Your environment must be able to run `npx`; Revela uses `npx -y @cyber-dash-tech/revela@0.18.14 mcp` to start the MCP server.
23
23
  - For interactive Review Apply actions, `codex exec` must also work because the Review UI uses it after saved comments are applied.
24
24
 
25
25
  Optional preflight:
@@ -40,11 +40,11 @@ npm_config_cache=/tmp/revela-npm-cache bun run smoke:mcp-pack
40
40
  Install Revela through the Codex Git marketplace:
41
41
 
42
42
  ```bash
43
- codex plugin marketplace add https://github.com/cyber-dash-tech/revela --ref v0.18.13
43
+ codex plugin marketplace add https://github.com/cyber-dash-tech/revela --ref v0.18.14
44
44
  codex plugin add revela@revela
45
45
  ```
46
46
 
47
- 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.18.13 mcp` so npm can fetch the published package and its dependencies.
47
+ 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.18.14 mcp` so npm can fetch the published package and its dependencies.
48
48
 
49
49
  You do not need to run `bun install` inside the Codex marketplace clone.
50
50
 
package/README.zh-CN.md CHANGED
@@ -19,7 +19,7 @@ Revela 是 Codex plugin,用来把来源材料、调研、数据和用户意图
19
19
  环境要求:
20
20
 
21
21
  - 需要已安装 Codex CLI,并且 shell 中可以执行 `codex`。
22
- - 环境中需要可以执行 `npx`;Revela 会用 `npx -y @cyber-dash-tech/revela@0.18.13 mcp` 启动 MCP server。
22
+ - 环境中需要可以执行 `npx`;Revela 会用 `npx -y @cyber-dash-tech/revela@0.18.14 mcp` 启动 MCP server。
23
23
  - 如果使用 Review UI 的 Apply,需要 `codex exec` 可用;评论会先保存,点击 Apply 后才执行修复。
24
24
 
25
25
  可选的安装前检查:
@@ -40,11 +40,11 @@ npm_config_cache=/tmp/revela-npm-cache bun run smoke:mcp-pack
40
40
  通过 Codex Git marketplace 安装 Revela:
41
41
 
42
42
  ```bash
43
- codex plugin marketplace add https://github.com/cyber-dash-tech/revela --ref v0.18.13
43
+ codex plugin marketplace add https://github.com/cyber-dash-tech/revela --ref v0.18.14
44
44
  codex plugin add revela@revela
45
45
  ```
46
46
 
47
- Git marketplace 安装的是 Codex plugin 壳、skills、hooks 和 MCP 配置。Codex 第一次启动 Revela MCP server 时,会运行 `npx -y @cyber-dash-tech/revela@0.18.13 mcp`,由 npm 获取已发布 package 及其 dependencies。
47
+ Git marketplace 安装的是 Codex plugin 壳、skills、hooks 和 MCP 配置。Codex 第一次启动 Revela MCP server 时,会运行 `npx -y @cyber-dash-tech/revela@0.18.14 mcp`,由 npm 获取已发布 package 及其 dependencies。
48
48
 
49
49
  不需要在 Codex marketplace clone 里运行 `bun install`。
50
50
 
@@ -22,6 +22,10 @@ import { annotateVisualEditTargets, applyVisualTargetChanges, type VisualEditTar
22
22
  const TOKEN_BYTES = 24
23
23
  const SESSION_TTL_MS = 2 * 60 * 60 * 1000
24
24
  const IDLE_STOP_MS = 30 * 60 * 1000
25
+ const REVIEW_UI_ASSET_ROUTE = "/__revela_ui_asset"
26
+ const REVIEW_UI_ASSETS = new Map<string, string>([
27
+ ["/logo-wordmark.png", resolve(dirname(fileURLToPath(import.meta.url)), "../../assets/img/logo-wordmark.png")],
28
+ ])
25
29
  export const REVIEW_REF_LABEL_MAX_DISPLAY_CHARS = 32
26
30
  export const LIVE_EDITOR_IDLE_MS = 10 * 1000
27
31
 
@@ -199,6 +203,10 @@ async function handleRequest(req: Request): Promise<Response> {
199
203
 
200
204
  if (url.pathname === "/health") return textResponse("ok")
201
205
 
206
+ if (url.pathname.startsWith(`${REVIEW_UI_ASSET_ROUTE}/`) && (req.method === "GET" || req.method === "HEAD")) {
207
+ return handleReviewUiAsset(url.pathname, req.method)
208
+ }
209
+
202
210
  if (url.pathname === "/refine" && req.method === "GET") {
203
211
  const session = validateSession(url.searchParams.get("token"))
204
212
  if (!session.ok) return session.response
@@ -608,6 +616,21 @@ function handleAsset(session: EditSession, id: string | null, method: string): R
608
616
  return new Response(new Uint8Array(readFileSync(asset.absoluteFile)), { status: 200, headers })
609
617
  }
610
618
 
619
+ function handleReviewUiAsset(pathname: string, method: string): Response {
620
+ const assetPath = pathname.slice(REVIEW_UI_ASSET_ROUTE.length)
621
+ const absoluteFile = REVIEW_UI_ASSETS.get(assetPath)
622
+ if (!absoluteFile || !existsSync(absoluteFile) || !statSync(absoluteFile).isFile()) {
623
+ return textResponse("Asset not found", 404)
624
+ }
625
+
626
+ const headers = {
627
+ "content-type": mimeTypeForPath(absoluteFile),
628
+ "cache-control": "no-store, max-age=0",
629
+ }
630
+ if (method === "HEAD") return new Response(null, { status: 200, headers })
631
+ return new Response(new Uint8Array(readFileSync(absoluteFile)), { status: 200, headers })
632
+ }
633
+
611
634
  function rewriteLocalAssetRefs(content: string, input: { session: EditSession; sourceFile: string; contentType: "html" | "css" }): string {
612
635
  const baseDir = dirname(input.sourceFile)
613
636
  let rewritten = rewriteCssUrls(content, input.session, baseDir)
@@ -1367,7 +1390,7 @@ export function renderRefineShell(token: string, defaultMode: RefineMode = "edit
1367
1390
  body { margin: 0; background: #f8fafc; color: #111827; height: 100vh; overflow: hidden; }
1368
1391
  body.resizing { cursor: col-resize; user-select: none; }
1369
1392
  body.resizing iframe, body.resizing .hitbox { pointer-events: none; }
1370
- .app { --editor-width: 376px; position: relative; display: grid; grid-template-columns: minmax(0, 1fr) var(--editor-width); height: 100vh; }
1393
+ .app { --editor-width: 620px; position: relative; display: grid; grid-template-columns: minmax(0, 1fr) var(--editor-width); height: 100vh; }
1371
1394
  .preview { position: relative; min-width: 0; background: #eef2f7; }
1372
1395
  .resize-handle { position: absolute; top: 0; bottom: 0; right: calc(var(--editor-width) - 7px); width: 14px; z-index: 5; cursor: col-resize; background: transparent; }
1373
1396
  .resize-handle::before { content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 44px; border-radius: 999px; transform: translate(-50%, -50%); background: rgba(148,163,184,.34); box-shadow: 0 1px 2px rgba(15,23,42,.06); transition: background .16s ease, height .16s ease, box-shadow .16s ease; }
@@ -1392,7 +1415,8 @@ export function renderRefineShell(token: string, defaultMode: RefineMode = "edit
1392
1415
  aside { position: relative; display: flex; flex-direction: column; gap: 16px; padding: 18px; background: #ffffff; overflow: hidden; border-left: 1px solid #e2e8f0; box-shadow: -10px 0 28px rgba(15,23,42,.06); }
1393
1416
  aside button, aside input, aside select, aside textarea, aside .comment-editor { font-family: inherit; }
1394
1417
  h1 { margin: 0; font-size: 17px; line-height: 1.2; letter-spacing: 0; color: #0f172a; }
1395
- .wordmark { font-family: inherit; font-size: 17px; letter-spacing: 0; font-weight: 800; }
1418
+ .review-brand { display: inline-flex; align-items: center; min-width: 0; max-width: 100%; }
1419
+ .wordmark-logo { display: block; width: auto; height: 30px; max-width: min(210px, 82%); object-fit: contain; flex: 0 1 auto; }
1396
1420
  .panel { display: flex; flex-direction: column; gap: 10px; }
1397
1421
  .tabs { display: flex; gap: 4px; padding: 3px; border: 1px solid #e2e8f0; border-radius: 999px; background: #f8fafc; }
1398
1422
  .tab { width: auto; min-width: 112px; padding: 8px 16px; border: 1px solid transparent; border-radius: 999px; background: transparent; color: #64748b; box-shadow: none; font-weight: 750; }
@@ -1558,7 +1582,7 @@ export function renderRefineShell(token: string, defaultMode: RefineMode = "edit
1558
1582
  <div id="resizeHandle" class="resize-handle" role="separator" aria-label="Resize editor panel" aria-orientation="vertical" title="Drag to resize editor. Double-click to reset."></div>
1559
1583
  <aside>
1560
1584
  <div>
1561
- <h1><span class="wordmark">REVELA</span> Review</h1>
1585
+ <h1 class="review-brand" aria-label="Revela Review"><img class="wordmark-logo" src="${REVIEW_UI_ASSET_ROUTE}/logo-wordmark.png" alt="Revela" /></h1>
1562
1586
  </div>
1563
1587
  <div id="selectionSummary" class="selection-summary sr-only" aria-live="polite"><strong>Selection</strong><span>No references selected.</span><div id="selectionChips" class="selection-chips"></div></div>
1564
1588
  <div class="tabs" role="tablist" aria-label="Review mode">
@@ -1629,7 +1653,7 @@ export function renderRefineShell(token: string, defaultMode: RefineMode = "edit
1629
1653
  const codexReview = reviewSurface === 'codex';
1630
1654
  const COMMENT_STALE_MS = 60000;
1631
1655
  const EDITOR_WIDTH_KEY = 'revela-edit-editor-width';
1632
- const DEFAULT_EDITOR_WIDTH = 376;
1656
+ const DEFAULT_EDITOR_WIDTH = 620;
1633
1657
  const MIN_EDITOR_WIDTH = 320;
1634
1658
  const MAX_EDITOR_WIDTH = 620;
1635
1659
  const REFERENCE_COLORS = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyber-dash-tech/revela",
3
- "version": "0.18.13",
3
+ "version": "0.18.14",
4
4
  "description": "Codex-first CLI/MCP workspace for trusted narrative artifacts from local sources, research, and evidence",
5
5
  "type": "module",
6
6
  "main": "./index.ts",
@@ -2,7 +2,7 @@
2
2
  "mcpServers": {
3
3
  "revela": {
4
4
  "command": "npx",
5
- "args": ["-y", "@cyber-dash-tech/revela@0.18.13", "mcp"]
5
+ "args": ["-y", "@cyber-dash-tech/revela@0.18.14", "mcp"]
6
6
  }
7
7
  }
8
8
  }