@alexkroman1/aai-ui 0.12.3 → 0.13.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/README.md +257 -0
- package/dist/_colors-CpZO-88A.js +78 -0
- package/dist/_module-url-C13kAJ87.js +15 -0
- package/dist/_page-shell.d.ts +11 -0
- package/dist/_recover-run.d.ts +79 -0
- package/dist/_repeat-until.d.ts +30 -0
- package/dist/_run-controls.d.ts +33 -0
- package/dist/_submission-state.d.ts +92 -0
- package/dist/_tap-to-talk-state.d.ts +88 -0
- package/dist/_utils-Mi-SCFA1.js +47 -0
- package/dist/_utils.d.ts +26 -0
- package/dist/_web-storage.d.ts +43 -0
- package/dist/_workflow-api-ref.d.ts +37 -0
- package/dist/_workflow-files.d.ts +34 -0
- package/dist/_workflow-test-defs.d.ts +38 -0
- package/dist/aai-logo-D8pMVn9_.js +85 -0
- package/dist/agent-state-labels.d.ts +65 -0
- package/dist/agent-state.d.ts +108 -0
- package/dist/audio/capture.d.ts +44 -0
- package/dist/audio/index.d.ts +18 -0
- package/dist/audio/index.js +431 -0
- package/dist/audio/preconnect.d.ts +87 -0
- package/dist/audio/voice-io.d.ts +112 -0
- package/dist/build-default-client.d.ts +1 -0
- package/dist/chat-view-BCbI7gD4.js +396 -0
- package/dist/client-config-C7fQrioM.js +139 -0
- package/dist/client-config.d.ts +119 -0
- package/dist/client-dir.d.ts +44 -0
- package/dist/client-dir.js +58 -0
- package/dist/client-identity.d.ts +131 -0
- package/dist/client-tool.d.ts +51 -0
- package/dist/components/_colors.d.ts +73 -0
- package/dist/components/_form-readiness.d.ts +56 -0
- package/dist/components/_form-values.d.ts +19 -0
- package/dist/components/aai-logo.d.ts +12 -0
- package/dist/components/audio-result.d.ts +94 -0
- package/dist/components/auto-scroll.d.ts +74 -0
- package/dist/components/bullet-list.d.ts +74 -0
- package/dist/components/button.d.ts +29 -21
- package/dist/components/button.js +62 -23
- package/dist/components/chat-view.d.ts +24 -18
- package/dist/components/chat-view.js +2 -60
- package/dist/components/console-shell.d.ts +85 -0
- package/dist/components/controls.d.ts +21 -6
- package/dist/components/controls.js +31 -19
- package/dist/components/conversation-view.d.ts +130 -0
- package/dist/components/eyebrow.d.ts +12 -0
- package/dist/components/facts.d.ts +81 -0
- package/dist/components/form-fields.d.ts +142 -0
- package/dist/components/form-types.d.ts +73 -0
- package/dist/components/form.d.ts +96 -0
- package/dist/components/markdown.d.ts +57 -0
- package/dist/components/message-list.d.ts +34 -7
- package/dist/components/message-list.js +2 -75
- package/dist/components/session-controls.d.ts +125 -0
- package/dist/components/session-error-banner.d.ts +69 -0
- package/dist/components/session-state-dot.d.ts +111 -0
- package/dist/components/sidebar-layout.d.ts +31 -10
- package/dist/components/sidebar-layout.js +32 -12
- package/dist/components/start-screen.d.ts +17 -6
- package/dist/components/start-screen.js +34 -14
- package/dist/components/tool-call-block.d.ts +15 -14
- package/dist/components/tool-call-block.js +2 -117
- package/dist/components/tool-call-row.d.ts +75 -0
- package/dist/components/tool-config-context.d.ts +22 -0
- package/dist/components/upload-progress.d.ts +76 -0
- package/dist/components/url-chips.d.ts +29 -0
- package/dist/components/workflow-fields.d.ts +46 -0
- package/dist/components/workflow-pending-note.d.ts +81 -0
- package/dist/components/workflow-progress.d.ts +81 -0
- package/dist/components/workflow-run-error.d.ts +48 -0
- package/dist/components/workflow-run-panel.d.ts +79 -0
- package/dist/context.d.ts +288 -0
- package/dist/context.js +382 -0
- package/dist/conversation-log.d.ts +88 -0
- package/dist/default-client/assets/_module-url-BX0RuRU2.js +1 -0
- package/dist/default-client/assets/audio-cGFGID-2.js +1 -0
- package/dist/default-client/assets/capture-processor-BUABoo3_.js +90 -0
- package/dist/default-client/assets/index-8ihb1Urm.css +2 -0
- package/dist/default-client/assets/index-BQURVARl.js +126 -0
- package/dist/default-client/assets/playback-processor-ABOa11j0.js +314 -0
- package/dist/default-client/favicon.ico +0 -0
- package/dist/default-client/index.html +15 -0
- package/dist/default-client.d.ts +23 -0
- package/dist/define-client.d.ts +162 -26
- package/dist/define-client.js +201 -55
- package/dist/eyebrow-UfmSz9yy.js +27 -0
- package/dist/hooks-DN4gHYsj.js +182 -0
- package/dist/hooks.d.ts +172 -0
- package/dist/hooks.js +3 -0
- package/dist/hooks.test-d.d.ts +14 -0
- package/dist/inbox-protocol.d.ts +128 -0
- package/dist/inbox.d.ts +132 -0
- package/dist/index.d.ts +126 -29
- package/dist/index.js +5500 -15
- package/dist/internal.d.ts +43 -0
- package/dist/internal.js +8 -0
- package/dist/linked-client.d.ts +70 -0
- package/dist/message-list-DHZcLhRA.js +682 -0
- package/dist/notice-player.d.ts +70 -0
- package/dist/page.d.ts +114 -0
- package/dist/phone.d.ts +50 -0
- package/dist/route-fetch.d.ts +79 -0
- package/dist/session/audio-effects.d.ts +31 -0
- package/dist/session/audio-setup.d.ts +57 -0
- package/dist/session/audio-state.d.ts +157 -0
- package/dist/session/browser-session.d.ts +30 -0
- package/dist/session/close.d.ts +26 -0
- package/dist/session/dial.d.ts +65 -0
- package/dist/session/handshake.d.ts +60 -0
- package/dist/session/index.d.ts +17 -0
- package/dist/session/index.js +2 -0
- package/dist/session/messages.d.ts +63 -0
- package/dist/session/mic.d.ts +64 -0
- package/dist/session/preconnect.d.ts +48 -0
- package/dist/session/reconnect.d.ts +25 -0
- package/dist/session/resume-store.d.ts +57 -0
- package/dist/session/state.d.ts +146 -0
- package/dist/session/ticket.d.ts +44 -0
- package/dist/session/types.d.ts +476 -0
- package/dist/session/url.d.ts +17 -0
- package/dist/session/user-turn.d.ts +55 -0
- package/dist/session-CE0Ipsb3.js +2129 -0
- package/dist/stored-value.d.ts +103 -0
- package/dist/tool-call-block-uXtMOUWN.js +204 -0
- package/dist/tool-config-context-Es4YUzV2.js +19 -0
- package/dist/types.d.ts +272 -34
- package/dist/types.js +35 -4
- package/dist/upload/files.d.ts +83 -0
- package/dist/upload/index.d.ts +15 -0
- package/dist/upload/pause.d.ts +31 -0
- package/dist/upload/recall.d.ts +67 -0
- package/dist/upload/report.d.ts +26 -0
- package/dist/upload/session.d.ts +99 -0
- package/dist/url-chips-oyy_Eiqh.js +239 -0
- package/dist/use-client-runs.d.ts +87 -0
- package/dist/use-conversation-log.d.ts +86 -0
- package/dist/use-conversation.d.ts +131 -0
- package/dist/use-copy.d.ts +74 -0
- package/dist/use-download-url.d.ts +84 -0
- package/dist/use-flash.d.ts +61 -0
- package/dist/use-inbox.d.ts +101 -0
- package/dist/use-push-to-talk.d.ts +105 -0
- package/dist/use-route-mutation.d.ts +113 -0
- package/dist/use-route.d.ts +82 -0
- package/dist/use-run-key.d.ts +133 -0
- package/dist/use-session-controls.d.ts +69 -0
- package/dist/use-session-id.d.ts +57 -0
- package/dist/use-tap-to-talk.d.ts +138 -0
- package/dist/use-user-transcript-uyHhzy4d.js +73 -0
- package/dist/use-user-transcript.d.ts +75 -0
- package/dist/use-workflow-form.d.ts +285 -0
- package/dist/use-workflow-progress.d.ts +137 -0
- package/dist/use-workflow-run-DdhWmbx-.js +697 -0
- package/dist/use-workflow-run.d.ts +100 -0
- package/dist/use-workflow-runs.d.ts +71 -0
- package/dist/use-workflow-stream.d.ts +154 -0
- package/dist/use-workflows.d.ts +77 -0
- package/dist/workflow-client.d.ts +136 -0
- package/dist/workflow-def-types.d.ts +31 -0
- package/dist/workflow-events.d.ts +39 -0
- package/dist/workflow-field-kind.d.ts +95 -0
- package/dist/workflow-status-labels.d.ts +35 -0
- package/dist/worklets/_module-url.d.ts +10 -0
- package/dist/worklets/_playback-bench-harness.d.ts +181 -0
- package/dist/worklets/_playback-bench-host.d.ts +63 -0
- package/dist/worklets/_playback-bench-page.d.ts +65 -0
- package/dist/worklets/_tts-trace-harness.d.ts +142 -0
- package/dist/worklets/_worklet-test-utils.d.ts +27 -0
- package/dist/worklets/capture-processor.d.ts +4 -2
- package/dist/worklets/capture-processor.js +73 -33
- package/dist/worklets/playback-processor.d.ts +4 -2
- package/dist/worklets/playback-processor.js +258 -42
- package/package.json +57 -32
- package/styles.css +152 -30
- package/dist/audio.d.ts +0 -45
- package/dist/audio.js +0 -121
- package/dist/client-context.d.ts +0 -33
- package/dist/client-context.js +0 -15
- package/dist/client-handler.d.ts +0 -43
- package/dist/components/app.d.ts +0 -23
- package/dist/components/app.js +0 -41
- package/dist/components/error-banner.d.ts +0 -21
- package/dist/components/error-banner.js +0 -27
- package/dist/components/message-bubble.d.ts +0 -23
- package/dist/components/message-bubble.js +0 -35
- package/dist/components/state-indicator.d.ts +0 -29
- package/dist/components/state-indicator.js +0 -37
- package/dist/components/thinking-indicator.d.ts +0 -16
- package/dist/components/thinking-indicator.js +0 -34
- package/dist/components/tool-icons.d.ts +0 -17
- package/dist/components/tool-icons.js +0 -128
- package/dist/components/transcript.d.ts +0 -25
- package/dist/components/transcript.js +0 -35
- package/dist/session-CWB7vmqz.js +0 -429
- package/dist/session.d.ts +0 -69
- package/dist/session.js +0 -2
- package/dist/signals.d.ts +0 -120
- package/dist/signals.js +0 -161
- package/dist/tsdown.config.d.ts +0 -2
- package/dist/types.test-d.d.ts +0 -7
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@alexkroman1/aai-ui/internal` — the plumbing `mountClient()` and the default
|
|
3
|
+
* client install for themselves, NOT part of the public client API and not
|
|
4
|
+
* covered by semver. A `client.tsx` should never import from here; everything
|
|
5
|
+
* an author writes a page or a custom chrome against lives on the root export
|
|
6
|
+
* and the documented subpaths.
|
|
7
|
+
*
|
|
8
|
+
* These names used to ride on the root barrel, tagged `@internal` and nothing
|
|
9
|
+
* else, which meant they were in a client author's autocomplete beside
|
|
10
|
+
* `mountClient()`, `<Form>`, `useAgentState` and `useWorkflowRun` — eight symbols an
|
|
11
|
+
* author is invited to reach for and no capability contract covers. Keeping
|
|
12
|
+
* them on their own subpath keeps the root importable surface the same shape as
|
|
13
|
+
* the promise: what is on it is contracted.
|
|
14
|
+
*
|
|
15
|
+
* A release tag cannot do this from the barrel. API Extractor reads `@internal`
|
|
16
|
+
* at the DECLARATION site, so a tag written on a re-export clause member is
|
|
17
|
+
* silently ignored and the name stays `@public` in the report — and the
|
|
18
|
+
* contract exemption in `contracts/internal-surface.json` is per SUBPATH, so a
|
|
19
|
+
* tag on the root barrel buys an entry on that ratchet rather than removing
|
|
20
|
+
* one. A subpath is the mechanism, the same one `@alexkroman1/aai` and
|
|
21
|
+
* `@alexkroman1/aai-runtime` already use, and `NON_AUTHORING_SUBPATHS` in
|
|
22
|
+
* `scripts/_api-contracts-tree.mjs` carries the matching entry so a name
|
|
23
|
+
* arriving here joins no capability contract.
|
|
24
|
+
*
|
|
25
|
+
* The corollary is the rule for adding to this file, and it runs the other way
|
|
26
|
+
* too: a name that WANTS to be public gets its `@internal` tag removed and
|
|
27
|
+
* joins a capability contract — it does not stay on the barrel wearing a tag.
|
|
28
|
+
* That is what happened to `fetchClientConfig`, which the SDK's own `@public`
|
|
29
|
+
* prose told a workflow-app author to call while the export excluded it.
|
|
30
|
+
*
|
|
31
|
+
* Named re-exports rather than `export *`: the wildcard form needs a
|
|
32
|
+
* `noReExportAll` suppression, and the escape-hatch ratchet only moves down.
|
|
33
|
+
*
|
|
34
|
+
* @module internal
|
|
35
|
+
*/
|
|
36
|
+
export { buildAgentUrl, loadClientConfig } from "./client-config.ts";
|
|
37
|
+
export { ToolConfigContext } from "./components/tool-config-context.ts";
|
|
38
|
+
export { ApiUrlChip, SessionUrlChips, UiUrlChip } from "./components/url-chips.tsx";
|
|
39
|
+
export { SessionProvider, ThemeProvider } from "./context.ts";
|
|
40
|
+
export { VOICE_CAPTURE_CONSTRAINTS } from "./types.ts";
|
|
41
|
+
export { TRANSCRIBING_PLACEHOLDER } from "./use-user-transcript.ts";
|
|
42
|
+
export { DEFAULT_PROGRESS_POLL_MS } from "./use-workflow-progress.ts";
|
|
43
|
+
export { DEFAULT_WORKFLOW_POLL_MS, MAX_MISSING_READS } from "./use-workflow-run.ts";
|
package/dist/internal.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { r as loadClientConfig, t as buildAgentUrl } from "./client-config-C7fQrioM.js";
|
|
2
|
+
import { SessionProvider, ThemeProvider } from "./context.js";
|
|
3
|
+
import { n as SessionUrlChips, r as UiUrlChip, t as ApiUrlChip } from "./url-chips-oyy_Eiqh.js";
|
|
4
|
+
import { t as TRANSCRIBING_PLACEHOLDER } from "./use-user-transcript-uyHhzy4d.js";
|
|
5
|
+
import { t as ToolConfigContext } from "./tool-config-context-Es4YUzV2.js";
|
|
6
|
+
import { i as DEFAULT_PROGRESS_POLL_MS, n as MAX_MISSING_READS, t as DEFAULT_WORKFLOW_POLL_MS } from "./use-workflow-run-DdhWmbx-.js";
|
|
7
|
+
import { VOICE_CAPTURE_CONSTRAINTS } from "./types.js";
|
|
8
|
+
export { ApiUrlChip, DEFAULT_PROGRESS_POLL_MS, DEFAULT_WORKFLOW_POLL_MS, MAX_MISSING_READS, SessionProvider, SessionUrlChips, TRANSCRIBING_PLACEHOLDER, ThemeProvider, ToolConfigContext, UiUrlChip, VOICE_CAPTURE_CONSTRAINTS, buildAgentUrl, loadClientConfig };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `createLinkedClient` — which client this page IS: a device it was linked to
|
|
3
|
+
* (by a spoken code, a QR scan, a pairing flow of the app's own), else this
|
|
4
|
+
* browser's own `browserClientId()`.
|
|
5
|
+
*
|
|
6
|
+
* A page linked to a speaker becomes the speaker's twin: it sends the
|
|
7
|
+
* speaker's id as `?client=`, so its sessions join the speaker's durable
|
|
8
|
+
* conversation and its inbox takes the speaker's reminders. Every such page
|
|
9
|
+
* kept the link in `localStorage` and wrote the same read-validate-fallback;
|
|
10
|
+
* the part worth having once is the VALIDATION — a stored id that is not a
|
|
11
|
+
* client id (letters, digits, `-`, `_`, at most 64) is treated as no link, so
|
|
12
|
+
* a corrupted entry falls back to the browser's own id rather than being sent
|
|
13
|
+
* and ignored by the server (a session with no client at all).
|
|
14
|
+
*
|
|
15
|
+
* @module
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Options for {@link createLinkedClient}.
|
|
19
|
+
*
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
export type LinkedClientOptions = {
|
|
23
|
+
/** The `localStorage` key the link is kept under, used as given — choose one that is yours. */
|
|
24
|
+
key: string;
|
|
25
|
+
/**
|
|
26
|
+
* This browser's own id, used while unlinked. Default: {@link browserClientId}
|
|
27
|
+
* for the page's agent — pass your own to carry over an id minted before.
|
|
28
|
+
*/
|
|
29
|
+
fallback?: (() => string) | undefined;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Which client a page is — see {@link createLinkedClient}.
|
|
33
|
+
*
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
36
|
+
export type LinkedClient = {
|
|
37
|
+
/** The client this page is now: the linked one, else this browser's own. */
|
|
38
|
+
id(): string;
|
|
39
|
+
/** The linked client, or `undefined` while unlinked. */
|
|
40
|
+
linked(): string | undefined;
|
|
41
|
+
/** This browser's own id, linked or not — what it asks for a link code AS. */
|
|
42
|
+
own(): string;
|
|
43
|
+
/**
|
|
44
|
+
* Link to `id` (`undefined` unlinks). An invalid id unlinks too. Takes effect
|
|
45
|
+
* on the next read — a mounted session's next connection attempt, since
|
|
46
|
+
* `mountClient({ client })` asks per attempt; reload to move the inbox too.
|
|
47
|
+
*/
|
|
48
|
+
set(id: string | undefined): void;
|
|
49
|
+
/** Unlink: back to this browser's own id. */
|
|
50
|
+
clear(): void;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* A page's client id with a link on top — see this module's doc.
|
|
54
|
+
*
|
|
55
|
+
* @example A page that can be linked to a speaker
|
|
56
|
+
* ```ts
|
|
57
|
+
* import { createLinkedClient, mountClient } from "@alexkroman1/aai-ui";
|
|
58
|
+
*
|
|
59
|
+
* const client = createLinkedClient({ key: "my-speaker:linked" });
|
|
60
|
+
*
|
|
61
|
+
* mountClient({ client: client.id });
|
|
62
|
+
* // …after the speaker reads out its id: client.set(spokenId); location.reload();
|
|
63
|
+
* ```
|
|
64
|
+
*
|
|
65
|
+
* @param options - Where the link is kept, and the unlinked id; see {@link LinkedClientOptions}.
|
|
66
|
+
* @returns The handle; see {@link LinkedClient}.
|
|
67
|
+
*
|
|
68
|
+
* @public
|
|
69
|
+
*/
|
|
70
|
+
export declare function createLinkedClient(options: LinkedClientOptions): LinkedClient;
|