Skip to content

Interface: HashTrigger

Makaio Framework


Makaio Framework / contracts / HashTrigger

Defined in: ../../../packages/contracts/src/extension/contributions/hash-trigger-types.ts:90

A registered hash trigger that can suggest completions and execute values.

Implement this interface and return instances from MakaioExtension.triggers.createTriggers so the runtime registers them with the HashTriggerService.

metadata: HashTriggerMetadata

Defined in: ../../../packages/contracts/src/extension/contributions/hash-trigger-types.ts:92

Static descriptor used for registration and pipeline ordering.

optional execute(value, context): Promise<string>

Defined in: ../../../packages/contracts/src/extension/contributions/hash-trigger-types.ts:108

Execute the selected value (optional).

Called when the user accepts a suggestion whose kind is 'leaf'.

string

The accepted suggestion’s value field.

HashTriggerContext

Runtime context for this execution.

Promise<string>

Resolved content string inserted into the message.


suggest(query, context): Promise<HashTriggerSuggestResult>

Defined in: ../../../packages/contracts/src/extension/contributions/hash-trigger-types.ts:99

Return completion suggestions for the current query.

string

Text typed after the prefix token.

HashTriggerContext

Runtime context for this suggestion request.

Promise<HashTriggerSuggestResult>

Suggestion list with optional pagination metadata.