Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions hub/src/overseer/brainClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* `BrainUnavailableError` so callers can degrade gracefully instead of erroring.
*/

import type { OverseerConverseFocus } from '@hapi/protocol'

export type BrainConfig = {
/** Base URL including the `/v1` suffix. */
baseUrl: string
Expand Down Expand Up @@ -44,6 +46,9 @@ export type OverseerOpenAiToolLike = {
export type BrainErrorKind = 'unreachable' | 'timeout' | 'http' | 'protocol'

export class BrainUnavailableError extends Error {
/** Latest hub focus when the converse loop fails after successful tool resolves. */
converseFocus: OverseerConverseFocus | null | undefined

constructor(
message: string,
readonly kind: BrainErrorKind = 'unreachable',
Expand Down
Loading
Loading