Gate review: `escalated` still cleared on every bare 'open', so once a flapping proxy kept `reconnectFailingSince` past the 5-minute escalation, each flap re-fired the persistent "connection lost" toast. The trio (attempt, failingSince, escalated) now resets together inside the stable-open check, matching the manual/wake reset sites. The predicate moves to apps/shared/reconnect-backoff.ts (`isStableOpen`, `RECONNECT_STABLE_OPEN_MS`) so the pooled secondary sockets in store/gateway.ts — which reset their ladder on every 'open' the same way — share one definition of "stable".
187 lines
4.4 KiB
TypeScript
187 lines
4.4 KiB
TypeScript
export { hasAnsi, sanitizeAnsiForRender, stripAnsi } from './ansi'
|
|
export { backendScopeKey, backendScopePrefix, LOCAL_CONNECTION_ID, registryBackendScopeKey } from './backend-scope'
|
|
export {
|
|
BILLING_REFUSAL_POLICY,
|
|
type BillingRecovery,
|
|
type BillingRefusalPolicy,
|
|
refusalPolicy
|
|
} from './billing-policy'
|
|
export type {
|
|
BillingAutoReload,
|
|
BillingCardInfo,
|
|
BillingChargeResponse,
|
|
BillingChargeStatusResponse,
|
|
BillingErrorPayload,
|
|
BillingMonthlyCap,
|
|
BillingMutationResponse,
|
|
BillingPaymentMethod,
|
|
BillingRefusalCode,
|
|
BillingStateResponse,
|
|
ChargeFailureReason,
|
|
KnownBillingRefusalCode,
|
|
KnownChargeFailureReason,
|
|
SubscriptionPreviewResponse,
|
|
SubscriptionStateResponse,
|
|
SubscriptionTierOption,
|
|
SubscriptionUpgradeResponse,
|
|
UsageBarData,
|
|
UsageModelData
|
|
} from './billing-types'
|
|
export {
|
|
driveChargeSettlement,
|
|
SETTLEMENT_MAX_RETRY_AFTER_MS,
|
|
SETTLEMENT_POLL_CAP_MS,
|
|
SETTLEMENT_POLL_INTERVAL_MS,
|
|
type SettlementDeps,
|
|
type SettlementOutcome
|
|
} from './charge-settlement'
|
|
export {
|
|
contrastRatio,
|
|
darken,
|
|
ensureContrast,
|
|
lighten,
|
|
mix,
|
|
parseColor,
|
|
readableOn,
|
|
relativeLuminance,
|
|
type Rgb,
|
|
toHex
|
|
} from './color'
|
|
export {
|
|
createCronTriggerController,
|
|
type CronTriggerController,
|
|
type CronTriggerRunResult
|
|
} from './cron-trigger-controller'
|
|
export {
|
|
clampDataUrlReadMaxMb,
|
|
DATA_URL_READ_DEFAULT_MAX_MB,
|
|
DATA_URL_READ_MAX_MAX_MB,
|
|
DATA_URL_READ_MIN_MAX_MB
|
|
} from './data-url-read-max'
|
|
export { compactNumber } from './format'
|
|
export { type FuzzyMatch, fuzzyRank, fuzzyScore, fuzzyScoreMulti, type RankedItem } from './fuzzy'
|
|
export * from './gateway-events'
|
|
export {
|
|
applyDocumentLocale,
|
|
type EndonymLocale,
|
|
isRecord,
|
|
LOCALE_ENDONYMS,
|
|
mergeTranslations,
|
|
RTL_LOCALES,
|
|
type TranslationOverride
|
|
} from './i18n'
|
|
export {
|
|
DEFAULT_HEARTBEAT_DEADLINE_MS,
|
|
DEFAULT_HEARTBEAT_INTERVAL_MS,
|
|
type GatewayRequestId,
|
|
JSON_RPC_INTERNAL_ERROR,
|
|
JSON_RPC_METHOD_NOT_FOUND,
|
|
jsonRpcErrorFromFrame,
|
|
type JsonRpcErrorPayload,
|
|
type JsonRpcFrame,
|
|
JsonRpcGatewayError,
|
|
JsonRpcRequestChannel,
|
|
type JsonRpcRequestChannelOptions,
|
|
type JsonRpcTransport,
|
|
type ServerRequest,
|
|
type ServerRequestHandler,
|
|
type ServerRequestParams,
|
|
wireFrameText
|
|
} from './json-rpc-channel'
|
|
export {
|
|
type ConnectionState,
|
|
type GatewayClientOptions,
|
|
GatewayEventHub,
|
|
isGatewayWebSocketUrl,
|
|
JsonRpcGatewayClient,
|
|
type WebSocketLike
|
|
} from './json-rpc-gateway'
|
|
export { modelSearchText } from './model-search-text'
|
|
export {
|
|
DEFAULT_REASONING_EFFORT,
|
|
isReasoningEffort,
|
|
REASONING_EFFORT_VALUES,
|
|
REASONING_EFFORTS,
|
|
type ReasoningEffort,
|
|
type ReasoningEffortValue
|
|
} from './reasoning-effort'
|
|
export {
|
|
isStableOpen,
|
|
RECONNECT_STABLE_OPEN_MS,
|
|
reconnectBackoffDelayMs,
|
|
type ReconnectBackoffOptions
|
|
} from './reconnect-backoff'
|
|
export { skillInvocationText } from './skill-scaffold'
|
|
export {
|
|
type HermesSkin,
|
|
SKIN_BRANDING_TOKENS,
|
|
SKIN_COLOR_TOKENS,
|
|
type SkinBranding,
|
|
type SkinBrandingToken,
|
|
type SkinColors,
|
|
type SkinColorToken
|
|
} from './skin'
|
|
export {
|
|
type AliasCommandDispatchResponse,
|
|
type CommandDispatchResponse,
|
|
type ExecCommandDispatchResponse,
|
|
looksLikeSlashCommand,
|
|
parseCommandDispatch,
|
|
type ParsedSlashCommand,
|
|
parseSlashCommand,
|
|
type PrefillCommandDispatchResponse,
|
|
type SendCommandDispatchResponse,
|
|
type SkillCommandDispatchResponse,
|
|
SLASH_COMMAND_RE
|
|
} from './slash'
|
|
export {
|
|
THEME_PRESET_PALETTES,
|
|
type ThemePresetColors,
|
|
type ThemePresetName,
|
|
type ThemePresetPalette
|
|
} from './theme-presets'
|
|
export {
|
|
backgroundMaterialFor,
|
|
clampIntensity,
|
|
DEFAULT_GLASS_MATERIAL,
|
|
DEFAULT_GLASS_SCOPE,
|
|
GLASS_MATERIALS,
|
|
GLASS_SCOPES,
|
|
glassActive,
|
|
type GlassMaterial,
|
|
glassMaterialForPicker,
|
|
glassMaterialsFor,
|
|
type GlassScope,
|
|
glassSupportedOn,
|
|
glassSurfaceKeep,
|
|
normalizeMaterial,
|
|
normalizeMode,
|
|
normalizeScope,
|
|
normalizeState,
|
|
TRANSLUCENCY_CURVE,
|
|
TRANSLUCENCY_MAX,
|
|
TRANSLUCENCY_MIN,
|
|
TRANSLUCENCY_OPACITY_FLOOR,
|
|
TRANSLUCENCY_STEP,
|
|
type TranslucencyMode,
|
|
type TranslucencyState,
|
|
translucencySupportedOn,
|
|
vibrancyFor,
|
|
windowOpacityFor,
|
|
WINDOWS_BACKGROUND_MATERIALS,
|
|
WINDOWS_GLASS_MIN_BUILD,
|
|
type WindowsBackgroundMaterial
|
|
} from './translucency'
|
|
export {
|
|
buildHermesWebSocketUrl,
|
|
type GatewayAuthMode,
|
|
GatewayReauthRequiredError,
|
|
type GatewayWsConnection,
|
|
type GatewayWsUrlResult,
|
|
type HermesWebSocketUrlOptions,
|
|
isGatewayReauthRequired,
|
|
resolveGatewayWsUrl,
|
|
type ResolveGatewayWsUrlDeps,
|
|
type WebSocketAuthParam
|
|
} from './websocket-url'
|