openvibers/openvibe.sdk Commits

0.134.0: ov.ai.creations reads the public catalogue (#180)

OP OpenVibers committed 3 days ago · cc621e76f2 · 10 files, +46 −13

* 0.134.0: ov.ai.creations reads the public catalogue

The catalogue of everything AI can make on OpenVibe (GET /api/v1/creations, ai.creation-list@1): id, product, plain name, what you give it and what comes back, the workflow or registered task behind it, who may use it, whether it can cost coins and where to start. The endpoint is public, so no token is sent. Types AiCreation and AiCreationList.

* Merge remote-tracking branch 'origin/main' into feat/ai-creations-sdk

# Conflicts:
#	STATUS.json

Changes

ddiff --git a/CHANGELOG.md b/CHANGELOG.md
iindex 832ad0a..9b7349c 100644
---- a/CHANGELOG.md
++++ b/CHANGELOG.md
@@@ -1,5 +1,9 @@
# Changelog
++## 0.134.0 (2026-11-09)
++
++- `ov.ai.creations()`: the public catalogue of everything AI can make on OpenVibe (`GET /api/v1/creations`, `ai.creation-list@1`) — id, product, a plain name, what you give it and what comes back, the workflow or registered task behind it, who may use it (guest, signed-in, 18+ floor), whether it can cost coins, and where to start. Cached five minutes and CORS open; no token is sent. Types: `AiCreation`, `AiCreationList`.
++
## 0.133.0 (2026-11-09)
- ov.blog.changelog({ service, kind, area, q, limit, before }): the network changelog's blog.changelog-entry@2 rows, newest first
ddiff --git a/README.md b/README.md
iindex e0a76fd..06620b0 100644
---- a/README.md
++++ b/README.md
@@@ -13,7 +13,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.133.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.134.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.
@@@ -22,7 +22,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.133.0
++npm install https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.134.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).
@@@ -213,7 +213,7 @@ Until OpenVibe.Tools serves the gateway facade (Tools S6), point the jobs client
| `openvibe-sdk/limits` | node | `createActorLimiter({limits: {minute, hour, day}, actor?, maxActors?, onLimited?})` → `limits(name, {minute?, hour?, day?})` Express middleware: per-actor fixed windows at a capability boundary (service principal, else the signed-in person, else `ip:`), 429 problem+json `rate_limited` with Retry-After before the handler; `defaultActor(req)`, `.stats()` |
| `openvibe-sdk/account-data` | node | `createAccountData({db, service, tables: [{table, subject, value?, file?, columns?, erase?}], extraExport?, extraErase?})` → `.apply(event, {send})`, `.consumer({secrets, send, onEvent?})` (a POST /internal/events handler), `.exportPart(subject)`, `.erase(subjects)`, `.ensureSchema()`; `createNetworkSender({networkInternalUrl, clientId, clientSecret})`; `startSubscriptions({eventsUrl, endpoint, secret, networkInternalUrl, clientId, clientSecret})` (the two Events subscriptions, created at boot when missing): a service's share of account export and deletion (ADR-033), idempotent per export/deletion id; telemetry is covered once here (the person's `telemetry_samples` exported as `telemetry.json`, its `subject` set to NULL and the sample kept) unless the table is listed; `uncovered(db, {tables, taskKeyed?, exempt?})` lists the tables with a person column (`subject`, `owner`, `created_by`, `user_id`, `person`) that nothing covers, for a service test to assert is empty |
| `openvibe-sdk/chat` | both | `createChatClient(client)`: `global.send/history/search`, `rooms.*` (list, create, get, update, messages, send, deleteMessage, join, leave, read, members, setMember), `dms.*` (list, create, get, messages, send, deleteMessage, read, unread, blocks, block, unblock), `exportMine()`, `vibe.*` (list, start, rename, remove: chats with Vibe), `inboxes.*` (list, create, get, update, remove, addMember, removeMember, conversations, messages, reply, setStatus, read, identity, replies, saveReply, deleteReply, webhooks, addWebhook, testWebhook, removeWebhook: a support inbox's team), `support.*` (list, messages, send: their own conversations with sites' chats), `feeds.*` (mine, create, update, rotateKey, remove, view, onLive). With no account: `createInboxVisitor(client, { inbox, token, user, account })` (visit, send, messages, handoff, rate: your own panel for an inbox, from any site) and `createFeedPublisher(client, { feed, key })` (hello, publish, claudeCode: vibe coding events with the feed's key) |
--| `openvibe-sdk/ai` | both | `createAiClient(client)`: `runs.create(workflow, input, {wait, idempotencyKey, latency, deadlineHours, …})`, `runs.get/list/cancel/retry/citations/addCitations/waitFor`, `batches.create/get/list/cancel`, `chat/generate/summarize/classify/extract/enrich/embed`. A run may ask for the class it may wait in (`latency`: `interactive`, `background`, `batch`; `deadlineHours`: 1–72 for a batch run); `waitFor` gives a batch run back pending rather than throwing when the wait is over — the answer comes with the run's completion event or webhook. |
++| `openvibe-sdk/ai` | both | `createAiClient(client)`: `runs.create(workflow, input, {wait, idempotencyKey, latency, deadlineHours, …})`, `runs.get/list/cancel/retry/citations/addCitations/waitFor`, `batches.create/get/list/cancel`, `creations()` (the public catalogue of what AI can make, no token sent), `chat/generate/summarize/classify/extract/enrich/embed`. A run may ask for the class it may wait in (`latency`: `interactive`, `background`, `batch`; `deadlineHours`: 1–72 for a batch run); `waitFor` gives a batch run back pending rather than throwing when the wait is over — the answer comes with the run's completion event or webhook. |
| `openvibe-sdk/jobs` | both | `createJobsClient(client, {baseUrl?})`: `submit` (Idempotency-Key), `get`, `cancel`, `retry`, `reference`, `unreference`, `events` (SSE, reattaches), `wait`, `file` (raw Response); `isTerminal()`. Default origin: the Tools gateway's jobs facade |
| `openvibe-sdk/tools` | both | `createToolsClient(client, {baseUrl?, anonymousReads?})`: `list({family, q, execution, api, status})`, `get(id)`, `schema(id)`, `run(id, input, {files, waitMs, idempotencyKey, signal, timeoutMs})` (+ `.wait()`), `jobs`; `ToolRunError`, `isToolRunError()` |
| `openvibe-sdk/projects` | both (user token) | `createProjectsClient(client)`: `catalog`, `list`, `create`, `get`, `update`, `archive`, `setAllowance`, `setEnvironmentPolicy`, `members.*`, `apps.*`, `credentials.list/rotate/revoke`, `grants.list/request/approve/deny/revoke`, `quotas.*`, `audit`, `iterateAudit` |
ddiff --git a/STATUS.json b/STATUS.json
iindex 8833458..00a3163 100644
---- a/STATUS.json
++++ b/STATUS.json
@@@ -3,7 +3,7 @@
"stage": "alpha",
"code": true,
"wave": "W2",
-- "version": "0.133.0",
++ "version": "0.134.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",
ddiff --git a/browser/openvibe-sdk.mjs b/browser/openvibe-sdk.mjs
iindex 81338d5..891bd57 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.133.0, MIT). Do not edit.
++// Generated by scripts/browser-bundle.js from browser.js (openvibe-sdk 0.134.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.133.0';
++const SDK_VERSION = '0.134.0';
module.exports = {
createClient,
@@@ -5082,6 +5082,8 @@ function createAiClient(client, defaults = {}) {
};
const tasks = (o = {}) => call({ path: '/api/v1/tasks' }, o);
++ /** What AI can make (GET /api/v1/creations; public, cached, CORS open) → { creations, count, generated_at } */
++ const creations = (o = {}) => call({ path: '/api/v1/creations', auth: false }, o);
const choices = {
get: (task, o = {}) => call({ path: '/api/v1/choices', query: { task } }, o),
set: (task, choice, o = {}) => call({ method: 'PUT', path: `/api/v1/me/choices/${enc(task)}`, json: choice, idempotencyKey: false }, o),
@@@ -5114,7 +5116,7 @@ function createAiClient(client, defaults = {}) {
cancel: (id, o = {}) => call({ method: 'POST', path: `/api/v1/batches/${enc(id)}/cancel`, idempotencyKey: false }, o),
};
-- const api = { tasks, choices, run, admin, runs, batches, TERMINAL, CLASSES };
++ const api = { tasks, creations, choices, run, admin, runs, batches, TERMINAL, CLASSES };
// Direct operations: a run of workflow ai.<op> with the input as the body, waited for by AI.
for (const op of OPS) {
api[op] = (input = {}, o = {}) => call({ method: 'POST', path: `/api/v1/${op}`, query: waitQuery(o),
ddiff --git a/package-lock.json b/package-lock.json
iindex 014e166..4ef9d83 100644
---- a/package-lock.json
++++ b/package-lock.json
@@@ -1,12 +1,12 @@
{
"name": "openvibe-sdk",
-- "version": "0.133.0",
++ "version": "0.134.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "openvibe-sdk",
-- "version": "0.133.0",
++ "version": "0.134.0",
"license": "MIT",
"bin": {
"openvibe-download": "bin/openvibe-download.js"
ddiff --git a/package.json b/package.json
iindex aa21c7b..7600ec3 100644
---- a/package.json
++++ b/package.json
@@@ -1,6 +1,6 @@
{
"name": "openvibe-sdk",
-- "version": "0.133.0",
++ "version": "0.134.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/ai.js b/src/ai.js
iindex 82b212f..5d82751 100644
---- a/src/ai.js
++++ b/src/ai.js
@@@ -97,6 +97,8 @@ function createAiClient(client, defaults = {}) {
};
const tasks = (o = {}) => call({ path: '/api/v1/tasks' }, o);
++ /** What AI can make (GET /api/v1/creations; public, cached, CORS open) → { creations, count, generated_at } */
++ const creations = (o = {}) => call({ path: '/api/v1/creations', auth: false }, o);
const choices = {
get: (task, o = {}) => call({ path: '/api/v1/choices', query: { task } }, o),
set: (task, choice, o = {}) => call({ method: 'PUT', path: `/api/v1/me/choices/${enc(task)}`, json: choice, idempotencyKey: false }, o),
@@@ -129,7 +131,7 @@ function createAiClient(client, defaults = {}) {
cancel: (id, o = {}) => call({ method: 'POST', path: `/api/v1/batches/${enc(id)}/cancel`, idempotencyKey: false }, o),
};
-- const api = { tasks, choices, run, admin, runs, batches, TERMINAL, CLASSES };
++ const api = { tasks, creations, choices, run, admin, runs, batches, TERMINAL, CLASSES };
// Direct operations: a run of workflow ai.<op> with the input as the body, waited for by AI.
for (const op of OPS) {
api[op] = (input = {}, o = {}) => call({ method: 'POST', path: `/api/v1/${op}`, query: waitQuery(o),
ddiff --git a/src/core/index.js b/src/core/index.js
iindex 895f25c..0918347 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.133.0';
++const SDK_VERSION = '0.134.0';
module.exports = {
createClient,
ddiff --git a/test/ai.test.js b/test/ai.test.js
iindex 8278c12..e678ce2 100644
---- a/test/ai.test.js
++++ b/test/ai.test.js
@@@ -17,6 +17,7 @@ async function aiStub() {
if (u.pathname === '/api/v1/runs/run_1') return send(res, 200, { run: { id: 'run_1', status: ++polls >= 3 ? 'succeeded' : 'running', output: polls >= 3 ? { ok: true } : undefined } });
if (u.pathname === '/api/v1/runs/missing') return send(res, 404, { code: 'run.not_found' });
if (u.pathname === '/api/v1/summarize') return send(res, 201, { run: { id: 'run_2', status: 'succeeded' } });
++ if (u.pathname === '/api/v1/creations') return send(res, 200, { creations: [{ id: 'blog-post', product: 'blog', name: 'Write a blog post' }], count: 1, generated_at: '2026-11-09T22:15:00.000Z' });
return send(res, 404, {});
});
}
@@@ -37,6 +38,16 @@ run([
assert.equal(await ai.runs.get('missing'), null);
await srv.close();
}],
++ ['creations reads the public catalogue without a token', async () => {
++ const srv = await aiStub();
++ const ai = createAiClient(createClient({ baseUrls: { ai: srv.url }, token: 't', retries: 2 }));
++ const list = await ai.creations();
++ assert.equal(list.count, 1);
++ assert.equal(list.creations[0].id, 'blog-post');
++ assert.equal(srv.requests[0].url, '/api/v1/creations');
++ assert.equal(srv.requests[0].headers.authorization, undefined, 'public: no token is sent');
++ await srv.close();
++ }],
['a create without a key is not retried; direct ops post the input as the body', async () => {
const srv = await aiStub();
const ai = createAiClient(createClient({ baseUrls: { ai: srv.url }, token: 't', retries: 2 }));
ddiff --git a/types/ai.d.ts b/types/ai.d.ts
iindex c0f08c4..83ddca4 100644
---- a/types/ai.d.ts
++++ b/types/ai.d.ts
@@@ -8,6 +8,20 @@ export type ServiceTier = 'standard' | 'flex' | 'batch' | 'offpeak' | 'local';
export interface AiChoice { model: string; source: "openvibe" | "keys" | "machines"; machine?: string; }
export interface AiTask { name: string; kind: "text" | "code" | "vision" | "image" | "search"; sentence: string; default: AiChoice; workflow?: string; service?: string; }
export interface AiTaskDefaults { signed_out: AiChoice; signed_in: AiChoice; fallbacks: AiChoice[]; image_model: AiChoice | null; search_engines: Array<{ engine: string; enabled: boolean }>; max_cost_usd: number | null; }
++/** One thing AI can make, as GET /api/v1/creations lists it (ai.creation@1). */
++export interface AiCreation {
++ id: string;
++ product: 'ai' | 'blog' | 'codes' | 'community' | 'design' | 'food' | 'games' | 'live' | 'media' | 'meme' | 'news' | 'pics' | 'quest' | 'rent' | 'reviews' | 'space' | 'tools' | 'trade' | 'wiki' | string;
++ name: string;
++ gives: string;
++ returns: string;
++ workflow: string | null;
++ task: string | null;
++ access: { guest: boolean; signed_in: boolean; floor_18: boolean };
++ costs_coins: boolean;
++ start_url: string;
++}
++export interface AiCreationList { creations: AiCreation[]; count: number; generated_at: string; }
export interface RunOptions { choice?: AiChoice; task?: string; wait?: number; version?: number; idempotencyKey?: string; target?: unknown; attribution?: unknown; onBehalfOf?: unknown; /** The class the caller asks for. A slower class than the workflow allows is honoured; a faster one is clamped by the service. */ latency?: LatencyClass; /** For a batch run: how long the answer may take, in hours (1 to 72). */ deadlineHours?: number; options?: Record<string, unknown>; signal?: AbortSignal; }
export interface RunResponse { run: AiRun; replayed?: boolean }
export interface AiRuns {
@@@ -51,7 +65,7 @@ export interface AiBatches {
cancel(id: string, opts?: { signal?: AbortSignal }): Promise<{ batch: AiBatch }>;
}
type Op = (input?: Record<string, unknown>, opts?: Omit<RunOptions, 'version' | 'onBehalfOf'>) => Promise<RunResponse>;
--export interface AiClient { tasks(opts?: {signal?: AbortSignal}): Promise<{tasks: AiTask[]}>; run(task: string, input?: Record<string, unknown>, opts?: RunOptions): Promise<RunResponse>; choices: { get(task: string, opts?: {signal?: AbortSignal}): Promise<{task: AiTask; choice: AiChoice; why: string; options: Record<string, unknown[]>}>; set(task: string, choice: AiChoice, opts?: {signal?: AbortSignal}): Promise<{choice: AiChoice}> }; admin: { defaults(value?: {defaults: Array<{task: string; value: AiTaskDefaults}>}, opts?: {signal?: AbortSignal}): Promise<{tasks?: AiTask[]; defaults: Record<string, AiTaskDefaults>}> }; runs: AiRuns; batches: AiBatches; TERMINAL: Set<string>; CLASSES: string[]; chat: Op; generate: Op; summarize: Op; classify: Op; extract: Op; enrich: Op; embed: Op; }
++export interface AiClient { tasks(opts?: {signal?: AbortSignal}): Promise<{tasks: AiTask[]}>; creations(opts?: {signal?: AbortSignal}): Promise<AiCreationList>; run(task: string, input?: Record<string, unknown>, opts?: RunOptions): Promise<RunResponse>; choices: { get(task: string, opts?: {signal?: AbortSignal}): Promise<{task: AiTask; choice: AiChoice; why: string; options: Record<string, unknown[]>}>; set(task: string, choice: AiChoice, opts?: {signal?: AbortSignal}): Promise<{choice: AiChoice}> }; admin: { defaults(value?: {defaults: Array<{task: string; value: AiTaskDefaults}>}, opts?: {signal?: AbortSignal}): Promise<{tasks?: AiTask[]; defaults: Record<string, AiTaskDefaults>}> }; runs: AiRuns; batches: AiBatches; TERMINAL: Set<string>; CLASSES: string[]; chat: Op; generate: Op; summarize: Op; classify: Op; extract: Op; enrich: Op; embed: Op; }
export function createAiClient(client: OpenVibeClient, defaults?: { baseUrl?: string }): AiClient;
export const TERMINAL: Set<string>;
export const OPS: string[];