hermes-agent/docs
alt-glitch 9d05f3721d refactor(tui): fetch tree-sitter grammars at runtime instead of vendoring
The OpenTUI engine vendored 10 tree-sitter grammars (.wasm + .scm) under
ui-opentui/parsers/ — ~37k checked-in binary lines, the single biggest
addition in the engine diff. opencode (the production reference) vendors
none: it declares grammars as remote URLs and lets OpenTUI fetch + cache
them. OpenTUI supports this natively via TreeSitterClient's dataPath cache.

Migrate to that model:
- parsers.manifest.json (now under src/boundary/) becomes the URL source of
  truth: each grammar is { filetype, aliases, wasm: <release URL>,
  highlights: <.scm URL> }. Grammar versions stay pinned (same release tags);
  .scm sources follow opencode's per-language choices (parser-repo queries
  for python/html where nvim-treesitter's are parser-incompatible).
- parsers.ts: registerVendoredParsers -> registerRemoteParsers. It points the
  global tree-sitter client's cache at HERMES_TUI_PARSER_CACHE via setDataPath
  BEFORE the client initializes, then addDefaultParsers() with the URL configs.
  Registration does zero network; the fetch is lazy on first use of a language
  and degrades to plain text (never throws) when GitHub is unreachable.
- hermes_cli/main.py sets HERMES_TUI_PARSER_CACHE to
  ~/.hermes/cache/opentui-parsers/ (profile-aware via get_hermes_home).
- git rm -r ui-opentui/parsers/ and drop scripts/update-parsers.mjs.
- parsers.test.tsx asserts URL configs are well-formed + cache-dir behavior
  instead of vendored-file existence.

Verified end-to-end on Node 26.3: type-check + lint clean, full ui-opentui
suite (821 tests) green, and a built smoke proves first-use fetch -> cache ->
10 real highlights, cache-hit on rerun, and graceful plain-text degrade when
the grammar URLs are unreachable.
2026-06-16 19:12:21 +05:30
..
design docs(profile): update clone-from references 2026-06-13 07:33:58 -07:00
kanban feat(kanban): gate notifier watcher on dispatch_in_gateway 2026-06-01 20:30:24 -07:00
middleware fix(middleware): preserve translated downstream failures 2026-06-06 09:26:18 -07:00
observability feat(observability): observer-grade telemetry hooks + NeMo-Relay plugin 2026-06-03 06:36:46 -07:00
plans opentui(v6): credits/usage notice chrome banner (Ink parity) 2026-06-14 12:56:21 +05:30
security docs(security): add network egress isolation guide for Docker deployments (#26385) 2026-05-29 14:09:10 +10:00
hermes-kanban-v1-spec.pdf feat(kanban): durable multi-profile collaboration board (#17805) 2026-04-30 13:36:47 -07:00
ink-env-flags.md tui(diag): Ink 1Hz memwatch collector — OpenTUI-compatible memory trace 2026-06-15 15:58:02 +05:30
opentui-dev-handoff.md docs(opentui): point bench references at the tui-bench repo 2026-06-14 10:56:08 +05:30
opentui-env-flags.md tui(diag): Ink 1Hz memwatch collector — OpenTUI-compatible memory trace 2026-06-15 15:58:02 +05:30
opentui-memory-story.md docs(opentui): point bench references at the tui-bench repo 2026-06-14 10:56:08 +05:30
opentui-native-engine.md refactor(tui): fetch tree-sitter grammars at runtime instead of vendoring 2026-06-16 19:12:21 +05:30
opentui-upstream-alignment.md docs: OpenTUI dev handoff — base operating manual for continuing memory+UX on the canonical branch 2026-06-13 18:43:30 +05:30
rca-ssl-cacert-post-git-pull.md fix(ssl): align guard docs and escape hatch 2026-06-13 21:14:32 -07:00