mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-11-01 04:52:51 -05:00
AGENTS.md and CLAUDE.md flip their current direction from tearing down the entries world to it being gone, and drop the ephemeral note T6.7 retired. The locations page is deleted; the overview page that explained pins as location rows becomes Add Sources and Pins, and the data model, library, architecture, sync, and CLI pages describe pins as Space items. The React explorer and normalized cache guides use sources and spaces for their examples, the snapshot format doc points at the moved module, and CONTRIBUTING tracks a source instead of adding a location. The final-drop plan records FD5 with what still fails and why, the convergence plan notes the old world is gone, and the registers move FD5 to done with FDA ready.
80 lines
2.7 KiB
Plaintext
80 lines
2.7 KiB
Plaintext
---
|
|
title: Library
|
|
description: The control plane that connects sources, devices, and policy
|
|
sidebarTitle: Library
|
|
---
|
|
|
|
A library is a durable control plane for a person's sources. It connects
|
|
devices, organization, permissions, jobs, and sync without absorbing every
|
|
filesystem record into one shared database.
|
|
|
|
## What the library owns
|
|
|
|
- source registrations and attachment hints;
|
|
- paired device membership and grants;
|
|
- navigation pins, saved views, and policy;
|
|
- staged tag definitions awaiting first use, and the assertion outbox;
|
|
- durable job state and operation history;
|
|
- assertion sync watermarks;
|
|
- cross-source catalog projections.
|
|
|
|
Large source generations remain in their source stores. Original file bytes
|
|
remain at their origins or in copies created by explicit policy.
|
|
|
|
## On-disk state
|
|
|
|
A library has a stable UUID and a directory under the daemon data root. Its
|
|
databases and configuration are private runtime state. Use the daemon API for
|
|
live access rather than opening SQLite files from another process.
|
|
|
|
Source stores can live with the library, next to portable storage, or at another
|
|
configured path. Their registry entries make that placement explicit.
|
|
|
|
## Open and close
|
|
|
|
The daemon owns library lifecycle. Opening a library:
|
|
|
|
1. validates its configuration and schema;
|
|
2. opens the library databases;
|
|
3. attaches registered source stores;
|
|
4. reconciles interrupted jobs;
|
|
5. starts permitted watchers and network services;
|
|
6. publishes current availability.
|
|
|
|
Closing drains active work according to each job contract and releases database
|
|
handles. A forced process exit is recovered from durable state on the next open.
|
|
|
|
## Several libraries
|
|
|
|
Use separate libraries for a true administrative or security boundary. Use
|
|
sources, pins, tags, and views for ordinary organization inside one
|
|
library.
|
|
|
|
The CLI can create and select libraries:
|
|
|
|
~~~bash
|
|
sd-cli library create Personal
|
|
sd-cli library list
|
|
sd-cli library switch --library-id <LIBRARY_ID>
|
|
sd-cli library info
|
|
~~~
|
|
|
|
## Portability and backup
|
|
|
|
Back up the library state and every source store that contains assertions or
|
|
the last observation of an origin. A source freeze creates a dated,
|
|
self-contained store copy, but it does not copy original file bytes.
|
|
|
|
Before moving a library between machines, stop mutations, copy state, verify
|
|
the copy, then reopen it through the daemon. Do not copy a live WAL database and
|
|
assume it is consistent.
|
|
|
|
## Sync
|
|
|
|
Library sync shares small state and assertions between paired devices. Source
|
|
generations remain authority-owned and are served or replicated separately.
|
|
This keeps sync cost proportional to chosen subscriptions instead of total
|
|
library size.
|
|
|
|
See [Library Sync](/core/library-sync) and [Data Model](/core/data-model).
|