@teamlearners/clawops 0.18.0 → 0.20.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.
@@ -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;
@@ -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;
@@ -1,4 +1,4 @@
1
- import { DEFAULT_BASE_URL, AgentError, AgentConnectionError, VERSION } from '../chunk-RD5MYZOH.js';
1
+ import { DEFAULT_BASE_URL, AgentError, AgentConnectionError, VERSION } from '../chunk-VEK4NEET.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 = { To: to, From: this._fromNumber, Timeout: options?.timeout ?? 60 };
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: {