@teamlearners/clawops 0.12.0 → 0.13.1

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 chunkX6VG5NNG_cjs = require('../chunk-X6VG5NNG.cjs');
3
+ var chunk7IYMRCGL_cjs = require('../chunk-7IYMRCGL.cjs');
4
4
  var pino = require('pino');
5
5
  var fs = require('fs');
6
6
  var path = require('path');
@@ -1043,7 +1043,7 @@ var MAX_ERROR_MESSAGE_LENGTH = 200;
1043
1043
  function getSdkInfo() {
1044
1044
  return {
1045
1045
  name: "clawops-node",
1046
- version: chunkX6VG5NNG_cjs.VERSION,
1046
+ version: chunk7IYMRCGL_cjs.VERSION,
1047
1047
  runtime: `node/${process.versions.node}`,
1048
1048
  os: `${process.platform}/${os__default.default.arch()}`
1049
1049
  };
@@ -1724,7 +1724,7 @@ var ClawOpsAgent = class {
1724
1724
  constructor(options) {
1725
1725
  this._apiKey = options.apiKey ?? process.env["CLAWOPS_API_KEY"] ?? "";
1726
1726
  this._accountId = options.accountId ?? process.env["CLAWOPS_ACCOUNT_ID"] ?? "";
1727
- this._baseUrl = options.baseUrl ?? chunkX6VG5NNG_cjs.DEFAULT_BASE_URL;
1727
+ this._baseUrl = options.baseUrl ?? chunk7IYMRCGL_cjs.DEFAULT_BASE_URL;
1728
1728
  this._fromNumber = options.from;
1729
1729
  this._session = options.session;
1730
1730
  this._recording = options.recording ?? false;
@@ -1752,7 +1752,7 @@ var ClawOpsAgent = class {
1752
1752
  tool(nameOrTool, description, parameters, handler) {
1753
1753
  if (typeof nameOrTool === "string") {
1754
1754
  if (!description || !parameters || !handler) {
1755
- throw new chunkX6VG5NNG_cjs.AgentError(
1755
+ throw new chunk7IYMRCGL_cjs.AgentError(
1756
1756
  "tool(name, description, parameters, handler) requires all arguments."
1757
1757
  );
1758
1758
  }
@@ -1788,10 +1788,10 @@ var ClawOpsAgent = class {
1788
1788
  async connect() {
1789
1789
  if (this._controlWs) return;
1790
1790
  if (!this._apiKey) {
1791
- throw new chunkX6VG5NNG_cjs.AgentError("API key is required. Set CLAWOPS_API_KEY or pass apiKey option.");
1791
+ throw new chunk7IYMRCGL_cjs.AgentError("API key is required. Set CLAWOPS_API_KEY or pass apiKey option.");
1792
1792
  }
1793
1793
  if (!this._accountId) {
1794
- throw new chunkX6VG5NNG_cjs.AgentError(
1794
+ throw new chunk7IYMRCGL_cjs.AgentError(
1795
1795
  "Account ID is required. Set CLAWOPS_ACCOUNT_ID or pass accountId option."
1796
1796
  );
1797
1797
  }
@@ -1815,7 +1815,7 @@ var ClawOpsAgent = class {
1815
1815
  } catch {
1816
1816
  }
1817
1817
  } catch (err) {
1818
- throw new chunkX6VG5NNG_cjs.AgentConnectionError(
1818
+ throw new chunk7IYMRCGL_cjs.AgentConnectionError(
1819
1819
  `Failed to connect to ClawOps: ${err instanceof Error ? err.message : String(err)}`
1820
1820
  );
1821
1821
  }
@@ -1866,7 +1866,7 @@ var ClawOpsAgent = class {
1866
1866
  });
1867
1867
  if (resp.status !== 201) {
1868
1868
  const error = await resp.json();
1869
- throw new chunkX6VG5NNG_cjs.AgentError(`\uBC1C\uC2E0 \uC2E4\uD328 (${resp.status}): ${error["error"] ?? ""}`);
1869
+ throw new chunk7IYMRCGL_cjs.AgentError(`\uBC1C\uC2E0 \uC2E4\uD328 (${resp.status}): ${error["error"] ?? ""}`);
1870
1870
  }
1871
1871
  const data = await resp.json();
1872
1872
  const callSession = new CallSession({
@@ -3013,6 +3013,7 @@ var GeminiRealtime = class _GeminiRealtime {
3013
3013
  _voice;
3014
3014
  _language;
3015
3015
  _greeting;
3016
+ _realtimeInputConfig;
3016
3017
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3017
3018
  _session = null;
3018
3019
  _call = null;
@@ -3034,6 +3035,7 @@ var GeminiRealtime = class _GeminiRealtime {
3034
3035
  this._voice = options.voice ?? "Kore";
3035
3036
  this._language = options.language ?? "ko";
3036
3037
  this._greeting = options.greeting ?? true;
3038
+ this._realtimeInputConfig = options.realtimeInputConfig ?? null;
3037
3039
  }
3038
3040
  /** Inject per-call ToolRegistry. */
3039
3041
  setToolRegistry(registry) {
@@ -3088,6 +3090,9 @@ var GeminiRealtime = class _GeminiRealtime {
3088
3090
  inputAudioTranscription: {},
3089
3091
  outputAudioTranscription: {}
3090
3092
  };
3093
+ if (this._realtimeInputConfig) {
3094
+ config["realtimeInputConfig"] = this._realtimeInputConfig;
3095
+ }
3091
3096
  if (this._systemPrompt) {
3092
3097
  config["systemInstruction"] = {
3093
3098
  parts: [{ text: this._systemPrompt }]
@@ -3097,6 +3102,7 @@ var GeminiRealtime = class _GeminiRealtime {
3097
3102
  if (toolSchemas.length > 0) {
3098
3103
  config["tools"] = [{ functionDeclarations: toolSchemas }];
3099
3104
  }
3105
+ this._log.debug({ config }, "Gemini SDK final config");
3100
3106
  this._session = await client.live.connect({
3101
3107
  model: this._model,
3102
3108
  config,