@signalcore/ui 0.1.0 → 1.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +896 -513
- package/dist/AgentAbout.d.ts +186 -0
- package/dist/AgentAbout.js +1020 -0
- package/dist/AgentAbout.js.map +1 -0
- package/dist/AgentCard.d.ts +49 -0
- package/dist/AgentCard.js +77 -0
- package/dist/AgentCard.js.map +1 -0
- package/dist/AgentChat.d.ts +233 -0
- package/dist/AgentChat.js +1119 -0
- package/dist/AgentChat.js.map +1 -0
- package/dist/AgentSpace.d.ts +112 -0
- package/dist/AgentSpace.js +339 -0
- package/dist/AgentSpace.js.map +1 -0
- package/dist/AgentTasks.d.ts +48 -0
- package/dist/AgentTasks.js +120 -0
- package/dist/AgentTasks.js.map +1 -0
- package/dist/BrowserView.d.ts +52 -0
- package/dist/BrowserView.js +328 -0
- package/dist/BrowserView.js.map +1 -0
- package/dist/FileView.d.ts +63 -0
- package/dist/FileView.js +449 -0
- package/dist/FileView.js.map +1 -0
- package/dist/Modes.d.ts +13 -0
- package/dist/Modes.js +75 -0
- package/dist/Modes.js.map +1 -0
- package/dist/VoiceCall.d.ts +91 -0
- package/dist/VoiceCall.js +302 -0
- package/dist/VoiceCall.js.map +1 -0
- package/dist/about.d.ts +212 -0
- package/dist/about.js +136 -0
- package/dist/about.js.map +1 -0
- package/dist/agentIcons.d.ts +33 -0
- package/dist/agentIcons.js +36 -0
- package/dist/agentIcons.js.map +1 -0
- package/dist/automation/Automation.d.ts +35 -0
- package/dist/automation/Automation.js +268 -0
- package/dist/automation/Automation.js.map +1 -0
- package/dist/automation/RunView.d.ts +25 -0
- package/dist/automation/RunView.js +187 -0
- package/dist/automation/RunView.js.map +1 -0
- package/dist/automation/cron.d.ts +41 -0
- package/dist/automation/cron.js +169 -0
- package/dist/automation/cron.js.map +1 -0
- package/dist/automation/marks.js +121 -0
- package/dist/automation/marks.js.map +1 -0
- package/dist/automation/messages.d.ts +113 -0
- package/dist/automation/messages.js +113 -0
- package/dist/automation/messages.js.map +1 -0
- package/dist/automation/record.d.ts +47 -0
- package/dist/automation/record.js +177 -0
- package/dist/automation/record.js.map +1 -0
- package/dist/automation/types.d.ts +143 -0
- package/dist/automation/when.d.ts +36 -0
- package/dist/automation/when.js +168 -0
- package/dist/automation/when.js.map +1 -0
- package/dist/blocks.d.ts +185 -0
- package/dist/browser.js +292 -0
- package/dist/browser.js.map +1 -0
- package/dist/call.d.ts +89 -0
- package/dist/call.js +218 -0
- package/dist/call.js.map +1 -0
- package/dist/channelParts.js +26 -0
- package/dist/channelParts.js.map +1 -0
- package/dist/classes.js +8 -3
- package/dist/classes.js.map +1 -0
- package/dist/client.d.ts +146 -54
- package/dist/client.js +204 -1
- package/dist/client.js.map +1 -0
- package/dist/conversationFiles.js +46 -0
- package/dist/conversationFiles.js.map +1 -0
- package/dist/credentials.d.ts +45 -0
- package/dist/credentials.js +98 -0
- package/dist/credentials.js.map +1 -0
- package/dist/dev.js +17 -0
- package/dist/dev.js.map +1 -0
- package/dist/es.d.ts +17 -0
- package/dist/es.js +382 -0
- package/dist/es.js.map +1 -0
- package/dist/files.d.ts +21 -0
- package/dist/files.js +214 -0
- package/dist/files.js.map +1 -0
- package/dist/frames.d.ts +115 -0
- package/dist/frames.js +219 -0
- package/dist/frames.js.map +1 -0
- package/dist/icons.js +29 -0
- package/dist/icons.js.map +1 -0
- package/dist/index.d.ts +63 -60
- package/dist/index.js +59 -45
- package/dist/kit/AudioPlayer.d.ts +20 -0
- package/dist/kit/AudioPlayer.js +116 -0
- package/dist/kit/AudioPlayer.js.map +1 -0
- package/dist/kit/Button.d.ts +29 -0
- package/dist/kit/Button.js +59 -0
- package/dist/kit/Button.js.map +1 -0
- package/dist/kit/Card.d.ts +16 -0
- package/dist/kit/Card.js +36 -0
- package/dist/kit/Card.js.map +1 -0
- package/dist/kit/Chart.js +152 -0
- package/dist/kit/Chart.js.map +1 -0
- package/dist/kit/Choices.d.ts +21 -0
- package/dist/kit/Choices.js +99 -0
- package/dist/kit/Choices.js.map +1 -0
- package/dist/kit/Combobox.d.ts +26 -0
- package/dist/kit/Combobox.js +190 -0
- package/dist/kit/Combobox.js.map +1 -0
- package/dist/kit/DateField.d.ts +17 -0
- package/dist/kit/DateField.js +133 -0
- package/dist/kit/DateField.js.map +1 -0
- package/dist/kit/Field.d.ts +40 -0
- package/dist/kit/Field.js +98 -0
- package/dist/kit/Field.js.map +1 -0
- package/dist/kit/FileField.d.ts +113 -0
- package/dist/kit/FileField.js +341 -0
- package/dist/kit/FileField.js.map +1 -0
- package/dist/kit/FileMark.d.ts +15 -0
- package/dist/kit/FileMark.js +39 -0
- package/dist/kit/FileMark.js.map +1 -0
- package/dist/kit/Inputs.d.ts +59 -0
- package/dist/kit/Inputs.js +205 -0
- package/dist/kit/Inputs.js.map +1 -0
- package/dist/kit/List.d.ts +47 -0
- package/dist/kit/List.js +85 -0
- package/dist/kit/List.js.map +1 -0
- package/dist/kit/Mark.d.ts +30 -0
- package/dist/kit/Mark.js +27 -0
- package/dist/kit/Mark.js.map +1 -0
- package/dist/kit/MarkStack.d.ts +15 -0
- package/dist/kit/MarkStack.js +26 -0
- package/dist/kit/MarkStack.js.map +1 -0
- package/dist/kit/Note.d.ts +11 -0
- package/dist/kit/Note.js +31 -0
- package/dist/kit/Note.js.map +1 -0
- package/dist/kit/Popover.js +90 -0
- package/dist/kit/Popover.js.map +1 -0
- package/dist/kit/RangeField.d.ts +14 -0
- package/dist/kit/RangeField.js +47 -0
- package/dist/kit/RangeField.js.map +1 -0
- package/dist/kit/RatingField.d.ts +14 -0
- package/dist/kit/RatingField.js +50 -0
- package/dist/kit/RatingField.js.map +1 -0
- package/dist/kit/Stat.d.ts +26 -0
- package/dist/kit/Stat.js +46 -0
- package/dist/kit/Stat.js.map +1 -0
- package/dist/kit/Switch.d.ts +14 -0
- package/dist/kit/Switch.js +21 -0
- package/dist/kit/Switch.js.map +1 -0
- package/dist/kit/Tag.d.ts +16 -0
- package/dist/kit/Tag.js +20 -0
- package/dist/kit/Tag.js.map +1 -0
- package/dist/kit/Tile.d.ts +34 -0
- package/dist/kit/Tile.js +52 -0
- package/dist/kit/Tile.js.map +1 -0
- package/dist/kit/TimeField.d.ts +31 -0
- package/dist/kit/TimeField.js +109 -0
- package/dist/kit/TimeField.js.map +1 -0
- package/dist/kit/context.d.ts +22 -0
- package/dist/kit/context.js +46 -0
- package/dist/kit/context.js.map +1 -0
- package/dist/kit/dates.d.ts +14 -0
- package/dist/kit/dates.js +129 -0
- package/dist/kit/dates.js.map +1 -0
- package/dist/kit/messages.d.ts +99 -0
- package/dist/kit/messages.js +66 -0
- package/dist/kit/messages.js.map +1 -0
- package/dist/kit/numbers.d.ts +12 -0
- package/dist/kit/numbers.js +40 -0
- package/dist/kit/numbers.js.map +1 -0
- package/dist/kit/options.d.ts +10 -0
- package/dist/kit/options.js +23 -0
- package/dist/kit/options.js.map +1 -0
- package/dist/kit/uploads.d.ts +42 -0
- package/dist/kit/uploads.js +165 -0
- package/dist/kit/uploads.js.map +1 -0
- package/dist/kit/waveform.js +76 -0
- package/dist/kit/waveform.js.map +1 -0
- package/dist/locale.d.ts +1 -0
- package/dist/locale.js +1 -0
- package/dist/markdown.js +84 -0
- package/dist/markdown.js.map +1 -0
- package/dist/marks.js +217 -0
- package/dist/marks.js.map +1 -0
- package/dist/reveal.js +48 -0
- package/dist/reveal.js.map +1 -0
- package/dist/stepGlyphs.js +62 -0
- package/dist/stepGlyphs.js.map +1 -0
- package/dist/surface/Form.js +264 -0
- package/dist/surface/Form.js.map +1 -0
- package/dist/surface/Markdown.js +42 -0
- package/dist/surface/Markdown.js.map +1 -0
- package/dist/surface/Surface.d.ts +31 -17
- package/dist/surface/Surface.js +480 -57
- package/dist/surface/Surface.js.map +1 -0
- package/dist/surface/scope.d.ts +32 -0
- package/dist/surface/scope.js +23 -0
- package/dist/surface/scope.js.map +1 -0
- package/dist/surface/values.d.ts +44 -0
- package/dist/surface/values.js +237 -0
- package/dist/surface/values.js.map +1 -0
- package/dist/tint.d.ts +10 -0
- package/dist/tint.js +19 -0
- package/dist/tint.js.map +1 -0
- package/dist/types.d.ts +534 -0
- package/dist/types.js +16 -0
- package/dist/types.js.map +1 -0
- package/dist/useAgentFace.d.ts +18 -0
- package/dist/useAgentFace.js +45 -0
- package/dist/useAgentFace.js.map +1 -0
- package/dist/useCall.d.ts +39 -0
- package/dist/useCall.js +273 -0
- package/dist/useCall.js.map +1 -0
- package/dist/useConversation.d.ts +77 -0
- package/dist/useConversation.js +523 -0
- package/dist/useConversation.js.map +1 -0
- package/dist/useDictation.d.ts +17 -0
- package/dist/useDictation.js +68 -0
- package/dist/useDictation.js.map +1 -0
- package/dist/useLive.d.ts +26 -0
- package/dist/useLive.js +88 -0
- package/dist/useLive.js.map +1 -0
- package/dist/usePolled.js +68 -0
- package/dist/usePolled.js.map +1 -0
- package/dist/voice/Orb.d.ts +10 -9
- package/dist/voice/Orb.js +43 -39
- package/dist/voice/Orb.js.map +1 -0
- package/dist/voice/StillOrb.js +33 -0
- package/dist/voice/StillOrb.js.map +1 -0
- package/dist/voice/WebGLOrb.js +98 -0
- package/dist/voice/WebGLOrb.js.map +1 -0
- package/dist/voice/fluidDots.js +161 -0
- package/dist/voice/fluidDots.js.map +1 -0
- package/dist/voice/motion.js +84 -0
- package/dist/voice/motion.js.map +1 -0
- package/dist/voice/orbs.d.ts +32 -0
- package/dist/voice/orbs.js +16 -0
- package/dist/voice/orbs.js.map +1 -0
- package/dist/voice/useReducedMotion.js +16 -16
- package/dist/voice/useReducedMotion.js.map +1 -0
- package/dist/voice/wave.js +116 -0
- package/dist/voice/wave.js.map +1 -0
- package/dist/voice/webgl.js +177 -0
- package/dist/voice/webgl.js.map +1 -0
- package/dist/widget.js +284 -8
- package/package.json +49 -39
- package/src/AgentAbout.tsx +1621 -0
- package/src/AgentCard.tsx +123 -0
- package/src/AgentChat.tsx +1795 -0
- package/src/AgentSpace.tsx +540 -0
- package/src/AgentTasks.tsx +163 -0
- package/src/BrowserView.tsx +442 -0
- package/src/FileView.tsx +620 -0
- package/src/Modes.tsx +112 -0
- package/src/VoiceCall.tsx +411 -0
- package/src/about.ts +355 -0
- package/src/agentIcons.ts +56 -0
- package/src/automation/Automation.tsx +308 -0
- package/src/automation/RunView.tsx +213 -0
- package/src/automation/cron.ts +196 -0
- package/src/automation/marks.tsx +144 -0
- package/src/automation/messages.ts +231 -0
- package/src/automation/record.ts +206 -0
- package/src/automation/types.ts +146 -0
- package/src/automation/when.ts +195 -0
- package/src/blocks.ts +249 -0
- package/src/browser.ts +334 -0
- package/src/call.ts +300 -0
- package/src/channelParts.ts +17 -0
- package/src/classes.ts +10 -0
- package/src/client.ts +397 -0
- package/src/conversationFiles.ts +54 -0
- package/src/credentials.ts +158 -0
- package/src/dev.ts +20 -0
- package/src/es.ts +423 -0
- package/src/files.ts +238 -0
- package/src/frames.ts +291 -0
- package/src/icons.tsx +49 -0
- package/src/index.ts +270 -0
- package/src/kit/AudioPlayer.tsx +129 -0
- package/src/kit/Button.tsx +97 -0
- package/src/kit/Card.tsx +47 -0
- package/src/kit/Chart.tsx +129 -0
- package/src/kit/Choices.tsx +131 -0
- package/src/kit/Combobox.tsx +247 -0
- package/src/kit/DateField.tsx +156 -0
- package/src/kit/Field.tsx +137 -0
- package/src/kit/FileField.tsx +492 -0
- package/src/kit/FileMark.tsx +56 -0
- package/src/kit/Inputs.tsx +250 -0
- package/src/kit/List.tsx +135 -0
- package/src/kit/Mark.tsx +64 -0
- package/src/kit/MarkStack.tsx +29 -0
- package/src/kit/Note.tsx +42 -0
- package/src/kit/Popover.tsx +121 -0
- package/src/kit/RangeField.tsx +53 -0
- package/src/kit/RatingField.tsx +62 -0
- package/src/kit/Stat.tsx +60 -0
- package/src/kit/Switch.tsx +28 -0
- package/src/kit/Tag.tsx +32 -0
- package/src/kit/Tile.tsx +74 -0
- package/src/kit/TimeField.tsx +157 -0
- package/src/kit/context.tsx +246 -0
- package/src/kit/dates.ts +150 -0
- package/src/kit/messages.ts +160 -0
- package/src/kit/numbers.ts +44 -0
- package/src/kit/options.ts +30 -0
- package/src/kit/uploads.ts +244 -0
- package/src/kit/waveform.ts +84 -0
- package/src/locale.ts +6 -0
- package/src/markdown.ts +69 -0
- package/src/marks.tsx +328 -0
- package/src/reveal.ts +52 -0
- package/src/stepGlyphs.ts +83 -0
- package/src/styles.css +6961 -0
- package/src/surface/Form.tsx +299 -0
- package/src/surface/Markdown.tsx +55 -0
- package/src/surface/Surface.tsx +605 -0
- package/src/surface/scope.ts +82 -0
- package/src/surface/values.ts +361 -0
- package/src/tint.ts +14 -0
- package/src/types.ts +596 -0
- package/src/useAgentFace.ts +47 -0
- package/src/useCall.ts +292 -0
- package/src/useConversation.ts +627 -0
- package/src/useDictation.ts +83 -0
- package/src/useLive.ts +115 -0
- package/src/usePolled.ts +60 -0
- package/src/voice/Orb.tsx +45 -0
- package/src/voice/StillOrb.tsx +29 -0
- package/src/voice/WebGLOrb.tsx +98 -0
- package/src/voice/fluidDots.tsx +171 -0
- package/src/voice/motion.ts +112 -0
- package/src/voice/orbs.ts +39 -0
- package/src/voice/useReducedMotion.ts +24 -0
- package/src/voice/wave.tsx +129 -0
- package/src/voice/webgl.ts +209 -0
- package/src/widget/css.d.ts +5 -0
- package/src/widget/element.tsx +535 -0
- package/src/widget/index.ts +10 -0
- package/src/widget/mount.ts +27 -0
- package/src/widget/widget.css +253 -0
- package/dist/SignalcoreProvider.d.ts +0 -113
- package/dist/SignalcoreProvider.js +0 -84
- package/dist/automations/AppMarks.d.ts +0 -11
- package/dist/automations/AppMarks.js +0 -18
- package/dist/automations/AutomationCard.d.ts +0 -27
- package/dist/automations/AutomationCard.js +0 -53
- package/dist/automations/AutomationsWindow.d.ts +0 -38
- package/dist/automations/AutomationsWindow.js +0 -57
- package/dist/automations/Card.d.ts +0 -46
- package/dist/automations/Card.js +0 -45
- package/dist/automations/ScheduleMarks.d.ts +0 -13
- package/dist/automations/ScheduleMarks.js +0 -24
- package/dist/automations/presentationIcons.d.ts +0 -7
- package/dist/automations/presentationIcons.js +0 -67
- package/dist/automations/schedule.d.ts +0 -25
- package/dist/automations/schedule.js +0 -59
- package/dist/automations/time.d.ts +0 -3
- package/dist/automations/time.js +0 -25
- package/dist/browser/BrowserView.d.ts +0 -43
- package/dist/browser/BrowserView.js +0 -94
- package/dist/browser/room.d.ts +0 -21
- package/dist/browser/room.js +0 -33
- package/dist/browser/useBrowserSession.d.ts +0 -17
- package/dist/browser/useBrowserSession.js +0 -67
- package/dist/builder/BuilderChat.d.ts +0 -32
- package/dist/builder/BuilderChat.js +0 -41
- package/dist/builder/BuilderTranscript.d.ts +0 -49
- package/dist/builder/BuilderTranscript.js +0 -62
- package/dist/builder/StatusLine.d.ts +0 -8
- package/dist/builder/StatusLine.js +0 -17
- package/dist/builder/answer.d.ts +0 -7
- package/dist/builder/answer.js +0 -8
- package/dist/builder/blocks.d.ts +0 -31
- package/dist/builder/blocks.js +0 -74
- package/dist/builder/items.d.ts +0 -15
- package/dist/builder/items.js +0 -21
- package/dist/builder/steps.d.ts +0 -20
- package/dist/builder/steps.js +0 -120
- package/dist/builder/time.d.ts +0 -4
- package/dist/builder/time.js +0 -24
- package/dist/builder/useBuildSession.d.ts +0 -36
- package/dist/builder/useBuildSession.js +0 -130
- package/dist/builder/workingOn.d.ts +0 -7
- package/dist/builder/workingOn.js +0 -15
- package/dist/chat/AgentChat.d.ts +0 -37
- package/dist/chat/AgentChat.js +0 -21
- package/dist/chat/ChatView.d.ts +0 -25
- package/dist/chat/ChatView.js +0 -34
- package/dist/chat/Composer.d.ts +0 -20
- package/dist/chat/Composer.js +0 -22
- package/dist/chat/MessageRow.d.ts +0 -22
- package/dist/chat/MessageRow.js +0 -32
- package/dist/chat/arrival.d.ts +0 -15
- package/dist/chat/arrival.js +0 -25
- package/dist/chat/history.d.ts +0 -24
- package/dist/chat/history.js +0 -45
- package/dist/chat/moments.d.ts +0 -25
- package/dist/chat/moments.js +0 -72
- package/dist/chat/types.d.ts +0 -12
- package/dist/chat/types.js +0 -1
- package/dist/chat/useComposer.d.ts +0 -46
- package/dist/chat/useComposer.js +0 -62
- package/dist/chat/useConversation.d.ts +0 -35
- package/dist/chat/useConversation.js +0 -71
- package/dist/chat/useStickToBottom.d.ts +0 -9
- package/dist/chat/useStickToBottom.js +0 -33
- package/dist/chat/useTurns.d.ts +0 -49
- package/dist/chat/useTurns.js +0 -111
- package/dist/classes.d.ts +0 -2
- package/dist/development.d.ts +0 -5
- package/dist/development.js +0 -8
- package/dist/flow/FlowWindow.d.ts +0 -42
- package/dist/flow/FlowWindow.js +0 -126
- package/dist/flow/index.d.ts +0 -16
- package/dist/flow/index.js +0 -16
- package/dist/flow/kinds.d.ts +0 -23
- package/dist/flow/kinds.js +0 -48
- package/dist/flow/map.d.ts +0 -44
- package/dist/flow/map.js +0 -225
- package/dist/flow/nodePaths.d.ts +0 -7
- package/dist/flow/nodePaths.js +0 -17
- package/dist/flow/relations.d.ts +0 -42
- package/dist/flow/relations.js +0 -174
- package/dist/host.d.ts +0 -124
- package/dist/host.js +0 -1
- package/dist/live/LiveView.d.ts +0 -28
- package/dist/live/LiveView.js +0 -55
- package/dist/live/capture.d.ts +0 -20
- package/dist/live/capture.js +0 -100
- package/dist/live/follow.d.ts +0 -26
- package/dist/live/follow.js +0 -72
- package/dist/live/paint.d.ts +0 -13
- package/dist/live/paint.js +0 -77
- package/dist/live/useLiveStream.d.ts +0 -16
- package/dist/live/useLiveStream.js +0 -57
- package/dist/look.d.ts +0 -33
- package/dist/look.js +0 -241
- package/dist/messages/en.d.ts +0 -3
- package/dist/messages/en.js +0 -251
- package/dist/messages/es.d.ts +0 -3
- package/dist/messages/es.js +0 -251
- package/dist/messages/index.d.ts +0 -16
- package/dist/messages/index.js +0 -33
- package/dist/messages/types.d.ts +0 -246
- package/dist/messages/types.js +0 -1
- package/dist/parts/Button.d.ts +0 -18
- package/dist/parts/Button.js +0 -17
- package/dist/parts/Icon.d.ts +0 -39
- package/dist/parts/Icon.js +0 -37
- package/dist/parts/Input.d.ts +0 -6
- package/dist/parts/Input.js +0 -11
- package/dist/parts/Spinner.d.ts +0 -2
- package/dist/parts/Spinner.js +0 -7
- package/dist/patterns.d.ts +0 -15
- package/dist/patterns.js +0 -5
- package/dist/presets.d.ts +0 -82
- package/dist/presets.js +0 -81
- package/dist/primitives.d.ts +0 -22
- package/dist/primitives.js +0 -58
- package/dist/request/RequestCard.d.ts +0 -34
- package/dist/request/RequestCard.js +0 -101
- package/dist/request/approval/ApprovalPreview.d.ts +0 -5
- package/dist/request/approval/ApprovalPreview.js +0 -27
- package/dist/request/approval/shapes.d.ts +0 -32
- package/dist/request/approval/shapes.js +0 -68
- package/dist/request/apps.d.ts +0 -11
- package/dist/request/apps.js +0 -27
- package/dist/request/cards.d.ts +0 -12
- package/dist/request/cards.js +0 -24
- package/dist/request/deliver.d.ts +0 -12
- package/dist/request/deliver.js +0 -21
- package/dist/request/handOver.d.ts +0 -18
- package/dist/request/handOver.js +0 -33
- package/dist/request/kinds/Approval.d.ts +0 -3
- package/dist/request/kinds/Approval.js +0 -9
- package/dist/request/kinds/Choice.d.ts +0 -3
- package/dist/request/kinds/Choice.js +0 -8
- package/dist/request/kinds/Connect.d.ts +0 -9
- package/dist/request/kinds/Connect.js +0 -119
- package/dist/request/kinds/FreeText.d.ts +0 -3
- package/dist/request/kinds/FreeText.js +0 -20
- package/dist/request/kinds/HandOver.d.ts +0 -13
- package/dist/request/kinds/HandOver.js +0 -20
- package/dist/request/kinds/Secret.d.ts +0 -7
- package/dist/request/kinds/Secret.js +0 -49
- package/dist/request/kinds/Upload.d.ts +0 -6
- package/dist/request/kinds/Upload.js +0 -47
- package/dist/request/types.d.ts +0 -83
- package/dist/request/types.js +0 -1
- package/dist/safeUrl.d.ts +0 -6
- package/dist/safeUrl.js +0 -8
- package/dist/stream/builder.d.ts +0 -176
- package/dist/stream/builder.js +0 -202
- package/dist/stream/reduce.d.ts +0 -51
- package/dist/stream/reduce.js +0 -58
- package/dist/stream/untilAborted.d.ts +0 -7
- package/dist/stream/untilAborted.js +0 -32
- package/dist/stream/useRunStream.d.ts +0 -26
- package/dist/stream/useRunStream.js +0 -137
- package/dist/styles.css +0 -2318
- package/dist/surface/HostNode.d.ts +0 -14
- package/dist/surface/HostNode.js +0 -30
- package/dist/surface/Node.d.ts +0 -7
- package/dist/surface/Node.js +0 -49
- package/dist/surface/SurfaceBoundary.d.ts +0 -26
- package/dist/surface/SurfaceBoundary.js +0 -20
- package/dist/surface/bindings.d.ts +0 -14
- package/dist/surface/bindings.js +0 -37
- package/dist/surface/check.d.ts +0 -27
- package/dist/surface/check.js +0 -102
- package/dist/surface/format.d.ts +0 -10
- package/dist/surface/format.js +0 -32
- package/dist/surface/hosts.d.ts +0 -6
- package/dist/surface/hosts.js +0 -11
- package/dist/surface/scene.d.ts +0 -21
- package/dist/surface/scene.js +0 -8
- package/dist/surface/templates/Browser.d.ts +0 -6
- package/dist/surface/templates/Browser.js +0 -11
- package/dist/surface/templates/Chart.d.ts +0 -6
- package/dist/surface/templates/Chart.js +0 -13
- package/dist/surface/templates/Choices.d.ts +0 -3
- package/dist/surface/templates/Choices.js +0 -12
- package/dist/surface/templates/Form.d.ts +0 -3
- package/dist/surface/templates/Form.js +0 -44
- package/dist/surface/templates/KeyValue.d.ts +0 -3
- package/dist/surface/templates/KeyValue.js +0 -7
- package/dist/surface/templates/Layout.d.ts +0 -5
- package/dist/surface/templates/Layout.js +0 -16
- package/dist/surface/templates/Live.d.ts +0 -6
- package/dist/surface/templates/Live.js +0 -9
- package/dist/surface/templates/Media.d.ts +0 -5
- package/dist/surface/templates/Media.js +0 -13
- package/dist/surface/templates/Slots.d.ts +0 -3
- package/dist/surface/templates/Slots.js +0 -19
- package/dist/surface/templates/Table.d.ts +0 -3
- package/dist/surface/templates/Table.js +0 -12
- package/dist/surface/templates/Text.d.ts +0 -4
- package/dist/surface/templates/Text.js +0 -15
- package/dist/surface/templates/index.d.ts +0 -7
- package/dist/surface/templates/index.js +0 -32
- package/dist/surface/types.d.ts +0 -68
- package/dist/surface/types.js +0 -6
- package/dist/theme.d.ts +0 -62
- package/dist/theme.js +0 -9
- package/dist/useTokens.d.ts +0 -7
- package/dist/useTokens.js +0 -41
- package/dist/voice/VoiceWindow.d.ts +0 -18
- package/dist/voice/VoiceWindow.js +0 -35
- package/dist/voice/index.d.ts +0 -13
- package/dist/voice/index.js +0 -12
- package/dist/voice/meter.d.ts +0 -16
- package/dist/voice/meter.js +0 -52
- package/dist/voice/orbColors.d.ts +0 -16
- package/dist/voice/orbColors.js +0 -75
- package/dist/voice/pushable.d.ts +0 -16
- package/dist/voice/pushable.js +0 -56
- package/dist/voice/useDictation.d.ts +0 -24
- package/dist/voice/useDictation.js +0 -60
- package/dist/voice/useReducedMotion.d.ts +0 -5
- package/dist/voice/useVoice.d.ts +0 -70
- package/dist/voice/useVoice.js +0 -197
- package/dist/voice/useVoicePrimitives.d.ts +0 -7
- package/dist/voice/useVoicePrimitives.js +0 -11
- package/dist/voice/voice.d.ts +0 -55
- package/dist/voice/voice.js +0 -9
- package/dist/voice/webSpeech.d.ts +0 -33
- package/dist/voice/webSpeech.js +0 -258
- package/dist/widget.js.map +0 -1
- package/dist/windows/AgentSpace.d.ts +0 -78
- package/dist/windows/AgentSpace.js +0 -135
- package/dist/windows/Captions.d.ts +0 -13
- package/dist/windows/Captions.js +0 -22
- package/dist/windows/Dock.d.ts +0 -37
- package/dist/windows/Dock.js +0 -22
- package/dist/windows/Journal.d.ts +0 -15
- package/dist/windows/Journal.js +0 -19
- package/dist/windows/KindMark.d.ts +0 -7
- package/dist/windows/KindMark.js +0 -31
- package/dist/windows/Pending.d.ts +0 -8
- package/dist/windows/Pending.js +0 -17
- package/dist/windows/Stage.d.ts +0 -18
- package/dist/windows/Stage.js +0 -21
- package/dist/windows/StatusLabel.d.ts +0 -9
- package/dist/windows/StatusLabel.js +0 -7
- package/dist/windows/Strip.d.ts +0 -17
- package/dist/windows/Strip.js +0 -42
- package/dist/windows/SurfaceWindow.d.ts +0 -20
- package/dist/windows/SurfaceWindow.js +0 -12
- package/dist/windows/WindowFrame.d.ts +0 -23
- package/dist/windows/WindowFrame.js +0 -22
- package/dist/windows/hearing.d.ts +0 -11
- package/dist/windows/hearing.js +0 -26
- package/dist/windows/kinds.d.ts +0 -47
- package/dist/windows/kinds.js +0 -28
- package/dist/windows/reduce.d.ts +0 -98
- package/dist/windows/reduce.js +0 -151
- package/dist/windows/registry.d.ts +0 -18
- package/dist/windows/registry.js +0 -61
- package/dist/windows/reveal.d.ts +0 -9
- package/dist/windows/reveal.js +0 -6
- package/dist/windows/space.d.ts +0 -21
- package/dist/windows/space.js +0 -6
- package/dist/windows/status.d.ts +0 -11
- package/dist/windows/status.js +0 -30
- package/dist/windows/types.d.ts +0 -15
- package/dist/windows/types.js +0 -1
- package/dist/windows/useLoaded.d.ts +0 -44
- package/dist/windows/useLoaded.js +0 -58
- package/dist/windows/useUnread.d.ts +0 -7
- package/dist/windows/useUnread.js +0 -21
- package/dist/windows/useWindows.d.ts +0 -70
- package/dist/windows/useWindows.js +0 -60
package/src/frames.ts
ADDED
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
import type { Surface } from "./blocks";
|
|
2
|
+
import type {
|
|
3
|
+
Action,
|
|
4
|
+
Attachment,
|
|
5
|
+
BrowserControl,
|
|
6
|
+
BrowserFrame,
|
|
7
|
+
BrowserInput,
|
|
8
|
+
BrowserState,
|
|
9
|
+
Decides,
|
|
10
|
+
Decision,
|
|
11
|
+
Handover,
|
|
12
|
+
Holder,
|
|
13
|
+
Message,
|
|
14
|
+
Request,
|
|
15
|
+
Step,
|
|
16
|
+
StepState,
|
|
17
|
+
ToolCall,
|
|
18
|
+
} from "./types";
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The frames of a conversation's socket, as v3/README.md documents them. Down: a message stored;
|
|
22
|
+
* a piece of the reply as it streams; a surface the agent shows (`awaits`: the turn stops until
|
|
23
|
+
* the person acts on it); an action running, told again as its state moves; an action that needs
|
|
24
|
+
* a yes, the person's (the turn stopped) or the business's (`decides`: the turn went on); the
|
|
25
|
+
* conversation handed to a person, and why (the agent stays quiet in it
|
|
26
|
+
* until it is released); the turn over, or stopped by the person; or what went wrong (`code` for
|
|
27
|
+
* the app to word, `detail` for a log). A socket that opens mid-turn is first told the turn so
|
|
28
|
+
* far, from the person's message on. Who answers the conversation, after any change of it (`holder`:
|
|
29
|
+
* who now, and the change); and what was decided of a person's message, when it is stored,
|
|
30
|
+
* settles or is cleared (`decision`, null then). And the conversation's browser: its state, whole, whenever it changes
|
|
31
|
+
* (told at once to a socket that opens), and its screen as it paints. And one of the host's own
|
|
32
|
+
* tools the agent called, for the page to run (`tool`): its step works meanwhile, the turn waits
|
|
33
|
+
* for its `tool_result`, and a person's socket that opens while it waits is told it again.
|
|
34
|
+
*/
|
|
35
|
+
export type Frame =
|
|
36
|
+
| { type: "working" }
|
|
37
|
+
| { type: "message"; message: Message }
|
|
38
|
+
| { type: "text"; delta: string }
|
|
39
|
+
| { type: "ui"; id: string; surface: Surface; awaits: boolean }
|
|
40
|
+
| { type: "step"; id: string; state: StepState; action?: string; output?: string }
|
|
41
|
+
| ({ type: "request"; id: string } & Request)
|
|
42
|
+
| ({ type: "tool" } & ToolCall)
|
|
43
|
+
| { type: "handoff"; reason: string }
|
|
44
|
+
| { type: "holder"; handled_by: Holder; handover: Handover }
|
|
45
|
+
| { type: "decision"; message_id: string; decision: Decision | null }
|
|
46
|
+
| { type: "done" }
|
|
47
|
+
| { type: "stopped" }
|
|
48
|
+
| { type: "error"; code: string; detail: string }
|
|
49
|
+
| ({ type: "browser"; open: true } & BrowserState)
|
|
50
|
+
| { type: "browser"; open: false }
|
|
51
|
+
| ({ type: "browser.frame" } & BrowserFrame);
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Up: the person says something (words, files they uploaded to the conversation, or both), acts
|
|
55
|
+
* on a surface, or stops the reply on its way; takes the browser or gives it back, and acts on it
|
|
56
|
+
* while they hold it. And what a tool of the host's answered, run in the page: its output, or
|
|
57
|
+
* why it failed.
|
|
58
|
+
*/
|
|
59
|
+
export type UpFrame =
|
|
60
|
+
| { type: "say"; text: string; files?: string[] }
|
|
61
|
+
| ({ type: "action" } & Action)
|
|
62
|
+
| { type: "stop" }
|
|
63
|
+
| { type: "browser.control"; to: BrowserControl }
|
|
64
|
+
| { type: "browser.close" }
|
|
65
|
+
| { type: "browser.input"; event: BrowserInput }
|
|
66
|
+
| ToolResult;
|
|
67
|
+
|
|
68
|
+
/** What a host's tool answered: what it gave back (null for nothing), or why it failed. */
|
|
69
|
+
export type ToolResult =
|
|
70
|
+
| { type: "tool_result"; id: string; output: unknown }
|
|
71
|
+
| { type: "tool_result"; id: string; error: string };
|
|
72
|
+
|
|
73
|
+
const STATES: ReadonlySet<string> = new Set(["running", "waiting", "done", "failed"]);
|
|
74
|
+
const HOLDERS: ReadonlySet<string> = new Set(["agent", "person", "nobody"]);
|
|
75
|
+
const DECISIONS: ReadonlySet<string> = new Set(["deciding", "answer", "skip", "hold", "ignore"]);
|
|
76
|
+
|
|
77
|
+
const isRecord = (value: unknown): value is Record<string, unknown> =>
|
|
78
|
+
typeof value === "object" && value !== null;
|
|
79
|
+
|
|
80
|
+
const isState = (value: unknown): value is StepState =>
|
|
81
|
+
typeof value === "string" && STATES.has(value);
|
|
82
|
+
|
|
83
|
+
// The blocks inside are the API's, validated at `show`; the renderer draws what it knows.
|
|
84
|
+
const isSurface = (value: unknown): value is Surface =>
|
|
85
|
+
isRecord(value) && Array.isArray(value.blocks) && typeof value.text === "string";
|
|
86
|
+
|
|
87
|
+
const isDecides = (value: unknown): value is Decides => value === "person" || value === "business";
|
|
88
|
+
|
|
89
|
+
const isRequest = (value: unknown): value is Request =>
|
|
90
|
+
isRecord(value) &&
|
|
91
|
+
typeof value.action === "string" &&
|
|
92
|
+
isRecord(value.input) &&
|
|
93
|
+
(value.decides === undefined || isDecides(value.decides));
|
|
94
|
+
|
|
95
|
+
const isStep = (value: unknown): value is Step =>
|
|
96
|
+
isRecord(value) &&
|
|
97
|
+
typeof value.id === "string" &&
|
|
98
|
+
typeof value.action === "string" &&
|
|
99
|
+
isState(value.state) &&
|
|
100
|
+
(value.output === null || typeof value.output === "string") &&
|
|
101
|
+
(value.surface === null || isSurface(value.surface)) &&
|
|
102
|
+
typeof value.awaits === "boolean" &&
|
|
103
|
+
(value.request === null || isRequest(value.request));
|
|
104
|
+
|
|
105
|
+
const isSize = (value: Record<string, unknown>): boolean =>
|
|
106
|
+
typeof value.width === "number" && typeof value.height === "number";
|
|
107
|
+
|
|
108
|
+
const orNull = (value: unknown): string | null => (typeof value === "string" ? value : null);
|
|
109
|
+
|
|
110
|
+
const isHolder = (value: unknown): value is Holder =>
|
|
111
|
+
typeof value === "string" && HOLDERS.has(value);
|
|
112
|
+
|
|
113
|
+
/** A change of who answers as told, or null when it is not one: a reason or title left out is none. */
|
|
114
|
+
function handoverOf(value: unknown): Handover | null {
|
|
115
|
+
if (!isRecord(value) || !isHolder(value.holder)) return null;
|
|
116
|
+
if (typeof value.by !== "string" || typeof value.at !== "string") return null;
|
|
117
|
+
const { holder, by, at } = value;
|
|
118
|
+
return { holder, reason: orNull(value.reason) ?? "", by, title: orNull(value.title), at };
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/** A message's decision as told, or null when it is not one; what it leaves out is none. */
|
|
122
|
+
function decisionOf(value: unknown): Decision | null {
|
|
123
|
+
if (!isRecord(value) || typeof value.kind !== "string" || !DECISIONS.has(value.kind)) return null;
|
|
124
|
+
return {
|
|
125
|
+
kind: value.kind as Decision["kind"],
|
|
126
|
+
reason: orNull(value.reason),
|
|
127
|
+
automation: orNull(value.automation),
|
|
128
|
+
title: orNull(value.title),
|
|
129
|
+
run_id: orNull(value.run_id),
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/** The browser's state as told, or null when it is not one this package can draw. */
|
|
134
|
+
function browserOf(frame: Record<string, unknown>): BrowserState | null {
|
|
135
|
+
const { url, title, control } = frame;
|
|
136
|
+
if (typeof url !== "string" || typeof title !== "string" || !isSize(frame)) return null;
|
|
137
|
+
if (control !== "agent" && control !== "person") return null;
|
|
138
|
+
return {
|
|
139
|
+
where: frame.where === "mine" ? "mine" : "hosted",
|
|
140
|
+
url,
|
|
141
|
+
title,
|
|
142
|
+
control,
|
|
143
|
+
reason: orNull(frame.reason),
|
|
144
|
+
wait: orNull(frame.wait),
|
|
145
|
+
width: frame.width as number,
|
|
146
|
+
height: frame.height as number,
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
const isAction = (value: unknown): value is Action =>
|
|
151
|
+
isRecord(value) &&
|
|
152
|
+
typeof value.surface === "string" &&
|
|
153
|
+
typeof value.name === "string" &&
|
|
154
|
+
isRecord(value.data) &&
|
|
155
|
+
typeof value.label === "string";
|
|
156
|
+
|
|
157
|
+
const isAttachment = (value: unknown): value is Attachment =>
|
|
158
|
+
isRecord(value) &&
|
|
159
|
+
typeof value.id === "string" &&
|
|
160
|
+
typeof value.name === "string" &&
|
|
161
|
+
typeof value.media_type === "string" &&
|
|
162
|
+
typeof value.size === "number";
|
|
163
|
+
|
|
164
|
+
const isMessage = (value: unknown): value is Message =>
|
|
165
|
+
isRecord(value) &&
|
|
166
|
+
typeof value.id === "string" &&
|
|
167
|
+
(value.role === "user" || value.role === "assistant") &&
|
|
168
|
+
typeof value.text === "string" &&
|
|
169
|
+
(value.action === null || isAction(value.action)) &&
|
|
170
|
+
Array.isArray(value.steps) &&
|
|
171
|
+
value.steps.every(isStep) &&
|
|
172
|
+
(value.files === undefined || (Array.isArray(value.files) && value.files.every(isAttachment))) &&
|
|
173
|
+
typeof value.created_at === "string";
|
|
174
|
+
|
|
175
|
+
/** The most files one message carries. */
|
|
176
|
+
export const FILES_PER_MESSAGE = 10;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* What saying something sends: the words trimmed, and the ids of the files uploaded for it
|
|
180
|
+
* beside them (only when there are); null when there is neither.
|
|
181
|
+
*/
|
|
182
|
+
export function sayOf(text: string, files: readonly string[] = []): UpFrame | null {
|
|
183
|
+
const words = text.trim();
|
|
184
|
+
if (words === "" && files.length === 0) return null;
|
|
185
|
+
return files.length === 0
|
|
186
|
+
? { type: "say", text: words }
|
|
187
|
+
: { type: "say", text: words, files: [...files] };
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/** The most of a tool's error the API takes: the agent reads the rest of it as cut. */
|
|
191
|
+
export const TOOL_ERROR_MAX = 2000;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* What a host's tool call answers up, from how its promise settled: what it gave back (`null` for
|
|
195
|
+
* nothing, which JSON would leave out), or the reason it threw in words (an error's message; its
|
|
196
|
+
* kind when it says nothing), as much of it as the API takes.
|
|
197
|
+
*/
|
|
198
|
+
export function toolResultOf(id: string, settled: PromiseSettledResult<unknown>): ToolResult {
|
|
199
|
+
if (settled.status === "fulfilled") {
|
|
200
|
+
return { type: "tool_result", id, output: settled.value ?? null };
|
|
201
|
+
}
|
|
202
|
+
const reason: unknown = settled.reason;
|
|
203
|
+
const words = (reason instanceof Error ? reason.message : String(reason)).trim();
|
|
204
|
+
const error = words || (reason instanceof Error ? reason.name : "Error");
|
|
205
|
+
return { type: "tool_result", id, error: error.slice(0, TOOL_ERROR_MAX) };
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* One frame, read without trusting it. Kinds this package does not know yet (more will come:
|
|
210
|
+
* `audio`) and anything malformed are null, to be let pass.
|
|
211
|
+
*/
|
|
212
|
+
export function frameOf(raw: unknown): Frame | null {
|
|
213
|
+
if (typeof raw !== "string") return null;
|
|
214
|
+
let frame: unknown;
|
|
215
|
+
try {
|
|
216
|
+
frame = JSON.parse(raw);
|
|
217
|
+
} catch {
|
|
218
|
+
return null;
|
|
219
|
+
}
|
|
220
|
+
if (!isRecord(frame)) return null;
|
|
221
|
+
const { id, action, output } = frame;
|
|
222
|
+
if (frame.type === "message" && isMessage(frame.message)) {
|
|
223
|
+
return { type: "message", message: frame.message };
|
|
224
|
+
}
|
|
225
|
+
if (frame.type === "text" && typeof frame.delta === "string") {
|
|
226
|
+
return { type: "text", delta: frame.delta };
|
|
227
|
+
}
|
|
228
|
+
if (frame.type === "ui" && typeof id === "string" && isSurface(frame.surface)) {
|
|
229
|
+
return { type: "ui", id, surface: frame.surface, awaits: frame.awaits === true };
|
|
230
|
+
}
|
|
231
|
+
if (frame.type === "step" && typeof id === "string" && isState(frame.state)) {
|
|
232
|
+
return {
|
|
233
|
+
type: "step",
|
|
234
|
+
id,
|
|
235
|
+
state: frame.state,
|
|
236
|
+
...(typeof action === "string" ? { action } : {}),
|
|
237
|
+
...(typeof output === "string" ? { output } : {}),
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
if (
|
|
241
|
+
frame.type === "request" &&
|
|
242
|
+
typeof id === "string" &&
|
|
243
|
+
typeof action === "string" &&
|
|
244
|
+
isRecord(frame.input)
|
|
245
|
+
) {
|
|
246
|
+
// Left out by an API from before it: the person on the screen gave every yes then.
|
|
247
|
+
const decides = isDecides(frame.decides) ? frame.decides : "person";
|
|
248
|
+
return { type: "request", id, action, input: frame.input, decides };
|
|
249
|
+
}
|
|
250
|
+
if (
|
|
251
|
+
frame.type === "tool" &&
|
|
252
|
+
typeof id === "string" &&
|
|
253
|
+
typeof frame.name === "string" &&
|
|
254
|
+
isRecord(frame.input)
|
|
255
|
+
) {
|
|
256
|
+
return { type: "tool", id, name: frame.name, input: frame.input };
|
|
257
|
+
}
|
|
258
|
+
if (frame.type === "handoff" && typeof frame.reason === "string") {
|
|
259
|
+
return { type: "handoff", reason: frame.reason };
|
|
260
|
+
}
|
|
261
|
+
if (frame.type === "holder" && isHolder(frame.handled_by)) {
|
|
262
|
+
const handover = handoverOf(frame.handover);
|
|
263
|
+
return handover && { type: "holder", handled_by: frame.handled_by, handover };
|
|
264
|
+
}
|
|
265
|
+
if (frame.type === "decision" && typeof frame.message_id === "string") {
|
|
266
|
+
const { message_id } = frame;
|
|
267
|
+
if (frame.decision === null) return { type: "decision", message_id, decision: null };
|
|
268
|
+
const decision = decisionOf(frame.decision);
|
|
269
|
+
return decision && { type: "decision", message_id, decision };
|
|
270
|
+
}
|
|
271
|
+
if (frame.type === "browser") {
|
|
272
|
+
if (frame.open === false) return { type: "browser", open: false };
|
|
273
|
+
const browser = frame.open === true ? browserOf(frame) : null;
|
|
274
|
+
return browser && { type: "browser", open: true, ...browser };
|
|
275
|
+
}
|
|
276
|
+
if (frame.type === "browser.frame" && typeof frame.jpeg === "string" && isSize(frame)) {
|
|
277
|
+
const { jpeg, width, height } = frame as { jpeg: string; width: number; height: number };
|
|
278
|
+
return { type: "browser.frame", jpeg, width, height };
|
|
279
|
+
}
|
|
280
|
+
if (frame.type === "working" || frame.type === "done" || frame.type === "stopped") {
|
|
281
|
+
return { type: frame.type };
|
|
282
|
+
}
|
|
283
|
+
if (
|
|
284
|
+
frame.type === "error" &&
|
|
285
|
+
typeof frame.code === "string" &&
|
|
286
|
+
typeof frame.detail === "string"
|
|
287
|
+
) {
|
|
288
|
+
return { type: "error", code: frame.code, detail: frame.detail };
|
|
289
|
+
}
|
|
290
|
+
return null;
|
|
291
|
+
}
|
package/src/icons.tsx
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BellIcon,
|
|
3
|
+
CalendarBlankIcon,
|
|
4
|
+
ChatCircleIcon,
|
|
5
|
+
CheckCircleIcon,
|
|
6
|
+
ClockIcon,
|
|
7
|
+
CodeIcon,
|
|
8
|
+
CreditCardIcon,
|
|
9
|
+
EnvelopeSimpleIcon,
|
|
10
|
+
FileTextIcon,
|
|
11
|
+
GlobeIcon,
|
|
12
|
+
HandPalmIcon,
|
|
13
|
+
LockSimpleIcon,
|
|
14
|
+
MagnifyingGlassIcon,
|
|
15
|
+
MapPinIcon,
|
|
16
|
+
PhoneIcon,
|
|
17
|
+
ShoppingCartIcon,
|
|
18
|
+
SparkleIcon,
|
|
19
|
+
TableIcon,
|
|
20
|
+
UserIcon,
|
|
21
|
+
WarningIcon,
|
|
22
|
+
type Icon as Phosphor,
|
|
23
|
+
} from "@phosphor-icons/react";
|
|
24
|
+
|
|
25
|
+
import type { Icon } from "./about";
|
|
26
|
+
|
|
27
|
+
/** The package's glyphs by name, drawn with Phosphor: what a `Mark` holds. */
|
|
28
|
+
export const GLYPHS: Readonly<Record<Icon, Phosphor>> = {
|
|
29
|
+
message: ChatCircleIcon,
|
|
30
|
+
phone: PhoneIcon,
|
|
31
|
+
mail: EnvelopeSimpleIcon,
|
|
32
|
+
calendar: CalendarBlankIcon,
|
|
33
|
+
clock: ClockIcon,
|
|
34
|
+
search: MagnifyingGlassIcon,
|
|
35
|
+
file: FileTextIcon,
|
|
36
|
+
table: TableIcon,
|
|
37
|
+
bell: BellIcon,
|
|
38
|
+
hand: HandPalmIcon,
|
|
39
|
+
user: UserIcon,
|
|
40
|
+
globe: GlobeIcon,
|
|
41
|
+
code: CodeIcon,
|
|
42
|
+
lock: LockSimpleIcon,
|
|
43
|
+
cart: ShoppingCartIcon,
|
|
44
|
+
card: CreditCardIcon,
|
|
45
|
+
map: MapPinIcon,
|
|
46
|
+
check: CheckCircleIcon,
|
|
47
|
+
warning: WarningIcon,
|
|
48
|
+
sparkle: SparkleIcon,
|
|
49
|
+
};
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @signalcore/ui: ready components for an agent, built only on the public API and the
|
|
3
|
+
* conversation's socket, styled by the host through `--sc-*` tokens, `classNames` and, in the
|
|
4
|
+
* widget, `::part()` and its own stylesheet. For the
|
|
5
|
+
* people an agent serves: `AgentChat`, `VoiceCall`, `AgentSpace` (and `<signalcore-chat>`, built
|
|
6
|
+
* apart as `widget.js`); the hooks under them for a host that draws its own.
|
|
7
|
+
*/
|
|
8
|
+
export {
|
|
9
|
+
aboutState,
|
|
10
|
+
actionWords,
|
|
11
|
+
appSteps,
|
|
12
|
+
appTitle,
|
|
13
|
+
automationsOf,
|
|
14
|
+
countOf,
|
|
15
|
+
formatSize,
|
|
16
|
+
generatedName,
|
|
17
|
+
ICONS,
|
|
18
|
+
namesOf,
|
|
19
|
+
toneOf,
|
|
20
|
+
toolName,
|
|
21
|
+
toolTitle,
|
|
22
|
+
TOPICS,
|
|
23
|
+
} from "./about";
|
|
24
|
+
export type {
|
|
25
|
+
About,
|
|
26
|
+
AboutOut,
|
|
27
|
+
AboutState,
|
|
28
|
+
ActionFact,
|
|
29
|
+
AskFact,
|
|
30
|
+
AutomationFact,
|
|
31
|
+
AutomationKind,
|
|
32
|
+
ChannelFact,
|
|
33
|
+
ChannelKind,
|
|
34
|
+
ConnectionFact,
|
|
35
|
+
DataFact,
|
|
36
|
+
DeviceFact,
|
|
37
|
+
DeviceKind,
|
|
38
|
+
Does,
|
|
39
|
+
Facts,
|
|
40
|
+
FileFact,
|
|
41
|
+
Icon,
|
|
42
|
+
MemoryFact,
|
|
43
|
+
Provider,
|
|
44
|
+
StatusTone,
|
|
45
|
+
Told,
|
|
46
|
+
Topic,
|
|
47
|
+
VaultFact,
|
|
48
|
+
} from "./about";
|
|
49
|
+
export { ABOUT_HOME, ABOUT_MESSAGES, aboutBack, AgentAbout } from "./AgentAbout";
|
|
50
|
+
export type {
|
|
51
|
+
AboutControls,
|
|
52
|
+
AboutMessages,
|
|
53
|
+
AboutPart,
|
|
54
|
+
AboutTools,
|
|
55
|
+
AboutView,
|
|
56
|
+
AgentAboutProps,
|
|
57
|
+
AppDirectory,
|
|
58
|
+
} from "./AgentAbout";
|
|
59
|
+
export { AGENT_ICONS, agentGlyph } from "./agentIcons";
|
|
60
|
+
export type { AgentIcon } from "./agentIcons";
|
|
61
|
+
export { Automation } from "./automation/Automation";
|
|
62
|
+
export type { AutomationProps } from "./automation/Automation";
|
|
63
|
+
export { RunView } from "./automation/RunView";
|
|
64
|
+
export type { RunViewProps } from "./automation/RunView";
|
|
65
|
+
export { AUTOMATION_MESSAGES } from "./automation/messages";
|
|
66
|
+
export type { AutomationMessages, CallMessages, DayRef, Verb } from "./automation/messages";
|
|
67
|
+
export { fires, occurrences, offsetOf, parseCron } from "./automation/cron";
|
|
68
|
+
export type { Cron, Wall } from "./automation/cron";
|
|
69
|
+
export {
|
|
70
|
+
clockOf,
|
|
71
|
+
dayRefOf,
|
|
72
|
+
lineOf,
|
|
73
|
+
momentOf,
|
|
74
|
+
scheduleOf,
|
|
75
|
+
timeOf,
|
|
76
|
+
tookOf,
|
|
77
|
+
whenOf,
|
|
78
|
+
} from "./automation/when";
|
|
79
|
+
export type { When } from "./automation/when";
|
|
80
|
+
export { appOf, callWords, groupsOf, namingOf, verbOf } from "./automation/record";
|
|
81
|
+
export type { CallLine, Names, StepGroup } from "./automation/record";
|
|
82
|
+
export type {
|
|
83
|
+
Automation as AutomationData,
|
|
84
|
+
AutomationState,
|
|
85
|
+
AutomationView,
|
|
86
|
+
Board,
|
|
87
|
+
Run,
|
|
88
|
+
RunBy,
|
|
89
|
+
RunRecord,
|
|
90
|
+
RunStatus,
|
|
91
|
+
RunStep,
|
|
92
|
+
Step as AutomationStep,
|
|
93
|
+
Task,
|
|
94
|
+
Trigger,
|
|
95
|
+
Use,
|
|
96
|
+
} from "./automation/types";
|
|
97
|
+
export { AgentTasks, TASK_MESSAGES, TASKS_POLL_MS, useTasks } from "./AgentTasks";
|
|
98
|
+
export type { AgentTasksProps, TaskMessages, TaskPart } from "./AgentTasks";
|
|
99
|
+
export { AgentCard } from "./AgentCard";
|
|
100
|
+
export type { AgentCardProps, CardField, CardPart } from "./AgentCard";
|
|
101
|
+
export { AgentChat, CHAT_MESSAGES } from "./AgentChat";
|
|
102
|
+
export { AgentSpace, captionsOf, SPACE_MESSAGES } from "./AgentSpace";
|
|
103
|
+
export type { AgentSpaceProps, SpaceLayout, SpaceMessages, SpacePart } from "./AgentSpace";
|
|
104
|
+
export type { ModeMessages, ModePart, SpaceMode } from "./Modes";
|
|
105
|
+
export {
|
|
106
|
+
AUTOMATION_MESSAGES_ES,
|
|
107
|
+
BROWSER_MESSAGES_ES,
|
|
108
|
+
CHAT_MESSAGES_ES,
|
|
109
|
+
KIT_MESSAGES_ES,
|
|
110
|
+
SPACE_MESSAGES_ES,
|
|
111
|
+
TASK_MESSAGES_ES,
|
|
112
|
+
VOICE_CALL_MESSAGES_ES,
|
|
113
|
+
} from "./es";
|
|
114
|
+
export { VOICE_CALL_MESSAGES, VoiceCall } from "./VoiceCall";
|
|
115
|
+
export type { VoiceCallMessages, VoiceCallPart, VoiceCallProps } from "./VoiceCall";
|
|
116
|
+
export { useCall } from "./useCall";
|
|
117
|
+
export type { Call, CallJoin, CallMeter } from "./useCall";
|
|
118
|
+
export { durationOf, endedByReason, lookOf, orbOf } from "./call";
|
|
119
|
+
export type { AgentActivity, CallEnd, CallEndedBy, CallLook, CallProblem, CallState } from "./call";
|
|
120
|
+
export { Orb } from "./voice/Orb";
|
|
121
|
+
export { ORB_STYLES } from "./voice/orbs";
|
|
122
|
+
export type { OrbProps, OrbState, OrbStyle } from "./voice/orbs";
|
|
123
|
+
export { BROWSER_MESSAGES, BrowserView } from "./BrowserView";
|
|
124
|
+
export type { BrowserMessages, BrowserPart, BrowserViewProps } from "./BrowserView";
|
|
125
|
+
export type {
|
|
126
|
+
AgentChatProps,
|
|
127
|
+
ChatCompose,
|
|
128
|
+
ChatLook,
|
|
129
|
+
ChatMessages,
|
|
130
|
+
ChatPart,
|
|
131
|
+
ChatSteps,
|
|
132
|
+
HandoverBy,
|
|
133
|
+
} from "./AgentChat";
|
|
134
|
+
export type {
|
|
135
|
+
AutomationBlock,
|
|
136
|
+
Block,
|
|
137
|
+
ButtonBlock,
|
|
138
|
+
CardBlock,
|
|
139
|
+
ChartBlock,
|
|
140
|
+
ChartPoint,
|
|
141
|
+
ChoiceBlock,
|
|
142
|
+
DividerBlock,
|
|
143
|
+
Entry,
|
|
144
|
+
FieldKind,
|
|
145
|
+
FieldsBlock,
|
|
146
|
+
FieldValue,
|
|
147
|
+
FormBlock,
|
|
148
|
+
FormField,
|
|
149
|
+
ImageBlock,
|
|
150
|
+
ListBlock,
|
|
151
|
+
NoteBlock,
|
|
152
|
+
Option,
|
|
153
|
+
StackBlock,
|
|
154
|
+
StatBlock,
|
|
155
|
+
Surface as SurfaceData,
|
|
156
|
+
TableBlock,
|
|
157
|
+
TextBlock,
|
|
158
|
+
Tone,
|
|
159
|
+
} from "./blocks";
|
|
160
|
+
export { ApiError, createClient } from "./client";
|
|
161
|
+
export type { Client, ClientOptions, Files, UploadOptions } from "./client";
|
|
162
|
+
export { VISITOR_KEY } from "./credentials";
|
|
163
|
+
export type { Credentials, Speaker } from "./credentials";
|
|
164
|
+
export { FILE_MESSAGES, FileView } from "./FileView";
|
|
165
|
+
export type { FileMessages, FilePart, FileViewProps } from "./FileView";
|
|
166
|
+
export { cleanDocument, previewOf } from "./files";
|
|
167
|
+
export type { Preview } from "./files";
|
|
168
|
+
export { FILES_PER_MESSAGE, TOOL_ERROR_MAX, toolResultOf } from "./frames";
|
|
169
|
+
export type { Frame, ToolResult, UpFrame } from "./frames";
|
|
170
|
+
export { Button } from "./kit/Button";
|
|
171
|
+
export type { ButtonProps } from "./kit/Button";
|
|
172
|
+
export { Card } from "./kit/Card";
|
|
173
|
+
export { Chips, Choices } from "./kit/Choices";
|
|
174
|
+
export { Combobox } from "./kit/Combobox";
|
|
175
|
+
export type { ComboboxProps } from "./kit/Combobox";
|
|
176
|
+
export { KitProvider } from "./kit/context";
|
|
177
|
+
export type { KitClassNames, KitPart } from "./kit/context";
|
|
178
|
+
export { DateField } from "./kit/DateField";
|
|
179
|
+
export type { DateFieldProps } from "./kit/DateField";
|
|
180
|
+
export { Field } from "./kit/Field";
|
|
181
|
+
export type { ControlBase, FieldIds } from "./kit/Field";
|
|
182
|
+
export { FileChip, FileChips, FileField, UploadChips, useUploads } from "./kit/FileField";
|
|
183
|
+
export { FileMark } from "./kit/FileMark";
|
|
184
|
+
export { familyOf } from "./kit/uploads";
|
|
185
|
+
export type { FileFamily } from "./kit/uploads";
|
|
186
|
+
export type { FileChipProps, FileFieldProps, Upload, UploadRules, Uploads } from "./kit/FileField";
|
|
187
|
+
export { accepts, MAX_MB } from "./kit/uploads";
|
|
188
|
+
export type { FileHost, Uploader } from "./kit/uploads";
|
|
189
|
+
export { Checkbox, NumberInput, SecretInput, TextArea, TextInput } from "./kit/Inputs";
|
|
190
|
+
export { List, Row } from "./kit/List";
|
|
191
|
+
export type { RowProps } from "./kit/List";
|
|
192
|
+
export { Mark } from "./kit/Mark";
|
|
193
|
+
export type { MarkProps } from "./kit/Mark";
|
|
194
|
+
export { MarkStack } from "./kit/MarkStack";
|
|
195
|
+
export { KIT_MESSAGES } from "./kit/messages";
|
|
196
|
+
export type { KitLocale, KitMessages } from "./kit/messages";
|
|
197
|
+
export { Note } from "./kit/Note";
|
|
198
|
+
export { RangeField } from "./kit/RangeField";
|
|
199
|
+
export { RatingField } from "./kit/RatingField";
|
|
200
|
+
export { Stat, Stats } from "./kit/Stat";
|
|
201
|
+
export { Switch } from "./kit/Switch";
|
|
202
|
+
export { AudioPlayer } from "./kit/AudioPlayer";
|
|
203
|
+
export type { AudioPlayerProps } from "./kit/AudioPlayer";
|
|
204
|
+
export type { SwitchProps } from "./kit/Switch";
|
|
205
|
+
export { Tag } from "./kit/Tag";
|
|
206
|
+
export { Tile, Tiles } from "./kit/Tile";
|
|
207
|
+
export type { TileProps } from "./kit/Tile";
|
|
208
|
+
export { DateTimeField, TimeField } from "./kit/TimeField";
|
|
209
|
+
export type { DateTimeFieldProps, TimeFieldProps } from "./kit/TimeField";
|
|
210
|
+
export type { BlockProps, SurfaceComponents, SurfacePart } from "./surface/scope";
|
|
211
|
+
export { Surface } from "./surface/Surface";
|
|
212
|
+
export type { SurfaceProps } from "./surface/Surface";
|
|
213
|
+
export { chosen, filled, labelOf, picked, pressed, problemOf } from "./surface/values";
|
|
214
|
+
export type { SurfaceAction, Values } from "./surface/values";
|
|
215
|
+
export { agentTint } from "./tint";
|
|
216
|
+
export type { AgentTint } from "./tint";
|
|
217
|
+
export type {
|
|
218
|
+
Action,
|
|
219
|
+
AgentFace,
|
|
220
|
+
Attachment,
|
|
221
|
+
Author,
|
|
222
|
+
CallGlance,
|
|
223
|
+
CallReason,
|
|
224
|
+
CallToken,
|
|
225
|
+
BrowserControl,
|
|
226
|
+
BrowserWhere,
|
|
227
|
+
BrowserFrame,
|
|
228
|
+
BrowserInput,
|
|
229
|
+
BrowserState,
|
|
230
|
+
Channel,
|
|
231
|
+
ChannelGlance,
|
|
232
|
+
ChannelSettings,
|
|
233
|
+
ChannelStatus,
|
|
234
|
+
ChannelWeb,
|
|
235
|
+
ContactGlance,
|
|
236
|
+
ConversationPerson,
|
|
237
|
+
Conversation,
|
|
238
|
+
ConversationDetail,
|
|
239
|
+
ConversationFile,
|
|
240
|
+
Decides,
|
|
241
|
+
Decision,
|
|
242
|
+
Delivery,
|
|
243
|
+
FileAt,
|
|
244
|
+
FileBlock,
|
|
245
|
+
FileIndex,
|
|
246
|
+
FilePreview,
|
|
247
|
+
Handover,
|
|
248
|
+
Holder,
|
|
249
|
+
HoursSpan,
|
|
250
|
+
Message,
|
|
251
|
+
Request,
|
|
252
|
+
Step,
|
|
253
|
+
StepState,
|
|
254
|
+
StoredFile,
|
|
255
|
+
ToolCall,
|
|
256
|
+
Weekday,
|
|
257
|
+
WeekHours,
|
|
258
|
+
WidgetConfig,
|
|
259
|
+
WidgetFont,
|
|
260
|
+
WidgetLook,
|
|
261
|
+
} from "./types";
|
|
262
|
+
export { WIDGET_FONTS } from "./types";
|
|
263
|
+
export { useAgentFace } from "./useAgentFace";
|
|
264
|
+
export type { FaceRead } from "./useAgentFace";
|
|
265
|
+
export { NO_TOOL, useConversation } from "./useConversation";
|
|
266
|
+
export type { LiveConversation, ToolHandler } from "./useConversation";
|
|
267
|
+
export { useLive } from "./useLive";
|
|
268
|
+
export type { Live, LiveHandlers } from "./useLive";
|
|
269
|
+
export { useDictation } from "./useDictation";
|
|
270
|
+
export type { Dictate, Dictation } from "./useDictation";
|