@hyzyn/dsh-tty 0.18.2 → 0.18.3

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/lib/index.js CHANGED
@@ -54,7 +54,7 @@ const TUNNEL_SCHEMA = z.object({
54
54
  localTargetPort: z.natural().max(65535).default(0),
55
55
  enabled: z.boolean().default(true),
56
56
  });
57
- /** 与「设置 → 插件 → 终端面板」卡片表单对齐的 schema。 */
57
+ /** 与「插件配置 → 终端面板」卡片表单对齐的 schema。 */
58
58
  const TTY_SETTINGS_SCHEMA = z.object({
59
59
  enabled: z.boolean().default(true),
60
60
  announceToAgent: z.boolean().default(true),
@@ -2172,7 +2172,7 @@ const plugin = definePlugin({
2172
2172
  // never 参数做签名擦除:原样适配 ReqLike / IncomingMessage 等各种 handler。
2173
2173
  const guardDisabled = (handler) => (req, res) => {
2174
2174
  if (!stateRef.enabled) {
2175
- writeJson(res, 403, { error: '插件已禁用(设置 → 插件 → 终端面板 → 启用插件)' });
2175
+ writeJson(res, 403, { error: '插件已禁用(插件配置 → 终端面板 → 启用插件)' });
2176
2176
  return;
2177
2177
  }
2178
2178
  return handler(req, res);
@@ -3024,7 +3024,7 @@ const plugin = definePlugin({
3024
3024
  })));
3025
3025
  activeDisposers.push(tools.register(defineTool({
3026
3026
  name: 'tunnel_list',
3027
- description: '列出端口转发隧道及其实时状态(活跃/连接中/错误/停止、规则、当前与累计连接数、最近错误)。用户说「隧道连不上 / 转发挂了 / 端口转发不通」时先用它诊断;隧道在 设置 → 插件 → 终端面板 卡片维护。',
3027
+ description: '列出端口转发隧道及其实时状态(活跃/连接中/错误/停止、规则、当前与累计连接数、最近错误)。用户说「隧道连不上 / 转发挂了 / 端口转发不通」时先用它诊断;隧道在 插件配置 → 终端面板 卡片维护。',
3028
3028
  parameters: {},
3029
3029
  output: {
3030
3030
  schema: {
@@ -3055,7 +3055,7 @@ const plugin = definePlugin({
3055
3055
  const v = value;
3056
3056
  const tunnels = v.tunnels ?? [];
3057
3057
  if (tunnels.length === 0)
3058
- return [{ type: 'text', text: '当前没有配置端口转发隧道(设置 → 插件 → 终端面板 卡片可添加)' }];
3058
+ return [{ type: 'text', text: '当前没有配置端口转发隧道(插件配置 → 终端面板 卡片可添加)' }];
3059
3059
  const text = '端口转发隧道:' + tunnels.map((t) => {
3060
3060
  const tail = t.error !== null && t.error !== undefined ? `(错误: ${t.error})` : t.lastForwardError !== null && t.lastForwardError !== undefined ? `(最近转发失败: ${t.lastForwardError})` : `(连接 ${String(t.connections)})`;
3061
3061
  return `\n- ${t.name} [${t.direction}] ${t.rule} — ${t.state}${tail}`;
@@ -3082,7 +3082,7 @@ const plugin = definePlugin({
3082
3082
  name: 'sftp_list',
3083
3083
  description: '列出 SSH 远程目录内容(名称/类型/大小/修改时间,目录在前)。book 为 SSH 连接簿条目名;path 缺省为远程登录 home。用于查找远程文件、确认上传下载结果。',
3084
3084
  parameters: {
3085
- book: { type: 'string', required: true, description: 'SSH 连接簿条目名(设置 → 插件 → 终端面板 维护)' },
3085
+ book: { type: 'string', required: true, description: 'SSH 连接簿条目名(插件配置 → 终端面板 维护)' },
3086
3086
  path: { type: 'string', description: '远程目录路径(缺省 = 登录 home)' },
3087
3087
  },
3088
3088
  output: {
@@ -3227,7 +3227,7 @@ const plugin = definePlugin({
3227
3227
  name: 'sftp_mkdir',
3228
3228
  description: '在 SSH 远程创建目录(book 连接簿条目 + path)。parents:true 时逐级补齐缺失的父目录(等效 mkdir -p,默认 false,父目录缺失直接报错)。',
3229
3229
  parameters: {
3230
- book: { type: 'string', required: true, description: 'SSH 连接簿条目名(设置 → 插件 → 终端面板 维护)' },
3230
+ book: { type: 'string', required: true, description: 'SSH 连接簿条目名(插件配置 → 终端面板 维护)' },
3231
3231
  path: { type: 'string', required: true, description: '要创建的远程目录路径' },
3232
3232
  parents: { type: 'boolean', description: 'true 逐级补齐缺失父目录(默认 false)' },
3233
3233
  },