@akropolys/kiku 2.2.27 → 2.2.29

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,11 +1,10 @@
1
1
  # Plain HTML embed
2
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.
3
+ Add the published CDN script before your closing `</body>` tag. The loader fetches
4
+ its stylesheet and embed module automatically.
6
5
 
7
6
  ```html
8
- <script src="/kiku/kiku.js" data-site-id="YOUR_SITE_ID"
7
+ <script src="https://cdn.akropolys.cloud/kiku/2.2.29/kiku.js" data-site-id="YOUR_SITE_ID"
9
8
  data-api-token="YOUR_PUBLIC_BROWSER_TOKEN" defer></script>
10
9
  ```
11
10
 
@@ -41,4 +40,18 @@ exposes `Kiku.ready`. Repeated script tags or mount calls reuse the same widget.
41
40
 
42
41
  For a restrictive CSP, permit the script origin, existing API/voice endpoints,
43
42
  and the styles/fonts already needed by Kiku. Voice still requires HTTPS and
44
- microphone permission. No production embed URL has been published yet.
43
+ microphone permission.
44
+
45
+ ## CDN files and self-hosting
46
+
47
+ - [Loader](https://cdn.akropolys.cloud/kiku/2.2.29/kiku.js)
48
+ - [Stylesheet](https://cdn.akropolys.cloud/kiku/2.2.29/styles.css)
49
+ - [Embed module](https://cdn.akropolys.cloud/kiku/2.2.29/embed/embed.js)
50
+
51
+ To self-host, install `@akropolys/kiku@2.2.29` and copy `dist/kiku.js`,
52
+ `dist/styles.css`, and the entire `dist/embed` directory to your server. Preserve
53
+ their relative paths and use your hosted loader URL in the script tag. Serve
54
+ JavaScript with the correct MIME type and allow CORS across origins.
55
+
56
+ When building from this repository, run `pnpm --filter @akropolys/kiku build`
57
+ to generate those files.
package/README.md CHANGED
@@ -1,78 +1,105 @@
1
1
  # @akropolys/kiku
2
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.
3
+ Chat, search, voice, and photo input for your website. Kiku connects visitors to your content and the API actions you configure in Akropolys.
4
4
 
5
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
6
 
7
- ---
8
-
9
7
  ## Install
10
8
 
11
9
  ```bash
12
- npm install @akropolys/kiku @akropolys/sdk
13
- # or
14
- pnpm add @akropolys/kiku @akropolys/sdk
10
+ npm install @akropolys/kiku@2.2.29 @akropolys/sdk@2.0.1
15
11
  ```
16
12
 
17
- ---
13
+ Requires React and React DOM 17 or later. For websites without React, use the [script embed](https://github.com/akropolys/sdk/blob/HEAD/packages/kiku/EMBED.md).
14
+
15
+ ## JavaScript embed
16
+
17
+ Add Kiku to any website with the published CDN script:
18
+
19
+ ```html
20
+ <script
21
+ src="https://cdn.akropolys.cloud/kiku/2.2.29/kiku.js"
22
+ data-site-id="YOUR_SITE_ID"
23
+ data-api-token="YOUR_PUBLIC_BROWSER_TOKEN"
24
+ data-label="Ask Kiku"
25
+ defer
26
+ ></script>
27
+ ```
18
28
 
19
- ## Usage (React / Next.js)
29
+ The script loads its styles and runtime automatically. See the [embed guide](https://github.com/akropolys/sdk/blob/HEAD/packages/kiku/EMBED.md) for configuration, ingestion, and self-hosting.
30
+
31
+ ## React and Next.js
20
32
 
21
33
  ```tsx
34
+ 'use client';
35
+
22
36
  import { AkropolysProvider } from '@akropolys/sdk';
23
37
  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")
38
+ import '@akropolys/kiku/styles.css';
25
39
 
26
- export default function App() {
40
+ export default function WebsiteAssistant() {
27
41
  return (
28
42
  <AkropolysProvider
29
43
  siteId={process.env.NEXT_PUBLIC_AKROPOLYS_SITE_ID!}
30
44
  apiUrl={process.env.NEXT_PUBLIC_AKROPOLYS_API_URL!}
31
- apiToken={process.env.NEXT_PUBLIC_AKROPOLYS_API_KEY!}
45
+ apiToken={process.env.NEXT_PUBLIC_AKROPOLYS_API_TOKEN!}
32
46
  >
33
- <KikuButton
34
- label="Ask me anything"
35
- enableVoice={true}
36
- enableVision={true}
37
- theme={{
38
- borderRadius: "24px",
39
- }}
40
- />
47
+ <KikuButton label="Ask us" enableVoice enableVision />
41
48
  </AkropolysProvider>
42
49
  );
43
50
  }
44
51
  ```
45
52
 
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)).
53
+ Mount the component once in your app or layout. In Next.js App Router, import the stylesheet in your root layout if that is where your project keeps global CSS.
47
54
 
48
- ---
55
+ Use your site's public browser token. Keep private keys and server credentials on your server. Enable the corresponding voice and vision features for your site in Shell.
49
56
 
50
- ## Records and saved history
57
+ ## What visitors can do
51
58
 
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.
59
+ - Ask about your content and compare records in tables.
60
+ - Talk using live voice or include photos in a conversation.
61
+ - Open source records and save items for later.
62
+ - Long-press or right-click a message to access its actions.
63
+ - Use translated controls, right-to-left layouts, and chat themes.
53
64
 
54
- ## Site actions
65
+ ## Components
55
66
 
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.
67
+ | Component | Purpose |
68
+ | --- | --- |
69
+ | `KikuButton` | A launcher that opens the chat window. |
70
+ | `SearchBar` | Inline search with streamed results. |
57
71
 
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.
72
+ Both components use `AkropolysProvider` from `@akropolys/sdk`.
59
73
 
60
- ## Components
74
+ ## Customize the launcher
61
75
 
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. |
76
+ ```tsx
77
+ <KikuButton
78
+ label="Ask about this property"
79
+ title="Your assistant"
80
+ placeholder="What would you like to know?"
81
+ chips={['Show available properties', 'Compare my options']}
82
+ theme="dark"
83
+ enableVoice
84
+ enableVision
85
+ />
86
+ ```
68
87
 
88
+ `theme` accepts `light`, `dark`, or an `AkropolysTheme` object from `@akropolys/sdk`. Use `onSelectSource` to handle a visitor selecting a source record.
69
89
 
70
- ---
90
+ ## Your content and actions
71
91
 
72
- ## License
92
+ Give each catalogue record a stable top-level `id`. A webpage link in `fields.url` is optional; Kiku can show and save records without one. See the [SDK ingestion guide](https://github.com/akropolys/sdk/blob/HEAD/packages/sdk/README.md#batch-ingestion-on-your-server).
73
93
 
74
- MIT © [Akropolys](https://akropolys.cloud)
94
+ Configure action endpoints, HTTP methods, and request fields in Shell. Kiku collects the required values and presents the result returned by your backend. Your endpoint validates the request and performs the operation. See the [site actions guide](https://github.com/akropolys/sdk/blob/HEAD/packages/sdk/README.md#site-actions).
75
95
 
76
- ### Plain HTML and other frameworks
96
+ ## Links
77
97
 
78
- Use the standalone script embed without installing React on your website. See [EMBED.md](./EMBED.md) for setup, ingestion, and identity updates.
98
+ - [Akropolys](https://akropolys.cloud)
99
+ - [Source code](https://github.com/akropolys/sdk)
100
+ - [Plain HTML embed guide](https://github.com/akropolys/sdk/blob/HEAD/packages/kiku/EMBED.md)
101
+ - [Headless SDK](https://www.npmjs.com/package/@akropolys/sdk)
102
+
103
+ ## License
104
+
105
+ MIT © [Akropolys](https://akropolys.cloud)