@artooi/agents-web-components 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +68 -0
- package/LICENSE +21 -0
- package/README.md +4397 -2
- package/dist/agents-web-components.bundle.js +5708 -0
- package/dist/agents-web-components.bundle.js.map +7 -0
- package/dist/bundle.d.ts +3 -0
- package/dist/bundle.d.ts.map +1 -0
- package/dist/chat.d.ts +3 -0
- package/dist/chat.d.ts.map +1 -0
- package/dist/chat.js +16373 -0
- package/dist/chat.js.map +7 -0
- package/dist/chunk-ARNLFGCC.js +7715 -0
- package/dist/chunk-ARNLFGCC.js.map +7 -0
- package/dist/constants.d.ts +575 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/core/activity_registration.d.ts +19 -0
- package/dist/core/activity_registration.d.ts.map +1 -0
- package/dist/core/activity_registry.d.ts +46 -0
- package/dist/core/activity_registry.d.ts.map +1 -0
- package/dist/core/activity_renderer.d.ts +20 -0
- package/dist/core/activity_renderer.d.ts.map +1 -0
- package/dist/core/ag_ui_chat.d.ts +836 -0
- package/dist/core/ag_ui_chat.d.ts.map +1 -0
- package/dist/core/agui_client.d.ts +370 -0
- package/dist/core/agui_client.d.ts.map +1 -0
- package/dist/core/attachment.d.ts +42 -0
- package/dist/core/attachment.d.ts.map +1 -0
- package/dist/core/chat_registry.d.ts +23 -0
- package/dist/core/chat_registry.d.ts.map +1 -0
- package/dist/core/client_seed.d.ts +27 -0
- package/dist/core/client_seed.d.ts.map +1 -0
- package/dist/core/conversation_store.d.ts +195 -0
- package/dist/core/conversation_store.d.ts.map +1 -0
- package/dist/core/create_http_agent.d.ts +57 -0
- package/dist/core/create_http_agent.d.ts.map +1 -0
- package/dist/core/define_chat.d.ts +13 -0
- package/dist/core/define_chat.d.ts.map +1 -0
- package/dist/core/events/attachments_detail.d.ts +9 -0
- package/dist/core/events/attachments_detail.d.ts.map +1 -0
- package/dist/core/events/bar_height_detail.d.ts +6 -0
- package/dist/core/events/bar_height_detail.d.ts.map +1 -0
- package/dist/core/events/custom_agent_detail.d.ts +8 -0
- package/dist/core/events/custom_agent_detail.d.ts.map +1 -0
- package/dist/core/events/dock_width_detail.d.ts +8 -0
- package/dist/core/events/dock_width_detail.d.ts.map +1 -0
- package/dist/core/events/feedback_detail.d.ts +28 -0
- package/dist/core/events/feedback_detail.d.ts.map +1 -0
- package/dist/core/events/invalidate_detail.d.ts +16 -0
- package/dist/core/events/invalidate_detail.d.ts.map +1 -0
- package/dist/core/events/maximize_detail.d.ts +5 -0
- package/dist/core/events/maximize_detail.d.ts.map +1 -0
- package/dist/core/events/run_finished_detail.d.ts +36 -0
- package/dist/core/events/run_finished_detail.d.ts.map +1 -0
- package/dist/core/events/state_detail.d.ts +5 -0
- package/dist/core/events/state_detail.d.ts.map +1 -0
- package/dist/core/events/submit_detail.d.ts +8 -0
- package/dist/core/events/submit_detail.d.ts.map +1 -0
- package/dist/core/events/thread_detail.d.ts +27 -0
- package/dist/core/events/thread_detail.d.ts.map +1 -0
- package/dist/core/events/thread_title_detail.d.ts +8 -0
- package/dist/core/events/thread_title_detail.d.ts.map +1 -0
- package/dist/core/events/toggle_detail.d.ts +5 -0
- package/dist/core/events/toggle_detail.d.ts.map +1 -0
- package/dist/core/events/tool_run.d.ts +11 -0
- package/dist/core/events/tool_run.d.ts.map +1 -0
- package/dist/core/events/unread_detail.d.ts +11 -0
- package/dist/core/events/unread_detail.d.ts.map +1 -0
- package/dist/core/message_role.d.ts +4 -0
- package/dist/core/message_role.d.ts.map +1 -0
- package/dist/core/read_flag.d.ts +11 -0
- package/dist/core/read_flag.d.ts.map +1 -0
- package/dist/core/read_json_attribute.d.ts +15 -0
- package/dist/core/read_json_attribute.d.ts.map +1 -0
- package/dist/core/read_max_tool_rounds.d.ts +9 -0
- package/dist/core/read_max_tool_rounds.d.ts.map +1 -0
- package/dist/core/remote_conversation_store.d.ts +71 -0
- package/dist/core/remote_conversation_store.d.ts.map +1 -0
- package/dist/core/run_handlers.d.ts +85 -0
- package/dist/core/run_handlers.d.ts.map +1 -0
- package/dist/core/run_index.d.ts +58 -0
- package/dist/core/run_index.d.ts.map +1 -0
- package/dist/core/storage_scope.d.ts +118 -0
- package/dist/core/storage_scope.d.ts.map +1 -0
- package/dist/core/tool_outcome.d.ts +27 -0
- package/dist/core/tool_outcome.d.ts.map +1 -0
- package/dist/core/transcribe_audio.d.ts +32 -0
- package/dist/core/transcribe_audio.d.ts.map +1 -0
- package/dist/core/upload_attachment.d.ts +44 -0
- package/dist/core/upload_attachment.d.ts.map +1 -0
- package/dist/core/utils.d.ts +117 -0
- package/dist/core/utils.d.ts.map +1 -0
- package/dist/dom/animations.d.ts +122 -0
- package/dist/dom/animations.d.ts.map +1 -0
- package/dist/dom/dom_driver.d.ts +28 -0
- package/dist/dom/dom_driver.d.ts.map +1 -0
- package/dist/dom/highlight_overlay.d.ts +39 -0
- package/dist/dom/highlight_overlay.d.ts.map +1 -0
- package/dist/dom/native_setter.d.ts +5 -0
- package/dist/dom/native_setter.d.ts.map +1 -0
- package/dist/dom/ring_color.d.ts +16 -0
- package/dist/dom/ring_color.d.ts.map +1 -0
- package/dist/dom/utils.d.ts +3 -0
- package/dist/dom/utils.d.ts.map +1 -0
- package/dist/index.d.ts +62 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +223 -0
- package/dist/index.js.map +7 -0
- package/dist/skills/fill_template.d.ts +16 -0
- package/dist/skills/fill_template.d.ts.map +1 -0
- package/dist/skills/parse_skills.d.ts +8 -0
- package/dist/skills/parse_skills.d.ts.map +1 -0
- package/dist/skills/skill.d.ts +33 -0
- package/dist/skills/skill.d.ts.map +1 -0
- package/dist/skills/skill_catalog.d.ts +69 -0
- package/dist/skills/skill_catalog.d.ts.map +1 -0
- package/dist/skills/skill_name_from.d.ts +12 -0
- package/dist/skills/skill_name_from.d.ts.map +1 -0
- package/dist/tools/chat_surface_tools.d.ts +77 -0
- package/dist/tools/chat_surface_tools.d.ts.map +1 -0
- package/dist/tools/client_tool_registry.d.ts +58 -0
- package/dist/tools/client_tool_registry.d.ts.map +1 -0
- package/dist/tools/is_destructive.d.ts +14 -0
- package/dist/tools/is_destructive.d.ts.map +1 -0
- package/dist/tools/is_navigates.d.ts +9 -0
- package/dist/tools/is_navigates.d.ts.map +1 -0
- package/dist/tools/page_action_tools.d.ts +30 -0
- package/dist/tools/page_action_tools.d.ts.map +1 -0
- package/dist/tools/page_map.d.ts +16 -0
- package/dist/tools/page_map.d.ts.map +1 -0
- package/dist/tools/page_state.d.ts +27 -0
- package/dist/tools/page_state.d.ts.map +1 -0
- package/dist/tools/parse_tool_catalog.d.ts +21 -0
- package/dist/tools/parse_tool_catalog.d.ts.map +1 -0
- package/dist/tools/route_map.d.ts +37 -0
- package/dist/tools/route_map.d.ts.map +1 -0
- package/dist/tools/tool_catalog.d.ts +86 -0
- package/dist/tools/tool_catalog.d.ts.map +1 -0
- package/dist/tools/tool_dispatch.d.ts +82 -0
- package/dist/tools/tool_dispatch.d.ts.map +1 -0
- package/dist/ui/charts/chart_block.d.ts +57 -0
- package/dist/ui/charts/chart_block.d.ts.map +1 -0
- package/dist/ui/charts/chart_spec_from.d.ts +12 -0
- package/dist/ui/charts/chart_spec_from.d.ts.map +1 -0
- package/dist/ui/charts/chart_styles.d.ts +2 -0
- package/dist/ui/charts/chart_styles.d.ts.map +1 -0
- package/dist/ui/charts/chart_tool.d.ts +15 -0
- package/dist/ui/charts/chart_tool.d.ts.map +1 -0
- package/dist/ui/composer/attachment_styles.d.ts +2 -0
- package/dist/ui/composer/attachment_styles.d.ts.map +1 -0
- package/dist/ui/composer/attachment_tray.d.ts +53 -0
- package/dist/ui/composer/attachment_tray.d.ts.map +1 -0
- package/dist/ui/composer/auto_grow.d.ts +10 -0
- package/dist/ui/composer/auto_grow.d.ts.map +1 -0
- package/dist/ui/composer/build_composer.d.ts +32 -0
- package/dist/ui/composer/build_composer.d.ts.map +1 -0
- package/dist/ui/composer/composer_attachments.d.ts +57 -0
- package/dist/ui/composer/composer_attachments.d.ts.map +1 -0
- package/dist/ui/composer/composer_styles.d.ts +2 -0
- package/dist/ui/composer/composer_styles.d.ts.map +1 -0
- package/dist/ui/composer/composer_voice.d.ts +48 -0
- package/dist/ui/composer/composer_voice.d.ts.map +1 -0
- package/dist/ui/composer/skill_styles.d.ts +2 -0
- package/dist/ui/composer/skill_styles.d.ts.map +1 -0
- package/dist/ui/composer/skills_menu.d.ts +34 -0
- package/dist/ui/composer/skills_menu.d.ts.map +1 -0
- package/dist/ui/composer/voice_input.d.ts +46 -0
- package/dist/ui/composer/voice_input.d.ts.map +1 -0
- package/dist/ui/excerpts/attach_copy_buttons.d.ts +13 -0
- package/dist/ui/excerpts/attach_copy_buttons.d.ts.map +1 -0
- package/dist/ui/excerpts/copy_payload.d.ts +30 -0
- package/dist/ui/excerpts/copy_payload.d.ts.map +1 -0
- package/dist/ui/excerpts/page_quote_offer.d.ts +33 -0
- package/dist/ui/excerpts/page_quote_offer.d.ts.map +1 -0
- package/dist/ui/excerpts/place_offer.d.ts +9 -0
- package/dist/ui/excerpts/place_offer.d.ts.map +1 -0
- package/dist/ui/excerpts/quote_selection.d.ts +66 -0
- package/dist/ui/excerpts/quote_selection.d.ts.map +1 -0
- package/dist/ui/excerpts/transcript_quote_offer.d.ts +57 -0
- package/dist/ui/excerpts/transcript_quote_offer.d.ts.map +1 -0
- package/dist/ui/fill_ui_string.d.ts +32 -0
- package/dist/ui/fill_ui_string.d.ts.map +1 -0
- package/dist/ui/history/checkpoint_menu.d.ts +41 -0
- package/dist/ui/history/checkpoint_menu.d.ts.map +1 -0
- package/dist/ui/history/conversation_history.d.ts +317 -0
- package/dist/ui/history/conversation_history.d.ts.map +1 -0
- package/dist/ui/history/history_styles.d.ts +2 -0
- package/dist/ui/history/history_styles.d.ts.map +1 -0
- package/dist/ui/history/relative_time.d.ts +23 -0
- package/dist/ui/history/relative_time.d.ts.map +1 -0
- package/dist/ui/history/thread_drawer.d.ts +64 -0
- package/dist/ui/history/thread_drawer.d.ts.map +1 -0
- package/dist/ui/history/utils.d.ts +2 -0
- package/dist/ui/history/utils.d.ts.map +1 -0
- package/dist/ui/interrupts/approval_card.d.ts +64 -0
- package/dist/ui/interrupts/approval_card.d.ts.map +1 -0
- package/dist/ui/interrupts/approval_styles.d.ts +2 -0
- package/dist/ui/interrupts/approval_styles.d.ts.map +1 -0
- package/dist/ui/interrupts/confirmation_card.d.ts +51 -0
- package/dist/ui/interrupts/confirmation_card.d.ts.map +1 -0
- package/dist/ui/interrupts/confirmation_styles.d.ts +2 -0
- package/dist/ui/interrupts/confirmation_styles.d.ts.map +1 -0
- package/dist/ui/interrupts/pending_decision.d.ts +22 -0
- package/dist/ui/interrupts/pending_decision.d.ts.map +1 -0
- package/dist/ui/interrupts/question_card.d.ts +49 -0
- package/dist/ui/interrupts/question_card.d.ts.map +1 -0
- package/dist/ui/interrupts/question_styles.d.ts +2 -0
- package/dist/ui/interrupts/question_styles.d.ts.map +1 -0
- package/dist/ui/place/place.d.ts +17 -0
- package/dist/ui/place/place.d.ts.map +1 -0
- package/dist/ui/place/place_chip.d.ts +26 -0
- package/dist/ui/place/place_chip.d.ts.map +1 -0
- package/dist/ui/place/place_from_route.d.ts +9 -0
- package/dist/ui/place/place_from_route.d.ts.map +1 -0
- package/dist/ui/place/place_styles.d.ts +2 -0
- package/dist/ui/place/place_styles.d.ts.map +1 -0
- package/dist/ui/placement/clamp_launcher.d.ts +20 -0
- package/dist/ui/placement/clamp_launcher.d.ts.map +1 -0
- package/dist/ui/placement/clamp_panel.d.ts +13 -0
- package/dist/ui/placement/clamp_panel.d.ts.map +1 -0
- package/dist/ui/placement/collapse_styles.d.ts +2 -0
- package/dist/ui/placement/collapse_styles.d.ts.map +1 -0
- package/dist/ui/placement/dock_styles.d.ts +2 -0
- package/dist/ui/placement/dock_styles.d.ts.map +1 -0
- package/dist/ui/placement/embedded_styles.d.ts +2 -0
- package/dist/ui/placement/embedded_styles.d.ts.map +1 -0
- package/dist/ui/placement/launcher_drag.d.ts +49 -0
- package/dist/ui/placement/launcher_drag.d.ts.map +1 -0
- package/dist/ui/placement/launcher_placement.d.ts +77 -0
- package/dist/ui/placement/launcher_placement.d.ts.map +1 -0
- package/dist/ui/placement/launcher_styles.d.ts +2 -0
- package/dist/ui/placement/launcher_styles.d.ts.map +1 -0
- package/dist/ui/placement/page_styles.d.ts +2 -0
- package/dist/ui/placement/page_styles.d.ts.map +1 -0
- package/dist/ui/placement/panel_drag.d.ts +40 -0
- package/dist/ui/placement/panel_drag.d.ts.map +1 -0
- package/dist/ui/placement/panel_placement.d.ts +173 -0
- package/dist/ui/placement/panel_placement.d.ts.map +1 -0
- package/dist/ui/placement/place_widget.d.ts +31 -0
- package/dist/ui/placement/place_widget.d.ts.map +1 -0
- package/dist/ui/placement/preset_styles.d.ts +2 -0
- package/dist/ui/placement/preset_styles.d.ts.map +1 -0
- package/dist/ui/placement/resize_handle.d.ts +78 -0
- package/dist/ui/placement/resize_handle.d.ts.map +1 -0
- package/dist/ui/placement/resize_styles.d.ts +2 -0
- package/dist/ui/placement/resize_styles.d.ts.map +1 -0
- package/dist/ui/placement/sidebar_styles.d.ts +2 -0
- package/dist/ui/placement/sidebar_styles.d.ts.map +1 -0
- package/dist/ui/placement/small_viewport_styles.d.ts +2 -0
- package/dist/ui/placement/small_viewport_styles.d.ts.map +1 -0
- package/dist/ui/placement/surface_for.d.ts +93 -0
- package/dist/ui/placement/surface_for.d.ts.map +1 -0
- package/dist/ui/progress/prettify_tool_name.d.ts +11 -0
- package/dist/ui/progress/prettify_tool_name.d.ts.map +1 -0
- package/dist/ui/progress/run_announcer.d.ts +41 -0
- package/dist/ui/progress/run_announcer.d.ts.map +1 -0
- package/dist/ui/progress/run_notice.d.ts +21 -0
- package/dist/ui/progress/run_notice.d.ts.map +1 -0
- package/dist/ui/progress/run_notice_styles.d.ts +2 -0
- package/dist/ui/progress/run_notice_styles.d.ts.map +1 -0
- package/dist/ui/progress/subagent_panel.d.ts +101 -0
- package/dist/ui/progress/subagent_panel.d.ts.map +1 -0
- package/dist/ui/progress/subagent_progress.d.ts +57 -0
- package/dist/ui/progress/subagent_progress.d.ts.map +1 -0
- package/dist/ui/progress/subagent_update.d.ts +28 -0
- package/dist/ui/progress/subagent_update.d.ts.map +1 -0
- package/dist/ui/progress/thoughts_block.d.ts +57 -0
- package/dist/ui/progress/thoughts_block.d.ts.map +1 -0
- package/dist/ui/progress/thoughts_styles.d.ts +2 -0
- package/dist/ui/progress/thoughts_styles.d.ts.map +1 -0
- package/dist/ui/progress/tool_call_card.d.ts +167 -0
- package/dist/ui/progress/tool_call_card.d.ts.map +1 -0
- package/dist/ui/progress/tool_group_styles.d.ts +2 -0
- package/dist/ui/progress/tool_group_styles.d.ts.map +1 -0
- package/dist/ui/progress/tool_step_group.d.ts +50 -0
- package/dist/ui/progress/tool_step_group.d.ts.map +1 -0
- package/dist/ui/progress/tool_step_styles.d.ts +2 -0
- package/dist/ui/progress/tool_step_styles.d.ts.map +1 -0
- package/dist/ui/shell/adopt_styles.d.ts +28 -0
- package/dist/ui/shell/adopt_styles.d.ts.map +1 -0
- package/dist/ui/shell/build_header.d.ts +45 -0
- package/dist/ui/shell/build_header.d.ts.map +1 -0
- package/dist/ui/shell/build_launcher.d.ts +33 -0
- package/dist/ui/shell/build_launcher.d.ts.map +1 -0
- package/dist/ui/shell/collapse_glyph.d.ts +14 -0
- package/dist/ui/shell/collapse_glyph.d.ts.map +1 -0
- package/dist/ui/shell/frame_styles.d.ts +2 -0
- package/dist/ui/shell/frame_styles.d.ts.map +1 -0
- package/dist/ui/shell/glyph_slot.d.ts +7 -0
- package/dist/ui/shell/glyph_slot.d.ts.map +1 -0
- package/dist/ui/shell/header_button.d.ts +11 -0
- package/dist/ui/shell/header_button.d.ts.map +1 -0
- package/dist/ui/shell/icon_element.d.ts +12 -0
- package/dist/ui/shell/icon_element.d.ts.map +1 -0
- package/dist/ui/shell/is_unread_badge_enabled.d.ts +10 -0
- package/dist/ui/shell/is_unread_badge_enabled.d.ts.map +1 -0
- package/dist/ui/shell/read_launcher_icon_url.d.ts +8 -0
- package/dist/ui/shell/read_launcher_icon_url.d.ts.map +1 -0
- package/dist/ui/shell/theme_styles.d.ts +2 -0
- package/dist/ui/shell/theme_styles.d.ts.map +1 -0
- package/dist/ui/shell/token_styles.d.ts +2 -0
- package/dist/ui/shell/token_styles.d.ts.map +1 -0
- package/dist/ui/styles.d.ts +2 -0
- package/dist/ui/styles.d.ts.map +1 -0
- package/dist/ui/themes/classic_styles.d.ts +2 -0
- package/dist/ui/themes/classic_styles.d.ts.map +1 -0
- package/dist/ui/themes/classic_tokens.d.ts +2 -0
- package/dist/ui/themes/classic_tokens.d.ts.map +1 -0
- package/dist/ui/themes/code_tokens.d.ts +2 -0
- package/dist/ui/themes/code_tokens.d.ts.map +1 -0
- package/dist/ui/themes/ledger_styles.d.ts +2 -0
- package/dist/ui/themes/ledger_styles.d.ts.map +1 -0
- package/dist/ui/themes/ledger_tokens.d.ts +2 -0
- package/dist/ui/themes/ledger_tokens.d.ts.map +1 -0
- package/dist/ui/themes/modern_styles.d.ts +2 -0
- package/dist/ui/themes/modern_styles.d.ts.map +1 -0
- package/dist/ui/themes/quiet_styles.d.ts +2 -0
- package/dist/ui/themes/quiet_styles.d.ts.map +1 -0
- package/dist/ui/themes/scheme_styles.d.ts +2 -0
- package/dist/ui/themes/scheme_styles.d.ts.map +1 -0
- package/dist/ui/themes/soft_styles.d.ts +2 -0
- package/dist/ui/themes/soft_styles.d.ts.map +1 -0
- package/dist/ui/themes/soft_tokens.d.ts +2 -0
- package/dist/ui/themes/soft_tokens.d.ts.map +1 -0
- package/dist/ui/themes/theme_hosts.d.ts +15 -0
- package/dist/ui/themes/theme_hosts.d.ts.map +1 -0
- package/dist/ui/transcript/answer_actions.d.ts +50 -0
- package/dist/ui/transcript/answer_actions.d.ts.map +1 -0
- package/dist/ui/transcript/answer_stream.d.ts +56 -0
- package/dist/ui/transcript/answer_stream.d.ts.map +1 -0
- package/dist/ui/transcript/attachment_chip_styles.d.ts +2 -0
- package/dist/ui/transcript/attachment_chip_styles.d.ts.map +1 -0
- package/dist/ui/transcript/attachment_chips.d.ts +21 -0
- package/dist/ui/transcript/attachment_chips.d.ts.map +1 -0
- package/dist/ui/transcript/build_transcript.d.ts +21 -0
- package/dist/ui/transcript/build_transcript.d.ts.map +1 -0
- package/dist/ui/transcript/greeting_styles.d.ts +2 -0
- package/dist/ui/transcript/greeting_styles.d.ts.map +1 -0
- package/dist/ui/transcript/groups_tool_steps.d.ts +13 -0
- package/dist/ui/transcript/groups_tool_steps.d.ts.map +1 -0
- package/dist/ui/transcript/message_action_styles.d.ts +2 -0
- package/dist/ui/transcript/message_action_styles.d.ts.map +1 -0
- package/dist/ui/transcript/message_actions.d.ts +74 -0
- package/dist/ui/transcript/message_actions.d.ts.map +1 -0
- package/dist/ui/transcript/message_styles.d.ts +2 -0
- package/dist/ui/transcript/message_styles.d.ts.map +1 -0
- package/dist/ui/transcript/render_markdown.d.ts +40 -0
- package/dist/ui/transcript/render_markdown.d.ts.map +1 -0
- package/dist/ui/transcript/render_or_warn.d.ts +16 -0
- package/dist/ui/transcript/render_or_warn.d.ts.map +1 -0
- package/dist/ui/transcript/reveal_words.d.ts +8 -0
- package/dist/ui/transcript/reveal_words.d.ts.map +1 -0
- package/dist/ui/transcript/starter_chips.d.ts +21 -0
- package/dist/ui/transcript/starter_chips.d.ts.map +1 -0
- package/dist/ui/transcript/stick_to_bottom.d.ts +55 -0
- package/dist/ui/transcript/stick_to_bottom.d.ts.map +1 -0
- package/dist/ui/transcript/suggestion_chips.d.ts +29 -0
- package/dist/ui/transcript/suggestion_chips.d.ts.map +1 -0
- package/dist/ui/transcript/transcript.d.ts +196 -0
- package/dist/ui/transcript/transcript.d.ts.map +1 -0
- package/dist/ui/transcript/transcript_styles.d.ts +2 -0
- package/dist/ui/transcript/transcript_styles.d.ts.map +1 -0
- package/dist/ui/ui_strings.d.ts +352 -0
- package/dist/ui/ui_strings.d.ts.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/package.json +86 -3
- package/src/bundle.ts +2 -0
- package/src/chat.ts +2 -0
- package/src/constants.ts +650 -0
- package/src/core/activity_registration.ts +19 -0
- package/src/core/activity_registry.ts +133 -0
- package/src/core/activity_renderer.ts +19 -0
- package/src/core/ag_ui_chat.ts +3966 -0
- package/src/core/agui_client.ts +1028 -0
- package/src/core/attachment.ts +62 -0
- package/src/core/chat_registry.ts +53 -0
- package/src/core/client_seed.ts +27 -0
- package/src/core/conversation_store.ts +478 -0
- package/src/core/create_http_agent.ts +97 -0
- package/src/core/define_chat.ts +25 -0
- package/src/core/events/attachments_detail.ts +9 -0
- package/src/core/events/bar_height_detail.ts +5 -0
- package/src/core/events/custom_agent_detail.ts +7 -0
- package/src/core/events/dock_width_detail.ts +7 -0
- package/src/core/events/feedback_detail.ts +27 -0
- package/src/core/events/invalidate_detail.ts +15 -0
- package/src/core/events/maximize_detail.ts +4 -0
- package/src/core/events/run_finished_detail.ts +36 -0
- package/src/core/events/state_detail.ts +4 -0
- package/src/core/events/submit_detail.ts +8 -0
- package/src/core/events/thread_detail.ts +26 -0
- package/src/core/events/thread_title_detail.ts +7 -0
- package/src/core/events/toggle_detail.ts +4 -0
- package/src/core/events/tool_run.ts +10 -0
- package/src/core/events/unread_detail.ts +10 -0
- package/src/core/message_role.ts +4 -0
- package/src/core/read_flag.ts +13 -0
- package/src/core/read_json_attribute.ts +30 -0
- package/src/core/read_max_tool_rounds.ts +13 -0
- package/src/core/remote_conversation_store.ts +279 -0
- package/src/core/run_handlers.ts +524 -0
- package/src/core/run_index.ts +114 -0
- package/src/core/storage_scope.ts +291 -0
- package/src/core/tool_outcome.ts +39 -0
- package/src/core/transcribe_audio.ts +76 -0
- package/src/core/upload_attachment.ts +130 -0
- package/src/core/utils.ts +230 -0
- package/src/dom/animations.ts +341 -0
- package/src/dom/dom_driver.ts +91 -0
- package/src/dom/highlight_overlay.ts +204 -0
- package/src/dom/native_setter.ts +40 -0
- package/src/dom/ring_color.ts +206 -0
- package/src/dom/utils.ts +5 -0
- package/src/index.ts +220 -0
- package/src/skills/fill_template.ts +31 -0
- package/src/skills/parse_skills.ts +31 -0
- package/src/skills/skill.ts +32 -0
- package/src/skills/skill_catalog.ts +172 -0
- package/src/skills/skill_name_from.ts +19 -0
- package/src/tools/chat_surface_tools.ts +183 -0
- package/src/tools/client_tool_registry.ts +80 -0
- package/src/tools/is_destructive.ts +17 -0
- package/src/tools/is_navigates.ts +12 -0
- package/src/tools/page_action_tools.ts +123 -0
- package/src/tools/page_map.ts +26 -0
- package/src/tools/page_state.ts +57 -0
- package/src/tools/parse_tool_catalog.ts +41 -0
- package/src/tools/route_map.ts +132 -0
- package/src/tools/tool_catalog.ts +334 -0
- package/src/tools/tool_dispatch.ts +453 -0
- package/src/ui/charts/chart_block.ts +519 -0
- package/src/ui/charts/chart_spec_from.ts +125 -0
- package/src/ui/charts/chart_styles.ts +63 -0
- package/src/ui/charts/chart_tool.ts +72 -0
- package/src/ui/composer/attachment_styles.ts +71 -0
- package/src/ui/composer/attachment_tray.ts +295 -0
- package/src/ui/composer/auto_grow.ts +12 -0
- package/src/ui/composer/build_composer.ts +114 -0
- package/src/ui/composer/composer_attachments.ts +324 -0
- package/src/ui/composer/composer_styles.ts +177 -0
- package/src/ui/composer/composer_voice.ts +93 -0
- package/src/ui/composer/skill_styles.ts +120 -0
- package/src/ui/composer/skills_menu.ts +188 -0
- package/src/ui/composer/voice_input.ts +282 -0
- package/src/ui/excerpts/attach_copy_buttons.ts +73 -0
- package/src/ui/excerpts/copy_payload.ts +156 -0
- package/src/ui/excerpts/page_quote_offer.ts +203 -0
- package/src/ui/excerpts/place_offer.ts +24 -0
- package/src/ui/excerpts/quote_selection.ts +345 -0
- package/src/ui/excerpts/transcript_quote_offer.ts +175 -0
- package/src/ui/fill_ui_string.ts +41 -0
- package/src/ui/history/checkpoint_menu.ts +300 -0
- package/src/ui/history/conversation_history.ts +1169 -0
- package/src/ui/history/history_styles.ts +492 -0
- package/src/ui/history/relative_time.ts +50 -0
- package/src/ui/history/thread_drawer.ts +471 -0
- package/src/ui/history/utils.ts +11 -0
- package/src/ui/interrupts/approval_card.ts +202 -0
- package/src/ui/interrupts/approval_styles.ts +52 -0
- package/src/ui/interrupts/confirmation_card.ts +138 -0
- package/src/ui/interrupts/confirmation_styles.ts +114 -0
- package/src/ui/interrupts/pending_decision.ts +33 -0
- package/src/ui/interrupts/question_card.ts +213 -0
- package/src/ui/interrupts/question_styles.ts +73 -0
- package/src/ui/place/place.ts +16 -0
- package/src/ui/place/place_chip.ts +146 -0
- package/src/ui/place/place_from_route.ts +27 -0
- package/src/ui/place/place_styles.ts +108 -0
- package/src/ui/placement/clamp_launcher.ts +38 -0
- package/src/ui/placement/clamp_panel.ts +30 -0
- package/src/ui/placement/collapse_styles.ts +472 -0
- package/src/ui/placement/dock_styles.ts +116 -0
- package/src/ui/placement/embedded_styles.ts +14 -0
- package/src/ui/placement/launcher_drag.ts +206 -0
- package/src/ui/placement/launcher_placement.ts +133 -0
- package/src/ui/placement/launcher_styles.ts +189 -0
- package/src/ui/placement/page_styles.ts +47 -0
- package/src/ui/placement/panel_drag.ts +138 -0
- package/src/ui/placement/panel_placement.ts +1975 -0
- package/src/ui/placement/place_widget.ts +64 -0
- package/src/ui/placement/preset_styles.ts +49 -0
- package/src/ui/placement/resize_handle.ts +229 -0
- package/src/ui/placement/resize_styles.ts +201 -0
- package/src/ui/placement/sidebar_styles.ts +113 -0
- package/src/ui/placement/small_viewport_styles.ts +70 -0
- package/src/ui/placement/surface_for.ts +183 -0
- package/src/ui/progress/prettify_tool_name.ts +16 -0
- package/src/ui/progress/run_announcer.ts +67 -0
- package/src/ui/progress/run_notice.ts +61 -0
- package/src/ui/progress/run_notice_styles.ts +52 -0
- package/src/ui/progress/subagent_panel.ts +227 -0
- package/src/ui/progress/subagent_progress.ts +200 -0
- package/src/ui/progress/subagent_update.ts +89 -0
- package/src/ui/progress/thoughts_block.ts +165 -0
- package/src/ui/progress/thoughts_styles.ts +74 -0
- package/src/ui/progress/tool_call_card.ts +429 -0
- package/src/ui/progress/tool_group_styles.ts +313 -0
- package/src/ui/progress/tool_step_group.ts +317 -0
- package/src/ui/progress/tool_step_styles.ts +486 -0
- package/src/ui/shell/adopt_styles.ts +34 -0
- package/src/ui/shell/build_header.ts +121 -0
- package/src/ui/shell/build_launcher.ts +79 -0
- package/src/ui/shell/collapse_glyph.ts +42 -0
- package/src/ui/shell/frame_styles.ts +147 -0
- package/src/ui/shell/glyph_slot.ts +12 -0
- package/src/ui/shell/header_button.ts +22 -0
- package/src/ui/shell/icon_element.ts +33 -0
- package/src/ui/shell/is_unread_badge_enabled.ts +11 -0
- package/src/ui/shell/read_launcher_icon_url.ts +9 -0
- package/src/ui/shell/theme_styles.ts +11 -0
- package/src/ui/shell/token_styles.ts +480 -0
- package/src/ui/styles.ts +110 -0
- package/src/ui/themes/classic_styles.ts +32 -0
- package/src/ui/themes/classic_tokens.ts +51 -0
- package/src/ui/themes/code_tokens.ts +21 -0
- package/src/ui/themes/ledger_styles.ts +169 -0
- package/src/ui/themes/ledger_tokens.ts +33 -0
- package/src/ui/themes/modern_styles.ts +80 -0
- package/src/ui/themes/quiet_styles.ts +118 -0
- package/src/ui/themes/scheme_styles.ts +26 -0
- package/src/ui/themes/soft_styles.ts +149 -0
- package/src/ui/themes/soft_tokens.ts +29 -0
- package/src/ui/themes/theme_hosts.ts +14 -0
- package/src/ui/transcript/answer_actions.ts +165 -0
- package/src/ui/transcript/answer_stream.ts +123 -0
- package/src/ui/transcript/attachment_chip_styles.ts +116 -0
- package/src/ui/transcript/attachment_chips.ts +82 -0
- package/src/ui/transcript/build_transcript.ts +67 -0
- package/src/ui/transcript/greeting_styles.ts +171 -0
- package/src/ui/transcript/groups_tool_steps.ts +16 -0
- package/src/ui/transcript/message_action_styles.ts +155 -0
- package/src/ui/transcript/message_actions.ts +234 -0
- package/src/ui/transcript/message_styles.ts +262 -0
- package/src/ui/transcript/render_markdown.ts +181 -0
- package/src/ui/transcript/render_or_warn.ts +22 -0
- package/src/ui/transcript/reveal_words.ts +41 -0
- package/src/ui/transcript/starter_chips.ts +42 -0
- package/src/ui/transcript/stick_to_bottom.ts +126 -0
- package/src/ui/transcript/suggestion_chips.ts +73 -0
- package/src/ui/transcript/transcript.ts +555 -0
- package/src/ui/transcript/transcript_styles.ts +153 -0
- package/src/ui/ui_strings.ts +550 -0
- package/src/version.ts +1 -0
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import type { Message } from "@ag-ui/core";
|
|
2
|
+
/**
|
|
3
|
+
* A checkpoint recorded just before a navigating tool reloads the page.
|
|
4
|
+
*
|
|
5
|
+
* The reload destroys the in-memory run loop, so the element persists this
|
|
6
|
+
* marker first; on the next mount it supplies the tool's result and resumes.
|
|
7
|
+
*/
|
|
8
|
+
export interface NavigationCheckpoint {
|
|
9
|
+
/** The tool-call id whose result must be supplied after the reload. */
|
|
10
|
+
readonly toolCallId: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Lightweight metadata for one conversation — the thread-drawer row shape, so
|
|
14
|
+
* the drawer renders without loading message bodies. `title` defaults to a
|
|
15
|
+
* truncation of the first user message until an explicit rename, `preview` is a
|
|
16
|
+
* one-line excerpt of the latest message, and `updatedAt` is epoch ms of the
|
|
17
|
+
* last change, which orders the list.
|
|
18
|
+
*/
|
|
19
|
+
export interface ThreadMeta {
|
|
20
|
+
readonly threadId: string;
|
|
21
|
+
readonly title: string;
|
|
22
|
+
readonly updatedAt: number;
|
|
23
|
+
readonly preview: string;
|
|
24
|
+
/**
|
|
25
|
+
* Whether the thread holds an answer the user has not seen, as a server store
|
|
26
|
+
* knows it (from a last-read timestamp). Optional: a store that cannot tell
|
|
27
|
+
* leaves it out, and the element counts only what finishes in this page.
|
|
28
|
+
*/
|
|
29
|
+
readonly unread?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Client-side persistence seam for the conversation and a pending-navigation
|
|
33
|
+
* checkpoint, keyed by `thread_id`.
|
|
34
|
+
*
|
|
35
|
+
* The default {@link SessionStorageStore} keeps everything per-tab. A host may
|
|
36
|
+
* inject a server-backed store instead, which is why `loadMessages` and
|
|
37
|
+
* `listThreads` are async. The checkpoint methods stay synchronous: the marker
|
|
38
|
+
* is a small local hint a server store can derive from history and no-op.
|
|
39
|
+
*
|
|
40
|
+
* Thread enumeration backs the chat-history drawer; deleting a thread reuses
|
|
41
|
+
* {@link clear}, and "new chat" is {@link newThread} — which leaves the
|
|
42
|
+
* conversation it moves off of intact, for the drawer to offer back.
|
|
43
|
+
*/
|
|
44
|
+
export interface ClientConversationStore {
|
|
45
|
+
/** The active conversation id, generated and persisted on first read. */
|
|
46
|
+
threadId(): string;
|
|
47
|
+
/**
|
|
48
|
+
* Start a fresh conversation, make it active, and return its id.
|
|
49
|
+
*
|
|
50
|
+
* Existing threads are left where they are: "new chat" adds one, and
|
|
51
|
+
* {@link clear} is the only method that takes one away.
|
|
52
|
+
*
|
|
53
|
+
* Optional: for a store without it, the caller mints the id itself and
|
|
54
|
+
* hands it to {@link setActiveThread}, which loses only the store's own
|
|
55
|
+
* record that the thread is new (see {@link isUnsent}).
|
|
56
|
+
*/
|
|
57
|
+
newThread?(): string;
|
|
58
|
+
/** Load the persisted message history, or `null` when none exists. */
|
|
59
|
+
loadMessages(threadId: string): Promise<readonly Message[] | null>;
|
|
60
|
+
/** Persist the message history (and refresh the thread's drawer metadata). */
|
|
61
|
+
saveMessages(threadId: string, messages: readonly Message[]): void;
|
|
62
|
+
/** Load the pending-navigation checkpoint, or `null` when none is set. */
|
|
63
|
+
loadCheckpoint(threadId: string): NavigationCheckpoint | null;
|
|
64
|
+
/** Set the pending-navigation checkpoint, or clear it when given `null`. */
|
|
65
|
+
saveCheckpoint(threadId: string, checkpoint: NavigationCheckpoint | null): void;
|
|
66
|
+
/** Forget the conversation and checkpoint (a "delete thread" / "new chat"). */
|
|
67
|
+
clear(threadId: string): void;
|
|
68
|
+
/** The user's threads as drawer metadata (no message bodies), newest first. */
|
|
69
|
+
listThreads(): Promise<readonly ThreadMeta[]>;
|
|
70
|
+
/** Make `threadId` the active conversation (the drawer selecting a row). */
|
|
71
|
+
setActiveThread(threadId: string): void;
|
|
72
|
+
/** Set a thread's display title (the drawer renaming a row). */
|
|
73
|
+
renameThread(threadId: string, title: string): void;
|
|
74
|
+
/**
|
|
75
|
+
* Whether `threadId` was minted here and has never been saved — a thread in
|
|
76
|
+
* which nothing has been sent yet.
|
|
77
|
+
*
|
|
78
|
+
* Exists so a server-backed store can skip asking a server for history that
|
|
79
|
+
* cannot be there: the element mints an id on first mount and immediately tries
|
|
80
|
+
* to restore it, which answers `404` and logs one in the console on every first
|
|
81
|
+
* visit. Nothing is wrong, and it looks exactly like something being wrong.
|
|
82
|
+
*
|
|
83
|
+
* Optional, and deliberately narrow. A store that cannot tell omits it and the
|
|
84
|
+
* fetch happens as before, which is also the right answer for a store that
|
|
85
|
+
* holds nothing locally: "I have no messages for this id" is not the same claim
|
|
86
|
+
* as "this id is new", and only the store that minted the id can make the
|
|
87
|
+
* second one. A thread picked from the drawer was never minted here, so it is
|
|
88
|
+
* still fetched.
|
|
89
|
+
*/
|
|
90
|
+
isUnsent?(threadId: string): boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Record that the user has seen `threadId`'s answers.
|
|
93
|
+
*
|
|
94
|
+
* The element calls it when a thread with unseen answers is on screen with
|
|
95
|
+
* the panel expanded, and when an answer finishes there in view. A server
|
|
96
|
+
* store maps it to its read endpoint, and should report the thread with
|
|
97
|
+
* `unread: false` from {@link listThreads} afterwards. It is called inside the
|
|
98
|
+
* element's expand and thread-change paths, so it must not throw: a store that
|
|
99
|
+
* writes to a server sends the request without awaiting it and handles its own
|
|
100
|
+
* failure, the way a failed save is handled.
|
|
101
|
+
*
|
|
102
|
+
* Optional: a store without it still has its threads counted and cleared in
|
|
103
|
+
* the page; nothing is recorded beyond it.
|
|
104
|
+
*/
|
|
105
|
+
markRead?(threadId: string): void;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Whether its owner has warned about a refused write yet. Each store and each
|
|
109
|
+
* storage scope holds one, so an origin-wide, persistent refusal (a full quota
|
|
110
|
+
* stays full) warns once per owner, not once per persisted turn or, on the
|
|
111
|
+
* resize path, per keystroke.
|
|
112
|
+
*/
|
|
113
|
+
export interface WriteFailureReport {
|
|
114
|
+
reported: boolean;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* `sessionStorage.setItem` that survives a store which refuses to write.
|
|
118
|
+
*
|
|
119
|
+
* `setItem` throws on an exhausted quota (a long conversation, or one turn
|
|
120
|
+
* carrying a large tool result) and in privacy modes that deny storage
|
|
121
|
+
* altogether. Every write here is a *durability* concern — surviving a reload —
|
|
122
|
+
* and none of them is worth an exception, because of where they are called
|
|
123
|
+
* from: the element persists the transcript from inside the run loop, so an
|
|
124
|
+
* unguarded throw escapes as a run error and tells the user the agent failed
|
|
125
|
+
* when nothing but the browser's storage did. On the cancel path it escapes as
|
|
126
|
+
* an unhandled rejection instead.
|
|
127
|
+
*
|
|
128
|
+
* So a failed write loses the reload, never the conversation on screen, and
|
|
129
|
+
* says so once per `report`; without one, it says so on every refusal.
|
|
130
|
+
* Recovery is in the user's hands already: deleting the oversized thread from
|
|
131
|
+
* the history drawer is a `removeItem`, which frees the quota.
|
|
132
|
+
*/
|
|
133
|
+
export declare function writeStoredItem(key: string, value: string, report?: WriteFailureReport): void;
|
|
134
|
+
/**
|
|
135
|
+
* Default {@link ClientConversationStore}: per-tab `sessionStorage`.
|
|
136
|
+
*
|
|
137
|
+
* Survives full page reloads and same-tab navigation, clears on tab close.
|
|
138
|
+
* Tracks multiple threads per tab: the active id under one key, message history
|
|
139
|
+
* and checkpoint namespaced by id, and a small index feeding the drawer with no
|
|
140
|
+
* server involved.
|
|
141
|
+
*
|
|
142
|
+
* An optional `namespace` scopes every key to one element, so two
|
|
143
|
+
* `<ag-ui-chat>` instances on the same origin keep separate active-thread
|
|
144
|
+
* pointers and drawer indexes instead of clobbering each other. The default
|
|
145
|
+
* empty namespace keeps the origin-global keys.
|
|
146
|
+
*/
|
|
147
|
+
export declare class SessionStorageStore implements ClientConversationStore {
|
|
148
|
+
#private;
|
|
149
|
+
constructor(namespace?: string);
|
|
150
|
+
/**
|
|
151
|
+
* Move every key a store owns out of `from`'s namespace and into `to`'s.
|
|
152
|
+
*
|
|
153
|
+
* `<ag-ui-chat>` adopts an element-scoped conversation into a
|
|
154
|
+
* principal-scoped one the first time a `user-key` arrives, which is a host
|
|
155
|
+
* naming the user who was already there rather than a handover.
|
|
156
|
+
*
|
|
157
|
+
* Only this store's own suffixes move — the element's `collapsed` / `size` /
|
|
158
|
+
* `theme` keys share the global root and are deliberately left where they
|
|
159
|
+
* are. A value already present at the destination wins: the destination is
|
|
160
|
+
* the durable record and the source is the stray this move exists to clear.
|
|
161
|
+
* A refused write warns once per call.
|
|
162
|
+
*/
|
|
163
|
+
static adopt(from: string, to: string): void;
|
|
164
|
+
/**
|
|
165
|
+
* Forget everything a store holds for `namespace`.
|
|
166
|
+
*
|
|
167
|
+
* The logout primitive: `<ag-ui-chat>` calls it when its `user-key` changes,
|
|
168
|
+
* and a host driving its own store can call it from its own sign-out path.
|
|
169
|
+
* Deliberately narrow — it removes only keys under this exact namespace whose
|
|
170
|
+
* suffix parses as one this store writes, so it can never reach another
|
|
171
|
+
* element's conversation or the host's own `sessionStorage` entries.
|
|
172
|
+
*/
|
|
173
|
+
static purge(namespace: string): void;
|
|
174
|
+
threadId(): string;
|
|
175
|
+
newThread(): string;
|
|
176
|
+
isUnsent(threadId: string): boolean;
|
|
177
|
+
loadMessages(threadId: string): Promise<readonly Message[] | null>;
|
|
178
|
+
saveMessages(threadId: string, messages: readonly Message[]): void;
|
|
179
|
+
loadCheckpoint(threadId: string): NavigationCheckpoint | null;
|
|
180
|
+
saveCheckpoint(threadId: string, checkpoint: NavigationCheckpoint | null): void;
|
|
181
|
+
clear(threadId: string): void;
|
|
182
|
+
listThreads(): Promise<readonly ThreadMeta[]>;
|
|
183
|
+
setActiveThread(threadId: string): void;
|
|
184
|
+
renameThread(threadId: string, title: string): void;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* A thread's title from its first user message, collapsed and truncated, or `""`
|
|
188
|
+
* when no user message has text.
|
|
189
|
+
*
|
|
190
|
+
* A first message that is exactly a skill's `/token` is named rather than
|
|
191
|
+
* quoted: `skillTitle(token)` when it knows the skill, else the token in words
|
|
192
|
+
* (`/summarize_draw` reads "Summarize draw").
|
|
193
|
+
*/
|
|
194
|
+
export declare function threadTitleFrom(messages: readonly Message[], skillTitle?: (name: string) => string | undefined): string;
|
|
195
|
+
//# sourceMappingURL=conversation_store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation_store.d.ts","sourceRoot":"","sources":["../../src/core/conversation_store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAI3C;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,uEAAuE;IACvE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,uBAAuB;IACtC,yEAAyE;IACzE,QAAQ,IAAI,MAAM,CAAC;IACnB;;;;;;;;;OASG;IACH,SAAS,CAAC,IAAI,MAAM,CAAC;IACrB,sEAAsE;IACtE,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;IACnE,8EAA8E;IAC9E,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,IAAI,CAAC;IACnE,0EAA0E;IAC1E,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,oBAAoB,GAAG,IAAI,CAAC;IAC9D,4EAA4E;IAC5E,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,oBAAoB,GAAG,IAAI,GAAG,IAAI,CAAC;IAChF,+EAA+E;IAC/E,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,+EAA+E;IAC/E,WAAW,IAAI,OAAO,CAAC,SAAS,UAAU,EAAE,CAAC,CAAC;IAC9C,4EAA4E;IAC5E,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,gEAAgE;IAChE,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACpD;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IACrC;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAgBD;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,MAAM,GAAE,kBAAwC,GAC/C,IAAI,CAeN;AAgBD;;;;;;;;;;;;GAYG;AACH,qBAAa,mBAAoB,YAAW,uBAAuB;;IAIjE,YAAY,SAAS,SAAK,EAEzB;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAY3C;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAIpC;IAED,QAAQ,IAAI,MAAM,CAEjB;IAED,SAAS,IAAI,MAAM,CAKlB;IAED,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAKlC;IAED,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,OAAO,EAAE,GAAG,IAAI,CAAC,CAEjE;IAED,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,IAAI,CAIjE;IAED,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,oBAAoB,GAAG,IAAI,CAE5D;IAED,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,oBAAoB,GAAG,IAAI,GAAG,IAAI,CAO9E;IAED,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAW5B;IAED,WAAW,IAAI,OAAO,CAAC,SAAS,UAAU,EAAE,CAAC,CAK5C;IAED,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAEtC;IAED,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CASlD;CA4DF;AAgDD;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,SAAS,OAAO,EAAE,EAC5B,UAAU,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAA2B,GACjE,MAAM,CAYR"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { type AbstractAgent } from "@ag-ui/client";
|
|
2
|
+
import type { Message } from "@ag-ui/core";
|
|
3
|
+
/** Config for {@link createHttpAgent}. */
|
|
4
|
+
export interface HttpAgentOptions {
|
|
5
|
+
endpoint: string;
|
|
6
|
+
headers?: Record<string, string>;
|
|
7
|
+
/**
|
|
8
|
+
* Cookie policy for the run request, as `fetch`'s own `credentials` mode.
|
|
9
|
+
* Unset leaves the browser default (`same-origin`), which sends no cookies
|
|
10
|
+
* to an agent endpoint on a different origin or subdomain. A
|
|
11
|
+
* cookie-authenticated cross-origin deployment needs `"include"` here plus a
|
|
12
|
+
* server answering with `Access-Control-Allow-Credentials: true` and a
|
|
13
|
+
* concrete origin.
|
|
14
|
+
*/
|
|
15
|
+
credentials?: RequestCredentials;
|
|
16
|
+
/**
|
|
17
|
+
* Live header source, re-read on every request, overlaid on `headers`.
|
|
18
|
+
* `HttpAgent` bakes static `headers` in at construction and the element
|
|
19
|
+
* caches the agent for the whole conversation, so rotating credentials (CSRF,
|
|
20
|
+
* short-lived JWT) must come through here.
|
|
21
|
+
*/
|
|
22
|
+
getHeaders?: () => Record<string, string>;
|
|
23
|
+
/** Stable conversation id, so the agent's runs share a thread. */
|
|
24
|
+
threadId?: string;
|
|
25
|
+
/** Rehydrated history to seed the agent with (durable conversation). */
|
|
26
|
+
initialMessages?: readonly Message[];
|
|
27
|
+
/**
|
|
28
|
+
* AG-UI shared state to seed the agent with. `@ag-ui/client` sends it as
|
|
29
|
+
* `RunAgentInput.state` on every run and replaces it in place when the
|
|
30
|
+
* server streams `STATE_SNAPSHOT` / `STATE_DELTA`.
|
|
31
|
+
*/
|
|
32
|
+
initialState?: Readonly<Record<string, unknown>>;
|
|
33
|
+
/**
|
|
34
|
+
* Origins, besides the document's own, this agent may carry the host's
|
|
35
|
+
* credentials to.
|
|
36
|
+
*
|
|
37
|
+
* Running the agent on another subdomain is a normal deployment and stays
|
|
38
|
+
* supported, so a cross-origin endpoint is not refused — it is *announced*,
|
|
39
|
+
* once per origin, on the console. Listing an origin here says the
|
|
40
|
+
* destination was chosen deliberately and silences the notice for it.
|
|
41
|
+
*
|
|
42
|
+
* Entries are compared as serialized origins (`https://agent.example.com`,
|
|
43
|
+
* scheme and port included), which is what `URL.origin` produces.
|
|
44
|
+
*/
|
|
45
|
+
trustedOrigins?: readonly string[];
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Build an AG-UI {@link HttpAgent} pointed at `endpoint`.
|
|
49
|
+
*
|
|
50
|
+
* The default agent factory for `<ag-ui-chat>`; tests and advanced hosts
|
|
51
|
+
* override the element's `agentFactory` to inject a different
|
|
52
|
+
* {@link AbstractAgent}.
|
|
53
|
+
*/
|
|
54
|
+
export declare function createHttpAgent(options: HttpAgentOptions): AbstractAgent;
|
|
55
|
+
/** Signature of the agent factory the element calls to build its agent. */
|
|
56
|
+
export type AgentFactory = (options: HttpAgentOptions) => AbstractAgent;
|
|
57
|
+
//# sourceMappingURL=create_http_agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create_http_agent.d.ts","sourceRoot":"","sources":["../../src/core/create_http_agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAa,MAAM,eAAe,CAAC;AAC9D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAG3C,0CAA0C;AAC1C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,eAAe,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IACrC;;;;OAIG;IACH,YAAY,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACjD;;;;;;;;;;;OAWG;IACH,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,gBAAgB,GAAG,aAAa,CAqCxE;AAED,2EAA2E;AAC3E,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,gBAAgB,KAAK,aAAa,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register the `<ag-ui-chat>` Custom Element.
|
|
3
|
+
*
|
|
4
|
+
* Idempotent: a second call, or one after this package's `AgUiChat` already
|
|
5
|
+
* holds the tag, is a no-op. If another class holds the tag it throws naming
|
|
6
|
+
* the tag, because two copies of the element on one page (two bundles, or this
|
|
7
|
+
* package beside its predecessor) would otherwise run the other one. The class
|
|
8
|
+
* is not named: in a minified bundle its name is a one-letter identifier.
|
|
9
|
+
* Registration is an explicit step rather than an import side effect, so
|
|
10
|
+
* importing the package defines nothing and stays tree-shakeable.
|
|
11
|
+
*/
|
|
12
|
+
export declare function defineChat(): void;
|
|
13
|
+
//# sourceMappingURL=define_chat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define_chat.d.ts","sourceRoot":"","sources":["../../src/core/define_chat.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,IAAI,IAAI,CAUjC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AttachmentRef } from "../attachment.js";
|
|
2
|
+
/** `detail` shape of the {@link ATTACHMENT_EVENT} CustomEvent. */
|
|
3
|
+
export interface AttachmentsDetail {
|
|
4
|
+
/** Durable refs for every file that has finished uploading. */
|
|
5
|
+
readonly attachments: readonly AttachmentRef[];
|
|
6
|
+
/** How many files are still uploading; a send now would leave these behind. */
|
|
7
|
+
readonly pending: number;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=attachments_detail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attachments_detail.d.ts","sourceRoot":"","sources":["../../../src/core/events/attachments_detail.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,kEAAkE;AAClE,MAAM,WAAW,iBAAiB;IAChC,+DAA+D;IAC/D,QAAQ,CAAC,WAAW,EAAE,SAAS,aAAa,EAAE,CAAC;IAC/C,+EAA+E;IAC/E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bar_height_detail.d.ts","sourceRoot":"","sources":["../../../src/core/events/bar_height_detail.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,MAAM,WAAW,eAAe;IAC9B,iEAAiE;IACjE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** `detail` shape of the {@link CUSTOM_AGENT_EVENT} CustomEvent. */
|
|
2
|
+
export interface CustomAgentDetail {
|
|
3
|
+
/** The `CUSTOM` event's `name`, verbatim. An open string; never interpreted here. */
|
|
4
|
+
readonly name: string;
|
|
5
|
+
/** Its `value`, verbatim and unparsed. `unknown` because the protocol says nothing about it. */
|
|
6
|
+
readonly value: unknown;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=custom_agent_detail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom_agent_detail.d.ts","sourceRoot":"","sources":["../../../src/core/events/custom_agent_detail.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,MAAM,WAAW,iBAAiB;IAChC,qFAAqF;IACrF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,gGAAgG;IAChG,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** `detail` shape of the {@link DOCK_WIDTH_EVENT} CustomEvent. */
|
|
2
|
+
export interface DockWidthDetail {
|
|
3
|
+
/** The CSS px the docked panel covers at rest; 0 when it covers none of the page. */
|
|
4
|
+
readonly width: number;
|
|
5
|
+
/** The edge the panel docks against. */
|
|
6
|
+
readonly side: "left" | "right";
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=dock_width_detail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dock_width_detail.d.ts","sourceRoot":"","sources":["../../../src/core/events/dock_width_detail.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,MAAM,WAAW,eAAe;IAC9B,qFAAqF;IACrF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,wCAAwC;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** {@link FEEDBACK_EVENT} detail: what was rated, and how. */
|
|
2
|
+
export interface FeedbackDetail {
|
|
3
|
+
/** The rated message's text, as rendered. */
|
|
4
|
+
readonly content: string;
|
|
5
|
+
readonly rating: "up" | "down";
|
|
6
|
+
/**
|
|
7
|
+
* The AG-UI id of the rated assistant message: the id it streamed under, or
|
|
8
|
+
* the stored message's `id` when it was restored from history.
|
|
9
|
+
*
|
|
10
|
+
* What a host stores a rating against. `content` cannot be: two answers can
|
|
11
|
+
* read the same, and the text says nothing about which stored message it
|
|
12
|
+
* was. A restored message carries whatever id its store returns: the
|
|
13
|
+
* built-in browser store keeps the streamed ids, and a server-backed one
|
|
14
|
+
* keeps them only where the server persists the ids it streamed.
|
|
15
|
+
*/
|
|
16
|
+
readonly messageId: string;
|
|
17
|
+
/** The conversation the message belongs to: the element's thread when it was drawn. */
|
|
18
|
+
readonly threadId: string;
|
|
19
|
+
/**
|
|
20
|
+
* The run that streamed the message, as its `RUN_STARTED` named it.
|
|
21
|
+
*
|
|
22
|
+
* Present only on a message that arrived live. A restored one has none to
|
|
23
|
+
* give -- an AG-UI message carries no run id -- so the key is absent there
|
|
24
|
+
* rather than holding a value that only looks like one.
|
|
25
|
+
*/
|
|
26
|
+
readonly runId?: string;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=feedback_detail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feedback_detail.d.ts","sourceRoot":"","sources":["../../../src/core/events/feedback_detail.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,MAAM,WAAW,cAAc;IAC7B,6CAA6C;IAC7C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,IAAI,GAAG,MAAM,CAAC;IAC/B;;;;;;;;;OASG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,uFAAuF;IACvF,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B;;;;;;OAMG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** `detail` shape of the {@link INVALIDATE_EVENT} CustomEvent. */
|
|
2
|
+
export interface InvalidateDetail {
|
|
3
|
+
/**
|
|
4
|
+
* The resources that moved, as the server named them.
|
|
5
|
+
*
|
|
6
|
+
* **Opaque strings, and matching is exact.** `orders/42` does not imply
|
|
7
|
+
* `orders` -- a prefix rule would be this component guessing at a scheme it
|
|
8
|
+
* does not own, and `orders/1` would match `orders/11`. A server that wants
|
|
9
|
+
* the collection refreshed names it. Your own matching may be hierarchical,
|
|
10
|
+
* because in your vocabulary the scheme is known.
|
|
11
|
+
*/
|
|
12
|
+
readonly keys: readonly string[];
|
|
13
|
+
/** What caused the write -- usually the tool's name. `null` when unstated. */
|
|
14
|
+
readonly reason: string | null;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=invalidate_detail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invalidate_detail.d.ts","sourceRoot":"","sources":["../../../src/core/events/invalidate_detail.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,MAAM,WAAW,gBAAgB;IAC/B;;;;;;;;OAQG;IACH,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,8EAA8E;IAC9E,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"maximize_detail.d.ts","sourceRoot":"","sources":["../../../src/core/events/maximize_detail.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC7B"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ToolRun } from "./tool_run.js";
|
|
2
|
+
/** `detail` shape of the {@link RUN_FINISHED_EVENT} CustomEvent. */
|
|
3
|
+
export interface RunFinishedDetail {
|
|
4
|
+
/**
|
|
5
|
+
* The thread the run belonged to, fixed when its client was built. Not always
|
|
6
|
+
* the thread on screen: a run stopped by a new chat or a thread switch still
|
|
7
|
+
* reports once its request closes, and by then another thread is.
|
|
8
|
+
*/
|
|
9
|
+
readonly threadId: string;
|
|
10
|
+
/** In settle order. Empty when the interaction called no tools. */
|
|
11
|
+
readonly tools: readonly ToolRun[];
|
|
12
|
+
/**
|
|
13
|
+
* Every key announced during the interaction, de-duplicated, first-seen order.
|
|
14
|
+
*
|
|
15
|
+
* **This is the field that makes adoption one line** for a host already
|
|
16
|
+
* listening here, and the `else` is the whole compatibility story:
|
|
17
|
+
*
|
|
18
|
+
* ```js
|
|
19
|
+
* if (detail.invalidated.length > 0) refetchOnly(detail.invalidated);
|
|
20
|
+
* else if (detail.tools.some((t) => t.side === "server")) refetchEverything();
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* Empty against a server that announces nothing, so an old server and a new
|
|
24
|
+
* client fall through to the coarse refetch that shipped before either.
|
|
25
|
+
*/
|
|
26
|
+
readonly invalidated: readonly string[];
|
|
27
|
+
/**
|
|
28
|
+
* How the interaction ended: `"completed"` when it ran to its end, `"stopped"`
|
|
29
|
+
* when Stop, a new chat or a thread switch cut it off, `"failed"` when the
|
|
30
|
+
* agent reported an error. Reported for a run the conversation has left
|
|
31
|
+
* behind too, so a host can tell a cancelled run's late event from the live
|
|
32
|
+
* run's own. A host should ignore a value it does not know.
|
|
33
|
+
*/
|
|
34
|
+
readonly outcome: "completed" | "stopped" | "failed";
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=run_finished_detail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run_finished_detail.d.ts","sourceRoot":"","sources":["../../../src/core/events/run_finished_detail.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C,oEAAoE;AACpE,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,mEAAmE;IACnE,QAAQ,CAAC,KAAK,EAAE,SAAS,OAAO,EAAE,CAAC;IACnC;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IACxC;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAC;CACtD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state_detail.d.ts","sourceRoot":"","sources":["../../../src/core/events/state_detail.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACnD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AttachmentRef } from "../attachment.js";
|
|
2
|
+
/** `detail` shape of the {@link SUBMIT_EVENT} CustomEvent. */
|
|
3
|
+
export interface SubmitDetail {
|
|
4
|
+
readonly content: string;
|
|
5
|
+
/** Durable refs for the files attached to this message (empty when none). */
|
|
6
|
+
readonly attachments: readonly AttachmentRef[];
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=submit_detail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"submit_detail.d.ts","sourceRoot":"","sources":["../../../src/core/events/submit_detail.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,8DAA8D;AAC9D,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,6EAA6E;IAC7E,QAAQ,CAAC,WAAW,EAAE,SAAS,aAAa,EAAE,CAAC;CAChD"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** `detail` shape of the {@link THREAD_EVENT} CustomEvent. */
|
|
2
|
+
export interface ThreadDetail {
|
|
3
|
+
/** The thread now on screen. */
|
|
4
|
+
readonly threadId: string;
|
|
5
|
+
/**
|
|
6
|
+
* The thread on screen before the change: the one the previous event
|
|
7
|
+
* reported, and `null` before the first, as at the restore when the element
|
|
8
|
+
* first connects. Equal to `threadId` when the same thread was restored
|
|
9
|
+
* again (`reload()`, the element connecting again).
|
|
10
|
+
*/
|
|
11
|
+
readonly previousThreadId: string | null;
|
|
12
|
+
/**
|
|
13
|
+
* What changed it:
|
|
14
|
+
*
|
|
15
|
+
* - `new`: `newChat()` or the built-in New chat button.
|
|
16
|
+
* - `switch`: `switchThread()` or a row picked in the conversation list.
|
|
17
|
+
* - `delete`: the active thread was deleted, and a fresh one took its place.
|
|
18
|
+
* - `restore`: the stored thread was replayed, on connect or by `reload()`.
|
|
19
|
+
* - `rescope`: a `user-key` change handed the element to another principal,
|
|
20
|
+
* live or while it was out of the document.
|
|
21
|
+
*
|
|
22
|
+
* A closed set today; a host should ignore a reason it does not know, so a
|
|
23
|
+
* later one can be added without breaking it.
|
|
24
|
+
*/
|
|
25
|
+
readonly reason: "new" | "switch" | "delete" | "restore" | "rescope";
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=thread_detail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thread_detail.d.ts","sourceRoot":"","sources":["../../../src/core/events/thread_detail.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,MAAM,WAAW,YAAY;IAC3B,gCAAgC;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B;;;;;OAKG;IACH,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,MAAM,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;CACtE"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** `detail` shape of the {@link THREAD_TITLE_EVENT} CustomEvent. */
|
|
2
|
+
export interface ThreadTitleDetail {
|
|
3
|
+
/** The thread on screen. */
|
|
4
|
+
readonly threadId: string;
|
|
5
|
+
/** Its title, as `threadTitle` reads it now; `""` for a thread with nothing sent. */
|
|
6
|
+
readonly title: string;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=thread_title_detail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thread_title_detail.d.ts","sourceRoot":"","sources":["../../../src/core/events/thread_title_detail.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,MAAM,WAAW,iBAAiB;IAChC,4BAA4B;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,qFAAqF;IACrF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle_detail.d.ts","sourceRoot":"","sources":["../../../src/core/events/toggle_detail.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC7B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** One tool that ran during an interaction, as {@link RunFinishedDetail} lists it. */
|
|
2
|
+
export interface ToolRun {
|
|
3
|
+
readonly name: string;
|
|
4
|
+
/**
|
|
5
|
+
* Where it executed. `"server"` is the one a data-rendering host cares about:
|
|
6
|
+
* a `"client"` tool ran in the host's own handler, so the host already knows
|
|
7
|
+
* whatever it did.
|
|
8
|
+
*/
|
|
9
|
+
readonly side: "server" | "client";
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=tool_run.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool_run.d.ts","sourceRoot":"","sources":["../../../src/core/events/tool_run.ts"],"names":[],"mappings":"AAAA,sFAAsF;AACtF,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAC;CACpC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** `detail` shape of the {@link UNREAD_EVENT} CustomEvent. */
|
|
2
|
+
export interface UnreadDetail {
|
|
3
|
+
/** Unseen answers across every thread: what the launcher badge shows. */
|
|
4
|
+
readonly unread: number;
|
|
5
|
+
/**
|
|
6
|
+
* The threads whose unseen answers this change marked or cleared; empty when
|
|
7
|
+
* none did (a collapse toggle still reports the total).
|
|
8
|
+
*/
|
|
9
|
+
readonly threadIds: readonly string[];
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=unread_detail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unread_detail.d.ts","sourceRoot":"","sources":["../../../src/core/events/unread_detail.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,MAAM,WAAW,YAAY;IAC3B,yEAAyE;IACzE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;CACvC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message_role.d.ts","sourceRoot":"","sources":["../../src/core/message_role.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,8CAA8C;AAC9C,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read an opt-in flag attribute on `element` the way HTML reads a boolean
|
|
3
|
+
* attribute.
|
|
4
|
+
*
|
|
5
|
+
* Present means on: bare (`data-prompt-chips`), empty (`=""`), or any value
|
|
6
|
+
* except the literal `"false"`. Comparing against `"true"` instead would make
|
|
7
|
+
* the bare spelling every native boolean attribute uses silently disable the
|
|
8
|
+
* feature it names. `="false"` still turns it off.
|
|
9
|
+
*/
|
|
10
|
+
export declare function readFlag(element: Element, name: string): boolean;
|
|
11
|
+
//# sourceMappingURL=read_flag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read_flag.d.ts","sourceRoot":"","sources":["../../src/core/read_flag.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAGhE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse a JSON-valued attribute on `element`, saying so when it will not parse.
|
|
3
|
+
*
|
|
4
|
+
* `null` for an absent attribute, and `null` again for one that is not JSON --
|
|
5
|
+
* but not quietly the second time. Quoting JSON inside an HTML attribute is
|
|
6
|
+
* fiddly, and the result of getting it wrong is indistinguishable from the
|
|
7
|
+
* feature being switched off: no chips appear, or the strings stay English,
|
|
8
|
+
* with nothing anywhere saying why. That is the same failure `data-paste-attach`
|
|
9
|
+
* already reports for a value it cannot read.
|
|
10
|
+
*
|
|
11
|
+
* Console only. A page author's typo is not the reader's business, nothing the
|
|
12
|
+
* reader did was refused, and the degraded widget is still perfectly usable.
|
|
13
|
+
*/
|
|
14
|
+
export declare function readJsonAttribute(element: Element, name: string): unknown;
|
|
15
|
+
//# sourceMappingURL=read_json_attribute.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read_json_attribute.d.ts","sourceRoot":"","sources":["../../src/core/read_json_attribute.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAgBzE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The tool-round budget from `element`'s `data-max-tool-rounds`, for one send.
|
|
3
|
+
*
|
|
4
|
+
* Anything unparseable becomes `NaN`, which {@link AgUiClient} rejects along
|
|
5
|
+
* with a bound below one -- so the two ways of setting this are validated in
|
|
6
|
+
* one place rather than agreeing by coincidence.
|
|
7
|
+
*/
|
|
8
|
+
export declare function readMaxToolRounds(element: Element): number;
|
|
9
|
+
//# sourceMappingURL=read_max_tool_rounds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read_max_tool_rounds.d.ts","sourceRoot":"","sources":["../../src/core/read_max_tool_rounds.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAG1D"}
|