Loading files
56ae2e47fThis file is pinned to the selected release. Download the original to open it in your design tool.
Files from this revision, including CAD and LFS contents. Git history is not included.
Or in GitHub Desktop, choose File → Clone repository → URL and paste this address.
Public repositories can be cloned without signing in. For pushing, use your ThingAtlas username and a Git access token as the password.
git lfs install git clone https://thingatlas.com/git/-unclaimed/openharness-1322671404.git
Includes Git history, branches, and Git LFS files. Clones the repository’s default branch, regardless of the version shown here.
56ae2e47fThis file is pinned to the selected release. Download the original to open it in your design tool.
/**
* Down-frames the backend mints for an adapter, which a client must never be able to forge.
*
* The `__` prefix already marks most of these; these predate that convention and are not prefixed, so
* each client socket that relays frames down (`webWs`, its legacy apiKey path, `deviceWs`) has to refuse
* them by name. The adapter refuses them too unless they arrive on the backend's own `connId: ''`.
*
* Senders, all backend-side: `lib/adapterWs.ts` (on connect), `services/MachineService.ts`
* (rename, revoke) and `lib/adapterAccountPushes.ts` (desk_changed, zoo_changed, machines_changed —
* forged, each one makes every window on that computer re-read from this backend).
*/
export const BACKEND_ONLY_DOWN_TYPES = new Set(['machine_meta', 'machine_revoked', 'desk_changed', 'zoo_changed', 'machines_changed'])
/** A type no client may send down: the backend's own `__` control frames and the named ones above. */
export function isBackendOnlyDownType(type: unknown): boolean {
return typeof type === 'string' && (type.startsWith('__') || BACKEND_ONLY_DOWN_TYPES.has(type))
}