refactor: trim unused testing exports

This commit is contained in:
Peter Steinberger
2026-05-01 10:46:42 +01:00
parent 14ba8dc3f7
commit 4ed6a7c6b8
9 changed files with 1 additions and 77 deletions

View File

@@ -352,9 +352,3 @@ function enqueueBoundTurn<T>(key: string, run: () => Promise<T>): Promise<T> {
});
return next;
}
export const __testing = {
resetQueues() {
getGlobalState().queues.clear();
},
};

View File

@@ -253,9 +253,3 @@ function permissionsForMode(mode: PermissionsMode): {
? { approvalPolicy: "never", sandbox: "danger-full-access" }
: { approvalPolicy: "on-request", sandbox: "workspace-write" };
}
export const __testing = {
resetActiveTurns() {
getActiveTurns().clear();
},
};

View File

@@ -468,10 +468,3 @@ export function summarizeConceptTagScriptCoverage(
return coverage;
}
export const __testing = {
normalizeConceptToken,
collectGlossaryMatches,
collectCompoundTokens,
collectSegmentTokens,
};

View File

@@ -95,15 +95,6 @@ export interface TwitchChatMessage {
chatType?: "group";
}
/**
* Send result from Twitch client
*/
export interface SendResult {
ok: boolean;
error?: string;
messageId?: string;
}
// Re-export core types for convenience
export type {
ChannelAccountSnapshot,

View File

@@ -1,7 +1,4 @@
import {
REALTIME_VOICE_AGENT_CONSULT_TOOL_POLICIES,
type RealtimeVoiceAgentConsultToolPolicy,
} from "openclaw/plugin-sdk/realtime-voice";
import { REALTIME_VOICE_AGENT_CONSULT_TOOL_POLICIES } from "openclaw/plugin-sdk/realtime-voice";
import {
buildSecretInputSchema,
hasConfiguredSecretInput,
@@ -110,7 +107,6 @@ export const VoiceCallTailscaleConfigSchema = z
})
.strict()
.default({ mode: "off", path: "/voice/webhook" });
export type VoiceCallTailscaleConfig = z.infer<typeof VoiceCallTailscaleConfigSchema>;
// -----------------------------------------------------------------------------
// Tunnel Configuration (unified ngrok/tailscale)
@@ -141,7 +137,6 @@ export const VoiceCallTunnelConfigSchema = z
})
.strict()
.default({ provider: "none", allowNgrokFreeTierLoopbackBypass: false });
export type VoiceCallTunnelConfig = z.infer<typeof VoiceCallTunnelConfigSchema>;
// -----------------------------------------------------------------------------
// Webhook Security Configuration
@@ -190,7 +185,6 @@ export const OutboundConfigSchema = z
})
.strict()
.default({ defaultMode: "notify", notifyHangupDelaySec: 3 });
export type OutboundConfig = z.infer<typeof OutboundConfigSchema>;
// -----------------------------------------------------------------------------
// Realtime Voice Configuration
@@ -213,17 +207,10 @@ export type RealtimeToolConfig = z.infer<typeof RealtimeToolSchema>;
export const VoiceCallRealtimeProvidersConfigSchema = z
.record(z.string(), z.record(z.string(), z.unknown()))
.default({});
export type VoiceCallRealtimeProvidersConfig = z.infer<
typeof VoiceCallRealtimeProvidersConfigSchema
>;
export const VoiceCallRealtimeToolPolicySchema = z.enum(REALTIME_VOICE_AGENT_CONSULT_TOOL_POLICIES);
export type VoiceCallRealtimeToolPolicy = RealtimeVoiceAgentConsultToolPolicy;
export const VoiceCallRealtimeFastContextSourceSchema = z.enum(["memory", "sessions"]);
export type VoiceCallRealtimeFastContextSource = z.infer<
typeof VoiceCallRealtimeFastContextSourceSchema
>;
export const VoiceCallRealtimeFastContextConfigSchema = z
.object({
@@ -256,9 +243,6 @@ export type VoiceCallRealtimeFastContextConfig = z.infer<
export const VoiceCallStreamingProvidersConfigSchema = z
.record(z.string(), z.record(z.string(), z.unknown()))
.default({});
export type VoiceCallStreamingProvidersConfig = z.infer<
typeof VoiceCallStreamingProvidersConfigSchema
>;
export const VoiceCallRealtimeConfigSchema = z
.object({
@@ -332,7 +316,6 @@ export const VoiceCallStreamingConfigSchema = z
maxPendingConnectionsPerIp: 4,
maxConnections: 128,
});
export type VoiceCallStreamingConfig = z.infer<typeof VoiceCallStreamingConfigSchema>;
// -----------------------------------------------------------------------------
// Main Voice Call Configuration

View File

@@ -135,7 +135,6 @@ export type NormalizedEvent = z.infer<typeof NormalizedEventSchema>;
// -----------------------------------------------------------------------------
export const CallDirectionSchema = z.enum(["outbound", "inbound"]);
export type CallDirection = z.infer<typeof CallDirectionSchema>;
// -----------------------------------------------------------------------------
// Call Record

View File

@@ -114,12 +114,3 @@ export async function requestXaiCodeExecution(params: {
},
);
}
export const __testing = {
buildXaiCodeExecutionPayload,
requestXaiCodeExecution,
resolveXaiCodeExecutionConfig,
resolveXaiCodeExecutionMaxTurns,
resolveXaiCodeExecutionModel,
XAI_DEFAULT_CODE_EXECUTION_MODEL,
} as const;

View File

@@ -93,13 +93,3 @@ export async function requestXaiWebSearch(params: {
},
);
}
export const __testing = {
buildXaiWebSearchPayload,
extractXaiWebSearchContent,
resolveXaiInlineCitations,
resolveXaiSearchConfig,
resolveXaiWebSearchModel,
requestXaiWebSearch,
XAI_DEFAULT_WEB_SEARCH_MODEL,
} as const;

View File

@@ -131,14 +131,3 @@ export async function requestXaiXSearch(params: {
},
);
}
export const __testing = {
buildXSearchTool,
buildXaiXSearchPayload,
requestXaiXSearch,
resolveXaiXSearchConfig,
resolveXaiXSearchInlineCitations,
resolveXaiXSearchMaxTurns,
resolveXaiXSearchModel,
XAI_DEFAULT_X_SEARCH_MODEL,
} as const;