/** * Instantiate actions from skills config and expose runActionsForSignal for serial processing. */ import type { Action, ActionConfig, HookEvent } from "../actions/types.js"; import type { ActionRuntimeModule } from "../actions/action-runtime-module.js"; import type { SenpiEventBus } from "../types/event-bus.js"; import type { RuntimeContext } from "../types/runtime.js"; import type { RuntimeConfig } from "./runtime-config.js"; import type { CreateActionContextDeps } from "./create-action-context.js"; export interface CreateActionsOptions extends Omit { bus: SenpiEventBus; /** When provided, this context is reused for all actions (built once per trading recipe by the runtime). */ runtimeContext?: RuntimeContext; /** When set, wraps each action invocation with telemetry and persistence. */ actionModule?: ActionRuntimeModule; } export interface ActionWithMeta { action: Action; name: string; eventsConsumed: string[]; config: ActionConfig; } export interface CreateActionsResult { actions: ActionWithMeta[]; runActionsForSignal: (event: HookEvent) => Promise; } /** * For each entry in config.actions, look up factory by action_type, build ActionConfig, * use shared RuntimeContext (built once per trading recipe and reused), instantiate action. Returns actions * and runActionsForSignal so the runtime can process signals serially (one at a time) to avoid slot races. * When options.runtimeContext is provided (e.g. by Runtime), it is reused for all action factories. */ export declare function createActions(config: RuntimeConfig, options: CreateActionsOptions): Promise; //# sourceMappingURL=create-actions.d.ts.map