Skip to content

Core API

Generated reference for @aparte/core: every export, by area — configuration, client, transports, messages, conversations, questions, element types and utilities.

On this page

The custom elements are on their catalogue pages, with their attributes, properties, methods, events, slots and CSS variables. Everything else @aparte/core exports is here, generated from its source and JSDoc.

PageWhat it documents
ConfigurationaparteGlobalConfig, the class behind it, and the provider, renderer and locale types it takes.
ClientThe client that runs a conversation, the host every framework wrapper binds to, and the stream runners.
TransportsHow a request reaches a model, straight from the browser or through your endpoint, and the handlers that endpoint can use.
Messages and segmentsA message and the segments it is made of, the parser that builds them from a stream, the renderers that draw them, and the errors.
ConversationsConversations and their storage, and the history of one conversation with its branches.
Questions and approvalsAsking the person a question, or for an approval, in the middle of a turn.
Element typesThe data and event types the elements take and send. The elements themselves are on their catalogue pages.
UtilitiesSmall helpers: escaping, ids, copying, attachments from files, segment timing, and what the framework wrappers share.

AparteConfig, AparteAction, AparteModelPreference, AparteModelPreferenceProvider, AparteStreamingMarkdownRenderer, AparteAvatarProvider, AparteConfigAware, AparteElicitationFieldContext, AparteElicitationFieldControl, AparteIconProvider, AparteActionZone, AparteMarkdownProvider, AparteHighlightProvider, AparteSystemPromptVarsProvider, AparteKeyProvider, AparteStreamingMarkdownProvider, AparteAttachmentRenderer, AparteBubbleShellRenderer, AparteElicitationFieldRenderer, AparteErrorRenderer, AparteIconName, AparteLocale, AparteLocaleExtensions, AparteSanitizer, AparteSiblingNavRenderer, AparteStatusRenderer, APARTE_DEFAULT_BUBBLE_ACTIONS, APARTE_DEFAULT_HOST_HANDLERS, aparteGlobalConfig, APARTE_HOST_ATTR, APARTE_CONFIG_CHANGE, APARTE_DEFAULT_ICON_FALLBACKS, APARTE_DEFAULT_LOCALE, defaultSanitizer, attachConfig(), detachConfig(), resolveConfig(), runWithConfig(), contextConfig(), subscribeConfigChange(), isSafeUrl(), AparteConfigChangeEventDetail

AparteClient, AparteChatHost, AgentStreamRunnerOptions, AparteClientOptions, StreamAdapterTarget, CreateStreamAdapterOptions, AparteChatHostBinding, AparteChatHostOptions, AparteToolApprovalResolver, AparteStreamRunEvent, AparteStreamRunEmitter, AparteStreamRunOptions, AparteStreamRunner, createAgentStreamRunner(), createStreamAdapter(), readableToAsyncIterable()

AparteBackendTransport, AparteDirectTransport, AparteAgentTool, AparteAgentHandlerOptions, AparteAgentRequestBody, AparteChatHandlerOptions, BackendTransportOptions, DirectTransportOptions, AparteVendorRequest, AparteFormatAdapter, AparteTransportContext, AparteTransport, createAparteAgentHandler(), createAparteChatHandler(), isFormatAdapter()

AparteErrorCode, AparteStreamParser, AparteError, AparteThinkingDelimiterPair, AparteStreamParserOptions, AparteParserState, AparteParserResult, AparteTextPart, AparteImagePart, AparteChatMessage, AparteChatRequest, AparteRequestMeta, AparteUsage, AparteStreamEventMap, AparteSendEventDetail, AparteSiblingInfo, AparteChatImperativeApi, AparteUiHandle, AparteAIModel, ModelLoadProgress, AparteAIProviderMetadata, AparteAIProviderConfigField, AparteAIProviderConfigSchema, AparteModelConfig, AparteAttachment, AparteMessageBranch, AparteBubbleActionsConfig, AparteHostHandlersConfig, AparteMessage, AparteViewportConfig, AparteInputConfig, AparteContentParser, AparteSegmentBase, AparteSegmentTiming, AparteTextSegment, AparteThinkingSegment, AparteCodeSegment, AparteErrorSegment, AparteToolCallSegment, AparteCustomSegment, AparteSegmentRenderer, AparteSegmentUpdateEventDetail, AparteStreamBlockMatch, AparteStreamBlock, AparteTool, AparteToolCall, AparteApprovalRuling, AparteToolResult, AparteToolContext, AparteToolRenderer, AparteContentPart, AparteStreamEvent, AparteChatResponse, AparteAttrValue, AparteTemplateAttrs, ModelStatus, AparteAIProvider, AparteStatus, AparteBubbleRole, AparteBubbleActionName, AparteSegmentDefaults, AparteSegment, AparteSegmentType, AparteThemeVariables, AparteApprovalPolicy, AparteToolHandler, AparteToolSummary, parseAparteEventStream(), parseMarkdownToSegments(), registerSegmentRenderer(), declineDefaultRenderers(), installDefaultRenderersOnce(), unregisterSegmentRenderer(), getSegmentRenderer(), getAllRenderers(), collectRendererStyles(), registerDefaultRenderers(), contentToText(), AparteMessageDoneEventDetail, AparteModelChangeEventDetail, AparteLinkClickEventDetail, AparteBranchNavigateEventDetail, ApartePathChangedEventDetail, AparteRetryEventDetail, AparteEditEventDetail, AparteFeedbackEventDetail, AparteActionEventDetail, AparteMessageInfoEventDetail, AparteMessageStartEventDetail, AparteMessageErrorEventDetail, AparteMessagePausedEventDetail, AparteMessageAbortedEventDetail, AparteAbortEventDetail, AparteCompactEventDetail, AparteCompactStartEventDetail, AparteCompactDoneEventDetail, AparteCompactErrorEventDetail, AparteAttachmentPreviewEventDetail, AparteApprovalModeChangeEventDetail, AparteToolApprovalRequestDetail

AparteConversationController, AparteConversationManager, AparteMessageRepository, AparteChatBinding, AparteConversationControllerOptions, ConversationManagerOptions, AparteConversation, AparteConversationMeta, AparteAttachmentRow, AparteStorageAdapter, AparteConversationsListener, AparteConversationTitleProvider, ExportedMessageRepository, APARTE_CONVERSATION_SCHEMA_VERSION, AparteConversationLoadedDetail

AparteElicitationAbortError, BuiltApprovalPanel, BuiltElicitationPanel, AparteElicitationEnumField, AparteElicitationBooleanField, AparteElicitationStringField, AparteElicitationObjectSchema, AparteElicitationRequest, AparteApprovalOption, AparteApprovalAnswer, AparteElicitationField, AparteElicitationSchema, AparteElicitationResult, AparteElicitationPresenter, buildApprovalPanel(), requestUserInput(), buildElicitationPanel()

SyncableBubble, AparteComposerEventMap, AparteComposerState, AparteComposerChangeEventDetail, AparteContextThresholdEventDetail, AparteConversationListItem, AparteConversationSelectDetail, AparteConversationDeleteDetail, AparteConversationArchiveDetail, AparteConversationPinDetail, AparteConversationRenameDetail, AparteScrollRailJumpDetail, AparteSidebarToggleDetail, AparteSplitResizeDetail, AparteSuggestionEventDetail, AparteChatAttributes, AparteChatBubbleAttributes, AparteChatStatusAttributes, AparteChatViewportAttributes, AparteComposerAttributes, AparteComposerActionAttributes, AparteComposerAddAttachmentAttributes, AparteComposerInputAttributes, AparteComposerToolbarAttributes, AparteContextAttributes, AparteConversationListAttributes, AparteIconAttributes, AparteOptgroupAttributes, AparteOptionAttributes, AparteProgressSpinnerAttributes, AparteScrollRailAttributes, AparteSelectAttributes, AparteSidebarAttributes, AparteSplitAttributes, AparteSuggestionsAttributes, AparteElementAttributes, AparteSelectChangeDetail, AparteComposerPanelMode, AparteComposerEventType, AparteContextLevel, AparteScrollRailEvery, AparteSuggestion, AparteNoAttributes, AparteElementTagName, populateBubbleFromMessage(), AparteActionClickEventDetail, AparteOptgroupToggleEventDetail

AparteUiEventName, APARTE_DEFAULT_UI_EVENTS, escapeAttr, registerAllComponents(), installDialogTriggersOnce(), applyElementProps(), copyText(), cssEscape(), escapeHtml(), filesToAttachments(), revokeAttachmentUrls(), isAwaitingReply(), segmentTiming(), isSegmentSettled(), segmentDuration(), uuid()

AparteChatBubble, AparteChat, AparteComposerAction, AparteComposerAddAttachment, AparteComposerAttachments, AparteComposerCancel, AparteComposerInput, AparteComposerSend, AparteComposerToolbar, AparteComposer, AparteContext, AparteConversationList, AparteElicitation, AparteScrollRail, AparteSidebar, AparteSplit, AparteChatStatus, AparteSuggestions, AparteChatViewport, AparteIcon, AparteProgressSpinner, AparteOptgroup, AparteOption, AparteSelect