mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-20 23:23:26 +01:00
The Agent-tool rewrite for hermes, gbrain, openclaw and factory keyed only on "use the Agent tool", but templates mostly say "via the Agent tool", "with the Agent tool", "multiple Agent tool calls" or "Use the Agent tool", so the Claude tool name leaked into those hosts' skills and sections. Add ordered rules after the existing key (possessive, "the Agent tool", then bare "Agent tool") mapping to sessions_spawn (gbrain/openclaw), delegate_task (hermes) and delegation (factory). No goldens change. Adopts #1935 (rewritten on current main, without the new goldens). Co-authored-by: katlun-lgtm <264247399+katlun-lgtm@users.noreply.github.com> Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
57 lines
2.1 KiB
TypeScript
57 lines
2.1 KiB
TypeScript
import { defineHost, CROSS_MODEL_RESOLVERS, preambleToolGlossary } from './define-host';
|
|
|
|
const hermes = defineHost({
|
|
name: 'hermes',
|
|
displayName: 'Hermes',
|
|
tier: 'instruction-only',
|
|
capabilities: { toolExecution: true, questions: 'native', planMode: false, delegation: true, browser: true, safetyHooks: 'advisory' },
|
|
|
|
// Hermes indexes skills by frontmatter name, first match wins (#2825).
|
|
frontmatter: {
|
|
mode: 'allowlist',
|
|
keepFields: ['name', 'description'],
|
|
descriptionLimit: null,
|
|
nameMatchesDirectory: true,
|
|
},
|
|
|
|
extraPathRewrites: [
|
|
{ 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',
|
|
"Claude Code's Agent tool": 'delegate_task',
|
|
'the Agent tool': 'delegate_task',
|
|
'Agent tool': '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',
|
|
// #2015: Hermes asks through clarify.
|
|
...preambleToolGlossary('**Hermes tool names:** `AskUserQuestion` means your `clarify` tool (one question per call, options as choices); there is no `mcp__*__AskUserQuestion` variant.'),
|
|
},
|
|
|
|
suppressedResolvers: [
|
|
...CROSS_MODEL_RESOLVERS,
|
|
// GBRAIN_CONTEXT_LOAD and GBRAIN_SAVE_RESULTS are NOT suppressed.
|
|
// The resolvers handle GBrain-not-installed gracefully ("proceed without brain context").
|
|
// If Hermes has GBrain as a mod, brain features activate automatically.
|
|
],
|
|
|
|
// No full install arm — users can hand-copy the instruction-only digest
|
|
// (setup's explainer arm prints this path; never auto-copied).
|
|
install: {
|
|
linkingStrategy: 'symlink-generated',
|
|
instructionTier: { rulesFile: 'agents-digest/gstack-AGENTS.md' },
|
|
},
|
|
|
|
coAuthorTrailer: 'Co-Authored-By: Hermes Agent <agent@nousresearch.com>',
|
|
});
|
|
|
|
export default hermes;
|