Skip to content

Commit 1b6f3e4

Browse files
authored
refactor(deadcode): trim private helper exports (#101886)
1 parent 91a0ebb commit 1b6f3e4

10 files changed

Lines changed: 12 additions & 23 deletions

File tree

‎extensions/qa-matrix/src/runners/contract/scenario-runtime-shared.ts‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -198,14 +198,6 @@ export function buildMatrixReplyArtifact(
198198
};
199199
}
200200

201-
export function buildMatrixNoticeArtifact(event: MatrixQaObservedEvent) {
202-
return {
203-
bodyPreview: event.body?.trim().slice(0, 200),
204-
eventId: event.eventId,
205-
sender: event.sender,
206-
};
207-
}
208-
209201
export function buildMatrixReplyDetails(label: string, artifact: MatrixQaReplyArtifact) {
210202
return [
211203
`${label} event: ${artifact.eventId}`,

‎extensions/telegram/src/bot.create-telegram-bot.test-harness.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ const DEFAULT_TELEGRAM_TEST_CONFIG: OpenClawConfig = {
511511
},
512512
};
513513

514-
export function makeTelegramMessageCtx(params: {
514+
function makeTelegramMessageCtx(params: {
515515
chat: {
516516
id: number;
517517
type: string;

‎extensions/voice-call/src/manager.test-harness.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export function createTestStorePath(): string {
8282
return fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-voice-call-test-"));
8383
}
8484

85-
export function createVoiceCallStateRuntimeForTests(): VoiceCallStateRuntime["state"] {
85+
function createVoiceCallStateRuntimeForTests(): VoiceCallStateRuntime["state"] {
8686
return {
8787
resolveStateDir: () => "",
8888
openKeyedStore: (() => {

‎packages/ai/src/providers/google-shared.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ type ClampedGoogleThinkingLevel = Exclude<AgentThinkingLevel, "xhigh" | "max">;
8686
*
8787
* See: https://ai.google.dev/gemini-api/docs/thought-signatures
8888
*/
89-
export function isThinkingPart(part: Pick<Part, "thought" | "thoughtSignature">): boolean {
89+
function isThinkingPart(part: Pick<Part, "thought" | "thoughtSignature">): boolean {
9090
return part.thought === true;
9191
}
9292

@@ -615,11 +615,11 @@ export function isGemma4Model<T extends GoogleApiType>(model: Model<T>): boolean
615615
return /gemma-?4/.test(model.id.toLowerCase());
616616
}
617617

618-
export function isGemini3ProModel<T extends GoogleApiType>(model: Model<T>): boolean {
618+
function isGemini3ProModel<T extends GoogleApiType>(model: Model<T>): boolean {
619619
return /gemini-3(?:\.\d+)?-pro/.test(model.id.toLowerCase());
620620
}
621621

622-
export function isGemini3FlashModel<T extends GoogleApiType>(model: Model<T>): boolean {
622+
function isGemini3FlashModel<T extends GoogleApiType>(model: Model<T>): boolean {
623623
return /gemini-3(?:\.\d+)?-flash/.test(model.id.toLowerCase());
624624
}
625625

‎src/channels/plugins/contracts/test-helpers/runtime-artifacts.ts‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@ function resolveBundledChannelWorkspaceArtifactPath(
3535
return null;
3636
}
3737

38-
export function resolveBundledChannelContractArtifactUrl(
39-
pluginId: string,
40-
entryBaseName: string,
41-
): string {
38+
function resolveBundledChannelContractArtifactUrl(pluginId: string, entryBaseName: string): string {
4239
const normalizedEntryBaseName = entryBaseName.replace(/\.(?:[cm]?js|ts)$/u, "");
4340
const record = resolvePluginRuntimeRecord(pluginId, () => {
4441
throw new Error(`missing bundled channel plugin '${pluginId}'`);

‎src/config/paths.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ export let STATE_DIR = resolveStateDir();
149149
* Can be overridden via OPENCLAW_CONFIG_PATH.
150150
* Default: ~/.openclaw/openclaw.json (or $OPENCLAW_STATE_DIR/openclaw.json)
151151
*/
152-
export function resolveCanonicalConfigPath(
152+
function resolveCanonicalConfigPath(
153153
env: NodeJS.ProcessEnv = process.env,
154154
stateDir: string = resolveStateDir(env, envHomedir(env)),
155155
): string {

‎src/config/recovery-policy.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function isPluginPolicyIssue(issue: ConfigValidationIssue): boolean {
2727
}
2828

2929
/** Return true for plugin validation issues caused by missing compiled runtime output. */
30-
export function isPluginPackagingRuntimeOutputIssue(issue: ConfigValidationIssue): boolean {
30+
function isPluginPackagingRuntimeOutputIssue(issue: ConfigValidationIssue): boolean {
3131
const path = issue.path.trim();
3232
const message = issue.message.trim().toLowerCase();
3333
return isPluginsPath(path) && message.includes(COMPILED_RUNTIME_OUTPUT_DIAGNOSTIC);

‎src/config/sessions/lifecycle.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ function readFirstLine(filePath: string): string | undefined {
121121
}
122122

123123
/** Reads session start time from a transcript header when store metadata is missing. */
124-
export function readSessionHeaderStartedAtMs(params: {
124+
function readSessionHeaderStartedAtMs(params: {
125125
entry: SessionLifecycleEntry | undefined;
126126
agentId?: string;
127127
storePath?: string;

‎src/config/sessions/metadata.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ const mergeOrigin = (
8686
};
8787

8888
/** Derives session origin metadata from an inbound message context. */
89-
export function deriveSessionOrigin(
89+
function deriveSessionOrigin(
9090
ctx: MsgContext,
9191
opts?: { skipSystemEventOrigin?: boolean },
9292
): SessionOrigin | undefined {
@@ -152,7 +152,7 @@ export function snapshotSessionOrigin(entry?: SessionEntry): SessionOrigin | und
152152
return { ...entry.origin };
153153
}
154154

155-
export function deriveGroupSessionPatch(params: {
155+
function deriveGroupSessionPatch(params: {
156156
ctx: MsgContext;
157157
sessionKey: string;
158158
existing?: SessionEntry;

‎src/logging/test-helpers/diagnostic-log-capture.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
type CapturedDiagnosticLogRecord = Extract<DiagnosticEventPayload, { type: "log.record" }>;
1010

1111
/** Flushes asynchronous diagnostic log record delivery. */
12-
export async function flushDiagnosticLogRecords(): Promise<void> {
12+
async function flushDiagnosticLogRecords(): Promise<void> {
1313
// The dispatcher drains 100 records per turn. A busy shared test process can
1414
// have several batches ahead of the log under test, so wait for queued log
1515
// records instead of assuming a fixed small number of turns.

0 commit comments

Comments
 (0)