使用说明
GG代理线束
从GGV3中提取的便携式代理线束。
包含
packages/gg-core目录/核心分辨率实用程序packages/gg-cli操作员+自动化CLI(gg)mcp-servers/gg-skills用于技能/工作流程的MCP服务器apps/macos-control-surface从旧版GGAS仓库导入的本机macOS控制界面和查看器.agent技能/工作流程/规则/模板以及角色文件和注册表- 利用脚本运行工件、角色路由、运行时奇偶校验、反馈循环、上下文生成和黑曜石日志
macOS控制界面
该线束现在在以下位置承载了一个原生SwiftUI macOS应用程序 apps/macos-control-surface.
无头控制平面:
npm run control-plane:build
npm run control-plane:start
构建它:
npm run macos:control-surface:build
运行它:
npm run macos:control-surface:run
当前范围:
- 该工具现在公开了一个本地无头控制平面服务器,位于
packages/gg-control-plane-server - macOS应用程序是同一HTTP控制平面上的可选客户端
- 协调器运行时选择为
Auto默认情况下,显式Codex,Claude,以及Kimi调度界面中可用的固定 - 集群控制、运行/总线状态、工作树浏览和硬件控制的排队都连接到线束本地服务器中
- 子代理在以下情况下获得专用工作树
.agent/control-plane/worktrees/<runId>/<agentId> - Kimi仍受线束控制:它可以请求委派,但线束拥有生成/终止策略
架构图
- 图表来源: docs/architecture/agentic-harness-logic-loops-diagram.html
- 实时HTML预览: 打开渲染图
- 外部集成图来源: docs/体系结构/代理-外部集成-体系结构.md
- 外部集成图来源: docs/architecture/agentic-harnees-external integration-digram.html
- 外部集成实时预览: 打开渲染的集成图
优先整合浪潮(当前计划)
- PRD更新: docs/prd/prd-GG-CLI-PORTABLE-HARNESS.md
- 行动计划: docs/plans/2026-03-08优先级集成-行动计划.md
- 建筑合同: docs/体系结构/代理-外部集成-体系结构.md
- 附加组件评估: docs/评估/2026-03-08-网络评估.md
安装
git clone https://github.com/Geargrindadmin/gg-agentic-harness.git
cd gg-agentic-harness
npm install
npm run build
uv tool install --python python3.13 codegraphcontext
npm run harness:runtime:activate
笔记:
CodeGraphContext是可选的,但实时图形支持的上下文需要主机cgcCLI。- 此计算机上已验证的安装路径:
uv tool install --python python3.13 codegraphcontext. - 使用Python
3.10+至少。在macOS上,更喜欢Python3.12+所以CodeGraphContext可以干净地使用其默认的本地数据库路径。 - 之后重新启动Codex
npm run harness:runtime:activate因此,回购范围的MCP更改被加载到活动会话中。 - 协调员
Auto优先选择经过身份验证的本地CLI,然后使用提供商支持的回退GG_COORDINATOR_PREFERENCE=codex,claude,kimi除非被推翻。
远程安装到项目中(一个命令)
bash <(curl -fsSL https://raw.githubusercontent.com/Geargrindadmin/gg-agentic-harness/main/scripts/install-from-github.sh) /absolute/path/to/target-repo symlink
论据:
- arg1:目标存储库路径(默认为当前目录)
- arg2:模式
symlink|copy(默认为symlink)
验证
npm run harness:runtime:status
npm run gg -- --json doctor
npm run harness:runtime-parity
npm run harness:persona:audit
npm run harness:persona:benchmark
npm run gg -- --json workflow run prompt-improver "inspect agent routing" --context-source prefer
将引导程序移植到另一个仓库
npm run gg -- portable init /absolute/path/to/target-repo --mode symlink
npm run gg -- --project-root /absolute/path/to/target-repo runtime activate /absolute/path/to/target-repo --runtime codex
npm run gg -- portable verify /absolute/path/to/target-repo --runtime structure
或本地安装程序脚本:
./scripts/install-from-github.sh /absolute/path/to/target-repo symlink
关键命令
npm run gg -- skills list
npm run gg -- workflow list
npm run gg -- workflow run go "ship auth hardening" --prompt-improver auto
npm run gg -- workflow run paperclip-extracted "objective"
npm run gg -- workflow run prompt-improver "fix the login bug"
npm run gg -- workflow run symphony-lite "task" --validate none
npm run gg -- workflow run visual-explainer "subject" --mode diff-review --evidence .agent/runs/latest.json
npm run gg -- workflow run full-doc-update "task summary"
npm run gg -- workflow run hydra-sidecar "evaluate auth hardening route" --hydra-mode shadow --internet-evidence "OWASP ASVS 2025-01-15,https://owasp.org/www-project-application-security-verification-standard/"
npm run gg -- workflow show network-ai-pilot
npm run harness:runtime:status
npm run harness:runtime:activate
npm run control-plane:start
npm run harness:persona:audit
npm run harness:persona:benchmark
npm run harness:runtime-parity
node scripts/persona-registry-resolve.mjs --prompt "ship auth hardening" --classification TASK --json
运行时激活
该工具与模型无关,但某些运行时需要对回购范围的MCP进行主机级激活。在Codex中, gg-skills 和 filesystem 是项目范围,必须在中激活 ~/.codex.
npm run harness:runtime:activate
npm run harness:runtime:status
您可以明确地以运行时为目标:
node scripts/runtime-project-sync.mjs activate . --runtime codex
node scripts/runtime-project-sync.mjs status . --runtime codex
可通过运行时适配器从源线束CLI激活可移植目标:
node packages/gg-cli/dist/index.js --project-root /absolute/path/to/target-repo runtime activate /absolute/path/to/target-repo --runtime codex
协调员选择
协调员可以通过两种方式选择:
Auto(推荐):该线束按优先级顺序从经过身份验证的运行时中选择协调器。Pinned:操作员选择codex,claude,或kimi.
选择政策:
GG_COORDINATOR_RUNTIME=<codex|claude|kimi>硬固定无头/服务器启动的协调器。- 否则,线束将使用
GG_COORDINATOR_PREFERENCE,默认值codex,claude,kimi. - 该线束更喜欢具有经过身份验证的本地CLI会话的运行时。
- 如果没有可用的本地CLI会话,它将回退到支持的经过身份验证的提供程序凭据。
- 无论选择何种协调器,子代理都将保持线束管理。
身份验证发现顺序:
codex:~/.codex/auth.json->OPENAI_API_KEYclaude:~/.claude/.credentials.json->~/.local/share/opencode/auth.json->ANTHROPIC_API_KEYkimi:~/.kimi/credentials/kimi-code.json->~/.kimi/config.toml->MOONSHOT_API_KEY|KIMI_API_KEY
