refactor(backend): specta ipc bindings (#8195)

* refactor(ipc): generate bindings with Specta

* fix(profile): project IPC inputs to consumed fields

* fix(events): remove unused refresh payloads

* fix(webdav): return only consumed backup metadata

* fix(network): trim unused interface metadata

* fix(sysinfo): return only displayed system fields

* chore(knip): check generated runtime exports

* fix(proxy): confirm runtime chain updates before UI changes

* fix(clipboard): propagate proxy environment copy failures

* refactor(dns): remove ignored runtime patch

* refactor(core): trim unused upgrade response fields

* refactor(ipc): avoid redundant response copies

* refactor(proxy): clarify automatic proxy query naming

* chore(tests): remove added IPC regression tests

* refactor(ipc): enforce typed command boundaries

* chore(contract): check generated bindings before push

* refactor(ipc): remove unused proxy liveness payloads
This commit is contained in:
Tunglies
2026-10-12 06:16:05 +00:00
committed by GitHub
parent 27efaf34f4
commit 6e08a77a84
89 changed files with 2714 additions and 1354 deletions
+12 -83
View File
@@ -1,86 +1,15 @@
export interface ProxyViewV1 {
schemaVersion: 1
orderSource: 'runtime' | 'fallback'
providerState: 'ready' | 'unavailable'
global: ProxyGroupView | null
direct: string | null
groups: ProxyGroupView[]
records: Record<string, ProxyNodeView>
standalone: string[]
providers: ProxyProviderView[]
}
interface ProxyCapabilities {
udp: boolean
xudp: boolean
tfo: boolean
mptcp: boolean
smux: boolean
}
interface DelayHistory {
time: string
delay: number
}
export interface ProxyGroupView extends ProxyCapabilities {
name: string
type: string
alive: boolean
now?: string
fixed?: string
hidden?: boolean
icon?: string
testUrl?: string
history: DelayHistory[]
extra?: Record<string, { alive: boolean; history: DelayHistory[] }>
members: ProxyMemberRef[]
}
export interface ProxyNodeView extends ProxyCapabilities {
recordId: string
name: string
type: string
alive: boolean
history: DelayHistory[]
extra?: Record<string, { alive: boolean; history: DelayHistory[] }>
id?: string
hidden?: boolean
icon?: string
testUrl?: string
source:
| { kind: 'core'; proxyName: string }
| { kind: 'provider'; providerName: string; proxyName: string }
}
type ProxyMemberUnresolvedReason =
| 'missing'
| 'ambiguous'
| 'provider-unavailable'
export type ProxyMemberRef =
| { kind: 'group'; name: string }
| { kind: 'node'; name: string; recordId: string }
| {
kind: 'unresolved'
name: string
reason: ProxyMemberUnresolvedReason
}
interface ProxyProviderView {
name: string
vehicleType: 'HTTP' | 'File' | 'Inline'
updatedAt?: string
subscriptionInfo?: ProxySubscriptionInfo
proxyRecordIds: string[]
}
interface ProxySubscriptionInfo {
upload: number
download: number
total: number
expire: number
}
import type {
ProxyViewV1_Serialize as ProxyViewV1,
ProxyGroupView_Serialize as ProxyGroupView,
ProxyNodeView_Serialize as ProxyNodeView,
ProxyMemberRef,
} from '@/services/bindings'
export type {
ProxyViewV1_Serialize as ProxyViewV1,
ProxyGroupView_Serialize as ProxyGroupView,
ProxyNodeView_Serialize as ProxyNodeView,
ProxyMemberRef,
} from '@/services/bindings'
export type ResolvedProxyMember =
| {