Environment:7onez Cti expert Pele
| Knowledge Sources | |
|---|---|
| Domains | OSINT, Visualization |
| Last Updated | 2026-10-28 14:00 GMT |
Overview
Node.js 20+ or Bun runtime with the pinned Pele ES module for dependency-free Mermaid diagram layout to SVG.
Description
This environment provides the Mermaid rendering engine for IntelGraph. Pele (github.com/obsidianmd/pele, MIT) is a single dependency-free ES module (~700KB) that parses Mermaid and lays it out to plain SVG with real `<text>` labels — no `<foreignObject>`, no browser, no npm install. It replaced mermaid-cli (which needed npm + Puppeteer + a headless Chrome, hundreds of MB). The module is fetched by `pele_fetch.py` into the git-ignored `IntelGraph/vendor/pele/` directory on first render, with npm `dist.integrity` verification (sha512). The renderer applies a house style (font from `theme.DIAGRAM`, colours from `PELE_VARS`) and post-processes the SVG to be self-contained (CSS custom properties resolved, `style="rx:…"` converted to attributes).
Usage
Use this environment for Mermaid diagram rendering — flow diagrams, kill-chains, and relationship graphs in the IntelGraph layer. It is the mandatory prerequisite for `Render_Mermaid_Render`. Without Node/Bun and Pele, the Mermaid SVG/PNG/PDF outputs cannot be generated.
System Requirements
| Category | Requirement | Notes |
|---|---|---|
| OS | Linux / macOS | WSL2 on Windows |
| Hardware | Any CPU | Minimal — single ES module |
| Disk | 1MB | Pele module (~700KB) in vendor/pele/ |
Dependencies
System Packages
- `node` >= 20 or `bun` (JavaScript runtime for the Pele ES module)
Python Packages
None — `render_mermaid.py` is stdlib Python that shells out to the Node/Bun runner (`pele_render.mjs`).
Credentials
No credentials required. Pele is fetched from the public npm registry and verified by integrity hash.
Quick Install
# Install Node.js 20+ (or Bun)
# Linux:
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - && sudo apt install nodejs
# Pele is auto-fetched on first render (or run pele_fetch.py manually):
python3 intel_engine/IntelGraph/scripts/pele_fetch.py
Code Evidence
Pele pinned release, from `intel_engine/IntelGraph/references/pele.json:3-8`:
{
"release": {
"version": "1.8.0",
"tarball": "https://registry.npmjs.org/pele/-/pele-1.8.0.tgz",
"integrity": "sha512-AYmHttE70cwNJVXdfPMCANGivFlmc3bGGpMG0GqH5S5vE3RgtEuLlkqbhRfe94Csv/ZEd1TUbv2dMUHpw4p1Bg=="
}
}
Renderer docstring, from `intel_engine/IntelGraph/scripts/render_mermaid.py:7-11`:
"""ENGINE: Pele (github.com/obsidianmd/pele, pinned in references/pele.json) — one dependency-free
ES module that lays Mermaid out to plain SVG, labels as real <text> (never an HTML
<foreignObject>), run under Node >= 20 or Bun. No browser and no npm install: pele_fetch.py puts
the module in IntelGraph/vendor/pele/, and this script fetches it on first use when it is missing.
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
| `Node is not installed` | Node.js / Bun not found | Install Node.js 20+ or Bun |
| `pele.mjs not found` | Pele module not fetched | Run `python3 scripts/pele_fetch.py` or trigger first render |
| `Cannot use import statement outside a module` | Node loading .js as CommonJS | Pele is written as `pele.mjs` (not `.js`) to force ESM loading under Node 20 |
Compatibility Notes
- Node 20+ required: Older Node versions load `.js` as CommonJS and reject Pele's ESM exports. The extracted module is named `pele.mjs` to force ESM.
- Integrity verification: `pele_fetch.py` verifies the npm `dist.integrity` (sha512, base64) before extracting. Moving the pin requires re-rendering a real case's diagrams and checking by eye.
- No browser needed: Unlike mermaid-cli (Puppeteer + headless Chrome), Pele runs as a pure JS module under Node/Bun.