Scan your whole stack
From OX Research Newsroom
Are you using @glassly/miniapp?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.4.4-dev.1367
@glassly/miniapp was last scanned on 29 Nov 2026 at version 0.4.4-dev.1367. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.4.4-dev.1367 LATEST | 29 Nov 2026 | No rules fired |
| 0.4.4-beta.1368 | 29 Nov 2026 | No rules fired |
| 0.4.4-dev.1365 | 29 Nov 2026 | No rules fired |
| 0.4.4-dev.1363 | 29 Nov 2026 | Not shown |
| 0.4.4-beta.1364 | 29 Nov 2026 | Not shown |
Findings for v0.4.4-dev.1367. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.4.4-dev.1367; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
SDK for building Glassly local miniapps: static web apps that run inside the Glassly App's WebView and talk to smart glasses via a typed session API.
Developing this SDK or running the in-repo example from a fresh clone? Start at the SDK developer guide (setup, build loop, doc map). Per-module deep dives (return shapes, events, error codes):
sdk/docs/. Companion package:@glassly/miniapp-cli, the tooling behind theglasslycommand (dev,release,pack,manifest,permission,hardware,schema). Per-command docs live there. Scaffolder:bunx @glassly/create-miniapp my-app. Reference miniapp:miniapps/example-miniapp/. High-level walkthrough:notes/miniapp-sdk-overview.md.
bun add @glassly/miniapp
# or
npm install @glassly/miniapp
react is an optional peer dependency, required only if you use @glassly/miniapp/react.
| Specifier | Contents |
|---|---|
@glassly/miniapp |
MiniappSession, NotConnectedError, transports, manifest-types re-exports, module type exports |
@glassly/miniapp/background |
MiniappSession, registerMiniapp, the always-on session layer (see two-layer note below) |
@glassly/miniapp/ui |
The WebView-side glassly channel bridge + React adapters (<MiniappProvider>, <MiniappHeader>, hooks) and the UI kit |
@glassly/miniapp/theme.css |
The UI kit's theme sheet: the Glassly App's Light/Dark colours and the kit's look |
@glassly/miniapp/react |
React hooks + <MiniappProvider> + <MiniappHeader> (also re-exported from /ui) |
@glassly/miniapp/protocol |
MiniappRequestType, MiniappResponseType, MiniappStreamType, MiniappErrorCode |
@glassly/miniapp/hardware |
HardwareType, HardwareRequirementLevel, HardwareRequirement (manifest hardware-requirement types) |
@glassly/miniapp/known-apps |
KNOWN_APPS, knownApp, knownAppName, appGlyph (notification app names and card glyphs by bundle id / package name) |
Two layers. Miniapps split into an always-on background layer that owns the
MiniappSession(@glassly/miniapp/background, entered viaregisterMiniapp(session => …)) and a UI layer that renders inside the WebView and talks to background over the injectedglasslychannel bridge (@glassly/miniapp/ui). The UI side does not construct a session. Seesdk/docs/two-layer.md.
Background layer (owns the session):
import {registerMiniapp} from "@glassly/miniapp/background"
// registerMiniapp constructs the session and connects it (CONNECT / CONNECT_ACK)
// before invoking your handler.
registerMiniapp((session) => {
// render() replaces the whole frame; stable ids update in place, render([]) clears.
const box = {x: 0, y: 0, w: 576, h: 288} // raw device px, see session.capabilities.display
session.display.render([{type: "text", id: "hello", box, text: "hello"}])
const unsub = session.transcription.on((d) => session.display.render([{type: "text", id: "hello", box, text: d.text}]))
// later: unsub()
})
UI layer (WebView React app, no session here):
import {MiniappProvider, useConnected} from "@glassly/miniapp/ui"
function App() {
const ready = useConnected()
// talk to the background layer over the injected `glassly` channel bridge
// ...
}
// root:
;<MiniappProvider>
<App />
</MiniappProvider>
Import TextMeasurer, TextWrapper, display profiles, and pixel-art helpers
from @glassly/miniapp/display. These pure TypeScript primitives share the
host's implementation and work in either miniapp layer. See the
display primitives reference.
openReader(session, {title, sections, hold?, leaveLabel?}) from
@glassly/miniapp/reader reads long text on the glasses line by line at the
wearer's reading speed, with tap to pause, swipes to step or change speed,
hold for your action and double tap to leave. See the
Reader reference.
session.link.open({ticket}) opens a route from the phone to a computer
running glassly link, over iroh: peer to peer, with n0's public relays as the
fallback, encrypted end to end by QUIC and authenticated by the dialled endpoint
id. The route is two 127.0.0.1 ports, controlPort for the computer's control
API and servicePort for the service behind it. Every app on the phone can
reach those ports, so the route carries no credential: each control request
carries its token as Authorization: Bearer <token>, and the service's
WebSocket upgrade as ?link=<token>. @glassly/miniapp/link holds what both
ends share: the pairing link (createOffer, offerToUrl, parseOffer,
keyFingerprint), the tokens (pairingToken, phoneToken, parseLinkToken),
and the control API's paths and replies. Terminal and glassly link use it. Its
API may change, and it stays out of the public docs until a second miniapp uses
it.
Both the main and /background entry points export:
monoTextRows({id, text, box, fontSize}): stable-ID row elements for G2 CFW
fixed-pitch grids. Uses its 2px text inset and rounded 1.2× line pitch.
Unsupported Unicode falls back per row instead of rasterizing the entire
grid. Check positioned-text and element budgets first; this does not make
stock firmware support dense mono grids. Submit all rows in each scene,
including blank rows, so deletions clear correctly.LatestRenderScheduler(() => intervalMs): request(async () => { ... })
runs one callback at a time, keeping only the latest pending callback.
Construct the scene inside the callback and await display.render();
report failures there. Call clearPending() when changing views and
dispose() on shutdown. It cannot cancel native work already submitted,
does not change global FPS/transport settings, and must never be used to
discard input bytes or other non-replaceable events.These are optional producer-side helpers, not an automatic native Unicode renderer change or BLE message pipelining.
MiniappSession is the only object you construct. It owns the transport, the request/response correlation map, the pre-ready outbound queue, the keepalive PONG, and the cached visibility / capabilities / color-scheme / permissions state.
const session = new MiniappSession(options?)
await session.connect() // idempotent; same Promise on repeat calls
session.isConnected()
session.disconnect()
MiniappSessionOptions:
packageName?: string: overrides auto-detection from window.GlasslyconnectTimeoutMs?: number: defaults to 10screateTransport (transport, localSocketUrl)const off = session.on("ready", () => {})
session.off("ready", handler)
| Event | Signature |
|---|---|
ready |
() => void, fires after CONNECT_ACK |
beforeDisconnect |
(reason: string) => void, last chance to send one final one-shot |
disconnect |
(reason: string) => void |
error |
(err: Error) => void |
visibility |
("foreground" \| "background") => void |
capabilities |
(caps: GlassesCapabilities \| null) => void |
preferences |
(prefs: MiniappPreferences) => void |
colorScheme |
("light" \| "dark") => void |
permissions |
(perms: PermissionRecord) => void |
speakerState |
(event: SpeakerStateEvent) => void |
auth |
(auth: MiniappAuthState) => void |
Convenience wrappers: onVisibilityChange, onCapabilitiesChange, onPreferencesChange, onColorSchemeChange, onBeforeDisconnect. Each on(...) call also returns an unsubscribe function.
session.userId, session.packageName, session.capabilities, session.preferences, session.visibility, session.colorScheme, session.launchSource, session.ready are populated from CONNECT_ACK and kept in sync via the lifecycle events above.
session.preferences is {unitSystem: "metric" | "imperial", twelveHourTime: boolean}: the host's metric toggle (Settings > Appearance) and the phone's own 12/24-hour clock setting. Follow it for distances, temperatures and clock formatting unless your miniapp offers its own override. It is null on runtimes that predate the preferences surface, so fall back rather than assuming a value.
session.launchSource is "phone" or "glasses" — where the user started this session from — and null until CONNECT_ACK arrives, or on runtimes that don't send it.
const twelveHour = session.preferences?.twelveHourTime ?? true
session.onPreferencesChange((prefs) => rerender(prefs))
if (session.launchSource === "glasses") openGlassesFirstView()
All event subscribers return an UnsubscribeFn. Subscriptions are ref-counted: the SDK sends SUBSCRIBE when a stream's active state or routing metadata changes.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.