Class MarkdownExporter

Exports memory traces as Markdown files with YAML front-matter.

Usage:

const exporter = new MarkdownExporter(brain);
await exporter.export('/path/to/vault');

Hierarchy (view full)

Constructors

Methods

  • Export all memory traces as .md files into outputDir.

    Directories are created on demand (equivalent to mkdir -p).

    Parameters

    • outputDir: string

      Root directory to write the Markdown vault into.

    • Optional _options: ExportOptions

      Optional export configuration (currently unused but accepted for API consistency with other exporters).

    Returns Promise<void>

  • Build the Markdown content for a single trace.

    Subclasses (e.g. ObsidianExporter) override this to inject wiki-links and #tag decorations into the body.

    Parameters

    • trace: TraceRow

      Parsed trace row from the database.

    Returns string

    Full Markdown file content (front-matter + body).

  • Determine the relative file path for a trace within the output directory.

    Default: {scope}/{type}/{id}.md

    Parameters

    • trace: TraceRow

      The trace row.

    Returns string

    Relative path string (no leading slash).

Properties

The SqliteBrain instance to read from.