@signalcore/ui 0.1.0 → 1.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +1127 -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 +541 -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 +1812 -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 +271 -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 +6970 -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 +604 -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/about.ts
ADDED
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Qué puede: what an agent says about itself and the facts it rests on (`GET /agents/{id}/about`,
|
|
3
|
+
* `POST /agents/{id}/describe`). The words are the model's, written from the agent's folder and
|
|
4
|
+
* stale the moment it changes; the facts are the platform's, read each time.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/** The marks the package draws (a topic's, an automation's kind, a note's tone). */
|
|
8
|
+
export const ICONS = [
|
|
9
|
+
"message",
|
|
10
|
+
"phone",
|
|
11
|
+
"mail",
|
|
12
|
+
"calendar",
|
|
13
|
+
"clock",
|
|
14
|
+
"search",
|
|
15
|
+
"file",
|
|
16
|
+
"table",
|
|
17
|
+
"bell",
|
|
18
|
+
"hand",
|
|
19
|
+
"user",
|
|
20
|
+
"globe",
|
|
21
|
+
"code",
|
|
22
|
+
"lock",
|
|
23
|
+
"cart",
|
|
24
|
+
"card",
|
|
25
|
+
"map",
|
|
26
|
+
"check",
|
|
27
|
+
"warning",
|
|
28
|
+
"sparkle",
|
|
29
|
+
] as const;
|
|
30
|
+
|
|
31
|
+
export type Icon = (typeof ICONS)[number];
|
|
32
|
+
|
|
33
|
+
/** One automation as the agent tells it: what it does then, and when. */
|
|
34
|
+
export interface Does {
|
|
35
|
+
/** The automation's id. */
|
|
36
|
+
automation: string;
|
|
37
|
+
text: string;
|
|
38
|
+
/** When it runs, the way a person says it: "Cada día a las 8:00". */
|
|
39
|
+
when: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** What the agent says about itself: a lead, what it does, what it asks leave for. */
|
|
43
|
+
export interface About {
|
|
44
|
+
/** Two or three sentences, first person, in the owner's language. */
|
|
45
|
+
summary: string;
|
|
46
|
+
does: Does[];
|
|
47
|
+
asks: string[];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export type ActionSource = "default" | "library" | "own";
|
|
51
|
+
|
|
52
|
+
export interface ActionFact {
|
|
53
|
+
name: string;
|
|
54
|
+
description: string;
|
|
55
|
+
source: ActionSource;
|
|
56
|
+
on: boolean;
|
|
57
|
+
needs_approval: boolean;
|
|
58
|
+
destructive: boolean;
|
|
59
|
+
/** Its input as the model gets it (JSON Schema); left out by an API from before. */
|
|
60
|
+
input_schema?: Readonly<Record<string, unknown>> | undefined;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export type AutomationKind = "schedule" | "webhook" | "event";
|
|
64
|
+
|
|
65
|
+
/** Something the agent does on its own: at a time, when another system calls, on an event. */
|
|
66
|
+
export interface AutomationFact {
|
|
67
|
+
id: string;
|
|
68
|
+
/** Its file's name, `automations/<name>.py`: how its page is reached. */
|
|
69
|
+
name: string;
|
|
70
|
+
kind: AutomationKind;
|
|
71
|
+
title: string;
|
|
72
|
+
/** What it does, in the owner's words. */
|
|
73
|
+
summary: string;
|
|
74
|
+
/** The same words, for a reader of the older shape. */
|
|
75
|
+
say: string;
|
|
76
|
+
/** A cron line and its time zone, for one that runs at a time. */
|
|
77
|
+
schedule?: string | null | undefined;
|
|
78
|
+
timezone?: string | null | undefined;
|
|
79
|
+
/** Where another system calls it, for a webhook (a path on the API). */
|
|
80
|
+
url?: string | null | undefined;
|
|
81
|
+
/** For one on an app's event: the app (the connection's name), the event as its provider
|
|
82
|
+
* names it, and the app as its mark is drawn (`composio:gmail`, the provider's logo). */
|
|
83
|
+
app?: string | null | undefined;
|
|
84
|
+
/** The app as people write it (`Google Calendar`). */
|
|
85
|
+
app_title?: string | null | undefined;
|
|
86
|
+
event?: string | null | undefined;
|
|
87
|
+
provider?: string | undefined;
|
|
88
|
+
icon?: string | null | undefined;
|
|
89
|
+
/** Off: declared, but it doesn't run. */
|
|
90
|
+
on: boolean;
|
|
91
|
+
next_run_at?: string | null | undefined;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export type Provider = "arcade" | "composio" | "mcp" | "api";
|
|
95
|
+
|
|
96
|
+
export interface ConnectionFact {
|
|
97
|
+
provider: Provider;
|
|
98
|
+
name: string;
|
|
99
|
+
/** The app, as the provider names it (`gmail`). */
|
|
100
|
+
toolkit?: string | undefined;
|
|
101
|
+
/** The app as people write it (`Google Calendar`). */
|
|
102
|
+
title?: string | undefined;
|
|
103
|
+
/** pending · active · error · disconnected */
|
|
104
|
+
status?: string | undefined;
|
|
105
|
+
/** The provider's names of what the agent may do in it (`Gmail.SendEmail`). */
|
|
106
|
+
actions: string[];
|
|
107
|
+
/** What the provider calls each of them for people (`List Events`), when it says. */
|
|
108
|
+
titles?: Readonly<Record<string, string>> | undefined;
|
|
109
|
+
/** A URL to the app's own mark, when the provider gives one. */
|
|
110
|
+
icon?: string | null | undefined;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/** An app of the agent's as people write it: its provider's name, else its alias made words. */
|
|
114
|
+
export const appTitle = (connection: ConnectionFact): string =>
|
|
115
|
+
connection.title ?? toolName(connection.name);
|
|
116
|
+
|
|
117
|
+
/** A tool of an app as people read it: its provider's name for it, else its own made words. */
|
|
118
|
+
export const toolTitle = (connection: ConnectionFact, action: string): string =>
|
|
119
|
+
connection.titles?.[action] ?? toolName(action);
|
|
120
|
+
|
|
121
|
+
/** A tool of an app as a person reads it: `Gmail.SendEmail` is "Send email". */
|
|
122
|
+
export function toolName(action: string): string {
|
|
123
|
+
const bare = action.slice(action.lastIndexOf(".") + 1);
|
|
124
|
+
const words = bare
|
|
125
|
+
.replace(/([a-z0-9])([A-Z])/g, "$1 $2")
|
|
126
|
+
.replace(/_/g, " ")
|
|
127
|
+
.toLowerCase();
|
|
128
|
+
return words.charAt(0).toUpperCase() + words.slice(1);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* An action's name made words, for one nobody named: `ver_hoja` is "Ver hoja"; an app's tool
|
|
133
|
+
* as the model calls it, `gmail__GMAIL_SEND_EMAIL`, is "Send email (Gmail)".
|
|
134
|
+
*/
|
|
135
|
+
export function actionWords(name: string): string {
|
|
136
|
+
const split = name.indexOf("__");
|
|
137
|
+
if (split < 0) return toolName(name);
|
|
138
|
+
const tool = name.slice(split + 2);
|
|
139
|
+
const bare = tool.slice(tool.indexOf("_") + 1) || tool;
|
|
140
|
+
return `${toolName(bare)} (${toolName(name.slice(0, split))})`;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/** The longest name the model takes for a tool (`app/connections` cuts there too). */
|
|
144
|
+
const MAX_TOOL_NAME = 64;
|
|
145
|
+
|
|
146
|
+
/** `gmail` + `Gmail.SendEmail` → `gmail__Gmail_SendEmail`: the tool the model is given. */
|
|
147
|
+
export const generatedName = (alias: string, action: string): string =>
|
|
148
|
+
`${alias}__${action.replace(/[^A-Za-z0-9_]/g, "_")}`.slice(0, MAX_TOOL_NAME);
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* The tools the agent's apps give it, by the names the model calls them, in words: the
|
|
152
|
+
* provider's for the tool and the app's ("List Events (Google Calendar)"), as a chat's steps
|
|
153
|
+
* read them (`ChatMessages.steps`).
|
|
154
|
+
*/
|
|
155
|
+
export function appSteps(connections: readonly ConnectionFact[]): Record<string, string> {
|
|
156
|
+
return Object.fromEntries(
|
|
157
|
+
connections.flatMap((connection) =>
|
|
158
|
+
connection.actions.map((action) => [
|
|
159
|
+
generatedName(connection.name, action),
|
|
160
|
+
`${toolTitle(connection, action)} (${appTitle(connection)})`,
|
|
161
|
+
]),
|
|
162
|
+
),
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export type ChannelKind = "whatsapp" | "instagram" | "email" | "sms" | "web" | "phone";
|
|
167
|
+
|
|
168
|
+
export interface ChannelFact {
|
|
169
|
+
kind: ChannelKind;
|
|
170
|
+
name: string;
|
|
171
|
+
status: string;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/** A file the agent can read: its own, or one of the organization's, shared with every agent. */
|
|
175
|
+
export interface FileFact {
|
|
176
|
+
path: string;
|
|
177
|
+
size: number;
|
|
178
|
+
/** Text, Markdown, JSON, YAML or PDF, read by `search_files`; anything else is only kept. */
|
|
179
|
+
searchable: boolean;
|
|
180
|
+
/** The organization's, not the agent's own. */
|
|
181
|
+
shared: boolean;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/** A line the agent kept with `remember`. */
|
|
185
|
+
export interface MemoryFact {
|
|
186
|
+
id: string;
|
|
187
|
+
/** The agent that keeps it; the contact it is about, when it is about one. */
|
|
188
|
+
agent_id?: string | undefined;
|
|
189
|
+
contact_id?: string | null | undefined;
|
|
190
|
+
text: string;
|
|
191
|
+
created_at: string;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/** A key the agent may use: its own, or one of the organization's, shared with every agent. */
|
|
195
|
+
export interface VaultFact {
|
|
196
|
+
name: string;
|
|
197
|
+
/** The hosts it may be sent to. */
|
|
198
|
+
hosts?: string[] | undefined;
|
|
199
|
+
/** The organization's, not the agent's own. */
|
|
200
|
+
shared?: boolean | undefined;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/** A table of the organization's the agent may read or write (an agenda, the clients). */
|
|
204
|
+
export interface DataFact {
|
|
205
|
+
table: string;
|
|
206
|
+
/** Its name for people, when it has one. */
|
|
207
|
+
title?: string | null | undefined;
|
|
208
|
+
can: string[];
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export interface AskFact {
|
|
212
|
+
agent_id: string;
|
|
213
|
+
name: string;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export type DeviceKind = "extension" | "installer";
|
|
217
|
+
|
|
218
|
+
export interface DeviceFact {
|
|
219
|
+
kind: DeviceKind;
|
|
220
|
+
name: string;
|
|
221
|
+
status: string;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/** What the agent has, every list present from day one; one whose phase has not come is empty. */
|
|
225
|
+
export interface Facts {
|
|
226
|
+
actions: ActionFact[];
|
|
227
|
+
automations: AutomationFact[];
|
|
228
|
+
connections: ConnectionFact[];
|
|
229
|
+
channels: ChannelFact[];
|
|
230
|
+
/** Its own first, then the organization's shared. */
|
|
231
|
+
files: FileFact[];
|
|
232
|
+
/** Newest first. */
|
|
233
|
+
memories: MemoryFact[];
|
|
234
|
+
vault: VaultFact[];
|
|
235
|
+
data: DataFact[];
|
|
236
|
+
asks: AskFact[];
|
|
237
|
+
devices: DeviceFact[];
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export interface AboutOut {
|
|
241
|
+
/** Null until the agent has written about itself once. */
|
|
242
|
+
about: About | null;
|
|
243
|
+
/** When the words were written; null when the folder changed since, so they are stale. */
|
|
244
|
+
about_at: string | null;
|
|
245
|
+
facts: Facts;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* What the panel lists of the facts beside what the agent does on its own, gathered into a few
|
|
250
|
+
* things an owner reads at a glance: the apps it uses, its tools, what it knows (files and
|
|
251
|
+
* tables), what it has learned, where it works (channels and devices), and its keys.
|
|
252
|
+
*/
|
|
253
|
+
export type Topic = "apps" | "tools" | "knowledge" | "learning" | "channels" | "keys";
|
|
254
|
+
|
|
255
|
+
/** The topics in the order the panel lists them. */
|
|
256
|
+
export const TOPICS: readonly Topic[] = [
|
|
257
|
+
"apps",
|
|
258
|
+
"tools",
|
|
259
|
+
"knowledge",
|
|
260
|
+
"learning",
|
|
261
|
+
"channels",
|
|
262
|
+
"keys",
|
|
263
|
+
];
|
|
264
|
+
|
|
265
|
+
/** An automation with what the agent said about it, when it said something. */
|
|
266
|
+
export interface Told {
|
|
267
|
+
automation: AutomationFact;
|
|
268
|
+
line: Does | undefined;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* The agent's automations, in their order, each with the agent's line about it (matched by id):
|
|
273
|
+
* one added since the words were written has none yet, and a line for one since removed is
|
|
274
|
+
* dropped.
|
|
275
|
+
*/
|
|
276
|
+
export function automationsOf(about: About | null, facts: Facts): Told[] {
|
|
277
|
+
const lines = new Map((about?.does ?? []).map((line) => [line.automation, line]));
|
|
278
|
+
return facts.automations.map((automation) => ({ automation, line: lines.get(automation.id) }));
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/** How many things a topic holds: the tools that are on, the rest whole. */
|
|
282
|
+
export function countOf(topic: Topic, facts: Facts): number {
|
|
283
|
+
return namesOf(topic, facts, (action) => action.name).length;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* The names of what a topic holds, in order, as its row in the panel previews them: an app by its
|
|
288
|
+
* name, a tool by `label` (the host's words for the shipped ones), a file by its path and a table
|
|
289
|
+
* by its title, what it learned by the line itself.
|
|
290
|
+
*/
|
|
291
|
+
export function namesOf(
|
|
292
|
+
topic: Topic,
|
|
293
|
+
facts: Facts,
|
|
294
|
+
label: (action: ActionFact) => string,
|
|
295
|
+
): string[] {
|
|
296
|
+
switch (topic) {
|
|
297
|
+
case "apps":
|
|
298
|
+
return facts.connections.map(appTitle);
|
|
299
|
+
case "tools":
|
|
300
|
+
return facts.actions.filter((action) => action.on).map(label);
|
|
301
|
+
case "knowledge":
|
|
302
|
+
return [
|
|
303
|
+
...facts.files.map((file) => file.path),
|
|
304
|
+
...facts.data.map((table) => table.title ?? table.table),
|
|
305
|
+
];
|
|
306
|
+
case "learning":
|
|
307
|
+
return facts.memories.map((memory) => memory.text);
|
|
308
|
+
case "channels":
|
|
309
|
+
return [
|
|
310
|
+
...facts.channels.map((channel) => channel.name),
|
|
311
|
+
...facts.devices.map((device) => device.name),
|
|
312
|
+
];
|
|
313
|
+
case "keys":
|
|
314
|
+
return facts.vault.map((secret) => secret.name);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
export type AboutState = "writing" | "stale" | "fresh";
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Which state the words are in: `writing` while there are none yet or the agent is writing them
|
|
322
|
+
* anew (`loading`), `stale` when the agent changed since it wrote them, `fresh` otherwise.
|
|
323
|
+
*/
|
|
324
|
+
export function aboutState(
|
|
325
|
+
about: About | null,
|
|
326
|
+
aboutAt: string | null,
|
|
327
|
+
loading: boolean,
|
|
328
|
+
): AboutState {
|
|
329
|
+
if (about === null || loading) return "writing";
|
|
330
|
+
return aboutAt === null ? "stale" : "fresh";
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
/** A file's size as people read it (the kit's, where the file chips draw it). */
|
|
334
|
+
export { formatSize } from "./kit/numbers";
|
|
335
|
+
|
|
336
|
+
/** How a status reads beside its words: working, broken, or neither. */
|
|
337
|
+
export type StatusTone = "on" | "off" | "quiet";
|
|
338
|
+
|
|
339
|
+
const ON: ReadonlySet<string> = new Set(["live", "active", "connected", "on", "ready", "online"]);
|
|
340
|
+
const OFF: ReadonlySet<string> = new Set([
|
|
341
|
+
"failed",
|
|
342
|
+
"error",
|
|
343
|
+
"disconnected",
|
|
344
|
+
"off",
|
|
345
|
+
"expired",
|
|
346
|
+
"broken",
|
|
347
|
+
]);
|
|
348
|
+
|
|
349
|
+
/** The tone of a channel's or a device's status, from the words the platform uses for it. */
|
|
350
|
+
export function toneOf(status: string): StatusTone {
|
|
351
|
+
const word = status.trim().toLowerCase();
|
|
352
|
+
if (ON.has(word)) return "on";
|
|
353
|
+
if (OFF.has(word)) return "off";
|
|
354
|
+
return "quiet";
|
|
355
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BriefcaseIcon,
|
|
3
|
+
CalendarBlankIcon,
|
|
4
|
+
ChartLineUpIcon,
|
|
5
|
+
ChatCircleIcon,
|
|
6
|
+
CodeIcon,
|
|
7
|
+
CreditCardIcon,
|
|
8
|
+
EnvelopeSimpleIcon,
|
|
9
|
+
FileTextIcon,
|
|
10
|
+
GlobeIcon,
|
|
11
|
+
HeadsetIcon,
|
|
12
|
+
HeartIcon,
|
|
13
|
+
MagnifyingGlassIcon,
|
|
14
|
+
MapPinIcon,
|
|
15
|
+
MegaphoneIcon,
|
|
16
|
+
PhoneIcon,
|
|
17
|
+
ShoppingCartIcon,
|
|
18
|
+
SparkleIcon,
|
|
19
|
+
UserIcon,
|
|
20
|
+
WrenchIcon,
|
|
21
|
+
type Icon as Phosphor,
|
|
22
|
+
} from "@phosphor-icons/react";
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The marks an agent goes by: a glyph for the work it does (appointments, reception, sales…), on
|
|
26
|
+
* the tint it keeps everywhere (`agentTint`). It picks one itself the first time it describes
|
|
27
|
+
* itself; the owner changes it through the builder. One to one with the API's `AgentIcon`.
|
|
28
|
+
*/
|
|
29
|
+
export const AGENT_ICONS = {
|
|
30
|
+
sparkle: SparkleIcon,
|
|
31
|
+
calendar: CalendarBlankIcon,
|
|
32
|
+
headset: HeadsetIcon,
|
|
33
|
+
message: ChatCircleIcon,
|
|
34
|
+
phone: PhoneIcon,
|
|
35
|
+
mail: EnvelopeSimpleIcon,
|
|
36
|
+
cart: ShoppingCartIcon,
|
|
37
|
+
card: CreditCardIcon,
|
|
38
|
+
chart: ChartLineUpIcon,
|
|
39
|
+
megaphone: MegaphoneIcon,
|
|
40
|
+
wrench: WrenchIcon,
|
|
41
|
+
briefcase: BriefcaseIcon,
|
|
42
|
+
heart: HeartIcon,
|
|
43
|
+
user: UserIcon,
|
|
44
|
+
search: MagnifyingGlassIcon,
|
|
45
|
+
file: FileTextIcon,
|
|
46
|
+
globe: GlobeIcon,
|
|
47
|
+
code: CodeIcon,
|
|
48
|
+
map: MapPinIcon,
|
|
49
|
+
} as const satisfies Record<string, Phosphor>;
|
|
50
|
+
|
|
51
|
+
export type AgentIcon = keyof typeof AGENT_ICONS;
|
|
52
|
+
|
|
53
|
+
/** An agent's glyph; a sparkle until it has picked one (or for a mark this package predates). */
|
|
54
|
+
export function agentGlyph(icon: string | null | undefined): Phosphor {
|
|
55
|
+
return icon != null && icon in AGENT_ICONS ? AGENT_ICONS[icon as AgentIcon] : SparkleIcon;
|
|
56
|
+
}
|