Package Structure
EdgeInteract is organized into focused packages — core types, the interaction server, UI components, React bindings, and observability tools. Each package has a single responsibility and can be used independently.
Package Overview
All EdgeInteract packages live under edge-interact/ in the BizFirstAI Studio source tree. They depend on EdgeStream packages for transport but add their own interaction-specific abstractions.
The foundation package. Contains all TypeScript types, interfaces, and enumerations that the rest of EdgeInteract depends on. No runtime dependencies beyond EdgeStream core.
InteractionRequest<T>— typed request interfaceInteractionResponse<T>— typed response interfaceInteractionTimeout— timeout message interfaceInteractionAck— acknowledgement message interfaceInteractionTypeKey— union of built-in type string literalsIInteractionHook— hook interface for pre-send / post-receive
The server-side interaction publisher and pipeline. Used by backend execution nodes and workflow nodes that need to send interaction requests and await responses.
IInteractionPublisher— publish an interaction to a userInteractionPipeline— manages in-flight interactions, timeout timersInteractionHookRunner— runs registered hooks in orderInteractionAuditLogger— logs all request/response pairs
The client-side interaction receiver. Subscribes to the user's interaction topic via EdgeStream, dispatches incoming requests to the UI layer, and publishes responses.
InteractionSubscriber— wraps EdgeStream subscription forinteractions.{userId}InteractionResponsePublisher— publishesInteractionResponseto callback topicInteractionQueue— manages multiple simultaneous pending interactions
The UI component library. Contains all built-in interaction renderer components plus the InteractionContainer orchestrator. Depends on Atlas Forms for the form type.
InteractionContainer— receives interactions, routes to correct componentApprovalComponent— approve/reject/abstain buttons with context fieldsConfirmationComponent— yes/no/cancel dialogFormComponent— Atlas Form renderer integrationPickerComponent— single or multi-select listNotificationComponent— read-only with acknowledge button
React hooks and context providers for EdgeInteract. This is what most application developers use — it wraps the client package in React-idiomatic APIs with automatic cleanup.
InteractionProvider— context provider, wraps the appuseInteraction(request)— send an interaction, get response promiseuseInteractionReceiver()— receive incoming interactions for current useruseInteractionCallback(id)— subscribe to a specific interaction's callbackuseInteractionHistory()— recent completed interactions
Monitoring and metrics tools for EdgeInteract. Provides the InteractionMonitor component and hooks for emitting metrics to BizFirst Observe.
InteractionMonitor— live view of in-flight and completed interactionsInteractionMetricsHook— emits OTel metrics for each interaction lifecycle eventuseInteractionMetrics()— React hook for interaction health data
Dependency Graph
edge-interact-react
└── edge-interact-client
└── edge-interact-core
└── edge-stream-core
edge-interact-ui
└── edge-interact-client
└── atlas-forms-react (for FormComponent)
edge-interact-server
└── edge-interact-core
└── edge-stream-server
edge-interact-observability
└── edge-interact-client
└── bfai-observe-client
Which Packages Do I Need?
| Scenario | Packages |
|---|---|
| React app receiving and rendering interactions | edge-interact-react, edge-interact-ui |
| Server code publishing interaction requests | edge-interact-server |
| Custom interaction type (no built-in UI) | edge-interact-client, edge-interact-core |
| Monitoring interaction health | edge-interact-observability |
| TypeScript types only (no runtime) | edge-interact-core |