@cyber-dash-tech/revela 0.17.13 → 0.17.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.
@@ -493,11 +493,7 @@ function handleDeck(session: EditSession): Response {
493
493
  session.assets.clear()
494
494
  session.assetKeys.clear()
495
495
  session.nextAssetId = 1
496
- const sourceHtml = readFileSync(session.absoluteFile, "utf-8")
497
- const version = readDeckVersion(session).version
498
- const annotated = annotateVisualEditTargets(sourceHtml)
499
- session.visualTargets = annotated.targets
500
- session.visualTargetDeckVersion = version
496
+ const annotated = refreshVisualTargets(session)
501
497
  return htmlResponse(rewriteLocalAssetRefs(annotated.html, {
502
498
  session,
503
499
  sourceFile: session.absoluteFile,
@@ -505,6 +501,15 @@ function handleDeck(session: EditSession): Response {
505
501
  }))
506
502
  }
507
503
 
504
+ function refreshVisualTargets(session: EditSession): { html: string; version: string } {
505
+ const sourceHtml = readFileSync(session.absoluteFile, "utf-8")
506
+ const version = readDeckVersion(session).version
507
+ const annotated = annotateVisualEditTargets(sourceHtml)
508
+ session.visualTargets = annotated.targets
509
+ session.visualTargetDeckVersion = version
510
+ return { html: annotated.html, version }
511
+ }
512
+
508
513
  function handleAsset(session: EditSession, id: string | null, method: string): Response {
509
514
  if (!id) return textResponse("Missing asset id", 400)
510
515
  const asset = session.assets.get(id)
@@ -726,9 +731,10 @@ async function handleVisualChanges(req: Request, session: EditSession): Promise<
726
731
  targets: session.visualTargets,
727
732
  changes,
728
733
  })
734
+ const refreshed = refreshVisualTargets(session)
729
735
  session.lastActiveAt = Date.now()
730
736
  scheduleIdleStop()
731
- return jsonResponse({ ok: true, deckVersion: result.deckVersion, changeCount: result.changeCount })
737
+ return jsonResponse({ ok: true, deckVersion: refreshed.version, changeCount: result.changeCount })
732
738
  } catch (error) {
733
739
  const message = error instanceof Error ? error.message : String(error)
734
740
  return jsonResponse({ ok: false, error: message }, 400)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyber-dash-tech/revela",
3
- "version": "0.17.13",
3
+ "version": "0.17.14",
4
4
  "description": "OpenCode plugin 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.17.13", "mcp"]
5
+ "args": ["-y", "@cyber-dash-tech/revela@0.17.14", "mcp"]
6
6
  }
7
7
  }
8
8
  }