@cyber-dash-tech/revela 0.17.21 → 0.17.23

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.
@@ -19,6 +19,9 @@ type RuntimeModule = {
19
19
  exportPptx(input: any): Promise<any>
20
20
  designList(): any
21
21
  designRead(input?: any): any
22
+ designInventory(input?: any): any
23
+ designReadLayout(input: any): any
24
+ designReadComponent(input: any): any
22
25
  designActivate(input: any): any
23
26
  designCreate(input: any): any
24
27
  designValidate(input: any): any
@@ -40,6 +43,10 @@ type RuntimeModule = {
40
43
  researchSave(input: any): any
41
44
  evaluateResearchFindings(input: any): any
42
45
  bindResearchFindings(input: any): any
46
+ prepareLocalMaterials(input: any): Promise<any>
47
+ extractMaterial(input: any): Promise<any>
48
+ recordMaterialReview(input: any): any
49
+ checkMaterialIntake(input: any): any
43
50
  }
44
51
 
45
52
  type MessageMode = "framed" | "raw"
@@ -121,6 +128,29 @@ const tools = [
121
128
  section: stringProp("Optional design section, such as rules, foundation, or chart-rules."),
122
129
  }),
123
130
  },
131
+ {
132
+ name: "revela_design_inventory",
133
+ description: "List the active or requested Revela design sections, layouts, and components.",
134
+ inputSchema: objectSchema({
135
+ name: stringProp("Optional design name."),
136
+ }),
137
+ },
138
+ {
139
+ name: "revela_design_read_layout",
140
+ description: "Read one or more layout blocks from the active or requested Revela design.",
141
+ inputSchema: objectSchema({
142
+ name: stringProp("Optional design name."),
143
+ layout: stringOrArrayProp("Layout name, comma-separated names, or an array of layout names."),
144
+ }, ["layout"]),
145
+ },
146
+ {
147
+ name: "revela_design_read_component",
148
+ description: "Read one or more component blocks from the active or requested Revela design.",
149
+ inputSchema: objectSchema({
150
+ name: stringProp("Optional design name."),
151
+ component: stringOrArrayProp("Component name, comma-separated names, or an array of component names."),
152
+ }, ["component"]),
153
+ },
124
154
  {
125
155
  name: "revela_design_activate",
126
156
  description: "Activate a Revela design for future deck planning and artifact generation.",
@@ -287,6 +317,43 @@ const tools = [
287
317
  evidenceId: stringProp("Optional canonical evidence node id override."),
288
318
  }, ["findingsFile"]),
289
319
  },
320
+ {
321
+ name: "revela_prepare_local_materials",
322
+ description: "Scan local workspace source materials, create/update the material-intake registry, and optionally extract Office/PDF files into read views.",
323
+ inputSchema: objectSchema({
324
+ workspaceRoot: stringProp("Optional workspace root."),
325
+ path: stringProp("Optional workspace-relative subdirectory to scan."),
326
+ maxDepth: numberProp("Maximum scan depth. Defaults to 2."),
327
+ autoExtract: booleanProp("Whether to extract Office/PDF sources during prepare. Defaults to true."),
328
+ }),
329
+ },
330
+ {
331
+ name: "revela_extract_document_materials",
332
+ description: "Extract text, manifest, read view, and embedded images from a workspace document. Supports pdf, pptx, docx, and xlsx.",
333
+ inputSchema: objectSchema({
334
+ workspaceRoot: stringProp("Optional workspace root."),
335
+ file: requiredStringProp("Workspace-relative source file path."),
336
+ }, ["file"]),
337
+ },
338
+ {
339
+ name: "revela_record_material_review",
340
+ description: "Record that an LLM has read extracted local material and decided what was merged, deferred, ignored, or left as a gap.",
341
+ inputSchema: objectSchema({
342
+ workspaceRoot: stringProp("Optional workspace root."),
343
+ sourcePath: requiredStringProp("Workspace-relative source file path."),
344
+ reviewedPaths: arrayProp("Workspace-relative extracted paths actually reviewed."),
345
+ reviewSummary: requiredStringProp("Concise summary of the reviewed material."),
346
+ narrativeDecisions: arrayObjectProp("Narrative decisions with kind, optional target, and rationale."),
347
+ }, ["sourcePath", "reviewedPaths", "reviewSummary", "narrativeDecisions"]),
348
+ },
349
+ {
350
+ name: "revela_check_material_intake",
351
+ description: "Check whether scanned Office/PDF sources were extracted and reviewed before being treated as narrative intake.",
352
+ inputSchema: objectSchema({
353
+ workspaceRoot: stringProp("Optional workspace root."),
354
+ strictness: enumProp(["authoring", "readiness", "render"], "Check strictness."),
355
+ }),
356
+ },
290
357
  ]
291
358
 
292
359
  let runtimePromise: Promise<RuntimeModule> | undefined
@@ -353,6 +420,9 @@ async function callTool(name: string, args: any): Promise<any> {
353
420
  if (name === "revela_export_pptx") return r.exportPptx(args)
354
421
  if (name === "revela_design_list") return r.designList()
355
422
  if (name === "revela_design_read") return r.designRead(args)
423
+ if (name === "revela_design_inventory") return r.designInventory(args)
424
+ if (name === "revela_design_read_layout") return r.designReadLayout(args)
425
+ if (name === "revela_design_read_component") return r.designReadComponent(args)
356
426
  if (name === "revela_design_activate") return r.designActivate(args)
357
427
  if (name === "revela_design_create") return r.designCreate(args)
358
428
  if (name === "revela_design_validate") return r.designValidate(args)
@@ -374,6 +444,10 @@ async function callTool(name: string, args: any): Promise<any> {
374
444
  if (name === "revela_research_save") return r.researchSave(args)
375
445
  if (name === "revela_evaluate_research_findings") return r.evaluateResearchFindings(args)
376
446
  if (name === "revela_bind_research_findings") return r.bindResearchFindings(args)
447
+ if (name === "revela_prepare_local_materials") return r.prepareLocalMaterials(args)
448
+ if (name === "revela_extract_document_materials") return r.extractMaterial(args)
449
+ if (name === "revela_record_material_review") return r.recordMaterialReview(args)
450
+ if (name === "revela_check_material_intake") return r.checkMaterialIntake(args)
377
451
  throw new Error(`Unknown tool: ${name}`)
378
452
  }
379
453
 
@@ -401,6 +475,10 @@ function booleanProp(description: string) {
401
475
  return { type: "boolean", description }
402
476
  }
403
477
 
478
+ function numberProp(description: string) {
479
+ return { type: "number", description }
480
+ }
481
+
404
482
  function enumProp(values: string[], description: string) {
405
483
  return { type: "string", enum: values, description }
406
484
  }
@@ -409,6 +487,33 @@ function arrayProp(description: string) {
409
487
  return { type: "array", items: { type: "string" }, description }
410
488
  }
411
489
 
490
+ function stringOrArrayProp(description: string) {
491
+ return {
492
+ anyOf: [
493
+ { type: "string" },
494
+ { type: "array", items: { type: "string" } },
495
+ ],
496
+ description,
497
+ }
498
+ }
499
+
500
+ function arrayObjectProp(description: string) {
501
+ return {
502
+ type: "array",
503
+ description,
504
+ items: {
505
+ type: "object",
506
+ properties: {
507
+ kind: { type: "string", enum: ["merged", "gap", "ignored", "deferred"] },
508
+ target: { type: "string" },
509
+ rationale: { type: "string" },
510
+ },
511
+ required: ["kind", "rationale"],
512
+ additionalProperties: false,
513
+ },
514
+ }
515
+ }
516
+
412
517
  function writeMessage(message: any, mode: MessageMode = activeResponseMode): void {
413
518
  activeResponseMode = mode
414
519
  const body = JSON.stringify(message)
@@ -11,11 +11,13 @@ Use this skill when the user asks about Revela designs or when generating deck H
11
11
 
12
12
  1. Call `revela_design_list` to inspect installed designs.
13
13
  2. Call `revela_design_read` with `section: "rules"` before writing or patching `decks/*.html`; this records the Codex hook context required for deck writes.
14
- 3. When the user asks to switch designs for future work, call `revela_design_activate` with the requested design name, then read the active design again.
15
- 4. For one-off deck generation with a requested design, read that design by name and pass `designName` to `revela_create_deck_foundation` without changing active design unless the user asked to switch.
16
- 5. Use the current simplified built-in design grammar: `box`, `text-panel`, `media`, `echart-panel`, `data-table`, `steps`, `roadmap-horizontal`, `roadmap-vertical`, `hero`, `stat-card`, `quote`, `toc`, `page-number`, and `brand-watermark`.
17
- 6. Fetch chart/design guidance before creating ECharts or complex layouts.
18
- 7. Do not invent unsupported component names.
14
+ 3. Call `revela_design_inventory` before authoring or repairing `deck-plan/` so planned layout/component names come from the active design.
15
+ 4. Read required details with `revela_design_read_layout` and `revela_design_read_component` before writing slide HTML that uses those layouts/components.
16
+ 5. When the user asks to switch designs for future work, call `revela_design_activate` with the requested design name, then read the active design again.
17
+ 6. For one-off deck generation with a requested design, read that design by name, call `revela_design_inventory` with that name, and pass `designName` to `revela_create_deck_foundation` without changing active design unless the user asked to switch.
18
+ 7. Use the current simplified built-in design grammar: `box`, `text-panel`, `media`, `echart-panel`, `data-table`, `steps`, `roadmap-horizontal`, `roadmap-vertical`, `hero`, `stat-card`, `quote`, `toc`, `page-number`, and `brand-watermark`.
19
+ 8. Fetch chart/design guidance before creating ECharts or complex layouts.
20
+ 9. Do not invent unsupported component names.
19
21
 
20
22
  Deck HTML must keep exactly one direct `.slide-canvas` child inside every `<section class="slide" ...>`; place `.page` or layout containers inside `.slide-canvas`, not directly under `.slide`.
21
23
 
@@ -18,14 +18,24 @@ Use this skill when the user asks to start Revela, initialize the workspace, ing
18
18
 
19
19
  ## Workflow
20
20
 
21
- 1. Inspect the workspace with normal Codex file tools. Stay inside the current workspace root.
22
- 2. Prefer local source materials first: Markdown, text, CSV, PDFs, Office files, existing `researches/`, existing `revela-narrative/`, `deck-plan/`, and `decks/`.
23
- 3. Call `revela_domain_list` and `revela_domain_read` for active domain guidance before authoring narrative meaning. Treat domain guidance as framing guidance, never as evidence.
24
- 4. If `revela-narrative/` exists, call `revela_markdown_qa` and `revela_compile_narrative`.
25
- 5. If the narrative vault is missing, create the initial `revela-narrative/` Markdown nodes directly with valid frontmatter and plain wikilink relations.
26
- 6. Evidence nodes must preserve source, quote/snippet, support scope, unsupported scope, caveat, and strength before being treated as support.
27
- 7. After writing narrative Markdown, call `revela_markdown_qa` and `revela_compile_narrative` again.
28
- 8. End with a concise init report: local materials found, active domain, narrative graph status, open gaps, Markdown QA status, and next command/action.
21
+ 1. Call `revela_prepare_local_materials` first. Treat scan results as an intake registry and task list, not as source content.
22
+ 2. For any registry entry with `requiresExtraction: true`, do not read the original Office/PDF file directly for narrative intake. Use the returned `allowedReadPath` / `read_view_path`; if missing, call `revela_extract_document_materials` first.
23
+ 3. Prefer local source materials first: Markdown, text, CSV, PDFs, Office files, existing `researches/`, existing `revela-narrative/`, `deck-plan/`, and `decks/`.
24
+ 4. After reading extracted material views, call `revela_record_material_review` for each considered Office/PDF source. Record what was merged, deferred, ignored, or left as a gap.
25
+ 5. Call `revela_domain_list` and `revela_domain_read` for active domain guidance before authoring narrative meaning. Treat domain guidance as framing guidance, never as evidence.
26
+ 6. If `revela-narrative/` exists, call `revela_markdown_qa` and `revela_compile_narrative`.
27
+ 7. If the narrative vault is missing, create the initial `revela-narrative/` Markdown nodes directly with valid frontmatter and plain wikilink relations.
28
+ 8. Evidence nodes must preserve source, quote/snippet, support scope, unsupported scope, caveat, and strength before being treated as support.
29
+ 9. After writing narrative Markdown, call `revela_markdown_qa` and `revela_compile_narrative` again.
30
+ 10. Before the final report, call `revela_check_material_intake` and surface any warnings about scanned-but-unextracted, extracted-but-unreviewed, unsupported, failed, or text-only sources.
31
+ 11. End with a concise init report: local materials found, active domain, narrative graph status, material intake status, open gaps, Markdown QA status, and next command/action.
32
+
33
+ ## Material Intake Rules
34
+
35
+ - Scan results only prove that files exist; they do not prove file content.
36
+ - For `.docx`, `.pptx`, `.xlsx`, and `.pdf`, read the extracted `read_view_path` instead of using Codex/textutil/raw reads of the original file.
37
+ - Extracted images are candidate materials only. Do not interpret them as evidence unless image meaning is explicitly reviewed or supplied by the user.
38
+ - If a user explicitly asks for text-only inspection, report it as degraded intake and do not treat it as complete source review.
29
39
 
30
40
  ## Markdown Rules
31
41
 
@@ -18,15 +18,16 @@ Use this skill when the user asks to make, generate, or update a Revela deck.
18
18
 
19
19
  1. Call `revela_compile_narrative` and `revela_markdown_qa`.
20
20
  2. Report narrative and Markdown diagnostics, but treat only malformed/unsafe files and technical artifact validity as hard blockers.
21
- 3. Call `revela_read_deck_plan` as the required deck-plan preflight before any HTML generation.
22
- 4. If `deck-plan/` is missing or incomplete, author or repair `deck-plan/index.md` and `deck-plan/slides/*.md` before calling `revela_create_deck_foundation`.
23
- 5. Report deck-plan diagnostics before artifact generation, including stale narrative hashes, missing slide projections, missing evidence trace, caveats, or malformed plan files.
24
- 6. Do not start HTML generation from narrative alone unless the user explicitly asks for a throwaway diagnostic smoke deck.
25
- 7. For new HTML files, call `revela_create_deck_foundation`.
26
- 8. Read active design guidance with `revela_design_list` and `revela_design_read` using `section: "rules"` before writing `decks/*.html`; fetch layouts/components/chart rules as needed. If the user asks to switch designs persistently, call `revela_design_activate`; if they ask for a one-off design, read that design by name and pass `designName` to `revela_create_deck_foundation`.
27
- 9. Patch slides into the foundation between Revela slide markers. Preserve positive 1-based `data-slide-index` values. Every slide must use `<section class="slide" ...>` with exactly one direct `.slide-canvas` child.
28
- 10. Generate chapter by chapter. Keep the HTML valid after each write.
29
- 11. After every HTML write, call `revela_run_deck_qa` and repair hard errors before review or export.
21
+ 3. Call `revela_design_list`, `revela_design_read` using `section: "rules"`, and `revela_design_inventory` before authoring or repairing `deck-plan/`; deck-plan layout/component names must come from the selected design inventory.
22
+ 4. Call `revela_read_deck_plan` as the required deck-plan preflight before any HTML generation.
23
+ 5. If `deck-plan/` is missing or incomplete, author or repair `deck-plan/index.md` and `deck-plan/slides/*.md` before calling `revela_create_deck_foundation`; use only inventory-listed layouts/components in slide frontmatter and visual intent.
24
+ 6. Report deck-plan diagnostics before artifact generation, including stale narrative hashes, missing slide projections, missing evidence trace, caveats, malformed plan files, or layout/component names outside the active design inventory.
25
+ 7. Do not start HTML generation from narrative alone unless the user explicitly asks for a throwaway diagnostic smoke deck.
26
+ 8. For new HTML files, call `revela_create_deck_foundation`.
27
+ 9. Before patching slide HTML, read the specific layouts/components used by the deck plan with `revela_design_read_layout` and `revela_design_read_component`; fetch `section: "chart-rules"` and the `echart-panel` component before creating or changing ECharts. If the user asks to switch designs persistently, call `revela_design_activate`; if they ask for a one-off design, read that design by name, call `revela_design_inventory` with that name, and pass `designName` to `revela_create_deck_foundation`.
28
+ 10. Patch slides into the foundation between Revela slide markers. Preserve positive 1-based `data-slide-index` values. Every slide must use `<section class="slide" ...>` with exactly one direct `.slide-canvas` child.
29
+ 11. Generate chapter by chapter. Keep the HTML valid after each write.
30
+ 12. After every HTML write, call `revela_run_deck_qa` and repair hard errors before review or export.
30
31
 
31
32
  ## Generated Visual Assets
32
33