跳转到内容

AiRegistry

此内容尚不支持你的语言。

Defined in: ai/fsm/registry.ts:124

Ctx = unknown

new AiRegistry<Ctx>(): AiRegistry<Ctx>

AiRegistry<Ctx>

actionNames(): string[]

Defined in: ai/fsm/registry.ts:201

Registered action/condition names, for editor palettes.

string[]


actionTouches(name, input?): AiTouches | undefined

Defined in: ai/fsm/registry.ts:168

What running name reaches for, given the input an authored reference carries. undefined for an unregistered name or one that never declared — the caller has to decide what an unknown leaf means, and treating it as “touches nothing” would be the one wrong answer.

string

AiActionInput = {}

AiTouches | undefined


clear(): void

Defined in: ai/fsm/registry.ts:210

Drop all registrations (tests / hot-reload).

void


conditionNames(): string[]

Defined in: ai/fsm/registry.ts:205

string[]


conditionTouches(name): AiTouches | undefined

Defined in: ai/fsm/registry.ts:174

string

AiTouches | undefined


getAction(name): AiAction<Ctx> | undefined

Defined in: ai/fsm/registry.ts:158

string

AiAction<Ctx> | undefined


getActionParams(name): readonly AiParamDef[]

Defined in: ai/fsm/registry.ts:179

The declared parameters of name (empty when it takes a bare string).

string

readonly AiParamDef[]


getActionSeparator(name): string

Defined in: ai/fsm/registry.ts:184

The separator joining name’s parameters in the canonical string form.

string

string


getCondition(name): AiCondition<Ctx> | undefined

Defined in: ai/fsm/registry.ts:188

string

AiCondition<Ctx> | undefined


hasAction(name): boolean

Defined in: ai/fsm/registry.ts:192

string

boolean


hasCondition(name): boolean

Defined in: ai/fsm/registry.ts:196

string

boolean


registerAction(name, fn): void

Defined in: ai/fsm/registry.ts:137

Register name, either as a bare function (input is the raw arg string, as it always was) or with declared parameters.

A declared action is stored WRAPPED in the projection, so both shapes are filled in no matter how it is reached — invokeAction, a direct getAction(name)(ctx, bb, "tabs:settings"), anything. Normalizing once here is what keeps the two forms from becoming two contracts.

string

AiAction<Ctx> | AiActionSpec<Ctx>

void


registerCondition(name, fn): void

Defined in: ai/fsm/registry.ts:153

string

AiCondition<Ctx> | AiConditionSpec<Ctx>

void