Skip to content

@lastshotlabs/slingshot-interactions

npm install @lastshotlabs/slingshot-interactions

Button component schema.

Source: packages/slingshot-interactions/src/components/schema.ts

Compile declarative handler templates into runtime dispatchers.

function compileHandlers(handlers: Record<string, HandlerTemplate>, deps: { app: Hono<AppEnv>; bus: SlingshotEventBus },): CompiledHandlerTable

Source: packages/slingshot-interactions/src/handlers/compile.ts

Create the interactions package.

Validates rawConfig via interactionsPluginConfigSchema, compiles all declarative handler templates into dispatchers, and exposes:

  • POST {mountPath}/dispatch — the bespoke interaction dispatch endpoint.
  • GET /interactionEvents / GET /interactionEvents/:id — entity-generated read routes for the user-scoped audit log (provided by the entity module).
function createInteractionsPackage(rawConfig: unknown): SlingshotPackageDefinition

Source: packages/slingshot-interactions/src/plugin.ts

Runtime dependencies required by the interaction orchestrator.

async function dispatchInteraction(deps: DispatchDeps, request: DispatchRequest, userId: string, requestTenantId: string | null,): Promise<DispatchOutcome>

Source: packages/slingshot-interactions/src/handlers/dispatch.ts

Validate an arbitrary value as a component tree.

function validateComponentTree(input: unknown): ComponentTree

Source: packages/slingshot-interactions/src/components/validate.ts

Verify a webhook signature and timestamp to prevent replay attacks.

function verifyWebhookSignature(body: string, signature: string, timestamp: string, secret: string, toleranceMs = TIMESTAMP_TOLERANCE_MS,): boolean

Source: packages/slingshot-interactions/src/handlers/dispatchers/webhook.ts

Button component schema.

Source: packages/slingshot-interactions/src/components/schema.ts

Button component schema.

Source: packages/slingshot-interactions/src/components/schema.ts

Request schema for the bespoke interactions dispatch route.

Source: packages/slingshot-interactions/src/routes/dispatchRoute.schema.ts

Request schema for the bespoke interactions dispatch route.

Source: packages/slingshot-interactions/src/routes/dispatchRoute.schema.ts

Declarative handler template used by the interactions package config.

Source: packages/slingshot-interactions/src/handlers/template.ts

Semantic statuses recorded in the interaction audit trail.

Source: packages/slingshot-interactions/src/entities/interactionEvent.ts

Store-type keyed factories for the InteractionEvent audit entity.

Source: packages/slingshot-interactions/src/entities/factories.ts

Semantic statuses recorded in the interaction audit trail.

Source: packages/slingshot-interactions/src/entities/interactionEvent.ts

Public contract for slingshot-interactions.

Cross-package consumers resolve InteractionsRuntimeCap through ctx.capabilities.require(...) to read the active interactions runtime (handler registry, peers, rate limiter). The legacy plugin-state slot at INTERACTIONS_PLUGIN_STATE_KEY is still published in parallel during the bridge period.

Source: packages/slingshot-interactions/src/public.ts

Stable plugin-state key used in ctx.pluginState.

Source: packages/slingshot-interactions/src/state.ts

Config schema for createInteractionsPackage().

Source: packages/slingshot-interactions/src/config/schema.ts

Public contract for slingshot-interactions.

Cross-package consumers resolve InteractionsRuntimeCap through ctx.capabilities.require(...) to read the active interactions runtime (handler registry, peers, rate limiter). The legacy plugin-state slot at INTERACTIONS_PLUGIN_STATE_KEY is still published in parallel during the bridge period.

Source: packages/slingshot-interactions/src/public.ts

Button component schema.

Source: packages/slingshot-interactions/src/components/schema.ts

Button component schema.

Source: packages/slingshot-interactions/src/components/schema.ts

Button component schema.

Source: packages/slingshot-interactions/src/components/schema.ts

Message kinds that can own an interactive component tree.

Source: packages/slingshot-interactions/src/components/types.ts

Message kinds that can own an interactive component tree.

Source: packages/slingshot-interactions/src/components/types.ts

Peer contract implemented by chat/community owners of component trees.

Source: packages/slingshot-interactions/src/peers/types.ts

Peer contract implemented by chat/community owners of component trees.

Source: packages/slingshot-interactions/src/peers/types.ts

Normalized payload passed to one compiled dispatcher.

Source: packages/slingshot-interactions/src/handlers/contracts.ts

Normalized payload passed to one compiled dispatcher.

Source: packages/slingshot-interactions/src/handlers/contracts.ts

Runtime dependencies required by the interaction orchestrator.

Source: packages/slingshot-interactions/src/handlers/dispatch.ts

Peer contract implemented by chat/community owners of component trees.

Source: packages/slingshot-interactions/src/peers/types.ts

Stable plugin-state key used in ctx.pluginState.

Source: packages/slingshot-interactions/src/state.ts

Message kinds that can own an interactive component tree.

Source: packages/slingshot-interactions/src/components/types.ts

Message kinds that can own an interactive component tree.

Source: packages/slingshot-interactions/src/components/types.ts

Message kinds that can own an interactive component tree.

Source: packages/slingshot-interactions/src/components/types.ts

Message kinds that can own an interactive component tree.

Source: packages/slingshot-interactions/src/components/types.ts

Message kinds that can own an interactive component tree.

Source: packages/slingshot-interactions/src/components/types.ts

Request schema for the bespoke interactions dispatch route.

Source: packages/slingshot-interactions/src/routes/dispatchRoute.schema.ts

Request schema for the bespoke interactions dispatch route.

Source: packages/slingshot-interactions/src/routes/dispatchRoute.schema.ts

Declarative handler template used by the interactions package config.

Source: packages/slingshot-interactions/src/handlers/template.ts

Semantic statuses recorded in the interaction audit trail.

Source: packages/slingshot-interactions/src/entities/interactionEvent.ts

Parsed interactions plugin config with defaults applied.

Source: packages/slingshot-interactions/src/config/types.ts

Message kinds that can own an interactive component tree.

Source: packages/slingshot-interactions/src/components/types.ts

Declarative handler template used by the interactions package config.

Source: packages/slingshot-interactions/src/handlers/template.ts

Declarative handler template used by the interactions package config.

Source: packages/slingshot-interactions/src/handlers/template.ts

Message kinds that can own an interactive component tree.

Source: packages/slingshot-interactions/src/components/types.ts

Declarative handler template used by the interactions package config.

Source: packages/slingshot-interactions/src/handlers/template.ts