@teamlearners/clawops 0.6.0 → 0.8.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.
package/README.md CHANGED
@@ -128,6 +128,19 @@ const call = await client.calls.create({
128
128
  });
129
129
  console.log(call.callId);
130
130
 
131
+ // AI Completion 모드 — AI가 직접 통화를 처리
132
+ const aiCall = await client.calls.create({
133
+ to: '01012345678',
134
+ from: '07052358010',
135
+ ai: {
136
+ provider: 'openai',
137
+ model: 'gpt-realtime',
138
+ apiKey: process.env.OPENAI_API_KEY!,
139
+ voice: 'marin',
140
+ messages: [{ role: 'system', content: '당신은 예약 확인 AI입니다.' }],
141
+ },
142
+ });
143
+
131
144
  // 통화 목록 조회 (페이지네이션)
132
145
  const page = await client.calls.list({ status: 'completed', page: 0, pageSize: 20 });
133
146
  for (const call of page) {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkR742GPVL_cjs = require('../chunk-R742GPVL.cjs');
3
+ var chunkMOH4FRJZ_cjs = require('../chunk-MOH4FRJZ.cjs');
4
4
  var pino = require('pino');
5
5
  var fs = require('fs');
6
6
  var path = require('path');
@@ -1005,7 +1005,7 @@ var MAX_ERROR_MESSAGE_LENGTH = 200;
1005
1005
  function getSdkInfo() {
1006
1006
  return {
1007
1007
  name: "clawops-node",
1008
- version: chunkR742GPVL_cjs.VERSION,
1008
+ version: chunkMOH4FRJZ_cjs.VERSION,
1009
1009
  runtime: `node/${process.versions.node}`,
1010
1010
  os: `${process.platform}/${os__default.default.arch()}`
1011
1011
  };
@@ -1484,7 +1484,7 @@ var ClawOpsAgent = class {
1484
1484
  constructor(options) {
1485
1485
  this._apiKey = options.apiKey ?? process.env["CLAWOPS_API_KEY"] ?? "";
1486
1486
  this._accountId = options.accountId ?? process.env["CLAWOPS_ACCOUNT_ID"] ?? "";
1487
- this._baseUrl = options.baseUrl ?? chunkR742GPVL_cjs.DEFAULT_BASE_URL;
1487
+ this._baseUrl = options.baseUrl ?? chunkMOH4FRJZ_cjs.DEFAULT_BASE_URL;
1488
1488
  this._fromNumber = options.from;
1489
1489
  this._session = options.session;
1490
1490
  this._recording = options.recording ?? false;
@@ -1509,7 +1509,7 @@ var ClawOpsAgent = class {
1509
1509
  tool(nameOrTool, description, parameters, handler) {
1510
1510
  if (typeof nameOrTool === "string") {
1511
1511
  if (!description || !parameters || !handler) {
1512
- throw new chunkR742GPVL_cjs.AgentError(
1512
+ throw new chunkMOH4FRJZ_cjs.AgentError(
1513
1513
  "tool(name, description, parameters, handler) requires all arguments."
1514
1514
  );
1515
1515
  }
@@ -1545,10 +1545,10 @@ var ClawOpsAgent = class {
1545
1545
  async connect() {
1546
1546
  if (this._controlWs) return;
1547
1547
  if (!this._apiKey) {
1548
- throw new chunkR742GPVL_cjs.AgentError("API key is required. Set CLAWOPS_API_KEY or pass apiKey option.");
1548
+ throw new chunkMOH4FRJZ_cjs.AgentError("API key is required. Set CLAWOPS_API_KEY or pass apiKey option.");
1549
1549
  }
1550
1550
  if (!this._accountId) {
1551
- throw new chunkR742GPVL_cjs.AgentError(
1551
+ throw new chunkMOH4FRJZ_cjs.AgentError(
1552
1552
  "Account ID is required. Set CLAWOPS_ACCOUNT_ID or pass accountId option."
1553
1553
  );
1554
1554
  }
@@ -1572,7 +1572,7 @@ var ClawOpsAgent = class {
1572
1572
  } catch {
1573
1573
  }
1574
1574
  } catch (err) {
1575
- throw new chunkR742GPVL_cjs.AgentConnectionError(
1575
+ throw new chunkMOH4FRJZ_cjs.AgentConnectionError(
1576
1576
  `Failed to connect to ClawOps: ${err instanceof Error ? err.message : String(err)}`
1577
1577
  );
1578
1578
  }
@@ -1623,7 +1623,7 @@ var ClawOpsAgent = class {
1623
1623
  });
1624
1624
  if (resp.status !== 201) {
1625
1625
  const error = await resp.json();
1626
- throw new chunkR742GPVL_cjs.AgentError(`\uBC1C\uC2E0 \uC2E4\uD328 (${resp.status}): ${error["error"] ?? ""}`);
1626
+ throw new chunkMOH4FRJZ_cjs.AgentError(`\uBC1C\uC2E0 \uC2E4\uD328 (${resp.status}): ${error["error"] ?? ""}`);
1627
1627
  }
1628
1628
  const data = await resp.json();
1629
1629
  const callSession = new CallSession({
@@ -3884,6 +3884,7 @@ exports.GeminiLLM = GeminiLLM;
3884
3884
  exports.GeminiRealtime = GeminiRealtime;
3885
3885
  exports.GroqLLM = GroqLLM;
3886
3886
  exports.MCPClient = MCPClient;
3887
+ exports.MediaWebSocket = MediaWebSocket;
3887
3888
  exports.MistralLLM = MistralLLM;
3888
3889
  exports.OllamaLLM = OllamaLLM;
3889
3890
  exports.OpenAICompatLLM = OpenAICompatLLM;