obi-sdk 0.19.49 → 0.19.50-beta.1
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/dist/index.js +109 -44
- package/dist/index2.js +1 -0
- package/dist/obi-sdk.standalone.iife.js +109 -44
- package/dist/src/CourseDialog.d.ts +49 -0
- package/dist/src/StartSessionDialog.d.ts +18 -0
- package/dist/src/WidgetV2.d.ts +6 -0
- package/dist/src/sdk-styles.d.ts +1 -0
- package/dist/src/sdk.d.ts +5 -2
- package/dist/src/widget.d.ts +1 -1
- package/package.json +42 -37
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type AvatarFallbackStatus, type ControlBarProps, CoursePanel, type CoursePanelCourse, type DialogCloseReason, type DialogProps } from "@obi/cor-components";
|
|
3
|
+
export type CourseDialogContentProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Captions text shown over the left panel (e.g. agent subtitles).
|
|
6
|
+
* When omitted, the captions overlay is hidden.
|
|
7
|
+
*/
|
|
8
|
+
captionsText?: React.ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* AvatarFallback audio power (0..1) used to drive the speaking halo.
|
|
11
|
+
*/
|
|
12
|
+
avatarAudioPower?: number;
|
|
13
|
+
avatarImageSrc?: string;
|
|
14
|
+
avatarAriaLabel?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Activity status shown as text beneath the avatar circle.
|
|
17
|
+
* When "thinking" or "searching", displays corresponding status text.
|
|
18
|
+
*/
|
|
19
|
+
avatarStatus?: AvatarFallbackStatus | null;
|
|
20
|
+
/**
|
|
21
|
+
* Props forwarded to the meeting ControlBar beneath the video tile.
|
|
22
|
+
*/
|
|
23
|
+
controlBarProps: ControlBarProps;
|
|
24
|
+
/**
|
|
25
|
+
* Courses shown in the right-hand selection panel.
|
|
26
|
+
*/
|
|
27
|
+
courses: CoursePanelCourse[];
|
|
28
|
+
/**
|
|
29
|
+
* Props forwarded to CoursePanel to control selection behaviour/state.
|
|
30
|
+
*/
|
|
31
|
+
coursePanelProps?: Omit<React.ComponentProps<typeof CoursePanel>, "courses">;
|
|
32
|
+
/**
|
|
33
|
+
* Optional replacement content for the right-hand panel.
|
|
34
|
+
* When provided, this replaces the default CoursePanel, allowing
|
|
35
|
+
* the dialog to show chat or other alternate content.
|
|
36
|
+
*/
|
|
37
|
+
rightPanel?: React.ReactNode;
|
|
38
|
+
className?: string;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* CourseDialogContent renders the two-panel course selection UI without owning dialog state.
|
|
42
|
+
* This makes it easy to reuse in Storybook without needing to click a trigger to open.
|
|
43
|
+
*/
|
|
44
|
+
export declare function CourseDialogContent(props: CourseDialogContentProps): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export type CourseDialogProps = CourseDialogContentProps & Pick<DialogProps, "open"> & {
|
|
46
|
+
onClose?: (reason: DialogCloseReason) => void;
|
|
47
|
+
dialogProps?: Omit<DialogProps, "open" | "onClose" | "variant" | "children">;
|
|
48
|
+
};
|
|
49
|
+
export declare function CourseDialog(props: CourseDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type DialogCloseReason } from "@obi/cor-components";
|
|
2
|
+
type StartSessionDialogProps = {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onClose?: (reason: DialogCloseReason) => void;
|
|
5
|
+
onStart: () => void;
|
|
6
|
+
agentName: string;
|
|
7
|
+
agentSubtitle: string;
|
|
8
|
+
/**
|
|
9
|
+
* Markdown content describing what the onboarding session covers.
|
|
10
|
+
* Rendered as sanitized HTML via `Markdown`.
|
|
11
|
+
*/
|
|
12
|
+
description: string;
|
|
13
|
+
startLabel?: string;
|
|
14
|
+
disclaimer?: string;
|
|
15
|
+
showCloseButton?: boolean;
|
|
16
|
+
};
|
|
17
|
+
export declare function StartSessionDialog(props: StartSessionDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export type { StartSessionDialogProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const sdkStylesText: string;
|
package/dist/src/sdk.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from "eventemitter3";
|
|
2
|
-
import type { Identity } from "@obi/obi-client";
|
|
3
2
|
import { ObiClient } from "@obi/obi-client";
|
|
3
|
+
import type { Identity } from "@obi/obi-client";
|
|
4
4
|
import { Command, CommandType, Config } from "./types";
|
|
5
5
|
export declare const PLAN_URL_PARAM = "49206C6F7665204F6269_session";
|
|
6
6
|
export declare const STORAGE_KEY = "obi-url-params";
|
|
@@ -76,8 +76,11 @@ export declare class ObiSDK extends EventEmitter<ObiSDKEvents> {
|
|
|
76
76
|
say(message: string): Promise<void>;
|
|
77
77
|
/**
|
|
78
78
|
* Start a new session.
|
|
79
|
+
* @param options - Optional configuration including withMicrophone to auto-enable microphone
|
|
79
80
|
*/
|
|
80
|
-
startSession(
|
|
81
|
+
startSession(options?: {
|
|
82
|
+
withMicrophone?: boolean;
|
|
83
|
+
}): Promise<void>;
|
|
81
84
|
/**
|
|
82
85
|
* Dispatch all queued commands in the order they were added.
|
|
83
86
|
* TODO: Passing in the planuuid is not cool.
|
package/dist/src/widget.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "obi-sdk",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.50-beta.1",
|
|
4
4
|
"description": "JavaScript SDK for Obi",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/obi-sdk.umd.js",
|
|
@@ -27,8 +27,11 @@
|
|
|
27
27
|
"build:staging": "VITE_API_BASE_URL=https://staging.coragents.ai vite build --mode staging",
|
|
28
28
|
"build:publish": "pnpm build --mode production",
|
|
29
29
|
"build:ext": "vite build --mode production --config vite.config.ext.ts",
|
|
30
|
-
"lint": "eslint .
|
|
31
|
-
"
|
|
30
|
+
"lint": "eslint .",
|
|
31
|
+
"lint:fix": "eslint . --fix",
|
|
32
|
+
"format": "pnpm format:fix",
|
|
33
|
+
"format:check": "prettier --config ../.prettierrc --ignore-path ../.prettierignore --check \"src/**/*.{ts,tsx,js,jsx}\"",
|
|
34
|
+
"format:fix": "prettier --config ../.prettierrc --ignore-path ../.prettierignore --write \"src/**/*.{ts,tsx,js,jsx}\"",
|
|
32
35
|
"preview": "vite preview",
|
|
33
36
|
"types": "tsc --emitDeclarationOnly",
|
|
34
37
|
"types:check": "tsc --noEmit",
|
|
@@ -55,50 +58,52 @@
|
|
|
55
58
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
56
59
|
"homepage": "https://www.iamobi.ai",
|
|
57
60
|
"dependencies": {
|
|
58
|
-
"@lit/react": "^1.0.
|
|
61
|
+
"@lit/react": "^1.0.8",
|
|
62
|
+
"@obi/cor-components": "workspace:*",
|
|
59
63
|
"@obi/obi-client": "workspace:*",
|
|
60
64
|
"@obi/obi-components": "workspace:*",
|
|
61
65
|
"@obi/utils": "workspace:*",
|
|
62
|
-
"@sentry/browser": "^9.
|
|
63
|
-
"@sentry/vite-plugin": "^3.
|
|
66
|
+
"@sentry/browser": "^9.47.1",
|
|
67
|
+
"@sentry/vite-plugin": "^3.6.1",
|
|
64
68
|
"@types/jsdom": "^21.1.7",
|
|
69
|
+
"css-line-break": "workspace:*",
|
|
65
70
|
"eventemitter3": "^5.0.1",
|
|
66
71
|
"html2canvas-pro": "workspace:*",
|
|
72
|
+
"lit": "^3.3.1",
|
|
73
|
+
"mixpanel-browser": "^2.72.0",
|
|
74
|
+
"react": "^19.2.3",
|
|
75
|
+
"react-dom": "^19.2.3",
|
|
67
76
|
"text-segmentation": "workspace:*",
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"mixpanel-browser": "^2.68.0",
|
|
71
|
-
"preact": ">=10.0.0",
|
|
72
|
-
"ts-pattern": "^5.7.0",
|
|
73
|
-
"zod": "^3.22.0"
|
|
77
|
+
"ts-pattern": "^5.9.0",
|
|
78
|
+
"zod": "^3.25.76"
|
|
74
79
|
},
|
|
75
80
|
"devDependencies": {
|
|
76
|
-
"@chromatic-com/storybook": "^4.
|
|
77
|
-
"@eslint/js": "^8.
|
|
78
|
-
"@
|
|
79
|
-
"@storybook/
|
|
80
|
-
"@storybook/
|
|
81
|
-
"@
|
|
82
|
-
"@types/
|
|
83
|
-
"@types/react
|
|
84
|
-
"@
|
|
85
|
-
"@typescript-eslint/
|
|
86
|
-
"@
|
|
87
|
-
"@
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"eslint
|
|
91
|
-
"eslint-
|
|
81
|
+
"@chromatic-com/storybook": "^4.1.3",
|
|
82
|
+
"@eslint/js": "^8.57.1",
|
|
83
|
+
"@storybook/addon-docs": "^10.1.7",
|
|
84
|
+
"@storybook/react": "^10.1.7",
|
|
85
|
+
"@storybook/react-vite": "^10.1.7",
|
|
86
|
+
"@testing-library/react": "^16.3.0",
|
|
87
|
+
"@types/node": "^22.19.2",
|
|
88
|
+
"@types/react": "^19.2.7",
|
|
89
|
+
"@types/react-dom": "^19.2.3",
|
|
90
|
+
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
91
|
+
"@typescript-eslint/parser": "^7.18.0",
|
|
92
|
+
"@vitejs/plugin-react": "^5.1.2",
|
|
93
|
+
"@vitest/coverage-v8": "^2.1.9",
|
|
94
|
+
"@vitest/ui": "^2.1.9",
|
|
95
|
+
"eslint": "^8.57.1",
|
|
96
|
+
"eslint-config-prettier": "^9.1.2",
|
|
97
|
+
"eslint-plugin-import": "^2.32.0",
|
|
98
|
+
"eslint-plugin-storybook": "^0.12.0",
|
|
92
99
|
"jsdom": "^25.0.1",
|
|
93
|
-
"prettier": "^3.
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"vite": "^4.5.0",
|
|
101
|
-
"vitest": "^2.1.8"
|
|
100
|
+
"prettier": "^3.7.4",
|
|
101
|
+
"rimraf": "^6.1.2",
|
|
102
|
+
"storybook": "^10.1.7",
|
|
103
|
+
"terser": "^5.44.1",
|
|
104
|
+
"typescript": "^5.9.3",
|
|
105
|
+
"vite": "^4.5.14",
|
|
106
|
+
"vitest": "^2.1.9"
|
|
102
107
|
},
|
|
103
108
|
"packageManager": "pnpm@10.5.2"
|
|
104
109
|
}
|