@aparte/core 0.24.0 → 0.26.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 (106) hide show
  1. package/dist/client/agent-runner.d.ts.map +1 -1
  2. package/dist/client/aparte-client.d.ts +38 -76
  3. package/dist/client/aparte-client.d.ts.map +1 -1
  4. package/dist/client/stream-adapter.d.ts.map +1 -1
  5. package/dist/client/wire-history.d.ts +78 -0
  6. package/dist/client/wire-history.d.ts.map +1 -1
  7. package/dist/components/bubble/aparte-chat-bubble.d.ts +152 -2
  8. package/dist/components/bubble/aparte-chat-bubble.d.ts.map +1 -1
  9. package/dist/components/bubble/bubble-sync.d.ts +5 -1
  10. package/dist/components/bubble/bubble-sync.d.ts.map +1 -1
  11. package/dist/components/bubble/checkpoint-separator.d.ts +40 -0
  12. package/dist/components/bubble/checkpoint-separator.d.ts.map +1 -0
  13. package/dist/components/chat/aparte-chat.d.ts.map +1 -1
  14. package/dist/components/composer/aparte-composer-action.d.ts.map +1 -1
  15. package/dist/components/composer/aparte-composer-add-attachment.d.ts.map +1 -1
  16. package/dist/components/composer/aparte-composer-attachments.d.ts.map +1 -1
  17. package/dist/components/composer/aparte-composer-cancel.d.ts.map +1 -1
  18. package/dist/components/composer/aparte-composer-input.d.ts.map +1 -1
  19. package/dist/components/composer/aparte-composer-send.d.ts.map +1 -1
  20. package/dist/components/composer/aparte-composer-toolbar.d.ts.map +1 -1
  21. package/dist/components/composer/aparte-composer.d.ts.map +1 -1
  22. package/dist/components/context/aparte-context.d.ts +157 -25
  23. package/dist/components/context/aparte-context.d.ts.map +1 -1
  24. package/dist/components/conversation-list/aparte-conversation-list.d.ts.map +1 -1
  25. package/dist/components/elicitation/aparte-elicitation.d.ts.map +1 -1
  26. package/dist/components/scroll-rail/aparte-scroll-rail.d.ts.map +1 -1
  27. package/dist/components/sidebar/aparte-sidebar.d.ts.map +1 -1
  28. package/dist/components/split/aparte-split.d.ts.map +1 -1
  29. package/dist/components/status/aparte-chat-status.d.ts.map +1 -1
  30. package/dist/components/suggestions/aparte-suggestions.d.ts.map +1 -1
  31. package/dist/components/viewport/aparte-chat-viewport.d.ts +7 -0
  32. package/dist/components/viewport/aparte-chat-viewport.d.ts.map +1 -1
  33. package/dist/config/aparte-config.d.ts +47 -1
  34. package/dist/config/aparte-config.d.ts.map +1 -1
  35. package/dist/config/locale.d.ts +62 -4
  36. package/dist/config/locale.d.ts.map +1 -1
  37. package/dist/context/checkpoint-state.d.ts +70 -0
  38. package/dist/context/checkpoint-state.d.ts.map +1 -0
  39. package/dist/context/checkpoint.d.ts +28 -0
  40. package/dist/context/checkpoint.d.ts.map +1 -0
  41. package/dist/context/measure.d.ts +148 -0
  42. package/dist/context/measure.d.ts.map +1 -0
  43. package/dist/context/restore.d.ts +24 -0
  44. package/dist/context/restore.d.ts.map +1 -0
  45. package/dist/conversations/conversation-controller.d.ts +13 -4
  46. package/dist/conversations/conversation-controller.d.ts.map +1 -1
  47. package/dist/conversations/conversation-manager.d.ts +6 -0
  48. package/dist/conversations/conversation-manager.d.ts.map +1 -1
  49. package/dist/custom-elements.json +15347 -12878
  50. package/dist/{dialog-triggers-BqXRdHWZ.js → defer-hydration-8vI8xNNx.js} +1179 -374
  51. package/dist/defer-hydration-8vI8xNNx.js.map +1 -0
  52. package/dist/generated/element-attributes.d.ts +8 -2
  53. package/dist/generated/element-attributes.d.ts.map +1 -1
  54. package/dist/{glyphs-C8z2oJUg.js → glyphs-2bym5jl5.js} +1 -1
  55. package/dist/{glyphs-C8z2oJUg.js.map → glyphs-2bym5jl5.js.map} +1 -1
  56. package/dist/host/aparte-chat-host.d.ts +41 -2
  57. package/dist/host/aparte-chat-host.d.ts.map +1 -1
  58. package/dist/icons.js +2 -2
  59. package/dist/index.css +1 -1
  60. package/dist/index.d.ts +7 -2
  61. package/dist/index.d.ts.map +1 -1
  62. package/dist/index.js +1059 -95
  63. package/dist/index.js.map +1 -1
  64. package/dist/index.node.d.ts +6 -2
  65. package/dist/index.node.d.ts.map +1 -1
  66. package/dist/index.node.js +39 -29
  67. package/dist/index.node.js.map +1 -1
  68. package/dist/interop/defer-hydration.d.ts +34 -0
  69. package/dist/interop/defer-hydration.d.ts.map +1 -0
  70. package/dist/primitives/icon/aparte-icon.d.ts.map +1 -1
  71. package/dist/primitives/progress-spinner/aparte-progress-spinner.d.ts.map +1 -1
  72. package/dist/primitives/select/aparte-optgroup.d.ts.map +1 -1
  73. package/dist/primitives/select/aparte-option.d.ts.map +1 -1
  74. package/dist/primitives/select/aparte-select.d.ts.map +1 -1
  75. package/dist/renderers/index.d.ts +2 -1
  76. package/dist/renderers/index.d.ts.map +1 -1
  77. package/dist/renderers/mounted-renderer.d.ts +34 -0
  78. package/dist/renderers/mounted-renderer.d.ts.map +1 -0
  79. package/dist/renderers/segment-renderers.d.ts +14 -1
  80. package/dist/renderers/segment-renderers.d.ts.map +1 -1
  81. package/dist/renderers/segments/tool-call.d.ts +2 -1
  82. package/dist/renderers/segments/tool-call.d.ts.map +1 -1
  83. package/dist/transport/agent-handler.d.ts.map +1 -1
  84. package/dist/transport/backend-handler.d.ts.map +1 -1
  85. package/dist/transport/types.d.ts +24 -4
  86. package/dist/transport/types.d.ts.map +1 -1
  87. package/dist/types/chat.d.ts +16 -1
  88. package/dist/types/chat.d.ts.map +1 -1
  89. package/dist/types/compactor.d.ts +104 -0
  90. package/dist/types/compactor.d.ts.map +1 -0
  91. package/dist/types/errors.d.ts +2 -0
  92. package/dist/types/errors.d.ts.map +1 -1
  93. package/dist/types/events.d.ts +50 -3
  94. package/dist/types/events.d.ts.map +1 -1
  95. package/dist/types/index.d.ts +5 -4
  96. package/dist/types/index.d.ts.map +1 -1
  97. package/dist/types/model-provider.d.ts +3 -0
  98. package/dist/types/model-provider.d.ts.map +1 -1
  99. package/dist/types/models.d.ts +43 -3
  100. package/dist/types/models.d.ts.map +1 -1
  101. package/dist/types/segments.d.ts +22 -4
  102. package/dist/types/segments.d.ts.map +1 -1
  103. package/dist/types/tools.d.ts +56 -0
  104. package/dist/types/tools.d.ts.map +1 -1
  105. package/package.json +2 -2
  106. package/dist/dialog-triggers-BqXRdHWZ.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"agent-runner.d.ts","sourceRoot":"","sources":["../../src/client/agent-runner.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,MAAM,WAAW,wBAAwB;IACrC,2EAA2E;IAC3E,QAAQ,EAAE,MAAM,CAAC;IACjB,2FAA2F;IAC3F,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IACpG,kCAAkC;IAClC,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IACrB,gEAAgE;IAChE,WAAW,CAAC,EAAE,kBAAkB,CAAC;CACpC;AAID;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,wBAAwB,GAAG,kBAAkB,CAuD7F"}
1
+ {"version":3,"file":"agent-runner.d.ts","sourceRoot":"","sources":["../../src/client/agent-runner.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,MAAM,WAAW,wBAAwB;IACrC,2EAA2E;IAC3E,QAAQ,EAAE,MAAM,CAAC;IACjB,2FAA2F;IAC3F,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IACpG,kCAAkC;IAClC,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IACrB,gEAAgE;IAChE,WAAW,CAAC,EAAE,kBAAkB,CAAC;CACpC;AAID;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,wBAAwB,GAAG,kBAAkB,CA8D7F"}
@@ -76,6 +76,13 @@ export interface AparteClientOptions {
76
76
  * goes out as history without inventing a status for it.
77
77
  * - 'none' — sends only the current message
78
78
  * - function — custom: receives viewport messages, returns AparteChatMessage[]
79
+ *
80
+ * With 'viewport', a checkpoint (`AparteMessage.contextSummary`, written by
81
+ * `@aparte/plugin-compaction`) shortens what goes out: the summary, then the messages
82
+ * from the checkpoint on. A function receives the WHOLE transcript, checkpoint and
83
+ * everything before it — what to send is its call. To honour the checkpoint, pass
84
+ * the messages through `historyFromCheckpoint` and send its `summary` first.
85
+ * Retry and edit rebuild the history themselves and do not call this function.
79
86
  */
80
87
  history?: 'viewport' | 'none' | ((viewportMessages: AparteMessage[]) => AparteChatMessage[]);
81
88
  /**
@@ -186,12 +193,28 @@ export interface AparteClientOptions {
186
193
  */
187
194
  export declare class AparteClient {
188
195
  private _boundHandler;
196
+ /** Between `start()` and `stop()`: the listeners are on `window`. The send handler alone is
197
+ * not the sign — the constructor prepares it without listening. */
198
+ private _listening;
189
199
  private _boundAbortHandler;
190
200
  private _boundLoadedHandler;
191
201
  private _boundRetryHandler;
192
202
  private _boundEditHandler;
193
203
  private _releaseKeyResolver;
194
204
  private _isAborted;
205
+ /** Provider and model pairs whose window was already read again after a turn (see `_readWindowAfterTurn`). */
206
+ private readonly _windowReadFor;
207
+ /**
208
+ * The current model's window, read again once after a turn when it had none.
209
+ *
210
+ * A local server that loads a model on its first request — LM Studio's just-in-time
211
+ * loading, Ollama — has no loaded window to report when the model list is fetched at
212
+ * start-up, so the model comes without one, and the gauge and the compaction have
213
+ * nothing to measure against. After a reply the model is loaded, and the provider's
214
+ * own probe finds it. Once per provider and model: a server that never says costs one
215
+ * request, not one per turn. The config announces the window when it appears.
216
+ */
217
+ private _readWindowAfterTurn;
195
218
  /**
196
219
  * Does this window event belong to this client?
197
220
  *
@@ -321,24 +344,9 @@ export declare class AparteClient {
321
344
  * using the same conversation history minus the retried reply.
322
345
  */
323
346
  /**
324
- * The registered tools, unless the current model says it cannot call one.
325
- *
326
- * Single source for the gate, so send / retry / edit cannot drift.
327
- *
328
- * The question is "did this model say it cannot", not "did it say it can": the
329
- * app sets a model id by hand (`setModelConfig`) or a selector sets it from a
330
- * fetched list, and in both cases the model's declared capabilities are commonly
331
- * unknown. `undefined` capabilities read as "can", or `tools: []` would go on
332
- * the wire while `getTools()` held the tool the app had explicitly registered,
333
- * and the model would answer that it had no such tool. Registering a tool is an explicit act by the app; silently dropping it
334
- * because a `/models` listing is terse is the library second-guessing the
335
- * developer. A model that declares its capabilities and omits function calling
336
- * is still honoured — that is a statement, and it is respected.
337
- *
338
- * Failure modes, both ways round: over-sending means a model that cannot use
339
- * tools does not call one, or its own endpoint rejects the array with an error
340
- * the developer can read. Under-sending would be silent, total, and look like a
341
- * lying model.
347
+ * The registered tools, unless the current model says it cannot call one — the gate
348
+ * lives in `toolsForCurrentModel` (with its reasoning), where the context measure reads
349
+ * the same rule, so send / retry / edit and the gauge cannot drift.
342
350
  */
343
351
  private _toolsForCurrentModel;
344
352
  private _handleRetry;
@@ -356,6 +364,13 @@ export declare class AparteClient {
356
364
  * messages, then re-stream a fresh assistant response.
357
365
  */
358
366
  private _handleEdit;
367
+ /**
368
+ * These messages as the transcript holds them NOW. A retry or an edit slices the path
369
+ * before it streams; a compaction that runs during the turn writes its checkpoint onto
370
+ * one of those messages in the transcript, and the slice still holds the objects as they
371
+ * were. Looked up by id, tree-wide, because a retry has moved the path since.
372
+ */
373
+ private _current;
359
374
  /**
360
375
  * The chain the gesture really came up, nearest node first.
361
376
  *
@@ -424,16 +439,12 @@ export declare class AparteClient {
424
439
  */
425
440
  private _messagesToChatMessages;
426
441
  /**
427
- * The one rule for what a message contributes to the wire.
428
- *
429
- * Not the slice — the contribution: a role the wire has (`user`/`assistant`), a
430
- * turn that neither failed nor is still in flight, and text that is not empty.
431
- *
432
- * `_wireText` (not `m.content`): assistant replies stream their text into
433
- * `segments`, leaving `content` as '', so without flattening every reply would be
434
- * empty here and the drop below would swallow the whole transcript.
442
+ * What the model reads in place of everything before a checkpoint: the summary, as a
443
+ * `user` message under the same preamble a legacy compaction message gets, so it is
444
+ * context and not something the person said. It may sit right before a user turn;
445
+ * `mergeAdjacentUserMessages` joins the two where the history is assembled.
435
446
  */
436
- private _wireHistory;
447
+ private _summaryMessage;
437
448
  /** The "no model selected" warning is said once per client, not once per dropped send. */
438
449
  private _warnedNoModel;
439
450
  private _handleSend;
@@ -441,56 +452,7 @@ export declare class AparteClient {
441
452
  * Build the initial messages array, prepending system prompts and conversation history.
442
453
  */
443
454
  private _buildMessages;
444
- /**
445
- * A turn that has not finished yet. `status` is OPTIONAL on `AparteMessage`, so
446
- * the question the history gates can ask is "is this still in flight?", never
447
- * "is this completed?".
448
- *
449
- * The gates below ask the first, because a host that SEEDS a transcript
450
- * — restoring a saved conversation, hydrating a server-rendered one — has no
451
- * reason to invent a status for turns that are already over. Asking "is this
452
- * completed?" would leave the cutoff at 0 and slice away the whole transcript: the
453
- * model would get the new question with no context, and nothing in the UI would say
454
- * so, because the viewport still shows every message.
455
- */
456
- private static _inFlight;
457
455
  private _toHistoryMessages;
458
- /**
459
- * A message's text as the MODEL should read it — the one mapper both history
460
- * paths use, so the compaction preamble cannot be applied on retry and edit and
461
- * forgotten on the ordinary send, which is what the first review of this feature
462
- * caught: the summary went out on every normal turn as something the user said.
463
- */
464
- private _wireText;
465
- /**
466
- * What the model is told it said last turn — reconstructed from what was
467
- * RENDERED, not from the raw-text field.
468
- *
469
- * The segments are what the reader saw, so they come first. `content` is the
470
- * fallback, and that is not vestigial: a non-streaming transport writes the whole
471
- * reply there and creates no segments at all.
472
- */
473
- private _extractText;
474
- /**
475
- * Segments → the text a model can read back.
476
- *
477
- * Fences and the language tag are kept. Without them the model re-reads its own
478
- * code as prose — which is how it starts explaining a snippet it believes it
479
- * wrote in English.
480
- *
481
- * A type core does not know — a registered block grammar's (an artifact, a
482
- * citation, a file), a consumer's custom segment — follows one rule: its
483
- * `content` if it has one, else its `fallback`, else nothing. Dropping such a
484
- * segment would make a document the model had just produced invisible on the very
485
- * next turn, so it could not be asked to change the thing it had built. An artifact
486
- * is a plugin's type like any other and follows this rule.
487
- *
488
- * `thinking` and `tool_call` stay out on purpose — the first is the model's own
489
- * scratchpad, and most APIs neither want it back nor bill for it kindly; the
490
- * second is not text: `_wireHistory` sends a reply's calls as the assistant's
491
- * `toolCalls` and the `tool` messages answering them (`wire-history.ts`).
492
- */
493
- private _segmentsToText;
494
456
  /**
495
457
  * Which of the send's pending files get inlined into the request: the
496
458
  * `rawFileInject` mode first —
@@ -1 +1 @@
1
- {"version":3,"file":"aparte-client.d.ts","sourceRoot":"","sources":["../../src/client/aparte-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAG9E,OAAO,KAAK,EAAE,sBAAsB,EAAkF,MAAM,gBAAgB,CAAC;AAM7I,OAAO,KAAK,EAAE,kBAAkB,EAA+C,MAAM,qBAAqB,CAAC;AAC3G,OAAO,KAAK,EAAoC,aAAa,EAA6C,MAAM,mBAAmB,CAAC;AAGpI,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAkC,MAAM,kBAAkB,CAAC;AA+CxG;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,0BAA0B,GAAG,sBAAsB,CAAC;AAahE;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC,GAAG,SAAS,GAA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EAAE;QAAE,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;IAC1E,UAAU,CAAC,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,CAAC;IAC1C,aAAa,CAAC,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC;IACzE,QAAQ,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,IAAI,CAAC;IAChD,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC;CACxC;AAED,MAAM,WAAW,0BAA0B;IACvC,4DAA4D;IAC5D,MAAM,EAAE,mBAAmB,CAAC;IAC5B,kEAAkE;IAClE,MAAM,EAAE,YAAY,CAAC;IACrB,qEAAqE;IACrE,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,0BAA0B,GAAG,sBAAsB,CA6O5F;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACnC,MAAM,EAAE,cAAc,CAAC,iBAAiB,CAAC,EACzC,MAAM,EAAE,WAAW,GACpB,aAAa,CAAC,iBAAiB,CAAC,CAkClC"}
@@ -11,6 +11,27 @@
11
11
  * and a call that never finished — stopped, still pending — a fixed sentence saying so.
12
12
  */
13
13
  import type { AparteChatMessage, AparteMessage, AparteSegment, AparteToolCallSegment } from '../types/index.js';
14
+ /** What a compaction summary goes out under, so the model reads it as context and not as the user's words. */
15
+ export declare const COMPACTION_PREAMBLE = "The earlier part of this conversation was compacted. This is a summary of what came before; continue from it.";
16
+ /** A summary as the model reads it: the preamble, then the text. */
17
+ export declare const underPreamble: (text: string) => string;
18
+ /**
19
+ * Merge ADJACENT `user` messages into one, so the roles a model receives alternate.
20
+ *
21
+ * Strict chat templates (Gemma 2/3, Mistral, llama.cpp with `--jinja`, vLLM) reject two
22
+ * `user` turns in a row, and once one is in the history every following turn fails the
23
+ * same way. Two ordinary situations produce it: a compaction (the summary is a `user`
24
+ * message and the turns kept after it usually start with one), and a failed turn (its
25
+ * user message stays in the transcript, its error reply is not sent, and the user writes
26
+ * again).
27
+ *
28
+ * Only `user` is merged. A `system`, `assistant` or `tool` message carries structure
29
+ * (tool calls and the ids that answer them) that concatenating would destroy. Text joins
30
+ * with a blank line; parts concatenate with a text separator between them; a string
31
+ * beside parts becomes a text part, so an image keeps its place. A history that already
32
+ * alternates comes back as the same messages.
33
+ */
34
+ export declare function mergeAdjacentUserMessages(messages: AparteChatMessage[]): AparteChatMessage[];
14
35
  /** The answer a call that never finished gives the model. */
15
36
  export declare const STOPPED_TOOL_TEXT = "The tool call was stopped before it ran.";
16
37
  /** The answer a call that ran and returned nothing gives the model — not "stopped", or it tries again. */
@@ -29,4 +50,61 @@ export declare function wireTurns(message: AparteMessage, textOf: (segments: Apa
29
50
  */
30
51
  openDeferred?: boolean;
31
52
  }): AparteChatMessage[];
53
+ /**
54
+ * A turn that has not finished yet. `status` is OPTIONAL on `AparteMessage`, so
55
+ * the question the history gates can ask is "is this still in flight?", never
56
+ * "is this completed?".
57
+ *
58
+ * The gates ask the first, because a host that SEEDS a transcript
59
+ * — restoring a saved conversation, hydrating a server-rendered one — has no
60
+ * reason to invent a status for turns that are already over. Asking "is this
61
+ * completed?" would leave the cutoff at 0 and slice away the whole transcript: the
62
+ * model would get the new question with no context, and nothing in the UI would say
63
+ * so, because the viewport still shows every message.
64
+ */
65
+ export declare const isInFlight: (m: AparteMessage) => boolean;
66
+ /**
67
+ * Segments → the text a model can read back.
68
+ *
69
+ * Fences and the language tag are kept. Without them the model re-reads its own
70
+ * code as prose — which is how it starts explaining a snippet it believes it
71
+ * wrote in English.
72
+ *
73
+ * A type core does not know — a registered block grammar's (an artifact, a
74
+ * citation, a file), a consumer's custom segment — follows one rule: its
75
+ * `content` if it has one, else its `fallback`, else nothing. Dropping such a
76
+ * segment would make a document the model had just produced invisible on the very
77
+ * next turn, so it could not be asked to change the thing it had built. An artifact
78
+ * is a plugin's type like any other and follows this rule.
79
+ *
80
+ * `thinking` and `tool_call` stay out on purpose — the first is the model's own
81
+ * scratchpad, and most APIs neither want it back nor bill for it kindly; the
82
+ * second is not text: `wireMessages` sends a reply's calls as the assistant's
83
+ * `toolCalls` and the `tool` messages answering them (`wireTurns`).
84
+ */
85
+ export declare function segmentsToWireText(segments: AparteMessage['segments']): string;
86
+ /**
87
+ * A message's text as the MODEL should read it — the one mapper both history
88
+ * paths use, so the compaction preamble cannot be applied on retry and edit and
89
+ * forgotten on the ordinary send, which is what the first review of this feature
90
+ * caught: the summary went out on every normal turn as something the user said.
91
+ */
92
+ export declare function messageWireText(message: AparteMessage): string;
93
+ /**
94
+ * The one rule for what a list of messages contributes to the wire.
95
+ *
96
+ * Not the slice — the contribution: a role the wire has (`user`/`assistant`), a
97
+ * turn that neither failed nor is still in flight, and text that is not empty. A reply
98
+ * that called tools goes out as the calls and their answers, in the order it showed
99
+ * them (`wireTurns`); every other message keeps its one text, compaction preamble
100
+ * included.
101
+ *
102
+ * `messageWireText` (not `m.content`): assistant replies stream their text into
103
+ * `segments`, leaving `content` as '', so without flattening every reply would be
104
+ * empty here and the drop below would swallow the whole transcript.
105
+ *
106
+ * Pure, so the client that SENDS this history and the measure that ESTIMATES it
107
+ * (`estimateWireTokens`) read the same serialisation and cannot drift.
108
+ */
109
+ export declare function wireMessages(messages: AparteMessage[]): AparteChatMessage[];
32
110
  //# sourceMappingURL=wire-history.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wire-history.d.ts","sourceRoot":"","sources":["../../src/client/wire-history.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,aAAa,EAAE,qBAAq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;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACrB,GACP,iBAAiB,EAAE,CA2CrB;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,UAAU,MAAO,aAAa,KAAG,OAA6D,CAAC;AAE5G;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,aAAa,CAAC,UAAU,CAAC,GAAG,MAAM,CAqB9E;AAiBD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,CAG9D;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,aAAa,EAAE,GAAG,iBAAiB,EAAE,CAa3E"}
@@ -1,4 +1,4 @@
1
- import type { AparteSegment, AparteAttachment, AparteUsage, AparteMessage } from '../../types/index.js';
1
+ import type { AparteSegment, AparteAttachment, AparteUsage, AparteFinishReason, AparteMessage, AparteContextSummary } from '../../types/index.js';
2
2
  import { type AparteConfigAware } from '../../config/config-context.js';
3
3
  /**
4
4
  * One message: plain content or a list of rich segments, in light DOM.
@@ -53,6 +53,8 @@ import { type AparteConfigAware } from '../../config/config-context.js';
53
53
  * @attr {number | string} timestamp - Epoch milliseconds or a date string; a numeric string is read as milliseconds.
54
54
  * @attr {string} message-id - How streaming and the action bar address this bubble.
55
55
  * @attr {boolean} streaming - Hides the action bar and shows the caret while a reply is in flight.
56
+ * @attr {string} data-checkpoint - `pending` or `failed`: what a compaction is doing to this message, which it will carry as a checkpoint. The viewport and the framework host set it from `aparte-compact-start` / `-error` and take it off again; the bubble draws the separator's "Summarising the context…" or Retry from it. Read it, do not write it.
57
+ * @attr {string} data-checkpoint-reason - Why the compaction failed, beside `data-checkpoint="failed"`: the separator gives it as the failure's tooltip and to screen readers. Set and cleared with `data-checkpoint`; read it, do not write it.
56
58
  * @attr {string} name - Who wrote the message: shown in the header, and the message's accessible name ("Message from {name}"). Leave it out for the reader and the assistant, whose names come from the locale.
57
59
  *
58
60
  * @fires {CustomEvent<AparteActionEventDetail>} aparte-action - A custom action-bar button was pressed.
@@ -62,6 +64,8 @@ import { type AparteConfigAware } from '../../config/config-context.js';
62
64
  * @fires {CustomEvent<AparteMessageInfoEventDetail>} aparte-message-info - The info affordance was pressed.
63
65
  * @fires {CustomEvent<AparteBranchNavigateEventDetail>} aparte-branch-navigate - The `‹1/2›` picker moved between sibling versions.
64
66
  * @fires {CustomEvent<AparteAttachmentPreviewEventDetail>} aparte-attachment-preview - An attached image was clicked, asking the app to open it full-size.
67
+ * @fires {CustomEvent<AparteCompactEventDetail>} aparte-compact - Retry was pressed on a summary that failed: asks whatever answers compaction (`@aparte/plugin-compaction`) to try again for this chat. Dispatched on `window`.
68
+ * @fires {CustomEvent<AparteCompactDoneEventDetail>} aparte-compact-done - Restore was confirmed: every checkpoint was removed and the model reads the original messages again. `detail.restored` is `true`. Dispatched on `window`.
65
69
  * @fires {CustomEvent<AparteLinkClickEventDetail>} aparte-link-click - A link in the message body is about to be followed. Cancelable: `preventDefault()` keeps the browser from navigating, so a host can route the link itself.
66
70
  *
67
71
  * @cssprop [--aparte-message-gap=var(--aparte-space-6)] - Gap between the avatar column and the body (the viewport reuses it between messages).
@@ -164,6 +168,23 @@ export declare class AparteChatBubble extends HTMLElement implements AparteConfi
164
168
  private _role;
165
169
  private _attachments;
166
170
  private _usage;
171
+ private _finishReason;
172
+ /** The checkpoint this message carries: the separator above it is drawn from it. */
173
+ private _contextSummary;
174
+ /**
175
+ * This message is one an older compaction wrote (`compaction: true`), as the host told
176
+ * us. `null` until told: the `data-kind="compaction"` attribute the viewport and the
177
+ * wrappers stamp from the same flag answers meanwhile.
178
+ */
179
+ private _legacyCompaction;
180
+ /** The summary panel under the separator is open. Kept here, not in the DOM, because a redraw rebuilds the DOM. */
181
+ private _checkpointOpen;
182
+ /** Restore asked for confirmation and has not been answered. */
183
+ private _confirmingRestore;
184
+ /** What the separator was last drawn from, so a re-sync that changes nothing leaves it (and a focused button) alone. */
185
+ private _checkpointDrawn;
186
+ /** Names the separator's panel for `aria-controls`, unique on the page without needing a message id. */
187
+ private readonly _checkpointId;
167
188
  /** Cleanup returned by the avatar provider — called on disconnect/re-render. */
168
189
  private _avatarCleanup;
169
190
  /** Whether the avatar slot holds what a provider drew, which goes when the provider does. */
@@ -199,11 +220,65 @@ export declare class AparteChatBubble extends HTMLElement implements AparteConfi
199
220
  private _redrawQueued;
200
221
  /** The {@link renderingVersionOf} count the content was last drawn with. */
201
222
  private _drawnWithVersion;
223
+ /** Every segment on screen, by id: see {@link DrawnSegment}. */
224
+ private _drawn;
225
+ /** The segments were released because the bubble was still out of the page at the next microtask. */
226
+ private _releasedWhileDetached;
227
+ /** A {@link _scheduleReleaseCheck} is queued. */
228
+ private _releaseCheckQueued;
229
+ /** Unsubscribes from the renderer registries' channel; set while connected. */
230
+ private _offRenderers;
231
+ /** The tool renderer in effect for a call: none for a hidden call or another segment. */
232
+ private _toolRendererFor;
233
+ /**
234
+ * Record a segment as drawn, set it up, then read back which tool renderer is behind the
235
+ * row (tool-call.ts records it as the row is set up — one record, not a second lookup).
236
+ * Recorded BEFORE `setup`: a setup that throws (a framework mount) leaves an element that
237
+ * will still be cleaned up. The same id drawn twice releases the first element.
238
+ */
239
+ private _install;
240
+ /**
241
+ * The segment's element leaves for good: its renderer's `cleanup`, once. A cleanup that
242
+ * throws is reported and costs nothing else — the element still goes, and the others
243
+ * are still released.
244
+ */
245
+ private _release;
246
+ private _releaseAll;
247
+ /**
248
+ * Gone for good, or only moved? A keyed list moving a row takes it out and puts it back
249
+ * before the next microtask, and must not unmount what its segments hold: decide then.
250
+ */
251
+ private _scheduleReleaseCheck;
252
+ /** One segment drawn again in place: its renderer cleans up, the current one draws. False when it was never drawn. */
253
+ private _redrawSegment;
254
+ /** The renderer that drew this segment is still the one in effect (for a tool call, the tool renderer too). */
255
+ private _stillDrawnByCurrent;
256
+ /**
257
+ * A renderer registered, unregistered or overridden since these segments were drawn: draw
258
+ * again only the segments whose renderer is no longer the one that drew them (for a tool
259
+ * call, the tool renderer counts), in place. The others keep their elements — and with
260
+ * them anything mounted in them, which a redraw of the whole message would unmount.
261
+ */
262
+ private _redrawSegmentsWhoseRendererChanged;
263
+ /**
264
+ * The registries' channel: a renderer changed on our config — or on the global one, whose
265
+ * segment renderers a chat with its own config inherits.
266
+ */
267
+ private _onRenderersChange;
268
+ /**
269
+ * A card a mounted renderer keeps (a framework component): its drawing reads none of the
270
+ * providers a rendering-version bump announces, so it stays mounted through one — as long
271
+ * as that renderer is still the one in effect.
272
+ */
273
+ private _keepsItsDrawing;
202
274
  /**
203
275
  * A Markdown or highlight provider set after this message was drawn: draw it again.
204
276
  * Not mid-stream — the stream reads the providers as it goes, and its end redraws — and
205
277
  * not mid-edit, where the drawn message is hidden behind the editor and drawing it would
206
278
  * show it again beside the editor; leaving the edit calls this.
279
+ *
280
+ * Segment by segment, keeping the cards a mounted renderer holds: a highlighter that loads
281
+ * after the first answer must not remount every card on the page and lose its state.
207
282
  */
208
283
  private _redrawIfStale;
209
284
  /**
@@ -268,6 +343,16 @@ export declare class AparteChatBubble extends HTMLElement implements AparteConfi
268
343
  getContent(): string;
269
344
  /** Set segments for rich content */
270
345
  setSegments(segments: AparteSegment[]): void;
346
+ /** A whole new list, from `setSegments` or `updateMessage({ segments })`: copied in, then drawn. */
347
+ private _replaceSegments;
348
+ /**
349
+ * The same segments again, in the same order — the host re-syncing a message when its turn
350
+ * ends — while a mounted renderer holds one of them: the cards it holds are handed the new
351
+ * state, and only the other segments are drawn again, in place. Drawing everything again
352
+ * unmounted every framework card at the end of every turn and lost its state. False, and
353
+ * nothing touched, in every other case: those keep the full redraw.
354
+ */
355
+ private _resyncKeepingCards;
271
356
  /** Add a segment */
272
357
  addSegment(segment: AparteSegment): void;
273
358
  /** Update a specific segment */
@@ -304,6 +389,29 @@ export declare class AparteChatBubble extends HTMLElement implements AparteConfi
304
389
  * there is nothing to show, so the button never renders either way.
305
390
  */
306
391
  setUsage(usage: AparteUsage | null | undefined): void;
392
+ /**
393
+ * Say why the model stopped writing this reply (assistant only).
394
+ *
395
+ * Only `'length'` draws anything: a quiet note after the content that the reply was cut
396
+ * off, because otherwise a truncated answer reads as a finished one. Every other reason
397
+ * is the ordinary end of a turn and says nothing. The note waits for the turn to settle.
398
+ */
399
+ setFinishReason(reason: AparteFinishReason | null | undefined): void;
400
+ /**
401
+ * Say that the messages before this one were summarised for the model, or that they no
402
+ * longer are (`null`).
403
+ *
404
+ * Draws, or removes, the separator above the message: "{n} messages summarised for the
405
+ * model", with Show summary and Restore. The separator sits OUTSIDE `.aparte-message`
406
+ * and inside this element, so it is not part of the message's frame and survives the
407
+ * frame being drawn again. `legacy: true` says the message is itself the summary an
408
+ * older compaction wrote (`compaction: true`): it is replaced by the separator, which
409
+ * then has no count and no Restore. Omit `legacy` to leave what the host last said (or
410
+ * the `data-kind="compaction"` attribute) in force.
411
+ */
412
+ setContextSummary(summary: AparteContextSummary | null | undefined, options?: {
413
+ legacy?: boolean;
414
+ }): void;
307
415
  /**
308
416
  * Update the branch picker UI for tree-based navigation.
309
417
  * The viewport calls this after a branch switch or re-render.
@@ -315,6 +423,48 @@ export declare class AparteChatBubble extends HTMLElement implements AparteConfi
315
423
  * Atomic update for the message
316
424
  */
317
425
  updateMessage(updates: Partial<AparteMessage>): void;
426
+ /**
427
+ * Draw, or remove, the note under a reply cut off at the model's length limit.
428
+ *
429
+ * Created here rather than in the shell markup: a custom shell written from the contract
430
+ * has no such region, and the note is only ever wanted next to the content it qualifies.
431
+ * A shell with no content region simply shows none (the same null-guarded degradation as
432
+ * the other regions).
433
+ */
434
+ private _updateFinishNote;
435
+ /** This message was written by an older compaction, as the host said or as its `data-kind` stamp says. */
436
+ private _isLegacyCompaction;
437
+ /**
438
+ * What the separator should say, or `null` for none. A compaction in progress or
439
+ * failed outranks what the message already carries: it is what is happening now.
440
+ */
441
+ private _checkpointKind;
442
+ /** The text the summary panel shows: the checkpoint's summary, or the older compaction message itself. */
443
+ private _checkpointSummaryText;
444
+ /**
445
+ * Draw the separator above the message, or take it off.
446
+ *
447
+ * Written into the light DOM as the FIRST child of the bubble, outside `.aparte-message`:
448
+ * a custom shell roots at that class and is free to be anything, and the separator is not
449
+ * its to carry. Drawn from `_render` (so every frame gets it) and from every setter that
450
+ * changes what it says. A re-sync that changes nothing — the framework host calls this on
451
+ * every render of every bubble — finds the same signature and the element in place and
452
+ * leaves both alone, so a keyboard user's focus and a scrolled summary are not lost to a
453
+ * rebuild; one that does change something rebuilds it and puts the focus back on the
454
+ * button that had it (or on `focus`, which a click that swaps the buttons names).
455
+ *
456
+ * A message an older compaction wrote is marked `data-superseded` on its own row: it
457
+ * stays in the DOM and does not paint (bubble.css), the separator speaking for it.
458
+ */
459
+ private _updateCheckpoint;
460
+ /**
461
+ * The separator's buttons. One delegated listener on the bubble, for the reason the branch
462
+ * picker has one: the separator is rebuilt on every change, and a listener per button would
463
+ * be lost with it.
464
+ */
465
+ private _onCheckpointClick;
466
+ /** Escape withdraws Restore's question, the way it closes every other inline prompt here. */
467
+ private _onCheckpointKeydown;
318
468
  private _appendSegmentEl;
319
469
  private _applySegmentUpdate;
320
470
  private _getDisplayName;
@@ -427,7 +577,7 @@ export declare class AparteChatBubble extends HTMLElement implements AparteConfi
427
577
  /**
428
578
  * What the copy action copies: the reply, not the reasoning. A `thinking` segment is
429
579
  * the model's scratchpad, and the client already keeps it out of the history it sends
430
- * back (`_segmentsToText`) for the same reason — copying it along with the answer
580
+ * back (`segmentsToWireText`) for the same reason — copying it along with the answer
431
581
  * pasted a paragraph of deliberation above every reply, which no assistant on the
432
582
  * market does. Segments with no `content` (a tool call) contribute nothing, so a
433
583
  * turn made only of those copies as `''` — and the action bar reads this to decide
@@ -1 +1 @@
1
- {"version":3,"file":"aparte-chat-bubble.d.ts","sourceRoot":"","sources":["../../../src/components/bubble/aparte-chat-bubble.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,aAAa,EACb,gBAAgB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I;IAOtC,OAAO,CAAC,oBAAoB;IAO5B,OAAO,CAAC,mBAAmB;IAuC3B;;;;;;;;OAQG;IACH,OAAO,CAAC,aAAa;IAOrB;;;;OAIG;IACH,OAAO,CAAC,eAAe;IAKvB,OAAO,CAAC,gBAAgB;IA2DxB;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,eAAe;IASvB;;;;;;;OAOG;IACH,OAAO,CAAC,mBAAmB,CAmBzB;IAEF;;;;;;OAMG;IACH,OAAO,CAAC,qBAAqB;IAc7B,0EAA0E;IAC1E,OAAO,CAAC,oBAAoB;IAoB5B,iGAAiG;IACjG,OAAO,CAAC,iBAAiB;IAsCzB,wEAAwE;IACxE,OAAO,CAAC,kBAAkB;IAiB1B,OAAO,CAAC,kBAAkB;IAgG1B;;;;;;;;;OASG;IACH,OAAO,CAAC,cAAc;IAsCtB;;;;OAIG;IACH,OAAO,CAAC,aAAa;IA0DrB,OAAO,CAAC,gBAAgB;IAuBxB,OAAO,CAAC,gBAAgB;CA6CzB"}
@@ -1,4 +1,4 @@
1
- import type { AparteAttachment, AparteMessage, AparteSegment, AparteSiblingInfo, AparteUsage } from '../../types/index.js';
1
+ import type { AparteAttachment, AparteMessage, AparteSegment, AparteSiblingInfo, AparteUsage, AparteFinishReason, AparteContextSummary } from '../../types/index.js';
2
2
  /**
3
3
  * Minimal structural type representing the imperative slice of `AparteChatBubble`
4
4
  * needed to reconcile a message into a bubble. Declared loosely so framework
@@ -14,6 +14,10 @@ export interface SyncableBubble {
14
14
  setAttachments?: (attachments: AparteAttachment[]) => void;
15
15
  setSiblings?: (count: number, index: number) => void;
16
16
  setUsage?: (usage: AparteUsage | null | undefined) => void;
17
+ setFinishReason?: (reason: AparteFinishReason | null | undefined) => void;
18
+ setContextSummary?: (summary: AparteContextSummary | null | undefined, options?: {
19
+ legacy?: boolean;
20
+ }) => void;
17
21
  }
18
22
  /**
19
23
  * Reconcile a bubble element with a message and optional sibling metadata.
@@ -1 +1 @@
1
- {"version":3,"file":"bubble-sync.d.ts","sourceRoot":"","sources":["../../../src/components/bubble/bubble-sync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,WAAW,EACd,MAAM,sBAAsB,CAAC;AAG9B;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC3B,WAAW,CAAC,EAAE,MAAM,aAAa,EAAE,CAAC;IACpC,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,aAAa,EAAE,KAAK,IAAI,CAAC;IAClD,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC,KAAK,IAAI,CAAC;IAC7E,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,cAAc,CAAC,EAAE,CAAC,WAAW,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IAC3D,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,KAAK,IAAI,CAAC;CAC9D;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,yBAAyB,CACrC,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,aAAa,EACtB,WAAW,CAAC,EAAE,iBAAiB,GAChC,IAAI,CAyCN"}
1
+ {"version":3,"file":"bubble-sync.d.ts","sourceRoot":"","sources":["../../../src/components/bubble/bubble-sync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,WAAW,EACX,kBAAkB,EAClB,oBAAoB,EACvB,MAAM,sBAAsB,CAAC;AAG9B;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC3B,WAAW,CAAC,EAAE,MAAM,aAAa,EAAE,CAAC;IACpC,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,aAAa,EAAE,KAAK,IAAI,CAAC;IAClD,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC,KAAK,IAAI,CAAC;IAC7E,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,cAAc,CAAC,EAAE,CAAC,WAAW,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IAC3D,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,KAAK,IAAI,CAAC;IAC3D,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,GAAG,SAAS,KAAK,IAAI,CAAC;IAC1E,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,oBAAoB,GAAG,IAAI,GAAG,SAAS,EAAE,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;CAClH;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,yBAAyB,CACrC,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,aAAa,EACtB,WAAW,CAAC,EAAE,iBAAiB,GAChC,IAAI,CAmDN"}
@@ -0,0 +1,40 @@
1
+ import type { AparteLocale } from '../../config/locale.js';
2
+ /** What the separator is saying: a summary written, an older one with no count, one being written, or one that failed. */
3
+ export type CheckpointKind = 'done' | 'legacy' | 'pending' | 'failed';
4
+ /** What {@link buildCheckpointSeparator} draws from. Plain data, so the bubble owns every decision. */
5
+ export interface CheckpointSeparatorOptions {
6
+ kind: CheckpointKind;
7
+ /** How many messages the summary stands for (`done` only). */
8
+ count?: number;
9
+ /** Why the summary could not be written (`failed` only). */
10
+ reason?: string;
11
+ /** The summary panel is open. */
12
+ open: boolean;
13
+ /** Restore asked "Send the original messages to the model again?" and waits for the answer. */
14
+ confirming: boolean;
15
+ /** The id the Show/Hide button points `aria-controls` at; unique on the page. */
16
+ summaryId: string;
17
+ locale: Partial<AparteLocale>;
18
+ }
19
+ /**
20
+ * The separator a bubble draws above the first message the model still reads verbatim.
21
+ *
22
+ * `<div role="group" aria-label>` holding a labelled divider (the hairline, the sentence,
23
+ * the actions) and, below it, the panel the summary opens into. The panel is built empty:
24
+ * the bubble fills it through the configured Markdown renderer when it is opened, because
25
+ * what the summary looks like is the same decision the bubble makes for its own content.
26
+ *
27
+ * - `done` "{n} messages summarised for the model", Show/Hide summary, Restore (or, once
28
+ * Restore was pressed, the question and its two answers in the actions' place).
29
+ * - `legacy` "Earlier messages were summarised": no count and no Restore — a message
30
+ * written by an older compaction replaced the turns, so there is nothing to
31
+ * restore them from.
32
+ * - `pending` "Summarising the context…" under the shimmer recipe, no actions.
33
+ * - `failed` "Couldn't summarise the context" and Retry; the reason is the sentence's
34
+ * `title` and, for a reader of the accessible tree, visually hidden text.
35
+ *
36
+ * Every string comes from the locale with the English default beside it, the way the rest
37
+ * of core reads its own: a locale written before these keys existed keeps working.
38
+ */
39
+ export declare function buildCheckpointSeparator(options: CheckpointSeparatorOptions): HTMLElement;
40
+ //# sourceMappingURL=checkpoint-separator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkpoint-separator.d.ts","sourceRoot":"","sources":["../../../src/components/bubble/checkpoint-separator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,0HAA0H;AAC1H,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEtE,uGAAuG;AACvG,MAAM,WAAW,0B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CAAC,MAAM,CAAS;IACvB,mFAAmF;IACnF,OAAO,CAAC,SAAS,CAAS;IAE1B;;;;OAIG;IACH,OAAO,CAAC,UAAU,CAAS;IAE3B,iBAAiB,IAAI,IAAI;IAYzB,oBAAoB,IAAI,IAAI;IAW5B,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAoB9F,6EAA6E;IAC7E,IAAI,QAAQ,IAAI,kBAAkB,GAAG,IAAI,CAExC;IAED,qEAAqE;IACrE,IAAI,QAAQ,IAAI,cAAc,GAAG,IAAI,CAEpC;IAED,OAAO,CAAC,OAAO;IAoDf;;;;OAIG;IACH,OAAO,CAAC,gBAAgB;IAuBxB,6EAA6E;IAC7E,OAAO,CAAC,YAAY;IAKpB;;;;;;;OAOG;IACH,OAAO,CAAC,eAAe;IAcvB;;;;;OAKG;IACH,OAAO,CAAC,iBAAiB;IAUzB;;;;;;OAMG;IACH,OAAO,CAAC,iBAAiB;IAczB;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAiBzB;;;;OAIG;IACH,OAAO,CAAC,YAAY;CAKrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"aparte-composer-action.d.ts","sourceRoot":"","sources":["../../../src/components/composer/aparte-composer-action.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAI3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuEG;AACH,qBAAa,oBAAqB,SAAQ,WAAW;IACjD,OAAO,CAAC,OAAO,CAAkC;IACjD,OAAO,CAAC,aAAa,CAAsB;IAG3C,OAAO,CAAC,QAAQ,CAAgC;IAEhD,MAAM,KAAK,kBAAkB,IAAI,MAAM,EAAE,CAExC;IAED,iBAAiB,IAAI,IAAI;IAiBzB,oBAAoB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