mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 06:10:44 +00:00
refactor: hide acp auth internals
This commit is contained in:
@@ -47,7 +47,7 @@ export function requireReadySessionMeta(resolution: AcpSessionResolution): Sessi
|
||||
throw resolveAcpSessionResolutionError(resolution);
|
||||
}
|
||||
|
||||
export function normalizeSessionKey(sessionKey: string): string {
|
||||
function normalizeSessionKey(sessionKey: string): string {
|
||||
return sessionKey.trim();
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ export function validateRuntimeModelInput(rawModel: unknown): string {
|
||||
});
|
||||
}
|
||||
|
||||
export function validateRuntimeThinkingInput(rawThinking: unknown): string {
|
||||
function validateRuntimeThinkingInput(rawThinking: unknown): string {
|
||||
return validateBoundedText({
|
||||
value: rawThinking,
|
||||
field: "Thinking level",
|
||||
@@ -110,7 +110,7 @@ export function validateRuntimeCwdInput(rawCwd: unknown): string {
|
||||
return cwd;
|
||||
}
|
||||
|
||||
export function validateRuntimeTimeoutSecondsInput(rawTimeout: unknown): number {
|
||||
function validateRuntimeTimeoutSecondsInput(rawTimeout: unknown): number {
|
||||
if (typeof rawTimeout !== "number" || !Number.isFinite(rawTimeout)) {
|
||||
failInvalidOption("Timeout must be a positive integer in seconds.");
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ function warnRejectedCredentialEntries(source: string, rejected: RejectedCredent
|
||||
});
|
||||
}
|
||||
|
||||
export function coerceLegacyAuthStore(raw: unknown): LegacyAuthStore | null {
|
||||
function coerceLegacyAuthStore(raw: unknown): LegacyAuthStore | null {
|
||||
if (!raw || typeof raw !== "object") {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ function collectOAuthModeSecretRefViolations(params: {
|
||||
}
|
||||
}
|
||||
|
||||
export function collectOAuthSecretRefPolicyViolations(params: {
|
||||
function collectOAuthSecretRefPolicyViolations(params: {
|
||||
store: AuthProfileStore;
|
||||
cfg?: OpenClawConfig;
|
||||
profileIds?: Iterable<string>;
|
||||
|
||||
Reference in New Issue
Block a user