CH-J ToolsSSH によるサーバー管理
メニュー
公開済みのソース

CH-J Tools

特定のアプリケーションリリースのディレクトリとファイルを閲覧できます。

ソースの ZIP をダウンロード
CH-J / Server Manager 1704 ファイル
0.1.2-beta 追加日時: · ビルド日時:
types.ts 追加日時: 日付の記録なし 5.3 KB · 174 行
コード ファイルをダウンロード
1/** Shared types of the CH-J API (Core API for the main window, Module API for modules). */
3export type Language = string; // validated by the Core against i18n/languages.json
4export type Json = null | boolean | number | string | Json[] | { [key: string]: Json };
5export type Payload = Record<string, unknown>;
7export interface CoreErrorPayload {
8 code: string;
9 message: string;
10 [detail: string]: unknown;
13/** Envelope used by SSH, biometrics and diagnostics (unchanged from 0.1.0). */
14export type Result<T> = { ok: true; value: T } | { ok: false; error: CoreErrorPayload };
16export 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";
30export interface SidebarConfig { mode: "full" | "compact" | "split"; hidden: boolean; width: number }
32export 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 };
40export type Channel = "alpha" | "beta" | "stable" | "all";
42export interface VaultStatus { initialized: boolean; needsSetup: boolean; damaged: boolean; unlocked: boolean; reason?: string }
44export interface BiometricStatus {
45 provider: string;
46 protection: string;
47 available: boolean;
48 enrolled: boolean;
49 enabled: boolean;
50 code?: string;
53export 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;
69export interface ProfileInput extends Partial<Omit<ServerProfile, "hasStoredPassword">> {
70 storePassword?: boolean;
71 password?: string;
74export interface SessionLatency {
75 pingMs: number | null;
76 sshRttMs: number | null;
77 measuredAt: string | null;
78 [field: string]: unknown;
81export 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;
94export 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>;
109export interface TerminalProfile {
110 id: string;
111 name: string;
112 appearance: TerminalAppearance;
115export interface TerminalDictionary {
116 custom: string[];
117 hidden: string[];
120export interface TerminalSuggestions {
121 os: string | null;
122 name: string | null;
123 version: string | null;
124 items: TerminalSuggestion[];
127export 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;
145export interface SshConnectRequest { sessionId: string; profileId: string; password?: string; passphrase?: string; cols?: number; rows?: number }
146export interface SshTrustRequest { sessionId: string; profileId: string; fingerprint: string; replaceKnown?: boolean; knownFingerprint?: string }
148export 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;
166export 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";
172export interface ModuleWindowState { pluginId: string; moduleId: string; name: string; version: string; minimized: boolean }
174export interface SudoOptions { sudo?: boolean; sudoPassword?: string; rememberSudo?: boolean }
SHA-2562a0eb248c2c1cf1fc7b5dd70cd5795030aa2da37cfaa64718108cb4a6f208f7a

CH-J Proprietary Software License 1.14 · ソースは CH-J Proprietary Software License 1.14 に基づいて提供されています。公開されていても、ライセンス条項が変わったり、追加の権利が付与されたりすることはありません。

アーカイブの SHA-256ac8fe790f4ba60fc098f8c985fc2656cfcc6cdc21fb34b30e308a2b54e62258f
ファイル