@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.
Files changed (275) hide show
  1. package/README.md +2 -1
  2. package/lib/{examples/components → components}/AgentConfiguration.d.ts +27 -12
  3. package/lib/{examples/components → components}/AgentConfiguration.js +170 -22
  4. package/lib/{examples/components → components}/FooterMetrics.d.ts +1 -2
  5. package/lib/{examples/components → components}/Header.d.ts +1 -6
  6. package/lib/{examples/components → components}/Header.js +5 -39
  7. package/lib/{examples/components → components}/HeaderControls.d.ts +1 -2
  8. package/lib/{examples/components → components}/HeaderControls.js +1 -1
  9. package/lib/{examples/components → components}/LexicalEditor.d.ts +2 -3
  10. package/lib/{examples/components → components}/LexicalEditor.js +2 -2
  11. package/lib/components/MainContent.d.ts +34 -0
  12. package/lib/{examples/components → components}/MainContent.js +18 -9
  13. package/lib/components/McpServerManager.d.ts +30 -0
  14. package/lib/components/McpServerManager.js +331 -0
  15. package/lib/{examples/components → components}/MockFileBrowser.d.ts +1 -2
  16. package/lib/{examples/components → components}/SessionTabs.d.ts +2 -3
  17. package/lib/{examples/components → components}/TimeTravel.d.ts +1 -2
  18. package/lib/components/chat/components/AgentDetails.d.ts +3 -1
  19. package/lib/components/chat/components/AgentDetails.js +323 -31
  20. package/lib/components/chat/components/Chat.d.ts +37 -3
  21. package/lib/components/chat/components/Chat.js +29 -10
  22. package/lib/components/chat/components/ChatFloating.d.ts +27 -2
  23. package/lib/components/chat/components/ChatFloating.js +17 -10
  24. package/lib/components/chat/components/ChatPopupStandalone.js +1 -1
  25. package/lib/components/chat/components/ChatSidebar.d.ts +1 -1
  26. package/lib/components/chat/components/ChatStandalone.d.ts +1 -1
  27. package/lib/components/chat/components/ChatStandalone.js +1 -1
  28. package/lib/components/chat/components/ContextDistribution.d.ts +70 -6
  29. package/lib/components/chat/components/ContextDistribution.js +11 -4
  30. package/lib/components/chat/components/ContextInspector.d.ts +81 -0
  31. package/lib/components/chat/components/ContextInspector.js +261 -0
  32. package/lib/components/chat/components/ContextPanel.d.ts +112 -0
  33. package/lib/components/chat/components/ContextPanel.js +373 -0
  34. package/lib/components/chat/components/base/ChatBase.d.ts +74 -19
  35. package/lib/components/chat/components/base/ChatBase.js +296 -37
  36. package/lib/components/chat/components/index.d.ts +3 -1
  37. package/lib/components/chat/components/index.js +2 -0
  38. package/lib/components/chat/extensions/ExtensionRegistry.d.ts +1 -1
  39. package/lib/components/chat/extensions/index.d.ts +1 -0
  40. package/lib/components/chat/index.d.ts +3 -3
  41. package/lib/components/chat/protocols/AGUIAdapter.js +24 -4
  42. package/lib/components/chat/protocols/VercelAIAdapter.js +35 -1
  43. package/lib/components/chat/store/chatStore.d.ts +2 -3
  44. package/lib/components/chat/store/conversationStore.d.ts +83 -0
  45. package/lib/components/chat/store/conversationStore.js +174 -0
  46. package/lib/components/chat/store/index.d.ts +2 -1
  47. package/lib/components/chat/store/index.js +1 -0
  48. package/lib/components/chat/types/inference.d.ts +17 -0
  49. package/lib/components/chat/types/protocol.d.ts +10 -0
  50. package/lib/components/index.d.ts +23 -0
  51. package/lib/components/index.js +11 -0
  52. package/lib/config/agents.d.ts +33 -0
  53. package/lib/config/agents.js +424 -0
  54. package/lib/config/index.d.ts +4 -0
  55. package/lib/config/index.js +8 -0
  56. package/lib/config/mcpServers.d.ts +18 -0
  57. package/lib/config/mcpServers.js +129 -0
  58. package/lib/config/skills.d.ts +25 -0
  59. package/lib/config/skills.js +54 -0
  60. package/lib/{lib → config}/utils.d.ts +1 -1
  61. package/lib/{lib → config}/utils.js +2 -2
  62. package/lib/examples/AgentRuntimeLexical2Example.d.ts +1 -0
  63. package/lib/examples/AgentRuntimeLexical2Example.js +3 -2
  64. package/lib/examples/AgentRuntimeLexicalExample.d.ts +1 -0
  65. package/lib/examples/AgentRuntimeLexicalExample.js +5 -3
  66. package/lib/examples/AgentRuntimeLexicalSidebarExample.d.ts +1 -0
  67. package/lib/examples/AgentRuntimeLexicalSidebarExample.js +3 -3
  68. package/lib/examples/AgentRuntimeNotebookExample.js +1 -1
  69. package/lib/examples/AgentSpaceFormExample.d.ts +2 -2
  70. package/lib/examples/AgentSpaceFormExample.js +167 -29
  71. package/lib/examples/CopilotKitLexicalExample.d.ts +1 -0
  72. package/lib/examples/CopilotKitLexicalExample.js +3 -2
  73. package/lib/examples/index.d.ts +1 -0
  74. package/lib/examples/stores/notebooks/NotebookExample2.ipynb.json +43 -43
  75. package/lib/hooks/useAGUI.d.ts +1 -1
  76. package/lib/hooks/useAGUI.js +1 -1
  77. package/lib/identity/types.d.ts +1 -1
  78. package/lib/index.d.ts +2 -0
  79. package/lib/index.js +1 -0
  80. package/lib/runtime/index.d.ts +3 -0
  81. package/lib/runtime/runtimeStore.d.ts +3 -4
  82. package/lib/runtime/useAgentConnection.d.ts +2 -3
  83. package/lib/runtime/useAgentRuntime.d.ts +2 -3
  84. package/lib/stories/Cell.stories.js +1 -1
  85. package/lib/tools/adapters/agent-runtimes/notebookHooks.js +1 -0
  86. package/lib/tools/adapters/copilotkit/notebookHooks.js +1 -0
  87. package/lib/types.d.ts +150 -0
  88. package/package.json +4 -5
  89. package/scripts/apply-patches.sh +1 -1
  90. package/scripts/codegen/generate_agents.py +452 -0
  91. package/scripts/codegen/generate_mcp_servers.py +424 -0
  92. package/scripts/codegen/generate_skills.py +321 -0
  93. package/scripts/download-ai-elements.py +35 -20
  94. package/scripts/sync-jupyter.sh +6 -0
  95. package/lib/components/ui/accordion.d.ts +0 -7
  96. package/lib/components/ui/accordion.js +0 -22
  97. package/lib/components/ui/alert-dialog.d.ts +0 -14
  98. package/lib/components/ui/alert-dialog.js +0 -43
  99. package/lib/components/ui/alert.d.ts +0 -9
  100. package/lib/components/ui/alert.js +0 -24
  101. package/lib/components/ui/aspect-ratio.d.ts +0 -3
  102. package/lib/components/ui/aspect-ratio.js +0 -11
  103. package/lib/components/ui/avatar.d.ts +0 -6
  104. package/lib/components/ui/avatar.js +0 -18
  105. package/lib/components/ui/badge.d.ts +0 -9
  106. package/lib/components/ui/badge.js +0 -22
  107. package/lib/components/ui/breadcrumb.d.ts +0 -11
  108. package/lib/components/ui/breadcrumb.js +0 -27
  109. package/lib/components/ui/button-group.d.ts +0 -11
  110. package/lib/components/ui/button-group.js +0 -31
  111. package/lib/components/ui/button.d.ts +0 -13
  112. package/lib/components/ui/button.js +0 -39
  113. package/lib/components/ui/calendar.d.ts +0 -8
  114. package/lib/components/ui/calendar.js +0 -80
  115. package/lib/components/ui/card.d.ts +0 -9
  116. package/lib/components/ui/card.js +0 -24
  117. package/lib/components/ui/carousel.d.ts +0 -19
  118. package/lib/components/ui/carousel.js +0 -95
  119. package/lib/components/ui/chart.d.ts +0 -53
  120. package/lib/components/ui/chart.js +0 -136
  121. package/lib/components/ui/checkbox.d.ts +0 -4
  122. package/lib/components/ui/checkbox.js +0 -13
  123. package/lib/components/ui/collapsible.d.ts +0 -5
  124. package/lib/components/ui/collapsible.js +0 -17
  125. package/lib/components/ui/command.d.ts +0 -18
  126. package/lib/components/ui/command.js +0 -38
  127. package/lib/components/ui/context-menu.d.ts +0 -25
  128. package/lib/components/ui/context-menu.js +0 -55
  129. package/lib/components/ui/dialog.d.ts +0 -15
  130. package/lib/components/ui/dialog.js +0 -40
  131. package/lib/components/ui/drawer.d.ts +0 -13
  132. package/lib/components/ui/drawer.js +0 -39
  133. package/lib/components/ui/dropdown-menu.d.ts +0 -25
  134. package/lib/components/ui/dropdown-menu.js +0 -55
  135. package/lib/components/ui/empty.d.ts +0 -11
  136. package/lib/components/ui/empty.js +0 -37
  137. package/lib/components/ui/field.d.ts +0 -24
  138. package/lib/components/ui/field.js +0 -80
  139. package/lib/components/ui/form.d.ts +0 -24
  140. package/lib/components/ui/form.js +0 -63
  141. package/lib/components/ui/hover-card.d.ts +0 -6
  142. package/lib/components/ui/hover-card.js +0 -18
  143. package/lib/components/ui/input-group.d.ts +0 -19
  144. package/lib/components/ui/input-group.js +0 -69
  145. package/lib/components/ui/input-otp.d.ts +0 -11
  146. package/lib/components/ui/input-otp.js +0 -25
  147. package/lib/components/ui/input.d.ts +0 -3
  148. package/lib/components/ui/input.js +0 -6
  149. package/lib/components/ui/item.d.ts +0 -23
  150. package/lib/components/ui/item.js +0 -66
  151. package/lib/components/ui/kbd.d.ts +0 -3
  152. package/lib/components/ui/kbd.js +0 -13
  153. package/lib/components/ui/label.d.ts +0 -4
  154. package/lib/components/ui/label.js +0 -12
  155. package/lib/components/ui/menubar.d.ts +0 -26
  156. package/lib/components/ui/menubar.js +0 -58
  157. package/lib/components/ui/navigation-menu.d.ts +0 -14
  158. package/lib/components/ui/navigation-menu.js +0 -31
  159. package/lib/components/ui/pagination.d.ts +0 -13
  160. package/lib/components/ui/pagination.js +0 -29
  161. package/lib/components/ui/popover.d.ts +0 -7
  162. package/lib/components/ui/popover.js +0 -21
  163. package/lib/components/ui/progress.d.ts +0 -4
  164. package/lib/components/ui/progress.js +0 -12
  165. package/lib/components/ui/radio-group.d.ts +0 -5
  166. package/lib/components/ui/radio-group.js +0 -16
  167. package/lib/components/ui/resizable.d.ts +0 -8
  168. package/lib/components/ui/resizable.js +0 -19
  169. package/lib/components/ui/scroll-area.d.ts +0 -5
  170. package/lib/components/ui/scroll-area.js +0 -17
  171. package/lib/components/ui/select.d.ts +0 -15
  172. package/lib/components/ui/select.js +0 -42
  173. package/lib/components/ui/separator.d.ts +0 -4
  174. package/lib/components/ui/separator.js +0 -12
  175. package/lib/components/ui/sheet.d.ts +0 -13
  176. package/lib/components/ui/sheet.js +0 -44
  177. package/lib/components/ui/sidebar.d.ts +0 -69
  178. package/lib/components/ui/sidebar.js +0 -216
  179. package/lib/components/ui/skeleton.d.ts +0 -2
  180. package/lib/components/ui/skeleton.js +0 -10
  181. package/lib/components/ui/slider.d.ts +0 -4
  182. package/lib/components/ui/slider.js +0 -18
  183. package/lib/components/ui/sonner.d.ts +0 -3
  184. package/lib/components/ui/sonner.js +0 -25
  185. package/lib/components/ui/spinner.d.ts +0 -2
  186. package/lib/components/ui/spinner.js +0 -11
  187. package/lib/components/ui/switch.d.ts +0 -4
  188. package/lib/components/ui/switch.js +0 -12
  189. package/lib/components/ui/table.d.ts +0 -10
  190. package/lib/components/ui/table.js +0 -32
  191. package/lib/components/ui/tabs.d.ts +0 -7
  192. package/lib/components/ui/tabs.js +0 -21
  193. package/lib/components/ui/textarea.d.ts +0 -3
  194. package/lib/components/ui/textarea.js +0 -6
  195. package/lib/components/ui/toast.d.ts +0 -15
  196. package/lib/components/ui/toast.js +0 -38
  197. package/lib/components/ui/toaster.d.ts +0 -1
  198. package/lib/components/ui/toaster.js +0 -14
  199. package/lib/components/ui/toggle-group.d.ts +0 -9
  200. package/lib/components/ui/toggle-group.js +0 -26
  201. package/lib/components/ui/toggle.d.ts +0 -9
  202. package/lib/components/ui/toggle.js +0 -30
  203. package/lib/components/ui/tooltip.d.ts +0 -7
  204. package/lib/components/ui/tooltip.js +0 -21
  205. package/lib/components/vercel-ai-elements/artifact.d.ts +0 -23
  206. package/lib/components/vercel-ai-elements/artifact.js +0 -24
  207. package/lib/components/vercel-ai-elements/code-block.d.ts +0 -17
  208. package/lib/components/vercel-ai-elements/code-block.js +0 -94
  209. package/lib/components/vercel-ai-elements/conversation.d.ts +0 -15
  210. package/lib/components/vercel-ai-elements/conversation.js +0 -21
  211. package/lib/components/vercel-ai-elements/loader.d.ts +0 -5
  212. package/lib/components/vercel-ai-elements/loader.js +0 -8
  213. package/lib/components/vercel-ai-elements/message.d.ts +0 -46
  214. package/lib/components/vercel-ai-elements/message.js +0 -109
  215. package/lib/components/vercel-ai-elements/model-selector.d.ts +0 -35
  216. package/lib/components/vercel-ai-elements/model-selector.js +0 -22
  217. package/lib/components/vercel-ai-elements/prompt-input.d.ts +0 -195
  218. package/lib/components/vercel-ai-elements/prompt-input.js +0 -589
  219. package/lib/components/vercel-ai-elements/reasoning.d.ts +0 -26
  220. package/lib/components/vercel-ai-elements/reasoning.js +0 -80
  221. package/lib/components/vercel-ai-elements/shimmer.d.ts +0 -9
  222. package/lib/components/vercel-ai-elements/shimmer.js +0 -22
  223. package/lib/components/vercel-ai-elements/sources.d.ts +0 -12
  224. package/lib/components/vercel-ai-elements/sources.js +0 -13
  225. package/lib/components/vercel-ai-elements/suggestion.d.ts +0 -10
  226. package/lib/components/vercel-ai-elements/suggestion.js +0 -16
  227. package/lib/components/vercel-ai-elements/tool.d.ts +0 -23
  228. package/lib/components/vercel-ai-elements/tool.js +0 -52
  229. package/lib/examples/components/MainContent.d.ts +0 -19
  230. package/lib/examples/components/index.d.ts +0 -10
  231. package/lib/examples/components/index.js +0 -13
  232. package/lib/examples/vercel-ai-elements/VercelAiElementsShowcase.d.ts +0 -12
  233. package/lib/examples/vercel-ai-elements/VercelAiElementsShowcase.js +0 -69
  234. package/lib/examples/vercel-ai-elements/components/ArtifactShowcase.d.ts +0 -1
  235. package/lib/examples/vercel-ai-elements/components/ArtifactShowcase.js +0 -85
  236. package/lib/examples/vercel-ai-elements/components/CodeBlockShowcase.d.ts +0 -1
  237. package/lib/examples/vercel-ai-elements/components/CodeBlockShowcase.js +0 -62
  238. package/lib/examples/vercel-ai-elements/components/ConversationShowcase.d.ts +0 -1
  239. package/lib/examples/vercel-ai-elements/components/ConversationShowcase.js +0 -51
  240. package/lib/examples/vercel-ai-elements/components/LoaderShowcase.d.ts +0 -1
  241. package/lib/examples/vercel-ai-elements/components/LoaderShowcase.js +0 -9
  242. package/lib/examples/vercel-ai-elements/components/MessageShowcase.d.ts +0 -1
  243. package/lib/examples/vercel-ai-elements/components/MessageShowcase.js +0 -56
  244. package/lib/examples/vercel-ai-elements/components/ModelSelectorShowcase.d.ts +0 -1
  245. package/lib/examples/vercel-ai-elements/components/ModelSelectorShowcase.js +0 -50
  246. package/lib/examples/vercel-ai-elements/components/PromptInputShowcase.d.ts +0 -1
  247. package/lib/examples/vercel-ai-elements/components/PromptInputShowcase.js +0 -16
  248. package/lib/examples/vercel-ai-elements/components/ReasoningShowcase.d.ts +0 -1
  249. package/lib/examples/vercel-ai-elements/components/ReasoningShowcase.js +0 -72
  250. package/lib/examples/vercel-ai-elements/components/ShimmerShowcase.d.ts +0 -1
  251. package/lib/examples/vercel-ai-elements/components/ShimmerShowcase.js +0 -9
  252. package/lib/examples/vercel-ai-elements/components/SourcesShowcase.d.ts +0 -1
  253. package/lib/examples/vercel-ai-elements/components/SourcesShowcase.js +0 -43
  254. package/lib/examples/vercel-ai-elements/components/SuggestionShowcase.d.ts +0 -1
  255. package/lib/examples/vercel-ai-elements/components/SuggestionShowcase.js +0 -31
  256. package/lib/examples/vercel-ai-elements/components/ToolShowcase.d.ts +0 -1
  257. package/lib/examples/vercel-ai-elements/components/ToolShowcase.js +0 -54
  258. package/lib/examples/vercel-ai-elements/index.d.ts +0 -13
  259. package/lib/examples/vercel-ai-elements/index.js +0 -17
  260. package/lib/examples/vercel-ai-elements/main.d.ts +0 -1
  261. package/lib/examples/vercel-ai-elements/main.js +0 -9
  262. package/lib/examples/vercel-ai-elements/showcase.css +0 -128
  263. package/lib/hooks/useToast.d.ts +0 -44
  264. package/lib/hooks/useToast.js +0 -128
  265. package/patches/@datalayer+jupyter-lexical+1.0.8.patch +0 -11628
  266. package/patches/@datalayer+jupyter-react+2.0.2.patch +0 -5338
  267. package/style/showcase-vercel-ai.css +0 -137
  268. /package/lib/{examples/components → components}/FooterMetrics.js +0 -0
  269. /package/lib/{examples/components → components}/MockFileBrowser.js +0 -0
  270. /package/lib/{examples/components → components}/SessionTabs.js +0 -0
  271. /package/lib/{examples/components → components}/TimeTravel.js +0 -0
  272. /package/lib/{models → types}/AIAgent.d.ts +0 -0
  273. /package/lib/{models → types}/AIAgent.js +0 -0
  274. /package/lib/{models → types}/index.d.ts +0 -0
  275. /package/lib/{models → types}/index.js +0 -0
@@ -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
  *
@@ -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
  *
@@ -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
@@ -6,3 +6,4 @@ export * from './components';
6
6
  export * from './state';
7
7
  export * from './runtime';
8
8
  export * from './identity';
9
+ export * from './config';
@@ -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 Ξ Datalayer</quote>
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.9",
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:codemode-mcp": "EXAMPLE=AgentCodemodeMcpExample VITE_APP_TARGET=examples VITE_DATALAYER_RUN_URL=http://localhost:8888 vite",
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 --reload --debug",
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",
@@ -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