Reference
One page for each function, component and type you use to put a recommendation block on a page. If you're new to rudra-js, read how it works first.
@rudra-js/core
createComponentGenerator: Create the generator that turns each page view into a recommendation block.parseTrackingInput: Check a page view and fill in the defaults you left out.productSchema: The shape of each product you pass as a candidate.bundleSchema: The shape of a set of products you sell together at one price.createMemorySpecCache: The in-memory cache the generator uses unless you pass another.createNullSpecCache: A cache that keeps nothing.SpecCache: The interface for keeping the cache in a shared store such as Redis.createFixedSpecProvider: A provider that answers every request with a spec you wrote yourself.ComponentProvider: The interface a model adapter implements, so you can bring your own model.
@rudra-js/react
RudraComponent: Render the block on the server or in the browser.extendRegistry: Swap in your own renderer for one kind of block.defaultFormatPrice: Format a product's price the way the block does.
@rudra-js/anthropic
createAnthropicProvider: Connect the generator to Claude through the Anthropic API.
@rudra-js/attested
verify: Check one piece of copy against the facts you supply.verifyFields: Check every field on a card in one call.
@rudra-js/a2ui
createRudraRecommendationsComponent: Add the block to the components an A2UI agent can place.parseRecommendationRequest: Check the request the A2UI component sends to your endpoint.fitRecommendationRequest: Drop a hinted product or category that none of your candidates has.rudraRecommendationsApi: The description of the block you add to the catalog your agent is prompted with.RUDRA_RECOMMENDATIONS_INSTRUCTIONS: The instructions that tell your agent how to use the block.