Web pack: Ask in web pages and React apps¶
The repository's web-pack/ directory (versioned with the module; its README names the module versions it matches)
puts the Ask panel into any web page or React app: artekis-ask.js, one framework-free Web Component
(<artekis-ask endpoint="…" collection="…">; float-below="640" floats the button at the bottom-right on narrow
screens), a React wrapper (react/ArtekisAsk.jsx, and a build-free .js), and a
reference WebDev adapter (adapters/webdev/artekisAsk, a project library module). The component speaks the shapes of
POST /data/artekis/ask and GET /data/artekis/run?id= and shows the answer, its citations and its "Not read" line as
the Ask dock does. From a browser, put it behind a server-side adapter: the adapter calls system.artekis.ask and
system.artekis.getRun, keeps any API token off the browser, serves only Ask runs of the collections it names, and
asks as the project's script caller, so everyone reaching it shares that asker's caps (questionsPerHour,
usdPerDay in the Ask playbook's params, plus the provider's limits.usdPerDay): those caps are the spend guard,
and the WebDev resource must not be open to the internet.