chadtmiller.com/group-host
atmosphere group host
0
0
The docs are a site, with references to the API and the MCP tools
.knotless/workflows/docs.ymlnew+24−0
| @@ -0,0 +1,24 @@ | ||
# The docs, as `just docs` checks them: every relative link and anchor | ||
# lands (harness/docs.mjs); and the site docs-site/ makes of them builds. | ||
# `just docs-deploy` deploys it, from the owner's machine: the site of a | ||
# private repository is kept in its space, which an app password, all a | ||
# run could sign in with, cannot write. The site's packages are kept | ||
# between runs and installed again only when its lockfile changes. | ||
image: node:24.22.1 | ||
# Pushes to main, and pulls that change the docs, their check, the site, | ||
# the lexicons and tokens it takes, or this file. A pull changing none | ||
# passes at once, noted as skipped. | ||
on: | ||
push: {refs: [refs/heads/main]} | ||
pull: | ||
base: [refs/heads/main, refs/heads/feature/*] | ||
paths: [docs/**, README.md, AGENTS.md, harness/docs.mjs, docs-site/**, lexicons/**, web/src/tokens.css, .knotless/workflows/docs.yml, .knotless/uses.lock] | ||
cache: [docs-site/node_modules] | ||
steps: | ||
- uses: chadtmiller.com/steps/npm-ci@1 | ||
name: packages | ||
with: {dir: docs-site} | ||
- name: links | ||
run: node harness/docs.mjs | ||
- name: site | ||
run: cd docs-site && npm run build | ||
docs/reference/api.mdnew+212−0
| @@ -0,0 +1,212 @@ | ||
# HTTP and XRPC API | ||
| ||
What the host answers over HTTP, at `PUBLIC_URL` ([config](config.md)). | ||
Each `fyi.opensocial.*` method has its lexicon under | ||
`lexicons/fyi/opensocial`, which says what it takes and answers; the site | ||
shows it under the method. The design pages say why each part works as it | ||
does. | ||
| ||
An XRPC error is JSON, as atproto's servers answer one: an HTTP status and | ||
`{"error", "message"}`, `error` a name the method's lexicon lists, or one | ||
of `InvalidRequest`, `AuthMissing`, `BadJwtAudience`, `GroupNotFound`, | ||
`InternalServerError`. A method the host does not answer is 501 | ||
`MethodNotImplemented`. | ||
| ||
## Who asks | ||
| ||
A method of the host's own knows its caller in one of two ways: | ||
| ||
- **Service auth**: `Authorization: Bearer <jwt>`, from the caller's own | ||
PDS (`com.atproto.server.getServiceAuth`), with the host's `SERVICE_DID` | ||
as `aud` and the method's NSID as `lxm`. This is how an app, or the | ||
`opensocial` command, calls as a person. | ||
- **The console's cookie**: `group_host_session`, which the host signs | ||
once someone signs in to the console ([signing in](../design/signing-in.md#signing-in-to-the-console)), | ||
used only when no `Authorization` is sent. | ||
| ||
What a caller may then do in a group is what their roles there allow | ||
([membership](../design/membership.md)); a method's lexicon names the | ||
permission it needs. An app signed in *as* a group, with the host's OAuth | ||
([signing in](../design/signing-in.md)), writes to the group's repo and | ||
spaces through the atproto methods below. | ||
| ||
## Groups | ||
| ||
| Method | What it does | | ||
| --- | --- | | ||
| `POST fyi.opensocial.createGroup` | starts a group, the caller its founder and first admin | | ||
| `GET fyi.opensocial.getGroup` | a group as the caller may see it: its profile and rules, and to a member who may read them its roster, roles and spaces | | ||
| `GET fyi.opensocial.listGroups` | the groups hosted here | | ||
| `GET fyi.opensocial.checkAddress` | whether an address under the host's domain is free for a new group | | ||
| `POST fyi.opensocial.updateProfile` | replaces a group's profile | | ||
| `POST fyi.opensocial.uploadImage` | uploads an avatar or banner for the profile | | ||
| `POST fyi.opensocial.putRule` | makes or changes a rule | | ||
| `POST fyi.opensocial.deleteRule` | removes a rule | | ||
| `GET fyi.opensocial.checkGroupHandle` | whether a domain names the group yet, to be its handle | | ||
| `POST fyi.opensocial.updateGroupHandle` | gives the group a handle on its own domain, or its address back | | ||
| `POST fyi.opensocial.deactivateGroup` | switches a group off, until `activateGroup` | | ||
| `POST fyi.opensocial.activateGroup` | switches a deactivated group back on | | ||
| `POST fyi.opensocial.deleteGroup` | deletes a group, for good ([groups](../design/groups.md)) | | ||
| ||
## Membership | ||
| ||
| Method | What it does | | ||
| --- | --- | | ||
| `POST fyi.opensocial.putRole` | makes or changes a role and what it grants | | ||
| `POST fyi.opensocial.deleteRole` | removes a role no member holds | | ||
| `POST fyi.opensocial.assignRoles` | sets a member's roles | | ||
| `POST fyi.opensocial.ejectMember` | puts a member out | | ||
| `POST fyi.opensocial.leaveGroup` | leaves a group | | ||
| `POST fyi.opensocial.requestJoin` | asks to join, or redeems an invite | | ||
| `GET fyi.opensocial.getJoinRequest` | the caller's own request to join, while it waits | | ||
| `POST fyi.opensocial.cancelJoinRequest` | withdraws it | | ||
| `GET fyi.opensocial.listJoinRequests` | the requests waiting, for those who admit | | ||
| `POST fyi.opensocial.admitMember` | lets a request in | | ||
| `POST fyi.opensocial.denyJoinRequest` | turns a request down | | ||
| `POST fyi.opensocial.createInvite` | invites someone, into their own invites space | | ||
| `GET fyi.opensocial.listInvites` | the group's invites still waiting | | ||
| `POST fyi.opensocial.revokeInvite` | takes an invite back | | ||
| `GET fyi.opensocial.getActorInvites` | the caller's own invites from groups here | | ||
| `POST fyi.opensocial.declineInvite` | turns an invite down | | ||
| `GET com.atproto.managedspace.checkUserAccess` | whether someone may read or write an invites space the host keeps, asked by its authority | | ||
| ||
## People | ||
| ||
| Method | What it does | | ||
| --- | --- | | ||
| `GET fyi.opensocial.getViewer` | who is asking, by the console's cookie or service auth | | ||
| `GET fyi.opensocial.getActor` | a person's handle, name and avatar | | ||
| `GET fyi.opensocial.getActorGroups` | the groups here a person is in, as far as the caller shares them | | ||
| `GET /img/<did>/<cid>` | a group's or a person's image, for whoever may see it | | ||
| ||
## Spaces | ||
| ||
A group's spaces, and the records in them ([spaces](../design/spaces.md)). | ||
| ||
| Method | What it does | | ||
| --- | --- | | ||
| `POST fyi.opensocial.createSpace` | adds a space to a group | | ||
| `POST fyi.opensocial.updateSpace` | changes a space's name, readers and who may act as the group in it | | ||
| `POST fyi.opensocial.deleteSpace` | removes a space, never the meta or members space | | ||
| `GET fyi.opensocial.listSpaceRecords` | the records in a space, from the host's index of it, for those who may read it | | ||
| `GET fyi.opensocial.getSpaceBlob` | a file in a space, read from whoever wrote it | | ||
| ||
As the spaces' authority and the PDS of the group's own repo in each, the | ||
host answers the space alpha's methods: | ||
| ||
| Method | What it does | | ||
| --- | --- | | ||
| `POST com.atproto.space.getSpaceCredential` | a credential to read a space, for a member it lets | | ||
| `POST com.atproto.space.notifyWrite` | told of a member's write in a space | | ||
| `GET com.atproto.space.listRepos` | the repos in a space | | ||
| `POST com.atproto.space.registerNotify`, `POST com.atproto.space.unregisterNotify` | a reader asks to be told of writes, or no longer | | ||
| `POST com.atproto.space.notifyCredentialRevoked` | told a credential no longer holds | | ||
| `GET com.atproto.space.getRecord`, `GET com.atproto.space.listRecords`, `GET com.atproto.space.getRepo`, `GET com.atproto.space.getLatestCommit`, `GET com.atproto.space.listRepoOps`, `GET com.atproto.space.getBlob`, `GET com.atproto.space.listBlobs` | the group's own repo in a space, for a credential that may read it | | ||
| ||
## Signing apps in as a group | ||
| ||
The host is each group's OAuth server ([signing in](../design/signing-in.md)): | ||
| ||
| Route | What it does | | ||
| --- | --- | | ||
| `GET /.well-known/oauth-authorization-server`, `GET /.well-known/oauth-protected-resource` | its metadata | | ||
| `POST /oauth/par`, `GET /oauth/authorize`, `POST /oauth/token`, `POST /oauth/revoke` | atproto OAuth's endpoints; `authorize` sends the browser to the console to approve | | ||
| ||
| Method | What it does | | ||
| --- | --- | | ||
| `POST fyi.opensocial.provisionGroup` | an app `PROVISIONING_CLIENTS` names starts a group for a person, and is signed in to it | | ||
| `POST fyi.opensocial.getGroupAuth` | a token to act as the group, for a member asking with service auth and a DPoP proof, with what their roles allow | | ||
| `GET fyi.opensocial.getAuthorization` | an app's request to sign in as a group, as the caller would approve it | | ||
| `POST fyi.opensocial.approveAuthorization` | approves it, with what the caller's roles allow | | ||
| `POST fyi.opensocial.declineAuthorization` | declines it | | ||
| `GET fyi.opensocial.listGroupTokens` | the apps signed in as the group | | ||
| `POST fyi.opensocial.revokeGroupToken` | signs one out | | ||
| `POST fyi.opensocial.createAppPassword` | an app password for the group, for an app that signs in with one | | ||
| `GET fyi.opensocial.listAppPasswords` | the group's app passwords, never the passwords | | ||
| `POST fyi.opensocial.revokeAppPassword` | revokes one, and signs out its apps | | ||
| ||
An app signed in so, or with an app password, uses these as the group: | ||
| ||
| Method | What it does | | ||
| --- | --- | | ||
| `GET com.atproto.server.getSession`, `POST com.atproto.server.createSession`, `POST com.atproto.server.refreshSession`, `POST com.atproto.server.deleteSession` | an app password's sessions | | ||
| `POST com.atproto.repo.createRecord`, `POST com.atproto.repo.putRecord`, `POST com.atproto.repo.deleteRecord`, `POST com.atproto.repo.applyWrites`, `POST com.atproto.repo.uploadBlob` | writes to the group's public repo | | ||
| `POST com.atproto.space.createRecord`, `POST com.atproto.space.putRecord`, `POST com.atproto.space.deleteRecord`, `POST com.atproto.space.applyWrites` | writes to its repo in a space | | ||
| ||
## Assistants | ||
| ||
An AI app connects to a group over MCP ([assistants](../design/assistants.md)); | ||
its tools are in [MCP tools](mcp.md). | ||
| ||
| Route | What it does | | ||
| --- | --- | | ||
| `POST /mcp` | the MCP server, each JSON-RPC message answered as the member who connected it | | ||
| `GET /.well-known/oauth-protected-resource/mcp`, `GET /.well-known/oauth-authorization-server/mcp` | its metadata | | ||
| `POST /mcp/register`, `GET /mcp/authorize`, `POST /mcp/token` | its own OAuth server | | ||
| ||
| Method | What it does | | ||
| --- | --- | | ||
| `GET fyi.opensocial.listConnectedApps` | the assistants the caller connected to a group | | ||
| `POST fyi.opensocial.revokeConnectedApp` | disconnects one | | ||
| ||
## Moderation | ||
| ||
| Method | What it does | | ||
| --- | --- | | ||
| `POST com.atproto.moderation.createReport` | reports a subject to the group | | ||
| `GET fyi.opensocial.listSubjects` | the moderation queue | | ||
| `GET fyi.opensocial.getSubjectHistory` | every event on one subject | | ||
| `POST fyi.opensocial.resolveSubject` | resolves or escalates a subject | | ||
| `POST fyi.opensocial.applyLabel` | labels a subject | | ||
| `POST fyi.opensocial.negateLabel` | takes a label back | | ||
| ||
## Recovery | ||
| ||
| Method | What it does | | ||
| --- | --- | | ||
| `GET fyi.opensocial.listRecoveryKeys` | the rotation keys on the group's `did:plc` that matter ([recovery](../design/recovery.md)) | | ||
| `POST fyi.opensocial.addRecoveryKey` | adds a steward's key, ahead of the host's | | ||
| `POST fyi.opensocial.removeRecoveryKey` | takes one off | | ||
| ||
## Moving | ||
| ||
Groups between hosts, and accounts here to become groups ([moving](../design/moving.md)). | ||
| ||
| Method | What it does | | ||
| --- | --- | | ||
| `POST fyi.opensocial.migratePrepare` | on the host a group leaves: starts the move | | ||
| `GET fyi.opensocial.migrateExport` | on that host: what the destination pulls of the group | | ||
| `POST fyi.opensocial.migrateReceive` | on the destination: takes the group in, switched off | | ||
| `POST fyi.opensocial.migrateComplete` | on the host it leaves: points its DID at the destination | | ||
| `POST fyi.opensocial.migrateActivate` | on the destination: switches it on | | ||
| `GET fyi.opensocial.checkImport` | what moving an account here would make of it | | ||
| `POST fyi.opensocial.importAccount` | starts moving an account here | | ||
| `POST fyi.opensocial.importAccountSpace` | brings one of its spaces, while the move waits | | ||
| `POST fyi.opensocial.completeImport` | finishes the move | | ||
| `GET fyi.opensocial.getAccountMove` | the account the caller signed in to move from the console | | ||
| `POST fyi.opensocial.startAccountMove` | starts that move | | ||
| `POST fyi.opensocial.finishAccountMove` | finishes it, with the code its server emailed | | ||
| `POST fyi.opensocial.cancelAccountMove` | stops it | | ||
| ||
## The console | ||
| ||
| Route | What it does | | ||
| --- | --- | | ||
| `GET /console/login`, `GET /console/callback`, `POST /console/logout` | signing in to the console as oneself, and out | | ||
| `GET /console/move/login` | signing in to an account to move here | | ||
| `GET /console/client-metadata.json` | the host's metadata as the console's OAuth client | | ||
| ||
## The PDS | ||
| ||
The host is the PDS of every group it hosts, and answers for their public | ||
repos as any PDS does: | ||
| ||
| Method | What it does | | ||
| --- | --- | | ||
| `GET com.atproto.server.describeServer` | the host as a PDS: its DID, and the domain it gives its groups names under | | ||
| `GET com.atproto.repo.describeRepo`, `GET com.atproto.repo.getRecord`, `GET com.atproto.repo.listRecords` | a group's public repo | | ||
| `GET com.atproto.sync.getRepo`, `GET com.atproto.sync.getLatestCommit`, `GET com.atproto.sync.listRepos`, `GET com.atproto.sync.getBlob`, `GET com.atproto.sync.listBlobs` | syncing them | | ||
| `GET com.atproto.sync.subscribeRepos` | the firehose, over a WebSocket | | ||
| `GET com.atproto.identity.resolveHandle` | a group's handle, to its DID | | ||
| `GET /.well-known/did.json`, `GET /.well-known/atproto-did` | the host's own `did:web`, and a group's DID at its address | | ||
| `GET _health` | that the host is up, and its version | | ||
docs/reference/cli.md+3−0
| @@ -54,3 +54,6 @@ usage. | ||
| `web`, `web-dev` | the console built, or served as its source changes | | ||
| `e2e <args>` | the console's flows in Chromium over the reference PDS, as the `e2e` check runs them | | ||
| `opensocial <args>` | the command | | ||
| `docs` | the docs' links and anchors, as the `docs` check runs it | | ||
| `docs-site` | the docs as their site, at http://localhost:4321/, as they change | | ||
| `docs-deploy` | the docs site, built and deployed as the repository's ([development](../development.md#the-docs-site)) | | ||
docs/reference/mcp.mdnew+31−0
| @@ -0,0 +1,31 @@ | ||
# MCP tools | ||
| ||
The tools the host offers an assistant at `<PUBLIC_URL>/mcp`, over MCP's | ||
Streamable HTTP, each JSON-RPC message answered on its own, as JSON. It | ||
speaks MCP `2025-06-18`, `2025-03-26` and `2024-11-05`. | ||
[Assistants](../design/assistants.md) says how an assistant connects and | ||
signs in. | ||
| ||
Each tool is one of the host's methods, named as the method is | ||
(`getGroup` for `fyi.opensocial.getGroup`), asked as the member who | ||
connected the assistant, in the group they connected it to. Its input | ||
schema is made from the method's lexicon (`METHODS` in | ||
`crates/group-host-mcp/src/lib.rs` lists them), without the group, which | ||
is always that one; what a tool takes and answers is the method's, in | ||
[the API](api.md). A tool the member's roles do not allow is refused, and | ||
the refusal is the tool's error, in the method's words. | ||
| ||
| Tool | What it does | | ||
| --- | --- | | ||
| `getGroup` | the group as the member may see it: its profile, rules, roster, roles and spaces | | ||
| `updateProfile` | replaces the group's profile | | ||
| `putRule`, `deleteRule` | makes, changes or removes a rule | | ||
| `putRole`, `deleteRole` | makes, changes or removes a role | | ||
| `assignRoles` | sets a member's roles | | ||
| `listJoinRequests`, `admitMember`, `denyJoinRequest` | the requests to join waiting, and letting one in or turning it down | | ||
| `listInvites`, `createInvite`, `revokeInvite` | the invites waiting, and inviting someone or taking an invite back | | ||
| `ejectMember` | puts a member out | | ||
| `createSpace` | adds a space to the group | | ||
| `listSpaceRecords` | the records in one of the group's spaces | | ||
| `listSubjects`, `getSubjectHistory`, `resolveSubject` | the moderation queue, a subject's events, and resolving or escalating one | | ||
| `applyLabel`, `negateLabel` | labels a subject, or takes a label back | | ||
docs/development.md+24−1
| @@ -60,9 +60,32 @@ resolves it. Chromium comes with `cd harness && npx playwright install | ||
chromium`. A failed flow leaves its trace and a picture under | ||
`target/e2e/results`. | ||
| ||
## The docs site | ||
| ||
`docs/` reads on its own, in the repository's pages; `docs-site/` makes a | ||
site of it with Starlight, changing nothing in it (`content.mjs` copies | ||
each page in, its first heading its title). A link between pages goes to | ||
the page on the site, and one out of `docs/` to the file in the | ||
repository (`plugins.mjs`). On a reference page, a table of routes or | ||
methods is drawn as a list, each with its HTTP method, and each | ||
`fyi.opensocial` method, or MCP tool, with its lexicon from `lexicons/` | ||
under it, so what it takes and answers cannot drift from the page | ||
(`reference.mjs`). Its look is the console's, from `web/src/tokens.css`. | ||
| ||
`just docs-site` serves it as it changes, at http://localhost:4321/. A new | ||
page goes in the sidebar in `docs-site/astro.config.mjs`. | ||
| ||
The repository is private, so its site is too: knotless serves it to its | ||
members alone, at a host of its own, which `just docs-deploy` prints. It | ||
is kept in the repository's space, which only its owner can write, signed | ||
in with `knotless login`; an app password cannot write to a space, so no | ||
workflow can deploy it, and the owner runs `just docs-deploy` after a | ||
change to the docs lands. | ||
| ||
## The checks | ||
| ||
`just lint` is what `check` and `web` run: `cargo fmt --check`, clippy | ||
with warnings denied, the console's component layers | ||
(`harness/layers.mjs`) and svelte-check. `just lex` is the `lexicons` | ||
check. `AGENTS.md` says what each workflow runs, and when. | ||
check, and `just docs` with the site's build the `docs` check. | ||
`AGENTS.md` says what each workflow runs, and when. | ||
docs/README.md+6−2
| @@ -9,8 +9,12 @@ guides show how, the reference lists what. | ||
[membership](design/membership.md). | ||
- [Development](development.md): building, testing, and the checks a pull | ||
runs. | ||
- Reference: [configuration](reference/config.md), [the command and the | ||
recipes](reference/cli.md). | ||
- Reference: [the HTTP and XRPC API](reference/api.md), [the MCP | ||
tools](reference/mcp.md), [configuration](reference/config.md), [the | ||
command and the recipes](reference/cli.md). | ||
| ||
These pages are also a site (`docs-site/`), for the repository's members: | ||
[development](development.md#the-docs-site) says how it is made. | ||
| ||
The standard a host implements is opensocial's proposal, at | ||
https://docs.opensocial.fyi. | ||
docs-site/src/content.config.tsnew+8−0
| @@ -0,0 +1,8 @@ | ||
import { defineCollection } from 'astro:content'; | ||
import { docsLoader } from '@astrojs/starlight/loaders'; | ||
import { docsSchema } from '@astrojs/starlight/schema'; | ||
| ||
// The pages content.mjs copies from docs/. | ||
export const collections = { | ||
docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }) | ||
}; | ||
docs-site/src/SiteTitle.astronew+17−0
| @@ -0,0 +1,17 @@ | ||
--- | ||
// The docs' brand, home to their index. | ||
const docs = import.meta.env.BASE_URL; | ||
--- | ||
| ||
<span class="site-title"> | ||
<a class="brand" href={docs}>group-host</a> | ||
<a class="brand section" href={docs}>docs</a> | ||
</span> | ||
| ||
<style> | ||
.site-title { | ||
display: flex; | ||
align-items: baseline; | ||
gap: var(--space-2); | ||
} | ||
</style> | ||
docs-site/src/theme.cssnew+205−0
| @@ -0,0 +1,205 @@ | ||
/* Starlight in the console's own look: its palette, type and links taken | ||
from web/src/tokens.css, which change with the colour scheme as the | ||
console's do. Starlight's light palette names its colours as its dark one | ||
does, the strongest text `white` and the page `black`, so one mapping | ||
holds in both. */ | ||
| ||
@import '../../web/src/tokens.css'; | ||
| ||
:root, | ||
:root[data-theme='light'] { | ||
--sl-color-white: var(--fg); | ||
--sl-color-gray-1: var(--fg); | ||
--sl-color-gray-2: var(--fg); | ||
--sl-color-gray-3: var(--mute); | ||
--sl-color-gray-4: var(--faint); | ||
--sl-color-gray-5: var(--line); | ||
--sl-color-gray-6: var(--soft); | ||
--sl-color-gray-7: var(--panel); | ||
--sl-color-black: var(--bg); | ||
--sl-color-accent-low: var(--primary-soft); | ||
--sl-color-accent: var(--primary); | ||
--sl-color-accent-high: var(--primary-hover); | ||
--sl-color-bg-nav: var(--bg); | ||
--sl-color-bg-sidebar: var(--bg); | ||
--sl-color-hairline: var(--line); | ||
--sl-color-hairline-light: var(--line); | ||
--sl-color-hairline-shade: var(--line); | ||
--sl-font: var(--font-sans); | ||
--sl-font-mono: var(--font-mono); | ||
--sl-line-height: var(--leading); | ||
/* Type on the console's scale, not Starlight's larger one. */ | ||
--sl-text-body: var(--text-base); | ||
--sl-text-h1: var(--text-2xl); | ||
--sl-text-h2: var(--text-xl); | ||
--sl-text-h3: var(--text-lg); | ||
--sl-text-h4: var(--text-base); | ||
--sl-text-h5: var(--text-base); | ||
--sl-text-h6: var(--text-base); | ||
} | ||
| ||
/* Headings rounded and bold, as the console's are. */ | ||
h1, h2, h3, h4, h5, h6 { | ||
font-family: var(--font-round); | ||
font-weight: var(--weight-bold); | ||
letter-spacing: var(--tracking-tight); | ||
line-height: var(--leading-tight); | ||
} | ||
| ||
/* A section's heading is ruled off, as in the console. */ | ||
.sl-markdown-content .level-h2 { | ||
padding-bottom: var(--space-2); | ||
border-bottom: var(--border); | ||
} | ||
| ||
/* The header: the brand, in mono. */ | ||
.brand { | ||
display: flex; | ||
align-items: baseline; | ||
gap: var(--space-2); | ||
font: var(--weight-semibold) var(--text-base) var(--font-mono); | ||
color: var(--fg); | ||
text-decoration: none; | ||
white-space: nowrap; | ||
} | ||
.brand.section { | ||
font-weight: var(--weight-normal); | ||
color: var(--mute); | ||
} | ||
| ||
/* Links underlined quietly, as the console has them. */ | ||
.sl-markdown-content a:not(:where(.not-content *)) { | ||
color: var(--primary); | ||
text-decoration-color: var(--link-line); | ||
text-underline-offset: var(--space-1); | ||
} | ||
.sl-markdown-content a:not(:where(.not-content *)):hover { | ||
color: var(--primary-hover); | ||
text-decoration-color: currentColor; | ||
} | ||
| ||
/* Sidebar: the page one is on marked as the console marks the tab one is on. */ | ||
.sidebar-content a[aria-current='page'] { | ||
background: var(--primary-soft); | ||
color: var(--fg); | ||
font-weight: var(--weight-semibold); | ||
} | ||
| ||
/* Reference: a table of names and what each does, drawn as a list of | ||
them (reference.mjs), each name on a line of its own. */ | ||
.sl-markdown-content .ref-list { | ||
margin-top: var(--space-4); | ||
border-top: var(--border); | ||
} | ||
.sl-markdown-content .ref-list dt { | ||
margin-top: 0; | ||
padding-top: var(--space-4); | ||
font-weight: var(--weight-normal); | ||
} | ||
.sl-markdown-content .ref-list dt code { | ||
background: none; | ||
padding: 0; | ||
font-size: var(--text-base); | ||
font-weight: var(--weight-semibold); | ||
/* A signature breaks between its words, never inside a flag. */ | ||
overflow-wrap: normal; | ||
word-break: normal; | ||
} | ||
.sl-markdown-content .ref-list dd { | ||
margin: var(--space-1) 0 0; | ||
padding-bottom: var(--space-4); | ||
border-bottom: var(--border); | ||
} | ||
.sl-markdown-content .ref-list dd > * + * { | ||
margin-top: var(--space-2); | ||
} | ||
.sl-markdown-content .ref-meta { | ||
font-size: var(--text-sm); | ||
color: var(--mute); | ||
} | ||
.ref-label { | ||
font-size: var(--text-sm); | ||
font-weight: var(--weight-medium); | ||
color: var(--faint); | ||
margin-right: var(--space-1); | ||
} | ||
| ||
/* An HTTP method, as a badge before its route. */ | ||
.method { | ||
display: inline-block; | ||
padding: 0 var(--space-2); | ||
border-radius: var(--radius-sm); | ||
font: var(--weight-semibold) var(--text-xs) / var(--leading) var(--font-mono); | ||
letter-spacing: 0.02em; | ||
vertical-align: 0.15em; | ||
background: var(--primary-soft); | ||
color: var(--primary); | ||
} | ||
.method-post { | ||
background: var(--soft); | ||
color: var(--success); | ||
} | ||
.method-ws { | ||
color: var(--done); | ||
} | ||
| ||
/* A method's lexicon, folded away under it. */ | ||
.sl-markdown-content .lexicon { | ||
margin-top: var(--space-2); | ||
border: var(--border); | ||
border-radius: var(--radius-md); | ||
font-size: var(--text-sm); | ||
} | ||
.sl-markdown-content .lexicon summary { | ||
padding: var(--space-2) var(--space-3); | ||
color: var(--mute); | ||
cursor: pointer; | ||
} | ||
.sl-markdown-content .lexicon[open] summary { | ||
border-bottom: var(--border); | ||
} | ||
.sl-markdown-content .lexicon > :not(summary) { | ||
margin: var(--space-3); | ||
} | ||
.sl-markdown-content .lex-title { | ||
font-weight: var(--weight-semibold); | ||
color: var(--fg); | ||
margin-bottom: var(--space-1) !important; | ||
} | ||
.sl-markdown-content .lex-fields { | ||
display: table; | ||
table-layout: fixed; | ||
width: calc(100% - 2 * var(--space-3)); | ||
font-size: var(--text-sm); | ||
} | ||
.sl-markdown-content .lex-fields td { | ||
vertical-align: top; | ||
} | ||
.lex-type { | ||
display: block; | ||
margin-top: var(--space-1); | ||
color: var(--mute); | ||
font-size: var(--text-xs); | ||
} | ||
.sl-markdown-content .lex-fields td:first-child { | ||
width: 40%; | ||
} | ||
.sl-markdown-content .ref-list dt .word { | ||
white-space: nowrap; | ||
} | ||
.sl-markdown-content .lex-source { | ||
color: var(--mute); | ||
} | ||
| ||
/* The header's link to the repository, quiet as the console's header links | ||
are, and no divider after it: Starlight's sits before the theme | ||
picker, which the docs leave out. */ | ||
.social-icons::after { | ||
display: none; | ||
} | ||
.social-icons a { | ||
color: var(--mute); | ||
} | ||
.social-icons a:hover { | ||
color: var(--fg); | ||
} | ||
docs-site/src/ThemeSelect.astronew+3−0
| @@ -0,0 +1,3 @@ | ||
--- | ||
// No theme picker: the docs follow the system's colour scheme, as the console does. | ||
--- | ||
docs-site/.gitignorenew+4−0
docs-site/astro.config.mjsnew+68−0
docs-site/content.mjsnew+31−0
docs-site/package-lock.jsonnew+6480−0
A large diff, not shown.