ClaudeMods
☰
ZH-CN
● 0 人在线 · 浏览 0 次
赞助提交作品
GitHub 仓库 · 发布者 severinlindenmann

orch-session

一个 Claude Code 外挂,通过状态列、提示框上方的栏、/orch 面板和交接 toast 显示当前工作阶段持有的 orch 工单。

severinlindenmann@severinlindenmann

severinlindenmann/orch-core/tree/main/plugins/orch-session

已翻译

关于这个 mod

orch-session 是一个 Claude Code 外挂,只显示当前工作阶段持有的 orch 工单,不显示其他内容:没有积压,也没有队列。所有内容都会先说明轮到谁行动,用图标加文字呈现(绝不只靠颜色),并使用 orch-core 设计系统的颜色。

  • 状态列:每个已认领工单一项,例如 ◐ L-0001 working ● L-0002 Answer Q1。
  • 提示框上方的栏:最重要的行动优先显示你的行动,例如 ● L-0002 0/1 Your move: Answer Q1 · Which one?。
  • /orch:每张工单一张卡片的面板,显示轮到谁行动、要做什么、带选项的开放问题、推荐选项、orch answer 命令、任务、父级 epic、上次 verdict 和 PR。
  • Toast 只用于交接:你的行动开始或结束、工单被阻塞、出现 verdict、认领取得或丢失。

它是只读的:调用 orch list --mine --json 和 orch show <id> --json,在每次 agent orch 命令后以及定期刷新(按活动情况为 20s/60s/5m),一次只进行一次刷新。刷新失败时保留上一个完整状态,并在面板中报告。它从不运行写入命令或仅限人工的命令,而是显示 orch answer 命令,不执行它。

要求:PATH 上有 orch CLI、orch-core schema 1.4.0+,以及支持 function-hook 外挂的 Claude Code 版本。

claude plugin install orch-session@orch-core

它有意作为独立外挂存在,这样 Claude Code 的 hooks-API 变更就不会影响 orch-core 的 guard 和 session-start hooks。开发使用 node --test、claude plugin validate、claude plugin test 和 claude --plugin-dir。

安装

请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。

claude plugin marketplace add severinlindenmann/orch-core
claude plugin install orch-session
原文 / README

orch-session

Shows the orch tickets this session holds, inside Claude Code. Nothing else: no backlog, no queue.

Everything leads with whose move it is, as orch-core says it (move in orch show --json, the dashboard's own rules) and in its design system's colours: pink ● only for your move (answer a question, approve a plan, re-approve a changed gate, do your task, give the verdict), blue ◐ while the agent works, amber ▲ when the ticket is blocked, red ✕ when orch cannot be read. Every status is an icon and a word, never colour alone.

  • Status line: ◐ L-0001 working ● L-0002 Answer Q1, one entry per claimed ticket.
  • Band above the prompt: one row with the move that matters most, yours first: ● L-0002 0/1 Your move: Answer Q1 · Which one?.
  • /orch: a pane with one card per ticket: whose move and what, an open question with its options, the recommended one and the orch answer command to run in your own terminal, every task (doing and blocked first), the epic it belongs to, the last verdict and the PR.
  • Toasts on hand-overs only: your move starts or ends, the ticket is blocked, a verdict, a claim gained or lost.

It only reads: orch list --mine --json with the session's id and orch show <id> --json for each ticket. It refreshes after every orch command the agent runs and every 20 seconds while things change (60 seconds after three quiet polls, 5 minutes where there is no orch workspace), one refresh at a time, without holding up the tool call. A refresh in which any read fails keeps the last complete state and says so in the pane. It never runs a command that writes or that only a human may run; it shows the orch answer command, it does not run it.

What it shows. orch list --mine lists only the claims held by this session's own id, so a fresh claude shows nothing until the agent runs orch claim. Epics cannot be claimed: an epic appears only as "in epic DEMO-0031" on its claimed children, without progress of its own (open it in Mission Control for that). In a folder without an orch workspace, /orch shows a short toast instead of a pane, and the refresh slows to every 5 minutes.

The status line is drawn by Claude Code, which currently styles every plugin status like a warning (⚠ orch-session: ...) and ignores plugin colours there. That is the host's behaviour, so the line is kept short.

The plugin has no rules of its own for whose move it is. An orch that predates move (orch-core schema below 1.4.0) shows "Update orch-core" on each ticket and an amber note in the pane, never a guess.

Install

Needs the orch CLI on the PATH, orch-core with schema 1.4.0 or newer (see orch-core's README, "The CLI in your own terminal"), and a Claude Code build with function-hook plugins (early access; the API may change between releases).

claude plugin install orch-session@orch-core

It is a separate plugin on purpose: if a Claude Code update breaks the hooks API, orch-core's guard and session-start hooks keep working.

Develop

node --test plugins/orch-session/test/*.spec.ts   # the logic, against real orch output; no claude CLI needed
claude plugin validate plugins/orch-session
claude plugin test plugins/orch-session           # the hooks inside the engine
claude --plugin-dir plugins/orch-session          # load it into a session

The fixtures in test/fixtures are real orch-core output. After a change to what orch list or orch show print, make them again (CI also runs the tests against freshly made ones):

uv run --project plugins/orch-core python plugins/orch-session/test/make_fixtures.py plugins/orch-session/test/fixtures

更多类似作品