@livekit/agents-plugin-liveavatar 0.0.0-next-20260624041820
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 +201 -0
- package/README.md +81 -0
- package/dist/api.cjs +150 -0
- package/dist/api.cjs.map +1 -0
- package/dist/api.d.cts +81 -0
- package/dist/api.d.ts +81 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +128 -0
- package/dist/api.js.map +1 -0
- package/dist/avatar.cjs +527 -0
- package/dist/avatar.cjs.map +1 -0
- package/dist/avatar.d.cts +150 -0
- package/dist/avatar.d.ts +150 -0
- package/dist/avatar.d.ts.map +1 -0
- package/dist/avatar.js +511 -0
- package/dist/avatar.js.map +1 -0
- package/dist/index.cjs +36 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/log.cjs +30 -0
- package/dist/log.cjs.map +1 -0
- package/dist/log.d.cts +3 -0
- package/dist/log.d.ts +3 -0
- package/dist/log.d.ts.map +1 -0
- package/dist/log.js +6 -0
- package/dist/log.js.map +1 -0
- package/package.json +53 -0
- package/src/api.ts +203 -0
- package/src/avatar.ts +641 -0
- package/src/index.ts +19 -0
- package/src/log.ts +7 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
SPDX-FileCopyrightText: 2026 LiveKit, Inc.
|
|
3
|
+
|
|
4
|
+
SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
-->
|
|
6
|
+
|
|
7
|
+
# LiveAvatar plugin for LiveKit Agents
|
|
8
|
+
|
|
9
|
+
Support for [LiveAvatar](https://www.liveavatar.com) interactive avatars.
|
|
10
|
+
|
|
11
|
+
This is the JS/TS port of the Python `livekit-plugins-liveavatar` plugin. See [https://docs.livekit.io/agents/models/avatar/plugins/liveavatar/](https://docs.livekit.io/agents/models/avatar/plugins/liveavatar/) for more information.
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install @livekit/agents-plugin-liveavatar
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
or
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pnpm add @livekit/agents-plugin-liveavatar
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Pre-requisites
|
|
26
|
+
|
|
27
|
+
Create a developer API key from the LiveAvatar dashboard and set the `LIVEAVATAR_API_KEY` environment variable with it:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
export LIVEAVATAR_API_KEY=<your-liveavatar-api-key>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Usage
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
import { AvatarSession } from '@livekit/agents-plugin-liveavatar';
|
|
37
|
+
import { AgentSession } from '@livekit/agents';
|
|
38
|
+
|
|
39
|
+
const avatarSession = new AvatarSession({
|
|
40
|
+
avatarId: 'your-avatar-id', // or via LIVEAVATAR_AVATAR_ID
|
|
41
|
+
apiKey: process.env.LIVEAVATAR_API_KEY,
|
|
42
|
+
videoQuality: 'high', // optional: 'very_high' | 'high' | 'medium' | 'low'
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
await avatarSession.start(agentSession, room, {
|
|
46
|
+
livekitUrl: process.env.LIVEKIT_URL,
|
|
47
|
+
livekitApiKey: process.env.LIVEKIT_API_KEY,
|
|
48
|
+
livekitApiSecret: process.env.LIVEKIT_API_SECRET,
|
|
49
|
+
});
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## API
|
|
53
|
+
|
|
54
|
+
### `AvatarSession`
|
|
55
|
+
|
|
56
|
+
#### Constructor Options
|
|
57
|
+
|
|
58
|
+
- `avatarId?: string` — The LiveAvatar avatar id. Falls back to `LIVEAVATAR_AVATAR_ID`.
|
|
59
|
+
- `apiUrl?: string` — Override the LiveAvatar API base URL.
|
|
60
|
+
- `apiKey?: string` — Your LiveAvatar API key. Falls back to `LIVEAVATAR_API_KEY`.
|
|
61
|
+
- `isSandbox?: boolean` — Use the LiveAvatar sandbox (1 minute connection limit). Defaults to `false`.
|
|
62
|
+
- `videoQuality?: 'very_high' | 'high' | 'medium' | 'low'` — Avatar video quality requested from the service. When omitted, the LiveAvatar service decides.
|
|
63
|
+
- `avatarParticipantIdentity?: string` — Identity for the avatar participant. Defaults to `'liveavatar-avatar-agent'`.
|
|
64
|
+
- `avatarParticipantName?: string` — Display name for the avatar participant. Defaults to `'liveavatar-avatar-agent'`.
|
|
65
|
+
- `connOptions?: APIConnectOptions` — API retry/timeout options.
|
|
66
|
+
|
|
67
|
+
#### Methods
|
|
68
|
+
|
|
69
|
+
##### `start(agentSession, room, options?)`
|
|
70
|
+
|
|
71
|
+
Starts the avatar session, brings up a LiveAvatar streaming session, opens the realtime websocket, and routes the agent's audio output through to the avatar.
|
|
72
|
+
|
|
73
|
+
**StartOptions:**
|
|
74
|
+
|
|
75
|
+
- `livekitUrl?: string` — Falls back to `LIVEKIT_URL`.
|
|
76
|
+
- `livekitApiKey?: string` — Falls back to `LIVEKIT_API_KEY`.
|
|
77
|
+
- `livekitApiSecret?: string` — Falls back to `LIVEKIT_API_SECRET`.
|
|
78
|
+
|
|
79
|
+
## License
|
|
80
|
+
|
|
81
|
+
Apache 2.0
|
package/dist/api.cjs
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var api_exports = {};
|
|
20
|
+
__export(api_exports, {
|
|
21
|
+
DEFAULT_API_URL: () => DEFAULT_API_URL,
|
|
22
|
+
LiveAvatarAPI: () => LiveAvatarAPI,
|
|
23
|
+
LiveAvatarException: () => LiveAvatarException
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(api_exports);
|
|
26
|
+
var import_agents = require("@livekit/agents");
|
|
27
|
+
var import_log = require("./log.cjs");
|
|
28
|
+
const DEFAULT_API_URL = "https://api.liveavatar.com/v1/sessions";
|
|
29
|
+
class LiveAvatarException extends Error {
|
|
30
|
+
constructor(message) {
|
|
31
|
+
super(message);
|
|
32
|
+
this.name = "LiveAvatarException";
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
class LiveAvatarAPI {
|
|
36
|
+
apiKey;
|
|
37
|
+
apiUrl;
|
|
38
|
+
connOptions;
|
|
39
|
+
#logger = (0, import_log.log)();
|
|
40
|
+
constructor(options = {}) {
|
|
41
|
+
const apiKey = options.apiKey ?? process.env.LIVEAVATAR_API_KEY ?? "";
|
|
42
|
+
if (!apiKey) {
|
|
43
|
+
throw new LiveAvatarException("api_key or LIVEAVATAR_API_KEY must be set");
|
|
44
|
+
}
|
|
45
|
+
this.apiKey = apiKey;
|
|
46
|
+
this.apiUrl = options.apiUrl || DEFAULT_API_URL;
|
|
47
|
+
this.connOptions = options.connOptions || import_agents.DEFAULT_API_CONNECT_OPTIONS;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Create a new streaming session, returning the session id and session token.
|
|
51
|
+
*
|
|
52
|
+
* Ref: python livekit-plugins/livekit-plugins-liveavatar/livekit/plugins/liveavatar/api.py - 51-87 lines
|
|
53
|
+
*/
|
|
54
|
+
async createStreamingSession(opts) {
|
|
55
|
+
const livekitConfig = {
|
|
56
|
+
livekit_room: opts.roomName,
|
|
57
|
+
livekit_url: opts.livekitUrl,
|
|
58
|
+
livekit_client_token: opts.livekitToken
|
|
59
|
+
};
|
|
60
|
+
const payload = {
|
|
61
|
+
mode: "LITE",
|
|
62
|
+
avatar_id: opts.avatarId,
|
|
63
|
+
is_sandbox: opts.isSandbox ?? false,
|
|
64
|
+
livekit_config: livekitConfig
|
|
65
|
+
};
|
|
66
|
+
if (opts.videoQuality != null) {
|
|
67
|
+
payload.video_quality = opts.videoQuality;
|
|
68
|
+
}
|
|
69
|
+
const headers = {
|
|
70
|
+
accept: "application/json",
|
|
71
|
+
"content-type": "application/json",
|
|
72
|
+
"X-API-KEY": this.apiKey
|
|
73
|
+
};
|
|
74
|
+
return await this.post("/token", payload, headers);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Start a previously created streaming session.
|
|
78
|
+
*
|
|
79
|
+
* Ref: python livekit-plugins/livekit-plugins-liveavatar/livekit/plugins/liveavatar/api.py - 92-97 lines
|
|
80
|
+
*/
|
|
81
|
+
async startStreamingSession(sessionId, sessionToken) {
|
|
82
|
+
const payload = { session_id: sessionId };
|
|
83
|
+
const headers = {
|
|
84
|
+
"content-type": "application/json",
|
|
85
|
+
Authorization: `Bearer ${sessionToken}`
|
|
86
|
+
};
|
|
87
|
+
return await this.post("/start", payload, headers);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Stop a running streaming session.
|
|
91
|
+
*
|
|
92
|
+
* Ref: python livekit-plugins/livekit-plugins-liveavatar/livekit/plugins/liveavatar/api.py - 99-107 lines
|
|
93
|
+
*/
|
|
94
|
+
async stopStreamingSession(sessionId, sessionToken) {
|
|
95
|
+
const payload = { session_id: sessionId, reason: "USER_DISCONNECTED" };
|
|
96
|
+
const headers = {
|
|
97
|
+
"content-type": "application/json",
|
|
98
|
+
Authorization: `Bearer ${sessionToken}`
|
|
99
|
+
};
|
|
100
|
+
return await this.post("/stop", payload, headers);
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* POST helper with the same retry/backoff semantics as the Python plugin.
|
|
104
|
+
*
|
|
105
|
+
* Ref: python livekit-plugins/livekit-plugins-liveavatar/livekit/plugins/liveavatar/api.py - 109-138 lines
|
|
106
|
+
*/
|
|
107
|
+
async post(endpoint, payload, headers) {
|
|
108
|
+
const url = this.apiUrl + endpoint;
|
|
109
|
+
const maxRetry = this.connOptions.maxRetry;
|
|
110
|
+
for (let i = 0; i <= maxRetry; i++) {
|
|
111
|
+
try {
|
|
112
|
+
const response = await fetch(url, {
|
|
113
|
+
method: "POST",
|
|
114
|
+
headers,
|
|
115
|
+
body: JSON.stringify(payload),
|
|
116
|
+
signal: AbortSignal.timeout(this.connOptions.timeoutMs)
|
|
117
|
+
});
|
|
118
|
+
if (!response.ok) {
|
|
119
|
+
const text = await response.text();
|
|
120
|
+
throw new import_agents.APIStatusError({
|
|
121
|
+
message: `Server returned an error for ${url}: ${response.status}`,
|
|
122
|
+
options: { statusCode: response.status, body: { error: text } }
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
return await response.json();
|
|
126
|
+
} catch (e) {
|
|
127
|
+
if (e instanceof import_agents.APIStatusError && !e.retryable) {
|
|
128
|
+
throw e;
|
|
129
|
+
}
|
|
130
|
+
this.#logger.warn(
|
|
131
|
+
{ error: String(e), url, attempt: i },
|
|
132
|
+
`API request to ${url} failed on attempt ${i}`
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
if (i < maxRetry) {
|
|
136
|
+
await new Promise((resolve) => setTimeout(resolve, this.connOptions.retryIntervalMs));
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
throw new import_agents.APIConnectionError({
|
|
140
|
+
message: `Failed to call LiveAvatar API after ${maxRetry + 1} attempts`
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
145
|
+
0 && (module.exports = {
|
|
146
|
+
DEFAULT_API_URL,
|
|
147
|
+
LiveAvatarAPI,
|
|
148
|
+
LiveAvatarException
|
|
149
|
+
});
|
|
150
|
+
//# sourceMappingURL=api.cjs.map
|
package/dist/api.cjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/api.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2026 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\nimport {\n type APIConnectOptions,\n APIConnectionError,\n APIStatusError,\n DEFAULT_API_CONNECT_OPTIONS,\n} from '@livekit/agents';\nimport { log } from './log.js';\n\nexport const DEFAULT_API_URL = 'https://api.liveavatar.com/v1/sessions';\n\nexport type VideoQuality = 'very_high' | 'high' | 'medium' | 'low';\n\n/**\n * Exception thrown when the LiveAvatar plugin or the LiveAvatar service errors.\n */\nexport class LiveAvatarException extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'LiveAvatarException';\n }\n}\n\nexport interface CreateStreamingSessionOptions {\n livekitUrl: string;\n livekitToken: string;\n roomName: string;\n avatarId: string;\n isSandbox?: boolean;\n videoQuality?: VideoQuality | null;\n}\n\nexport interface SessionResponse {\n data: {\n session_id: string;\n session_token: string;\n [key: string]: unknown;\n };\n code: number;\n [key: string]: unknown;\n}\n\nexport interface StartSessionResponse {\n data: {\n ws_url: string;\n [key: string]: unknown;\n };\n code: number;\n [key: string]: unknown;\n}\n\nexport interface StopSessionResponse {\n data: Record<string, unknown>;\n code: number;\n [key: string]: unknown;\n}\n\nexport interface LiveAvatarAPIOptions {\n apiKey?: string;\n apiUrl?: string;\n connOptions?: APIConnectOptions;\n}\n\n/**\n * Thin client for the LiveAvatar HTTP API.\n *\n * Mirrors `livekit-plugins/livekit-plugins-liveavatar/livekit/plugins/liveavatar/api.py`.\n */\nexport class LiveAvatarAPI {\n private apiKey: string;\n private apiUrl: string;\n private connOptions: APIConnectOptions;\n\n #logger = log();\n\n constructor(options: LiveAvatarAPIOptions = {}) {\n const apiKey = options.apiKey ?? process.env.LIVEAVATAR_API_KEY ?? '';\n if (!apiKey) {\n throw new LiveAvatarException('api_key or LIVEAVATAR_API_KEY must be set');\n }\n this.apiKey = apiKey;\n this.apiUrl = options.apiUrl || DEFAULT_API_URL;\n this.connOptions = options.connOptions || DEFAULT_API_CONNECT_OPTIONS;\n }\n\n /**\n * Create a new streaming session, returning the session id and session token.\n *\n * Ref: python livekit-plugins/livekit-plugins-liveavatar/livekit/plugins/liveavatar/api.py - 51-87 lines\n */\n async createStreamingSession(opts: CreateStreamingSessionOptions): Promise<SessionResponse> {\n const livekitConfig = {\n livekit_room: opts.roomName,\n livekit_url: opts.livekitUrl,\n livekit_client_token: opts.livekitToken,\n };\n\n const payload: Record<string, unknown> = {\n mode: 'LITE',\n avatar_id: opts.avatarId,\n is_sandbox: opts.isSandbox ?? false,\n livekit_config: livekitConfig,\n };\n\n if (opts.videoQuality != null) {\n payload.video_quality = opts.videoQuality;\n }\n\n const headers = {\n accept: 'application/json',\n 'content-type': 'application/json',\n 'X-API-KEY': this.apiKey,\n };\n return (await this.post('/token', payload, headers)) as SessionResponse;\n }\n\n /**\n * Start a previously created streaming session.\n *\n * Ref: python livekit-plugins/livekit-plugins-liveavatar/livekit/plugins/liveavatar/api.py - 92-97 lines\n */\n async startStreamingSession(\n sessionId: string,\n sessionToken: string,\n ): Promise<StartSessionResponse> {\n const payload = { session_id: sessionId };\n const headers = {\n 'content-type': 'application/json',\n Authorization: `Bearer ${sessionToken}`,\n };\n return (await this.post('/start', payload, headers)) as StartSessionResponse;\n }\n\n /**\n * Stop a running streaming session.\n *\n * Ref: python livekit-plugins/livekit-plugins-liveavatar/livekit/plugins/liveavatar/api.py - 99-107 lines\n */\n async stopStreamingSession(\n sessionId: string,\n sessionToken: string,\n ): Promise<StopSessionResponse> {\n const payload = { session_id: sessionId, reason: 'USER_DISCONNECTED' };\n const headers = {\n 'content-type': 'application/json',\n Authorization: `Bearer ${sessionToken}`,\n };\n return (await this.post('/stop', payload, headers)) as StopSessionResponse;\n }\n\n /**\n * POST helper with the same retry/backoff semantics as the Python plugin.\n *\n * Ref: python livekit-plugins/livekit-plugins-liveavatar/livekit/plugins/liveavatar/api.py - 109-138 lines\n */\n private async post(\n endpoint: string,\n payload: Record<string, unknown>,\n headers: Record<string, string>,\n ): Promise<unknown> {\n const url = this.apiUrl + endpoint;\n const maxRetry = this.connOptions.maxRetry;\n // `maxRetry` is the number of retries on top of the initial attempt, so we\n // run up to `maxRetry + 1` total attempts. This matches the convention used\n // by other agents-js plugins (e.g. lemonslice/runway) and ensures a single\n // attempt still fires when callers configure `maxRetry: 0`.\n for (let i = 0; i <= maxRetry; i++) {\n try {\n const response = await fetch(url, {\n method: 'POST',\n headers,\n body: JSON.stringify(payload),\n signal: AbortSignal.timeout(this.connOptions.timeoutMs),\n });\n if (!response.ok) {\n const text = await response.text();\n throw new APIStatusError({\n message: `Server returned an error for ${url}: ${response.status}`,\n options: { statusCode: response.status, body: { error: text } },\n });\n }\n return await response.json();\n } catch (e) {\n if (e instanceof APIStatusError && !e.retryable) {\n throw e;\n }\n this.#logger.warn(\n { error: String(e), url, attempt: i },\n `API request to ${url} failed on attempt ${i}`,\n );\n }\n\n if (i < maxRetry) {\n await new Promise((resolve) => setTimeout(resolve, this.connOptions.retryIntervalMs));\n }\n }\n throw new APIConnectionError({\n message: `Failed to call LiveAvatar API after ${maxRetry + 1} attempts`,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAKO;AACP,iBAAoB;AAEb,MAAM,kBAAkB;AAOxB,MAAM,4BAA4B,MAAM;AAAA,EAC7C,YAAY,SAAiB;AAC3B,UAAM,OAAO;AACb,SAAK,OAAO;AAAA,EACd;AACF;AA+CO,MAAM,cAAc;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AAAA,EAER,cAAU,gBAAI;AAAA,EAEd,YAAY,UAAgC,CAAC,GAAG;AAC9C,UAAM,SAAS,QAAQ,UAAU,QAAQ,IAAI,sBAAsB;AACnE,QAAI,CAAC,QAAQ;AACX,YAAM,IAAI,oBAAoB,2CAA2C;AAAA,IAC3E;AACA,SAAK,SAAS;AACd,SAAK,SAAS,QAAQ,UAAU;AAChC,SAAK,cAAc,QAAQ,eAAe;AAAA,EAC5C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,uBAAuB,MAA+D;AAC1F,UAAM,gBAAgB;AAAA,MACpB,cAAc,KAAK;AAAA,MACnB,aAAa,KAAK;AAAA,MAClB,sBAAsB,KAAK;AAAA,IAC7B;AAEA,UAAM,UAAmC;AAAA,MACvC,MAAM;AAAA,MACN,WAAW,KAAK;AAAA,MAChB,YAAY,KAAK,aAAa;AAAA,MAC9B,gBAAgB;AAAA,IAClB;AAEA,QAAI,KAAK,gBAAgB,MAAM;AAC7B,cAAQ,gBAAgB,KAAK;AAAA,IAC/B;AAEA,UAAM,UAAU;AAAA,MACd,QAAQ;AAAA,MACR,gBAAgB;AAAA,MAChB,aAAa,KAAK;AAAA,IACpB;AACA,WAAQ,MAAM,KAAK,KAAK,UAAU,SAA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BAAM;AAAA,QACR;AACA,aAAK,QAAQ;AAAA,UACX,EAAE,OAAO,OAAO,CAAC,GAAG,KAAK,SAAS,EAAE;AAAA,UACpC,kBAAkB,GAAG,sBAAsB,CAAC;AAAA,QAC9C;AAAA,MACF;AAEA,UAAI,IAAI,UAAU;AAChB,cAAM,IAAI,QAAQ,CAAC,YAAY,WAAW,SAAS,KAAK,YAAY,eAAe,CAAC;AAAA,MACtF;AAAA,IACF;AACA,UAAM,IAAI,iCAAmB;AAAA,MAC3B,SAAS,uCAAuC,WAAW,CAAC;AAAA,IAC9D,CAAC;AAAA,EACH;AACF;","names":[]}
|
package/dist/api.d.cts
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { type APIConnectOptions } from '@livekit/agents';
|
|
2
|
+
export declare const DEFAULT_API_URL = "https://api.liveavatar.com/v1/sessions";
|
|
3
|
+
export type VideoQuality = 'very_high' | 'high' | 'medium' | 'low';
|
|
4
|
+
/**
|
|
5
|
+
* Exception thrown when the LiveAvatar plugin or the LiveAvatar service errors.
|
|
6
|
+
*/
|
|
7
|
+
export declare class LiveAvatarException extends Error {
|
|
8
|
+
constructor(message: string);
|
|
9
|
+
}
|
|
10
|
+
export interface CreateStreamingSessionOptions {
|
|
11
|
+
livekitUrl: string;
|
|
12
|
+
livekitToken: string;
|
|
13
|
+
roomName: string;
|
|
14
|
+
avatarId: string;
|
|
15
|
+
isSandbox?: boolean;
|
|
16
|
+
videoQuality?: VideoQuality | null;
|
|
17
|
+
}
|
|
18
|
+
export interface SessionResponse {
|
|
19
|
+
data: {
|
|
20
|
+
session_id: string;
|
|
21
|
+
session_token: string;
|
|
22
|
+
[key: string]: unknown;
|
|
23
|
+
};
|
|
24
|
+
code: number;
|
|
25
|
+
[key: string]: unknown;
|
|
26
|
+
}
|
|
27
|
+
export interface StartSessionResponse {
|
|
28
|
+
data: {
|
|
29
|
+
ws_url: string;
|
|
30
|
+
[key: string]: unknown;
|
|
31
|
+
};
|
|
32
|
+
code: number;
|
|
33
|
+
[key: string]: unknown;
|
|
34
|
+
}
|
|
35
|
+
export interface StopSessionResponse {
|
|
36
|
+
data: Record<string, unknown>;
|
|
37
|
+
code: number;
|
|
38
|
+
[key: string]: unknown;
|
|
39
|
+
}
|
|
40
|
+
export interface LiveAvatarAPIOptions {
|
|
41
|
+
apiKey?: string;
|
|
42
|
+
apiUrl?: string;
|
|
43
|
+
connOptions?: APIConnectOptions;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Thin client for the LiveAvatar HTTP API.
|
|
47
|
+
*
|
|
48
|
+
* Mirrors `livekit-plugins/livekit-plugins-liveavatar/livekit/plugins/liveavatar/api.py`.
|
|
49
|
+
*/
|
|
50
|
+
export declare class LiveAvatarAPI {
|
|
51
|
+
#private;
|
|
52
|
+
private apiKey;
|
|
53
|
+
private apiUrl;
|
|
54
|
+
private connOptions;
|
|
55
|
+
constructor(options?: LiveAvatarAPIOptions);
|
|
56
|
+
/**
|
|
57
|
+
* Create a new streaming session, returning the session id and session token.
|
|
58
|
+
*
|
|
59
|
+
* Ref: python livekit-plugins/livekit-plugins-liveavatar/livekit/plugins/liveavatar/api.py - 51-87 lines
|
|
60
|
+
*/
|
|
61
|
+
createStreamingSession(opts: CreateStreamingSessionOptions): Promise<SessionResponse>;
|
|
62
|
+
/**
|
|
63
|
+
* Start a previously created streaming session.
|
|
64
|
+
*
|
|
65
|
+
* Ref: python livekit-plugins/livekit-plugins-liveavatar/livekit/plugins/liveavatar/api.py - 92-97 lines
|
|
66
|
+
*/
|
|
67
|
+
startStreamingSession(sessionId: string, sessionToken: string): Promise<StartSessionResponse>;
|
|
68
|
+
/**
|
|
69
|
+
* Stop a running streaming session.
|
|
70
|
+
*
|
|
71
|
+
* Ref: python livekit-plugins/livekit-plugins-liveavatar/livekit/plugins/liveavatar/api.py - 99-107 lines
|
|
72
|
+
*/
|
|
73
|
+
stopStreamingSession(sessionId: string, sessionToken: string): Promise<StopSessionResponse>;
|
|
74
|
+
/**
|
|
75
|
+
* POST helper with the same retry/backoff semantics as the Python plugin.
|
|
76
|
+
*
|
|
77
|
+
* Ref: python livekit-plugins/livekit-plugins-liveavatar/livekit/plugins/liveavatar/api.py - 109-138 lines
|
|
78
|
+
*/
|
|
79
|
+
private post;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=api.d.ts.map
|
package/dist/api.d.ts
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { type APIConnectOptions } from '@livekit/agents';
|
|
2
|
+
export declare const DEFAULT_API_URL = "https://api.liveavatar.com/v1/sessions";
|
|
3
|
+
export type VideoQuality = 'very_high' | 'high' | 'medium' | 'low';
|
|
4
|
+
/**
|
|
5
|
+
* Exception thrown when the LiveAvatar plugin or the LiveAvatar service errors.
|
|
6
|
+
*/
|
|
7
|
+
export declare class LiveAvatarException extends Error {
|
|
8
|
+
constructor(message: string);
|
|
9
|
+
}
|
|
10
|
+
export interface CreateStreamingSessionOptions {
|
|
11
|
+
livekitUrl: string;
|
|
12
|
+
livekitToken: string;
|
|
13
|
+
roomName: string;
|
|
14
|
+
avatarId: string;
|
|
15
|
+
isSandbox?: boolean;
|
|
16
|
+
videoQuality?: VideoQuality | null;
|
|
17
|
+
}
|
|
18
|
+
export interface SessionResponse {
|
|
19
|
+
data: {
|
|
20
|
+
session_id: string;
|
|
21
|
+
session_token: string;
|
|
22
|
+
[key: string]: unknown;
|
|
23
|
+
};
|
|
24
|
+
code: number;
|
|
25
|
+
[key: string]: unknown;
|
|
26
|
+
}
|
|
27
|
+
export interface StartSessionResponse {
|
|
28
|
+
data: {
|
|
29
|
+
ws_url: string;
|
|
30
|
+
[key: string]: unknown;
|
|
31
|
+
};
|
|
32
|
+
code: number;
|
|
33
|
+
[key: string]: unknown;
|
|
34
|
+
}
|
|
35
|
+
export interface StopSessionResponse {
|
|
36
|
+
data: Record<string, unknown>;
|
|
37
|
+
code: number;
|
|
38
|
+
[key: string]: unknown;
|
|
39
|
+
}
|
|
40
|
+
export interface LiveAvatarAPIOptions {
|
|
41
|
+
apiKey?: string;
|
|
42
|
+
apiUrl?: string;
|
|
43
|
+
connOptions?: APIConnectOptions;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Thin client for the LiveAvatar HTTP API.
|
|
47
|
+
*
|
|
48
|
+
* Mirrors `livekit-plugins/livekit-plugins-liveavatar/livekit/plugins/liveavatar/api.py`.
|
|
49
|
+
*/
|
|
50
|
+
export declare class LiveAvatarAPI {
|
|
51
|
+
#private;
|
|
52
|
+
private apiKey;
|
|
53
|
+
private apiUrl;
|
|
54
|
+
private connOptions;
|
|
55
|
+
constructor(options?: LiveAvatarAPIOptions);
|
|
56
|
+
/**
|
|
57
|
+
* Create a new streaming session, returning the session id and session token.
|
|
58
|
+
*
|
|
59
|
+
* Ref: python livekit-plugins/livekit-plugins-liveavatar/livekit/plugins/liveavatar/api.py - 51-87 lines
|
|
60
|
+
*/
|
|
61
|
+
createStreamingSession(opts: CreateStreamingSessionOptions): Promise<SessionResponse>;
|
|
62
|
+
/**
|
|
63
|
+
* Start a previously created streaming session.
|
|
64
|
+
*
|
|
65
|
+
* Ref: python livekit-plugins/livekit-plugins-liveavatar/livekit/plugins/liveavatar/api.py - 92-97 lines
|
|
66
|
+
*/
|
|
67
|
+
startStreamingSession(sessionId: string, sessionToken: string): Promise<StartSessionResponse>;
|
|
68
|
+
/**
|
|
69
|
+
* Stop a running streaming session.
|
|
70
|
+
*
|
|
71
|
+
* Ref: python livekit-plugins/livekit-plugins-liveavatar/livekit/plugins/liveavatar/api.py - 99-107 lines
|
|
72
|
+
*/
|
|
73
|
+
stopStreamingSession(sessionId: string, sessionToken: string): Promise<StopSessionResponse>;
|
|
74
|
+
/**
|
|
75
|
+
* POST helper with the same retry/backoff semantics as the Python plugin.
|
|
76
|
+
*
|
|
77
|
+
* Ref: python livekit-plugins/livekit-plugins-liveavatar/livekit/plugins/liveavatar/api.py - 109-138 lines
|
|
78
|
+
*/
|
|
79
|
+
private post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