@teamlearners/clawops 0.17.2 → 0.19.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 +5 -0
- package/dist/agent/index.cjs +21 -11
- package/dist/agent/index.cjs.map +1 -1
- package/dist/agent/index.d.cts +5 -1
- package/dist/agent/index.d.ts +5 -1
- package/dist/agent/index.js +13 -3
- package/dist/agent/index.js.map +1 -1
- package/dist/{chunk-7TODEYCG.js → chunk-XBU5Z7IX.js} +3 -3
- package/dist/{chunk-7TODEYCG.js.map → chunk-XBU5Z7IX.js.map} +1 -1
- package/dist/{chunk-CNOCAN5A.cjs → chunk-XV7KWXOK.cjs} +3 -3
- package/dist/{chunk-CNOCAN5A.cjs.map → chunk-XV7KWXOK.cjs.map} +1 -1
- package/dist/index.cjs +46 -36
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/agent/index.d.cts
CHANGED
|
@@ -518,10 +518,14 @@ declare class ClawOpsAgent {
|
|
|
518
518
|
disconnect(): Promise<void>;
|
|
519
519
|
/**
|
|
520
520
|
* Initiate an outbound call.
|
|
521
|
-
* Matches Python SDK: agent.call(to, { timeout })
|
|
521
|
+
* Matches Python SDK: agent.call(to, { timeout, machineDetection })
|
|
522
|
+
*
|
|
523
|
+
* @param options.machineDetection 자동응답기/음성사서함 감지(AMD).
|
|
524
|
+
* `'Enable'`=감지 후 `AnsweredBy` 통보(통화 계속), `'Hangup'`=음성사서함 감지 시 자동 종료.
|
|
522
525
|
*/
|
|
523
526
|
call(to: string, options?: {
|
|
524
527
|
timeout?: number;
|
|
528
|
+
machineDetection?: 'Enable' | 'Hangup';
|
|
525
529
|
}): Promise<CallSession>;
|
|
526
530
|
private _handleIncoming;
|
|
527
531
|
private _handleEnded;
|
package/dist/agent/index.d.ts
CHANGED
|
@@ -518,10 +518,14 @@ declare class ClawOpsAgent {
|
|
|
518
518
|
disconnect(): Promise<void>;
|
|
519
519
|
/**
|
|
520
520
|
* Initiate an outbound call.
|
|
521
|
-
* Matches Python SDK: agent.call(to, { timeout })
|
|
521
|
+
* Matches Python SDK: agent.call(to, { timeout, machineDetection })
|
|
522
|
+
*
|
|
523
|
+
* @param options.machineDetection 자동응답기/음성사서함 감지(AMD).
|
|
524
|
+
* `'Enable'`=감지 후 `AnsweredBy` 통보(통화 계속), `'Hangup'`=음성사서함 감지 시 자동 종료.
|
|
522
525
|
*/
|
|
523
526
|
call(to: string, options?: {
|
|
524
527
|
timeout?: number;
|
|
528
|
+
machineDetection?: 'Enable' | 'Hangup';
|
|
525
529
|
}): Promise<CallSession>;
|
|
526
530
|
private _handleIncoming;
|
|
527
531
|
private _handleEnded;
|
package/dist/agent/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DEFAULT_BASE_URL, AgentError, AgentConnectionError, VERSION } from '../chunk-
|
|
1
|
+
import { DEFAULT_BASE_URL, AgentError, AgentConnectionError, VERSION } from '../chunk-XBU5Z7IX.js';
|
|
2
2
|
import pino from 'pino';
|
|
3
3
|
import * as fs from 'fs';
|
|
4
4
|
import * as path from 'path';
|
|
@@ -1875,12 +1875,22 @@ var ClawOpsAgent = class _ClawOpsAgent {
|
|
|
1875
1875
|
}
|
|
1876
1876
|
/**
|
|
1877
1877
|
* Initiate an outbound call.
|
|
1878
|
-
* Matches Python SDK: agent.call(to, { timeout })
|
|
1878
|
+
* Matches Python SDK: agent.call(to, { timeout, machineDetection })
|
|
1879
|
+
*
|
|
1880
|
+
* @param options.machineDetection 자동응답기/음성사서함 감지(AMD).
|
|
1881
|
+
* `'Enable'`=감지 후 `AnsweredBy` 통보(통화 계속), `'Hangup'`=음성사서함 감지 시 자동 종료.
|
|
1879
1882
|
*/
|
|
1880
1883
|
async call(to, options) {
|
|
1881
1884
|
await this.connect();
|
|
1882
1885
|
const url = `${this._baseUrl}/v1/accounts/${this._accountId}/calls`;
|
|
1883
|
-
const body = {
|
|
1886
|
+
const body = {
|
|
1887
|
+
To: to,
|
|
1888
|
+
From: this._fromNumber,
|
|
1889
|
+
Timeout: options?.timeout ?? 60
|
|
1890
|
+
};
|
|
1891
|
+
if (options?.machineDetection) {
|
|
1892
|
+
body["MachineDetection"] = options.machineDetection;
|
|
1893
|
+
}
|
|
1884
1894
|
const resp = await fetch(url, {
|
|
1885
1895
|
method: "POST",
|
|
1886
1896
|
headers: {
|