Opublikowane źródło
Pobierz źródło ZIP
CH-J Tools
Przeglądaj katalogi i pliki dla konkretnego wydania aplikacji.
CH-J / Server Manager
1704 pliki
0.1.2-beta
Dodano: · Built:
1
/** Shared types of the CH-J API (Core API for the main window, Module API for modules). */3
export type Language = string; // validated by the Core against i18n/languages.json4
export type Json = null | boolean | number | string | Json[] | { [key: string]: Json };5
export type Payload = Record<string, unknown>;7
export interface CoreErrorPayload {8
code: string;9
message: string;10
[detail: string]: unknown;11
}13
/** Envelope used by SSH, biometrics and diagnostics (unchanged from 0.1.0). */14
export type Result<T> = { ok: true; value: T } | { ok: false; error: CoreErrorPayload };16
export interface CoreInfo {17
name: string;18
version: string;19
platform: "darwin" | "win32" | "linux" | string;20
arch: string;21
coreApi: string;22
pluginApi: string;23
moduleApi: string;24
dataSchema: number;25
license: string;26
copyright: string;27
runtime: "tauri";28
}30
export interface SidebarConfig { mode: "full" | "compact" | "split"; hidden: boolean; width: number }32
export interface AppConfig {33
schemaVersion: 1;34
ui: { terminalSuggest?: boolean; terminalSuggestRepair?: boolean; terminalAppearance?: TerminalAppearance; terminalProfiles?: TerminalProfile[]; language: Language; theme: "system" | "dark" | "light"; sidebar: SidebarConfig; navigationOrder: string[] };35
updates: { channel: Channel; autoCheck: boolean; lastLaunchedRelease: null | { id: string; version: string; publishedAt: string; sha512: string }; baseUrls: string[] };36
plugins: { channel: Channel; display: Record<string, "hidden" | "visible" | "navigation"> };37
security: { autoLockMinutes: number; lockOnBlur: boolean; requireSystemAuthentication: boolean };38
}40
export type Channel = "alpha" | "beta" | "stable" | "all";42
export interface VaultStatus { initialized: boolean; needsSetup: boolean; damaged: boolean; unlocked: boolean; reason?: string }44
export interface BiometricStatus {45
provider: string;46
protection: string;47
available: boolean;48
enrolled: boolean;49
enabled: boolean;50
code?: string;51
}53
export interface ServerProfile {54
id: string;55
label: string;56
host: string;57
port: number;58
username: string;59
authMethod: "password" | "privateKey";60
privateKeyPath: string;61
kexPolicy?: "prefer-hybrid" | "hybrid-only";62
tags: string[];63
createdAt: string;64
updatedAt: string;65
lastUsedAt: string | null;66
hasStoredPassword: boolean;67
}69
export interface ProfileInput extends Partial<Omit<ServerProfile, "hasStoredPassword">> {70
storePassword?: boolean;71
password?: string;72
}74
export interface SessionLatency {75
pingMs: number | null;76
sshRttMs: number | null;77
measuredAt: string | null;78
[field: string]: unknown;79
}81
export interface TerminalSuggestion {82
id: string;83
title: string;84
command: string;85
insert: string;86
replacesInput: boolean;87
risk: string;88
level: string;89
available: boolean | null;90
privileged: boolean;91
powershell: boolean;92
}94
export interface TerminalAppearance {95
fontFamily?: string;96
fontSize?: number;97
fontWeight?: string;98
lineHeight?: number;99
letterSpacing?: number;100
cursorStyle?: string;101
foreground?: string;102
background?: string;103
cursor?: string;104
selection?: string;105
profile?: string;106
ansi?: Record<string, string>;107
}109
export interface TerminalProfile {110
id: string;111
name: string;112
appearance: TerminalAppearance;113
}115
export interface TerminalDictionary {116
custom: string[];117
hidden: string[];118
}120
export interface TerminalSuggestions {121
os: string | null;122
name: string | null;123
version: string | null;124
items: TerminalSuggestion[];125
}127
export interface SessionStatus {128
kexPolicy?: "prefer-hybrid" | "hybrid-only";129
crypto?: { kex?: string; hostKeyAlgorithm?: string; authenticationAlgorithm?: string; kexPostQuantum?: boolean; hostKeyPostQuantum?: boolean; authenticationPostQuantum?: boolean; exchanges?: number }[];130
slot?: 1 | 2 | null;131
adhoc?: boolean;132
jump?: { label: string; host: string; port: number; username: string }[];133
sessionId: string;134
profileId: string;135
label: string;136
host: string;137
port: number;138
username: string;139
authMethod: "password" | "privateKey";140
state: "connecting" | "connected" | "disconnected";141
latency: SessionLatency;142
reason?: string;143
}145
export interface SshConnectRequest { sessionId: string; profileId: string; password?: string; passphrase?: string; cols?: number; rows?: number }146
export interface SshTrustRequest { sessionId: string; profileId: string; fingerprint: string; replaceKnown?: boolean; knownFingerprint?: string }148
export interface ModuleManifest {149
schemaVersion: 1;150
id: string;151
name: string;152
description: string;153
version: string;154
publisher: string;155
entry: string;156
pluginApi: string;157
minAppVersion: string;158
permissions: ModulePermission[];159
bundled?: boolean;160
installedReleaseId?: string | null;161
installedSha512?: string | null;162
installedAt?: string | null;163
installedPublishedAt?: string | null;164
}166
export type ModulePermission =167
| "session.read" | "system.metrics.read" | "system.memory.manage" | "disks.read" | "disks.manage"168
| "keys.generate" | "files.read" | "files.write" | "files.transfer" | "users.read" | "users.manage"169
| "nginx.read" | "nginx.manage" | "certbot.manage" | "mail.read" | "mail.manage" | "logs.read"170
| "remote.exec" | "local.hash";172
export interface ModuleWindowState { pluginId: string; moduleId: string; name: string; version: string; minimized: boolean }174
export interface SudoOptions { sudo?: boolean; sudoPassword?: string; rememberSudo?: boolean }SHA-256
2a0eb248c2c1cf1fc7b5dd70cd5795030aa2da37cfaa64718108cb4a6f208f7aCH-J Proprietary Software License 1.14 · Źródło jest dostarczane pod CH-J Proprietary Software License 1.14. Jego dostępność nie zmienia warunków licencji ani nie przyznaje dodatkowych praw.
SHA-256
ac8fe790f4ba60fc098f8c985fc2656cfcc6cdc21fb34b30e308a2b54e62258f