@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 @@
|
|
|
1
|
+
{"version":3,"file":"ag_ui_chat.d.ts","sourceRoot":"","sources":["../../src/core/ag_ui_chat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAW,IAAI,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAuBL,KAAK,oBAAoB,EAE1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAGhD,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAEzF,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAEnE,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAwB,KAAK,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE1E,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAetD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAG5E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAG1E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAE1E,OAAO,EAAE,KAAK,KAAK,EAA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AKnC;IAED;;;;;OAKG;IACH,iBAAiB,IAAI,IAAI,CAMxB;IAED;;;;;;;;;;;OAWG;IACH,OAAO,IAAI,IAAI,CAsBd;IAiED;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACG,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAyCtC;IAED;;;;;;;;;OASG;IACH,aAAa,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,GAAG,cAAc,CAEhE;IA+sBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4CG;IACG,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,GAAE,SAAS,aAAa,EAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CA+D/F;IAoBD;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAE9B;IAgID;;;;;;;;;;;;;;;;;OAiBG;IACH,YAAY,CAAC,MAAM,GAAE,SAAS,CAAC,MAAM,GAAG,UAAU,CAAC,EAAyB,GAAG,IAAI,CAuBlF;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,wBAAwB,CAAC,YAAY,EAAE,oBAAoB,GAAG,IAAI,CAEjE;IAED;;;;;;;;OAQG;IACH,IAAI,sBAAsB,IAAI,SAAS,MAAM,EAAE,CAE9C;CACF"}
|
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
import { type AbstractAgent } from "@ag-ui/client";
|
|
2
|
+
import { type Context, type Interrupt, type Message, type Tool } from "@ag-ui/core";
|
|
3
|
+
import type { AttachmentRef } from "./attachment.js";
|
|
4
|
+
import type { ToolOutcome } from "./tool_outcome.js";
|
|
5
|
+
/** A tool call surfaced to the host by {@link AgUiClient}. */
|
|
6
|
+
export interface AgUiToolCall {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly name: string;
|
|
9
|
+
readonly args: Record<string, unknown>;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Which message an answer surfaced by {@link AgUiClient} is, as the stream
|
|
13
|
+
* named it.
|
|
14
|
+
*/
|
|
15
|
+
export interface AgUiMessageIds {
|
|
16
|
+
/** The id the message streamed under, on its `TEXT_MESSAGE_START`/`END`. */
|
|
17
|
+
readonly messageId: string;
|
|
18
|
+
/**
|
|
19
|
+
* The run that streamed it, as that run's `RUN_STARTED` declared it.
|
|
20
|
+
*
|
|
21
|
+
* Absent when no `RUN_STARTED` was seen. `@ag-ui/client` 1.0 rejects a
|
|
22
|
+
* stream whose first event is anything else, so over a real agent this is
|
|
23
|
+
* always present; nothing else names the run the server recorded, so
|
|
24
|
+
* nothing is substituted when it is not.
|
|
25
|
+
*
|
|
26
|
+
* Text a sub-agent streams through the parent run carries the parent's run
|
|
27
|
+
* id: that is the stream it arrived on, and the delegation's
|
|
28
|
+
* `subagentRunId` names the child's work rather than a run the answer is
|
|
29
|
+
* recorded under.
|
|
30
|
+
*/
|
|
31
|
+
readonly runId?: string;
|
|
32
|
+
}
|
|
33
|
+
/** The result of executing a frontend tool, destined for a tool-result message. */
|
|
34
|
+
export interface ToolExecution {
|
|
35
|
+
/** String content for the AG-UI tool-result message. */
|
|
36
|
+
content: string;
|
|
37
|
+
/** Present when the handler failed; surfaced for logging. */
|
|
38
|
+
error?: string;
|
|
39
|
+
/**
|
|
40
|
+
* How the call ended, in the same vocabulary a server states on
|
|
41
|
+
* `TOOL_CALL_RESULT`. Omit for a success -- absent *is* success, here for the
|
|
42
|
+
* same reason it is on the wire.
|
|
43
|
+
*
|
|
44
|
+
* Distinct from {@link error}, which is a *message* and only exists for the
|
|
45
|
+
* one failure shape that produces one. A refusal has no error and is still
|
|
46
|
+
* not a success, and that is the case this field exists for.
|
|
47
|
+
*/
|
|
48
|
+
outcome?: ToolOutcome;
|
|
49
|
+
/**
|
|
50
|
+
* When `true`, a navigating tool triggered a page reload. The loop stops
|
|
51
|
+
* without appending a result — the result is supplied after the next mount
|
|
52
|
+
* (see the resume path). Mutually exclusive with a usable `content`.
|
|
53
|
+
*/
|
|
54
|
+
halt?: boolean;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Executes a frontend tool call.
|
|
58
|
+
*
|
|
59
|
+
* Returns the {@link ToolExecution} to post back to the agent, or `null` when
|
|
60
|
+
* there is nothing to post: the call is not a frontend tool the host owns (a
|
|
61
|
+
* server-side tool the server already executed, which the client must not
|
|
62
|
+
* re-run), or its run was stopped or handed over while the call waited. A
|
|
63
|
+
* stopped call is left unanswered here, like the calls after it in the round,
|
|
64
|
+
* and the next request answers it as not finished.
|
|
65
|
+
*/
|
|
66
|
+
export type ExecuteTool = (call: AgUiToolCall) => Promise<ToolExecution | null>;
|
|
67
|
+
/**
|
|
68
|
+
* One user decision for a server-side-tool approval interrupt. Structurally
|
|
69
|
+
* matches `@ag-ui/client`'s (non-exported) `ResumeResponse`, the payload
|
|
70
|
+
* {@link buildResumeArray} turns into a `ResumeEntry`: `resolved` approves (with
|
|
71
|
+
* an optional `payload`, e.g. `{ approved: true }`), `cancelled` denies.
|
|
72
|
+
*/
|
|
73
|
+
export type InterruptResponse = {
|
|
74
|
+
status: "resolved";
|
|
75
|
+
payload?: unknown;
|
|
76
|
+
} | {
|
|
77
|
+
status: "cancelled";
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Resolves the approval interrupts a run finished on, keyed by interrupt id.
|
|
81
|
+
*
|
|
82
|
+
* A gated server-side tool defers instead of executing, so the run finishes on
|
|
83
|
+
* an interrupt outcome; the host collects one decision per interrupt and the
|
|
84
|
+
* loop resumes with the answers. Omit for agents that never gate server-side
|
|
85
|
+
* tools — an unresolved interrupt then ends the loop.
|
|
86
|
+
*/
|
|
87
|
+
export type ResolveInterrupts = (interrupts: readonly Interrupt[]) => Promise<Record<string, InterruptResponse>>;
|
|
88
|
+
/**
|
|
89
|
+
* Callbacks the {@link AgUiClient} invokes as a run progresses. The host
|
|
90
|
+
* (the `<ag-ui-chat>` element) implements these to render streaming text and
|
|
91
|
+
* tool activity into the chat.
|
|
92
|
+
*/
|
|
93
|
+
export interface AgUiClientHandlers {
|
|
94
|
+
onRunStart(): void;
|
|
95
|
+
/** Fired on every streamed token; `buffer` is the full text so far. */
|
|
96
|
+
onTextDelta(buffer: string): void;
|
|
97
|
+
/**
|
|
98
|
+
* Fired when the assistant message completes; `buffer` is the final text,
|
|
99
|
+
* and `message` names it as the stream did.
|
|
100
|
+
*/
|
|
101
|
+
onTextEnd(buffer: string, message: AgUiMessageIds): void;
|
|
102
|
+
/** Fired when the agent finishes calling a tool (server- or frontend-side). */
|
|
103
|
+
onToolCall(call: AgUiToolCall): void;
|
|
104
|
+
/**
|
|
105
|
+
* Fired when a server-side tool's result streams back (AG-UI's
|
|
106
|
+
* `TOOL_CALL_RESULT`). Frontend tools don't emit this — the client supplies
|
|
107
|
+
* their result itself — so this is the channel for server-executed output.
|
|
108
|
+
*
|
|
109
|
+
* `outcome` is the `outcome` key of the event's `metadata`, forwarded raw.
|
|
110
|
+
* It is `unknown` rather than {@link ToolOutcome} because metadata is open by
|
|
111
|
+
* key: the protocol declares the object and validates nothing inside it, so
|
|
112
|
+
* neither can this signature honestly claim to. Read it with
|
|
113
|
+
* `toolStatusFromOutcome`, which treats `undefined` and anything unrecognised
|
|
114
|
+
* as a success.
|
|
115
|
+
*
|
|
116
|
+
* Only the metadata is read. A server written against `@ag-ui/client` 0.x
|
|
117
|
+
* states the outcome at the top level of the event, and 1.0 strips that key
|
|
118
|
+
* before any subscriber runs, so from such a server this is `undefined` and
|
|
119
|
+
* the card settles as done.
|
|
120
|
+
*/
|
|
121
|
+
onToolResult(toolCallId: string, content: string, outcome?: unknown): void;
|
|
122
|
+
/**
|
|
123
|
+
* Fired for AG-UI activity events — ambient notices about what the *run* did,
|
|
124
|
+
* as opposed to work the agent asked for. `django-ag-ui` emits one with
|
|
125
|
+
* `activityType: "compaction"` when it condensed the history.
|
|
126
|
+
*/
|
|
127
|
+
onActivity(activityType: string, content: unknown, messageId: string): void;
|
|
128
|
+
/**
|
|
129
|
+
* An activity's content changed in place — a snapshot re-sent under the same
|
|
130
|
+
* `messageId` with `replace`, or an `ACTIVITY_DELTA` whose JSON patch
|
|
131
|
+
* `@ag-ui/client` has already applied.
|
|
132
|
+
*
|
|
133
|
+
* Reported after the client has updated its own message, so `content` is the
|
|
134
|
+
* result rather than the instruction. That is the whole reason this is a
|
|
135
|
+
* separate callback: the raw delta event fires *before* the patch lands, and
|
|
136
|
+
* a subscriber acting on it would redraw from stale content.
|
|
137
|
+
*/
|
|
138
|
+
onActivityChanged(messageId: string, activityType: string, content: unknown): void;
|
|
139
|
+
/** Fired when a reasoning model starts emitting its chain-of-thought. */
|
|
140
|
+
onReasoningStart(): void;
|
|
141
|
+
/**
|
|
142
|
+
* Fired on every reasoning token, and once more when the block ends.
|
|
143
|
+
*
|
|
144
|
+
* ``buffer`` is the text accumulated *before* the token that triggered the
|
|
145
|
+
* call, which is what the protocol client passes -- so the stream trails by
|
|
146
|
+
* one delta and the final call, at the end of the block, is what completes
|
|
147
|
+
* it. Render the buffer wholesale rather than appending it.
|
|
148
|
+
*/
|
|
149
|
+
onReasoningDelta(buffer: string): void;
|
|
150
|
+
/** Fired when the reasoning block ends (before the answer text streams). */
|
|
151
|
+
onReasoningEnd(): void;
|
|
152
|
+
onRunEnd(): void;
|
|
153
|
+
/**
|
|
154
|
+
* The server replaced the whole conversation with `MESSAGES_SNAPSHOT`.
|
|
155
|
+
*
|
|
156
|
+
* `@ag-ui/client` applies the event before any subscriber sees it, so by the
|
|
157
|
+
* time this fires `agent.messages` **is** the server's list -- and the run
|
|
158
|
+
* loop persists `agent.messages`. The replacement therefore reaches the
|
|
159
|
+
* conversation store whatever the host does; this hook exists so the host can
|
|
160
|
+
* stop that being invisible.
|
|
161
|
+
*/
|
|
162
|
+
onMessagesSnapshot(messages: readonly Message[]): void;
|
|
163
|
+
/**
|
|
164
|
+
* The agent sent a `CUSTOM` event.
|
|
165
|
+
*
|
|
166
|
+
* Forwarded whole and uninterpreted: `name` is an open string the protocol
|
|
167
|
+
* does not enumerate, so a client that decided which names were legal would
|
|
168
|
+
* be the thing the open field exists to avoid.
|
|
169
|
+
*/
|
|
170
|
+
onCustomEvent(name: string, value: unknown): void;
|
|
171
|
+
/**
|
|
172
|
+
* A delegated sub-agent started, inside the run.
|
|
173
|
+
*
|
|
174
|
+
* The protocol's own event, unlike the steps that follow it on
|
|
175
|
+
* {@link SUBAGENT_CUSTOM_NAME}. `parentToolCallId` links the delegation to the
|
|
176
|
+
* `delegate_task` call that spawned it -- the field AG-UI provides for the
|
|
177
|
+
* "agents as tools" shape -- and is `null` when the server did not send one,
|
|
178
|
+
* which a host reads as a delegation it has nothing to attach to.
|
|
179
|
+
*
|
|
180
|
+
* `subagentRunId` names the child run and is the only id the two closing
|
|
181
|
+
* events carry, so a host that wants to close what it opened has to remember
|
|
182
|
+
* the pairing.
|
|
183
|
+
*/
|
|
184
|
+
onSubAgentStarted(subagentRunId: string, name: string, parentToolCallId: string | null): void;
|
|
185
|
+
/** The delegation named by `subagentRunId` completed. */
|
|
186
|
+
onSubAgentFinished(subagentRunId: string): void;
|
|
187
|
+
/**
|
|
188
|
+
* The delegation named by `subagentRunId` failed.
|
|
189
|
+
*
|
|
190
|
+
* `message` is server text and required by the protocol, but it is not an
|
|
191
|
+
* exception's words: `django-ag-ui` sends only which sub-agent failed, on the
|
|
192
|
+
* same reasoning that redacts a `RUN_ERROR`. Render it as text, never as
|
|
193
|
+
* markup.
|
|
194
|
+
*/
|
|
195
|
+
onSubAgentError(subagentRunId: string, message: string): void;
|
|
196
|
+
onError(message: string): void;
|
|
197
|
+
/**
|
|
198
|
+
* Fired when the user cancelled the run ({@link AgUiClient.cancel}) — the
|
|
199
|
+
* deliberate-stop sibling of `onError`. Partial assistant text already
|
|
200
|
+
* streamed stays valid, so the host keeps the bubble and shows a stopped
|
|
201
|
+
* affordance rather than an error. `onSettled` still follows.
|
|
202
|
+
*/
|
|
203
|
+
onCancelled(): void;
|
|
204
|
+
/**
|
|
205
|
+
* Fired exactly once when the interaction settles, however the run loop ended
|
|
206
|
+
* — server-only round, rounds exhausted, cancellation, or error. The terminal
|
|
207
|
+
* guarantee that the UI returns to rest.
|
|
208
|
+
*/
|
|
209
|
+
onSettled(): void;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Provider of the per-run frontend tool catalog and context. Both are read
|
|
213
|
+
* fresh on every {@link AgUiClient.send} so the catalog reflects the current
|
|
214
|
+
* page state.
|
|
215
|
+
*/
|
|
216
|
+
export interface AgUiRunInputs {
|
|
217
|
+
getTools?: () => Tool[];
|
|
218
|
+
getContext?: () => Context[];
|
|
219
|
+
}
|
|
220
|
+
export interface AgUiClientConfig extends AgUiRunInputs {
|
|
221
|
+
/** The AG-UI agent to drive. Injected so it can be faked in tests. */
|
|
222
|
+
agent: AbstractAgent;
|
|
223
|
+
handlers: AgUiClientHandlers;
|
|
224
|
+
/** Executes frontend tool calls. Omit for server-only tool sets. */
|
|
225
|
+
executeTool?: ExecuteTool;
|
|
226
|
+
/**
|
|
227
|
+
* Resolves server-side-tool approval interrupts. Omit when no server-side
|
|
228
|
+
* tool is gated for approval — an interrupt then ends the loop unanswered.
|
|
229
|
+
*/
|
|
230
|
+
resolveInterrupts?: ResolveInterrupts;
|
|
231
|
+
/**
|
|
232
|
+
* Invoked with the latest history whenever it changes, so the host can
|
|
233
|
+
* persist it for durability across page reloads. Omit to keep the
|
|
234
|
+
* conversation in-memory only.
|
|
235
|
+
*/
|
|
236
|
+
onPersist?: (messages: readonly Message[]) => void;
|
|
237
|
+
/**
|
|
238
|
+
* Called whenever AG-UI shared state changes — a streamed `STATE_SNAPSHOT` /
|
|
239
|
+
* `STATE_DELTA`, or {@link AgUiClient.setState}. `@ag-ui/client` owns applying
|
|
240
|
+
* those events; this only forwards the result.
|
|
241
|
+
*/
|
|
242
|
+
onStateChanged?: (state: Readonly<Record<string, unknown>>) => void;
|
|
243
|
+
/**
|
|
244
|
+
* Error text for {@link AgUiClientHandlers.onError} when a run's stream closes
|
|
245
|
+
* without a terminal AG-UI event. Defaults to `"Connection lost"`; the host
|
|
246
|
+
* passes its localized string.
|
|
247
|
+
*/
|
|
248
|
+
connectionLostMessage?: string;
|
|
249
|
+
/**
|
|
250
|
+
* Result content for a tool call the conversation moved past without one: a
|
|
251
|
+
* Stop while the stream was arriving, a round that ended on `RUN_ERROR`, a
|
|
252
|
+
* call no {@link executeTool} answered, or history restored with a call still
|
|
253
|
+
* open. Sent to the agent, so it says only that the call did not finish --
|
|
254
|
+
* nobody refused it. Defaults to an English sentence; the host passes its
|
|
255
|
+
* localized string.
|
|
256
|
+
*/
|
|
257
|
+
unfinishedMessage?: string;
|
|
258
|
+
/**
|
|
259
|
+
* Result content for a server-side approval that Stop closed while it was
|
|
260
|
+
* open, which the host's {@link resolveInterrupts} answers as declined.
|
|
261
|
+
* Defaults to `"User declined the action."`; the host passes its localized
|
|
262
|
+
* string.
|
|
263
|
+
*/
|
|
264
|
+
declinedMessage?: string;
|
|
265
|
+
/**
|
|
266
|
+
* Upper bound on frontend tool-call to re-run rounds within one
|
|
267
|
+
* {@link AgUiClient.send}. Defaults to {@link MAX_TOOL_ROUNDS}.
|
|
268
|
+
*
|
|
269
|
+
* The default suits a chat whose tools answer questions. A page-driving
|
|
270
|
+
* deployment reaches it legitimately -- filling a form field by field is one
|
|
271
|
+
* round each -- and the symptom is not an error but an answer that stops
|
|
272
|
+
* mid-task, which reads as the model giving up. Raise it where a turn is
|
|
273
|
+
* expected to take many small steps.
|
|
274
|
+
*
|
|
275
|
+
* Read once, when the client is built. The bound is a property of the
|
|
276
|
+
* deployment rather than of a run, so re-reading it per round would only make
|
|
277
|
+
* a mid-run change possible, and a mid-run change to how long the run may
|
|
278
|
+
* last is not a thing a host has any way to reason about.
|
|
279
|
+
*/
|
|
280
|
+
maxToolRounds?: number;
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Raised when a run's stream closes cleanly at the transport level but never
|
|
284
|
+
* emits a terminal AG-UI event, so the run neither finished nor errored. Routed
|
|
285
|
+
* to {@link AgUiClientHandlers.onError} (it is not an abort), turning a silent
|
|
286
|
+
* "stuck pending" into a visible "connection lost".
|
|
287
|
+
*/
|
|
288
|
+
export declare class ConnectionLostError extends Error {
|
|
289
|
+
constructor(message: string);
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Thin orchestration layer over an AG-UI {@link AbstractAgent}.
|
|
293
|
+
*
|
|
294
|
+
* Translates AG-UI's subscriber callbacks into the host's
|
|
295
|
+
* {@link AgUiClientHandlers}, and appends the user message + current frontend
|
|
296
|
+
* tool catalog + context to each run.
|
|
297
|
+
*/
|
|
298
|
+
export declare class AgUiClient {
|
|
299
|
+
#private;
|
|
300
|
+
constructor(config: AgUiClientConfig);
|
|
301
|
+
/** The current AG-UI shared state, as the agent last applied it. */
|
|
302
|
+
get state(): Readonly<Record<string, unknown>>;
|
|
303
|
+
/** Replace the shared state; the next run sends it as `RunAgentInput.state`. */
|
|
304
|
+
setState(state: Readonly<Record<string, unknown>>): void;
|
|
305
|
+
/** Whether a run is currently in flight. */
|
|
306
|
+
get running(): boolean;
|
|
307
|
+
/** The current conversation history (for persistence / rehydration). */
|
|
308
|
+
get messages(): readonly Message[];
|
|
309
|
+
/**
|
|
310
|
+
* Append a user message and run the agent to completion.
|
|
311
|
+
*
|
|
312
|
+
* When the agent calls frontend tools, this executes them and re-runs the
|
|
313
|
+
* agent with the results, looping until the agent stops calling frontend
|
|
314
|
+
* tools (bounded by {@link AgUiClientConfig.maxToolRounds}, which defaults to
|
|
315
|
+
* {@link MAX_TOOL_ROUNDS}).
|
|
316
|
+
*
|
|
317
|
+
* `attachments` ride in the user message's `metadata`, under
|
|
318
|
+
* `attachments`, which is how the server learns which files the agent can
|
|
319
|
+
* read and how the default store round-trips them for history replay; see
|
|
320
|
+
* {@link messageAttachments}.
|
|
321
|
+
*/
|
|
322
|
+
send(content: string, attachments?: readonly AttachmentRef[]): Promise<void>;
|
|
323
|
+
/**
|
|
324
|
+
* Drop everything after the most recent user message, so the same question
|
|
325
|
+
* can be asked again.
|
|
326
|
+
*
|
|
327
|
+
* Returns the retained history, or `null` when there is nothing to retry (no
|
|
328
|
+
* user message has been sent yet). The shortened history is saved before it
|
|
329
|
+
* replaces the current one, so a save that throws changes nothing and the
|
|
330
|
+
* throw propagates.
|
|
331
|
+
*
|
|
332
|
+
* **Truncates only** -- the caller re-renders from the returned list and then
|
|
333
|
+
* calls {@link resume}, because the transcript belongs to the element and a
|
|
334
|
+
* client that reached into it would own two things. Running here instead
|
|
335
|
+
* would stream the new answer in underneath the old one.
|
|
336
|
+
*
|
|
337
|
+
* Re-running answers the question the agent was last asked, rather than
|
|
338
|
+
* telling it its answer was wrong, which is what makes the result a
|
|
339
|
+
* *different* answer instead of a conversation about the previous one.
|
|
340
|
+
*
|
|
341
|
+
* **A retried turn re-runs its tools.** For a page-driving agent that is not
|
|
342
|
+
* neutral: the previous attempt already clicked what it clicked, and this
|
|
343
|
+
* does not undo it.
|
|
344
|
+
*/
|
|
345
|
+
truncateToLastUser(): readonly Message[] | null;
|
|
346
|
+
/**
|
|
347
|
+
* Resume the run loop after a navigating tool's result was supplied
|
|
348
|
+
* post-reload (via {@link addToolResult}). Unlike {@link send}, adds no user
|
|
349
|
+
* message; it continues the conversation already in history.
|
|
350
|
+
*/
|
|
351
|
+
resume(): Promise<void>;
|
|
352
|
+
/** Append a frontend tool result to history (used by the resume path). */
|
|
353
|
+
addToolResult(toolCallId: string, content: string): void;
|
|
354
|
+
/**
|
|
355
|
+
* Cancel the in-flight run (AG-UI has no server cancel route — aborting the
|
|
356
|
+
* streaming request is the protocol's cancel; the server observes the
|
|
357
|
+
* disconnect). Safe to call with no run in flight. Partial text already
|
|
358
|
+
* streamed stays in history; {@link AgUiClientHandlers.onCancelled} fires
|
|
359
|
+
* instead of `onError`, and `onSettled` still follows.
|
|
360
|
+
*
|
|
361
|
+
* Also stops a {@link send} or {@link resume} whose request has not been made
|
|
362
|
+
* yet, when host code it runs on the way calls this: the save of the turn,
|
|
363
|
+
* the tool and context providers, the save answering a call left open. No
|
|
364
|
+
* request is made then, and `onCancelled` and `onSettled` fire as for any
|
|
365
|
+
* other Stop. A cancel with nothing in flight is forgotten when the next
|
|
366
|
+
* send or resume begins.
|
|
367
|
+
*/
|
|
368
|
+
cancel(): void;
|
|
369
|
+
}
|
|
370
|
+
//# sourceMappingURL=agui_client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agui_client.d.ts","sourceRoot":"","sources":["../../src/core/agui_client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAKnB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,KAAK,OAAO,EAEZ,KAAK,SAAS,EACd,KAAK,OAAO,EAEZ,KAAK,IAAI,EACV,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD,8DAA8D;AAC9D,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,4EAA4E;IAC5E,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,mFAAmF;AACnF,MAAM,WAAW,aAAa;IAC5B,wDAAwD;IACxD,OAAO,EAAE,MAAM,CAAC;IAChB,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;OAQG;IACH,OAAO,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E,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAGvD;IAED;;;;;;;;;;;;;OAaG;IACH,MAAM,IAAI,IAAI,CAGb;CA4bF"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { Message } from "@ag-ui/core";
|
|
2
|
+
/**
|
|
3
|
+
* A durable, lightweight reference to one uploaded file — what an upload
|
|
4
|
+
* returns and what rides on a sent message, never the bytes.
|
|
5
|
+
*
|
|
6
|
+
* Mirrors django-ag-ui's `AttachmentRef`: the file uploads out-of-band to the
|
|
7
|
+
* attachments endpoint, the server hands back this ref, and the agent reads the
|
|
8
|
+
* content server-side via the `read_attachment` tool.
|
|
9
|
+
*/
|
|
10
|
+
export interface AttachmentRef {
|
|
11
|
+
/** Opaque, owner-scoped handle the server resolves back to bytes. */
|
|
12
|
+
readonly id: string;
|
|
13
|
+
/** Original filename, for display on the chip. */
|
|
14
|
+
readonly name: string;
|
|
15
|
+
/** Declared content type (a hint — the server is authoritative). */
|
|
16
|
+
readonly mime: string;
|
|
17
|
+
/** Size in bytes. */
|
|
18
|
+
readonly size: number;
|
|
19
|
+
/** Optional direct fetch URL (the owner-checked download endpoint). */
|
|
20
|
+
readonly url?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The attachment refs a user message carries.
|
|
24
|
+
*
|
|
25
|
+
* `AgUiClient.send` writes them into the message's `metadata`, under
|
|
26
|
+
* `attachments`. That is the one place they survive the trip: `@ag-ui/client`
|
|
27
|
+
* 1.0 strips every key its schemas do not declare from the outgoing input, so
|
|
28
|
+
* refs written at the top level of the message never reach the server, while
|
|
29
|
+
* `metadata` is declared open by key and sent as it is. The server reads them
|
|
30
|
+
* from there to tell the agent which files it can read, and the default store
|
|
31
|
+
* round-trips them, so a restored conversation re-renders its chips.
|
|
32
|
+
*
|
|
33
|
+
* A conversation stored by an earlier release has them at the top level, so
|
|
34
|
+
* that is read when the metadata has none. An older server reads only the top
|
|
35
|
+
* level, so against one the agent is never told about a file at all.
|
|
36
|
+
*
|
|
37
|
+
* Storage is untrusted — hand-edited, truncated, or corrupted — so malformed
|
|
38
|
+
* entries are dropped here; a shapeless one would throw in `iconFor` and abort
|
|
39
|
+
* the whole history replay.
|
|
40
|
+
*/
|
|
41
|
+
export declare function messageAttachments(message: Message): readonly AttachmentRef[];
|
|
42
|
+
//# sourceMappingURL=attachment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attachment.d.ts","sourceRoot":"","sources":["../../src/core/attachment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAG3C;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B,qEAAqE;IACrE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,kDAAkD;IAClD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,oEAAoE;IACpE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,qBAAqB;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,uEAAuE;IACvE,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,aAAa,EAAE,CAG7E"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One chat's place in the document's list of connected chats.
|
|
3
|
+
*
|
|
4
|
+
* Owned one-to-one by an `<ag-ui-chat>`, which joins on connect and leaves on
|
|
5
|
+
* disconnect, so the list holds exactly the elements that are in a document
|
|
6
|
+
* now. Typed as `HTMLElement` rather than the element's class, because the DOM
|
|
7
|
+
* driver reads it and must not import the element.
|
|
8
|
+
*/
|
|
9
|
+
export declare class ChatRegistration {
|
|
10
|
+
#private;
|
|
11
|
+
constructor(chat: HTMLElement);
|
|
12
|
+
/**
|
|
13
|
+
* Join, as the most recently connected chat. An element moved in the DOM
|
|
14
|
+
* left on disconnect before it reconnected, so it rejoins at the end and no
|
|
15
|
+
* entry needs removing first.
|
|
16
|
+
*/
|
|
17
|
+
join(): void;
|
|
18
|
+
/** Leave. The previous chat, if one is still connected, becomes the latest. */
|
|
19
|
+
leave(): void;
|
|
20
|
+
/** The most recently connected chat still in the document, or `null`. */
|
|
21
|
+
static latest(): HTMLElement | null;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=chat_registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat_registry.d.ts","sourceRoot":"","sources":["../../src/core/chat_registry.ts"],"names":[],"mappings":"AAeA;;;;;;;GAOG;AACH,qBAAa,gBAAgB;;IAG3B,YAAY,IAAI,EAAE,WAAW,EAE5B;IAED;;;;OAIG;IACH,IAAI,IAAI,IAAI,CAEX;IAED,+EAA+E;IAC/E,KAAK,IAAI,IAAI,CAEZ;IAED,yEAAyE;IACzE,MAAM,CAAC,MAAM,IAAI,WAAW,GAAG,IAAI,CAMlC;CACF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Message } from "@ag-ui/core";
|
|
2
|
+
/**
|
|
3
|
+
* What differs between the clients one conversation builds -- its own, and one
|
|
4
|
+
* per checkpoint continuation. Everything else about a client comes from the
|
|
5
|
+
* element's single construction, so an option added for one reaches the other.
|
|
6
|
+
*/
|
|
7
|
+
export interface ClientSeed {
|
|
8
|
+
/** Where the client's runs are sent. */
|
|
9
|
+
readonly endpoint: string;
|
|
10
|
+
/** The history the agent starts from, and sends with its first run. */
|
|
11
|
+
readonly initialMessages: readonly Message[];
|
|
12
|
+
/**
|
|
13
|
+
* The conversation this client's own history continues, which every save
|
|
14
|
+
* writes ahead of it.
|
|
15
|
+
*
|
|
16
|
+
* Empty for the conversation's own client, whose history is the whole
|
|
17
|
+
* conversation. A continuation's history is only the turn it adds and its
|
|
18
|
+
* answer -- the endpoint supplies the rest from its snapshot -- and a store
|
|
19
|
+
* keeps one list per thread, so a save of that history alone would replace
|
|
20
|
+
* the conversation with its last exchange, and not saving it lost the
|
|
21
|
+
* exchange on the next reload.
|
|
22
|
+
*/
|
|
23
|
+
readonly follows: readonly Message[];
|
|
24
|
+
/** Handed the whole conversation each time the client saves it, as written. */
|
|
25
|
+
readonly onSaved?: (conversation: readonly Message[]) => void;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=client_seed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client_seed.d.ts","sourceRoot":"","sources":["../../src/core/client_seed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,wCAAwC;IACxC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,uEAAuE;IACvE,QAAQ,CAAC,eAAe,EAAE,SAAS,OAAO,EAAE,CAAC;IAC7C;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,OAAO,EAAE,SAAS,OAAO,EAAE,CAAC;IACrC,+EAA+E;IAC/E,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,SAAS,OAAO,EAAE,KAAK,IAAI,CAAC;CAC/D"}
|