Skip to content

Use API extractor #107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 7 commits into
base: next
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -33,6 +33,7 @@ jobs:
run: pnpm lint
- name: Prettier
run: pnpm format:check

build:
name: Build
runs-on: ubuntu-latest
@@ -48,3 +49,5 @@ jobs:
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm build
- name: API changes
run: pnpm api:check
12 changes: 11 additions & 1 deletion REUSE.toml
Original file line number Diff line number Diff line change
@@ -9,7 +9,17 @@ SPDX-PackageDownloadLocation = "https://github.com/livekit/agents-js"

# trivial files
[[annotations]]
path = [".gitignore", "flake.lock", ".envrc", "packages/livekit-rtc/.gitignore", ".changeset/**", "**/CHANGELOG.md", "NOTICE", ".github/**"]
path = [
".gitignore",
"flake.lock",
".envrc",
"packages/livekit-rtc/.gitignore",
".changeset/**",
"**/CHANGELOG.md",
"NOTICE",
".github/**",
"**/etc/*.api.md",
]
SPDX-FileCopyrightText = "2024 LiveKit, Inc."
SPDX-License-Identifier = "Apache-2.0"

830 changes: 830 additions & 0 deletions agents/etc/agents.api.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions agents/package.json
Original file line number Diff line number Diff line change
@@ -11,11 +11,11 @@
"clean": "rm -rf dist",
"clean:build": "pnpm clean && pnpm build",
"lint": "eslint -f unix \"src/**/*.ts\"",
"api:check": "api-extractor run --typescript-compiler-folder ../node_modules/typescript",
"api:update": "api-extractor run --local --typescript-compiler-folder ../node_modules/typescript --verbose"
"api:check": "api-extractor run",
"api:update": "api-extractor run --local --verbose"
},
"devDependencies": {
"@microsoft/api-extractor": "^7.35.0",
"@microsoft/api-extractor": "^7.47.9",
"@types/node": "^22.5.5",
"@types/ws": "^8.5.10",
"typescript": "^5.0.0"
5 changes: 3 additions & 2 deletions agents/src/multimodal/agent_playout.ts
Original file line number Diff line number Diff line change
@@ -2,11 +2,12 @@
//
// SPDX-License-Identifier: Apache-2.0
import type { AudioFrame } from '@livekit/rtc-node';
import { type AudioSource } from '@livekit/rtc-node';
import type { AudioSource } from '@livekit/rtc-node';
import { EventEmitter } from 'node:events';
import { AudioByteStream } from '../audio.js';
import type { TranscriptionForwarder } from '../transcription.js';
import { type AsyncIterableQueue, CancellablePromise, Future, gracefullyCancel } from '../utils.js';
import { CancellablePromise, Future, gracefullyCancel } from '../utils.js';
import type { AsyncIterableQueue } from '../utils.js';

export const proto = {};

3 changes: 2 additions & 1 deletion agents/src/multimodal/multimodal_agent.ts
Original file line number Diff line number Diff line change
@@ -21,7 +21,8 @@ import type * as llm from '../llm/index.js';
import { log } from '../log.js';
import { BasicTranscriptionForwarder } from '../transcription.js';
import { findMicroTrackId } from '../utils.js';
import { AgentPlayout, type PlayoutHandle } from './agent_playout.js';
import type { PlayoutHandle } from './agent_playout.js';
import { AgentPlayout } from './agent_playout.js';

/**
* @internal
2 changes: 1 addition & 1 deletion examples/package.json
Original file line number Diff line number Diff line change
@@ -18,5 +18,5 @@
"@livekit/rtc-node": "^0.9.0",
"zod": "^3.23.8"
},
"version": null
"version": "0.0.0"
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -23,23 +23,23 @@
"devDependencies": {
"@changesets/cli": "^2.27.1",
"@livekit/changesets-changelog-github": "^0.0.4",
"@rushstack/heft": "^0.66.0",
"@rushstack/heft": "^0.68.2",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"eslint": "^8.56.0",
"eslint-config-next": "^14.1.0",
"eslint-config-prettier": "^8.10.0",
"eslint-config-standard": "^17.1.0",
"eslint-config-turbo": "^1.12.2",
"eslint-config-turbo": "^2.1.3",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-standard": "^5.0.0",
"eslint-plugin-tsdoc": "^0.2.17",
"prettier": "^3.2.5",
"turbo": "^1.13.3",
"turbo": "^2.1.3",
"typedoc": "^0.25.13",
"typescript": "^5.4.5",
"vitest": "^1.6.0"
19 changes: 19 additions & 0 deletions plugins/openai/etc/agents-plugin-openai.api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## API Report File for "@livekit/agents-plugin-openai"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts

declare namespace realtime {
export {
test
}
}
export { realtime }

// @public (undocumented)
function test(): void;

// (No @packageDocumentation comment for this package)

```
6 changes: 3 additions & 3 deletions plugins/openai/package.json
Original file line number Diff line number Diff line change
@@ -11,11 +11,11 @@
"clean": "rm -rf dist",
"clean:build": "pnpm clean && pnpm build",
"lint": "eslint -f unix \"src/**/*.{ts,js}\"",
"api:check": "api-extractor run --typescript-compiler-folder ../../node_modules/typescript",
"api:update": "api-extractor run --local --typescript-compiler-folder ../../node_modules/typescript --verbose"
"api:check": "api-extractor run",
"api:update": "api-extractor run --local --verbose"
},
"devDependencies": {
"@microsoft/api-extractor": "^7.35.0",
"@microsoft/api-extractor": "^7.47.9",
"@types/ws": "^8.5.10",
"typescript": "^5.0.0"
},
88 changes: 88 additions & 0 deletions plugins/openai/src/realtime/api_proto.ts

Large diffs are not rendered by default.

350 changes: 193 additions & 157 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions turbo.json
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@
"LIVEKIT_API_SECRET",
"LOG_LEVEL"
],
"pipeline": {
"tasks": {
"build": {
"dependsOn": ["^build"],
"outputs": ["dist/**"]
@@ -25,10 +25,11 @@
"outputs": []
},
"api:check": {
"cache": false,
"dependsOn": ["^build"]
},
"api:update": {
"outputs": ["temp/*", "etc/*"],
"cache": false,
"dependsOn": ["^build"]
}
}