Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
161f2f8
Build the site on a Cloudflare Worker
claude Nov 28, 2026
92798c3
Say copied only when the clipboard took it
claude Nov 28, 2026
b1eac29
Merge branch 'claude/adoring-goldberg-9ylfry' of https://github.com/h…
claude Nov 28, 2026
2e6d0be
Preview each pull request at priv.hbx.sh
claude Nov 28, 2026
6fad2ca
Merge branch 'claude/adoring-goldberg-9ylfry' of https://github.com/h…
claude Nov 28, 2026
e43cc03
Write the copy and code one thing at a time
claude Nov 28, 2026
9aacac9
Merge branch 'claude/adoring-goldberg-9ylfry' of https://github.com/h…
claude Nov 28, 2026
09d5448
Apply the copy review to the site
claude Nov 28, 2026
b3c306e
Merge branch 'claude/adoring-goldberg-9ylfry' of https://github.com/h…
claude Nov 28, 2026
f62fdba
Merge remote-tracking branch 'origin/main' into claude/adoring-goldbe…
claude Nov 28, 2026
47402c0
Serve the site at hermitbox.dev and www
claude Nov 28, 2026
6320fb9
Link the agent targets to the docs agents page
claude Nov 28, 2026
0cd98ce
Point desktop downloads at the desktop key
claude Nov 28, 2026
07a2871
Tidy the front page's headings and copy
claude Nov 28, 2026
b7f99c7
Fix the agents page's headings and fences
claude Nov 28, 2026
1753951
Fix the download page's headings and copy
claude Nov 28, 2026
452acb5
Tighten llms.txt's summary and install line
claude Nov 28, 2026
a29d7f4
Fix footer and 404 headings
claude Nov 28, 2026
3452f71
Link the README's repositories and explain steps
claude Nov 28, 2026
44f39be
Merge branch 'audit-site' into claude/adoring-goldberg-9ylfry
claude Nov 28, 2026
2592826
Format and lint with Biome 2.4.8
claude Nov 29, 2026
1440e2e
Reformat the tree with Biome
claude Nov 29, 2026
9fccd72
Fix the Biome findings
claude Nov 29, 2026
e228009
Run the check in every Preview job
claude Nov 29, 2026
2ca9936
Put the visitor's machine first on /download/
claude Nov 29, 2026
206935b
Merge the merged branch history
claude Nov 29, 2026
1263609
Set Biome's line width to 80
claude Nov 29, 2026
b66057d
Reformat the tree at 80 columns
claude Nov 29, 2026
f400785
Move to the newest toolchain
claude Nov 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# What rustfmt enforces (rustfmt.toml), for editors that don't run it.
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 2

[*.rs]
indent_size = 4
max_line_length = 120

[*.md]
trim_trailing_whitespace = false
17 changes: 7 additions & 10 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Preview

# Each pull request from this repository gets a preview version of hermitbox-site at
# Each pull request from this repository runs bun run check (Biome, tests, typecheck, the build and
# its checks) and gets a preview version of hermitbox-site at
# pr-<n>-site.priv.hbx.sh and <commit>-site.priv.hbx.sh, linked in one comment on it. Uploading a
# version never changes production. Fork pull requests get none: they have no secrets.
on:
Expand Down Expand Up @@ -37,17 +38,13 @@ jobs:
else
echo 'ready=true' >> "$GITHUB_OUTPUT"
fi
- if: steps.token.outputs.ready == 'true'
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- if: steps.token.outputs.ready == 'true'
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: 1.4.4
- if: steps.token.outputs.ready == 'true'
run: bun install --frozen-lockfile
- if: steps.token.outputs.ready == 'true'
run: bun run check
bun-version: 1.4.5
- run: bun install --frozen-lockfile
- run: bun run check
- if: steps.token.outputs.ready == 'true'
run: scripts/preview.sh site .
52 changes: 52 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"$schema": "https://biomejs.dev/schemas/2.6.9/schema.json",
"files": {
"includes": [
"**",
"!node_modules",
"!dist",
"!.astro",
"!.wrangler",
"!bun.lock",
"!public/design-system",
"!LICENSE.md"
]
},
"formatter": {
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 80
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"semicolons": "asNeeded"
}
},
"assist": {
"actions": {
"source": {
"organizeImports": "on"
}
}
},
"linter": {
"enabled": true,
"rules": {
"preset": "recommended"
}
},
"overrides": [
{
"includes": ["**/*.astro"],
"linter": {
"rules": {
"correctness": {
"noUnusedVariables": "off",
"noUnusedImports": "off"
}
}
}
}
]
}
181 changes: 120 additions & 61 deletions bun.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion design-system.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
"fonts/SchibstedGrotesk-Variable.woff2": "0710caa3e5fb5736c5b6a83ca16631f391ffd339957ca6d7534e15b25ba30921",
"tokens.css": "2cb58182698724771b41ffb2e09ae2d806be8facd1b712553b05b056c14ec7f6"
}
}
}
5 changes: 4 additions & 1 deletion docs/decisions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Each line records one choice hermitbox.dev made and why.

- hermitbox.dev is its own repository, licensed AGPL-3.0-only, reaching hermitbox only through its public API, SDK and CLI, so it releases on its own schedule and its CI never waits on hermitbox's.
- The site is built with Astro 7.4.12 (MIT) as static pages, because a maintained generator gives components and a plain-HTML build with no client framework.
- The site is built with Astro 7.4.13 (MIT) as static pages, because a maintained generator gives components and a plain-HTML build with no client framework.
- It is served by the Worker `hermitbox-site` with Workers Static Assets on Cloudflare; the Worker adds security headers, keeps every host but `hermitbox.dev` out of search engines with `X-Robots-Tag`, and fills the download page.
- Wrangler 4.169.0 (MIT OR Apache-2.0) deploys it, run with `bunx` at that version and never shipped.
- The design system's `tokens.css`, `components/bundle.css`, `components/bundle.js` and fonts are vendored unchanged under `public/design-system/`, pinned by SHA-256 in `design-system.lock.json`; `scripts/check-build.ts` fails if a byte differs. Its pixel art is copied verbatim into `src/lib/art.ts`.
Expand All @@ -15,3 +15,6 @@ Each line records one choice hermitbox.dev made and why.
- The download page reads `https://dl.hbx.sh/desktop/downloads.json` at request time (cached 5 minutes) and links only files that manifest lists on `dl.hbx.sh` with a SHA-512, an ML-DSA-65 statement and its signature; with no manifest it says no build is published.
- Copy buttons use the site's own handler (`src/scripts/copy.js`), not the design system's `bindCopy`, which shows "copied" even when the clipboard refuses: ours says so only after the write succeeds, and otherwise shows the full text selected to copy by hand.
- Each pull request from this repository uploads a preview version of `hermitbox-site` (`.github/workflows/preview.yml`, `scripts/preview.sh`, Wrangler `versions upload --preview-alias pr-<n>`), served at `pr-<n>-site.priv.hbx.sh` and `<commit>-site.priv.hbx.sh` by Hermitbox's preview router and linked in one comment on the pull request; uploading never changes production, and fork pull requests get no preview because they have no secrets.
- Biome 2.6.9 (MIT OR Apache-2.0), pinned in `package.json`, formats and lints the site with hermitbox's settings (`biome.json`, `.editorconfig`: two spaces, 80 columns, single quotes, no semicolons, organised imports, the recommended rules), so the three repositories read alike; `bun run check` runs `biome ci .` first, and the Preview job runs the check on every pull request from this repository, with or without the preview token, so Biome has no job of its own.
- The download page puts the visitor's machine first and marks it "Your machine" (`src/lib/machine.ts`, in the browser): the client hints from `navigator.userAgentData.getHighEntropyValues`, else `navigator.platform` and the user agent. It offers the file for that machine's cpu. A Mac with no cpu answer gets both dmgs, because Safari reports Apple silicon as Intel. A phone, a tablet, ChromeOS or no answer keeps the built order, which is also what a browser without JavaScript sees.
- The toolchain is the newest release of each, checked against its registry on 2026-11-29 and pinned exactly: Bun 1.4.5 (MIT; `packageManager` and the Preview job), TypeScript 7.0.2 (Apache-2.0), `@cloudflare/workers-types` 5.20261129.1 (MIT OR Apache-2.0), `@types/bun` 1.4.5 (MIT), Astro 7.4.13, Biome 2.6.9 and Wrangler 4.169.0. `LICENSE.md` is left out of Biome, which now formats Markdown, so the licence text stays as published.
16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,21 @@
"private": true,
"type": "module",
"license": "AGPL-3.0-only",
"packageManager": "bun@1.4.4",
"packageManager": "bun@1.4.5",
"scripts": {
"build": "ASTRO_TELEMETRY_DISABLED=1 astro build",
"dev": "ASTRO_TELEMETRY_DISABLED=1 astro dev --host 127.0.0.1",
"check": "bun test && tsc --noEmit -p tsconfig.json && bun run build && bun scripts/check-build.ts",
"deploy": "sh scripts/deploy.sh"
"check": "biome ci . && tsc --noEmit -p tsconfig.json && bun run build && bun scripts/check-build.ts && bun test",
"deploy": "sh scripts/deploy.sh",
"lint": "biome check ."
},
"dependencies": {
"astro": "7.4.12"
"astro": "7.4.13"
},
"devDependencies": {
"@cloudflare/workers-types": "4.20251128.0",
"@types/bun": "1.3.3",
"typescript": "5.9.3"
"@biomejs/biome": "2.6.9",
"@cloudflare/workers-types": "5.20261129.1",
"@types/bun": "1.4.5",
"typescript": "7.0.2"
}
}
39 changes: 31 additions & 8 deletions scripts/check-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,54 @@ import { createHash } from 'node:crypto'
import { readdirSync, readFileSync } from 'node:fs'
import { join, relative } from 'node:path'

const lock = JSON.parse(readFileSync('design-system.lock.json', 'utf8')) as { files: Record<string, string> }
const lock = JSON.parse(readFileSync('design-system.lock.json', 'utf8')) as {
files: Record<string, string>
}
const failures: string[] = []
const walk = (dir: string): string[] =>
readdirSync(dir, { withFileTypes: true }).flatMap((entry) =>
entry.isDirectory() ? walk(join(dir, entry.name)) : [join(dir, entry.name)],
)
for (const root of ['public/design-system', 'dist/design-system']) {
const found = walk(root).map((file) => relative(root, file)).sort()
const found = walk(root)
.map((file) => relative(root, file))
.sort()
if (JSON.stringify(found) !== JSON.stringify(Object.keys(lock.files).sort()))
failures.push(`${root} holds other files than design-system.lock.json lists`)
failures.push(
`${root} holds other files than design-system.lock.json lists`,
)
for (const [file, digest] of Object.entries(lock.files)) {
const actual = createHash('sha256').update(readFileSync(join(root, file))).digest('hex')
if (actual !== digest) failures.push(`${root}/${file} differs from the vendored design system`)
const actual = createHash('sha256')
.update(readFileSync(join(root, file)))
.digest('hex')
if (actual !== digest)
failures.push(`${root}/${file} differs from the vendored design system`)
}
}
const pages = walk('dist').filter((file) => file.endsWith('.html'))
for (const page of pages) {
const html = readFileSync(page, 'utf8')
for (const needle of ['class="hb-agent', 'curl -fsSL https://hbx.sh | sh', 'hb-agent__copy--primary', 'data-copy-text=', 'id="agent-cursor"', 'rel="describedby"'])
for (const needle of [
'class="hb-agent',
'curl -fsSL https://hbx.sh | sh',
'hb-agent__copy--primary',
'data-copy-text=',
'id="agent-cursor"',
'rel="describedby"',
])
if (!html.includes(needle)) failures.push(`${page} lacks ${needle}`)
}
for (const file of ['dist/llms.txt', 'dist/llms-full.txt', 'dist/favicon.svg', 'dist/robots.txt'])
for (const file of [
'dist/llms.txt',
'dist/llms-full.txt',
'dist/favicon.svg',
'dist/robots.txt',
])
if (!readFileSync(file, 'utf8').length) failures.push(`${file} is empty`)
if (failures.length) {
console.error(failures.join('\n'))
process.exit(1)
}
console.log(`Build: ${pages.length} pages carry the agent panel; the design system matches its digests`)
console.log(
`Build: ${pages.length} pages carry the agent panel; the design system matches its digests`,
)
14 changes: 12 additions & 2 deletions src/components/AgentPanel.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,19 @@
// SPDX-License-Identifier: AGPL-3.0-only
/** The design system's agent install panel: the install line, the copy-prompt (the one red action)
* and the one-click targets, which open each agent's dialog (AgentDialogs) or, without script, /agents/. */
import { agents, docsUrl, installLine, platformLine, prompt, promptLabel } from '../lib/agents'
import {
agents,
docsUrl,
installLine,
platformLine,
prompt,
promptLabel,
} from '../lib/agents'
import { art } from '../lib/art'
interface Props { variant?: 'hero' | 'compact' }

interface Props {
variant?: 'hero' | 'compact'
}
const { variant } = Astro.props
---
<div class:list={['hb-agent', variant && `hb-agent--${variant}`]}>
Expand Down
12 changes: 10 additions & 2 deletions src/components/AgentSteps.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,18 @@
/** One agent's install steps, shared by its dialog and its section on /agents/. */
import { type Agent, rootNote } from '../lib/agents'
import { art } from '../lib/art'
interface Props { agent: Agent; root?: boolean }

interface Props {
agent: Agent
root?: boolean
}
const { agent, root = true } = Astro.props
const inline = (text: string) =>
text.replace(/[&<>]/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;' })[c] as string)
text
.replace(
/[&<>]/g,
(c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;' })[c] as string,
)
.replace(/`([^`]+)`/g, '<code class="hb-code-inline">$1</code>')
---
<p class="steps-lead">{agent.lead}</p>
Expand Down
5 changes: 4 additions & 1 deletion src/components/TopNav.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
/** The top bar on every page. */
import { docsUrl, repoUrl } from '../lib/agents'
import { art } from '../lib/art'
interface Props { current?: string }

interface Props {
current?: string
}
const { current } = Astro.props
const links = [
{ href: `${docsUrl}/`, label: 'Docs' },
Expand Down
7 changes: 6 additions & 1 deletion src/layouts/Page.astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ import AgentDialogs from '../components/AgentDialogs.astro'
import Footer from '../components/Footer.astro'
import TopNav from '../components/TopNav.astro'
import '../styles/site.css'
interface Props { title: string; description: string; path: string }

interface Props {
title: string
description: string
path: string
}
const { title, description, path } = Astro.props
const canonical = new URL(path, 'https://hermitbox.dev').href
---
Expand Down
Loading
Loading