feat(core): hubs, tag pages and types, with ffi, history and import support

Hubs and templates are page kinds; tags are pages of kind tag linked by a TAGGED
edge; types are plain names on the page. Schema v5. Snapshots carry
synapse-kind/tags/types. Also adapts search, import and server tests.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
dasemuandClaude Sonnet 5.5 committed 2026-10-26 02:45:22 +01:00
1 parent 91a8276966
commit b800248d67
35 files changed
+7983 -141

No files matched your search

+4 -2
View File
@@ -1,4 +1,4 @@
//! `cargo run -p synapse-import --example import -- <logseq_dir> <graph_dir> [--skip-existing]`
//! `cargo run -p synapse-import --example import -- <logseq_dir> <graph_dir> [--skip-existing] [--keep-legacy]`
use std::path::PathBuf;
use synapse_core::Graph;
@@ -7,13 +7,14 @@ use synapse_import::{ExistingPages, ImportOptions, import_logseq};
fn main() {
let args: Vec<String> = std::env::args().skip(1).collect();
let skip = args.iter().any(|a| a == "--skip-existing");
let keep_legacy = args.iter().any(|a| a == "--keep-legacy");
let paths: Vec<PathBuf> = args
.iter()
.filter(|a| !a.starts_with("--"))
.map(PathBuf::from)
.collect();
let [src, dst] = paths.as_slice() else {
eprintln!("usage: import <logseq_dir> <graph_dir> [--skip-existing]");
eprintln!("usage: import <logseq_dir> <graph_dir> [--skip-existing] [--keep-legacy]");
std::process::exit(2);
};
let graph = Graph::open(dst).expect("open graph");
@@ -23,6 +24,7 @@ fn main() {
} else {
ExistingPages::Update
},
skip_legacy_pages: !keep_legacy,
};
let started = std::time::Instant::now();
let mut last = (None, 0);