@telnyx/voice-agent-tester 0.2.1 → 0.2.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.2.3](https://github.com/team-telnyx/voice-agent-tester/compare/v0.2.2...v0.2.3) (2026-01-21)
4
+
5
+ ### Features
6
+
7
+ * resolve cli config files via npm cli usage ([2b12952](https://github.com/team-telnyx/voice-agent-tester/commit/2b1295284f7dff6f2a91df743b69f7905246d97b))
8
+
9
+ ## [0.2.2](https://github.com/team-telnyx/voice-agent-tester/compare/v0.2.1...v0.2.2) (2026-01-20)
10
+
3
11
  ## [0.2.1](https://github.com/team-telnyx/voice-agent-tester/compare/v0.2.0...v0.2.1) (2026-01-20)
4
12
 
5
13
  ### Features
package/README.md CHANGED
@@ -16,67 +16,70 @@ npm install -g @telnyx/voice-agent-tester
16
16
  ## Quick Start
17
17
 
18
18
  ```bash
19
- voice-agent-tester --help
19
+ voice-agent-tester -a benchmarks/applications/telnyx.yaml -s benchmarks/scenarios/appointment.yaml --assistant-id <YOUR_ASSISTANT_ID>
20
20
  ```
21
21
 
22
+ The CLI includes bundled application and scenario configs that you can use directly.
23
+
22
24
  ## CLI Options
23
25
 
24
26
  | Option | Description |
25
27
  |--------|-------------|
26
- | `-a, --applications` | Application config paths (required) |
27
- | `-s, --scenarios` | Scenario config paths (required) |
28
- | `--assistant-id` | Telnyx assistant ID for direct benchmarking |
29
- | `--agent-id` | ElevenLabs agent ID for direct benchmarking |
28
+ | `-a, --applications` | Application config path(s) (required) |
29
+ | `-s, --scenarios` | Scenario config path(s) (required) |
30
+ | `--assistant-id` | Telnyx assistant ID |
31
+ | `--agent-id` | ElevenLabs agent ID |
30
32
  | `--branch-id` | ElevenLabs branch ID |
31
- | `--share-key` | Vapi share key for embedded widget |
32
- | `--api-key` | Telnyx API key for authentication |
33
+ | `--share-key` | Vapi share key |
34
+ | `--api-key` | Telnyx API key |
33
35
  | `--provider` | Import from external provider (`vapi`, `elevenlabs`, `retell`) |
34
- | `--provider-api-key` | External provider API key (required with `--provider`) |
36
+ | `--provider-api-key` | External provider API key |
35
37
  | `--provider-import-id` | Provider assistant/agent ID to import |
36
- | `--params` | Additional URL template params (e.g., `--params key=value`) |
37
- | `--debug` | Enable detailed timeout diagnostics with WebRTC stats |
38
+ | `--params` | Additional URL template params |
39
+ | `--debug` | Enable detailed timeout diagnostics |
38
40
  | `--headless` | Run browser in headless mode (default: true) |
39
- | `--repeat` | Number of repetitions per combination |
41
+ | `--repeat` | Number of repetitions |
40
42
  | `-v, --verbose` | Show browser console logs |
41
43
 
44
+ ## Bundled Configs
45
+
46
+ The following application configs are included:
47
+
48
+ | Config | Provider |
49
+ |--------|----------|
50
+ | `benchmarks/applications/telnyx.yaml` | Telnyx AI Widget |
51
+ | `benchmarks/applications/elevenlabs.yaml` | ElevenLabs |
52
+ | `benchmarks/applications/vapi.yaml` | Vapi |
53
+
54
+ Scenario configs:
55
+ - `benchmarks/scenarios/appointment.yaml` - Appointment scheduling test
56
+
42
57
  ## Usage Examples
43
58
 
44
59
  ### Telnyx Assistant
45
60
 
46
61
  ```bash
47
- voice-agent-tester -a apps/telnyx.yaml -s scenarios/test.yaml --assistant-id <TELNYX_ASSISTANT_ID>
62
+ voice-agent-tester -a benchmarks/applications/telnyx.yaml -s benchmarks/scenarios/appointment.yaml --assistant-id <TELNYX_ASSISTANT_ID>
48
63
  ```
49
64
 
50
65
  ### ElevenLabs Agent
51
66
 
52
67
  ```bash
53
- voice-agent-tester -a apps/elevenlabs.yaml -s scenarios/test.yaml --agent-id <ELEVENLABS_AGENT_ID> --branch-id <BRANCH_ID>
68
+ voice-agent-tester -a benchmarks/applications/elevenlabs.yaml -s benchmarks/scenarios/appointment.yaml --agent-id <ELEVENLABS_AGENT_ID> --branch-id <BRANCH_ID>
54
69
  ```
55
70
 
56
71
  ### Vapi Assistant
57
72
 
58
73
  ```bash
59
- voice-agent-tester -a apps/vapi.yaml -s scenarios/test.yaml --assistant-id <VAPI_ASSISTANT_ID> --share-key <SHARE_KEY>
74
+ voice-agent-tester -a benchmarks/applications/vapi.yaml -s benchmarks/scenarios/appointment.yaml --assistant-id <VAPI_ASSISTANT_ID> --share-key <SHARE_KEY>
60
75
  ```
61
76
 
62
77
  ### Import from Provider to Telnyx
63
78
 
64
- Import an assistant from Vapi/ElevenLabs/Retell into Telnyx and benchmark:
65
-
66
79
  ```bash
67
- voice-agent-tester -a apps/telnyx.yaml -s scenarios/test.yaml --provider vapi --api-key <TELNYX_API_KEY> --provider-api-key <VAPI_API_KEY> --provider-import-id <VAPI_ASSISTANT_ID>
80
+ voice-agent-tester -a benchmarks/applications/telnyx.yaml -s benchmarks/scenarios/appointment.yaml --provider vapi --api-key <TELNYX_API_KEY> --provider-api-key <VAPI_API_KEY> --provider-import-id <VAPI_ASSISTANT_ID>
68
81
  ```
69
82
 
70
- ## Multi-Provider Support
71
-
72
- - **Direct benchmarking**: Use provider-specific options (`--assistant-id`, `--agent-id`, `--share-key`)
73
- - **Provider import**: Import assistants from Vapi/ElevenLabs/Retell into Telnyx via `--provider`
74
- - **Auto-configuration**: Automatic integration secret management and web call enablement
75
-
76
- ## Debug & Diagnostics
77
-
78
- When `--debug` is enabled, timeout events include WebRTC RTP statistics (packets received, bytes transferred, jitter, packet loss).
79
-
80
83
  ## License
81
84
 
82
85
  MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telnyx/voice-agent-tester",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "A command-line tool to test voice agents using Puppeteer",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
package/src/index.js CHANGED
@@ -14,14 +14,25 @@ import { importAssistantsFromProvider, getAssistant, enableWebCalls, SUPPORTED_P
14
14
 
15
15
  const __filename = fileURLToPath(import.meta.url);
16
16
  const __dirname = path.dirname(__filename);
17
+ const __packageDir = path.resolve(__dirname, '..');
17
18
 
18
19
  // Helper function to resolve file paths from comma-separated input or folder
20
+ // First tries to resolve relative to cwd, then falls back to package directory
19
21
  function resolveConfigPaths(input) {
20
22
  const paths = [];
21
23
  const items = input.split(',').map(s => s.trim());
22
24
 
23
25
  for (const item of items) {
24
- const resolvedPath = path.resolve(item);
26
+ // Try resolving relative to current working directory first
27
+ let resolvedPath = path.resolve(item);
28
+
29
+ // If not found in cwd, try resolving relative to package directory
30
+ if (!fs.existsSync(resolvedPath)) {
31
+ const packagePath = path.resolve(__packageDir, item);
32
+ if (fs.existsSync(packagePath)) {
33
+ resolvedPath = packagePath;
34
+ }
35
+ }
25
36
 
26
37
  if (fs.existsSync(resolvedPath)) {
27
38
  const stat = fs.statSync(resolvedPath);
@@ -36,7 +47,7 @@ function resolveConfigPaths(input) {
36
47
  paths.push(resolvedPath);
37
48
  }
38
49
  } else {
39
- throw new Error(`Path not found: ${resolvedPath}`);
50
+ throw new Error(`Path not found: ${item}`);
40
51
  }
41
52
  }
42
53