@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/dist/about.js
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { formatSize } from "./kit/numbers.js";
|
|
2
|
+
//#region src/about.ts
|
|
3
|
+
/**
|
|
4
|
+
* Qué puede: what an agent says about itself and the facts it rests on (`GET /agents/{id}/about`,
|
|
5
|
+
* `POST /agents/{id}/describe`). The words are the model's, written from the agent's folder and
|
|
6
|
+
* stale the moment it changes; the facts are the platform's, read each time.
|
|
7
|
+
*/
|
|
8
|
+
/** The marks the package draws (a topic's, an automation's kind, a note's tone). */
|
|
9
|
+
const ICONS = [
|
|
10
|
+
"message",
|
|
11
|
+
"phone",
|
|
12
|
+
"mail",
|
|
13
|
+
"calendar",
|
|
14
|
+
"clock",
|
|
15
|
+
"search",
|
|
16
|
+
"file",
|
|
17
|
+
"table",
|
|
18
|
+
"bell",
|
|
19
|
+
"hand",
|
|
20
|
+
"user",
|
|
21
|
+
"globe",
|
|
22
|
+
"code",
|
|
23
|
+
"lock",
|
|
24
|
+
"cart",
|
|
25
|
+
"card",
|
|
26
|
+
"map",
|
|
27
|
+
"check",
|
|
28
|
+
"warning",
|
|
29
|
+
"sparkle"
|
|
30
|
+
];
|
|
31
|
+
/** An app of the agent's as people write it: its provider's name, else its alias made words. */
|
|
32
|
+
const appTitle = (connection) => connection.title ?? toolName(connection.name);
|
|
33
|
+
/** A tool of an app as people read it: its provider's name for it, else its own made words. */
|
|
34
|
+
const toolTitle = (connection, action) => connection.titles?.[action] ?? toolName(action);
|
|
35
|
+
/** A tool of an app as a person reads it: `Gmail.SendEmail` is "Send email". */
|
|
36
|
+
function toolName(action) {
|
|
37
|
+
const words = action.slice(action.lastIndexOf(".") + 1).replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/_/g, " ").toLowerCase();
|
|
38
|
+
return words.charAt(0).toUpperCase() + words.slice(1);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* An action's name made words, for one nobody named: `ver_hoja` is "Ver hoja"; an app's tool
|
|
42
|
+
* as the model calls it, `gmail__GMAIL_SEND_EMAIL`, is "Send email (Gmail)".
|
|
43
|
+
*/
|
|
44
|
+
function actionWords(name) {
|
|
45
|
+
const split = name.indexOf("__");
|
|
46
|
+
if (split < 0) return toolName(name);
|
|
47
|
+
const tool = name.slice(split + 2);
|
|
48
|
+
return `${toolName(tool.slice(tool.indexOf("_") + 1) || tool)} (${toolName(name.slice(0, split))})`;
|
|
49
|
+
}
|
|
50
|
+
/** The longest name the model takes for a tool (`app/connections` cuts there too). */
|
|
51
|
+
const MAX_TOOL_NAME = 64;
|
|
52
|
+
/** `gmail` + `Gmail.SendEmail` → `gmail__Gmail_SendEmail`: the tool the model is given. */
|
|
53
|
+
const generatedName = (alias, action) => `${alias}__${action.replace(/[^A-Za-z0-9_]/g, "_")}`.slice(0, MAX_TOOL_NAME);
|
|
54
|
+
/**
|
|
55
|
+
* The tools the agent's apps give it, by the names the model calls them, in words: the
|
|
56
|
+
* provider's for the tool and the app's ("List Events (Google Calendar)"), as a chat's steps
|
|
57
|
+
* read them (`ChatMessages.steps`).
|
|
58
|
+
*/
|
|
59
|
+
function appSteps(connections) {
|
|
60
|
+
return Object.fromEntries(connections.flatMap((connection) => connection.actions.map((action) => [generatedName(connection.name, action), `${toolTitle(connection, action)} (${appTitle(connection)})`])));
|
|
61
|
+
}
|
|
62
|
+
/** The topics in the order the panel lists them. */
|
|
63
|
+
const TOPICS = [
|
|
64
|
+
"apps",
|
|
65
|
+
"tools",
|
|
66
|
+
"knowledge",
|
|
67
|
+
"learning",
|
|
68
|
+
"channels",
|
|
69
|
+
"keys"
|
|
70
|
+
];
|
|
71
|
+
/**
|
|
72
|
+
* The agent's automations, in their order, each with the agent's line about it (matched by id):
|
|
73
|
+
* one added since the words were written has none yet, and a line for one since removed is
|
|
74
|
+
* dropped.
|
|
75
|
+
*/
|
|
76
|
+
function automationsOf(about, facts) {
|
|
77
|
+
const lines = new Map((about?.does ?? []).map((line) => [line.automation, line]));
|
|
78
|
+
return facts.automations.map((automation) => ({
|
|
79
|
+
automation,
|
|
80
|
+
line: lines.get(automation.id)
|
|
81
|
+
}));
|
|
82
|
+
}
|
|
83
|
+
/** How many things a topic holds: the tools that are on, the rest whole. */
|
|
84
|
+
function countOf(topic, facts) {
|
|
85
|
+
return namesOf(topic, facts, (action) => action.name).length;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* The names of what a topic holds, in order, as its row in the panel previews them: an app by its
|
|
89
|
+
* name, a tool by `label` (the host's words for the shipped ones), a file by its path and a table
|
|
90
|
+
* by its title, what it learned by the line itself.
|
|
91
|
+
*/
|
|
92
|
+
function namesOf(topic, facts, label) {
|
|
93
|
+
switch (topic) {
|
|
94
|
+
case "apps": return facts.connections.map(appTitle);
|
|
95
|
+
case "tools": return facts.actions.filter((action) => action.on).map(label);
|
|
96
|
+
case "knowledge": return [...facts.files.map((file) => file.path), ...facts.data.map((table) => table.title ?? table.table)];
|
|
97
|
+
case "learning": return facts.memories.map((memory) => memory.text);
|
|
98
|
+
case "channels": return [...facts.channels.map((channel) => channel.name), ...facts.devices.map((device) => device.name)];
|
|
99
|
+
case "keys": return facts.vault.map((secret) => secret.name);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Which state the words are in: `writing` while there are none yet or the agent is writing them
|
|
104
|
+
* anew (`loading`), `stale` when the agent changed since it wrote them, `fresh` otherwise.
|
|
105
|
+
*/
|
|
106
|
+
function aboutState(about, aboutAt, loading) {
|
|
107
|
+
if (about === null || loading) return "writing";
|
|
108
|
+
return aboutAt === null ? "stale" : "fresh";
|
|
109
|
+
}
|
|
110
|
+
const ON = /* @__PURE__ */ new Set([
|
|
111
|
+
"live",
|
|
112
|
+
"active",
|
|
113
|
+
"connected",
|
|
114
|
+
"on",
|
|
115
|
+
"ready",
|
|
116
|
+
"online"
|
|
117
|
+
]);
|
|
118
|
+
const OFF = /* @__PURE__ */ new Set([
|
|
119
|
+
"failed",
|
|
120
|
+
"error",
|
|
121
|
+
"disconnected",
|
|
122
|
+
"off",
|
|
123
|
+
"expired",
|
|
124
|
+
"broken"
|
|
125
|
+
]);
|
|
126
|
+
/** The tone of a channel's or a device's status, from the words the platform uses for it. */
|
|
127
|
+
function toneOf(status) {
|
|
128
|
+
const word = status.trim().toLowerCase();
|
|
129
|
+
if (ON.has(word)) return "on";
|
|
130
|
+
if (OFF.has(word)) return "off";
|
|
131
|
+
return "quiet";
|
|
132
|
+
}
|
|
133
|
+
//#endregion
|
|
134
|
+
export { ICONS, TOPICS, aboutState, actionWords, appSteps, appTitle, automationsOf, countOf, formatSize, generatedName, namesOf, toneOf, toolName, toolTitle };
|
|
135
|
+
|
|
136
|
+
//# sourceMappingURL=about.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"about.js","names":[],"sources":["../src/about.ts"],"sourcesContent":["/**\n * Qué puede: what an agent says about itself and the facts it rests on (`GET /agents/{id}/about`,\n * `POST /agents/{id}/describe`). The words are the model's, written from the agent's folder and\n * stale the moment it changes; the facts are the platform's, read each time.\n */\n\n/** The marks the package draws (a topic's, an automation's kind, a note's tone). */\nexport const ICONS = [\n \"message\",\n \"phone\",\n \"mail\",\n \"calendar\",\n \"clock\",\n \"search\",\n \"file\",\n \"table\",\n \"bell\",\n \"hand\",\n \"user\",\n \"globe\",\n \"code\",\n \"lock\",\n \"cart\",\n \"card\",\n \"map\",\n \"check\",\n \"warning\",\n \"sparkle\",\n] as const;\n\nexport type Icon = (typeof ICONS)[number];\n\n/** One automation as the agent tells it: what it does then, and when. */\nexport interface Does {\n /** The automation's id. */\n automation: string;\n text: string;\n /** When it runs, the way a person says it: \"Cada día a las 8:00\". */\n when: string;\n}\n\n/** What the agent says about itself: a lead, what it does, what it asks leave for. */\nexport interface About {\n /** Two or three sentences, first person, in the owner's language. */\n summary: string;\n does: Does[];\n asks: string[];\n}\n\nexport type ActionSource = \"default\" | \"library\" | \"own\";\n\nexport interface ActionFact {\n name: string;\n description: string;\n source: ActionSource;\n on: boolean;\n needs_approval: boolean;\n destructive: boolean;\n /** Its input as the model gets it (JSON Schema); left out by an API from before. */\n input_schema?: Readonly<Record<string, unknown>> | undefined;\n}\n\nexport type AutomationKind = \"schedule\" | \"webhook\" | \"event\";\n\n/** Something the agent does on its own: at a time, when another system calls, on an event. */\nexport interface AutomationFact {\n id: string;\n /** Its file's name, `automations/<name>.py`: how its page is reached. */\n name: string;\n kind: AutomationKind;\n title: string;\n /** What it does, in the owner's words. */\n summary: string;\n /** The same words, for a reader of the older shape. */\n say: string;\n /** A cron line and its time zone, for one that runs at a time. */\n schedule?: string | null | undefined;\n timezone?: string | null | undefined;\n /** Where another system calls it, for a webhook (a path on the API). */\n url?: string | null | undefined;\n /** For one on an app's event: the app (the connection's name), the event as its provider\n * names it, and the app as its mark is drawn (`composio:gmail`, the provider's logo). */\n app?: string | null | undefined;\n /** The app as people write it (`Google Calendar`). */\n app_title?: string | null | undefined;\n event?: string | null | undefined;\n provider?: string | undefined;\n icon?: string | null | undefined;\n /** Off: declared, but it doesn't run. */\n on: boolean;\n next_run_at?: string | null | undefined;\n}\n\nexport type Provider = \"arcade\" | \"composio\" | \"mcp\" | \"api\";\n\nexport interface ConnectionFact {\n provider: Provider;\n name: string;\n /** The app, as the provider names it (`gmail`). */\n toolkit?: string | undefined;\n /** The app as people write it (`Google Calendar`). */\n title?: string | undefined;\n /** pending · active · error · disconnected */\n status?: string | undefined;\n /** The provider's names of what the agent may do in it (`Gmail.SendEmail`). */\n actions: string[];\n /** What the provider calls each of them for people (`List Events`), when it says. */\n titles?: Readonly<Record<string, string>> | undefined;\n /** A URL to the app's own mark, when the provider gives one. */\n icon?: string | null | undefined;\n}\n\n/** An app of the agent's as people write it: its provider's name, else its alias made words. */\nexport const appTitle = (connection: ConnectionFact): string =>\n connection.title ?? toolName(connection.name);\n\n/** A tool of an app as people read it: its provider's name for it, else its own made words. */\nexport const toolTitle = (connection: ConnectionFact, action: string): string =>\n connection.titles?.[action] ?? toolName(action);\n\n/** A tool of an app as a person reads it: `Gmail.SendEmail` is \"Send email\". */\nexport function toolName(action: string): string {\n const bare = action.slice(action.lastIndexOf(\".\") + 1);\n const words = bare\n .replace(/([a-z0-9])([A-Z])/g, \"$1 $2\")\n .replace(/_/g, \" \")\n .toLowerCase();\n return words.charAt(0).toUpperCase() + words.slice(1);\n}\n\n/**\n * An action's name made words, for one nobody named: `ver_hoja` is \"Ver hoja\"; an app's tool\n * as the model calls it, `gmail__GMAIL_SEND_EMAIL`, is \"Send email (Gmail)\".\n */\nexport function actionWords(name: string): string {\n const split = name.indexOf(\"__\");\n if (split < 0) return toolName(name);\n const tool = name.slice(split + 2);\n const bare = tool.slice(tool.indexOf(\"_\") + 1) || tool;\n return `${toolName(bare)} (${toolName(name.slice(0, split))})`;\n}\n\n/** The longest name the model takes for a tool (`app/connections` cuts there too). */\nconst MAX_TOOL_NAME = 64;\n\n/** `gmail` + `Gmail.SendEmail` → `gmail__Gmail_SendEmail`: the tool the model is given. */\nexport const generatedName = (alias: string, action: string): string =>\n `${alias}__${action.replace(/[^A-Za-z0-9_]/g, \"_\")}`.slice(0, MAX_TOOL_NAME);\n\n/**\n * The tools the agent's apps give it, by the names the model calls them, in words: the\n * provider's for the tool and the app's (\"List Events (Google Calendar)\"), as a chat's steps\n * read them (`ChatMessages.steps`).\n */\nexport function appSteps(connections: readonly ConnectionFact[]): Record<string, string> {\n return Object.fromEntries(\n connections.flatMap((connection) =>\n connection.actions.map((action) => [\n generatedName(connection.name, action),\n `${toolTitle(connection, action)} (${appTitle(connection)})`,\n ]),\n ),\n );\n}\n\nexport type ChannelKind = \"whatsapp\" | \"instagram\" | \"email\" | \"sms\" | \"web\" | \"phone\";\n\nexport interface ChannelFact {\n kind: ChannelKind;\n name: string;\n status: string;\n}\n\n/** A file the agent can read: its own, or one of the organization's, shared with every agent. */\nexport interface FileFact {\n path: string;\n size: number;\n /** Text, Markdown, JSON, YAML or PDF, read by `search_files`; anything else is only kept. */\n searchable: boolean;\n /** The organization's, not the agent's own. */\n shared: boolean;\n}\n\n/** A line the agent kept with `remember`. */\nexport interface MemoryFact {\n id: string;\n /** The agent that keeps it; the contact it is about, when it is about one. */\n agent_id?: string | undefined;\n contact_id?: string | null | undefined;\n text: string;\n created_at: string;\n}\n\n/** A key the agent may use: its own, or one of the organization's, shared with every agent. */\nexport interface VaultFact {\n name: string;\n /** The hosts it may be sent to. */\n hosts?: string[] | undefined;\n /** The organization's, not the agent's own. */\n shared?: boolean | undefined;\n}\n\n/** A table of the organization's the agent may read or write (an agenda, the clients). */\nexport interface DataFact {\n table: string;\n /** Its name for people, when it has one. */\n title?: string | null | undefined;\n can: string[];\n}\n\nexport interface AskFact {\n agent_id: string;\n name: string;\n}\n\nexport type DeviceKind = \"extension\" | \"installer\";\n\nexport interface DeviceFact {\n kind: DeviceKind;\n name: string;\n status: string;\n}\n\n/** What the agent has, every list present from day one; one whose phase has not come is empty. */\nexport interface Facts {\n actions: ActionFact[];\n automations: AutomationFact[];\n connections: ConnectionFact[];\n channels: ChannelFact[];\n /** Its own first, then the organization's shared. */\n files: FileFact[];\n /** Newest first. */\n memories: MemoryFact[];\n vault: VaultFact[];\n data: DataFact[];\n asks: AskFact[];\n devices: DeviceFact[];\n}\n\nexport interface AboutOut {\n /** Null until the agent has written about itself once. */\n about: About | null;\n /** When the words were written; null when the folder changed since, so they are stale. */\n about_at: string | null;\n facts: Facts;\n}\n\n/**\n * What the panel lists of the facts beside what the agent does on its own, gathered into a few\n * things an owner reads at a glance: the apps it uses, its tools, what it knows (files and\n * tables), what it has learned, where it works (channels and devices), and its keys.\n */\nexport type Topic = \"apps\" | \"tools\" | \"knowledge\" | \"learning\" | \"channels\" | \"keys\";\n\n/** The topics in the order the panel lists them. */\nexport const TOPICS: readonly Topic[] = [\n \"apps\",\n \"tools\",\n \"knowledge\",\n \"learning\",\n \"channels\",\n \"keys\",\n];\n\n/** An automation with what the agent said about it, when it said something. */\nexport interface Told {\n automation: AutomationFact;\n line: Does | undefined;\n}\n\n/**\n * The agent's automations, in their order, each with the agent's line about it (matched by id):\n * one added since the words were written has none yet, and a line for one since removed is\n * dropped.\n */\nexport function automationsOf(about: About | null, facts: Facts): Told[] {\n const lines = new Map((about?.does ?? []).map((line) => [line.automation, line]));\n return facts.automations.map((automation) => ({ automation, line: lines.get(automation.id) }));\n}\n\n/** How many things a topic holds: the tools that are on, the rest whole. */\nexport function countOf(topic: Topic, facts: Facts): number {\n return namesOf(topic, facts, (action) => action.name).length;\n}\n\n/**\n * The names of what a topic holds, in order, as its row in the panel previews them: an app by its\n * name, a tool by `label` (the host's words for the shipped ones), a file by its path and a table\n * by its title, what it learned by the line itself.\n */\nexport function namesOf(\n topic: Topic,\n facts: Facts,\n label: (action: ActionFact) => string,\n): string[] {\n switch (topic) {\n case \"apps\":\n return facts.connections.map(appTitle);\n case \"tools\":\n return facts.actions.filter((action) => action.on).map(label);\n case \"knowledge\":\n return [\n ...facts.files.map((file) => file.path),\n ...facts.data.map((table) => table.title ?? table.table),\n ];\n case \"learning\":\n return facts.memories.map((memory) => memory.text);\n case \"channels\":\n return [\n ...facts.channels.map((channel) => channel.name),\n ...facts.devices.map((device) => device.name),\n ];\n case \"keys\":\n return facts.vault.map((secret) => secret.name);\n }\n}\n\nexport type AboutState = \"writing\" | \"stale\" | \"fresh\";\n\n/**\n * Which state the words are in: `writing` while there are none yet or the agent is writing them\n * anew (`loading`), `stale` when the agent changed since it wrote them, `fresh` otherwise.\n */\nexport function aboutState(\n about: About | null,\n aboutAt: string | null,\n loading: boolean,\n): AboutState {\n if (about === null || loading) return \"writing\";\n return aboutAt === null ? \"stale\" : \"fresh\";\n}\n\n/** A file's size as people read it (the kit's, where the file chips draw it). */\nexport { formatSize } from \"./kit/numbers\";\n\n/** How a status reads beside its words: working, broken, or neither. */\nexport type StatusTone = \"on\" | \"off\" | \"quiet\";\n\nconst ON: ReadonlySet<string> = new Set([\"live\", \"active\", \"connected\", \"on\", \"ready\", \"online\"]);\nconst OFF: ReadonlySet<string> = new Set([\n \"failed\",\n \"error\",\n \"disconnected\",\n \"off\",\n \"expired\",\n \"broken\",\n]);\n\n/** The tone of a channel's or a device's status, from the words the platform uses for it. */\nexport function toneOf(status: string): StatusTone {\n const word = status.trim().toLowerCase();\n if (ON.has(word)) return \"on\";\n if (OFF.has(word)) return \"off\";\n return \"quiet\";\n}\n"],"mappings":";;;;;;;;AAOA,MAAa,QAAQ;CACnB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;AAqFA,MAAa,YAAY,eACvB,WAAW,SAAS,SAAS,WAAW,IAAI;;AAG9C,MAAa,aAAa,YAA4B,WACpD,WAAW,SAAS,WAAW,SAAS,MAAM;;AAGhD,SAAgB,SAAS,QAAwB;CAE/C,MAAM,QADO,OAAO,MAAM,OAAO,YAAY,GAAG,IAAI,CACnC,CAAC,CACf,QAAQ,sBAAsB,OAAO,CAAC,CACtC,QAAQ,MAAM,GAAG,CAAC,CAClB,YAAY;CACf,OAAO,MAAM,OAAO,CAAC,CAAC,CAAC,YAAY,IAAI,MAAM,MAAM,CAAC;AACtD;;;;;AAMA,SAAgB,YAAY,MAAsB;CAChD,MAAM,QAAQ,KAAK,QAAQ,IAAI;CAC/B,IAAI,QAAQ,GAAG,OAAO,SAAS,IAAI;CACnC,MAAM,OAAO,KAAK,MAAM,QAAQ,CAAC;CAEjC,OAAO,GAAG,SADG,KAAK,MAAM,KAAK,QAAQ,GAAG,IAAI,CAAC,KAAK,IAC3B,EAAE,IAAI,SAAS,KAAK,MAAM,GAAG,KAAK,CAAC,EAAE;AAC9D;;AAGA,MAAM,gBAAgB;;AAGtB,MAAa,iBAAiB,OAAe,WAC3C,GAAG,MAAM,IAAI,OAAO,QAAQ,kBAAkB,GAAG,IAAI,MAAM,GAAG,aAAa;;;;;;AAO7E,SAAgB,SAAS,aAAgE;CACvF,OAAO,OAAO,YACZ,YAAY,SAAS,eACnB,WAAW,QAAQ,KAAK,WAAW,CACjC,cAAc,WAAW,MAAM,MAAM,GACrC,GAAG,UAAU,YAAY,MAAM,EAAE,IAAI,SAAS,UAAU,EAAE,EAC5D,CAAC,CACH,CACF;AACF;;AA4FA,MAAa,SAA2B;CACtC;CACA;CACA;CACA;CACA;CACA;AACF;;;;;;AAaA,SAAgB,cAAc,OAAqB,OAAsB;CACvE,MAAM,QAAQ,IAAI,KAAK,OAAO,QAAQ,CAAC,EAAA,CAAG,KAAK,SAAS,CAAC,KAAK,YAAY,IAAI,CAAC,CAAC;CAChF,OAAO,MAAM,YAAY,KAAK,gBAAgB;EAAE;EAAY,MAAM,MAAM,IAAI,WAAW,EAAE;CAAE,EAAE;AAC/F;;AAGA,SAAgB,QAAQ,OAAc,OAAsB;CAC1D,OAAO,QAAQ,OAAO,QAAQ,WAAW,OAAO,IAAI,CAAC,CAAC;AACxD;;;;;;AAOA,SAAgB,QACd,OACA,OACA,OACU;CACV,QAAQ,OAAR;EACE,KAAK,QACH,OAAO,MAAM,YAAY,IAAI,QAAQ;EACvC,KAAK,SACH,OAAO,MAAM,QAAQ,QAAQ,WAAW,OAAO,EAAE,CAAC,CAAC,IAAI,KAAK;EAC9D,KAAK,aACH,OAAO,CACL,GAAG,MAAM,MAAM,KAAK,SAAS,KAAK,IAAI,GACtC,GAAG,MAAM,KAAK,KAAK,UAAU,MAAM,SAAS,MAAM,KAAK,CACzD;EACF,KAAK,YACH,OAAO,MAAM,SAAS,KAAK,WAAW,OAAO,IAAI;EACnD,KAAK,YACH,OAAO,CACL,GAAG,MAAM,SAAS,KAAK,YAAY,QAAQ,IAAI,GAC/C,GAAG,MAAM,QAAQ,KAAK,WAAW,OAAO,IAAI,CAC9C;EACF,KAAK,QACH,OAAO,MAAM,MAAM,KAAK,WAAW,OAAO,IAAI;CAClD;AACF;;;;;AAQA,SAAgB,WACd,OACA,SACA,SACY;CACZ,IAAI,UAAU,QAAQ,SAAS,OAAO;CACtC,OAAO,YAAY,OAAO,UAAU;AACtC;AAQA,MAAM,qBAA0B,IAAI,IAAI;CAAC;CAAQ;CAAU;CAAa;CAAM;CAAS;AAAQ,CAAC;AAChG,MAAM,sBAA2B,IAAI,IAAI;CACvC;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;;AAGD,SAAgB,OAAO,QAA4B;CACjD,MAAM,OAAO,OAAO,KAAK,CAAC,CAAC,YAAY;CACvC,IAAI,GAAG,IAAI,IAAI,GAAG,OAAO;CACzB,IAAI,IAAI,IAAI,IAAI,GAAG,OAAO;CAC1B,OAAO;AACT"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Icon } from "@phosphor-icons/react";
|
|
2
|
+
//#region src/agentIcons.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* The marks an agent goes by: a glyph for the work it does (appointments, reception, sales…), on
|
|
5
|
+
* the tint it keeps everywhere (`agentTint`). It picks one itself the first time it describes
|
|
6
|
+
* itself; the owner changes it through the builder. One to one with the API's `AgentIcon`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const AGENT_ICONS: {
|
|
9
|
+
readonly sparkle: Icon;
|
|
10
|
+
readonly calendar: Icon;
|
|
11
|
+
readonly headset: Icon;
|
|
12
|
+
readonly message: Icon;
|
|
13
|
+
readonly phone: Icon;
|
|
14
|
+
readonly mail: Icon;
|
|
15
|
+
readonly cart: Icon;
|
|
16
|
+
readonly card: Icon;
|
|
17
|
+
readonly chart: Icon;
|
|
18
|
+
readonly megaphone: Icon;
|
|
19
|
+
readonly wrench: Icon;
|
|
20
|
+
readonly briefcase: Icon;
|
|
21
|
+
readonly heart: Icon;
|
|
22
|
+
readonly user: Icon;
|
|
23
|
+
readonly search: Icon;
|
|
24
|
+
readonly file: Icon;
|
|
25
|
+
readonly globe: Icon;
|
|
26
|
+
readonly code: Icon;
|
|
27
|
+
readonly map: Icon;
|
|
28
|
+
};
|
|
29
|
+
export type AgentIcon = keyof typeof AGENT_ICONS;
|
|
30
|
+
/** An agent's glyph; a sparkle until it has picked one (or for a mark this package predates). */
|
|
31
|
+
export declare function agentGlyph(icon: string | null | undefined): Icon;
|
|
32
|
+
//#endregion
|
|
33
|
+
//# sourceMappingURL=agentIcons.d.ts.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { BriefcaseIcon, CalendarBlankIcon, ChartLineUpIcon, ChatCircleIcon, CodeIcon, CreditCardIcon, EnvelopeSimpleIcon, FileTextIcon, GlobeIcon, HeadsetIcon, HeartIcon, MagnifyingGlassIcon, MapPinIcon, MegaphoneIcon, PhoneIcon, ShoppingCartIcon, SparkleIcon, UserIcon, WrenchIcon } from "@phosphor-icons/react";
|
|
2
|
+
//#region src/agentIcons.ts
|
|
3
|
+
/**
|
|
4
|
+
* The marks an agent goes by: a glyph for the work it does (appointments, reception, sales…), on
|
|
5
|
+
* the tint it keeps everywhere (`agentTint`). It picks one itself the first time it describes
|
|
6
|
+
* itself; the owner changes it through the builder. One to one with the API's `AgentIcon`.
|
|
7
|
+
*/
|
|
8
|
+
const AGENT_ICONS = {
|
|
9
|
+
sparkle: SparkleIcon,
|
|
10
|
+
calendar: CalendarBlankIcon,
|
|
11
|
+
headset: HeadsetIcon,
|
|
12
|
+
message: ChatCircleIcon,
|
|
13
|
+
phone: PhoneIcon,
|
|
14
|
+
mail: EnvelopeSimpleIcon,
|
|
15
|
+
cart: ShoppingCartIcon,
|
|
16
|
+
card: CreditCardIcon,
|
|
17
|
+
chart: ChartLineUpIcon,
|
|
18
|
+
megaphone: MegaphoneIcon,
|
|
19
|
+
wrench: WrenchIcon,
|
|
20
|
+
briefcase: BriefcaseIcon,
|
|
21
|
+
heart: HeartIcon,
|
|
22
|
+
user: UserIcon,
|
|
23
|
+
search: MagnifyingGlassIcon,
|
|
24
|
+
file: FileTextIcon,
|
|
25
|
+
globe: GlobeIcon,
|
|
26
|
+
code: CodeIcon,
|
|
27
|
+
map: MapPinIcon
|
|
28
|
+
};
|
|
29
|
+
/** An agent's glyph; a sparkle until it has picked one (or for a mark this package predates). */
|
|
30
|
+
function agentGlyph(icon) {
|
|
31
|
+
return icon != null && icon in AGENT_ICONS ? AGENT_ICONS[icon] : SparkleIcon;
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { AGENT_ICONS, agentGlyph };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=agentIcons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentIcons.js","names":[],"sources":["../src/agentIcons.ts"],"sourcesContent":["import {\n BriefcaseIcon,\n CalendarBlankIcon,\n ChartLineUpIcon,\n ChatCircleIcon,\n CodeIcon,\n CreditCardIcon,\n EnvelopeSimpleIcon,\n FileTextIcon,\n GlobeIcon,\n HeadsetIcon,\n HeartIcon,\n MagnifyingGlassIcon,\n MapPinIcon,\n MegaphoneIcon,\n PhoneIcon,\n ShoppingCartIcon,\n SparkleIcon,\n UserIcon,\n WrenchIcon,\n type Icon as Phosphor,\n} from \"@phosphor-icons/react\";\n\n/**\n * The marks an agent goes by: a glyph for the work it does (appointments, reception, sales…), on\n * the tint it keeps everywhere (`agentTint`). It picks one itself the first time it describes\n * itself; the owner changes it through the builder. One to one with the API's `AgentIcon`.\n */\nexport const AGENT_ICONS = {\n sparkle: SparkleIcon,\n calendar: CalendarBlankIcon,\n headset: HeadsetIcon,\n message: ChatCircleIcon,\n phone: PhoneIcon,\n mail: EnvelopeSimpleIcon,\n cart: ShoppingCartIcon,\n card: CreditCardIcon,\n chart: ChartLineUpIcon,\n megaphone: MegaphoneIcon,\n wrench: WrenchIcon,\n briefcase: BriefcaseIcon,\n heart: HeartIcon,\n user: UserIcon,\n search: MagnifyingGlassIcon,\n file: FileTextIcon,\n globe: GlobeIcon,\n code: CodeIcon,\n map: MapPinIcon,\n} as const satisfies Record<string, Phosphor>;\n\nexport type AgentIcon = keyof typeof AGENT_ICONS;\n\n/** An agent's glyph; a sparkle until it has picked one (or for a mark this package predates). */\nexport function agentGlyph(icon: string | null | undefined): Phosphor {\n return icon != null && icon in AGENT_ICONS ? AGENT_ICONS[icon as AgentIcon] : SparkleIcon;\n}\n"],"mappings":";;;;;;;AA4BA,MAAa,cAAc;CACzB,SAAS;CACT,UAAU;CACV,SAAS;CACT,SAAS;CACT,OAAO;CACP,MAAM;CACN,MAAM;CACN,MAAM;CACN,OAAO;CACP,WAAW;CACX,QAAQ;CACR,WAAW;CACX,OAAO;CACP,MAAM;CACN,QAAQ;CACR,MAAM;CACN,OAAO;CACP,MAAM;CACN,KAAK;AACP;;AAKA,SAAgB,WAAW,MAA2C;CACpE,OAAO,QAAQ,QAAQ,QAAQ,cAAc,YAAY,QAAqB;AAChF"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Automation as Automation$1, Run } from "./types.js";
|
|
2
|
+
import { AppDirectory } from "../AgentAbout.js";
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
//#region src/automation/Automation.d.ts
|
|
5
|
+
export interface AutomationProps {
|
|
6
|
+
automation: Automation$1;
|
|
7
|
+
/** Its newest runs, newest first; without them the part is left out. */
|
|
8
|
+
runs?: readonly Run[] | undefined;
|
|
9
|
+
/** Switching it on and off, the host's call; without it there is no switch (a conversation's). */
|
|
10
|
+
onSwitch?: ((on: boolean) => void) | undefined;
|
|
11
|
+
/** The switch's change is on its way: it holds still. */
|
|
12
|
+
switching?: boolean | undefined;
|
|
13
|
+
/** The host's controls after the switch (taking a contact's task away). */
|
|
14
|
+
actions?: ReactNode | undefined;
|
|
15
|
+
/** Opening a run's record; without it the runs only read. */
|
|
16
|
+
onOpenRun?: ((run: Run) => void) | undefined;
|
|
17
|
+
/** The run open beside it, marked in the list. */
|
|
18
|
+
openRun?: string | null | undefined;
|
|
19
|
+
/** The host's logos for apps; without them an app shows the logo the API gives. */
|
|
20
|
+
apps?: AppDirectory | undefined;
|
|
21
|
+
/** What time it is, for the words that say when; now by default. */
|
|
22
|
+
now?: Date | undefined;
|
|
23
|
+
className?: string | undefined;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* One automation, as its owner reads it: a head with what starts it (a clock, a webhook, the
|
|
27
|
+
* app whose event it waits for) as a 40px mark, its title, when it runs in words with its next
|
|
28
|
+
* run, and how it stands (with the host's switch, when it gives one); the owner's own sentence of
|
|
29
|
+
* what it does, set apart; its steps, numbered, each with what it uses; the table it moves, as a
|
|
30
|
+
* figure per value; and its runs, each with what started it and when, its line, how it ended.
|
|
31
|
+
* It only draws: switching it and opening a run are the host's (`onSwitch`, `onOpenRun`).
|
|
32
|
+
*/
|
|
33
|
+
export declare function Automation({ automation, runs, onSwitch, switching, actions, onOpenRun, openRun, apps, now, className }: AutomationProps): import("react").JSX.Element;
|
|
34
|
+
//#endregion
|
|
35
|
+
//# sourceMappingURL=Automation.d.ts.map
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
import { joined, useKit, useParts } from "../kit/context.js";
|
|
2
|
+
import { List, Row } from "../kit/List.js";
|
|
3
|
+
import { Stat, Stats } from "../kit/Stat.js";
|
|
4
|
+
import { Switch } from "../kit/Switch.js";
|
|
5
|
+
import { Tag } from "../kit/Tag.js";
|
|
6
|
+
import { AppMark, ByMark, TriggerMark, USES } from "./marks.js";
|
|
7
|
+
import { lineOf, momentOf } from "./when.js";
|
|
8
|
+
import { useId } from "react";
|
|
9
|
+
import { CheckIcon, TableIcon, WarningCircleIcon } from "@phosphor-icons/react";
|
|
10
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
//#region src/automation/Automation.tsx
|
|
12
|
+
/** How the state reads on its pill: running well, paused, or its last run failed. */
|
|
13
|
+
const STATE_TONES = {
|
|
14
|
+
active: "success",
|
|
15
|
+
paused: void 0,
|
|
16
|
+
failing: "danger"
|
|
17
|
+
};
|
|
18
|
+
/** The values of its table shown as figures; the rest are counted after them. */
|
|
19
|
+
const SHOWN_COUNTS = 4;
|
|
20
|
+
/**
|
|
21
|
+
* One automation, as its owner reads it: a head with what starts it (a clock, a webhook, the
|
|
22
|
+
* app whose event it waits for) as a 40px mark, its title, when it runs in words with its next
|
|
23
|
+
* run, and how it stands (with the host's switch, when it gives one); the owner's own sentence of
|
|
24
|
+
* what it does, set apart; its steps, numbered, each with what it uses; the table it moves, as a
|
|
25
|
+
* figure per value; and its runs, each with what started it and when, its line, how it ended.
|
|
26
|
+
* It only draws: switching it and opening a run are the host's (`onSwitch`, `onOpenRun`).
|
|
27
|
+
*/
|
|
28
|
+
function Automation({ automation, runs, onSwitch, switching, actions, onOpenRun, openRun, apps, now = /* @__PURE__ */ new Date(), className }) {
|
|
29
|
+
const part = useParts();
|
|
30
|
+
const { messages, code } = useKit();
|
|
31
|
+
const words = messages.automation;
|
|
32
|
+
const title = useId();
|
|
33
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
34
|
+
"aria-labelledby": title,
|
|
35
|
+
className: joined(part("sc-automation"), className),
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ jsxs("header", {
|
|
38
|
+
className: part("sc-automation__head"),
|
|
39
|
+
children: [
|
|
40
|
+
/* @__PURE__ */ jsx(TriggerMark, {
|
|
41
|
+
trigger: automation.trigger,
|
|
42
|
+
size: 40,
|
|
43
|
+
apps
|
|
44
|
+
}),
|
|
45
|
+
/* @__PURE__ */ jsxs("div", {
|
|
46
|
+
className: part("sc-automation__heading"),
|
|
47
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
48
|
+
id: title,
|
|
49
|
+
className: part("sc-automation__title"),
|
|
50
|
+
children: automation.title
|
|
51
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
52
|
+
className: part("sc-automation__when"),
|
|
53
|
+
children: lineOf(automation, now, words, code)
|
|
54
|
+
})]
|
|
55
|
+
}),
|
|
56
|
+
/* @__PURE__ */ jsxs("div", {
|
|
57
|
+
className: part("sc-automation__end"),
|
|
58
|
+
children: [
|
|
59
|
+
/* @__PURE__ */ jsxs(Tag, {
|
|
60
|
+
tone: STATE_TONES[automation.state],
|
|
61
|
+
children: [/* @__PURE__ */ jsx("i", {
|
|
62
|
+
"aria-hidden": true,
|
|
63
|
+
className: part("sc-automation__dot")
|
|
64
|
+
}), words.states[automation.state]]
|
|
65
|
+
}),
|
|
66
|
+
onSwitch !== void 0 && /* @__PURE__ */ jsx(Switch, {
|
|
67
|
+
checked: automation.on,
|
|
68
|
+
onChange: onSwitch,
|
|
69
|
+
label: words.switchLabel,
|
|
70
|
+
disabled: switching
|
|
71
|
+
}),
|
|
72
|
+
actions
|
|
73
|
+
]
|
|
74
|
+
})
|
|
75
|
+
]
|
|
76
|
+
}),
|
|
77
|
+
automation.summary !== "" && /* @__PURE__ */ jsx("p", {
|
|
78
|
+
className: part("sc-automation__summary"),
|
|
79
|
+
children: automation.summary
|
|
80
|
+
}),
|
|
81
|
+
automation.steps.length > 0 && /* @__PURE__ */ jsx(Steps, {
|
|
82
|
+
steps: automation.steps,
|
|
83
|
+
words,
|
|
84
|
+
apps
|
|
85
|
+
}),
|
|
86
|
+
automation.board !== null && automation.board.counts.length > 0 && /* @__PURE__ */ jsx(BoardView, {
|
|
87
|
+
board: automation.board,
|
|
88
|
+
words
|
|
89
|
+
}),
|
|
90
|
+
runs !== void 0 && /* @__PURE__ */ jsx(Runs, {
|
|
91
|
+
runs,
|
|
92
|
+
trigger: automation.trigger,
|
|
93
|
+
words,
|
|
94
|
+
apps,
|
|
95
|
+
now,
|
|
96
|
+
code,
|
|
97
|
+
onOpenRun,
|
|
98
|
+
openRun: openRun ?? null
|
|
99
|
+
})
|
|
100
|
+
]
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
/** A part of it under its small label. */
|
|
104
|
+
function Part({ label, children }) {
|
|
105
|
+
const part = useParts();
|
|
106
|
+
const id = useId();
|
|
107
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
108
|
+
"aria-labelledby": id,
|
|
109
|
+
className: part("sc-automation__section"),
|
|
110
|
+
children: [/* @__PURE__ */ jsx("h4", {
|
|
111
|
+
id,
|
|
112
|
+
className: part("sc-automation__label"),
|
|
113
|
+
children: label
|
|
114
|
+
}), children]
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
/** Its steps in the code's order: a number, the step's name, and what it uses at the right. */
|
|
118
|
+
function Steps({ steps, words, apps }) {
|
|
119
|
+
const part = useParts();
|
|
120
|
+
return /* @__PURE__ */ jsx(Part, {
|
|
121
|
+
label: words.steps,
|
|
122
|
+
children: /* @__PURE__ */ jsx("ol", {
|
|
123
|
+
className: part("sc-automation__steps"),
|
|
124
|
+
children: steps.map((step, index) => /* @__PURE__ */ jsxs("li", {
|
|
125
|
+
className: part("sc-automation__step"),
|
|
126
|
+
children: [
|
|
127
|
+
/* @__PURE__ */ jsx("span", {
|
|
128
|
+
"aria-hidden": true,
|
|
129
|
+
className: part("sc-automation__number"),
|
|
130
|
+
children: index + 1
|
|
131
|
+
}),
|
|
132
|
+
/* @__PURE__ */ jsx("span", {
|
|
133
|
+
className: part("sc-automation__name"),
|
|
134
|
+
children: step.name
|
|
135
|
+
}),
|
|
136
|
+
step.uses.length > 0 && /* @__PURE__ */ jsx("span", {
|
|
137
|
+
className: part("sc-automation__uses"),
|
|
138
|
+
children: step.uses.map((use, at) => {
|
|
139
|
+
const key = `${at}:${use.kind}:${use.app ?? ""}`;
|
|
140
|
+
if (use.kind !== "app") {
|
|
141
|
+
const Glyph = USES[use.kind];
|
|
142
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
143
|
+
className: part("sc-automation__use"),
|
|
144
|
+
children: [/* @__PURE__ */ jsx(Glyph, {
|
|
145
|
+
"aria-hidden": true,
|
|
146
|
+
weight: "regular"
|
|
147
|
+
}), words.uses[use.kind]]
|
|
148
|
+
}, key);
|
|
149
|
+
}
|
|
150
|
+
const name = use.title ?? use.app ?? "";
|
|
151
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
152
|
+
className: part("sc-automation__use"),
|
|
153
|
+
children: [/* @__PURE__ */ jsx(AppMark, {
|
|
154
|
+
name,
|
|
155
|
+
icon: use.icon,
|
|
156
|
+
size: 18,
|
|
157
|
+
apps
|
|
158
|
+
}), name]
|
|
159
|
+
}, key);
|
|
160
|
+
})
|
|
161
|
+
})
|
|
162
|
+
]
|
|
163
|
+
}, `${index}:${step.name}`))
|
|
164
|
+
})
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
const capital = (text) => text.charAt(0).toUpperCase() + text.slice(1);
|
|
168
|
+
/** The table it moves: its title, then a figure per value (the biggest few, and how many more). */
|
|
169
|
+
function BoardView({ board, words }) {
|
|
170
|
+
const part = useParts();
|
|
171
|
+
const shown = board.counts.slice(0, SHOWN_COUNTS);
|
|
172
|
+
const more = board.counts.length - shown.length;
|
|
173
|
+
return /* @__PURE__ */ jsx(Part, {
|
|
174
|
+
label: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(TableIcon, { "aria-hidden": true }), board.title] }),
|
|
175
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
176
|
+
className: part("sc-automation__board"),
|
|
177
|
+
children: [/* @__PURE__ */ jsx(Stats, {
|
|
178
|
+
label: board.title,
|
|
179
|
+
children: shown.map((count) => /* @__PURE__ */ jsx(Stat, {
|
|
180
|
+
label: capital(count.value),
|
|
181
|
+
value: count.count
|
|
182
|
+
}, count.value))
|
|
183
|
+
}), more > 0 && /* @__PURE__ */ jsx("span", {
|
|
184
|
+
className: part("sc-automation__more"),
|
|
185
|
+
children: words.more(more)
|
|
186
|
+
})]
|
|
187
|
+
})
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Its runs, newest first: what started each (its mark, when, by what), its line, why it failed
|
|
192
|
+
* in the danger tone, and at the right a check once it went well; a test's line says what it
|
|
193
|
+
* would have done.
|
|
194
|
+
*/
|
|
195
|
+
function Runs({ runs, trigger, words, apps, now, code, onOpenRun, openRun }) {
|
|
196
|
+
const part = useParts();
|
|
197
|
+
const app = trigger.app_title ?? trigger.app;
|
|
198
|
+
return /* @__PURE__ */ jsx(Part, {
|
|
199
|
+
label: words.runs,
|
|
200
|
+
children: runs.length === 0 ? /* @__PURE__ */ jsx("p", {
|
|
201
|
+
className: part("sc-automation__empty"),
|
|
202
|
+
children: words.noRuns
|
|
203
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
204
|
+
className: part("sc-automation__runs"),
|
|
205
|
+
children: /* @__PURE__ */ jsx(List, { children: runs.map((run) => /* @__PURE__ */ jsx(Row, {
|
|
206
|
+
className: run.id === openRun ? part("sc-automation__run--open") : void 0,
|
|
207
|
+
mark: /* @__PURE__ */ jsx("span", {
|
|
208
|
+
role: "img",
|
|
209
|
+
"aria-label": words.by(run.by, app),
|
|
210
|
+
title: words.by(run.by, app),
|
|
211
|
+
className: part("sc-run__by"),
|
|
212
|
+
children: /* @__PURE__ */ jsx(ByMark, {
|
|
213
|
+
by: run.by,
|
|
214
|
+
trigger,
|
|
215
|
+
size: 28,
|
|
216
|
+
apps
|
|
217
|
+
})
|
|
218
|
+
}),
|
|
219
|
+
title: momentOf(new Date(run.started_at), now, words, code),
|
|
220
|
+
subtitle: run.summary === null ? void 0 : run.dry ? words.dry(run.summary) : run.summary,
|
|
221
|
+
error: run.status === "failed" && run.error !== null ? /* @__PURE__ */ jsxs("span", { children: [/* @__PURE__ */ jsx(WarningCircleIcon, {
|
|
222
|
+
"aria-hidden": true,
|
|
223
|
+
weight: "fill"
|
|
224
|
+
}), run.error] }) : void 0,
|
|
225
|
+
meta: /* @__PURE__ */ jsx(RunStatus, {
|
|
226
|
+
run,
|
|
227
|
+
words
|
|
228
|
+
}),
|
|
229
|
+
onPress: onOpenRun && (() => onOpenRun(run))
|
|
230
|
+
}, run.id)) })
|
|
231
|
+
})
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* How a run stands, at its row's right: a check once done; the words while it goes, waits or was
|
|
236
|
+
* skipped; nothing once it failed (its error says so, under it).
|
|
237
|
+
*/
|
|
238
|
+
function RunStatus({ run, words }) {
|
|
239
|
+
const part = useParts();
|
|
240
|
+
switch (run.status) {
|
|
241
|
+
case "done": return /* @__PURE__ */ jsx("span", {
|
|
242
|
+
role: "img",
|
|
243
|
+
"aria-label": words.statuses.done,
|
|
244
|
+
className: part("sc-automation__status"),
|
|
245
|
+
children: /* @__PURE__ */ jsx(CheckIcon, {
|
|
246
|
+
"aria-hidden": true,
|
|
247
|
+
weight: "bold"
|
|
248
|
+
})
|
|
249
|
+
});
|
|
250
|
+
case "failed": return null;
|
|
251
|
+
case "running": return /* @__PURE__ */ jsxs(Tag, {
|
|
252
|
+
tone: "info",
|
|
253
|
+
children: [/* @__PURE__ */ jsx("i", {
|
|
254
|
+
"aria-hidden": true,
|
|
255
|
+
className: part("sc-run__live")
|
|
256
|
+
}), words.statuses.running]
|
|
257
|
+
});
|
|
258
|
+
case "waiting": return /* @__PURE__ */ jsx(Tag, {
|
|
259
|
+
tone: "warning",
|
|
260
|
+
children: words.statuses.waiting
|
|
261
|
+
});
|
|
262
|
+
case "skipped": return /* @__PURE__ */ jsx(Tag, { children: words.statuses.skipped });
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
//#endregion
|
|
266
|
+
export { Automation };
|
|
267
|
+
|
|
268
|
+
//# sourceMappingURL=Automation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Automation.js","names":[],"sources":["../../src/automation/Automation.tsx"],"sourcesContent":["import { CheckIcon, TableIcon, WarningCircleIcon } from \"@phosphor-icons/react\";\nimport { useId, type ReactNode } from \"react\";\n\nimport type { AppDirectory } from \"../AgentAbout\";\nimport { joined, useKit, useParts } from \"../kit/context\";\nimport { List, Row } from \"../kit/List\";\nimport { Stat, Stats } from \"../kit/Stat\";\nimport { Switch } from \"../kit/Switch\";\nimport { Tag } from \"../kit/Tag\";\nimport { AppMark, ByMark, TriggerMark, USES } from \"./marks\";\nimport type { AutomationMessages } from \"./messages\";\nimport type { Automation as Shown, AutomationState, Board, Run, Step, Trigger } from \"./types\";\nimport { lineOf, momentOf } from \"./when\";\n\nexport interface AutomationProps {\n automation: Shown;\n /** Its newest runs, newest first; without them the part is left out. */\n runs?: readonly Run[] | undefined;\n /** Switching it on and off, the host's call; without it there is no switch (a conversation's). */\n onSwitch?: ((on: boolean) => void) | undefined;\n /** The switch's change is on its way: it holds still. */\n switching?: boolean | undefined;\n /** The host's controls after the switch (taking a contact's task away). */\n actions?: ReactNode | undefined;\n /** Opening a run's record; without it the runs only read. */\n onOpenRun?: ((run: Run) => void) | undefined;\n /** The run open beside it, marked in the list. */\n openRun?: string | null | undefined;\n /** The host's logos for apps; without them an app shows the logo the API gives. */\n apps?: AppDirectory | undefined;\n /** What time it is, for the words that say when; now by default. */\n now?: Date | undefined;\n className?: string | undefined;\n}\n\n/** How the state reads on its pill: running well, paused, or its last run failed. */\nconst STATE_TONES: Readonly<Record<AutomationState, \"success\" | \"danger\" | undefined>> = {\n active: \"success\",\n paused: undefined,\n failing: \"danger\",\n};\n\n/** The values of its table shown as figures; the rest are counted after them. */\nconst SHOWN_COUNTS = 4;\n\n/**\n * One automation, as its owner reads it: a head with what starts it (a clock, a webhook, the\n * app whose event it waits for) as a 40px mark, its title, when it runs in words with its next\n * run, and how it stands (with the host's switch, when it gives one); the owner's own sentence of\n * what it does, set apart; its steps, numbered, each with what it uses; the table it moves, as a\n * figure per value; and its runs, each with what started it and when, its line, how it ended.\n * It only draws: switching it and opening a run are the host's (`onSwitch`, `onOpenRun`).\n */\nexport function Automation({\n automation,\n runs,\n onSwitch,\n switching,\n actions,\n onOpenRun,\n openRun,\n apps,\n now = new Date(),\n className,\n}: AutomationProps) {\n const part = useParts();\n const { messages, code } = useKit();\n const words = messages.automation;\n const title = useId();\n return (\n <section aria-labelledby={title} className={joined(part(\"sc-automation\"), className)}>\n <header className={part(\"sc-automation__head\")}>\n <TriggerMark trigger={automation.trigger} size={40} apps={apps} />\n <div className={part(\"sc-automation__heading\")}>\n <h3 id={title} className={part(\"sc-automation__title\")}>\n {automation.title}\n </h3>\n <p className={part(\"sc-automation__when\")}>{lineOf(automation, now, words, code)}</p>\n </div>\n <div className={part(\"sc-automation__end\")}>\n <Tag tone={STATE_TONES[automation.state]}>\n <i aria-hidden className={part(\"sc-automation__dot\")} />\n {words.states[automation.state]}\n </Tag>\n {onSwitch !== undefined && (\n <Switch\n checked={automation.on}\n onChange={onSwitch}\n label={words.switchLabel}\n disabled={switching}\n />\n )}\n {actions}\n </div>\n </header>\n {automation.summary !== \"\" && (\n <p className={part(\"sc-automation__summary\")}>{automation.summary}</p>\n )}\n {automation.steps.length > 0 && <Steps steps={automation.steps} words={words} apps={apps} />}\n {automation.board !== null && automation.board.counts.length > 0 && (\n <BoardView board={automation.board} words={words} />\n )}\n {runs !== undefined && (\n <Runs\n runs={runs}\n trigger={automation.trigger}\n words={words}\n apps={apps}\n now={now}\n code={code}\n onOpenRun={onOpenRun}\n openRun={openRun ?? null}\n />\n )}\n </section>\n );\n}\n\n/** A part of it under its small label. */\nfunction Part({ label, children }: { label: ReactNode; children: ReactNode }) {\n const part = useParts();\n const id = useId();\n return (\n <section aria-labelledby={id} className={part(\"sc-automation__section\")}>\n <h4 id={id} className={part(\"sc-automation__label\")}>\n {label}\n </h4>\n {children}\n </section>\n );\n}\n\n/** Its steps in the code's order: a number, the step's name, and what it uses at the right. */\nfunction Steps({\n steps,\n words,\n apps,\n}: {\n steps: readonly Step[];\n words: AutomationMessages;\n apps: AppDirectory | undefined;\n}) {\n const part = useParts();\n return (\n <Part label={words.steps}>\n <ol className={part(\"sc-automation__steps\")}>\n {steps.map((step, index) => (\n <li key={`${index}:${step.name}`} className={part(\"sc-automation__step\")}>\n <span aria-hidden className={part(\"sc-automation__number\")}>\n {index + 1}\n </span>\n <span className={part(\"sc-automation__name\")}>{step.name}</span>\n {step.uses.length > 0 && (\n <span className={part(\"sc-automation__uses\")}>\n {step.uses.map((use, at) => {\n const key = `${at}:${use.kind}:${use.app ?? \"\"}`;\n if (use.kind !== \"app\") {\n const Glyph = USES[use.kind];\n return (\n <span key={key} className={part(\"sc-automation__use\")}>\n <Glyph aria-hidden weight=\"regular\" />\n {words.uses[use.kind]}\n </span>\n );\n }\n const name = use.title ?? use.app ?? \"\";\n return (\n <span key={key} className={part(\"sc-automation__use\")}>\n <AppMark name={name} icon={use.icon} size={18} apps={apps} />\n {name}\n </span>\n );\n })}\n </span>\n )}\n </li>\n ))}\n </ol>\n </Part>\n );\n}\n\nconst capital = (text: string): string => text.charAt(0).toUpperCase() + text.slice(1);\n\n/** The table it moves: its title, then a figure per value (the biggest few, and how many more). */\nfunction BoardView({ board, words }: { board: Board; words: AutomationMessages }) {\n const part = useParts();\n const shown = board.counts.slice(0, SHOWN_COUNTS);\n const more = board.counts.length - shown.length;\n return (\n <Part\n label={\n <>\n <TableIcon aria-hidden />\n {board.title}\n </>\n }\n >\n <div className={part(\"sc-automation__board\")}>\n <Stats label={board.title}>\n {shown.map((count) => (\n <Stat key={count.value} label={capital(count.value)} value={count.count} />\n ))}\n </Stats>\n {more > 0 && <span className={part(\"sc-automation__more\")}>{words.more(more)}</span>}\n </div>\n </Part>\n );\n}\n\n/**\n * Its runs, newest first: what started each (its mark, when, by what), its line, why it failed\n * in the danger tone, and at the right a check once it went well; a test's line says what it\n * would have done.\n */\nfunction Runs({\n runs,\n trigger,\n words,\n apps,\n now,\n code,\n onOpenRun,\n openRun,\n}: {\n runs: readonly Run[];\n trigger: Trigger;\n words: AutomationMessages;\n apps: AppDirectory | undefined;\n now: Date;\n code: string;\n onOpenRun: ((run: Run) => void) | undefined;\n openRun: string | null;\n}) {\n const part = useParts();\n const app = trigger.app_title ?? trigger.app;\n return (\n <Part label={words.runs}>\n {runs.length === 0 ? (\n <p className={part(\"sc-automation__empty\")}>{words.noRuns}</p>\n ) : (\n <div className={part(\"sc-automation__runs\")}>\n <List>\n {runs.map((run) => (\n <Row\n key={run.id}\n className={run.id === openRun ? part(\"sc-automation__run--open\") : undefined}\n mark={\n <span\n role=\"img\"\n aria-label={words.by(run.by, app)}\n title={words.by(run.by, app)}\n className={part(\"sc-run__by\")}\n >\n <ByMark by={run.by} trigger={trigger} size={28} apps={apps} />\n </span>\n }\n title={momentOf(new Date(run.started_at), now, words, code)}\n subtitle={\n run.summary === null ? undefined : run.dry ? words.dry(run.summary) : run.summary\n }\n error={\n run.status === \"failed\" && run.error !== null ? (\n <span>\n <WarningCircleIcon aria-hidden weight=\"fill\" />\n {run.error}\n </span>\n ) : undefined\n }\n meta={<RunStatus run={run} words={words} />}\n onPress={onOpenRun && (() => onOpenRun(run))}\n />\n ))}\n </List>\n </div>\n )}\n </Part>\n );\n}\n\n/**\n * How a run stands, at its row's right: a check once done; the words while it goes, waits or was\n * skipped; nothing once it failed (its error says so, under it).\n */\nfunction RunStatus({ run, words }: { run: Run; words: AutomationMessages }) {\n const part = useParts();\n switch (run.status) {\n case \"done\":\n return (\n <span role=\"img\" aria-label={words.statuses.done} className={part(\"sc-automation__status\")}>\n <CheckIcon aria-hidden weight=\"bold\" />\n </span>\n );\n case \"failed\":\n return null;\n case \"running\":\n return (\n <Tag tone=\"info\">\n <i aria-hidden className={part(\"sc-run__live\")} />\n {words.statuses.running}\n </Tag>\n );\n case \"waiting\":\n return <Tag tone=\"warning\">{words.statuses.waiting}</Tag>;\n case \"skipped\":\n return <Tag>{words.statuses.skipped}</Tag>;\n }\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Automation, RunRecord } from "./types.js";
|
|
2
|
+
import { AppDirectory } from "../AgentAbout.js";
|
|
3
|
+
//#region src/automation/RunView.d.ts
|
|
4
|
+
export interface RunViewProps {
|
|
5
|
+
run: RunRecord;
|
|
6
|
+
/** The automation it is a run of: its steps' order, its apps' names and logos, its table. */
|
|
7
|
+
automation?: Automation | null | undefined;
|
|
8
|
+
/** Opening a conversation the run opened, or the one it was asked in; without it, none opens. */
|
|
9
|
+
onOpenConversation?: ((id: string) => void) | undefined;
|
|
10
|
+
/** The host's logos for apps; without them an app shows the logo the API gives. */
|
|
11
|
+
apps?: AppDirectory | undefined;
|
|
12
|
+
/** What time it is, for the words that say when; now by default. */
|
|
13
|
+
now?: Date | undefined;
|
|
14
|
+
className?: string | undefined;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* One run, as its owner reads it: a head with what started it, when, how long it took and how it
|
|
18
|
+
* stands; the line it returned (a test's, as what it would have done); why it failed, in words;
|
|
19
|
+
* then what it did, step by step in the code's order, each call in words ("Buscó en Gmail",
|
|
20
|
+
* "Añadió una fila a Citas"; a test's writes as "Habría…"), the same call in a row once with how
|
|
21
|
+
* many; and the conversations it opened, each opening through the host.
|
|
22
|
+
*/
|
|
23
|
+
export declare function RunView({ run, automation, onOpenConversation, apps, now, className }: RunViewProps): import("react").JSX.Element;
|
|
24
|
+
//#endregion
|
|
25
|
+
//# sourceMappingURL=RunView.d.ts.map
|