From 2e8e9cd6ca188d6b8f09b02e83eb775ef782a5fa Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Fri, 1 May 2026 21:29:41 +0100 Subject: [PATCH] refactor: trim agent helper shape exports --- src/agents/embedded-pi-lsp.ts | 2 +- src/agents/embedded-pi-mcp.ts | 2 +- src/agents/exec-approval-result.ts | 2 +- src/agents/fast-mode.ts | 2 +- src/agents/queued-file-writer.ts | 2 +- src/agents/run-cleanup-timeout.ts | 2 +- src/agents/tool-call-id.ts | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/agents/embedded-pi-lsp.ts b/src/agents/embedded-pi-lsp.ts index 66405d940bd..fcdfb543f0f 100644 --- a/src/agents/embedded-pi-lsp.ts +++ b/src/agents/embedded-pi-lsp.ts @@ -2,7 +2,7 @@ import type { OpenClawConfig } from "../config/types.openclaw.js"; import type { BundleLspServerConfig } from "../plugins/bundle-lsp.js"; import { loadEnabledBundleLspConfig } from "../plugins/bundle-lsp.js"; -export type EmbeddedPiLspConfig = { +type EmbeddedPiLspConfig = { lspServers: Record; diagnostics: Array<{ pluginId: string; message: string }>; }; diff --git a/src/agents/embedded-pi-mcp.ts b/src/agents/embedded-pi-mcp.ts index 04d89a81add..9e34104a9b8 100644 --- a/src/agents/embedded-pi-mcp.ts +++ b/src/agents/embedded-pi-mcp.ts @@ -2,7 +2,7 @@ import type { OpenClawConfig } from "../config/types.openclaw.js"; import type { BundleMcpDiagnostic, BundleMcpServerConfig } from "../plugins/bundle-mcp.js"; import { loadMergedBundleMcpConfig } from "./bundle-mcp-config.js"; -export type EmbeddedPiMcpConfig = { +type EmbeddedPiMcpConfig = { mcpServers: Record; diagnostics: BundleMcpDiagnostic[]; }; diff --git a/src/agents/exec-approval-result.ts b/src/agents/exec-approval-result.ts index 140c586ac8e..d5364e5b403 100644 --- a/src/agents/exec-approval-result.ts +++ b/src/agents/exec-approval-result.ts @@ -1,6 +1,6 @@ import { normalizeLowercaseStringOrEmpty } from "../shared/string-coerce.js"; -export type ExecApprovalResult = +type ExecApprovalResult = | { kind: "denied"; raw: string; diff --git a/src/agents/fast-mode.ts b/src/agents/fast-mode.ts index b9b09220749..fdd52a6b2e0 100644 --- a/src/agents/fast-mode.ts +++ b/src/agents/fast-mode.ts @@ -4,7 +4,7 @@ import type { OpenClawConfig } from "../config/types.openclaw.js"; import { resolveAgentConfig } from "./agent-scope.js"; import { modelKey } from "./model-ref-shared.js"; -export type FastModeState = { +type FastModeState = { enabled: boolean; source: "session" | "agent" | "config" | "default"; }; diff --git a/src/agents/queued-file-writer.ts b/src/agents/queued-file-writer.ts index 6823d80e150..f6e8616c077 100644 --- a/src/agents/queued-file-writer.ts +++ b/src/agents/queued-file-writer.ts @@ -8,7 +8,7 @@ export type QueuedFileWriter = { flush: () => Promise; }; -export type QueuedFileWriterOptions = { +type QueuedFileWriterOptions = { maxFileBytes?: number; }; diff --git a/src/agents/run-cleanup-timeout.ts b/src/agents/run-cleanup-timeout.ts index 37b4797b0a5..1f4f27e01bb 100644 --- a/src/agents/run-cleanup-timeout.ts +++ b/src/agents/run-cleanup-timeout.ts @@ -2,7 +2,7 @@ import { formatErrorMessage } from "../infra/errors.js"; export const AGENT_CLEANUP_STEP_TIMEOUT_MS = 10_000; -export type AgentCleanupLogger = { +type AgentCleanupLogger = { warn: (message: string) => void; }; diff --git a/src/agents/tool-call-id.ts b/src/agents/tool-call-id.ts index 6cfb1236b70..0cfd38e4e8d 100644 --- a/src/agents/tool-call-id.ts +++ b/src/agents/tool-call-id.ts @@ -13,7 +13,7 @@ const NATIVE_KIMI_TOOL_CALL_ID_RE = /^functions\.[A-Za-z0-9_-]+:\d+$/; const STRICT9_LEN = 9; const TOOL_CALL_TYPES = new Set(["toolCall", "toolUse", "functionCall"]); -export type ToolCallLike = { +type ToolCallLike = { id: string; name?: string; };