getpatter 0.5.1 → 0.5.2

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.
@@ -0,0 +1,19 @@
1
+ import "./chunk-OOIUSZB4.mjs";
2
+
3
+ // src/banner.ts
4
+ var BANNER = `
5
+ \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557
6
+ \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557
7
+ \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D
8
+ \u2588\u2588\u2554\u2550\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557
9
+ \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551
10
+ \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D
11
+
12
+ Connect AI agents to phone numbers in 4 lines of code
13
+ `;
14
+ function showBanner() {
15
+ console.log("\n" + BANNER);
16
+ }
17
+ export {
18
+ showBanner
19
+ };
@@ -157,7 +157,7 @@ var OpenAIRealtimeAdapter = class {
157
157
  import WebSocket2 from "ws";
158
158
  var ELEVENLABS_CONVAI_URL = "wss://api.elevenlabs.io/v1/convai/conversation";
159
159
  var ElevenLabsConvAIAdapter = class {
160
- constructor(apiKey, agentId = "", voiceId = "21m00Tcm4TlvDq8ikWAM", _modelId = "eleven_turbo_v2_5", _language = "en", firstMessage = "") {
160
+ constructor(apiKey, agentId = "", voiceId = "EXAVITQu4vr4xnSDxMaL", _modelId = "eleven_turbo_v2_5", _language = "en", firstMessage = "") {
161
161
  this.apiKey = apiKey;
162
162
  this.agentId = agentId;
163
163
  this.voiceId = voiceId;
@@ -3246,7 +3246,7 @@ function buildAIAdapter(config, agent, resolvedPrompt) {
3246
3246
  return new ElevenLabsConvAIAdapter(
3247
3247
  engine.apiKey,
3248
3248
  engine.agentId,
3249
- agent.voice ?? "21m00Tcm4TlvDq8ikWAM",
3249
+ agent.voice ?? "EXAVITQu4vr4xnSDxMaL",
3250
3250
  "eleven_turbo_v2_5",
3251
3251
  agent.language ?? "en",
3252
3252
  agent.firstMessage ?? ""
@@ -3549,14 +3549,8 @@ var EmbeddedServer = class {
3549
3549
  res.json({ status: "ok", mode: "local" });
3550
3550
  });
3551
3551
  if (this.dashboard) {
3552
- if (!this.dashboardToken) {
3553
- getLogger().warn(
3554
- "Dashboard is enabled without authentication. Set dashboardToken to protect call data. This is safe for local development but should not be exposed on a public network."
3555
- );
3556
- }
3557
3552
  mountDashboard(app, this.metricsStore, this.dashboardToken);
3558
3553
  mountApi(app, this.metricsStore, this.dashboardToken);
3559
- getLogger().info("Dashboard: http://127.0.0.1:" + port + "/");
3560
3554
  }
3561
3555
  app.post("/webhooks/twilio/status", (req, res) => {
3562
3556
  if (this.config.twilioToken) {
@@ -3773,7 +3767,6 @@ var EmbeddedServer = class {
3773
3767
  socket.destroy();
3774
3768
  return;
3775
3769
  }
3776
- getLogger().info(`Upgrade request: ${req.url}`);
3777
3770
  this.wss.handleUpgrade(req, socket, head, (ws) => {
3778
3771
  wsConnectionsByIp.set(remoteIp, (wsConnectionsByIp.get(remoteIp) ?? 0) + 1);
3779
3772
  ws.once("close", () => {
@@ -3789,7 +3782,6 @@ var EmbeddedServer = class {
3789
3782
  });
3790
3783
  this.wss.on("connection", (ws, req) => {
3791
3784
  const url = new URL(req.url ?? "", `http://localhost`);
3792
- getLogger().info(`WebSocket connected: ${req.url}`);
3793
3785
  this.activeConnections.add(ws);
3794
3786
  ws.once("close", () => {
3795
3787
  this.activeConnections.delete(ws);
@@ -3803,19 +3795,19 @@ var EmbeddedServer = class {
3803
3795
  });
3804
3796
  await new Promise((resolve) => {
3805
3797
  this.server.listen(port, "127.0.0.1", () => {
3806
- getLogger().info(`
3807
- \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557
3808
- \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557
3809
- \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D
3810
- \u2588\u2588\u2554\u2550\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557
3811
- \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551
3812
- \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D
3813
-
3814
- Connect AI agents to phone numbers in 4 lines of code
3815
- `);
3816
3798
  getLogger().info(`Server on port ${port}`);
3817
3799
  getLogger().info(`Webhook: https://${this.config.webhookUrl}`);
3818
- getLogger().info(`Phone: ${this.config.phoneNumber}`);
3800
+ getLogger().info(`Phone: ${this.config.phoneNumber}`);
3801
+ if (this.dashboard) {
3802
+ console.log("\n\u2500\u2500\u2500\u2500 Dashboard \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
3803
+ getLogger().info(`URL: http://127.0.0.1:${port}/`);
3804
+ if (!this.dashboardToken) {
3805
+ getLogger().warn(
3806
+ "Dashboard is enabled without authentication. Set dashboardToken to protect call data. This is safe for local development but should not be exposed on a public network."
3807
+ );
3808
+ }
3809
+ console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n");
3810
+ }
3819
3811
  resolve();
3820
3812
  });
3821
3813
  });
@@ -3861,7 +3853,6 @@ Connect AI agents to phone numbers in 4 lines of code
3861
3853
  return;
3862
3854
  }
3863
3855
  const event = data.event;
3864
- getLogger().info(`WS event: ${event}`);
3865
3856
  if (event === "start") {
3866
3857
  handler.setStreamSid(data.streamSid ?? "");
3867
3858
  const callSid = data.start?.callSid ?? "";
@@ -3907,7 +3898,6 @@ Connect AI agents to phone numbers in 4 lines of code
3907
3898
  }
3908
3899
  const event = data.event ?? "";
3909
3900
  if (event === "connected") return;
3910
- getLogger().info(`Telnyx event: ${event}`);
3911
3901
  if (event === "start" && !streamStarted) {
3912
3902
  streamStarted = true;
3913
3903
  const callControlId = data.start?.call_control_id ?? "";
package/dist/cli.js CHANGED
@@ -1143,7 +1143,7 @@ function getLogger() {
1143
1143
  return currentLogger;
1144
1144
  }
1145
1145
 
1146
- // src/cli.ts
1146
+ // src/banner.ts
1147
1147
  var BANNER = `
1148
1148
  \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557
1149
1149
  \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557
@@ -1154,6 +1154,11 @@ var BANNER = `
1154
1154
 
1155
1155
  Connect AI agents to phone numbers in 4 lines of code
1156
1156
  `;
1157
+ function showBanner() {
1158
+ console.log("\n" + BANNER);
1159
+ }
1160
+
1161
+ // src/cli.ts
1157
1162
  function parseArgs(argv) {
1158
1163
  const args = argv.slice(2);
1159
1164
  let port = 8e3;
@@ -1176,7 +1181,7 @@ async function main() {
1176
1181
  process.exit(command ? 1 : 0);
1177
1182
  }
1178
1183
  const { port } = parseArgs(process.argv);
1179
- console.log(BANNER);
1184
+ showBanner();
1180
1185
  const store = new MetricsStore();
1181
1186
  console.log(` Dashboard: http://localhost:${port}/`);
1182
1187
  console.log(` API: http://localhost:${port}/api/v1/calls`);
package/dist/index.js CHANGED
@@ -213,7 +213,7 @@ var init_elevenlabs_convai = __esm({
213
213
  init_logger();
214
214
  ELEVENLABS_CONVAI_URL = "wss://api.elevenlabs.io/v1/convai/conversation";
215
215
  ElevenLabsConvAIAdapter = class {
216
- constructor(apiKey, agentId = "", voiceId = "21m00Tcm4TlvDq8ikWAM", _modelId = "eleven_turbo_v2_5", _language = "en", firstMessage = "") {
216
+ constructor(apiKey, agentId = "", voiceId = "EXAVITQu4vr4xnSDxMaL", _modelId = "eleven_turbo_v2_5", _language = "en", firstMessage = "") {
217
217
  this.apiKey = apiKey;
218
218
  this.agentId = agentId;
219
219
  this.voiceId = voiceId;
@@ -3656,7 +3656,7 @@ function buildAIAdapter(config, agent, resolvedPrompt) {
3656
3656
  return new ElevenLabsConvAIAdapter(
3657
3657
  engine.apiKey,
3658
3658
  engine.agentId,
3659
- agent.voice ?? "21m00Tcm4TlvDq8ikWAM",
3659
+ agent.voice ?? "EXAVITQu4vr4xnSDxMaL",
3660
3660
  "eleven_turbo_v2_5",
3661
3661
  agent.language ?? "en",
3662
3662
  agent.firstMessage ?? ""
@@ -4003,14 +4003,8 @@ var init_server = __esm({
4003
4003
  res.json({ status: "ok", mode: "local" });
4004
4004
  });
4005
4005
  if (this.dashboard) {
4006
- if (!this.dashboardToken) {
4007
- getLogger().warn(
4008
- "Dashboard is enabled without authentication. Set dashboardToken to protect call data. This is safe for local development but should not be exposed on a public network."
4009
- );
4010
- }
4011
4006
  mountDashboard(app, this.metricsStore, this.dashboardToken);
4012
4007
  mountApi(app, this.metricsStore, this.dashboardToken);
4013
- getLogger().info("Dashboard: http://127.0.0.1:" + port + "/");
4014
4008
  }
4015
4009
  app.post("/webhooks/twilio/status", (req, res) => {
4016
4010
  if (this.config.twilioToken) {
@@ -4227,7 +4221,6 @@ var init_server = __esm({
4227
4221
  socket.destroy();
4228
4222
  return;
4229
4223
  }
4230
- getLogger().info(`Upgrade request: ${req.url}`);
4231
4224
  this.wss.handleUpgrade(req, socket, head, (ws) => {
4232
4225
  wsConnectionsByIp.set(remoteIp, (wsConnectionsByIp.get(remoteIp) ?? 0) + 1);
4233
4226
  ws.once("close", () => {
@@ -4243,7 +4236,6 @@ var init_server = __esm({
4243
4236
  });
4244
4237
  this.wss.on("connection", (ws, req) => {
4245
4238
  const url = new URL(req.url ?? "", `http://localhost`);
4246
- getLogger().info(`WebSocket connected: ${req.url}`);
4247
4239
  this.activeConnections.add(ws);
4248
4240
  ws.once("close", () => {
4249
4241
  this.activeConnections.delete(ws);
@@ -4257,19 +4249,19 @@ var init_server = __esm({
4257
4249
  });
4258
4250
  await new Promise((resolve) => {
4259
4251
  this.server.listen(port, "127.0.0.1", () => {
4260
- getLogger().info(`
4261
- \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557
4262
- \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557
4263
- \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D
4264
- \u2588\u2588\u2554\u2550\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557
4265
- \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551
4266
- \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D
4267
-
4268
- Connect AI agents to phone numbers in 4 lines of code
4269
- `);
4270
4252
  getLogger().info(`Server on port ${port}`);
4271
4253
  getLogger().info(`Webhook: https://${this.config.webhookUrl}`);
4272
- getLogger().info(`Phone: ${this.config.phoneNumber}`);
4254
+ getLogger().info(`Phone: ${this.config.phoneNumber}`);
4255
+ if (this.dashboard) {
4256
+ console.log("\n\u2500\u2500\u2500\u2500 Dashboard \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
4257
+ getLogger().info(`URL: http://127.0.0.1:${port}/`);
4258
+ if (!this.dashboardToken) {
4259
+ getLogger().warn(
4260
+ "Dashboard is enabled without authentication. Set dashboardToken to protect call data. This is safe for local development but should not be exposed on a public network."
4261
+ );
4262
+ }
4263
+ console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n");
4264
+ }
4273
4265
  resolve();
4274
4266
  });
4275
4267
  });
@@ -4315,7 +4307,6 @@ Connect AI agents to phone numbers in 4 lines of code
4315
4307
  return;
4316
4308
  }
4317
4309
  const event = data.event;
4318
- getLogger().info(`WS event: ${event}`);
4319
4310
  if (event === "start") {
4320
4311
  handler.setStreamSid(data.streamSid ?? "");
4321
4312
  const callSid = data.start?.callSid ?? "";
@@ -4361,7 +4352,6 @@ Connect AI agents to phone numbers in 4 lines of code
4361
4352
  }
4362
4353
  const event = data.event ?? "";
4363
4354
  if (event === "connected") return;
4364
- getLogger().info(`Telnyx event: ${event}`);
4365
4355
  if (event === "start" && !streamStarted) {
4366
4356
  streamStarted = true;
4367
4357
  const callControlId = data.start?.call_control_id ?? "";
@@ -4463,6 +4453,31 @@ Connect AI agents to phone numbers in 4 lines of code
4463
4453
  }
4464
4454
  });
4465
4455
 
4456
+ // src/banner.ts
4457
+ var banner_exports = {};
4458
+ __export(banner_exports, {
4459
+ showBanner: () => showBanner
4460
+ });
4461
+ function showBanner() {
4462
+ console.log("\n" + BANNER);
4463
+ }
4464
+ var BANNER;
4465
+ var init_banner = __esm({
4466
+ "src/banner.ts"() {
4467
+ "use strict";
4468
+ BANNER = `
4469
+ \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557
4470
+ \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557
4471
+ \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D
4472
+ \u2588\u2588\u2554\u2550\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557
4473
+ \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551
4474
+ \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D
4475
+
4476
+ Connect AI agents to phone numbers in 4 lines of code
4477
+ `;
4478
+ }
4479
+ });
4480
+
4466
4481
  // src/tunnel.ts
4467
4482
  var tunnel_exports = {};
4468
4483
  __export(tunnel_exports, {
@@ -6207,6 +6222,8 @@ var Patter = class {
6207
6222
  if (wantsCloudflared && webhookUrl) {
6208
6223
  throw new Error("Cannot use both tunnel: true and webhookUrl. Pick one.");
6209
6224
  }
6225
+ const { showBanner: showBanner2 } = await Promise.resolve().then(() => (init_banner(), banner_exports));
6226
+ showBanner2();
6210
6227
  if (wantsCloudflared) {
6211
6228
  const { startTunnel: startTunnel2 } = await Promise.resolve().then(() => (init_tunnel(), tunnel_exports));
6212
6229
  this.tunnelHandle = await startTunnel2(port);
@@ -8108,7 +8125,8 @@ var ELEVENLABS_VOICE_ID_BY_NAME = {
8108
8125
  glinda: "z9fAnlkpzviPz146aGWa",
8109
8126
  giovanni: "zcAOhNBS3c14rBihAFp1",
8110
8127
  mimi: "zrHiDhphv9ZnVXBqCLjz",
8111
- alloy: "21m00Tcm4TlvDq8ikWAM"
8128
+ sarah: "EXAVITQu4vr4xnSDxMaL",
8129
+ alloy: "EXAVITQu4vr4xnSDxMaL"
8112
8130
  };
8113
8131
  var VOICE_ID_PATTERN = /^[A-Za-z0-9]{20}$/;
8114
8132
  function resolveVoiceId(voice) {
@@ -8117,7 +8135,7 @@ function resolveVoiceId(voice) {
8117
8135
  return ELEVENLABS_VOICE_ID_BY_NAME[voice.toLowerCase()] ?? voice;
8118
8136
  }
8119
8137
  var ElevenLabsTTS = class {
8120
- constructor(apiKey, voiceId = "21m00Tcm4TlvDq8ikWAM", modelId = "eleven_turbo_v2_5", outputFormat = "pcm_16000") {
8138
+ constructor(apiKey, voiceId = "EXAVITQu4vr4xnSDxMaL", modelId = "eleven_turbo_v2_5", outputFormat = "pcm_16000") {
8121
8139
  this.apiKey = apiKey;
8122
8140
  this.modelId = modelId;
8123
8141
  this.outputFormat = outputFormat;
@@ -8188,7 +8206,7 @@ var TTS = class extends ElevenLabsTTS {
8188
8206
  }
8189
8207
  super(
8190
8208
  key,
8191
- opts.voiceId ?? "21m00Tcm4TlvDq8ikWAM",
8209
+ opts.voiceId ?? "EXAVITQu4vr4xnSDxMaL",
8192
8210
  opts.modelId ?? "eleven_turbo_v2_5",
8193
8211
  opts.outputFormat ?? "pcm_16000"
8194
8212
  );
package/dist/index.mjs CHANGED
@@ -36,7 +36,7 @@ import {
36
36
  resample16kTo8k,
37
37
  resample24kTo16k,
38
38
  resample8kTo16k
39
- } from "./chunk-B6C3KIBG.mjs";
39
+ } from "./chunk-7SDDK2AO.mjs";
40
40
  import {
41
41
  getLogger,
42
42
  setLogger
@@ -415,6 +415,8 @@ var Patter = class {
415
415
  if (wantsCloudflared && webhookUrl) {
416
416
  throw new Error("Cannot use both tunnel: true and webhookUrl. Pick one.");
417
417
  }
418
+ const { showBanner } = await import("./banner-FLR2HE5Z.mjs");
419
+ showBanner();
418
420
  if (wantsCloudflared) {
419
421
  const { startTunnel: startTunnel2 } = await import("./tunnel-O7ICMSTP.mjs");
420
422
  this.tunnelHandle = await startTunnel2(port);
@@ -467,7 +469,7 @@ var Patter = class {
467
469
  if (this.mode !== "local") {
468
470
  throw new Error("test() is only available in local mode");
469
471
  }
470
- const { TestSession: TestSession2 } = await import("./test-mode-JZMYE5HY.mjs");
472
+ const { TestSession: TestSession2 } = await import("./test-mode-K2TTPRGE.mjs");
471
473
  const session = new TestSession2();
472
474
  await session.run({
473
475
  agent: opts.agent,
@@ -2289,7 +2291,8 @@ var ELEVENLABS_VOICE_ID_BY_NAME = {
2289
2291
  glinda: "z9fAnlkpzviPz146aGWa",
2290
2292
  giovanni: "zcAOhNBS3c14rBihAFp1",
2291
2293
  mimi: "zrHiDhphv9ZnVXBqCLjz",
2292
- alloy: "21m00Tcm4TlvDq8ikWAM"
2294
+ sarah: "EXAVITQu4vr4xnSDxMaL",
2295
+ alloy: "EXAVITQu4vr4xnSDxMaL"
2293
2296
  };
2294
2297
  var VOICE_ID_PATTERN = /^[A-Za-z0-9]{20}$/;
2295
2298
  function resolveVoiceId(voice) {
@@ -2298,7 +2301,7 @@ function resolveVoiceId(voice) {
2298
2301
  return ELEVENLABS_VOICE_ID_BY_NAME[voice.toLowerCase()] ?? voice;
2299
2302
  }
2300
2303
  var ElevenLabsTTS = class {
2301
- constructor(apiKey, voiceId = "21m00Tcm4TlvDq8ikWAM", modelId = "eleven_turbo_v2_5", outputFormat = "pcm_16000") {
2304
+ constructor(apiKey, voiceId = "EXAVITQu4vr4xnSDxMaL", modelId = "eleven_turbo_v2_5", outputFormat = "pcm_16000") {
2302
2305
  this.apiKey = apiKey;
2303
2306
  this.modelId = modelId;
2304
2307
  this.outputFormat = outputFormat;
@@ -2369,7 +2372,7 @@ var TTS = class extends ElevenLabsTTS {
2369
2372
  }
2370
2373
  super(
2371
2374
  key,
2372
- opts.voiceId ?? "21m00Tcm4TlvDq8ikWAM",
2375
+ opts.voiceId ?? "EXAVITQu4vr4xnSDxMaL",
2373
2376
  opts.modelId ?? "eleven_turbo_v2_5",
2374
2377
  opts.outputFormat ?? "pcm_16000"
2375
2378
  );
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TestSession
3
- } from "./chunk-B6C3KIBG.mjs";
3
+ } from "./chunk-7SDDK2AO.mjs";
4
4
  import "./chunk-FMNRCP5X.mjs";
5
5
  import "./chunk-OOIUSZB4.mjs";
6
6
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "getpatter",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Open-source voice AI SDK — connect any AI agent to real phone calls in 4 lines of code",
5
5
  "license": "MIT",
6
6
  "author": {