diff --git a/src/agents/agent-auth-credentials.ts b/src/agents/agent-auth-credentials.ts index 28f6999689a6..8e363d9a7aa5 100644 --- a/src/agents/agent-auth-credentials.ts +++ b/src/agents/agent-auth-credentials.ts @@ -17,10 +17,10 @@ type AgentOAuthCredential = { }; /** Credential value shape consumed by agent runtimes after auth-profile normalization. */ -export type AgentCredential = AgentApiKeyCredential | AgentOAuthCredential; +type AgentCredential = AgentApiKeyCredential | AgentOAuthCredential; export type AgentCredentialMap = Record; -export type ResolveAgentCredentialMapOptions = { +type ResolveAgentCredentialMapOptions = { includeSecretRefPlaceholders?: boolean; }; diff --git a/src/agents/bash-process-registry.ts b/src/agents/bash-process-registry.ts index de136e541ef5..3cf6d91ff4cf 100644 --- a/src/agents/bash-process-registry.ts +++ b/src/agents/bash-process-registry.ts @@ -25,10 +25,10 @@ function clampTtl(value: number | undefined) { let jobTtlMs = clampTtl(readEnvInt("OPENCLAW_BASH_JOB_TTL_MS", "PI_BASH_JOB_TTL_MS")); /** Lifecycle status recorded for background process sessions. */ -export type ProcessStatus = "running" | "completed" | "failed" | "killed"; +type ProcessStatus = "running" | "completed" | "failed" | "killed"; /** Writable stdin surface shared by child-process and PTY-backed sessions. */ -export type SessionStdin = { +type SessionStdin = { write: (data: string, cb?: (err?: Error | null) => void) => void; end: () => void; // When backed by a real Node stream (child.stdin), this exists; for PTY wrappers it may not. @@ -87,7 +87,7 @@ export interface ProcessSession { } /** Retained summary for a completed background session. */ -export interface FinishedSession { +interface FinishedSession { id: string; command: string; scopeKey?: string; @@ -306,7 +306,7 @@ function capPendingBuffer(buffer: string[], pendingCharsInput: number, cap: numb } /** Keeps only the last `max` characters for bounded aggregate output storage. */ -export function trimWithCap(text: string, max: number) { +function trimWithCap(text: string, max: number) { if (text.length <= max) { return text; } diff --git a/src/agents/config.ts b/src/agents/config.ts index 7459b6c466cf..6b3c4cb7bc02 100644 --- a/src/agents/config.ts +++ b/src/agents/config.ts @@ -34,7 +34,7 @@ export const isBunBinary = * - For Node.js (dist/): returns currentDir (the dist/ directory) * - For tsx (src/): returns parent directory (the package root) */ -export function getPackageDir(): string { +function getPackageDir(): string { // Allow override via environment variable (useful for Nix/Guix where store paths tokenize poorly) const envDir = process.env.OPENCLAW_PACKAGE_DIR; if (envDir) { @@ -83,7 +83,7 @@ export function getThemesDir(): string { } /** Get path to package.json */ -export function getPackageJsonPath(): string { +function getPackageJsonPath(): string { return join(getPackageDir(), "package.json"); } @@ -122,9 +122,9 @@ export const APP_NAME: string = openClawConfigName || "openclaw"; export const CONFIG_DIR_NAME: string = pkg.openclawConfig?.configDir || ".openclaw"; export const VERSION: string = pkg.version || "0.0.0"; -export const ENV_AGENT_DIR = `${APP_NAME.toUpperCase()}_AGENT_DIR`; +const ENV_AGENT_DIR = `${APP_NAME.toUpperCase()}_AGENT_DIR`; -export function expandTildePath(path: string): string { +function expandTildePath(path: string): string { if (path === "~") { return homedir(); }