Skip to content

Documentation / @agentick/gateway / HTTPTransportConfig

Interface: HTTPTransportConfig ​

Defined in: gateway/src/http-transport.ts:153

Transport configuration for network-bound transports (WS, HTTP).

Extends ​

Properties ​

auth? ​

optional auth: AuthConfig

Defined in: gateway/src/transport.ts:68

Authentication configuration

Inherited from ​

NetworkTransportConfig.auth


corsOrigin? ​

optional corsOrigin: string

Defined in: gateway/src/http-transport.ts:155

CORS origin (default: "*")


host ​

host: string

Defined in: gateway/src/transport.ts:82

Host to bind to

Inherited from ​

NetworkTransportConfig.host


onAbort()? ​

optional onAbort: (sessionId, reason?) => Promise<void>

Defined in: gateway/src/http-transport.ts:183

Abort session handler

Parameters ​

sessionId ​

string

reason? ​

string

Returns ​

Promise<void>


onAuthenticated()? ​

optional onAuthenticated: (client) => void

Defined in: gateway/src/transport.ts:71

Called after a client successfully authenticates. Gateway uses this to send ConnectedMessage.

Parameters ​

client ​

TransportClient

Returns ​

void

Inherited from ​

NetworkTransportConfig.onAuthenticated


onDirectSend()? ​

optional onDirectSend: (sessionId, input, opts?) => AsyncIterable<{ data?: unknown; type: string; }>

Defined in: gateway/src/http-transport.ts:162

Direct send handler for streaming response. Accepts SendInput (messages array) — the standard client format.

Parameters ​

sessionId ​

string

input ​
messages? ​

Message[]

metadata? ​

Record<string, unknown>

opts? ​
excludeClientId? ​

string

Returns ​

AsyncIterable<{ data?: unknown; type: string; }>


onInvoke()? ​

optional onInvoke: (method, params, user?) => Promise<unknown>

Defined in: gateway/src/http-transport.ts:169

Method invocation handler

Parameters ​

method ​

string

params ​

Record<string, unknown>

user? ​

UserContext

Returns ​

Promise<unknown>


onRouteMatch()? ​

optional onRouteMatch: (path, req, res) => boolean | Promise<boolean>

Defined in: gateway/src/http-transport.ts:187

Plugin route matcher — called before built-in routes. Returns true if the route was handled.

Parameters ​

path ​

string

req ​

IncomingMessage

res ​

ServerResponse

Returns ​

boolean | Promise<boolean>


onToolResponse()? ​

optional onToolResponse: (sessionId, toolUseId, result) => Promise<void>

Defined in: gateway/src/http-transport.ts:176

Tool confirmation response handler

Parameters ​

sessionId ​

string

toolUseId ​

string

result ​

ToolConfirmationResponse

Returns ​

Promise<void>


pathPrefix? ​

optional pathPrefix: string

Defined in: gateway/src/http-transport.ts:158

Path prefix for all endpoints (default: "")


port ​

port: number

Defined in: gateway/src/transport.ts:79

Port to listen on

Inherited from ​

NetworkTransportConfig.port

Released under the ISC License.