gstack/hosts
Garry Tan 408ee77cde
refactor(hosts): defineHost() factory — 10 copy-paste host files become declarations
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>
2026-08-14 21:12:21 -07:00
..
claude/hooks v1.61.0.0 fix wave: guards failing open / silent failures (9 fixes, 4 community PRs absorbed) (#2472) 2026-08-08 09:28:45 -07:00
claude.ts refactor(hosts): defineHost() factory — 10 copy-paste host files become declarations 2026-08-14 21:12:21 -07:00
codex.ts refactor(hosts): defineHost() factory — 10 copy-paste host files become declarations 2026-08-14 21:12:21 -07:00
cursor.ts refactor(hosts): defineHost() factory — 10 copy-paste host files become declarations 2026-08-14 21:12:21 -07:00
define-host.ts refactor(hosts): defineHost() factory — 10 copy-paste host files become declarations 2026-08-14 21:12:21 -07:00
factory.ts refactor(hosts): defineHost() factory — 10 copy-paste host files become declarations 2026-08-14 21:12:21 -07:00
gbrain.ts refactor(hosts): defineHost() factory — 10 copy-paste host files become declarations 2026-08-14 21:12:21 -07:00
hermes.ts refactor(hosts): defineHost() factory — 10 copy-paste host files become declarations 2026-08-14 21:12:21 -07:00
index.ts feat: Confusion Protocol, Hermes + GBrain hosts, brain-first resolver (v0.18.0.0) (#1005) 2026-04-16 10:41:38 -07:00
kiro.ts refactor(hosts): defineHost() factory — 10 copy-paste host files become declarations 2026-08-14 21:12:21 -07:00
openclaw.ts refactor(hosts): defineHost() factory — 10 copy-paste host files become declarations 2026-08-14 21:12:21 -07:00
opencode.ts refactor(hosts): defineHost() factory — 10 copy-paste host files become declarations 2026-08-14 21:12:21 -07:00
slate.ts refactor(hosts): defineHost() factory — 10 copy-paste host files become declarations 2026-08-14 21:12:21 -07:00