@vinaverse/react-native 0.1.0-alpha.11 → 0.1.0-alpha.13

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.
Files changed (56) hide show
  1. package/README.md +16 -3
  2. package/dist/ask.cjs +10 -5
  3. package/dist/ask.d.cts +35 -5
  4. package/dist/ask.d.ts +35 -5
  5. package/dist/ask.js +3 -2
  6. package/dist/chat.cjs +69 -69
  7. package/dist/chat.d.cts +44 -8
  8. package/dist/chat.d.ts +44 -8
  9. package/dist/chat.js +3 -3
  10. package/dist/{chunk-XAG2P447.cjs → chunk-272ACDLI.cjs} +248 -104
  11. package/dist/chunk-272ACDLI.cjs.map +1 -0
  12. package/dist/{chunk-EFEXTVIT.js → chunk-35A77CNF.js} +11 -3
  13. package/dist/chunk-35A77CNF.js.map +1 -0
  14. package/dist/{chunk-NMKJ7LIJ.cjs → chunk-35T5QPMT.cjs} +31 -7
  15. package/dist/chunk-35T5QPMT.cjs.map +1 -0
  16. package/dist/{chunk-7KPCO443.js → chunk-GFD4T3IA.js} +28 -4
  17. package/dist/chunk-GFD4T3IA.js.map +1 -0
  18. package/dist/{chunk-2J2LIJLW.js → chunk-MCVW6TZD.js} +113 -33
  19. package/dist/chunk-MCVW6TZD.js.map +1 -0
  20. package/dist/{chunk-KSHDF3MG.js → chunk-QSMMC4RZ.js} +216 -74
  21. package/dist/chunk-QSMMC4RZ.js.map +1 -0
  22. package/dist/{chunk-POJP52GE.js → chunk-TY4TISCR.js} +4 -4
  23. package/dist/chunk-TY4TISCR.js.map +1 -0
  24. package/dist/{chunk-6QYDPGRS.cjs → chunk-UMCOOQT6.cjs} +11 -3
  25. package/dist/chunk-UMCOOQT6.cjs.map +1 -0
  26. package/dist/{chunk-MG32E4JI.cjs → chunk-VWAAUCE3.cjs} +11 -11
  27. package/dist/chunk-VWAAUCE3.cjs.map +1 -0
  28. package/dist/{chunk-4PXQ7DEY.cjs → chunk-YVCMKSJG.cjs} +140 -60
  29. package/dist/chunk-YVCMKSJG.cjs.map +1 -0
  30. package/dist/{context-gHCLFsJh.d.ts → context-B4ctXjm5.d.cts} +22 -1
  31. package/dist/{context-gHCLFsJh.d.cts → context-B4ctXjm5.d.ts} +22 -1
  32. package/dist/history.cjs +52 -48
  33. package/dist/history.cjs.map +1 -1
  34. package/dist/history.d.cts +12 -3
  35. package/dist/history.d.ts +12 -3
  36. package/dist/history.js +13 -9
  37. package/dist/history.js.map +1 -1
  38. package/dist/index.cjs +83 -78
  39. package/dist/index.cjs.map +1 -1
  40. package/dist/index.d.cts +3 -3
  41. package/dist/index.d.ts +3 -3
  42. package/dist/index.js +6 -5
  43. package/dist/index.js.map +1 -1
  44. package/dist/launcher.cjs +10 -10
  45. package/dist/launcher.js +2 -2
  46. package/package.json +7 -7
  47. package/dist/chunk-2J2LIJLW.js.map +0 -1
  48. package/dist/chunk-4PXQ7DEY.cjs.map +0 -1
  49. package/dist/chunk-6QYDPGRS.cjs.map +0 -1
  50. package/dist/chunk-7KPCO443.js.map +0 -1
  51. package/dist/chunk-EFEXTVIT.js.map +0 -1
  52. package/dist/chunk-KSHDF3MG.js.map +0 -1
  53. package/dist/chunk-MG32E4JI.cjs.map +0 -1
  54. package/dist/chunk-NMKJ7LIJ.cjs.map +0 -1
  55. package/dist/chunk-POJP52GE.js.map +0 -1
  56. package/dist/chunk-XAG2P447.cjs.map +0 -1
package/README.md CHANGED
@@ -75,7 +75,10 @@ const imagePolicy = { hosts: ['images.example.com'], aspectRatio: 1.6, Placehold
75
75
  />
76
76
 
77
77
  // On the app's own page about a professional
78
- <AskAboutRow title={`Ask ${agentName} about ${name}`} onPress={({ entryPoint }) => openChat('professional', side, entryPoint)} />
78
+ <AskAboutRow title={`Ask ${agentName} about ${name}`} agentKey={{ subject: user?.id ?? null, mode: side }}
79
+ place={{ screen: 'professional', entity: { type: 'professional', id }, preview: { title: name, image_url: photo } }}
80
+ question={`Is ${name} free this week?`} onPress={(open) => navigate('Chat', { open })} />
81
+ // the chat screen forwards it as it is: <AgentChat {...route.params.open} />
79
82
  ```
80
83
 
81
84
  - **Parts:** `AgentChat` draws the conversation, a conversation that ended (`components.Ended`: `onStartNew`,
@@ -98,7 +101,16 @@ const imagePolicy = { hosts: ['images.example.com'], aspectRatio: 1.6, Placehold
98
101
  none with reduced motion). Its `onOpen` and the ask row's `onPress` give `entryPoint` (`launcher`, `ask`): pass it to
99
102
  `AgentChat`'s `entryPoint` (or `deep_link`, or your own words) and `session_opened` says where the chat was opened
100
103
  from. Every agent part asks the runtime to `sweep()` when the app comes back to the foreground. `AskAboutRow` is "ask the agent about this" on
101
- your own pages, decided once as the page draws, from the status already read: it is never added under a drawn page
104
+ your own pages. It opens a conversation of the object's own: `askAboutKey(agentKey, place)`, your key on the thread
105
+ `ask:<type>:<id>`, so each booking, professional or space gets its own and your main conversation is left alone. On a
106
+ press it tells the runtime the place for that key, then hands back `{ entryPoint, agentKey, place, askAbout, entry,
107
+ anchor }` for `<AgentChat {...open} />`. There, at an object and before the person says anything, `question` leads as
108
+ a chip and the welcome's own chips give way; `place.preview` (`title`, `image_url`, `kind`) is drawn as the
109
+ conversation's first row, provisional, until the verified `anchor` card of that object takes its place, and is never sent. `entry`
110
+ (`ask_about`, `entryLabel` or the screen, cut to 60 code points at a whole character) and `anchor` (null unless its
111
+ type is the contract's; `anchorType` for a word of your own) reach your backend's session request only with the
112
+ runtime's `sendAnchor` (off until the gateway reads them), as `anchor_ref` and `entry`. The row is decided once as the page draws, from the status already
113
+ read: it is never added under a drawn page
102
114
  (an agent whose status arrives later shows from the next visit), and `appearance` gives it a tint (`background`) and the
103
115
  `chevron` or none, and `testID` its test id.
104
116
  - **Policies and adapters:** `imagePolicy` (photo hosts, frame, the stand-in for a missing photo, given the card's `title` and `kind`) applies to every card
@@ -107,7 +119,8 @@ const imagePolicy = { hosts: ['images.example.com'], aspectRatio: 1.6, Placehold
107
119
  - **History** (`@vinaverse/react-native/history` only, never `.`, so an app without a history screen ships none
108
120
  of it): `AgentHistoryList` lists the person's past conversations, newest activity first, a page at a time as
109
121
  they scroll (title, when, how many messages, whether it ended); a row opens (`onOpen`: show `AgentTranscript`), an
110
- open one continues (`onContinue(conversation, live)`: pinned under its own key, `useAgentHistory().keyOf`, show
122
+ open one continues (`onContinue(conversation, live)`: pinned under its own key, `useAgentHistory().keyOf`, or your
123
+ own with `keyOf` when your keys say your modes in your own words; continue and delete both go under it; show
111
124
  `AgentChat` with it), and deletes after the person confirms (`confirmDelete`, default the platform's alert with the
112
125
  copy's words; a refused delete is said on the row and through `onWarning`). `AgentTranscript` reads one back, the
113
126
  newest page first and earlier pages above (a button, and the top of the list), drawn with the chat's own bubbles and
package/dist/ask.cjs CHANGED
@@ -1,22 +1,27 @@
1
1
  'use strict';
2
2
 
3
- var chunkNMKJ7LIJ_cjs = require('./chunk-NMKJ7LIJ.cjs');
4
- var chunk6QYDPGRS_cjs = require('./chunk-6QYDPGRS.cjs');
3
+ var chunk35T5QPMT_cjs = require('./chunk-35T5QPMT.cjs');
4
+ var chunkUMCOOQT6_cjs = require('./chunk-UMCOOQT6.cjs');
5
+ var agent$1 = require('@vinaverse/client/agent');
5
6
  var agent = require('@vinaverse/react/agent');
6
7
 
7
8
 
8
9
 
9
10
  Object.defineProperty(exports, "AskAboutRow", {
10
11
  enumerable: true,
11
- get: function () { return chunkNMKJ7LIJ_cjs.AskAboutRow; }
12
+ get: function () { return chunk35T5QPMT_cjs.AskAboutRow; }
12
13
  });
13
14
  Object.defineProperty(exports, "ThemeProvider", {
14
15
  enumerable: true,
15
- get: function () { return chunk6QYDPGRS_cjs.ThemeProvider; }
16
+ get: function () { return chunkUMCOOQT6_cjs.ThemeProvider; }
16
17
  });
17
18
  Object.defineProperty(exports, "useTheme", {
18
19
  enumerable: true,
19
- get: function () { return chunk6QYDPGRS_cjs.useTheme; }
20
+ get: function () { return chunkUMCOOQT6_cjs.useTheme; }
21
+ });
22
+ Object.defineProperty(exports, "askAboutKey", {
23
+ enumerable: true,
24
+ get: function () { return agent$1.askAboutKey; }
20
25
  });
21
26
  Object.defineProperty(exports, "AgentRuntimeProvider", {
22
27
  enumerable: true,
package/dist/ask.d.cts CHANGED
@@ -1,3 +1,5 @@
1
+ import { AgentKey, AskAboutPlace, AgentEntry, AgentAnchorRef, AgentAnchorType } from '@vinaverse/client/agent';
2
+ export { AgentAnchorRef, AgentEntry, AgentPlacePreview, AskAboutPlace, askAboutKey } from '@vinaverse/client/agent';
1
3
  export { AgentRuntimeProvider, GreetingStorage, UseAgentConversation, UseAgentLauncher, forgetGreeting, greetedKey, useAgentConversation, useAgentFeatures, useAgentLauncher, useAgentName, useAgentProfile, useAgentRuntime, useAgentStatus } from '@vinaverse/react/agent';
2
4
  import { CopyOverrides } from '@vinaverse/react';
3
5
  import { ComponentType, ReactNode } from 'react';
@@ -12,14 +14,42 @@ interface AskAboutRowAppearance {
12
14
  /** The chevron at the row's end. Default true. */
13
15
  readonly chevron?: boolean;
14
16
  }
17
+ /** What the row hands back on a press: everything `<AgentChat {...open} />` needs to open the object's conversation. */
18
+ interface AskAboutOpen {
19
+ readonly entryPoint: 'ask';
20
+ /** The app's key on the object's own thread (`askAboutKey`): each object its own conversation. */
21
+ readonly agentKey: AgentKey;
22
+ /** The place as given, its `preview` included (AgentChat draws it, and never sends it). */
23
+ readonly place: AskAboutPlace;
24
+ /** The question offered first, before the person says anything; null without one. */
25
+ readonly askAbout: string | null;
26
+ /** `ask_about`, with the app's label (at most 60 code points); sent only with the runtime's `sendAnchor`. */
27
+ readonly entry: AgentEntry;
28
+ /**
29
+ * The object, for the contract's anchor (contracts#86); null when its type is not one of the contract's
30
+ * (`AgentAnchorType`; pass `anchorType` for an app word such as "space"). Sent only with the runtime's `sendAnchor`.
31
+ */
32
+ readonly anchor: AgentAnchorRef | null;
33
+ }
15
34
  interface AskAboutRowProps {
16
35
  /** "Ask Example Agent about Riley Sample". */
17
36
  readonly title: string;
18
37
  readonly body?: string;
19
- /** The person asks: open the chat with `entryPoint` (`ask`), so the session says where it was opened from. */
20
- readonly onPress: (from: {
21
- readonly entryPoint: 'ask';
22
- }) => void;
38
+ /** The app's key as it holds it (its mode as it is): the row puts the object's thread on it. Keep it stable. */
39
+ readonly agentKey: AgentKey;
40
+ /** The screen and the object on it; `preview` draws the object in the chat until the agent's verified card comes. */
41
+ readonly place: AskAboutPlace;
42
+ /** A question about the object, offered first in the chat as a chip the person taps; never sent in their name. */
43
+ readonly question?: string;
44
+ /**
45
+ * The app's own word for this way in, for analytics: cut to 60 code points at a whole character (`entryLabel`).
46
+ * Default: the place's screen.
47
+ */
48
+ readonly entryLabel?: string;
49
+ /** The contract's type for the object, when the app's `place.entity.type` is a word of its own ("space"). */
50
+ readonly anchorType?: AgentAnchorType;
51
+ /** The person asks: the runtime was told the place for the object's key; open `<AgentChat {...open} />`. */
52
+ readonly onPress: (open: AskAboutOpen) => void;
23
53
  /** The app's brand mark at the row's start; default the agent name's first letter. */
24
54
  readonly Mark?: ComponentType<{
25
55
  readonly size: number;
@@ -35,4 +65,4 @@ interface AskAboutRowProps {
35
65
  }
36
66
  declare function AskAboutRow(props: AskAboutRowProps): ReactNode;
37
67
 
38
- export { AskAboutRow, type AskAboutRowAppearance, type AskAboutRowProps, ColorSchemeSetting, ThemeOverrides };
68
+ export { type AskAboutOpen, AskAboutRow, type AskAboutRowAppearance, type AskAboutRowProps, ColorSchemeSetting, ThemeOverrides };
package/dist/ask.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { AgentKey, AskAboutPlace, AgentEntry, AgentAnchorRef, AgentAnchorType } from '@vinaverse/client/agent';
2
+ export { AgentAnchorRef, AgentEntry, AgentPlacePreview, AskAboutPlace, askAboutKey } from '@vinaverse/client/agent';
1
3
  export { AgentRuntimeProvider, GreetingStorage, UseAgentConversation, UseAgentLauncher, forgetGreeting, greetedKey, useAgentConversation, useAgentFeatures, useAgentLauncher, useAgentName, useAgentProfile, useAgentRuntime, useAgentStatus } from '@vinaverse/react/agent';
2
4
  import { CopyOverrides } from '@vinaverse/react';
3
5
  import { ComponentType, ReactNode } from 'react';
@@ -12,14 +14,42 @@ interface AskAboutRowAppearance {
12
14
  /** The chevron at the row's end. Default true. */
13
15
  readonly chevron?: boolean;
14
16
  }
17
+ /** What the row hands back on a press: everything `<AgentChat {...open} />` needs to open the object's conversation. */
18
+ interface AskAboutOpen {
19
+ readonly entryPoint: 'ask';
20
+ /** The app's key on the object's own thread (`askAboutKey`): each object its own conversation. */
21
+ readonly agentKey: AgentKey;
22
+ /** The place as given, its `preview` included (AgentChat draws it, and never sends it). */
23
+ readonly place: AskAboutPlace;
24
+ /** The question offered first, before the person says anything; null without one. */
25
+ readonly askAbout: string | null;
26
+ /** `ask_about`, with the app's label (at most 60 code points); sent only with the runtime's `sendAnchor`. */
27
+ readonly entry: AgentEntry;
28
+ /**
29
+ * The object, for the contract's anchor (contracts#86); null when its type is not one of the contract's
30
+ * (`AgentAnchorType`; pass `anchorType` for an app word such as "space"). Sent only with the runtime's `sendAnchor`.
31
+ */
32
+ readonly anchor: AgentAnchorRef | null;
33
+ }
15
34
  interface AskAboutRowProps {
16
35
  /** "Ask Example Agent about Riley Sample". */
17
36
  readonly title: string;
18
37
  readonly body?: string;
19
- /** The person asks: open the chat with `entryPoint` (`ask`), so the session says where it was opened from. */
20
- readonly onPress: (from: {
21
- readonly entryPoint: 'ask';
22
- }) => void;
38
+ /** The app's key as it holds it (its mode as it is): the row puts the object's thread on it. Keep it stable. */
39
+ readonly agentKey: AgentKey;
40
+ /** The screen and the object on it; `preview` draws the object in the chat until the agent's verified card comes. */
41
+ readonly place: AskAboutPlace;
42
+ /** A question about the object, offered first in the chat as a chip the person taps; never sent in their name. */
43
+ readonly question?: string;
44
+ /**
45
+ * The app's own word for this way in, for analytics: cut to 60 code points at a whole character (`entryLabel`).
46
+ * Default: the place's screen.
47
+ */
48
+ readonly entryLabel?: string;
49
+ /** The contract's type for the object, when the app's `place.entity.type` is a word of its own ("space"). */
50
+ readonly anchorType?: AgentAnchorType;
51
+ /** The person asks: the runtime was told the place for the object's key; open `<AgentChat {...open} />`. */
52
+ readonly onPress: (open: AskAboutOpen) => void;
23
53
  /** The app's brand mark at the row's start; default the agent name's first letter. */
24
54
  readonly Mark?: ComponentType<{
25
55
  readonly size: number;
@@ -35,4 +65,4 @@ interface AskAboutRowProps {
35
65
  }
36
66
  declare function AskAboutRow(props: AskAboutRowProps): ReactNode;
37
67
 
38
- export { AskAboutRow, type AskAboutRowAppearance, type AskAboutRowProps, ColorSchemeSetting, ThemeOverrides };
68
+ export { type AskAboutOpen, AskAboutRow, type AskAboutRowAppearance, type AskAboutRowProps, ColorSchemeSetting, ThemeOverrides };
package/dist/ask.js CHANGED
@@ -1,5 +1,6 @@
1
- export { AskAboutRow } from './chunk-7KPCO443.js';
2
- export { ThemeProvider, useTheme } from './chunk-EFEXTVIT.js';
1
+ export { AskAboutRow } from './chunk-GFD4T3IA.js';
2
+ export { ThemeProvider, useTheme } from './chunk-35A77CNF.js';
3
+ export { askAboutKey } from '@vinaverse/client/agent';
3
4
  export { AgentRuntimeProvider, forgetGreeting, greetedKey, useAgentConversation, useAgentFeatures, useAgentLauncher, useAgentName, useAgentProfile, useAgentRuntime, useAgentStatus } from '@vinaverse/react/agent';
4
5
  //# sourceMappingURL=ask.js.map
5
6
  //# sourceMappingURL=ask.js.map
package/dist/chat.cjs CHANGED
@@ -1,274 +1,274 @@
1
1
  'use strict';
2
2
 
3
- var chunk4PXQ7DEY_cjs = require('./chunk-4PXQ7DEY.cjs');
4
- var chunkXAG2P447_cjs = require('./chunk-XAG2P447.cjs');
5
- var chunk6QYDPGRS_cjs = require('./chunk-6QYDPGRS.cjs');
3
+ var chunkYVCMKSJG_cjs = require('./chunk-YVCMKSJG.cjs');
4
+ var chunk272ACDLI_cjs = require('./chunk-272ACDLI.cjs');
5
+ var chunkUMCOOQT6_cjs = require('./chunk-UMCOOQT6.cjs');
6
6
 
7
7
 
8
8
 
9
9
  Object.defineProperty(exports, "AgentChat", {
10
10
  enumerable: true,
11
- get: function () { return chunk4PXQ7DEY_cjs.AgentChat; }
11
+ get: function () { return chunkYVCMKSJG_cjs.AgentChat; }
12
12
  });
13
13
  Object.defineProperty(exports, "AgentFooter", {
14
14
  enumerable: true,
15
- get: function () { return chunk4PXQ7DEY_cjs.AgentFooter; }
15
+ get: function () { return chunkYVCMKSJG_cjs.AgentFooter; }
16
16
  });
17
17
  Object.defineProperty(exports, "AgentRuntimeProvider", {
18
18
  enumerable: true,
19
- get: function () { return chunk4PXQ7DEY_cjs.AgentRuntimeProvider; }
19
+ get: function () { return chunkYVCMKSJG_cjs.AgentRuntimeProvider; }
20
20
  });
21
21
  Object.defineProperty(exports, "Composer", {
22
22
  enumerable: true,
23
- get: function () { return chunk4PXQ7DEY_cjs.Composer; }
23
+ get: function () { return chunkYVCMKSJG_cjs.Composer; }
24
24
  });
25
25
  Object.defineProperty(exports, "DefaultComposer", {
26
26
  enumerable: true,
27
- get: function () { return chunk4PXQ7DEY_cjs.DefaultComposer; }
27
+ get: function () { return chunkYVCMKSJG_cjs.DefaultComposer; }
28
28
  });
29
29
  Object.defineProperty(exports, "DefaultEnded", {
30
30
  enumerable: true,
31
- get: function () { return chunk4PXQ7DEY_cjs.DefaultEnded; }
31
+ get: function () { return chunkYVCMKSJG_cjs.DefaultEnded; }
32
32
  });
33
33
  Object.defineProperty(exports, "DefaultUnavailable", {
34
34
  enumerable: true,
35
- get: function () { return chunk4PXQ7DEY_cjs.DefaultUnavailable; }
35
+ get: function () { return chunkYVCMKSJG_cjs.DefaultUnavailable; }
36
36
  });
37
37
  Object.defineProperty(exports, "DefaultUnavailableScreen", {
38
38
  enumerable: true,
39
- get: function () { return chunk4PXQ7DEY_cjs.DefaultUnavailableScreen; }
39
+ get: function () { return chunkYVCMKSJG_cjs.DefaultUnavailableScreen; }
40
40
  });
41
41
  Object.defineProperty(exports, "DefaultUnreachable", {
42
42
  enumerable: true,
43
- get: function () { return chunk4PXQ7DEY_cjs.DefaultUnreachable; }
43
+ get: function () { return chunkYVCMKSJG_cjs.DefaultUnreachable; }
44
44
  });
45
45
  Object.defineProperty(exports, "StatusBanner", {
46
46
  enumerable: true,
47
- get: function () { return chunk4PXQ7DEY_cjs.StatusBanner; }
47
+ get: function () { return chunkYVCMKSJG_cjs.StatusBanner; }
48
48
  });
49
49
  Object.defineProperty(exports, "VinaverseChat", {
50
50
  enumerable: true,
51
- get: function () { return chunk4PXQ7DEY_cjs.VinaverseChat; }
51
+ get: function () { return chunkYVCMKSJG_cjs.VinaverseChat; }
52
52
  });
53
53
  Object.defineProperty(exports, "VinaverseChatProvider", {
54
54
  enumerable: true,
55
- get: function () { return chunk4PXQ7DEY_cjs.VinaverseChatProvider; }
55
+ get: function () { return chunkYVCMKSJG_cjs.VinaverseChatProvider; }
56
56
  });
57
57
  Object.defineProperty(exports, "forgetGreeting", {
58
58
  enumerable: true,
59
- get: function () { return chunk4PXQ7DEY_cjs.forgetGreeting; }
59
+ get: function () { return chunkYVCMKSJG_cjs.forgetGreeting; }
60
60
  });
61
61
  Object.defineProperty(exports, "greetedKey", {
62
62
  enumerable: true,
63
- get: function () { return chunk4PXQ7DEY_cjs.greetedKey; }
63
+ get: function () { return chunkYVCMKSJG_cjs.greetedKey; }
64
64
  });
65
65
  Object.defineProperty(exports, "newestWholeReply", {
66
66
  enumerable: true,
67
- get: function () { return chunk4PXQ7DEY_cjs.newestWholeReply; }
67
+ get: function () { return chunkYVCMKSJG_cjs.newestWholeReply; }
68
68
  });
69
69
  Object.defineProperty(exports, "useAgentConversation", {
70
70
  enumerable: true,
71
- get: function () { return chunk4PXQ7DEY_cjs.useAgentConversation; }
71
+ get: function () { return chunkYVCMKSJG_cjs.useAgentConversation; }
72
72
  });
73
73
  Object.defineProperty(exports, "useAgentFeatures", {
74
74
  enumerable: true,
75
- get: function () { return chunk4PXQ7DEY_cjs.useAgentFeatures; }
75
+ get: function () { return chunkYVCMKSJG_cjs.useAgentFeatures; }
76
76
  });
77
77
  Object.defineProperty(exports, "useAgentLauncher", {
78
78
  enumerable: true,
79
- get: function () { return chunk4PXQ7DEY_cjs.useAgentLauncher; }
79
+ get: function () { return chunkYVCMKSJG_cjs.useAgentLauncher; }
80
80
  });
81
81
  Object.defineProperty(exports, "useAgentName", {
82
82
  enumerable: true,
83
- get: function () { return chunk4PXQ7DEY_cjs.useAgentName; }
83
+ get: function () { return chunkYVCMKSJG_cjs.useAgentName; }
84
84
  });
85
85
  Object.defineProperty(exports, "useAgentProfile", {
86
86
  enumerable: true,
87
- get: function () { return chunk4PXQ7DEY_cjs.useAgentProfile; }
87
+ get: function () { return chunkYVCMKSJG_cjs.useAgentProfile; }
88
88
  });
89
89
  Object.defineProperty(exports, "useAgentRuntime", {
90
90
  enumerable: true,
91
- get: function () { return chunk4PXQ7DEY_cjs.useAgentRuntime; }
91
+ get: function () { return chunkYVCMKSJG_cjs.useAgentRuntime; }
92
92
  });
93
93
  Object.defineProperty(exports, "useAgentStatus", {
94
94
  enumerable: true,
95
- get: function () { return chunk4PXQ7DEY_cjs.useAgentStatus; }
95
+ get: function () { return chunkYVCMKSJG_cjs.useAgentStatus; }
96
96
  });
97
97
  Object.defineProperty(exports, "useAgentStatusState", {
98
98
  enumerable: true,
99
- get: function () { return chunk4PXQ7DEY_cjs.useAgentStatusState; }
99
+ get: function () { return chunkYVCMKSJG_cjs.useAgentStatusState; }
100
100
  });
101
101
  Object.defineProperty(exports, "ActivityLine", {
102
102
  enumerable: true,
103
- get: function () { return chunkXAG2P447_cjs.ActivityLine; }
103
+ get: function () { return chunk272ACDLI_cjs.ActivityLine; }
104
104
  });
105
105
  Object.defineProperty(exports, "Avatar", {
106
106
  enumerable: true,
107
- get: function () { return chunkXAG2P447_cjs.Avatar; }
107
+ get: function () { return chunk272ACDLI_cjs.Avatar; }
108
108
  });
109
109
  Object.defineProperty(exports, "Button", {
110
110
  enumerable: true,
111
- get: function () { return chunkXAG2P447_cjs.Button; }
111
+ get: function () { return chunk272ACDLI_cjs.Button; }
112
112
  });
113
113
  Object.defineProperty(exports, "CardActions", {
114
114
  enumerable: true,
115
- get: function () { return chunkXAG2P447_cjs.CardActions; }
115
+ get: function () { return chunk272ACDLI_cjs.CardActions; }
116
116
  });
117
117
  Object.defineProperty(exports, "CardCarousel", {
118
118
  enumerable: true,
119
- get: function () { return chunkXAG2P447_cjs.CardCarousel; }
119
+ get: function () { return chunk272ACDLI_cjs.CardCarousel; }
120
120
  });
121
121
  Object.defineProperty(exports, "CardFrame", {
122
122
  enumerable: true,
123
- get: function () { return chunkXAG2P447_cjs.CardFrame; }
123
+ get: function () { return chunk272ACDLI_cjs.CardFrame; }
124
124
  });
125
125
  Object.defineProperty(exports, "CardView", {
126
126
  enumerable: true,
127
- get: function () { return chunkXAG2P447_cjs.CardView; }
127
+ get: function () { return chunk272ACDLI_cjs.CardView; }
128
128
  });
129
129
  Object.defineProperty(exports, "ChatHeader", {
130
130
  enumerable: true,
131
- get: function () { return chunkXAG2P447_cjs.ChatHeader; }
131
+ get: function () { return chunk272ACDLI_cjs.ChatHeader; }
132
132
  });
133
133
  Object.defineProperty(exports, "ChatSkeleton", {
134
134
  enumerable: true,
135
- get: function () { return chunkXAG2P447_cjs.ChatSkeleton; }
135
+ get: function () { return chunk272ACDLI_cjs.ChatSkeleton; }
136
136
  });
137
137
  Object.defineProperty(exports, "DefaultBubble", {
138
138
  enumerable: true,
139
- get: function () { return chunkXAG2P447_cjs.DefaultBubble; }
139
+ get: function () { return chunk272ACDLI_cjs.DefaultBubble; }
140
140
  });
141
141
  Object.defineProperty(exports, "DefaultHeader", {
142
142
  enumerable: true,
143
- get: function () { return chunkXAG2P447_cjs.DefaultHeader; }
143
+ get: function () { return chunk272ACDLI_cjs.DefaultHeader; }
144
144
  });
145
145
  Object.defineProperty(exports, "DefaultTurnFailed", {
146
146
  enumerable: true,
147
- get: function () { return chunkXAG2P447_cjs.DefaultTurnFailed; }
147
+ get: function () { return chunk272ACDLI_cjs.DefaultTurnFailed; }
148
148
  });
149
149
  Object.defineProperty(exports, "DisclosureBar", {
150
150
  enumerable: true,
151
- get: function () { return chunkXAG2P447_cjs.DisclosureBar; }
151
+ get: function () { return chunk272ACDLI_cjs.DisclosureBar; }
152
152
  });
153
153
  Object.defineProperty(exports, "FailureActionButton", {
154
154
  enumerable: true,
155
- get: function () { return chunkXAG2P447_cjs.FailureActionButton; }
155
+ get: function () { return chunk272ACDLI_cjs.FailureActionButton; }
156
156
  });
157
157
  Object.defineProperty(exports, "InfoCard", {
158
158
  enumerable: true,
159
- get: function () { return chunkXAG2P447_cjs.InfoCard; }
159
+ get: function () { return chunk272ACDLI_cjs.InfoCard; }
160
160
  });
161
161
  Object.defineProperty(exports, "LinksCard", {
162
162
  enumerable: true,
163
- get: function () { return chunkXAG2P447_cjs.LinksCard; }
163
+ get: function () { return chunk272ACDLI_cjs.LinksCard; }
164
164
  });
165
165
  Object.defineProperty(exports, "ListingCard", {
166
166
  enumerable: true,
167
- get: function () { return chunkXAG2P447_cjs.ListingCard; }
167
+ get: function () { return chunk272ACDLI_cjs.ListingCard; }
168
168
  });
169
169
  Object.defineProperty(exports, "MessageBubble", {
170
170
  enumerable: true,
171
- get: function () { return chunkXAG2P447_cjs.MessageBubble; }
171
+ get: function () { return chunk272ACDLI_cjs.MessageBubble; }
172
172
  });
173
173
  Object.defineProperty(exports, "MessageList", {
174
174
  enumerable: true,
175
- get: function () { return chunkXAG2P447_cjs.MessageList; }
175
+ get: function () { return chunk272ACDLI_cjs.MessageList; }
176
176
  });
177
177
  Object.defineProperty(exports, "NextStepCard", {
178
178
  enumerable: true,
179
- get: function () { return chunkXAG2P447_cjs.NextStepCard; }
179
+ get: function () { return chunk272ACDLI_cjs.NextStepCard; }
180
180
  });
181
181
  Object.defineProperty(exports, "ProposalCard", {
182
182
  enumerable: true,
183
- get: function () { return chunkXAG2P447_cjs.ProposalCard; }
183
+ get: function () { return chunk272ACDLI_cjs.ProposalCard; }
184
184
  });
185
185
  Object.defineProperty(exports, "QuestionCard", {
186
186
  enumerable: true,
187
- get: function () { return chunkXAG2P447_cjs.QuestionCard; }
187
+ get: function () { return chunk272ACDLI_cjs.QuestionCard; }
188
188
  });
189
189
  Object.defineProperty(exports, "Row", {
190
190
  enumerable: true,
191
- get: function () { return chunkXAG2P447_cjs.Row; }
191
+ get: function () { return chunk272ACDLI_cjs.Row; }
192
192
  });
193
193
  Object.defineProperty(exports, "StreamingBubble", {
194
194
  enumerable: true,
195
- get: function () { return chunkXAG2P447_cjs.StreamingBubble; }
195
+ get: function () { return chunk272ACDLI_cjs.StreamingBubble; }
196
196
  });
197
197
  Object.defineProperty(exports, "SystemRow", {
198
198
  enumerable: true,
199
- get: function () { return chunkXAG2P447_cjs.SystemRow; }
199
+ get: function () { return chunk272ACDLI_cjs.SystemRow; }
200
200
  });
201
201
  Object.defineProperty(exports, "TimeSlotsCard", {
202
202
  enumerable: true,
203
- get: function () { return chunkXAG2P447_cjs.TimeSlotsCard; }
203
+ get: function () { return chunk272ACDLI_cjs.TimeSlotsCard; }
204
204
  });
205
205
  Object.defineProperty(exports, "Welcome", {
206
206
  enumerable: true,
207
- get: function () { return chunkXAG2P447_cjs.Welcome; }
207
+ get: function () { return chunk272ACDLI_cjs.Welcome; }
208
208
  });
209
209
  Object.defineProperty(exports, "allowedImage", {
210
210
  enumerable: true,
211
- get: function () { return chunkXAG2P447_cjs.allowedImage; }
211
+ get: function () { return chunk272ACDLI_cjs.allowedImage; }
212
212
  });
213
213
  Object.defineProperty(exports, "answerText", {
214
214
  enumerable: true,
215
- get: function () { return chunkXAG2P447_cjs.answerText; }
215
+ get: function () { return chunk272ACDLI_cjs.answerText; }
216
216
  });
217
217
  Object.defineProperty(exports, "carousels", {
218
218
  enumerable: true,
219
- get: function () { return chunkXAG2P447_cjs.carousels; }
219
+ get: function () { return chunk272ACDLI_cjs.carousels; }
220
220
  });
221
221
  Object.defineProperty(exports, "defaultCard", {
222
222
  enumerable: true,
223
- get: function () { return chunkXAG2P447_cjs.defaultCard; }
223
+ get: function () { return chunk272ACDLI_cjs.defaultCard; }
224
224
  });
225
225
  Object.defineProperty(exports, "fieldText", {
226
226
  enumerable: true,
227
- get: function () { return chunkXAG2P447_cjs.fieldText; }
227
+ get: function () { return chunk272ACDLI_cjs.fieldText; }
228
228
  });
229
229
  Object.defineProperty(exports, "itemType", {
230
230
  enumerable: true,
231
- get: function () { return chunkXAG2P447_cjs.itemType; }
231
+ get: function () { return chunk272ACDLI_cjs.itemType; }
232
232
  });
233
233
  Object.defineProperty(exports, "monogram", {
234
234
  enumerable: true,
235
- get: function () { return chunkXAG2P447_cjs.monogram; }
235
+ get: function () { return chunk272ACDLI_cjs.monogram; }
236
236
  });
237
237
  Object.defineProperty(exports, "ratingText", {
238
238
  enumerable: true,
239
- get: function () { return chunkXAG2P447_cjs.ratingText; }
239
+ get: function () { return chunk272ACDLI_cjs.ratingText; }
240
240
  });
241
241
  Object.defineProperty(exports, "useChat", {
242
242
  enumerable: true,
243
- get: function () { return chunkXAG2P447_cjs.useChat; }
243
+ get: function () { return chunk272ACDLI_cjs.useChat; }
244
244
  });
245
245
  Object.defineProperty(exports, "ThemeProvider", {
246
246
  enumerable: true,
247
- get: function () { return chunk6QYDPGRS_cjs.ThemeProvider; }
247
+ get: function () { return chunkUMCOOQT6_cjs.ThemeProvider; }
248
248
  });
249
249
  Object.defineProperty(exports, "announce", {
250
250
  enumerable: true,
251
- get: function () { return chunk6QYDPGRS_cjs.announce; }
251
+ get: function () { return chunkUMCOOQT6_cjs.announce; }
252
252
  });
253
253
  Object.defineProperty(exports, "createTheme", {
254
254
  enumerable: true,
255
- get: function () { return chunk6QYDPGRS_cjs.createTheme; }
255
+ get: function () { return chunkUMCOOQT6_cjs.createTheme; }
256
256
  });
257
257
  Object.defineProperty(exports, "themeProblems", {
258
258
  enumerable: true,
259
- get: function () { return chunk6QYDPGRS_cjs.themeProblems; }
259
+ get: function () { return chunkUMCOOQT6_cjs.themeProblems; }
260
260
  });
261
261
  Object.defineProperty(exports, "useNativeLifecycle", {
262
262
  enumerable: true,
263
- get: function () { return chunk6QYDPGRS_cjs.useNativeLifecycle; }
263
+ get: function () { return chunkUMCOOQT6_cjs.useNativeLifecycle; }
264
264
  });
265
265
  Object.defineProperty(exports, "useReducedMotion", {
266
266
  enumerable: true,
267
- get: function () { return chunk6QYDPGRS_cjs.useReducedMotion; }
267
+ get: function () { return chunkUMCOOQT6_cjs.useReducedMotion; }
268
268
  });
269
269
  Object.defineProperty(exports, "useTheme", {
270
270
  enumerable: true,
271
- get: function () { return chunk6QYDPGRS_cjs.useTheme; }
271
+ get: function () { return chunkUMCOOQT6_cjs.useTheme; }
272
272
  });
273
273
  //# sourceMappingURL=chat.cjs.map
274
274
  //# sourceMappingURL=chat.cjs.map
package/dist/chat.d.cts CHANGED
@@ -1,11 +1,11 @@
1
1
  export { AgentRuntimeProvider, GreetingStorage, UseAgentConversation, UseAgentLauncher, forgetGreeting, greetedKey, useAgentConversation, useAgentFeatures, useAgentLauncher, useAgentName, useAgentProfile, useAgentRuntime, useAgentStatus, useAgentStatusState } from '@vinaverse/react/agent';
2
- import { b as CardProps, c as ChatHandlers, d as ChatSlots, g as Chip, I as ImagePolicy, H as HeaderProps, h as ComposerProps, j as FailureState, M as MessageBubbleProps } from './context-gHCLFsJh.cjs';
3
- export { C as CardCarousel, a as CardGroupProps, e as ChatStore, f as ChatWarning, E as EmptyStateProps, F as FailureAction, i as FailureProps, L as ListProps, P as ProposalDecision, u as useChat } from './context-gHCLFsJh.cjs';
2
+ import { b as CardProps, c as ChatHandlers, d as ChatSlots, g as Chip, I as ImagePolicy, H as HeaderProps, h as ComposerProps, j as FailureState, M as MessageBubbleProps } from './context-B4ctXjm5.cjs';
3
+ export { C as CardCarousel, a as CardGroupProps, e as ChatStore, f as ChatWarning, E as EmptyStateProps, F as FailureAction, i as FailureProps, L as ListProps, k as MessageTimeProps, P as ProposalDecision, u as useChat } from './context-B4ctXjm5.cjs';
4
4
  import * as react from 'react';
5
- import { ReactNode, ComponentType } from 'react';
5
+ import { ReactNode, ComponentType, ReactElement } from 'react';
6
6
  import * as _vinaverse_client_conversation from '@vinaverse/client/conversation';
7
7
  import { CardItem, Question, ConversationStore, MessageItem, TimelineItem, SystemItem, Welcome as Welcome$1 } from '@vinaverse/client/conversation';
8
- import { AgentKey, AgentPlace, AgentEntryPoint, AgentFailureReason, AgentRating } from '@vinaverse/client/agent';
8
+ import { AgentKey, AgentPlace, AgentPlacePreview, AgentEntryPoint, AgentEntry, AgentAnchorRef, AgentFailureReason, AgentRating } from '@vinaverse/client/agent';
9
9
  import { CopyOverrides } from '@vinaverse/react';
10
10
  import { StyleProp, ViewStyle } from 'react-native';
11
11
  import { a as ThemeOverrides, C as ColorSchemeSetting } from './theme-BhiEGv64.cjs';
@@ -80,8 +80,15 @@ interface VinaverseChatProps extends ChatHandlers {
80
80
  */
81
81
  readonly keyboardBehavior?: 'padding' | 'height' | 'position' | 'none';
82
82
  readonly style?: StyleProp<ViewStyle>;
83
+ /**
84
+ * The AI disclosure the app already holds for this conversation (its cache, or the open's answer): drawn from the
85
+ * first frame until the session's own arrives, in the same bar. Default: the kit's line.
86
+ */
87
+ readonly disclosure?: string;
83
88
  /** Chips for an empty conversation when the session brings no welcome (`Session.welcome` comes first). Keep stable. */
84
89
  readonly starters?: readonly Chip[];
90
+ /** False: the welcome's chips and the starters give way, its text stays (`AgentChat`: a question about an object leads). */
91
+ readonly welcomeChips?: boolean;
85
92
  /** Which card photos are drawn, their frame, and what stands in for one that is not. Keep stable. */
86
93
  readonly imagePolicy?: ImagePolicy;
87
94
  /** One chip above the composer: a question about where the person now is (`AgentChat` offers it when they moved). */
@@ -90,6 +97,19 @@ interface VinaverseChatProps extends ChatHandlers {
90
97
  readonly suggestionTestID?: string;
91
98
  /** Drawn under the composer, inside the kit's providers (`AgentChat`'s thumbs and footer). */
92
99
  readonly footer?: ReactNode;
100
+ /**
101
+ * When each message was sent: its time over the first message and over one after `gapMinutes` (default 10) of quiet,
102
+ * and the exact date and time in every message's screen-reader label, in `locale` and `timeZone`. `false` draws none.
103
+ * The line is the `MessageTime` slot. Default on.
104
+ */
105
+ readonly messageTimes?: boolean | {
106
+ readonly gapMinutes?: number;
107
+ };
108
+ /**
109
+ * Drawn as the conversation's first row, scrolling with it (`AgentChat`: the object asked about, until its verified
110
+ * card takes the same place). Keep it stable.
111
+ */
112
+ readonly listHeader?: ReactElement | null;
93
113
  }
94
114
  /** The providers alone, for a tenant composing its own layout from the exported parts. */
95
115
  declare function VinaverseChatProvider(props: Omit<VinaverseChatProps, 'hideHeader' | 'keyboardVerticalOffset' | 'keyboardBehavior' | 'style' | 'suggestion' | 'suggestionTestID' | 'footer'> & {
@@ -150,14 +170,28 @@ interface AgentChatSlots extends ChatSlots {
150
170
  /** Under the composer; null hides it. Default: thumbs on the newest whole reply, and the privacy link. */
151
171
  readonly Footer?: Slot<AgentFooterProps> | null;
152
172
  }
153
- interface AgentChatProps extends Omit<VinaverseChatProps, 'conversation' | 'components' | 'suggestion' | 'suggestionTestID' | 'footer'> {
173
+ interface AgentChatProps extends Omit<VinaverseChatProps, 'conversation' | 'components' | 'suggestion' | 'suggestionTestID' | 'footer' | 'listHeader' | 'welcomeChips'> {
154
174
  /** Whose conversation: one per person, mode, business and thread. */
155
175
  readonly agentKey: AgentKey;
156
- /** Where the person asks from, told to the agent as a session opens. */
157
- readonly place?: AgentPlace | null;
176
+ /**
177
+ * Where the person asks from, told to the agent as a session opens. Its `preview` (from `AskAboutRow`) is drawn as the
178
+ * conversation's first row, in a card's frame, until the agent's verified card of that object (an `anchor` card)
179
+ * arrives and takes its place; never sent.
180
+ */
181
+ readonly place?: (AgentPlace & {
182
+ readonly preview?: AgentPlacePreview;
183
+ }) | null;
158
184
  /** How the person came in: `launcher` and `ask` from the kit's parts, `deep_link`, or the app's own words. */
159
185
  readonly entryPoint?: AgentEntryPoint | null;
160
- /** The question about this place, offered when the session was told another one (`moved`). */
186
+ /** How the person came in, in the contract's words (`ask_about`); sent only with the runtime's `sendAnchor`. */
187
+ readonly entry?: AgentEntry | null;
188
+ /** The object the conversation is about (contracts#86); sent only with the runtime's `sendAnchor`. */
189
+ readonly anchor?: AgentAnchorRef | null;
190
+ /**
191
+ * The question about this place. At an object (`place.entity`), before the person says anything, it leads: a chip
192
+ * above the composer, the welcome's own chips giving way. Elsewhere it is offered when the session was told another
193
+ * place (`moved`).
194
+ */
161
195
  readonly askAbout?: string | null;
162
196
  /** A person: offered on a failed turn, "couldn't connect" and no agent. */
163
197
  readonly onContact?: () => void;
@@ -256,6 +290,8 @@ declare const Row: react.NamedExoticComponent<{
256
290
  readonly run?: readonly CardItem[] | undefined;
257
291
  /** A card a carousel earlier in the list draws. */
258
292
  readonly inside?: boolean;
293
+ /** The message starts a new stretch: its time is drawn over it (`messageTimes`). */
294
+ readonly time?: string | undefined;
259
295
  }>;
260
296
  declare const MessageList: react.NamedExoticComponent<object>;
261
297