{
	"plugin": "library-hub",
	"root": "LibraryHubApi",
	"declarations": "library-hub-api.d.ts",
	"entries": [
		{
			"name": "LIBRARY_HUB_API_VERSION",
			"kind": "const",
			"exported": true,
			"signature": "declare const LIBRARY_HUB_API_VERSION: string;",
			"doc": "Semantic version of Library Hub's public API. Consumers check it before calling anything else."
		},
		{
			"name": "isCompatible",
			"exported": true,
			"kind": "function",
			"signature": "declare function isCompatible(actual: string, wanted: string): boolean;",
			"doc": "True when a consumer built against `wanted` can use an API at `actual`: same major and a minor at least\nas new. Before 1.0, minors break by default, so a 0.x API serves only the minors it promises (0.1 and up).\nThe same rule, word for word, as Model Hub's (@insurgently/model-hub-api), used for both directions."
		},
		{
			"name": "LIBRARY_HUB_PLUGIN_ID",
			"kind": "const",
			"exported": true,
			"signature": "declare const LIBRARY_HUB_PLUGIN_ID = \"library-hub\";",
			"doc": ""
		},
		{
			"name": "LIBRARY_HUB_READY_EVENT",
			"kind": "const",
			"exported": true,
			"signature": "declare const LIBRARY_HUB_READY_EVENT = \"library-hub:ready\";",
			"doc": "The workspace event Library Hub fires each time it loads, with its API: at startup, and when the user\ndisables and enables it again. `onLibraryHubReady` listens for it."
		},
		{
			"name": "LIBRARY_HUB_BOOKS_CHANGED_EVENT",
			"kind": "const",
			"exported": true,
			"signature": "declare const LIBRARY_HUB_BOOKS_CHANGED_EVENT = \"library-hub:books-changed\";",
			"doc": "The workspace event Library Hub fires when books arrive, change or go, with a `BooksChanged`. `onBooksChanged` in\nthe API hears the same thing.\n\n```ts\nthis.registerEvent(this.app.workspace.on(LIBRARY_HUB_BOOKS_CHANGED_EVENT, (c: BooksChanged) => reindex(c.added)));\n```"
		},
		{
			"name": "ChangedBook",
			"exported": true,
			"kind": "interface",
			"signature": "interface ChangedBook",
			"doc": "One book in a `BooksChanged`.",
			"members": [
				{
					"name": "notePath",
					"kind": "property",
					"optional": false,
					"signature": "notePath: string",
					"doc": "The book's note in the vault (for a removed book, where it was)."
				},
				{
					"name": "id",
					"kind": "property",
					"optional": false,
					"signature": "id: number | null",
					"doc": "The Calibre id, when the book has one (an audiobook only another provider holds has none)."
				},
				{
					"name": "title",
					"kind": "property",
					"optional": false,
					"signature": "title: string",
					"doc": "The title, from the note's name."
				},
				{
					"name": "authors",
					"kind": "property",
					"optional": false,
					"signature": "authors: string[]",
					"doc": "The author on the note, when it names one."
				},
				{
					"name": "previousPath",
					"kind": "property",
					"optional": true,
					"signature": "previousPath?: string",
					"doc": "For a note that was renamed or moved: where it was before."
				}
			]
		},
		{
			"name": "BooksChanged",
			"exported": true,
			"kind": "interface",
			"signature": "interface BooksChanged",
			"doc": "Books that arrived, changed or went. Changes close together come as one: a sync of two hundred books is one event.\n",
			"members": [
				{
					"name": "added",
					"kind": "property",
					"optional": false,
					"signature": "added: ChangedBook[]",
					"doc": "New book notes: from a notes sync, a resync or Bring in new books."
				},
				{
					"name": "changed",
					"kind": "property",
					"optional": false,
					"signature": "changed: ChangedBook[]",
					"doc": "Book notes a sync changed, and notes renamed or moved (with `previousPath`)."
				},
				{
					"name": "removed",
					"kind": "property",
					"optional": false,
					"signature": "removed: ChangedBook[]",
					"doc": "Book notes deleted (or moved out of the library folder)."
				},
				{
					"name": "source",
					"kind": "property",
					"optional": false,
					"signature": "source: \"sync\" | \"intake\" | \"vault\"",
					"doc": "What did it: a notes sync or resync (`sync`), Bring in new books (`intake`), or an edit in the vault (`vault`)."
				}
			]
		},
		{
			"name": "BookFormat",
			"exported": true,
			"kind": "type",
			"signature": "type BookFormat = \"EPUB\" | \"PDF\";",
			"doc": "The formats `bookFile` returns. Other formats (AZW3, MOBI…) are listed in `formats` but not served."
		},
		{
			"name": "BookSummary",
			"exported": true,
			"kind": "interface",
			"signature": "interface BookSummary",
			"doc": "One Calibre book, as `listBooks` gives it.",
			"members": [
				{
					"name": "id",
					"kind": "property",
					"optional": false,
					"signature": "id: number",
					"doc": "The Calibre id."
				},
				{
					"name": "title",
					"kind": "property",
					"optional": false,
					"signature": "title: string",
					"doc": ""
				},
				{
					"name": "authors",
					"kind": "property",
					"optional": false,
					"signature": "authors: string[]",
					"doc": ""
				},
				{
					"name": "formats",
					"kind": "property",
					"optional": false,
					"signature": "formats: string[]",
					"doc": "Calibre's formats for the book, upper case: `EPUB`, `PDF`, `AZW3`…"
				},
				{
					"name": "notePath",
					"kind": "property",
					"optional": false,
					"signature": "notePath: string | null",
					"doc": "The book's note in the library folder (by its `calibre_id` or `calibre_ids`), or null when it has none."
				},
				{
					"name": "context",
					"kind": "property",
					"optional": true,
					"signature": "context?: string",
					"doc": "What the book is about, as plain text: the note's `context` field, else Calibre's comments with their HTML taken\nout. Absent when neither has any."
				}
			]
		},
		{
			"name": "BookFileOptions",
			"exported": true,
			"kind": "interface",
			"signature": "interface BookFileOptions",
			"doc": "",
			"members": [
				{
					"name": "convert",
					"kind": "property",
					"optional": true,
					"signature": "convert?: boolean",
					"doc": "For an EPUB the book doesn't have: when it has an AZW3 or MOBI, ask the user to convert it in Calibre. The\nconversion adds an EPUB to the book in their Calibre library, so the user is always asked first; `bookFile`\nresolves `null` when they decline. Without this, a missing EPUB rejects with `format-missing`. Converting\nneeds Calibre's Content Server: with only the library folder, it rejects with `server-off`."
				}
			]
		},
		{
			"name": "LibraryHubErrorCode",
			"exported": true,
			"kind": "type",
			"signature": "type LibraryHubErrorCode = \"server-off\" | \"server-error\" | \"book-missing\" | \"format-missing\" | \"shelf-missing\" | \"conversion-failed\" | \"no-text\" | \"invalid-request\" | \"no-vectors\" | \"no-hub\" | \"job-missing\" | \"needs-conversion\" | \"declined\" | \"not-calibre\" | \"busy\" | \"needs-topic-map\";",
			"doc": "Why a call failed:\n- `server-off`: Calibre's Content Server isn't set or doesn't answer, and no library folder is set to read the\n  library instead. With a library folder, books and their files are read from it, and only what\n  changes Calibre needs the server: converting a book to EPUB rejects with `server-off`, saying so.\n- `server-error`: the server answered with an error (a login it asks for, a refused change, a failure). With the\n  server off: a book file in the library folder that couldn't be read, such as one in a cloud-synced\n  folder that isn't downloaded on this computer, or took too long to download; the message names the file.\n- `book-missing`: Calibre has no book with that id (for `openBook` and `findBook`: nothing matches the reference, or\n  the book has no note; the message says what was tried).\n- `format-missing`: the book has no file in that format (and none to convert from, or `convert` wasn't asked); for\n  `openBook`, no EPUB, AZW3, MOBI or PDF to read (AZW3 and MOBI).\n- `shelf-missing`: no shelf note has that id or name.\n- `conversion-failed`: Calibre tried to convert the book and couldn't.\n- `no-text`: the PDF has no text layer (a scan).\n- `invalid-request`: the arguments are malformed (an id that isn't a number, an unknown format).\n- `no-vectors`: the library has no book vectors yet, or this book has none. the vectors are\n  Topic Map's: given when Topic Map hasn't indexed the library, or this book, yet.\n- `no-hub`: Model Hub isn't installed, enabled or new enough, and the call asks a model.\n- `job-missing`: no job has that id (finished jobs are kept for a while, the 30 most recent).\n- `needs-conversion`: `bookText` or `bookChapters` of a book whose only text is an AZW3 or MOBI that can't be read\n  as it is (DRM, a damaged file; the message names the cause), without `{ convert: true }`: making an EPUB adds a\n  file to the user's Calibre library, so it is only done when asked. An AZW3 or MOBI that\n  can be read is read as it is, with no conversion.\n- `declined`: the user declined that conversion, and the book has no PDF to read instead.\n- `not-calibre`: the call works on Calibre books, and the reference names a book Calibre doesn't hold (a book file\n  in the vault, a book only another provider has).\n- `busy`: Obsidian is still updating links in the vault, so a change that moves a note (`renameShelf`) was\n  not made. Nothing was changed; try again in a moment. also: with the server off,\n  Calibre's library file was being written each time it was read (Calibre adding books); try again when it's done.\n- `needs-topic-map`: the call works from what books are about (their vectors), which Library Hub alone doesn't\n  keep: it needs the Topic Map plugin, which serves it, or a newer Topic Map that offers the call. Also a Topic\n  Map refusal with no code of its own here, its words in the message. Library Hub's own matching is by words.\n \n\n`no-text` also covers an EPUB, AZW3 or MOBI with no readable text (a book of images), and a book file\nthat can't be read at all (DRM, a damaged file), the message naming the cause."
		},
		{
			"name": "BookRef",
			"exported": true,
			"kind": "type",
			"signature": "type BookRef = number | string | BookRefParts;",
			"doc": "Which book: one thing another plugin, a link or a corpus knows about it. (0.5 took a Calibre id only).\n\n- a number, or a string of digits: a Calibre id (ten or thirteen digits that check out as an ISBN are an ISBN);\n- a book note's path or name, or a link to it (`[[Name]]`);\n- a book file's path: a file in the vault (opened as it is, with or without a note), or a path inside a Calibre\n  library, whose book folder `Title (42)` names the Calibre id;\n- an ISBN (10 or 13 digits, hyphens allowed), a Calibre uuid, an Audiobookshelf id or an OPDS id.\n\nA string can say which with a prefix: `calibre:42`, `note:Books/Library/Salt Roads.md`, `file:…`, `isbn:…`,\n`uuid:…`, `audiobookshelf:…`, `opds:…`. The object form names one: `{ isbn: '978…' }`."
		},
		{
			"name": "BookRefParts",
			"exported": true,
			"kind": "interface",
			"signature": "interface BookRefParts",
			"doc": "A book reference that names what it is (see `BookRef`): exactly one of these.",
			"members": [
				{
					"name": "calibre",
					"kind": "property",
					"optional": true,
					"signature": "calibre?: number",
					"doc": ""
				},
				{
					"name": "note",
					"kind": "property",
					"optional": true,
					"signature": "note?: string",
					"doc": ""
				},
				{
					"name": "file",
					"kind": "property",
					"optional": true,
					"signature": "file?: string",
					"doc": ""
				},
				{
					"name": "isbn",
					"kind": "property",
					"optional": true,
					"signature": "isbn?: string",
					"doc": ""
				},
				{
					"name": "uuid",
					"kind": "property",
					"optional": true,
					"signature": "uuid?: string",
					"doc": ""
				},
				{
					"name": "audiobookshelf",
					"kind": "property",
					"optional": true,
					"signature": "audiobookshelf?: string",
					"doc": ""
				},
				{
					"name": "opds",
					"kind": "property",
					"optional": true,
					"signature": "opds?: string",
					"doc": ""
				}
			]
		},
		{
			"name": "FoundBook",
			"exported": true,
			"kind": "interface",
			"signature": "interface FoundBook",
			"doc": "The book a reference named, as `findBook` gives it.",
			"members": [
				{
					"name": "notePath",
					"kind": "property",
					"optional": false,
					"signature": "notePath: string | null",
					"doc": "The book's note, or null for a book file in the vault that has none (or, a Calibre book named by its id that has no note yet)."
				},
				{
					"name": "calibreId",
					"kind": "property",
					"optional": false,
					"signature": "calibreId: number | null",
					"doc": "Its Calibre id, or null when it isn't a Calibre book (or the file was named directly)."
				},
				{
					"name": "file",
					"kind": "property",
					"optional": false,
					"signature": "file: string | null",
					"doc": "The book file in the vault, when the reference named one; null for a book read through its providers."
				},
				{
					"name": "via",
					"kind": "property",
					"optional": false,
					"signature": "via: \"calibre\" | \"note\" | \"file\" | \"isbn\" | \"uuid\" | \"audiobookshelf\" | \"opds\"",
					"doc": "What matched: `calibre`, `note`, `file`, `isbn`, `uuid`, `audiobookshelf` or `opds`."
				}
			]
		},
		{
			"name": "BookPlace",
			"exported": true,
			"kind": "interface",
			"signature": "interface BookPlace",
			"doc": "Where in a book to open it. Tried in order: highlight, quote, location, chapter, href, then page; the first that\nlands wins.; `chapter`, `highlight` and `location`.",
			"members": [
				{
					"name": "href",
					"kind": "property",
					"optional": true,
					"signature": "href?: string",
					"doc": "A contents entry's `file#anchor` (an EPUB section), as in the book's table of contents or spine."
				},
				{
					"name": "quote",
					"kind": "property",
					"optional": true,
					"signature": "quote?: string",
					"doc": "A short verbatim passage from the book (a sentence or so); the reader finds it and shows it, highlighted if it can. Whitespace and quote-mark differences are ignored."
				},
				{
					"name": "page",
					"kind": "property",
					"optional": true,
					"signature": "page?: number",
					"doc": "A 1-based page number (PDFs)."
				},
				{
					"name": "chapter",
					"kind": "property",
					"optional": true,
					"signature": "chapter?: string | number",
					"doc": "A chapter: its title (as the contents has it; case and spacing don't matter), or its number counted the way\nLibrary Hub's chapter notes count them (front and back matter left out)."
				},
				{
					"name": "highlight",
					"kind": "property",
					"optional": true,
					"signature": "highlight?: string",
					"doc": "A highlight's id (`h_…`) in the book's highlights note: the reader goes to it, checking its text first."
				},
				{
					"name": "location",
					"kind": "property",
					"optional": true,
					"signature": "location?: string",
					"doc": "A passage's location exactly as a corpus records it (Topic Map's `location`): an EPUB contents entry\n(`text/c3.xhtml#s2`), an AZW3 or MOBI one as `bookChapters` gives it (`kindle:pos:…`, `filepos:…`, a section's\n`epubcfi(…)`;), or `chars a-b`, code-point offsets into `pdfText`'s text, which gives the PDF page. What\na split adds after it (`§2`, `w3`) is ignored. Pass the passage's `quote` with it to land on the passage itself."
				}
			]
		},
		{
			"name": "OpenedBook",
			"exported": true,
			"kind": "interface",
			"signature": "interface OpenedBook",
			"doc": "What `openBook` did.",
			"members": [
				{
					"name": "placed",
					"kind": "property",
					"optional": false,
					"signature": "placed: \"highlight\" | \"quote\" | \"href\" | \"chapter\" | \"page\" | \"start\"",
					"doc": "Which part of the place it landed on; 'start' when none matched (the book opens where the reader would by\ndefault). A `location` lands as 'href' (its contents entry) or 'page' (its PDF page). 'chapter' and 'highlight'\n."
				}
			]
		},
		{
			"name": "ShelfInfo",
			"exported": true,
			"kind": "interface",
			"signature": "interface ShelfInfo",
			"doc": "One shelf, as `listShelves` gives it.",
			"members": [
				{
					"name": "id",
					"kind": "property",
					"optional": false,
					"signature": "id: string",
					"doc": "The shelf's `shelf_id` (`collection_id` before 0.8): how `shelfMembers` and the write operations name it."
				},
				{
					"name": "name",
					"kind": "property",
					"optional": false,
					"signature": "name: string",
					"doc": "The shelf note's name."
				},
				{
					"name": "path",
					"kind": "property",
					"optional": false,
					"signature": "path: string",
					"doc": "The shelf note's path in the vault."
				},
				{
					"name": "rule",
					"kind": "property",
					"optional": true,
					"signature": "rule?: string",
					"doc": "The cluster id whose books belonged to the shelf by rule."
				},
				{
					"name": "group",
					"kind": "property",
					"optional": true,
					"signature": "group?: string",
					"doc": "The group folder the shelf sits in (`Books/Collections/<group>/`), when it has one."
				},
				{
					"name": "members",
					"kind": "property",
					"optional": false,
					"signature": "members: number",
					"doc": "How many Calibre books are on it now (book notes without a `calibre_id` aren't counted)."
				}
			]
		},
		{
			"name": "ShelfChange",
			"exported": true,
			"kind": "interface",
			"signature": "interface ShelfChange",
			"doc": "What a write to shelf membership did.",
			"members": [
				{
					"name": "run",
					"kind": "property",
					"optional": false,
					"signature": "run: string | null",
					"doc": "The logged run, to pass to `undoRun`; null when nothing changed, so there was nothing to log."
				},
				{
					"name": "changed",
					"kind": "property",
					"optional": false,
					"signature": "changed: number[]",
					"doc": "Calibre ids whose notes changed."
				},
				{
					"name": "unchanged",
					"kind": "property",
					"optional": false,
					"signature": "unchanged: number[]",
					"doc": "Calibre ids already as asked (on the shelf for an add, off it for a remove)."
				},
				{
					"name": "noNote",
					"kind": "property",
					"optional": false,
					"signature": "noNote: number[]",
					"doc": "Calibre ids with no book note: membership lives in the note, so these can't be shelved until a sync makes one."
				}
			]
		},
		{
			"name": "UndoReport",
			"exported": true,
			"kind": "interface",
			"signature": "interface UndoReport",
			"doc": "What undoing a run did.",
			"members": [
				{
					"name": "restored",
					"kind": "property",
					"optional": false,
					"signature": "restored: number",
					"doc": "Notes whose fields went back."
				},
				{
					"name": "trashed",
					"kind": "property",
					"optional": false,
					"signature": "trashed: number",
					"doc": "Files the run made, moved to the trash."
				},
				{
					"name": "kept",
					"kind": "property",
					"optional": false,
					"signature": "kept: string[]",
					"doc": "What was left as it is, in plain words: a field or note changed after the run."
				},
				{
					"name": "stopped",
					"kind": "property",
					"optional": true,
					"signature": "stopped?: string",
					"doc": "The run's job was still going and was stopped first (a summary, say), in plain words."
				}
			]
		},
		{
			"name": "BookShelves",
			"exported": true,
			"kind": "interface",
			"signature": "interface BookShelves",
			"doc": "Which shelves a book is on, as `shelvesOf` gives it.",
			"members": [
				{
					"name": "id",
					"kind": "property",
					"optional": false,
					"signature": "id: number",
					"doc": "The Calibre id asked about."
				},
				{
					"name": "notePath",
					"kind": "property",
					"optional": false,
					"signature": "notePath: string | null",
					"doc": "The book's note, or null when it has none: membership lives in the note, so such a book is on no shelf."
				},
				{
					"name": "shelves",
					"kind": "property",
					"optional": false,
					"signature": "shelves: string[]",
					"doc": "The `shelf_id`s of the shelves it is on (in `shelves`, not excluded), ascending."
				}
			]
		},
		{
			"name": "PageRange",
			"exported": true,
			"kind": "interface",
			"signature": "interface PageRange",
			"doc": "A pages range for `pdfText`, 1-based and inclusive; either end may be left out.",
			"members": [
				{
					"name": "from",
					"kind": "property",
					"optional": true,
					"signature": "from?: number",
					"doc": ""
				},
				{
					"name": "to",
					"kind": "property",
					"optional": true,
					"signature": "to?: number",
					"doc": ""
				}
			]
		},
		{
			"name": "DescribedShelf",
			"exported": true,
			"kind": "interface",
			"signature": "interface DescribedShelf",
			"doc": "What `estimateShelfFromDescription` and `shelfFromDescription` take.",
			"members": [
				{
					"name": "name",
					"kind": "property",
					"optional": false,
					"signature": "name: string",
					"doc": "The shelf's name: its note's name and the source of its `shelf_id`."
				},
				{
					"name": "description",
					"kind": "property",
					"optional": false,
					"signature": "description: string",
					"doc": "What belongs on it, in a sentence or two. The books are chosen by this; it also becomes the note's summary."
				},
				{
					"name": "terms",
					"kind": "property",
					"optional": true,
					"signature": "terms?: string[]",
					"doc": "Names or places a member's title or description would mention: books naming one are considered too."
				},
				{
					"name": "group",
					"kind": "property",
					"optional": true,
					"signature": "group?: string",
					"doc": "A group folder under the shelves folder; without it, the packs choose."
				}
			]
		},
		{
			"name": "Estimate",
			"exported": true,
			"kind": "interface",
			"signature": "interface Estimate",
			"doc": "What a run that asks a model would read and cost, before it runs.",
			"members": [
				{
					"name": "role",
					"kind": "property",
					"optional": false,
					"signature": "role: string",
					"doc": "The role the calls go through: `library-hub.shelf-keep`, `library-hub.summarize`, `library-hub.chapters`."
				},
				{
					"name": "calls",
					"kind": "property",
					"optional": false,
					"signature": "calls: number",
					"doc": "How many model calls, at most."
				},
				{
					"name": "tokens",
					"kind": "property",
					"optional": false,
					"signature": "tokens: number",
					"doc": "About how many input tokens, in all."
				},
				{
					"name": "usd",
					"kind": "property",
					"optional": false,
					"signature": "usd: number | null",
					"doc": "About what it costs, in US dollars. With Model Hub 0.13 or later, the **high end** of Model Hub's estimate of\nthe calls (each with a full reply), so a budget set from it holds; null when Model Hub can't price them (`text`\nsays why). With an older Model Hub, the input at the role's first model's listed price; null when that model has\nno price."
				},
				{
					"name": "text",
					"kind": "property",
					"optional": false,
					"signature": "text: string",
					"doc": "The same in one plain sentence, as the approval dialog shows it: with Model Hub 0.13 or later, a range (\"about $0.02–$0.09\")."
				}
			]
		},
		{
			"name": "ShelfEstimate",
			"exported": true,
			"kind": "interface",
			"signature": "interface ShelfEstimate extends Estimate",
			"doc": "What `estimateShelfFromDescription` gives.",
			"members": [
				{
					"name": "candidates",
					"kind": "property",
					"optional": false,
					"signature": "candidates: number",
					"doc": "How many books would be read by the model: those that best match the description's words, and those naming a term."
				}
			]
		},
		{
			"name": "DescribedShelfResult",
			"exported": true,
			"kind": "interface",
			"signature": "interface DescribedShelfResult extends CreatedShelf",
			"doc": "What `shelfFromDescription` did.",
			"members": [
				{
					"name": "considered",
					"kind": "property",
					"optional": false,
					"signature": "considered: number",
					"doc": "How many books the model read."
				},
				{
					"name": "costUsd",
					"kind": "property",
					"optional": false,
					"signature": "costUsd: number",
					"doc": "What the calls cost, in US dollars."
				}
			]
		},
		{
			"name": "SummaryKind",
			"exported": true,
			"kind": "type",
			"signature": "type SummaryKind = \"summary\" | \"chapters\";",
			"doc": "What `summarizeBook` writes: `summary`, a one-page summary in the book's note; `chapters`, one note per chapter."
		},
		{
			"name": "SummaryEstimate",
			"exported": true,
			"kind": "interface",
			"signature": "interface SummaryEstimate extends Estimate",
			"doc": "What `estimateSummary` gives.",
			"members": [
				{
					"name": "id",
					"kind": "property",
					"optional": false,
					"signature": "id: number",
					"doc": ""
				},
				{
					"name": "title",
					"kind": "property",
					"optional": false,
					"signature": "title: string",
					"doc": ""
				},
				{
					"name": "kind",
					"kind": "property",
					"optional": false,
					"signature": "kind: SummaryKind",
					"doc": ""
				},
				{
					"name": "chapters",
					"kind": "property",
					"optional": false,
					"signature": "chapters: number",
					"doc": "How many chapters the book's text has."
				},
				{
					"name": "exists",
					"kind": "property",
					"optional": false,
					"signature": "exists: boolean",
					"doc": "The book's note already has a `## Summary` (for `summary`) or `## Chapters` (for `chapters`): a new run replaces it."
				}
			]
		},
		{
			"name": "StartedJob",
			"exported": true,
			"kind": "interface",
			"signature": "interface StartedJob",
			"doc": "A background job `summarizeBook` started.",
			"members": [
				{
					"name": "job",
					"kind": "property",
					"optional": false,
					"signature": "job: number",
					"doc": "For `jobStatus`."
				},
				{
					"name": "run",
					"kind": "property",
					"optional": false,
					"signature": "run: string",
					"doc": "The logged run its writes go to, for `undoRun`; undoing it while the job runs stops the job first."
				},
				{
					"name": "name",
					"kind": "property",
					"optional": false,
					"signature": "name: string",
					"doc": "The job's name, as the Library panel shows it."
				}
			]
		},
		{
			"name": "JobInfo",
			"exported": true,
			"kind": "interface",
			"signature": "interface JobInfo",
			"doc": "A background job as `jobStatus` gives it.",
			"members": [
				{
					"name": "job",
					"kind": "property",
					"optional": false,
					"signature": "job: number",
					"doc": ""
				},
				{
					"name": "name",
					"kind": "property",
					"optional": false,
					"signature": "name: string",
					"doc": ""
				},
				{
					"name": "status",
					"kind": "property",
					"optional": false,
					"signature": "status: \"waiting\" | \"running\" | \"done\" | \"failed\" | \"cancelled\"",
					"doc": ""
				},
				{
					"name": "label",
					"kind": "property",
					"optional": false,
					"signature": "label: string",
					"doc": "What it is doing now, or did last."
				},
				{
					"name": "done",
					"kind": "property",
					"optional": false,
					"signature": "done: number",
					"doc": "Steps done and in all (chapters, say), when it counts them; 0 when it doesn't."
				},
				{
					"name": "total",
					"kind": "property",
					"optional": false,
					"signature": "total: number",
					"doc": ""
				},
				{
					"name": "spentUsd",
					"kind": "property",
					"optional": false,
					"signature": "spentUsd: number",
					"doc": "What it has spent so far, in US dollars."
				},
				{
					"name": "error",
					"kind": "property",
					"optional": true,
					"signature": "error?: string",
					"doc": "Why it failed, in plain words."
				},
				{
					"name": "run",
					"kind": "property",
					"optional": true,
					"signature": "run?: string",
					"doc": "Its logged run, when it has one."
				}
			]
		},
		{
			"name": "NewShelf",
			"exported": true,
			"kind": "interface",
			"signature": "interface NewShelf",
			"doc": "What `createShelf` takes.",
			"members": [
				{
					"name": "name",
					"kind": "property",
					"optional": false,
					"signature": "name: string",
					"doc": "The shelf's name: its note's name, and the source of its `shelf_id` (\"Field Guides\" → `field-guides`)."
				},
				{
					"name": "description",
					"kind": "property",
					"optional": true,
					"signature": "description?: string",
					"doc": "A sentence for the note's summary."
				},
				{
					"name": "books",
					"kind": "property",
					"optional": true,
					"signature": "books?: BookRef[]",
					"doc": "Books to pin to it now: Calibre ids, or any `BookRef` that names a Calibre book."
				},
				{
					"name": "rule",
					"kind": "property",
					"optional": true,
					"signature": "rule?: string",
					"doc": "A cluster id whose books belong to it by rule."
				},
				{
					"name": "group",
					"kind": "property",
					"optional": true,
					"signature": "group?: string",
					"doc": "A group folder under the shelves folder. Without it, the first pack group whose pattern matches the name."
				}
			]
		},
		{
			"name": "CreatedShelf",
			"exported": true,
			"kind": "interface",
			"signature": "interface CreatedShelf extends ShelfChange",
			"doc": "What `createShelf` did.",
			"members": [
				{
					"name": "shelf",
					"kind": "property",
					"optional": false,
					"signature": "shelf: ShelfInfo",
					"doc": ""
				},
				{
					"name": "created",
					"kind": "property",
					"optional": false,
					"signature": "created: boolean",
					"doc": "False when a shelf with that `shelf_id` existed already: it is returned as is, with the books added."
				}
			]
		},
		{
			"name": "RenamedShelf",
			"exported": true,
			"kind": "interface",
			"signature": "interface RenamedShelf",
			"doc": "What `renameShelf` did.",
			"members": [
				{
					"name": "shelf",
					"kind": "property",
					"optional": false,
					"signature": "shelf: ShelfInfo",
					"doc": "The shelf under its new name; its `id` is the same, so pins and Bases that name it still work."
				},
				{
					"name": "run",
					"kind": "property",
					"optional": false,
					"signature": "run: string | null",
					"doc": "The logged run, to pass to `undoRun`; null when the shelf already had that name."
				}
			]
		},
		{
			"name": "DeletedShelf",
			"exported": true,
			"kind": "interface",
			"signature": "interface DeletedShelf",
			"doc": "What `deleteShelf` did.",
			"members": [
				{
					"name": "deleted",
					"kind": "property",
					"optional": false,
					"signature": "deleted: string",
					"doc": "The `shelf_id` of the shelf that was deleted."
				},
				{
					"name": "unpinned",
					"kind": "property",
					"optional": false,
					"signature": "unpinned: number",
					"doc": "How many book notes had the shelf taken out of them."
				},
				{
					"name": "run",
					"kind": "property",
					"optional": false,
					"signature": "run: string | null",
					"doc": "The logged run, to pass to `undoRun`, which brings the shelf note and every pin back."
				}
			]
		},
		{
			"name": "MergedShelves",
			"exported": true,
			"kind": "interface",
			"signature": "interface MergedShelves",
			"doc": "What `mergeShelves` did.",
			"members": [
				{
					"name": "shelf",
					"kind": "property",
					"optional": false,
					"signature": "shelf: ShelfInfo",
					"doc": "The shelf that was kept, with its new member count."
				},
				{
					"name": "merged",
					"kind": "property",
					"optional": false,
					"signature": "merged: string[]",
					"doc": "The `shelf_id`s of the shelves merged into it and deleted."
				},
				{
					"name": "changed",
					"kind": "property",
					"optional": false,
					"signature": "changed: number[]",
					"doc": "Calibre ids whose notes now pin the kept shelf."
				},
				{
					"name": "noNote",
					"kind": "property",
					"optional": false,
					"signature": "noNote: number[]",
					"doc": "Calibre ids with no book note, which could not be moved."
				},
				{
					"name": "run",
					"kind": "property",
					"optional": false,
					"signature": "run: string | null",
					"doc": ""
				}
			]
		},
		{
			"name": "ShelfSuggestion",
			"exported": true,
			"kind": "interface",
			"signature": "interface ShelfSuggestion",
			"doc": "A shelf that suits a book, as `suggestShelves` ranks it.",
			"members": [
				{
					"name": "shelf",
					"kind": "property",
					"optional": false,
					"signature": "shelf: ShelfInfo",
					"doc": ""
				},
				{
					"name": "score",
					"kind": "property",
					"optional": false,
					"signature": "score: number",
					"doc": "How well the book suits the shelf by what they are about, as Topic Map's `rankGroups` scores it (higher is\ncloser). Before 0.8, the cosine against the mean of the shelf's books' vectors."
				},
				{
					"name": "match",
					"kind": "property",
					"optional": false,
					"signature": "match: number",
					"doc": "How well the shelf matches; suggestions are ordered by it. the same as `score` (Topic Map ranks by\nmeaning and words together)."
				},
				{
					"name": "because",
					"kind": "property",
					"optional": false,
					"signature": "because: string",
					"doc": "Why, in plain words: how close the book is to the shelf's books, against the bar Topic Map judged it by, with the numbers after the words."
				}
			]
		},
		{
			"name": "ShelfBaseQuery",
			"exported": true,
			"kind": "interface",
			"signature": "interface ShelfBaseQuery",
			"doc": "A shelf's membership as a Bases filter.",
			"members": [
				{
					"name": "filter",
					"kind": "property",
					"optional": false,
					"signature": "filter: string",
					"doc": "One line for a Base's `filters` or a formula: the shelf's `shelves` and `shelves_exclude` test with its id filled in."
				},
				{
					"name": "base",
					"kind": "property",
					"optional": false,
					"signature": "base: string",
					"doc": "A whole `.base` file: the same filter and the plugin's three views (Shelf, Cards, Shelf table)."
				}
			]
		},
		{
			"name": "JsonSchema",
			"exported": true,
			"kind": "interface",
			"signature": "interface JsonSchema",
			"doc": "A JSON schema for a tool's input, as Model Hub's tool registry and MCP servers take it.",
			"members": [
				{
					"name": "type",
					"kind": "property",
					"optional": false,
					"signature": "type: \"object\" | \"string\" | \"number\" | \"integer\" | \"boolean\" | \"array\"",
					"doc": ""
				},
				{
					"name": "description",
					"kind": "property",
					"optional": true,
					"signature": "description?: string",
					"doc": ""
				},
				{
					"name": "properties",
					"kind": "property",
					"optional": true,
					"signature": "properties?: Record<string, JsonSchema>",
					"doc": ""
				},
				{
					"name": "required",
					"kind": "property",
					"optional": true,
					"signature": "required?: string[]",
					"doc": ""
				},
				{
					"name": "items",
					"kind": "property",
					"optional": true,
					"signature": "items?: JsonSchema",
					"doc": ""
				},
				{
					"name": "enum",
					"kind": "property",
					"optional": true,
					"signature": "enum?: string[]",
					"doc": ""
				},
				{
					"name": "minimum",
					"kind": "property",
					"optional": true,
					"signature": "minimum?: number",
					"doc": ""
				}
			]
		},
		{
			"name": "LibraryHubTool",
			"exported": true,
			"kind": "interface",
			"signature": "interface LibraryHubTool",
			"doc": "One operation as a tool a model can call. Library Hub registers these with Model Hub's tool registry when both\nload, so they run from the Hub's panel and its MCP server under the user's tool settings; anything else\n(a command palette, say) can map them the same way. `method` is\nthe `LibraryHubApi` method to call; `args` names the input properties in the order the method takes them (a missing\noptional one is passed as undefined), or is the one entry `$input` for a method that takes the input object\nwhole.",
			"members": [
				{
					"name": "name",
					"kind": "property",
					"optional": false,
					"signature": "name: string",
					"doc": "Dotted and unique: `library-hub.list_shelves`."
				},
				{
					"name": "description",
					"kind": "property",
					"optional": false,
					"signature": "description: string",
					"doc": "For the model: what it does and when to use it."
				},
				{
					"name": "input",
					"kind": "property",
					"optional": false,
					"signature": "input: JsonSchema",
					"doc": ""
				},
				{
					"name": "method",
					"kind": "property",
					"optional": false,
					"signature": "method: keyof LibraryHubApi",
					"doc": ""
				},
				{
					"name": "args",
					"kind": "property",
					"optional": false,
					"signature": "args: string[]",
					"doc": "Input properties in the method's argument order; the one entry `$input` passes the whole input object."
				},
				{
					"name": "effect",
					"kind": "property",
					"optional": false,
					"signature": "effect: \"read\" | \"write\"",
					"doc": "Whether it changes anything. Model Hub runs reads freely and asks before a write, unless the user says otherwise."
				},
				{
					"name": "estimate",
					"kind": "property",
					"optional": true,
					"signature": "estimate?: keyof LibraryHubApi",
					"doc": "A method that takes the same arguments and resolves to an `Estimate`: what the call would read and cost, shown\nto the user before they approve it."
				}
			]
		},
		{
			"name": "BookTextOptions",
			"exported": true,
			"kind": "interface",
			"signature": "interface BookTextOptions",
			"doc": "What `bookText` and `bookChapters` take.",
			"members": [
				{
					"name": "convert",
					"kind": "property",
					"optional": true,
					"signature": "convert?: boolean",
					"doc": "For a book whose only text is an AZW3 or MOBI that can't be read as it is (DRM, a damaged file): ask the user to\nconvert it to an EPUB in Calibre (it adds a file to their library, so they are always asked). Without it, such a\nbook rejects with `needs-conversion`, naming the cause. If they decline, or the conversion fails, a PDF is read\ninstead when the book has one (with a warning); else the call rejects with `declined` or `conversion-failed`.\n an AZW3 or MOBI that can be read is read as it is, so this only matters when it can't."
				}
			]
		},
		{
			"name": "BookChapter",
			"exported": true,
			"kind": "interface",
			"signature": "interface BookChapter",
			"doc": "One chapter of a book, as `bookChapters` lists it. An EPUB's, AZW3's or MOBI's chapters are its contents entries\n(an EPUB's nav or NCX), every one (front and back matter left out; never merged, however many), a file split at\nits entries' anchors when several point into it, and a file no entry claims a chapter of its own. A PDF's chapters\nare its outline's entries, or 12 even parts when it has no outline.",
			"members": [
				{
					"name": "n",
					"kind": "property",
					"optional": false,
					"signature": "n: number",
					"doc": "1-based, in reading order. For a book of 30 chapters or fewer, `openBook(book, { chapter: n })` opens at it;\npast 30 the chapter notes (and so `openBook`'s `chapter` number) count merged parts, so open at `location`."
				},
				{
					"name": "title",
					"kind": "property",
					"optional": false,
					"signature": "title: string",
					"doc": ""
				},
				{
					"name": "location",
					"kind": "property",
					"optional": false,
					"signature": "location: string",
					"doc": "Where it starts, as `openBook`'s `BookPlace.location` takes it: an EPUB's file inside the book\n(`OEBPS/c3.xhtml`, or `OEBPS/all.xhtml#ch3` for a chapter that starts inside a file); an AZW3's or MOBI's\ncontents entry (`kindle:pos:fid:0001:off:0000000000`, `filepos:0000001234`), or the start of its section as a\nCFI (`epubcfi(/6/4!/4)`) when no entry points there; or `chars a-b` for a PDF (code points into its text, which\ngive the page). A passage inside the chapter keeps the chapter's location (EPUB, AZW3, MOBI) or adds its own\noffset to `start` (PDF)."
				},
				{
					"name": "start",
					"kind": "property",
					"optional": false,
					"signature": "start: number",
					"doc": "Where it starts and ends in the book's whole text, in code points (as a corpus counts them)."
				},
				{
					"name": "end",
					"kind": "property",
					"optional": false,
					"signature": "end: number",
					"doc": ""
				}
			]
		},
		{
			"name": "BookTextChapter",
			"exported": true,
			"kind": "interface",
			"signature": "interface BookTextChapter extends BookChapter",
			"doc": "A chapter with its text: exactly the book's whole text from `start` to `end`.",
			"members": [
				{
					"name": "text",
					"kind": "property",
					"optional": false,
					"signature": "text: string",
					"doc": ""
				}
			]
		},
		{
			"name": "BookChapters",
			"exported": true,
			"kind": "interface",
			"signature": "interface BookChapters",
			"doc": "A book's chapters, as `bookChapters` gives them.",
			"members": [
				{
					"name": "book",
					"kind": "property",
					"optional": false,
					"signature": "book: FoundBook",
					"doc": "The book the reference named."
				},
				{
					"name": "format",
					"kind": "property",
					"optional": false,
					"signature": "format: BookFormat | \"AZW3\" | \"MOBI\"",
					"doc": "The file the text was read from. `AZW3` and `MOBI`: such a file is read as it is, with no conversion."
				},
				{
					"name": "convertedFrom",
					"kind": "property",
					"optional": true,
					"signature": "convertedFrom?: \"AZW3\" | \"MOBI\"",
					"doc": "When the EPUB was just made from the book's AZW3 or MOBI (`convert`, for one that can't be read as it is), which."
				},
				{
					"name": "hash",
					"kind": "property",
					"optional": false,
					"signature": "hash: string",
					"doc": "SHA-256 of the book's whole text (UTF-8), in hex. It changes only when the text does, so a corpus can keep its\npassages while it matches. The whole text is an EPUB's spine files' text in reading order (an AZW3's or MOBI's\nsections; front and back matter included), or a PDF's pages as `pdfText` gives them, joined by blank lines. A\npage's paragraphs and blocks are separated by a blank line, its line breaks by a line break. an EPUB is\nread with foliate-js, the reader's own parser, so every EPUB's text, and `hash`, changed once in 0.9."
				},
				{
					"name": "length",
					"kind": "property",
					"optional": false,
					"signature": "length: number",
					"doc": "The whole text's length, in code points."
				},
				{
					"name": "chapters",
					"kind": "property",
					"optional": false,
					"signature": "chapters: BookChapter[]",
					"doc": ""
				},
				{
					"name": "warnings",
					"kind": "property",
					"optional": false,
					"signature": "warnings: string[]",
					"doc": "What a reader of the text should know, in plain words: a PDF with no outline cut into even parts, a conversion declined."
				},
				{
					"name": "outline",
					"kind": "property",
					"optional": false,
					"signature": "outline: boolean",
					"doc": "Whether the chapters follow the book's own structure: an EPUB's contents, or a PDF's outline. False for a PDF with no\noutline, cut into even parts (or one part when short)."
				}
			]
		},
		{
			"name": "BookText",
			"exported": true,
			"kind": "interface",
			"signature": "interface BookText extends BookChapters",
			"doc": "A book's text, as `bookText` gives it: `bookChapters` with each chapter's text.",
			"members": [
				{
					"name": "chapters",
					"kind": "property",
					"optional": false,
					"signature": "chapters: BookTextChapter[]",
					"doc": ""
				}
			]
		},
		{
			"name": "CalibreStatus",
			"exported": true,
			"kind": "interface",
			"signature": "interface CalibreStatus",
			"doc": "Calibre, as `status` finds it.",
			"members": [
				{
					"name": "state",
					"kind": "property",
					"optional": false,
					"signature": "state: \"server\" | \"file\" | \"off\"",
					"doc": "`server`: the Content Server answers, so books, their files and text can be read. `file`: the server is off and\nthe library folder is read instead, read-only (books, and their files and text; no conversion).\n`off`: neither (not set up, or not answering)."
				},
				{
					"name": "files",
					"kind": "property",
					"optional": false,
					"signature": "files: boolean",
					"doc": "Book files can be read now: `bookFile`, `pdfText` and `bookText` of a Calibre book."
				},
				{
					"name": "text",
					"kind": "property",
					"optional": false,
					"signature": "text: string",
					"doc": "What was found, in plain words."
				}
			]
		},
		{
			"name": "ProviderStatus",
			"exported": true,
			"kind": "interface",
			"signature": "interface ProviderStatus",
			"doc": "Another book provider (Audiobookshelf, OPDS, Readwise…) the user has turned on, as `status` finds it.",
			"members": [
				{
					"name": "id",
					"kind": "property",
					"optional": false,
					"signature": "id: string",
					"doc": ""
				},
				{
					"name": "name",
					"kind": "property",
					"optional": false,
					"signature": "name: string",
					"doc": ""
				},
				{
					"name": "state",
					"kind": "property",
					"optional": false,
					"signature": "state: \"ok\" | \"bad\"",
					"doc": "`ok`: its checks pass; `bad`: one failed, or it didn't answer in time."
				},
				{
					"name": "files",
					"kind": "property",
					"optional": false,
					"signature": "files: boolean",
					"doc": "Whether it can serve book files (so `bookText` can read a book only it has)."
				},
				{
					"name": "text",
					"kind": "property",
					"optional": false,
					"signature": "text: string",
					"doc": "What was found, in plain words."
				}
			]
		},
		{
			"name": "LibraryStatus",
			"exported": true,
			"kind": "interface",
			"signature": "interface LibraryStatus",
			"doc": "What Library Hub can reach and what the library holds, as `status` gives it.",
			"members": [
				{
					"name": "version",
					"kind": "property",
					"optional": false,
					"signature": "version: string",
					"doc": "The API version (the same as `version` on the API)."
				},
				{
					"name": "calibre",
					"kind": "property",
					"optional": false,
					"signature": "calibre: CalibreStatus",
					"doc": ""
				},
				{
					"name": "providers",
					"kind": "property",
					"optional": false,
					"signature": "providers: ProviderStatus[]",
					"doc": "The providers turned on, other than Calibre, each checked."
				},
				{
					"name": "library",
					"kind": "property",
					"optional": false,
					"signature": "library: {\n    notes: number;\n    calibreBooks: number | null;\n    formats: Record<string, number>;\n    shelves: number;\n}",
					"doc": ""
				}
			]
		},
		{
			"name": "LibraryHubApi",
			"exported": true,
			"kind": "interface",
			"signature": "interface LibraryHubApi",
			"doc": "",
			"members": [
				{
					"name": "version",
					"kind": "property",
					"optional": false,
					"signature": "readonly version: string",
					"doc": "Semantic version of this API. Check it with `isCompatible` (or use `getLibraryHub`)."
				},
				{
					"name": "listBooks",
					"kind": "method",
					"optional": false,
					"signature": "listBooks(which: BookRef[] | {\n    shelf: string;\n} | {\n    ids: BookRef[];\n} | \"all\"): Promise<BookSummary[]>",
					"doc": "Books (in the order asked), or a shelf's books. Works from the Content Server, or read-only from the library\nfile when the server is off and a library folder is set. Rejects with `book-missing` naming any id Calibre\ndoesn't have. `{ ids }` works as the list does. Any `BookRef` that names a Calibre book;\none that names another book rejects with `not-calibre`. `'all'`: every book in Calibre, by id."
				},
				{
					"name": "bookFile",
					"kind": "method",
					"optional": false,
					"signature": "bookFile(book: BookRef, format: BookFormat, opts?: BookFileOptions): Promise<ArrayBuffer | null>",
					"doc": "A book file's bytes, from the Content Server, else read-only from the library folder when the\nserver is off. With `{ convert: true }`, an EPUB the book lacks is made from its AZW3 or MOBI after the user\nagrees (`null` if they decline); that needs the server, and rejects with `server-off` without it.\nthe book is any `BookRef`: a book file in the vault, or one another provider holds, is served as it is."
				},
				{
					"name": "pdfText",
					"kind": "method",
					"optional": false,
					"signature": "pdfText(book: BookRef, pages?: PageRange): Promise<string>",
					"doc": "A PDF's text, page by page (pages separated by a blank line), through Obsidian's PDF.js. With `pages`, only\nthose pages, so a long book can be read a part at a time. the book is any `BookRef`, and\nthe text is laid out: a line of the page on a line of its own, a wider gap a blank line, a word broken at a\nline's end joined. `chars a-b` locations and `bookText` count in this text."
				},
				{
					"name": "shelfMembers",
					"kind": "method",
					"optional": false,
					"signature": "shelfMembers(shelf: string): Promise<number[]>",
					"doc": "The Calibre ids of the books on a shelf, ascending: in `shelves`, not in `shelves_exclude` (the same test as\nthe shelf's Base). A shelf is named by its `shelf_id`, or its note's name or path. Book notes without a\n`calibre_id` aren't included."
				},
				{
					"name": "calibreChecks",
					"kind": "method",
					"optional": false,
					"signature": "calibreChecks(): Promise<CalibreChecks>",
					"doc": "The Calibre settings Library Hub depends on, checked against the Content Server now: that it answers, that\nany login works, that the library exists, and that it allows changes (needed to convert a book or write to it).\nEach check that fails says how to set it right in Calibre. Never rejects: a server that doesn't answer is a\nfailed check."
				},
				{
					"name": "listShelves",
					"kind": "method",
					"optional": false,
					"signature": "listShelves(): Promise<ShelfInfo[]>",
					"doc": "Every shelf, by name, with how many Calibre books are on it."
				},
				{
					"name": "shelfBaseQuery",
					"kind": "method",
					"optional": false,
					"signature": "shelfBaseQuery(shelf: string): Promise<ShelfBaseQuery>",
					"doc": "A shelf's membership as Bases reads it, with the shelf's values filled in: a one-line filter for your own\nBase or formula, and a whole `.base` file."
				},
				{
					"name": "addToShelf",
					"kind": "method",
					"optional": false,
					"signature": "addToShelf(shelf: string, books: BookRef[]): Promise<ShelfChange>",
					"doc": "Puts books on a shelf: each book's note gets the shelf in `shelves` and any exclusion is lifted. Books\nalready on it are `unchanged`; books without a note are `noNote`. Logged as one run (`run`) you can pass to\n`undoRun`; nothing is logged when nothing changed."
				},
				{
					"name": "removeFromShelf",
					"kind": "method",
					"optional": false,
					"signature": "removeFromShelf(shelf: string, books: BookRef[]): Promise<ShelfChange>",
					"doc": "Takes books off a shelf: each book's note drops it from `shelves` and excludes it (`shelves_exclude`), so\nnothing puts the book back by itself. Books not on it are `unchanged`. Logged as one run; nothing when nothing changed."
				},
				{
					"name": "createShelf",
					"kind": "method",
					"optional": false,
					"signature": "createShelf(spec: NewShelf): Promise<CreatedShelf>",
					"doc": "Makes a shelf: a shelf note in the shelves folder (with `Shelf Members.base` beside it the first time) and\nthe given books pinned to it, in one run. A shelf whose `shelf_id` exists already is returned as it is,\nwith the books added, so asking twice makes one shelf."
				},
				{
					"name": "renameShelf",
					"kind": "method",
					"optional": false,
					"signature": "renameShelf(shelf: string, name: string): Promise<RenamedShelf>",
					"doc": "Renames a shelf's note and heading; its `shelf_id` stays, so nothing that names the shelf breaks. Undoable."
				},
				{
					"name": "deleteShelf",
					"kind": "method",
					"optional": false,
					"signature": "deleteShelf(shelf: string): Promise<DeletedShelf>",
					"doc": "Deletes a shelf: the note goes to the trash and its id comes out of every book note. `undoRun` brings it all back."
				},
				{
					"name": "mergeShelves",
					"kind": "method",
					"optional": false,
					"signature": "mergeShelves(shelves: string[]): Promise<MergedShelves>",
					"doc": "Merges shelves into the first one named: every book on the others is pinned to it, then the others are\ndeleted, in one run. Needs two or more different shelves."
				},
				{
					"name": "suggestShelves",
					"kind": "method",
					"optional": false,
					"signature": "suggestShelves(book: BookRef, limit?: number): Promise<ShelfSuggestion[]>",
					"doc": "The shelves that suit a book, best first: every shelf it isn't on, ranked by Topic Map by what the book and each\nshelf's books are about. No model is asked. `limit` is 5 unless given (1–50).\n\n Topic Map serves this: without it, or with one that doesn't rank shelves yet, it rejects with\n`needs-topic-map`; when Topic Map hasn't indexed the book, with `no-vectors`."
				},
				{
					"name": "undoRun",
					"kind": "method",
					"optional": false,
					"signature": "undoRun(run: string): Promise<UndoReport>",
					"doc": "Undoes a run a write operation returned: fields go back unless they changed since (those are named in\n`kept`), files the run made go to the trash. A run already undone restores nothing, so undoing twice is\nsafe."
				},
				{
					"name": "openBook",
					"kind": "method",
					"optional": false,
					"signature": "openBook(book: BookRef, at?: BookPlace): Promise<OpenedBook>",
					"doc": "Opens a book in Library Hub's reader, in a new tab, at a place. The book is any `BookRef` (A Calibre\nid). Rejects `book-missing` (nothing matches, or the book has no note) and `format-missing` (no EPUB,\nAZW3, MOBI or PDF to read; an AZW3 or MOBI, opened when the book has no EPUB, before its PDF)."
				},
				{
					"name": "findBook",
					"kind": "method",
					"optional": false,
					"signature": "findBook(book: BookRef): Promise<FoundBook>",
					"doc": "The book a reference names (see `BookRef`), without opening it. Rejects `book-missing`, saying what it tried."
				},
				{
					"name": "onBooksChanged",
					"kind": "method",
					"optional": false,
					"signature": "onBooksChanged(cb: (change: BooksChanged) => void): () => void",
					"doc": "Calls `cb` each time books arrive, change or go (see `BooksChanged`); the same news as the\n`library-hub:books-changed` workspace event. Returns the function that stops it: pass it to your plugin's\n`register()`."
				},
				{
					"name": "shelvesOf",
					"kind": "method",
					"optional": false,
					"signature": "shelvesOf(books: BookRef[]): Promise<BookShelves[]>",
					"doc": "Which shelves each book is on, in the order asked: in `shelves`, not excluded (the same test as\n`shelfMembers`). A book without a note is on none."
				},
				{
					"name": "findBooks",
					"kind": "method",
					"optional": false,
					"signature": "findBooks(query: string, limit?: number): Promise<BookSummary[]>",
					"doc": "Books whose title and authors hold every word of `query` (case and accents ignored), titles that start with it\nfirst. `limit` is 10 unless given (1–50)."
				},
				{
					"name": "estimateShelfFromDescription",
					"kind": "method",
					"optional": false,
					"signature": "estimateShelfFromDescription(spec: DescribedShelf): Promise<ShelfEstimate>",
					"doc": "What making a shelf from a description would read and cost: how many books the model would read and in how many\ncalls through `library-hub.shelf-keep`. No model is asked. Rejects with `no-hub` without Model Hub.;\n the books are those that share the description's words (no vectors needed)."
				},
				{
					"name": "shelfFromDescription",
					"kind": "method",
					"optional": false,
					"signature": "shelfFromDescription(spec: DescribedShelf): Promise<DescribedShelfResult>",
					"doc": "Makes a shelf from a description: the books that best match its words (title, authors and context, by a keyword\nranking), and any naming a term, are read by `library-hub.shelf-keep`, which keeps those that belong; the shelf\nis made with them pinned, in one logged run that `undoRun` takes back. A shelf of that name already there gets\nthe books added. By words (before, the books nearest it by meaning)."
				},
				{
					"name": "estimateSummary",
					"kind": "method",
					"optional": false,
					"signature": "estimateSummary(book: BookRef, kind?: SummaryKind): Promise<SummaryEstimate>",
					"doc": "What summarizing a book would read and cost. Reads the book's text; no model is asked. `kind` is `summary` unless given."
				},
				{
					"name": "summarizeBook",
					"kind": "method",
					"optional": false,
					"signature": "summarizeBook(book: BookRef, kind?: SummaryKind): Promise<StartedJob>",
					"doc": "Summarizes a book in the background, as the plugin's own commands do (the job shows in the Library panel), and\nresolves at once with the job and its run. `summary` writes a one-page `## Summary` in the book's note;\n`chapters` writes one note per chapter (quotes checked word for word) and a `## Chapters` list. Follow it with\n`jobStatus`; `undoRun` takes it back."
				},
				{
					"name": "jobStatus",
					"kind": "method",
					"optional": false,
					"signature": "jobStatus(job: number): Promise<JobInfo>",
					"doc": "A background job's progress, cost and outcome. Rejects with `job-missing` for an id it doesn't know."
				},
				{
					"name": "bookText",
					"kind": "method",
					"optional": false,
					"signature": "bookText(book: BookRef, opts?: BookTextOptions): Promise<BookText>",
					"doc": "A book's text as chapters, read from its file: the EPUB, else the AZW3 or MOBI as it is, else the\nPDF, laid out, with its outline's chapters. An AZW3 or MOBI that can't be read as it is (DRM, a damaged file) is\nread from an EPUB Calibre makes from it, with `convert`. Each chapter has a `location` `openBook` lands on, its\noffsets in the whole text and its text; `hash` changes only when the text does. A Calibre book is read from the\nContent Server, else from the library folder, where nothing can be converted: an unreadable AZW3 or\nMOBI with a PDF rejects with `needs-conversion` (with `convert`, its PDF is read, with a warning), and one without\nrejects with `server-off`. A book file in the vault, or one another provider serves, is read as it is. Rejects\nwith `book-missing`, `format-missing` (no EPUB, AZW3, MOBI or PDF), `needs-conversion`, `declined`,\n`conversion-failed` and `no-text` (a scan, a book of images, a file that can't be read)."
				},
				{
					"name": "bookChapters",
					"kind": "method",
					"optional": false,
					"signature": "bookChapters(book: BookRef, opts?: BookTextOptions): Promise<BookChapters>",
					"doc": "The same as `bookText` without the chapters' text: a book's chapters, their locations and offsets, and the\ntext's hash. It reads the whole file all the same."
				},
				{
					"name": "status",
					"kind": "method",
					"optional": false,
					"signature": "status(): Promise<LibraryStatus>",
					"doc": "Whether Calibre's Content Server and the providers turned on can be reached now, and what the library holds.\nNever rejects: something that doesn't answer is reported as such. Asks Calibre once and each provider's checks\n(each given a few seconds)."
				}
			]
		},
		{
			"name": "CalibreCheckState",
			"exported": true,
			"kind": "type",
			"signature": "type CalibreCheckState = \"ok\" | \"bad\" | \"off\";",
			"doc": ""
		},
		{
			"name": "CalibreCheck",
			"exported": true,
			"kind": "interface",
			"signature": "interface CalibreCheck",
			"doc": "One Calibre setting as checked.",
			"members": [
				{
					"name": "id",
					"kind": "property",
					"optional": false,
					"signature": "id: \"server\" | \"login\" | \"library\" | \"changes\"",
					"doc": ""
				},
				{
					"name": "name",
					"kind": "property",
					"optional": false,
					"signature": "name: string",
					"doc": "The setting in a word or two: \"Content Server\", \"Login\", \"Library\", \"Changes\"."
				},
				{
					"name": "state",
					"kind": "property",
					"optional": false,
					"signature": "state: CalibreCheckState",
					"doc": "`off`: not checked, because an earlier check failed."
				},
				{
					"name": "text",
					"kind": "property",
					"optional": false,
					"signature": "text: string",
					"doc": "What was found."
				},
				{
					"name": "fix",
					"kind": "property",
					"optional": true,
					"signature": "fix?: string",
					"doc": "Where to set it right in Calibre, when `state` is `bad`."
				}
			]
		},
		{
			"name": "CalibreChecks",
			"exported": true,
			"kind": "interface",
			"signature": "interface CalibreChecks",
			"doc": "",
			"members": [
				{
					"name": "ok",
					"kind": "property",
					"optional": false,
					"signature": "ok: boolean",
					"doc": "Every check passed."
				},
				{
					"name": "reads",
					"kind": "property",
					"optional": false,
					"signature": "reads: boolean",
					"doc": "The server answers and the library exists: books can be read."
				},
				{
					"name": "writes",
					"kind": "property",
					"optional": false,
					"signature": "writes: boolean",
					"doc": "The server allows changes."
				},
				{
					"name": "checks",
					"kind": "property",
					"optional": false,
					"signature": "checks: CalibreCheck[]",
					"doc": ""
				}
			]
		},
		{
			"name": "GetLibraryHubResult",
			"exported": true,
			"kind": "type",
			"signature": "type GetLibraryHubResult = {\n    libraryHub: LibraryHubApi;\n} | {\n    libraryHub: null;\n    reason: \"missing\" | \"incompatible\";\n    message: string;\n    version?: string;\n};",
			"doc": "What `getLibraryHub` answers: the API, or why not, in a message to show as it is."
		},
		{
			"name": "getLibraryHub",
			"exported": true,
			"kind": "function",
			"signature": "declare function getLibraryHub(app: unknown, wanted: string, opts?: {\n    by?: string;\n    for?: string;\n}): GetLibraryHubResult;",
			"doc": "Finds Library Hub in this vault and checks its API version against the one you built for (`isCompatible`).\n`opts.by` names your plugin and `opts.for` what it needs books for, in the message:\n`getLibraryHub(app, '0.8.0', { by: 'My Plugin', for: 'for book collections' })`."
		},
		{
			"name": "hasMethod",
			"exported": true,
			"kind": "function",
			"signature": "declare function hasMethod<K extends keyof LibraryHubApi>(api: LibraryHubApi, name: K): api is LibraryHubApi & Required<Pick<LibraryHubApi, K>>;",
			"doc": "Whether this Library Hub has a method newer than the version you gate on: `if (hasMethod(libraryHub, 'bookText')) …`.\nMethods tagged `@since` a later version than your gate may be missing on an older Library Hub."
		},
		{
			"name": "onLibraryHubReady",
			"exported": true,
			"kind": "function",
			"signature": "declare function onLibraryHubReady(app: unknown, plugin: {\n    registerEvent(ref: unknown): void;\n}, wanted: string, cb: (libraryHub: LibraryHubApi) => void): void;",
			"doc": "Runs `cb` with the API now if Library Hub is loaded (and compatible with `wanted`), and again each time it\nloads: it fires `library-hub:ready` on the workspace at the end of its `onload`. The listener is registered\nthrough `plugin.registerEvent`, so it stops when your plugin unloads.\n\n```ts\nonLibraryHubReady(this.app, this, '0.8.0', (libraryHub) => (this.libraryHub = libraryHub));\n```"
		},
		{
			"name": "LIBRARY_HUB_TOOLS",
			"kind": "const",
			"exported": true,
			"signature": "declare const LIBRARY_HUB_TOOLS: LibraryHubTool[];",
			"doc": "Every operation as a tool (see `LibraryHubTool`)."
		},
		{
			"name": "BooksApi",
			"exported": true,
			"kind": "type",
			"signature": "type BooksApi = LibraryHubApi;",
			"doc": ""
		},
		{
			"name": "BooksErrorCode",
			"exported": true,
			"kind": "type",
			"signature": "type BooksErrorCode = LibraryHubErrorCode;",
			"doc": ""
		},
		{
			"name": "BooksTool",
			"exported": true,
			"kind": "type",
			"signature": "type BooksTool = LibraryHubTool;",
			"doc": ""
		},
		{
			"name": "BOOKS_API_VERSION",
			"kind": "const",
			"exported": true,
			"signature": "declare const BOOKS_API_VERSION: string;",
			"doc": ""
		},
		{
			"name": "BOOKS_PLUGIN_ID",
			"kind": "const",
			"exported": true,
			"signature": "declare const BOOKS_PLUGIN_ID = \"library-hub\";",
			"doc": ""
		},
		{
			"name": "BOOKS_READY_EVENT",
			"kind": "const",
			"exported": true,
			"signature": "declare const BOOKS_READY_EVENT = \"library-hub:ready\";",
			"doc": ""
		},
		{
			"name": "BOOKS_TOOLS",
			"kind": "const",
			"exported": true,
			"signature": "declare const BOOKS_TOOLS: LibraryHubTool[];",
			"doc": ""
		},
		{
			"name": "GetBooksResult",
			"exported": true,
			"kind": "type",
			"signature": "type GetBooksResult = {\n    books: LibraryHubApi;\n} | {\n    books: null;\n    reason: \"missing\" | \"incompatible\";\n    message: string;\n    version?: string;\n};",
			"doc": "What the deprecated `getBooks` answers: `{ books }`, as before 0.6. `getLibraryHub` answers `GetLibraryHubResult`."
		},
		{
			"name": "getBooks",
			"exported": true,
			"kind": "function",
			"signature": "declare function getBooks(app: unknown, wanted: string): GetBooksResult;",
			"doc": ""
		},
		{
			"name": "onBooksReady",
			"exported": true,
			"kind": "function",
			"signature": "declare function onBooksReady(app: unknown, plugin: {\n    registerEvent(ref: unknown): void;\n}, wanted: string, cb: (books: LibraryHubApi) => void): void;",
			"doc": ""
		}
	]
}
