Skip to content

Manifest

Declarations request capabilities; the host validates and grants access. apiVersion is the package protocol; requires.pluginApi is the minimum host API. Access defaults to read. Background requires Lite API 3.4; templates 3.2; hooks 3.3; file metadata and explorer 3.1.

Usage guide: views. API index.

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

Source

apiVersion: 1;
kind?: "theme";
id: string;
name: string;

An optional nonempty plain-text line, at most 1024 UTF-16 code units.

description?: string;
version: string;
i18n?: {
defaultLocale: string;
messages: Record<string, string>;
readme?: Record<string, string>;
};
requires?: {
pluginApi: string;
};
icon?: PluginIconDefinition;
extension?: string;

A separate Worker-style entry. network: true permits public HTTPS/WSS after approval; up to eight exact networkOrigins optionally restrict it. bluetooth: true grants the selected device, optionally narrowed by a service whitelist. Device IDs are chosen by the host. API 3.6 adds autoStart: true for approved startup on Space opening, and fileHistory: true for file-open metadata in the owner window and Space; fileHistory does not grant file contents.

background?: {
entry: string;
network?: true;
networkOrigins?: string[];
bluetooth?: true | {
services: BluetoothServicePermission[];
};
fileHistory?: true;
autoStart?: true;
};
views?: ViewDeclaration[];

Static UTF-8 templates, up to 256 KiB each. The referenced document View must have a matching file/open placement.

fileTemplates?: FileTemplateDeclaration[];
actions?: ActionDeclaration[];
formatters?: FormatterDeclaration[];
hooks?: FileHookDeclaration[];
placements?: Placement[];
settings?: Record<string, SettingDeclaration>;
browser?: {
workers?: boolean;
network?: true;
networkOrigins?: string[];
};
storage?: {
maxBytes: number;
};
workspace?: {
files?: boolean | {
read?: boolean;
write?: boolean;
};
filemeta?: {
namespaces: string[];
write?: boolean;
};
};
connections?: Record<string, {
title: string;
url: string;
configurable?: boolean;
}>;
theme?: ThemeDeclaration;

Related types: PluginIconDefinition, BluetoothServicePermission, ViewDeclaration, FileTemplateDeclaration, ActionDeclaration, FormatterDeclaration, FileHookDeclaration, Placement, SettingDeclaration, ThemeDeclaration.

Source

stylesheet: string;

Source

id: string;
title: string;
extension: string;
view: string;
content: string;

Source

id: string;
title: string;
entry: string;
kind: "page" | "file";
capabilities?: ViewCapability[];
access?: "read" | "write";
configuration?: ViewConfiguration;
icon?: PluginIconDefinition;

Related types: ViewCapability, ViewConfiguration, PluginIconDefinition.

Source

type: "object";
properties: Record<string, SettingDeclaration & {
"x-field"?: true;
}>;

Related types: SettingDeclaration.

Source

id: string;
title: string;
context: "workspace" | "file" | "document" | "table";
access?: "read" | "write";
extensions?: string[];
icon?: PluginIconDefinition;

Related types: PluginIconDefinition.

Source

id: string;
title: string;
extensions: string[];

Source

id: string;
title: string;
event: FileHookEventType;
extensions: string[];
access?: "read" | "write";

Related types: FileHookEventType.

Source

export type Placement = {
location: "plugin/settings";
view: string;
} | {
location: "navigation";
view: string;
} | {
location: "sidebar/explorer";
view: string;
} | {
location: "file/open";
view: string;
extensions: string[];
} | {
location: "table/view";
view: string;
} | {
location: "command-palette";
action: string;
} | {
location: "file/context";
action: string;
} | {
location: "table/context";
action: string;
} | {
location: "view/toolbar";
action: string;
view: string;
} | {
location: "keybinding";
action: string;
key: string;
mac?: string;
linux?: string;
};

Source

uuid: string;
read?: boolean;
write?: boolean;
notify?: boolean;

Source

export type SettingDeclaration = {
title: string;
description?: string;
} & ({
type: "boolean";
default: boolean;
} | {
type: "string";
default: string;
enum?: string[];
} | {
type: "number";
default: number;
minimum?: number;
maximum?: number;
});