@howaboua/pi-durable-notebook 0.0.0-stage → 0.9.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/LICENSE +21 -0
- package/NOTICE +54 -0
- package/README.md +105 -2
- package/dist/execution/src/cell-contract.d.ts +49 -0
- package/dist/execution/src/cell-observation.d.ts +7 -0
- package/dist/execution/src/cell-progress.d.ts +4 -0
- package/dist/execution/src/cell-task.d.ts +17 -0
- package/dist/execution/src/cell-tools.d.ts +8 -0
- package/dist/execution/src/cells.d.ts +14 -0
- package/dist/execution/src/command-backend.d.ts +22 -0
- package/dist/execution/src/controls.d.ts +3 -0
- package/dist/execution/src/custom-command-config.d.ts +21 -0
- package/dist/execution/src/custom-commands.d.ts +62 -0
- package/dist/execution/src/exec-source.d.ts +21 -0
- package/dist/execution/src/forwarded-tools.d.ts +21 -0
- package/dist/execution/src/forwarding-hook.d.ts +6 -0
- package/dist/execution/src/forwarding.d.ts +15 -0
- package/dist/execution/src/history.d.ts +14 -0
- package/dist/execution/src/index.d.ts +6 -0
- package/dist/execution/src/invocation-state.d.ts +26 -0
- package/dist/execution/src/invocation.d.ts +35 -0
- package/dist/execution/src/native-tools.d.ts +11 -0
- package/dist/execution/src/nested-call.d.ts +26 -0
- package/dist/execution/src/nested-result.d.ts +8 -0
- package/dist/execution/src/nested.d.ts +3 -0
- package/dist/execution/src/output.d.ts +48 -0
- package/dist/execution/src/presentation.d.ts +59 -0
- package/dist/execution/src/progress.d.ts +23 -0
- package/dist/execution/src/projection.d.ts +5 -0
- package/dist/execution/src/shell/backend.d.ts +28 -0
- package/dist/execution/src/shell/format.d.ts +2 -0
- package/dist/execution/src/shell/node-backend.d.ts +9 -0
- package/dist/execution/src/shell/output.d.ts +19 -0
- package/dist/execution/src/shell/process-session.d.ts +50 -0
- package/dist/execution/src/shell/results.d.ts +14 -0
- package/dist/execution/src/shell/session-manager.d.ts +46 -0
- package/dist/execution/src/shell/session-store.d.ts +53 -0
- package/dist/execution/src/shell/shell-args.d.ts +4 -0
- package/dist/execution/src/shell/shell.d.ts +14 -0
- package/dist/execution/src/shell/wait.d.ts +7 -0
- package/dist/execution/src/shell.d.ts +14 -0
- package/dist/execution/src/tool-contract.d.ts +34 -0
- package/dist/execution/src/tool-origin.d.ts +11 -0
- package/dist/execution/src/tool-source.d.ts +6 -0
- package/dist/execution/src/tool-value.d.ts +3 -0
- package/dist/execution/src/wait-session.d.ts +6 -0
- package/dist/history.js +315 -0
- package/dist/index.js +11718 -0
- package/dist/notebook/src/binding-metadata-source.d.ts +2 -0
- package/dist/notebook/src/bridge-protocol.d.ts +29 -0
- package/dist/notebook/src/bridge-server.d.ts +20 -0
- package/dist/notebook/src/cell.d.ts +34 -0
- package/dist/notebook/src/checkpoint-activity.d.ts +7 -0
- package/dist/notebook/src/checkpoint-format.d.ts +32 -0
- package/dist/notebook/src/checkpoint-manager.d.ts +41 -0
- package/dist/notebook/src/checkpoint-runtime.d.ts +18 -0
- package/dist/notebook/src/checkpoint-store.d.ts +8 -0
- package/dist/notebook/src/checkpoint.d.ts +15 -0
- package/dist/notebook/src/client.d.ts +18 -0
- package/dist/notebook/src/command-output.d.ts +1 -0
- package/dist/notebook/src/control-contract.d.ts +5 -0
- package/dist/notebook/src/deno-archive.d.ts +2 -0
- package/dist/notebook/src/deno-assets.d.ts +11 -0
- package/dist/notebook/src/deno-binary.d.ts +6 -0
- package/dist/notebook/src/deno-syntax-diagnostics.d.ts +1 -0
- package/dist/notebook/src/directory-lock.d.ts +10 -0
- package/dist/notebook/src/engine.d.ts +21 -0
- package/dist/notebook/src/execution-runtime.d.ts +33 -0
- package/dist/notebook/src/execution-settlement.d.ts +15 -0
- package/dist/notebook/src/glob.d.ts +1 -0
- package/dist/notebook/src/history.d.ts +6 -0
- package/dist/notebook/src/index.d.ts +57 -0
- package/dist/notebook/src/isolated-runtime.d.ts +19 -0
- package/dist/notebook/src/isolated-storage.d.ts +2 -0
- package/dist/notebook/src/journal-document.d.ts +36 -0
- package/dist/notebook/src/journal.d.ts +37 -0
- package/dist/notebook/src/jupyter-connection.d.ts +17 -0
- package/dist/notebook/src/jupyter-execution.d.ts +29 -0
- package/dist/notebook/src/jupyter-kernel.d.ts +43 -0
- package/dist/notebook/src/jupyter-output.d.ts +32 -0
- package/dist/notebook/src/jupyter-shell.d.ts +18 -0
- package/dist/notebook/src/jupyter-socket.d.ts +17 -0
- package/dist/notebook/src/jupyter-wire.d.ts +16 -0
- package/dist/notebook/src/lifecycle-contract.d.ts +32 -0
- package/dist/notebook/src/lifecycle-inspection.d.ts +7 -0
- package/dist/notebook/src/lifecycle-pins.d.ts +10 -0
- package/dist/notebook/src/lifecycle-release.d.ts +12 -0
- package/dist/notebook/src/lifecycle-result.d.ts +43 -0
- package/dist/notebook/src/lifecycle-runtime.d.ts +35 -0
- package/dist/notebook/src/lifecycle.d.ts +13 -0
- package/dist/notebook/src/lsp-process.d.ts +23 -0
- package/dist/notebook/src/notebook-bootstrap.d.ts +1 -0
- package/dist/notebook/src/notebook-control.d.ts +26 -0
- package/dist/notebook/src/notebook-diagnostic-report.d.ts +25 -0
- package/dist/notebook/src/notebook-diagnostics.d.ts +10 -0
- package/dist/notebook/src/npm-imports.d.ts +10 -0
- package/dist/notebook/src/presentation.d.ts +3 -0
- package/dist/notebook/src/profile-lifecycle.d.ts +22 -0
- package/dist/notebook/src/profile-state-format.d.ts +36 -0
- package/dist/notebook/src/profile-state.d.ts +29 -0
- package/dist/notebook/src/project-identity.d.ts +1 -0
- package/dist/notebook/src/project-state-commit.d.ts +23 -0
- package/dist/notebook/src/project-state-conflicts.d.ts +7 -0
- package/dist/notebook/src/project-state-files.d.ts +9 -0
- package/dist/notebook/src/project-state-format.d.ts +80 -0
- package/dist/notebook/src/project-state-lock.d.ts +1 -0
- package/dist/notebook/src/project-state-merge.d.ts +31 -0
- package/dist/notebook/src/project-state-metadata.d.ts +20 -0
- package/dist/notebook/src/project-state-runtime.d.ts +13 -0
- package/dist/notebook/src/project-state.d.ts +18 -0
- package/dist/notebook/src/recovery.d.ts +28 -0
- package/dist/notebook/src/runtime-contract.d.ts +117 -0
- package/dist/notebook/src/runtime-health.d.ts +9 -0
- package/dist/notebook/src/session-identity.d.ts +2 -0
- package/dist/notebook/src/session-observations.d.ts +35 -0
- package/dist/notebook/src/session-runtime.d.ts +48 -0
- package/dist/notebook/src/session-startup.d.ts +23 -0
- package/dist/notebook/src/storage-retention.d.ts +21 -0
- package/dist/notebook/src/tool-callbacks.d.ts +20 -0
- package/dist/notebook/src/tool-observation.d.ts +21 -0
- package/dist/presentation.js +144 -0
- package/package.json +54 -5
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const BINDING_METADATA_READER_SOURCE = "\n const __readBindingMetadata = (__value) => {\n if (__value === null || (typeof __value !== \"object\" && typeof __value !== \"function\")) return {};\n const __metadata = {};\n for (const [__key, __max, __multiline, __lines] of [\n [\"description\", 256, false, 1],\n [\"usage\", 512, true, 4],\n ]) {\n const __descriptor = Object.getOwnPropertyDescriptor(__value, __key);\n if (!__descriptor || !(\"value\" in __descriptor) || typeof __descriptor.value !== \"string\") continue;\n const __text = __descriptor.value;\n if (!__text || new TextEncoder().encode(__text).byteLength > __max || __text.includes(\"\\r\")) continue;\n const __textLines = __text.split(\"\\n\");\n if (__textLines.length > __lines) continue;\n let __valid = true;\n for (const __character of __text) {\n const __codePoint = __character.codePointAt(0);\n if ((__codePoint < 0x20 && __codePoint !== 0x0a) || __codePoint === 0x7f || !__multiline && __codePoint === 0x0a) {\n __valid = false;\n break;\n }\n }\n if (__valid) __metadata[__key] = __text;\n }\n return __metadata;\n };\n";
|
|
2
|
+
export declare const BINDING_METADATA_RESTORE_SOURCE = "\n\tconst __applyMetadata = (__value, __entry) => {\n\t if (__value === null || (typeof __value !== \"object\" && typeof __value !== \"function\")) return;\n\t for (const __key of [\"description\", \"usage\"]) {\n\t if (typeof __entry[__key] !== \"string\") continue;\n\t try {\n\t Object.defineProperty(__value, __key, {\n\t value: __entry[__key],\n\t writable: true,\n\t configurable: true,\n\t enumerable: true,\n\t });\n\t } catch {}\n\t }\n\t};\n";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
2
|
+
import type { NotebookMemoryUsage, NotebookToolIdentity, RuntimeContentItem } from "./runtime-contract.ts";
|
|
3
|
+
export type NotebookBridgeRequest = {
|
|
4
|
+
kind: "tool";
|
|
5
|
+
cellId: string;
|
|
6
|
+
requestId: number;
|
|
7
|
+
toolName: NotebookToolIdentity;
|
|
8
|
+
input: unknown;
|
|
9
|
+
} | {
|
|
10
|
+
kind: "cancel_tools";
|
|
11
|
+
cellId: string;
|
|
12
|
+
} | {
|
|
13
|
+
kind: "emit";
|
|
14
|
+
cellId: string;
|
|
15
|
+
items: RuntimeContentItem[];
|
|
16
|
+
} | {
|
|
17
|
+
kind: "notify";
|
|
18
|
+
cellId: string;
|
|
19
|
+
text: string;
|
|
20
|
+
} | {
|
|
21
|
+
kind: "yield";
|
|
22
|
+
cellId: string;
|
|
23
|
+
} | {
|
|
24
|
+
kind: "memory";
|
|
25
|
+
cellId: string;
|
|
26
|
+
usage: NotebookMemoryUsage;
|
|
27
|
+
};
|
|
28
|
+
export declare function readNotebookBridgeRequest(request: IncomingMessage): Promise<NotebookBridgeRequest>;
|
|
29
|
+
export declare function writeNotebookBridgeJson(response: ServerResponse, status: number, value: unknown): void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { NotebookMemoryUsage, NotebookToolIdentity, RuntimeContentItem } from "./runtime-contract.ts";
|
|
2
|
+
export interface NotebookBridgeHandlers {
|
|
3
|
+
callTool(cellId: string, requestId: number, toolName: NotebookToolIdentity, input: unknown): Promise<unknown>;
|
|
4
|
+
cancelTools(cellId: string): void;
|
|
5
|
+
emit(cellId: string, items: RuntimeContentItem[]): void;
|
|
6
|
+
notify(cellId: string, text: string): void;
|
|
7
|
+
yield(cellId: string): void | Promise<void>;
|
|
8
|
+
memory(cellId: string, usage: NotebookMemoryUsage): void;
|
|
9
|
+
}
|
|
10
|
+
export declare class NotebookBridgeServer {
|
|
11
|
+
readonly token: string;
|
|
12
|
+
readonly exitToken: string;
|
|
13
|
+
private readonly handlers;
|
|
14
|
+
private server;
|
|
15
|
+
private origin;
|
|
16
|
+
constructor(handlers: NotebookBridgeHandlers);
|
|
17
|
+
start(): Promise<string>;
|
|
18
|
+
shutdown(): Promise<void>;
|
|
19
|
+
private handle;
|
|
20
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { KernelExecutionResult } from "./jupyter-kernel.ts";
|
|
2
|
+
import type { RuntimeContentItem, ToolExecutionContext } from "./runtime-contract.ts";
|
|
3
|
+
export declare class NotebookCell {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly source: string;
|
|
6
|
+
readonly controller: AbortController;
|
|
7
|
+
readonly items: RuntimeContentItem[];
|
|
8
|
+
readonly maxOutputTokens: number;
|
|
9
|
+
context: ToolExecutionContext;
|
|
10
|
+
result?: KernelExecutionResult | undefined;
|
|
11
|
+
terminated: boolean;
|
|
12
|
+
private outputChars;
|
|
13
|
+
private outputTruncated;
|
|
14
|
+
private cursor;
|
|
15
|
+
private completedValue;
|
|
16
|
+
private yielded;
|
|
17
|
+
private blockersChanged;
|
|
18
|
+
private readonly blockers;
|
|
19
|
+
private readonly completed;
|
|
20
|
+
constructor(options: {
|
|
21
|
+
id: string;
|
|
22
|
+
source: string;
|
|
23
|
+
context: ToolExecutionContext;
|
|
24
|
+
maxOutputTokens: number;
|
|
25
|
+
});
|
|
26
|
+
observe(yieldTimeMs: number, signal?: AbortSignal): Promise<"result" | "yielded">;
|
|
27
|
+
markCompleted(): void;
|
|
28
|
+
isCompleted(): boolean;
|
|
29
|
+
waitForCompletion(): Promise<void>;
|
|
30
|
+
requestYield(): void;
|
|
31
|
+
setBlocked(blockerId: string, active: boolean): void;
|
|
32
|
+
takeContent(): RuntimeContentItem[];
|
|
33
|
+
emit(items: RuntimeContentItem[]): void;
|
|
34
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { NotebookCheckpointIdentity } from "./checkpoint-format.ts";
|
|
2
|
+
export interface NotebookCheckpointActivity {
|
|
3
|
+
touch(): void;
|
|
4
|
+
release(): void;
|
|
5
|
+
}
|
|
6
|
+
export declare function activateNotebookCheckpoint(identity: NotebookCheckpointIdentity, signal?: AbortSignal): Promise<NotebookCheckpointActivity>;
|
|
7
|
+
export declare function expireNotebookSessionCheckpoints(agentDir: string, retentionAge: () => number | undefined, now?: number): Promise<void>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type ProjectBindingMetadata } from "./project-state-format.ts";
|
|
2
|
+
export declare const CHECKPOINT_SCHEMA = 1;
|
|
3
|
+
interface CheckpointEntry extends ProjectBindingMetadata {
|
|
4
|
+
name: string;
|
|
5
|
+
kind: "value" | "function";
|
|
6
|
+
offset: number;
|
|
7
|
+
length: number;
|
|
8
|
+
}
|
|
9
|
+
export interface CheckpointManifest {
|
|
10
|
+
schema: number;
|
|
11
|
+
project: string;
|
|
12
|
+
projectGeneration?: string | undefined;
|
|
13
|
+
projectNames?: string[] | undefined;
|
|
14
|
+
session: string;
|
|
15
|
+
deno: string;
|
|
16
|
+
v8: string;
|
|
17
|
+
payload: string;
|
|
18
|
+
createdAt: string;
|
|
19
|
+
entries: CheckpointEntry[];
|
|
20
|
+
skipped: Array<{
|
|
21
|
+
name: string;
|
|
22
|
+
reason: string;
|
|
23
|
+
}>;
|
|
24
|
+
}
|
|
25
|
+
export interface NotebookCheckpointIdentity {
|
|
26
|
+
project: string;
|
|
27
|
+
session: string;
|
|
28
|
+
agentDir: string;
|
|
29
|
+
}
|
|
30
|
+
export declare function readCheckpointManifest(path: string): CheckpointManifest | undefined;
|
|
31
|
+
export declare function isValidCheckpointPayload(manifest: CheckpointManifest, path: string, maxBytes: number): boolean;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type NotebookCheckpointIdentity } from "./checkpoint.ts";
|
|
2
|
+
import type { DenoJupyterKernel } from "./jupyter-kernel.ts";
|
|
3
|
+
import { type ProjectStateBaseline } from "./project-state.ts";
|
|
4
|
+
import { type ProjectStatePinUpdate } from "./project-state-merge.ts";
|
|
5
|
+
export declare class NotebookCheckpointManager {
|
|
6
|
+
private readonly maxBytes;
|
|
7
|
+
private readonly currentKernel;
|
|
8
|
+
private readonly runningCellId;
|
|
9
|
+
private readonly reportNotice;
|
|
10
|
+
private baselineNames;
|
|
11
|
+
private identity;
|
|
12
|
+
private projectBaseline;
|
|
13
|
+
private timer;
|
|
14
|
+
private dirty;
|
|
15
|
+
private maintenance;
|
|
16
|
+
private lastCheckpointAt;
|
|
17
|
+
constructor(options: {
|
|
18
|
+
maxBytes: number;
|
|
19
|
+
currentKernel(): DenoJupyterKernel | undefined;
|
|
20
|
+
runningCellId(): string | undefined;
|
|
21
|
+
reportNotice(notice: string, showInUi: boolean): void;
|
|
22
|
+
});
|
|
23
|
+
configure(identity: NotebookCheckpointIdentity, baselineNames: Set<string>, projectBaseline: ProjectStateBaseline): void;
|
|
24
|
+
schedule(): void;
|
|
25
|
+
flush(options?: {
|
|
26
|
+
requireIdle?: boolean | undefined;
|
|
27
|
+
force?: boolean | undefined;
|
|
28
|
+
excludeNames?: ReadonlySet<string> | undefined;
|
|
29
|
+
pins?: ProjectStatePinUpdate | undefined;
|
|
30
|
+
}): Promise<void>;
|
|
31
|
+
reset(): void;
|
|
32
|
+
readCommitted(capture: () => Promise<void>): Promise<void>;
|
|
33
|
+
discard(): Promise<void>;
|
|
34
|
+
status(): {
|
|
35
|
+
dirty: boolean;
|
|
36
|
+
projectGeneration: string;
|
|
37
|
+
projectBindings: number;
|
|
38
|
+
lastCheckpointAt?: string | undefined;
|
|
39
|
+
};
|
|
40
|
+
private perform;
|
|
41
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type CheckpointManifest, type NotebookCheckpointIdentity } from "./checkpoint-format.ts";
|
|
2
|
+
export declare function checkpointSource(options: {
|
|
3
|
+
candidates: string[];
|
|
4
|
+
payloadPath: string;
|
|
5
|
+
manifestPath: string;
|
|
6
|
+
directory: string;
|
|
7
|
+
identity: NotebookCheckpointIdentity;
|
|
8
|
+
projectGeneration: string;
|
|
9
|
+
projectNames: string[];
|
|
10
|
+
payload: string;
|
|
11
|
+
previousPayload?: string | undefined;
|
|
12
|
+
skippedInvalid: Array<{
|
|
13
|
+
name: string;
|
|
14
|
+
reason: string;
|
|
15
|
+
}>;
|
|
16
|
+
maxBytes: number;
|
|
17
|
+
}): string;
|
|
18
|
+
export declare function restoreSource(manifest: CheckpointManifest, payloadPath: string, excludeNames?: ReadonlySet<string>): string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type NotebookCheckpointIdentity } from "./checkpoint-format.ts";
|
|
2
|
+
export declare function garbageCollectSupersededNotebookCheckpoints(identity: NotebookCheckpointIdentity): void;
|
|
3
|
+
export declare function removeNotebookCheckpoint(identity: NotebookCheckpointIdentity): void;
|
|
4
|
+
export declare function notebookCheckpointBindingNames(identity: NotebookCheckpointIdentity, maxBytes: number): string[];
|
|
5
|
+
export declare function checkpointPaths(identity: NotebookCheckpointIdentity): {
|
|
6
|
+
directory: string;
|
|
7
|
+
manifest: string;
|
|
8
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type CheckpointManifest, type NotebookCheckpointIdentity } from "./checkpoint-format.ts";
|
|
2
|
+
import type { DenoJupyterKernel } from "./jupyter-kernel.ts";
|
|
3
|
+
import { type ProjectStateBaseline } from "./project-state-format.ts";
|
|
4
|
+
export type { NotebookCheckpointIdentity } from "./checkpoint-format.ts";
|
|
5
|
+
export interface NotebookCheckpointSummary {
|
|
6
|
+
restored: string[];
|
|
7
|
+
skipped: Array<{
|
|
8
|
+
name: string;
|
|
9
|
+
reason: string;
|
|
10
|
+
}>;
|
|
11
|
+
message?: string | undefined;
|
|
12
|
+
}
|
|
13
|
+
export declare function resolveNotebookCheckpointMaxBytes(maxHeapMiB: number): number;
|
|
14
|
+
export declare function writeNotebookCheckpoint(kernel: DenoJupyterKernel, identity: NotebookCheckpointIdentity, baselineNames: ReadonlySet<string>, maxBytes: number, projectBaseline: ProjectStateBaseline, excludeNames?: ReadonlySet<string>): Promise<CheckpointManifest>;
|
|
15
|
+
export declare function restoreNotebookCheckpoint(kernel: DenoJupyterKernel, identity: NotebookCheckpointIdentity, maxBytes: number, projectBaseline: ProjectStateBaseline, signal?: AbortSignal): Promise<NotebookCheckpointSummary>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ProjectStatePinUpdate } from "./project-state-merge.ts";
|
|
2
|
+
import type { NotebookControlRequest, NotebookControlResult, NotebookExecutionClient, NotebookRuntimeOptions, NotebookToolDefinition, RuntimeResponse, ToolExecutionContext } from "./runtime-contract.ts";
|
|
3
|
+
export declare class NotebookClient implements NotebookExecutionClient {
|
|
4
|
+
private readonly execution;
|
|
5
|
+
private readonly session;
|
|
6
|
+
private readonly lifecycle;
|
|
7
|
+
private readonly recovery;
|
|
8
|
+
private readonly isolated;
|
|
9
|
+
constructor(options: NotebookRuntimeOptions);
|
|
10
|
+
execute(source: string, context: ToolExecutionContext, signal?: AbortSignal, tools?: NotebookToolDefinition[]): Promise<RuntimeResponse>;
|
|
11
|
+
wait(cellId: string, yieldTimeMs: number, context: ToolExecutionContext, signal?: AbortSignal): Promise<RuntimeResponse>;
|
|
12
|
+
terminate(cellId: string, context: ToolExecutionContext, signal?: AbortSignal): Promise<RuntimeResponse>;
|
|
13
|
+
checkpoint(excludeNames?: ReadonlySet<string>, pins?: ProjectStatePinUpdate): Promise<void>;
|
|
14
|
+
controlNotebook(request: NotebookControlRequest, context: ToolExecutionContext, signal?: AbortSignal): Promise<NotebookControlResult>;
|
|
15
|
+
shutdown(): Promise<void>;
|
|
16
|
+
private prepareSession;
|
|
17
|
+
private stopWithoutCheckpoint;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const commandOutputFormatterSource = "(value, plain) => {\n const metadata = Object.fromEntries(Object.entries(value).filter(([key]) =>\n key !== \"output\" && key !== \"chunk_id\" && key !== \"wall_time_seconds\"\n && (key !== \"original_token_count\" || value.truncated)));\n const projected = plain ? metadata : { output: value.output, ...metadata };\n let text;\n try { text = JSON.stringify(projected); } catch { text = String(projected); }\n return plain ? text + \"\\nOutput:\\n\" + value.output : text;\n}";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const DENO_VERSION = "2.9.8";
|
|
2
|
+
export interface DenoAsset {
|
|
3
|
+
archive: string;
|
|
4
|
+
archiveSha256: string;
|
|
5
|
+
archiveBytes: number;
|
|
6
|
+
executable: "deno" | "deno.exe";
|
|
7
|
+
binarySha256: string;
|
|
8
|
+
binaryBytes: number;
|
|
9
|
+
}
|
|
10
|
+
export declare function resolveDenoAsset(platform: string, arch: string): DenoAsset;
|
|
11
|
+
export declare function denoAssetUrl(asset: string): string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface DenoBinaryRuntime {
|
|
2
|
+
platform: string;
|
|
3
|
+
arch: string;
|
|
4
|
+
agentDir: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function ensureNotebookDenoBinary(overrides: Partial<Omit<DenoBinaryRuntime, "agentDir">> & Pick<DenoBinaryRuntime, "agentDir">, signal?: AbortSignal): Promise<string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function diagnoseDenoSyntax(deno: string, source: string, env: NodeJS.ProcessEnv, cellSource?: string): Promise<string | undefined>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface DirectoryLock {
|
|
2
|
+
release(): void;
|
|
3
|
+
}
|
|
4
|
+
export declare function acquireDirectoryLock(path: string, options: {
|
|
5
|
+
waitMs: number;
|
|
6
|
+
staleMs: number;
|
|
7
|
+
pollMs: number;
|
|
8
|
+
signal?: AbortSignal | undefined;
|
|
9
|
+
stopWaiting?: (() => boolean) | undefined;
|
|
10
|
+
}): Promise<DirectoryLock | undefined>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type Context } from "@earendil-works/chord";
|
|
2
|
+
import { type ToolExecutionApi } from "@earendil-works/pi-durable";
|
|
3
|
+
import type { CellEngine } from "../../execution/src/cell-contract.ts";
|
|
4
|
+
import type { NotebookControlRequest, NotebookControlResult } from "./runtime-contract.ts";
|
|
5
|
+
import { type NotebookStoragePolicy } from "./storage-retention.ts";
|
|
6
|
+
export interface NotebookEngineOptions {
|
|
7
|
+
stateDirectory: string;
|
|
8
|
+
/** Explicit permission to run Deno and access files in this host namespace. */
|
|
9
|
+
native: {
|
|
10
|
+
environmentId: string;
|
|
11
|
+
env?: NodeJS.ProcessEnv | undefined;
|
|
12
|
+
};
|
|
13
|
+
maxHeapMiB?: number | undefined;
|
|
14
|
+
profile?: string | undefined;
|
|
15
|
+
/** Read at journal write and maintenance boundaries. Defaults: one week of journals, no checkpoint expiry. */
|
|
16
|
+
getStoragePolicy?: () => NotebookStoragePolicy;
|
|
17
|
+
}
|
|
18
|
+
export declare function createNotebookEngine(options: NotebookEngineOptions): CellEngine & {
|
|
19
|
+
control(request: NotebookControlRequest, api: ToolExecutionApi, context: Context): Promise<NotebookControlResult>;
|
|
20
|
+
maintainStorage(): Promise<void>;
|
|
21
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { NotebookBridgeServer } from "./bridge-server.ts";
|
|
2
|
+
import { NotebookCell } from "./cell.ts";
|
|
3
|
+
import type { NotebookToolDefinition, RuntimeResponse, ToolExecutionContext } from "./runtime-contract.ts";
|
|
4
|
+
import type { NotebookSessionRuntime } from "./session-runtime.ts";
|
|
5
|
+
export declare class NotebookExecutionRuntime {
|
|
6
|
+
readonly bridge: NotebookBridgeServer;
|
|
7
|
+
private readonly session;
|
|
8
|
+
private readonly prepareSession;
|
|
9
|
+
private readonly delegate;
|
|
10
|
+
private readonly settlement;
|
|
11
|
+
private readonly stopOperations;
|
|
12
|
+
private activeCell;
|
|
13
|
+
private nextCellId;
|
|
14
|
+
private starting;
|
|
15
|
+
private readonly cellPrefix;
|
|
16
|
+
constructor(session: () => NotebookSessionRuntime, prepareSession: (context: ToolExecutionContext, signal?: AbortSignal) => Promise<void>, completed?: (cell: NotebookCell) => Promise<void>, cellPrefix?: string);
|
|
17
|
+
activeCellId(): string | undefined;
|
|
18
|
+
runningCellId(): string | undefined;
|
|
19
|
+
execute(source: string, context: ToolExecutionContext, signal?: AbortSignal, tools?: NotebookToolDefinition[]): Promise<RuntimeResponse>;
|
|
20
|
+
private executeReserved;
|
|
21
|
+
wait(cellId: string, yieldTimeMs: number, context: ToolExecutionContext, signal?: AbortSignal): Promise<RuntimeResponse>;
|
|
22
|
+
terminate(cellId: string, context: ToolExecutionContext, signal?: AbortSignal): Promise<RuntimeResponse>;
|
|
23
|
+
stopActive(): Promise<string | undefined>;
|
|
24
|
+
clear(): void;
|
|
25
|
+
private observe;
|
|
26
|
+
private finishObservation;
|
|
27
|
+
private stopCell;
|
|
28
|
+
private stopCellInner;
|
|
29
|
+
private stopAndCloseCell;
|
|
30
|
+
private closeCell;
|
|
31
|
+
private withCellContext;
|
|
32
|
+
private withMemory;
|
|
33
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { NotebookCell } from "./cell.ts";
|
|
2
|
+
import type { NotebookSessionRuntime } from "./session-runtime.ts";
|
|
3
|
+
import type { NotebookToolCallbacks } from "./tool-callbacks.ts";
|
|
4
|
+
export declare class NotebookCellSettlement {
|
|
5
|
+
private readonly session;
|
|
6
|
+
private readonly delegate;
|
|
7
|
+
private readonly exitToken;
|
|
8
|
+
private readonly cancelActive;
|
|
9
|
+
private readonly completed;
|
|
10
|
+
constructor(session: () => NotebookSessionRuntime, delegate: NotebookToolCallbacks, exitToken: string, cancelActive: () => void, completed?: (cell: NotebookCell) => Promise<void>);
|
|
11
|
+
run(cell: NotebookCell, source: string, journaled: boolean): Promise<void>;
|
|
12
|
+
private endCellRuntime;
|
|
13
|
+
private recoverAfterFatal;
|
|
14
|
+
reportJournalFailure(error: unknown, operation: string, cell: NotebookCell): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function globMatcher(glob: string): (value: string) => boolean;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type { ExecutionHistoryRequest } from "../../execution/src/history.ts";
|
|
2
|
+
export declare const readForwardedToolCalls: (harness: {
|
|
3
|
+
conversation: (id: import("@earendil-works/pi-durable").ConversationId, context: import("@earendil-works/chord").Context) => Promise<import("@earendil-works/pi-durable").Conversation | undefined>;
|
|
4
|
+
getTask: <R>(id: import("@earendil-works/pi-durable").TaskId<R>, context: import("@earendil-works/chord").Context) => Promise<import("@earendil-works/pi-durable").TaskRecord<import("@earendil-works/chord").JsonValue, import("@earendil-works/chord").JsonValue, R> | undefined>;
|
|
5
|
+
commit: <T>(change: (tx: import("@earendil-works/pi-durable").Tx) => T | Promise<T>, context: import("@earendil-works/chord").Context) => Promise<T>;
|
|
6
|
+
}, request: import("../../execution/src/history.ts").ExecutionHistoryRequest, context: import("@earendil-works/chord").Context) => Promise<ReadonlyMap<string, import("./presentation.ts").ForwardedToolCalls>>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { type Context } from "@earendil-works/chord";
|
|
2
|
+
import { type Harness, type TaskId } from "@earendil-works/pi-durable";
|
|
3
|
+
import { Type } from "typebox";
|
|
4
|
+
import { type ShellRuntimeOptions } from "../../execution/src/shell.ts";
|
|
5
|
+
import { type NotebookEngineOptions } from "./engine.ts";
|
|
6
|
+
export type { CustomCommandBackend, CustomCommandRequest, NodeCommandBackendOptions, } from "../../execution/src/command-backend.ts";
|
|
7
|
+
export { createNodeCommandBackend } from "../../execution/src/command-backend.ts";
|
|
8
|
+
export type { CustomCommandDefinition, CustomCommandParseOptions, } from "../../execution/src/custom-command-config.ts";
|
|
9
|
+
export { parseCustomCommand } from "../../execution/src/custom-command-config.ts";
|
|
10
|
+
export type { CustomCommandDiscovery, CustomCommandDiscoveryError, CustomCommandOptions, CustomCommandRoot, LiveCustomCommandOptions, } from "../../execution/src/custom-commands.ts";
|
|
11
|
+
export { createCustomCommands, discoverCustomCommands, loadCustomCommandTools, } from "../../execution/src/custom-commands.ts";
|
|
12
|
+
export { CODE_MODE_EXEC_CONSTRAINED_SAMPLING as NOTEBOOK_EXEC_CONSTRAINED_SAMPLING, CODE_MODE_EXEC_GRAMMAR as NOTEBOOK_EXEC_GRAMMAR, } from "../../execution/src/exec-source.ts";
|
|
13
|
+
export type { NodeShellBackendOptions, ShellOutputStream, ShellProcess, ShellProcessBackend, ShellProcessEvents, ShellRuntimeOptions, ShellSpawnRequest, } from "../../execution/src/shell.ts";
|
|
14
|
+
export { createNodeShellBackend } from "../../execution/src/shell.ts";
|
|
15
|
+
export type { ExecutionToolHints, ExecutionToolRegistration, } from "../../execution/src/tool-contract.ts";
|
|
16
|
+
export type { NotebookEngineOptions } from "./engine.ts";
|
|
17
|
+
export type { NotebookCheckpointRetention, NotebookJournalRetention, NotebookStoragePolicy, } from "./storage-retention.ts";
|
|
18
|
+
export interface NotebookModeOptions extends NotebookEngineOptions {
|
|
19
|
+
shell: ShellRuntimeOptions;
|
|
20
|
+
cancelTask: (id: TaskId, context: Context) => ReturnType<Harness["abortTask"]>;
|
|
21
|
+
}
|
|
22
|
+
/** One application-owned Notebook component, with lazily started private conversation kernels. */
|
|
23
|
+
export declare function createNotebookMode(options: NotebookModeOptions): {
|
|
24
|
+
extension: import("@earendil-works/pi-durable").Extension<{
|
|
25
|
+
name: string;
|
|
26
|
+
description: string;
|
|
27
|
+
parameters: Type.TObject<{
|
|
28
|
+
input: Type.TOptional<Type.TString>;
|
|
29
|
+
}>;
|
|
30
|
+
constrainedSampling?: false | import("@earendil-works/pi-ai").ConstrainedSamplingConfig;
|
|
31
|
+
replay?: "safe" | "unsafe";
|
|
32
|
+
executionMode?: import("@earendil-works/pi-durable").ToolExecutionMode;
|
|
33
|
+
prepareArguments?(args: unknown): {
|
|
34
|
+
input?: string;
|
|
35
|
+
};
|
|
36
|
+
structuredOutputSchema?: Type.TSchema;
|
|
37
|
+
callers?: readonly ("model" | "tools")[];
|
|
38
|
+
deferred?: true;
|
|
39
|
+
outputLimits?: {
|
|
40
|
+
readonly maxBytes?: number;
|
|
41
|
+
readonly maxLines?: number;
|
|
42
|
+
readonly retain?: "head" | "tail";
|
|
43
|
+
};
|
|
44
|
+
execute(args: {
|
|
45
|
+
input?: string;
|
|
46
|
+
}, api: import("@earendil-works/pi-durable").ToolExecutionApi<import("@earendil-works/chord").JsonValue>, context: Context): Promise<import("@earendil-works/pi-durable").ToolExecutionResult<import("@earendil-works/chord").JsonValue>>;
|
|
47
|
+
executionHints: {
|
|
48
|
+
discovery: "help";
|
|
49
|
+
inputSchema: import("@earendil-works/chord").JsonValue;
|
|
50
|
+
};
|
|
51
|
+
} | import("@earendil-works/pi-durable").ToolRegistration>;
|
|
52
|
+
/** Bind the owning Harness before execution to retain native nested display receipts and native-only tools. */
|
|
53
|
+
bind: (harness: Pick<Harness, "conversation">) => void;
|
|
54
|
+
/** Apply current host storage policy immediately, including historical journals. */
|
|
55
|
+
maintainStorage: () => Promise<void>;
|
|
56
|
+
close(): Promise<void>;
|
|
57
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { NotebookRuntimeOptions, NotebookToolDefinition, RuntimeResponse, ToolExecutionContext } from "./runtime-contract.ts";
|
|
2
|
+
export declare class NotebookIsolatedRuntime {
|
|
3
|
+
private readonly runs;
|
|
4
|
+
private readonly starting;
|
|
5
|
+
private stopping;
|
|
6
|
+
private readonly options;
|
|
7
|
+
private readonly readCommitted;
|
|
8
|
+
private identity;
|
|
9
|
+
private readonly disposal;
|
|
10
|
+
constructor(options: NotebookRuntimeOptions, readCommitted: (capture: () => Promise<void>) => Promise<void>);
|
|
11
|
+
identityMatches(context: ToolExecutionContext): boolean;
|
|
12
|
+
has(cellId: string): boolean;
|
|
13
|
+
execute(source: string, context: ToolExecutionContext, signal: AbortSignal | undefined, tools: NotebookToolDefinition[]): Promise<RuntimeResponse>;
|
|
14
|
+
wait(cellId: string, yieldTimeMs: number, context: ToolExecutionContext, signal?: AbortSignal): Promise<RuntimeResponse>;
|
|
15
|
+
terminate(cellId: string, context: ToolExecutionContext, signal?: AbortSignal): Promise<RuntimeResponse>;
|
|
16
|
+
shutdown(): Promise<void>;
|
|
17
|
+
private dispose;
|
|
18
|
+
private disposeRun;
|
|
19
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { NotebookRuntimeOptions, ToolExecutionContext } from "./runtime-contract.ts";
|
|
2
|
+
export declare function prepareIsolatedNotebookStorage(options: NotebookRuntimeOptions, context: ToolExecutionContext, directory: string, readCommitted: (capture: () => Promise<void>) => Promise<void>, signal: AbortSignal): Promise<void>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { KernelExecutionResult } from "./jupyter-output.ts";
|
|
2
|
+
import type { RuntimeContentItem } from "./runtime-contract.ts";
|
|
3
|
+
export interface NotebookDocument {
|
|
4
|
+
cells: NotebookCell[];
|
|
5
|
+
metadata: Record<string, unknown>;
|
|
6
|
+
nbformat: number;
|
|
7
|
+
nbformat_minor: number;
|
|
8
|
+
}
|
|
9
|
+
export interface NotebookCell {
|
|
10
|
+
id: string;
|
|
11
|
+
cell_type: string;
|
|
12
|
+
execution_count?: number | null | undefined;
|
|
13
|
+
metadata: Record<string, unknown>;
|
|
14
|
+
outputs?: Array<Record<string, unknown>> | undefined;
|
|
15
|
+
source: string[] | string;
|
|
16
|
+
}
|
|
17
|
+
export type NotebookJournalEvent = {
|
|
18
|
+
type: "begin";
|
|
19
|
+
id: string;
|
|
20
|
+
source: string;
|
|
21
|
+
createdAt: string;
|
|
22
|
+
} | {
|
|
23
|
+
type: "finish";
|
|
24
|
+
id: string;
|
|
25
|
+
source: string;
|
|
26
|
+
status: string;
|
|
27
|
+
completedAt: string;
|
|
28
|
+
outputs: Array<Record<string, unknown>>;
|
|
29
|
+
};
|
|
30
|
+
export declare function emptyNotebookDocument(project: string, session: string): NotebookDocument;
|
|
31
|
+
export declare function applyNotebookJournalEvent(document: NotebookDocument, event: NotebookJournalEvent): void;
|
|
32
|
+
export declare function readNotebookDocument(path: string, maxBytes?: number): NotebookDocument | undefined;
|
|
33
|
+
export declare function writeNotebookDocument(path: string, document: NotebookDocument, maxBytes?: number): void;
|
|
34
|
+
export declare function notebookCellId(cell: NotebookCell): string | undefined;
|
|
35
|
+
export declare function notebookCellStatus(cell: NotebookCell): string | undefined;
|
|
36
|
+
export declare function journalOutputs(items: RuntimeContentItem[], result: KernelExecutionResult, maxChars: number): Array<Record<string, unknown>>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { KernelExecutionResult } from "./jupyter-kernel.ts";
|
|
2
|
+
import type { RuntimeContentItem } from "./runtime-contract.ts";
|
|
3
|
+
import { NotebookStorageRetention } from "./storage-retention.ts";
|
|
4
|
+
export interface NotebookJournal {
|
|
5
|
+
agentDir: string;
|
|
6
|
+
storage: NotebookStorageRetention;
|
|
7
|
+
path: string;
|
|
8
|
+
eventsPath: string;
|
|
9
|
+
project: string;
|
|
10
|
+
session: string;
|
|
11
|
+
cells: number;
|
|
12
|
+
completedCells: number;
|
|
13
|
+
writable: boolean;
|
|
14
|
+
maxBytes: number;
|
|
15
|
+
}
|
|
16
|
+
export interface NotebookJournalCodeCell {
|
|
17
|
+
id: string;
|
|
18
|
+
index: number;
|
|
19
|
+
source: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function initializeNotebookJournal(identity: {
|
|
22
|
+
project: string;
|
|
23
|
+
session: string;
|
|
24
|
+
agentDir: string;
|
|
25
|
+
}, maxBytes: number, storage?: NotebookStorageRetention): NotebookJournal | undefined;
|
|
26
|
+
export declare function beginNotebookJournalCell(journal: NotebookJournal, cell: {
|
|
27
|
+
id: string;
|
|
28
|
+
source: string;
|
|
29
|
+
}): void;
|
|
30
|
+
export declare function finishNotebookJournalCell(journal: NotebookJournal, cell: {
|
|
31
|
+
id: string;
|
|
32
|
+
source: string;
|
|
33
|
+
items: RuntimeContentItem[];
|
|
34
|
+
result: KernelExecutionResult;
|
|
35
|
+
}): void;
|
|
36
|
+
export declare function materializeNotebookJournal(journal: NotebookJournal): void;
|
|
37
|
+
export declare function readNotebookJournalCodeCells(path: string): NotebookJournalCodeCell[];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface JupyterConnectionInfo {
|
|
2
|
+
ip: "127.0.0.1";
|
|
3
|
+
transport: "tcp";
|
|
4
|
+
shell_port: number;
|
|
5
|
+
iopub_port: number;
|
|
6
|
+
stdin_port: number;
|
|
7
|
+
control_port: number;
|
|
8
|
+
hb_port: number;
|
|
9
|
+
signature_scheme: "hmac-sha256";
|
|
10
|
+
key: string;
|
|
11
|
+
kernel_name: "deno";
|
|
12
|
+
}
|
|
13
|
+
export declare function createJupyterConnectionFile(): Promise<{
|
|
14
|
+
info: JupyterConnectionInfo;
|
|
15
|
+
path: string;
|
|
16
|
+
dir: string;
|
|
17
|
+
}>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type KernelExecutionResult } from "./jupyter-output.ts";
|
|
2
|
+
import { type JupyterMessage } from "./jupyter-wire.ts";
|
|
3
|
+
import type { RuntimeContentItem } from "./runtime-contract.ts";
|
|
4
|
+
interface JupyterExecutionHost {
|
|
5
|
+
deno: string;
|
|
6
|
+
env: NodeJS.ProcessEnv;
|
|
7
|
+
start(signal?: AbortSignal): Promise<void>;
|
|
8
|
+
sendShellRequest(request: JupyterMessage, timeoutMs?: number, requestType?: string): Promise<JupyterMessage>;
|
|
9
|
+
interrupt(): Promise<void>;
|
|
10
|
+
failKernel(error: Error): void;
|
|
11
|
+
}
|
|
12
|
+
/** Collection spans the cell reply/idle and a FIFO output marker's reply/idle. */
|
|
13
|
+
export declare class JupyterExecution {
|
|
14
|
+
private active;
|
|
15
|
+
private readonly session;
|
|
16
|
+
private readonly host;
|
|
17
|
+
constructor(session: string, host: JupyterExecutionHost);
|
|
18
|
+
isActive(): boolean;
|
|
19
|
+
reject(error: Error): void;
|
|
20
|
+
execute(code: string, options?: {
|
|
21
|
+
cellSource?: string | undefined;
|
|
22
|
+
signal?: AbortSignal | undefined;
|
|
23
|
+
onOutput?: ((item: RuntimeContentItem) => void) | undefined;
|
|
24
|
+
interruptOnAbort?: boolean | undefined;
|
|
25
|
+
}): Promise<KernelExecutionResult>;
|
|
26
|
+
accept(message: JupyterMessage): void;
|
|
27
|
+
private drainOutput;
|
|
28
|
+
}
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { KernelExecutionResult } from "./jupyter-output.ts";
|
|
2
|
+
import type { RuntimeContentItem } from "./runtime-contract.ts";
|
|
3
|
+
export type { KernelExecutionResult } from "./jupyter-output.ts";
|
|
4
|
+
export declare class DenoJupyterKernel {
|
|
5
|
+
private readonly deno;
|
|
6
|
+
private readonly execution;
|
|
7
|
+
private readonly shellChannel;
|
|
8
|
+
private readonly env;
|
|
9
|
+
private readonly maxHeapMiB;
|
|
10
|
+
private readonly onFailure;
|
|
11
|
+
private readonly session;
|
|
12
|
+
private process;
|
|
13
|
+
private tempDir;
|
|
14
|
+
private connection;
|
|
15
|
+
private control;
|
|
16
|
+
private iopub;
|
|
17
|
+
private shellPump;
|
|
18
|
+
private iopubPump;
|
|
19
|
+
private startup;
|
|
20
|
+
private stderr;
|
|
21
|
+
private terminalFailure;
|
|
22
|
+
constructor(options: {
|
|
23
|
+
deno: string;
|
|
24
|
+
maxHeapMiB: number;
|
|
25
|
+
env?: NodeJS.ProcessEnv | undefined;
|
|
26
|
+
onFailure?: ((kernel: DenoJupyterKernel, error: Error) => void) | undefined;
|
|
27
|
+
});
|
|
28
|
+
start(signal?: AbortSignal): Promise<void>;
|
|
29
|
+
execute(code: string, options?: {
|
|
30
|
+
cellSource?: string | undefined;
|
|
31
|
+
signal?: AbortSignal | undefined;
|
|
32
|
+
onOutput?: ((item: RuntimeContentItem) => void) | undefined;
|
|
33
|
+
interruptOnAbort?: boolean | undefined;
|
|
34
|
+
}): Promise<KernelExecutionResult>;
|
|
35
|
+
complete(code?: string, cursorPosition?: number, signal?: AbortSignal): Promise<string[]>;
|
|
36
|
+
interrupt(): Promise<void>;
|
|
37
|
+
shutdown(): Promise<void>;
|
|
38
|
+
private startInner;
|
|
39
|
+
private waitForKernelReady;
|
|
40
|
+
private runIopubPump;
|
|
41
|
+
private failKernel;
|
|
42
|
+
private dispose;
|
|
43
|
+
}
|