quest'n'click 4.5.0 · r1

Built for quest'n'click 4.5.0, revision r1. Whether it is published, and which one is current, is recorded at publication.json.

Connectors overview

Français · Type: explanation · Audience: author, admin · Context: Reality Bridge · Status: ready · Applies from: 4.2.5

The connectors (email, Telnet, SSH, Open Badges) · contract: experimental · verified by CI (support matrix of 4.4.0, 2026-10-23): Node 22 on Ubuntu (Telnet and SSH not on Windows) · automated checks: jobs connectors, connector-archive-e2e; CI plan reality; 3 test files · people's passes: connectors-real-security not run (#79) · known limits: none listed on this page

A connector turns something that happens outside the game (an email arrives, a command is typed on a terminal, a badge is shown) into one of the signals the game declares, and proposes it to the Reality Bridge. Four ship since 4.1.9, in the package quest-n-click-connectors: email, Telnet, SSH and Open Badges. This page says how they are built and run; each has its own page.

What a connector is

ConnectorReadsBinds the player byIts page
emaila message posted by a provider's signed webhook, or polled over IMAPa recipient tag +p-…, or the sender who sent a pairing codeEmail
telnetlines typed on a TCP terminalthe pairing code typed, or a resume wordTelnet
sshlines typed in an SSH terminala pairing code or resume word as password, or a declared public keySSH
open-badgea badge posted to its formthe pairing code posted with itOpen Badges

Run one

Each connector needs its own token from the Bridge, then its configuration file:

# in the engine repository (the Bridge's folder is .cache/bridge)
npm run bridge -- grant --connector=shed-telnet --source=terminal --signals=terminal.lamp --pair > telnet.token
npm run connector -- telnet --config telnet.json
# on a server, with the package quest-n-click-connectors installed
npx quest-n-click-connector telnet --config telnet.json

The command is quest-n-click-connector <email|telnet|ssh|open-badge> --config <file.json>. Install the package without native code: npm install --omit=optional --ignore-scripts quest-n-click-connectors. The configuration names the Bridge and the file of the connector's token (never the token on the command line), the game, its limits, an optional health port, and a section named after the connector:

{
  "bridge": { "url": "http://127.0.0.1:8787/", "tokenFile": "telnet.token" },
  "gameId": "signals",
  "limits": { "maxBytes": 4096, "maxPerMinute": 60, "timeoutMs": 5000 },
  "health": { "port": 9301 },
  "telnet": { "port": 2323 }
}

A token minted with --pair may confirm the pairing codes players give; grant each connector only the signals it proposes. A connector checks what it claims (a credential's proof, an email's sender): Biscuit only says who may propose. On the Bridge, a connector uses three routes:

Declare what the connectors may do

The game says, as data, what each connector may turn into a signal: reality.connectors, checked by npm run validate. Every signal named there is one of reality.signals; no pattern, script or path of the author's reaches a connector.

reality: {
  signals: [
    { id: 'letter.door', source: 'email', availability: 'optional', replay: 'record' },
    { id: 'terminal.lamp', source: 'terminal', availability: 'optional', replay: 'record' },
  ],
  connectors: {
    email: { answers: [{ words: ['open', 'door'], signal: 'letter.door' }], otherwise: 'letter.unclear' },
    telnet: { prompt: 'shed> ', commands: [{ says: 'lamp on', reply: 'Click.', signal: 'terminal.lamp' }] },
    ssh: { commands: [/* the same */], files: { '/notes/lamp.txt': 'The lamp obeys two words.' } },
    'open-badge': { issuers: ['https://badges.example.org/issuer'], valid: 'badge.valid', revoked: 'badge.refused' },
  },
}

Every field and its constraints: Signals and the manifest. Two authorisations stack: the game's declaration (which signals a connector's input may become) and the connector's token (which signals, sources and players the Bridge accepts from it): Security.

A player links a connector to their game the way they link any connector: the pause menu's World link shows a code, and the player types it at the terminal's prompt, sends it as an email's subject (PAIR ABCD2345), or posts it with a badge. The connector confirms it with the Bridge; the game is then linked.

What leaves a connector

Why

A connector reads input written by strangers and holds a secret (a mailbox password, a host key). Neither may reach the game, a PWA with no socket, no secret and no executable content, nor its DSL. One process per connector keeps a fault or a compromise in one place, and one small SDK makes every connector behave the same towards the Bridge: the same limits, the same retry with the same key, the same redacting log, the same health and stop.

Alternatives set aside

Trade-offs

Decisions and ADRs


Edit the source of this page · Report an error