@aparte/core 0.17.3 → 0.19.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.
Files changed (54) hide show
  1. package/dist/client/agent-runner.d.ts +27 -0
  2. package/dist/client/agent-runner.d.ts.map +1 -0
  3. package/dist/client/aparte-client.d.ts +77 -2
  4. package/dist/client/aparte-client.d.ts.map +1 -1
  5. package/dist/client/stream-adapter.d.ts.map +1 -1
  6. package/dist/client/wire-history.d.ts +33 -0
  7. package/dist/client/wire-history.d.ts.map +1 -0
  8. package/dist/components/conversation-list/aparte-conversation-list.d.ts +15 -0
  9. package/dist/components/conversation-list/aparte-conversation-list.d.ts.map +1 -1
  10. package/dist/conversations/conversation-controller.d.ts +1 -0
  11. package/dist/conversations/conversation-controller.d.ts.map +1 -1
  12. package/dist/conversations/index.d.ts +1 -1
  13. package/dist/conversations/index.d.ts.map +1 -1
  14. package/dist/conversations/types.d.ts +14 -0
  15. package/dist/conversations/types.d.ts.map +1 -1
  16. package/dist/custom-elements.json +10883 -10064
  17. package/dist/{dialog-triggers-DwTGKWeU.js → dialog-triggers-xA3T--rt.js} +1132 -454
  18. package/dist/dialog-triggers-xA3T--rt.js.map +1 -0
  19. package/dist/index.css +1 -1
  20. package/dist/index.d.ts +5 -4
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +86 -45
  23. package/dist/index.js.map +1 -1
  24. package/dist/index.node.d.ts +5 -4
  25. package/dist/index.node.d.ts.map +1 -1
  26. package/dist/index.node.js +35 -33
  27. package/dist/index.node.js.map +1 -1
  28. package/dist/interop/element-props.d.ts +1 -1
  29. package/dist/interop/element-props.d.ts.map +1 -1
  30. package/dist/parsers/aparte-event-stream.d.ts.map +1 -1
  31. package/dist/transport/agent-handler.d.ts +104 -0
  32. package/dist/transport/agent-handler.d.ts.map +1 -0
  33. package/dist/transport/agent-ticket.d.ts +48 -0
  34. package/dist/transport/agent-ticket.d.ts.map +1 -0
  35. package/dist/transport/index.d.ts +1 -0
  36. package/dist/transport/index.d.ts.map +1 -1
  37. package/dist/types/event-map.d.ts +4 -1
  38. package/dist/types/event-map.d.ts.map +1 -1
  39. package/dist/types/events.d.ts +16 -0
  40. package/dist/types/events.d.ts.map +1 -1
  41. package/dist/types/index.d.ts +1 -1
  42. package/dist/types/index.d.ts.map +1 -1
  43. package/dist/types/models.d.ts +10 -0
  44. package/dist/types/models.d.ts.map +1 -1
  45. package/dist/types/segments.d.ts +11 -0
  46. package/dist/types/segments.d.ts.map +1 -1
  47. package/dist/types/tools.d.ts +6 -0
  48. package/dist/types/tools.d.ts.map +1 -1
  49. package/dist/utils/ndjson.d.ts +13 -0
  50. package/dist/utils/ndjson.d.ts.map +1 -0
  51. package/dist/utils/segments.d.ts +11 -3
  52. package/dist/utils/segments.d.ts.map +1 -1
  53. package/package.json +2 -2
  54. package/dist/dialog-triggers-DwTGKWeU.js.map +0 -1
@@ -15,7 +15,7 @@
15
15
  * TypeScript consumers fully typed on the server; `registerAllComponents()` is a
16
16
  * no-op here (there is nothing to register without a DOM).
17
17
  */
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, 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';
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';
19
19
  export { AparteErrorCode, AparteError, contentToText } from './types/index.js';
20
20
  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
21
  export type { AparteScrollRailJumpDetail, AparteScrollRailEvery, AparteSidebarToggleDetail } from './components/index.js';
@@ -29,15 +29,15 @@ export type { AparteSuggestion, AparteSuggestionEventDetail } from './components
29
29
  export type { AparteContextLevel, AparteContextThresholdEventDetail } from './components/index.js';
30
30
  export { registerSegmentRenderer, unregisterSegmentRenderer, getSegmentRenderer, collectRendererStyles, registerDefaultRenderers, installDefaultRenderersOnce, declineDefaultRenderers, getAllRenderers, } from './renderers/index.js';
31
31
  export { populateBubbleFromMessage } from './components/bubble/bubble-sync.js';
32
- export type { AparteConversation, AparteConversationMeta, AparteStorageAdapter, AparteAttachmentRow, } from './conversations/index.js';
32
+ export type { AparteConversation, AparteConversationMeta, AparteStorageAdapter, AparteAttachmentRow, AparteConversationLoadedDetail, } from './conversations/index.js';
33
33
  export { APARTE_CONVERSATION_SCHEMA_VERSION } from './conversations/index.js';
34
34
  export { AparteConversationManager, type ConversationManagerOptions, type AparteConversationTitleProvider, } from './conversations/index.js';
35
35
  export { AparteConversationController, type AparteChatBinding, type AparteConversationControllerOptions, } from './conversations/index.js';
36
36
  export { AparteChatHost, type AparteChatHostBinding, type AparteChatHostOptions, } from './host/index.js';
37
37
  export { AparteStreamParser, parseMarkdownToSegments, parseAparteEventStream } from './parsers/index.js';
38
38
  export type { AparteStreamParserOptions, AparteThinkingDelimiterPair, AparteParserState, AparteParserResult } from './parsers/index.js';
39
- export { AparteDirectTransport, AparteBackendTransport, createAparteChatHandler, isFormatAdapter } from './transport/index.js';
40
- export type { AparteTransport, AparteTransportContext, AparteFormatAdapter, AparteVendorRequest, BackendTransportOptions, DirectTransportOptions, AparteChatHandlerOptions, } from './transport/index.js';
39
+ export { AparteDirectTransport, AparteBackendTransport, createAparteChatHandler, createAparteAgentHandler, isFormatAdapter } from './transport/index.js';
40
+ export type { AparteTransport, AparteTransportContext, AparteFormatAdapter, AparteVendorRequest, BackendTransportOptions, DirectTransportOptions, AparteChatHandlerOptions, AparteAgentHandlerOptions, AparteAgentTool, AparteAgentRequestBody, } from './transport/index.js';
41
41
  export { aparteGlobalConfig, AparteConfig, APARTE_DEFAULT_BUBBLE_ACTIONS, APARTE_DEFAULT_HOST_HANDLERS } from './config/index.js';
42
42
  export type { AparteConfigChangeEventDetail } from './config/index.js';
43
43
  export { resolveConfig, attachConfig, detachConfig, runWithConfig, contextConfig, APARTE_HOST_ATTR } from './config/index.js';
@@ -48,6 +48,7 @@ export { APARTE_DEFAULT_ICON_FALLBACKS, APARTE_DEFAULT_LOCALE, defaultSanitizer,
48
48
  export { AparteClient } from './client/aparte-client.js';
49
49
  export type { AparteClientOptions, AparteToolApprovalResolver } from './client/aparte-client.js';
50
50
  export { createStreamAdapter, readableToAsyncIterable } from './client/stream-adapter.js';
51
+ export { createAgentStreamRunner, type AgentStreamRunnerOptions } from './client/agent-runner.js';
51
52
  export type { AparteStreamRunEvent, AparteStreamRunEmitter, StreamAdapterTarget, CreateStreamAdapterOptions, AparteStreamRunner, AparteStreamRunOptions } from './client/stream-adapter.js';
52
53
  export { AparteMessageRepository } from './runtime/message-repository.js';
53
54
  export type { ExportedMessageRepository } from './runtime/message-repository.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.node.d.ts","sourceRoot":"","sources":["../src/index.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;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,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,aAAa,EACb,2BAA2B,EAC3B,wBAAwB,EACxB,4BAA4B,EAC5B,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EAC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,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,CAS5C;AAED,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC"}
@@ -1,4 +1,4 @@
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 } from "./dialog-triggers-DwTGKWeU.js";
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-xA3T--rt.js";
2
2
  function registerAllComponents() {
3
3
  if (typeof customElements !== "undefined") {
4
4
  console.warn(
@@ -36,38 +36,40 @@ export {
36
36
  z as contentToText,
37
37
  B as contextConfig,
38
38
  C as copyText,
39
- D as createAparteChatHandler,
40
- E as createStreamAdapter,
41
- F as cssEscape,
42
- G as declineDefaultRenderers,
43
- H as defaultSanitizer,
44
- I as detachConfig,
45
- J as escapeAttr,
46
- K as escapeHtml,
47
- L as filesToAttachments,
48
- M as getAllRenderers,
49
- N as getSegmentRenderer,
50
- O as installDefaultRenderersOnce,
51
- P as installDialogTriggersOnce,
52
- Q as isAwaitingReply,
53
- R as isFormatAdapter,
54
- S as isSafeUrl,
55
- T as isSegmentSettled,
56
- U as parseAparteEventStream,
57
- V as parseMarkdownToSegments,
58
- W as populateBubbleFromMessage,
59
- X as readableToAsyncIterable,
39
+ D as createAgentStreamRunner,
40
+ E as createAparteAgentHandler,
41
+ F as createAparteChatHandler,
42
+ G as createStreamAdapter,
43
+ H as cssEscape,
44
+ I as declineDefaultRenderers,
45
+ J as defaultSanitizer,
46
+ K as detachConfig,
47
+ L as escapeAttr,
48
+ M as escapeHtml,
49
+ N as filesToAttachments,
50
+ O as getAllRenderers,
51
+ P as getSegmentRenderer,
52
+ Q as installDefaultRenderersOnce,
53
+ R as installDialogTriggersOnce,
54
+ S as isAwaitingReply,
55
+ T as isFormatAdapter,
56
+ U as isSafeUrl,
57
+ V as isSegmentSettled,
58
+ W as parseAparteEventStream,
59
+ X as parseMarkdownToSegments,
60
+ Y as populateBubbleFromMessage,
61
+ Z as readableToAsyncIterable,
60
62
  registerAllComponents,
61
- Y as registerDefaultRenderers,
62
- Z as registerSegmentRenderer,
63
- _ as requestUserInput,
64
- $ as resolveConfig,
65
- a0 as revokeAttachmentUrls,
66
- a1 as runWithConfig,
67
- a2 as segmentDuration,
68
- a3 as segmentTiming,
69
- a4 as subscribeConfigChange,
70
- a5 as unregisterSegmentRenderer,
71
- a6 as uuid
63
+ _ as registerDefaultRenderers,
64
+ $ as registerSegmentRenderer,
65
+ a0 as requestUserInput,
66
+ a1 as resolveConfig,
67
+ a2 as revokeAttachmentUrls,
68
+ a3 as runWithConfig,
69
+ a4 as segmentDuration,
70
+ a5 as segmentTiming,
71
+ a6 as subscribeConfigChange,
72
+ a7 as unregisterSegmentRenderer,
73
+ a8 as uuid
72
74
  };
73
75
  //# sourceMappingURL=index.node.js.map
@@ -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 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} 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, isFormatAdapter } from './transport/index.js';\nexport type {\n AparteTransport,\n AparteTransportContext,\n AparteFormatAdapter,\n AparteVendorRequest,\n BackendTransportOptions,\n DirectTransportOptions,\n AparteChatHandlerOptions,\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 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":";AA4UO,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. 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;"}
@@ -37,7 +37,7 @@
37
37
  * dispatch in core, so "verified against core" is a check rather than a claim — which
38
38
  * is what the first version of this docblock said while carrying seven of twenty-five.
39
39
  */
40
- 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-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-tool-approval-request"];
40
+ 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
41
  /**
42
42
  * Every event name aparté dispatches ON an element, as a type.
43
43
  *
@@ -1 +1 @@
1
- {"version":3,"file":"element-props.d.ts","sourceRoot":"","sources":["../../src/interop/element-props.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,wBAAwB,+4BA6CC,CAAC;AAEvC;;;;;;;;;;;GAWG;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,CAuEN"}
1
+ {"version":3,"file":"element-props.d.ts","sourceRoot":"","sources":["../../src/interop/element-props.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,wBAAwB,s8BAgDC,CAAC;AAEvC;;;;;;;;;;;GAWG;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,CAuEN"}
@@ -1 +1 @@
1
- {"version":3,"file":"aparte-event-stream.d.ts","sourceRoot":"","sources":["../../src/parsers/aparte-event-stream.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,wBAAgB,sBAAsB,CAClC,MAAM,EAAE,cAAc,CAAC,UAAU,CAAC,GACnC,cAAc,CAAC,iBAAiB,CAAC,CAsCnC"}
1
+ {"version":3,"file":"aparte-event-stream.d.ts","sourceRoot":"","sources":["../../src/parsers/aparte-event-stream.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAG3D,wBAAgB,sBAAsB,CAClC,MAAM,EAAE,cAAc,CAAC,UAAU,CAAC,GACnC,cAAc,CAAC,iBAAiB,CAAC,CAkBnC"}
@@ -0,0 +1,104 @@
1
+ import type { StreamDeferredOutcome } from '@aparte/engine';
2
+ import type { AparteChatRequest } from '../types/chat.js';
3
+ import type { AparteAIProvider } from '../types/model-provider.js';
4
+ import type { AparteApprovalPolicy, AparteTool, AparteToolHandler } from '../types/tools.js';
5
+ import type { AparteTransport } from './types.js';
6
+ /** A server tool: its definition (what the model sees) and its handler (what runs here). */
7
+ export interface AparteAgentTool {
8
+ tool: AparteTool;
9
+ handler: AparteToolHandler;
10
+ /**
11
+ * Accept the `payload` an approval may carry — data merged into the call's input.
12
+ * Off by default: from a browser, a payload rewrites what the model chose to call
13
+ * with, so only a tool whose approval UI edits the arguments on purpose opts in.
14
+ */
15
+ acceptsApprovalPayload?: boolean;
16
+ }
17
+ export interface AparteAgentHandlerOptions {
18
+ /** Your server-side format adapters, keyed by the `providerId` the client sends. */
19
+ providers: Record<string, AparteAIProvider>;
20
+ /**
21
+ * Gate run on EVERY request before any work. **Required**, for the reason
22
+ * `createAparteChatHandler` gives: this endpoint spends your key and runs your
23
+ * tools. Return `false` for 401, a `Response` to answer yourself, `true` to proceed.
24
+ */
25
+ authorize: (req: Request) => boolean | Response | Promise<boolean | Response>;
26
+ /**
27
+ * Signs the pending calls of a suspended run, so a resume runs only calls this
28
+ * server emitted. **Required**, at least 32 characters. An array rotates: the first
29
+ * signs, all verify.
30
+ */
31
+ secret: string | readonly string[];
32
+ /** The tools that run here. `tool.needsApproval` is the gate. */
33
+ tools?: readonly AparteAgentTool[];
34
+ /** The vendor key for a providerId, from env or a secret store. */
35
+ resolveKey?: (providerId: string) => string | undefined | Promise<string | undefined>;
36
+ /** Server-side rules, per call: `allow`, `ask`, `deny` (refused without asking). */
37
+ approvalPolicy?: AparteApprovalPolicy;
38
+ /**
39
+ * Accept tools the browser declares and runs itself (`ask_user`). `true` by default;
40
+ * `false` refuses them; a list allows those names only. A browser tool named like a
41
+ * server tool is always refused.
42
+ */
43
+ clientTools?: boolean | readonly string[];
44
+ /**
45
+ * Rewrite the request before the run — impose your system prompt, drop messages. The
46
+ * resume checks read what it returns: the loop runs on that, not on what the browser sent.
47
+ */
48
+ prepareRequest?: (request: AparteChatRequest, req: Request) => AparteChatRequest | Promise<AparteChatRequest>;
49
+ maxTurns?: number;
50
+ toolTimeoutMs?: number;
51
+ /** How long a suspended run can wait for its answer. @default 7 days */
52
+ ticketMaxAgeMs?: number;
53
+ /**
54
+ * Called with a ticket's id before a resume. Return `false` to refuse it (409) — the
55
+ * hook for a host that can remember used tickets and make them single-use. A server
56
+ * that stores nothing cannot tell a replay from a first use.
57
+ */
58
+ onTicket?: (ticketId: string) => boolean | Promise<boolean>;
59
+ /** How the vendor is called. @default an `AparteDirectTransport` (the key is on this server by design). */
60
+ transport?: AparteTransport;
61
+ /** Web Crypto. @default `globalThis.crypto.subtle`; on Node 18, pass `(await import('node:crypto')).webcrypto.subtle`. */
62
+ crypto?: SubtleCrypto;
63
+ }
64
+ /** What `createAgentStreamRunner` POSTs. */
65
+ export interface AparteAgentRequestBody {
66
+ v: 1;
67
+ providerId: string;
68
+ messageId: string;
69
+ request: AparteChatRequest;
70
+ /** Definitions of the tools the browser runs; the server marks them external. */
71
+ clientTools?: AparteTool[];
72
+ resume?: {
73
+ ticket: string;
74
+ outcomes: Record<string, StreamDeferredOutcome>;
75
+ };
76
+ }
77
+ /**
78
+ * Build a framework-free handler that runs the agent loop on your server — next to your
79
+ * tools — and streams it to `createAgentStreamRunner` in the browser.
80
+ *
81
+ * The browser's `AparteClient` keeps doing what it does: rows, Stop, the approval panel
82
+ * and your approval policy. A call that needs a person, or a tool that runs in the
83
+ * browser, SUSPENDS the run: the stream ends on `run-suspended` with a signed ticket, the
84
+ * page asks, and a second request carries the ticket and the answer. Nothing is stored
85
+ * here — the paused call lives in the conversation the app saves — so the person can
86
+ * leave and answer days later.
87
+ *
88
+ * The wire is NDJSON: one `StreamRunEvent` per line, the suspension line with its
89
+ * `ticket`, and a `run-error` line (sanitised) when the run fails after the stream began.
90
+ *
91
+ * ```ts
92
+ * // app/api/agent/route.ts (Next.js)
93
+ * import { createAparteAgentHandler } from '@aparte/core';
94
+ * export const POST = createAparteAgentHandler({
95
+ * providers: { openai: createOpenAICompatProvider(presets.OPENAI) },
96
+ * resolveKey: () => process.env.OPENAI_KEY,
97
+ * authorize: (req) => isSignedIn(req),
98
+ * secret: process.env.AGENT_SECRET!,
99
+ * tools: [{ tool: readFile, handler: readFileHandler }],
100
+ * });
101
+ * ```
102
+ */
103
+ export declare function createAparteAgentHandler(options: AparteAgentHandlerOptions): (req: Request) => Promise<Response>;
104
+ //# sourceMappingURL=agent-handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-handler.d.ts","sourceRoot":"","sources":["../../src/transport/agent-handler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAqB,qBAAqB,EAAkB,MAAM,gBAAgB,CAAC;AAC/F,OAAO,KAAK,EAAE,iBAAiB,EAAqB,MAAM,kBAAkB,CAAC;AAC7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,EAAE,oBAAoB,EAAE,UAAU,EAAkB,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC7G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAMlD,4FAA4F;AAC5F,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,iBAAiB,CAAC;IAC3B;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;CACpC;AAED,MAAM,WAAW,yBAAyB;IACtC,oFAAoF;IACpF,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC5C;;;;OAIG;IACH,SAAS,EAAE,CAAC,GAAG,E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AE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAA;KAAE,CAAC;CAChF;AAID;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,yBAAyB,GAAG,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,CAkMhH"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * The continuation ticket of a suspended agent run (`createAparteAgentHandler`).
3
+ *
4
+ * Between the pause and the resume, the run's pending calls travel through the browser,
5
+ * so the server must not take them back on the client's word: a client that could name
6
+ * its own "pending, approved" call would reach a server tool the model never asked for.
7
+ * The server signs the calls it emitted and runs only those.
8
+ *
9
+ * What it does not do, and the guide says so: it does not make a tool's input
10
+ * trustworthy — the MODEL chose it, so a tool still checks its own rights — and it is not
11
+ * single-use, because a server that stores nothing cannot tell a replay from a first use
12
+ * (the handler's `onTicket` is the hook for a host that can).
13
+ *
14
+ * Web Crypto only: present in browsers, Node ≥ 19, Deno, Bun and Workers. Node 18 passes
15
+ * its own `SubtleCrypto` to the handler.
16
+ */
17
+ /** A call the ticket vouches for, as the model emitted it. */
18
+ export interface AparteTicketCall {
19
+ id: string;
20
+ name: string;
21
+ input: unknown;
22
+ }
23
+ /** What the server signs when a run suspends. */
24
+ export interface AparteTicketPayload {
25
+ v: 1;
26
+ /** When it was signed, in ms since the epoch. */
27
+ iat: number;
28
+ /** The assistant message the run was streaming — a ticket answers that message only. */
29
+ messageId: string;
30
+ calls: AparteTicketCall[];
31
+ }
32
+ /**
33
+ * JSON with its object keys sorted, so the same input signs and compares the same
34
+ * whatever order a serializer wrote its keys in. `undefined` members are dropped, as
35
+ * `JSON.stringify` drops them.
36
+ */
37
+ export declare function canonicalJson(value: unknown): string;
38
+ /** `base64url(payload).base64url(HMAC-SHA256(secret, payload))`, the payload in canonical JSON. */
39
+ export declare function signTicket(payload: AparteTicketPayload, secret: string, subtle: SubtleCrypto): Promise<string>;
40
+ /**
41
+ * The payload, if the signature matches one of `secrets` (the first signs, all verify, so
42
+ * a secret can be rotated) and it is not older than `maxAgeMs`; `null` otherwise — for a
43
+ * forged, expired or malformed ticket alike, so a caller cannot probe which it was.
44
+ */
45
+ export declare function verifyTicket(ticket: string, secrets: readonly string[], subtle: SubtleCrypto, maxAgeMs: number, now?: number): Promise<AparteTicketPayload | null>;
46
+ /** Same calls, in the same order: ids, names and inputs (compared canonically). */
47
+ export declare function sameCalls(a: readonly AparteTicketCall[], b: readonly AparteTicketCall[]): boolean;
48
+ //# sourceMappingURL=agent-ticket.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-ticket.d.ts","sourceRoot":"","sources":["../../src/transport/agent-ticket.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,8DAA8D;AAC9D,MAAM,WAAW,gBAAgB;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;CAClB;AAED,iDAAiD;AACjD,MAAM,WAAW,mBAAmB;IAChC,CAAC,EAAE,CAAC,CAAC;IACL,iDAAiD;IACjD,GAAG,EAAE,MAAM,CAAC;IACZ,wFAAwF;IACxF,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,gBAAgB,EAAE,CAAC;CAC7B;AAID;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CASpD;AAkBD,mGAAmG;AACnG,wBAAsB,UAAU,CAAC,OAAO,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,CAIpH;AAED;;;;GAIG;AACH,wBAAsB,YAAY,CAC9B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,MAAM,EAChB,GAAG,GAAE,MAAmB,GACzB,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CA+BrC;AAED,mFAAmF;AACnF,wBAAgB,SAAS,CAAC,CAAC,EAAE,SAAS,gBAAgB,EAAE,EAAE,CAAC,EAAE,SAAS,gBAAgB,EAAE,GAAG,OAAO,CAKjG"}
@@ -3,4 +3,5 @@ export { isFormatAdapter, readAuth } from './types.js';
3
3
  export { AparteDirectTransport, type DirectTransportOptions } from './direct-transport.js';
4
4
  export { AparteBackendTransport, type BackendTransportOptions } from './backend-transport.js';
5
5
  export { createAparteChatHandler, type AparteChatHandlerOptions } from './backend-handler.js';
6
+ export { createAparteAgentHandler, type AparteAgentHandlerOptions, type AparteAgentTool, type AparteAgentRequestBody } from './agent-handler.js';
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/transport/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACR,eAAe,EACf,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,GACtB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,KAAK,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC3F,OAAO,EAAE,sBAAsB,EAAE,KAAK,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAC9F,OAAO,EAAE,uBAAuB,EAAE,KAAK,wBAAwB,EAAE,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/transport/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACR,eAAe,EACf,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,GACtB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,KAAK,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC3F,OAAO,EAAE,sBAAsB,EAAE,KAAK,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAC9F,OAAO,EAAE,uBAAuB,EAAE,KAAK,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAC9F,OAAO,EAAE,wBAAwB,EAAE,KAAK,yBAAyB,EAAE,KAAK,eAAe,EAAE,KAAK,sBAAsB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -29,7 +29,7 @@
29
29
  * template (Angular parses a `:` in an event name as a `target:event` selector,
30
30
  * so a colon name could never be `(aparte:x)`-bound there).
31
31
  */
32
- import type { AparteSendEventDetail, AparteRetryEventDetail, AparteEditEventDetail, AparteActionEventDetail, ApartePathChangedEventDetail, AparteBranchNavigateEventDetail, AparteFeedbackEventDetail, AparteMessageInfoEventDetail, AparteMessageDoneEventDetail, AparteModelChangeEventDetail, AparteApprovalModeChangeEventDetail, AparteMessageStartEventDetail, AparteMessageErrorEventDetail, AparteMessageAbortedEventDetail, AparteAbortEventDetail, AparteCompactEventDetail, AparteCompactDoneEventDetail, AparteCompactStartEventDetail, AparteCompactErrorEventDetail, AparteAttachmentPreviewEventDetail, AparteLinkClickEventDetail } from './events.js';
32
+ import type { AparteSendEventDetail, AparteRetryEventDetail, AparteEditEventDetail, AparteActionEventDetail, ApartePathChangedEventDetail, AparteBranchNavigateEventDetail, AparteFeedbackEventDetail, AparteMessageInfoEventDetail, AparteMessageDoneEventDetail, AparteModelChangeEventDetail, AparteApprovalModeChangeEventDetail, AparteMessageStartEventDetail, AparteMessageErrorEventDetail, AparteMessageAbortedEventDetail, AparteMessagePausedEventDetail, AparteAbortEventDetail, AparteCompactEventDetail, AparteCompactDoneEventDetail, AparteCompactStartEventDetail, AparteCompactErrorEventDetail, AparteAttachmentPreviewEventDetail, AparteLinkClickEventDetail } from './events.js';
33
33
  import type { AparteActionClickEventDetail } from '../components/composer/aparte-composer-action.js';
34
34
  import type { AparteSuggestionEventDetail } from '../components/suggestions/aparte-suggestions.js';
35
35
  import type { AparteContextThresholdEventDetail } from '../components/context/aparte-context.js';
@@ -40,6 +40,7 @@ import type { AparteOptgroupToggleEventDetail } from '../primitives/select/apart
40
40
  import type { AparteConfigChangeEventDetail } from '../config/aparte-config.js';
41
41
  import type { AparteToolApprovalRequestDetail } from './tools.js';
42
42
  import type { AparteSegmentUpdateEventDetail } from './segments.js';
43
+ import type { AparteConversationLoadedDetail } from '../conversations/types.js';
43
44
  import type { AparteSelectChangeDetail } from '../primitives/select/aparte-select.js';
44
45
  import type { AparteConversationSelectDetail, AparteConversationDeleteDetail, AparteConversationArchiveDetail, AparteConversationPinDetail, AparteConversationRenameDetail } from '../components/conversation-list/aparte-conversation-list.js';
45
46
  import type { AparteComposerChangeEventDetail } from '../components/composer/aparte-composer.js';
@@ -79,10 +80,12 @@ interface AparteEventMap {
79
80
  'aparte-conversation-unarchive': CustomEvent<AparteConversationArchiveDetail>;
80
81
  'aparte-conversation-rename': CustomEvent<AparteConversationRenameDetail>;
81
82
  'aparte-conversation-pin': CustomEvent<AparteConversationPinDetail>;
83
+ 'aparte-conversation-loaded': CustomEvent<AparteConversationLoadedDetail>;
82
84
  'aparte-conversation-unpin': CustomEvent<AparteConversationPinDetail>;
83
85
  'aparte-message-start': CustomEvent<AparteMessageStartEventDetail>;
84
86
  'aparte-message-error': CustomEvent<AparteMessageErrorEventDetail>;
85
87
  'aparte-message-aborted': CustomEvent<AparteMessageAbortedEventDetail>;
88
+ 'aparte-message-paused': CustomEvent<AparteMessagePausedEventDetail>;
86
89
  'aparte-abort': CustomEvent<AparteAbortEventDetail>;
87
90
  'aparte-compact': CustomEvent<AparteCompactEventDetail>;
88
91
  'aparte-compact-start': CustomEvent<AparteCompactStartEventDetail>;
@@ -1 +1 @@
1
- {"version":3,"file":"event-map.d.ts","sourceRoot":"","sources":["../../src/types/event-map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8B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22 @@ export interface AparteMessageErrorEventDetail {
247
247
  /** The failure, with its `code` — not a string, unlike `aparte-compact-error`. */
248
248
  error: AparteError;
249
249
  }
250
+ /**
251
+ * Detail payload for `aparte-message-paused`.
252
+ * Dispatched when a server loop pauses the turn on calls only the page can answer — an
253
+ * approval, a browser tool. The turn is not over (`aparte-message-done` follows the
254
+ * resume), but the reply is worth saving now: its paused calls carry the server's
255
+ * ticket, and a conversation saved here can still be answered after a reload. The
256
+ * conversation manager persists on it.
257
+ *
258
+ * @event aparte-message-paused
259
+ */
260
+ export interface AparteMessagePausedEventDetail {
261
+ /** Host element id, when the `<aparte-chat>` has one. */
262
+ targetId?: string;
263
+ /** Id of the paused reply. */
264
+ messageId: string;
265
+ }
250
266
  /**
251
267
  * Detail payload for `aparte-message-aborted`.
252
268
  * Dispatched when the user stops a turn.
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/types/events.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAMrE;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IAClC,qCAAqC;IACrC,OAAO,EAAE,MAAM,CAAC;IAEhB,mCAAmC;IACnC,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,yEAAyE;IACzE,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IAEf;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0FAA0F;IAC1F,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAMD;;;;;;GAMG;AACH,MAAM,WAAW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MAAM,CAAC;CACrB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,6BAA6B;IAC1C,mDAAmD;IACnD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,4BAA4B;IACzC,iFAAiF;IACjF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,iBAAiB,GAAG,SAAS,GAAG,WAAW,CAAC;IAC/D,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8DAA8D;IAC9D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4GAA4G;IAC5G,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,6BAA6B;IAC1C,qCAAqC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAMD;;;;;;;GAOG;AACH,MAAM,WAAW,kCAAkC;IAC/C,6CAA6C;IAC7C,GAAG,EAAE,MAAM,CAAC;IACZ,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;CAChB;AAGD;;;;;;;;;;GAUG;AACH,MAAM,WAAW,mCAAmC;IAChD,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,4BAA4B;IAC5B,YAAY,EAAE,MAAM,CAAC;CACxB"}
@@ -17,7 +17,7 @@ export type { AparteChatRequest, AparteChatResponse, AparteChatMessage, AparteCo
17
17
  export { contentToText } from './chat.js';
18
18
  export type { AparteTool, AparteToolCall, AparteApprovalPolicy, AparteApprovalRuling, AparteToolResult, AparteToolHandler, AparteToolContext, AparteToolRenderer, AparteToolSummary, AparteToolApprovalRequestDetail, } from './tools.js';
19
19
  export { AparteErrorCode, AparteError } from './errors.js';
20
- export type { AparteModelChangeEventDetail, AparteApprovalModeChangeEventDetail, AparteMessageDoneEventDetail, AparteMessageStartEventDetail, AparteMessageErrorEventDetail, AparteMessageAbortedEventDetail, AparteAbortEventDetail, AparteCompactEventDetail, AparteCompactDoneEventDetail, AparteCompactStartEventDetail, AparteCompactErrorEventDetail, AparteAttachmentPreviewEventDetail, AparteMessageInfoEventDetail, } from './events.js';
20
+ export type { AparteModelChangeEventDetail, AparteApprovalModeChangeEventDetail, AparteMessageDoneEventDetail, AparteMessageStartEventDetail, AparteMessageErrorEventDetail, AparteMessageAbortedEventDetail, AparteMessagePausedEventDetail, AparteAbortEventDetail, AparteCompactEventDetail, AparteCompactDoneEventDetail, AparteCompactStartEventDetail, AparteCompactErrorEventDetail, AparteAttachmentPreviewEventDetail, AparteMessageInfoEventDetail, } from './events.js';
21
21
  export type { AparteElementAttributes, AparteElementTagName, AparteAttrValue, AparteTemplateAttrs, AparteNoAttributes, AparteChatAttributes, AparteChatViewportAttributes, AparteChatBubbleAttributes, AparteChatStatusAttributes, AparteComposerAttributes, AparteComposerInputAttributes, AparteComposerActionAttributes, AparteComposerAddAttachmentAttributes, AparteComposerToolbarAttributes, AparteConversationListAttributes, AparteSelectAttributes, AparteOptionAttributes, AparteOptgroupAttributes, AparteProgressSpinnerAttributes } from './element-attributes.js';
22
22
  export type { AparteChatImperativeApi, AparteUiHandle } from './imperative-api.js';
23
23
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,YAAY,EACR,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,oBAAoB,EACpB,iBAAiB,EACpB,MAAM,aAAa,CAAC;AAErB,YAAY,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAMpF,YAAY,EACR,qBAAqB,E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AC7B,6BAA6B,EAC7B,kCAAkC,EAClC,4BAA4B,GAC/B,MAAM,aAAa,CAAC;AAKrB,YAAY,EACR,uBAAuB,EACvB,oBAAoB,EACpB,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,4BAA4B,EAC5B,0BAA0B,EAC1B,0BAA0B,EAC1B,wBAAwB,EACxB,6BAA6B,EAC7B,8BAA8B,EAC9B,qCAAqC,EACrC,+BAA+B,EAC/B,gCAAgC,EAChC,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,+BAA+B,EAClC,MAAM,yBAAyB,CAAC;AAGjC,YAAY,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,YAAY,EACR,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,oBAAoB,EACpB,iBAAiB,EACpB,MAAM,aAAa,CAAC;AAErB,YAAY,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAMpF,YAAY,EACR,qBAAqB,EACrB,iBAAiB,EACjB,+BAA+B,EAC/B,0BAA0B,EAC1B,4BAA4B,EAC5B,sBAAsB,EACtB,qBAAqB,EACrB,yBAAyB,EACzB,uBAAuB,EAC1B,MAAM,aAAa,CAAC;AAMrB,YAAY,EACR,mBAAmB,EACnB,oBAAoB,EACvB,MAAM,cAAc,CAAC;AAMtB,YAAY,EACR,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,8BAA8B,EACjC,MAAM,eAAe,CAAC;AAgBvB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cAAc,EAAE,MAAM,qBAAqB,CAAC"}
@@ -154,6 +154,16 @@ export interface AparteMessage {
154
154
  attachments?: AparteAttachment[];
155
155
  /** Token usage + timing reported by the provider for assistant messages. */
156
156
  usage?: import('./chat.js').AparteUsage;
157
+ /**
158
+ * The provider, model and temperature an assistant turn ran on, written by
159
+ * `AparteClient` when the turn starts. A turn a server paused is resumed on them after
160
+ * a reload (`resumeDeferred`), not on whatever model is selected by then.
161
+ */
162
+ model?: {
163
+ providerId: string;
164
+ modelId: string;
165
+ temperature?: number;
166
+ };
157
167
  /**
158
168
  * This message is the summary `@aparte/plugin-compaction` injected in place of the
159
169
  * turns it summarised (a host that summarises by other means sets the flag too). Its role is `user` — the summary is context handed to the
@@ -1 +1 @@
1
- {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/types/models.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAMnD;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,SAAS,GAAG,WAAW,GAAG,WAAW,GAAG,OAAO,GAAG,SAAS,CAAC;AAMhG,mDAAmD;AACnD,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,WAAW,CAAC;AAMpD;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC7B,2CAA2C;IAC3C,EAAE,EAAE,MAAM,CAAC;IAEX,qCAAqC;IACrC,IAAI,EAAE,MAAM,CAAC;IAEb,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAC;IAEb,+CAA+C;IAC/C,GAAG,EAAE,MAAM,CAAC;IAEZ,kCAAkC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,0CAA0C;IAC1C,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEnC;;;;;OAKG;IACH,IAAI,CAA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