diff --git a/src/infra/boundary-path.ts b/src/infra/boundary-path.ts index 11d42758926..812642fa10c 100644 --- a/src/infra/boundary-path.ts +++ b/src/infra/boundary-path.ts @@ -4,7 +4,7 @@ import os from "node:os"; import path from "node:path"; import { isNotFoundPathError, isPathInside } from "./path-guards.js"; -export type BoundaryPathIntent = "read" | "write" | "create" | "delete" | "stat"; +type BoundaryPathIntent = "read" | "write" | "create" | "delete" | "stat"; export type BoundaryPathAliasPolicy = { allowFinalSymlinkForUnlink?: boolean; @@ -22,7 +22,7 @@ export const BOUNDARY_PATH_ALIAS_POLICIES = { }), } as const; -export type ResolveBoundaryPathParams = { +type ResolveBoundaryPathParams = { absolutePath: string; rootPath: string; boundaryLabel: string; @@ -32,7 +32,7 @@ export type ResolveBoundaryPathParams = { rootCanonicalPath?: string; }; -export type ResolvedBoundaryPathKind = "missing" | "file" | "directory" | "symlink" | "other"; +type ResolvedBoundaryPathKind = "missing" | "file" | "directory" | "symlink" | "other"; export type ResolvedBoundaryPath = { absolutePath: string; @@ -660,7 +660,7 @@ function buildResolvedBoundaryPath(params: { }; } -export async function resolvePathViaExistingAncestor(targetPath: string): Promise { +async function resolvePathViaExistingAncestor(targetPath: string): Promise { const normalized = path.resolve(targetPath); let cursor = normalized; const missingSuffix: string[] = []; diff --git a/src/infra/browser-open.ts b/src/infra/browser-open.ts index bf9151f1d2a..deb15aaf60e 100644 --- a/src/infra/browser-open.ts +++ b/src/infra/browser-open.ts @@ -3,13 +3,13 @@ import { runCommandWithTimeout } from "../process/exec.js"; import { detectBinary } from "./detect-binary.js"; import { isWSL } from "./wsl.js"; -export type BrowserOpenCommand = { +type BrowserOpenCommand = { argv: string[] | null; reason?: string; command?: string; }; -export type BrowserOpenSupport = { +type BrowserOpenSupport = { ok: boolean; reason?: string; command?: string; diff --git a/src/infra/channel-approval-auth.ts b/src/infra/channel-approval-auth.ts index 6793fde928b..1e19ae9a52d 100644 --- a/src/infra/channel-approval-auth.ts +++ b/src/infra/channel-approval-auth.ts @@ -3,7 +3,7 @@ import type { OpenClawConfig } from "../config/types.openclaw.js"; import { isImplicitSameChatApprovalAuthorization } from "../plugin-sdk/approval-auth-helpers.js"; import { normalizeMessageChannel } from "../utils/message-channel.js"; -export type ApprovalCommandAuthorization = { +type ApprovalCommandAuthorization = { authorized: boolean; reason?: string; explicit: boolean; diff --git a/src/infra/detect-package-manager.ts b/src/infra/detect-package-manager.ts index 5f3c9cbc7d6..675d7fa4929 100644 --- a/src/infra/detect-package-manager.ts +++ b/src/infra/detect-package-manager.ts @@ -1,7 +1,7 @@ import fs from "node:fs/promises"; import path from "node:path"; -export type DetectedPackageManager = "pnpm" | "bun" | "npm"; +type DetectedPackageManager = "pnpm" | "bun" | "npm"; export async function detectPackageManager(root: string): Promise { try { diff --git a/src/infra/diagnostic-error-metadata.ts b/src/infra/diagnostic-error-metadata.ts index d8692ad8cc0..ab4f7ba2893 100644 --- a/src/infra/diagnostic-error-metadata.ts +++ b/src/infra/diagnostic-error-metadata.ts @@ -15,7 +15,7 @@ const PROVIDER_REQUEST_ID_TEXT_PATTERNS = [ /\((?:request_id|trace_id)\s*:\s*([A-Za-z0-9._:-]{1,128})\)/i, ] as const; -export type DiagnosticErrorFailureKind = +type DiagnosticErrorFailureKind = | "aborted" | "connection_closed" | "connection_reset" diff --git a/src/infra/diagnostic-trace-context.ts b/src/infra/diagnostic-trace-context.ts index d7c1cc0f8ac..40536633376 100644 --- a/src/infra/diagnostic-trace-context.ts +++ b/src/infra/diagnostic-trace-context.ts @@ -21,7 +21,7 @@ export type DiagnosticTraceContext = { readonly traceFlags?: string; }; -export type DiagnosticTraceContextInput = Partial & { +type DiagnosticTraceContextInput = Partial & { traceparent?: string; }; diff --git a/src/infra/diagnostics-timeline.ts b/src/infra/diagnostics-timeline.ts index 35602fa3d6d..5b2a179e1a0 100644 --- a/src/infra/diagnostics-timeline.ts +++ b/src/infra/diagnostics-timeline.ts @@ -6,9 +6,9 @@ import type { OpenClawConfig } from "../config/types.openclaw.js"; import { isDiagnosticFlagEnabled } from "./diagnostic-flags.js"; import { isTruthyEnvValue } from "./env.js"; -export const OPENCLAW_DIAGNOSTICS_TIMELINE_SCHEMA_VERSION = "openclaw.diagnostics.v1"; +const OPENCLAW_DIAGNOSTICS_TIMELINE_SCHEMA_VERSION = "openclaw.diagnostics.v1"; -export type DiagnosticsTimelineEventType = +type DiagnosticsTimelineEventType = | "span.start" | "span.end" | "span.error" @@ -17,9 +17,9 @@ export type DiagnosticsTimelineEventType = | "provider.request" | "childProcess.exit"; -export type DiagnosticsTimelineAttributes = Record; +type DiagnosticsTimelineAttributes = Record; -export type DiagnosticsTimelineEvent = { +type DiagnosticsTimelineEvent = { type: DiagnosticsTimelineEventType; name: string; timestamp?: string; diff --git a/src/infra/disk-space.ts b/src/infra/disk-space.ts index 57391338b7f..9e0ba02c33c 100644 --- a/src/infra/disk-space.ts +++ b/src/infra/disk-space.ts @@ -1,9 +1,9 @@ import fs from "node:fs"; import path from "node:path"; -export const LOW_DISK_SPACE_WARNING_THRESHOLD_BYTES = 1024 * 1024 * 1024; +const LOW_DISK_SPACE_WARNING_THRESHOLD_BYTES = 1024 * 1024 * 1024; -export type DiskSpaceSnapshot = { +type DiskSpaceSnapshot = { targetPath: string; checkedPath: string; availableBytes: number;