@artooi/ag-ui-web-component 0.22.0 → 0.23.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 (122) hide show
  1. package/CHANGELOG.md +134 -36
  2. package/README.md +7 -7
  3. package/dist/ag-ui-web-component.bundle.js +145 -118
  4. package/dist/ag-ui-web-component.bundle.js.map +3 -3
  5. package/dist/constants.d.ts +65 -78
  6. package/dist/constants.d.ts.map +1 -1
  7. package/dist/core/ag_ui_chat.d.ts +93 -126
  8. package/dist/core/ag_ui_chat.d.ts.map +1 -1
  9. package/dist/core/agui_client.d.ts +24 -30
  10. package/dist/core/agui_client.d.ts.map +1 -1
  11. package/dist/core/attachment.d.ts +9 -14
  12. package/dist/core/attachment.d.ts.map +1 -1
  13. package/dist/core/conversation_store.d.ts +20 -27
  14. package/dist/core/conversation_store.d.ts.map +1 -1
  15. package/dist/core/create_http_agent.d.ts +13 -15
  16. package/dist/core/create_http_agent.d.ts.map +1 -1
  17. package/dist/core/remote_conversation_store.d.ts +8 -9
  18. package/dist/core/remote_conversation_store.d.ts.map +1 -1
  19. package/dist/core/run_index.d.ts +11 -20
  20. package/dist/core/run_index.d.ts.map +1 -1
  21. package/dist/core/transcribe_audio.d.ts +8 -8
  22. package/dist/core/transcribe_audio.d.ts.map +1 -1
  23. package/dist/core/upload_attachment.d.ts +15 -18
  24. package/dist/core/upload_attachment.d.ts.map +1 -1
  25. package/dist/core/utils.d.ts +4 -6
  26. package/dist/core/utils.d.ts.map +1 -1
  27. package/dist/dom/animations.d.ts +22 -30
  28. package/dist/dom/animations.d.ts.map +1 -1
  29. package/dist/dom/dom_driver.d.ts +7 -7
  30. package/dist/dom/native_setter.d.ts +2 -2
  31. package/dist/dom/native_setter.d.ts.map +1 -1
  32. package/dist/index.js +347 -401
  33. package/dist/index.js.map +2 -2
  34. package/dist/skills/fill_template.d.ts +4 -5
  35. package/dist/skills/fill_template.d.ts.map +1 -1
  36. package/dist/skills/parse_skills.d.ts.map +1 -1
  37. package/dist/skills/skill.d.ts +7 -8
  38. package/dist/skills/skill.d.ts.map +1 -1
  39. package/dist/tools/client_tool_registry.d.ts +2 -2
  40. package/dist/tools/page_action_tools.d.ts +7 -10
  41. package/dist/tools/page_action_tools.d.ts.map +1 -1
  42. package/dist/tools/page_state.d.ts +5 -8
  43. package/dist/tools/page_state.d.ts.map +1 -1
  44. package/dist/tools/route_map.d.ts +7 -10
  45. package/dist/tools/route_map.d.ts.map +1 -1
  46. package/dist/ui/approval_card.d.ts +15 -20
  47. package/dist/ui/approval_card.d.ts.map +1 -1
  48. package/dist/ui/attach_copy_buttons.d.ts +4 -10
  49. package/dist/ui/attach_copy_buttons.d.ts.map +1 -1
  50. package/dist/ui/attachment_chips.d.ts +13 -5
  51. package/dist/ui/attachment_chips.d.ts.map +1 -1
  52. package/dist/ui/attachment_tray.d.ts +6 -6
  53. package/dist/ui/attachment_tray.d.ts.map +1 -1
  54. package/dist/ui/checkpoint_menu.d.ts +7 -8
  55. package/dist/ui/checkpoint_menu.d.ts.map +1 -1
  56. package/dist/ui/confirmation_card.d.ts +10 -15
  57. package/dist/ui/confirmation_card.d.ts.map +1 -1
  58. package/dist/ui/question_card.d.ts +12 -15
  59. package/dist/ui/question_card.d.ts.map +1 -1
  60. package/dist/ui/relative_time.d.ts +5 -7
  61. package/dist/ui/relative_time.d.ts.map +1 -1
  62. package/dist/ui/render_markdown.d.ts +8 -8
  63. package/dist/ui/render_markdown.d.ts.map +1 -1
  64. package/dist/ui/resize_handle.d.ts +21 -34
  65. package/dist/ui/resize_handle.d.ts.map +1 -1
  66. package/dist/ui/run_notice.d.ts +5 -7
  67. package/dist/ui/run_notice.d.ts.map +1 -1
  68. package/dist/ui/skills_menu.d.ts +4 -5
  69. package/dist/ui/skills_menu.d.ts.map +1 -1
  70. package/dist/ui/styles.d.ts +1 -1
  71. package/dist/ui/styles.d.ts.map +1 -1
  72. package/dist/ui/thoughts_block.d.ts +9 -11
  73. package/dist/ui/thoughts_block.d.ts.map +1 -1
  74. package/dist/ui/thread_drawer.d.ts +6 -5
  75. package/dist/ui/thread_drawer.d.ts.map +1 -1
  76. package/dist/ui/tool_call_card.d.ts +17 -25
  77. package/dist/ui/tool_call_card.d.ts.map +1 -1
  78. package/dist/ui/ui_strings.d.ts +6 -12
  79. package/dist/ui/ui_strings.d.ts.map +1 -1
  80. package/dist/ui/voice_input.d.ts +10 -11
  81. package/dist/ui/voice_input.d.ts.map +1 -1
  82. package/package.json +1 -1
  83. package/src/constants.ts +71 -80
  84. package/src/core/ag_ui_chat.ts +242 -292
  85. package/src/core/agui_client.ts +60 -71
  86. package/src/core/attachment.ts +9 -14
  87. package/src/core/conversation_store.ts +25 -33
  88. package/src/core/create_http_agent.ts +18 -22
  89. package/src/core/remote_conversation_store.ts +14 -15
  90. package/src/core/run_index.ts +14 -23
  91. package/src/core/transcribe_audio.ts +9 -10
  92. package/src/core/upload_attachment.ts +18 -21
  93. package/src/core/utils.ts +4 -6
  94. package/src/dom/animations.ts +33 -43
  95. package/src/dom/dom_driver.ts +7 -7
  96. package/src/dom/native_setter.ts +11 -12
  97. package/src/skills/fill_template.ts +4 -5
  98. package/src/skills/parse_skills.ts +3 -4
  99. package/src/skills/skill.ts +7 -8
  100. package/src/tools/client_tool_registry.ts +2 -2
  101. package/src/tools/page_action_tools.ts +12 -15
  102. package/src/tools/page_state.ts +5 -8
  103. package/src/tools/route_map.ts +15 -19
  104. package/src/ui/approval_card.ts +15 -20
  105. package/src/ui/attach_copy_buttons.ts +9 -18
  106. package/src/ui/attachment_chips.ts +19 -10
  107. package/src/ui/attachment_tray.ts +8 -7
  108. package/src/ui/checkpoint_menu.ts +7 -8
  109. package/src/ui/confirmation_card.ts +10 -15
  110. package/src/ui/question_card.ts +12 -15
  111. package/src/ui/relative_time.ts +5 -7
  112. package/src/ui/render_markdown.ts +25 -51
  113. package/src/ui/resize_handle.ts +25 -38
  114. package/src/ui/run_notice.ts +9 -12
  115. package/src/ui/skills_menu.ts +4 -5
  116. package/src/ui/styles.ts +122 -93
  117. package/src/ui/thoughts_block.ts +11 -13
  118. package/src/ui/thread_drawer.ts +6 -5
  119. package/src/ui/tool_call_card.ts +22 -32
  120. package/src/ui/ui_strings.ts +6 -12
  121. package/src/ui/voice_input.ts +10 -11
  122. package/src/version.ts +1 -1
@@ -1,47 +1,32 @@
1
1
  /** The Custom Element tag name registered by {@link defineAgUiChat}. */
2
2
  export declare const ELEMENT_TAG = "ag-ui-chat";
3
- /**
4
- * Event dispatched by `<ag-ui-chat>` when the user submits a message.
5
- * `detail` carries `{ content: string }`. Later phases wire this to the
6
- * AG-UI client; for now it is the public seam for host integration.
7
- */
3
+ /** User submitted a message. `detail` is {@link SubmitDetail}. */
8
4
  export declare const SUBMIT_EVENT = "ag-ui-submit";
9
5
  /**
10
- * Event dispatched by `<ag-ui-chat>` when its collapsed state changes (via the
11
- * built-in toggle or {@link setCollapsed}). `detail` carries
12
- * `{ collapsed: boolean }`. A host can listen to drive its own chrome, or hide
13
- * the built-in toggle and drive the `collapsed` attribute itself.
6
+ * Collapsed state changed, via the built-in toggle or `setCollapsed`.
7
+ * `detail` is {@link ToggleDetail}.
14
8
  */
15
9
  export declare const TOGGLE_EVENT = "ag-ui-toggle";
16
10
  /**
17
- * Event dispatched by `<ag-ui-chat>` when the number of answers that arrived
18
- * while it was collapsed changes one more finished, or expanding cleared them
19
- * all. `detail` carries `{ unread: number }`.
20
- *
21
- * The built-in badge on the launcher renders exactly this. A host driving its
22
- * own chrome can turn the badge off with `data-unread-badge="false"` and listen
23
- * here instead.
11
+ * The count of answers that arrived while collapsed changed. `detail` is
12
+ * {@link UnreadDetail}. The built-in launcher badge renders exactly this; a
13
+ * host driving its own chrome sets `data-unread-badge="false"` and listens.
24
14
  */
25
15
  export declare const UNREAD_EVENT = "ag-ui-unread";
26
16
  /**
27
- * Event dispatched by `<ag-ui-chat>` when AG-UI **shared state** changesthe
28
- * server streamed a `STATE_SNAPSHOT` / `STATE_DELTA`, or the host assigned
29
- * {@link AgUiChat.sharedState}. `detail` carries `{ state }`.
17
+ * AG-UI shared state changeda streamed `STATE_SNAPSHOT` / `STATE_DELTA`, or
18
+ * a host assignment to `sharedState`. `detail` is {@link StateDetail}.
30
19
  *
31
- * This is the protocol's own state channel, distinct from `registerPageState`,
32
- * which exposes host state to the agent as ordinary *tools*.
20
+ * The protocol's own state channel, distinct from `registerPageState`, which
21
+ * exposes host state to the agent as ordinary tools.
33
22
  */
34
23
  export declare const STATE_EVENT = "ag-ui-state";
35
24
  /**
36
- * Event dispatched by `<ag-ui-chat>` whenever the attachment tray changes a
37
- * file queued, an upload finishing or failing, a chip removed, the tray
38
- * cleared after a send. `detail` carries `{ attachments, pending }`:
39
- * the durable refs of everything that has finished uploading, and how many are
40
- * still in flight.
41
- *
42
- * This is the seam for a host that drives its own composer: without it the tray
43
- * only ever spoke to the built-in Send button, so a custom send had no way to
44
- * know whether a file was ready or still uploading.
25
+ * The attachment tray changed a file queued, an upload finishing or failing,
26
+ * a chip removed, the tray cleared after a send. `detail` is
27
+ * {@link AttachmentsDetail}, carrying the refs that finished uploading and how
28
+ * many are still in flight. A host driving its own composer uses this to know
29
+ * whether a send would leave files behind.
45
30
  */
46
31
  export declare const ATTACHMENT_EVENT = "ag-ui-attachments";
47
32
  /** Roles a chat message can take. */
@@ -50,39 +35,31 @@ export declare const MESSAGE_ROLE: {
50
35
  readonly ASSISTANT: "assistant";
51
36
  };
52
37
  /**
53
- * JSON-Schema extension key marking a tool as destructive. Mirrors the
54
- * `django-ag-ui` server side. When a tool's `parameters` carries
55
- * `{ "x-destructive": true }`, the element gates its execution behind the
56
- * confirmation modal (unless `autoConfirm` is set).
38
+ * Schema-root key marking a tool destructive: the element gates its execution
39
+ * behind the confirmation card unless `autoConfirm` is set. All four `x-*` keys
40
+ * below mirror the `django-ag-ui` server side.
57
41
  */
58
42
  export declare const X_DESTRUCTIVE_KEY = "x-destructive";
59
43
  /**
60
- * JSON-Schema extension key carrying a human-readable confirmation prompt for a
61
- * destructive tool (e.g. `"Activate this project?"`). Mirrors the `django-ag-ui`
62
- * server side. When present, the inline confirmation card shows this instead of
63
- * the generic `Run "<tool>"?`.
44
+ * Schema-root key holding a confirmation prompt (e.g. `"Activate this
45
+ * project?"`), shown instead of the generic `Run "<tool>"?`.
64
46
  */
65
47
  export declare const X_CONFIRM_KEY = "x-confirm";
66
48
  /**
67
- * JSON-Schema extension key carrying a short human-readable label for a tool
68
- * (e.g. `"Query orders"` for `query_model`). Mirrors the `django-ag-ui` server
69
- * side; the tool-call card shows it instead of the raw tool name when present.
49
+ * Schema-root key holding a short label for a tool (e.g. `"Query orders"` for
50
+ * `query_model`), shown on the card instead of the raw tool name.
70
51
  */
71
52
  export declare const X_SUMMARY_KEY = "x-summary";
72
53
  /**
73
- * JSON-Schema extension key marking a tool as navigating — its handler triggers
74
- * a full page reload (an MPA navigation). When a tool's `parameters` carries
75
- * `{ "x-navigates": true }`, the element checkpoints the call before the reload
76
- * and resumes the run loop once the next page mounts. Mirrors `x-destructive`.
54
+ * Schema-root key marking a tool as navigating — its handler triggers a full
55
+ * page reload. The element checkpoints the call before the reload and resumes
56
+ * the run loop once the next page mounts.
77
57
  */
78
58
  export declare const X_NAVIGATES_KEY = "x-navigates";
79
59
  /**
80
- * Name of the built-in tool that re-reads the current page.
81
- *
82
- * Registered only when a page-map provider is set. Named here because it is
83
- * also the documented recovery from a stale page, so the stale-page guard has
84
- * to exempt it — refusing the very call that would refresh the agent's view
85
- * would be a deadlock.
60
+ * The built-in tool that re-reads the current page, registered only when a
61
+ * page-map provider is set. Named here because the stale-page guard must exempt
62
+ * it: refusing the one call that would refresh the agent's view deadlocks.
86
63
  */
87
64
  export declare const READ_PAGE_TOOL = "read_page";
88
65
  /** Upper bound on frontend tool-call → re-run rounds within one send. */
@@ -109,22 +86,19 @@ export declare const ATTACHMENT_STATUS: {
109
86
  };
110
87
  /**
111
88
  * Default client-side upload size cap (10 MiB), matching django-ag-ui's
112
- * `ATTACHMENT_MAX_BYTES` default. Overridable per element via
113
- * `data-attachment-max-bytes`; the server stays authoritative.
89
+ * `ATTACHMENT_MAX_BYTES`. Overridable via `data-attachment-max-bytes`; the
90
+ * server stays authoritative.
114
91
  */
115
92
  export declare const DEFAULT_ATTACHMENT_MAX_BYTES: number;
116
93
  /**
117
- * How much detail a tool-call card shows. Set via the `data-tool-display`
118
- * attribute on `<ag-ui-chat>`; defaults to `full` (back-compatible).
94
+ * How much detail a tool-call card shows. Set via `data-tool-display`; the
95
+ * default is `full`.
119
96
  *
120
- * - `inline` — the lightest mode: a single status row (icon + summary) with no
121
- * surrounding card chrome, the result tucked behind its own toggle. Reads as
122
- * one line of the answer rather than a boxed card pairs with the answer
123
- * well (page mode).
124
- * - `minimal` — just the tool name + status pill. No args, no result body.
125
- * - `compact` — name + status, with args *and* result tucked behind a single
126
- * collapsed "Details" toggle. The light default for dense UIs.
127
- * - `full` — args shown inline, result behind its own toggle (the original).
97
+ * - `inline` — one status row (icon + summary), no card chrome, result behind
98
+ * its own toggle. Reads as a line of the answer rather than a boxed card.
99
+ * - `minimal` tool name + status pill only. No args, no result body.
100
+ * - `compact` — name + status, args and result behind one "Details" toggle.
101
+ * - `full` — args inline, result behind its own toggle.
128
102
  */
129
103
  export declare const TOOL_DISPLAY: {
130
104
  readonly INLINE: "inline";
@@ -133,30 +107,30 @@ export declare const TOOL_DISPLAY: {
133
107
  readonly FULL: "full";
134
108
  };
135
109
  /**
136
- * `activityType` of the AG-UI `ACTIVITY_SNAPSHOT` event `django-ag-ui` emits
137
- * when a compaction capability trimmed the message history. Its `content`
138
- * carries `{ removed, before, after }`.
110
+ * `activityType` of the `ACTIVITY_SNAPSHOT` event django-ag-ui emits when a
111
+ * compaction capability trimmed the history. `content` carries
112
+ * `{ removed, before, after }`.
139
113
  */
140
114
  export declare const COMPACTION_ACTIVITY_TYPE = "compaction";
141
115
  /**
142
- * Pydantic-AI's built-in tool the model calls to load a *deferred* capability,
143
- * with `{ id }` naming it. Agent skills are deferred capabilities whose id is
144
- * the skill name, so a call to this tool is how "the agent picked skill X"
145
- * reaches the client — there is no separate event for it.
116
+ * Pydantic-AI's built-in tool for loading a deferred capability, with `{ id }`
117
+ * naming it. Agent skills are deferred capabilities keyed by skill name, so a
118
+ * call to this tool is the only signal that the agent picked a skill.
146
119
  *
147
- * Not to be confused with the host-provided {@link Skill} catalog, which is a
148
- * *human* affordance (a prompt the user launches from the `/`-palette).
120
+ * Distinct from the host-provided {@link Skill} catalog, which is a human
121
+ * affordance launched from the slash palette.
149
122
  */
150
123
  export declare const LOAD_CAPABILITY_TOOL = "load_capability";
151
124
  /**
152
125
  * The chrome's glyphs, as inline SVG markup.
153
126
  *
154
- * Static, author-written markup assigned to a `<slot>`'s fallback content, so
155
- * it never passes through the sanitiser — nothing here is user or server data.
156
- * Each icon is a 24x24 viewBox carrying the shared `glyph` class, which
157
- * `STYLES` sizes and paints from `currentColor`; `glyph--solid` fills instead
158
- * of stroking. A host that wants its own mark projects a matching
159
- * `slot="icon-…"` child rather than editing these.
127
+ * Static author-written markup assigned as a `<slot>`'s fallback content, so it
128
+ * never passes through the sanitiser — nothing here is user or server data, and
129
+ * nothing user-supplied may be interpolated into it. Each icon is a 24x24
130
+ * viewBox carrying the shared `glyph` class, which `STYLES` sizes and paints
131
+ * from `currentColor`; `glyph--solid` fills instead of stroking. A host wanting
132
+ * its own mark projects a matching `slot="icon-…"` child instead of editing
133
+ * these.
160
134
  */
161
135
  export declare const ICON_SEND = "<svg class=\"glyph\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M12 19.5V5m-6.5 6.5L12 5l6.5 6.5\"/></svg>";
162
136
  /** The Stop glyph the composer button wears while a run is in flight. */
@@ -167,4 +141,17 @@ export declare const ICON_ATTACH = "<svg class=\"glyph\" viewBox=\"0 0 24 24\" a
167
141
  export declare const ICON_VOICE = "<svg class=\"glyph\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M12 4a3 3 0 0 1 3 3v5a3 3 0 0 1-6 0V7a3 3 0 0 1 3-3z\"/><path d=\"M5 11v1a7 7 0 0 0 14 0v-1\"/><path d=\"M12 19v3\"/></svg>";
168
142
  /** The default launcher mark (a speech bubble), shown when the host slots none. */
169
143
  export declare const ICON_LAUNCHER = "<svg class=\"glyph\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M4 5.5A2.5 2.5 0 0 1 6.5 3h11A2.5 2.5 0 0 1 20 5.5v8a2.5 2.5 0 0 1-2.5 2.5H9l-5 4z\"/></svg>";
144
+ /**
145
+ * The generic attachment-chip mark, for a file family with nothing more
146
+ * specific to say. The chip marks share the contract of the chrome glyphs
147
+ * above; `iconFor` selects one by MIME family, never interpolating the MIME
148
+ * string into the markup.
149
+ */
150
+ export declare const ICON_FILE = "<svg class=\"glyph\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z\"/><path d=\"M14 3v5h5\"/></svg>";
151
+ /** An image attachment: a framed picture with a horizon and a sun. */
152
+ export declare const ICON_FILE_IMAGE = "<svg class=\"glyph\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><rect x=\"3.5\" y=\"4.5\" width=\"17\" height=\"15\" rx=\"2.5\"/><circle cx=\"9\" cy=\"10\" r=\"1.5\"/><path d=\"M4.5 17.5 9 13.5l3.5 3 3-2.5 4.5 4\"/></svg>";
153
+ /** A PDF: the generic page, banded to read as a labelled document. */
154
+ export declare const ICON_FILE_PDF = "<svg class=\"glyph\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z\"/><path d=\"M14 3v5h5\"/><rect class=\"glyph--solid\" x=\"7.5\" y=\"13.5\" width=\"9\" height=\"4.5\" rx=\"1\"/></svg>";
155
+ /** A text document: the generic page, ruled. */
156
+ export declare const ICON_FILE_TEXT = "<svg class=\"glyph\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z\"/><path d=\"M14 3v5h5\"/><path d=\"M8.5 13.5h7M8.5 17h4.5\"/></svg>";
170
157
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAGA,wEAAwE;AACxE,eAAO,MAAM,WAAW,eAAe,CAAC;AAExC;;;;GAIG;AACH,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAE3C;;;;;GAKG;AACH,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAE3C;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAE3C;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,gBAAgB,CAAC;AAEzC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,sBAAsB,CAAC;AAEpD,qCAAqC;AACrC,eAAO,MAAM,YAAY;aACvB,IAAI,EAAE,MAAM;aACZ,SAAS,EAAE,WAAW;CACd,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,kBAAkB,CAAC;AAEjD;;;;;GAKG;AACH,eAAO,MAAM,aAAa,cAAc,CAAC;AAEzC;;;;GAIG;AACH,eAAO,MAAM,aAAa,cAAc,CAAC;AAEzC;;;;;GAKG;AACH,eAAO,MAAM,eAAe,gBAAgB,CAAC;AAE7C;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,cAAc,CAAC;AAE1C,yEAAyE;AACzE,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC;;;GAGG;AACH,eAAO,MAAM,gBAAgB;aAC3B,OAAO,EAAE,SAAS;aAClB,IAAI,EAAE,MAAM;aACZ,KAAK,EAAE,OAAO;aACd,QAAQ,EAAE,UAAU;CACZ,CAAC;AAEX;;;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AAsE;AACtE,eAAO,MAAM,eAAe,kOAA0M,CAAC;AAEvO,sEAAsE;AACtE,eAAO,MAAM,aAAa,iQAA2O,CAAC;AAEtQ,gDAAgD;AAChD,eAAO,MAAM,cAAc,8MAAkM,CAAC"}
@@ -46,42 +46,35 @@ export interface UnreadDetail {
46
46
  * `<ag-ui-chat>` — a framework-free chat sidebar Web Component over AG-UI.
47
47
  *
48
48
  * Owns the Shadow DOM shell (header, scrolling message list, input row),
49
- * builds an {@link AgUiClient} on first send (via the overridable
50
- * {@link agentFactory}), and renders streaming assistant text plus tool-call
49
+ * builds an {@link AgUiClient} on first send via the overridable
50
+ * {@link agentFactory}, and renders streaming assistant text plus tool-call
51
51
  * activity. Emits a {@link SUBMIT_EVENT} for host visibility.
52
52
  *
53
- * The per-run frontend tool catalog and context are supplied by
54
- * {@link getTools} / {@link getContext}, which later phases (the tool
55
- * registry, DOM driver) populate.
53
+ * The per-run frontend tool catalog and context come from {@link getTools} and
54
+ * {@link getContext}.
56
55
  */
57
56
  export declare class AgUiChat extends HTMLElement {
58
57
  #private;
59
58
  /** Agent factory; override to inject a custom or fake agent (tests). */
60
59
  agentFactory: AgentFactory;
61
60
  /**
62
- * Static extra HTTP headers, sent with **every** request this element makes
63
- * the agent run, the thread index and its messages, the tool and skill
64
- * catalogs, the run index, uploads and transcription.
61
+ * Static extra HTTP headers, sent with every request this element makes: the
62
+ * agent run, the thread index and its messages, the tool and skill catalogs,
63
+ * the run index, uploads and transcription.
65
64
  *
66
- * Right for values fixed for the element's lifetime. A credential that
67
- * rotates (a short-lived JWT, a re-issued CSRF token) belongs in
68
- * {@link getHeaders} instead: this is read at request time, but only a
69
- * re-assignment updates it, so a token captured here is pinned until the host
70
- * remembers to assign again.
65
+ * For values fixed for the element's lifetime. A rotating credential belongs
66
+ * in {@link getHeaders} instead — only a re-assignment updates this, so a
67
+ * token captured here is pinned until the host assigns again.
71
68
  */
72
69
  headers: Record<string, string>;
73
70
  /**
74
- * Live header source, consulted immediately before every request — the way to
75
- * supply rotating credentials.
71
+ * Live header source, called afresh immediately before every request — the
72
+ * way to supply rotating credentials, with nothing to re-assign or keep in
73
+ * sync.
76
74
  *
77
- * Set it to a function and each request calls it afresh: a token refreshed by
78
- * the host between two requests reaches the second one, with nothing to
79
- * re-assign and nothing to keep in sync.
80
- *
81
- * Composes with {@link headers} rather than replacing it: the two are merged
82
- * per key with `getHeaders()` winning, so a static `X-Client` and a rotating
83
- * `Authorization` can be configured independently and neither silently drops
84
- * the other.
75
+ * Composes with {@link headers} rather than replacing it: merged per key with
76
+ * `getHeaders()` winning, so a static `X-Client` and a rotating
77
+ * `Authorization` are configured independently and neither drops the other.
85
78
  */
86
79
  getHeaders: (() => Record<string, string>) | null;
87
80
  /**
@@ -95,37 +88,31 @@ export declare class AgUiChat extends HTMLElement {
95
88
  autoConfirm: boolean;
96
89
  /**
97
90
  * When true, the built-in `ask_user` frontend tool is offered to the agent:
98
- * calling it renders an inline question card (radio choices and/or a free-text
99
- * field) and returns the user's answer. Off by default — like the other
100
- * built-in tool groups (route / page-action), it is opt-in so it doesn't
101
- * change the advertised catalog until a host asks for it.
91
+ * calling it renders an inline question card and returns the user's answer.
92
+ * Off by default, like the other built-in tool groups, so the advertised
93
+ * catalog does not change until a host asks for it.
102
94
  */
103
95
  askUser: boolean;
104
96
  /**
105
- * Optional full replacement for the `ask_user` question UI. When set, calling
106
- * `ask_user` invokes this instead of the built-in inline card: the host
107
- * renders whatever it likes (a native modal, a framework component, …) and
108
- * resolves with the answer. Unset (default) uses the built-in
109
- * {@link requestQuestion} card — style that via the `strings` override and the
110
- * `question*` CSS `::part()`s. Requires {@link askUser} to be enabled.
97
+ * Optional full replacement for the `ask_user` question UI, resolving with
98
+ * the answer; the same seam as {@link approvalRenderer}, styled via `strings`
99
+ * and the `question*` `::part()`s when left unset. Requires {@link askUser}.
111
100
  */
112
101
  askUserRenderer: QuestionRenderer | null;
113
102
  /**
114
- * Optional full replacement for the server-side-tool approval UI. When set, an
115
- * approval interrupt invokes this instead of the built-in inline approval
116
- * card: the host renders whatever it likes and resolves `true` to approve /
117
- * `false` to deny. Unset (default) uses the built-in {@link requestApproval}
118
- * card style that via the `strings` override and the `approval*` CSS
119
- * `::part()`s. The gate itself is enabled server-side; this only changes how
120
- * the decision is collected.
103
+ * Optional full replacement for the server-side-tool approval UI: an approval
104
+ * interrupt invokes this instead of the built-in {@link requestApproval}
105
+ * card, resolving `true` to approve or `false` to deny. Style the built-in
106
+ * card via `strings` and the `approval*` `::part()`s instead. The gate itself
107
+ * is enabled server-side; this only changes how the decision is collected.
121
108
  */
122
109
  approvalRenderer: ApprovalRenderer | null;
123
110
  /**
124
- * Optional per-call confirmation predicate. When set, it is authoritative:
125
- * given a tool name + args it decides whether *this* call needs confirmation
126
- * (so one tool can be instant for some args and confirmed for others — what a
127
- * static `x-destructive` flag can't express). When unset, the `x-destructive`
128
- * schema flag is used. `autoConfirm` short-circuits both.
111
+ * Optional per-call confirmation predicate. When set it is authoritative,
112
+ * deciding from the tool name and args whether this particular call needs
113
+ * confirmation — so one tool can be instant for some args and confirmed for
114
+ * others, which a static `x-destructive` flag cannot express. When unset the
115
+ * `x-destructive` flag decides. `autoConfirm` short-circuits both.
129
116
  */
130
117
  confirmPredicate: ((toolName: string, args: Record<string, unknown>) => boolean | Promise<boolean>) | null;
131
118
  /**
@@ -136,10 +123,11 @@ export declare class AgUiChat extends HTMLElement {
136
123
  */
137
124
  getTools: () => Tool[];
138
125
  /**
139
- * Per-run context provider. Defaults to the compact page map (when a
140
- * {@link getPageMap} provider is set and {@link autoInjectPageMap} is on)
141
- * plus a one-line manifest of the files attached to the message being sent,
142
- * so the agent knows which `read_attachment` ids are available.
126
+ * Per-run context provider. Defaults to the compact page map, when a
127
+ * {@link getPageMap} provider is set and {@link autoInjectPageMap} is on.
128
+ *
129
+ * Attachments are deliberately not restated here: the server derives its own
130
+ * manifest from the refs riding the messages.
143
131
  */
144
132
  getContext: () => Context[];
145
133
  /**
@@ -165,21 +153,17 @@ export declare class AgUiChat extends HTMLElement {
165
153
  conversationStore: ClientConversationStore;
166
154
  /**
167
155
  * How attached files are uploaded. `null` (default) uses the built-in
168
- * multipart `POST` to `data-attachments-url`. Set a custom
169
- * {@link UploadHandler} `(file, onProgress) => Promise<AttachmentRef>` to
170
- * swap the transport (e.g. a `tus-js-client` resumable adapter or
171
- * direct-to-S3 multipart) without changing the tray, the chips, or the AG-UI
172
- * wire (refs are transport-agnostic). When set, the 📎 affordance appears even
173
- * with no `data-attachments-url`; the handler owns its own endpoint + headers.
156
+ * multipart `POST` to `data-attachments-url`; a custom {@link UploadHandler}
157
+ * swaps the transport without changing the tray, the chips, or the AG-UI
158
+ * wire. When set, the 📎 affordance appears even with no
159
+ * `data-attachments-url`, and the handler owns its own endpoint and headers.
174
160
  */
175
161
  uploadHandler: UploadHandler | null;
176
162
  /**
177
163
  * How recorded voice clips are transcribed. `null` (default) POSTs the clip
178
- * to `data-transcribe-url` (django-ag-ui's `TranscribeView`). Set a custom
179
- * {@link TranscribeHandler} `(audio: Blob) => Promise<string>` to swap the
180
- * transport (a different STT endpoint, a browser Web Speech adapter) without
181
- * touching the mic button. When set, the 🎤 affordance appears even with no
182
- * `data-transcribe-url`.
164
+ * to `data-transcribe-url`; a custom {@link TranscribeHandler} swaps the
165
+ * transport without touching the mic button. When set, the 🎤 affordance
166
+ * appears even with no `data-transcribe-url`.
183
167
  */
184
168
  transcribeHandler: TranscribeHandler | null;
185
169
  /**
@@ -195,12 +179,10 @@ export declare class AgUiChat extends HTMLElement {
195
179
  */
196
180
  skillContext: () => Record<string, unknown>;
197
181
  /**
198
- * Friendly display labels for tool-call cards, keyed by tool name (e.g.
199
- * `{ list_projects: "Search projects" }`). Used as a fallback when a tool has
200
- * no `x-summary` in its own schema chiefly **server-side tools** (drf-mcp,
201
- * `@tool` registry), whose schema never reaches the browser (AG-UI streams
202
- * only the tool-call name). Client tools should prefer `x-summary` on their
203
- * schema; this map is the seam for everything else.
182
+ * Friendly display labels for tool-call cards, keyed by tool name. The
183
+ * fallback when a tool has no `x-summary` in its own schema, which chiefly
184
+ * means server-side tools: AG-UI streams only the tool-call name, so their
185
+ * schema never reaches the browser. Client tools should prefer `x-summary`.
204
186
  */
205
187
  toolSummaries: Record<string, string>;
206
188
  /**
@@ -229,21 +211,17 @@ export declare class AgUiChat extends HTMLElement {
229
211
  * when the server streams `STATE_SNAPSHOT` / `STATE_DELTA`. Assigning seeds
230
212
  * the next run; reading returns whatever the agent last applied.
231
213
  *
232
- * Listen for {@link STATE_EVENT} to react to server-driven changes.
233
- *
234
- * Not to be confused with {@link registerPageState}, which exposes host
235
- * state to the agent as ordinary *tools*.
214
+ * Listen for {@link STATE_EVENT} to react to server-driven changes. Distinct
215
+ * from {@link registerPageState}, which exposes host state as ordinary tools.
236
216
  */
237
217
  get sharedState(): Readonly<Record<string, unknown>>;
238
218
  set sharedState(state: Readonly<Record<string, unknown>>);
239
219
  /** Bind a piece of host page state to `read_<name>` / `set_<name>` tools. */
240
220
  registerPageState(binding: PageState): void;
241
221
  /**
242
- * @deprecated Renamed to {@link registerPageState}. The old name read as
243
- * AG-UI shared-state sync (`STATE_SNAPSHOT` / `STATE_DELTA`), which this
244
- * component does not implement — these are ordinary client tools over host
245
- * page state. Behaviour is unchanged; this alias will be removed in a future
246
- * major.
222
+ * @deprecated Renamed to {@link registerPageState} the old name read as
223
+ * AG-UI shared-state sync. Behaviour is unchanged; the alias will be removed
224
+ * in a future major.
247
225
  */
248
226
  registerStateHook(binding: PageState): void;
249
227
  /** The AG-UI endpoint URL, read from the `endpoint` attribute. */
@@ -254,19 +232,18 @@ export declare class AgUiChat extends HTMLElement {
254
232
  * `credentials` mode (`"omit"` / `"same-origin"` / `"include"`). Mirrored to
255
233
  * the `credentials` attribute, so markup embeds can set it without script.
256
234
  *
257
- * `null` (the default) leaves the browser's default of `same-origin` in
258
- * place. That default sends **no cookies at all** when the endpoints live on
259
- * a different origin from the page app.example.com calling
260
- * api.example.com is cross-origin and the request goes out anonymously
261
- * rather than failing, so the symptom is a 401 from a server that looks
262
- * correctly configured. A cookie-authenticated cross-origin deployment wants
263
- * `"include"`, plus `Access-Control-Allow-Credentials: true` and a concrete
264
- * (non-wildcard) `Access-Control-Allow-Origin` on the server.
235
+ * `null` (the default) leaves the browser's `same-origin` default in place,
236
+ * which sends no cookies at all to an endpoint on a different origin — and
237
+ * the request goes out anonymously rather than failing, so the symptom is a
238
+ * 401 from a server that looks correctly configured. A cookie-authenticated
239
+ * cross-origin deployment wants `"include"`, plus
240
+ * `Access-Control-Allow-Credentials: true` and a concrete, non-wildcard
241
+ * `Access-Control-Allow-Origin` on the server.
265
242
  *
266
243
  * Read per request, so a late assignment applies to everything after it.
267
- * `"omit"` cannot be honoured by the built-in **upload** transport, which is
268
- * an `XMLHttpRequest` and only has a two-state cookie switch; every other
269
- * endpoint honours all three modes.
244
+ * `"omit"` cannot be honoured by the built-in upload transport, an
245
+ * `XMLHttpRequest` with only a two-state cookie switch; every other endpoint
246
+ * honours all three modes.
270
247
  */
271
248
  get credentials(): RequestCredentials | null;
272
249
  set credentials(value: RequestCredentials | null);
@@ -286,24 +263,20 @@ export declare class AgUiChat extends HTMLElement {
286
263
  * the backend skill catalog and the thread's history — with the transport
287
264
  * configuration as it stands now.
288
265
  *
289
- * This is the answer for a host that can only configure the element after the
290
- * fact (a token fetched in a passive effect, an async auth handshake): the
291
- * startup requests already went out with whatever was set then, and this says
292
- * "try again, properly authenticated" without removing and re-inserting the
293
- * node.
266
+ * For a host that can only configure the element after the fact (a token
267
+ * fetched in a passive effect, an async auth handshake), this re-issues the
268
+ * startup requests authenticated, without removing and re-inserting the node.
294
269
  *
295
- * A reload, not a merge the in-flight run is cancelled and the transcript
296
- * is rebuilt from the persisted history, so anything streamed since is
297
- * dropped. Call it once, when configuration lands; not between turns.
270
+ * A reload, not a merge: the in-flight run is cancelled and the transcript is
271
+ * rebuilt from persisted history, so anything streamed since is dropped. Call
272
+ * it once, when configuration lands, not between turns.
298
273
  */
299
274
  reload(): Promise<void>;
300
275
  /**
301
- * Tear down live resources when the element leaves the DOM (a removed node, a
302
- * client-side route swap): cancel the in-flight run so its SSE stream closes,
303
- * abort any in-flight uploads so they don't orphan server-side files, and
304
- * release the mic so the browser's recording indicator clears. Without this a
305
- * removed `<ag-ui-chat>` leaks a streaming request, uploads, and a live
306
- * `MediaRecorder`.
276
+ * Tear down live resources when the element leaves the DOM: cancel the
277
+ * in-flight run so its stream closes, abort in-flight uploads so they do not
278
+ * orphan server-side files, and release the mic so the browser's recording
279
+ * indicator clears. Without this a removed element leaks all three.
307
280
  */
308
281
  disconnectedCallback(): void;
309
282
  /**
@@ -340,12 +313,10 @@ export declare class AgUiChat extends HTMLElement {
340
313
  * Open the thread-history drawer: the imperative route to the control that
341
314
  * renders as `::part(history-button)`.
342
315
  *
343
- * A host that hides `::part(header)` to render its own title bar hides the
344
- * history, new-chat and collapse buttons with it and thread switching then
345
- * has no route at all, because those controls live inside the header. Each of
346
- * them has a method, so a host chrome can rebuild the set: this one,
347
- * {@link openCheckpoints}, {@link newChat}, {@link toggleCollapsed} and
348
- * {@link toggleTheme}.
316
+ * A host that hides `::part(header)` for its own title bar hides the history,
317
+ * new-chat and collapse buttons with it. Each has a method so that chrome can
318
+ * be rebuilt: this one, {@link openCheckpoints}, {@link newChat},
319
+ * {@link toggleCollapsed} and {@link toggleTheme}.
349
320
  */
350
321
  openThreads(): void;
351
322
  /**
@@ -364,32 +335,28 @@ export declare class AgUiChat extends HTMLElement {
364
335
  /**
365
336
  * Append a message bubble and return it.
366
337
  *
367
- * Assistant content is rendered as sanitised markdown/HTML; user content
368
- * stays literal text (no need to parse what the user typed, and it avoids
369
- * rendering user-authored markup).
338
+ * Assistant content renders as sanitised markdown/HTML; user content stays
339
+ * literal text, which also avoids rendering user-authored markup.
370
340
  *
371
- * Assistant bubbles land in the current answer group, opening one if
372
- * needed; a user bubble closes the prior group and sits directly in the list
373
- * (the well wraps the *assistant* turn, the user message precedes it).
341
+ * Assistant bubbles land in the current answer group, opening one if needed;
342
+ * a user bubble closes the prior group and sits directly in the list, the
343
+ * well wrapping only the assistant turn.
374
344
  */
375
345
  appendMessage(role: MessageRole, content: string): HTMLDivElement;
376
346
  /**
377
347
  * Send a message as if the user had typed it — renders the user bubble,
378
348
  * dispatches {@link SUBMIT_EVENT}, and starts the run.
379
349
  *
380
- * The programmatic half of the composer, for a host driving its own input
381
- * (a "Ask about this order" button, a command palette, a custom composer
382
- * replacing the built-in one). Everything the built-in Send does happens
383
- * here; Send itself now reads the composer, clears it, and calls this.
350
+ * The programmatic half of the composer, for a host driving its own input.
351
+ * Everything the built-in Send does happens here; Send reads the composer,
352
+ * clears it, and calls this.
384
353
  *
385
- * `attachments` are durable {@link AttachmentRef}s — the shape
386
- * {@link attachFile}'s upload resolves to, and the shape
387
- * {@link ATTACHMENT_EVENT} reports. Pass them to attach files to the message.
354
+ * `attachments` are durable {@link AttachmentRef}s — what {@link attachFile}
355
+ * resolves to and what {@link ATTACHMENT_EVENT} reports.
388
356
  *
389
- * No-ops while a run is in flight (a second concurrent run would orphan the
390
- * first) and for an entirely empty message. Unlike the built-in Send, this
391
- * does **not** consult the tray: what you pass is what is sent, so a host
392
- * composer stays in charge of its own state.
357
+ * No-ops on an empty message, and while a run is in flight, since a second
358
+ * concurrent run would orphan the first. Unlike the built-in Send it does not
359
+ * consult the tray: what you pass is what is sent.
393
360
  */
394
361
  sendMessage(content: string, attachments?: readonly AttachmentRef[]): Promise<void>;
395
362
  /**
@@ -397,11 +364,11 @@ export declare class AgUiChat extends HTMLElement {
397
364
  * picker and drag-and-drop do — validation, progress chip, and all.
398
365
  *
399
366
  * Returns `false` when uploads are not configured (no `data-attachments-url`
400
- * and no {@link uploadHandler}), which is the only way for a host to tell;
401
- * the tray does not exist to report anything in that case.
367
+ * and no {@link uploadHandler}) the only signal a host gets, since the tray
368
+ * does not exist to report anything then.
402
369
  *
403
370
  * Uploading is asynchronous: watch {@link ATTACHMENT_EVENT} for the resulting
404
- * {@link AttachmentRef}, and pass it to {@link sendMessage} once `pending`
371
+ * {@link AttachmentRef} and pass it to {@link sendMessage} once `pending`
405
372
  * reaches zero.
406
373
  */
407
374
  attachFile(file: File): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"ag_ui_chat.d.ts","sourceRoot":"","sources":["../../src/core/ag_ui_chat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAsB,IAAI,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EASL,YAAY,EAUb,MAAM,iBAAiB,CAAC;AAGzB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,KAAK,UAAU,EAAsB,MAAM,kCAAkC,CAAC;AAGvF,OAAO,EAAyB,KAAK,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAC9F,OAAO,EAAwB,KAAK,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAwB,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAE9E,OAAO,EAAoB,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,EACL,KAAK,gBAAgB,EAGtB,MAAM,wBAAwB,CAAC;AAOhC,OAAO,EACL,KAAK,gBAAgB,EAGtB,MAAM,wBAAwB,CAAC;AAchC,OAAO,EAAgB,KAAK,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,EAAsC,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAC;AASzF,OAAO,EAAE,KAAK,aAAa,EAAsB,MAAM,iBAAiB,CAAC;AACzE,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EAE1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,KAAK,YAAY,EAAmB,MAAM,wBAAwB,CAAC;AAG5E,OAAO,EAAE,KAAK,iBAAiB,EAAmB,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,KAAK,aAAa,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