|
12 | 12 | [](#) |
13 | 13 |  |
14 | 14 |
|
15 | | -**v1.2.0** — Graph parity & multimodal assets (see [CHANGELOG](CHANGELOG.md)) — **226 tests**, YAML frontmatter ingest, asset path resolution, case-insensitive page routing, and extended LOGOS shielding; ready for production Enterprise integration. |
| 15 | +**v1.2.0** — Graph parity, multimodal assets & format-preserving round-trip (see [CHANGELOG](CHANGELOG.md)) — **233 tests**, YAML frontmatter ingest/serialize, asset path resolution, case-insensitive page routing, and extended LOGOS shielding; ready for production Enterprise integration. |
16 | 16 |
|
17 | 17 | > *Turning a forest of local plain-text files into a unified semantic powerhouse.* |
18 | 18 |
|
@@ -113,12 +113,22 @@ Logseq Matryca Parser is a deterministic **Stack-Machine engine** that acts as t |
113 | 113 | | Area | Capability | |
114 | 114 | | :--- | :--- | |
115 | 115 | | **Asset extraction** | `LogseqNode.assets` collects markdown images, `{{pdf}}` macros, and local `[label](path)` attachments; `LogseqPage.resolve_asset_path` maps to absolute paths (`%20` decode, graph-root relative). | |
116 | | -| **YAML frontmatter** | `---` blocks at file start populate `LogseqPage.properties` like native `key::` page properties (native **serialize** still emits `key::` only). | |
| 116 | +| **YAML frontmatter** | `---` blocks at file start populate `LogseqPage.properties` like native `key::` lines; **`title:`** in YAML sets `page.title` at parse; **`serialize_logseq_page`** preserves `---` fences on round-trip when the source file used YAML. | |
117 | 117 | | **`page-tags::`** | Block and page `page-tags::` inject implicit graph tokens like `tags::`; list-shaped values feed `refs`. | |
118 | 118 | | **Case-insensitive routing** | `LogseqGraph.get_page` and `resolve_relative_page_link` resolve titles via a lowercase index (Datomic parity). | |
119 | 119 | | **Extended shielding** | HTML comments, `{{query}}` / `{{advancedquery}}`, and escaped `\#` / `\[\[` do not emit false graph tokens (embed macros still harvest nested wikilinks). | |
120 | 120 | | **Property & temporal fixes** | Comma-split ignores commas inside `[[wikilinks]]`; properties after code fences; quoted value stripping; `SCHEDULED`/`DEADLINE` ranges, repeaters, and Org warning periods; legacy `___` / `%2F` / Dendron filenames; UTF-8 BOM via `utf-8-sig`. | |
121 | 121 |
|
| 122 | +### Round-trip serialization (v1.2.0) |
| 123 | + |
| 124 | +| Area | Capability | |
| 125 | +| :--- | :--- | |
| 126 | +| **Soft-break bodies** | Multiline block continuations serialize without double-indenting alignment spaces. | |
| 127 | +| **List-shaped block props** | `tags::` / `page-tags::` with indented `-` bullets round-trip as Logseq lists (not Python repr). | |
| 128 | +| **`:LOGBOOK:` drawers** | Org drawers re-emit as `:LOGBOOK:` / `:END:` blocks, not bogus `logbook::` property lines. | |
| 129 | +| **Derived temporal keys** | Parsed `scheduled::`, `repeater::`, and related derived fields are omitted from serialized `key::` output. | |
| 130 | +| **Stable block UUIDs** | Parse → `serialize_logseq_page` → parse preserves block `id::` / UUIDs on the same outline. | |
| 131 | + |
122 | 132 | ```python |
123 | 133 | from logseq_matryca_parser.graph import LogseqGraph |
124 | 134 | from logseq_matryca_parser.logos_parser import LogosParser |
@@ -202,15 +212,15 @@ For graph hygiene, **`LogseqGraph.get_broken_references()`** flags nodes whose ` |
202 | 212 |
|
203 | 213 | | Feature | Description | |
204 | 214 | | :--- | :--- | |
205 | | -| **LOGOS Engine** | Deterministic AST parsing. YAML + native frontmatter ingest, **assets**, property contiguity (incl. post-fence), comma-safe wikilink splits, temporal ranges/repeaters, legacy filename decode, BOM-safe reads, and **shielded** code/math/query/HTML/escape regions. | |
| 215 | +| **LOGOS Engine** | Deterministic AST parsing. YAML + native frontmatter ingest, **format-preserving** `serialize_logseq_page` (YAML vs `key::` by source), list-shaped block property layout, **assets**, property contiguity (incl. post-fence), comma-safe wikilink splits, temporal ranges/repeaters, legacy filename decode, BOM-safe reads, and **shielded** code/math/query/HTML/escape regions. | |
206 | 216 | | **Multimodal assets** | **`LogseqNode.assets`** + **`LogseqPage.resolve_asset_path`** for PDFs and images relative to the graph root (Vision / document RAG). | |
207 | 217 | | **LogseqGraph** | In-memory vault: `pages` index (with **title/alias enrichment** and **case-insensitive lookup**), backlinks, effective properties, namespace resolution, fluent `GraphQuery`, optional **watchdog** invalidation. | |
208 | 218 | | **Advanced Task Extraction** | Task **state** (TODO / DOING / DELEGATED / IN-PROGRESS / …), **priority** markers `[#A]`–`[#C]` promoted to `task_priority`, and **SCHEDULED** / **DEADLINE** Logseq timestamps normalized to **UTC Unix epoch seconds** on `scheduled_at` / `deadline_at` for temporal graph and retrieval pipelines. | |
209 | 219 | | **SYNAPSE Adapter** | Native exports for **LangChain** and **LlamaIndex** with automated lineage metadata; **context-enriched** chunks with breadcrumbs, embed expansion, and inherited properties. | |
210 | 220 | | **FORGE** | JSON, clean Markdown, and **Obsidian** vault serialization (`ObsidianForgeVisitor`, `ForgeExporter.to_obsidian_markdown`). | |
211 | 221 | | **LENS Visualizer** | 60FPS interactive graph rendering (10k+ nodes) with Glassmorphism HUD. | |
212 | 222 | | **Agent-Native Printing Press** | [`agent_press.py`](src/logseq_matryca_parser/agent_press.py): **`SessionAliasRegistry`** maps session aliases ↔ block UUIDs; **`to_xray_markdown`** emits token-minimal outline text for autonomous agents (`matryca-parse agent-read`). | |
213 | | -| **Native Markdown Serialization** | [`logseq_markdown.py`](src/logseq_matryca_parser/logseq_markdown.py) + [`logseq_paths.py`](src/logseq_matryca_parser/logseq_paths.py): rebuild and write Logseq-compliant markdown pages from an AST—page properties as raw `key:: value` lines, block properties indented at **parent whitespace + exactly 2 spaces**, and namespace titles mapped via **`___`** pathing rules. | |
| 223 | +| **Native Markdown Serialization** | [`logseq_markdown.py`](src/logseq_matryca_parser/logseq_markdown.py) + [`logseq_paths.py`](src/logseq_matryca_parser/logseq_paths.py): rebuild and write Logseq-compliant markdown from an AST—page header preserves **YAML `---` or native `key::`** by source format, block properties at **parent whitespace + 2 spaces** (including bullet-list `tags::`), `:LOGBOOK:` drawers, and namespace titles via **`___`** pathing rules. | |
214 | 224 | | **Headless Write Engine** | [`agent_writer.py`](src/logseq_matryca_parser/agent_writer.py): **`append_child_to_node`** splices child bullets into on-disk Markdown from AST topology; **`serialize_logseq_page`** / **`write_logseq_page`** emit full pages; **`matryca-parse agent-write`** resolves aliases via **`.matryca_xray_state.json`**. | |
215 | 225 | | **AST Linters** | **`LogseqGraph.get_broken_references()`** returns originating nodes when `block_refs` target UUIDs absent from the global registry. | |
216 | 226 | | **Sovereign AI** | 100% Local. Zero telemetry. Private by design. | |
|
0 commit comments