CommandsAPI
Defined in: namespaces.ts:32
Methods
Section titled “Methods”register()
Section titled “register()”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.
Parameters
Section titled “Parameters”string
handlerOrOptions
Section titled “handlerOrOptions”CommandOptions | (() => void | Promise<void>)
Returns
Section titled “Returns”void
execute()
Section titled “execute()”execute(
id,args?):Promise<void>
Defined in: namespaces.ts:46
Executes a command by ID.
Allowed targets: own commands, core commands (space.appos.*).
Parameters
Section titled “Parameters”string
Record<string, unknown>
Returns
Section titled “Returns”Promise<void>
getRegistered()
Section titled “getRegistered()”getRegistered():
string[]
Defined in: namespaces.ts:49
Returns the calling plugin’s own registered commands as short IDs.
Returns
Section titled “Returns”string[]
onCommandExecuted()
Section titled “onCommandExecuted()”onCommandExecuted(
id,handler):string
Defined in: namespaces.ts:55
Registers a handler called after a command executes. Own-namespace commands ONLY.
Parameters
Section titled “Parameters”string
handler
Section titled “handler”(details) => void
Returns
Section titled “Returns”string