Skip to content

Commit c46e76c

Browse files
authored
refactor(voice-call): localize internal declarations (#102059)
1 parent 19f7b72 commit c46e76c

10 files changed

Lines changed: 12 additions & 12 deletions

File tree

extensions/voice-call/src/bounded-child-output.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
const DEFAULT_MAX_OUTPUT_CHARS = 16_384;
44

55
/** Captured child output plus truncation flag. */
6-
export type BoundedChildOutput = {
6+
type BoundedChildOutput = {
77
text: string;
88
truncated: boolean;
99
};

extensions/voice-call/src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ export const VoiceCallConfigSchema = z
506506
.strict();
507507

508508
export type VoiceCallConfig = z.infer<typeof VoiceCallConfigSchema>;
509-
export type VoiceCallEffectiveConfigResult = {
509+
type VoiceCallEffectiveConfigResult = {
510510
config: VoiceCallConfig;
511511
numberRouteKey?: string;
512512
};

extensions/voice-call/src/manager/store.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ type CallRecordEventChunk = {
3838
};
3939

4040
/** Call record plus stable ordering metadata read from persistence. */
41-
export type PersistedCallRecord = {
41+
type PersistedCallRecord = {
4242
call: CallRecord;
4343
persistedAt: number;
4444
sequence: number;

extensions/voice-call/src/providers/plivo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import { reconstructWebhookUrl, verifyPlivoWebhook } from "../webhook-security.j
2626
import type { VoiceCallProvider } from "./base.js";
2727
import { guardedJsonApiRequest } from "./shared/guarded-json-api.js";
2828

29-
export interface PlivoProviderOptions {
29+
interface PlivoProviderOptions {
3030
/** Override public URL origin for signature verification */
3131
publicUrl?: string;
3232
/** Skip webhook signature verification (development only) */

extensions/voice-call/src/providers/telnyx.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import { guardedJsonApiRequest } from "./shared/guarded-json-api.js";
2828
* Uses Telnyx Call Control API v2 for managing calls.
2929
* @see https://developers.telnyx.com/docs/api/v2/call-control
3030
*/
31-
export interface TelnyxProviderOptions {
31+
interface TelnyxProviderOptions {
3232
/** Skip webhook signature verification (development only, NOT for production) */
3333
skipVerification?: boolean;
3434
}

extensions/voice-call/src/response-generator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import type { CoreAgentDeps, CoreConfig } from "./core-bridge.js";
1515
import { resolveCallAgentId } from "./resolve-call-agent-id.js";
1616
import { resolveVoiceResponseModel } from "./response-model.js";
1717

18-
export type VoiceResponseParams = {
18+
type VoiceResponseParams = {
1919
/** Voice call config */
2020
voiceConfig: VoiceCallConfig;
2121
/** Core OpenClaw config */
@@ -38,7 +38,7 @@ export type VoiceResponseParams = {
3838
onEarlyText?: (text: string) => Promise<boolean>;
3939
};
4040

41-
export type VoiceResponseResult = {
41+
type VoiceResponseResult = {
4242
text: string | null;
4343
/** Whether the complete response was handed to the transport before compaction. */
4444
deliveredEarly: boolean;

extensions/voice-call/src/webhook-replay.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const REPLAY_WINDOW_MS = 10 * 60 * 1000;
88
const REPLAY_CACHE_MAX_ENTRIES = 10_000;
99
const REPLAY_CACHE_PRUNE_INTERVAL = 64;
1010

11-
export type WebhookReplayCache = {
11+
type WebhookReplayCache = {
1212
seenUntil: Map<string, number>;
1313
calls: number;
1414
};

extensions/voice-call/src/webhook/realtime-audio-pacer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ type RealtimeAudioQueueItem =
2727
};
2828

2929
/** WebSocket send callback for realtime audio frames. */
30-
export type RealtimeAudioSend = (message: string) => boolean;
30+
type RealtimeAudioSend = (message: string) => boolean;
3131

3232
/** Provider-specific serializer for media, clear, and mark frames. */
3333
export interface RealtimeAudioSerializer {

extensions/voice-call/src/webhook/realtime-handler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import {
4545
export type ToolHandlerContext = {
4646
partialUserTranscript?: string;
4747
};
48-
export type ToolHandlerFn = (
48+
type ToolHandlerFn = (
4949
args: unknown,
5050
callId: string,
5151
context: ToolHandlerContext,
@@ -243,7 +243,7 @@ type PendingStreamToken = {
243243
callId?: string;
244244
};
245245

246-
export type StreamSessionRequest = {
246+
type StreamSessionRequest = {
247247
providerName?: "twilio" | "telnyx";
248248
callId?: string;
249249
from?: string;

extensions/voice-call/src/webhook/stream-frame-adapter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Provider-specific media stream frame parsing and serialization.
22

33
/** Normalized inbound media stream frame. */
4-
export type StreamFrame =
4+
type StreamFrame =
55
| { kind: "start"; streamId: string; providerCallId: string }
66
| {
77
kind: "media";

0 commit comments

Comments
 (0)