diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9f03fe5..a7dc7d3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,14 +18,19 @@ jobs: - name: Check out repo uses: actions/checkout@v3 + - name: Set up pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + - name: Set up node uses: actions/setup-node@v3 with: node-version: 20 - cache: 'npm' + cache: 'pnpm' - name: Install dependencies - run: npm ci + run: pnpm install --frozen-lockfile - name: Run build - run: npm run build + run: pnpm run build diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5686f42..bd900be 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -18,17 +18,22 @@ jobs: - name: Check out repo uses: actions/checkout@v3 + - name: Set up pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + - name: Set up node uses: actions/setup-node@v3 with: node-version: 20 - cache: 'npm' + cache: 'pnpm' - name: Install dependencies - run: npm ci + run: pnpm install --frozen-lockfile - name: Build - run: npm run build + run: pnpm run build - name: Run linters - run: npm run lint + run: pnpm run lint diff --git a/.github/workflows/test-cli.yml b/.github/workflows/test-cli.yml index 271b148..30af66a 100644 --- a/.github/workflows/test-cli.yml +++ b/.github/workflows/test-cli.yml @@ -16,20 +16,25 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Set up pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: '20' - cache: 'npm' + cache: 'pnpm' - name: Install dependencies - run: npm ci + run: pnpm install --frozen-lockfile - name: Build - run: npm run build + run: pnpm run build - name: Run E2E tests - run: npm run test:e2e + run: pnpm run test:e2e env: ELEVENLABS_API_KEY: ${{ secrets.ELEVENLABS_TEST_API_KEY }} ELEVENLABS_TEST_API_KEY: ${{ secrets.ELEVENLABS_TEST_API_KEY_SECONDARY }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e00f9bc..b0ea791 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,17 +17,22 @@ jobs: - name: Check out repo uses: actions/checkout@v3 + - name: Set up pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + - name: Set up node uses: actions/setup-node@v3 with: node-version: 20 - cache: 'npm' + cache: 'pnpm' - name: Install dependencies - run: npm ci + run: pnpm install --frozen-lockfile - name: Run build - run: npm run build + run: pnpm run build - name: Run tests - run: npm run test + run: pnpm run test diff --git a/package.json b/package.json index 16b7fb6..3c99095 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "format": "prettier --write src/**/*.ts" }, "dependencies": { - "@elevenlabs/elevenlabs-js": "2.18.0", + "@elevenlabs/elevenlabs-js": "2.26.0", "@inkjs/ui": "^2.0.0", "@types/read": "^0.0.32", "chalk": "^5.3.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a43b81e..a53b86b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@elevenlabs/elevenlabs-js': - specifier: 2.18.0 - version: 2.18.0 + specifier: 2.26.0 + version: 2.26.0 '@inkjs/ui': specifier: ^2.0.0 version: 2.0.0(ink@6.5.1(@types/react@19.0.0)(react@19.0.0)) @@ -271,8 +271,8 @@ packages: '@bcoe/v8-coverage@0.2.3': resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} - '@elevenlabs/elevenlabs-js@2.18.0': - resolution: {integrity: sha512-nHePkqhcxon43Oms87EhrAYHBhZ7Lhdiw4TkQiwM3zSDFzJ/8tWlrwUAFnS2oZi6fRQAdAwON1NJsz3yStKsQg==} + '@elevenlabs/elevenlabs-js@2.26.0': + resolution: {integrity: sha512-MkRV1/bIhIKWSZ2y79q83+6AEhZfznfAHYMPq+H0Dm016mEOUq6YQNhGdpLJkzLQ3G6yJMHVkXQIyLZvZkzPRg==} engines: {node: '>=18.0.0'} '@esbuild/android-arm64@0.18.20': @@ -2406,12 +2406,15 @@ snapshots: '@bcoe/v8-coverage@0.2.3': {} - '@elevenlabs/elevenlabs-js@2.18.0': + '@elevenlabs/elevenlabs-js@2.26.0': dependencies: command-exists: 1.2.9 node-fetch: 2.7.0 + ws: 8.18.3 transitivePeerDependencies: + - bufferutil - encoding + - utf-8-validate '@esbuild/android-arm64@0.18.20': optional: true diff --git a/src/shared/elevenlabs-api.ts b/src/shared/elevenlabs-api.ts index 9270a6c..91171ad 100644 --- a/src/shared/elevenlabs-api.ts +++ b/src/shared/elevenlabs-api.ts @@ -2,7 +2,8 @@ import { ElevenLabsClient } from '@elevenlabs/elevenlabs-js'; import { ElevenLabs } from '@elevenlabs/elevenlabs-js'; import { ConversationalConfig, - AgentPlatformSettingsRequestModel + AgentPlatformSettingsRequestModel, + AgentWorkflowRequestModel } from '@elevenlabs/elevenlabs-js/api'; import { getApiKey, loadConfig, Location } from './config.js'; import { toCamelCaseKeys, toSnakeCaseKeys } from './utils.js'; @@ -120,7 +121,7 @@ export async function createAgentApi( name, conversationConfig: convConfig, platformSettings, - workflow, + workflow: workflow as AgentWorkflowRequestModel | undefined, tags }); @@ -158,7 +159,7 @@ export async function updateAgentApi( name, conversationConfig: convConfig, platformSettings, - workflow, + workflow: workflow as AgentWorkflowRequestModel | undefined, tags });