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

# Actions & hooks

Register declared contributions through ExtensionContext. Formatters return text for an undoable edit. Hooks require API 3.3 and return plans for the event document, with no ambient filesystem/network/DOM access. Hooks run after successful local changes; hook failures do not roll them back. Table actions must await declareOutputs before updates; cancellation retains completed writes.

Usage guide: [actions](https://docs.eidos.space/plugins/actions/). [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.

## FileHookContext

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

### FileHookContext.event

Supported hosts: Lite Mobile

```ts
readonly event: FileHookEvent;
```

### FileHookContext.signal

Supported hosts: Lite Mobile

```ts
readonly signal: AbortSignal;
```

### FileHookContext.settings

Supported hosts: Lite Mobile

```ts
readonly settings: Readonly<Record<string, SettingValue>>;
```

Related types: [FileHookEvent](https://docs.eidos.space/plugins/api/types/#filehookevent), [SettingValue](https://docs.eidos.space/plugins/api/types/#settingvalue).

## FileHookHandler

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

Supported hosts: Lite Mobile

```ts
export type FileHookHandler = (context: FileHookContext) => FileHookPlan | void | Promise<FileHookPlan | void>;
```

Related types: [FileHookContext](https://docs.eidos.space/plugins/api/actions/#filehookcontext), [FileHookPlan](https://docs.eidos.space/plugins/api/types/#filehookplan).

## FormatterProvider

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

### FormatterProvider.format

Supported hosts: Lite

```ts
format(input: FormatterInput): {
    text: string;
} | Promise<{
    text: string;
}>;
```

| Parameter | Type           | Required |
| --------- | -------------- | -------- |
| input     | FormatterInput | Yes      |

Returns: `{ text: string; } &#124; Promise<{ text: string; }>`.

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

## TableActionCapabilities

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

### TableActionCapabilities.eidos

Supported hosts: Lite Mobile

```ts
readonly eidos: {
    readonly table: Pick<EidosTable, "tableId" | "viewId" | "readContext">;
    readonly config: Pick<EidosConfig, "read">;
};
```

### TableActionCapabilities.target

Supported hosts: Lite Mobile

```ts
readonly target: {
    count: number;
    readRows(options: {
        offset: number;
        limit: number;
        fields: string[];
    }): Promise<TableActionRecord[]>;
    update(input: {
        readToken: string;
        values: Record<string, LogicalValue>;
    }): Promise<void>;
};
```

### TableActionCapabilities.connections

Supported hosts: Lite Mobile

```ts
readonly connections: {
    request(input: {
        connection: string;
        body: JsonObject;
    }): Promise<JsonObject>;
};
```

### TableActionCapabilities.task

Supported hosts: Lite Mobile

```ts
readonly task: {
    declareOutputs(rows: Array<{
        readToken: string;
        values: Record<string, LogicalValue>;
    }>): Promise<void>;
    report(progress: {
        completed: number;
        message?: string;
    }): Promise<void>;
};
```

Related types: [EidosTable](https://docs.eidos.space/plugins/api/eidos/#eidostable), [EidosConfig](https://docs.eidos.space/plugins/api/eidos/#eidosconfig), [TableActionRecord](https://docs.eidos.space/plugins/api/types/#tableactionrecord).

## TableActionProvider

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

### TableActionProvider.getItems

Supported hosts: Lite Mobile

```ts
getItems(context: {
    readonly i18n: PluginI18n;
    readonly signal: AbortSignal;
    readonly capabilities: Pick<TableActionCapabilities, "eidos">;
}): Promise<TableActionItem[]> | TableActionItem[];
```

| Parameter | Type                                                                                                                        | Required |
| --------- | --------------------------------------------------------------------------------------------------------------------------- | -------- |
| context   | { readonly i18n: PluginI18n; readonly signal: AbortSignal; readonly capabilities: Pick<TableActionCapabilities, "eidos">; } | Yes      |

Returns: `Promise<TableActionItem[]> &#124; TableActionItem[]`.

### TableActionProvider.run

Supported hosts: Lite Mobile

```ts
run(context: TableActionContext, itemId: string): Promise<void>;
```

| Parameter | Type               | Required |
| --------- | ------------------ | -------- |
| context   | TableActionContext | Yes      |
| itemId    | string             | Yes      |

Returns: `Promise<void>`.

Related types: [PluginI18n](https://docs.eidos.space/plugins/api/context/#plugini18n), [TableActionCapabilities](https://docs.eidos.space/plugins/api/actions/#tableactioncapabilities), [TableActionItem](https://docs.eidos.space/plugins/api/types/#tableactionitem), [TableActionContext](https://docs.eidos.space/plugins/api/context/#tableactioncontext).
