docs: document phase 5b, the server as a project home
Phase 5b had only module rows and the review's DECISIONS and CHANGELOG lines. The brief now describes the server home as the code does after the review fixes: the projects API, projectChanged, the capability, the settings PATCH under the lease, renders of a project version, the panel's Projects section, and the desktop's server projects (open, copy, sync, chip, renders, viewers). DECISIONS gains the phase's own rows; the 5b rows are dated 2026-10-26 like the other review-2 phases, and three 5a rows are marked partly superseded. CHANGELOG, STATUS, the request's 5b row and ARCHITECTURE follow the code (frames stamp, stored reads, the .thumb marker, followed renames, the editor's sign-in). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ae41c95682
commit
3ade4b8d6c
6 files changed
+258
-62
No files matched your search
+152
-7
@@ -294,6 +294,15 @@ working state, its versions and the sequence's proxies (originals from phase 5c)
|
||||
renders run where the originals are. A local-only library works the same way, its archive
|
||||
being the home.
|
||||
|
||||
Server home (amended 2026-10-26, R8). A Chronos Server whose `server/info` lists the
|
||||
`projects` capability is the home of its sequences, with the same rules as this PC's
|
||||
archive (§7, §14.3, §14.5). A server sequence opens in the workspace like a sequence of this
|
||||
PC: its proxies are downloaded into the workspace, its versions are pushed to and pulled from
|
||||
the server, and its renders and analyses run on the server. The server is reached only
|
||||
through this PC's sign-in on the Server screen: a project of a server this PC is not signed
|
||||
in to still opens from the workspace and reads Offline. An older server's sequences open
|
||||
with proxies as before (§14.5).
|
||||
|
||||
---
|
||||
|
||||
## 5. Domain model
|
||||
@@ -669,6 +678,13 @@ under the sequence's lease (a read waits at most 3 s for it, then answers from t
|
||||
project no index knows, is a creation cut short: it holds nothing back and is left as it
|
||||
is. One Main per sequence is decided from the records (the oldest that says Main); any
|
||||
other becomes an ordinary project with every version kept.
|
||||
- A sequence with no folder yet (a server's sequence made before its first photo) keeps no
|
||||
projects: it lists none, and every change is refused before anything is written (amended
|
||||
2026-10-26, R8).
|
||||
- On a server, a `PATCH` of a sequence's settings writes them to its `project.json` under
|
||||
the sequence's lease first, then to the index, and puts the file back when the index does
|
||||
not take them, so Main never takes an older file for the sequence's settings (amended
|
||||
2026-10-26, R8).
|
||||
|
||||
Rules: originals are immutable (never rewritten; edits are settings; a conversion takes an
|
||||
original out of its sequence only into the trash, amended 2026-10-26, R7); every write of a
|
||||
@@ -1108,7 +1124,8 @@ player smoke test on Windows CI.
|
||||
- Open (a card, the Archive manager's Open, Jobs' Open; amended 2026-10-26, R8) opens a
|
||||
sequence of this PC in Edit as a project of the workspace (§12.3): the project of that
|
||||
sequence opened last on this PC, else *Open in workspace* asks which. A server-only
|
||||
sequence still opens with proxies (§14.5) until the server home (phase 5b).
|
||||
sequence opens the same way, as a project whose home is the server, when the server keeps
|
||||
projects and the account may edit; otherwise it opens with proxies (§14.5).
|
||||
|
||||
### 12.3 Edit (amended 2026-10-16, R7; formerly "Sequence editor"; amended 2026-10-26, R8)
|
||||
|
||||
@@ -1172,7 +1189,8 @@ player smoke test on Windows CI.
|
||||
|
||||
Workspace (amended 2026-10-26, R8; §4.4, §7). Edit opens a sequence of this PC's archive only
|
||||
as a project of the workspace, and never writes into the library; a capture (sample data)
|
||||
keeps editing the library, and a server sequence keeps opening with proxies until phase 5b.
|
||||
keeps editing the library. A server sequence opens as a project of the workspace too when its
|
||||
server keeps projects (server home, below); otherwise it opens with proxies as before.
|
||||
- Which project: the one of that sequence opened last on this PC. Otherwise *Open in
|
||||
workspace* asks: **Project** (an existing one, Main first, made from the sequence's
|
||||
settings as they are; or New, with a name of 1–60 characters unique in the sequence) and
|
||||
@@ -1245,9 +1263,43 @@ keeps editing the library, and a server sequence keeps opening with proxies unti
|
||||
- `.chronos` files: format 2 opens its workspace project (a copy of one gives it its
|
||||
settings as one undo step; a project the library lacks falls back to Main); format 1
|
||||
gives its settings to the sequence's Main. *Save project file* still writes format 1.
|
||||
- Server home (amended 2026-10-26, R8; §4.4, §14.3, §14.5). A sequence of a server that
|
||||
keeps projects (the `projects` capability) opens as a project whose home is that server,
|
||||
through this PC's sign-in:
|
||||
- *Open in workspace* lists the server's projects (Main first, or New) and the media
|
||||
(*Proxies*); it shows no copy size, and the copy checks the drive's free space as it
|
||||
goes. A project of the sequence already in the workspace opens from there, the server
|
||||
reachable or not. A project asked for (a `.chronos` file) that the server does not have
|
||||
opens the sequence's Main instead.
|
||||
- An account without Edit gets the sequence with proxies, read-only, and nothing is
|
||||
checked out. A copy the workspace already holds still opens; its pushes are refused
|
||||
(*Your account cannot change the projects of this server.*).
|
||||
- The *Workspace copy* job downloads through the signed-in session, never through this
|
||||
PC's archive: the frames of one frames version with the aliases of the server's
|
||||
conversions, each frame's proxy, or its thumbnail while the server has none (a later
|
||||
copy, *Update media*, takes the proxy once the server has it), and the server's deep
|
||||
report. Each file is hashed as it arrives and checked on disk, four at a time,
|
||||
resumable. Downloads are not held on a metered connection (only uploads are).
|
||||
- Texts name the server (*Server newer*, *Not on server*, *Take server's*). The chip and
|
||||
the picker's rows of the server's projects follow its `projectChanged` at once; after a
|
||||
lost event stream, and when the sign-in starts or ends, every project of that server
|
||||
reads its state again. A project the server deleted reads *Not on server*; its copy and
|
||||
unsent versions are kept. A rename on the server reaches the copy at once, and at every
|
||||
pull.
|
||||
- Renders run on the server and render what it holds. Changes not saved as a version, or
|
||||
versions not sent, are offered first: *Send and render* saves and sends them, *Keep*
|
||||
renders nothing. The job names the version the server holds, without settings, and the
|
||||
server renders it with the job's export. Offline, *Not on server*, Damaged or media
|
||||
removed: nothing is rendered and a toast says why. Analyses run on the server; with
|
||||
Sync automatically on, Main takes their Auto values when the server tells its next
|
||||
change (within 2 minutes).
|
||||
- The editor connects with the sign-in in use at each render or analysis, so a project
|
||||
opened signed out renders once signed in. Projects name the server by the address they
|
||||
were made with: signed in to the same server through another address, they read
|
||||
Offline.
|
||||
- Not yet (phase 5c): originals in the workspace and renders from them, moving the
|
||||
workspace folder with its projects, emptying `<workspace>/.trash`, automatic clean-up and
|
||||
the size limit. The server home is phase 5b.
|
||||
the size limit.
|
||||
|
||||
### 12.4 Import (cards)
|
||||
|
||||
@@ -1510,6 +1562,12 @@ trusted yet, `server/info` is read once without checking it and without credenti
|
||||
a Chronos answer leads to the fingerprint question, so another service's certificate is never
|
||||
offered for trust (amended 2026-11-04, owner review 3).
|
||||
|
||||
Row actions of a server sequence (amended 2026-10-26, R8). On a server that keeps projects
|
||||
(§4.4), an account with Edit gets *Open in workspace* (§12.3) in place of *Open with
|
||||
proxies*; *Download originals* stays for an account that may download them. An account
|
||||
without Edit gets *Open with proxies*. On an older server, *Open in workspace* is shown
|
||||
disabled after the other actions, and its tooltip says the server needs an update.
|
||||
|
||||
### 12.8 Settings
|
||||
|
||||
Sections (list on the left, controls on the right, no descriptions — tooltips only):
|
||||
@@ -1657,6 +1715,11 @@ POST /api/v1/sequences/{id}/frames/delete {frameIds, expectedFramesVersion, d
|
||||
POST /api/v1/sequences/bulk/delete {ids, dryRun} · /bulk/retag {ids, add, remove} · /bulk/jobs {ids, kind} → an item per id
|
||||
GET /api/v1/frames/{id}/original · /proxy · /thumb (streamed, Range supported)
|
||||
|
||||
GET /api/v1/sequences/{sid}/projects live projects, Main first · POST {name, fromVersionId?} → 201 project
|
||||
GET/PATCH {name}/DELETE /sequences/{sid}/projects/{pid} · GET …/{pid}/head · GET …/{pid}/versions?before|after&limit&summary · GET …/{pid}/versions/{vid}[?stored=true]
|
||||
POST /api/v1/sequences/{sid}/projects/{pid}/versions push → 201 stored | 200 already_stored | 409 project_diverged | 422 hash_mismatch, newer_format, invalid_version, too_large
|
||||
GET /api/v1/sequences/{sid}/projects/frames every frame and the photo aliases of replaced tombstones, of one frames version · GET …/frames/stamp
|
||||
|
||||
POST /api/v1/uploads {sequenceId|null, fileName, size, sha256, capturedAt?, sessionKey?, restore?} → {uploadId, chunkSize, received[]} | 200 {alreadyExists, frameId?}
|
||||
PUT /api/v1/uploads/{id}/chunks/{n} body bytes (idempotent) → {received}
|
||||
POST /api/v1/uploads/{id}/complete[?restore=true] → frame id (server verifies sha256, commits into layout, updates manifest)
|
||||
@@ -1666,7 +1729,7 @@ DELETE /api/v1/uploads/{id}
|
||||
GET /api/v1/jobs?state · POST /jobs {kind, target, params} · GET /jobs/{id} · POST /jobs/{id}/cancel · /retry
|
||||
GET /api/v1/schedules schedules (system ones first), actions with availability, time zone, clean-up steps (admin)
|
||||
POST /api/v1/schedules · GET/PUT/PATCH/DELETE /schedules/{id} · POST /schedules/{id}/run · /reset · GET /schedules/{id}/runs?cursor&limit
|
||||
WS /api/v1/events {type: jobProgress|jobState|sequenceChanged|cardEvent|nodeState|scheduleChanged, …}
|
||||
WS /api/v1/events {type: jobProgress|jobState|sequenceChanged|cardEvent|nodeState|scheduleChanged|projectChanged, …}
|
||||
|
||||
POST /api/v1/nodes/register · POST /nodes/{id}/heartbeat · POST /nodes/{id}/claim → job · POST /nodes/{id}/jobs/{jobId}/result (chunked upload of output)
|
||||
|
||||
@@ -1844,6 +1907,52 @@ and every move of a next run; older clients ignore it. `GET/PUT /server/settings
|
||||
the log group `logs` (R11; a `PUT` without it keeps the log settings) and `lockedBy`, the
|
||||
environment variable that fixes each locked setting (ignored when saving).
|
||||
|
||||
Projects (amended 2026-10-26, R8; §7, §12.3, §14.5). The server keeps its sequences'
|
||||
projects as this PC's archive does (§7), and `server/info` lists the capability
|
||||
`projects`. A server without it answers 404 `not_found` with no details.
|
||||
- Reading needs Read; making, renaming and pushing need Edit. Deleting needs Delete and an
|
||||
admin, the sequence's owner or the project's maker (the same username, on an account made
|
||||
no later than the project); otherwise 403 `forbidden`. Main is never deleted (409
|
||||
`main_cannot_be_deleted`); the API can rename it.
|
||||
- The list makes Main from the sequence's settings the first time it is read (503 when that
|
||||
cannot be done now). A sequence with no photo yet lists no projects, and every change
|
||||
answers 409 `sequence_empty`.
|
||||
- Errors: 404 `not_found` with details `sequence`, `project` or `version`; 400
|
||||
`invalid_name` (1–60 characters after trimming, no control characters); 409 `name_taken`
|
||||
(any case, among live projects); 503 `archive_offline`, `sequence_busy`, `folder_moved` or
|
||||
`projects_unreadable` for writes (reads wait at most 3 s for the lease, then answer from
|
||||
the index); 409 `folder_in_use` when a project's file cannot be written.
|
||||
- A deleted project answers 404 `project` to its GET, head, rename, push and delete; its
|
||||
versions can still be read.
|
||||
- Version pages: newest first below `before` (default 50), or oldest first above `after`
|
||||
(default 100); `limit` 1–200; `more` when more follow. A page also ends before its
|
||||
settings pass 4 Mi characters (one version always goes). `summary=true` leaves the
|
||||
settings out. `?stored=true` answers a version only when its file on the server reads back
|
||||
with its content hash (404 `version` otherwise, `project` for a deleted project).
|
||||
- A push body may be up to 65 MiB (the 64 MiB version limit plus 1 MiB; 413 `too_large`
|
||||
above). The server numbers the version head + 1 and records the pushing account as its
|
||||
author, and the version's client name, else the token's. Answers are `{outcome, version,
|
||||
head, code, message}`: 201 `stored`; 200 `already_stored` (the same id and hash again);
|
||||
409 `diverged` / `project_diverged`, with the head; 422 `hash_mismatch`, `newer_format`,
|
||||
`invalid` / `invalid_version` (not portable, or another project's id) and `too_large` (a
|
||||
version file over 64 MiB). A version of Main is mirrored into the sequence's settings.
|
||||
- `…/projects/frames` answers every frame in index order and the replaced tombstones as
|
||||
photo aliases, of one frames version; `…/frames/stamp` answers a short stamp of them
|
||||
(frames version, hashed photos and their checksum, removals), so a workspace reads the
|
||||
frames again only when it moved.
|
||||
- Creations, renames (when the name changed) and deletions are audited `project_created`,
|
||||
`project_renamed`, `project_deleted`; every push is logged.
|
||||
- `projectChanged {sequenceId, projectId, change: created|renamed|deleted|pushed,
|
||||
headNumber, headVersionId}` goes to every signed-in subscriber after each change: the
|
||||
API's own, Main made at the first read, Main's external or merge versions, and projects
|
||||
and versions another program wrote, found in the sidecars by a project call, a full scan
|
||||
or a read-only catch-up. Main passing to another project reads as `renamed`. Main's head
|
||||
written into the settings also sends `sequenceChanged` `settings`. Older clients ignore it.
|
||||
- A `PATCH /sequences/{id}` that carries settings writes them under the sequence's lease
|
||||
(§7), waiting 20 s for it, and can answer 503 `archive_offline`, `sequence_busy` or
|
||||
`folder_moved`, or 409 `folder_in_use`, with nothing changed. A `PATCH` of title, tags,
|
||||
rating or notes alone writes the index only.
|
||||
|
||||
### 14.4 Upload and ingest
|
||||
|
||||
Client computes SHA-256 while reading; `POST /uploads` short-circuits if the hash exists;
|
||||
@@ -1981,9 +2090,24 @@ only settings both sides changed are a conflict. Versions are compared and place
|
||||
photo or a conversion that replaced one never move a position. Only Main's head is
|
||||
mirrored into the sequence's settings, so only Main crosses to a linked server copy,
|
||||
through the settings sync above; other projects never leave their home. A home that is
|
||||
read-only or out of reach leaves the versions waiting in the workspace. Phase 5a's home is
|
||||
this PC's archive; the server home (API under `/sequences/{id}/projects`, the
|
||||
`projectChanged` event) is phase 5b.
|
||||
read-only or out of reach leaves the versions waiting in the workspace. The home is this
|
||||
PC's archive or a server (§14.3).
|
||||
|
||||
Server home (amended 2026-10-26, R8; §12.3, §14.3). A server's projects work as on a PC's
|
||||
archive:
|
||||
- Settings a `PATCH`, an analysis's Auto values or a conversion's Replace write become
|
||||
Main's next (external) version soon after, in the background, told as `projectChanged`
|
||||
`pushed`. This holds only for sequences that already have a Main; Main is still made
|
||||
from the settings at the first read. A busy sequence is tried again after 5 s, 30 s and
|
||||
2 minutes, then left to the next project call.
|
||||
- Other projects never leave the server; a desktop's linked copy still syncs Main through
|
||||
the settings.
|
||||
- The desktop takes `projectChanged` from its sync connection. After a lost event stream it
|
||||
reads the state of that server's projects again only once the stream is open again and a
|
||||
comparison made after that reached the server.
|
||||
- A workspace reads the server's versions page by page, reading on past a page the server
|
||||
ended early, and prunes a kept version only after reading it back from the server's file
|
||||
(`?stored=true`).
|
||||
|
||||
### 14.6 Job engine
|
||||
|
||||
@@ -2088,6 +2212,15 @@ per job settings), renders with its GPU, uploads the result as a render of the s
|
||||
Node state shown in admin › Jobs; the server falls back to managed formats when no node is
|
||||
available and says so in the job log.
|
||||
|
||||
Project versions (amended 2026-10-26, R8). A render job may name `projectId` and
|
||||
`projectVersionId`. `POST /jobs` checks them against the target sequence (404 `not_found`
|
||||
`project` or `version`): a version must belong to a project of the sequence and names its
|
||||
project; a project alone, without settings of its own, is pinned to its head when the job is
|
||||
queued; a deleted project's versions still render. The server's own render and a node's claim
|
||||
get that version's settings (or the job's own portable settings) placed on the sequence's
|
||||
frames; a node gets them placed on the frames its claim lists, read as one frames version.
|
||||
The render records the project and the version. Jobs without them render as before.
|
||||
|
||||
### 14.8 Admin web panel (`/admin`, vanilla HTML/CSS/JS, ES modules, no build step, same API)
|
||||
|
||||
```
|
||||
@@ -2178,6 +2311,17 @@ operations; it queues no deep analysis (the API's `bulk/jobs` takes `deep`).
|
||||
confirmation that asks for their number to be typed when more than 20 go, the sequence's
|
||||
frames version sent so a changed sequence refuses); *Delete…* of the sequence; its
|
||||
renders, to download; *Add photos* (the upload dialog, R3).
|
||||
- *Projects* on a sequence's page (amended 2026-10-26, R8; §14.3): the sequence's projects,
|
||||
Main first, named in the panel's language while it keeps the name Main and marked *Main*
|
||||
once renamed; each with its newest version number and who changed it last and when. A
|
||||
click on a project opens its versions (number, kind: Saved, Merged, Restored, Imported,
|
||||
Outside change; author or client, note, time; the head marked *Newest*), 20 at a time
|
||||
with *Load more*, read without their settings. *Rename…* and *Delete…* only for projects
|
||||
other than Main; Delete asks for a confirmation naming the project, which goes with its
|
||||
versions into the sequence's project trash. The section makes no project, pushes,
|
||||
restores or edits nothing. It follows `projectChanged` of the sequence, reading again only
|
||||
the changed projects' open versions (as many as are shown), and reads everything again
|
||||
after a reconnection. The table drops columns at narrow widths.
|
||||
- `#/library?view=trash`, also opened from Archive: the trash's entries (kind, sequence,
|
||||
photos, size, deleted by and when), each with *Restore*, whose answer says which photos
|
||||
stayed and why; *Empty…* measures the trash (dry run), lists what goes, asks for the word
|
||||
@@ -2770,6 +2914,7 @@ questions asked and the answers; DECISIONS rows give the reasons.
|
||||
| 2026-10-26 | Owner review 2, R7 (naming) | §7.1, §13, §14.3 | One naming rule for import, upload and Reorganize: the sequence's camera and lens, `{n}` its place, a frame without a time at the sequence's start; template rules everywhere a template is typed or sent (no folder level scans skip, one a value such as a title gives escaped with `_`; a file template keeps the extension, tells photos apart, holds no slash; long names shortened before `.{ext}`; titles as text), held to a template only when it is given anew; `invalid_template` names the rule. |
|
||||
| 2026-10-26 | Owner review 2, R7 (conversion) | §5, §7, §8.1, §8.3, §8.7, §9, §12.2, §12.4, §12.5, §13, §14.3, §14.4, §14.5, §14.8, §14.9 | Convert after import on the desktop (the Archive manager's set, the Library's selection) and the admin panel (the Library's selection): JPEG with a quality, TIFF-16 or linear DNG (the archival choice, scene-referred so a RAW's highlights above white and colours outside sRGB survive), Replace or New sequence chosen at every run and never remembered, behind a dry run that lists each sequence's photos, sizes and the photos that stay as they are with why, and the free space where the conversion writes; Replace confirmed by typing; the `convert` job (stored as 19) converts exactly the photos confirmed, one sequence at a time and all or nothing, resumable through its journals and staging, never twice at once; full-resolution decodes only (the managed decoders first, never a 16-bit file from an 8-bit RAW development; the server leaves what it cannot read to a PC), what Chronos reads from a photo never changed (profiles carried, a linear DNG of sRGB values only), Exif carried, every file verified by the server's decoders; Replace swaps the files of the frames in place under a crash-safe journal, the originals going into a replaced trash entry that Undo or Restore swaps back and that Empty erases only while the archive on disk shows each conversion intact, or deleted on its own word (a tombstone, the trash, an erasure record); import still copies byte for byte and the card keeps a converted photo's copy; sync and the ingest count every encoding of a photo as one; `POST /api/v1/archive/convert` with the plan cache it shares with Reorganize, `sequenceChanged` `converted` and `created`, the audit `archive_converted`. |
|
||||
| 2026-10-26 | Owner review 2, R8 (phase 5a: workspace and projects, local home) | §4.4, §5, §7, §12.2, §12.3, §12.6, §12.8, §14.5, §14.6 | A sequence's home (this PC's archive) keeps its projects: Main, mirrored both ways with the sequence's settings so older clients and sync keep working, and other named projects, each a linear history of immutable versions in the portable form (positions parked by photo, SHA-256 of canonical text), stored as sidecars in `.chronos/projects/` and indexed by migration 0009 (`projects`, `project_versions`, `renders.project_id`/`project_version_id`); deletions only on the archive's word, the trash read first; Edit opens only workspace projects: *Open in workspace* (project, proxies), the `workspace-copy` job (stored as 20, desktop only, hash-verified, resumable, space checked), the working state in a folder outside the library, the project button with its state chip and menu (Save version, Sync, History with Compare and Restore, Open, New, Rename, Delete, Remove local copy), push and pull with replay and field-level merge, conflicts only when both sides changed a setting (Keep mine, Take library's, Save both, Later), renders at the home with the settings embedded; Settings › Workspace (folder, sync, kept versions). The server home is phase 5b; originals, local render, clean-up and the rest of Settings › Workspace are phase 5c. |
|
||||
| 2026-10-26 | Owner review 2, R8 (phase 5b: server home) | §4.4, §7, §12.2, §12.3, §12.7, §14.3, §14.5, §14.7, §14.8 | A Chronos Server keeps its sequences' projects as a PC's archive does: `/api/v1/sequences/{sid}/projects` (list with Main made at the first read, create, rename, delete with the owner's, maker's or an admin's right, head, versions in size-capped pages, stored check, push with its outcome, frames and their stamp), the `projects` capability and `projectChanged`; settings written outside the projects become Main's version soon after, and a settings `PATCH` writes `project.json` under the lease; a sequence without photos keeps no projects; renders and render nodes take a project version's settings and record it; the admin panel's sequence page lists the projects (versions, Rename, Delete). The desktop opens a server sequence as a workspace project through its sign-in: *Open in workspace* on the Server screen and in Edit, proxies downloaded into the workspace (hash-checked, resumable), push and pull, conflicts, history and live state against the server, texts naming the server, renders and analyses on the server of the version it holds; an account without Edit and an older server keep *Open with proxies*. |
|
||||
| 2026-11-04 | Owner review 3 (ports) | §12.7, §14.8, §14.9, §15, §19.6 | The public HTTP/HTTPS ports are server settings as well as variables (a variable locks them), applied at once; in a container the listening ports are locked to the template's; the admin panel's Network and TLS shows the container's ports, the public ports and the client address with Copy; clients read an address without scheme or port as port 8443 and report an address that answers as something else, never offering its certificate for trust; the Unraid template and compose gain *Public HTTP port*. |
|
||||
|
||||
## Appendix A — `CLAUDE.md` content (create verbatim in Phase 0, keep updated)
|
||||
|
||||
Reference in new issue
Block a user