@aparte/core 1.12.2 → 1.13.1

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 (62) hide show
  1. package/dist/client/aparte-client.d.ts +8 -1
  2. package/dist/client/aparte-client.d.ts.map +1 -1
  3. package/dist/client/wire-history.d.ts +15 -13
  4. package/dist/client/wire-history.d.ts.map +1 -1
  5. package/dist/components/bubble/aparte-chat-bubble.d.ts +31 -1
  6. package/dist/components/bubble/aparte-chat-bubble.d.ts.map +1 -1
  7. package/dist/components/bubble/bubble-sync.d.ts +4 -1
  8. package/dist/components/bubble/bubble-sync.d.ts.map +1 -1
  9. package/dist/components/chat/aparte-chat.d.ts +2 -0
  10. package/dist/components/chat/aparte-chat.d.ts.map +1 -1
  11. package/dist/components/composer/aparte-composer.d.ts +4 -0
  12. package/dist/components/composer/aparte-composer.d.ts.map +1 -1
  13. package/dist/components/suggestions/aparte-suggestions.d.ts.map +1 -1
  14. package/dist/components/viewport/aparte-chat-viewport.d.ts +11 -2
  15. package/dist/components/viewport/aparte-chat-viewport.d.ts.map +1 -1
  16. package/dist/config/action-provider.d.ts +6 -0
  17. package/dist/config/action-provider.d.ts.map +1 -1
  18. package/dist/config/aparte-config.d.ts +31 -0
  19. package/dist/config/aparte-config.d.ts.map +1 -1
  20. package/dist/config/avatar-provider.d.ts +9 -1
  21. package/dist/config/avatar-provider.d.ts.map +1 -1
  22. package/dist/config/bubble-shell-renderer.d.ts +4 -1
  23. package/dist/config/bubble-shell-renderer.d.ts.map +1 -1
  24. package/dist/conversations/conversation-controller.d.ts +1 -0
  25. package/dist/conversations/conversation-controller.d.ts.map +1 -1
  26. package/dist/conversations/conversation-manager.d.ts.map +1 -1
  27. package/dist/custom-elements.json +893 -425
  28. package/dist/{defer-hydration-DfYJjWtk.js → defer-hydration-Dm6F4kq6.js} +335 -173
  29. package/dist/defer-hydration-Dm6F4kq6.js.map +1 -0
  30. package/dist/generated/element-attributes.d.ts +2 -0
  31. package/dist/generated/element-attributes.d.ts.map +1 -1
  32. package/dist/host/aparte-chat-host.d.ts +22 -7
  33. package/dist/host/aparte-chat-host.d.ts.map +1 -1
  34. package/dist/index.css +1 -1
  35. package/dist/index.d.ts +2 -1
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.js +265 -111
  38. package/dist/index.js.map +1 -1
  39. package/dist/index.node.d.ts +2 -1
  40. package/dist/index.node.d.ts.map +1 -1
  41. package/dist/index.node.js +66 -64
  42. package/dist/index.node.js.map +1 -1
  43. package/dist/interop/element-props.d.ts +1 -1
  44. package/dist/interop/element-props.d.ts.map +1 -1
  45. package/dist/types/chat.d.ts +7 -0
  46. package/dist/types/chat.d.ts.map +1 -1
  47. package/dist/types/event-map.d.ts +2 -1
  48. package/dist/types/event-map.d.ts.map +1 -1
  49. package/dist/types/events.d.ts +26 -0
  50. package/dist/types/events.d.ts.map +1 -1
  51. package/dist/types/imperative-api.d.ts +7 -1
  52. package/dist/types/imperative-api.d.ts.map +1 -1
  53. package/dist/types/index.d.ts +2 -2
  54. package/dist/types/index.d.ts.map +1 -1
  55. package/dist/types/models.d.ts +40 -0
  56. package/dist/types/models.d.ts.map +1 -1
  57. package/dist/utils/is-awaiting-reply.d.ts +1 -1
  58. package/dist/utils/is-awaiting-reply.d.ts.map +1 -1
  59. package/dist/utils/is-model-reply.d.ts +14 -0
  60. package/dist/utils/is-model-reply.d.ts.map +1 -0
  61. package/package.json +2 -2
  62. package/dist/defer-hydration-DfYJjWtk.js.map +0 -1
@@ -49,6 +49,22 @@
49
49
  "module": "./types/index.js"
50
50
  }
51
51
  },
52
+ {
53
+ "kind": "js",
54
+ "name": "AparteAuthor",
55
+ "declaration": {
56
+ "name": "AparteAuthor",
57
+ "module": "./types/index.js"
58
+ }
59
+ },
60
+ {
61
+ "kind": "js",
62
+ "name": "AparteMessageKind",
63
+ "declaration": {
64
+ "name": "AparteMessageKind",
65
+ "module": "./types/index.js"
66
+ }
67
+ },
52
68
  {
53
69
  "kind": "js",
54
70
  "name": "AparteContextSummary",
@@ -505,6 +521,14 @@
505
521
  "module": "./types/index.js"
506
522
  }
507
523
  },
524
+ {
525
+ "kind": "js",
526
+ "name": "AparteTranscriptChangeEventDetail",
527
+ "declaration": {
528
+ "name": "AparteTranscriptChangeEventDetail",
529
+ "module": "./types/index.js"
530
+ }
531
+ },
508
532
  {
509
533
  "kind": "js",
510
534
  "name": "AparteMessageResumedEventDetail",
@@ -2833,6 +2857,22 @@
2833
2857
  "module": "./utils/is-awaiting-reply.js"
2834
2858
  }
2835
2859
  },
2860
+ {
2861
+ "kind": "js",
2862
+ "name": "isModelReply",
2863
+ "declaration": {
2864
+ "name": "isModelReply",
2865
+ "module": "./utils/is-model-reply.js"
2866
+ }
2867
+ },
2868
+ {
2869
+ "kind": "js",
2870
+ "name": "authorTypeOf",
2871
+ "declaration": {
2872
+ "name": "authorTypeOf",
2873
+ "module": "./utils/is-model-reply.js"
2874
+ }
2875
+ },
2836
2876
  {
2837
2877
  "kind": "js",
2838
2878
  "name": "escapeHtml",
@@ -3291,6 +3331,22 @@
3291
3331
  "module": "./types/index.js"
3292
3332
  }
3293
3333
  },
3334
+ {
3335
+ "kind": "js",
3336
+ "name": "AparteAuthor",
3337
+ "declaration": {
3338
+ "name": "AparteAuthor",
3339
+ "module": "./types/index.js"
3340
+ }
3341
+ },
3342
+ {
3343
+ "kind": "js",
3344
+ "name": "AparteMessageKind",
3345
+ "declaration": {
3346
+ "name": "AparteMessageKind",
3347
+ "module": "./types/index.js"
3348
+ }
3349
+ },
3294
3350
  {
3295
3351
  "kind": "js",
3296
3352
  "name": "AparteContextSummary",
@@ -3747,6 +3803,14 @@
3747
3803
  "module": "./types/index.js"
3748
3804
  }
3749
3805
  },
3806
+ {
3807
+ "kind": "js",
3808
+ "name": "AparteTranscriptChangeEventDetail",
3809
+ "declaration": {
3810
+ "name": "AparteTranscriptChangeEventDetail",
3811
+ "module": "./types/index.js"
3812
+ }
3813
+ },
3750
3814
  {
3751
3815
  "kind": "js",
3752
3816
  "name": "AparteMessageResumedEventDetail",
@@ -5731,6 +5795,22 @@
5731
5795
  "module": "./utils/is-awaiting-reply.js"
5732
5796
  }
5733
5797
  },
5798
+ {
5799
+ "kind": "js",
5800
+ "name": "isModelReply",
5801
+ "declaration": {
5802
+ "name": "isModelReply",
5803
+ "module": "./utils/is-model-reply.js"
5804
+ }
5805
+ },
5806
+ {
5807
+ "kind": "js",
5808
+ "name": "authorTypeOf",
5809
+ "declaration": {
5810
+ "name": "authorTypeOf",
5811
+ "module": "./utils/is-model-reply.js"
5812
+ }
5813
+ },
5734
5814
  {
5735
5815
  "kind": "js",
5736
5816
  "name": "escapeHtml",
@@ -6838,6 +6918,31 @@
6838
6918
  },
6839
6919
  "description": "The registered tools, unless the current model says it cannot call one — the gate\nlives in `toolsForCurrentModel` (with its reasoning), where the context measure reads\nthe same rule, so send / retry / edit and the gauge cannot drift."
6840
6920
  },
6921
+ {
6922
+ "kind": "method",
6923
+ "name": "_autoReplies",
6924
+ "privacy": "private",
6925
+ "return": {
6926
+ "type": {
6927
+ "text": "boolean"
6928
+ }
6929
+ },
6930
+ "parameters": [
6931
+ {
6932
+ "name": "target",
6933
+ "type": {
6934
+ "text": "Element"
6935
+ }
6936
+ },
6937
+ {
6938
+ "name": "conversationId",
6939
+ "type": {
6940
+ "text": "string | undefined"
6941
+ }
6942
+ }
6943
+ ],
6944
+ "description": "Whether the AI answers in a conversation of `target` (`setAutoReply`): the client's\nconfig and the chat's must both say so. A chat with its own config answered by the\npage's client is turned off on its own config — the one its bubbles and composer read,\nso the buttons they disable and the turns refused here never disagree."
6945
+ },
6841
6946
  {
6842
6947
  "kind": "method",
6843
6948
  "name": "_handleRetry",
@@ -7098,7 +7203,7 @@
7098
7203
  }
7099
7204
  }
7100
7205
  ],
7101
- "description": "What the model reads in place of everything before a checkpoint: the summary, as a\n`user` message under the same preamble a legacy compaction message gets, so it is\ncontext and not something the person said. It may sit right before a user turn;\n`mergeAdjacentUserMessages` joins the two where the history is assembled."
7206
+ "description": "What the model reads in place of everything before a checkpoint: the summary, as a\n`user` message under the same preamble a legacy compaction message gets, so it is\ncontext and not something the person said. It may sit right before a user turn;\n`mergeAdjacentMessages` joins the two where the history is assembled."
7102
7207
  },
7103
7208
  {
7104
7209
  "kind": "method",
@@ -7176,6 +7281,13 @@
7176
7281
  "type": {
7177
7282
  "text": "AparteContentPart[]"
7178
7283
  }
7284
+ },
7285
+ {
7286
+ "name": "sentId",
7287
+ "optional": true,
7288
+ "type": {
7289
+ "text": "string"
7290
+ }
7179
7291
  }
7180
7292
  ],
7181
7293
  "description": "Build the initial messages array, prepending system prompts and conversation history."
@@ -7221,6 +7333,13 @@
7221
7333
  "type": {
7222
7334
  "text": "AparteMessage[]"
7223
7335
  }
7336
+ },
7337
+ {
7338
+ "name": "sentId",
7339
+ "optional": true,
7340
+ "type": {
7341
+ "text": "string"
7342
+ }
7224
7343
  }
7225
7344
  ]
7226
7345
  },
@@ -8086,7 +8205,7 @@
8086
8205
  },
8087
8206
  {
8088
8207
  "kind": "function",
8089
- "name": "mergeAdjacentUserMessages",
8208
+ "name": "mergeAdjacentMessages",
8090
8209
  "return": {
8091
8210
  "type": {
8092
8211
  "text": "AparteChatMessage[]"
@@ -8100,7 +8219,7 @@
8100
8219
  }
8101
8220
  }
8102
8221
  ],
8103
- "description": "Merge ADJACENT `user` messages into one, so the roles a model receives alternate.\n\nStrict chat templates (Gemma 2/3, Mistral, llama.cpp with `--jinja`, vLLM) reject two\n`user` turns in a row, and once one is in the history every following turn fails the\nsame way. Two ordinary situations produce it: a compaction (the summary is a `user`\nmessage and the turns kept after it usually start with one), and a failed turn (its\nuser message stays in the transcript, its error reply is not sent, and the user writes\nagain).\n\nOnly `user` is merged. A `system`, `assistant` or `tool` message carries structure\n(tool calls and the ids that answer them) that concatenating would destroy. Text joins\nwith a blank line; parts concatenate with a text separator between them; a string\nbeside parts becomes a text part, so an image keeps its place. A history that already\nalternates comes back as the same messages."
8222
+ "description": "Merge ADJACENT messages of the same role into one, so the roles a model receives alternate.\n\nStrict chat templates (Gemma 2/3, Mistral, llama.cpp with `--jinja`, vLLM) reject two\n`user` turns in a row, and once one is in the history every following turn fails the\nsame way. Ordinary situations produce it: a compaction (the summary is a `user` message\nand the turns kept after it usually start with one), a failed turn (its user message\nstays in the transcript, its error reply is not sent, and the user writes again), two\npeople writing in a row, and an advisor's message — sent as `assistant`, the service's\nvoice — right after the AI's reply or another advisor's.\n\n`user` messages merge, and `assistant` ones that carry no tool calls. A `system`, a\n`tool`, or an `assistant` with calls carries structure (the calls and the ids that\nanswer them) that concatenating would destroy. Text joins with a blank line; parts\nconcatenate with a text separator between them; a string beside parts becomes a text\npart, so an image keeps its place. The merged message keeps `name` only when its parts\nall had the same one. A history that already alternates comes back as the same messages."
8104
8223
  },
8105
8224
  {
8106
8225
  "kind": "variable",
@@ -8239,7 +8358,7 @@
8239
8358
  }
8240
8359
  }
8241
8360
  ],
8242
- "description": "The messages, without the turns a later request gives up on: each reply that failed for\ngood and the messages that asked it — every user message since the last reply that did\nnot fail, since a failure the request got past sends its message again with the next one.\n\nA compaction summary message is part of no turn and always stays.\n\nEvery other message stays, a failure the request can get past included: its message goes\nwith the next one (`mergeAdjacentUserMessages` joins the two), from the very next request\non, as a retry or an edit sends it, and its reply is sent as nothing (`wireMessages`).\n\nThe one rule for send, retry, edit, a resume, the context gauge and a compaction, so the\nhistory a server is sent never changes under it from one request to the next."
8361
+ "description": "The messages, without the turns a later request gives up on: each reply that failed for\ngood and the messages that asked it — every user message since the last reply that did\nnot fail, since a failure the request got past sends its message again with the next one.\n\nA compaction summary message is part of no turn and always stays.\n\nEvery other message stays, a failure the request can get past included: its message goes\nwith the next one (`mergeAdjacentMessages` joins the two), from the very next request\non, as a retry or an edit sends it, and its reply is sent as nothing (`wireMessages`).\n\nThe one rule for send, retry, edit, a resume, the context gauge and a compaction, so the\nhistory a server is sent never changes under it from one request to the next."
8243
8362
  },
8244
8363
  {
8245
8364
  "kind": "function",
@@ -8295,9 +8414,9 @@
8295
8414
  },
8296
8415
  {
8297
8416
  "kind": "js",
8298
- "name": "mergeAdjacentUserMessages",
8417
+ "name": "mergeAdjacentMessages",
8299
8418
  "declaration": {
8300
- "name": "mergeAdjacentUserMessages",
8419
+ "name": "mergeAdjacentMessages",
8301
8420
  "module": "src/client/wire-history.ts"
8302
8421
  }
8303
8422
  },
@@ -8375,6 +8494,405 @@
8375
8494
  }
8376
8495
  ]
8377
8496
  },
8497
+ {
8498
+ "kind": "javascript-module",
8499
+ "path": "src/components/index.ts",
8500
+ "declarations": [],
8501
+ "exports": [
8502
+ {
8503
+ "kind": "js",
8504
+ "name": "AparteChat",
8505
+ "declaration": {
8506
+ "name": "AparteChat",
8507
+ "module": "./chat/index.js"
8508
+ }
8509
+ },
8510
+ {
8511
+ "kind": "js",
8512
+ "name": "AparteChatBubble",
8513
+ "declaration": {
8514
+ "name": "AparteChatBubble",
8515
+ "module": "./bubble/index.js"
8516
+ }
8517
+ },
8518
+ {
8519
+ "kind": "js",
8520
+ "name": "populateBubbleFromMessage",
8521
+ "declaration": {
8522
+ "name": "populateBubbleFromMessage",
8523
+ "module": "./bubble/index.js"
8524
+ }
8525
+ },
8526
+ {
8527
+ "kind": "js",
8528
+ "name": "SyncableBubble",
8529
+ "declaration": {
8530
+ "name": "SyncableBubble",
8531
+ "module": "./bubble/index.js"
8532
+ }
8533
+ },
8534
+ {
8535
+ "kind": "js",
8536
+ "name": "AparteChatStatus",
8537
+ "declaration": {
8538
+ "name": "AparteChatStatus",
8539
+ "module": "./status/index.js"
8540
+ }
8541
+ },
8542
+ {
8543
+ "kind": "js",
8544
+ "name": "AparteChatViewport",
8545
+ "declaration": {
8546
+ "name": "AparteChatViewport",
8547
+ "module": "./viewport/index.js"
8548
+ }
8549
+ },
8550
+ {
8551
+ "kind": "js",
8552
+ "name": "AparteComposer",
8553
+ "declaration": {
8554
+ "name": "AparteComposer",
8555
+ "module": "./composer/index.js"
8556
+ }
8557
+ },
8558
+ {
8559
+ "kind": "js",
8560
+ "name": "AparteComposerInput",
8561
+ "declaration": {
8562
+ "name": "AparteComposerInput",
8563
+ "module": "./composer/index.js"
8564
+ }
8565
+ },
8566
+ {
8567
+ "kind": "js",
8568
+ "name": "AparteComposerSend",
8569
+ "declaration": {
8570
+ "name": "AparteComposerSend",
8571
+ "module": "./composer/index.js"
8572
+ }
8573
+ },
8574
+ {
8575
+ "kind": "js",
8576
+ "name": "AparteComposerCancel",
8577
+ "declaration": {
8578
+ "name": "AparteComposerCancel",
8579
+ "module": "./composer/index.js"
8580
+ }
8581
+ },
8582
+ {
8583
+ "kind": "js",
8584
+ "name": "AparteComposerAttachments",
8585
+ "declaration": {
8586
+ "name": "AparteComposerAttachments",
8587
+ "module": "./composer/index.js"
8588
+ }
8589
+ },
8590
+ {
8591
+ "kind": "js",
8592
+ "name": "AparteComposerAddAttachment",
8593
+ "declaration": {
8594
+ "name": "AparteComposerAddAttachment",
8595
+ "module": "./composer/index.js"
8596
+ }
8597
+ },
8598
+ {
8599
+ "kind": "js",
8600
+ "name": "AparteComposerAction",
8601
+ "declaration": {
8602
+ "name": "AparteComposerAction",
8603
+ "module": "./composer/index.js"
8604
+ }
8605
+ },
8606
+ {
8607
+ "kind": "js",
8608
+ "name": "AparteComposerToolbar",
8609
+ "declaration": {
8610
+ "name": "AparteComposerToolbar",
8611
+ "module": "./composer/index.js"
8612
+ }
8613
+ },
8614
+ {
8615
+ "kind": "js",
8616
+ "name": "AparteComposerEventMap",
8617
+ "declaration": {
8618
+ "name": "AparteComposerEventMap",
8619
+ "module": "./composer/index.js"
8620
+ }
8621
+ },
8622
+ {
8623
+ "kind": "js",
8624
+ "name": "AparteComposerEventType",
8625
+ "declaration": {
8626
+ "name": "AparteComposerEventType",
8627
+ "module": "./composer/index.js"
8628
+ }
8629
+ },
8630
+ {
8631
+ "kind": "js",
8632
+ "name": "AparteComposerState",
8633
+ "declaration": {
8634
+ "name": "AparteComposerState",
8635
+ "module": "./composer/index.js"
8636
+ }
8637
+ },
8638
+ {
8639
+ "kind": "js",
8640
+ "name": "AparteComposerChangeEventDetail",
8641
+ "declaration": {
8642
+ "name": "AparteComposerChangeEventDetail",
8643
+ "module": "./composer/index.js"
8644
+ }
8645
+ },
8646
+ {
8647
+ "kind": "js",
8648
+ "name": "AparteComposerPanelMode",
8649
+ "declaration": {
8650
+ "name": "AparteComposerPanelMode",
8651
+ "module": "./composer/index.js"
8652
+ }
8653
+ },
8654
+ {
8655
+ "kind": "js",
8656
+ "name": "AparteQueuedMessage",
8657
+ "declaration": {
8658
+ "name": "AparteQueuedMessage",
8659
+ "module": "./composer/index.js"
8660
+ }
8661
+ },
8662
+ {
8663
+ "kind": "js",
8664
+ "name": "AparteTypeToFocus",
8665
+ "declaration": {
8666
+ "name": "AparteTypeToFocus",
8667
+ "module": "./composer/index.js"
8668
+ }
8669
+ },
8670
+ {
8671
+ "kind": "js",
8672
+ "name": "AparteActionClickEventDetail",
8673
+ "declaration": {
8674
+ "name": "AparteActionClickEventDetail",
8675
+ "module": "./composer/index.js"
8676
+ }
8677
+ },
8678
+ {
8679
+ "kind": "js",
8680
+ "name": "AparteConversationList",
8681
+ "declaration": {
8682
+ "name": "AparteConversationList",
8683
+ "module": "./conversation-list/index.js"
8684
+ }
8685
+ },
8686
+ {
8687
+ "kind": "js",
8688
+ "name": "AparteConversationListItem",
8689
+ "declaration": {
8690
+ "name": "AparteConversationListItem",
8691
+ "module": "./conversation-list/index.js"
8692
+ }
8693
+ },
8694
+ {
8695
+ "kind": "js",
8696
+ "name": "AparteConversationMetaRenderer",
8697
+ "declaration": {
8698
+ "name": "AparteConversationMetaRenderer",
8699
+ "module": "./conversation-list/index.js"
8700
+ }
8701
+ },
8702
+ {
8703
+ "kind": "js",
8704
+ "name": "AparteConversationSelectDetail",
8705
+ "declaration": {
8706
+ "name": "AparteConversationSelectDetail",
8707
+ "module": "./conversation-list/index.js"
8708
+ }
8709
+ },
8710
+ {
8711
+ "kind": "js",
8712
+ "name": "AparteConversationDeleteDetail",
8713
+ "declaration": {
8714
+ "name": "AparteConversationDeleteDetail",
8715
+ "module": "./conversation-list/index.js"
8716
+ }
8717
+ },
8718
+ {
8719
+ "kind": "js",
8720
+ "name": "AparteConversationArchiveDetail",
8721
+ "declaration": {
8722
+ "name": "AparteConversationArchiveDetail",
8723
+ "module": "./conversation-list/index.js"
8724
+ }
8725
+ },
8726
+ {
8727
+ "kind": "js",
8728
+ "name": "AparteConversationPinDetail",
8729
+ "declaration": {
8730
+ "name": "AparteConversationPinDetail",
8731
+ "module": "./conversation-list/index.js"
8732
+ }
8733
+ },
8734
+ {
8735
+ "kind": "js",
8736
+ "name": "AparteConversationRenameDetail",
8737
+ "declaration": {
8738
+ "name": "AparteConversationRenameDetail",
8739
+ "module": "./conversation-list/index.js"
8740
+ }
8741
+ },
8742
+ {
8743
+ "kind": "js",
8744
+ "name": "AparteConversationStatus",
8745
+ "declaration": {
8746
+ "name": "AparteConversationStatus",
8747
+ "module": "./conversation-list/index.js"
8748
+ }
8749
+ },
8750
+ {
8751
+ "kind": "js",
8752
+ "name": "AparteConversationStatusDetail",
8753
+ "declaration": {
8754
+ "name": "AparteConversationStatusDetail",
8755
+ "module": "./conversation-list/index.js"
8756
+ }
8757
+ },
8758
+ {
8759
+ "kind": "js",
8760
+ "name": "AparteSuggestions",
8761
+ "declaration": {
8762
+ "name": "AparteSuggestions",
8763
+ "module": "./suggestions/index.js"
8764
+ }
8765
+ },
8766
+ {
8767
+ "kind": "js",
8768
+ "name": "setupSuggestionBlocks",
8769
+ "declaration": {
8770
+ "name": "setupSuggestionBlocks",
8771
+ "module": "./suggestions/index.js"
8772
+ }
8773
+ },
8774
+ {
8775
+ "kind": "js",
8776
+ "name": "SUGGESTIONS_BLOCK_LANGUAGE",
8777
+ "declaration": {
8778
+ "name": "SUGGESTIONS_BLOCK_LANGUAGE",
8779
+ "module": "./suggestions/index.js"
8780
+ }
8781
+ },
8782
+ {
8783
+ "kind": "js",
8784
+ "name": "AparteSuggestion",
8785
+ "declaration": {
8786
+ "name": "AparteSuggestion",
8787
+ "module": "./suggestions/index.js"
8788
+ }
8789
+ },
8790
+ {
8791
+ "kind": "js",
8792
+ "name": "AparteSuggestionEventDetail",
8793
+ "declaration": {
8794
+ "name": "AparteSuggestionEventDetail",
8795
+ "module": "./suggestions/index.js"
8796
+ }
8797
+ },
8798
+ {
8799
+ "kind": "js",
8800
+ "name": "AparteContext",
8801
+ "declaration": {
8802
+ "name": "AparteContext",
8803
+ "module": "./context/index.js"
8804
+ }
8805
+ },
8806
+ {
8807
+ "kind": "js",
8808
+ "name": "AparteContextLevel",
8809
+ "declaration": {
8810
+ "name": "AparteContextLevel",
8811
+ "module": "./context/index.js"
8812
+ }
8813
+ },
8814
+ {
8815
+ "kind": "js",
8816
+ "name": "AparteContextThresholdEventDetail",
8817
+ "declaration": {
8818
+ "name": "AparteContextThresholdEventDetail",
8819
+ "module": "./context/index.js"
8820
+ }
8821
+ },
8822
+ {
8823
+ "kind": "js",
8824
+ "name": "AparteScrollRail",
8825
+ "declaration": {
8826
+ "name": "AparteScrollRail",
8827
+ "module": "./scroll-rail/index.js"
8828
+ }
8829
+ },
8830
+ {
8831
+ "kind": "js",
8832
+ "name": "AparteScrollRailJumpDetail",
8833
+ "declaration": {
8834
+ "name": "AparteScrollRailJumpDetail",
8835
+ "module": "./scroll-rail/index.js"
8836
+ }
8837
+ },
8838
+ {
8839
+ "kind": "js",
8840
+ "name": "AparteScrollRailEvery",
8841
+ "declaration": {
8842
+ "name": "AparteScrollRailEvery",
8843
+ "module": "./scroll-rail/index.js"
8844
+ }
8845
+ },
8846
+ {
8847
+ "kind": "js",
8848
+ "name": "AparteSidebar",
8849
+ "declaration": {
8850
+ "name": "AparteSidebar",
8851
+ "module": "./sidebar/index.js"
8852
+ }
8853
+ },
8854
+ {
8855
+ "kind": "js",
8856
+ "name": "AparteSidebarToggleDetail",
8857
+ "declaration": {
8858
+ "name": "AparteSidebarToggleDetail",
8859
+ "module": "./sidebar/index.js"
8860
+ }
8861
+ },
8862
+ {
8863
+ "kind": "js",
8864
+ "name": "AparteSplit",
8865
+ "declaration": {
8866
+ "name": "AparteSplit",
8867
+ "module": "./split/index.js"
8868
+ }
8869
+ },
8870
+ {
8871
+ "kind": "js",
8872
+ "name": "AparteSplitResizeDetail",
8873
+ "declaration": {
8874
+ "name": "AparteSplitResizeDetail",
8875
+ "module": "./split/index.js"
8876
+ }
8877
+ },
8878
+ {
8879
+ "kind": "js",
8880
+ "name": "AparteLauncher",
8881
+ "declaration": {
8882
+ "name": "AparteLauncher",
8883
+ "module": "./launcher/index.js"
8884
+ }
8885
+ },
8886
+ {
8887
+ "kind": "js",
8888
+ "name": "AparteLauncherToggleDetail",
8889
+ "declaration": {
8890
+ "name": "AparteLauncherToggleDetail",
8891
+ "module": "./launcher/index.js"
8892
+ }
8893
+ }
8894
+ ]
8895
+ },
8378
8896
  {
8379
8897
  "kind": "javascript-module",
8380
8898
  "path": "src/config/action-provider.ts",
@@ -8699,6 +9217,21 @@
8699
9217
  "privacy": "private",
8700
9218
  "default": "false"
8701
9219
  },
9220
+ {
9221
+ "kind": "field",
9222
+ "name": "_autoReply",
9223
+ "type": {
9224
+ "text": "boolean"
9225
+ },
9226
+ "privacy": "private",
9227
+ "default": "true"
9228
+ },
9229
+ {
9230
+ "kind": "field",
9231
+ "name": "_autoReplyByConversation",
9232
+ "privacy": "private",
9233
+ "default": "new Map<string, boolean>()"
9234
+ },
8702
9235
  {
8703
9236
  "kind": "field",
8704
9237
  "name": "_elicitationAllowOther",
@@ -10314,6 +10847,53 @@
10314
10847
  },
10315
10848
  "description": "Whether a message written during a reply waits for it (see setQueueWhileStreaming)."
10316
10849
  },
10850
+ {
10851
+ "kind": "method",
10852
+ "name": "setAutoReply",
10853
+ "return": {
10854
+ "type": {
10855
+ "text": "void"
10856
+ }
10857
+ },
10858
+ "parameters": [
10859
+ {
10860
+ "name": "on",
10861
+ "type": {
10862
+ "text": "boolean"
10863
+ }
10864
+ },
10865
+ {
10866
+ "name": "conversationId",
10867
+ "optional": true,
10868
+ "type": {
10869
+ "text": "string"
10870
+ }
10871
+ }
10872
+ ],
10873
+ "description": "Turn the AI's replies off, or back on — for one conversation, or for the whole chat.\n\nOff, a person's message is still shown, announced (`aparte-send`, with its\n`messageId`) and saved, and no turn starts: whoever answers instead — an advisor, another\nparticipant — writes into the chat through `appendMessage`. Every way a turn starts\nobeys it: a send, a queued message, a regenerate, an edit, and the resume of a reply that\npaused on a question. Regenerate and edit are disabled meanwhile, a model choice the\ncomposer waits for no longer greys it out, and messages queued during a reply are all\nsent when it ends, since nothing answers them. A reply already streaming is not stopped:\nstop it yourself if the takeover should cut it.\n\nWith a `conversationId` the setting is that conversation's and wins over the chat's;\nwithout one it is the default of every conversation on this config — of every chat on\nthe page when they share the global config, so give a chat its own config to turn it\noff alone. On by default.",
10874
+ "examples": [
10875
+ "```ts\n// An advisor takes the conversation over: the AI stays quiet in it.\naparteGlobalConfig.setAutoReply(false, conversationId);\n```"
10876
+ ]
10877
+ },
10878
+ {
10879
+ "kind": "method",
10880
+ "name": "getAutoReply",
10881
+ "return": {
10882
+ "type": {
10883
+ "text": "boolean"
10884
+ }
10885
+ },
10886
+ "parameters": [
10887
+ {
10888
+ "name": "conversationId",
10889
+ "optional": true,
10890
+ "type": {
10891
+ "text": "string"
10892
+ }
10893
+ }
10894
+ ],
10895
+ "description": "Whether the AI answers in a conversation (see setAutoReply): the conversation's\nown setting when it has one, else the chat's."
10896
+ },
10317
10897
  {
10318
10898
  "kind": "method",
10319
10899
  "name": "getCurrentModel",
@@ -13143,405 +13723,6 @@
13143
13723
  }
13144
13724
  ]
13145
13725
  },
13146
- {
13147
- "kind": "javascript-module",
13148
- "path": "src/components/index.ts",
13149
- "declarations": [],
13150
- "exports": [
13151
- {
13152
- "kind": "js",
13153
- "name": "AparteChat",
13154
- "declaration": {
13155
- "name": "AparteChat",
13156
- "module": "./chat/index.js"
13157
- }
13158
- },
13159
- {
13160
- "kind": "js",
13161
- "name": "AparteChatBubble",
13162
- "declaration": {
13163
- "name": "AparteChatBubble",
13164
- "module": "./bubble/index.js"
13165
- }
13166
- },
13167
- {
13168
- "kind": "js",
13169
- "name": "populateBubbleFromMessage",
13170
- "declaration": {
13171
- "name": "populateBubbleFromMessage",
13172
- "module": "./bubble/index.js"
13173
- }
13174
- },
13175
- {
13176
- "kind": "js",
13177
- "name": "SyncableBubble",
13178
- "declaration": {
13179
- "name": "SyncableBubble",
13180
- "module": "./bubble/index.js"
13181
- }
13182
- },
13183
- {
13184
- "kind": "js",
13185
- "name": "AparteChatStatus",
13186
- "declaration": {
13187
- "name": "AparteChatStatus",
13188
- "module": "./status/index.js"
13189
- }
13190
- },
13191
- {
13192
- "kind": "js",
13193
- "name": "AparteChatViewport",
13194
- "declaration": {
13195
- "name": "AparteChatViewport",
13196
- "module": "./viewport/index.js"
13197
- }
13198
- },
13199
- {
13200
- "kind": "js",
13201
- "name": "AparteComposer",
13202
- "declaration": {
13203
- "name": "AparteComposer",
13204
- "module": "./composer/index.js"
13205
- }
13206
- },
13207
- {
13208
- "kind": "js",
13209
- "name": "AparteComposerInput",
13210
- "declaration": {
13211
- "name": "AparteComposerInput",
13212
- "module": "./composer/index.js"
13213
- }
13214
- },
13215
- {
13216
- "kind": "js",
13217
- "name": "AparteComposerSend",
13218
- "declaration": {
13219
- "name": "AparteComposerSend",
13220
- "module": "./composer/index.js"
13221
- }
13222
- },
13223
- {
13224
- "kind": "js",
13225
- "name": "AparteComposerCancel",
13226
- "declaration": {
13227
- "name": "AparteComposerCancel",
13228
- "module": "./composer/index.js"
13229
- }
13230
- },
13231
- {
13232
- "kind": "js",
13233
- "name": "AparteComposerAttachments",
13234
- "declaration": {
13235
- "name": "AparteComposerAttachments",
13236
- "module": "./composer/index.js"
13237
- }
13238
- },
13239
- {
13240
- "kind": "js",
13241
- "name": "AparteComposerAddAttachment",
13242
- "declaration": {
13243
- "name": "AparteComposerAddAttachment",
13244
- "module": "./composer/index.js"
13245
- }
13246
- },
13247
- {
13248
- "kind": "js",
13249
- "name": "AparteComposerAction",
13250
- "declaration": {
13251
- "name": "AparteComposerAction",
13252
- "module": "./composer/index.js"
13253
- }
13254
- },
13255
- {
13256
- "kind": "js",
13257
- "name": "AparteComposerToolbar",
13258
- "declaration": {
13259
- "name": "AparteComposerToolbar",
13260
- "module": "./composer/index.js"
13261
- }
13262
- },
13263
- {
13264
- "kind": "js",
13265
- "name": "AparteComposerEventMap",
13266
- "declaration": {
13267
- "name": "AparteComposerEventMap",
13268
- "module": "./composer/index.js"
13269
- }
13270
- },
13271
- {
13272
- "kind": "js",
13273
- "name": "AparteComposerEventType",
13274
- "declaration": {
13275
- "name": "AparteComposerEventType",
13276
- "module": "./composer/index.js"
13277
- }
13278
- },
13279
- {
13280
- "kind": "js",
13281
- "name": "AparteComposerState",
13282
- "declaration": {
13283
- "name": "AparteComposerState",
13284
- "module": "./composer/index.js"
13285
- }
13286
- },
13287
- {
13288
- "kind": "js",
13289
- "name": "AparteComposerChangeEventDetail",
13290
- "declaration": {
13291
- "name": "AparteComposerChangeEventDetail",
13292
- "module": "./composer/index.js"
13293
- }
13294
- },
13295
- {
13296
- "kind": "js",
13297
- "name": "AparteComposerPanelMode",
13298
- "declaration": {
13299
- "name": "AparteComposerPanelMode",
13300
- "module": "./composer/index.js"
13301
- }
13302
- },
13303
- {
13304
- "kind": "js",
13305
- "name": "AparteQueuedMessage",
13306
- "declaration": {
13307
- "name": "AparteQueuedMessage",
13308
- "module": "./composer/index.js"
13309
- }
13310
- },
13311
- {
13312
- "kind": "js",
13313
- "name": "AparteTypeToFocus",
13314
- "declaration": {
13315
- "name": "AparteTypeToFocus",
13316
- "module": "./composer/index.js"
13317
- }
13318
- },
13319
- {
13320
- "kind": "js",
13321
- "name": "AparteActionClickEventDetail",
13322
- "declaration": {
13323
- "name": "AparteActionClickEventDetail",
13324
- "module": "./composer/index.js"
13325
- }
13326
- },
13327
- {
13328
- "kind": "js",
13329
- "name": "AparteConversationList",
13330
- "declaration": {
13331
- "name": "AparteConversationList",
13332
- "module": "./conversation-list/index.js"
13333
- }
13334
- },
13335
- {
13336
- "kind": "js",
13337
- "name": "AparteConversationListItem",
13338
- "declaration": {
13339
- "name": "AparteConversationListItem",
13340
- "module": "./conversation-list/index.js"
13341
- }
13342
- },
13343
- {
13344
- "kind": "js",
13345
- "name": "AparteConversationMetaRenderer",
13346
- "declaration": {
13347
- "name": "AparteConversationMetaRenderer",
13348
- "module": "./conversation-list/index.js"
13349
- }
13350
- },
13351
- {
13352
- "kind": "js",
13353
- "name": "AparteConversationSelectDetail",
13354
- "declaration": {
13355
- "name": "AparteConversationSelectDetail",
13356
- "module": "./conversation-list/index.js"
13357
- }
13358
- },
13359
- {
13360
- "kind": "js",
13361
- "name": "AparteConversationDeleteDetail",
13362
- "declaration": {
13363
- "name": "AparteConversationDeleteDetail",
13364
- "module": "./conversation-list/index.js"
13365
- }
13366
- },
13367
- {
13368
- "kind": "js",
13369
- "name": "AparteConversationArchiveDetail",
13370
- "declaration": {
13371
- "name": "AparteConversationArchiveDetail",
13372
- "module": "./conversation-list/index.js"
13373
- }
13374
- },
13375
- {
13376
- "kind": "js",
13377
- "name": "AparteConversationPinDetail",
13378
- "declaration": {
13379
- "name": "AparteConversationPinDetail",
13380
- "module": "./conversation-list/index.js"
13381
- }
13382
- },
13383
- {
13384
- "kind": "js",
13385
- "name": "AparteConversationRenameDetail",
13386
- "declaration": {
13387
- "name": "AparteConversationRenameDetail",
13388
- "module": "./conversation-list/index.js"
13389
- }
13390
- },
13391
- {
13392
- "kind": "js",
13393
- "name": "AparteConversationStatus",
13394
- "declaration": {
13395
- "name": "AparteConversationStatus",
13396
- "module": "./conversation-list/index.js"
13397
- }
13398
- },
13399
- {
13400
- "kind": "js",
13401
- "name": "AparteConversationStatusDetail",
13402
- "declaration": {
13403
- "name": "AparteConversationStatusDetail",
13404
- "module": "./conversation-list/index.js"
13405
- }
13406
- },
13407
- {
13408
- "kind": "js",
13409
- "name": "AparteSuggestions",
13410
- "declaration": {
13411
- "name": "AparteSuggestions",
13412
- "module": "./suggestions/index.js"
13413
- }
13414
- },
13415
- {
13416
- "kind": "js",
13417
- "name": "setupSuggestionBlocks",
13418
- "declaration": {
13419
- "name": "setupSuggestionBlocks",
13420
- "module": "./suggestions/index.js"
13421
- }
13422
- },
13423
- {
13424
- "kind": "js",
13425
- "name": "SUGGESTIONS_BLOCK_LANGUAGE",
13426
- "declaration": {
13427
- "name": "SUGGESTIONS_BLOCK_LANGUAGE",
13428
- "module": "./suggestions/index.js"
13429
- }
13430
- },
13431
- {
13432
- "kind": "js",
13433
- "name": "AparteSuggestion",
13434
- "declaration": {
13435
- "name": "AparteSuggestion",
13436
- "module": "./suggestions/index.js"
13437
- }
13438
- },
13439
- {
13440
- "kind": "js",
13441
- "name": "AparteSuggestionEventDetail",
13442
- "declaration": {
13443
- "name": "AparteSuggestionEventDetail",
13444
- "module": "./suggestions/index.js"
13445
- }
13446
- },
13447
- {
13448
- "kind": "js",
13449
- "name": "AparteContext",
13450
- "declaration": {
13451
- "name": "AparteContext",
13452
- "module": "./context/index.js"
13453
- }
13454
- },
13455
- {
13456
- "kind": "js",
13457
- "name": "AparteContextLevel",
13458
- "declaration": {
13459
- "name": "AparteContextLevel",
13460
- "module": "./context/index.js"
13461
- }
13462
- },
13463
- {
13464
- "kind": "js",
13465
- "name": "AparteContextThresholdEventDetail",
13466
- "declaration": {
13467
- "name": "AparteContextThresholdEventDetail",
13468
- "module": "./context/index.js"
13469
- }
13470
- },
13471
- {
13472
- "kind": "js",
13473
- "name": "AparteScrollRail",
13474
- "declaration": {
13475
- "name": "AparteScrollRail",
13476
- "module": "./scroll-rail/index.js"
13477
- }
13478
- },
13479
- {
13480
- "kind": "js",
13481
- "name": "AparteScrollRailJumpDetail",
13482
- "declaration": {
13483
- "name": "AparteScrollRailJumpDetail",
13484
- "module": "./scroll-rail/index.js"
13485
- }
13486
- },
13487
- {
13488
- "kind": "js",
13489
- "name": "AparteScrollRailEvery",
13490
- "declaration": {
13491
- "name": "AparteScrollRailEvery",
13492
- "module": "./scroll-rail/index.js"
13493
- }
13494
- },
13495
- {
13496
- "kind": "js",
13497
- "name": "AparteSidebar",
13498
- "declaration": {
13499
- "name": "AparteSidebar",
13500
- "module": "./sidebar/index.js"
13501
- }
13502
- },
13503
- {
13504
- "kind": "js",
13505
- "name": "AparteSidebarToggleDetail",
13506
- "declaration": {
13507
- "name": "AparteSidebarToggleDetail",
13508
- "module": "./sidebar/index.js"
13509
- }
13510
- },
13511
- {
13512
- "kind": "js",
13513
- "name": "AparteSplit",
13514
- "declaration": {
13515
- "name": "AparteSplit",
13516
- "module": "./split/index.js"
13517
- }
13518
- },
13519
- {
13520
- "kind": "js",
13521
- "name": "AparteSplitResizeDetail",
13522
- "declaration": {
13523
- "name": "AparteSplitResizeDetail",
13524
- "module": "./split/index.js"
13525
- }
13526
- },
13527
- {
13528
- "kind": "js",
13529
- "name": "AparteLauncher",
13530
- "declaration": {
13531
- "name": "AparteLauncher",
13532
- "module": "./launcher/index.js"
13533
- }
13534
- },
13535
- {
13536
- "kind": "js",
13537
- "name": "AparteLauncherToggleDetail",
13538
- "declaration": {
13539
- "name": "AparteLauncherToggleDetail",
13540
- "module": "./launcher/index.js"
13541
- }
13542
- }
13543
- ]
13544
- },
13545
13726
  {
13546
13727
  "kind": "javascript-module",
13547
13728
  "path": "src/context/checkpoint-state.ts",
@@ -14192,6 +14373,15 @@
14192
14373
  "privacy": "private",
14193
14374
  "default": "null"
14194
14375
  },
14376
+ {
14377
+ "kind": "field",
14378
+ "name": "_onTranscriptChange",
14379
+ "type": {
14380
+ "text": "((e: Event) => void) | null"
14381
+ },
14382
+ "privacy": "private",
14383
+ "default": "null"
14384
+ },
14195
14385
  {
14196
14386
  "kind": "field",
14197
14387
  "name": "_onSelectConversation",
@@ -16223,7 +16413,7 @@
16223
16413
  "name": "_segmentBuffer",
16224
16414
  "privacy": "private",
16225
16415
  "readonly": true,
16226
- "default": "new Map<string, { base: string; text: string }>()",
16416
+ "default": "new Map<string, { messageId: string; segmentId: string; base: string; text: string }>()",
16227
16417
  "description": "Buffered segment text, per segment id, as `base + text` — an **absolute**\ntarget, never a delta.\n\nWhy absolute: the immediate paint (`appendToSegment` below) writes through the\nviewport into the very segment object the framework list holds — they are the\nsame object, handed to both by `addSegment`. A delta added at flush time would\ntherefore land on content that already contains it, and every chunk came out\ndoubled. `base` is captured before the paint, so whoever mutates the shared\nobject in between cannot change the result."
16228
16418
  },
16229
16419
  {
@@ -16555,6 +16745,31 @@
16555
16745
  ],
16556
16746
  "description": "Append a message optimistically (streaming writes target the new last).\n\nDeliberately does NOT call `onMessagesChange` (unlike the other mutations):\n`setMessages` updates the wrapper's OWN render list, but `onMessagesChange`\nis the OUTBOUND \"the user changed the list\" notification. During an\noptimistic append the wrapper's local list can lag a controlled parent's\n(the parent added a user message that hasn't propagated back yet), so\nechoing the local list to the parent would overwrite the parent's\nauthoritative list and drop that message — a real race the Angular wrapper\nspec guards (\"optimistic-append + parent-push race\"). `onMessageAppended`\nis the append-specific signal instead."
16557
16747
  },
16748
+ {
16749
+ "kind": "method",
16750
+ "name": "_announceWrite",
16751
+ "privacy": "private",
16752
+ "return": {
16753
+ "type": {
16754
+ "text": "void"
16755
+ }
16756
+ },
16757
+ "parameters": [
16758
+ {
16759
+ "name": "message",
16760
+ "type": {
16761
+ "text": "AparteMessage"
16762
+ }
16763
+ },
16764
+ {
16765
+ "name": "change",
16766
+ "type": {
16767
+ "text": "'append' | 'update'"
16768
+ }
16769
+ }
16770
+ ],
16771
+ "description": "Say that the app wrote into the transcript outside a turn (`aparte-transcript-change`),\nso a controller saves it: during a human takeover no turn runs, and nothing else would.\nNot for the AI's empty shell, not while a reply streams — the turn's end saves then."
16772
+ },
16558
16773
  {
16559
16774
  "kind": "method",
16560
16775
  "name": "updateMessage",
@@ -16626,7 +16841,7 @@
16626
16841
  }
16627
16842
  }
16628
16843
  ],
16629
- "description": "Append/replace the last message content (streaming text)."
16844
+ "description": "Append/replace the content of the turn's message (streaming text): the message\nbeing streamed while a turn runs, else the last one."
16630
16845
  },
16631
16846
  {
16632
16847
  "kind": "method",
@@ -16644,7 +16859,7 @@
16644
16859
  }
16645
16860
  }
16646
16861
  ],
16647
- "description": "Add a segment to the last message (immediate bubble + state sync)."
16862
+ "description": "Add a segment to the turn's message (immediate bubble + state sync)."
16648
16863
  },
16649
16864
  {
16650
16865
  "kind": "method",
@@ -16668,7 +16883,7 @@
16668
16883
  }
16669
16884
  }
16670
16885
  ],
16671
- "description": "Update a segment in the last message in place."
16886
+ "description": "Update a segment in the turn's message in place."
16672
16887
  },
16673
16888
  {
16674
16889
  "kind": "method",
@@ -16686,7 +16901,7 @@
16686
16901
  }
16687
16902
  }
16688
16903
  ],
16689
- "description": "Remove a transient segment (a status row the host added itself)."
16904
+ "description": "Remove a transient segment (a status row the host added itself) from the turn's message."
16690
16905
  },
16691
16906
  {
16692
16907
  "kind": "method",
@@ -16710,7 +16925,7 @@
16710
16925
  }
16711
16926
  }
16712
16927
  ],
16713
- "description": "Append text to a segment's content in the last message — the streaming path\nfor thinking blocks, tool pills and any segment that grows token by token.\n\nTwo writes, deliberately asymmetric:\n 1. straight into the bubble, every chunk, so the text appears immediately —\n the same direct path `appendToken` uses;\n 2. into the framework's message list, **coalesced to once per frame**.\n\nCoalescing (2) avoids a full list rebuild plus `setMessages` +\n`onMessagesChange`, i.e. one complete framework render, for every chunk.\n\nAny structural change flushes the buffer first (see\n_flushStreamState), so ordering is never observable."
16928
+ "description": "Append text to a segment's content in the turn's message — the streaming path\nfor thinking blocks, tool pills and any segment that grows token by token.\n\nTwo writes, deliberately asymmetric:\n 1. straight into the bubble, every chunk, so the text appears immediately —\n the same direct path `appendToken` uses;\n 2. into the framework's message list, **coalesced to once per frame**.\n\nCoalescing (2) avoids a full list rebuild plus `setMessages` +\n`onMessagesChange`, i.e. one complete framework render, for every chunk.\n\nAny structural change flushes the buffer first (see\n_flushStreamState), so ordering is never observable."
16714
16929
  },
16715
16930
  {
16716
16931
  "kind": "method",
@@ -16933,22 +17148,14 @@
16933
17148
  },
16934
17149
  {
16935
17150
  "kind": "method",
16936
- "name": "_isOrphan",
17151
+ "name": "_turnTarget",
16937
17152
  "privacy": "private",
16938
17153
  "return": {
16939
17154
  "type": {
16940
- "text": "boolean"
17155
+ "text": "{ message: AparteMessage; index: number } | null"
16941
17156
  }
16942
17157
  },
16943
- "parameters": [
16944
- {
16945
- "name": "lastId",
16946
- "type": {
16947
- "text": "string"
16948
- }
16949
- }
16950
- ],
16951
- "description": "Orphan-stream guard: a stream is in flight but the last msg isn't it."
17158
+ "description": "The message a turn's writes go to, and where it sits in the list. While a turn\nruns, the message being streamed — never another one, not even the last: an app\nmay append a message mid-turn (an advisor's reply, a notice), and a list swapped\nunder a stream no longer holds its message, whose late writes are then dropped\nrather than moved. With no turn running, the last message, as before."
16952
17159
  },
16953
17160
  {
16954
17161
  "kind": "method",
@@ -18465,7 +18672,7 @@
18465
18672
  {
18466
18673
  "kind": "variable",
18467
18674
  "name": "APARTE_DEFAULT_UI_EVENTS",
18468
- "default": "[ // <aparte-composer> and its parts 'aparte-before-send', 'aparte-send', 'aparte-cancel', 'aparte-composer-change', 'aparte-composer-submit', 'aparte-action-click', 'aparte-attachment-preview', // <aparte-chat-bubble> 'aparte-action', 'aparte-retry', 'aparte-edit', 'aparte-feedback', 'aparte-feedback-reason', 'aparte-message-info', 'aparte-branch-navigate', 'aparte-link-click', // <aparte-chat-viewport> 'aparte-segment-update', 'aparte-reset-done', 'aparte-path-changed', // <aparte-conversation-list> 'aparte-conversation-select', 'aparte-conversation-delete', 'aparte-conversation-archive', 'aparte-conversation-unarchive', 'aparte-conversation-rename', 'aparte-conversation-pin', 'aparte-conversation-unpin', // The conversation controller, on the chat host: a conversation's messages are on screen. 'aparte-conversation-loaded', // the select primitives 'aparte-select-change', 'aparte-select-open', 'aparte-select-close', 'aparte-optgroup-toggle', // the shell and the transcript's own elements — the five the sweep found missing 'aparte-suggestion', 'aparte-context-threshold', 'aparte-scroll-rail-jump', 'aparte-sidebar-toggle', 'aparte-split-resize', 'aparte-launcher-toggle', // the turn's lifecycle, dispatched on the HOST element by `dispatchLifecycleEvent` 'aparte-message-start', 'aparte-message-done', 'aparte-message-error', 'aparte-message-aborted', 'aparte-message-paused', 'aparte-message-resumed', 'aparte-tool-approval-request', ] as const satisfies readonly string[]",
18675
+ "default": "[ // <aparte-composer> and its parts 'aparte-before-send', 'aparte-send', 'aparte-cancel', 'aparte-composer-change', 'aparte-composer-submit', 'aparte-action-click', 'aparte-attachment-preview', // <aparte-chat-bubble> 'aparte-action', 'aparte-retry', 'aparte-edit', 'aparte-feedback', 'aparte-feedback-reason', 'aparte-message-info', 'aparte-branch-navigate', 'aparte-link-click', // <aparte-chat-viewport> 'aparte-segment-update', 'aparte-reset-done', 'aparte-path-changed', // <aparte-conversation-list> 'aparte-conversation-select', 'aparte-conversation-delete', 'aparte-conversation-archive', 'aparte-conversation-unarchive', 'aparte-conversation-rename', 'aparte-conversation-pin', 'aparte-conversation-unpin', // The conversation controller, on the chat host: a conversation's messages are on screen. 'aparte-conversation-loaded', // the select primitives 'aparte-select-change', 'aparte-select-open', 'aparte-select-close', 'aparte-optgroup-toggle', // the shell and the transcript's own elements — the five the sweep found missing 'aparte-suggestion', 'aparte-context-threshold', 'aparte-scroll-rail-jump', 'aparte-sidebar-toggle', 'aparte-split-resize', 'aparte-launcher-toggle', // the turn's lifecycle, dispatched on the HOST element by `dispatchLifecycleEvent` 'aparte-message-start', 'aparte-message-done', 'aparte-message-error', 'aparte-message-aborted', 'aparte-message-paused', 'aparte-message-resumed', 'aparte-tool-approval-request', // an app's write outside a turn, said by the host element or the bare viewport 'aparte-transcript-change', ] as const satisfies readonly string[]",
18469
18676
  "description": "Every custom event an aparté element dispatches on ITSELF — the set `AparteUi`\nforwards through its single event output, in all four wrappers.\n\n`scripts/check-event-map.mjs` asserts this list against every non-`window` dispatch\nin core.\n\nA PLUGIN's events are not here, `aparte-model-change` included. The reason is the\nsame one that keeps plugin tags out of the element registry: this default is core's,\nand a third-party plugin's author cannot add to it, so listing ours would privilege\nour packages over theirs. Pass the names you need — `events: ['aparte-model-change']`\n— which is one line for everyone equally.\n\nThree events are deliberately NOT here for a different reason: `aparte-abort`,\n`aparte-compact` and `aparte-config-change` go out through `window.dispatchEvent` —\nthey concern the whole page, not one subtree — so an element-level listener can never\nreceive them and listing them would promise a forward that cannot happen.\n\nThe five lifecycle events (including `aparte-message-aborted`) ARE here:\n`dispatchLifecycleEvent` dispatches them on the HOST ELEMENT, bubbling and composed\n(`client/lifecycle-events.ts`), and the composer's `window` dispatch is a second,\npage-wide broadcast, not the only one. The sentence above lists only what a `window`\ndispatch is the sole path for."
18470
18677
  },
18471
18678
  {
@@ -21835,6 +22042,22 @@
21835
22042
  "module": "./models.js"
21836
22043
  }
21837
22044
  },
22045
+ {
22046
+ "kind": "js",
22047
+ "name": "AparteAuthor",
22048
+ "declaration": {
22049
+ "name": "AparteAuthor",
22050
+ "module": "./models.js"
22051
+ }
22052
+ },
22053
+ {
22054
+ "kind": "js",
22055
+ "name": "AparteMessageKind",
22056
+ "declaration": {
22057
+ "name": "AparteMessageKind",
22058
+ "module": "./models.js"
22059
+ }
22060
+ },
21838
22061
  {
21839
22062
  "kind": "js",
21840
22063
  "name": "AparteContextSummary",
@@ -22667,6 +22890,14 @@
22667
22890
  "module": "./events.js"
22668
22891
  }
22669
22892
  },
22893
+ {
22894
+ "kind": "js",
22895
+ "name": "AparteTranscriptChangeEventDetail",
22896
+ "declaration": {
22897
+ "name": "AparteTranscriptChangeEventDetail",
22898
+ "module": "./events.js"
22899
+ }
22900
+ },
22670
22901
  {
22671
22902
  "kind": "js",
22672
22903
  "name": "AparteMessageResumedEventDetail",
@@ -23518,7 +23749,7 @@
23518
23749
  {
23519
23750
  "name": "message",
23520
23751
  "type": {
23521
- "text": "Pick<AparteMessage, 'role' | 'status' | 'content' | 'segments'>"
23752
+ "text": "Pick<AparteMessage, 'role' | 'status' | 'content' | 'segments' | 'kind' | 'author'>"
23522
23753
  }
23523
23754
  }
23524
23755
  ],
@@ -23536,6 +23767,66 @@
23536
23767
  }
23537
23768
  ]
23538
23769
  },
23770
+ {
23771
+ "kind": "javascript-module",
23772
+ "path": "src/utils/is-model-reply.ts",
23773
+ "declarations": [
23774
+ {
23775
+ "kind": "function",
23776
+ "name": "authorTypeOf",
23777
+ "return": {
23778
+ "type": {
23779
+ "text": "'ai' | 'human'"
23780
+ }
23781
+ },
23782
+ "parameters": [
23783
+ {
23784
+ "name": "message",
23785
+ "type": {
23786
+ "text": "Pick<AparteMessage, 'role' | 'author'>"
23787
+ }
23788
+ }
23789
+ ],
23790
+ "description": "Who wrote a message, as core acts on it: what the author states, else the side it is\non — the person's side is human, the assistant's side is the AI."
23791
+ },
23792
+ {
23793
+ "kind": "function",
23794
+ "name": "isModelReply",
23795
+ "return": {
23796
+ "type": {
23797
+ "text": "boolean"
23798
+ }
23799
+ },
23800
+ "parameters": [
23801
+ {
23802
+ "name": "message",
23803
+ "type": {
23804
+ "text": "Pick<AparteMessage, 'role' | 'kind' | 'author'>"
23805
+ }
23806
+ }
23807
+ ],
23808
+ "description": "Is this message a reply the model wrote? An assistant-side message that is neither a\nnotice nor a human's. Everything that looks for \"the AI's reply\" — to regenerate it,\nresume it, close its paused calls, read its answers — asks this, never the role alone:\nan advisor who took over and a \"Marie joined\" line both sit on the assistant's side."
23809
+ }
23810
+ ],
23811
+ "exports": [
23812
+ {
23813
+ "kind": "js",
23814
+ "name": "authorTypeOf",
23815
+ "declaration": {
23816
+ "name": "authorTypeOf",
23817
+ "module": "src/utils/is-model-reply.ts"
23818
+ }
23819
+ },
23820
+ {
23821
+ "kind": "js",
23822
+ "name": "isModelReply",
23823
+ "declaration": {
23824
+ "name": "isModelReply",
23825
+ "module": "src/utils/is-model-reply.ts"
23826
+ }
23827
+ }
23828
+ ]
23829
+ },
23539
23830
  {
23540
23831
  "kind": "javascript-module",
23541
23832
  "path": "src/utils/menu.ts",
@@ -25194,6 +25485,34 @@
25194
25485
  "default": "false",
25195
25486
  "description": "Whether the avatar slot holds what a provider drew, which goes when the provider does."
25196
25487
  },
25488
+ {
25489
+ "kind": "field",
25490
+ "name": "_author",
25491
+ "type": {
25492
+ "text": "AparteAuthor | undefined"
25493
+ },
25494
+ "privacy": "private",
25495
+ "description": "Who wrote the message, when it names them (`setAuthor`)."
25496
+ },
25497
+ {
25498
+ "kind": "field",
25499
+ "name": "_note",
25500
+ "type": {
25501
+ "text": "string | undefined"
25502
+ },
25503
+ "privacy": "private",
25504
+ "description": "The line under the message (`setNote`)."
25505
+ },
25506
+ {
25507
+ "kind": "field",
25508
+ "name": "_avatarFromAuthor",
25509
+ "type": {
25510
+ "text": "boolean"
25511
+ },
25512
+ "privacy": "private",
25513
+ "default": "false",
25514
+ "description": "Whether the avatar slot holds the author's picture, which goes when the author does."
25515
+ },
25197
25516
  {
25198
25517
  "kind": "field",
25199
25518
  "name": "_siblingCount",
@@ -25639,6 +25958,17 @@
25639
25958
  }
25640
25959
  }
25641
25960
  },
25961
+ {
25962
+ "kind": "method",
25963
+ "name": "_redrawFrame",
25964
+ "privacy": "private",
25965
+ "return": {
25966
+ "type": {
25967
+ "text": "void"
25968
+ }
25969
+ },
25970
+ "description": "Throw the frame away and draw it again, with everything the message holds."
25971
+ },
25642
25972
  {
25643
25973
  "kind": "method",
25644
25974
  "name": "appendToken",
@@ -25987,6 +26317,81 @@
25987
26317
  ],
25988
26318
  "description": "Say why the model stopped writing this reply (assistant only).\n\nOnly `'length'` draws anything: a quiet note after the content that the reply was cut\noff, because otherwise a truncated answer reads as a finished one. Every other reason\nis the ordinary end of a turn and says nothing. The note waits for the turn to settle."
25989
26319
  },
26320
+ {
26321
+ "kind": "method",
26322
+ "name": "setAuthor",
26323
+ "return": {
26324
+ "type": {
26325
+ "text": "void"
26326
+ }
26327
+ },
26328
+ "parameters": [
26329
+ {
26330
+ "name": "author",
26331
+ "type": {
26332
+ "text": "AparteAuthor | undefined"
26333
+ }
26334
+ }
26335
+ ],
26336
+ "description": "Who wrote the message (`AparteMessage.author`): its name in the header and in the label\na screen reader reads, `data-author-type` for styling, and its picture in the avatar\nslot. `undefined` takes back what a previous author set — never a `name` written on the\nelement by hand. Redraws the avatar only when the author changed."
26337
+ },
26338
+ {
26339
+ "kind": "method",
26340
+ "name": "_authorType",
26341
+ "privacy": "private",
26342
+ "return": {
26343
+ "type": {
26344
+ "text": "'ai' | 'human'"
26345
+ }
26346
+ },
26347
+ "description": "Who wrote the message, as core acts on it: the author's type, else the side it is on."
26348
+ },
26349
+ {
26350
+ "kind": "method",
26351
+ "name": "setKind",
26352
+ "return": {
26353
+ "type": {
26354
+ "text": "void"
26355
+ }
26356
+ },
26357
+ "parameters": [
26358
+ {
26359
+ "name": "kind",
26360
+ "type": {
26361
+ "text": "AparteMessage['kind']"
26362
+ }
26363
+ }
26364
+ ],
26365
+ "description": "What kind of row the message is (`AparteMessage.kind`): `'notice'` draws a line across\nthe transcript instead of a bubble. `undefined` takes back a notice, and leaves the\n`data-kind=\"compaction\"` stamp of an older summary message alone."
26366
+ },
26367
+ {
26368
+ "kind": "method",
26369
+ "name": "setNote",
26370
+ "return": {
26371
+ "type": {
26372
+ "text": "void"
26373
+ }
26374
+ },
26375
+ "parameters": [
26376
+ {
26377
+ "name": "note",
26378
+ "type": {
26379
+ "text": "string | undefined"
26380
+ }
26381
+ }
26382
+ ],
26383
+ "description": "A short line under the message (`AparteMessage.note`): \"Read by Marie\", \"Seen at\n14:05\". In the flow after the content, outside the footer; `undefined` or empty removes it."
26384
+ },
26385
+ {
26386
+ "kind": "method",
26387
+ "name": "_updateNote",
26388
+ "privacy": "private",
26389
+ "return": {
26390
+ "type": {
26391
+ "text": "void"
26392
+ }
26393
+ }
26394
+ },
25990
26395
  {
25991
26396
  "kind": "method",
25992
26397
  "name": "setContextSummary",
@@ -26950,6 +27355,13 @@
26950
27355
  "text": "string"
26951
27356
  },
26952
27357
  "description": "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."
27358
+ },
27359
+ {
27360
+ "name": "data-kind",
27361
+ "type": {
27362
+ "text": "string"
27363
+ },
27364
+ "description": "What the message is, when it is not a message someone wrote: `notice` draws it as a line across the transcript (`role=\"note\"`, no name, no actions, never sent to the model), as `AparteMessage.kind: 'notice'` does; `compaction` is a summary's checkpoint. The transcript and the framework hosts set it from the message."
26953
27365
  }
26954
27366
  ],
26955
27367
  "superclass": {
@@ -27563,6 +27975,13 @@
27563
27975
  "description": "A paused turn goes on, into the same reply, once the page answered its calls.",
27564
27976
  "name": "aparte-message-resumed"
27565
27977
  },
27978
+ {
27979
+ "type": {
27980
+ "text": "CustomEvent<AparteTranscriptChangeEventDetail>"
27981
+ },
27982
+ "description": "The app wrote into the transcript outside a turn (an advisor's reply, a notice, a note). A conversation controller saves on it.",
27983
+ "name": "aparte-transcript-change"
27984
+ },
27566
27985
  {
27567
27986
  "type": {
27568
27987
  "text": "CustomEvent<AparteToolApprovalRequestDetail>"
@@ -29787,6 +30206,12 @@
29787
30206
  "name": "_onConfigChange",
29788
30207
  "privacy": "private"
29789
30208
  },
30209
+ {
30210
+ "kind": "field",
30211
+ "name": "_onConversationLoaded",
30212
+ "privacy": "private",
30213
+ "description": "Another conversation opened: the AI may answer there and not here (`setAutoReply`)."
30214
+ },
29790
30215
  {
29791
30216
  "kind": "method",
29792
30217
  "name": "_applyDirection",
@@ -30213,6 +30638,17 @@
30213
30638
  },
30214
30639
  "description": "The reply ended well: send the first queued message. After the event that said so has\nreached every listener (the client is still closing that turn while it runs), and only\nif no other reply started meanwhile — it then waits for that one."
30215
30640
  },
30641
+ {
30642
+ "kind": "method",
30643
+ "name": "_aiAnswers",
30644
+ "privacy": "private",
30645
+ "return": {
30646
+ "type": {
30647
+ "text": "boolean"
30648
+ }
30649
+ },
30650
+ "description": "Whether the AI answers in the conversation open in this composer's chat (see `setAutoReply`)."
30651
+ },
30216
30652
  {
30217
30653
  "kind": "method",
30218
30654
  "name": "_backToField",
@@ -37794,6 +38230,31 @@
37794
38230
  ],
37795
38231
  "description": "Atomic update for a message by ID\nSupports updating content, status, segments, and other metadata\n\nAn id the tree does not hold is a silent no-op, deliberately: the message may have\nbeen truncated away by an edit while a turn was still writing to it, and inventing\nit back would put a message the reader deleted on screen. It does mean a late error\ncard can have nowhere to land — `aparte-message-error` still fires, so a host that\nwants to show one has the event."
37796
38232
  },
38233
+ {
38234
+ "kind": "method",
38235
+ "name": "_announceWrite",
38236
+ "privacy": "private",
38237
+ "return": {
38238
+ "type": {
38239
+ "text": "void"
38240
+ }
38241
+ },
38242
+ "parameters": [
38243
+ {
38244
+ "name": "message",
38245
+ "type": {
38246
+ "text": "AparteMessage"
38247
+ }
38248
+ },
38249
+ {
38250
+ "name": "change",
38251
+ "type": {
38252
+ "text": "'append' | 'update'"
38253
+ }
38254
+ }
38255
+ ],
38256
+ "description": "Say that the app wrote into the transcript outside a turn (`aparte-transcript-change`),\nso a conversation controller saves it — during a human takeover no turn runs, and\nnothing else would. Not for the AI's empty shell, not while a reply streams (the\nturn's end saves then), and not under a framework, where the host says it."
38257
+ },
37797
38258
  {
37798
38259
  "kind": "method",
37799
38260
  "name": "addMessage",
@@ -37860,7 +38321,7 @@
37860
38321
  }
37861
38322
  }
37862
38323
  ],
37863
- "description": "Update the last message content, optionally appending.\nImplements the same contract as the Angular wrapper's updateLastMessage(),'\nmaking aparte-chat-viewport a fully standalone streaming target for aparte-client."
38324
+ "description": "Update the content of the turn's message, optionally appending: the message being\nstreamed while a turn runs, else the last one — the same resolution as the\n1-argument segment writes. Implements the same contract as the wrappers' host,\nmaking aparte-chat-viewport a fully standalone streaming target for aparte-client."
37864
38325
  },
37865
38326
  {
37866
38327
  "kind": "method",
@@ -38614,6 +39075,13 @@
38614
39075
  },
38615
39076
  "description": "The active branch path changed, after a retry fork or a navigation.",
38616
39077
  "name": "aparte-path-changed"
39078
+ },
39079
+ {
39080
+ "type": {
39081
+ "text": "CustomEvent<AparteTranscriptChangeEventDetail>"
39082
+ },
39083
+ "description": "`appendMessage` or `updateMessage` wrote outside a turn, on a viewport no framework drives.",
39084
+ "name": "aparte-transcript-change"
38617
39085
  }
38618
39086
  ],
38619
39087
  "attributes": [