@aparte/core 0.19.2 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -1
- package/dist/client/aparte-client.d.ts +76 -97
- package/dist/client/aparte-client.d.ts.map +1 -1
- package/dist/client/stream-adapter.d.ts +7 -13
- package/dist/client/stream-adapter.d.ts.map +1 -1
- package/dist/client/wire-history.d.ts +4 -5
- package/dist/client/wire-history.d.ts.map +1 -1
- package/dist/components/bubble/aparte-chat-bubble.d.ts +89 -58
- package/dist/components/bubble/aparte-chat-bubble.d.ts.map +1 -1
- package/dist/components/bubble/bubble-sync.d.ts +1 -1
- package/dist/components/chat/aparte-chat.d.ts +15 -13
- package/dist/components/chat/aparte-chat.d.ts.map +1 -1
- package/dist/components/chat/glide-gate.d.ts +13 -0
- package/dist/components/chat/glide-gate.d.ts.map +1 -0
- package/dist/components/composer/aparte-composer-action.d.ts +3 -3
- package/dist/components/composer/aparte-composer-add-attachment.d.ts +2 -2
- package/dist/components/composer/aparte-composer-cancel.d.ts +1 -1
- package/dist/components/composer/aparte-composer-input.d.ts +4 -7
- package/dist/components/composer/aparte-composer-input.d.ts.map +1 -1
- package/dist/components/composer/aparte-composer-send.d.ts +9 -11
- package/dist/components/composer/aparte-composer-send.d.ts.map +1 -1
- package/dist/components/composer/aparte-composer.d.ts +50 -80
- package/dist/components/composer/aparte-composer.d.ts.map +1 -1
- package/dist/components/context/aparte-context.d.ts +13 -7
- package/dist/components/context/aparte-context.d.ts.map +1 -1
- package/dist/components/conversation-list/aparte-conversation-list.d.ts +25 -13
- package/dist/components/conversation-list/aparte-conversation-list.d.ts.map +1 -1
- package/dist/components/elicitation/aparte-elicitation.d.ts +15 -22
- package/dist/components/elicitation/aparte-elicitation.d.ts.map +1 -1
- package/dist/components/scroll-rail/aparte-scroll-rail.d.ts +10 -11
- package/dist/components/scroll-rail/aparte-scroll-rail.d.ts.map +1 -1
- package/dist/components/sidebar/aparte-sidebar.d.ts +16 -3
- package/dist/components/sidebar/aparte-sidebar.d.ts.map +1 -1
- package/dist/components/split/aparte-split.d.ts +12 -3
- package/dist/components/split/aparte-split.d.ts.map +1 -1
- package/dist/components/status/aparte-chat-status.d.ts +5 -3
- package/dist/components/status/aparte-chat-status.d.ts.map +1 -1
- package/dist/components/suggestions/aparte-suggestions.d.ts +6 -9
- package/dist/components/suggestions/aparte-suggestions.d.ts.map +1 -1
- package/dist/components/viewport/aparte-chat-viewport.d.ts +76 -69
- package/dist/components/viewport/aparte-chat-viewport.d.ts.map +1 -1
- package/dist/config/aparte-config.d.ts +169 -141
- package/dist/config/aparte-config.d.ts.map +1 -1
- package/dist/config/icon-provider.d.ts +19 -2
- package/dist/config/icon-provider.d.ts.map +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/locale.d.ts +61 -89
- package/dist/config/locale.d.ts.map +1 -1
- package/dist/config/sanitize.d.ts.map +1 -1
- package/dist/conversations/conversation-controller.d.ts +18 -3
- package/dist/conversations/conversation-controller.d.ts.map +1 -1
- package/dist/conversations/conversation-manager.d.ts +6 -6
- package/dist/conversations/conversation-manager.d.ts.map +1 -1
- package/dist/conversations/index.d.ts +1 -1
- package/dist/conversations/index.d.ts.map +1 -1
- package/dist/custom-elements.json +5656 -4759
- package/dist/{dialog-triggers-CEazY76J.js → dialog-triggers-3Rk7PuZa.js} +555 -375
- package/dist/dialog-triggers-3Rk7PuZa.js.map +1 -0
- package/dist/elicitation/approval-panel.d.ts.map +1 -1
- package/dist/elicitation/index.d.ts +6 -1
- package/dist/elicitation/index.d.ts.map +1 -1
- package/dist/elicitation/panel.d.ts +11 -21
- package/dist/elicitation/panel.d.ts.map +1 -1
- package/dist/elicitation/types.d.ts +19 -27
- package/dist/elicitation/types.d.ts.map +1 -1
- package/dist/generated/element-attributes.d.ts +16 -10
- package/dist/generated/element-attributes.d.ts.map +1 -1
- package/dist/host/aparte-chat-host.d.ts +17 -32
- package/dist/host/aparte-chat-host.d.ts.map +1 -1
- package/dist/icons/extended.d.ts +1 -2
- package/dist/icons/extended.d.ts.map +1 -1
- package/dist/icons.d.ts +6 -8
- package/dist/icons.d.ts.map +1 -1
- package/dist/icons.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +13 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +775 -337
- package/dist/index.js.map +1 -1
- package/dist/index.node.d.ts +7 -4
- package/dist/index.node.d.ts.map +1 -1
- package/dist/index.node.js +2 -2
- package/dist/index.node.js.map +1 -1
- package/dist/interop/dialog-triggers.d.ts +2 -2
- package/dist/interop/element-props.d.ts +16 -27
- package/dist/interop/element-props.d.ts.map +1 -1
- package/dist/parsers/aparte-stream-parser.d.ts.map +1 -1
- package/dist/primitives/icon/aparte-icon.d.ts.map +1 -1
- package/dist/primitives/select/aparte-option.d.ts +3 -2
- package/dist/primitives/select/aparte-option.d.ts.map +1 -1
- package/dist/primitives/select/aparte-select.d.ts +24 -21
- package/dist/primitives/select/aparte-select.d.ts.map +1 -1
- package/dist/renderers/markdown-stream.d.ts.map +1 -1
- package/dist/renderers/segment-renderers.d.ts +11 -17
- package/dist/renderers/segment-renderers.d.ts.map +1 -1
- package/dist/renderers/segments/code.d.ts.map +1 -1
- package/dist/renderers/segments/error.d.ts.map +1 -1
- package/dist/renderers/segments/text.d.ts.map +1 -1
- package/dist/renderers/segments/thinking.d.ts.map +1 -1
- package/dist/renderers/segments/tool-call.d.ts.map +1 -1
- package/dist/runtime/message-repository.d.ts +8 -15
- package/dist/runtime/message-repository.d.ts.map +1 -1
- package/dist/transport/agent-handler.d.ts +2 -0
- package/dist/transport/agent-handler.d.ts.map +1 -1
- package/dist/transport/backend-handler.d.ts +4 -6
- package/dist/transport/backend-handler.d.ts.map +1 -1
- package/dist/transport/backend-transport.d.ts +15 -1
- package/dist/transport/backend-transport.d.ts.map +1 -1
- package/dist/transport/types.d.ts +7 -10
- package/dist/transport/types.d.ts.map +1 -1
- package/dist/types/chat.d.ts +10 -18
- package/dist/types/chat.d.ts.map +1 -1
- package/dist/types/element-attributes.d.ts +6 -12
- package/dist/types/element-attributes.d.ts.map +1 -1
- package/dist/types/element-map.d.ts +6 -19
- package/dist/types/element-map.d.ts.map +1 -1
- package/dist/types/event-map.d.ts +11 -17
- package/dist/types/event-map.d.ts.map +1 -1
- package/dist/types/events.d.ts +5 -14
- package/dist/types/events.d.ts.map +1 -1
- package/dist/types/imperative-api.d.ts +3 -1
- package/dist/types/imperative-api.d.ts.map +1 -1
- package/dist/types/index.d.ts +4 -4
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/model-provider.d.ts +7 -9
- package/dist/types/model-provider.d.ts.map +1 -1
- package/dist/types/segments.d.ts +29 -13
- package/dist/types/segments.d.ts.map +1 -1
- package/dist/types/tools.d.ts +21 -23
- package/dist/types/tools.d.ts.map +1 -1
- package/dist/utils/copy-text.d.ts +1 -2
- package/dist/utils/copy-text.d.ts.map +1 -1
- package/dist/utils/css-escape.d.ts +1 -1
- package/dist/utils/escape.d.ts +4 -19
- package/dist/utils/escape.d.ts.map +1 -1
- package/dist/utils/files-to-attachments.d.ts +2 -2
- package/dist/utils/fold-text.d.ts +13 -0
- package/dist/utils/fold-text.d.ts.map +1 -0
- package/dist/utils/is-awaiting-reply.d.ts +2 -5
- package/dist/utils/is-awaiting-reply.d.ts.map +1 -1
- package/dist/utils/presence.d.ts +5 -5
- package/dist/utils/segments.d.ts +54 -78
- package/dist/utils/segments.d.ts.map +1 -1
- package/dist/utils/tool-input.d.ts +1 -1
- package/dist/utils/tool-input.d.ts.map +1 -1
- package/dist/utils/transcript.d.ts +2 -2
- package/dist/utils/uuid.d.ts +0 -11
- package/dist/utils/uuid.d.ts.map +1 -1
- package/package.json +30 -4
- package/dist/dialog-triggers-CEazY76J.js.map +0 -1
package/dist/index.node.d.ts
CHANGED
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Resolved via the `node` export condition, so `import '@aparte/core'` in Node
|
|
5
5
|
* (Next.js / Nuxt / Angular Universal / SvelteKit server, tsx, CLI tools) loads
|
|
6
|
-
* THIS module instead of the browser entry
|
|
6
|
+
* THIS module instead of the browser entry — and via `worker`, `workerd`,
|
|
7
|
+
* `edge-light`, `deno` and `bun` for a Cloudflare Worker, an edge route or a
|
|
8
|
+
* `target: 'webworker'` build. A worker built with the page's conditions imports it
|
|
9
|
+
* by name, as `@aparte/core/headless`. It exposes the same public API
|
|
7
10
|
* surface MINUS the Web Components and CSS side-effects — importing the real
|
|
8
11
|
* `index.ts` in Node throws `HTMLElement is not defined` because the custom
|
|
9
12
|
* elements extend `HTMLElement` at module scope.
|
|
@@ -15,7 +18,7 @@
|
|
|
15
18
|
* TypeScript consumers fully typed on the server; `registerAllComponents()` is a
|
|
16
19
|
* no-op here (there is nothing to register without a DOM).
|
|
17
20
|
*/
|
|
18
|
-
export type { AparteBubbleRole, AparteMessage, AparteContentParser, AparteStreamBlock, AparteStreamBlockMatch, AparteSendEventDetail, AparteViewportConfig, AparteInputConfig, AparteThemeVariables, AparteStatus, AparteAttachment, AparteMessageBranch, AparteBubbleActionsConfig, AparteBubbleActionName, AparteSegment, AparteSegmentType, AparteTextSegment, AparteThinkingSegment, AparteCodeSegment, AparteSegmentRenderer, AparteCustomSegment, AparteToolCallSegment, AparteSegmentBase, AparteSegmentDefaults, AparteSegmentTiming, AparteErrorSegment, AparteSegmentUpdateEventDetail, AparteAIProvider, AparteAIModel, AparteAIProviderConfigField, AparteAIProviderMetadata, AparteAIProviderConfigSchema, AparteModelConfig, ModelStatus, ModelLoadProgress, AparteModelChangeEventDetail, AparteApprovalModeChangeEventDetail, AparteMessageDoneEventDetail, AparteMessageStartEventDetail, AparteMessageErrorEventDetail, AparteMessageAbortedEventDetail, AparteMessagePausedEventDetail, AparteAbortEventDetail, AparteCompactEventDetail, AparteCompactDoneEventDetail, AparteCompactStartEventDetail, AparteCompactErrorEventDetail, AparteAttachmentPreviewEventDetail, AparteLinkClickEventDetail, AparteMessageInfoEventDetail, AparteSiblingInfo, AparteBranchNavigateEventDetail, ApartePathChangedEventDetail, AparteRetryEventDetail, AparteEditEventDetail, AparteFeedbackEventDetail, AparteActionEventDetail, AparteChatRequest, AparteChatResponse, AparteChatMessage, AparteContentPart, AparteTextPart, AparteImagePart, AparteStreamEvent, AparteStreamEventMap, AparteUsage, AparteTool, AparteToolCall, AparteApprovalPolicy, AparteApprovalRuling, AparteToolResult, AparteToolHandler, AparteToolContext, AparteToolRenderer, AparteToolSummary, AparteToolApprovalRequestDetail, AparteChatImperativeApi, AparteUiHandle, AparteElementAttributes, AparteElementTagName, AparteAttrValue, AparteTemplateAttrs, AparteNoAttributes, AparteChatAttributes, AparteChatViewportAttributes, AparteChatBubbleAttributes, AparteChatStatusAttributes, AparteComposerAttributes, AparteComposerInputAttributes, AparteComposerActionAttributes, AparteComposerAddAttachmentAttributes, AparteComposerToolbarAttributes, AparteConversationListAttributes, AparteSelectAttributes, AparteOptionAttributes, AparteOptgroupAttributes, AparteProgressSpinnerAttributes, } from './types/index.js';
|
|
21
|
+
export type { AparteBubbleRole, AparteMessage, AparteContentParser, AparteStreamBlock, AparteStreamBlockMatch, AparteSendEventDetail, AparteViewportConfig, AparteInputConfig, AparteThemeVariables, AparteStatus, AparteAttachment, AparteMessageBranch, AparteBubbleActionsConfig, AparteBubbleActionName, AparteSegment, AparteSegmentTypes, AparteSegmentType, AparteTextSegment, AparteThinkingSegment, AparteCodeSegment, AparteSegmentRenderer, AparteCustomSegment, AparteToolCallSegment, AparteSegmentBase, AparteSegmentDefaults, AparteSegmentTiming, AparteErrorSegment, AparteSegmentUpdateEventDetail, AparteAIProvider, AparteAIModel, AparteAIProviderConfigField, AparteAIProviderMetadata, AparteAIProviderConfigSchema, AparteModelConfig, ModelStatus, ModelLoadProgress, AparteModelChangeEventDetail, AparteApprovalModeChangeEventDetail, AparteMessageDoneEventDetail, AparteMessageStartEventDetail, AparteMessageErrorEventDetail, AparteMessageAbortedEventDetail, AparteMessagePausedEventDetail, AparteAbortEventDetail, AparteCompactEventDetail, AparteCompactDoneEventDetail, AparteCompactStartEventDetail, AparteCompactErrorEventDetail, AparteAttachmentPreviewEventDetail, AparteLinkClickEventDetail, AparteMessageInfoEventDetail, AparteSiblingInfo, AparteBranchNavigateEventDetail, ApartePathChangedEventDetail, AparteRetryEventDetail, AparteEditEventDetail, AparteFeedbackEventDetail, AparteActionEventDetail, AparteChatRequest, AparteRequestMeta, AparteChatResponse, AparteChatMessage, AparteContentPart, AparteTextPart, AparteImagePart, AparteStreamEvent, AparteStreamEventMap, AparteUsage, AparteTool, AparteToolCall, AparteApprovalPolicy, AparteApprovalRuling, AparteToolResult, AparteToolHandler, AparteToolContext, AparteToolRenderer, AparteToolSummary, AparteToolInputFormatter, AparteToolApprovalRequestDetail, AparteChatImperativeApi, AparteUiHandle, AparteElementAttributes, AparteElementTagName, AparteAttrValue, AparteTemplateAttrs, AparteNoAttributes, AparteChatAttributes, AparteChatViewportAttributes, AparteChatBubbleAttributes, AparteChatStatusAttributes, AparteComposerAttributes, AparteComposerInputAttributes, AparteComposerActionAttributes, AparteComposerAddAttachmentAttributes, AparteComposerToolbarAttributes, AparteConversationListAttributes, AparteSelectAttributes, AparteOptionAttributes, AparteOptgroupAttributes, AparteProgressSpinnerAttributes, AparteContextAttributes, AparteIconAttributes, AparteScrollRailAttributes, AparteSidebarAttributes, AparteSplitAttributes, AparteSuggestionsAttributes, } from './types/index.js';
|
|
19
22
|
export { AparteErrorCode, AparteError, contentToText } from './types/index.js';
|
|
20
23
|
export type { AparteChat, AparteChatBubble, AparteChatViewport, AparteChatStatus, AparteComposer, AparteComposerInput, AparteComposerSend, AparteComposerCancel, AparteComposerAttachments, AparteComposerAddAttachment, AparteComposerAction, AparteComposerToolbar, AparteSuggestions, AparteContext, AparteConversationList, AparteScrollRail, AparteSidebar, AparteSplit, } from './components/index.js';
|
|
21
24
|
export type { AparteScrollRailJumpDetail, AparteScrollRailEvery, AparteSidebarToggleDetail } from './components/index.js';
|
|
@@ -31,7 +34,7 @@ export { registerSegmentRenderer, unregisterSegmentRenderer, getSegmentRenderer,
|
|
|
31
34
|
export { populateBubbleFromMessage } from './components/bubble/bubble-sync.js';
|
|
32
35
|
export type { AparteConversation, AparteConversationMeta, AparteStorageAdapter, AparteAttachmentRow, AparteConversationLoadedDetail, } from './conversations/index.js';
|
|
33
36
|
export { APARTE_CONVERSATION_SCHEMA_VERSION } from './conversations/index.js';
|
|
34
|
-
export { AparteConversationManager, type ConversationManagerOptions, type AparteConversationTitleProvider, } from './conversations/index.js';
|
|
37
|
+
export { AparteConversationManager, type ConversationManagerOptions, type AparteConversationsListener, type AparteConversationTitleProvider, } from './conversations/index.js';
|
|
35
38
|
export { AparteConversationController, type AparteChatBinding, type AparteConversationControllerOptions, } from './conversations/index.js';
|
|
36
39
|
export { AparteChatHost, type AparteChatHostBinding, type AparteChatHostOptions, } from './host/index.js';
|
|
37
40
|
export { AparteStreamParser, parseMarkdownToSegments, parseAparteEventStream } from './parsers/index.js';
|
|
@@ -43,7 +46,7 @@ export type { AparteConfigChangeEventDetail } from './config/index.js';
|
|
|
43
46
|
export { resolveConfig, attachConfig, detachConfig, runWithConfig, contextConfig, APARTE_HOST_ATTR } from './config/index.js';
|
|
44
47
|
export { subscribeConfigChange, APARTE_CONFIG_CHANGE } from './config/index.js';
|
|
45
48
|
export type { AparteConfigAware } from './config/index.js';
|
|
46
|
-
export type { AparteMarkdownProvider, AparteStreamingMarkdownProvider, AparteStreamingMarkdownRenderer, AparteHighlightProvider, AparteSystemPromptVarsProvider, AparteLocale, AparteLocaleExtensions, AparteAction, AparteActionZone, AparteIconProvider, AparteIconName, AparteAvatarProvider, AparteStatusRenderer, AparteErrorRenderer, AparteAttachmentRenderer, AparteElicitationFieldRenderer, AparteElicitationFieldContext, AparteElicitationFieldControl, AparteSiblingNavRenderer, AparteBubbleShellRenderer, AparteModelPreference, AparteModelPreferenceProvider, AparteSanitizer, } from './config/index.js';
|
|
49
|
+
export type { AparteMarkdownProvider, AparteStreamingMarkdownProvider, AparteStreamingMarkdownRenderer, AparteHighlightProvider, AparteSystemPromptVarsProvider, AparteLocale, AparteLocaleExtensions, AparteAction, AparteActionZone, AparteIconProvider, AparteIconName, AparteCoreIconName, AparteAvatarProvider, AparteStatusRenderer, AparteErrorRenderer, AparteAttachmentRenderer, AparteElicitationFieldRenderer, AparteElicitationFieldContext, AparteElicitationFieldControl, AparteSiblingNavRenderer, AparteBubbleShellRenderer, AparteModelPreference, AparteModelPreferenceProvider, AparteSanitizer, } from './config/index.js';
|
|
47
50
|
export { APARTE_DEFAULT_ICON_FALLBACKS, APARTE_DEFAULT_LOCALE, defaultSanitizer, isSafeUrl } from './config/index.js';
|
|
48
51
|
export { AparteClient } from './client/aparte-client.js';
|
|
49
52
|
export type { AparteClientOptions, AparteToolApprovalResolver } from './client/aparte-client.js';
|
package/dist/index.node.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.node.d.ts","sourceRoot":"","sources":["../src/index.node.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.node.d.ts","sourceRoot":"","sources":["../src/index.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,YAAY,EACR,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACpB,YAAY,EACZ,gBAAgB,EAChB,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EAOrB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAIlB,8BAA8B,EAC9B,gBAAgB,EAChB,a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CAAC;AAa3F,OAAO,sBAAsB,CAAC;AAC9B,OAAO,wBAAwB,CAAC;AAGhC,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAI3D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGhD,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAIvF,YAAY,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAClE,YAAY,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAGnE,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAClI,YAAY,EACR,uBAAuB,EACvB,sBAAsB,EACtB,0BAA0B,EAC1B,6BAA6B,EAC7B,4BAA4B,EAC5B,6BAA6B,EAC7B,wBAAwB,EACxB,uBAAuB,EACvB,0BAA0B,EAC1B,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,GACxB,MAAM,wBAAwB,CAAC;AAEhC;;;;;;;;;;;;;GAaG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAY5C;AAED,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC"}
|
package/dist/index.node.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, _, $, a0, a1, a2, a3, a4, a5, a6, a7, a8 } from "./dialog-triggers-
|
|
1
|
+
import { A, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, _, $, a0, a1, a2, a3, a4, a5, a6, a7, a8 } from "./dialog-triggers-3Rk7PuZa.js";
|
|
2
2
|
function registerAllComponents() {
|
|
3
3
|
if (typeof customElements !== "undefined") {
|
|
4
4
|
console.warn(
|
|
5
|
-
"[aparte] A DOM is present but '@aparte/core' resolved to its DOM-free Node entry, so no <aparte-*> element will upgrade. Test runners hit this: they run on Node, so they take the 'node' export condition. Point your runner at '@aparte/core/browser' (vitest: test.alias {
|
|
5
|
+
"[aparte] A DOM is present but '@aparte/core' resolved to its DOM-free Node entry, so no <aparte-*> element will upgrade. Test runners hit this: they run on Node, so they take the 'node' export condition. Point your runner at '@aparte/core/browser', matching the bare specifier only (vitest: test.alias [{ find: /^@aparte\\/core$/, replacement: '@aparte/core/browser' }])."
|
|
6
6
|
);
|
|
7
7
|
}
|
|
8
8
|
}
|
package/dist/index.node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.node.js","sources":["../src/index.node.ts"],"sourcesContent":["/**\n * @aparte/core — Node.js / SSR-safe entry point.\n *\n * Resolved via the `node` export condition, so `import '@aparte/core'` in Node\n * (Next.js / Nuxt / Angular Universal / SvelteKit server, tsx, CLI tools) loads\n * THIS module instead of the browser entry. It exposes the same public API\n * surface MINUS the Web Components and CSS side-effects — importing the real\n * `index.ts` in Node throws `HTMLElement is not defined` because the custom\n * elements extend `HTMLElement` at module scope.\n *\n * Everything re-exported here is DOM-free at import time. Custom-element CLASSES\n * (AparteChatBubble, AparteComposer*, AparteSelect, …) are intentionally NOT exported\n * as runtime values — they only exist in the browser build. Their TYPES are\n * re-exported (types are erased, so they never pull DOM at runtime), which keeps\n * TypeScript consumers fully typed on the server; `registerAllComponents()` is a\n * no-op here (there is nothing to register without a DOM).\n */\n\n// ── Types (erased at runtime — always safe, mirror index.ts) ────────────────\nexport type {\n AparteBubbleRole,\n AparteMessage,\n AparteContentParser,\n AparteStreamBlock,\n AparteStreamBlockMatch,\n AparteSendEventDetail,\n AparteViewportConfig,\n AparteInputConfig,\n AparteThemeVariables,\n AparteStatus,\n AparteAttachment,\n AparteMessageBranch,\n AparteBubbleActionsConfig,\n AparteBubbleActionName,\n AparteSegment,\n AparteSegmentType,\n AparteTextSegment,\n AparteThinkingSegment,\n AparteCodeSegment,\n AparteSegmentRenderer,\n AparteCustomSegment,\n AparteToolCallSegment,\n // The same five the browser barrel gained, and they belong here for the same reason:\n // a type has no DOM. `AparteSegmentBase` is the constraint on the exported\n // `AparteSegmentRenderer<T>`, so an SSR consumer writing a renderer for a segment type\n // of its own could not name what it extends. `check:node-barrel-types` is what caught\n // the omission — the browser barrel alone would have compiled fine and failed on the\n // `node` condition only.\n AparteSegmentBase,\n AparteSegmentDefaults,\n AparteSegmentTiming,\n AparteErrorSegment,\n // The detail of the `aparte-segment-update` event. It reached types/index.ts and\n // stopped there — and types/index.ts is not an entry point, so a consumer could\n // bind the event (it is in the published event table) and never name its detail.\n AparteSegmentUpdateEventDetail,\n AparteAIProvider,\n AparteAIModel,\n AparteAIProviderConfigField,\n AparteAIProviderMetadata,\n AparteAIProviderConfigSchema,\n AparteModelConfig,\n ModelStatus,\n ModelLoadProgress,\n AparteModelChangeEventDetail,\n AparteApprovalModeChangeEventDetail,\n AparteMessageDoneEventDetail,\n AparteMessageStartEventDetail,\n AparteMessageErrorEventDetail,\n AparteMessageAbortedEventDetail,\n AparteMessagePausedEventDetail,\n AparteAbortEventDetail,\n AparteCompactEventDetail,\n AparteCompactDoneEventDetail,\n AparteCompactStartEventDetail,\n AparteCompactErrorEventDetail,\n AparteAttachmentPreviewEventDetail,\n AparteLinkClickEventDetail,\n AparteMessageInfoEventDetail,\n AparteSiblingInfo,\n AparteBranchNavigateEventDetail,\n ApartePathChangedEventDetail,\n AparteRetryEventDetail,\n AparteEditEventDetail,\n AparteFeedbackEventDetail,\n AparteActionEventDetail,\n AparteChatRequest,\n AparteChatResponse,\n AparteChatMessage,\n AparteContentPart,\n AparteTextPart,\n AparteImagePart,\n AparteStreamEvent,\n AparteStreamEventMap,\n AparteUsage,\n AparteTool,\n AparteToolCall,\n AparteApprovalPolicy,\n AparteApprovalRuling,\n AparteToolResult,\n AparteToolHandler,\n AparteToolContext,\n AparteToolRenderer,\n AparteToolSummary,\n AparteToolApprovalRequestDetail,\n AparteChatImperativeApi,\n AparteUiHandle,\n AparteElementAttributes,\n AparteElementTagName,\n AparteAttrValue,\n AparteTemplateAttrs,\n AparteNoAttributes,\n AparteChatAttributes,\n AparteChatViewportAttributes,\n AparteChatBubbleAttributes,\n AparteChatStatusAttributes,\n AparteComposerAttributes,\n AparteComposerInputAttributes,\n AparteComposerActionAttributes,\n AparteComposerAddAttachmentAttributes,\n AparteComposerToolbarAttributes,\n AparteConversationListAttributes,\n AparteSelectAttributes,\n AparteOptionAttributes,\n AparteOptgroupAttributes,\n AparteProgressSpinnerAttributes,\n} from './types/index.js';\nexport { AparteErrorCode, AparteError, contentToText } from './types/index.js';\n\n// Custom-element TYPES (erased) — keep server consumers fully typed.\n//\n// The element CLASSES too, as types: `frameworks/elements.md` promises the `node`\n// condition keeps \"every type\", and a server-side consumer typing a ref\n// (`ref: AparteChat`) or a wrapper's imperative surface needs the class's instance\n// type without its `HTMLElement` runtime. `export type` erases the value, so nothing\n// here touches the DOM at import.\nexport type {\n AparteChat, AparteChatBubble, AparteChatViewport, AparteChatStatus,\n AparteComposer, AparteComposerInput, AparteComposerSend, AparteComposerCancel,\n AparteComposerAttachments, AparteComposerAddAttachment, AparteComposerAction, AparteComposerToolbar,\n AparteSuggestions, AparteContext, AparteConversationList, AparteScrollRail, AparteSidebar,\n AparteSplit,\n} from './components/index.js';\nexport type { AparteScrollRailJumpDetail, AparteScrollRailEvery, AparteSidebarToggleDetail } from './components/index.js';\nexport type { AparteSplitResizeDetail } from './components/index.js';\nexport type { AparteElicitation } from './components/elicitation/aparte-elicitation.js';\nexport type { AparteSelect, AparteOption, AparteOptgroup, AparteIcon, AparteProgressSpinner } from './primitives/index.js';\nexport type { AparteSelectChangeDetail, AparteOptgroupToggleEventDetail } from './primitives/index.js';\nexport type { SyncableBubble, AparteComposerEventMap, AparteComposerEventType, AparteComposerState, AparteComposerChangeEventDetail, AparteComposerPanelMode, AparteActionClickEventDetail } from './components/index.js';\nexport type { AparteConversationListItem, AparteConversationSelectDetail, AparteConversationDeleteDetail, AparteConversationArchiveDetail, AparteConversationPinDetail, AparteConversationRenameDetail } from './components/index.js';\nexport type { AparteSuggestion, AparteSuggestionEventDetail } from './components/index.js';\nexport type { AparteContextLevel, AparteContextThresholdEventDetail } from './components/index.js';\n\n// ── Renderers (produce HTML strings; DOM-free at import) ────────────────────\nexport {\n registerSegmentRenderer,\n unregisterSegmentRenderer,\n getSegmentRenderer,\n collectRendererStyles,\n registerDefaultRenderers,\n installDefaultRenderersOnce,\n declineDefaultRenderers,\n getAllRenderers,\n} from './renderers/index.js';\n\n// `populateBubbleFromMessage` is a plain helper — import it from its own module,\n// NOT the components barrel (which would pull in the HTMLElement classes).\nexport { populateBubbleFromMessage } from './components/bubble/bubble-sync.js';\n\n// ── Conversations (types, adapter contract, manager, controller) ────────────\nexport type {\n AparteConversation,\n AparteConversationMeta,\n AparteStorageAdapter,\n AparteAttachmentRow,\n AparteConversationLoadedDetail,\n} from './conversations/index.js';\nexport { APARTE_CONVERSATION_SCHEMA_VERSION } from './conversations/index.js';\nexport {\n AparteConversationManager,\n type ConversationManagerOptions,\n type AparteConversationTitleProvider,\n} from './conversations/index.js';\nexport {\n AparteConversationController,\n type AparteChatBinding,\n type AparteConversationControllerOptions,\n} from './conversations/index.js';\n\n// ── Framework-agnostic chat-host orchestrator (every wrapper binds to it) ───\nexport {\n AparteChatHost,\n type AparteChatHostBinding,\n type AparteChatHostOptions,\n} from './host/index.js';\n\n// ── Parsers ─────────────────────────────────────────────────────────────────\nexport { AparteStreamParser, parseMarkdownToSegments, parseAparteEventStream } from './parsers/index.js';\nexport type { AparteStreamParserOptions, AparteThinkingDelimiterPair, AparteParserState, AparteParserResult } from './parsers/index.js';\n\n// Transport seam — DOM-free (fetch-based), so the whole seam is SSR-safe. The\n// server-side `/api/chat` handler AND both client transports live here; a browser\n// never runs the handler, and the transports touch no DOM at import. Mirrored in\n// full so a wrapper barrel re-exporting a transport can't crash under SSR.\nexport { AparteDirectTransport, AparteBackendTransport, createAparteChatHandler, createAparteAgentHandler, isFormatAdapter } from './transport/index.js';\nexport type {\n AparteTransport,\n AparteTransportContext,\n AparteFormatAdapter,\n AparteVendorRequest,\n BackendTransportOptions,\n DirectTransportOptions,\n AparteChatHandlerOptions,\n AparteAgentHandlerOptions,\n AparteAgentTool,\n AparteAgentRequestBody,\n} from './transport/index.js';\n\n// ── Config ──────────────────────────────────────────────────────────────────\nexport { aparteGlobalConfig, AparteConfig, APARTE_DEFAULT_BUBBLE_ACTIONS, APARTE_DEFAULT_HOST_HANDLERS } from './config/index.js';\nexport type { AparteConfigChangeEventDetail } from './config/index.js';\nexport { resolveConfig, attachConfig, detachConfig, runWithConfig, contextConfig, APARTE_HOST_ATTR } from './config/index.js';\nexport { subscribeConfigChange, APARTE_CONFIG_CHANGE } from './config/index.js';\nexport type { AparteConfigAware } from './config/index.js';\nexport type {\n AparteMarkdownProvider,\n AparteStreamingMarkdownProvider,\n AparteStreamingMarkdownRenderer,\n AparteHighlightProvider,\n AparteSystemPromptVarsProvider,\n AparteLocale,\n AparteLocaleExtensions,\n AparteAction,\n AparteActionZone,\n AparteIconProvider,\n AparteIconName,\n AparteAvatarProvider,\n AparteStatusRenderer,\n AparteErrorRenderer,\n AparteAttachmentRenderer,\n AparteElicitationFieldRenderer,\n AparteElicitationFieldContext,\n AparteElicitationFieldControl,\n AparteSiblingNavRenderer,\n AparteBubbleShellRenderer,\n AparteModelPreference,\n AparteModelPreferenceProvider,\n AparteSanitizer,\n} from './config/index.js';\nexport { APARTE_DEFAULT_ICON_FALLBACKS, APARTE_DEFAULT_LOCALE, defaultSanitizer, isSafeUrl } from './config/index.js';\n\n// ── Client + runtime ─────────────────────────────────────────────────────────\nexport { AparteClient } from './client/aparte-client.js';\nexport type { AparteClientOptions, AparteToolApprovalResolver } from './client/aparte-client.js';\nexport { createStreamAdapter, readableToAsyncIterable } from './client/stream-adapter.js';\nexport { createAgentStreamRunner, type AgentStreamRunnerOptions } from './client/agent-runner.js';\nexport type { AparteStreamRunEvent, AparteStreamRunEmitter, StreamAdapterTarget, CreateStreamAdapterOptions, AparteStreamRunner, AparteStreamRunOptions } from './client/stream-adapter.js';\nexport { AparteMessageRepository } from './runtime/message-repository.js';\nexport type { ExportedMessageRepository } from './runtime/message-repository.js';\n\n// ── Wrapper interop (DOM-free helpers the four wrappers' AparteUi value-imports) ─\n// `applyElementProps`/`APARTE_DEFAULT_UI_EVENTS` are pure (a string array + a function that\n// only touches its `HTMLElement` argument when CALLED, never at import). They MUST be\n// on the Node surface: every wrapper barrel re-exports `AparteUi`, which value-imports\n// these two — omit them here and any SSR toolchain resolving the `node` condition\n// crashes the whole barrel with \"does not provide an export named 'applyElementProps'\".\nexport { applyElementProps, APARTE_DEFAULT_UI_EVENTS } from './interop/element-props.js';\n// A type, so it costs nothing here and its absence WAS a compile error for an SSR\n// consumer — `check:node-barrel-types` caught it the moment the browser barrel gained it.\nexport type { AparteUiEventName } from './interop/element-props.js';\n// Same rule: DOM-free at import (it only reaches for `URL.createObjectURL` when\n// CALLED, which is a browser-side concern), so it belongs on the SSR surface too.\nexport { filesToAttachments, revokeAttachmentUrls } from './utils/files-to-attachments.js';\n\n/*\n * The global type augmentations, which only the BROWSER entry pulled in.\n *\n * TypeScript applies the `node` export condition under `moduleResolution: node16`\n * / `nodenext`, so a consumer in that mode resolves `index.node.d.ts` — and\n * silently lost typed `e.detail` on every aparté event and typed\n * `querySelector('aparte-…')`. Not a runtime concern and not an SSR hazard: both\n * modules are `import type` throughout, so nothing is emitted and no DOM global is\n * touched. `check:node-barrel-types` diffed export NAMES, which an augmentation\n * has none of, so it saw nothing.\n */\nimport './types/event-map.js';\nimport './types/element-map.js';\n// Is a message waiting for a reply? Shared by the viewport, the four wrappers and\n// any consumer rendering its own bubble — one rule, so they can't disagree.\nexport { isAwaitingReply } from './utils/is-awaiting-reply.js';\nexport { escapeHtml, escapeAttr } from './utils/escape.js';\n// Same reasoning as the browser barrel: the gate script and the customization\n// guide both tell a renderer author to use `cssEscape` for a selector, so it has to\n// be importable. It touches no DOM, so the SSR barrel carries it too.\nexport { cssEscape } from './utils/css-escape.js';\nexport { uuid } from './utils/uuid.js';\nexport { copyText } from './utils/copy-text.js';\n// Pure and DOM-free, so the SSR barrel carries it too — and that is the point: a\n// consumer can assert their own duration logic in Node, with no browser.\nexport { isSegmentSettled, segmentTiming, segmentDuration } from './utils/segments.js';\n// The PARAMETER types of two documented setters. They existed and were the declared\n// argument types, but were not exported — so anyone typing a settings layer over\n// `setHostHandlers` / `setKeyProvider` had to re-declare the shape by hand.\nexport type { AparteHostHandlersConfig } from './types/models.js';\nexport type { AparteKeyProvider } from './config/aparte-config.js';\n\n// Elicitation (human-in-the-loop typed input) — DOM-free at import.\nexport { requestUserInput, buildElicitationPanel, buildApprovalPanel, AparteElicitationAbortError } from './elicitation/index.js';\nexport type {\n AparteElicitationSchema,\n AparteElicitationField,\n AparteElicitationEnumField,\n AparteElicitationBooleanField,\n AparteElicitationStringField,\n AparteElicitationObjectSchema,\n AparteElicitationRequest,\n AparteElicitationResult,\n AparteElicitationPresenter,\n AparteApprovalOption,\n AparteApprovalAnswer,\n BuiltApprovalPanel,\n BuiltElicitationPanel,\n} from './elicitation/index.js';\n\n/**\n * No-op on the server: custom elements only exist in the browser, where the\n * real `index.ts` registers them at import time. Wrappers can call this\n * unconditionally without a `typeof window` guard.\n *\n * With ONE thing to say. A `customElements` here means a DOM is present and this\n * DOM-free entry was still the one that resolved — which is a test runner: vitest,\n * jest and friends run on Node, so they take the `node` export condition, and jsdom\n * then supplies the registry. Nothing upgrades, `<aparte-chat>` stays an\n * `HTMLElement`, and every assertion about an element's own properties fails for a\n * reason nothing on the page explains. The escape is `@aparte/core/browser`, which is\n * why that entry exists; before it, the only way out was to reach into this package's\n * `src/`. One warning, not a throw: the environment is legal, only surprising.\n */\nexport function registerAllComponents(): void {\n if (typeof customElements !== 'undefined') {\n console.warn(\n \"[aparte] A DOM is present but '@aparte/core' resolved to its DOM-free Node entry, \"\n + 'so no <aparte-*> element will upgrade. Test runners hit this: they run on Node, '\n + \"so they take the 'node' export condition. Point your runner at '@aparte/core/browser' \"\n + \"(vitest: test.alias { '@aparte/core': '@aparte/core/browser' }).\",\n );\n }\n}\n// Pure until called; the browser entry calls it at import.\nexport { installDialogTriggersOnce } from './interop/dialog-triggers.js';\n"],"names":[],"mappings":";AAkVO,SAAS,wBAA8B;AAC1C,MAAI,OAAO,mBAAmB,aAAa;AACvC,YAAQ;AAAA,MACJ;AAAA,IAAA;AAAA,EAKR;AACJ;"}
|
|
1
|
+
{"version":3,"file":"index.node.js","sources":["../src/index.node.ts"],"sourcesContent":["/**\n * @aparte/core — Node.js / SSR-safe entry point.\n *\n * Resolved via the `node` export condition, so `import '@aparte/core'` in Node\n * (Next.js / Nuxt / Angular Universal / SvelteKit server, tsx, CLI tools) loads\n * THIS module instead of the browser entry — and via `worker`, `workerd`,\n * `edge-light`, `deno` and `bun` for a Cloudflare Worker, an edge route or a\n * `target: 'webworker'` build. A worker built with the page's conditions imports it\n * by name, as `@aparte/core/headless`. It exposes the same public API\n * surface MINUS the Web Components and CSS side-effects — importing the real\n * `index.ts` in Node throws `HTMLElement is not defined` because the custom\n * elements extend `HTMLElement` at module scope.\n *\n * Everything re-exported here is DOM-free at import time. Custom-element CLASSES\n * (AparteChatBubble, AparteComposer*, AparteSelect, …) are intentionally NOT exported\n * as runtime values — they only exist in the browser build. Their TYPES are\n * re-exported (types are erased, so they never pull DOM at runtime), which keeps\n * TypeScript consumers fully typed on the server; `registerAllComponents()` is a\n * no-op here (there is nothing to register without a DOM).\n */\n\n// ── Types (erased at runtime — always safe, mirror index.ts) ────────────────\nexport type {\n AparteBubbleRole,\n AparteMessage,\n AparteContentParser,\n AparteStreamBlock,\n AparteStreamBlockMatch,\n AparteSendEventDetail,\n AparteViewportConfig,\n AparteInputConfig,\n AparteThemeVariables,\n AparteStatus,\n AparteAttachment,\n AparteMessageBranch,\n AparteBubbleActionsConfig,\n AparteBubbleActionName,\n AparteSegment,\n AparteSegmentTypes,\n AparteSegmentType,\n AparteTextSegment,\n AparteThinkingSegment,\n AparteCodeSegment,\n AparteSegmentRenderer,\n AparteCustomSegment,\n AparteToolCallSegment,\n // The same five the browser barrel gained, and they belong here for the same reason:\n // a type has no DOM. `AparteSegmentBase` is the constraint on the exported\n // `AparteSegmentRenderer<T>`, so an SSR consumer writing a renderer for a segment type\n // of its own could not name what it extends. `check:node-barrel-types` is what caught\n // the omission — the browser barrel alone would have compiled fine and failed on the\n // `node` condition only.\n AparteSegmentBase,\n AparteSegmentDefaults,\n AparteSegmentTiming,\n AparteErrorSegment,\n // The detail of the `aparte-segment-update` event. It reached types/index.ts and\n // stopped there — and types/index.ts is not an entry point, so a consumer could\n // bind the event (it is in the published event table) and never name its detail.\n AparteSegmentUpdateEventDetail,\n AparteAIProvider,\n AparteAIModel,\n AparteAIProviderConfigField,\n AparteAIProviderMetadata,\n AparteAIProviderConfigSchema,\n AparteModelConfig,\n ModelStatus,\n ModelLoadProgress,\n AparteModelChangeEventDetail,\n AparteApprovalModeChangeEventDetail,\n AparteMessageDoneEventDetail,\n AparteMessageStartEventDetail,\n AparteMessageErrorEventDetail,\n AparteMessageAbortedEventDetail,\n AparteMessagePausedEventDetail,\n AparteAbortEventDetail,\n AparteCompactEventDetail,\n AparteCompactDoneEventDetail,\n AparteCompactStartEventDetail,\n AparteCompactErrorEventDetail,\n AparteAttachmentPreviewEventDetail,\n AparteLinkClickEventDetail,\n AparteMessageInfoEventDetail,\n AparteSiblingInfo,\n AparteBranchNavigateEventDetail,\n ApartePathChangedEventDetail,\n AparteRetryEventDetail,\n AparteEditEventDetail,\n AparteFeedbackEventDetail,\n AparteActionEventDetail,\n AparteChatRequest,\n AparteRequestMeta,\n AparteChatResponse,\n AparteChatMessage,\n AparteContentPart,\n AparteTextPart,\n AparteImagePart,\n AparteStreamEvent,\n AparteStreamEventMap,\n AparteUsage,\n AparteTool,\n AparteToolCall,\n AparteApprovalPolicy,\n AparteApprovalRuling,\n AparteToolResult,\n AparteToolHandler,\n AparteToolContext,\n AparteToolRenderer,\n AparteToolSummary,\n AparteToolInputFormatter,\n AparteToolApprovalRequestDetail,\n AparteChatImperativeApi,\n AparteUiHandle,\n AparteElementAttributes,\n AparteElementTagName,\n AparteAttrValue,\n AparteTemplateAttrs,\n AparteNoAttributes,\n AparteChatAttributes,\n AparteChatViewportAttributes,\n AparteChatBubbleAttributes,\n AparteChatStatusAttributes,\n AparteComposerAttributes,\n AparteComposerInputAttributes,\n AparteComposerActionAttributes,\n AparteComposerAddAttachmentAttributes,\n AparteComposerToolbarAttributes,\n AparteConversationListAttributes,\n AparteSelectAttributes,\n AparteOptionAttributes,\n AparteOptgroupAttributes,\n AparteProgressSpinnerAttributes,\n AparteContextAttributes,\n AparteIconAttributes,\n AparteScrollRailAttributes,\n AparteSidebarAttributes,\n AparteSplitAttributes,\n AparteSuggestionsAttributes,\n} from './types/index.js';\nexport { AparteErrorCode, AparteError, contentToText } from './types/index.js';\n\n// Custom-element TYPES (erased) — keep server consumers fully typed.\n//\n// The element CLASSES too, as types: `frameworks/elements.md` promises the `node`\n// condition keeps \"every type\", and a server-side consumer typing a ref\n// (`ref: AparteChat`) or a wrapper's imperative surface needs the class's instance\n// type without its `HTMLElement` runtime. `export type` erases the value, so nothing\n// here touches the DOM at import.\nexport type {\n AparteChat, AparteChatBubble, AparteChatViewport, AparteChatStatus,\n AparteComposer, AparteComposerInput, AparteComposerSend, AparteComposerCancel,\n AparteComposerAttachments, AparteComposerAddAttachment, AparteComposerAction, AparteComposerToolbar,\n AparteSuggestions, AparteContext, AparteConversationList, AparteScrollRail, AparteSidebar,\n AparteSplit,\n} from './components/index.js';\nexport type { AparteScrollRailJumpDetail, AparteScrollRailEvery, AparteSidebarToggleDetail } from './components/index.js';\nexport type { AparteSplitResizeDetail } from './components/index.js';\nexport type { AparteElicitation } from './components/elicitation/aparte-elicitation.js';\nexport type { AparteSelect, AparteOption, AparteOptgroup, AparteIcon, AparteProgressSpinner } from './primitives/index.js';\nexport type { AparteSelectChangeDetail, AparteOptgroupToggleEventDetail } from './primitives/index.js';\nexport type { SyncableBubble, AparteComposerEventMap, AparteComposerEventType, AparteComposerState, AparteComposerChangeEventDetail, AparteComposerPanelMode, AparteActionClickEventDetail } from './components/index.js';\nexport type { AparteConversationListItem, AparteConversationSelectDetail, AparteConversationDeleteDetail, AparteConversationArchiveDetail, AparteConversationPinDetail, AparteConversationRenameDetail } from './components/index.js';\nexport type { AparteSuggestion, AparteSuggestionEventDetail } from './components/index.js';\nexport type { AparteContextLevel, AparteContextThresholdEventDetail } from './components/index.js';\n\n// ── Renderers (produce HTML strings; DOM-free at import) ────────────────────\nexport {\n registerSegmentRenderer,\n unregisterSegmentRenderer,\n getSegmentRenderer,\n collectRendererStyles,\n registerDefaultRenderers,\n installDefaultRenderersOnce,\n declineDefaultRenderers,\n getAllRenderers,\n} from './renderers/index.js';\n\n// `populateBubbleFromMessage` is a plain helper — import it from its own module,\n// NOT the components barrel (which would pull in the HTMLElement classes).\nexport { populateBubbleFromMessage } from './components/bubble/bubble-sync.js';\n\n// ── Conversations (types, adapter contract, manager, controller) ────────────\nexport type {\n AparteConversation,\n AparteConversationMeta,\n AparteStorageAdapter,\n AparteAttachmentRow,\n AparteConversationLoadedDetail,\n} from './conversations/index.js';\nexport { APARTE_CONVERSATION_SCHEMA_VERSION } from './conversations/index.js';\nexport {\n AparteConversationManager,\n type ConversationManagerOptions,\n type AparteConversationsListener,\n type AparteConversationTitleProvider,\n} from './conversations/index.js';\nexport {\n AparteConversationController,\n type AparteChatBinding,\n type AparteConversationControllerOptions,\n} from './conversations/index.js';\n\n// ── Framework-agnostic chat-host orchestrator (every wrapper binds to it) ───\nexport {\n AparteChatHost,\n type AparteChatHostBinding,\n type AparteChatHostOptions,\n} from './host/index.js';\n\n// ── Parsers ─────────────────────────────────────────────────────────────────\nexport { AparteStreamParser, parseMarkdownToSegments, parseAparteEventStream } from './parsers/index.js';\nexport type { AparteStreamParserOptions, AparteThinkingDelimiterPair, AparteParserState, AparteParserResult } from './parsers/index.js';\n\n// Transport seam — DOM-free (fetch-based), so the whole seam is SSR-safe. The\n// server-side `/api/chat` handler AND both client transports live here; a browser\n// never runs the handler, and the transports touch no DOM at import. Mirrored in\n// full so a wrapper barrel re-exporting a transport can't crash under SSR.\nexport { AparteDirectTransport, AparteBackendTransport, createAparteChatHandler, createAparteAgentHandler, isFormatAdapter } from './transport/index.js';\nexport type {\n AparteTransport,\n AparteTransportContext,\n AparteFormatAdapter,\n AparteVendorRequest,\n BackendTransportOptions,\n DirectTransportOptions,\n AparteChatHandlerOptions,\n AparteAgentHandlerOptions,\n AparteAgentTool,\n AparteAgentRequestBody,\n} from './transport/index.js';\n\n// ── Config ──────────────────────────────────────────────────────────────────\nexport { aparteGlobalConfig, AparteConfig, APARTE_DEFAULT_BUBBLE_ACTIONS, APARTE_DEFAULT_HOST_HANDLERS } from './config/index.js';\nexport type { AparteConfigChangeEventDetail } from './config/index.js';\nexport { resolveConfig, attachConfig, detachConfig, runWithConfig, contextConfig, APARTE_HOST_ATTR } from './config/index.js';\nexport { subscribeConfigChange, APARTE_CONFIG_CHANGE } from './config/index.js';\nexport type { AparteConfigAware } from './config/index.js';\nexport type {\n AparteMarkdownProvider,\n AparteStreamingMarkdownProvider,\n AparteStreamingMarkdownRenderer,\n AparteHighlightProvider,\n AparteSystemPromptVarsProvider,\n AparteLocale,\n AparteLocaleExtensions,\n AparteAction,\n AparteActionZone,\n AparteIconProvider,\n AparteIconName,\n AparteCoreIconName,\n AparteAvatarProvider,\n AparteStatusRenderer,\n AparteErrorRenderer,\n AparteAttachmentRenderer,\n AparteElicitationFieldRenderer,\n AparteElicitationFieldContext,\n AparteElicitationFieldControl,\n AparteSiblingNavRenderer,\n AparteBubbleShellRenderer,\n AparteModelPreference,\n AparteModelPreferenceProvider,\n AparteSanitizer,\n} from './config/index.js';\nexport { APARTE_DEFAULT_ICON_FALLBACKS, APARTE_DEFAULT_LOCALE, defaultSanitizer, isSafeUrl } from './config/index.js';\n\n// ── Client + runtime ─────────────────────────────────────────────────────────\nexport { AparteClient } from './client/aparte-client.js';\nexport type { AparteClientOptions, AparteToolApprovalResolver } from './client/aparte-client.js';\nexport { createStreamAdapter, readableToAsyncIterable } from './client/stream-adapter.js';\nexport { createAgentStreamRunner, type AgentStreamRunnerOptions } from './client/agent-runner.js';\nexport type { AparteStreamRunEvent, AparteStreamRunEmitter, StreamAdapterTarget, CreateStreamAdapterOptions, AparteStreamRunner, AparteStreamRunOptions } from './client/stream-adapter.js';\nexport { AparteMessageRepository } from './runtime/message-repository.js';\nexport type { ExportedMessageRepository } from './runtime/message-repository.js';\n\n// ── Wrapper interop (DOM-free helpers the four wrappers' AparteUi value-imports) ─\n// `applyElementProps`/`APARTE_DEFAULT_UI_EVENTS` are pure (a string array + a function that\n// only touches its `HTMLElement` argument when CALLED, never at import). They MUST be\n// on the Node surface: every wrapper barrel re-exports `AparteUi`, which value-imports\n// these two — omit them here and any SSR toolchain resolving the `node` condition\n// crashes the whole barrel with \"does not provide an export named 'applyElementProps'\".\nexport { applyElementProps, APARTE_DEFAULT_UI_EVENTS } from './interop/element-props.js';\n// A type, so it costs nothing here and its absence WAS a compile error for an SSR\n// consumer — `check:node-barrel-types` caught it the moment the browser barrel gained it.\nexport type { AparteUiEventName } from './interop/element-props.js';\n// Same rule: DOM-free at import (it only reaches for `URL.createObjectURL` when\n// CALLED, which is a browser-side concern), so it belongs on the SSR surface too.\nexport { filesToAttachments, revokeAttachmentUrls } from './utils/files-to-attachments.js';\n\n/*\n * The global type augmentations, which only the BROWSER entry pulled in.\n *\n * TypeScript applies the `node` export condition under `moduleResolution: node16`\n * / `nodenext`, so a consumer in that mode resolves `index.node.d.ts` — and\n * silently lost typed `e.detail` on every aparté event and typed\n * `querySelector('aparte-…')`. Not a runtime concern and not an SSR hazard: both\n * modules are `import type` throughout, so nothing is emitted and no DOM global is\n * touched. `check:node-barrel-types` diffed export NAMES, which an augmentation\n * has none of, so it saw nothing.\n */\nimport './types/event-map.js';\nimport './types/element-map.js';\n// Is a message waiting for a reply? Shared by the viewport, the four wrappers and\n// any consumer rendering its own bubble — one rule, so they can't disagree.\nexport { isAwaitingReply } from './utils/is-awaiting-reply.js';\nexport { escapeHtml, escapeAttr } from './utils/escape.js';\n// Same reasoning as the browser barrel: the gate script and the customization\n// guide both tell a renderer author to use `cssEscape` for a selector, so it has to\n// be importable. It touches no DOM, so the SSR barrel carries it too.\nexport { cssEscape } from './utils/css-escape.js';\nexport { uuid } from './utils/uuid.js';\nexport { copyText } from './utils/copy-text.js';\n// Pure and DOM-free, so the SSR barrel carries it too — and that is the point: a\n// consumer can assert their own duration logic in Node, with no browser.\nexport { isSegmentSettled, segmentTiming, segmentDuration } from './utils/segments.js';\n// The PARAMETER types of two documented setters. They existed and were the declared\n// argument types, but were not exported — so anyone typing a settings layer over\n// `setHostHandlers` / `setKeyProvider` had to re-declare the shape by hand.\nexport type { AparteHostHandlersConfig } from './types/models.js';\nexport type { AparteKeyProvider } from './config/aparte-config.js';\n\n// Elicitation (human-in-the-loop typed input) — DOM-free at import.\nexport { requestUserInput, buildElicitationPanel, buildApprovalPanel, AparteElicitationAbortError } from './elicitation/index.js';\nexport type {\n AparteElicitationSchema,\n AparteElicitationField,\n AparteElicitationEnumField,\n AparteElicitationBooleanField,\n AparteElicitationStringField,\n AparteElicitationObjectSchema,\n AparteElicitationRequest,\n AparteElicitationResult,\n AparteElicitationPresenter,\n AparteApprovalOption,\n AparteApprovalAnswer,\n BuiltApprovalPanel,\n BuiltElicitationPanel,\n} from './elicitation/index.js';\n\n/**\n * No-op on the server: custom elements only exist in the browser, where the\n * real `index.ts` registers them at import time. Wrappers can call this\n * unconditionally without a `typeof window` guard.\n *\n * With ONE thing to say. A `customElements` here means a DOM is present and this\n * DOM-free entry was still the one that resolved — which is a test runner: vitest,\n * jest and friends run on Node, so they take the `node` export condition, and jsdom\n * then supplies the registry. Nothing upgrades, `<aparte-chat>` stays an\n * `HTMLElement`, and every assertion about an element's own properties fails for a\n * reason nothing on the page explains. The escape is `@aparte/core/browser`, which is\n * why that entry exists; before it, the only way out was to reach into this package's\n * `src/`. One warning, not a throw: the environment is legal, only surprising.\n */\nexport function registerAllComponents(): void {\n if (typeof customElements !== 'undefined') {\n console.warn(\n \"[aparte] A DOM is present but '@aparte/core' resolved to its DOM-free Node entry, \"\n + 'so no <aparte-*> element will upgrade. Test runners hit this: they run on Node, '\n + \"so they take the 'node' export condition. Point your runner at '@aparte/core/browser', \"\n // The bare specifier only: a string alias is a PREFIX, and would send\n // '@aparte/core/icons' to '@aparte/core/browser/icons', which does not exist.\n + \"matching the bare specifier only (vitest: test.alias \"\n + \"[{ find: /^@aparte\\\\/core$/, replacement: '@aparte/core/browser' }]).\",\n );\n }\n}\n// Pure until called; the browser entry calls it at import.\nexport { installDialogTriggersOnce } from './interop/dialog-triggers.js';\n"],"names":[],"mappings":";AAgWO,SAAS,wBAA8B;AAC1C,MAAI,OAAO,mBAAmB,aAAa;AACvC,YAAQ;AAAA,MACJ;AAAA,IAAA;AAAA,EAQR;AACJ;"}
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* The kit's dialog is the browser's `<dialog>` wearing `.aparte-dialog`
|
|
5
5
|
* (`styles/surface/dialog.css`): `showModal()` gives the top layer, the focus trap,
|
|
6
6
|
* Escape and the focus return, so there is no behaviour left for a custom element to
|
|
7
|
-
* own — and wrapping the host's content in one would
|
|
8
|
-
* renders, which
|
|
7
|
+
* own — and wrapping the host's content in one would move children a framework
|
|
8
|
+
* renders, which a light-DOM element must not do. What the browser
|
|
9
9
|
* does NOT give is a way to open a dialog from a button without a line of script, or
|
|
10
10
|
* to close it from the backdrop. That is what this installs, once per document:
|
|
11
11
|
*
|
|
@@ -7,35 +7,25 @@
|
|
|
7
7
|
* Every custom event an aparté element dispatches on ITSELF — the set `AparteUi`
|
|
8
8
|
* forwards through its single event output, in all four wrappers.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* in the wrappers' own docs exists to receive (`<aparte-ui name="aparte-model-selector"
|
|
13
|
-
* …>`). The documented usage could not hear the thing it was documenting. Re-derived
|
|
14
|
-
* from the generated manifest, which now records every element's events because their
|
|
15
|
-
* docblocks were reattached.
|
|
10
|
+
* `scripts/check-event-map.mjs` asserts this list against every non-`window` dispatch
|
|
11
|
+
* in core.
|
|
16
12
|
*
|
|
17
|
-
* A PLUGIN's events are not here
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
13
|
+
* A PLUGIN's events are not here, `aparte-model-change` included. The reason is the
|
|
14
|
+
* same one that keeps plugin tags out of the element registry: this default is core's,
|
|
15
|
+
* and a third-party plugin's author cannot add to it, so listing ours would privilege
|
|
16
|
+
* our packages over theirs. Pass the names you need — `events: ['aparte-model-change']`
|
|
17
|
+
* — which is one line for everyone equally.
|
|
22
18
|
*
|
|
23
19
|
* Three events are deliberately NOT here for a different reason: `aparte-abort`,
|
|
24
20
|
* `aparte-compact` and `aparte-config-change` go out through `window.dispatchEvent` —
|
|
25
21
|
* they concern the whole page, not one subtree — so an element-level listener can never
|
|
26
22
|
* receive them and listing them would promise a forward that cannot happen.
|
|
27
23
|
*
|
|
28
|
-
* `aparte-message-aborted`
|
|
29
|
-
* `dispatchLifecycleEvent` dispatches
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* reach past `<AparteUi>` to `window` for no reason. The five lifecycle events are here
|
|
34
|
-
* now; the sentence above lists only what a `window` dispatch is the sole path for.
|
|
35
|
-
*
|
|
36
|
-
* `scripts/check-event-map.mjs` now asserts this list against every non-`window`
|
|
37
|
-
* dispatch in core, so "verified against core" is a check rather than a claim — which
|
|
38
|
-
* is what the first version of this docblock said while carrying seven of twenty-five.
|
|
24
|
+
* The five lifecycle events (including `aparte-message-aborted`) ARE here:
|
|
25
|
+
* `dispatchLifecycleEvent` dispatches them on the HOST ELEMENT, bubbling and composed
|
|
26
|
+
* (`client/lifecycle-events.ts`), and the composer's `window` dispatch is a second,
|
|
27
|
+
* page-wide broadcast, not the only one. The sentence above lists only what a `window`
|
|
28
|
+
* dispatch is the sole path for.
|
|
39
29
|
*/
|
|
40
30
|
export declare const APARTE_DEFAULT_UI_EVENTS: readonly ["aparte-send", "aparte-cancel", "aparte-composer-change", "aparte-composer-submit", "aparte-action-click", "aparte-attachment-preview", "aparte-action", "aparte-retry", "aparte-edit", "aparte-feedback", "aparte-message-info", "aparte-branch-navigate", "aparte-link-click", "aparte-segment-update", "aparte-reset-done", "aparte-path-changed", "aparte-conversation-select", "aparte-conversation-delete", "aparte-conversation-archive", "aparte-conversation-unarchive", "aparte-conversation-rename", "aparte-conversation-pin", "aparte-conversation-unpin", "aparte-conversation-loaded", "aparte-select-change", "aparte-select-open", "aparte-select-close", "aparte-optgroup-toggle", "aparte-suggestion", "aparte-context-threshold", "aparte-scroll-rail-jump", "aparte-sidebar-toggle", "aparte-split-resize", "aparte-message-start", "aparte-message-done", "aparte-message-error", "aparte-message-aborted", "aparte-message-paused", "aparte-tool-approval-request"];
|
|
41
31
|
/**
|
|
@@ -44,11 +34,10 @@ export declare const APARTE_DEFAULT_UI_EVENTS: readonly ["aparte-send", "aparte-
|
|
|
44
34
|
* `as const` rather than `readonly string[]` because a TYPE needs the literals: the
|
|
45
35
|
* Svelte wrapper derives its `on:` surface from `HTMLElementEventMap`, which
|
|
46
36
|
* deliberately omits the five detail-less events (a map entry would type `e.detail` as
|
|
47
|
-
* `null` and gain nothing).
|
|
48
|
-
* `
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* honest source for "every event you can listen for".
|
|
37
|
+
* `null` and gain nothing). Because the wrapper declares the tags, which removes
|
|
38
|
+
* `SvelteHTMLElements`' catch-all index signature, `on:aparte-cancel` — the stop
|
|
39
|
+
* button — only type-checks if it is listed. This list knows those five, so it is the
|
|
40
|
+
* source for "every event you can listen for".
|
|
52
41
|
*/
|
|
53
42
|
export type AparteUiEventName = typeof APARTE_DEFAULT_UI_EVENTS[number];
|
|
54
43
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"element-props.d.ts","sourceRoot":"","sources":["../../src/interop/element-props.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH
|
|
1
|
+
{"version":3,"file":"element-props.d.ts","sourceRoot":"","sources":["../../src/interop/element-props.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,wBAAwB,s8BAgDC,CAAC;AAEvC;;;;;;;;;;GAUG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,wBAAwB,CAAC,MAAM,CAAC,CAAC;AAExE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAC7B,EAAE,EAAE,WAAW,EACf,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,cAAc,GAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAA0B,GAC/D,IAAI,CAsEN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aparte-stream-parser.d.ts","sourceRoot":"","sources":["../../src/parsers/aparte-stream-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EACR,aAAa,EAIhB,MAAM,mBAAmB,CAAC;AAO3B,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KAAK,IAAI,IAAI;IAKb;;OAEG;IACH,QAAQ,IAAI,QAAQ,CAAC,iBAAiB,CAAC;IAQvC,OAAO,CAAC,UAAU;IAuBlB,OAAO,CAAC,cAAc;IA8GtB,OAAO,CAAC,eAAe;IAgCvB,OAAO,CAAC,cAAc;IA0CtB,OAAO,CAAC,mBAAmB;IAc3B,OAAO,CAAC,kBAAkB;IAgD1B;;;;;;OAMG;IACH,OAAO,CAAC,WAAW;IAanB;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,OAAO;IAoBf;;;;;OAKG;IACH,OAAO,CAAC,WAAW;IA0BnB;;;;OAIG;IACH,OAAO,CAAC,eAAe;IA8BvB,OAAO,CAAC,mBAAmB;IAU3B,OAAO,CAAC,WAAW;IAKnB;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,OAAO,CAAC,OAAO;IAKf,OAAO,CAAC,kBAAkB;IAQ1B,OAAO,CAAC,kBAAkB;IAS1B,OAAO,CAAC,sBAAsB;IAQ9B,OAAO,CAAC,eAAe;IASvB,OAAO,CAAC,sBAAsB;CAQjC;AAMD;;;GAGG;AACH,wBAAgB,uBAAuB,CACnC,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,yBAAyB,GACpC,aAAa,EAAE,CAKjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aparte-icon.d.ts","sourceRoot":"","sources":["../../../src/primitives/icon/aparte-icon.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"aparte-icon.d.ts","sourceRoot":"","sources":["../../../src/primitives/icon/aparte-icon.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,qBAAa,UAAW,SAAQ,WAAW;IACvC,MAAM,KAAK,kBAAkB,IAAI,MAAM,EAAE,CAAqB;IAE9D,OAAO,CAAC,YAAY,CAA6B;IAEjD,iBAAiB,IAAI,IAAI;IAWzB,oBAAoB,IAAI,IAAI;IAK5B,wBAAwB,IAAI,IAAI;IAIhC,OAAO,CAAC,OAAO;CAalB"}
|
|
@@ -16,8 +16,9 @@
|
|
|
16
16
|
*
|
|
17
17
|
* Keep the label one text node: the `label` property reads only the FIRST text node — that
|
|
18
18
|
* is what keeps the injected status dot out of it — so wrapping the label in an element
|
|
19
|
-
* makes `label` fall back to `value`. The select's
|
|
20
|
-
*
|
|
19
|
+
* makes `label` fall back to `value`. The select's trigger reads the option's text without
|
|
20
|
+
* the status dot and without an `.aparte-option__meta` child, the optional line under the
|
|
21
|
+
* label (a description); its search filter reads the full `textContent`, that line included.
|
|
21
22
|
*
|
|
22
23
|
* `data-status` is a rendering hook, not state core interprets: any non-empty value
|
|
23
24
|
* appends an `aria-hidden` `.aparte-status-dot` span as the last child, and only
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aparte-option.d.ts","sourceRoot":"","sources":["../../../src/primitives/select/aparte-option.ts"],"names":[],"mappings":"AAKA
|
|
1
|
+
{"version":3,"file":"aparte-option.d.ts","sourceRoot":"","sources":["../../../src/primitives/select/aparte-option.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,qBAAa,YAAa,SAAQ,WAAW;IACzC,MAAM,KAAK,kBAAkB,IAAI,MAAM,EAAE,CAExC;IAED,iBAAiB,IAAI,IAAI;IAMzB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAY5C,IAAI,KAAK,IAAI,MAAM,CAElB;IAED,IAAI,KAAK,CAAC,GAAG,EAAE,MAAM,EAEpB;IAED,IAAI,KAAK,IAAI,MAAM,CAIlB;IAED,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED,IAAI,QAAQ,CAAC,GAAG,EAAE,OAAO,EAExB;IAED,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED,IAAI,QAAQ,CAAC,GAAG,EAAE,OAAO,EAExB;IAED,OAAO,CAAC,mBAAmB;IAI3B,OAAO,CAAC,gBAAgB;CAkB3B"}
|
|
@@ -40,7 +40,7 @@ export interface AparteSelectChangeDetail {
|
|
|
40
40
|
* @attr {string} value - The selected option's value.
|
|
41
41
|
* @attr {string} placeholder - Shown while nothing is selected.
|
|
42
42
|
* @attr {boolean} disabled - Blocks opening the dropdown.
|
|
43
|
-
* @attr {boolean} searchable - Adds a filter field above the options.
|
|
43
|
+
* @attr {boolean} searchable - Adds a filter field above the options. Set or removed later, the field comes or goes.
|
|
44
44
|
* @attr {boolean} open - Reflects (and controls) whether the dropdown is open.
|
|
45
45
|
*
|
|
46
46
|
* @fires {CustomEvent<AparteSelectChangeDetail>} aparte-select-change - The selection changed; carries the new value, its label and the previous value.
|
|
@@ -50,10 +50,10 @@ export interface AparteSelectChangeDetail {
|
|
|
50
50
|
* @cssprop [--aparte-select-bg=var(--aparte-surface-1)] - Trigger background. (The dropdown panel has its own token, `--aparte-select-dropdown-bg`, in both themes.)
|
|
51
51
|
* @cssprop [--aparte-select-border=var(--aparte-border-control)] - Border of the trigger and of the dropdown.
|
|
52
52
|
* @cssprop [--aparte-select-border-hover=var(--aparte-border-control)] - Trigger border on hover.
|
|
53
|
-
* @cssprop [--aparte-radius-select=var(--aparte-radius-md)] - Corner radius of the trigger and the dropdown — the theme's knob, beside `--aparte-radius-input` and the others.
|
|
53
|
+
* @cssprop [--aparte-radius-select=var(--aparte-radius-md)] - Corner radius of the trigger and the dropdown — the theme's knob, beside `--aparte-radius-input` and the others.
|
|
54
54
|
* @cssprop [--aparte-select-text=var(--aparte-text)] - Colour of the trigger label (and of the options).
|
|
55
55
|
* @cssprop [--aparte-select-chevron=var(--aparte-text-muted)] - Colour of the chevron, which rotates 180° while open.
|
|
56
|
-
* @cssprop [--aparte-select-dropdown-bg=var(--aparte-surface-1)] - Dropdown panel background, in both themes (`--aparte-surface-1` is dark-aware)
|
|
56
|
+
* @cssprop [--aparte-select-dropdown-bg=var(--aparte-surface-1)] - Dropdown panel background, in both themes (`--aparte-surface-1` is dark-aware), so a transparent trigger does not make the panel see-through.
|
|
57
57
|
* @cssprop [--aparte-select-shadow=0 1px 3px rgba(0, 0, 0, 0.08), 0 10px 28px rgba(0, 0, 0, 0.16)] - Dropdown panel shadow.
|
|
58
58
|
* @cssprop [--aparte-select-z=var(--aparte-z-dropdown)] - `z-index` of the dropdown. It is `position: fixed`, so this is the one knob that decides whether it lands above the rest of your page.
|
|
59
59
|
*
|
|
@@ -86,24 +86,19 @@ export declare class AparteSelect extends HTMLElement {
|
|
|
86
86
|
*
|
|
87
87
|
* `_setupEventListeners()` runs on EVERY `connectedCallback`, and `_render()`'s
|
|
88
88
|
* idempotency guard means the host element survives a re-connect. So each move
|
|
89
|
-
* of the element (a portal, a Vue teleport, any framework re-parent)
|
|
90
|
-
* another option-click listener
|
|
91
|
-
*
|
|
92
|
-
* document-level handlers and could not touch this one.
|
|
93
|
-
*
|
|
94
|
-
* This is verbatim the bug class `aparte-chat-viewport` documents having fixed
|
|
95
|
-
* for its own listeners.
|
|
89
|
+
* of the element (a portal, a Vue teleport, any framework re-parent) would add
|
|
90
|
+
* another option-click listener and one click would fire the change handler once
|
|
91
|
+
* per re-connect, unless the same bound reference is removed and re-added.
|
|
96
92
|
*/
|
|
97
93
|
private _boundHandleOptionClick;
|
|
98
94
|
private _boundHandleDocumentClick;
|
|
99
95
|
private _boundHandleKeydown;
|
|
100
96
|
/**
|
|
101
|
-
* The trigger's own three, bound for the same reason
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
* fixed for the option click and not for its neighbours.
|
|
97
|
+
* The trigger's own three, bound for the same reason as the option click: the
|
|
98
|
+
* trigger element survives a re-connect, so listeners that cannot be removed would
|
|
99
|
+
* stack. One re-parent would make a click toggle twice — open and shut inside the
|
|
100
|
+
* same click, i.e. a control that looks dead — and announce `aparte-select-open`
|
|
101
|
+
* twice.
|
|
107
102
|
*/
|
|
108
103
|
private _boundHandleTriggerClick;
|
|
109
104
|
private _boundHandleTriggerKeydown;
|
|
@@ -116,15 +111,23 @@ export declare class AparteSelect extends HTMLElement {
|
|
|
116
111
|
set value(val: string);
|
|
117
112
|
get open(): boolean;
|
|
118
113
|
set open(val: boolean);
|
|
114
|
+
/** The filter field: the combobox of a `searchable` select, since it takes the focus. */
|
|
115
|
+
private _buildSearchInput;
|
|
116
|
+
/**
|
|
117
|
+
* `searchable` set or removed after the first render: the field comes or goes, and the
|
|
118
|
+
* combobox moves with it, so a framework that
|
|
119
|
+
* binds it a beat late — Angular's `[searchable]` inside an `@if` — still gets a field.
|
|
120
|
+
*/
|
|
121
|
+
private _applySearchable;
|
|
119
122
|
private _render;
|
|
120
123
|
private _setupMutationObserver;
|
|
121
124
|
/**
|
|
122
125
|
* Put the roving highlight back after the options changed underneath it.
|
|
123
126
|
*
|
|
124
127
|
* `data-active` lives on an option ELEMENT, so replacing the list throws it
|
|
125
|
-
* away while `_activeIndex` still claims a position: the highlight
|
|
126
|
-
* `aria-activedescendant`
|
|
127
|
-
* the next ArrowDown
|
|
128
|
+
* away while `_activeIndex` still claims a position: without this the highlight
|
|
129
|
+
* disappears, `aria-activedescendant` points at an id no longer in the document, and
|
|
130
|
+
* the next ArrowDown moves from the stale index — skipping an option. Only when
|
|
128
131
|
* open and only when a position was held, so a refresh never invents one.
|
|
129
132
|
*/
|
|
130
133
|
private _restoreActive;
|
|
@@ -163,8 +166,8 @@ export declare class AparteSelect extends HTMLElement {
|
|
|
163
166
|
* A `combobox` is NAMED by that attribute and VALUED by its visible label span, so
|
|
164
167
|
* the name is the control and nothing else. A `button` — the shape a `searchable`
|
|
165
168
|
* trigger takes, since the filter field is then the combobox — is named by its
|
|
166
|
-
* CONTENT, which this very attribute overrides:
|
|
167
|
-
* "Pick a model, button"
|
|
169
|
+
* CONTENT, which this very attribute overrides: a name of just the placeholder
|
|
170
|
+
* ("Pick a model, button") would never say which model is selected. So the button's
|
|
168
171
|
* name carries both halves, and drops the second when it would only repeat the
|
|
169
172
|
* first (nothing selected: the value IS the placeholder).
|
|
170
173
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aparte-select.d.ts","sourceRoot":"","sources":["../../../src/primitives/select/aparte-select.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAE5B,OAAO,sBAAsB,CAAC;AAI9B,MAAM,WAAW,wBAAwB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH,qBAAa,YAAa,SAAQ,WAAW;IACzC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAK;IAC7B,mFAAmF;IACnF,OAAO,CAAC,MAAM,CAAC,WAAW,CAAK;IAE/B,OAAO,CAAC,MAAM,CAAM;IACpB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,YAAY,CAAM;IAC1B,OAAO,CAAC,QAAQ,CAA4B;IAC5C,OAAO,CAAC,SAAS,CAA4B;IAC7C,OAAO,CAAC,YAAY,CAAiC;IACrD,OAAO,CAAC,SAAS,CAAiC;IAGlD
|
|
1
|
+
{"version":3,"file":"aparte-select.d.ts","sourceRoot":"","sources":["../../../src/primitives/select/aparte-select.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAE5B,OAAO,sBAAsB,CAAC;AAI9B,MAAM,WAAW,wBAAwB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH,qBAAa,YAAa,SAAQ,WAAW;IACzC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAK;IAC7B,mFAAmF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AAC,eAAe;IAMvB,yEAAyE;IACzE,OAAO,CAAC,WAAW;IAOnB;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAInB,mFAAmF;IACnF,OAAO,CAAC,YAAY;IAMpB,uFAAuF;IACvF,OAAO,CAAC,UAAU;IAoBlB,+CAA+C;IAC/C,OAAO,CAAC,YAAY;IAUpB,OAAO,CAAC,OAAO;IAQf,OAAO,CAAC,aAAa;IAgCrB,OAAO,CAAC,cAAc;IAyBtB,OAAO,CAAC,eAAe;IA2BvB,OAAO,CAAC,aAAa;IAYrB;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,YAAY;IAapB;;;OAGG;IACH,OAAO,CAAC,cAAc;IAatB,OAAO,CAAC,mBAAmB;IA4C3B,OAAO,CAAC,iBAAiB;IASzB,OAAO,CAAC,cAAc;IAWtB,OAAO,CAAC,WAAW;CAatB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-stream.d.ts","sourceRoot":"","sources":["../../src/renderers/markdown-stream.ts"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAC;AAG1E;;;;;;;;;GASG;AACH,MAAM,MAAM,wBAAwB,GAAG,WAAW,GAAG;IACjD,UAAU,CAAC,EAAE;QAAE,QAAQ,EAAE,+BAA+B,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CACtF,CAAC;AAqCF;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACjC,IAAI,EAAE,wBAAwB,EAC9B,SAAS,EAAE,OAAO,EAClB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,OAAO,GACnB,IAAI,CAsDN;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"markdown-stream.d.ts","sourceRoot":"","sources":["../../src/renderers/markdown-stream.ts"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAC;AAG1E;;;;;;;;;GASG;AACH,MAAM,MAAM,wBAAwB,GAAG,WAAW,GAAG;IACjD,UAAU,CAAC,EAAE;QAAE,QAAQ,EAAE,+BAA+B,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CACtF,CAAC;AAqCF;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACjC,IAAI,EAAE,wBAAwB,EAC9B,SAAS,EAAE,OAAO,EAClB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,OAAO,GACnB,IAAI,CAsDN;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,CAsBhE"}
|
|
@@ -25,12 +25,12 @@ export declare function declineDefaultRenderers(config?: AparteConfig): void;
|
|
|
25
25
|
* Fill in the built-in renderers for the types nobody has claimed — called by the
|
|
26
26
|
* bubble the first time a segment has no renderer.
|
|
27
27
|
*
|
|
28
|
-
* Why lazily and not at import time:
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* `[Unknown segment type: text]` for every reply
|
|
32
|
-
*
|
|
33
|
-
*
|
|
28
|
+
* Why lazily and not at import time: `registerDefaultRenderers()` is called by
|
|
29
|
+
* `new AparteClient()`, and an app on the bring-your-own-loop path — the one the guide
|
|
30
|
+
* tells you not to construct a client on — never makes that call. Without this sweep
|
|
31
|
+
* it would render `[Unknown segment type: text]` for every reply, with bubbles,
|
|
32
|
+
* streaming and scrolling all working, which reads as a bug in the consumer's own
|
|
33
|
+
* loop rather than as a missing call.
|
|
34
34
|
*
|
|
35
35
|
* Strictly additive: a type someone registered themselves is never replaced, so a
|
|
36
36
|
* custom `text` renderer survives the sweep triggered by a `code` segment.
|
|
@@ -59,17 +59,11 @@ export declare function injectRendererStyles(config?: AparteConfig): void;
|
|
|
59
59
|
/**
|
|
60
60
|
* Put a tool renderer's stylesheet on the page, once per tool name.
|
|
61
61
|
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
* CSS
|
|
67
|
-
* around it by re-injecting the styles themselves at startup, which is the shape of a
|
|
68
|
-
* library defect, not of an app's concern.
|
|
69
|
-
*
|
|
70
|
-
* Called from the render path as well as the two live ones, so "the renderer drew" and
|
|
71
|
-
* "its rules are on the page" cannot come apart again. Keyed by tool NAME rather than by
|
|
72
|
-
* the CSS text, which is what the two inline copies did and what makes it idempotent.
|
|
62
|
+
* Called from the stream adapter's `tool-start` handler and from `toolCallRenderer` on
|
|
63
|
+
* every render, a stored conversation's included (it looks the renderer up and delegates
|
|
64
|
+
* to it; nothing replays `tool-start` for history), so "the renderer drew"
|
|
65
|
+
* and "its rules are on the page" cannot come apart. Keyed by tool NAME rather than by
|
|
66
|
+
* the CSS text, which makes it idempotent.
|
|
73
67
|
*/
|
|
74
68
|
export declare function injectToolRendererStyles(toolName: string, renderer: {
|
|
75
69
|
getStyles?: () => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segment-renderers.d.ts","sourceRoot":"","sources":["../../src/renderers/segment-renderers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACR,iBAAiB,EACjB,qBAAqB,EACxB,MAAM,mBAAmB,CAAC;AAO3B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"segment-renderers.d.ts","sourceRoot":"","sources":["../../src/renderers/segment-renderers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACR,iBAAiB,EACjB,qBAAqB,EACxB,MAAM,mBAAmB,CAAC;AAO3B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAqFvD;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,iBAAiB,EAC/D,QAAQ,EAAE,qBAAqB,CAAC,CAAC,CAAC,EAClC,MAAM,GAAE,YAA8B,GACvC,IAAI,CAGN;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,GAAE,YAA8B,GAAG,IAAI,CAEpF;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,GAAE,YAA8B,GAAG,IAAI,CAQxF;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,GAAE,YAA8B,GAAG,IAAI,CAEpG;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAC9B,IAAI,EAAE,MAAM,EACZ,MAAM,GAAE,YAA8B,GACvC,qBAAqB,GAAG,SAAS,CAEnC;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,GAAE,YAA8B,GAAG,SAAS,qBAAqB,EAAE,CAExG;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,GAAE,YAA8B,GAAG,MAAM,CAKpF;AAmBD,wBAAgB,oBAAoB,CAAC,MAAM,GAAE,YAA8B,GAAG,IAAI,CAuBjF;AAGD;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,MAAM,CAAA;CAAE,GAAG,IAAI,CAUvG;AAED,wBAAgB,wBAAwB,CAAC,MAAM,GAAE,YAA8B,GAAG,IAAI,CAiBrF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../../../src/renderers/segments/code.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../../../src/renderers/segments/code.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACR,qBAAqB,EACrB,iBAAiB,EACpB,MAAM,sBAAsB,CAAC;AAW9B,eAAO,MAAM,YAAY,EAAE,qBAAqB,CAAC,iBAAiB,CAoFjE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../src/renderers/segments/error.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../src/renderers/segments/error.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACR,qBAAqB,EACrB,kBAAkB,EACrB,MAAM,sBAAsB,CAAC;AAE9B,eAAO,MAAM,aAAa,EAAE,qBAAqB,CAAC,kBAAkB,CAwCnE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../src/renderers/segments/text.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACR,qBAAqB,EACrB,iBAAiB,EACpB,MAAM,sBAAsB,CAAC;AAE9B;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,EAAE,qBAAqB,CAAC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../src/renderers/segments/text.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACR,qBAAqB,EACrB,iBAAiB,EACpB,MAAM,sBAAsB,CAAC;AAE9B;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,EAAE,qBAAqB,CAAC,iBAAiB,CA2BjE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thinking.d.ts","sourceRoot":"","sources":["../../../src/renderers/segments/thinking.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACR,qBAAqB,EACrB,qBAAqB,EACxB,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"thinking.d.ts","sourceRoot":"","sources":["../../../src/renderers/segments/thinking.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACR,qBAAqB,EACrB,qBAAqB,EACxB,MAAM,sBAAsB,CAAC;AAqB9B,eAAO,MAAM,gBAAgB,EAAE,qBAAqB,CAAC,qBAAqB,CAkFzE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-call.d.ts","sourceRoot":"","sources":["../../../src/renderers/segments/tool-call.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tool-call.d.ts","sourceRoot":"","sources":["../../../src/renderers/segments/tool-call.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACR,qBAAqB,EACrB,qBAAqB,EACxB,MAAM,sBAAsB,CAAC;AA6J9B,eAAO,MAAM,gBAAgB,EAAE,qBAAqB,CAAC,qBAAqB,CAoNzE,CAAC"}
|
|
@@ -52,10 +52,9 @@ export declare class AparteMessageRepository {
|
|
|
52
52
|
/**
|
|
53
53
|
* Every message the tree holds — every branch, not just the active path.
|
|
54
54
|
*
|
|
55
|
-
* `getMessages()
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* segments into the bubble which replaced it. No order is promised beyond
|
|
55
|
+
* Unlike `getMessages()`, which walks head → root, this also sees a turn that a
|
|
56
|
+
* retry has taken off the active path, so it answers questions about the whole
|
|
57
|
+
* conversation ("is anything still streaming?"). No order is promised beyond
|
|
59
58
|
* insertion: a caller that needs the topology reads `export()`.
|
|
60
59
|
*/
|
|
61
60
|
getAllMessages(): AparteMessage[];
|
|
@@ -84,9 +83,7 @@ export declare class AparteMessageRepository {
|
|
|
84
83
|
* Remove all descendants of `messageId` (inclusive) and, when the head was among
|
|
85
84
|
* them, set `head` to the parent of `messageId`. Used by edit/truncate flows.
|
|
86
85
|
*
|
|
87
|
-
* A head in a branch this call did not touch stays where it is
|
|
88
|
-
* relocated regardless, which took the active path out of the version the reader was
|
|
89
|
-
* on for a truncate somewhere else entirely.
|
|
86
|
+
* A head in a branch this call did not touch stays where it is.
|
|
90
87
|
*
|
|
91
88
|
* @param messageId The first message to remove
|
|
92
89
|
*/
|
|
@@ -106,9 +103,8 @@ export declare class AparteMessageRepository {
|
|
|
106
103
|
/**
|
|
107
104
|
* Import a previously-exported snapshot, rebuilding the full tree and
|
|
108
105
|
* restoring the active head. Replaces any existing content (calls `clear()`
|
|
109
|
-
* first).
|
|
110
|
-
*
|
|
111
|
-
* Map and parents are always inserted before their children.
|
|
106
|
+
* first). `export()` writes messages in topological order (parent before
|
|
107
|
+
* child), which is the order this expects.
|
|
112
108
|
*/
|
|
113
109
|
import(exported: ExportedMessageRepository): void;
|
|
114
110
|
/**
|
|
@@ -116,11 +112,8 @@ export declare class AparteMessageRepository {
|
|
|
116
112
|
* Compatible with the assistant-ui ExportedMessageRepository format.
|
|
117
113
|
*
|
|
118
114
|
* Walked from the root through each node's `children`, so a parent is always
|
|
119
|
-
* written before its children
|
|
120
|
-
*
|
|
121
|
-
* under one inserted after it (`addOrUpdateMessage` with a known id and a newer
|
|
122
|
-
* parent). The snapshot then listed the child first, and `import()` threw "parent
|
|
123
|
-
* not found" on the very tree this method had just produced.
|
|
115
|
+
* written before its children, even after `addOrUpdateMessage` re-parented an
|
|
116
|
+
* existing node under a newer one; `import()` relies on that order.
|
|
124
117
|
*/
|
|
125
118
|
export(): ExportedMessageRepository;
|
|
126
119
|
private _link;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-repository.d.ts","sourceRoot":"","sources":["../../src/runtime/message-repository.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAsBvD,sDAAsD;AACtD,MAAM,MAAM,yBAAyB,GAAG;IACpC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,aAAa,CAAC;QAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC,CAAC;CACxE,CAAC;AAaF,qBAAa,uBAAuB;IAChC,OAAO,CAAC,MAAM,CAA+B;IAC7C,OAAO,CAAC,KAAK,CAAyB;IACtC,OAAO,CAAC,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MAAM,GAAG,aAAa,GAAG,SAAS;IAIrD;;;;;;;OAOG;IACH,cAAc,IAAI,aAAa,EAAE;IAMjC;;;;OAIG;IACH,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE;IASxC;;;;OAIG;IACH,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,EAAE,aAAa,GAAG,IAAI;IAkCzE;;;;;;;OAOG;IACH,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAQvC;;;;;;;OAOG;IACH,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IA8BlC;;OAEG;IACH,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,IAAI;IAMvE;;;;OAIG;IACH,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAgBrC,oDAAoD;IACpD,KAAK,IAAI,IAAI;IAMb;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,EAAE,yBAAyB,GAAG,IAAI;IAoCjD;;;;;;;OAOG;IACH,MAAM,IAAI,yBAAyB;IAgBnC,OAAO,CAAC,KAAK;IAUb,OAAO,CAAC,OAAO;IA0Bf,OAAO,CAAC,aAAa;IAQrB,OAAO,CAAC,kBAAkB;CAW7B"}
|
|
@@ -55,7 +55,9 @@ export interface AparteAgentHandlerOptions {
|
|
|
55
55
|
* resume checks read what it returns: the loop runs on that, not on what the browser sent.
|
|
56
56
|
*/
|
|
57
57
|
prepareRequest?: (request: AparteChatRequest, req: Request) => AparteChatRequest | Promise<AparteChatRequest>;
|
|
58
|
+
/** How many model turns one run may take before it stops. @default 10 */
|
|
58
59
|
maxTurns?: number;
|
|
60
|
+
/** How long one tool call may run, in milliseconds, before it is abandoned. @default 300000 (5 minutes) */
|
|
59
61
|
toolTimeoutMs?: number;
|
|
60
62
|
/** How long a suspended run can wait for its answer. @default 7 days */
|
|
61
63
|
ticketMaxAgeMs?: number;
|