Capability first · transport second

StaticDocumentCatalog.js

Loads a positive static document inventory with complete cache, search, hydration, and context content.

SDK 0.5.18Runtime 0.8.12Protocol arcane/1
On this page

Overview

Loads a positive static document inventory with complete cache, search, hydration, and context content.

  • Artifact
    StaticDocumentCatalog.js · esm
  • Classification
    public first party
  • Availability
    Browser / native WebView / server with fetch
  • Normalization
    Complete mutable catalog, hydration, search, and context content; malformed catalog/cache data and transport failures remain visible.

Import and lifecycle

JavaScript
import * as module from '/arcane/modules/StaticDocumentCatalog.js';

Construction normalizes and indexes the manifest without freezing caller-visible records. Search/list/get are in-memory. hydrate() uses complete memory/cache content or one fetch with UTF-8 decoding and best-effort cache write. buildContext() may hydrate every matching candidate and returns complete context.

Application-facing behavior: default catalog, schema constant, catalog normalizer/cache-key; list/get/search/hydrate/context APIs.

Protocol and host implementation

HTTP(S), optional cache This detail does not widen the application-facing API or grant authority.

Exports, signatures, parameters, and results

BindingFormDeclaration or signatureParameter syntax
defaultdefault · classclass StaticDocumentCatalog
CATALOG_SCHEMA_VERSIONvariable · valuevariable CATALOG_SCHEMA_VERSION
normalizeStaticDocumentCatalogfunctionfunction normalizeStaticDocumentCatalog(input,options={})input,options={}
staticDocumentCacheKeyfunctionfunction staticDocumentCacheKey(version,id)version,id
MemberKindExact public declarationParameter syntax
StaticDocumentCatalog.constructorconstructorconstructor(manifest,options={})manifest,options={}
StaticDocumentCatalog.versiongetget version()
StaticDocumentCatalog.sizegetget size()
StaticDocumentCatalog.timeoutsgetget timeouts()
StaticDocumentCatalog.listmethodlist()
StaticDocumentCatalog.getmethodget(id)id
StaticDocumentCatalog.searchmethodsearch(query,options={})query,options={}
StaticDocumentCatalog.hydrateasync methodasync hydrate(id,options={})id,options={}
StaticDocumentCatalog.buildContextasync methodasync buildContext(query,options={})query,options={}

Parameter meanings and results

CATALOG_SCHEMA_VERSION is 1. new Catalog({version,documents},options); getters version/size/limits; list(), get(id), search(query,{kinds?,tags?}); hydrate(id,{bypassCache?,signal?}) resolves mutable {record,text,url,source}; buildContext(query,{bodySearch?,signal?}) resolves complete mutable {characters,documents,failures,text}; normalizeStaticDocumentCatalog(); staticDocumentCacheKey(version,id).

Events, side effects, and errors

Source-literal CustomEvent dispatches

No source-literal CustomEvent dispatch is part of this artifact.

Lifecycle and event flow

This artifact has no additional documented lifecycle event flow.

Direct coded failures

This artifact directly assigns no stable coded failure.

Exported Error subclasses

This artifact exports no Error subclass.

Documented failure behavior

  • STATIC_DOCUMENT_INVALID_CATALOG
  • STATIC_DOCUMENT_INVALID_OPTIONS
  • STATIC_DOCUMENT_INVALID_LIMIT
  • STATIC_DOCUMENT_CASE_COLLISION
  • STATIC_DOCUMENT_INVALID_BASE_URL
  • STATIC_DOCUMENT_INVALID_ID
  • STATIC_DOCUMENT_INVALID_QUERY
  • STATIC_DOCUMENT_NOT_FOUND
  • STATIC_DOCUMENT_BASE_URL_REQUIRED
  • STATIC_DOCUMENT_FETCH_UNAVAILABLE
  • STATIC_DOCUMENT_TIMEOUT
  • STATIC_DOCUMENT_ABORTED
  • STATIC_DOCUMENT_HTTP_ERROR
  • STATIC_DOCUMENT_INVALID_RESPONSE
  • STATIC_DOCUMENT_UNSAFE_PATH
  • STATIC_DOCUMENT_UNSAFE_REDIRECT
  • STATIC_DOCUMENT_INVALID_TEXT
  • STATIC_DOCUMENT_CACHE_INVALID (cache diagnostic)
  • STATIC_DOCUMENT_ERROR (complete buildContext failure detail)

Availability and capabilities

Browser / native WebView / server with fetch. Complete mutable catalog, hydration, search, and context content; malformed catalog/cache data and transport failures remain visible.

None; fetch and cache adapters own their Web/API authority.

Contract example

JavaScript
import StaticDocumentCatalog from '/arcane/modules/StaticDocumentCatalog.js';

const catalog = new StaticDocumentCatalog({
    version:'1',
    documents:[{
        id:'welcome',
        path:'welcome.md',
        kind:'guide',
        title:'Welcome'
    }]
});
console.log(catalog.search('welcome')[0]);

No direct Core call is claimed for this artifact. Any injected provider or consuming module retains its own documented authority.