From c70597daeb66debc0866715bbc885a9a10508e1f Mon Sep 17 00:00:00 2001 From: cpojer Date: Tue, 17 Feb 2026 09:40:00 +0900 Subject: [PATCH] chore: Fix formatting. --- src/agents/anthropic-payload-log.ts | 4 ++-- src/agents/cache-trace.ts | 2 +- src/agents/tools/canvas-tool.ts | 2 +- src/agents/tools/nodes-tool.ts | 4 ++-- src/agents/tools/web-fetch.ts | 2 +- src/agents/tools/web-search.ts | 4 ++-- src/commands/status-all.ts | 4 ++-- src/commands/status.command.ts | 4 ++-- src/cron/isolated-agent/run.ts | 8 ++++---- src/cron/service/timer.ts | 4 ++-- src/gateway/openresponses-http.ts | 10 +++++----- src/media-understanding/apply.ts | 14 +++++++------- src/media/input-files.ts | 2 +- 13 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/agents/anthropic-payload-log.ts b/src/agents/anthropic-payload-log.ts index b2bdfa3a4db..03c2cbc1c1c 100644 --- a/src/agents/anthropic-payload-log.ts +++ b/src/agents/anthropic-payload-log.ts @@ -1,7 +1,7 @@ -import type { AgentMessage, StreamFn } from "@mariozechner/pi-agent-core"; -import type { Api, Model } from "@mariozechner/pi-ai"; import crypto from "node:crypto"; import path from "node:path"; +import type { AgentMessage, StreamFn } from "@mariozechner/pi-agent-core"; +import type { Api, Model } from "@mariozechner/pi-ai"; import { resolveStateDir } from "../config/paths.js"; import { createSubsystemLogger } from "../logging/subsystem.js"; import { resolveUserPath } from "../utils.js"; diff --git a/src/agents/cache-trace.ts b/src/agents/cache-trace.ts index c73dad90331..0cc770dabe7 100644 --- a/src/agents/cache-trace.ts +++ b/src/agents/cache-trace.ts @@ -1,6 +1,6 @@ -import type { AgentMessage, StreamFn } from "@mariozechner/pi-agent-core"; import crypto from "node:crypto"; import path from "node:path"; +import type { AgentMessage, StreamFn } from "@mariozechner/pi-agent-core"; import type { OpenClawConfig } from "../config/config.js"; import { resolveStateDir } from "../config/paths.js"; import { resolveUserPath } from "../utils.js"; diff --git a/src/agents/tools/canvas-tool.ts b/src/agents/tools/canvas-tool.ts index 561d7f46c0a..77ddb56db4c 100644 --- a/src/agents/tools/canvas-tool.ts +++ b/src/agents/tools/canvas-tool.ts @@ -1,6 +1,6 @@ -import { Type } from "@sinclair/typebox"; import crypto from "node:crypto"; import fs from "node:fs/promises"; +import { Type } from "@sinclair/typebox"; import { writeBase64ToFile } from "../../cli/nodes-camera.js"; import { canvasSnapshotTempPath, parseCanvasSnapshotPayload } from "../../cli/nodes-canvas.js"; import { imageMimeFromFormat } from "../../media/mime.js"; diff --git a/src/agents/tools/nodes-tool.ts b/src/agents/tools/nodes-tool.ts index cc5355c1b05..7add129efac 100644 --- a/src/agents/tools/nodes-tool.ts +++ b/src/agents/tools/nodes-tool.ts @@ -1,7 +1,6 @@ +import crypto from "node:crypto"; import type { AgentToolResult } from "@mariozechner/pi-agent-core"; import { Type } from "@sinclair/typebox"; -import crypto from "node:crypto"; -import type { OpenClawConfig } from "../../config/config.js"; import { type CameraFacing, cameraTempPath, @@ -17,6 +16,7 @@ import { writeScreenRecordToFile, } from "../../cli/nodes-screen.js"; import { parseDurationMs } from "../../cli/parse-duration.js"; +import type { OpenClawConfig } from "../../config/config.js"; import { imageMimeFromFormat } from "../../media/mime.js"; import { resolveSessionAgentId } from "../agent-scope.js"; import { optionalStringEnum, stringEnum } from "../schema/typebox.js"; diff --git a/src/agents/tools/web-fetch.ts b/src/agents/tools/web-fetch.ts index 805ff01b788..9206386a796 100644 --- a/src/agents/tools/web-fetch.ts +++ b/src/agents/tools/web-fetch.ts @@ -1,6 +1,5 @@ import { Type } from "@sinclair/typebox"; import type { OpenClawConfig } from "../../config/config.js"; -import type { AnyAgentTool } from "./common.js"; import { fetchWithSsrFGuard } from "../../infra/net/fetch-guard.js"; import { matchesHostnameAllowlist, @@ -11,6 +10,7 @@ import { logDebug } from "../../logger.js"; import { wrapExternalContent, wrapWebContent } from "../../security/external-content.js"; import { normalizeSecretInput } from "../../utils/normalize-secret-input.js"; import { stringEnum } from "../schema/typebox.js"; +import type { AnyAgentTool } from "./common.js"; import { jsonResult, readNumberParam, readStringParam } from "./common.js"; import { extractReadableContent, diff --git a/src/agents/tools/web-search.ts b/src/agents/tools/web-search.ts index 511b530e637..a47737594df 100644 --- a/src/agents/tools/web-search.ts +++ b/src/agents/tools/web-search.ts @@ -1,10 +1,10 @@ import { Type } from "@sinclair/typebox"; -import type { OpenClawConfig } from "../../config/config.js"; -import type { AnyAgentTool } from "./common.js"; import { formatCliCommand } from "../../cli/command-format.js"; +import type { OpenClawConfig } from "../../config/config.js"; import { matchesHostnameAllowlist, normalizeHostnameAllowlist } from "../../infra/net/ssrf.js"; import { wrapWebContent } from "../../security/external-content.js"; import { normalizeSecretInput } from "../../utils/normalize-secret-input.js"; +import type { AnyAgentTool } from "./common.js"; import { jsonResult, readNumberParam, readStringParam } from "./common.js"; import { CacheEntry, diff --git a/src/commands/status-all.ts b/src/commands/status-all.ts index 7983a70e189..e7b38cb0eca 100644 --- a/src/commands/status-all.ts +++ b/src/commands/status-all.ts @@ -1,11 +1,10 @@ -import type { GatewayService } from "../daemon/service.js"; -import type { RuntimeEnv } from "../runtime.js"; import { buildWorkspaceSkillStatus } from "../agents/skills-status.js"; import { formatCliCommand } from "../cli/command-format.js"; import { withProgress } from "../cli/progress.js"; import { loadConfig, readConfigFileSnapshot, resolveGatewayPort } from "../config/config.js"; import { readLastGatewayErrorLine } from "../daemon/diagnostics.js"; import { resolveNodeService } from "../daemon/node-service.js"; +import type { GatewayService } from "../daemon/service.js"; import { resolveGatewayService } from "../daemon/service.js"; import { buildGatewayConnectionDetails, callGateway } from "../gateway/call.js"; import { normalizeControlUiBasePath } from "../gateway/control-ui-shared.js"; @@ -21,6 +20,7 @@ import { readTailscaleStatusJson } from "../infra/tailscale.js"; import { normalizeUpdateChannel, resolveUpdateChannelDisplay } from "../infra/update-channels.js"; import { checkUpdateStatus, formatGitInstallLabel } from "../infra/update-check.js"; import { runExec } from "../process/exec.js"; +import type { RuntimeEnv } from "../runtime.js"; import { VERSION } from "../version.js"; import { resolveControlUiLinks } from "./onboard-helpers.js"; import { getAgentLocalStatuses } from "./status-all/agents.js"; diff --git a/src/commands/status.command.ts b/src/commands/status.command.ts index e500b689a68..e06feb42af5 100644 --- a/src/commands/status.command.ts +++ b/src/commands/status.command.ts @@ -1,11 +1,10 @@ -import type { HeartbeatEventPayload } from "../infra/heartbeat-events.js"; -import type { RuntimeEnv } from "../runtime.js"; import { formatCliCommand } from "../cli/command-format.js"; import { withProgress } from "../cli/progress.js"; import { resolveGatewayPort } from "../config/config.js"; import { buildGatewayConnectionDetails, callGateway } from "../gateway/call.js"; import { info } from "../globals.js"; import { formatTimeAgo } from "../infra/format-time/format-relative.ts"; +import type { HeartbeatEventPayload } from "../infra/heartbeat-events.js"; import { formatUsageReportLines, loadProviderUsageSummary } from "../infra/provider-usage.js"; import { normalizeUpdateChannel, resolveUpdateChannelDisplay } from "../infra/update-channels.js"; import { formatGitInstallLabel } from "../infra/update-check.js"; @@ -15,6 +14,7 @@ import { resolveMemoryVectorState, type Tone, } from "../memory/status-format.js"; +import type { RuntimeEnv } from "../runtime.js"; import { runSecurityAudit } from "../security/audit.js"; import { renderTable } from "../terminal/table.js"; import { theme } from "../terminal/theme.js"; diff --git a/src/cron/isolated-agent/run.ts b/src/cron/isolated-agent/run.ts index 4cf71836931..e775ce3df96 100644 --- a/src/cron/isolated-agent/run.ts +++ b/src/cron/isolated-agent/run.ts @@ -1,7 +1,3 @@ -import type { MessagingToolSend } from "../../agents/pi-embedded-messaging.js"; -import type { OpenClawConfig } from "../../config/config.js"; -import type { AgentDefaultsConfig } from "../../config/types.js"; -import type { CronJob, CronRunOutcome, CronRunTelemetry } from "../types.js"; import { resolveAgentConfig, resolveAgentDir, @@ -24,6 +20,7 @@ import { resolveHooksGmailModel, resolveThinkingDefault, } from "../../agents/model-selection.js"; +import type { MessagingToolSend } from "../../agents/pi-embedded-messaging.js"; import { runEmbeddedPiAgent } from "../../agents/pi-embedded.js"; import { runSubagentAnnounceFlow } from "../../agents/subagent-announce.js"; import { countActiveDescendantRuns } from "../../agents/subagent-registry.js"; @@ -37,11 +34,13 @@ import { } from "../../auto-reply/thinking.js"; import { SILENT_REPLY_TOKEN } from "../../auto-reply/tokens.js"; import { createOutboundSendDeps, type CliDeps } from "../../cli/outbound-send-deps.js"; +import type { OpenClawConfig } from "../../config/config.js"; import { resolveAgentMainSessionKey, resolveSessionTranscriptPath, updateSessionStore, } from "../../config/sessions.js"; +import type { AgentDefaultsConfig } from "../../config/types.js"; import { registerAgentRunContext } from "../../infra/agent-events.js"; import { deliverOutboundPayloads } from "../../infra/outbound/deliver.js"; import { resolveAgentOutboundIdentity } from "../../infra/outbound/identity.js"; @@ -54,6 +53,7 @@ import { isExternalHookSession, } from "../../security/external-content.js"; import { resolveCronDeliveryPlan } from "../delivery.js"; +import type { CronJob, CronRunOutcome, CronRunTelemetry } from "../types.js"; import { resolveDeliveryTarget } from "./delivery-target.js"; import { isHeartbeatOnlyResponse, diff --git a/src/cron/service/timer.ts b/src/cron/service/timer.ts index d48569a60e5..46eb3b2dd17 100644 --- a/src/cron/service/timer.ts +++ b/src/cron/service/timer.ts @@ -1,9 +1,8 @@ import type { HeartbeatRunResult } from "../../infra/heartbeat-wake.js"; -import type { CronJob, CronRunOutcome, CronRunStatus, CronRunTelemetry } from "../types.js"; -import type { CronEvent, CronServiceState } from "./state.js"; import { DEFAULT_AGENT_ID } from "../../routing/session-key.js"; import { resolveCronDeliveryPlan } from "../delivery.js"; import { sweepCronRunSessions } from "../session-reaper.js"; +import type { CronJob, CronRunOutcome, CronRunStatus, CronRunTelemetry } from "../types.js"; import { computeJobNextRunAtMs, nextWakeAtMs, @@ -11,6 +10,7 @@ import { resolveJobPayloadTextForMain, } from "./jobs.js"; import { locked } from "./locked.js"; +import type { CronEvent, CronServiceState } from "./state.js"; import { ensureLoaded, persist } from "./store.js"; const MAX_TIMER_DELAY_MS = 60_000; diff --git a/src/gateway/openresponses-http.ts b/src/gateway/openresponses-http.ts index 2fc00dbdef0..3fe440d4c35 100644 --- a/src/gateway/openresponses-http.ts +++ b/src/gateway/openresponses-http.ts @@ -6,15 +6,13 @@ * @see https://www.open-responses.com/ */ -import type { IncomingMessage, ServerResponse } from "node:http"; import { randomUUID } from "node:crypto"; +import type { IncomingMessage, ServerResponse } from "node:http"; import type { ClientToolDefinition } from "../agents/pi-embedded-runner/run/params.js"; -import type { ImageContent } from "../commands/agent/types.js"; -import type { GatewayHttpResponsesConfig } from "../config/types.gateway.js"; -import type { AuthRateLimiter } from "./auth-rate-limit.js"; -import type { ResolvedGatewayAuth } from "./auth.js"; import { createDefaultDeps } from "../cli/deps.js"; import { agentCommand } from "../commands/agent.js"; +import type { ImageContent } from "../commands/agent/types.js"; +import type { GatewayHttpResponsesConfig } from "../config/types.gateway.js"; import { emitAgentEvent, onAgentEvent } from "../infra/agent-events.js"; import { logWarn } from "../logger.js"; import { @@ -36,6 +34,8 @@ import { buildAgentMessageFromConversationEntries, type ConversationEntry, } from "./agent-prompt.js"; +import type { AuthRateLimiter } from "./auth-rate-limit.js"; +import type { ResolvedGatewayAuth } from "./auth.js"; import { sendJson, setSseHeaders, writeDone } from "./http-common.js"; import { handleGatewayPostJsonEndpoint } from "./http-endpoint-helpers.js"; import { resolveAgentIdForRequest, resolveSessionKey } from "./http-utils.js"; diff --git a/src/media-understanding/apply.ts b/src/media-understanding/apply.ts index 712add06298..6de29873bb8 100644 --- a/src/media-understanding/apply.ts +++ b/src/media-understanding/apply.ts @@ -1,13 +1,7 @@ import path from "node:path"; +import { finalizeInboundContext } from "../auto-reply/reply/inbound-context.js"; import type { MsgContext } from "../auto-reply/templating.js"; import type { OpenClawConfig } from "../config/config.js"; -import type { - MediaUnderstandingCapability, - MediaUnderstandingDecision, - MediaUnderstandingOutput, - MediaUnderstandingProvider, -} from "./types.js"; -import { finalizeInboundContext } from "../auto-reply/reply/inbound-context.js"; import { logVerbose, shouldLogVerbose } from "../globals.js"; import { extractFileContentFromSource, @@ -29,6 +23,12 @@ import { normalizeMediaAttachments, runCapability, } from "./runner.js"; +import type { + MediaUnderstandingCapability, + MediaUnderstandingDecision, + MediaUnderstandingOutput, + MediaUnderstandingProvider, +} from "./types.js"; export type ApplyMediaUnderstandingResult = { outputs: MediaUnderstandingOutput[]; diff --git a/src/media/input-files.ts b/src/media/input-files.ts index d77531e5ba8..61fc067ef9b 100644 --- a/src/media/input-files.ts +++ b/src/media/input-files.ts @@ -1,5 +1,5 @@ -import type { SsrFPolicy } from "../infra/net/ssrf.js"; import { fetchWithSsrFGuard } from "../infra/net/fetch-guard.js"; +import type { SsrFPolicy } from "../infra/net/ssrf.js"; import { logWarn } from "../logger.js"; import { estimateBase64DecodedBytes } from "./base64.js"; import { readResponseWithLimit } from "./read-response-with-limit.js";