商业产业 Hacker News Agent 2026-10-07T17:15 正文 ok 1009 words

Show HN:Pinrail——让编程 Agent 等待你审核的桌面收件箱

英文标题:🔶 Show HN: Pinrail – A desktop inbox where coding agents wait for your review

Pinrail 是一款桌面应用,让 Claude Code、Codex、Cursor、OpenCode 等编码 Agent 在执行需要人工确认的操作前提交审核并等待决策。它提供代码审查、列表、问答反馈、Markdown 文档和图像等五类核心审核插件,Agent 可通过本地 `pinrail` CLI 接收结构化的 Markdown 或 JSON 决策结果。应用仅在回环地址提供 API,审核内容和决定均保存在本机,当前支持 macOS 与 Linux,Windows 支持即将推出。对开发者而言,Pinrail 试图将 Agent 的高风险或需主观判断环节从聊天记录中抽离出来,变成可视化、可追踪且可扩展的人工审核工作流。
打开原文相关 6 · 机会 1
media1.6 KB media533.5 KB media352.3 KB media276.1 KB media218.6 KB media1.3 MB media41.2 KB

中文

网站 · 下载 · 文档 · 插件

Pinrail 是一款桌面应用,编码 Agent 会在采取行动前向你询问。你可以在专为该内容设计的视图中审核 Agent 的提议,Agent 会根据你的决定继续执行。

打开代码审查的 Pinrail:Agent 在 diff 上给出的发现,其中一项已接受并附有给 Agent 的备注,一项已拒绝并说明原因,其余待审核项目显示在侧边栏

Pinrail 适用于任何能够运行命令的 Agent,例如 Claude Code、Codex、Cursor 或 OpenCode。它可运行于 macOS 和 Linux,Windows 支持即将推出。Pinrail 仍处于早期开发阶段,因此预计会存在一些不完善之处,版本之间也可能发生变化。

Agent 擅长完成工作,但有些步骤需要人工参与:以你的名义发布评论、向客户发送邮件、修改生产环境。在聊天中批准这些步骤,意味着你需要阅读大段文本并重新输入回复。Pinrail 为每一个这样的时刻提供了适当的审核方式:

  • 由 Agent 决定何时询问。 它的指令会注明哪些步骤需要你,因此它只会在这些步骤询问,而不会在其他地方打扰你。

  • 每项审核都有为其内容量身打造的视图。 代码审查会显示 diff 及 Agent 在其上发现的问题。一组生成图像会展示这些图像,你可以在应修改的区域画框。

  • 你的决定是结构化的。 Agent 会收到你接受的内容、拒绝的内容及你的备注,可以是可供其执行的 Markdown,也可以是供脚本使用的 JSON。

  • 一切都保留在你的机器上。 应用仅在回环地址提供 API,并在本地保存你的审核和决定。

    sequenceDiagram participant A as Your agent participant P as Pinrail A->>P: pinrail submit code-review --data review.json --wait Note over A: waits Note over P: you review and decide P->>A: your decision Note over A: carries on with it

加载中

当 Agent 执行到需要你参与的步骤时,它会使用审核内容运行 pinrail 命令:包括用于展示审核的插件、标题以及 JSON 负载。

pinrail submit code-review --title "Retry failed webhook deliveries" \
  --data findings.json --wait

Pinrail 会通知你,该审核将在你的收件箱中等待,并按项目分组。

收件箱:来自多个 Agent 和项目的审核,每项均显示其请求内容

你可以打开它,并在插件的视图中作出决定。在本页顶部的代码审查示例中,你可以接受或拒绝 Agent 的每项发现,并向 Agent 写下备注。

当你提交审核结果后,该命令会打印你的决定并退出,Agent 随后继续执行:

r_01K5R2 · decided · Retry failed webhook deliveries
code-review · decided by maya at 2026-09-23 10:14

- **#1 accepted** `src/deliver.ts:42` — The worker sleeps for up to 31 seconds per delivery (major)
  > Agreed. Re-enqueue with runAt = now + backoff(attempt)
- **#4 rejected** `src/log.ts:18` — The give-up log should say why (nit)
  > Fine as it is; the log already has the delivery id.

Undecided: #2, #3, #5

命令的退出代码会说明审核如何结束:已决定、附带停止指令而丢弃、已撤回或已过期。当你要求修改时,Agent 会提交新一轮审核,应用会在旁边显示你此前的裁定。

  1. 安装应用:从下载页面或最新版本获取。在 macOS 上,应用已签名并经过公证。

  2. 按照首次打开时显示的设置流程操作。 它会安装 pinrail 命令,为在你电脑上发现的 Agent 添加 Pinrail skill,并安装推荐插件。

  3. 用你自己的话向 Agent 提出请求:

    Ask me through Pinrail which TODOs in this repository to tackle first.
    

或者询问它 Pinrail 可以在哪些地方帮助你的项目:

     Look at this project and suggest where you should ask me through Pinrail before you act.

你的第一项审核会逐步讲解这一流程,而指示 Agent说明了如何让 Agent 每次都在你选择的步骤向你询问。

每一种审核类型都是一个插件:包括 Agent 发送的负载、你返回的决定,以及你作出决定的视图。应用内置五个核心插件:

插件 审核
code-review 包含 Agent 提议的审查评论的 diff;每条评论均可接受、拒绝或编辑。
list 按标题分组的条目;每项均可接受或拒绝,并附加备注。
feedback 一次性回答的问题:选项、是或否,以及自由文本。
markdown 文档,例如计划或规格说明;可逐节阅读和评论。
image 可供选择的生成图像,可使用方框和图钉标示需要修改的内容。

forgeplane/pinrail-plugins 中的示例插件展示了插件还可实现的其他能力,涵盖 HTML 页面、电子邮件、日历、Logo、配色方案、3D 模型、动画、音频、视频、设计画布、修改前后对比和交易。每个插件均以 zip 文件发布,你可以在应用的 Settings › Plugins 中安装。

forgeplane/pinrail-plugins 中的示例插件,每个插件均展示一项审核

一个插件由清单文件、两个 JSON Schema 和一个 HTML 视图组成,无需构建步骤。pinrail plugins new <name> 可以创建插件;插件 SDK pinrail-sdk 可以在不运行应用的情况下于浏览器中运行其视图,并使用 Playwright 对其进行测试。视图还可以使用 React、Vue、Svelte 或任何其他框架构建。参见编写插件。

目录 内容
desktop/ 应用:Rust 核心(API、存储、插件)、Tauri 外壳和 React UI。
cli/ 供 Agent 运行的 pinrail 命令。
plugins/ 核心插件。
sdk/ 插件 SDK、其开发 shell 和测试工具。
skill/ 教会 Agent 使用 Pinrail 的 skill。
e2e/ 针对无头核心测试 CLI 与应用 UI 的端到端测试。
docs/ 发布在网站上的文档。
website/ 网站。

Node 版本固定在 mise.toml 中,可通过 mise install 完成设置;Rust 版本固定在 rust-toolchain.toml 中,rustup 会自行读取该文件。

mise run dev:desktop        # the app with live reload
mise run test               # every test suite
mise run lint               # rustfmt, clippy, the type check and the licences, as CI runs them

CONTRIBUTING.md 描述了每个测试套件及其运行方式。请在提交 pull request 前阅读它。若要报告漏洞,请遵循 SECURITY.md。

Pinrail 采用 Apache License 2.0 授权。版权信息和第三方声明请参见 NOTICE。

English / 原文

Website · Download · Documentation · Plugins

Pinrail is a desktop app where your coding agents ask you before they act. You review what an agent proposes in a view made for it, and the agent carries on with your decision.

Pinrail with a code review open: the agent's findings on the diff, one accepted with a note to the agent and one rejected with a reason, and the other waiting reviews in the sidebar

Pinrail works with any agent that can run a command, such as Claude Code, Codex, Cursor or OpenCode. It runs on macOS and Linux, and Windows support is coming. Pinrail is in early development, so expect rough edges and changes between releases.

Agents are good at doing the work, but some steps need a person: a comment posted under your name, an email to a customer, a change to production. Approving those steps in a chat means reading a wall of text and typing your answer back. Pinrail gives each of these moments a proper review:

  • The agent decides when to ask. Its instructions name the steps that need you, so it asks at those steps and nowhere else.

  • Each review has a view made for its content. A code review shows the diff with the agent's findings on it. A set of generated images shows the images, and you draw a box on the part that should change.

  • Your decision is structured. The agent gets back what you accepted, what you rejected and your notes, as Markdown it can act on or JSON for a script.

  • Everything stays on your machine. The app serves its API on loopback only, and keeps your reviews and decisions locally.

    sequenceDiagram participant A as Your agent participant P as Pinrail A->>P: pinrail submit code-review --data review.json --wait Note over A: waits Note over P: you review and decide P->>A: your decision Note over A: carries on with it

Loading

When the agent reaches a step that needs you, it runs the pinrail command with a review: the plugin to show it with, a title and a JSON payload.

pinrail submit code-review --title "Retry failed webhook deliveries" \
  --data findings.json --wait

Pinrail notifies you, and the review waits in your inbox, grouped by project.

The inbox: reviews from several agents and projects, each with what it asks

You open it, and decide in the plugin's view. In the code review at the top of this page, you accept or reject each of the agent's findings, and write a note to the agent.

When you hand the review over, the command prints your decision and exits, and the agent carries on:

r_01K5R2 · decided · Retry failed webhook deliveries
code-review · decided by maya at 2026-09-23 10:14

- **#1 accepted** `src/deliver.ts:42` — The worker sleeps for up to 31 seconds per delivery (major)
  > Agreed. Re-enqueue with runAt = now + backoff(attempt)
- **#4 rejected** `src/log.ts:18` — The give-up log should say why (nit)
  > Fine as it is; the log already has the delivery id.

Undecided: #2, #3, #5

The command's exit code says how the review ended: decided, discarded with an instruction to stop, withdrawn or expired. When you ask for changes, the agent submits a new round, and the app shows your earlier verdicts beside it.

  1. Install the app from the download page or the latest release. On macOS, it is signed and notarized.

  2. Follow the setup that opens the first time. It installs the pinrail command, adds Pinrail's skill to the agents it finds on your computer, and installs the recommended plugins.

  3. Ask your agent for something, in your own words:

    Ask me through Pinrail which TODOs in this repository to tackle first.
    

Or ask it where Pinrail would help in your project:

     Look at this project and suggest where you should ask me through Pinrail before you act.

Your first review walks through this, and Instructing an agent shows how to make an agent ask at the steps you choose, every time.

Each kind of review is a plugin: the payload an agent sends, the decision you give back, and the view you decide in. Five core plugins come with the app:

Plugin Review
code-review A diff with the agent's proposed review comments, each accepted, rejected or edited.
list Items grouped under headings, each accepted or rejected with a note.
feedback Questions answered in one pass: choices, yes or no, and free text.
markdown A document, such as a plan or a spec, read and commented on section by section.
image Generated images to choose between, with boxes and pins on what to change.

Sample plugins in forgeplane/pinrail-plugins show what else a plugin can do. They cover HTML pages, emails, calendars, logos, colour palettes, 3D models, animations, audio, video, design canvases, before-and-after comparisons and trades. Each one is released as a zip, which you install in the app's Settings › Plugins.

The sample plugins in forgeplane/pinrail-plugins, each showing a review

A plugin is a manifest, two JSON schemas and an HTML view, with no build step needed. pinrail plugins new <name> creates one, and the plugin SDK, pinrail-sdk, runs its view in a browser without the app and tests it with Playwright. Views can also be built with React, Vue, Svelte or any other framework. See Writing a plugin.

Directory Contents
desktop/ The app: a Rust core (API, storage, plugins), a Tauri shell and a React UI.
cli/ The pinrail command that agents run.
plugins/ The core plugins.
sdk/ The plugin SDK, its development shell and its test harness.
skill/ The skill that teaches an agent to use Pinrail.
e2e/ End-to-end tests of the CLI and the app's UI against the headless core.
docs/ The documentation, published on the website.
website/ The website.

Node is pinned in mise.toml, which mise install sets up, and Rust in rust-toolchain.toml, which rustup reads on its own.

mise run dev:desktop        # the app with live reload
mise run test               # every test suite
mise run lint               # rustfmt, clippy, the type check and the licences, as CI runs them

CONTRIBUTING.md describes each test suite and how to run it. Read it before you open a pull request. To report a vulnerability, follow SECURITY.md.

Pinrail is licensed under the Apache License 2.0. See NOTICE for the copyright and the third-party notices.