{"blyg":"0.4","id":"7yavj4m7ddnbjhtxfmk1jk2jrd","kind":"thread","origin":"https://blyg.blygger.org/","page":"t/7yavj4m7ddnbjhtxfmk1jk2jrd/","author":{"name":"Venkatesh Rao","url":"https://blyg.blygger.org/"},"created":"2026-10-10T23:08:36Z","updated":"2026-10-10T23:08:36Z","version":1,"content_md":"\n# Blygger Studio 0.40.0\n\n*Released 2026-10-10, the reference client. [v0.40.0 on GitHub](https://github.com/blygger/blygger-studio/releases/tag/v0.40.0).*\n\n**Migrations: none.** Six contributor PRs, merged together.\n\n**`/api`, all additive:** `GET /api/reading/imported` (#61); `Settings` gains\n`custom_theme`, `custom_theme_dark`, `custom_theme_name` and `font` (#58); in\n`GET /api/ai/models` a provider's `key_secret` is optional and a Workers AI\nprovider carries `binding` (#60); the lineage-glyph extension's two reads under\n`/api/ext/lineage-glyph/` (#53, 404 unless compiled in and enabled).\n\n### Reading API (Aneesh Sathe, #61)\n\n- **`GET /api/reading/imported`**, under `owner:read`: every imported item,\n  newest observed first, with the fields a client authors from (markdown,\n  author, signal, hopper ids, the origin's transclusions, `stubOf` and\n  `forkedFrom` verbatim, `readVersion`). Paged by an opaque keyset cursor over\n  `(observed_at, subscription, id)`, so ties split exactly and a poll between\n  two requests never shifts or repeats rows. A cursor the server did not issue\n  is a 400; `limit` is 1–100, default 50. For clients such as Blygger Desktop\n  that would otherwise need one `/imports/{sub}/{id}` call per row.\n\n### Public pages (Aneesh Sathe, #62, closes #9)\n\n- **A paragraph that is only a bare YouTube link becomes a click-to-play\n  poster.** Strict URL rule (YouTube's own hosts, video path shapes, an\n  11-character id, no credentials or port). The poster comes from\n  `i.ytimg.com` with no referrer; nothing loads from YouTube itself until play,\n  and then the player is `youtube-nocookie.com`. The link stays as the caption.\n- **An off-origin image that fails to load becomes \"Image: alt ↗ (host)\"**, a\n  link to it (a span inside an existing link, so links never nest).\n- Both are done by a page script on screen only: `content_html`, feeds and item\n  JSON are unchanged, every version (pinned ones too) gets the same treatment,\n  and with scripts off the link is a plain link.\n\n### Theme and typeface (Miguel, #58, roadmap row 4)\n\n**Custom theme.** A *Custom* tile beside the presets opens an editor for the\nauthor's own palette: the same nine values a preset has (`dark` plus `page`,\n`paper`, `ink`, `inkSoft`, `rule`, `pencil`, `genBg`, `genRule`), so the public\npages and the studio take it through the same path as any preset. It starts\nfrom whichever preset was showing, previews live, warns when text, secondary\ntext, links or generated highlights fall below WCAG AA contrast on the paper\n(advisory, never blocking), and exports and imports the palette as JSON so a\nlook can be passed from one blyg to another. **Colours only:** every value must\nbe `#rrggbb`, checked in the studio and again by the server before it is\nstored, so nothing but a colour reaches `style.css`.\n\n**Light and dark.** *Follow the reader's light/dark setting* adds a dark\ncompanion (`custom_theme_dark`): the custom theme then behaves like Auto, with\nthe author's colours — the light palette in the base block, the dark one under\n`prefers-color-scheme: dark`, and the studio flipping with the device the same\nway. Most devices switch on their own now, and a custom theme that ignored that\nwould be a step back from Auto. The pair must be coherent (light `dark: false`,\ncompanion `dark: true`, never a companion without a light half), checked in\nthe studio and by the server. Without a companion, a custom palette is fixed,\nlike a preset. A pair exports and imports as `{\"light\": {…}, \"dark\": {…}}`.\n\n**A name for the look.** *Name this look* (`custom_theme_name`, optional,\none line, at most 40 characters) labels the Custom tile and travels with the\nlook when it is shared: `{\"name\": \"Pink Quill\", \"light\": {…}, \"dark\": {…}}`.\nIt is shown as text and never reaches the stylesheet.\n\nSwitching to a preset\nkeeps the palette, so switching back restores it; `custom_theme: null` clears\nit, and is refused while the theme in use is `custom`.\n\n**Reading typeface.** A choice of eight system font stacks (from Modern Font\nStacks, CC0): Book (the default, unchanged), Transitional, Humanist sans,\nGeometric sans, System sans, Rounded, Slab serif, Monospace. Each names fonts\nalready on the reader's device, so nothing is downloaded and no third party\nsees a reader; \"no web fonts\" still holds. Only `--serif` changes, so all\nreading text follows the choice while the apparatus keeps its sans. Unknown\nids are refused (400). Public pages only; the studio keeps its own type.\n\n### AI providers (Aneesh Sathe, #60, closes #8)\n\n- **Cloudflare Workers AI** (studio#8, after Aneesh Sathe's local patch). A\n  `workers-ai` provider in `models.json` runs `@cf/…` models on the Worker's\n  own `ai` binding, with no API key; Gemma 4 26B, Llama 4 Scout, Llama 3.3 70B\n  and Mistral Small 3.1 are listed, and any `@cf/…` id can be typed in. The\n  binding is commented out in `wrangler.jsonc` and in what `npm run init`\n  writes: uncomment it to offer these models. Nothing runs on it until a model\n  is chosen in Settings: still no default model and no fallback. Reasoning a\n  model inlines into its answer is removed, and Gemma 4 is asked not to think.\n- **OpenAI-compatible endpoints.** An `openai-chat` provider calls any Chat\n  Completions endpoint at its `base_url` (OpenRouter, Groq, Together,\n  Cloudflare's OpenAI-compatible endpoint, a local Ollama), with its key in a\n  Worker secret named by `key_secret`. Add one in `models.local.json`; README §\n  AI models has an example. The build now refuses a manifest whose provider\n  could not be called: an unknown api, a missing key secret or base URL, a\n  base URL that is not https or carries credentials, or a `key_secret` naming\n  `OWNER_PASSWORD` or `COOKIE_SECRET`.\n- Both spend the daily AI budget like every other provider.\n- **API:** in `GET /api/ai/models`, a provider's `key_secret` is now optional\n  (absent for Workers AI and keyless endpoints) and a Workers AI provider\n  carries `binding`. `configured` means the key is set, the binding is bound,\n  or neither is needed.\n- Tests never reach real, billed Workers AI (`remoteBindings: false`).\n\n### Extensions (Aneesh Sathe, #53)\n\n- **lineage-glyph**, #35's lineage glyph, hex view and action ring, ported\n  onto the extension mechanism. It has a server half (two owner reads), so it is\n  compiled in by an operator and never ships in release archives;\n  `extensions.json` is unchanged. Hrefs from foreign documents must pass\n  `isFollowableUrl`.\n\n### Fixes\n\n- **Composer tools place the caret at once** (Aneesh Sathe, #64). `TK`,\n  `[[`, `![[`, link from clipboard, scan and the bracket picker placed the caret\n  one animation frame late, so anything that selected or typed in between had\n  its selection collapsed and appended instead of replacing. This was the CI\n  flake in `compose-pwa.spec.ts:179`.\n\n\n\n*This announcement is drafted from the release's section of [`CHANGELOG.md`](https://github.com/blygger/blygger-studio/blob/main/CHANGELOG.md), which is where it is maintained. To comment, respond to this item from your own blyg.*\n","content_html":"<div class=\"blyg-tk-gen\"><h1>Blygger Studio 0.40.0</h1>\n<p><em>Released 2026-10-10, the reference client. <a href=\"https://github.com/blygger/blygger-studio/releases/tag/v0.40.0\">v0.40.0 on GitHub</a>.</em></p>\n<p><strong>Migrations: none.</strong> Six contributor PRs, merged together.</p>\n<p><strong><code>/api</code>, all additive:</strong> <code>GET /api/reading/imported</code> (#61); <code>Settings</code> gains\n<code>custom_theme</code>, <code>custom_theme_dark</code>, <code>custom_theme_name</code> and <code>font</code> (#58); in\n<code>GET /api/ai/models</code> a provider's <code>key_secret</code> is optional and a Workers AI\nprovider carries <code>binding</code> (#60); the lineage-glyph extension's two reads under\n<code>/api/ext/lineage-glyph/</code> (#53, 404 unless compiled in and enabled).</p>\n<h3>Reading API (Aneesh Sathe, #61)</h3>\n<ul>\n<li><strong><code>GET /api/reading/imported</code></strong>, under <code>owner:read</code>: every imported item,\nnewest observed first, with the fields a client authors from (markdown,\nauthor, signal, hopper ids, the origin's transclusions, <code>stubOf</code> and\n<code>forkedFrom</code> verbatim, <code>readVersion</code>). Paged by an opaque keyset cursor over\n<code>(observed_at, subscription, id)</code>, so ties split exactly and a poll between\ntwo requests never shifts or repeats rows. A cursor the server did not issue\nis a 400; <code>limit</code> is 1–100, default 50. For clients such as Blygger Desktop\nthat would otherwise need one <code>/imports/{sub}/{id}</code> call per row.</li>\n</ul>\n<h3>Public pages (Aneesh Sathe, #62, closes #9)</h3>\n<ul>\n<li><strong>A paragraph that is only a bare YouTube link becomes a click-to-play\nposter.</strong> Strict URL rule (YouTube's own hosts, video path shapes, an\n11-character id, no credentials or port). The poster comes from\n<code>i.ytimg.com</code> with no referrer; nothing loads from YouTube itself until play,\nand then the player is <code>youtube-nocookie.com</code>. The link stays as the caption.</li>\n<li><strong>An off-origin image that fails to load becomes &quot;Image: alt ↗ (host)&quot;</strong>, a\nlink to it (a span inside an existing link, so links never nest).</li>\n<li>Both are done by a page script on screen only: <code>content_html</code>, feeds and item\nJSON are unchanged, every version (pinned ones too) gets the same treatment,\nand with scripts off the link is a plain link.</li>\n</ul>\n<h3>Theme and typeface (Miguel, #58, roadmap row 4)</h3>\n<p><strong>Custom theme.</strong> A <em>Custom</em> tile beside the presets opens an editor for the\nauthor's own palette: the same nine values a preset has (<code>dark</code> plus <code>page</code>,\n<code>paper</code>, <code>ink</code>, <code>inkSoft</code>, <code>rule</code>, <code>pencil</code>, <code>genBg</code>, <code>genRule</code>), so the public\npages and the studio take it through the same path as any preset. It starts\nfrom whichever preset was showing, previews live, warns when text, secondary\ntext, links or generated highlights fall below WCAG AA contrast on the paper\n(advisory, never blocking), and exports and imports the palette as JSON so a\nlook can be passed from one blyg to another. <strong>Colours only:</strong> every value must\nbe <code>#rrggbb</code>, checked in the studio and again by the server before it is\nstored, so nothing but a colour reaches <code>style.css</code>.</p>\n<p><strong>Light and dark.</strong> <em>Follow the reader's light/dark setting</em> adds a dark\ncompanion (<code>custom_theme_dark</code>): the custom theme then behaves like Auto, with\nthe author's colours — the light palette in the base block, the dark one under\n<code>prefers-color-scheme: dark</code>, and the studio flipping with the device the same\nway. Most devices switch on their own now, and a custom theme that ignored that\nwould be a step back from Auto. The pair must be coherent (light <code>dark: false</code>,\ncompanion <code>dark: true</code>, never a companion without a light half), checked in\nthe studio and by the server. Without a companion, a custom palette is fixed,\nlike a preset. A pair exports and imports as <code>{&quot;light&quot;: {…}, &quot;dark&quot;: {…}}</code>.</p>\n<p><strong>A name for the look.</strong> <em>Name this look</em> (<code>custom_theme_name</code>, optional,\none line, at most 40 characters) labels the Custom tile and travels with the\nlook when it is shared: <code>{&quot;name&quot;: &quot;Pink Quill&quot;, &quot;light&quot;: {…}, &quot;dark&quot;: {…}}</code>.\nIt is shown as text and never reaches the stylesheet.</p>\n<p>Switching to a preset\nkeeps the palette, so switching back restores it; <code>custom_theme: null</code> clears\nit, and is refused while the theme in use is <code>custom</code>.</p>\n<p><strong>Reading typeface.</strong> A choice of eight system font stacks (from Modern Font\nStacks, CC0): Book (the default, unchanged), Transitional, Humanist sans,\nGeometric sans, System sans, Rounded, Slab serif, Monospace. Each names fonts\nalready on the reader's device, so nothing is downloaded and no third party\nsees a reader; &quot;no web fonts&quot; still holds. Only <code>--serif</code> changes, so all\nreading text follows the choice while the apparatus keeps its sans. Unknown\nids are refused (400). Public pages only; the studio keeps its own type.</p>\n<h3>AI providers (Aneesh Sathe, #60, closes #8)</h3>\n<ul>\n<li><strong>Cloudflare Workers AI</strong> (studio#8, after Aneesh Sathe's local patch). A\n<code>workers-ai</code> provider in <code>models.json</code> runs <code>@cf/…</code> models on the Worker's\nown <code>ai</code> binding, with no API key; Gemma 4 26B, Llama 4 Scout, Llama 3.3 70B\nand Mistral Small 3.1 are listed, and any <code>@cf/…</code> id can be typed in. The\nbinding is commented out in <code>wrangler.jsonc</code> and in what <code>npm run init</code>\nwrites: uncomment it to offer these models. Nothing runs on it until a model\nis chosen in Settings: still no default model and no fallback. Reasoning a\nmodel inlines into its answer is removed, and Gemma 4 is asked not to think.</li>\n<li><strong>OpenAI-compatible endpoints.</strong> An <code>openai-chat</code> provider calls any Chat\nCompletions endpoint at its <code>base_url</code> (OpenRouter, Groq, Together,\nCloudflare's OpenAI-compatible endpoint, a local Ollama), with its key in a\nWorker secret named by <code>key_secret</code>. Add one in <code>models.local.json</code>; README §\nAI models has an example. The build now refuses a manifest whose provider\ncould not be called: an unknown api, a missing key secret or base URL, a\nbase URL that is not https or carries credentials, or a <code>key_secret</code> naming\n<code>OWNER_PASSWORD</code> or <code>COOKIE_SECRET</code>.</li>\n<li>Both spend the daily AI budget like every other provider.</li>\n<li><strong>API:</strong> in <code>GET /api/ai/models</code>, a provider's <code>key_secret</code> is now optional\n(absent for Workers AI and keyless endpoints) and a Workers AI provider\ncarries <code>binding</code>. <code>configured</code> means the key is set, the binding is bound,\nor neither is needed.</li>\n<li>Tests never reach real, billed Workers AI (<code>remoteBindings: false</code>).</li>\n</ul>\n<h3>Extensions (Aneesh Sathe, #53)</h3>\n<ul>\n<li><strong>lineage-glyph</strong>, #35's lineage glyph, hex view and action ring, ported\nonto the extension mechanism. It has a server half (two owner reads), so it is\ncompiled in by an operator and never ships in release archives;\n<code>extensions.json</code> is unchanged. Hrefs from foreign documents must pass\n<code>isFollowableUrl</code>.</li>\n</ul>\n<h3>Fixes</h3>\n<ul>\n<li><strong>Composer tools place the caret at once</strong> (Aneesh Sathe, #64). <code>TK</code>,\n<code>[[</code>, <code>![[</code>, link from clipboard, scan and the bracket picker placed the caret\none animation frame late, so anything that selected or typed in between had\nits selection collapsed and appended instead of replacing. This was the CI\nflake in <code>compose-pwa.spec.ts:179</code>.</li>\n</ul>\n</div>\n<div class=\"blyg-tk-gen\"><p><em>This announcement is drafted from the release's section of <a href=\"https://github.com/blygger/blygger-studio/blob/main/CHANGELOG.md\"><code>CHANGELOG.md</code></a>, which is where it is maintained. To comment, respond to this item from your own blyg.</em></p>\n</div>\n","content_hash":"sha256:e5e4395f837a1789acb167ab4ed4b87a16e73512cc8f836e5e6a1ad8ec97af1a","media":[],"transclusions":[],"generated":[{"sources":[],"model":"claude-opus-5-5"},{"sources":[],"model":"claude-opus-5-5"}],"changelog":[{"version":1,"at":"2026-10-10T23:08:36Z","note":"Studio 0.40.0 released."}]}