mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-10 13:31:38 +00:00
opentui(harden): configurable RPC timeout
Read HERMES_TUI_RPC_TIMEOUT_MS for the JSON-RPC request timeout (floor 5s, default 120s) — Ink parity, env-tunable for slow handlers.
This commit is contained in:
parent
28a2f95631
commit
9e81be7228
1 changed files with 4 additions and 1 deletions
|
|
@ -38,7 +38,10 @@ export interface RawClientOptions {
|
|||
readonly onExit?: (reason: string) => void
|
||||
}
|
||||
|
||||
const REQUEST_TIMEOUT_MS = 120_000
|
||||
const REQUEST_TIMEOUT_MS = (() => {
|
||||
const raw = Number.parseInt(process.env.HERMES_TUI_RPC_TIMEOUT_MS ?? '', 10)
|
||||
return Number.isFinite(raw) && raw > 0 ? Math.max(5000, raw) : 120_000
|
||||
})()
|
||||
|
||||
export class RawGatewayClient {
|
||||
private proc: ReturnType<typeof Bun.spawn> | null = null
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue