Skip to content

Commit 18b5c03

Browse files
authored
fix: match baseten plugin structure to other plugins for release standardization (#925)
1 parent 455b5ba commit 18b5c03

File tree

6 files changed

+103
-63
lines changed

6 files changed

+103
-63
lines changed

.changeset/smart-flowers-report.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@livekit/agents-plugin-baseten': patch
3+
---
4+
5+
Updating package definition for public release

plugins/baseten/api-extractor.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/**
2+
* Config file for API Extractor. For more info, please visit: https://api-extractor.com
3+
*/
4+
{
5+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
6+
7+
/**
8+
* Optionally specifies another JSON config file that this file extends from. This provides a way for
9+
* standard settings to be shared across multiple projects.
10+
*
11+
* If the path starts with "./" or "../", the path is resolved relative to the folder of the file that contains
12+
* the "extends" field. Otherwise, the first path segment is interpreted as an NPM package name, and will be
13+
* resolved using NodeJS require().
14+
*
15+
* SUPPORTED TOKENS: none
16+
* DEFAULT VALUE: ""
17+
*/
18+
"extends": "../../api-extractor-shared.json",
19+
"mainEntryPointFilePath": "./dist/index.d.ts"
20+
}

plugins/baseten/package.json

Lines changed: 64 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,68 @@
11
{
2-
"name": "@livekit/agents-plugin-baseten",
3-
"version": "1.0.30",
4-
"description": "Baseten plugin for LiveKit Node Agents",
5-
"private": true,
6-
"main": "dist/index.js",
7-
"types": "dist/index.d.ts",
8-
"type": "module",
9-
"author": "LiveKit",
10-
"repository": "git@github.com:livekit/agents-js.git",
11-
"license": "Apache-2.0",
12-
"files": [
13-
"dist",
14-
"src",
15-
"README.md"
16-
],
17-
"scripts": {
18-
"build": "tsc",
19-
"dev": "tsc --watch",
20-
"clean": "rm -rf dist",
21-
"typecheck": "tsc --noEmit",
22-
"lint": "eslint \"src/**/*.ts\"",
23-
"lint:fix": "eslint --fix \"src/**/*.ts\""
2+
"name": "@livekit/agents-plugin-baseten",
3+
"version": "1.0.30",
4+
"description": "Baseten plugin for LiveKit Node Agents",
5+
"main": "dist/index.js",
6+
"require": "dist/index.cjs",
7+
"types": "dist/index.d.ts",
8+
"exports": {
9+
"import": {
10+
"types": "./dist/index.d.ts",
11+
"default": "./dist/index.js"
2412
},
25-
"keywords": [
26-
"livekit",
27-
"agents",
28-
"baseten",
29-
"llm",
30-
"stt",
31-
"tts",
32-
"voice-ai"
33-
],
34-
"dependencies": {
35-
"dotenv": "^17.2.3",
36-
"openai": "^6.8.1",
37-
"ws": "^8.14.2"
38-
},
39-
"devDependencies": {
40-
"@livekit/agents": "workspace:*",
41-
"@livekit/agents-plugin-silero": "workspace:*",
42-
"@livekit/agents-plugins-test": "workspace:*",
43-
"@livekit/rtc-node": "^0.13.22",
44-
"@types/node": "^22.18.11",
45-
"@types/ws": "^8.5.8",
46-
"tsx": "^4.7.0",
47-
"typescript": "^5.9.3"
48-
},
49-
"peerDependencies": {
50-
"@livekit/agents": "workspace:*",
51-
"@livekit/rtc-node": "^0.13.22"
13+
"require": {
14+
"types": "./dist/index.d.cts",
15+
"default": "./dist/index.cjs"
5216
}
17+
},
18+
"author": "LiveKit",
19+
"type": "module",
20+
"repository": "git@github.com:livekit/agents-js.git",
21+
"license": "Apache-2.0",
22+
"files": [
23+
"dist",
24+
"src",
25+
"README.md"
26+
],
27+
"scripts": {
28+
"build": "tsup --onSuccess \"pnpm build:types\"",
29+
"build:types": "tsc --declaration --emitDeclarationOnly && node ../../scripts/copyDeclarationOutput.js",
30+
"clean": "rm -rf dist",
31+
"clean:build": "pnpm clean && pnpm build",
32+
"dev": "tsc --watch",
33+
"typecheck": "tsc --noEmit",
34+
"lint": "eslint \"src/**/*.ts\"",
35+
"lint:fix": "eslint --fix \"src/**/*.ts\"",
36+
"api:check": "api-extractor run --typescript-compiler-folder ../../node_modules/typescript",
37+
"api:update": "api-extractor run --local --typescript-compiler-folder ../../node_modules/typescript --verbose"
38+
},
39+
"keywords": [
40+
"livekit",
41+
"agents",
42+
"baseten",
43+
"llm",
44+
"stt",
45+
"tts",
46+
"voice-ai"
47+
],
48+
"devDependencies": {
49+
"@livekit/agents": "workspace:*",
50+
"@livekit/agents-plugin-silero": "workspace:*",
51+
"@livekit/agents-plugins-test": "workspace:*",
52+
"@livekit/rtc-node": "^0.13.22",
53+
"@microsoft/api-extractor": "^7.35.0",
54+
"@types/node": "^22.18.11",
55+
"@types/ws": "^8.5.8",
56+
"tsx": "^4.7.0",
57+
"typescript": "^5.9.3"
58+
},
59+
"dependencies": {
60+
"dotenv": "^17.2.3",
61+
"openai": "^6.8.1",
62+
"ws": "^8.14.2"
63+
},
64+
"peerDependencies": {
65+
"@livekit/agents": "workspace:*",
66+
"@livekit/rtc-node": "^0.13.22"
67+
}
5368
}

plugins/baseten/src/index.ts

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
// SPDX-FileCopyrightText: 2024 LiveKit, Inc.
22
//
33
// SPDX-License-Identifier: Apache-2.0
4-
5-
/**
6-
* LiveKit Agents Baseten Plugin
7-
*
8-
* Integrates Baseten-hosted models with LiveKit Agents for LLM, STT, and TTS services.
9-
*/
104
import { Plugin } from '@livekit/agents';
115

6+
export { LLM } from './llm.js';
7+
export { STT } from './stt.js';
8+
export { TTS, ChunkedStream } from './tts.js';
9+
export type { BasetenLLMOptions, BasetenSttOptions, BasetenTTSOptions } from './types.js';
1210
class BasetenPlugin extends Plugin {
1311
constructor() {
1412
super({
@@ -20,11 +18,3 @@ class BasetenPlugin extends Plugin {
2018
}
2119

2220
Plugin.registerPlugin(new BasetenPlugin());
23-
24-
// Export classes following LiveKit plugin pattern
25-
export { LLM } from './llm.js';
26-
export { STT } from './stt.js';
27-
export { TTS } from './tts.js';
28-
29-
// Export all types
30-
export type { BasetenLLMOptions, BasetenSttOptions, BasetenTTSOptions } from './types.js';

plugins/baseten/tsup.config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { defineConfig } from 'tsup';
2+
3+
import defaults from '../../tsup.config';
4+
5+
export default defineConfig({
6+
...defaults,
7+
});

pnpm-lock.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)