<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Core API on Rekeeply Spec</title><link>https://rekeeply.github.io/spec/en/core-api/</link><description>Recent content in Core API on Rekeeply Spec</description><generator>Hugo</generator><language>en</language><atom:link href="https://rekeeply.github.io/spec/en/core-api/index.xml" rel="self" type="application/rss+xml"/><item><title>Execution Model</title><link>https://rekeeply.github.io/spec/en/core-api/execution-model/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rekeeply.github.io/spec/en/core-api/execution-model/</guid><description>&lt;h1 id="execution-model"&gt;Execution Model&lt;a class="anchor" href="#execution-model"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="execution-modes"&gt;Execution Modes&lt;a class="anchor" href="#execution-modes"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;embedded&lt;/code&gt; (default): core runs in the same process as a client application for minimum latency.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;service&lt;/code&gt;: core runs as a separate local process and is accessed by clients via local IPC.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;remote&lt;/code&gt;: client connects to a remote core backend over a secure network channel.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="common-rules"&gt;Common Rules&lt;a class="anchor" href="#common-rules"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;same core domain logic;&lt;/li&gt;
&lt;li&gt;authentication is mandatory;&lt;/li&gt;
&lt;li&gt;one active session is bound to one account;&lt;/li&gt;
&lt;li&gt;library-scoped operations work with only one active library;&lt;/li&gt;
&lt;li&gt;clients use the core contract, not direct DB file access.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="session-lifecycle"&gt;Session Lifecycle&lt;a class="anchor" href="#session-lifecycle"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;init&lt;/code&gt;: initial local vault setup and first library creation;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;unlock&lt;/code&gt;: user authentication and opening a working session;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;active&lt;/code&gt;: command execution in active session context (library-scoped or account-scoped);&lt;/li&gt;
&lt;li&gt;&lt;code&gt;switch-library&lt;/code&gt;: explicit active library switch inside a session;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;auto-lock&lt;/code&gt;: automatic lock on inactivity timeout;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;manual lock/logout&lt;/code&gt;: explicit lock or session termination.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="sync-model-high-level"&gt;Sync Model (High-Level)&lt;a class="anchor" href="#sync-model-high-level"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;local DB is the default source of user operations;&lt;/li&gt;
&lt;li&gt;synchronization is asynchronous and does not block user actions;&lt;/li&gt;
&lt;li&gt;synchronization supports both library-scoped data and account-scoped data;&lt;/li&gt;
&lt;li&gt;in offline mode, core continues to operate and sync is deferred;&lt;/li&gt;
&lt;li&gt;conflicts are resolved by a deterministic policy (defined in a separate section);&lt;/li&gt;
&lt;li&gt;sync data transfer must use a secure channel.&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Authentication Boundary</title><link>https://rekeeply.github.io/spec/en/core-api/authentication-boundary/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rekeeply.github.io/spec/en/core-api/authentication-boundary/</guid><description>&lt;h1 id="authentication-boundary"&gt;Authentication Boundary&lt;a class="anchor" href="#authentication-boundary"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;authentication rules are defined by core;&lt;/li&gt;
&lt;li&gt;credential validation and session issuance are performed by core;&lt;/li&gt;
&lt;li&gt;clients only submit auth data through the core contract and store client-side session artifacts;&lt;/li&gt;
&lt;li&gt;data access without an active valid session is forbidden.&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Account Model</title><link>https://rekeeply.github.io/spec/en/core-api/account-model/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rekeeply.github.io/spec/en/core-api/account-model/</guid><description>&lt;h1 id="account-model"&gt;Account Model&lt;a class="anchor" href="#account-model"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="contract"&gt;Contract&lt;a class="anchor" href="#contract"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Core implementations MUST include &lt;code&gt;Account&lt;/code&gt; as a first-class domain entity.&lt;/li&gt;
&lt;li&gt;One account MUST own zero or more libraries; each library MUST belong to exactly one account.&lt;/li&gt;
&lt;li&gt;One active session MUST be bound to exactly one account.&lt;/li&gt;
&lt;li&gt;Library-scoped operations in one active session MUST operate on exactly one active library.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="account-attributes"&gt;Account Attributes&lt;a class="anchor" href="#account-attributes"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;id&lt;/code&gt; MUST exist and MUST be immutable.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;status&lt;/code&gt; MUST exist and represent lock boundary (&lt;code&gt;locked&lt;/code&gt;/&lt;code&gt;unlocked&lt;/code&gt; or equivalent).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;security_policy_ref&lt;/code&gt; MUST exist and MUST NOT contain plaintext secrets.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;default_library_id&lt;/code&gt; MAY exist; when present it MUST reference a library owned by the same account.&lt;/li&gt;
&lt;li&gt;Additional metadata MAY exist and is implementation-defined.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="lifecycle"&gt;Lifecycle&lt;a class="anchor" href="#lifecycle"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;init&lt;/code&gt; MUST create exactly one local account in a new vault.&lt;/li&gt;
&lt;li&gt;Repeated &lt;code&gt;init&lt;/code&gt; on an initialized vault MUST be rejected unless an explicit reset/force flow is used.&lt;/li&gt;
&lt;li&gt;Runtime state machine MUST be equivalent to &lt;code&gt;uninitialized -&amp;gt; locked -&amp;gt; unlocked -&amp;gt; locked&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="session-and-access-rules"&gt;Session and Access Rules&lt;a class="anchor" href="#session-and-access-rules"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;After &lt;code&gt;unlock&lt;/code&gt;, session context MUST be bound to one &lt;code&gt;account_id&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Raw-scoped operations MAY run without selecting an active library.&lt;/li&gt;
&lt;li&gt;Cross-account operations in one active session MUST be rejected.&lt;/li&gt;
&lt;li&gt;Write operations on domain entities MUST be rejected while session is locked.&lt;/li&gt;
&lt;li&gt;Export/import operations MUST run in the active account context.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="non-goals"&gt;Non-Goals&lt;a class="anchor" href="#non-goals"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;No email/username/avatar requirements.&lt;/li&gt;
&lt;li&gt;No OAuth or social identity requirements.&lt;/li&gt;
&lt;li&gt;No client/device UI settings in core account schema.&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Library Transfer Format</title><link>https://rekeeply.github.io/spec/en/core-api/library-transfer-format/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rekeeply.github.io/spec/en/core-api/library-transfer-format/</guid><description>&lt;h1 id="library-transfer-format"&gt;Library Transfer Format&lt;a class="anchor" href="#library-transfer-format"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="baseline"&gt;Baseline&lt;a class="anchor" href="#baseline"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Library export/import MUST use the &lt;code&gt;*.rkl&lt;/code&gt; file extension.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;*.rkl&lt;/code&gt; container MUST use &lt;code&gt;tar.zst&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Text datasets inside &lt;code&gt;*.rkl&lt;/code&gt; MUST use UTF-8 encoding.&lt;/li&gt;
&lt;li&gt;Baseline library export scope includes library-scoped data only.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Raw&lt;/code&gt; data is excluded from baseline library export/import scope.&lt;/li&gt;
&lt;li&gt;Transfer package MUST include manifest metadata, format version, and integrity data.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="package-structure-baseline"&gt;Package Structure Baseline&lt;a class="anchor" href="#package-structure-baseline"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;manifest.json&lt;/code&gt; (required)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;library.json&lt;/code&gt; (required)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;taxonomy.json&lt;/code&gt; (required)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;content.ndjson&lt;/code&gt; (required)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;tags.json&lt;/code&gt; (required)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;tag_links.ndjson&lt;/code&gt; (required)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;attachments.ndjson&lt;/code&gt; (required)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;progress.ndjson&lt;/code&gt; (optional)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;notes.ndjson&lt;/code&gt; (optional)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="manifest-baseline"&gt;Manifest Baseline&lt;a class="anchor" href="#manifest-baseline"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;manifest.json&lt;/code&gt; MUST include: &lt;code&gt;format&lt;/code&gt;, &lt;code&gt;version&lt;/code&gt;, &lt;code&gt;encoding&lt;/code&gt;, &lt;code&gt;container&lt;/code&gt;, &lt;code&gt;exported_at&lt;/code&gt;, &lt;code&gt;library&lt;/code&gt;, &lt;code&gt;datasets&lt;/code&gt;, &lt;code&gt;integrity&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;format&lt;/code&gt; MUST be &lt;code&gt;rkl&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;encoding&lt;/code&gt; MUST be &lt;code&gt;utf-8&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;container&lt;/code&gt; MUST be &lt;code&gt;tar.zst&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;library&lt;/code&gt; MUST include &lt;code&gt;id&lt;/code&gt; and &lt;code&gt;name&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;datasets&lt;/code&gt; MUST include dataset path and checksum for each included dataset.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;integrity&lt;/code&gt; MUST include checksum algorithm and manifest checksum.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="dataset-baselines"&gt;Dataset Baselines&lt;a class="anchor" href="#dataset-baselines"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;library.json&lt;/code&gt; MUST include &lt;code&gt;id&lt;/code&gt;, &lt;code&gt;name&lt;/code&gt;, &lt;code&gt;icon&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;taxonomy.json&lt;/code&gt; MUST include type/subtype taxonomy and field schema definitions.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;content.ndjson&lt;/code&gt; rows MUST include &lt;code&gt;id&lt;/code&gt;, &lt;code&gt;type&lt;/code&gt;, &lt;code&gt;status&lt;/code&gt;, &lt;code&gt;created_at&lt;/code&gt;, &lt;code&gt;updated_at&lt;/code&gt;, &lt;code&gt;status_changed_at&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;tags.json&lt;/code&gt; MUST include tag metadata.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;tag_links.ndjson&lt;/code&gt; rows MUST include &lt;code&gt;content_id&lt;/code&gt;, &lt;code&gt;tag_id&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="taxonomy-transfer-rule"&gt;Taxonomy Transfer Rule&lt;a class="anchor" href="#taxonomy-transfer-rule"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Taxonomy MUST travel with library during export/import.&lt;/li&gt;
&lt;li&gt;Taxonomy scope includes: content types, content subtypes, field schema definitions, tags, and tag-content links.&lt;/li&gt;
&lt;li&gt;Import MUST restore taxonomy before or together with content datasets so content references remain valid.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="dataset-note"&gt;Dataset Note&lt;a class="anchor" href="#dataset-note"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Library transfer SHOULD support attachment datasets (attachment metadata and content links).&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="attachment-dataset-baseline"&gt;Attachment Dataset Baseline&lt;a class="anchor" href="#attachment-dataset-baseline"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Attachment metadata dataset file name: &lt;code&gt;attachments.ndjson&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Each attachment row MUST include: &lt;code&gt;id&lt;/code&gt;, &lt;code&gt;content_id&lt;/code&gt;, &lt;code&gt;uri&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Optional attachment row fields: &lt;code&gt;name&lt;/code&gt;, &lt;code&gt;mime&lt;/code&gt;, &lt;code&gt;size&lt;/code&gt;, &lt;code&gt;created_at&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;content_id&lt;/code&gt; in &lt;code&gt;attachments.ndjson&lt;/code&gt; MUST reference an existing content entry.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="validation-and-safety-rules"&gt;Validation and Safety Rules&lt;a class="anchor" href="#validation-and-safety-rules"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Import MUST reject package if any required dataset is missing.&lt;/li&gt;
&lt;li&gt;Import MUST reject package if any dataset checksum validation fails.&lt;/li&gt;
&lt;li&gt;Import MUST reject path traversal entries (&lt;code&gt;../&lt;/code&gt;, absolute paths, or equivalent unsafe archive paths).&lt;/li&gt;
&lt;li&gt;Import MUST validate schema and references before final commit.&lt;/li&gt;
&lt;li&gt;Import MUST be atomic: on critical validation error, no partial final state is committed.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="import-order-baseline"&gt;Import Order Baseline&lt;a class="anchor" href="#import-order-baseline"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Validate package container and &lt;code&gt;manifest&lt;/code&gt; integrity first.&lt;/li&gt;
&lt;li&gt;Restore library metadata (&lt;code&gt;library.json&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Restore taxonomy datasets before content datasets.&lt;/li&gt;
&lt;li&gt;Restore content datasets.&lt;/li&gt;
&lt;li&gt;Restore tags and tag-content links.&lt;/li&gt;
&lt;li&gt;Restore &lt;code&gt;attachments.ndjson&lt;/code&gt; after content datasets.&lt;/li&gt;
&lt;li&gt;Run final referential validation and commit import atomically.&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Settings Model</title><link>https://rekeeply.github.io/spec/en/core-api/settings-model/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rekeeply.github.io/spec/en/core-api/settings-model/</guid><description>&lt;h1 id="settings-model"&gt;Settings Model&lt;a class="anchor" href="#settings-model"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="scope-groups"&gt;Scope Groups&lt;a class="anchor" href="#scope-groups"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;account-scoped&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;library-scoped&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="library-scoped-settings"&gt;Library-Scoped Settings&lt;a class="anchor" href="#library-scoped-settings"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;default_status_on_create&lt;/code&gt; (&lt;code&gt;enum&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;default_priority_on_create&lt;/code&gt; (&lt;code&gt;enum|null&lt;/code&gt;, default &lt;code&gt;null&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;allow_parent_links&lt;/code&gt; (&lt;code&gt;boolean&lt;/code&gt;, default &lt;code&gt;true&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;archived_visible_by_default&lt;/code&gt; (&lt;code&gt;boolean&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="account-scoped-settings"&gt;Account-Scoped Settings&lt;a class="anchor" href="#account-scoped-settings"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;default_library_id&lt;/code&gt; (optional)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;last_active_library_restore&lt;/code&gt; (&lt;code&gt;boolean&lt;/code&gt;, default &lt;code&gt;true&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;auto_lock_timeout_minutes&lt;/code&gt; (&lt;code&gt;integer&lt;/code&gt;, default &lt;code&gt;15&lt;/code&gt;, &lt;code&gt;0&lt;/code&gt; means disabled)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;require_unlock_on_start&lt;/code&gt; (&lt;code&gt;boolean&lt;/code&gt;, default &lt;code&gt;true&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sync_enabled&lt;/code&gt; (&lt;code&gt;boolean&lt;/code&gt;, default &lt;code&gt;false&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sync_mode&lt;/code&gt; (&lt;code&gt;enum: manual|auto&lt;/code&gt;, default &lt;code&gt;manual&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sync_interval_minutes&lt;/code&gt; (&lt;code&gt;integer&lt;/code&gt;, default &lt;code&gt;15&lt;/code&gt;, used for &lt;code&gt;sync_mode=auto&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;export_compression_enabled&lt;/code&gt; (&lt;code&gt;boolean&lt;/code&gt;, default &lt;code&gt;true&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;backup_enabled&lt;/code&gt; (&lt;code&gt;boolean&lt;/code&gt;, default &lt;code&gt;false&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;backup_interval_hours&lt;/code&gt; (&lt;code&gt;integer&lt;/code&gt;, default &lt;code&gt;24&lt;/code&gt;, used when backup is enabled)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;backup_retention_count&lt;/code&gt; (&lt;code&gt;integer&lt;/code&gt;, default &lt;code&gt;10&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;timezone&lt;/code&gt; (&lt;code&gt;text&lt;/code&gt;, default system timezone)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;locale&lt;/code&gt; (&lt;code&gt;text&lt;/code&gt;, default account locale or client/system fallback)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="fallback-rules"&gt;Fallback Rules&lt;a class="anchor" href="#fallback-rules"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;If &lt;code&gt;default_library_id&lt;/code&gt; is invalid or removed, fallback is &lt;code&gt;last_active&lt;/code&gt; when available, otherwise explicit library selection.&lt;/li&gt;
&lt;/ul&gt;</description></item></channel></rss>