@teamlearners/clawops 0.20.0 → 0.20.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.
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkOUO6NTV6_cjs = require('../chunk-OUO6NTV6.cjs');
3
+ var chunkVFSF6CKS_cjs = require('../chunk-VFSF6CKS.cjs');
4
4
  var pino = require('pino');
5
5
  var fs = require('fs');
6
6
  var path = require('path');
@@ -1079,7 +1079,7 @@ var MAX_ERROR_MESSAGE_LENGTH = 200;
1079
1079
  function getSdkInfo() {
1080
1080
  return {
1081
1081
  name: "clawops-node",
1082
- version: chunkOUO6NTV6_cjs.VERSION,
1082
+ version: chunkVFSF6CKS_cjs.VERSION,
1083
1083
  runtime: `node/${process.versions.node}`,
1084
1084
  os: `${process.platform}/${os__default.default.arch()}`
1085
1085
  };
@@ -1767,7 +1767,7 @@ var ClawOpsAgent = class _ClawOpsAgent {
1767
1767
  constructor(options) {
1768
1768
  this._apiKey = options.apiKey ?? process.env["CLAWOPS_API_KEY"] ?? "";
1769
1769
  this._accountId = options.accountId ?? process.env["CLAWOPS_ACCOUNT_ID"] ?? "";
1770
- this._baseUrl = options.baseUrl ?? chunkOUO6NTV6_cjs.DEFAULT_BASE_URL;
1770
+ this._baseUrl = options.baseUrl ?? chunkVFSF6CKS_cjs.DEFAULT_BASE_URL;
1771
1771
  this._fromNumber = options.from;
1772
1772
  this._session = options.session;
1773
1773
  this._recording = options.recording ?? false;
@@ -1790,7 +1790,7 @@ var ClawOpsAgent = class _ClawOpsAgent {
1790
1790
  }
1791
1791
  static _validateGain(name, gain) {
1792
1792
  if (typeof gain !== "number" || !Number.isFinite(gain) || gain < 0) {
1793
- throw new chunkOUO6NTV6_cjs.AgentError(`${name}=${gain} must be a finite number >= 0`);
1793
+ throw new chunkVFSF6CKS_cjs.AgentError(`${name}=${gain} must be a finite number >= 0`);
1794
1794
  }
1795
1795
  return gain;
1796
1796
  }
@@ -1804,7 +1804,7 @@ var ClawOpsAgent = class _ClawOpsAgent {
1804
1804
  tool(nameOrTool, description, parameters, handler) {
1805
1805
  if (typeof nameOrTool === "string") {
1806
1806
  if (!description || !parameters || !handler) {
1807
- throw new chunkOUO6NTV6_cjs.AgentError(
1807
+ throw new chunkVFSF6CKS_cjs.AgentError(
1808
1808
  "tool(name, description, parameters, handler) requires all arguments."
1809
1809
  );
1810
1810
  }
@@ -1840,10 +1840,10 @@ var ClawOpsAgent = class _ClawOpsAgent {
1840
1840
  async connect() {
1841
1841
  if (this._controlWs) return;
1842
1842
  if (!this._apiKey) {
1843
- throw new chunkOUO6NTV6_cjs.AgentError("API key is required. Set CLAWOPS_API_KEY or pass apiKey option.");
1843
+ throw new chunkVFSF6CKS_cjs.AgentError("API key is required. Set CLAWOPS_API_KEY or pass apiKey option.");
1844
1844
  }
1845
1845
  if (!this._accountId) {
1846
- throw new chunkOUO6NTV6_cjs.AgentError(
1846
+ throw new chunkVFSF6CKS_cjs.AgentError(
1847
1847
  "Account ID is required. Set CLAWOPS_ACCOUNT_ID or pass accountId option."
1848
1848
  );
1849
1849
  }
@@ -1867,7 +1867,7 @@ var ClawOpsAgent = class _ClawOpsAgent {
1867
1867
  } catch {
1868
1868
  }
1869
1869
  } catch (err) {
1870
- throw new chunkOUO6NTV6_cjs.AgentConnectionError(
1870
+ throw new chunkVFSF6CKS_cjs.AgentConnectionError(
1871
1871
  `Failed to connect to ClawOps: ${err instanceof Error ? err.message : String(err)}`
1872
1872
  );
1873
1873
  }
@@ -1928,7 +1928,7 @@ var ClawOpsAgent = class _ClawOpsAgent {
1928
1928
  });
1929
1929
  if (resp.status !== 201) {
1930
1930
  const error = await resp.json();
1931
- throw new chunkOUO6NTV6_cjs.AgentError(`\uBC1C\uC2E0 \uC2E4\uD328 (${resp.status}): ${error["error"] ?? ""}`);
1931
+ throw new chunkVFSF6CKS_cjs.AgentError(`\uBC1C\uC2E0 \uC2E4\uD328 (${resp.status}): ${error["error"] ?? ""}`);
1932
1932
  }
1933
1933
  const data = await resp.json();
1934
1934
  const callSession = new CallSession({
@@ -2908,7 +2908,12 @@ var OpenAIRealtime = class {
2908
2908
  this._model = options.model ?? "gpt-realtime-2";
2909
2909
  this._voice = options.voice ?? "marin";
2910
2910
  this._language = options.language ?? "ko";
2911
- this._turnDetection = options.turnDetection !== void 0 ? options.turnDetection : { type: "semantic_vad", eagerness: "medium", interrupt_response: true };
2911
+ this._turnDetection = options.turnDetection !== void 0 ? options.turnDetection : {
2912
+ type: "semantic_vad",
2913
+ eagerness: "low",
2914
+ create_response: true,
2915
+ interrupt_response: true
2916
+ };
2912
2917
  this._greeting = options.greeting ?? true;
2913
2918
  }
2914
2919
  /** Inject per-call ToolRegistry. */
@@ -3038,9 +3043,9 @@ var OpenAIRealtime = class {
3038
3043
  audio: {
3039
3044
  input: {
3040
3045
  format: { type: "audio/pcmu" },
3041
- noise_reduction: { type: "far_field" },
3046
+ noise_reduction: { type: "near_field" },
3042
3047
  transcription: {
3043
- model: "gpt-realtime-whisper",
3048
+ model: "gpt-4o-transcribe",
3044
3049
  language: this._language
3045
3050
  },
3046
3051
  turn_detection: this._turnDetection