1. Project Metadata Owner (window.FlowJoeProjectState)
To prevent workspace details from scattering across separate global states, FlowJoe centralizes all document-level metadata. The project state manager implements a single serialization envelope for files and backup transfers:
2. Extension Fields & Fail-Safe Round-Tripping
To support third-party custom plugins, FlowJoe’s storage layer natively reserves namespace zones at every tier of the database schema. If a user opens a Flow that utilizes a plugin they do not have installed, FlowJoe preserves the plugin’s data intact as inert variables during subsequent save/load or export cycles:- Flow Level:
flow.enabledPluginsandflow.pluginData - Node Level:
node.pluginData - Slot Level:
slot.pluginData - Stack Item Level:
stackItem.pluginData - Metadata Tracking:
changeMetaobjects record creation sources, such ascreatedFromTemplatedetails.
3. Declarative Manifest Schema
Milestone 1 plugins are completely declarative (containing no executable code fields or remote scripts to maintain strict local-first sandbox safety). Every plugin is defined by a JSON manifest structure:4. Custom Field Classifications
Custom metadata fields must declare their data handling policies:- Scopes:
shared(serialized in JSON),local-only(local device settings),secret(keys/tokens never serialized), orprivate-project(written into the device vault only). - AI Access Rules:
allow(Joe can read/write),deny(AI blocked completely),ask(requires confirmation), ormetadata-only. - Merge Strategies: Defines how conflict resolution handles overlapping edits (e.g.
last-writer-wins,set-union,append, ormanual-review). - Indexing Styles: Informs how search is indexed (
exact,tokenized,numeric, ordate).
5. Flow Template Instantiation
When a user selects a starter template (e.g., RPG Campaign Bible), FlowJoe runs a remapping step to prevent ID collisions:- Local ID Translation: Remaps template node IDs to fresh, unique IDs.
- Reference Rewriting: Sweeps all media references, stack links, and tags to match the newly generated IDs.
- Provenance Recording: Adds
changeMeta.createdFromTemplatemarkers to keep track of the source template name and version.