商业产业 Hacker News Agent 2026-09-09T21:51 正文 ok 649 words

Show HN:Hydra——带 PTY 守护进程的开源 Agent 终端

英文标题:🔶 Show HN: Hydra – Open-source agentic terminal with a PTY daemon

Hydra 是一款本地优先的终端桌面应用,用于管理终端会话和编程 Agent,其项目、窗口、窗格、历史记录及持久化 PTY 会话均保存在用户本机。该开源仓库提供本地桌面端、PTY 守护进程、原生终端渲染器和有限的扩展 API,并可本地发现和恢复 Claude Code、Codex CLI、GitHub Copilot CLI 等工具创建的会话。官方 macOS 与 Linux 软件包会包含专有的 Hydra Remote 组件,但该组件及其托管服务不在开源仓库中;仓库代码以 Apache License 2.0 发布。对开发者而言,Hydra 提供了可审查、可自行构建和 fork 的本地终端与 Agent 会话管理基础设施,同时明确划分了开源本地端与私有远程服务的边界。
打开原文相关 5 · 机会 2
media124.3 KB media161.7 KB

中文

展示中性项目、保留窗格和本地测试运行的合成 Hydra 本地桌面

合成产品示意图;未记录任何账户、终端转录内容、个人路径或真实桌面。

Hydra 是一款本地优先的终端桌面应用,用于处理终端会话和编程 Agent。项目、窗口、窗格、终端历史记录和保留的 PTY 会话均存储在你的机器上。

官方 macOS 软件包:

brew install --cask hydraterm/hydra/hydraterms

官方 Linux 软件包:

curl -fsSL https://hydraterms.com/install.sh | sh

官方软件包包含独立的专有 Hydra Remote 组件。从本仓库进行源代码构建可获得完整的本地桌面端;它不包含私有远程 Agent,也不提供对托管服务的访问。

本仓库包含的内容

  • PTY 守护进程和保留会话模型;
  • 原生终端渲染器;
  • 本地项目、窗口、窗格和布局;
  • 本地 Provider 与既有会话发现功能;
  • 桌面仪表板;
  • 本地 macOS 和 Linux 平台支持;以及
  • 用于请求可选桌面扩展的受限 API。

Provider 互操作性

Hydra 会读取 Provider 自有的本地会话元数据,因此能够列出并恢复由 Claude Code、Codex CLI、GitHub Copilot CLI、Antigravity、Kimi CLI、Kiro CLI、OpenCode、Cursor Agent、Devin CLI 和旧版 Gemini CLI 创建的会话。这些磁盘上的数据格式归各 Provider 所有,并且可能发生变化。发现过程在本地运行;HydraTerms 不会接收转录内容。Amp 和 Factory/Droid 可以通过各自的 CLI 启动和恢复,但 Hydra 不会读取它们的历史记录存储。

开源与 Hydra Remote

本仓库包含 Hydra 的本地桌面端。你可以根据 Apache License 2.0 审查、构建、fork 该项目并提出修改建议。

Hydra Remote 是一项独立的托管产品。其桌面 Agent、浏览器客户端、协调服务、中继服务、身份、授权和计费系统均不在本仓库内,也不是开源项目。是否对远程对等方完成身份验证和授权,由私有 Agent 而非本应用决定。

我们发布本地桌面端,是为了让负责终端会话、并运行在你机器上的代码能够接受审查。有关准确范围和威胁模型,请参阅公开/私有边界。

安装 DEVELOPMENT.md 中列出的前置依赖,然后运行:

./scripts/build-local.sh
cargo run -p maestro-app -- launch

该 cargo run 命令是快速、隔离的开发者测试环境。它使用仅限开发环境的状态,并非已安装应用的拓扑结构。如需通过与软件包相同的启动器、守护进程保留机制和打包仪表板结构来测试本地桌面端,请使用 DEVELOPMENT.md 中的未签名打包与启动说明。

本仓库将常规贡献者使用的 Rust 工具链,与最低支持的 Rust 版本分别固定。在替换工具链版本前,请阅读 DEVELOPMENT.md。

本仓库还包含适用于 macOS 和 Linux 的仅限本地、未签名打包冒烟测试脚本。它们绝不会打包专有远程 Agent,也不会生成官方签名版本;详见 DEVELOPMENT.md。

平台 UI 行为仍需在 macOS 实机上测试;在 Linux 上则需同时在原生 Wayland 和 X11 环境中进行物理测试。仅测试浏览器仪表板无法证明原生宿主行为正常。

Hydra 是产品名称。部分 crate、环境变量、schema 和持久化状态路径仍保留 maestro-*、MAESTRO_*、maestro.* 或 Maestro 名称,以保持与现有本地数据和扩展接口的兼容性。这些是稳定的实现标识符,不代表另一款产品,也不是隐藏的远程组件;修改它们需要明确的数据迁移。

欢迎提交 Bug 修复、文档、平台兼容性和打包改进。架构变更须先获得已接受的 issue,再进行实现。请参阅 CONTRIBUTING.md 和 DEVELOPMENT.md。

每项贡献均使用开发者来源证明(Developer Certificate of Origin)。请使用 git commit -s 为每次提交签署;必需的 DCO 检查会验证每个 Pull Request。HydraTerms 不要求贡献者许可协议或版权转让。

请勿在公开 issue 中报告漏洞。请遵循 SECURITY.md,或发送邮件至 security@hydraterms.com。

Hydra 的本地桌面端采用 Apache License 2.0 授权。该许可证不包含私有 Hydra Remote 实现或托管服务,也不授予任何使用 HydraTerms 名称或徽标的权利。请参阅 TRADEMARKS.md。

赞助方

Hydra 的开发由 Pairextr Teknoloji ve Yazılım A.Ş. 资助。Hydra 和 HydraTerms 仍为 HydraTerms Limited 的商标;赞助不授予对项目或其商标的所有权。

English / 原文

Synthetic Hydra local desktop showing a neutral project, retained panes and a local test run

Synthetic product illustration; no account, terminal transcript, personal path or live desktop was recorded.

Hydra is a local-first terminal desktop for working with terminal sessions and coding agents. Projects, windows, panes, terminal history and retained PTY sessions live on your machine.

Official macOS package:

brew install --cask hydraterm/hydra/hydraterms

Official Linux package:

curl -fsSL https://hydraterms.com/install.sh | sh

Official packages include the separate proprietary Hydra Remote component. A source build from this repository is a complete local desktop; it does not include the private remote agent or access to the hosted service.

What is in this repository

  • the PTY daemon and retained-session model;
  • the native terminal renderer;
  • local projects, windows, panes and layouts;
  • local provider and previous-session discovery;
  • the desktop dashboard;
  • local macOS and Linux platform support; and
  • the bounded API used to request optional desktop extensions.

Provider interoperability

Hydra reads provider-owned local session metadata so it can list and resume sessions created by Claude Code, Codex CLI, GitHub Copilot CLI, Antigravity, Kimi CLI, Kiro CLI, OpenCode, Cursor Agent, Devin CLI and the legacy Gemini CLI. These on-disk formats belong to their providers and may change. Discovery runs locally; HydraTerms does not receive transcript content. Amp and Factory/Droid can be launched and resumed through their CLIs, but Hydra does not read their history stores.

Open source and Hydra Remote

This repository contains Hydra's local desktop. You can inspect it, build it, fork it and propose changes under the Apache License 2.0.

Hydra Remote is a separate hosted product. Its desktop agent, browser client, coordination service, relays, identity, entitlement and billing systems are not in this repository and are not open source. The private agent, not this application, decides whether a remote peer is authenticated and authorized.

We publish the local desktop so that the code which owns terminal sessions and runs on your machine can be reviewed. See the public/private boundary for the exact scope and threat model.

Install the prerequisites in DEVELOPMENT.md, then run:

./scripts/build-local.sh
cargo run -p maestro-app -- launch

That cargo run command is the fast, isolated developer harness. It uses development-only state and is not the installed application topology. To exercise the local desktop through the same launcher, daemon-retention and bundled-dashboard shape as a package, use the unsigned packaging and launch instructions in DEVELOPMENT.md.

The repository pins the normal contributor Rust toolchain separately from its minimum supported Rust version. See DEVELOPMENT.md before substituting toolchain versions.

The repository also contains local-only unsigned packaging smoke scripts for macOS and Linux. They never bundle the proprietary remote agent and do not produce an official signed release; see DEVELOPMENT.md.

Platform UI behavior still needs physical testing on macOS and, on Linux, both native Wayland and X11. A browser-only dashboard test does not prove native host behavior.

Hydra is the product name. Some crates, environment variables, schemas and durable state paths retain maestro-*, MAESTRO_*, maestro.* or Maestro names so existing local data and extension interfaces remain compatible. They are stable implementation identifiers, not a second product or a hidden remote component; changing them requires an explicit data migration.

Bug fixes, documentation, platform compatibility and packaging improvements are welcome. Architectural changes require an accepted issue before implementation. See CONTRIBUTING.md and DEVELOPMENT.md.

Every contribution uses the Developer Certificate of Origin. Sign off each commit with git commit -s; the required DCO check verifies every pull request. HydraTerms does not require a contributor licence agreement or copyright assignment.

Do not report vulnerabilities in a public issue. Follow SECURITY.md or email security@hydraterms.com.

Hydra's local desktop is licensed under the Apache License 2.0. That licence does not include the private Hydra Remote implementation or hosted service, and it grants no rights to HydraTerms names or logos. See TRADEMARKS.md.

Sponsor

Hydra's development is funded by Pairextr Teknoloji ve Yazılım A.Ş. Hydra and HydraTerms remain marks of HydraTerms Limited; sponsorship grants no ownership of the project or its marks.