@jupyterlite/kernel 0.7.0-beta.1 → 0.7.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/tokens.d.ts DELETED
@@ -1,163 +0,0 @@
1
- import type { Remote } from 'comlink';
2
- import { IObservableMap } from '@jupyterlab/observables';
3
- import { Kernel, KernelMessage, KernelSpec } from '@jupyterlab/services';
4
- import { Token } from '@lumino/coreutils';
5
- import { IObservableDisposable } from '@lumino/disposable';
6
- import { ISignal } from '@lumino/signaling';
7
- import { KernelSpecs } from './kernelspecs';
8
- /**
9
- * The kernel name of last resort.
10
- */
11
- export declare const FALLBACK_KERNEL = "javascript";
12
- /**
13
- * The token for the kernel client.
14
- */
15
- export declare const IKernelClient: Token<IKernelClient>;
16
- /**
17
- * An interface for the Kernels service.
18
- */
19
- export interface IKernelClient extends Kernel.IKernelAPIClient {
20
- /**
21
- * Signal emitted when the kernels map changes
22
- */
23
- readonly changed: ISignal<IKernelClient, IObservableMap.IChangedArgs<IKernel>>;
24
- /**
25
- * Handle stdin request received from Service Worker.
26
- */
27
- handleStdin(inputRequest: KernelMessage.IInputRequestMsg): Promise<KernelMessage.IInputReplyMsg>;
28
- /**
29
- * Shut down all kernels.
30
- */
31
- shutdownAll: () => Promise<void>;
32
- }
33
- /**
34
- * The token for the kernel spec client.
35
- */
36
- export declare const IKernelSpecClient: Token<IKernelSpecClient>;
37
- /**
38
- * An interface for the kernel spec client.
39
- */
40
- export interface IKernelSpecClient extends KernelSpec.IKernelSpecAPIClient {
41
- }
42
- /**
43
- * An interface for a kernel running in the browser.
44
- */
45
- export interface IKernel extends IObservableDisposable {
46
- /**
47
- * The id of the server-side kernel.
48
- */
49
- readonly id: string;
50
- /**
51
- * The name of the server-side kernel.
52
- */
53
- readonly name: string;
54
- /**
55
- * The location in the virtual filesystem from which the kernel was started.
56
- */
57
- readonly location: string;
58
- /**
59
- * A promise that is fulfilled when the kernel is ready.
60
- */
61
- readonly ready: Promise<void>;
62
- /**
63
- * Handle an incoming message from the client.
64
- *
65
- * @param msg The message to handle
66
- */
67
- handleMessage(msg: KernelMessage.IMessage): Promise<void>;
68
- }
69
- /**
70
- * A namespace for IKernel statics.
71
- */
72
- export declare namespace IKernel {
73
- /**
74
- * The type for the send message function.
75
- */
76
- type SendMessage = (msg: KernelMessage.IMessage) => void;
77
- /**
78
- * The instantiation options for an IKernel.
79
- */
80
- interface IOptions {
81
- /**
82
- * The kernel id.
83
- */
84
- id: string;
85
- /**
86
- * The name of the kernel.
87
- */
88
- name: string;
89
- /**
90
- * The location in the virtual filesystem from which the kernel was started.
91
- */
92
- location: string;
93
- /**
94
- * The method to send messages back to the server.
95
- */
96
- sendMessage: SendMessage;
97
- }
98
- }
99
- /**
100
- * The token for the kernel spec service.
101
- */
102
- export declare const IKernelSpecs: Token<IKernelSpecs>;
103
- /**
104
- * The interface for the kernel specs service.
105
- */
106
- export interface IKernelSpecs {
107
- /**
108
- * Get the kernel specs.
109
- */
110
- readonly specs: KernelSpec.ISpecModels | null;
111
- /**
112
- * Get the default kernel name.
113
- */
114
- readonly defaultKernelName: string;
115
- /**
116
- * Get the kernel factories for the current kernels.
117
- */
118
- readonly factories: KernelSpecs.KernelFactories;
119
- /**
120
- * Signal emitted when the specs change.
121
- */
122
- readonly changed: ISignal<IKernelSpecs, KernelSpec.ISpecModels | null>;
123
- /**
124
- * Register a new kernel spec
125
- *
126
- * @param options The kernel spec options.
127
- */
128
- register: (options: KernelSpecs.IKernelOptions) => void;
129
- }
130
- /**
131
- * An interface for a comlink-based worker kernel
132
- */
133
- export interface IWorkerKernel {
134
- /**
135
- * Handle any lazy setup activities.
136
- */
137
- initialize(options: IWorkerKernel.IOptions): Promise<void>;
138
- execute(content: KernelMessage.IExecuteRequestMsg['content'], parent: any): Promise<KernelMessage.IExecuteReplyMsg['content']>;
139
- complete(content: KernelMessage.ICompleteRequestMsg['content'], parent: any): Promise<KernelMessage.ICompleteReplyMsg['content']>;
140
- inspect(content: KernelMessage.IInspectRequestMsg['content'], parent: any): Promise<KernelMessage.IInspectReplyMsg['content']>;
141
- isComplete(content: KernelMessage.IIsCompleteRequestMsg['content'], parent: any): Promise<KernelMessage.IIsCompleteReplyMsg['content']>;
142
- commInfo(content: KernelMessage.ICommInfoRequestMsg['content'], parent: any): Promise<KernelMessage.ICommInfoReplyMsg['content']>;
143
- commOpen(content: KernelMessage.ICommOpenMsg, parent: any): Promise<void>;
144
- commMsg(content: KernelMessage.ICommMsgMsg, parent: any): Promise<void>;
145
- commClose(content: KernelMessage.ICommCloseMsg, parent: any): Promise<void>;
146
- inputReply(content: KernelMessage.IInputReplyMsg['content'], parent: any): Promise<void>;
147
- }
148
- /**
149
- * A namespace for worker kernels.
150
- **/
151
- export declare namespace IWorkerKernel {
152
- /**
153
- * Common values likely to be required by all kernels.
154
- */
155
- interface IOptions {
156
- /**
157
- * The base URL of the kernel server.
158
- */
159
- baseUrl: string;
160
- }
161
- }
162
- export interface IRemoteKernel extends Remote<IWorkerKernel> {
163
- }
package/lib/tokens.js DELETED
@@ -1,20 +0,0 @@
1
- // Copyright (c) Jupyter Development Team.
2
- // Distributed under the terms of the Modified BSD License.
3
- import { Token } from '@lumino/coreutils';
4
- /**
5
- * The kernel name of last resort.
6
- */
7
- export const FALLBACK_KERNEL = 'javascript';
8
- /**
9
- * The token for the kernel client.
10
- */
11
- export const IKernelClient = new Token('@jupyterlite/kernel:IKernelClient');
12
- /**
13
- * The token for the kernel spec client.
14
- */
15
- export const IKernelSpecClient = new Token('@jupyterlite/kernel:IKernelSpecClient');
16
- /**
17
- * The token for the kernel spec service.
18
- */
19
- export const IKernelSpecs = new Token('@jupyterlite/kernel:IKernelSpecs');
20
- //# sourceMappingURL=tokens.js.map
package/lib/tokens.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"tokens.js","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAQ3D,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAQ1C;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,YAAY,CAAC;AAE5C;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,KAAK,CACpC,mCAAmC,CACpC,CAAC;AAwBF;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,KAAK,CACxC,uCAAuC,CACxC,CAAC;AA0EF;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,KAAK,CAAe,kCAAkC,CAAC,CAAC"}