@rtc-agent/component 0.2.7-rc.3 → 0.2.7-rc.4
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/dist/.generated/locales/en-US.d.ts +220 -0
- package/dist/.generated/locales/en-US.d.ts.map +1 -0
- package/dist/assets/{shared-worker-BEaT-a-g.js → shared-worker-BQv441O7.js} +92 -92
- package/dist/components/activity-bar/rtc-activity-bar.d.ts +65 -0
- package/dist/components/activity-bar/rtc-activity-bar.d.ts.map +1 -0
- package/dist/components/activity-bar/rtc-activity-bar.styles.d.ts +7 -0
- package/dist/components/activity-bar/rtc-activity-bar.styles.d.ts.map +1 -0
- package/dist/components/chat-layout/rtc-chat-layout.d.ts +211 -0
- package/dist/components/chat-layout/rtc-chat-layout.d.ts.map +1 -0
- package/dist/components/chat-layout/rtc-chat-layout.styles.d.ts +11 -0
- package/dist/components/chat-layout/rtc-chat-layout.styles.d.ts.map +1 -0
- package/dist/components/content-area/rtc-content-area.d.ts +34 -0
- package/dist/components/content-area/rtc-content-area.d.ts.map +1 -0
- package/dist/components/content-area/rtc-content-area.styles.d.ts +2 -0
- package/dist/components/content-area/rtc-content-area.styles.d.ts.map +1 -0
- package/dist/components/content-area/rtc-error-message.d.ts +82 -0
- package/dist/components/content-area/rtc-error-message.d.ts.map +1 -0
- package/dist/components/content-area/rtc-message-list.d.ts +251 -0
- package/dist/components/content-area/rtc-message-list.d.ts.map +1 -0
- package/dist/components/content-area/rtc-message-list.skeleton-styles.d.ts +13 -0
- package/dist/components/content-area/rtc-message-list.skeleton-styles.d.ts.map +1 -0
- package/dist/components/content-area/rtc-message-list.styles.d.ts +2 -0
- package/dist/components/content-area/rtc-message-list.styles.d.ts.map +1 -0
- package/dist/components/content-area/rtc-message-more-menu.d.ts +35 -0
- package/dist/components/content-area/rtc-message-more-menu.d.ts.map +1 -0
- package/dist/components/content-area/rtc-message.d.ts +202 -0
- package/dist/components/content-area/rtc-message.d.ts.map +1 -0
- package/dist/components/content-area/rtc-message.styles.d.ts +2 -0
- package/dist/components/content-area/rtc-message.styles.d.ts.map +1 -0
- package/dist/components/content-area/rtc-scroll-container.d.ts +44 -0
- package/dist/components/content-area/rtc-scroll-container.d.ts.map +1 -0
- package/dist/components/content-area/rtc-scroll-container.styles.d.ts +2 -0
- package/dist/components/content-area/rtc-scroll-container.styles.d.ts.map +1 -0
- package/dist/components/content-area/rtc-toolcall-card.d.ts +81 -0
- package/dist/components/content-area/rtc-toolcall-card.d.ts.map +1 -0
- package/dist/components/content-area/rtc-toolcall-card.styles.d.ts +2 -0
- package/dist/components/content-area/rtc-toolcall-card.styles.d.ts.map +1 -0
- package/dist/components/content-area/rtc-toolcall-reply.d.ts +65 -0
- package/dist/components/content-area/rtc-toolcall-reply.d.ts.map +1 -0
- package/dist/components/content-area/rtc-toolcall-reply.styles.d.ts +2 -0
- package/dist/components/content-area/rtc-toolcall-reply.styles.d.ts.map +1 -0
- package/dist/components/content-area/rtc-user-message.d.ts +116 -0
- package/dist/components/content-area/rtc-user-message.d.ts.map +1 -0
- package/dist/components/content-area/rtc-user-message.styles.d.ts +22 -0
- package/dist/components/content-area/rtc-user-message.styles.d.ts.map +1 -0
- package/dist/components/content-area/timeline.styles.d.ts +2 -0
- package/dist/components/content-area/timeline.styles.d.ts.map +1 -0
- package/dist/components/content-wrapper/rtc-content-wrapper.d.ts +25 -0
- package/dist/components/content-wrapper/rtc-content-wrapper.d.ts.map +1 -0
- package/dist/components/content-wrapper/rtc-content-wrapper.styles.d.ts +2 -0
- package/dist/components/content-wrapper/rtc-content-wrapper.styles.d.ts.map +1 -0
- package/dist/components/drawer/rtc-drawer.d.ts +73 -0
- package/dist/components/drawer/rtc-drawer.d.ts.map +1 -0
- package/dist/components/drawer/rtc-drawer.styles.d.ts +15 -0
- package/dist/components/drawer/rtc-drawer.styles.d.ts.map +1 -0
- package/dist/components/editor-area/rtc-editor-area.d.ts +119 -0
- package/dist/components/editor-area/rtc-editor-area.d.ts.map +1 -0
- package/dist/components/editor-area/rtc-editor-area.styles.d.ts +8 -0
- package/dist/components/editor-area/rtc-editor-area.styles.d.ts.map +1 -0
- package/dist/components/editor-area/rtc-editor-tab.d.ts +84 -0
- package/dist/components/editor-area/rtc-editor-tab.d.ts.map +1 -0
- package/dist/components/editor-area/rtc-editor-tab.styles.d.ts +8 -0
- package/dist/components/editor-area/rtc-editor-tab.styles.d.ts.map +1 -0
- package/dist/components/editor-area/rtc-editor-toolbar.d.ts +68 -0
- package/dist/components/editor-area/rtc-editor-toolbar.d.ts.map +1 -0
- package/dist/components/editor-area/rtc-editor-toolbar.styles.d.ts +8 -0
- package/dist/components/editor-area/rtc-editor-toolbar.styles.d.ts.map +1 -0
- package/dist/components/empty-state/rtc-empty-state.d.ts +24 -0
- package/dist/components/empty-state/rtc-empty-state.d.ts.map +1 -0
- package/dist/components/empty-state/rtc-empty-state.styles.d.ts +2 -0
- package/dist/components/empty-state/rtc-empty-state.styles.d.ts.map +1 -0
- package/dist/components/file-explorer/rtc-file-explorer.d.ts +94 -0
- package/dist/components/file-explorer/rtc-file-explorer.d.ts.map +1 -0
- package/dist/components/file-explorer/rtc-file-explorer.styles.d.ts +8 -0
- package/dist/components/file-explorer/rtc-file-explorer.styles.d.ts.map +1 -0
- package/dist/components/file-explorer/rtc-file-tree-item.d.ts +70 -0
- package/dist/components/file-explorer/rtc-file-tree-item.d.ts.map +1 -0
- package/dist/components/file-explorer/rtc-file-tree-item.styles.d.ts +8 -0
- package/dist/components/file-explorer/rtc-file-tree-item.styles.d.ts.map +1 -0
- package/dist/components/input-area/rtc-input-area.d.ts +167 -0
- package/dist/components/input-area/rtc-input-area.d.ts.map +1 -0
- package/dist/components/input-area/rtc-input-area.styles.d.ts +2 -0
- package/dist/components/input-area/rtc-input-area.styles.d.ts.map +1 -0
- package/dist/components/login/rtc-login-dialog.d.ts +54 -0
- package/dist/components/login/rtc-login-dialog.d.ts.map +1 -0
- package/dist/components/login/rtc-login-dialog.styles.d.ts +2 -0
- package/dist/components/login/rtc-login-dialog.styles.d.ts.map +1 -0
- package/dist/components/login/rtc-login-page.d.ts +39 -0
- package/dist/components/login/rtc-login-page.d.ts.map +1 -0
- package/dist/components/login/rtc-login-page.styles.d.ts +2 -0
- package/dist/components/login/rtc-login-page.styles.d.ts.map +1 -0
- package/dist/components/logo/rtc-logo.d.ts +38 -0
- package/dist/components/logo/rtc-logo.d.ts.map +1 -0
- package/dist/components/markdown-editor/rtc-markdown-editor.d.ts +87 -0
- package/dist/components/markdown-editor/rtc-markdown-editor.d.ts.map +1 -0
- package/dist/components/markdown-editor/rtc-markdown-editor.styles.d.ts +2 -0
- package/dist/components/markdown-editor/rtc-markdown-editor.styles.d.ts.map +1 -0
- package/dist/components/notice-bar/rtc-notice-bar.d.ts +23 -0
- package/dist/components/notice-bar/rtc-notice-bar.d.ts.map +1 -0
- package/dist/components/notice-bar/rtc-notice-bar.styles.d.ts +2 -0
- package/dist/components/notice-bar/rtc-notice-bar.styles.d.ts.map +1 -0
- package/dist/components/overlay/rtc-ask-user.d.ts +91 -0
- package/dist/components/overlay/rtc-ask-user.d.ts.map +1 -0
- package/dist/components/overlay/rtc-ask-user.styles.d.ts +11 -0
- package/dist/components/overlay/rtc-ask-user.styles.d.ts.map +1 -0
- package/dist/components/overlay/rtc-command-panel.d.ts +44 -0
- package/dist/components/overlay/rtc-command-panel.d.ts.map +1 -0
- package/dist/components/overlay/rtc-command-panel.styles.d.ts +2 -0
- package/dist/components/overlay/rtc-command-panel.styles.d.ts.map +1 -0
- package/dist/components/overlay/rtc-mode-panel.d.ts +30 -0
- package/dist/components/overlay/rtc-mode-panel.d.ts.map +1 -0
- package/dist/components/overlay/rtc-mode-panel.styles.d.ts +2 -0
- package/dist/components/overlay/rtc-mode-panel.styles.d.ts.map +1 -0
- package/dist/components/overlay/rtc-overlay-manager.d.ts +30 -0
- package/dist/components/overlay/rtc-overlay-manager.d.ts.map +1 -0
- package/dist/components/overlay/rtc-overlay-manager.styles.d.ts +2 -0
- package/dist/components/overlay/rtc-overlay-manager.styles.d.ts.map +1 -0
- package/dist/components/overlay/rtc-restore-confirm.d.ts +37 -0
- package/dist/components/overlay/rtc-restore-confirm.d.ts.map +1 -0
- package/dist/components/overlay/rtc-restore-confirm.styles.d.ts +2 -0
- package/dist/components/overlay/rtc-restore-confirm.styles.d.ts.map +1 -0
- package/dist/components/overlay/rtc-scenario-panel.d.ts +33 -0
- package/dist/components/overlay/rtc-scenario-panel.d.ts.map +1 -0
- package/dist/components/overlay/rtc-scenario-panel.styles.d.ts +2 -0
- package/dist/components/overlay/rtc-scenario-panel.styles.d.ts.map +1 -0
- package/dist/components/overlay/rtc-session-panel.d.ts +39 -0
- package/dist/components/overlay/rtc-session-panel.d.ts.map +1 -0
- package/dist/components/overlay/rtc-session-panel.styles.d.ts +2 -0
- package/dist/components/overlay/rtc-session-panel.styles.d.ts.map +1 -0
- package/dist/components/overlay/rtc-toast.d.ts +51 -0
- package/dist/components/overlay/rtc-toast.d.ts.map +1 -0
- package/dist/components/overlay/rtc-todo-panel.d.ts +23 -0
- package/dist/components/overlay/rtc-todo-panel.d.ts.map +1 -0
- package/dist/components/overlay/rtc-todo-panel.styles.d.ts +2 -0
- package/dist/components/overlay/rtc-todo-panel.styles.d.ts.map +1 -0
- package/dist/components/overlay/rtc-tool-confirm.d.ts +30 -0
- package/dist/components/overlay/rtc-tool-confirm.d.ts.map +1 -0
- package/dist/components/overlay/rtc-tool-confirm.styles.d.ts +2 -0
- package/dist/components/overlay/rtc-tool-confirm.styles.d.ts.map +1 -0
- package/dist/components/rtc-agent/helpers/bus-handler.d.ts +79 -0
- package/dist/components/rtc-agent/helpers/bus-handler.d.ts.map +1 -0
- package/dist/components/rtc-agent/helpers/command-handler.d.ts +17 -0
- package/dist/components/rtc-agent/helpers/command-handler.d.ts.map +1 -0
- package/dist/components/rtc-agent/helpers/connection-setup.d.ts +92 -0
- package/dist/components/rtc-agent/helpers/connection-setup.d.ts.map +1 -0
- package/dist/components/rtc-agent/helpers/dialog-helpers.d.ts +51 -0
- package/dist/components/rtc-agent/helpers/dialog-helpers.d.ts.map +1 -0
- package/dist/components/rtc-agent/helpers/session-loader.d.ts +67 -0
- package/dist/components/rtc-agent/helpers/session-loader.d.ts.map +1 -0
- package/dist/components/rtc-agent/helpers/vfs-operations.d.ts +136 -0
- package/dist/components/rtc-agent/helpers/vfs-operations.d.ts.map +1 -0
- package/dist/components/rtc-agent/rtc-agent.d.ts +702 -0
- package/dist/components/rtc-agent/rtc-agent.d.ts.map +1 -0
- package/dist/components/rtc-agent/rtc-agent.styles.d.ts +16 -0
- package/dist/components/rtc-agent/rtc-agent.styles.d.ts.map +1 -0
- package/dist/components/session-header/rtc-session-header.d.ts +77 -0
- package/dist/components/session-header/rtc-session-header.d.ts.map +1 -0
- package/dist/components/session-header/rtc-session-header.styles.d.ts +2 -0
- package/dist/components/session-header/rtc-session-header.styles.d.ts.map +1 -0
- package/dist/components/session-tree/rtc-session-tab-bar.d.ts +43 -0
- package/dist/components/session-tree/rtc-session-tab-bar.d.ts.map +1 -0
- package/dist/components/session-tree/rtc-session-tab-bar.styles.d.ts +10 -0
- package/dist/components/session-tree/rtc-session-tab-bar.styles.d.ts.map +1 -0
- package/dist/components/session-tree/rtc-session-tab.d.ts +33 -0
- package/dist/components/session-tree/rtc-session-tab.d.ts.map +1 -0
- package/dist/components/session-tree/rtc-session-tab.styles.d.ts +11 -0
- package/dist/components/session-tree/rtc-session-tab.styles.d.ts.map +1 -0
- package/dist/components/session-tree/rtc-session-tree-item.d.ts +42 -0
- package/dist/components/session-tree/rtc-session-tree-item.d.ts.map +1 -0
- package/dist/components/session-tree/rtc-session-tree-item.styles.d.ts +11 -0
- package/dist/components/session-tree/rtc-session-tree-item.styles.d.ts.map +1 -0
- package/dist/components/session-tree/rtc-session-tree.d.ts +71 -0
- package/dist/components/session-tree/rtc-session-tree.d.ts.map +1 -0
- package/dist/components/session-tree/rtc-session-tree.styles.d.ts +10 -0
- package/dist/components/session-tree/rtc-session-tree.styles.d.ts.map +1 -0
- package/dist/components/settings/rtc-settings-panel.d.ts +27 -0
- package/dist/components/settings/rtc-settings-panel.d.ts.map +1 -0
- package/dist/components/settings/rtc-settings-panel.styles.d.ts +8 -0
- package/dist/components/settings/rtc-settings-panel.styles.d.ts.map +1 -0
- package/dist/components/settings-layout/rtc-settings-layout.d.ts +74 -0
- package/dist/components/settings-layout/rtc-settings-layout.d.ts.map +1 -0
- package/dist/components/settings-layout/rtc-settings-layout.styles.d.ts +8 -0
- package/dist/components/settings-layout/rtc-settings-layout.styles.d.ts.map +1 -0
- package/dist/components/settings-layout/rtc-settings-nav.d.ts +62 -0
- package/dist/components/settings-layout/rtc-settings-nav.d.ts.map +1 -0
- package/dist/components/settings-layout/rtc-settings-nav.styles.d.ts +7 -0
- package/dist/components/settings-layout/rtc-settings-nav.styles.d.ts.map +1 -0
- package/dist/components/status-bar/rtc-status-bar.d.ts +39 -0
- package/dist/components/status-bar/rtc-status-bar.d.ts.map +1 -0
- package/dist/components/status-bar/rtc-status-bar.styles.d.ts +11 -0
- package/dist/components/status-bar/rtc-status-bar.styles.d.ts.map +1 -0
- package/dist/components/title-bar/rtc-title-bar.d.ts +46 -0
- package/dist/components/title-bar/rtc-title-bar.d.ts.map +1 -0
- package/dist/components/title-bar/rtc-title-bar.styles.d.ts +2 -0
- package/dist/components/title-bar/rtc-title-bar.styles.d.ts.map +1 -0
- package/dist/components/token-usage/rtc-token-usage.d.ts +60 -0
- package/dist/components/token-usage/rtc-token-usage.d.ts.map +1 -0
- package/dist/config/auth.d.ts +52 -0
- package/dist/config/auth.d.ts.map +1 -0
- package/dist/contexts/activity.d.ts +42 -0
- package/dist/contexts/activity.d.ts.map +1 -0
- package/dist/contexts/auth.d.ts +28 -0
- package/dist/contexts/auth.d.ts.map +1 -0
- package/dist/contexts/editor.d.ts +43 -0
- package/dist/contexts/editor.d.ts.map +1 -0
- package/dist/contexts/file-explorer.d.ts +48 -0
- package/dist/contexts/file-explorer.d.ts.map +1 -0
- package/dist/contexts/logo.d.ts +21 -0
- package/dist/contexts/logo.d.ts.map +1 -0
- package/dist/contexts/message.d.ts +22 -0
- package/dist/contexts/message.d.ts.map +1 -0
- package/dist/contexts/mode.d.ts +18 -0
- package/dist/contexts/mode.d.ts.map +1 -0
- package/dist/contexts/notification.d.ts +21 -0
- package/dist/contexts/notification.d.ts.map +1 -0
- package/dist/contexts/session-tab.d.ts +10 -0
- package/dist/contexts/session-tab.d.ts.map +1 -0
- package/dist/contexts/session-tree.d.ts +10 -0
- package/dist/contexts/session-tree.d.ts.map +1 -0
- package/dist/contexts/session.d.ts +16 -0
- package/dist/contexts/session.d.ts.map +1 -0
- package/dist/contexts/settings.d.ts +40 -0
- package/dist/contexts/settings.d.ts.map +1 -0
- package/dist/contexts/skill.d.ts +27 -0
- package/dist/contexts/skill.d.ts.map +1 -0
- package/dist/contexts/tool-call.d.ts +16 -0
- package/dist/contexts/tool-call.d.ts.map +1 -0
- package/dist/contexts/turn-count.d.ts +23 -0
- package/dist/contexts/turn-count.d.ts.map +1 -0
- package/dist/contexts/window-state.d.ts +20 -0
- package/dist/contexts/window-state.d.ts.map +1 -0
- package/dist/controllers/activity.controller.d.ts +45 -0
- package/dist/controllers/activity.controller.d.ts.map +1 -0
- package/dist/controllers/auth.controller.d.ts +202 -0
- package/dist/controllers/auth.controller.d.ts.map +1 -0
- package/dist/controllers/editor-area.controller.d.ts +119 -0
- package/dist/controllers/editor-area.controller.d.ts.map +1 -0
- package/dist/controllers/editor.controller.d.ts +29 -0
- package/dist/controllers/editor.controller.d.ts.map +1 -0
- package/dist/controllers/file-explorer.controller.d.ts +42 -0
- package/dist/controllers/file-explorer.controller.d.ts.map +1 -0
- package/dist/controllers/fork.controller.d.ts +63 -0
- package/dist/controllers/fork.controller.d.ts.map +1 -0
- package/dist/controllers/message.controller.d.ts +182 -0
- package/dist/controllers/message.controller.d.ts.map +1 -0
- package/dist/controllers/mode.controller.d.ts +26 -0
- package/dist/controllers/mode.controller.d.ts.map +1 -0
- package/dist/controllers/notification.controller.d.ts +101 -0
- package/dist/controllers/notification.controller.d.ts.map +1 -0
- package/dist/controllers/persistence.controller.d.ts +128 -0
- package/dist/controllers/persistence.controller.d.ts.map +1 -0
- package/dist/controllers/session-tab.controller.d.ts +82 -0
- package/dist/controllers/session-tab.controller.d.ts.map +1 -0
- package/dist/controllers/session-tree.controller.d.ts +44 -0
- package/dist/controllers/session-tree.controller.d.ts.map +1 -0
- package/dist/controllers/session.controller.d.ts +58 -0
- package/dist/controllers/session.controller.d.ts.map +1 -0
- package/dist/controllers/settings.controller.d.ts +46 -0
- package/dist/controllers/settings.controller.d.ts.map +1 -0
- package/dist/controllers/skill.controller.d.ts +81 -0
- package/dist/controllers/skill.controller.d.ts.map +1 -0
- package/dist/controllers/status-bar.controller.d.ts +32 -0
- package/dist/controllers/status-bar.controller.d.ts.map +1 -0
- package/dist/controllers/toast.controller.d.ts +29 -0
- package/dist/controllers/toast.controller.d.ts.map +1 -0
- package/dist/controllers/tool-call.controller.d.ts +38 -0
- package/dist/controllers/tool-call.controller.d.ts.map +1 -0
- package/dist/controllers/window-interaction.controller.d.ts +128 -0
- package/dist/controllers/window-interaction.controller.d.ts.map +1 -0
- package/dist/controllers/window-state.controller.d.ts +79 -0
- package/dist/controllers/window-state.controller.d.ts.map +1 -0
- package/dist/core/builtin-system-group.d.ts +66 -0
- package/dist/core/builtin-system-group.d.ts.map +1 -0
- package/dist/core/event-bus.d.ts +133 -0
- package/dist/core/event-bus.d.ts.map +1 -0
- package/dist/core/function-registry.d.ts +185 -0
- package/dist/core/function-registry.d.ts.map +1 -0
- package/dist/core/i18n.d.ts +25 -0
- package/dist/core/i18n.d.ts.map +1 -0
- package/dist/core/locale-controller.d.ts +25 -0
- package/dist/core/locale-controller.d.ts.map +1 -0
- package/dist/core/markdown-generator.d.ts +36 -0
- package/dist/core/markdown-generator.d.ts.map +1 -0
- package/dist/core/ready.d.ts +33 -0
- package/dist/core/ready.d.ts.map +1 -0
- package/dist/core/scenario-loader.d.ts +56 -0
- package/dist/core/scenario-loader.d.ts.map +1 -0
- package/dist/core/theme.d.ts +29 -0
- package/dist/core/theme.d.ts.map +1 -0
- package/dist/debug-api-core.d.ts +9 -0
- package/dist/debug-api-core.d.ts.map +1 -0
- package/dist/debug-api-ext.d.ts +16 -0
- package/dist/debug-api-ext.d.ts.map +1 -0
- package/dist/debug-api-helpers.d.ts +28 -0
- package/dist/debug-api-helpers.d.ts.map +1 -0
- package/dist/debug-api-types.d.ts +206 -0
- package/dist/debug-api-types.d.ts.map +1 -0
- package/dist/debug-api.d.ts +10 -0
- package/dist/debug-api.d.ts.map +1 -0
- package/dist/elements.d.ts +26 -0
- package/dist/elements.d.ts.map +1 -0
- package/dist/{en-US-B3u0M1QC.js → en-US-BK61Z8gy.js} +1 -1
- package/dist/factory.d.ts +68 -0
- package/dist/factory.d.ts.map +1 -0
- package/dist/{highlight-languages-Do4vG6hX.js → highlight-languages-8EK0uwTA.js} +1 -1
- package/dist/icons/icons.d.ts +93 -0
- package/dist/icons/icons.d.ts.map +1 -0
- package/dist/icons/index.d.ts +8 -0
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/icons/logo.d.ts +15 -0
- package/dist/icons/logo.d.ts.map +1 -0
- package/dist/{index-TrHSQq--.js → index-Bd4j91y1.js} +4 -4
- package/dist/index.d.ts +114 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/locales/en-US.d.ts +4 -0
- package/dist/locales/en-US.d.ts.map +1 -0
- package/dist/main.d.ts +17 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/master-lock.d.ts +72 -0
- package/dist/master-lock.d.ts.map +1 -0
- package/dist/registry.d.ts +2 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/repositories/index.d.ts +8 -0
- package/dist/repositories/index.d.ts.map +1 -0
- package/dist/repositories/message.repository.d.ts +182 -0
- package/dist/repositories/message.repository.d.ts.map +1 -0
- package/dist/stats.html +1 -1
- package/dist/storage.d.ts +11 -0
- package/dist/storage.d.ts.map +1 -0
- package/dist/styles/base.d.ts +8 -0
- package/dist/styles/base.d.ts.map +1 -0
- package/dist/styles/index.d.ts +5 -0
- package/dist/styles/index.d.ts.map +1 -0
- package/dist/styles/themes/dark.d.ts +2 -0
- package/dist/styles/themes/dark.d.ts.map +1 -0
- package/dist/styles/themes/light.d.ts +2 -0
- package/dist/styles/themes/light.d.ts.map +1 -0
- package/dist/styles/tokens.d.ts +22 -0
- package/dist/styles/tokens.d.ts.map +1 -0
- package/dist/types/activity-bar-config.d.ts +38 -0
- package/dist/types/activity-bar-config.d.ts.map +1 -0
- package/dist/types/agent-config.d.ts +61 -0
- package/dist/types/agent-config.d.ts.map +1 -0
- package/dist/types/events.d.ts +56 -0
- package/dist/types/events.d.ts.map +1 -0
- package/dist/types/factory.d.ts +602 -0
- package/dist/types/factory.d.ts.map +1 -0
- package/dist/types/index.d.ts +391 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/skill.d.ts +195 -0
- package/dist/types/skill.d.ts.map +1 -0
- package/dist/types/window-config.d.ts +122 -0
- package/dist/types/window-config.d.ts.map +1 -0
- package/dist/utils/clipboard.d.ts +14 -0
- package/dist/utils/clipboard.d.ts.map +1 -0
- package/dist/utils/command-parser.d.ts +33 -0
- package/dist/utils/command-parser.d.ts.map +1 -0
- package/dist/utils/content-data.d.ts +113 -0
- package/dist/utils/content-data.d.ts.map +1 -0
- package/dist/utils/custom-scrollbar.d.ts +41 -0
- package/dist/utils/custom-scrollbar.d.ts.map +1 -0
- package/dist/utils/device.d.ts +22 -0
- package/dist/utils/device.d.ts.map +1 -0
- package/dist/utils/floating-panel-controller.d.ts +52 -0
- package/dist/utils/floating-panel-controller.d.ts.map +1 -0
- package/dist/utils/format.d.ts +27 -0
- package/dist/utils/format.d.ts.map +1 -0
- package/dist/utils/highlight-languages.d.ts +9 -0
- package/dist/utils/highlight-languages.d.ts.map +1 -0
- package/dist/utils/message-skeleton.d.ts +39 -0
- package/dist/utils/message-skeleton.d.ts.map +1 -0
- package/dist/utils/message-virtual-scroll.d.ts +595 -0
- package/dist/utils/message-virtual-scroll.d.ts.map +1 -0
- package/dist/utils/relative-time.d.ts +14 -0
- package/dist/utils/relative-time.d.ts.map +1 -0
- package/dist/utils/scroll-saver.d.ts +34 -0
- package/dist/utils/scroll-saver.d.ts.map +1 -0
- package/dist/utils/skeleton-tracker.d.ts +144 -0
- package/dist/utils/skeleton-tracker.d.ts.map +1 -0
- package/dist/utils/visibility-manager.d.ts +103 -0
- package/dist/utils/visibility-manager.d.ts.map +1 -0
- package/dist/utils.d.ts +5 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/validation/index.d.ts +53 -0
- package/dist/validation/index.d.ts.map +1 -0
- package/dist/validation/openapi-to-zod.d.ts +15 -0
- package/dist/validation/openapi-to-zod.d.ts.map +1 -0
- package/dist/validation/zod-to-openapi.d.ts +56 -0
- package/dist/validation/zod-to-openapi.d.ts.map +1 -0
- package/dist/worker-bridge.d.ts +141 -0
- package/dist/worker-bridge.d.ts.map +1 -0
- package/package.json +6 -6
package/dist/index.umd.js
CHANGED
|
@@ -3265,7 +3265,7 @@ Name: ${r}
|
|
|
3265
3265
|
|
|
3266
3266
|
You can now run this script using:
|
|
3267
3267
|
- action: "run", name: "${r}"
|
|
3268
|
-
- Or reference it by path: ${s}`}}catch(s){return{success:!1,error:`Failed to save script: ${s instanceof Error?s.message:String(s)}`}}}async _runScript(e){const r=ai(e,"name");if(!r)return{success:!1,error:"name is required for run action"};const n=e.params||{},i=eo(e,"timeout")??3e4,s=ai(e,"title")??void 0;return this._executeCode(r,n,i,void 0,s)}async _evalScript(e){const r=ai(e,"code");if(!r)return{success:!1,error:"code is required for eval action"};const n=e.params||{},i=eo(e,"timeout")??3e4,s=ai(e,"title")??void 0;return this._executeCode(void 0,n,i,r,s)}async _executeCode(e,r,n,i,s){if(!this.rtcAgent)return{success:!1,error:"rtcAgent not initialized. Pass rtcAgent to ScriptTool constructor."};try{let a;if(i!==void 0)a=i;else{const k=`/scripts/${e}.ts`,A=await Wr.read(k);a=hj(A).code}const l={logs:[],warns:[],errors:[]},c=cj(this.rtcAgent,r,l,s||void 0),u=performance.now(),d=await yj(a,c,n,e),m=Math.round(performance.now()-u),y={};e&&(y.name=e),d!==void 0&&(y.result=d);const _=100;return l.logs.length>0&&(y.logs=l.logs.slice(0,_)),l.warns.length>0&&(y.warnings=l.warns.slice(0,_)),l.errors.length>0&&(y.errors=l.errors.slice(0,_)),y.duration_ms=m,{success:!0,data:y}}catch(a){return a instanceof Error&&"isScriptTimeout"in a?{success:!1,error:a.message}:a instanceof Error&&"isScriptCompileError"in a?{success:!1,error:`Script compile error: ${a.message}`}:{success:!1,error:`Script execution failed: ${a instanceof Error?a.message:String(a)}`}}}}function Ej(t){return[new vj,new _j,new xj,new Sj,new wj,new Tj,new lI(t)]}class Aj{constructor(e){fr(this,"tools",new Map);const r=Ej(e);for(const n of r)this.register(n)}setRtcAgent(e){this.register(new lI(e))}register(e){this.tools.set(e.name,e)}get(e){return this.tools.get(e)}has(e){return this.tools.has(e)}getToolNames(){return Array.from(this.tools.keys())}async execute(e,r){const n=this.tools.get(e);if(!n)throw new Error(`Tool not found: ${e}`);return n.execute(r)}}const cI=new Aj,Si=ar("RtcProcessor"),Pj=1e3,uI=10;class Cj{constructor(e){fr(this,"persistence");fr(this,"processing",!1);fr(this,"pendingCheck",!1);fr(this,"retryCountMap",new Map);fr(this,"mode","edit");fr(this,"confirmDialog");fr(this,"askUserDialog");fr(this,"master");fr(this,"_lastSilentlySkippedRtcId");this.persistence=e}setMode(e){this.mode=e}getMode(){return this.mode}setConfirmDialog(e){this.confirmDialog=e}setAskUserDialog(e){this.askUserDialog=e}setMaster(e){this.master=e}_isMasterAllowed(){return this.master===void 0||this.master.isMaster}async onRtcUpdate(){if(Si.debug("onRtcUpdate called, processing:",this.processing),this.processing){this.pendingCheck=!0;return}await this.processLoop()}async processLoop(){if(!this._isMasterAllowed()){Si.debug("processLoop: not master, skipping");return}this.processing=!0,Si.debug("processLoop started"),this._lastSilentlySkippedRtcId=void 0;try{for(;;){this.pendingCheck=!1;const e=await this.persistence.getNextRtcToProcess(void 0);if(!e){if(Si.debug("processLoop: no more RTC to process, exiting"),this.pendingCheck)continue;break}if(e.client_id===this._lastSilentlySkippedRtcId){Si.warn(`processLoop: RTC ${e.client_id} returned again after silent skip, exiting loop to prevent infinite retry`);break}Si.debug("processing RTC:",e.client_id,"tool:",e.tool_name,"sync_status:",e.sync_status);try{await this.processOne(e),Si.debug("processOne completed successfully")}catch(r){Si.error("processOne failed:",r);const n=r instanceof Error?r.message:String(r);if(n.includes("connection")||n.includes("disconnected")){Si.warn("connection error detected, exiting processLoop");break}await this.sleep(Pj)}}}finally{this.processing=!1,Si.debug("processLoop finished")}}async processOne(e){if(e.sync_status==="failed"){const r=this.retryCountMap.get(e.client_id)||0;if(r>=uI){Si.error(`RTC ${e.client_id} exceeded max submit retry count (${uI}), abandoning. The RTC remains in sync_status='failed' and will be retried on the next onRtcUpdate cycle.`),this.retryCountMap.delete(e.client_id),this._lastSilentlySkippedRtcId=e.client_id;return}const n=this.calculateBackoff(r);await this.sleep(n);try{await this.persistence.submitRtcResult({rtcClientId:e.client_id,success:e.status==="completed",result:e.result,error:e.error_message}),this.retryCountMap.delete(e.client_id)}catch(i){throw this.retryCountMap.set(e.client_id,r+1),i}}else{const r=e.tool_name;if(r==="askUser"){await this.processAskUser(e);return}const n=_N.needsConfirm(r,this.mode);let i=!0;if(n&&(i=await this.showConfirmDialog(e)),!i){try{await this.persistence.submitRtcResult({rtcClientId:e.client_id,success:!1,error:"User denied"})}catch(c){Si.error("submitRtcResult (denied) failed:",c)}return}let s,a=!0,l;try{const c=e.parameters||{},u=await cI.execute(r,c);s=u.data,u.success||(a=!1,l=u.error)}catch(c){a=!1,l=c instanceof Error?c.message:String(c)}try{await this.persistence.submitRtcResult({rtcClientId:e.client_id,success:a,result:s,error:l})}catch(c){Si.error("submitRtcResult failed:",c)}}}async processAskUser(e){if(!this.askUserDialog){Si.warn("askUserDialog not set, defaulting to reject");try{await this.persistence.submitRtcResult({rtcClientId:e.client_id,success:!1,error:"User declined to answer questions"})}catch(n){Si.error("submitRtcResult (ask_user no dialog) failed:",n)}return}let r;try{r=await this.askUserDialog(e)}catch(n){Si.error("askUserDialog threw:",n);try{await this.persistence.submitRtcResult({rtcClientId:e.client_id,success:!1,error:n instanceof Error?n.message:String(n)})}catch(i){Si.error("submitRtcResult (ask_user error) failed:",i)}return}try{r===null?await this.persistence.submitRtcResult({rtcClientId:e.client_id,success:!1,error:"User declined to answer questions"}):await this.persistence.submitRtcResult({rtcClientId:e.client_id,success:!0,result:r})}catch(n){Si.error("submitRtcResult (ask_user) failed:",n)}}calculateBackoff(e){return Math.min(1e3*Math.pow(2,e),3e4)}sleep(e){return new Promise(r=>setTimeout(r,e))}async showConfirmDialog(e){return this.confirmDialog?this.confirmDialog(e):(Si.warn("confirmDialog not set, defaulting to reject"),!1)}}function dI(t){return new SharedWorker(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/shared-worker-BEaT-a-g.js").href:new URL("assets/shared-worker-BEaT-a-g.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.tagName.toUpperCase()==="SCRIPT"&&document.currentScript.src||document.baseURI).href),{name:t==null?void 0:t.name})}const Ra=ar("WorkerBridge");function kj(t){const e=t.toString(),r=e.match(/new URL\(\s*(["'`])([^"'`]+)\1/);if(r)return r[2];const n=e.match(/new SharedWorker\(\s*(["'`])([^"'`]+)\1/);if(n)return n[2];throw new Error("[WorkerBridge] Cannot extract worker URL from factory. Source: "+e.slice(0,300))}const po=class po{constructor(e,r={}){this._auth=e,this._worker=null,this._core=null,this._initialized=!1,this._connectionListeners=new Set,this._config=r,this._callbacks={onUIUpdate:n=>{Pd().publish(n)},requestToken:async()=>{const n=await this._auth.getAccessTokenAsync();if(!n)throw new Error("[WorkerBridge] no access token available");return n},requestTokenRefresh:()=>this._auth.handleTokenExpired(),onConnectionStateChange:n=>{for(const i of this._connectionListeners)try{i(n)}catch(s){Ra.error("connection listener error:",s)}},onGapFillState:n=>{console.log("[BulkUpdate] WorkerBridge.onGapFillState called, isSyncing:",n);const i=Pd();n?i.emitGapFillStart():i.emitGapFillEnd()}},this._proxiedCallbacks=T2(this._callbacks)}async initWorker(){let e=null;for(let r=0;r<=po.MAX_INIT_RETRIES;r++)try{r>0&&(Ra.warn(`Retrying worker initialization (attempt ${r+1}/${po.MAX_INIT_RETRIES+1})...`),await this._delay(po.INIT_RETRY_DELAY_MS*r)),await this._initWorkerOnce(),await this._verifyWorkerAlive();return}catch(n){e=n instanceof Error?n:new Error(String(n)),Ra.error(`Worker initialization attempt ${r+1} failed:`,e.message),this._cleanupFailedWorker()}throw new Error(`[WorkerBridge] Failed to initialize SharedWorker after ${po.MAX_INIT_RETRIES+1} attempts: ${e==null?void 0:e.message}`)}async _initWorkerOnce(){if(this._config.workerUrl)Ra.info("Using custom workerUrl:",this._config.workerUrl),this._worker=new SharedWorker(this._config.workerUrl,{name:"rtc-agent-worker",type:"module"});else{const e=kj(dI),r=typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:ss&&ss.tagName.toUpperCase()==="SCRIPT"&&ss.src||new URL("index.umd.js",document.baseURI).href,n=new URL(e,r).href,i=window.location.origin;let s;try{s=new URL(n).origin}catch(l){Ra.debug("Failed to parse worker URL origin, assuming same-origin:",l),s=i}const a=s!==i;if(Ra.info("worker init:",{workerUrl:n,pageOrigin:i,workerOrigin:s,isCrossOrigin:a}),!a)this._worker=dI();else{let l;try{const d=await fetch(n,{cache:"no-store"});if(!d.ok)throw new Error(`HTTP ${d.status} ${d.statusText}`);l=await d.text()}catch(d){throw new Error(`[WorkerBridge] failed to fetch worker script from ${n}: ${d instanceof Error?d.message:d}`)}const c=new Blob([l],{type:"application/javascript"}),u=URL.createObjectURL(c);try{this._worker=new SharedWorker(u,{name:"rtc-agent-worker",type:"module"})}finally{URL.revokeObjectURL(u)}}}this._core=_2(this._worker.port),this._worker.onerror=e=>{Ra.error("SharedWorker error:",{message:e.message,filename:e.filename,lineno:e.lineno,colno:e.colno,error:e.error})},this._worker.port.onmessageerror=e=>{Ra.error("port message error:",e)}}async _verifyWorkerAlive(){if(!this._core)throw new Error("[WorkerBridge] No core available for verification");let e;const r=new Promise((n,i)=>{e=setTimeout(()=>i(new Error("Worker verification timed out")),po.VERIFICATION_TIMEOUT_MS)});try{const n=await Promise.race([this._core.ping(),r]);if(n!=="pong")throw new Error(`Unexpected ping response: ${n}`);Ra.info("Worker verification successful")}catch(n){throw new Error(`[WorkerBridge] Worker verification failed: ${n instanceof Error?n.message:"unknown error"}`)}finally{e!==void 0&&clearTimeout(e)}}_cleanupFailedWorker(){if(this._worker){try{this._worker.port.close()}catch{}this._worker=null}this._core=null}_delay(e){return new Promise(r=>setTimeout(r,e))}get core(){return this._core}async init(e){if(this._initialized){Ra.warn("already initialized");return}if(!this._worker||!this._core)throw new Error("[WorkerBridge] init() called before initWorker()");this._worker.port.start(),await this._core.init(e),await this._core.registerCallback(this._proxiedCallbacks),this._initialized=!0}async destroy(){if(this._initialized&&!(!this._worker||!this._core)){try{await this._core.unregisterCallback(this._proxiedCallbacks)}catch(e){Ra.warn("unregisterCallback failed:",e)}this._connectionListeners.clear(),this._worker.port.close(),this._initialized=!1}}async getConnectionState(){return this._core.getConnectionState()}onConnectionStateChange(e){return this._connectionListeners.add(e),()=>{this._connectionListeners.delete(e)}}installVirtualFSProxy(){const e=this._core;Wr.read=(r,n,i)=>e.virtualFSRead(r,n,i),Wr.write=(r,n,i="overwrite",s)=>e.virtualFSWrite(r,n,i,s),Wr.ls=r=>e.virtualFSLs(r),Wr.find=(r,n)=>e.virtualFSFind(r,n),Wr.grep=(r,n,i,s)=>e.virtualFSGrep(r,n,i,s),Wr.queryByType=r=>e.virtualFSQueryByType(r),Wr.exists=r=>e.virtualFSExists(r),Wr.remove=r=>e.virtualFSRemove(r)}};po.MAX_INIT_RETRIES=3,po.INIT_RETRY_DELAY_MS=1e3,po.VERIFICATION_TIMEOUT_MS=5e3;let p1=po;const Sp=ar("MasterLock");class Ij{constructor(e){this._isMaster=!1,this._controlled=!1,this._lockName=`rtc-agent-master-${e}`}get isMaster(){return this._isMaster}get isControlled(){return this._controlled}async acquire(){var e;if(this._controlled){Sp.warn("already acquiring/acquired, ignoring");return}if(!this._isWebLocksAvailable()){Sp.warn("Web Locks API not available, acting as always-master"),this._isMaster=!0,this._controlled=!0,(e=this.onAcquire)==null||e.call(this);return}this._controlled=!0,this._abortController=new AbortController,navigator.locks.request(this._lockName,{signal:this._abortController.signal},async()=>{var r,n;this._isMaster=!0,Sp.info("acquired lock → became Master"),(r=this.onAcquire)==null||r.call(this),await new Promise(i=>{this._releaseResolve=i}),this._isMaster=!1,Sp.info("released lock → lost Master"),(n=this.onRelease)==null||n.call(this)}).catch(r=>{r instanceof DOMException&&r.name==="AbortError"||Sp.error("lock request error:",r)})}release(){this._controlled&&(this._releaseResolve&&(this._releaseResolve(),this._releaseResolve=void 0),!this._isMaster&&this._abortController&&this._abortController.abort(),this._controlled=!1)}_isWebLocksAvailable(){return typeof navigator<"u"&&"locks"in navigator}}const Ba=ar("PersistenceController");function VJ(t){return t}class Oj{constructor(e){this._core=e}async connect(){Ba.info("connect() called"),await this._core.connect(),Ba.info("connect() completed, worker state:",await this._core.getConnectionState())}disconnect(){this._core.disconnect()}async reconnect(){await this._core.reconnect()}async listSessions(e,r){return this._core.listSessions(e,r)}async getSession(e){return this._core.getSession(e)}async listMessages(e,r,n,i){return this._core.listMessages(e,r,n,i)}async getMessage(e){return this._core.getMessage(e)}async listRtc(e,r,n){return this._core.listRtc(e,r,n)}async getNextRtcToProcess(e){return this._core.getNextRtcToProcess(e)}async sendMessage(e){return this._core.sendMessage(e)}async insertLocalMessage(e){return this._core.insertLocalMessage(e)}async stopTurn(e){return this._core.stopTurn(e)}async closeSession(e){return this._core.closeSession(e)}async openSession(e){return this._core.openSession(e)}async compactSession(e,r){return this._core.compactSession(e,r)}async submitRtcResult(e){return this._core.submitRtcResult(e)}async forkSession(e){return this._core.forkSession(e)}async deleteSession(e){return this._core.deleteSession(e)}async updateSessionTitle(e,r){return this._core.updateSessionTitle(e,r)}async close(){await this._core.close()}async flushAll(){return this._core.flushAll()}async initializeVirtualFS(e){await this._core.initializeVirtualFS(e??{})}getClient(){throw new Error("[WorkerPersistenceAdapter] getClient() is not available. Use PersistenceController.onConnectionStateChange() instead.")}getOffsetManager(){return{reset:()=>this._core.resetOffset()}}getEntityRepository(){throw new Error("[WorkerPersistenceAdapter] getEntityRepository() is not available.")}}const Dl=class Dl{constructor(e,r){this._auth=r,e.addController(this)}set databaseName(e){this._databaseNameOverride=e}set workerUrl(e){this._workerUrl=e}get layer(){return this._layer}get isConnected(){return this._layer!==void 0}get workerBridge(){return this._workerBridge}get masterLock(){return this._masterLock}hostConnected(){}hostDisconnected(){this.disconnect()}async connect(){if(this._layer)return;if(this._connecting)return Ba.debug("connect() called while already connecting, awaiting existing attempt"),this._connecting;const e=h2(),r=this._auth.state.userId;if(!r)throw new Error("[PersistenceController] connect() called without userId; refusing to open a shared database");const n={databaseName:this._databaseNameOverride?`${this._databaseNameOverride}-${r}`:`rtc-agent-${r}`,deviceId:e,client:{endpoint:rl.wsEndpoint,getToken:async()=>{const i=await this._auth.getAccessTokenAsync();if(!i)throw Ba.warn("getToken: no access token available"),new Error("No access token available");return i},onTokenExpired:()=>this._auth.handleTokenExpired(),deviceId:e,userId:r}};return this._connecting=this._connectWorker(n).finally(()=>{this._connecting=void 0}),this._connecting}async _connectWorker(e){let r=null;for(let n=0;n<=Dl.MAX_CONNECT_RETRIES;n++)try{n>0&&(Ba.warn(`Retrying connection (attempt ${n+1}/${Dl.MAX_CONNECT_RETRIES+1})...`),await this._delay(Dl.CONNECT_RETRY_DELAY_MS*n)),await this._connectWorkerOnce(e);return}catch(i){r=i instanceof Error?i:new Error(String(i)),Ba.error(`Connection attempt ${n+1} failed:`,r.message),await this._cleanupFailedConnection()}throw new Error(`[PersistenceController] Failed to connect after ${Dl.MAX_CONNECT_RETRIES+1} attempts: ${r==null?void 0:r.message}`)}async _connectWorkerOnce(e){this._workerBridge=new p1(this._auth,{workerUrl:this._workerUrl}),await this._workerBridge.initWorker();const{getToken:r,onTokenExpired:n,...i}=e.client,s={...e,client:i};await this._workerBridge.init(s),this._workerBridge.installVirtualFSProxy(),this._layer=new Oj(this._workerBridge.core),await this._workerBridge.core.connect();const a=this._auth.state.userId;a&&(this._masterLock=new Ij(a),this._masterLock.onAcquire=()=>{Ba.info("this Tab became Master")},this._masterLock.onRelease=()=>{Ba.info("this Tab lost Master")},this._masterLock.acquire())}async _cleanupFailedConnection(){if(this._workerBridge){try{await this._workerBridge.destroy()}catch(e){Ba.debug("Cleanup after failed connection (non-critical):",e)}this._workerBridge=void 0}this._layer=void 0}_delay(e){return new Promise(r=>setTimeout(r,e))}async disconnect(){var e;if(this._layer){try{await this._layer.getOffsetManager().reset(),await this._layer.close()}catch(r){Ba.error("disconnect error:",r)}this._layer=void 0}if(this._workerBridge){(e=this._masterLock)==null||e.release(),this._masterLock=void 0;try{await this._workerBridge.destroy()}catch(r){Ba.error("WorkerBridge disconnect error:",r)}this._workerBridge=void 0}}async getConnectionState(){return this._workerBridge?this._workerBridge.getConnectionState():"disconnected"}onConnectionStateChange(e){return this._workerBridge?this._workerBridge.onConnectionStateChange(e):()=>{}}};Dl.MAX_CONNECT_RETRIES=2,Dl.CONNECT_RETRY_DELAY_MS=2e3;let f1=Dl;const pI=ar("EventBus");class fI{constructor(){this.handlers=new Map}on(e,r){return this.handlers.has(e)||this.handlers.set(e,new Set),this.handlers.get(e).add(r),()=>{var n;(n=this.handlers.get(e))==null||n.delete(r)}}once(e,r){const n=i=>(this.off(e,n),r(i));return this.on(e,n)}off(e,r){var n;(n=this.handlers.get(e))==null||n.delete(r)}emit(e,r){const n=this.handlers.get(e);if(!n)return;const i=Array.from(n);for(const s of i)try{s(r)}catch(a){pI.error(`Handler error for event '${e}':`,a)}}async emitAsync(e,r){const n=this.handlers.get(e);if(!n)return;const i=Array.from(n),s=[];for(const a of i)s.push(Promise.resolve(a(r)).catch(l=>{pI.error(`Async handler error for event '${e}':`,l)}));await Promise.all(s)}async emitAsyncStrict(e,r){const n=this.handlers.get(e);if(!n)return;const i=Array.from(n),s=[];for(const a of i)s.push(Promise.resolve(a(r)));await Promise.all(s)}clearAll(){this.handlers.clear()}clearEvent(e){this.handlers.delete(e)}}function hI(){return new fI}const ma=hI(),Nj=ar("SkillController");class mI{constructor(e,r){this._registry=null,this._config={},this._unsubscribes=[],this._host=e,this._config=r||{},e.addController(this)}get value(){return{registry:this._registry}}get actions(){return{getRegistry:()=>this._registry,setRegistry:e=>{this._registry=e,this._host.requestUpdate(),this._bridgeToolRegistry(e)}}}_bridgeToolRegistry(e){const r=new Proxy({callFunction:(n,i)=>e.execute(n,i),readFile:n=>Wr.read(n),writeFile:(n,i)=>Wr.write(n,i).then(()=>{}),listDir:n=>Wr.ls(n)},{get(n,i){return i in n?n[i]:e[i]}});cI.setRtcAgent(r),Nj.info("rtcAgent API bridged to ToolRegistry")}setConfig(e){this._config=e}hostConnected(){this._subscribeEvents()}hostDisconnected(){for(const e of this._unsubscribes)e();this._unsubscribes=[]}_subscribeEvents(){for(const n of this._unsubscribes)n();this._unsubscribes=[];const e=ma.on("ui:toast",n=>{this._config.onToast&&this._config.onToast(n.message,n.type)});this._unsubscribes.push(e);const r=ma.on("ui:confirm-request",n=>{this._config.onConfirmRequest&&this._config.onConfirmRequest(n.requestId,n.path,n.message)});this._unsubscribes.push(r)}respondToConfirm(e,r){ma.emit("ui:confirm-response",{requestId:e,confirmed:r})}}class Dj{constructor(e){this._toasts=[],this._timers=new Map,this._host=e,this._host.addController(this),this.actions={show:(r,n="info",i)=>this._show(r,n,i),remove:r=>this._remove(r)}}get toasts(){return this._toasts}hostConnected(){}hostDisconnected(){for(const e of this._timers.values())clearTimeout(e);this._timers.clear()}_show(e,r,n){const i=Date.now()+Math.random();this._toasts=[...this._toasts,{id:i,message:e,type:r,action:n}],this._host.requestUpdate();const s=r==="error"?0:r==="success"?2e3:2500;if(s>0){const a=setTimeout(()=>this._remove(i),s);this._timers.set(i,a)}}_remove(e){const r=this._timers.get(e);r!==void 0&&(clearTimeout(r),this._timers.delete(e)),this._toasts=this._toasts.filter(n=>n.id!==e),this._host.requestUpdate()}}/**
|
|
3268
|
+
- Or reference it by path: ${s}`}}catch(s){return{success:!1,error:`Failed to save script: ${s instanceof Error?s.message:String(s)}`}}}async _runScript(e){const r=ai(e,"name");if(!r)return{success:!1,error:"name is required for run action"};const n=e.params||{},i=eo(e,"timeout")??3e4,s=ai(e,"title")??void 0;return this._executeCode(r,n,i,void 0,s)}async _evalScript(e){const r=ai(e,"code");if(!r)return{success:!1,error:"code is required for eval action"};const n=e.params||{},i=eo(e,"timeout")??3e4,s=ai(e,"title")??void 0;return this._executeCode(void 0,n,i,r,s)}async _executeCode(e,r,n,i,s){if(!this.rtcAgent)return{success:!1,error:"rtcAgent not initialized. Pass rtcAgent to ScriptTool constructor."};try{let a;if(i!==void 0)a=i;else{const k=`/scripts/${e}.ts`,A=await Wr.read(k);a=hj(A).code}const l={logs:[],warns:[],errors:[]},c=cj(this.rtcAgent,r,l,s||void 0),u=performance.now(),d=await yj(a,c,n,e),m=Math.round(performance.now()-u),y={};e&&(y.name=e),d!==void 0&&(y.result=d);const _=100;return l.logs.length>0&&(y.logs=l.logs.slice(0,_)),l.warns.length>0&&(y.warnings=l.warns.slice(0,_)),l.errors.length>0&&(y.errors=l.errors.slice(0,_)),y.duration_ms=m,{success:!0,data:y}}catch(a){return a instanceof Error&&"isScriptTimeout"in a?{success:!1,error:a.message}:a instanceof Error&&"isScriptCompileError"in a?{success:!1,error:`Script compile error: ${a.message}`}:{success:!1,error:`Script execution failed: ${a instanceof Error?a.message:String(a)}`}}}}function Ej(t){return[new vj,new _j,new xj,new Sj,new wj,new Tj,new lI(t)]}class Aj{constructor(e){fr(this,"tools",new Map);const r=Ej(e);for(const n of r)this.register(n)}setRtcAgent(e){this.register(new lI(e))}register(e){this.tools.set(e.name,e)}get(e){return this.tools.get(e)}has(e){return this.tools.has(e)}getToolNames(){return Array.from(this.tools.keys())}async execute(e,r){const n=this.tools.get(e);if(!n)throw new Error(`Tool not found: ${e}`);return n.execute(r)}}const cI=new Aj,Si=ar("RtcProcessor"),Pj=1e3,uI=10;class Cj{constructor(e){fr(this,"persistence");fr(this,"processing",!1);fr(this,"pendingCheck",!1);fr(this,"retryCountMap",new Map);fr(this,"mode","edit");fr(this,"confirmDialog");fr(this,"askUserDialog");fr(this,"master");fr(this,"_lastSilentlySkippedRtcId");this.persistence=e}setMode(e){this.mode=e}getMode(){return this.mode}setConfirmDialog(e){this.confirmDialog=e}setAskUserDialog(e){this.askUserDialog=e}setMaster(e){this.master=e}_isMasterAllowed(){return this.master===void 0||this.master.isMaster}async onRtcUpdate(){if(Si.debug("onRtcUpdate called, processing:",this.processing),this.processing){this.pendingCheck=!0;return}await this.processLoop()}async processLoop(){if(!this._isMasterAllowed()){Si.debug("processLoop: not master, skipping");return}this.processing=!0,Si.debug("processLoop started"),this._lastSilentlySkippedRtcId=void 0;try{for(;;){this.pendingCheck=!1;const e=await this.persistence.getNextRtcToProcess(void 0);if(!e){if(Si.debug("processLoop: no more RTC to process, exiting"),this.pendingCheck)continue;break}if(e.client_id===this._lastSilentlySkippedRtcId){Si.warn(`processLoop: RTC ${e.client_id} returned again after silent skip, exiting loop to prevent infinite retry`);break}Si.debug("processing RTC:",e.client_id,"tool:",e.tool_name,"sync_status:",e.sync_status);try{await this.processOne(e),Si.debug("processOne completed successfully")}catch(r){Si.error("processOne failed:",r);const n=r instanceof Error?r.message:String(r);if(n.includes("connection")||n.includes("disconnected")){Si.warn("connection error detected, exiting processLoop");break}await this.sleep(Pj)}}}finally{this.processing=!1,Si.debug("processLoop finished")}}async processOne(e){if(e.sync_status==="failed"){const r=this.retryCountMap.get(e.client_id)||0;if(r>=uI){Si.error(`RTC ${e.client_id} exceeded max submit retry count (${uI}), abandoning. The RTC remains in sync_status='failed' and will be retried on the next onRtcUpdate cycle.`),this.retryCountMap.delete(e.client_id),this._lastSilentlySkippedRtcId=e.client_id;return}const n=this.calculateBackoff(r);await this.sleep(n);try{await this.persistence.submitRtcResult({rtcClientId:e.client_id,success:e.status==="completed",result:e.result,error:e.error_message}),this.retryCountMap.delete(e.client_id)}catch(i){throw this.retryCountMap.set(e.client_id,r+1),i}}else{const r=e.tool_name;if(r==="askUser"){await this.processAskUser(e);return}const n=_N.needsConfirm(r,this.mode);let i=!0;if(n&&(i=await this.showConfirmDialog(e)),!i){try{await this.persistence.submitRtcResult({rtcClientId:e.client_id,success:!1,error:"User denied"})}catch(c){Si.error("submitRtcResult (denied) failed:",c)}return}let s,a=!0,l;try{const c=e.parameters||{},u=await cI.execute(r,c);s=u.data,u.success||(a=!1,l=u.error)}catch(c){a=!1,l=c instanceof Error?c.message:String(c)}try{await this.persistence.submitRtcResult({rtcClientId:e.client_id,success:a,result:s,error:l})}catch(c){Si.error("submitRtcResult failed:",c)}}}async processAskUser(e){if(!this.askUserDialog){Si.warn("askUserDialog not set, defaulting to reject");try{await this.persistence.submitRtcResult({rtcClientId:e.client_id,success:!1,error:"User declined to answer questions"})}catch(n){Si.error("submitRtcResult (ask_user no dialog) failed:",n)}return}let r;try{r=await this.askUserDialog(e)}catch(n){Si.error("askUserDialog threw:",n);try{await this.persistence.submitRtcResult({rtcClientId:e.client_id,success:!1,error:n instanceof Error?n.message:String(n)})}catch(i){Si.error("submitRtcResult (ask_user error) failed:",i)}return}try{r===null?await this.persistence.submitRtcResult({rtcClientId:e.client_id,success:!1,error:"User declined to answer questions"}):await this.persistence.submitRtcResult({rtcClientId:e.client_id,success:!0,result:r})}catch(n){Si.error("submitRtcResult (ask_user) failed:",n)}}calculateBackoff(e){return Math.min(1e3*Math.pow(2,e),3e4)}sleep(e){return new Promise(r=>setTimeout(r,e))}async showConfirmDialog(e){return this.confirmDialog?this.confirmDialog(e):(Si.warn("confirmDialog not set, defaulting to reject"),!1)}}function dI(t){return new SharedWorker(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/shared-worker-BQv441O7.js").href:new URL("assets/shared-worker-BQv441O7.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.tagName.toUpperCase()==="SCRIPT"&&document.currentScript.src||document.baseURI).href),{name:t==null?void 0:t.name})}const Ra=ar("WorkerBridge");function kj(t){const e=t.toString(),r=e.match(/new URL\(\s*(["'`])([^"'`]+)\1/);if(r)return r[2];const n=e.match(/new SharedWorker\(\s*(["'`])([^"'`]+)\1/);if(n)return n[2];throw new Error("[WorkerBridge] Cannot extract worker URL from factory. Source: "+e.slice(0,300))}const po=class po{constructor(e,r={}){this._auth=e,this._worker=null,this._core=null,this._initialized=!1,this._connectionListeners=new Set,this._config=r,this._callbacks={onUIUpdate:n=>{Pd().publish(n)},requestToken:async()=>{const n=await this._auth.getAccessTokenAsync();if(!n)throw new Error("[WorkerBridge] no access token available");return n},requestTokenRefresh:()=>this._auth.handleTokenExpired(),onConnectionStateChange:n=>{for(const i of this._connectionListeners)try{i(n)}catch(s){Ra.error("connection listener error:",s)}},onGapFillState:n=>{console.log("[BulkUpdate] WorkerBridge.onGapFillState called, isSyncing:",n);const i=Pd();n?i.emitGapFillStart():i.emitGapFillEnd()}},this._proxiedCallbacks=T2(this._callbacks)}async initWorker(){let e=null;for(let r=0;r<=po.MAX_INIT_RETRIES;r++)try{r>0&&(Ra.warn(`Retrying worker initialization (attempt ${r+1}/${po.MAX_INIT_RETRIES+1})...`),await this._delay(po.INIT_RETRY_DELAY_MS*r)),await this._initWorkerOnce(),await this._verifyWorkerAlive();return}catch(n){e=n instanceof Error?n:new Error(String(n)),Ra.error(`Worker initialization attempt ${r+1} failed:`,e.message),this._cleanupFailedWorker()}throw new Error(`[WorkerBridge] Failed to initialize SharedWorker after ${po.MAX_INIT_RETRIES+1} attempts: ${e==null?void 0:e.message}`)}async _initWorkerOnce(){if(this._config.workerUrl)Ra.info("Using custom workerUrl:",this._config.workerUrl),this._worker=new SharedWorker(this._config.workerUrl,{name:"rtc-agent-worker",type:"module"});else{const e=kj(dI),r=typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:ss&&ss.tagName.toUpperCase()==="SCRIPT"&&ss.src||new URL("index.umd.js",document.baseURI).href,n=new URL(e,r).href,i=window.location.origin;let s;try{s=new URL(n).origin}catch(l){Ra.debug("Failed to parse worker URL origin, assuming same-origin:",l),s=i}const a=s!==i;if(Ra.info("worker init:",{workerUrl:n,pageOrigin:i,workerOrigin:s,isCrossOrigin:a}),!a)this._worker=dI();else{let l;try{const d=await fetch(n,{cache:"no-store"});if(!d.ok)throw new Error(`HTTP ${d.status} ${d.statusText}`);l=await d.text()}catch(d){throw new Error(`[WorkerBridge] failed to fetch worker script from ${n}: ${d instanceof Error?d.message:d}`)}const c=new Blob([l],{type:"application/javascript"}),u=URL.createObjectURL(c);try{this._worker=new SharedWorker(u,{name:"rtc-agent-worker",type:"module"})}finally{URL.revokeObjectURL(u)}}}this._core=_2(this._worker.port),this._worker.onerror=e=>{Ra.error("SharedWorker error:",{message:e.message,filename:e.filename,lineno:e.lineno,colno:e.colno,error:e.error})},this._worker.port.onmessageerror=e=>{Ra.error("port message error:",e)}}async _verifyWorkerAlive(){if(!this._core)throw new Error("[WorkerBridge] No core available for verification");let e;const r=new Promise((n,i)=>{e=setTimeout(()=>i(new Error("Worker verification timed out")),po.VERIFICATION_TIMEOUT_MS)});try{const n=await Promise.race([this._core.ping(),r]);if(n!=="pong")throw new Error(`Unexpected ping response: ${n}`);Ra.info("Worker verification successful")}catch(n){throw new Error(`[WorkerBridge] Worker verification failed: ${n instanceof Error?n.message:"unknown error"}`)}finally{e!==void 0&&clearTimeout(e)}}_cleanupFailedWorker(){if(this._worker){try{this._worker.port.close()}catch{}this._worker=null}this._core=null}_delay(e){return new Promise(r=>setTimeout(r,e))}get core(){return this._core}async init(e){if(this._initialized){Ra.warn("already initialized");return}if(!this._worker||!this._core)throw new Error("[WorkerBridge] init() called before initWorker()");this._worker.port.start(),await this._core.init(e),await this._core.registerCallback(this._proxiedCallbacks),this._initialized=!0}async destroy(){if(this._initialized&&!(!this._worker||!this._core)){try{await this._core.unregisterCallback(this._proxiedCallbacks)}catch(e){Ra.warn("unregisterCallback failed:",e)}this._connectionListeners.clear(),this._worker.port.close(),this._initialized=!1}}async getConnectionState(){return this._core.getConnectionState()}onConnectionStateChange(e){return this._connectionListeners.add(e),()=>{this._connectionListeners.delete(e)}}installVirtualFSProxy(){const e=this._core;Wr.read=(r,n,i)=>e.virtualFSRead(r,n,i),Wr.write=(r,n,i="overwrite",s)=>e.virtualFSWrite(r,n,i,s),Wr.ls=r=>e.virtualFSLs(r),Wr.find=(r,n)=>e.virtualFSFind(r,n),Wr.grep=(r,n,i,s)=>e.virtualFSGrep(r,n,i,s),Wr.queryByType=r=>e.virtualFSQueryByType(r),Wr.exists=r=>e.virtualFSExists(r),Wr.remove=r=>e.virtualFSRemove(r)}};po.MAX_INIT_RETRIES=3,po.INIT_RETRY_DELAY_MS=1e3,po.VERIFICATION_TIMEOUT_MS=5e3;let p1=po;const Sp=ar("MasterLock");class Ij{constructor(e){this._isMaster=!1,this._controlled=!1,this._lockName=`rtc-agent-master-${e}`}get isMaster(){return this._isMaster}get isControlled(){return this._controlled}async acquire(){var e;if(this._controlled){Sp.warn("already acquiring/acquired, ignoring");return}if(!this._isWebLocksAvailable()){Sp.warn("Web Locks API not available, acting as always-master"),this._isMaster=!0,this._controlled=!0,(e=this.onAcquire)==null||e.call(this);return}this._controlled=!0,this._abortController=new AbortController,navigator.locks.request(this._lockName,{signal:this._abortController.signal},async()=>{var r,n;this._isMaster=!0,Sp.info("acquired lock → became Master"),(r=this.onAcquire)==null||r.call(this),await new Promise(i=>{this._releaseResolve=i}),this._isMaster=!1,Sp.info("released lock → lost Master"),(n=this.onRelease)==null||n.call(this)}).catch(r=>{r instanceof DOMException&&r.name==="AbortError"||Sp.error("lock request error:",r)})}release(){this._controlled&&(this._releaseResolve&&(this._releaseResolve(),this._releaseResolve=void 0),!this._isMaster&&this._abortController&&this._abortController.abort(),this._controlled=!1)}_isWebLocksAvailable(){return typeof navigator<"u"&&"locks"in navigator}}const Ba=ar("PersistenceController");function VJ(t){return t}class Oj{constructor(e){this._core=e}async connect(){Ba.info("connect() called"),await this._core.connect(),Ba.info("connect() completed, worker state:",await this._core.getConnectionState())}disconnect(){this._core.disconnect()}async reconnect(){await this._core.reconnect()}async listSessions(e,r){return this._core.listSessions(e,r)}async getSession(e){return this._core.getSession(e)}async listMessages(e,r,n,i){return this._core.listMessages(e,r,n,i)}async getMessage(e){return this._core.getMessage(e)}async listRtc(e,r,n){return this._core.listRtc(e,r,n)}async getNextRtcToProcess(e){return this._core.getNextRtcToProcess(e)}async sendMessage(e){return this._core.sendMessage(e)}async insertLocalMessage(e){return this._core.insertLocalMessage(e)}async stopTurn(e){return this._core.stopTurn(e)}async closeSession(e){return this._core.closeSession(e)}async openSession(e){return this._core.openSession(e)}async compactSession(e,r){return this._core.compactSession(e,r)}async submitRtcResult(e){return this._core.submitRtcResult(e)}async forkSession(e){return this._core.forkSession(e)}async deleteSession(e){return this._core.deleteSession(e)}async updateSessionTitle(e,r){return this._core.updateSessionTitle(e,r)}async close(){await this._core.close()}async flushAll(){return this._core.flushAll()}async initializeVirtualFS(e){await this._core.initializeVirtualFS(e??{})}getClient(){throw new Error("[WorkerPersistenceAdapter] getClient() is not available. Use PersistenceController.onConnectionStateChange() instead.")}getOffsetManager(){return{reset:()=>this._core.resetOffset()}}getEntityRepository(){throw new Error("[WorkerPersistenceAdapter] getEntityRepository() is not available.")}}const Dl=class Dl{constructor(e,r){this._auth=r,e.addController(this)}set databaseName(e){this._databaseNameOverride=e}set workerUrl(e){this._workerUrl=e}get layer(){return this._layer}get isConnected(){return this._layer!==void 0}get workerBridge(){return this._workerBridge}get masterLock(){return this._masterLock}hostConnected(){}hostDisconnected(){this.disconnect()}async connect(){if(this._layer)return;if(this._connecting)return Ba.debug("connect() called while already connecting, awaiting existing attempt"),this._connecting;const e=h2(),r=this._auth.state.userId;if(!r)throw new Error("[PersistenceController] connect() called without userId; refusing to open a shared database");const n={databaseName:this._databaseNameOverride?`${this._databaseNameOverride}-${r}`:`rtc-agent-${r}`,deviceId:e,client:{endpoint:rl.wsEndpoint,getToken:async()=>{const i=await this._auth.getAccessTokenAsync();if(!i)throw Ba.warn("getToken: no access token available"),new Error("No access token available");return i},onTokenExpired:()=>this._auth.handleTokenExpired(),deviceId:e,userId:r}};return this._connecting=this._connectWorker(n).finally(()=>{this._connecting=void 0}),this._connecting}async _connectWorker(e){let r=null;for(let n=0;n<=Dl.MAX_CONNECT_RETRIES;n++)try{n>0&&(Ba.warn(`Retrying connection (attempt ${n+1}/${Dl.MAX_CONNECT_RETRIES+1})...`),await this._delay(Dl.CONNECT_RETRY_DELAY_MS*n)),await this._connectWorkerOnce(e);return}catch(i){r=i instanceof Error?i:new Error(String(i)),Ba.error(`Connection attempt ${n+1} failed:`,r.message),await this._cleanupFailedConnection()}throw new Error(`[PersistenceController] Failed to connect after ${Dl.MAX_CONNECT_RETRIES+1} attempts: ${r==null?void 0:r.message}`)}async _connectWorkerOnce(e){this._workerBridge=new p1(this._auth,{workerUrl:this._workerUrl}),await this._workerBridge.initWorker();const{getToken:r,onTokenExpired:n,...i}=e.client,s={...e,client:i};await this._workerBridge.init(s),this._workerBridge.installVirtualFSProxy(),this._layer=new Oj(this._workerBridge.core),await this._workerBridge.core.connect();const a=this._auth.state.userId;a&&(this._masterLock=new Ij(a),this._masterLock.onAcquire=()=>{Ba.info("this Tab became Master")},this._masterLock.onRelease=()=>{Ba.info("this Tab lost Master")},this._masterLock.acquire())}async _cleanupFailedConnection(){if(this._workerBridge){try{await this._workerBridge.destroy()}catch(e){Ba.debug("Cleanup after failed connection (non-critical):",e)}this._workerBridge=void 0}this._layer=void 0}_delay(e){return new Promise(r=>setTimeout(r,e))}async disconnect(){var e;if(this._layer){try{await this._layer.getOffsetManager().reset(),await this._layer.close()}catch(r){Ba.error("disconnect error:",r)}this._layer=void 0}if(this._workerBridge){(e=this._masterLock)==null||e.release(),this._masterLock=void 0;try{await this._workerBridge.destroy()}catch(r){Ba.error("WorkerBridge disconnect error:",r)}this._workerBridge=void 0}}async getConnectionState(){return this._workerBridge?this._workerBridge.getConnectionState():"disconnected"}onConnectionStateChange(e){return this._workerBridge?this._workerBridge.onConnectionStateChange(e):()=>{}}};Dl.MAX_CONNECT_RETRIES=2,Dl.CONNECT_RETRY_DELAY_MS=2e3;let f1=Dl;const pI=ar("EventBus");class fI{constructor(){this.handlers=new Map}on(e,r){return this.handlers.has(e)||this.handlers.set(e,new Set),this.handlers.get(e).add(r),()=>{var n;(n=this.handlers.get(e))==null||n.delete(r)}}once(e,r){const n=i=>(this.off(e,n),r(i));return this.on(e,n)}off(e,r){var n;(n=this.handlers.get(e))==null||n.delete(r)}emit(e,r){const n=this.handlers.get(e);if(!n)return;const i=Array.from(n);for(const s of i)try{s(r)}catch(a){pI.error(`Handler error for event '${e}':`,a)}}async emitAsync(e,r){const n=this.handlers.get(e);if(!n)return;const i=Array.from(n),s=[];for(const a of i)s.push(Promise.resolve(a(r)).catch(l=>{pI.error(`Async handler error for event '${e}':`,l)}));await Promise.all(s)}async emitAsyncStrict(e,r){const n=this.handlers.get(e);if(!n)return;const i=Array.from(n),s=[];for(const a of i)s.push(Promise.resolve(a(r)));await Promise.all(s)}clearAll(){this.handlers.clear()}clearEvent(e){this.handlers.delete(e)}}function hI(){return new fI}const ma=hI(),Nj=ar("SkillController");class mI{constructor(e,r){this._registry=null,this._config={},this._unsubscribes=[],this._host=e,this._config=r||{},e.addController(this)}get value(){return{registry:this._registry}}get actions(){return{getRegistry:()=>this._registry,setRegistry:e=>{this._registry=e,this._host.requestUpdate(),this._bridgeToolRegistry(e)}}}_bridgeToolRegistry(e){const r=new Proxy({callFunction:(n,i)=>e.execute(n,i),readFile:n=>Wr.read(n),writeFile:(n,i)=>Wr.write(n,i).then(()=>{}),listDir:n=>Wr.ls(n)},{get(n,i){return i in n?n[i]:e[i]}});cI.setRtcAgent(r),Nj.info("rtcAgent API bridged to ToolRegistry")}setConfig(e){this._config=e}hostConnected(){this._subscribeEvents()}hostDisconnected(){for(const e of this._unsubscribes)e();this._unsubscribes=[]}_subscribeEvents(){for(const n of this._unsubscribes)n();this._unsubscribes=[];const e=ma.on("ui:toast",n=>{this._config.onToast&&this._config.onToast(n.message,n.type)});this._unsubscribes.push(e);const r=ma.on("ui:confirm-request",n=>{this._config.onConfirmRequest&&this._config.onConfirmRequest(n.requestId,n.path,n.message)});this._unsubscribes.push(r)}respondToConfirm(e,r){ma.emit("ui:confirm-response",{requestId:e,confirmed:r})}}class Dj{constructor(e){this._toasts=[],this._timers=new Map,this._host=e,this._host.addController(this),this.actions={show:(r,n="info",i)=>this._show(r,n,i),remove:r=>this._remove(r)}}get toasts(){return this._toasts}hostConnected(){}hostDisconnected(){for(const e of this._timers.values())clearTimeout(e);this._timers.clear()}_show(e,r,n){const i=Date.now()+Math.random();this._toasts=[...this._toasts,{id:i,message:e,type:r,action:n}],this._host.requestUpdate();const s=r==="error"?0:r==="success"?2e3:2500;if(s>0){const a=setTimeout(()=>this._remove(i),s);this._timers.set(i,a)}}_remove(e){const r=this._timers.get(e);r!==void 0&&(clearTimeout(r),this._timers.delete(e)),this._toasts=this._toasts.filter(n=>n.id!==e),this._host.requestUpdate()}}/**
|
|
3269
3269
|
* @license
|
|
3270
3270
|
* Copyright 2021 Google LLC
|
|
3271
3271
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en-US.d.ts","sourceRoot":"","sources":["../../src/locales/en-US.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAG7C,QAAA,MAAM,MAAM,EAAE,YAA4B,CAAC;AAC3C,eAAe,MAAM,CAAC"}
|
package/dist/main.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { registry } from './registry.js';
|
|
2
|
+
import { toolRegistry, virtualFS } from '@rtc-agent/persistence';
|
|
3
|
+
declare global {
|
|
4
|
+
interface Window {
|
|
5
|
+
registry: typeof registry;
|
|
6
|
+
toolRegistry: typeof toolRegistry;
|
|
7
|
+
virtualFS: typeof virtualFS;
|
|
8
|
+
renderTasks: () => Promise<void>;
|
|
9
|
+
toggleTask: (id: string, completed: boolean) => Promise<void>;
|
|
10
|
+
deleteTask: (id: string) => Promise<void>;
|
|
11
|
+
openCreateModal: () => void;
|
|
12
|
+
openEditModal: (id: string) => Promise<void>;
|
|
13
|
+
closeModal: () => void;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export declare function renderTasks(): Promise<void>;
|
|
17
|
+
//# sourceMappingURL=main.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAOjE,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QACZ,QAAQ,EAAE,OAAO,QAAQ,CAAC;QAC1B,YAAY,EAAE,OAAO,YAAY,CAAC;QAClC,SAAS,EAAE,OAAO,SAAS,CAAC;QAC5B,WAAW,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;QACjC,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;QAC9D,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;QAC1C,eAAe,EAAE,MAAM,IAAI,CAAC;QAC5B,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;QAC7C,UAAU,EAAE,MAAM,IAAI,CAAC;KAC1B;CACJ;AAuCD,wBAAsB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAuBjD"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MasterLock: 基于 Web Locks API 的 Master Tab 选举
|
|
3
|
+
*
|
|
4
|
+
* 设计原则:
|
|
5
|
+
* - 每个 Tab 各自持有一个 MasterLock,自己判断是否为 Master
|
|
6
|
+
* - Worker 不参与选举,不知道也不关心谁是 Master
|
|
7
|
+
* - Tab 关闭 → 浏览器自动释放锁 → 其他 Tab 排队获得 → 自动升级
|
|
8
|
+
* - 锁名含 userId,多用户隔离
|
|
9
|
+
*
|
|
10
|
+
* 用法:
|
|
11
|
+
* ```ts
|
|
12
|
+
* const lock = new MasterLock('user-123');
|
|
13
|
+
* lock.onAcquire = () => { console.log('became master'); };
|
|
14
|
+
* lock.onRelease = () => { console.log('lost master'); };
|
|
15
|
+
* await lock.acquire(); // 开始尝试获取锁(可能排队)
|
|
16
|
+
* // ... later
|
|
17
|
+
* lock.release(); // 主动释放(Tab 关闭时浏览器自动释放)
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* @see docs/shared-worker-proposal.md §4.3
|
|
21
|
+
*/
|
|
22
|
+
export interface MasterLockCallbacks {
|
|
23
|
+
/** 获得锁 → 成为 Master */
|
|
24
|
+
onAcquire?: () => void;
|
|
25
|
+
/** 失去锁 → 降级为非 Master */
|
|
26
|
+
onRelease?: () => void;
|
|
27
|
+
}
|
|
28
|
+
export declare class MasterLock {
|
|
29
|
+
private _lockName;
|
|
30
|
+
private _isMaster;
|
|
31
|
+
private _controlled;
|
|
32
|
+
private _abortController?;
|
|
33
|
+
/** 获得锁时的回调 */
|
|
34
|
+
onAcquire?: () => void;
|
|
35
|
+
/** 失去锁时的回调 */
|
|
36
|
+
onRelease?: () => void;
|
|
37
|
+
constructor(userId: string);
|
|
38
|
+
/**
|
|
39
|
+
* 当前 Tab 是否为 Master
|
|
40
|
+
*/
|
|
41
|
+
get isMaster(): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* 是否已经开始选举流程(调用了 acquire)
|
|
44
|
+
*/
|
|
45
|
+
get isControlled(): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* 开始尝试获取 Master 锁
|
|
48
|
+
*
|
|
49
|
+
* - 如果没有其他 Master,立即获得锁
|
|
50
|
+
* - 如果已有 Master,排队等待(浏览器调度,零轮询)
|
|
51
|
+
* - 获得锁后调用 onAcquire 回调
|
|
52
|
+
* - Tab 关闭 → 浏览器自动释放 → 排队的 Tab 获得锁
|
|
53
|
+
*
|
|
54
|
+
* 幂等:多次调用只有第一次生效。
|
|
55
|
+
*/
|
|
56
|
+
acquire(): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* 主动释放 Master 锁
|
|
59
|
+
*
|
|
60
|
+
* - 如果当前是 Master → 释放锁 → 触发 onRelease
|
|
61
|
+
* - 如果正在排队 → 取消排队(abort)
|
|
62
|
+
* - 如果已经不是 Master → no-op
|
|
63
|
+
*/
|
|
64
|
+
release(): void;
|
|
65
|
+
/**
|
|
66
|
+
* 检测 Web Locks API 是否可用
|
|
67
|
+
*/
|
|
68
|
+
private _isWebLocksAvailable;
|
|
69
|
+
/** 用于解除 acquire callback 中的阻塞 */
|
|
70
|
+
private _releaseResolve?;
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=master-lock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"master-lock.d.ts","sourceRoot":"","sources":["../src/master-lock.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAOH,MAAM,WAAW,mBAAmB;IAChC,sBAAsB;IACtB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,qBAAa,UAAU;IACnB,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,gBAAgB,CAAC,CAAkB;IAE3C,cAAc;IACd,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,cAAc;IACd,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;gBAEX,MAAM,EAAE,MAAM;IAI1B;;OAEG;IACH,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED;;OAEG;IACH,IAAI,YAAY,IAAI,OAAO,CAE1B;IAED;;;;;;;;;OASG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAqD9B;;;;;;OAMG;IACH,OAAO,IAAI,IAAI;IAmBf;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAI5B,iCAAiC;IACjC,OAAO,CAAC,eAAe,CAAC,CAAa;CACxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,QAAQ,4FAInB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Repositories
|
|
3
|
+
*
|
|
4
|
+
* Data management layer with per-entity state isolation and pub-sub notifications.
|
|
5
|
+
*/
|
|
6
|
+
export { MessageRepository, MESSAGE_PAGE_SIZE } from './message.repository.js';
|
|
7
|
+
export type { MessageApi, SessionDataCallback } from './message.repository.js';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/repositories/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,iBAAiB,EAAE,iBAAiB,EAAC,MAAM,yBAAyB,CAAC;AAC7E,YAAY,EAAC,UAAU,EAAE,mBAAmB,EAAC,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Message Repository
|
|
3
|
+
*
|
|
4
|
+
* Manages per-session message data with a publish-subscribe pattern.
|
|
5
|
+
* Each session maintains its own `messages`, `hasMore`, and `isLoadingMore` state.
|
|
6
|
+
*
|
|
7
|
+
* Key responsibilities:
|
|
8
|
+
* - Per-session data isolation: each session's state is independent
|
|
9
|
+
* - Subscription mechanism: multiple subscribers can watch the same session
|
|
10
|
+
* - API encapsulation: wraps fetchMessages and fetchOlderMessages calls
|
|
11
|
+
* - Immutability: all updates produce new arrays/objects
|
|
12
|
+
*
|
|
13
|
+
* Concurrency note: concurrent `loadMore` calls for the same session are
|
|
14
|
+
* de-duplicated via the `isLoadingMore` flag — only one request is in-flight
|
|
15
|
+
* at a time per session.
|
|
16
|
+
*/
|
|
17
|
+
import type { Message, MessageState } from '../types/index.js';
|
|
18
|
+
/**
|
|
19
|
+
* API contract for message fetching.
|
|
20
|
+
*
|
|
21
|
+
* Implementations can wrap REST calls, WebSocket queries, or persistence layer.
|
|
22
|
+
*
|
|
23
|
+
* Cursor format: "${timestamp}|${clientId}" for (created_at, client_id) composite pagination.
|
|
24
|
+
*/
|
|
25
|
+
export interface MessageApi {
|
|
26
|
+
/** Fetch the latest messages for a session (initial load). */
|
|
27
|
+
fetchMessages(sessionId: string): Promise<Message[]>;
|
|
28
|
+
/** Fetch older messages before a given cursor (backward pagination). */
|
|
29
|
+
fetchOlderMessages(sessionId: string, beforeCursor?: string): Promise<Message[]>;
|
|
30
|
+
/** Fetch newer messages after a given cursor (forward pagination). */
|
|
31
|
+
fetchNewerMessages(sessionId: string, afterCursor?: string): Promise<Message[]>;
|
|
32
|
+
}
|
|
33
|
+
/** Callback signature for session data subscriptions. */
|
|
34
|
+
export type SessionDataCallback = (data: MessageState) => void;
|
|
35
|
+
/** Page size for message pagination (backward and forward). */
|
|
36
|
+
export declare const MESSAGE_PAGE_SIZE = 50;
|
|
37
|
+
export declare class MessageRepository {
|
|
38
|
+
private readonly _api;
|
|
39
|
+
/** Per-session message state. */
|
|
40
|
+
private _sessions;
|
|
41
|
+
/** Per-session subscriber sets. */
|
|
42
|
+
private _subscribers;
|
|
43
|
+
/** Tracks sessions with an in-flight loadMore (backward) request. */
|
|
44
|
+
private _loadingSessions;
|
|
45
|
+
/** Tracks sessions with an in-flight loadNewer (forward) request. */
|
|
46
|
+
private _loadingNewerSessions;
|
|
47
|
+
/** Per-session oldest loaded cursor for backward pagination. Format: "${timestamp}|${clientId}" */
|
|
48
|
+
private _oldestCursors;
|
|
49
|
+
/** Per-session newest loaded cursor for forward pagination. Format: "${timestamp}|${clientId}" */
|
|
50
|
+
private _newestCursors;
|
|
51
|
+
constructor(_api: MessageApi);
|
|
52
|
+
/**
|
|
53
|
+
* Subscribe to data changes for a session.
|
|
54
|
+
*
|
|
55
|
+
* The callback is invoked immediately with the current state (if any),
|
|
56
|
+
* and again whenever the state changes. Returns an unsubscribe function.
|
|
57
|
+
*/
|
|
58
|
+
subscribe(sessionId: string, callback: SessionDataCallback): () => void;
|
|
59
|
+
/**
|
|
60
|
+
* Get the current state for a session.
|
|
61
|
+
*
|
|
62
|
+
* Returns a default empty state if the session has not been initialized.
|
|
63
|
+
*/
|
|
64
|
+
getSessionState(sessionId: string): MessageState;
|
|
65
|
+
/**
|
|
66
|
+
* Replace all messages for a session.
|
|
67
|
+
*
|
|
68
|
+
* Typically called when new data arrives from WebSocket or initial API load.
|
|
69
|
+
* Notifies all subscribers of the change.
|
|
70
|
+
*/
|
|
71
|
+
updateMessages(sessionId: string, messages: Message[]): void;
|
|
72
|
+
/**
|
|
73
|
+
* Append a single message to a session's message list.
|
|
74
|
+
*
|
|
75
|
+
* Creates a new messages array to preserve immutability of prior state.
|
|
76
|
+
* Notifies all subscribers.
|
|
77
|
+
*/
|
|
78
|
+
appendMessage(sessionId: string, message: Message): void;
|
|
79
|
+
/**
|
|
80
|
+
* Update a single message in place using an updater function.
|
|
81
|
+
*
|
|
82
|
+
* More efficient than updateMessages() for single-message changes (e.g., streaming).
|
|
83
|
+
* Only the specified message is replaced in the array, avoiding full array copies.
|
|
84
|
+
*
|
|
85
|
+
* @param sessionId - Session ID
|
|
86
|
+
* @param messageId - Message client ID to update
|
|
87
|
+
* @param updater - Function that receives the current message and returns the updated message
|
|
88
|
+
* @returns true if the message was found and updated, false otherwise
|
|
89
|
+
*/
|
|
90
|
+
patchMessage(sessionId: string, messageId: string, updater: (msg: Message) => Message): boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Load older messages for a session (backward pagination).
|
|
93
|
+
*
|
|
94
|
+
* Concurrent calls for the same session are de-duplicated: if a load is
|
|
95
|
+
* already in-flight, subsequent calls return the existing promise.
|
|
96
|
+
* On failure, `isLoadingMore` is reset to false.
|
|
97
|
+
*
|
|
98
|
+
* @returns the full message list after prepending older messages,
|
|
99
|
+
* or the current list if load was skipped (no hasMore / already loading).
|
|
100
|
+
*/
|
|
101
|
+
loadMore(sessionId: string): Promise<Message[]>;
|
|
102
|
+
/**
|
|
103
|
+
* Load newer messages for a session (forward pagination).
|
|
104
|
+
*
|
|
105
|
+
* Concurrent calls for the same session are de-duplicated: if a load is
|
|
106
|
+
* already in-flight, subsequent calls return the existing promise.
|
|
107
|
+
* On failure, `isLoadingNewer` is reset to false.
|
|
108
|
+
*
|
|
109
|
+
* @returns the full message list after appending newer messages,
|
|
110
|
+
* or the current list if load was skipped (no hasMoreNewer / already loading).
|
|
111
|
+
*/
|
|
112
|
+
loadNewer(sessionId: string): Promise<Message[]>;
|
|
113
|
+
/**
|
|
114
|
+
* Fetch messages for a session (initial load).
|
|
115
|
+
*
|
|
116
|
+
* Sets `hasMore` based on whether the API returned MESSAGE_PAGE_SIZE messages.
|
|
117
|
+
* Returns the fetched messages.
|
|
118
|
+
*/
|
|
119
|
+
fetchMessages(sessionId: string): Promise<Message[]>;
|
|
120
|
+
/**
|
|
121
|
+
* Evict a session: clear its data and remove all subscribers.
|
|
122
|
+
*
|
|
123
|
+
* Called when a tab is closed or a session should no longer be tracked.
|
|
124
|
+
* After eviction, getSessionState returns the default empty state.
|
|
125
|
+
*/
|
|
126
|
+
evictSession(sessionId: string): void;
|
|
127
|
+
/**
|
|
128
|
+
* Set the hasMore flag for a session.
|
|
129
|
+
*
|
|
130
|
+
* This is used by the controller layer to sync pagination state after
|
|
131
|
+
* operations like _reloadFromDB that calculate hasMore independently.
|
|
132
|
+
* Without this, updateMessages only replaces the messages array but
|
|
133
|
+
* keeps the existing hasMore value (which may be the DEFAULT_STATE's false).
|
|
134
|
+
*/
|
|
135
|
+
setHasMore(sessionId: string, value: boolean): void;
|
|
136
|
+
/**
|
|
137
|
+
* Set the hasMoreNewer flag for a session.
|
|
138
|
+
*
|
|
139
|
+
* This is used to indicate whether there are newer messages available
|
|
140
|
+
* in the database for forward pagination.
|
|
141
|
+
*/
|
|
142
|
+
setHasMoreNewer(sessionId: string, value: boolean): void;
|
|
143
|
+
/**
|
|
144
|
+
* Set the oldest loaded cursor for a session.
|
|
145
|
+
* Cursor format: "${timestamp}|${clientId}" for (created_at, client_id) composite pagination.
|
|
146
|
+
*
|
|
147
|
+
* This is used by the controller layer to track the backward pagination cursor.
|
|
148
|
+
* Called after initial load or loadMore completes.
|
|
149
|
+
*/
|
|
150
|
+
setOldestOffset(sessionId: string, cursor: string): void;
|
|
151
|
+
/**
|
|
152
|
+
* Get the oldest loaded cursor for a session.
|
|
153
|
+
*/
|
|
154
|
+
getOldestOffset(sessionId: string): string | undefined;
|
|
155
|
+
/**
|
|
156
|
+
* Set the newest loaded cursor for a session.
|
|
157
|
+
* Cursor format: "${timestamp}|${clientId}" for (created_at, client_id) composite pagination.
|
|
158
|
+
*
|
|
159
|
+
* This is used by the controller layer to track the forward pagination cursor.
|
|
160
|
+
* Called after initial load or loadNewer completes.
|
|
161
|
+
*/
|
|
162
|
+
setNewestOffset(sessionId: string, cursor: string): void;
|
|
163
|
+
/**
|
|
164
|
+
* Get the newest loaded cursor for a session.
|
|
165
|
+
*/
|
|
166
|
+
getNewestOffset(sessionId: string): string | undefined;
|
|
167
|
+
/**
|
|
168
|
+
* Get the state for a session, returning a default if not initialized.
|
|
169
|
+
* Always returns a new object to prevent external mutation.
|
|
170
|
+
*/
|
|
171
|
+
private _getState;
|
|
172
|
+
/**
|
|
173
|
+
* Set the state for a session and notify all subscribers.
|
|
174
|
+
* Stores a shallow copy to maintain immutability.
|
|
175
|
+
*/
|
|
176
|
+
private _setState;
|
|
177
|
+
/**
|
|
178
|
+
* Notify all subscribers for a session with the current state.
|
|
179
|
+
*/
|
|
180
|
+
private _notifySubscribers;
|
|
181
|
+
}
|
|
182
|
+
//# sourceMappingURL=message.repository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message.repository.d.ts","sourceRoot":"","sources":["../../src/repositories/message.repository.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAC,OAAO,EAAE,YAAY,EAAC,MAAM,mBAAmB,CAAC;AAK7D;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IACvB,8DAA8D;IAC9D,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;IAErD,wEAAwE;IACxE,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;IAEjF,sEAAsE;IACtE,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;CACnF;AAED,yDAAyD;AACzD,MAAM,MAAM,mBAAmB,GAAG,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;AAE/D,+DAA+D;AAC/D,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAWpC,qBAAa,iBAAiB;IAmBd,OAAO,CAAC,QAAQ,CAAC,IAAI;IAlBjC,iCAAiC;IACjC,OAAO,CAAC,SAAS,CAAmC;IAEpD,mCAAmC;IACnC,OAAO,CAAC,YAAY,CAA+C;IAEnE,qEAAqE;IACrE,OAAO,CAAC,gBAAgB,CAAqB;IAE7C,qEAAqE;IACrE,OAAO,CAAC,qBAAqB,CAAqB;IAElD,mGAAmG;IACnG,OAAO,CAAC,cAAc,CAA6B;IAEnD,kGAAkG;IAClG,OAAO,CAAC,cAAc,CAA6B;gBAEtB,IAAI,EAAE,UAAU;IAI7C;;;;;OAKG;IACH,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,mBAAmB,GAAG,MAAM,IAAI;IAgCvE;;;;OAIG;IACH,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY;IAMhD;;;;;OAKG;IACH,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI;IAQ5D;;;;;OAKG;IACH,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI;IAQxD;;;;;;;;;;OAUG;IACH,YAAY,CACR,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,GACnC,OAAO;IA0BV;;;;;;;;;OASG;IACG,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IA4DrD;;;;;;;;;OASG;IACG,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IA+CtD;;;;;OAKG;IACG,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAa1D;;;;;OAKG;IACH,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAWrC;;;;;;;OAOG;IACH,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI;IAKnD;;;;;OAKG;IACH,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI;IAKxD;;;;;;OAMG;IACH,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAIxD;;OAEG;IACH,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAItD;;;;;;OAMG;IACH,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAIxD;;OAEG;IACH,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAMtD;;;OAGG;IACH,OAAO,CAAC,SAAS;IAIjB;;;OAGG;IACH,OAAO,CAAC,SAAS;IAKjB;;OAEG;IACH,OAAO,CAAC,kBAAkB;CAgB7B"}
|