diff --git a/content/_types/doc-page.md b/content/_types/doc-page.md
index 75ace5c..abed6b2 100644
--- a/content/_types/doc-page.md
+++ b/content/_types/doc-page.md
@@ -20,7 +20,7 @@ schema:
type: string
minLength: 1
section:
- enum: [sdk, mcp, editor, reader, writer]
+ enum: [sdk, mcp, editor, reader, writer, guides]
collection:
display:
name_field: title
@@ -36,13 +36,14 @@ address, so `apps/reader/index.md` is `/apps/reader/`.
`section` is the documentation set the page belongs to, which picks its
sidebar.
-The body is ordinary Markdown with four additions the site understands:
+The body is ordinary Markdown with the additions the site understands:
- A heading can keep a fixed anchor: `## Saved views {#views}`.
- A code block can name its file: ` ```ts title="src/mdbase.ts" `. With
`file="examples/worklog/src/mdbase.ts"` it shows that file from the site's
repository instead of its own contents; `pick="scripts"` keeps one key of a
JSON file.
+- A standalone screenshot pointing to a registered light capture in `/images/apps/` uses the same themed frame and phone crop as the app pages.
- An image whose address is a recording in `/videos/` is shown as that
recording, with its captions and text description.
- A heading marked `{.cards}` shows the list under it as cards, two to a row.
diff --git a/content/apps/editor/index.md b/content/apps/editor/index.md
index 1af9602..b3d9de9 100644
--- a/content/apps/editor/index.md
+++ b/content/apps/editor/index.md
@@ -40,3 +40,5 @@ Open the collection switcher from the rail. It lists collections you opened befo
## The Connect workspace {#connect}
[editor.mdbase.dev/connect](https://editor.mdbase.dev/connect) is where you manage your mdbase Connect account: collections, storage and sync, sharing, connected applications, devices, sign-in methods and browser sessions. It uses your account session, not a collection grant, so it can list your collections but cannot read their contents.
+
+For the folder setup and a worked edit, see [Edit an Obsidian vault in your browser](/guides/obsidian-browser/).
diff --git a/content/apps/mcp/collections.md b/content/apps/mcp/collections.md
index a705fe9..bcacb1b 100644
--- a/content/apps/mcp/collections.md
+++ b/content/apps/mcp/collections.md
@@ -51,3 +51,5 @@ Your approval travels with the collection, so every copy checks it before it ans
For a **Cloud copy** collection, requests go to the readable copy mdbase keeps, so tools work while your devices are off.
For a **Private** collection, requests travel from the MCP server through the mdbase relay to one of your devices. They are encrypted end to end between the MCP server and that device, and the relay cannot read them. One of your devices must be online. If none is, tools return `connector_offline`. A new approval for a Private collection takes effect once one of your signed-in devices has recorded it. See [Troubleshooting](/apps/mcp/troubleshooting/).
+
+For a read-only setup in ChatGPT, see [Connect ChatGPT to your Markdown notes](/guides/chatgpt-markdown/).
diff --git a/content/apps/mcp/index.md b/content/apps/mcp/index.md
index 6daf7f7..bb463d0 100644
--- a/content/apps/mcp/index.md
+++ b/content/apps/mcp/index.md
@@ -59,3 +59,5 @@ The client should call `list_connections` and then `describe_collection`. `list_
- [Working with records](/apps/mcp/working-with-records/) covers queries, edits and safe retries.
- [Tool reference](/apps/mcp/tools/) lists every tool and its inputs.
- [Data handling](/apps/mcp/data-handling/) describes what the MCP server stores and what it can see.
+- [Connect Claude to your Obsidian vault](/guides/claude-obsidian/) walks through read-only access and checks the result against a note on disk.
+- [Compare local and hosted MCP servers for an Obsidian vault](/guides/obsidian-mcp-servers/) to choose where requests run.
diff --git a/content/apps/reader/import.md b/content/apps/reader/import.md
index e30a2b9..6bdcfb4 100644
--- a/content/apps/reader/import.md
+++ b/content/apps/reader/import.md
@@ -25,6 +25,8 @@ The experimental exporter includes all of **My Library**, not a selected collect
Reader checks every payload file against its checksum before collection writes. Selecting a folder needs a supporting browser such as Chrome. Export bundles contain private notes and attachment content; keep them private.
+See the [Zotero annotations guide](/guides/zotero-annotations/) for a complete example with a PDF highlight.
+
## From Readwise Reader {#readwise}
Readwise imports bring Reader documents and files, plus highlights from classic Readwise sources such as Kindle, Apple Books and Instapaper. Classic sources import as metadata and highlights, without the book text.
@@ -46,3 +48,5 @@ Imported files are stored under `files/reader/imports`. When the import finishes
Choose **Stop safely** to pause an active import. Everything already written is kept, and **Resume import** continues the confirmed job. The job stays bound to its destination; switching collections cannot redirect it.
After reloading, reselect the same export folder or reconnect Readwise, choose the same collection and scan again. Check the destination before resuming. Records already imported are kept; review the completion warnings for missing or unavailable content.
+
+For a worked example with a book, a highlight and the resulting file, see [Export Readwise highlights to Markdown](/guides/readwise-markdown/).
diff --git a/content/apps/writer/citations.md b/content/apps/writer/citations.md
index 3893e91..5734ac3 100644
--- a/content/apps/writer/citations.md
+++ b/content/apps/writer/citations.md
@@ -43,3 +43,5 @@ Preview and Word export use the same citation metadata and style, with separate
## Missing or unknown sources {#missing}
An unknown citekey appears in Problems and may offer a similar known key. Check its spelling, the selected collection and the source's citation data. Editing a source citekey can leave older manuscript citations unresolved; update those references as well.
+
+[Write a thesis in Markdown with citations](/guides/markdown-thesis/) follows one source from the library into a downloadable manuscript and bibliography.
diff --git a/content/guides/chatgpt-markdown.md b/content/guides/chatgpt-markdown.md
new file mode 100644
index 0000000..d5698df
--- /dev/null
+++ b/content/guides/chatgpt-markdown.md
@@ -0,0 +1,60 @@
+---
+title: Connect ChatGPT to your Markdown notes
+description: Add mdbase as a custom MCP server in ChatGPT, approve one collection and ask for the paths and contents of matching Markdown notes.
+section: guides
+---
+
+You need a ChatGPT workspace that allows custom MCP servers, an mdbase account and a synced collection. An Obsidian vault can be that collection. Choose a folder whose entire contents you’re comfortable making available to ChatGPT.
+
+## 1. Sync the folder that holds your notes
+
+Use one sync service for a given folder. If you already sync this vault, decide which service will own that job before you turn on mdbase sync. The [mdbase plugin for Obsidian](https://github.com/mdbase-dev/mdbase-obsidian#sync) can sync the vault in place of the desktop app.
+
+In the [mdbase Connect desktop app](/downloads/), open **Collections → Add existing** and select the folder. In the folder’s actions menu, choose **Turn on sync**. If the folder already syncs with mdbase, use that collection. Write down its name. You’ll select it again during approval.
+
+**Cloud copy** makes a readable copy available while your computer is off. For **Private**, select end-to-end encryption under **Advanced**. A computer serving the Private collection must be online when ChatGPT requests a note.
+
+
+
+## 2. Add the remote MCP server
+
+In ChatGPT, open **Plugins**. Choose the plus button and **Add custom MCP server**. Give the plugin the name `mdbase` and a description such as “Read my field notes.” Under **Connection**, select the public endpoint option and enter:
+
+```text title="MCP server URL"
+https://mcp.mdbase.dev/mcp
+```
+
+Choose OAuth authentication. Review the warning, select **I understand and want to continue**, then **Create as a plugin**. Check the discovered tools for `list_connections`, `query_records` and `read_record`. Install the resulting plugin. If the custom-server option is missing, check your workspace’s policy with its owner. [OpenAI’s connection instructions](https://developers.openai.com/plugins/deploy/connect-chatgpt#add-the-mcp-server)
+
+## 3. Choose the collection and permissions
+
+When ChatGPT asks you to connect, sign in to mdbase. Check the collection name. The approval screen identifies the service as **mdbase** at `https://mcp.mdbase.dev`. For searches and quotations, keep read access and clear the optional create, edit, delete and definition permissions. Choose **Allow access**.
+
+
+
+
+
+## 4. Find a note by its properties
+
+Save the following file in your synced folder. In an Obsidian vault, `status` is a property of the note. Its value gives ChatGPT a field it can search even when the file name contains no mention of the count.
+
+```markdown title="surveys/east-bank.md"
+---
+title: East bank survey
+status: awaiting-count
+---
+
+Return at low tide to count the nesting pairs.
+```
+
+In a new ChatGPT conversation, type `@` and select **mdbase**. Replace “Field research” with your collection name:
+
+> In Field research, find notes where the status is awaiting-count. Give me their relative paths. Read surveys/east-bank.md and quote its field instruction.
+
+Check for `surveys/east-bank.md` and the instruction about low tide. You can open the same file on disk and compare the text.
+
+
+
+## Access after the chat
+
+Closing the chat leaves the collection approval in place. [Revoke the application grant in Connect](/apps/mcp/collections/#revoke) to stop further reads. A Private collection protects the synced copy. The MCP gateway and ChatGPT still receive the content you ask them to read. See [MCP data handling](/apps/mcp/data-handling/) or [connect Claude to the same vault](/guides/claude-obsidian/).
diff --git a/content/guides/claude-obsidian.md b/content/guides/claude-obsidian.md
new file mode 100644
index 0000000..d72dafd
--- /dev/null
+++ b/content/guides/claude-obsidian.md
@@ -0,0 +1,69 @@
+---
+title: Connect Claude to your Obsidian vault
+description: Sync your vault folder with mdbase Connect, then give Claude read access through MCP. Try it with one note whose answer you can check.
+section: guides
+---
+
+You need an [Obsidian vault folder](https://obsidian.md/help/vault), the [mdbase Connect desktop app](/downloads/), an mdbase account and access to connectors in Claude. If only a few notes should be visible to Claude, put them in a separate vault. Approval covers the whole collection.
+
+## 1. Connect the vault folder
+
+Use one sync service for a given folder. If you already sync this vault, decide which service will own that job before you turn on mdbase sync. The [mdbase plugin for Obsidian](https://github.com/mdbase-dev/mdbase-obsidian#sync) can sync the vault in place of the desktop app.
+
+Sign in to the desktop app. Under **Collections**, choose **Add existing** and select the folder that contains your notes. Open the actions menu beside that folder and choose **Turn on sync**. If the vault already syncs with mdbase, use its existing collection.
+
+The default, **Cloud copy**, keeps a copy readable by mdbase. Claude can use it while your computer is off. For **Private**, open **Advanced** and select **Encrypt end to end so mdbase cannot read it**. Keep a computer with Connect and that collection online when you use Claude. Confirm with **Turn on sync**.
+
+
+
+## 2. Add mdbase in Claude
+
+In Claude on the web, open **Customize → Connectors**. On a personal account, choose **+ Add → Add custom connector**, enter `mdbase` as the name and paste this server URL.
+
+```text title="Remote MCP server URL"
+https://mcp.mdbase.dev/mcp
+```
+
+Choose **Continue**. Review the detected authentication settings and continue. Choose **Sign in now** and **Register automatically** for the OAuth client. Choose **Add**. If Claude shows **Connect** beside mdbase, select it to start sign-in. A managed workspace may need an owner to add the connector first. [Claude’s connector instructions](https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp)
+
+## 3. Approve read access
+
+In the mdbase sign-in window, choose the collection that matches your vault folder. On the review screen, check the app address and collection name. Keep the required read permission. Clear the optional permissions for creating, editing and deleting records and files, and for managing definitions. Choose **Allow access**.
+
+
+
+
+
+## 4. Read a note you can check
+
+Save this file as `surveys/east-bank.md` in your vault. The lines between the two sets of dashes are its properties. The sentence below them is its body.
+
+```markdown title="surveys/east-bank.md"
+---
+title: East bank survey
+status: awaiting-count
+---
+
+Return at low tide to count the nesting pairs.
+```
+
+Once the folder has synced, open a chat. In **+ → Connectors**, enable mdbase. Ask:
+
+> List my connected collections. In Field research, read surveys/east-bank.md. Give me the status and quote the field instruction.
+
+Substitute your collection name. Claude can use `list_connections` to find it and `read_record` to read the file. Check for **awaiting-count** and the sentence about low tide. A read leaves the file as you wrote it.
+
+
+
+## What Claude can see
+
+
+
+Private encrypts the synced collection. When you ask Claude to read a note, the gateway processes the result and sends it to Claude. The read permission also covers other records in that collection. To stop access, revoke the grant in [Connect’s Applications screen](/apps/mcp/collections/#revoke).
+
+See [MCP data handling](/apps/mcp/data-handling/) for what leaves your device, or [connection errors](/apps/mcp/troubleshooting/) if the collection is offline.
diff --git a/content/guides/index.md b/content/guides/index.md
new file mode 100644
index 0000000..27b1a74
--- /dev/null
+++ b/content/guides/index.md
@@ -0,0 +1,61 @@
+---
+title: Markdown guides
+description: Follow a task from the first setting to the Markdown file on your computer.
+section: guides
+---
+
+## Work with your notes {.cards}
+
+- **Connect Claude to your Obsidian vault**
+
+ Give Claude read access to a vault and check its answer against a note on disk.
+
+ [Connect Claude to a vault](/guides/claude-obsidian/)
+
+- **Export Readwise highlights to Markdown**
+
+ Import saved highlights and find the quotation, comment and source link on disk.
+
+ [Import Readwise highlights](/guides/readwise-markdown/)
+
+- **Edit an Obsidian vault in your browser**
+
+ Edit the body and properties of a note, then check the file in your vault.
+
+ [Open a vault in Editor](/guides/obsidian-browser/)
+
+- **Connect ChatGPT to your Markdown notes**
+
+ Ask for notes that match a property and check the quoted text against the file.
+
+ [Connect ChatGPT](/guides/chatgpt-markdown/)
+
+- **Save Zotero annotations as Markdown notes**
+
+ Bring a marked-up passage, your comment and the original attachment into the same collection.
+
+ [Import Zotero annotations](/guides/zotero-annotations/)
+
+- **Obsidian MCP servers compared**
+
+ Choose where the server reads your notes and see which computer must stay online.
+
+ [Compare local and hosted MCP](/guides/obsidian-mcp-servers/)
+
+- **Write a thesis in Markdown with citations**
+
+ Insert a source from Reader, check the bibliography and download the manuscript with its references.
+
+ [Write and cite a thesis](/guides/markdown-thesis/)
+
+- **Query YAML frontmatter from the command line**
+
+ Filter a folder of Markdown notes by status and read a matching file.
+
+ [Run a frontmatter query](/guides/query-frontmatter/)
+
+- **Build a personal web app without a backend**
+
+ Run a work log, save a browser record and check where its data lives.
+
+ [Build a browser work log](/guides/local-first-web-app/)
diff --git a/content/guides/local-first-web-app.md b/content/guides/local-first-web-app.md
new file mode 100644
index 0000000..0230101
--- /dev/null
+++ b/content/guides/local-first-web-app.md
@@ -0,0 +1,57 @@
+---
+title: Build a personal web app without a backend
+description: Run a local-first work log with React and the mdbase SDK. Save entries in your browser, check they survive a reload and see how one maps to Markdown.
+section: guides
+---
+
+You can build a personal work log as a static web app. The mdbase SDK stores entries in the browser before sign-in. If you later want the same records in a folder or on another device, Connect can sync them to a collection.
+
+## 1. Run the working example
+
+You need Git, npm, Node.js 24 or later and a browser. Clone the example and install its locked dependencies.
+
+```sh title="Terminal"
+git clone --depth 1 https://github.com/mdbase-dev/mdbase.dev.git
+cd mdbase.dev/examples/worklog
+npm ci
+npm run dev
+```
+
+Open `http://localhost:5173` in your browser. Keep the hostname and port as written. The development script puts that exact address in the app’s manifest.
+
+
+
+## 2. Save an entry and reload
+
+Set a date, enter a summary such as “Counted shorebirds at low tide,” and enter `45` for minutes. Choose **Add**. The dated summary appears below the form. The list shows the summary and date. The record also holds the minutes.
+
+
+
+Reload the page at the same address. Your entry is still there, with **Saved only in this browser** above it. Clearing site data removes that local copy. A different browser profile starts with its own storage.
+
+
+
+
+
+## 3. Trace the form to a Markdown record
+
+Open `src/Worklog.tsx`. The form calls `db.create()` with three things: the type `worklog-entry`, a file path and the frontmatter fields. The path includes the date and eight characters from a random UUID, so two entries on one day get different filenames. A live query for that type updates the list.
+
+The generated path in this run was `worklog/2026-11-24-c8633a7f.md`. Here is the same record written to a collection folder. The browser-only app keeps the record in site storage. You won’t find a new file in the project folder when you press **Add**.
+
+```markdown title="worklog/2026-11-24-c8633a7f.md"
+---
+date: "2026-11-24"
+minutes: 45
+summary: Counted shorebirds at low tide
+type: worklog-entry
+---
+```
+
+To adapt the form, change its inputs and the frontmatter passed to `db.create()` together. Update `mdbase/types/worklog-entry.md` if you add a field that needs validation. Run `npm run check` to regenerate the manifest and typecheck the app. [The complete example and its source files](/sdk/connect-quickstart/)
+
+## 4. Choose where your entries live
+
+For one browser, you can keep using the app without an account. For collection storage, use **Connect to sync your work**. Sign in, choose a collection and review the proposed type setup and transfer of existing entries. A collection synced to a computer gives you the Markdown files there. [How browser records move into a collection](/sdk/unsynced/#transfer)
+
+To build static files, run `WORKLOG_ORIGIN=https://worklog.example.com npm run build`, substituting your own HTTPS origin. Vite writes the site to `dist/`. Choose an app ID under your own domain before publishing. The published origin has separate browser storage, so opening it won’t bring across entries saved under localhost. [Manifest and origin requirements](/sdk/local-development/)
diff --git a/content/guides/markdown-thesis.md b/content/guides/markdown-thesis.md
new file mode 100644
index 0000000..99b886f
--- /dev/null
+++ b/content/guides/markdown-thesis.md
@@ -0,0 +1,55 @@
+---
+title: Write a thesis in Markdown with citations
+description: Use mdbase Writer to cite sources from Reader, typeset a thesis and download editable Markdown with its bibliography and citation style.
+section: guides
+---
+
+Write your chapters in Markdown and cite each source by its key, such as `[@darwinStructure42]`. Writer looks up the source in your Reader library and formats both the citation and its bibliography entry.
+
+To follow the example, open the [Writer demo](https://lab.mdbase-writer.pages.dev/?demo). It includes the cited book and resets when you reload. For your own thesis, open [Writer](https://writer.mdbase.dev), connect the collection that holds your Reader sources and check that each source has a [unique citekey and citation metadata](/apps/reader/notes/#citation).
+
+## 1. Create a thesis manuscript
+
+Choose **New manuscript**, enter a title and set **Layout** to **Thesis or book**. Select the citation style required by your department. This example uses **Chicago (author-date)**. Leave the worked example unchecked and choose **Create manuscript**.
+
+
+
+## 2. Insert a source at the claim it supports
+
+Type `# Field evidence` on a line of its own. Leave a blank line, then write “Darwin traces the formation of atolls” followed by a space. With the cursor there, open **Sources** with **Ctrl+Shift+E** (**⌘+Shift+E** on Mac). Search for `darwinStructure42` in the demo, or for the title or key of your own source.
+
+
+
+Press **Enter** to cite the first match. Type the final period. The Markdown now ends with `[@darwinStructure42].` and the preview reads “(Darwin 1842).” Look for the full book entry under **Bibliography**. To cite a particular page, include its locator inside the brackets, as in `[@darwinStructure42, p. 12]`. Check the page against the edition you used.
+
+
+
+## 3. Export a copy with its references
+
+In the menu beside **Export**, choose **Pandoc bundle (zip)**. Unzip the download. Keep `references.json` and `style.csl` beside `manuscript.md`. The first file contains the cited book’s metadata. The second tells a citation processor how to display it.
+
+
+
+Here is the complete `manuscript.md` from the example download. Its frontmatter names the two companion files. In the collection, Writer keeps layout and citation-style choices in the [manuscript record](/apps/writer/data/#records).
+
+```markdown title="manuscript.md"
+---
+title: Reading the reef
+lang: en-US
+number-sections: true
+bibliography: references.json
+csl: style.csl
+link-citations: true
+reference-section-title: Bibliography
+---
+
+# Field evidence
+
+Darwin traces the formation of atolls [@darwinStructure42].
+```
+
+## Add chapters and prepare the submission
+
+For a longer thesis, put each chapter in its own record and add its embed, such as `![[chapters/results]]`, on a separate line in the main manuscript. Writer assembles the chapters in order before resolving citations. See [chapters and embeds](/apps/writer/chapters/) for the steps and a recording.
+
+Use PDF when you need the typeset layout. Word uses separate document styles and can paginate differently. In the file you plan to submit, inspect the references, captions and page breaks, and compare them with your department’s requirements. [Layouts and export formats](/apps/writer/export/)
diff --git a/content/guides/obsidian-browser.md b/content/guides/obsidian-browser.md
new file mode 100644
index 0000000..79ae10c
--- /dev/null
+++ b/content/guides/obsidian-browser.md
@@ -0,0 +1,61 @@
+---
+title: Edit an Obsidian vault in your browser
+description: Open your vault folder as an mdbase collection. Use mdbase Editor to edit the Markdown body and YAML properties, then open the same file in Obsidian.
+section: guides
+---
+
+Use the [Connect desktop app](/downloads/) on the computer that holds your vault, and [mdbase Editor](https://editor.mdbase.dev/) in the browser. You need an mdbase account and the path to your vault. Obsidian describes a vault as [a folder on your computer](https://obsidian.md/help/vault).
+
+## 1. Make the vault available
+
+Use one sync service for a given folder. If you already sync this vault, decide which service will own that job before you turn on mdbase sync. The [mdbase plugin for Obsidian](https://github.com/mdbase-dev/mdbase-obsidian#sync) can sync the vault in place of the desktop app.
+
+In the desktop app, sign in and open **Collections → Add existing**. Select the vault folder. Open its actions menu and choose **Turn on sync**. If your vault already syncs with mdbase, use that collection.
+
+Choose **Cloud copy** (the default) if you need access while your computers are off. mdbase can read this copy. For **Private**, open **Advanced**, select end-to-end encryption and confirm. To use Editor with a Private collection, keep a computer that serves it online.
+
+
+
+## 2. Open the collection in Editor
+
+Open [mdbase Editor](https://editor.mdbase.dev/) and choose **Choose a collection** in the collections sidebar. Sign in and select your vault. If another collection is already open, choose **Connect another collection**. Review the name and the requested permissions. Allow reading and editing. To create the example below, also allow creating records.
+
+Check that the collection name in the rail matches the vault. **Saved only in this browser** indicates a local workspace. Connect the vault before you expect changes to appear on your computer.
+
+
+
+## 3. Write a note and edit it
+
+Select an existing note, or choose **New note**. For a new note, use **East bank survey** as the title and write the field instruction below. Check the suggested path and press **Ctrl Enter** (**⌘ Enter** on Mac) to create it.
+
+
+
+After the survey, open the note again. Add a second paragraph with your count. Editor saves edits to an existing note automatically. The screenshots use a browser-local sample so you can see the edit without granting access to a vault.
+
+
+
+## 4. Check the Markdown and properties
+
+Open **Note properties**. On a narrow screen, look under **More note actions**. In the properties panel, open **Property options → Edit as source**. Add the three frontmatter lines at the top of the note, then leave the field to save.
+
+
+
+
+
+With a connected collection, wait for the desktop app to finish syncing. Open the same note in Obsidian. This is the file to check:
+
+```markdown title="East bank survey.md"
+---
+status: counted
+---
+# East bank survey
+
+Return at low tide to count the nesting pairs.
+
+
+Counted six pairs on the east bank.
+```
+
+
+
+The browser runs mdbase Editor with its own commands and views. Your Obsidian plugins and workspace layout live in Obsidian. If both apps edit the same note, review Editor’s **This note changed elsewhere** prompt before choosing which version to keep. See [editing and conflicts](/apps/editor/notes/#conflicts) or [give Claude read access to the vault](/guides/claude-obsidian/).
diff --git a/content/guides/obsidian-mcp-servers.md b/content/guides/obsidian-mcp-servers.md
new file mode 100644
index 0000000..6a64bd5
--- /dev/null
+++ b/content/guides/obsidian-mcp-servers.md
@@ -0,0 +1,77 @@
+---
+title: Obsidian MCP servers compared
+description: Run a filesystem MCP server beside your Obsidian vault, or grant a hosted connector access to a synced collection. Compare permissions and offline access.
+section: guides
+---
+
+Choose a local server if you want a desktop client to work directly with one folder. Choose the hosted mdbase connector if you want to reach the collection from a web client such as Claude or ChatGPT.
+
+| | Local filesystem server | Hosted mdbase connector |
+| --- | --- | --- |
+| What you connect | A folder path on the computer running the client | One synced collection per approval |
+| What the client can do | The reference server offers file reads and writes inside its allowed directories | Read records and query their properties. You can decline optional write permissions |
+| What must be online | The computer with the vault and desktop client | With Cloud copy, the connector can read while your computer is off. With Private, a computer serving the collection must be online |
+
+## 1. Make a test vault
+
+Start with a folder containing just this file. Open the folder as a vault in Obsidian. Keep the copy small enough to check exactly which files you’re offering to the client. [How Obsidian stores notes](https://obsidian.md/help/vault)
+
+```markdown title="surveys/east-bank.md"
+---
+title: East bank survey
+status: awaiting-count
+---
+
+Return at low tide to count the nesting pairs.
+```
+
+## 2. Connect your preferred server
+
+### Local folder in Claude Desktop
+
+You need Claude Desktop, Node.js with `npx`, and the absolute path to the test vault. In Claude Desktop’s application menu, open **Settings → Developer → Edit Config**. Add the following entry to the configuration. Keep any servers you already use under `mcpServers`. Replace the example path with your vault’s location. On Windows, escape each backslash in the JSON string.
+
+```json title="claude_desktop_config.json"
+{
+ "mcpServers": {
+ "vault": {
+ "command": "npx",
+ "args": ["-y", "@modelcontextprotocol/server-filesystem", "/absolute/path/to/Field research"]
+ }
+ }
+}
+```
+
+Save and fully restart Claude Desktop. It starts the server as a local process and talks to it over standard input and output. The filesystem server offers editing tools too. Review the tool name and file path before approving a request. [Official local MCP setup](https://modelcontextprotocol.io/docs/develop/connect-local-servers)
+
+### Hosted collection in a web client
+
+Use one sync service for a given folder. If you already sync this vault, decide which service will own that job before you turn on mdbase sync. The [mdbase plugin for Obsidian](https://github.com/mdbase-dev/mdbase-obsidian#sync) can sync the vault in place of the desktop app.
+
+You need an mdbase account and the [Connect desktop app](/downloads/). Add the folder under **Collections → Add existing**, then **Turn on sync** in its actions menu. Choose **Cloud copy** for access while this computer is off, or **Private** for an encrypted copy. Follow the setup for [Claude](/guides/claude-obsidian/) or [ChatGPT](/guides/chatgpt-markdown/) using `https://mcp.mdbase.dev/mcp`.
+
+On the mdbase approval screen, select the test collection. Keep read access and clear the optional permissions.
+
+
+
+
+
+## 3. Check which file the client reads
+
+
+
+For the local server, ask the client to list its allowed directories, then read `surveys/east-bank.md` under the returned path. The terminal capture shows the responses from those two MCP calls against the example folder.
+
+
+
+For the hosted server, ask the client to list its connected collections, choose the test collection and read the same relative path. Both routes should return the instruction about low tide. The hosted route also lets you ask for records where `status` equals `awaiting-count` without first supplying a path. [Working with records](/apps/mcp/working-with-records/)
+
+A local server reads files on your machine. When you use a hosted AI model, the client can still send the retrieved text to the model. For the hosted connector, the gateway processes the text as well. [What the mdbase gateway can see](/apps/mcp/data-handling/)
diff --git a/content/guides/query-frontmatter.md b/content/guides/query-frontmatter.md
new file mode 100644
index 0000000..1011c0c
--- /dev/null
+++ b/content/guides/query-frontmatter.md
@@ -0,0 +1,58 @@
+---
+title: Query YAML frontmatter from the command line
+description: Use the mdbase CLI to filter Markdown files by a YAML property. Return paths, inspect a matching note or get structured JSON for a script.
+section: guides
+---
+
+Run `mdbase query --where 'status == "awaiting-count"'` in a collection folder. It reads the YAML properties in your Markdown files and prints one matching path per line. You can do this locally without signing in.
+
+## 1. Prepare two notes with different statuses
+
+Download the [mdbase command-line tool](/downloads/#command-line) for your platform and put the executable on your path. In a new folder, save this configuration as `mdbase.yaml`. The examples below use a Bash-compatible shell.
+
+```yaml title="mdbase.yaml"
+spec_version: "0.3.0"
+name: Field research
+```
+
+Create a subfolder named `surveys`. Save this first note there as `east-bank.md`. The dashes delimit the YAML, and the blank line separates it from the field instruction.
+
+```markdown title="surveys/east-bank.md"
+---
+title: East bank survey
+status: awaiting-count
+---
+
+Return at low tide to count the nesting pairs.
+```
+
+Save a second note as `surveys/west-bank.md` with the title `West bank survey`, status `counted` and body `Counted three nesting pairs at high tide.` Open a terminal in the folder containing `mdbase.yaml`. Run `mdbase --version` and `ls surveys` to check your setup.
+
+
+
+## 2. Filter by a property
+
+```bash title="Run each query from the collection folder"
+mdbase query --where 'status == "awaiting-count"'
+mdbase query --where 'status == "counted"'
+```
+
+The first command prints `surveys/east-bank.md`. The second prints `surveys/west-bank.md`. The outer single quotes keep the shell from changing the expression. Inside the expression, double quotes mark a string value. A value that matches neither record produces no paths.
+
+
+
+
+
+## 3. Read a result or pass it to a script
+
+Run `mdbase read surveys/east-bank.md` to print the complete file. Querying a property looks at frontmatter. A word in the body, such as “tide,” does not become a value of `status`.
+
+
+
+For machine-readable output, add `--json`. The result has a `records` array. Each entry includes its relative path and a `frontmatter` object. Add `--include-body` when you also need the prose.
+
+```bash title="Return the matching record as JSON"
+mdbase query --where 'status == "counted"' --json --include-body
+```
+
+From another working directory, put `--root "/path/to/Field research"` after `query`. To use the same fields in an application or AI client, see [SDK queries](/sdk/operations/) and [querying records through MCP](/apps/mcp/working-with-records/).
diff --git a/content/guides/readwise-markdown.md b/content/guides/readwise-markdown.md
new file mode 100644
index 0000000..600b37d
--- /dev/null
+++ b/content/guides/readwise-markdown.md
@@ -0,0 +1,71 @@
+---
+title: Export Readwise highlights to Markdown
+description: Import a Readwise library into mdbase Reader. Each highlight becomes a Markdown note linked to its source, with your quote and comment together.
+section: guides
+---
+
+Use Reader’s experimental importer with a fresh collection first. You need a Readwise account with API access, an mdbase account and a destination folder synced through [mdbase Connect](/connect/). Keep the import tab open.
+
+## 1. Choose what to bring
+
+Open [Import from Readwise Reader](https://reader.mdbase.dev/import/readwise). Get your token from [Readwise](https://readwise.io/access_token) and paste it into **API token**. The token stays in this tab and goes only to Readwise. Reader uses it to read your library.
+
+Leave **Include unsaved Feed items** off to import just your saved library and classic highlights. Archived library items are included either way. Choose **Scan Readwise library**. The scan can take several minutes.
+
+
+
+## 2. Check the preview
+
+Compare the counts for sources, annotations and files. Expand the warnings under the category table. A Kindle book in classic Readwise supplies metadata and highlights. Its full text does not come across. Reader documents can bring saved article HTML, PDFs or EPUBs. Original PDFs and EPUBs download after confirmation.
+
+
+
+## 3. Import into your collection
+
+Choose the destination collection. If Reader asks to install its types, review them and select **Apply reviewed setup**. Choose **Check destination**, read the numbers of new and existing records, then choose **Import** on the button naming your collection.
+
+When the import finishes, review its warnings and choose **Open imported collection**. To pause a large job, use **Stop safely**. Use **Resume import** in the same destination. After reloading the page, reconnect Readwise and scan again. Existing records matched by import identity keep their contents.
+
+
+
+
+
+## 4. Open a highlight on disk
+
+Open the synced folder on your computer. The starter layout puts each book or article in `sources/` and its individual highlights in `annotations/`. A highlight records its source link in the properties. Its body keeps the quotation and your comment. This sample is from a classic book with a highlight at location 42.
+
+```markdown title="annotations/imports/ann_d500f2f77ecda2a76edb74faf3ce7ab4.md"
+---
+annotation_type: highlight
+color: yellow
+created_at: "2026-03-08T09:15:00.000Z"
+created_by: readwise
+id: ann_d500f2f77ecda2a76edb74faf3ce7ab4
+import:
+ key: v2:82016
+ namespace: readwise:reader
+ native:
+ color: yellow
+ created_at: "2026-03-08T09:15:00Z"
+ id: 82016
+ location: 42
+ location_type: location
+ note: Check the east bank after low tide.
+ text: The marsh drains from its creeks first.
+ service: readwise
+ supplemental: {}
+locator:
+ label: location 42
+source: "[[src_294663b42fbc2fca4ee3418f038f291b]]"
+tags: []
+target:
+ quote:
+ exact: The marsh drains from its creeks first.
+type: reader-annotation
+---
+> The marsh drains from its creeks first.
+
+Check the east bank after low tide.
+```
+
+Content files and the import’s metadata archive live under `files/reader/imports/`. To work with the notes after import, see [Reader’s collection layout](/apps/reader/data/) and [notes and citations](/apps/reader/notes/).
diff --git a/content/guides/zotero-annotations.md b/content/guides/zotero-annotations.md
new file mode 100644
index 0000000..8ef2343
--- /dev/null
+++ b/content/guides/zotero-annotations.md
@@ -0,0 +1,98 @@
+---
+title: Save Zotero annotations as Markdown notes
+description: Export a Zotero library with mdbase Reader’s experimental exporter. Import the bundle to get one Markdown record per annotation alongside the original PDF.
+section: guides
+---
+
+Zotero stores annotations made in its PDF reader in its database. Copying the PDF alone leaves those annotations behind. The mdbase Reader exporter brings the original file, the quotes and your comments across together. [How Zotero stores annotations](https://www.zotero.org/support/pdf_reader)
+
+You need Zotero **10.0.x** with a signed-in account, a browser that can select a whole folder (such as Chrome) and an mdbase collection. Try this experimental import with a new collection first. To read the results in Obsidian, use a [synced folder](/guides/obsidian-browser/) as the destination.
+
+## 1. Install the exporter
+
+On [Reader’s Zotero import page](https://reader.mdbase.dev/import/zotero), download the exporter ending in `.xpi`. In Zotero, open **Tools → Plugins**. Drag the XPI into that window or use the gear menu’s **Install Plugin From File…** option.
+
+
+
+## 2. Export My Library
+
+Finish syncing Zotero. Choose **Tools → Export for mdbase Reader…**. Select a parent folder outside Zotero’s data directory. Review the counts and missing-file warnings, then choose **Export library**. Leave Zotero open and avoid editing until the export finishes.
+
+The exporter includes all of **My Library** except trash. It skips group libraries. It cannot export just one selected collection. **Show folder** reveals the new child folder. Keep it private: it contains your library metadata, notes and attachments.
+
+## 3. Select the finished bundle in Reader
+
+Return to the import page and select the whole generated child folder. Its top level contains `manifest.json`. Reader checks the payload checksums before writing to your collection. If the export was cancelled, run the exporter again and choose the new completed bundle.
+
+
+
+## 4. Confirm the destination
+
+Choose your mdbase collection. If Reader asks for its types, review them and choose **Apply reviewed setup**. Choose **Check destination**, review how many records already exist, then choose **Import** on the button naming the destination. Leave the tab open until Reader finishes verification.
+
+
+
+
+
+## 5. Read the annotation on disk
+
+Open the synced folder. Under `annotations/imports/`, each annotation has a source link, its quoted passage and your comment. In this example, the PDF page and rectangle identify where the highlight belongs. The PDF stays under `files/reader/imports/`.
+
+```markdown title="annotations/imports/ann_628275aea0ca6dbafb6c43e1b41fb128.md"
+---
+annotation_type: highlight
+color: "#ffd400"
+created_at: "2026-03-14T09:00:00.000Z"
+created_by: zotero
+document:
+ file: "[[files/reader/imports/zotero_a5804395c8e7552b4cf67a738317c9cb/files/AN8H7C6W/east-bank.pdf]]"
+ file_id: "01a20c58-b0aa-742e-8f06-06b9c24c7ba5"
+ revision: sha256:d8d3916ccdd1bcc4d61d61bdcf5a4a40ed0a58d056339b235230af2988793029
+id: ann_628275aea0ca6dbafb6c43e1b41fb128
+import:
+ key: BH87Q4JZ
+ namespace: zotero:user:18471
+ native:
+ annotationColor: "#ffd400"
+ annotationComment: Compare with the unplanted bank.
+ annotationPageLabel: "1"
+ annotationPosition: "{\"pageIndex\":0,\"rects\":[[72,648,312,662]]}"
+ annotationText: Reeds collect fine sediment along the bank.
+ annotationType: highlight
+ key: BH87Q4JZ
+ parentItem: AN8H7C6W
+ service: zotero
+locator:
+ label: "1"
+source: "[[src_07f93bfdd5cc6dd96ac09f4febca3777]]"
+tags: []
+target:
+ pdf:
+ coordinate_space:
+ box: crop
+ origin: top_left
+ profile: embedpdf-selection-page-points-v1
+ page_index: 0
+ quad_points:
+ -
+ - 72
+ - 130
+ - 312
+ - 130
+ - 72
+ - 144
+ - 312
+ - 144
+ quote:
+ exact: Reeds collect fine sediment along the bank.
+ zotero:
+ position: "{\"pageIndex\":0,\"rects\":[[72,648,312,662]]}"
+ profile: zotero-annotation-position-v1
+type: reader-annotation
+---
+> Reeds collect fine sediment along the bank.
+
+Compare with the unplanted bank.
+```
+
+If a position cannot be converted for Reader’s viewer, Reader keeps Zotero’s position data. Check the import warnings before relying on jump-to-highlight links. For working with the imported text, see [Reader’s annotation guide](/apps/reader/annotating/). For highlights from an e-reader, use the [Readwise import](/guides/readwise-markdown/).
diff --git a/content/sdk/connect-quickstart.md b/content/sdk/connect-quickstart.md
index ca6e4aa..7e1162c 100644
--- a/content/sdk/connect-quickstart.md
+++ b/content/sdk/connect-quickstart.md
@@ -12,7 +12,7 @@ The finished app is about 150 lines. mdbase supplies sign-in, the collection pic
> **What you need**
>
-> Node 20 or later. You need no account to start: the app first runs in a collection kept in your browser. Signing in to an mdbase account comes at step 7. Developing on `http://localhost` needs an `@mdbase-dev/sdk` release after `0.1.0-beta.168`.
+> Node.js 24 or later and npm. You need no account to start: the app first runs in a collection kept in your browser. Signing in to an mdbase account comes at step 7.
## 1. Create the project {#project}
@@ -25,7 +25,7 @@ npm install --save-exact @mdbase-dev/sdk @mdbase-dev/ui @mdbase-dev/i18n \
npm install --save-dev --save-exact @mdbase-dev/connect-dev
```
-`@mdbase-dev/sdk` is the client. `@mdbase-dev/ui` has the sign-in and collection screens; `@mdbase-dev/i18n` and the two Lingui packages are its peer dependencies. `@mdbase-dev/connect-dev` checks the manifest at build time. The packages are in beta, so the versions are pinned exactly.
+`@mdbase-dev/sdk` is the client. `@mdbase-dev/ui` has the sign-in and collection screens; `@mdbase-dev/i18n` and the two Lingui packages are its peer dependencies. `@mdbase-dev/connect-dev` checks the manifest at build time.
Delete the template’s `src/App.tsx`, `src/App.css` and `src/index.css`; the steps below replace them. Then fix the development port, because the manifest names the exact origin the app is served from:
@@ -124,7 +124,7 @@ WORKLOG_ORIGIN=https://worklog.example.com npm run build
# Upload dist/ to the static host that serves https://worklog.example.com
```
-The build is a folder of static files. Host it anywhere that serves HTTPS at the origin you built for. There is no server component, no API key and no secret: the app holds nothing until a user signs in and approves it.
+The build is a folder of static files. Host it anywhere that serves HTTPS at the origin you built for. There is no server component, no API key and no secret: entries stay in this browser until the user connects a collection.
- The manifest’s `homepage` origin and the site’s origin must match exactly, including `www` and any port.
- The deployed app is a separate application from your localhost build. Users approve it on its own, and its storage is its own.
@@ -164,3 +164,5 @@ You can draw each phase yourself, or mount the shared screens into an element wi
- [Pending writes and sync status](/sdk/offline-sync/): show what is saved and what is waiting.
- [Contracts and adapters](/sdk/contracts/): work with records other apps also use.
- [Testing](/sdk/testing/): run the same code against an in-memory collection.
+
+[Build a personal web app without a backend](/guides/local-first-web-app/) runs the finished Worklog example and follows a saved entry into its Markdown representation.
diff --git a/content/sdk/operations.md b/content/sdk/operations.md
index 5dd9bda..5dbef64 100644
--- a/content/sdk/operations.md
+++ b/content/sdk/operations.md
@@ -157,3 +157,5 @@ for await (const f of db.files.list()) {
- Uploads go in 1 MiB chunks. To resume an interrupted upload, call `upload()` again with the same `transferId`. Pass `fileId` to replace an existing file.
- `download()` reads up to 64 MiB into memory. For anything larger, use `downloadStream()`, which also takes a byte `range`.
- `move()` and `delete()` take `ifRevision`, like records.
+
+[Query YAML frontmatter from the command line](/guides/query-frontmatter/) shows the same status filter against two files on disk.
diff --git a/docs/app-documentation.md b/docs/app-documentation.md
index b6e1ed3..47404ad 100644
--- a/docs/app-documentation.md
+++ b/docs/app-documentation.md
@@ -65,7 +65,7 @@ renderer in a browser). Each script's header gives the steps. Retake them when t
change.
On a phone each screenshot shows only the part of the window named for it in
-`AppShot.astro` (`crops`), and opening it shows the whole capture; set a crop when you add
+`src/markdown/app-shot.mjs` (`crops`), and opening it shows the whole capture; set a crop when you add
a screenshot.
The social share image, `public/og-card.jpg`, is drawn from the homepage's sky by
diff --git a/examples/worklog/package-lock.json b/examples/worklog/package-lock.json
index 06aa3e5..f9629b6 100644
--- a/examples/worklog/package-lock.json
+++ b/examples/worklog/package-lock.json
@@ -10,14 +10,14 @@
"dependencies": {
"@lingui/core": "6.9.0",
"@lingui/react": "6.9.0",
- "@mdbase-dev/i18n": "0.1.0-beta.166",
- "@mdbase-dev/sdk": "0.1.0-beta.168",
- "@mdbase-dev/ui": "0.1.0-beta.166",
+ "@mdbase-dev/i18n": "0.2.2",
+ "@mdbase-dev/sdk": "0.2.2",
+ "@mdbase-dev/ui": "0.2.3",
"react": "^19.2.0",
"react-dom": "^19.2.0"
},
"devDependencies": {
- "@mdbase-dev/connect-dev": "0.1.0-beta.166",
+ "@mdbase-dev/connect-dev": "0.1.37",
"@types/react": "^19.2.0",
"@types/react-dom": "^19.2.0",
"@vitejs/plugin-react": "^6.3.0",
@@ -691,24 +691,24 @@
}
},
"node_modules/@mdbase-dev/connect": {
- "version": "0.1.0-beta.166",
- "resolved": "https://registry.npmjs.org/@mdbase-dev/connect/-/connect-0.1.0-beta.166.tgz",
- "integrity": "sha512-LApM4CInwayn9ZJ/nUbOEKIPpbDutwYDerW3cpfECP8qDAJEGtbPeluDL1voHu7QZqInKjpKyWC4AJoJHvcGJg==",
+ "version": "0.1.37",
+ "resolved": "https://registry.npmjs.org/@mdbase-dev/connect/-/connect-0.1.37.tgz",
+ "integrity": "sha512-qZucpCkpx3goz5PtEjMOMQb/QbgBApzx5hibsLWDpzxdTMcbxgP0lBEEXVs5SOZLtT/QRSVSfYcfdChNVBI1NA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@mdbase-dev/connect-protocol": "0.1.0-beta.166"
+ "@mdbase-dev/connect-protocol": "0.1.37"
}
},
"node_modules/@mdbase-dev/connect-dev": {
- "version": "0.1.0-beta.166",
- "resolved": "https://registry.npmjs.org/@mdbase-dev/connect-dev/-/connect-dev-0.1.0-beta.166.tgz",
- "integrity": "sha512-olylXeMyvkZJkc2pYg4Gu3u5D0VdwLSG3Cet6OkVboJVyQ2r8hWueL2oU5HAKS/C13hRPW8/nxKwJsqu4hLtmA==",
+ "version": "0.1.37",
+ "resolved": "https://registry.npmjs.org/@mdbase-dev/connect-dev/-/connect-dev-0.1.37.tgz",
+ "integrity": "sha512-SSqTpeCEj/lbLQw90MQ8P7bjbRY+hX9KDlS8lGP+R+rlFrpuc8spumSe7VwQt7E/dyX8Y443ppD/r3U+ZFRzrg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@mdbase-dev/connect": "0.1.0-beta.166",
- "@mdbase-dev/connect-protocol": "0.1.0-beta.166",
+ "@mdbase-dev/connect": "0.1.37",
+ "@mdbase-dev/connect-protocol": "0.1.37",
"ajv": "^8.20.0",
"yaml": "^2.9.1"
},
@@ -717,9 +717,10 @@
}
},
"node_modules/@mdbase-dev/connect-protocol": {
- "version": "0.1.0-beta.166",
- "resolved": "https://registry.npmjs.org/@mdbase-dev/connect-protocol/-/connect-protocol-0.1.0-beta.166.tgz",
- "integrity": "sha512-owBhZOSO6DbDEgdMS2Jl3Nut0wPs4DjbHKh6gLgfDGooxrnQz9ZqTzDvwMiI2aDW3VGelFfIRUZY6XHrLzhCjQ==",
+ "version": "0.1.37",
+ "resolved": "https://registry.npmjs.org/@mdbase-dev/connect-protocol/-/connect-protocol-0.1.37.tgz",
+ "integrity": "sha512-/H/pHs2IkaXnCpmFo/XwW8WxpY+MIfruxf0bMhrQSSa7bTeurMZU2s1K0oNdYSGbZkdDKneKQDBguHBz7MCE2Q==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"@noble/hashes": "2.4.0",
@@ -727,9 +728,9 @@
}
},
"node_modules/@mdbase-dev/i18n": {
- "version": "0.1.0-beta.166",
- "resolved": "https://registry.npmjs.org/@mdbase-dev/i18n/-/i18n-0.1.0-beta.166.tgz",
- "integrity": "sha512-Ny4M+yQFf1D9CiSjoDLRB9xrVTKBbbxw6FhbHuGV4PAsXvZPWH5Tlq+vb+MsSXwXeXFhPYJBl6wffvUN/SZQNw==",
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/@mdbase-dev/i18n/-/i18n-0.2.2.tgz",
+ "integrity": "sha512-13OMRiIgJUwh6+XxchBRUQs6sC6InEZvOx9L7uvUWkKUnSjMMB67cBXwpxZCSRHBFVWeWnlW7BT1fhIF2BHdpg==",
"license": "MIT",
"dependencies": {
"@lingui/cli": "6.9.0",
@@ -748,15 +749,15 @@
}
},
"node_modules/@mdbase-dev/sdk": {
- "version": "0.1.0-beta.168",
- "resolved": "https://registry.npmjs.org/@mdbase-dev/sdk/-/sdk-0.1.0-beta.168.tgz",
- "integrity": "sha512-hwQhUAdknThDhGU3QxKVMBZlXZb/HnEl7dhuc9qPFUX75diTFPjyzAwPhJbbgnIh1c1PtT9aUyuUlaVtafZ/6Q==",
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/@mdbase-dev/sdk/-/sdk-0.2.2.tgz",
+ "integrity": "sha512-AWZKYrF4n4dl+ltwMWM7gHPL3AYGRburo3JODbJqnfBM123CSlSyBgWifAQR83mi3ZILtMJF1NkqeJw0GLdTlw==",
"bundleDependencies": [
"@mdbase-dev/connect-protocol"
],
"license": "MIT",
"dependencies": {
- "@mdbase-dev/connect-protocol": "file:vendor/mdbase-dev-connect-protocol-0.1.0-beta.145-e6e66bcd172f.tgz",
+ "@mdbase-dev/connect-protocol": "file:vendor/mdbase-dev-connect-protocol-0.1.0-beta.152-3d3f95b80c9a.tgz",
"@noble/ciphers": "2.4.0",
"@noble/curves": "2.4.0",
"@noble/hashes": "2.4.0"
@@ -766,7 +767,7 @@
}
},
"node_modules/@mdbase-dev/sdk/node_modules/@mdbase-dev/connect-protocol": {
- "version": "0.1.0-beta.145",
+ "version": "0.1.0-beta.152",
"inBundle": true,
"license": "MIT",
"dependencies": {
@@ -800,13 +801,15 @@
}
},
"node_modules/@mdbase-dev/ui": {
- "version": "0.1.0-beta.166",
- "resolved": "https://registry.npmjs.org/@mdbase-dev/ui/-/ui-0.1.0-beta.166.tgz",
- "integrity": "sha512-Bv6WfY/tT7f8wlZBu+Ll7KyjmL/pSjGQiKcQidlW82OWUmtX+fxAXbOPu8/OINNxyYS+8mWLaB0lCjBRZK0Exg==",
+ "version": "0.2.3",
+ "resolved": "https://registry.npmjs.org/@mdbase-dev/ui/-/ui-0.2.3.tgz",
+ "integrity": "sha512-TcAzVzqRSTh/yY64e3XBEH9jM+3C+yXFWfYabtf1HP7WoFOujd1mJVNaxLa+kQ8ul21FACG4eYQr4BWOVaErHA==",
"license": "MIT",
"dependencies": {
"@fontsource/azeret-mono": "^5.3.0",
- "@fontsource/ibm-plex-sans": "^5.3.0"
+ "@fontsource/ibm-plex-sans": "^5.3.0",
+ "katex": "0.19.1",
+ "pele": "1.13.0"
},
"peerDependencies": {
"@codemirror/commands": "^6.0.0",
@@ -814,10 +817,11 @@
"@codemirror/state": "^6.0.0",
"@codemirror/view": "^6.42.1",
"@lezer/common": "^1.0.0",
+ "@lezer/markdown": "^1.0.0",
"@lingui/core": "6.9.0",
"@lingui/react": "6.9.0",
"@mdbase-dev/i18n": "*",
- "@mdbase-dev/sdk": "*",
+ "@mdbase-dev/sdk": ">=0.1.0-beta.188",
"react": "^19.2.0",
"react-dom": "^19.2.0"
},
@@ -837,6 +841,9 @@
"@lezer/common": {
"optional": true
},
+ "@lezer/markdown": {
+ "optional": true
+ },
"@mdbase-dev/sdk": {
"optional": true
},
@@ -1782,6 +1789,31 @@
"node": ">=6"
}
},
+ "node_modules/katex": {
+ "version": "0.19.1",
+ "resolved": "https://registry.npmjs.org/katex/-/katex-0.19.1.tgz",
+ "integrity": "sha512-jG8uKntjSEcm2EpQOh0XturpPuuC9r3Sq5HLHdsFdWZT27E672SF19QEi+of0/YeOy15lDgRhKvr5614uRrEfA==",
+ "funding": [
+ "https://opencollective.com/katex",
+ "https://github.com/sponsors/katex"
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "commander": "^15.0.0"
+ },
+ "bin": {
+ "katex": "cli.js"
+ }
+ },
+ "node_modules/katex/node_modules/commander": {
+ "version": "15.1.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-15.1.0.tgz",
+ "integrity": "sha512-cgnQ88TRrWcC7pVq46RzJVRMktu3W2RcbnoidnfBsl1bmDCBwJS/udcIZpKoCrbAYYaCqsz1yZCVIgbIaU3ddQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=22.12.0"
+ }
+ },
"node_modules/leven": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz",
@@ -2255,6 +2287,15 @@
"url": "https://github.com/chalk/strip-ansi?sponsor=1"
}
},
+ "node_modules/pele": {
+ "version": "1.13.0",
+ "resolved": "https://registry.npmjs.org/pele/-/pele-1.13.0.tgz",
+ "integrity": "sha512-Ie8UKY9x00MsuR3jO6AzUwzK2Z6MIV3Tf4EDdITiuk8Uaz8K7g0R082WqsqNaSU8DdgkrRvZThzhit83mi/uiw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=20"
+ }
+ },
"node_modules/picocolors": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
@@ -2785,6 +2826,7 @@
"version": "2.9.1",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.1.tgz",
"integrity": "sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw==",
+ "dev": true,
"license": "ISC",
"bin": {
"yaml": "bin.mjs"
diff --git a/examples/worklog/package.json b/examples/worklog/package.json
index 9292631..cdb1cac 100644
--- a/examples/worklog/package.json
+++ b/examples/worklog/package.json
@@ -13,14 +13,14 @@
"dependencies": {
"@lingui/core": "6.9.0",
"@lingui/react": "6.9.0",
- "@mdbase-dev/i18n": "0.1.0-beta.166",
- "@mdbase-dev/sdk": "0.1.0-beta.168",
- "@mdbase-dev/ui": "0.1.0-beta.166",
+ "@mdbase-dev/i18n": "0.2.2",
+ "@mdbase-dev/sdk": "0.2.2",
+ "@mdbase-dev/ui": "0.2.3",
"react": "^19.2.0",
"react-dom": "^19.2.0"
},
"devDependencies": {
- "@mdbase-dev/connect-dev": "0.1.0-beta.166",
+ "@mdbase-dev/connect-dev": "0.1.37",
"@types/react": "^19.2.0",
"@types/react-dom": "^19.2.0",
"@vitejs/plugin-react": "^6.3.0",
diff --git a/examples/worklog/src/Worklog.tsx b/examples/worklog/src/Worklog.tsx
index a0326b3..1a974fd 100644
--- a/examples/worklog/src/Worklog.tsx
+++ b/examples/worklog/src/Worklog.tsx
@@ -79,8 +79,8 @@ export function Worklog({ db }: { db: MdbaseClient }) {
{entries.map((entry) => (
-
- {String(entry.frontmatter.get("summary"))}
+
+ {String(entry.frontmatter.summary)}
diff --git a/public/images/apps/editor-chooser-dark.webp b/public/images/apps/editor-chooser-dark.webp
new file mode 100644
index 0000000..f7598bb
Binary files /dev/null and b/public/images/apps/editor-chooser-dark.webp differ
diff --git a/public/images/apps/editor-chooser-light.webp b/public/images/apps/editor-chooser-light.webp
new file mode 100644
index 0000000..c78795b
Binary files /dev/null and b/public/images/apps/editor-chooser-light.webp differ
diff --git a/public/images/apps/editor-draft-dark.webp b/public/images/apps/editor-draft-dark.webp
new file mode 100644
index 0000000..b88e0dc
Binary files /dev/null and b/public/images/apps/editor-draft-dark.webp differ
diff --git a/public/images/apps/editor-draft-light.webp b/public/images/apps/editor-draft-light.webp
new file mode 100644
index 0000000..3ca5a5b
Binary files /dev/null and b/public/images/apps/editor-draft-light.webp differ
diff --git a/public/images/apps/editor-source-dark.webp b/public/images/apps/editor-source-dark.webp
new file mode 100644
index 0000000..47e3f15
Binary files /dev/null and b/public/images/apps/editor-source-dark.webp differ
diff --git a/public/images/apps/editor-source-light.webp b/public/images/apps/editor-source-light.webp
new file mode 100644
index 0000000..01499b8
Binary files /dev/null and b/public/images/apps/editor-source-light.webp differ
diff --git a/public/images/apps/editor-survey-dark.webp b/public/images/apps/editor-survey-dark.webp
new file mode 100644
index 0000000..f035dda
Binary files /dev/null and b/public/images/apps/editor-survey-dark.webp differ
diff --git a/public/images/apps/editor-survey-light.webp b/public/images/apps/editor-survey-light.webp
new file mode 100644
index 0000000..3fe29ab
Binary files /dev/null and b/public/images/apps/editor-survey-light.webp differ
diff --git a/public/images/apps/local-mcp-dark.webp b/public/images/apps/local-mcp-dark.webp
new file mode 100644
index 0000000..1f54057
Binary files /dev/null and b/public/images/apps/local-mcp-dark.webp differ
diff --git a/public/images/apps/local-mcp-light.webp b/public/images/apps/local-mcp-light.webp
new file mode 100644
index 0000000..17d55d8
Binary files /dev/null and b/public/images/apps/local-mcp-light.webp differ
diff --git a/public/images/apps/mcp-permissions-dark.webp b/public/images/apps/mcp-permissions-dark.webp
new file mode 100644
index 0000000..2ca257b
Binary files /dev/null and b/public/images/apps/mcp-permissions-dark.webp differ
diff --git a/public/images/apps/mcp-permissions-light.webp b/public/images/apps/mcp-permissions-light.webp
new file mode 100644
index 0000000..7900b2d
Binary files /dev/null and b/public/images/apps/mcp-permissions-light.webp differ
diff --git a/public/images/apps/obsidian-survey-dark.webp b/public/images/apps/obsidian-survey-dark.webp
new file mode 100644
index 0000000..37821ec
Binary files /dev/null and b/public/images/apps/obsidian-survey-dark.webp differ
diff --git a/public/images/apps/obsidian-survey-light.webp b/public/images/apps/obsidian-survey-light.webp
new file mode 100644
index 0000000..bc5bd1d
Binary files /dev/null and b/public/images/apps/obsidian-survey-light.webp differ
diff --git a/public/images/apps/query-folder-dark.webp b/public/images/apps/query-folder-dark.webp
new file mode 100644
index 0000000..1fcb369
Binary files /dev/null and b/public/images/apps/query-folder-dark.webp differ
diff --git a/public/images/apps/query-folder-light.webp b/public/images/apps/query-folder-light.webp
new file mode 100644
index 0000000..7d65e38
Binary files /dev/null and b/public/images/apps/query-folder-light.webp differ
diff --git a/public/images/apps/query-read-dark.webp b/public/images/apps/query-read-dark.webp
new file mode 100644
index 0000000..4127182
Binary files /dev/null and b/public/images/apps/query-read-dark.webp differ
diff --git a/public/images/apps/query-read-light.webp b/public/images/apps/query-read-light.webp
new file mode 100644
index 0000000..c574ca8
Binary files /dev/null and b/public/images/apps/query-read-light.webp differ
diff --git a/public/images/apps/query-status-dark.webp b/public/images/apps/query-status-dark.webp
new file mode 100644
index 0000000..05f9df3
Binary files /dev/null and b/public/images/apps/query-status-dark.webp differ
diff --git a/public/images/apps/query-status-light.webp b/public/images/apps/query-status-light.webp
new file mode 100644
index 0000000..39f0fe9
Binary files /dev/null and b/public/images/apps/query-status-light.webp differ
diff --git a/public/images/apps/readwise-input-dark.webp b/public/images/apps/readwise-input-dark.webp
new file mode 100644
index 0000000..0cddac0
Binary files /dev/null and b/public/images/apps/readwise-input-dark.webp differ
diff --git a/public/images/apps/readwise-input-light.webp b/public/images/apps/readwise-input-light.webp
new file mode 100644
index 0000000..8f524cd
Binary files /dev/null and b/public/images/apps/readwise-input-light.webp differ
diff --git a/public/images/apps/readwise-preview-dark.webp b/public/images/apps/readwise-preview-dark.webp
new file mode 100644
index 0000000..5eb4742
Binary files /dev/null and b/public/images/apps/readwise-preview-dark.webp differ
diff --git a/public/images/apps/readwise-preview-light.webp b/public/images/apps/readwise-preview-light.webp
new file mode 100644
index 0000000..7523d27
Binary files /dev/null and b/public/images/apps/readwise-preview-light.webp differ
diff --git a/public/images/apps/readwise-result-dark.webp b/public/images/apps/readwise-result-dark.webp
new file mode 100644
index 0000000..3a40beb
Binary files /dev/null and b/public/images/apps/readwise-result-dark.webp differ
diff --git a/public/images/apps/readwise-result-light.webp b/public/images/apps/readwise-result-light.webp
new file mode 100644
index 0000000..86dfcb7
Binary files /dev/null and b/public/images/apps/readwise-result-light.webp differ
diff --git a/public/images/apps/survey-note-dark.webp b/public/images/apps/survey-note-dark.webp
new file mode 100644
index 0000000..f38f91e
Binary files /dev/null and b/public/images/apps/survey-note-dark.webp differ
diff --git a/public/images/apps/survey-note-light.webp b/public/images/apps/survey-note-light.webp
new file mode 100644
index 0000000..16b23fa
Binary files /dev/null and b/public/images/apps/survey-note-light.webp differ
diff --git a/public/images/apps/thesis-export-dark.webp b/public/images/apps/thesis-export-dark.webp
new file mode 100644
index 0000000..8185947
Binary files /dev/null and b/public/images/apps/thesis-export-dark.webp differ
diff --git a/public/images/apps/thesis-export-light.webp b/public/images/apps/thesis-export-light.webp
new file mode 100644
index 0000000..1ea5f9c
Binary files /dev/null and b/public/images/apps/thesis-export-light.webp differ
diff --git a/public/images/apps/thesis-layout-dark.webp b/public/images/apps/thesis-layout-dark.webp
new file mode 100644
index 0000000..dc7978b
Binary files /dev/null and b/public/images/apps/thesis-layout-dark.webp differ
diff --git a/public/images/apps/thesis-layout-light.webp b/public/images/apps/thesis-layout-light.webp
new file mode 100644
index 0000000..52d1fd4
Binary files /dev/null and b/public/images/apps/thesis-layout-light.webp differ
diff --git a/public/images/apps/thesis-source-dark.webp b/public/images/apps/thesis-source-dark.webp
new file mode 100644
index 0000000..67f5c7b
Binary files /dev/null and b/public/images/apps/thesis-source-dark.webp differ
diff --git a/public/images/apps/thesis-source-light.webp b/public/images/apps/thesis-source-light.webp
new file mode 100644
index 0000000..bbd1a42
Binary files /dev/null and b/public/images/apps/thesis-source-light.webp differ
diff --git a/public/images/apps/vault-sync-dark.webp b/public/images/apps/vault-sync-dark.webp
new file mode 100644
index 0000000..4c5da9a
Binary files /dev/null and b/public/images/apps/vault-sync-dark.webp differ
diff --git a/public/images/apps/vault-sync-light.webp b/public/images/apps/vault-sync-light.webp
new file mode 100644
index 0000000..13b5256
Binary files /dev/null and b/public/images/apps/vault-sync-light.webp differ
diff --git a/public/images/apps/worklog-form-dark.webp b/public/images/apps/worklog-form-dark.webp
new file mode 100644
index 0000000..1f2f649
Binary files /dev/null and b/public/images/apps/worklog-form-dark.webp differ
diff --git a/public/images/apps/worklog-form-light.webp b/public/images/apps/worklog-form-light.webp
new file mode 100644
index 0000000..bcb1c9e
Binary files /dev/null and b/public/images/apps/worklog-form-light.webp differ
diff --git a/public/images/apps/worklog-reload-dark.webp b/public/images/apps/worklog-reload-dark.webp
new file mode 100644
index 0000000..3e048a3
Binary files /dev/null and b/public/images/apps/worklog-reload-dark.webp differ
diff --git a/public/images/apps/worklog-reload-light.webp b/public/images/apps/worklog-reload-light.webp
new file mode 100644
index 0000000..6ab285e
Binary files /dev/null and b/public/images/apps/worklog-reload-light.webp differ
diff --git a/public/images/apps/worklog-setup-dark.webp b/public/images/apps/worklog-setup-dark.webp
new file mode 100644
index 0000000..16c6b60
Binary files /dev/null and b/public/images/apps/worklog-setup-dark.webp differ
diff --git a/public/images/apps/worklog-setup-light.webp b/public/images/apps/worklog-setup-light.webp
new file mode 100644
index 0000000..622acfb
Binary files /dev/null and b/public/images/apps/worklog-setup-light.webp differ
diff --git a/public/images/apps/zotero-input-dark.webp b/public/images/apps/zotero-input-dark.webp
new file mode 100644
index 0000000..1cd79d3
Binary files /dev/null and b/public/images/apps/zotero-input-dark.webp differ
diff --git a/public/images/apps/zotero-input-light.webp b/public/images/apps/zotero-input-light.webp
new file mode 100644
index 0000000..95bd3bf
Binary files /dev/null and b/public/images/apps/zotero-input-light.webp differ
diff --git a/public/images/apps/zotero-preview-dark.webp b/public/images/apps/zotero-preview-dark.webp
new file mode 100644
index 0000000..a2d8f5c
Binary files /dev/null and b/public/images/apps/zotero-preview-dark.webp differ
diff --git a/public/images/apps/zotero-preview-light.webp b/public/images/apps/zotero-preview-light.webp
new file mode 100644
index 0000000..d697744
Binary files /dev/null and b/public/images/apps/zotero-preview-light.webp differ
diff --git a/public/images/apps/zotero-result-dark.webp b/public/images/apps/zotero-result-dark.webp
new file mode 100644
index 0000000..7ff5600
Binary files /dev/null and b/public/images/apps/zotero-result-dark.webp differ
diff --git a/public/images/apps/zotero-result-light.webp b/public/images/apps/zotero-result-light.webp
new file mode 100644
index 0000000..d365972
Binary files /dev/null and b/public/images/apps/zotero-result-light.webp differ
diff --git a/public/videos/editor-note.jpg b/public/videos/editor-note.jpg
new file mode 100644
index 0000000..5fc60fe
Binary files /dev/null and b/public/videos/editor-note.jpg differ
diff --git a/public/videos/editor-note.mp4 b/public/videos/editor-note.mp4
new file mode 100644
index 0000000..0bad559
Binary files /dev/null and b/public/videos/editor-note.mp4 differ
diff --git a/public/videos/mcp-read.jpg b/public/videos/mcp-read.jpg
new file mode 100644
index 0000000..bf9da14
Binary files /dev/null and b/public/videos/mcp-read.jpg differ
diff --git a/public/videos/mcp-read.mp4 b/public/videos/mcp-read.mp4
new file mode 100644
index 0000000..dee2ac0
Binary files /dev/null and b/public/videos/mcp-read.mp4 differ
diff --git a/public/videos/query-notes.jpg b/public/videos/query-notes.jpg
new file mode 100644
index 0000000..c813970
Binary files /dev/null and b/public/videos/query-notes.jpg differ
diff --git a/public/videos/query-notes.mp4 b/public/videos/query-notes.mp4
new file mode 100644
index 0000000..8e20b31
Binary files /dev/null and b/public/videos/query-notes.mp4 differ
diff --git a/public/videos/readwise.jpg b/public/videos/readwise.jpg
new file mode 100644
index 0000000..fb79122
Binary files /dev/null and b/public/videos/readwise.jpg differ
diff --git a/public/videos/readwise.mp4 b/public/videos/readwise.mp4
new file mode 100644
index 0000000..cd2527c
Binary files /dev/null and b/public/videos/readwise.mp4 differ
diff --git a/public/videos/thesis-cite.jpg b/public/videos/thesis-cite.jpg
new file mode 100644
index 0000000..9bc32f8
Binary files /dev/null and b/public/videos/thesis-cite.jpg differ
diff --git a/public/videos/thesis-cite.mp4 b/public/videos/thesis-cite.mp4
new file mode 100644
index 0000000..a019672
Binary files /dev/null and b/public/videos/thesis-cite.mp4 differ
diff --git a/public/videos/worklog-save.jpg b/public/videos/worklog-save.jpg
new file mode 100644
index 0000000..bd08289
Binary files /dev/null and b/public/videos/worklog-save.jpg differ
diff --git a/public/videos/worklog-save.mp4 b/public/videos/worklog-save.mp4
new file mode 100644
index 0000000..6ca68cd
Binary files /dev/null and b/public/videos/worklog-save.mp4 differ
diff --git a/public/videos/zotero.jpg b/public/videos/zotero.jpg
new file mode 100644
index 0000000..fdf15d6
Binary files /dev/null and b/public/videos/zotero.jpg differ
diff --git a/public/videos/zotero.mp4 b/public/videos/zotero.mp4
new file mode 100644
index 0000000..0398053
Binary files /dev/null and b/public/videos/zotero.mp4 differ
diff --git a/scripts/app-docs.test.mjs b/scripts/app-docs.test.mjs
index b94c668..0d0168a 100644
--- a/scripts/app-docs.test.mjs
+++ b/scripts/app-docs.test.mjs
@@ -6,6 +6,13 @@ const root = new URL("../", import.meta.url);
const read = (path) => readFileSync(new URL(path, root), "utf8");
const videos = JSON.parse(read("src/data/doc-videos.json"));
const placements = {
+ "worklog-save": "content/guides/local-first-web-app.md",
+ "query-notes": "content/guides/query-frontmatter.md",
+ "thesis-cite": "content/guides/markdown-thesis.md",
+ "zotero": "content/guides/zotero-annotations.md",
+ "editor-note": "content/guides/obsidian-browser.md",
+ "readwise": "content/guides/readwise-markdown.md",
+ "mcp-read": "content/guides/claude-obsidian.md",
"reader-markdown": "content/apps/reader/index.md",
"extension-capture": "content/apps/reader/extension.md",
"reader-library": "content/apps/reader/library.md",
@@ -51,7 +58,7 @@ test("Every documentation navigation entry resolves to a site page", () => {
assert.match(sections, /meta: { label: "@mdbase-dev\/sdk"/);
});
-test("Five sample recordings have local playable files, posters and text equivalents", () => {
+test("Sample recordings have local playable files, posters and text equivalents", () => {
assert.deepEqual(Object.keys(videos).sort(), Object.keys(placements).sort());
for (const [name, metadata] of Object.entries(videos)) {
const mp4 = readFileSync(new URL(`public/videos/${name}.mp4`, root));
diff --git a/scripts/build-llms.mjs b/scripts/build-llms.mjs
index 1caf7d8..e211939 100644
--- a/scripts/build-llms.mjs
+++ b/scripts/build-llms.mjs
@@ -19,6 +19,7 @@ const origin = (process.env.MDBASE_SITE_ORIGIN ?? "https://mdbase.dev").replace(
const sections = [
{ title: "Product", match: (path) => ["/", "/connect/", "/downloads/", "/beta/"].includes(path) },
{ title: "Applications", match: (path) => path.startsWith("/apps/") },
+ { title: "Guides", match: (path) => path.startsWith("/guides/") },
{ title: "SDK", match: (path) => path.startsWith("/sdk/") },
{
title: "Specification, runtime and contracts",
diff --git a/scripts/build-sdk-api.mjs b/scripts/build-sdk-api.mjs
index 1ab40ae..2f5ba58 100644
--- a/scripts/build-sdk-api.mjs
+++ b/scripts/build-sdk-api.mjs
@@ -25,7 +25,7 @@ const ENTRIES = [
"createMdbase",
"Mdbase",
"MdbaseApplicationDeclaration",
- "MdbaseConnectOptions",
+ "MdbaseOptions",
"MdbaseSnapshot",
"MdbasePhase",
"MdbaseApplicationConnection",
@@ -34,21 +34,19 @@ const ENTRIES = [
"MdbaseAccessRequest",
"MdbaseAccessResult",
"MdbaseTransferPlan",
- "connect",
- "ClientOptions",
"MdbaseClient",
"Query",
"CreateInput",
"UpdateInput",
"WriteOptions",
"Write",
- "SaveResult",
+ "RecordWrite",
"LiveQuery",
"RecordView",
"Receipt",
"MdbaseError",
"isMdbaseError",
- "summarizeStatus",
+ "syncStatusText",
],
},
{
@@ -61,6 +59,7 @@ const ENTRIES = [
title: "Testing",
featured: ["MemoryReplica", "createApplicationFixture"],
},
+ { specifier: "@mdbase-dev/sdk/thin-client", title: "Thin client", featured: ["connect", "ClientOptions"] },
{ specifier: "@mdbase-dev/sdk/node", title: "Node connectors", featured: [] },
{ specifier: "@mdbase-dev/sdk/manifest", title: "Manifest", featured: [] },
{ specifier: "@mdbase-dev/sdk/notifications", title: "Notifications", featured: [] },
diff --git a/src/components/AppShot.astro b/src/components/AppShot.astro
index 45d841e..80c3adc 100644
--- a/src/components/AppShot.astro
+++ b/src/components/AppShot.astro
@@ -1,177 +1,14 @@
---
-// A screenshot of a real app in a quiet window frame. Each app is captured in
-// light and dark (public/images/apps/-light|dark.webp, 1600×1000 from a
-// 1120×700 window at 2×), and the frame shows the capture matching the site's
-// theme. The hidden capture is display: none, so the browser never loads it.
-// The Connect and desktop captures come from the apps' own review fixtures (a made-up
-// account), taken the same way with scripts/screenshots; see docs/app-documentation.md.
+import { shotWindow, type hosts } from "../markdown/app-shot.mjs";
+
interface Props {
- name:
- | "tasknotes" | "editor" | "reader" | "writer"
- | "connect-approve" | "connect-collections" | "connect-sharing"
- | "desktop-home" | "desktop-collections";
+ name: keyof typeof hosts;
alt: string;
eager?: boolean;
}
-
-// The window bar shows a web app's address, or the desktop app's name.
-const hosts = {
- tasknotes: "app.tasknotes.dev",
- editor: "editor.mdbase.dev",
- reader: "reader.mdbase.dev",
- writer: "writer.mdbase.dev",
- "connect-approve": "connect.mdbase.dev",
- "connect-collections": "connect.mdbase.dev",
- "connect-sharing": "connect.mdbase.dev",
- "desktop-home": "mdbase Connect",
- "desktop-collections": "mdbase Connect"
-} as const;
-
-// On a phone a whole window is too small to read, so each capture names the part
-// worth showing there: its left and top edges, width and height, as fractions of
-// the capture. Opening the screenshot shows all of it.
-const crops = {
- tasknotes: [0.2, 0.02, 0.62, 0.62],
- editor: [0.25, 0, 0.62, 0.62],
- reader: [0.2, 0.08, 0.6, 0.6],
- writer: [0, 0, 0.62, 0.62],
- "connect-approve": [0.19, 0.09, 0.62, 0.89],
- "connect-collections": [0.21, 0.02, 0.62, 0.62],
- "connect-sharing": [0.19, 0.52, 0.79, 0.36],
- "desktop-home": [0.22, 0.03, 0.4, 0.5],
- "desktop-collections": [0.22, 0.03, 0.6, 0.5]
-} as const;
-
-const { name, alt, eager = false } = Astro.props;
-const hasCaption = Astro.slots.has("caption");
-const loading = eager ? "eager" : "lazy";
-const [cropX, cropY, cropW, cropH] = crops[name];
-const crop = `--crop-x: ${cropX}; --crop-y: ${cropY}; --crop-w: ${cropW}; --crop-ratio: ${((1.6 * cropW) / cropH).toFixed(3)};`;
+const { name, alt, eager } = Astro.props;
---
-
-
diff --git a/src/content.config.ts b/src/content.config.ts
index 33a0873..66491d4 100644
--- a/src/content.config.ts
+++ b/src/content.config.ts
@@ -11,7 +11,7 @@ const docs = defineCollection({
.object({
title: z.string().min(1),
description: z.string().min(1),
- section: z.enum(["sdk", "mcp", "editor", "reader", "writer"])
+ section: z.enum(["sdk", "mcp", "editor", "reader", "writer", "guides"])
})
.strict()
});
diff --git a/src/data/doc-videos.json b/src/data/doc-videos.json
index 283d075..aa83b79 100644
--- a/src/data/doc-videos.json
+++ b/src/data/doc-videos.json
@@ -65,5 +65,96 @@
"The chapters are reordered in Outline; their order and chapter numbering change in the preview.",
"Add chapter creates Afterlives and embeds it after the existing chapters. Writing in the new record produces another typeset chapter."
]
+ },
+ "mcp-read": {
+ "title": "Approve read access in Connect",
+ "duration": "0:06",
+ "width": 1120,
+ "height": 700,
+ "description": "Review what the connector can do in the Field research collection.",
+ "steps": [
+ "The review screen identifies the mdbase connector and Field research.",
+ "Create and edit permissions are cleared. Read access stays required.",
+ "The file scope covers the visible folders in this collection.",
+ "Allow access confirms the selection. Connect shows the approved collection."
+ ]
+ },
+ "readwise": {
+ "title": "Confirm the Readwise import",
+ "duration": "0:08",
+ "width": 1120,
+ "height": 700,
+ "description": "Check the record counts before importing into Marsh library.",
+ "steps": [
+ "Reader shows a preview of the sample library.",
+ "Check destination counts new and previously imported records.",
+ "The import button names Marsh library. Selecting it confirms the job.",
+ "Reader verifies the created records and offers to open the imported collection."
+ ]
+ },
+ "editor-note": {
+ "title": "Inspect the complete Markdown source",
+ "duration": "0:08",
+ "width": 1120,
+ "height": 700,
+ "description": "Open the properties of a survey note and check its saved status field.",
+ "steps": [
+ "Editor shows East bank survey after the count is added.",
+ "Note properties opens the properties panel.",
+ "Property options opens the menu with Edit as source.",
+ "The source contains the status property, heading, field instruction and count."
+ ]
+ },
+ "zotero": {
+ "title": "Confirm the Zotero import",
+ "duration": "0:07",
+ "width": 1120,
+ "height": 700,
+ "description": "Check the record counts before importing into Marsh library.",
+ "steps": [
+ "Reader shows a preview of the sample library.",
+ "Check destination counts new and previously imported records.",
+ "The import button names Marsh library. Selecting it confirms the job.",
+ "Reader verifies the created records and offers to open the imported collection."
+ ]
+ },
+ "thesis-cite": {
+ "title": "Cite a source in a thesis",
+ "duration": "0:08",
+ "width": 1120,
+ "height": 700,
+ "description": "Writer inserts a Reader citekey into an original thesis passage and formats it in the preview.",
+ "steps": [
+ "Find Darwin’s coral reef study in Sources.",
+ "Insert its citekey after the claim.",
+ "Check the formatted citation in the thesis preview.",
+ "Open the export formats and select the Pandoc bundle."
+ ]
+ },
+ "query-notes": {
+ "title": "Query two survey notes by status",
+ "duration": "0:05",
+ "width": 1120,
+ "height": 700,
+ "description": "The CLI prints a different relative path for each status in the sample folder.",
+ "steps": [
+ "Run a query for awaiting-count.",
+ "Read the returned path to the east bank note.",
+ "Change the status to counted and run the query.",
+ "Read the returned path to the west bank note."
+ ]
+ },
+ "worklog-save": {
+ "title": "Save a browser-only work log entry",
+ "duration": "0:06",
+ "width": 1120,
+ "height": 700,
+ "description": "Worklog keeps an entry in the same browser across a page reload.",
+ "steps": [
+ "Fill in the date, summary and minutes.",
+ "Add the entry.",
+ "Reload Worklog at the same address.",
+ "Find the dated summary in the list again."
+ ]
}
}
diff --git a/src/data/docs-sections.ts b/src/data/docs-sections.ts
index 1b25021..07dc075 100644
--- a/src/data/docs-sections.ts
+++ b/src/data/docs-sections.ts
@@ -1,24 +1,41 @@
import mcpTools from "./mcp-tools.json";
-export type DocsSectionId = "sdk" | "mcp" | "editor" | "reader" | "writer";
+export type DocsSectionId = "sdk" | "mcp" | "editor" | "reader" | "writer" | "guides";
type DocLink = { href: string; label: string; key: string };
type DocsSection = {
label: string;
navLabel: string;
- headerCurrent: "sdk" | "apps";
+ headerCurrent?: "sdk" | "apps";
sourcePath: string;
- meta: { label: string; value: string };
+ meta?: { label: string; value: string };
groups: Array<{ label: string; docs: DocLink[] }>;
};
export const docsSections: Record = {
+ guides: {
+ label: "Guides",
+ navLabel: "Guides",
+ sourcePath: "content/guides",
+ groups: [{ label: "How-to guides", docs: [
+ { href: "/guides/", label: "All guides", key: "guides" },
+ { href: "/guides/claude-obsidian/", label: "Claude and Obsidian", key: "claude-obsidian" },
+ { href: "/guides/readwise-markdown/", label: "Readwise highlights", key: "readwise-markdown" },
+ { href: "/guides/obsidian-browser/", label: "Obsidian in a browser", key: "obsidian-browser" },
+ { href: "/guides/chatgpt-markdown/", label: "ChatGPT and Markdown", key: "chatgpt-markdown" },
+ { href: "/guides/zotero-annotations/", label: "Zotero annotations", key: "zotero-annotations" },
+ { href: "/guides/obsidian-mcp-servers/", label: "Local or hosted MCP", key: "obsidian-mcp-servers" },
+ { href: "/guides/markdown-thesis/", label: "Thesis citations", key: "markdown-thesis" },
+ { href: "/guides/query-frontmatter/", label: "Query frontmatter", key: "query-frontmatter" },
+ { href: "/guides/local-first-web-app/", label: "Local-first web app", key: "local-first-web-app" }
+ ] }]
+ },
sdk: {
label: "SDK",
navLabel: "SDK documentation",
headerCurrent: "sdk",
sourcePath: "src/pages/sdk",
- meta: { label: "@mdbase-dev/sdk", value: "Beta on npm" },
+ meta: { label: "@mdbase-dev/sdk", value: "Published on npm" },
groups: [
{
label: "Start",
diff --git a/src/data/sdk-api.json b/src/data/sdk-api.json
index f6f57bb..16fa22c 100644
--- a/src/data/sdk-api.json
+++ b/src/data/sdk-api.json
@@ -1,6 +1,6 @@
{
"package": "@mdbase-dev/sdk",
- "version": "0.1.0-beta.168",
+ "version": "0.2.2",
"entries": [
{
"specifier": "@mdbase-dev/sdk",
@@ -10,7 +10,7 @@
"name": "createMdbase",
"kind": "function",
"description": "Create the app's mdbase entry. Construction does no IO; `start()` begins.",
- "signature": "function createMdbase(declaration: MdbaseApplicationDeclaration, options?: MdbaseConnectOptions): Mdbase;"
+ "signature": "function createMdbase(declaration: MdbaseApplicationDeclaration, options?: MdbaseOptions): Mdbase;"
},
{
"name": "Mdbase",
@@ -44,10 +44,9 @@
"description": "Call from the user gesture: choose a Cloud copy or Private collection,\nor create a collection in Connect. No current collection is preselected."
},
{
- "name": "addPrivateCollection",
- "signature": "addPrivateCollection(options?: MdbaseApplicationRequestOptions): Promise",
- "description": "",
- "deprecated": "Use `addCollection`. This is the same unified chooser, with the same options and no preselected collection."
+ "name": "cancelAuthorization",
+ "signature": "cancelAuthorization(options?: MdbaseApplicationRequestOptions): Promise",
+ "description": "Stop waiting for Connect (phase `authorizing`): signed out again, back to\nwork before connecting (the `unsynced` option), or the collection list when\nsigned in. A reload no longer resumes the wait; the next sign-in continues\nthe same request. Resolves unchanged in any other phase."
},
{
"name": "refreshCollectionList",
@@ -87,12 +86,17 @@
{
"name": "deleteCollection",
"signature": "deleteCollection(collectionId: string, options: MdbaseCollectionDeleteOptions): Promise",
- "description": ""
+ "description": "Owner only, from an explicit confirmation: delete a collection for\neveryone, on every device and app. `confirmName` is the name the person\ntyped; it must equal the collection's current name. A refusal rejects\nwith a `collection_delete_*` code for `describeError` and changes nothing\nlocally. On success the collection leaves `collections`."
},
{
"name": "requestAccess",
"signature": "requestAccess(request: MdbaseAccessRequest, options: MdbaseAccessRequestOptions): Promise",
- "description": ""
+ "description": "Call from the user gesture the first time the app needs an optional file\naction (for example adding an image). Resolves `granted` at once when it\nis already allowed; otherwise opens Connect for the open collection with\nyour one-line reason. No reload: the connection and app state stay. An\naction the manifest does not declare rejects with `access_undeclared`.\nFile writes the person has not allowed reject with `access_required`."
+ },
+ {
+ "name": "unlock",
+ "signature": "unlock(collectionId: string, secret: MdbaseUnlockSecret, options?: MdbaseApplicationRequestOptions): Promise",
+ "description": "Unlock the open Private collection (`phase.kind === \"needs_unlock\"` with\n`mode: \"password\"`) with the encryption password or the recovery key.\nResolves once the attempt settled: opened, or still `needs_unlock` with\n`phase.problem` set. Pass the typed value straight through; keep no copy."
},
{
"name": "assess",
@@ -101,7 +105,7 @@
},
{
"name": "setup",
- "signature": "readonly setup: { plan(options?: MdbaseSetupPlanOptions): Promise; apply(plan: MdbaseSetupPlan, options?: MdbaseApplicationRequestOptions): Promise; }",
+ "signature": "readonly setup: { /** Plan setup of the open collection. Changes no collection data (it may * settle the local journal of an earlier apply); call again after any decision. */ plan(options?: MdbaseSetupPlanOptions): Promise; /** Apply a plan from `plan` unchanged, as one guarded mutation. */ apply(plan: MdbaseSetupPlan, options?: MdbaseApplicationRequestOptions): Promise; }",
"description": ""
},
{
@@ -117,7 +121,7 @@
{
"name": "signOut",
"signature": "signOut(options?: MdbaseSignOutOptions): Promise",
- "description": "Sign out of mdbase on this device (see `MdbaseApplication.signOut`).\nRejects with `sign_out_pending_writes` while changes are still saving,\nunless `{discard: true}`."
+ "description": "Sign out of mdbase on this device: ends the server session and removes\nthis browser's sign-in data, keys and cached collections for the account.\nRejects with `sign_out_pending_writes` (a `conflict`) while changes have not\nreached mdbase, unless `{discard: true}`. Resolves signed out; Sign in works\nagain without a reload, and a reload stays signed out. A server sign-out\nthat could not complete (offline) still signs this device out; it shows\nin `signOutResult`."
},
{
"name": "close",
@@ -128,11 +132,6 @@
"name": "unsynced",
"signature": "readonly unsynced: { /** Open the app's unsynced collection in this tab, creating it on first * use: for \"Continue without connecting\". Signed out with nothing * requested, `start()` already does this. */ open(options?: MdbaseApplicationRequestOptions): Promise; /** Compare the unsynced collection with the open (ready) collection: what * would be created, what an earlier transfer already brought, what `map` * leaves out, renamed paths and types the destination lacks. Writes nothing. */ planTransfer(options?: MdbaseTransferPlanOptions): Promise; /** Create a plan's records in the open collection, keeping their IDs. * Interrupted? Plan and transfer again: only what is missing is created. */ transfer(plan: MdbaseTransferPlan, options?: MdbaseTransferOptions): Promise; /** Erase the unsynced collection from this browser. Ask the person to * confirm first: it cannot be undone. A tab showing it continues in a new, * empty one. */ discard(options?: MdbaseApplicationRequestOptions): Promise; }",
"description": "Work before connecting (the `unsynced` option)."
- },
- {
- "name": "application",
- "signature": "readonly application: MdbaseApplication",
- "description": "The underlying application, for code written against `MdbaseConnect`."
}
]
},
@@ -180,10 +179,10 @@
]
},
{
- "name": "MdbaseConnectOptions",
+ "name": "MdbaseOptions",
"kind": "interface",
"description": "",
- "signature": "interface MdbaseConnectOptions",
+ "signature": "interface MdbaseOptions",
"members": [
{
"name": "signIn",
@@ -195,6 +194,11 @@
"signature": "readonly followVisibility?: boolean",
"description": "Drive `setForeground` from `document.visibilityState`, and sync at once\nwhen the page regains focus or the network comes back. A hidden page only\nfinishes sending pending writes (for at most two minutes). Default true;\nfalse leaves `setForeground` to the app."
},
+ {
+ "name": "messages",
+ "signature": "readonly messages?: DescribeErrorOptions[\"messages\"]",
+ "description": "Copy for `phase.problem` and the signed-out notice in the person's\nlanguage: replacement `title`, `message` and `actionLabel` by problem key,\nas `describeError` takes them. A key left out keeps the English copy."
+ },
{
"name": "readiness",
"signature": "readonly readiness?: { readonly typeIssues?: \"block\" | \"degrade\"; }",
@@ -209,6 +213,21 @@
"name": "unsynced",
"signature": "readonly unsynced?: boolean",
"description": "Let people start working before they sign in or connect a collection.\nSigned out with no collection requested, the app opens its unsynced\ncollection (`phase.kind === \"unsynced\"`): saved only in this browser,\nnever listed in `collections`. Default false."
+ },
+ {
+ "name": "urlSelection",
+ "signature": "readonly urlSelection?: boolean",
+ "description": "Keep the requested collection in the page URL (`?collection=`): a\nlink or reload opens it, and Back/forward switch collections. Default\ntrue; false for a page with no URL of its own, such as a `blob:` document\nembedded in another app. The URL is then never read or written, and the\napp chooses with `select`, `approve` and `chooseAnother`."
+ },
+ {
+ "name": "worker",
+ "signature": "readonly worker?: (url: string) => Worker",
+ "description": "Construct the SDK's module Worker yourself, where the page cannot load\nit by URL as a secure context (for example a `blob:` document inside a\nmobile WebView). Called with the URL the SDK would load; return a module\nWorker that runs that script's exact bytes, such as one from a `blob:`\nURL of them. The Worker still loads the native assets from beside that\nURL and checks them against the SDK's pins. A factory that throws or\nreturns no Worker fails with `application_worker_unavailable`. Default:\n`new Worker(url, {type: \"module\"})`."
+ },
+ {
+ "name": "session",
+ "signature": "readonly session?: { readonly build: string; readonly host?: boolean; }",
+ "description": "One session for contexts of this app that are built separately, such as\na browser extension's pages, offscreen document and service worker. By\ndefault only contexts loading the same SDK module file share a session.\n`build` names this build of the app instead: every context of the origin\nthat passes the same `build` and the same declaration uses one sign-in and\none Worker. `host: false` is for a context that cannot run that Worker (a\nservice worker) or should leave it to another: it joins the context that\nruns it and waits while there is none. Default: `host: true`."
}
]
},
@@ -225,8 +244,8 @@
},
{
"name": "sync",
- "signature": "readonly sync: StatusSummary | null",
- "description": "Sync of the open collection (null until it is ready)."
+ "signature": "readonly sync: MdbaseSync | null",
+ "description": "The one status to show for the open collection (null until it is ready):\nwhether changes reach the cloud copy, what is waiting, including each\nunconfirmed and refused write (`sync.writes`, which survives a reload), and\nwhat needs the person."
},
{
"name": "links",
@@ -239,7 +258,7 @@
"name": "MdbasePhase",
"kind": "type",
"description": "",
- "signature": "type MdbasePhase = \n/** The SDK is starting: show the app's wordmark or the cached list. */\n{\n readonly kind: \"starting\";\n}\n/** Not signed in. `notice` explains why when sign-in just ended (window closed, signed out). */\n | {\n readonly kind: \"signed_out\";\n readonly notice: MdbaseProblem | null;\n}\n/** Waiting for the Connect window: sign in, add a collection or approve one. */\n | {\n readonly kind: \"authorizing\";\n readonly purpose: \"sign_in\" | \"add\" | \"approve\";\n readonly collectionId: string | null;\n}\n/** Signed in, nothing open: choose from `snapshot.collections` or add one. */\n | {\n readonly kind: \"choosing\";\n readonly lastApproval: MdbaseApprovalOutcome | null;\n}\n/** SDK-9: `slow` turns on when opening takes longer than usual. */\n | {\n readonly kind: \"opening\";\n readonly collectionId: string;\n readonly displayName: string | null;\n readonly slow: boolean;\n readonly progress?: import(\"../app-host/opening-progress.js\").AppOpeningProgress | null;\n}\n/** The requested collection is not approved for this app (yet). */\n | {\n readonly kind: \"needs_approval\";\n readonly collectionId: string;\n readonly displayName: string | null;\n readonly declined: boolean;\n}\n/** Open, but needs a one-time setup: `setup.plan()` then `setup.apply(plan)`. */\n | {\n readonly kind: \"needs_setup\";\n readonly collectionId: string;\n readonly collection: MdbaseCollectionSummary;\n}\n/** Open and usable. `rechecking` and `problem` are informational only. */\n | {\n readonly kind: \"ready\";\n readonly collectionId: string;\n readonly collection: MdbaseCollectionSummary;\n readonly connection: MdbaseApplicationConnection;\n readonly rechecking: boolean;\n readonly problem: MdbaseProblem | null;\n readonly unavailableTypes: readonly MdbaseUnavailableType[];\n}\n/** Working before connecting (`createMdbase(declaration, {unsynced: true})`):\n * the app's unsynced collection is open. Use `connection` as when ready.\n * Its work is saved only in this browser: say so, and offer \"Connect to sync\n * your work\". It is never in `snapshot.collections`. */\n | {\n readonly kind: \"unsynced\";\n readonly collectionId: string;\n readonly connection: MdbaseApplicationConnection;\n readonly rechecking: boolean;\n}\n/** Can't continue: show `problem` with its action. */\n | {\n readonly kind: \"problem\";\n readonly collectionId: string | null;\n readonly problem: MdbaseProblem;\n}\n/** The SDK can't run here (SSR, Node, an unsupported browser). */\n | {\n readonly kind: \"unavailable\";\n readonly problem: MdbaseProblem;\n} | {\n readonly kind: \"closed\";\n};"
+ "signature": "type MdbasePhase = \n/** The SDK is starting: show the app's wordmark or the cached list. */\n{\n readonly kind: \"starting\";\n}\n/** Not signed in. `notice` explains why when sign-in just ended (window closed, signed out). */\n | {\n readonly kind: \"signed_out\";\n readonly notice: MdbaseProblem | null;\n}\n/** Waiting for the Connect window: sign in, add a collection or approve one. */\n | {\n readonly kind: \"authorizing\";\n readonly purpose: \"sign_in\" | \"add\" | \"approve\";\n readonly collectionId: string | null;\n}\n/** Signed in, nothing open: choose from `snapshot.collections` or add one. */\n | {\n readonly kind: \"choosing\";\n readonly lastApproval: MdbaseApprovalOutcome | null;\n}\n/** SDK-9: `slow` turns on when opening takes longer than usual. */\n | {\n readonly kind: \"opening\";\n readonly collectionId: string;\n readonly displayName: string | null;\n readonly slow: boolean;\n readonly progress?: import(\"../app-host/opening-progress.js\").AppOpeningProgress | null;\n}\n/** The requested collection is not approved for this app (yet). */\n | {\n readonly kind: \"needs_approval\";\n readonly collectionId: string;\n readonly displayName: string | null;\n readonly declined: boolean;\n}\n/** A Private collection this device has joined but cannot read yet: it has\n * no key. `mode` is the account's key mode. `password`: ask for the\n * encryption password (or the recovery key) and call\n * `unlock(collectionId, secret)`. `strict` and `none` cannot be unlocked\n * here: explain that it needs a computer running the mdbase app. `unlocking`\n * while an unlock runs; `problem` describes the last failed attempt. */\n | {\n readonly kind: \"needs_unlock\";\n readonly collectionId: string;\n readonly displayName: string | null;\n readonly mode: \"password\" | \"strict\" | \"none\";\n readonly unlocking: boolean;\n readonly problem: MdbaseProblem | null;\n}\n/** Open, but needs a one-time setup: `setup.plan()` then `setup.apply(plan)`. */\n | {\n readonly kind: \"needs_setup\";\n readonly collectionId: string;\n readonly collection: MdbaseCollectionSummary;\n}\n/** Open and usable. `rechecking` and `problem` are informational only. */\n | {\n readonly kind: \"ready\";\n readonly collectionId: string;\n readonly collection: MdbaseCollectionSummary;\n readonly connection: MdbaseApplicationConnection;\n readonly rechecking: boolean;\n readonly problem: MdbaseProblem | null;\n readonly unavailableTypes: readonly MdbaseUnavailableType[];\n}\n/** Working before connecting (`createMdbase(declaration, {unsynced: true})`):\n * the app's unsynced collection is open. Use `connection` as when ready.\n * Its work is saved only in this browser: say so, and offer \"Connect to sync\n * your work\". It is never in `snapshot.collections`. */\n | {\n readonly kind: \"unsynced\";\n readonly collectionId: string;\n readonly connection: MdbaseApplicationConnection;\n readonly rechecking: boolean;\n}\n/** Can't continue: show `problem` with its action. */\n | {\n readonly kind: \"problem\";\n readonly collectionId: string | null;\n readonly problem: MdbaseProblem;\n}\n/** The SDK can't run here (SSR, Node, an unsupported browser). */\n | {\n readonly kind: \"unavailable\";\n readonly problem: MdbaseProblem;\n} | {\n readonly kind: \"closed\";\n};"
},
{
"name": "MdbaseApplicationConnection",
@@ -432,65 +451,6 @@
}
]
},
- {
- "name": "connect",
- "kind": "function",
- "description": "Connect to a replica.",
- "signature": "function connect(opts: ClientOptions): Promise;"
- },
- {
- "name": "ClientOptions",
- "kind": "interface",
- "description": "",
- "signature": "interface ClientOptions",
- "members": [
- {
- "name": "connector",
- "signature": "connector: Connector",
- "description": ""
- },
- {
- "name": "app",
- "signature": "app: { name: string; version: string; }",
- "description": "App ID and version, sent in `hello`."
- },
- {
- "name": "timezone",
- "signature": "timezone?: string",
- "description": "IANA time zone for this session's writes and queries. Defaults to the host's."
- },
- {
- "name": "features",
- "signature": "features?: string[]",
- "description": "Extra features to request (\"fence\", \"presence\", ...)."
- },
- {
- "name": "reconnect",
- "signature": "reconnect?: false | { minDelayMs?: number; maxDelayMs?: number; }",
- "description": "Reconnect after the link drops (default on)."
- },
- {
- "name": "waitForDevice",
- "signature": "waitForDevice?: boolean",
- "description": "Private collections: wait for a device replica to come online instead of failing."
- },
- {
- "name": "onWaiting",
- "signature": "onWaiting?: (why: MdbaseError) => void",
- "description": "Called while waiting for a device or the original Native grant to become live."
- },
- {
- "name": "ledger",
- "signature": "ledger?: WriteLedgerStore",
- "description": "Where the write ledger persists (default: memory). Web apps get the replica's store."
- },
- {
- "name": "signal",
- "signature": "signal?: AbortSignal",
- "description": ""
- }
- ]
- },
{
"name": "MdbaseClient",
"kind": "class",
@@ -515,7 +475,7 @@
{
"name": "connect",
"signature": "static connect(opts: ClientOptions): Promise",
- "description": "Connect to a replica and say hello. With `waitForDevice`, a private collection with\nno device online keeps retrying (calling `onWaiting`) instead of failing.\nA next-relay pre-live grant waits up to 30 seconds on this same connector.\nThis is initial hello only: no application request or unknown write is replayed."
+ "description": "Connect to a replica and say hello. With `waitForDevice`, a private collection whose\ncomputer is offline or not serving it right now keeps retrying (calling `onWaiting`)\ninstead of failing.\nA next-relay pre-live grant waits up to 30 seconds on this same connector.\nThis is initial hello only: no application request or unknown write is replayed."
},
{
"name": "hello",
@@ -564,8 +524,13 @@
},
{
"name": "call",
- "signature": "call(method: string, p: CborValue, o?: { signal?: AbortSignal; codec?: import(\"./codec.js\").Codec; retry?: boolean; }): Promise",
- "description": "Advanced: run a request on the current session; on a dropped link, wait for the\nreconnect and retry when `retry` (idempotent requests only)."
+ "signature": "call(method: string, p: CborValue, o?: { signal?: AbortSignal; retry?: boolean; }): Promise",
+ "description": "Advanced: run a request on the current session; on a dropped link, wait for the\nreconnect and retry when `retry` (idempotent requests only).\n\nWith a `codec` the answer is decoded and its values are plain JSON, as from\nevery other method. Without one it is the exact CBOR answer: decode that\nwith a `wire` codec to keep `Map` order, `Float64` and `bigint`."
+ },
+ {
+ "name": "call",
+ "signature": "call(method: string, p: CborValue, o: { signal?: AbortSignal; codec: Codec; retry?: boolean; }): Promise>",
+ "description": "Advanced: run a request on the current session; on a dropped link, wait for the\nreconnect and retry when `retry` (idempotent requests only).\n\nWith a `codec` the answer is decoded and its values are plain JSON, as from\nevery other method. Without one it is the exact CBOR answer: decode that\nwith a `wire` codec to keep `Map` order, `Float64` and `bigint`."
},
{
"name": "authenticatedDevice",
@@ -589,8 +554,8 @@
},
{
"name": "appliedPrefix",
- "signature": "appliedPrefix(seq: number, signal?: AbortSignal): Promise",
- "description": "Read the retained historical chain at a captured hosted fence. READ/session\nauthorization is unchanged. No automatic retry/reconnect: a handover must\nrevalidate the authenticated session and all readiness gates after any await.\nMissing chain or any error means remain hosted; never substitute asOf or the\ncurrent head/generations. Decoding does not authenticate a witness or switch."
+ "signature": "appliedPrefix(seq: number, o?: ReadOptions): Promise",
+ "description": "Read the retained historical chain at a captured hosted fence. READ/session\nauthorization is unchanged. No automatic retry/reconnect: a handover must\nrevalidate the authenticated session and all readiness gates after any await.\nMissing chain or any error means remain hosted; never substitute asOf or the\ncurrent head/generations. Decoding does not authenticate a witness or switch.\n`o.signal` cancels the read."
},
{
"name": "onStatus",
@@ -599,8 +564,8 @@
},
{
"name": "describe",
- "signature": "describe(options?: AbortSignal | DescribeOptions): Promise",
- "description": "Catalog summary: types with their version, source revision and contract\nimplementations, contracts, settings (§4.4). `definitions` adds each type's\ndefinition and schema and each contract's schemas, bounded by the replica\n(`too_large` when over budget; read them with `resources.get` instead).\nA producer that cannot describe definitions fails `upgrade_required`."
+ "signature": "describe(o?: DescribeOptions): Promise",
+ "description": "Catalog summary: types with their version, source revision and contract\nimplementations, contracts, settings (§4.4). `definitions` adds each type's\ndefinition and schema and each contract's schemas, bounded by the replica\n(`too_large` when over budget; read them with `resources.get` instead).\nA producer that cannot describe definitions fails `upgrade_required`.\n`o.signal` cancels the read."
},
{
"name": "createType",
@@ -609,33 +574,33 @@
},
{
"name": "describeTyping",
- "signature": "describeTyping(types: readonly string[], paths: readonly string[], signal?: AbortSignal): Promise",
- "description": "Core's temporal typing for top-level fields under a query's exact `types` OR list\n(`date` / `date_time` only when every type agrees; otherwise `none`). The answer is\nbound to a catalog generation; nested paths are `none`. The SDK never infers typing."
+ "signature": "describeTyping(types: readonly string[], paths: readonly string[], o?: ReadOptions): Promise",
+ "description": "Core's temporal typing for top-level fields under a query's exact `types` OR list\n(`date` / `date_time` only when every type agrees; otherwise `none`). The answer is\nbound to a catalog generation; nested paths are `none`. The SDK never infers typing.\n`o.signal` cancels the read."
},
{
"name": "get",
- "signature": "get(ref: RecordRef, include?: Include, signal?: AbortSignal): Promise",
- "description": "One record by ID or path. Throws `not_found`."
+ "signature": "get(ref: RecordRef, o?: RecordReadOptions): Promise",
+ "description": "One record by ID or path. Throws `not_found`. `o.include` adds the body\nand other parts to the record; `o.signal` cancels the read."
},
{
"name": "getContract",
- "signature": "getContract(ref: RecordRef, contract: ContractSelector, signal?: AbortSignal): Promise",
- "description": "One record's valid view through a record contract, mapped by the replica's\nCore. Refusals: `not_found` (no record, or `data_contract_not_implemented`\nwhen it does not implement the contract), `not_found`/`data_contract_not_found`,\n`invalid_request`/`data_contract_ambiguous` (select `type`; details: the types),\n`invalid_record`/`data_contract_record_invalid` (with issues), and\n`upgrade_required`/`contract_records_unsupported` from an older replica."
+ "signature": "getContract(ref: RecordRef, contract: ContractSelector, o?: ReadOptions): Promise",
+ "description": "One record's valid view through a record contract, mapped by the replica's\nCore. Refusals: `not_found` (no record, or `data_contract_not_implemented`\nwhen it does not implement the contract), `not_found`/`data_contract_not_found`,\n`invalid_request`/`data_contract_ambiguous` (select `type`; details: the types),\n`invalid_record`/`data_contract_record_invalid` (with issues), and\n`upgrade_required`/`contract_records_unsupported` from an older replica.\n`o.signal` cancels the read."
},
{
"name": "readMany",
- "signature": "readMany(refs: readonly RecordRef[], include?: Include, signal?: AbortSignal, options?: ReadManyOptions): Promise",
- "description": "Bounded ordered ordinary gets. Missing/refused reads fail the batch;\nduplicate slots and the original signal are retained, not a snapshot."
+ "signature": "readMany(refs: readonly RecordRef[], o?: RecordReadOptions & ReadManyOptions): Promise",
+ "description": "Bounded ordered ordinary gets. Missing/refused reads fail the batch;\nduplicate slots and the original signal are retained, not a snapshot.\n`o.include` and `o.signal` apply to every get; `o.concurrency` bounds the\ngets in flight."
},
{
"name": "find",
- "signature": "find(ref: RecordRef, include?: Include, signal?: AbortSignal): Promise",
- "description": "One record, or `null` when there is none."
+ "signature": "find(ref: RecordRef, o?: RecordReadOptions): Promise",
+ "description": "One record, or `null` when there is none. `o` is as for `get`."
},
{
"name": "query",
- "signature": "query(query: Query, include?: Include, signal?: AbortSignal, opts?: { contract?: string; }): Promise",
- "description": "One page of a query, evaluated by the replica (body predicates and links\nincluded, §4). Pass `result.cursor` back as `query.cursor` for the next.\n`opts.contract` is not supported by the live replica dispatch. Supplying it\nreturns `invalid_request` with reason `unknown_param`; no contract filter\nis applied. The option remains encoded unchanged for API compatibility."
+ "signature": "query(query: Query, o?: RecordReadOptions & { contract?: string; }): Promise",
+ "description": "One page of a query, evaluated by the replica (body predicates and links\nincluded, §4). Pass `result.cursor` back as `query.cursor` for the next.\n`o.include` adds the body and other parts to each record; `o.signal`\ncancels the read.\n`o.contract` is not supported by the live replica dispatch. Supplying it\nreturns `invalid_request` with reason `unknown_param`; no contract filter\nis applied. The option remains encoded unchanged for API compatibility."
},
{
"name": "queryContract",
@@ -652,9 +617,14 @@
"signature": "resolveLinks(from: string, links: readonly string[], o?: { signal?: AbortSignal; }): Promise",
"description": "Resolve link occurrences written in the note at `from`, exactly as the\nreplica resolves them for backlinks and rename: Core parsing and spec 08\nresolution over the local view, pending changes included. `from` need not\nexist yet (an unsaved draft). Each entry is one occurrence as written —\n`[[target]]`, `![[target#anchor|alias]]`, `[text](path)`, `` —\nand the result holds one resolution per entry, in order: a record or file\nwith its ID and path, `ambiguous` with sorted candidate paths, or\n`not_found` / `invalid`. Titles and aliases are not link keys. 1–512\nentries of at most 4096 bytes each. A replica without the method refuses\nwith `upgrade_required` / `resolve_links_unsupported` (§4.3)."
},
+ {
+ "name": "history",
+ "signature": "readonly history: { /** One page of a record's versions, newest first. Pass `next` as `before` * for older ones. `o.signal` cancels the read. */ list: (record: Uuid, o?: HistoryOptions) => Promise; /** The exact document of the version at log position `seq`, checked * against its revision. `o.signal` cancels the read. */ version: (record: Uuid, seq: number, o?: ReadOptions) => Promise; }",
+ "description": "Record history (§4.4, API 1.4): the versions of a record that the log still\nretains. Needs `collection.read` and `history.read` through a grant without\na folder scope. A replica without history,\nthe hosted replica and a local-only collection refuse with\n`upgrade_required` / `history_unsupported`."
+ },
{
"name": "resources",
- "signature": "readonly resources: { get: (path: string, signal?: AbortSignal) => Promise; /** One bounded resource inventory page. Text defaults to false; limit defaults * to 64 (maximum 128). Preserve folder/text/limit on continuation. Collect all * pages before assessing a complete snapshot; stale/expired cursors require * explicit reassessment, never an automatic restart. */ list: (o?: { folder?: string; text?: boolean; cursor?: string; limit?: number; signal?: AbortSignal; }) => Promise; /** * Write a resource. CAS: pass the revision you read as `baseRevision`, or * `mustNotExist` to create only (a taken path is `conflict` / `path_taken`). Not both. */ put: (path: string, doc: string, o?: WriteOptions & { baseRevision?: string; mustNotExist?: boolean; }) => Promise; delete: (path: string, o?: WriteOptions & { baseRevision?: string; }) => Promise; }",
+ "signature": "readonly resources: { /** One definition by path. `o.signal` cancels the read. */ get: (path: string, o?: ReadOptions) => Promise; /** One bounded resource inventory page. Text defaults to false; limit defaults * to 64 (maximum 128). Preserve folder/text/limit on continuation. Collect all * pages before assessing a complete snapshot; stale/expired cursors require * explicit reassessment, never an automatic restart. */ list: (o?: { folder?: string; text?: boolean; cursor?: string; limit?: number; signal?: AbortSignal; }) => Promise<{ resources: { path: string; revision: import(\"./wire.js\").Hash; size: number; state: \"confirmed\" | \"pending\"; text?: string | undefined; }[]; complete: boolean; cursor?: string | undefined; }>; /** * Write a resource. CAS: pass the revision you read as `baseRevision`, or * `mustNotExist` to create only (a taken path is `conflict` / `path_taken`). Not both. */ put: (path: string, doc: string, o?: WriteOptions & { baseRevision?: string; mustNotExist?: boolean; }) => Promise; delete: (path: string, o?: WriteOptions & { baseRevision?: string; }) => Promise; }",
"description": "Definitions: `mdbase.yaml`, type files, contract files (§4.1)."
},
{
@@ -669,13 +639,13 @@
},
{
"name": "views",
- "signature": "readonly views: { createSource: (input: ViewSourceCreateInput, options: ViewSourceWriteOptions) => Promise; updateSource: (seen: RecordView, document: string, options: ViewSourceWriteOptions) => Promise; getSourceRecord: (source: RecordRef, options?: ViewSourceReadOptions) => Promise; /** `mdbase.view` sources (spec 12 `list_views` shape), resolved over served * contract queries: the native runtime has no `list_views` RPC. */ list: (folder?: string, signal?: AbortSignal) => Promise; /** Spec 11 named-view resolution, executed as one ordinary native query. */ execute: (source: RecordRef, view: string, o?: ExecuteViewOptions) => Promise; readSource: (source: RecordRef, signal?: AbortSignal) => Promise; }",
+ "signature": "readonly views: { createSource: (input: ViewSourceCreateInput, options: ViewSourceWriteOptions) => Promise; updateSource: (seen: RecordView, document: string, options: ViewSourceWriteOptions) => Promise; getSourceRecord: (source: RecordRef, options?: ViewSourceReadOptions) => Promise; /** `mdbase.view` sources (spec 12 `list_views` shape), resolved over served * contract queries: the native runtime has no `list_views` RPC. `o.folder` * keeps the sources under one folder; `o.signal` cancels the read. */ list: (o?: { folder?: string; signal?: AbortSignal; }) => Promise; /** Spec 11 named-view resolution, executed as one ordinary native query. */ execute: (source: RecordRef, view: string, o?: ExecuteViewOptions) => Promise; /** The current source document of one `mdbase.view` record. `o.signal` * cancels the read. */ readSource: (source: RecordRef, o?: ReadOptions) => Promise; }",
"description": "Saved views (§4.3). Source helpers use ordinary record ops/full CAS reads;\nweb app-host Bases reads use the separate native AppBases methods."
},
{
"name": "pendingWrites",
- "signature": "pendingWrites(signal?: AbortSignal): Promise",
- "description": "Pending mutations of this session's owner (its grant, or the device), oldest\nfirst (§6): a new session after a reload sees writes made before it. Follow\neach with `awaitReceipt`, or keep the `mutationId` you chose and call\n`receipt(id)` / `awaitReceipt(id)`. Pages through everything."
+ "signature": "pendingWrites(o?: ReadOptions): Promise",
+ "description": "Pending mutations of this session's owner (its grant, or the device), oldest\nfirst (§6): a new session after a reload sees writes made before it. Follow\neach with `awaitReceipt`, or keep the `mutationId` you chose and call\n`receipt(id)` / `awaitReceipt(id)`. Pages through everything; `o.signal`\ncancels the read."
},
{
"name": "preflightRename",
@@ -689,38 +659,43 @@
},
{
"name": "pages",
- "signature": "pages(query: Query, include?: Include, signal?: AbortSignal, options?: PagesOptions): AsyncGenerator",
- "description": "Every page of a query. Cursor resets require explicit caller clearing;\notherwise cursor_expired/cursor_stale is thrown unchanged."
+ "signature": "pages(query: Query, o?: RecordReadOptions & PagesOptions): AsyncGenerator",
+ "description": "Every cursor page of a query. The page size defaults to 500 when `limit`\nis omitted. `o.include` and `o.signal` apply to every page.\nCursor resets require explicit caller clearing through `o.onReset`;\notherwise cursor_expired/cursor_stale is thrown unchanged. The query and\n`o` are captured when iteration starts."
},
{
"name": "queryPages",
- "signature": "queryPages(query: Query, include?: Include, signal?: AbortSignal, options?: PagesOptions): AsyncGenerator",
- "description": "Shared alias of pages(): whole native pages, no implicit cursor reset."
+ "signature": "queryPages(query: Query, o?: RecordReadOptions & PagesOptions): AsyncGenerator",
+ "description": "Shared alias of pages(): whole native pages, no implicit cursor reset.\n`o.include` and `o.signal` apply to every page; `o.onReset` opts in to one\nfirst-page restart."
+ },
+ {
+ "name": "recordSet",
+ "signature": "recordSet(options?: RecordSetOptions): RecordSet",
+ "description": "Every record of the chosen types (default: all), read completely and then\nkept current: the set an app lists, searches and renders from. Close it\nwhen done."
},
{
"name": "live",
- "signature": "live(query: Query, include?: Include): LiveQuery",
- "description": "A live query. Subscribe for pushes; keep lists cheap with a `limit` window and no\nbodies, and widen the window with `setQuery`."
+ "signature": "live(query: Query, o?: { include?: Include; }): LiveQuery",
+ "description": "A live query: one window of at most 1,000 records and 1 MiB, with the\nreplica's order and counts. Subscribe for pushes; keep lists cheap with a\n`limit` window and no bodies, and widen the window with `setQuery`. For a\nwhole collection use `recordSet`. `o.include` adds the body and other\nparts to each record."
},
{
"name": "changes",
- "signature": "changes(cursor?: string, limit?: number, signal?: AbortSignal): Promise",
- "description": "One page of the change feed. A `reset: true` result means \"re-read what you cache\"."
+ "signature": "changes(o?: { cursor?: string; limit?: number; signal?: AbortSignal; }): Promise",
+ "description": "One page of the change feed, from `o.cursor` (default: the start) and of\nat most `o.limit` changes. A `reset: true` result means \"re-read what you\ncache\". `o.signal` cancels the read."
},
{
"name": "watchChanges",
- "signature": "watchChanges(cursor: string | undefined, onChanges: (batch: ChangesResult) => void): ChangesWatch",
- "description": "Follow the change feed from `cursor`. `onChanges` gets every batch; `reset: true`\nmeans the app must re-read what it caches. Survives reconnects.\n`ready` confirms the first watch ACK, not a complete/current collection cache.\nAfter reconnect, observe `state`; an already-resolved promise is not freshness."
+ "signature": "watchChanges(onChanges: (batch: ChangesResult) => void, o?: { cursor?: string; }): ChangesWatch",
+ "description": "Follow the change feed from `o.cursor` (default: the start). `onChanges` gets\nevery batch; `reset: true` means the app must re-read what it caches. Survives\nreconnects.\n`ready` confirms the first watch ACK, not a complete/current collection cache.\nAfter reconnect, observe `state`; an already-resolved promise is not freshness."
},
{
"name": "validate",
- "signature": "validate(refs?: readonly RecordRef[], signal?: AbortSignal): Promise",
- "description": "Validate these records, or every record. Every record is validated a\npage at a time when the replica grants `validate-page-v1`; each page is an\nindependent READ, so records changed meanwhile may be missed or repeated.\nOlder replicas validate every record in one bounded request."
+ "signature": "validate(o?: { refs?: readonly RecordRef[]; signal?: AbortSignal; }): Promise",
+ "description": "Validate `o.refs`, or every record without them. Every record is validated a\npage at a time when the replica grants `validate-page-v1`; each page is an\nindependent READ, so records changed meanwhile may be missed or repeated.\nOlder replicas validate every record in one bounded request. `o.signal`\ncancels the read."
},
{
"name": "executeAppBases",
- "signature": "executeAppBases(request: AppBasesRequest, signal?: AbortSignal): Promise",
- "description": "Independent native app-host Bases READ, exact original held session.\nUnsupported transports refuse: no generic execute_view/data fallback."
+ "signature": "executeAppBases(request: AppBasesRequest, o?: ReadOptions): Promise",
+ "description": "Independent native app-host Bases READ, exact original held session.\nUnsupported transports refuse: no generic execute_view/data fallback.\n`o.signal` cancels the read."
},
{
"name": "executeAppBasesPages",
@@ -729,18 +704,18 @@
},
{
"name": "listAppBasesViews",
- "signature": "listAppBasesViews(request: AppBasesDiscoveryRequest, signal?: AbortSignal): Promise",
- "description": "One bounded native discovery page. Empty views do not mean EOF when a\ncontinuation is present. Supplied handles never silently restart/retry."
+ "signature": "listAppBasesViews(request: AppBasesDiscoveryRequest, o?: ReadOptions): Promise",
+ "description": "One bounded native discovery page. Empty views do not mean EOF when a\ncontinuation is present. Supplied handles never silently restart/retry.\nWith `reportUnreadable`, a replica that grants\n`bases-discovery-unreadable-v1` skips records it cannot classify and names\nthem in `unreadable`; an older replica refuses the discovery as before, so\nan empty `unreadable` on success always means none were skipped.\n`o.signal` cancels the read."
},
{
"name": "readAppBasesViewSource",
- "signature": "readAppBasesViewSource(request: AppBasesSourceRequest, signal?: AbortSignal): Promise",
- "description": "Exact current source for one native UUID/SHA/original ordinal, never path\naliases, inferred catalog entries, generic RPC or cached document fallback."
+ "signature": "readAppBasesViewSource(request: AppBasesSourceRequest, o?: ReadOptions): Promise",
+ "description": "Exact current source for one native UUID/SHA/original ordinal, never path\naliases, inferred catalog entries, generic RPC or cached document fallback.\n`o.signal` cancels the read."
},
{
"name": "submit",
- "signature": "submit(ops: Op[], o?: WriteOptions & { allowPartial?: boolean; }): Promise",
- "description": "Submit operations as one mutation (or one per op with `allowPartial`)."
+ "signature": "submit(ops: Op[], o?: WriteOptions): Promise",
+ "description": "Submit operations as one mutation: they apply together or not at all."
},
{
"name": "create",
@@ -773,24 +748,24 @@
"description": "Rename (move) a record; `updateRefs` rewrites links to it (default true).\nWith `contract`, the record must implement it, and moves from its current path."
},
{
- "name": "save",
- "signature": "save(write: Write | Promise, o?: { readBack?: boolean; timeoutMs?: number; signal?: AbortSignal; }): Promise",
- "description": "Settle a write for the UI: waits up to `timeoutMs` (default 3 s) for the log\nto confirm it. Still pending then is `saved_on_device`, not a failure: the\nwrite is kept on this device and the ledger settles it later. With\n`readBack`, `record` is the record as it now reads here."
+ "name": "settle",
+ "signature": "settle(write: Write | Promise | Uuid, options?: SettleOptions): Promise",
+ "description": "Settle a write: wait for the sync service to confirm it (3 s by default),\nand with `read`, read the record back as it now reads here.\n\nPass the write, the promise of one, or the mutation ID of an earlier write\nwhose result was `unknown`. The answer is a `Settlement`; the only\nrejections are cancellation and a call that cannot be settled as asked.\nNothing is ever submitted again.\n\n const saved = await db.settle(db.update(record, { patch }), { read: true });\n if (saved.outcome === \"rejected\") show(describeError(saved.problem));"
},
{
"name": "receipt",
- "signature": "receipt(mutation: Uuid, signal?: AbortSignal): Promise",
- "description": "The current receipt of a mutation. Failures carry `mutationId`."
+ "signature": "receipt(mutation: Uuid, o?: ReadOptions): Promise",
+ "description": "The current receipt of a mutation. Failures carry `mutationId`. `o.signal` cancels the read."
},
{
"name": "awaitReceipt",
- "signature": "awaitReceipt(mutation: Uuid, timeoutMs?: number, signal?: AbortSignal): Promise",
- "description": "Resolves when the receipt leaves `pending`, or at `timeoutMs` with the pending receipt."
+ "signature": "awaitReceipt(mutation: Uuid, o?: { timeoutMs?: number | undefined; signal?: AbortSignal | undefined; }): Promise",
+ "description": "Resolves when the receipt leaves `pending`, or at `o.timeoutMs` with the\npending receipt. `o.signal` cancels the wait."
},
{
"name": "listHolds",
- "signature": "listHolds(signal?: AbortSignal): Promise",
- "description": ""
+ "signature": "listHolds(o?: ReadOptions): Promise",
+ "description": "The current holds. `o.signal` cancels the read."
},
{
"name": "onHolds",
@@ -804,8 +779,8 @@
},
{
"name": "listConflicts",
- "signature": "listConflicts(record?: Uuid, signal?: AbortSignal): Promise",
- "description": ""
+ "signature": "listConflicts(o?: { record?: Uuid; signal?: AbortSignal; }): Promise",
+ "description": "The current conflicts, of `o.record` only when given. `o.signal` cancels the read."
},
{
"name": "onConflicts",
@@ -824,8 +799,8 @@
},
{
"name": "pendingDevices",
- "signature": "pendingDevices(signal?: AbortSignal): Promise",
- "description": "Devices waiting for approval in a private collection. Offered only to the app\nhosting the replica (no grant). `exchangeReady` is challenge/reveal readiness,\nNOT approval/key delivery. Once ready, `sas` is the host-only comparison code\nto display beside Allow; the user must check it matches on the other computer."
+ "signature": "pendingDevices(o?: ReadOptions): Promise",
+ "description": "Devices waiting for approval in a private collection. Offered only to the app\nhosting the replica (no grant). `exchangeReady` is challenge/reveal readiness,\nNOT approval/key delivery. Once ready, `sas` is the host-only comparison code\nto display beside Allow; the user must check it matches on the other computer.\n`o.signal` cancels the read."
},
{
"name": "approveDevice",
@@ -839,7 +814,7 @@
},
{
"name": "accountKey",
- "signature": "readonly accountKey: { /** Setup step 2: check the enrolment and key the recovery device (an ordinary mutation). */ setup: (secret: Uint8Array) => Promise; /** Unlock step 3: start the recovery-signed self-grant; poll `status` until `keyed` or `refused`. */ unlock: (secret: Uint8Array) => Promise; status: (signal?: AbortSignal) => Promise; }",
+ "signature": "readonly accountKey: { /** Setup step 2: check the enrolment and key the recovery device (an ordinary mutation). */ setup: (secret: Uint8Array) => Promise; /** Unlock step 3: start the recovery-signed self-grant; poll `status` until `keyed` or `refused`. */ unlock: (secret: Uint8Array) => Promise; /** Where an account-key unlock stands on this replica. `o.signal` cancels * the read. */ status: (o?: ReadOptions) => Promise; }",
"description": "The account key (AK1 §6; hosting app only, never over a cloud-copy thin session).\n`secret` is the 32-byte account secret `R`; the replica derives the collection's\nrecovery device from it and drops it. The SDK keeps no copy."
},
{
@@ -914,6 +889,11 @@
"description": "",
"signature": "interface UpdateInput",
"members": [
+ {
+ "name": "requireLive",
+ "signature": "requireLive?: boolean",
+ "description": "Refuse with not_found/deleted rather than restoring a tombstone at replay."
+ },
{
"name": "updateRefs",
"signature": "updateRefs?: boolean",
@@ -1045,6 +1025,11 @@
"signature": "readonly published: Promise",
"description": "Final local file result, possibly BEFORE log confirmation. `not_published`\nis a final non-publication, not success. Without files, settles at confirmation.\nRejects rejected/unknown outcomes; not a native custody/durable ACK gate."
},
+ {
+ "name": "recordId",
+ "signature": "recordId?: Uuid",
+ "description": "The record a single-record write targets (create, update, replace, rename, delete)."
+ },
{
"name": "constructor",
"signature": "constructor(receipt: Receipt)",
@@ -1078,35 +1063,15 @@
]
},
{
- "name": "SaveResult",
+ "name": "RecordWrite",
"kind": "interface",
- "description": "What `MdbaseClient.save` settled to.",
- "signature": "interface SaveResult",
+ "description": "A create, with the record ID the SDK minted: known even when the replica\nomits optimistic records from its response.",
+ "signature": "interface RecordWrite extends Write",
"members": [
{
- "name": "outcome",
- "signature": "readonly outcome: \"confirmed\" | \"saved_on_device\" | \"rejected\"",
- "description": ""
- },
- {
- "name": "mutationId",
- "signature": "readonly mutationId: Uuid",
- "description": ""
- },
- {
- "name": "records",
- "signature": "readonly records: readonly RecordView[]",
- "description": ""
- },
- {
- "name": "record",
- "signature": "readonly record?: RecordView",
- "description": "The first record, read back when asked."
- },
- {
- "name": "problem",
- "signature": "readonly problem?: Problem",
- "description": ""
+ "name": "recordId",
+ "signature": "readonly recordId: Uuid",
+ "description": "The record a single-record write targets (create, update, replace, rename, delete)."
}
]
},
@@ -1168,8 +1133,8 @@
},
{
"name": "setQuery",
- "signature": "setQuery(query: Query, include?: Include | undefined): Promise",
- "description": "Change the query (for example a larger `limit` window). Re-subscribes."
+ "signature": "setQuery(query: Query, o?: { include?: Include; }): Promise",
+ "description": "Change the query (for example a larger `limit` window). Re-subscribes.\n`o.include` replaces what each record carries; without it the current\ninclude is kept."
},
{
"name": "close",
@@ -1182,111 +1147,15 @@
"name": "RecordView",
"kind": "interface",
"description": "",
- "signature": "interface RecordView",
- "members": [
- {
- "name": "id",
- "signature": "id: Uuid",
- "description": ""
- },
- {
- "name": "path",
- "signature": "path: string",
- "description": ""
- },
- {
- "name": "revision",
- "signature": "revision: Hash",
- "description": ""
- },
- {
- "name": "frontmatter",
- "signature": "frontmatter: FmMap",
- "description": ""
- },
- {
- "name": "effective",
- "signature": "effective?: FmMap",
- "description": ""
- },
- {
- "name": "body",
- "signature": "body?: string",
- "description": ""
- },
- {
- "name": "document",
- "signature": "document?: string",
- "description": ""
- },
- {
- "name": "types",
- "signature": "types: string[]",
- "description": ""
- },
- {
- "name": "state",
- "signature": "state: RecordState",
- "description": ""
- },
- {
- "name": "diagnostics",
- "signature": "diagnostics?: Issue[]",
- "description": ""
- },
- {
- "name": "values",
- "signature": "values?: FmMap",
- "description": "`select` outputs by output name (queries with `select`)."
- },
- {
- "name": "mtime",
- "signature": "mtime?: number",
- "description": "Capture time of the last change to the bytes (§3.1); not a device file mtime."
- },
- {
- "name": "links",
- "signature": "links?: LinkView[]",
- "description": "Outgoing links and embeds (include `links`)."
- },
- {
- "name": "createdBy",
- "signature": "createdBy?: AuthorRef",
- "description": "Who created the record (absent in local-only collections)."
- },
- {
- "name": "modifiedBy",
- "signature": "modifiedBy?: AuthorRef",
- "description": "Who last changed it."
- }
- ]
+ "signature": "interface RecordView extends Plain",
+ "members": []
},
{
"name": "Receipt",
"kind": "interface",
"description": "",
- "signature": "interface Receipt",
+ "signature": "interface Receipt extends Omit, \"records\" | \"conflicts\">",
"members": [
- {
- "name": "mutation",
- "signature": "mutation: Uuid",
- "description": ""
- },
- {
- "name": "state",
- "signature": "state: ReceiptState",
- "description": ""
- },
- {
- "name": "seq",
- "signature": "seq?: number",
- "description": ""
- },
- {
- "name": "status",
- "signature": "status?: EntryStatus",
- "description": ""
- },
{
"name": "conflicts",
"signature": "conflicts?: Conflict[]",
@@ -1296,26 +1165,6 @@
"name": "records",
"signature": "records?: RecordView[]",
"description": ""
- },
- {
- "name": "problem",
- "signature": "problem?: Problem",
- "description": ""
- },
- {
- "name": "published",
- "signature": "published?: PublishState",
- "description": "Present on file-backed replicas; not a confirmation/custody authority."
- },
- {
- "name": "preflight",
- "signature": "preflight?: Preflight",
- "description": "Dry run only."
- },
- {
- "name": "relocatedFrom",
- "signature": "relocatedFrom?: number",
- "description": "Earlier confirmed position after acknowledged-intent resurrection."
}
]
},
@@ -1342,8 +1191,8 @@
},
{
"name": "details",
- "signature": "readonly details?: unknown",
- "description": ""
+ "signature": "readonly details?: JsonValue",
+ "description": "Plain JSON, whatever the problem carries. Read one field with a narrowing check."
},
{
"name": "retryAfterMs",
@@ -1365,11 +1214,6 @@
"signature": "readonly mutationId?: Uuid",
"description": "The original mutation of a failed or unsettled write. Its outcome may still be\nunknown: resolve it with `receipt` / `awaitReceipt` / `pendingWrites` under this\nsame ID. The SDK never resubmits it under a new identity. Absent for reads and\ndry runs, which capture nothing. Not part of `toProblem`."
},
- {
- "name": "mutationIds",
- "signature": "readonly mutationIds?: readonly Uuid[]",
- "description": "Every original mutation of a failed partial batch, in op order."
- },
{
"name": "constructor",
"signature": "constructor(problem: Problem, context?: MdbaseErrorContext)",
@@ -1389,10 +1233,10 @@
"signature": "function isMdbaseError(e: unknown, code?: ErrorCode): e is MdbaseError;"
},
{
- "name": "summarizeStatus",
+ "name": "syncStatusText",
"kind": "function",
- "description": "Pass the application snapshot's `problem` as `problem` so a live server\nrefusal (collection_migrating, update_required, account_suspended) shows as\nthat, not as offline or catching up.",
- "signature": "function summarizeStatus(s: SyncStatus, problem?: string | null, transport?: TransportHealth | null, live?: boolean | null): StatusSummary;"
+ "description": "The sync status line every client shows: \"Confirmed through N, plus P pending, plus H\nheld\". Holds are never \"stuck\"; they are the user's pending choices.",
+ "signature": "function syncStatusText(s: SyncStatus): string;"
}
],
"index": [
@@ -1421,11 +1265,6 @@
"kind": "interface",
"description": ""
},
- {
- "name": "API_VERSIONS",
- "kind": "constant",
- "description": "API versions this SDK speaks, highest first."
- },
{
"name": "ApplicationJson",
"kind": "type",
@@ -1446,11 +1285,6 @@
"kind": "interface",
"description": "Historical chain at the echoed seq, NOT the local current chain/generations."
},
- {
- "name": "AppliedPrefixParams",
- "kind": "interface",
- "description": "Historical position to compare under the existing authenticated READ session."
- },
{
"name": "approvalReadiness",
"kind": "constant",
@@ -1466,54 +1300,29 @@
"kind": "interface",
"description": "A narrow original-app-consent port, supplied by the Connect client or owned native Worker."
},
- {
- "name": "AttachmentContentV1",
- "kind": "interface",
- "description": ""
- },
{
"name": "AttachmentHoldContent",
"kind": "interface",
"description": "Binary Hold content retains the COMPLETE typed manifest/content identity."
},
{
- "name": "AttachmentRefV1",
- "kind": "interface",
- "description": ""
- },
- {
- "name": "AuthenticatedRelayByteDuplex",
+ "name": "AuthorRef",
"kind": "interface",
- "description": "The authenticated relay stream `openPipe` returns."
+ "description": "Who wrote a version."
},
{
- "name": "BlobRef",
+ "name": "Backlink",
"kind": "interface",
"description": ""
},
{
- "name": "ByteChannel",
+ "name": "BacklinksResult",
"kind": "interface",
- "description": "A byte channel carrying the plaintext record stream (after Noise, if any)."
- },
- {
- "name": "bytesEqual",
- "kind": "function",
- "description": "Byte-wise equality."
+ "description": ""
},
{
- "name": "ByteStream",
+ "name": "BlobRef",
"kind": "interface",
- "description": "A duplex byte stream (a Node socket, a named pipe)."
- },
- {
- "name": "CborError",
- "kind": "class",
- "description": "Bytes that are not valid `mdb-cbor/1`, or a value that cannot be encoded."
- },
- {
- "name": "CborErrorKind",
- "kind": "type",
"description": ""
},
{
@@ -1534,7 +1343,7 @@
{
"name": "ChangesWatch",
"kind": "interface",
- "description": "Callable for compatibility with the former stop-only return value."
+ "description": ""
},
{
"name": "ChangesWatchState",
@@ -1542,84 +1351,49 @@
"description": "Local subscription state, not cache completeness or fresh authority."
},
{
- "name": "ClientKey",
+ "name": "CollectionMemberProfile",
"kind": "interface",
"description": ""
},
{
- "name": "clientPrologue",
+ "name": "compareVersions",
"kind": "function",
- "description": "The client session prologue."
+ "description": "SemVer precedence."
},
{
- "name": "Codec",
+ "name": "ConfirmedHead",
"kind": "interface",
- "description": ""
+ "description": "Confirmed-only prefix facts."
},
{
- "name": "COLLECTION_UNAVAILABLE_REASONS",
- "kind": "constant",
+ "name": "Conflict",
+ "kind": "interface",
"description": ""
},
{
- "name": "CollectionAvailability",
- "kind": "type",
+ "name": "ConflictEntry",
+ "kind": "interface",
"description": ""
},
{
- "name": "CollectionMemberProfile",
- "kind": "interface",
+ "name": "ConflictValue",
+ "kind": "type",
"description": ""
},
{
- "name": "collectionUnavailableError",
- "kind": "function",
- "description": "The error that opening an unavailable collection fails with."
+ "name": "ContractIdentity",
+ "kind": "interface",
+ "description": "The exact contract and implementation a view or write went through."
},
{
- "name": "CollectionUnavailableReason",
- "kind": "type",
+ "name": "ContractImplementation",
+ "kind": "interface",
"description": ""
},
- {
- "name": "compareVersions",
- "kind": "function",
- "description": "SemVer precedence."
- },
- {
- "name": "ConfirmedHead",
- "kind": "interface",
- "description": "Confirmed-only prefix facts."
- },
- {
- "name": "Conflict",
- "kind": "interface",
- "description": ""
- },
- {
- "name": "ConflictEntry",
- "kind": "interface",
- "description": ""
- },
- {
- "name": "ConflictValue",
- "kind": "type",
- "description": ""
- },
- {
- "name": "Connector",
- "kind": "interface",
- "description": "Opens a port to a replica and performs the hello exchange."
- },
- {
- "name": "ContractIdentity",
- "kind": "interface",
- "description": "The exact contract and implementation a view or write went through."
- },
{
"name": "ContractProjection",
"kind": "interface",
- "description": ""
+ "description": "One implementing type's view of a record."
},
{
"name": "ContractQueryOptions",
@@ -1652,22 +1426,7 @@
"description": "An exact registered record contract."
},
{
- "name": "ControlRouteOptions",
- "kind": "interface",
- "description": ""
- },
- {
- "name": "controlRouteResolver",
- "kind": "function",
- "description": "A `resolveRoute` for `relayConnector`, backed by the control plane."
- },
- {
- "name": "ControlRouteResponse",
- "kind": "interface",
- "description": ""
- },
- {
- "name": "ControlRouteTarget",
+ "name": "ContractSummary",
"kind": "interface",
"description": ""
},
@@ -1681,11 +1440,6 @@
"kind": "interface",
"description": ""
},
- {
- "name": "decode",
- "kind": "function",
- "description": "Decode exactly one canonical `mdb-cbor/1` item."
- },
{
"name": "DESCRIBE_TYPING_MAX_PATHS",
"kind": "constant",
@@ -1726,6 +1480,11 @@
"kind": "interface",
"description": ""
},
+ {
+ "name": "DescribeResult",
+ "kind": "interface",
+ "description": ""
+ },
{
"name": "DescribeTypingResult",
"kind": "interface",
@@ -1751,26 +1510,11 @@
"kind": "function",
"description": "The smallest single edit turning `base` into `next`, in Unicode scalar offsets of `base` (the `body_edits` unit)."
},
- {
- "name": "duplexCarrier",
- "kind": "function",
- "description": "Whole Noise messages over an authenticated relay duplex."
- },
{
"name": "effectiveCapabilities",
"kind": "function",
"description": "Prod `effectiveCapabilities`."
},
- {
- "name": "encode",
- "kind": "function",
- "description": "Encode a value in canonical `mdb-cbor/1` form."
- },
- {
- "name": "encodeSecret",
- "kind": "function",
- "description": "Encode key-bearing values, wiping all encoder-owned scratch buffers (including superseded growth buffers) on return or throw."
- },
{
"name": "ERROR_CODES",
"kind": "constant",
@@ -1851,26 +1595,6 @@
"kind": "function",
"description": "Format either computer's local comparison code, preserving leading zeroes."
},
- {
- "name": "framedPort",
- "kind": "function",
- "description": "Turn a byte channel of `u32be(length) ‖ frame` records into a frame port."
- },
- {
- "name": "FramePort",
- "kind": "interface",
- "description": ""
- },
- {
- "name": "fromHex",
- "kind": "function",
- "description": "Parse lowercase or uppercase hex."
- },
- {
- "name": "generateKeyPair",
- "kind": "function",
- "description": ""
- },
{
"name": "GrantInfo",
"kind": "interface",
@@ -1906,6 +1630,16 @@
"kind": "interface",
"description": ""
},
+ {
+ "name": "HistoryOptions",
+ "kind": "interface",
+ "description": "Options for `client.history.list`."
+ },
+ {
+ "name": "HistoryVersion",
+ "kind": "interface",
+ "description": ""
+ },
{
"name": "Hold",
"kind": "interface",
@@ -1956,16 +1690,6 @@
"kind": "type",
"description": ""
},
- {
- "name": "IkInitiator",
- "kind": "class",
- "description": "The initiator (client) side of IK."
- },
- {
- "name": "IkResponder",
- "kind": "class",
- "description": "The responder (replica) side of IK."
- },
{
"name": "Incident",
"kind": "interface",
@@ -1976,36 +1700,11 @@
"kind": "interface",
"description": ""
},
- {
- "name": "indexedDbKeyStorage",
- "kind": "function",
- "description": "Keys in IndexedDB (browsers, extensions, Obsidian)."
- },
- {
- "name": "InProcessConnectOptions",
- "kind": "interface",
- "description": ""
- },
- {
- "name": "inProcessConnector",
- "kind": "function",
- "description": "A connector to a runtime in this JS process."
- },
- {
- "name": "InProcessRuntime",
- "kind": "interface",
- "description": "What a shared runtime offers in process."
- },
{
"name": "InvalidPersonRecord",
"kind": "interface",
"description": ""
},
- {
- "name": "isCollectionUnavailableReason",
- "kind": "function",
- "description": ""
- },
{
"name": "isConfirmed",
"kind": "function",
@@ -2016,6 +1715,11 @@
"kind": "function",
"description": ""
},
+ {
+ "name": "isProtected",
+ "kind": "function",
+ "description": "True when a record is held or has unresolved conflicts."
+ },
{
"name": "isReadyPhase",
"kind": "function",
@@ -2027,29 +1731,14 @@
"description": ""
},
{
- "name": "isValid",
- "kind": "function",
- "description": "True when `bytes` is valid `mdb-cbor/1`."
- },
- {
- "name": "JsonLike",
+ "name": "JsonObject",
"kind": "type",
- "description": ""
- },
- {
- "name": "KeyPair",
- "kind": "interface",
- "description": ""
- },
- {
- "name": "keyPairFromSecret",
- "kind": "function",
- "description": ""
+ "description": "A JSON object, such as a record's frontmatter."
},
{
- "name": "KeyStorage",
- "kind": "interface",
- "description": ""
+ "name": "JsonValue",
+ "kind": "type",
+ "description": "A JSON value."
},
{
"name": "LinkState",
@@ -2066,36 +1755,6 @@
"kind": "interface",
"description": ""
},
- {
- "name": "LoadKeyOptions",
- "kind": "interface",
- "description": ""
- },
- {
- "name": "loadOrCreateClientKey",
- "kind": "function",
- "description": "Load one committed identity."
- },
- {
- "name": "LocalLink",
- "kind": "interface",
- "description": ""
- },
- {
- "name": "localLinkConnector",
- "kind": "function",
- "description": "A connector to the desktop daemon over the authenticated localhost link."
- },
- {
- "name": "LocalLinkConnectorOptions",
- "kind": "interface",
- "description": ""
- },
- {
- "name": "localLinkFirstPayload",
- "kind": "function",
- "description": "`{0."
- },
{
"name": "Materialization",
"kind": "interface",
@@ -2106,11 +1765,6 @@
"kind": "constant",
"description": "Convenience reads that return whole bytes are capped, as today (§10.2)."
},
- {
- "name": "MAX_DEPTH",
- "kind": "constant",
- "description": "Maximum nesting depth, as in the Rust codec."
- },
{
"name": "MDBASE_NOTIFICATION_CLICK",
"kind": "constant",
@@ -2126,11 +1780,6 @@
"kind": "interface",
"description": ""
},
- {
- "name": "MdbaseApplication",
- "kind": "interface",
- "description": ""
- },
{
"name": "MdbaseApplicationAssessment",
"kind": "interface",
@@ -2146,11 +1795,6 @@
"kind": "interface",
"description": ""
},
- {
- "name": "MdbaseApplicationEntry",
- "kind": "interface",
- "description": "Structural public consumer port."
- },
{
"name": "MdbaseApplicationFacet",
"kind": "type",
@@ -2186,21 +1830,6 @@
"kind": "type",
"description": "- none."
},
- {
- "name": "MdbaseApplicationSetup",
- "kind": "interface",
- "description": ""
- },
- {
- "name": "MdbaseApplicationSnapshot",
- "kind": "interface",
- "description": ""
- },
- {
- "name": "MdbaseApplicationUnavailableError",
- "kind": "class",
- "description": ""
- },
{
"name": "MdbaseApprovalOutcome",
"kind": "type",
@@ -2216,11 +1845,6 @@
"kind": "type",
"description": "One collection this app may open, as listed in `snapshot.collections`."
},
- {
- "name": "MdbaseConnect",
- "kind": "class",
- "description": "The application entry."
- },
{
"name": "mdbaseError",
"kind": "function",
@@ -2331,6 +1955,11 @@
"kind": "interface",
"description": ""
},
+ {
+ "name": "MdbaseSync",
+ "kind": "interface",
+ "description": ""
+ },
{
"name": "MdbaseTransferItem",
"kind": "interface",
@@ -2366,6 +1995,11 @@
"kind": "interface",
"description": "A declared type the app cannot use."
},
+ {
+ "name": "MdbaseUnlockSecret",
+ "kind": "type",
+ "description": "What the person typed to unlock a Private collection."
+ },
{
"name": "MdbaseVersion",
"kind": "interface",
@@ -2376,115 +2010,30 @@
"kind": "type",
"description": "How an installed version relates to the version an app ships."
},
- {
- "name": "memoryKeyStorage",
- "kind": "function",
- "description": "Keys in memory only (tests, short-lived scripts)."
- },
{
"name": "memoryWriteLedgerStore",
"kind": "function",
"description": ""
},
{
- "name": "MessageCarrier",
- "kind": "interface",
- "description": "A message-oriented channel carrying whole Noise messages."
- },
- {
- "name": "NextBridge",
- "kind": "interface",
- "description": "What `mdbaseNext(connection)` from `@mdbase-dev/connect/next` provides."
- },
- {
- "name": "nextRelayConnector",
- "kind": "function",
- "description": "A connector for web apps reaching a device replica through the relay."
- },
- {
- "name": "NextRelayConnectorOptions",
- "kind": "interface",
+ "name": "Op",
+ "kind": "type",
"description": ""
},
{
- "name": "NextRouteResponse",
+ "name": "PagesOptions",
"kind": "interface",
"description": ""
},
{
- "name": "NextRouteTarget",
+ "name": "PagesReset",
"kind": "interface",
"description": ""
},
{
- "name": "noiseChannel",
+ "name": "parseHoldCompareLink",
"kind": "function",
- "description": "A byte channel over an established Noise transport."
- },
- {
- "name": "noiseConnector",
- "kind": "function",
- "description": "A `Connector` that opens Noise IK sessions to a replica."
- },
- {
- "name": "NoiseConnectorOptions",
- "kind": "interface",
- "description": ""
- },
- {
- "name": "NoiseError",
- "kind": "class",
- "description": ""
- },
- {
- "name": "NoiseTarget",
- "kind": "interface",
- "description": ""
- },
- {
- "name": "NoiseTransport",
- "kind": "interface",
- "description": "The two transport ciphers after the handshake, and the handshake hash."
- },
- {
- "name": "Op",
- "kind": "type",
- "description": ""
- },
- {
- "name": "OpenConfig",
- "kind": "interface",
- "description": ""
- },
- {
- "name": "OpenedPort",
- "kind": "interface",
- "description": ""
- },
- {
- "name": "orderTargets",
- "kind": "function",
- "description": "Valid relay targets, sticky device first, then those hinted online, in route order."
- },
- {
- "name": "PagesOptions",
- "kind": "interface",
- "description": ""
- },
- {
- "name": "PagesReset",
- "kind": "interface",
- "description": ""
- },
- {
- "name": "parseCollectionAvailability",
- "kind": "function",
- "description": "Parse a server `availability` object."
- },
- {
- "name": "parseHoldCompareLink",
- "kind": "function",
- "description": "Parse a compare hand-off."
+ "description": "Parse a compare hand-off."
},
{
"name": "parseMdbaseNativeNotification",
@@ -2511,6 +2060,11 @@
"kind": "interface",
"description": ""
},
+ {
+ "name": "PendingMutation",
+ "kind": "interface",
+ "description": ""
+ },
{
"name": "PeopleAuthority",
"kind": "interface",
@@ -2547,25 +2101,15 @@
"description": ""
},
{
- "name": "PipeAuth",
- "kind": "interface",
- "description": ""
- },
- {
- "name": "pipeCloseError",
- "kind": "function",
- "description": ""
+ "name": "Plain",
+ "kind": "type",
+ "description": "`T` as the client hands it to an app."
},
{
"name": "PlainValue",
"kind": "type",
"description": "Plain JSON-ish data an app may pass where a `value` is expected."
},
- {
- "name": "portPair",
- "kind": "function",
- "description": "Two connected in-memory ports (tests, and same-process hosts)."
- },
{
"name": "PresenceApi",
"kind": "class",
@@ -2596,20 +2140,15 @@
"kind": "type",
"description": "Local file publication, independent of log confirmation."
},
- {
- "name": "QueryExecutionProfile",
- "kind": "type",
- "description": "Trusted host initialization policy, not a grant/session/query override."
- },
{
"name": "QueryGroup",
"kind": "interface",
- "description": "Complete pre-window grouping tuple and native summary results."
+ "description": ""
},
{
"name": "QueryMetadata",
"kind": "interface",
- "description": "Full metadata replacement bound to the enclosing live update's asOf."
+ "description": ""
},
{
"name": "queryPages",
@@ -2651,6 +2190,11 @@
"kind": "function",
"description": "Read the envelope kept on a shown notification, or on a native tap."
},
+ {
+ "name": "ReadOptions",
+ "kind": "interface",
+ "description": "What every read takes."
+ },
{
"name": "readViewSourceRecord",
"kind": "function",
@@ -2666,6 +2210,11 @@
"kind": "type",
"description": ""
},
+ {
+ "name": "RecordHistory",
+ "kind": "interface",
+ "description": ""
+ },
{
"name": "RecordLease",
"kind": "interface",
@@ -2677,9 +2226,9 @@
"description": ""
},
{
- "name": "RecordReader",
- "kind": "class",
- "description": "Splits a byte stream into `u32be(length) ‖ frame` records."
+ "name": "RecordReadOptions",
+ "kind": "interface",
+ "description": "A read that returns records."
},
{
"name": "RecordRecovery",
@@ -2722,47 +2271,57 @@
"description": ""
},
{
- "name": "RecordValidation",
- "kind": "interface",
+ "name": "RecordSet",
+ "kind": "class",
"description": ""
},
{
- "name": "RecordWrite",
- "kind": "interface",
- "description": "A create receipt with the record identity minted by the SDK, even when the replica omits optimistic records from its response."
+ "name": "RecordSetChange",
+ "kind": "type",
+ "description": "One record's change."
},
{
- "name": "Recovery",
+ "name": "RecordSetListener",
"kind": "type",
- "description": ""
+ "description": "`changes` is empty when only `state` or `problem` changed."
},
{
- "name": "recoveryFor",
- "kind": "function",
- "description": "The recovery action for a code, or `contact_support` for a code this SDK doesn't know."
+ "name": "RecordSetOptions",
+ "kind": "interface",
+ "description": ""
},
{
- "name": "RecoveryKeyStatus",
+ "name": "RecordSetSnapshot",
"kind": "interface",
"description": ""
},
{
- "name": "relayConnector",
- "kind": "function",
- "description": "A connector for web apps and other remote clients."
+ "name": "RecordSetState",
+ "kind": "type",
+ "description": "- `loading`."
},
{
- "name": "RelayConnectorOptions",
+ "name": "RecordValidation",
"kind": "interface",
"description": ""
},
{
- "name": "relayPipeCarrier",
+ "name": "RecordVersion",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "Recovery",
+ "kind": "type",
+ "description": ""
+ },
+ {
+ "name": "recoveryFor",
"kind": "function",
- "description": "Open a relay pipe and return a carrier of whole Noise messages."
+ "description": "The recovery action for a code, or `contact_support` for a code this SDK doesn't know."
},
{
- "name": "RelayRoute",
+ "name": "RecoveryKeyStatus",
"kind": "interface",
"description": ""
},
@@ -2786,16 +2345,6 @@
"kind": "function",
"description": "`sha256:` of a string's UTF-8 bytes."
},
- {
- "name": "routeFromControl",
- "kind": "function",
- "description": "The first usable target, or `null` when there is none (the SDK then reports `unavailable` / `no_device_online`."
- },
- {
- "name": "RuntimeInfo",
- "kind": "interface",
- "description": ""
- },
{
"name": "sameIdentity",
"kind": "function",
@@ -2807,19 +2356,19 @@
"description": "- `saved`."
},
{
- "name": "SchemaError",
- "kind": "class",
- "description": ""
+ "name": "Settlement",
+ "kind": "type",
+ "description": "How a write ended."
},
{
- "name": "Session",
- "kind": "class",
+ "name": "SettleOptions",
+ "kind": "interface",
"description": ""
},
{
- "name": "SESSION_LIFETIME_MS",
- "kind": "constant",
- "description": "Session lifetime (§12.3)."
+ "name": "SettleRead",
+ "kind": "interface",
+ "description": "Which record to read back once the write is kept, and how."
},
{
"name": "showMdbaseNotification",
@@ -2832,55 +2381,30 @@
"description": "Opening longer than this reads `slow` (SDK-9)."
},
{
- "name": "StaticKey",
- "kind": "interface",
- "description": "A static key the SDK can use without seeing the secret."
- },
- {
- "name": "staticKeyOf",
+ "name": "summarizeSync",
"kind": "function",
"description": ""
},
{
- "name": "StatusKind",
+ "name": "SyncAttention",
"kind": "type",
- "description": ""
+ "description": "One thing that needs the person, most pressing first in `MdbaseSync.attention`."
},
{
- "name": "StatusSummary",
+ "name": "SyncInput",
"kind": "interface",
"description": ""
},
{
- "name": "StoredKey",
+ "name": "SyncState",
"kind": "type",
- "description": "What a key store persists for one key."
- },
- {
- "name": "streamCarrier",
- "kind": "function",
- "description": "Carry Noise messages on a byte stream as `u16be(length) ‖ message`."
- },
- {
- "name": "structMap",
- "kind": "function",
- "description": "A struct map from `[key, value]` pairs, dropping `undefined` values."
- },
- {
- "name": "SubmitParams",
- "kind": "interface",
- "description": ""
+ "description": "What an indicator shows."
},
{
"name": "SyncStatus",
"kind": "interface",
"description": "\"Confirmed through N, plus pending\" (§7)."
},
- {
- "name": "syncStatusText",
- "kind": "function",
- "description": "The sync status line every client shows."
- },
{
"name": "TEMPORAL_HINTS",
"kind": "constant",
@@ -2956,15 +2480,10 @@
"kind": "class",
"description": "Opaque timer HTTP API."
},
- {
- "name": "toHex",
- "kind": "function",
- "description": "Lowercase hex."
- },
{
"name": "toPlain",
"kind": "function",
- "description": "A plain-object view of a value, for display and for code written against JSON."
+ "description": "A plain-object view of an exact value."
},
{
"name": "toValue",
@@ -3046,6 +2565,11 @@
"kind": "type",
"description": ""
},
+ {
+ "name": "TypeSummary",
+ "kind": "interface",
+ "description": ""
+ },
{
"name": "TypingEntry",
"kind": "interface",
@@ -3096,50 +2620,45 @@
"kind": "function",
"description": "Spec 12A-style equality of two values (exact."
},
+ {
+ "name": "VersionKind",
+ "kind": "type",
+ "description": "How an entry changed the record."
+ },
{
"name": "versionRelation",
"kind": "function",
"description": ""
},
{
- "name": "ViewSourceCreateInput",
- "kind": "interface",
- "description": "Capture identities once, before the first submission."
- },
- {
- "name": "ViewSourceReadOptions",
+ "name": "ViewDescriptor",
"kind": "interface",
"description": ""
},
{
- "name": "ViewSourceWriteOptions",
+ "name": "ViewSource",
"kind": "interface",
"description": ""
},
{
- "name": "WasmRuntime",
- "kind": "class",
- "description": "A `runtime.wasm` instance hosting one collection."
+ "name": "ViewSourceCreateInput",
+ "kind": "interface",
+ "description": "Capture identities once, before the first submission."
},
{
- "name": "WebPushChannelOptions",
+ "name": "ViewSourceReadOptions",
"kind": "interface",
"description": ""
},
{
- "name": "webSocketCarrier",
- "kind": "function",
- "description": "Open a WebSocket carrying one Noise message per binary message."
- },
- {
- "name": "WebSocketFactory",
- "kind": "type",
+ "name": "ViewSourceWriteOptions",
+ "kind": "interface",
"description": ""
},
{
- "name": "WebSocketLike",
+ "name": "WebPushChannelOptions",
"kind": "interface",
- "description": "The subset of the WebSocket API the SDK uses (browser `WebSocket`, Node 22's, `ws`)."
+ "description": ""
},
{
"name": "wire",
@@ -3322,6 +2841,11 @@
"signature": "connector(): Connector",
"description": "A connector for `MdbaseClient.connect`. Each `open` is a new session."
},
+ {
+ "name": "client",
+ "signature": "client(o?: Partial>): Promise",
+ "description": "A client connected to this replica. It does not reconnect by itself\nunless `reconnect` says so."
+ },
{
"name": "dropConnections",
"signature": "dropConnections(): void",
@@ -3334,8 +2858,8 @@
},
{
"name": "seed",
- "signature": "seed(r: { id?: w.Uuid; path: string; types?: string[]; frontmatter?: Record; body?: string; }): MemoryRecord",
- "description": "Seed a confirmed record directly."
+ "signature": "seed(r: { id?: w.Uuid; path: string; types?: string[]; frontmatter?: Record; body?: string; }): MemoryRecord",
+ "description": "Seed a confirmed record directly. Frontmatter is plain data, or the\nexact forms where a test wants them (`Float64`, `bigint`, a `Map`)."
},
{
"name": "confirmAll",
@@ -3344,7 +2868,7 @@
},
{
"name": "editElsewhere",
- "signature": "editElsewhere(ref: string, change: { body?: string; frontmatter?: Record; }): void",
+ "signature": "editElsewhere(ref: string, change: { body?: string; frontmatter?: Record; }): void",
"description": "Another device edits a record; the change arrives confirmed. A `null`\nfrontmatter value removes the field."
},
{
@@ -3367,6 +2891,16 @@
"signature": "failNextWrite(p?: w.Problem): void",
"description": "The next submit fails with `p` and captures nothing."
},
+ {
+ "name": "failNextRead",
+ "signature": "failNextRead(method: MemoryReplicaRead, p?: w.Problem): void",
+ "description": "The next `method` request fails with `p` and the one after it is answered."
+ },
+ {
+ "name": "pauseReads",
+ "signature": "pauseReads(method: MemoryReplicaRead): () => void",
+ "description": "Hold every `method` request until the returned function is called, as a\nslow replica would. Requests already answered are not affected."
+ },
{
"name": "stallConfirmations",
"signature": "stallConfirmations(stalled?: boolean): void",
@@ -3452,6 +2986,11 @@
"kind": "interface",
"description": ""
},
+ {
+ "name": "ApplicationFixtureSnapshot",
+ "kind": "type",
+ "description": "The snapshot a fixture is given."
+ },
{
"name": "createTestApp",
"kind": "function",
@@ -3477,6 +3016,11 @@
"kind": "interface",
"description": ""
},
+ {
+ "name": "MemoryReplicaRead",
+ "kind": "type",
+ "description": "A request `failNextRead` and `pauseReads` can target, by the client methods that send it."
+ },
{
"name": "serveNoise",
"kind": "function",
@@ -3519,6 +3063,1488 @@
}
]
},
+ {
+ "specifier": "@mdbase-dev/sdk/thin-client",
+ "title": "Thin client",
+ "featured": [
+ {
+ "name": "connect",
+ "kind": "function",
+ "description": "Connect to a replica.",
+ "signature": "function connect(opts: ClientOptions): Promise;"
+ },
+ {
+ "name": "ClientOptions",
+ "kind": "interface",
+ "description": "",
+ "signature": "interface ClientOptions",
+ "members": [
+ {
+ "name": "connector",
+ "signature": "connector: Connector",
+ "description": ""
+ },
+ {
+ "name": "app",
+ "signature": "app: { name: string; version: string; }",
+ "description": "App ID and version, sent in `hello`."
+ },
+ {
+ "name": "timezone",
+ "signature": "timezone?: string",
+ "description": "IANA time zone for this session's writes and queries. Defaults to the host's."
+ },
+ {
+ "name": "features",
+ "signature": "features?: string[]",
+ "description": "Extra features to request (\"fence\", \"presence\", ...)."
+ },
+ {
+ "name": "reconnect",
+ "signature": "reconnect?: false | { minDelayMs?: number; maxDelayMs?: number; }",
+ "description": "Reconnect after the link drops (default on)."
+ },
+ {
+ "name": "waitForDevice",
+ "signature": "waitForDevice?: boolean",
+ "description": "Private collections: wait for a device replica to come online and serve the collection instead of failing."
+ },
+ {
+ "name": "onWaiting",
+ "signature": "onWaiting?: (why: MdbaseError) => void",
+ "description": "Called while waiting for a device or the original Native grant to become live."
+ },
+ {
+ "name": "ledger",
+ "signature": "ledger?: WriteLedgerStore",
+ "description": "Where the write ledger persists (default: memory). Web apps get the replica's store."
+ },
+ {
+ "name": "signal",
+ "signature": "signal?: AbortSignal",
+ "description": ""
+ }
+ ]
+ }
+ ],
+ "index": [
+ {
+ "name": "ACCOUNT_KEY_STATES",
+ "kind": "constant",
+ "description": "Where an account-key unlock stands on this replica."
+ },
+ {
+ "name": "AccountKeyState",
+ "kind": "type",
+ "description": ""
+ },
+ {
+ "name": "AccountKeyStatus",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "API_VERSIONS",
+ "kind": "constant",
+ "description": "API versions this SDK speaks, highest first."
+ },
+ {
+ "name": "AppliedPrefix",
+ "kind": "interface",
+ "description": "Historical chain at the echoed seq, NOT the local current chain/generations."
+ },
+ {
+ "name": "AppliedPrefixParams",
+ "kind": "interface",
+ "description": "Historical position to compare under the existing authenticated READ session."
+ },
+ {
+ "name": "approvalReadiness",
+ "kind": "constant",
+ "description": ""
+ },
+ {
+ "name": "ApprovalReadiness",
+ "kind": "interface",
+ "description": "Host-only `approval` push, not a joiner code or an approval result."
+ },
+ {
+ "name": "AttachmentContentV1",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "AttachmentHoldContent",
+ "kind": "interface",
+ "description": "Binary Hold content retains the COMPLETE typed manifest/content identity."
+ },
+ {
+ "name": "AttachmentRefV1",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "AuthenticatedRelayByteDuplex",
+ "kind": "interface",
+ "description": "The authenticated relay stream `openPipe` returns."
+ },
+ {
+ "name": "AuthorRef",
+ "kind": "interface",
+ "description": "Who wrote a version."
+ },
+ {
+ "name": "Backlink",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "BacklinksResult",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "BlobRef",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "ByteChannel",
+ "kind": "interface",
+ "description": "A byte channel carrying the plaintext record stream (after Noise, if any)."
+ },
+ {
+ "name": "bytesEqual",
+ "kind": "function",
+ "description": "Byte-wise equality."
+ },
+ {
+ "name": "ByteStream",
+ "kind": "interface",
+ "description": "A duplex byte stream (a Node socket, a named pipe)."
+ },
+ {
+ "name": "CborError",
+ "kind": "class",
+ "description": "Bytes that are not valid `mdb-cbor/1`, or a value that cannot be encoded."
+ },
+ {
+ "name": "CborErrorKind",
+ "kind": "type",
+ "description": ""
+ },
+ {
+ "name": "CborMap",
+ "kind": "type",
+ "description": ""
+ },
+ {
+ "name": "CborValue",
+ "kind": "type",
+ "description": ""
+ },
+ {
+ "name": "Change",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "ChangesWatch",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "ChangesWatchState",
+ "kind": "type",
+ "description": "Local subscription state, not cache completeness or fresh authority."
+ },
+ {
+ "name": "ClientKey",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "clientPrologue",
+ "kind": "function",
+ "description": "The client session prologue."
+ },
+ {
+ "name": "Codec",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "COLLECTION_UNAVAILABLE_REASONS",
+ "kind": "constant",
+ "description": ""
+ },
+ {
+ "name": "CollectionAvailability",
+ "kind": "type",
+ "description": ""
+ },
+ {
+ "name": "collectionUnavailableError",
+ "kind": "function",
+ "description": "The error that opening an unavailable collection fails with."
+ },
+ {
+ "name": "CollectionUnavailableReason",
+ "kind": "type",
+ "description": ""
+ },
+ {
+ "name": "ConfirmedHead",
+ "kind": "interface",
+ "description": "Confirmed-only prefix facts."
+ },
+ {
+ "name": "Conflict",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "ConflictEntry",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "ConflictValue",
+ "kind": "type",
+ "description": ""
+ },
+ {
+ "name": "Connector",
+ "kind": "interface",
+ "description": "Opens a port to a replica and performs the hello exchange."
+ },
+ {
+ "name": "ContractIdentity",
+ "kind": "interface",
+ "description": "The exact contract and implementation a view or write went through."
+ },
+ {
+ "name": "ContractImplementation",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "ContractProjection",
+ "kind": "interface",
+ "description": "One implementing type's view of a record."
+ },
+ {
+ "name": "ContractQueryOptions",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "ContractQueryRecord",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "ContractQueryResult",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "ContractRecordView",
+ "kind": "interface",
+ "description": "One record's valid contract view."
+ },
+ {
+ "name": "ContractRef",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "ContractSelector",
+ "kind": "interface",
+ "description": "An exact registered record contract."
+ },
+ {
+ "name": "ContractSummary",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "ControlRouteOptions",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "controlRouteResolver",
+ "kind": "function",
+ "description": "A `resolveRoute` for `relayConnector`, backed by the control plane."
+ },
+ {
+ "name": "ControlRouteResponse",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "ControlRouteTarget",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "CreateInput",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "createViewSource",
+ "kind": "function",
+ "description": "Submit exactly the caller-captured document/UUID/MID through ordinary create."
+ },
+ {
+ "name": "decode",
+ "kind": "function",
+ "description": "Decode exactly one canonical `mdb-cbor/1` item."
+ },
+ {
+ "name": "DESCRIBE_TYPING_MAX_PATHS",
+ "kind": "constant",
+ "description": ""
+ },
+ {
+ "name": "DESCRIBE_TYPING_MAX_TYPES",
+ "kind": "constant",
+ "description": "Request bounds (`too_large` beyond them on the replica."
+ },
+ {
+ "name": "DescribeOptions",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "DescribeResult",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "DescribeTypingResult",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "DEVICE_KINDS",
+ "kind": "constant",
+ "description": "`device-kind` (policy.md)."
+ },
+ {
+ "name": "DeviceKind",
+ "kind": "type",
+ "description": ""
+ },
+ {
+ "name": "diffEdits",
+ "kind": "function",
+ "description": "The smallest single edit turning `base` into `next`, in Unicode scalar offsets of `base` (the `body_edits` unit)."
+ },
+ {
+ "name": "duplexCarrier",
+ "kind": "function",
+ "description": "Whole Noise messages over an authenticated relay duplex."
+ },
+ {
+ "name": "encode",
+ "kind": "function",
+ "description": "Encode a value in canonical `mdb-cbor/1` form."
+ },
+ {
+ "name": "encodeSecret",
+ "kind": "function",
+ "description": "Encode key-bearing values, wiping all encoder-owned scratch buffers (including superseded growth buffers) on return or throw."
+ },
+ {
+ "name": "ERROR_CODES",
+ "kind": "constant",
+ "description": ""
+ },
+ {
+ "name": "ErrorCode",
+ "kind": "type",
+ "description": ""
+ },
+ {
+ "name": "ExecuteViewOptions",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "FenceHandler",
+ "kind": "type",
+ "description": "Fence handler offered by an editor host (§14)."
+ },
+ {
+ "name": "FileAction",
+ "kind": "type",
+ "description": "What a session may do with files."
+ },
+ {
+ "name": "FileContentProfile",
+ "kind": "type",
+ "description": "Actual persisted file kind and content representation (§10.1), never inferred from the path."
+ },
+ {
+ "name": "fileGrant",
+ "kind": "function",
+ "description": "The file actions and folder scope of a session, mapped from its native grant."
+ },
+ {
+ "name": "FileGrant",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "FileRef",
+ "kind": "type",
+ "description": ""
+ },
+ {
+ "name": "FilesApi",
+ "kind": "class",
+ "description": ""
+ },
+ {
+ "name": "FileScope",
+ "kind": "type",
+ "description": "Where file actions apply."
+ },
+ {
+ "name": "FileView",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "FileWrite",
+ "kind": "interface",
+ "description": "A tracked upload receipt with its original, replica-owned file identity."
+ },
+ {
+ "name": "Float64",
+ "kind": "class",
+ "description": "A float whose value is integral (or −0), kept distinct from an integer."
+ },
+ {
+ "name": "formatSas",
+ "kind": "function",
+ "description": "Format either computer's local comparison code, preserving leading zeroes."
+ },
+ {
+ "name": "framedPort",
+ "kind": "function",
+ "description": "Turn a byte channel of `u32be(length) ‖ frame` records into a frame port."
+ },
+ {
+ "name": "FramePort",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "fromHex",
+ "kind": "function",
+ "description": "Parse lowercase or uppercase hex."
+ },
+ {
+ "name": "generateKeyPair",
+ "kind": "function",
+ "description": ""
+ },
+ {
+ "name": "GrantInfo",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "Hash",
+ "kind": "type",
+ "description": "`sha256:<64 lowercase hex>`."
+ },
+ {
+ "name": "HelloResult",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "HistoryOptions",
+ "kind": "interface",
+ "description": "Options for `client.history.list`."
+ },
+ {
+ "name": "HistoryVersion",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "Hold",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "HoldReason",
+ "kind": "type",
+ "description": ""
+ },
+ {
+ "name": "HoldResolution",
+ "kind": "type",
+ "description": ""
+ },
+ {
+ "name": "IkInitiator",
+ "kind": "class",
+ "description": "The initiator (client) side of IK."
+ },
+ {
+ "name": "IkResponder",
+ "kind": "class",
+ "description": "The responder (replica) side of IK."
+ },
+ {
+ "name": "Incident",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "Include",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "indexedDbKeyStorage",
+ "kind": "function",
+ "description": "Keys in IndexedDB (browsers, extensions, Obsidian)."
+ },
+ {
+ "name": "InProcessConnectOptions",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "inProcessConnector",
+ "kind": "function",
+ "description": "A connector to a runtime in this JS process."
+ },
+ {
+ "name": "InProcessRuntime",
+ "kind": "interface",
+ "description": "What a shared runtime offers in process."
+ },
+ {
+ "name": "isCollectionUnavailableReason",
+ "kind": "function",
+ "description": ""
+ },
+ {
+ "name": "isConfirmed",
+ "kind": "function",
+ "description": "True once a write is durable."
+ },
+ {
+ "name": "isErrorCode",
+ "kind": "function",
+ "description": ""
+ },
+ {
+ "name": "isMdbaseError",
+ "kind": "function",
+ "description": ""
+ },
+ {
+ "name": "isProtected",
+ "kind": "function",
+ "description": "True when a record is held or has unresolved conflicts."
+ },
+ {
+ "name": "Issue",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "isValid",
+ "kind": "function",
+ "description": "True when `bytes` is valid `mdb-cbor/1`."
+ },
+ {
+ "name": "JsonObject",
+ "kind": "type",
+ "description": "A JSON object, such as a record's frontmatter."
+ },
+ {
+ "name": "JsonValue",
+ "kind": "type",
+ "description": "A JSON value."
+ },
+ {
+ "name": "KeyPair",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "keyPairFromSecret",
+ "kind": "function",
+ "description": ""
+ },
+ {
+ "name": "KeyStorage",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "LinkState",
+ "kind": "type",
+ "description": "The link between this client and its replica (not the replica's sync state)."
+ },
+ {
+ "name": "ListViewsResult",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "LiveQuery",
+ "kind": "class",
+ "description": "A live query handle."
+ },
+ {
+ "name": "LiveQueryState",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "LoadKeyOptions",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "loadOrCreateClientKey",
+ "kind": "function",
+ "description": "Load one committed identity."
+ },
+ {
+ "name": "LocalLink",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "localLinkConnector",
+ "kind": "function",
+ "description": "A connector to the desktop daemon over the authenticated localhost link."
+ },
+ {
+ "name": "LocalLinkConnectorOptions",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "localLinkFirstPayload",
+ "kind": "function",
+ "description": "`{0."
+ },
+ {
+ "name": "Materialization",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "MAX_CONVENIENCE_BYTES",
+ "kind": "constant",
+ "description": "Convenience reads that return whole bytes are capped, as today (§10.2)."
+ },
+ {
+ "name": "MAX_DEPTH",
+ "kind": "constant",
+ "description": "Maximum nesting depth, as in the Rust codec."
+ },
+ {
+ "name": "MdbaseClient",
+ "kind": "class",
+ "description": ""
+ },
+ {
+ "name": "mdbaseError",
+ "kind": "function",
+ "description": "Build an error locally (transport failures, cancellation, schema mismatches)."
+ },
+ {
+ "name": "MdbaseError",
+ "kind": "class",
+ "description": "An error from a replica or from the SDK itself."
+ },
+ {
+ "name": "MdbaseErrorContext",
+ "kind": "interface",
+ "description": "Local facts about a failure that are not part of the wire problem."
+ },
+ {
+ "name": "MdbaseSync",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "memoryKeyStorage",
+ "kind": "function",
+ "description": "Keys in memory only (tests, short-lived scripts)."
+ },
+ {
+ "name": "memoryWriteLedgerStore",
+ "kind": "function",
+ "description": ""
+ },
+ {
+ "name": "MessageCarrier",
+ "kind": "interface",
+ "description": "A message-oriented channel carrying whole Noise messages."
+ },
+ {
+ "name": "NextBridge",
+ "kind": "interface",
+ "description": "What `mdbaseNext(connection)` from `@mdbase-dev/connect/next` provides."
+ },
+ {
+ "name": "nextRelayConnector",
+ "kind": "function",
+ "description": "A connector for web apps reaching a device replica through the relay."
+ },
+ {
+ "name": "NextRelayConnectorOptions",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "NextRouteResponse",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "NextRouteTarget",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "noiseChannel",
+ "kind": "function",
+ "description": "A byte channel over an established Noise transport."
+ },
+ {
+ "name": "noiseConnector",
+ "kind": "function",
+ "description": "A `Connector` that opens Noise IK sessions to a replica."
+ },
+ {
+ "name": "NoiseConnectorOptions",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "NoiseError",
+ "kind": "class",
+ "description": ""
+ },
+ {
+ "name": "NoiseTarget",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "NoiseTransport",
+ "kind": "interface",
+ "description": "The two transport ciphers after the handshake, and the handshake hash."
+ },
+ {
+ "name": "Op",
+ "kind": "type",
+ "description": ""
+ },
+ {
+ "name": "OpenConfig",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "OpenedPort",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "orderTargets",
+ "kind": "function",
+ "description": "Valid relay targets in connection order."
+ },
+ {
+ "name": "PagesOptions",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "PagesReset",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "parseCollectionAvailability",
+ "kind": "function",
+ "description": "Parse a server `availability` object."
+ },
+ {
+ "name": "Peer",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "PendingDevice",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "PendingMutation",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "PipeAuth",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "pipeCloseError",
+ "kind": "function",
+ "description": ""
+ },
+ {
+ "name": "Plain",
+ "kind": "type",
+ "description": "`T` as the client hands it to an app."
+ },
+ {
+ "name": "PlainValue",
+ "kind": "type",
+ "description": "Plain JSON-ish data an app may pass where a `value` is expected."
+ },
+ {
+ "name": "portPair",
+ "kind": "function",
+ "description": "Two connected in-memory ports (tests, and same-process hosts)."
+ },
+ {
+ "name": "PresenceApi",
+ "kind": "class",
+ "description": ""
+ },
+ {
+ "name": "Problem",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "PublishState",
+ "kind": "type",
+ "description": "Local file publication, independent of log confirmation."
+ },
+ {
+ "name": "Query",
+ "kind": "type",
+ "description": "A spec 11 query object."
+ },
+ {
+ "name": "QueryExecutionProfile",
+ "kind": "type",
+ "description": "Trusted host initialization policy, not a grant/session/query override."
+ },
+ {
+ "name": "QueryGroup",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "QueryMetadata",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "queryPages",
+ "kind": "function",
+ "description": "Alias the canonical paginator."
+ },
+ {
+ "name": "QueryResult",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "QueryUpdate",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "READ_MANY_MAX_CONCURRENCY",
+ "kind": "constant",
+ "description": ""
+ },
+ {
+ "name": "READ_MANY_MAX_REFS",
+ "kind": "constant",
+ "description": ""
+ },
+ {
+ "name": "readMany",
+ "kind": "function",
+ "description": "Ordered ordinary reads, not a transaction or a consistent native snapshot."
+ },
+ {
+ "name": "ReadManyOptions",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "ReadOptions",
+ "kind": "interface",
+ "description": "What every read takes."
+ },
+ {
+ "name": "readViewSourceRecord",
+ "kind": "function",
+ "description": "Read a complete current local record, not a projection or a source-text DTO."
+ },
+ {
+ "name": "Receipt",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "RecordFlushOptions",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "RecordFlushResult",
+ "kind": "type",
+ "description": ""
+ },
+ {
+ "name": "RecordHistory",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "RecordLease",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "RecordOpenOptions",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "RecordReader",
+ "kind": "class",
+ "description": "Splits a byte stream into `u32be(length) ‖ frame` records."
+ },
+ {
+ "name": "RecordReadOptions",
+ "kind": "interface",
+ "description": "A read that returns records."
+ },
+ {
+ "name": "RecordRecovery",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "RecordRecoveryRef",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "RecordRef",
+ "kind": "type",
+ "description": ""
+ },
+ {
+ "name": "RecordResolution",
+ "kind": "type",
+ "description": ""
+ },
+ {
+ "name": "Records",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "RecordSession",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "RecordSessionSnapshot",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "RecordSessionState",
+ "kind": "type",
+ "description": ""
+ },
+ {
+ "name": "RecordSet",
+ "kind": "class",
+ "description": ""
+ },
+ {
+ "name": "RecordSetChange",
+ "kind": "type",
+ "description": "One record's change."
+ },
+ {
+ "name": "RecordSetListener",
+ "kind": "type",
+ "description": "`changes` is empty when only `state` or `problem` changed."
+ },
+ {
+ "name": "RecordSetOptions",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "RecordSetSnapshot",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "RecordSetState",
+ "kind": "type",
+ "description": "- `loading`."
+ },
+ {
+ "name": "RecordValidation",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "RecordVersion",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "RecordView",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "RecordWrite",
+ "kind": "interface",
+ "description": "A create, with the record ID the SDK minted."
+ },
+ {
+ "name": "Recovery",
+ "kind": "type",
+ "description": ""
+ },
+ {
+ "name": "recoveryFor",
+ "kind": "function",
+ "description": "The recovery action for a code, or `contact_support` for a code this SDK doesn't know."
+ },
+ {
+ "name": "RecoveryKeyStatus",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "relayConnector",
+ "kind": "function",
+ "description": "A connector for web apps and other remote clients."
+ },
+ {
+ "name": "RelayConnectorOptions",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "relayPipeCarrier",
+ "kind": "function",
+ "description": "Open a relay pipe and return a carrier of whole Noise messages."
+ },
+ {
+ "name": "RelayRoute",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "resolveRecordLinks",
+ "kind": "function",
+ "description": "Resolve a persisted flat frontmatter key through ONE ordinary native query."
+ },
+ {
+ "name": "Resyncing",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "ResyncPhase",
+ "kind": "type",
+ "description": "Allocated lost-tail repair phases."
+ },
+ {
+ "name": "revisionOf",
+ "kind": "function",
+ "description": "`sha256:` of a string's UTF-8 bytes."
+ },
+ {
+ "name": "routeFromControl",
+ "kind": "function",
+ "description": "The first usable target, or `null` when there is none (the SDK then reports `unavailable` / `no_device_online`."
+ },
+ {
+ "name": "RuntimeInfo",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "SaveState",
+ "kind": "type",
+ "description": "- `saved`."
+ },
+ {
+ "name": "SchemaError",
+ "kind": "class",
+ "description": ""
+ },
+ {
+ "name": "Session",
+ "kind": "class",
+ "description": ""
+ },
+ {
+ "name": "SESSION_LIFETIME_MS",
+ "kind": "constant",
+ "description": "Session lifetime (§12.3)."
+ },
+ {
+ "name": "Settlement",
+ "kind": "type",
+ "description": "How a write ended."
+ },
+ {
+ "name": "SettleOptions",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "SettleRead",
+ "kind": "interface",
+ "description": "Which record to read back once the write is kept, and how."
+ },
+ {
+ "name": "StaticKey",
+ "kind": "interface",
+ "description": "A static key the SDK can use without seeing the secret."
+ },
+ {
+ "name": "staticKeyOf",
+ "kind": "function",
+ "description": ""
+ },
+ {
+ "name": "StoredKey",
+ "kind": "type",
+ "description": "What a key store persists for one key."
+ },
+ {
+ "name": "streamCarrier",
+ "kind": "function",
+ "description": "Carry Noise messages on a byte stream as `u16be(length) ‖ message`."
+ },
+ {
+ "name": "structMap",
+ "kind": "function",
+ "description": "A struct map from `[key, value]` pairs, dropping `undefined` values."
+ },
+ {
+ "name": "SubmitParams",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "summarizeSync",
+ "kind": "function",
+ "description": ""
+ },
+ {
+ "name": "SyncAttention",
+ "kind": "type",
+ "description": "One thing that needs the person, most pressing first in `MdbaseSync.attention`."
+ },
+ {
+ "name": "SyncInput",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "SyncState",
+ "kind": "type",
+ "description": "What an indicator shows."
+ },
+ {
+ "name": "SyncStatus",
+ "kind": "interface",
+ "description": "\"Confirmed through N, plus pending\" (§7)."
+ },
+ {
+ "name": "TEMPORAL_HINTS",
+ "kind": "constant",
+ "description": "Core's `temporal_hint`."
+ },
+ {
+ "name": "TemporalHint",
+ "kind": "type",
+ "description": ""
+ },
+ {
+ "name": "TextOrBlob",
+ "kind": "type",
+ "description": "Text/legacy BlobRef bytes are unchanged."
+ },
+ {
+ "name": "toHex",
+ "kind": "function",
+ "description": "Lowercase hex."
+ },
+ {
+ "name": "toPlain",
+ "kind": "function",
+ "description": "A plain-object view of an exact value."
+ },
+ {
+ "name": "toValue",
+ "kind": "function",
+ "description": "Convert plain data into a `value`."
+ },
+ {
+ "name": "TransferProgress",
+ "kind": "interface",
+ "description": "Upload transfers are identified by UUID, download streams by number."
+ },
+ {
+ "name": "TransportHealth",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "TransportHealthKind",
+ "kind": "type",
+ "description": "Why the log cannot be reached right now, from the last failed request."
+ },
+ {
+ "name": "TypeCreation",
+ "kind": "interface",
+ "description": "A type created by `MdbaseClient.createType`."
+ },
+ {
+ "name": "TypePackAction",
+ "kind": "type",
+ "description": ""
+ },
+ {
+ "name": "TypePackApplyResult",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "TypePackConflict",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "TypePackOptions",
+ "kind": "interface",
+ "description": "The caller's decisions."
+ },
+ {
+ "name": "TypePackPlan",
+ "kind": "interface",
+ "description": "One reviewable plan."
+ },
+ {
+ "name": "TypePackProvision",
+ "kind": "interface",
+ "description": "A pack."
+ },
+ {
+ "name": "TypePackReceipt",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "TypePackRefusalCode",
+ "kind": "type",
+ "description": "Stable refusal codes."
+ },
+ {
+ "name": "TypePackResource",
+ "kind": "interface",
+ "description": "One resource of the plan."
+ },
+ {
+ "name": "TypePackResourceKind",
+ "kind": "type",
+ "description": ""
+ },
+ {
+ "name": "TypePackStatus",
+ "kind": "type",
+ "description": ""
+ },
+ {
+ "name": "TypeSummary",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "TypingEntry",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "UpdateInput",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "updateViewSource",
+ "kind": "function",
+ "description": "Replace a full source at its actual captured UUID/path/revision, including a pending local revision."
+ },
+ {
+ "name": "UploadOptions",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "UploadSource",
+ "kind": "type",
+ "description": "Anything the SDK can upload from."
+ },
+ {
+ "name": "Uuid",
+ "kind": "type",
+ "description": ""
+ },
+ {
+ "name": "uuidv7",
+ "kind": "function",
+ "description": "A new UUIDv7 (RFC 9562)."
+ },
+ {
+ "name": "ValidationIssue",
+ "kind": "interface",
+ "description": "A real Core diagnostic of a current persisted/local-native record."
+ },
+ {
+ "name": "ValidationLevel",
+ "kind": "type",
+ "description": "Validation level (spec 04)."
+ },
+ {
+ "name": "Value",
+ "kind": "type",
+ "description": "A frontmatter or app value."
+ },
+ {
+ "name": "valueEquals",
+ "kind": "function",
+ "description": "Spec 12A-style equality of two values (exact."
+ },
+ {
+ "name": "VersionKind",
+ "kind": "type",
+ "description": "How an entry changed the record."
+ },
+ {
+ "name": "ViewDescriptor",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "ViewSource",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "ViewSourceCreateInput",
+ "kind": "interface",
+ "description": "Capture identities once, before the first submission."
+ },
+ {
+ "name": "ViewSourceReadOptions",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "ViewSourceWriteOptions",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "WasmRuntime",
+ "kind": "class",
+ "description": "A `runtime.wasm` instance hosting one collection."
+ },
+ {
+ "name": "webSocketCarrier",
+ "kind": "function",
+ "description": "Open a WebSocket carrying one Noise message per binary message."
+ },
+ {
+ "name": "WebSocketFactory",
+ "kind": "type",
+ "description": ""
+ },
+ {
+ "name": "WebSocketLike",
+ "kind": "interface",
+ "description": "The subset of the WebSocket API the SDK uses (browser `WebSocket`, Node 22's, `ws`)."
+ },
+ {
+ "name": "wire",
+ "kind": "value",
+ "description": ""
+ },
+ {
+ "name": "Write",
+ "kind": "class",
+ "description": "A submitted write."
+ },
+ {
+ "name": "WriteLedgerEntry",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "WriteLedgerSnapshot",
+ "kind": "interface",
+ "description": ""
+ },
+ {
+ "name": "WriteLedgerStore",
+ "kind": "interface",
+ "description": "Where entries persist."
+ },
+ {
+ "name": "WriteLedgerView",
+ "kind": "interface",
+ "description": "`client.ledger`."
+ },
+ {
+ "name": "WriteOptions",
+ "kind": "interface",
+ "description": ""
+ }
+ ]
+ },
{
"specifier": "@mdbase-dev/sdk/node",
"title": "Node connectors",
diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro
index 32e1c49..b2238a4 100644
--- a/src/layouts/BaseLayout.astro
+++ b/src/layouts/BaseLayout.astro
@@ -7,6 +7,7 @@ import "@fontsource/azeret-mono/400.css";
import "@fontsource/azeret-mono/500.css";
import "../styles/shell.css";
import "../styles/global.css";
+import "../styles/app-shot.css";
import FontPreloads from "../components/FontPreloads.astro";
import MediaViewer from "../components/MediaViewer.astro";
import SiteHeader from "../components/SiteHeader.astro";
diff --git a/src/layouts/HomeLayout.astro b/src/layouts/HomeLayout.astro
index 7e0898c..14085da 100644
--- a/src/layouts/HomeLayout.astro
+++ b/src/layouts/HomeLayout.astro
@@ -1,4 +1,5 @@
---
+import "../styles/app-shot.css";
import "@fontsource/ibm-plex-sans/400.css";
import "@fontsource/ibm-plex-sans/400-italic.css";
import "@fontsource/ibm-plex-sans/500.css";
diff --git a/src/markdown/app-shot.mjs b/src/markdown/app-shot.mjs
new file mode 100644
index 0000000..e0db4c3
--- /dev/null
+++ b/src/markdown/app-shot.mjs
@@ -0,0 +1,91 @@
+export const escapeHtml = (value) =>
+ String(value).replace(/&/g, "&").replace(//g, ">").replace(/"/g, """);
+
+// The window bar shows a web app's address, or the desktop app's name.
+export const hosts = {
+ "obsidian-survey": "Obsidian",
+ "worklog-reload": "localhost:5173",
+ "worklog-form": "localhost:5173",
+ "worklog-setup": "Terminal",
+ "query-read": "mdbase CLI",
+ "query-status": "mdbase CLI",
+ "query-folder": "mdbase CLI",
+ "thesis-export": "Writer demo",
+ "thesis-source": "Writer demo",
+ "thesis-layout": "Writer demo",
+ "local-mcp": "Filesystem MCP",
+ "zotero-result": "reader.mdbase.dev",
+ "zotero-preview": "reader.mdbase.dev",
+ "zotero-input": "reader.mdbase.dev",
+ "editor-chooser": "editor.mdbase.dev",
+ "editor-source": "editor.mdbase.dev",
+ "editor-survey": "editor.mdbase.dev",
+ "editor-draft": "editor.mdbase.dev",
+ "readwise-result": "reader.mdbase.dev",
+ "readwise-preview": "reader.mdbase.dev",
+ "readwise-input": "reader.mdbase.dev",
+ "survey-note": "mdbase CLI",
+ tasknotes: "app.tasknotes.dev",
+ editor: "editor.mdbase.dev",
+ reader: "reader.mdbase.dev",
+ writer: "writer.mdbase.dev",
+ "connect-approve": "connect.mdbase.dev",
+ "connect-collections": "connect.mdbase.dev",
+ "connect-sharing": "connect.mdbase.dev",
+ "mcp-permissions": "connect.mdbase.dev",
+ "vault-sync": "mdbase Connect",
+ "desktop-home": "mdbase Connect",
+ "desktop-collections": "mdbase Connect"
+};
+
+// On a phone a whole window is too small to read, so each capture names the part
+// worth showing there: its left and top edges, width and height, as fractions of
+// the capture. Opening the screenshot shows all of it.
+const crops = {
+ "obsidian-survey": [0.305, 0.08, 0.67, 0.64],
+ "worklog-reload": [0.2, 0.01, 0.61, 0.43],
+ "worklog-form": [0.2, 0.01, 0.61, 0.43],
+ "worklog-setup": [0, 0, 0.83, 0.48],
+ "query-read": [0, 0, 0.68, 0.48],
+ "query-status": [0, 0, 0.66, 0.32],
+ "query-folder": [0, 0, 0.65, 0.42],
+ "thesis-export": [0.48, 0, 0.52, 0.65],
+ "thesis-source": [0, 0, 0.49, 0.7],
+ "thesis-layout": [0.27, 0.24, 0.46, 0.55],
+ "local-mcp": [0, 0, 0.82, 0.64],
+ "zotero-result": [0.09, 0.35, 0.78, 0.64],
+ "zotero-preview": [0.09, 0, 0.77, 0.65],
+ "zotero-input": [0.08, 0.35, 0.79, 0.62],
+ "editor-chooser": [0, 0, 0.62, 0.68],
+ "editor-source": [0.44, 0.03, 0.55, 0.85],
+ "editor-survey": [0.32, 0.05, 0.66, 0.72],
+ "editor-draft": [0.32, 0.05, 0.66, 0.72],
+ "readwise-result": [0.09, 0.35, 0.78, 0.64],
+ "readwise-preview": [0.09, 0, 0.77, 0.65],
+ "readwise-input": [0.08, 0.35, 0.79, 0.62],
+ "survey-note": [0.015, 0.01, 0.84, 0.5],
+ tasknotes: [0.2, 0.02, 0.62, 0.62],
+ editor: [0.25, 0, 0.62, 0.62],
+ reader: [0.2, 0.08, 0.6, 0.6],
+ writer: [0, 0, 0.62, 0.62],
+ "connect-approve": [0.19, 0.09, 0.62, 0.89],
+ "connect-collections": [0.21, 0.02, 0.62, 0.62],
+ "connect-sharing": [0.19, 0.52, 0.79, 0.36],
+ "mcp-permissions": [0.22, 0.1, 0.58, 0.8],
+ "vault-sync": [0.24, 0.2, 0.52, 0.6],
+ "desktop-home": [0.22, 0.03, 0.4, 0.5],
+ "desktop-collections": [0.22, 0.03, 0.6, 0.5]
+};
+
+export function shotWindow(name, alt, eager = false) {
+ if (!Object.hasOwn(hosts, name)) throw new Error(`Unknown screenshot: ${name}`);
+ const [x, y, w, h] = crops[name];
+ const crop = `--crop-x:${x};--crop-y:${y};--crop-w:${w};--crop-ratio:${(1.6 * w / h).toFixed(3)}`;
+ const images = ["light", "dark"].map(theme =>
+ ``
+ ).join("");
+ return `
+
${hosts[name]}
+
${images}
+
`;
+}
diff --git a/src/markdown/doc-records.mjs b/src/markdown/doc-records.mjs
index 6b9955a..0fd77d4 100644
--- a/src/markdown/doc-records.mjs
+++ b/src/markdown/doc-records.mjs
@@ -1,14 +1,8 @@
// Markdown pipeline for the documentation records in content/.
//
-// The records stay ordinary Markdown. These plugins give three conventions
-// their meaning on the site (content/_types/doc-page.md describes them, and a
-// fourth, card lists, that needs only a stylesheet rule):
-// - a code block's `title="…"` becomes its caption;
-// - `file="examples/…"` shows that file from this repository, so a listing
-// cannot drift from the example app CI builds, and `pick="key"` keeps one
-// key of a JSON file;
-// - an image of a recording in /videos/ becomes the recording, with its
-// captions and text description.
+// content/_types/doc-page.md documents the authoring conventions. Here we
+// caption code, include example files and render media with their controls.
+import { escapeHtml, shotWindow } from "./app-shot.mjs";
import { readFileSync } from "node:fs";
import { resolve } from "node:path";
import { fileURLToPath } from "node:url";
@@ -40,9 +34,6 @@ export function includedText(attributes) {
return JSON.stringify({ [attributes.pick]: value }, null, 2);
}
-const escape = (value) =>
- String(value).replace(/&/g, "&").replace(//g, ">").replace(/"/g, """);
-
export function videoFigure(name) {
const video = videos[name];
if (!video) throw new Error(`Unknown recording /videos/${name}.mp4`);
@@ -51,13 +42,13 @@ export function videoFigure(name) {
const descriptionId = `video-${name}-description`;
return [
``,
- `${escape(video.title)}${escape(video.duration)}`,
+ `${escapeHtml(video.title)}${escapeHtml(video.duration)}`,
``,
- `
${escape(video.description)} Silent recording with on-screen captions and sample data.
`,
- `Text description of the recording${video.steps.map((step) => `
${escape(step)}
`).join("")}`,
+ `
${escapeHtml(video.description)} Silent recording with on-screen captions and sample data.
`,
+ `Text description of the recording${video.steps.map((step) => `