@teamlearners/clawops 0.26.0 → 0.27.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 +13 -0
- package/dist/agent/index.cjs +9 -9
- package/dist/agent/index.js +1 -1
- package/dist/{chunk-AF2MNFN4.cjs → chunk-6ZPYSHP3.cjs} +3 -3
- package/dist/{chunk-AF2MNFN4.cjs.map → chunk-6ZPYSHP3.cjs.map} +1 -1
- package/dist/{chunk-WIA54H3X.js → chunk-AAU26CX6.js} +3 -3
- package/dist/{chunk-WIA54H3X.js.map → chunk-AAU26CX6.js.map} +1 -1
- package/dist/index.cjs +62 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +81 -0
- package/dist/index.d.ts +81 -0
- package/dist/index.js +29 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -209,6 +209,19 @@ for await (const call of (await client.calls.list()).autoPagingIter()) {
|
|
|
209
209
|
// 특정 통화 조회
|
|
210
210
|
const detail = await client.calls.get('CAabcdef1234567890');
|
|
211
211
|
|
|
212
|
+
// 연결 실패 사유 확인 — status가 'failed' 인 경우는 결번·망 오류·시스템 오류를 모두 포함하는
|
|
213
|
+
// 대분류라, 다시 걸어도 소용없는 번호를 가려내려면 hangupCause 를 봅니다.
|
|
214
|
+
const DO_NOT_RETRY = ['invalid_number', 'number_changed', 'incompatible_destination'];
|
|
215
|
+
if (detail.status !== 'completed') {
|
|
216
|
+
if (DO_NOT_RETRY.includes(detail.hangupCause ?? '')) {
|
|
217
|
+
console.log(`결번 — 목록에서 제외: ${detail.to}`); // hangupCauseQ850=1, sipResponseCode=404
|
|
218
|
+
} else if (detail.hangupSource === 'app' || detail.hangupSource === 'system') {
|
|
219
|
+
console.log('ClawOps 측 오류 — 재시도');
|
|
220
|
+
} else {
|
|
221
|
+
console.log(`일시적 사유(${detail.hangupCause}) — 나중에 재시도`);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
212
225
|
// 통화 종료
|
|
213
226
|
await client.calls.update('CAabcdef1234567890', { status: 'completed' });
|
|
214
227
|
|
package/dist/agent/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk6ZPYSHP3_cjs = require('../chunk-6ZPYSHP3.cjs');
|
|
4
4
|
var chunkXAOA3XFQ_cjs = require('../chunk-XAOA3XFQ.cjs');
|
|
5
5
|
var fs = require('fs');
|
|
6
6
|
var path = require('path');
|
|
@@ -728,7 +728,7 @@ var MAX_ERROR_MESSAGE_LENGTH = 200;
|
|
|
728
728
|
function getSdkInfo() {
|
|
729
729
|
return {
|
|
730
730
|
name: "clawops-node",
|
|
731
|
-
version:
|
|
731
|
+
version: chunk6ZPYSHP3_cjs.VERSION,
|
|
732
732
|
runtime: `node/${process.versions.node}`,
|
|
733
733
|
os: `${process.platform}/${os__default.default.arch()}`
|
|
734
734
|
};
|
|
@@ -1433,7 +1433,7 @@ var ClawOpsAgent = class _ClawOpsAgent {
|
|
|
1433
1433
|
constructor(options) {
|
|
1434
1434
|
this._apiKey = options.apiKey ?? process.env["CLAWOPS_API_KEY"] ?? "";
|
|
1435
1435
|
this._accountId = options.accountId ?? process.env["CLAWOPS_ACCOUNT_ID"] ?? "";
|
|
1436
|
-
this._baseUrl = options.baseUrl ??
|
|
1436
|
+
this._baseUrl = options.baseUrl ?? chunk6ZPYSHP3_cjs.DEFAULT_BASE_URL;
|
|
1437
1437
|
this._fromNumber = options.from;
|
|
1438
1438
|
this._session = options.session;
|
|
1439
1439
|
this._recording = options.recording ?? false;
|
|
@@ -1457,7 +1457,7 @@ var ClawOpsAgent = class _ClawOpsAgent {
|
|
|
1457
1457
|
}
|
|
1458
1458
|
static _validateGain(name, gain) {
|
|
1459
1459
|
if (typeof gain !== "number" || !Number.isFinite(gain) || gain < 0) {
|
|
1460
|
-
throw new
|
|
1460
|
+
throw new chunk6ZPYSHP3_cjs.AgentError(`${name}=${gain} must be a finite number >= 0`);
|
|
1461
1461
|
}
|
|
1462
1462
|
return gain;
|
|
1463
1463
|
}
|
|
@@ -1471,7 +1471,7 @@ var ClawOpsAgent = class _ClawOpsAgent {
|
|
|
1471
1471
|
tool(nameOrTool, description, parameters, handler) {
|
|
1472
1472
|
if (typeof nameOrTool === "string") {
|
|
1473
1473
|
if (!description || !parameters || !handler) {
|
|
1474
|
-
throw new
|
|
1474
|
+
throw new chunk6ZPYSHP3_cjs.AgentError(
|
|
1475
1475
|
"tool(name, description, parameters, handler) requires all arguments."
|
|
1476
1476
|
);
|
|
1477
1477
|
}
|
|
@@ -1507,10 +1507,10 @@ var ClawOpsAgent = class _ClawOpsAgent {
|
|
|
1507
1507
|
async connect() {
|
|
1508
1508
|
if (this._controlWs) return;
|
|
1509
1509
|
if (!this._apiKey) {
|
|
1510
|
-
throw new
|
|
1510
|
+
throw new chunk6ZPYSHP3_cjs.AgentError("API key is required. Set CLAWOPS_API_KEY or pass apiKey option.");
|
|
1511
1511
|
}
|
|
1512
1512
|
if (!this._accountId) {
|
|
1513
|
-
throw new
|
|
1513
|
+
throw new chunk6ZPYSHP3_cjs.AgentError(
|
|
1514
1514
|
"Account ID is required. Set CLAWOPS_ACCOUNT_ID or pass accountId option."
|
|
1515
1515
|
);
|
|
1516
1516
|
}
|
|
@@ -1534,7 +1534,7 @@ var ClawOpsAgent = class _ClawOpsAgent {
|
|
|
1534
1534
|
} catch {
|
|
1535
1535
|
}
|
|
1536
1536
|
} catch (err) {
|
|
1537
|
-
throw new
|
|
1537
|
+
throw new chunk6ZPYSHP3_cjs.AgentConnectionError(
|
|
1538
1538
|
`Failed to connect to ClawOps: ${err instanceof Error ? err.message : String(err)}`
|
|
1539
1539
|
);
|
|
1540
1540
|
}
|
|
@@ -1598,7 +1598,7 @@ var ClawOpsAgent = class _ClawOpsAgent {
|
|
|
1598
1598
|
});
|
|
1599
1599
|
if (resp.status !== 201) {
|
|
1600
1600
|
const error = await resp.json();
|
|
1601
|
-
throw new
|
|
1601
|
+
throw new chunk6ZPYSHP3_cjs.AgentError(`\uBC1C\uC2E0 \uC2E4\uD328 (${resp.status}): ${error["error"] ?? ""}`);
|
|
1602
1602
|
}
|
|
1603
1603
|
const data = await resp.json();
|
|
1604
1604
|
const callSession = new CallSession({
|
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-AAU26CX6.js';
|
|
2
2
|
import { NOOP_LOGGER, resolveBuiltinTools, createAgentLogger, createPipelineLogger, BufferingCall, attachBuffered, ulawToPcm16, resamplePcm16, getBuiltinToolSchemas, BUILTIN_TOOL_NAMES, executeBuiltinTool, CALL_NOT_READY_RESULT, pcm16ToUlaw, applyUlawGain } from '../chunk-WKGTY7QT.js';
|
|
3
3
|
export { BUILTIN_TOOL_NAMES, BuiltinTool, DECODE_TABLE, createAgentLogger, createPipelineLogger, executeBuiltinTool, getBuiltinToolSchemas, isBuiltinTool, pcm16ToUlaw, resamplePcm16, ulawToPcm16 } from '../chunk-WKGTY7QT.js';
|
|
4
4
|
import * as fs from 'fs';
|
|
@@ -151,7 +151,7 @@ function makeStatusError(status, body, headers, request) {
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
// src/version.ts
|
|
154
|
-
var VERSION = "0.
|
|
154
|
+
var VERSION = "0.27.0" ;
|
|
155
155
|
|
|
156
156
|
// src/constants.ts
|
|
157
157
|
var DEFAULT_BASE_URL = "https://api.claw-ops.com";
|
|
@@ -184,5 +184,5 @@ exports.ServiceUnavailableError = ServiceUnavailableError;
|
|
|
184
184
|
exports.UnprocessableEntityError = UnprocessableEntityError;
|
|
185
185
|
exports.VERSION = VERSION;
|
|
186
186
|
exports.makeStatusError = makeStatusError;
|
|
187
|
-
//# sourceMappingURL=chunk-
|
|
188
|
-
//# sourceMappingURL=chunk-
|
|
187
|
+
//# sourceMappingURL=chunk-6ZPYSHP3.cjs.map
|
|
188
|
+
//# sourceMappingURL=chunk-6ZPYSHP3.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/error.ts","../src/version.ts","../src/constants.ts"],"names":[],"mappings":";;;AAAO,IAAM,YAAA,GAAN,cAA2B,KAAA,CAAM;AAAA,EACtC,YAAY,OAAA,EAAiB;AAC3B,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAO,cAAA;AAAA,EACd;AACF;AAEO,IAAM,QAAA,GAAN,cAAuB,YAAA,CAAa;AAAA,EAChC,OAAA;AAAA,EAET,WAAA,CAAY,SAAiB,OAAA,EAA0C;AACrE,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAO,UAAA;AACZ,IAAA,IAAA,CAAK,OAAA,GAAU,OAAA;AAAA,EACjB;AACF;AAEO,IAAM,cAAA,GAAN,cAA6B,QAAA,CAAS;AAAA,EAClC,MAAA;AAAA,EACA,IAAA;AAAA,EACA,OAAA;AAAA,EAET,WAAA,CACE,OAAA,EACA,QAAA,EACA,IAAA,EACA,OAAA,EACA;AACA,IAAA,KAAA,CAAM,SAAS,OAAO,CAAA;AACtB,IAAA,IAAA,CAAK,IAAA,GAAO,gBAAA;AACZ,IAAA,IAAA,CAAK,SAAS,QAAA,CAAS,MAAA;AACvB,IAAA,IAAA,CAAK,IAAA,GAAO,IAAA;AACZ,IAAA,IAAA,CAAK,UAAU,QAAA,CAAS,OAAA;AAAA,EAC1B;AACF;AAEO,IAAM,eAAA,GAAN,cAA8B,cAAA,CAAe;AAAA,EAChC,MAAA,GAAS,GAAA;AAAA,EAC3B,WAAA,CACE,OAAA,EACA,QAAA,EACA,IAAA,EACA,OAAA,EACA;AACA,IAAA,KAAA,CAAM,OAAA,EAAS,QAAA,EAAU,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AAA,KAAS,QAAA,IAAY,WAAW,IAAA,EAAM;AACvD,IAAA,OAAA,GAAW,IAAA,CAA2B,KAAA;AAAA,EACxC,CAAA,MAAO;AACL,IAAA,OAAA,GAAU,QAAQ,MAAM,CAAA,CAAA;AAAA,EAC1B;AAEA,EAAA,MAAM,UAAA,GAAa,qBAAqB,MAAM,CAAA;AAC9C,EAAA,IAAI,UAAA,EAAY;AACd,IAAA,OAAO,IAAI,WAAW,OAAA,EAAS,EAAE,QAAQ,OAAA,EAAQ,EAAG,MAAM,OAAO,CAAA;AAAA,EACnE;AACA,EAAA,IAAI,UAAU,GAAA,EAAK;AACjB,IAAA,OAAO,IAAI,oBAAoB,OAAA,EAAS,EAAE,QAAQ,OAAA,EAAQ,EAAG,MAAM,OAAO,CAAA;AAAA,EAC5E;AACA,EAAA,OAAO,IAAI,eAAe,OAAA,EAAS,EAAE,QAAQ,OAAA,EAAQ,EAAG,MAAM,OAAO,CAAA;AACvE;;;AC5OO,IAAM,OAAA,GACT,QAAA;;;ACHG,IAAM,gBAAA,GAAmB;AACzB,IAAM,mBAAA,GAAsB;AAC5B,IAAM,eAAA,GAAkB;AACxB,IAAM,mBAAA,GAAsB;AAC5B,IAAM,eAAA,GAAkB","file":"chunk-AF2MNFN4.cjs","sourcesContent":["export class ClawOpsError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'ClawOpsError';\n }\n}\n\nexport class APIError extends ClawOpsError {\n readonly request: { method: string; url: string };\n\n constructor(message: string, request: { method: string; url: string }) {\n super(message);\n this.name = 'APIError';\n this.request = request;\n }\n}\n\nexport class APIStatusError extends APIError {\n readonly status: number;\n readonly body: unknown;\n readonly headers: Headers | undefined;\n\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, request);\n this.name = 'APIStatusError';\n this.status = response.status;\n this.body = body;\n this.headers = response.headers;\n }\n}\n\nexport class BadRequestError extends APIStatusError {\n override readonly status = 400 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'BadRequestError';\n }\n}\n\nexport class AuthenticationError extends APIStatusError {\n override readonly status = 401 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'AuthenticationError';\n }\n}\n\nexport class PermissionDeniedError extends APIStatusError {\n override readonly status = 403 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'PermissionDeniedError';\n }\n}\n\nexport class NotFoundError extends APIStatusError {\n override readonly status = 404 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'NotFoundError';\n }\n}\n\nexport class ConflictError extends APIStatusError {\n override readonly status = 409 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'ConflictError';\n }\n}\n\nexport class UnprocessableEntityError extends APIStatusError {\n override readonly status = 422 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'UnprocessableEntityError';\n }\n}\n\n/**\n * HTTP 429 Too Many Requests.\n *\n * 동시 통화 한도 초과 등 일시적 제한. SDK는 자동 재시도(최대 2회, 지수 backoff)를 수행한다.\n * 즉각 피드백이 필요하면 client 생성 시 maxRetries: 0으로 재시도를 비활성화하라.\n */\nexport class RateLimitError extends APIStatusError {\n override readonly status = 429 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'RateLimitError';\n }\n}\n\nexport class InternalServerError extends APIStatusError {\n override readonly status = 500 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'InternalServerError';\n }\n}\n\nexport class ServiceUnavailableError extends APIStatusError {\n override readonly status = 503 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'ServiceUnavailableError';\n }\n}\n\nexport class APIConnectionError extends APIError {\n constructor(request: { method: string; url: string }, message = 'Connection error.') {\n super(message, request);\n this.name = 'APIConnectionError';\n }\n}\n\nexport class APITimeoutError extends APIConnectionError {\n constructor(request: { method: string; url: string }) {\n super(request, 'Request timed out.');\n this.name = 'APITimeoutError';\n }\n}\n\nexport class APIResponseValidationError extends APIError {\n readonly status: number;\n\n constructor(response: { status: number }, request: { method: string; url: string }) {\n super('API response validation failed.', request);\n this.name = 'APIResponseValidationError';\n this.status = response.status;\n }\n}\n\nexport class AgentError extends ClawOpsError {\n constructor(message: string) {\n super(message);\n this.name = 'AgentError';\n }\n}\n\nexport class AgentConnectionError extends AgentError {\n constructor(message = 'Agent WebSocket connection failed.') {\n super(message);\n this.name = 'AgentConnectionError';\n }\n}\n\nconst STATUS_CODE_TO_ERROR: Record<\n number,\n new (\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) => APIStatusError\n> = {\n 400: BadRequestError,\n 401: AuthenticationError,\n 403: PermissionDeniedError,\n 404: NotFoundError,\n 409: ConflictError,\n 422: UnprocessableEntityError,\n 429: RateLimitError,\n 500: InternalServerError,\n 503: ServiceUnavailableError,\n};\n\nexport function makeStatusError(\n status: number,\n body: unknown,\n headers: Headers | undefined,\n request: { method: string; url: string },\n): APIStatusError {\n let message = '';\n if (body && typeof body === 'object' && 'error' in body) {\n message = (body as { error: string }).error;\n } else {\n message = `HTTP ${status}`;\n }\n\n const ErrorClass = STATUS_CODE_TO_ERROR[status];\n if (ErrorClass) {\n return new ErrorClass(message, { status, headers }, body, request);\n }\n if (status >= 500) {\n return new InternalServerError(message, { status, headers }, body, request);\n }\n return new APIStatusError(message, { status, headers }, body, request);\n}\n","declare const __PKG_VERSION__: string;\n\nexport const VERSION: string = typeof __PKG_VERSION__ !== 'undefined'\n ? __PKG_VERSION__\n : 'dev';\n","export const DEFAULT_BASE_URL = 'https://api.claw-ops.com';\nexport const DEFAULT_MAX_RETRIES = 2;\nexport const DEFAULT_TIMEOUT = 600_000; // ms\nexport const INITIAL_RETRY_DELAY = 500; // ms\nexport const MAX_RETRY_DELAY = 8_000; // ms\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/error.ts","../src/version.ts","../src/constants.ts"],"names":[],"mappings":";;;AAAO,IAAM,YAAA,GAAN,cAA2B,KAAA,CAAM;AAAA,EACtC,YAAY,OAAA,EAAiB;AAC3B,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAO,cAAA;AAAA,EACd;AACF;AAEO,IAAM,QAAA,GAAN,cAAuB,YAAA,CAAa;AAAA,EAChC,OAAA;AAAA,EAET,WAAA,CAAY,SAAiB,OAAA,EAA0C;AACrE,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAO,UAAA;AACZ,IAAA,IAAA,CAAK,OAAA,GAAU,OAAA;AAAA,EACjB;AACF;AAEO,IAAM,cAAA,GAAN,cAA6B,QAAA,CAAS;AAAA,EAClC,MAAA;AAAA,EACA,IAAA;AAAA,EACA,OAAA;AAAA,EAET,WAAA,CACE,OAAA,EACA,QAAA,EACA,IAAA,EACA,OAAA,EACA;AACA,IAAA,KAAA,CAAM,SAAS,OAAO,CAAA;AACtB,IAAA,IAAA,CAAK,IAAA,GAAO,gBAAA;AACZ,IAAA,IAAA,CAAK,SAAS,QAAA,CAAS,MAAA;AACvB,IAAA,IAAA,CAAK,IAAA,GAAO,IAAA;AACZ,IAAA,IAAA,CAAK,UAAU,QAAA,CAAS,OAAA;AAAA,EAC1B;AACF;AAEO,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mBAAA;AAAA,EACL,GAAA,EAAK;AACP,CAAA;AAEO,SAAS,eAAA,CACd,MAAA,EACA,IAAA,EACA,OAAA,EACA,OAAA,EACgB;AAChB,EAAA,IAAI,OAAA,GAAU,EAAA;AACd,EAAA,IAAI,IAAA,IAAQ,OAAO,IAAA,KAAS,QAAA,IAAY,WAAW,IAAA,EAAM;AACvD,IAAA,OAAA,GAAW,IAAA,CAA2B,KAAA;AAAA,EACxC,CAAA,MAAO;AACL,IAAA,OAAA,GAAU,QAAQ,MAAM,CAAA,CAAA;AAAA,EAC1B;AAEA,EAAA,MAAM,UAAA,GAAa,qBAAqB,MAAM,CAAA;AAC9C,EAAA,IAAI,UAAA,EAAY;AACd,IAAA,OAAO,IAAI,WAAW,OAAA,EAAS,EAAE,QAAQ,OAAA,EAAQ,EAAG,MAAM,OAAO,CAAA;AAAA,EACnE;AACA,EAAA,IAAI,UAAU,GAAA,EAAK;AACjB,IAAA,OAAO,IAAI,oBAAoB,OAAA,EAAS,EAAE,QAAQ,OAAA,EAAQ,EAAG,MAAM,OAAO,CAAA;AAAA,EAC5E;AACA,EAAA,OAAO,IAAI,eAAe,OAAA,EAAS,EAAE,QAAQ,OAAA,EAAQ,EAAG,MAAM,OAAO,CAAA;AACvE;;;AC5OO,IAAM,OAAA,GACT,QAAA;;;ACHG,IAAM,gBAAA,GAAmB;AACzB,IAAM,mBAAA,GAAsB;AAC5B,IAAM,eAAA,GAAkB;AACxB,IAAM,mBAAA,GAAsB;AAC5B,IAAM,eAAA,GAAkB","file":"chunk-6ZPYSHP3.cjs","sourcesContent":["export class ClawOpsError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'ClawOpsError';\n }\n}\n\nexport class APIError extends ClawOpsError {\n readonly request: { method: string; url: string };\n\n constructor(message: string, request: { method: string; url: string }) {\n super(message);\n this.name = 'APIError';\n this.request = request;\n }\n}\n\nexport class APIStatusError extends APIError {\n readonly status: number;\n readonly body: unknown;\n readonly headers: Headers | undefined;\n\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, request);\n this.name = 'APIStatusError';\n this.status = response.status;\n this.body = body;\n this.headers = response.headers;\n }\n}\n\nexport class BadRequestError extends APIStatusError {\n override readonly status = 400 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'BadRequestError';\n }\n}\n\nexport class AuthenticationError extends APIStatusError {\n override readonly status = 401 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'AuthenticationError';\n }\n}\n\nexport class PermissionDeniedError extends APIStatusError {\n override readonly status = 403 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'PermissionDeniedError';\n }\n}\n\nexport class NotFoundError extends APIStatusError {\n override readonly status = 404 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'NotFoundError';\n }\n}\n\nexport class ConflictError extends APIStatusError {\n override readonly status = 409 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'ConflictError';\n }\n}\n\nexport class UnprocessableEntityError extends APIStatusError {\n override readonly status = 422 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'UnprocessableEntityError';\n }\n}\n\n/**\n * HTTP 429 Too Many Requests.\n *\n * 동시 통화 한도 초과 등 일시적 제한. SDK는 자동 재시도(최대 2회, 지수 backoff)를 수행한다.\n * 즉각 피드백이 필요하면 client 생성 시 maxRetries: 0으로 재시도를 비활성화하라.\n */\nexport class RateLimitError extends APIStatusError {\n override readonly status = 429 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'RateLimitError';\n }\n}\n\nexport class InternalServerError extends APIStatusError {\n override readonly status = 500 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'InternalServerError';\n }\n}\n\nexport class ServiceUnavailableError extends APIStatusError {\n override readonly status = 503 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'ServiceUnavailableError';\n }\n}\n\nexport class APIConnectionError extends APIError {\n constructor(request: { method: string; url: string }, message = 'Connection error.') {\n super(message, request);\n this.name = 'APIConnectionError';\n }\n}\n\nexport class APITimeoutError extends APIConnectionError {\n constructor(request: { method: string; url: string }) {\n super(request, 'Request timed out.');\n this.name = 'APITimeoutError';\n }\n}\n\nexport class APIResponseValidationError extends APIError {\n readonly status: number;\n\n constructor(response: { status: number }, request: { method: string; url: string }) {\n super('API response validation failed.', request);\n this.name = 'APIResponseValidationError';\n this.status = response.status;\n }\n}\n\nexport class AgentError extends ClawOpsError {\n constructor(message: string) {\n super(message);\n this.name = 'AgentError';\n }\n}\n\nexport class AgentConnectionError extends AgentError {\n constructor(message = 'Agent WebSocket connection failed.') {\n super(message);\n this.name = 'AgentConnectionError';\n }\n}\n\nconst STATUS_CODE_TO_ERROR: Record<\n number,\n new (\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) => APIStatusError\n> = {\n 400: BadRequestError,\n 401: AuthenticationError,\n 403: PermissionDeniedError,\n 404: NotFoundError,\n 409: ConflictError,\n 422: UnprocessableEntityError,\n 429: RateLimitError,\n 500: InternalServerError,\n 503: ServiceUnavailableError,\n};\n\nexport function makeStatusError(\n status: number,\n body: unknown,\n headers: Headers | undefined,\n request: { method: string; url: string },\n): APIStatusError {\n let message = '';\n if (body && typeof body === 'object' && 'error' in body) {\n message = (body as { error: string }).error;\n } else {\n message = `HTTP ${status}`;\n }\n\n const ErrorClass = STATUS_CODE_TO_ERROR[status];\n if (ErrorClass) {\n return new ErrorClass(message, { status, headers }, body, request);\n }\n if (status >= 500) {\n return new InternalServerError(message, { status, headers }, body, request);\n }\n return new APIStatusError(message, { status, headers }, body, request);\n}\n","declare const __PKG_VERSION__: string;\n\nexport const VERSION: string = typeof __PKG_VERSION__ !== 'undefined'\n ? __PKG_VERSION__\n : 'dev';\n","export const DEFAULT_BASE_URL = 'https://api.claw-ops.com';\nexport const DEFAULT_MAX_RETRIES = 2;\nexport const DEFAULT_TIMEOUT = 600_000; // ms\nexport const INITIAL_RETRY_DELAY = 500; // ms\nexport const MAX_RETRY_DELAY = 8_000; // ms\n"]}
|
|
@@ -149,7 +149,7 @@ function makeStatusError(status, body, headers, request) {
|
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
// src/version.ts
|
|
152
|
-
var VERSION = "0.
|
|
152
|
+
var VERSION = "0.27.0" ;
|
|
153
153
|
|
|
154
154
|
// src/constants.ts
|
|
155
155
|
var DEFAULT_BASE_URL = "https://api.claw-ops.com";
|
|
@@ -159,5 +159,5 @@ var INITIAL_RETRY_DELAY = 500;
|
|
|
159
159
|
var MAX_RETRY_DELAY = 8e3;
|
|
160
160
|
|
|
161
161
|
export { APIConnectionError, APIError, APIResponseValidationError, APIStatusError, APITimeoutError, AgentConnectionError, AgentError, AuthenticationError, BadRequestError, ClawOpsError, ConflictError, DEFAULT_BASE_URL, DEFAULT_MAX_RETRIES, DEFAULT_TIMEOUT, INITIAL_RETRY_DELAY, InternalServerError, MAX_RETRY_DELAY, NotFoundError, PermissionDeniedError, RateLimitError, ServiceUnavailableError, UnprocessableEntityError, VERSION, makeStatusError };
|
|
162
|
-
//# sourceMappingURL=chunk-
|
|
163
|
-
//# sourceMappingURL=chunk-
|
|
162
|
+
//# sourceMappingURL=chunk-AAU26CX6.js.map
|
|
163
|
+
//# sourceMappingURL=chunk-AAU26CX6.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/error.ts","../src/version.ts","../src/constants.ts"],"names":[],"mappings":";AAAO,IAAM,YAAA,GAAN,cAA2B,KAAA,CAAM;AAAA,EACtC,YAAY,OAAA,EAAiB;AAC3B,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAO,cAAA;AAAA,EACd;AACF;AAEO,IAAM,QAAA,GAAN,cAAuB,YAAA,CAAa;AAAA,EAChC,OAAA;AAAA,EAET,WAAA,CAAY,SAAiB,OAAA,EAA0C;AACrE,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAO,UAAA;AACZ,IAAA,IAAA,CAAK,OAAA,GAAU,OAAA;AAAA,EACjB;AACF;AAEO,IAAM,cAAA,GAAN,cAA6B,QAAA,CAAS;AAAA,EAClC,MAAA;AAAA,EACA,IAAA;AAAA,EACA,OAAA;AAAA,EAET,WAAA,CACE,OAAA,EACA,QAAA,EACA,IAAA,EACA,OAAA,EACA;AACA,IAAA,KAAA,CAAM,SAAS,OAAO,CAAA;AACtB,IAAA,IAAA,CAAK,IAAA,GAAO,gBAAA;AACZ,IAAA,IAAA,CAAK,SAAS,QAAA,CAAS,MAAA;AACvB,IAAA,IAAA,CAAK,IAAA,GAAO,IAAA;AACZ,IAAA,IAAA,CAAK,UAAU,QAAA,CAAS,OAAA;AAAA,EAC1B;AACF;AAEO,IAAM,eAAA,GAAN,cAA8B,cAAA,CAAe;AAAA,EAChC,MAAA,GAAS,GAAA;AAAA,EAC3B,WAAA,CACE,OAAA,EACA,QAAA,EACA,IAAA,EACA,OAAA,EACA;AACA,IAAA,KAAA,CAAM,OAAA,EAAS,QAAA,EAAU,IAAA,EAAM,OAAO,CAAA;AACtC,IAAA,IAAA,CAAK,IAAA,GAAO,iBAAA;AAAA,EACd;A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AAA;AAAA,EACxC,CAAA,MAAO;AACL,IAAA,OAAA,GAAU,QAAQ,MAAM,CAAA,CAAA;AAAA,EAC1B;AAEA,EAAA,MAAM,UAAA,GAAa,qBAAqB,MAAM,CAAA;AAC9C,EAAA,IAAI,UAAA,EAAY;AACd,IAAA,OAAO,IAAI,WAAW,OAAA,EAAS,EAAE,QAAQ,OAAA,EAAQ,EAAG,MAAM,OAAO,CAAA;AAAA,EACnE;AACA,EAAA,IAAI,UAAU,GAAA,EAAK;AACjB,IAAA,OAAO,IAAI,oBAAoB,OAAA,EAAS,EAAE,QAAQ,OAAA,EAAQ,EAAG,MAAM,OAAO,CAAA;AAAA,EAC5E;AACA,EAAA,OAAO,IAAI,eAAe,OAAA,EAAS,EAAE,QAAQ,OAAA,EAAQ,EAAG,MAAM,OAAO,CAAA;AACvE;;;AC5OO,IAAM,OAAA,GACT,QAAA;;;ACHG,IAAM,gBAAA,GAAmB;AACzB,IAAM,mBAAA,GAAsB;AAC5B,IAAM,eAAA,GAAkB;AACxB,IAAM,mBAAA,GAAsB;AAC5B,IAAM,eAAA,GAAkB","file":"chunk-WIA54H3X.js","sourcesContent":["export class ClawOpsError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'ClawOpsError';\n }\n}\n\nexport class APIError extends ClawOpsError {\n readonly request: { method: string; url: string };\n\n constructor(message: string, request: { method: string; url: string }) {\n super(message);\n this.name = 'APIError';\n this.request = request;\n }\n}\n\nexport class APIStatusError extends APIError {\n readonly status: number;\n readonly body: unknown;\n readonly headers: Headers | undefined;\n\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, request);\n this.name = 'APIStatusError';\n this.status = response.status;\n this.body = body;\n this.headers = response.headers;\n }\n}\n\nexport class BadRequestError extends APIStatusError {\n override readonly status = 400 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'BadRequestError';\n }\n}\n\nexport class AuthenticationError extends APIStatusError {\n override readonly status = 401 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'AuthenticationError';\n }\n}\n\nexport class PermissionDeniedError extends APIStatusError {\n override readonly status = 403 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'PermissionDeniedError';\n }\n}\n\nexport class NotFoundError extends APIStatusError {\n override readonly status = 404 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'NotFoundError';\n }\n}\n\nexport class ConflictError extends APIStatusError {\n override readonly status = 409 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'ConflictError';\n }\n}\n\nexport class UnprocessableEntityError extends APIStatusError {\n override readonly status = 422 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'UnprocessableEntityError';\n }\n}\n\n/**\n * HTTP 429 Too Many Requests.\n *\n * 동시 통화 한도 초과 등 일시적 제한. SDK는 자동 재시도(최대 2회, 지수 backoff)를 수행한다.\n * 즉각 피드백이 필요하면 client 생성 시 maxRetries: 0으로 재시도를 비활성화하라.\n */\nexport class RateLimitError extends APIStatusError {\n override readonly status = 429 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'RateLimitError';\n }\n}\n\nexport class InternalServerError extends APIStatusError {\n override readonly status = 500 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'InternalServerError';\n }\n}\n\nexport class ServiceUnavailableError extends APIStatusError {\n override readonly status = 503 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'ServiceUnavailableError';\n }\n}\n\nexport class APIConnectionError extends APIError {\n constructor(request: { method: string; url: string }, message = 'Connection error.') {\n super(message, request);\n this.name = 'APIConnectionError';\n }\n}\n\nexport class APITimeoutError extends APIConnectionError {\n constructor(request: { method: string; url: string }) {\n super(request, 'Request timed out.');\n this.name = 'APITimeoutError';\n }\n}\n\nexport class APIResponseValidationError extends APIError {\n readonly status: number;\n\n constructor(response: { status: number }, request: { method: string; url: string }) {\n super('API response validation failed.', request);\n this.name = 'APIResponseValidationError';\n this.status = response.status;\n }\n}\n\nexport class AgentError extends ClawOpsError {\n constructor(message: string) {\n super(message);\n this.name = 'AgentError';\n }\n}\n\nexport class AgentConnectionError extends AgentError {\n constructor(message = 'Agent WebSocket connection failed.') {\n super(message);\n this.name = 'AgentConnectionError';\n }\n}\n\nconst STATUS_CODE_TO_ERROR: Record<\n number,\n new (\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) => APIStatusError\n> = {\n 400: BadRequestError,\n 401: AuthenticationError,\n 403: PermissionDeniedError,\n 404: NotFoundError,\n 409: ConflictError,\n 422: UnprocessableEntityError,\n 429: RateLimitError,\n 500: InternalServerError,\n 503: ServiceUnavailableError,\n};\n\nexport function makeStatusError(\n status: number,\n body: unknown,\n headers: Headers | undefined,\n request: { method: string; url: string },\n): APIStatusError {\n let message = '';\n if (body && typeof body === 'object' && 'error' in body) {\n message = (body as { error: string }).error;\n } else {\n message = `HTTP ${status}`;\n }\n\n const ErrorClass = STATUS_CODE_TO_ERROR[status];\n if (ErrorClass) {\n return new ErrorClass(message, { status, headers }, body, request);\n }\n if (status >= 500) {\n return new InternalServerError(message, { status, headers }, body, request);\n }\n return new APIStatusError(message, { status, headers }, body, request);\n}\n","declare const __PKG_VERSION__: string;\n\nexport const VERSION: string = typeof __PKG_VERSION__ !== 'undefined'\n ? __PKG_VERSION__\n : 'dev';\n","export const DEFAULT_BASE_URL = 'https://api.claw-ops.com';\nexport const DEFAULT_MAX_RETRIES = 2;\nexport const DEFAULT_TIMEOUT = 600_000; // ms\nexport const INITIAL_RETRY_DELAY = 500; // ms\nexport const MAX_RETRY_DELAY = 8_000; // ms\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/error.ts","../src/version.ts","../src/constants.ts"],"names":[],"mappings":";AAAO,IAAM,YAAA,GAAN,cAA2B,KAAA,CAAM;AAAA,EACtC,YAAY,OAAA,EAAiB;AAC3B,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAO,cAAA;AAAA,EACd;AACF;AAEO,IAAM,QAAA,GAAN,cAAuB,YAAA,CAAa;AAAA,EAChC,OAAA;AAAA,EAET,WAAA,CAAY,SAAiB,OAAA,EAA0C;AACrE,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAO,UAAA;AACZ,IAAA,IAAA,CAAK,OAAA,GAAU,OAAA;AAAA,EACjB;AACF;AAEO,IAAM,cAAA,GAAN,cAA6B,QAAA,CAAS;AAAA,EAClC,MAAA;AAAA,EACA,IAAA;AAAA,EACA,OAAA;AAAA,EAET,WAAA,CACE,OAAA,EACA,QAAA,EACA,IAAA,EACA,OAAA,EACA;AACA,IAAA,KAAA,CAAM,SAAS,OAAO,CAAA;AACtB,IAAA,IAAA,CAAK,IAAA,GAAO,gBAAA;AACZ,IAAA,IAAA,CAAK,SAAS,QAAA,CAAS,MAAA;AACvB,IAAA,IAAA,CAAK,IAAA,GAAO,IAAA;AACZ,IAAA,IAAA,CAAK,UAAU,QAAA,CAAS,OAAA;AAAA,EAC1B;AACF;AAEO,IAAM,eAAA,GAAN,cAA8B,cAAA,CAAe;AAAA,EAChC,MAAA,GAAS,GAAA;AAAA,EAC3B,WAAA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OAAA,EACA,OAAA,EACgB;AAChB,EAAA,IAAI,OAAA,GAAU,EAAA;AACd,EAAA,IAAI,IAAA,IAAQ,OAAO,IAAA,KAAS,QAAA,IAAY,WAAW,IAAA,EAAM;AACvD,IAAA,OAAA,GAAW,IAAA,CAA2B,KAAA;AAAA,EACxC,CAAA,MAAO;AACL,IAAA,OAAA,GAAU,QAAQ,MAAM,CAAA,CAAA;AAAA,EAC1B;AAEA,EAAA,MAAM,UAAA,GAAa,qBAAqB,MAAM,CAAA;AAC9C,EAAA,IAAI,UAAA,EAAY;AACd,IAAA,OAAO,IAAI,WAAW,OAAA,EAAS,EAAE,QAAQ,OAAA,EAAQ,EAAG,MAAM,OAAO,CAAA;AAAA,EACnE;AACA,EAAA,IAAI,UAAU,GAAA,EAAK;AACjB,IAAA,OAAO,IAAI,oBAAoB,OAAA,EAAS,EAAE,QAAQ,OAAA,EAAQ,EAAG,MAAM,OAAO,CAAA;AAAA,EAC5E;AACA,EAAA,OAAO,IAAI,eAAe,OAAA,EAAS,EAAE,QAAQ,OAAA,EAAQ,EAAG,MAAM,OAAO,CAAA;AACvE;;;AC5OO,IAAM,OAAA,GACT,QAAA;;;ACHG,IAAM,gBAAA,GAAmB;AACzB,IAAM,mBAAA,GAAsB;AAC5B,IAAM,eAAA,GAAkB;AACxB,IAAM,mBAAA,GAAsB;AAC5B,IAAM,eAAA,GAAkB","file":"chunk-AAU26CX6.js","sourcesContent":["export class ClawOpsError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'ClawOpsError';\n }\n}\n\nexport class APIError extends ClawOpsError {\n readonly request: { method: string; url: string };\n\n constructor(message: string, request: { method: string; url: string }) {\n super(message);\n this.name = 'APIError';\n this.request = request;\n }\n}\n\nexport class APIStatusError extends APIError {\n readonly status: number;\n readonly body: unknown;\n readonly headers: Headers | undefined;\n\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, request);\n this.name = 'APIStatusError';\n this.status = response.status;\n this.body = body;\n this.headers = response.headers;\n }\n}\n\nexport class BadRequestError extends APIStatusError {\n override readonly status = 400 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'BadRequestError';\n }\n}\n\nexport class AuthenticationError extends APIStatusError {\n override readonly status = 401 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'AuthenticationError';\n }\n}\n\nexport class PermissionDeniedError extends APIStatusError {\n override readonly status = 403 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'PermissionDeniedError';\n }\n}\n\nexport class NotFoundError extends APIStatusError {\n override readonly status = 404 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'NotFoundError';\n }\n}\n\nexport class ConflictError extends APIStatusError {\n override readonly status = 409 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'ConflictError';\n }\n}\n\nexport class UnprocessableEntityError extends APIStatusError {\n override readonly status = 422 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'UnprocessableEntityError';\n }\n}\n\n/**\n * HTTP 429 Too Many Requests.\n *\n * 동시 통화 한도 초과 등 일시적 제한. SDK는 자동 재시도(최대 2회, 지수 backoff)를 수행한다.\n * 즉각 피드백이 필요하면 client 생성 시 maxRetries: 0으로 재시도를 비활성화하라.\n */\nexport class RateLimitError extends APIStatusError {\n override readonly status = 429 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'RateLimitError';\n }\n}\n\nexport class InternalServerError extends APIStatusError {\n override readonly status = 500 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'InternalServerError';\n }\n}\n\nexport class ServiceUnavailableError extends APIStatusError {\n override readonly status = 503 as const;\n constructor(\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) {\n super(message, response, body, request);\n this.name = 'ServiceUnavailableError';\n }\n}\n\nexport class APIConnectionError extends APIError {\n constructor(request: { method: string; url: string }, message = 'Connection error.') {\n super(message, request);\n this.name = 'APIConnectionError';\n }\n}\n\nexport class APITimeoutError extends APIConnectionError {\n constructor(request: { method: string; url: string }) {\n super(request, 'Request timed out.');\n this.name = 'APITimeoutError';\n }\n}\n\nexport class APIResponseValidationError extends APIError {\n readonly status: number;\n\n constructor(response: { status: number }, request: { method: string; url: string }) {\n super('API response validation failed.', request);\n this.name = 'APIResponseValidationError';\n this.status = response.status;\n }\n}\n\nexport class AgentError extends ClawOpsError {\n constructor(message: string) {\n super(message);\n this.name = 'AgentError';\n }\n}\n\nexport class AgentConnectionError extends AgentError {\n constructor(message = 'Agent WebSocket connection failed.') {\n super(message);\n this.name = 'AgentConnectionError';\n }\n}\n\nconst STATUS_CODE_TO_ERROR: Record<\n number,\n new (\n message: string,\n response: { status: number; headers?: Headers },\n body: unknown,\n request: { method: string; url: string },\n ) => APIStatusError\n> = {\n 400: BadRequestError,\n 401: AuthenticationError,\n 403: PermissionDeniedError,\n 404: NotFoundError,\n 409: ConflictError,\n 422: UnprocessableEntityError,\n 429: RateLimitError,\n 500: InternalServerError,\n 503: ServiceUnavailableError,\n};\n\nexport function makeStatusError(\n status: number,\n body: unknown,\n headers: Headers | undefined,\n request: { method: string; url: string },\n): APIStatusError {\n let message = '';\n if (body && typeof body === 'object' && 'error' in body) {\n message = (body as { error: string }).error;\n } else {\n message = `HTTP ${status}`;\n }\n\n const ErrorClass = STATUS_CODE_TO_ERROR[status];\n if (ErrorClass) {\n return new ErrorClass(message, { status, headers }, body, request);\n }\n if (status >= 500) {\n return new InternalServerError(message, { status, headers }, body, request);\n }\n return new APIStatusError(message, { status, headers }, body, request);\n}\n","declare const __PKG_VERSION__: string;\n\nexport const VERSION: string = typeof __PKG_VERSION__ !== 'undefined'\n ? __PKG_VERSION__\n : 'dev';\n","export const DEFAULT_BASE_URL = 'https://api.claw-ops.com';\nexport const DEFAULT_MAX_RETRIES = 2;\nexport const DEFAULT_TIMEOUT = 600_000; // ms\nexport const INITIAL_RETRY_DELAY = 500; // ms\nexport const MAX_RETRY_DELAY = 8_000; // ms\n"]}
|
package/dist/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var chunk6ZPYSHP3_cjs = require('./chunk-6ZPYSHP3.cjs');
|
|
6
6
|
var zod = require('zod');
|
|
7
7
|
var crypto = require('crypto');
|
|
8
8
|
|
|
@@ -13,11 +13,11 @@ function validateBaseUrl(url) {
|
|
|
13
13
|
try {
|
|
14
14
|
parsed = new URL(url);
|
|
15
15
|
} catch {
|
|
16
|
-
throw new
|
|
16
|
+
throw new chunk6ZPYSHP3_cjs.ClawOpsError(`Invalid base_url: ${url}`);
|
|
17
17
|
}
|
|
18
18
|
if (parsed.protocol === "https:") return url;
|
|
19
19
|
if (parsed.protocol === "http:" && LOCALHOST_HOSTS.has(parsed.hostname)) return url;
|
|
20
|
-
throw new
|
|
20
|
+
throw new chunk6ZPYSHP3_cjs.ClawOpsError(
|
|
21
21
|
`base_url\uC740 HTTPS\uB97C \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4 (\uBC1B\uC740 \uAC12: '${url}'). \uB85C\uCEEC \uAC1C\uBC1C \uC2DC\uC5D0\uB294 http://localhost\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.`
|
|
22
22
|
);
|
|
23
23
|
}
|
|
@@ -30,9 +30,9 @@ var APIClient = class {
|
|
|
30
30
|
_defaultHeaders;
|
|
31
31
|
constructor(options) {
|
|
32
32
|
this._apiKey = options.apiKey;
|
|
33
|
-
this._baseURL = validateBaseUrl((options.baseURL ??
|
|
34
|
-
this._maxRetries = options.maxRetries ??
|
|
35
|
-
this._timeout = options.timeout ??
|
|
33
|
+
this._baseURL = validateBaseUrl((options.baseURL ?? chunk6ZPYSHP3_cjs.DEFAULT_BASE_URL).replace(/\/+$/, ""));
|
|
34
|
+
this._maxRetries = options.maxRetries ?? chunk6ZPYSHP3_cjs.DEFAULT_MAX_RETRIES;
|
|
35
|
+
this._timeout = options.timeout ?? chunk6ZPYSHP3_cjs.DEFAULT_TIMEOUT;
|
|
36
36
|
this._fetch = options.fetch ?? globalThis.fetch;
|
|
37
37
|
this._defaultHeaders = options.defaultHeaders ?? {};
|
|
38
38
|
}
|
|
@@ -41,7 +41,7 @@ var APIClient = class {
|
|
|
41
41
|
Authorization: `Bearer ${this._apiKey}`,
|
|
42
42
|
"Content-Type": "application/json",
|
|
43
43
|
Accept: "application/json",
|
|
44
|
-
"User-Agent": `claw-ops-node/${
|
|
44
|
+
"User-Agent": `claw-ops-node/${chunk6ZPYSHP3_cjs.VERSION}`,
|
|
45
45
|
...this._defaultHeaders
|
|
46
46
|
};
|
|
47
47
|
if (extra) Object.assign(headers, extra);
|
|
@@ -77,14 +77,14 @@ var APIClient = class {
|
|
|
77
77
|
await this._sleep(this._retryDelay(this._maxRetries - retriesLeft));
|
|
78
78
|
continue;
|
|
79
79
|
}
|
|
80
|
-
throw new
|
|
80
|
+
throw new chunk6ZPYSHP3_cjs.APITimeoutError({ method: method2, url });
|
|
81
81
|
}
|
|
82
82
|
if (retriesLeft > 0) {
|
|
83
83
|
retriesLeft--;
|
|
84
84
|
await this._sleep(this._retryDelay(this._maxRetries - retriesLeft));
|
|
85
85
|
continue;
|
|
86
86
|
}
|
|
87
|
-
throw new
|
|
87
|
+
throw new chunk6ZPYSHP3_cjs.APIConnectionError({ method: method2, url });
|
|
88
88
|
} finally {
|
|
89
89
|
clearTimeout(timeoutId);
|
|
90
90
|
}
|
|
@@ -100,7 +100,7 @@ var APIClient = class {
|
|
|
100
100
|
} catch {
|
|
101
101
|
body = null;
|
|
102
102
|
}
|
|
103
|
-
throw
|
|
103
|
+
throw chunk6ZPYSHP3_cjs.makeStatusError(response.status, body, response.headers, { method: method2, url });
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
async _request(method2, path, options = {}) {
|
|
@@ -111,11 +111,11 @@ var APIClient = class {
|
|
|
111
111
|
try {
|
|
112
112
|
json = await response.json();
|
|
113
113
|
} catch {
|
|
114
|
-
throw new
|
|
114
|
+
throw new chunk6ZPYSHP3_cjs.APIResponseValidationError({ status: response.status }, { method: method2, url });
|
|
115
115
|
}
|
|
116
116
|
const parsed = options.castTo.safeParse(json);
|
|
117
117
|
if (!parsed.success) {
|
|
118
|
-
throw new
|
|
118
|
+
throw new chunk6ZPYSHP3_cjs.APIResponseValidationError({ status: response.status }, { method: method2, url });
|
|
119
119
|
}
|
|
120
120
|
return parsed.data;
|
|
121
121
|
}
|
|
@@ -123,7 +123,7 @@ var APIClient = class {
|
|
|
123
123
|
return status === 408 || status === 409 || status === 429 || status >= 500;
|
|
124
124
|
}
|
|
125
125
|
_retryDelay(retriesTaken) {
|
|
126
|
-
const delay = Math.min(
|
|
126
|
+
const delay = Math.min(chunk6ZPYSHP3_cjs.INITIAL_RETRY_DELAY * 2 ** retriesTaken, chunk6ZPYSHP3_cjs.MAX_RETRY_DELAY);
|
|
127
127
|
return delay * (1 + Math.random());
|
|
128
128
|
}
|
|
129
129
|
_sleep(ms) {
|
|
@@ -334,6 +334,33 @@ var CallSchema = zod.z.object({
|
|
|
334
334
|
recordingUrl: zod.z.string().nullable().optional(),
|
|
335
335
|
/** AMD(machineDetection) 결과 — AMD 켠 발신 통화에만 값 존재. */
|
|
336
336
|
answeredBy: zod.z.enum(["human", "machine", "unknown"]).nullable().optional(),
|
|
337
|
+
/**
|
|
338
|
+
* 통화 종료 사유. status 가 왜 그렇게 끝났는지를 구분한다 — 특히 failed 는 결번·망 오류·
|
|
339
|
+
* 시스템 오류를 모두 포함하는 대분류라, 발신 리스트를 정제하려면 status 가 아니라 이 값을 본다.
|
|
340
|
+
*
|
|
341
|
+
* 재시도해도 소용없음: invalid_number(결번) / number_changed / incompatible_destination.
|
|
342
|
+
* 재시도 가치 있음: no_answer / user_busy / temporary_failure / switching_congestion /
|
|
343
|
+
* no_circuit_available / network_out_of_order / destination_out_of_order /
|
|
344
|
+
* recovery_on_timer_expire / resource_unavailable.
|
|
345
|
+
* 그 외: normal_clearing(정상 종료) / caller_canceled / call_rejected / protocol_error /
|
|
346
|
+
* unspecified / app_error·call_stuck(ClawOps 측 오류 — 재시도 권장) / unknown.
|
|
347
|
+
*
|
|
348
|
+
* enum 으로 좁히지 않는다 — 통신망이 새 cause 를 보내면 서버가 값을 넓히는데, 그때마다
|
|
349
|
+
* SDK 릴리즈를 기다려야 파싱되는 구조는 안 된다.
|
|
350
|
+
*/
|
|
351
|
+
hangupCause: zod.z.string().nullable().optional(),
|
|
352
|
+
/** 통신망 Q.850 cause code. 1·5·28=결번, 16=정상해제, 17=통화중, 19=무응답, 38=망장애. */
|
|
353
|
+
hangupCauseQ850: zod.z.number().nullable().optional(),
|
|
354
|
+
/**
|
|
355
|
+
* 종료를 유발한 SIP 응답코드(404=없는 번호, 486=통화중, 500=망 오류 등).
|
|
356
|
+
* 국내 통신망은 실제 사유를 500 으로 감싸 보내기도 하므로 hangupCause 가 더 정확하다.
|
|
357
|
+
*/
|
|
358
|
+
sipResponseCode: zod.z.number().nullable().optional(),
|
|
359
|
+
/**
|
|
360
|
+
* 종료 책임 주체. carrier(통신망) / callee(수신자) / caller(발신자) /
|
|
361
|
+
* app·system(ClawOps 측 오류 — 수신자 번호를 정제 대상에 넣지 말고 재시도할 것).
|
|
362
|
+
*/
|
|
363
|
+
hangupSource: zod.z.enum(["carrier", "callee", "caller", "app", "system"]).nullable().optional(),
|
|
337
364
|
accountId: zod.z.string(),
|
|
338
365
|
dateCreated: zod.z.string(),
|
|
339
366
|
dateUpdated: zod.z.string().nullable().optional()
|
|
@@ -750,7 +777,7 @@ var AccountContext = class {
|
|
|
750
777
|
return new AssignmentLinks(this._client, this._accountId);
|
|
751
778
|
}
|
|
752
779
|
};
|
|
753
|
-
var WebhookVerificationError = class extends
|
|
780
|
+
var WebhookVerificationError = class extends chunk6ZPYSHP3_cjs.ClawOpsError {
|
|
754
781
|
constructor(message = "Webhook \uC11C\uBA85\uC774 \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.") {
|
|
755
782
|
super(message);
|
|
756
783
|
this.name = "WebhookVerificationError";
|
|
@@ -780,13 +807,13 @@ var ClawOps = class extends APIClient {
|
|
|
780
807
|
constructor(options = {}) {
|
|
781
808
|
let apiKey = options.apiKey ?? process.env.CLAWOPS_API_KEY;
|
|
782
809
|
if (!apiKey) {
|
|
783
|
-
throw new
|
|
810
|
+
throw new chunk6ZPYSHP3_cjs.ClawOpsError("apiKey\uB97C \uC9C0\uC815\uD558\uAC70\uB098 CLAWOPS_API_KEY \uD658\uACBD\uBCC0\uC218\uB97C \uC124\uC815\uD558\uC138\uC694.");
|
|
784
811
|
}
|
|
785
812
|
let accountId = options.accountId ?? process.env.CLAWOPS_ACCOUNT_ID;
|
|
786
813
|
if (!accountId) {
|
|
787
|
-
throw new
|
|
814
|
+
throw new chunk6ZPYSHP3_cjs.ClawOpsError("accountId\uB97C \uC9C0\uC815\uD558\uAC70\uB098 CLAWOPS_ACCOUNT_ID \uD658\uACBD\uBCC0\uC218\uB97C \uC124\uC815\uD558\uC138\uC694.");
|
|
788
815
|
}
|
|
789
|
-
const baseURL = options.baseURL ?? process.env.CLAWOPS_BASE_URL ??
|
|
816
|
+
const baseURL = options.baseURL ?? process.env.CLAWOPS_BASE_URL ?? chunk6ZPYSHP3_cjs.DEFAULT_BASE_URL;
|
|
790
817
|
super({
|
|
791
818
|
apiKey,
|
|
792
819
|
baseURL,
|
|
@@ -834,75 +861,75 @@ var client_default_default = ClawOps;
|
|
|
834
861
|
|
|
835
862
|
Object.defineProperty(exports, "APIConnectionError", {
|
|
836
863
|
enumerable: true,
|
|
837
|
-
get: function () { return
|
|
864
|
+
get: function () { return chunk6ZPYSHP3_cjs.APIConnectionError; }
|
|
838
865
|
});
|
|
839
866
|
Object.defineProperty(exports, "APIError", {
|
|
840
867
|
enumerable: true,
|
|
841
|
-
get: function () { return
|
|
868
|
+
get: function () { return chunk6ZPYSHP3_cjs.APIError; }
|
|
842
869
|
});
|
|
843
870
|
Object.defineProperty(exports, "APIResponseValidationError", {
|
|
844
871
|
enumerable: true,
|
|
845
|
-
get: function () { return
|
|
872
|
+
get: function () { return chunk6ZPYSHP3_cjs.APIResponseValidationError; }
|
|
846
873
|
});
|
|
847
874
|
Object.defineProperty(exports, "APIStatusError", {
|
|
848
875
|
enumerable: true,
|
|
849
|
-
get: function () { return
|
|
876
|
+
get: function () { return chunk6ZPYSHP3_cjs.APIStatusError; }
|
|
850
877
|
});
|
|
851
878
|
Object.defineProperty(exports, "APITimeoutError", {
|
|
852
879
|
enumerable: true,
|
|
853
|
-
get: function () { return
|
|
880
|
+
get: function () { return chunk6ZPYSHP3_cjs.APITimeoutError; }
|
|
854
881
|
});
|
|
855
882
|
Object.defineProperty(exports, "AgentConnectionError", {
|
|
856
883
|
enumerable: true,
|
|
857
|
-
get: function () { return
|
|
884
|
+
get: function () { return chunk6ZPYSHP3_cjs.AgentConnectionError; }
|
|
858
885
|
});
|
|
859
886
|
Object.defineProperty(exports, "AgentError", {
|
|
860
887
|
enumerable: true,
|
|
861
|
-
get: function () { return
|
|
888
|
+
get: function () { return chunk6ZPYSHP3_cjs.AgentError; }
|
|
862
889
|
});
|
|
863
890
|
Object.defineProperty(exports, "AuthenticationError", {
|
|
864
891
|
enumerable: true,
|
|
865
|
-
get: function () { return
|
|
892
|
+
get: function () { return chunk6ZPYSHP3_cjs.AuthenticationError; }
|
|
866
893
|
});
|
|
867
894
|
Object.defineProperty(exports, "BadRequestError", {
|
|
868
895
|
enumerable: true,
|
|
869
|
-
get: function () { return
|
|
896
|
+
get: function () { return chunk6ZPYSHP3_cjs.BadRequestError; }
|
|
870
897
|
});
|
|
871
898
|
Object.defineProperty(exports, "ClawOpsError", {
|
|
872
899
|
enumerable: true,
|
|
873
|
-
get: function () { return
|
|
900
|
+
get: function () { return chunk6ZPYSHP3_cjs.ClawOpsError; }
|
|
874
901
|
});
|
|
875
902
|
Object.defineProperty(exports, "ConflictError", {
|
|
876
903
|
enumerable: true,
|
|
877
|
-
get: function () { return
|
|
904
|
+
get: function () { return chunk6ZPYSHP3_cjs.ConflictError; }
|
|
878
905
|
});
|
|
879
906
|
Object.defineProperty(exports, "InternalServerError", {
|
|
880
907
|
enumerable: true,
|
|
881
|
-
get: function () { return
|
|
908
|
+
get: function () { return chunk6ZPYSHP3_cjs.InternalServerError; }
|
|
882
909
|
});
|
|
883
910
|
Object.defineProperty(exports, "NotFoundError", {
|
|
884
911
|
enumerable: true,
|
|
885
|
-
get: function () { return
|
|
912
|
+
get: function () { return chunk6ZPYSHP3_cjs.NotFoundError; }
|
|
886
913
|
});
|
|
887
914
|
Object.defineProperty(exports, "PermissionDeniedError", {
|
|
888
915
|
enumerable: true,
|
|
889
|
-
get: function () { return
|
|
916
|
+
get: function () { return chunk6ZPYSHP3_cjs.PermissionDeniedError; }
|
|
890
917
|
});
|
|
891
918
|
Object.defineProperty(exports, "RateLimitError", {
|
|
892
919
|
enumerable: true,
|
|
893
|
-
get: function () { return
|
|
920
|
+
get: function () { return chunk6ZPYSHP3_cjs.RateLimitError; }
|
|
894
921
|
});
|
|
895
922
|
Object.defineProperty(exports, "ServiceUnavailableError", {
|
|
896
923
|
enumerable: true,
|
|
897
|
-
get: function () { return
|
|
924
|
+
get: function () { return chunk6ZPYSHP3_cjs.ServiceUnavailableError; }
|
|
898
925
|
});
|
|
899
926
|
Object.defineProperty(exports, "UnprocessableEntityError", {
|
|
900
927
|
enumerable: true,
|
|
901
|
-
get: function () { return
|
|
928
|
+
get: function () { return chunk6ZPYSHP3_cjs.UnprocessableEntityError; }
|
|
902
929
|
});
|
|
903
930
|
Object.defineProperty(exports, "VERSION", {
|
|
904
931
|
enumerable: true,
|
|
905
|
-
get: function () { return
|
|
932
|
+
get: function () { return chunk6ZPYSHP3_cjs.VERSION; }
|
|
906
933
|
});
|
|
907
934
|
exports.APIClient = APIClient;
|
|
908
935
|
exports.AccountContext = AccountContext;
|