@akropolys/kiku 2.2.24 → 2.2.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/EMBED.md CHANGED
@@ -1,44 +1,44 @@
1
- # Plain HTML embed
2
-
3
- Build with `pnpm --filter @akropolys/kiku build`. Host `dist/kiku.js`, `dist/styles.css`, and the entire
4
- `dist/embed` directory together, preserving their relative paths. Serve JavaScript
5
- with the correct MIME type and allow CORS when hosting assets on another origin.
6
-
7
- ```html
8
- <script src="/kiku/kiku.js" data-site-id="YOUR_SITE_ID"
9
- data-api-token="YOUR_PUBLIC_BROWSER_TOKEN" defer></script>
10
- ```
11
-
12
- Use the same public browser token as your existing frontend integration. Never
13
- put secret keys or signing keys in HTML. The embed uses the same domain and
14
- authentication checks as the React integration. React is bundled privately;
15
- the host website does not install it. One widget is supported per page.
16
-
17
- For configuration in JavaScript, omit the data attributes and call this after
18
- the script loads:
19
-
20
- ```js
21
- await Kiku.mount({
22
- siteId: 'YOUR_SITE_ID',
23
- apiToken: 'YOUR_PUBLIC_BROWSER_TOKEN',
24
- button: { label: 'Ask us', enableVoice: true },
25
- });
26
- await Kiku.open();
27
- await Kiku.ingest({
28
- id: 'example', title: 'Example', url: location.href,
29
- fields: { description: 'Your page data' },
30
- });
31
- ```
32
-
33
- `Kiku.ingest()` accepts one entity, an array, or signed ingestion records and
34
- returns the API response. Supply data explicitly; the embed does not guess a
35
- website's schema. Existing server ingestion works unchanged.
36
-
37
- After login, call `Kiku.updateIdentity({ shopperId, userProof })` with a proof
38
- issued by your server. On logout pass `{}`. `Kiku.destroy()` removes the widget
39
- and cleans up its client; call `mount()` again to restart. Automatic mounting
40
- exposes `Kiku.ready`. Repeated script tags or mount calls reuse the same widget.
41
-
42
- For a restrictive CSP, permit the script origin, existing API/voice endpoints,
43
- and the styles/fonts already needed by Kiku. Voice still requires HTTPS and
44
- microphone permission. No production embed URL has been published yet.
1
+ # Plain HTML embed
2
+
3
+ Build with `pnpm --filter @akropolys/kiku build`. Host `dist/kiku.js`, `dist/styles.css`, and the entire
4
+ `dist/embed` directory together, preserving their relative paths. Serve JavaScript
5
+ with the correct MIME type and allow CORS when hosting assets on another origin.
6
+
7
+ ```html
8
+ <script src="/kiku/kiku.js" data-site-id="YOUR_SITE_ID"
9
+ data-api-token="YOUR_PUBLIC_BROWSER_TOKEN" defer></script>
10
+ ```
11
+
12
+ Use the same public browser token as your existing frontend integration. Never
13
+ put secret keys or signing keys in HTML. The embed uses the same domain and
14
+ authentication checks as the React integration. React is bundled privately;
15
+ the host website does not install it. One widget is supported per page.
16
+
17
+ For configuration in JavaScript, omit the data attributes and call this after
18
+ the script loads:
19
+
20
+ ```js
21
+ await Kiku.mount({
22
+ siteId: 'YOUR_SITE_ID',
23
+ apiToken: 'YOUR_PUBLIC_BROWSER_TOKEN',
24
+ button: { label: 'Ask us', enableVoice: true },
25
+ });
26
+ await Kiku.open();
27
+ await Kiku.ingest({
28
+ id: 'example', title: 'Example',
29
+ fields: { description: 'Your page data', url: location.href },
30
+ });
31
+ ```
32
+
33
+ `Kiku.ingest()` accepts one entity, an array, or signed ingestion records and
34
+ returns the API response. Supply data explicitly; the embed does not guess a
35
+ website's schema. Every catalogue record requires its source record's stable top-level `id`. `fields.url` is optional but recommended when a webpage is available; Kiku can show and save records without one. A supplied URL is kept in saved history. URLs, names and signatures do not replace IDs. Existing server records must also include an ID.
36
+
37
+ After login, call `Kiku.updateIdentity({ shopperId, userProof })` with a proof
38
+ issued by your server. On logout pass `{}`. `Kiku.destroy()` removes the widget
39
+ and cleans up its client; call `mount()` again to restart. Automatic mounting
40
+ exposes `Kiku.ready`. Repeated script tags or mount calls reuse the same widget.
41
+
42
+ For a restrictive CSP, permit the script origin, existing API/voice endpoints,
43
+ and the styles/fonts already needed by Kiku. Voice still requires HTTPS and
44
+ microphone permission. No production embed URL has been published yet.
package/README.md CHANGED
@@ -1,68 +1,78 @@
1
- # @akropolys/kiku
2
-
3
- Pre-built, blindly agnostic multi-modal conversational AI widget with duplex Live Voice, Computer Vision, and real-time comparative tables for any website or transactional platform.
4
-
5
- [![npm](https://img.shields.io/npm/v/@akropolys/kiku?color=orange)](https://www.npmjs.com/package/@akropolys/kiku) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![TypeScript](https://img.shields.io/badge/types-included-blue)](https://www.typescriptlang.org/)
6
-
7
- ---
8
-
9
- ## Install
10
-
11
- ```bash
12
- npm install @akropolys/kiku @akropolys/sdk
13
- # or
14
- pnpm add @akropolys/kiku @akropolys/sdk
15
- ```
16
-
17
- ---
18
-
19
- ## Usage (React / Next.js)
20
-
21
- ```tsx
22
- import { AkropolysProvider } from '@akropolys/sdk';
23
- import { KikuButton } from '@akropolys/kiku';
24
- import '@akropolys/kiku/styles.css'; // required: the chat window copies its rules from this sheet (serve it same-origin, or with crossorigin="anonymous")
25
-
26
- export default function App() {
27
- return (
28
- <AkropolysProvider
29
- siteId={process.env.NEXT_PUBLIC_AKROPOLYS_SITE_ID!}
30
- apiUrl={process.env.NEXT_PUBLIC_AKROPOLYS_API_URL!}
31
- apiToken={process.env.NEXT_PUBLIC_AKROPOLYS_API_KEY!}
32
- >
33
- <KikuButton
34
- label="Ask me anything"
35
- enableVoice={true}
36
- enableVision={true}
37
- theme={{
38
- borderRadius: "24px",
39
- }}
40
- />
41
- </AkropolysProvider>
42
- );
43
- }
44
- ```
45
-
46
- > **Next.js Note**: If running an experimental Next.js 15/16 canary with Tailwind CSS v4 on Windows, run `next dev --webpack` if Turbopack experiences resolver latency on Windows ([tracked upstream](https://github.com/vercel/next.js/issues)).
47
-
48
- ---
49
-
50
- ## Components
51
-
52
- | Component | Description |
53
- |---|---|
54
- | `<KikuButton />` | Launcher pill that opens the full-screen chat, with live voice and vision. |
55
- | `<SearchBar />` | Inline catalogue search with streamed results. |
56
- | `<ScoutRail />` | Dock for the shopper's scouts: send one out, check on it, buy time. |
57
- | `<ScoutCharacter />` | A single animated scout avatar. |
58
-
59
-
60
- ---
61
-
62
- ## License
63
-
64
- MIT © [Akropolys](https://akropolys.cloud)
65
-
66
- ### Plain HTML and other frameworks
67
-
68
- Use the standalone script embed without installing React on your website. See [EMBED.md](./EMBED.md) for setup, ingestion, and identity updates.
1
+ # @akropolys/kiku
2
+
3
+ Pre-built, blindly agnostic multi-modal conversational AI widget with duplex Live Voice, Computer Vision, and real-time comparative tables for any website or transactional platform.
4
+
5
+ [![npm](https://img.shields.io/npm/v/@akropolys/kiku?color=orange)](https://www.npmjs.com/package/@akropolys/kiku) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![TypeScript](https://img.shields.io/badge/types-included-blue)](https://www.typescriptlang.org/)
6
+
7
+ ---
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ npm install @akropolys/kiku @akropolys/sdk
13
+ # or
14
+ pnpm add @akropolys/kiku @akropolys/sdk
15
+ ```
16
+
17
+ ---
18
+
19
+ ## Usage (React / Next.js)
20
+
21
+ ```tsx
22
+ import { AkropolysProvider } from '@akropolys/sdk';
23
+ import { KikuButton } from '@akropolys/kiku';
24
+ import '@akropolys/kiku/styles.css'; // required: the chat window copies its rules from this sheet (serve it same-origin, or with crossorigin="anonymous")
25
+
26
+ export default function App() {
27
+ return (
28
+ <AkropolysProvider
29
+ siteId={process.env.NEXT_PUBLIC_AKROPOLYS_SITE_ID!}
30
+ apiUrl={process.env.NEXT_PUBLIC_AKROPOLYS_API_URL!}
31
+ apiToken={process.env.NEXT_PUBLIC_AKROPOLYS_API_KEY!}
32
+ >
33
+ <KikuButton
34
+ label="Ask me anything"
35
+ enableVoice={true}
36
+ enableVision={true}
37
+ theme={{
38
+ borderRadius: "24px",
39
+ }}
40
+ />
41
+ </AkropolysProvider>
42
+ );
43
+ }
44
+ ```
45
+
46
+ > **Next.js Note**: If running an experimental Next.js 15/16 canary with Tailwind CSS v4 on Windows, run `next dev --webpack` if Turbopack experiences resolver latency on Windows ([tracked upstream](https://github.com/vercel/next.js/issues)).
47
+
48
+ ---
49
+
50
+ ## Records and saved history
51
+
52
+ Ingest each catalogue record with a stable top-level `id`. Put its optional, recommended webpage link in `fields.url`. Kiku can show and save ID-only records and retains a supplied link in saved history. See the [SDK ingestion guide](../sdk/README.md#batch-ingestion-on-your-server) for examples.
53
+
54
+ ## Site actions
55
+
56
+ Configure permitted actions and their request fields in Shell. Kiku collects the required values and explains the result returned by your backend. Cart updates, bookings, and other operations run through those endpoints; the widget does not maintain a separate cart or dispatch cart reducers.
57
+
58
+ Remove the former action callbacks and browser action listeners when upgrading. See the [SDK action guide](../sdk/README.md#site-actions) for migration details.
59
+
60
+ ## Components
61
+
62
+ | Component | Description |
63
+ |---|---|
64
+ | `<KikuButton />` | Launcher pill that opens the full-screen chat, with live voice and vision. |
65
+ | `<SearchBar />` | Inline catalogue search with streamed results. |
66
+ | `<ScoutRail />` | Dock for the shopper's scouts: send one out, check on it, buy time. |
67
+ | `<ScoutCharacter />` | A single animated scout avatar. |
68
+
69
+
70
+ ---
71
+
72
+ ## License
73
+
74
+ MIT © [Akropolys](https://akropolys.cloud)
75
+
76
+ ### Plain HTML and other frameworks
77
+
78
+ Use the standalone script embed without installing React on your website. See [EMBED.md](./EMBED.md) for setup, ingestion, and identity updates.