refactor: trim gateway policy exports

This commit is contained in:
Peter Steinberger
2026-05-01 22:41:56 +01:00
parent e0cc374b07
commit eb02161bbe
3 changed files with 7 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
import type { ChannelId } from "../channels/plugins/types.public.js";
export type ChannelHealthSnapshot = {
type ChannelHealthSnapshot = {
running?: boolean;
connected?: boolean;
enabled?: boolean;
@@ -17,7 +17,7 @@ export type ChannelHealthSnapshot = {
mode?: string;
};
export type ChannelHealthEvaluationReason =
type ChannelHealthEvaluationReason =
| "healthy"
| "unmanaged"
| "not-running"
@@ -39,12 +39,7 @@ export type ChannelHealthPolicy = {
channelConnectGraceMs: number;
};
export type ChannelRestartReason =
| "gave-up"
| "stopped"
| "stale-socket"
| "stuck"
| "disconnected";
type ChannelRestartReason = "gave-up" | "stopped" | "stale-socket" | "stuck" | "disconnected";
function isManagedAccount(snapshot: ChannelHealthSnapshot): boolean {
return snapshot.enabled !== false && snapshot.configured !== false;

View File

@@ -30,7 +30,7 @@ export type OffloadedRef = {
sizeBytes: number;
};
export type ParsedMessageWithImages = {
type ParsedMessageWithImages = {
message: string;
images: ChatImageContent[];
imageOrder: PromptImageOrderEntry[];
@@ -67,7 +67,7 @@ export function resolveChatAttachmentMaxBytes(cfg: OpenClawConfig): number {
return Math.floor(mb * 1024 * 1024);
}
export type UnsupportedAttachmentReason =
type UnsupportedAttachmentReason =
| "empty-payload"
| "text-only-image"
| "unsupported-non-image"

View File

@@ -27,7 +27,7 @@ export {
};
export type { ChannelKind, GatewayReloadPlan } from "./config-reload-plan.js";
export type GatewayReloadSettings = {
type GatewayReloadSettings = {
mode: GatewayReloadMode;
debounceMs: number;
};
@@ -155,7 +155,7 @@ export function resolveGatewayReloadSettings(cfg: OpenClawConfig): GatewayReload
return { mode, debounceMs };
}
export type GatewayConfigReloader = {
type GatewayConfigReloader = {
stop: () => Promise<void>;
};