Skip to main content

Module bridge

Module bridge 

Source
Expand description

Bridge between the .fur/ JSON store and the canonical Markdown document.

Phase A: this reads .fur/ and writes chats/<slug>/convo.md. It never writes back into .fur/ and never deletes anything, so running the export is non-destructive and repeatable.

Output layout:

chats/
└── schema-proposal-changes-fur/
    ├── convo.md                    <- spine
    └── CHAT-20260808-181158.md     <- long-form body, copied in

Functions§

active_folder
Folder the active conversation’s files belong in, creating it if needed.
document_from_thread
Build a FurDocument from a conversation in .fur/.
find_orphans
Top-level chats/*.md files that are already present inside a conversation folder. Rebuild only walks chats/<slug>/, so these are invisible to it while still being encrypted by lock — orphans in every sense.
linked_sources
Source paths of every long-form file referenced by a conversation, taken from .fur/ rather than from the document, since the document stores only basenames.
slug_for
Folder name for a conversation: readable title slug, disambiguated by the short id so two conversations with the same title cannot collide.
sync_active
Best-effort sync of the active conversation, for commands that have just mutated .fur/.
sync_conversation
Keep chats/<slug>/ in step with .fur/ for one conversation.
write_conversation_folder
Write chats/<slug>/convo.md plus copies of every linked file.