{"_id":"@amband/huduma-chatbot","name":"@amband/huduma-chatbot","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@amband/huduma-chatbot","version":"0.1.0","description":"Self-contained, embeddable Huduma Digital Assistant chatbot — drop-in <script> tag, served via jsDelivr/unpkg.","license":"UNLICENSED","type":"module","main":"huduma-chatbot.js","unpkg":"huduma-chatbot.js","jsdelivr":"huduma-chatbot.js","publishConfig":{"access":"public"},"keywords":["chatbot","digital-assistant","widget","huduma","embed","jsdelivr"],"repository":{"type":"git","url":"git+https://github.com/AMBAND-LTD/how-frontend.git","directory":"packages/chatbot-widget"},"sideEffects":true,"_id":"@amband/huduma-chatbot@0.1.0","bugs":{"url":"https://github.com/AMBAND-LTD/how-frontend/issues"},"homepage":"https://github.com/AMBAND-LTD/how-frontend#readme","_nodeVersion":"22.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-aJigoH7kMTt1H4UPJChLzITbEEAT++kYekH5ZaRnlMNozXNTpeZanOVw7iOiW2OsfWe17pJjXYvR6H6Im0S8Rw==","shasum":"f4460a2f66c3d037f9d6a2aa3cf5db1b803e47f3","tarball":"https://registry.npmjs.org/@amband/huduma-chatbot/-/huduma-chatbot-0.1.0.tgz","fileCount":3,"unpackedSize":1147509,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDOPIwldTesq7tLjTjMn1pW3k3zlXd7ZK6OPdD1EeYMsgIgPThFqwvY3qVs1gznyxlTU0T6eyZU4W2d/VO0GvDKxR8="}]},"_npmUser":{"name":"ikky001","email":"trevor@amband.co.ke"},"directories":{},"maintainers":[{"name":"ikky001","email":"trevor@amband.co.ke"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/huduma-chatbot_0.1.0_1781086425875_0.8691398895974571"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-10T10:13:45.671Z","0.1.0":"2026-06-10T10:13:46.049Z","modified":"2026-06-10T10:13:46.255Z"},"maintainers":[{"name":"ikky001","email":"trevor@amband.co.ke"}],"description":"Self-contained, embeddable Huduma Digital Assistant chatbot — drop-in <script> tag, served via jsDelivr/unpkg.","homepage":"https://github.com/AMBAND-LTD/how-frontend#readme","keywords":["chatbot","digital-assistant","widget","huduma","embed","jsdelivr"],"repository":{"type":"git","url":"git+https://github.com/AMBAND-LTD/how-frontend.git","directory":"packages/chatbot-widget"},"bugs":{"url":"https://github.com/AMBAND-LTD/how-frontend/issues"},"license":"UNLICENSED","readme":"# @amband/huduma-chatbot\n\nSelf-contained, embeddable **Huduma Digital Assistant** chatbot. A single IIFE bundle that mounts\na floating chat FAB into any page via one `<script>` tag. Renders inside a Shadow DOM, so it never\nleaks styles into the host.\n\n> Chatbot-only build (no accessibility widget — that ships separately as\n> [`@amband/huduma-accessibility`](https://www.npmjs.com/package/@amband/huduma-accessibility)).\n> Built from `src/embed/chatbot-index.tsx` in\n> [how-frontend](https://github.com/AMBAND-LTD/how-frontend) via `pnpm build:chatbot`.\n\n## Use via jsDelivr\n\n```html\n<script>\n  window.HUDUMA_CONFIG = {\n    apiBase: \"https://api.huduma.example.com/v1\", // OpenAI-compatible endpoint (required)\n    locale: \"en\",                                  // \"en\" | \"sw\"\n    theme: \"auto\",                                 // \"auto\" | \"light\" | \"dark\"\n    position: \"bottom-right\",                      // bottom-right | bottom-left | top-right | top-left\n  };\n</script>\n<script\n  src=\"https://cdn.jsdelivr.net/npm/@amband/huduma-chatbot@0.1.0/huduma-chatbot.js\"\n  defer\n></script>\n```\n\n## Manual init / cleanup\n\n```js\nwindow.HudumaChatbot.init({ apiBase: \"https://api.huduma.example.com/v1\" });\nwindow.HudumaChatbot.setTheme(\"dark\");\nwindow.HudumaChatbot.destroy();\n```\n\n## Config\n\n| Key | Type | Default | Description |\n|-----|------|---------|-------------|\n| `apiBase` | `string` | — | OpenAI-compatible API base URL (**required**) |\n| `apiKey` | `string` | `\"\"` | Bearer token (optional) |\n| `model` | `string` | `hermes-agent` | Model id |\n| `locale` | `\"en\" \\| \"sw\"` | `\"en\"` | UI language |\n| `theme` | `\"auto\" \\| \"light\" \\| \"dark\"` | `\"auto\"` | Scoped to the widget's shadow root |\n| `position` | `PositionPreset` | `\"bottom-right\"` | FAB corner |\n| `positionOffset` | `{ bottom?, top?, left?, right? }` (px) | — | Fine-tune the FAB offset (e.g. to stack above another widget) |\n| `persistHistory` | `boolean` | `false` | Persist conversation in `localStorage` (needs a legal basis) |\n\n## CSP\n\n```\nconnect-src https://api.huduma.example.com;\nstyle-src 'self' 'unsafe-inline';\n```\n\n## Publishing a new version\n\n```bash\npnpm build:chatbot:pkg                 # builds + stages the bundle into this package\ncd packages/chatbot-widget\nnpm version patch && npm publish       # scoped public package\n```\n","readmeFilename":"README.md","_rev":"1-d437ef9f87f9dd1033fb2692ff4eeadc"}