@datalayer/agent-runtimes 1.5.51 → 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 -12
- package/lib/portable/hosts/agentClient.js +30 -10
- 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 +8 -1
- package/lib/portable/hosts/queue.js +17 -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
|
@@ -27,7 +27,7 @@ export type AppEmbedProps = {
|
|
|
27
27
|
font?: string;
|
|
28
28
|
/**
|
|
29
29
|
* The language the visitor reads it in, as BCP 47 tags it (`fr`, `pt-BR`):
|
|
30
|
-
* its translation into it and the chat's own words (
|
|
30
|
+
* its translation into it and the chat's own words (P-26). The
|
|
31
31
|
* visitor's browser's by default.
|
|
32
32
|
*/
|
|
33
33
|
language?: string;
|
|
@@ -40,14 +40,14 @@ export type AppEmbedProps = {
|
|
|
40
40
|
/** What its record is kept under, on Datalayer. */
|
|
41
41
|
instance?: AppInstance;
|
|
42
42
|
/**
|
|
43
|
-
* The embed token the host's server was issued for this visit (
|
|
43
|
+
* The embed token the host's server was issued for this visit (R-20):
|
|
44
44
|
* what the chat speaks to the application's session with on the
|
|
45
45
|
* agent-runtimes server that runs its deployment (`serverUrl`). It runs a
|
|
46
46
|
* session of that deployment, and reaches nothing else.
|
|
47
47
|
*/
|
|
48
48
|
embedToken?: string;
|
|
49
49
|
/**
|
|
50
|
-
* A conversation without an account (
|
|
50
|
+
* A conversation without an account (D-07, R-30): a public
|
|
51
51
|
* application run on the visitors' runtime, which the chat speaks to with
|
|
52
52
|
* a visitor's token it mints from ai-inference for that one application —
|
|
53
53
|
* what the element gives a public `app` with no token. Nothing is launched
|
|
@@ -55,7 +55,7 @@ export type AppEmbedProps = {
|
|
|
55
55
|
*/
|
|
56
56
|
visitors?: DatalayerVisitors;
|
|
57
57
|
/**
|
|
58
|
-
* Where its voice runs (
|
|
58
|
+
* Where its voice runs (VO-18): Datalayer's speech service and
|
|
59
59
|
* the browser's models, in every mode, when its Appspec's `interface.voice`
|
|
60
60
|
* is on — the microphone in its composer, its answers heard, asked with
|
|
61
61
|
* the conversation's own token. None, it is drawn without a voice.
|
|
@@ -76,14 +76,14 @@ export type AppEmbedProps = {
|
|
|
76
76
|
*/
|
|
77
77
|
plugins?: PluginRef[];
|
|
78
78
|
/**
|
|
79
|
-
* What the page gives the application (
|
|
79
|
+
* What the page gives the application (D-10): the values it passes,
|
|
80
80
|
* its functions, and what it is told — read for the names the Appspec
|
|
81
81
|
* gives under `deployment.embedded.host`.
|
|
82
82
|
*/
|
|
83
83
|
host?: AppEmbedHost;
|
|
84
84
|
/**
|
|
85
85
|
* Keep the visit's session in the host's storage, and pick it up again
|
|
86
|
-
* after the page reloads (
|
|
86
|
+
* after the page reloads (D-13); on by default. Off, the session
|
|
87
87
|
* lasts as long as the page.
|
|
88
88
|
*/
|
|
89
89
|
resume?: boolean;
|
|
@@ -98,7 +98,7 @@ export type EmbedSession = {
|
|
|
98
98
|
said?: string;
|
|
99
99
|
};
|
|
100
100
|
/**
|
|
101
|
-
* The visit's session, kept and picked up again (
|
|
101
|
+
* The visit's session, kept and picked up again (D-13): on the host's
|
|
102
102
|
* server with an embed token that names its visit, the session the chat
|
|
103
103
|
* opens is kept under the application and the visit — in the host's
|
|
104
104
|
* storage unless `resume` is off, in memory always — and, when the
|
|
@@ -114,7 +114,7 @@ export declare function useEmbedSession({ app, serverUrl, embedToken, resume, }:
|
|
|
114
114
|
resume?: boolean;
|
|
115
115
|
}): EmbedSession;
|
|
116
116
|
/**
|
|
117
|
-
* Window messages from the page (
|
|
117
|
+
* Window messages from the page (P-25): on the host's own server, the
|
|
118
118
|
* page is handed how to post one to the application's session
|
|
119
119
|
* (`host.onWindowPort`) — the session the chat goes on with, its uid known
|
|
120
120
|
* from its first message — and what the code answers is raised on the page
|
|
@@ -128,7 +128,7 @@ export declare function useWindowPort({ serverUrl, embedToken, session, host, }:
|
|
|
128
128
|
host?: AppEmbedHost;
|
|
129
129
|
}): EmbedSession;
|
|
130
130
|
/**
|
|
131
|
-
* The page and the application talking (
|
|
131
|
+
* The page and the application talking (D-10): the tools of the host
|
|
132
132
|
* the Appspec names, given to its agent through a chat-extras plugin made
|
|
133
133
|
* once — the page's newest values and functions read at each call — and
|
|
134
134
|
* `message` said to the page when an answer is done.
|
|
@@ -4,8 +4,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
4
4
|
* Distributed under the terms of the Modified BSD License.
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
|
-
* An application in another product's page, as a React component (
|
|
8
|
-
* D-07, D-09, D-11): what the `<datalayer-app>` element draws, and what a
|
|
7
|
+
* An application in another product's page, as a React component (D-07, D-09, D-11): what the `<datalayer-app>` element draws, and what a
|
|
9
8
|
* host that uses React mounts itself.
|
|
10
9
|
*
|
|
11
10
|
* Four modes, as the Appspec says (`deployment.embedded.mode`) or the host:
|
|
@@ -17,7 +16,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
17
16
|
* - **panel** — the conversation at the right edge of the page, at full
|
|
18
17
|
* height;
|
|
19
18
|
* - **assistant** — the application's character on the page, speaking in a
|
|
20
|
-
* balloon
|
|
19
|
+
* balloon: the one its Appspec names (`interface.assistant`), else
|
|
21
20
|
* the paper clip, looked up in what is contributed — Datalayer's four and
|
|
22
21
|
* the host's own plugins (T-24); an id nothing contributes is said, never
|
|
23
22
|
* replaced.
|
|
@@ -58,7 +57,7 @@ import { WINDOW_NOT_YET, embedSessionKey, postWindowMessage, reattachSession, se
|
|
|
58
57
|
import { onLoopWindowMessage } from '../../chat/base/loopWindow';
|
|
59
58
|
import { ChatLanguage, useChatWords } from '../../chat/ChatLanguage';
|
|
60
59
|
/**
|
|
61
|
-
* The visit's session, kept and picked up again (
|
|
60
|
+
* The visit's session, kept and picked up again (D-13): on the host's
|
|
62
61
|
* server with an embed token that names its visit, the session the chat
|
|
63
62
|
* opens is kept under the application and the visit — in the host's
|
|
64
63
|
* storage unless `resume` is off, in memory always — and, when the
|
|
@@ -125,7 +124,7 @@ export function useEmbedSession({ app, serverUrl, embedToken, resume = true, })
|
|
|
125
124
|
};
|
|
126
125
|
}
|
|
127
126
|
/**
|
|
128
|
-
* Window messages from the page (
|
|
127
|
+
* Window messages from the page (P-25): on the host's own server, the
|
|
129
128
|
* page is handed how to post one to the application's session
|
|
130
129
|
* (`host.onWindowPort`) — the session the chat goes on with, its uid known
|
|
131
130
|
* from its first message — and what the code answers is raised on the page
|
|
@@ -157,7 +156,7 @@ export function useWindowPort({ serverUrl, embedToken, session, host, }) {
|
|
|
157
156
|
throw new Error(WINDOW_NOT_YET);
|
|
158
157
|
}
|
|
159
158
|
// What its code answers comes on the ui socket, raised as any
|
|
160
|
-
// window message is (
|
|
159
|
+
// window message is (RU-W).
|
|
161
160
|
await postWindowMessage({
|
|
162
161
|
serverUrl,
|
|
163
162
|
uid: uid.current,
|
|
@@ -176,7 +175,7 @@ function SessionSaid({ said }) {
|
|
|
176
175
|
/** No plugins for the renderer: one array, so that it never reads as a change. */
|
|
177
176
|
const NO_HOST_PLUGINS = [];
|
|
178
177
|
/**
|
|
179
|
-
* The page and the application talking (
|
|
178
|
+
* The page and the application talking (D-10): the tools of the host
|
|
180
179
|
* the Appspec names, given to its agent through a chat-extras plugin made
|
|
181
180
|
* once — the page's newest values and functions read at each call — and
|
|
182
181
|
* `message` said to the page when an answer is done.
|
|
@@ -186,7 +185,7 @@ export function useHostBridge(app, host) {
|
|
|
186
185
|
hostRef.current = host;
|
|
187
186
|
const bridge = app.deployment.embedded?.host;
|
|
188
187
|
const key = JSON.stringify([bridge ?? null, app.rules, app.connections]);
|
|
189
|
-
// The host's plugin (
|
|
188
|
+
// The host's plugin (RU-7): the page's functions as its
|
|
190
189
|
// commands, named for the agent by its agent tools bundle — made again
|
|
191
190
|
// when what the Appspec names, or the rules that decide them, change.
|
|
192
191
|
const hosting = useMemo(() => hostPlugin(app, () => hostRef.current ?? {}),
|
|
@@ -215,7 +214,7 @@ export function useHostBridge(app, host) {
|
|
|
215
214
|
const plugins = useMemo(() => hosting
|
|
216
215
|
? [hosting, ...(userPlugin ? [userPlugin] : [])]
|
|
217
216
|
: NO_HOST_PLUGINS, [hosting, userPlugin]);
|
|
218
|
-
// What its code tells the page during a turn (
|
|
217
|
+
// What its code tells the page during a turn (P-25), raised on it.
|
|
219
218
|
useEffect(() => onLoopWindowMessage(data => hostRef.current?.onEvent?.({
|
|
220
219
|
type: 'window-message',
|
|
221
220
|
detail: { data },
|
|
@@ -258,7 +257,7 @@ export function embedAssistantCharacter(app, plugins = NO_PLUGINS) {
|
|
|
258
257
|
return assistantCharacterFor(assistantCharactersFrom([AssistantCharactersPlugin, ...plugins]), { app: app.interface.assistant });
|
|
259
258
|
}
|
|
260
259
|
/** What a floating application says to a visitor Datalayer does not know. */
|
|
261
|
-
export const signedOutSentence = (app) => `${app.name} runs on Datalayer, which needs you signed in. An application embedded for visitors who are not needs its embed token (
|
|
260
|
+
export const signedOutSentence = (app) => `${app.name} runs on Datalayer, which needs you signed in. An application embedded for visitors who are not needs its embed token (D-14), or an agent-runtimes server of the host's own (the "server" attribute).`;
|
|
262
261
|
/** The application's face, as the floating window's button and header draw it. */
|
|
263
262
|
function Face({ emoji }) {
|
|
264
263
|
// In Fluent Emoji, at a line's size (T-19, T-20).
|
|
@@ -49,8 +49,7 @@ export type LoopEmbedProps = LoopPresetOptions & {
|
|
|
49
49
|
*/
|
|
50
50
|
frameHeight?: number | string;
|
|
51
51
|
/**
|
|
52
|
-
* The sidebar as a rail of line icons, one panel shown at a time (
|
|
53
|
-
* T-07). See `LoopWorkspaceProps.sidebarRail`.
|
|
52
|
+
* The sidebar as a rail of line icons, one panel shown at a time (T-07). See `LoopWorkspaceProps.sidebarRail`.
|
|
54
53
|
*/
|
|
55
54
|
sidebarRail?: boolean;
|
|
56
55
|
/**
|
|
@@ -60,7 +59,7 @@ export type LoopEmbedProps = LoopPresetOptions & {
|
|
|
60
59
|
* window's title bar, a panel of its own, a command. Without this a host
|
|
61
60
|
* would have to rebuild the plugin list to add one thing to it, which is the
|
|
62
61
|
* assembly this component exists to save. An extension groups some of
|
|
63
|
-
* them, as an application's own plugins are (`AppRenderer`,
|
|
62
|
+
* them, as an application's own plugins are (`AppRenderer`, F-15).
|
|
64
63
|
*/
|
|
65
64
|
plugins?: PlatformInput[];
|
|
66
65
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* The element's module (
|
|
6
|
+
* The element's module (D-08): it defines `<datalayer-app>` and nothing
|
|
7
7
|
* else. Built on its own by `npm run build:embed` (`vite.embed.config.ts`)
|
|
8
8
|
* into `dist-embed/datalayer-app-main.js`, with the chunks it imports under
|
|
9
9
|
* `dist-embed/chunks/` and the stylesheet the element links into its shadow
|
|
@@ -5,7 +5,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
7
|
* `<datalayer-app>`: an application in another product's page, as one
|
|
8
|
-
* script tag and one element (
|
|
8
|
+
* script tag and one element (D-08), in the mode its Appspec says
|
|
9
9
|
* (D-07), its theme isolated from the host's and overridable in the three
|
|
10
10
|
* ways that matter (T-13, D-11).
|
|
11
11
|
*
|
|
@@ -19,7 +19,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
19
19
|
* 2. an Appspec at an address (`spec="https://…/support-desk.yaml"`);
|
|
20
20
|
* 3. an application on Datalayer (`app`), read with its embed token
|
|
21
21
|
* (`token`), or — with no token — a public one read as a visitor
|
|
22
|
-
* without an account reads it (
|
|
22
|
+
* without an account reads it (D-07, R-30, `visitorApp`): an
|
|
23
23
|
* example Datalayer keeps warm for visitors, or an application at its
|
|
24
24
|
* address that its owner lets anybody talk to. The conversation then
|
|
25
25
|
* runs on the visitors' runtime with a visitor's token the chat mints
|
|
@@ -36,19 +36,19 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
36
36
|
* drawn in it, so nothing of the application's styles reaches the page and
|
|
37
37
|
* nothing of the page's reaches the application.
|
|
38
38
|
*
|
|
39
|
-
* The page and the application talk (
|
|
39
|
+
* The page and the application talk (D-10), for the names its Appspec
|
|
40
40
|
* gives under `deployment.embedded.host`: the page sets `element.context`
|
|
41
41
|
* (`{ user, page, …its own }`), which its agent reads with `host_context`,
|
|
42
42
|
* and `element.functions` (`{ open_ticket: async args => … }`), which its
|
|
43
43
|
* agent calls as `host_open_ticket`, each as the rule naming it decides; the
|
|
44
44
|
* element raises `message` when the application has answered and `action`
|
|
45
45
|
* when it called a function of the page, beside `decision` and
|
|
46
|
-
* `token-expired`. Who its user is, when it matters (
|
|
46
|
+
* `token-expired`. Who its user is, when it matters (D-21): the page
|
|
47
47
|
* sets `user-token` (or `element.userToken`) to the token its server signed
|
|
48
48
|
* naming the user, sent with every run of an application that says
|
|
49
49
|
* `user: signed`.
|
|
50
50
|
*
|
|
51
|
-
* Window messages (
|
|
51
|
+
* Window messages (P-25), on the host's own server: the element raises
|
|
52
52
|
* `window-message` (`detail.data`) when the application's code tells the page
|
|
53
53
|
* something outside the conversation (`session.send_window_message`), and
|
|
54
54
|
* `element.postWindowMessage(data)` hands the page's to its `@app.window`.
|
|
@@ -56,7 +56,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
56
56
|
* On the host's server (`server`) with the visit's embed token, the
|
|
57
57
|
* session the application opens is kept in the page's `localStorage`, under
|
|
58
58
|
* the application and the visit its token names, and picked up again after
|
|
59
|
-
* the page reloads — its conversation drawn again (
|
|
59
|
+
* the page reloads — its conversation drawn again (D-13); a token
|
|
60
60
|
* renewed for the visit redraws the application on the same session.
|
|
61
61
|
* `resume="false"` keeps nothing in the page's storage.
|
|
62
62
|
*
|
|
@@ -167,8 +167,8 @@ export async function readEmbeddedApp({ api, origin, app, token, fetcher = fetch
|
|
|
167
167
|
if (spec.kind === 'decision') {
|
|
168
168
|
return { kind: 'frame', src: frameSrcOf(origin, app, token) };
|
|
169
169
|
}
|
|
170
|
-
// The visit runs the deployment its token names, and no other
|
|
171
|
-
//
|
|
170
|
+
// The visit runs the deployment its token names, and no other:
|
|
171
|
+
// a token naming none is refused before anything is drawn.
|
|
172
172
|
if (!embedTokenDeployment(token)) {
|
|
173
173
|
return { kind: 'said', text: EMBED_TOKEN_NAMES_NO_DEPLOYMENT };
|
|
174
174
|
}
|
|
@@ -240,7 +240,7 @@ export function defineDatalayerAppElement(options = {}) {
|
|
|
240
240
|
this.passed = { ...(value ?? {}) };
|
|
241
241
|
}
|
|
242
242
|
/**
|
|
243
|
-
* Post a window message to the application (
|
|
243
|
+
* Post a window message to the application (P-25): its code's
|
|
244
244
|
* `@app.window` reads it, and what it answers is raised as
|
|
245
245
|
* `window-message` events. Refused, in a sentence, before its
|
|
246
246
|
* conversation has started or off the host's own server.
|
|
@@ -281,7 +281,7 @@ export function defineDatalayerAppElement(options = {}) {
|
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
/**
|
|
284
|
-
* The token the host's server signed naming its user (
|
|
284
|
+
* The token the host's server signed naming its user (D-21), the
|
|
285
285
|
* `user-token` attribute's: what an application that says `user: signed`
|
|
286
286
|
* opens its session with. Set it to hand a new one over.
|
|
287
287
|
*/
|
|
@@ -544,7 +544,7 @@ export function defineDatalayerAppElement(options = {}) {
|
|
|
544
544
|
this.root = createRoot(mount);
|
|
545
545
|
const server = this.getAttribute('server') || undefined;
|
|
546
546
|
this.root.render(_jsx(StyleSheetManager, { target: shadow, children: _jsx(AppEmbed, { app: source.app, mode: look.mode, accent: look.accent, colorMode: look.colorMode, font: look.font, serverUrl: server, ...(server && this.token ? { embedToken: this.token } : {}), ...(source.visitors ? { visitors: source.visitors } : {}),
|
|
547
|
-
// Its voice, when its Appspec says one (
|
|
547
|
+
// Its voice, when its Appspec says one (VO-18): ai-agents'
|
|
548
548
|
// speech service; the microphone needs the page's
|
|
549
549
|
// Permissions-Policy to allow it.
|
|
550
550
|
speech: this.speech, height: inlineHeightOf(this.getAttribute('height')), ownPortal: true, host: this.host,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* An application in another product's page, as its host writes it (
|
|
3
|
-
* D-07, D-08, D-11, T-13): one script tag and one element, `<datalayer-app>`,
|
|
2
|
+
* An application in another product's page, as its host writes it (D-07, D-08, D-11, T-13): one script tag and one element, `<datalayer-app>`,
|
|
4
3
|
* whose attributes — or, for the theme, the host's CSS variables — say what
|
|
5
4
|
* it shows and how it looks.
|
|
6
5
|
*
|
|
@@ -40,13 +39,13 @@ export declare const EMBED_ATTRIBUTES: {
|
|
|
40
39
|
};
|
|
41
40
|
export type EmbedAttribute = keyof typeof EMBED_ATTRIBUTES;
|
|
42
41
|
/**
|
|
43
|
-
* The deployment an embed token names
|
|
42
|
+
* The deployment an embed token names: the embedded
|
|
44
43
|
* deployment its owner's server asked it for. Read without vouching for it —
|
|
45
44
|
* the services that take the token verify it — and the only place the
|
|
46
45
|
* element learns its deployment: it takes no attribute for one.
|
|
47
46
|
*/
|
|
48
47
|
export declare function embedTokenDeployment(token: string): string | undefined;
|
|
49
|
-
/** What an embed token naming no deployment is told
|
|
48
|
+
/** What an embed token naming no deployment is told. */
|
|
50
49
|
export declare const EMBED_TOKEN_NAMES_NO_DEPLOYMENT = "datalayer-app: the embed token names no deployment. Your server asks for one naming the application\u2019s embedded deployment: POST \u2026/api/spacer/v1/apps/<id>/embed-token with {\"deployment\": \"<its uid>\"}.";
|
|
51
50
|
/** Every attribute the element watches. */
|
|
52
51
|
export declare const EMBED_OBSERVED_ATTRIBUTES: EmbedAttribute[];
|
|
@@ -68,7 +67,7 @@ export type EmbedFloatingView = 'floating-small' | 'panel' | 'assistant';
|
|
|
68
67
|
* The four modes (D-07), and the chat they float in: a **bubble** is the
|
|
69
68
|
* round button that opens a popup — the copilot pattern; a **panel** is the
|
|
70
69
|
* conversation at the page's right edge, at full height; the **assistant** is
|
|
71
|
-
* the character that speaks in a balloon
|
|
70
|
+
* the character that speaks in a balloon. **Inline** has no chat of
|
|
72
71
|
* its own to float: the application, its page and its conversation, sit in
|
|
73
72
|
* the host's page where the element is.
|
|
74
73
|
*/
|
|
@@ -116,13 +115,12 @@ export type EmbedLook = {
|
|
|
116
115
|
*/
|
|
117
116
|
export declare function embedLookOf(inputs: EmbedInputs, app?: Pick<AppSpec, 'interface' | 'deployment'>): EmbedLook;
|
|
118
117
|
/**
|
|
119
|
-
* Whether a visit's conversation is picked up again after a reload (
|
|
120
|
-
* D-13): on unless the host writes `resume="false"`. Anything else is
|
|
118
|
+
* Whether a visit's conversation is picked up again after a reload (D-13): on unless the host writes `resume="false"`. Anything else is
|
|
121
119
|
* refused in a sentence.
|
|
122
120
|
*/
|
|
123
121
|
export declare function resumeOf(value: string | null | undefined): boolean;
|
|
124
122
|
/**
|
|
125
|
-
* The language a host says its visitor reads (
|
|
123
|
+
* The language a host says its visitor reads (P-26), checked: a BCP 47
|
|
126
124
|
* tag (`fr`, `pt-BR`), else refused in a sentence. Unsaid, none: the
|
|
127
125
|
* visitor's browser's.
|
|
128
126
|
*/
|
|
@@ -142,7 +140,7 @@ export declare const EMBED_PROPERTIES: readonly ["context", "functions", "token"
|
|
|
142
140
|
* element sets them on an element not yet upgraded: each becomes a property
|
|
143
141
|
* of that object, which shadows the class's accessor once it is defined, and
|
|
144
142
|
* the application was never offered the page's functions (seen 2026-10-10,
|
|
145
|
-
*
|
|
143
|
+
* D-10: the run sent no tool). Called as the element is constructed.
|
|
146
144
|
*/
|
|
147
145
|
export declare function adoptPropertiesSetEarly(element: object, names?: readonly string[]): string[];
|
|
148
146
|
/** What a snippet says beside the application's id. */
|
|
@@ -159,7 +157,7 @@ export type EmbedSnippetOptions = {
|
|
|
159
157
|
theme?: EmbedColorMode;
|
|
160
158
|
font?: string;
|
|
161
159
|
/**
|
|
162
|
-
* Its voice listens (
|
|
160
|
+
* Its voice listens (VO-18, `embedListens`): the snippet says that
|
|
163
161
|
* the page's `Permissions-Policy` must allow the microphone, which the
|
|
164
162
|
* element asks for in the page itself.
|
|
165
163
|
*/
|
|
@@ -30,7 +30,7 @@ export const EMBED_ATTRIBUTES = {
|
|
|
30
30
|
'user-token': 'A token your server signed with the deployment’s secret, naming your user (HS256: sub, name, exp at most an hour away): what an application that says user: signed opens its session with.',
|
|
31
31
|
};
|
|
32
32
|
/**
|
|
33
|
-
* The deployment an embed token names
|
|
33
|
+
* The deployment an embed token names: the embedded
|
|
34
34
|
* deployment its owner's server asked it for. Read without vouching for it —
|
|
35
35
|
* the services that take the token verify it — and the only place the
|
|
36
36
|
* element learns its deployment: it takes no attribute for one.
|
|
@@ -51,7 +51,7 @@ export function embedTokenDeployment(token) {
|
|
|
51
51
|
return undefined;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
/** What an embed token naming no deployment is told
|
|
54
|
+
/** What an embed token naming no deployment is told. */
|
|
55
55
|
export const EMBED_TOKEN_NAMES_NO_DEPLOYMENT = 'datalayer-app: the embed token names no deployment. Your server asks for one naming the application’s embedded deployment: POST …/api/spacer/v1/apps/<id>/embed-token with {"deployment": "<its uid>"}.';
|
|
56
56
|
/** Every attribute the element watches. */
|
|
57
57
|
export const EMBED_OBSERVED_ATTRIBUTES = Object.keys(EMBED_ATTRIBUTES);
|
|
@@ -70,7 +70,7 @@ export const EMBED_COLOR_MODES = ['light', 'dark', 'auto'];
|
|
|
70
70
|
* The four modes (D-07), and the chat they float in: a **bubble** is the
|
|
71
71
|
* round button that opens a popup — the copilot pattern; a **panel** is the
|
|
72
72
|
* conversation at the page's right edge, at full height; the **assistant** is
|
|
73
|
-
* the character that speaks in a balloon
|
|
73
|
+
* the character that speaks in a balloon. **Inline** has no chat of
|
|
74
74
|
* its own to float: the application, its page and its conversation, sit in
|
|
75
75
|
* the host's page where the element is.
|
|
76
76
|
*/
|
|
@@ -153,15 +153,14 @@ export function embedLookOf(inputs, app) {
|
|
|
153
153
|
return { mode, accent, colorMode, font, variant };
|
|
154
154
|
}
|
|
155
155
|
/**
|
|
156
|
-
* Whether a visit's conversation is picked up again after a reload (
|
|
157
|
-
* D-13): on unless the host writes `resume="false"`. Anything else is
|
|
156
|
+
* Whether a visit's conversation is picked up again after a reload (D-13): on unless the host writes `resume="false"`. Anything else is
|
|
158
157
|
* refused in a sentence.
|
|
159
158
|
*/
|
|
160
159
|
export function resumeOf(value) {
|
|
161
160
|
return (oneOf(value, ['true', 'false'], 'a value of resume') !== 'false');
|
|
162
161
|
}
|
|
163
162
|
/**
|
|
164
|
-
* The language a host says its visitor reads (
|
|
163
|
+
* The language a host says its visitor reads (P-26), checked: a BCP 47
|
|
165
164
|
* tag (`fr`, `pt-BR`), else refused in a sentence. Unsaid, none: the
|
|
166
165
|
* visitor's browser's.
|
|
167
166
|
*/
|
|
@@ -198,7 +197,7 @@ export const EMBED_PROPERTIES = ['context', 'functions', 'token'];
|
|
|
198
197
|
* element sets them on an element not yet upgraded: each becomes a property
|
|
199
198
|
* of that object, which shadows the class's accessor once it is defined, and
|
|
200
199
|
* the application was never offered the page's functions (seen 2026-10-10,
|
|
201
|
-
*
|
|
200
|
+
* D-10: the run sent no tool). Called as the element is constructed.
|
|
202
201
|
*/
|
|
203
202
|
export function adoptPropertiesSetEarly(element, names = EMBED_PROPERTIES) {
|
|
204
203
|
const adopted = [];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* An embedded application's conversation, picked up again after the host's
|
|
3
|
-
* page reloads (
|
|
3
|
+
* page reloads (D-13).
|
|
4
4
|
*
|
|
5
5
|
* The session an embed opened is kept by its uid in the host page's own
|
|
6
6
|
* storage, under the application and the visit its embed token names —
|
|
@@ -72,9 +72,9 @@ export declare function reattachSession({ serverUrl, uid, token, fetcher, }: {
|
|
|
72
72
|
/** Said when a window message is posted before the conversation has started. */
|
|
73
73
|
export declare const WINDOW_NOT_YET = "The application takes a window message once its conversation has started, on its own server (the \"server\" attribute).";
|
|
74
74
|
/**
|
|
75
|
-
* Post a window message to a session (
|
|
75
|
+
* Post a window message to a session (P-25): its code's `@app.window`
|
|
76
76
|
* runs on it. What the code tells the page back arrives on the
|
|
77
|
-
* conversation's ui socket (
|
|
77
|
+
* conversation's ui socket (RU-W), raised as any window message
|
|
78
78
|
* is; refused — the runtime's sentence — when the session or its code takes
|
|
79
79
|
* none.
|
|
80
80
|
*/
|
|
@@ -113,9 +113,9 @@ export async function reattachSession({ serverUrl, uid, token, fetcher = fetch,
|
|
|
113
113
|
/** Said when a window message is posted before the conversation has started. */
|
|
114
114
|
export const WINDOW_NOT_YET = 'The application takes a window message once its conversation has started, on its own server (the "server" attribute).';
|
|
115
115
|
/**
|
|
116
|
-
* Post a window message to a session (
|
|
116
|
+
* Post a window message to a session (P-25): its code's `@app.window`
|
|
117
117
|
* runs on it. What the code tells the page back arrives on the
|
|
118
|
-
* conversation's ui socket (
|
|
118
|
+
* conversation's ui socket (RU-W), raised as any window message
|
|
119
119
|
* is; refused — the runtime's sentence — when the session or its code takes
|
|
120
120
|
* none.
|
|
121
121
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* What no file the embed ships may hold (
|
|
2
|
+
* What no file the embed ships may hold (B-02): the PAP SDK's
|
|
3
3
|
* emitted-bundle test (`src/__tests__/canaries.test.mjs`, `EMBEDDED_SECRETS`)
|
|
4
4
|
* extended to the embed, a browser artifact anybody's page loads. Its build
|
|
5
5
|
* fails on a file holding one (`vite.embed.config.ts`), naming the kind and
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* What no file the embed ships may hold (
|
|
6
|
+
* What no file the embed ships may hold (B-02): the PAP SDK's
|
|
7
7
|
* emitted-bundle test (`src/__tests__/canaries.test.mjs`, `EMBEDDED_SECRETS`)
|
|
8
8
|
* extended to the embed, a browser artifact anybody's page loads. Its build
|
|
9
9
|
* fails on a file holding one (`vite.embed.config.ts`), naming the kind and
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The host page and an embedded application, talking (
|
|
2
|
+
* The host page and an embedded application, talking (D-10).
|
|
3
3
|
*
|
|
4
4
|
* In: the values the page passes — `user`, `page`, or names of its own —
|
|
5
5
|
* read by the application's agent with the tool `host_context`, only those
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* Out: what the application does, as events — `message` when it has said
|
|
9
9
|
* something, `action` when it called a function of the page,
|
|
10
10
|
* `window-message` when its code told the page something outside the
|
|
11
|
-
* conversation (
|
|
11
|
+
* conversation (P-25, `session.send_window_message`) — beside the
|
|
12
12
|
* `decision` and `token-expired` the element raises already.
|
|
13
13
|
*
|
|
14
14
|
* Window messages, in (P-25): the page posts one with
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* the host's own server (`server`), and what it answers comes back as
|
|
17
17
|
* `window-message` events.
|
|
18
18
|
*
|
|
19
|
-
* Who its user is (
|
|
19
|
+
* Who its user is (D-21): what the page says as `user` is a claim.
|
|
20
20
|
* An application whose Appspec says `deployment.embedded.host.user: signed`
|
|
21
21
|
* takes only a token the host's **server** signed with the deployment's
|
|
22
22
|
* secret (HS256: `sub`, `name`, `exp` at most an hour away), which the page
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
*
|
|
29
29
|
* Offered: the functions of the page its Appspec names
|
|
30
30
|
* (`deployment.embedded.host.functions`), as Reactor has a plugin offer
|
|
31
|
-
* what it does (
|
|
31
|
+
* what it does (RU-7): each a **command** of the host's plugin,
|
|
32
32
|
* `host.<name>` (`host.context` for the values it passes), and the plugin's
|
|
33
33
|
* **agent tools** bundle (`AgentTools`, id `host`) naming them for its agent
|
|
34
34
|
* as the tools `host_<name>` and `host_context` — which the chat turns into
|
|
@@ -68,21 +68,21 @@ export type HostEvent = {
|
|
|
68
68
|
};
|
|
69
69
|
} | {
|
|
70
70
|
type: 'window-message';
|
|
71
|
-
/** What its code told the page (
|
|
71
|
+
/** What its code told the page (P-25): anything JSON writes. */
|
|
72
72
|
detail: {
|
|
73
73
|
data: unknown;
|
|
74
74
|
};
|
|
75
75
|
};
|
|
76
|
-
/** Posts a window message to the application's session (
|
|
76
|
+
/** Posts a window message to the application's session (P-25). */
|
|
77
77
|
export type WindowPost = (data: unknown) => Promise<void>;
|
|
78
78
|
/** A function of the page, as the page gives it. */
|
|
79
79
|
export type HostFunction = (args: Record<string, unknown>) => unknown | Promise<unknown>;
|
|
80
|
-
/** What the page gives an embedded application (
|
|
80
|
+
/** What the page gives an embedded application (D-10). */
|
|
81
81
|
export type AppEmbedHost = {
|
|
82
82
|
/** What the page passes now: its visitor (`user`), itself (`page`), values of its own. */
|
|
83
83
|
context?: () => Record<string, unknown>;
|
|
84
84
|
/**
|
|
85
|
-
* The token the host's server signed naming its user (
|
|
85
|
+
* The token the host's server signed naming its user (D-21), read as
|
|
86
86
|
* each run is sent: what an application that says `user: signed` opens its
|
|
87
87
|
* session with. Never the deployment's secret.
|
|
88
88
|
*/
|
|
@@ -98,7 +98,7 @@ export type AppEmbedHost = {
|
|
|
98
98
|
ask?: (question: HostQuestion) => boolean | Promise<boolean>;
|
|
99
99
|
/**
|
|
100
100
|
* Handed how a window message is posted to the application's session once
|
|
101
|
-
* the embed can (
|
|
101
|
+
* the embed can (P-25) — on the host's own server, its conversation
|
|
102
102
|
* started — and `null` when it no longer can.
|
|
103
103
|
*/
|
|
104
104
|
onWindowPort?: (post: WindowPost | null) => void;
|
|
@@ -131,26 +131,26 @@ export type HostAnswer = {
|
|
|
131
131
|
};
|
|
132
132
|
type HostCommand = ReactorCommand<Record<string, unknown> | undefined, HostAnswer>;
|
|
133
133
|
/**
|
|
134
|
-
* The host plugin's commands (
|
|
134
|
+
* The host plugin's commands (RU-7): `host.context` when the
|
|
135
135
|
* Appspec names values, and `host.<name>` for each function it names, each
|
|
136
136
|
* decided by the rule naming its tool before the page is called. `host` is
|
|
137
137
|
* read at each call, so that what the page passes is the newest.
|
|
138
138
|
*/
|
|
139
139
|
export declare function hostCommands(app: Pick<AppSpec, 'name' | 'connections' | 'rules' | 'deployment'>, host: () => AppEmbedHost): HostCommand[];
|
|
140
140
|
/**
|
|
141
|
-
* The host plugin's agent tools (
|
|
141
|
+
* The host plugin's agent tools (RU-7): `host_context` and
|
|
142
142
|
* `host_<name>`, each running its command; `null` for an application the
|
|
143
143
|
* Appspec embeds with no host bridge.
|
|
144
144
|
*/
|
|
145
145
|
export declare function hostAgentTools(app: Pick<AppSpec, 'name' | 'deployment'>): AgentToolBundle | null;
|
|
146
146
|
/**
|
|
147
|
-
* The host's plugin (
|
|
147
|
+
* The host's plugin (RU-7): its commands, its agent tools bundle,
|
|
148
148
|
* and the chat extras that hand the bundle to the chat's agent wherever it
|
|
149
149
|
* runs. `null` for an application with no host bridge.
|
|
150
150
|
*/
|
|
151
151
|
export declare function hostPlugin(app: Pick<AppSpec, 'id' | 'name' | 'connections' | 'rules' | 'deployment'>, host: () => AppEmbedHost): ReactorPlugin<Record<string, never>, unknown, unknown> | null;
|
|
152
152
|
/**
|
|
153
|
-
* What goes with every run for the host's user (
|
|
153
|
+
* What goes with every run for the host's user (D-21): the token the
|
|
154
154
|
* host's server signed, as `forwardedProps.loop.user_token`, for an
|
|
155
155
|
* application that says `user: signed` — read at each run, so that the
|
|
156
156
|
* newest is sent; nothing when the page gives none, and the runtime refuses
|
|
@@ -165,7 +165,7 @@ export type SignedUserToken = {
|
|
|
165
165
|
};
|
|
166
166
|
/**
|
|
167
167
|
* Asks ai-agents to sign the person signed in to Datalayer as a deployment's
|
|
168
|
-
* user (
|
|
168
|
+
* user (D-21; A-18 to A-20), with their own token: what a
|
|
169
169
|
* surface that has no host server holding the deployment's secret — the
|
|
170
170
|
* VS Code extension, Jupyter AI Agents, Datalayer Desktop — sends as
|
|
171
171
|
* `forwardedProps.loop.user_token` with the runs of an application that
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* The host page and an embedded application, talking (
|
|
6
|
+
* The host page and an embedded application, talking (D-10).
|
|
7
7
|
*
|
|
8
8
|
* In: the values the page passes — `user`, `page`, or names of its own —
|
|
9
9
|
* read by the application's agent with the tool `host_context`, only those
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* Out: what the application does, as events — `message` when it has said
|
|
13
13
|
* something, `action` when it called a function of the page,
|
|
14
14
|
* `window-message` when its code told the page something outside the
|
|
15
|
-
* conversation (
|
|
15
|
+
* conversation (P-25, `session.send_window_message`) — beside the
|
|
16
16
|
* `decision` and `token-expired` the element raises already.
|
|
17
17
|
*
|
|
18
18
|
* Window messages, in (P-25): the page posts one with
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* the host's own server (`server`), and what it answers comes back as
|
|
21
21
|
* `window-message` events.
|
|
22
22
|
*
|
|
23
|
-
* Who its user is (
|
|
23
|
+
* Who its user is (D-21): what the page says as `user` is a claim.
|
|
24
24
|
* An application whose Appspec says `deployment.embedded.host.user: signed`
|
|
25
25
|
* takes only a token the host's **server** signed with the deployment's
|
|
26
26
|
* secret (HS256: `sub`, `name`, `exp` at most an hour away), which the page
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
*
|
|
33
33
|
* Offered: the functions of the page its Appspec names
|
|
34
34
|
* (`deployment.embedded.host.functions`), as Reactor has a plugin offer
|
|
35
|
-
* what it does (
|
|
35
|
+
* what it does (RU-7): each a **command** of the host's plugin,
|
|
36
36
|
* `host.<name>` (`host.context` for the values it passes), and the plugin's
|
|
37
37
|
* **agent tools** bundle (`AgentTools`, id `host`) naming them for its agent
|
|
38
38
|
* as the tools `host_<name>` and `host_context` — which the chat turns into
|
|
@@ -70,7 +70,7 @@ export const hostCommand = (name) => `host.${name}`;
|
|
|
70
70
|
/** The id of the host plugin's agent tools bundle. */
|
|
71
71
|
export const HOST_TOOLS_BUNDLE = 'host';
|
|
72
72
|
/**
|
|
73
|
-
* The host plugin's commands (
|
|
73
|
+
* The host plugin's commands (RU-7): `host.context` when the
|
|
74
74
|
* Appspec names values, and `host.<name>` for each function it names, each
|
|
75
75
|
* decided by the rule naming its tool before the page is called. `host` is
|
|
76
76
|
* read at each call, so that what the page passes is the newest.
|
|
@@ -159,7 +159,7 @@ export function hostCommands(app, host) {
|
|
|
159
159
|
return commands;
|
|
160
160
|
}
|
|
161
161
|
/**
|
|
162
|
-
* The host plugin's agent tools (
|
|
162
|
+
* The host plugin's agent tools (RU-7): `host_context` and
|
|
163
163
|
* `host_<name>`, each running its command; `null` for an application the
|
|
164
164
|
* Appspec embeds with no host bridge.
|
|
165
165
|
*/
|
|
@@ -193,7 +193,7 @@ export function hostAgentTools(app) {
|
|
|
193
193
|
});
|
|
194
194
|
}
|
|
195
195
|
/**
|
|
196
|
-
* The host's plugin (
|
|
196
|
+
* The host's plugin (RU-7): its commands, its agent tools bundle,
|
|
197
197
|
* and the chat extras that hand the bundle to the chat's agent wherever it
|
|
198
198
|
* runs. `null` for an application with no host bridge.
|
|
199
199
|
*/
|
|
@@ -220,7 +220,7 @@ export function hostPlugin(app, host) {
|
|
|
220
220
|
});
|
|
221
221
|
}
|
|
222
222
|
/**
|
|
223
|
-
* What goes with every run for the host's user (
|
|
223
|
+
* What goes with every run for the host's user (D-21): the token the
|
|
224
224
|
* host's server signed, as `forwardedProps.loop.user_token`, for an
|
|
225
225
|
* application that says `user: signed` — read at each run, so that the
|
|
226
226
|
* newest is sent; nothing when the page gives none, and the runtime refuses
|
|
@@ -241,7 +241,7 @@ export function hostUserRunProps(app, host) {
|
|
|
241
241
|
}
|
|
242
242
|
/**
|
|
243
243
|
* Asks ai-agents to sign the person signed in to Datalayer as a deployment's
|
|
244
|
-
* user (
|
|
244
|
+
* user (D-21; A-18 to A-20), with their own token: what a
|
|
245
245
|
* surface that has no host server holding the deployment's secret — the
|
|
246
246
|
* VS Code extension, Jupyter AI Agents, Datalayer Desktop — sends as
|
|
247
247
|
* `forwardedProps.loop.user_token` with the runs of an application that
|