mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 08:20:43 +00:00
refactor: trim gateway policy exports
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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>;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user