@artooi/agents-web-components 0.0.0-stage → 0.1.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.
- package/CHANGELOG.md +77 -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,575 @@
|
|
|
1
|
+
/** The root every sessionStorage and localStorage key this package writes starts with. */
|
|
2
|
+
export declare const STORAGE_ROOT = "agents-web-components";
|
|
3
|
+
/** The Custom Element tag name registered by {@link defineChat}. */
|
|
4
|
+
export declare const ELEMENT_TAG = "ag-ui-chat";
|
|
5
|
+
/**
|
|
6
|
+
* User submitted a message. `detail` is {@link SubmitDetail}.
|
|
7
|
+
*
|
|
8
|
+
* Fires for every turn the user sends: with Send, through `sendMessage`, and
|
|
9
|
+
* as the next turn of a run resumed or forked from the checkpoint panel. A
|
|
10
|
+
* listener runs while that turn is already the one in flight, so a
|
|
11
|
+
* `sendMessage` from it is refused rather than starting a second run.
|
|
12
|
+
*/
|
|
13
|
+
export declare const SUBMIT_EVENT = "ag-ui-submit";
|
|
14
|
+
/**
|
|
15
|
+
* Collapsed state changed, via the built-in toggle or `setCollapsed`; and,
|
|
16
|
+
* under `collapse-to="none"`, once at connect with the state it mounted in.
|
|
17
|
+
* `detail` is {@link ToggleDetail}.
|
|
18
|
+
*/
|
|
19
|
+
export declare const TOGGLE_EVENT = "ag-ui-toggle";
|
|
20
|
+
/**
|
|
21
|
+
* Maximized state changed, via the built-in header control, the `maximized`
|
|
22
|
+
* property or attribute, or on leaving it for a collapse, a placement without
|
|
23
|
+
* the control, or a viewport of 600px or less. `detail` is {@link MaximizeDetail}.
|
|
24
|
+
*/
|
|
25
|
+
export declare const MAXIMIZE_EVENT = "ag-ui-maximize";
|
|
26
|
+
/**
|
|
27
|
+
* The bottom bar's height changed (`collapse-to="bar"`): the host pads its
|
|
28
|
+
* page by it. `detail` is {@link BarHeightDetail}; 0 when no bar is drawn.
|
|
29
|
+
*/
|
|
30
|
+
export declare const BAR_HEIGHT_EVENT = "ag-ui-bar-height";
|
|
31
|
+
/**
|
|
32
|
+
* The width a docked panel covers at rest changed (`placement="sidebar"` or
|
|
33
|
+
* `"side"`): the host pushes its page by it. `detail` is {@link DockWidthDetail};
|
|
34
|
+
* 0 when the panel covers none of the page.
|
|
35
|
+
*/
|
|
36
|
+
export declare const DOCK_WIDTH_EVENT = "ag-ui-dock-width";
|
|
37
|
+
/**
|
|
38
|
+
* The count of answers that arrived while collapsed changed. `detail` is
|
|
39
|
+
* {@link UnreadDetail}. The built-in launcher badge renders exactly this; a
|
|
40
|
+
* host driving its own chrome sets `data-unread-badge="false"` and listens.
|
|
41
|
+
*/
|
|
42
|
+
export declare const UNREAD_EVENT = "ag-ui-unread";
|
|
43
|
+
/**
|
|
44
|
+
* AG-UI shared state changed — a streamed `STATE_SNAPSHOT` / `STATE_DELTA`, or
|
|
45
|
+
* a host assignment to `sharedState`. `detail` is {@link StateDetail}.
|
|
46
|
+
*
|
|
47
|
+
* The protocol's own state channel, distinct from `registerPageState`, which
|
|
48
|
+
* exposes host state to the agent as ordinary tools.
|
|
49
|
+
*/
|
|
50
|
+
export declare const STATE_EVENT = "ag-ui-state";
|
|
51
|
+
/**
|
|
52
|
+
* The attachment tray changed — a file queued, an upload finishing or failing,
|
|
53
|
+
* a chip removed, the tray cleared after a send. `detail` is
|
|
54
|
+
* {@link AttachmentsDetail}, carrying the refs that finished uploading and how
|
|
55
|
+
* many are still in flight. A host driving its own composer uses this to know
|
|
56
|
+
* whether a send would leave files behind.
|
|
57
|
+
*/
|
|
58
|
+
export declare const ATTACHMENT_EVENT = "ag-ui-attachments";
|
|
59
|
+
/**
|
|
60
|
+
* An interaction has finished, whatever ended it. `detail` is
|
|
61
|
+
* {@link RunFinishedDetail}, listing the tools that ran and which side ran them.
|
|
62
|
+
*
|
|
63
|
+
* For hosts that render data the agent can change. A server-side tool writes
|
|
64
|
+
* without the page's knowledge — nothing else the element dispatches implies
|
|
65
|
+
* "something may have moved underneath you", so a page showing that data has no
|
|
66
|
+
* reason to refetch and quietly goes stale. Shared state
|
|
67
|
+
* ({@link STATE_EVENT}) is the richer channel, but it needs the agent to emit
|
|
68
|
+
* state; this needs nothing of the agent at all.
|
|
69
|
+
*
|
|
70
|
+
* Fires once per interaction rather than once per tool round, on completion,
|
|
71
|
+
* error and cancellation alike, since a partial write is still a write.
|
|
72
|
+
*/
|
|
73
|
+
export declare const RUN_FINISHED_EVENT = "ag-ui-run-finished";
|
|
74
|
+
/**
|
|
75
|
+
* The conversation on screen changed: a new chat, a thread switched to, the
|
|
76
|
+
* active thread deleted, the stored thread restored, or a `user-key` change
|
|
77
|
+
* handing the element to another principal. `detail` is {@link ThreadDetail}.
|
|
78
|
+
*
|
|
79
|
+
* Fires once per change, after the transcript has been replaced, so a listener
|
|
80
|
+
* reads the conversation it is told about. A host listing conversations in its
|
|
81
|
+
* own chrome marks the active one from here rather than watching attributes.
|
|
82
|
+
*/
|
|
83
|
+
export declare const THREAD_EVENT = "ag-ui-thread";
|
|
84
|
+
/**
|
|
85
|
+
* The title of the thread on screen changed: its first send, a rename, a
|
|
86
|
+
* switch, a new chat or a delete, or a title the conversation list brought in.
|
|
87
|
+
* `detail` is {@link ThreadTitleDetail}. `title-text="auto"` draws it in the
|
|
88
|
+
* header without a listener; a host drawing its own chrome listens.
|
|
89
|
+
*/
|
|
90
|
+
export declare const THREAD_TITLE_EVENT = "ag-ui-thread-title";
|
|
91
|
+
/**
|
|
92
|
+
* The agent sent an AG-UI `CUSTOM` event. `detail` is {@link CustomAgentDetail}.
|
|
93
|
+
*
|
|
94
|
+
* `CUSTOM` is one of exactly two carriers whose payload name the protocol leaves
|
|
95
|
+
* an open string, and it is the **imperative** one: something for the host page
|
|
96
|
+
* to *do*, with no place in the transcript. Its sibling `ACTIVITY_SNAPSHOT`
|
|
97
|
+
* carries transcript **content**, which is why that one is materialised into a
|
|
98
|
+
* message, persisted, and replayed on restore while this one is not.
|
|
99
|
+
*
|
|
100
|
+
* That asymmetry is the rule for choosing between them. Content has a place in
|
|
101
|
+
* the conversation and should replay; an imperative has no place and no meaning
|
|
102
|
+
* once acted on, so replaying it on a thread load would be a bug. Anything that
|
|
103
|
+
* must survive a reload belongs on the other carrier.
|
|
104
|
+
*
|
|
105
|
+
* The element takes no view of what a name means -- it forwards every one. A
|
|
106
|
+
* host that does not recognise a name ignores the event, which is the graceful
|
|
107
|
+
* outcome the open field exists for.
|
|
108
|
+
*/
|
|
109
|
+
export declare const CUSTOM_AGENT_EVENT = "ag-ui-custom";
|
|
110
|
+
/**
|
|
111
|
+
* The agent named resources its write has moved. `detail` is
|
|
112
|
+
* {@link InvalidateDetail}.
|
|
113
|
+
*
|
|
114
|
+
* A convention on top of {@link CUSTOM_AGENT_EVENT}, not a second channel: the
|
|
115
|
+
* wire carries an ordinary AG-UI `CUSTOM` event whose `name` is
|
|
116
|
+
* {@link INVALIDATE_CUSTOM_NAME}, and this is that one name routed to its own
|
|
117
|
+
* DOM event so a host does not have to string-match. Every other name still
|
|
118
|
+
* arrives as `ag-ui-custom`.
|
|
119
|
+
*
|
|
120
|
+
* Fires **as each announcement arrives**, during the run, which is what makes a
|
|
121
|
+
* long multi-step run feel live: the list refreshes as the third of eight writes
|
|
122
|
+
* lands rather than when everything finishes. {@link RUN_FINISHED_EVENT} carries
|
|
123
|
+
* the same keys again at the end, de-duplicated, for a host that would rather
|
|
124
|
+
* refetch once.
|
|
125
|
+
*/
|
|
126
|
+
export declare const INVALIDATE_EVENT = "ag-ui-invalidate";
|
|
127
|
+
/**
|
|
128
|
+
* Fired when the user rates an assistant message from its action row.
|
|
129
|
+
*
|
|
130
|
+
* `detail` is a {@link FeedbackDetail}: which message was rated -- its AG-UI
|
|
131
|
+
* `messageId` and the `threadId` it belongs to, plus the `runId` that streamed
|
|
132
|
+
* it when it arrived live (absent on a restored message, which carries no run
|
|
133
|
+
* id) -- with its text and the rating. A host stores the rating against
|
|
134
|
+
* `messageId`, not `content`: two answers can read the same. A restored
|
|
135
|
+
* message is named by the id its store returns, so with a server-backed store
|
|
136
|
+
* the id holds across a reload only where the server persists the ids it
|
|
137
|
+
* streamed; the built-in browser store keeps them as they streamed.
|
|
138
|
+
*
|
|
139
|
+
* **Nothing is stored** -- a rating belongs to whatever the host already uses
|
|
140
|
+
* to hold product signals, and a write-only table inside a chat widget is a
|
|
141
|
+
* schema nobody reads.
|
|
142
|
+
*/
|
|
143
|
+
export declare const FEEDBACK_EVENT = "ag-ui-feedback";
|
|
144
|
+
/**
|
|
145
|
+
* The `activity_type` carrying server-pushed follow-up prompts.
|
|
146
|
+
*
|
|
147
|
+
* Matches django-ag-ui's `SUGGESTIONS_ACTIVITY_TYPE`. A convention inside the
|
|
148
|
+
* protocol's open `activity_type` field, not an extension of it -- so a client
|
|
149
|
+
* that has never heard of it ignores the event, and this one is not privileged.
|
|
150
|
+
*/
|
|
151
|
+
export declare const SUGGESTIONS_ACTIVITY_TYPE = "suggestions";
|
|
152
|
+
/**
|
|
153
|
+
* The AG-UI `CUSTOM` event `name` that carries an invalidation.
|
|
154
|
+
*
|
|
155
|
+
* Matched exactly. Namespaced so it cannot collide with a host's own custom
|
|
156
|
+
* events, which share the field.
|
|
157
|
+
*/
|
|
158
|
+
export declare const INVALIDATE_CUSTOM_NAME = "ag_ui.invalidate";
|
|
159
|
+
/**
|
|
160
|
+
* The AG-UI `CUSTOM` event `name` carrying one step a delegated sub-agent took.
|
|
161
|
+
*
|
|
162
|
+
* Matched exactly, and namespaced the way {@link INVALIDATE_CUSTOM_NAME} is, so
|
|
163
|
+
* it cannot collide with a host's own custom events on the same open field.
|
|
164
|
+
*
|
|
165
|
+
* Routed to the delegating tool card rather than dispatched to the page: the
|
|
166
|
+
* payload keys on the **parent's own `delegate_task` call id**, so what it
|
|
167
|
+
* describes is already on screen and the progress belongs beside it. Every other
|
|
168
|
+
* name still reaches the host as {@link CUSTOM_AGENT_EVENT}.
|
|
169
|
+
*
|
|
170
|
+
* **This carries the steps only.** The delegation's own lifetime arrives on the
|
|
171
|
+
* protocol's `SUBAGENT_STARTED` / `SUBAGENT_FINISHED` / `SUBAGENT_ERROR` events,
|
|
172
|
+
* which name the same card through their `parentToolCallId`. The two are joined
|
|
173
|
+
* by that id, which is why the panel is keyed on it rather than on the
|
|
174
|
+
* `subagentRunId` the protocol's events carry.
|
|
175
|
+
*
|
|
176
|
+
* Deliberately on the imperative carrier and not on an activity, which means it
|
|
177
|
+
* is **never persisted and never replayed**. That is the right half of the
|
|
178
|
+
* split: a delegation that was live an hour ago is not live now, and replaying
|
|
179
|
+
* its progress on a thread restore would be a lie about a run that is over. On a
|
|
180
|
+
* reload mid-run the nested detail is gone and the tool card remains. The three
|
|
181
|
+
* lifecycle events share that property -- `@ag-ui/client` dispatches them to
|
|
182
|
+
* subscribers without writing them into `agent.messages` -- which is what made
|
|
183
|
+
* them safe to adopt while the steps stayed here.
|
|
184
|
+
*/
|
|
185
|
+
export declare const SUBAGENT_CUSTOM_NAME = "ag_ui.subagent";
|
|
186
|
+
/**
|
|
187
|
+
* The phases one delegation moves through, as the panel draws them.
|
|
188
|
+
*
|
|
189
|
+
* Exactly one `STARTED` opens a delegation and exactly one `FINISHED` or
|
|
190
|
+
* `FAILED` closes it; the two tool phases repeat in between, once per call the
|
|
191
|
+
* child makes and once per result it gets back.
|
|
192
|
+
*
|
|
193
|
+
* **These are this element's five visual states, and they no longer come off one
|
|
194
|
+
* wire.** `TOOL_CALL` and `TOOL_RESULT` are spelled by the server, on the
|
|
195
|
+
* {@link SUBAGENT_CUSTOM_NAME} payload's `phase` field. The other three are this
|
|
196
|
+
* element's own names for the protocol's `SUBAGENT_STARTED` / `SUBAGENT_FINISHED`
|
|
197
|
+
* / `SUBAGENT_ERROR` events, which carry no phase field of their own because the
|
|
198
|
+
* event type *is* the phase. Keeping one vocabulary is what lets the panel stay
|
|
199
|
+
* a single state machine with one `data-phase` attribute for a host to style.
|
|
200
|
+
*
|
|
201
|
+
* `FAILED` carries **no exception text** from us — the protocol's error event
|
|
202
|
+
* has a required `message`, and the server sends only the sub-agent's name in
|
|
203
|
+
* it, on the same reasoning that redacts a `RUN_ERROR`, since an exception's
|
|
204
|
+
* words are written for an operator. The detail rides the ordinary
|
|
205
|
+
* `TOOL_CALL_RESULT` for that delegation, on the card the progress is already
|
|
206
|
+
* attached to.
|
|
207
|
+
*/
|
|
208
|
+
export declare const SUBAGENT_PHASE: {
|
|
209
|
+
readonly STARTED: "started";
|
|
210
|
+
readonly TOOL_CALL: "tool_call";
|
|
211
|
+
readonly TOOL_RESULT: "tool_result";
|
|
212
|
+
readonly FINISHED: "finished";
|
|
213
|
+
readonly FAILED: "failed";
|
|
214
|
+
};
|
|
215
|
+
/** Roles a chat message can take. */
|
|
216
|
+
export declare const MESSAGE_ROLE: {
|
|
217
|
+
readonly USER: "user";
|
|
218
|
+
readonly ASSISTANT: "assistant";
|
|
219
|
+
};
|
|
220
|
+
/**
|
|
221
|
+
* Schema-root key marking a tool destructive: the element gates its execution
|
|
222
|
+
* behind the confirmation card unless `autoConfirm` is set. All four `x-*` keys
|
|
223
|
+
* below mirror the `django-ag-ui` server side.
|
|
224
|
+
*/
|
|
225
|
+
export declare const X_DESTRUCTIVE_KEY = "x-destructive";
|
|
226
|
+
/**
|
|
227
|
+
* Schema-root key holding a confirmation prompt (e.g. `"Activate this
|
|
228
|
+
* project?"`), shown instead of the generic `Run "<tool>"?`.
|
|
229
|
+
*/
|
|
230
|
+
export declare const X_CONFIRM_KEY = "x-confirm";
|
|
231
|
+
/**
|
|
232
|
+
* Schema-root key holding a short label for a tool (e.g. `"Query orders"` for
|
|
233
|
+
* `query_model`), shown on the card instead of the raw tool name.
|
|
234
|
+
*/
|
|
235
|
+
export declare const X_SUMMARY_KEY = "x-summary";
|
|
236
|
+
/**
|
|
237
|
+
* Schema-root key marking a tool as navigating — its handler triggers a full
|
|
238
|
+
* page reload. The element checkpoints the call before the reload and resumes
|
|
239
|
+
* the run loop once the next page mounts.
|
|
240
|
+
*/
|
|
241
|
+
export declare const X_NAVIGATES_KEY = "x-navigates";
|
|
242
|
+
/**
|
|
243
|
+
* The built-in tool that re-reads the current page, registered only when a
|
|
244
|
+
* page-map provider is set. Named here because the stale-page guard must exempt
|
|
245
|
+
* it: refusing the one call that would refresh the agent's view deadlocks.
|
|
246
|
+
*/
|
|
247
|
+
export declare const READ_PAGE_TOOL = "read_page";
|
|
248
|
+
/** The description of the context entry carrying the page map. */
|
|
249
|
+
export declare const PAGE_MAP_CONTEXT = "page_map";
|
|
250
|
+
/**
|
|
251
|
+
* The description of the context entry carrying the place the chip shows. Its
|
|
252
|
+
* value is the place as JSON: the label, and the detail and href when set.
|
|
253
|
+
*/
|
|
254
|
+
export declare const PLACE_CONTEXT = "place";
|
|
255
|
+
/**
|
|
256
|
+
* Default upper bound on frontend tool-call → re-run rounds within one send.
|
|
257
|
+
* Overridable via `data-max-tool-rounds`, or `AgUiClientConfig.maxToolRounds`
|
|
258
|
+
* for a host driving the client directly.
|
|
259
|
+
*/
|
|
260
|
+
export declare const MAX_TOOL_ROUNDS = 10;
|
|
261
|
+
/**
|
|
262
|
+
* The actions a finished assistant message's row can carry, and the tokens
|
|
263
|
+
* `data-message-actions` selects them by.
|
|
264
|
+
*
|
|
265
|
+
* All three are on when the attribute is absent. Naming them individually
|
|
266
|
+
* rather than shipping one on/off switch is what the three differ over: feedback
|
|
267
|
+
* is only useful to a host listening for {@link FEEDBACK_EVENT}, retry re-runs
|
|
268
|
+
* the agent and a constrained surface may not permit that, and copy is the one
|
|
269
|
+
* nobody objects to. A single switch would make dropping either of the first two
|
|
270
|
+
* cost the third, and a host that only wanted one gone would rebuild the row
|
|
271
|
+
* from `attachMessageActions` -- reimplementing the part names, the accessible
|
|
272
|
+
* grouping and the retry hand-off to lose two buttons.
|
|
273
|
+
*/
|
|
274
|
+
export declare const MESSAGE_ACTIONS: {
|
|
275
|
+
readonly COPY: "copy";
|
|
276
|
+
readonly RETRY: "retry";
|
|
277
|
+
readonly FEEDBACK: "feedback";
|
|
278
|
+
};
|
|
279
|
+
/**
|
|
280
|
+
* Lifecycle status of a rendered tool-call card. A card opens as `PENDING`
|
|
281
|
+
* while the call runs, then settles to `DONE`, `ERROR`, `DECLINED` or
|
|
282
|
+
* `INTERRUPTED`.
|
|
283
|
+
*
|
|
284
|
+
* `INTERRUPTED` is a call that never produced a result and that nobody refused:
|
|
285
|
+
* the run was stopped or failed before it finished, or no tool here answered it.
|
|
286
|
+
* Neither of the older terminal states is true of it. `DONE` claimed a success
|
|
287
|
+
* nothing achieved, and `DECLINED` says a person or a guard refused.
|
|
288
|
+
*
|
|
289
|
+
* `DEFERRED` is the one non-terminal state that is not "running": a server-side
|
|
290
|
+
* tool a `ToolGuard` gated never executed, the run finished on an interrupt, and
|
|
291
|
+
* the call is waiting on a person. Without it such a card sat at `PENDING` and
|
|
292
|
+
* read "running…" while the stream was over and the server idle — a status enum
|
|
293
|
+
* missing a state does not omit that state, it renders it as whichever neighbour
|
|
294
|
+
* is closest, and here the closest one claimed the opposite of the truth. A
|
|
295
|
+
* *frontend* tool waiting on its own card (`ask_user`) stays `PENDING`, because
|
|
296
|
+
* the browser really is running it.
|
|
297
|
+
*/
|
|
298
|
+
export declare const TOOL_CALL_STATUS: {
|
|
299
|
+
readonly PENDING: "pending";
|
|
300
|
+
readonly DEFERRED: "deferred";
|
|
301
|
+
readonly DONE: "done";
|
|
302
|
+
readonly ERROR: "error";
|
|
303
|
+
readonly DECLINED: "declined";
|
|
304
|
+
readonly INTERRUPTED: "interrupted";
|
|
305
|
+
};
|
|
306
|
+
/**
|
|
307
|
+
* How a tool call ended, as the server states it under `outcome` in a
|
|
308
|
+
* `TOOL_CALL_RESULT`'s `metadata`.
|
|
309
|
+
*
|
|
310
|
+
* The vocabulary is pydantic-ai's own `ToolReturnPart.outcome`, carried whole
|
|
311
|
+
* rather than re-spelled, so the four repos that pass a refusal along agree on
|
|
312
|
+
* one word for it.
|
|
313
|
+
*
|
|
314
|
+
* **Absent means {@link TOOL_OUTCOME.SUCCESS}, and that is load-bearing.** Every
|
|
315
|
+
* server written before the field existed omits it, so a missing field has to
|
|
316
|
+
* render exactly as a plain result did — which is why this is an optional
|
|
317
|
+
* key in the event's metadata and not a required field. `FAILED` is a call that ran
|
|
318
|
+
* and failed; `DENIED` is one a person or a guard refused, so it never ran at
|
|
319
|
+
* all. The two are worth distinguishing on screen because only the second is
|
|
320
|
+
* something the user did. `INTERRUPTED` is a call that produced no result because
|
|
321
|
+
* the run ended first: pydantic-ai writes it when it repairs a history a
|
|
322
|
+
* cancelled stream left, and the element writes it for the same reason when a
|
|
323
|
+
* run ends with a call still unanswered, so the next request carries a result
|
|
324
|
+
* for every call without claiming anyone refused one.
|
|
325
|
+
*
|
|
326
|
+
* Anything *else* on the wire — a value from a later protocol version — is read
|
|
327
|
+
* as a success rather than rejected.
|
|
328
|
+
* A card is a claim about what happened, and "I do not know this word" is not
|
|
329
|
+
* grounds for claiming failure. `toolStatusFromOutcome` is where that is done.
|
|
330
|
+
*/
|
|
331
|
+
export declare const TOOL_OUTCOME: {
|
|
332
|
+
readonly SUCCESS: "success";
|
|
333
|
+
readonly FAILED: "failed";
|
|
334
|
+
readonly DENIED: "denied";
|
|
335
|
+
readonly INTERRUPTED: "interrupted";
|
|
336
|
+
};
|
|
337
|
+
/**
|
|
338
|
+
* Lifecycle status of a pending-attachment chip in the composer tray. A chip
|
|
339
|
+
* opens as `UPLOADING` (with a progress bar), then settles to `READY` (a durable
|
|
340
|
+
* ref) or `ERROR` (with a retry control).
|
|
341
|
+
*/
|
|
342
|
+
export declare const ATTACHMENT_STATUS: {
|
|
343
|
+
readonly UPLOADING: "uploading";
|
|
344
|
+
readonly READY: "ready";
|
|
345
|
+
readonly ERROR: "error";
|
|
346
|
+
};
|
|
347
|
+
/**
|
|
348
|
+
* Default client-side upload size cap (10 MiB), matching django-ag-ui's
|
|
349
|
+
* `ATTACHMENT_MAX_BYTES`. Overridable via `data-attachment-max-bytes`; the
|
|
350
|
+
* server stays authoritative.
|
|
351
|
+
*/
|
|
352
|
+
export declare const DEFAULT_ATTACHMENT_MAX_BYTES: number;
|
|
353
|
+
/**
|
|
354
|
+
* How much detail a tool-call card shows. Set via `data-tool-display`; the
|
|
355
|
+
* default is `grouped`.
|
|
356
|
+
*
|
|
357
|
+
* - `grouped` — a run's consecutive calls fold into one quiet row ("Worked
|
|
358
|
+
* through 5 steps"), with the calls one click down as `full` cards, or as
|
|
359
|
+
* {@link TOOL_GROUP_DISPLAY} names.
|
|
360
|
+
* - `inline` — one status row (icon + summary), no card chrome, result behind
|
|
361
|
+
* its own toggle. Reads as a line of the answer rather than a boxed card.
|
|
362
|
+
* - `minimal` — tool name + status pill only. No args, no result body.
|
|
363
|
+
* - `compact` — name + status, args and result behind one "Details" toggle.
|
|
364
|
+
* - `full` — args inline, result behind its own toggle.
|
|
365
|
+
*/
|
|
366
|
+
export declare const TOOL_DISPLAY: {
|
|
367
|
+
readonly GROUPED: "grouped";
|
|
368
|
+
readonly INLINE: "inline";
|
|
369
|
+
readonly MINIMAL: "minimal";
|
|
370
|
+
readonly COMPACT: "compact";
|
|
371
|
+
readonly FULL: "full";
|
|
372
|
+
};
|
|
373
|
+
/**
|
|
374
|
+
* How an opened step group draws its calls. Set via `data-tool-group-display`
|
|
375
|
+
* and read only while `data-tool-display` is `grouped`; an outer card mode
|
|
376
|
+
* flattens the groups into its own cards and this value is ignored there.
|
|
377
|
+
*
|
|
378
|
+
* The same four card modes as {@link TOOL_DISPLAY}, applied to the calls inside
|
|
379
|
+
* the group: `full` (the default, and what an absent or unknown value reads
|
|
380
|
+
* as), `compact`, `minimal` and `inline`. A call waiting on an approval shows
|
|
381
|
+
* its arguments in every one of them.
|
|
382
|
+
*/
|
|
383
|
+
export declare const TOOL_GROUP_DISPLAY: {
|
|
384
|
+
readonly INLINE: "inline";
|
|
385
|
+
readonly MINIMAL: "minimal";
|
|
386
|
+
readonly COMPACT: "compact";
|
|
387
|
+
readonly FULL: "full";
|
|
388
|
+
};
|
|
389
|
+
/** One of the {@link TOOL_GROUP_DISPLAY} values. */
|
|
390
|
+
export type ToolGroupDisplayMode = (typeof TOOL_GROUP_DISPLAY)[keyof typeof TOOL_GROUP_DISPLAY];
|
|
391
|
+
/**
|
|
392
|
+
* `activityType` of the `ACTIVITY_SNAPSHOT` event django-ag-ui emits when a
|
|
393
|
+
* compaction capability trimmed the history. `content` carries
|
|
394
|
+
* `{ removed, before, after }`.
|
|
395
|
+
*/
|
|
396
|
+
export declare const COMPACTION_ACTIVITY_TYPE = "compaction";
|
|
397
|
+
/**
|
|
398
|
+
* Pydantic-AI's built-in tool for loading a deferred capability, with `{ id }`
|
|
399
|
+
* naming it. Agent skills are deferred capabilities keyed by skill name, so a
|
|
400
|
+
* call to this tool is the only signal that the agent picked a skill.
|
|
401
|
+
*
|
|
402
|
+
* Distinct from the host-provided {@link Skill} catalog, which is a human
|
|
403
|
+
* affordance launched from the slash palette.
|
|
404
|
+
*/
|
|
405
|
+
export declare const LOAD_CAPABILITY_TOOL = "load_capability";
|
|
406
|
+
/**
|
|
407
|
+
* The chrome's glyphs, as inline SVG markup.
|
|
408
|
+
*
|
|
409
|
+
* Static author-written markup assigned as a `<slot>`'s fallback content, so it
|
|
410
|
+
* never passes through the sanitiser — nothing here is user or server data, and
|
|
411
|
+
* nothing user-supplied may be interpolated into it. Each icon is a 24x24
|
|
412
|
+
* viewBox carrying the shared `glyph` class, which `STYLES` sizes and paints
|
|
413
|
+
* from `currentColor`; `glyph--solid` fills instead of stroking. A host wanting
|
|
414
|
+
* its own mark projects a matching `slot="icon-…"` child instead of editing
|
|
415
|
+
* these.
|
|
416
|
+
*/
|
|
417
|
+
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>";
|
|
418
|
+
/** The Stop glyph the composer button wears while a run is in flight. */
|
|
419
|
+
export declare const ICON_STOP = "<svg class=\"glyph glyph--solid\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><rect x=\"7\" y=\"7\" width=\"10\" height=\"10\" rx=\"2.5\"/></svg>";
|
|
420
|
+
/** The file-picker glyph (a paperclip). */
|
|
421
|
+
export declare const ICON_ATTACH = "<svg class=\"glyph\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M17 8.5V15a5 5 0 0 1-10 0V7a3 3 0 0 1 6 0v7.5a1 1 0 0 1-2 0V8.5\"/></svg>";
|
|
422
|
+
/** The voice-input glyph (a microphone on its stand). */
|
|
423
|
+
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>";
|
|
424
|
+
/** The place chip's mark when the place brings no icon of its own (a map pin). */
|
|
425
|
+
export declare const ICON_PLACE = "<svg class=\"glyph\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M12 21s-6.5-5.6-6.5-11a6.5 6.5 0 0 1 13 0c0 5.4-6.5 11-6.5 11z\"/><circle cx=\"12\" cy=\"10\" r=\"2.3\"/></svg>";
|
|
426
|
+
/** The place toggle while the place is sent (an open eye). */
|
|
427
|
+
export declare const ICON_PLACE_SHARED = "<svg class=\"glyph\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M2.5 12s3.5-6.5 9.5-6.5 9.5 6.5 9.5 6.5-3.5 6.5-9.5 6.5S2.5 12 2.5 12z\"/><circle cx=\"12\" cy=\"12\" r=\"2.8\"/></svg>";
|
|
428
|
+
/** The place toggle while the place is withheld (the eye struck through). */
|
|
429
|
+
export declare const ICON_PLACE_WITHHELD = "<svg class=\"glyph\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M2.5 12s3.5-6.5 9.5-6.5c2 0 3.7.7 5.1 1.7M21.5 12s-3.5 6.5-9.5 6.5c-2 0-3.7-.7-5.1-1.7\"/><path d=\"M4 20 20 4\"/></svg>";
|
|
430
|
+
/**
|
|
431
|
+
* The theme toggle's two marks, drawn rather than typed.
|
|
432
|
+
*
|
|
433
|
+
* They were the emoji `\u{1F319}` and `\u2600\uFE0F`, which is why this one
|
|
434
|
+
* control never sat right beside the others: an emoji is painted by the
|
|
435
|
+
* platform's own font, at its own weight and colour, and its ink routinely
|
|
436
|
+
* exceeds the text metrics it is laid out with -- so it drew outside the box
|
|
437
|
+
* measured for it and clipped, while every neighbour is a stroked path that
|
|
438
|
+
* fits its viewBox exactly.
|
|
439
|
+
*
|
|
440
|
+
* The moon is drawn as one closed crescent rather than a disc with a second
|
|
441
|
+
* disc cut out of it, because these are stroked (`fill: none`) and a cut-out
|
|
442
|
+
* needs a fill to hide anything.
|
|
443
|
+
*/
|
|
444
|
+
export declare const ICON_MOON = "<svg class=\"glyph\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M20 14.5A8.5 8.5 0 0 1 9.5 4a8.5 8.5 0 1 0 10.5 10.5z\"/></svg>";
|
|
445
|
+
/** The other half of the pair; see {@link ICON_MOON}. */
|
|
446
|
+
export declare const ICON_SUN = "<svg class=\"glyph\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><circle cx=\"12\" cy=\"12\" r=\"4\"/><path d=\"M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4\"/></svg>";
|
|
447
|
+
/**
|
|
448
|
+
* The header controls' marks, drawn for the reason the theme pair is: typed
|
|
449
|
+
* glyphs (U+2630, U+21BA, U+271A, U+2014, U+25A1, U+2750) were painted by the
|
|
450
|
+
* platform font at its own weight and size, so they never matched the moon
|
|
451
|
+
* beside them. Maximize points outward, restore inward.
|
|
452
|
+
*/
|
|
453
|
+
export declare const ICON_MAXIMIZE = "<svg class=\"glyph\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M14 10l6-6M15 4h5v5M10 14l-6 6M4 15v5h5\"/></svg>";
|
|
454
|
+
/** The maximize control's mark while the panel is maximized; see {@link ICON_MAXIMIZE}. */
|
|
455
|
+
export declare const ICON_RESTORE = "<svg class=\"glyph\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M20 4l-6 6M14 5v5h5M4 20l6-6M5 14h5v5\"/></svg>";
|
|
456
|
+
/**
|
|
457
|
+
* The collapse control's marks, chosen by `data-collapse-icon`. The panel mark
|
|
458
|
+
* is a window with its docked pane and an arrow into the edge it hides into;
|
|
459
|
+
* its left twin, and the up and left chevrons, are the right and down ones
|
|
460
|
+
* turned in the path data, so each mark is told apart by its paths alone.
|
|
461
|
+
*/
|
|
462
|
+
export declare const ICON_PANEL_CLOSE_RIGHT = "<svg class=\"glyph\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><rect x=\"3\" y=\"4\" width=\"18\" height=\"16\" rx=\"2.5\"/><path d=\"M15 4v16\"/><path d=\"M8 9.5l2.5 2.5L8 14.5\"/></svg>";
|
|
463
|
+
/** The panel mark for a panel docked to the left edge; see {@link ICON_PANEL_CLOSE_RIGHT}. */
|
|
464
|
+
export declare const ICON_PANEL_CLOSE_LEFT = "<svg class=\"glyph\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><rect x=\"3\" y=\"4\" width=\"18\" height=\"16\" rx=\"2.5\"/><path d=\"M9 4v16\"/><path d=\"M16 9.5L13.5 12l2.5 2.5\"/></svg>";
|
|
465
|
+
/** A chevron down, the corner placements' collapse mark; see {@link ICON_PANEL_CLOSE_RIGHT}. */
|
|
466
|
+
export declare const ICON_CHEVRON_DOWN = "<svg class=\"glyph\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M6 9.5l6 6 6-6\"/></svg>";
|
|
467
|
+
/** A chevron up; see {@link ICON_PANEL_CLOSE_RIGHT}. */
|
|
468
|
+
export declare const ICON_CHEVRON_UP = "<svg class=\"glyph\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M6 14.5l6-6 6 6\"/></svg>";
|
|
469
|
+
/** A chevron right; see {@link ICON_PANEL_CLOSE_RIGHT}. */
|
|
470
|
+
export declare const ICON_CHEVRON_RIGHT = "<svg class=\"glyph\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M9.5 6l6 6-6 6\"/></svg>";
|
|
471
|
+
/** A chevron left; see {@link ICON_PANEL_CLOSE_RIGHT}. */
|
|
472
|
+
export declare const ICON_CHEVRON_LEFT = "<svg class=\"glyph\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M14.5 6l-6 6 6 6\"/></svg>";
|
|
473
|
+
/** The new-chat control's mark (a pencil on a square). */
|
|
474
|
+
export declare const ICON_NEW_CHAT = "<svg class=\"glyph\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M11 4.5H6.5a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V13\"/><path d=\"M17.5 3.5a2.1 2.1 0 0 1 3 3L12 15l-3.5 1 1-3.5z\"/></svg>";
|
|
475
|
+
/** The history control's mark (a clock with a back arrow). */
|
|
476
|
+
export declare const ICON_HISTORY = "<svg class=\"glyph\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M3.5 12A8.5 8.5 0 1 0 6 6L3.5 8.5\"/><path d=\"M3.5 4v4.5H8\"/><path d=\"M12 7.5V12l3 2\"/></svg>";
|
|
477
|
+
/** The checkpoints control's mark (an arrow turning back, counter-clockwise). */
|
|
478
|
+
export declare const ICON_CHECKPOINTS = "<svg class=\"glyph\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M9 14L4 9l5-5\"/><path d=\"M4 9h10.5a5.5 5.5 0 0 1 0 11H11\"/></svg>";
|
|
479
|
+
/** The default launcher mark (a speech bubble), shown when the host slots none. */
|
|
480
|
+
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>";
|
|
481
|
+
/**
|
|
482
|
+
* The generic attachment-chip mark, for a file family with nothing more
|
|
483
|
+
* specific to say. The chip marks share the contract of the chrome glyphs
|
|
484
|
+
* above; `iconFor` selects one by MIME family, never interpolating the MIME
|
|
485
|
+
* string into the markup.
|
|
486
|
+
*/
|
|
487
|
+
/** Copy: two overlapping sheets, the shape every toolbar uses for it. */
|
|
488
|
+
export declare const ICON_COPY: string;
|
|
489
|
+
/** Retry: a circular arrow. */
|
|
490
|
+
export declare const ICON_RETRY: string;
|
|
491
|
+
/** Rate up. */
|
|
492
|
+
export declare const ICON_THUMB_UP: string;
|
|
493
|
+
/** Rate down: the up mark turned over, so the pair reads as one control. */
|
|
494
|
+
export declare const ICON_THUMB_DOWN: string;
|
|
495
|
+
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>";
|
|
496
|
+
/** An image attachment: a framed picture with a horizon and a sun. */
|
|
497
|
+
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>";
|
|
498
|
+
/** A PDF: the generic page, banded to read as a labelled document. */
|
|
499
|
+
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>";
|
|
500
|
+
/** A text document: the generic page, ruled. */
|
|
501
|
+
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>";
|
|
502
|
+
/**
|
|
503
|
+
* ``activityType`` of the ``ACTIVITY_SNAPSHOT`` / ``ACTIVITY_DELTA`` events a
|
|
504
|
+
* server sends to draw a chart.
|
|
505
|
+
*
|
|
506
|
+
* A convention inside an extension point the protocol already provides, not a
|
|
507
|
+
* protocol extension: AG-UI defines the envelope and leaves ``activityType`` an
|
|
508
|
+
* open string. Another vendor's client does not know this name and ignores the
|
|
509
|
+
* event, which is the graceful outcome.
|
|
510
|
+
*/
|
|
511
|
+
export declare const CHART_ACTIVITY_TYPE = "chart";
|
|
512
|
+
/**
|
|
513
|
+
* The gutter a floating panel *rests* at, before anyone has touched it.
|
|
514
|
+
*
|
|
515
|
+
* It matches the default `--ag-ui-inset` and the stylesheet's
|
|
516
|
+
* `--ag-ui-edge-gutter`, so an undragged widget resolves to exactly the
|
|
517
|
+
* placement it already had, and it is what the size cap subtracts so a resting
|
|
518
|
+
* panel grown to its limit stops at the far edge rather than one gutter past
|
|
519
|
+
* it.
|
|
520
|
+
*
|
|
521
|
+
* Not a limit on where a *person* may put the widget -- that is
|
|
522
|
+
* {@link SCREEN_EDGE_MARGIN}, and the two being one number is what made a
|
|
523
|
+
* dragged panel feel stuck short of every edge on all four sides at once.
|
|
524
|
+
*/
|
|
525
|
+
export declare const EDGE_MARGIN = 24;
|
|
526
|
+
/**
|
|
527
|
+
* How long a screen-reader status stays in the announcer before it is emptied.
|
|
528
|
+
*
|
|
529
|
+
* Long enough for a reader to pick the change up, short enough that the region
|
|
530
|
+
* is empty again before the next status lands. Emptying is what makes an
|
|
531
|
+
* identical consecutive message announce at all -- a live region is read on
|
|
532
|
+
* *change*, and setting the same string twice is not one.
|
|
533
|
+
*/
|
|
534
|
+
export declare const ANNOUNCE_CLEAR_MS = 150;
|
|
535
|
+
/**
|
|
536
|
+
* Stacking order for the host-page highlight overlay.
|
|
537
|
+
*
|
|
538
|
+
* One above the widget's own default, because the overlay's whole job is to
|
|
539
|
+
* point at something on the page the widget is sitting over -- a ring drawn
|
|
540
|
+
* underneath the panel would be hidden by the thing that asked for it. It takes
|
|
541
|
+
* no pointer events at any point, so being on top costs the page nothing.
|
|
542
|
+
*/
|
|
543
|
+
export declare const HIGHLIGHT_OVERLAY_Z_INDEX = 2147483001;
|
|
544
|
+
/**
|
|
545
|
+
* How many characters a pasted string has to reach before it becomes an
|
|
546
|
+
* attachment rather than composer text.
|
|
547
|
+
*
|
|
548
|
+
* The composer is capped at 40vh, so anything near this is already taller than
|
|
549
|
+
* the box that holds it: the user cannot read what they pasted or edit around
|
|
550
|
+
* it. Roughly where the field stops being usable rather than a number with a
|
|
551
|
+
* meaning of its own -- `data-paste-attach` moves it.
|
|
552
|
+
*/
|
|
553
|
+
export declare const PASTE_ATTACH_CHARS = 5000;
|
|
554
|
+
/**
|
|
555
|
+
* How close the launcher may be pushed to the edge of the screen.
|
|
556
|
+
*
|
|
557
|
+
* Not the panel's 24px gutter, which was rejected here on purpose: a launcher
|
|
558
|
+
* held that far in refuses the corners people actually drag it to. But zero is
|
|
559
|
+
* wrong too. The bubble is a circle with a drop shadow, and one sitting flush
|
|
560
|
+
* against the edge has its shadow cut and its curve running into the boundary,
|
|
561
|
+
* which reads as clipped whether or not a single pixel is missing -- and on a
|
|
562
|
+
* screen with rounded corners, or under a scrollbar, it is genuinely clipped.
|
|
563
|
+
*
|
|
564
|
+
* Small enough that every corner is still reachable, large enough that the
|
|
565
|
+
* circle always closes.
|
|
566
|
+
*
|
|
567
|
+
* The panel obeys the same bound, for the same reason: it is a rounded box
|
|
568
|
+
* with the same drop shadow, and there is no account of why a bubble held off
|
|
569
|
+
* the boundary should sit beside a panel welded to it. Before this was shared
|
|
570
|
+
* there were four answers to one question -- a drag stopped at 0, a resize at
|
|
571
|
+
* 0, a restore at 24 and the launcher at 8 -- so a panel dragged flush leapt
|
|
572
|
+
* 24px inward the next time anything re-placed it.
|
|
573
|
+
*/
|
|
574
|
+
export declare const SCREEN_EDGE_MARGIN = 8;
|
|
575
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ActivityRenderer } from "./activity_renderer.js";
|
|
2
|
+
/** One `activity_type` a host can draw. See {@link AgUiChat.registerActivityRenderer}. */
|
|
3
|
+
export interface ActivityRegistration {
|
|
4
|
+
/**
|
|
5
|
+
* The AG-UI `activity_type` this draws, matched exactly.
|
|
6
|
+
*
|
|
7
|
+
* An open string the protocol does not enumerate -- which is the whole reason
|
|
8
|
+
* this is a registry rather than a branch.
|
|
9
|
+
*/
|
|
10
|
+
readonly type: string;
|
|
11
|
+
readonly render: ActivityRenderer;
|
|
12
|
+
/**
|
|
13
|
+
* Shown in the transcript when something already drawn under this type stops
|
|
14
|
+
* being renderable. Omit for an activity whose disappearance needs no
|
|
15
|
+
* explanation.
|
|
16
|
+
*/
|
|
17
|
+
readonly removedNotice?: string;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=activity_registration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activity_registration.d.ts","sourceRoot":"","sources":["../../src/core/activity_registration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,0FAA0F;AAC1F,MAAM,WAAW,oBAAoB;IACnC;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAClC;;;;OAIG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ActivityRegistration } from "./activity_registration.js";
|
|
2
|
+
/** What the activity registry needs from the element that owns it. */
|
|
3
|
+
export interface ActivityRegistryHost {
|
|
4
|
+
/** The current answer group, opening one if none is open. */
|
|
5
|
+
readonly ensureGroup: () => HTMLDivElement;
|
|
6
|
+
/** Update the empty state and follow the foot after the transcript grew. */
|
|
7
|
+
readonly afterTranscriptGrew: () => void;
|
|
8
|
+
/** Append an ambient run notice to the current group. */
|
|
9
|
+
readonly appendNotice: (icon: string, text: string, kind: string) => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The AG-UI activities this element can draw, and the blocks it drew: which
|
|
13
|
+
* `activity_type`s have a renderer, which arrived with none, and the node each
|
|
14
|
+
* drawn activity is on screen as.
|
|
15
|
+
*
|
|
16
|
+
* Owned one-to-one by an `<ag-ui-chat>`, and holding no state outside the
|
|
17
|
+
* instance.
|
|
18
|
+
*/
|
|
19
|
+
export declare class ActivityRegistry {
|
|
20
|
+
#private;
|
|
21
|
+
constructor(host: ActivityRegistryHost);
|
|
22
|
+
/** The registration behind `AgUiChat.registerActivityRenderer`, whose doc is the contract. */
|
|
23
|
+
register(registration: ActivityRegistration): void;
|
|
24
|
+
/** Whether a renderer is registered for `activityType`. */
|
|
25
|
+
has(activityType: string): boolean;
|
|
26
|
+
/** The set behind `AgUiChat.unhandledActivityTypes`, whose doc is the contract. */
|
|
27
|
+
unhandledTypes(): readonly string[];
|
|
28
|
+
/** Forget the drawn blocks, with the transcript they were drawn into. */
|
|
29
|
+
clearBlocks(): void;
|
|
30
|
+
/**
|
|
31
|
+
* Draw, replace or remove one activity, whatever kind it is.
|
|
32
|
+
*
|
|
33
|
+
* The single path for all three routes an activity arrives by -- pushed
|
|
34
|
+
* (`onActivity`), patched (`onActivityChanged`) and replayed from history --
|
|
35
|
+
* which is why the renderer contract has to be pure: the same content is
|
|
36
|
+
* drawn again on every thread load.
|
|
37
|
+
*
|
|
38
|
+
* An unregistered type draws nothing and says nothing. That is the protocol's
|
|
39
|
+
* own answer -- a client that does not know a name ignores the event -- and a
|
|
40
|
+
* warning here would fire on every well-behaved forward-compatible server,
|
|
41
|
+
* while a placeholder would put the protocol's growth in the user's face.
|
|
42
|
+
* {@link unhandledTypes} is the way to find out what arrived.
|
|
43
|
+
*/
|
|
44
|
+
draw(messageId: string, activityType: string, content: unknown): void;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=activity_registry.d.ts.map
|