@gemies/sdk 9.0.0 → 9.1.0

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 CHANGED
@@ -1,5 +1,15 @@
1
1
  # @gemies/sdk
2
2
 
3
+ ## 9.1.0
4
+
5
+ Conversation lists, search results and file/source rows now use Bloom's shared ListItem. Group
6
+ conversation avatars use AvatarGroup's conversation layout, and header actions use Button.Group
7
+ with the same Button component as standalone actions. Existing SDK exports, callbacks and
8
+ conversation behavior remain unchanged.
9
+
10
+ Requires Bloom 22 or later and Services 14.22 or later; earlier Services versions import Bloom
11
+ components removed in version 22.
12
+
3
13
  ## 9.0.0
4
14
 
5
15
  Gemies acts for the person with Oxy's first-party authority (oxy ADR 0066): what the Oxy registry
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gemies/sdk",
3
- "version": "9.0.0",
3
+ "version": "9.1.0",
4
4
  "description": "The Gemies SDK: the conversation runtime, chat UI, voice calls and dictation for Oxy apps that talk to a gemie",
5
5
  "main": "src/index.ts",
6
6
  "react-native": "src/index.ts",
@@ -60,9 +60,9 @@
60
60
  "react": "^19.2.3",
61
61
  "react-native": "^0.86.0 || ^0.88.0",
62
62
  "@expo/vector-icons": "^15.1.1",
63
- "@oxy.so/bloom": ">=21.1.0",
63
+ "@oxy.so/bloom": ">=22.0.0",
64
64
  "@oxy.so/core": ">=7.1.0 <8",
65
- "@oxy.so/services": ">=14.19.1 <15",
65
+ "@oxy.so/services": ">=14.22.0 <15",
66
66
  "@tanstack/react-query": "^5.101",
67
67
  "@react-native-async-storage/async-storage": "^2.2.0",
68
68
  "expo-blur": "^57.0.0 || ^58.0.0",
@@ -1,4 +1,4 @@
1
- import { Item } from '@oxy.so/bloom/item';
1
+ import { ListItem } from '@oxy.so/bloom/list';
2
2
  import { Text } from '@oxy.so/bloom/typography';
3
3
  import { View } from 'react-native';
4
4
  import type { Completion } from '../lib/suggestions';
@@ -23,12 +23,11 @@ export function ComposerSuggestions<T extends GemieSuggestion>({
23
23
  {completions.map(({ suggestion, matchStart, matchEnd }, index) => {
24
24
  const { text } = suggestion;
25
25
  return (
26
- <Item
26
+ <ListItem
27
27
  key={suggestion.id}
28
- density="compact"
29
- highlighted={index === selected}
30
- accessibilityRole="button"
31
- accessibilityLabel={text}
28
+ active={index === selected}
29
+ role="button"
30
+ label={text}
32
31
  onPress={() => onPick(suggestion)}
33
32
  title={
34
33
  <Text numberOfLines={1}>
@@ -1,6 +1,6 @@
1
1
  import { AgentAvatarProvider } from '@oxy.so/bloom/agent-avatar';
2
2
  import type { AiChatThreadHandle } from '@oxy.so/bloom/ai-chat';
3
- import { ButtonGroup, ButtonGroupItem } from '@oxy.so/bloom/button-group';
3
+ import { Button } from '@oxy.so/bloom/button';
4
4
  import { RiArrowLeftLine } from '@oxy.so/bloom/icons/RiArrowLeftLine';
5
5
  import { PageHeader } from '@oxy.so/bloom/page-header';
6
6
  import { Text } from '@oxy.so/bloom/typography';
@@ -80,14 +80,14 @@ function ConversationBetweenGemies({ conversationId, onBack }: GemieBetweenGemie
80
80
  <View className="flex-1 bg-background" testID="gemie-conversation">
81
81
  <PageHeader
82
82
  leading={
83
- <ButtonGroup accessibilityLabel={back}>
84
- <ButtonGroupItem
83
+ <Button.Group accessibilityLabel={back}>
84
+ <Button
85
85
  iconOnly
86
86
  leadingIcon={RiArrowLeftLine}
87
87
  accessibilityLabel={back}
88
88
  onPress={onBack}
89
89
  />
90
- </ButtonGroup>
90
+ </Button.Group>
91
91
  }
92
92
  title={participants ? <GemieParticipants participants={participants} /> : undefined}
93
93
  titleAlign="center"
@@ -1,4 +1,4 @@
1
- import { ButtonGroup, ButtonGroupItem } from '@oxy.so/bloom/button-group';
1
+ import { Button } from '@oxy.so/bloom/button';
2
2
  import {
3
3
  DropdownMenu,
4
4
  DropdownMenuContent,
@@ -63,14 +63,14 @@ export const GemieChatHeader = memo(function GemieChatHeader({
63
63
  leading={
64
64
  leading ??
65
65
  (onBack ? (
66
- <ButtonGroup accessibilityLabel={labels.chatActions}>
67
- <ButtonGroupItem
66
+ <Button.Group accessibilityLabel={labels.chatActions}>
67
+ <Button
68
68
  iconOnly
69
69
  leadingIcon={RiArrowLeftLine}
70
70
  accessibilityLabel={labels.back}
71
71
  onPress={onBack}
72
72
  />
73
- </ButtonGroup>
73
+ </Button.Group>
74
74
  ) : undefined)
75
75
  }
76
76
  title={
@@ -83,9 +83,9 @@ export const GemieChatHeader = memo(function GemieChatHeader({
83
83
  <>
84
84
  {trailing}
85
85
  {hasMessages ? (
86
- <ButtonGroup accessibilityLabel={labels.chatActions}>
86
+ <Button.Group accessibilityLabel={labels.chatActions}>
87
87
  {onShare ? (
88
- <ButtonGroupItem
88
+ <Button
89
89
  iconOnly
90
90
  leadingIcon={RiShare2Line}
91
91
  accessibilityLabel={labels.share}
@@ -94,11 +94,7 @@ export const GemieChatHeader = memo(function GemieChatHeader({
94
94
  ) : null}
95
95
  <DropdownMenu>
96
96
  <DropdownMenuTrigger asChild label={labels.more}>
97
- <ButtonGroupItem
98
- iconOnly
99
- leadingIcon={RiMoreFill}
100
- accessibilityLabel={labels.more}
101
- />
97
+ <Button iconOnly leadingIcon={RiMoreFill} accessibilityLabel={labels.more} />
102
98
  </DropdownMenuTrigger>
103
99
  <DropdownMenuContent align="end">
104
100
  {menu}
@@ -111,7 +107,7 @@ export const GemieChatHeader = memo(function GemieChatHeader({
111
107
  </DropdownMenuItem>
112
108
  </DropdownMenuContent>
113
109
  </DropdownMenu>
114
- </ButtonGroup>
110
+ </Button.Group>
115
111
  ) : null}
116
112
  </>
117
113
  }
@@ -1,4 +1,4 @@
1
- import { Item } from '@oxy.so/bloom/item';
1
+ import { ListItem } from '@oxy.so/bloom/list';
2
2
  import { Text } from '@oxy.so/bloom/typography';
3
3
  import { useMemo } from 'react';
4
4
  import { View } from 'react-native';
@@ -45,11 +45,10 @@ export function GemieRecentConversations({
45
45
  {recent.map((conversation) => {
46
46
  const title = conversation.title || labels.newChat;
47
47
  return (
48
- <Item
48
+ <ListItem
49
49
  key={conversation.id}
50
- density="compact"
51
- accessibilityRole="button"
52
- accessibilityLabel={title}
50
+ role="button"
51
+ label={title}
53
52
  onPress={() => onOpen(conversation.id)}
54
53
  title={<Text numberOfLines={1}>{title}</Text>}
55
54
  trailing={
@@ -9,7 +9,7 @@ import {
9
9
  } from '@oxy.so/bloom/admonition';
10
10
  import { Card, CardBody, CardHeader, CardTitle } from '@oxy.so/bloom/card';
11
11
  import { RiExternalLinkLine } from '@oxy.so/bloom/icons/RiExternalLinkLine';
12
- import { Item } from '@oxy.so/bloom/item';
12
+ import { ListItem } from '@oxy.so/bloom/list';
13
13
  import { Rating } from '@oxy.so/bloom/rating';
14
14
  import { Muted, Text } from '@oxy.so/bloom/typography';
15
15
  import { Image } from './Image';
@@ -17,7 +17,7 @@ import { Linking, View } from 'react-native';
17
17
 
18
18
  /**
19
19
  * The rich blocks a reply can carry (```compactlist, ```banner, …), drawn with
20
- * Bloom: a card per block, `Item` rows, `Admonition` for a banner and `Rating`
20
+ * Bloom: a card per block, `ListItem` rows, `Admonition` for a banner and `Rating`
21
21
  * for a source's credibility. `ReplyMarkdown.tsx` parses the fences.
22
22
  */
23
23
 
@@ -37,11 +37,11 @@ export function CompactList({ title, items }: { title: string; items: CompactLis
37
37
  <CardBody>
38
38
  <View role="list">
39
39
  {items.map((item, index) => (
40
- <Item
40
+ <ListItem
41
41
  key={index}
42
42
  role="listitem"
43
43
  title={item.title}
44
- subtitle={item.meta}
44
+ supporting={item.meta}
45
45
  leading={
46
46
  item.image ? (
47
47
  <Image
@@ -151,12 +151,13 @@ export function Timeline({ title, items }: { title: string; items: TimelineItem[
151
151
  <CardBody>
152
152
  <View role="list">
153
153
  {items.map((item, index) => (
154
- <Item
154
+ <ListItem
155
155
  key={index}
156
156
  role="listitem"
157
157
  leading={<Muted>{item.date}</Muted>}
158
158
  title={item.title}
159
- subtitle={item.description}
159
+ supporting={item.description}
160
+ supportingLines="adaptive"
160
161
  />
161
162
  ))}
162
163
  </View>
@@ -9,13 +9,14 @@ import {
9
9
  import { EmptyState } from '@oxy.so/bloom/empty-state';
10
10
  import { RiFileTextLine } from '@oxy.so/bloom/icons/RiFileTextLine';
11
11
  import { RiGlobalLine } from '@oxy.so/bloom/icons/RiGlobalLine';
12
- import { Item } from '@oxy.so/bloom/item';
12
+ import { ListItem } from '@oxy.so/bloom/list';
13
13
  import { useTheme } from '@oxy.so/bloom/theme';
14
14
  import { useState } from 'react';
15
+ import { View } from 'react-native';
15
16
 
16
17
  /**
17
18
  * "Files and sources": what a turn produced and what it read, as two Bloom
18
- * `Accordion` sections of `Item` rows.
19
+ * `Accordion` sections of `ListItem` rows.
19
20
  *
20
21
  * An output row is pressable only when the canvas holds its artifact to open;
21
22
  * otherwise it is a labelled row and says so to assistive tech. A name is
@@ -77,15 +78,16 @@ export function FilesAndSources({
77
78
  // button under it.
78
79
  const openable = outputActions?.canOpen(output) === true;
79
80
  return (
80
- <Item
81
+ <ListItem
81
82
  key={output.id}
82
83
  role="listitem"
83
- density="compact"
84
- leading={<RiFileTextLine size="md" fill={colors.textSecondary} />}
85
- title={output.name}
86
- accessibilityLabel={
87
- openable ? t('thought.openOutput', { name: output.name }) : output.name
84
+ leading={
85
+ <View pointerEvents="none">
86
+ <RiFileTextLine size="md" fill={colors.textSecondary} />
87
+ </View>
88
88
  }
89
+ title={output.name}
90
+ label={openable ? t('thought.openOutput', { name: output.name }) : output.name}
89
91
  onPress={openable ? () => outputActions?.open(output) : undefined}
90
92
  />
91
93
  );
@@ -101,14 +103,17 @@ export function FilesAndSources({
101
103
  <EmptyState variant="compact" description={t('thought.noSources')} />
102
104
  ) : (
103
105
  sources.map((source, index) => (
104
- <Item
106
+ <ListItem
105
107
  key={source.url}
106
108
  role="listitem"
107
- density="compact"
108
- leading={<RiGlobalLine size="sm" fill={colors.textSecondary} />}
109
+ leading={
110
+ <View pointerEvents="none">
111
+ <RiGlobalLine size="sm" fill={colors.textSecondary} />
112
+ </View>
113
+ }
109
114
  title={source.title}
110
- subtitle={source.domain}
111
- accessibilityLabel={t('thought.sourceLabel', { n: index + 1, title: source.title })}
115
+ supporting={source.domain}
116
+ label={t('thought.sourceLabel', { n: index + 1, title: source.title })}
112
117
  onPress={() => onOpenSource(source)}
113
118
  />
114
119
  ))
@@ -1,10 +1,11 @@
1
- import { AgentStack } from '@oxy.so/bloom/agent-reply';
1
+ import { AvatarGroup } from '@oxy.so/bloom/avatar-group';
2
2
  import { AiChatMessageLine } from '@oxy.so/bloom/ai-chat';
3
3
  import { Card } from '@oxy.so/bloom/card';
4
4
  import { TypingDots } from '@oxy.so/bloom/chat-indicators';
5
5
  import { RiArrowRightSLine } from '@oxy.so/bloom/icons/RiArrowRightSLine';
6
- import { Item } from '@oxy.so/bloom/item';
6
+ import { ListItem } from '@oxy.so/bloom/list';
7
7
  import { useRef, useState } from 'react';
8
+ import { View } from 'react-native';
8
9
  import { useOpenGemieConversation } from '../../lib/gemie-conversation-opener';
9
10
  import { useLabels } from '../../lib/labels';
10
11
  import { agentCharacterOf } from '../../lib/participants';
@@ -90,26 +91,31 @@ export function GemieConversationCard({
90
91
  return (
91
92
  <AiChatMessageLine block>
92
93
  <Card>
93
- <Item
94
+ <ListItem
94
95
  leading={
95
- <AgentStack
96
- size={STACK_SIZE}
97
- agents={[from, to].map((agent) => ({
98
- id: agent.id,
99
- name: agent.name,
100
- avatar: agentCharacterOf(agent),
101
- }))}
102
- />
96
+ <View pointerEvents="none">
97
+ <AvatarGroup
98
+ layout="conversation"
99
+ motion="always"
100
+ size={STACK_SIZE}
101
+ items={[from, to].map((agent) => ({
102
+ id: agent.id,
103
+ name: agent.name,
104
+ kind: 'bot' as const,
105
+ character: agentCharacterOf(agent),
106
+ }))}
107
+ />
108
+ </View>
103
109
  }
104
110
  title={title}
105
- subtitle={subtitle}
111
+ supporting={subtitle}
106
112
  // The last thing said is a glimpse; the whole of it is one press away.
107
- subtitleNumberOfLines={1}
113
+ supportingLines={1}
108
114
  trailing={talking ? <TypingDots /> : pressable ? <RiArrowRightSLine size="sm" /> : null}
109
115
  {...(pressable
110
116
  ? {
111
- accessibilityRole: 'button' as const,
112
- accessibilityLabel: `${title}. ${t('chat.gemiesOpen')}`,
117
+ role: 'button' as const,
118
+ label: `${title}. ${t('chat.gemiesOpen')}`,
113
119
  onPress: () => open(conversationId),
114
120
  }
115
121
  : {})}
@@ -5,7 +5,7 @@ import { useLabels } from '../../lib/labels';
5
5
  import { Button } from '@oxy.so/bloom/button';
6
6
  import { Card, CardBody } from '@oxy.so/bloom/card';
7
7
  import { RiCloseLine } from '@oxy.so/bloom/icons/RiCloseLine';
8
- import { Item } from '@oxy.so/bloom/item';
8
+ import { ListItem } from '@oxy.so/bloom/list';
9
9
  import { Search } from '@oxy.so/bloom/search';
10
10
  import { Muted } from '@oxy.so/bloom/typography';
11
11
  import { useState } from 'react';
@@ -24,7 +24,7 @@ import { ScrollView, View } from 'react-native';
24
24
  * can read and not reach is a wall, so `onJump` is not an extra: it is what the
25
25
  * hit is for.
26
26
  *
27
- * Bloom's `Search` for the field and an `Item` per hit, on a `Card` floating
27
+ * Bloom's `Search` for the field and a `ListItem` per hit, on a `Card` floating
28
28
  * over the top of the thread in its 768 column: the card is the surface, so
29
29
  * nothing here paints one of its own.
30
30
  */
@@ -109,12 +109,12 @@ export const ThreadSearch = ({ thread, onJump, onClose }: ThreadSearchProps) =>
109
109
  keyboardShouldPersistTaps="handled"
110
110
  >
111
111
  {found.map((hit) => (
112
- <Item
112
+ <ListItem
113
113
  // The cursor, never `messageId`: a message the server wrote
114
114
  // has no client id, and `null` is not a key.
115
115
  key={hit.cursor}
116
116
  title={hit.snippet}
117
- subtitle={`${t(
117
+ supporting={`${t(
118
118
  hit.role === 'user' ? 'chat.searchThreadYou' : 'chat.searchThreadAgent',
119
119
  )} · ${hitDay(hit.createdAt, locale)}`}
120
120
  onPress={() => onJump(hit)}