@datalayer/agent-runtimes 1.0.9 → 1.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +82 -1
- package/lib/{AgentLexical.d.ts → AgentDocument.d.ts} +5 -5
- package/lib/{AgentLexical.js → AgentDocument.js} +156 -26
- package/lib/AgentNode.js +32 -31
- package/lib/AgentNotebook.js +172 -17
- package/lib/AppExamples2.css +47 -0
- package/lib/AppExamples2.d.ts +3 -0
- package/lib/AppExamples2.js +21 -0
- package/lib/{agent-lexical-main.js → agent-document-main.js} +2 -2
- package/lib/agents/AgentRuntimeChat.d.ts +73 -0
- package/lib/agents/AgentRuntimeChat.js +198 -0
- package/lib/api/index.d.ts +12 -0
- package/lib/api/index.js +46 -0
- package/lib/api/runtimes/checkpoints.d.ts +122 -0
- package/lib/api/runtimes/checkpoints.js +118 -0
- package/lib/api/runtimes/environments.d.ts +9 -0
- package/lib/api/runtimes/environments.js +29 -0
- package/lib/api/runtimes/healthz.d.ts +15 -0
- package/lib/api/runtimes/healthz.js +44 -0
- package/lib/api/runtimes/index.d.ts +12 -0
- package/lib/api/runtimes/index.js +16 -0
- package/lib/api/runtimes/runtimes.d.ts +138 -0
- package/lib/api/runtimes/runtimes.js +230 -0
- package/lib/api/runtimes/snapshots.d.ts +38 -0
- package/lib/api/runtimes/snapshots.js +82 -0
- package/lib/api/scheduler/index.d.ts +6 -0
- package/lib/api/scheduler/index.js +10 -0
- package/lib/api/scheduler/schedules.d.ts +85 -0
- package/lib/api/scheduler/schedules.js +78 -0
- package/lib/api/spacer/documents.d.ts +12 -0
- package/lib/api/spacer/documents.js +43 -0
- package/lib/api/spacer/healthz.d.ts +15 -0
- package/lib/api/spacer/healthz.js +44 -0
- package/lib/api/spacer/index.d.ts +15 -0
- package/lib/api/spacer/index.js +19 -0
- package/lib/api/spacer/items.d.ts +25 -0
- package/lib/api/spacer/items.js +55 -0
- package/lib/api/spacer/lexicals.d.ts +34 -0
- package/lib/api/spacer/lexicals.js +89 -0
- package/lib/api/spacer/notebooks.d.ts +34 -0
- package/lib/api/spacer/notebooks.js +89 -0
- package/lib/api/spacer/spaces.d.ts +84 -0
- package/lib/api/spacer/spaces.js +170 -0
- package/lib/api/spacer/users.d.ts +9 -0
- package/lib/api/spacer/users.js +29 -0
- package/lib/chat/Chat.d.ts +1 -1
- package/lib/chat/Chat.js +54 -54
- package/lib/chat/ChatFloating.d.ts +2 -2
- package/lib/chat/ChatFloating.js +136 -25
- package/lib/chat/ChatSidebar.js +20 -22
- package/lib/chat/base/ChatBase.js +468 -40
- package/lib/chat/display/EmptyState.js +21 -21
- package/lib/chat/document/EphemeralDocument.d.ts +23 -0
- package/lib/chat/document/EphemeralDocument.js +270 -0
- package/lib/chat/header/ChatHeaderBase.d.ts +12 -2
- package/lib/chat/header/ChatHeaderBase.js +78 -23
- package/lib/chat/index.d.ts +1 -0
- package/lib/chat/index.js +2 -0
- package/lib/chat/notebook/EphemeralNotebook.d.ts +24 -0
- package/lib/chat/notebook/EphemeralNotebook.js +252 -0
- package/lib/chat/prompt/InputFooter.js +4 -1
- package/lib/client/AgentRuntimesClient.d.ts +127 -0
- package/lib/client/AgentRuntimesClient.js +36 -0
- package/lib/client/AgentsMixin.d.ts +4 -4
- package/lib/client/AgentsMixin.js +35 -35
- package/lib/client/SdkAgentRuntimesClient.d.ts +1 -1
- package/lib/client/SdkAgentRuntimesClient.js +1 -1
- package/lib/client/mixins/RuntimesMixin.d.ts +93 -0
- package/lib/client/mixins/RuntimesMixin.js +229 -0
- package/lib/client/mixins/SpacerMixin.d.ts +210 -0
- package/lib/client/mixins/SpacerMixin.js +615 -0
- package/lib/client/utils/spacerUtils.d.ts +18 -0
- package/lib/client/utils/spacerUtils.js +32 -0
- package/lib/collaboration/DatalayerCollaboration.d.ts +13 -0
- package/lib/collaboration/DatalayerCollaboration.js +28 -0
- package/lib/collaboration/DatalayerCollaborationProvider.d.ts +58 -0
- package/lib/collaboration/DatalayerCollaborationProvider.js +148 -0
- package/lib/collaboration/index.d.ts +2 -0
- package/lib/collaboration/index.js +6 -0
- package/lib/components/AgentSummary.d.ts +19 -0
- package/lib/components/AgentSummary.js +89 -0
- package/lib/components/ToolApprovalCard.js +13 -3
- package/lib/components/a2ui/A2uiSurfaceComposed.d.ts +13 -0
- package/lib/components/a2ui/A2uiSurfaceComposed.js +110 -0
- package/lib/components/a2ui/index.d.ts +2 -0
- package/lib/components/a2ui/index.js +6 -0
- package/lib/components/a2ui/styles.d.ts +14 -0
- package/lib/components/a2ui/styles.js +142 -0
- package/lib/components/context/SpaceSelect.d.ts +2 -0
- package/lib/components/context/SpaceSelect.js +42 -0
- package/lib/components/flashes/FlashDisclaimer.d.ts +2 -0
- package/lib/components/flashes/FlashDisclaimer.js +17 -0
- package/lib/components/icons/ArtifactIcon.d.ts +10 -0
- package/lib/components/icons/ArtifactIcon.js +58 -0
- package/lib/components/icons/index.d.ts +1 -0
- package/lib/components/icons/index.js +5 -0
- package/lib/components/index.d.ts +5 -0
- package/lib/components/index.js +5 -0
- package/lib/components/nbgrader/NbGradesDetails.d.ts +5 -0
- package/lib/components/nbgrader/NbGradesDetails.js +19 -0
- package/lib/components/nbgrader/index.d.ts +1 -0
- package/lib/components/nbgrader/index.js +5 -0
- package/lib/components/progress/CreditsIndicator.d.ts +33 -0
- package/lib/components/progress/CreditsIndicator.js +23 -0
- package/lib/components/progress/index.d.ts +2 -0
- package/lib/components/progress/index.js +6 -0
- package/lib/components/runtimes/RuntimeCellVariables.d.ts +39 -0
- package/lib/components/runtimes/RuntimeCellVariables.js +172 -0
- package/lib/components/runtimes/RuntimeCellVariablesDialog.d.ts +37 -0
- package/lib/components/runtimes/RuntimeCellVariablesDialog.js +101 -0
- package/lib/components/runtimes/RuntimeLauncherDialog.d.ts +57 -0
- package/lib/components/runtimes/RuntimeLauncherDialog.js +275 -0
- package/lib/components/runtimes/RuntimePickerBase.d.ts +69 -0
- package/lib/components/runtimes/RuntimePickerBase.js +122 -0
- package/lib/components/runtimes/RuntimePickerCell.d.ts +34 -0
- package/lib/components/runtimes/RuntimePickerCell.js +104 -0
- package/lib/components/runtimes/RuntimePickerNotebook.d.ts +42 -0
- package/lib/components/runtimes/RuntimePickerNotebook.js +232 -0
- package/lib/components/runtimes/RuntimeReservationControl.d.ts +47 -0
- package/lib/components/runtimes/RuntimeReservationControl.js +42 -0
- package/lib/components/runtimes/RuntimeSimplePicker.d.ts +38 -0
- package/lib/components/runtimes/RuntimeSimplePicker.js +155 -0
- package/lib/components/runtimes/RuntimeTransfer.d.ts +16 -0
- package/lib/components/runtimes/RuntimeTransfer.js +5 -0
- package/lib/components/runtimes/RuntimeUtils.d.ts +17 -0
- package/lib/components/runtimes/RuntimeUtils.js +178 -0
- package/lib/components/runtimes/RuntimeVariables.d.ts +38 -0
- package/lib/components/runtimes/RuntimeVariables.js +75 -0
- package/lib/components/runtimes/index.d.ts +11 -0
- package/lib/components/runtimes/index.js +15 -0
- package/lib/components/scheduler/ScheduleMenu.d.ts +54 -0
- package/lib/components/scheduler/ScheduleMenu.js +154 -0
- package/lib/components/scheduler/index.d.ts +1 -0
- package/lib/components/scheduler/index.js +5 -0
- package/lib/components/snapshots/SandboxSnapshotMenu.d.ts +33 -0
- package/lib/components/snapshots/SandboxSnapshotMenu.js +169 -0
- package/lib/components/snapshots/index.d.ts +1 -0
- package/lib/components/snapshots/index.js +5 -0
- package/lib/components/snippets/SnippetDialog.d.ts +42 -0
- package/lib/components/snippets/SnippetDialog.js +42 -0
- package/lib/components/students/StudentItemStatus.d.ts +7 -0
- package/lib/components/students/StudentItemStatus.js +68 -0
- package/lib/components/students/index.d.ts +1 -0
- package/lib/components/students/index.js +5 -0
- package/lib/components/tokens/SpaceVariantToken.d.ts +5 -0
- package/lib/components/tokens/SpaceVariantToken.js +23 -0
- package/lib/components/tokens/index.d.ts +1 -0
- package/lib/components/tokens/index.js +5 -0
- package/lib/components/toolbars/AssignmentEditorToolbar.d.ts +4 -0
- package/lib/components/toolbars/AssignmentEditorToolbar.js +18 -0
- package/lib/components/toolbars/DocumentEditorToolbar.d.ts +2 -0
- package/lib/components/toolbars/DocumentEditorToolbar.js +12 -0
- package/lib/components/toolbars/NotebookEditorToolbar.d.ts +29 -0
- package/lib/components/toolbars/NotebookEditorToolbar.js +30 -0
- package/lib/config/AgentConfiguration.d.ts +2 -2
- package/lib/config/index.d.ts +1 -1
- package/lib/context/ContextInspector.d.ts +1 -14
- package/lib/context/ContextInspector.js +3 -73
- package/lib/context/CostUsageChart.d.ts +4 -3
- package/lib/context/CostUsageChart.js +236 -35
- package/lib/context/MessageHistory.d.ts +30 -0
- package/lib/context/MessageHistory.js +129 -0
- package/lib/context/TokenUsageChart.d.ts +4 -3
- package/lib/context/TokenUsageChart.js +180 -30
- package/lib/context/TurnGraphChart.d.ts +1 -1
- package/lib/context/TurnGraphChart.js +6 -6
- package/lib/examples/A2UiAgentExample.d.ts +22 -0
- package/lib/examples/A2UiAgentExample.js +442 -0
- package/lib/examples/A2UiComponentsGalleryExample.d.ts +3 -0
- package/lib/examples/A2UiComponentsGalleryExample.js +863 -0
- package/lib/examples/A2UiContactCardExample.js +9 -5
- package/lib/examples/A2UiRestaurantExample.js +23 -8
- package/lib/examples/A2UiViewerExample.js +75 -3
- package/lib/examples/AgUiAgenticExample.d.ts +1 -12
- package/lib/examples/AgUiAgenticExample.js +52 -8
- package/lib/examples/AgUiBackendToolRenderingExample.d.ts +1 -16
- package/lib/examples/AgUiBackendToolRenderingExample.js +32 -17
- package/lib/examples/AgUiHaikuGenUiExample.d.ts +1 -17
- package/lib/examples/AgUiHaikuGenUiExample.js +49 -33
- package/lib/examples/AgUiHumanInTheLoopExample.d.ts +1 -12
- package/lib/examples/AgUiHumanInTheLoopExample.js +21 -6
- package/lib/examples/AgUiSharedStateExample.d.ts +1 -14
- package/lib/examples/AgUiSharedStateExample.js +21 -6
- package/lib/examples/AgUiToolsBasedGenUiExample.d.ts +1 -14
- package/lib/examples/AgUiToolsBasedGenUiExample.js +21 -6
- package/lib/examples/AgentCheckpointsExample.d.ts +1 -1
- package/lib/examples/AgentCheckpointsExample.js +21 -22
- package/lib/examples/AgentCodemodeExample.js +3 -3
- package/lib/examples/AgentEvalsExample.js +8 -8
- package/lib/examples/AgentGuardrailsExample.js +22 -17
- package/lib/examples/AgentHooksExample.js +16 -57
- package/lib/examples/AgentInferenceProviderExample.js +8 -8
- package/lib/examples/AgentLoopExample.d.ts +10 -0
- package/lib/examples/AgentLoopExample.js +304 -0
- package/lib/examples/AgentMCPExample.js +9 -9
- package/lib/examples/AgentMemoryExample.js +6 -6
- package/lib/examples/AgentMonitoringExample.js +116 -46
- package/lib/examples/AgentNotificationsExample.js +6 -6
- package/lib/examples/AgentOtelExample.d.ts +3 -3
- package/lib/examples/AgentOtelExample.js +20 -15
- package/lib/examples/AgentOutputsExample.js +8 -8
- package/lib/examples/AgentParametersExample.js +24 -36
- package/lib/examples/AgentSandboxExample.js +7 -7
- package/lib/examples/AgentSkillsExample.js +9 -9
- package/lib/examples/AgentSubagentsExample.js +6 -6
- package/lib/examples/AgentToolApprovalsExample.js +37 -11
- package/lib/examples/AgentTriggersExample.js +12 -12
- package/lib/examples/AgentspecsExample.js +63 -41
- package/lib/examples/ChatCustomExample.js +23 -77
- package/lib/examples/ChatExample.js +15 -46
- package/lib/examples/LexicalAgentExample.js +43 -91
- package/lib/examples/LexicalAgentSidebarExample.js +45 -73
- package/lib/examples/NotebookAgentExample.js +52 -81
- package/lib/examples/NotebookAgentSidebarExample.js +43 -71
- package/lib/examples/NotebookCollaborationExample.js +11 -9
- package/lib/examples/NotebookExample.js +5 -2
- package/lib/examples/components/AuthRequiredView.js +1 -1
- package/lib/examples/components/ExampleErrorBoundary.d.ts +46 -0
- package/lib/examples/components/ExampleErrorBoundary.js +67 -0
- package/lib/examples/components/haiku/haiku-card.css +11 -0
- package/lib/examples/components/weather/weather-card.css +11 -0
- package/lib/examples/example-selector.js +3 -1
- package/lib/examples/hooks/useExampleAgentRuntime.d.ts +35 -0
- package/lib/examples/hooks/useExampleAgentRuntime.js +82 -0
- package/lib/examples/hooks/useSpecRenderToolResult.d.ts +30 -0
- package/lib/examples/hooks/useSpecRenderToolResult.js +61 -0
- package/lib/examples/index.d.ts +3 -1
- package/lib/examples/index.js +3 -1
- package/lib/examples/main.js +340 -93
- package/lib/examples/utils/a2ui.d.ts +2 -0
- package/lib/examples/utils/a2ui.js +97 -2
- package/lib/examples/utils/agentSummaryStore.d.ts +21 -0
- package/lib/examples/utils/agentSummaryStore.js +23 -0
- package/lib/examples/utils/notebooks/Empty.ipynb.json +30 -30
- package/lib/examples/utils/runtimeTargetStore.d.ts +9 -0
- package/lib/examples/utils/runtimeTargetStore.js +27 -0
- package/lib/examples/utils/teardownAgents.d.ts +13 -0
- package/lib/examples/utils/teardownAgents.js +78 -0
- package/lib/examples/utils/useExampleAgentRuntimesUrl.d.ts +2 -0
- package/lib/examples/utils/useExampleAgentRuntimesUrl.js +26 -7
- package/lib/examples2/CellExample.d.ts +6 -0
- package/lib/examples2/CellExample.js +20 -0
- package/lib/examples2/DatalayerNotebookExample.d.ts +16 -0
- package/lib/examples2/DatalayerNotebookExample.js +109 -0
- package/lib/examples2/NativeNavigationExample.d.ts +8 -0
- package/lib/examples2/NativeNavigationExample.js +97 -0
- package/lib/examples2/NotebookExample.d.ts +6 -0
- package/lib/examples2/NotebookExample.js +19 -0
- package/lib/examples2/NotebookMutationsKernel.d.ts +2 -0
- package/lib/examples2/NotebookMutationsKernel.js +105 -0
- package/lib/examples2/NotebookMutationsServiceManager.d.ts +2 -0
- package/lib/examples2/NotebookMutationsServiceManager.js +109 -0
- package/lib/examples2/ReactRouterExample.d.ts +6 -0
- package/lib/examples2/ReactRouterExample.js +175 -0
- package/lib/examples2/example-selector.d.ts +22 -0
- package/lib/examples2/example-selector.js +45 -0
- package/lib/examples2/index.d.ts +2 -0
- package/lib/examples2/index.js +6 -0
- package/lib/examples2/lexical-theme.css +436 -0
- package/lib/examples2/main.d.ts +2 -0
- package/lib/examples2/main.js +330 -0
- package/lib/examples2/notebooks/IPyWidgetsExample.ipynb.json +101 -0
- package/lib/examples2/notebooks/IPyWidgetsExampleWithState.ipynb.json +112 -0
- package/lib/examples2/notebooks/Lite.ipynb.json +128 -0
- package/lib/examples2/notebooks/Matplotlib.ipynb.json +137 -0
- package/lib/examples2/notebooks/NotebookExample1.ipynb.json +126 -0
- package/lib/examples2/notebooks/NotebookExample2.ipynb.json +48 -0
- package/lib/examples2/notebooks/NotebookOutputs.ipynb.json +49 -0
- package/lib/examples2/notebooks/NotebookToCExample.ipynb.json +102 -0
- package/lib/examples2/notebooks/OutputIPyWidgetsExample.d.ts +145 -0
- package/lib/examples2/notebooks/OutputIPyWidgetsExample.js +153 -0
- package/lib/examples2/notebooks/PyGWalker.ipynb.json +55 -0
- package/lib/hooks/index.d.ts +9 -1
- package/lib/hooks/index.js +13 -1
- package/lib/hooks/useAIAgentsWebSocket.d.ts +1 -1
- package/lib/hooks/useAIAgentsWebSocket.js +39 -3
- package/lib/hooks/useAgentRuntimes.d.ts +15 -3
- package/lib/hooks/useAgentRuntimes.js +188 -29
- package/lib/hooks/useAgentsCatalog.d.ts +3 -3
- package/lib/hooks/useAgentsCatalog.js +4 -4
- package/lib/hooks/useAgentsService.js +5 -5
- package/lib/hooks/useCellOutputshot.d.ts +4 -0
- package/lib/hooks/useCellOutputshot.js +25 -0
- package/lib/hooks/useCheckpoints.d.ts +8 -8
- package/lib/hooks/useCheckpoints.js +38 -28
- package/lib/hooks/useConfig.d.ts +1 -1
- package/lib/hooks/useMonitoring.d.ts +7 -5
- package/lib/hooks/useMonitoring.js +16 -10
- package/lib/hooks/useNotifications.d.ts +11 -11
- package/lib/hooks/useNotifications.js +1 -1
- package/lib/hooks/useProgressStore.d.ts +25 -0
- package/lib/hooks/useProgressStore.js +58 -0
- package/lib/hooks/useProgressTask.d.ts +9 -0
- package/lib/hooks/useProgressTask.js +41 -0
- package/lib/hooks/useProjects.d.ts +628 -0
- package/lib/hooks/useProjects.js +190 -0
- package/lib/hooks/useRuntimes.d.ts +5 -0
- package/lib/hooks/useRuntimes.js +34 -0
- package/lib/hooks/useToolApprovals.d.ts +14 -6
- package/lib/hooks/useToolApprovals.js +20 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +1 -0
- package/lib/jupyter/exec/Python.d.ts +5 -0
- package/lib/jupyter/exec/Python.js +100 -0
- package/lib/jupyter/exec/Snippets.d.ts +105 -0
- package/lib/jupyter/exec/Snippets.js +101 -0
- package/lib/jupyter/exec/index.d.ts +2 -0
- package/lib/jupyter/exec/index.js +6 -0
- package/lib/jupyter/index.d.ts +2 -0
- package/lib/jupyter/index.js +6 -0
- package/lib/jupyter/kernelsHandler.d.ts +8 -0
- package/lib/jupyter/kernelsHandler.js +39 -0
- package/lib/mocks/models/CourseMock.d.ts +6 -0
- package/lib/mocks/models/CourseMock.js +29 -0
- package/lib/mocks/models/SpaceMock.d.ts +6 -0
- package/lib/mocks/models/SpaceMock.js +25 -0
- package/lib/models/Assignment.d.ts +7 -0
- package/lib/models/Assignment.js +5 -0
- package/lib/models/Cell.d.ts +8 -0
- package/lib/models/Cell.js +5 -0
- package/lib/models/CodeBlock.d.ts +10 -0
- package/lib/models/CodeBlock.js +5 -0
- package/lib/models/CodeSandboxSnapshot.d.ts +92 -0
- package/lib/models/CodeSandboxSnapshot.js +13 -0
- package/lib/models/CodeSandboxSnapshotDTO.d.ts +173 -0
- package/lib/models/CodeSandboxSnapshotDTO.js +139 -0
- package/lib/models/CodefeedBlocks.d.ts +7 -0
- package/lib/models/CodefeedBlocks.js +5 -0
- package/lib/models/Content.d.ts +5 -0
- package/lib/models/Content.js +5 -0
- package/lib/models/Course.d.ts +17 -0
- package/lib/models/Course.js +5 -0
- package/lib/models/Dataset.d.ts +16 -0
- package/lib/models/Dataset.js +5 -0
- package/lib/models/Document.d.ts +8 -0
- package/lib/models/Document.js +5 -0
- package/lib/models/Environment.d.ts +86 -0
- package/lib/models/Environment.js +5 -0
- package/lib/models/EnvironmentDTO.d.ts +125 -0
- package/lib/models/EnvironmentDTO.js +88 -0
- package/lib/models/Exercise.d.ts +16 -0
- package/lib/models/Exercise.js +5 -0
- package/lib/models/Item.d.ts +20 -0
- package/lib/models/Item.js +5 -0
- package/lib/models/ItemDTO.d.ts +74 -0
- package/lib/models/ItemDTO.js +186 -0
- package/lib/models/ItemType.d.ts +2 -0
- package/lib/models/ItemType.js +5 -0
- package/lib/models/Lesson.d.ts +5 -0
- package/lib/models/Lesson.js +5 -0
- package/lib/models/LexicalDTO.d.ts +155 -0
- package/lib/models/LexicalDTO.js +157 -0
- package/lib/models/Library.d.ts +10 -0
- package/lib/models/Library.js +5 -0
- package/lib/models/Notebook.d.ts +11 -0
- package/lib/models/Notebook.js +5 -0
- package/lib/models/NotebookDTO.d.ts +96 -0
- package/lib/models/NotebookDTO.js +153 -0
- package/lib/models/Page.d.ts +41 -0
- package/lib/models/Page.js +25 -0
- package/lib/models/PageTag.d.ts +19 -0
- package/lib/models/PageTag.js +94 -0
- package/lib/models/ProjectDTO.d.ts +89 -0
- package/lib/models/ProjectDTO.js +131 -0
- package/lib/models/Runtime.d.ts +160 -0
- package/lib/models/Runtime.js +18 -0
- package/lib/models/RuntimeDTO.d.ts +172 -0
- package/lib/models/RuntimeDTO.js +204 -0
- package/lib/models/Space.d.ts +35 -0
- package/lib/models/Space.js +66 -0
- package/lib/models/SpaceDTO.d.ts +334 -0
- package/lib/models/SpaceDTO.js +244 -0
- package/lib/models/SpaceItem.d.ts +10 -0
- package/lib/models/SpaceItem.js +5 -0
- package/lib/models/SpaceMember.d.ts +6 -0
- package/lib/models/SpaceMember.js +5 -0
- package/lib/models/StudentItem.d.ts +21 -0
- package/lib/models/StudentItem.js +5 -0
- package/lib/models/index.d.ts +32 -0
- package/lib/models/index.js +39 -0
- package/lib/protocols/AGUIAdapter.js +1 -1
- package/lib/runtimes/actions.d.ts +102 -0
- package/lib/runtimes/actions.js +249 -0
- package/lib/runtimes/apis.d.ts +273 -0
- package/lib/runtimes/apis.js +5 -0
- package/lib/runtimes/index.d.ts +5 -0
- package/lib/runtimes/index.js +9 -0
- package/lib/runtimes/settings.d.ts +15 -0
- package/lib/runtimes/settings.js +31 -0
- package/lib/runtimes/snapshots.d.ts +25 -0
- package/lib/runtimes/snapshots.js +150 -0
- package/lib/runtimes/utils.d.ts +7 -0
- package/lib/runtimes/utils.js +14 -0
- package/lib/services/DatalayerServiceManager.d.ts +23 -0
- package/lib/services/DatalayerServiceManager.js +90 -0
- package/lib/services/reconnectToRuntime.d.ts +32 -0
- package/lib/services/reconnectToRuntime.js +59 -0
- package/lib/services/sandboxServiceManagers.d.ts +31 -0
- package/lib/services/sandboxServiceManagers.js +57 -0
- package/lib/specs/agents/agents.d.ts +95 -50
- package/lib/specs/agents/agents.js +4037 -1669
- package/lib/specs/agents/index.d.ts +5 -5
- package/lib/specs/agents/index.js +9 -9
- package/lib/specs/index.d.ts +1 -0
- package/lib/specs/index.js +1 -0
- package/lib/specs/loops.d.ts +34 -0
- package/lib/specs/loops.js +188 -0
- package/lib/specs/mcpServers.d.ts +1 -0
- package/lib/specs/mcpServers.js +17 -0
- package/lib/specs/models.d.ts +4 -0
- package/lib/specs/models.js +30 -0
- package/lib/specs/skills.d.ts +1 -0
- package/lib/specs/skills.js +18 -0
- package/lib/specs/tools.d.ts +15 -0
- package/lib/specs/tools.js +285 -0
- package/lib/state/index.d.ts +4 -0
- package/lib/state/index.js +10 -0
- package/lib/state/substates/CellState.d.ts +12 -0
- package/lib/state/substates/CellState.js +22 -0
- package/lib/state/substates/DocumentState.d.ts +10 -0
- package/lib/state/substates/DocumentState.js +14 -0
- package/lib/state/substates/GradeState.d.ts +10 -0
- package/lib/state/substates/GradeState.js +14 -0
- package/lib/state/substates/JupyterLabState.d.ts +16 -0
- package/lib/state/substates/JupyterLabState.js +17 -0
- package/lib/state/substates/NbformatState.d.ts +13 -0
- package/lib/state/substates/NbformatState.js +16 -0
- package/lib/state/substates/RuntimesState.d.ts +87 -0
- package/lib/state/substates/RuntimesState.js +192 -0
- package/lib/state/substates/SpaceState.d.ts +11 -0
- package/lib/state/substates/SpaceState.js +16 -0
- package/lib/state/substates/index.d.ts +8 -0
- package/lib/state/substates/index.js +14 -0
- package/lib/stores/agentRuntimeStore.d.ts +25 -2
- package/lib/stores/agentRuntimeStore.js +114 -19
- package/lib/stories/Button.stories.d.ts +1 -1
- package/lib/stories/Header.stories.d.ts +3 -3
- package/lib/test-setup.js +10 -0
- package/lib/types/agents-lifecycle.d.ts +5 -5
- package/lib/types/agents.d.ts +6 -6
- package/lib/types/agentspecs.d.ts +8 -4
- package/lib/types/chat.d.ts +135 -3
- package/lib/types/config.d.ts +19 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +1 -0
- package/lib/types/loops.d.ts +64 -0
- package/lib/types/loops.js +5 -0
- package/lib/types/teams.d.ts +2 -2
- package/lib/types/tools.d.ts +16 -0
- package/lib/utils/Cells.d.ts +2 -0
- package/lib/utils/Cells.js +28 -0
- package/package.json +24 -18
- package/scripts/codegen/generate_agents.py +96 -61
- package/scripts/codegen/generate_loops.py +443 -0
- package/scripts/codegen/generate_teams.py +4 -4
- package/lib/examples/A2UiComponentGalleryExample.d.ts +0 -3
- package/lib/examples/A2UiComponentGalleryExample.js +0 -361
- package/scripts/codegen/__pycache__/generate_agents.cpython-313.pyc +0 -0
- package/scripts/codegen/__pycache__/generate_benchmarks.cpython-313.pyc +0 -0
- package/scripts/codegen/__pycache__/generate_evals.cpython-313.pyc +0 -0
- package/scripts/codegen/__pycache__/generate_events.cpython-313.pyc +0 -0
- /package/lib/{agent-lexical-main.d.ts → agent-document-main.d.ts} +0 -0
package/lib/specs/tools.js
CHANGED
|
@@ -5,6 +5,258 @@
|
|
|
5
5
|
// ============================================================================
|
|
6
6
|
// Tool Definitions
|
|
7
7
|
// ============================================================================
|
|
8
|
+
export const CREATE_PLAN_TOOL_SPEC_0_0_1 = {
|
|
9
|
+
id: 'create-plan',
|
|
10
|
+
version: '0.0.1',
|
|
11
|
+
name: 'Create Plan',
|
|
12
|
+
description: 'Create a plan with multiple steps and emit an AG-UI state snapshot.',
|
|
13
|
+
tags: ['example', 'ag-ui', 'state'],
|
|
14
|
+
enabled: true,
|
|
15
|
+
approval: 'auto',
|
|
16
|
+
timeout: undefined,
|
|
17
|
+
requiresApproval: false,
|
|
18
|
+
runtime: {
|
|
19
|
+
language: 'python',
|
|
20
|
+
package: 'agent_runtimes.examples.tools.ag_ui',
|
|
21
|
+
method: 'create_plan',
|
|
22
|
+
},
|
|
23
|
+
icon: 'list-unordered',
|
|
24
|
+
emoji: '📋',
|
|
25
|
+
};
|
|
26
|
+
export const CURRENT_TIME_TOOL_SPEC_0_0_1 = {
|
|
27
|
+
id: 'current-time',
|
|
28
|
+
version: '0.0.1',
|
|
29
|
+
name: 'Current Time',
|
|
30
|
+
description: 'Return the current time in ISO format for a given timezone.',
|
|
31
|
+
tags: ['example', 'ag-ui', 'time'],
|
|
32
|
+
enabled: true,
|
|
33
|
+
approval: 'auto',
|
|
34
|
+
timeout: undefined,
|
|
35
|
+
requiresApproval: false,
|
|
36
|
+
runtime: {
|
|
37
|
+
language: 'python',
|
|
38
|
+
package: 'agent_runtimes.examples.tools.ag_ui',
|
|
39
|
+
method: 'current_time',
|
|
40
|
+
},
|
|
41
|
+
icon: 'clock',
|
|
42
|
+
emoji: '🕒',
|
|
43
|
+
};
|
|
44
|
+
export const DISPLAY_RECIPE_TOOL_SPEC_0_0_1 = {
|
|
45
|
+
id: 'display-recipe',
|
|
46
|
+
version: '0.0.1',
|
|
47
|
+
name: 'Display Recipe',
|
|
48
|
+
description: 'Update the shared recipe state and emit an AG-UI state snapshot.',
|
|
49
|
+
tags: ['example', 'ag-ui', 'shared-state'],
|
|
50
|
+
enabled: true,
|
|
51
|
+
approval: 'auto',
|
|
52
|
+
timeout: undefined,
|
|
53
|
+
requiresApproval: false,
|
|
54
|
+
runtime: {
|
|
55
|
+
language: 'python',
|
|
56
|
+
package: 'agent_runtimes.examples.tools.ag_ui',
|
|
57
|
+
method: 'display_recipe',
|
|
58
|
+
},
|
|
59
|
+
icon: 'book',
|
|
60
|
+
emoji: '🍳',
|
|
61
|
+
};
|
|
62
|
+
export const EXAMPLE_CREATE_PLAN_TOOL_SPEC_0_0_1 = {
|
|
63
|
+
id: 'example-create-plan',
|
|
64
|
+
version: '0.0.1',
|
|
65
|
+
name: 'Create Plan',
|
|
66
|
+
description: 'Create a plan with multiple steps and emit an AG-UI state snapshot.',
|
|
67
|
+
tags: ['example', 'ag-ui', 'state'],
|
|
68
|
+
enabled: true,
|
|
69
|
+
approval: 'auto',
|
|
70
|
+
timeout: undefined,
|
|
71
|
+
requiresApproval: false,
|
|
72
|
+
runtime: {
|
|
73
|
+
language: 'python',
|
|
74
|
+
package: 'agent_runtimes.examples.tools.ag_ui',
|
|
75
|
+
method: 'create_plan',
|
|
76
|
+
},
|
|
77
|
+
icon: 'list-unordered',
|
|
78
|
+
emoji: '📋',
|
|
79
|
+
};
|
|
80
|
+
export const EXAMPLE_CURRENT_TIME_TOOL_SPEC_0_0_1 = {
|
|
81
|
+
id: 'example-current-time',
|
|
82
|
+
version: '0.0.1',
|
|
83
|
+
name: 'Current Time',
|
|
84
|
+
description: 'Return the current time in ISO format for a given timezone.',
|
|
85
|
+
tags: ['example', 'ag-ui', 'time'],
|
|
86
|
+
enabled: true,
|
|
87
|
+
approval: 'auto',
|
|
88
|
+
timeout: undefined,
|
|
89
|
+
requiresApproval: false,
|
|
90
|
+
runtime: {
|
|
91
|
+
language: 'python',
|
|
92
|
+
package: 'agent_runtimes.examples.tools.ag_ui',
|
|
93
|
+
method: 'current_time',
|
|
94
|
+
},
|
|
95
|
+
icon: 'clock',
|
|
96
|
+
emoji: '🕒',
|
|
97
|
+
};
|
|
98
|
+
export const EXAMPLE_DISPLAY_RECIPE_TOOL_SPEC_0_0_1 = {
|
|
99
|
+
id: 'example-display-recipe',
|
|
100
|
+
version: '0.0.1',
|
|
101
|
+
name: 'Display Recipe',
|
|
102
|
+
description: 'Update the shared recipe state and emit an AG-UI state snapshot.',
|
|
103
|
+
tags: ['example', 'ag-ui', 'shared-state'],
|
|
104
|
+
enabled: true,
|
|
105
|
+
approval: 'auto',
|
|
106
|
+
timeout: undefined,
|
|
107
|
+
requiresApproval: false,
|
|
108
|
+
runtime: {
|
|
109
|
+
language: 'python',
|
|
110
|
+
package: 'agent_runtimes.examples.tools.ag_ui',
|
|
111
|
+
method: 'display_recipe',
|
|
112
|
+
},
|
|
113
|
+
icon: 'book',
|
|
114
|
+
emoji: '🍳',
|
|
115
|
+
};
|
|
116
|
+
export const EXAMPLE_GENERATE_HAIKU_TOOL_SPEC_0_0_1 = {
|
|
117
|
+
id: 'example-generate-haiku',
|
|
118
|
+
version: '0.0.1',
|
|
119
|
+
name: 'Generate Haiku',
|
|
120
|
+
description: 'Generate a haiku (Japanese + English + gradient) rendered as a card by the frontend.',
|
|
121
|
+
tags: ['example', 'ag-ui', 'generative-ui'],
|
|
122
|
+
enabled: true,
|
|
123
|
+
approval: 'auto',
|
|
124
|
+
timeout: undefined,
|
|
125
|
+
requiresApproval: false,
|
|
126
|
+
runtime: {
|
|
127
|
+
language: 'python',
|
|
128
|
+
package: 'agent_runtimes.examples.tools.ag_ui',
|
|
129
|
+
method: 'generate_haiku',
|
|
130
|
+
},
|
|
131
|
+
icon: 'pencil',
|
|
132
|
+
emoji: '🖋️',
|
|
133
|
+
};
|
|
134
|
+
export const EXAMPLE_GENERATE_TASK_STEPS_TOOL_SPEC_0_0_1 = {
|
|
135
|
+
id: 'example-generate-task-steps',
|
|
136
|
+
version: '0.0.1',
|
|
137
|
+
name: 'Generate Task Steps',
|
|
138
|
+
description: 'Generate task steps for human review and emit an AG-UI state snapshot.',
|
|
139
|
+
tags: ['example', 'ag-ui', 'human-in-the-loop'],
|
|
140
|
+
enabled: true,
|
|
141
|
+
approval: 'auto',
|
|
142
|
+
timeout: undefined,
|
|
143
|
+
requiresApproval: false,
|
|
144
|
+
runtime: {
|
|
145
|
+
language: 'python',
|
|
146
|
+
package: 'agent_runtimes.examples.tools.ag_ui',
|
|
147
|
+
method: 'generate_task_steps',
|
|
148
|
+
},
|
|
149
|
+
icon: 'tasklist',
|
|
150
|
+
emoji: '🧑⚖️',
|
|
151
|
+
};
|
|
152
|
+
export const EXAMPLE_GET_WEATHER_TOOL_SPEC_0_0_1 = {
|
|
153
|
+
id: 'example-get-weather',
|
|
154
|
+
version: '0.0.1',
|
|
155
|
+
name: 'Get Weather',
|
|
156
|
+
description: 'Fetch current weather for a location from the Open-Meteo API for frontend rendering.',
|
|
157
|
+
tags: ['example', 'ag-ui', 'weather'],
|
|
158
|
+
enabled: true,
|
|
159
|
+
approval: 'auto',
|
|
160
|
+
timeout: undefined,
|
|
161
|
+
requiresApproval: false,
|
|
162
|
+
runtime: {
|
|
163
|
+
language: 'python',
|
|
164
|
+
package: 'agent_runtimes.examples.tools.ag_ui',
|
|
165
|
+
method: 'get_weather',
|
|
166
|
+
},
|
|
167
|
+
icon: 'sun',
|
|
168
|
+
emoji: '🌤️',
|
|
169
|
+
};
|
|
170
|
+
export const EXAMPLE_RENDER_A2UI_SURFACE_TOOL_SPEC_0_0_1 = {
|
|
171
|
+
id: 'example-render-a2ui-surface',
|
|
172
|
+
version: '0.0.1',
|
|
173
|
+
name: 'Render A2UI Surface',
|
|
174
|
+
description: 'Turn a declarative field spec into a validated A2UI v0.9 surface rendered live by the frontend as an interactive form/card.',
|
|
175
|
+
tags: ['example', 'ag-ui', 'a2ui', 'generative-ui'],
|
|
176
|
+
enabled: true,
|
|
177
|
+
approval: 'auto',
|
|
178
|
+
timeout: undefined,
|
|
179
|
+
requiresApproval: false,
|
|
180
|
+
runtime: {
|
|
181
|
+
language: 'python',
|
|
182
|
+
package: 'agent_runtimes.examples.tools.a2ui',
|
|
183
|
+
method: 'render_a2ui_surface',
|
|
184
|
+
},
|
|
185
|
+
icon: 'browser',
|
|
186
|
+
emoji: '🎛️',
|
|
187
|
+
};
|
|
188
|
+
export const EXAMPLE_UPDATE_PLAN_STEP_TOOL_SPEC_0_0_1 = {
|
|
189
|
+
id: 'example-update-plan-step',
|
|
190
|
+
version: '0.0.1',
|
|
191
|
+
name: 'Update Plan Step',
|
|
192
|
+
description: 'Update a plan step and emit an AG-UI state delta (JSON Patch RFC 6902).',
|
|
193
|
+
tags: ['example', 'ag-ui', 'state'],
|
|
194
|
+
enabled: true,
|
|
195
|
+
approval: 'auto',
|
|
196
|
+
timeout: undefined,
|
|
197
|
+
requiresApproval: false,
|
|
198
|
+
runtime: {
|
|
199
|
+
language: 'python',
|
|
200
|
+
package: 'agent_runtimes.examples.tools.ag_ui',
|
|
201
|
+
method: 'update_plan_step',
|
|
202
|
+
},
|
|
203
|
+
icon: 'checklist',
|
|
204
|
+
emoji: '✅',
|
|
205
|
+
};
|
|
206
|
+
export const GENERATE_HAIKU_TOOL_SPEC_0_0_1 = {
|
|
207
|
+
id: 'generate-haiku',
|
|
208
|
+
version: '0.0.1',
|
|
209
|
+
name: 'Generate Haiku',
|
|
210
|
+
description: 'Generate a haiku (Japanese + English + gradient) rendered as a card by the frontend.',
|
|
211
|
+
tags: ['example', 'ag-ui', 'generative-ui'],
|
|
212
|
+
enabled: true,
|
|
213
|
+
approval: 'auto',
|
|
214
|
+
timeout: undefined,
|
|
215
|
+
requiresApproval: false,
|
|
216
|
+
runtime: {
|
|
217
|
+
language: 'python',
|
|
218
|
+
package: 'agent_runtimes.examples.tools.ag_ui',
|
|
219
|
+
method: 'generate_haiku',
|
|
220
|
+
},
|
|
221
|
+
icon: 'pencil',
|
|
222
|
+
emoji: '🖋️',
|
|
223
|
+
};
|
|
224
|
+
export const GENERATE_TASK_STEPS_TOOL_SPEC_0_0_1 = {
|
|
225
|
+
id: 'generate-task-steps',
|
|
226
|
+
version: '0.0.1',
|
|
227
|
+
name: 'Generate Task Steps',
|
|
228
|
+
description: 'Generate task steps for human review and emit an AG-UI state snapshot.',
|
|
229
|
+
tags: ['example', 'ag-ui', 'human-in-the-loop'],
|
|
230
|
+
enabled: true,
|
|
231
|
+
approval: 'auto',
|
|
232
|
+
timeout: undefined,
|
|
233
|
+
requiresApproval: false,
|
|
234
|
+
runtime: {
|
|
235
|
+
language: 'python',
|
|
236
|
+
package: 'agent_runtimes.examples.tools.ag_ui',
|
|
237
|
+
method: 'generate_task_steps',
|
|
238
|
+
},
|
|
239
|
+
icon: 'tasklist',
|
|
240
|
+
emoji: '🧑⚖️',
|
|
241
|
+
};
|
|
242
|
+
export const GET_WEATHER_TOOL_SPEC_0_0_1 = {
|
|
243
|
+
id: 'get-weather',
|
|
244
|
+
version: '0.0.1',
|
|
245
|
+
name: 'Get Weather',
|
|
246
|
+
description: 'Fetch current weather for a location from the Open-Meteo API for frontend rendering.',
|
|
247
|
+
tags: ['example', 'ag-ui', 'weather'],
|
|
248
|
+
enabled: true,
|
|
249
|
+
approval: 'auto',
|
|
250
|
+
timeout: undefined,
|
|
251
|
+
requiresApproval: false,
|
|
252
|
+
runtime: {
|
|
253
|
+
language: 'python',
|
|
254
|
+
package: 'agent_runtimes.examples.tools.ag_ui',
|
|
255
|
+
method: 'get_weather',
|
|
256
|
+
},
|
|
257
|
+
icon: 'sun',
|
|
258
|
+
emoji: '🌤️',
|
|
259
|
+
};
|
|
8
260
|
export const RUNTIME_ECHO_TOOL_SPEC_0_0_1 = {
|
|
9
261
|
id: 'runtime-echo',
|
|
10
262
|
version: '0.0.1',
|
|
@@ -59,13 +311,46 @@ export const RUNTIME_SENSITIVE_ECHO_TOOL_SPEC_0_0_1 = {
|
|
|
59
311
|
icon: 'shield',
|
|
60
312
|
emoji: '🛡️',
|
|
61
313
|
};
|
|
314
|
+
export const UPDATE_PLAN_STEP_TOOL_SPEC_0_0_1 = {
|
|
315
|
+
id: 'update-plan-step',
|
|
316
|
+
version: '0.0.1',
|
|
317
|
+
name: 'Update Plan Step',
|
|
318
|
+
description: 'Update a plan step and emit an AG-UI state delta (JSON Patch RFC 6902).',
|
|
319
|
+
tags: ['example', 'ag-ui', 'state'],
|
|
320
|
+
enabled: true,
|
|
321
|
+
approval: 'auto',
|
|
322
|
+
timeout: undefined,
|
|
323
|
+
requiresApproval: false,
|
|
324
|
+
runtime: {
|
|
325
|
+
language: 'python',
|
|
326
|
+
package: 'agent_runtimes.examples.tools.ag_ui',
|
|
327
|
+
method: 'update_plan_step',
|
|
328
|
+
},
|
|
329
|
+
icon: 'checklist',
|
|
330
|
+
emoji: '✅',
|
|
331
|
+
};
|
|
62
332
|
// ============================================================================
|
|
63
333
|
// Tool Catalog
|
|
64
334
|
// ============================================================================
|
|
65
335
|
export const TOOL_CATALOG = {
|
|
336
|
+
'create-plan': CREATE_PLAN_TOOL_SPEC_0_0_1,
|
|
337
|
+
'current-time': CURRENT_TIME_TOOL_SPEC_0_0_1,
|
|
338
|
+
'display-recipe': DISPLAY_RECIPE_TOOL_SPEC_0_0_1,
|
|
339
|
+
'example-create-plan': EXAMPLE_CREATE_PLAN_TOOL_SPEC_0_0_1,
|
|
340
|
+
'example-current-time': EXAMPLE_CURRENT_TIME_TOOL_SPEC_0_0_1,
|
|
341
|
+
'example-display-recipe': EXAMPLE_DISPLAY_RECIPE_TOOL_SPEC_0_0_1,
|
|
342
|
+
'example-generate-haiku': EXAMPLE_GENERATE_HAIKU_TOOL_SPEC_0_0_1,
|
|
343
|
+
'example-generate-task-steps': EXAMPLE_GENERATE_TASK_STEPS_TOOL_SPEC_0_0_1,
|
|
344
|
+
'example-get-weather': EXAMPLE_GET_WEATHER_TOOL_SPEC_0_0_1,
|
|
345
|
+
'example-render-a2ui-surface': EXAMPLE_RENDER_A2UI_SURFACE_TOOL_SPEC_0_0_1,
|
|
346
|
+
'example-update-plan-step': EXAMPLE_UPDATE_PLAN_STEP_TOOL_SPEC_0_0_1,
|
|
347
|
+
'generate-haiku': GENERATE_HAIKU_TOOL_SPEC_0_0_1,
|
|
348
|
+
'generate-task-steps': GENERATE_TASK_STEPS_TOOL_SPEC_0_0_1,
|
|
349
|
+
'get-weather': GET_WEATHER_TOOL_SPEC_0_0_1,
|
|
66
350
|
'runtime-echo': RUNTIME_ECHO_TOOL_SPEC_0_0_1,
|
|
67
351
|
'runtime-send-mail': RUNTIME_SEND_MAIL_TOOL_SPEC_0_0_1,
|
|
68
352
|
'runtime-sensitive-echo': RUNTIME_SENSITIVE_ECHO_TOOL_SPEC_0_0_1,
|
|
353
|
+
'update-plan-step': UPDATE_PLAN_STEP_TOOL_SPEC_0_0_1,
|
|
69
354
|
};
|
|
70
355
|
export function getToolSpecs() {
|
|
71
356
|
return Object.values(TOOL_CATALOG);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export * from './substates';
|
|
2
|
+
export * from '@datalayer/core/lib/state/storage';
|
|
3
|
+
export * from '@datalayer/core/lib/state/State';
|
|
4
|
+
export { coreStore, useCoreStore, iamStore, useIAMStore, RESERVATION_WARNING_TIME_MS, layoutStore, useLayoutStore, organizationStore, useOrganizationStore, surveysStore, useSurveysStore, teamStore, useTeamStore, datasourceStore, useDatasourceStore, runStore, useRunStore, DATALAYER_IAM_TOKEN_KEY, DATALAYER_IAM_USER_KEY, } from '@datalayer/core/lib/state';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
// Export runtime/content substates owned by agent-runtimes.
|
|
6
|
+
export * from './substates';
|
|
7
|
+
// Re-export core state modules and stores that remain owned by core.
|
|
8
|
+
export * from '@datalayer/core/lib/state/storage';
|
|
9
|
+
export * from '@datalayer/core/lib/state/State';
|
|
10
|
+
export { coreStore, useCoreStore, iamStore, useIAMStore, RESERVATION_WARNING_TIME_MS, layoutStore, useLayoutStore, organizationStore, useOrganizationStore, surveysStore, useSurveysStore, teamStore, useTeamStore, datasourceStore, useDatasourceStore, runStore, useRunStore, DATALAYER_IAM_TOKEN_KEY, DATALAYER_IAM_USER_KEY, } from '@datalayer/core/lib/state';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ICell } from '../../models';
|
|
2
|
+
export type ICellState = {
|
|
3
|
+
cell?: ICell;
|
|
4
|
+
};
|
|
5
|
+
export type CellState = ICellState & {
|
|
6
|
+
create: (cell: ICell) => void;
|
|
7
|
+
update: (cell: Partial<ICell>) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const cellStore: import("zustand").StoreApi<CellState>;
|
|
10
|
+
export declare function useCellStore(): CellState;
|
|
11
|
+
export declare function useCellStore<T>(selector: (state: CellState) => T): T;
|
|
12
|
+
export default useCellStore;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
import { createStore } from 'zustand/vanilla';
|
|
6
|
+
import { useStore } from 'zustand';
|
|
7
|
+
export const cellStore = createStore((set, get) => ({
|
|
8
|
+
cell: undefined,
|
|
9
|
+
create: (cell) => set((state) => ({ cell })),
|
|
10
|
+
update: (cell) => set((state) => ({
|
|
11
|
+
cell: cell
|
|
12
|
+
? {
|
|
13
|
+
...state.cell,
|
|
14
|
+
...cell,
|
|
15
|
+
}
|
|
16
|
+
: undefined,
|
|
17
|
+
})),
|
|
18
|
+
}));
|
|
19
|
+
export function useCellStore(selector) {
|
|
20
|
+
return useStore(cellStore, selector);
|
|
21
|
+
}
|
|
22
|
+
export default useCellStore;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface IDocumentState {
|
|
2
|
+
documentSaveRequest?: Date;
|
|
3
|
+
}
|
|
4
|
+
export type DocumentState = IDocumentState & {
|
|
5
|
+
save: (documentSaveRequest: Date) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const documentStore: import("zustand").StoreApi<DocumentState>;
|
|
8
|
+
export declare function useDocumentStore(): DocumentState;
|
|
9
|
+
export declare function useDocumentStore<T>(selector: (state: DocumentState) => T): T;
|
|
10
|
+
export default useDocumentStore;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
import { createStore } from 'zustand/vanilla';
|
|
6
|
+
import { useStore } from 'zustand';
|
|
7
|
+
export const documentStore = createStore((set, get) => ({
|
|
8
|
+
documentSaveRequest: undefined,
|
|
9
|
+
save: (documentSaveRequest) => set((state) => ({ documentSaveRequest })),
|
|
10
|
+
}));
|
|
11
|
+
export function useDocumentStore(selector) {
|
|
12
|
+
return useStore(documentStore, selector);
|
|
13
|
+
}
|
|
14
|
+
export default useDocumentStore;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type IGradeState = {
|
|
2
|
+
gradeRequest?: Date;
|
|
3
|
+
};
|
|
4
|
+
export type GradeState = IGradeState & {
|
|
5
|
+
grade: (gradeRequest: Date) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const gradeStore: import("zustand").StoreApi<GradeState>;
|
|
8
|
+
export declare function useGradeStore(): GradeState;
|
|
9
|
+
export declare function useGradeStore<T>(selector: (state: GradeState) => T): T;
|
|
10
|
+
export default useGradeStore;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
import { createStore } from 'zustand/vanilla';
|
|
6
|
+
import { useStore } from 'zustand';
|
|
7
|
+
export const gradeStore = createStore((set, get) => ({
|
|
8
|
+
gradeRequest: undefined,
|
|
9
|
+
grade: (gradeRequest) => set((state) => ({ gradeRequest })),
|
|
10
|
+
}));
|
|
11
|
+
export function useGradeStore(selector) {
|
|
12
|
+
return useStore(gradeStore, selector);
|
|
13
|
+
}
|
|
14
|
+
export default useGradeStore;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { JupyterLabAppAdapter } from '@datalayer/jupyter-react';
|
|
2
|
+
import { JupyterFrontEndPlugin } from '@jupyterlab/application';
|
|
3
|
+
export type Plugin = JupyterFrontEndPlugin<any, any, any> & {
|
|
4
|
+
service: any;
|
|
5
|
+
};
|
|
6
|
+
export type IJupyterLabState = {
|
|
7
|
+
jupyterLabAdapter?: JupyterLabAppAdapter;
|
|
8
|
+
};
|
|
9
|
+
export type JupyterLabState = IJupyterLabState & {
|
|
10
|
+
setJupyterLabAdapter: (jupyterLabAdapter?: JupyterLabAppAdapter) => void;
|
|
11
|
+
plugin: (id: string) => Plugin | undefined;
|
|
12
|
+
};
|
|
13
|
+
export declare const jupyterLabStore: import("zustand").StoreApi<JupyterLabState>;
|
|
14
|
+
export declare function useJupyterLabStore(): JupyterLabState;
|
|
15
|
+
export declare function useJupyterLabStore<T>(selector: (state: JupyterLabState) => T): T;
|
|
16
|
+
export default useJupyterLabStore;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
import { createStore } from 'zustand/vanilla';
|
|
6
|
+
import { useStore } from 'zustand';
|
|
7
|
+
export const jupyterLabStore = createStore((set, get) => ({
|
|
8
|
+
jupyterLabAdapter: undefined,
|
|
9
|
+
setJupyterLabAdapter: (jupyterLabAdapter) => set((state) => ({ jupyterLabAdapter })),
|
|
10
|
+
plugin: (id) => {
|
|
11
|
+
return get().jupyterLabAdapter?.plugin(id);
|
|
12
|
+
},
|
|
13
|
+
}));
|
|
14
|
+
export function useJupyterLabStore(selector) {
|
|
15
|
+
return useStore(jupyterLabStore, selector);
|
|
16
|
+
}
|
|
17
|
+
export default useJupyterLabStore;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type SaveRequest = {
|
|
2
|
+
counter: number;
|
|
3
|
+
};
|
|
4
|
+
export type INbformatState = {
|
|
5
|
+
saveRequest: SaveRequest;
|
|
6
|
+
};
|
|
7
|
+
export type NbformatState = INbformatState & {
|
|
8
|
+
save: (saveRequest: SaveRequest) => void;
|
|
9
|
+
};
|
|
10
|
+
export declare const nbformatStore: import("zustand").StoreApi<NbformatState>;
|
|
11
|
+
export declare function useNbformatStore(): NbformatState;
|
|
12
|
+
export declare function useNbformatStore<T>(selector: (state: NbformatState) => T): T;
|
|
13
|
+
export default useNbformatStore;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
import { createStore } from 'zustand/vanilla';
|
|
6
|
+
import { useStore } from 'zustand';
|
|
7
|
+
export const nbformatStore = createStore((set, get) => ({
|
|
8
|
+
saveRequest: {
|
|
9
|
+
counter: -1,
|
|
10
|
+
},
|
|
11
|
+
save: (saveRequest) => set((state) => ({ saveRequest })),
|
|
12
|
+
}));
|
|
13
|
+
export function useNbformatStore(selector) {
|
|
14
|
+
return useStore(nbformatStore, selector);
|
|
15
|
+
}
|
|
16
|
+
export default useNbformatStore;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { IMultiServiceManager } from '../../runtimes';
|
|
2
|
+
import type { IRuntimesConfiguration } from '@datalayer/core/lib/config';
|
|
3
|
+
import type { IRuntimePod, ICodeSandboxSnapshot, IRuntimeModel } from '../../models';
|
|
4
|
+
/**
|
|
5
|
+
* Datalayer Runtimes state.
|
|
6
|
+
*/
|
|
7
|
+
export type RuntimesState = {
|
|
8
|
+
/**
|
|
9
|
+
* Runtimes configuration
|
|
10
|
+
*/
|
|
11
|
+
configuration: IRuntimesConfiguration;
|
|
12
|
+
setConfiguration: (config: IRuntimesConfiguration) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Runtimes RUN URL.
|
|
15
|
+
*/
|
|
16
|
+
runtimesUrl: string;
|
|
17
|
+
tab: number;
|
|
18
|
+
getIntTab: () => number;
|
|
19
|
+
setTab: (tab: number) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Runtime pods.
|
|
22
|
+
*/
|
|
23
|
+
runtimePods: IRuntimePod[];
|
|
24
|
+
/**
|
|
25
|
+
* Refresh the runtime pods.
|
|
26
|
+
*/
|
|
27
|
+
refreshRuntimePods: () => Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Remove a runtime pod from the local state by its pod name.
|
|
30
|
+
*
|
|
31
|
+
* Used to prune a pod immediately after it is deleted, without waiting for
|
|
32
|
+
* the next `refreshRuntimePods()` poll tick. This lets the remote service
|
|
33
|
+
* managers dispose right away and stop polling the (now dead) pod ingress.
|
|
34
|
+
*/
|
|
35
|
+
removeRuntimePod: (podName: string) => void;
|
|
36
|
+
/**
|
|
37
|
+
* Cached runtime models.
|
|
38
|
+
*/
|
|
39
|
+
runtimeModels: readonly IRuntimeModel[];
|
|
40
|
+
/**
|
|
41
|
+
* Add a runtime model.
|
|
42
|
+
*/
|
|
43
|
+
addRuntimeModel: (model: IRuntimeModel) => void;
|
|
44
|
+
/**
|
|
45
|
+
* Remove a runtime model by ID.
|
|
46
|
+
*/
|
|
47
|
+
removeRuntimeModel: (id: string) => void;
|
|
48
|
+
/**
|
|
49
|
+
* Set the runtimes models list.
|
|
50
|
+
*/
|
|
51
|
+
setRuntimeModels: (models: readonly IRuntimeModel[]) => void;
|
|
52
|
+
/**
|
|
53
|
+
* Jupyter service manager.
|
|
54
|
+
*/
|
|
55
|
+
multiServiceManager?: IMultiServiceManager;
|
|
56
|
+
setMultiServiceManager: (multiServiceManager: IMultiServiceManager) => void;
|
|
57
|
+
showDisclaimer: boolean;
|
|
58
|
+
setShowDisclaimer: (showDisclaimer: boolean) => void;
|
|
59
|
+
/**
|
|
60
|
+
* Code Sandbox snapshots.
|
|
61
|
+
*/
|
|
62
|
+
runtimeSnapshots: readonly ICodeSandboxSnapshot[];
|
|
63
|
+
/**
|
|
64
|
+
* Add a code sandbox snapshot.
|
|
65
|
+
*/
|
|
66
|
+
addSandboxSnapshot: (snapshot: ICodeSandboxSnapshot) => void;
|
|
67
|
+
/**
|
|
68
|
+
* Remove a Code Sandbox Snapshot.
|
|
69
|
+
*/
|
|
70
|
+
removeSandboxSnapshot: (id: string) => void;
|
|
71
|
+
/**
|
|
72
|
+
* Set Code Sandbox Snapshots.
|
|
73
|
+
*/
|
|
74
|
+
setSandboxSnapshots: (snapshots: ICodeSandboxSnapshot[]) => void;
|
|
75
|
+
/**
|
|
76
|
+
* Package version.
|
|
77
|
+
*/
|
|
78
|
+
version: string;
|
|
79
|
+
setVersion: (version: string) => void;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Kernel store
|
|
83
|
+
*/
|
|
84
|
+
export declare const runtimesStore: import("zustand").StoreApi<RuntimesState>;
|
|
85
|
+
export declare function useRuntimesStore(): RuntimesState;
|
|
86
|
+
export declare function useRuntimesStore<T>(selector: (state: RuntimesState) => T): T;
|
|
87
|
+
export default useRuntimesStore;
|