@alexkroman1/aai-ui 0.12.3 → 0.14.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.
Files changed (203) hide show
  1. package/README.md +253 -0
  2. package/dist/_colors-CpZO-88A.js +78 -0
  3. package/dist/_module-url-C13kAJ87.js +15 -0
  4. package/dist/_page-shell.d.ts +11 -0
  5. package/dist/_recover-run.d.ts +79 -0
  6. package/dist/_repeat-until.d.ts +30 -0
  7. package/dist/_run-controls.d.ts +33 -0
  8. package/dist/_submission-state.d.ts +92 -0
  9. package/dist/_tap-to-talk-state.d.ts +88 -0
  10. package/dist/_utils-Mi-SCFA1.js +47 -0
  11. package/dist/_utils.d.ts +26 -0
  12. package/dist/_web-storage.d.ts +43 -0
  13. package/dist/_workflow-api-ref.d.ts +37 -0
  14. package/dist/_workflow-files.d.ts +34 -0
  15. package/dist/_workflow-test-defs.d.ts +34 -0
  16. package/dist/aai-logo-D8pMVn9_.js +85 -0
  17. package/dist/agent-state-labels.d.ts +65 -0
  18. package/dist/agent-state.d.ts +108 -0
  19. package/dist/audio/capture.d.ts +44 -0
  20. package/dist/audio/index.d.ts +18 -0
  21. package/dist/audio/index.js +431 -0
  22. package/dist/audio/preconnect.d.ts +87 -0
  23. package/dist/audio/voice-io.d.ts +112 -0
  24. package/dist/build-default-client.d.ts +1 -0
  25. package/dist/chat-view-BCbI7gD4.js +396 -0
  26. package/dist/client-config-C7fQrioM.js +139 -0
  27. package/dist/client-config.d.ts +119 -0
  28. package/dist/client-dir.d.ts +44 -0
  29. package/dist/client-dir.js +58 -0
  30. package/dist/client-identity.d.ts +131 -0
  31. package/dist/client-tool.d.ts +51 -0
  32. package/dist/components/_colors.d.ts +73 -0
  33. package/dist/components/_form-readiness.d.ts +56 -0
  34. package/dist/components/_form-values.d.ts +19 -0
  35. package/dist/components/aai-logo.d.ts +12 -0
  36. package/dist/components/audio-result.d.ts +94 -0
  37. package/dist/components/auto-scroll.d.ts +74 -0
  38. package/dist/components/bullet-list.d.ts +74 -0
  39. package/dist/components/button.d.ts +29 -21
  40. package/dist/components/button.js +62 -23
  41. package/dist/components/chat-view.d.ts +24 -18
  42. package/dist/components/chat-view.js +2 -60
  43. package/dist/components/console-shell.d.ts +85 -0
  44. package/dist/components/controls.d.ts +21 -6
  45. package/dist/components/controls.js +31 -19
  46. package/dist/components/conversation-view.d.ts +130 -0
  47. package/dist/components/eyebrow.d.ts +12 -0
  48. package/dist/components/facts.d.ts +81 -0
  49. package/dist/components/form-fields.d.ts +142 -0
  50. package/dist/components/form-types.d.ts +73 -0
  51. package/dist/components/form.d.ts +96 -0
  52. package/dist/components/markdown.d.ts +57 -0
  53. package/dist/components/message-list.d.ts +34 -7
  54. package/dist/components/message-list.js +2 -75
  55. package/dist/components/session-controls.d.ts +125 -0
  56. package/dist/components/session-error-banner.d.ts +69 -0
  57. package/dist/components/session-state-dot.d.ts +111 -0
  58. package/dist/components/sidebar-layout.d.ts +31 -10
  59. package/dist/components/sidebar-layout.js +32 -12
  60. package/dist/components/start-screen.d.ts +17 -6
  61. package/dist/components/start-screen.js +34 -14
  62. package/dist/components/tool-call-block.d.ts +15 -14
  63. package/dist/components/tool-call-block.js +2 -117
  64. package/dist/components/tool-call-row.d.ts +75 -0
  65. package/dist/components/tool-config-context.d.ts +22 -0
  66. package/dist/components/upload-progress.d.ts +76 -0
  67. package/dist/components/url-chips.d.ts +29 -0
  68. package/dist/components/workflow-fields.d.ts +46 -0
  69. package/dist/components/workflow-pending-note.d.ts +81 -0
  70. package/dist/components/workflow-progress.d.ts +81 -0
  71. package/dist/components/workflow-run-error.d.ts +48 -0
  72. package/dist/components/workflow-run-panel.d.ts +79 -0
  73. package/dist/context.d.ts +288 -0
  74. package/dist/context.js +382 -0
  75. package/dist/conversation-log.d.ts +88 -0
  76. package/dist/default-client/assets/_module-url-BX0RuRU2.js +1 -0
  77. package/dist/default-client/assets/audio-mpgipo2Q.js +1 -0
  78. package/dist/default-client/assets/capture-processor-D0q7Qrdd.js +90 -0
  79. package/dist/default-client/assets/index-8ihb1Urm.css +2 -0
  80. package/dist/default-client/assets/index-DPfmSFmc.js +126 -0
  81. package/dist/default-client/assets/playback-processor-CjDbc9iH.js +314 -0
  82. package/dist/default-client/favicon.ico +0 -0
  83. package/dist/default-client/index.html +15 -0
  84. package/dist/default-client-entry.d.ts +6 -0
  85. package/dist/default-client.d.ts +19 -0
  86. package/dist/define-client.d.ts +169 -26
  87. package/dist/define-client.js +209 -55
  88. package/dist/eyebrow-UfmSz9yy.js +27 -0
  89. package/dist/hooks-DN4gHYsj.js +182 -0
  90. package/dist/hooks.d.ts +172 -0
  91. package/dist/hooks.js +3 -0
  92. package/dist/hooks.test-d.d.ts +14 -0
  93. package/dist/inbox-protocol.d.ts +128 -0
  94. package/dist/inbox.d.ts +132 -0
  95. package/dist/index.d.ts +126 -29
  96. package/dist/index.js +5500 -15
  97. package/dist/internal.d.ts +43 -0
  98. package/dist/internal.js +8 -0
  99. package/dist/linked-client.d.ts +70 -0
  100. package/dist/message-list-DHZcLhRA.js +682 -0
  101. package/dist/notice-player.d.ts +70 -0
  102. package/dist/page.d.ts +114 -0
  103. package/dist/phone.d.ts +50 -0
  104. package/dist/route-fetch.d.ts +79 -0
  105. package/dist/session/audio-effects.d.ts +37 -0
  106. package/dist/session/audio-setup.d.ts +57 -0
  107. package/dist/session/audio-state.d.ts +157 -0
  108. package/dist/session/browser-session.d.ts +39 -0
  109. package/dist/session/close.d.ts +26 -0
  110. package/dist/session/dial.d.ts +65 -0
  111. package/dist/session/handshake.d.ts +60 -0
  112. package/dist/session/index.d.ts +17 -0
  113. package/dist/session/index.js +2 -0
  114. package/dist/session/messages.d.ts +63 -0
  115. package/dist/session/mic.d.ts +64 -0
  116. package/dist/session/preconnect.d.ts +48 -0
  117. package/dist/session/reconnect.d.ts +25 -0
  118. package/dist/session/resume-store.d.ts +57 -0
  119. package/dist/session/state.d.ts +146 -0
  120. package/dist/session/ticket.d.ts +44 -0
  121. package/dist/session/types.d.ts +476 -0
  122. package/dist/session/url.d.ts +17 -0
  123. package/dist/session/user-turn.d.ts +55 -0
  124. package/dist/session-D9jM5-TF.js +2140 -0
  125. package/dist/stored-value.d.ts +103 -0
  126. package/dist/tool-call-block-uXtMOUWN.js +204 -0
  127. package/dist/tool-config-context-Es4YUzV2.js +19 -0
  128. package/dist/types.d.ts +272 -34
  129. package/dist/types.js +35 -4
  130. package/dist/upload/files.d.ts +83 -0
  131. package/dist/upload/index.d.ts +15 -0
  132. package/dist/upload/pause.d.ts +31 -0
  133. package/dist/upload/recall.d.ts +67 -0
  134. package/dist/upload/report.d.ts +26 -0
  135. package/dist/upload/session.d.ts +99 -0
  136. package/dist/url-chips-oyy_Eiqh.js +239 -0
  137. package/dist/use-client-runs.d.ts +87 -0
  138. package/dist/use-conversation-log.d.ts +86 -0
  139. package/dist/use-conversation.d.ts +131 -0
  140. package/dist/use-copy.d.ts +74 -0
  141. package/dist/use-download-url.d.ts +84 -0
  142. package/dist/use-flash.d.ts +61 -0
  143. package/dist/use-inbox.d.ts +101 -0
  144. package/dist/use-push-to-talk.d.ts +105 -0
  145. package/dist/use-route-mutation.d.ts +113 -0
  146. package/dist/use-route.d.ts +82 -0
  147. package/dist/use-run-key.d.ts +133 -0
  148. package/dist/use-session-controls.d.ts +69 -0
  149. package/dist/use-session-id.d.ts +57 -0
  150. package/dist/use-tap-to-talk.d.ts +138 -0
  151. package/dist/use-user-transcript-uyHhzy4d.js +73 -0
  152. package/dist/use-user-transcript.d.ts +75 -0
  153. package/dist/use-workflow-form.d.ts +285 -0
  154. package/dist/use-workflow-progress.d.ts +137 -0
  155. package/dist/use-workflow-run-DdhWmbx-.js +697 -0
  156. package/dist/use-workflow-run.d.ts +100 -0
  157. package/dist/use-workflow-runs.d.ts +71 -0
  158. package/dist/use-workflow-stream.d.ts +154 -0
  159. package/dist/use-workflows.d.ts +77 -0
  160. package/dist/workflow-client.d.ts +136 -0
  161. package/dist/workflow-def-types.d.ts +31 -0
  162. package/dist/workflow-events.d.ts +39 -0
  163. package/dist/workflow-field-kind.d.ts +95 -0
  164. package/dist/workflow-status-labels.d.ts +35 -0
  165. package/dist/worklets/_module-url.d.ts +10 -0
  166. package/dist/worklets/_playback-bench-harness.d.ts +181 -0
  167. package/dist/worklets/_playback-bench-host.d.ts +63 -0
  168. package/dist/worklets/_playback-bench-page.d.ts +65 -0
  169. package/dist/worklets/_tts-trace-harness.d.ts +142 -0
  170. package/dist/worklets/_worklet-test-utils.d.ts +27 -0
  171. package/dist/worklets/capture-processor.d.ts +4 -2
  172. package/dist/worklets/capture-processor.js +73 -33
  173. package/dist/worklets/playback-processor.d.ts +4 -2
  174. package/dist/worklets/playback-processor.js +258 -42
  175. package/package.json +59 -32
  176. package/styles.css +152 -30
  177. package/dist/_jsdom-setup.d.ts +0 -0
  178. package/dist/audio.d.ts +0 -45
  179. package/dist/audio.js +0 -121
  180. package/dist/client-context.d.ts +0 -33
  181. package/dist/client-context.js +0 -15
  182. package/dist/client-handler.d.ts +0 -43
  183. package/dist/components/app.d.ts +0 -23
  184. package/dist/components/app.js +0 -41
  185. package/dist/components/error-banner.d.ts +0 -21
  186. package/dist/components/error-banner.js +0 -27
  187. package/dist/components/message-bubble.d.ts +0 -23
  188. package/dist/components/message-bubble.js +0 -35
  189. package/dist/components/state-indicator.d.ts +0 -29
  190. package/dist/components/state-indicator.js +0 -37
  191. package/dist/components/thinking-indicator.d.ts +0 -16
  192. package/dist/components/thinking-indicator.js +0 -34
  193. package/dist/components/tool-icons.d.ts +0 -17
  194. package/dist/components/tool-icons.js +0 -128
  195. package/dist/components/transcript.d.ts +0 -25
  196. package/dist/components/transcript.js +0 -35
  197. package/dist/session-CWB7vmqz.js +0 -429
  198. package/dist/session.d.ts +0 -69
  199. package/dist/session.js +0 -2
  200. package/dist/signals.d.ts +0 -120
  201. package/dist/signals.js +0 -161
  202. package/dist/tsdown.config.d.ts +0 -2
  203. package/dist/types.test-d.d.ts +0 -7
@@ -1,37 +0,0 @@
1
- import clsx from "clsx";
2
- import { jsx, jsxs } from "preact/jsx-runtime";
3
- //#region components/state-indicator.tsx
4
- /**
5
- * Colored dot + label showing the current {@link AgentState}.
6
- *
7
- * State-to-color mapping:
8
- * - `disconnected` — gray
9
- * - `connecting` — yellow
10
- * - `ready` — green
11
- * - `listening` — blue
12
- * - `thinking` — purple
13
- * - `speaking` — red
14
- * - `error` — red
15
- *
16
- * @example
17
- * ```tsx
18
- * const { session } = useSession();
19
- * <StateIndicator state={session.state} />
20
- * ```
21
- *
22
- * @param state - A reactive {@link AgentState} value.
23
- * @param className - Additional CSS class names.
24
- *
25
- * @public
26
- */
27
- function StateIndicator({ state, className }) {
28
- return /* @__PURE__ */ jsxs("div", {
29
- class: clsx("inline-flex items-center justify-center gap-1.5 text-[13px] font-medium leading-[130%] text-aai-text-muted capitalize", className),
30
- children: [/* @__PURE__ */ jsx("div", {
31
- "data-state": state.value,
32
- class: "w-2 h-2 rounded-full data-[state=disconnected]:bg-aai-state-disconnected data-[state=connecting]:bg-aai-state-connecting data-[state=ready]:bg-aai-state-ready data-[state=listening]:bg-aai-state-listening data-[state=thinking]:bg-aai-state-thinking data-[state=speaking]:bg-aai-state-speaking data-[state=error]:bg-aai-state-error"
33
- }), state.value]
34
- });
35
- }
36
- //#endregion
37
- export { StateIndicator };
@@ -1,16 +0,0 @@
1
- import type * as preact from "preact";
2
- /**
3
- * Animated three-dot "thinking" indicator shown while the agent is processing.
4
- *
5
- * @example
6
- * ```tsx
7
- * {isThinking && <ThinkingIndicator />}
8
- * ```
9
- *
10
- * @param className - Additional CSS class names.
11
- *
12
- * @public
13
- */
14
- export declare function ThinkingIndicator({ className }: {
15
- className?: string;
16
- }): preact.JSX.Element;
@@ -1,34 +0,0 @@
1
- import clsx from "clsx";
2
- import { jsx } from "preact/jsx-runtime";
3
- //#region components/thinking-indicator.tsx
4
- const DOT_STYLES = [
5
- 0,
6
- .16,
7
- .32
8
- ].map((delay) => ({
9
- animation: "aai-bounce 1.4s infinite ease-in-out both",
10
- animationDelay: `${delay}s`
11
- }));
12
- /**
13
- * Animated three-dot "thinking" indicator shown while the agent is processing.
14
- *
15
- * @example
16
- * ```tsx
17
- * {isThinking && <ThinkingIndicator />}
18
- * ```
19
- *
20
- * @param className - Additional CSS class names.
21
- *
22
- * @public
23
- */
24
- function ThinkingIndicator({ className }) {
25
- return /* @__PURE__ */ jsx("div", {
26
- class: clsx("flex items-center gap-2 text-aai-text-dim text-sm font-medium min-h-5", className),
27
- children: DOT_STYLES.map((style, i) => /* @__PURE__ */ jsx("div", {
28
- class: "w-1.5 h-1.5 rounded-full bg-aai-text-dim",
29
- style
30
- }, i))
31
- });
32
- }
33
- //#endregion
34
- export { ThinkingIndicator };
@@ -1,17 +0,0 @@
1
- import type * as preact from "preact";
2
- type IconProps = {
3
- class?: string;
4
- };
5
- /** Magnifying glass icon for web_search. */
6
- export declare function SearchIcon(props: IconProps): preact.JSX.Element;
7
- /** External link icon for visit_webpage. */
8
- export declare function ExternalLinkIcon(props: IconProps): preact.JSX.Element;
9
- /** Terminal icon for run_code. */
10
- export declare function TerminalIcon(props: IconProps): preact.JSX.Element;
11
- /** Download icon for fetch_json. */
12
- export declare function DownloadIcon(props: IconProps): preact.JSX.Element;
13
- /** Chat bubble icon for user_input. */
14
- export declare function ChatBubbleIcon(props: IconProps): preact.JSX.Element;
15
- /** Bolt/lightning icon for default/unknown tools. */
16
- export declare function BoltIcon(props: IconProps): preact.JSX.Element;
17
- export {};
@@ -1,128 +0,0 @@
1
- import { jsx, jsxs } from "preact/jsx-runtime";
2
- //#region components/tool-icons.tsx
3
- /** Magnifying glass icon for web_search. */
4
- function SearchIcon(props) {
5
- return /* @__PURE__ */ jsxs("svg", {
6
- viewBox: "0 0 16 16",
7
- fill: "none",
8
- stroke: "currentColor",
9
- "stroke-width": "1.5",
10
- class: props.class,
11
- children: [/* @__PURE__ */ jsx("circle", {
12
- cx: "7",
13
- cy: "7",
14
- r: "4.5"
15
- }), /* @__PURE__ */ jsx("path", {
16
- d: "M10.5 10.5L14 14",
17
- "stroke-linecap": "round"
18
- })]
19
- });
20
- }
21
- /** External link icon for visit_webpage. */
22
- function ExternalLinkIcon(props) {
23
- return /* @__PURE__ */ jsxs("svg", {
24
- viewBox: "0 0 16 16",
25
- fill: "none",
26
- stroke: "currentColor",
27
- "stroke-width": "1.5",
28
- class: props.class,
29
- children: [
30
- /* @__PURE__ */ jsx("path", {
31
- d: "M6 2H3a1 1 0 00-1 1v10a1 1 0 001 1h10a1 1 0 001-1v-3",
32
- "stroke-linecap": "round"
33
- }),
34
- /* @__PURE__ */ jsx("path", {
35
- d: "M9 2h5v5",
36
- "stroke-linecap": "round",
37
- "stroke-linejoin": "round"
38
- }),
39
- /* @__PURE__ */ jsx("path", {
40
- d: "M14 2L7 9",
41
- "stroke-linecap": "round"
42
- })
43
- ]
44
- });
45
- }
46
- /** Terminal icon for run_code. */
47
- function TerminalIcon(props) {
48
- return /* @__PURE__ */ jsxs("svg", {
49
- viewBox: "0 0 16 16",
50
- fill: "none",
51
- stroke: "currentColor",
52
- "stroke-width": "1.5",
53
- class: props.class,
54
- children: [
55
- /* @__PURE__ */ jsx("rect", {
56
- x: "1",
57
- y: "2",
58
- width: "14",
59
- height: "12",
60
- rx: "1.5"
61
- }),
62
- /* @__PURE__ */ jsx("path", {
63
- d: "M4 6l3 2.5L4 11",
64
- "stroke-linecap": "round",
65
- "stroke-linejoin": "round"
66
- }),
67
- /* @__PURE__ */ jsx("path", {
68
- d: "M9 11h3",
69
- "stroke-linecap": "round"
70
- })
71
- ]
72
- });
73
- }
74
- /** Download icon for fetch_json. */
75
- function DownloadIcon(props) {
76
- return /* @__PURE__ */ jsxs("svg", {
77
- viewBox: "0 0 16 16",
78
- fill: "none",
79
- stroke: "currentColor",
80
- "stroke-width": "1.5",
81
- class: props.class,
82
- children: [
83
- /* @__PURE__ */ jsx("path", {
84
- d: "M8 2v9",
85
- "stroke-linecap": "round"
86
- }),
87
- /* @__PURE__ */ jsx("path", {
88
- d: "M4.5 8L8 11.5 11.5 8",
89
- "stroke-linecap": "round",
90
- "stroke-linejoin": "round"
91
- }),
92
- /* @__PURE__ */ jsx("path", {
93
- d: "M2 13h12",
94
- "stroke-linecap": "round"
95
- })
96
- ]
97
- });
98
- }
99
- /** Chat bubble icon for user_input. */
100
- function ChatBubbleIcon(props) {
101
- return /* @__PURE__ */ jsx("svg", {
102
- viewBox: "0 0 16 16",
103
- fill: "none",
104
- stroke: "currentColor",
105
- "stroke-width": "1.5",
106
- class: props.class,
107
- children: /* @__PURE__ */ jsx("path", {
108
- d: "M2 3a1 1 0 011-1h10a1 1 0 011 1v7a1 1 0 01-1 1H5l-3 3V3z",
109
- "stroke-linejoin": "round"
110
- })
111
- });
112
- }
113
- /** Bolt/lightning icon for default/unknown tools. */
114
- function BoltIcon(props) {
115
- return /* @__PURE__ */ jsx("svg", {
116
- viewBox: "0 0 16 16",
117
- fill: "none",
118
- stroke: "currentColor",
119
- "stroke-width": "1.5",
120
- class: props.class,
121
- children: /* @__PURE__ */ jsx("path", {
122
- d: "M9 1L3 9h5l-1 6 6-8H8l1-6z",
123
- "stroke-linejoin": "round"
124
- })
125
- });
126
- }
127
- //#endregion
128
- export { BoltIcon, ChatBubbleIcon, DownloadIcon, ExternalLinkIcon, SearchIcon, TerminalIcon };
@@ -1,25 +0,0 @@
1
- import type * as preact from "preact";
2
- import type { Reactive } from "../types.ts";
3
- /**
4
- * Live speech-to-text transcript shown while the user is speaking.
5
- * Returns `null` when there is no active utterance.
6
- *
7
- * Displays a {@link ThinkingIndicator} while waiting for the first
8
- * transcription text (i.e., `userUtterance` is `""`).
9
- *
10
- * @example
11
- * ```tsx
12
- * const { session } = useSession();
13
- * <Transcript userUtterance={session.userUtterance} />
14
- * ```
15
- *
16
- * @param userUtterance - Reactive string (`null` when idle, `""` when
17
- * listening but no text yet, or the transcript text).
18
- * @param className - Additional CSS class names.
19
- *
20
- * @public
21
- */
22
- export declare function Transcript({ userUtterance, className, }: {
23
- userUtterance: Reactive<string | null>;
24
- className?: string;
25
- }): preact.JSX.Element | null;
@@ -1,35 +0,0 @@
1
- import { ThinkingIndicator } from "./thinking-indicator.js";
2
- import clsx from "clsx";
3
- import { jsx } from "preact/jsx-runtime";
4
- //#region components/transcript.tsx
5
- /**
6
- * Live speech-to-text transcript shown while the user is speaking.
7
- * Returns `null` when there is no active utterance.
8
- *
9
- * Displays a {@link ThinkingIndicator} while waiting for the first
10
- * transcription text (i.e., `userUtterance` is `""`).
11
- *
12
- * @example
13
- * ```tsx
14
- * const { session } = useSession();
15
- * <Transcript userUtterance={session.userUtterance} />
16
- * ```
17
- *
18
- * @param userUtterance - Reactive string (`null` when idle, `""` when
19
- * listening but no text yet, or the transcript text).
20
- * @param className - Additional CSS class names.
21
- *
22
- * @public
23
- */
24
- function Transcript({ userUtterance, className }) {
25
- if (userUtterance.value === null) return null;
26
- return /* @__PURE__ */ jsx("div", {
27
- class: clsx("flex flex-col items-end w-full", className),
28
- children: /* @__PURE__ */ jsx("div", {
29
- class: "max-w-[min(82%,64ch)] whitespace-pre-wrap wrap-break-word text-sm leading-[150%] text-aai-text-muted bg-aai-surface-faint border border-aai-border px-3 py-2 rounded-aai ml-auto",
30
- children: userUtterance.value || /* @__PURE__ */ jsx(ThinkingIndicator, {})
31
- })
32
- });
33
- }
34
- //#endregion
35
- export { Transcript };