@howaboua/pi-durable-worker-code 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/README.md +1 -1
- package/dist/activation.js +349 -97
- 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/history.d.ts +1 -1
- 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/history.js +18 -11
- package/dist/index.js +349 -97
- package/dist/worker-code/src/guest.d.ts +1 -1
- package/dist/worker-code/src/history.d.ts +4 -4
- package/dist/worker-code/src/index.d.ts +5 -4
- package/dist/worker-code/src/modules.d.ts +1 -1
- package/dist/worker-code/src/output.d.ts +1 -1
- package/dist/worker-code/src/runtime.d.ts +2 -1
- package/dist/worker-code/src/tool-result.d.ts +1 -1
- package/package.json +8 -8
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type { ExecutionHistoryRequest } from "../../execution/src/history.ts";
|
|
2
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, options?: import("@earendil-works/pi-durable").CommitOptions) => Promise<T>;
|
|
6
|
-
}, request: import("../../execution/src/history.ts").ExecutionHistoryRequest, context: import("@earendil-works/chord").Context) => Promise<ReadonlyMap<string, import("./presentation.ts").ForwardedToolCalls>>;
|
|
3
|
+
conversation: (id: import("@earendil-works/pi-durable").ConversationId, context: import("@earendil-works/chord/context").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").Context) => Promise<import("@earendil-works/pi-durable").TaskRecord<import("@earendil-works/chord/json").JsonValue, import("@earendil-works/chord/json").JsonValue, R> | undefined>;
|
|
5
|
+
commit: <T>(change: (tx: import("@earendil-works/pi-durable").Tx) => T | Promise<T>, context: import("@earendil-works/chord/context").Context, options?: import("@earendil-works/pi-durable").CommitOptions) => Promise<T>;
|
|
6
|
+
}, request: import("../../execution/src/history.ts").ExecutionHistoryRequest, context: import("@earendil-works/chord/context").Context) => Promise<ReadonlyMap<string, import("./presentation.ts").ForwardedToolCalls>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Context } from "@earendil-works/chord/context";
|
|
2
2
|
import { type ToolExecutionApi, type ToolExecutionResult } from "@earendil-works/pi-durable";
|
|
3
3
|
import { Type } from "typebox";
|
|
4
4
|
import { type CellCoordinatorOptions } from "../../execution/src/cell-contract.ts";
|
|
@@ -20,17 +20,18 @@ export interface WorkerCodeOptions {
|
|
|
20
20
|
export declare function createWorkerCode(options: WorkerCodeOptions): {
|
|
21
21
|
extension: {
|
|
22
22
|
name: string;
|
|
23
|
+
namespace?: import("@earendil-works/pi-durable").ToolNamespace;
|
|
23
24
|
hooks?: readonly import("@earendil-works/pi-durable").HookRegistration[];
|
|
24
25
|
wraps?: readonly import("@earendil-works/pi-durable").Wrap<import("@earendil-works/pi-durable").ToolRegistration>[];
|
|
25
26
|
tasks?: readonly import("@earendil-works/pi-durable").AnyTask[];
|
|
26
27
|
tools: (import("@earendil-works/pi-durable").ToolRegistration<Type.TObject<{
|
|
27
28
|
code: Type.TString;
|
|
28
|
-
}>, import("@earendil-works/chord").JsonValue> | import("@earendil-works/pi-durable").ToolRegistration<Type.TObject<{
|
|
29
|
+
}>, import("@earendil-works/chord/json").JsonValue, import("@earendil-works/chord/json").JsonValue> | import("@earendil-works/pi-durable").ToolRegistration<Type.TObject<{
|
|
29
30
|
cell_id: Type.TString;
|
|
30
31
|
yield_time_ms: Type.TOptional<Type.TInteger>;
|
|
31
32
|
max_tokens: Type.TOptional<Type.TInteger>;
|
|
32
33
|
terminate: Type.TOptional<Type.TBoolean>;
|
|
33
|
-
}>, import("@earendil-works/chord").JsonValue>)[];
|
|
34
|
+
}>, import("@earendil-works/chord/json").JsonValue, import("@earendil-works/chord/json").JsonValue>)[];
|
|
34
35
|
sections: import("@earendil-works/pi-durable").PromptSection<import("@earendil-works/pi-durable").ToolRegistration>[];
|
|
35
36
|
};
|
|
36
37
|
/** Bind the owning Harness before execution to retain native nested display receipts. */
|
|
@@ -38,7 +39,7 @@ export declare function createWorkerCode(options: WorkerCodeOptions): {
|
|
|
38
39
|
budget: typeof interpreterBudget;
|
|
39
40
|
evaluateModule(request: WorkerModuleRequest, invocation?: {
|
|
40
41
|
readonly signal?: AbortSignal;
|
|
41
|
-
}): Promise<import("@earendil-works/chord").JsonValue>;
|
|
42
|
+
}): Promise<import("@earendil-works/chord/json").JsonValue>;
|
|
42
43
|
/** Reuse the cell dispatcher under the CURRENT ordinary tool task, not another cell. */
|
|
43
44
|
executeToolModule(request: WorkerModuleRequest, api: ToolExecutionApi, context: Context, grants?: {
|
|
44
45
|
readonly allowedTools?: readonly string[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type JsonValue } from "@earendil-works/chord";
|
|
1
|
+
import { type JsonValue } from "@earendil-works/chord/json";
|
|
2
2
|
import type { ToolExecutionResult } from "@earendil-works/pi-durable";
|
|
3
3
|
import type { CellObservation } from "../../execution/src/cell-contract.ts";
|
|
4
4
|
export declare function guestContent(kind: "text" | "image", value: JsonValue): NonNullable<ToolExecutionResult["output"]>[number];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Context } from "@earendil-works/chord/context";
|
|
2
|
+
import type { JsonValue } from "@earendil-works/chord/json";
|
|
2
3
|
import type { ToolExecutionResult } from "@earendil-works/pi-durable";
|
|
3
4
|
import type { CellEngine, CellEngineApi } from "../../execution/src/cell-contract.ts";
|
|
4
5
|
import { type GuestCapabilities } from "./guest.ts";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@howaboua/pi-durable-worker-code",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "Bounded Worker-native JavaScript execution for Pi Durable",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@jitl/quickjs-wasmfile-release-sync": "0.32.0",
|
|
43
43
|
"quickjs-emscripten": "0.32.0",
|
|
44
|
-
"typebox": "1.
|
|
45
|
-
"@howaboua/pi-durable-components": "0.
|
|
46
|
-
"@earendil-works/pi-schema": "1.
|
|
44
|
+
"typebox": "1.4.7",
|
|
45
|
+
"@howaboua/pi-durable-components": "0.13.0",
|
|
46
|
+
"@earendil-works/pi-schema": "1.8.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@earendil-works/chord": "1.
|
|
50
|
-
"@earendil-works/pi-ai": "1.
|
|
51
|
-
"@earendil-works/pi-durable": "1.
|
|
52
|
-
"@modelcontextprotocol/sdk": ">=1.
|
|
49
|
+
"@earendil-works/chord": "1.8.0",
|
|
50
|
+
"@earendil-works/pi-ai": "1.8.0",
|
|
51
|
+
"@earendil-works/pi-durable": "1.8.0",
|
|
52
|
+
"@modelcontextprotocol/sdk": ">=1.32.2 <2"
|
|
53
53
|
},
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|