@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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* An approval as every card says it (
|
|
6
|
+
* An approval as every card says it (M-016): the shared controller
|
|
7
7
|
* and prop contract under the web's *Waiting for you* and Datalayer Mobile's
|
|
8
8
|
* Inbox and detail. A message to send is shown whole — its recipients,
|
|
9
9
|
* subject and body — and anything else is every argument the tool gave,
|
|
@@ -38,7 +38,7 @@ export type ApprovalArgs = {
|
|
|
38
38
|
tool_args?: Record<string, unknown>;
|
|
39
39
|
toolArgs?: Record<string, unknown>;
|
|
40
40
|
};
|
|
41
|
-
/** A message it asks to send, as the approval carries it, whole (
|
|
41
|
+
/** A message it asks to send, as the approval carries it, whole (W-05). */
|
|
42
42
|
export type MessageAsked = {
|
|
43
43
|
to: string;
|
|
44
44
|
cc: string;
|
|
@@ -51,7 +51,7 @@ export type MessageAsked = {
|
|
|
51
51
|
replies: boolean;
|
|
52
52
|
};
|
|
53
53
|
/**
|
|
54
|
-
* The message a send asks for, to show whole before *Approve* (
|
|
54
|
+
* The message a send asks for, to show whole before *Approve* (W-05):
|
|
55
55
|
* an approval whose arguments say to whom and what. `null` for anything else.
|
|
56
56
|
*/
|
|
57
57
|
export declare function messageOfApproval(approval: ApprovalArgs): MessageAsked | null;
|
|
@@ -78,7 +78,7 @@ const addressed = (value) => Array.isArray(value)
|
|
|
78
78
|
? value
|
|
79
79
|
: '';
|
|
80
80
|
/**
|
|
81
|
-
* The message a send asks for, to show whole before *Approve* (
|
|
81
|
+
* The message a send asks for, to show whole before *Approve* (W-05):
|
|
82
82
|
* an approval whose arguments say to whom and what. `null` for anything else.
|
|
83
83
|
*/
|
|
84
84
|
export function messageOfApproval(approval) {
|
|
@@ -98,7 +98,7 @@ export type ConversationItem = {
|
|
|
98
98
|
codeError: ToolCodeError | null;
|
|
99
99
|
/** The exit code its code ended with (`sys.exit`), or `null`. */
|
|
100
100
|
exitCode: number | null;
|
|
101
|
-
/** The protocol display its result carries, read strictly (`portable/displays`,
|
|
101
|
+
/** The protocol display its result carries, read strictly (`portable/displays`, M-037). */
|
|
102
102
|
display: ProtocolDisplay | null;
|
|
103
103
|
} | {
|
|
104
104
|
kind: 'step';
|
|
@@ -154,7 +154,7 @@ export declare function questionOf(raw: unknown): ConversationQuestion | null;
|
|
|
154
154
|
/**
|
|
155
155
|
* A coding agent's row said again while it runs (the runtime's AG-UI
|
|
156
156
|
* stream, `agent_runtimes.transports.agui_stream`): a terminal's output so
|
|
157
|
-
* far rides it in `_meta["reactor.ui/display"]` (
|
|
157
|
+
* far rides it in `_meta["reactor.ui/display"]` (SH-13, SH-16).
|
|
158
158
|
*/
|
|
159
159
|
export declare const HARNESS_TOOL_CALL = "datalayer.harness.tool_call";
|
|
160
160
|
/** The person's prompt, added before it is sent: its own row. */
|
|
@@ -162,7 +162,7 @@ function noted(state, event) {
|
|
|
162
162
|
/**
|
|
163
163
|
* A coding agent's row said again while it runs (the runtime's AG-UI
|
|
164
164
|
* stream, `agent_runtimes.transports.agui_stream`): a terminal's output so
|
|
165
|
-
* far rides it in `_meta["reactor.ui/display"]` (
|
|
165
|
+
* far rides it in `_meta["reactor.ui/display"]` (SH-13, SH-16).
|
|
166
166
|
*/
|
|
167
167
|
export const HARNESS_TOOL_CALL = 'datalayer.harness.tool_call';
|
|
168
168
|
/** A running row given the display its update carries; `null` when it carries none. */
|
package/lib/portable/direct.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* A Direct Conversation the person types in themselves (
|
|
3
|
-
*
|
|
2
|
+
* A Direct Conversation the person types in themselves (P-08,
|
|
3
|
+
* M-038): a linked sub-conversation under the one a company answered
|
|
4
4
|
* in, where the person's own words go to the company as `sender: human`,
|
|
5
5
|
* never through the application's model, until the company closes it.
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The protocol displays a run's tool results carry, read strictly for any
|
|
3
|
-
* renderer (
|
|
3
|
+
* renderer (M-037, RU-1): the page's half of a tool result
|
|
4
4
|
* — `_meta["reactor.ui/display"]`, as the runtime's AG-UI stream sends it
|
|
5
5
|
* beside the model's view — decoded into what a card draws.
|
|
6
6
|
*
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* where the conversation stands — participation.
|
|
19
19
|
* - **A handoff** (`pap_handoff`'s answer): handed to the company's people,
|
|
20
20
|
* or why not.
|
|
21
|
-
* - **A diff** (`…shield.diff+json
|
|
21
|
+
* - **A diff** (`…shield.diff+json`): what a coding agent
|
|
22
22
|
* changed in one file — its path, what it held, what it holds now, the
|
|
23
23
|
* file's language — drawn as a unified diff (`unifiedDiffLines`).
|
|
24
24
|
* - **A terminal** (`…shield.terminal+json`): what it ran — the command, the
|
package/lib/portable/displays.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* The protocol displays a run's tool results carry, read strictly for any
|
|
7
|
-
* renderer (
|
|
7
|
+
* renderer (M-037, RU-1): the page's half of a tool result
|
|
8
8
|
* — `_meta["reactor.ui/display"]`, as the runtime's AG-UI stream sends it
|
|
9
9
|
* beside the model's view — decoded into what a card draws.
|
|
10
10
|
*
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* where the conversation stands — participation.
|
|
23
23
|
* - **A handoff** (`pap_handoff`'s answer): handed to the company's people,
|
|
24
24
|
* or why not.
|
|
25
|
-
* - **A diff** (`…shield.diff+json
|
|
25
|
+
* - **A diff** (`…shield.diff+json`): what a coding agent
|
|
26
26
|
* changed in one file — its path, what it held, what it holds now, the
|
|
27
27
|
* file's language — drawn as a unified diff (`unifiedDiffLines`).
|
|
28
28
|
* - **A terminal** (`…shield.terminal+json`): what it ran — the command, the
|
|
@@ -321,7 +321,7 @@ const OUTCOME_LEADS = {
|
|
|
321
321
|
export const replyAuthor = (company, sender) => sender === 'human'
|
|
322
322
|
? `${company}, one of its people`
|
|
323
323
|
: `${company}, its agent`;
|
|
324
|
-
// -- a diff and a terminal (
|
|
324
|
+
// -- a diff and a terminal (SH-16) ------------------------------------
|
|
325
325
|
const countLines = (value) => value === '' ? 0 : value.split('\n').length - (value.endsWith('\n') ? 1 : 0);
|
|
326
326
|
/** A file's language from its suffix, the same table the runtime uses. */
|
|
327
327
|
const LANGUAGES = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A conversation with one row of every kind, and a question waiting: the
|
|
3
3
|
* fixture every renderer of `portable/views` is tested against — the web's
|
|
4
|
-
* and Datalayer Mobile's
|
|
4
|
+
* and Datalayer Mobile's — so that a change of a row's words or
|
|
5
5
|
* states is caught once.
|
|
6
6
|
*
|
|
7
7
|
* @module portable/fixtures
|
|
@@ -10,8 +10,8 @@ import { type ConversationState } from './conversation';
|
|
|
10
10
|
/** A fresh copy of the fixture conversation. */
|
|
11
11
|
/**
|
|
12
12
|
* A coding agent's diff and terminal, as the runtime sends them beside a tool
|
|
13
|
-
* result (`_meta["reactor.ui/display"]`,
|
|
14
|
-
* draws for
|
|
13
|
+
* result (`_meta["reactor.ui/display"]`, SH-16): what the phone
|
|
14
|
+
* draws for M-037, read by `protocolDisplayOf`.
|
|
15
15
|
*/
|
|
16
16
|
export declare function shieldDisplayFixtures(): {
|
|
17
17
|
diff: Record<string, unknown>;
|
|
@@ -21,7 +21,6 @@ export declare function conversationFixture(): ConversationState;
|
|
|
21
21
|
/**
|
|
22
22
|
* `GET /api/ai-agents/v1/apps/activity`'s answer for one application: a
|
|
23
23
|
* session in progress, a scheduled run, a completed one ended by Stop, and a
|
|
24
|
-
* next page — what the Studio's Activity and the phone's read alike (
|
|
25
|
-
* M-015b).
|
|
24
|
+
* next page — what the Studio's Activity and the phone's read alike (M-015b).
|
|
26
25
|
*/
|
|
27
26
|
export declare function activityFixture(): Record<string, unknown>;
|
package/lib/portable/fixtures.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* A conversation with one row of every kind, and a question waiting: the
|
|
7
7
|
* fixture every renderer of `portable/views` is tested against — the web's
|
|
8
|
-
* and Datalayer Mobile's
|
|
8
|
+
* and Datalayer Mobile's — so that a change of a row's words or
|
|
9
9
|
* states is caught once.
|
|
10
10
|
*
|
|
11
11
|
* @module portable/fixtures
|
|
@@ -15,8 +15,8 @@ import { RUN_END_WORDS } from './records';
|
|
|
15
15
|
/** A fresh copy of the fixture conversation. */
|
|
16
16
|
/**
|
|
17
17
|
* A coding agent's diff and terminal, as the runtime sends them beside a tool
|
|
18
|
-
* result (`_meta["reactor.ui/display"]`,
|
|
19
|
-
* draws for
|
|
18
|
+
* result (`_meta["reactor.ui/display"]`, SH-16): what the phone
|
|
19
|
+
* draws for M-037, read by `protocolDisplayOf`.
|
|
20
20
|
*/
|
|
21
21
|
export function shieldDisplayFixtures() {
|
|
22
22
|
return {
|
|
@@ -121,8 +121,7 @@ export function conversationFixture() {
|
|
|
121
121
|
/**
|
|
122
122
|
* `GET /api/ai-agents/v1/apps/activity`'s answer for one application: a
|
|
123
123
|
* session in progress, a scheduled run, a completed one ended by Stop, and a
|
|
124
|
-
* next page — what the Studio's Activity and the phone's read alike (
|
|
125
|
-
* M-015b).
|
|
124
|
+
* next page — what the Studio's Activity and the phone's read alike (M-015b).
|
|
126
125
|
*/
|
|
127
126
|
export function activityFixture() {
|
|
128
127
|
return {
|
|
@@ -38,8 +38,7 @@ export interface AgentClient<P> {
|
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
40
|
* Maps a session to its host place again, once the place changed after the
|
|
41
|
-
* turn started (
|
|
42
|
-
* once the answer is shown, so the target is PUT again with it).
|
|
41
|
+
* turn started (Discord's answer thread exists only once the answer is shown, so the target is PUT again with it).
|
|
43
42
|
*/
|
|
44
43
|
export interface SessionBinder<P> {
|
|
45
44
|
/** Whether the session was mapped: `false` where nothing binds (development's credentials). */
|
|
@@ -52,7 +51,7 @@ export type Place = Readonly<{
|
|
|
52
51
|
}>;
|
|
53
52
|
/**
|
|
54
53
|
* Where a turn comes from, as the session API takes it on the turn itself
|
|
55
|
-
* (`provenance`,
|
|
54
|
+
* (`provenance`, at most 1 KiB): the host's
|
|
56
55
|
* kind, the place, the thread and the message.
|
|
57
56
|
*/
|
|
58
57
|
export type TurnProvenance = Readonly<{
|
|
@@ -94,7 +93,7 @@ export interface HostCredentials<P> {
|
|
|
94
93
|
/** What the installation's key is, for a turn: `undefined` when it was never bound. */
|
|
95
94
|
export type HostKeyLookup<P> = (request: HostTurnRequest<P>) => Promise<string | undefined>;
|
|
96
95
|
/**
|
|
97
|
-
* The host credential exchange
|
|
96
|
+
* The host credential exchange: the installation's key and
|
|
98
97
|
* the host user it speaks for, exchanged at ai-agents for a fifteen-minute
|
|
99
98
|
* host token of the linked person and one deployment.
|
|
100
99
|
*/
|
|
@@ -138,7 +137,7 @@ export declare class DevelopmentCredentials<P> implements HostCredentials<P> {
|
|
|
138
137
|
constructor(apiUrl: string, token: string, fetchImplementation?: typeof fetch);
|
|
139
138
|
forTurn(request: HostTurnRequest<P>): Promise<HostSession>;
|
|
140
139
|
}
|
|
141
|
-
/** One of an application's starters (
|
|
140
|
+
/** One of an application's starters (S-104): the words shown, and the message it suggests asking. */
|
|
142
141
|
export type Starter = Readonly<{
|
|
143
142
|
label: string;
|
|
144
143
|
message: string;
|
|
@@ -148,7 +147,7 @@ export interface StarterSource<K> {
|
|
|
148
147
|
startersOf(key: K, externalUserId: string, applicationId: string): Promise<readonly Starter[]>;
|
|
149
148
|
}
|
|
150
149
|
/**
|
|
151
|
-
* An application's starters (
|
|
150
|
+
* An application's starters (S-104), read from its runtime as the
|
|
152
151
|
* linked person: the host credential exchange (no place: what is suggested
|
|
153
152
|
* is private to them), then `GET /api/v1/apps/current` beside the session
|
|
154
153
|
* API it answers. A runtime that does not answer starters is refused.
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* A chat host's turns on Datalayer: the host credential exchange, a turn
|
|
7
7
|
* started or sent on the deployment's session API (idempotent by the host's
|
|
8
8
|
* event id), its AG-UI stream reduced to semantic events, and its session
|
|
9
|
-
* mapped to the host's thread so approvals and completions are delivered
|
|
10
|
-
*
|
|
9
|
+
* mapped to the host's thread so approvals and completions are delivered.
|
|
10
|
+
* What is the host's own (its thread key, the
|
|
11
11
|
* session uid, the place, the delivery target, its words) is injected as a
|
|
12
|
-
* `HostShape`. Moved from the Slack service (
|
|
12
|
+
* `HostShape`. Moved from the Slack service (DC-004).
|
|
13
13
|
*
|
|
14
14
|
* @module portable/hosts/agentClient
|
|
15
15
|
*/
|
|
@@ -19,7 +19,7 @@ import { semanticOf, turnOf } from '../semanticOfAgUi';
|
|
|
19
19
|
import { HostRefusedError } from './client';
|
|
20
20
|
import { exchangeSchema, HOST_KEY_HEADER, IDEMPOTENCY_HEADER, } from './contracts';
|
|
21
21
|
/**
|
|
22
|
-
* The host credential exchange
|
|
22
|
+
* The host credential exchange: the installation's key and
|
|
23
23
|
* the host user it speaks for, exchanged at ai-agents for a fifteen-minute
|
|
24
24
|
* host token of the linked person and one deployment.
|
|
25
25
|
*/
|
|
@@ -143,7 +143,7 @@ const currentAppSchema = z.object({
|
|
|
143
143
|
starters: z.array(z.object({ label: z.string(), message: z.string() })),
|
|
144
144
|
});
|
|
145
145
|
/**
|
|
146
|
-
* An application's starters (
|
|
146
|
+
* An application's starters (S-104), read from its runtime as the
|
|
147
147
|
* linked person: the host credential exchange (no place: what is suggested
|
|
148
148
|
* is private to them), then `GET /api/v1/apps/current` beside the session
|
|
149
149
|
* API it answers. A runtime that does not answer starters is refused.
|
|
@@ -203,9 +203,9 @@ export async function* agUiEventsOf(body) {
|
|
|
203
203
|
}
|
|
204
204
|
/**
|
|
205
205
|
* The host's Datalayer client: a turn is started or sent on the deployment's
|
|
206
|
-
* session API (idempotent by the host's event id
|
|
206
|
+
* session API (idempotent by the host's event id), its AG-UI
|
|
207
207
|
* stream reduced to semantic events, and its session mapped to the host's
|
|
208
|
-
* thread so that approvals and completions are delivered
|
|
208
|
+
* thread so that approvals and completions are delivered.
|
|
209
209
|
*/
|
|
210
210
|
/** A refusal's `detail` when the answer is FastAPI's JSON, its status alone otherwise. */
|
|
211
211
|
async function refusalDetailOf(response) {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { ApprovalPresentation } from './contracts';
|
|
2
2
|
/**
|
|
3
|
-
* Typed approval renderers (
|
|
4
|
-
*
|
|
3
|
+
* Typed approval renderers (S-302).
|
|
4
|
+
* A host offers Approve and Reject only when a renderer that knows the
|
|
5
5
|
* tool proves that every material argument is shown: each argument the server
|
|
6
6
|
* presented is named by the renderer, or the card fails closed. An unknown
|
|
7
7
|
* tool, an argument the renderer does not know, an attachment, and every
|
|
8
8
|
* action that is not mail (reads, writes, other sends, destructive, financial,
|
|
9
|
-
* publishing, executing) are reviewed in Datalayer (
|
|
10
|
-
*
|
|
9
|
+
* publishing, executing) are reviewed in Datalayer (decided by the user on 16 October 2026: mail only).
|
|
10
|
+
* They render ai-agents' presentation v1, a different input
|
|
11
11
|
* from `../approvals.ts` and `../approvalCard.ts`. Moved from the Slack
|
|
12
|
-
* service (
|
|
12
|
+
* service (DC-004).
|
|
13
13
|
*
|
|
14
14
|
* @module portable/hosts/approvalRenderers
|
|
15
15
|
*/
|
|
@@ -34,8 +34,7 @@ type Renderer = Readonly<{
|
|
|
34
34
|
}>;
|
|
35
35
|
/**
|
|
36
36
|
* Action classes that are decided in Datalayer only: every class but `send`,
|
|
37
|
-
* since only mail is decided in a host (decided by the user on 16 October
|
|
38
|
-
* 2026, SLACK §15, 5).
|
|
37
|
+
* since only mail is decided in a host (decided by the user on 16 October 2026).
|
|
39
38
|
*/
|
|
40
39
|
export declare const DATALAYER_ONLY: Set<"unknown" | "read" | "write" | "send" | "delete" | "publish" | "execute" | "financial">;
|
|
41
40
|
/** The words of a tool's name that make a send mail: contracts.json `mail_words`. */
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* Action classes that are decided in Datalayer only: every class but `send`,
|
|
7
|
-
* since only mail is decided in a host (decided by the user on 16 October
|
|
8
|
-
* 2026, SLACK §15, 5).
|
|
7
|
+
* since only mail is decided in a host (decided by the user on 16 October 2026).
|
|
9
8
|
*/
|
|
10
9
|
export const DATALAYER_ONLY = new Set([
|
|
11
10
|
'read',
|
|
@@ -99,7 +98,7 @@ const mail = {
|
|
|
99
98
|
return rendered('mail', presentation, fields, MAIL_KEYS, extra);
|
|
100
99
|
},
|
|
101
100
|
};
|
|
102
|
-
/** Everything but mail: shown, decided only in Datalayer
|
|
101
|
+
/** Everything but mail: shown, decided only in Datalayer. */
|
|
103
102
|
const datalayerOnly = {
|
|
104
103
|
name: 'datalayer-only',
|
|
105
104
|
matches: presentation => DATALAYER_ONLY.has(presentation.action_class),
|
|
@@ -21,6 +21,8 @@ export type HostSelf = Readonly<{
|
|
|
21
21
|
}>;
|
|
22
22
|
directOnly: readonly string[];
|
|
23
23
|
paused: boolean;
|
|
24
|
+
/** The installation's own uid: what its deliveries are addressed to. */
|
|
25
|
+
uid: string;
|
|
24
26
|
}>;
|
|
25
27
|
export type BoundHost = Readonly<{
|
|
26
28
|
defaultDeployment?: string;
|
|
@@ -29,8 +31,7 @@ export type BoundHost = Readonly<{
|
|
|
29
31
|
name?: string;
|
|
30
32
|
}>;
|
|
31
33
|
/**
|
|
32
|
-
* The generic host routes of ai-agents
|
|
33
|
-
* §4.3) a host calls besides the credential exchange: as the installation,
|
|
34
|
+
* The generic host routes of ai-agents a host calls besides the credential exchange: as the installation,
|
|
34
35
|
* with its key in `X-Datalayer-Host-Key`, or as a person, with the host token
|
|
35
36
|
* the exchange answered. Any host speaks them.
|
|
36
37
|
*/
|
|
@@ -39,7 +40,7 @@ export declare class DatalayerHostClient {
|
|
|
39
40
|
readonly apiUrl: string;
|
|
40
41
|
readonly fetchImplementation: typeof fetch;
|
|
41
42
|
constructor(apiUrl: string, fetchImplementation?: typeof fetch);
|
|
42
|
-
/** Bind the installation its owner set up, with the code their browser carried
|
|
43
|
+
/** Bind the installation its owner set up, with the code their browser carried. */
|
|
43
44
|
bind(input: {
|
|
44
45
|
code: string;
|
|
45
46
|
externalId: string;
|
|
@@ -50,12 +51,14 @@ export declare class DatalayerHostClient {
|
|
|
50
51
|
/**
|
|
51
52
|
* The installation as Datalayer keeps it: the deployments it allows (with
|
|
52
53
|
* their application's name and whether each is kept on), the default, the
|
|
53
|
-
* channel policy
|
|
54
|
+
* channel policy, whether it is paused, and its uid (a host bound
|
|
55
|
+
* outside the install flow, such as a development app given its key,
|
|
56
|
+
* reads it here to poll its deliveries).
|
|
54
57
|
*/
|
|
55
58
|
self(hostKey: string): Promise<HostSelf>;
|
|
56
59
|
/**
|
|
57
|
-
* The host's own administration (
|
|
58
|
-
*
|
|
60
|
+
* The host's own administration (DC-106, `/datalayer-admin`):
|
|
61
|
+
* pause, resume or one channel's rule, for the host
|
|
59
62
|
* user linked to the installation's owner; Datalayer refuses anyone else
|
|
60
63
|
* (403), whatever their role in the host.
|
|
61
64
|
*/
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* The ai-agents host client every chat host calls (moved from the Slack
|
|
7
|
-
* service, plans/DISCORD.md DC-004).
|
|
6
|
+
* The ai-agents host client every chat host calls (moved from the Slack service, DC-004).
|
|
8
7
|
*
|
|
9
8
|
* @module portable/hosts/client
|
|
10
9
|
*/
|
|
@@ -23,8 +22,7 @@ export class HostRefusedError extends Error {
|
|
|
23
22
|
}
|
|
24
23
|
}
|
|
25
24
|
/**
|
|
26
|
-
* The generic host routes of ai-agents
|
|
27
|
-
* §4.3) a host calls besides the credential exchange: as the installation,
|
|
25
|
+
* The generic host routes of ai-agents a host calls besides the credential exchange: as the installation,
|
|
28
26
|
* with its key in `X-Datalayer-Host-Key`, or as a person, with the host token
|
|
29
27
|
* the exchange answered. Any host speaks them.
|
|
30
28
|
*/
|
|
@@ -56,7 +54,7 @@ export class DatalayerHostClient {
|
|
|
56
54
|
throw new HostRefusedError(response.status, typeof body.detail === 'string' ? body.detail : 'refused', what);
|
|
57
55
|
return schema.parse(body);
|
|
58
56
|
}
|
|
59
|
-
/** Bind the installation its owner set up, with the code their browser carried
|
|
57
|
+
/** Bind the installation its owner set up, with the code their browser carried. */
|
|
60
58
|
async bind(input) {
|
|
61
59
|
const bound = await this.#call('Datalayer did not bind the installation', '/apps/hosts/bind', {
|
|
62
60
|
body: {
|
|
@@ -80,7 +78,9 @@ export class DatalayerHostClient {
|
|
|
80
78
|
/**
|
|
81
79
|
* The installation as Datalayer keeps it: the deployments it allows (with
|
|
82
80
|
* their application's name and whether each is kept on), the default, the
|
|
83
|
-
* channel policy
|
|
81
|
+
* channel policy, whether it is paused, and its uid (a host bound
|
|
82
|
+
* outside the install flow, such as a development app given its key,
|
|
83
|
+
* reads it here to poll its deliveries).
|
|
84
84
|
*/
|
|
85
85
|
async self(hostKey) {
|
|
86
86
|
const answered = await this.#call('Datalayer did not answer the installation', '/apps/hosts/self', { hostKey }, selfSchema);
|
|
@@ -100,11 +100,12 @@ export class DatalayerHostClient {
|
|
|
100
100
|
})),
|
|
101
101
|
directOnly: host.direct_only ?? [],
|
|
102
102
|
paused: host.paused ?? false,
|
|
103
|
+
uid: host.uid,
|
|
103
104
|
};
|
|
104
105
|
}
|
|
105
106
|
/**
|
|
106
|
-
* The host's own administration (
|
|
107
|
-
*
|
|
107
|
+
* The host's own administration (DC-106, `/datalayer-admin`):
|
|
108
|
+
* pause, resume or one channel's rule, for the host
|
|
108
109
|
* user linked to the installation's owner; Datalayer refuses anyone else
|
|
109
110
|
* (403), whatever their role in the host.
|
|
110
111
|
*/
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
/**
|
|
3
|
-
* The generic Datalayer host contracts
|
|
4
|
-
* §4.3), as ai-agents answers them, for every chat host (Slack, Discord).
|
|
3
|
+
* The generic Datalayer host contracts, as ai-agents answers them, for every chat host (Slack, Discord).
|
|
5
4
|
* These shapes are shared with ai-agents through `contracts.json`, beside
|
|
6
5
|
* this file and byte-identical to ai-agents' `tests/fixtures/hosts/`, which
|
|
7
6
|
* both sides test. A delivery's `target` stays opaque here: each host
|
|
@@ -178,8 +177,7 @@ export declare function deliveryOfOutbox(item: unknown): HostDelivery;
|
|
|
178
177
|
/**
|
|
179
178
|
* Whether a host may offer Approve and Reject: only what the server says a
|
|
180
179
|
* host may decide, in a version the hosts render, shown whole, pending, with
|
|
181
|
-
* no secret field. Anything else gets *Review in Datalayer
|
|
182
|
-
* DISCORD §2 rule 6). Each host also checks the card fits its own limits.
|
|
180
|
+
* no secret field. Anything else gets *Review in Datalayer*. Each host also checks the card fits its own limits.
|
|
183
181
|
*/
|
|
184
182
|
export declare function hostMayDecide(presentation: ApprovalPresentation): boolean;
|
|
185
183
|
/** `v1=` HMAC-SHA256 of `"<timestamp>.<raw body>"`, as ai-agents signs a push. */
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
import { createHmac, timingSafeEqual } from 'node:crypto';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
/**
|
|
8
|
-
* The generic Datalayer host contracts
|
|
9
|
-
* §4.3), as ai-agents answers them, for every chat host (Slack, Discord).
|
|
8
|
+
* The generic Datalayer host contracts, as ai-agents answers them, for every chat host (Slack, Discord).
|
|
10
9
|
* These shapes are shared with ai-agents through `contracts.json`, beside
|
|
11
10
|
* this file and byte-identical to ai-agents' `tests/fixtures/hosts/`, which
|
|
12
11
|
* both sides test. A delivery's `target` stays opaque here: each host
|
|
@@ -197,8 +196,7 @@ export function deliveryOfOutbox(item) {
|
|
|
197
196
|
/**
|
|
198
197
|
* Whether a host may offer Approve and Reject: only what the server says a
|
|
199
198
|
* host may decide, in a version the hosts render, shown whole, pending, with
|
|
200
|
-
* no secret field. Anything else gets *Review in Datalayer
|
|
201
|
-
* DISCORD §2 rule 6). Each host also checks the card fits its own limits.
|
|
199
|
+
* no secret field. Anything else gets *Review in Datalayer*. Each host also checks the card fits its own limits.
|
|
202
200
|
*/
|
|
203
201
|
export function hostMayDecide(presentation) {
|
|
204
202
|
return (presentation.version === PRESENTATION_VERSION &&
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
|
-
"about": "The generic host contracts of
|
|
3
|
+
"about": "The generic host contracts of the chat hosts, as ai-agents and the runtime's session API answer them. Shared verbatim by ai-agents (tests/fixtures/hosts) and agent-runtimes (src/portable/hosts, read by the Slack and Discord adapters from lib/portable/hosts): each side's tests check its half against this file.",
|
|
4
4
|
"headers": {
|
|
5
5
|
"host_key": "X-Datalayer-Host-Key",
|
|
6
6
|
"signature": "X-Datalayer-Signature",
|
|
@@ -416,7 +416,7 @@
|
|
|
416
416
|
}
|
|
417
417
|
},
|
|
418
418
|
"discord": {
|
|
419
|
-
"about": "Discord's forms of the generic contracts
|
|
419
|
+
"about": "Discord's forms of the generic contracts: the installation is <application_id>:<guild_id>, a member is their snowflake, a thread is sent as its parent channel, the session uid is hostSessionUid(\"discord\", [application, guild, channel, thread]).",
|
|
420
420
|
"application_id": "123456789012345678",
|
|
421
421
|
"guild_id": "234567890123456789",
|
|
422
422
|
"bind_request": {
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* Dead letters (
|
|
6
|
+
* Dead letters (S-405, DC-403): jobs that failed five
|
|
7
7
|
* times. By default an operator sees their metadata and a hash of their
|
|
8
8
|
* payload — never the words of a prompt or a delivery. Replaying puts one
|
|
9
9
|
* back to work, once. Reading a payload is privileged: a dead job's only, it
|
|
10
10
|
* needs a reason, is recorded in `<prefix>_payload_access` and audited, and
|
|
11
11
|
* its credentials are still redacted. Every replay is kept in
|
|
12
12
|
* `<prefix>_job_replays` with who asked. Moved from the Slack service
|
|
13
|
-
* (
|
|
13
|
+
* (DC-004); each service keeps only the bin that opens its
|
|
14
14
|
* database and calls `runDeadLettersCli`.
|
|
15
15
|
*
|
|
16
16
|
* @module portable/hosts/deadLetters
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Datalayer's deliveries to a chat host
|
|
2
|
+
* Datalayer's deliveries to a chat host: the
|
|
3
3
|
* signed webhook ai-agents pushes to, the outbox read when a push was
|
|
4
4
|
* missed, and each delivery handled once then acknowledged. What a delivery
|
|
5
5
|
* shows is the host's own (its `DeliveryHandler`); where its installations
|
|
6
6
|
* and claims are kept is its store, seen here as a `DeliverySink` and a
|
|
7
|
-
* `DeliveryClaimStore`. Moved from the Slack service (
|
|
8
|
-
* DC-004).
|
|
7
|
+
* `DeliveryClaimStore`. Moved from the Slack service (DC-004).
|
|
9
8
|
*
|
|
10
9
|
* @module portable/hosts/deliveries
|
|
11
10
|
*/
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* What may never reach a host service's production code (
|
|
3
|
-
*
|
|
2
|
+
* What may never reach a host service's production code (S-005):
|
|
3
|
+
* Jupyter, JupyterLab, Lumino, Datalayer's Jupyter packages,
|
|
4
4
|
* React, Primer, Reactor and the other host services. Checked over the
|
|
5
5
|
* service's source imports, its esbuild bundle's module graph
|
|
6
6
|
* (`forbiddenInBundle`, over the metafile) and the installed graph of the
|
|
7
7
|
* bundle's externals (`npm ls --omit=dev --omit=peer --all`). Pure functions:
|
|
8
8
|
* each service reads its files and runs them. Moved from the Slack service
|
|
9
|
-
* (
|
|
9
|
+
* (DC-004).
|
|
10
10
|
*
|
|
11
11
|
* @module portable/hosts/forbiddenGraph
|
|
12
12
|
*/
|
|
@@ -66,7 +66,7 @@ export type BundleMetafile = {
|
|
|
66
66
|
}>;
|
|
67
67
|
};
|
|
68
68
|
/**
|
|
69
|
-
* What a service's esbuild bundle may hold
|
|
69
|
+
* What a service's esbuild bundle may hold: its own sources,
|
|
70
70
|
* and agent-runtimes' `lib/portable` (by its real path: the monorepo's
|
|
71
71
|
* workspace link resolves to `ai/agent-runtimes/lib/portable/…`). Every
|
|
72
72
|
* other module is a package's, and refused; every external is a `node:`
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* What may never reach a host service's production code (
|
|
7
|
-
*
|
|
6
|
+
* What may never reach a host service's production code (S-005):
|
|
7
|
+
* Jupyter, JupyterLab, Lumino, Datalayer's Jupyter packages,
|
|
8
8
|
* React, Primer, Reactor and the other host services. Checked over the
|
|
9
9
|
* service's source imports, its esbuild bundle's module graph
|
|
10
10
|
* (`forbiddenInBundle`, over the metafile) and the installed graph of the
|
|
11
11
|
* bundle's externals (`npm ls --omit=dev --omit=peer --all`). Pure functions:
|
|
12
12
|
* each service reads its files and runs them. Moved from the Slack service
|
|
13
|
-
* (
|
|
13
|
+
* (DC-004).
|
|
14
14
|
*
|
|
15
15
|
* @module portable/hosts/forbiddenGraph
|
|
16
16
|
*/
|
|
@@ -134,7 +134,7 @@ export function forbiddenInGraph(lock) {
|
|
|
134
134
|
/** Where agent-runtimes' portable code lies, by the real path esbuild reads it from. */
|
|
135
135
|
const PORTABLE = /(^|\/)agent-runtimes\/lib\/portable\//;
|
|
136
136
|
/**
|
|
137
|
-
* What a service's esbuild bundle may hold
|
|
137
|
+
* What a service's esbuild bundle may hold: its own sources,
|
|
138
138
|
* and agent-runtimes' `lib/portable` (by its real path: the monorepo's
|
|
139
139
|
* workspace link resolves to `ai/agent-runtimes/lib/portable/…`). Every
|
|
140
140
|
* other module is a package's, and refused; every external is a `node:`
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Liveness and readiness (
|
|
2
|
+
* Liveness and readiness (S-101): `/healthz` says the
|
|
3
3
|
* process answers; `/readyz` says it can take durable work now — its store
|
|
4
4
|
* and its queue answer — and never asks the host or Datalayer, so a
|
|
5
5
|
* transient outage of either does not take the pods out of service: accepted
|
|
6
6
|
* work waits in the queue instead. And the window a signed host request's
|
|
7
|
-
* timestamp must fall in. Moved from the Slack service (
|
|
8
|
-
* DC-004).
|
|
7
|
+
* timestamp must fall in. Moved from the Slack service (DC-004).
|
|
9
8
|
*
|
|
10
9
|
* @module portable/hosts/health
|
|
11
10
|
*/
|
|
@@ -25,7 +24,7 @@ export declare const HEALTH_PATHS: readonly ["/healthz", "/readyz"];
|
|
|
25
24
|
export declare function answerHealth(checks: ReadinessChecks, request: IncomingMessage, response: ServerResponse): boolean;
|
|
26
25
|
/** A worker's own server: its health and readiness only (no host route). */
|
|
27
26
|
export declare function healthServer(checks: ReadinessChecks): Server;
|
|
28
|
-
/** How far a signed host request's timestamp may be from now, either way
|
|
27
|
+
/** How far a signed host request's timestamp may be from now, either way. */
|
|
29
28
|
export declare const REQUEST_WINDOW_SECONDS: number;
|
|
30
29
|
/**
|
|
31
30
|
* Whether a request's timestamp header (Slack's `X-Slack-Request-Timestamp`,
|
|
@@ -3,13 +3,12 @@
|
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* Liveness and readiness (
|
|
6
|
+
* Liveness and readiness (S-101): `/healthz` says the
|
|
7
7
|
* process answers; `/readyz` says it can take durable work now — its store
|
|
8
8
|
* and its queue answer — and never asks the host or Datalayer, so a
|
|
9
9
|
* transient outage of either does not take the pods out of service: accepted
|
|
10
10
|
* work waits in the queue instead. And the window a signed host request's
|
|
11
|
-
* timestamp must fall in. Moved from the Slack service (
|
|
12
|
-
* DC-004).
|
|
11
|
+
* timestamp must fall in. Moved from the Slack service (DC-004).
|
|
13
12
|
*
|
|
14
13
|
* @module portable/hosts/health
|
|
15
14
|
*/
|
|
@@ -78,7 +77,7 @@ export function healthServer(checks) {
|
|
|
78
77
|
}
|
|
79
78
|
});
|
|
80
79
|
}
|
|
81
|
-
/** How far a signed host request's timestamp may be from now, either way
|
|
80
|
+
/** How far a signed host request's timestamp may be from now, either way. */
|
|
82
81
|
export const REQUEST_WINDOW_SECONDS = 5 * 60;
|
|
83
82
|
/**
|
|
84
83
|
* Whether a request's timestamp header (Slack's `X-Slack-Request-Timestamp`,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* semantic events a turn is reduced to, approval renderers, deliveries, the
|
|
5
5
|
* turn's state, application resolution, the durable queue, quotas, secrets
|
|
6
6
|
* at rest, observability, dead letters, health, the shared schema and the
|
|
7
|
-
* forbidden-graph gate (
|
|
7
|
+
* forbidden-graph gate (DC-004, DC-005).
|
|
8
8
|
*
|
|
9
9
|
* Imported as `@datalayer/agent-runtimes/lib/portable/hosts`, and only by a
|
|
10
10
|
* Node service, which bundles it with esbuild. It reaches `src/portable/` and
|