Commit Graph
52 Commits
Author SHA1 Message Date
dasemuandClaude Opus 5.5 8459838d01 feat(server): serve MCP over Streamable HTTP at /v1/graphs/{id}/mcp
Enabled by SYNAPSE_MCP_TOKEN (own bearer tokens, constant-time check),
write tools with SYNAPSE_MCP_ALLOW_WRITE=1, Host allowlist via
SYNAPSE_MCP_ALLOWED_HOSTS. Stateless JSON responses; tools run on the shared
graph handle and wake SSE subscribers after writes. Never creates graphs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 16:13:44 +01:00
dasemuandClaude Opus 5.5 c0f0716d3b feat(mcp): add synapse-mcp server with stdio binary
Read tools (search, get_page, get_journal, list_pages, backlinks, related,
list_tags, list_types, hubs, timeline, journal_links) and page-curation write
tools behind --allow-write (create_page, append_blocks, update_block,
delete_block, set_page_type, set_page_tags, set_page_hub). Journals are
read-only. Reads run in a rolled-back transaction; writes in BEGIN IMMEDIATE
through the Graph API so they are logged as ops and sync.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 16:09:41 +01:00
dasemuandClaude Opus 5.5 c8f7cdaf92 refactor(import): expose the Markdown outline parser
The MCP server reuses it to turn Markdown outlines into nested blocks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 16:09:41 +01:00
dasemuandClaude Opus 5.5 12c3cd463b Merge branch 'feat/tags-types-view' into feat/settings-theme-tree
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 06:56:25 +01:00
dasemuandClaude Opus 5.5 872073a0a0 fix(core): clearing an undefined type's icon defines nothing
Also covers that renaming a plain tag leaves an undefined (suggested) type
of that name alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 06:52:44 +01:00
dasemuandClaude Opus 5.5 381e9044c4 feat(ffi): type icon API and page types in list DTOs
create_type, set_type_icon, rename_type and remove_type; TagDto carries the
icon and tag sources; PageBrief, TitleHit, BacklinkGroup and GraphNode
carry the page type. Bindings regenerated; MemoryBackend mirrors the core.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 06:37:33 +01:00
dasemuandClaude Opus 5.5 4fb3b39c03 feat(core): tag catalog counts explicit, type and hub sources per tag
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 06:34:23 +01:00
dasemuandClaude Opus 5.5 2b079a8d74 feat(history): export and restore type icons in types.json
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 06:33:33 +01:00
dasemuandClaude Opus 5.5 206b62d4ab feat(core): type definitions with an emoji icon, synced as PutTypeDef
Schema v8 adds type_defs (name, icon, tombstone, hlc). create_type,
set_type_icon, remove_type and rename_type; rename_tag moves the icon and
type_catalog lists icons and defined-but-unused types.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 06:33:33 +01:00
dasemuandClaude Opus 5.5 7c898f4fcd feat(app): clean up also offers empty journals, except today's
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 06:32:56 +01:00
dasemuandClaude Opus 5.5 141e1a20d0 feat(app): clean up also offers every empty page, with select all/none
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 04:11:27 +01:00
dasemuandClaude Opus 5.5 ad62a7d258 feat(graph): a hub stands for its implicit tag, no separate tag node beside it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 04:11:27 +01:00
dasemuandClaude Opus 5.5 b44cbee038 feat(app): quick switcher also finds pages by block content
BlockHit carries the page id so a hit opens its page (journals included).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 04:02:21 +01:00
dasemuandClaude Opus 5.5 6f483ce763 feat(core): a page's direct hub is an implicit tag
Members of a hub are indexed under the hub's title in page_tags, tag_catalog and the
graph tag nodes, merged with a same-name type or tag. Hub rename, delete and
membership changes re-index the derived index (no ops). Schema v7 rebuilds it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 03:52:04 +01:00
dasemuandClaude Opus 5.5 3585ce67af fix(core): sort tags on every write and make the v6 migration tolerant and transactional
Tags are sorted and deduplicated by title_key in the migration and in
write_page_row (remote ops included). The migration runs in one transaction,
rebuilds page_tags once and repairs malformed tags/types values.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 03:49:42 +01:00
dasemuandClaude Opus 5.5 0005a8e7a4 feat(ffi): virtual tag nodes, single page type, rename and remove tag
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 03:33:17 +01:00
dasemuandClaude Opus 5.5 e2ed9054c6 feat(core): tags and types are names, one type per page implying a tag
Tags no longer have pages. A page has at most one type, which implies a
tag of the same name. Tags are stored sorted. Adds rename_tag and
remove_tag. Schema v6 turns tag pages into notes and trims types to the
first one. History exports synapse-type:: and reads the old forms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 03:33:17 +01:00
dasemuandClaude Opus 5.5 39e7e43071 feat(core): suggest software and sueño types instead of cliente and herramienta
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 03:21:38 +01:00
dasemuandClaude Opus 5.5 adbbc45a56 chore: rebrand remaining Logseq references to Synapse
Describe Synapse's own Markdown dialect, export format and editor behaviour
as Synapse's, rename Logseq-named history test identifiers, and set the
app label/window titles to Synapse. The importer keeps its Logseq naming.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 02:49:44 +01:00
dasemuandClaude Sonnet 5.5 b800248d67 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>
2026-10-26 02:45:22 +01:00
dasemu 5bd8eae0a9 Merge branch 'refs/heads/claude/app-13aee9' into feat/integration 2026-10-21 15:39:56 +02:00
dasemuandClaude Opus 5.5 e43452f5af feat(graph): graph view with network, local, synapse, cluster and namespace modes
- synapse-ffi: graph_data() returns the whole page-level graph (links, tags,
  property refs, block refs/embeds per page, unlinked mentions, decayed
  synapses) as parallel arrays with degree, backlinks, Louvain clusters and
  primary tags; cached by op seq, synapse state and hour.
- synapse-ffi: ForceLayout, a Barnes-Hut force layout stepped from Dart on a
  Rust worker thread (pin/unpin for dragging, reheat).
- app: Graph view with a mode selector (Network, Local, Synapses, Clusters,
  Namespaces, Timeline), filters (title, tag, date range, min links,
  orphans, journals, mentions), pan/zoom, node drag, hover highlighting,
  activation pulse, cluster hulls, radial namespace/tag tree, and a local
  graph panel on every page. Edges render as one vertex mesh, nodes in
  colour/size batches, culled to the viewport.
- Tests: Rust extraction/mentions/cache/clusters/layout; widget tests for
  mode switching, filters and layout restarts; a real-app integration
  smoke test with frame timings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 15:39:07 +02:00
dasemuandClaude Opus 5.5 dba9ba3eaa perf(core): cached statements, no per-op savepoints inside transactions
Single operations skip their own savepoint when an enclosing transaction
exists, SQL goes through the prepared-statement cache, and the page cache
and temp store stay in memory. 208k-block import: 65 s -> 19 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 15:06:20 +02:00
dasemuandClaude Opus 5.5 d536192603 fix(import): handle real-world Logseq graphs
- empty bullets no longer panic the outline parser
- weekday names with non-ASCII letters (miércoles) no longer panic the date parser
- journal refs are recognised in the configured title format and in Logseq's
  default one, so graphs whose format changed keep their date links

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 15:06:20 +02:00
dasemu 6a4a76670b Merge branch 'refs/heads/claude/import-96e10a' into feat/integration 2026-10-21 14:48:30 +02:00
dasemuandClaude Sonnet 5.5 5fdc4bb48a fix(import): never clobber native content on re-import
Track imported pages/blocks, stable fallback ids, per-document savepoints,
rename-safe page lookup, append on first import into existing pages.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-21 14:48:03 +02:00
dasemu cd03301abf Merge branch 'refs/heads/claude/sync-server-edc467' into feat/integration
# Conflicts:
#	docs/sync.md
2026-10-21 14:44:03 +02:00
dasemu a85316d470 Merge branch 'refs/heads/claude/history-785c80' into feat/integration 2026-10-21 14:43:53 +02:00
dasemu cc96aff183 Merge branch 'refs/heads/claude/app-13aee9' into feat/integration 2026-10-21 14:43:53 +02:00
dasemu e1022b9d6f Merge branch 'refs/heads/claude/search-f73aec' into feat/integration 2026-10-21 14:43:53 +02:00
dasemuandClaude Sonnet 5.5 9ce35f90ff fix(sync): robust blob handling, op validation and quarantine
- upload_blob resumes until the server confirms the blob (202/409 are not success)
- missing local blob skips its PutAsset instead of blocking all later ops
- failed blob downloads are counted and retried, not fatal to the cycle
- server validates pushed ops (hash, hlc, clock skew) and returns per-op rejections
- pulled ops that can never apply are quarantined; storage errors stay fatal
- SYNAPSE_MAX_CLOCK_SKEW_MINUTES; document Arc<Mutex<Graph>> handle for the FFI

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-21 14:38:58 +02:00
dasemuandClaude Sonnet 5.5 2b52144311 fix(history): make restore_page and restore_graph atomic
Both run inside Graph::transaction so a failure halfway rolls every change
back. Adds a fault-injection hook and a regression test.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-21 14:38:46 +02:00
dasemuandClaude Opus 5.5 268e152efc fix(ffi): atomic compound outline edits, validated anchors, shared graph
- indent, outdent and merge run in one Graph::transaction, so a failure
  part-way no longer duplicates merged text or strands siblings.
- Placements check that the anchor block exists and is on the target page.
- SynapseGraph holds Arc<Mutex<Graph>> and exposes shared() (not bridged)
  for the sync client.
- docs: rustup's cargo must come first in PATH; sync wording.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 14:38:36 +02:00
dasemuandClaude Opus 5.5 f9137c9896 fix(core): harden merge rules and validation found in review
- page_tree shows orphans and parent cycles (from concurrent moves) as roots;
  descendants CTE and move_block ancestor walk are cycle-safe
- title conflicts compare titles only (not aliases), journals keep their title,
  and loser suffixes use the random id tail so they cannot collide
- aliases get an HLC and tombstones (last-writer-wins)
- remote page deletes cascade to blocks; LastChildOf validates the parent
- reject empty and date-shaped titles on create/rename; ensure_page redirects
  dates to journals; rename rewrites refs inside block properties
- single-row writes run inside savepoints; invalid remote asset hashes are
  ignored and never reach blob paths; HLC counter cannot overflow its width
- busy_timeout for multi-connection use; schema v2 migration

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 14:33:22 +02:00
dasemuandClaude Sonnet 5.5 2931d063f3 fix(search): use nestable SAVEPOINT in store_embeddings
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-21 14:20:36 +02:00
dasemuandClaude Opus 5.5 30d58a0166 feat(core): nestable transactions, put_page and journals_before
Importer runs its write phase in one transaction (replaces the
synchronous=OFF workaround); the FFI journals feed uses journals_before
instead of walking back one day per query.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 14:04:26 +02:00
dasemu 537d70bb55 Merge branch 'refs/heads/claude/sync-server-edc467' into feat/integration
# Conflicts:
#	CLAUDE.md
#	Cargo.lock
2026-10-21 14:02:01 +02:00
dasemu 5f719f5541 Merge branch 'refs/heads/claude/app-13aee9' into feat/integration
# Conflicts:
#	Cargo.lock
2026-10-21 14:00:08 +02:00
dasemu 9649a76b3c Merge branch 'refs/heads/claude/caldav-1d8050' into feat/integration
# Conflicts:
#	Cargo.lock
2026-10-21 14:00:03 +02:00
dasemu 56d3edf0ce Merge branch 'refs/heads/claude/history-785c80' into feat/integration
# Conflicts:
#	Cargo.lock
2026-10-21 14:00:02 +02:00
dasemu c315d184ea Merge branch 'refs/heads/claude/ai-c15c7e' into feat/integration
# Conflicts:
#	Cargo.lock
2026-10-21 13:59:58 +02:00
dasemu b02ec34371 Merge branch 'refs/heads/claude/search-f73aec' into feat/integration
# Conflicts:
#	Cargo.lock
2026-10-21 13:59:55 +02:00
dasemuandClaude Sonnet 5.5 4aa3c01a7f feat(sync): op-log sync protocol, client and axum server
Adds synapse-sync (protocol types, Remote transport and read API, SyncClient with
background loop, SSE realtime, resumable blobs) and synapse-server (multi-graph,
bearer auth, blob streaming, read API, authenticated update endpoint), with e2e
tests, docs/sync.md, docs/server.md, systemd unit and update script.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-21 04:25:00 +02:00
dasemuandClaude Opus 5.5 c3d6636606 chore(ffi): add demo graph seed example
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 03:59:42 +02:00
dasemuandClaude Opus 5.5 8c11d049fb fix(ffi): keep merged children in place and rename PageView to PageData
Merging a first child into its parent now gives its children the merged
block's slot instead of appending them after the parent's other children.
PageView clashed with Flutter's PageView widget in Dart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 03:52:59 +02:00
dasemuandClaude Sonnet 5.5 6697924bf5 feat(ai): provider-agnostic AI crate (Anthropic, OpenAI, Gemini, compatible)
Streaming chat, embeddings (Embedder impl), key stores, retries/cancellation,
and graph features: ask_graph, summarize_journal, suggest_links_and_tags,
extract_tasks, consolidate_week.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-21 03:41:21 +02:00
dasemuandClaude Sonnet 5.5 e1e64ca2de feat(search): full-text, vector, hybrid search and auto-link suggestions
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-21 03:39:20 +02:00
dasemuandClaude Sonnet 5.5 a2a6cd8cfb feat(import): Logseq graph importer
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-21 03:38:22 +02:00
dasemuandClaude Sonnet 5.5 b5e0d0f325 feat(caldav): CalDAV client, VEVENT/VTODO mapping and two-way sync
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-21 03:37:48 +02:00
dasemuandClaude Sonnet 5.5 3ab03777ea feat(history): git-based snapshots, page history and restore
Deterministic Logseq-compatible Markdown export committed to a bare gix
repository, incremental snapshots driven by the op log, snapshot policy,
page history/diff, restore through the Graph API and pure-Rust HTTP push.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-21 03:36:59 +02:00