@difizen/libro-kernel 0.0.2-alpha.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 (188) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -0
  3. package/es/basemanager.d.ts +94 -0
  4. package/es/basemanager.d.ts.map +1 -0
  5. package/es/basemanager.js +110 -0
  6. package/es/contents/contents-drive.d.ts +189 -0
  7. package/es/contents/contents-drive.d.ts.map +1 -0
  8. package/es/contents/contents-drive.js +792 -0
  9. package/es/contents/contents-manager.d.ts +229 -0
  10. package/es/contents/contents-manager.d.ts.map +1 -0
  11. package/es/contents/contents-manager.js +551 -0
  12. package/es/contents/contents-module.d.ts +3 -0
  13. package/es/contents/contents-module.d.ts.map +1 -0
  14. package/es/contents/contents-module.js +4 -0
  15. package/es/contents/contents-protocol.d.ts +487 -0
  16. package/es/contents/contents-protocol.d.ts.map +1 -0
  17. package/es/contents/contents-protocol.js +1 -0
  18. package/es/contents/index.d.ts +6 -0
  19. package/es/contents/index.d.ts.map +1 -0
  20. package/es/contents/index.js +5 -0
  21. package/es/contents/validate.d.ts +10 -0
  22. package/es/contents/validate.d.ts.map +1 -0
  23. package/es/contents/validate.js +22 -0
  24. package/es/index.d.ts +10 -0
  25. package/es/index.d.ts.map +1 -0
  26. package/es/index.js +9 -0
  27. package/es/index.less +0 -0
  28. package/es/kernel/comm.d.ts +92 -0
  29. package/es/kernel/comm.d.ts.map +1 -0
  30. package/es/kernel/comm.js +216 -0
  31. package/es/kernel/future.d.ts +178 -0
  32. package/es/kernel/future.d.ts.map +1 -0
  33. package/es/kernel/future.js +587 -0
  34. package/es/kernel/index.d.ts +8 -0
  35. package/es/kernel/index.d.ts.map +1 -0
  36. package/es/kernel/index.js +8 -0
  37. package/es/kernel/kernel-connection.d.ts +550 -0
  38. package/es/kernel/kernel-connection.d.ts.map +1 -0
  39. package/es/kernel/kernel-connection.js +1957 -0
  40. package/es/kernel/kernel-module.d.ts +3 -0
  41. package/es/kernel/kernel-module.d.ts.map +1 -0
  42. package/es/kernel/kernel-module.js +32 -0
  43. package/es/kernel/libro-kernel-manager.d.ts +69 -0
  44. package/es/kernel/libro-kernel-manager.d.ts.map +1 -0
  45. package/es/kernel/libro-kernel-manager.js +349 -0
  46. package/es/kernel/libro-kernel-protocol.d.ts +675 -0
  47. package/es/kernel/libro-kernel-protocol.d.ts.map +1 -0
  48. package/es/kernel/libro-kernel-protocol.js +60 -0
  49. package/es/kernel/libro-kernel-utils.d.ts +95 -0
  50. package/es/kernel/libro-kernel-utils.d.ts.map +1 -0
  51. package/es/kernel/libro-kernel-utils.js +130 -0
  52. package/es/kernel/libro-kernel.d.ts +14 -0
  53. package/es/kernel/libro-kernel.d.ts.map +1 -0
  54. package/es/kernel/libro-kernel.js +54 -0
  55. package/es/kernel/messages.d.ts +845 -0
  56. package/es/kernel/messages.d.ts.map +1 -0
  57. package/es/kernel/messages.js +457 -0
  58. package/es/kernel/restapi.d.ts +78 -0
  59. package/es/kernel/restapi.d.ts.map +1 -0
  60. package/es/kernel/restapi.js +367 -0
  61. package/es/kernel/serialize.d.ts +10 -0
  62. package/es/kernel/serialize.d.ts.map +1 -0
  63. package/es/kernel/serialize.js +214 -0
  64. package/es/kernel/validate.d.ts +15 -0
  65. package/es/kernel/validate.d.ts.map +1 -0
  66. package/es/kernel/validate.js +125 -0
  67. package/es/kernelspec/index.d.ts +5 -0
  68. package/es/kernelspec/index.d.ts.map +1 -0
  69. package/es/kernelspec/index.js +4 -0
  70. package/es/kernelspec/kernelspec-module.d.ts +3 -0
  71. package/es/kernelspec/kernelspec-module.d.ts.map +1 -0
  72. package/es/kernelspec/kernelspec-module.js +4 -0
  73. package/es/kernelspec/kernelspec.d.ts +33 -0
  74. package/es/kernelspec/kernelspec.d.ts.map +1 -0
  75. package/es/kernelspec/kernelspec.js +1 -0
  76. package/es/kernelspec/manager.d.ts +81 -0
  77. package/es/kernelspec/manager.d.ts.map +1 -0
  78. package/es/kernelspec/manager.js +248 -0
  79. package/es/kernelspec/restapi.d.ts +71 -0
  80. package/es/kernelspec/restapi.d.ts.map +1 -0
  81. package/es/kernelspec/restapi.js +107 -0
  82. package/es/kernelspec/validate.d.ts +10 -0
  83. package/es/kernelspec/validate.d.ts.map +1 -0
  84. package/es/kernelspec/validate.js +69 -0
  85. package/es/libro-kernel-connection-manager.d.ts +19 -0
  86. package/es/libro-kernel-connection-manager.d.ts.map +1 -0
  87. package/es/libro-kernel-connection-manager.js +142 -0
  88. package/es/module.d.ts +3 -0
  89. package/es/module.d.ts.map +1 -0
  90. package/es/module.js +9 -0
  91. package/es/page-config.d.ts +36 -0
  92. package/es/page-config.d.ts.map +1 -0
  93. package/es/page-config.js +129 -0
  94. package/es/protocol.d.ts +13 -0
  95. package/es/protocol.d.ts.map +1 -0
  96. package/es/protocol.js +8 -0
  97. package/es/server/connection-error.d.ts +36 -0
  98. package/es/server/connection-error.d.ts.map +1 -0
  99. package/es/server/connection-error.js +109 -0
  100. package/es/server/index.d.ts +6 -0
  101. package/es/server/index.d.ts.map +1 -0
  102. package/es/server/index.js +5 -0
  103. package/es/server/server-connection-protocol.d.ts +49 -0
  104. package/es/server/server-connection-protocol.d.ts.map +1 -0
  105. package/es/server/server-connection-protocol.js +0 -0
  106. package/es/server/server-connection.d.ts +25 -0
  107. package/es/server/server-connection.d.ts.map +1 -0
  108. package/es/server/server-connection.js +159 -0
  109. package/es/server/server-manager.d.ts +22 -0
  110. package/es/server/server-manager.d.ts.map +1 -0
  111. package/es/server/server-manager.js +163 -0
  112. package/es/server/server-module.d.ts +3 -0
  113. package/es/server/server-module.d.ts.map +1 -0
  114. package/es/server/server-module.js +4 -0
  115. package/es/session/index.d.ts +5 -0
  116. package/es/session/index.d.ts.map +1 -0
  117. package/es/session/index.js +4 -0
  118. package/es/session/libro-session-manager.d.ts +71 -0
  119. package/es/session/libro-session-manager.d.ts.map +1 -0
  120. package/es/session/libro-session-manager.js +539 -0
  121. package/es/session/libro-session-protocol.d.ts +50 -0
  122. package/es/session/libro-session-protocol.d.ts.map +1 -0
  123. package/es/session/libro-session-protocol.js +21 -0
  124. package/es/session/libro-session.d.ts +12 -0
  125. package/es/session/libro-session.d.ts.map +1 -0
  126. package/es/session/libro-session.js +19 -0
  127. package/es/session/restapi.d.ts +28 -0
  128. package/es/session/restapi.d.ts.map +1 -0
  129. package/es/session/restapi.js +214 -0
  130. package/es/session/session-module.d.ts +3 -0
  131. package/es/session/session-module.d.ts.map +1 -0
  132. package/es/session/session-module.js +18 -0
  133. package/es/session/validate.d.ts +14 -0
  134. package/es/session/validate.d.ts.map +1 -0
  135. package/es/session/validate.js +37 -0
  136. package/es/utils.d.ts +4 -0
  137. package/es/utils.d.ts.map +1 -0
  138. package/es/utils.js +29 -0
  139. package/es/validate-property.d.ts +2 -0
  140. package/es/validate-property.d.ts.map +1 -0
  141. package/es/validate-property.js +35 -0
  142. package/package.json +62 -0
  143. package/src/basemanager.ts +133 -0
  144. package/src/contents/contents-drive.ts +495 -0
  145. package/src/contents/contents-manager.ts +465 -0
  146. package/src/contents/contents-module.ts +6 -0
  147. package/src/contents/contents-protocol.ts +604 -0
  148. package/src/contents/index.ts +5 -0
  149. package/src/contents/validate.ts +29 -0
  150. package/src/index.tsx +9 -0
  151. package/src/kernel/comm.ts +220 -0
  152. package/src/kernel/future.ts +474 -0
  153. package/src/kernel/index.ts +7 -0
  154. package/src/kernel/kernel-connection.ts +1770 -0
  155. package/src/kernel/kernel-module.ts +50 -0
  156. package/src/kernel/libro-kernel-manager.ts +199 -0
  157. package/src/kernel/libro-kernel-protocol.ts +858 -0
  158. package/src/kernel/libro-kernel-utils.ts +152 -0
  159. package/src/kernel/libro-kernel.ts +39 -0
  160. package/src/kernel/messages.ts +1104 -0
  161. package/src/kernel/restapi.ts +183 -0
  162. package/src/kernel/serialize.ts +262 -0
  163. package/src/kernel/validate.ts +101 -0
  164. package/src/kernelspec/index.ts +5 -0
  165. package/src/kernelspec/kernelspec-module.ts +9 -0
  166. package/src/kernelspec/kernelspec.ts +37 -0
  167. package/src/kernelspec/manager.ts +173 -0
  168. package/src/kernelspec/restapi.ts +104 -0
  169. package/src/kernelspec/validate.ts +80 -0
  170. package/src/libro-kernel-connection-manager.ts +73 -0
  171. package/src/module.ts +19 -0
  172. package/src/page-config.ts +106 -0
  173. package/src/protocol.ts +24 -0
  174. package/src/server/connection-error.ts +60 -0
  175. package/src/server/index.ts +5 -0
  176. package/src/server/server-connection-protocol.ts +57 -0
  177. package/src/server/server-connection.ts +144 -0
  178. package/src/server/server-manager.ts +76 -0
  179. package/src/server/server-module.ts +9 -0
  180. package/src/session/index.ts +4 -0
  181. package/src/session/libro-session-manager.ts +377 -0
  182. package/src/session/libro-session-protocol.ts +61 -0
  183. package/src/session/libro-session.ts +33 -0
  184. package/src/session/restapi.ts +126 -0
  185. package/src/session/session-module.ts +26 -0
  186. package/src/session/validate.ts +39 -0
  187. package/src/utils.ts +28 -0
  188. package/src/validate-property.ts +38 -0
@@ -0,0 +1,675 @@
1
+ import type { JSONObject } from '@difizen/libro-common';
2
+ import type { Event, Disposable } from '@difizen/mana-app';
3
+ import type { ISpecModel } from '../kernelspec/index.js';
4
+ import type { ISettings } from '../server/index.js';
5
+ import type { LibroKernel } from './libro-kernel.js';
6
+ import type * as KernelMessage from './messages.js';
7
+ /**
8
+ * A disposable object with an observable `disposed` signal.
9
+ */
10
+ export interface ObservableDisposable extends Disposable {
11
+ /**
12
+ * A signal emitted when the object is disposed.
13
+ */
14
+ readonly onDisposed: Event<void>;
15
+ }
16
+ export type KernelStatus = 'unknown' | 'starting' | 'idle' | 'busy' | 'terminating' | 'restarting' | 'autorestarting' | 'dead';
17
+ export interface KernelMeta {
18
+ id: KernelId;
19
+ name: string;
20
+ last_activity: string;
21
+ execution_state: KernelStatus;
22
+ connections: number;
23
+ }
24
+ export declare const KernelMetaOption: unique symbol;
25
+ export declare const KernelId: unique symbol;
26
+ export type KernelId = string;
27
+ export declare const LibroKernelFactory: unique symbol;
28
+ export type LibroKernelFactory = (kernel: KernelMeta) => LibroKernel;
29
+ export declare const LibroKernelConnectionFactory: unique symbol;
30
+ export type LibroKernelConnectionFactory = (option: KernelConnectionOptions) => IKernelConnection;
31
+ export type ConnectionStatus = 'connected' | 'connecting' | 'disconnected';
32
+ export declare class KernelError extends Error {
33
+ /**
34
+ * Exception name
35
+ */
36
+ readonly errorName: string;
37
+ /**
38
+ * Exception value
39
+ */
40
+ readonly errorValue: string;
41
+ /**
42
+ * Traceback
43
+ */
44
+ readonly traceback: string[];
45
+ /**
46
+ * Construct the kernel error.
47
+ */
48
+ constructor(content: KernelMessage.IExecuteReplyMsg['content']);
49
+ }
50
+ export interface IFuture<REQUEST extends KernelMessage.IShellControlMessage, REPLY extends KernelMessage.IShellControlMessage> extends Disposable {
51
+ /**
52
+ * The original outgoing message.
53
+ */
54
+ readonly msg: REQUEST;
55
+ /**
56
+ * A promise that resolves when the future is done.
57
+ *
58
+ * #### Notes
59
+ * The future is done when there are no more responses expected from the
60
+ * kernel.
61
+ *
62
+ * The `done` promise resolves to the reply message.
63
+ */
64
+ readonly done: Promise<REPLY>;
65
+ /**
66
+ * The reply handler for the kernel future.
67
+ *
68
+ * #### Notes
69
+ * If the handler returns a promise, all kernel message processing pauses
70
+ * until the promise is resolved. If there is a reply message, the future
71
+ * `done` promise also resolves to the reply message after this handler has
72
+ * been called.
73
+ */
74
+ onReply: (msg: REPLY) => void | PromiseLike<void>;
75
+ /**
76
+ * The iopub handler for the kernel future.
77
+ *
78
+ * #### Notes
79
+ * If the handler returns a promise, all kernel message processing pauses
80
+ * until the promise is resolved.
81
+ */
82
+ onIOPub: (msg: KernelMessage.IIOPubMessage) => void | PromiseLike<void>;
83
+ /**
84
+ * The stdin handler for the kernel future.
85
+ *
86
+ * #### Notes
87
+ * If the handler returns a promise, all kernel message processing pauses
88
+ * until the promise is resolved.
89
+ */
90
+ onStdin: (msg: KernelMessage.IStdinMessage) => void | PromiseLike<void>;
91
+ /**
92
+ * Register hook for IOPub messages.
93
+ *
94
+ * @param hook - The callback invoked for an IOPub message.
95
+ *
96
+ * #### Notes
97
+ * The IOPub hook system allows you to preempt the handlers for IOPub
98
+ * messages handled by the future.
99
+ *
100
+ * The most recently registered hook is run first. A hook can return a
101
+ * boolean or a promise to a boolean, in which case all kernel message
102
+ * processing pauses until the promise is fulfilled. If a hook return value
103
+ * resolves to false, any later hooks will not run and the function will
104
+ * return a promise resolving to false. If a hook throws an error, the error
105
+ * is logged to the console and the next hook is run. If a hook is
106
+ * registered during the hook processing, it will not run until the next
107
+ * message. If a hook is removed during the hook processing, it will be
108
+ * deactivated immediately.
109
+ */
110
+ registerMessageHook: (hook: (msg: KernelMessage.IIOPubMessage) => boolean | PromiseLike<boolean>) => void;
111
+ /**
112
+ * Remove a hook for IOPub messages.
113
+ *
114
+ * @param hook - The hook to remove.
115
+ *
116
+ * #### Notes
117
+ * If a hook is removed during the hook processing, it will be deactivated immediately.
118
+ */
119
+ removeMessageHook: (hook: (msg: KernelMessage.IIOPubMessage) => boolean | PromiseLike<boolean>) => void;
120
+ /**
121
+ * Send an `input_reply` message.
122
+ */
123
+ sendInputReply: (content: KernelMessage.IInputReplyMsg['content'], parent_header: KernelMessage.IInputReplyMsg['parent_header']) => void;
124
+ }
125
+ export type IShellFuture<REQUEST extends KernelMessage.IShellMessage = KernelMessage.IShellMessage, REPLY extends KernelMessage.IShellMessage = KernelMessage.IShellMessage> = IFuture<REQUEST, REPLY>;
126
+ export type IControlFuture<REQUEST extends KernelMessage.IControlMessage = KernelMessage.IControlMessage, REPLY extends KernelMessage.IControlMessage = KernelMessage.IControlMessage> = IFuture<REQUEST, REPLY>;
127
+ export interface IComm extends Disposable {
128
+ /**
129
+ * The unique id for the comm channel.
130
+ */
131
+ readonly commId: string;
132
+ /**
133
+ * The target name for the comm channel.
134
+ */
135
+ readonly targetName: string;
136
+ /**
137
+ * Callback for a comm close event.
138
+ *
139
+ * #### Notes
140
+ * This is called when the comm is closed from either the server or client.
141
+ * If this is called in response to a kernel message and the handler returns
142
+ * a promise, all kernel message processing pauses until the promise is
143
+ * resolved.
144
+ */
145
+ onClose: (msg: KernelMessage.ICommCloseMsg) => void | PromiseLike<void>;
146
+ /**
147
+ * Callback for a comm message received event.
148
+ *
149
+ * #### Notes
150
+ * If the handler returns a promise, all kernel message processing pauses
151
+ * until the promise is resolved.
152
+ */
153
+ onMsg: (msg: KernelMessage.ICommMsgMsg) => void | PromiseLike<void>;
154
+ /**
155
+ * Open a comm with optional data and metadata.
156
+ *
157
+ * @param data - The data to send to the server on opening.
158
+ *
159
+ * @param metadata - Additional metadata for the message.
160
+ *
161
+ * @returns A future for the generated message.
162
+ *
163
+ * #### Notes
164
+ * This sends a `comm_open` message to the server.
165
+ */
166
+ open: (data?: JSONObject, metadata?: JSONObject, buffers?: (ArrayBuffer | ArrayBufferView)[]) => IShellFuture;
167
+ /**
168
+ * Send a `comm_msg` message to the kernel.
169
+ *
170
+ * @param data - The data to send to the server on opening.
171
+ *
172
+ * @param metadata - Additional metadata for the message.
173
+ *
174
+ * @param buffers - Optional buffer data.
175
+ *
176
+ * @param disposeOnDone - Whether to dispose of the future when done.
177
+ *
178
+ * @returns A future for the generated message.
179
+ *
180
+ * #### Notes
181
+ * This is a no-op if the comm has been closed.
182
+ */
183
+ send: (data: JSONObject, metadata?: JSONObject, buffers?: (ArrayBuffer | ArrayBufferView)[], disposeOnDone?: boolean) => IShellFuture;
184
+ /**
185
+ * Close the comm.
186
+ *
187
+ * @param data - The data to send to the server on opening.
188
+ *
189
+ * @param metadata - Additional metadata for the message.
190
+ *
191
+ * @returns A future for the generated message.
192
+ *
193
+ * #### Notes
194
+ * This will send a `comm_close` message to the kernel, and call the
195
+ * `onClose` callback if set.
196
+ *
197
+ * This is a no-op if the comm is already closed.
198
+ */
199
+ close: (data?: JSONObject, metadata?: JSONObject, buffers?: (ArrayBuffer | ArrayBufferView)[]) => IShellFuture;
200
+ }
201
+ export interface IAnyMessageArgs {
202
+ /**
203
+ * The message that is being signaled.
204
+ */
205
+ msg: Readonly<KernelMessage.IMessage>;
206
+ /**
207
+ * The direction of the message.
208
+ */
209
+ direction: 'send' | 'recv';
210
+ }
211
+ export interface IKernelModel {
212
+ /**
213
+ * Unique identifier of the kernel on the server.
214
+ */
215
+ readonly id: string;
216
+ /**
217
+ * The name of the kernel.
218
+ */
219
+ readonly name: string;
220
+ /**
221
+ * The kernel execution state.
222
+ */
223
+ readonly execution_state?: string;
224
+ /**
225
+ * The timestamp of the last activity on the kernel.
226
+ */
227
+ readonly last_activity?: string;
228
+ /**
229
+ * The number of active connections to the kernel.
230
+ */
231
+ readonly connections?: number;
232
+ /**
233
+ * The reason the kernel died, if applicable.
234
+ */
235
+ readonly reason?: string;
236
+ /**
237
+ * The traceback for a dead kernel, if applicable.
238
+ */
239
+ readonly traceback?: string;
240
+ }
241
+ export interface IKernelConnection extends ObservableDisposable {
242
+ /**
243
+ * The id of the server-side kernel.
244
+ */
245
+ readonly id: string;
246
+ /**
247
+ * The name of the server-side kernel.
248
+ */
249
+ readonly name: string;
250
+ /**
251
+ * The kernel model, for convenience.
252
+ */
253
+ readonly model: IKernelModel;
254
+ /**
255
+ * The client username.
256
+ */
257
+ readonly username: string;
258
+ /**
259
+ * The client unique id.
260
+ *
261
+ * #### Notes
262
+ * This should be unique for a particular kernel connection object.
263
+ */
264
+ readonly clientId: string;
265
+ /**
266
+ * The current status of the kernel.
267
+ */
268
+ readonly status: KernelMessage.Status;
269
+ /**
270
+ * The current connection status of the kernel.
271
+ */
272
+ readonly connectionStatus: ConnectionStatus;
273
+ readonly isDisposed: boolean;
274
+ /**
275
+ * The kernel info
276
+ *
277
+ * #### Notes
278
+ * This promise only resolves at startup, and is not refreshed on every
279
+ * restart.
280
+ */
281
+ readonly info: Promise<KernelMessage.IInfoReply>;
282
+ /**
283
+ * Get the kernel spec.
284
+ *
285
+ * @returns A promise that resolves with the kernel spec for this kernel.
286
+ *
287
+ * #### Notes
288
+ * This may make a server request to retrieve the spec.
289
+ */
290
+ readonly spec?: Promise<ISpecModel | undefined>;
291
+ /**
292
+ * Whether the kernel connection handles comm messages.
293
+ *
294
+ * #### Notes
295
+ * The comm message protocol currently has implicit assumptions that only
296
+ * one kernel connection is handling comm messages. This option allows a
297
+ * kernel connection to opt out of handling comms.
298
+ *
299
+ * See https://github.com/jupyter/jupyter_client/issues/263
300
+ */
301
+ handleComms: boolean;
302
+ /**
303
+ * Whether the kernel connection has pending input.
304
+ *
305
+ * #### Notes
306
+ * This is a guard to avoid deadlock is the user asks input
307
+ * as second time before submitting his first input
308
+ */
309
+ hasPendingInput: boolean;
310
+ /**
311
+ * Send a shell message to the kernel.
312
+ *
313
+ * @param msg - The fully-formed shell message to send.
314
+ *
315
+ * @param expectReply - Whether to expect a shell reply message.
316
+ *
317
+ * @param disposeOnDone - Whether to dispose of the future when done.
318
+ *
319
+ * #### Notes
320
+ * Send a message to the kernel's shell channel, yielding a future object
321
+ * for accepting replies.
322
+ *
323
+ * If `expectReply` is given and `true`, the future is done when both a
324
+ * shell reply and an idle status message are received with the appropriate
325
+ * parent header, in which case the `.done` promise resolves to the reply.
326
+ * If `expectReply` is not given or is `false`, the future is done when an
327
+ * idle status message with the appropriate parent header is received, in
328
+ * which case the `.done` promise resolves to `undefined`.
329
+ *
330
+ * If `disposeOnDone` is given and `false`, the future will not be disposed
331
+ * of when the future is done, instead relying on the caller to dispose of
332
+ * it. This allows for the handling of out-of-order output from ill-behaved
333
+ * kernels.
334
+ *
335
+ * All replies are validated as valid kernel messages.
336
+ *
337
+ * If the kernel status is `'dead'`, this will throw an error.
338
+ */
339
+ sendShellMessage: <T extends KernelMessage.ShellMessageType>(msg: KernelMessage.IShellMessage<T>, expectReply?: boolean, disposeOnDone?: boolean) => IShellFuture<KernelMessage.IShellMessage<T>>;
340
+ sendControlMessage: <T extends KernelMessage.ControlMessageType>(msg: KernelMessage.IControlMessage<T>, expectReply?: boolean, disposeOnDone?: boolean) => IControlFuture<KernelMessage.IControlMessage<T>>;
341
+ /**
342
+ * Reconnect to a disconnected kernel.
343
+ *
344
+ * @returns A promise that resolves when the kernel has reconnected.
345
+ *
346
+ * #### Notes
347
+ * This just refreshes the connection to an existing kernel, and does not
348
+ * perform an HTTP request to the server or restart the kernel.
349
+ */
350
+ reconnect: () => Promise<void>;
351
+ /**
352
+ * Interrupt a kernel.
353
+ *
354
+ * @returns A promise that resolves when the kernel has interrupted.
355
+ *
356
+ * #### Notes
357
+ * Uses the [Jupyter Notebook API](http://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter/notebook/master/notebook/services/api/api.yaml#!/kernels).
358
+ *
359
+ * The promise is fulfilled on a valid response and rejected otherwise.
360
+ *
361
+ * It is assumed that the API call does not mutate the kernel id or name.
362
+ *
363
+ * The promise will be rejected if the kernel status is `'dead'` or if the
364
+ * request fails or the response is invalid.
365
+ */
366
+ interrupt: () => Promise<void>;
367
+ /**
368
+ * Restart a kernel.
369
+ *
370
+ * @returns A promise that resolves when the kernel has restarted.
371
+ *
372
+ * #### Notes
373
+ * Uses the [Jupyter Notebook API](http://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter/notebook/master/notebook/services/api/api.yaml#!/kernels) and validates the response model.
374
+ *
375
+ * Any existing Future or Comm objects are cleared.
376
+ *
377
+ * It is assumed that the API call does not mutate the kernel id or name.
378
+ *
379
+ * The promise will be rejected if the kernel status is `'dead'` or if the
380
+ * request fails or the response is invalid.
381
+ */
382
+ restart: () => Promise<void>;
383
+ /**
384
+ * Send a `kernel_info_request` message.
385
+ *
386
+ * @param content - The content of the request.
387
+ *
388
+ * @returns A promise that resolves with the response message.
389
+ *
390
+ * #### Notes
391
+ * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#kernel-info).
392
+ *
393
+ * Fulfills with the `kernel_info_response` content when the shell reply is
394
+ * received and validated.
395
+ */
396
+ requestKernelInfo?: () => Promise<KernelMessage.IInfoReplyMsg | undefined>;
397
+ /**
398
+ * Send a `complete_request` message.
399
+ *
400
+ * @param content - The content of the request.
401
+ *
402
+ * @returns A promise that resolves with the response message.
403
+ *
404
+ * #### Notes
405
+ * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#completion).
406
+ *
407
+ * Fulfills with the `complete_reply` content when the shell reply is
408
+ * received and validated.
409
+ */
410
+ requestComplete: (content: KernelMessage.ICompleteRequestMsg['content']) => Promise<KernelMessage.ICompleteReplyMsg>;
411
+ /**
412
+ * Send an `inspect_request` message.
413
+ *
414
+ * @param content - The content of the request.
415
+ *
416
+ * @returns A promise that resolves with the response message.
417
+ *
418
+ * #### Notes
419
+ * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#introspection).
420
+ *
421
+ * Fulfills with the `inspect_reply` content when the shell reply is
422
+ * received and validated.
423
+ */
424
+ requestInspect: (content: KernelMessage.IInspectRequestMsg['content']) => Promise<KernelMessage.IInspectReplyMsg>;
425
+ /**
426
+ * Send a `history_request` message.
427
+ *
428
+ * @param content - The content of the request.
429
+ *
430
+ * @returns A promise that resolves with the response message.
431
+ *
432
+ * #### Notes
433
+ * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#history).
434
+ *
435
+ * Fulfills with the `history_reply` content when the shell reply is
436
+ * received and validated.
437
+ */
438
+ requestHistory: (content: KernelMessage.IHistoryRequestMsg['content']) => Promise<KernelMessage.IHistoryReplyMsg>;
439
+ /**
440
+ * Send an `execute_request` message.
441
+ *
442
+ * @param content - The content of the request.
443
+ *
444
+ * @param disposeOnDone - Whether to dispose of the future when done.
445
+ *
446
+ * @returns A kernel future.
447
+ *
448
+ * #### Notes
449
+ * See [Messaging in
450
+ * Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#execute).
451
+ *
452
+ * This method returns a kernel future, rather than a promise, since execution may
453
+ * have many response messages (for example, many iopub display messages).
454
+ *
455
+ * Future `onReply` is called with the `execute_reply` content when the
456
+ * shell reply is received and validated.
457
+ *
458
+ * **See also:** [[IExecuteReply]]
459
+ */
460
+ requestExecute: (content: KernelMessage.IExecuteRequestMsg['content'], disposeOnDone?: boolean, metadata?: JSONObject) => IShellFuture<KernelMessage.IExecuteRequestMsg, KernelMessage.IExecuteReplyMsg>;
461
+ /**
462
+ * Send an experimental `debug_request` message.
463
+ *
464
+ * @hidden
465
+ *
466
+ * @param content - The content of the request.
467
+ *
468
+ * @param disposeOnDone - Whether to dispose of the future when done.
469
+ *
470
+ * @returns A kernel future.
471
+ *
472
+ * #### Notes
473
+ * Debug messages are experimental messages that are not in the official
474
+ * kernel message specification. As such, this function is *NOT* considered
475
+ * part of the public API, and may change without notice.
476
+ */
477
+ requestDebug: (content: KernelMessage.IDebugRequestMsg['content'], disposeOnDone?: boolean) => IControlFuture<KernelMessage.IDebugRequestMsg, KernelMessage.IDebugReplyMsg>;
478
+ /**
479
+ * Send an `is_complete_request` message.
480
+ *
481
+ * @param content - The content of the request.
482
+ *
483
+ * @returns A promise that resolves with the response message.
484
+ *
485
+ * #### Notes
486
+ * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#code-completeness).
487
+ *
488
+ * Fulfills with the `is_complete_response` content when the shell reply is
489
+ * received and validated.
490
+ */
491
+ requestIsComplete: (content: KernelMessage.IIsCompleteRequestMsg['content']) => Promise<KernelMessage.IIsCompleteReplyMsg>;
492
+ /**
493
+ * Send a `comm_info_request` message.
494
+ *
495
+ * @param content - The content of the request.
496
+ *
497
+ * @returns A promise that resolves with the response message.
498
+ *
499
+ * #### Notes
500
+ * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#comm_info).
501
+ *
502
+ * Fulfills with the `comm_info_reply` content when the shell reply is
503
+ * received and validated.
504
+ */
505
+ requestCommInfo: (content: KernelMessage.ICommInfoRequestMsg['content']) => Promise<KernelMessage.ICommInfoReplyMsg>;
506
+ /**
507
+ * Send an `input_reply` message.
508
+ *
509
+ * @param content - The content of the reply.
510
+ *
511
+ * #### Notes
512
+ * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#messages-on-the-stdin-router-dealer-sockets).
513
+ */
514
+ sendInputReply: (content: KernelMessage.IInputReplyMsg['content'], parent_header: KernelMessage.IInputReplyMsg['parent_header']) => void;
515
+ /**
516
+ * Create a new comm.
517
+ *
518
+ * @param targetName - The name of the comm target.
519
+ *
520
+ * @param id - The comm id.
521
+ *
522
+ * @returns A comm instance.
523
+ */
524
+ createComm: (targetName: string, commId?: string) => IComm;
525
+ /**
526
+ * Check if a comm exists.
527
+ */
528
+ hasComm: (commId: string) => boolean;
529
+ /**
530
+ * Register a comm target handler.
531
+ *
532
+ * @param targetName - The name of the comm target.
533
+ *
534
+ * @param callback - The callback invoked for a comm open message.
535
+ *
536
+ * #### Notes
537
+ * Only one comm target can be registered to a target name at a time, an
538
+ * existing callback for the same target name will be overridden. A registered
539
+ * comm target handler will take precedence over a comm which specifies a
540
+ * `target_module`.
541
+ *
542
+ * If the callback returns a promise, kernel message processing will pause
543
+ * until the returned promise is fulfilled.
544
+ */
545
+ registerCommTarget: (targetName: string, callback: (comm: IComm, msg: KernelMessage.ICommOpenMsg) => void | PromiseLike<void>) => void;
546
+ /**
547
+ * Remove a comm target handler.
548
+ *
549
+ * @param targetName - The name of the comm target to remove.
550
+ *
551
+ * @param callback - The callback to remove.
552
+ *
553
+ * #### Notes
554
+ * The comm target is only removed if it matches the callback argument.
555
+ */
556
+ removeCommTarget: (targetName: string, callback: (comm: IComm, msg: KernelMessage.ICommOpenMsg) => void | PromiseLike<void>) => void;
557
+ /**
558
+ * Register an IOPub message hook.
559
+ *
560
+ * @param msg_id - The parent_header message id in messages the hook should
561
+ * intercept.
562
+ *
563
+ * @param hook - The callback invoked for the message.
564
+ *
565
+ * #### Notes
566
+ * The IOPub hook system allows you to preempt the handlers for IOPub
567
+ * messages with a given parent_header message id. The most recently
568
+ * registered hook is run first. If a hook return value resolves to false,
569
+ * any later hooks and the future's onIOPub handler will not run. If a hook
570
+ * throws an error, the error is logged to the console and the next hook is
571
+ * run. If a hook is registered during the hook processing, it will not run
572
+ * until the next message. If a hook is disposed during the hook processing,
573
+ * it will be deactivated immediately.
574
+ *
575
+ * See also [[IFuture.registerMessageHook]].
576
+ */
577
+ registerMessageHook: (msgId: string, hook: (msg: KernelMessage.IIOPubMessage) => boolean | PromiseLike<boolean>) => void;
578
+ /**
579
+ * Remove an IOPub message hook.
580
+ *
581
+ * @param msg_id - The parent_header message id the hook intercepted.
582
+ *
583
+ * @param hook - The callback invoked for the message.
584
+ *
585
+ */
586
+ removeMessageHook: (msgId: string, hook: (msg: KernelMessage.IIOPubMessage) => boolean | PromiseLike<boolean>) => void;
587
+ /**
588
+ * Remove the input guard, if any.
589
+ */
590
+ removeInputGuard: () => void;
591
+ /**
592
+ * A signal emitted when the kernel status changes.
593
+ */
594
+ statusChanged: Event<KernelMessage.Status>;
595
+ /**
596
+ * A signal emitted when the kernel connection status changes.
597
+ */
598
+ connectionStatusChanged: Event<ConnectionStatus>;
599
+ /**
600
+ * A signal emitted after an iopub kernel message is handled.
601
+ */
602
+ iopubMessage: Event<KernelMessage.IIOPubMessage>;
603
+ /**
604
+ * A signal emitted for unhandled non-iopub kernel messages that claimed to
605
+ * be responses for messages we sent using this kernel object.
606
+ */
607
+ unhandledMessage: Event<KernelMessage.IMessage>;
608
+ /**
609
+ * A signal emitted when any kernel message is sent or received.
610
+ *
611
+ * #### Notes
612
+ * This signal is emitted before any message handling has happened. The
613
+ * message should be treated as read-only.
614
+ */
615
+ anyMessage: Event<IAnyMessageArgs>;
616
+ /**
617
+ * A signal emitted when a kernel has pending inputs from the user.
618
+ */
619
+ pendingInput: Event<boolean>;
620
+ /**
621
+ * The server settings for the kernel.
622
+ */
623
+ readonly serverSettings: ISettings;
624
+ /**
625
+ * Shutdown a kernel.
626
+ *
627
+ * @returns A promise that resolves when the kernel has shut down.
628
+ *
629
+ * #### Notes
630
+ * Uses the [Jupyter Notebook
631
+ * API](http://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter/notebook/master/notebook/services/api/api.yaml#!/kernels).
632
+ *
633
+ * On a valid response, closes the websocket, disposes of the kernel
634
+ * object, and fulfills the promise.
635
+ *
636
+ * The promise will be rejected if the kernel status is `'dead'`, the
637
+ * request fails, or the response is invalid.
638
+ */
639
+ shutdown: () => Promise<void>;
640
+ /**
641
+ * Clone the current kernel with a new clientId.
642
+ */
643
+ clone: (options?: Pick<KernelConnectionOptions, 'clientId' | 'username' | 'handleComms'>) => IKernelConnection;
644
+ }
645
+ export declare const KernelConnectionOptions: unique symbol;
646
+ export interface KernelConnectionOptions {
647
+ /**
648
+ * The kernel model.
649
+ */
650
+ model: IKernelModel;
651
+ /**
652
+ * The server settings for the kernel.
653
+ */
654
+ serverSettings?: Partial<ISettings>;
655
+ /**
656
+ * The username of the kernel client.
657
+ */
658
+ username?: string;
659
+ /**
660
+ * Whether the kernel connection should handle comm messages
661
+ *
662
+ * #### Notes
663
+ * The comm message protocol currently has implicit assumptions that only
664
+ * one kernel connection is handling comm messages. This option allows a
665
+ * kernel connection to opt out of handling comms.
666
+ *
667
+ * See https://github.com/jupyter/jupyter_client/issues/263
668
+ */
669
+ handleComms?: boolean;
670
+ /**
671
+ * The unique identifier for the kernel client.
672
+ */
673
+ clientId?: string;
674
+ }
675
+ //# sourceMappingURL=libro-kernel-protocol.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"libro-kernel-protocol.d.ts","sourceRoot":"","sources":["../../src/kernel/libro-kernel-protocol.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,KAAK,EAAE,WAAW,EAA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