Skip to content

Glossary

Code that runs on your instance when something happens: an XRPC query or procedure is called, a record or label arrives, or a job runs. Every script defines handle(input, ctx). input is what the trigger passes (a query’s parameters, a procedure’s body, the record event). ctx carries the caller and the run’s context. A script loads what it needs with require. Scripts are written in a language an installed interpreter runs: Lua, JavaScript or TypeScript.

v2’s script globals (db, Record, params and 29 others) are gone in v3. See Migrating scripts to v3.

What makes a script run, written as an id such as record.create:xyz.statusphere.status. A script is named by what triggers it: a query script (xrpc.query), a procedure script (xrpc.procedure), a record script (record.index, record.create, record.update or record.delete), a label script (labeler.apply) or a job script (job.run).

A named value a script reads from ctx.env, managed on the dashboard’s ENV Variables page. It isn’t an environment variable, which configures the instance.

What a script is written in: Lua, JavaScript or TypeScript. Each is run by its own interpreter.

A plugin that runs scripts in one language. HappyView ships without one, so until you install one, no script can be saved or run. The official interpreters are happyview-lua, happyview-javascript and happyview-typescript. Each claims a language ID (lua, javascript, typescript); a script runs on the interpreter that claims its language.

A plugin that gives scripts an API, loaded with require: require("happyview.db") for querying records, for example. Libraries are installed separately from interpreters, and an interpreter declares which libraries it supports. The internal. namespace (internal.json, internal.logging and so on) is reserved for modules the interpreter provides itself.

A WebAssembly module that extends HappyView. There are three types: interpreters, libraries and auth plugins, which link accounts on other platforms. A plugin’s manifest must declare api_version "2" and list its capabilities; HappyView refuses anything else. You install plugins from the registry, from a URL, or from a file.

A plugin that lets a user link an account on another platform, such as Steam or itch.

Something a plugin is allowed to do, such as records:read, network:request or secrets:read. A plugin’s manifest lists the capabilities it needs. HappyView checks that list against what the plugin’s code actually imports, refuses a plugin that imports more than it declares, and shows you the list to approve when you install it. Each capability carries a risk level, from low to critical.

Where HappyView finds plugins to install. The registry is a set of software.release atproto records: a project per plugin (software.release.project), with its versions (software.release.version). A project is named by its publisher’s DID plus a name, for example happyview-lua. HappyView reads the registry at https://api.happyproto.at and refreshes its registry listing every 15 minutes. PLUGIN_REGISTRY_URL points it elsewhere, or off stops HappyView reading the registry.

A registry install is checked by CID: HappyView fetches the plugin’s manifest and module from the registry, refuses any bytes whose CID doesn’t match, and fetches them again at every startup and reload. Updates only ever come from the publisher you installed from.

A line of releases a plugin publishes in the registry: latest for releases, beta and alpha for prereleases. An install follows a channel, and is offered the next version on it, unless you pin it to one version. During the v3 alpha, the official interpreters are published on alpha only.

What a publisher says about a version: active or deprecated (both installable), or unavailable or retired (not installable). A plugin whose version is retired after you install it keeps running; the dashboard marks it with the publisher’s reason.

One running HappyView server, self-hosted or on HappyProto. Its role on the atproto network is an AppView.

Your own product, which talks to an instance.

The directory you deploy to an instance: its lexicons and scripts under src/, its interpreters and libraries in happyview.toml, and the exact plugin versions in happyview.lock. Run a project locally with hpy happyview dev, check it with check, test it with test, and deploy it to an instance with hpy happyview deploy. Deploying needs the project:deploy permission. HappyView also runs a project directly when HAPPYVIEW_PROJECT points at its directory.

A container in the HappyProto dashboard that holds one instance today and other services later. Your project deploys to the instance in a HappyProto project.

A service an instance publishes in its DID document, and the id other services use to address it.

A child API client an app creates through dev.happyview.createApiClient.

HappyProto’s command-line tool.

  • hpy happyview builds HappyView apps: create, dev, add, build, check, test, types, then login, deploy, logout and whoami for instances.
  • hpy registry signs in to the registry with login, and manages your plugins there with hpy registry plugin: init, publish, status, lifecycle and others.
  • hpy update and hpy channel keep hpy itself up to date.

A person who signs in to an instance’s dashboard or admin API to run it. The dashboard’s Users page lists operators.

A person signed in to an app with their atproto account.

One thing an operator or API key may do, such as lexicons:publish or scripts:manage. An operator holds any mix of them, often starting from a template. The full list is under Permissions.

A starting set of permissions for a new operator: Viewer, Maintainer, Manager or Full Access. Each includes everything in the one before it.

A privilege an operator holds: every permission, unrestricted. Usually one operator has it; only an operator who holds it can transfer it to another, and the dashboard marks them Owner. On a fresh instance it goes to the first person to sign in, unless SUPERADMIN_DID names someone else.

An atproto OAuth permission set that an app asks for at sign-in to use an instance’s admin API. HappyView’s is dev.happyview.adminFull (“Manage your HappyView instances”), which grants rpc on dev.happyview.admin.manage. An app holding it acts with the permissions the signed-in operator already has on that instance, never more. hpy signs in with it.

A schema document describing a record type, a query or a procedure. A record lexicon, query lexicon or procedure lexicon is named by its main type.

A lexicon’s id, such as xyz.statusphere.status.

A lexicon defined by a file under a project’s src/lexicons/.

A lexicon an instance fetches from its authority on the network and keeps up to date.

A lexicon added to an instance through the dashboard or the admin API. The dashboard’s Local tab adds one, and the API reports its source as manual.

An atproto identity with its own repository. Backfill progress counts accounts.

The set of records of one record lexicon, named by that lexicon’s NSID.

Where an instance’s records come from and where they’re kept. A provider is a record source, a record storage, or both. Both are traits in the open happyview-provider crate. A stock instance uses the built-in Jetstream source and keeps everything in its own database.

What finds records on the network and hands them to HappyView. The built-in one is Jetstream, which also runs backfills.

Where the records of the collections it claims are kept, outside the instance’s own database. HappyView still runs record scripts, serves reads and handles writes for those collections. If the storage can’t be reached, record reads answer 503 “the record store is unavailable” rather than an empty result.

Indexing the records a collection already has on the network, rather than waiting for new ones to arrive. A backfill is a crawl, a replay or, on HappyProto, a run of your record scripts over the network store’s copy.

A backfill that lists accounts from the relay and fetches each account’s records from its PDS.

A backfill that reads the Jetstream archive.

The shared copy of public atproto records every HappyProto instance reads from, through a record source and storage of HappyProto’s own. If you run HappyView yourself, it doesn’t apply to you.

What a backfill’s records cost in record scripts, reported in a backfill job’s hook_stats.

HappyView has 53 permissions. An operator holds any mix of them; the four built-in templates are starting points. Each template includes everything in the one before it: Viewer (11), Maintainer (15), Manager (42) and Full Access (all 53). The operator with superadmin holds every permission and can’t be restricted.

PermissionWhat it allowsLowest template that grants it
Lexicons
lexicons:createUpload and register new lexicon schemasManager
lexicons:readView registered lexicon schemasViewer
lexicons:deleteRemove lexicon schemasManager
lexicons:publishPublish lexicons to the network and manage publishing rulesManager
Records
records:readBrowse indexed AT Protocol recordsViewer
records:deleteDelete individual records from the indexManager
records:delete-collectionBulk-delete all records in a collectionFull Access
Script Variables
script-variables:createAdd or update environment variables for scriptsManager
script-variables:readView script environment variable keys and valuesViewer
script-variables:deleteRemove script environment variablesManager
Users
users:createAdd new dashboard usersFull Access
users:readView the user list and their permissionsViewer
users:updateModify user permissionsFull Access
users:deleteRemove dashboard usersFull Access
API Keys
api-keys:createGenerate new API keys for admin accessMaintainer
api-keys:readView existing API keysViewer
api-keys:deleteRevoke existing API keysMaintainer
Backfill
backfill:createTrigger historical record backfill jobsMaintainer
backfill:readView backfill job status and progressViewer
System
stats:readView collection statistics and record countsViewer
events:readView the event logViewer
events:purgeBulk-delete event log entries matching a filterFull Access
metrics:readView script run counts, latency, errors and resource useViewer
Labelers
labelers:createSubscribe to external labeler servicesManager
labelers:readView subscribed labeler servicesManager
labelers:deleteUnsubscribe from labeler servicesManager
Settings
settings:manageModify instance settings, logo, and configurationManager
Plugins
plugins:readView installed plugins and their configurationManager
plugins:createInstall and configure new pluginsManager
plugins:deleteUninstall pluginsManager
API Clients
api-clients:viewView registered OAuth API clientsManager
api-clients:createRegister new OAuth API clientsManager
api-clients:editModify API client settings and credentialsManager
api-clients:deleteRemove registered API clientsManager
Dead Letters
dead-letters:readView failed hook executionsViewer
dead-letters:manageRetry, re-index, or dismiss dead lettersMaintainer
Spaces
spaces:createCreate new permissioned data spacesManager
spaces:readView space details, metadata, and membersManager
spaces:updateModify space settingsManager
spaces:deleteRemove spaces and their dataManager
spaces:manage-membersAdd or remove space members and rolesManager
spaces:manage-invitesCreate and revoke space invitationsManager
spaces:manage-recordsRead and write records within spacesManager
spaces:manage-credentialsIssue and revoke space access credentialsManager
Scripts
scripts:readView trigger-keyed scriptsViewer
scripts:manageCreate, update, and delete trigger-keyed scriptsManager
Jobs
jobs:readView background job status and progressFull Access
jobs:createQueue new background jobsFull Access
jobs:manageCancel, pause, and resume background jobsFull Access
Linked Repos
linked-repos:readView linked repos, their status, and their scopesFull Access
linked-repos:createAdd linked repos and start authorization flowsFull Access
linked-repos:deleteRevoke linked repos and delete their stored sessionsFull Access
Project
project:deployReplace the instance’s project with a deployed bundle and start the backfills it declaresManager