<!--
 ⚠️  AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
 This file is automatically generated by scripts/docs-generator.js
 To make changes, edit the source TypeScript files or update the generator script
-->

[remote](../) / Exports

# remote

## Table of contents

### Classes

- [HttpClient](classes/HttpClient)
- [RemoteExecutor](classes/RemoteExecutor)
- [WebSocketTransport](classes/WebSocketTransport)

### Interfaces

- [IAssistantMessage](interfaces/IAssistantMessage)
- [IChatExecutionRequest](interfaces/IChatExecutionRequest)
- [IStreamExecutionRequest](interfaces/IStreamExecutionRequest)
- [IExecutor](interfaces/IExecutor)
- [IRemoteExecutorConfig](interfaces/IRemoteExecutorConfig)
- [IHttpRequest](interfaces/IHttpRequest)
- [IHttpResponse](interfaces/IHttpResponse)
- [IHttpError](interfaces/IHttpError)
- [IBasicMessage](interfaces/IBasicMessage)
- [IRequestMessage](interfaces/IRequestMessage)
- [IResponseMessage](interfaces/IResponseMessage)
- [ITokenUsage](interfaces/ITokenUsage)

### Type Aliases

- [TUniversalMessage](#tuniversalmessage)
- [THttpMethod](#thttpmethod)

### Functions

- [toRequestMessage](#torequestmessage)
- [toResponseMessage](#toresponsemessage)
- [createHttpRequest](#createhttprequest)
- [createHttpResponse](#createhttpresponse)
- [extractContent](#extractcontent)
- [generateId](#generateid)
- [normalizeHeaders](#normalizeheaders)
- [safeJsonParse](#safejsonparse)

## Type Aliases

### TUniversalMessage

Ƭ **TUniversalMessage**: `IUserMessage` \| [`IAssistantMessage`](interfaces/IAssistantMessage) \| `ISystemMessage` \| `IToolMessage`

Universal message union used across the SDK as the canonical contract.

#### Defined in

agents/dist/node/index.d.ts:128

---

### THttpMethod

Ƭ **THttpMethod**: `"GET"` \| `"POST"` \| `"PUT"` \| `"DELETE"`

#### Defined in

[remote/src/types/http-types.ts:10](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/remote/src/types/http-types.ts#L10)

## Functions

### toRequestMessage

▸ **toRequestMessage**\<`TUniversalMessage`\>(`message`, `provider`, `model`): [`IRequestMessage`](interfaces/IRequestMessage)

Transform basic message to request message

#### Type parameters

| Name                | Type                                                |
| :------------------ | :-------------------------------------------------- |
| `TUniversalMessage` | extends [`IBasicMessage`](interfaces/IBasicMessage) |

#### Parameters

| Name       | Type                |
| :--------- | :------------------ |
| `message`  | `TUniversalMessage` |
| `provider` | `string`            |
| `model`    | `string`            |

#### Returns

[`IRequestMessage`](interfaces/IRequestMessage)

#### Defined in

[remote/src/utils/transformers.ts:15](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/remote/src/utils/transformers.ts#L15)

---

### toResponseMessage

▸ **toResponseMessage**\<`TUniversalMessage`\>(`message`, `provider?`, `model?`): [`IResponseMessage`](interfaces/IResponseMessage)

Transform basic message to response message

#### Type parameters

| Name                | Type                                                |
| :------------------ | :-------------------------------------------------- |
| `TUniversalMessage` | extends [`IBasicMessage`](interfaces/IBasicMessage) |

#### Parameters

| Name        | Type                |
| :---------- | :------------------ |
| `message`   | `TUniversalMessage` |
| `provider?` | `string`            |
| `model?`    | `string`            |

#### Returns

[`IResponseMessage`](interfaces/IResponseMessage)

#### Defined in

[remote/src/utils/transformers.ts:31](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/remote/src/utils/transformers.ts#L31)

---

### createHttpRequest

▸ **createHttpRequest**\<`TData`\>(`id`, `url`, `method`, `data?`, `headers?`): [`IHttpRequest`](interfaces/IHttpRequest)\<`TData`\>

Create HTTP request with type safety

#### Type parameters

| Name    |
| :------ |
| `TData` |

#### Parameters

| Name      | Type                           |
| :-------- | :----------------------------- |
| `id`      | `string`                       |
| `url`     | `string`                       |
| `method`  | [`THttpMethod`](#thttpmethod)  |
| `data?`   | `TData`                        |
| `headers` | `Record`\<`string`, `string`\> |

#### Returns

[`IHttpRequest`](interfaces/IHttpRequest)\<`TData`\>

#### Defined in

[remote/src/utils/transformers.ts:62](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/remote/src/utils/transformers.ts#L62)

---

### createHttpResponse

▸ **createHttpResponse**\<`TData`\>(`id`, `status`, `data`, `headers?`): [`IHttpResponse`](interfaces/IHttpResponse)\<`TData`\>

Create HTTP response with type safety

#### Type parameters

| Name    |
| :------ |
| `TData` |

#### Parameters

| Name      | Type                           |
| :-------- | :----------------------------- |
| `id`      | `string`                       |
| `status`  | `number`                       |
| `data`    | `TData`                        |
| `headers` | `Record`\<`string`, `string`\> |

#### Returns

[`IHttpResponse`](interfaces/IHttpResponse)\<`TData`\>

#### Defined in

[remote/src/utils/transformers.ts:89](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/remote/src/utils/transformers.ts#L89)

---

### extractContent

▸ **extractContent**(`response`): `string`

Extract content from response safely

#### Parameters

| Name       | Type                                                                 |
| :--------- | :------------------------------------------------------------------- |
| `response` | [`IHttpResponse`](interfaces/IHttpResponse)\<`TDefaultRequestData`\> |

#### Returns

`string`

#### Defined in

[remote/src/utils/transformers.ts:107](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/remote/src/utils/transformers.ts#L107)

---

### generateId

▸ **generateId**(`prefix?`): `string`

Generate unique ID

#### Parameters

| Name     | Type     | Default value |
| :------- | :------- | :------------ |
| `prefix` | `string` | `'id'`        |

#### Returns

`string`

#### Defined in

[remote/src/utils/transformers.ts:129](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/remote/src/utils/transformers.ts#L129)

---

### normalizeHeaders

▸ **normalizeHeaders**(`headers`): `Record`\<`string`, `string`\>

Normalize headers to ensure type safety

#### Parameters

| Name      | Type                                                    |
| :-------- | :------------------------------------------------------ |
| `headers` | `Record`\<`string`, `string` \| `number` \| `boolean`\> |

#### Returns

`Record`\<`string`, `string`\>

#### Defined in

[remote/src/utils/transformers.ts:136](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/remote/src/utils/transformers.ts#L136)

---

### safeJsonParse

▸ **safeJsonParse**\<`T`\>(`jsonString`): `T` \| `null`

Safe JSON parse with basic error handling

#### Type parameters

| Name |
| :--- |
| `T`  |

#### Parameters

| Name         | Type     |
| :----------- | :------- |
| `jsonString` | `string` |

#### Returns

`T` \| `null`

#### Defined in

[remote/src/utils/transformers.ts:151](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/remote/src/utils/transformers.ts#L151)
