@cyber-dash-tech/revela 0.15.2 → 0.15.4

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/tools/edit.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * tools/edit.ts
3
3
  *
4
- * revela-edit — Compatibility tool that opens Revela Refine in Edit mode.
4
+ * revela-edit — Compatibility tool that opens Revela Review in Comment mode.
5
5
  */
6
6
 
7
7
  import { tool } from "@opencode-ai/plugin"
@@ -10,11 +10,11 @@ import { openRefineDeck } from "../lib/refine/open"
10
10
  export function createEditTool(options: { client: any; workspaceRoot: string; openBrowser?: boolean }) {
11
11
  return tool({
12
12
  description:
13
- "Open Revela Refine in Edit mode for an existing slide deck. " +
13
+ "Open Revela Review in Comment mode for an existing slide deck. " +
14
14
  "Use this when the user asks to edit, revise, annotate, or visually comment on a deck, " +
15
15
  "including when they reference the current deck. " +
16
- "This is a compatibility tool for the older edit-only workflow; the user-facing entry is /revela refine. " +
17
- "It opens a local browser workspace where the user can Ctrl/Cmd-click deck elements, use the Edit tab, " +
16
+ "This is a compatibility tool for the older edit-only workflow; the user-facing entry is /revela review --deck. " +
17
+ "It opens a local browser workspace where the user can Ctrl/Cmd-click deck elements, use the Comment tab, " +
18
18
  "and send precise edit requests back to the current OpenCode session.",
19
19
  args: {},
20
20
  async execute(_args, context: any) {
@@ -43,8 +43,8 @@ export function createEditTool(options: { client: any; workspaceRoot: string; op
43
43
  url: result.url,
44
44
  mode: result.mode,
45
45
  message:
46
- `${result.stateNote} Opened Revela Refine in Edit mode. ` +
47
- "Ask the user to use Ctrl/Cmd-click in the browser to reference elements, then use the Edit tab to send comments.",
46
+ `${result.stateNote} Opened Revela Review in Comment mode. ` +
47
+ "Ask the user to use Ctrl/Cmd-click in the browser to reference elements, then use the Comment tab to send comments.",
48
48
  }, null, 2)
49
49
  } catch (error) {
50
50
  return JSON.stringify({
@@ -15,7 +15,7 @@ const evidenceSourceItemSchema = tool.schema.object({
15
15
 
16
16
  export default tool({
17
17
  description:
18
- "Submit the final structured Evidence Inspector result for a pending /revela inspect request. " +
18
+ "Submit the final structured Evidence Inspector result for a pending /revela review --deck Insight request. " +
19
19
  "Use only when responding to an inspection prompt. This updates the local browser inspector; it does not mutate DECKS.json or deck files.",
20
20
  args: {
21
21
  requestId: tool.schema.string().describe("Pending inspection request id from the inspection prompt."),
@@ -1,14 +0,0 @@
1
- /**
2
- * lib/commands/disable.ts
3
- *
4
- * Handler for `/revela disable` — deactivates slide generation mode.
5
- */
6
-
7
- import { ctx } from "../ctx"
8
-
9
- export async function handleDisable(
10
- send: (text: string) => Promise<void>,
11
- ): Promise<void> {
12
- ctx.enabled = false
13
- await send(`**Revela disabled.** Slide generation mode is off.`)
14
- }
@@ -1,48 +0,0 @@
1
- /**
2
- * lib/commands/enable.ts
3
- *
4
- * Handler for `/revela enable` — activates Revela ambient narrative mode.
5
- */
6
-
7
- import { existsSync } from "fs"
8
- import { activeDesign } from "../design/designs"
9
- import { activeDomain } from "../domain/domains"
10
- import { ctx } from "../ctx"
11
- import { ACTIVE_PROMPT_FILE } from "../config"
12
- import { buildPrompt } from "../prompt-builder"
13
- import { log } from "../log"
14
-
15
- export async function handleEnable(
16
- send: (text: string) => Promise<void>,
17
- ): Promise<void> {
18
- ctx.enabled = true
19
- const design = activeDesign()
20
- const domain = activeDomain()
21
-
22
- // Always rebuild narrative mode on enable. A prior `/revela make deck` handoff may
23
- // have intentionally switched the active prompt to deck-render mode.
24
- if (!existsSync(ACTIVE_PROMPT_FILE)) {
25
- log.warn("active prompt file missing on enable — rebuilding", { promptFile: ACTIVE_PROMPT_FILE })
26
- }
27
- try {
28
- buildPrompt({ mode: "narrative" })
29
- log.info("narrative prompt rebuilt on enable", { design, domain, promptFile: ACTIVE_PROMPT_FILE })
30
- } catch (e) {
31
- log.error("prompt rebuild failed on enable", { error: e instanceof Error ? e.message : String(e) })
32
- await send(
33
- `**Revela ambient mode enabled (with warnings).** Narrative mode is active for normal chat, ` +
34
- `but the prompt file could not be built. ` +
35
- `Try \`/revela disable\` then \`/revela enable\` again, or check that the package is correctly installed.\n\n` +
36
- `Design: \`${design}\` · Domain: \`${domain}\``
37
- )
38
- return
39
- }
40
-
41
- log.info("revela enabled", { design, domain })
42
- await send(
43
- `**Revela ambient mode enabled.** Normal chat will stay in Revela narrative mode.\n` +
44
- `Design: \`${design}\` · Domain: \`${domain}\`\n\n` +
45
- `Explicit workflow commands like \`/revela init\`, \`/revela story\`, and \`/revela make deck\` work without enabling first. ` +
46
- `Use \`/revela disable\` to return normal chat to plain OpenCode mode.`
47
- )
48
- }