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.2.0
Version published
Weekly downloads
49
-37.18%
Maintainers
1
Weekly downloads
 
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.

Scope

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.

Beyond video

The core — slot, commit, cursor, blocking-read — is media-agnostic. LL-HLS is one binding. The same substrate could carry audio-only streams, captions, AI inference output, telemetry tails, or any append-only stream over object storage. Only the HLS rendering module assumes video.

Further reading

Release check

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

FAQs

Package last updated on 27 Jun 2026

Related posts