openvibers/openvibe.sdk Commits

0.128.0: Complete Community Feed status types and cursor guidance (#173)

OP OpenVibers committed 4 days ago · 9cb4842926 · 10 files, +48 −9

* Complete Community Feed status types and pagination guidance in 0.128.0

* 0.131.0

Changes

ddiff --git a/CHANGELOG.md b/CHANGELOG.md
iindex 2eca238..a4e617f 100644
---- a/CHANGELOG.md
++++ b/CHANGELOG.md
@@@ -1,5 +1,9 @@
# Changelog
++## 0.131.0 (2026-11-09)
++
++- openvibe-sdk/community: the Feed's types complete, with pagination guidance
++
## 0.130.0 (2026-11-09)
- openvibe-sdk/meme: ov.meme.templates(), .render() (PNG, GIF or MP4) and .get()
ddiff --git a/README.md b/README.md
iindex 5e0c58e..1536d2d 100644
---- a/README.md
++++ b/README.md
@@@ -10,7 +10,7 @@ npm install https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags
> Supported browser and server clients for the OpenVibe platform.
--**Status:** alpha, v0.130.0 (the five 1.0 core entries — `core`, `auth`, `events`, `db` and `media` — are frozen: their exported names change only with a major release; roadmap Wave 2; developer apps from Wave 20; Media objects v2 from Wave 4; the Tools platform API; Search, Chat, AI, Vision and consent clients; sign-in with recovery and a client health check). Every release is tagged (see [CHANGELOG.md](CHANGELOG.md)). Tested against local stub servers and the built-in mock platform only, never against the live platform. Services pin release tags; each repository's `STATUS.json` names the one it uses.
++**Status:** alpha, v0.131.0 (the five 1.0 core entries — `core`, `auth`, `events`, `db` and `media` — are frozen: their exported names change only with a major release; roadmap Wave 2; developer apps from Wave 20; Media objects v2 from Wave 4; the Tools platform API; Search, Chat, AI, Vision and consent clients; sign-in with recovery and a client health check). Every release is tagged (see [CHANGELOG.md](CHANGELOG.md)). Tested against local stub servers and the built-in mock platform only, never against the live platform. Services pin release tags; each repository's `STATUS.json` names the one it uses.
**Plan:** OpenVibe End-to-End Realignment & Implementation Plan, revision 3 (20 Sep 2026), §3.2; roadmap §30.
**License:** MIT ([LICENSE](LICENSE)). This package is a library that apps outside the network embed, so it uses MIT. The OpenVibe services themselves stay AGPL-3.0.
@@@ -19,7 +19,7 @@ npm install https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags
After v0.97.1 is tagged:
```bash
--npm install https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.130.0
++npm install https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.131.0
```
It has no runtime dependencies. It needs Node ≥ 20, or any browser with `fetch`, Web Crypto and `TextDecoder`. There is no build step. The package is CommonJS with ESM entry points (`import` works). Each subpath has its own `.d.ts`. For a page with no bundler, `browser/openvibe-sdk.mjs` is one self-contained ES module of the browser-safe subpaths (see [Browser without a bundler](#browser-without-a-bundler)). It does not depend on `openvibe-contracts` at runtime: it copies the contract types it uses (from the temporary Contracts sharing branch, a devDependency the tests check them against).
ddiff --git a/STATUS.json b/STATUS.json
iindex 7a78437..19d212b 100644
---- a/STATUS.json
++++ b/STATUS.json
@@@ -3,7 +3,7 @@
"stage": "alpha",
"code": true,
"wave": "W2",
-- "version": "0.130.0",
++ "version": "0.131.0",
"plan": "OpenVibe End-to-End Realignment & Implementation Plan, revision 3 (20 Sep 2026), \u00a73.2; roadmap \u00a730",
"deployed": false,
"deployment": "none: a package released as git tags; services and apps pin a tag",
ddiff --git a/browser/openvibe-sdk.mjs b/browser/openvibe-sdk.mjs
iindex f81a252..54deb16 100644
---- a/browser/openvibe-sdk.mjs
++++ b/browser/openvibe-sdk.mjs
@@@ -1,4 +1,4 @@
--// Generated by scripts/browser-bundle.js from browser.js (openvibe-sdk 0.130.0, MIT). Do not edit.
++// Generated by scripts/browser-bundle.js from browser.js (openvibe-sdk 0.131.0, MIT). Do not edit.
// One self-contained ES module: core at the top level plus the browser-safe subpaths as namespaces
// (auth, locker, registry, trust, modules, realtime, media, cam, mediaUpload, ui, community, homeFeed, bot, search, bench, meme, vision, themes, design, redact, chat, ai, credentials, jobs, tools, projects, geo). No server-only code: no service tokens, JWT verification, events, identity.
/* eslint-disable */
@@@ -56,7 +56,7 @@ const { paginate, offsetPager } = __load(7);
const semver = __load(6);
/** The package version (test/version.test.js keeps it equal to package.json). */
--const SDK_VERSION = '0.130.0';
++const SDK_VERSION = '0.131.0';
module.exports = {
createClient,
@@@ -3529,6 +3529,11 @@ function createCommunityClient(client, defaults = {}) {
},
};
++ /**
++ * One page of public activity. Keep the same filters when passing next_cursor back as cursor;
++ * a filtered page may be empty with a non-null cursor. kind=live means currently on air,
++ * kind=stream means a past broadcast; live_now carries the current status on either kind.
++ */
const feed = (query = {}, o = {}) => call({
path: '/api/v1/feed',
query: { kind: query.kind, site: query.site, q: query.q, cursor: query.cursor, limit: query.limit,
ddiff --git a/package-lock.json b/package-lock.json
iindex 8d849e3..348b1d7 100644
---- a/package-lock.json
++++ b/package-lock.json
@@@ -1,12 +1,12 @@
{
"name": "openvibe-sdk",
-- "version": "0.130.0",
++ "version": "0.131.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "openvibe-sdk",
-- "version": "0.130.0",
++ "version": "0.131.0",
"license": "MIT",
"bin": {
"openvibe-download": "bin/openvibe-download.js"
ddiff --git a/package.json b/package.json
iindex a6556ed..65682fd 100644
---- a/package.json
++++ b/package.json
@@@ -1,6 +1,6 @@
{
"name": "openvibe-sdk",
-- "version": "0.130.0",
++ "version": "0.131.0",
"description": "Supported browser and server clients for the OpenVibe platform: auth (incl. developer apps), registry discovery, identity, user modules, events, realtime, media, community, Bot robots, search, chat, AI runs, Tools (registry, run API and jobs), VIP memberships and developer projects, the async PostgreSQL data layer (db) and the Valkey cache, limits store, queue and pub/sub, with deadlines, safe retries, problem errors and trace propagation.",
"main": "index.js",
"types": "types/index.d.ts",
ddiff --git a/src/community.js b/src/community.js
iindex bb97fe8..901e2af 100644
---- a/src/community.js
++++ b/src/community.js
@@@ -103,6 +103,11 @@ function createCommunityClient(client, defaults = {}) {
},
};
++ /**
++ * One page of public activity. Keep the same filters when passing next_cursor back as cursor;
++ * a filtered page may be empty with a non-null cursor. kind=live means currently on air,
++ * kind=stream means a past broadcast; live_now carries the current status on either kind.
++ */
const feed = (query = {}, o = {}) => call({
path: '/api/v1/feed',
query: { kind: query.kind, site: query.site, q: query.q, cursor: query.cursor, limit: query.limit,
ddiff --git a/src/core/index.js b/src/core/index.js
iindex 7aeedf2..ce8d481 100644
---- a/src/core/index.js
++++ b/src/core/index.js
@@@ -8,7 +8,7 @@ const { paginate, offsetPager } = require('./paginate');
const semver = require('./semver');
/** The package version (test/version.test.js keeps it equal to package.json). */
--const SDK_VERSION = '0.130.0';
++const SDK_VERSION = '0.131.0';
module.exports = {
createClient,
ddiff --git a/test/community.test.js b/test/community.test.js
iindex de98869..adca86a 100644
---- a/test/community.test.js
++++ b/test/community.test.js
@@@ -118,6 +118,29 @@ run([
await srv.close();
}],
++ ['the Feed preserves stream status, counts and an empty page cursor through the community client', async () => {
++ const item = { id: 'p:42', kind: 'stream', url: 'https://openvibe.live/@alex', title: 'A broadcast', text: '',
++ at: '2026-11-09T10:00:00Z', site: 'live', site_name: 'Live', actor: null, media: null,
++ counts: { views: 7, likes: 3, comments: 2 }, live_now: false };
++ const srv = await stubServer((req, res) => {
++ const q = new URL(req.url, 'http://x').searchParams;
++ assert.equal(q.get('kind'), 'stream');
++ assert.equal(q.get('site'), 'live');
++ assert.equal(q.get('q'), 'broadcast');
++ assert.equal(q.get('following'), '1');
++ send(res, 200, q.get('cursor') ? { items: [item], next_cursor: null } : { items: [], next_cursor: 'opaque-cursor' });
++ });
++ try {
++ const sdk = require('..');
++ const community = sdk.community.createCommunityClient(sdk.createClient({ baseUrls: { community: srv.url } }));
++ const query = { kind: 'stream', site: 'live', q: 'broadcast', following: 1, limit: 1 };
++ const first = await community.feed(query);
++ assert.deepEqual(first, { items: [], next_cursor: 'opaque-cursor' });
++ const second = await community.feed({ ...query, cursor: first.next_cursor });
++ assert.deepEqual(second, { items: [item], next_cursor: null });
++ } finally { await srv.close(); }
++ }],
++
['the Feed and a status post: query, alt pictures in the body, acting subject, never retried', async () => {
const srv = await echo();
const community = createCommunityClient(createClient({ baseUrls: { community: srv.url } }), { actingSubject: USR });
ddiff --git a/types/community.d.ts b/types/community.d.ts
iindex e024e8e..fa7c286 100644
---- a/types/community.d.ts
++++ b/types/community.d.ts
@@@ -47,6 +47,8 @@ export interface FeedItem {
actor: { name: string | null; avatar: string | null } | null;
media: { thumb: string; ratio: number; length?: number } | null;
counts: { views?: number; likes?: number; comments?: number };
++ /** True while on air; false on an ended stream. Absent for other kinds. */
++ live_now?: boolean;
label?: 'Trending' | 'AI' | 'System';
}
export interface CreatePostInput {