mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-09 22:48:57 +02:00
hosts/*.ts were ten copies of one file: runtimeRoot byte-identical in 9/10, pathRewrites mechanically derivable from the host name for 7/10, the 11-entry toolRewrites map byte-identical between openclaw and gbrain, and every asset change a 10-file edit (cursor and slate had already fallen out of three other hand-maintained lists). defineHost() owns the defaults; each host file now declares only what makes it different (slate/cursor: 8 lines each). Shared constants: CROSS_MODEL_RESOLVERS, GBRAIN_RESOLVERS, EXEC_STYLE_TOOL_REWRITES. Genuinely-different things stayed explicit: codex/factory $GSTACK_ROOT rewrites, hermes's tool vocabulary, claude's denylist+prefixable install, opencode's wider runtimeRoot. Proof: JSON.stringify(ALL_HOST_CONFIGS) dump-diff before/after EMPTY (and a runtime walk confirmed no function-valued or undefined-keyed fields, so the JSON diff is complete); gen:skill-docs --host all zero-diff; host-config + gen-skill-docs + idempotency suites 485/485. Host files 595 -> 285 lines. docs/ADDING_A_HOST.md teaches the factory pattern. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
41 lines
1.2 KiB
TypeScript
41 lines
1.2 KiB
TypeScript
import { defineHost, CROSS_MODEL_RESOLVERS } from './define-host';
|
|
|
|
const hermes = defineHost({
|
|
name: 'hermes',
|
|
displayName: 'Hermes',
|
|
|
|
generation: {
|
|
generateMetadata: false,
|
|
skipSkills: ['codex'],
|
|
includeSkills: [],
|
|
},
|
|
|
|
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',
|
|
'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: [
|
|
...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.
|
|
],
|
|
|
|
coAuthorTrailer: 'Co-Authored-By: Hermes Agent <agent@nousresearch.com>',
|
|
});
|
|
|
|
export default hermes;
|