@compose-market/theme 0.0.2 → 0.0.3
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/components/RFAComponent.d.ts +10 -0
- package/dist/components/RFAComponent.d.ts.map +1 -0
- package/dist/components/RFAComponent.js +288 -0
- package/dist/components/RFAComponent.js.map +1 -0
- package/dist/components/RFADetails.d.ts +9 -0
- package/dist/components/RFADetails.d.ts.map +1 -0
- package/dist/components/RFADetails.js +407 -0
- package/dist/components/RFADetails.js.map +1 -0
- package/dist/components/agent-card.d.ts +8 -0
- package/dist/components/agent-card.d.ts.map +1 -0
- package/dist/components/agent-card.js +216 -0
- package/dist/components/agent-card.js.map +1 -0
- package/dist/components/backpack.d.ts +21 -0
- package/dist/components/backpack.d.ts.map +1 -0
- package/dist/components/backpack.js +905 -0
- package/dist/components/backpack.js.map +1 -0
- package/dist/components/blur.d.ts +9 -0
- package/dist/components/blur.d.ts.map +1 -0
- package/dist/components/blur.js +60 -0
- package/dist/components/blur.js.map +1 -0
- package/dist/components/brand/Logo.d.ts +3 -3
- package/dist/components/brand/Logo.d.ts.map +1 -1
- package/dist/components/brand/Logo.js +37 -4
- package/dist/components/brand/Logo.js.map +1 -1
- package/dist/components/chat.d.ts +68 -0
- package/dist/components/chat.d.ts.map +1 -0
- package/dist/components/chat.js +618 -0
- package/dist/components/chat.js.map +1 -0
- package/dist/components/compose/index.d.ts +10 -0
- package/dist/components/compose/index.d.ts.map +1 -0
- package/dist/components/compose/index.js +13 -0
- package/dist/components/compose/index.js.map +1 -0
- package/dist/components/compose/nodes/agent-node.d.ts +11 -0
- package/dist/components/compose/nodes/agent-node.d.ts.map +1 -0
- package/dist/components/compose/nodes/agent-node.js +101 -0
- package/dist/components/compose/nodes/agent-node.js.map +1 -0
- package/dist/components/compose/nodes/hook-node.d.ts +11 -0
- package/dist/components/compose/nodes/hook-node.d.ts.map +1 -0
- package/dist/components/compose/nodes/hook-node.js +100 -0
- package/dist/components/compose/nodes/hook-node.js.map +1 -0
- package/dist/components/compose/nodes/index.d.ts +60 -0
- package/dist/components/compose/nodes/index.d.ts.map +1 -0
- package/dist/components/compose/nodes/index.js +22 -0
- package/dist/components/compose/nodes/index.js.map +1 -0
- package/dist/components/compose/nodes/step-node.d.ts +11 -0
- package/dist/components/compose/nodes/step-node.d.ts.map +1 -0
- package/dist/components/compose/nodes/step-node.js +88 -0
- package/dist/components/compose/nodes/step-node.js.map +1 -0
- package/dist/components/compose/nodes/trigger-node.d.ts +11 -0
- package/dist/components/compose/nodes/trigger-node.d.ts.map +1 -0
- package/dist/components/compose/nodes/trigger-node.js +92 -0
- package/dist/components/compose/nodes/trigger-node.js.map +1 -0
- package/dist/components/compose/overlay.d.ts +26 -0
- package/dist/components/compose/overlay.d.ts.map +1 -0
- package/dist/components/compose/overlay.js +48 -0
- package/dist/components/compose/overlay.js.map +1 -0
- package/dist/components/compose/pickers/agents-picker.d.ts +18 -0
- package/dist/components/compose/pickers/agents-picker.d.ts.map +1 -0
- package/dist/components/compose/pickers/agents-picker.js +180 -0
- package/dist/components/compose/pickers/agents-picker.js.map +1 -0
- package/dist/components/compose/pickers/connector-detail.d.ts +16 -0
- package/dist/components/compose/pickers/connector-detail.d.ts.map +1 -0
- package/dist/components/compose/pickers/connector-detail.js +236 -0
- package/dist/components/compose/pickers/connector-detail.js.map +1 -0
- package/dist/components/compose/pickers/connector-picker.d.ts +13 -0
- package/dist/components/compose/pickers/connector-picker.d.ts.map +1 -0
- package/dist/components/compose/pickers/connector-picker.js +101 -0
- package/dist/components/compose/pickers/connector-picker.js.map +1 -0
- package/dist/components/compose/pickers/index.d.ts +10 -0
- package/dist/components/compose/pickers/index.d.ts.map +1 -0
- package/dist/components/compose/pickers/index.js +10 -0
- package/dist/components/compose/pickers/index.js.map +1 -0
- package/dist/components/compose/pickers/trigger-picker.d.ts +13 -0
- package/dist/components/compose/pickers/trigger-picker.d.ts.map +1 -0
- package/dist/components/compose/pickers/trigger-picker.js +110 -0
- package/dist/components/compose/pickers/trigger-picker.js.map +1 -0
- package/dist/components/compose/toolbox.d.ts +24 -0
- package/dist/components/compose/toolbox.d.ts.map +1 -0
- package/dist/components/compose/toolbox.js +183 -0
- package/dist/components/compose/toolbox.js.map +1 -0
- package/dist/components/connector.d.ts +24 -0
- package/dist/components/connector.d.ts.map +1 -0
- package/dist/components/connector.js +263 -0
- package/dist/components/connector.js.map +1 -0
- package/dist/components/dispenser.d.ts +15 -0
- package/dist/components/dispenser.d.ts.map +1 -0
- package/dist/components/dispenser.js +323 -0
- package/dist/components/dispenser.js.map +1 -0
- package/dist/components/layout/AppLayout.d.ts +60 -0
- package/dist/components/layout/AppLayout.d.ts.map +1 -0
- package/dist/components/layout/AppLayout.js +265 -0
- package/dist/components/layout/AppLayout.js.map +1 -0
- package/dist/components/layout/Layout.d.ts +6 -0
- package/dist/components/layout/Layout.d.ts.map +1 -0
- package/dist/components/layout/Layout.js +186 -0
- package/dist/components/layout/Layout.js.map +1 -0
- package/dist/components/layout/Sidebar.d.ts +3 -0
- package/dist/components/layout/Sidebar.d.ts.map +1 -0
- package/dist/components/layout/Sidebar.js +160 -0
- package/dist/components/layout/Sidebar.js.map +1 -0
- package/dist/components/layout/TopBar.d.ts +6 -0
- package/dist/components/layout/TopBar.d.ts.map +1 -0
- package/dist/components/layout/TopBar.js +36 -0
- package/dist/components/layout/TopBar.js.map +1 -0
- package/dist/components/layout/index.d.ts +2 -0
- package/dist/components/layout/index.d.ts.map +1 -0
- package/dist/components/layout/index.js +2 -0
- package/dist/components/layout/index.js.map +1 -0
- package/dist/components/lyria-player.d.ts +23 -0
- package/dist/components/lyria-player.d.ts.map +1 -0
- package/dist/components/lyria-player.js +241 -0
- package/dist/components/lyria-player.js.map +1 -0
- package/dist/components/manowar-card.d.ts +8 -0
- package/dist/components/manowar-card.d.ts.map +1 -0
- package/dist/components/manowar-card.js +349 -0
- package/dist/components/manowar-card.js.map +1 -0
- package/dist/components/mirror-pane.d.ts +55 -0
- package/dist/components/mirror-pane.d.ts.map +1 -0
- package/dist/components/mirror-pane.js +330 -0
- package/dist/components/mirror-pane.js.map +1 -0
- package/dist/components/model-selector.d.ts +12 -0
- package/dist/components/model-selector.d.ts.map +1 -0
- package/dist/components/model-selector.js +148 -0
- package/dist/components/model-selector.js.map +1 -0
- package/dist/components/output.d.ts +26 -0
- package/dist/components/output.d.ts.map +1 -0
- package/dist/components/output.js +259 -0
- package/dist/components/output.js.map +1 -0
- package/dist/components/partners.d.ts +13 -0
- package/dist/components/partners.d.ts.map +1 -0
- package/dist/components/partners.js +210 -0
- package/dist/components/partners.js.map +1 -0
- package/dist/components/plugin-tester.d.ts +13 -0
- package/dist/components/plugin-tester.d.ts.map +1 -0
- package/dist/components/plugin-tester.js +907 -0
- package/dist/components/plugin-tester.js.map +1 -0
- package/dist/components/session/SessionComponents.d.ts +2 -0
- package/dist/components/session/SessionComponents.d.ts.map +1 -0
- package/dist/components/session/SessionComponents.js +2 -0
- package/dist/components/session/SessionComponents.js.map +1 -0
- package/dist/components/session/index.d.ts +2 -0
- package/dist/components/session/index.d.ts.map +1 -0
- package/dist/components/session/index.js +2 -0
- package/dist/components/session/index.js.map +1 -0
- package/dist/components/session.d.ts +3 -3
- package/dist/components/session.d.ts.map +1 -1
- package/dist/components/session.js +315 -15
- package/dist/components/session.js.map +1 -1
- package/dist/components/share-dialog.d.ts +9 -0
- package/dist/components/share-dialog.d.ts.map +1 -0
- package/dist/components/share-dialog.js +49 -0
- package/dist/components/share-dialog.js.map +1 -0
- package/dist/components/ui/accordion.d.ts +6 -0
- package/dist/components/ui/accordion.d.ts.map +1 -0
- package/dist/components/ui/accordion.js +20 -0
- package/dist/components/ui/accordion.js.map +1 -0
- package/dist/components/ui/alert-dialog.d.ts +20 -0
- package/dist/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog.js +29 -0
- package/dist/components/ui/alert-dialog.js.map +1 -0
- package/dist/components/ui/alert.d.ts +5 -0
- package/dist/components/ui/alert.d.ts.map +1 -0
- package/dist/components/ui/alert.js +22 -0
- package/dist/components/ui/alert.js.map +1 -0
- package/dist/components/ui/aspect-ratio.d.ts +3 -0
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/components/ui/aspect-ratio.js +4 -0
- package/dist/components/ui/aspect-ratio.js.map +1 -0
- package/dist/components/ui/avatar.d.ts +5 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/avatar.js +12 -0
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/badge.d.ts +2 -4
- package/dist/components/ui/badge.d.ts.map +1 -1
- package/dist/components/ui/badge.js +2 -2
- package/dist/components/ui/badge.js.map +1 -1
- package/dist/components/ui/breadcrumb.d.ts +16 -0
- package/dist/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/components/ui/breadcrumb.js +28 -0
- package/dist/components/ui/breadcrumb.js.map +1 -0
- package/dist/components/ui/button-group.d.ts +10 -0
- package/dist/components/ui/button-group.d.ts.map +1 -0
- package/dist/components/ui/button-group.js +27 -0
- package/dist/components/ui/button-group.js.map +1 -0
- package/dist/components/ui/button.d.ts +2 -5
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.js +1 -2
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/calendar.d.ts +9 -0
- package/dist/components/ui/calendar.d.ts.map +1 -0
- package/dist/components/ui/calendar.js +78 -0
- package/dist/components/ui/calendar.js.map +1 -0
- package/dist/components/ui/card.d.ts +6 -11
- package/dist/components/ui/card.d.ts.map +1 -1
- package/dist/components/ui/card.js +6 -7
- package/dist/components/ui/card.js.map +1 -1
- package/dist/components/ui/carousel.d.ts +9 -0
- package/dist/components/ui/carousel.d.ts.map +1 -0
- package/dist/components/ui/carousel.js +110 -0
- package/dist/components/ui/carousel.js.map +1 -0
- package/dist/components/ui/chart.d.ts +28 -0
- package/dist/components/ui/chart.d.ts.map +1 -0
- package/dist/components/ui/chart.js +168 -0
- package/dist/components/ui/chart.js.map +1 -0
- package/dist/components/ui/checkbox.d.ts +3 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/checkbox.js +12 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/collapsible.d.ts +5 -0
- package/dist/components/ui/collapsible.d.ts.map +1 -0
- package/dist/components/ui/collapsible.js +7 -0
- package/dist/components/ui/collapsible.js.map +1 -0
- package/dist/components/ui/command.d.ts +16 -0
- package/dist/components/ui/command.d.ts.map +1 -0
- package/dist/components/ui/command.js +38 -0
- package/dist/components/ui/command.js.map +1 -0
- package/dist/components/ui/context-menu.d.ts +21 -0
- package/dist/components/ui/context-menu.d.ts.map +1 -0
- package/dist/components/ui/context-menu.js +52 -0
- package/dist/components/ui/context-menu.js.map +1 -0
- package/dist/components/ui/dialog.d.ts +10 -11
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog.js +15 -7
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/drawer.d.ts +23 -0
- package/dist/components/ui/drawer.d.ts.map +1 -0
- package/dist/components/ui/drawer.js +28 -0
- package/dist/components/ui/drawer.js.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +15 -22
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.js +28 -10
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/empty.d.ts +10 -0
- package/dist/components/ui/empty.d.ts.map +1 -0
- package/dist/components/ui/empty.js +33 -0
- package/dist/components/ui/empty.js.map +1 -0
- package/dist/components/ui/field.d.ts +23 -0
- package/dist/components/ui/field.d.ts.map +1 -0
- package/dist/components/ui/field.js +82 -0
- package/dist/components/ui/field.js.map +1 -0
- package/dist/components/ui/form.d.ts +11 -0
- package/dist/components/ui/form.d.ts.map +1 -0
- package/dist/components/ui/form.js +71 -0
- package/dist/components/ui/form.js.map +1 -0
- package/dist/components/ui/hover-card.d.ts +5 -0
- package/dist/components/ui/hover-card.d.ts.map +1 -0
- package/dist/components/ui/hover-card.js +9 -0
- package/dist/components/ui/hover-card.js.map +1 -0
- package/dist/components/ui/input-group.d.ts +13 -0
- package/dist/components/ui/input-group.d.ts.map +1 -0
- package/dist/components/ui/input-group.js +63 -0
- package/dist/components/ui/input-group.js.map +1 -0
- package/dist/components/ui/input-otp.d.ts +6 -0
- package/dist/components/ui/input-otp.d.ts.map +1 -0
- package/dist/components/ui/input-otp.js +25 -0
- package/dist/components/ui/input-otp.js.map +1 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.js +8 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/item.d.ts +19 -0
- package/dist/components/ui/item.d.ts.map +1 -0
- package/dist/components/ui/item.js +67 -0
- package/dist/components/ui/item.js.map +1 -0
- package/dist/components/ui/kbd.d.ts +4 -0
- package/dist/components/ui/kbd.d.ts.map +1 -0
- package/dist/components/ui/kbd.js +9 -0
- package/dist/components/ui/kbd.js.map +1 -0
- package/dist/components/ui/label.d.ts +3 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/label.js +10 -0
- package/dist/components/ui/label.js.map +1 -0
- package/dist/components/ui/menubar.d.ts +23 -0
- package/dist/components/ui/menubar.d.ts.map +1 -0
- package/dist/components/ui/menubar.js +64 -0
- package/dist/components/ui/menubar.js.map +1 -0
- package/dist/components/ui/navigation-menu.d.ts +11 -0
- package/dist/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/components/ui/navigation-menu.js +34 -0
- package/dist/components/ui/navigation-menu.js.map +1 -0
- package/dist/components/ui/network-selector.d.ts +22 -0
- package/dist/components/ui/network-selector.d.ts.map +1 -0
- package/dist/components/ui/network-selector.js +99 -0
- package/dist/components/ui/network-selector.js.map +1 -0
- package/dist/components/ui/pagination.d.ts +29 -0
- package/dist/components/ui/pagination.d.ts.map +1 -0
- package/dist/components/ui/pagination.js +32 -0
- package/dist/components/ui/pagination.js.map +1 -0
- package/dist/components/ui/popover.d.ts +6 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/popover.js +12 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/progress.d.ts +1 -3
- package/dist/components/ui/progress.d.ts.map +1 -1
- package/dist/components/ui/progress.js +3 -2
- package/dist/components/ui/progress.js.map +1 -1
- package/dist/components/ui/radio-group.d.ts +4 -0
- package/dist/components/ui/radio-group.d.ts.map +1 -0
- package/dist/components/ui/radio-group.js +18 -0
- package/dist/components/ui/radio-group.js.map +1 -0
- package/dist/components/ui/resizable.d.ts +8 -0
- package/dist/components/ui/resizable.d.ts.map +1 -0
- package/dist/components/ui/resizable.js +13 -0
- package/dist/components/ui/resizable.js.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +4 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/scroll-area.js +19 -0
- package/dist/components/ui/scroll-area.js.map +1 -0
- package/dist/components/ui/select.d.ts +12 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/select.js +51 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/separator.d.ts +3 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/separator.js +7 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/sheet.d.ts +19 -0
- package/dist/components/ui/sheet.d.ts.map +1 -0
- package/dist/components/ui/sheet.js +46 -0
- package/dist/components/ui/sheet.js.map +1 -0
- package/dist/components/ui/sidebar.d.ts +58 -0
- package/dist/components/ui/sidebar.d.ts.map +1 -0
- package/dist/components/ui/sidebar.js +246 -0
- package/dist/components/ui/sidebar.js.map +1 -0
- package/dist/components/ui/skeleton.d.ts +3 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeleton.js +6 -0
- package/dist/components/ui/skeleton.js.map +1 -0
- package/dist/components/ui/slider.d.ts +3 -0
- package/dist/components/ui/slider.d.ts.map +1 -0
- package/dist/components/ui/slider.js +12 -0
- package/dist/components/ui/slider.js.map +1 -0
- package/dist/components/ui/sonner.d.ts +5 -0
- package/dist/components/ui/sonner.d.ts.map +1 -0
- package/dist/components/ui/sonner.js +16 -0
- package/dist/components/ui/sonner.js.map +1 -0
- package/dist/components/ui/spinner.d.ts +3 -0
- package/dist/components/ui/spinner.d.ts.map +1 -0
- package/dist/components/ui/spinner.js +7 -0
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/switch.d.ts +3 -0
- package/dist/components/ui/switch.d.ts.map +1 -0
- package/dist/components/ui/switch.js +9 -0
- package/dist/components/ui/switch.js.map +1 -0
- package/dist/components/ui/table.d.ts +10 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/table.js +22 -0
- package/dist/components/ui/table.js.map +1 -0
- package/dist/components/ui/tabs.d.ts +6 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/tabs.js +13 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/textarea.d.ts +3 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea.js +8 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/toast.d.ts +12 -0
- package/dist/components/ui/toast.d.ts.map +1 -0
- package/dist/components/ui/toast.js +35 -0
- package/dist/components/ui/toast.js.map +1 -0
- package/dist/components/ui/toaster.d.ts +2 -0
- package/dist/components/ui/toaster.d.ts.map +1 -0
- package/dist/components/ui/toaster.js +19 -0
- package/dist/components/ui/toaster.js.map +1 -0
- package/dist/components/ui/toggle-group.d.ts +4 -0
- package/dist/components/ui/toggle-group.d.ts.map +1 -0
- package/dist/components/ui/toggle-group.js +27 -0
- package/dist/components/ui/toggle-group.js.map +1 -0
- package/dist/components/ui/toggle.d.ts +4 -0
- package/dist/components/ui/toggle.d.ts.map +1 -0
- package/dist/components/ui/toggle.js +25 -0
- package/dist/components/ui/toggle.js.map +1 -0
- package/dist/components/ui/tooltip.d.ts +6 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/components/ui/tooltip.js +13 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/components/visual/ManowarField.d.ts +9 -0
- package/dist/components/visual/ManowarField.d.ts.map +1 -0
- package/dist/components/visual/ManowarField.js +111 -0
- package/dist/components/visual/ManowarField.js.map +1 -0
- package/dist/components/warp-form.d.ts +22 -0
- package/dist/components/warp-form.d.ts.map +1 -0
- package/dist/components/warp-form.js +743 -0
- package/dist/components/warp-form.js.map +1 -0
- package/dist/css/dark.css +38 -0
- package/dist/css/index.css +9 -0
- package/dist/css/index.d.ts +16 -0
- package/dist/css/index.d.ts.map +1 -0
- package/dist/css/index.js +96 -0
- package/dist/css/index.js.map +1 -0
- package/dist/css/light.css +70 -0
- package/dist/css/tokens.css +24 -0
- package/dist/hooks/use-agents.d.ts +17 -0
- package/dist/hooks/use-agents.d.ts.map +1 -0
- package/dist/hooks/use-agents.js +64 -0
- package/dist/hooks/use-agents.js.map +1 -0
- package/dist/hooks/use-api.d.ts +28 -0
- package/dist/hooks/use-api.d.ts.map +1 -0
- package/dist/hooks/use-api.js +114 -0
- package/dist/hooks/use-api.js.map +1 -0
- package/dist/hooks/use-chat.d.ts +64 -0
- package/dist/hooks/use-chat.d.ts.map +1 -0
- package/dist/hooks/use-chat.js +350 -0
- package/dist/hooks/use-chat.js.map +1 -0
- package/dist/hooks/use-coordinator.d.ts +41 -0
- package/dist/hooks/use-coordinator.d.ts.map +1 -0
- package/dist/hooks/use-coordinator.js +110 -0
- package/dist/hooks/use-coordinator.js.map +1 -0
- package/dist/hooks/use-dispenser.d.ts +68 -0
- package/dist/hooks/use-dispenser.d.ts.map +1 -0
- package/dist/hooks/use-dispenser.js +113 -0
- package/dist/hooks/use-dispenser.js.map +1 -0
- package/dist/hooks/use-lyria.d.ts +58 -0
- package/dist/hooks/use-lyria.d.ts.map +1 -0
- package/dist/hooks/use-lyria.js +254 -0
- package/dist/hooks/use-lyria.js.map +1 -0
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js +16 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/hooks/use-model.d.ts +34 -0
- package/dist/hooks/use-model.d.ts.map +1 -0
- package/dist/hooks/use-model.js +105 -0
- package/dist/hooks/use-model.js.map +1 -0
- package/dist/hooks/use-motion-governor.d.ts +10 -0
- package/dist/hooks/use-motion-governor.d.ts.map +1 -0
- package/dist/hooks/use-motion-governor.js +63 -0
- package/dist/hooks/use-motion-governor.js.map +1 -0
- package/dist/hooks/use-multichain.d.ts +34 -0
- package/dist/hooks/use-multichain.d.ts.map +1 -0
- package/dist/hooks/use-multichain.js +120 -0
- package/dist/hooks/use-multichain.js.map +1 -0
- package/dist/hooks/use-onchain.d.ts +145 -0
- package/dist/hooks/use-onchain.d.ts.map +1 -0
- package/dist/hooks/use-onchain.js +652 -0
- package/dist/hooks/use-onchain.js.map +1 -0
- package/dist/hooks/use-registry.d.ts +140 -0
- package/dist/hooks/use-registry.d.ts.map +1 -0
- package/dist/hooks/use-registry.js +264 -0
- package/dist/hooks/use-registry.js.map +1 -0
- package/dist/hooks/use-services.d.ts +66 -0
- package/dist/hooks/use-services.d.ts.map +1 -0
- package/dist/hooks/use-services.js +216 -0
- package/dist/hooks/use-services.js.map +1 -0
- package/dist/hooks/use-session.d.ts +36 -0
- package/dist/hooks/use-session.d.ts.map +1 -0
- package/dist/hooks/use-session.js +449 -0
- package/dist/hooks/use-session.js.map +1 -0
- package/dist/hooks/use-sse.d.ts +8 -0
- package/dist/hooks/use-sse.d.ts.map +1 -0
- package/dist/hooks/use-sse.js +86 -0
- package/dist/hooks/use-sse.js.map +1 -0
- package/dist/hooks/use-tabs.d.ts +2 -0
- package/dist/hooks/use-tabs.d.ts.map +1 -0
- package/dist/hooks/use-tabs.js +43 -0
- package/dist/hooks/use-tabs.js.map +1 -0
- package/dist/hooks/use-toast.d.ts +41 -0
- package/dist/hooks/use-toast.d.ts.map +1 -0
- package/dist/hooks/use-toast.js +127 -0
- package/dist/hooks/use-toast.js.map +1 -0
- package/dist/hooks/use-triggers.d.ts +51 -0
- package/dist/hooks/use-triggers.d.ts.map +1 -0
- package/dist/hooks/use-triggers.js +212 -0
- package/dist/hooks/use-triggers.js.map +1 -0
- package/dist/hooks/use-warp.d.ts +53 -0
- package/dist/hooks/use-warp.d.ts.map +1 -0
- package/dist/hooks/use-warp.js +231 -0
- package/dist/hooks/use-warp.js.map +1 -0
- package/dist/hooks/use-workflow.d.ts +40 -0
- package/dist/hooks/use-workflow.d.ts.map +1 -0
- package/dist/hooks/use-workflow.js +358 -0
- package/dist/hooks/use-workflow.js.map +1 -0
- package/dist/index.d.ts +6 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/lib/agents.d.ts +186 -0
- package/dist/lib/agents.d.ts.map +1 -0
- package/dist/lib/agents.js +633 -0
- package/dist/lib/agents.js.map +1 -0
- package/dist/lib/api.d.ts +224 -0
- package/dist/lib/api.d.ts.map +1 -0
- package/dist/lib/api.js +443 -0
- package/dist/lib/api.js.map +1 -0
- package/dist/lib/chains.d.ts +151 -0
- package/dist/lib/chains.d.ts.map +1 -0
- package/dist/lib/chains.js +297 -0
- package/dist/lib/chains.js.map +1 -0
- package/dist/lib/contracts.d.ts +960 -0
- package/dist/lib/contracts.d.ts.map +1 -0
- package/dist/lib/contracts.js +716 -0
- package/dist/lib/contracts.js.map +1 -0
- package/dist/lib/cronos/aa.d.ts +111 -0
- package/dist/lib/cronos/aa.d.ts.map +1 -0
- package/dist/lib/cronos/aa.js +312 -0
- package/dist/lib/cronos/aa.js.map +1 -0
- package/dist/lib/cronos/facilitator.d.ts +87 -0
- package/dist/lib/cronos/facilitator.d.ts.map +1 -0
- package/dist/lib/cronos/facilitator.js +183 -0
- package/dist/lib/cronos/facilitator.js.map +1 -0
- package/dist/lib/evm.d.ts +45 -0
- package/dist/lib/evm.d.ts.map +1 -0
- package/dist/lib/evm.js +78 -0
- package/dist/lib/evm.js.map +1 -0
- package/dist/lib/mockData.d.ts +26 -0
- package/dist/lib/mockData.d.ts.map +1 -0
- package/dist/lib/mockData.js +89 -0
- package/dist/lib/mockData.js.map +1 -0
- package/dist/lib/models.d.ts +122 -0
- package/dist/lib/models.d.ts.map +1 -0
- package/dist/lib/models.js +174 -0
- package/dist/lib/models.js.map +1 -0
- package/dist/lib/multimodal.d.ts +53 -0
- package/dist/lib/multimodal.d.ts.map +1 -0
- package/dist/lib/multimodal.js +204 -0
- package/dist/lib/multimodal.js.map +1 -0
- package/dist/lib/payment.d.ts +67 -0
- package/dist/lib/payment.d.ts.map +1 -0
- package/dist/lib/payment.js +236 -0
- package/dist/lib/payment.js.map +1 -0
- package/dist/lib/pinata.d.ts +140 -0
- package/dist/lib/pinata.d.ts.map +1 -0
- package/dist/lib/pinata.js +209 -0
- package/dist/lib/pinata.js.map +1 -0
- package/dist/lib/queryClient.d.ts +9 -0
- package/dist/lib/queryClient.d.ts.map +1 -0
- package/dist/lib/queryClient.js +42 -0
- package/dist/lib/queryClient.js.map +1 -0
- package/dist/lib/services.d.ts +164 -0
- package/dist/lib/services.d.ts.map +1 -0
- package/dist/lib/services.js +304 -0
- package/dist/lib/services.js.map +1 -0
- package/dist/lib/share.d.ts +12 -0
- package/dist/lib/share.d.ts.map +1 -0
- package/dist/lib/share.js +39 -0
- package/dist/lib/share.js.map +1 -0
- package/dist/lib/triggers.d.ts +128 -0
- package/dist/lib/triggers.d.ts.map +1 -0
- package/dist/lib/triggers.js +305 -0
- package/dist/lib/triggers.js.map +1 -0
- package/dist/lib/utils.d.ts +1 -1
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/tailwind/preset.d.ts +282 -0
- package/dist/tailwind/preset.d.ts.map +1 -0
- package/dist/tailwind/preset.js +144 -0
- package/dist/tailwind/preset.js.map +1 -0
- package/package.json +9 -45
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API Configuration and Types
|
|
3
|
+
*
|
|
4
|
+
* - Base URL configuration for Lambda API
|
|
5
|
+
* - OpenAI-compatible response types (from backend)
|
|
6
|
+
* - SSE stream parser
|
|
7
|
+
* - Response handling utilities
|
|
8
|
+
*/
|
|
9
|
+
export declare const API_BASE_URL: any;
|
|
10
|
+
export declare function apiUrl(path: string): string;
|
|
11
|
+
export declare function apiFetch(path: string, init?: RequestInit): Promise<Response>;
|
|
12
|
+
/** OpenAI API message format - for requests/responses */
|
|
13
|
+
export interface APIChatMessage {
|
|
14
|
+
role: "system" | "user" | "assistant" | "tool";
|
|
15
|
+
content: string | APIChatContentPart[] | null;
|
|
16
|
+
name?: string;
|
|
17
|
+
tool_calls?: ToolCall[];
|
|
18
|
+
tool_call_id?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface APIChatContentPart {
|
|
21
|
+
type: "text" | "image_url";
|
|
22
|
+
text?: string;
|
|
23
|
+
image_url?: {
|
|
24
|
+
url: string;
|
|
25
|
+
detail?: "auto" | "low" | "high";
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export interface ToolCall {
|
|
29
|
+
id: string;
|
|
30
|
+
type: "function";
|
|
31
|
+
function: {
|
|
32
|
+
name: string;
|
|
33
|
+
arguments: string;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export type MessageType = "text" | "image" | "audio" | "video" | "embedding";
|
|
37
|
+
/** UI message format - for frontend state management */
|
|
38
|
+
export interface ChatMessage {
|
|
39
|
+
id: string;
|
|
40
|
+
role: "user" | "assistant";
|
|
41
|
+
content: string;
|
|
42
|
+
timestamp: number;
|
|
43
|
+
type?: MessageType;
|
|
44
|
+
imageUrl?: string;
|
|
45
|
+
audioUrl?: string;
|
|
46
|
+
videoUrl?: string;
|
|
47
|
+
}
|
|
48
|
+
/** Attached file for uploads */
|
|
49
|
+
export interface AttachedFile {
|
|
50
|
+
file: File;
|
|
51
|
+
cid?: string;
|
|
52
|
+
url?: string;
|
|
53
|
+
preview?: string;
|
|
54
|
+
uploading: boolean;
|
|
55
|
+
type: "image" | "audio" | "video";
|
|
56
|
+
}
|
|
57
|
+
export interface ParsedInvoke {
|
|
58
|
+
toolName: string;
|
|
59
|
+
params: Record<string, string>;
|
|
60
|
+
raw: string;
|
|
61
|
+
}
|
|
62
|
+
export interface ParsedContent {
|
|
63
|
+
think: string | null;
|
|
64
|
+
invokes: ParsedInvoke[];
|
|
65
|
+
reply: string;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Parses <think> and <invoke> tags from content
|
|
69
|
+
* Used by UI components and hooks to understand agent state
|
|
70
|
+
*/
|
|
71
|
+
export declare function parseContentTags(content: string): ParsedContent;
|
|
72
|
+
export interface ChatCompletionChoice {
|
|
73
|
+
index: number;
|
|
74
|
+
message: APIChatMessage;
|
|
75
|
+
finish_reason: "stop" | "length" | "tool_calls" | "content_filter" | null;
|
|
76
|
+
}
|
|
77
|
+
export interface TokenUsage {
|
|
78
|
+
prompt_tokens: number;
|
|
79
|
+
completion_tokens: number;
|
|
80
|
+
total_tokens: number;
|
|
81
|
+
}
|
|
82
|
+
export interface ChatCompletionResponse {
|
|
83
|
+
id: string;
|
|
84
|
+
object: "chat.completion";
|
|
85
|
+
created: number;
|
|
86
|
+
model: string;
|
|
87
|
+
choices: ChatCompletionChoice[];
|
|
88
|
+
usage: TokenUsage;
|
|
89
|
+
}
|
|
90
|
+
export interface ChatCompletionChunk {
|
|
91
|
+
id: string;
|
|
92
|
+
object: "chat.completion.chunk";
|
|
93
|
+
created: number;
|
|
94
|
+
model: string;
|
|
95
|
+
choices: {
|
|
96
|
+
index: number;
|
|
97
|
+
delta: Partial<APIChatMessage>;
|
|
98
|
+
finish_reason: string | null;
|
|
99
|
+
}[];
|
|
100
|
+
}
|
|
101
|
+
export interface ImageData {
|
|
102
|
+
b64_json?: string;
|
|
103
|
+
url?: string;
|
|
104
|
+
revised_prompt?: string;
|
|
105
|
+
}
|
|
106
|
+
export interface ImagesResponse {
|
|
107
|
+
created: number;
|
|
108
|
+
data: ImageData[];
|
|
109
|
+
}
|
|
110
|
+
export interface AudioTranscriptionResponse {
|
|
111
|
+
text: string;
|
|
112
|
+
language?: string;
|
|
113
|
+
duration?: number;
|
|
114
|
+
}
|
|
115
|
+
export interface VideoData {
|
|
116
|
+
url?: string;
|
|
117
|
+
b64_json?: string;
|
|
118
|
+
duration?: number;
|
|
119
|
+
}
|
|
120
|
+
export interface VideoGenerationResponse {
|
|
121
|
+
created: number;
|
|
122
|
+
data: VideoData[];
|
|
123
|
+
model: string;
|
|
124
|
+
}
|
|
125
|
+
export interface VideoJobResponse {
|
|
126
|
+
id: string;
|
|
127
|
+
object: "video.generation";
|
|
128
|
+
status: "queued" | "processing" | "completed" | "failed";
|
|
129
|
+
created?: number;
|
|
130
|
+
model?: string;
|
|
131
|
+
url?: string;
|
|
132
|
+
error?: string;
|
|
133
|
+
progress?: number;
|
|
134
|
+
}
|
|
135
|
+
export interface EmbeddingData {
|
|
136
|
+
object: "embedding";
|
|
137
|
+
embedding: number[];
|
|
138
|
+
index: number;
|
|
139
|
+
}
|
|
140
|
+
export interface EmbeddingResponse {
|
|
141
|
+
object: "list";
|
|
142
|
+
data: EmbeddingData[];
|
|
143
|
+
model: string;
|
|
144
|
+
usage: {
|
|
145
|
+
prompt_tokens: number;
|
|
146
|
+
total_tokens: number;
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
export interface ResponsesOutputItem {
|
|
150
|
+
type: string;
|
|
151
|
+
role?: "assistant";
|
|
152
|
+
text?: string;
|
|
153
|
+
content?: Array<{
|
|
154
|
+
type?: string;
|
|
155
|
+
text?: string;
|
|
156
|
+
} | Record<string, unknown>>;
|
|
157
|
+
image_url?: string;
|
|
158
|
+
audio_url?: string;
|
|
159
|
+
video_url?: string;
|
|
160
|
+
embedding?: number[];
|
|
161
|
+
call_id?: string;
|
|
162
|
+
name?: string;
|
|
163
|
+
arguments?: string;
|
|
164
|
+
}
|
|
165
|
+
export interface ResponsesResponse {
|
|
166
|
+
id: string;
|
|
167
|
+
object: "response";
|
|
168
|
+
created_at: number;
|
|
169
|
+
status: "completed" | "in_progress" | "failed" | "cancelled";
|
|
170
|
+
model: string;
|
|
171
|
+
output?: ResponsesOutputItem[];
|
|
172
|
+
usage?: {
|
|
173
|
+
input_tokens: number;
|
|
174
|
+
output_tokens: number;
|
|
175
|
+
total_tokens: number;
|
|
176
|
+
};
|
|
177
|
+
error?: {
|
|
178
|
+
message?: string;
|
|
179
|
+
type?: string;
|
|
180
|
+
code?: string;
|
|
181
|
+
};
|
|
182
|
+
job_id?: string;
|
|
183
|
+
}
|
|
184
|
+
export type MultimodalType = "text" | "image" | "audio" | "video" | "embedding";
|
|
185
|
+
export interface MultimodalResult {
|
|
186
|
+
type: MultimodalType;
|
|
187
|
+
success: boolean;
|
|
188
|
+
content?: string;
|
|
189
|
+
url?: string;
|
|
190
|
+
base64?: string;
|
|
191
|
+
mimeType?: string;
|
|
192
|
+
embeddings?: number[];
|
|
193
|
+
error?: string;
|
|
194
|
+
jobId?: string;
|
|
195
|
+
polling?: boolean;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Parse SSE stream from text/event-stream response
|
|
199
|
+
* Yields text content chunks as they arrive
|
|
200
|
+
*/
|
|
201
|
+
export declare function parseSSEStream(reader: ReadableStreamDefaultReader<Uint8Array>): AsyncGenerator<string, void, unknown>;
|
|
202
|
+
export type ResponseType = "sse" | "json" | "image" | "audio" | "video" | "binary" | "text";
|
|
203
|
+
export declare function detectResponseType(contentType: string): ResponseType;
|
|
204
|
+
/**
|
|
205
|
+
* Parse JSON response from Lambda API into unified MultimodalResult
|
|
206
|
+
*/
|
|
207
|
+
export declare function parseJsonResponse(data: unknown): MultimodalResult;
|
|
208
|
+
export declare const TIMEOUT_CONFIG: {
|
|
209
|
+
readonly FETCH_TIMEOUT_MS: undefined;
|
|
210
|
+
readonly VIDEO_POLL: {
|
|
211
|
+
readonly INTERVAL_MS: 5000;
|
|
212
|
+
readonly MAX_ATTEMPTS: number;
|
|
213
|
+
};
|
|
214
|
+
readonly SSE_RETRY: {
|
|
215
|
+
readonly INITIAL_DELAY_MS: 1000;
|
|
216
|
+
readonly MAX_DELAY_MS: 30000;
|
|
217
|
+
readonly BACKOFF_MULTIPLIER: 2;
|
|
218
|
+
};
|
|
219
|
+
readonly SESSION_POLL: {
|
|
220
|
+
readonly INTERVAL_MS: 2000;
|
|
221
|
+
readonly MAX_ATTEMPTS: 30;
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/lib/api.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,eAAO,MAAM,YAAY,KAEO,CAAC;AAEjC,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE3C;AAED,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,CAElF;AAMD,yDAAyD;AACzD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;IAC/C,OAAO,EAAE,MAAM,GAAG,kBAAkB,EAAE,GAAG,IAAI,CAAC;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,QAAQ,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE;QAAE,GAAG,E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B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAMD;;;GAGG;AACH,wBAAuB,cAAc,CACnC,MAAM,EAAE,2BAA2B,CAAC,UAAU,CAAC,GAC9C,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAgFvC;AAMD,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE5F,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,YAAY,CAQpE;AAMD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,GAAG,gBAAgB,CAkNjE;AA+ED,eAAO,MAAM,cAAc;+BACM,SAAS;;;;;;;;;;;;;;CAchC,CAAC"}
|
package/dist/lib/api.js
ADDED
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API Configuration and Types
|
|
3
|
+
*
|
|
4
|
+
* - Base URL configuration for Lambda API
|
|
5
|
+
* - OpenAI-compatible response types (from backend)
|
|
6
|
+
* - SSE stream parser
|
|
7
|
+
* - Response handling utilities
|
|
8
|
+
*/
|
|
9
|
+
// =============================================================================
|
|
10
|
+
// API Configuration
|
|
11
|
+
// =============================================================================
|
|
12
|
+
export const API_BASE_URL = import.meta.env.VITE_API_URL
|
|
13
|
+
? import.meta.env.VITE_API_URL.replace(/\/$/, "")
|
|
14
|
+
: "https://api.compose.market";
|
|
15
|
+
export function apiUrl(path) {
|
|
16
|
+
return API_BASE_URL ? `${API_BASE_URL}${path}` : path;
|
|
17
|
+
}
|
|
18
|
+
export async function apiFetch(path, init) {
|
|
19
|
+
return fetch(apiUrl(path), init);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Parses <think> and <invoke> tags from content
|
|
23
|
+
* Used by UI components and hooks to understand agent state
|
|
24
|
+
*/
|
|
25
|
+
export function parseContentTags(content) {
|
|
26
|
+
if (!content)
|
|
27
|
+
return { think: null, invokes: [], reply: "" };
|
|
28
|
+
// 1. Extract Think Block
|
|
29
|
+
const thinkMatch = content.match(/<think>([\s\S]*?)<\/think>/i);
|
|
30
|
+
const think = thinkMatch?.[1]?.trim() || null;
|
|
31
|
+
// 2. Extract Invoke Blocks
|
|
32
|
+
const invokes = [];
|
|
33
|
+
const invokeRegex = /<invoke>([\s\S]*?)<\/invoke>/gi;
|
|
34
|
+
let invokeMatch;
|
|
35
|
+
while ((invokeMatch = invokeRegex.exec(content)) !== null) {
|
|
36
|
+
const raw = invokeMatch[1];
|
|
37
|
+
const lines = raw.trim().split('\n');
|
|
38
|
+
const toolName = lines[0]?.trim() || 'Unknown Tool';
|
|
39
|
+
const params = {};
|
|
40
|
+
const paramRegex = /<(\w+)>([\s\S]*?)<\/\1>/gi;
|
|
41
|
+
let paramMatch;
|
|
42
|
+
while ((paramMatch = paramRegex.exec(raw)) !== null) {
|
|
43
|
+
params[paramMatch[1]] = paramMatch[2].trim();
|
|
44
|
+
}
|
|
45
|
+
invokes.push({ toolName, params, raw });
|
|
46
|
+
}
|
|
47
|
+
// 3. Clean Content (Reply)
|
|
48
|
+
let cleanContent = content
|
|
49
|
+
.replace(/<think>([\s\S]*?)<\/think>/gi, '')
|
|
50
|
+
.replace(/<invoke>([\s\S]*?)<\/invoke>/gi, '')
|
|
51
|
+
.replace(/<reply>|<\/reply>/gi, '') // Legacy tags
|
|
52
|
+
.trim();
|
|
53
|
+
// Handle partial tags (cleaning up incomplete tags at the end of stream)
|
|
54
|
+
cleanContent = cleanContent
|
|
55
|
+
.replace(/<think>([\s\S]*)$/gi, '')
|
|
56
|
+
.replace(/<invoke>([\s\S]*)$/gi, '')
|
|
57
|
+
.replace(/<\/invoke>|<\/think>/gi, '')
|
|
58
|
+
.trim();
|
|
59
|
+
return {
|
|
60
|
+
think,
|
|
61
|
+
invokes,
|
|
62
|
+
reply: cleanContent
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
// =============================================================================
|
|
66
|
+
// SSE Stream Parser
|
|
67
|
+
// =============================================================================
|
|
68
|
+
/**
|
|
69
|
+
* Parse SSE stream from text/event-stream response
|
|
70
|
+
* Yields text content chunks as they arrive
|
|
71
|
+
*/
|
|
72
|
+
export async function* parseSSEStream(reader) {
|
|
73
|
+
const decoder = new TextDecoder();
|
|
74
|
+
let buffer = "";
|
|
75
|
+
while (true) {
|
|
76
|
+
const { done, value } = await reader.read();
|
|
77
|
+
if (done)
|
|
78
|
+
break;
|
|
79
|
+
buffer += decoder.decode(value, { stream: true });
|
|
80
|
+
// Process complete lines
|
|
81
|
+
const lines = buffer.split("\n");
|
|
82
|
+
buffer = lines.pop() || ""; // Keep incomplete line in buffer
|
|
83
|
+
for (const line of lines) {
|
|
84
|
+
if (line.startsWith("data: ")) {
|
|
85
|
+
const data = line.slice(6).trim();
|
|
86
|
+
if (data === "[DONE]")
|
|
87
|
+
return;
|
|
88
|
+
try {
|
|
89
|
+
const parsed = JSON.parse(data);
|
|
90
|
+
const chatChunk = parsed;
|
|
91
|
+
// Chat Completions chunk
|
|
92
|
+
if (Array.isArray(chatChunk.choices) &&
|
|
93
|
+
typeof chatChunk.choices?.[0]?.delta?.content === "string") {
|
|
94
|
+
yield chatChunk.choices[0].delta.content;
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
// Responses stream chunk
|
|
98
|
+
if (parsed.type === "response.output_text.delta") {
|
|
99
|
+
if (typeof parsed.delta === "string") {
|
|
100
|
+
yield parsed.delta;
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
if (parsed.delta &&
|
|
104
|
+
typeof parsed.delta === "object" &&
|
|
105
|
+
typeof parsed.delta.text === "string") {
|
|
106
|
+
yield parsed.delta.text;
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
// Generic text-bearing event payloads
|
|
112
|
+
if (typeof parsed.content === "string") {
|
|
113
|
+
yield parsed.content;
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
if (typeof parsed.text === "string") {
|
|
117
|
+
yield parsed.text;
|
|
118
|
+
continue;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
catch {
|
|
122
|
+
// Attempt to handle custom events wrapped in data objects
|
|
123
|
+
try {
|
|
124
|
+
const parsed = JSON.parse(data);
|
|
125
|
+
if (typeof parsed?.content === "string")
|
|
126
|
+
yield parsed.content;
|
|
127
|
+
else if (typeof parsed?.text === "string")
|
|
128
|
+
yield parsed.text;
|
|
129
|
+
}
|
|
130
|
+
catch {
|
|
131
|
+
// Only yield raw fallback for non-JSON payloads.
|
|
132
|
+
if (data && !data.startsWith("{") && !data.startsWith("["))
|
|
133
|
+
yield data;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
else if (line.trim() && !line.startsWith(":")) {
|
|
138
|
+
// Plain text streaming (no SSE format)
|
|
139
|
+
yield line;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
// Process remaining buffer
|
|
144
|
+
if (buffer.trim()) {
|
|
145
|
+
yield buffer;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
export function detectResponseType(contentType) {
|
|
149
|
+
if (contentType.includes("text/event-stream"))
|
|
150
|
+
return "sse";
|
|
151
|
+
if (contentType.includes("text/plain"))
|
|
152
|
+
return "text";
|
|
153
|
+
if (contentType.includes("application/json"))
|
|
154
|
+
return "json";
|
|
155
|
+
if (contentType.includes("image/"))
|
|
156
|
+
return "image";
|
|
157
|
+
if (contentType.includes("audio/"))
|
|
158
|
+
return "audio";
|
|
159
|
+
if (contentType.includes("video/"))
|
|
160
|
+
return "video";
|
|
161
|
+
return "binary";
|
|
162
|
+
}
|
|
163
|
+
// =============================================================================
|
|
164
|
+
// Parse OpenAI-format JSON responses
|
|
165
|
+
// =============================================================================
|
|
166
|
+
/**
|
|
167
|
+
* Parse JSON response from Lambda API into unified MultimodalResult
|
|
168
|
+
*/
|
|
169
|
+
export function parseJsonResponse(data) {
|
|
170
|
+
// Error response - handle first to catch errors early
|
|
171
|
+
if (isErrorResponse(data)) {
|
|
172
|
+
const err = data.error;
|
|
173
|
+
const msg = typeof err === "string" ? err : (err?.message || JSON.stringify(err));
|
|
174
|
+
return { type: "text", success: false, error: msg };
|
|
175
|
+
}
|
|
176
|
+
// Agent chat response: { output: string, messages?: [...] }
|
|
177
|
+
if (isAgentChatResponse(data)) {
|
|
178
|
+
return { type: "text", success: true, content: data.output };
|
|
179
|
+
}
|
|
180
|
+
// Manowar multimodal response: { success, type, url, mimeType }
|
|
181
|
+
if (isManowarMultimodalResponse(data)) {
|
|
182
|
+
return {
|
|
183
|
+
type: data.type,
|
|
184
|
+
success: data.success,
|
|
185
|
+
url: data.url, // IPFS URL from backend Pinata upload
|
|
186
|
+
content: data.content,
|
|
187
|
+
mimeType: data.mimeType,
|
|
188
|
+
error: data.error,
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
// Canonical Responses API response
|
|
192
|
+
if (isResponsesResponse(data)) {
|
|
193
|
+
if (data.error?.message) {
|
|
194
|
+
return { type: "text", success: false, error: data.error.message };
|
|
195
|
+
}
|
|
196
|
+
if (data.status === "failed") {
|
|
197
|
+
return { type: "text", success: false, error: data.error?.message || "Request failed" };
|
|
198
|
+
}
|
|
199
|
+
if (data.status === "cancelled") {
|
|
200
|
+
return { type: "text", success: false, error: "Request cancelled" };
|
|
201
|
+
}
|
|
202
|
+
const textParts = [];
|
|
203
|
+
let imageUrl;
|
|
204
|
+
let audioUrl;
|
|
205
|
+
let videoUrl;
|
|
206
|
+
let embedding;
|
|
207
|
+
const outputItems = Array.isArray(data.output) ? data.output : [];
|
|
208
|
+
for (const item of outputItems) {
|
|
209
|
+
if (item.type === "output_text" && typeof item.text === "string") {
|
|
210
|
+
textParts.push(item.text);
|
|
211
|
+
continue;
|
|
212
|
+
}
|
|
213
|
+
if (item.type === "output_text" && Array.isArray(item.content)) {
|
|
214
|
+
for (const part of item.content) {
|
|
215
|
+
if (part &&
|
|
216
|
+
typeof part === "object" &&
|
|
217
|
+
typeof part.text === "string") {
|
|
218
|
+
textParts.push(part.text);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
continue;
|
|
222
|
+
}
|
|
223
|
+
if (item.type === "output_image" && typeof item.image_url === "string") {
|
|
224
|
+
imageUrl = item.image_url;
|
|
225
|
+
continue;
|
|
226
|
+
}
|
|
227
|
+
if (item.type === "output_audio" && typeof item.audio_url === "string") {
|
|
228
|
+
audioUrl = item.audio_url;
|
|
229
|
+
continue;
|
|
230
|
+
}
|
|
231
|
+
if (item.type === "output_video" && typeof item.video_url === "string") {
|
|
232
|
+
videoUrl = item.video_url;
|
|
233
|
+
continue;
|
|
234
|
+
}
|
|
235
|
+
if (item.type === "output_embedding" && Array.isArray(item.embedding)) {
|
|
236
|
+
embedding = item.embedding;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
if (videoUrl) {
|
|
240
|
+
return { type: "video", success: true, url: videoUrl, mimeType: "video/mp4" };
|
|
241
|
+
}
|
|
242
|
+
if (imageUrl) {
|
|
243
|
+
return { type: "image", success: true, url: imageUrl, mimeType: "image/png" };
|
|
244
|
+
}
|
|
245
|
+
if (audioUrl) {
|
|
246
|
+
return { type: "audio", success: true, url: audioUrl, mimeType: "audio/mpeg" };
|
|
247
|
+
}
|
|
248
|
+
if (embedding) {
|
|
249
|
+
return {
|
|
250
|
+
type: "embedding",
|
|
251
|
+
success: true,
|
|
252
|
+
embeddings: embedding,
|
|
253
|
+
content: JSON.stringify(embedding),
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
const text = textParts.join("").trim();
|
|
257
|
+
if (text.length > 0) {
|
|
258
|
+
return { type: "text", success: true, content: text };
|
|
259
|
+
}
|
|
260
|
+
if (data.status === "in_progress" && typeof data.job_id === "string") {
|
|
261
|
+
return {
|
|
262
|
+
type: "video",
|
|
263
|
+
success: true,
|
|
264
|
+
jobId: data.job_id,
|
|
265
|
+
polling: true,
|
|
266
|
+
content: "Video generating... (in_progress)",
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
return { type: "text", success: true, content: "" };
|
|
270
|
+
}
|
|
271
|
+
// Chat completion
|
|
272
|
+
if (isChatCompletionResponse(data)) {
|
|
273
|
+
const rawContent = data.choices?.[0]?.message?.content;
|
|
274
|
+
let content;
|
|
275
|
+
if (typeof rawContent === "string") {
|
|
276
|
+
content = rawContent;
|
|
277
|
+
}
|
|
278
|
+
else if (Array.isArray(rawContent)) {
|
|
279
|
+
content = rawContent.map(p => p.text || "").join("");
|
|
280
|
+
}
|
|
281
|
+
else {
|
|
282
|
+
content = "";
|
|
283
|
+
}
|
|
284
|
+
return {
|
|
285
|
+
type: "text",
|
|
286
|
+
success: true,
|
|
287
|
+
content,
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
// Image response
|
|
291
|
+
if (isImagesResponse(data)) {
|
|
292
|
+
const item = data.data?.[0];
|
|
293
|
+
return {
|
|
294
|
+
type: "image",
|
|
295
|
+
success: true,
|
|
296
|
+
base64: item?.b64_json,
|
|
297
|
+
url: item?.url,
|
|
298
|
+
mimeType: "image/png",
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
// Async video job response (needs polling)
|
|
302
|
+
if (isVideoJobResponse(data)) {
|
|
303
|
+
if (data.status === "completed" && data.url) {
|
|
304
|
+
return {
|
|
305
|
+
type: "video",
|
|
306
|
+
success: true,
|
|
307
|
+
url: data.url,
|
|
308
|
+
mimeType: "video/mp4",
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
if (data.status === "failed") {
|
|
312
|
+
return {
|
|
313
|
+
type: "video",
|
|
314
|
+
success: false,
|
|
315
|
+
error: data.error || "Video generation failed",
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
// Job is still processing - return polling info
|
|
319
|
+
return {
|
|
320
|
+
type: "video",
|
|
321
|
+
success: true,
|
|
322
|
+
jobId: data.id,
|
|
323
|
+
polling: true,
|
|
324
|
+
content: `Video generating... (${data.status})`,
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
// Video response (sync - has data array)
|
|
328
|
+
if (isVideoResponse(data)) {
|
|
329
|
+
const item = data.data?.[0];
|
|
330
|
+
return {
|
|
331
|
+
type: "video",
|
|
332
|
+
success: true,
|
|
333
|
+
base64: item?.b64_json,
|
|
334
|
+
url: item?.url,
|
|
335
|
+
mimeType: "video/mp4",
|
|
336
|
+
};
|
|
337
|
+
}
|
|
338
|
+
// Embedding response
|
|
339
|
+
if (isEmbeddingResponse(data)) {
|
|
340
|
+
return {
|
|
341
|
+
type: "embedding",
|
|
342
|
+
success: true,
|
|
343
|
+
embeddings: data.data?.[0]?.embedding,
|
|
344
|
+
content: JSON.stringify(data.data?.[0]?.embedding),
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
// Transcription response
|
|
348
|
+
if (isTranscriptionResponse(data)) {
|
|
349
|
+
return {
|
|
350
|
+
type: "text",
|
|
351
|
+
success: true,
|
|
352
|
+
content: data.text,
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
// Fallback: stringify unknown
|
|
356
|
+
return {
|
|
357
|
+
type: "text",
|
|
358
|
+
success: true,
|
|
359
|
+
content: typeof data === "string" ? data : JSON.stringify(data),
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
// Type guards
|
|
363
|
+
function isChatCompletionResponse(data) {
|
|
364
|
+
return !!data && typeof data === "object" && "choices" in data && Array.isArray(data.choices);
|
|
365
|
+
}
|
|
366
|
+
function isImagesResponse(data) {
|
|
367
|
+
return !!data && typeof data === "object" && "data" in data &&
|
|
368
|
+
Array.isArray(data.data) &&
|
|
369
|
+
(data.data[0]?.b64_json !== undefined || data.data[0]?.url !== undefined);
|
|
370
|
+
}
|
|
371
|
+
function isVideoResponse(data) {
|
|
372
|
+
if (!data || typeof data !== "object" || !("data" in data))
|
|
373
|
+
return false;
|
|
374
|
+
const arr = data.data;
|
|
375
|
+
if (!Array.isArray(arr) || arr.length === 0)
|
|
376
|
+
return false;
|
|
377
|
+
// Must have video data item with either b64_json or url
|
|
378
|
+
const item = arr[0];
|
|
379
|
+
return item && (item.b64_json !== undefined || item.url !== undefined);
|
|
380
|
+
}
|
|
381
|
+
function isVideoJobResponse(data) {
|
|
382
|
+
if (!data || typeof data !== "object")
|
|
383
|
+
return false;
|
|
384
|
+
const d = data;
|
|
385
|
+
// Must have id and status, and object should be "video.generation"
|
|
386
|
+
return typeof d.id === "string" &&
|
|
387
|
+
typeof d.status === "string" &&
|
|
388
|
+
d.object === "video.generation";
|
|
389
|
+
}
|
|
390
|
+
function isResponsesResponse(data) {
|
|
391
|
+
if (!data || typeof data !== "object")
|
|
392
|
+
return false;
|
|
393
|
+
const response = data;
|
|
394
|
+
return response.object === "response" &&
|
|
395
|
+
typeof response.id === "string";
|
|
396
|
+
}
|
|
397
|
+
function isEmbeddingResponse(data) {
|
|
398
|
+
return !!data && typeof data === "object" && "data" in data &&
|
|
399
|
+
data.object === "list";
|
|
400
|
+
}
|
|
401
|
+
function isTranscriptionResponse(data) {
|
|
402
|
+
return !!data && typeof data === "object" && "text" in data &&
|
|
403
|
+
typeof data.text === "string";
|
|
404
|
+
}
|
|
405
|
+
function isErrorResponse(data) {
|
|
406
|
+
return !!data && typeof data === "object" && "error" in data;
|
|
407
|
+
}
|
|
408
|
+
function isAgentChatResponse(data) {
|
|
409
|
+
return !!data && typeof data === "object" && "output" in data &&
|
|
410
|
+
typeof data.output === "string";
|
|
411
|
+
}
|
|
412
|
+
function isManowarMultimodalResponse(data) {
|
|
413
|
+
if (!data || typeof data !== "object")
|
|
414
|
+
return false;
|
|
415
|
+
const d = data;
|
|
416
|
+
// Must have success (boolean) and type (valid multimodal type)
|
|
417
|
+
if (typeof d.success !== "boolean")
|
|
418
|
+
return false;
|
|
419
|
+
if (typeof d.type !== "string")
|
|
420
|
+
return false;
|
|
421
|
+
const validTypes = ["text", "image", "audio", "video", "embedding"];
|
|
422
|
+
return validTypes.includes(d.type);
|
|
423
|
+
}
|
|
424
|
+
// =============================================================================
|
|
425
|
+
// Global API Configuration - NO Frontend Timeouts (Always-on Pattern)
|
|
426
|
+
// =============================================================================
|
|
427
|
+
export const TIMEOUT_CONFIG = {
|
|
428
|
+
FETCH_TIMEOUT_MS: undefined,
|
|
429
|
+
VIDEO_POLL: {
|
|
430
|
+
INTERVAL_MS: 5000,
|
|
431
|
+
MAX_ATTEMPTS: parseInt(import.meta.env.VITE_VIDEO_POLL_MAX_ATTEMPTS || "900", 10),
|
|
432
|
+
},
|
|
433
|
+
SSE_RETRY: {
|
|
434
|
+
INITIAL_DELAY_MS: 1000,
|
|
435
|
+
MAX_DELAY_MS: 30000,
|
|
436
|
+
BACKOFF_MULTIPLIER: 2,
|
|
437
|
+
},
|
|
438
|
+
SESSION_POLL: {
|
|
439
|
+
INTERVAL_MS: 2000,
|
|
440
|
+
MAX_ATTEMPTS: 30,
|
|
441
|
+
},
|
|
442
|
+
};
|
|
443
|
+
//# sourceMappingURL=api.js.map
|