@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
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from "react";
|
|
2
|
-
import { safeUrl } from "../safeUrl.js";
|
|
3
|
-
import { useSignalcore } from "../SignalcoreProvider.js";
|
|
4
|
-
const POLL_MS = 2_000;
|
|
5
|
-
const UNKNOWN = { session: undefined, ended: false, screenshot: undefined };
|
|
6
|
-
/**
|
|
7
|
-
* Follows a hosted browser: asks the API where it is every couple of seconds, and takes its
|
|
8
|
-
* screenshot while there is no live view to watch (a live URL, or `streamed`: a live stream shows
|
|
9
|
-
* the page). Without a client there is nothing to ask, and the view shows what the surface itself
|
|
10
|
-
* said. Polling stops when the API says it is gone.
|
|
11
|
-
*/
|
|
12
|
-
export function useBrowserSession(sessionId, knownLiveUrl, streamed = false) {
|
|
13
|
-
const browser = useSignalcore().client?.browser;
|
|
14
|
-
const [look, setLook] = useState(UNKNOWN);
|
|
15
|
-
useEffect(() => {
|
|
16
|
-
if (!browser)
|
|
17
|
-
return undefined;
|
|
18
|
-
let stopped = false;
|
|
19
|
-
const isStopped = () => stopped;
|
|
20
|
-
let timer;
|
|
21
|
-
let screenshot;
|
|
22
|
-
const forget = () => {
|
|
23
|
-
if (screenshot)
|
|
24
|
-
URL.revokeObjectURL(screenshot);
|
|
25
|
-
screenshot = undefined;
|
|
26
|
-
};
|
|
27
|
-
const follow = async () => {
|
|
28
|
-
try {
|
|
29
|
-
const session = await browser.get(sessionId);
|
|
30
|
-
if (isStopped())
|
|
31
|
-
return;
|
|
32
|
-
if (streamed || safeUrl(session.live_url ?? knownLiveUrl))
|
|
33
|
-
forget();
|
|
34
|
-
else
|
|
35
|
-
screenshot = await latest(browser, sessionId, screenshot);
|
|
36
|
-
if (isStopped())
|
|
37
|
-
return;
|
|
38
|
-
setLook({ session, ended: false, screenshot });
|
|
39
|
-
timer = setTimeout(() => void follow(), POLL_MS);
|
|
40
|
-
}
|
|
41
|
-
catch {
|
|
42
|
-
if (!isStopped())
|
|
43
|
-
setLook((old) => ({ ...old, ended: true }));
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
void follow();
|
|
47
|
-
return () => {
|
|
48
|
-
stopped = true;
|
|
49
|
-
clearTimeout(timer);
|
|
50
|
-
forget();
|
|
51
|
-
};
|
|
52
|
-
}, [browser, sessionId, knownLiveUrl, streamed]);
|
|
53
|
-
return look;
|
|
54
|
-
}
|
|
55
|
-
/** A new screenshot as an object URL, the old one released; the old one stays if this fails. */
|
|
56
|
-
async function latest(browser, sessionId, old) {
|
|
57
|
-
try {
|
|
58
|
-
const bytes = (await browser.screenshot(sessionId)).slice(); // a copy over a plain ArrayBuffer, which Blob takes
|
|
59
|
-
const picture = URL.createObjectURL(new Blob([bytes], { type: "image/png" }));
|
|
60
|
-
if (old)
|
|
61
|
-
URL.revokeObjectURL(old);
|
|
62
|
-
return picture;
|
|
63
|
-
}
|
|
64
|
-
catch {
|
|
65
|
-
return old;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
2
|
-
import type { AppDirectory } from "../request/types.js";
|
|
3
|
-
import { type BlockRenderers } from "./BuilderTranscript.js";
|
|
4
|
-
export interface BuilderChatProps {
|
|
5
|
-
/** The agent the owner is shaping. */
|
|
6
|
-
agentId: string;
|
|
7
|
-
/** The conversation to show; none starts a new one with the first message. */
|
|
8
|
-
sessionId?: string | null | undefined;
|
|
9
|
-
/** A conversation started here got its id: keep it to show the same one next time. */
|
|
10
|
-
onSession?: ((sessionId: string) => void) | undefined;
|
|
11
|
-
/** The model a conversation started here runs on; none is the deployment's default. */
|
|
12
|
-
model?: string | null | undefined;
|
|
13
|
-
/** How the host's apps look and are called, for the cards about one. */
|
|
14
|
-
apps?: AppDirectory | undefined;
|
|
15
|
-
/** How to draw the blocks that are only content, the host's way. */
|
|
16
|
-
renderers?: Partial<BlockRenderers> | undefined;
|
|
17
|
-
/** What to show before anything is said; a short invitation by default. */
|
|
18
|
-
empty?: ReactNode;
|
|
19
|
-
autoFocus?: boolean | undefined;
|
|
20
|
-
className?: string | undefined;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* The chat of the owner who shapes the agent (ADR 0009): their messages, what the builder says
|
|
24
|
-
* and does as it works, the surfaces it shows, and the cards it asks them to answer, in place.
|
|
25
|
-
* A turn streams as it happens and can be stopped; reopening a conversation replays it exactly
|
|
26
|
-
* as it was, with the cards still waiting for an answer.
|
|
27
|
-
*
|
|
28
|
-
* It reaches the builder through the provider's client (`build.sessions`, `requests`). Hosts
|
|
29
|
-
* that draw the conversation their own way build it from `useBuildSession`, `BuilderTranscript`,
|
|
30
|
-
* `StatusLine` and `Composer`, which this is made of.
|
|
31
|
-
*/
|
|
32
|
-
export declare function BuilderChat(props: BuilderChatProps): import("react").JSX.Element;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Composer } from "../chat/Composer.js";
|
|
3
|
-
import { useStickToBottom } from "../chat/useStickToBottom.js";
|
|
4
|
-
import { ErrorText } from "../parts/Input.js";
|
|
5
|
-
import { Spinner } from "../parts/Spinner.js";
|
|
6
|
-
import { Scoped, useMessages, useParts } from "../SignalcoreProvider.js";
|
|
7
|
-
import { BuilderTranscript } from "./BuilderTranscript.js";
|
|
8
|
-
import { StatusLine } from "./StatusLine.js";
|
|
9
|
-
import { formatDuration } from "./time.js";
|
|
10
|
-
import { useBuildSession } from "./useBuildSession.js";
|
|
11
|
-
/**
|
|
12
|
-
* The chat of the owner who shapes the agent (ADR 0009): their messages, what the builder says
|
|
13
|
-
* and does as it works, the surfaces it shows, and the cards it asks them to answer, in place.
|
|
14
|
-
* A turn streams as it happens and can be stopped; reopening a conversation replays it exactly
|
|
15
|
-
* as it was, with the cards still waiting for an answer.
|
|
16
|
-
*
|
|
17
|
-
* It reaches the builder through the provider's client (`build.sessions`, `requests`). Hosts
|
|
18
|
-
* that draw the conversation their own way build it from `useBuildSession`, `BuilderTranscript`,
|
|
19
|
-
* `StatusLine` and `Composer`, which this is made of.
|
|
20
|
-
*/
|
|
21
|
-
export function BuilderChat(props) {
|
|
22
|
-
return (_jsx(Scoped, { children: _jsx(Conversation, { ...props }) }));
|
|
23
|
-
}
|
|
24
|
-
function Conversation({ agentId, sessionId, onSession, model, apps, renderers, empty, autoFocus, className, }) {
|
|
25
|
-
const part = useParts();
|
|
26
|
-
const messages = useMessages();
|
|
27
|
-
const session = useBuildSession({ agentId, sessionId, onSession, model });
|
|
28
|
-
const { scroller, content } = useStickToBottom();
|
|
29
|
-
const { transcript, loading, error } = session;
|
|
30
|
-
const nothingYet = !loading && transcript.blocks.length === 0;
|
|
31
|
-
const { lastTurn } = transcript;
|
|
32
|
-
return (_jsxs("section", { ...part("chat", [], className), "aria-label": messages.builderChat, children: [_jsx("div", { ref: scroller, ...part("chat__scroll"), children: _jsxs("div", { ref: content, ...part("chat__content"), children: [loading && (_jsxs("p", { ...part("chat__note"), children: [_jsx(Spinner, {}), " ", messages.loadingConversation] })), nothingYet && (empty ?? _jsx(Invitation, {})), _jsx(BuilderTranscript, { blocks: transcript.blocks, live: transcript.live, agentId: agentId, onAnswered: (message) => void session.send(message), apps: apps, renderers: renderers }), !transcript.live && lastTurn && (_jsx("p", { ...part("chat__note"), title: lastTurn.costUsd === null
|
|
33
|
-
? undefined
|
|
34
|
-
: messages.turnCost(lastTurn.costUsd.toFixed(3)), children: messages.turnDone(lastTurn.ok, formatDuration(lastTurn.durationMs)) })), error && _jsx(ErrorText, { children: messages.cannotLoadConversation })] }) }), _jsx(StatusLine, { transcript: transcript }), _jsx(Composer, { onSend: (text) => void session.send(text), onStop: session.stop, live: transcript.live, disabled: loading, autoFocus: autoFocus, placeholder: nothingYet ? messages.describeYourAgent : messages.replyOrAskForChange })] }));
|
|
35
|
-
}
|
|
36
|
-
/** What the owner sees in a conversation that has not begun. */
|
|
37
|
-
function Invitation() {
|
|
38
|
-
const part = useParts();
|
|
39
|
-
const messages = useMessages();
|
|
40
|
-
return (_jsxs("div", { ...part("chat__note", ["invitation"]), children: [_jsx("p", { children: _jsx("strong", { children: messages.builderEmptyTitle }) }), _jsx("p", { children: messages.builderEmptyBody })] }));
|
|
41
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import type { ComponentType, ReactNode } from "react";
|
|
2
|
-
import type { AppDirectory } from "../request/types.js";
|
|
3
|
-
import type { Block } from "../stream/builder.js";
|
|
4
|
-
import { type StepBlock } from "./items.js";
|
|
5
|
-
type Of<Kind extends Block["kind"]> = Extract<Block, {
|
|
6
|
-
kind: Kind;
|
|
7
|
-
}>;
|
|
8
|
-
/**
|
|
9
|
-
* How a host draws the blocks that are only content, its own way (Markdown for the builder's
|
|
10
|
-
* words, a card that activates a change). The cards and the surfaces are not here: those the
|
|
11
|
-
* platform draws, so the owner's decisions look and behave the same everywhere.
|
|
12
|
-
*/
|
|
13
|
-
export interface BlockRenderers {
|
|
14
|
-
owner: (block: Of<"owner">) => ReactNode;
|
|
15
|
-
text: (block: Of<"text">) => ReactNode;
|
|
16
|
-
steps: (steps: StepBlock[]) => ReactNode;
|
|
17
|
-
published: (block: Of<"published">) => ReactNode;
|
|
18
|
-
changes: (block: Of<"changes">) => ReactNode;
|
|
19
|
-
error: (block: Of<"error">) => ReactNode;
|
|
20
|
-
}
|
|
21
|
-
export interface BuilderTranscriptProps {
|
|
22
|
-
blocks: Block[];
|
|
23
|
-
/** A turn is streaming: nothing can be answered until it ends. */
|
|
24
|
-
live: boolean;
|
|
25
|
-
/** The agent being shaped; it is the one a card belongs to when the card does not say. */
|
|
26
|
-
agentId?: string | undefined;
|
|
27
|
-
/**
|
|
28
|
-
* The owner answered a card or picked on a surface. The card has already sent the answer to
|
|
29
|
-
* the API; this tells the builder in the owner's words, as their next message.
|
|
30
|
-
*/
|
|
31
|
-
onAnswered: (message: string) => void;
|
|
32
|
-
/** How the host's apps look and are called, for the cards about one. */
|
|
33
|
-
apps?: AppDirectory | undefined;
|
|
34
|
-
renderers?: Partial<BlockRenderers> | undefined;
|
|
35
|
-
/** Wraps each block as it appears, for a host that animates entrances. */
|
|
36
|
-
Item?: ComponentType<{
|
|
37
|
-
children: ReactNode;
|
|
38
|
-
}> | undefined;
|
|
39
|
-
className?: string | undefined;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* The conversation with the builder as the owner reads it: their messages, the builder's words,
|
|
43
|
-
* what it did as one list of steps, the surfaces it showed, the cards it asked them to answer
|
|
44
|
-
* and what changed. Only the latest surface takes a pick, and only between turns; older ones
|
|
45
|
-
* are a record. The browser the owner should be watching (the last one shown, while something
|
|
46
|
-
* happens in it) is the one that is told it is in play.
|
|
47
|
-
*/
|
|
48
|
-
export declare function BuilderTranscript(props: BuilderTranscriptProps): import("react").JSX.Element;
|
|
49
|
-
export {};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { RequestCard } from "../request/RequestCard.js";
|
|
3
|
-
import { Scoped, useParts } from "../SignalcoreProvider.js";
|
|
4
|
-
import { Surface } from "../surface/Surface.js";
|
|
5
|
-
import { answerMessage } from "./answer.js";
|
|
6
|
-
import { Changes, Failure, OwnerMessage, Published, Reply, Steps } from "./blocks.js";
|
|
7
|
-
import { itemsOf, showsBrowser } from "./items.js";
|
|
8
|
-
const DEFAULT_RENDERERS = {
|
|
9
|
-
owner: (block) => _jsx(OwnerMessage, { block: block }),
|
|
10
|
-
text: (block) => _jsx(Reply, { block: block }),
|
|
11
|
-
steps: (steps) => _jsx(Steps, { steps: steps }),
|
|
12
|
-
published: (block) => _jsx(Published, { block: block }),
|
|
13
|
-
changes: (block) => _jsx(Changes, { block: block }),
|
|
14
|
-
error: (block) => _jsx(Failure, { block: block }),
|
|
15
|
-
};
|
|
16
|
-
const EVERY_ITEM = ({ children }) => children;
|
|
17
|
-
/**
|
|
18
|
-
* The conversation with the builder as the owner reads it: their messages, the builder's words,
|
|
19
|
-
* what it did as one list of steps, the surfaces it showed, the cards it asked them to answer
|
|
20
|
-
* and what changed. Only the latest surface takes a pick, and only between turns; older ones
|
|
21
|
-
* are a record. The browser the owner should be watching (the last one shown, while something
|
|
22
|
-
* happens in it) is the one that is told it is in play.
|
|
23
|
-
*/
|
|
24
|
-
export function BuilderTranscript(props) {
|
|
25
|
-
return (_jsx(Scoped, { children: _jsx(Transcript, { ...props }) }));
|
|
26
|
-
}
|
|
27
|
-
function Transcript({ blocks, live, agentId, onAnswered, apps, renderers, Item = EVERY_ITEM, className, }) {
|
|
28
|
-
const part = useParts();
|
|
29
|
-
const draw = { ...DEFAULT_RENDERERS, ...renderers };
|
|
30
|
-
const items = itemsOf(blocks);
|
|
31
|
-
const latestSurface = items.findLast((item) => item.kind === "surface")?.id;
|
|
32
|
-
const inView = items.findLast(showsBrowser)?.id;
|
|
33
|
-
const render = (item) => {
|
|
34
|
-
switch (item.kind) {
|
|
35
|
-
case "owner":
|
|
36
|
-
return draw.owner(item);
|
|
37
|
-
case "text":
|
|
38
|
-
return draw.text(item);
|
|
39
|
-
case "steps":
|
|
40
|
-
return draw.steps(item.steps);
|
|
41
|
-
case "published":
|
|
42
|
-
return draw.published(item);
|
|
43
|
-
case "changes":
|
|
44
|
-
return draw.changes(item);
|
|
45
|
-
case "error":
|
|
46
|
-
return draw.error(item);
|
|
47
|
-
case "card": {
|
|
48
|
-
const card = item.card.agent_id || !agentId ? item.card : { ...item.card, agent_id: agentId };
|
|
49
|
-
return (_jsx(RequestCard, { card: card, busy: live, inView: item.id === inView, apps: apps, onResolve: (resolution) => {
|
|
50
|
-
onAnswered(answerMessage(item.card.title, resolution));
|
|
51
|
-
} }));
|
|
52
|
-
}
|
|
53
|
-
case "surface":
|
|
54
|
-
return (_jsx(Surface, { surface: item.surface, active: item.id === inView && live, onAction: item.id === latestSurface && !live
|
|
55
|
-
? (action) => {
|
|
56
|
-
onAnswered(action.label);
|
|
57
|
-
}
|
|
58
|
-
: undefined }));
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
return (_jsx("div", { ...part("transcript", [], className), children: items.map((item) => (_jsx(Item, { children: render(item) }, item.id))) }));
|
|
62
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Transcript } from "../stream/builder.js";
|
|
2
|
-
/**
|
|
3
|
-
* What the builder is doing right now, in one quiet line: "Editar app.py… 12 s". Empty between
|
|
4
|
-
* turns (and a live region, so it is there to be announced when the next one begins).
|
|
5
|
-
*/
|
|
6
|
-
export declare function StatusLine({ transcript }: {
|
|
7
|
-
transcript: Transcript;
|
|
8
|
-
}): import("react").JSX.Element;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Scoped, useMessages, useParts } from "../SignalcoreProvider.js";
|
|
3
|
-
import { useElapsed } from "./time.js";
|
|
4
|
-
import { workingOn } from "./workingOn.js";
|
|
5
|
-
/**
|
|
6
|
-
* What the builder is doing right now, in one quiet line: "Editar app.py… 12 s". Empty between
|
|
7
|
-
* turns (and a live region, so it is there to be announced when the next one begins).
|
|
8
|
-
*/
|
|
9
|
-
export function StatusLine({ transcript }) {
|
|
10
|
-
return (_jsx(Scoped, { children: _jsx(Line, { transcript: transcript }) }));
|
|
11
|
-
}
|
|
12
|
-
function Line({ transcript }) {
|
|
13
|
-
const part = useParts();
|
|
14
|
-
const messages = useMessages();
|
|
15
|
-
const elapsed = useElapsed(transcript.turnStartedAt);
|
|
16
|
-
return (_jsx("div", { role: "status", ...part("status-line"), children: transcript.live && (_jsxs(_Fragment, { children: [_jsx("span", { "aria-hidden": true, ...part("status-line__dot") }), _jsxs("span", { children: [workingOn(transcript, messages), "\u2026"] }), " ", _jsxs("span", { children: [elapsed, " s"] }), " ", _jsxs("span", { ...part("status-line__hint"), children: [_jsx("kbd", { children: "Esc" }), " ", messages.escToStop] })] })) }));
|
|
17
|
-
}
|
package/dist/builder/answer.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Resolution } from "../request/types.js";
|
|
2
|
-
/**
|
|
3
|
-
* What the builder hears when the owner answers one of its cards, in the owner's words:
|
|
4
|
-
* "¿Envío? → Aprobado", or "¿Envío? — Rechazado" when it was turned down. The conversation goes
|
|
5
|
-
* on from there as the owner's next message.
|
|
6
|
-
*/
|
|
7
|
-
export declare function answerMessage(title: string, { reject, label }: Resolution): string;
|
package/dist/builder/answer.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* What the builder hears when the owner answers one of its cards, in the owner's words:
|
|
3
|
-
* "¿Envío? → Aprobado", or "¿Envío? — Rechazado" when it was turned down. The conversation goes
|
|
4
|
-
* on from there as the owner's next message.
|
|
5
|
-
*/
|
|
6
|
-
export function answerMessage(title, { reject, label }) {
|
|
7
|
-
return reject ? `${title} — ${label}` : `${title} → ${label}`;
|
|
8
|
-
}
|
package/dist/builder/blocks.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { Block } from "../stream/builder.js";
|
|
2
|
-
import type { StepBlock } from "./items.js";
|
|
3
|
-
/** The blocks of the conversation that are plain content, in the package's own look. */
|
|
4
|
-
type Of<Kind extends Block["kind"]> = Extract<Block, {
|
|
5
|
-
kind: Kind;
|
|
6
|
-
}>;
|
|
7
|
-
/** The owner's own message, on their side. */
|
|
8
|
-
export declare const OwnerMessage: import("react").MemoExoticComponent<({ block }: {
|
|
9
|
-
block: Of<"owner">;
|
|
10
|
-
}) => import("react").JSX.Element>;
|
|
11
|
-
/** What the builder says, with a cursor while it is still writing. */
|
|
12
|
-
export declare const Reply: import("react").MemoExoticComponent<({ block }: {
|
|
13
|
-
block: Of<"text">;
|
|
14
|
-
}) => import("react").JSX.Element>;
|
|
15
|
-
/** The things the builder did one after another: a mark for how each went, and what it acted on. */
|
|
16
|
-
export declare function Steps({ steps }: {
|
|
17
|
-
steps: StepBlock[];
|
|
18
|
-
}): import("react").JSX.Element;
|
|
19
|
-
/** "Publicado · versión 3 — Resumen de citas". */
|
|
20
|
-
export declare function Published({ block }: {
|
|
21
|
-
block: Of<"published">;
|
|
22
|
-
}): import("react").JSX.Element;
|
|
23
|
-
/** How a turn ends: what it built or changed, and what it learned, in one glance. */
|
|
24
|
-
export declare const Changes: import("react").MemoExoticComponent<({ block }: {
|
|
25
|
-
block: Of<"changes">;
|
|
26
|
-
}) => import("react").JSX.Element>;
|
|
27
|
-
/** Something went wrong in the turn. */
|
|
28
|
-
export declare function Failure({ block }: {
|
|
29
|
-
block: Of<"error">;
|
|
30
|
-
}): import("react").JSX.Element;
|
|
31
|
-
export {};
|
package/dist/builder/blocks.js
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { memo, useState } from "react";
|
|
3
|
-
import { Icon } from "../parts/Icon.js";
|
|
4
|
-
import { ErrorText } from "../parts/Input.js";
|
|
5
|
-
import { Spinner } from "../parts/Spinner.js";
|
|
6
|
-
import { useMessages, useParts } from "../SignalcoreProvider.js";
|
|
7
|
-
import { describeStep } from "./steps.js";
|
|
8
|
-
/** The owner's own message, on their side. */
|
|
9
|
-
export const OwnerMessage = memo(function OwnerMessage({ block }) {
|
|
10
|
-
const part = useParts();
|
|
11
|
-
return (_jsx("div", { ...part("message", ["person"]), children: _jsx("p", { ...part("message__text"), children: block.text }) }));
|
|
12
|
-
});
|
|
13
|
-
/** What the builder says, with a cursor while it is still writing. */
|
|
14
|
-
export const Reply = memo(function Reply({ block }) {
|
|
15
|
-
const part = useParts();
|
|
16
|
-
return (_jsxs("p", { ...part("reply"), children: [block.text, block.open && _jsx("span", { "aria-hidden": true, ...part("reply__cursor") })] }));
|
|
17
|
-
});
|
|
18
|
-
/** The things the builder did one after another: a mark for how each went, and what it acted on. */
|
|
19
|
-
export function Steps({ steps }) {
|
|
20
|
-
const part = useParts();
|
|
21
|
-
return (_jsx("ol", { ...part("activity"), children: steps.map((step) => (_jsx(StepRow, { step: step }, step.id))) }));
|
|
22
|
-
}
|
|
23
|
-
const StepRow = memo(function StepRow({ step }) {
|
|
24
|
-
const part = useParts();
|
|
25
|
-
const messages = useMessages();
|
|
26
|
-
const [expanded, setExpanded] = useState(false);
|
|
27
|
-
const label = describeStep(step.name, step.input, messages);
|
|
28
|
-
const detail = step.summary ?? "";
|
|
29
|
-
const head = (_jsxs(_Fragment, { children: [_jsx("span", { ...part("activity__mark", [step.status]), children: _jsx(Mark, { status: step.status }) }), _jsx("span", { ...part("activity__verb"), children: label.verb }), label.target && (_jsx("span", { ...part("activity__target", [
|
|
30
|
-
label.code && "code",
|
|
31
|
-
step.status === "stopped" && "struck",
|
|
32
|
-
]), children: label.target })), step.status === "error" && (_jsx("span", { ...part("activity__note", ["danger"]), children: messages.stepFailed })), step.status === "stopped" && _jsx("span", { ...part("activity__note"), children: messages.stepStopped })] }));
|
|
33
|
-
return (_jsxs("li", { ...part("activity__step", [step.status]), children: [detail ? (_jsx("button", { type: "button", "aria-expanded": expanded, title: messages.stepDetail, ...part("activity__toggle"), onClick: () => {
|
|
34
|
-
setExpanded((now) => !now);
|
|
35
|
-
}, children: head })) : (_jsx("div", { ...part("activity__toggle", ["static"]), children: head })), expanded && detail && _jsx("pre", { ...part("activity__summary"), children: detail })] }));
|
|
36
|
-
});
|
|
37
|
-
/** How a step stands: working, done, failed or stopped. */
|
|
38
|
-
function Mark({ status }) {
|
|
39
|
-
if (status === "running")
|
|
40
|
-
return _jsx(Spinner, {});
|
|
41
|
-
if (status === "ok")
|
|
42
|
-
return _jsx(Icon, { name: "check" });
|
|
43
|
-
if (status === "error")
|
|
44
|
-
return _jsx(Icon, { name: "x" });
|
|
45
|
-
return null;
|
|
46
|
-
}
|
|
47
|
-
/** "Publicado · versión 3 — Resumen de citas". */
|
|
48
|
-
export function Published({ block }) {
|
|
49
|
-
const part = useParts();
|
|
50
|
-
const messages = useMessages();
|
|
51
|
-
return (_jsxs("p", { ...part("note", ["ok"]), children: [_jsx(Icon, { name: "check" }), _jsxs("span", { children: [_jsx("strong", { children: messages.published(block.version) }), block.summary && ` — ${block.summary}`] })] }));
|
|
52
|
-
}
|
|
53
|
-
const SHOWN_LEARNED = 3;
|
|
54
|
-
function verbOf(item, messages) {
|
|
55
|
-
if (item.change === "added") {
|
|
56
|
-
return item.what === "skill" ? messages.newSkill : messages.newAutomation;
|
|
57
|
-
}
|
|
58
|
-
return item.change === "changed" ? messages.changedPart : messages.removedPart;
|
|
59
|
-
}
|
|
60
|
-
/** How a turn ends: what it built or changed, and what it learned, in one glance. */
|
|
61
|
-
export const Changes = memo(function Changes({ block }) {
|
|
62
|
-
const part = useParts();
|
|
63
|
-
const messages = useMessages();
|
|
64
|
-
const [all, setAll] = useState(false);
|
|
65
|
-
const facts = all ? block.learned : block.learned.slice(0, SHOWN_LEARNED);
|
|
66
|
-
const hidden = block.learned.length - SHOWN_LEARNED;
|
|
67
|
-
return (_jsxs("div", { ...part("changes"), children: [_jsx("p", { ...part("changes__title"), children: block.change?.description ?? messages.whatChanged }), _jsxs("ul", { ...part("changes__list"), children: [block.items.map((item) => (_jsxs("li", { ...part("changes__item", [item.change]), children: [_jsxs("span", { ...part("changes__label"), children: [verbOf(item, messages), ":"] }), " ", item.title] }, `${item.what}:${item.id}`))), facts.map((fact) => (_jsxs("li", { ...part("changes__item", ["learned"]), children: [_jsx("span", { ...part("changes__label"), children: messages.learned }), " ", fact] }, fact)))] }), hidden > 0 && !all && (_jsx("button", { type: "button", ...part("changes__more"), onClick: () => {
|
|
68
|
-
setAll(true);
|
|
69
|
-
}, children: messages.moreRows(hidden) }))] }));
|
|
70
|
-
});
|
|
71
|
-
/** Something went wrong in the turn. */
|
|
72
|
-
export function Failure({ block }) {
|
|
73
|
-
return _jsx(ErrorText, { children: block.message });
|
|
74
|
-
}
|
package/dist/builder/items.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Block } from "../stream/builder.js";
|
|
2
|
-
/** A step of the builder's turn: one thing it did. */
|
|
3
|
-
export type StepBlock = Extract<Block, {
|
|
4
|
-
kind: "step";
|
|
5
|
-
}>;
|
|
6
|
-
/** What the transcript draws: blocks, with the steps that follow one another as one list. */
|
|
7
|
-
export type Item = Exclude<Block, StepBlock> | {
|
|
8
|
-
kind: "steps";
|
|
9
|
-
id: string;
|
|
10
|
-
steps: StepBlock[];
|
|
11
|
-
};
|
|
12
|
-
/** Consecutive steps read as one list. */
|
|
13
|
-
export declare function itemsOf(blocks: readonly Block[]): Item[];
|
|
14
|
-
/** Something the owner should be looking at in a browser: its surface, or the hand-over card. */
|
|
15
|
-
export declare function showsBrowser(item: Item): boolean;
|
package/dist/builder/items.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/** Consecutive steps read as one list. */
|
|
2
|
-
export function itemsOf(blocks) {
|
|
3
|
-
const items = [];
|
|
4
|
-
for (const block of blocks) {
|
|
5
|
-
const last = items.at(-1);
|
|
6
|
-
if (block.kind !== "step")
|
|
7
|
-
items.push(block);
|
|
8
|
-
else if (last?.kind === "steps")
|
|
9
|
-
last.steps = [...last.steps, block];
|
|
10
|
-
else
|
|
11
|
-
items.push({ kind: "steps", id: `steps-${block.id}`, steps: [block] });
|
|
12
|
-
}
|
|
13
|
-
return items;
|
|
14
|
-
}
|
|
15
|
-
/** Something the owner should be looking at in a browser: its surface, or the hand-over card. */
|
|
16
|
-
export function showsBrowser(item) {
|
|
17
|
-
if (item.kind === "surface") {
|
|
18
|
-
return item.surface.components.some((component) => component.component === "Browser");
|
|
19
|
-
}
|
|
20
|
-
return item.kind === "card" && item.card.kind === "question" && "browser" in item.card.payload;
|
|
21
|
-
}
|
package/dist/builder/steps.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* How a builder step reads in the chat: a short verb and what it acted on.
|
|
3
|
-
* "Editar app.py", "Buscar apps “hubspot”", "Preguntarte: ¿Cuál es tu horario?".
|
|
4
|
-
*/
|
|
5
|
-
import type { Messages } from "../messages/index.js";
|
|
6
|
-
/** The kind of work a step is, for a host that draws a mark for each. */
|
|
7
|
-
export type StepIcon = "read" | "write" | "edit" | "search" | "web" | "check" | "run" | "publish" | "settings" | "ask" | "memory" | "app" | "tool";
|
|
8
|
-
export interface StepLabel {
|
|
9
|
-
verb: string;
|
|
10
|
-
target?: string;
|
|
11
|
-
icon: StepIcon;
|
|
12
|
-
/** The target is code-like (a path, a command) and reads best in monospace. */
|
|
13
|
-
code?: boolean;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* In the language of `messages`, which a component takes from `useMessages()`; Spanish without it.
|
|
17
|
-
*/
|
|
18
|
-
export declare function describeStep(name: string, input: Record<string, unknown>, messages?: Messages): StepLabel;
|
|
19
|
-
/** googlecalendar → Google Calendar, google_calendar → Google Calendar */
|
|
20
|
-
export declare function appName(slug: string | undefined): string | undefined;
|
package/dist/builder/steps.js
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* How a builder step reads in the chat: a short verb and what it acted on.
|
|
3
|
-
* "Editar app.py", "Buscar apps “hubspot”", "Preguntarte: ¿Cuál es tu horario?".
|
|
4
|
-
*/
|
|
5
|
-
import { es } from "../messages/es.js";
|
|
6
|
-
/**
|
|
7
|
-
* In the language of `messages`, which a component takes from `useMessages()`; Spanish without it.
|
|
8
|
-
*/
|
|
9
|
-
export function describeStep(name, input, messages = es) {
|
|
10
|
-
const { verbs } = messages;
|
|
11
|
-
const str = (key) => {
|
|
12
|
-
const value = input[key];
|
|
13
|
-
return typeof value === "string" && value.trim() ? value.trim() : undefined;
|
|
14
|
-
};
|
|
15
|
-
const file = str("file_path") ?? str("path");
|
|
16
|
-
const at = (label, target) => target === undefined ? label : { ...label, target };
|
|
17
|
-
switch (name) {
|
|
18
|
-
case "Read":
|
|
19
|
-
return at({ verb: verbs.read, icon: "read", code: true }, file && basename(file));
|
|
20
|
-
case "Write":
|
|
21
|
-
return at({ verb: verbs.write, icon: "write", code: true }, file && basename(file));
|
|
22
|
-
case "Edit":
|
|
23
|
-
case "MultiEdit":
|
|
24
|
-
return at({ verb: verbs.edit, icon: "edit", code: true }, file && basename(file));
|
|
25
|
-
case "Bash":
|
|
26
|
-
return at({ verb: verbs.run, icon: "run", code: true }, str("command"));
|
|
27
|
-
case "Glob":
|
|
28
|
-
return at({ verb: verbs.findFiles, icon: "search", code: true }, str("pattern"));
|
|
29
|
-
case "Grep":
|
|
30
|
-
return at({ verb: verbs.searchCode, icon: "search", code: true }, str("pattern"));
|
|
31
|
-
case "WebSearch":
|
|
32
|
-
return at({ verb: verbs.searchWeb, icon: "web" }, quote(str("query")));
|
|
33
|
-
case "WebFetch":
|
|
34
|
-
return at({ verb: verbs.read, icon: "web" }, host(str("url")));
|
|
35
|
-
case "get_files":
|
|
36
|
-
return { verb: verbs.readAgentCode, icon: "read" };
|
|
37
|
-
case "save_files":
|
|
38
|
-
return at({ verb: verbs.save, icon: "write", code: true }, savedFiles(input, messages));
|
|
39
|
-
case "check":
|
|
40
|
-
return { verb: verbs.checkAgent, icon: "check" };
|
|
41
|
-
case "browse":
|
|
42
|
-
return at({ verb: verbs.browse, icon: "web" }, quote(str("goal")));
|
|
43
|
-
case "configure":
|
|
44
|
-
return { verb: verbs.saveSettings, icon: "settings" };
|
|
45
|
-
case "ask_owner":
|
|
46
|
-
return at({ verb: verbs.askYou, icon: "ask" }, str("title"));
|
|
47
|
-
case "remember":
|
|
48
|
-
return at({ verb: verbs.remember, icon: "memory" }, str("content"));
|
|
49
|
-
case "list_connections":
|
|
50
|
-
return { verb: verbs.checkApps, icon: "app" };
|
|
51
|
-
case "search_apps":
|
|
52
|
-
return at({ verb: verbs.searchApps, icon: "search" }, quote(str("query")));
|
|
53
|
-
case "connect_app":
|
|
54
|
-
return at({ verb: verbs.connect, icon: "app" }, appName(str("app")));
|
|
55
|
-
case "app_actions":
|
|
56
|
-
return at({ verb: verbs.explore, icon: "app" }, appName(str("app")));
|
|
57
|
-
case "use_app":
|
|
58
|
-
return at({ verb: appName(str("app")) ?? verbs.useApp, icon: "app" }, humanize(str("action")));
|
|
59
|
-
case "give_agent_app":
|
|
60
|
-
return at({ verb: verbs.giveAccess, icon: "app" }, appName(str("app")));
|
|
61
|
-
default:
|
|
62
|
-
// A tool the owner has no word for: say what kind of work it is, not its name.
|
|
63
|
-
return { verb: verbs.workOnAgent, icon: "tool" };
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
const basename = (path) => path.split(/[\\/]/).at(-1) ?? path;
|
|
67
|
-
const quote = (text) => text && `“${text}”`;
|
|
68
|
-
/** "app.py, test_app.py" for a save; "3 archivos" when there are many. */
|
|
69
|
-
function savedFiles(input, messages) {
|
|
70
|
-
const files = input["files"];
|
|
71
|
-
const removed = input["removed"];
|
|
72
|
-
const paths = [
|
|
73
|
-
...(files && typeof files === "object" ? Object.keys(files) : []),
|
|
74
|
-
...(Array.isArray(removed) ? removed.filter((p) => typeof p === "string") : []),
|
|
75
|
-
];
|
|
76
|
-
if (paths.length === 0)
|
|
77
|
-
return undefined;
|
|
78
|
-
return paths.length > 2 ? messages.files(paths.length) : paths.map(basename).join(", ");
|
|
79
|
-
}
|
|
80
|
-
function host(url) {
|
|
81
|
-
if (!url)
|
|
82
|
-
return undefined;
|
|
83
|
-
try {
|
|
84
|
-
return new URL(url).host;
|
|
85
|
-
}
|
|
86
|
-
catch {
|
|
87
|
-
return url;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
// How brands write themselves (mirrors signalcore_domain.agents.describe).
|
|
91
|
-
const BRANDS = {
|
|
92
|
-
calcom: "Cal.com",
|
|
93
|
-
gmail: "Gmail",
|
|
94
|
-
googlecalendar: "Google Calendar",
|
|
95
|
-
googledrive: "Google Drive",
|
|
96
|
-
googlesheets: "Google Sheets",
|
|
97
|
-
hubspot: "HubSpot",
|
|
98
|
-
microsoftteams: "Microsoft Teams",
|
|
99
|
-
woocommerce: "WooCommerce",
|
|
100
|
-
};
|
|
101
|
-
/** googlecalendar → Google Calendar, google_calendar → Google Calendar */
|
|
102
|
-
export function appName(slug) {
|
|
103
|
-
if (!slug)
|
|
104
|
-
return undefined;
|
|
105
|
-
const brand = BRANDS[slug.toLowerCase().replace(/[_\s-]+/g, "")];
|
|
106
|
-
if (brand)
|
|
107
|
-
return brand;
|
|
108
|
-
return slug
|
|
109
|
-
.split(/[_\s-]+/)
|
|
110
|
-
.filter(Boolean)
|
|
111
|
-
.map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
|
|
112
|
-
.join(" ");
|
|
113
|
-
}
|
|
114
|
-
/** HUBSPOT_LIST_CONTACTS → list contacts (the app name is shown already). */
|
|
115
|
-
function humanize(action) {
|
|
116
|
-
if (!action)
|
|
117
|
-
return undefined;
|
|
118
|
-
const words = action.toLowerCase().split("_");
|
|
119
|
-
return (words.length > 1 ? words.slice(1) : words).join(" ");
|
|
120
|
-
}
|
package/dist/builder/time.d.ts
DELETED
package/dist/builder/time.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from "react";
|
|
2
|
-
/** Whole seconds since `since`, ticking while it is set. */
|
|
3
|
-
export function useElapsed(since) {
|
|
4
|
-
const [now, setNow] = useState(() => Date.now());
|
|
5
|
-
useEffect(() => {
|
|
6
|
-
if (since == null)
|
|
7
|
-
return undefined;
|
|
8
|
-
const timer = setInterval(() => {
|
|
9
|
-
setNow(Date.now());
|
|
10
|
-
}, 1000);
|
|
11
|
-
return () => {
|
|
12
|
-
clearInterval(timer);
|
|
13
|
-
};
|
|
14
|
-
}, [since]);
|
|
15
|
-
return since == null ? 0 : Math.max(0, Math.floor((now - since) / 1000));
|
|
16
|
-
}
|
|
17
|
-
/** "12 s", "2 min 5 s". */
|
|
18
|
-
export function formatDuration(ms) {
|
|
19
|
-
const seconds = Math.round(ms / 1000);
|
|
20
|
-
if (seconds < 60)
|
|
21
|
-
return `${seconds} s`;
|
|
22
|
-
const minutes = Math.floor(seconds / 60);
|
|
23
|
-
return `${minutes} min ${seconds % 60} s`;
|
|
24
|
-
}
|