feat: add Hermes and GBrain host configs

Hermes: tool rewrites for terminal/read_file/patch/delegate_task,
paths to ~/.hermes/skills/gstack, AGENTS.md config file.

GBrain: coding skills become brain-aware when GBrain mod is installed.
Same tool rewrites as OpenClaw (agents spawn Claude Code via ACP).
GBRAIN_CONTEXT_LOAD and GBRAIN_SAVE_RESULTS NOT suppressed on gbrain
host, enabling brain-first lookup and save-to-brain behavior.

Both registered in hosts/index.ts with setup script redirect messages.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-04-14 10:52:20 -07:00
parent 76f50c1843
commit cad96d086d
5 changed files with 174 additions and 3 deletions
+2
View File
@@ -13,6 +13,8 @@ bin/gstack-global-discover
.slate/
.cursor/
.openclaw/
.hermes/
.gbrain/
.context/
extension/.auth.json
.gstack-worktrees/
+73
View File
@@ -0,0 +1,73 @@
import type { HostConfig } from '../scripts/host-config';
const gbrain: HostConfig = {
name: 'gbrain',
displayName: 'GBrain',
cliCommand: 'gbrain',
cliAliases: [],
globalRoot: '.gbrain/skills/gstack',
localSkillRoot: '.gbrain/skills/gstack',
hostSubdir: '.gbrain',
usesEnvVars: true,
frontmatter: {
mode: 'allowlist',
keepFields: ['name', 'description'],
descriptionLimit: null,
},
generation: {
generateMetadata: false,
skipSkills: ['codex'],
includeSkills: [],
},
pathRewrites: [
{ from: '~/.claude/skills/gstack', to: '~/.gbrain/skills/gstack' },
{ from: '.claude/skills/gstack', to: '.gbrain/skills/gstack' },
{ from: '.claude/skills', to: '.gbrain/skills' },
{ from: 'CLAUDE.md', to: 'AGENTS.md' },
],
toolRewrites: {
'use the Bash tool': 'use the exec tool',
'use the Write tool': 'use the write tool',
'use the Read tool': 'use the read tool',
'use the Edit tool': 'use the edit tool',
'use the Agent tool': 'use sessions_spawn',
'use the Grep tool': 'search for',
'use the Glob tool': 'find files matching',
'the Bash tool': 'the exec tool',
'the Read tool': 'the read tool',
'the Write tool': 'the write tool',
'the Edit tool': 'the edit tool',
},
// GBrain gets brain-aware resolvers. All other hosts suppress these.
suppressedResolvers: [
'DESIGN_OUTSIDE_VOICES',
'ADVERSARIAL_STEP',
'CODEX_SECOND_OPINION',
'CODEX_PLAN_REVIEW',
'REVIEW_ARMY',
// NOTE: GBRAIN_CONTEXT_LOAD and GBRAIN_SAVE_RESULTS are NOT suppressed here.
// GBrain is the only host that gets brain-first lookup and save-to-brain behavior.
],
runtimeRoot: {
globalSymlinks: ['bin', 'browse/dist', 'browse/bin', 'gstack-upgrade', 'ETHOS.md'],
globalFiles: {
'review': ['checklist.md', 'TODOS-format.md'],
},
},
install: {
prefixable: false,
linkingStrategy: 'symlink-generated',
},
coAuthorTrailer: 'Co-Authored-By: GBrain Agent <agent@gbrain.dev>',
learningsMode: 'basic',
};
export default gbrain;
+72
View File
@@ -0,0 +1,72 @@
import type { HostConfig } from '../scripts/host-config';
const hermes: HostConfig = {
name: 'hermes',
displayName: 'Hermes',
cliCommand: 'hermes',
cliAliases: [],
globalRoot: '.hermes/skills/gstack',
localSkillRoot: '.hermes/skills/gstack',
hostSubdir: '.hermes',
usesEnvVars: true,
frontmatter: {
mode: 'allowlist',
keepFields: ['name', 'description'],
descriptionLimit: null,
},
generation: {
generateMetadata: false,
skipSkills: ['codex'],
includeSkills: [],
},
pathRewrites: [
{ from: '~/.claude/skills/gstack', to: '~/.hermes/skills/gstack' },
{ from: '.claude/skills/gstack', to: '.hermes/skills/gstack' },
{ from: '.claude/skills', to: '.hermes/skills' },
{ from: 'CLAUDE.md', to: 'AGENTS.md' },
],
toolRewrites: {
'use the Bash tool': 'use the terminal tool',
'use the Write tool': 'use the patch tool',
'use the Read tool': 'use the read_file tool',
'use the Edit tool': 'use the patch tool',
'use the Agent tool': 'use delegate_task',
'use the Grep tool': 'search for',
'use the Glob tool': 'find files matching',
'the Bash tool': 'the terminal tool',
'the Read tool': 'the read_file tool',
'the Write tool': 'the patch tool',
'the Edit tool': 'the patch tool',
},
suppressedResolvers: [
'DESIGN_OUTSIDE_VOICES',
'ADVERSARIAL_STEP',
'CODEX_SECOND_OPINION',
'CODEX_PLAN_REVIEW',
'REVIEW_ARMY',
'GBRAIN_CONTEXT_LOAD',
'GBRAIN_SAVE_RESULTS',
],
runtimeRoot: {
globalSymlinks: ['bin', 'browse/dist', 'browse/bin', 'gstack-upgrade', 'ETHOS.md'],
globalFiles: {
'review': ['checklist.md', 'TODOS-format.md'],
},
},
install: {
prefixable: false,
linkingStrategy: 'symlink-generated',
},
coAuthorTrailer: 'Co-Authored-By: Hermes Agent <agent@nousresearch.com>',
learningsMode: 'basic',
};
export default hermes;
+4 -2
View File
@@ -14,9 +14,11 @@ import opencode from './opencode';
import slate from './slate';
import cursor from './cursor';
import openclaw from './openclaw';
import hermes from './hermes';
import gbrain from './gbrain';
/** All registered host configs. Add new hosts here. */
export const ALL_HOST_CONFIGS: HostConfig[] = [claude, codex, factory, kiro, opencode, slate, cursor, openclaw];
export const ALL_HOST_CONFIGS: HostConfig[] = [claude, codex, factory, kiro, opencode, slate, cursor, openclaw, hermes, gbrain];
/** Map from host name to config. */
export const HOST_CONFIG_MAP: Record<string, HostConfig> = Object.fromEntries(
@@ -63,4 +65,4 @@ export function getExternalHosts(): HostConfig[] {
}
// Re-export individual configs for direct import
export { claude, codex, factory, kiro, opencode, slate, cursor, openclaw };
export { claude, codex, factory, kiro, opencode, slate, cursor, openclaw, hermes, gbrain };
+23 -1
View File
@@ -67,7 +67,29 @@ case "$HOST" in
echo " 3. See docs/OPENCLAW.md for the full architecture"
echo ""
exit 0 ;;
*) echo "Unknown --host value: $HOST (expected claude, codex, kiro, factory, openclaw, or auto)" >&2; exit 1 ;;
hermes)
echo ""
echo "Hermes integration uses the same model as OpenClaw — Hermes spawns"
echo "Claude Code sessions, and gstack provides methodology artifacts."
echo ""
echo "To integrate gstack with Hermes:"
echo " 1. Tell your Hermes agent: 'install gstack for hermes'"
echo " 2. Or generate artifacts: bun run gen:skill-docs --host hermes"
echo ""
exit 0 ;;
gbrain)
echo ""
echo "GBrain is a mod for gstack — it makes coding skills brain-aware."
echo "GBrain generates brain-enhanced skill variants that search your brain"
echo "for context before starting and save results after finishing."
echo ""
echo "To generate brain-aware skills:"
echo " bun run gen:skill-docs --host gbrain"
echo ""
echo "GBrain setup and brain skills ship from the GBrain repo."
echo ""
exit 0 ;;
*) echo "Unknown --host value: $HOST (expected claude, codex, kiro, factory, openclaw, hermes, gbrain, or auto)" >&2; exit 1 ;;
esac
# ─── Resolve skill prefix preference ─────────────────────────