Signal emitted for any sent or received message.
The client session identifier.
Set the client session identifier.
The current connection status of the kernel.
Signal emitted when connection status changes.
Signal emitted when the kernel is disposed.
Whether this connection handles comm messages.
Set whether this connection handles comm messages.
Whether the kernel has pending input requests.
The unique identifier of this kernel.
Promise resolving to kernel info when available.
Signal emitted for IOPub channel messages.
Whether this kernel connection has been disposed.
The kernel model containing ID and name.
The display name of this kernel.
Signal emitted when pending input state changes.
Signal emitted when kernel properties change.
Server connection settings for this kernel.
Get the kernel specification.
A promise that resolves to the kernel spec model.
The current execution status of the kernel.
Signal emitted when kernel status changes.
The current subshell ID, if any.
Whether the kernel supports subshells.
Signal emitted for unhandled kernel messages.
The username associated with this kernel connection.
Set the username for this kernel connection.
Dispose of the kernel connection and clean up resources.
Check if a comm with the given ID exists.
The comm ID to check.
Always returns false for local kernels.
Interrupt the kernel execution. Sends both an extension message (for local kernels via SIGINT) and an interrupt_request Message to the kernel via the control channel (for remote kernels).
A promise that resolves when the interrupt request is sent.
Reconnect to the kernel (no-op for local kernels).
A resolved promise.
Register a comm target (no-op for local kernels).
Identifier for the comm channel to register.
Handler invoked when a comm is opened on this target.
Register a message hook for IOPub messages (no-op for local kernels).
The message ID to hook.
The hook function to register.
Remove a comm target (no-op for local kernels).
Identifier for the comm channel to unregister.
Previously registered handler to remove.
Remove input guard from the kernel (no-op for local kernels).
Remove a message hook (no-op for local kernels).
The message ID to unhook.
The hook function to remove.
Request creation of a subshell (not supported for local kernels).
The subshell creation request content.
Optional_disposeOnDone: booleanWhether to dispose after completion.
Request deletion of a subshell (not supported for local kernels).
The subshell deletion request content.
Optional_disposeOnDone: booleanWhether to dispose after completion.
Execute code in the kernel.
The code execution request content.
OptionaldisposeOnDone: booleanWhether to dispose the future after completion.
Optionalmetadata: unknownOptional metadata to include with the request.
A shell future that will resolve with the execution reply.
Request command history (returns empty history).
The history request content.
A promise that resolves with an empty history reply.
Request kernel information.
A promise that resolves with the kernel info reply.
Request listing of subshells (not supported for local kernels).
The subshell list request content.
Optional_disposeOnDone: booleanWhether to dispose after completion.
Restart the kernel. Sends a message to the extension host to restart the kernel process.
A resolved promise.
Send a control message to the kernel.
The control message to send.
Optional_expectReply: booleanWhether a reply is expected.
Optional_disposeOnDone: booleanWhether to dispose after completion.
A control future that will resolve with the reply.
Send a shell message to the kernel.
The shell message to send.
Optional_expectReply: booleanWhether a reply is expected.
Optional_disposeOnDone: booleanWhether to dispose after completion.
A shell future that will resolve with the reply.
Terminates the kernel and disposes all associated resources.
A resolved promise.
A custom KernelConnection that wraps a local kernel WebSocket. This bypasses the session management and provides a pre-connected kernel.