Skip to content

Commit 33163d4

Browse files
authored
refactor(plugins): localize private declarations (#101406)
1 parent 554d772 commit 33163d4

9 files changed

Lines changed: 13 additions & 13 deletions

File tree

extensions/amazon-bedrock/aws-credential-refresh.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function hasStaticAwsCredentialEnv(env: NodeJS.ProcessEnv): boolean {
1111
}
1212

1313
/** Return whether Bedrock should refresh the AWS shared config cache before discovery. */
14-
export function shouldRefreshAwsSharedConfigCacheForBedrock(env: NodeJS.ProcessEnv): boolean {
14+
function shouldRefreshAwsSharedConfigCacheForBedrock(env: NodeJS.ProcessEnv): boolean {
1515
if (env.AWS_BEDROCK_SKIP_AUTH === "1" || env.AWS_BEARER_TOKEN_BEDROCK) {
1616
return false;
1717
}

extensions/amazon-bedrock/bedrock-options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import type { ModelThinkingLevel, StreamOptions, ThinkingBudgets } from "openclaw/plugin-sdk/llm";
66

77
/** How Bedrock thinking output should be displayed to users. */
8-
export type BedrockThinkingDisplay = "summarized" | "omitted";
8+
type BedrockThinkingDisplay = "summarized" | "omitted";
99

1010
/** Extra Bedrock-specific stream options accepted by the provider runtime. */
1111
export interface BedrockOptions extends StreamOptions {

extensions/amazon-bedrock/thinking-policy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function isOpus46BedrockModelRef(modelRef: string): boolean {
3434
}
3535

3636
/** Return whether a Bedrock model ref names Claude Opus 4.7. */
37-
export function isOpus47BedrockModelRef(modelRef: string): boolean {
37+
function isOpus47BedrockModelRef(modelRef: string): boolean {
3838
return /(?:^|[/.:])(?:(?:us|eu|ap|apac|au|jp|global)\.)?(?:anthropic\.)?claude-opus-4[.-]7(?:$|[-.:/])/i.test(
3939
modelRef,
4040
);

extensions/anthropic/claude-model-refs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const DEFAULT_CLAUDE_MODEL_BY_FAMILY: Record<string, string> = {
1212
};
1313

1414
/** Normalized Claude CLI selection plus runtime refs used by setup migrations. */
15-
export type ClaudeCliAnthropicModelRefs = {
15+
type ClaudeCliAnthropicModelRefs = {
1616
selectedRef: string;
1717
runtimeRefs: string[];
1818
rewriteRef?: string;

extensions/anthropic/cli-shared.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ export function normalizeClaudeSettingSourcesArgs(args?: string[]): string[] | u
206206
}
207207

208208
/** Map OpenClaw thinking levels to Claude CLI effort flags for a model id. */
209-
export function mapClaudeCliThinkingLevelToEffort(
209+
function mapClaudeCliThinkingLevelToEffort(
210210
thinkingLevel?: string | null,
211211
): ClaudeCliEffort | undefined {
212212
switch (normalizeOptionalLowercaseString(thinkingLevel)) {

extensions/bonjour/src/advertiser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ const childProcessModule = nodeRequire("node:child_process") as {
1818
};
1919

2020
/** Running Bonjour advertiser handle. */
21-
export type GatewayBonjourAdvertiser = {
21+
type GatewayBonjourAdvertiser = {
2222
stop: () => Promise<void>;
2323
};
2424

2525
/** Input data used to publish OpenClaw gateway Bonjour records. */
26-
export type GatewayBonjourAdvertiseOpts = {
26+
type GatewayBonjourAdvertiseOpts = {
2727
instanceName?: string;
2828
gatewayPort: number;
2929
sshPort?: number;

extensions/device-pair/notify-state.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export function normalizeLegacyNotifyState(raw: unknown): LegacyNotifyStateFile
8181
return { subscribers, notifiedRequestIds };
8282
}
8383

84-
export function normalizeNotifyThreadKey(messageThreadId?: string | number): string {
84+
function normalizeNotifyThreadKey(messageThreadId?: string | number): string {
8585
if (typeof messageThreadId === "number" && Number.isFinite(messageThreadId)) {
8686
return String(Math.trunc(messageThreadId));
8787
}

extensions/device-pair/pairing-qr-channel-data.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Private device-pair -> Gateway live-display envelope.
22
// Keep this local so pairing QR metadata does not become public Plugin SDK API.
3-
export const DEVICE_PAIR_PAIRING_QR_CHANNEL_DATA_KEY = "openclawPairingQr";
3+
const DEVICE_PAIR_PAIRING_QR_CHANNEL_DATA_KEY = "openclawPairingQr";
44

5-
export type DevicePairPairingQrChannelData = {
5+
type DevicePairPairingQrChannelData = {
66
setupCode: string;
77
expiresAtMs: number;
88
};

extensions/llama-cpp/src/embedding-provider.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ type LlamaCppLocalOptions = {
2323
contextSize?: number | "auto";
2424
};
2525

26-
export type LlamaCppEmbeddingProviderRuntimeOptions = {
26+
type LlamaCppEmbeddingProviderRuntimeOptions = {
2727
nodeLlamaCppImportUrl?: string;
2828
};
2929

30-
export const LLAMA_CPP_EMBEDDING_PROVIDER_ID = "local";
30+
const LLAMA_CPP_EMBEDDING_PROVIDER_ID = "local";
3131
export const DEFAULT_LLAMA_CPP_EMBEDDING_MODEL =
3232
"hf:ggml-org/embeddinggemma-300m-qat-q8_0-GGUF/embeddinggemma-300m-qat-Q8_0.gguf";
3333
const DEFAULT_LLAMA_CPP_EMBEDDING_MODEL_CACHE_FILE_NAME =
@@ -155,7 +155,7 @@ export function formatLlamaCppSetupError(err: unknown): string {
155155

156156
const requireFromPlugin = createRequire(import.meta.url);
157157

158-
export function resolveNodeLlamaCppImportUrl(): string {
158+
function resolveNodeLlamaCppImportUrl(): string {
159159
return pathToFileURL(requireFromPlugin.resolve("node-llama-cpp")).href;
160160
}
161161

0 commit comments

Comments
 (0)