@pipecat-ai/react-native-daily-transport 1.2.0 → 1.5.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/LICENSE.md CHANGED
@@ -21,4 +21,4 @@ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21
21
  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
22
22
  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
23
23
  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <h1><div align="center">
2
- <img alt="pipecat client react native" width="500px" height="auto" src="https://raw.githubusercontent.com/pipecat-ai/pipecat-client-react-native-daily-transport/main/pipecat-react-native.png">
2
+ <img alt="pipecat client react native" width="500px" height="auto" src="https://github.com/pipecat-ai/pipecat-client-react-native-transports/blob/main/pipecat-react-native.png">
3
3
  </div></h1>
4
4
 
5
5
  [![Docs](https://img.shields.io/badge/documentation-blue)](https://docs.pipecat.ai/client/introduction)
@@ -22,78 +22,56 @@ Install `@pipecat-ai/react-native-daily-transport` along with its peer dependenc
22
22
 
23
23
  ```bash
24
24
  npm i @pipecat-ai/react-native-daily-transport
25
- npm i @daily-co/react-native-daily-js@^0.73.0
26
- npm i @daily-co/react-native-webrtc@^118.0.3-daily.2
27
- npm i @react-native-async-storage/async-storage@^1.23.1
25
+ npm i @daily-co/react-native-daily-js@^0.81.0
26
+ npm i @daily-co/react-native-webrtc@^124.0.6-daily.1
27
+ npm i @react-native-async-storage/async-storage@^1.24.0
28
28
  npm i react-native-background-timer@^2.4.1
29
29
  npm i react-native-get-random-values@^1.11.0
30
30
  ```
31
31
 
32
32
  If you are using Expo, you will also need to add the following dependencies:
33
+
33
34
  ```bash
34
- npm i @config-plugins/react-native-webrtc@^10.0.0
35
- npm i @daily-co/config-plugin-rn-daily-js@0.0.7
35
+ npm i @daily-co/config-plugin-rn-daily-js@0.0.10
36
36
  ```
37
37
 
38
38
  All the details about Expo can be found [here](https://github.com/daily-co/rn-daily-js-expo-config-plugin).
39
39
 
40
- A full demo can be found [here](https://github.com/daily-demos/daily-bots-react-native-demo/)
40
+ A full demo can be found [here](https://github.com/pipecat-ai/pipecat-examples/tree/main/simple-chatbot/client/react-native)
41
41
 
42
42
  ## Quick Start
43
43
 
44
44
  Instantiate an `RTVIClient` instance, wire up the bot's audio, and start the conversation:
45
45
 
46
46
  ```typescript
47
- let voiceClient = new RTVIClient({
47
+ let pipecatClient = new PipecatClient({
48
48
  transport: new RNDailyTransport(),
49
- params: {
50
- baseUrl: url,
51
- config: [
52
- {
53
- service: "tts",
54
- options: [
55
- { name: "voice", value: "79a125e8-cd45-4c13-8a67-188112f4dd22" },
56
- ],
57
- },
58
- {
59
- service: "llm",
60
- options: [
61
- { name: "model", value: "meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo" },
62
- {
63
- name: "initial_messages",
64
- value: [
65
- {
66
- role: "system",
67
- content:
68
- "You are a assistant called ExampleBot. You can ask me anything. Keep responses brief and legible. Your responses will converted to audio. Please do not include any special characters in your response other than '!' or '?'. Start by briefly introducing yourself.",
69
- },
70
- ],
71
- },
72
- { name: "run_on_config", value: true },
73
- ],
74
- },
75
- ],
76
- requestData: {
77
- services: {
78
- llm: "together",
79
- tts: "cartesia",
80
- },
49
+ enableMic: true,
50
+ enableCam: false,
51
+ callbacks: {
52
+ onConnected: () => {
53
+ setInCall(true);
54
+ },
55
+ onDisconnected: () => {
56
+ setInCall(false);
57
+ },
58
+ onTransportStateChanged: (state) => {
59
+ console.log(`Transport state changed: ${state}`);
60
+ setCurrentState(state);
61
+ },
62
+ onError: (error) => {
63
+ console.log('Error:', JSON.stringify(error));
81
64
  },
82
- endpoints: {
83
- connect: "/start",
84
- action: "/action"
85
- }
86
65
  },
87
- enableMic: true,
88
- enableCam: false
89
- })
66
+ });
90
67
 
91
- await voiceClient.start()
68
+ await client?.startBotAndConnect({
69
+ endpoint: baseUrl + '/start',
70
+ });
92
71
  ```
93
72
 
94
73
  > Note: To enable screen sharing on iOS, follow the instructions in the [Daily Framework RN Screen Share extension](https://github.com/daily-co/rn-screen-share-extension/).
95
74
 
96
-
97
75
  ## Documentation
98
76
 
99
77
  Pipecat Client React Native implements a client instance that:
@@ -111,7 +89,7 @@ Docs and API reference can be found at https://docs.pipecat.ai/client/introducti
111
89
 
112
90
  We welcome contributions from the community! Whether you're fixing bugs, improving documentation, or adding new features, here's how you can help:
113
91
 
114
- - **Found a bug?** Open an [issue](https://github.com/pipecat-ai/pipecat-client-react-native-daily-transport/issues)
92
+ - **Found a bug?** Open an [issue](https://github.com/pipecat-ai/pipecat-client-react-native-transports/issues)
115
93
  - **Have a feature idea?** Start a [discussion](https://discord.gg/pipecat)
116
94
  - **Want to contribute code?** Check our [CONTRIBUTING.md](CONTRIBUTING.md) guide
117
95
  - **Documentation improvements?** [Docs](https://github.com/pipecat-ai/docs) PRs are always welcome
package/package.json CHANGED
@@ -1,9 +1,8 @@
1
1
  {
2
2
  "name": "@pipecat-ai/react-native-daily-transport",
3
- "version": "1.2.0",
3
+ "version": "1.5.0",
4
4
  "license": "BSD-2-Clause",
5
5
  "description": "React Native library for connecting to RTVI client using Daily",
6
- "source": "./src/index.tsx",
7
6
  "main": "./lib/commonjs/index.js",
8
7
  "module": "./lib/module/index.js",
9
8
  "types": "./lib/typescript/module/src/index.d.ts",
@@ -13,13 +12,15 @@
13
12
  "README.md"
14
13
  ],
15
14
  "scripts": {
15
+ "example": "yarn workspace @pipecat-ai/react-native-daily-transport-example",
16
16
  "test": "jest",
17
17
  "typecheck": "tsc",
18
18
  "lint": "eslint \"**/*.{js,ts,tsx}\"",
19
+ "lint:fix": "eslint \"**/*.{js,ts,tsx}\" --fix",
19
20
  "clean": "del-cli lib",
20
21
  "prepare": "bob build",
21
22
  "build": "bob build",
22
- "tag": "scripts/tag",
23
+ "tag": "../../scripts/tag",
23
24
  "prepublishOnly": "npm run tag"
24
25
  },
25
26
  "keywords": [
@@ -29,18 +30,15 @@
29
30
  ],
30
31
  "repository": {
31
32
  "type": "git",
32
- "url": "git+https://github.com/rtvi-ai/rtvi-client-react-native-daily.git"
33
+ "url": "git+https://github.com/pipecat-ai/pipecat-client-react-native-transports.git"
33
34
  },
34
35
  "bugs": {
35
- "url": "https://github.com/rtvi-ai/rtvi-client-react-native-daily/issues"
36
+ "url": "https://github.com/pipecat-ai/pipecat-client-react-native-transports/issues"
36
37
  },
37
- "homepage": "https://github.com/rtvi-ai/rtvi-client-react-native-daily#readme",
38
+ "homepage": "https://github.com/pipecat-ai/pipecat-client-react-native-transports#readme",
38
39
  "publishConfig": {
39
40
  "registry": "https://registry.npmjs.org/"
40
41
  },
41
- "resolutions": {
42
- "@types/react": "18.0.38"
43
- },
44
42
  "jest": {
45
43
  "preset": "react-native",
46
44
  "modulePathIgnorePatterns": [
@@ -48,37 +46,6 @@
48
46
  "<rootDir>/lib/"
49
47
  ]
50
48
  },
51
- "eslintConfig": {
52
- "root": true,
53
- "extends": [
54
- "@react-native",
55
- "prettier"
56
- ],
57
- "rules": {
58
- "react/react-in-jsx-scope": "off",
59
- "prettier/prettier": [
60
- "error",
61
- {
62
- "quoteProps": "consistent",
63
- "singleQuote": true,
64
- "tabWidth": 2,
65
- "trailingComma": "es5",
66
- "useTabs": false
67
- }
68
- ]
69
- }
70
- },
71
- "eslintIgnore": [
72
- "node_modules/",
73
- "lib/"
74
- ],
75
- "prettier": {
76
- "quoteProps": "consistent",
77
- "singleQuote": true,
78
- "tabWidth": 2,
79
- "trailingComma": "es5",
80
- "useTabs": false
81
- },
82
49
  "react-native-builder-bob": {
83
50
  "source": "src",
84
51
  "output": "lib",
@@ -98,39 +65,31 @@
98
65
  [
99
66
  "typescript",
100
67
  {
101
- "project": "tsconfig.build.json",
102
- "esm": true
68
+ "project": "tsconfig.build.json"
103
69
  }
104
70
  ]
105
71
  ]
106
72
  },
107
73
  "dependencies": {
108
- "@pipecat-ai/client-js": "^1.2.0"
74
+ "@pipecat-ai/client-js": "^1.5.0"
109
75
  },
110
76
  "peerDependencies": {
111
- "@daily-co/react-native-webrtc": "^118.0.3-daily.4",
112
- "@daily-co/react-native-daily-js": "^0.79.0",
77
+ "@daily-co/react-native-daily-js": "^0.82.0",
78
+ "@daily-co/react-native-webrtc": "^124.0.6-daily.1",
113
79
  "@react-native-async-storage/async-storage": "^1.24.0",
114
- "react-native-get-random-values": "^1.11.0",
115
- "react-native-background-timer": "^2.4.1"
80
+ "react-native": "*",
81
+ "react-native-background-timer": "^2.4.1",
82
+ "react-native-get-random-values": "^1.11.0"
116
83
  },
117
84
  "devDependencies": {
118
- "@daily-co/react-native-webrtc": "^118.0.3-daily.4",
119
- "@daily-co/react-native-daily-js": "^0.79.0",
85
+ "@daily-co/react-native-daily-js": "^0.82.0",
86
+ "@daily-co/react-native-webrtc": "^124.0.6-daily.1",
120
87
  "@react-native-async-storage/async-storage": "^1.24.0",
121
- "react-native-get-random-values": "^1.11.0",
122
88
  "@types/base-64": "^1.0.2",
89
+ "del-cli": "^6.0.0",
123
90
  "react-native-background-timer": "^2.4.1",
124
- "@react-native/eslint-config": "^0.73.1",
125
- "@types/jest": "^29.5.5",
126
- "@types/react": "19.0.14",
127
- "del-cli": "^5.1.0",
128
- "eslint": "^8.51.0",
129
- "eslint-config-prettier": "^9.0.0",
130
- "eslint-plugin-prettier": "^5.0.1",
131
- "jest": "^29.7.0",
132
- "prettier": "^3.0.3",
133
- "react-native-builder-bob": "^0.39.1",
134
- "typescript": "^5.8.3"
91
+ "react-native-builder-bob": "^0.40.13",
92
+ "react-native-get-random-values": "^1.11.0",
93
+ "typescript": "*"
135
94
  }
136
95
  }
@@ -1,143 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.logger = exports.UnsupportedFeatureError = exports.TransportWrapper = exports.TransportStateEnum = exports.TransportStartError = exports.Transport = exports.StartBotError = exports.RTVI_PROTOCOL_VERSION = exports.RTVI_MESSAGE_LABEL = exports.RTVIMessageType = exports.RTVIMessage = exports.RTVIEvent = exports.RTVIError = exports.PipecatClient = exports.MessageDispatcher = exports.LogLevel = exports.DeviceError = exports.ConnectionTimeoutError = exports.BotNotReadyError = void 0;
7
- let TransportStateEnum = exports.TransportStateEnum = /*#__PURE__*/function (TransportStateEnum) {
8
- TransportStateEnum["DISCONNECTED"] = "disconnected";
9
- TransportStateEnum["INITIALIZING"] = "initializing";
10
- TransportStateEnum["INITIALIZED"] = "initialized";
11
- TransportStateEnum["AUTHENTICATING"] = "authenticating";
12
- TransportStateEnum["AUTHENTICATED"] = "authenticated";
13
- TransportStateEnum["CONNECTING"] = "connecting";
14
- TransportStateEnum["CONNECTED"] = "connected";
15
- TransportStateEnum["READY"] = "ready";
16
- TransportStateEnum["DISCONNECTING"] = "disconnecting";
17
- TransportStateEnum["ERROR"] = "error";
18
- return TransportStateEnum;
19
- }({});
20
- /**
21
- * Copyright (c) 2024, Daily.
22
- *
23
- * SPDX-License-Identifier: BSD-2-Clause
24
- */
25
- class RTVIError extends Error {}
26
- exports.RTVIError = RTVIError;
27
- class ConnectionTimeoutError extends RTVIError {}
28
- exports.ConnectionTimeoutError = ConnectionTimeoutError;
29
- class StartBotError extends RTVIError {}
30
- exports.StartBotError = StartBotError;
31
- class TransportStartError extends RTVIError {}
32
- exports.TransportStartError = TransportStartError;
33
- class BotNotReadyError extends RTVIError {}
34
- exports.BotNotReadyError = BotNotReadyError;
35
- class UnsupportedFeatureError extends RTVIError {}
36
- exports.UnsupportedFeatureError = UnsupportedFeatureError;
37
- class DeviceError extends RTVIError {}
38
- exports.DeviceError = DeviceError;
39
- const RTVI_PROTOCOL_VERSION = exports.RTVI_PROTOCOL_VERSION = '1.0.0';
40
- const RTVI_MESSAGE_LABEL = exports.RTVI_MESSAGE_LABEL = 'rtvi-ai';
41
- /**
42
- * Messages the corresponding server-side client expects to receive about
43
- * our client-side state.
44
- */
45
- let RTVIMessageType = exports.RTVIMessageType = /*#__PURE__*/function (RTVIMessageType) {
46
- RTVIMessageType["CLIENT_READY"] = "client-ready";
47
- RTVIMessageType["DISCONNECT_BOT"] = "disconnect-bot";
48
- RTVIMessageType["CLIENT_MESSAGE"] = "client-message";
49
- RTVIMessageType["APPEND_TO_CONTEXT"] = "append-to-context";
50
- RTVIMessageType["BOT_READY"] = "bot-ready";
51
- RTVIMessageType["ERROR"] = "error";
52
- RTVIMessageType["METRICS"] = "metrics";
53
- RTVIMessageType["SERVER_MESSAGE"] = "server-message";
54
- RTVIMessageType["SERVER_RESPONSE"] = "server-response";
55
- RTVIMessageType["ERROR_RESPONSE"] = "error-response";
56
- RTVIMessageType["APPEND_TO_CONTEXT_RESULT"] = "append-to-context-result";
57
- RTVIMessageType["USER_TRANSCRIPTION"] = "user-transcription";
58
- RTVIMessageType["BOT_TRANSCRIPTION"] = "bot-transcription";
59
- RTVIMessageType["USER_STARTED_SPEAKING"] = "user-started-speaking";
60
- RTVIMessageType["USER_STOPPED_SPEAKING"] = "user-stopped-speaking";
61
- RTVIMessageType["BOT_STARTED_SPEAKING"] = "bot-started-speaking";
62
- RTVIMessageType["BOT_STOPPED_SPEAKING"] = "bot-stopped-speaking";
63
- RTVIMessageType["USER_LLM_TEXT"] = "user-llm-text";
64
- RTVIMessageType["BOT_LLM_TEXT"] = "bot-llm-text";
65
- RTVIMessageType["BOT_LLM_STARTED"] = "bot-llm-started";
66
- RTVIMessageType["BOT_LLM_STOPPED"] = "bot-llm-stopped";
67
- RTVIMessageType["LLM_FUNCTION_CALL"] = "llm-function-call";
68
- RTVIMessageType["LLM_FUNCTION_CALL_RESULT"] = "llm-function-call-result";
69
- RTVIMessageType["BOT_LLM_SEARCH_RESPONSE"] = "bot-llm-search-response";
70
- RTVIMessageType["BOT_TTS_TEXT"] = "bot-tts-text";
71
- RTVIMessageType["BOT_TTS_STARTED"] = "bot-tts-started";
72
- RTVIMessageType["BOT_TTS_STOPPED"] = "bot-tts-stopped";
73
- return RTVIMessageType;
74
- }({});
75
- class RTVIMessage {}
76
- exports.RTVIMessage = RTVIMessage;
77
- let RTVIEvent = exports.RTVIEvent = /*#__PURE__*/function (RTVIEvent) {
78
- RTVIEvent["Connected"] = "connected";
79
- RTVIEvent["Disconnected"] = "disconnected";
80
- RTVIEvent["TransportStateChanged"] = "transportStateChanged";
81
- RTVIEvent["BotConnected"] = "botConnected";
82
- RTVIEvent["BotReady"] = "botReady";
83
- RTVIEvent["BotDisconnected"] = "botDisconnected";
84
- RTVIEvent["Error"] = "error";
85
- RTVIEvent["ServerMessage"] = "serverMessage";
86
- RTVIEvent["ServerResponse"] = "serverResponse";
87
- RTVIEvent["MessageError"] = "messageError";
88
- RTVIEvent["Metrics"] = "metrics";
89
- RTVIEvent["BotStartedSpeaking"] = "botStartedSpeaking";
90
- RTVIEvent["BotStoppedSpeaking"] = "botStoppedSpeaking";
91
- RTVIEvent["UserStartedSpeaking"] = "userStartedSpeaking";
92
- RTVIEvent["UserStoppedSpeaking"] = "userStoppedSpeaking";
93
- RTVIEvent["UserTranscript"] = "userTranscript";
94
- RTVIEvent["BotTranscript"] = "botTranscript";
95
- RTVIEvent["BotLlmText"] = "botLlmText";
96
- RTVIEvent["BotLlmStarted"] = "botLlmStarted";
97
- RTVIEvent["BotLlmStopped"] = "botLlmStopped";
98
- RTVIEvent["LLMFunctionCall"] = "llmFunctionCall";
99
- RTVIEvent["BotLlmSearchResponse"] = "botLlmSearchResponse";
100
- RTVIEvent["BotTtsText"] = "botTtsText";
101
- RTVIEvent["BotTtsStarted"] = "botTtsStarted";
102
- RTVIEvent["BotTtsStopped"] = "botTtsStopped";
103
- RTVIEvent["ParticipantConnected"] = "participantConnected";
104
- RTVIEvent["ParticipantLeft"] = "participantLeft";
105
- RTVIEvent["TrackStarted"] = "trackStarted";
106
- RTVIEvent["TrackStopped"] = "trackStopped";
107
- RTVIEvent["ScreenTrackStarted"] = "screenTrackStarted";
108
- RTVIEvent["ScreenTrackStopped"] = "screenTrackStopped";
109
- RTVIEvent["ScreenShareError"] = "screenShareError";
110
- RTVIEvent["LocalAudioLevel"] = "localAudioLevel";
111
- RTVIEvent["RemoteAudioLevel"] = "remoteAudioLevel";
112
- RTVIEvent["AvailableCamsUpdated"] = "availableCamsUpdated";
113
- RTVIEvent["AvailableMicsUpdated"] = "availableMicsUpdated";
114
- RTVIEvent["AvailableSpeakersUpdated"] = "availableSpeakersUpdated";
115
- RTVIEvent["CamUpdated"] = "camUpdated";
116
- RTVIEvent["MicUpdated"] = "micUpdated";
117
- RTVIEvent["SpeakerUpdated"] = "speakerUpdated";
118
- RTVIEvent["DeviceError"] = "deviceError";
119
- return RTVIEvent;
120
- }({});
121
- /**
122
- * Copyright (c) 2024, Daily.
123
- *
124
- * SPDX-License-Identifier: BSD-2-Clause
125
- */
126
- let LogLevel = exports.LogLevel = /*#__PURE__*/function (LogLevel) {
127
- LogLevel[LogLevel["NONE"] = 0] = "NONE";
128
- LogLevel[LogLevel["ERROR"] = 1] = "ERROR";
129
- LogLevel[LogLevel["WARN"] = 2] = "WARN";
130
- LogLevel[LogLevel["INFO"] = 3] = "INFO";
131
- LogLevel[LogLevel["DEBUG"] = 4] = "DEBUG";
132
- return LogLevel;
133
- }({});
134
- const logger = exports.logger = Logger.getInstance();
135
- class MessageDispatcher {}
136
- exports.MessageDispatcher = MessageDispatcher;
137
- class Transport {}
138
- exports.Transport = Transport;
139
- class TransportWrapper {}
140
- exports.TransportWrapper = TransportWrapper;
141
- class PipecatClient extends RTVIEventEmitter {}
142
- exports.PipecatClient = PipecatClient;
143
- //# sourceMappingURL=typeOverrides.d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["TransportStateEnum","exports","RTVIError","Error","ConnectionTimeoutError","StartBotError","TransportStartError","BotNotReadyError","UnsupportedFeatureError","DeviceError","RTVI_PROTOCOL_VERSION","RTVI_MESSAGE_LABEL","RTVIMessageType","RTVIMessage","RTVIEvent","LogLevel","logger","Logger","getInstance","MessageDispatcher","Transport","TransportWrapper","PipecatClient","RTVIEventEmitter"],"sourceRoot":"../../../../../src","sources":["types/@pipecat-ai/client-js/typeOverrides.d.ts"],"mappings":";;;;;;IAgBYA,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,0BAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA;AAiB9B;AACA;AACA;AACA;AACA;AACO,MAAME,SAAS,SAASC,KAAK,CAAC;AAGpCF,OAAA,CAAAC,SAAA,GAAAA,SAAA;AACM,MAAME,sBAAsB,SAASF,SAAS,CAAC;AAErDD,OAAA,CAAAG,sBAAA,GAAAA,sBAAA;AACM,MAAMC,aAAa,SAASH,SAAS,CAAC;AAG5CD,OAAA,CAAAI,aAAA,GAAAA,aAAA;AACM,MAAMC,mBAAmB,SAASJ,SAAS,CAAC;AAElDD,OAAA,CAAAK,mBAAA,GAAAA,mBAAA;AACM,MAAMC,gBAAgB,SAASL,SAAS,CAAC;AAE/CD,OAAA,CAAAM,gBAAA,GAAAA,gBAAA;AACM,MAAMC,uBAAuB,SAASN,SAAS,CAAC;AAGtDD,OAAA,CAAAO,uBAAA,GAAAA,uBAAA;AAaM,MAAMC,WAAW,SAASP,SAAS,CAAC;AAU1CD,OAAA,CAAAQ,WAAA,GAAAA,WAAA;AACM,MAAMC,qBAAqB,GAAAT,OAAA,CAAAS,qBAAA,GAAG,OAAO;AACrC,MAAMC,kBAAkB,GAAA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EAARA,QAAQ,CAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA;AAgBb,MAAMC,MAAc,GAAAf,OAAA,CAAAe,MAAA,GAAGC,MAAM,CAACC,WAAW,CAAC,CAAC;AAS3C,MAAMC,iBAAiB,CAAC;AAe9BlB,OAAA,CAAAkB,iBAAA,GAAAA,iBAAA;AA+BM,MAAeC,SAAS,CAAC;AAsD/BnB,OAAA,CAAAmB,SAAA,GAAAA,SAAA;AACM,MAAMC,gBAAgB,CAAC;AAG7BpB,OAAA,CAAAoB,gBAAA,GAAAA,gBAAA;AAqFM,MAAMC,aAAa,SAASC,gBAAgB,CAAC;AAwFnDtB,OAAA,CAAAqB,aAAA,GAAAA,aAAA","ignoreList":[]}
@@ -1,127 +0,0 @@
1
- "use strict";
2
-
3
- export let TransportStateEnum = /*#__PURE__*/function (TransportStateEnum) {
4
- TransportStateEnum["DISCONNECTED"] = "disconnected";
5
- TransportStateEnum["INITIALIZING"] = "initializing";
6
- TransportStateEnum["INITIALIZED"] = "initialized";
7
- TransportStateEnum["AUTHENTICATING"] = "authenticating";
8
- TransportStateEnum["AUTHENTICATED"] = "authenticated";
9
- TransportStateEnum["CONNECTING"] = "connecting";
10
- TransportStateEnum["CONNECTED"] = "connected";
11
- TransportStateEnum["READY"] = "ready";
12
- TransportStateEnum["DISCONNECTING"] = "disconnecting";
13
- TransportStateEnum["ERROR"] = "error";
14
- return TransportStateEnum;
15
- }({});
16
- /**
17
- * Copyright (c) 2024, Daily.
18
- *
19
- * SPDX-License-Identifier: BSD-2-Clause
20
- */
21
- export class RTVIError extends Error {}
22
- export class ConnectionTimeoutError extends RTVIError {}
23
- export class StartBotError extends RTVIError {}
24
- export class TransportStartError extends RTVIError {}
25
- export class BotNotReadyError extends RTVIError {}
26
- export class UnsupportedFeatureError extends RTVIError {}
27
- export class DeviceError extends RTVIError {}
28
- export const RTVI_PROTOCOL_VERSION = '1.0.0';
29
- export const RTVI_MESSAGE_LABEL = 'rtvi-ai';
30
- /**
31
- * Messages the corresponding server-side client expects to receive about
32
- * our client-side state.
33
- */
34
- export let RTVIMessageType = /*#__PURE__*/function (RTVIMessageType) {
35
- RTVIMessageType["CLIENT_READY"] = "client-ready";
36
- RTVIMessageType["DISCONNECT_BOT"] = "disconnect-bot";
37
- RTVIMessageType["CLIENT_MESSAGE"] = "client-message";
38
- RTVIMessageType["APPEND_TO_CONTEXT"] = "append-to-context";
39
- RTVIMessageType["BOT_READY"] = "bot-ready";
40
- RTVIMessageType["ERROR"] = "error";
41
- RTVIMessageType["METRICS"] = "metrics";
42
- RTVIMessageType["SERVER_MESSAGE"] = "server-message";
43
- RTVIMessageType["SERVER_RESPONSE"] = "server-response";
44
- RTVIMessageType["ERROR_RESPONSE"] = "error-response";
45
- RTVIMessageType["APPEND_TO_CONTEXT_RESULT"] = "append-to-context-result";
46
- RTVIMessageType["USER_TRANSCRIPTION"] = "user-transcription";
47
- RTVIMessageType["BOT_TRANSCRIPTION"] = "bot-transcription";
48
- RTVIMessageType["USER_STARTED_SPEAKING"] = "user-started-speaking";
49
- RTVIMessageType["USER_STOPPED_SPEAKING"] = "user-stopped-speaking";
50
- RTVIMessageType["BOT_STARTED_SPEAKING"] = "bot-started-speaking";
51
- RTVIMessageType["BOT_STOPPED_SPEAKING"] = "bot-stopped-speaking";
52
- RTVIMessageType["USER_LLM_TEXT"] = "user-llm-text";
53
- RTVIMessageType["BOT_LLM_TEXT"] = "bot-llm-text";
54
- RTVIMessageType["BOT_LLM_STARTED"] = "bot-llm-started";
55
- RTVIMessageType["BOT_LLM_STOPPED"] = "bot-llm-stopped";
56
- RTVIMessageType["LLM_FUNCTION_CALL"] = "llm-function-call";
57
- RTVIMessageType["LLM_FUNCTION_CALL_RESULT"] = "llm-function-call-result";
58
- RTVIMessageType["BOT_LLM_SEARCH_RESPONSE"] = "bot-llm-search-response";
59
- RTVIMessageType["BOT_TTS_TEXT"] = "bot-tts-text";
60
- RTVIMessageType["BOT_TTS_STARTED"] = "bot-tts-started";
61
- RTVIMessageType["BOT_TTS_STOPPED"] = "bot-tts-stopped";
62
- return RTVIMessageType;
63
- }({});
64
- export class RTVIMessage {}
65
- export let RTVIEvent = /*#__PURE__*/function (RTVIEvent) {
66
- RTVIEvent["Connected"] = "connected";
67
- RTVIEvent["Disconnected"] = "disconnected";
68
- RTVIEvent["TransportStateChanged"] = "transportStateChanged";
69
- RTVIEvent["BotConnected"] = "botConnected";
70
- RTVIEvent["BotReady"] = "botReady";
71
- RTVIEvent["BotDisconnected"] = "botDisconnected";
72
- RTVIEvent["Error"] = "error";
73
- RTVIEvent["ServerMessage"] = "serverMessage";
74
- RTVIEvent["ServerResponse"] = "serverResponse";
75
- RTVIEvent["MessageError"] = "messageError";
76
- RTVIEvent["Metrics"] = "metrics";
77
- RTVIEvent["BotStartedSpeaking"] = "botStartedSpeaking";
78
- RTVIEvent["BotStoppedSpeaking"] = "botStoppedSpeaking";
79
- RTVIEvent["UserStartedSpeaking"] = "userStartedSpeaking";
80
- RTVIEvent["UserStoppedSpeaking"] = "userStoppedSpeaking";
81
- RTVIEvent["UserTranscript"] = "userTranscript";
82
- RTVIEvent["BotTranscript"] = "botTranscript";
83
- RTVIEvent["BotLlmText"] = "botLlmText";
84
- RTVIEvent["BotLlmStarted"] = "botLlmStarted";
85
- RTVIEvent["BotLlmStopped"] = "botLlmStopped";
86
- RTVIEvent["LLMFunctionCall"] = "llmFunctionCall";
87
- RTVIEvent["BotLlmSearchResponse"] = "botLlmSearchResponse";
88
- RTVIEvent["BotTtsText"] = "botTtsText";
89
- RTVIEvent["BotTtsStarted"] = "botTtsStarted";
90
- RTVIEvent["BotTtsStopped"] = "botTtsStopped";
91
- RTVIEvent["ParticipantConnected"] = "participantConnected";
92
- RTVIEvent["ParticipantLeft"] = "participantLeft";
93
- RTVIEvent["TrackStarted"] = "trackStarted";
94
- RTVIEvent["TrackStopped"] = "trackStopped";
95
- RTVIEvent["ScreenTrackStarted"] = "screenTrackStarted";
96
- RTVIEvent["ScreenTrackStopped"] = "screenTrackStopped";
97
- RTVIEvent["ScreenShareError"] = "screenShareError";
98
- RTVIEvent["LocalAudioLevel"] = "localAudioLevel";
99
- RTVIEvent["RemoteAudioLevel"] = "remoteAudioLevel";
100
- RTVIEvent["AvailableCamsUpdated"] = "availableCamsUpdated";
101
- RTVIEvent["AvailableMicsUpdated"] = "availableMicsUpdated";
102
- RTVIEvent["AvailableSpeakersUpdated"] = "availableSpeakersUpdated";
103
- RTVIEvent["CamUpdated"] = "camUpdated";
104
- RTVIEvent["MicUpdated"] = "micUpdated";
105
- RTVIEvent["SpeakerUpdated"] = "speakerUpdated";
106
- RTVIEvent["DeviceError"] = "deviceError";
107
- return RTVIEvent;
108
- }({});
109
- /**
110
- * Copyright (c) 2024, Daily.
111
- *
112
- * SPDX-License-Identifier: BSD-2-Clause
113
- */
114
- export let LogLevel = /*#__PURE__*/function (LogLevel) {
115
- LogLevel[LogLevel["NONE"] = 0] = "NONE";
116
- LogLevel[LogLevel["ERROR"] = 1] = "ERROR";
117
- LogLevel[LogLevel["WARN"] = 2] = "WARN";
118
- LogLevel[LogLevel["INFO"] = 3] = "INFO";
119
- LogLevel[LogLevel["DEBUG"] = 4] = "DEBUG";
120
- return LogLevel;
121
- }({});
122
- export const logger = Logger.getInstance();
123
- export class MessageDispatcher {}
124
- export class Transport {}
125
- export class TransportWrapper {}
126
- export class PipecatClient extends RTVIEventEmitter {}
127
- //# sourceMappingURL=typeOverrides.d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["TransportStateEnum","RTVIError","Error","ConnectionTimeoutError","StartBotError","TransportStartError","BotNotReadyError","UnsupportedFeatureError","DeviceError","RTVI_PROTOCOL_VERSION","RTVI_MESSAGE_LABEL","RTVIMessageType","RTVIMessage","RTVIEvent","LogLevel","logger","Logger","getInstance","MessageDispatcher","Transport","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