dsh-ssh-hub 0.0.0-stage → 0.1.9
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.
- package/LICENSE +202 -0
- package/README.md +255 -2
- package/cordis.patch.yml +16 -0
- package/icon.svg +3 -0
- package/lib/client.js +13766 -0
- package/lib/index.js +6727 -0
- package/lib/types/activity/history.d.ts +50 -0
- package/lib/types/alerting/notify.d.ts +89 -0
- package/lib/types/alerting/prompt-summary.d.ts +28 -0
- package/lib/types/alerting/rules.d.ts +135 -0
- package/lib/types/alerting/tools.d.ts +30 -0
- package/lib/types/audit/audit-log.d.ts +84 -0
- package/lib/types/audit/recorder.d.ts +50 -0
- package/lib/types/client/api.d.ts +199 -0
- package/lib/types/client/index.d.ts +45 -0
- package/lib/types/client/locales.d.ts +309 -0
- package/lib/types/client/native-panel.d.ts +70 -0
- package/lib/types/client/panel/ClusterTab.d.ts +7 -0
- package/lib/types/client/panel/DeployTab.d.ts +10 -0
- package/lib/types/client/panel/FleetTab.d.ts +10 -0
- package/lib/types/client/panel/HostFormDialog.d.ts +12 -0
- package/lib/types/client/panel/HostsTab.d.ts +25 -0
- package/lib/types/client/panel/LogsTab.d.ts +10 -0
- package/lib/types/client/panel/SshPanel.d.ts +14 -0
- package/lib/types/client/panel/TerminalTab.d.ts +27 -0
- package/lib/types/client/panel/TransferTab.d.ts +7 -0
- package/lib/types/client/panel/TunnelsTab.d.ts +27 -0
- package/lib/types/client/panel/controller.d.ts +253 -0
- package/lib/types/client/panel/helpers.d.ts +45 -0
- package/lib/types/client/panel/tabs.d.ts +62 -0
- package/lib/types/client/panel/xterm.css.d.ts +2 -0
- package/lib/types/client/settings-binding.d.ts +71 -0
- package/lib/types/deploy/orchestrator.d.ts +158 -0
- package/lib/types/deploy/tools.d.ts +14 -0
- package/lib/types/dsh-home.d.ts +16 -0
- package/lib/types/engine/cluster.d.ts +19 -0
- package/lib/types/engine/connection-pool.d.ts +183 -0
- package/lib/types/engine/proxy-command.d.ts +36 -0
- package/lib/types/engine/pty.d.ts +32 -0
- package/lib/types/engine/sftp.d.ts +20 -0
- package/lib/types/engine/terminal-sessions.d.ts +67 -0
- package/lib/types/engine/tunnel-discovery.d.ts +89 -0
- package/lib/types/engine/tunnel.d.ts +38 -0
- package/lib/types/engine.d.ts +98 -0
- package/lib/types/http.d.ts +59 -0
- package/lib/types/index.d.ts +128 -0
- package/lib/types/inspect/checks.d.ts +118 -0
- package/lib/types/inspect/inspection.d.ts +111 -0
- package/lib/types/inspect/tools.d.ts +50 -0
- package/lib/types/logs/search.d.ts +131 -0
- package/lib/types/logs/tools.d.ts +6 -0
- package/lib/types/loopback.d.ts +64 -0
- package/lib/types/monitor/loop.d.ts +133 -0
- package/lib/types/monitor/metrics.d.ts +151 -0
- package/lib/types/mount-once.d.ts +55 -0
- package/lib/types/protocol.d.ts +518 -0
- package/lib/types/routes.d.ts +82 -0
- package/lib/types/security/known-hosts.d.ts +153 -0
- package/lib/types/security/master-secret.d.ts +157 -0
- package/lib/types/security/redact.d.ts +44 -0
- package/lib/types/security/secrets.d.ts +70 -0
- package/lib/types/ssh-config.d.ts +42 -0
- package/lib/types/store.d.ts +183 -0
- package/lib/types/tool-surface.d.ts +72 -0
- package/lib/types/tools.d.ts +56 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +126 -6
- package/src/activity/history.ts +117 -0
- package/src/alerting/notify.ts +212 -0
- package/src/alerting/prompt-summary.ts +71 -0
- package/src/alerting/rules.ts +281 -0
- package/src/alerting/tools.ts +263 -0
- package/src/audit/audit-log.ts +198 -0
- package/src/audit/recorder.ts +73 -0
- package/src/client/api.ts +752 -0
- package/src/client/css-modules.d.ts +5 -0
- package/src/client/index.ts +150 -0
- package/src/client/locales.ts +634 -0
- package/src/client/native-panel.tsx +141 -0
- package/src/client/panel/ClusterTab.tsx +141 -0
- package/src/client/panel/DeployTab.tsx +314 -0
- package/src/client/panel/FleetTab.tsx +494 -0
- package/src/client/panel/HostFormDialog.tsx +289 -0
- package/src/client/panel/HostsTab.tsx +395 -0
- package/src/client/panel/LogsTab.tsx +208 -0
- package/src/client/panel/SshPanel.tsx +105 -0
- package/src/client/panel/TerminalTab.tsx +550 -0
- package/src/client/panel/TransferTab.tsx +238 -0
- package/src/client/panel/TunnelsTab.tsx +306 -0
- package/src/client/panel/controller.ts +507 -0
- package/src/client/panel/helpers.ts +84 -0
- package/src/client/panel/panel.module.css +1712 -0
- package/src/client/panel/tabs.ts +52 -0
- package/src/client/panel/xterm.css.ts +2 -0
- package/src/client/settings-binding.ts +184 -0
- package/src/deploy/orchestrator.ts +326 -0
- package/src/deploy/tools.ts +225 -0
- package/src/dsh-home.ts +42 -0
- package/src/engine/cluster.ts +60 -0
- package/src/engine/connection-pool.ts +721 -0
- package/src/engine/proxy-command.ts +248 -0
- package/src/engine/pty.ts +78 -0
- package/src/engine/sftp.ts +229 -0
- package/src/engine/terminal-sessions.ts +280 -0
- package/src/engine/tunnel-discovery.ts +352 -0
- package/src/engine/tunnel.ts +205 -0
- package/src/engine.ts +187 -0
- package/src/http.ts +127 -0
- package/src/index.ts +690 -0
- package/src/inspect/checks.ts +251 -0
- package/src/inspect/inspection.ts +321 -0
- package/src/inspect/tools.ts +366 -0
- package/src/logs/search.ts +251 -0
- package/src/logs/tools.ts +160 -0
- package/src/loopback.ts +119 -0
- package/src/monitor/loop.ts +265 -0
- package/src/monitor/metrics.ts +333 -0
- package/src/mount-once.ts +142 -0
- package/src/protocol.ts +528 -0
- package/src/routes.ts +953 -0
- package/src/security/known-hosts.ts +342 -0
- package/src/security/master-secret.ts +334 -0
- package/src/security/redact.ts +119 -0
- package/src/security/secrets.ts +152 -0
- package/src/ssh-config.ts +182 -0
- package/src/store.ts +757 -0
- package/src/tool-surface.ts +96 -0
- package/src/tools.ts +517 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser-half entry for the dsh-ssh plugin — runs inside the dsh web GUI.
|
|
3
|
+
*
|
|
4
|
+
* Registers the dsh-ssh locale dictionaries and mounts the two DOM surfaces:
|
|
5
|
+
* the sidebar entry row (toggles the panel) and the SSH operations panel in
|
|
6
|
+
* the center column. Failure policy: DOM mounting problems are logged, never
|
|
7
|
+
* thrown — the web shell fails the whole boot when a plugin apply throws, and
|
|
8
|
+
* an external plugin must not take the GUI down.
|
|
9
|
+
*
|
|
10
|
+
* Export discipline (packages/client rule): the /client surface carries what
|
|
11
|
+
* cordis loading needs plus types only — all value exports stay internal.
|
|
12
|
+
*/
|
|
13
|
+
import type { Context as ClientContext } from '@deepseek-ai/cordis';
|
|
14
|
+
import { type SshKey } from './locales.ts';
|
|
15
|
+
declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
16
|
+
interface LocaleNamespaceMap {
|
|
17
|
+
/** dsh-ssh surface copy. */
|
|
18
|
+
'dsh-ssh': SshKey;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Required services (fiber inject waiting — the runtime must be up first).
|
|
23
|
+
*
|
|
24
|
+
* Only services this half truly cannot work without are listed. `configForms`
|
|
25
|
+
* is intentionally absent: it is optional (one terminal-font preference), and
|
|
26
|
+
* declaring it here makes the client fiber wait forever on a family that does
|
|
27
|
+
* not provide it, so `apply` never runs and the panel silently never appears.
|
|
28
|
+
* Optional services are read through `ctx.get` and degrade instead.
|
|
29
|
+
*/
|
|
30
|
+
export declare const inject: string[];
|
|
31
|
+
/** Type-only surface (export discipline: no value exports beyond the plugin contract). */
|
|
32
|
+
export type { PanelControllerSnapshot } from './panel/controller.ts';
|
|
33
|
+
export type { SshPanelProps } from './panel/SshPanel.tsx';
|
|
34
|
+
export type { HostsTabProps } from './panel/HostsTab.tsx';
|
|
35
|
+
export type { HostFormDialogProps } from './panel/HostFormDialog.tsx';
|
|
36
|
+
export type { TerminalTabProps } from './panel/TerminalTab.tsx';
|
|
37
|
+
export type { TransferTabProps } from './panel/TransferTab.tsx';
|
|
38
|
+
export type { TunnelsTabProps } from './panel/TunnelsTab.tsx';
|
|
39
|
+
export type { ClusterTabProps } from './panel/ClusterTab.tsx';
|
|
40
|
+
export type { SshKey } from './locales.ts';
|
|
41
|
+
/**
|
|
42
|
+
* Mount the SSH panel.
|
|
43
|
+
* @param ctx - client root context (locale service).
|
|
44
|
+
*/
|
|
45
|
+
export declare function apply(ctx: ClientContext): void;
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* dsh-ssh surface copy: zh is the key source, en mirrors every key.
|
|
3
|
+
*/
|
|
4
|
+
export declare const zh: {
|
|
5
|
+
readonly 'entry.label': "SSH";
|
|
6
|
+
readonly 'entry.tooltip': "远程 SSH 运维面板";
|
|
7
|
+
readonly 'panel.title': "远程 SSH";
|
|
8
|
+
readonly 'panel.backToConversation': "返回会话";
|
|
9
|
+
readonly 'tab.hosts': "主机";
|
|
10
|
+
readonly 'tab.terminal': "终端";
|
|
11
|
+
readonly 'tab.transfer': "传输";
|
|
12
|
+
readonly 'tab.tunnels': "隧道";
|
|
13
|
+
readonly 'tab.cluster': "集群";
|
|
14
|
+
readonly 'tab.fleet': "机群";
|
|
15
|
+
readonly 'tab.deploy': "发布";
|
|
16
|
+
readonly 'tab.logs': "日志";
|
|
17
|
+
readonly 'fleet.monitor': "监控状态";
|
|
18
|
+
readonly 'fleet.checkNow': "立即巡检";
|
|
19
|
+
readonly 'fleet.checking': "巡检中…";
|
|
20
|
+
readonly 'fleet.loading': "加载中…";
|
|
21
|
+
readonly 'fleet.armed': "监控已启动";
|
|
22
|
+
readonly 'fleet.notArmed': "监控未启动";
|
|
23
|
+
readonly 'fleet.interval': "间隔";
|
|
24
|
+
readonly 'fleet.hosts': "台主机";
|
|
25
|
+
readonly 'fleet.nextAt': "下次";
|
|
26
|
+
readonly 'fleet.security': "凭据加密";
|
|
27
|
+
readonly 'fleet.encrypted': "已加密";
|
|
28
|
+
readonly 'fleet.plaintext': "明文存储";
|
|
29
|
+
readonly 'fleet.switchOff': "未开启 encryptCredentials";
|
|
30
|
+
readonly 'fleet.noSecret': "未配置主密钥";
|
|
31
|
+
readonly 'fleet.hostKey': "指纹策略";
|
|
32
|
+
readonly 'fleet.audit': "审计";
|
|
33
|
+
readonly 'fleet.on': "开";
|
|
34
|
+
readonly 'fleet.off': "关";
|
|
35
|
+
readonly 'fleet.lastRound': "最近一轮巡检";
|
|
36
|
+
readonly 'fleet.noRound': "还没有巡检记录。启动监控,或点「立即巡检」。";
|
|
37
|
+
readonly 'fleet.breaches': "超限";
|
|
38
|
+
readonly 'fleet.blind': "探针失联";
|
|
39
|
+
readonly 'fleet.host': "主机";
|
|
40
|
+
readonly 'fleet.check': "检查项";
|
|
41
|
+
readonly 'fleet.value': "值";
|
|
42
|
+
readonly 'fleet.changes': "与上一轮的变化";
|
|
43
|
+
readonly 'fleet.noChanges': "与上一轮相比没有变化,或只有一个轮次可供比较。";
|
|
44
|
+
readonly 'fleet.before': "之前";
|
|
45
|
+
readonly 'fleet.after': "现在";
|
|
46
|
+
readonly 'fleet.alerts': "告警";
|
|
47
|
+
readonly 'fleet.noAlerts': "没有告警。注意:若监控未启动,这里为空并不代表健康。";
|
|
48
|
+
readonly 'fleet.rule': "规则";
|
|
49
|
+
readonly 'fleet.state': "状态";
|
|
50
|
+
readonly 'fleet.events': "最近事件";
|
|
51
|
+
readonly 'fleet.trigger': "触发";
|
|
52
|
+
readonly 'fleet.recover': "恢复";
|
|
53
|
+
readonly 'fleet.trend': "趋势";
|
|
54
|
+
readonly 'fleet.pickHost': "选择主机…";
|
|
55
|
+
readonly 'fleet.diskTrend': "磁盘使用率";
|
|
56
|
+
readonly 'fleet.buckets': "个数据点";
|
|
57
|
+
readonly 'fleet.secretTitle': "主密钥(凭据加密)";
|
|
58
|
+
readonly 'fleet.secretSource': "来源";
|
|
59
|
+
readonly 'fleet.secretHint': "设置主密钥后,凭据会加密存储。改密钥会重新加密所有已存凭据;密钥一旦丢失,已加密的凭据无法恢复,请先备份。";
|
|
60
|
+
readonly 'fleet.secretInput': "主密钥";
|
|
61
|
+
readonly 'fleet.secretPlaceholder': "留空则自动生成 32 字节随机密钥";
|
|
62
|
+
readonly 'fleet.secretApply': "设置 / 轮换密钥";
|
|
63
|
+
readonly 'fleet.secretGenerate': "生成一个";
|
|
64
|
+
readonly 'fleet.secretWorking': "处理中…";
|
|
65
|
+
readonly 'fleet.secretClear': "删除密钥文件";
|
|
66
|
+
readonly 'fleet.secretSaved': "已保存:来源 {source},重新加密 {rotated} 台主机的凭据。";
|
|
67
|
+
readonly 'fleet.secretCleared': "密钥文件已删除。";
|
|
68
|
+
readonly 'fleet.secretFailed': "操作失败。";
|
|
69
|
+
readonly 'fleet.plaintextList': "以下主机的凭据仍是明文:";
|
|
70
|
+
readonly 'fleet.keyPath': "密钥文件:";
|
|
71
|
+
readonly 'fleet.switchWithoutKey': "encryptCredentials 已开启,但没有主密钥 —— 凭据仍以明文存储。请设置主密钥。";
|
|
72
|
+
readonly 'deploy.form.title': "发布计划";
|
|
73
|
+
readonly 'deploy.form.hint': "按批次发布到机群;每一步都必须能回滚。批次之间默认遇错即停。";
|
|
74
|
+
readonly 'deploy.form.planId': "计划名称";
|
|
75
|
+
readonly 'deploy.form.step': "步骤";
|
|
76
|
+
readonly 'deploy.form.stepName': "步骤名";
|
|
77
|
+
readonly 'deploy.form.command': "执行命令";
|
|
78
|
+
readonly 'deploy.form.rollback': "回滚命令";
|
|
79
|
+
readonly 'deploy.form.rollbackWhy': "(必填:没有它就无法回滚)";
|
|
80
|
+
readonly 'deploy.form.addStep': "+ 添加步骤";
|
|
81
|
+
readonly 'deploy.form.removeStep': "删除";
|
|
82
|
+
readonly 'deploy.form.batchSize': "每批主机数";
|
|
83
|
+
readonly 'deploy.form.stopOnFailure': "遇错即停";
|
|
84
|
+
readonly 'deploy.form.health': "健康检查命令";
|
|
85
|
+
readonly 'deploy.form.healthOptional': "(可选)";
|
|
86
|
+
readonly 'deploy.form.targets': "目标主机";
|
|
87
|
+
readonly 'deploy.form.targetsHint': "(不选=全部)";
|
|
88
|
+
readonly 'deploy.form.noHosts': "还没有主机,请先在「主机」页添加。";
|
|
89
|
+
readonly 'deploy.form.run': "开始发布";
|
|
90
|
+
readonly 'deploy.form.running': "发布中…";
|
|
91
|
+
readonly 'deploy.error.noPlanId': "请填写计划名称。";
|
|
92
|
+
readonly 'deploy.error.noSteps': "至少需要一个执行命令。";
|
|
93
|
+
readonly 'deploy.error.noRollback': "每个步骤都必须填写回滚命令,否则失败批次无法撤销。";
|
|
94
|
+
readonly 'deploy.confirm': "确定发布计划「{plan}」到 {count} 台主机吗?命令会在这些远程服务器上真实执行;批次失败时会尝试回滚。";
|
|
95
|
+
readonly 'deploy.done': "发布完成:{ok}/{total} 台成功。";
|
|
96
|
+
readonly 'deploy.history.title': "发布记录";
|
|
97
|
+
readonly 'deploy.history.empty': "还没有发布记录。上面的表单可以发起一次。";
|
|
98
|
+
readonly 'deploy.col.time': "时间";
|
|
99
|
+
readonly 'deploy.col.plan': "计划";
|
|
100
|
+
readonly 'deploy.col.hosts': "主机数";
|
|
101
|
+
readonly 'deploy.col.result': "结果";
|
|
102
|
+
readonly 'deploy.col.failed': "失败";
|
|
103
|
+
readonly 'deploy.col.host': "主机";
|
|
104
|
+
readonly 'deploy.col.health': "健康";
|
|
105
|
+
readonly 'deploy.col.detail': "详情";
|
|
106
|
+
readonly 'deploy.ok': "成功";
|
|
107
|
+
readonly 'deploy.failed': "失败";
|
|
108
|
+
readonly 'deploy.rolledBack': "已回滚";
|
|
109
|
+
readonly 'deploy.show': "展开";
|
|
110
|
+
readonly 'deploy.hide': "收起";
|
|
111
|
+
readonly 'logs.form.title': "跨主机日志检索";
|
|
112
|
+
readonly 'logs.form.hint': "一次在多台主机上检索同一关键词,结果按主机归组,便于判断影响面。";
|
|
113
|
+
readonly 'logs.form.pattern': "关键词(固定文本,非正则)";
|
|
114
|
+
readonly 'logs.form.source': "来源";
|
|
115
|
+
readonly 'logs.source.journal': "systemd journal";
|
|
116
|
+
readonly 'logs.source.files': "目录下的日志文件";
|
|
117
|
+
readonly 'logs.form.unit': "unit 过滤";
|
|
118
|
+
readonly 'logs.form.optional': "(可选)";
|
|
119
|
+
readonly 'logs.form.directory': "日志目录";
|
|
120
|
+
readonly 'logs.form.since': "最近多少分钟";
|
|
121
|
+
readonly 'logs.form.maxLines': "每台最多返回行数";
|
|
122
|
+
readonly 'logs.form.targets': "目标主机";
|
|
123
|
+
readonly 'logs.form.targetsHint': "(不选=全部)";
|
|
124
|
+
readonly 'logs.form.noHosts': "还没有主机,请先在「主机」页添加。";
|
|
125
|
+
readonly 'logs.form.run': "开始检索";
|
|
126
|
+
readonly 'logs.form.running': "检索中…";
|
|
127
|
+
readonly 'logs.error.noPattern': "请填写关键词。";
|
|
128
|
+
readonly 'logs.results.title': "检索结果";
|
|
129
|
+
readonly 'logs.results.empty': "还没有检索记录。";
|
|
130
|
+
readonly 'logs.results.hosts': "台主机";
|
|
131
|
+
readonly 'logs.results.lines': "行";
|
|
132
|
+
readonly 'logs.results.matched': "命中";
|
|
133
|
+
readonly 'logs.results.failed': "失败";
|
|
134
|
+
readonly 'hosts.empty': "尚未配置主机。点击「新增主机」添加,或从 ~/.ssh/config 导入。";
|
|
135
|
+
readonly 'hosts.add': "新增主机";
|
|
136
|
+
readonly 'hosts.import': "导入 ~/.ssh/config";
|
|
137
|
+
readonly 'hosts.localConfigPending': "本地 ~/.ssh/config 中有 {count} 台主机尚未导入:";
|
|
138
|
+
readonly 'hosts.search': "搜索别名 / 描述 / 标签…";
|
|
139
|
+
readonly 'hosts.groupBy.label': "分组方式";
|
|
140
|
+
readonly 'hosts.groupBy.none': "不分组";
|
|
141
|
+
readonly 'hosts.groupBy.environment': "按环境分组";
|
|
142
|
+
readonly 'hosts.groupBy.tags': "按标签分组";
|
|
143
|
+
readonly 'hosts.group.ungrouped': "未设置环境";
|
|
144
|
+
readonly 'hosts.group.noTags': "无标签";
|
|
145
|
+
readonly 'hosts.group.count': "{count} 台";
|
|
146
|
+
readonly 'hosts.group.testAll': "测试全部";
|
|
147
|
+
readonly 'hosts.col.host': "主机";
|
|
148
|
+
readonly 'hosts.col.auth': "认证";
|
|
149
|
+
readonly 'hosts.col.environment': "环境";
|
|
150
|
+
readonly 'hosts.col.tags': "标签";
|
|
151
|
+
readonly 'hosts.col.description': "备注";
|
|
152
|
+
readonly 'hosts.col.actions': "操作";
|
|
153
|
+
readonly 'hosts.test': "测试";
|
|
154
|
+
readonly 'hosts.edit': "编辑";
|
|
155
|
+
readonly 'hosts.delete': "删除";
|
|
156
|
+
readonly 'hosts.deleteConfirm': "确定删除主机「{alias}」?将同时停止其隧道。";
|
|
157
|
+
readonly 'hosts.imported': "解析 {parsed} 个配置块,新增 {added} 台,修正 {updated} 台,跳过 {skipped} 个。";
|
|
158
|
+
readonly 'hosts.proxyBadge': "代理";
|
|
159
|
+
readonly 'hosts.forwardAgentBadge': "Agent 转发";
|
|
160
|
+
readonly 'hosts.forwardAgentHint': "仅对可信主机开启:远端可用本机私钥签名(等价 ssh -A)。";
|
|
161
|
+
readonly 'import.reason.wildcard': "通配符 pattern,需手动配置";
|
|
162
|
+
readonly 'import.reason.existing': "别名已存在";
|
|
163
|
+
readonly 'import.reason.match': "Match 条件块,不支持";
|
|
164
|
+
readonly 'import.reason.invalid': "字段不合法,无法导入";
|
|
165
|
+
readonly 'import.more': "其余 {count} 个未显示";
|
|
166
|
+
readonly 'hosts.testing': "连接测试中…";
|
|
167
|
+
readonly 'hosts.testOk': "连接成功({latency} ms)";
|
|
168
|
+
readonly 'hosts.testOkShort': "{latency} ms";
|
|
169
|
+
readonly 'hosts.testFailShort': "连接失败";
|
|
170
|
+
readonly 'hosts.testingShort': "测试中…";
|
|
171
|
+
readonly 'hosts.connected': "连接";
|
|
172
|
+
readonly 'hosts.notConnected': "未连接";
|
|
173
|
+
readonly 'form.title.create': "新增主机";
|
|
174
|
+
readonly 'form.title.edit': "编辑主机 {alias}";
|
|
175
|
+
readonly 'form.alias': "别名";
|
|
176
|
+
readonly 'form.aliasHint': "小写字母、数字与单连字符,操作时使用";
|
|
177
|
+
readonly 'form.host': "主机地址";
|
|
178
|
+
readonly 'form.port': "端口";
|
|
179
|
+
readonly 'form.user': "用户名";
|
|
180
|
+
readonly 'form.auth': "认证方式";
|
|
181
|
+
readonly 'form.auth.key': "密钥";
|
|
182
|
+
readonly 'form.auth.password': "密码";
|
|
183
|
+
readonly 'form.auth.agent': "SSH Agent";
|
|
184
|
+
readonly 'form.auth.none': "无认证(none)";
|
|
185
|
+
readonly 'form.auth.noneHint': "无需密码或私钥,通常用于基于用户名的沙箱或公开接入点。";
|
|
186
|
+
readonly 'form.agentPath': "Agent 路径";
|
|
187
|
+
readonly 'form.agentPathHint': "留空自动检测(SSH_AUTH_SOCK;Windows 上为原生 ssh-agent 命名管道);也可填 socket 路径或 pageant";
|
|
188
|
+
readonly 'form.authKeepHint': "编辑时密码 / 私钥留空将保留已存凭据;Agent 路径留空是合法的自动检测,选「SSH Agent」即切换到 agent 认证。";
|
|
189
|
+
readonly 'form.keyPath': "私钥路径";
|
|
190
|
+
readonly 'form.keyPathHint': "如 ~/.ssh/id_ed25519";
|
|
191
|
+
readonly 'form.passphrase': "密钥口令";
|
|
192
|
+
readonly 'form.password': "密码";
|
|
193
|
+
readonly 'form.passwordHint': "明文保存在 $DSH_HOME/dsh-ssh.json(本机私有文件)";
|
|
194
|
+
readonly 'form.passwordRequired': "密码认证需要填写密码。";
|
|
195
|
+
readonly 'form.proxyJump': "跳板机别名";
|
|
196
|
+
readonly 'form.proxyJumpHint': "逗号分隔的本地主机别名,或 [user@]host[:port] 地址,按顺序连接";
|
|
197
|
+
readonly 'form.proxyCommand': "ProxyCommand";
|
|
198
|
+
readonly 'form.proxyCommandHint': "OpenSSH ProxyCommand:%h 主机、%p 端口、%r 用户、%n 别名;留空或填 none 表示不使用。与跳板机别名互斥。";
|
|
199
|
+
readonly 'form.forwardAgent': "启用 Agent 转发";
|
|
200
|
+
readonly 'form.forwardAgentHint': "把本机 SSH Agent 转发到该主机(等价 ssh -A):远端可用本机私钥签名。仅对可信主机开启。";
|
|
201
|
+
readonly 'form.description': "备注";
|
|
202
|
+
readonly 'form.environment': "环境";
|
|
203
|
+
readonly 'form.environmentHint': "如 development / production";
|
|
204
|
+
readonly 'form.tags': "标签";
|
|
205
|
+
readonly 'form.tagsHint': "逗号分隔";
|
|
206
|
+
readonly 'form.location': "位置";
|
|
207
|
+
readonly 'form.save': "保存";
|
|
208
|
+
readonly 'form.cancel': "取消";
|
|
209
|
+
readonly 'form.required': "请填写必填字段:别名、主机地址、用户名。";
|
|
210
|
+
readonly 'form.portInvalid': "端口必须是 1-65535 之间的整数。";
|
|
211
|
+
readonly 'terminal.selectHost': "选择主机";
|
|
212
|
+
readonly 'terminal.connect': "连接";
|
|
213
|
+
readonly 'terminal.disconnect': "断开";
|
|
214
|
+
readonly 'terminal.placeholder': "选择主机后点击「连接」打开远程终端。";
|
|
215
|
+
readonly 'terminal.connecting': "正在连接…";
|
|
216
|
+
readonly 'terminal.ready': "终端已连接({alias})";
|
|
217
|
+
readonly 'terminal.exited': "终端已退出({alias})";
|
|
218
|
+
readonly 'terminal.error': "终端错误:{error}";
|
|
219
|
+
readonly 'terminal.noWebSocket': "当前页面不支持 WebSocket(应用外壳没有可连接的本地主机地址),请改用浏览器打开的 Web 界面使用终端。";
|
|
220
|
+
readonly 'terminal.auth.title': "二次身份验证 (2FA / 交互式认证)";
|
|
221
|
+
readonly 'terminal.auth.submit': "提交验证码";
|
|
222
|
+
readonly 'terminal.auth.cancel': "取消";
|
|
223
|
+
readonly 'terminal.auth.placeholder': "请输入验证码或口令";
|
|
224
|
+
readonly 'terminal.auth.hint': "服务器请求进行交互式二次验证(输入仅本次生效,不落盘):";
|
|
225
|
+
readonly 'terminal.tabs': "终端标签";
|
|
226
|
+
readonly 'terminal.newTab': "按当前主机新开标签";
|
|
227
|
+
readonly 'terminal.closeTab': "关闭标签";
|
|
228
|
+
readonly 'terminal.authPending': "待验证";
|
|
229
|
+
readonly 'terminal.tabExited': "已退出";
|
|
230
|
+
readonly 'terminal.tabError': "出错";
|
|
231
|
+
readonly 'terminal.closeFailed': "无法确认该标签已关闭:关闭帧未送达宿主。标签已保留——可重试,或切到该标签前台,用它自己的连接关闭。";
|
|
232
|
+
readonly 'transfer.selectHost': "选择主机";
|
|
233
|
+
readonly 'transfer.remotePath': "远程路径";
|
|
234
|
+
readonly 'transfer.remotePathHint': "如 /tmp/ 或 /home/user/app.tar.gz";
|
|
235
|
+
readonly 'transfer.upload': "上传";
|
|
236
|
+
readonly 'transfer.uploading': "正在上传 {file}…";
|
|
237
|
+
readonly 'transfer.download': "下载";
|
|
238
|
+
readonly 'transfer.downloading': "正在下载…";
|
|
239
|
+
readonly 'transfer.done': "完成:{bytes} 字节";
|
|
240
|
+
readonly 'transfer.failed': "传输失败:{error}";
|
|
241
|
+
readonly 'transfer.browseRemote': "浏览远程目录";
|
|
242
|
+
readonly 'transfer.refresh': "刷新";
|
|
243
|
+
readonly 'transfer.name': "名称";
|
|
244
|
+
readonly 'transfer.upLevel': "上级目录";
|
|
245
|
+
readonly 'transfer.size': "大小";
|
|
246
|
+
readonly 'transfer.modified': "修改时间";
|
|
247
|
+
readonly 'transfer.bytes': "{value} B";
|
|
248
|
+
readonly 'transfer.kib': "{value} KB";
|
|
249
|
+
readonly 'transfer.mib': "{value} MB";
|
|
250
|
+
readonly 'transfer.gib': "{value} GB";
|
|
251
|
+
readonly 'transfer.percent': "{value}%";
|
|
252
|
+
readonly 'transfer.speed': "{value}/s";
|
|
253
|
+
readonly 'transfer.dir': "目录";
|
|
254
|
+
readonly 'transfer.emptyDir': "此目录为空。";
|
|
255
|
+
readonly 'transfer.file': "文件";
|
|
256
|
+
readonly 'tunnel.empty': "没有活跃的隧道。";
|
|
257
|
+
readonly 'tunnel.start': "新建隧道";
|
|
258
|
+
readonly 'tunnel.alias': "主机别名";
|
|
259
|
+
readonly 'tunnel.remotePort': "远程端口";
|
|
260
|
+
readonly 'tunnel.remoteHost': "远程主机";
|
|
261
|
+
readonly 'tunnel.remoteHostHint': "默认 127.0.0.1(服务器自身)";
|
|
262
|
+
readonly 'tunnel.localPort': "本地端口";
|
|
263
|
+
readonly 'tunnel.localPortHint': "留空自动分配";
|
|
264
|
+
readonly 'tunnel.name': "服务名称";
|
|
265
|
+
readonly 'tunnel.nameHint': "可选项目或服务名称(如 redis、api)";
|
|
266
|
+
readonly 'tunnel.description': "备注说明";
|
|
267
|
+
readonly 'tunnel.descriptionHint': "可选说明信息";
|
|
268
|
+
readonly 'tunnel.stop': "停止";
|
|
269
|
+
readonly 'tunnel.stopAll': "全部停止";
|
|
270
|
+
readonly 'tunnel.stopAllConfirm': "确定停止全部隧道吗?";
|
|
271
|
+
readonly 'tunnel.row': "{alias}: 127.0.0.1:{localPort} -> {remoteHost}:{remotePort}";
|
|
272
|
+
readonly 'tunnel.started': "隧道已建立:127.0.0.1:{localPort}";
|
|
273
|
+
readonly 'tunnel.failed': "隧道启动失败:{error}";
|
|
274
|
+
readonly 'tunnel.externalRow': "{alias}: 127.0.0.1:{localPort} -> {remoteHost}:{remotePort}(外部进程 pid {pid})";
|
|
275
|
+
readonly 'tunnel.externalLive': "外部进程 · 端口可连通";
|
|
276
|
+
readonly 'tunnel.externalDead': "外部进程 · 端口未监听";
|
|
277
|
+
readonly 'tunnel.externalMeta': "外部进程 pid {pid}";
|
|
278
|
+
readonly 'tunnel.externalHint': "以下转发由本插件之外的程序建立,只能查看、不能在此停止。";
|
|
279
|
+
readonly 'cluster.command': "命令";
|
|
280
|
+
readonly 'cluster.run': "执行";
|
|
281
|
+
readonly 'cluster.confirm': "确定在匹配的主机上执行该命令吗?该操作会真实运行在远程服务器上。";
|
|
282
|
+
readonly 'cluster.aliases': "主机别名(逗号分隔,与环境、标签至少填一项)";
|
|
283
|
+
readonly 'cluster.environment': "环境过滤";
|
|
284
|
+
readonly 'cluster.tags': "标签过滤(逗号分隔)";
|
|
285
|
+
readonly 'cluster.results': "执行结果";
|
|
286
|
+
readonly 'cluster.empty': "输入命令后点击「执行」。";
|
|
287
|
+
readonly 'cluster.needSelector': "请先填写主机别名、环境或标签中的至少一项,以免误在整个机群上执行。";
|
|
288
|
+
readonly 'cluster.noMatch': "没有匹配的主机。";
|
|
289
|
+
readonly 'cluster.ok': "成功";
|
|
290
|
+
readonly 'cluster.fail': "失败";
|
|
291
|
+
readonly 'cluster.timeout': "超时";
|
|
292
|
+
readonly 'cluster.col.alias': "主机";
|
|
293
|
+
readonly 'cluster.col.status': "状态";
|
|
294
|
+
readonly 'cluster.col.exit': "退出码";
|
|
295
|
+
readonly 'cluster.col.stdout': "标准输出";
|
|
296
|
+
readonly 'cluster.col.stderr': "标准错误";
|
|
297
|
+
readonly 'cluster.col.error': "错误";
|
|
298
|
+
readonly 'cluster.col.duration': "耗时";
|
|
299
|
+
readonly 'common.loading': "加载中…";
|
|
300
|
+
readonly 'common.error': "出错:{error}";
|
|
301
|
+
readonly 'common.refresh': "刷新";
|
|
302
|
+
readonly 'common.confirm': "确定";
|
|
303
|
+
readonly 'error.disabled': "SSH 插件在宿主端未启用。请前往「设置 → Web 插件 → SSH」打开 enabled 开关。";
|
|
304
|
+
};
|
|
305
|
+
export declare const en: Record<keyof typeof zh, string>;
|
|
306
|
+
/** Locale key union. */
|
|
307
|
+
export type SshKey = keyof typeof zh;
|
|
308
|
+
/** Tiny interpolation: {name} -> value. */
|
|
309
|
+
export declare function t(dictionary: Record<string, string>, key: string, values?: Record<string, string | number>): string;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Native panel registration for the SSH panel.
|
|
3
|
+
*
|
|
4
|
+
* The panel is an official-style center-column page, not a DOM takeover: it
|
|
5
|
+
* contributes a row into the sidebar shell's own global panel list
|
|
6
|
+
* (`sidebar.panellist`) and its page into the layout's keyed `main` slot. The
|
|
7
|
+
* shell then owns the row box, the label, the active highlight, the collapsed
|
|
8
|
+
* rail and the panel switch, exactly as it does for the shipped Plugins and
|
|
9
|
+
* Schedule pages and for the task board and the skill center.
|
|
10
|
+
*
|
|
11
|
+
* Both registrations go through `ctx.slots.inject`, which fires only once the
|
|
12
|
+
* owning shell entry has declared the seat: load order between this plugin and
|
|
13
|
+
* ui-layout / ui-sidebar therefore does not matter, and neither does a shell
|
|
14
|
+
* that cannot serve the seats (the callback simply never runs).
|
|
15
|
+
*
|
|
16
|
+
* The terminal's PTY shell lives on the host and outlives this page (see
|
|
17
|
+
* engine/terminal-sessions.ts), so the layout unmounting a deselected page
|
|
18
|
+
* costs the view its xterm instance, not the remote session: the terminal tab
|
|
19
|
+
* reattaches by session id when the page mounts again.
|
|
20
|
+
*
|
|
21
|
+
* @module @linxin666/dsh-client-ssh/client
|
|
22
|
+
*/
|
|
23
|
+
import type { Context as ClientContext } from '@deepseek-ai/cordis';
|
|
24
|
+
import type { SshApi } from './api.ts';
|
|
25
|
+
import { SSH_PANEL_ID, type PanelController } from './panel/controller.ts';
|
|
26
|
+
import { type TerminalFontSource } from './panel/helpers.ts';
|
|
27
|
+
/** The panel id shared by the sidebar row and the main-slot occupant. */
|
|
28
|
+
export { SSH_PANEL_ID };
|
|
29
|
+
/**
|
|
30
|
+
* The sidebar row glyph the shell asks for at its own size and active state.
|
|
31
|
+
* The shell owns the button, label, tooltip and rail geometry; this component
|
|
32
|
+
* draws only the glyph, like every other panel row.
|
|
33
|
+
*
|
|
34
|
+
* The glyph carries `data-dsh-panel-entry` because it is the only DOM this
|
|
35
|
+
* panel's own code owns inside that shell-owned row: the L2 contract (skins)
|
|
36
|
+
* resolves which row belongs to which plugin through it, since the shell
|
|
37
|
+
* stamps no per-entry hook of its own (see contracts/semantic-attrs-v1.md).
|
|
38
|
+
* @param props - the shell's icon share: square edge and selection state.
|
|
39
|
+
* @returns the decorative terminal glyph.
|
|
40
|
+
*/
|
|
41
|
+
export declare function SshPanelIcon({ size }: {
|
|
42
|
+
size: number;
|
|
43
|
+
active: boolean;
|
|
44
|
+
}): React.ReactElement;
|
|
45
|
+
/**
|
|
46
|
+
* The main-slot page. The layout mounts it only while this panel is selected;
|
|
47
|
+
* the wrapper carries the pinned `data-dsh-ssh-view` semantic anchor (L2
|
|
48
|
+
* contract, skins) the takeover container used to own.
|
|
49
|
+
* @param props - the framework main-slot share plus this entry's injected face.
|
|
50
|
+
* @returns the SSH panel page.
|
|
51
|
+
*/
|
|
52
|
+
export declare function SshPanelPage({ controller, api, terminalFont }: {
|
|
53
|
+
controller: PanelController;
|
|
54
|
+
api: SshApi;
|
|
55
|
+
terminalFont?: TerminalFontSource;
|
|
56
|
+
}): React.ReactElement;
|
|
57
|
+
/**
|
|
58
|
+
* Register the SSH panel's sidebar row and center-column page.
|
|
59
|
+
*
|
|
60
|
+
* Both seats are declared by shell plugins this package does not depend on at
|
|
61
|
+
* runtime, so each registration is wrapped in `ctx.slots.inject`: the callback
|
|
62
|
+
* runs only after the owning entry declares the seat, and a shell that never
|
|
63
|
+
* declares it leaves the panel simply absent instead of failing boot.
|
|
64
|
+
* @param ctx - client root context (services: slots).
|
|
65
|
+
* @param controller - the controller the page and the row drive.
|
|
66
|
+
* @param api - the SSH API client the page operates through.
|
|
67
|
+
* @param terminalFont - live terminal-font setting source (issue #577).
|
|
68
|
+
* @returns disposer releasing both registrations.
|
|
69
|
+
*/
|
|
70
|
+
export declare function registerSshPanel(ctx: ClientContext, controller: PanelController, api: SshApi, terminalFont?: TerminalFontSource): () => void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SshApi } from '../api.ts';
|
|
2
|
+
/** Deploy tab props. */
|
|
3
|
+
export interface DeployTabProps {
|
|
4
|
+
/** The SSH API client. */
|
|
5
|
+
api: SshApi;
|
|
6
|
+
/** Whether the panel is open, so refreshes only run while visible. */
|
|
7
|
+
active: boolean;
|
|
8
|
+
}
|
|
9
|
+
/** The deploy tab. */
|
|
10
|
+
export declare function DeployTab({ api, active }: DeployTabProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SshApi } from '../api.ts';
|
|
2
|
+
/** Fleet tab props. */
|
|
3
|
+
export interface FleetTabProps {
|
|
4
|
+
/** The SSH API client. */
|
|
5
|
+
api: SshApi;
|
|
6
|
+
/** Whether the panel is open, so refreshes only run while visible. */
|
|
7
|
+
active: boolean;
|
|
8
|
+
}
|
|
9
|
+
/** The fleet monitoring tab. */
|
|
10
|
+
export declare function FleetTab({ api, active }: FleetTabProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SshApi } from '../api.ts';
|
|
2
|
+
import type { SshHostSummary } from '../../protocol.ts';
|
|
3
|
+
/** Host form dialog props. */
|
|
4
|
+
export interface HostFormDialogProps {
|
|
5
|
+
api: SshApi;
|
|
6
|
+
/** The host being edited; null/undefined means create. */
|
|
7
|
+
editing?: SshHostSummary | null;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
onSaved: (host: SshHostSummary) => void;
|
|
10
|
+
}
|
|
11
|
+
/** The create/edit host modal. */
|
|
12
|
+
export declare function HostFormDialog({ api, editing, onClose, onSaved }: HostFormDialogProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { SshApi } from '../api.ts';
|
|
2
|
+
import type { SshHostSummary } from '../../protocol.ts';
|
|
3
|
+
/** Hosts tab props. */
|
|
4
|
+
export interface HostsTabProps {
|
|
5
|
+
api: SshApi;
|
|
6
|
+
/** Connect the given alias in the terminal tab. */
|
|
7
|
+
onConnect: (alias: string) => void;
|
|
8
|
+
}
|
|
9
|
+
/** Host list grouping modes (#379). */
|
|
10
|
+
export type HostGroupBy = 'none' | 'environment' | 'tags';
|
|
11
|
+
/** One collapsible group section of the grouped host list. */
|
|
12
|
+
export interface HostGroup {
|
|
13
|
+
/** Group key: the environment name, one tag, or '' for the ungrouped bucket. */
|
|
14
|
+
key: string;
|
|
15
|
+
hosts: SshHostSummary[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Bucket hosts into collapsible groups (#379). Grouping by tags places a
|
|
19
|
+
* multi-tag host in every one of its tag groups (folder view); hosts without
|
|
20
|
+
* the grouping key land in the '' bucket, which always sorts last. Groups
|
|
21
|
+
* sort alphabetically; host order inside a group follows the API listing.
|
|
22
|
+
*/
|
|
23
|
+
export declare function groupHosts(hosts: SshHostSummary[], groupBy: HostGroupBy): HostGroup[];
|
|
24
|
+
/** The hosts table plus its toolbar and dialogs. */
|
|
25
|
+
export declare function HostsTab({ api, onConnect }: HostsTabProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SshApi } from '../api.ts';
|
|
2
|
+
/** Logs tab props. */
|
|
3
|
+
export interface LogsTabProps {
|
|
4
|
+
/** The SSH API client. */
|
|
5
|
+
api: SshApi;
|
|
6
|
+
/** Whether the panel is open, so refreshes only run while visible. */
|
|
7
|
+
active: boolean;
|
|
8
|
+
}
|
|
9
|
+
/** The logs tab. */
|
|
10
|
+
export declare function LogsTab({ api, active }: LogsTabProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SshApi } from '../api.ts';
|
|
2
|
+
import type { PanelController } from './controller.ts';
|
|
3
|
+
import { type TerminalFontSource } from './helpers.ts';
|
|
4
|
+
/** Panel shell props. */
|
|
5
|
+
export interface SshPanelProps {
|
|
6
|
+
/** The panel state owner (open/close/toggle, active tab, terminal session). */
|
|
7
|
+
controller: PanelController;
|
|
8
|
+
/** The SSH API client every tab operates through. */
|
|
9
|
+
api: SshApi;
|
|
10
|
+
/** Live terminal-font setting source handed to the terminal tab (issue #577). */
|
|
11
|
+
terminalFont?: TerminalFontSource;
|
|
12
|
+
}
|
|
13
|
+
/** The tabbed SSH panel. */
|
|
14
|
+
export declare function SshPanel({ controller, api, terminalFont }: SshPanelProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { SshApi } from '../api.ts';
|
|
2
|
+
import type { PanelController } from './controller.ts';
|
|
3
|
+
import { type TerminalFontSource } from './helpers.ts';
|
|
4
|
+
/** Terminal tab props. */
|
|
5
|
+
export interface TerminalTabProps {
|
|
6
|
+
api: SshApi;
|
|
7
|
+
/** The panel controller that owns the tabs and their host session ids. */
|
|
8
|
+
controller: PanelController;
|
|
9
|
+
/** Alias preselected by a "connect" action from the hosts tab. */
|
|
10
|
+
presetAlias?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Live terminal-font setting source (issue #577). Absent in tests and
|
|
13
|
+
* legacy mounts: the font then comes from the CSS custom-property chain.
|
|
14
|
+
*/
|
|
15
|
+
terminalFont?: TerminalFontSource;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Whether the visible challenge form may answer on the bound socket: the form
|
|
19
|
+
* and the socket must belong to the same tab. Both are read at submit time, and
|
|
20
|
+
* the window between a tab switch's commit and the effect that rebinds the
|
|
21
|
+
* socket is exactly when they can disagree.
|
|
22
|
+
* @param linkTabId - the tab the bound socket belongs to.
|
|
23
|
+
* @param formTabId - the tab whose challenge form is on screen.
|
|
24
|
+
*/
|
|
25
|
+
export declare function challengeBelongsToLink(linkTabId: string | undefined, formTabId: string | undefined): boolean;
|
|
26
|
+
/** The terminal view with its tab strip. */
|
|
27
|
+
export declare function TerminalTab({ api, controller, presetAlias, terminalFont }: TerminalTabProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { SshApi } from '../api.ts';
|
|
2
|
+
import type { TunnelInfo } from '../../protocol.ts';
|
|
3
|
+
/** Live-tunnel polling interval while the tab and page are visible (ms). */
|
|
4
|
+
export declare const TUNNEL_POLL_MS = 5000;
|
|
5
|
+
/**
|
|
6
|
+
* Return `next` only when the tunnel list changed in a user-visible way
|
|
7
|
+
* (identity, ordering or any renderable field), else `null` so a poll tick
|
|
8
|
+
* with no real change keeps the previous reference and React skips the
|
|
9
|
+
* re-render. `prev === null` (first load) always accepts the list.
|
|
10
|
+
*/
|
|
11
|
+
export declare function diffTunnels(prev: TunnelInfo[] | null, next: TunnelInfo[]): TunnelInfo[] | null;
|
|
12
|
+
/** Tunnels tab props. */
|
|
13
|
+
export interface TunnelsTabProps {
|
|
14
|
+
api: SshApi;
|
|
15
|
+
/** Pause automatic reads while the owning panel is closed, preserving form state. */
|
|
16
|
+
active?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/** The tunnels tab. */
|
|
19
|
+
/**
|
|
20
|
+
* Whether any forward is one this plugin can stop.
|
|
21
|
+
*
|
|
22
|
+
* External forwards belong to processes we did not start, so "Stop all" must not
|
|
23
|
+
* be offered when they are all there is: the button would look enabled and do
|
|
24
|
+
* nothing. Kept as a pure function so the rule can be asserted without a browser.
|
|
25
|
+
*/
|
|
26
|
+
export declare function hasOwnedTunnels(tunnels: TunnelInfo[] | null): boolean;
|
|
27
|
+
export declare function TunnelsTab({ api, active }: TunnelsTabProps): import("react").JSX.Element;
|