@alia.onl/sdk 21.5.1 → 21.5.3
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/CHANGELOG.md +33 -0
- package/README.md +3 -3
- package/package.json +4 -3
- package/src/ask-text.ts +1 -0
- package/src/ask.ts +1 -0
- package/src/components/AliaChatSheet.tsx +0 -2
- package/src/components/thread/AliaThread.tsx +3 -11
- package/src/lib/origins.ts +5 -0
- package/src/text.ts +1 -0
- package/src/voice.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# @alia.onl/sdk
|
|
2
2
|
|
|
3
|
+
## 21.5.3
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **Every entry type-checks on its own.** `@alia.onl/sdk/text`, `/ask`, `/ask/text` and `/voice`
|
|
8
|
+
reach components that use NativeWind's `className`, but only the root entry carried
|
|
9
|
+
`/// <reference types="nativewind/types" />`. Expo apps load NativeWind's types themselves and
|
|
10
|
+
never noticed; a consumer that does not (a Vite app) got 65 `className` errors importing
|
|
11
|
+
`@alia.onl/sdk/text`. Each of those entries now carries the reference.
|
|
12
|
+
- `@alia.onl/sdk/avatar` no longer needs the host to declare Node's `process`: the one
|
|
13
|
+
`process.env.EXPO_PUBLIC_ALIA_API_URL` read declares its own type (Metro still inlines it).
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- `check:entry-types` (in `prepublishOnly` and CI): compiles a consumer of each entry in
|
|
18
|
+
`exports` alone, through a real `node_modules` link, with nothing loaded globally and the
|
|
19
|
+
strictest consumer's options.
|
|
20
|
+
|
|
21
|
+
## 21.5.2
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- Welcome and conversation sheets grow and shrink with their content up to Bloom’s
|
|
26
|
+
available-height limit, instead of filling the entire frame. Bloom owns the Screen
|
|
27
|
+
sizing, scrolling, keyboard clearance and safe areas.
|
|
28
|
+
- The empty thread no longer adds composer clearance a second time. Growing and
|
|
29
|
+
shrinking a draft now changes the sheet height by the composer’s actual change.
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
|
|
33
|
+
- The Bloom peer is `>=15.10.1 <16.0.0`, which provides intrinsic Screen sizing
|
|
34
|
+
inside content-sized sheets and clips decorative chat backgrounds.
|
|
35
|
+
|
|
3
36
|
## 21.5.1
|
|
4
37
|
|
|
5
38
|
### Fixed
|
package/README.md
CHANGED
|
@@ -27,9 +27,9 @@ the default in Expo SDK 53+), because every icon import is a subpath.
|
|
|
27
27
|
|
|
28
28
|
The chat is built from Bloom (`@oxy.so/bloom`, a peer dependency): mount Bloom's
|
|
29
29
|
`BloomProvider` above it, with the one `KeyboardProvider` your app already has.
|
|
30
|
-
The main and conversation sheets
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
The main and conversation sheets use Bloom's default content sizing: they grow and
|
|
31
|
+
shrink with the chat up to the shared viewport limit. Bloom coordinates the Screen
|
|
32
|
+
content, safe areas and keyboard clearance. Hosts should not add window-height calculations or a second
|
|
33
33
|
scroll container to make an embedded chat visible.
|
|
34
34
|
|
|
35
35
|
Alia's avatar is Bloom's 3D character (`AgentAvatar`). It draws through a runtime of
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alia.onl/sdk",
|
|
3
|
-
"version": "21.5.
|
|
3
|
+
"version": "21.5.3",
|
|
4
4
|
"description": "Alia AI chat SDK — the conversation runtime, chat UI, voice calls and dictation for Oxy apps",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"react-native": "src/index.ts",
|
|
@@ -41,8 +41,9 @@
|
|
|
41
41
|
"typecheck": "tsc --noEmit",
|
|
42
42
|
"test": "vitest run",
|
|
43
43
|
"check:entries": "node scripts/check-entry-isolation.mjs",
|
|
44
|
+
"check:entry-types": "node scripts/check-entry-types.mjs",
|
|
44
45
|
"render:avatar-still": "bun scripts/render-avatar-still.ts",
|
|
45
|
-
"prepublishOnly": "bun run typecheck && bun run test && bun run check:entries"
|
|
46
|
+
"prepublishOnly": "bun run typecheck && bun run test && bun run check:entries && bun run check:entry-types"
|
|
46
47
|
},
|
|
47
48
|
"dependencies": {
|
|
48
49
|
"clsx": "^2.1.1",
|
|
@@ -54,7 +55,7 @@
|
|
|
54
55
|
"react": "^19.2.3",
|
|
55
56
|
"react-native": "^0.86.0 || ^0.88.0",
|
|
56
57
|
"@expo/vector-icons": "^15.1.1",
|
|
57
|
-
"@oxy.so/bloom": ">=15.10.
|
|
58
|
+
"@oxy.so/bloom": ">=15.10.1 <16.0.0",
|
|
58
59
|
"@oxy.so/core": ">=3.0.0",
|
|
59
60
|
"@oxy.so/services": ">=12.1.0",
|
|
60
61
|
"@tanstack/react-query": "^5.101",
|
package/src/ask-text.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="nativewind/types" />
|
|
1
2
|
// @alia.onl/sdk/ask/text — `@alia.onl/sdk/ask` without the voice call, and without bundling it
|
|
2
3
|
// The provider and its hook; the sheet loads with the first `ask`, and neither reaches the call's
|
|
3
4
|
// modules. `useAskAgent` is the same hook as `@alia.onl/sdk/ask`'s.
|
package/src/ask.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="nativewind/types" />
|
|
1
2
|
// @alia.onl/sdk/ask — the app's one Alia sheet, without the chat in the entry bundle
|
|
2
3
|
// `AliaAskProvider` and `useAskAgent` alone: the sheet they open is loaded with the first `ask`.
|
|
3
4
|
// An app mounts the provider at its root from here rather than from the root entry, which
|
|
@@ -301,7 +301,6 @@ const AliaChatSheetBody = forwardRef<AliaChatSheetRef, AliaChatSheetProps>(
|
|
|
301
301
|
<AgentAvatarProvider runtimeUrl={characterRuntimeUrl}>
|
|
302
302
|
<BottomSheet
|
|
303
303
|
ref={mainRef}
|
|
304
|
-
sizing="fill"
|
|
305
304
|
detached={detached}
|
|
306
305
|
scrollable={false}
|
|
307
306
|
manualActivation
|
|
@@ -334,7 +333,6 @@ const AliaChatSheetBody = forwardRef<AliaChatSheetRef, AliaChatSheetProps>(
|
|
|
334
333
|
<BottomSheet
|
|
335
334
|
key={conversation.key}
|
|
336
335
|
ref={conversationRef}
|
|
337
|
-
sizing="fill"
|
|
338
336
|
detached={detached}
|
|
339
337
|
scrollable={false}
|
|
340
338
|
manualActivation
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { AgentThinking } from '@oxy.so/bloom/agent-thinking';
|
|
2
|
-
import {
|
|
3
|
-
AiChatThread,
|
|
4
|
-
type AiChatThreadHandle,
|
|
5
|
-
useAiChatChromeInsets,
|
|
6
|
-
} from '@oxy.so/bloom/ai-chat';
|
|
2
|
+
import { AiChatThread, type AiChatThreadHandle } from '@oxy.so/bloom/ai-chat';
|
|
7
3
|
import { ChatDateHeader } from '@oxy.so/bloom/chat-screen';
|
|
8
4
|
import { Divider } from '@oxy.so/bloom/divider';
|
|
9
5
|
import { Loading } from '@oxy.so/bloom/loading';
|
|
@@ -263,16 +259,12 @@ export const AliaThread = memo(function AliaThread({
|
|
|
263
259
|
onScroll,
|
|
264
260
|
});
|
|
265
261
|
|
|
266
|
-
const chromeInsets = useAiChatChromeInsets();
|
|
267
262
|
const nothingToShow =
|
|
268
263
|
rows.length === 0 && !conversationLoading && !isLoading && !loadingHistory && !voiceThinking;
|
|
269
264
|
if (nothingToShow) {
|
|
270
265
|
return (
|
|
271
|
-
//
|
|
272
|
-
<View
|
|
273
|
-
className="flex-1 justify-center px-4"
|
|
274
|
-
style={{ paddingBottom: chromeInsets?.bottom ?? 0 }}
|
|
275
|
-
>
|
|
266
|
+
// Screen reserves the composer; the empty state only owns its alignment.
|
|
267
|
+
<View className="flex-1 justify-center px-4">
|
|
276
268
|
<View className="w-full max-w-[768px] self-center">{empty}</View>
|
|
277
269
|
</View>
|
|
278
270
|
);
|
package/src/lib/origins.ts
CHANGED
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
* origin the SDK uses is an origin it declares.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
// Declared here, not taken from the host's globals: Expo apps get `process` from Expo's types, a
|
|
8
|
+
// Vite app has none unless it installs Node's, and every entry that reaches this file must
|
|
9
|
+
// type-check alone (`check:entry-types`). Type-only; Metro still inlines the static access below.
|
|
10
|
+
declare const process: { readonly env: { readonly EXPO_PUBLIC_ALIA_API_URL?: string } };
|
|
11
|
+
|
|
7
12
|
/** Alia's API: `EXPO_PUBLIC_ALIA_API_URL`, then production. Chat, dictation, speech, voice. */
|
|
8
13
|
export const ALIA_API_URL = process.env.EXPO_PUBLIC_ALIA_API_URL ?? 'https://api.alia.onl';
|
|
9
14
|
|
package/src/text.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="nativewind/types" />
|
|
1
2
|
// @alia.onl/sdk/text — the chat without the voice call, and without bundling it
|
|
2
3
|
// The same `AliaChatSheet`, `AliaChatScreen` and `AliaChatContent` as the root entry, but none of
|
|
3
4
|
// them reaches the call's modules (its socket, protocol and audio engine): a text-only app takes
|
package/src/voice.ts
CHANGED