SearchFabricRequest search.fabric-request@1

Generated at from openvibe-contracts v0.419.0 and openvibe-sdk v0.161.0.

Version
1.0.0
Owner
search
Visibility
public
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/search/fabric-request.v1.json

search.fabric-request@1: the body of POST /api/v1/query (or the query string of GET /api/v1/query, scopes comma-separated), capability search.fabric.query. One search over several scopes, routed the cheapest way that answers (plan 2026-10-28 §4.5). network: Search's own index, permission-aware exactly as search.query.run; mine: the caller's own private documents (a signed-in person, or a service with X-OV-Subject); web: OpenVibe's open index first, then paid providers in a ladder, each result keeping its provider, date and URL. Providers never receive an account identifier. A scope the caller may not use (mine without a person; web's paid providers for an anonymous caller, who gets cached and open-index results only) is reported in route.explain, never an error. The other scopes are facets of the same indexes and are accepted for forward compatibility; v1 answers them as network results filtered by kind.

Fields

FieldTypeRequiredDescriptionConstraints
qstringyesWhat to find.
  • minLength 1
  • maxLength 200
scopesarray of enumWhere to look; results are grouped by scope. Default: network.
  • minItems 1
  • maxItems 10
  • unique items
  • default ["network"]
  • items: one of "network", "mine", "web", "news", "images", "video", "products", "people", "places", "code"
filtersobjectNarrow the network and mine scopes (never widen what the caller may see).
  • no other fields
filters.ownerstring
  • pattern ^[a-z][a-z0-9_-]{0,31}$
filters.typestring
  • pattern ^[a-z][a-z0-9_-]{0,31}$
filters.langstring
  • pattern ^[a-zA-Z]{2,3}(-[A-Za-z0-9]{2,8})*$
filters.sitestringweb: results from this host only.
  • pattern ^[a-z0-9.-]+$
  • maxLength 253
freshnessenumHow recent results must be, where the source dates them.
  • one of "any", "day", "week", "month", "year"
  • default "any"
depthenumquick: indexes and caches only (no paid provider); standard: the ladder until a step answers; deep: every step, merged.
  • one of "quick", "standard", "deep"
  • default "standard"
answerbooleanAsk for a short cited answer written by AI from the results. Never without citations; labelled AI. A deployment may decline (answer: null, with the reason in route.explain).
  • default false
limitinteger
  • minimum 1
  • maximum 50
  • default 20
cursorstringnext_cursor of the previous page (network and mine only).
  • maxLength 512

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: mine-filtered
{
  "q": "notes",
  "scopes": [
    "mine"
  ],
  "filters": {
    "owner": "community",
    "type": "paste"
  },
  "answer": false,
  "depth": "quick"
}
Valid: minimal
{
  "q": "lofi streams"
}
Valid: network-and-web
{
  "q": "surf_utopia world record",
  "scopes": [
    "network",
    "web"
  ],
  "freshness": "month",
  "depth": "standard",
  "limit": 10
}
Rejected: empty-q
{
  "q": ""
}
Rejected: limit-too-big
{
  "q": "x",
  "limit": 500
}
Rejected: unknown-scope
{
  "q": "x",
  "scopes": [
    "everything"
  ]
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('search.fabric-request@1', value);   // { valid, errors: [{ path, message }] }