guideai-app 0.5.4-2 → 0.5.4-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/README.md +64 -1
- package/dist/GuideAI.d.ts +2 -5
- package/dist/GuideAI.js +1 -1
- package/dist/GuideAI.js.LICENSE.txt +2 -17
- package/dist/components/DeveloperTools.d.ts +5 -3
- package/dist/components/Microphone.d.ts +10 -1
- package/dist/components/PlaybackLockDebugOverlayRoot.d.ts +1 -1
- package/dist/components/SessionRatingPopup.d.ts +16 -0
- package/dist/components/SubtitleInputBar.d.ts +23 -0
- package/dist/components/SubtitleSettingsMenu.d.ts +9 -0
- package/dist/components/TranscriptBox.d.ts +11 -12
- package/dist/components/TranscriptSessionMicLevels.d.ts +8 -0
- package/dist/components/TranscriptStudioChrome.d.ts +8 -7
- package/dist/components/TranscriptTextInput.d.ts +4 -12
- package/dist/components/TranscriptToolbar.d.ts +3 -1
- package/dist/components/TranscriptWorkflowDrawer.d.ts +5 -7
- package/dist/contexts/GuideAIThemeContext.d.ts +13 -0
- package/dist/devtools/DeveloperToolsShell.d.ts +1 -1
- package/dist/devtools/TranscriptDeveloperToolsMenuItems.d.ts +45 -0
- package/dist/devtools/TranscriptUiDevtoolsPanel.d.ts +10 -0
- package/dist/devtools/adminToolDiagnostics/AdminToolDiagnosticsPanel.d.ts +1 -1
- package/dist/devtools/developerToolPanelId.d.ts +1 -1
- package/dist/devtools/devtoolsAdminPortalLinks.d.ts +11 -0
- package/dist/devtools/devtoolsAuth/DevtoolsAuthContext.d.ts +14 -0
- package/dist/devtools/devtoolsAuth/DevtoolsLoginModal.d.ts +13 -0
- package/dist/devtools/devtoolsAuth/devtoolsAccessTrigger.d.ts +9 -0
- package/dist/devtools/devtoolsAuth/devtoolsAdminApi.d.ts +13 -0
- package/dist/devtools/devtoolsAuth/devtoolsLoginModalStyles.d.ts +1 -0
- package/dist/devtools/devtoolsAuth/devtoolsPortalLogin.d.ts +15 -0
- package/dist/devtools/devtoolsAuth/devtoolsSessionStorage.d.ts +4 -0
- package/dist/devtools/devtoolsAuth/index.d.ts +9 -0
- package/dist/devtools/devtoolsAuth/types.d.ts +21 -0
- package/dist/devtools/devtoolsAuth/useDevtoolsAccess.d.ts +33 -0
- package/dist/devtools/devtoolsThemePreference.d.ts +3 -0
- package/dist/devtools/excavator/ExcavatorPanel.d.ts +17 -0
- package/dist/devtools/excavator/excavatorPanelStyles.d.ts +5 -0
- package/dist/devtools/excavator/excavatorSse.d.ts +6 -0
- package/dist/devtools/learn/LearnCaptureChrome.stub.d.ts +3 -0
- package/dist/devtools/learn/LearnModePanel.d.ts +18 -0
- package/dist/devtools/learn/LearnModePanel.stub.d.ts +3 -0
- package/dist/devtools/learn/LearnOrchestrationHost.d.ts +52 -0
- package/dist/devtools/learn/injectLearnModeStyles.d.ts +2 -0
- package/dist/devtools/learn/learnCaptureChrome.d.ts +33 -0
- package/dist/devtools/learn/learnCaptureLayout.d.ts +26 -0
- package/dist/devtools/learn/learnCaptureToolbar.d.ts +27 -0
- package/dist/devtools/learn/learnClarifyKickoff.d.ts +6 -0
- package/dist/devtools/learn/learnLiteTranscript.d.ts +22 -0
- package/dist/devtools/learn/learnModeStyles.d.ts +5 -0
- package/dist/devtools/learn/learnModeTypes.d.ts +5 -0
- package/dist/devtools/learn/learnOrchestrationStub.d.ts +5 -0
- package/dist/devtools/learn/learnPanelSyncFieldsEqual.d.ts +3 -0
- package/dist/devtools/learn/learnRealtimeSession.d.ts +10 -0
- package/dist/devtools/learn/learnRefBag.d.ts +41 -0
- package/dist/devtools/learn/learnSessionStorage.d.ts +23 -0
- package/dist/devtools/learn/learnWorkspaceContext.d.ts +5 -0
- package/dist/devtools/learn/loadLearnOrchestration.d.ts +10 -0
- package/dist/devtools/learn/useLearnCaptureDuration.d.ts +4 -0
- package/dist/devtools/learn/useLearnClickCapture.d.ts +9 -0
- package/dist/devtools/learn/useLearnMode.d.ts +47 -0
- package/dist/devtools/learn/useLearnMode.stub.d.ts +3 -0
- package/dist/devtools/panelLayout.d.ts +6 -0
- package/dist/devtools/transcriptDevtoolsMenuProps.d.ts +28 -0
- package/dist/devtools/transcriptMoreMenu/DeveloperToolsAdminPortalFlyout.d.ts +20 -0
- package/dist/devtools/transcriptMoreMenu/DeveloperToolsLoggerFlyout.d.ts +16 -0
- package/dist/devtools/transcriptMoreMenu/DeveloperToolsMicPresetFlyout.d.ts +22 -0
- package/dist/devtools/transcriptMoreMenu/TranscriptDeveloperToolsMenuItems.d.ts +21 -0
- package/dist/devtools/transcriptMoreMenu/TranscriptDeveloperToolsThemeFlyout.d.ts +13 -0
- package/dist/devtools/transcriptMoreMenu/TranscriptMoreMenuDevtools.d.ts +27 -0
- package/dist/devtools/transcriptMoreMenu/devtoolsFlyoutTypes.d.ts +1 -0
- package/dist/devtools/transcriptMoreMenu/index.d.ts +2 -0
- package/dist/devtools/transcriptMoreMenu/readWindowGuideAILogger.d.ts +12 -0
- package/dist/devtools/transcriptMoreMenu/useTranscriptMoreMenuDebugFlyouts.d.ts +24 -0
- package/dist/devtools/useDraggableDialog.d.ts +8 -1
- package/dist/devtools/useGuideDeveloperTools.d.ts +16 -7
- package/dist/devtools/useGuideDevtoolsIntegration.d.ts +51 -0
- package/dist/devtools/workflowTester/WorkflowTesterPanel.d.ts +4 -28
- package/dist/devtools/workflowTester/WorkflowTesterPanel.stub.d.ts +3 -0
- package/dist/devtools/workflowTester/index.d.ts +1 -2
- package/dist/devtools/workflowTester/useWorkflowSimulationController.d.ts +12 -0
- package/dist/devtools/workflowTester/useWorkflowSimulationRun.d.ts +47 -0
- package/dist/devtools/workflowTester/workflowSimulationController.d.ts +31 -0
- package/dist/devtools/workflowTester/workflowSimulationDevtoolsApi.d.ts +51 -0
- package/dist/devtools/workflowTester/workflowSimulationRunner.d.ts +46 -0
- package/dist/devtools/workflowTester/workflowSimulationRunnerAi.d.ts +20 -0
- package/dist/devtools/workflowTester/workflowSimulationSessionRestore.d.ts +21 -0
- package/dist/devtools/workflowTester/workflowSimulationTurnState.d.ts +20 -0
- package/dist/devtools/workflowTester/workflowSimulationTypes.d.ts +26 -0
- package/dist/devtools/workflowTester/workflowSimulationWaits.d.ts +55 -0
- package/dist/devtools/workflowTester/workflowTesterPanel.types.d.ts +25 -0
- package/dist/devtools/workflowTester/workflowTesterRunSessionStorage.d.ts +43 -0
- package/dist/devtools/workflowTester/workflowTesterWorkspaceBridge.d.ts +4 -2
- package/dist/hooks/useConversationSession.d.ts +14 -2
- package/dist/hooks/useGuideAIMutePipeline.d.ts +1 -0
- package/dist/hooks/useGuideAIThemeState.d.ts +6 -0
- package/dist/hooks/useMicMute.d.ts +1 -0
- package/dist/hooks/useSessionRating.d.ts +25 -0
- package/dist/hooks/useSubtitleAppearancePrefs.d.ts +5 -0
- package/dist/hooks/useThemePortalProps.d.ts +4 -0
- package/dist/hooks/useTranscriptChrome.d.ts +7 -2
- package/dist/hooks/useTranscriptDisplayMode.d.ts +6 -0
- package/dist/hooks/useTranscriptPanelDragResize.d.ts +47 -0
- package/dist/hooks/useWebRTC.d.ts +3 -0
- package/dist/hooks/useWidgetWorkflowSession.d.ts +2 -0
- package/dist/hooks/useWorkflowTesterOverlay.d.ts +7 -0
- package/dist/hooks/useWorkspaceCatalog.d.ts +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/playwrightSimulationHarness.d.ts +16 -0
- package/dist/playwrightSimulationHarness.js +1 -0
- package/dist/playwrightToolHarness.js +1 -1
- package/dist/sessionRating.defaults.d.ts +4 -0
- package/dist/sessionRatingPrompts.d.ts +3 -0
- package/dist/staticContext/useStaticContext.d.ts +0 -1
- package/dist/stubs/workspaces.d.ts +2 -2
- package/dist/styles/guideAIThemeTokens.d.ts +5 -0
- package/dist/styles/guideaiTestsiteWidgetTheme.d.ts +6 -0
- package/dist/themes/buildThemeCss.d.ts +8 -0
- package/dist/themes/guideAIThemeIds.d.ts +5 -0
- package/dist/themes/presetThemes.d.ts +10 -0
- package/dist/themes/syncGuideAITheme.d.ts +2 -0
- package/dist/themes/themeTokens.types.d.ts +37 -0
- package/dist/types/GuideAI.types.d.ts +22 -3
- package/dist/utils/api.d.ts +3 -0
- package/dist/utils/api.learn.d.ts +18 -0
- package/dist/utils/conversationContextSwitch.d.ts +41 -0
- package/dist/utils/conversationManager.d.ts +41 -0
- package/dist/utils/dataChannel.d.ts +8 -0
- package/dist/utils/dataChannelHelpers.d.ts +10 -0
- package/dist/utils/guideaiMirroredStorageKeys.d.ts +33 -0
- package/dist/utils/lastSystemToolCall.d.ts +2 -1
- package/dist/utils/localStorageHelper.d.ts +46 -21
- package/dist/utils/messageStorage.d.ts +0 -7
- package/dist/utils/parseWorkspaceSlugList.d.ts +12 -0
- package/dist/utils/pathIncludesAnyRef.d.ts +12 -0
- package/dist/utils/sessionRatingThrottle.d.ts +3 -0
- package/dist/utils/themeRegistry.d.ts +14 -0
- package/dist/utils/tools/descriptionToHighlightSelector.d.ts +1 -1
- package/dist/utils/tools/docToForm.d.ts +2 -2
- package/dist/utils/tools/elementToBestInteractionSelector.d.ts +10 -0
- package/dist/utils/transcriptDisplayModePref.d.ts +4 -0
- package/dist/utils/transcriptFloatGeometry.d.ts +78 -0
- package/dist/utils/transcriptSubtitleUiPref.d.ts +5 -0
- package/dist/utils/webrtcConnection.d.ts +5 -0
- package/dist/utils/widgetBearerStorage.d.ts +2 -2
- package/dist/utils/workspaceCatalog.d.ts +13 -2
- package/dist/utils/workspaceCatalogFatal.d.ts +4 -0
- package/dist/visualContext/defaultProvider.d.ts +4 -10
- package/dist/visualContext/visualContextCaptureLock.d.ts +17 -0
- package/package.json +2 -2
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
* context, including `idle` / `playing` statuses. VC rules are unchanged.
|
|
17
17
|
*/
|
|
18
18
|
import { StaticContextConfig, StaticContextPayload } from './types';
|
|
19
|
-
export type StaticContextRecordingStatus = 'idle' | 'recording' | 'active' | 'processing' | 'playing';
|
|
20
19
|
export interface UseStaticContextParams {
|
|
21
20
|
options?: StaticContextConfig;
|
|
22
21
|
/** Whether Visual Context is also enabled. When `true`, VC owns the
|
|
@@ -3,6 +3,8 @@ export type WorkspaceIconId = string;
|
|
|
3
3
|
export interface StubWorkspaceOption {
|
|
4
4
|
/** Workspace slug (stub modes use onboarding | training | doIt). */
|
|
5
5
|
id: string;
|
|
6
|
+
/** Server workspace UUID when the catalog API provides it; otherwise omitted. */
|
|
7
|
+
workspaceId?: string;
|
|
6
8
|
label: string;
|
|
7
9
|
icon: WorkspaceIconId;
|
|
8
10
|
/** Shown under the selector pill and in the workflow drawer header (stub until server-driven). */
|
|
@@ -32,5 +34,3 @@ export interface StubWorkflowItem {
|
|
|
32
34
|
id: string;
|
|
33
35
|
label: string;
|
|
34
36
|
}
|
|
35
|
-
export declare function getStubWorkspaceOptions(): StubWorkspaceOption[];
|
|
36
|
-
export declare function getStubWorkflowsForWorkspace(workspaceId: string): StubWorkflowItem[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Widget theme shared by testsite (`app/globals.css`) and the Chrome extension shadow root.
|
|
3
|
+
* Shadow DOM cannot read host-page CSS variables, so the extension injects this block explicitly.
|
|
4
|
+
*/
|
|
5
|
+
export declare const GUIDEAI_TESTSITE_MIC_COLOR: "#8b5cf6";
|
|
6
|
+
export declare const GUIDEAI_TESTSITE_WIDGET_THEME_CSS: string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { GuideAIThemeTokenSet } from './themeTokens.types';
|
|
2
|
+
/**
|
|
3
|
+
* Theme stylesheet: set CSS variables on the widget root and portaled menus.
|
|
4
|
+
* Transcript chrome reads tokens from `guideAIStylesTranscript.ts` (no per-theme selectors).
|
|
5
|
+
*/
|
|
6
|
+
export declare function buildThemeCss(themeId: string, tokens: GuideAIThemeTokenSet): string;
|
|
7
|
+
/** Base bundle tokens when no `theme` prop / preset stylesheet is active. */
|
|
8
|
+
export declare function buildPackageDefaultThemeCss(tokens: GuideAIThemeTokenSet): string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { GUIDEAI_PRESET_THEMES } from './presetThemes';
|
|
2
|
+
/** Built-in theme ids accepted by the `theme` prop. */
|
|
3
|
+
export declare const GUIDEAI_THEME_IDS: readonly string[];
|
|
4
|
+
export type GuideAIThemeId = (typeof GUIDEAI_PRESET_THEMES)[number]['id'];
|
|
5
|
+
export declare function isGuideAIThemeId(value: string): value is GuideAIThemeId;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { GuideAIThemePreset, GuideAIThemeTokenSet } from './themeTokens.types';
|
|
2
|
+
/** Package default palette and `theme="dark"` (Studio blue). */
|
|
3
|
+
export declare const GUIDEAI_PACKAGE_DEFAULT_THEME_ID: "dark";
|
|
4
|
+
export declare const GUIDEAI_PRESET_THEMES: GuideAIThemePreset[];
|
|
5
|
+
export declare const GUIDEAI_LIGHT_PRESETS: GuideAIThemePreset[];
|
|
6
|
+
export declare const GUIDEAI_DARK_PRESETS: GuideAIThemePreset[];
|
|
7
|
+
export declare function getPresetThemeCss(themeId: string): string | null;
|
|
8
|
+
export declare function getPresetTheme(themeId: string): GuideAIThemePreset | null;
|
|
9
|
+
/** Tokens for the package default (Studio blue) when no preset stylesheet is applied. */
|
|
10
|
+
export declare function getPackageDefaultThemeTokens(): GuideAIThemeTokenSet;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** CSS custom properties set on `[data-guideai-root][data-guideai-theme="…"]`. */
|
|
2
|
+
export type GuideAIThemeTokenSet = {
|
|
3
|
+
'--guideai-t-shell-bg': string;
|
|
4
|
+
'--guideai-t-shell-border': string;
|
|
5
|
+
'--guideai-t-shell-shadow': string;
|
|
6
|
+
'--guideai-t-text-primary': string;
|
|
7
|
+
'--guideai-t-text-muted': string;
|
|
8
|
+
'--guideai-t-accent': string;
|
|
9
|
+
'--guideai-t-accent-bright': string;
|
|
10
|
+
'--guideai-t-accent-ring': string;
|
|
11
|
+
'--guideai-t-surface-elevated': string;
|
|
12
|
+
'--guideai-t-surface-elevated-ai': string;
|
|
13
|
+
'--guideai-t-surface-input': string;
|
|
14
|
+
'--guideai-t-input-border': string;
|
|
15
|
+
'--guideai-t-input-border-focus': string;
|
|
16
|
+
'--guideai-t-messages-bg': string;
|
|
17
|
+
'--guideai-t-menu-bg': string;
|
|
18
|
+
'--guideai-t-menu-selected': string;
|
|
19
|
+
'--guideai-t-toolbar-border': string;
|
|
20
|
+
'--guideai-t-onboarding-bg': string;
|
|
21
|
+
'--guideai-t-onboarding-shadow': string;
|
|
22
|
+
'--guideai-t-welcome-bg': string;
|
|
23
|
+
/** Footer corner mic button (VAD bars / muted glyph). */
|
|
24
|
+
'--guideai-t-session-mic-bg': string;
|
|
25
|
+
'--guideai-t-session-mic-border': string;
|
|
26
|
+
'--guideai-t-session-mic-inset': string;
|
|
27
|
+
'--guideai-t-session-mic-shadow': string;
|
|
28
|
+
'--guideai-t-session-mic-muted': string;
|
|
29
|
+
'--guideai-t-session-level-bar': string;
|
|
30
|
+
'--guideai-t-session-level-axis': string;
|
|
31
|
+
};
|
|
32
|
+
export type GuideAIThemePreset = {
|
|
33
|
+
id: string;
|
|
34
|
+
label: string;
|
|
35
|
+
group: 'light' | 'dark';
|
|
36
|
+
tokens: GuideAIThemeTokenSet;
|
|
37
|
+
};
|
|
@@ -38,6 +38,9 @@ export type MicButtonPosition = GuideAIPosition;
|
|
|
38
38
|
export type GuideAIHostUserInfo = {
|
|
39
39
|
username?: string | null;
|
|
40
40
|
} & Record<string, unknown>;
|
|
41
|
+
export type { GuideAIThemeId } from '../themes/guideAIThemeIds';
|
|
42
|
+
import type { ExtensionPortalAuthProp } from '../devtools/devtoolsAuth/types';
|
|
43
|
+
import type { GuideAIThemeId } from '../themes/guideAIThemeIds';
|
|
41
44
|
export interface GuideAIProps {
|
|
42
45
|
/**
|
|
43
46
|
* Optional lightweight snapshot of the signed-in end user. When `username` is non-empty,
|
|
@@ -54,7 +57,11 @@ export interface GuideAIProps {
|
|
|
54
57
|
* Requires `authKey`, or `widgetSessionToken` with `adminConversationPersistenceKey`.
|
|
55
58
|
*/
|
|
56
59
|
authKey?: string;
|
|
57
|
-
/**
|
|
60
|
+
/**
|
|
61
|
+
* Default workspace slug for the first realtime session (`POST /api/initialize`).
|
|
62
|
+
* Single slug only — not a comma list. Should match a slug in the effective catalog when
|
|
63
|
+
* `workspaces` is also set.
|
|
64
|
+
*/
|
|
58
65
|
workspace?: string;
|
|
59
66
|
/**
|
|
60
67
|
* Pre-issued widget Bearer JWT (internal admin / portal tooling). Requires `adminConversationPersistenceKey`.
|
|
@@ -71,8 +78,10 @@ export interface GuideAIProps {
|
|
|
71
78
|
/** Value sent as `user` on `/initialize` when using portal/widget Bearer (e.g. portal AuthUser id). */
|
|
72
79
|
initializeUserId?: string;
|
|
73
80
|
/**
|
|
74
|
-
*
|
|
75
|
-
* for the
|
|
81
|
+
* Catalog allowlist: limits transcript workspace selector and workflows to these slugs.
|
|
82
|
+
* Omit to load all workspaces for the customer. Accepts a comma-separated string
|
|
83
|
+
* (`"sales,support"`) or `string[]`. If no workspaces resolve (including after falling back
|
|
84
|
+
* to `workspace`), the widget logs `console.error` and unmounts.
|
|
76
85
|
*/
|
|
77
86
|
workspaces?: string | string[];
|
|
78
87
|
environment?: GuideAIEnvironment;
|
|
@@ -112,6 +121,16 @@ export interface GuideAIProps {
|
|
|
112
121
|
* Set to true to allow the widget on those devices.
|
|
113
122
|
*/
|
|
114
123
|
mobileEnabled?: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Chrome extension popup portal JWT + user (from `chrome.storage.local`).
|
|
126
|
+
* Used to recognize signed-in administrators and gate developer tools.
|
|
127
|
+
*/
|
|
128
|
+
extensionPortalAuth?: ExtensionPortalAuthProp;
|
|
129
|
+
/**
|
|
130
|
+
* Built-in color theme preset. Omit (or `null`) for the package default palette.
|
|
131
|
+
* See README **Themes** for available ids.
|
|
132
|
+
*/
|
|
133
|
+
theme?: GuideAIThemeId | null;
|
|
115
134
|
}
|
|
116
135
|
export type TranscriptPosition = 'right' | 'left';
|
|
117
136
|
/**
|
package/dist/utils/api.d.ts
CHANGED
|
@@ -59,7 +59,10 @@ export declare const registerTools: (endpoint: string, payload: {
|
|
|
59
59
|
export declare const logMessage: (messageData: MessageData, conversationId: string | null, _conversationKey: string, user?: string, environment?: GuideAIEnvironment) => Promise<void>;
|
|
60
60
|
/** One workspace row from `POST /widget/workspaces` (normalized). */
|
|
61
61
|
export interface WidgetWorkspaceRow {
|
|
62
|
+
/** Workspace slug (transcript session key / initialize body `workspace`). */
|
|
62
63
|
id: string;
|
|
64
|
+
/** Server workspace UUID when the API provides it separately from slug. */
|
|
65
|
+
workspaceId?: string;
|
|
63
66
|
label: string;
|
|
64
67
|
description: string;
|
|
65
68
|
icon: string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type InitializeWebRTCOptions } from './api';
|
|
2
|
+
export interface InitializeLearnWebRTCPayload {
|
|
3
|
+
sdp: string;
|
|
4
|
+
workspace?: string;
|
|
5
|
+
user?: string;
|
|
6
|
+
phase?: 'capture' | 'clarify';
|
|
7
|
+
/** Clarify re-init: reuse capture conversation for logging and generate. */
|
|
8
|
+
conversationId?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface InitializeLearnWebRTCResponse {
|
|
11
|
+
answerSdp: string;
|
|
12
|
+
id: string;
|
|
13
|
+
contextKey?: string;
|
|
14
|
+
transcriptionModel?: string;
|
|
15
|
+
greeting?: string | null;
|
|
16
|
+
}
|
|
17
|
+
/** Learn mode realtime init — no workflows or tools. */
|
|
18
|
+
export declare function initializeLearnWebRTC(endpoint: string, payload: InitializeLearnWebRTCPayload, options?: InitializeWebRTCOptions): Promise<InitializeLearnWebRTCResponse>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { StubWorkspaceOption } from '../stubs/workspaces';
|
|
2
|
+
export declare function isUuidString(value: string): boolean;
|
|
3
|
+
export type ConversationContextSwitchType = 'workspace' | 'workflow';
|
|
4
|
+
/** Structured `logdata` for workspace/workflow context switches (messages API only). */
|
|
5
|
+
export type ConversationContextSwitchLogdata = {
|
|
6
|
+
kind: 'conversation_context_switch';
|
|
7
|
+
switchType: ConversationContextSwitchType;
|
|
8
|
+
workspaceId: string;
|
|
9
|
+
workspaceSlug: string;
|
|
10
|
+
workspaceTitle: string;
|
|
11
|
+
workflowId?: string;
|
|
12
|
+
workflowName?: string;
|
|
13
|
+
};
|
|
14
|
+
export type WorkspaceContextFields = {
|
|
15
|
+
workspaceId: string;
|
|
16
|
+
workspaceSlug: string;
|
|
17
|
+
workspaceTitle: string;
|
|
18
|
+
};
|
|
19
|
+
/** Human-readable SYSTEM log line matching admin log conventions. */
|
|
20
|
+
export declare function formatConversationContextSwitchContent(switchType: ConversationContextSwitchType, name: string): string;
|
|
21
|
+
export declare function buildConversationContextSwitchLogdata(params: {
|
|
22
|
+
switchType: ConversationContextSwitchType;
|
|
23
|
+
workspace: WorkspaceContextFields;
|
|
24
|
+
workflowId?: string | null;
|
|
25
|
+
workflowName?: string | null;
|
|
26
|
+
}): ConversationContextSwitchLogdata;
|
|
27
|
+
/**
|
|
28
|
+
* Resolves workspace id (UUID when provided by catalog), slug, and title for context-switch logs.
|
|
29
|
+
*/
|
|
30
|
+
export declare function resolveWorkspaceContextFields(workspaceOptions: StubWorkspaceOption[], workspaceSlug: string): WorkspaceContextFields | null;
|
|
31
|
+
/**
|
|
32
|
+
* Normalizes a widget workspace API row into slug (transcript key) and optional UUID.
|
|
33
|
+
*/
|
|
34
|
+
export declare function resolveWidgetWorkspaceSlugAndId(raw: {
|
|
35
|
+
id?: string;
|
|
36
|
+
slug?: string;
|
|
37
|
+
workspaceId?: string;
|
|
38
|
+
}): {
|
|
39
|
+
slug: string;
|
|
40
|
+
workspaceId?: string;
|
|
41
|
+
} | null;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { GuideAIEnvironment } from '../types/GuideAI.types';
|
|
2
|
+
import { type ConversationContextSwitchType, type WorkspaceContextFields } from './conversationContextSwitch';
|
|
3
|
+
export type { ConversationContextSwitchLogdata, ConversationContextSwitchType, } from './conversationContextSwitch';
|
|
2
4
|
/**
|
|
3
5
|
* Message type options
|
|
4
6
|
*/
|
|
@@ -25,6 +27,26 @@ export interface WorkflowTesterSessionResult {
|
|
|
25
27
|
queueCompleted: number;
|
|
26
28
|
errorMessage?: string | null;
|
|
27
29
|
}
|
|
30
|
+
export type LearnClickLogdata = {
|
|
31
|
+
kind: 'learn_click';
|
|
32
|
+
selector: string;
|
|
33
|
+
href?: string;
|
|
34
|
+
pathname?: string;
|
|
35
|
+
timestamp?: number;
|
|
36
|
+
label?: string;
|
|
37
|
+
};
|
|
38
|
+
export type LearnCaptureMarkerLogdata = {
|
|
39
|
+
kind: 'learn_capture_start';
|
|
40
|
+
} | {
|
|
41
|
+
kind: 'learn_capture_end';
|
|
42
|
+
};
|
|
43
|
+
export type SessionRatingOutcome = 'rated' | 'dismissed' | 'ignored';
|
|
44
|
+
export type SessionRatingLogdata = {
|
|
45
|
+
kind: 'session_rating';
|
|
46
|
+
outcome: SessionRatingOutcome;
|
|
47
|
+
rating?: number;
|
|
48
|
+
comment?: string;
|
|
49
|
+
};
|
|
28
50
|
/** Structured `logdata` for workflow tester markers (messages API only, not transcript storage). */
|
|
29
51
|
export type WorkflowTesterSessionLogdata = {
|
|
30
52
|
kind: 'workflow_tester';
|
|
@@ -105,6 +127,9 @@ export declare class ConversationManager {
|
|
|
105
127
|
* posts to the messages API with structured `logdata` for the admin log; not stored in the widget transcript.
|
|
106
128
|
*/
|
|
107
129
|
logWorkflowTesterSessionMarker(logdata: WorkflowTesterSessionLogdata): void;
|
|
130
|
+
/** Host-page click during Learn capture — stored in transcript + messages API. */
|
|
131
|
+
logLearnClickMessage(data: LearnClickLogdata): void;
|
|
132
|
+
logLearnCaptureMarker(marker: LearnCaptureMarkerLogdata): void;
|
|
108
133
|
/**
|
|
109
134
|
* Public wrapper - log action message
|
|
110
135
|
*/
|
|
@@ -129,4 +154,20 @@ export declare class ConversationManager {
|
|
|
129
154
|
* type until/unless a dedicated MessageType is added.
|
|
130
155
|
*/
|
|
131
156
|
logStaticContextMessage(content: string, payload?: any): void;
|
|
157
|
+
/**
|
|
158
|
+
* Workspace or workflow context switch — SYSTEM `log` with structured `logdata` for the admin
|
|
159
|
+
* messages log (not stored in the widget transcript).
|
|
160
|
+
*/
|
|
161
|
+
/** Post-session star rating (messages API only; not stored in widget transcript). */
|
|
162
|
+
logSessionRating(params: {
|
|
163
|
+
outcome: SessionRatingOutcome;
|
|
164
|
+
rating?: number;
|
|
165
|
+
comment?: string;
|
|
166
|
+
}): void;
|
|
167
|
+
logConversationContextSwitch(params: {
|
|
168
|
+
switchType: ConversationContextSwitchType;
|
|
169
|
+
workspace: WorkspaceContextFields;
|
|
170
|
+
workflowId?: string | null;
|
|
171
|
+
workflowName?: string | null;
|
|
172
|
+
}): void;
|
|
132
173
|
}
|
|
@@ -13,6 +13,8 @@ export interface DataChannelCallbacks {
|
|
|
13
13
|
onDataChannelClose: (pc: RTCPeerConnection) => void;
|
|
14
14
|
onDataChannelError: (event: Event) => void;
|
|
15
15
|
onDataChannelMessageError: (message: any) => void;
|
|
16
|
+
/** Realtime session hit max duration (`session_expired`); host should reconnect via /initialize. */
|
|
17
|
+
onSessionExpired?: () => void;
|
|
16
18
|
setIsResponseActive: (active: boolean) => void;
|
|
17
19
|
updateStreamingMessage: (delta: string) => void;
|
|
18
20
|
/** Reset streaming state when a new response starts (call on response.created) */
|
|
@@ -34,6 +36,10 @@ export interface DataChannelCallbacks {
|
|
|
34
36
|
export interface DataChannelConfig {
|
|
35
37
|
audioStream: MediaStream | null;
|
|
36
38
|
callbacks: DataChannelCallbacks;
|
|
39
|
+
/** When `.current === 'capturing'`, clamp assistant text to OK only. */
|
|
40
|
+
learnCapturePhaseRef?: {
|
|
41
|
+
current: string | null;
|
|
42
|
+
};
|
|
37
43
|
/** Input audio transcription model; overridden by setTranscriptionModel from /initialize response when present */
|
|
38
44
|
transcriptionModel?: string;
|
|
39
45
|
/** Tools from server (initialize response). If undefined = old server, use built-in. If [] = new server, no tools. */
|
|
@@ -74,7 +80,9 @@ export declare class DataChannelManager {
|
|
|
74
80
|
private deferredInterruptLockThenGreeting;
|
|
75
81
|
/** After sending VAD-off lock `session.update`, wait for next `session.updated` before greeting. */
|
|
76
82
|
private pendingPostInterruptLockCallback;
|
|
83
|
+
private learnCapturePhaseRef?;
|
|
77
84
|
constructor(config: DataChannelConfig);
|
|
85
|
+
private clampLearnCaptureAssistantText;
|
|
78
86
|
/** Set from POST /initialize response (call after initialize returns, before data channel open). */
|
|
79
87
|
setTranscriptionModel(model: string): void;
|
|
80
88
|
/** Set tools from server (call after initialize, before channel opens) */
|
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
* Helper functions for data channel message handling.
|
|
3
3
|
* Extracted from dataChannel.ts to keep the main module focused on orchestration.
|
|
4
4
|
*/
|
|
5
|
+
/** OpenAI Realtime `error` event payload (`type: 'error'`). */
|
|
6
|
+
export type RealtimeErrorEvent = {
|
|
7
|
+
error?: {
|
|
8
|
+
code?: string;
|
|
9
|
+
message?: string;
|
|
10
|
+
type?: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
/** True when the server reports the 60-minute realtime session cap (`session_expired`). */
|
|
14
|
+
export declare function isSessionExpiredRealtimeError(message: unknown): boolean;
|
|
5
15
|
/** Minimal sender surface for injecting context-only Realtime items (no `response.create`). */
|
|
6
16
|
export interface SilentRealtimeNoteSender {
|
|
7
17
|
isOpen(): boolean;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical GuideAI localStorage key strings.
|
|
3
|
+
* Imported by guide-ai-package helpers and the Chrome extension (UMD does not export STORAGE_KEYS).
|
|
4
|
+
*/
|
|
5
|
+
/** Widget Bearer JWT — mirrored; not part of transcript prefs. */
|
|
6
|
+
export declare const WIDGET_BEARER_TOKEN_STORAGE_KEY = "guideai_widgetBearerToken";
|
|
7
|
+
export declare const GUIDEAI_STORAGE_KEYS: {
|
|
8
|
+
readonly USER_UUID: "guideAI_userUUID";
|
|
9
|
+
/** Persisted widget profile username (email or stable id); mirrored by the Chrome extension. */
|
|
10
|
+
readonly WIDGET_PROFILE_USERNAME: "guideAI_widgetProfileUsername";
|
|
11
|
+
readonly SESSION_ID: "guideAI_sessionId";
|
|
12
|
+
readonly CONVERSATION: "guideAI_conversation";
|
|
13
|
+
readonly HAS_INTERACTED: "guideAI_hasInteracted";
|
|
14
|
+
readonly IS_MUTED: "guideAI_isMuted";
|
|
15
|
+
/** Mute assistant TTS / remote audio (WebRTC playback); not the user microphone. */
|
|
16
|
+
readonly ASSISTANT_PLAYBACK_MUTED: "guideAI_assistantPlaybackMuted";
|
|
17
|
+
readonly LOGGER_ENABLED: "guideAI_loggerEnabled";
|
|
18
|
+
readonly AUDIO_CONFIG: "guideAI_audioConfig";
|
|
19
|
+
/** UI microphone preset selector (Precise vs Noisy). */
|
|
20
|
+
readonly MIC_PRESET: "guideAI_micPreset";
|
|
21
|
+
/** Developer tools shell: playback interrupt lock panel visibility (default off). */
|
|
22
|
+
readonly PLAYBACK_LOCK_DEBUG_OVERLAY: "guideAI_playbackLockDebugOverlay";
|
|
23
|
+
/** Developer tools shell: workflow tester tab overlay visibility (default off). */
|
|
24
|
+
readonly WORKFLOW_TESTER_OVERLAY: "guideAI_workflowTesterOverlay";
|
|
25
|
+
/** Last dragged position of the floating developer tools shell (`{ left, top }` JSON). */
|
|
26
|
+
readonly DEVTOOLS_SHELL_POSITION: "guideAI_devtoolsShellPosition";
|
|
27
|
+
/** Last dragged position of learn mode capture focus chrome (`{ left, top }` JSON). */
|
|
28
|
+
readonly LEARN_CAPTURE_POSITION: "guideAI_learnCapturePosition";
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Keys mirrored from the widget to extension localStorage via `guideai_storage_write`.
|
|
32
|
+
*/
|
|
33
|
+
export declare const GUIDEAI_MIRRORED_STORAGE_KEYS: readonly string[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
type LastSystemToolCall = {
|
|
2
2
|
name: string;
|
|
3
3
|
argsJson: string;
|
|
4
4
|
};
|
|
5
5
|
export declare function getLastSystemToolCall(): LastSystemToolCall | null;
|
|
6
6
|
export declare function setLastSystemToolCall(name: string, argsJson: string): void;
|
|
7
|
+
export {};
|
|
@@ -4,26 +4,19 @@
|
|
|
4
4
|
*/
|
|
5
5
|
declare const STORAGE_KEYS: {
|
|
6
6
|
readonly USER_UUID: "guideAI_userUUID";
|
|
7
|
-
/** Persisted widget profile username (email or stable id); mirrored by the Chrome extension. */
|
|
8
7
|
readonly WIDGET_PROFILE_USERNAME: "guideAI_widgetProfileUsername";
|
|
9
8
|
readonly SESSION_ID: "guideAI_sessionId";
|
|
10
9
|
readonly CONVERSATION: "guideAI_conversation";
|
|
11
10
|
readonly HAS_INTERACTED: "guideAI_hasInteracted";
|
|
12
11
|
readonly IS_MUTED: "guideAI_isMuted";
|
|
13
|
-
/** Mute assistant TTS / remote audio (WebRTC playback); not the user microphone. */
|
|
14
12
|
readonly ASSISTANT_PLAYBACK_MUTED: "guideAI_assistantPlaybackMuted";
|
|
15
13
|
readonly LOGGER_ENABLED: "guideAI_loggerEnabled";
|
|
16
14
|
readonly AUDIO_CONFIG: "guideAI_audioConfig";
|
|
17
|
-
/** UI microphone preset selector (Precise vs Noisy). */
|
|
18
15
|
readonly MIC_PRESET: "guideAI_micPreset";
|
|
19
|
-
/** Transcript “⋯” debug section (console: GuideAI.debug.showMoreMenu()). */
|
|
20
|
-
readonly DEBUG_MORE_MENU: "guideAI_debugMoreMenu";
|
|
21
|
-
/** Transcript ⋯ → Debug: fixed “playback interrupt lock” debug panel (default off). */
|
|
22
16
|
readonly PLAYBACK_LOCK_DEBUG_OVERLAY: "guideAI_playbackLockDebugOverlay";
|
|
23
|
-
/** Transcript ⋯ → Debug: floating workflow tester panel (default off). */
|
|
24
17
|
readonly WORKFLOW_TESTER_OVERLAY: "guideAI_workflowTesterOverlay";
|
|
25
|
-
|
|
26
|
-
readonly
|
|
18
|
+
readonly DEVTOOLS_SHELL_POSITION: "guideAI_devtoolsShellPosition";
|
|
19
|
+
readonly LEARN_CAPTURE_POSITION: "guideAI_learnCapturePosition";
|
|
27
20
|
};
|
|
28
21
|
/**
|
|
29
22
|
* Emit a custom event when localStorage is written, so the Chrome extension
|
|
@@ -120,26 +113,29 @@ export type MicrophonePreset = 'precise' | 'noisy';
|
|
|
120
113
|
export declare const getMicPreset: () => MicrophonePreset;
|
|
121
114
|
export declare const setMicPreset: (preset: MicrophonePreset) => void;
|
|
122
115
|
/**
|
|
123
|
-
*
|
|
124
|
-
*/
|
|
125
|
-
export declare const getDebugMoreMenuEnabled: () => boolean;
|
|
126
|
-
export declare const setDebugMoreMenuEnabled: (enabled: boolean) => void;
|
|
127
|
-
/**
|
|
128
|
-
* Fixed debug panel: interrupt lock / VAD state (transcript ⋯ → Debug).
|
|
116
|
+
* Fixed debug panel: interrupt lock / VAD state (developer tools shell).
|
|
129
117
|
* Default hidden until enabled from the menu or localStorage.
|
|
130
118
|
*/
|
|
131
119
|
export declare const getPlaybackLockDebugOverlayVisible: () => boolean;
|
|
132
120
|
export declare const setPlaybackLockDebugOverlayVisible: (visible: boolean) => void;
|
|
133
121
|
/**
|
|
134
|
-
*
|
|
135
|
-
*
|
|
122
|
+
* Workflow tester overlay visibility (developer tools shell).
|
|
123
|
+
* Default hidden until the workflow tester tab is active.
|
|
136
124
|
*/
|
|
137
125
|
export declare const getWorkflowTesterOverlayVisible: () => boolean;
|
|
138
126
|
export declare const setWorkflowTesterOverlayVisible: (visible: boolean) => void;
|
|
139
|
-
export type
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
127
|
+
export type DevtoolsShellPosition = {
|
|
128
|
+
left: number;
|
|
129
|
+
top: number;
|
|
130
|
+
};
|
|
131
|
+
export declare const getDevtoolsShellPosition: () => DevtoolsShellPosition | null;
|
|
132
|
+
export declare const setDevtoolsShellPosition: (position: DevtoolsShellPosition) => void;
|
|
133
|
+
export type LearnCapturePosition = {
|
|
134
|
+
left: number;
|
|
135
|
+
top: number;
|
|
136
|
+
};
|
|
137
|
+
export declare const getLearnCapturePosition: () => LearnCapturePosition | null;
|
|
138
|
+
export declare const setLearnCapturePosition: (position: LearnCapturePosition) => void;
|
|
143
139
|
/** Default docked drawer width (px). */
|
|
144
140
|
export declare const TRANSCRIPT_DRAWER_WIDTH_PX = 420;
|
|
145
141
|
export declare const TRANSCRIPT_DRAWER_WIDTH_MIN_PX = 260;
|
|
@@ -147,6 +143,21 @@ export declare const TRANSCRIPT_DRAWER_WIDTH_MAX_PX = 720;
|
|
|
147
143
|
/** User-resizable docked drawer width (px), per widget key. */
|
|
148
144
|
export declare const getTranscriptDrawerWidthPref: (widgetKey: string) => number;
|
|
149
145
|
export declare const setTranscriptDrawerWidthPref: (widgetKey: string, widthPx: number) => void;
|
|
146
|
+
/**
|
|
147
|
+
* Persisted float transcript card geometry (per conversation/widget key): bottom-left anchored
|
|
148
|
+
* `{ left, bottom, width, coreH }` in viewport px. Restored painted on refresh (no animation).
|
|
149
|
+
* Per-conversation scope — cleared on conversation end (see `useConversationSession`), unlike the
|
|
150
|
+
* sticky docked drawer width.
|
|
151
|
+
*/
|
|
152
|
+
export type TranscriptFloatGeometry = {
|
|
153
|
+
left: number;
|
|
154
|
+
bottom: number;
|
|
155
|
+
width: number;
|
|
156
|
+
coreH: number;
|
|
157
|
+
};
|
|
158
|
+
export declare const getTranscriptFloatGeometryPref: (widgetKey: string) => TranscriptFloatGeometry | null;
|
|
159
|
+
export declare const setTranscriptFloatGeometryPref: (widgetKey: string, geometry: TranscriptFloatGeometry) => void;
|
|
160
|
+
export declare const clearTranscriptFloatGeometryPref: (widgetKey: string) => void;
|
|
150
161
|
/**
|
|
151
162
|
* Whether the user prefers the docked transcript panel when the transcript is visible (per widget key).
|
|
152
163
|
* Storage key remains `guideAI_transcriptDrawerPref:*` for backward compatibility.
|
|
@@ -155,6 +166,20 @@ export declare const getTranscriptPanelDockedPref: (widgetKey: string) => boolea
|
|
|
155
166
|
export declare const setTranscriptPanelDockedPref: (widgetKey: string, docked: boolean) => void;
|
|
156
167
|
export declare const getLastWorkspaceSlugPref: (widgetKey: string) => string | null;
|
|
157
168
|
export declare const setLastWorkspaceSlugPref: (widgetKey: string, slug: string | null) => void;
|
|
169
|
+
/** Per-workspace transcript workflow UI + /initialize focus, scoped by conversation key. */
|
|
170
|
+
export type TranscriptWorkflowWorkspaceState = {
|
|
171
|
+
/** Focused workflow id (checkbox + separate workflows; rollup uses this for UI/steer only). */
|
|
172
|
+
sessionWorkflowId: string | null;
|
|
173
|
+
activeWorkflowTitle?: string | null;
|
|
174
|
+
/** Checkbox workflow list completion map (workflow id → checked). */
|
|
175
|
+
workflowChecked?: Record<string, boolean>;
|
|
176
|
+
/** Snapshot when saved — rollup workspaces omit sessionWorkflowId on /initialize. */
|
|
177
|
+
rollupWorkflows?: boolean;
|
|
178
|
+
};
|
|
179
|
+
export declare const getTranscriptWorkflowWorkspaceState: (conversationKey: string, workspaceSlug: string) => TranscriptWorkflowWorkspaceState | null;
|
|
180
|
+
export declare const setTranscriptWorkflowWorkspaceState: (conversationKey: string, workspaceSlug: string, state: TranscriptWorkflowWorkspaceState | null) => void;
|
|
181
|
+
/** Cleared when the conversation ends (same scope as last workspace slug). */
|
|
182
|
+
export declare const clearTranscriptWorkflowPrefs: (conversationKey: string) => void;
|
|
158
183
|
/**
|
|
159
184
|
* Export storage keys for reference (read-only)
|
|
160
185
|
*/
|
|
@@ -20,13 +20,6 @@ export declare const initializeConversationStorage: (conversationKey: string, co
|
|
|
20
20
|
export declare const isConversationExpired: (conversationKey: string) => boolean;
|
|
21
21
|
export declare const updateSessionExpiresAt: (conversationKey: string, sessionExpiresAt: number) => void;
|
|
22
22
|
export declare const getConversationId: (conversationKey: string) => string | null;
|
|
23
|
-
/**
|
|
24
|
-
* Drop the stored server conversation id. Reserved for true "new thread" flows; do
|
|
25
|
-
* **not** call this on workspace or workflow switches — the server reuses the existing
|
|
26
|
-
* `Conversation` row across switches and updates `Conversation.workspaceId`
|
|
27
|
-
* conditionally (see `guideaisite/docs/WORKSPACE_EMBED_FLOWS.md`).
|
|
28
|
-
*/
|
|
29
|
-
export declare function invalidateStoredServerConversationId(conversationKey: string): void;
|
|
30
23
|
export declare const saveConversationToStorage: (conversation: StoredConversation) => void;
|
|
31
24
|
export declare const loadConversationFromStorage: () => StoredConversation | null;
|
|
32
25
|
export declare const clearConversationStorage: () => void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Host `workspaces` prop or API `workspaces` body field. */
|
|
2
|
+
export type WorkspaceSlugListInput = string | string[] | undefined | null;
|
|
3
|
+
/**
|
|
4
|
+
* Parse workspace slug allowlist input.
|
|
5
|
+
* - `undefined` / `null` → `undefined` (no filter; load all customer workspaces)
|
|
6
|
+
* - non-empty string → split on `,`, trim, drop empties
|
|
7
|
+
* - array → trim each element, drop empties
|
|
8
|
+
* - `""` or all-empty → `[]` (explicit empty allowlist)
|
|
9
|
+
*/
|
|
10
|
+
export declare function parseWorkspaceSlugList(input: WorkspaceSlugListInput): string[] | undefined;
|
|
11
|
+
/** Host passed `workspaces=""` / `[]` — explicit empty catalog (not “load all”). */
|
|
12
|
+
export declare function isExplicitEmptyWorkspaceAllowlist(filter: string[] | undefined): filter is [];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns true if any of the given element refs appears in the composed path of `event`.
|
|
3
|
+
*
|
|
4
|
+
* Using `event.composedPath()` instead of `event.target` makes outside-click detection
|
|
5
|
+
* Shadow-DOM-safe: when a composed event crosses a shadow boundary, `event.target` is
|
|
6
|
+
* retargeted to the shadow host (so `ref.contains(target)` returns false for every ref
|
|
7
|
+
* inside the shadow). `composedPath()` returns the un-retargeted ancestor chain, so a
|
|
8
|
+
* click on a menu option inside the shadow still matches the menu's own ref.
|
|
9
|
+
*/
|
|
10
|
+
export declare function pathIncludesAnyRef(event: Event, refs: ReadonlyArray<{
|
|
11
|
+
current: HTMLElement | null;
|
|
12
|
+
} | null | undefined>): boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type ApplyThemeOptions = {
|
|
2
|
+
id: string;
|
|
3
|
+
css: string;
|
|
4
|
+
};
|
|
5
|
+
export declare function themeStyleElementId(themeId: string): string;
|
|
6
|
+
/** Register and activate a bundled theme override stylesheet. */
|
|
7
|
+
export declare function applyTheme({ id, css }: ApplyThemeOptions): void;
|
|
8
|
+
/** Remove the active theme override (package default palette). */
|
|
9
|
+
export declare function clearTheme(): void;
|
|
10
|
+
export declare function getActiveTheme(): string | null;
|
|
11
|
+
/** For menus portaled to `document.body` (outside `[data-guideai-root]`). */
|
|
12
|
+
export declare function guideAIThemePortalAttributes(themeId: string | null): {
|
|
13
|
+
'data-guideai-theme'?: string;
|
|
14
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { elementToBestInteractionSelector, resolveInteractionTarget, } from './elementToBestInteractionSelector';
|
|
2
2
|
export declare function resolveDescriptionToHighlightSelector(description: string): string | null;
|
|
@@ -22,8 +22,8 @@ export type DocToFormArgs = {
|
|
|
22
22
|
prompt?: string;
|
|
23
23
|
acceptedTypes?: string;
|
|
24
24
|
};
|
|
25
|
-
/** Gemini 3.
|
|
26
|
-
export declare const DOC_TO_FORM_GEMINI_MODEL = "gemini-3.
|
|
25
|
+
/** Gemini 3.5 Flash; matches `/api/gemini` default unless server overrides. */
|
|
26
|
+
export declare const DOC_TO_FORM_GEMINI_MODEL = "gemini-3.5-flash";
|
|
27
27
|
/** Shown to the realtime model in the tool output JSON so it acts on the extraction immediately. */
|
|
28
28
|
export declare const DOC_TO_FORM_ASSISTANT_INSTRUCTION = "Here are the extracted details. Call fillForm once with a `fields` array to fill every applicable form field. Do not wait for confirmation.";
|
|
29
29
|
export type DocToFormSuccess = {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Map a click/pick target to the control we want tools to address (input, select, combobox host, etc.).
|
|
3
|
+
*/
|
|
4
|
+
export declare function resolveInteractionTarget(el: Element): Element;
|
|
5
|
+
/**
|
|
6
|
+
* Best selector for highlight / learn clicks / ATD Find — prefers combobox:, input:, role:, then id/data, then text/css.
|
|
7
|
+
*/
|
|
8
|
+
export declare function elementToBestInteractionSelector(element: Element): string;
|
|
9
|
+
/** @deprecated Use {@link elementToBestInteractionSelector}; kept for existing imports. */
|
|
10
|
+
export declare function elementToHighlightSelector(element: Element): string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { TranscriptDisplayMode } from '../types/GuideAI.types';
|
|
2
|
+
export declare function getTranscriptDisplayMode(): TranscriptDisplayMode;
|
|
3
|
+
export declare function setTranscriptDisplayMode(mode: TranscriptDisplayMode): void;
|
|
4
|
+
export declare function subscribeTranscriptDisplayMode(onStoreChange: () => void): () => void;
|