openvibers/openvibe.sdk Commits

0.70.0: openvibe-sdk/search: the Search Fabric (fabric(), query() with scopes, providers(), types) (#97)

OP OpenVibers committed 16 days ago · 8e2e1b734a · 12 files, +160 −22

Changes

ddiff --git a/CHANGELOG.md b/CHANGELOG.md
iindex 5765da9..8cfc173 100644
---- a/CHANGELOG.md
++++ b/CHANGELOG.md
@@@ -3,6 +3,26 @@
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.
++## 0.70.0 (2026-10-28)
++
++- **`openvibe-sdk/search`: the Search Fabric** (Contracts 0.225.0 `search.fabric.query`; plan 2026-10-28 §4.5). One
++ query over several scopes, routed the cheapest way that answers.
++ - **`search.fabric(text, { scopes, freshness, depth, answer, limit, cursor, owner, type, lang, site })`** returns
++ `search.fabric-result@1`:
++ - `results`: each has a scope and a kind (a document in the index, or a web page with its provider, URL and
++ dates);
++ - `groups`, `citations`, and `route.explain` (what each step did and what it cost).
++ - **Scopes:**
++ - `network` and `mine` (the person's own; a service passes `actingSubject`);
++ - `web`: OpenVibe's open index first, then DeepSeek for a signed-in caller or a service, then Wikipedia,
++ cached;
++ - `news`, `images`, `video`, `products`, `people`, `places` and `code`.
++ - `search.query(text, { scopes })` is the same call; without `scopes`, `query()` is the index search as before.
++ - `search.providers()` lists the web ladder's `search.provider-offer@1` items.
++ - Reads use GET, so the client may retry them.
++ - Types: `FabricOptions`, `FabricAnswer`, `FabricResult`, `FabricExplainStep`, `ProviderOffer`; `fabricOf()` builds
++ the query string.
++
## 0.69.0 (2026-10-28)
- **`openvibe-sdk/tools`: domain history** (OpenVibe.Tools' `/api/v1/domains`, 2026-10-28). What the WHOIS and RDAP
ddiff --git a/README.md b/README.md
iindex 00daa64..61db449 100644
---- a/README.md
++++ b/README.md
@@@ -2,14 +2,14 @@
> Supported browser and server clients for the OpenVibe platform.
--**Status:** alpha, v0.69.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.70.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.69.0
++npm install https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.70.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).
ddiff --git a/STATUS.json b/STATUS.json
iindex 80bf572..fa853af 100644
---- a/STATUS.json
++++ b/STATUS.json
@@@ -3,7 +3,7 @@
"stage": "alpha",
"code": true,
"wave": "W2",
-- "version": "0.69.0",
++ "version": "0.70.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 994ef2c..f831496 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.69.0, MIT). Do not edit.
++// Generated by scripts/browser-bundle.js from browser.js (openvibe-sdk 0.70.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, themes, chat, ai, jobs, tools, projects, geo). No server-only code: no service tokens, JWT verification, events, identity.
/* eslint-disable */
@@@ -43,7 +43,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.69.0';
++const SDK_VERSION = '0.70.0';
module.exports = {
createClient,
@@@ -1989,6 +1989,15 @@ function (module, exports) {
* const { suggestions } = await search.suggest('japan');
* const doc = await search.document('live', 'channel', '327'); // null when missing or not yours to see
*
++ * The Search Fabric (Contracts 0.225.0, search.fabric.query; also the MCP tool openvibe.search): one query over
++ * several scopes, routed the cheapest way that answers.
++ * const r = await search.fabric('surf maps', { scopes: ['network', 'web'], freshness: 'month', depth: 'standard' });
++ * // r: { results (each with scope, kind document|page, url, provider for the web), groups, citations,
++ * // route: { explain, cost_usd }, next_cursor } — query(text, { scopes }) is the same call
++ * const { providers } = await search.providers(); // the web ladder's offers (price, availability, today's use)
++ * Anonymous callers get the index, the open index and cached web answers; a person or a service also reaches the
++ * paid providers within OpenVibe's daily caps; `mine` needs a person (actingSubject for a service).
++ *
* Who sees what is decided by Search for every hit: anonymous callers get public, published, indexable
* documents only; a signed-in person (Bearer user JWT, or the ov_token cookie with credentials) also
* gets restricted documents whose ACL names them; a first-party service with search.query.delegate may
@@@ -2001,6 +2010,17 @@ const { isOpenVibeError } = __load(3);
const { isActingSubjectId } = __load(5);
const enc = encodeURIComponent;
++const FABRIC_KEYS = ['freshness', 'depth', 'limit', 'cursor', 'owner', 'type', 'lang', 'site'];
++
++/** The query string of GET /api/v1/query (search.fabric-request@1, GET form: scopes comma-separated). */
++function fabricOf(text, o = {}) {
++ const q = { q: String(text == null ? '' : text) };
++ const scopes = Array.isArray(o.scopes) ? o.scopes : o.scopes ? String(o.scopes).split(',') : ['network'];
++ q.scopes = scopes.map((x) => String(x).trim()).filter(Boolean).join(',');
++ for (const k of FABRIC_KEYS) if (o[k] !== undefined && o[k] !== null && o[k] !== '') q[k] = o[k];
++ if (o.answer) q.answer = 'true';
++ return q;
++}
const FACET_KEY = /^[a-z][a-z0-9_]{0,39}$/;
function queryOf(text, o = {}) {
@@@ -2041,9 +2061,15 @@ function createSearchClient(client, defaults = {}) {
}
const orNull = (p) => p.catch((err) => { if (isOpenVibeError(err) && err.status === 404) return null; throw err; });
++ /** The Search Fabric: GET, so the core client may retry it safely. */
++ const fabric = (text, o = {}) => call({ path: pathWith('/api/v1/query', fabricOf(text, o)) }, o);
return {
-- /** { results, next_cursor, facets? } — one page. */
-- query: (text, o = {}) => call({ path: pathWith('/api/v1/search', queryOf(text, o)) }, o),
++ /** { results, next_cursor, facets? } — one page. With `scopes`, the Search Fabric (fabric()). */
++ query: (text, o = {}) => (o.scopes ? fabric(text, o) : call({ path: pathWith('/api/v1/search', queryOf(text, o)) }, o)),
++ /** search.fabric-result@1 — one query over network, mine, web and the vertical scopes. */
++ fabric,
++ /** { providers: search.provider-offer@1[] } — the web ladder's providers. */
++ providers: (o = {}) => call({ path: '/api/v1/query/providers' }, o),
/** Every result, page after page (cursor), until Search has no more or `max` is reached. */
async *iterate(text, o = {}) {
let cursor = o.cursor || null;
@@@ -2062,7 +2088,7 @@ function createSearchClient(client, defaults = {}) {
};
}
--module.exports = { createSearchClient, queryOf };
++module.exports = { createSearchClient, queryOf, fabricOf };
},
// ── 17: src/themes.js ───────────────────────────────────────────────
function (module, exports) {
ddiff --git a/docs/api-surface.json b/docs/api-surface.json
iindex 3b2d6b0..9e96cdf 100644
---- a/docs/api-surface.json
++++ b/docs/api-surface.json
@@@ -235,6 +235,7 @@
"search": {
"object": [
"createSearchClient",
++ "fabricOf",
"queryOf"
]
},
@@@ -634,6 +635,7 @@
},
"openvibe-sdk/search": {
"createSearchClient": "function",
++ "fabricOf": "function",
"queryOf": "function"
},
"openvibe-sdk/service": {
ddiff --git a/esm/search.mjs b/esm/search.mjs
iindex 98a08f6..0b1dbb5 100644
---- a/esm/search.mjs
++++ b/esm/search.mjs
@@@ -2,6 +2,6 @@
import cjs from '../src/search.js';
export const {
-- createSearchClient, queryOf,
++ createSearchClient, queryOf, fabricOf,
} = cjs;
export default cjs;
ddiff --git a/package-lock.json b/package-lock.json
iindex ce6b104..f1408e9 100644
---- a/package-lock.json
++++ b/package-lock.json
@@@ -1,12 +1,12 @@
{
"name": "openvibe-sdk",
-- "version": "0.69.0",
++ "version": "0.70.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "openvibe-sdk",
-- "version": "0.69.0",
++ "version": "0.70.0",
"license": "MIT",
"bin": {
"openvibe-download": "bin/openvibe-download.js"
@@@ -14,7 +14,7 @@
"devDependencies": {
"@electric-sql/pglite": "^0.5.8",
"iovalkey": "^0.4.0",
-- "openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.222.0",
++ "openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.225.0",
"pg": "^8.23.0"
},
"engines": {
@@@ -198,9 +198,9 @@
"license": "MIT"
},
"node_modules/openvibe-contracts": {
-- "version": "0.222.0",
-- "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.222.0",
-- "integrity": "sha512-wdUQCilq9glRMwfxEswbIj3l0QQqKDXZAi2+CR5Mlh34rZjI1Q+7GlAoR0UtNwZAgtLwXhPxFyJ/aPk8lcDG1Q==",
++ "version": "0.225.0",
++ "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.225.0",
++ "integrity": "sha512-msLaRYa2Byyabnf/+L3aRPwkx8MI3zWbofFhwupq+RyBCdgbA4gLlkPsJu9nK/1UTCWdNdSTfWXW5pZY1/1zbQ==",
"dev": true,
"license": "AGPL-3.0-only",
"dependencies": {
ddiff --git a/package.json b/package.json
iindex 0dedee6..30b0cf8 100644
---- a/package.json
++++ b/package.json
@@@ -1,6 +1,6 @@
{
"name": "openvibe-sdk",
-- "version": "0.69.0",
++ "version": "0.70.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",
@@@ -444,7 +444,7 @@
"devDependencies": {
"@electric-sql/pglite": "^0.5.8",
"iovalkey": "^0.4.0",
-- "openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.222.0",
++ "openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.225.0",
"pg": "^8.23.0"
},
"peerDependencies": {
ddiff --git a/src/core/index.js b/src/core/index.js
iindex 4bba567..67b7e40 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.69.0';
++const SDK_VERSION = '0.70.0';
module.exports = {
createClient,
ddiff --git a/src/search.js b/src/search.js
iindex 0d5ed83..a914546 100644
---- a/src/search.js
++++ b/src/search.js
@@@ -8,6 +8,15 @@
* const { suggestions } = await search.suggest('japan');
* const doc = await search.document('live', 'channel', '327'); // null when missing or not yours to see
*
++ * The Search Fabric (Contracts 0.225.0, search.fabric.query; also the MCP tool openvibe.search): one query over
++ * several scopes, routed the cheapest way that answers.
++ * const r = await search.fabric('surf maps', { scopes: ['network', 'web'], freshness: 'month', depth: 'standard' });
++ * // r: { results (each with scope, kind document|page, url, provider for the web), groups, citations,
++ * // route: { explain, cost_usd }, next_cursor } — query(text, { scopes }) is the same call
++ * const { providers } = await search.providers(); // the web ladder's offers (price, availability, today's use)
++ * Anonymous callers get the index, the open index and cached web answers; a person or a service also reaches the
++ * paid providers within OpenVibe's daily caps; `mine` needs a person (actingSubject for a service).
++ *
* Who sees what is decided by Search for every hit: anonymous callers get public, published, indexable
* documents only; a signed-in person (Bearer user JWT, or the ov_token cookie with credentials) also
* gets restricted documents whose ACL names them; a first-party service with search.query.delegate may
@@@ -20,6 +29,17 @@ const { isOpenVibeError } = require('./core/errors');
const { isActingSubjectId } = require('./core/ids');
const enc = encodeURIComponent;
++const FABRIC_KEYS = ['freshness', 'depth', 'limit', 'cursor', 'owner', 'type', 'lang', 'site'];
++
++/** The query string of GET /api/v1/query (search.fabric-request@1, GET form: scopes comma-separated). */
++function fabricOf(text, o = {}) {
++ const q = { q: String(text == null ? '' : text) };
++ const scopes = Array.isArray(o.scopes) ? o.scopes : o.scopes ? String(o.scopes).split(',') : ['network'];
++ q.scopes = scopes.map((x) => String(x).trim()).filter(Boolean).join(',');
++ for (const k of FABRIC_KEYS) if (o[k] !== undefined && o[k] !== null && o[k] !== '') q[k] = o[k];
++ if (o.answer) q.answer = 'true';
++ return q;
++}
const FACET_KEY = /^[a-z][a-z0-9_]{0,39}$/;
function queryOf(text, o = {}) {
@@@ -60,9 +80,15 @@ function createSearchClient(client, defaults = {}) {
}
const orNull = (p) => p.catch((err) => { if (isOpenVibeError(err) && err.status === 404) return null; throw err; });
++ /** The Search Fabric: GET, so the core client may retry it safely. */
++ const fabric = (text, o = {}) => call({ path: pathWith('/api/v1/query', fabricOf(text, o)) }, o);
return {
-- /** { results, next_cursor, facets? } — one page. */
-- query: (text, o = {}) => call({ path: pathWith('/api/v1/search', queryOf(text, o)) }, o),
++ /** { results, next_cursor, facets? } — one page. With `scopes`, the Search Fabric (fabric()). */
++ query: (text, o = {}) => (o.scopes ? fabric(text, o) : call({ path: pathWith('/api/v1/search', queryOf(text, o)) }, o)),
++ /** search.fabric-result@1 — one query over network, mine, web and the vertical scopes. */
++ fabric,
++ /** { providers: search.provider-offer@1[] } — the web ladder's providers. */
++ providers: (o = {}) => call({ path: '/api/v1/query/providers' }, o),
/** Every result, page after page (cursor), until Search has no more or `max` is reached. */
async *iterate(text, o = {}) {
let cursor = o.cursor || null;
@@@ -81,4 +107,4 @@ function createSearchClient(client, defaults = {}) {
};
}
--module.exports = { createSearchClient, queryOf };
++module.exports = { createSearchClient, queryOf, fabricOf };
ddiff --git a/test/search.test.js b/test/search.test.js
iindex 219df47..59185b8 100644
---- a/test/search.test.js
++++ b/test/search.test.js
@@@ -3,7 +3,7 @@
const assert = require('node:assert/strict');
const { stubServer, send, run } = require('./helpers');
const { createClient } = require('../src/core');
--const { createSearchClient, queryOf } = require('../src/search');
++const { createSearchClient, queryOf, fabricOf } = require('../src/search');
const USR = 'usr_01JAB2C3D4E5F6G7H8J9K0MNPQ';
@@@ -15,6 +15,8 @@ async function search() {
if (!cursor) return send(res, 200, { results: [{ owner: 'live', type: 'vod', id: '1' }, { owner: 'live', type: 'vod', id: '2' }], next_cursor: 'c2' });
return send(res, 200, { results: [{ owner: 'live', type: 'vod', id: '3' }], next_cursor: null });
}
++ if (u.pathname === '/api/v1/query') return send(res, 200, { results: [{ scope: 'web', kind: 'page', title: 'A', url: 'https://example.org/a', provider: 'wikipedia' }], groups: { web: 1 }, answer: null, citations: [], route: { explain: [{ scope: 'web', step: 'wikipedia', ok: true, count: 1 }], cost_usd: 0 }, next_cursor: null });
++ if (u.pathname === '/api/v1/query/providers') return send(res, 200, { providers: [{ provider: 'deepseek', scopes: ['web'], price_usd_per_call: 0.00075, available: true, checked_at: '2026-10-28T12:00:00Z' }] });
if (u.pathname === '/api/v1/suggest') return send(res, 200, { suggestions: [{ owner: 'live', type: 'channel', id: '327', title: 'JapaneseOldGuy' }] });
if (u.pathname.startsWith('/api/v1/documents/live/channel/404')) return send(res, 404, { type: 'about:blank', code: 'search.not_found', status: 404 });
if (u.pathname.startsWith('/api/v1/documents/')) return send(res, 200, { owner: 'live', type: 'channel', id: '327' });
@@@ -23,6 +25,26 @@ async function search() {
}
run([
++ ['fabric: scopes go to GET /api/v1/query; query() with scopes is the same call; providers', async () => {
++ const srv = await search();
++ const s = createSearchClient(createClient({ baseUrls: { search: srv.url } }));
++ const r = await s.fabric('surf maps', { scopes: ['network', 'web'], freshness: 'month', depth: 'deep', site: 'example.org', limit: 5, answer: true });
++ assert.equal(r.results[0].provider, 'wikipedia');
++ assert.equal(r.route.cost_usd, 0);
++ const u = new URL(srv.requests[0].url, 'http://x');
++ assert.equal(srv.requests[0].method, 'GET', 'a read: the client may retry it');
++ assert.deepEqual([u.pathname, u.searchParams.get('q'), u.searchParams.get('scopes'), u.searchParams.get('freshness'), u.searchParams.get('depth'), u.searchParams.get('site'), u.searchParams.get('limit'), u.searchParams.get('answer')],
++ ['/api/v1/query', 'surf maps', 'network,web', 'month', 'deep', 'example.org', '5', 'true']);
++ await s.query('x', { scopes: 'web' });
++ assert.equal(new URL(srv.requests[1].url, 'http://x').pathname, '/api/v1/query', 'query() with scopes is the fabric');
++ await s.query('x', { owner: 'live' });
++ assert.equal(new URL(srv.requests[2].url, 'http://x').pathname, '/api/v1/search', 'without scopes, the index search as before');
++ assert.equal(new URL(srv.requests[3] ? srv.requests[3].url : 'http://x/none', 'http://x').pathname, '/none');
++ const p = await s.providers();
++ assert.equal(p.providers[0].provider, 'deepseek');
++ assert.deepEqual(fabricOf('q'), { q: 'q', scopes: 'network' }, 'network by default');
++ await srv.close();
++ }],
['query sends owner, type, facet filters and facet keys', async () => {
const srv = await search();
const s = createSearchClient(createClient({ baseUrls: { search: srv.url } }));
ddiff --git a/types/search.d.ts b/types/search.d.ts
iindex 7de8390..d7a125d 100644
---- a/types/search.d.ts
++++ b/types/search.d.ts
@@@ -21,11 +21,53 @@ export interface SearchOptions {
signal?: AbortSignal;
}
export interface SearchPage { results: SearchDocument[]; next_cursor: string | null; facets?: Record<string, Array<{ value: string; count: number }>>; }
++export type FabricScope = 'network' | 'mine' | 'web' | 'news' | 'images' | 'video' | 'products' | 'people' | 'places' | 'code';
++export interface FabricOptions {
++ scopes?: FabricScope[] | string;
++ freshness?: 'any' | 'day' | 'week' | 'month' | 'year';
++ depth?: 'quick' | 'standard' | 'deep';
++ answer?: boolean;
++ limit?: number; cursor?: string | null;
++ owner?: string; type?: string; lang?: string;
++ /** web: results from this host only. */
++ site?: string;
++ actingSubject?: string;
++ signal?: AbortSignal;
++}
++export interface FabricResult {
++ scope: FabricScope; kind: 'document' | 'page'; title: string; url: string;
++ snippet?: string | null; site?: string | null; image?: string | null;
++ published_at?: string | null; retrieved_at?: string | null;
++ /** page: who found it (open_index, deepseek, wikipedia, …). */
++ provider?: string | null;
++ owner?: string | null; type?: string | null; id?: string | null; score?: number | null;
++}
++export interface FabricExplainStep { scope: FabricScope; step: string; ok: boolean; count?: number; ms?: number; cached?: boolean; cost_usd?: number; skipped?: string | null; }
++/** search.fabric-result@1 */
++export interface FabricAnswer {
++ results: FabricResult[];
++ groups: Partial<Record<FabricScope, number>>;
++ answer?: { text: string; citations: number[]; label: 'Written by AI from these sources' } | null;
++ citations?: Array<{ n: number; url: string; title: string; provider?: string | null; retrieved_at?: string | null }>;
++ route: { explain: FabricExplainStep[]; cost_usd: number };
++ next_cursor: string | null;
++}
++/** search.provider-offer@1 */
++export interface ProviderOffer {
++ provider: string; name?: string; scopes: FabricScope[]; price_usd_per_call: number; independent_index?: boolean;
++ available: boolean; reason?: string | null; daily_cap?: number | null; used_today?: number | null;
++ latency_ms_p50?: number | null; answered_rate?: number | null; terms_url?: string | null; checked_at: string;
++}
export interface SearchClient {
query(text: string, opts?: SearchOptions): Promise<SearchPage>;
++ /** With scopes: the Search Fabric. */
++ query(text: string, opts: FabricOptions & { scopes: FabricScope[] | string }): Promise<FabricAnswer>;
++ fabric(text: string, opts?: FabricOptions): Promise<FabricAnswer>;
++ providers(opts?: Pick<FabricOptions, 'signal'>): Promise<{ providers: ProviderOffer[] }>;
iterate(text: string, opts?: SearchOptions & { max?: number }): AsyncGenerator<SearchDocument, void, unknown>;
suggest(text: string, opts?: Pick<SearchOptions, 'owner' | 'type' | 'limit' | 'actingSubject' | 'signal'>): Promise<{ suggestions: Array<{ owner: string; type: string; id: string; title: string; canonical_url?: string }> }>;
document(owner: string, type: string, id: string, opts?: Pick<SearchOptions, 'actingSubject' | 'signal'>): Promise<SearchDocument | null>;
}
export function createSearchClient(client: OpenVibeClient, defaults?: { baseUrl?: string; actingSubject?: string }): SearchClient;
export function queryOf(text: string, opts?: SearchOptions): Record<string, string | string[] | number>;
++export function fabricOf(text: string, opts?: FabricOptions): Record<string, string | number>;