Skip to content

CommandsAPI

Defined in: namespaces.ts:32

register(id, handlerOrOptions): void

Defined in: namespaces.ts:39

Registers a command.

The plugin passes a SHORT ID (e.g., “myCmd”). The bridge auto-prefixes with {pluginId}. to form the full ID.

string

CommandOptions | (() => void | Promise<void>)

void


execute(id, args?): Promise<void>

Defined in: namespaces.ts:46

Executes a command by ID.

Allowed targets: own commands, core commands (space.appos.*).

string

Record<string, unknown>

Promise<void>


getRegistered(): string[]

Defined in: namespaces.ts:49

Returns the calling plugin’s own registered commands as short IDs.

string[]


onCommandExecuted(id, handler): string

Defined in: namespaces.ts:55

Registers a handler called after a command executes. Own-namespace commands ONLY.

string

(details) => void

string