refactor(infra): hide local helper types

This commit is contained in:
Vincent Koc
2026-06-17 12:23:59 +08:00
parent ada70ece6f
commit a0a0e5e4cb
5 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ import type { OpenClawConfig } from "../config/types.openclaw.js";
import { DEFAULT_ACCOUNT_ID } from "../routing/session-key.js";
import { formatTimeAgo } from "./format-time/format-relative.ts";
export type ChannelSummaryOptions = {
type ChannelSummaryOptions = {
colorize?: boolean;
includeAllowFrom?: boolean;
plugins?: readonly ChannelPlugin[];
+3 -3
View File
@@ -13,7 +13,7 @@ export function resolveControlUiDistIndexPathForRoot(root: string): string {
return path.join(root, ...CONTROL_UI_DIST_PATH_SEGMENTS);
}
export type ControlUiDistIndexHealth = {
type ControlUiDistIndexHealth = {
indexPath: string | null;
exists: boolean;
};
@@ -140,7 +140,7 @@ export async function resolveControlUiDistIndexPath(
return null;
}
export type ControlUiRootResolveOptions = {
type ControlUiRootResolveOptions = {
argv1?: string;
moduleUrl?: string;
cwd?: string;
@@ -270,7 +270,7 @@ export function isPackageProvenControlUiRootSync(
return pathsMatchByRealpathOrResolve(root, packageDistRoot);
}
export type EnsureControlUiAssetsResult = {
type EnsureControlUiAssetsResult = {
ok: boolean;
built: boolean;
message?: string;
+1 -1
View File
@@ -23,7 +23,7 @@ import { generatePairingToken, verifyPairingToken } from "./pairing-token.js";
export const DEVICE_BOOTSTRAP_TOKEN_TTL_MS = 10 * 60 * 1000;
/** Persisted bootstrap token state, including binding and role/scope redemption progress. */
export type DeviceBootstrapTokenRecord = {
type DeviceBootstrapTokenRecord = {
token: string;
ts: number;
deviceId?: string;
+1 -1
View File
@@ -64,7 +64,7 @@ type DiagnosticsTimelineOptions = {
};
/** Active timeline span carried through async-local scope for nested diagnostics. */
export type ActiveDiagnosticsTimelineSpan = {
type ActiveDiagnosticsTimelineSpan = {
name: string;
phase?: string;
spanId: string;
+2 -2
View File
@@ -1,11 +1,11 @@
/** Context passed to fatal-error hooks before the process exits. */
export type FatalErrorHookContext = {
type FatalErrorHookContext = {
reason: string;
error?: unknown;
};
/** Hook that can return one extra diagnostic line for fatal error output. */
export type FatalErrorHook = (context: FatalErrorHookContext) => string | undefined | void;
type FatalErrorHook = (context: FatalErrorHookContext) => string | undefined | void;
const hooks = new Set<FatalErrorHook>();