npm.io
0.12.1 • Published 10h ago

@lumencast/dev-server

Licence
Apache-2.0
Version
0.12.1
Deps
2
Size
104 kB
Vulns
0
Weekly
0

lumencast-js

TypeScript SDK monorepo for Lumencast — the missing standard for server-driven displays.

License: Apache 2.0 Spec: LSDP/1 Format: LSML 1.0

This repo bundles four packages under the @lumencast/* npm scope :

Package What it does
@lumencast/protocol Pure protocol code — LSDP/1 envelope, codec, sequence tracker, leaf-path utilities, error taxonomy, types
@lumencast/runtime Browser runtime — mount(), transport, leaf-grain store, render of LSML primitives, animations, overlays
@lumencast/server Node server kit — HTTP+WS server, scene/store/adapter abstractions, token-agnostic auth hooks
@lumencast/dev-server Mock LSDP/1 server with /__mock/* control plane — useful for any adopter writing tests

Quickstart

pnpm install
pnpm build
pnpm test

A full hello-world lives in examples/basic-scoreboard — boots @lumencast/dev-server, mounts @lumencast/runtime, sends a couple of deltas.

import { mount } from "@lumencast/runtime";

const handle = mount({
  target: document.getElementById("stage")!,
  serverUrl: "wss://example.com/lumencast/v1",
  token: "<jwt>",
  mode: "broadcast",
});

// later, when the operator's token rotates :
handle.setToken("<new-jwt>");

// teardown :
handle.disconnect();

Repo layout

lumencast-js/
├── packages/
│   ├── protocol/         @lumencast/protocol     — pure LSDP/1
│   ├── runtime/          @lumencast/runtime      — browser, mount() + render
│   ├── server/           @lumencast/server       — Node server kit
│   └── dev-server/       @lumencast/dev-server   — mock for tests
├── examples/
│   ├── basic-scoreboard/                         — 5-minute hello world
│   └── conference-board/                         — vote queue + Q&A counts
├── pnpm-workspace.yaml
├── package.json                                  — workspace root
├── tsconfig.base.json                            — strict TS 5.7 base
├── tsconfig.json                                 — project references root
├── eslint.config.mjs                             — flat ESLint
└── .prettierrc.json

Package matrix

Mode Bundle ≤ (gz) Includes
broadcast 200 KiB transport + state + render
control 280 KiB + operator overlay
test 350 KiB + test inspector + mock plumbing

Vite library-mode builds three entry points so hosts only ship what they use.

Spec & conformance

The wire protocol (LSDP/1), the scene format (LSML 1.0), the error code taxonomy and the conformance fixtures live in Lumencast/lumencast-protocol. This SDK is the canonical TypeScript implementation.

pnpm conformance runs the protocol package's harness against the fixtures.

Status

  • Status : 0.1.0 — pre-alpha. Spec is draft; SDK extracts from Solar v0.1.1 and re-aligns to LSDP/1.
  • Distribution : npm publish manual until release flow stabilises (no auto-deploy in 0.1.x).

Relationship to Solar

This SDK was bootstrapped from ZabLaboratory/Solar v0.1.1 (Apache 2.0). The Solar internal protocol has been replaced with the formal LSDP/1 wire protocol; identifiers re-namespaced to @lumencast/*; rendering primitives kept verbatim where they were already protocol-agnostic. Solar continues to live under Zablab as their broadcast runtime — Zablab plans to consume @lumencast/runtime once this SDK matures.

See NOTICE for attribution details.

Contributing

See CONTRIBUTING.md. Governance and the RFC process for protocol/schema changes live in the protocol repo.

License

Apache License 2.0 — see LICENSE.