@omss/core 0.0.2-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Open Media Streaming Foundation
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,198 @@
1
+ <div align="center">
2
+
3
+ # OMSS Core
4
+
5
+ <!--
6
+ <br />
7
+ <img
8
+ src="https://raw.githubusercontent.com/omss-spec/graphics/HEAD/omss-landscape-outlined.svg"
9
+ width="500"
10
+ height="auto"
11
+ alt="OMSS Core"
12
+ />
13
+ <br /><br />
14
+ -->
15
+
16
+ </div>
17
+
18
+ <div align="center">
19
+
20
+ [![CI](https://github.com/omss-spec/core/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/omss-spec/core/actions/workflows/ci.yml)
21
+ [![npm version](https://img.shields.io/npm/v/@omss/core.svg?style=flat)](https://www.npmjs.com/package/@omss/core)
22
+ [![npm downloads](https://img.shields.io/npm/dm/@omss/core.svg?style=flat)](https://www.npmjs.com/package/@omss/core)
23
+ [![Codecov](https://img.shields.io/codecov/c/github/omss-spec/core)](https://codecov.io/gh/omss-spec/core)
24
+ [![Security Responsible Disclosure](https://img.shields.io/badge/Security-Responsible%20Disclosure-yellow.svg)](https://github.com/omss-spec/core/blob/main/SECURITY.md)
25
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](./LICENSE)
26
+
27
+ </div>
28
+
29
+ <br />
30
+
31
+ **OMSS Core** is the official TypeScript runtime and plugin orchestrator for building [OMSS-compliant](https://github.com/omss-spec/omss-spec) media streaming services.
32
+
33
+ The core is intentionally minimal. Its sole responsibility is to manage the OMSS lifecycle, load plugins, and expose shared states between them. All additional functionality — HTTP transport, caching, resolvers, auth — is added via **OMSS Plugins**.
34
+
35
+ > [!NOTE]
36
+ > The project is in beta. The API shown here is preliminary.
37
+
38
+
39
+ ### Table of Contents
40
+
41
+ - [Install](#install)
42
+ - [Quick Start](#quick-start)
43
+ - [Features](#features)
44
+ - [Documentation](#documentation-_coming-soon_)
45
+ - [Ecosystem](#ecosystem)
46
+ - [ID Convention](#id-convention)
47
+ - [Contributing](#contributing)
48
+ - [Support](#support)
49
+ - [Team](#team)
50
+ - [Acknowledgments](#acknowledgments)
51
+ - [License](#license)
52
+ - [Dependencies](#dependencies)
53
+
54
+
55
+ ## Install
56
+
57
+ ```sh
58
+ npm install @omss/core
59
+ ```
60
+
61
+ ```sh
62
+ yarn add @omss/core
63
+ ```
64
+
65
+ ```sh
66
+ pnpm add @omss/core
67
+ ```
68
+
69
+
70
+ ## Quick Start
71
+
72
+ ```ts
73
+ import { OMSSServer } from '@omss/core'
74
+ import httpPlugin from '@omss/plugin-http'
75
+ import cachePlugin from '@omss/plugin-cache'
76
+
77
+ const server = new OMSSServer({
78
+ name: 'My Media Server',
79
+ })
80
+
81
+ await server.plugins.register(httpPlugin, {
82
+ port: 3000,
83
+ })
84
+ // and many other features.
85
+ ```
86
+
87
+ Do you want to know more? Check out the [documentation](https://omss.mintlify.site) for a more in-depth guide.
88
+
89
+
90
+ ## Features
91
+
92
+ - **Modular by design** — the core ships with almost no functionality. Everything is a plugin.
93
+ - **OMSS Lifecycle** - use hooks to get notified of OMSS lifecycle events.
94
+ - **Fully typed** — built in TypeScript with full type exports for **Everything** (no `any` used!)
95
+ - **Extensible**: OMSS Core is fully extensible via its hooks, plugins, and decorators.
96
+ - **Middleware support** — certain services expose middleware chains that plugins can extend (e.g., caching layers).
97
+ - **Developer friendly**: the framework is built to be very expressive and help developers in their daily use without sacrificing performance.
98
+ - **Standards-compliant** — built with the [OMSS Specification](https://github.com/omss-spec/omss-spec) in mind.
99
+
100
+
101
+ ## Documentation _(coming soon)_
102
+
103
+ The documentation is currently under development. You can find the latest version at [https://omss.mintlify.site](https://omss.mintlify.site).
104
+
105
+
106
+ ## Ecosystem
107
+
108
+ We are working on a comprehensive ecosystem of plugins that can be used to extend OMSS.
109
+
110
+ The current Open Media Streaming Specification can always be found at [https://github.com/omss-spec/omss-spec](https://github.com/omss-spec/omss-spec).
111
+
112
+ ### Plugins
113
+
114
+ An official plugin registry is planned for the future.
115
+
116
+ **Official Plugins** (maintained by the OMSS team):
117
+
118
+ > [!NOTE]
119
+ > These plugins are a WIP.
120
+
121
+ | Plugin | Description |
122
+ |:---------------------|:-----------------------------|
123
+ | `@omss/plugin-http` | HTTP transport via Fastify |
124
+ | `@omss/plugin-cache` | Memory and Redis caching |
125
+ | `@omss/plugin-auth` | Basic authentication support |
126
+
127
+
128
+ ### Resolvers
129
+
130
+ Resolvers are used to resolve OMSS IDs to media metadata.
131
+
132
+ **Official Resolvers** (maintained by the OMSS team):
133
+
134
+ > [!NOTE]
135
+ > These resolvers are a WIP.
136
+
137
+ | Resolver | Description |
138
+ |:----------------------|:-----------------------------|
139
+ | `@omss/resolver-tmdb` | TMDB resolver |
140
+
141
+
142
+ ## ID Convention
143
+
144
+ IDs follow the format `<namespace>:<value_1>:<value_2>:...:<value_n>`. Values can contain any character — use URL encoding if your value includes `:` or whitespaces. Values are URL-decoded during parsing.
145
+
146
+ However, the following namespaces are reserved for the OMSS specification and must follow the rules below. More namespaces may be added in the future:
147
+
148
+ **TMDB:**
149
+ - Movie: `tmdb:<movie_id>` — e.g., `tmdb:155`
150
+ - TV Episode: `tmdb:<show_id>:<season>:<episode>` — e.g., `tmdb:1396:3:7`
151
+
152
+ > [!NOTE]
153
+ > All values must be natural numbers (≥ 1), except `season_number` which may be `0` (specials).
154
+
155
+ **IMDb** (Movies and TV Episodes only — not series):
156
+ - Movie: `imdb:tt<digits>` — e.g., `imdb:tt0468569`
157
+ - TV Episode: `imdb:tt<digits>` — e.g., `imdb:tt1480055`
158
+
159
+ > [!NOTE]
160
+ > Valid IMDb IDs consist of the prefix `tt` followed by exactly seven digits.
161
+
162
+ A full list of supported namespaces and their values can be found in the [OMSS Specification](https://github.com/omss-spec/omss-spec) and the [docs](https://omss.mintlify.site) (coming soon).
163
+
164
+
165
+ ## Contributing
166
+
167
+ Whether reporting bugs, discussing improvements, or writing code — contributions are welcome. Please read the [CONTRIBUTING](./CONTRIBUTING.md) guidelines before opening a pull request.
168
+
169
+
170
+ ## Support
171
+
172
+ We are active on [GitHub Discussions](https://github.com/orgs/omss-spec/discussions).
173
+
174
+ ## Team
175
+
176
+ OMSS Core (and its plugins) is the result of a great community (alphabetically sorted).
177
+
178
+ **Lead Maintainers:**
179
+ - [**@An0n-00**](https://github.com/An0n-00), [**@An0n-01**](https://github.com/An0n-01), https://www.npmjs.com/~an0n-000
180
+
181
+ **Contributors:**
182
+ - [**@anochj**](https://github.com/anochj)
183
+ - [**@autovalue**](https://github.com/autovalue)
184
+ - [**@LorisRue**](https://github.com/lorisrue), https://www.npmjs.com/~lorisrue
185
+
186
+ _(Join us by contributing!)_
187
+
188
+ ## Acknowledgments
189
+
190
+ This project (rather it's ecosystem/API) is inspired by [Fastify](https://github.com/fastify/fastify).
191
+
192
+ ## License
193
+
194
+ Licensed under [MIT](./LICENSE).
195
+
196
+ ## Dependencies
197
+
198
+ This is a pure TypeScript project, meaning it has no production dependencies.