@datalayer/agent-runtimes 1.5.71 → 1.5.75
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/datalayer-app-main.js +1 -1
- package/lib/Agent.js +2 -2
- package/lib/AgentDocument.js +6 -6
- package/lib/AgentNode.js +4 -4
- package/lib/AgentNotebook.js +3 -3
- package/lib/App.js +2 -2
- package/lib/AppExamples2.js +3 -4
- package/lib/agent-document-main.js +1 -1
- package/lib/agent-main.js +1 -1
- package/lib/agent-node-main.js +1 -1
- package/lib/agent-notebook-main.js +1 -1
- package/lib/agents/AgentDetails.js +5 -5
- package/lib/agents/AgentRuntimeChat.js +3 -3
- package/lib/api/index.js +5 -5
- package/lib/api/scheduler/index.js +1 -1
- package/lib/apps/apps/AppBrowserSandbox.js +3 -3
- package/lib/apps/apps/AppComposer.js +6 -6
- package/lib/apps/apps/AppFeedback.js +3 -3
- package/lib/apps/apps/AppKept.js +3 -3
- package/lib/apps/apps/AppRenderer.js +26 -26
- package/lib/apps/apps/AppRuntimePlugins.js +3 -3
- package/lib/apps/apps/agent.js +2 -2
- package/lib/apps/apps/appspec.js +5 -5
- package/lib/apps/apps/browserSandbox.js +1 -1
- package/lib/apps/apps/checks.js +24 -24
- package/lib/apps/apps/customComponents.js +1 -1
- package/lib/apps/apps/index.js +18 -18
- package/lib/apps/apps/language.js +1 -1
- package/lib/apps/apps/records.js +3 -3
- package/lib/apps/apps/rules.js +1 -1
- package/lib/apps/apps/sceneChecks.js +6 -6
- package/lib/apps/apps/sceneShape.js +2 -2
- package/lib/apps/apps/sceneYaml.js +2 -2
- package/lib/apps/apps/yaml.js +1 -1
- package/lib/apps/core/index.js +7 -7
- package/lib/apps/embed/AppEmbed.d.ts +1 -1
- package/lib/apps/embed/AppEmbed.js +11 -11
- package/lib/apps/embed/LoopEmbed.js +4 -4
- package/lib/apps/embed/datalayer-app.js +1 -1
- package/lib/apps/embed/element.js +7 -7
- package/lib/apps/embed/embedConfig.js +2 -2
- package/lib/apps/embed/embedSession.js +2 -2
- package/lib/apps/embed/hostBridge.js +3 -3
- package/lib/apps/embed/visitorApp.js +3 -3
- package/lib/apps/extensions.js +4 -4
- package/lib/apps/index.js +70 -70
- package/lib/apps/plugins/a2a-sidebar/A2ASidebar.js +6 -6
- package/lib/apps/plugins/a2a-sidebar/index.js +3 -3
- package/lib/apps/plugins/a2ui/A2uiView.js +2 -2
- package/lib/apps/plugins/a2ui/index.js +3 -3
- package/lib/apps/plugins/a2ui-scene/index.js +1 -1
- package/lib/apps/plugins/a2ui-surface/AnswerShows.js +3 -3
- package/lib/apps/plugins/a2ui-surface/InlineSurface.js +1 -1
- package/lib/apps/plugins/a2ui-surface/SurfaceToolResult.js +4 -4
- package/lib/apps/plugins/a2ui-surface/index.js +7 -7
- package/lib/apps/plugins/a2ui-surface/ownComponents.js +2 -2
- package/lib/apps/plugins/agent-a2a/index.js +1 -1
- package/lib/apps/plugins/agent-a2ui/index.js +1 -1
- package/lib/apps/plugins/agent-a2ui-jupyter-output/index.js +1 -1
- package/lib/apps/plugins/agent-capacity/index.js +1 -1
- package/lib/apps/plugins/agent-checkpoints/index.js +1 -1
- package/lib/apps/plugins/agent-code-sandbox/index.js +1 -1
- package/lib/apps/plugins/agent-code-sandboxes/index.js +1 -1
- package/lib/apps/plugins/agent-codemode/index.js +1 -1
- package/lib/apps/plugins/agent-compaction/index.js +1 -1
- package/lib/apps/plugins/agent-evals/index.js +1 -1
- package/lib/apps/plugins/agent-guardrails/index.js +1 -1
- package/lib/apps/plugins/agent-hooks/index.js +1 -1
- package/lib/apps/plugins/agent-inference/index.js +1 -1
- package/lib/apps/plugins/agent-mcp/index.js +1 -1
- package/lib/apps/plugins/agent-memory/index.js +1 -1
- package/lib/apps/plugins/agent-monitoring/index.js +1 -1
- package/lib/apps/plugins/agent-notifications/index.js +1 -1
- package/lib/apps/plugins/agent-otel/index.js +1 -1
- package/lib/apps/plugins/agent-outputs/index.js +1 -1
- package/lib/apps/plugins/agent-parameters/index.js +1 -1
- package/lib/apps/plugins/agent-skills/index.js +1 -1
- package/lib/apps/plugins/agent-subagents/index.js +1 -1
- package/lib/apps/plugins/agent-tool-approvals/index.js +1 -1
- package/lib/apps/plugins/agent-triggers/index.js +1 -1
- package/lib/apps/plugins/agents/AgentSummaryPanel.js +5 -5
- package/lib/apps/plugins/agents/AnonymousKeyBadge.js +2 -2
- package/lib/apps/plugins/agents/DatalayerAgentBridge.js +7 -7
- package/lib/apps/plugins/agents/DatalayerAgentMount.js +1 -1
- package/lib/apps/plugins/agents/SandboxSelector.js +3 -3
- package/lib/apps/plugins/agents/SandboxStatusBridge.js +2 -2
- package/lib/apps/plugins/agents/SandboxView.js +1 -1
- package/lib/apps/plugins/agents/TeamMemberPicker.js +2 -2
- package/lib/apps/plugins/agents/index.js +8 -8
- package/lib/apps/plugins/agents/plugin.js +10 -10
- package/lib/apps/plugins/agents/specSubagents.js +1 -1
- package/lib/apps/plugins/agents/switchable.js +3 -3
- package/lib/apps/plugins/agents/team.js +2 -2
- package/lib/apps/plugins/agents/useSandboxService.js +1 -1
- package/lib/apps/plugins/agents/useTeamSelection.js +1 -1
- package/lib/apps/plugins/agentspecs/AgentspecPicker.js +1 -1
- package/lib/apps/plugins/agentspecs/index.js +2 -2
- package/lib/apps/plugins/app-activity/AppActivity.js +2 -2
- package/lib/apps/plugins/app-activity/index.js +3 -3
- package/lib/apps/plugins/app-components/index.js +4 -4
- package/lib/apps/plugins/app-computer/AppComputer.js +3 -3
- package/lib/apps/plugins/app-computer/index.js +4 -4
- package/lib/apps/plugins/app-elements/AppElements.js +2 -2
- package/lib/apps/plugins/app-elements/QuestionView.js +1 -1
- package/lib/apps/plugins/app-elements/index.js +6 -6
- package/lib/apps/plugins/app-page/AppPage.js +7 -7
- package/lib/apps/plugins/app-page/appPageModel.js +1 -1
- package/lib/apps/plugins/app-page/index.js +6 -6
- package/lib/apps/plugins/app-rules/AppRulesCard.js +5 -5
- package/lib/apps/plugins/app-rules/index.js +4 -4
- package/lib/apps/plugins/assistant/index.js +12 -12
- package/lib/apps/plugins/assistant-characters/index.d.ts +1 -1
- package/lib/apps/plugins/assistant-characters/index.js +3 -3
- package/lib/apps/plugins/canvas-blocks/index.js +2 -2
- package/lib/apps/plugins/canvas-parts/index.js +10 -10
- package/lib/apps/plugins/chat/ChatView.js +43 -43
- package/lib/apps/plugins/chat/SessionActionsMenu.js +2 -2
- package/lib/apps/plugins/chat/index.js +4 -4
- package/lib/apps/plugins/chat/sessionActions.js +2 -2
- package/lib/apps/plugins/chat-extras/index.js +1 -1
- package/lib/apps/plugins/chat-header/HeaderView.js +1 -1
- package/lib/apps/plugins/chat-header/index.js +2 -2
- package/lib/apps/plugins/chat-view/index.js +2 -2
- package/lib/apps/plugins/checkpoints-sidebar/CheckpointsSidebar.js +2 -2
- package/lib/apps/plugins/checkpoints-sidebar/index.js +3 -3
- package/lib/apps/plugins/commands/index.js +1 -1
- package/lib/apps/plugins/decks/DecksMenu.js +2 -2
- package/lib/apps/plugins/decks/index.js +8 -8
- package/lib/apps/plugins/document/DocumentView.js +5 -5
- package/lib/apps/plugins/document/index.js +4 -4
- package/lib/apps/plugins/document/openingDocument.js +1 -1
- package/lib/apps/plugins/document-toolbar/SandboxStatusItem.js +2 -2
- package/lib/apps/plugins/document-toolbar/index.js +3 -3
- package/lib/apps/plugins/document-toolbar/plugin.js +3 -3
- package/lib/apps/plugins/document-view/index.js +1 -1
- package/lib/apps/plugins/graph/GraphToggle.js +1 -1
- package/lib/apps/plugins/graph/index.js +5 -5
- package/lib/apps/plugins/input-prompt/ComposerView.js +2 -2
- package/lib/apps/plugins/input-prompt/index.js +2 -2
- package/lib/apps/plugins/models/index.js +1 -1
- package/lib/apps/plugins/notebook/NotebookView.js +5 -5
- package/lib/apps/plugins/notebook/index.js +4 -4
- package/lib/apps/plugins/notebook-toolbar/index.js +3 -3
- package/lib/apps/plugins/notebook-toolbar/plugin.js +3 -3
- package/lib/apps/plugins/notebook-view/index.js +1 -1
- package/lib/apps/plugins/page-layout/SplitLayout.js +1 -1
- package/lib/apps/plugins/page-layout/TurnPanel.js +5 -5
- package/lib/apps/plugins/page-layout/index.js +5 -5
- package/lib/apps/plugins/pap-example/index.js +1 -1
- package/lib/apps/plugins/pap-sign-in/PapSignInCard.js +1 -1
- package/lib/apps/plugins/pap-sign-in/index.js +5 -5
- package/lib/apps/plugins/pap-sign-in/signIn.js +1 -1
- package/lib/apps/plugins/plugins-panel/index.js +1 -1
- package/lib/apps/plugins/prompt/index.js +3 -3
- package/lib/apps/plugins/shell/editorChoice.js +1 -1
- package/lib/apps/plugins/shell/index.js +4 -4
- package/lib/apps/plugins/shell/useEditorPreviews.js +1 -1
- package/lib/apps/plugins/shield-displays/DiffCard.js +1 -1
- package/lib/apps/plugins/shield-displays/TerminalCard.js +1 -1
- package/lib/apps/plugins/shield-displays/index.js +5 -5
- package/lib/apps/plugins/subagent-activity/SubagentPulse.js +3 -3
- package/lib/apps/plugins/subagent-activity/index.js +4 -4
- package/lib/apps/plugins/view-switch/index.js +3 -3
- package/lib/apps/plugins/window-frame/WindowFrame.js +1 -1
- package/lib/apps/plugins/window-frame/index.js +5 -5
- package/lib/apps/presets.js +21 -21
- package/lib/apps/shell/LoopWorkspace.js +4 -4
- package/lib/apps/shell/SidebarRail.js +1 -1
- package/lib/apps/shell/ViewSwitcher.js +1 -1
- package/lib/apps/shell/WorkspaceFullScreenAction.js +2 -2
- package/lib/apps/shell/index.js +7 -7
- package/lib/chat/Chat.js +7 -7
- package/lib/chat/ChatFloating.d.ts +1 -1
- package/lib/chat/ChatFloating.js +23 -23
- package/lib/chat/ChatInline.js +4 -4
- package/lib/chat/ChatLanguage.js +2 -2
- package/lib/chat/ChatPopupStandalone.js +4 -4
- package/lib/chat/ChatSidebar.js +2 -2
- package/lib/chat/ChatStandalone.js +3 -3
- package/lib/chat/assistant/AgentDetailsDialog.js +1 -1
- package/lib/chat/assistant/AssistantStage.d.ts +1 -1
- package/lib/chat/assistant/AssistantStage.js +16 -16
- package/lib/chat/assistant/Avatar3D.d.ts +1 -1
- package/lib/chat/assistant/Avatar3D.js +1 -1
- package/lib/chat/assistant/BalloonParts.js +8 -8
- package/lib/chat/assistant/BalloonVisual.js +1 -1
- package/lib/chat/assistant/ConversationBalloon.js +1 -1
- package/lib/chat/assistant/DecisionAsk.js +1 -1
- package/lib/chat/assistant/SandboxDetailsDialog.js +1 -1
- package/lib/chat/assistant/SpeechBalloon.js +5 -5
- package/lib/chat/assistant/SpriteCharacter.js +2 -2
- package/lib/chat/assistant/{avatar3d.d.ts → avatar3dModel.d.ts} +1 -1
- package/lib/chat/assistant/formats/acf.js +3 -3
- package/lib/chat/assistant/formats/acs.js +3 -3
- package/lib/chat/assistant/formats/agentCompression.js +1 -1
- package/lib/chat/assistant/formats/blobs.js +1 -1
- package/lib/chat/assistant/formats/clippy.js +3 -3
- package/lib/chat/assistant/formats/files.js +4 -4
- package/lib/chat/assistant/formats/index.js +7 -7
- package/lib/chat/assistant/formats/objectLiteral.js +1 -1
- package/lib/chat/assistant/toolLine.js +2 -2
- package/lib/chat/base/ChatBase.js +45 -45
- package/lib/chat/base/fullContextMessages.js +1 -1
- package/lib/chat/base/uiOps.js +3 -3
- package/lib/chat/display/EmptyState.js +3 -3
- package/lib/chat/document/EphemeralDocument.js +4 -4
- package/lib/chat/header/ChatHeaderBase.js +2 -2
- package/lib/chat/header/ChatViewModeToggle.js +1 -1
- package/lib/chat/index.js +24 -24
- package/lib/chat/indicators/McpStatusIndicator.js +1 -1
- package/lib/chat/indicators/SandboxStatusIndicator.js +1 -1
- package/lib/chat/indicators/index.js +3 -3
- package/lib/chat/marks/SpecMark.js +1 -1
- package/lib/chat/marks/index.js +3 -3
- package/lib/chat/marks/toolMarks.js +4 -4
- package/lib/chat/messages/ChatMarkdown.js +3 -3
- package/lib/chat/messages/ChatMessageList.js +13 -13
- package/lib/chat/messages/ChatMessages.js +2 -2
- package/lib/chat/messages/FormSubmissionMessage.js +1 -1
- package/lib/chat/messages/TurnFooter.js +2 -2
- package/lib/chat/notebook/EphemeralNotebook.js +4 -4
- package/lib/chat/parts/MessagePart.js +4 -4
- package/lib/chat/parts/ReasoningPart.js +2 -2
- package/lib/chat/parts/TextPart.js +2 -2
- package/lib/chat/parts/ToolPart.js +1 -1
- package/lib/chat/parts/index.js +5 -5
- package/lib/chat/presence/Presence.js +1 -1
- package/lib/chat/presence/presenceStatus.js +1 -1
- package/lib/chat/prompt/InputPrompt.js +9 -9
- package/lib/chat/prompt/InputPromptBase.js +6 -6
- package/lib/chat/prompt/InputPromptLexical.js +4 -4
- package/lib/chat/prompt/footer/BelowPromptFooter.js +1 -1
- package/lib/chat/prompt/footer/InPromptFooter.js +2 -2
- package/lib/chat/prompt/footer/index.js +2 -2
- package/lib/chat/prompt/header/BelowPromptHeader.js +1 -1
- package/lib/chat/prompt/header/InPromptHeader.js +1 -1
- package/lib/chat/prompt/header/index.js +2 -2
- package/lib/chat/prompt/index.js +10 -10
- package/lib/chat/prompt/menus/SkillsMenu.js +1 -1
- package/lib/chat/prompt/menus/SuggestionsMenu.js +1 -1
- package/lib/chat/prompt/menus/ToolsMenu.js +1 -1
- package/lib/chat/prompt/menus/index.js +6 -6
- package/lib/chat/prompt/plugins/AgentMentionPlugin.js +1 -1
- package/lib/chat/prompt/plugins/MentionNode.js +1 -1
- package/lib/chat/prompt/stack.js +1 -1
- package/lib/chat/tools/SubagentActivity.js +1 -1
- package/lib/chat/tools/ToolApprovalBanner.js +1 -1
- package/lib/chat/tools/ToolApprovalDialog.js +1 -1
- package/lib/chat/tools/ToolCallDisplay.js +2 -2
- package/lib/chat/tools/index.js +5 -5
- package/lib/chat/usage/ContextPie.js +1 -1
- package/lib/chat/words.js +1 -1
- package/lib/client/AgentRuntimesClient.js +2 -2
- package/lib/client/AgentsMixin.js +8 -8
- package/lib/client/index.js +3 -3
- package/lib/client/mixins/RuntimesMixin.js +6 -6
- package/lib/client/mixins/SpacerMixin.js +11 -11
- package/lib/client/utils/spacerUtils.js +2 -2
- package/lib/collaboration/DatalayerCollaborationProvider.js +1 -1
- package/lib/collaboration/index.js +2 -2
- package/lib/components/a2ui/custom/index.js +6 -6
- package/lib/components/a2ui/datalayer/Chart.js +2 -2
- package/lib/components/a2ui/datalayer/Chat.js +5 -5
- package/lib/components/a2ui/datalayer/Download.js +2 -2
- package/lib/components/a2ui/datalayer/Evidence.js +2 -2
- package/lib/components/a2ui/datalayer/FileUpload.js +3 -3
- package/lib/components/a2ui/datalayer/Form.js +3 -3
- package/lib/components/a2ui/datalayer/SchemaForm.js +1 -1
- package/lib/components/a2ui/datalayer/Table.js +2 -2
- package/lib/components/a2ui/datalayer/implementation.js +1 -1
- package/lib/components/a2ui/datalayer/index.js +17 -17
- package/lib/components/a2ui/datalayer/schema.js +1 -1
- package/lib/components/a2ui/index.js +7 -7
- package/lib/components/a2ui/visibleWhen.js +2 -2
- package/lib/components/agents/AgentSummary.js +1 -1
- package/lib/components/agents/index.js +1 -1
- package/lib/components/cards/NotificationEventCard.js +2 -2
- package/lib/components/cards/OutputCard.js +2 -2
- package/lib/components/cards/index.js +3 -3
- package/lib/components/code-sandboxes/CodeSandboxCellVariablesDialog.js +3 -3
- package/lib/components/code-sandboxes/CodeSandboxLauncher.js +9 -9
- package/lib/components/code-sandboxes/CodeSandboxPicker.js +9 -9
- package/lib/components/code-sandboxes/CodeSandboxPickerCell.js +7 -7
- package/lib/components/code-sandboxes/CodeSandboxUtils.js +3 -3
- package/lib/components/code-sandboxes/CodeSandboxVariables.js +1 -1
- package/lib/components/code-sandboxes/NewCodeSandboxControls.js +3 -3
- package/lib/components/code-sandboxes/index.js +14 -14
- package/lib/components/context/SpaceSelect.js +1 -1
- package/lib/components/flashes/FlashDisclaimer.js +1 -1
- package/lib/components/icons/index.js +1 -1
- package/lib/components/index.js +6 -6
- package/lib/components/inspector/AgentInspector.js +2 -2
- package/lib/components/inspector/AgentInspectorDialog.js +1 -1
- package/lib/components/inspector/a2aSpans.js +1 -1
- package/lib/components/inspector/chatSpans.js +2 -2
- package/lib/components/inspector/classify.js +1 -1
- package/lib/components/inspector/index.js +6 -6
- package/lib/components/nbgrader/index.js +1 -1
- package/lib/components/progress/index.js +1 -1
- package/lib/components/scheduler/ScheduleMenu.js +1 -1
- package/lib/components/scheduler/index.js +1 -1
- package/lib/components/snapshots/SandboxSnapshotMenu.js +2 -2
- package/lib/components/snapshots/index.js +1 -1
- package/lib/components/teams/A2ATeamGraph.d.ts +1 -1
- package/lib/components/teams/A2ATeamGraph.js +8 -8
- package/lib/components/teams/AnswerSurfaces.js +1 -1
- package/lib/components/teams/AnswerSurfacesView.js +4 -4
- package/lib/components/teams/NotebookPreview.js +2 -2
- package/lib/components/teams/NotebookPreviewView.js +1 -1
- package/lib/components/teams/SceneTranscript.d.ts +1 -1
- package/lib/components/teams/SceneTranscript.js +2 -2
- package/lib/components/teams/SceneView.d.ts +1 -1
- package/lib/components/teams/SceneView.js +1 -1
- package/lib/components/teams/TeamNotebook.js +1 -1
- package/lib/components/teams/TeamNotebookView.js +3 -3
- package/lib/components/teams/index.d.ts +1 -1
- package/lib/components/teams/index.js +13 -13
- package/lib/components/teams/sceneStage.js +2 -2
- package/lib/components/teams/{sceneTranscript.d.ts → sceneTranscriptRules.d.ts} +1 -1
- package/lib/components/teams/{sceneTranscript.js → sceneTranscriptRules.js} +1 -1
- package/lib/components/teams/teamConnections.js +3 -3
- package/lib/components/teams/useA2ATeam.js +6 -6
- package/lib/components/teams/usePeerSandbox.js +1 -1
- package/lib/components/tokens/index.js +1 -1
- package/lib/config/AgentConfiguration.js +2 -2
- package/lib/config/index.js +2 -2
- package/lib/context/CostUsageChart.js +4 -4
- package/lib/context/MessageHistory.js +1 -1
- package/lib/context/TokenUsageChart.js +4 -4
- package/lib/examples/A2UiAgentExample.js +9 -9
- package/lib/examples/A2UiComponentsGalleryExample.js +4 -4
- package/lib/examples/A2UiContactCardExample.js +4 -4
- package/lib/examples/A2UiJupyterOutputExample.js +11 -11
- package/lib/examples/A2UiRestaurantExample.js +4 -4
- package/lib/examples/A2UiViewerExample.js +6 -6
- package/lib/examples/AgUiAgenticExample.js +4 -4
- package/lib/examples/AgUiBackendToolRenderingExample.js +6 -6
- package/lib/examples/AgUiHaikuGenUiExample.js +6 -6
- package/lib/examples/AgUiHumanInTheLoopExample.js +5 -5
- package/lib/examples/AgUiSharedStateExample.js +4 -4
- package/lib/examples/AgUiToolsBasedGenUiExample.js +4 -4
- package/lib/examples/AgentA2AExample.js +7 -7
- package/lib/examples/AgentA2ATeamExample.js +10 -10
- package/lib/examples/AgentCheckpointsExample.js +14 -14
- package/lib/examples/AgentCodeSandboxExample.js +6 -6
- package/lib/examples/AgentCodeSandboxesExample.js +5 -5
- package/lib/examples/AgentCodemodeExample.js +12 -12
- package/lib/examples/AgentCompactionExample.js +8 -8
- package/lib/examples/AgentDecideExample.js +6 -6
- package/lib/examples/AgentEvalsExample.js +11 -11
- package/lib/examples/AgentGuardrailsExample.js +17 -17
- package/lib/examples/AgentHooksExample.js +5 -5
- package/lib/examples/AgentInferenceProviderExample.js +6 -6
- package/lib/examples/AgentMCPExample.js +14 -14
- package/lib/examples/AgentMemoryExample.js +11 -11
- package/lib/examples/AgentMonitoringExample.js +19 -19
- package/lib/examples/AgentNotificationsExample.js +9 -9
- package/lib/examples/AgentOtelExample.js +6 -6
- package/lib/examples/AgentOutputsExample.js +8 -8
- package/lib/examples/AgentParametersExample.js +6 -6
- package/lib/examples/AgentSkillsExample.js +9 -9
- package/lib/examples/AgentSubagentsExample.js +8 -8
- package/lib/examples/AgentToolApprovalsExample.js +10 -10
- package/lib/examples/AgentTriggersExample.js +14 -14
- package/lib/examples/AgentspecsExample.js +11 -11
- package/lib/examples/AvatarExample.js +8 -8
- package/lib/examples/AvatarGalleryExample.js +8 -8
- package/lib/examples/CellExample.js +2 -2
- package/lib/examples/ChatCustomExample.js +4 -4
- package/lib/examples/ChatExample.js +8 -8
- package/lib/examples/ChatStandaloneExample.js +2 -2
- package/lib/examples/CopilotKitLexicalExample.js +4 -4
- package/lib/examples/CopilotKitNotebookExample.js +4 -4
- package/lib/examples/DecksAgent.js +4 -4
- package/lib/examples/DocumentPageAgent.js +2 -2
- package/lib/examples/Lexical2Example.js +9 -9
- package/lib/examples/LexicalAgentExample.js +7 -7
- package/lib/examples/LexicalAgentSidebarExample.js +8 -8
- package/lib/examples/LoopAppComputerExample.js +4 -4
- package/lib/examples/LoopShellExample.js +6 -6
- package/lib/examples/LoopStrategyExample.js +6 -6
- package/lib/examples/LoopWorkspaceEmbed.js +1 -1
- package/lib/examples/LoopWorkspaceExample.js +11 -11
- package/lib/examples/NotebookAgentExample.js +5 -5
- package/lib/examples/NotebookAgentSidebarExample.js +5 -5
- package/lib/examples/NotebookCollaborationExample.js +6 -6
- package/lib/examples/NotebookExample.js +2 -2
- package/lib/examples/NotebookPageAgent.js +2 -2
- package/lib/examples/PapAccountTokensExample.js +4 -4
- package/lib/examples/PapAgentIdentityExample.js +4 -4
- package/lib/examples/PapAuthorizationBoundaryExample.js +4 -4
- package/lib/examples/PapCompanyDiscoveryExample.js +4 -4
- package/lib/examples/PapConversationControlExample.js +4 -4
- package/lib/examples/PapConversationStreamingExample.js +4 -4
- package/lib/examples/PapDpopProofExample.js +4 -4
- package/lib/examples/PapGuidedJourneyExample.js +4 -4
- package/lib/examples/PapMediatedSignInExample.js +4 -4
- package/lib/examples/PapOperationsExample.js +4 -4
- package/lib/examples/PapSessionLifecycleExample.js +4 -4
- package/lib/examples/PapSignInDisplayExample.js +4 -4
- package/lib/examples/PapTwoCompaniesExample.js +4 -4
- package/lib/examples/PapUserWithACompanyExample.js +4 -4
- package/lib/examples/ProtocolSignedRequestsExample.js +2 -2
- package/lib/examples/ProtocolUcpCheckoutExample.js +2 -2
- package/lib/examples/ScenesExample.js +8 -8
- package/lib/examples/ShieldHarnessExample.js +5 -5
- package/lib/examples/ShieldPolicyExample.js +2 -2
- package/lib/examples/VoiceChatExample.js +4 -4
- package/lib/examples/components/AuthRequiredView.js +1 -1
- package/lib/examples/components/ExampleWrapper.js +3 -3
- package/lib/examples/components/Header.js +2 -2
- package/lib/examples/components/LexicalEditor.js +1 -1
- package/lib/examples/components/MainContent.js +1 -1
- package/lib/examples/components/haiku/HaikuDisplay.js +1 -1
- package/lib/examples/components/haiku/index.js +2 -2
- package/lib/examples/components/index.js +13 -13
- package/lib/examples/components/weather/index.js +1 -1
- package/lib/examples/example-selector.js +78 -78
- package/lib/examples/hooks/useExampleAgentProtocol.js +2 -2
- package/lib/examples/hooks/useExampleAgentRuntime.js +4 -4
- package/lib/examples/hooks/useExampleAgentRuntimes.js +4 -4
- package/lib/examples/hooks/useExampleJupyterAgent.js +8 -8
- package/lib/examples/hooks/useToolRenderers.js +1 -1
- package/lib/examples/index.js +66 -66
- package/lib/examples/lexical/editorConfig.js +1 -1
- package/lib/examples/main.js +21 -21
- package/lib/examples/pap/PapAccountTokensView.js +1 -1
- package/lib/examples/pap/PapAgentIdentityView.js +2 -2
- package/lib/examples/pap/PapAuthorizationBoundaryView.js +1 -1
- package/lib/examples/pap/PapCompanyDiscoveryView.js +2 -2
- package/lib/examples/pap/PapConversationControlView.js +1 -1
- package/lib/examples/pap/PapConversationStreamingView.js +1 -1
- package/lib/examples/pap/PapDpopProofView.js +1 -1
- package/lib/examples/pap/PapGuidedJourneyView.js +2 -2
- package/lib/examples/pap/PapMediatedSignInView.js +1 -1
- package/lib/examples/pap/PapOperationsView.js +1 -1
- package/lib/examples/pap/PapSessionLifecycleView.js +1 -1
- package/lib/examples/pap/PapSignInDisplayView.js +2 -2
- package/lib/examples/pap/PapTraceView.js +1 -1
- package/lib/examples/pap/PapTwoCompaniesView.js +1 -1
- package/lib/examples/pap/PapUserWithACompanyView.js +1 -1
- package/lib/examples/pap/papSignInCases.js +1 -1
- package/lib/examples/protocols/signedRequestsDemo.js +1 -1
- package/lib/examples/protocols/ucpCheckoutDemo.js +3 -3
- package/lib/examples/scenes/A2UiComponentsGalleryScene.js +4 -4
- package/lib/examples/scenes/A2UiContactCardScene.js +3 -3
- package/lib/examples/scenes/A2UiRestaurantScene.js +5 -5
- package/lib/examples/scenes/A2UiViewerScene.js +3 -3
- package/lib/examples/utils/AvatarGalleryGrid.d.ts +1 -1
- package/lib/examples/utils/AvatarGalleryGrid.js +8 -8
- package/lib/examples/utils/a2ui.js +1 -1
- package/lib/examples/utils/a2uiMarkdownProvider.js +1 -1
- package/lib/examples/utils/avatarGallery.js +2 -2
- package/lib/examples/utils/clippyJsCharacters.js +1 -1
- package/lib/examples/utils/examplesStore.js +1 -1
- package/lib/examples/utils/notebookToolbarItems.js +1 -1
- package/lib/examples/utils/owlCharacterPlugin.js +1 -1
- package/lib/examples/utils/teardownAgents.js +1 -1
- package/lib/examples/utils/testSpriteCharacter.js +1 -1
- package/lib/examples/utils/themedProvider.js +1 -1
- package/lib/examples/utils/useExampleAgentRuntimesUrl.js +3 -3
- package/lib/examples2/DatalayerNotebookExample.js +3 -3
- package/lib/examples2/NativeNavigationExample.js +1 -1
- package/lib/examples2/NotebookMutationsKernel.js +2 -2
- package/lib/examples2/NotebookMutationsServiceManager.js +2 -2
- package/lib/examples2/ReactRouterExample.js +1 -1
- package/lib/examples2/example-selector.js +7 -7
- package/lib/examples2/index.js +2 -2
- package/lib/examples2/main.js +5 -5
- package/lib/hooks/index.js +26 -26
- package/lib/hooks/useAgUi.js +1 -1
- package/lib/hooks/useAgentRuntimes.js +9 -9
- package/lib/hooks/useAgentsCatalog.js +1 -1
- package/lib/hooks/useAgentsService.js +1 -1
- package/lib/hooks/useBrowserAgent.js +1 -1
- package/lib/hooks/useBrowserInference.js +2 -2
- package/lib/hooks/useCellOutputshot.js +1 -1
- package/lib/hooks/useChat.js +6 -6
- package/lib/hooks/useCheckpoints.js +10 -10
- package/lib/hooks/useConfig.js +1 -1
- package/lib/hooks/useContextSnapshot.js +1 -1
- package/lib/hooks/useNotifications.js +1 -1
- package/lib/hooks/useProgressTask.js +1 -1
- package/lib/hooks/useSandbox.js +1 -1
- package/lib/hooks/useSkills.js +1 -1
- package/lib/hooks/useToolApprovals.js +2 -2
- package/lib/hooks/useTools.js +1 -1
- package/lib/identity/AgentIdentity.js +3 -3
- package/lib/identity/IdentityConnect.js +2 -2
- package/lib/identity/OAuthCallback.js +1 -1
- package/lib/identity/identityStore.js +2 -2
- package/lib/identity/index.js +8 -8
- package/lib/identity/useIdentity.js +1 -1
- package/lib/index.js +11 -11
- package/lib/inference/DatalayerInferenceProvider.js +2 -2
- package/lib/inference/SelfHostedInferenceProvider.js +2 -2
- package/lib/inference/index.js +3 -3
- package/lib/jupyter/exec/Snippets.js +1 -1
- package/lib/jupyter/exec/index.js +2 -2
- package/lib/jupyter/index.js +3 -3
- package/lib/jupyter/useResumeServerExecutions.js +1 -1
- package/lib/lexical/ChatInlinePlugin.js +1 -1
- package/lib/lexical/index.js +2 -2
- package/lib/loop-example-main.js +2 -2
- package/lib/loop-main.js +9 -9
- package/lib/main.js +1 -1
- package/lib/mcp/index.js +1 -1
- package/lib/middleware/index.js +1 -1
- package/lib/mocks/models/CourseMock.js +1 -1
- package/lib/models/CodeSandboxSnapshotDTO.js +1 -1
- package/lib/models/ItemDTO.js +1 -1
- package/lib/models/LexicalDTO.js +2 -2
- package/lib/models/NotebookDTO.js +2 -2
- package/lib/models/Page.js +1 -1
- package/lib/models/RuntimeDTO.js +1 -1
- package/lib/models/SpaceDTO.js +7 -7
- package/lib/models/index.js +32 -32
- package/lib/portable/activity.js +1 -1
- package/lib/portable/approvalCard.d.ts +5 -3
- package/lib/portable/approvalCard.js +10 -6
- package/lib/portable/approvals.d.ts +26 -0
- package/lib/portable/approvals.js +25 -0
- package/lib/portable/attention.js +1 -1
- package/lib/portable/conversation.js +4 -4
- package/lib/portable/displays.js +1 -1
- package/lib/portable/fixtures.js +2 -2
- package/lib/portable/hosts/agentClient.js +4 -4
- package/lib/portable/hosts/client.js +1 -1
- package/lib/portable/hosts/deadLetters.js +3 -3
- package/lib/portable/hosts/deliveries.js +1 -1
- package/lib/portable/hosts/index.js +21 -21
- package/lib/portable/hosts/postgresQueue.js +1 -1
- package/lib/portable/hosts/quotas.js +1 -1
- package/lib/portable/hosts/schema.js +1 -1
- package/lib/portable/index.d.ts +1 -1
- package/lib/portable/index.js +24 -24
- package/lib/portable/localApprovals.js +1 -1
- package/lib/portable/runMeasures.js +2 -2
- package/lib/portable/sessionList.js +1 -1
- package/lib/portable/sessions.js +4 -4
- package/lib/portable/thread.js +2 -2
- package/lib/portable/views.js +1 -1
- package/lib/protocols/A2AAdapter.js +3 -3
- package/lib/protocols/ACPAdapter.js +2 -2
- package/lib/protocols/AGUIAdapter.js +4 -4
- package/lib/protocols/BrowserAgentAdapter.js +3 -3
- package/lib/protocols/VercelAIAdapter.js +2 -2
- package/lib/protocols/a2a/index.js +1 -1
- package/lib/protocols/agentProtocols.js +8 -8
- package/lib/protocols/agentic-commerce/index.js +3 -3
- package/lib/protocols/commerce.js +1 -1
- package/lib/protocols/index.js +6 -6
- package/lib/protocols/mcp/index.js +2 -2
- package/lib/protocols/pact/index.js +1 -1
- package/lib/protocols/pap/index.js +1 -1
- package/lib/protocols/ucp/index.js +3 -3
- package/lib/protocols/ucp/merchant.js +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 +3 -3
- package/lib/runtimes/browser/agent.js +2 -2
- package/lib/runtimes/browser/frontendTools.js +1 -1
- package/lib/runtimes/browser/index.js +6 -6
- package/lib/runtimes/browser/subagents.js +2 -2
- package/lib/runtimes/index.js +8 -8
- package/lib/runtimes/variants.js +1 -1
- package/lib/services/DatalayerServiceManager.js +1 -1
- package/lib/specs/agents/agents.js +4 -4
- package/lib/specs/agents/index.js +1 -1
- package/lib/specs/cogs.js +4 -4
- package/lib/specs/index.js +32 -32
- package/lib/specs/teams/index.js +1 -1
- package/lib/state/index.js +1 -1
- package/lib/state/substates/RuntimesState.js +1 -1
- package/lib/state/substates/index.js +7 -7
- package/lib/stores/agentRuntimeStore.js +3 -3
- package/lib/stores/index.js +3 -3
- package/lib/stories/Button.stories.js +1 -1
- package/lib/stories/Header.js +1 -1
- package/lib/stories/Header.stories.js +1 -1
- package/lib/stories/Page.js +1 -1
- package/lib/stories/Page.stories.js +1 -1
- package/lib/stories/loop/LoopReference.stories.js +1 -1
- package/lib/stories/loop/ReferenceScreens.js +11 -11
- package/lib/stories/loop/pictures-main.js +2 -2
- package/lib/tools/ToolExecutor.js +1 -1
- package/lib/tools/adapters/agent-runtimes/index.js +3 -3
- package/lib/tools/adapters/agent-runtimes/lexicalHooks.js +1 -1
- package/lib/tools/adapters/agent-runtimes/notebookHooks.js +1 -1
- package/lib/tools/adapters/commands/index.js +1 -1
- package/lib/tools/adapters/copilotkit/index.js +3 -3
- package/lib/tools/adapters/copilotkit/lexicalHooks.js +1 -1
- package/lib/tools/adapters/copilotkit/notebookHooks.js +1 -1
- package/lib/tools/index.js +3 -3
- package/lib/types/index.js +40 -40
- package/lib/ui-plugins/index.js +3 -3
- package/lib/utils/index.js +1 -1
- package/lib/utils/utils.js +2 -2
- package/lib/voice/ComposerVoice.js +5 -5
- package/lib/voice/HandsFree.js +5 -5
- package/lib/voice/ReadAloud.js +1 -1
- package/lib/voice/VoiceInput.js +3 -3
- package/lib/voice/VoiceMenu.js +3 -3
- package/lib/voice/captions.js +2 -2
- package/lib/voice/chatVoice.js +3 -3
- package/lib/voice/choices.js +1 -1
- package/lib/voice/{handsFree.d.ts → handsFreeRules.d.ts} +1 -1
- package/lib/voice/hearing.js +3 -3
- package/lib/voice/index.d.ts +1 -1
- package/lib/voice/index.js +22 -22
- package/lib/voice/keptSound.js +1 -1
- package/lib/voice/pinned.js +1 -1
- package/lib/voice/serverHearing.js +2 -2
- package/lib/voice/useSpokenAnswers.js +1 -1
- package/lib/voice/useVoiceSettings.js +1 -1
- package/lib/voice/useVoiceSpeaker.js +2 -2
- package/package.json +4 -3
- package/scripts/check-npm-pack.mjs +77 -0
- package/scripts/esm-specifiers.mjs +76 -0
- package/scripts/fully-specify-lib.mjs +61 -0
- /package/lib/chat/assistant/{avatar3d.js → avatar3dModel.js} +0 -0
- /package/lib/voice/{handsFree.js → handsFreeRules.js} +0 -0
package/lib/voice/hearing.js
CHANGED
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
*
|
|
12
12
|
* @module voice/hearing
|
|
13
13
|
*/
|
|
14
|
-
import { SPEECH_MODEL_CATALOGUE, transcriberFor } from '../specs/voices';
|
|
15
|
-
import { pinnedBytes, pinnedFetch, downloadSize, modelFolder } from './pinned';
|
|
16
|
-
import { HEARING_RATE } from './capture';
|
|
14
|
+
import { SPEECH_MODEL_CATALOGUE, transcriberFor } from '../specs/voices.js';
|
|
15
|
+
import { pinnedBytes, pinnedFetch, downloadSize, modelFolder } from './pinned.js';
|
|
16
|
+
import { HEARING_RATE } from './capture.js';
|
|
17
17
|
/** A language no device model hears. */
|
|
18
18
|
export class NotHeardHere extends Error {
|
|
19
19
|
}
|
package/lib/voice/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export * from './capture';
|
|
|
16
16
|
export * from './hearing';
|
|
17
17
|
export * from './serverHearing';
|
|
18
18
|
export * from './sayAloud';
|
|
19
|
-
export * from './
|
|
19
|
+
export * from './handsFreeRules';
|
|
20
20
|
export { HandsFree, type HandsFreeProps } from './HandsFree';
|
|
21
21
|
export * from './speaker';
|
|
22
22
|
export * from './consent';
|
package/lib/voice/index.js
CHANGED
|
@@ -2,25 +2,25 @@
|
|
|
2
2
|
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
|
-
export * from './types';
|
|
6
|
-
export * from './sentences';
|
|
7
|
-
export * from './keptSound';
|
|
8
|
-
export * from './pinned';
|
|
9
|
-
export * from './capture';
|
|
10
|
-
export * from './hearing';
|
|
11
|
-
export * from './serverHearing';
|
|
12
|
-
export * from './sayAloud';
|
|
13
|
-
export * from './
|
|
14
|
-
export { HandsFree } from './HandsFree';
|
|
15
|
-
export * from './speaker';
|
|
16
|
-
export * from './consent';
|
|
17
|
-
export * from './settings';
|
|
18
|
-
export * from './choices';
|
|
19
|
-
export { useVoiceSettings } from './useVoiceSettings';
|
|
20
|
-
export { VoiceMenu } from './VoiceMenu';
|
|
21
|
-
export * from './useSpokenAnswers';
|
|
22
|
-
export { VoiceInput } from './VoiceInput';
|
|
23
|
-
export { ReadAloud, readAloud, readsAloud } from './ReadAloud';
|
|
24
|
-
export { DATALAYER_SPEECH_MODELS_URL, DATALAYER_VOICE_ENGINES, chatVoiceOf, settledVoice, } from './chatVoice';
|
|
25
|
-
export { useVoiceSpeaker } from './useVoiceSpeaker';
|
|
26
|
-
export { ComposerVoice, spokenOf } from './ComposerVoice';
|
|
5
|
+
export * from './types.js';
|
|
6
|
+
export * from './sentences.js';
|
|
7
|
+
export * from './keptSound.js';
|
|
8
|
+
export * from './pinned.js';
|
|
9
|
+
export * from './capture.js';
|
|
10
|
+
export * from './hearing.js';
|
|
11
|
+
export * from './serverHearing.js';
|
|
12
|
+
export * from './sayAloud.js';
|
|
13
|
+
export * from './handsFreeRules.js';
|
|
14
|
+
export { HandsFree } from './HandsFree.js';
|
|
15
|
+
export * from './speaker.js';
|
|
16
|
+
export * from './consent.js';
|
|
17
|
+
export * from './settings.js';
|
|
18
|
+
export * from './choices.js';
|
|
19
|
+
export { useVoiceSettings } from './useVoiceSettings.js';
|
|
20
|
+
export { VoiceMenu } from './VoiceMenu.js';
|
|
21
|
+
export * from './useSpokenAnswers.js';
|
|
22
|
+
export { VoiceInput } from './VoiceInput.js';
|
|
23
|
+
export { ReadAloud, readAloud, readsAloud } from './ReadAloud.js';
|
|
24
|
+
export { DATALAYER_SPEECH_MODELS_URL, DATALAYER_VOICE_ENGINES, chatVoiceOf, settledVoice, } from './chatVoice.js';
|
|
25
|
+
export { useVoiceSpeaker } from './useVoiceSpeaker.js';
|
|
26
|
+
export { ComposerVoice, spokenOf } from './ComposerVoice.js';
|
package/lib/voice/keptSound.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
*
|
|
13
13
|
* @module voice/keptSound
|
|
14
14
|
*/
|
|
15
|
-
import { HEARING_RATE } from './capture';
|
|
15
|
+
import { HEARING_RATE } from './capture.js';
|
|
16
16
|
/** The longest a sound is kept, whatever the record keeps (decision 10). */
|
|
17
17
|
export const AUDIO_KEPT_DAYS_AT_MOST = 30;
|
|
18
18
|
/** The most of a turn kept: a minute. */
|
package/lib/voice/pinned.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*
|
|
12
12
|
* @module voice/pinned
|
|
13
13
|
*/
|
|
14
|
-
import { SPEECH_MODEL_CATALOGUE } from '../specs/voices';
|
|
14
|
+
import { SPEECH_MODEL_CATALOGUE } from '../specs/voices.js';
|
|
15
15
|
/** A file of a model that is not the one the catalogue pins, or not reachable. */
|
|
16
16
|
export class PinRefused extends Error {
|
|
17
17
|
}
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
*
|
|
28
28
|
* @module voice/serverHearing
|
|
29
29
|
*/
|
|
30
|
-
import { transcriberFor } from '../specs/voices';
|
|
31
|
-
import { HEARING_RATE } from './capture';
|
|
30
|
+
import { transcriberFor } from '../specs/voices.js';
|
|
31
|
+
import { HEARING_RATE } from './capture.js';
|
|
32
32
|
/** Where the speech service hears a recording, on ai-agents' host. */
|
|
33
33
|
export const TRANSCRIPTIONS_PATH = '/api/ai-agents/v1/speech/transcriptions';
|
|
34
34
|
/** Where the speech service hears speech as it is said. */
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* @module voice/useSpokenAnswers
|
|
12
12
|
*/
|
|
13
13
|
import { useEffect, useRef } from 'react';
|
|
14
|
-
import { SentenceCutter } from './sentences';
|
|
14
|
+
import { SentenceCutter } from './sentences.js';
|
|
15
15
|
/** An item's text, when it is the agent's own answer and not a tool call. */
|
|
16
16
|
export function answerText(item) {
|
|
17
17
|
const message = item;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @module voice/useVoiceSettings
|
|
10
10
|
*/
|
|
11
11
|
import { useCallback, useEffect, useState } from 'react';
|
|
12
|
-
import { heldVoiceSettings, keepVoiceSettings, onVoiceSettingsChange, } from './settings';
|
|
12
|
+
import { heldVoiceSettings, keepVoiceSettings, onVoiceSettingsChange, } from './settings.js';
|
|
13
13
|
/** The person's settings, and a setter that keeps them and tells every chat. */
|
|
14
14
|
export function useVoiceSettings() {
|
|
15
15
|
const [settings, setSettings] = useState(heldVoiceSettings);
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
* @module voice/useVoiceSpeaker
|
|
13
13
|
*/
|
|
14
14
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
15
|
-
import { readAloud } from './ReadAloud';
|
|
16
|
-
import { ServerSpeaker } from './speaker';
|
|
15
|
+
import { readAloud } from './ReadAloud.js';
|
|
16
|
+
import { ServerSpeaker } from './speaker.js';
|
|
17
17
|
/**
|
|
18
18
|
* The speaker of a chat's voice, or none: `voice` undefined, its `output`
|
|
19
19
|
* `off`, or `on` false (a host that speaks for the chat).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datalayer/agent-runtimes",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.75",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"workspaces": [
|
|
6
6
|
".",
|
|
@@ -54,16 +54,17 @@
|
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"apply:patches": "bash scripts/apply-patches.sh",
|
|
57
|
-
"build": "npm run clean && gulp resources-to-lib && tsc -b && cross-env NODE_OPTIONS=--max-old-space-size=8192 vite build && npm run build:embed",
|
|
57
|
+
"build": "npm run clean && gulp resources-to-lib && tsc -b && node scripts/fully-specify-lib.mjs && cross-env NODE_OPTIONS=--max-old-space-size=8192 vite build && npm run build:embed",
|
|
58
58
|
"build-storybook": "storybook build",
|
|
59
59
|
"build:all": "npm run build && npm run build:examples",
|
|
60
60
|
"build:embed": "cross-env NODE_OPTIONS=--max-old-space-size=8192 vite build --config vite.embed.config.ts",
|
|
61
61
|
"dist-embed": "node scripts/dist-embed.mjs",
|
|
62
62
|
"dist-embed:release": "node scripts/dist-embed.mjs --release",
|
|
63
63
|
"build:examples": "npm run build:nextjs",
|
|
64
|
-
"build:lib": "npm run clean:lib && gulp resources-to-lib && tsc -b",
|
|
64
|
+
"build:lib": "npm run clean:lib && gulp resources-to-lib && tsc -b && node scripts/fully-specify-lib.mjs",
|
|
65
65
|
"build:nextjs": "npm run build --workspace=nextjs-notebook-example",
|
|
66
66
|
"build:types": "npm run clean:lib && tsc -b",
|
|
67
|
+
"check:pack": "node scripts/check-npm-pack.mjs",
|
|
67
68
|
"check": "npm run format:check && npm run lint:all && npm run type-check:all && npm run typedoc",
|
|
68
69
|
"check:environments-generated": "python scripts/generate-environments-types.py --check",
|
|
69
70
|
"check:fix": "npm run format:all && npm run lint:fix && npm run type-check:all",
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
4
|
+
* Distributed under the terms of the Modified BSD License.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Refuses a package whose tarball does not carry what its `lib/` imports.
|
|
9
|
+
*
|
|
10
|
+
* Lists the tarball with `npm pack --dry-run --json` and reads every
|
|
11
|
+
* `lib/**\/*.js` in it: each relative specifier must name a file the
|
|
12
|
+
* tarball carries, written whole (`'./approvals.js'`, not `'./approvals'`:
|
|
13
|
+
* Node's ESM loader adds no extension and looks up no `index.js`). And no
|
|
14
|
+
* two files of the tarball may have paths that differ only in case: on a
|
|
15
|
+
* case-insensitive file system (macOS, Windows) one overwrites the other
|
|
16
|
+
* when the package is installed (`voice/HandsFree.js` and
|
|
17
|
+
* `voice/handsFree.js` did). Prints each refusal and exits 1. Run it after
|
|
18
|
+
* the build and before `npm pack`.
|
|
19
|
+
*
|
|
20
|
+
* Usage: node scripts/check-npm-pack.mjs
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
import { execFileSync } from 'node:child_process';
|
|
24
|
+
import { readFileSync } from 'node:fs';
|
|
25
|
+
import { relativeSpecifiers, resolveSpecifier } from './esm-specifiers.mjs';
|
|
26
|
+
|
|
27
|
+
const listing = JSON.parse(
|
|
28
|
+
execFileSync('npm', ['pack', '--dry-run', '--json', '--ignore-scripts'], {
|
|
29
|
+
encoding: 'utf8',
|
|
30
|
+
maxBuffer: 256 * 1024 * 1024,
|
|
31
|
+
stdio: ['ignore', 'pipe', 'inherit'],
|
|
32
|
+
}),
|
|
33
|
+
);
|
|
34
|
+
const packed = new Set(listing[0].files.map(({ path }) => path));
|
|
35
|
+
const isFile = path => packed.has(path);
|
|
36
|
+
|
|
37
|
+
const refused = [];
|
|
38
|
+
|
|
39
|
+
const byFolded = new Map();
|
|
40
|
+
for (const path of packed) {
|
|
41
|
+
const folded = path.toLowerCase();
|
|
42
|
+
const other = byFolded.get(folded);
|
|
43
|
+
if (other) {
|
|
44
|
+
refused.push(`${other} and ${path} differ only in case`);
|
|
45
|
+
} else {
|
|
46
|
+
byFolded.set(folded, path);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
let read = 0;
|
|
51
|
+
let specifiers = 0;
|
|
52
|
+
for (const file of [...packed].filter(
|
|
53
|
+
path => path.startsWith('lib/') && path.endsWith('.js'),
|
|
54
|
+
)) {
|
|
55
|
+
read += 1;
|
|
56
|
+
for (const { specifier } of relativeSpecifiers(readFileSync(file, 'utf8'))) {
|
|
57
|
+
specifiers += 1;
|
|
58
|
+
const { status, whole } = resolveSpecifier(file, specifier, isFile);
|
|
59
|
+
if (status === 'missing') {
|
|
60
|
+
refused.push(`${file}: '${specifier}' names no file in the tarball`);
|
|
61
|
+
} else if (status === 'partial') {
|
|
62
|
+
refused.push(
|
|
63
|
+
`${file}: '${specifier}' is not written whole (Node needs '${whole}')`,
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
console.log(
|
|
69
|
+
`check-npm-pack: ${listing[0].name}@${listing[0].version}, ${packed.size} files, ${specifiers} relative specifiers in ${read} lib/ modules`,
|
|
70
|
+
);
|
|
71
|
+
if (refused.length > 0) {
|
|
72
|
+
console.error(refused.slice(0, 200).join('\n'));
|
|
73
|
+
if (refused.length > 200) console.error(`… and ${refused.length - 200} more`);
|
|
74
|
+
console.error(`check-npm-pack: ${refused.length} refused`);
|
|
75
|
+
process.exit(1);
|
|
76
|
+
}
|
|
77
|
+
console.log('check-npm-pack: every relative import of lib/ is in the tarball');
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The relative module specifiers of a compiled ES module, as Node reads them.
|
|
8
|
+
*
|
|
9
|
+
* `tsc` with `moduleResolution: bundler` keeps a source's specifiers as they
|
|
10
|
+
* are written (`'./approvals'`, `'./chat'`), which a bundler resolves and
|
|
11
|
+
* Node's ESM loader refuses: it takes a relative specifier as a file path,
|
|
12
|
+
* with no extension added and no directory's `index.js` looked up. So
|
|
13
|
+
* `lib/` is made loadable by Node (vitest's externalized dependencies, a
|
|
14
|
+
* Node service importing `lib/portable`) by writing each specifier whole
|
|
15
|
+
* (`fully-specify-lib.mjs`), and the packed tarball is checked for a
|
|
16
|
+
* specifier that names a file it does not carry (`check-npm-pack.mjs`).
|
|
17
|
+
*
|
|
18
|
+
* Comments are not read: TypeScript's own pre-processor lists the imports,
|
|
19
|
+
* the exports and the dynamic imports of a file.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
import ts from 'typescript';
|
|
23
|
+
import { posix } from 'node:path';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Every relative specifier of `text`, with the offset of its first
|
|
27
|
+
* character in `text`.
|
|
28
|
+
*
|
|
29
|
+
* @param {string} text A compiled JavaScript module.
|
|
30
|
+
* @returns {{ specifier: string, start: number }[]}
|
|
31
|
+
*/
|
|
32
|
+
export function relativeSpecifiers(text) {
|
|
33
|
+
const { importedFiles } = ts.preProcessFile(text, true, true);
|
|
34
|
+
const found = [];
|
|
35
|
+
for (const { fileName, pos } of importedFiles) {
|
|
36
|
+
if (!fileName.startsWith('./') && !fileName.startsWith('../')) continue;
|
|
37
|
+
const start = text.indexOf(fileName, pos);
|
|
38
|
+
if (start < 0) {
|
|
39
|
+
throw new Error(`the specifier ${fileName} is not at ${pos}`);
|
|
40
|
+
}
|
|
41
|
+
found.push({ specifier: fileName, start });
|
|
42
|
+
}
|
|
43
|
+
return found;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* What a specifier of `from` names, given the files there are.
|
|
48
|
+
*
|
|
49
|
+
* @param {string} from The importing file, a posix path.
|
|
50
|
+
* @param {string} specifier A relative specifier.
|
|
51
|
+
* @param {(path: string) => boolean} isFile Whether a file is there.
|
|
52
|
+
* @returns {{ status: 'whole' | 'partial' | 'missing', path?: string, whole?: string }}
|
|
53
|
+
* `whole`: the specifier names a file; `partial`: it names a file only
|
|
54
|
+
* once `.js` or `/index.js` is added (`whole` is the specifier written
|
|
55
|
+
* so); `missing`: no file.
|
|
56
|
+
*/
|
|
57
|
+
export function resolveSpecifier(from, specifier, isFile) {
|
|
58
|
+
const query = specifier.search(/[?#]/);
|
|
59
|
+
const bare = query < 0 ? specifier : specifier.slice(0, query);
|
|
60
|
+
const target = posix.normalize(posix.join(posix.dirname(from), bare));
|
|
61
|
+
if (isFile(target)) return { status: 'whole', path: target };
|
|
62
|
+
if (query < 0) {
|
|
63
|
+
if (isFile(`${target}.js`)) {
|
|
64
|
+
return { status: 'partial', path: `${target}.js`, whole: `${bare}.js` };
|
|
65
|
+
}
|
|
66
|
+
const index = posix.join(target, 'index.js');
|
|
67
|
+
if (isFile(index)) {
|
|
68
|
+
return {
|
|
69
|
+
status: 'partial',
|
|
70
|
+
path: index,
|
|
71
|
+
whole: `${bare.replace(/\/$/, '')}/index.js`,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return { status: 'missing' };
|
|
76
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
4
|
+
* Distributed under the terms of the Modified BSD License.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Writes each relative specifier of `lib/**\/*.js` whole, after `tsc`:
|
|
9
|
+
* `'./approvals'` becomes `'./approvals.js'`, `'./chat'` (a folder)
|
|
10
|
+
* `'./chat/index.js'`, so Node's ESM loader reads `lib/` as a bundler does.
|
|
11
|
+
* A specifier that already names a file, or names none, is left as it is
|
|
12
|
+
* (`check-npm-pack.mjs` refuses the second). Run again, it changes nothing.
|
|
13
|
+
*
|
|
14
|
+
* Usage: node scripts/fully-specify-lib.mjs [lib]
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { readdirSync, readFileSync, statSync, writeFileSync } from 'node:fs';
|
|
18
|
+
import { join, relative, resolve, sep } from 'node:path';
|
|
19
|
+
import { relativeSpecifiers, resolveSpecifier } from './esm-specifiers.mjs';
|
|
20
|
+
|
|
21
|
+
const root = resolve(process.argv[2] ?? 'lib');
|
|
22
|
+
const posixOf = path => relative(root, path).split(sep).join('/');
|
|
23
|
+
|
|
24
|
+
const files = [];
|
|
25
|
+
const walk = dir => {
|
|
26
|
+
for (const name of readdirSync(dir)) {
|
|
27
|
+
const path = join(dir, name);
|
|
28
|
+
if (statSync(path).isDirectory()) walk(path);
|
|
29
|
+
else files.push(posixOf(path));
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
walk(root);
|
|
33
|
+
const present = new Set(files);
|
|
34
|
+
const isFile = path => present.has(path);
|
|
35
|
+
|
|
36
|
+
let rewritten = 0;
|
|
37
|
+
let changedFiles = 0;
|
|
38
|
+
for (const file of files.filter(name => name.endsWith('.js'))) {
|
|
39
|
+
const path = join(root, file);
|
|
40
|
+
const text = readFileSync(path, 'utf8');
|
|
41
|
+
const edits = relativeSpecifiers(text)
|
|
42
|
+
.map(({ specifier, start }) => ({
|
|
43
|
+
specifier,
|
|
44
|
+
start,
|
|
45
|
+
...resolveSpecifier(file, specifier, isFile),
|
|
46
|
+
}))
|
|
47
|
+
.filter(({ status }) => status === 'partial');
|
|
48
|
+
if (edits.length === 0) continue;
|
|
49
|
+
let out = text;
|
|
50
|
+
for (const { specifier, start, whole } of edits.sort(
|
|
51
|
+
(a, b) => b.start - a.start,
|
|
52
|
+
)) {
|
|
53
|
+
out = out.slice(0, start) + whole + out.slice(start + specifier.length);
|
|
54
|
+
}
|
|
55
|
+
writeFileSync(path, out);
|
|
56
|
+
rewritten += edits.length;
|
|
57
|
+
changedFiles += 1;
|
|
58
|
+
}
|
|
59
|
+
console.log(
|
|
60
|
+
`fully-specify-lib: ${rewritten} specifiers written whole in ${changedFiles} of ${files.length} files under ${posixOf(root) || root}`,
|
|
61
|
+
);
|
|
File without changes
|
|
File without changes
|