Skip to content
Merged
Show file tree
Hide file tree
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
7 changes: 2 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

strategy:
matrix:
node-version: [22]
node-version: [24]

steps:
- name: Checkout code
Expand All @@ -36,9 +36,6 @@ jobs:
- name: Install dependencies
run: pnpm install

- name: Build project
run: pnpm run build

- name: Run tests
env:
LIVEKIT_API_KEY: ${{ secrets.LIVEKIT_API_KEY }}
Expand All @@ -62,7 +59,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
node-version: 24

- name: Install dependencies
run: pnpm install
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22.18.0
24
10 changes: 3 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# syntax=docker/dockerfile:1

# Use the official Node.js v22 base image
# Use the official Node.js v24 base image
# We use the slim variant to keep the image size smaller while still having essential tools
ARG NODE_VERSION=22
ARG NODE_VERSION=24
FROM node:${NODE_VERSION}-slim AS base

# Configure pnpm installation directory and ensure it is on PATH
Expand Down Expand Up @@ -45,10 +45,6 @@ RUN npx livekit-agents download-files
# (Excludes files specified in .dockerignore)
COPY . .

# Build the project
# Your package.json must contain a "build" script, such as `"build": "tsc"`
RUN pnpm build

# Remove dev dependencies for a leaner production image
RUN pnpm prune --prod

Expand Down Expand Up @@ -79,5 +75,5 @@ ENV NODE_ENV=production

# Run the application
# The "start" command tells the worker to connect to LiveKit and begin waiting for jobs.
# Your package.json must contain a "start" script, such as `"start": "node dist/agent.js start"`
# Your package.json must contain a "start" script, such as `"start": "node src/main.ts start"`
CMD [ "pnpm", "start" ]
11 changes: 4 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,29 @@
"private": true,
"type": "module",
"scripts": {
"build": "vite build",
"clean": "rm -rf dist",
"typecheck": "tsc --noEmit",
"lint": "eslint \"**/*.{ts,js}\"",
"lint:fix": "eslint --fix \"**/*.{ts,js}\"",
"format": "prettier --write \"**/*.{ts,js,json,md}\"",
"format:check": "prettier --check \"**/*.{ts,js,json,md}\"",
"test": "vitest --run",
"test:watch": "vitest",
"dev": "pnpm run build && node dist/main.js dev",
"start": "node dist/main.js start"
"dev": "node src/main.ts dev",
"start": "node src/main.ts start"
},
"engines": {
"node": ">=22.0.0",
"node": ">=24.0.0",
"pnpm": ">=10.0.0"
},
"devDependencies": {
"@eslint/js": "^9.39.4",
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
"@types/node": "^22.19.17",
"@types/node": "^24.10.1",
"eslint": "^9.39.4",
"globals": "^16.5.0",
"jiti": "^2.6.1",
"typescript": "^5.9.3",
"typescript-eslint": "^8.58.1",
"vite": "^7.3.2",
"vitest": "^4.1.4"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/agent.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { dedent, inference, initializeLogger, voice } from '@livekit/agents';
import dotenv from 'dotenv';
import { afterEach, beforeEach, describe, it } from 'vitest';
import { Agent } from './agent';
import { Agent } from './agent.ts';

dotenv.config({ path: '.env.local' });

Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ServerOptions, cli, defineAgent, inference, voice } from '@livekit/agen
import { audioEnhancement } from '@livekit/plugins-ai-coustics';
import dotenv from 'dotenv';
import { fileURLToPath } from 'node:url';
import { Agent } from './agent';
import { Agent } from './agent.ts';

// Load environment variables from a local file.
// Make sure to set LIVEKIT_URL, LIVEKIT_API_KEY, and LIVEKIT_API_SECRET
Expand Down
17 changes: 9 additions & 8 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"include": ["./src/**/*"],
"exclude": ["./dist", "./node_modules", "**/*.test.ts", "**/*.spec.ts"],
"exclude": ["./node_modules", "**/*.test.ts", "**/*.spec.ts"],
"compilerOptions": {
"target": "ES2022",
"module": "ES2022",
Expand All @@ -18,12 +18,13 @@
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"verbatimModuleSyntax": true,
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"rootDir": "./src",
"outDir": "./dist",
"incremental": true,
"tsBuildInfoFile": "./dist/.tsbuildinfo"
// Node strips types at runtime; tsc is used only for type checking.
// `allowImportingTsExtensions` permits the explicit `.ts` import
// specifiers that Node's native type stripping requires, and
// `erasableSyntaxOnly` rejects TS-only syntax (enums, namespaces,
// parameter properties) that Node cannot strip without transformation.
"noEmit": true,
"allowImportingTsExtensions": true,
"erasableSyntaxOnly": true
}
}
15 changes: 0 additions & 15 deletions vite.config.ts

This file was deleted.

Loading