mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-25 03:45:46 -06:00
refactor(infra): hide local helper types
This commit is contained in:
@@ -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[];
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user