Skip to main content
Glama
aquaherd
by aquaherd

goose-herdr

一个用于 Herdrgoose 集成 —— 终端 工作区管理器,专为 AI 编码代理设计。

该仓库提供两个互补的组件:

组件

方向

功能

goose_herdr MCP 扩展

goose → Herdr

herdr CLI 作为一等 goose 工具暴露:检查工作区/标签页/窗格/代理、创建布局、运行命令、读取输出、等待状态。

agent-state/ 钩子插件

goose → Herdr

向托管 goose 会话的 Herdr 窗格报告 goose 的生命周期状态(working / idle),使 Herdr 侧边栏正确显示 goose 状态。

两个方向均为 "goose → Herdr"。Herdr 本身无需代码修改:它通过前台进程检测代理,并暴露一个本地 socket 和 CLI。


前置条件

  • 已安装 goose

  • 已安装 Herdr 并位于 PATH 中(或设置了 HERDR_BIN_PATH),且 Herdr 服务器正在运行。

MCP 扩展可从任何能访问 Herdr 服务器的 shell 中工作。状态报告钩子仅在 goose 自身运行于 Herdr 管理的窗格中(HERDR_ENV=1)时激活。


Related MCP server: Terminal MCP Server

安装 MCP 扩展

goose 扩展是 MCP 服务器。该包暴露了一个 herdr-mcp 控制台脚本。

选项 A — 配置文件(持久化)

~/.config/goose/config.yamlextensions 下添加一个条目:

extensions:
  herdr:
    name: Herdr
    cmd: uvx
    args: ["--from", "git+https://github.com/aquaherd/goose-herdr", "herdr-mcp"]
    enabled: true
    envs: {}
    type: stdio
    timeout: 300

一旦包发布到 PyPI,你可以使用更简短的形式:

    args: ["--from", "goose-herdr", "herdr-mcp"]

选项 B — 交互式 CLI

goose configure

选择 添加扩展 → 命令行扩展,然后输入:

uvx --from git+https://github.com/aquaherd/goose-herdr herdr-mcp

选项 C — 一次性会话(不安装)

goose session --with-extension "uvx --from git+https://github.com/aquaherd/goose-herdr herdr-mcp"

选项 D — 本地开发安装

git clone https://github.com/aquaherd/goose-herdr
cd goose-herdr
uv pip install -e .          # or: pip install -e .

然后使用 cmd: herdr-mcp(以及空的 args)注册扩展:

extensions:
  herdr:
    name: Herdr
    cmd: herdr-mcp
    args: []
    enabled: true
    envs: {}
    type: stdio
    timeout: 300

安装状态报告钩子

agent-state/ 目录复制到 goose 插件位置,例如:

mkdir -p ~/.agents/plugins/goose-herdr-agent-state
cp -r agent-state/plugin.json agent-state/hooks agent-state/scripts \
  ~/.agents/plugins/goose-herdr-agent-state/
chmod +x ~/.agents/plugins/goose-herdr-agent-state/scripts/report-state.sh

该钩子在 SessionStart/PreToolUse 时报告 working,在 Stop 时报告 idle,在 SessionEnd 时释放代理。除非设置了 HERDR_ENV=1HERDR_PANE_ID(即 goose 运行在 Herdr 窗格中),否则它什么也不做。


工具

扩展注册了 herdr_* 工具。只读工具可以随时安全调用;其余工具各执行一个 Herdr 操作。

组别

工具

状态 / 会话

herdr_status, herdr_session_list, herdr_help

工作区

herdr_workspace_list, _get, _create, _focus, _rename, _close

标签页

herdr_tab_list, _get, _create, _focus, _rename, _close

窗格

herdr_pane_list, _current, _get, _split, _read, _run, _send_text, _send_keys, _wait_output, _rename, _focus, _close

代理

herdr_agent_list, _get, _read, _prompt, _send_keys, _rename, _focus, _wait, _start

Herdr 使用的代理状态:idle, working, blocked, done, unknown


开发

uv venv .venv
uv pip install --python .venv/bin/python -e .
.venv/bin/herdr-mcp      # starts the MCP server over stdio

该包使用官方的 mcp Python SDK(>= 2.0),并封装了 herdr CLI 而非直接使用原始 socket 协议。

A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.

  • Connect agents to 6DuckLearn memory, approvals, and runtime control.

  • Manage SRG+ hubs, channels, content, assets, users, and workspaces from any MCP-aware AI agent.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aquaherd/goose-herdr'

If you have feedback or need assistance with the MCP directory API, please join our Discord server