@teamlearners/clawops 0.13.0 → 0.14.0

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/README.md CHANGED
@@ -182,6 +182,17 @@ const detail = await client.calls.get('CAabcdef1234567890');
182
182
 
183
183
  // 통화 종료
184
184
  await client.calls.update('CAabcdef1234567890', { status: 'completed' });
185
+
186
+ // 통화 전사 상태 조회 (completed 시 segments 까지 inline)
187
+ const state = await client.calls.getTranscript('CAabcdef1234567890');
188
+ if (state.status === 'completed') {
189
+ for (const seg of state.segments ?? []) {
190
+ console.log(`[${seg.speaker}] ${seg.text}`);
191
+ }
192
+ } else if (state.status === 'not_requested') {
193
+ // 조직 설정 off 거나 아직 요청 안 된 상태 — 명시 요청 (사용량 과금)
194
+ await client.calls.requestTranscript('CAabcdef1234567890');
195
+ }
185
196
  ```
186
197
 
187
198
  ### 전화번호 (Numbers)
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkT563RQOL_cjs = require('../chunk-T563RQOL.cjs');
3
+ var chunkRRUQMSFD_cjs = require('../chunk-RRUQMSFD.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: chunkT563RQOL_cjs.VERSION,
1046
+ version: chunkRRUQMSFD_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 ?? chunkT563RQOL_cjs.DEFAULT_BASE_URL;
1727
+ this._baseUrl = options.baseUrl ?? chunkRRUQMSFD_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 chunkT563RQOL_cjs.AgentError(
1755
+ throw new chunkRRUQMSFD_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 chunkT563RQOL_cjs.AgentError("API key is required. Set CLAWOPS_API_KEY or pass apiKey option.");
1791
+ throw new chunkRRUQMSFD_cjs.AgentError("API key is required. Set CLAWOPS_API_KEY or pass apiKey option.");
1792
1792
  }
1793
1793
  if (!this._accountId) {
1794
- throw new chunkT563RQOL_cjs.AgentError(
1794
+ throw new chunkRRUQMSFD_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 chunkT563RQOL_cjs.AgentConnectionError(
1818
+ throw new chunkRRUQMSFD_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 chunkT563RQOL_cjs.AgentError(`\uBC1C\uC2E0 \uC2E4\uD328 (${resp.status}): ${error["error"] ?? ""}`);
1869
+ throw new chunkRRUQMSFD_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({
@@ -3014,7 +3014,6 @@ var GeminiRealtime = class _GeminiRealtime {
3014
3014
  _language;
3015
3015
  _greeting;
3016
3016
  _realtimeInputConfig;
3017
- _inputAudioTranscription;
3018
3017
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3019
3018
  _session = null;
3020
3019
  _call = null;
@@ -3037,7 +3036,6 @@ var GeminiRealtime = class _GeminiRealtime {
3037
3036
  this._language = options.language ?? "ko";
3038
3037
  this._greeting = options.greeting ?? true;
3039
3038
  this._realtimeInputConfig = options.realtimeInputConfig ?? null;
3040
- this._inputAudioTranscription = options.inputAudioTranscription ?? {};
3041
3039
  }
3042
3040
  /** Inject per-call ToolRegistry. */
3043
3041
  setToolRegistry(registry) {
@@ -3089,7 +3087,7 @@ var GeminiRealtime = class _GeminiRealtime {
3089
3087
  }
3090
3088
  }
3091
3089
  },
3092
- inputAudioTranscription: this._inputAudioTranscription,
3090
+ inputAudioTranscription: {},
3093
3091
  outputAudioTranscription: {}
3094
3092
  };
3095
3093
  if (this._realtimeInputConfig) {