New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@arsenstorm/olos

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arsenstorm/olos

Open Live Object Streaming protocol primitives.

Source
npmnpm
Version
0.3.0
Version published
Maintainers
1
Created
Source

OLOS

Socket OpenSSF Scorecard

Open Live Object Streaming protocol primitives. A low-latency append-only stream log over plain object storage (S3, R2, GCS).

Install

npm install @arsenstorm/olos

Imports

import { OLOS_PROTOCOL_NAME, OLOS_WIRE_VERSION } from "@arsenstorm/olos";
import type { Session } from "@arsenstorm/olos/types";
SubpathUse for
@arsenstorm/olos/runtimeSession routes, publisher loops, HLS serving.
@arsenstorm/olos/s3S3 upload grants, observation, events, recovery, retention.
@arsenstorm/olos/hlsHLS rendering and blocking-reload helpers.
@arsenstorm/olos/protocolCoordinator stores and adapter conformance.
@arsenstorm/olos/stateLower-level state transitions and policies.
@arsenstorm/olos/schemaJSON Schemas for wire objects.
@arsenstorm/olos/validationRuntime payload validators.
@arsenstorm/olos/typesPublic protocol data types.
@arsenstorm/olos/configProtocol constants and policy defaults.
@arsenstorm/olos/conformanceAssertion metadata and store checks.

Quick start

A complete OLOS endpoint with S3-backed live media:

import {
  createMemorySerializedCoordinatorStoreBackend,
  createSerializedCoordinatorStore,
} from "@arsenstorm/olos/protocol";
import { createStoredS3CoordinatorRuntimeHandler } from "@arsenstorm/olos/s3";
import { S3Client } from "@aws-sdk/client-s3";

const store = createSerializedCoordinatorStore(
  createMemorySerializedCoordinatorStoreBackend()
);

const s3 = new S3Client({ region: "us-east-1" });

const handleOlos = createStoredS3CoordinatorRuntimeHandler({
  allowedMediaOrigins: ["https://media.example.com"],
  bucket: "olos-media",
  client: s3,
  expiresInSeconds: 5,
  providerId: "s3_primary",
  store,
});

export default { fetch: (req: Request) => handleOlos(req) };

Publishers create a session, then loop: get a presigned slot, PUT media bytes to S3, post a commit. Viewers GET HLS manifests. The handler covers it.

Working setups:

  • examples/api — Cloudflare Worker + Durable Object + R2.
  • examples/streamer — OBS-to-OLOS bridge using ffmpeg micro-segments.
  • examples/player — LL-HLS player at the PART-HOLD-BACK spec floor.

Routes

The handler mounts:

MethodPathPurpose
POST/sessionsCreate a session.
POST/sessions/:id/s3/slotsIssue a presigned upload slot.
POST/sessions/:id/s3/commitsObserve and commit an upload.
POST/sessions/:id/s3/eventsAccept S3 object-created events.
POST/sessions/:id/s3/reconcile-planList in-flight slots for recovery.
POST/sessions/:id/s3/reconcileRecover slots after missed events.
POST/sessions/:id/s3/retentionPlan and delete retired media.
POST/sessions/:id/transitionAdvance session state.
POST/sessions/:id/heartbeatPublisher liveness ping.
GET/sessions/:id/healthLive / starting / stale summary.
GET/v1/live/:id/.../media.m3u8LL-HLS playlist with _HLS_msn blocking reload.

Layers

OLOS is a layered protocol. Each layer answers a different question and can be reused, extended, or replaced independently.

Core. What makes an uploaded object an officially committed part of the live stream. Slots, observations, commits, cursors, CommittedWindow. The invariant: object exists ≠ object is stream state. Media-agnostic; no HLS, no S3, no HTTP.

LL-HLS Profile. How the committed window renders into a playable LL-HLS manifest with blocking reload. Currently video-first; RENDITION_KINDS is open to audio / text / metadata for future profiles.

S3-Compatible Binding. The minimum a storage backend must provide: exact-key uploads, conditional create, HeadObject consistency, optional event notifications. Works with S3, R2, GCS-S3, or any compatible store.

Direct-Public Deployment Profile. The configuration that says committed media bytes are served directly from the media origin. Requires a cookieless media origin, negative cache for 404s, and no document navigation to media URLs. The manifest is the gate.

Runtime Guidance. Heartbeats, retention, reconciliation, live health, publisher loops. The operational glue that lives in the runtime layer, not in the protocol-essential commit semantics.

OLOS owns slot rules, commit idempotency, S3 object observation, cursor sequencing, manifest rendering, retention planning, blocking-reload boundary, and the conformance suite.

Your app owns authentication, the coordinator store backend, S3 credentials, cursor wake-up mechanism, publisher scheduling, viewer routing, cache purge, and tenant quotas.

Further reading

Release check

bun --filter '@arsenstorm/olos' publish:check

FAQs

Package last updated on 27 Jun 2026

Related posts