@termix-ssh/plugin-sdk 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (236) hide show
  1. package/README.md +52 -0
  2. package/cli/commands/build.mjs +246 -0
  3. package/cli/commands/migrations.mjs +248 -0
  4. package/cli/commands/pack.mjs +42 -0
  5. package/cli/commands/sign.mjs +83 -0
  6. package/cli/commands/test.mjs +33 -0
  7. package/cli/commands/validate.mjs +215 -0
  8. package/cli/index.mjs +65 -0
  9. package/cli/lib/changelog.mjs +126 -0
  10. package/cli/lib/externals.mjs +46 -0
  11. package/cli/lib/plugin-dir.mjs +29 -0
  12. package/cli/lib/signing.mjs +86 -0
  13. package/cli/lib/static-url-imports.mjs +54 -0
  14. package/cli/lib/tmxplug.mjs +106 -0
  15. package/cli/patches/guacamole-common-js-flush.cjs +76 -0
  16. package/cli/patches/xterm-android-ime.cjs +130 -0
  17. package/client.d.ts +13 -0
  18. package/dist/backend.d.ts +1777 -0
  19. package/dist/backend.js +84 -0
  20. package/dist/capabilities.d.ts +38 -0
  21. package/dist/capabilities.js +71 -0
  22. package/dist/db.d.ts +112 -0
  23. package/dist/db.js +189 -0
  24. package/dist/ddl.d.ts +76 -0
  25. package/dist/ddl.js +678 -0
  26. package/dist/desktop.d.ts +346 -0
  27. package/dist/desktop.js +5 -0
  28. package/dist/frontend.d.ts +1206 -0
  29. package/dist/frontend.js +388 -0
  30. package/dist/host/chunk-F3SDZDDG.js +6017 -0
  31. package/dist/host/chunk-XGWE7BTJ.js +90 -0
  32. package/dist/host/chunk-XH5NXL6Y.js +56314 -0
  33. package/dist/host/chunk-YC2MAKSP.js +14 -0
  34. package/dist/host/linked-server-FZGWQW32.js +12 -0
  35. package/dist/host/rbac-api-6KDMBVDZ.js +52 -0
  36. package/dist/host/testing-host.js +414 -0
  37. package/dist/host/theme.css +91 -0
  38. package/dist/host/types/src/types/auth-protocols.d.ts +10 -0
  39. package/dist/host/types/src/types/connection-log.d.ts +13 -0
  40. package/dist/host/types/src/types/credential-sidebar-preferences.d.ts +38 -0
  41. package/dist/host/types/src/types/host-defaults.d.ts +60 -0
  42. package/dist/host/types/src/types/host-sidebar-preferences.d.ts +55 -0
  43. package/dist/host/types/src/types/index.d.ts +298 -0
  44. package/dist/host/types/src/types/keybindings.d.ts +27 -0
  45. package/dist/host/types/src/types/ui-preferences.d.ts +102 -0
  46. package/dist/host/types/src/types/ui-types.d.ts +260 -0
  47. package/dist/host/types/src/ui/api/admin-user-data-api.d.ts +11 -0
  48. package/dist/host/types/src/ui/api/auth-methods-api.d.ts +63 -0
  49. package/dist/host/types/src/ui/api/credential-sidebar-preferences-api.d.ts +3 -0
  50. package/dist/host/types/src/ui/api/credentials-api.d.ts +56 -0
  51. package/dist/host/types/src/ui/api/dashboard-api.d.ts +23 -0
  52. package/dist/host/types/src/ui/api/external-account-api.d.ts +8 -0
  53. package/dist/host/types/src/ui/api/host-sidebar-preferences-api.d.ts +3 -0
  54. package/dist/host/types/src/ui/api/host-status-api.d.ts +11 -0
  55. package/dist/host/types/src/ui/api/open-tabs-api.d.ts +74 -0
  56. package/dist/host/types/src/ui/api/plugins-api.d.ts +128 -0
  57. package/dist/host/types/src/ui/api/rbac-api.d.ts +167 -0
  58. package/dist/host/types/src/ui/api/settings-api.d.ts +22 -0
  59. package/dist/host/types/src/ui/api/ssh-host-management-api.d.ts +65 -0
  60. package/dist/host/types/src/ui/api/sync-api.d.ts +93 -0
  61. package/dist/host/types/src/ui/api/system-status-api.d.ts +49 -0
  62. package/dist/host/types/src/ui/api/ui-preferences-api.d.ts +8 -0
  63. package/dist/host/types/src/ui/api/user-management-api.d.ts +80 -0
  64. package/dist/host/types/src/ui/auth/Auth.d.ts +12 -0
  65. package/dist/host/types/src/ui/auth/auth-bits.d.ts +11 -0
  66. package/dist/host/types/src/ui/auth/silent-signin.d.ts +2 -0
  67. package/dist/host/types/src/ui/components/FullScreenAppWrapper.d.ts +9 -0
  68. package/dist/host/types/src/ui/components/alert-dialog.d.ts +14 -0
  69. package/dist/host/types/src/ui/components/alert.d.ts +9 -0
  70. package/dist/host/types/src/ui/components/badge.d.ts +9 -0
  71. package/dist/host/types/src/ui/components/button.d.ts +13 -0
  72. package/dist/host/types/src/ui/components/card-grid/CardGridCanvas.d.ts +22 -0
  73. package/dist/host/types/src/ui/components/card-grid/layout-utils.d.ts +26 -0
  74. package/dist/host/types/src/ui/components/card-grid/types.d.ts +29 -0
  75. package/dist/host/types/src/ui/components/card-masonry.d.ts +16 -0
  76. package/dist/host/types/src/ui/components/card.d.ts +11 -0
  77. package/dist/host/types/src/ui/components/charts/BarSeries.d.ts +16 -0
  78. package/dist/host/types/src/ui/components/charts/LineChart.d.ts +17 -0
  79. package/dist/host/types/src/ui/components/charts/RadialGauge.d.ts +18 -0
  80. package/dist/host/types/src/ui/components/charts/Sparkline.d.ts +22 -0
  81. package/dist/host/types/src/ui/components/charts/StatRow.d.ts +15 -0
  82. package/dist/host/types/src/ui/components/charts/geometry.d.ts +20 -0
  83. package/dist/host/types/src/ui/components/charts/index.d.ts +4 -0
  84. package/dist/host/types/src/ui/components/checkbox.d.ts +4 -0
  85. package/dist/host/types/src/ui/components/connection/ConnectionGate.d.ts +56 -0
  86. package/dist/host/types/src/ui/components/connection/ConnectionLogPanel.d.ts +9 -0
  87. package/dist/host/types/src/ui/components/connection/ConnectionScreen.d.ts +34 -0
  88. package/dist/host/types/src/ui/components/connection/connection-status.d.ts +1 -0
  89. package/dist/host/types/src/ui/components/data-view.d.ts +32 -0
  90. package/dist/host/types/src/ui/components/dialog.d.ts +17 -0
  91. package/dist/host/types/src/ui/components/dropdown-menu.d.ts +29 -0
  92. package/dist/host/types/src/ui/components/empty-state.d.ts +19 -0
  93. package/dist/host/types/src/ui/components/form-fields.d.ts +115 -0
  94. package/dist/host/types/src/ui/components/input.d.ts +3 -0
  95. package/dist/host/types/src/ui/components/kbd.d.ts +12 -0
  96. package/dist/host/types/src/ui/components/label.d.ts +4 -0
  97. package/dist/host/types/src/ui/components/manager-card.d.ts +25 -0
  98. package/dist/host/types/src/ui/components/meter.d.ts +14 -0
  99. package/dist/host/types/src/ui/components/metric-card.d.ts +18 -0
  100. package/dist/host/types/src/ui/components/panel-layout.d.ts +83 -0
  101. package/dist/host/types/src/ui/components/password-input.d.ts +4 -0
  102. package/dist/host/types/src/ui/components/popover.d.ts +7 -0
  103. package/dist/host/types/src/ui/components/scroll-area.d.ts +5 -0
  104. package/dist/host/types/src/ui/components/section-card.d.ts +29 -0
  105. package/dist/host/types/src/ui/components/select.d.ts +15 -0
  106. package/dist/host/types/src/ui/components/select2.d.ts +8 -0
  107. package/dist/host/types/src/ui/components/separator.d.ts +4 -0
  108. package/dist/host/types/src/ui/components/sheet.d.ts +14 -0
  109. package/dist/host/types/src/ui/components/sidebar.d.ts +69 -0
  110. package/dist/host/types/src/ui/components/skeleton.d.ts +2 -0
  111. package/dist/host/types/src/ui/components/slider.d.ts +4 -0
  112. package/dist/host/types/src/ui/components/sonner.d.ts +4 -0
  113. package/dist/host/types/src/ui/components/surface/prompt-styles.d.ts +4 -0
  114. package/dist/host/types/src/ui/components/surface/surface-scope.d.ts +79 -0
  115. package/dist/host/types/src/ui/components/switch.d.ts +4 -0
  116. package/dist/host/types/src/ui/components/tab-strip.d.ts +19 -0
  117. package/dist/host/types/src/ui/components/tabs.d.ts +7 -0
  118. package/dist/host/types/src/ui/components/textarea.d.ts +4 -0
  119. package/dist/host/types/src/ui/components/theme-provider.d.ts +14 -0
  120. package/dist/host/types/src/ui/components/tooltip.d.ts +7 -0
  121. package/dist/host/types/src/ui/contexts/BrandingContext.d.ts +15 -0
  122. package/dist/host/types/src/ui/contexts/UiPreferencesContext.d.ts +38 -0
  123. package/dist/host/types/src/ui/contexts/branding-document.d.ts +10 -0
  124. package/dist/host/types/src/ui/dashboard/dashboard-cards-registry.d.ts +30 -0
  125. package/dist/host/types/src/ui/hooks/use-action-slot.d.ts +10 -0
  126. package/dist/host/types/src/ui/hooks/use-adaptive-polling.d.ts +5 -0
  127. package/dist/host/types/src/ui/hooks/use-mobile.d.ts +1 -0
  128. package/dist/host/types/src/ui/hooks/use-permissions.d.ts +29 -0
  129. package/dist/host/types/src/ui/hooks/use-status-color-scheme.d.ts +12 -0
  130. package/dist/host/types/src/ui/hooks/use-sync-status.d.ts +4 -0
  131. package/dist/host/types/src/ui/hooks/useSshAuthProviders.d.ts +17 -0
  132. package/dist/host/types/src/ui/i18n/i18n.d.ts +52 -0
  133. package/dist/host/types/src/ui/lib/ServerStatusContext.d.ts +33 -0
  134. package/dist/host/types/src/ui/lib/adaptive-polling.d.ts +29 -0
  135. package/dist/host/types/src/ui/lib/adaptive-resource-budget.d.ts +39 -0
  136. package/dist/host/types/src/ui/lib/app-keyboard-shortcuts.d.ts +8 -0
  137. package/dist/host/types/src/ui/lib/base-path.d.ts +1 -0
  138. package/dist/host/types/src/ui/lib/clipboard-provider.d.ts +9 -0
  139. package/dist/host/types/src/ui/lib/clipboard.d.ts +20 -0
  140. package/dist/host/types/src/ui/lib/connection-origin.d.ts +47 -0
  141. package/dist/host/types/src/ui/lib/db-health-monitor.d.ts +34 -0
  142. package/dist/host/types/src/ui/lib/device-id.d.ts +1 -0
  143. package/dist/host/types/src/ui/lib/electron.d.ts +1 -0
  144. package/dist/host/types/src/ui/lib/embedded-server-status.d.ts +15 -0
  145. package/dist/host/types/src/ui/lib/error-message.d.ts +9 -0
  146. package/dist/host/types/src/ui/lib/frontend-logger.d.ts +67 -0
  147. package/dist/host/types/src/ui/lib/global-shortcut-handler.d.ts +3 -0
  148. package/dist/host/types/src/ui/lib/host-defaults-context.d.ts +48 -0
  149. package/dist/host/types/src/ui/lib/hosts-request-cache.d.ts +9 -0
  150. package/dist/host/types/src/ui/lib/keybinding-match.d.ts +3 -0
  151. package/dist/host/types/src/ui/lib/linked-server.d.ts +10 -0
  152. package/dist/host/types/src/ui/lib/local-adaptive-engine.d.ts +40 -0
  153. package/dist/host/types/src/ui/lib/permissions.d.ts +16 -0
  154. package/dist/host/types/src/ui/lib/plugin-i18n.d.ts +11 -0
  155. package/dist/host/types/src/ui/lib/plugin-icon.d.ts +11 -0
  156. package/dist/host/types/src/ui/lib/plugin-transport.d.ts +50 -0
  157. package/dist/host/types/src/ui/lib/registry.d.ts +29 -0
  158. package/dist/host/types/src/ui/lib/rem.d.ts +7 -0
  159. package/dist/host/types/src/ui/lib/remote-server-api.d.ts +11 -0
  160. package/dist/host/types/src/ui/lib/server-status-store.d.ts +37 -0
  161. package/dist/host/types/src/ui/lib/sync-events.d.ts +2 -0
  162. package/dist/host/types/src/ui/lib/sync-status.d.ts +6 -0
  163. package/dist/host/types/src/ui/lib/tab-jump-hotkey.d.ts +4 -0
  164. package/dist/host/types/src/ui/lib/theme.d.ts +21 -0
  165. package/dist/host/types/src/ui/lib/ttl-request-cache.d.ts +10 -0
  166. package/dist/host/types/src/ui/lib/usage-color.d.ts +5 -0
  167. package/dist/host/types/src/ui/lib/utils.d.ts +2 -0
  168. package/dist/host/types/src/ui/lib/visible-interval.d.ts +5 -0
  169. package/dist/host/types/src/ui/lib/widget-title.d.ts +8 -0
  170. package/dist/host/types/src/ui/lib/ws-auth.d.ts +1 -0
  171. package/dist/host/types/src/ui/main-axios.d.ts +170 -0
  172. package/dist/host/types/src/ui/plugin-host/PluginViewPlaceholder.d.ts +13 -0
  173. package/dist/host/types/src/ui/plugin-host/app.d.ts +18 -0
  174. package/dist/host/types/src/ui/plugin-host/auth-registry.d.ts +50 -0
  175. package/dist/host/types/src/ui/plugin-host/bridge.d.ts +26 -0
  176. package/dist/host/types/src/ui/plugin-host/component-registry.d.ts +24 -0
  177. package/dist/host/types/src/ui/plugin-host/desktop.d.ts +7 -0
  178. package/dist/host/types/src/ui/plugin-host/extension-registry.d.ts +16 -0
  179. package/dist/host/types/src/ui/plugin-host/host-scope.d.ts +26 -0
  180. package/dist/host/types/src/ui/plugin-host/loader.d.ts +52 -0
  181. package/dist/host/types/src/ui/plugin-host/plugin-store.d.ts +40 -0
  182. package/dist/host/types/src/ui/plugin-host/scope.d.ts +20 -0
  183. package/dist/host/types/src/ui/plugin-host/sdk-ui.d.ts +99 -0
  184. package/dist/host/types/src/ui/plugin-host/shell-bridge.d.ts +67 -0
  185. package/dist/host/types/src/ui/plugin-host/view-ownership.d.ts +31 -0
  186. package/dist/host/types/src/ui/settings/HostPluginSections.d.ts +31 -0
  187. package/dist/host/types/src/ui/settings/SettingsFields.d.ts +22 -0
  188. package/dist/host/types/src/ui/settings/host-feature-tabs.d.ts +11 -0
  189. package/dist/host/types/src/ui/settings/settings-components.d.ts +32 -0
  190. package/dist/host/types/src/ui/settings/settings-fields-util.d.ts +11 -0
  191. package/dist/host/types/src/ui/shell/ActionSlot.d.ts +41 -0
  192. package/dist/host/types/src/ui/shell/TabContext.d.ts +30 -0
  193. package/dist/host/types/src/ui/shell/action-registry.d.ts +99 -0
  194. package/dist/host/types/src/ui/shell/keybinding-registry.d.ts +62 -0
  195. package/dist/host/types/src/ui/shell/palette-registry.d.ts +55 -0
  196. package/dist/host/types/src/ui/shell/panel-registry.d.ts +24 -0
  197. package/dist/host/types/src/ui/shell/tab-registry.d.ts +92 -0
  198. package/dist/host/types/src/ui/sidebar/HostManagerTabs.d.ts +65 -0
  199. package/dist/host/types/src/ui/sidebar/host-contributions.d.ts +72 -0
  200. package/dist/host/types/src/ui/sidebar/host-defaults/catalog.d.ts +17 -0
  201. package/dist/host/types/src/ui/sidebar/host-protocols.d.ts +49 -0
  202. package/dist/host/types/src/ui/sidebar/quick-connect-host.d.ts +21 -0
  203. package/dist/host/types/src/ui/sidebar/rail-items.d.ts +103 -0
  204. package/dist/host/types/src/ui/ssh/connection-log/ConnectionLogContext.d.ts +17 -0
  205. package/dist/host/types/src/ui/ssh/dialogs/BrowserSignInDialog.d.ts +18 -0
  206. package/dist/host/types/src/ui/ssh/dialogs/HostKeyVerificationDialog.d.ts +17 -0
  207. package/dist/host/types/src/ui/ssh/dialogs/PassphraseDialog.d.ts +15 -0
  208. package/dist/host/types/src/ui/ssh/dialogs/SSHAuthDialog.d.ts +20 -0
  209. package/dist/host/types/src/ui/ssh/dialogs/TOTPDialog.d.ts +13 -0
  210. package/dist/host/ui.d.ts +1 -0
  211. package/dist/host/ui.js +31754 -0
  212. package/dist/host/use-permissions-NULZL43J.js +18 -0
  213. package/dist/host-commands.d.ts +89 -0
  214. package/dist/host-commands.js +387 -0
  215. package/dist/manifest.d.ts +461 -0
  216. package/dist/manifest.js +1499 -0
  217. package/dist/settings.d.ts +43 -0
  218. package/dist/settings.js +168 -0
  219. package/dist/ssh-certs.d.ts +25 -0
  220. package/dist/ssh-certs.js +234 -0
  221. package/dist/ssh-options.d.ts +23 -0
  222. package/dist/ssh-options.js +1 -0
  223. package/dist/table-builder.d.ts +26 -0
  224. package/dist/table-builder.js +87 -0
  225. package/dist/testing/safe-ports.d.ts +10 -0
  226. package/dist/testing/safe-ports.js +59 -0
  227. package/dist/testing/setup.d.ts +7 -0
  228. package/dist/testing/setup.js +146 -0
  229. package/dist/testing.d.ts +537 -0
  230. package/dist/testing.js +1451 -0
  231. package/dist/vitest-preset.d.ts +54 -0
  232. package/dist/vitest-preset.js +96 -0
  233. package/package.json +143 -0
  234. package/schema/changelog.schema.json +67 -0
  235. package/schema/manifest.schema.json +1160 -0
  236. package/tsconfig.plugin.json +31 -0
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Short-lived in-memory cache with in-flight request deduplication.
3
+ * Concurrent callers share one loader promise; failures are not cached.
4
+ */
5
+ export type TtlRequestCache<T> = {
6
+ get(loader: () => Promise<T>): Promise<T>;
7
+ invalidate(): void;
8
+ peek(): T | null;
9
+ };
10
+ export declare function createTtlRequestCache<T>(ttlMs: number): TtlRequestCache<T>;
@@ -0,0 +1,5 @@
1
+ /** Usage ramp for resource readouts: warning from 75, destructive from 90. */
2
+ /** Text color class for a percentage. */
3
+ export declare function usageColor(percent: number | null): string;
4
+ /** Background class for the same ramp. */
5
+ export declare function usageBarColor(percent: number | null): string;
@@ -0,0 +1,2 @@
1
+ import { type ClassValue } from "clsx";
2
+ export declare function cn(...inputs: ClassValue[]): string;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * setInterval that pauses while the document is hidden and fires once on resume.
3
+ * Returns a cleanup function for useEffect.
4
+ */
5
+ export declare function runVisibleInterval(tick: () => void, intervalMs: number): () => void;
@@ -0,0 +1,8 @@
1
+ import type { LucideIcon } from "lucide-react";
2
+ interface WidgetTitleProps {
3
+ title: string | null | undefined;
4
+ icon?: React.ReactElement<LucideIcon>;
5
+ fallback?: string;
6
+ }
7
+ export declare function WidgetTitle({ title, icon, fallback }: WidgetTitleProps): import("react").JSX.Element;
8
+ export {};
@@ -0,0 +1 @@
1
+ export declare function websocketAuthProtocols(token: string | null): string[];
@@ -0,0 +1,170 @@
1
+ import { type AxiosInstance } from "axios";
2
+ import { isElectron } from "./lib/electron";
3
+ import type { SSHHost } from "../types/index";
4
+ export interface Role {
5
+ id: number;
6
+ name: string;
7
+ displayName: string;
8
+ description: string | null;
9
+ isSystem: boolean;
10
+ permissions: string[] | string | null;
11
+ createdAt: string;
12
+ updatedAt: string;
13
+ }
14
+ export interface UserRole {
15
+ userId: string;
16
+ roleId: number;
17
+ roleName: string;
18
+ roleDisplayName: string;
19
+ grantedBy: string;
20
+ grantedByUsername: string;
21
+ grantedAt: string;
22
+ }
23
+ export interface AccessRecord {
24
+ id: number;
25
+ targetType: "user" | "role";
26
+ userId: string | null;
27
+ roleId: number | null;
28
+ username: string | null;
29
+ roleName: string | null;
30
+ roleDisplayName: string | null;
31
+ grantedBy: string;
32
+ grantedByUsername: string;
33
+ permissionLevel: "connect" | "view" | "edit" | "manage";
34
+ expiresAt: string | null;
35
+ createdAt: string;
36
+ }
37
+ export type ServerStatus = {
38
+ status: "online" | "offline";
39
+ lastChecked: string;
40
+ };
41
+ export type SSHHostWithStatus = SSHHost & {
42
+ status: "online" | "offline" | "unknown";
43
+ };
44
+ export interface AuthResponse {
45
+ success?: boolean;
46
+ is_admin?: boolean;
47
+ username?: string;
48
+ userId?: string;
49
+ is_external?: boolean;
50
+ totp_enabled?: boolean;
51
+ requires_totp?: boolean;
52
+ temp_token?: string;
53
+ rememberMe?: boolean;
54
+ token?: string;
55
+ }
56
+ export interface UserInfo {
57
+ /** Any second factor, kept under its 2.8 name for older clients. */
58
+ totp_enabled: boolean;
59
+ /** Admin user list only. */
60
+ second_factor_enabled?: boolean;
61
+ userId: string;
62
+ username: string;
63
+ is_admin: boolean;
64
+ /** Signs in through an external login such as SSO or LDAP. */
65
+ is_external?: boolean;
66
+ is_dual_auth?: boolean;
67
+ password_hash?: string;
68
+ data_unlocked?: boolean;
69
+ show_donation_modal?: boolean;
70
+ /** On a desktop linked to a server, the account it is signed in to there. */
71
+ linked?: LinkedAccountInfo | null;
72
+ }
73
+ export interface LinkedAccountInfo {
74
+ serverUrl: string;
75
+ serverName: string | null;
76
+ username: string | null;
77
+ isAdmin: boolean;
78
+ roles: string[];
79
+ permissions: string[];
80
+ status: string;
81
+ }
82
+ interface UserCount {
83
+ count: number;
84
+ }
85
+ export { isElectron };
86
+ export declare function setCookie(name: string, value: string, days?: number): void | Promise<void>;
87
+ export declare function getCookie(name: string): string | undefined;
88
+ export declare function markUserAuthenticated(): void;
89
+ export declare function isCurrentAuthInvalidationError(error: unknown): boolean;
90
+ /** A URL on the main backend, resolved for web, dev proxy and Electron. */
91
+ export declare function getBackendUrl(path: string): string;
92
+ export declare function createRemoteOriginApiInstance(path: string): AxiosInstance;
93
+ /** The linked server's core routes, unprefixed. */
94
+ export declare function getRemoteCoreApi(): AxiosInstance;
95
+ export declare let hostApi: AxiosInstance;
96
+ export declare let sshHostApi: AxiosInstance;
97
+ export declare let authApi: AxiosInstance;
98
+ export declare let rbacApi: AxiosInstance;
99
+ export declare const appReadyPromise: Promise<void>;
100
+ export declare function handleApiError(error: unknown, operation: string): never;
101
+ export { getSSHHosts, createSSHHost, updateSSHHost, bulkImportSSHHosts, importSSHConfigHosts, bulkUpdateSSHHosts, reorderSSHHosts, deleteSSHHost, getSSHHostById, exportSSHHostWithCredentials, exportAllSSHHosts, testProxyConnection, } from "./api/ssh-host-management-api";
102
+ export { getAllServerStatuses, getServerStatusById, refreshServerPolling, getStatusCheckSettings, updateStatusCheckSettings, } from "./api/host-status-api";
103
+ export { getHostSidebarPreferences, saveHostSidebarPreferences, } from "./api/host-sidebar-preferences-api";
104
+ export { getCredentialSidebarPreferences, saveCredentialSidebarPreferences, } from "./api/credential-sidebar-preferences-api";
105
+ export { getUiPreferences, saveUiPreferences } from "./api/ui-preferences-api";
106
+ export { getLogLevel, updateLogLevel, getSessionTimeout, updateSessionTimeout, } from "./api/settings-api";
107
+ export declare function registerUser(username: string, password: string): Promise<Record<string, unknown>>;
108
+ export declare function adminCreateUser(username: string, password: string): Promise<Record<string, unknown>>;
109
+ export declare function loginUser(username: string, password: string, rememberMe?: boolean): Promise<AuthResponse>;
110
+ export declare function requestTrustedProxyLogin(): Promise<{
111
+ enabled: boolean;
112
+ success?: boolean;
113
+ username?: string;
114
+ userId?: string;
115
+ is_admin?: boolean;
116
+ token?: string;
117
+ }>;
118
+ export declare function logoutUser(): Promise<{
119
+ success: boolean;
120
+ message: string;
121
+ }>;
122
+ export declare function getUserInfo(): Promise<UserInfo>;
123
+ export declare function dismissDonationModal(): Promise<void>;
124
+ export declare function getCurrentToken(): Promise<string | null>;
125
+ export declare function unlockUserData(password: string): Promise<{
126
+ success: boolean;
127
+ message: string;
128
+ }>;
129
+ export declare function getRegistrationAllowed(): Promise<{
130
+ allowed: boolean;
131
+ }>;
132
+ export declare function getPasswordLoginAllowed(): Promise<{
133
+ allowed: boolean;
134
+ /** Turned off by an admin but kept on because nothing else can sign in. */
135
+ forced?: boolean;
136
+ }>;
137
+ export declare function getSetupRequired(): Promise<{
138
+ setup_required: boolean;
139
+ }>;
140
+ export type DesktopAutoSessionOutcome = {
141
+ kind: "success";
142
+ data: AuthResponse;
143
+ } | {
144
+ kind: "declined";
145
+ } | {
146
+ kind: "retry";
147
+ };
148
+ /**
149
+ * Electron-only, non-iframed local login: exchanges the embedded backend's
150
+ * auto-provisioned local user for a session without ever showing a login
151
+ * form. If the local database contains multiple users, the backend
152
+ * deterministically chooses the admin account, or the earliest registered
153
+ * account if no admin exists.
154
+ */
155
+ export declare function requestDesktopAutoSession(): Promise<DesktopAutoSessionOutcome>;
156
+ export declare function getUserCount(): Promise<UserCount>;
157
+ export declare function initiatePasswordReset(username: string): Promise<Record<string, unknown>>;
158
+ export declare function verifyPasswordResetCode(username: string, resetCode: string): Promise<Record<string, unknown>>;
159
+ export declare function completePasswordReset(username: string, tempToken: string, newPassword: string, confirmDataWipe?: boolean): Promise<Record<string, unknown>>;
160
+ export declare function changePassword(oldPassword: string, newPassword: string): Promise<any>;
161
+ export { getUserList, getSessions, revokeSession, revokeAllUserSessions, createApiKey, getApiKeys, deleteApiKey, makeUserAdmin, removeAdminStatus, deleteUser, deleteAccount, updateRegistrationAllowed, getExternalAutoProvision, updateExternalAutoProvision, getSecondFactorAfterExternalLogin, updateSecondFactorAfterExternalLogin, updatePasswordLoginAllowed, getPasswordResetAllowed, updatePasswordResetAllowed, adminResetUserPassword, adminExportUserData, type ApiKey, type CreatedApiKey, } from "./api/user-management-api";
162
+ export { adminGetUserHosts, adminCreateUserHost, adminUpdateUserHost, adminDeleteUserHost, adminGetHostPassword, adminGetUserCredentials, adminGetUserCredentialDetails, adminCreateUserCredential, adminUpdateUserCredential, adminDeleteUserCredential, } from "./api/admin-user-data-api";
163
+ export { getReleasesRSS, getVersionInfo, releaseUrlFrom, getDatabaseHealth, } from "./api/system-status-api";
164
+ export { getCredentials, getCredentialDetails, createCredential, updateCredential, duplicateCredential, deleteCredential, getCredentialHosts, getCredentialFolders, getSSHHostWithCredentials, getHostPassword, applyCredentialToHost, removeCredentialFromHost, migrateHostToCredential, getFoldersWithStats, renameFolder, getSSHFolders, updateFolderMetadata, reorderFolders, deleteAllHostsInFolder, renameCredentialFolder, reorderCredentials, detectKeyType, detectPublicKeyType, validateKeyPair, generatePublicKeyFromPrivate, generateKeyPair, deployCredentialToHost, } from "./api/credentials-api";
165
+ export type { UptimeInfo, RecentActivityItem } from "./api/dashboard-api";
166
+ export { getUptime, getRecentActivity, logActivity, resetRecentActivity, } from "./api/dashboard-api";
167
+ export { linkExternalToPasswordAccount, unlinkExternalFromPasswordAccount, } from "./api/external-account-api";
168
+ export { getRoles, createRole, updateRole, deleteRole, getUserRoles, assignRoleToUser, removeRoleFromUser, shareHost, shareFolder, updateHostAccess, getHostAccess, revokeHostAccess, getHostAuthOverride, setHostAuthOverride, getPermissionsCatalog, getSharedHosts, } from "./api/rbac-api";
169
+ export type { SharePermissionLevel, ShareTarget, PermissionCatalogEntry, PermissionCatalogItem, } from "./api/rbac-api";
170
+ export { getOpenTabs, syncOpenTabs, deleteOpenTab, patchOpenTab, addOpenTab, getActiveSessions, getUserPreferences, saveUserPreferences, type OpenTabRecord, type OpenTabSyncPayload, type OpenTabUpsertPayload, type ActiveSessionInfo, type UserPreferences, } from "./api/open-tabs-api";
@@ -0,0 +1,13 @@
1
+ import { type ViewKind } from "./view-ownership";
2
+ /**
3
+ * Stands in for a tab, panel or card whose plugin is not running.
4
+ *
5
+ * A saved tab of a plugin that was switched off or removed must neither crash
6
+ * the shell nor vanish without a word, so it renders this until the plugin is
7
+ * back, at which point the real view takes over in place.
8
+ */
9
+ export declare function PluginViewPlaceholder({ kind, viewId, compact, }: {
10
+ kind: ViewKind;
11
+ viewId: string;
12
+ compact?: boolean;
13
+ }): import("react").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import type { PluginManifest, TermixApp } from "@termix-ssh/plugin-sdk/frontend";
2
+ import { type PluginContributions } from "../api/plugins-api";
3
+ export interface PluginAppHandle {
4
+ app: TermixApp;
5
+ /** Runs every disposer, newest first, isolating failures. */
6
+ dispose: () => void;
7
+ }
8
+ /**
9
+ * Builds the object a plugin's `activate(app)` receives.
10
+ *
11
+ * Every registration goes into one bag, so disabling the plugin removes all
12
+ * of it whatever the plugin's own `deactivate` does. Components are wrapped
13
+ * in the plugin's scope as they are registered, which is what gives the SDK
14
+ * hooks their plugin id and keeps a crash inside the plugin's own box.
15
+ */
16
+ export declare function createPluginApp(pluginId: string, manifest: PluginManifest, contributes: PluginContributions | null, options?: {
17
+ guest?: boolean;
18
+ }): PluginAppHandle;
@@ -0,0 +1,50 @@
1
+ import type { ComponentType } from "react";
2
+ import type { LoginMethodUIProps, SecondFactorUIProps } from "@termix-ssh/plugin-sdk/frontend";
3
+ /**
4
+ * Auth UI plugins contribute.
5
+ *
6
+ * SSH auth editors render in the host and credential editors when their auth
7
+ * type is picked. Login methods render on the login screen for methods the
8
+ * server reports as enabled; second factors render in the step after a first
9
+ * login. Either kind may bring an enrolment section for Settings > Security.
10
+ */
11
+ export interface SshAuthEditorDef {
12
+ /** The authType value stored on the host. */
13
+ id: string;
14
+ pluginId?: string;
15
+ titleKey: string;
16
+ hintKey?: string;
17
+ component?: ComponentType<{
18
+ form: any;
19
+ setField: (key: string, value: unknown) => void;
20
+ }>;
21
+ }
22
+ export interface LoginMethodDef {
23
+ id: string;
24
+ pluginId?: string;
25
+ titleKey: string;
26
+ icon?: ComponentType<{
27
+ className?: string;
28
+ }>;
29
+ component: ComponentType<LoginMethodUIProps>;
30
+ /** Also drawn under the password form. */
31
+ placement?: "inline";
32
+ enrollment?: ComponentType<Record<string, unknown>>;
33
+ }
34
+ export interface SecondFactorDef {
35
+ id: string;
36
+ pluginId?: string;
37
+ titleKey: string;
38
+ component: ComponentType<SecondFactorUIProps>;
39
+ enrollment?: ComponentType<Record<string, unknown>>;
40
+ }
41
+ export declare const registerSshAuthEditor: (item: SshAuthEditorDef) => () => void;
42
+ export declare const useSshAuthEditors: () => SshAuthEditorDef[];
43
+ export declare const registerLoginMethod: (item: LoginMethodDef) => () => void;
44
+ export declare const getLoginMethodUI: (id: string) => LoginMethodDef;
45
+ export declare const useLoginMethods: () => LoginMethodDef[];
46
+ export declare const listLoginMethodUIs: () => LoginMethodDef[];
47
+ export declare const registerSecondFactor: (item: SecondFactorDef) => () => void;
48
+ export declare const getSecondFactorUI: (id: string) => SecondFactorDef;
49
+ export declare const useSecondFactors: () => SecondFactorDef[];
50
+ export declare const listSecondFactorUIs: () => SecondFactorDef[];
@@ -0,0 +1,26 @@
1
+ import { type PluginHostBridge, type PluginHostRecord } from "@termix-ssh/plugin-sdk/frontend";
2
+ import { createPluginApi } from "../lib/plugin-transport";
3
+ /**
4
+ * Resolves a permission the way the backend's ctx.rbac does: a short name
5
+ * belongs to the plugin, while a full id in a core group or another plugin's
6
+ * namespace is taken as given.
7
+ */
8
+ export declare function resolvePluginPermission(pluginId: string, permission: string): string;
9
+ /** Test seam: renderWithApp's `api` option stands in for the real client. */
10
+ export declare function setPluginApiForTesting(pluginId: string, client: ReturnType<typeof createPluginApi> | null): void;
11
+ /** Both host shapes the shell holds: its own list and the API's. */
12
+ type ShellHost = Omit<Partial<PluginHostRecord>, "id" | "parentHostId"> & {
13
+ id: string | number;
14
+ parentHostId?: string | number | null;
15
+ };
16
+ /**
17
+ * The shell's host as the SDK types it. Copied field by field, so a core
18
+ * field reaches plugins only once it is part of PluginHostRecord.
19
+ */
20
+ export declare function toHostRecord(host: ShellHost): PluginHostRecord;
21
+ /** The host as one plugin sees it: only that plugin's settings. */
22
+ export declare function toPluginHostRecord(host: ShellHost, pluginId: string | null): PluginHostRecord;
23
+ export declare const pluginHostBridge: PluginHostBridge;
24
+ /** Installs the bridge. Idempotent. */
25
+ export declare function installPluginHostBridge(): void;
26
+ export {};
@@ -0,0 +1,24 @@
1
+ import { type ComponentType, type ReactNode } from "react";
2
+ /**
3
+ * Components a plugin offers other code by id, through app.registerComponent.
4
+ *
5
+ * The owner decides what the component is and the caller decides where it
6
+ * goes: the ssh-terminal plugin offers "terminal.view", and the collab room,
7
+ * the homepage SSH widget and the file manager render it without importing
8
+ * the terminal. While the owner is off the id resolves to nothing and the
9
+ * caller's fallback shows instead.
10
+ */
11
+ type AnyComponent = ComponentType<Record<string, unknown>>;
12
+ export declare function registerPluginComponent(id: string, component: AnyComponent): () => void;
13
+ /** The component registered under an id, re-rendering when that changes. */
14
+ export declare function usePluginComponent(id: string): AnyComponent | undefined;
15
+ /**
16
+ * Renders the component another plugin registered under `id`, with the rest
17
+ * of the props passed through, or `fallback` while nobody has registered it.
18
+ */
19
+ export declare function PluginComponent({ id, fallback, ...props }: {
20
+ id: string;
21
+ fallback?: ReactNode;
22
+ [prop: string]: unknown;
23
+ }): ReactNode;
24
+ export {};
@@ -0,0 +1,7 @@
1
+ /** app.desktop: the server this desktop is linked to, for plugins. */
2
+ type RemoteServerSource = () => string | null | Promise<string | null>;
3
+ /** renderWithApp's stand-in for the linked server. */
4
+ export declare function setRemoteServerUrlForTesting(source: RemoteServerSource | null): void;
5
+ export declare function remoteServerUrl(): Promise<string | null>;
6
+ export declare function onRemoteServerChange(listener: () => void): () => void;
7
+ export {};
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Named lists any plugin can add to through app.registerExtension. The plugin
3
+ * that reads a point decides its id and item shape; core only stores them, so
4
+ * contributions survive the reader being off and core never learns what a
5
+ * point is for.
6
+ */
7
+ export interface RegisteredExtension {
8
+ id: string;
9
+ pluginId?: string;
10
+ [key: string]: unknown;
11
+ }
12
+ export declare function registerExtension(pointId: string, extension: RegisteredExtension): () => void;
13
+ export declare function getExtension(pointId: string, id: string): RegisteredExtension | undefined;
14
+ export declare function listExtensions(pointId: string): RegisteredExtension[];
15
+ export declare function useExtensions(pointId: string): RegisteredExtension[];
16
+ export declare function resetExtensions(): void;
@@ -0,0 +1,26 @@
1
+ type SettingsBag = Record<string, Record<string, unknown> | undefined>;
2
+ type HostLike = {
3
+ id: string | number;
4
+ pluginSettings?: SettingsBag;
5
+ };
6
+ /**
7
+ * A plugin sees only its own host settings. Another plugin's settings reach
8
+ * it through that plugin's actions or services, never by reading the host,
9
+ * so a plugin can rename a setting without breaking its neighbours.
10
+ *
11
+ * Settings come from the shell's own copy of the host when it has one, so a
12
+ * host one plugin hands another (through an action or a tab) is re-read for
13
+ * the receiver instead of arriving with the sender's slice.
14
+ */
15
+ export declare function isHostLike(value: unknown): value is HostLike;
16
+ export declare function scopeHost<T>(value: T, pluginId: string): T;
17
+ /**
18
+ * Scopes each argument that is a host, and the `host` / `sshHost` fields of
19
+ * an argument that is a request object such as `{ host, appTheme }`.
20
+ */
21
+ export declare function scopeHostArgs<A extends unknown[]>(args: A, pluginId: string): A;
22
+ /** Scopes the host fields of a props, context or request object. */
23
+ export declare function scopeHostFields<T>(value: T, pluginId: string): T;
24
+ /** Wraps a plugin callback so any host it is called with is scoped. */
25
+ export declare function scopeHostCallback<F extends (...args: never[]) => unknown>(fn: F | undefined, pluginId: string): F | undefined;
26
+ export {};
@@ -0,0 +1,52 @@
1
+ import type { ResourceKey } from "i18next";
2
+ import type { FrontendModule } from "@termix-ssh/plugin-sdk/frontend";
3
+ import { type PluginSummary } from "../api/plugins-api";
4
+ export interface PluginLoaderDeps {
5
+ fetchPlugins: () => Promise<PluginSummary[]>;
6
+ importFrontend: (summary: PluginSummary) => Promise<FrontendModule>;
7
+ loadLocale: (summary: PluginSummary, file: string) => Promise<ResourceKey | null>;
8
+ /** Adds the plugin stylesheet; returns the element to remove later. */
9
+ injectCss: (summary: PluginSummary) => HTMLLinkElement | null;
10
+ }
11
+ /** Test seam: swaps how plugins are fetched, imported and localized. */
12
+ export declare function configurePluginLoader(next: Partial<PluginLoaderDeps>): void;
13
+ /**
14
+ * Enabled plugins in an order where each comes after its dependencies. A
15
+ * cycle or a missing hard dependency leaves the plugin out, marked blocked.
16
+ */
17
+ export declare function orderForActivation(summaries: PluginSummary[]): {
18
+ order: PluginSummary[];
19
+ blocked: Map<string, string>;
20
+ };
21
+ /**
22
+ * Fetches plugin state and brings the loaded frontends in line with it. Safe
23
+ * to call as often as needed; calls run one after another.
24
+ */
25
+ export declare function syncPlugins(summaries?: PluginSummary[]): Promise<void>;
26
+ /**
27
+ * The `?view=` names enabled guest plugins serve to anonymous pages, so the
28
+ * entry point can tell a guest link from a signed-in full-screen view
29
+ * without knowing any plugin.
30
+ */
31
+ export declare function fetchGuestViews(): Promise<string[]>;
32
+ /**
33
+ * Loads the plugins the login screen needs (login methods and second
34
+ * factors) before anyone has signed in. After sign-in the full runtime
35
+ * reconciles, keeping these active when their bundle has not changed.
36
+ */
37
+ export declare function startPreLoginPlugins(options?: {
38
+ retryFailed?: boolean;
39
+ }): Promise<void>;
40
+ /**
41
+ * Starts the runtime. Idempotent. `guest` is for anonymous pages (shared
42
+ * session links): only plugins declaring contributes.guest load, from the
43
+ * public list, and nothing is refetched on focus.
44
+ */
45
+ export declare function startPluginRuntime(options?: {
46
+ guest?: boolean;
47
+ }): Promise<void>;
48
+ /** Deactivates every plugin, on logout. */
49
+ export declare function stopPluginRuntime(): Promise<void>;
50
+ export declare function isPluginFrontendActive(pluginId: string): boolean;
51
+ /** Test seam. */
52
+ export declare function resetPluginLoader(): Promise<void>;
@@ -0,0 +1,40 @@
1
+ import type { PluginSummary } from "../api/plugins-api";
2
+ /**
3
+ * What the browser knows about each plugin: the server's summary plus how
4
+ * far its frontend got.
5
+ *
6
+ * `frontend` is separate from the server state on purpose. A plugin can be
7
+ * enabled and healthy on the server while its bundle failed to import, and
8
+ * the shell has to show that as failed rather than as missing.
9
+ */
10
+ export type FrontendState = "none" | "loading" | "active" | "failed" | "blocked" | "inactive";
11
+ export interface PluginRecord {
12
+ summary: PluginSummary;
13
+ frontend: FrontendState;
14
+ error?: string;
15
+ }
16
+ interface StoreState {
17
+ /** False until the first GET /plugins answers. */
18
+ loaded: boolean;
19
+ /**
20
+ * True once every enabled frontend has been tried at least once. The shell
21
+ * restores saved tabs only after this, so plugin tabs come back as
22
+ * themselves rather than as placeholders.
23
+ */
24
+ settled: boolean;
25
+ records: ReadonlyMap<string, PluginRecord>;
26
+ }
27
+ export declare function getPluginStoreState(): StoreState;
28
+ export declare function usePluginStore(): StoreState;
29
+ /** Replaces the summaries, keeping each plugin's frontend state. */
30
+ export declare function setPluginSummaries(summaries: PluginSummary[]): void;
31
+ export declare function markPluginsSettled(): void;
32
+ export declare function setFrontendState(pluginId: string, frontend: FrontendState, error?: string): void;
33
+ export declare function getPluginRecord(pluginId: string): PluginRecord | undefined;
34
+ /** Resolves once plugins have settled; at once if they already have. */
35
+ export declare function settledPromise(): Promise<void>;
36
+ /** Plugin ids known to the server, used to resolve permission namespaces. */
37
+ export declare function knownPluginIds(): string[];
38
+ /** Test seam. */
39
+ export declare function resetPluginStore(): void;
40
+ export {};
@@ -0,0 +1,20 @@
1
+ import { type ComponentType } from "react";
2
+ /** The plugin whose component is rendering, or null in core UI. */
3
+ export declare function usePluginScope(): string | null;
4
+ /**
5
+ * Wraps a plugin's component once, at registration, so every place the shell
6
+ * renders it gets the plugin id for the SDK hooks and an error boundary,
7
+ * without each call site having to remember.
8
+ */
9
+ export declare function withPluginScope<P extends object>(pluginId: string, Inner: ComponentType<P>): ComponentType<P>;
10
+ /**
11
+ * A plugin icon the shell renders inline (rail, tab strip, host row). Small
12
+ * enough that a broken one should just disappear, not take the row with it.
13
+ */
14
+ export declare function withIconBoundary<P extends object>(pluginId: string, Icon: ComponentType<P> | undefined): ComponentType<P> | undefined;
15
+ /**
16
+ * A plugin callback core calls while rendering, such as a host action's
17
+ * label. A throw is logged and answered with `fallback`, so one plugin
18
+ * cannot break the host list.
19
+ */
20
+ export declare function guardCallback<A extends unknown[], R>(pluginId: string, fn: ((...args: A) => R) | undefined, fallback: R): ((...args: A) => R) | undefined;
@@ -0,0 +1,99 @@
1
+ /**
2
+ * @termix-ssh/plugin-sdk/ui: the shell's components, for plugins.
3
+ *
4
+ * Everything exported here is public API. A plugin builds its UI from these
5
+ * so it looks like the rest of the app and picks up theme changes, and it
6
+ * receives the shell's own instances through the import map, never a copy.
7
+ *
8
+ * The list is deliberate. It covers what the bundled plugins use today: the
9
+ * shadcn primitives, the composites for metrics, connection screens and
10
+ * settings rows, and the contexts a connection surface needs. Adding to it is
11
+ * a contract change. Removing from it breaks plugins.
12
+ */
13
+ export { Alert, AlertDescription, AlertTitle } from "../components/alert";
14
+ export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, } from "../components/alert-dialog";
15
+ export { Badge } from "../components/badge";
16
+ export { Button, type ButtonProps } from "../components/button";
17
+ export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from "../components/card";
18
+ export { Checkbox } from "../components/checkbox";
19
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, } from "../components/dialog";
20
+ export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, } from "../components/dropdown-menu";
21
+ export { Input } from "../components/input";
22
+ export { Label } from "../components/label";
23
+ export { PasswordInput } from "../components/password-input";
24
+ export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger, } from "../components/popover";
25
+ export { ScrollArea, ScrollBar } from "../components/scroll-area";
26
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, } from "../components/select";
27
+ export { Select2 } from "../components/select2";
28
+ export { Separator } from "../components/separator";
29
+ export { Skeleton } from "../components/skeleton";
30
+ export { Slider } from "../components/slider";
31
+ export { Switch } from "../components/switch";
32
+ export { Textarea, type TextareaProps } from "../components/textarea";
33
+ export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "../components/tooltip";
34
+ export { FakeSwitch, SectionCard, SettingRow } from "../components/section-card";
35
+ export { MetricCard } from "../components/metric-card";
36
+ export { BarSeries, MiniStat, RadialGauge, Sparkline, StatRow, type BarSeriesItem, type BarSeriesProps, type RadialGaugeProps, type SparklineProps, } from "../components/charts";
37
+ export { LineChart, type LineChartSeries } from "../components/charts/LineChart";
38
+ export { CardGridCanvas, ColumnCountStepper, } from "../components/card-grid/CardGridCanvas";
39
+ export { type GridCardCatalogEntry, type GridColSpan, type GridLayout, type GridSlot, } from "../components/card-grid/types";
40
+ export { ConnectionScreen } from "../components/connection/ConnectionScreen";
41
+ export { type ConnectionStatus } from "../components/connection/connection-status";
42
+ export { FullScreenAppWrapper, type FullScreenAppPhase, } from "../components/FullScreenAppWrapper";
43
+ export { ConnectionLogProvider, useConnectionLog, useOptionalConnectionLog, } from "../ssh/connection-log/ConnectionLogContext";
44
+ export { TOTPDialog, type MFAPromptMode } from "../ssh/dialogs/TOTPDialog";
45
+ export { SSHAuthDialog } from "../ssh/dialogs/SSHAuthDialog";
46
+ export { BrowserSignInDialog } from "../ssh/dialogs/BrowserSignInDialog";
47
+ export { FOLDER_COLORS } from "../lib/theme";
48
+ export { useTabs, useTabsSafe } from "../shell/TabContext";
49
+ export { ActionSlot, ComponentSlot } from "../shell/ActionSlot";
50
+ export { HostFeatureFields, type HostFeatureFieldsProps, } from "../settings/HostPluginSections";
51
+ export { HostDefaultBadge, DefaultsOnly as HostDefaultField, useIsDefaultsEditor, } from "../lib/host-defaults-context";
52
+ export { PluginComponent } from "./component-registry";
53
+ export { PluginViewPlaceholder } from "./PluginViewPlaceholder";
54
+ export { cn } from "../lib/utils";
55
+ export { runAdaptivePolling, getPollingEnvironmentMultiplier, } from "../lib/adaptive-polling";
56
+ export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, } from "../components/sheet";
57
+ export { ManagerCardShell, ManagerSearch, type ManagerCardError, } from "../components/manager-card";
58
+ export { useAdaptivePolling } from "../hooks/use-adaptive-polling";
59
+ export { WidgetTitle } from "../lib/widget-title";
60
+ export { runVisibleInterval } from "../lib/visible-interval";
61
+ export { useIsMobile } from "../hooks/use-mobile";
62
+ export { EmptyState } from "../components/empty-state";
63
+ export { PassphraseDialog } from "../ssh/dialogs/PassphraseDialog";
64
+ export { HostKeyVerificationDialog } from "../ssh/dialogs/HostKeyVerificationDialog";
65
+ export { copyToClipboard, readFromClipboard } from "../lib/clipboard";
66
+ export { RobustClipboardProvider } from "../lib/clipboard-provider";
67
+ export { useTheme as useAppTheme } from "../components/theme-provider";
68
+ export { findMatchingKeybinding } from "../lib/keybinding-match";
69
+ export { globalShortcutHandler } from "../lib/global-shortcut-handler";
70
+ export { isMacPlatform, isTabJumpHotkey } from "../lib/tab-jump-hotkey";
71
+ export { type CustomKeybinding, type KeyCombo, type KeybindingAction, type KeybindingActionType, } from "../../types/keybindings";
72
+ export { isElectron } from "../lib/electron";
73
+ export { resolveConnectionOrigin, type ConnectionOrigin, } from "../lib/connection-origin";
74
+ export { pluginWsUrl } from "../lib/plugin-transport";
75
+ export { buildOriginWsUrl, type WebSocketConnectionTarget, } from "../lib/connection-origin";
76
+ export { getBasePath } from "../lib/base-path";
77
+ export type { ConnectionStage } from "../../types/connection-log";
78
+ export { hydrateLocalSharedHostAuth, resolveRemoteHostId, } from "../lib/remote-server-api";
79
+ export { remoteServerUrl as linkedServerUrl } from "./desktop";
80
+ export { getRecentActivity, getUptime, type RecentActivityItem, type UptimeInfo, } from "../api/dashboard-api";
81
+ export { getVersionInfo, getDatabaseHealth, type VersionInfo, } from "../api/system-status-api";
82
+ export { Kbd, KbdKey, KbdSeparator } from "../components/kbd";
83
+ export { ConnectionLogPanel } from "../components/connection/ConnectionLogPanel";
84
+ export type { LogEntry } from "../../types/connection-log";
85
+ export { createFrontendLogger, type LogContext } from "../lib/frontend-logger";
86
+ export { getAdaptiveResourceBudget, markAdaptiveResourceUsed, runAdaptiveBackgroundTask, } from "../lib/adaptive-resource-budget";
87
+ export { getDeviceId } from "../lib/device-id";
88
+ export { createQuickConnectHost } from "../sidebar/quick-connect-host";
89
+ export { BackButton, Facts, GroupHeading, PANEL, PanelSearch, PanelShell, Segmented, ViewToggle, type PanelDensity, type PanelViewMode, } from "../components/panel-layout";
90
+ export { DataView, type DataColumn, type GridColumns, } from "../components/data-view";
91
+ export { TabStrip, type TabStripItem } from "../components/tab-strip";
92
+ export { CardMasonry } from "../components/card-masonry";
93
+ export { Meter, UsagePair } from "../components/meter";
94
+ export { usageBarColor, usageColor } from "../lib/usage-color";
95
+ export { Field, FieldPair, NumberField, Repeater, SecretField, SelectField, SwitchRow, TagInput, TextAreaField, TextField, } from "../components/form-fields";
96
+ export { InlineView, PanePrompt, SurfaceScope, useConfirm, useSurfaceKind, type ConfirmOptions, type EditingWidth, type SurfaceKind, } from "../components/surface/surface-scope";
97
+ export { PROMPT_BUTTON, PROMPT_DESTRUCTIVE_BUTTON, PROMPT_PRIMARY_BUTTON, } from "../components/surface/prompt-styles";
98
+ export { ConnectionGate, useConnectionGate, type ConnectionGateController, type ConnectionGateProps, } from "../components/connection/ConnectionGate";
99
+ export { type ConnectionUnavailable } from "../components/connection/ConnectionScreen";