diff --git a/extensions/discord/src/actions/runtime.messaging.messages.ts b/extensions/discord/src/actions/runtime.messaging.messages.ts index db6480a41c5c..70cd607e4ef7 100644 --- a/extensions/discord/src/actions/runtime.messaging.messages.ts +++ b/extensions/discord/src/actions/runtime.messaging.messages.ts @@ -194,7 +194,6 @@ export async function handleDiscordMessageManagementAction(ctx: DiscordMessaging } const channelId = readStringParam(ctx.params, "channelId"); const channelIds = readStringArrayParam(ctx.params, "channelIds"); - // Resolve guildId from channel info when not explicitly provided. if (!guildId) { const rawInferChannelId = channelId ?? channelIds?.[0]; if (rawInferChannelId) { diff --git a/extensions/feishu/src/config-schema.ts b/extensions/feishu/src/config-schema.ts index 14be87f39a34..91e3baab6284 100644 --- a/extensions/feishu/src/config-schema.ts +++ b/extensions/feishu/src/config-schema.ts @@ -304,9 +304,7 @@ const FeishuConfigSchemaBase = z requireMention: z.boolean().optional(), groupSessionScope: GroupSessionScopeSchema, topicSessionMode: TopicSessionModeSchema, - // Dynamic agent creation for DM users dynamicAgentCreation: DynamicAgentCreationSchema, - // Optimization flags typingIndicator: z.boolean().optional().default(true), resolveSenderNames: z.boolean().optional().default(true), }) diff --git a/extensions/feishu/src/doc-schema.ts b/extensions/feishu/src/doc-schema.ts index 88a8e0a9cdc3..e811aee12123 100644 --- a/extensions/feishu/src/doc-schema.ts +++ b/extensions/feishu/src/doc-schema.ts @@ -71,7 +71,6 @@ export const FeishuDocSchema = Type.Union([ doc_token: Type.String({ description: "Document token" }), block_id: Type.String({ description: "Block ID" }), }), - // Table creation (explicit structure) Type.Object({ action: Type.Literal("create_table"), ...tableCreationProperties, @@ -93,7 +92,6 @@ export const FeishuDocSchema = Type.Union([ minItems: 1, }), }), - // Table row/column manipulation Type.Object({ action: Type.Literal("insert_table_row"), doc_token: Type.String({ description: "Document token" }), @@ -135,7 +133,6 @@ export const FeishuDocSchema = Type.Union([ column_start: Type.Number({ description: "Start column index" }), column_end: Type.Number({ description: "End column index (exclusive)" }), }), - // Image / file upload Type.Object({ action: Type.Literal("upload_image"), doc_token: Type.String({ description: "Document token" }), @@ -168,7 +165,6 @@ export const FeishuDocSchema = Type.Union([ ), filename: Type.Optional(Type.String({ description: "Optional filename override" })), }), - // Text color / style Type.Object({ action: Type.Literal("color_text"), doc_token: Type.String({ description: "Document token" }), diff --git a/extensions/feishu/src/docx-table-ops.ts b/extensions/feishu/src/docx-table-ops.ts index 1e6d11c74d30..e65478338574 100644 --- a/extensions/feishu/src/docx-table-ops.ts +++ b/extensions/feishu/src/docx-table-ops.ts @@ -30,7 +30,6 @@ function calculateAdaptiveColumnWidths( return []; } - // Use original total width from Convert API, or fall back to default const totalWidth = originalWidths && originalWidths.length > 0 ? originalWidths.reduce((a: number, b: number) => a + b, 0) diff --git a/extensions/feishu/src/drive.ts b/extensions/feishu/src/drive.ts index 2a265dcc3619..bd83895abcef 100644 --- a/extensions/feishu/src/drive.ts +++ b/extensions/feishu/src/drive.ts @@ -23,8 +23,6 @@ import { createFeishuToolClient } from "./tool-account.js"; import { registerFeishuTool } from "./tool-registration.js"; import { feishuExternalToolResult as jsonResult, unknownToolActionResult } from "./tool-result.js"; -// ============ Actions ============ - type FeishuExplorerRootFolderMetaResponse = { code: number; msg?: string; @@ -632,8 +630,6 @@ export async function deliverCommentThreadText( } } -// ============ Tool Registration ============ - export function registerFeishuDriveTools(api: OpenClawPluginApi) { registerFeishuTool(api, { family: "drive", diff --git a/extensions/feishu/src/perm.ts b/extensions/feishu/src/perm.ts index 94bccef99e23..28face76ed73 100644 --- a/extensions/feishu/src/perm.ts +++ b/extensions/feishu/src/perm.ts @@ -10,8 +10,6 @@ type ListTokenType = NonNullable< NonNullable[0]>["params"] >["type"]; -// ============ Actions ============ - async function listMembers(client: Lark.Client, token: string, type: string) { const res = await client.drive.permissionMember.list({ path: { token }, @@ -66,8 +64,6 @@ async function removeMember( }; } -// ============ Tool Registration ============ - export function registerFeishuPermTools(api: OpenClawPluginApi) { registerFeishuTool(api, { family: "perm", diff --git a/extensions/feishu/src/reactions.ts b/extensions/feishu/src/reactions.ts index 1cbb0a79ecf5..3cfaae1789a9 100644 --- a/extensions/feishu/src/reactions.ts +++ b/extensions/feishu/src/reactions.ts @@ -42,9 +42,6 @@ export async function addReactionFeishu(params: { return { reactionId }; } -/** - * Remove a reaction from a message. - */ export async function removeReactionFeishu(params: { cfg: ClawdbotConfig; messageId: string; @@ -64,9 +61,6 @@ export async function removeReactionFeishu(params: { assertFeishuApiSuccess(response, "Feishu remove reaction failed"); } -/** - * List all reactions for a message. - */ export async function listReactionsFeishu(params: { cfg: ClawdbotConfig; messageId: string; diff --git a/extensions/feishu/src/reply-dispatcher.ts b/extensions/feishu/src/reply-dispatcher.ts index d41092a19f01..7ad8a7a00c7d 100644 --- a/extensions/feishu/src/reply-dispatcher.ts +++ b/extensions/feishu/src/reply-dispatcher.ts @@ -115,7 +115,6 @@ function normalizeEpochMs(timestamp: number | undefined): number | undefined { return timestamp < MS_EPOCH_MIN ? timestamp * 1000 : timestamp; } -/** Build a card header from agent identity config. */ function resolveCardHeader( agentId: string, identity: OutboundIdentity | undefined, @@ -132,7 +131,6 @@ function resolveCardHeader( }; } -/** Build a card note footer from agent identity and model context. */ function resolveCardNote( agentId: string, identity: OutboundIdentity | undefined, @@ -222,7 +220,6 @@ export function createFeishuReplyDispatcher(params: CreateFeishuReplyDispatcherP accountId, typing: { start: async () => { - // Check if typing indicator is enabled (default: true) if (!(account.config.typingIndicator ?? true)) { return; } diff --git a/extensions/feishu/src/send.ts b/extensions/feishu/src/send.ts index 94a52757b4ff..838408c532f3 100644 --- a/extensions/feishu/src/send.ts +++ b/extensions/feishu/src/send.ts @@ -94,7 +94,6 @@ type FeishuGetMessageResponse = { }; }; -/** Send a direct message as a fallback when a reply target is unavailable. */ async function sendFallbackDirect( client: ReturnType, params: { @@ -270,10 +269,6 @@ function parseFeishuMessageItem( }; } -/** - * Get a message by its ID. - * Useful for fetching quoted/replied message content. - */ export async function getMessageFeishu(params: { cfg: ClawdbotConfig; messageId: string; @@ -433,7 +428,6 @@ type SendFeishuMessageParams = { /** When true, reply creates a Feishu topic thread instead of an inline reply */ replyInThread?: boolean; allowTopLevelReplyFallback?: boolean; - /** Mention target users */ mentions?: MentionTarget[]; /** Account ID (optional, uses default if not specified) */ accountId?: string; @@ -538,17 +532,12 @@ export async function editMessageFeishu(params: { return { messageId, contentType: "post" }; } -/** Header configuration for structured Feishu cards. */ export type CardHeaderConfig = { - /** Header title text, e.g. "💻 Coder" */ title: string; /** Feishu header color template (blue, green, red, orange, purple, grey, etc.). Defaults to "blue". */ template?: string; }; -/** - * Build a Feishu interactive card with optional header and note footer. - */ function buildStructuredCard( text: string, options?: { @@ -604,9 +593,6 @@ export function chunkFeishuCardMarkdown( }); } -/** - * Send a message as a structured card with optional header and note. - */ export async function sendStructuredCardFeishu( params: Omit & { header?: CardHeaderConfig; diff --git a/extensions/feishu/src/setup-surface.ts b/extensions/feishu/src/setup-surface.ts index fe4faed2a57f..2d419fd1fbe5 100644 --- a/extensions/feishu/src/setup-surface.ts +++ b/extensions/feishu/src/setup-surface.ts @@ -258,7 +258,6 @@ async function runNewAppFlow(params: { scanDomain = scanResult.domain; scanOpenId = scanResult.openId; } else { - // Fallback to manual input: collect domain, appId, appSecret. await noteFeishuCredentialHelp(prompter); appId = ( @@ -288,7 +287,6 @@ async function runNewAppFlow(params: { appSecretProbeValue = appSecretResult.resolvedValue; } - // Fetch openId via API for manual flow. if (appId && appSecretProbeValue) { const { getAppOwnerOpenId } = await loadAppRegistrationModule(); scanOpenId = await getAppOwnerOpenId({ diff --git a/extensions/feishu/src/streaming-card.ts b/extensions/feishu/src/streaming-card.ts index f420b9090a03..b1c40b484ce4 100644 --- a/extensions/feishu/src/streaming-card.ts +++ b/extensions/feishu/src/streaming-card.ts @@ -233,7 +233,6 @@ export function mergeStreamingText( return `${previous}${next}`; } -/** Streaming card session manager */ export class FeishuStreamingSession { private client: Client; private creds: Credentials; @@ -573,12 +572,10 @@ export class FeishuStreamingSession { } } - // Update note with final model/provider info if (options?.note) { await this.updateNoteContent(options.note); } - // Close streaming mode // A rejected final write must not advertise content that CardKit never accepted. const acceptedText = this.state.sentText; this.state.sequence += 1; diff --git a/extensions/feishu/src/tools-config.ts b/extensions/feishu/src/tools-config.ts index 998b9019b898..5dadf77da80f 100644 --- a/extensions/feishu/src/tools-config.ts +++ b/extensions/feishu/src/tools-config.ts @@ -16,7 +16,6 @@ const DEFAULT_TOOLS_CONFIG: Required = { bitable: true, }; -/** Resolve tools config with defaults. */ export function resolveToolsConfig(cfg?: FeishuToolsConfig): Required { return { ...DEFAULT_TOOLS_CONFIG, ...cfg }; } diff --git a/extensions/feishu/src/wiki.ts b/extensions/feishu/src/wiki.ts index 08a362171788..4fe6953551a6 100644 --- a/extensions/feishu/src/wiki.ts +++ b/extensions/feishu/src/wiki.ts @@ -11,8 +11,6 @@ type ObjType = "doc" | "sheet" | "mindnote" | "bitable" | "file" | "docx" | "sli const WIKI_PAGE_SIZE = 50; -// ============ Actions ============ - const WIKI_ACCESS_HINT = "To grant wiki access: Open wiki space → Settings → Members → Add the bot. " + "See: https://open.feishu.cn/document/server-docs/docs/wiki-v2/wiki-qa#a40ad4ca"; @@ -186,8 +184,6 @@ async function renameNode(client: Lark.Client, spaceId: string, nodeToken: strin }; } -// ============ Tool Registration ============ - export function registerFeishuWikiTools(api: OpenClawPluginApi) { registerFeishuTool(api, { family: "wiki", diff --git a/extensions/line/src/card-command.ts b/extensions/line/src/card-command.ts index 11325d4e0f60..12d461869156 100644 --- a/extensions/line/src/card-command.ts +++ b/extensions/line/src/card-command.ts @@ -159,7 +159,6 @@ function parseCardArgs(argsStrInput: string): { flags: {}, }; - // Extract type (first word) const typeMatch = argsStr.match(/^(\w+)/); if (typeMatch) { result.type = normalizeLowercaseStringOrEmpty(typeMatch[1]); diff --git a/extensions/matrix/src/matrix/send/types.ts b/extensions/matrix/src/matrix/send/types.ts index 6566db169c22..997402a0d42d 100644 --- a/extensions/matrix/src/matrix/send/types.ts +++ b/extensions/matrix/src/matrix/send/types.ts @@ -13,7 +13,6 @@ import type { VideoFileInfo, } from "../sdk.js"; -// Message types export const MsgType = { Text: "m.text", Image: "m.image", @@ -23,14 +22,12 @@ export const MsgType = { Notice: "m.notice", } as const; -// Relation types export const RelationType = { Annotation: MATRIX_ANNOTATION_RELATION_TYPE, Replace: "m.replace", Thread: "m.thread", } as const; -// Event types export const EventType = { Direct: "m.direct", Reaction: MATRIX_REACTION_EVENT_TYPE, diff --git a/extensions/mattermost/src/normalize.ts b/extensions/mattermost/src/normalize.ts index b12eb33bae8d..f6e7654e8e65 100644 --- a/extensions/mattermost/src/normalize.ts +++ b/extensions/mattermost/src/normalize.ts @@ -15,7 +15,6 @@ const MATTERMOST_QUESTION_CONTEXT_KEY = "oc_question"; export type MattermostQuestionSelection = { questionId: string; optionIndex: number }; -/** One interactive button as this plugin hands it to the attachment builder. */ type MattermostPresentationButton = { id: string; text: string; diff --git a/extensions/msteams/src/graph-members.ts b/extensions/msteams/src/graph-members.ts index 6682d02092b7..154f3bdaf092 100644 --- a/extensions/msteams/src/graph-members.ts +++ b/extensions/msteams/src/graph-members.ts @@ -62,9 +62,6 @@ async function findStandardChannelMember(params: { return result.found; } -/** - * Fetch a user profile from Microsoft Graph by user ID. - */ export async function getMemberInfoMSTeams(params: GetMemberInfoMSTeamsParams) { const isCurrentRequester = normalizeUserId(params.userId) === normalizeUserId(params.currentRequesterId); diff --git a/extensions/msteams/src/monitor-handler/reaction-handler.ts b/extensions/msteams/src/monitor-handler/reaction-handler.ts index ac546309bd4c..42bea32bfe92 100644 --- a/extensions/msteams/src/monitor-handler/reaction-handler.ts +++ b/extensions/msteams/src/monitor-handler/reaction-handler.ts @@ -8,10 +8,6 @@ import { resolveMSTeamsRouteSessionKey } from "./thread-session.js"; type ReactionDirection = "added" | "removed"; -/** - * Create a handler for MS Teams reaction activities (reactionsAdded / reactionsRemoved). - * The returned function accepts a turn context and a direction string. - */ export function createMSTeamsReactionHandler(deps: MSTeamsMessageHandlerDeps) { const { cfg, log } = deps; const core = getMSTeamsRuntime(); @@ -23,7 +19,6 @@ export function createMSTeamsReactionHandler(deps: MSTeamsMessageHandlerDeps) { ): Promise { const activity = context.activity; - // Reactions are carried in reactionsAdded / reactionsRemoved on the activity. const rawReactions = direction === "added" ? activity.reactionsAdded : activity.reactionsRemoved; const reactions: Array<{ type?: string }> = Array.isArray(rawReactions) ? rawReactions : []; @@ -78,7 +73,6 @@ export function createMSTeamsReactionHandler(deps: MSTeamsMessageHandlerDeps) { } } - // Resolve the agent route for this conversation/sender. // Extract teamId for team-scoped routing bindings (channel/group reactions). const teamId = isDirectMessage ? undefined : activity.channelData?.team?.id; const route = core.channel.routing.resolveAgentRoute({ diff --git a/extensions/nostr/src/metrics.ts b/extensions/nostr/src/metrics.ts index 29ee92652519..ec539ae2da31 100644 --- a/extensions/nostr/src/metrics.ts +++ b/extensions/nostr/src/metrics.ts @@ -60,13 +60,11 @@ type RelayMetrics = { }; export interface MetricEvent { - /** Metric name (e.g., "event.received", "relay.connect") */ name: MetricName; /** Metric value (usually 1 for counters, or a measured value) */ value: number; /** Unix timestamp in milliseconds */ timestamp: number; - /** Optional labels for additional context */ labels?: Record; } @@ -240,9 +238,6 @@ export function createMetrics(onMetric?: OnMetricCallback) { export type MetricsSnapshot = ReturnType; export type NostrMetrics = ReturnType; -/** - * Create a no-op metrics instance (for when metrics are disabled). - */ export function createNoopMetrics(): NostrMetrics { const emptySnapshot = createMetricsSnapshot(createZeroMetricsState(), 0); diff --git a/extensions/signal/src/client-container.ts b/extensions/signal/src/client-container.ts index c6e7b6a22ed2..291a164e524f 100644 --- a/extensions/signal/src/client-container.ts +++ b/extensions/signal/src/client-container.ts @@ -748,7 +748,6 @@ export async function containerRpcRequest( timeoutMs: opts.timeoutMs, maxResponseBytes: opts.maxResponseBytes, }); - // Convert to native format: { data: base64String } if (!buffer) { return { data: undefined } as T; } diff --git a/extensions/slack/src/monitor/message-handler/prepare.ts b/extensions/slack/src/monitor/message-handler/prepare.ts index 0c191b82bc00..ecd6e2442a7a 100644 --- a/extensions/slack/src/monitor/message-handler/prepare.ts +++ b/extensions/slack/src/monitor/message-handler/prepare.ts @@ -1384,7 +1384,6 @@ export async function prepareSlackMessage(params: { }); } - // Use direct media (including forwarded attachment media) if available, else thread starter media const effectiveMedia = effectiveDirectMedia ?? threadStarterMedia; let inboundMedia = await toInboundMediaFactsWithMetadata(effectiveMedia, { transcribed: (entry) => diff --git a/extensions/telegram/src/send-context.ts b/extensions/telegram/src/send-context.ts index 5f707242f4fb..44d56887b77b 100644 --- a/extensions/telegram/src/send-context.ts +++ b/extensions/telegram/src/send-context.ts @@ -485,7 +485,6 @@ export function createTelegramRequestWithDiag(params: { function wrapTelegramChatNotFoundError(err: unknown, params: { chatId: string; input: string }) { const errorMsg = formatErrorMessage(err); - // Check for 403 "bot is not a member" or "bot was blocked" errors if (/403.*(bot.*not.*member|bot.*blocked|bot.*kicked)/i.test(errorMsg)) { return new Error( [ diff --git a/extensions/telegram/src/send-message.ts b/extensions/telegram/src/send-message.ts index e9461e9514a0..3265e3acf4e0 100644 --- a/extensions/telegram/src/send-message.ts +++ b/extensions/telegram/src/send-message.ts @@ -169,7 +169,6 @@ export async function sendMessageTelegram( const tableMode = opts.tableMode ?? resolveTelegramTableMode(richMessagesParams); const renderHtmlText = (value: string) => renderTelegramHtmlText(value, { textMode, tableMode }); - // Resolve link preview setting from config (default: enabled). const linkPreviewEnabled = account.config.linkPreview ?? true; const linkPreviewOptions = linkPreviewEnabled ? undefined : { is_disabled: true }; diff --git a/extensions/tlon/src/monitor/utils.ts b/extensions/tlon/src/monitor/utils.ts index a303fbd49202..88d768245183 100644 --- a/extensions/tlon/src/monitor/utils.ts +++ b/extensions/tlon/src/monitor/utils.ts @@ -251,7 +251,6 @@ export function extractMessageText(content: unknown): string { return ""; } - // Handle inline content (text, ships, links, etc.) if (Array.isArray(verseRecord.inline)) { return verseRecord.inline .map((item) => @@ -264,12 +263,10 @@ export function extractMessageText(content: unknown): string { .join(""); } - // Handle block content (images, code blocks, etc.) const block = asNullableRecord(verseRecord.block); if (block) { const image = asNullableRecord(block.image); - // Image blocks if (image) { const imageSrc = readStringField(image, "src"); if (imageSrc) { @@ -279,7 +276,6 @@ export function extractMessageText(content: unknown): string { } } - // Code blocks const codeBlock = asNullableRecord(block.code); if (codeBlock) { const lang = readStringField(codeBlock, "lang") ?? ""; @@ -287,7 +283,6 @@ export function extractMessageText(content: unknown): string { return `\n\`\`\`${lang}\n${code}\n\`\`\`\n`; } - // Header blocks const header = asNullableRecord(block.header); if (header) { const headerContent = Array.isArray(header.content) ? header.content : []; @@ -296,7 +291,6 @@ export function extractMessageText(content: unknown): string { return `\n## ${text}\n`; } - // Cite/quote blocks - parse the reference structure const cite = asNullableRecord(block.cite); if (cite) { const chanCite = asNullableRecord(cite.chan); diff --git a/extensions/twitch/src/send.ts b/extensions/twitch/src/send.ts index a71e2397864a..07b20c976366 100644 --- a/extensions/twitch/src/send.ts +++ b/extensions/twitch/src/send.ts @@ -7,9 +7,6 @@ import type { TwitchClientManager } from "./twitch-client.js"; import type { TwitchAccountConfig } from "./types.js"; import { stripMarkdownForTwitch } from "./utils/markdown.js"; -/** - * Result from sending a message to Twitch. - */ interface SendMessageResult { outcome?: "not_sent"; /** The message ID (generated for tracking) */ diff --git a/extensions/voice-call/src/manager.ts b/extensions/voice-call/src/manager.ts index 46e86fffce19..6ba0ed4ddd4a 100644 --- a/extensions/voice-call/src/manager.ts +++ b/extensions/voice-call/src/manager.ts @@ -220,7 +220,6 @@ export class CallManager { const elapsed = Date.now() - maxDurationAnchor; const maxDurationMs = resolveVoiceCallSecondsTimerDelayMs(this.config.maxDurationSeconds); if (elapsed >= maxDurationMs) { - // Already expired — remove instead of keeping verified.delete(callId); skippedAlreadyElapsedTimers += 1; continue; diff --git a/extensions/voice-call/src/manager/store.ts b/extensions/voice-call/src/manager/store.ts index 12d189bb77cd..da796a5f090d 100644 --- a/extensions/voice-call/src/manager/store.ts +++ b/extensions/voice-call/src/manager/store.ts @@ -20,7 +20,6 @@ export const CALL_RECORD_EVENT_CHUNKS_NAMESPACE = "call-record-event-chunks"; export const MAX_CALL_RECORD_EVENTS = 1000; /** Extra metadata entries retained so pruning can safely trim oldest rows. */ export const CALL_RECORD_EVENT_META_MAX_ENTRIES = MAX_CALL_RECORD_EVENTS + 100; -/** Maximum chunks allowed for one persisted call record event. */ const MAX_CHUNKS_PER_CALL_RECORD_EVENT = 48; export const CALL_RECORD_CHUNK_MAX_ENTRIES = MAX_CALL_RECORD_EVENTS * MAX_CHUNKS_PER_CALL_RECORD_EVENT + MAX_CHUNKS_PER_CALL_RECORD_EVENT; @@ -51,7 +50,6 @@ type PersistedCallRecord = { orderKey: string; }; -/** Pair of plugin state stores used for call record events. */ type CallRecordStateStores = { events: PluginStateKeyedStore; chunks: PluginStateKeyedStore; @@ -66,12 +64,10 @@ export function resolveVoiceCallLegacyCallLogPath(storePath: string): string { return path.join(storePath, "calls.jsonl"); } -/** Build env for plugin state stores rooted at the voice-call store path. */ function resolvePluginStateEnv(storePath: string): NodeJS.ProcessEnv { return { ...process.env, OPENCLAW_STATE_DIR: storePath }; } -/** Open the plugin state stores when the runtime is available. */ function createCallRecordStateStores( storePath: string, stateRuntime?: VoiceCallStateRuntime["state"], @@ -130,7 +126,6 @@ function buildNewEventKey(order: { persistedAt: number; sequence: number }): str return `event:${order.persistedAt.toString(36)}:${String(order.sequence).padStart(6, "0")}:${randomUUID()}`; } -/** Recover the sequence segment from newer event keys. */ function parseEventKeySequence(key: string): number { const match = /^event:[^:]+:(\d+):/.exec(key); const sequence = match?.[1]; @@ -175,7 +170,6 @@ export function parseVoiceCallRecordLine(line: string, sequence = 0): PersistedC } } -/** Count storage chunks needed for a call record. */ function countCallRecordChunks(call: CallRecord): number { return Math.max( 1, @@ -310,7 +304,6 @@ function isValidCallRecordChunkCount(chunkCount: number): boolean { ); } -/** Read and reassemble one chunked call record event. */ async function readCallRecordEvent( stores: CallRecordStateStores, eventKey: string, diff --git a/extensions/voice-call/src/media-stream.ts b/extensions/voice-call/src/media-stream.ts index 89c374787237..e831a6fbec38 100644 --- a/extensions/voice-call/src/media-stream.ts +++ b/extensions/voice-call/src/media-stream.ts @@ -137,9 +137,7 @@ export class MediaStreamHandler { private inflightUpgrades = 0; /** TTS playback queues per stream (serialize audio to prevent overlap) */ private ttsQueues = new Map(); - /** Whether TTS is currently playing per stream */ private ttsPlaying = new Map(); - /** Active TTS playback controllers per stream */ private ttsActiveControllers = new Map(); private pendingPlaybackMarks = new Map>(); private ignoredPlaybackMarks = new Map>(); diff --git a/extensions/voice-call/src/providers/twilio.ts b/extensions/voice-call/src/providers/twilio.ts index b3b4a12e15bf..9da702792882 100644 --- a/extensions/voice-call/src/providers/twilio.ts +++ b/extensions/voice-call/src/providers/twilio.ts @@ -96,10 +96,8 @@ export class TwilioProvider implements VoiceCallProvider { /** Current public webhook URL (set when tunnel starts or from config) */ private currentPublicUrl: string | null = null; - /** Optional telephony TTS provider for streaming TTS */ private ttsProvider: TelephonyTtsProvider | null = null; - /** Optional media stream handler for sending audio */ private mediaStreamHandler: MediaStreamHandler | null = null; private playbackMarkSequence = 0; @@ -377,13 +375,11 @@ export class TwilioProvider implements VoiceCallProvider { }; } - // Handle DTMF const digits = params.get("Digits"); if (digits) { return { ...baseEvent, type: "call.dtmf", digits }; } - // Handle call status changes const callStatus = normalizeProviderStatus(params.get("CallStatus")); if (callStatus === "initiated") { return { ...baseEvent, type: "call.initiated" }; @@ -482,14 +478,11 @@ export class TwilioProvider implements VoiceCallProvider { return null; } - // Extract just the origin (host) from the public URL, ignoring any path const url = new URL(this.currentPublicUrl); const origin = url.origin; - // Convert https:// to wss:// for WebSocket const wsOrigin = origin.replace(/^https:\/\//, "wss://").replace(/^http:\/\//, "ws://"); - // Append the stream path const path = this.options.streamPath.startsWith("/") ? this.options.streamPath : `/${this.options.streamPath}`; @@ -821,10 +814,6 @@ export class TwilioProvider implements VoiceCallProvider { } } -// ----------------------------------------------------------------------------- -// Twilio-specific types -// ----------------------------------------------------------------------------- - interface TwilioCallResponse { sid: string; status: string; diff --git a/extensions/voice-call/src/response-generator.ts b/extensions/voice-call/src/response-generator.ts index 9ae467ccbda6..02db87497f62 100644 --- a/extensions/voice-call/src/response-generator.ts +++ b/extensions/voice-call/src/response-generator.ts @@ -26,9 +26,7 @@ import { resolveCallAgentId } from "./resolve-call-agent-id.js"; import { resolveVoiceResponseModel } from "./response-model.js"; type VoiceResponseParams = { - /** Voice call config */ voiceConfig: VoiceCallConfig; - /** Core OpenClaw config */ coreConfig: OpenClawConfig; /** Injected host agent runtime */ agentRuntime: OpenClawPluginApi["runtime"]["agent"]; @@ -44,7 +42,6 @@ type VoiceResponseParams = { agentId?: string; /** Audible call transcript, used only for bounded first-turn opening context. */ transcript: Array<{ speaker: "user" | "bot"; text: string }>; - /** Latest user message */ userMessage: string; /** Delivers completed reply blocks while post-turn work is still running. */ onEarlyText?: (text: string) => Promise; @@ -338,7 +335,6 @@ export async function generateVoiceResponse( }); const toolsAllow = resolveVoiceAgentToolsAllow(cfg, agentId); - // Resolve paths const storePath = agentRuntime.session.resolveStorePath(cfg.session?.store, { agentId }); try { return await agentRuntime.session.runWithWorkAdmission( @@ -347,17 +343,14 @@ export async function generateVoiceResponse( const agentDir = agentRuntime.resolveAgentDir(cfg, agentId); const workspaceDir = agentRuntime.resolveAgentWorkspaceDir(cfg, agentId); - // Ensure workspace exists await agentRuntime.ensureAgentWorkspace({ dir: workspaceDir }); - // Load or create session entry const now = Date.now(); const existingSessionEntry = agentRuntime.session.getSessionEntry({ storePath, sessionKey: resolvedSessionKey, }); - // Resolve model from config const { provider, model } = resolveVoiceResponseModel({ voiceConfig, agentRuntime }); const configuredModel = resolveDefaultModelForAgent({ cfg, agentId }); @@ -417,10 +410,8 @@ export async function generateVoiceResponse( ? resolvePersistedSessionRuntimeId(sessionEntry) : undefined; - // Resolve thinking level const thinkLevel = agentRuntime.resolveThinkingDefault({ cfg, provider, model }); - // Resolve agent identity for personalized prompt const identity = agentRuntime.resolveAgentIdentity(cfg, agentId); const agentName = identity?.name?.trim() || "assistant"; @@ -435,7 +426,6 @@ export async function generateVoiceResponse( ].join("\n\n"); const prompt = buildVoiceTurnPrompt({ transcript, userMessage }); - // Resolve timeout const timeoutMs = voiceConfig.responseTimeoutMs ?? agentRuntime.resolveAgentTimeoutMs({ cfg }); const runId = `voice:${callId}:${Date.now()}`; diff --git a/extensions/voice-call/src/tunnel.ts b/extensions/voice-call/src/tunnel.ts index b4a79587a9df..2c72fe28b57b 100644 --- a/extensions/voice-call/src/tunnel.ts +++ b/extensions/voice-call/src/tunnel.ts @@ -65,7 +65,6 @@ function listenForChildStreamErrors( } interface TunnelConfig { - /** Tunnel provider: ngrok, tailscale-serve, or tailscale-funnel */ provider: "ngrok" | "tailscale-serve" | "tailscale-funnel" | "none"; /** Local port to tunnel */ port: number; @@ -106,7 +105,6 @@ async function startNgrokTunnel(config: { authToken?: string; domain?: string; }): Promise { - // Build ngrok command args const args = ["http", String(config.port), "--log", "stdout", "--log-format", "json"]; // Add custom domain if provided (paid ngrok feature) @@ -161,17 +159,14 @@ async function startNgrokTunnel(config: { publicUrl = log.url; } - // Also check for the URL field directly if (log.addr && log.url && !publicUrl) { publicUrl = log.url; } - // Check for ready state if (publicUrl && !startupSettled) { startupSettled = true; clearTimeout(timeout); - // Add path to the public URL const fullUrl = publicUrl + config.path; console.log(`[voice-call] ngrok tunnel active: ${fullUrl}`); diff --git a/extensions/voice-call/src/voice-mapping.ts b/extensions/voice-call/src/voice-mapping.ts index fc4bead05587..df34967a1170 100644 --- a/extensions/voice-call/src/voice-mapping.ts +++ b/extensions/voice-call/src/voice-mapping.ts @@ -12,9 +12,6 @@ export function escapeXml(text: string): string { .replace(/'/g, "'"); } -/** - * Map of OpenAI voice names to similar Twilio Polly voices. - */ const OPENAI_TO_POLLY_MAP = new Map([ ["alloy", "Polly.Joanna"], // neutral, warm ["echo", "Polly.Matthew"], // male, warm @@ -24,9 +21,6 @@ const OPENAI_TO_POLLY_MAP = new Map([ ["shimmer", "Polly.Kimberly"], // female, clear ]); -/** - * Default Polly voice when no mapping is found. - */ const DEFAULT_POLLY_VOICE = "Polly.Joanna"; /** @@ -41,7 +35,6 @@ export function mapVoiceToPolly(voice: string | undefined): string { return DEFAULT_POLLY_VOICE; } - // Already a Polly/Google voice - pass through if (voice.startsWith("Polly.") || voice.startsWith("Google.")) { return voice; } diff --git a/extensions/voice-call/src/webhook.ts b/extensions/voice-call/src/webhook.ts index c4e415dffbef..59623ee94ef3 100644 --- a/extensions/voice-call/src/webhook.ts +++ b/extensions/voice-call/src/webhook.ts @@ -191,12 +191,10 @@ export class VoiceCallWebhookServer { private stopStaleCallReaper: (() => void) | null = null; private readonly webhookInFlightLimiter = createWebhookInFlightLimiter(); - /** Media stream handler for bidirectional audio (when streaming enabled) */ private mediaStreamHandler: MediaStreamHandler | null = null; private readonly streamDisconnectGrace: StreamDisconnectGrace; // Revoke pending transcript replies before persistence has created a response guard. private readonly streamSpeechGenerations = new WeakMap(); - /** Realtime voice handler for duplex provider bridges. */ private realtimeHandler: RealtimeCallHandler | null = null; private replayResponses = new Map(); private replayResponseCacheCalls = 0; @@ -348,9 +346,6 @@ export class VoiceCallWebhookServer { return generation; } - /** - * Initialize media streaming with the selected realtime transcription provider. - */ private async initializeMediaStreaming(): Promise { const streaming = this.config.streaming; const pluginConfig = this.fullConfig ?? this.coreConfig ?? undefined; @@ -438,7 +433,6 @@ export class VoiceCallWebhookServer { const generation = this.interruptStreamReply(providerCallId, streamSid); - // Create a speech event and process it through the manager const event: NormalizedEvent = { id: `stream-transcript-${Date.now()}`, type: "call.speech", @@ -519,7 +513,6 @@ export class VoiceCallWebhookServer { } /** - * Start the webhook server. * Idempotent: returns immediately if the server is already listening. */ async start(): Promise { @@ -554,7 +547,6 @@ export class VoiceCallWebhookServer { }); }); - // Handle WebSocket upgrades for realtime voice and media streams. if (this.realtimeHandler || this.mediaStreamHandler) { this.server.on("upgrade", (request, socket, head) => { if (this.realtimeHandler && this.isRealtimeWebSocketUpgrade(request)) { @@ -592,7 +584,6 @@ export class VoiceCallWebhookServer { } resolve(url); - // Start the stale call reaper if configured this.stopStaleCallReaper = startStaleCallReaper({ manager: this.manager, staleCallReaperSeconds: this.config.staleCallReaperSeconds, @@ -1077,7 +1068,6 @@ export class VoiceCallWebhookServer { private async handleInboundResponse(callId: string, userMessage: string): Promise { this.logger.info(`Auto-responding to inbound call ${callId} chars=${userMessage.length}`); - // Get the persisted call context for routing and response delivery. const call = this.manager.getCall(callId); if (!call) { this.logger.warn(`Call ${callId} not found for auto-response`); diff --git a/extensions/zalo/src/api.ts b/extensions/zalo/src/api.ts index fbe6e438b620..375727415061 100644 --- a/extensions/zalo/src/api.ts +++ b/extensions/zalo/src/api.ts @@ -131,9 +131,6 @@ function resolveZaloApiUrl(apiUrl?: string): string { return parsed.href.replace(/\/+$/u, ""); } -/** - * Call the Zalo Bot API - */ export async function callZaloApi( method: string, token: string, @@ -183,9 +180,6 @@ export async function callZaloApi( } } -/** - * Validate bot token and get bot info - */ export async function getMe( token: string, timeoutMs?: number, @@ -194,9 +188,6 @@ export async function getMe( return callZaloApi("getMe", token, undefined, { timeoutMs, fetch: fetcher }); } -/** - * Send a text message - */ export async function sendMessage( token: string, params: ZaloSendMessageParams, @@ -209,9 +200,6 @@ export async function sendMessage( }); } -/** - * Send a photo message - */ export async function sendPhoto( token: string, params: ZaloSendPhotoParams, @@ -268,7 +256,6 @@ export async function sendChatAction( } /** - * Get updates using long polling (dev/testing only) * Note: Zalo returns a single update per call, not an array like Telegram */ export async function getUpdates( @@ -282,9 +269,6 @@ export async function getUpdates( return callZaloApi("getUpdates", token, body, { timeoutMs, fetch: fetcher }); } -/** - * Set webhook URL for receiving updates - */ export async function setWebhook( token: string, params: ZaloSetWebhookParams, @@ -293,9 +277,6 @@ export async function setWebhook( return callZaloApi("setWebhook", token, params, { fetch: fetcher }); } -/** - * Delete webhook configuration - */ export async function deleteWebhook( token: string, fetcher?: ZaloFetch, @@ -307,9 +288,6 @@ export async function deleteWebhook( }); } -/** - * Get current webhook info - */ export async function getWebhookInfo( token: string, fetcher?: ZaloFetch, diff --git a/scripts/check-docs-mdx.mts b/scripts/check-docs-mdx.mts index f8a53ecc3b56..d5c332518f63 100644 --- a/scripts/check-docs-mdx.mts +++ b/scripts/check-docs-mdx.mts @@ -116,9 +116,6 @@ function parsePositiveIntegerArg(raw: string | undefined, label: string): number return value; } -/** - * Parses docs MDX check arguments. - */ export function parseArgs(argv: string[]) { const roots: string[] = []; let jsonOut = ""; diff --git a/scripts/check-extension-wildcard-reexports.mts b/scripts/check-extension-wildcard-reexports.mts index 3f06948306cd..fe13f036964c 100644 --- a/scripts/check-extension-wildcard-reexports.mts +++ b/scripts/check-extension-wildcard-reexports.mts @@ -17,14 +17,8 @@ const policy = { } satisfies ExtensionWildcardReexportPolicy; const scanner = createExtensionWildcardReexportScanner(policy); -/** - * Finds local wildcard re-export lines in a barrel source string. - */ export const findLocalWildcardReexports = scanner.findLines; -/** - * Runs the extension wildcard re-export guard. - */ export const main = scanner.main; await scanner.exitIfMain(import.meta.url); diff --git a/scripts/check-ingress-agent-owner-context.mts b/scripts/check-ingress-agent-owner-context.mts index 65d0358062ea..ec3f659456fd 100644 --- a/scripts/check-ingress-agent-owner-context.mts +++ b/scripts/check-ingress-agent-owner-context.mts @@ -20,9 +20,6 @@ const enforcedFiles = new Set([ "src/gateway/server-node-events.ts", ]); -/** - * Finds legacy `agentCommand(...)` call lines in ingress-owned source. - */ function findLegacyAgentCommandCallLines( _content: string, _fileName: string, @@ -34,9 +31,6 @@ function findLegacyAgentCommandCallLines( }); } -/** - * Runs the ingress owner-context guard. - */ async function main() { await runCallsiteGuard({ importMetaUrl: import.meta.url, diff --git a/scripts/check-no-random-messaging-tmp.mts b/scripts/check-no-random-messaging-tmp.mts index 35c3c2a0905f..ef018be21655 100644 --- a/scripts/check-no-random-messaging-tmp.mts +++ b/scripts/check-no-random-messaging-tmp.mts @@ -10,9 +10,6 @@ import { unwrapExpression, } from "./lib/ts-guard-utils.mts"; -/** - * Source roots scanned for unsafe messaging tmpdir usage. - */ export const messagingTmpdirGuardSourceRoots = [ "src/channels", "src/infra/outbound", @@ -55,9 +52,6 @@ function collectOsTmpdirImports(sourceFile: ts.SourceFile) { return { osNamespaceOrDefault, namedTmpdir }; } -/** - * Finds `os.tmpdir()` or imported `tmpdir()` call lines in source. - */ export function findMessagingTmpdirCallLines( _content: string, _fileName: string, @@ -78,9 +72,6 @@ export function findMessagingTmpdirCallLines( }); } -/** - * Runs the messaging tmpdir guard. - */ export async function main() { await runCallsiteGuard({ importMetaUrl: import.meta.url, diff --git a/scripts/check-no-raw-channel-fetch.mts b/scripts/check-no-raw-channel-fetch.mts index 54bd6792fffd..767356b145ba 100644 --- a/scripts/check-no-raw-channel-fetch.mts +++ b/scripts/check-no-raw-channel-fetch.mts @@ -75,18 +75,12 @@ function isRawFetchCall(expression: ts.Expression) { return false; } -/** - * Finds raw `fetch(...)` and `globalThis.fetch(...)` call lines. - */ function findRawFetchCallLines(_content: string, _fileName: string, sourceFile: ts.SourceFile) { return collectCallExpressionLines(sourceFile, (node) => isRawFetchCall(node.expression) ? node.expression : null, ); } -/** - * Runs the raw channel/plugin fetch guard. - */ async function main() { await runCallsiteGuard({ importMetaUrl: import.meta.url, diff --git a/scripts/check-package-patches.mts b/scripts/check-package-patches.mts index b7c3b423fda0..cec92ca87126 100644 --- a/scripts/check-package-patches.mts +++ b/scripts/check-package-patches.mts @@ -121,9 +121,6 @@ function collectPatchFileViolations(cwd: string, violations: PackagePatchViolati } } -/** - * Collects disallowed package patch declarations and patch files. - */ export function collectPackagePatchViolations(cwd = process.cwd()) { const violations: PackagePatchViolation[] = []; collectWorkspacePatchViolations(cwd, violations); @@ -133,9 +130,6 @@ export function collectPackagePatchViolations(cwd = process.cwd()) { return violations; } -/** - * Runs the package patch guard. - */ export async function main() { const violations = collectPackagePatchViolations(); if (violations.length === 0) { diff --git a/scripts/check-plugin-extension-import-boundary.mts b/scripts/check-plugin-extension-import-boundary.mts index 7bbfe015f42e..774702680a91 100644 --- a/scripts/check-plugin-extension-import-boundary.mts +++ b/scripts/check-plugin-extension-import-boundary.mts @@ -109,9 +109,6 @@ const formatInventoryHuman = (inventory: PluginExtensionInventoryEntry[]) => inventory, ); -/** - * Runs the plugin-extension import boundary check. - */ async function runPluginExtensionImportBoundaryCheck(): Promise<0 | 1> { const actual = await collectPluginExtensionImportBoundaryInventory(); diff --git a/scripts/check-plugin-sdk-wildcard-reexports.mts b/scripts/check-plugin-sdk-wildcard-reexports.mts index 7e60ab61abe4..cdeeae08a0cb 100644 --- a/scripts/check-plugin-sdk-wildcard-reexports.mts +++ b/scripts/check-plugin-sdk-wildcard-reexports.mts @@ -18,14 +18,8 @@ const policy = { } satisfies ExtensionWildcardReexportPolicy; const scanner = createExtensionWildcardReexportScanner(policy); -/** - * Finds wildcard plugin SDK re-export lines in an extension API barrel. - */ export const findPluginSdkWildcardReexports = scanner.findLines; -/** - * Runs the plugin SDK wildcard re-export guard. - */ export const main = scanner.main; await scanner.exitIfMain(import.meta.url); diff --git a/scripts/check-webhook-auth-body-order.mts b/scripts/check-webhook-auth-body-order.mts index f5e95b6f2186..876984ca079e 100644 --- a/scripts/check-webhook-auth-body-order.mts +++ b/scripts/check-webhook-auth-body-order.mts @@ -34,9 +34,6 @@ function getCalleeName(expression: ts.Expression): string | null { return null; } -/** - * Finds request body reads that occur before webhook auth validation. - */ function findBlockedWebhookBodyReadLines( _content: string, _fileName: string, @@ -48,9 +45,6 @@ function findBlockedWebhookBodyReadLines( }); } -/** - * Runs the webhook auth/body-order guard. - */ async function main() { await runCallsiteGuard({ importMetaUrl: import.meta.url, diff --git a/scripts/check.mts b/scripts/check.mts index d4e63d084bbe..da93a01dc989 100644 --- a/scripts/check.mts +++ b/scripts/check.mts @@ -42,9 +42,6 @@ export const PREFLIGHT_CHECKS: CheckCommand[] = [ { name: "package patch guard", args: ["deps:patches:check"] }, ]; -/** - * Returns command usage text for the aggregate check runner. - */ export function usage() { return [ "Usage: node --import tsx scripts/check.mts [--base ] [--timed] [--include-architecture] [--include-test-types]", @@ -60,9 +57,6 @@ export function usage() { ].join("\n"); } -/** - * Parses aggregate check runner arguments. - */ function parseCheckArgs(argv: string[]) { return parseFlagArgs( argv, @@ -84,9 +78,6 @@ function parseCheckArgs(argv: string[]) { ); } -/** - * Runs selected repository check lanes. - */ export async function main(argv = process.argv.slice(2)) { let args; try { @@ -197,9 +188,6 @@ async function runSerial(commands: CheckCommand[]) { return results; } -/** - * Runs one managed check command and returns timing/status details. - */ export async function runCommand( command: CheckCommand, runManagedCommandImpl: RunManagedCheck = runManagedCommand, diff --git a/scripts/ensure-cli-startup-build.mts b/scripts/ensure-cli-startup-build.mts index 7163f1a45666..1e2c52145df3 100644 --- a/scripts/ensure-cli-startup-build.mts +++ b/scripts/ensure-cli-startup-build.mts @@ -23,16 +23,10 @@ type StartupBuildParams = Partial<{ timeoutMs: number; }>; -/** - * Resolves the CLI startup build timeout from environment. - */ export function resolveCliStartupBuildTimeoutMs(env: NodeJS.ProcessEnv = process.env) { return readPositiveEnvInt("OPENCLAW_CLI_STARTUP_BUILD_TIMEOUT_MS", env, DEFAULT_BUILD_TIMEOUT_MS); } -/** - * Reports whether required CLI startup build outputs exist. - */ export function hasCliStartupBuild(params: StartupBuildParams = {}) { const rootDir = params.rootDir ?? repoRoot; const exists = params.existsSync ?? existsSync; @@ -40,9 +34,6 @@ export function hasCliStartupBuild(params: StartupBuildParams = {}) { return hasEntry && exists(path.join(rootDir, startupMetadataPath)); } -/** - * Builds CLI startup assets when required outputs are missing. - */ export function ensureCliStartupBuild(params: StartupBuildParams = {}) { const rootDir = params.rootDir ?? repoRoot; if (hasCliStartupBuild({ rootDir, existsSync: params.existsSync })) { diff --git a/scripts/ensure-extension-memory-build.mts b/scripts/ensure-extension-memory-build.mts index 1f425b937977..c980083c8007 100644 --- a/scripts/ensure-extension-memory-build.mts +++ b/scripts/ensure-extension-memory-build.mts @@ -28,9 +28,6 @@ type ExtensionMemoryBuildParams = { timeoutMs?: number; }; -/** - * Resolves the extension memory build timeout from environment. - */ function resolveExtensionMemoryBuildTimeoutMs(env: NodeJS.ProcessEnv = process.env) { return readPositiveEnvInt( "OPENCLAW_EXTENSION_MEMORY_BUILD_TIMEOUT_MS", @@ -103,9 +100,6 @@ export function hasBuiltExtensionMemoryEntries(params: ExtensionMemoryBuildParam return requiredExtensionIds.every((id) => builtIds.has(id)); } -/** - * Builds memory extension entries when required outputs are missing. - */ export function ensureExtensionMemoryBuild(params: ExtensionMemoryBuildParams = {}) { const rootDir = params.rootDir ?? repoRoot; if (hasBuiltExtensionMemoryEntries(params)) { diff --git a/scripts/lib/ts-guard-utils.mts b/scripts/lib/ts-guard-utils.mts index fdd75e2bab22..4a77486a2a0f 100644 --- a/scripts/lib/ts-guard-utils.mts +++ b/scripts/lib/ts-guard-utils.mts @@ -30,9 +30,6 @@ type CollectFileViolationsParams = { sourceRoots: string[]; }; -/** - * Converts repo-relative source roots into absolute paths. - */ export function resolveSourceRoots(repoRoot: string, relativeRoots: string[]) { return relativeRoots.map((root) => path.join(repoRoot, ...root.split("/").filter(Boolean))); } @@ -41,9 +38,6 @@ export function isTestLikeTypeScriptFile(filePath: string, extraTestSuffixes: st return [...baseTestSuffixes, ...extraTestSuffixes].some((suffix) => filePath.endsWith(suffix)); } -/** - * Recursively collects TypeScript files under a file or directory target. - */ export async function collectTypeScriptFiles( targetPath: string, options: CollectTypeScriptFilesOptions = {}, @@ -128,9 +122,6 @@ export async function collectTypeScriptFilesFromRoots( ).flat(); } -/** - * Runs a guard's violation scanner across collected TypeScript source files. - */ export async function collectFileViolations( params: CollectFileViolationsParams, ) { diff --git a/scripts/run-with-env.mts b/scripts/run-with-env.mts index 89e7b3b352d1..6802250122e7 100644 --- a/scripts/run-with-env.mts +++ b/scripts/run-with-env.mts @@ -75,9 +75,6 @@ export function resolveSpawnCommand( }; } -/** - * Reads the signal-forwarding force-kill grace period. - */ export function resolveForceKillDelayMs(env: NodeJS.ProcessEnv = process.env) { const raw = env.OPENCLAW_RUN_WITH_ENV_FORCE_KILL_MS; const text = raw?.trim(); diff --git a/src/agents/agent-hooks/compaction-safeguard-runtime.ts b/src/agents/agent-hooks/compaction-safeguard-runtime.ts index 143e1ffa65de..54b13e881bd4 100644 --- a/src/agents/agent-hooks/compaction-safeguard-runtime.ts +++ b/src/agents/agent-hooks/compaction-safeguard-runtime.ts @@ -5,7 +5,6 @@ import { createSessionManagerRuntimeRegistry } from "./session-manager-runtime-r export type CompactionSafeguardCancellation = { reason: string; error?: unknown }; -/** Runtime knobs consumed by the compaction safeguard extension. */ type CompactionSafeguardRuntimeValue = { maxHistoryShare?: number; contextWindowTokens?: number; diff --git a/src/agents/agent-hooks/compaction-safeguard.ts b/src/agents/agent-hooks/compaction-safeguard.ts index 17a269cf3dc3..5f09d364b95d 100644 --- a/src/agents/agent-hooks/compaction-safeguard.ts +++ b/src/agents/agent-hooks/compaction-safeguard.ts @@ -286,10 +286,6 @@ type ToolFailure = { meta?: string; }; -/** - * Resolve model credentials. Returns auth details on success or a cancel reason on failure. - * Extracted to keep the main handler readable when model/auth is conditional. - */ async function resolveModelAuth( ctx: ExtensionContext, model: NonNullable, diff --git a/src/agents/auth-profiles/external-cli-discovery.ts b/src/agents/auth-profiles/external-cli-discovery.ts index a7323da5f4a7..0d68c6468150 100644 --- a/src/agents/auth-profiles/external-cli-discovery.ts +++ b/src/agents/auth-profiles/external-cli-discovery.ts @@ -46,7 +46,6 @@ type ProviderSetDiscoveryParams = { allowKeychainPrompt?: false; }; -/** Disables external CLI auth discovery. */ function externalCliDiscoveryNone(params?: { config?: OpenClawConfig }): ExternalCliAuthDiscovery { return { mode: "none", diff --git a/src/agents/command-poll-backoff.ts b/src/agents/command-poll-backoff.ts index 4dcd17fb55df..b7d5992ed77e 100644 --- a/src/agents/command-poll-backoff.ts +++ b/src/agents/command-poll-backoff.ts @@ -17,9 +17,6 @@ function calculateBackoffMs(consecutiveNoOutputPolls: number): number { /** * Record a command poll and return suggested retry delay. - * @param state Session state to track polling in - * @param commandId Unique identifier for the command being polled - * @param hasNewOutput Whether this poll returned new output * @returns Suggested delay in milliseconds before next poll */ export function recordCommandPoll( @@ -45,9 +42,6 @@ export function recordCommandPoll( return calculateBackoffMs(newCount); } -/** - * Reset poll count for a command (e.g., when command completes). - */ export function resetCommandPollCount(state: SessionState, commandId: string): void { state.commandPollCounts?.delete(commandId); } diff --git a/src/agents/command/attempt-execution.shared.ts b/src/agents/command/attempt-execution.shared.ts index 47138d79b11b..b6eadc11fa08 100644 --- a/src/agents/command/attempt-execution.shared.ts +++ b/src/agents/command/attempt-execution.shared.ts @@ -3,7 +3,6 @@ import { patchSessionEntryCore } from "../../config/sessions/session-accessor.js import { buildSessionCreationStamp } from "../../config/sessions/session-entry-provenance.js"; import { mergeSessionSnapshotChanges } from "../../config/sessions/session-snapshot-merge.js"; import type { SessionEntry } from "../../config/sessions/types.js"; -/** Parameters for merging and persisting a session entry update. */ type PersistSessionEntryParams = { agentId: string; sessionStore: Record; diff --git a/src/agents/embedded-agent-runner/execution-phase.ts b/src/agents/embedded-agent-runner/execution-phase.ts index 399303e91966..c6ed327856c2 100644 --- a/src/agents/embedded-agent-runner/execution-phase.ts +++ b/src/agents/embedded-agent-runner/execution-phase.ts @@ -22,7 +22,6 @@ const EMBEDDED_AGENT_EXECUTION_PHASE_LABELS = { export type EmbeddedAgentExecutionPhase = keyof typeof EMBEDDED_AGENT_EXECUTION_PHASE_LABELS; -/** Converts an internal phase id into the compact label used in status output. */ export function formatEmbeddedAgentExecutionPhase( phase?: EmbeddedAgentExecutionPhase, ): string | undefined { diff --git a/src/agents/embedded-agent-runner/model.inline-provider.ts b/src/agents/embedded-agent-runner/model.inline-provider.ts index ebd3b57d8edc..6889d4f569c4 100644 --- a/src/agents/embedded-agent-runner/model.inline-provider.ts +++ b/src/agents/embedded-agent-runner/model.inline-provider.ts @@ -132,7 +132,6 @@ export function resolveProviderModelInput(params: { return normalizedInput.length > 0 ? normalizedInput : ["text"]; } -/** Builds runtime model records from inline provider config. */ export function buildInlineProviderModels( providers: Record, options: { providerMetadataOwners?: PluginMetadataSnapshotOwnerMaps } = {}, diff --git a/src/agents/embedded-agent-runner/model.static-catalog-row.ts b/src/agents/embedded-agent-runner/model.static-catalog-row.ts index a9939760e5de..67b613a3c2fc 100644 --- a/src/agents/embedded-agent-runner/model.static-catalog-row.ts +++ b/src/agents/embedded-agent-runner/model.static-catalog-row.ts @@ -4,7 +4,6 @@ import type { ProviderRuntimeModel } from "../../plugins/provider-runtime-model. import { DEFAULT_CONTEXT_TOKENS } from "../defaults.js"; import { resolveProviderModelInput } from "./model.inline-provider.js"; -/** Converts a normalized catalog row into the provider runtime model shape. */ export function modelFromStaticCatalogRow(row: NormalizedModelCatalogRow): ProviderRuntimeModel { return { id: row.id, diff --git a/src/agents/embedded-agent-runner/run/attempt-stage-timing.ts b/src/agents/embedded-agent-runner/run/attempt-stage-timing.ts index e6597da41fd8..39f6437deeae 100644 --- a/src/agents/embedded-agent-runner/run/attempt-stage-timing.ts +++ b/src/agents/embedded-agent-runner/run/attempt-stage-timing.ts @@ -5,7 +5,6 @@ import { type StageTimingSummary, } from "../../../shared/stage-timing.js"; -/** Canonical stage names for dispatch-time embedded attempt diagnostics. */ export const EMBEDDED_RUN_ATTEMPT_DISPATCH_STAGE = { workspace: "attempt-workspace", prompt: "attempt-prompt", @@ -66,7 +65,6 @@ export function createEmbeddedRunStageSummaryEmitter(options: { }; } -/** Formats stage timing into compact log text for startup/attempt diagnostics. */ export function formatEmbeddedRunStageSummary(prefix: string, summary: StageTimingSummary): string { const stages = formatStageTimings(summary.stages); return `${prefix} pid=${process.pid} threadId=${threadId} isMainThread=${isMainThread} totalMs=${summary.totalMs} stages=${stages}`; diff --git a/src/agents/embedded-agent-runner/run/message-transform-stream-wrapper.ts b/src/agents/embedded-agent-runner/run/message-transform-stream-wrapper.ts index b3637a866f0a..abe18099628b 100644 --- a/src/agents/embedded-agent-runner/run/message-transform-stream-wrapper.ts +++ b/src/agents/embedded-agent-runner/run/message-transform-stream-wrapper.ts @@ -15,7 +15,6 @@ type ProviderContextMaterializer = (input: { signal?: AbortSignal; }) => Promise; -/** Wraps a stream function with a conditional message-list transform. */ export function wrapStreamFnWithMessageTransform( streamFn: StreamFn, transform: MessageTransform, diff --git a/src/agents/embedded-agent-runner/run/midturn-precheck.ts b/src/agents/embedded-agent-runner/run/midturn-precheck.ts index 8e245f7fc4c5..ed5d131d6aee 100644 --- a/src/agents/embedded-agent-runner/run/midturn-precheck.ts +++ b/src/agents/embedded-agent-runner/run/midturn-precheck.ts @@ -36,7 +36,6 @@ export class MidTurnPrecheckSignal extends Error { } } -/** Narrows unknown errors to the mid-turn overflow signal used by attempt cleanup. */ export function isMidTurnPrecheckSignal(error: unknown): error is MidTurnPrecheckSignal { return error instanceof MidTurnPrecheckSignal; } diff --git a/src/agents/embedded-agent-runner/sandbox-info.ts b/src/agents/embedded-agent-runner/sandbox-info.ts index b4044b5912b4..93e436360de0 100644 --- a/src/agents/embedded-agent-runner/sandbox-info.ts +++ b/src/agents/embedded-agent-runner/sandbox-info.ts @@ -64,7 +64,6 @@ export function resolveEmbeddedFullAccessState(params: { return { available: true }; } -/** Resolves the effective exec policy for sandbox-info reporting. */ export async function resolveEmbeddedSandboxInfoExecPolicy( params: { config?: OpenClawConfig; @@ -93,7 +92,6 @@ export async function resolveEmbeddedSandboxInfoExecPolicy( ); } -/** Builds the serializable sandbox metadata attached to embedded agent run results. */ export function buildEmbeddedSandboxInfo( sandbox?: Awaited>, execElevated?: ExecElevatedDefaults, diff --git a/src/agents/embedded-agent-runner/tool-name-allowlist.ts b/src/agents/embedded-agent-runner/tool-name-allowlist.ts index bc61064dc6ac..e471e5d3f0b7 100644 --- a/src/agents/embedded-agent-runner/tool-name-allowlist.ts +++ b/src/agents/embedded-agent-runner/tool-name-allowlist.ts @@ -29,9 +29,6 @@ export function collectAllowedToolNames(params: { return names; } -/** - * Collect the exact tool names registered with the embedded agent for this session. - */ export function collectRegisteredToolNames(tools: Array<{ name?: string }>): Set { const names = new Set(); for (const tool of tools) { diff --git a/src/agents/model-selection-shared.ts b/src/agents/model-selection-shared.ts index e987415300ac..d718d701416b 100644 --- a/src/agents/model-selection-shared.ts +++ b/src/agents/model-selection-shared.ts @@ -1106,7 +1106,6 @@ export function resolveAllowedModelRefFromAliasIndex( return { ref: resolved.ref, key: status.key }; } -/** True when config contains provider model rows that should seed catalogs. */ function hasConfiguredProviderModelRows(cfg: OpenClawConfig): boolean { const providers = cfg.models?.providers; if (!providers || typeof providers !== "object") { diff --git a/src/agents/modes/interactive/components/diff.ts b/src/agents/modes/interactive/components/diff.ts index c03580dde536..a49b9dec37c6 100644 --- a/src/agents/modes/interactive/components/diff.ts +++ b/src/agents/modes/interactive/components/diff.ts @@ -86,7 +86,6 @@ export function renderDiff(diffText: string): string { } if (parsed.prefix === "-") { - // Collect consecutive removed lines const removedLines: { lineNum: string; content: string }[] = []; while (i < lines.length) { const currentLine = lines.at(i); @@ -98,7 +97,6 @@ export function renderDiff(diffText: string): string { i++; } - // Collect consecutive added lines const addedLines: { lineNum: string; content: string }[] = []; while (i < lines.length) { const currentLine = lines.at(i); @@ -138,11 +136,9 @@ export function renderDiff(diffText: string): string { } } } else if (parsed.prefix === "+") { - // Standalone added line result.push(theme.fg("toolDiffAdded", `+${parsed.lineNum} ${replaceTabs(parsed.content)}`)); i++; } else { - // Context line result.push(theme.fg("toolDiffContext", ` ${parsed.lineNum} ${replaceTabs(parsed.content)}`)); i++; } diff --git a/src/agents/modes/interactive/theme/theme.ts b/src/agents/modes/interactive/theme/theme.ts index fe19993792bd..d4692478b47d 100644 --- a/src/agents/modes/interactive/theme/theme.ts +++ b/src/agents/modes/interactive/theme/theme.ts @@ -23,7 +23,6 @@ const ThemeJsonSchema = Type.Object({ name: Type.String(), vars: Type.Optional(Type.Record(Type.String(), ColorValueSchema)), colors: Type.Object({ - // Core UI (10 colors) accent: ColorValueSchema, border: ColorValueSchema, borderAccent: ColorValueSchema, @@ -35,7 +34,6 @@ const ThemeJsonSchema = Type.Object({ dim: ColorValueSchema, text: ColorValueSchema, thinkingText: ColorValueSchema, - // Backgrounds & Content Text (11 colors) selectedBg: ColorValueSchema, userMessageBg: ColorValueSchema, userMessageText: ColorValueSchema, @@ -47,7 +45,6 @@ const ThemeJsonSchema = Type.Object({ toolErrorBg: ColorValueSchema, toolTitle: ColorValueSchema, toolOutput: ColorValueSchema, - // Markdown (10 colors) mdHeading: ColorValueSchema, mdLink: ColorValueSchema, mdLinkUrl: ColorValueSchema, @@ -58,11 +55,9 @@ const ThemeJsonSchema = Type.Object({ mdQuoteBorder: ColorValueSchema, mdHr: ColorValueSchema, mdListBullet: ColorValueSchema, - // Tool Diffs (3 colors) toolDiffAdded: ColorValueSchema, toolDiffRemoved: ColorValueSchema, toolDiffContext: ColorValueSchema, - // Syntax Highlighting (9 colors) syntaxComment: ColorValueSchema, syntaxKeyword: ColorValueSchema, syntaxFunction: ColorValueSchema, @@ -72,14 +67,12 @@ const ThemeJsonSchema = Type.Object({ syntaxType: ColorValueSchema, syntaxOperator: ColorValueSchema, syntaxPunctuation: ColorValueSchema, - // Thinking Level Borders (6 colors) thinkingOff: ColorValueSchema, thinkingMinimal: ColorValueSchema, thinkingLow: ColorValueSchema, thinkingMedium: ColorValueSchema, thinkingHigh: ColorValueSchema, thinkingXhigh: ColorValueSchema, - // Bash Mode (1 color) bashMode: ColorValueSchema, }), export: Type.Optional( @@ -156,7 +149,6 @@ function colorDistance( } function rgbTo256(r: number, g: number, b: number): number { - // Find closest color in the 6x6x6 cube const rIdx = findClosestPaletteIndex(r, CUBE_VALUES); const gIdx = findClosestPaletteIndex(g, CUBE_VALUES); const bIdx = findClosestPaletteIndex(b, CUBE_VALUES); @@ -169,7 +161,6 @@ function rgbTo256(r: number, g: number, b: number): number { const cubeIndex = 16 + 36 * rIdx + 6 * gIdx + bIdx; const cubeDist = colorDistance(r, g, b, cubeR, cubeG, cubeB); - // Find closest grayscale const gray = Math.round(0.299 * r + 0.587 * g + 0.114 * b); const grayIdx = findClosestPaletteIndex(gray, GRAY_VALUES); const grayValue = GRAY_VALUES[grayIdx]; diff --git a/src/agents/sessions/agent-session-tree.ts b/src/agents/sessions/agent-session-tree.ts index 45e0140bcdf0..6f577026a3ad 100644 --- a/src/agents/sessions/agent-session-tree.ts +++ b/src/agents/sessions/agent-session-tree.ts @@ -98,7 +98,6 @@ export abstract class AgentSessionTree extends AgentSessionExecution { fromExtension = true; } - // Allow extensions to override instructions and label if (result?.customInstructions !== undefined) { customInstructions = result.customInstructions; } diff --git a/src/agents/sessions/model-registry-schema.ts b/src/agents/sessions/model-registry-schema.ts index d69363d682e9..58a35d319801 100644 --- a/src/agents/sessions/model-registry-schema.ts +++ b/src/agents/sessions/model-registry-schema.ts @@ -43,13 +43,11 @@ const OpenRouterRoutingSchema = Type.Object({ preferred_max_latency: Type.Optional(Type.Union([Type.Number(), PercentileCutoffsSchema])), }); -// Schema for Vercel AI Gateway routing preferences const VercelGatewayRoutingSchema = Type.Object({ only: Type.Optional(Type.Array(Type.String())), order: Type.Optional(Type.Array(Type.String())), }); -// Schema for thinking level support and provider-specific values const ThinkingLevelMapValueSchema = Type.Union([Type.String(), Type.Null()]); const ThinkingLevelMapSchema = Type.Object({ off: Type.Optional(ThinkingLevelMapValueSchema), diff --git a/src/agents/sessions/model-resolver.ts b/src/agents/sessions/model-resolver.ts index 4b3d735d328f..30b566d69601 100644 --- a/src/agents/sessions/model-resolver.ts +++ b/src/agents/sessions/model-resolver.ts @@ -266,7 +266,6 @@ export async function resolveModelScope( const scopedModels: ScopedModel[] = []; for (const pattern of patterns) { - // Check if pattern contains glob characters if (pattern.includes("*") || pattern.includes("?") || pattern.includes("[")) { // Extract optional thinking level suffix (e.g., "provider/*:high") const suffix = splitModelPatternSuffix(pattern); @@ -312,7 +311,6 @@ export async function resolveModelScope( continue; } - // Avoid duplicates if (!scopedModels.some((sm) => modelsAreEqual(sm.model, model))) { scopedModels.push({ model, thinkingLevel }); } diff --git a/src/agents/sessions/sdk.ts b/src/agents/sessions/sdk.ts index dd9bf65b90e1..30dbc2b5ccfb 100644 --- a/src/agents/sessions/sdk.ts +++ b/src/agents/sessions/sdk.ts @@ -125,8 +125,6 @@ interface CreateAgentSessionResult { modelFallbackMessage?: string; } -// Helper Functions - function createSessionPrepareNextTurnWithContext( getAgent: () => Agent, ): NonNullable { @@ -273,7 +271,6 @@ async function createAgentSessionImpl( } let resourceLoader = options.resourceLoader; - // Use provided or create AuthStorage and ModelRegistry const config = options.authStorage && options.modelRegistry ? undefined : install.config; const authStorage = options.authStorage ?? AuthStorage.forAgent(agentDir, config); const modelRegistry = @@ -303,7 +300,6 @@ async function createAgentSessionImpl( modelRegistry.refresh(); } - // Check if session has existing data to restore const existingSession = await sessionManager[sessionManagerReadInitialContext](); assertInitialSessionCurrent(); const hasExistingSession = existingSession.messages.length > 0; @@ -314,7 +310,6 @@ async function createAgentSessionImpl( let model = options.model; let modelFallbackMessage: string | undefined; - // If session has data, try to restore model from it if (!model && hasExistingSession && existingSession.model) { const restoredModel = modelRegistry.find( existingSession.model.provider, @@ -379,7 +374,6 @@ async function createAgentSessionImpl( settingsManager.getDefaultThinkingLevel() ?? modelThinkingDefault; - // Clamp to model capabilities if (!model) { thinkingLevel = "off"; } else { @@ -405,7 +399,6 @@ async function createAgentSessionImpl( if (!settingsManager.getBlockImages()) { return converted; } - // Filter out ImageContent from all messages, replacing with text placeholder return converted.map((msg) => { if (msg.role === "user" || msg.role === "toolResult") { const content = msg.content; @@ -420,7 +413,6 @@ async function createAgentSessionImpl( ) .filter((c, i, arr) => { const previous = arr.at(i - 1); - // Dedupe consecutive "Image reading is disabled." texts return !( c.type === "text" && c.text === "Image reading is disabled." && diff --git a/src/agents/sessions/tools/find.ts b/src/agents/sessions/tools/find.ts index 28b569cdd8b3..4f49522ac017 100644 --- a/src/agents/sessions/tools/find.ts +++ b/src/agents/sessions/tools/find.ts @@ -180,7 +180,6 @@ export function createFindToolDefinition( const effectiveLimit = normalizePositiveLimit(limit, DEFAULT_LIMIT); // One extra candidate distinguishes an exact-size result from a truncated one. const observationLimit = effectiveLimit + 1; - // If custom operations provide glob(), use that instead of fd. if (customOps?.glob) { if (!(await customOps.exists(searchPath))) { settle(() => reject(new Error(`Path not found: ${searchPath}`))); @@ -222,7 +221,6 @@ export function createFindToolDefinition( return; } - // Default implementation uses fd. const fdPath = await ensureTool("fd", true); if (signal?.aborted) { settle(() => reject(new Error("Operation aborted"))); diff --git a/src/agents/subagents/announce/subagent-announce-dispatch.ts b/src/agents/subagents/announce/subagent-announce-dispatch.ts index 45f654ec083f..9ff9c3ddecc1 100644 --- a/src/agents/subagents/announce/subagent-announce-dispatch.ts +++ b/src/agents/subagents/announce/subagent-announce-dispatch.ts @@ -29,7 +29,6 @@ type SubagentAnnounceSteerOutcome = | { status: "steered"; deliveredAt?: number; enqueuedAt?: number } | { status: "none" | "dropped" | "source_owner_changed" }; -/** Result of trying to deliver a subagent announcement. */ export type SubagentAnnounceDeliveryResult = { delivered: boolean; path: SubagentDeliveryPath; @@ -73,7 +72,6 @@ export function sourceOwnerChangedResult(): SubagentAnnounceDeliveryResult { }; } -/** Converts a steer outcome into the shared delivery result shape. */ function mapSteerOutcomeToDeliveryResult( outcome: SubagentAnnounceSteerOutcome, ): SubagentAnnounceDeliveryResult { diff --git a/src/agents/subagents/registry/subagent-registry-helpers.ts b/src/agents/subagents/registry/subagent-registry-helpers.ts index 2b523f748da5..cb08f38879a8 100644 --- a/src/agents/subagents/registry/subagent-registry-helpers.ts +++ b/src/agents/subagents/registry/subagent-registry-helpers.ts @@ -305,7 +305,6 @@ export async function safeRemoveAttachmentsDir( } } -/** Resolves the completed subagent archive delay from config. */ function resolveArchiveAfterMs(cfg?: OpenClawConfig) { const config = cfg ?? getRuntimeConfig(); const minutes = diff --git a/src/agents/subagents/registry/subagent-registry-maintenance.ts b/src/agents/subagents/registry/subagent-registry-maintenance.ts index f2a822064af3..1d3f90f17806 100644 --- a/src/agents/subagents/registry/subagent-registry-maintenance.ts +++ b/src/agents/subagents/registry/subagent-registry-maintenance.ts @@ -29,7 +29,6 @@ function shouldPreserveForMaintenance(entry: SubagentRunMaintenanceRecord): bool ); } -/** Lists child session keys protected from session-store maintenance pruning. */ function protectedSubagentSessionKeys(runs: Iterable): string[] { const keys = new Set(); for (const entry of runs) { diff --git a/src/agents/tools/gateway-question-lifecycle.ts b/src/agents/tools/gateway-question-lifecycle.ts index fede1b8a3856..d136405a02dc 100644 --- a/src/agents/tools/gateway-question-lifecycle.ts +++ b/src/agents/tools/gateway-question-lifecycle.ts @@ -29,7 +29,6 @@ const TERMINAL_QUESTION_ERROR_REASONS = new Set([ "QUESTION_NOT_FOUND", ]); -/** Reads the Gateway's structured failure from a question RPC rejection. */ export function readQuestionRejection( error: unknown, ): { code: unknown; reason?: string } | undefined { @@ -49,7 +48,6 @@ export function isTerminalQuestionResolveError(error: unknown): boolean { return reason !== undefined && TERMINAL_QUESTION_ERROR_REASONS.has(reason); } -/** Waits for one question's terminal state, validating the Gateway's payload. */ export async function awaitGatewayQuestionAnswer(params: { gatewayCall: GatewayQuestionCall; questionId: string; diff --git a/src/agents/tools/gateway-schema.ts b/src/agents/tools/gateway-schema.ts index c12bbc0784d1..c0fc17551d10 100644 --- a/src/agents/tools/gateway-schema.ts +++ b/src/agents/tools/gateway-schema.ts @@ -6,7 +6,6 @@ import { Type } from "typebox"; import { optionalPositiveIntegerSchema } from "../schema/typebox.js"; -/** Returns optional gateway URL/token/timeout schema properties for tool params. */ export function gatewayCallOptionSchemaProperties() { return { gatewayUrl: Type.Optional(Type.String()), diff --git a/src/agents/tools/web-fetch-visibility.ts b/src/agents/tools/web-fetch-visibility.ts index 4fb4ca084c6c..a7cecb745223 100644 --- a/src/agents/tools/web-fetch-visibility.ts +++ b/src/agents/tools/web-fetch-visibility.ts @@ -37,7 +37,6 @@ const HIDDEN_STYLE_PATTERNS = ( return [new RegExp(`(?:^|;)\\s*${escapedProp}\\s*:\\s*([^;]+)`, "i"), valuePattern] as const; }); -// Class names associated with visually hidden content const HIDDEN_CLASS_NAMES = new Set([ "sr-only", "visually-hidden", @@ -78,7 +77,6 @@ function isStyleHidden(style: string): boolean { } } - // width:0 + height:0 + overflow:hidden const width = style.match(/(?:^|;)\s*width\s*:\s*([^;]+)/i); const height = style.match(/(?:^|;)\s*height\s*:\s*([^;]+)/i); const overflow = style.match(/(?:^|;)\s*overflow\s*:\s*([^;]+)/i); diff --git a/src/agents/utils/frontmatter.ts b/src/agents/utils/frontmatter.ts index 8ab2356d03cf..7f680b915b44 100644 --- a/src/agents/utils/frontmatter.ts +++ b/src/agents/utils/frontmatter.ts @@ -7,7 +7,6 @@ import { parse } from "yaml"; import { extractFrontmatterBlock } from "../../../packages/markdown-core/src/frontmatter.js"; -/** Parsed frontmatter metadata plus the remaining document body. */ type ParsedFrontmatter> = { frontmatter: T; body: string; diff --git a/src/agents/utils/syntax-highlight.ts b/src/agents/utils/syntax-highlight.ts index ca3299fa52da..5c61b96acb9b 100644 --- a/src/agents/utils/syntax-highlight.ts +++ b/src/agents/utils/syntax-highlight.ts @@ -58,12 +58,10 @@ function loadHighlightJsRuntime(): HighlightJs { return setHighlightJsRuntime(createRequire(import.meta.url)("highlight.js")); } -/** Formatter applied to highlighted text segments. */ type HighlightFormatter = (text: string) => string; /** Mapping from highlight.js scope names to text formatters. */ type HighlightTheme = Partial>; -/** Options used when highlighting code and rendering themed text. */ interface HighlightOptions { language?: string; ignoreIllegals?: boolean; diff --git a/src/auto-reply/command-auth.ts b/src/auto-reply/command-auth.ts index 4301b313a272..598f4b708b51 100644 --- a/src/auto-reply/command-auth.ts +++ b/src/auto-reply/command-auth.ts @@ -262,7 +262,6 @@ function resolveCommandsAllowFromList( return null; // Not configured, fall back to channel allowFrom } - // Check provider-specific list first, then fall back to global "*" const providerKey = params.providerId ?? ""; const providerList = commandsAllowFrom[providerKey]; const globalList = commandsAllowFrom["*"]; diff --git a/src/auto-reply/heartbeat.ts b/src/auto-reply/heartbeat.ts index fc77e1ea61fb..073b31ee1a9e 100644 --- a/src/auto-reply/heartbeat.ts +++ b/src/auto-reply/heartbeat.ts @@ -178,11 +178,8 @@ export function stripHeartbeatToken( // (e.g., HEARTBEAT_OK or **HEARTBEAT_OK**) still strips. const stripMarkup = (text: string) => text - // Drop HTML tags. .replace(/<[^>]*>/g, " ") - // Decode common nbsp variant. .replace(/ /gi, " ") - // Remove markdown-ish wrappers at the edges. .replace(/^[*`~_]+/, "") .replace(/[*`~_]+$/, ""); diff --git a/src/auto-reply/reply/dispatch-from-config.choose-route.ts b/src/auto-reply/reply/dispatch-from-config.choose-route.ts index 2084962d09a7..55f780a63e85 100644 --- a/src/auto-reply/reply/dispatch-from-config.choose-route.ts +++ b/src/auto-reply/reply/dispatch-from-config.choose-route.ts @@ -555,7 +555,6 @@ export async function chooseDispatchRoute(state: PrepareDispatchOperationReadySt }; }; - // Run before_dispatch hook — let plugins inspect or handle before model dispatch. if ( state.allowInboundHandlers && !admittedSessionSettingsRestrictRuntime(params.replyOptions?.admittedSessionSettings) && diff --git a/src/auto-reply/reply/dispatch-from-config.gather.ts b/src/auto-reply/reply/dispatch-from-config.gather.ts index e26ab2973b21..1f4b83b2d4dc 100644 --- a/src/auto-reply/reply/dispatch-from-config.gather.ts +++ b/src/auto-reply/reply/dispatch-from-config.gather.ts @@ -467,7 +467,6 @@ export async function gatherDispatchRequest( }); })); const hookRunner = getGlobalHookRunner(); - // Extract message context for hooks (plugin and internal) const timestamp = typeof ctx.Timestamp === "number" && Number.isFinite(ctx.Timestamp) ? ctx.Timestamp : undefined; const messageIdForHook = diff --git a/src/auto-reply/reply/dispatch-from-config.prepare-execution.ts b/src/auto-reply/reply/dispatch-from-config.prepare-execution.ts index 28cb48e28e31..b6aa6b650783 100644 --- a/src/auto-reply/reply/dispatch-from-config.prepare-execution.ts +++ b/src/auto-reply/reply/dispatch-from-config.prepare-execution.ts @@ -87,7 +87,6 @@ export async function prepareDispatchExecution(state: ChooseDispatchRouteReadySt markInboundDedupeReplayUnsafe(); turnLedger.sendQueued("tool", replyPayload); }; - // Track accumulated block text for TTS generation after streaming completes. // When block streaming succeeds, there's no final reply, so we need to generate // TTS audio separately from the accumulated block content. const progressState = { diff --git a/src/auto-reply/reply/inbound-text.ts b/src/auto-reply/reply/inbound-text.ts index 937399ac8217..b9d926ab2d9c 100644 --- a/src/auto-reply/reply/inbound-text.ts +++ b/src/auto-reply/reply/inbound-text.ts @@ -1,6 +1,5 @@ /** Normalizes real inbound newline characters while preserving literal escape text. */ export function normalizeInboundTextNewlines(input: string): string { - // Normalize actual newline characters (CR+LF and CR to LF). // Do NOT replace literal backslash-n sequences (\\n) as they may be part of // Windows paths like C:\Work\nxxx\README.md or user-intended escape sequences. return input.replaceAll("\r\n", "\n").replaceAll("\r", "\n"); diff --git a/src/auto-reply/reply/normalize-reply.ts b/src/auto-reply/reply/normalize-reply.ts index f095e6a90539..33554a8f1d23 100644 --- a/src/auto-reply/reply/normalize-reply.ts +++ b/src/auto-reply/reply/normalize-reply.ts @@ -166,7 +166,6 @@ export function normalizeReplyPayloadOutcome( text = enrichedPayload.text; } - // Resolve template variables in responsePrefix if context is provided const effectivePrefix = opts.responsePrefixContext ? resolveResponsePrefixTemplate(opts.responsePrefix, opts.responsePrefixContext) : opts.responsePrefix; diff --git a/src/auto-reply/reply/reply-dispatcher.ts b/src/auto-reply/reply/reply-dispatcher.ts index f9439428460e..31c0eb9d4f60 100644 --- a/src/auto-reply/reply/reply-dispatcher.ts +++ b/src/auto-reply/reply/reply-dispatcher.ts @@ -572,7 +572,6 @@ export function createReplyDispatcher( deliveryOutcomeTracker.tracked = true; } - // Determine if we should add human-like delay (only for block replies after the first). const shouldDelay = kind === "block" && sentFirstBlock; if (kind === "block") { sentFirstBlock = true; diff --git a/src/channels/registry-lookup.ts b/src/channels/registry-lookup.ts index 1aba7a7d34b0..0ebd7740eb4c 100644 --- a/src/channels/registry-lookup.ts +++ b/src/channels/registry-lookup.ts @@ -68,7 +68,6 @@ function buildRegisteredChannelPluginLookup(): RegisteredChannelPluginLookup { return registeredChannelPluginLookup; } -/** Lists active channel plugin registrations from the current registry snapshot. */ export function listRegisteredChannelPluginEntries(): ActivePluginChannelRegistration[] { return buildRegisteredChannelPluginLookup().entries; } diff --git a/src/cli/completion-runtime.ts b/src/cli/completion-runtime.ts index e4b3e34e34f3..e649df2747b2 100644 --- a/src/cli/completion-runtime.ts +++ b/src/cli/completion-runtime.ts @@ -48,7 +48,6 @@ function encodeCompletionProfile(content: string, encoding: CompletionProfileEnc return encoding === "utf16be" ? buffer.swap16() : buffer; } -/** Narrows an arbitrary shell label to a completion shell supported by installer logic. */ export function isCompletionShell(value: string): value is CompletionShell { return COMPLETION_SHELLS.includes(value as CompletionShell); } @@ -102,7 +101,6 @@ export function resolveCompletionCachePath(shell: CompletionShell, binName: stri ); } -/** Check if the completion cache file exists for the given shell. */ export async function completionCacheExists( shell: CompletionShell, binName = "openclaw", diff --git a/src/cli/nodes-cli/register.camera.ts b/src/cli/nodes-cli/register.camera.ts index 233f2e616981..c2798f9af1db 100644 --- a/src/cli/nodes-cli/register.camera.ts +++ b/src/cli/nodes-cli/register.camera.ts @@ -39,7 +39,6 @@ const parseFacing = (value: string): CameraFacing => { throw new Error(`invalid facing: ${value} (expected front|back)`); }; -/** Register node camera list/snap/clip commands. */ export function registerNodesCameraCommands(nodes: Command) { const camera = nodes.command("camera").description("Capture camera media from a paired node"); diff --git a/src/cli/nodes-cli/register.invoke.ts b/src/cli/nodes-cli/register.invoke.ts index a5b151ddca9d..0b28c6e98e94 100644 --- a/src/cli/nodes-cli/register.invoke.ts +++ b/src/cli/nodes-cli/register.invoke.ts @@ -25,7 +25,6 @@ function parseNodeInvokeParams(value = "{}"): unknown { } } -/** Register direct node command invocation. */ export function registerNodesInvokeCommands(nodes: Command) { nodesCallOpts( nodes diff --git a/src/cli/nodes-cli/register.location.ts b/src/cli/nodes-cli/register.location.ts index 231ee3d0a576..e3edee74dcf6 100644 --- a/src/cli/nodes-cli/register.location.ts +++ b/src/cli/nodes-cli/register.location.ts @@ -12,7 +12,6 @@ import { } from "./rpc.js"; import type { NodesRpcOpts } from "./types.js"; -/** Register node location lookup commands. */ export function registerNodesLocationCommands(nodes: Command) { const location = nodes.command("location").description("Fetch location from a paired node"); diff --git a/src/cli/nodes-cli/register.notify.ts b/src/cli/nodes-cli/register.notify.ts index 78e59d1d3873..02344089e55e 100644 --- a/src/cli/nodes-cli/register.notify.ts +++ b/src/cli/nodes-cli/register.notify.ts @@ -11,7 +11,6 @@ import { } from "./rpc.js"; import type { NodesRpcOpts } from "./types.js"; -/** Register node notification command. */ export function registerNodesNotifyCommand(nodes: Command) { nodesCallOpts( nodes diff --git a/src/cli/nodes-cli/register.pairing.ts b/src/cli/nodes-cli/register.pairing.ts index 916d2e5e9d38..6bfec6fb5e5b 100644 --- a/src/cli/nodes-cli/register.pairing.ts +++ b/src/cli/nodes-cli/register.pairing.ts @@ -122,7 +122,6 @@ function rethrowUnknownNodePairRequestId( throw error; } -/** Register node pairing management commands. */ export function registerNodesPairingCommands(nodes: Command) { nodesCallOpts( nodes diff --git a/src/cli/nodes-cli/register.screen.ts b/src/cli/nodes-cli/register.screen.ts index 0d0917139484..a2c84271903b 100644 --- a/src/cli/nodes-cli/register.screen.ts +++ b/src/cli/nodes-cli/register.screen.ts @@ -19,7 +19,6 @@ import { } from "./rpc.js"; import type { NodesRpcOpts } from "./types.js"; -/** Register node screen recording commands. */ export function registerNodesScreenCommands(nodes: Command) { const screen = nodes .command("screen") diff --git a/src/cli/program/message/register.discord-admin.ts b/src/cli/program/message/register.discord-admin.ts index 40d0d68873d5..5f9fe6757abc 100644 --- a/src/cli/program/message/register.discord-admin.ts +++ b/src/cli/program/message/register.discord-admin.ts @@ -9,7 +9,6 @@ const requiredOptions = { startTime: ["--start-time ", "Event start time"], } as const; -/** Register Discord admin and moderation message subcommands. */ export function registerMessageDiscordAdminCommands(message: Command, helpers: MessageCliHelpers) { function register( parent: Command, diff --git a/src/cli/program/message/register.permissions-search.ts b/src/cli/program/message/register.permissions-search.ts index 9f13c931615e..b1ca7987a007 100644 --- a/src/cli/program/message/register.permissions-search.ts +++ b/src/cli/program/message/register.permissions-search.ts @@ -3,7 +3,6 @@ import type { Command } from "commander"; import { collectOption } from "../helpers.js"; import type { MessageCliHelpers } from "./helpers.js"; -/** Register the channel permissions inspection command. */ export function registerMessagePermissionsCommand(message: Command, helpers: MessageCliHelpers) { helpers .withMessageBase( @@ -13,7 +12,6 @@ export function registerMessagePermissionsCommand(message: Command, helpers: Mes .action((opts) => helpers.runMessageAction("permissions", opts)); } -/** Register the channel message search command and repeatable filters. */ export function registerMessageSearchCommand(message: Command, helpers: MessageCliHelpers) { helpers .withMessageBase(message.command("search").description("Search messages")) diff --git a/src/cli/program/message/register.read-edit-delete.ts b/src/cli/program/message/register.read-edit-delete.ts index 116f3d12baf1..19b63fb2247a 100644 --- a/src/cli/program/message/register.read-edit-delete.ts +++ b/src/cli/program/message/register.read-edit-delete.ts @@ -1,7 +1,6 @@ import { Option, type Command } from "commander"; import type { MessageCliHelpers } from "./helpers.js"; -/** Register message read, edit, and delete commands. */ export function registerMessageReadEditDeleteCommands( message: Command, helpers: MessageCliHelpers, diff --git a/src/cli/program/message/register.thread.ts b/src/cli/program/message/register.thread.ts index 22b6833aa1ef..3d1cc648478f 100644 --- a/src/cli/program/message/register.thread.ts +++ b/src/cli/program/message/register.thread.ts @@ -21,7 +21,6 @@ function resolveThreadCreateRequest(opts: Record) { }; } -/** Register thread create/list/reply commands. */ export function registerMessageThreadCommands(message: Command, helpers: MessageCliHelpers) { const thread = message.command("thread").description("Thread actions"); diff --git a/src/cli/program/register.configure.ts b/src/cli/program/register.configure.ts index 8907cc738ec6..43500528d950 100644 --- a/src/cli/program/register.configure.ts +++ b/src/cli/program/register.configure.ts @@ -5,7 +5,6 @@ import { runCommandWithRuntime } from "../cli-utils.js"; import { formatDocsHelp } from "../help-format.js"; import { collectOption } from "./helpers.js"; -/** Register the interactive `configure` command and section filter flag. */ export function registerConfigureCommand(program: Command): void { program .command("configure") diff --git a/src/commands/auth-choice-options.ts b/src/commands/auth-choice-options.ts index 29d642732740..00e31e0b808f 100644 --- a/src/commands/auth-choice-options.ts +++ b/src/commands/auth-choice-options.ts @@ -102,7 +102,6 @@ export function formatAuthChoiceChoicesForCli(params?: { return uniqueStrings(values).join("|"); } -/** Build flat auth-choice options from core choices plus provider setup flows. */ function buildAuthChoiceOptions(params: { assistantVisibleOnly?: boolean; detectedProviderIds?: ReadonlySet; diff --git a/src/commands/channels/shared.ts b/src/commands/channels/shared.ts index f9d7fed5b201..933944d7d1f6 100644 --- a/src/commands/channels/shared.ts +++ b/src/commands/channels/shared.ts @@ -50,7 +50,6 @@ function formatAccountLabel(params: { accountId: string; name?: string }) { return base; } -/** Format a channel/account label with optional display styles for terminal output. */ export function formatChannelAccountLabel(params: { channel: ChatChannel; accountId: string; @@ -104,7 +103,6 @@ export function appendEnabledConfiguredLinkedBits( } } -/** Append account mode metadata when present. */ export function appendModeBit(bits: string[], account: Record) { if (typeof account.mode === "string" && account.mode.length > 0) { bits.push(`mode:${account.mode}`); @@ -129,14 +127,12 @@ export function appendTokenSourceBits(bits: string[], account: Record) { if (typeof account.baseUrl === "string" && account.baseUrl) { bits.push(`url:${account.baseUrl}`); } } -/** Build a complete human-readable channel account status line. */ export function buildChannelAccountLine( provider: ChatChannel, account: Record, diff --git a/src/commands/configure.channels.ts b/src/commands/configure.channels.ts index 2d1a0c62ea03..96909cff152d 100644 --- a/src/commands/configure.channels.ts +++ b/src/commands/configure.channels.ts @@ -57,7 +57,6 @@ function compareChannelRemovalChoices( ); } -/** Prompt for configured channel sections to remove from openclaw.json. */ export async function removeChannelConfigWizard( cfg: OpenClawConfig, runtime: RuntimeEnv, diff --git a/src/commands/configure.shared.ts b/src/commands/configure.shared.ts index 20bc7821bd03..0779f9f3e6db 100644 --- a/src/commands/configure.shared.ts +++ b/src/commands/configure.shared.ts @@ -65,11 +65,8 @@ export const CONFIGURE_SECTION_OPTIONS = [ export type WizardSection = (typeof CONFIGURE_SECTION_OPTIONS)[number]["value"]; export const CONFIGURE_WIZARD_SECTIONS = CONFIGURE_SECTION_OPTIONS.map((option) => option.value); -/** Styled configure wizard intro wrapper. */ export const intro = (message: string) => clackIntro(stylePromptTitle(message) ?? message); -/** Styled configure wizard outro wrapper. */ export const outro = (message: string) => clackOutro(stylePromptTitle(message) ?? message); -/** Styled text prompt wrapper. */ export const text = (params: Parameters[0]): ReturnType => clackText({ ...params, @@ -83,7 +80,6 @@ export const password = ( ...params, message: stylePromptMessage(params.message), }); -/** Styled confirm prompt wrapper. */ export const confirm = ( params: Parameters[0], ): ReturnType => diff --git a/src/commands/doctor-config-analysis.ts b/src/commands/doctor-config-analysis.ts index 2d3e0487419c..f56b6e71c571 100644 --- a/src/commands/doctor-config-analysis.ts +++ b/src/commands/doctor-config-analysis.ts @@ -134,7 +134,6 @@ export function noteMissingDefaultAgentOwner(cfg: OpenClawConfig): void { } } -/** Formats a parsed config issue path into a user-facing dotted path. */ export function formatConfigKeyPath(parts: Array): string { let out = ""; for (const part of parts) { diff --git a/src/commands/doctor-workspace.ts b/src/commands/doctor-workspace.ts index e68124fd4f2c..894f5f39a6ce 100644 --- a/src/commands/doctor-workspace.ts +++ b/src/commands/doctor-workspace.ts @@ -48,7 +48,6 @@ export function collectWorkspaceBackupTip(workspaceDir: string): string | null { return "- Tip: back up the agent workspace in a private git repo; keep ~/.openclaw out of git (credentials, sessions). Details: /concepts/agent-workspace#git-backup-recommended-private"; } -/** Returns true when the workspace appears to lack canonical memory guidance. */ export async function shouldSuggestMemorySystem(workspaceDir: string): Promise { const entries = await listWorkspaceEntries(workspaceDir); if (entries.has(CANONICAL_ROOT_MEMORY_FILENAME)) { @@ -126,7 +125,6 @@ async function listWorkspaceEntries(workspaceDir: string): Promise> } } -/** Detects canonical and legacy root memory files in a workspace. */ async function detectRootMemoryFiles(workspaceDir: string): Promise { const resolvedWorkspace = path.resolve(workspaceDir); const canonicalPath = resolveCanonicalRootMemoryPath(resolvedWorkspace); @@ -155,7 +153,6 @@ function formatBytes(bytes?: number): string { return typeof bytes === "number" ? `${bytes} bytes` : "size unknown"; } -/** Formats the warning for split canonical/legacy root memory files. */ function formatRootMemoryFilesWarning(detection: RootMemoryFilesDetection): string | null { if (detection.canonicalExists && detection.legacyExists) { return [ @@ -317,7 +314,6 @@ type WorkspaceMemoryDoctorScope = { labelAgent: boolean; }; -/** Emits workspace root-memory health warnings. */ export async function noteWorkspaceMemoryHealth( cfg: OpenClawConfig, scope?: WorkspaceMemoryDoctorScope, diff --git a/src/commands/migrate/context.ts b/src/commands/migrate/context.ts index 46b3b53533d8..fb3013a9a499 100644 --- a/src/commands/migrate/context.ts +++ b/src/commands/migrate/context.ts @@ -53,7 +53,6 @@ export function resolveMigrationTargetAgentId( return resolveConfiguredAgentId(config, agentId); } -/** Builds the provider-facing migration context from CLI options and runtime state. */ export function buildMigrationContext(params: { source?: string; targetAgentId?: string; diff --git a/src/commands/migrate/providers.ts b/src/commands/migrate/providers.ts index 3bbb33ef16bc..e606b0d068f8 100644 --- a/src/commands/migrate/providers.ts +++ b/src/commands/migrate/providers.ts @@ -30,7 +30,6 @@ export async function withMigrationProvider( ); } -/** Builds provider-specific options from shared migrate CLI flags. */ export function buildMigrationProviderOptions( opts: MigrateCommonOptions, providerId = opts.provider, diff --git a/src/commands/models/load-config.ts b/src/commands/models/load-config.ts index ac036df47ecb..37b41a3c5099 100644 --- a/src/commands/models/load-config.ts +++ b/src/commands/models/load-config.ts @@ -9,7 +9,6 @@ import { } from "../../config/config.js"; import type { RuntimeEnv } from "../../runtime.js"; -/** Source and resolved config pair returned by model command config loading. */ type LoadedModelsConfig = { sourceConfig: OpenClawConfig; resolvedConfig: OpenClawConfig; @@ -43,7 +42,6 @@ export async function loadModelsConfigWithSource(params: { }; } -/** Loads the resolved model command config when callers do not need source metadata. */ export async function loadModelsConfig(params: { commandName: string; runtime?: RuntimeEnv; diff --git a/src/commands/onboard-non-interactive/local/auth-choice-inference.ts b/src/commands/onboard-non-interactive/local/auth-choice-inference.ts index c7043964a074..0d58b622557b 100644 --- a/src/commands/onboard-non-interactive/local/auth-choice-inference.ts +++ b/src/commands/onboard-non-interactive/local/auth-choice-inference.ts @@ -15,7 +15,6 @@ type AuthChoiceFlag = { label: string; }; -/** Inferred auth choice plus every flag that matched the provided options. */ export type AuthChoiceInference = { choice?: AuthChoice; matches: AuthChoiceFlag[]; diff --git a/src/commands/onboard-non-interactive/local/skills-config.ts b/src/commands/onboard-non-interactive/local/skills-config.ts index 8dbb2c1f42de..801fb00cc627 100644 --- a/src/commands/onboard-non-interactive/local/skills-config.ts +++ b/src/commands/onboard-non-interactive/local/skills-config.ts @@ -2,7 +2,6 @@ import type { OpenClawConfig } from "../../../config/types.openclaw.js"; import type { RuntimeEnv } from "../../../runtime.js"; import { isNodeManagerChoice, type OnboardOptions } from "../../onboard-types.js"; -/** Applies the non-interactive skills install options to the pending config. */ export function applyNonInteractiveSkillsConfig(params: { nextConfig: OpenClawConfig; opts: OnboardOptions; diff --git a/src/commands/status-json-command.ts b/src/commands/status-json-command.ts index f3acdb282b0f..9bfaccdf6769 100644 --- a/src/commands/status-json-command.ts +++ b/src/commands/status-json-command.ts @@ -22,7 +22,6 @@ export function assertStatusUsageAgentScope(opts: StatusJsonCommandOptions): voi } } -/** Runs the fast status scan, resolves optional deep fields, and writes JSON through the runtime. */ export async function runStatusJsonCommand(params: { opts: StatusJsonCommandOptions & StatusGatewayProbeBudget; runtime: RuntimeEnv; diff --git a/src/commands/status-json-runtime.ts b/src/commands/status-json-runtime.ts index 8b544f13d6cf..8fccfe1381a3 100644 --- a/src/commands/status-json-runtime.ts +++ b/src/commands/status-json-runtime.ts @@ -11,7 +11,6 @@ import { import type { StatusGatewayProbeBudget } from "./status.gateway-probe-budget.js"; import type { StatusJsonScanResult } from "./status.scan-result.ts"; -/** Builds the status JSON object from a completed scan plus optional runtime/deep probes. */ export async function resolveStatusJsonOutput(params: { scan: StatusJsonScanResult; opts: StatusGatewayProbeBudget & { diff --git a/src/commands/status-runtime-shared.ts b/src/commands/status-runtime-shared.ts index dad27b699e8b..fa824ad674ad 100644 --- a/src/commands/status-runtime-shared.ts +++ b/src/commands/status-runtime-shared.ts @@ -187,7 +187,6 @@ type StatusUsageSummary = Awaited>; type StatusGatewayHealth = Awaited>; type StatusSecurityAudit = Awaited>; -/** Resolves the full runtime snapshot, including optional security audit, for status JSON/text. */ export async function resolveStatusRuntimeSnapshot(params: { config: OpenClawConfig; sourceConfig: OpenClawConfig; diff --git a/src/commands/status.command.ts b/src/commands/status.command.ts index 3fd190a34db0..311ef7f915f9 100644 --- a/src/commands/status.command.ts +++ b/src/commands/status.command.ts @@ -86,7 +86,6 @@ function resolveServiceWrapperContextHint(params: { return `The installed gateway service uses ${OPENCLAW_WRAPPER_ENV_KEY} (${sanitizeTerminalText(serviceWrapperPath)}), but this CLI process is not running with that same wrapper. Missing-secret diagnostics may describe the current CLI process rather than the installed gateway service context.`; } -/** Runs `openclaw status`, including JSON/all routing and optional deep probes. */ export async function statusCommand( opts: { json?: boolean; diff --git a/src/commands/status.daemon.ts b/src/commands/status.daemon.ts index 40be2eb0b058..101888f872c8 100644 --- a/src/commands/status.daemon.ts +++ b/src/commands/status.daemon.ts @@ -41,12 +41,10 @@ async function buildDaemonStatusSummary( }; } -/** Returns the gateway daemon status summary. */ export async function getDaemonStatusSummary(timeoutMs?: number): Promise { return await buildDaemonStatusSummary("gateway", timeoutMs); } -/** Returns the node service status summary. */ export async function getNodeDaemonStatusSummary(timeoutMs?: number): Promise { return await buildDaemonStatusSummary("node", timeoutMs); } diff --git a/src/commands/status.gateway-connection.ts b/src/commands/status.gateway-connection.ts index 7320bfa0f2a2..489c1f8a17af 100644 --- a/src/commands/status.gateway-connection.ts +++ b/src/commands/status.gateway-connection.ts @@ -6,7 +6,6 @@ import type { RuntimeEnv } from "../runtime.js"; import type { NodeOnlyGatewayInfo } from "./status.node-mode.js"; import type { StatusScanOverviewResult } from "./status.scan-overview.ts"; -/** Logs multi-line gateway connection details with the standard heading. */ export function logGatewayConnectionDetails(params: { runtime: Pick; info: (value: string) => string; diff --git a/src/config/defaults.ts b/src/config/defaults.ts index b494bbf36135..e17b04d19ad1 100644 --- a/src/config/defaults.ts +++ b/src/config/defaults.ts @@ -45,7 +45,6 @@ export const DEFAULT_MODEL_ALIASES: Readonly> = { opus: "anthropic/claude-opus-5-5", sonnet: "anthropic/claude-sonnet-5-5", - // OpenAI gpt: "openai/gpt-5.4", "gpt-mini": "openai/gpt-5.4-mini", "gpt-nano": "openai/gpt-5.4-nano", diff --git a/src/gateway/probe-target.ts b/src/gateway/probe-target.ts index 0315d74ae088..a0144ea9df0c 100644 --- a/src/gateway/probe-target.ts +++ b/src/gateway/probe-target.ts @@ -12,7 +12,6 @@ export type GatewayProbeTargetResolution = { remoteUrlMissing: boolean; }; -/** Resolves whether gateway probe commands should target local or remote gateway. */ export function resolveGatewayProbeTarget(cfg: OpenClawConfig): GatewayProbeTargetResolution { const gatewayMode = cfg.gateway?.mode === "remote" ? "remote" : "local"; const remoteUrlRaw = normalizeOptionalString(cfg.gateway?.remote?.url) ?? ""; diff --git a/src/gateway/server-startup-log.ts b/src/gateway/server-startup-log.ts index d62b336b86c2..619055b36de4 100644 --- a/src/gateway/server-startup-log.ts +++ b/src/gateway/server-startup-log.ts @@ -127,7 +127,6 @@ export function formatAgentModelStartupLogLine(params: { }; } -/** Format model thinking and fast-mode details for the Gateway startup banner. */ export function formatAgentModelStartupDetails(params: { cfg: OpenClawConfig; provider: string; @@ -245,7 +244,6 @@ function formatConfiguredChannelMissingOwnerStartupWarning(entry: { ); } -/** Format plugin count/list and optional startup duration for the ready log line. */ function formatReadyDetails( loadedPluginIds: readonly string[], startupDurationLabel: string | null, diff --git a/src/gateway/session-patch-hooks.ts b/src/gateway/session-patch-hooks.ts index d7a42cf8e33c..e29dc7fe9cfc 100644 --- a/src/gateway/session-patch-hooks.ts +++ b/src/gateway/session-patch-hooks.ts @@ -12,7 +12,6 @@ import { // Session patch hooks are fire-and-forget internal hooks. The context is cloned // so hook listeners cannot mutate the live session entry or patch object. -/** Triggers internal session patch hooks when listeners are registered. */ export function triggerSessionPatchHook(params: { cfg: OpenClawConfig; sessionEntry: SessionEntry; diff --git a/src/hooks/gmail-watcher.ts b/src/hooks/gmail-watcher.ts index 37c1161dde8f..b5f51bd5ddbc 100644 --- a/src/hooks/gmail-watcher.ts +++ b/src/hooks/gmail-watcher.ts @@ -290,7 +290,6 @@ export async function startGmailWatcher( cfg: OpenClawConfig, options: GmailWatcherStartOptions, ): Promise { - // Check if gmail hooks are configured if (!cfg.hooks?.enabled) { return { started: false, reason: "hooks not enabled" }; } @@ -299,12 +298,10 @@ export async function startGmailWatcher( return { started: false, reason: "no gmail account configured" }; } - // Check if gog is available if (!hasBinary("gog")) { return { started: false, reason: "gog binary not found" }; } - // Resolve the full runtime config const resolved = resolveGmailHookRuntimeConfig(cfg, {}); if (!resolved.ok) { return { started: false, reason: resolved.error }; @@ -332,7 +329,6 @@ export async function startGmailWatcherService( shuttingDown = false; } - // Set up Tailscale endpoint if needed if (runtimeConfig.tailscale.mode !== "off") { try { await ensureTailscaleEndpoint({ @@ -369,7 +365,6 @@ export async function startGmailWatcherService( log.warn("gmail watch start failed, but continuing with serve"); } - // Spawn the gog serve process shuttingDown = false; watcherProcess = spawnGogServe(runtimeConfig); const renewMs = runtimeConfig.renewEveryMinutes * 60_000; @@ -389,9 +384,6 @@ export async function startGmailWatcherService( return { started: true }; } -/** - * Stop the Gmail watcher service. - */ export async function stopGmailWatcher(): Promise { await stopWatcherResources(() => log.info("stopping gmail watcher")); diff --git a/src/hooks/policy.ts b/src/hooks/policy.ts index 419bfe1d2e50..32af529bf5cb 100644 --- a/src/hooks/policy.ts +++ b/src/hooks/policy.ts @@ -25,7 +25,6 @@ const HOOK_SOURCE_PRECEDENCE: Record = { "openclaw-workspace": 40, }; -/** Resolve explicit per-hook config by hook key. */ export function resolveHookConfig( config: OpenClawConfig | undefined, hookKey: string, diff --git a/src/infra/gateway-discovery-targets.ts b/src/infra/gateway-discovery-targets.ts index 97007a41fc89..32eb888a29e3 100644 --- a/src/infra/gateway-discovery-targets.ts +++ b/src/infra/gateway-discovery-targets.ts @@ -22,7 +22,6 @@ function pickSshPort(beacon: GatewayBonjourBeacon): number | null { : null; } -/** Build normalized connection details for a discovered gateway beacon. */ export function buildGatewayDiscoveryTarget( beacon: GatewayBonjourBeacon, opts?: { sshUser?: string | null }, @@ -44,14 +43,12 @@ export function buildGatewayDiscoveryTarget( }; } -/** Build the compact label shown in discovery lists. */ export function buildGatewayDiscoveryLabel(beacon: GatewayBonjourBeacon): string { const target = buildGatewayDiscoveryTarget(beacon); const hint = target.endpoint ? `${target.endpoint.host}:${target.endpoint.port}` : "host unknown"; return `${target.title} (${hint})`; } -/** Serialize a beacon with resolved websocket information for CLI/UI output. */ export function serializeGatewayDiscoveryBeacon(beacon: GatewayBonjourBeacon) { const target = buildGatewayDiscoveryTarget(beacon); return { diff --git a/src/infra/gateway-processes.ts b/src/infra/gateway-processes.ts index 34db824e6474..9ca7ab169c5e 100644 --- a/src/infra/gateway-processes.ts +++ b/src/infra/gateway-processes.ts @@ -63,7 +63,6 @@ export function findVerifiedGatewayListenerPidsOnPortSync( .filter((pid) => inspectGatewayProcess(pid, { ...context, port }).kind === "openclaw"); } -/** Format gateway PIDs for human-facing diagnostics. */ export function formatGatewayPidList(pids: number[]): string { return pids.join(", "); } diff --git a/src/infra/ports-format.ts b/src/infra/ports-format.ts index df28e9d64071..9bb8abe279ee 100644 --- a/src/infra/ports-format.ts +++ b/src/infra/ports-format.ts @@ -188,7 +188,6 @@ export function buildPortHints(listeners: PortListener[], port: number): string[ return hints; } -/** Formats one listener row for CLI diagnostics. */ function formatPortListener(listener: PortListener): string { const pid = listener.pid ? `pid ${listener.pid}` : "pid ?"; const user = listener.user ? ` ${listener.user}` : ""; @@ -197,7 +196,6 @@ function formatPortListener(listener: PortListener): string { return `${pid}${user}: ${command}${address}`; } -/** Formats port diagnostics into CLI output lines. */ export function formatPortDiagnostics(diagnostics: PortUsage): string[] { if (diagnostics.status === "free") { return [`Port ${diagnostics.port} is free.`]; diff --git a/src/infra/provider-usage.format.ts b/src/infra/provider-usage.format.ts index bd890af28cc7..4a2d35e4fc81 100644 --- a/src/infra/provider-usage.format.ts +++ b/src/infra/provider-usage.format.ts @@ -59,7 +59,6 @@ function formatBillingEntry(entry: ProviderUsageBilling): string { return `${label}: ${formatBillingAmount(entry.amount, entry.unit)}`; } -/** Formats one provider snapshot into a short usage-window summary. */ export function formatUsageWindowSummary( snapshot: ProviderUsageSnapshot, opts?: { now?: number; maxWindows?: number; includeResets?: boolean }, diff --git a/src/infra/runtime-status.ts b/src/infra/runtime-status.ts index 4673eddd12a8..51725128b57a 100644 --- a/src/infra/runtime-status.ts +++ b/src/infra/runtime-status.ts @@ -7,7 +7,6 @@ type RuntimeStatusFormatInput = { details?: string[]; }; -/** Formats runtime health/status text with optional pid, state, and extra diagnostic details. */ export function formatRuntimeStatusWithDetails({ status, pid, diff --git a/src/infra/session-cost-usage-reporting.ts b/src/infra/session-cost-usage-reporting.ts index 769ef27f3292..bc04f61bf740 100644 --- a/src/infra/session-cost-usage-reporting.ts +++ b/src/infra/session-cost-usage-reporting.ts @@ -86,7 +86,6 @@ export async function discoverAllSessions(params: { } } - // Sort by mtime descending (most recent first) const sessions = Array.from(discovered.values()); sessions.sort((a, b) => b.mtime - a.mtime); return sessions; @@ -307,12 +306,10 @@ export async function loadSessionLogs(params: { contentParts.push("[Tool Result]"); } - // Extract content const rawContent = message.content; if (typeof rawContent === "string") { contentParts.push(rawContent); } else if (Array.isArray(rawContent)) { - // Handle content blocks (text, tool_use, etc.) const contentText = rawContent .map((block: unknown) => { if (typeof block === "string") { @@ -366,7 +363,6 @@ export async function loadSessionLogs(params: { continue; } - // Truncate very long content. const maxLen = 2000; if (content.length > maxLen) { content = truncateUtf16Safe(content, maxLen) + "…"; diff --git a/src/infra/state-migrations.fs.ts b/src/infra/state-migrations.fs.ts index 93e43e6838df..3b545f54029a 100644 --- a/src/infra/state-migrations.fs.ts +++ b/src/infra/state-migrations.fs.ts @@ -18,17 +18,14 @@ export function safeReadDir(dir: string): fs.Dirent[] { } } -/** Returns whether a path exists and resolves to a directory. */ export function existsDir(dir: string): boolean { return safeStatSync(dir)?.isDirectory() ?? false; } -/** Creates a directory tree for migration targets. */ export function ensureMigrationDir(dir: string) { fs.mkdirSync(dir, { recursive: true }); } -/** Returns whether a path exists and resolves to a regular file. */ export function migrationFileExists(p: string): boolean { return safeStatSync(p)?.isFile() ?? false; } diff --git a/src/infra/system-run-approval-context.ts b/src/infra/system-run-approval-context.ts index d12e891f2dd4..f5b49d6d5e7b 100644 --- a/src/infra/system-run-approval-context.ts +++ b/src/infra/system-run-approval-context.ts @@ -141,7 +141,6 @@ export function parsePreparedSystemRunPayload(raw: unknown): PreparedRunPayload }; } -/** Build the approval request context from tool payload fields. */ export function resolveSystemRunApprovalRequestContext(params: { host?: unknown; command?: unknown; diff --git a/src/infra/windows-port-pids.ts b/src/infra/windows-port-pids.ts index 7a8cd1604ef8..6bb0f33077fa 100644 --- a/src/infra/windows-port-pids.ts +++ b/src/infra/windows-port-pids.ts @@ -24,9 +24,7 @@ export type WindowsProcessArgsResult = | { ok: true; args: string[] | null } | { ok: false; permanent: boolean }; -// --------------------------------------------------------------------------- // Windows listening-PID discovery (PowerShell → netstat fallback) -// --------------------------------------------------------------------------- function readListeningPidsViaPowerShell(port: number, timeoutMs: number): number[] | null { const ps = spawnSync( @@ -120,9 +118,7 @@ export function readWindowsPortUsageSync(port: number, timeoutMs: number): PortU return /^\d+$/.test(count) ? (Number(count) === 0 ? "free" : "busy") : "unknown"; } -// --------------------------------------------------------------------------- // Windows process identity reading (PowerShell → WMIC fallback) -// --------------------------------------------------------------------------- function extractWindowsCommandLine(raw: Buffer | string): string | null { const lines = normalizeStringEntries(decodeWindowsProcessOutput(raw).split(/\r?\n/)); diff --git a/src/mcp/channel-shared.ts b/src/mcp/channel-shared.ts index 3c3080b1e97d..e8f7a4ddc9c4 100644 --- a/src/mcp/channel-shared.ts +++ b/src/mcp/channel-shared.ts @@ -127,7 +127,6 @@ export type QueueEvent = raw: Record; }; -/** Cursor and optional session filter used by event polling and waiting. */ export type WaitFilter = { afterCursor: number; sessionKey?: string; @@ -219,7 +218,6 @@ export function toConversation(row: SessionRow): ConversationDescriptor | null { }; } -/** Check whether a queued event should be visible to a poll or wait call. */ export function matchEventFilter(event: QueueEvent, filter: WaitFilter): boolean { if (event.cursor <= filter.afterCursor) { return false; diff --git a/src/mcp/channel-tools.ts b/src/mcp/channel-tools.ts index 336bb4cc6a4a..5b4ed7432085 100644 --- a/src/mcp/channel-tools.ts +++ b/src/mcp/channel-tools.ts @@ -27,7 +27,6 @@ export function getChannelMcpCapabilities(claudeChannelMode: "off" | "on" | "aut }; } -/** Register all channel MCP tools against a server instance. */ export function registerChannelMcpTools(server: McpServer, bridge: OpenClawChannelBridge): void { server.tool( "conversations_list", diff --git a/src/media-understanding/runner.entries.ts b/src/media-understanding/runner.entries.ts index 896fd3b10156..085712dc20a6 100644 --- a/src/media-understanding/runner.entries.ts +++ b/src/media-understanding/runner.entries.ts @@ -615,7 +615,6 @@ function formatMissingProviderHint(providerId: string): string { return ` Install the official external plugin with: ${formatCliCommand(catalogHint.installCommand)}, then run ${formatCliCommand("openclaw plugins registry --refresh")} and stop and start the gateway service, or run ${formatCliCommand(catalogHint.doctorFixCommand)} to repair automatically.`; } -/** Executes one provider-backed media-understanding entry for one attachment. */ export async function runProviderEntry(params: { capability: MediaUnderstandingCapability; entry: MediaUnderstandingModelConfig; @@ -882,7 +881,6 @@ export async function runProviderEntry(params: { }); } -/** Executes one CLI-backed media-understanding entry for one attachment. */ export async function runCliEntry(params: { capability: MediaUnderstandingCapability; entry: MediaUnderstandingModelConfig; diff --git a/src/plugins/hook-before-agent-start.types.ts b/src/plugins/hook-before-agent-start.types.ts index dd33b7accb8f..53752dec5069 100644 --- a/src/plugins/hook-before-agent-start.types.ts +++ b/src/plugins/hook-before-agent-start.types.ts @@ -1,4 +1,3 @@ -// before_model_resolve hook export type PluginHookBeforeModelResolveAttachment = { kind: "image" | "video" | "audio" | "document" | "other"; mimeType?: string; @@ -18,7 +17,6 @@ export type PluginHookBeforeModelResolveResult = { providerOverride?: string; }; -// before_prompt_build hook export type PluginHookBeforePromptBuildEvent = { prompt: string; /** Current request before projection. Empty means no textual request; omission is legacy. */ diff --git a/src/plugins/hook-runner-global.ts b/src/plugins/hook-runner-global.ts index 083198445d1d..0471cea24cab 100644 --- a/src/plugins/hook-runner-global.ts +++ b/src/plugins/hook-runner-global.ts @@ -52,9 +52,6 @@ export function getGlobalPluginRegistry(): GlobalHookRunnerRegistry | null { return state.registry; } -/** - * Check if any hooks are registered for a given hook name. - */ export function hasGlobalHooks( hookName: K, ctx?: Partial[1]>, diff --git a/src/plugins/hook-types.ts b/src/plugins/hook-types.ts index 4369be4fa308..f5c6351217ec 100644 --- a/src/plugins/hook-types.ts +++ b/src/plugins/hook-types.ts @@ -904,10 +904,6 @@ type PluginHookBeforeInstallResult = { blockReason?: string; }; -// --------------------------------------------------------------------------- -// before_agent_run — Lifecycle Gate Hook -// --------------------------------------------------------------------------- - /** Event payload for the before_agent_run gate hook. */ export type PluginHookBeforeAgentRunEvent = { /** The user's message that triggered this run. */ diff --git a/src/plugins/hooks.ts b/src/plugins/hooks.ts index 766f2c397bc1..d6626d7d131a 100644 --- a/src/plugins/hooks.ts +++ b/src/plugins/hooks.ts @@ -607,7 +607,6 @@ export function createHookRunner( }; /** - * Run a hook that doesn't return a value (fire-and-forget style). * All handlers are executed in parallel for performance. */ async function runVoidHook( @@ -679,7 +678,6 @@ export function createHookRunner( runVoidHook(hookName, deepFreezeHookValue(structuredClone(event)), ctx); /** - * Run a hook that can return a modifying result. * Handlers are executed sequentially in priority order, and results are merged. */ async function runModifyingHook( @@ -1225,7 +1223,6 @@ export function createHookRunner( } return { - // Agent hooks runBeforeModelResolve: bindModifyingHook("before_model_resolve", { mergeResults: mergeBeforeModelResolve, }), @@ -1244,9 +1241,7 @@ export function createHookRunner( runBeforeCompaction: bindVoidHook("before_compaction"), runAfterCompaction: bindVoidHook("after_compaction"), runBeforeReset: bindVoidHook("before_reset"), - // Lifecycle gate hooks runBeforeAgentRun, - // Message hooks runInboundClaim: bindClaimingHook("inbound_claim"), runInboundClaimForPlugin, runInboundClaimForPluginOutcome, @@ -1295,13 +1290,10 @@ export function createHookRunner( return content !== original ? { ...result, content } : result; }, runMessageSent: bindVoidHook("message_sent"), - // Tool hooks runBeforeToolCall, runAfterToolCall, runToolResultPersist, - // Message write hooks runBeforeMessageWrite, - // Session hooks runSessionStart: bindVoidHook("session_start"), runSessionEnd: (event: HookEvent<"session_end">, ctx: HookContext<"session_end">) => runVoidHook("session_end", event, ctx, {}, undefined, (hook, context) => @@ -1318,7 +1310,6 @@ export function createHookRunner( runSubagentSpawned: bindVoidHook("subagent_spawned"), runSubagentProgress: bindVoidHook("subagent_progress"), runSubagentEnded: bindVoidHook("subagent_ended"), - // Gateway hooks runGatewayStart: bindVoidHook("gateway_start"), runGatewayStop: bindVoidHook("gateway_stop"), runHeartbeatPromptContribution: bindModifyingHook("heartbeat_prompt_contribution", { @@ -1326,11 +1317,9 @@ export function createHookRunner( }), runCronReconciled: bindVoidHook("cron_reconciled"), runCronChanged: bindVoidHook("cron_changed"), - // Skill hooks runSkillProposalEvaluate, runSkillProposalChanged: bindFrozenVoidHook("skill_proposal_changed"), runSkillChanged: bindFrozenVoidHook("skill_changed"), - // Install hooks runBeforeInstall: bindModifyingHook("before_install", { mergeResults: (acc, next) => { const findings = [...(acc?.findings ?? []), ...(next.findings ?? [])]; @@ -1344,7 +1333,6 @@ export function createHookRunner( terminalLabel: "block=true", }), runResolveExecEnv, - // Utility hasHooks, getHookCount, }; diff --git a/src/shared/agent-liveness.ts b/src/shared/agent-liveness.ts index e9950d4f4684..20a9d2fbfc69 100644 --- a/src/shared/agent-liveness.ts +++ b/src/shared/agent-liveness.ts @@ -1,20 +1,16 @@ -/** Return true for the normalized liveness state that means a run is blocked. */ export function isBlockedLivenessState(livenessState: unknown): boolean { return typeof livenessState === "string" && livenessState.trim().toLowerCase() === "blocked"; } -/** Return true for the normalized liveness state that means a run ended incomplete. */ export function isAbandonedLivenessState(livenessState: unknown): boolean { return typeof livenessState === "string" && livenessState.trim().toLowerCase() === "abandoned"; } -/** Convert a blocked-run error payload into a user-facing wait/status message. */ export function formatBlockedLivenessError(error: unknown): string { const message = typeof error === "string" ? error.trim() : ""; return message || "Agent run blocked before producing a usable result."; } -/** Convert an abandoned-run error payload into a user-facing wait/status message. */ export function formatAbandonedLivenessError(error: unknown): string { const message = typeof error === "string" ? error.trim() : ""; return message || "Agent run ended before producing a complete result."; diff --git a/src/skills/runtime/refresh-watch-path.ts b/src/skills/runtime/refresh-watch-path.ts index f328a19211f2..a55bef08f2f5 100644 --- a/src/skills/runtime/refresh-watch-path.ts +++ b/src/skills/runtime/refresh-watch-path.ts @@ -30,13 +30,11 @@ export const DEFAULT_SKILLS_WATCH_IGNORED: RegExp[] = [ /(^|[\\/])\.git([\\/]|$)/, /(^|[\\/])node_modules([\\/]|$)/, /(^|[\\/])dist([\\/]|$)/, - // Python virtual environments and caches /(^|[\\/])\.venv([\\/]|$)/, /(^|[\\/])venv([\\/]|$)/, /(^|[\\/])__pycache__([\\/]|$)/, /(^|[\\/])\.mypy_cache([\\/]|$)/, /(^|[\\/])\.pytest_cache([\\/]|$)/, - // Build artifacts and caches /(^|[\\/])build([\\/]|$)/, /(^|[\\/])\.cache([\\/]|$)/, ]; diff --git a/src/tui/osc8-hyperlinks.ts b/src/tui/osc8-hyperlinks.ts index 7a60104cebaf..f2cb46e0ef90 100644 --- a/src/tui/osc8-hyperlinks.ts +++ b/src/tui/osc8-hyperlinks.ts @@ -121,7 +121,6 @@ function findUrlRanges( } } - // Find new URL starts in visible text const urlRe = /https?:\/\/(?:\[[0-9a-f:.]+\](?::\d+)?[^\s\]>\u061c\u200e\u200f\u202a-\u202e\u2066-\u2069]*|[^\s[\]>\u061c\u200e\u200f\u202a-\u202e\u2066-\u2069]*)/gi; urlRe.lastIndex = searchFrom; diff --git a/src/tui/tui-session-picker.ts b/src/tui/tui-session-picker.ts index ea35b0a4b2fd..8b31e7111c0a 100644 --- a/src/tui/tui-session-picker.ts +++ b/src/tui/tui-session-picker.ts @@ -42,7 +42,6 @@ export async function loadRecentSessions( return result.sessions; } -/** Build labels and matching text for recent-session pickers. */ export function buildSessionChoices(sessions: readonly TuiSessionEntry[]): SessionPickerChoice[] { return sessions.map((session) => { const title = session.derivedTitle ?? session.displayName; diff --git a/src/tui/tui-waiting.ts b/src/tui/tui-waiting.ts index fbfa4bc807a8..1c00b8d40c8a 100644 --- a/src/tui/tui-waiting.ts +++ b/src/tui/tui-waiting.ts @@ -4,7 +4,6 @@ type MinimalTheme = { accentSoft: (s: string) => string; }; -/** Default phrase cycle for animated waiting status. */ export const defaultWaitingPhrases = [ "flibbertigibbeting", "kerfuffling", @@ -35,7 +34,6 @@ function shimmerText(theme: MinimalTheme, text: string, tick: number) { return out; } -/** Builds the single-line waiting status shown while a TUI run is active. */ export function buildWaitingStatusMessage(params: { theme: MinimalTheme; tick: number; diff --git a/src/tui/tui.ts b/src/tui/tui.ts index 6a46aaa2b40e..0ed657930e1b 100644 --- a/src/tui/tui.ts +++ b/src/tui/tui.ts @@ -132,7 +132,6 @@ export async function resolveCodexCliBin(): Promise { if (result.code !== 0 || result.termination !== "exit") { return null; } - // Use the first PATH match. return result.stdout.trim().split(/\r?\n/)[0]?.trim() || null; } catch { return null; diff --git a/ui/src/pages/usage/view-timeseries.ts b/ui/src/pages/usage/view-timeseries.ts index 04b34e6b3001..0524ea7a36d2 100644 --- a/ui/src/pages/usage/view-timeseries.ts +++ b/ui/src/pages/usage/view-timeseries.ts @@ -11,9 +11,9 @@ import { USAGE_TOKEN_CATEGORIES } from "./view-chart.ts"; const CHART_BAR_WIDTH_RATIO = 0.75; // Fraction of slot used for bar (rest is gap) const CHART_MAX_BAR_WIDTH = 8; // Max bar width in SVG viewBox units -const CHART_SELECTION_OPACITY = 0.06; // Opacity of range selection overlay +const CHART_SELECTION_OPACITY = 0.06; const HANDLE_WIDTH = 5; // Width of drag handle in SVG units -const HANDLE_HEIGHT = 12; // Height of drag handle +const HANDLE_HEIGHT = 12; const HANDLE_GRIP_OFFSET = 0.7; // Offset of grip lines inside handle function dateBoundaryMs(date: string, timeZone: "local" | "utc", dayOffset: 0 | 1): number { diff --git a/ui/src/pages/usage/view.ts b/ui/src/pages/usage/view.ts index d28d44029d64..c25be6a46d6e 100644 --- a/ui/src/pages/usage/view.ts +++ b/ui/src/pages/usage/view.ts @@ -114,7 +114,6 @@ export function renderUsage(props: UsageProps) { const selectedDaySet = new Set(filters.selectedDays); const selectedSessionSet = new Set(filters.selectedSessions); - // Sort sessions by tokens or cost depending on mode const sortedSessions = data.sessions.toSorted((a, b) => { const valA = isTokenMode ? (a.usage?.totalTokens ?? 0) : (a.usage?.totalCost ?? 0); const valB = isTokenMode ? (b.usage?.totalTokens ?? 0) : (b.usage?.totalCost ?? 0); @@ -146,7 +145,6 @@ export function renderUsage(props: UsageProps) { const querySuggestions = buildQuerySuggestions(filters.queryDraft, filterOptions); const queryTerms = extractQueryTerms(filters.queryDraft); - // Get first selected session for detail view (timeseries, logs) const primarySelectedEntry = filters.selectedSessions.length === 1 ? data.sessions.find((s) => s.key === filters.selectedSessions[0]) diff --git a/ui/src/styles/channels.css b/ui/src/styles/channels.css index ea10dd068b67..cd865885e480 100644 --- a/ui/src/styles/channels.css +++ b/ui/src/styles/channels.css @@ -78,8 +78,6 @@ text-shadow: 0 1px 3px rgb(0 0 0 / 25%); } -/* ---------- detail overlay ---------- */ - .channels-detail, .channels-wizard { display: flex; @@ -132,8 +130,6 @@ padding: var(--space-4) var(--space-4) var(--space-5); } -/* ---------- DM sender access requests ---------- */ - .channels-pairing-filters { display: flex; flex-wrap: wrap; @@ -237,8 +233,6 @@ } } -/* ---------- setup wizard dialog ---------- */ - .channels-wizard { width: min(540px, calc(100vw - 48px)); max-height: min(85dvh, 760px); diff --git a/ui/src/styles/chat/composer.css b/ui/src/styles/chat/composer.css index a7e828b558cf..afd8d6257737 100644 --- a/ui/src/styles/chat/composer.css +++ b/ui/src/styles/chat/composer.css @@ -3678,7 +3678,7 @@ html[dir="rtl"] .chat-attachment-loading > span { .agent-chat__hint kbd { display: inline-block; padding: 1px 6px; - font-size: 12px; /* was 11px */ + font-size: 12px; font-family: var(--mono); background: var(--panel-strong); border: 1px solid var(--border); diff --git a/ui/src/styles/chat/grouped.css b/ui/src/styles/chat/grouped.css index 1405b42e05b5..541c9cc1ae3b 100644 --- a/ui/src/styles/chat/grouped.css +++ b/ui/src/styles/chat/grouped.css @@ -472,7 +472,7 @@ } .chat-group-timestamp { - font-size: 12px; /* was 11px */ + font-size: 12px; /* Keep full-opacity --muted: opacity < 1 composites below WCAG AA on dark surfaces. */ color: var(--muted); line-height: 1.2; @@ -480,7 +480,6 @@ white-space: nowrap; } -/* ── Group footer action buttons ── */ .chat-group-footer-actions button, .chat-group-footer .chat-send-status__action, .chat-message-actions-row button, @@ -915,7 +914,7 @@ img.chat-avatar { border-radius: var(--radius-sm); background: color-mix(in srgb, var(--panel) 72%, transparent); color: var(--muted); - font-size: 12px; /* was 11px */ + font-size: 12px; font-weight: 700; line-height: 1; vertical-align: 0.08em; @@ -1659,7 +1658,6 @@ button.chat-reply-attribution__target:disabled { color: var(--text-strong); } -/* ── Message metadata (tokens, cost, model, context %) ── */ .msg-meta { --openclaw-tooltip-max-width: min(36rem, calc(100vw - 32px)); } @@ -1737,7 +1735,6 @@ button.chat-reply-attribution__target:disabled { color: var(--danger); } -/* ── Confirmed action popover ── */ .chat-confirm-wrap { position: relative; display: inline-flex; @@ -1769,7 +1766,7 @@ button.chat-reply-attribution__target:disabled { display: flex; align-items: center; gap: 6px; - font-size: 12px; /* was 11px */ + font-size: 12px; color: var(--muted); margin-bottom: 10px; user-select: none; diff --git a/ui/src/styles/chat/sidebar.css b/ui/src/styles/chat/sidebar.css index c26fcfbc739e..a5cbcdc09b75 100644 --- a/ui/src/styles/chat/sidebar.css +++ b/ui/src/styles/chat/sidebar.css @@ -300,7 +300,7 @@ border-radius: var(--radius-full); background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); - font-size: var(--control-ui-text-sm); /* was 10px */ + font-size: var(--control-ui-text-sm); line-height: 1.2; } @@ -1086,7 +1086,7 @@ openclaw-session-discussion { gap: 8px; min-width: 0; color: var(--muted); - font-size: var(--control-ui-text-sm); /* was 11px */ + font-size: var(--control-ui-text-sm); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; diff --git a/ui/src/styles/chat/tool-cards.css b/ui/src/styles/chat/tool-cards.css index fa726f274442..55b8bb33ed24 100644 --- a/ui/src/styles/chat/tool-cards.css +++ b/ui/src/styles/chat/tool-cards.css @@ -60,7 +60,6 @@ transform: rotate(-90deg); } -/* ── Collapsed tool row ── */ .chat-tool-msg-collapse { width: 100%; min-width: 0; @@ -261,7 +260,6 @@ color: color-mix(in srgb, var(--muted) 82%, var(--text) 18%); } -/* ── Kind-aware tool rows ── */ .chat-tool-row__prompt { flex-shrink: 0; } @@ -324,7 +322,6 @@ } } -/* ── Diffstat chips (+N -M) ── */ .chat-diffstat { display: inline-flex; align-items: center; @@ -349,7 +346,6 @@ color: var(--destructive); } -/* ── Inline diff ── */ .chat-diff { margin-top: 6px; border-radius: var(--radius-sm); @@ -434,7 +430,6 @@ color: color-mix(in srgb, var(--text) 72%, var(--muted) 28%); } -/* ── Terminal-style command block ── */ .chat-tool-term { margin-top: 0; background: transparent; @@ -503,7 +498,6 @@ color: inherit; } -/* ── Key-value args (generic tools) ── */ .chat-tool-kv { display: flex; flex-direction: column; @@ -535,7 +529,6 @@ overflow-wrap: anywhere; } -/* ── Expanded tool row body ── */ .chat-tool-msg-body { min-width: 0; max-width: 100%; @@ -584,7 +577,6 @@ overflow-wrap: anywhere; } -/* ── Expanded tool detail ── */ .chat-tools-inline { display: grid; gap: 2px; @@ -833,7 +825,6 @@ word-break: normal; } -/* ── Canvas/document preview ── */ .chat-tool-card__preview, .chat-tool-card__raw { margin-top: 8px; @@ -1018,7 +1009,6 @@ margin-inline: 12px; } -/* ── Activity group (a turn's run of tool rows) ── */ .chat-activity-group { width: 100%; min-width: 0; diff --git a/ui/src/styles/components.css b/ui/src/styles/components.css index d6e97ace6a87..1d56618d97fc 100644 --- a/ui/src/styles/components.css +++ b/ui/src/styles/components.css @@ -481,8 +481,6 @@ openclaw-session-owner-chip .viewer-avatar__initials { gap: 20px; } -/* ── Title block ── */ - .login-gate__status-head { display: flex; align-items: flex-start; @@ -543,8 +541,6 @@ openclaw-session-owner-chip .viewer-avatar__initials { color: var(--muted); } -/* ── Hero command: the one thing to run ── */ - .login-gate__hero { display: grid; gap: 6px; @@ -649,8 +645,6 @@ openclaw-session-owner-chip .viewer-avatar__initials { opacity: 1; } -/* ── Steps ── */ - .login-gate__failure-steps { margin: 0; padding-left: 20px; @@ -697,8 +691,6 @@ openclaw-session-owner-chip .viewer-avatar__initials { justify-self: start; } -/* ── Form ── */ - .login-gate__form { display: grid; gap: 14px; @@ -791,8 +783,6 @@ openclaw-session-owner-chip .viewer-avatar__initials { margin-bottom: 14px; } -/* ── Footer ── */ - .login-gate__foot { display: flex; align-items: baseline; @@ -1038,10 +1028,6 @@ openclaw-session-owner-chip .viewer-avatar__initials { } } -/* =========================================== - Cards - Refined with depth - =========================================== */ - .card { border: 1px solid var(--border); background: var(--card); @@ -1088,10 +1074,6 @@ openclaw-session-owner-chip .viewer-avatar__initials { stroke-width: 1.75; } -/* =========================================== - Stats - Bold values, subtle labels - =========================================== */ - .stat { background: var(--card); border-radius: var(--radius-md); @@ -1114,10 +1096,6 @@ openclaw-session-owner-chip .viewer-avatar__initials { line-height: 1.1; } -/* =========================================== - Labels & Pills - =========================================== */ - .label { color: var(--muted); font-size: 12px; @@ -1147,10 +1125,6 @@ openclaw-session-owner-chip .viewer-avatar__initials { color: var(--danger); } -/* =========================================== - Status Dot - With glow for emphasis - =========================================== */ - .statusDot { width: 8px; height: 8px; @@ -1179,10 +1153,6 @@ openclaw-session-owner-chip .viewer-avatar__initials { opacity: 0.5; } -/* =========================================== - Buttons - Tactile with personality - =========================================== */ - /* A disabled button reads as "unavailable"; the spinner says "working" so a multi-minute update does not look like a dead control. */ .btn__spinner { @@ -1868,10 +1838,6 @@ openclaw-session-progress-hovercard-provider { cursor: not-allowed; } -/* =========================================== - Form Fields - =========================================== */ - .field { display: grid; gap: 6px; @@ -2154,10 +2120,6 @@ select.input { border-color: transparent; } -/* =========================================== - Utilities - =========================================== */ - .muted { color: var(--muted); } @@ -2166,10 +2128,6 @@ select.input { font-family: var(--mono); } -/* =========================================== - Callouts - Informative with subtle depth - =========================================== */ - .callout { padding: 14px 16px; border-radius: var(--radius-md); @@ -2386,10 +2344,6 @@ select.input { } } -/* =========================================== - Code Blocks - =========================================== */ - .code-block { font-family: var(--mono); font-size: 13px; @@ -2734,10 +2688,6 @@ select.input { color: var(--danger); } -/* =========================================== - Lists - =========================================== */ - .list { display: grid; gap: 8px; @@ -2748,10 +2698,6 @@ select.input { font-weight: 500; } -/* =========================================== - Chips - Compact and punchy - =========================================== */ - .chip-row { display: flex; flex-wrap: wrap; @@ -2793,10 +2739,6 @@ select.input { background: var(--warn-subtle); } -/* =========================================== - Data Table - =========================================== */ - .data-table-search { flex: 1; min-width: 0; @@ -2935,7 +2877,6 @@ select.input { border-bottom: none; } -/* Checkbox column */ .data-table-checkbox-col { width: var(--data-table-checkbox-col-width); min-width: var(--data-table-checkbox-col-width); @@ -2992,7 +2933,6 @@ td.data-table-key-col { background: var(--bg-hover); } -/* Bulk action bar */ .data-table-bulk-bar { display: flex; align-items: center; @@ -3010,7 +2950,6 @@ td.data-table-key-col { height: 14px; } -/* Pagination */ .data-table-pagination { display: flex; align-items: center; @@ -3051,10 +2990,6 @@ td.data-table-key-col { cursor: not-allowed; } -/* =========================================== - Chat - =========================================== */ - .shell--chat .chat { flex: 1; } @@ -3065,10 +3000,6 @@ td.data-table-key-col { padding: 10px 16px; } -/* =========================================== - QR Code - =========================================== */ - .qr-wrap { margin-top: 16px; border-radius: var(--radius-md); @@ -3085,10 +3016,6 @@ td.data-table-key-col { image-rendering: pixelated; } -/* =========================================== - Exec Approval Modal - =========================================== */ - .exec-approval-card { --exec-approval-accent: var(--border); @@ -3148,7 +3075,7 @@ td.data-table-key-col { .exec-approval-queue, .exec-approval-chip { - font-size: 12px; /* was 11px */ + font-size: 12px; font-weight: 500; color: var(--muted); border: 1px solid var(--border); @@ -3342,10 +3269,6 @@ td.data-table-key-col { font-variant-numeric: tabular-nums; } -/* =========================================== - Secret Reveal Modal - =========================================== */ - .secret-reveal__value { display: flex; align-items: flex-start; @@ -3434,10 +3357,6 @@ td.data-table-key-col { line-height: 1.5; } -/* =========================================== - Agents - =========================================== */ - .agents-layout { display: grid; grid-template-columns: 1fr; @@ -3942,7 +3861,7 @@ td.data-table-key-col { align-items: center; gap: 8px; min-width: 0; - font-size: 12px; /* was 11px */ + font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; @@ -4518,7 +4437,7 @@ td.data-table-key-col { .agent-tools-runtime-chip__meta { color: var(--muted); - font-size: 12px; /* was 11px */ + font-size: 12px; white-space: nowrap; } @@ -4554,7 +4473,7 @@ td.data-table-key-col { .agent-tools-group__summary::before { content: "â–¸"; color: var(--muted); - font-size: 12px; /* was 11px */ + font-size: 12px; line-height: 20px; transition: transform var(--duration-fast) var(--ease-in-out); } @@ -4597,7 +4516,7 @@ td.data-table-key-col { flex-wrap: wrap; min-width: 0; color: var(--muted); - font-size: 12px; /* was 11px */ + font-size: 12px; } .agent-tools-group__preview > span { @@ -4619,7 +4538,7 @@ td.data-table-key-col { gap: 8px; flex-wrap: wrap; color: var(--muted); - font-size: 12px; /* was 11px */ + font-size: 12px; font-variant-numeric: tabular-nums; text-transform: uppercase; letter-spacing: 0.04em; @@ -4673,7 +4592,7 @@ td.data-table-key-col { top: 18px; right: 64px; color: var(--muted); - font-size: 12px; /* was 11px */ + font-size: 12px; transition: transform var(--duration-fast) var(--ease-in-out); } @@ -4758,7 +4677,7 @@ td.data-table-key-col { .agent-tool-sub { color: var(--muted); - font-size: 12px; /* was 11px */ + font-size: 12px; margin-top: 3px; min-width: 0; overflow: hidden; @@ -5856,10 +5775,6 @@ td.data-table-key-col { } } -/* =========================================== - Hover Marquee - =========================================== */ - /* Only the title viewport is masked; badges and row controls stay outside it. Extra travel equal to the fade width leaves the complete tail opaque. */ .hover-marquee { @@ -5983,8 +5898,6 @@ td.data-table-key-col { } } -/* ---- Plugin tab embeds (plugin-served panels) ---- */ - .plugin-tab-embed { display: flex; flex: 1; diff --git a/ui/src/styles/config.css b/ui/src/styles/config.css index 31cdcee434f5..ce8bf30d7ec9 100644 --- a/ui/src/styles/config.css +++ b/ui/src/styles/config.css @@ -8,10 +8,6 @@ chrome (tabs, actions, diff, raw editor) plus genuinely form-specific pieces layered on top of the settings primitives. */ -/* =========================================== - Lead column (toolbar / banner / nav above the form) - =========================================== */ - /* Mirrors the .settings-page column so config chrome lines up with it. */ .config-lead { width: 100%; @@ -202,10 +198,6 @@ flex: 1 1 420px; } -/* =========================================== - Appearance custom pickers (theme + text scale) - =========================================== */ - .settings-theme-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); @@ -634,7 +626,7 @@ .settings-theme-import__label, .settings-theme-import__meta-label { - font-size: 12px; /* was 11px */ + font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; @@ -742,7 +734,7 @@ .settings-text-scale__label { color: var(--muted); - font-size: 12px; /* was 11px */ + font-size: 12px; line-height: 1.2; } @@ -790,10 +782,6 @@ } } -/* =========================================== - Form specifics layered on settings rows - =========================================== */ - /* Inline validation/unsupported-node message inside a settings-row. */ .cfg-field__error { font-size: 12px; diff --git a/ui/src/styles/cron.css b/ui/src/styles/cron.css index f049374058f1..28ed85f7801b 100644 --- a/ui/src/styles/cron.css +++ b/ui/src/styles/cron.css @@ -15,8 +15,6 @@ overflow: visible; } -/* ── Compact overview chrome ── */ - .cron-page[data-panel-mode="overview"] .settings-page { gap: var(--space-4); } @@ -52,8 +50,6 @@ min-width: 0; } -/* ── List toolbar ── */ - .cron-toolbar { display: flex; flex-direction: column; @@ -483,8 +479,6 @@ line-height: 1.45; } -/* ── Detail view ── */ - .cron-back-row { display: flex; } @@ -591,8 +585,6 @@ height: 13px; } -/* ── Editor ── */ - /* Bare fieldset wrapper so busy-state disabling covers every section. */ .cron-editor { display: flex; @@ -693,7 +685,6 @@ border-color: var(--danger); } -/* Human-readable schedule line under the schedule rows. */ .cron-schedule-summary { display: flex; align-items: center; @@ -769,8 +760,6 @@ margin-top: var(--space-3); } -/* Validation status */ - .cron-form-status { border: 1px solid var(--danger-subtle); background: var(--danger-subtle); @@ -832,8 +821,6 @@ line-height: 1.4; } -/* Job actions menu */ - .cron-job-menu { position: relative; } @@ -874,8 +861,6 @@ color: var(--danger); } -/* ── Run history ── */ - .cron-runs { display: flex; flex-direction: column; @@ -1150,8 +1135,6 @@ } } -/* ── Responsive ── */ - @media (max-width: 900px) { /* Keep every table fact, but label and arrange it as a compact card. */ .cron-table__head { diff --git a/ui/src/styles/dreams.css b/ui/src/styles/dreams.css index 8910449841b5..1647ebde9a9f 100644 --- a/ui/src/styles/dreams.css +++ b/ui/src/styles/dreams.css @@ -38,8 +38,6 @@ user-select: none; } -/* ---- Breathing lobster ---- */ - .dreams__lobster { animation: dreams-breathe 4s ease-in-out infinite; filter: drop-shadow(0 0 40px rgba(255, 77, 77, 0.25)); @@ -96,8 +94,6 @@ } } -/* ---- Floating Z's ---- */ - .dreams__z { position: absolute; font-family: var(--mono); @@ -147,8 +143,6 @@ } } -/* ---- Stars ---- */ - .dreams__star { position: absolute; border-radius: 50%; @@ -166,8 +160,6 @@ } } -/* ---- Dream thought bubble ---- */ - .dreams__bubble { position: absolute; top: calc(50% - 260px); @@ -214,8 +206,6 @@ animation: dreams-bubble-float 6s ease-in-out infinite; } -/* ---- Moon ---- */ - .dreams__moon { position: absolute; top: 40px; @@ -246,8 +236,6 @@ } } -/* ---- Ambient glow under lobster ---- */ - .dreams__glow { position: absolute; top: calc(50% + 40px); @@ -271,8 +259,6 @@ } } -/* ---- Sleep phase cards ---- */ - .dreams__phases { display: flex; align-items: center; @@ -320,13 +306,11 @@ } .dreams__phase-next { - font-size: 12px; /* was 11px */ + font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; } -/* ---- Dreaming on/off toggle (header bar) ---- */ - .dreams__phase-toggle { display: inline-flex; align-items: center; @@ -336,7 +320,7 @@ border: 1px solid var(--border); background: color-mix(in oklab, var(--panel) 70%, transparent); color: var(--muted); - font-size: 12px; /* was 11px */ + font-size: 12px; font-family: inherit; letter-spacing: 0.06em; text-transform: uppercase; @@ -370,8 +354,6 @@ color: var(--danger); } -/* ---- Status line ---- */ - .dreams__status { display: flex; flex-direction: column; @@ -416,8 +398,6 @@ } } -/* ---- Idle / inactive state ---- */ - .dreams--idle .dreams__lobster { filter: drop-shadow(0 0 20px rgba(255, 77, 77, 0.1)); } @@ -431,10 +411,6 @@ color: var(--muted); } -/* =========================================== - Dreaming Advanced – Operator Review - =========================================== */ - .dreams-advanced { display: flex; flex-direction: column; @@ -460,7 +436,7 @@ .dreams-advanced__eyebrow { display: block; - font-size: 12px; /* was 10px */ + font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; @@ -529,7 +505,7 @@ } .dreams-advanced__section-title { - font-size: 12px; /* was 11px */ + font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; @@ -581,7 +557,7 @@ color: var(--muted); padding: 6px 10px; border-radius: 999px; - font-size: 12px; /* was 11px */ + font-size: 12px; line-height: 1; transition: background 0.2s ease, @@ -615,7 +591,7 @@ border-radius: 999px; background: color-mix(in oklab, var(--accent-subtle) 72%, transparent); color: var(--accent); - font-size: 12px; /* was 10px */ + font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; @@ -634,7 +610,7 @@ .dreams-advanced__source, .dreams-advanced__meta, .dreams-advanced__empty { - font-size: 12px; /* was 11px */ + font-size: 12px; line-height: 1.45; color: var(--muted); margin-top: 8px; @@ -648,10 +624,6 @@ padding: 16px; } -/* =========================================== - Dream Diary – Scroll section below hero - =========================================== */ - .dreams-diary { display: flex; flex-direction: column; @@ -664,8 +636,6 @@ isolation: isolate; } -/* ---- Diary header ---- */ - .dreams-diary__chrome { position: sticky; top: 0; @@ -693,7 +663,7 @@ } .dreams-diary__title { - font-size: 12px; /* was 10px */ + font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0.14em; @@ -710,8 +680,6 @@ color: var(--muted); } -/* ---- Diary entry ---- */ - .dreams-diary__entry { position: relative; z-index: 1; @@ -800,7 +768,7 @@ border: 1px solid color-mix(in oklab, var(--border) 70%, transparent); background: color-mix(in oklab, var(--panel) 84%, transparent); color: var(--muted); - font-size: 12px; /* was 11px */ + font-size: 12px; font-variant-numeric: tabular-nums; text-align: center; white-space: nowrap; @@ -869,7 +837,7 @@ } .dreams-diary__insight-meta { - font-size: 12px; /* was 11px */ + font-size: 12px; color: var(--muted); margin-bottom: 10px; } @@ -879,7 +847,7 @@ align-items: center; border-radius: 999px; padding: 3px 8px; - font-size: 12px; /* was 10px */ + font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; border: 1px solid color-mix(in oklab, var(--border) 70%, transparent); @@ -917,7 +885,7 @@ .dreams-diary__insight-list strong { display: block; margin-bottom: 6px; - font-size: 12px; /* was 11px */ + font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); @@ -942,7 +910,7 @@ align-items: center; padding: 4px 8px; border-radius: 999px; - font-size: 12px; /* was 11px */ + font-size: 12px; color: var(--text); background: color-mix(in oklab, var(--accent-subtle) 84%, transparent); border: 1px solid color-mix(in oklab, var(--accent) 24%, transparent); @@ -978,7 +946,7 @@ .dreams-diary__preview-meta { margin-top: 6px; - font-size: 12px; /* was 11px */ + font-size: 12px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; @@ -1038,8 +1006,6 @@ } } -/* ---- Empty / error states ---- */ - .dreams-diary__empty { display: flex; flex-direction: column; @@ -1063,7 +1029,7 @@ } .dreams-diary__empty-hint { - font-size: 12px; /* was 11px */ + font-size: 12px; color: var(--muted); opacity: 0.4; } @@ -1076,8 +1042,6 @@ z-index: 1; } -/* ---- Responsive ---- */ - @media (max-width: 900px) { .dreams { min-height: calc(100vh - 96px); diff --git a/ui/src/styles/layout.css b/ui/src/styles/layout.css index 1bd32016ea90..6acec8086ac2 100644 --- a/ui/src/styles/layout.css +++ b/ui/src/styles/layout.css @@ -882,10 +882,6 @@ openclaw-settings-save-indicator:empty { color: var(--muted); } -/* =========================================== - Topbar - =========================================== */ - /* Hidden by default: on desktop the sidebar owns navigation, so no topbar row renders. Narrow viewports show it as the drawer/search header (layout.mobile.css), and desktop chat split view brings it back as the @@ -1047,10 +1043,6 @@ openclaw-settings-save-indicator:empty { display: none; } -/* =========================================== - Navigation Sidebar - =========================================== */ - .shell-nav { grid-area: nav; position: relative; @@ -4464,10 +4456,6 @@ wa-dropdown.sidebar-identity-menu::part(menu) { stroke-linejoin: round; } -/* =========================================== - Content Area - =========================================== */ - .content { grid-area: content; --content-inline-padding: 20px; @@ -4642,7 +4630,6 @@ wa-dropdown.sidebar-identity-menu::part(menu) { } } -/* Content header */ .content-header { display: flex; align-items: flex-end; @@ -4861,7 +4848,6 @@ html.openclaw-native-macos:not(.openclaw-native-nav):not(.openclaw-native-web-ch gap: 8px; } -/* Chat view header adjustments */ .content--chat .content-header { display: grid; grid-template-columns: minmax(0, 1fr) max-content; @@ -4891,10 +4877,6 @@ html.openclaw-native-macos:not(.openclaw-native-nav):not(.openclaw-native-web-ch overflow: visible; } -/* =========================================== - Grid Utilities - =========================================== */ - .grid { display: grid; gap: 20px; @@ -4919,10 +4901,6 @@ html.openclaw-native-macos:not(.openclaw-native-nav):not(.openclaw-native-web-ch align-items: center; } -/* =========================================== - Responsive - Tablet - =========================================== */ - @media (max-width: 900px), (max-width: 932px) and (max-height: 500px) and (orientation: landscape) { .shell--mobile-nav { --shell-pad: 12px; @@ -4957,7 +4935,6 @@ html.openclaw-native-macos:not(.openclaw-native-nav):not(.openclaw-native-web-ch background: var(--bg); } -/* Sidebar sessions redesign: work-session subtitles, agent sections, draft row. */ .sidebar-session-indicator { position: relative; display: inline-flex; diff --git a/ui/src/styles/layout.mobile.css b/ui/src/styles/layout.mobile.css index 8935a4f9a49e..69b39ce46f6e 100644 --- a/ui/src/styles/layout.mobile.css +++ b/ui/src/styles/layout.mobile.css @@ -452,15 +452,15 @@ html.openclaw-native-desktop body .shell--mobile-nav { } .log-time { - font-size: 12px; /* was 10px */ + font-size: 12px; } .log-level { - font-size: 12px; /* was 9px */ + font-size: 12px; } .log-subsystem { - font-size: 12px; /* was 11px */ + font-size: 12px; } .log-message { @@ -476,7 +476,7 @@ html.openclaw-native-desktop body .shell--mobile-nav { .code-block { padding: 8px; border-radius: var(--radius-md); - font-size: 12px; /* was 11px */ + font-size: 12px; } } @@ -492,7 +492,7 @@ html.openclaw-native-desktop body .shell--mobile-nav { .nav-item { padding: 6px 8px; - font-size: var(--control-ui-text-sm); /* was 11px */ + font-size: var(--control-ui-text-sm); } .content { @@ -518,14 +518,10 @@ html.openclaw-native-desktop body .shell--mobile-nav { .btn { padding: 6px 10px; - font-size: 12px; /* was 11px */ + font-size: 12px; } } -/* =========================================== - Sessions table – responsive column hiding - =========================================== */ - /* nth-child is 1-based and includes the checkbox column (col 1). The optional Group column in category mode shifts later indexes; grouping is a desktop workflow, so the hide rules target the default 7-column roster. */ @@ -658,7 +654,7 @@ html.openclaw-native-desktop body .shell--mobile-nav { .data-table th, .data-table td { padding: 6px 4px; - font-size: 12px; /* was 11px */ + font-size: 12px; } .session-key-cell { diff --git a/ui/src/styles/lobster-pet.css b/ui/src/styles/lobster-pet.css index 561d5ff2fe22..f9c23cac7145 100644 --- a/ui/src/styles/lobster-pet.css +++ b/ui/src/styles/lobster-pet.css @@ -875,8 +875,6 @@ openclaw-lobster-pet[data-dex-complete]::after { } } -/* ---- Acts ---- */ - .lobster-pet--act-wave .lob-claw--r { animation: lobster-pet-wave 1.4s ease-in-out; animation-delay: var(--lob-act-delay, 0s); @@ -1056,8 +1054,6 @@ openclaw-lobster-pet[data-dex-complete]::after { color: #ff5c8a; } -/* ---- Bubbles ---- */ - .lobster-pet__bubble { position: absolute; left: 30%; @@ -1075,8 +1071,6 @@ openclaw-lobster-pet[data-dex-complete]::after { animation-delay: calc(var(--i, 0) * 0.42s); } -/* ---- Keyframes ---- */ - @keyframes lobster-pet-breathe { 0%, 100% { @@ -1589,8 +1583,6 @@ openclaw-lobster-pet[data-dex-complete]::after { } } -/* ---- Lobsterdex (appearance settings gallery) ---- */ - .lobsterdex { display: flex; flex-wrap: wrap; diff --git a/ui/src/styles/logbook.css b/ui/src/styles/logbook.css index 770a7a48cdfa..43e26bd794dd 100644 --- a/ui/src/styles/logbook.css +++ b/ui/src/styles/logbook.css @@ -92,8 +92,6 @@ } } -/* ---- Timeline ---- */ - .logbook__timeline { display: flex; flex-direction: column; @@ -285,8 +283,6 @@ } } -/* ---- Side panel ---- */ - .logbook__side { display: flex; flex-direction: column; diff --git a/ui/src/styles/logs.css b/ui/src/styles/logs.css index 115dcf6b6843..142922959501 100644 --- a/ui/src/styles/logs.css +++ b/ui/src/styles/logs.css @@ -67,7 +67,7 @@ main.content:where(.content--logs-page) .content-header { } .log-level { - font-size: 12px; /* was 11px */ + font-size: 12px; font-weight: 500; border: 1px solid var(--border); border-radius: var(--radius-sm); diff --git a/ui/src/styles/plugins.css b/ui/src/styles/plugins.css index 3be02833a322..18ccab9ce229 100644 --- a/ui/src/styles/plugins.css +++ b/ui/src/styles/plugins.css @@ -57,8 +57,6 @@ } } -/* ---------- Installed plugins ---------- */ - .installed-plugins-card__head { display: grid; grid-template-columns: auto minmax(0, 1fr); @@ -161,8 +159,6 @@ -webkit-line-clamp: 2; } -/* ---------- Unified plugin catalog ---------- */ - .plugins-hub-header .plugins-hub-header__secondary.btn.btn--icon { box-sizing: border-box; flex: 0 0 34px; @@ -480,8 +476,6 @@ } } -/* ---------- toolbar ---------- */ - .plugins-toolbar { display: flex; align-items: center; @@ -534,8 +528,6 @@ min-width: 180px; } -/* ---------- collapsible skill groups ---------- */ - /*
shell keeps the settings-section look while restoring the native * expand/collapse the pre-migration skill groups had (cfg-object pattern). */ .skills-group__summary { @@ -568,8 +560,6 @@ transform: rotate(90deg); } -/* ---------- rows ---------- */ - /* Entity row inside a settings group: leading art tile, wrapping so row-local messages can break onto a full-width line below the controls. */ .plugins-item { @@ -669,8 +659,6 @@ h3.settings-row__title { margin: 0; } -/* ---------- art tiles ---------- */ - .plugins-tile { display: grid; width: 40px; @@ -710,8 +698,6 @@ h3.settings-row__title { stroke-linejoin: round; } -/* ---------- messages / empty / loading ---------- */ - .plugins-row-message { display: flex; align-items: center; @@ -869,8 +855,6 @@ h3.settings-row__title { justify-content: flex-end; } -/* ---------- plugin settings ---------- */ - /* The inventory header is already inside the padded settings page. Its page owner must override the outer-header inset regardless of lazy stylesheet order. */ openclaw-plugins-page @@ -975,8 +959,6 @@ openclaw-plugins-page gap: var(--space-3); } -/* ---------- catalog detail ---------- */ - .plugin-catalog-detail { container-type: inline-size; display: grid; @@ -1477,8 +1459,6 @@ openclaw-plugins-page justify-self: end; } -/* ---------- responsive ---------- */ - @media (max-width: 640px) { .settings-page.oc-app-surface:has(> .plugins-settings-content) { padding-top: 0; diff --git a/ui/src/styles/sessions.css b/ui/src/styles/sessions.css index cb3601c89279..cbbd0dae0215 100644 --- a/ui/src/styles/sessions.css +++ b/ui/src/styles/sessions.css @@ -425,7 +425,6 @@ font-size: var(--control-ui-text-sm); } -/* --- Table --- */ .sessions-table { min-width: 760px; } @@ -632,7 +631,6 @@ text-overflow: ellipsis; } -/* --- Initial-load skeleton --- */ .session-skeleton-row td { border-bottom: 1px solid var(--border); } @@ -669,7 +667,6 @@ } } -/* --- Empty states --- */ .sessions-table .data-table-empty-state { display: flex; flex-direction: column; @@ -987,7 +984,6 @@ white-space: nowrap; } -/* --- Narrow layouts --- */ @media (max-width: 768px) { .sessions-toolbar { align-items: stretch; diff --git a/ui/src/styles/settings.css b/ui/src/styles/settings.css index 93d3ffeafbf4..d6131b23cc48 100644 --- a/ui/src/styles/settings.css +++ b/ui/src/styles/settings.css @@ -97,8 +97,6 @@ max-width: 1120px; } -/* ── Page ── */ - /* Section separation stays generous (--space-8) so group surfaces read as distinct blocks; headings bind to their own group via the tighter .settings-section gap. */ @@ -166,8 +164,6 @@ font: 400 var(--control-ui-text-sm) / 1.5 var(--mono); } -/* ── Section ── */ - .settings-section { display: flex; flex-direction: column; @@ -345,8 +341,6 @@ margin-top: var(--space-3); } -/* ── Row ── */ - .settings-row { display: flex; align-items: center; @@ -522,8 +516,6 @@ border-top: 1px solid color-mix(in srgb, var(--border) 45%, transparent); } -/* ── Controls ── */ - .settings-toggle { display: inline-flex; align-items: center; @@ -779,8 +771,6 @@ textarea.settings-input { overflow-wrap: anywhere; } -/* ── Empty state ── */ - .settings-empty { padding: var(--space-5) var(--space-4); font-size: var(--control-ui-text-sm); @@ -827,8 +817,6 @@ textarea.settings-input { width: 104px; } -/* ── Key/value facts (About build info, agent facts) ── */ - .settings-kv { display: grid; grid-template-columns: minmax(120px, max-content) minmax(0, 1fr); @@ -870,8 +858,6 @@ textarea.settings-input { color: var(--danger); } -/* ── Account value (small round avatar + handle inside a row control) ── */ - .settings-account { display: inline-flex; align-items: center; diff --git a/ui/src/styles/skill-workshop.css b/ui/src/styles/skill-workshop.css index 4e78065e1c87..a6416c6d4c55 100644 --- a/ui/src/styles/skill-workshop.css +++ b/ui/src/styles/skill-workshop.css @@ -152,7 +152,6 @@ color: var(--muted); } -/* ── Triage two-pane card ───────────────────────────────────────────── */ .sw-triage { display: grid; grid-template-columns: @@ -175,7 +174,6 @@ border-radius: var(--radius-lg); } -/* ── Installed collection ───────────────────────────────────────────── */ .sw-collection { display: flex; flex-direction: column; @@ -363,7 +361,6 @@ text-align: center; } -/* ── Queue (left) ───────────────────────────────────────────────────── */ .sw-queue { display: flex; flex-direction: column; @@ -395,7 +392,7 @@ .sw-queue__group { padding: 10px 14px 4px; - font-size: 12px; /* was 11px */ + font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); @@ -451,7 +448,7 @@ .sw-row__meta { color: var(--muted); - font-size: 12px; /* was 11px */ + font-size: 12px; white-space: nowrap; align-self: start; margin-top: 1px; @@ -464,7 +461,6 @@ font-size: 13px; } -/* ── Detail (right) ─────────────────────────────────────────────────── */ .sw-detail { display: flex; flex-direction: column; @@ -574,7 +570,7 @@ .sw-empty-state__eyebrow { margin: 0 0 8px; color: var(--accent); - font-size: 12px; /* was 11px */ + font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; @@ -693,14 +689,13 @@ .sw-section__label { margin: 0 0 8px; - font-size: 12px; /* was 11px */ + font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; } -/* ── Body card (proposal markdown) ─────────────────────────────────── */ .sw-body-card { background: var(--bg); border: 1px solid var(--border); @@ -729,7 +724,6 @@ letter-spacing: -0.01em; } -/* ── Support files ─────────────────────────────────────────────────── */ .sw-files { display: grid; gap: 6px; @@ -765,12 +759,12 @@ .sw-file__size { color: var(--muted); - font-size: 12px; /* was 11px */ + font-size: 12px; } .sw-file__hint { color: var(--muted); - font-size: 12px; /* was 11px */ + font-size: 12px; opacity: 0; transition: opacity 100ms; margin-left: 6px; @@ -780,7 +774,6 @@ opacity: 1; } -/* ── Proposal evaluation ───────────────────────────────────────────── */ .sw-evaluation { margin-top: 22px; padding-top: 18px; @@ -981,7 +974,6 @@ margin-top: 10px; } -/* ── Action bar (sticky bottom) ─────────────────────────────────────── */ .sw-action-toast { position: absolute; left: 50%; @@ -1029,7 +1021,7 @@ .sw-revision-dialog__eyebrow { margin-bottom: 6px; color: var(--accent); - font-size: 12px; /* was 11px */ + font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; @@ -1312,7 +1304,6 @@ } } -/* ── Mode switch ────────────────────────────────────────────────────── */ .sw-header-controls { display: inline-flex; align-items: center; @@ -1405,7 +1396,6 @@ stroke-width: 1.6; } -/* ── View pane fade-on-switch ───────────────────────────────────────── */ .sw-view { flex: 1 1 auto; display: flex; diff --git a/ui/src/styles/usage.css b/ui/src/styles/usage.css index cca1318fa7b7..8d9cc9ccb2eb 100644 --- a/ui/src/styles/usage.css +++ b/ui/src/styles/usage.css @@ -414,7 +414,7 @@ .session-log-meta, .session-logs-header-count { color: var(--muted); - font-size: 12px; /* was 11px */ + font-size: 12px; } .usage-query-hint { @@ -573,7 +573,7 @@ border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text); - font-size: 12px; /* was 11px */ + font-size: 12px; font-weight: 500; } @@ -736,7 +736,7 @@ .sessions-sort span, .cost-breakdown-header, .usage-mosaic-section-title { - font-size: 12px; /* was 11px */ + font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; @@ -795,7 +795,7 @@ background: transparent; color: var(--muted); font-family: inherit; - font-size: 12px; /* was 9px */ + font-size: 12px; line-height: 1; cursor: var(--cursor-action); opacity: 0.7; @@ -1147,7 +1147,7 @@ .usage-daypart-label, .usage-hour-labels { - font-size: 12px; /* was 11px */ + font-size: 12px; color: var(--muted); } @@ -1199,7 +1199,7 @@ display: flex; justify-content: space-between; gap: 8px; - font-size: 12px; /* was 11px */ + font-size: 12px; color: var(--muted); } @@ -1452,7 +1452,7 @@ .daily-bar-total, .daily-bar-label { - font-size: 12px; /* was 10px */ + font-size: 12px; line-height: 14px; color: var(--muted); white-space: nowrap; @@ -1690,7 +1690,7 @@ .usage-more-sessions { padding: 8px; text-align: center; - font-size: 12px; /* was 11px */ + font-size: 12px; color: var(--muted); } @@ -1715,7 +1715,7 @@ display: inline-flex; margin-left: 8px; color: var(--muted); - font-size: 12px; /* was 11px */ + font-size: 12px; } .usage-lineage-note { @@ -1781,7 +1781,7 @@ .ts-axis-label { fill: var(--muted); - font-size: 12px; /* was 8px */ + font-size: 12px; } .ts-bar { @@ -1941,7 +1941,7 @@ border-radius: var(--radius-full); background: color-mix(in srgb, var(--accent) 8%, var(--card)); border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--border)); - font-size: 12px; /* was 11px */ + font-size: 12px; } :root[data-theme-mode="light"] .usage-daypart-cell,