@voice-kit/core 0.1.1 → 0.1.2

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/dist/errors.d.cts CHANGED
@@ -1,55 +1,8 @@
1
- import { E as ErrorSeverity } from './index-CkTG6DOa.cjs';
1
+ import { V as VoiceKitError } from './telephony.errors-BQYr6-vl.cjs';
2
+ export { A as AudioTransportError, C as CallConnectionError, a as CallNotFoundError, T as TelephonyError } from './telephony.errors-BQYr6-vl.cjs';
3
+ import { E as ErrorSeverity } from './index-D3KfRXMP.cjs';
2
4
  import 'ai';
3
5
 
4
- /**
5
- * @voice-kit/core — Typed error hierarchy
6
- *
7
- * All VoiceKit errors extend VoiceKitError. Never throw raw Error.
8
- * Every error carries: code, message, provider, callId, retryable, severity.
9
- */
10
-
11
- /**
12
- * Base class for all VoiceKit errors. Provides structured context for
13
- * logging, alerting, and programmatic error handling.
14
- *
15
- * @example
16
- * ```ts
17
- * try {
18
- * await stt.transcribeBatch(audio)
19
- * } catch (err) {
20
- * if (err instanceof STTError) {
21
- * console.error(err.code, err.provider, err.retryable)
22
- * }
23
- * }
24
- * ```
25
- */
26
- declare class VoiceKitError extends Error {
27
- readonly code: string;
28
- readonly callId?: string;
29
- readonly provider?: string;
30
- readonly retryable: boolean;
31
- readonly severity: ErrorSeverity;
32
- readonly cause?: unknown;
33
- constructor(params: {
34
- code: string;
35
- message: string;
36
- callId?: string;
37
- provider?: string;
38
- retryable?: boolean;
39
- severity?: ErrorSeverity;
40
- cause?: unknown;
41
- });
42
- toJSON(): {
43
- name: string;
44
- code: string;
45
- message: string;
46
- callId: string | undefined;
47
- provider: string | undefined;
48
- retryable: boolean;
49
- severity: ErrorSeverity;
50
- };
51
- }
52
-
53
6
  /**
54
7
  * Errors from agent orchestration (turn engine, handoff, injection).
55
8
  */
@@ -129,34 +82,6 @@ declare class STTLanguageNotSupportedError extends STTError {
129
82
  constructor(provider: string, language: string);
130
83
  }
131
84
 
132
- /**
133
- * Errors from telephony providers.
134
- */
135
- declare class TelephonyError extends VoiceKitError {
136
- readonly to?: string;
137
- readonly from?: string;
138
- constructor(params: {
139
- code: string;
140
- message: string;
141
- callId?: string;
142
- provider?: string;
143
- retryable?: boolean;
144
- severity?: ErrorSeverity;
145
- cause?: unknown;
146
- to?: string;
147
- from?: string;
148
- });
149
- }
150
- declare class CallConnectionError extends TelephonyError {
151
- constructor(provider: string, to: string, cause?: unknown);
152
- }
153
- declare class CallNotFoundError extends TelephonyError {
154
- constructor(callId: string, provider: string);
155
- }
156
- declare class AudioTransportError extends TelephonyError {
157
- constructor(provider: string, cause?: unknown, callId?: string);
158
- }
159
-
160
85
  /**
161
86
  * Errors from text-to-speech providers.
162
87
  */
@@ -172,4 +97,4 @@ declare class TTSVoiceNotFoundError extends TTSError {
172
97
  constructor(provider: string, voiceId: string);
173
98
  }
174
99
 
175
- export { AgentError, AgentHandoffError, AudioTransportError, CallConnectionError, CallNotFoundError, CallingHoursError, ComplianceError, ConsentMissingError, DNCBlockedError, InngestError, STTConnectionError, STTError, STTLanguageNotSupportedError, STTStreamError, TTSConnectionError, TTSError, TTSStreamError, TTSVoiceNotFoundError, TelephonyError, TurnTransitionError, VoiceKitError };
100
+ export { AgentError, AgentHandoffError, CallingHoursError, ComplianceError, ConsentMissingError, DNCBlockedError, InngestError, STTConnectionError, STTError, STTLanguageNotSupportedError, STTStreamError, TTSConnectionError, TTSError, TTSStreamError, TTSVoiceNotFoundError, TurnTransitionError, VoiceKitError };
package/dist/errors.d.ts CHANGED
@@ -1,55 +1,8 @@
1
- import { E as ErrorSeverity } from './index-CkTG6DOa.js';
1
+ import { V as VoiceKitError } from './telephony.errors-C0-nScrF.js';
2
+ export { A as AudioTransportError, C as CallConnectionError, a as CallNotFoundError, T as TelephonyError } from './telephony.errors-C0-nScrF.js';
3
+ import { E as ErrorSeverity } from './index-D3KfRXMP.js';
2
4
  import 'ai';
3
5
 
4
- /**
5
- * @voice-kit/core — Typed error hierarchy
6
- *
7
- * All VoiceKit errors extend VoiceKitError. Never throw raw Error.
8
- * Every error carries: code, message, provider, callId, retryable, severity.
9
- */
10
-
11
- /**
12
- * Base class for all VoiceKit errors. Provides structured context for
13
- * logging, alerting, and programmatic error handling.
14
- *
15
- * @example
16
- * ```ts
17
- * try {
18
- * await stt.transcribeBatch(audio)
19
- * } catch (err) {
20
- * if (err instanceof STTError) {
21
- * console.error(err.code, err.provider, err.retryable)
22
- * }
23
- * }
24
- * ```
25
- */
26
- declare class VoiceKitError extends Error {
27
- readonly code: string;
28
- readonly callId?: string;
29
- readonly provider?: string;
30
- readonly retryable: boolean;
31
- readonly severity: ErrorSeverity;
32
- readonly cause?: unknown;
33
- constructor(params: {
34
- code: string;
35
- message: string;
36
- callId?: string;
37
- provider?: string;
38
- retryable?: boolean;
39
- severity?: ErrorSeverity;
40
- cause?: unknown;
41
- });
42
- toJSON(): {
43
- name: string;
44
- code: string;
45
- message: string;
46
- callId: string | undefined;
47
- provider: string | undefined;
48
- retryable: boolean;
49
- severity: ErrorSeverity;
50
- };
51
- }
52
-
53
6
  /**
54
7
  * Errors from agent orchestration (turn engine, handoff, injection).
55
8
  */
@@ -129,34 +82,6 @@ declare class STTLanguageNotSupportedError extends STTError {
129
82
  constructor(provider: string, language: string);
130
83
  }
131
84
 
132
- /**
133
- * Errors from telephony providers.
134
- */
135
- declare class TelephonyError extends VoiceKitError {
136
- readonly to?: string;
137
- readonly from?: string;
138
- constructor(params: {
139
- code: string;
140
- message: string;
141
- callId?: string;
142
- provider?: string;
143
- retryable?: boolean;
144
- severity?: ErrorSeverity;
145
- cause?: unknown;
146
- to?: string;
147
- from?: string;
148
- });
149
- }
150
- declare class CallConnectionError extends TelephonyError {
151
- constructor(provider: string, to: string, cause?: unknown);
152
- }
153
- declare class CallNotFoundError extends TelephonyError {
154
- constructor(callId: string, provider: string);
155
- }
156
- declare class AudioTransportError extends TelephonyError {
157
- constructor(provider: string, cause?: unknown, callId?: string);
158
- }
159
-
160
85
  /**
161
86
  * Errors from text-to-speech providers.
162
87
  */
@@ -172,4 +97,4 @@ declare class TTSVoiceNotFoundError extends TTSError {
172
97
  constructor(provider: string, voiceId: string);
173
98
  }
174
99
 
175
- export { AgentError, AgentHandoffError, AudioTransportError, CallConnectionError, CallNotFoundError, CallingHoursError, ComplianceError, ConsentMissingError, DNCBlockedError, InngestError, STTConnectionError, STTError, STTLanguageNotSupportedError, STTStreamError, TTSConnectionError, TTSError, TTSStreamError, TTSVoiceNotFoundError, TelephonyError, TurnTransitionError, VoiceKitError };
100
+ export { AgentError, AgentHandoffError, CallingHoursError, ComplianceError, ConsentMissingError, DNCBlockedError, InngestError, STTConnectionError, STTError, STTLanguageNotSupportedError, STTStreamError, TTSConnectionError, TTSError, TTSStreamError, TTSVoiceNotFoundError, TurnTransitionError, VoiceKitError };
@@ -316,4 +316,4 @@ declare function createTTS(provider: 'elevenlabs' | 'cartesia' | 'sarvam', confi
316
316
  */
317
317
  declare function createCallMemory(config?: CallMemoryConfig): CallMemory;
318
318
 
319
- export { type CallMemoryConfig as C, type DNCCheckParams as D, type ErrorSeverity as E, type STTProvider as S, type TRAIConfig as T, type VADConfig as V, type WordTimestamp as W, type CallMemory as a, type DNCCheckResult as b, type ConsentRecord as c, type CallMetricsSummary as d, type TTSProvider as e, type TTSConfig as f, type STTConfig as g, type STTResult as h, type CallPurpose as i, type VoiceFrame as j, type VoiceKitErrorContext as k, createCallMemory as l, createSTT as m, createTTS as n };
319
+ export { type CallMemoryConfig as C, type DNCCheckParams as D, type ErrorSeverity as E, type STTProvider as S, type TRAIConfig as T, type VADConfig as V, type WordTimestamp as W, type CallMemory as a, type DNCCheckResult as b, type ConsentRecord as c, type CallMetricsSummary as d, type TTSProvider as e, type TTSConfig as f, type VoiceFrame as g, type STTConfig as h, type STTResult as i, type CallPurpose as j, type VoiceKitErrorContext as k, createCallMemory as l, createSTT as m, createTTS as n };
@@ -316,4 +316,4 @@ declare function createTTS(provider: 'elevenlabs' | 'cartesia' | 'sarvam', confi
316
316
  */
317
317
  declare function createCallMemory(config?: CallMemoryConfig): CallMemory;
318
318
 
319
- export { type CallMemoryConfig as C, type DNCCheckParams as D, type ErrorSeverity as E, type STTProvider as S, type TRAIConfig as T, type VADConfig as V, type WordTimestamp as W, type CallMemory as a, type DNCCheckResult as b, type ConsentRecord as c, type CallMetricsSummary as d, type TTSProvider as e, type TTSConfig as f, type STTConfig as g, type STTResult as h, type CallPurpose as i, type VoiceFrame as j, type VoiceKitErrorContext as k, createCallMemory as l, createSTT as m, createTTS as n };
319
+ export { type CallMemoryConfig as C, type DNCCheckParams as D, type ErrorSeverity as E, type STTProvider as S, type TRAIConfig as T, type VADConfig as V, type WordTimestamp as W, type CallMemory as a, type DNCCheckResult as b, type ConsentRecord as c, type CallMetricsSummary as d, type TTSProvider as e, type TTSConfig as f, type VoiceFrame as g, type STTConfig as h, type STTResult as i, type CallPurpose as j, type VoiceKitErrorContext as k, createCallMemory as l, createSTT as m, createTTS as n };
package/dist/index.d.cts CHANGED
@@ -1,3 +1,4 @@
1
- export { a as CallMemory, C as CallMemoryConfig, d as CallMetricsSummary, i as CallPurpose, c as ConsentRecord, D as DNCCheckParams, b as DNCCheckResult, E as ErrorSeverity, g as STTConfig, S as STTProvider, h as STTResult, T as TRAIConfig, f as TTSConfig, e as TTSProvider, V as VADConfig, j as VoiceFrame, k as VoiceKitErrorContext, W as WordTimestamp, l as createCallMemory, m as createSTT, n as createTTS } from './index-CkTG6DOa.cjs';
2
- export { AgentError, AgentHandoffError, AudioTransportError, CallConnectionError, CallNotFoundError, CallingHoursError, ComplianceError, ConsentMissingError, DNCBlockedError, InngestError, STTConnectionError, STTError, STTLanguageNotSupportedError, STTStreamError, TTSConnectionError, TTSError, TTSStreamError, TTSVoiceNotFoundError, TelephonyError, TurnTransitionError, VoiceKitError } from './errors.cjs';
1
+ export { a as CallMemory, C as CallMemoryConfig, d as CallMetricsSummary, j as CallPurpose, c as ConsentRecord, D as DNCCheckParams, b as DNCCheckResult, E as ErrorSeverity, h as STTConfig, S as STTProvider, i as STTResult, T as TRAIConfig, f as TTSConfig, e as TTSProvider, V as VADConfig, g as VoiceFrame, k as VoiceKitErrorContext, W as WordTimestamp, l as createCallMemory, m as createSTT, n as createTTS } from './index-D3KfRXMP.cjs';
2
+ export { AgentError, AgentHandoffError, CallingHoursError, ComplianceError, ConsentMissingError, DNCBlockedError, InngestError, STTConnectionError, STTError, STTLanguageNotSupportedError, STTStreamError, TTSConnectionError, TTSError, TTSStreamError, TTSVoiceNotFoundError, TurnTransitionError } from './errors.cjs';
3
+ export { A as AudioTransportError, C as CallConnectionError, a as CallNotFoundError, T as TelephonyError, V as VoiceKitError } from './telephony.errors-BQYr6-vl.cjs';
3
4
  import 'ai';
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
- export { a as CallMemory, C as CallMemoryConfig, d as CallMetricsSummary, i as CallPurpose, c as ConsentRecord, D as DNCCheckParams, b as DNCCheckResult, E as ErrorSeverity, g as STTConfig, S as STTProvider, h as STTResult, T as TRAIConfig, f as TTSConfig, e as TTSProvider, V as VADConfig, j as VoiceFrame, k as VoiceKitErrorContext, W as WordTimestamp, l as createCallMemory, m as createSTT, n as createTTS } from './index-CkTG6DOa.js';
2
- export { AgentError, AgentHandoffError, AudioTransportError, CallConnectionError, CallNotFoundError, CallingHoursError, ComplianceError, ConsentMissingError, DNCBlockedError, InngestError, STTConnectionError, STTError, STTLanguageNotSupportedError, STTStreamError, TTSConnectionError, TTSError, TTSStreamError, TTSVoiceNotFoundError, TelephonyError, TurnTransitionError, VoiceKitError } from './errors.js';
1
+ export { a as CallMemory, C as CallMemoryConfig, d as CallMetricsSummary, j as CallPurpose, c as ConsentRecord, D as DNCCheckParams, b as DNCCheckResult, E as ErrorSeverity, h as STTConfig, S as STTProvider, i as STTResult, T as TRAIConfig, f as TTSConfig, e as TTSProvider, V as VADConfig, g as VoiceFrame, k as VoiceKitErrorContext, W as WordTimestamp, l as createCallMemory, m as createSTT, n as createTTS } from './index-D3KfRXMP.js';
2
+ export { AgentError, AgentHandoffError, CallingHoursError, ComplianceError, ConsentMissingError, DNCBlockedError, InngestError, STTConnectionError, STTError, STTLanguageNotSupportedError, STTStreamError, TTSConnectionError, TTSError, TTSStreamError, TTSVoiceNotFoundError, TurnTransitionError } from './errors.js';
3
+ export { A as AudioTransportError, C as CallConnectionError, a as CallNotFoundError, T as TelephonyError, V as VoiceKitError } from './telephony.errors-C0-nScrF.js';
3
4
  import 'ai';
package/dist/memory.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as CallMemoryConfig, a as CallMemory } from './index-CkTG6DOa.cjs';
1
+ import { C as CallMemoryConfig, a as CallMemory } from './index-D3KfRXMP.cjs';
2
2
  import 'ai';
3
3
 
4
4
  /**
package/dist/memory.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as CallMemoryConfig, a as CallMemory } from './index-CkTG6DOa.js';
1
+ import { C as CallMemoryConfig, a as CallMemory } from './index-D3KfRXMP.js';
2
2
  import 'ai';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { d as CallMetricsSummary } from './index-CkTG6DOa.cjs';
1
+ import { d as CallMetricsSummary } from './index-D3KfRXMP.cjs';
2
2
  import 'ai';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { d as CallMetricsSummary } from './index-CkTG6DOa.js';
1
+ import { d as CallMetricsSummary } from './index-D3KfRXMP.js';
2
2
  import 'ai';
3
3
 
4
4
  /**
package/dist/stt.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { S as STTProvider, g as STTConfig, h as STTResult } from './index-CkTG6DOa.cjs';
1
+ import { S as STTProvider, h as STTConfig, i as STTResult } from './index-D3KfRXMP.cjs';
2
2
  import { EventEmitter } from 'node:events';
3
3
  import 'ai';
4
4
 
package/dist/stt.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { S as STTProvider, g as STTConfig, h as STTResult } from './index-CkTG6DOa.js';
1
+ import { S as STTProvider, h as STTConfig, i as STTResult } from './index-D3KfRXMP.js';
2
2
  import { EventEmitter } from 'node:events';
3
3
  import 'ai';
4
4
 
@@ -0,0 +1,80 @@
1
+ import { E as ErrorSeverity } from './index-D3KfRXMP.cjs';
2
+
3
+ /**
4
+ * @voice-kit/core — Typed error hierarchy
5
+ *
6
+ * All VoiceKit errors extend VoiceKitError. Never throw raw Error.
7
+ * Every error carries: code, message, provider, callId, retryable, severity.
8
+ */
9
+
10
+ /**
11
+ * Base class for all VoiceKit errors. Provides structured context for
12
+ * logging, alerting, and programmatic error handling.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * try {
17
+ * await stt.transcribeBatch(audio)
18
+ * } catch (err) {
19
+ * if (err instanceof STTError) {
20
+ * console.error(err.code, err.provider, err.retryable)
21
+ * }
22
+ * }
23
+ * ```
24
+ */
25
+ declare class VoiceKitError extends Error {
26
+ readonly code: string;
27
+ readonly callId?: string;
28
+ readonly provider?: string;
29
+ readonly retryable: boolean;
30
+ readonly severity: ErrorSeverity;
31
+ readonly cause?: unknown;
32
+ constructor(params: {
33
+ code: string;
34
+ message: string;
35
+ callId?: string;
36
+ provider?: string;
37
+ retryable?: boolean;
38
+ severity?: ErrorSeverity;
39
+ cause?: unknown;
40
+ });
41
+ toJSON(): {
42
+ name: string;
43
+ code: string;
44
+ message: string;
45
+ callId: string | undefined;
46
+ provider: string | undefined;
47
+ retryable: boolean;
48
+ severity: ErrorSeverity;
49
+ };
50
+ }
51
+
52
+ /**
53
+ * Errors from telephony providers.
54
+ */
55
+ declare class TelephonyError extends VoiceKitError {
56
+ readonly to?: string;
57
+ readonly from?: string;
58
+ constructor(params: {
59
+ code: string;
60
+ message: string;
61
+ callId?: string;
62
+ provider?: string;
63
+ retryable?: boolean;
64
+ severity?: ErrorSeverity;
65
+ cause?: unknown;
66
+ to?: string;
67
+ from?: string;
68
+ });
69
+ }
70
+ declare class CallConnectionError extends TelephonyError {
71
+ constructor(provider: string, to: string, cause?: unknown);
72
+ }
73
+ declare class CallNotFoundError extends TelephonyError {
74
+ constructor(callId: string, provider: string);
75
+ }
76
+ declare class AudioTransportError extends TelephonyError {
77
+ constructor(provider: string, cause?: unknown, callId?: string);
78
+ }
79
+
80
+ export { AudioTransportError as A, CallConnectionError as C, TelephonyError as T, VoiceKitError as V, CallNotFoundError as a };
@@ -0,0 +1,80 @@
1
+ import { E as ErrorSeverity } from './index-D3KfRXMP.js';
2
+
3
+ /**
4
+ * @voice-kit/core — Typed error hierarchy
5
+ *
6
+ * All VoiceKit errors extend VoiceKitError. Never throw raw Error.
7
+ * Every error carries: code, message, provider, callId, retryable, severity.
8
+ */
9
+
10
+ /**
11
+ * Base class for all VoiceKit errors. Provides structured context for
12
+ * logging, alerting, and programmatic error handling.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * try {
17
+ * await stt.transcribeBatch(audio)
18
+ * } catch (err) {
19
+ * if (err instanceof STTError) {
20
+ * console.error(err.code, err.provider, err.retryable)
21
+ * }
22
+ * }
23
+ * ```
24
+ */
25
+ declare class VoiceKitError extends Error {
26
+ readonly code: string;
27
+ readonly callId?: string;
28
+ readonly provider?: string;
29
+ readonly retryable: boolean;
30
+ readonly severity: ErrorSeverity;
31
+ readonly cause?: unknown;
32
+ constructor(params: {
33
+ code: string;
34
+ message: string;
35
+ callId?: string;
36
+ provider?: string;
37
+ retryable?: boolean;
38
+ severity?: ErrorSeverity;
39
+ cause?: unknown;
40
+ });
41
+ toJSON(): {
42
+ name: string;
43
+ code: string;
44
+ message: string;
45
+ callId: string | undefined;
46
+ provider: string | undefined;
47
+ retryable: boolean;
48
+ severity: ErrorSeverity;
49
+ };
50
+ }
51
+
52
+ /**
53
+ * Errors from telephony providers.
54
+ */
55
+ declare class TelephonyError extends VoiceKitError {
56
+ readonly to?: string;
57
+ readonly from?: string;
58
+ constructor(params: {
59
+ code: string;
60
+ message: string;
61
+ callId?: string;
62
+ provider?: string;
63
+ retryable?: boolean;
64
+ severity?: ErrorSeverity;
65
+ cause?: unknown;
66
+ to?: string;
67
+ from?: string;
68
+ });
69
+ }
70
+ declare class CallConnectionError extends TelephonyError {
71
+ constructor(provider: string, to: string, cause?: unknown);
72
+ }
73
+ declare class CallNotFoundError extends TelephonyError {
74
+ constructor(callId: string, provider: string);
75
+ }
76
+ declare class AudioTransportError extends TelephonyError {
77
+ constructor(provider: string, cause?: unknown, callId?: string);
78
+ }
79
+
80
+ export { AudioTransportError as A, CallConnectionError as C, TelephonyError as T, VoiceKitError as V, CallNotFoundError as a };
package/dist/tts.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { e as TTSProvider, f as TTSConfig } from './index-CkTG6DOa.cjs';
1
+ import { e as TTSProvider, f as TTSConfig } from './index-D3KfRXMP.cjs';
2
2
  import 'ai';
3
3
 
4
4
  /**
package/dist/tts.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { e as TTSProvider, f as TTSConfig } from './index-CkTG6DOa.js';
1
+ import { e as TTSProvider, f as TTSConfig } from './index-D3KfRXMP.js';
2
2
  import 'ai';
3
3
 
4
4
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voice-kit/core",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Core STT, TTS, audio, codecs, VAD, transports for @voice-kit",
5
5
  "type": "module",
6
6
  "author": {
@@ -17,6 +17,11 @@
17
17
  "import": "./dist/index.js",
18
18
  "require": "./dist/index.cjs"
19
19
  },
20
+ "./audio": {
21
+ "types": "./dist/audio/index.d.ts",
22
+ "import": "./dist/audio/index.js",
23
+ "require": "./dist/audio/index.cjs"
24
+ },
20
25
  "./compliance": {
21
26
  "types": "./dist/compliance/index.d.ts",
22
27
  "import": "./dist/compliance/index.js",