Skip to content

feat(opds): add headless server on a Tauri-independent runtime - #151

Draft
phildenhoff wants to merge 1 commit into
opds-6-sharing-uifrom
opds-7-server
Draft

phildenhoff wants to merge 1 commit into
opds-6-sharing-uifrom
opds-7-server

Conversation

@phildenhoff

@phildenhoff phildenhoff commented Sep 18, 2026 •

Copy link
Copy Markdown
Member

Why

Validating the OPDS stack currently means launching the full Tauri app — there's no way to exercise a packaged build's catalog without clicking through the GUI, and the runtime can't run anywhere Tauri can't.

What changed

  • The OPDS runtime no longer assumes the GUI's world: OpdsBindTarget gained an explicit Addresses variant, so a host can bind concrete sockets without enumerating OS network interfaces. The app's existing interface-based targets are untouched.
  • New citadel-server crate: a headless host binary that loads a TOML config (library path, state directory, sharing target, optional Basic credentials read from an environment variable), validates it — absolute paths, port range, non-empty non-wildcard addresses, non-empty username — and runs the same OpdsService the app uses, logging state transitions and shutting down cleanly on SIGINT/SIGTERM. example-config.toml and docs/headless-server.md document the shape.
  • headless_process.rs spawns the real binary against a throwaway Calibre library and walks 401 → authorized catalog → acquisition download → signal shutdown.

One honest cut: that process test is unix-only, so the Windows Ctrl-C shutdown path ships untested.

Validation: the stack tip runs 62 citadel-opds tests + 348 workspace tests, all green.

Stack: #146 → #147 → #148 → #149 → #150 → #151 (this) → #152 → #153 → #154 → #155

@github-actions

Copy link
Copy Markdown

libcalibre Test Coverage Report

Overall coverage: 79.96%

📊 Download HTML Report

Coverage breakdown available in the artifacts.

@github-actions

Copy link
Copy Markdown

libcalibre Test Coverage Report

Overall coverage: 79.96%

📊 Download HTML Report

Coverage breakdown available in the artifacts.

@github-actions

Copy link
Copy Markdown

libcalibre Test Coverage Report

Overall coverage: 79.96%

📊 Download HTML Report

Coverage breakdown available in the artifacts.

@github-actions

Copy link
Copy Markdown

libcalibre Test Coverage Report

Overall coverage: 80.16%

📊 Download HTML Report

Coverage breakdown available in the artifacts.

@github-actions

Copy link
Copy Markdown

libcalibre Test Coverage Report

Overall coverage: 80.16%

📊 Download HTML Report

Coverage breakdown available in the artifacts.

@github-actions

Copy link
Copy Markdown

libcalibre Test Coverage Report

Overall coverage: 80.16%

📊 Download HTML Report

Coverage breakdown available in the artifacts.

@github-actions

Copy link
Copy Markdown

libcalibre Test Coverage Report

Overall coverage: 80.16%

📊 Download HTML Report

Coverage breakdown available in the artifacts.

@github-actions

Copy link
Copy Markdown

libcalibre Test Coverage Report

Overall coverage: 80.16%

📊 Download HTML Report

Coverage breakdown available in the artifacts.

feat(server): add headless OPDS host
@github-actions

Copy link
Copy Markdown

libcalibre Test Coverage Report

Overall coverage: 80.16%

📊 Download HTML Report

Coverage breakdown available in the artifacts.

phildenhoff added a commit that referenced this pull request Sep 22, 2026
Rebuilds the sharing settings pane on the state-machine service and the
credential surface from #161:

- Mode choice, not a picker: Local network (exact private/ULA binds, never
  needs credentials) vs All networks (wildcard, enabled only once a
  credential set exists). The per-interface picker is gone.
- Credentials: status / configure (hand-set) / generate-and-set / clear.
  Generated passwords are shown once, colour-chunked (word | digits+symbol
  | word, middle chunk bold) so they transcribe cleanly onto e-readers.
- Status comes from the state-machine projection: Running shows catalog
  addresses; Waiting explains that sharing starts when a network appears;
  Failed surfaces the reason and returns to the form.
- Copy per the agreed drafts; settings schema gains the sharing block
  (v2 -> v3 migration); web builds get no OPDS client at all.

The old #151 branch is superseded by this one.
@espetro

espetro commented Oct 6, 2026

Copy link
Copy Markdown

Following this stack with interest from the agent-tooling angle: a headless citadel-server is exactly the piece that makes a Calibre-compatible library scriptable, since OPDS already gives browse/acquire to non-GUI clients.

One roadmap question: is the headless runtime expected to stay OPDS-only, or is it the substrate for a broader programmatic surface (metadata query/edit over HTTP or CLI) eventually? Asking because I'd like to build agent tooling against it and want to know whether to watch this runtime or #102 for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants