guideai-app 0.5.4-1 → 0.5.4-2
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 +47 -0
- package/dist/GuideAI.d.ts +3 -0
- package/dist/GuideAI.js +1 -1
- package/dist/components/AgentTestRunnerPanel.d.ts +22 -0
- package/dist/components/AudioConfigDialog.d.ts +3 -1
- package/dist/components/DeveloperTools.d.ts +16 -9
- package/dist/components/PlaybackInterruptLockDebugOverlay.d.ts +3 -1
- package/dist/components/PlaybackLockDebugOverlayRoot.d.ts +2 -1
- package/dist/components/TranscriptBox.d.ts +6 -12
- package/dist/components/TranscriptStudioChrome.d.ts +31 -0
- package/dist/components/TranscriptTextInput.d.ts +7 -7
- package/dist/devtools/DeveloperToolsShell.d.ts +20 -0
- package/dist/devtools/adminToolDiagnostics/AdminToolDiagnosticsPanel.d.ts +8 -1
- package/dist/devtools/adminToolDiagnostics/adminToolDiagnosticsPanelUtils.d.ts +1 -4
- package/dist/devtools/audioConfigDefaultLockUi.d.ts +12 -0
- package/dist/devtools/developerToolPanelId.d.ts +8 -0
- package/dist/devtools/developerToolsShellStyles.d.ts +5 -0
- package/dist/devtools/developerToolsTabIcons.d.ts +4 -0
- package/dist/devtools/panelLayout.d.ts +7 -0
- package/dist/devtools/useDraggableDialog.d.ts +6 -1
- package/dist/devtools/useGuideDeveloperTools.d.ts +55 -0
- package/dist/devtools/visualContextInspector/VisualContextInspector.d.ts +2 -0
- package/dist/devtools/workflowTester/WorkflowTesterPanel.d.ts +36 -0
- package/dist/devtools/workflowTester/generateWorkflowTestScriptWithGemini.d.ts +18 -0
- package/dist/devtools/workflowTester/index.d.ts +7 -0
- package/dist/devtools/workflowTester/workflowTesterPanelStyles.d.ts +5 -0
- package/dist/devtools/workflowTester/workflowTesterSteerBridge.d.ts +7 -0
- package/dist/devtools/workflowTester/workflowTesterWorkspaceBridge.d.ts +14 -0
- package/dist/hooks/useAgentTestRunnerOverlay.d.ts +12 -0
- package/dist/hooks/useAssistantPlaybackMute.d.ts +3 -1
- package/dist/hooks/useAudioConfigSurface.d.ts +2 -6
- package/dist/hooks/useGuideAIMutePipeline.d.ts +28 -0
- package/dist/hooks/useHostUserInfoSync.d.ts +7 -0
- package/dist/hooks/useMicMute.d.ts +3 -1
- package/dist/hooks/useSilentRealtimeSessionNotes.d.ts +20 -0
- package/dist/hooks/useWorkflowTesterOverlay.d.ts +15 -0
- package/dist/index.d.ts +4 -3
- package/dist/playwrightToolHarness.js +1 -2
- package/dist/types/GuideAI.types.d.ts +15 -1
- package/dist/utils/api.d.ts +22 -9
- package/dist/utils/constants.d.ts +2 -3
- package/dist/utils/conversationManager.d.ts +25 -0
- package/dist/utils/dataChannelHelpers.d.ts +18 -0
- package/dist/utils/guideAIEvents.d.ts +1 -0
- package/dist/utils/hostUserIdentity.d.ts +21 -0
- package/dist/utils/localStorageHelper.d.ts +20 -0
- package/dist/utils/sessionRealtimeNotes.d.ts +11 -0
- package/dist/utils/tools/clickElement.d.ts +1 -1
- package/dist/utils/tools/elementInteractions.d.ts +27 -5
- package/dist/utils/tools/isGuideAiDomChrome.d.ts +6 -0
- package/dist/utils/tools/markWorkflowComplete.d.ts +18 -0
- package/dist/utils/tools/selectWorkflow.d.ts +42 -0
- package/dist/utils/tools/setAssistantPlaybackMuted.d.ts +33 -0
- package/dist/utils/tools/setMicrophoneMuted.d.ts +35 -0
- package/dist/utils/tools/workflowToolBridge.d.ts +18 -1
- package/dist/utils/transcriptToolFocusRestore.d.ts +13 -0
- package/dist/utils/ui.d.ts +0 -2
- package/dist/utils/widgetBearerStorage.d.ts +2 -1
- package/package.json +3 -6
- package/dist/GuideAI.js.map +0 -1
- package/dist/playwrightToolHarness.js.map +0 -1
package/README.md
CHANGED
|
@@ -38,6 +38,8 @@ function App() {
|
|
|
38
38
|
| --------------------------------- | ---------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
39
39
|
| `authKey` | `string` | Yes (customer embed) | Widget access key; **not** persisted by the package. Exchanged once for a JWT via `POST /widget/session`. **Do not use React’s reserved `key` attribute** — use this prop name. |
|
|
40
40
|
| `workspace` | `string` | No | Workspace slug to use for the realtime session. Forwarded on the `/initialize` body so the server can pick a non-default workspace per request. Omit to use the customer default. |
|
|
41
|
+
| `getUserInfo` | `function` | No | Lets Guide AI know who is signed in on your app (see **Signed-in users** below). |
|
|
42
|
+
| `initializeUserId` | `string` | No | Advanced: optional fixed user id when you manage identity yourself. |
|
|
41
43
|
| `adminConversationPersistenceKey` | `string` | No | Optional stable key for transcript `localStorage` isolation. Omit to use a non-secret default from the page **origin** (same across SPA routes). Never use the raw access key here. |
|
|
42
44
|
| `React` | `React` | Yes | React instance from your application |
|
|
43
45
|
| `ReactDOM` | `ReactDOM` | Yes | ReactDOM instance from your application |
|
|
@@ -317,6 +319,51 @@ function App() {
|
|
|
317
319
|
export default App;
|
|
318
320
|
```
|
|
319
321
|
|
|
322
|
+
## Signed-in users (`getUserInfo`)
|
|
323
|
+
|
|
324
|
+
If people can sign in on your site, pass **`getUserInfo`** so Guide AI can treat them as the same person across visits and tie voice sessions to their account.
|
|
325
|
+
|
|
326
|
+
- Your function should return something like **`{ username: user.email }`** when someone is logged in. Use whatever stable string identifies them (often an email).
|
|
327
|
+
- When **no one is logged in yet**, you can **`return null`** (or omit **`username`**) so Guide AI keeps a normal anonymous experience without rotating identities on every check.
|
|
328
|
+
- After login or logout, you can notify Guide AI right away by dispatching **`GUIDEAI_HOST_USERINFO_REFRESH_EVENT`** on `window` (import it from `guideai-app` alongside the component).
|
|
329
|
+
|
|
330
|
+
Wrap **`getUserInfo`** in **`useCallback`** so it doesn’t change every render.
|
|
331
|
+
|
|
332
|
+
More detail for integrations lives in **`docs/WIDGET_USER_IDENTITY.md`** and **`AUTHENTICATION.md`**.
|
|
333
|
+
|
|
334
|
+
### Example
|
|
335
|
+
|
|
336
|
+
```jsx
|
|
337
|
+
import React, { useCallback } from 'react';
|
|
338
|
+
import ReactDOM from 'react-dom';
|
|
339
|
+
import GuideAI, { GUIDEAI_HOST_USERINFO_REFRESH_EVENT } from 'guideai-app';
|
|
340
|
+
|
|
341
|
+
function App({ currentUser }) {
|
|
342
|
+
const getUserInfo = useCallback(() => {
|
|
343
|
+
if (!currentUser) return null;
|
|
344
|
+
|
|
345
|
+
return {
|
|
346
|
+
username: currentUser.email,
|
|
347
|
+
displayName: currentUser.name,
|
|
348
|
+
};
|
|
349
|
+
}, [currentUser]);
|
|
350
|
+
|
|
351
|
+
// Optional: after your auth state changes, run:
|
|
352
|
+
// window.dispatchEvent(new CustomEvent(GUIDEAI_HOST_USERINFO_REFRESH_EVENT));
|
|
353
|
+
|
|
354
|
+
return (
|
|
355
|
+
<GuideAI
|
|
356
|
+
authKey="your-access-key"
|
|
357
|
+
workspace="your-workspace"
|
|
358
|
+
React={React}
|
|
359
|
+
ReactDOM={ReactDOM}
|
|
360
|
+
getUserInfo={getUserInfo}
|
|
361
|
+
position={{ bottom: '20px', right: '20px' }}
|
|
362
|
+
/>
|
|
363
|
+
);
|
|
364
|
+
}
|
|
365
|
+
```
|
|
366
|
+
|
|
320
367
|
## Getting Your Access Key
|
|
321
368
|
|
|
322
369
|
To use Guide AI, you'll need an access key and workspace slug. Contact the Guide AI team to get set up.
|