openvibers/openvibe.sdk Commits
0.60.0: openvibe-sdk/host and openvibe-sdk/news (the public hosting catalog and published stories, sent without a token) (#71)
Changes
@@@ -3,6 +3,14 @@All notable changes to `openvibe-sdk`. The package follows semver; while it is `0.x`, a minorrelease may change an API and says so here.++## 0.60.0 (2026-10-20)++++- **`openvibe-sdk/host`** and **`openvibe-sdk/news`**: the public reads of the last two products without a module.++ Host: the hosting catalog (providers, plans, promos, community offers, domain endings with registrar prices, a++ name's availability, YABS benchmarks), with Host's own filters (any other key is refused). News: topics and the++ published and retracted stories with their sources, timeline and perspectives. Both are sent without a token;++ editing stays with each site's editors.++## 0.59.0 (2026-10-20)- **`openvibe-sdk/space`** (`createSpaceClient`): OpenVibe.Space for apps and CI, public in openvibe-contracts 0.209.0.@@@ -2,14 +2,14 @@> Supported browser and server clients for the OpenVibe platform.--**Status:** alpha, v0.59.0 (roadmap Wave 2; developer apps from Wave 20; Media objects v2 from Wave 4; the Tools platform API; Search, Chat and AI clients from WS-F task 4; per-actor limits from WS-R task 4). 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.60.0 (roadmap Wave 2; developer apps from Wave 20; Media objects v2 from Wave 4; the Tools platform API; Search, Chat and AI clients from WS-F task 4; per-actor limits from WS-R task 4). 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.**If a capability is not in the SDK, it is not public.** Apps call services through `openvibe-sdk` and never build internal routes themselves. A route with no SDK wrapper is internal, even when you can reach it, and it can change without notice. To make a capability public, first define it in OpenVibe.Contracts, then wrap it here.```bash--npm install https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.59.0++npm install https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.60.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 Contracts v0.86.0, a devDependency the tests check them against).@@@ -197,6 +197,8 @@ Until OpenVibe.Tools serves the gateway facade (Tools S6), point the jobs client| `openvibe-sdk/deals` | server | `createDealsClient(client)`: OpenVibe.Deals. Public: `offers.list({sort, page})/get/hotness`, `products.get`, `stores.get`. For the person: `offers.submit` (sensitive), `update`, `observe` (a new price observation), `vote(id, 1 \| -1)` (sensitive), `unvote`, `flag(id, {kind, reason})`, `watches.list/create/remove`. Public capabilities since openvibe-contracts 0.208.0. Audience `openvibe.deals` || `openvibe-sdk/trade` | server | `createTradeClient(client)`: OpenVibe.Trade. `instruments.resolve(q)/list/get/observations(symbol, {metric, before, limit})/documents`, `sources()`; the person's `watchlists.list/get/create/rename/add/removeItem/remove` and `alerts.list/deliveries/create/remove`. Public capabilities since openvibe-contracts 0.208.0. Audience `openvibe.trade` || `openvibe-sdk/space` | server | `createSpaceClient(client)`: OpenVibe.Space, static sites for apps and CI. `deploys.uploadArchive(site, tarGz, {activate, preview, root})`, `uploadFiles(site, [{path, data}], …)`, `uploadSourceBuild(site, archive, {ref, commit_sha})`, `list/get/log/activate/rollback(site, {deploy_id})/remove`; `projects.list/create/get/remove/quota/sites/members.set(p, principal, role)/remove`; `sites.create/get/remove`, `sites.config.get/set/reset` (`{ headers, redirects, spa }`), `sites.source.get/set/remove`; `domains.list/add/verify/remove`. An app reaches only the projects a person added it to (deployer, maintainer or owner). Public capabilities since openvibe-contracts 0.209.0. Audience `openvibe.space` |++| `openvibe-sdk/host` | server | `createHostClient(client)`: OpenVibe.Host's public hosting catalog, sent without a token. `providers.list/get(slug)`, `plans.list({kind, min_vcpu, min_ram_mb, min_disk_gb, max_price, currency, location, provider, sort, cursor})/get(id)`, `promos.list`, `offers.list({sort, currency, max_monthly, source, priced, cursor})`, `domains.list/tld('dev')/check('example.dev')`, `benchmarks.list/get`. Any other filter is refused (422). Editing the catalog is first-party |++| `openvibe-sdk/news` | server | `createNewsClient(client)`: OpenVibe.News' published stories, sent without a token. `topics()`, `stories.list({topic, limit, offset})` (published and retracted, newest first) and `stories.get(id)` (sources, timeline, perspectives). Writing and the editorial reads stay first-party || `openvibe-sdk/food` | server | `createFoodClient(client)`: OpenVibe.Food. Public: `places({kind, q, lat, lon, radius})` (food banks, pantries, free meals from OpenStreetMap), `foods.list/get` (the food list with store prices). The caller's own: `plans.create({people, days, budget, title})/list/get` (deterministic meal plans with a shopping list and costs), `pantry.get/set(items)` (with "what can I make" matches), `recipes.suggest({ask, people})/list` (AI recipe ideas, 10 a day). Plans and recipe ideas are never retried on their own. Audience `openvibe.food` || `openvibe-sdk/actor` | server | `createActorClient(client)`: OpenVibe.Actor. `agents.list()` and `route({task, mode})` (a dry run) are public. `tasks.create({task, mode, budget, agent, idempotency_key, webhooks})` (retried only with an idempotency_key; `webhook_secret` comes back once), `tasks.list/get/cancel`, `tasks.events(id, {lastEventId})` (SSE until the task ends). A person's own agents: `me.agents.list/create/get/update/remove/run/runs` and `me.agents.memory.list/add/update/remove/clear`. Audience `openvibe.actor` || `openvibe-sdk/run` | server | `createRunClient(client, {project?})`: OpenVibe.Run, jobs on worker nodes. `jobs.submit({class, artifact, args, limits, …})` (Idempotency-Key, so retried safely) → `{ created, job }`, `jobs.list({state, limit, cursor})`, `jobs.get/cancel`, `jobs.events(id, {lastEventId})` (SSE until `end`), `jobs.streamTicket(id)` (a one-use URL for a browser's EventSource); `forProject(prj_…)` sends X-OV-Project. Audience `openvibe.run` |@@@ -483,7 +485,7 @@ Install the drivers the service uses: `pg` and `iovalkey` (production), `@electr- **Media:** the v1 files API, the object API v2 (`createObjectsClient`) and the public URL helpers are wrapped. Retention holds on v2 objects are not (app keys only). VOD, clip, thumbnail and admin-storage routes are not wrapped because apps reach them only through Live and Media's own servers. Media's own paste API is not wrapped because pastes moved to Community (ADR-011). The mock platform (`openvibe-sdk/testing`) models Media's v1 files only, not v2 objects.- **Media from the browser:** Media refuses user JWTs on `/api/v1/:app/files`, so a browser uploads through its own app server. That server holds the app key and names the user with `actingUserId`.- **Network coins, notifications and legacy-map writes** are internal service-to-service routes with no public capability, so they are not wrapped. Staff-only paste routes are also internal: admin stats, bulk, censor and the AI pass.--- **Billing and Games** from the original charter come when those services publish their capabilities in Contracts (Live has its module since v0.52.0). Products whose capabilities are all first-party (News, Watch, Codes, Host and others) have no module yet: there is nothing an outside app may call. Blog opened its posts to apps (openvibe-contracts 0.206.0, `openvibe-sdk/blog`), then Reviews and the Wiki their reads (0.207.0), then Coupons, Deals and Trade what a person does for themselves (0.208.0), then Space its sites (0.209.0). News' published stories need no capability, but its editorial reads stay first-party. Chat is wrapped over REST as the token's person (`openvibe-sdk/chat`, v0.11.0), but it has no app principal (`chat.message.send` is `first-party`) and the mock platform has no Chat.++- **Billing and Games** from the original charter come when those services publish their capabilities in Contracts (Live has its module since v0.52.0). Codes' tasks (they run code on a person's own machine) stay first-party, and OpenVibe.Watch is not built yet; Host and News have modules for their public reads, while editing stays first-party. Blog opened its posts to apps (openvibe-contracts 0.206.0, `openvibe-sdk/blog`), then Reviews and the Wiki their reads (0.207.0), then Coupons, Deals and Trade what a person does for themselves (0.208.0), then Space its sites (0.209.0). News' published stories need no capability, but its editorial reads stay first-party. Chat is wrapped over REST as the token's person (`openvibe-sdk/chat`, v0.11.0), but it has no app principal (`chat.message.send` is `first-party`) and the mock platform has no Chat.- **Tools** are not wrapped one by one: `openvibe-sdk/tools` runs any tool with `api: true` by id, and its descriptor (`tools.get(id)`) gives the input schema, files and limits. `openvibe-sdk/jobs` still submits any job `type` directly. The YouTube downloader is page-only (`api: false`), so it is not in the SDK.- **Realtime over WebSocket and presence** don't exist in Events yet (ADR-005). SSE is the only transport.- **Bot:** the REST robots, public kits/profiles and pairing routes are wrapped (`openvibe-sdk/bot`). The operator WebSocket (`/control`, Realtime frames `bot.command@1`), device bootstrap (`POST /devices/bind`, a Network node token) and the internal Run→Bot job dispatch (`bot.job.dispatch`, service-to-service and never delegated to people or apps) are not.@@@ -3,7 +3,7 @@"stage": "alpha","code": true,"wave": "W2",-- "version": "0.59.0",++ "version": "0.60.0","plan": "OpenVibe End-to-End Realignment & Implementation Plan, revision 3 (20 Sep 2026), §3.2; roadmap §30","deployed": false,"deployment": "none: a package released as git tags; services and apps pin a tag",@@@ -1,4 +1,4 @@--// Generated by scripts/browser-bundle.js from browser.js (openvibe-sdk 0.59.0, MIT). Do not edit.++// Generated by scripts/browser-bundle.js from browser.js (openvibe-sdk 0.60.0, MIT). Do not edit.// One self-contained ES module: core at the top level plus the browser-safe subpaths as namespaces// (auth, registry, modules, realtime, media, community, bot, search, chat, ai, jobs, tools, projects, geo). No server-only code: no service tokens, JWT verification, events, identity./* eslint-disable */@@@ -42,7 +42,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.59.0';++const SDK_VERSION = '0.60.0';module.exports = {createClient,nnew file mode 100644@@@ -0,0 +1,7 @@++// Generated by scripts/esm.js from src/host.js. Do not edit.++import cjs from '../src/host.js';++++export const {++ createHostClient,++} = cjs;++export default cjs;@@@ -9,8 +9,8 @@ export const {community, bot, search, chat, ai, jobs,tools, projects, resources, vip, quest, live,inventory, tips, blog, reviews, wiki, coupons,-- deals, trade, space, food, actor, run,-- video, work, zone, play, download, openre,-- geo, usage, commerce, telemetry,++ deals, trade, space, host, news, food,++ actor, run, video, work, zone, play,++ download, openre, geo, usage, commerce, telemetry,} = cjs;export default cjs;nnew file mode 100644@@@ -0,0 +1,7 @@++// Generated by scripts/esm.js from src/news.js. Do not edit.++import cjs from '../src/news.js';++++export const {++ createNewsClient,++} = cjs;++export default cjs;@@@ -36,6 +36,8 @@ module.exports = {deals: require('./src/deals'),trade: require('./src/trade'),space: require('./src/space'),++ host: require('./src/host'),++ news: require('./src/news'),food: require('./src/food'),actor: require('./src/actor'),run: require('./src/run'),@@@ -1,12 +1,12 @@{"name": "openvibe-sdk",-- "version": "0.59.0",++ "version": "0.60.0","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "openvibe-sdk",-- "version": "0.59.0",++ "version": "0.60.0","license": "MIT","bin": {"openvibe-download": "bin/openvibe-download.js"@@@ -1,6 +1,6 @@{"name": "openvibe-sdk",-- "version": "0.59.0",++ "version": "0.60.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",@@@ -350,6 +350,18 @@"import": "./esm/space.mjs","default": "./src/space.js"},++ "./host": {++ "types": "./types/host.d.ts",++ "browser": null,++ "import": "./esm/host.mjs",++ "default": "./src/host.js"++ },++ "./news": {++ "types": "./types/news.d.ts",++ "browser": null,++ "import": "./esm/news.mjs",++ "default": "./src/news.js"++ },"./vip": {"types": "./types/vip.d.ts","browser": null,@@@ -65,6 +65,8 @@ const ENTRIES = {'deals.mjs': '../src/deals.js','trade.mjs': '../src/trade.js','space.mjs': '../src/space.js',++ 'host.mjs': '../src/host.js',++ 'news.mjs': '../src/news.js','food.mjs': '../src/food.js','actor.mjs': '../src/actor.js','run.mjs': '../src/run.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.59.0';++const SDK_VERSION = '0.60.0';module.exports = {createClient,nnew file mode 100644@@@ -0,0 +1,51 @@++'use strict';++/**++ * openvibe-sdk/host — OpenVibe.Host's public hosting catalog for apps: providers, plans with their prices, promos,++ * offers from the community boards, domain endings with registrar prices (and whether a name is free), and++ * benchmarks people ran with YABS. Routes at https://openvibe.host/api/v1/catalog; all public, sent without a token++ * (audience openvibe.host). Editing the catalog is Host's editors' (first-party).++ *++ * const host = createHostClient(createClient({}));++ * const { plans, next_cursor } = await host.plans.list({ kind: 'vps', max_price: 10, currency: 'USD', sort: 'price_per_gb_ram' });++ * const { provider } = await host.providers.get('linode');++ * const { check } = await host.domains.check('example.dev'); // rate-limited per address++ * const { tld } = await host.domains.tld('dev'); // every registrar's price for .dev++ *++ * Lists take Host's own filters and refuse any other key (422 host.catalog.invalid): plans kind, min_vcpu,++ * min_ram_mb, min_disk_gb, max_price, currency, location, provider, sort (price, price_per_vcpu, price_per_gb_ram,++ * price_per_gb_disk, checked_at) and cursor; offers sort, currency, max_monthly, source, priced and cursor. They++ * answer a page and its next_cursor. Prices are what each provider or registrar published, with when Host read them.++ */++const enc = encodeURIComponent;++++function createHostClient(client, { baseUrl } = {}) {++ if (!client || typeof client.json !== 'function') throw new TypeError('createHostClient: pass an openvibe-sdk/core client');++ const at = { service: 'host', baseUrl, audience: 'openvibe.host' };++ const call = (opts) => client.json({ ...at, auth: false, ...opts }); // public reads: never a token++ const list = (p) => ({ signal, ...query } = {}) => call({ path: `/api/v1/catalog/${p}`, query, signal });++ const one = (p, what) => (key, { signal } = {}) => {++ if (!key || typeof key !== 'string') throw new TypeError(`host: a ${what}`);++ return call({ path: `/api/v1/catalog/${p}/${enc(key)}`, signal });++ };++++ return {++ providers: { list: ({ signal } = {}) => call({ path: '/api/v1/catalog/providers', signal }), get: one('providers', "provider's slug") },++ plans: { list: list('plans'), get: one('plans', "plan's id") },++ promos: { list: ({ signal } = {}) => call({ path: '/api/v1/catalog/promos', signal }) },++ offers: { list: list('offers') },++ domains: {++ /** Domain endings and their prices. */++ list: list('domains'),++ /** One ending (without the dot) with every registrar's register, renew and transfer price. */++ tld: one('domains', 'domain ending'),++ /** Is a name registered? (RDAP; rate-limited per address.) */++ check: (name, { signal } = {}) => {++ if (!name || typeof name !== 'string' || !name.includes('.')) throw new TypeError('host.domains.check: a domain name');++ return call({ path: '/api/v1/catalog/domains/check', query: { name }, signal });++ },++ },++ benchmarks: { list: list('benchmarks'), get: one('benchmarks', "benchmark's id") },++ };++}++++module.exports = { createHostClient };nnew file mode 100644@@@ -0,0 +1,37 @@++'use strict';++/**++ * openvibe-sdk/news — OpenVibe.News' published stories for apps: the topics, the stories (published and retracted,++ * newest first) and one story with its numbered sources, timeline and perspectives. Routes at++ * https://openvibe.news/api/v1; public, sent without a token (audience openvibe.news).++ * Writing and the editorial reads (drafts, revisions, clusters, ingestion) are News' editors' (first-party).++ *++ * const news = createNewsClient(createClient({}));++ * const { topics } = await news.topics();++ * const { stories } = await news.stories.list({ topic: 'space', limit: 10 });++ * const { story } = await news.stories.get(stories[0].id); // every paragraph cites its sources++ *++ * A retracted story stays at its URL with its public retraction note. Every story rests on attached sources: News++ * never publishes a paragraph without one.++ */++const enc = encodeURIComponent;++++function createNewsClient(client, { baseUrl } = {}) {++ if (!client || typeof client.json !== 'function') throw new TypeError('createNewsClient: pass an openvibe-sdk/core client');++ const at = { service: 'news', baseUrl, audience: 'openvibe.news' };++ const call = (opts) => client.json({ ...at, auth: false, ...opts }); // public reads: never a token++++ return {++ topics: ({ signal } = {}) => call({ path: '/api/v1/topics', signal }),++ stories: {++ /** Published and retracted stories, newest first, by topic. */++ list: ({ topic, limit, offset, signal } = {}) => call({ path: '/api/v1/stories', query: { topic, limit, offset }, signal }),++ /** One published story by id or slug, with its source table, timeline and perspectives. */++ get: (id, { signal } = {}) => {++ if (!id || typeof id !== 'string') throw new TypeError("news.stories.get: a story's id");++ return call({ path: `/api/v1/stories/${enc(id)}`, signal });++ },++ },++ };++}++++module.exports = { createNewsClient };@@@ -76,7 +76,7 @@ run([for (const [re, why] of FORBIDDEN) if (re.test(src)) problems.push(`${path.relative(ROOT, file)}: ${why}`);}assert.deepEqual(problems, []);-- assert.deepEqual(blocked.sort(), ['./account-data', './actor', './blog', './cache', './commerce', './cost', './coupons', './db', './deals', './delivery', './download', './events', './food', './govern', './identity', './inventory', './limits', './live', './node', './notifications', './openre', './placement', './play', './pubsub', './quest', './queue', './resources', './reviews', './run', './runtime', './service', './space', './sso', './storage', './telemetry', './testing', './tips', './trade', './usage', './valkey', './video', './vip', './wiki', './work', './zone']);++ assert.deepEqual(blocked.sort(), ['./account-data', './actor', './blog', './cache', './commerce', './cost', './coupons', './db', './deals', './delivery', './download', './events', './food', './govern', './host', './identity', './inventory', './limits', './live', './news', './node', './notifications', './openre', './placement', './play', './pubsub', './quest', './queue', './resources', './reviews', './run', './runtime', './service', './space', './sso', './storage', './telemetry', './testing', './tips', './trade', './usage', './valkey', './video', './vip', './wiki', './work', './zone']);const rel = [...scanned].map((f) => path.relative(ROOT, f));for (const must of ['browser.js', 'src/core/client.js', 'src/auth/browser.js', 'src/realtime.js', 'src/media.js', 'src/community.js', 'src/bot.js', 'src/modules.js', 'src/registry.js', 'src/jobs.js', 'src/tools.js', 'src/core/form.js', 'src/projects.js', 'browser/openvibe-sdk.mjs']) {assert.ok(rel.includes(must), `${must} is scanned`);@@@ -66,7 +66,7 @@ run([})().catch((err) => { console.error(err); process.exit(1); });`;const res = execFileSync(process.execPath, ['-e', script], { cwd: app, encoding: 'utf8' });assert.match(res, new RegExp(`consumer ok: ${subpaths.length} subpaths \\+ the browser bundle`));-- assert.equal(subpaths.length, 63);++ assert.equal(subpaths.length, 65);assert.ok(!fs.existsSync(path.join(app, 'node_modules/openvibe-contracts')), 'the optional peer is not installed');} finally {fs.rmSync(tmp, { recursive: true, force: true });@@@ -1,5 +1,5 @@'use strict';--// openvibe-sdk/food, /actor, /run, /video, /work, /zone, /blog, /reviews, /wiki, /coupons, /deals, /trade and /space through a real core client against one local stub: every++// openvibe-sdk/food, /actor, /run, /video, /work, /zone, /blog, /reviews, /wiki, /coupons, /deals, /trade, /space, /host and /news through a real core client against one local stub: every// route and method, the token audience, which writes are retried (keyed or idempotent) and which never are, the SSE// followers (Actor's task events, Run's job stream), and the id checks done before any call.const assert = require('assert');@@@ -18,6 +18,8 @@ const { createCouponsClient } = require('../src/coupons');const { createDealsClient } = require('../src/deals');const { createTradeClient } = require('../src/trade');const { createSpaceClient } = require('../src/space');++const { createHostClient } = require('../src/host');++const { createNewsClient } = require('../src/news');const ULID = '01JAB2C3D4E5F6G7H8J9K0MNPQ';const ids = { plan: `pln_${ULID}`, task: `tsk_${ULID}`, agent: `agt_${ULID}`, mem: `mem_${ULID}`, job: `job_${ULID}`, playlist: `vpl_${ULID}`, app: `wap_${ULID}`, project: `prj_${ULID}`, zone: `zon_${ULID}`, post: `pst_${ULID}`, page: `pg_${ULID}`, coupon: `cpn_${ULID}` };@@@ -52,7 +54,7 @@ const ids = { plan: `pln_${ULID}`, task: `tsk_${ULID}`, agent: `agt_${ULID}`, meconst base = `http://127.0.0.1:${server.address().port}`;const audiences = [];const client = createClient({-- baseUrls: { food: `${base}/food`, actor: `${base}/actor`, run: `${base}/run`, 'media-hub': `${base}/video`, work: `${base}/work`, zone: `${base}/zone`, blog: `${base}/blog`, reviews: `${base}/reviews`, wiki: `${base}/wiki`, coupons: `${base}/coupons`, deals: `${base}/deals`, trade: `${base}/trade`, space: `${base}/space` },++ baseUrls: { food: `${base}/food`, actor: `${base}/actor`, run: `${base}/run`, 'media-hub': `${base}/video`, work: `${base}/work`, zone: `${base}/zone`, blog: `${base}/blog`, reviews: `${base}/reviews`, wiki: `${base}/wiki`, coupons: `${base}/coupons`, deals: `${base}/deals`, trade: `${base}/trade`, space: `${base}/space`, host: `${base}/host`, news: `${base}/news` },getToken: ({ audience }) => { audiences.push(audience); return `tok-${audience}`; },retries: 2, retryDelayMs: 1, maxRetryDelayMs: 2,});@@@ -420,13 +422,43 @@ const ids = { plan: `pln_${ULID}`, task: `tsk_${ULID}`, agent: `agt_${ULID}`, meassert.throws(() => space.deploys.uploadFiles('site_1', []), /at least one/);assert.throws(() => space.deploys.uploadArchive('site_1'), /archive/);++ // ── Host and News: public reads, never a token ──────────++ const host = createHostClient(client);++ const news = createNewsClient(client);++ mark = since();++ await host.providers.list();++ await host.providers.get('linode');++ await host.plans.list({ kind: 'vps', max_price: 10, currency: 'USD', sort: 'price_per_gb_ram' });++ await host.plans.get('pln_9');++ await host.promos.list();++ await host.offers.list({ sort: 'new', priced: 1, cursor: 'c2' });++ await host.domains.list({ cursor: 'c1' });++ await host.domains.tld('dev');++ await host.domains.check('example.dev');++ await host.benchmarks.list();++ await host.benchmarks.get('bm_1');++ await news.topics();++ await news.stories.list({ topic: 'space', limit: 10 });++ await news.stories.get('moon-landing-2026');++ const pub = mark();++ assert.deepStrictEqual(pub.map((x) => `${x.method} ${x.url}`), [++ 'GET /api/v1/catalog/providers', 'GET /api/v1/catalog/providers/linode',++ 'GET /api/v1/catalog/plans?kind=vps&max_price=10¤cy=USD&sort=price_per_gb_ram', 'GET /api/v1/catalog/plans/pln_9',++ 'GET /api/v1/catalog/promos', 'GET /api/v1/catalog/offers?sort=new&priced=1&cursor=c2', 'GET /api/v1/catalog/domains?cursor=c1',++ 'GET /api/v1/catalog/domains/dev', 'GET /api/v1/catalog/domains/check?name=example.dev', 'GET /api/v1/catalog/benchmarks',++ 'GET /api/v1/catalog/benchmarks/bm_1', 'GET /api/v1/topics', 'GET /api/v1/stories?topic=space&limit=10', 'GET /api/v1/stories/moon-landing-2026',++ ]);++ assert.ok(pub.every((x) => x.auth === null), 'public reads go without a token, even from a client that has one');++ assert.throws(() => host.domains.check('example'), /domain name/);++ assert.throws(() => news.stories.get(''), /story/);++// Each product's token is for its own audience (Video's is the media hub's, openvibe.download).assert.deepStrictEqual([...new Set(audiences)].sort(), ['openvibe.actor', 'openvibe.blog', 'openvibe.coupons', 'openvibe.deals', 'openvibe.download', 'openvibe.food', 'openvibe.reviews', 'openvibe.run', 'openvibe.space', 'openvibe.trade', 'openvibe.wiki', 'openvibe.work', 'openvibe.zone']);-- assert.ok(seen.every((x) => x.auth === `Bearer tok-${{ food: 'openvibe.food', actor: 'openvibe.actor', run: 'openvibe.run', video: 'openvibe.download', work: 'openvibe.work', zone: 'openvibe.zone', blog: 'openvibe.blog', reviews: 'openvibe.reviews', wiki: 'openvibe.wiki', coupons: 'openvibe.coupons', deals: 'openvibe.deals', trade: 'openvibe.trade', space: 'openvibe.space' }[x.svc]}`));++ assert.ok(seen.filter((x) => x.svc !== 'host' && x.svc !== 'news').every((x) => x.auth === `Bearer tok-${{ food: 'openvibe.food', actor: 'openvibe.actor', run: 'openvibe.run', video: 'openvibe.download', work: 'openvibe.work', zone: 'openvibe.zone', blog: 'openvibe.blog', reviews: 'openvibe.reviews', wiki: 'openvibe.wiki', coupons: 'openvibe.coupons', deals: 'openvibe.deals', trade: 'openvibe.trade', space: 'openvibe.space' }[x.svc]}`));// Each client needs a core client.-- for (const make of [createFoodClient, createActorClient, createRunClient, createVideoClient, createWorkClient, createZoneClient, createBlogClient, createReviewsClient, createWikiClient, createCouponsClient, createDealsClient, createTradeClient, createSpaceClient]) assert.throws(() => make({}), /core client/);-- console.log('product modules (food, actor, run, video, work, zone, blog, reviews, wiki, coupons, deals, trade, space): all checks passed');++ for (const make of [createFoodClient, createActorClient, createRunClient, createVideoClient, createWorkClient, createZoneClient, createBlogClient, createReviewsClient, createWikiClient, createCouponsClient, createDealsClient, createTradeClient, createSpaceClient, createHostClient, createNewsClient]) assert.throws(() => make({}), /core client/);++ console.log('product modules (food, actor, run, video, work, zone, blog, reviews, wiki, coupons, deals, trade, space, host, news): all checks passed');} finally {server.close();}nnew file mode 100644@@@ -0,0 +1,18 @@++/** openvibe-sdk/host: OpenVibe.Host's public hosting catalog (sent without a token). */++type Opts = { signal?: AbortSignal };++type HostJson = Record<string, any>;++export interface PlanFilters { kind?: string; min_vcpu?: number; min_ram_mb?: number; min_disk_gb?: number; max_price?: number; currency?: string; location?: string; provider?: string; sort?: 'price' | 'price_per_vcpu' | 'price_per_gb_ram' | 'price_per_gb_disk' | 'checked_at'; cursor?: string }++export interface OfferFilters { sort?: string; currency?: string; max_monthly?: number; source?: string; priced?: boolean | number; cursor?: string }++export interface HostClient {++ providers: { list(opts?: Opts): Promise<{ providers: HostJson[] }>; get(slug: string, opts?: Opts): Promise<{ provider: HostJson }> };++ plans: { list(filters?: PlanFilters & Opts): Promise<{ plans: HostJson[]; next_cursor: string | null }>; get(id: string, opts?: Opts): Promise<{ plan: HostJson }> };++ promos: { list(opts?: Opts): Promise<{ promos: HostJson[] }> };++ offers: { list(filters?: OfferFilters & Opts): Promise<{ offers: HostJson[]; next_cursor: string | null }> };++ domains: {++ list(filters?: Record<string, unknown> & Opts): Promise<HostJson>;++ tld(tld: string, opts?: Opts): Promise<{ tld: HostJson }>;++ check(name: string, opts?: Opts): Promise<{ check: HostJson }>;++ };++ benchmarks: { list(filters?: Record<string, unknown> & Opts): Promise<HostJson>; get(id: string, opts?: Opts): Promise<{ benchmark: HostJson }> };++}++export function createHostClient(client: { json(opts: Record<string, unknown>): Promise<any> }, options?: { baseUrl?: string }): HostClient;@@@ -27,6 +27,8 @@ export * as coupons from './coupons';export * as deals from './deals';export * as trade from './trade';export * as space from './space';++export * as host from './host';++export * as news from './news';export * as food from './food';export * as actor from './actor';export * as run from './run';nnew file mode 100644@@@ -0,0 +1,11 @@++/** openvibe-sdk/news: OpenVibe.News' published stories (sent without a token). */++type Opts = { signal?: AbortSignal };++type NewsJson = Record<string, any>;++export interface NewsClient {++ topics(opts?: Opts): Promise<{ topics: NewsJson[] }>;++ stories: {++ list(opts?: Opts & { topic?: string; limit?: number; offset?: number }): Promise<{ total: number; stories: NewsJson[] }>;++ get(id: string, opts?: Opts): Promise<{ story: NewsJson }>;++ };++}++export function createNewsClient(client: { json(opts: Record<string, unknown>): Promise<any> }, options?: { baseUrl?: string }): NewsClient;
@@ -3,6 +3,14 @@
@@ -3,6 +3,14 @@
All notable changes to `openvibe-sdk`. The package follows semver; while it is `0.x`, a minor
All notable changes to `openvibe-sdk`. The package follows semver; while it is `0.x`, a minor
release may change an API and says so here.
release may change an API and says so here.
+## 0.60.0 (2026-10-20)
+
+- **`openvibe-sdk/host`** and **`openvibe-sdk/news`**: the public reads of the last two products without a module.
+ Host: the hosting catalog (providers, plans, promos, community offers, domain endings with registrar prices, a
+ name's availability, YABS benchmarks), with Host's own filters (any other key is refused). News: topics and the
+ published and retracted stories with their sources, timeline and perspectives. Both are sent without a token;
+ editing stays with each site's editors.
+
## 0.59.0 (2026-10-20)
## 0.59.0 (2026-10-20)
- **`openvibe-sdk/space`** (`createSpaceClient`): OpenVibe.Space for apps and CI, public in openvibe-contracts 0.209.0.
- **`openvibe-sdk/space`** (`createSpaceClient`): OpenVibe.Space for apps and CI, public in openvibe-contracts 0.209.0.
@@ -2,14 +2,14 @@
@@ -2,14 +2,14 @@
> Supported browser and server clients for the OpenVibe platform.
> Supported browser and server clients for the OpenVibe platform.
-**Status:** alpha, v0.59.0 (roadmap Wave 2; developer apps from Wave 20; Media objects v2 from Wave 4; the Tools platform API; Search, Chat and AI clients from WS-F task 4; per-actor limits from WS-R task 4). 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.60.0 (roadmap Wave 2; developer apps from Wave 20; Media objects v2 from Wave 4; the Tools platform API; Search, Chat and AI clients from WS-F task 4; per-actor limits from WS-R task 4). 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.
**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.
**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.
**If a capability is not in the SDK, it is not public.** Apps call services through `openvibe-sdk` and never build internal routes themselves. A route with no SDK wrapper is internal, even when you can reach it, and it can change without notice. To make a capability public, first define it in OpenVibe.Contracts, then wrap it here.
**If a capability is not in the SDK, it is not public.** Apps call services through `openvibe-sdk` and never build internal routes themselves. A route with no SDK wrapper is internal, even when you can reach it, and it can change without notice. To make a capability public, first define it in OpenVibe.Contracts, then wrap it here.
```bash
```bash
-npm install https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.59.0
+npm install https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.60.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 Contracts v0.86.0, a devDependency the tests check them against).
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 Contracts v0.86.0, a devDependency the tests check them against).
@@ -197,6 +197,8 @@ Until OpenVibe.Tools serves the gateway facade (Tools S6), point the jobs client
@@ -197,6 +197,8 @@ Until OpenVibe.Tools serves the gateway facade (Tools S6), point the jobs client
| `openvibe-sdk/deals` | server | `createDealsClient(client)`: OpenVibe.Deals. Public: `offers.list({sort, page})/get/hotness`, `products.get`, `stores.get`. For the person: `offers.submit` (sensitive), `update`, `observe` (a new price observation), `vote(id, 1 \| -1)` (sensitive), `unvote`, `flag(id, {kind, reason})`, `watches.list/create/remove`. Public capabilities since openvibe-contracts 0.208.0. Audience `openvibe.deals` |
| `openvibe-sdk/deals` | server | `createDealsClient(client)`: OpenVibe.Deals. Public: `offers.list({sort, page})/get/hotness`, `products.get`, `stores.get`. For the person: `offers.submit` (sensitive), `update`, `observe` (a new price observation), `vote(id, 1 \| -1)` (sensitive), `unvote`, `flag(id, {kind, reason})`, `watches.list/create/remove`. Public capabilities since openvibe-contracts 0.208.0. Audience `openvibe.deals` |
| `openvibe-sdk/trade` | server | `createTradeClient(client)`: OpenVibe.Trade. `instruments.resolve(q)/list/get/observations(symbol, {metric, before, limit})/documents`, `sources()`; the person's `watchlists.list/get/create/rename/add/removeItem/remove` and `alerts.list/deliveries/create/remove`. Public capabilities since openvibe-contracts 0.208.0. Audience `openvibe.trade` |
| `openvibe-sdk/trade` | server | `createTradeClient(client)`: OpenVibe.Trade. `instruments.resolve(q)/list/get/observations(symbol, {metric, before, limit})/documents`, `sources()`; the person's `watchlists.list/get/create/rename/add/removeItem/remove` and `alerts.list/deliveries/create/remove`. Public capabilities since openvibe-contracts 0.208.0. Audience `openvibe.trade` |
| `openvibe-sdk/space` | server | `createSpaceClient(client)`: OpenVibe.Space, static sites for apps and CI. `deploys.uploadArchive(site, tarGz, {activate, preview, root})`, `uploadFiles(site, [{path, data}], …)`, `uploadSourceBuild(site, archive, {ref, commit_sha})`, `list/get/log/activate/rollback(site, {deploy_id})/remove`; `projects.list/create/get/remove/quota/sites/members.set(p, principal, role)/remove`; `sites.create/get/remove`, `sites.config.get/set/reset` (`{ headers, redirects, spa }`), `sites.source.get/set/remove`; `domains.list/add/verify/remove`. An app reaches only the projects a person added it to (deployer, maintainer or owner). Public capabilities since openvibe-contracts 0.209.0. Audience `openvibe.space` |
| `openvibe-sdk/space` | server | `createSpaceClient(client)`: OpenVibe.Space, static sites for apps and CI. `deploys.uploadArchive(site, tarGz, {activate, preview, root})`, `uploadFiles(site, [{path, data}], …)`, `uploadSourceBuild(site, archive, {ref, commit_sha})`, `list/get/log/activate/rollback(site, {deploy_id})/remove`; `projects.list/create/get/remove/quota/sites/members.set(p, principal, role)/remove`; `sites.create/get/remove`, `sites.config.get/set/reset` (`{ headers, redirects, spa }`), `sites.source.get/set/remove`; `domains.list/add/verify/remove`. An app reaches only the projects a person added it to (deployer, maintainer or owner). Public capabilities since openvibe-contracts 0.209.0. Audience `openvibe.space` |
+| `openvibe-sdk/host` | server | `createHostClient(client)`: OpenVibe.Host's public hosting catalog, sent without a token. `providers.list/get(slug)`, `plans.list({kind, min_vcpu, min_ram_mb, min_disk_gb, max_price, currency, location, provider, sort, cursor})/get(id)`, `promos.list`, `offers.list({sort, currency, max_monthly, source, priced, cursor})`, `domains.list/tld('dev')/check('example.dev')`, `benchmarks.list/get`. Any other filter is refused (422). Editing the catalog is first-party |
+| `openvibe-sdk/news` | server | `createNewsClient(client)`: OpenVibe.News' published stories, sent without a token. `topics()`, `stories.list({topic, limit, offset})` (published and retracted, newest first) and `stories.get(id)` (sources, timeline, perspectives). Writing and the editorial reads stay first-party |
| `openvibe-sdk/food` | server | `createFoodClient(client)`: OpenVibe.Food. Public: `places({kind, q, lat, lon, radius})` (food banks, pantries, free meals from OpenStreetMap), `foods.list/get` (the food list with store prices). The caller's own: `plans.create({people, days, budget, title})/list/get` (deterministic meal plans with a shopping list and costs), `pantry.get/set(items)` (with "what can I make" matches), `recipes.suggest({ask, people})/list` (AI recipe ideas, 10 a day). Plans and recipe ideas are never retried on their own. Audience `openvibe.food` |
| `openvibe-sdk/food` | server | `createFoodClient(client)`: OpenVibe.Food. Public: `places({kind, q, lat, lon, radius})` (food banks, pantries, free meals from OpenStreetMap), `foods.list/get` (the food list with store prices). The caller's own: `plans.create({people, days, budget, title})/list/get` (deterministic meal plans with a shopping list and costs), `pantry.get/set(items)` (with "what can I make" matches), `recipes.suggest({ask, people})/list` (AI recipe ideas, 10 a day). Plans and recipe ideas are never retried on their own. Audience `openvibe.food` |
| `openvibe-sdk/actor` | server | `createActorClient(client)`: OpenVibe.Actor. `agents.list()` and `route({task, mode})` (a dry run) are public. `tasks.create({task, mode, budget, agent, idempotency_key, webhooks})` (retried only with an idempotency_key; `webhook_secret` comes back once), `tasks.list/get/cancel`, `tasks.events(id, {lastEventId})` (SSE until the task ends). A person's own agents: `me.agents.list/create/get/update/remove/run/runs` and `me.agents.memory.list/add/update/remove/clear`. Audience `openvibe.actor` |
| `openvibe-sdk/actor` | server | `createActorClient(client)`: OpenVibe.Actor. `agents.list()` and `route({task, mode})` (a dry run) are public. `tasks.create({task, mode, budget, agent, idempotency_key, webhooks})` (retried only with an idempotency_key; `webhook_secret` comes back once), `tasks.list/get/cancel`, `tasks.events(id, {lastEventId})` (SSE until the task ends). A person's own agents: `me.agents.list/create/get/update/remove/run/runs` and `me.agents.memory.list/add/update/remove/clear`. Audience `openvibe.actor` |
| `openvibe-sdk/run` | server | `createRunClient(client, {project?})`: OpenVibe.Run, jobs on worker nodes. `jobs.submit({class, artifact, args, limits, …})` (Idempotency-Key, so retried safely) → `{ created, job }`, `jobs.list({state, limit, cursor})`, `jobs.get/cancel`, `jobs.events(id, {lastEventId})` (SSE until `end`), `jobs.streamTicket(id)` (a one-use URL for a browser's EventSource); `forProject(prj_…)` sends X-OV-Project. Audience `openvibe.run` |
| `openvibe-sdk/run` | server | `createRunClient(client, {project?})`: OpenVibe.Run, jobs on worker nodes. `jobs.submit({class, artifact, args, limits, …})` (Idempotency-Key, so retried safely) → `{ created, job }`, `jobs.list({state, limit, cursor})`, `jobs.get/cancel`, `jobs.events(id, {lastEventId})` (SSE until `end`), `jobs.streamTicket(id)` (a one-use URL for a browser's EventSource); `forProject(prj_…)` sends X-OV-Project. Audience `openvibe.run` |
@@ -483,7 +485,7 @@ Install the drivers the service uses: `pg` and `iovalkey` (production), `@electr
@@ -483,7 +485,7 @@ Install the drivers the service uses: `pg` and `iovalkey` (production), `@electr
- **Media:** the v1 files API, the object API v2 (`createObjectsClient`) and the public URL helpers are wrapped. Retention holds on v2 objects are not (app keys only). VOD, clip, thumbnail and admin-storage routes are not wrapped because apps reach them only through Live and Media's own servers. Media's own paste API is not wrapped because pastes moved to Community (ADR-011). The mock platform (`openvibe-sdk/testing`) models Media's v1 files only, not v2 objects.
- **Media:** the v1 files API, the object API v2 (`createObjectsClient`) and the public URL helpers are wrapped. Retention holds on v2 objects are not (app keys only). VOD, clip, thumbnail and admin-storage routes are not wrapped because apps reach them only through Live and Media's own servers. Media's own paste API is not wrapped because pastes moved to Community (ADR-011). The mock platform (`openvibe-sdk/testing`) models Media's v1 files only, not v2 objects.
- **Media from the browser:** Media refuses user JWTs on `/api/v1/:app/files`, so a browser uploads through its own app server. That server holds the app key and names the user with `actingUserId`.
- **Media from the browser:** Media refuses user JWTs on `/api/v1/:app/files`, so a browser uploads through its own app server. That server holds the app key and names the user with `actingUserId`.
- **Network coins, notifications and legacy-map writes** are internal service-to-service routes with no public capability, so they are not wrapped. Staff-only paste routes are also internal: admin stats, bulk, censor and the AI pass.
- **Network coins, notifications and legacy-map writes** are internal service-to-service routes with no public capability, so they are not wrapped. Staff-only paste routes are also internal: admin stats, bulk, censor and the AI pass.
-- **Billing and Games** from the original charter come when those services publish their capabilities in Contracts (Live has its module since v0.52.0). Products whose capabilities are all first-party (News, Watch, Codes, Host and others) have no module yet: there is nothing an outside app may call. Blog opened its posts to apps (openvibe-contracts 0.206.0, `openvibe-sdk/blog`), then Reviews and the Wiki their reads (0.207.0), then Coupons, Deals and Trade what a person does for themselves (0.208.0), then Space its sites (0.209.0). News' published stories need no capability, but its editorial reads stay first-party. Chat is wrapped over REST as the token's person (`openvibe-sdk/chat`, v0.11.0), but it has no app principal (`chat.message.send` is `first-party`) and the mock platform has no Chat.
+- **Billing and Games** from the original charter come when those services publish their capabilities in Contracts (Live has its module since v0.52.0). Codes' tasks (they run code on a person's own machine) stay first-party, and OpenVibe.Watch is not built yet; Host and News have modules for their public reads, while editing stays first-party. Blog opened its posts to apps (openvibe-contracts 0.206.0, `openvibe-sdk/blog`), then Reviews and the Wiki their reads (0.207.0), then Coupons, Deals and Trade what a person does for themselves (0.208.0), then Space its sites (0.209.0). News' published stories need no capability, but its editorial reads stay first-party. Chat is wrapped over REST as the token's person (`openvibe-sdk/chat`, v0.11.0), but it has no app principal (`chat.message.send` is `first-party`) and the mock platform has no Chat.
- **Tools** are not wrapped one by one: `openvibe-sdk/tools` runs any tool with `api: true` by id, and its descriptor (`tools.get(id)`) gives the input schema, files and limits. `openvibe-sdk/jobs` still submits any job `type` directly. The YouTube downloader is page-only (`api: false`), so it is not in the SDK.
- **Tools** are not wrapped one by one: `openvibe-sdk/tools` runs any tool with `api: true` by id, and its descriptor (`tools.get(id)`) gives the input schema, files and limits. `openvibe-sdk/jobs` still submits any job `type` directly. The YouTube downloader is page-only (`api: false`), so it is not in the SDK.
- **Realtime over WebSocket and presence** don't exist in Events yet (ADR-005). SSE is the only transport.
- **Realtime over WebSocket and presence** don't exist in Events yet (ADR-005). SSE is the only transport.
- **Bot:** the REST robots, public kits/profiles and pairing routes are wrapped (`openvibe-sdk/bot`). The operator WebSocket (`/control`, Realtime frames `bot.command@1`), device bootstrap (`POST /devices/bind`, a Network node token) and the internal Run→Bot job dispatch (`bot.job.dispatch`, service-to-service and never delegated to people or apps) are not.
- **Bot:** the REST robots, public kits/profiles and pairing routes are wrapped (`openvibe-sdk/bot`). The operator WebSocket (`/control`, Realtime frames `bot.command@1`), device bootstrap (`POST /devices/bind`, a Network node token) and the internal Run→Bot job dispatch (`bot.job.dispatch`, service-to-service and never delegated to people or apps) are not.
@@ -3,7 +3,7 @@
@@ -3,7 +3,7 @@
"stage": "alpha",
"stage": "alpha",
"code": true,
"code": true,
"wave": "W2",
"wave": "W2",
- "version": "0.59.0",
+ "version": "0.60.0",
"plan": "OpenVibe End-to-End Realignment & Implementation Plan, revision 3 (20 Sep 2026), §3.2; roadmap §30",
"plan": "OpenVibe End-to-End Realignment & Implementation Plan, revision 3 (20 Sep 2026), §3.2; roadmap §30",
"deployed": false,
"deployed": false,
"deployment": "none: a package released as git tags; services and apps pin a tag",
"deployment": "none: a package released as git tags; services and apps pin a tag",
@@ -1,4 +1,4 @@
@@ -1,4 +1,4 @@
-// Generated by scripts/browser-bundle.js from browser.js (openvibe-sdk 0.59.0, MIT). Do not edit.
+// Generated by scripts/browser-bundle.js from browser.js (openvibe-sdk 0.60.0, MIT). Do not edit.
// One self-contained ES module: core at the top level plus the browser-safe subpaths as namespaces
// One self-contained ES module: core at the top level plus the browser-safe subpaths as namespaces
// (auth, registry, modules, realtime, media, community, bot, search, chat, ai, jobs, tools, projects, geo). No server-only code: no service tokens, JWT verification, events, identity.
// (auth, registry, modules, realtime, media, community, bot, search, chat, ai, jobs, tools, projects, geo). No server-only code: no service tokens, JWT verification, events, identity.
/* eslint-disable */
/* eslint-disable */
@@ -42,7 +42,7 @@ const { paginate, offsetPager } = __load(7);
@@ -42,7 +42,7 @@ const { paginate, offsetPager } = __load(7);
const semver = __load(6);
const semver = __load(6);
/** The package version (test/version.test.js keeps it equal to package.json). */
/** The package version (test/version.test.js keeps it equal to package.json). */
-const SDK_VERSION = '0.59.0';
+const SDK_VERSION = '0.60.0';
module.exports = {
module.exports = {
createClient,
createClient,
new file mode 100644
new file mode 100644
@@ -0,0 +1,7 @@
@@ -0,0 +1,7 @@
+// Generated by scripts/esm.js from src/host.js. Do not edit.
+import cjs from '../src/host.js';
+
+export const {
+ createHostClient,
+} = cjs;
+export default cjs;
@@ -9,8 +9,8 @@ export const {
@@ -9,8 +9,8 @@ export const {
community, bot, search, chat, ai, jobs,
community, bot, search, chat, ai, jobs,
tools, projects, resources, vip, quest, live,
tools, projects, resources, vip, quest, live,
inventory, tips, blog, reviews, wiki, coupons,
inventory, tips, blog, reviews, wiki, coupons,
- deals, trade, space, food, actor, run,
- video, work, zone, play, download, openre,
- geo, usage, commerce, telemetry,
+ deals, trade, space, host, news, food,
+ actor, run, video, work, zone, play,
+ download, openre, geo, usage, commerce, telemetry,
} = cjs;
} = cjs;
export default cjs;
export default cjs;
new file mode 100644
new file mode 100644
@@ -0,0 +1,7 @@
@@ -0,0 +1,7 @@
+// Generated by scripts/esm.js from src/news.js. Do not edit.
+import cjs from '../src/news.js';
+
+export const {
+ createNewsClient,
+} = cjs;
+export default cjs;
@@ -36,6 +36,8 @@ module.exports = {
@@ -36,6 +36,8 @@ module.exports = {
deals: require('./src/deals'),
deals: require('./src/deals'),
trade: require('./src/trade'),
trade: require('./src/trade'),
space: require('./src/space'),
space: require('./src/space'),
+ host: require('./src/host'),
+ news: require('./src/news'),
food: require('./src/food'),
food: require('./src/food'),
actor: require('./src/actor'),
actor: require('./src/actor'),
run: require('./src/run'),
run: require('./src/run'),
@@ -1,12 +1,12 @@
@@ -1,12 +1,12 @@
{
{
"name": "openvibe-sdk",
"name": "openvibe-sdk",
- "version": "0.59.0",
+ "version": "0.60.0",
"lockfileVersion": 3,
"lockfileVersion": 3,
"requires": true,
"requires": true,
"packages": {
"packages": {
"": {
"": {
"name": "openvibe-sdk",
"name": "openvibe-sdk",
- "version": "0.59.0",
+ "version": "0.60.0",
"license": "MIT",
"license": "MIT",
"bin": {
"bin": {
"openvibe-download": "bin/openvibe-download.js"
"openvibe-download": "bin/openvibe-download.js"
@@ -1,6 +1,6 @@
@@ -1,6 +1,6 @@
{
{
"name": "openvibe-sdk",
"name": "openvibe-sdk",
- "version": "0.59.0",
+ "version": "0.60.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.",
"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",
"main": "index.js",
"types": "types/index.d.ts",
"types": "types/index.d.ts",
@@ -350,6 +350,18 @@
@@ -350,6 +350,18 @@
"import": "./esm/space.mjs",
"import": "./esm/space.mjs",
"default": "./src/space.js"
"default": "./src/space.js"
},
},
+ "./host": {
+ "types": "./types/host.d.ts",
+ "browser": null,
+ "import": "./esm/host.mjs",
+ "default": "./src/host.js"
+ },
+ "./news": {
+ "types": "./types/news.d.ts",
+ "browser": null,
+ "import": "./esm/news.mjs",
+ "default": "./src/news.js"
+ },
"./vip": {
"./vip": {
"types": "./types/vip.d.ts",
"types": "./types/vip.d.ts",
"browser": null,
"browser": null,
@@ -65,6 +65,8 @@ const ENTRIES = {
@@ -65,6 +65,8 @@ const ENTRIES = {
'deals.mjs': '../src/deals.js',
'deals.mjs': '../src/deals.js',
'trade.mjs': '../src/trade.js',
'trade.mjs': '../src/trade.js',
'space.mjs': '../src/space.js',
'space.mjs': '../src/space.js',
+ 'host.mjs': '../src/host.js',
+ 'news.mjs': '../src/news.js',
'food.mjs': '../src/food.js',
'food.mjs': '../src/food.js',
'actor.mjs': '../src/actor.js',
'actor.mjs': '../src/actor.js',
'run.mjs': '../src/run.js',
'run.mjs': '../src/run.js',
@@ -8,7 +8,7 @@ const { paginate, offsetPager } = require('./paginate');
@@ -8,7 +8,7 @@ const { paginate, offsetPager } = require('./paginate');
const semver = require('./semver');
const semver = require('./semver');
/** The package version (test/version.test.js keeps it equal to package.json). */
/** The package version (test/version.test.js keeps it equal to package.json). */
-const SDK_VERSION = '0.59.0';
+const SDK_VERSION = '0.60.0';
module.exports = {
module.exports = {
createClient,
createClient,
new file mode 100644
new file mode 100644
@@ -0,0 +1,51 @@
@@ -0,0 +1,51 @@
+'use strict';
+/**
+ * openvibe-sdk/host — OpenVibe.Host's public hosting catalog for apps: providers, plans with their prices, promos,
+ * offers from the community boards, domain endings with registrar prices (and whether a name is free), and
+ * benchmarks people ran with YABS. Routes at https://openvibe.host/api/v1/catalog; all public, sent without a token
+ * (audience openvibe.host). Editing the catalog is Host's editors' (first-party).
+ *
+ * const host = createHostClient(createClient({}));
+ * const { plans, next_cursor } = await host.plans.list({ kind: 'vps', max_price: 10, currency: 'USD', sort: 'price_per_gb_ram' });
+ * const { provider } = await host.providers.get('linode');
+ * const { check } = await host.domains.check('example.dev'); // rate-limited per address
+ * const { tld } = await host.domains.tld('dev'); // every registrar's price for .dev
+ *
+ * Lists take Host's own filters and refuse any other key (422 host.catalog.invalid): plans kind, min_vcpu,
+ * min_ram_mb, min_disk_gb, max_price, currency, location, provider, sort (price, price_per_vcpu, price_per_gb_ram,
+ * price_per_gb_disk, checked_at) and cursor; offers sort, currency, max_monthly, source, priced and cursor. They
+ * answer a page and its next_cursor. Prices are what each provider or registrar published, with when Host read them.
+ */
+const enc = encodeURIComponent;
+
+function createHostClient(client, { baseUrl } = {}) {
+ if (!client || typeof client.json !== 'function') throw new TypeError('createHostClient: pass an openvibe-sdk/core client');
+ const at = { service: 'host', baseUrl, audience: 'openvibe.host' };
+ const call = (opts) => client.json({ ...at, auth: false, ...opts }); // public reads: never a token
+ const list = (p) => ({ signal, ...query } = {}) => call({ path: `/api/v1/catalog/${p}`, query, signal });
+ const one = (p, what) => (key, { signal } = {}) => {
+ if (!key || typeof key !== 'string') throw new TypeError(`host: a ${what}`);
+ return call({ path: `/api/v1/catalog/${p}/${enc(key)}`, signal });
+ };
+
+ return {
+ providers: { list: ({ signal } = {}) => call({ path: '/api/v1/catalog/providers', signal }), get: one('providers', "provider's slug") },
+ plans: { list: list('plans'), get: one('plans', "plan's id") },
+ promos: { list: ({ signal } = {}) => call({ path: '/api/v1/catalog/promos', signal }) },
+ offers: { list: list('offers') },
+ domains: {
+ /** Domain endings and their prices. */
+ list: list('domains'),
+ /** One ending (without the dot) with every registrar's register, renew and transfer price. */
+ tld: one('domains', 'domain ending'),
+ /** Is a name registered? (RDAP; rate-limited per address.) */
+ check: (name, { signal } = {}) => {
+ if (!name || typeof name !== 'string' || !name.includes('.')) throw new TypeError('host.domains.check: a domain name');
+ return call({ path: '/api/v1/catalog/domains/check', query: { name }, signal });
+ },
+ },
+ benchmarks: { list: list('benchmarks'), get: one('benchmarks', "benchmark's id") },
+ };
+}
+
+module.exports = { createHostClient };
new file mode 100644
new file mode 100644
@@ -0,0 +1,37 @@
@@ -0,0 +1,37 @@
+'use strict';
+/**
+ * openvibe-sdk/news — OpenVibe.News' published stories for apps: the topics, the stories (published and retracted,
+ * newest first) and one story with its numbered sources, timeline and perspectives. Routes at
+ * https://openvibe.news/api/v1; public, sent without a token (audience openvibe.news).
+ * Writing and the editorial reads (drafts, revisions, clusters, ingestion) are News' editors' (first-party).
+ *
+ * const news = createNewsClient(createClient({}));
+ * const { topics } = await news.topics();
+ * const { stories } = await news.stories.list({ topic: 'space', limit: 10 });
+ * const { story } = await news.stories.get(stories[0].id); // every paragraph cites its sources
+ *
+ * A retracted story stays at its URL with its public retraction note. Every story rests on attached sources: News
+ * never publishes a paragraph without one.
+ */
+const enc = encodeURIComponent;
+
+function createNewsClient(client, { baseUrl } = {}) {
+ if (!client || typeof client.json !== 'function') throw new TypeError('createNewsClient: pass an openvibe-sdk/core client');
+ const at = { service: 'news', baseUrl, audience: 'openvibe.news' };
+ const call = (opts) => client.json({ ...at, auth: false, ...opts }); // public reads: never a token
+
+ return {
+ topics: ({ signal } = {}) => call({ path: '/api/v1/topics', signal }),
+ stories: {
+ /** Published and retracted stories, newest first, by topic. */
+ list: ({ topic, limit, offset, signal } = {}) => call({ path: '/api/v1/stories', query: { topic, limit, offset }, signal }),
+ /** One published story by id or slug, with its source table, timeline and perspectives. */
+ get: (id, { signal } = {}) => {
+ if (!id || typeof id !== 'string') throw new TypeError("news.stories.get: a story's id");
+ return call({ path: `/api/v1/stories/${enc(id)}`, signal });
+ },
+ },
+ };
+}
+
+module.exports = { createNewsClient };
@@ -76,7 +76,7 @@ run([
@@ -76,7 +76,7 @@ run([
for (const [re, why] of FORBIDDEN) if (re.test(src)) problems.push(`${path.relative(ROOT, file)}: ${why}`);
for (const [re, why] of FORBIDDEN) if (re.test(src)) problems.push(`${path.relative(ROOT, file)}: ${why}`);
}
}
assert.deepEqual(problems, []);
assert.deepEqual(problems, []);
- assert.deepEqual(blocked.sort(), ['./account-data', './actor', './blog', './cache', './commerce', './cost', './coupons', './db', './deals', './delivery', './download', './events', './food', './govern', './identity', './inventory', './limits', './live', './node', './notifications', './openre', './placement', './play', './pubsub', './quest', './queue', './resources', './reviews', './run', './runtime', './service', './space', './sso', './storage', './telemetry', './testing', './tips', './trade', './usage', './valkey', './video', './vip', './wiki', './work', './zone']);
+ assert.deepEqual(blocked.sort(), ['./account-data', './actor', './blog', './cache', './commerce', './cost', './coupons', './db', './deals', './delivery', './download', './events', './food', './govern', './host', './identity', './inventory', './limits', './live', './news', './node', './notifications', './openre', './placement', './play', './pubsub', './quest', './queue', './resources', './reviews', './run', './runtime', './service', './space', './sso', './storage', './telemetry', './testing', './tips', './trade', './usage', './valkey', './video', './vip', './wiki', './work', './zone']);
const rel = [...scanned].map((f) => path.relative(ROOT, f));
const rel = [...scanned].map((f) => path.relative(ROOT, f));
for (const must of ['browser.js', 'src/core/client.js', 'src/auth/browser.js', 'src/realtime.js', 'src/media.js', 'src/community.js', 'src/bot.js', 'src/modules.js', 'src/registry.js', 'src/jobs.js', 'src/tools.js', 'src/core/form.js', 'src/projects.js', 'browser/openvibe-sdk.mjs']) {
for (const must of ['browser.js', 'src/core/client.js', 'src/auth/browser.js', 'src/realtime.js', 'src/media.js', 'src/community.js', 'src/bot.js', 'src/modules.js', 'src/registry.js', 'src/jobs.js', 'src/tools.js', 'src/core/form.js', 'src/projects.js', 'browser/openvibe-sdk.mjs']) {
assert.ok(rel.includes(must), `${must} is scanned`);
assert.ok(rel.includes(must), `${must} is scanned`);
@@ -66,7 +66,7 @@ run([
@@ -66,7 +66,7 @@ run([
})().catch((err) => { console.error(err); process.exit(1); });`;
})().catch((err) => { console.error(err); process.exit(1); });`;
const res = execFileSync(process.execPath, ['-e', script], { cwd: app, encoding: 'utf8' });
const res = execFileSync(process.execPath, ['-e', script], { cwd: app, encoding: 'utf8' });
assert.match(res, new RegExp(`consumer ok: ${subpaths.length} subpaths \\+ the browser bundle`));
assert.match(res, new RegExp(`consumer ok: ${subpaths.length} subpaths \\+ the browser bundle`));
- assert.equal(subpaths.length, 63);
+ assert.equal(subpaths.length, 65);
assert.ok(!fs.existsSync(path.join(app, 'node_modules/openvibe-contracts')), 'the optional peer is not installed');
assert.ok(!fs.existsSync(path.join(app, 'node_modules/openvibe-contracts')), 'the optional peer is not installed');
} finally {
} finally {
fs.rmSync(tmp, { recursive: true, force: true });
fs.rmSync(tmp, { recursive: true, force: true });
@@ -1,5 +1,5 @@
@@ -1,5 +1,5 @@
'use strict';
'use strict';
-// openvibe-sdk/food, /actor, /run, /video, /work, /zone, /blog, /reviews, /wiki, /coupons, /deals, /trade and /space through a real core client against one local stub: every
+// openvibe-sdk/food, /actor, /run, /video, /work, /zone, /blog, /reviews, /wiki, /coupons, /deals, /trade, /space, /host and /news through a real core client against one local stub: every
// route and method, the token audience, which writes are retried (keyed or idempotent) and which never are, the SSE
// route and method, the token audience, which writes are retried (keyed or idempotent) and which never are, the SSE
// followers (Actor's task events, Run's job stream), and the id checks done before any call.
// followers (Actor's task events, Run's job stream), and the id checks done before any call.
const assert = require('assert');
const assert = require('assert');
@@ -18,6 +18,8 @@ const { createCouponsClient } = require('../src/coupons');
@@ -18,6 +18,8 @@ const { createCouponsClient } = require('../src/coupons');
const { createDealsClient } = require('../src/deals');
const { createDealsClient } = require('../src/deals');
const { createTradeClient } = require('../src/trade');
const { createTradeClient } = require('../src/trade');
const { createSpaceClient } = require('../src/space');
const { createSpaceClient } = require('../src/space');
+const { createHostClient } = require('../src/host');
+const { createNewsClient } = require('../src/news');
const ULID = '01JAB2C3D4E5F6G7H8J9K0MNPQ';
const ULID = '01JAB2C3D4E5F6G7H8J9K0MNPQ';
const ids = { plan: `pln_${ULID}`, task: `tsk_${ULID}`, agent: `agt_${ULID}`, mem: `mem_${ULID}`, job: `job_${ULID}`, playlist: `vpl_${ULID}`, app: `wap_${ULID}`, project: `prj_${ULID}`, zone: `zon_${ULID}`, post: `pst_${ULID}`, page: `pg_${ULID}`, coupon: `cpn_${ULID}` };
const ids = { plan: `pln_${ULID}`, task: `tsk_${ULID}`, agent: `agt_${ULID}`, mem: `mem_${ULID}`, job: `job_${ULID}`, playlist: `vpl_${ULID}`, app: `wap_${ULID}`, project: `prj_${ULID}`, zone: `zon_${ULID}`, post: `pst_${ULID}`, page: `pg_${ULID}`, coupon: `cpn_${ULID}` };
@@ -52,7 +54,7 @@ const ids = { plan: `pln_${ULID}`, task: `tsk_${ULID}`, agent: `agt_${ULID}`, me
@@ -52,7 +54,7 @@ const ids = { plan: `pln_${ULID}`, task: `tsk_${ULID}`, agent: `agt_${ULID}`, me
const base = `http://127.0.0.1:${server.address().port}`;
const base = `http://127.0.0.1:${server.address().port}`;
const audiences = [];
const audiences = [];
const client = createClient({
const client = createClient({
- baseUrls: { food: `${base}/food`, actor: `${base}/actor`, run: `${base}/run`, 'media-hub': `${base}/video`, work: `${base}/work`, zone: `${base}/zone`, blog: `${base}/blog`, reviews: `${base}/reviews`, wiki: `${base}/wiki`, coupons: `${base}/coupons`, deals: `${base}/deals`, trade: `${base}/trade`, space: `${base}/space` },
+ baseUrls: { food: `${base}/food`, actor: `${base}/actor`, run: `${base}/run`, 'media-hub': `${base}/video`, work: `${base}/work`, zone: `${base}/zone`, blog: `${base}/blog`, reviews: `${base}/reviews`, wiki: `${base}/wiki`, coupons: `${base}/coupons`, deals: `${base}/deals`, trade: `${base}/trade`, space: `${base}/space`, host: `${base}/host`, news: `${base}/news` },
getToken: ({ audience }) => { audiences.push(audience); return `tok-${audience}`; },
getToken: ({ audience }) => { audiences.push(audience); return `tok-${audience}`; },
retries: 2, retryDelayMs: 1, maxRetryDelayMs: 2,
retries: 2, retryDelayMs: 1, maxRetryDelayMs: 2,
});
});
@@ -420,13 +422,43 @@ const ids = { plan: `pln_${ULID}`, task: `tsk_${ULID}`, agent: `agt_${ULID}`, me
@@ -420,13 +422,43 @@ const ids = { plan: `pln_${ULID}`, task: `tsk_${ULID}`, agent: `agt_${ULID}`, me
assert.throws(() => space.deploys.uploadFiles('site_1', []), /at least one/);
assert.throws(() => space.deploys.uploadFiles('site_1', []), /at least one/);
assert.throws(() => space.deploys.uploadArchive('site_1'), /archive/);
assert.throws(() => space.deploys.uploadArchive('site_1'), /archive/);
+ // ── Host and News: public reads, never a token ──────────
+ const host = createHostClient(client);
+ const news = createNewsClient(client);
+ mark = since();
+ await host.providers.list();
+ await host.providers.get('linode');
+ await host.plans.list({ kind: 'vps', max_price: 10, currency: 'USD', sort: 'price_per_gb_ram' });
+ await host.plans.get('pln_9');
+ await host.promos.list();
+ await host.offers.list({ sort: 'new', priced: 1, cursor: 'c2' });
+ await host.domains.list({ cursor: 'c1' });
+ await host.domains.tld('dev');
+ await host.domains.check('example.dev');
+ await host.benchmarks.list();
+ await host.benchmarks.get('bm_1');
+ await news.topics();
+ await news.stories.list({ topic: 'space', limit: 10 });
+ await news.stories.get('moon-landing-2026');
+ const pub = mark();
+ assert.deepStrictEqual(pub.map((x) => `${x.method} ${x.url}`), [
+ 'GET /api/v1/catalog/providers', 'GET /api/v1/catalog/providers/linode',
+ 'GET /api/v1/catalog/plans?kind=vps&max_price=10¤cy=USD&sort=price_per_gb_ram', 'GET /api/v1/catalog/plans/pln_9',
+ 'GET /api/v1/catalog/promos', 'GET /api/v1/catalog/offers?sort=new&priced=1&cursor=c2', 'GET /api/v1/catalog/domains?cursor=c1',
+ 'GET /api/v1/catalog/domains/dev', 'GET /api/v1/catalog/domains/check?name=example.dev', 'GET /api/v1/catalog/benchmarks',
+ 'GET /api/v1/catalog/benchmarks/bm_1', 'GET /api/v1/topics', 'GET /api/v1/stories?topic=space&limit=10', 'GET /api/v1/stories/moon-landing-2026',
+ ]);
+ assert.ok(pub.every((x) => x.auth === null), 'public reads go without a token, even from a client that has one');
+ assert.throws(() => host.domains.check('example'), /domain name/);
+ assert.throws(() => news.stories.get(''), /story/);
+
// Each product's token is for its own audience (Video's is the media hub's, openvibe.download).
// Each product's token is for its own audience (Video's is the media hub's, openvibe.download).
assert.deepStrictEqual([...new Set(audiences)].sort(), ['openvibe.actor', 'openvibe.blog', 'openvibe.coupons', 'openvibe.deals', 'openvibe.download', 'openvibe.food', 'openvibe.reviews', 'openvibe.run', 'openvibe.space', 'openvibe.trade', 'openvibe.wiki', 'openvibe.work', 'openvibe.zone']);
assert.deepStrictEqual([...new Set(audiences)].sort(), ['openvibe.actor', 'openvibe.blog', 'openvibe.coupons', 'openvibe.deals', 'openvibe.download', 'openvibe.food', 'openvibe.reviews', 'openvibe.run', 'openvibe.space', 'openvibe.trade', 'openvibe.wiki', 'openvibe.work', 'openvibe.zone']);
- assert.ok(seen.every((x) => x.auth === `Bearer tok-${{ food: 'openvibe.food', actor: 'openvibe.actor', run: 'openvibe.run', video: 'openvibe.download', work: 'openvibe.work', zone: 'openvibe.zone', blog: 'openvibe.blog', reviews: 'openvibe.reviews', wiki: 'openvibe.wiki', coupons: 'openvibe.coupons', deals: 'openvibe.deals', trade: 'openvibe.trade', space: 'openvibe.space' }[x.svc]}`));
+ assert.ok(seen.filter((x) => x.svc !== 'host' && x.svc !== 'news').every((x) => x.auth === `Bearer tok-${{ food: 'openvibe.food', actor: 'openvibe.actor', run: 'openvibe.run', video: 'openvibe.download', work: 'openvibe.work', zone: 'openvibe.zone', blog: 'openvibe.blog', reviews: 'openvibe.reviews', wiki: 'openvibe.wiki', coupons: 'openvibe.coupons', deals: 'openvibe.deals', trade: 'openvibe.trade', space: 'openvibe.space' }[x.svc]}`));
// Each client needs a core client.
// Each client needs a core client.
- for (const make of [createFoodClient, createActorClient, createRunClient, createVideoClient, createWorkClient, createZoneClient, createBlogClient, createReviewsClient, createWikiClient, createCouponsClient, createDealsClient, createTradeClient, createSpaceClient]) assert.throws(() => make({}), /core client/);
- console.log('product modules (food, actor, run, video, work, zone, blog, reviews, wiki, coupons, deals, trade, space): all checks passed');
+ for (const make of [createFoodClient, createActorClient, createRunClient, createVideoClient, createWorkClient, createZoneClient, createBlogClient, createReviewsClient, createWikiClient, createCouponsClient, createDealsClient, createTradeClient, createSpaceClient, createHostClient, createNewsClient]) assert.throws(() => make({}), /core client/);
+ console.log('product modules (food, actor, run, video, work, zone, blog, reviews, wiki, coupons, deals, trade, space, host, news): all checks passed');
} finally {
} finally {
server.close();
server.close();
}
}
new file mode 100644
new file mode 100644
@@ -0,0 +1,18 @@
@@ -0,0 +1,18 @@
+/** openvibe-sdk/host: OpenVibe.Host's public hosting catalog (sent without a token). */
+type Opts = { signal?: AbortSignal };
+type HostJson = Record<string, any>;
+export interface PlanFilters { kind?: string; min_vcpu?: number; min_ram_mb?: number; min_disk_gb?: number; max_price?: number; currency?: string; location?: string; provider?: string; sort?: 'price' | 'price_per_vcpu' | 'price_per_gb_ram' | 'price_per_gb_disk' | 'checked_at'; cursor?: string }
+export interface OfferFilters { sort?: string; currency?: string; max_monthly?: number; source?: string; priced?: boolean | number; cursor?: string }
+export interface HostClient {
+ providers: { list(opts?: Opts): Promise<{ providers: HostJson[] }>; get(slug: string, opts?: Opts): Promise<{ provider: HostJson }> };
+ plans: { list(filters?: PlanFilters & Opts): Promise<{ plans: HostJson[]; next_cursor: string | null }>; get(id: string, opts?: Opts): Promise<{ plan: HostJson }> };
+ promos: { list(opts?: Opts): Promise<{ promos: HostJson[] }> };
+ offers: { list(filters?: OfferFilters & Opts): Promise<{ offers: HostJson[]; next_cursor: string | null }> };
+ domains: {
+ list(filters?: Record<string, unknown> & Opts): Promise<HostJson>;
+ tld(tld: string, opts?: Opts): Promise<{ tld: HostJson }>;
+ check(name: string, opts?: Opts): Promise<{ check: HostJson }>;
+ };
+ benchmarks: { list(filters?: Record<string, unknown> & Opts): Promise<HostJson>; get(id: string, opts?: Opts): Promise<{ benchmark: HostJson }> };
+}
+export function createHostClient(client: { json(opts: Record<string, unknown>): Promise<any> }, options?: { baseUrl?: string }): HostClient;
@@ -27,6 +27,8 @@ export * as coupons from './coupons';
@@ -27,6 +27,8 @@ export * as coupons from './coupons';
export * as deals from './deals';
export * as deals from './deals';
export * as trade from './trade';
export * as trade from './trade';
export * as space from './space';
export * as space from './space';
+export * as host from './host';
+export * as news from './news';
export * as food from './food';
export * as food from './food';
export * as actor from './actor';
export * as actor from './actor';
export * as run from './run';
export * as run from './run';
new file mode 100644
new file mode 100644
@@ -0,0 +1,11 @@
@@ -0,0 +1,11 @@
+/** openvibe-sdk/news: OpenVibe.News' published stories (sent without a token). */
+type Opts = { signal?: AbortSignal };
+type NewsJson = Record<string, any>;
+export interface NewsClient {
+ topics(opts?: Opts): Promise<{ topics: NewsJson[] }>;
+ stories: {
+ list(opts?: Opts & { topic?: string; limit?: number; offset?: number }): Promise<{ total: number; stories: NewsJson[] }>;
+ get(id: string, opts?: Opts): Promise<{ story: NewsJson }>;
+ };
+}
+export function createNewsClient(client: { json(opts: Record<string, unknown>): Promise<any> }, options?: { baseUrl?: string }): NewsClient;