@datalayer/agent-runtimes 0.0.9 → 0.0.10
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 +2 -1
- package/lib/{examples/components → components}/AgentConfiguration.d.ts +27 -12
- package/lib/{examples/components → components}/AgentConfiguration.js +170 -22
- package/lib/{examples/components → components}/FooterMetrics.d.ts +1 -2
- package/lib/{examples/components → components}/Header.d.ts +1 -6
- package/lib/{examples/components → components}/Header.js +5 -39
- package/lib/{examples/components → components}/HeaderControls.d.ts +1 -2
- package/lib/{examples/components → components}/HeaderControls.js +1 -1
- package/lib/{examples/components → components}/LexicalEditor.d.ts +2 -3
- package/lib/{examples/components → components}/LexicalEditor.js +2 -2
- package/lib/components/MainContent.d.ts +34 -0
- package/lib/{examples/components → components}/MainContent.js +18 -9
- package/lib/components/McpServerManager.d.ts +30 -0
- package/lib/components/McpServerManager.js +331 -0
- package/lib/{examples/components → components}/MockFileBrowser.d.ts +1 -2
- package/lib/{examples/components → components}/SessionTabs.d.ts +2 -3
- package/lib/{examples/components → components}/TimeTravel.d.ts +1 -2
- package/lib/components/chat/components/AgentDetails.d.ts +3 -1
- package/lib/components/chat/components/AgentDetails.js +323 -31
- package/lib/components/chat/components/Chat.d.ts +37 -3
- package/lib/components/chat/components/Chat.js +29 -10
- package/lib/components/chat/components/ChatFloating.d.ts +27 -2
- package/lib/components/chat/components/ChatFloating.js +17 -10
- package/lib/components/chat/components/ChatPopupStandalone.js +1 -1
- package/lib/components/chat/components/ChatSidebar.d.ts +1 -1
- package/lib/components/chat/components/ChatStandalone.d.ts +1 -1
- package/lib/components/chat/components/ChatStandalone.js +1 -1
- package/lib/components/chat/components/ContextDistribution.d.ts +70 -6
- package/lib/components/chat/components/ContextDistribution.js +11 -4
- package/lib/components/chat/components/ContextInspector.d.ts +81 -0
- package/lib/components/chat/components/ContextInspector.js +261 -0
- package/lib/components/chat/components/ContextPanel.d.ts +112 -0
- package/lib/components/chat/components/ContextPanel.js +373 -0
- package/lib/components/chat/components/base/ChatBase.d.ts +74 -19
- package/lib/components/chat/components/base/ChatBase.js +296 -37
- package/lib/components/chat/components/index.d.ts +3 -1
- package/lib/components/chat/components/index.js +2 -0
- package/lib/components/chat/extensions/ExtensionRegistry.d.ts +1 -1
- package/lib/components/chat/extensions/index.d.ts +1 -0
- package/lib/components/chat/index.d.ts +3 -3
- package/lib/components/chat/protocols/AGUIAdapter.js +24 -4
- package/lib/components/chat/protocols/VercelAIAdapter.js +35 -1
- package/lib/components/chat/store/chatStore.d.ts +2 -3
- package/lib/components/chat/store/conversationStore.d.ts +83 -0
- package/lib/components/chat/store/conversationStore.js +174 -0
- package/lib/components/chat/store/index.d.ts +2 -1
- package/lib/components/chat/store/index.js +1 -0
- package/lib/components/chat/types/inference.d.ts +17 -0
- package/lib/components/chat/types/protocol.d.ts +10 -0
- package/lib/components/index.d.ts +23 -0
- package/lib/components/index.js +11 -0
- package/lib/config/agents.d.ts +33 -0
- package/lib/config/agents.js +424 -0
- package/lib/config/index.d.ts +4 -0
- package/lib/config/index.js +8 -0
- package/lib/config/mcpServers.d.ts +18 -0
- package/lib/config/mcpServers.js +129 -0
- package/lib/config/skills.d.ts +25 -0
- package/lib/config/skills.js +54 -0
- package/lib/{lib → config}/utils.d.ts +1 -1
- package/lib/{lib → config}/utils.js +2 -2
- package/lib/examples/AgentRuntimeLexical2Example.d.ts +1 -0
- package/lib/examples/AgentRuntimeLexical2Example.js +3 -2
- package/lib/examples/AgentRuntimeLexicalExample.d.ts +1 -0
- package/lib/examples/AgentRuntimeLexicalExample.js +5 -3
- package/lib/examples/AgentRuntimeLexicalSidebarExample.d.ts +1 -0
- package/lib/examples/AgentRuntimeLexicalSidebarExample.js +3 -3
- package/lib/examples/AgentRuntimeNotebookExample.js +1 -1
- package/lib/examples/AgentSpaceFormExample.d.ts +2 -2
- package/lib/examples/AgentSpaceFormExample.js +167 -29
- package/lib/examples/CopilotKitLexicalExample.d.ts +1 -0
- package/lib/examples/CopilotKitLexicalExample.js +3 -2
- package/lib/examples/index.d.ts +1 -0
- package/lib/examples/stores/notebooks/NotebookExample2.ipynb.json +43 -43
- package/lib/hooks/useAGUI.d.ts +1 -1
- package/lib/hooks/useAGUI.js +1 -1
- package/lib/identity/types.d.ts +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +1 -0
- package/lib/runtime/index.d.ts +3 -0
- package/lib/runtime/runtimeStore.d.ts +3 -4
- package/lib/runtime/useAgentConnection.d.ts +2 -3
- package/lib/runtime/useAgentRuntime.d.ts +2 -3
- package/lib/stories/Cell.stories.js +1 -1
- package/lib/tools/adapters/agent-runtimes/notebookHooks.js +1 -0
- package/lib/tools/adapters/copilotkit/notebookHooks.js +1 -0
- package/lib/types.d.ts +150 -0
- package/package.json +4 -5
- package/scripts/apply-patches.sh +1 -1
- package/scripts/codegen/generate_agents.py +452 -0
- package/scripts/codegen/generate_mcp_servers.py +424 -0
- package/scripts/codegen/generate_skills.py +321 -0
- package/scripts/download-ai-elements.py +35 -20
- package/scripts/sync-jupyter.sh +6 -0
- package/lib/components/ui/accordion.d.ts +0 -7
- package/lib/components/ui/accordion.js +0 -22
- package/lib/components/ui/alert-dialog.d.ts +0 -14
- package/lib/components/ui/alert-dialog.js +0 -43
- package/lib/components/ui/alert.d.ts +0 -9
- package/lib/components/ui/alert.js +0 -24
- package/lib/components/ui/aspect-ratio.d.ts +0 -3
- package/lib/components/ui/aspect-ratio.js +0 -11
- package/lib/components/ui/avatar.d.ts +0 -6
- package/lib/components/ui/avatar.js +0 -18
- package/lib/components/ui/badge.d.ts +0 -9
- package/lib/components/ui/badge.js +0 -22
- package/lib/components/ui/breadcrumb.d.ts +0 -11
- package/lib/components/ui/breadcrumb.js +0 -27
- package/lib/components/ui/button-group.d.ts +0 -11
- package/lib/components/ui/button-group.js +0 -31
- package/lib/components/ui/button.d.ts +0 -13
- package/lib/components/ui/button.js +0 -39
- package/lib/components/ui/calendar.d.ts +0 -8
- package/lib/components/ui/calendar.js +0 -80
- package/lib/components/ui/card.d.ts +0 -9
- package/lib/components/ui/card.js +0 -24
- package/lib/components/ui/carousel.d.ts +0 -19
- package/lib/components/ui/carousel.js +0 -95
- package/lib/components/ui/chart.d.ts +0 -53
- package/lib/components/ui/chart.js +0 -136
- package/lib/components/ui/checkbox.d.ts +0 -4
- package/lib/components/ui/checkbox.js +0 -13
- package/lib/components/ui/collapsible.d.ts +0 -5
- package/lib/components/ui/collapsible.js +0 -17
- package/lib/components/ui/command.d.ts +0 -18
- package/lib/components/ui/command.js +0 -38
- package/lib/components/ui/context-menu.d.ts +0 -25
- package/lib/components/ui/context-menu.js +0 -55
- package/lib/components/ui/dialog.d.ts +0 -15
- package/lib/components/ui/dialog.js +0 -40
- package/lib/components/ui/drawer.d.ts +0 -13
- package/lib/components/ui/drawer.js +0 -39
- package/lib/components/ui/dropdown-menu.d.ts +0 -25
- package/lib/components/ui/dropdown-menu.js +0 -55
- package/lib/components/ui/empty.d.ts +0 -11
- package/lib/components/ui/empty.js +0 -37
- package/lib/components/ui/field.d.ts +0 -24
- package/lib/components/ui/field.js +0 -80
- package/lib/components/ui/form.d.ts +0 -24
- package/lib/components/ui/form.js +0 -63
- package/lib/components/ui/hover-card.d.ts +0 -6
- package/lib/components/ui/hover-card.js +0 -18
- package/lib/components/ui/input-group.d.ts +0 -19
- package/lib/components/ui/input-group.js +0 -69
- package/lib/components/ui/input-otp.d.ts +0 -11
- package/lib/components/ui/input-otp.js +0 -25
- package/lib/components/ui/input.d.ts +0 -3
- package/lib/components/ui/input.js +0 -6
- package/lib/components/ui/item.d.ts +0 -23
- package/lib/components/ui/item.js +0 -66
- package/lib/components/ui/kbd.d.ts +0 -3
- package/lib/components/ui/kbd.js +0 -13
- package/lib/components/ui/label.d.ts +0 -4
- package/lib/components/ui/label.js +0 -12
- package/lib/components/ui/menubar.d.ts +0 -26
- package/lib/components/ui/menubar.js +0 -58
- package/lib/components/ui/navigation-menu.d.ts +0 -14
- package/lib/components/ui/navigation-menu.js +0 -31
- package/lib/components/ui/pagination.d.ts +0 -13
- package/lib/components/ui/pagination.js +0 -29
- package/lib/components/ui/popover.d.ts +0 -7
- package/lib/components/ui/popover.js +0 -21
- package/lib/components/ui/progress.d.ts +0 -4
- package/lib/components/ui/progress.js +0 -12
- package/lib/components/ui/radio-group.d.ts +0 -5
- package/lib/components/ui/radio-group.js +0 -16
- package/lib/components/ui/resizable.d.ts +0 -8
- package/lib/components/ui/resizable.js +0 -19
- package/lib/components/ui/scroll-area.d.ts +0 -5
- package/lib/components/ui/scroll-area.js +0 -17
- package/lib/components/ui/select.d.ts +0 -15
- package/lib/components/ui/select.js +0 -42
- package/lib/components/ui/separator.d.ts +0 -4
- package/lib/components/ui/separator.js +0 -12
- package/lib/components/ui/sheet.d.ts +0 -13
- package/lib/components/ui/sheet.js +0 -44
- package/lib/components/ui/sidebar.d.ts +0 -69
- package/lib/components/ui/sidebar.js +0 -216
- package/lib/components/ui/skeleton.d.ts +0 -2
- package/lib/components/ui/skeleton.js +0 -10
- package/lib/components/ui/slider.d.ts +0 -4
- package/lib/components/ui/slider.js +0 -18
- package/lib/components/ui/sonner.d.ts +0 -3
- package/lib/components/ui/sonner.js +0 -25
- package/lib/components/ui/spinner.d.ts +0 -2
- package/lib/components/ui/spinner.js +0 -11
- package/lib/components/ui/switch.d.ts +0 -4
- package/lib/components/ui/switch.js +0 -12
- package/lib/components/ui/table.d.ts +0 -10
- package/lib/components/ui/table.js +0 -32
- package/lib/components/ui/tabs.d.ts +0 -7
- package/lib/components/ui/tabs.js +0 -21
- package/lib/components/ui/textarea.d.ts +0 -3
- package/lib/components/ui/textarea.js +0 -6
- package/lib/components/ui/toast.d.ts +0 -15
- package/lib/components/ui/toast.js +0 -38
- package/lib/components/ui/toaster.d.ts +0 -1
- package/lib/components/ui/toaster.js +0 -14
- package/lib/components/ui/toggle-group.d.ts +0 -9
- package/lib/components/ui/toggle-group.js +0 -26
- package/lib/components/ui/toggle.d.ts +0 -9
- package/lib/components/ui/toggle.js +0 -30
- package/lib/components/ui/tooltip.d.ts +0 -7
- package/lib/components/ui/tooltip.js +0 -21
- package/lib/components/vercel-ai-elements/artifact.d.ts +0 -23
- package/lib/components/vercel-ai-elements/artifact.js +0 -24
- package/lib/components/vercel-ai-elements/code-block.d.ts +0 -17
- package/lib/components/vercel-ai-elements/code-block.js +0 -94
- package/lib/components/vercel-ai-elements/conversation.d.ts +0 -15
- package/lib/components/vercel-ai-elements/conversation.js +0 -21
- package/lib/components/vercel-ai-elements/loader.d.ts +0 -5
- package/lib/components/vercel-ai-elements/loader.js +0 -8
- package/lib/components/vercel-ai-elements/message.d.ts +0 -46
- package/lib/components/vercel-ai-elements/message.js +0 -109
- package/lib/components/vercel-ai-elements/model-selector.d.ts +0 -35
- package/lib/components/vercel-ai-elements/model-selector.js +0 -22
- package/lib/components/vercel-ai-elements/prompt-input.d.ts +0 -195
- package/lib/components/vercel-ai-elements/prompt-input.js +0 -589
- package/lib/components/vercel-ai-elements/reasoning.d.ts +0 -26
- package/lib/components/vercel-ai-elements/reasoning.js +0 -80
- package/lib/components/vercel-ai-elements/shimmer.d.ts +0 -9
- package/lib/components/vercel-ai-elements/shimmer.js +0 -22
- package/lib/components/vercel-ai-elements/sources.d.ts +0 -12
- package/lib/components/vercel-ai-elements/sources.js +0 -13
- package/lib/components/vercel-ai-elements/suggestion.d.ts +0 -10
- package/lib/components/vercel-ai-elements/suggestion.js +0 -16
- package/lib/components/vercel-ai-elements/tool.d.ts +0 -23
- package/lib/components/vercel-ai-elements/tool.js +0 -52
- package/lib/examples/components/MainContent.d.ts +0 -19
- package/lib/examples/components/index.d.ts +0 -10
- package/lib/examples/components/index.js +0 -13
- package/lib/examples/vercel-ai-elements/VercelAiElementsShowcase.d.ts +0 -12
- package/lib/examples/vercel-ai-elements/VercelAiElementsShowcase.js +0 -69
- package/lib/examples/vercel-ai-elements/components/ArtifactShowcase.d.ts +0 -1
- package/lib/examples/vercel-ai-elements/components/ArtifactShowcase.js +0 -85
- package/lib/examples/vercel-ai-elements/components/CodeBlockShowcase.d.ts +0 -1
- package/lib/examples/vercel-ai-elements/components/CodeBlockShowcase.js +0 -62
- package/lib/examples/vercel-ai-elements/components/ConversationShowcase.d.ts +0 -1
- package/lib/examples/vercel-ai-elements/components/ConversationShowcase.js +0 -51
- package/lib/examples/vercel-ai-elements/components/LoaderShowcase.d.ts +0 -1
- package/lib/examples/vercel-ai-elements/components/LoaderShowcase.js +0 -9
- package/lib/examples/vercel-ai-elements/components/MessageShowcase.d.ts +0 -1
- package/lib/examples/vercel-ai-elements/components/MessageShowcase.js +0 -56
- package/lib/examples/vercel-ai-elements/components/ModelSelectorShowcase.d.ts +0 -1
- package/lib/examples/vercel-ai-elements/components/ModelSelectorShowcase.js +0 -50
- package/lib/examples/vercel-ai-elements/components/PromptInputShowcase.d.ts +0 -1
- package/lib/examples/vercel-ai-elements/components/PromptInputShowcase.js +0 -16
- package/lib/examples/vercel-ai-elements/components/ReasoningShowcase.d.ts +0 -1
- package/lib/examples/vercel-ai-elements/components/ReasoningShowcase.js +0 -72
- package/lib/examples/vercel-ai-elements/components/ShimmerShowcase.d.ts +0 -1
- package/lib/examples/vercel-ai-elements/components/ShimmerShowcase.js +0 -9
- package/lib/examples/vercel-ai-elements/components/SourcesShowcase.d.ts +0 -1
- package/lib/examples/vercel-ai-elements/components/SourcesShowcase.js +0 -43
- package/lib/examples/vercel-ai-elements/components/SuggestionShowcase.d.ts +0 -1
- package/lib/examples/vercel-ai-elements/components/SuggestionShowcase.js +0 -31
- package/lib/examples/vercel-ai-elements/components/ToolShowcase.d.ts +0 -1
- package/lib/examples/vercel-ai-elements/components/ToolShowcase.js +0 -54
- package/lib/examples/vercel-ai-elements/index.d.ts +0 -13
- package/lib/examples/vercel-ai-elements/index.js +0 -17
- package/lib/examples/vercel-ai-elements/main.d.ts +0 -1
- package/lib/examples/vercel-ai-elements/main.js +0 -9
- package/lib/examples/vercel-ai-elements/showcase.css +0 -128
- package/lib/hooks/useToast.d.ts +0 -44
- package/lib/hooks/useToast.js +0 -128
- package/patches/@datalayer+jupyter-lexical+1.0.8.patch +0 -11628
- package/patches/@datalayer+jupyter-react+2.0.2.patch +0 -5338
- package/style/showcase-vercel-ai.css +0 -137
- /package/lib/{examples/components → components}/FooterMetrics.js +0 -0
- /package/lib/{examples/components → components}/MockFileBrowser.js +0 -0
- /package/lib/{examples/components → components}/SessionTabs.js +0 -0
- /package/lib/{examples/components → components}/TimeTravel.js +0 -0
- /package/lib/{models → types}/AIAgent.d.ts +0 -0
- /package/lib/{models → types}/AIAgent.js +0 -0
- /package/lib/{models → types}/index.d.ts +0 -0
- /package/lib/{models → types}/index.js +0 -0
package/lib/hooks/useAGUI.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export interface UseAGUIOptions {
|
|
|
33
33
|
* Hook to manage chat state with AG-UI protocol.
|
|
34
34
|
*
|
|
35
35
|
* This hook provides an interface to the AG-UI protocol endpoint
|
|
36
|
-
* at /api/v1/ag-ui/{agent_id}/ which is powered by Pydantic AI's
|
|
36
|
+
* at /api/v1/ag-ui/{agent_id}/ (trailing slash required) which is powered by Pydantic AI's
|
|
37
37
|
* native AGUIApp. The AG-UI protocol accepts POST requests with
|
|
38
38
|
* prompts and streams back agent responses.
|
|
39
39
|
*
|
package/lib/hooks/useAGUI.js
CHANGED
|
@@ -7,7 +7,7 @@ import { useCallback, useEffect, useState } from 'react';
|
|
|
7
7
|
* Hook to manage chat state with AG-UI protocol.
|
|
8
8
|
*
|
|
9
9
|
* This hook provides an interface to the AG-UI protocol endpoint
|
|
10
|
-
* at /api/v1/ag-ui/{agent_id}/ which is powered by Pydantic AI's
|
|
10
|
+
* at /api/v1/ag-ui/{agent_id}/ (trailing slash required) which is powered by Pydantic AI's
|
|
11
11
|
* native AGUIApp. The AG-UI protocol accepts POST requests with
|
|
12
12
|
* prompts and streams back agent responses.
|
|
13
13
|
*
|
package/lib/identity/types.d.ts
CHANGED
|
@@ -226,7 +226,7 @@ export interface TokenProviderConfig {
|
|
|
226
226
|
displayName: string;
|
|
227
227
|
/** Icon URL */
|
|
228
228
|
iconUrl?: string;
|
|
229
|
-
/** Profile URL template (use {username} placeholder) */
|
|
229
|
+
/** Profile URL template (use `{username}` placeholder) */
|
|
230
230
|
profileUrlTemplate?: string;
|
|
231
231
|
/** User info endpoint (called with Bearer token) */
|
|
232
232
|
userInfoUrl?: string;
|
package/lib/index.d.ts
CHANGED
|
@@ -2,3 +2,5 @@ export * from './components';
|
|
|
2
2
|
export * from './state';
|
|
3
3
|
export * from './runtime';
|
|
4
4
|
export * from './identity';
|
|
5
|
+
export * from './config';
|
|
6
|
+
export type { ConversationEntry, MCPServer, AgentSkillSpec, AgentSpec, AIModel, FrontendConfig, BuiltinTool, MCPServerTool, } from './types';
|
package/lib/index.js
CHANGED
package/lib/runtime/index.d.ts
CHANGED
|
@@ -28,8 +28,11 @@
|
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
30
|
export { useRuntimeStore, useRuntime, useAgent, useRuntimeStatus, useRuntimeError, useIsLaunching, getRuntimeState, subscribeToRuntime, } from './runtimeStore';
|
|
31
|
+
export type { RuntimeStore, RuntimeStoreState, RuntimeStoreActions, } from './runtimeStore';
|
|
31
32
|
export { useAgentConnection } from './useAgentConnection';
|
|
33
|
+
export type { UseAgentConnectionReturn, UseAgentConnectionOptions, } from './useAgentConnection';
|
|
32
34
|
export { useAgentRuntime } from './useAgentRuntime';
|
|
35
|
+
export type { UseAgentRuntimeReturn, UseAgentRuntimeOptions, } from './useAgentRuntime';
|
|
33
36
|
export type { IRuntimeLocation, IRuntimeType, IRuntimeCapabilities, IRuntimePod, IRuntimeOptions, IRuntimeDesc, } from './types';
|
|
34
37
|
export type { RuntimeConnection, AgentRuntimeStatus as RuntimeStatus, AgentConfig, AgentConnection, AgentRuntimeState, } from './types';
|
|
35
38
|
export { DEFAULT_AGENT_CONFIG } from './types';
|
|
@@ -3,7 +3,7 @@ import type { IRuntimeOptions, RuntimeConnection, AgentRuntimeStatus, AgentConfi
|
|
|
3
3
|
/**
|
|
4
4
|
* Runtime store state interface.
|
|
5
5
|
*/
|
|
6
|
-
interface RuntimeStoreState {
|
|
6
|
+
export interface RuntimeStoreState {
|
|
7
7
|
/** Current runtime connection */
|
|
8
8
|
runtime: RuntimeConnection | null;
|
|
9
9
|
/** Current agent connection */
|
|
@@ -18,7 +18,7 @@ interface RuntimeStoreState {
|
|
|
18
18
|
/**
|
|
19
19
|
* Runtime store actions interface.
|
|
20
20
|
*/
|
|
21
|
-
interface RuntimeStoreActions {
|
|
21
|
+
export interface RuntimeStoreActions {
|
|
22
22
|
/** Launch a new runtime */
|
|
23
23
|
launchRuntime: (options: IRuntimeOptions) => Promise<RuntimeConnection>;
|
|
24
24
|
/** Connect to an existing runtime */
|
|
@@ -39,7 +39,7 @@ interface RuntimeStoreActions {
|
|
|
39
39
|
/** Reset store to initial state */
|
|
40
40
|
reset: () => void;
|
|
41
41
|
}
|
|
42
|
-
type RuntimeStore = RuntimeStoreState & RuntimeStoreActions;
|
|
42
|
+
export type RuntimeStore = RuntimeStoreState & RuntimeStoreActions;
|
|
43
43
|
/**
|
|
44
44
|
* Zustand store for runtime management.
|
|
45
45
|
*
|
|
@@ -74,4 +74,3 @@ export declare const getRuntimeState: () => RuntimeStore;
|
|
|
74
74
|
* Subscribe to runtime store changes (for use outside React).
|
|
75
75
|
*/
|
|
76
76
|
export declare const subscribeToRuntime: (listener: (state: RuntimeStore, prevState: RuntimeStore) => void) => () => void;
|
|
77
|
-
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { AgentConfig, AgentConnection } from './types';
|
|
2
|
-
interface UseAgentConnectionOptions {
|
|
2
|
+
export interface UseAgentConnectionOptions {
|
|
3
3
|
/** Agent configuration */
|
|
4
4
|
config?: AgentConfig;
|
|
5
5
|
/** Auto-create agent when runtime is ready */
|
|
6
6
|
autoCreate?: boolean;
|
|
7
7
|
}
|
|
8
|
-
interface UseAgentConnectionReturn {
|
|
8
|
+
export interface UseAgentConnectionReturn {
|
|
9
9
|
/** Current agent connection */
|
|
10
10
|
agent: AgentConnection | null;
|
|
11
11
|
/** Whether the agent is ready */
|
|
@@ -43,4 +43,3 @@ interface UseAgentConnectionReturn {
|
|
|
43
43
|
* ```
|
|
44
44
|
*/
|
|
45
45
|
export declare function useAgentConnection(options?: UseAgentConnectionOptions): UseAgentConnectionReturn;
|
|
46
|
-
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { ServiceManager } from '@jupyterlab/services';
|
|
2
2
|
import type { IRuntimeOptions, AgentConfig, RuntimeConnection, AgentConnection, AgentRuntimeStatus } from './types';
|
|
3
|
-
interface UseAgentRuntimeOptions {
|
|
3
|
+
export interface UseAgentRuntimeOptions {
|
|
4
4
|
/** Agent configuration */
|
|
5
5
|
agentConfig?: AgentConfig;
|
|
6
6
|
/** Auto-create agent when runtime connects */
|
|
7
7
|
autoCreateAgent?: boolean;
|
|
8
8
|
}
|
|
9
|
-
interface UseAgentRuntimeReturn {
|
|
9
|
+
export interface UseAgentRuntimeReturn {
|
|
10
10
|
/** Current runtime connection */
|
|
11
11
|
runtime: RuntimeConnection | null;
|
|
12
12
|
/** Current agent connection */
|
|
@@ -91,4 +91,3 @@ interface UseAgentRuntimeReturn {
|
|
|
91
91
|
* ```
|
|
92
92
|
*/
|
|
93
93
|
export declare function useAgentRuntime(options?: UseAgentRuntimeOptions): UseAgentRuntimeReturn;
|
|
94
|
-
export {};
|
|
@@ -78,7 +78,7 @@ class ConfettiWidget(ipyreact.ReactWidget):
|
|
|
78
78
|
CLICK here for some CONFETTIS
|
|
79
79
|
</button>
|
|
80
80
|
<h2>You have {value || 0} wishe{ (value > 1) && 's' } so far...</h2>
|
|
81
|
-
<quote>Powered by
|
|
81
|
+
<quote>Powered by ☰ Datalayer</quote>
|
|
82
82
|
</>
|
|
83
83
|
)
|
|
84
84
|
};"""
|
|
@@ -37,6 +37,7 @@ export function useNotebookTools(documentId, contextOverrides) {
|
|
|
37
37
|
const notebookStoreState = useNotebookStore();
|
|
38
38
|
// Create DefaultExecutor (stable reference)
|
|
39
39
|
// Only recreate when documentId changes, not on every state update
|
|
40
|
+
// TODO Revisit - Cast to satisfy index signature requirement for dynamic method lookup
|
|
40
41
|
const executor = useMemo(() => new DefaultExecutor(documentId, notebookStoreState), [documentId]);
|
|
41
42
|
// Create stable context object with useMemo
|
|
42
43
|
// Defaults: format='toon' for conversational AI responses
|
|
@@ -41,6 +41,7 @@ export function useNotebookToolActions(documentId, contextOverrides) {
|
|
|
41
41
|
// Create DefaultExecutor (stable reference)
|
|
42
42
|
// Only recreate when documentId changes, not on every state update
|
|
43
43
|
// The executor holds a reference to the store which is always current
|
|
44
|
+
// TODO: Revisit - Cast to satisfy index signature requirement for dynamic method lookup
|
|
44
45
|
const executor = useMemo(() => new DefaultExecutor(documentId, notebookStore), [documentId]);
|
|
45
46
|
// Create stable context object with useMemo
|
|
46
47
|
// Defaults: format='toon' for conversational AI responses
|
package/lib/types.d.ts
CHANGED
|
@@ -3,3 +3,153 @@ export interface ConversationEntry {
|
|
|
3
3
|
firstMessage?: string;
|
|
4
4
|
timestamp: number;
|
|
5
5
|
}
|
|
6
|
+
/**
|
|
7
|
+
* A tool provided by an MCP server.
|
|
8
|
+
*/
|
|
9
|
+
export interface MCPServerTool {
|
|
10
|
+
/** Tool name/identifier */
|
|
11
|
+
name: string;
|
|
12
|
+
/** Tool description */
|
|
13
|
+
description: string;
|
|
14
|
+
/** Whether the tool is enabled */
|
|
15
|
+
enabled: boolean;
|
|
16
|
+
/** JSON schema for tool input parameters */
|
|
17
|
+
inputSchema?: Record<string, unknown>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Configuration for an MCP server.
|
|
21
|
+
*/
|
|
22
|
+
export interface MCPServer {
|
|
23
|
+
/** Unique server identifier */
|
|
24
|
+
id: string;
|
|
25
|
+
/** Display name for the server */
|
|
26
|
+
name: string;
|
|
27
|
+
/** Server URL (for HTTP-based servers) */
|
|
28
|
+
url: string;
|
|
29
|
+
/** Whether the server is enabled */
|
|
30
|
+
enabled: boolean;
|
|
31
|
+
/** List of available tools */
|
|
32
|
+
tools: MCPServerTool[];
|
|
33
|
+
/** Command to run the MCP server (e.g., 'npx', 'uvx') */
|
|
34
|
+
command?: string;
|
|
35
|
+
/** Command arguments for the MCP server */
|
|
36
|
+
args: string[];
|
|
37
|
+
/** Whether the server is available (based on tool discovery) */
|
|
38
|
+
isAvailable: boolean;
|
|
39
|
+
/** Transport type: 'stdio' or 'http' */
|
|
40
|
+
transport: 'stdio' | 'http';
|
|
41
|
+
/** Environment variables required by this server (e.g., API keys) */
|
|
42
|
+
requiredEnvVars?: string[];
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Specification for an agent skill.
|
|
46
|
+
*
|
|
47
|
+
* Simplified version of the full Skill type from agent-skills,
|
|
48
|
+
* containing only the fields needed for agent specification.
|
|
49
|
+
*/
|
|
50
|
+
export interface AgentSkillSpec {
|
|
51
|
+
/** Unique skill identifier */
|
|
52
|
+
id: string;
|
|
53
|
+
/** Display name for the skill */
|
|
54
|
+
name: string;
|
|
55
|
+
/** Skill description */
|
|
56
|
+
description: string;
|
|
57
|
+
/** Skill version */
|
|
58
|
+
version: string;
|
|
59
|
+
/** Tags for categorization */
|
|
60
|
+
tags: string[];
|
|
61
|
+
/** Whether the skill is enabled */
|
|
62
|
+
enabled: boolean;
|
|
63
|
+
/** Environment variables required by this skill (e.g., API keys) */
|
|
64
|
+
requiredEnvVars?: string[];
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Status of an agent space.
|
|
68
|
+
*/
|
|
69
|
+
export type AgentStatus = 'starting' | 'running' | 'paused' | 'terminated' | 'archived';
|
|
70
|
+
/**
|
|
71
|
+
* Specification for an AI agent.
|
|
72
|
+
*
|
|
73
|
+
* Defines the configuration for a reusable agent template that can be
|
|
74
|
+
* instantiated as an AgentSpace.
|
|
75
|
+
*/
|
|
76
|
+
export interface AgentSpec {
|
|
77
|
+
/** Unique agent identifier */
|
|
78
|
+
id: string;
|
|
79
|
+
/** Display name for the agent */
|
|
80
|
+
name: string;
|
|
81
|
+
/** Agent description */
|
|
82
|
+
description: string;
|
|
83
|
+
/** System prompt for the agent */
|
|
84
|
+
systemPrompt?: string;
|
|
85
|
+
/** System prompt when codemode is enabled */
|
|
86
|
+
systemPromptCodemode?: string;
|
|
87
|
+
/** Tags for categorization */
|
|
88
|
+
tags: string[];
|
|
89
|
+
/** Whether the agent is enabled */
|
|
90
|
+
enabled: boolean;
|
|
91
|
+
/** MCP servers used by this agent */
|
|
92
|
+
mcpServers: MCPServer[];
|
|
93
|
+
/** Skills available to this agent */
|
|
94
|
+
skills: AgentSkillSpec[];
|
|
95
|
+
/** Runtime environment name for this agent */
|
|
96
|
+
environmentName: string;
|
|
97
|
+
/** Icon identifier or URL for the agent */
|
|
98
|
+
icon?: string;
|
|
99
|
+
/** Theme color for the agent (hex code) */
|
|
100
|
+
color?: string;
|
|
101
|
+
/** Chat suggestions to show users what this agent can do */
|
|
102
|
+
suggestions?: string[];
|
|
103
|
+
/** Welcome message shown when agent starts */
|
|
104
|
+
welcomeMessage?: string;
|
|
105
|
+
/** Path to Jupyter notebook to show on agent creation */
|
|
106
|
+
welcomeNotebook?: string;
|
|
107
|
+
/** Path to Lexical document to show on agent creation */
|
|
108
|
+
welcomeDocument?: string;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Configuration for an AI model.
|
|
112
|
+
*/
|
|
113
|
+
export interface AIModel {
|
|
114
|
+
/** Model identifier (e.g., 'anthropic:claude-sonnet-4-5') */
|
|
115
|
+
id: string;
|
|
116
|
+
/** Display name for the model */
|
|
117
|
+
name: string;
|
|
118
|
+
/** List of builtin tool IDs */
|
|
119
|
+
builtinTools: string[];
|
|
120
|
+
/** Required environment variables for this model */
|
|
121
|
+
requiredEnvVars: string[];
|
|
122
|
+
/** Whether the model is available (based on env vars) */
|
|
123
|
+
isAvailable: boolean;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Configuration for a builtin tool.
|
|
127
|
+
*/
|
|
128
|
+
export interface BuiltinTool {
|
|
129
|
+
/** Tool identifier */
|
|
130
|
+
id: string;
|
|
131
|
+
/** Display name for the tool */
|
|
132
|
+
name: string;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Configuration returned to frontend.
|
|
136
|
+
*/
|
|
137
|
+
export interface FrontendConfig {
|
|
138
|
+
/** Available AI models */
|
|
139
|
+
models: AIModel[];
|
|
140
|
+
/** Available builtin tools */
|
|
141
|
+
builtinTools: BuiltinTool[];
|
|
142
|
+
/** Configured MCP servers */
|
|
143
|
+
mcpServers: MCPServer[];
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Configuration for connecting to an agent runtime.
|
|
147
|
+
*/
|
|
148
|
+
export interface AgentRuntimeConfig {
|
|
149
|
+
/** URL of the agent runtime server */
|
|
150
|
+
url: string;
|
|
151
|
+
/** Optional agent ID to connect to */
|
|
152
|
+
agentId?: string;
|
|
153
|
+
/** Optional authentication token */
|
|
154
|
+
authToken?: string;
|
|
155
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datalayer/agent-runtimes",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"workspaces": [
|
|
6
6
|
".",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"create:patches": "bash scripts/create-patches.sh",
|
|
70
70
|
"examples": "run-p server:start examples:vite",
|
|
71
71
|
"examples:fresh": "npm run clean:cache && npm run examples",
|
|
72
|
-
"examples:
|
|
72
|
+
"examples:jupyter": "run-p jupyter:start server:start examples:vite",
|
|
73
73
|
"examples:nextjs": "npm run dev --workspace=nextjs-notebook-example",
|
|
74
74
|
"examples:vite": "VITE_APP_TARGET=examples VITE_DATALAYER_RUN_URL=http://localhost:8888 vite",
|
|
75
75
|
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,css,json,md}\" \"examples/**/*.{js,jsx,ts,tsx,css,json,md,mjs}\"",
|
|
@@ -88,9 +88,8 @@
|
|
|
88
88
|
"prepare": "husky",
|
|
89
89
|
"preview": "vite preview",
|
|
90
90
|
"rebuild:fresh": "npm run create:patches && npm install && npm run build && npm run clean:cache",
|
|
91
|
-
"server": "python -m agent_runtimes",
|
|
92
|
-
"server:start": "PYTHONIOENCODING=utf-8 python -m agent_runtimes --port 8765 --
|
|
93
|
-
"showcase:vercel-ai-elements": "VITE_APP_TARGET=showcase-vercel-ai-elements vite",
|
|
91
|
+
"server": "python -m agent_runtimes serve",
|
|
92
|
+
"server:start": "PYTHONIOENCODING=utf-8 python -m agent_runtimes serve --port 8765 --debug",
|
|
94
93
|
"start": "vite",
|
|
95
94
|
"start:acp": "run-p server:start start:acp:vite",
|
|
96
95
|
"start:acp:prod": "run-p server start:acp:vite",
|
package/scripts/apply-patches.sh
CHANGED
|
@@ -40,7 +40,7 @@ for patch_file in patches/*.patch; do
|
|
|
40
40
|
filename=$(basename "$patch_file")
|
|
41
41
|
# Handle scoped packages: @datalayer+jupyter-lexical+1.0.8.patch -> @datalayer/jupyter-lexical
|
|
42
42
|
pkg_name=$(echo "$filename" | sed 's/+/\//; s/+.*//')
|
|
43
|
-
|
|
43
|
+
|
|
44
44
|
if [ ! -d "node_modules/$pkg_name" ]; then
|
|
45
45
|
echo -e "${YELLOW}⚠️ Package $pkg_name not found in local node_modules (may be hoisted in monorepo)${NC}"
|
|
46
46
|
MISSING_PACKAGES=true
|