nebula-notebook-mcp 0.1.0

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 (72) hide show
  1. package/README.md +314 -0
  2. package/bin/nebula-mcp.js +10 -0
  3. package/dist/circuit-breaker.d.ts +157 -0
  4. package/dist/circuit-breaker.d.ts.map +1 -0
  5. package/dist/circuit-breaker.js +237 -0
  6. package/dist/circuit-breaker.js.map +1 -0
  7. package/dist/errors.d.ts +72 -0
  8. package/dist/errors.d.ts.map +1 -0
  9. package/dist/errors.js +314 -0
  10. package/dist/errors.js.map +1 -0
  11. package/dist/index.d.ts +13 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +41 -0
  14. package/dist/index.js.map +1 -0
  15. package/dist/mcp/index.d.ts +8 -0
  16. package/dist/mcp/index.d.ts.map +1 -0
  17. package/dist/mcp/index.js +13 -0
  18. package/dist/mcp/index.js.map +1 -0
  19. package/dist/mcp/server.d.ts +31 -0
  20. package/dist/mcp/server.d.ts.map +1 -0
  21. package/dist/mcp/server.js +237 -0
  22. package/dist/mcp/server.js.map +1 -0
  23. package/dist/notebook/client.d.ts +643 -0
  24. package/dist/notebook/client.d.ts.map +1 -0
  25. package/dist/notebook/client.js +1720 -0
  26. package/dist/notebook/client.js.map +1 -0
  27. package/dist/notebook/index.d.ts +6 -0
  28. package/dist/notebook/index.d.ts.map +1 -0
  29. package/dist/notebook/index.js +6 -0
  30. package/dist/notebook/index.js.map +1 -0
  31. package/dist/notebook/tools.d.ts +244 -0
  32. package/dist/notebook/tools.d.ts.map +1 -0
  33. package/dist/notebook/tools.js +279 -0
  34. package/dist/notebook/tools.js.map +1 -0
  35. package/dist/tools/execution.d.ts +38 -0
  36. package/dist/tools/execution.d.ts.map +1 -0
  37. package/dist/tools/execution.js +116 -0
  38. package/dist/tools/execution.js.map +1 -0
  39. package/dist/tools/files.d.ts +70 -0
  40. package/dist/tools/files.d.ts.map +1 -0
  41. package/dist/tools/files.js +286 -0
  42. package/dist/tools/files.js.map +1 -0
  43. package/dist/tools/index.d.ts +74 -0
  44. package/dist/tools/index.d.ts.map +1 -0
  45. package/dist/tools/index.js +217 -0
  46. package/dist/tools/index.js.map +1 -0
  47. package/dist/tools/kernel.d.ts +36 -0
  48. package/dist/tools/kernel.d.ts.map +1 -0
  49. package/dist/tools/kernel.js +182 -0
  50. package/dist/tools/kernel.js.map +1 -0
  51. package/dist/tools/notebook.d.ts +252 -0
  52. package/dist/tools/notebook.d.ts.map +1 -0
  53. package/dist/tools/notebook.js +1089 -0
  54. package/dist/tools/notebook.js.map +1 -0
  55. package/dist/tools/types.d.ts +78 -0
  56. package/dist/tools/types.d.ts.map +1 -0
  57. package/dist/tools/types.js +8 -0
  58. package/dist/tools/types.js.map +1 -0
  59. package/dist/types.d.ts +473 -0
  60. package/dist/types.d.ts.map +1 -0
  61. package/dist/types.js +5 -0
  62. package/dist/types.js.map +1 -0
  63. package/dist/utils/imageResize.d.ts +24 -0
  64. package/dist/utils/imageResize.d.ts.map +1 -0
  65. package/dist/utils/imageResize.js +67 -0
  66. package/dist/utils/imageResize.js.map +1 -0
  67. package/dist/utils/polling.d.ts +40 -0
  68. package/dist/utils/polling.d.ts.map +1 -0
  69. package/dist/utils/polling.js +49 -0
  70. package/dist/utils/polling.js.map +1 -0
  71. package/package.json +61 -0
  72. package/setup-mcp.js +468 -0
@@ -0,0 +1,643 @@
1
+ /**
2
+ * Nebula Notebook Client - Unified API for Notebook Operations
3
+ *
4
+ * This client provides programmatic access to Nebula Notebook, enabling AI agents
5
+ * and automation tools to manipulate notebooks through a consistent interface.
6
+ *
7
+ * ## Architecture
8
+ *
9
+ * The client routes operations through Nebula's Operation Router, which transparently
10
+ * handles both UI-connected and headless modes:
11
+ *
12
+ * ```
13
+ * NebulaClient → HTTP/WS → Operation Router → UI (WebSocket) or Headless (File)
14
+ * ```
15
+ *
16
+ * From the client's perspective, both modes are identical - the router handles
17
+ * the complexity of determining where to apply operations.
18
+ *
19
+ * ## Key Features
20
+ *
21
+ * - **Kernel Management**: Start, stop, restart, interrupt Jupyter kernels
22
+ * - **Cell Operations**: Insert, delete, update, move, duplicate cells
23
+ * - **Code Execution**: WebSocket streaming with real-time output capture
24
+ * - **Agent Sessions**: Lock/unlock notebooks to prevent concurrent access
25
+ * - **Dual Mode**: Works seamlessly with or without UI connected
26
+ *
27
+ * ## Usage
28
+ *
29
+ * ```typescript
30
+ * const client = new NebulaClient({ baseUrl: 'http://localhost:8000' });
31
+ *
32
+ * // Start agent session (shows indicator in UI)
33
+ * await client.startAgentSession(path, 'my-agent');
34
+ *
35
+ * // Insert a cell
36
+ * const result = await client.insertCellOp(path, 0, {
37
+ * id: 'imports',
38
+ * type: 'code',
39
+ * content: 'import numpy as np'
40
+ * });
41
+ *
42
+ * // Execute the cell
43
+ * const execResult = await client.executeCell(path, sessionId, { cellIndex: 0 });
44
+ *
45
+ * // End session
46
+ * await client.endAgentSession(path);
47
+ * ```
48
+ *
49
+ * ## Error Handling
50
+ *
51
+ * All methods return `ToolResult<T>` with `success` boolean and either `data` or `error`:
52
+ *
53
+ * ```typescript
54
+ * const result = await client.insertCellOp(path, 0, cell);
55
+ * if (!result.success) {
56
+ * console.error(result.error);
57
+ * return;
58
+ * }
59
+ * console.log('Inserted cell:', result.data.cellId);
60
+ * ```
61
+ *
62
+ * @see {@link https://github.com/jzthree/nebula-notebook/blob/main/docs/AGENTIC_ARCHITECTURE.md}
63
+ * @module NebulaClient
64
+ */
65
+ import type { Notebook, NotebookCell, CellOutput, CellMetadata, ToolResult } from '../types.js';
66
+ export interface NebulaClientConfig {
67
+ /** Base URL for Nebula API (default: http://localhost:8000) */
68
+ baseUrl?: string;
69
+ /** Request timeout in ms (default: 30000) */
70
+ timeout?: number;
71
+ /** Number of retries for transient errors (default: 3) */
72
+ retries?: number;
73
+ /** Optional agent session ID for lock enforcement */
74
+ agentId?: string;
75
+ /** Optional client name for lock metadata */
76
+ clientName?: string;
77
+ /** Optional client version for lock metadata */
78
+ clientVersion?: string;
79
+ /** Auto-start agent session for write operations (default: true if agentId provided) */
80
+ autoStartAgentSession?: boolean;
81
+ }
82
+ export interface KernelSession {
83
+ sessionId: string;
84
+ kernelName: string;
85
+ status: 'idle' | 'busy' | 'starting' | 'disconnected';
86
+ filePath?: string;
87
+ }
88
+ export interface SessionInfo {
89
+ id: string;
90
+ kernel_name: string;
91
+ status: string;
92
+ file_path?: string;
93
+ execution_count?: number;
94
+ }
95
+ export interface ExecutionResult {
96
+ outputs: CellOutput[];
97
+ executionCount?: number;
98
+ success: boolean;
99
+ error?: string;
100
+ }
101
+ export interface WriteCellResult {
102
+ cellIndex: number;
103
+ cellId: string;
104
+ totalCells: number;
105
+ idModified?: boolean;
106
+ requestedId?: string;
107
+ }
108
+ export interface MetadataSchema {
109
+ [key: string]: {
110
+ type: 'string' | 'number' | 'boolean' | 'enum';
111
+ values?: string[];
112
+ description: string;
113
+ agentMutable: boolean;
114
+ default?: unknown;
115
+ };
116
+ }
117
+ export interface SearchResult {
118
+ cells: Array<{
119
+ index: number;
120
+ score: number;
121
+ type: string;
122
+ content: string;
123
+ id: string;
124
+ }>;
125
+ totalCells: number;
126
+ }
127
+ /**
128
+ * Client for Nebula Notebook headless API
129
+ */
130
+ export declare class NebulaClient {
131
+ private baseUrl;
132
+ private timeout;
133
+ private retries;
134
+ private agentId?;
135
+ private clientName?;
136
+ private clientVersion?;
137
+ private autoStartAgentSession;
138
+ private activeAgentSessions;
139
+ private agentSessionInFlight;
140
+ private pinnedKernelSessions;
141
+ private lastBackend?;
142
+ private lastAutoStartWarning?;
143
+ private autoStartWarnedPaths;
144
+ private activeNotebookPath;
145
+ private lastToolCallTimestamp;
146
+ constructor(config?: NebulaClientConfig);
147
+ private recordBackend;
148
+ consumeLastBackend(): 'ui' | 'headless' | undefined;
149
+ consumeAutoStartWarning(): string | undefined;
150
+ hasActiveAgentSession(path: string): boolean;
151
+ /**
152
+ * Get the notebook path associated with the active agent session (if any).
153
+ */
154
+ getActiveNotebookPath(): string | null;
155
+ getPinnedKernelSessionId(path: string): string | null;
156
+ private setActiveNotebookPath;
157
+ private clearActiveNotebookPath;
158
+ private pinKernelSession;
159
+ private clearPinnedKernelSession;
160
+ private clearPinnedKernelSessionById;
161
+ private selectBestSessionForFile;
162
+ resolveKernelSessionIdForNotebook(path: string, options?: {
163
+ kernelName?: string;
164
+ createIfMissing?: boolean;
165
+ }): Promise<ToolResult<{
166
+ sessionId: string;
167
+ }>>;
168
+ /**
169
+ * Check if an error is retryable (network/connection errors)
170
+ */
171
+ private isRetryable;
172
+ /**
173
+ * Check if an error is a connection failure (server not reachable)
174
+ */
175
+ private isConnectionError;
176
+ /**
177
+ * Delay for retry backoff
178
+ */
179
+ private delay;
180
+ /**
181
+ * Fetch with automatic retry for transient errors
182
+ */
183
+ private fetch;
184
+ /**
185
+ * List available kernel specs with display names and versions
186
+ */
187
+ listKernels(): Promise<ToolResult<Array<{
188
+ name: string;
189
+ displayName: string;
190
+ language: string;
191
+ }>>>;
192
+ /**
193
+ * List active kernel sessions
194
+ */
195
+ listSessions(): Promise<ToolResult<SessionInfo[]>>;
196
+ /**
197
+ * Start a new kernel session
198
+ */
199
+ startKernel(kernelName?: string, filePath?: string): Promise<ToolResult<KernelSession>>;
200
+ /**
201
+ * Get or create a kernel session for a notebook file
202
+ */
203
+ getOrCreateKernelForFile(filePath: string, kernelName?: string): Promise<ToolResult<KernelSession>>;
204
+ /**
205
+ * Execute code in a kernel session (simple REST version)
206
+ */
207
+ executeCode(sessionId: string, code: string): Promise<ToolResult<ExecutionResult>>;
208
+ /**
209
+ * Execute code with WebSocket streaming for real-time output
210
+ */
211
+ executeCodeStreaming(sessionId: string, code: string, timeoutMs?: number): Promise<ToolResult<ExecutionResult>>;
212
+ /**
213
+ * Interrupt a running kernel
214
+ */
215
+ interruptKernel(sessionId: string): Promise<ToolResult<void>>;
216
+ /**
217
+ * Restart a kernel session
218
+ */
219
+ restartKernel(sessionId: string): Promise<ToolResult<void>>;
220
+ /**
221
+ * Shutdown a kernel session
222
+ */
223
+ shutdownKernel(sessionId: string): Promise<ToolResult<void>>;
224
+ /**
225
+ * Stop a kernel session (alias for shutdownKernel)
226
+ */
227
+ stopKernel(sessionId: string): Promise<ToolResult<void>>;
228
+ /**
229
+ * List files in a directory
230
+ */
231
+ listFiles(path?: string): Promise<ToolResult<{
232
+ name: string;
233
+ type: string;
234
+ }[]>>;
235
+ /**
236
+ * Read a file's content
237
+ */
238
+ readFile(path: string): Promise<ToolResult<{
239
+ content: string;
240
+ }>>;
241
+ /**
242
+ * Write content to a file
243
+ */
244
+ writeFile(path: string, content: string): Promise<ToolResult<void>>;
245
+ /**
246
+ * Delete a file or directory
247
+ */
248
+ deleteFile(path: string): Promise<ToolResult<void>>;
249
+ /**
250
+ * Rename/move a file or directory
251
+ */
252
+ renameFile(oldPath: string, newPath: string): Promise<ToolResult<void>>;
253
+ /**
254
+ * Download a file as Buffer (supports both text and binary)
255
+ * Uses the /fs/download endpoint that streams raw file content
256
+ */
257
+ downloadFile(serverPath: string): Promise<ToolResult<{
258
+ content: Buffer;
259
+ }>>;
260
+ /**
261
+ * Upload a file using multipart form data (supports binary)
262
+ */
263
+ uploadFile(destDir: string, content: Buffer, filename: string): Promise<ToolResult<void>>;
264
+ /**
265
+ * Get the metadata schema from Nebula API
266
+ */
267
+ getMetadataSchema(): Promise<ToolResult<MetadataSchema>>;
268
+ /**
269
+ * Execute a cell in a notebook and save the outputs back
270
+ *
271
+ * This combines read -> execute -> save into a single operation,
272
+ * eliminating round-trips for the common iterative workflow.
273
+ *
274
+ * Supports both cellIndex (positional) and cellId (stable).
275
+ * When save is true, outputs are saved incrementally during execution
276
+ * so the notebook file reflects progress in real-time.
277
+ */
278
+ executeCell(path: string, sessionId: string, options?: {
279
+ cellIndex?: number;
280
+ cellId?: string;
281
+ timeout?: number;
282
+ save?: boolean;
283
+ saveIntervalMs?: number;
284
+ }): Promise<ToolResult<ExecutionResult & {
285
+ cellIndex: number;
286
+ cellId: string;
287
+ }>>;
288
+ /**
289
+ * Execute code with incremental saves via operation router
290
+ * Outputs are sent to UI (if connected) or saved to file via updateOutputs operation
291
+ */
292
+ private executeWithIncrementalSave;
293
+ /**
294
+ * Search cells in a notebook by keyword
295
+ */
296
+ searchCells(path: string, query: string, limit?: number): Promise<ToolResult<SearchResult>>;
297
+ /**
298
+ * Generate code using LLM
299
+ */
300
+ generateCode(prompt: string, context?: string, provider?: string, model?: string): Promise<ToolResult<string>>;
301
+ /**
302
+ * Chat with notebook context
303
+ */
304
+ chat(message: string, notebookContext: string, history?: {
305
+ role: string;
306
+ content: string;
307
+ }[], provider?: string, model?: string): Promise<ToolResult<string>>;
308
+ private parseJupyterOutput;
309
+ private toJupyterOutput;
310
+ /**
311
+ * Apply a notebook operation through the operation router.
312
+ *
313
+ * Operations are routed to:
314
+ * - Connected UI via WebSocket (if available) - UI applies and saves
315
+ * - Headless manager (file-based) otherwise
316
+ *
317
+ * From the agent's perspective, both modes behave identically.
318
+ */
319
+ applyOperation(operation: import('../types.js').NotebookOperation): Promise<ToolResult<import('../types.js').OperationResult>>;
320
+ private isWriteOperation;
321
+ private ensureAgentSession;
322
+ /**
323
+ * Read notebook through the operation router.
324
+ *
325
+ * If UI is connected, requests current state from UI.
326
+ * Otherwise reads from file.
327
+ */
328
+ readNotebookViaRouter(path: string, options?: {
329
+ includeOutputs?: boolean;
330
+ maxLines?: number;
331
+ maxChars?: number;
332
+ maxLinesError?: number;
333
+ maxCharsError?: number;
334
+ }): Promise<ToolResult<Notebook>>;
335
+ /**
336
+ * Check if a UI is connected for a notebook path
337
+ */
338
+ hasUI(path: string): Promise<boolean>;
339
+ /**
340
+ * Create a new notebook using the operation router.
341
+ *
342
+ * Routes to UI if connected (UI creates file and tracks mtime),
343
+ * otherwise creates via headless manager.
344
+ *
345
+ * @param path - Path to create the notebook
346
+ * @param options - Optional settings
347
+ * @param options.overwrite - Allow overwriting existing file (default: false)
348
+ * @param options.kernelName - Kernel name (default: 'python3')
349
+ * @param options.kernelDisplayName - Display name for kernel
350
+ * @returns Result with path and mtime on success
351
+ */
352
+ createNotebookOp(path: string, options?: {
353
+ overwrite?: boolean;
354
+ kernelName?: string;
355
+ kernelDisplayName?: string;
356
+ }): Promise<ToolResult<{
357
+ path?: string;
358
+ mtime?: number;
359
+ popupBlocked?: boolean;
360
+ popupMessage?: string;
361
+ }>>;
362
+ /**
363
+ * Insert a cell using the operation router
364
+ */
365
+ insertCellOp(path: string, index: number, cell: {
366
+ id: string;
367
+ type: 'code' | 'markdown';
368
+ content: string;
369
+ metadata?: CellMetadata;
370
+ }): Promise<ToolResult<WriteCellResult>>;
371
+ /**
372
+ * Delete a cell using the operation router
373
+ */
374
+ deleteCellOp(path: string, options: {
375
+ cellId?: string;
376
+ cellIndex?: number;
377
+ }): Promise<ToolResult<void>>;
378
+ /**
379
+ * Update cell content using the operation router
380
+ */
381
+ updateContentOp(path: string, cellId: string, content: string): Promise<ToolResult<void>>;
382
+ /**
383
+ * Update cell metadata using the operation router
384
+ */
385
+ updateMetadataOp(path: string, cellId: string, changes: Record<string, unknown>): Promise<ToolResult<void>>;
386
+ /**
387
+ * Move a cell using the operation router
388
+ *
389
+ * Supports two modes:
390
+ * 1. By index: moveCellOp(path, 0, 5) - move from index 0 to 5
391
+ * 2. By ID: moveCellOp(path, 0, 0, { cellId: 'cell-1', afterCellId: 'cell-2' })
392
+ */
393
+ moveCellOp(path: string, fromIndex: number, toIndex: number, options?: {
394
+ cellId?: string;
395
+ afterCellId?: string;
396
+ }): Promise<ToolResult<{
397
+ cellId?: string;
398
+ fromIndex: number;
399
+ toIndex: number;
400
+ }>>;
401
+ /**
402
+ * Duplicate a cell using the operation router
403
+ */
404
+ duplicateCellOp(path: string, cellIndex: number, newCellId: string): Promise<ToolResult<{
405
+ cellIndex: number;
406
+ cellId: string;
407
+ metadata?: {
408
+ totalCells?: number;
409
+ operationTime?: number;
410
+ };
411
+ }>>;
412
+ /**
413
+ * Update cell outputs using the operation router
414
+ */
415
+ updateOutputsOp(path: string, cellId: string, outputs: CellOutput[], executionCount?: number): Promise<ToolResult<void>>;
416
+ /**
417
+ * Read a single cell using the operation router.
418
+ *
419
+ * More efficient than readNotebook when you only need one cell.
420
+ * Routes to UI if connected, otherwise reads from file.
421
+ */
422
+ readCellOp(path: string, options: {
423
+ cellId?: string;
424
+ cellIndex?: number;
425
+ }): Promise<ToolResult<{
426
+ cell: NotebookCell;
427
+ cellIndex: number;
428
+ }>>;
429
+ /**
430
+ * Read cell outputs using the operation router.
431
+ *
432
+ * More efficient than readNotebook when you only need outputs.
433
+ * Routes to UI if connected, otherwise reads from file.
434
+ *
435
+ * Supports truncation options for large outputs:
436
+ * - maxLines: Max lines for regular output (default: 100)
437
+ * - maxChars: Max characters for regular output (default: 10000)
438
+ * - maxLinesError: Max lines for error output (default: 200)
439
+ * - maxCharsError: Max characters for error output (default: 20000)
440
+ * - lineOffset: Skip first N lines for pagination
441
+ * - saveToFile: Force save full output to temp file
442
+ */
443
+ readCellOutputOp(path: string, options: {
444
+ cellId?: string;
445
+ cellIndex?: number;
446
+ maxLines?: number;
447
+ maxChars?: number;
448
+ maxLinesError?: number;
449
+ maxCharsError?: number;
450
+ lineOffset?: number;
451
+ saveToFile?: boolean;
452
+ }): Promise<ToolResult<{
453
+ outputs: Array<CellOutput & {
454
+ truncated?: boolean;
455
+ truncation_reason?: string | null;
456
+ total_lines?: number;
457
+ total_chars?: number;
458
+ returned_range?: {
459
+ start_line: number;
460
+ end_line: number;
461
+ char_count: number;
462
+ };
463
+ temp_file?: string;
464
+ temp_file_size?: number;
465
+ is_binary?: boolean;
466
+ }>;
467
+ executionCount?: number;
468
+ executionStatus?: 'idle' | 'busy' | 'error';
469
+ cellId: string;
470
+ cellIndex: number;
471
+ temp_files?: string[];
472
+ }>>;
473
+ /**
474
+ * Clear all cells from a notebook using the operation router
475
+ *
476
+ * This is the proper way to clear a notebook - routes to UI if connected
477
+ * or falls back to headless mode. Returns the number of cells deleted.
478
+ */
479
+ clearNotebookOp(path: string): Promise<ToolResult<{
480
+ deletedCount: number;
481
+ metadata?: {
482
+ totalCells?: number;
483
+ operationTime?: number;
484
+ };
485
+ }>>;
486
+ /**
487
+ * Delete multiple cells by ID in a single operation
488
+ *
489
+ * More efficient than multiple single deletes - handles index shifting automatically.
490
+ */
491
+ deleteCellsOp(path: string, cellIds: string[]): Promise<ToolResult<{
492
+ deletedCount: number;
493
+ deletedIds: string[];
494
+ notFound?: string[];
495
+ totalCells: number;
496
+ }>>;
497
+ /**
498
+ * Insert multiple cells at a position in a single operation
499
+ *
500
+ * More efficient than multiple single inserts.
501
+ */
502
+ insertCellsOp(path: string, cells: Array<{
503
+ id?: string;
504
+ type?: 'code' | 'markdown';
505
+ content: string;
506
+ }>, position?: number): Promise<ToolResult<{
507
+ insertedCount: number;
508
+ insertedIds: string[];
509
+ startIndex: number;
510
+ totalCells: number;
511
+ }>>;
512
+ /**
513
+ * Search cells with optional output search
514
+ *
515
+ * Enhanced version that can search in cell outputs as well as source code.
516
+ */
517
+ searchCellsOp(path: string, query: string, options?: {
518
+ includeOutputs?: boolean;
519
+ limit?: number;
520
+ }): Promise<ToolResult<{
521
+ query: string;
522
+ matchCount: number;
523
+ matches: Array<{
524
+ cellId: string;
525
+ cellIndex: number;
526
+ matchLocation: 'source' | 'output';
527
+ matchLine?: number;
528
+ outputIndex?: number;
529
+ outputType?: string;
530
+ preview: string;
531
+ }>;
532
+ hasMore: boolean;
533
+ }>>;
534
+ /**
535
+ * Clear outputs from one or more cells
536
+ *
537
+ * Useful for cleanup before sharing notebooks.
538
+ */
539
+ clearOutputsOp(path: string, cellIds?: string[]): Promise<ToolResult<{
540
+ clearedCount: number;
541
+ clearedIds: string[];
542
+ notFound?: string[];
543
+ }>>;
544
+ /**
545
+ * Execute a cell through the operation router
546
+ *
547
+ * Routes to UI if connected (shows running indicator) or executes in headless mode.
548
+ * For long-running cells, returns with status="busy" after maxWait seconds.
549
+ * Use readCellOutputOp with max_wait to poll for more output.
550
+ */
551
+ executeCellOp(path: string, options: {
552
+ cellId?: string;
553
+ cellIndex?: number;
554
+ sessionId?: string;
555
+ maxWait?: number;
556
+ saveOutputs?: boolean;
557
+ }): Promise<ToolResult<{
558
+ cellId: string;
559
+ cellIndex: number;
560
+ executionStatus: 'idle' | 'busy' | 'error';
561
+ executionCount?: number;
562
+ outputs: Array<import('../types.js').CellOutput>;
563
+ executionTime?: number;
564
+ sessionId?: string;
565
+ error?: string;
566
+ }>>;
567
+ /**
568
+ * Start an agent session (locks notebook for agent use).
569
+ * If a session is already active, returns a warning but still starts a new session.
570
+ *
571
+ * @param path - Path to the notebook file
572
+ * @param agentId - Optional identifier for this agent session
573
+ * @param force - If true, forcibly end any existing session and steal the lock.
574
+ * Use only with explicit user permission.
575
+ * @param lastSessionTimestamp - Optional timestamp (ms) to fetch updates since last session.
576
+ */
577
+ startAgentSession(path: string, agentId?: string, force?: boolean, lastSessionTimestamp?: number): Promise<ToolResult<{
578
+ warning?: string;
579
+ previousSessionDuration?: number;
580
+ updatesSince?: import('../types.js').UpdateSummary[];
581
+ }>>;
582
+ /**
583
+ * End an agent session (unlocks notebook).
584
+ * Should be called when agent work is complete.
585
+ */
586
+ endAgentSession(path: string): Promise<ToolResult<{
587
+ sessionDuration?: number;
588
+ warning?: string;
589
+ }>>;
590
+ /**
591
+ * List available Python environments on the system.
592
+ *
593
+ * Discovers Python installations from:
594
+ * - System Python
595
+ * - Conda environments
596
+ * - pyenv versions
597
+ * - Virtual environments
598
+ * - Homebrew Python
599
+ */
600
+ listPythonEnvironments(refresh?: boolean): Promise<ToolResult<Array<{
601
+ name: string;
602
+ path: string;
603
+ version?: string;
604
+ source: string;
605
+ isActive?: boolean;
606
+ }>>>;
607
+ /**
608
+ * Get detailed information about a Python environment.
609
+ *
610
+ * @param pythonPath - Path to the Python executable (optional, uses system Python if not provided)
611
+ */
612
+ getPythonInfo(pythonPath?: string): Promise<ToolResult<{
613
+ path: string;
614
+ version: string;
615
+ packages?: string[];
616
+ }>>;
617
+ /**
618
+ * Get the last tool call timestamp for a notebook path.
619
+ * Used internally to track user changes between tool calls.
620
+ */
621
+ getLastToolCallTimestamp(path: string): number;
622
+ /**
623
+ * Record the current time as the last tool call for a notebook path.
624
+ * Called automatically after each operation.
625
+ */
626
+ recordToolCallTimestamp(path: string, timestamp?: number): void;
627
+ /**
628
+ * Get updates since the last tool call for a notebook.
629
+ *
630
+ * Returns summaries of edits and events since the last recorded
631
+ * tool call timestamp (no source filtering).
632
+ */
633
+ getUpdatesSinceOp(path: string): Promise<ToolResult<{
634
+ updates: import('../types.js').UpdateSummary[];
635
+ sinceTimestamp: number;
636
+ serverTimestamp: number;
637
+ }>>;
638
+ }
639
+ /**
640
+ * Create a new Nebula client
641
+ */
642
+ export declare function createNebulaClient(config?: NebulaClientConfig): NebulaClient;
643
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/notebook/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEhG,MAAM,WAAW,kBAAkB;IACjC,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6CAA6C;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0DAA0D;IAC1D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gDAAgD;IAChD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wFAAwF;IACxF,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,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