Files
hermes-agent/web/tsconfig.app.json
alt-glitch ab334f6fdd refactor(tui): move the gateway client into @hermes/shared so other clients skip Ink's source
A third-party Node frontend had to compile ui-tui's private source to talk to the gateway:
gatewayClient.ts, canonicalGateway.ts, gatewayTypes.ts and the slash, history and provider
helpers beside them. hermes-tern bundles 36 such imports through a `.hermes-src` alias.

The renderer-free client now lives in apps/shared:

- src/node/gateway-client.ts: transport, ticketed dial, runtime.describe, the session.create
  contract, reconnect and bounded owner recovery, typed request/events (Node-only).
- src/gateway-canonical.ts, src/gateway-types.ts, src/gateway-text.ts: the hermes-gateway-v1
  request/result translation, the typed results (SessionInfo and SlashCategory with them) and
  the client's English text, keyed by Ink's catalog keys.
- src/slash-input.ts, slash-score.ts, provider-names.ts, interpolation.ts, circular-buffer.ts and
  src/node/prompt-history.ts: helpers with no Ink or React import, moved as they were.

Everything Ink-specific became a constructor option that Ink's own GatewayClient
(ui-tui/src/gatewayClient.ts) passes exactly as before: `connect` (its gateway_bootstrap.py
helper), the terminal-failure predicate, HERMES_TUI_GATEWAY_URL / _SIDECAR_URL, the startup and
RPC timeouts, the launch tool-progress pin, the crash-log breadcrumbs, its i18n `t`, and undici
as the WebSocket when the runtime has none. The launcher's env parsing stays in Ink
(launchOptions.ts). Node-only modules sit in src/node, which the web app's typecheck excludes;
the package typechecks src and src/node with separate configs, and boundary.test.ts fails if
its program ever includes another workspace's file. apps/shared now runs its tests in `check`.
2026-11-06 11:14:34 -05:00

39 lines
1.1 KiB
JSON

{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"target": "ES2023",
"useDefineForClassFields": true,
"lib": ["ES2023", "DOM", "DOM.Iterable"],
"module": "ESNext",
"types": ["vite/client"],
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"moduleDetection": "force",
"noEmit": true,
"jsx": "react-jsx",
/* Path aliases */
"paths": {
"@/*": ["./src/*"],
"@hermes/shared": ["../apps/shared/src/index.ts"],
"@hermes/shared/ansi": ["../apps/shared/src/ansi.ts"],
"@hermes/shared/i18n": ["../apps/shared/src/i18n.ts"]
},
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"erasableSyntaxOnly": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true
},
"include": ["src", "../apps/shared/src"],
// Node-only shared modules (the gateway client); this browser app never imports them.
"exclude": ["../apps/shared/src/node"]
}