---
title: "sidecar | Eidos Docs"
description: "SDK signatures, permissions and behavior for sidecar."
source: "https://docs.eidos.space/plugins/api/sidecar/"
lang: "en"
---

# sidecar

Declare a local program and default arguments in manifest.sidecar. API 3.9 supports configurable: true for reviewed startup configuration; API 3.12 supports maxOutputFrameBytes for bounded large responses. Only standalone page and file Views receive this capability. Native programs retain OS permissions outside the JavaScript sandbox. CLI Serve and mobile do not expose native sidecars.

Usage guide: [native-processes](https://docs.eidos.space/plugins/native-processes/). [API index](https://docs.eidos.space/plugins/api/).

Signatures, parameters and return types are generated from the SDK. Optional members are not available in every host and context.

## SidecarEvent

[Source](https://github.com/mayneyao/eidos/blob/dev/packages/plugin-sdk/src/index.ts#L241)

Supported hosts: Lite

```ts
export type SidecarEvent = {
    type: "message";
    data: BackgroundMessage;
} | {
    type: "stderr";
    text: string;
} | {
    type: "exit";
    code: number | null;
    signal: string | null;
} | {
    type: "error";
    message: string;
};
```

Related types: [BackgroundMessage](https://docs.eidos.space/plugins/api/types/#backgroundmessage).

## SidecarStatus

[Source](https://github.com/mayneyao/eidos/blob/dev/packages/plugin-sdk/src/index.ts#L246)

### SidecarStatus.available

Supported hosts: Lite

```ts
available: boolean;
```

### SidecarStatus.running

Supported hosts: Lite

```ts
running: boolean;
```

### SidecarStatus.command

Supported hosts: Lite

```ts
command: string;
```

### SidecarStatus.launch

Supported hosts: Lite

```ts
launch?: SidecarLaunch;
```

Related types: [SidecarLaunch](https://docs.eidos.space/plugins/api/sidecar/#sidecarlaunch).

## SidecarLaunch

[Source](https://github.com/mayneyao/eidos/blob/dev/packages/plugin-sdk/src/index.ts#L253)

### SidecarLaunch.command

Supported hosts: Lite

```ts
command: string;
```

### SidecarLaunch.args

Supported hosts: Lite

```ts
args: string[];
```

## PluginSidecar

[Source](https://github.com/mayneyao/eidos/blob/dev/packages/plugin-sdk/src/index.ts#L258)

### PluginSidecar.status

Supported hosts: Lite

Discovery only: available means an executable was found; running means an owned native process exists. Neither implies protocol readiness or a compatible program version. Does not execute, install or prompt.

```ts
status(): Promise<SidecarStatus>;
```

Returns: `Promise<SidecarStatus>`.

### PluginSidecar.start

Supported hosts: Lite

Checks persisted approval per Space, package revision and exact program identity including argv; requests review when missing or changed. Installation/enablement may include the concrete default launch. Overrides require configurable: true. An existing different launch must be stopped first. Pending startup expires after five minutes and is cancelled with its initiating View. Closing a started View only detaches it. Success means OS spawn, not protocol readiness.

```ts
start(launch?: SidecarLaunch): Promise<void>;
```

| Parameter | Type          | Required |
| --------- | ------------- | -------- |
| launch    | SidecarLaunch | No       |

Returns: `Promise<void>`.

### PluginSidecar.stop

Supported hosts: Lite

Stops the shared owned process tree and awaits exit, affecting every attached View. Stop retains consent; disabling or uninstalling revokes it. Updating the plugin, leaving the Space, closing its owner window or quitting Lite also stops it. Native side effects are not undone.

```ts
stop(): Promise<void>;
```

Returns: `Promise<void>`.

### PluginSidecar.send

Supported hosts: Lite

Writes one JSON value followed by LF. Each frame including LF is limited to 1 MiB; queued stdin including the incoming frame is limited to 4 MiB. Completion means stream write completion, not a native protocol response.

```ts
send(data: BackgroundMessage): Promise<void>;
```

| Parameter | Type              | Required |
| --------- | ----------------- | -------- |
| data      | BackgroundMessage | Yes      |

Returns: `Promise<void>`.

### PluginSidecar.onEvent

Supported hosts: Lite

Subscribes without starting a process. Returns a disposable observer; closing the View unsubscribes. stdout is LF-delimited JSON (CRLF accepted). Records default to 1 MiB excluding CRLF; API 3.12 permits manifest.sidecar.maxOutputFrameBytes, an integer from 1 to 16777216\. The per-second stdout byte limit is max(16 MiB, twice the record limit); stderr over 1 MiB/s is dropped. Malformed or oversized output emits an error and stops the process; preserve that error when exit follows. Unicode line separators are ordinary string content. Reconcile native state after reattaching because events are not replayed.

```ts
onEvent(listener: (event: SidecarEvent) => void): Promise<Disposable>;
```

| Parameter | Type                          | Required |
| --------- | ----------------------------- | -------- |
| listener  | (event: SidecarEvent) => void | Yes      |

Returns: `Promise<Disposable>`.

Related types: [SidecarStatus](https://docs.eidos.space/plugins/api/sidecar/#sidecarstatus), [SidecarLaunch](https://docs.eidos.space/plugins/api/sidecar/#sidecarlaunch), [BackgroundMessage](https://docs.eidos.space/plugins/api/types/#backgroundmessage), [SidecarEvent](https://docs.eidos.space/plugins/api/sidecar/#sidecarevent), [Disposable](https://docs.eidos.space/plugins/api/types/#disposable).
