···130130 check('webhook_event_source_chk', sql`${table.source} in ('github','tangled')`),
131131])
132132133133-// AT Protocol OAuth stores. The values are encrypted at rest (libsodium sealed
134134-// box) because they contain access tokens, refresh tokens, and the DPoP private
135135-// key for the user's PDS. The encryption layer wraps the OAuth library's store
136136-// interface (encrypt in set, decrypt in get); see commit 9 (`feat: generate
137137-// per-install ssh key and publish publickey record`) for the shared helper.
133133+// AT Protocol OAuth stores. The values are encrypted at rest because they
134134+// contain access tokens, refresh tokens, and the DPoP private key for the
135135+// user's PDS. The encryption layer wraps the OAuth library's store interface
136136+// (encrypt in set, decrypt in get).
138137export const atprotoState = pgTable('atproto_state', {
139138 key: text('key').primaryKey(),
140139 valueCiphertext: bytea('value_ciphertext').notNull(),
···77 * before it lands in the DB: AT Proto session blobs, SSH private keys.
88 *
99 * The KEK is held only in env. If it's lost, every encrypted row becomes
1010- * unreadable. KEK rotation is a future concern \u2014 see PLAN.md.
1010+ * unreadable. KEK rotation is a future concern; see PLAN.md.
1111 */
1212const NONCE_BYTES = 24
1313let cachedKey: Uint8Array | undefined
···77 *
88 * The official UI does this same mapping in
99 * `appview/pages/templates/repo/empty.html`. If tangled adds more
1010- * appview-hosted knots in future this'll need updating \u2014 see PLAN.md
1010+ * appview-hosted knots in future this'll need updating; see PLAN.md
1111 * "Deferred / follow-ups".
1212 */
1313export function sshHostForKnot(knot: string): string {