@howaboua/pi-durable-js-notebook 0.11.0 → 0.13.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.
- package/NOTICE +1 -1
- package/README.md +1 -1
- package/dist/activation.js +358 -105
- package/dist/execution/src/cell-contract.d.ts +2 -1
- package/dist/execution/src/cell-observation.d.ts +1 -1
- package/dist/execution/src/cell-progress.d.ts +1 -1
- package/dist/execution/src/cell-tools.d.ts +2 -1
- package/dist/execution/src/cells.d.ts +1 -1
- package/dist/execution/src/custom-commands.d.ts +3 -2
- package/dist/execution/src/invocation-state.d.ts +1 -1
- package/dist/execution/src/invocation.d.ts +79 -2
- package/dist/execution/src/native-tools.d.ts +18 -7
- package/dist/execution/src/nested-call.d.ts +11 -3
- package/dist/execution/src/nested-park.d.ts +9 -0
- package/dist/execution/src/nested-result.d.ts +1 -1
- package/dist/execution/src/tool-contract.d.ts +8 -1
- package/dist/execution/src/tool-namespaces.d.ts +31 -0
- package/dist/execution/src/tool-origin.d.ts +9 -1
- package/dist/execution/src/wait-session.d.ts +1 -1
- package/dist/index.js +358 -105
- package/dist/js-notebook/src/engine.d.ts +1 -1
- package/dist/js-notebook/src/index.d.ts +5 -2
- package/dist/js-notebook/src/runtime-contract.d.ts +1 -0
- package/dist/notebook/src/runtime-contract.d.ts +3 -0
- package/dist/notebook/src/tool-observation.d.ts +5 -4
- package/package.json +10 -10
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Context } from "@earendil-works/chord/context";
|
|
2
2
|
import { type ToolExecutionApi } from "@earendil-works/pi-durable";
|
|
3
3
|
import type { CellEngine } from "../../execution/src/cell-contract.ts";
|
|
4
4
|
import type { NotebookControlRequest, NotebookControlResult } from "./runtime-contract.ts";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Context } from "@earendil-works/chord/context";
|
|
2
2
|
import { type Harness, type TaskId } from "@earendil-works/pi-durable";
|
|
3
3
|
import { Type } from "typebox";
|
|
4
4
|
import { type ShellRuntimeOptions } from "../../execution/src/shell.ts";
|
|
@@ -42,7 +42,10 @@ export declare function createJsNotebookMode(options: JsNotebookModeOptions): {
|
|
|
42
42
|
};
|
|
43
43
|
execute(args: {
|
|
44
44
|
input?: string;
|
|
45
|
-
}, 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>>;
|
|
45
|
+
}, api: import("@earendil-works/pi-durable").ToolExecutionApi<import("@earendil-works/chord/json").JsonValue, import("@earendil-works/chord/json").JsonValue>, context: Context): Promise<import("@earendil-works/pi-durable").ToolExecutionResult<import("@earendil-works/chord/json").JsonValue> | import("@earendil-works/pi-durable").ToolPark<import("@earendil-works/chord/json").JsonValue>>;
|
|
46
|
+
cancel?(args: {
|
|
47
|
+
input?: string;
|
|
48
|
+
}, api: import("@earendil-works/pi-durable").ToolExecutionApi<import("@earendil-works/chord/json").JsonValue, import("@earendil-works/chord/json").JsonValue>, context: Context): Promise<void>;
|
|
46
49
|
executionHints: {
|
|
47
50
|
discovery: "help";
|
|
48
51
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { JsToolNamespace } from "../../execution/src/tool-namespaces.ts";
|
|
1
2
|
import type { NotebookStorageRetention } from "./storage-retention.ts";
|
|
2
3
|
export interface NotebookSessionContext {
|
|
3
4
|
cwd: string;
|
|
@@ -32,6 +33,8 @@ export interface NotebookToolIdentity {
|
|
|
32
33
|
namespace?: string | undefined;
|
|
33
34
|
}
|
|
34
35
|
export interface NotebookToolDefinition {
|
|
36
|
+
hidden?: boolean;
|
|
37
|
+
jsNamespace?: JsToolNamespace;
|
|
35
38
|
name: string;
|
|
36
39
|
description: string;
|
|
37
40
|
usage: string;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Context } from "@earendil-works/chord/context";
|
|
2
2
|
import { type TaskId, type ToolExecutionApi } from "@earendil-works/pi-durable";
|
|
3
3
|
import type { CellObservation } from "../../execution/src/cell-contract.ts";
|
|
4
4
|
export declare function notebookCellTaskId(value: string): TaskId<import("@earendil-works/pi-durable").ToolExecutionResult>;
|
|
5
5
|
export declare function observeNotebookCell(observation: CellObservation, maxTokens: number, api: ToolExecutionApi, context: Context): Promise<import("@earendil-works/pi-durable").ToolExecutionResult | {
|
|
6
|
-
structuredOutput?: import("@earendil-works/chord").JsonValue;
|
|
6
|
+
structuredOutput?: import("@earendil-works/chord/json").JsonValue;
|
|
7
7
|
isError?: boolean;
|
|
8
8
|
diagnostics?: readonly import("@earendil-works/pi-durable").ToolDiagnostic[];
|
|
9
9
|
usage?: import("@earendil-works/pi-ai").Usage;
|
|
10
10
|
control?: import("@earendil-works/pi-durable").ToolControl;
|
|
11
|
+
kind?: never;
|
|
11
12
|
output: (import("@earendil-works/pi-ai").ImageContent | {
|
|
12
13
|
type: "text";
|
|
13
14
|
text: string;
|
|
@@ -15,7 +16,7 @@ export declare function observeNotebookCell(observation: CellObservation, maxTok
|
|
|
15
16
|
details: {
|
|
16
17
|
cell_id: string;
|
|
17
18
|
status: "aborted" | "completed" | "failed" | "interrupted" | "running";
|
|
18
|
-
forwardedToolCalls?: import("@earendil-works/chord").JsonValue;
|
|
19
|
-
runtime?: import("@earendil-works/chord").JsonValue;
|
|
19
|
+
forwardedToolCalls?: import("@earendil-works/chord/json").JsonValue;
|
|
20
|
+
runtime?: import("@earendil-works/chord/json").JsonValue;
|
|
20
21
|
};
|
|
21
22
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@howaboua/pi-durable-js-notebook",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "Persistent QuickJS notebook and shell tools for Pi Durable",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,19 +38,19 @@
|
|
|
38
38
|
"sideEffects": false,
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"node-pty": "1.1.0",
|
|
41
|
-
"smol-toml": "1.9.
|
|
42
|
-
"typebox": "1.
|
|
41
|
+
"smol-toml": "1.9.1",
|
|
42
|
+
"typebox": "1.4.7",
|
|
43
43
|
"acorn": "8.19.0",
|
|
44
44
|
"quickjs-wasi": "3.6.3",
|
|
45
|
-
"@earendil-works/pi-codemode": "1.
|
|
46
|
-
"@howaboua/pi-durable-components": "0.
|
|
47
|
-
"@earendil-works/pi-schema": "1.
|
|
45
|
+
"@earendil-works/pi-codemode": "1.8.0",
|
|
46
|
+
"@howaboua/pi-durable-components": "0.13.0",
|
|
47
|
+
"@earendil-works/pi-schema": "1.8.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@earendil-works/chord": "1.
|
|
51
|
-
"@earendil-works/pi-ai": "1.
|
|
52
|
-
"@earendil-works/pi-durable": "1.
|
|
53
|
-
"@modelcontextprotocol/sdk": ">=1.
|
|
50
|
+
"@earendil-works/chord": "1.8.0",
|
|
51
|
+
"@earendil-works/pi-ai": "1.8.0",
|
|
52
|
+
"@earendil-works/pi-durable": "1.8.0",
|
|
53
|
+
"@modelcontextprotocol/sdk": ">=1.32.2 <2"
|
|
54
54
|
},
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|