@datalayer/agent-runtimes 1.5.52 → 1.5.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-embed/chunks/{ChatView-Dy-IgGFL.js → ChatView-CRp8Mt57.js} +4 -4
- package/dist-embed/datalayer-app-main.js +86 -86
- package/lib/api/runtimes/environments.d.ts +2 -2
- package/lib/api/runtimes/environments.js +5 -5
- package/lib/api/runtimes/runtimes.d.ts +7 -7
- package/lib/api/runtimes/runtimes.js +5 -5
- package/lib/apps/__tests__/fixtures/sceneCheckCases.json +1 -1
- package/lib/apps/apps/AppBrowserSandbox.js +1 -1
- package/lib/apps/apps/AppComposer.d.ts +3 -3
- package/lib/apps/apps/AppComposer.js +3 -3
- package/lib/apps/apps/AppFeedback.d.ts +1 -1
- package/lib/apps/apps/AppKept.d.ts +1 -1
- package/lib/apps/apps/AppKept.js +1 -1
- package/lib/apps/apps/AppRenderer.d.ts +14 -14
- package/lib/apps/apps/AppRenderer.js +18 -20
- package/lib/apps/apps/AppRuntimePlugins.js +2 -3
- package/lib/apps/apps/agent.js +1 -1
- package/lib/apps/apps/appspec.d.ts +10 -10
- package/lib/apps/apps/appspec.js +35 -35
- package/lib/apps/apps/browserSandbox.d.ts +1 -1
- package/lib/apps/apps/checks.d.ts +16 -7
- package/lib/apps/apps/checks.js +65 -21
- package/lib/apps/apps/composer.d.ts +2 -2
- package/lib/apps/apps/composer.js +1 -1
- package/lib/apps/apps/computer.d.ts +3 -3
- package/lib/apps/apps/computer.js +1 -1
- package/lib/apps/apps/customComponents.d.ts +2 -2
- package/lib/apps/apps/customComponents.js +3 -3
- package/lib/apps/apps/feedback.d.ts +2 -2
- package/lib/apps/apps/hostTools.d.ts +3 -3
- package/lib/apps/apps/hostTools.js +2 -2
- package/lib/apps/apps/kept.d.ts +1 -1
- package/lib/apps/apps/language.d.ts +1 -1
- package/lib/apps/apps/pluginPair.d.ts +1 -1
- package/lib/apps/apps/records.js +1 -1
- package/lib/apps/apps/rules.d.ts +2 -2
- package/lib/apps/apps/rules.js +2 -2
- package/lib/apps/apps/saved.d.ts +1 -1
- package/lib/apps/apps/saved.js +1 -1
- package/lib/apps/apps/sceneChecks.js +3 -3
- package/lib/apps/apps/sceneYaml.js +1 -1
- package/lib/apps/apps/sessionRules.d.ts +7 -8
- package/lib/apps/apps/sessionRules.js +6 -7
- package/lib/apps/apps/settingsInputs.d.ts +1 -1
- package/lib/apps/apps/settingsInputs.js +1 -1
- package/lib/apps/apps/threads.d.ts +2 -2
- package/lib/apps/apps/threads.js +1 -1
- package/lib/apps/apps/uploads.d.ts +1 -1
- package/lib/apps/apps/visitorToken.d.ts +1 -1
- package/lib/apps/apps/visitorToken.js +2 -2
- package/lib/apps/core/a2uiComponents.js +1 -2
- package/lib/apps/core/appFiles.js +1 -1
- package/lib/apps/core/canvasBlocks.d.ts +1 -1
- package/lib/apps/core/canvasBlocks.js +1 -1
- package/lib/apps/core/canvasParts.d.ts +3 -3
- package/lib/apps/core/canvasParts.js +1 -1
- package/lib/apps/core/index.d.ts +12 -13
- package/lib/apps/core/index.js +5 -6
- package/lib/apps/embed/AppEmbed.d.ts +9 -9
- package/lib/apps/embed/AppEmbed.js +9 -10
- package/lib/apps/embed/LoopEmbed.d.ts +2 -3
- package/lib/apps/embed/datalayer-app.js +1 -1
- package/lib/apps/embed/element.js +11 -11
- package/lib/apps/embed/embedConfig.d.ts +8 -10
- package/lib/apps/embed/embedConfig.js +6 -7
- package/lib/apps/embed/embedSession.d.ts +3 -3
- package/lib/apps/embed/embedSession.js +2 -2
- package/lib/apps/embed/embeddedSecrets.d.ts +1 -1
- package/lib/apps/embed/embeddedSecrets.js +1 -1
- package/lib/apps/embed/hostBridge.d.ts +14 -14
- package/lib/apps/embed/hostBridge.js +9 -9
- package/lib/apps/embed/loader.js +2 -2
- package/lib/apps/embed/visitorApp.d.ts +1 -1
- package/lib/apps/index.d.ts +1 -1
- package/lib/apps/index.js +3 -3
- package/lib/apps/plugins/a2ui/A2uiView.js +1 -1
- package/lib/apps/plugins/a2ui-surface/AnswerShows.d.ts +2 -2
- package/lib/apps/plugins/a2ui-surface/AnswerShows.js +1 -1
- package/lib/apps/plugins/a2ui-surface/InlineSurface.d.ts +1 -1
- package/lib/apps/plugins/a2ui-surface/SurfaceToolResult.js +2 -2
- package/lib/apps/plugins/a2ui-surface/index.js +1 -1
- package/lib/apps/plugins/a2ui-surface/ownComponents.js +1 -1
- package/lib/apps/plugins/a2ui-surface/toolResult.d.ts +2 -2
- package/lib/apps/plugins/a2ui-surface/toolResult.js +2 -2
- package/lib/apps/plugins/agent-capacity/index.d.ts +2 -2
- package/lib/apps/plugins/agents/DatalayerAgentBridge.js +4 -4
- package/lib/apps/plugins/agents/appLaunch.d.ts +1 -1
- package/lib/apps/plugins/agents/plugin.d.ts +4 -4
- package/lib/apps/plugins/agents/switchable.js +1 -1
- package/lib/apps/plugins/app-activity/AppActivity.d.ts +1 -1
- package/lib/apps/plugins/app-components/index.d.ts +1 -2
- package/lib/apps/plugins/app-components/index.js +1 -2
- package/lib/apps/plugins/app-computer/AppComputer.d.ts +1 -1
- package/lib/apps/plugins/app-computer/AppComputer.js +2 -2
- package/lib/apps/plugins/app-elements/AppElements.d.ts +1 -2
- package/lib/apps/plugins/app-elements/AppElements.js +1 -1
- package/lib/apps/plugins/app-elements/QuestionView.d.ts +1 -2
- package/lib/apps/plugins/app-elements/QuestionView.js +1 -1
- package/lib/apps/plugins/app-elements/index.d.ts +2 -2
- package/lib/apps/plugins/app-elements/index.js +2 -2
- package/lib/apps/plugins/app-page/AppPage.d.ts +3 -3
- package/lib/apps/plugins/app-page/appPageModel.d.ts +5 -5
- package/lib/apps/plugins/app-page/appPageModel.js +1 -1
- package/lib/apps/plugins/app-page/index.d.ts +3 -3
- package/lib/apps/plugins/app-page/index.js +1 -1
- package/lib/apps/plugins/app-page/pageRun.d.ts +2 -2
- package/lib/apps/plugins/app-page/pageRun.js +2 -2
- package/lib/apps/plugins/app-rules/AppRulesCard.d.ts +5 -5
- package/lib/apps/plugins/app-rules/AppRulesCard.js +4 -4
- package/lib/apps/plugins/assistant/index.d.ts +2 -2
- package/lib/apps/plugins/assistant-characters/index.d.ts +2 -2
- package/lib/apps/plugins/assistant-characters/index.js +2 -2
- package/lib/apps/plugins/canvas-blocks/index.d.ts +1 -1
- package/lib/apps/plugins/canvas-blocks/index.js +1 -1
- package/lib/apps/plugins/canvas-parts/index.d.ts +5 -5
- package/lib/apps/plugins/canvas-parts/index.js +5 -5
- package/lib/apps/plugins/chat/ChatView.js +36 -34
- package/lib/apps/plugins/chat/index.d.ts +8 -8
- package/lib/apps/plugins/document/DocumentView.js +2 -2
- package/lib/apps/plugins/notebook/NotebookView.js +1 -1
- package/lib/apps/plugins/page-layout/SplitLayout.d.ts +1 -1
- package/lib/apps/plugins/pap-sign-in/PapSignInCard.d.ts +1 -1
- package/lib/apps/plugins/pap-sign-in/PapSignInCard.js +1 -1
- package/lib/apps/plugins/pap-sign-in/index.js +1 -1
- package/lib/apps/plugins/pap-sign-in/signIn.d.ts +1 -1
- package/lib/apps/plugins/pap-sign-in/signIn.js +1 -1
- package/lib/apps/plugins/plugins-panel/index.d.ts +1 -1
- package/lib/apps/plugins/plugins-panel/index.js +1 -1
- package/lib/apps/plugins/shield-displays/DiffCard.d.ts +2 -2
- package/lib/apps/plugins/shield-displays/TerminalCard.d.ts +1 -1
- package/lib/apps/plugins/shield-displays/index.js +3 -3
- package/lib/apps/presets.d.ts +9 -9
- package/lib/apps/presets.js +3 -3
- package/lib/apps/shell/LoopWorkspace.d.ts +1 -1
- package/lib/apps/shell/LoopWorkspace.js +1 -1
- package/lib/apps/shell/PluginToggles.d.ts +1 -1
- package/lib/apps/shell/SidebarRail.d.ts +1 -1
- package/lib/apps/shell/paneMotion.d.ts +1 -1
- package/lib/apps/shell/paneMotion.js +1 -1
- package/lib/chat/ChatFloating.d.ts +8 -9
- package/lib/chat/ChatFloating.js +4 -4
- package/lib/chat/ChatInline.js +1 -1
- package/lib/chat/ChatLanguage.d.ts +1 -1
- package/lib/chat/ChatLanguage.js +1 -1
- package/lib/chat/assistant/AssistantContextMenu.d.ts +1 -1
- package/lib/chat/assistant/AssistantStage.d.ts +4 -4
- package/lib/chat/assistant/AssistantStage.js +1 -1
- package/lib/chat/assistant/BalloonParts.d.ts +1 -1
- package/lib/chat/assistant/BalloonVisual.d.ts +1 -1
- package/lib/chat/assistant/SpeechBalloon.d.ts +2 -2
- package/lib/chat/assistant/SpriteCharacter.d.ts +1 -1
- package/lib/chat/assistant/characters.d.ts +2 -2
- package/lib/chat/assistant/formats/acf.js +1 -1
- package/lib/chat/assistant/formats/files.js +1 -1
- package/lib/chat/assistant/formats/index.d.ts +1 -1
- package/lib/chat/assistant/formats/index.js +1 -1
- package/lib/chat/assistant/formats/types.d.ts +1 -1
- package/lib/chat/assistant/state.d.ts +2 -2
- package/lib/chat/assistant/toolLine.js +1 -1
- package/lib/chat/base/ChatBase.js +28 -20
- package/lib/chat/base/conversationItems.d.ts +3 -3
- package/lib/chat/base/loopElement.d.ts +2 -2
- package/lib/chat/base/loopStep.d.ts +3 -3
- package/lib/chat/base/loopStep.js +1 -1
- package/lib/chat/base/loopWindow.d.ts +3 -3
- package/lib/chat/base/loopWindow.js +3 -3
- package/lib/chat/base/uiFiles.d.ts +1 -1
- package/lib/chat/base/uiFiles.js +1 -1
- package/lib/chat/base/uiOps.d.ts +1 -1
- package/lib/chat/base/uiOps.js +1 -1
- package/lib/chat/index.js +1 -1
- package/lib/chat/indicators/McpStatusIndicator.js +1 -1
- package/lib/chat/indicators/SkillsStatusIndicator.js +1 -1
- package/lib/chat/messages/ChatMessageList.d.ts +3 -4
- package/lib/chat/messages/ChatMessageList.js +2 -2
- package/lib/chat/messages/markdownWithoutHtml.d.ts +1 -1
- package/lib/chat/messages/markdownWithoutHtml.js +1 -1
- package/lib/chat/presence/Presence.d.ts +2 -2
- package/lib/chat/presence/Presence.js +1 -1
- package/lib/chat/presence/presenceStatus.d.ts +2 -2
- package/lib/chat/presence/presenceStatus.js +2 -2
- package/lib/chat/prompt/InputPrompt.d.ts +3 -3
- package/lib/chat/prompt/InputPromptBase.d.ts +1 -1
- package/lib/chat/prompt/InputPromptBase.js +1 -1
- package/lib/chat/prompt/InputPromptLexical.d.ts +1 -1
- package/lib/chat/styles/streamdownStyles.js +1 -1
- package/lib/chat/useViewportDrag.d.ts +1 -1
- package/lib/chat/viewModes.d.ts +1 -1
- package/lib/chat/viewModes.js +2 -2
- package/lib/chat/words.js +1 -1
- package/lib/client/mixins/RuntimesMixin.d.ts +3 -3
- package/lib/client/mixins/RuntimesMixin.js +3 -3
- package/lib/components/a2ui/custom/index.d.ts +3 -3
- package/lib/components/a2ui/custom/index.js +1 -1
- package/lib/components/a2ui/custom/sandbox.d.ts +2 -2
- package/lib/components/a2ui/custom/sandbox.js +2 -2
- package/lib/components/a2ui/datalayer/Chart.js +2 -2
- package/lib/components/a2ui/datalayer/Chat.js +1 -1
- package/lib/components/a2ui/datalayer/Download.js +1 -1
- package/lib/components/a2ui/datalayer/Evidence.js +1 -1
- package/lib/components/a2ui/datalayer/FileUpload.d.ts +1 -1
- package/lib/components/a2ui/datalayer/FileUpload.js +2 -2
- package/lib/components/a2ui/datalayer/Form.js +2 -2
- package/lib/components/a2ui/datalayer/SchemaForm.d.ts +1 -1
- package/lib/components/a2ui/datalayer/Table.js +1 -1
- package/lib/components/a2ui/datalayer/drawn.d.ts +1 -1
- package/lib/components/a2ui/datalayer/drawn.js +1 -1
- package/lib/components/a2ui/datalayer/formWidgets.js +1 -1
- package/lib/components/a2ui/datalayer/index.d.ts +1 -1
- package/lib/components/a2ui/datalayer/schema.d.ts +2 -2
- package/lib/components/a2ui/datalayer/schema.js +2 -2
- package/lib/components/a2ui/styles.js +1 -1
- package/lib/components/a2ui/visibleWhen.d.ts +3 -3
- package/lib/components/a2ui/visibleWhen.js +3 -3
- package/lib/components/code-sandboxes/CodeSandboxEnvironmentSelect.d.ts +1 -1
- package/lib/components/code-sandboxes/CodeSandboxLauncher.js +1 -1
- package/lib/components/code-sandboxes/CodeSandboxUtils.d.ts +1 -1
- package/lib/components/code-sandboxes/codeSandboxEnvironments.d.ts +2 -2
- package/lib/components/inspector/a2aSpans.d.ts +1 -1
- package/lib/components/inspector/a2aSpans.js +1 -1
- package/lib/components/teams/A2ATeamGraph.d.ts +3 -3
- package/lib/components/teams/A2ATeamGraph.js +1 -3
- package/lib/components/teams/AnswerSurfaces.d.ts +1 -1
- package/lib/components/teams/NotebookPreview.d.ts +1 -1
- package/lib/components/teams/SceneTranscript.d.ts +1 -1
- package/lib/components/teams/SceneView.d.ts +1 -1
- package/lib/components/teams/a2aTeamFlow.d.ts +1 -1
- package/lib/components/teams/a2aTeamFlow.js +1 -1
- package/lib/components/teams/sceneStage.d.ts +1 -1
- package/lib/components/teams/sceneTranscript.d.ts +1 -1
- package/lib/components/teams/useA2ATeam.d.ts +5 -5
- package/lib/components/teams/useA2ATeam.js +3 -3
- package/lib/config/AgentConfiguration.d.ts +1 -1
- package/lib/examples/AssistantExample.d.ts +1 -1
- package/lib/examples/AssistantExample.js +1 -1
- package/lib/examples/AssistantGalleryExample.d.ts +1 -1
- package/lib/examples/AssistantGalleryExample.js +1 -1
- package/lib/examples/LoopAppComputerExample.d.ts +1 -1
- package/lib/examples/LoopAppComputerExample.js +1 -1
- package/lib/examples/ProtocolSignedRequestsExample.d.ts +1 -1
- package/lib/examples/ProtocolSignedRequestsExample.js +1 -1
- package/lib/examples/ProtocolUcpCheckoutExample.d.ts +1 -1
- package/lib/examples/ProtocolUcpCheckoutExample.js +1 -1
- package/lib/examples/ScenesExample.d.ts +1 -1
- package/lib/examples/ScenesExample.js +1 -1
- package/lib/examples/ShieldHarnessExample.d.ts +1 -1
- package/lib/examples/ShieldHarnessExample.js +1 -1
- package/lib/examples/ShieldPolicyExample.d.ts +1 -1
- package/lib/examples/ShieldPolicyExample.js +1 -1
- package/lib/examples/VoiceChatExample.d.ts +1 -1
- package/lib/examples/VoiceChatExample.js +1 -1
- package/lib/examples/example-selector.js +3 -3
- package/lib/examples/exampleGroups.js +3 -3
- package/lib/examples/pap/PapSignInDisplayView.d.ts +1 -1
- package/lib/examples/pap/PapSignInDisplayView.js +1 -1
- package/lib/examples/pap/papSignInCases.js +1 -1
- package/lib/examples/protocols/signedRequestsDemo.d.ts +1 -1
- package/lib/examples/protocols/signedRequestsDemo.js +1 -1
- package/lib/examples/protocols/ucpCheckoutDemo.d.ts +1 -1
- package/lib/examples/protocols/ucpCheckoutDemo.js +1 -1
- package/lib/examples/shield/shieldHarness.d.ts +1 -1
- package/lib/examples/shield/shieldPolicyDemo.d.ts +2 -2
- package/lib/examples/shield/shieldPolicyDemo.js +1 -1
- package/lib/examples/utils/assistantGallery.d.ts +1 -1
- package/lib/examples/utils/clippyJsCharacters.js +2 -2
- package/lib/examples/utils/testSpriteCharacter.js +2 -2
- package/lib/hooks/ownRoutes.d.ts +1 -1
- package/lib/hooks/useAgentRuntimes.d.ts +1 -1
- package/lib/hooks/useChat.js +1 -1
- package/lib/index.js +1 -1
- package/lib/loop-example-main.js +1 -1
- package/lib/models/Environment.d.ts +11 -11
- package/lib/models/Environment.js +1 -1
- package/lib/models/RuntimeDTO.d.ts +1 -1
- package/lib/portable/activity.d.ts +2 -2
- package/lib/portable/activity.js +3 -3
- package/lib/portable/adapterEvents.d.ts +1 -1
- package/lib/portable/agUiRefusal.d.ts +1 -1
- package/lib/portable/agUiRefusal.js +1 -1
- package/lib/portable/agui.d.ts +2 -2
- package/lib/portable/agui.js +2 -2
- package/lib/portable/approvalCard.d.ts +1 -1
- package/lib/portable/approvalCard.js +1 -1
- package/lib/portable/approvals.d.ts +2 -2
- package/lib/portable/approvals.js +1 -1
- package/lib/portable/conversation.d.ts +2 -2
- package/lib/portable/conversation.js +1 -1
- package/lib/portable/direct.d.ts +2 -2
- package/lib/portable/displays.d.ts +2 -2
- package/lib/portable/displays.js +3 -3
- package/lib/portable/fixtures.d.ts +4 -5
- package/lib/portable/fixtures.js +4 -5
- package/lib/portable/hosts/agentClient.d.ts +5 -6
- package/lib/portable/hosts/agentClient.js +7 -7
- package/lib/portable/hosts/approvalRenderers.d.ts +6 -7
- package/lib/portable/hosts/approvalRenderers.js +2 -3
- package/lib/portable/hosts/client.d.ts +9 -6
- package/lib/portable/hosts/client.js +9 -8
- package/lib/portable/hosts/contracts.d.ts +2 -4
- package/lib/portable/hosts/contracts.js +2 -4
- package/lib/portable/hosts/contracts.json +2 -2
- package/lib/portable/hosts/deadLetters.js +2 -2
- package/lib/portable/hosts/deliveries.d.ts +2 -3
- package/lib/portable/hosts/forbiddenGraph.d.ts +4 -4
- package/lib/portable/hosts/forbiddenGraph.js +4 -4
- package/lib/portable/hosts/health.d.ts +3 -4
- package/lib/portable/hosts/health.js +3 -4
- package/lib/portable/hosts/index.d.ts +1 -1
- package/lib/portable/hosts/index.js +1 -1
- package/lib/portable/hosts/observability.d.ts +1 -1
- package/lib/portable/hosts/observability.js +3 -4
- package/lib/portable/hosts/postgresQueue.d.ts +2 -2
- package/lib/portable/hosts/postgresQueue.js +3 -3
- package/lib/portable/hosts/queue.d.ts +1 -1
- package/lib/portable/hosts/quotas.d.ts +2 -2
- package/lib/portable/hosts/quotas.js +2 -2
- package/lib/portable/hosts/rateLimit.d.ts +1 -1
- package/lib/portable/hosts/resolution.d.ts +2 -2
- package/lib/portable/hosts/schema.d.ts +1 -1
- package/lib/portable/hosts/schema.js +1 -1
- package/lib/portable/hosts/secretCipher.d.ts +2 -2
- package/lib/portable/hosts/sessionUid.js +1 -2
- package/lib/portable/hosts/turnState.d.ts +1 -1
- package/lib/portable/index.js +12 -12
- package/lib/portable/lifecycle.d.ts +3 -3
- package/lib/portable/presence.d.ts +3 -3
- package/lib/portable/protectedInput.d.ts +1 -1
- package/lib/portable/records.d.ts +2 -2
- package/lib/portable/records.js +2 -2
- package/lib/portable/runMeasures.d.ts +1 -1
- package/lib/portable/runMeasures.js +1 -1
- package/lib/portable/runtimes.d.ts +1 -1
- package/lib/portable/semantic-events.json +1 -1
- package/lib/portable/semantic.d.ts +1 -1
- package/lib/portable/semantic.js +1 -1
- package/lib/portable/semanticOfAgUi.d.ts +2 -2
- package/lib/portable/semanticOfAgUi.js +1 -1
- package/lib/portable/signIn.d.ts +5 -5
- package/lib/portable/signIn.js +1 -1
- package/lib/portable/signInStatus.d.ts +1 -2
- package/lib/portable/signInStatus.js +1 -2
- package/lib/portable/thread.d.ts +2 -2
- package/lib/portable/thread.js +2 -2
- package/lib/portable/views.d.ts +5 -5
- package/lib/protocols/A2AAdapter.d.ts +1 -1
- package/lib/protocols/A2AAdapter.js +3 -3
- package/lib/protocols/AGUIAdapter.d.ts +1 -1
- package/lib/protocols/AGUIAdapter.js +2 -2
- package/lib/protocols/BrowserAgentAdapter.d.ts +2 -2
- package/lib/protocols/BrowserAgentAdapter.js +1 -1
- package/lib/protocols/VercelAIAdapter.js +2 -2
- package/lib/protocols/a2a/index.d.ts +1 -1
- package/lib/protocols/a2a/index.js +1 -1
- package/lib/protocols/agentProtocols.d.ts +1 -1
- package/lib/protocols/agentProtocols.js +1 -1
- package/lib/protocols/agentic-commerce/index.d.ts +2 -2
- package/lib/protocols/agentic-commerce/index.js +2 -2
- package/lib/protocols/commerce.d.ts +1 -1
- package/lib/protocols/commerce.js +3 -3
- package/lib/protocols/core.d.ts +3 -3
- package/lib/protocols/core.js +2 -2
- package/lib/protocols/mcp/client.js +1 -1
- package/lib/protocols/mcp/index.js +1 -1
- package/lib/protocols/pact/index.d.ts +6 -6
- package/lib/protocols/pact/index.js +6 -6
- package/lib/protocols/ucp/index.d.ts +2 -2
- package/lib/protocols/ucp/index.js +2 -2
- package/lib/protocols/ucp/merchant.js +1 -2
- package/lib/protocols/web-bot-auth/index.d.ts +1 -1
- package/lib/protocols/web-bot-auth/index.js +1 -1
- package/lib/protocols/web-bot-auth/tap.js +1 -1
- package/lib/runtimes/actions.js +2 -2
- package/lib/runtimes/apis.d.ts +3 -4
- package/lib/runtimes/browser/a2aPeer.d.ts +1 -1
- package/lib/runtimes/browser/a2aPeer.js +1 -1
- package/lib/runtimes/browser/protocol.d.ts +1 -1
- package/lib/runtimes/variants.d.ts +3 -3
- package/lib/runtimes/variants.js +4 -4
- package/lib/specs/agents/agents.js +2 -2
- package/lib/specs/apps.js +28 -28
- package/lib/specs/appspecSchema.js +62 -62
- package/lib/specs/harnesses.d.ts +1 -1
- package/lib/specs/harnesses.js +1 -1
- package/lib/specs/policies.d.ts +1 -1
- package/lib/specs/policies.js +2 -2
- package/lib/specs/protocols.d.ts +1 -1
- package/lib/specs/sceneSchema.js +4 -4
- package/lib/specs/scenes.js +4 -4
- package/lib/specs/standards.d.ts +1 -1
- package/lib/specs/ui.d.ts +2 -2
- package/lib/specs/ui.js +1 -1
- package/lib/specs/uiRenderers.d.ts +1 -1
- package/lib/specs/voices.d.ts +2 -2
- package/lib/specs/voices.js +2 -2
- package/lib/stories/loop/ReferenceScreens.js +1 -1
- package/lib/stories/loop/pictures-main.js +2 -2
- package/lib/test-setup.js +1 -1
- package/lib/types/agentspecs.d.ts +81 -85
- package/lib/types/chat.d.ts +26 -13
- package/lib/types/messages.d.ts +1 -1
- package/lib/types/protocol.d.ts +3 -3
- package/lib/types/scenes.d.ts +6 -6
- package/lib/types/teams.d.ts +3 -3
- package/lib/ui-plugins/MCPUIPlugin.d.ts +2 -2
- package/lib/ui-plugins/MCPUIPlugin.js +1 -1
- package/lib/voice/ComposerVoice.d.ts +5 -3
- package/lib/voice/ComposerVoice.js +4 -4
- package/lib/voice/HandsFree.d.ts +9 -3
- package/lib/voice/HandsFree.js +8 -3
- package/lib/voice/ReadAloud.d.ts +1 -1
- package/lib/voice/VoiceInput.d.ts +1 -2
- package/lib/voice/VoiceMenu.d.ts +1 -1
- package/lib/voice/captions.d.ts +1 -1
- package/lib/voice/captions.js +1 -1
- package/lib/voice/capture.d.ts +1 -1
- package/lib/voice/capture.js +1 -1
- package/lib/voice/chatVoice.d.ts +1 -1
- package/lib/voice/chatVoice.js +3 -3
- package/lib/voice/choices.d.ts +2 -2
- package/lib/voice/choices.js +2 -2
- package/lib/voice/consent.js +1 -1
- package/lib/voice/handsFree.d.ts +29 -4
- package/lib/voice/handsFree.js +32 -4
- package/lib/voice/hearing.d.ts +1 -1
- package/lib/voice/hearing.js +1 -1
- package/lib/voice/index.d.ts +2 -2
- package/lib/voice/pinned.d.ts +2 -2
- package/lib/voice/pinned.js +2 -2
- package/lib/voice/sayAloud.d.ts +2 -2
- package/lib/voice/sayAloud.js +2 -2
- package/lib/voice/sentences.d.ts +1 -1
- package/lib/voice/sentences.js +1 -1
- package/lib/voice/serverHearing.d.ts +8 -2
- package/lib/voice/serverHearing.js +37 -6
- package/lib/voice/settings.d.ts +2 -2
- package/lib/voice/settings.js +2 -2
- package/lib/voice/speaker.d.ts +10 -4
- package/lib/voice/speaker.js +5 -2
- package/lib/voice/types.d.ts +1 -1
- package/lib/voice/useSpokenAnswers.js +2 -2
- package/lib/voice/useVoiceSettings.js +1 -1
- package/lib/voice/useVoiceSpeaker.js +1 -1
- package/package.json +2 -2
- package/scripts/codegen/generate_agentic_commerce.sh +1 -1
- package/scripts/codegen/generate_agents.py +5 -5
- package/scripts/codegen/generate_apps.py +3 -3
- package/scripts/codegen/generate_harnesses.py +4 -4
- package/scripts/codegen/generate_mcp_servers.py +2 -2
- package/scripts/codegen/generate_policies.py +3 -3
- package/scripts/codegen/generate_protocols.py +3 -4
- package/scripts/codegen/generate_scenes.py +4 -4
- package/scripts/codegen/generate_standards.py +3 -3
- package/scripts/codegen/generate_teams.py +1 -1
- package/scripts/codegen/generate_ui.py +8 -8
- package/scripts/codegen/generate_ui_renderers.py +3 -3
- package/scripts/codegen/generate_voices.py +4 -4
- package/scripts/dist-embed.mjs +1 -1
- package/scripts/generate-environments-types.py +1 -1
- package/scripts/record-scene-checks.py +2 -2
- package/scripts/voice/measure.py +3 -3
- package/scripts/voice/pin_store.py +1 -1
- package/scripts/voice/serve_store.py +1 -1
- package/scripts/voice/transcribe.mjs +1 -1
package/lib/types/chat.d.ts
CHANGED
|
@@ -640,7 +640,7 @@ export type ThemeOverrides = {
|
|
|
640
640
|
dark?: Record<string, string>;
|
|
641
641
|
};
|
|
642
642
|
/**
|
|
643
|
-
* A conversation the chat goes on with (
|
|
643
|
+
* A conversation the chat goes on with (D-13): an embedded
|
|
644
644
|
* application's session, reattached after its page reloaded.
|
|
645
645
|
*/
|
|
646
646
|
export type ResumedThread = {
|
|
@@ -649,7 +649,7 @@ export type ResumedThread = {
|
|
|
649
649
|
/** What it holds already; none for a new one. */
|
|
650
650
|
messages: ChatMessage[];
|
|
651
651
|
/**
|
|
652
|
-
* Opened from a person's history (
|
|
652
|
+
* Opened from a person's history (P-24): its conversation is read
|
|
653
653
|
* from the runtime the application's chat runs on as the chat mounts —
|
|
654
654
|
* held there, else resumed from its record — in place of `messages`.
|
|
655
655
|
*/
|
|
@@ -684,20 +684,26 @@ export interface ChatBaseProps {
|
|
|
684
684
|
*/
|
|
685
685
|
thread: () => string;
|
|
686
686
|
/**
|
|
687
|
-
* Stops the agent's voice (
|
|
687
|
+
* Stops the agent's voice (VO-10): the chat's own speaker,
|
|
688
688
|
* for a host whose composer holds the microphone and *Stop speaking*.
|
|
689
689
|
* Absent while its answers are not heard.
|
|
690
690
|
*/
|
|
691
691
|
stopSpeaking?: () => void;
|
|
692
692
|
/**
|
|
693
|
-
*
|
|
694
|
-
*
|
|
693
|
+
* How loud the chat's speaker plays now, 0 to 1 (VO-13): a
|
|
694
|
+
* host's hands-free gates barge-in on it. Absent while its answers
|
|
695
|
+
* are not heard by a speaker that gives a level.
|
|
696
|
+
*/
|
|
697
|
+
voiceLevel?: () => number;
|
|
698
|
+
/**
|
|
699
|
+
* Marks the answer the person spoke over *interrupted* (VO-13),
|
|
700
|
+
* for a host whose composer holds the microphone.
|
|
695
701
|
*/
|
|
696
702
|
markInterrupted: () => void;
|
|
697
703
|
} | null) => void;
|
|
698
704
|
/**
|
|
699
705
|
* Reports whether the agent's voice is speaking, for a host that draws the
|
|
700
|
-
* composer and so its *Stop speaking* (
|
|
706
|
+
* composer and so its *Stop speaking* (VO-10).
|
|
701
707
|
*/
|
|
702
708
|
onSpeakingChange?: (speaking: boolean) => void;
|
|
703
709
|
/**
|
|
@@ -781,7 +787,7 @@ export interface ChatBaseProps {
|
|
|
781
787
|
mentionableAgents?: MentionableAgent[];
|
|
782
788
|
/**
|
|
783
789
|
* Commands the prompt lists while `/` is typed, before its own: an
|
|
784
|
-
* application's (
|
|
790
|
+
* application's (P-19). Picking one writes `/<name> `. Lexical only.
|
|
785
791
|
*/
|
|
786
792
|
promptCommands?: PromptCommand[];
|
|
787
793
|
/**
|
|
@@ -886,7 +892,7 @@ export interface ChatBaseProps {
|
|
|
886
892
|
themeVariant?: string;
|
|
887
893
|
/**
|
|
888
894
|
* Properties laid over the theme's own, by mode — an application's accent
|
|
889
|
-
* over the theme it wears (
|
|
895
|
+
* over the theme it wears (T-05): without them the chat would wear the
|
|
890
896
|
* theme's default accent whatever the page around it set.
|
|
891
897
|
*/
|
|
892
898
|
themeOverrides?: ThemeOverrides;
|
|
@@ -1001,7 +1007,7 @@ export interface ChatBaseProps {
|
|
|
1001
1007
|
/**
|
|
1002
1008
|
* The agent's welcome, said as the first message of the history: drawn as
|
|
1003
1009
|
* the chat draws the agent's messages, and never sent nor kept. The floating
|
|
1004
|
-
* assistant's balloon opens on it (
|
|
1010
|
+
* assistant's balloon opens on it (T-23).
|
|
1005
1011
|
*/
|
|
1006
1012
|
welcome?: string;
|
|
1007
1013
|
/**
|
|
@@ -1011,7 +1017,7 @@ export interface ChatBaseProps {
|
|
|
1011
1017
|
*/
|
|
1012
1018
|
trailingContent?: ReactNode;
|
|
1013
1019
|
/**
|
|
1014
|
-
* Its voice (
|
|
1020
|
+
* Its voice (V1): a microphone in the composer, push-to-talk,
|
|
1015
1021
|
* what is said heard on the device and put in the composer — or sent, with
|
|
1016
1022
|
* *Send what I say* — marked as spoken (VO-27).
|
|
1017
1023
|
*/
|
|
@@ -1020,13 +1026,20 @@ export interface ChatBaseProps {
|
|
|
1020
1026
|
voiceSpeaking?: boolean;
|
|
1021
1027
|
/**
|
|
1022
1028
|
* The sentence the host's speaker is saying, marked in the conversation
|
|
1023
|
-
* (
|
|
1029
|
+
* (VO-65); a chat that speaks for itself marks its own.
|
|
1024
1030
|
*/
|
|
1025
1031
|
voiceSentence?: string;
|
|
1026
1032
|
/** Stops the agent's voice: the composer's *Stop speaking*, and the microphone opening (VO-13). */
|
|
1027
1033
|
onStopSpeaking?: () => void;
|
|
1028
1034
|
/**
|
|
1029
|
-
*
|
|
1035
|
+
* How loud the host's speaker plays now, between 0 and 1 (`useVoiceSpeaker`'s
|
|
1036
|
+
* `level`): hands-free's barge-in counts speech only above what the answer's
|
|
1037
|
+
* own sound can leave in the microphone (VO-13). A chat that speaks
|
|
1038
|
+
* for itself reads its own.
|
|
1039
|
+
*/
|
|
1040
|
+
voiceLevel?: () => number;
|
|
1041
|
+
/**
|
|
1042
|
+
* Reads an answer aloud (VO-21): given, each answer the agent has
|
|
1030
1043
|
* finished writing has a *Read aloud* under it, which calls it with the
|
|
1031
1044
|
* answer's text.
|
|
1032
1045
|
*/
|
|
@@ -1229,7 +1242,7 @@ export interface ChatBaseProps {
|
|
|
1229
1242
|
accessToken?: string;
|
|
1230
1243
|
}>;
|
|
1231
1244
|
/**
|
|
1232
|
-
* The conversation to go on with (
|
|
1245
|
+
* The conversation to go on with (D-13): its AG-UI thread — an
|
|
1233
1246
|
* application's session — and what it holds, drawn in place of the
|
|
1234
1247
|
* runtime's history, which is its agent's and not one session's. Read
|
|
1235
1248
|
* when the chat mounts; a new thread (the header's +) is the chat's own.
|
package/lib/types/messages.d.ts
CHANGED
|
@@ -124,7 +124,7 @@ export interface ChatMessage {
|
|
|
124
124
|
metadata?: Record<string, unknown>;
|
|
125
125
|
/**
|
|
126
126
|
* What the message shows besides its words: the displays sent under it
|
|
127
|
-
* (`reactor.ui`,
|
|
127
|
+
* (`reactor.ui`, RU-2), in the order they came; each drawn by
|
|
128
128
|
* the renderer a plugin contributed for its type.
|
|
129
129
|
*/
|
|
130
130
|
displays?: Display[];
|
package/lib/types/protocol.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ export interface ProtocolConfig {
|
|
|
45
45
|
/** Config endpoint URL for non-Jupyter protocols (if not set, uses Jupyter requestAPI) */
|
|
46
46
|
configEndpoint?: string;
|
|
47
47
|
/**
|
|
48
|
-
* The ui channel's WebSocket (`ws://` or `wss://`,
|
|
48
|
+
* The ui channel's WebSocket (`ws://` or `wss://`, RU-W): an
|
|
49
49
|
* application's session says on it what its messages show, its steps, its
|
|
50
50
|
* elements, its authors and its window messages, and takes the presses of
|
|
51
51
|
* what they offered. Set for an application's agent; one connection per
|
|
@@ -54,7 +54,7 @@ export interface ProtocolConfig {
|
|
|
54
54
|
uiSocket?: string;
|
|
55
55
|
/**
|
|
56
56
|
* Where a file of a conversation is uploaded before the run or the press
|
|
57
|
-
* that names it (
|
|
57
|
+
* that names it (RU-6): Reactor's upload, the bytes as the body,
|
|
58
58
|
* the conversation's thread its scope. A run carries the ref it answers,
|
|
59
59
|
* never the bytes. Set for an application's agent.
|
|
60
60
|
*/
|
|
@@ -69,7 +69,7 @@ export interface ProtocolConfig {
|
|
|
69
69
|
appSessions?: string;
|
|
70
70
|
/**
|
|
71
71
|
* The runtime answers only the application's own routes (OwnRoutesOnly,
|
|
72
|
-
*
|
|
72
|
+
* the release gates): it serves a deployment — kept always on,
|
|
73
73
|
* launched by a hosted page for it — or is the visitors' runtime. Nothing
|
|
74
74
|
* outside them is opened: not the monitoring stream (an application's
|
|
75
75
|
* session asks its approvals in the conversation, over `uiSocket`), not
|
package/lib/types/scenes.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Scenes (agentspecs `scenes`, `schema: loop.scene/v1`,
|
|
2
|
+
* Scenes (agentspecs `scenes`, `schema: loop.scene/v1`, A-11): a team,
|
|
3
3
|
* staged. The team says who is on stage; the scene says what happens there —
|
|
4
4
|
* the setting, the script, the stage directions, the audience, the rehearsal
|
|
5
5
|
* and where it plays.
|
|
@@ -72,7 +72,7 @@ export interface SceneCueSpec {
|
|
|
72
72
|
}
|
|
73
73
|
/** What kind of answer comes back, and what the page shows. */
|
|
74
74
|
export type SceneAnswerKind = 'words' | 'table' | 'chart' | 'notebook' | 'map' | 'file' | 'image'
|
|
75
|
-
/** The sources it read, as cards that open (
|
|
75
|
+
/** The sources it read, as cards that open (H-02). */
|
|
76
76
|
| 'sources'
|
|
77
77
|
/** A choice as buttons that answer the application. */
|
|
78
78
|
| 'choice'
|
|
@@ -162,7 +162,7 @@ export interface SceneRehearsalBeatSpec {
|
|
|
162
162
|
mustNotSay?: string[];
|
|
163
163
|
within: string;
|
|
164
164
|
}
|
|
165
|
-
/** A transcript recorded once, played when the scene cannot play live (
|
|
165
|
+
/** A transcript recorded once, played when the scene cannot play live (H-08). */
|
|
166
166
|
export interface SceneRecordingSpec {
|
|
167
167
|
path: string;
|
|
168
168
|
taken: string;
|
|
@@ -185,7 +185,7 @@ export interface ScenePlayedBeatSpec {
|
|
|
185
185
|
}
|
|
186
186
|
/**
|
|
187
187
|
* What came of the last rehearsal `loop scenes rehearse --cloud` played
|
|
188
|
-
* (
|
|
188
|
+
* (A-14): kept beside the specs in `<id>/rehearsal.json`, written by the
|
|
189
189
|
* command and never by hand. A scene is *Live* when it `passed`; one that did
|
|
190
190
|
* not says so with `says`.
|
|
191
191
|
*/
|
|
@@ -210,7 +210,7 @@ export interface SceneDeploymentSpec {
|
|
|
210
210
|
addresses: Record<string, string>;
|
|
211
211
|
}
|
|
212
212
|
/** Specification for a scene: a team, staged. */
|
|
213
|
-
/** Somebody on a scripted scene: a person, an application, a company (
|
|
213
|
+
/** Somebody on a scripted scene: a person, an application, a company (X-02). */
|
|
214
214
|
export interface SceneActorSpec {
|
|
215
215
|
id: string;
|
|
216
216
|
/** The name the audience sees. */
|
|
@@ -258,7 +258,7 @@ export interface SceneSpec {
|
|
|
258
258
|
version: string;
|
|
259
259
|
/**
|
|
260
260
|
* `team`: a team staged, live; `scripted`: actors and lines written out,
|
|
261
|
-
* played as written, with no team, cast or script (
|
|
261
|
+
* played as written, with no team, cast or script (X-02).
|
|
262
262
|
*/
|
|
263
263
|
kind: 'team' | 'scripted';
|
|
264
264
|
/** The tab's name. */
|
package/lib/types/teams.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ export interface TeamContextSpec {
|
|
|
48
48
|
sharing: TeamContextSharing;
|
|
49
49
|
/**
|
|
50
50
|
* The Frames every member works under, in order, `id` or `id:version`
|
|
51
|
-
* (
|
|
51
|
+
* (A-04): the team's shared context, as a Cog names its own.
|
|
52
52
|
*/
|
|
53
53
|
frames?: string[];
|
|
54
54
|
}
|
|
@@ -88,13 +88,13 @@ export interface TeamAgentspec {
|
|
|
88
88
|
/**
|
|
89
89
|
* MCP server catalogue reference, in place of `ref` and `app`: the member
|
|
90
90
|
* is that server, a system of the scene the others reach over MCP
|
|
91
|
-
* (
|
|
91
|
+
* (A-04). It asks nobody.
|
|
92
92
|
*/
|
|
93
93
|
server?: string;
|
|
94
94
|
/**
|
|
95
95
|
* Harness catalogue id, in place of `ref`, `app` and `server`: the member is
|
|
96
96
|
* that agent program over ACP behind the Shield — Claude Code, Codex, an
|
|
97
|
-
* organization's own — asked over A2A or ACP (
|
|
97
|
+
* organization's own — asked over A2A or ACP (SH-45).
|
|
98
98
|
*/
|
|
99
99
|
harness?: string;
|
|
100
100
|
/** Where its loop turns: in the person's `browser`, or on a `runtime`. */
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* MCP-UI plugin for chat component.
|
|
3
3
|
* Renders MCP UI protocol messages and resources.
|
|
4
4
|
*
|
|
5
|
-
* What it never draws (
|
|
5
|
+
* What it never draws (D-22): the markup of a resource (`text/html`)
|
|
6
6
|
* and a UI element built from a tool's props. Either is markup a server or a
|
|
7
7
|
* model supplies, and the chat may sit on the platform's origin, where people
|
|
8
8
|
* are signed in: each is refused in a sentence, in place, with no fallback.
|
|
@@ -53,7 +53,7 @@ export interface MCPUIMessage {
|
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
|
-
* What the chat says in place of the MCP UI's markup (
|
|
56
|
+
* What the chat says in place of the MCP UI's markup (D-22).
|
|
57
57
|
*/
|
|
58
58
|
export declare const MCP_UI_NOT_DRAWN: {
|
|
59
59
|
readonly html: "This answer carries a page of HTML from its MCP server. It is not drawn here: no markup from a server or a model reaches this page.";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/**
|
|
3
|
-
* What the chat says in place of the MCP UI's markup (
|
|
3
|
+
* What the chat says in place of the MCP UI's markup (D-22).
|
|
4
4
|
*/
|
|
5
5
|
export const MCP_UI_NOT_DRAWN = {
|
|
6
6
|
html: 'This answer carries a page of HTML from its MCP server. It is not drawn here: no markup from a server or a model reaches this page.',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The microphone of a composer whose text its host holds (
|
|
3
|
-
*
|
|
2
|
+
* The microphone of a composer whose text its host holds (VO-10, VO-11):
|
|
3
|
+
* `ChatBase`'s own, and the workspace's (an application's page,
|
|
4
4
|
* whose composer is a plugin of its own). What the box held when the
|
|
5
5
|
* microphone opened stays; the words heard go after it as they come, and the
|
|
6
6
|
* whole of what was heard replaces them once it stops. Put there for the
|
|
@@ -31,6 +31,8 @@ export interface ComposerVoiceProps {
|
|
|
31
31
|
speaking?: boolean;
|
|
32
32
|
/** Stops the agent's voice, also when the microphone opens (VO-13). */
|
|
33
33
|
onStopSpeaking?: () => void;
|
|
34
|
+
/** How loud the agent's voice plays now, 0 to 1: hands-free's barge-in is gated on it (VO-13). */
|
|
35
|
+
playbackLevel?: () => number;
|
|
34
36
|
/** The agent is answering: a run is in progress (hands-free, VO-12). */
|
|
35
37
|
running?: boolean;
|
|
36
38
|
/** Stops the run while the answer is still being written (barge-in, VO-13). */
|
|
@@ -50,5 +52,5 @@ export interface ComposerVoiceProps {
|
|
|
50
52
|
}
|
|
51
53
|
/** Whether something rides on a run as a spoken message's metadata (VO-27). */
|
|
52
54
|
export declare function spokenOf(value: unknown): SpokenMetadata | undefined;
|
|
53
|
-
export declare function ComposerVoice({ voice, input, setInput, onSpoken, send, disabled, speaking, onStopSpeaking, running, onStopRun, onInterrupted, onInterimChange, answers, }: ComposerVoiceProps): JSX.Element | null;
|
|
55
|
+
export declare function ComposerVoice({ voice, input, setInput, onSpoken, send, disabled, speaking, onStopSpeaking, playbackLevel, running, onStopRun, onInterrupted, onInterimChange, answers, }: ComposerVoiceProps): JSX.Element | null;
|
|
54
56
|
export default ComposerVoice;
|
|
@@ -15,9 +15,9 @@ export function spokenOf(value) {
|
|
|
15
15
|
? said
|
|
16
16
|
: undefined;
|
|
17
17
|
}
|
|
18
|
-
export function ComposerVoice({ voice, input, setInput, onSpoken, send, disabled = false, speaking = false, onStopSpeaking, running = false, onStopRun, onInterrupted, onInterimChange, answers = false, }) {
|
|
18
|
+
export function ComposerVoice({ voice, input, setInput, onSpoken, send, disabled = false, speaking = false, onStopSpeaking, playbackLevel, running = false, onStopRun, onInterrupted, onInterimChange, answers = false, }) {
|
|
19
19
|
// In the browser, or on Datalayer's servers where the application, the
|
|
20
|
-
// language or the person's detection asks for it (
|
|
20
|
+
// language or the person's detection asks for it (VO-14, VO-34).
|
|
21
21
|
const place = hearingPlace(voice);
|
|
22
22
|
const hearing = useMemo(() => {
|
|
23
23
|
if (voice.input === 'off') {
|
|
@@ -31,7 +31,7 @@ export function ComposerVoice({ voice, input, setInput, onSpoken, send, disabled
|
|
|
31
31
|
detect: voice.detect,
|
|
32
32
|
})
|
|
33
33
|
: undefined;
|
|
34
|
-
// `where: auto
|
|
34
|
+
// `where: auto`: the device when it hears the language and its model
|
|
35
35
|
// loads, the server otherwise — and back to the device when the server
|
|
36
36
|
// refuses (a visitor's day spent).
|
|
37
37
|
if (server && !voice.detect && (voice.where ?? 'auto') === 'auto') {
|
|
@@ -55,7 +55,7 @@ export function ComposerVoice({ voice, input, setInput, onSpoken, send, disabled
|
|
|
55
55
|
if (!hearing) {
|
|
56
56
|
return null;
|
|
57
57
|
}
|
|
58
|
-
return (_jsxs("span", { "data-composer-voice": "", style: { display: 'inline-flex', alignItems: 'center', gap: 2 }, children: [_jsx(VoiceMenu, { voice: voice, answers: answers, disabled: disabled }), voice.input === 'hands_free' ? (_jsx(HandsFree, { hearing: hearing, language: voice.language, consentKey: voice.consentKey ?? 'chat', microphoneId: voice.microphoneId, turnSilenceMs: voice.turnSilenceMs, disabled: disabled, running: running, speaking: speaking, onStopSpeaking: onStopSpeaking, onStopRun: onStopRun, onInterrupted: onInterrupted, onInterim: (words) => {
|
|
58
|
+
return (_jsxs("span", { "data-composer-voice": "", style: { display: 'inline-flex', alignItems: 'center', gap: 2 }, children: [_jsx(VoiceMenu, { voice: voice, answers: answers, disabled: disabled }), voice.input === 'hands_free' ? (_jsx(HandsFree, { hearing: hearing, language: voice.language, consentKey: voice.consentKey ?? 'chat', microphoneId: voice.microphoneId, turnSilenceMs: voice.turnSilenceMs, disabled: disabled, running: running, speaking: speaking, playbackLevel: playbackLevel, onStopSpeaking: onStopSpeaking, onStopRun: onStopRun, onInterrupted: onInterrupted, onInterim: (words) => {
|
|
59
59
|
setInput(words ? afterBase(words) : base.current);
|
|
60
60
|
onInterimChange?.(words !== '');
|
|
61
61
|
}, send: (text, metadata) => {
|
package/lib/voice/HandsFree.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* *Talk with it*: a conversation by voice, hands-free (
|
|
3
|
-
*
|
|
2
|
+
* *Talk with it*: a conversation by voice, hands-free (VO-12, VO-13),
|
|
3
|
+
* beside the composer's microphone where the application's voice
|
|
4
4
|
* says `input: hands_free`.
|
|
5
5
|
*
|
|
6
6
|
* On, the microphone stays open. The words are written in the composer as
|
|
@@ -43,6 +43,12 @@ export interface HandsFreeProps {
|
|
|
43
43
|
running?: boolean;
|
|
44
44
|
/** The agent's answer is being said. */
|
|
45
45
|
speaking?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* How loud the agent's voice plays now, between 0 and 1 (the speaker's
|
|
48
|
+
* `level`): while it speaks, speech counts as barge-in only above what the
|
|
49
|
+
* playback can leave in the microphone (VO-13, `heardOverPlayback`).
|
|
50
|
+
*/
|
|
51
|
+
playbackLevel?: () => number;
|
|
46
52
|
/** Stops the agent's voice at once (barge-in, VO-13). */
|
|
47
53
|
onStopSpeaking?: () => void;
|
|
48
54
|
/** Stops the run while the answer is still being written (barge-in, VO-13). */
|
|
@@ -51,5 +57,5 @@ export interface HandsFreeProps {
|
|
|
51
57
|
onInterrupted?: () => void;
|
|
52
58
|
disabled?: boolean;
|
|
53
59
|
}
|
|
54
|
-
export declare function HandsFree({ hearing, language, consentKey, microphoneId, turnSilenceMs, send, onInterim, running, speaking, onStopSpeaking, onStopRun, onInterrupted, disabled, }: HandsFreeProps): JSX.Element;
|
|
60
|
+
export declare function HandsFree({ hearing, language, consentKey, microphoneId, turnSilenceMs, send, onInterim, running, speaking, playbackLevel, onStopSpeaking, onStopRun, onInterrupted, disabled, }: HandsFreeProps): JSX.Element;
|
|
55
61
|
export default HandsFree;
|
package/lib/voice/HandsFree.js
CHANGED
|
@@ -8,7 +8,7 @@ import { HANDS_FREE_WORDS, IDLE_PAUSE_MS, TURN_SILENCE_MS, bargedIn, handsFreeSt
|
|
|
8
8
|
import { INTERIM_MS } from './VoiceInput';
|
|
9
9
|
/** Waits. */
|
|
10
10
|
const pause = (ms) => new Promise(resolve => setTimeout(resolve, ms));
|
|
11
|
-
export function HandsFree({ hearing, language, consentKey, microphoneId, turnSilenceMs = TURN_SILENCE_MS, send, onInterim, running = false, speaking = false, onStopSpeaking, onStopRun, onInterrupted, disabled = false, }) {
|
|
11
|
+
export function HandsFree({ hearing, language, consentKey, microphoneId, turnSilenceMs = TURN_SILENCE_MS, send, onInterim, running = false, speaking = false, playbackLevel, onStopSpeaking, onStopRun, onInterrupted, disabled = false, }) {
|
|
12
12
|
const [on, setOn] = useState(false);
|
|
13
13
|
const [paused, setPaused] = useState(false);
|
|
14
14
|
const [asking, setAsking] = useState(false);
|
|
@@ -22,6 +22,7 @@ export function HandsFree({ hearing, language, consentKey, microphoneId, turnSil
|
|
|
22
22
|
const latest = useRef({
|
|
23
23
|
send,
|
|
24
24
|
onInterim,
|
|
25
|
+
playbackLevel,
|
|
25
26
|
onStopSpeaking,
|
|
26
27
|
onStopRun,
|
|
27
28
|
onInterrupted,
|
|
@@ -29,6 +30,7 @@ export function HandsFree({ hearing, language, consentKey, microphoneId, turnSil
|
|
|
29
30
|
latest.current = {
|
|
30
31
|
send,
|
|
31
32
|
onInterim,
|
|
33
|
+
playbackLevel,
|
|
32
34
|
onStopSpeaking,
|
|
33
35
|
onStopRun,
|
|
34
36
|
onInterrupted,
|
|
@@ -118,7 +120,11 @@ export function HandsFree({ hearing, language, consentKey, microphoneId, turnSil
|
|
|
118
120
|
if (so.spoke) {
|
|
119
121
|
quietSince = Date.now();
|
|
120
122
|
}
|
|
121
|
-
|
|
123
|
+
const playing = latest.current.playbackLevel;
|
|
124
|
+
const levels = playing
|
|
125
|
+
? { microphone: open.level(), playback: playing() }
|
|
126
|
+
: undefined;
|
|
127
|
+
if (bargedIn(now, so, levels)) {
|
|
122
128
|
// The person speaks over the agent (VO-13): its voice and its run
|
|
123
129
|
// stop; what was heard goes on as the next turn.
|
|
124
130
|
latest.current.onStopSpeaking?.();
|
|
@@ -173,7 +179,6 @@ export function HandsFree({ hearing, language, consentKey, microphoneId, turnSil
|
|
|
173
179
|
capture.current = undefined;
|
|
174
180
|
};
|
|
175
181
|
// The loop reads the state through a ref: it is not restarted on it.
|
|
176
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
177
182
|
}, [on, paused, hearing, language, microphoneId, turnSilenceMs]);
|
|
178
183
|
// Esc pauses it.
|
|
179
184
|
useEffect(() => {
|
package/lib/voice/ReadAloud.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* *Read aloud*, under an answer (
|
|
2
|
+
* *Read aloud*, under an answer (VO-21, `on_request`): the answer,
|
|
3
3
|
* read as plain words and cut into sentences, given to the speaker — what it
|
|
4
4
|
* was saying stops first. The press is the gesture a browser plays sound
|
|
5
5
|
* after.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The microphone in the composer (
|
|
3
|
-
* to VO-68).
|
|
2
|
+
* The microphone in the composer (VO-10, VO-11, VO-61, VO-62, VO-65 to VO-68).
|
|
4
3
|
*
|
|
5
4
|
* Clicked, it listens: the words are written in the composer as they are
|
|
6
5
|
* heard (`onInterim`), and it stops at a second click, or once the person
|
package/lib/voice/VoiceMenu.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The composer's voice menu (
|
|
2
|
+
* The composer's voice menu (VO-14, VO-21, VO-25, VO-30): beside
|
|
3
3
|
* the microphone, what a person chooses for themselves — the language they
|
|
4
4
|
* speak and hear, when answers are heard, the voice, its speed and loudness,
|
|
5
5
|
* how long they pause before they are done (VO-69), *Send what I say*, the
|
package/lib/voice/captions.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Captions always (
|
|
2
|
+
* Captions always (VO-65): the sentence being said is marked in the
|
|
3
3
|
* open conversation, not by colour alone. The answer that holds it is marked
|
|
4
4
|
* `aria-current` and `data-voice-saying` with a bar beside it; the sentence
|
|
5
5
|
* itself is underlined in place through the CSS Custom Highlight API, which
|
package/lib/voice/captions.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* Captions always (
|
|
6
|
+
* Captions always (VO-65): the sentence being said is marked in the
|
|
7
7
|
* open conversation, not by colour alone. The answer that holds it is marked
|
|
8
8
|
* `aria-current` and `data-voice-saying` with a bar beside it; the sentence
|
|
9
9
|
* itself is underlined in place through the CSS Custom Highlight API, which
|
package/lib/voice/capture.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The microphone, for one press (
|
|
2
|
+
* The microphone, for one press (VO-10, VO-62): opened by a
|
|
3
3
|
* gesture, shown while open, closed when the press ends or is cancelled.
|
|
4
4
|
* What it heard is kept in memory only, until it is transcribed.
|
|
5
5
|
*
|
package/lib/voice/capture.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* The microphone, for one press (
|
|
6
|
+
* The microphone, for one press (VO-10, VO-62): opened by a
|
|
7
7
|
* gesture, shown while open, closed when the press ends or is cancelled.
|
|
8
8
|
* What it heard is kept in memory only, until it is transcribed.
|
|
9
9
|
*
|
package/lib/voice/chatVoice.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ export declare function chatVoiceOf(spec: AppVoiceSpec | undefined, place: ChatV
|
|
|
46
46
|
* its runtime (VO-37, VO-19): the token its host gave, else the chat's own —
|
|
47
47
|
* a visitor's token minted from ai-inference, an embed's token, or the
|
|
48
48
|
* person's. One token for the conversation and its voice, never a second.
|
|
49
|
-
* An embed's deployment is the one its token names
|
|
49
|
+
* An embed's deployment is the one its token names: the page
|
|
50
50
|
* says none.
|
|
51
51
|
*/
|
|
52
52
|
export declare function voiceAskedAs(voice: ChatVoice | undefined, token: string | undefined): ChatVoice | undefined;
|
package/lib/voice/chatVoice.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* A chat's voice, from what an application or an agent says of it (
|
|
7
|
-
*
|
|
6
|
+
* A chat's voice, from what an application or an agent says of it (VO-41, VO-49):
|
|
7
|
+
* the `voice` a host gives `ChatBase`, `ChatFloating` or an
|
|
8
8
|
* application's workspace, with Datalayer's places filled in — the browser's
|
|
9
9
|
* models from Datalayer's CDN, the packages that hear loaded on first use.
|
|
10
10
|
*
|
|
@@ -68,7 +68,7 @@ export function chatVoiceOf(spec, place) {
|
|
|
68
68
|
* its runtime (VO-37, VO-19): the token its host gave, else the chat's own —
|
|
69
69
|
* a visitor's token minted from ai-inference, an embed's token, or the
|
|
70
70
|
* person's. One token for the conversation and its voice, never a second.
|
|
71
|
-
* An embed's deployment is the one its token names
|
|
71
|
+
* An embed's deployment is the one its token names: the page
|
|
72
72
|
* says none.
|
|
73
73
|
*/
|
|
74
74
|
export function voiceAskedAs(voice, token) {
|
package/lib/voice/choices.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* What a person may choose for their voice (
|
|
3
|
-
*
|
|
2
|
+
* What a person may choose for their voice (VO-14, VO-21, VO-25, VO-30),
|
|
3
|
+
* from the catalogue: the languages a voice speaks and the device
|
|
4
4
|
* hears, the voices of each, the speeds and loudnesses offered, and when
|
|
5
5
|
* answers are heard. Read by the composer's menu (`VoiceMenu`) and by a
|
|
6
6
|
* settings page, so both offer the same.
|
package/lib/voice/choices.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* What a person may choose for their voice (
|
|
7
|
-
*
|
|
6
|
+
* What a person may choose for their voice (VO-14, VO-21, VO-25, VO-30),
|
|
7
|
+
* from the catalogue: the languages a voice speaks and the device
|
|
8
8
|
* hears, the voices of each, the speeds and loudnesses offered, and when
|
|
9
9
|
* answers are heard. Read by the composer's menu (`VoiceMenu`) and by a
|
|
10
10
|
* settings page, so both offer the same.
|
package/lib/voice/consent.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* The person's yes to the microphone, asked once per application before the
|
|
7
|
-
* browser's own prompt (
|
|
7
|
+
* browser's own prompt (VO-61), and remembered where the page keeps
|
|
8
8
|
* its preferences. A page without storage asks again next time.
|
|
9
9
|
*
|
|
10
10
|
* @module voice/consent
|
package/lib/voice/handsFree.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* A conversation by voice, hands-free (
|
|
2
|
+
* A conversation by voice, hands-free (VO-12, VO-13): what the
|
|
3
3
|
* composer is doing at every moment, and when a turn ends or the person
|
|
4
4
|
* speaks over the agent. Pure: the component (`HandsFree`) keeps the
|
|
5
5
|
* microphone and the clock, this decides.
|
|
@@ -49,13 +49,38 @@ export interface HeardSoFarLike {
|
|
|
49
49
|
* turn's silence since (VO-12).
|
|
50
50
|
*/
|
|
51
51
|
export declare function turnEnded(heard: HeardSoFarLike, turnSilenceMs?: number): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* At most this share of what plays is taken to come back into the
|
|
54
|
+
* microphone once the browser's echo cancellation has done its part (VO-13),
|
|
55
|
+
* on the meters' own scales (the microphone's `Capture.level`, the speaker's
|
|
56
|
+
* `level`). A setting, not a measure yet: VO-52 measures it on a laptop's
|
|
57
|
+
* own speakers.
|
|
58
|
+
*/
|
|
59
|
+
export declare const ECHO_SHARE = 0.6;
|
|
60
|
+
/** How far above that echo the person's voice must be, on the meter's scale. */
|
|
61
|
+
export declare const VOICE_OVER_ECHO = 0.08;
|
|
62
|
+
/** How loud the microphone and the agent's voice are now, each between 0 and 1. */
|
|
63
|
+
export interface Levels {
|
|
64
|
+
microphone: number;
|
|
65
|
+
playback: number;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Whether the microphone holds more than the agent's own voice coming back
|
|
69
|
+
* (VO-13): nothing plays, or the microphone is louder than the echo the
|
|
70
|
+
* playback can leave by `VOICE_OVER_ECHO`.
|
|
71
|
+
*/
|
|
72
|
+
export declare function heardOverPlayback(levels: Levels, echoShare?: number): boolean;
|
|
52
73
|
/**
|
|
53
74
|
* Whether the person spoke over the agent (VO-13): speech found since the
|
|
54
75
|
* agent began answering, while it thinks or speaks. The microphone is opened
|
|
55
|
-
* anew when the agent begins, so what it holds
|
|
56
|
-
*
|
|
76
|
+
* anew when the agent begins, so what it holds came since; the browser's
|
|
77
|
+
* echo cancellation keeps most of the answer's sound out, and while the
|
|
78
|
+
* answer plays the VAD's speech counts only when the microphone is louder
|
|
79
|
+
* than what the playback can leave in it (`heardOverPlayback`) — when the
|
|
80
|
+
* levels are known. A host whose speaker gives no level (the browser's own
|
|
81
|
+
* voices) relies on echo cancellation alone.
|
|
57
82
|
*/
|
|
58
|
-
export declare function bargedIn(state: HandsFreeState, heard: HeardSoFarLike): boolean;
|
|
83
|
+
export declare function bargedIn(state: HandsFreeState, heard: HeardSoFarLike, levels?: Levels): boolean;
|
|
59
84
|
/** A message as the conversation holds it: enough to find the answer spoken over. */
|
|
60
85
|
export interface ConversationItemLike {
|
|
61
86
|
id: string;
|
package/lib/voice/handsFree.js
CHANGED
|
@@ -37,14 +37,42 @@ export function handsFreeState(inputs) {
|
|
|
37
37
|
export function turnEnded(heard, turnSilenceMs = TURN_SILENCE_MS) {
|
|
38
38
|
return heard.spoke && heard.silentMs >= turnSilenceMs;
|
|
39
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* At most this share of what plays is taken to come back into the
|
|
42
|
+
* microphone once the browser's echo cancellation has done its part (VO-13),
|
|
43
|
+
* on the meters' own scales (the microphone's `Capture.level`, the speaker's
|
|
44
|
+
* `level`). A setting, not a measure yet: VO-52 measures it on a laptop's
|
|
45
|
+
* own speakers.
|
|
46
|
+
*/
|
|
47
|
+
export const ECHO_SHARE = 0.6;
|
|
48
|
+
/** How far above that echo the person's voice must be, on the meter's scale. */
|
|
49
|
+
export const VOICE_OVER_ECHO = 0.08;
|
|
50
|
+
/**
|
|
51
|
+
* Whether the microphone holds more than the agent's own voice coming back
|
|
52
|
+
* (VO-13): nothing plays, or the microphone is louder than the echo the
|
|
53
|
+
* playback can leave by `VOICE_OVER_ECHO`.
|
|
54
|
+
*/
|
|
55
|
+
export function heardOverPlayback(levels, echoShare = ECHO_SHARE) {
|
|
56
|
+
if (levels.playback <= 0) {
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
return levels.microphone >= levels.playback * echoShare + VOICE_OVER_ECHO;
|
|
60
|
+
}
|
|
40
61
|
/**
|
|
41
62
|
* Whether the person spoke over the agent (VO-13): speech found since the
|
|
42
63
|
* agent began answering, while it thinks or speaks. The microphone is opened
|
|
43
|
-
* anew when the agent begins, so what it holds
|
|
44
|
-
*
|
|
64
|
+
* anew when the agent begins, so what it holds came since; the browser's
|
|
65
|
+
* echo cancellation keeps most of the answer's sound out, and while the
|
|
66
|
+
* answer plays the VAD's speech counts only when the microphone is louder
|
|
67
|
+
* than what the playback can leave in it (`heardOverPlayback`) — when the
|
|
68
|
+
* levels are known. A host whose speaker gives no level (the browser's own
|
|
69
|
+
* voices) relies on echo cancellation alone.
|
|
45
70
|
*/
|
|
46
|
-
export function bargedIn(state, heard) {
|
|
47
|
-
|
|
71
|
+
export function bargedIn(state, heard, levels) {
|
|
72
|
+
if (!(state === 'speaking' || state === 'thinking') || !heard.spoke) {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
return state !== 'speaking' || !levels || heardOverPlayback(levels);
|
|
48
76
|
}
|
|
49
77
|
/**
|
|
50
78
|
* The answer the person spoke over (VO-13): the agent's last message after
|
package/lib/voice/hearing.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export interface HeardSoFar {
|
|
|
23
23
|
silentMs: number;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
|
-
* What hears a press, wherever it runs
|
|
26
|
+
* What hears a press, wherever it runs: in the page (`DeviceHearing`)
|
|
27
27
|
* or on Datalayer's servers (`ServerHearing`).
|
|
28
28
|
*/
|
|
29
29
|
export interface Hearing {
|
package/lib/voice/hearing.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* Hearing on the device (
|
|
6
|
+
* Hearing on the device (VO-10, VO-14): what was said
|
|
7
7
|
* in one press, kept to its speech by Silero VAD and transcribed by the
|
|
8
8
|
* catalogue's model for the language — Moonshine for English, Whisper for
|
|
9
9
|
* French — in the page, with transformers.js. The audio never leaves the
|