refactor: trim gateway policy exports · openclaw/openclaw@eb02161
steipete
·
2026-05-02
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import type { ChannelId } from "../channels/plugins/types.public.js"; |
2 | 2 | |
3 | | -export type ChannelHealthSnapshot = { |
| 3 | +type ChannelHealthSnapshot = { |
4 | 4 | running?: boolean; |
5 | 5 | connected?: boolean; |
6 | 6 | enabled?: boolean; |
@@ -17,7 +17,7 @@ export type ChannelHealthSnapshot = {
|
17 | 17 | mode?: string; |
18 | 18 | }; |
19 | 19 | |
20 | | -export type ChannelHealthEvaluationReason = |
| 20 | +type ChannelHealthEvaluationReason = |
21 | 21 | | "healthy" |
22 | 22 | | "unmanaged" |
23 | 23 | | "not-running" |
@@ -39,12 +39,7 @@ export type ChannelHealthPolicy = {
|
39 | 39 | channelConnectGraceMs: number; |
40 | 40 | }; |
41 | 41 | |
42 | | -export type ChannelRestartReason = |
43 | | -| "gave-up" |
44 | | -| "stopped" |
45 | | -| "stale-socket" |
46 | | -| "stuck" |
47 | | -| "disconnected"; |
| 42 | +type ChannelRestartReason = "gave-up" | "stopped" | "stale-socket" | "stuck" | "disconnected"; |
48 | 43 | |
49 | 44 | function isManagedAccount(snapshot: ChannelHealthSnapshot): boolean { |
50 | 45 | return snapshot.enabled !== false && snapshot.configured !== false; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -30,7 +30,7 @@ export type OffloadedRef = {
|
30 | 30 | sizeBytes: number; |
31 | 31 | }; |
32 | 32 | |
33 | | -export type ParsedMessageWithImages = { |
| 33 | +type ParsedMessageWithImages = { |
34 | 34 | message: string; |
35 | 35 | images: ChatImageContent[]; |
36 | 36 | imageOrder: PromptImageOrderEntry[]; |
@@ -67,7 +67,7 @@ export function resolveChatAttachmentMaxBytes(cfg: OpenClawConfig): number {
|
67 | 67 | return Math.floor(mb * 1024 * 1024); |
68 | 68 | } |
69 | 69 | |
70 | | -export type UnsupportedAttachmentReason = |
| 70 | +type UnsupportedAttachmentReason = |
71 | 71 | | "empty-payload" |
72 | 72 | | "text-only-image" |
73 | 73 | | "unsupported-non-image" |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -27,7 +27,7 @@ export {
|
27 | 27 | }; |
28 | 28 | export type { ChannelKind, GatewayReloadPlan } from "./config-reload-plan.js"; |
29 | 29 | |
30 | | -export type GatewayReloadSettings = { |
| 30 | +type GatewayReloadSettings = { |
31 | 31 | mode: GatewayReloadMode; |
32 | 32 | debounceMs: number; |
33 | 33 | }; |
@@ -155,7 +155,7 @@ export function resolveGatewayReloadSettings(cfg: OpenClawConfig): GatewayReload
|
155 | 155 | return { mode, debounceMs }; |
156 | 156 | } |
157 | 157 | |
158 | | -export type GatewayConfigReloader = { |
| 158 | +type GatewayConfigReloader = { |
159 | 159 | stop: () => Promise<void>; |
160 | 160 | }; |
161 | 161 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。