| title | Firebolt APIs |
|---|
Firebolt APIs are defined by OpenRPC schemas and used to generate SDK and documentation artifacts.
This repo contains the OpenRPC source for every Firebolt module, the three published SDK packages, and the CI/toolchain that compiles and validates them.
| Package | Description |
|---|---|
@firebolt-js/sdk |
Core APIs for app developers |
@firebolt-js/manage-sdk |
Device management APIs |
@firebolt-js/discovery-sdk |
Content discovery APIs |
src/openrpc/ # OpenRPC JSON source — one file per module (source of truth)
src/schemas/ # Shared JSON Schema definitions
src/sdks/ # npm workspace packages (generated — do not hand-edit build/ or dist/)
requirements/ # Normative specification documents
.github/workflows/ # CI pipelines
Requires Node.js LTS and npm 7+.
npm ci # install dependencies
npm run dist # validate → compile → build all SDKs → test
npm run compile # compile dist/firebolt-open-rpc.json only
npm run validate # validate all OpenRPC sources
npm test # run jest unit tests
npm run clean # remove dist/ and workspace artifacts- Each
src/openrpc/<module>.jsonis validated against the OpenRPC spec. - All modules are merged into
dist/firebolt-open-rpc.json. - The compiled OpenRPC is sliced into per-SDK subsets (core / manage / discovery).
- TypeScript/JavaScript SDK source is code-generated from each slice.
- Jest tests exercise the generated SDKs against mock responses.
Never edit files under src/sdks/*/build/ or src/sdks/*/dist/ — they are generated outputs.
All API changes start in src/openrpc/<module>.json. Key conventions:
- Method names:
Module.method(PascalCase module, camelCase method). - Use the
"property"tag for getter/setter/subscriber triples — only define the getter; the toolchain generates the rest. - Use
"property:immutable"for read-only properties. - Declare capabilities via
x-uses,x-manages, orx-providesinside a"capabilities"tag block. - Every result schema needs at least one
"examples"entry.
See requirements/ for normative specification documents and requirements/style-guide-and-template.md for the spec template.
The MFOS integration test job can be run locally using act, which runs GitHub Actions workflows in Docker.
# Install act (macOS/Linux)
brew install act # macOS
# or see https://github.com/nektos/act#installation for Linux
# Required system packages on Linux
sudo apt-get install -y xvfb x11-utils google-chrome-stableThe INTENT Actions variable must be present. Create .act.vars in the repo root (it is git-ignored):
INTENT={"result":{"lmt":0,"us_privacy":"1-N-","discovery":{"navigateTo":{"action":"search","data":{"query":"{\"task\":\"runTest\",\"params\":{\"certification\":true,\"exceptionMethods\":[],\"methodsToBeExcluded\":[\"Lifecycle.finished\"]},\"action\":\"FIREBOLT-ALL\",\"context\":{\"communicationMode\":\"SDK\"},\"metadata\":{\"target\":\"MFOS\",\"targetVersion\":\"NIL\"},\"asynchronous\":false,\"appType\":\"firebolt\"}"},"context":{"source":"voice"}}}}}
act -j RunStandaloneTests --var-file .act.vars- Chrome —
actuses a stripped Ubuntu image; the workflow installsgoogle-chrome-stableautomatically via the "Install Chrome" step. - Xvfb —
xdpyinfomay not connect on all runners. The readiness check is non-fatal; headless Chrome does not require a live display. - FCA webpack — expect
ℹ 「wdm」: Compiled with warnings.(not "successfully") on a clean install due to optional plugin stubs. This is normal and harmless. - Cached repos —
actcaches themock-fireboltandfirebolt-certification-appclones between runs. Usemake mfos-clean-allto force a fresh clone.
This repo uses Conventional Commits enforced by commitlint.
<type>(<scope>): <Subject in sentence case>
Valid types: feat, fix, build, chore, ci, docs, perf, refactor, revert, style, test.
Copyright 2023 Comcast Cable Communications Management, LLC — see LICENSE and NOTICE.